diff --git a/public/build/assets/app-DnWIn4dE.js b/public/build/assets/app-Cm_4r-yX.js similarity index 53% rename from public/build/assets/app-DnWIn4dE.js rename to public/build/assets/app-Cm_4r-yX.js index 3800577..5add52c 100644 --- a/public/build/assets/app-DnWIn4dE.js +++ b/public/build/assets/app-Cm_4r-yX.js @@ -1,93 +1,93 @@ -function nV(w,g){return function(){return w.apply(g,arguments)}}const{toString:bX}=Object.prototype,{getPrototypeOf:P7}=Object,N5=(w=>g=>{const S=bX.call(g);return w[S]||(w[S]=S.slice(8,-1).toLowerCase())})(Object.create(null)),Qp=w=>(w=w.toLowerCase(),g=>N5(g)===w),D5=w=>g=>typeof g===w,{isArray:Rk}=Array,c4=D5("undefined");function yX(w){return w!==null&&!c4(w)&&w.constructor!==null&&!c4(w.constructor)&&Bf(w.constructor.isBuffer)&&w.constructor.isBuffer(w)}const sV=Qp("ArrayBuffer");function vX(w){let g;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?g=ArrayBuffer.isView(w):g=w&&w.buffer&&sV(w.buffer),g}const _X=D5("string"),Bf=D5("function"),rV=D5("number"),R5=w=>w!==null&&typeof w=="object",xX=w=>w===!0||w===!1,_5=w=>{if(N5(w)!=="object")return!1;const g=P7(w);return(g===null||g===Object.prototype||Object.getPrototypeOf(g)===null)&&!(Symbol.toStringTag in w)&&!(Symbol.iterator in w)},wX=Qp("Date"),kX=Qp("File"),CX=Qp("Blob"),SX=Qp("FileList"),EX=w=>R5(w)&&Bf(w.pipe),TX=w=>{let g;return w&&(typeof FormData=="function"&&w instanceof FormData||Bf(w.append)&&((g=N5(w))==="formdata"||g==="object"&&Bf(w.toString)&&w.toString()==="[object FormData]"))},AX=Qp("URLSearchParams"),[OX,zX,NX,DX]=["ReadableStream","Request","Response","Headers"].map(Qp),RX=w=>w.trim?w.trim():w.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function u4(w,g,{allOwnKeys:S=!1}={}){if(w===null||typeof w>"u")return;let B,W;if(typeof w!="object"&&(w=[w]),Rk(w))for(B=0,W=w.length;B0;)if(W=S[B],g===W.toLowerCase())return W;return null}const f_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,iV=w=>!c4(w)&&w!==f_;function x7(){const{caseless:w}=iV(this)&&this||{},g={},S=(B,W)=>{const te=w&&aV(g,W)||W;_5(g[te])&&_5(B)?g[te]=x7(g[te],B):_5(B)?g[te]=x7({},B):Rk(B)?g[te]=B.slice():g[te]=B};for(let B=0,W=arguments.length;B(u4(g,(W,te)=>{S&&Bf(W)?w[te]=nV(W,S):w[te]=W},{allOwnKeys:B}),w),BX=w=>(w.charCodeAt(0)===65279&&(w=w.slice(1)),w),LX=(w,g,S,B)=>{w.prototype=Object.create(g.prototype,B),w.prototype.constructor=w,Object.defineProperty(w,"super",{value:g.prototype}),S&&Object.assign(w.prototype,S)},PX=(w,g,S,B)=>{let W,te,ce;const Ee={};if(g=g||{},w==null)return g;do{for(W=Object.getOwnPropertyNames(w),te=W.length;te-- >0;)ce=W[te],(!B||B(ce,w,g))&&!Ee[ce]&&(g[ce]=w[ce],Ee[ce]=!0);w=S!==!1&&P7(w)}while(w&&(!S||S(w,g))&&w!==Object.prototype);return g},IX=(w,g,S)=>{w=String(w),(S===void 0||S>w.length)&&(S=w.length),S-=g.length;const B=w.indexOf(g,S);return B!==-1&&B===S},FX=w=>{if(!w)return null;if(Rk(w))return w;let g=w.length;if(!rV(g))return null;const S=new Array(g);for(;g-- >0;)S[g]=w[g];return S},$X=(w=>g=>w&&g instanceof w)(typeof Uint8Array<"u"&&P7(Uint8Array)),HX=(w,g)=>{const B=(w&&w[Symbol.iterator]).call(w);let W;for(;(W=B.next())&&!W.done;){const te=W.value;g.call(w,te[0],te[1])}},VX=(w,g)=>{let S;const B=[];for(;(S=w.exec(g))!==null;)B.push(S);return B},jX=Qp("HTMLFormElement"),UX=w=>w.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(S,B,W){return B.toUpperCase()+W}),iH=(({hasOwnProperty:w})=>(g,S)=>w.call(g,S))(Object.prototype),ZX=Qp("RegExp"),lV=(w,g)=>{const S=Object.getOwnPropertyDescriptors(w),B={};u4(S,(W,te)=>{let ce;(ce=g(W,te,w))!==!1&&(B[te]=ce||W)}),Object.defineProperties(w,B)},WX=w=>{lV(w,(g,S)=>{if(Bf(w)&&["arguments","caller","callee"].indexOf(S)!==-1)return!1;const B=w[S];if(Bf(B)){if(g.enumerable=!1,"writable"in g){g.writable=!1;return}g.set||(g.set=()=>{throw Error("Can not rewrite read-only method '"+S+"'")})}})},qX=(w,g)=>{const S={},B=W=>{W.forEach(te=>{S[te]=!0})};return Rk(w)?B(w):B(String(w).split(g)),S},KX=()=>{},GX=(w,g)=>w!=null&&Number.isFinite(w=+w)?w:g,o7="abcdefghijklmnopqrstuvwxyz",lH="0123456789",cV={DIGIT:lH,ALPHA:o7,ALPHA_DIGIT:o7+o7.toUpperCase()+lH},YX=(w=16,g=cV.ALPHA_DIGIT)=>{let S="";const{length:B}=g;for(;w--;)S+=g[Math.random()*B|0];return S};function XX(w){return!!(w&&Bf(w.append)&&w[Symbol.toStringTag]==="FormData"&&w[Symbol.iterator])}const JX=w=>{const g=new Array(10),S=(B,W)=>{if(R5(B)){if(g.indexOf(B)>=0)return;if(!("toJSON"in B)){g[W]=B;const te=Rk(B)?[]:{};return u4(B,(ce,Ee)=>{const $e=S(ce,W+1);!c4($e)&&(te[Ee]=$e)}),g[W]=void 0,te}}return B};return S(w,0)},QX=Qp("AsyncFunction"),eJ=w=>w&&(R5(w)||Bf(w))&&Bf(w.then)&&Bf(w.catch),dV=((w,g)=>w?setImmediate:g?((S,B)=>(f_.addEventListener("message",({source:W,data:te})=>{W===f_&&te===S&&B.length&&B.shift()()},!1),W=>{B.push(W),f_.postMessage(S,"*")}))(`axios@${Math.random()}`,[]):S=>setTimeout(S))(typeof setImmediate=="function",Bf(f_.postMessage)),tJ=typeof queueMicrotask<"u"?queueMicrotask.bind(f_):typeof process<"u"&&process.nextTick||dV,At={isArray:Rk,isArrayBuffer:sV,isBuffer:yX,isFormData:TX,isArrayBufferView:vX,isString:_X,isNumber:rV,isBoolean:xX,isObject:R5,isPlainObject:_5,isReadableStream:OX,isRequest:zX,isResponse:NX,isHeaders:DX,isUndefined:c4,isDate:wX,isFile:kX,isBlob:CX,isRegExp:ZX,isFunction:Bf,isStream:EX,isURLSearchParams:AX,isTypedArray:$X,isFileList:SX,forEach:u4,merge:x7,extend:MX,trim:RX,stripBOM:BX,inherits:LX,toFlatObject:PX,kindOf:N5,kindOfTest:Qp,endsWith:IX,toArray:FX,forEachEntry:HX,matchAll:VX,isHTMLForm:jX,hasOwnProperty:iH,hasOwnProp:iH,reduceDescriptors:lV,freezeMethods:WX,toObjectSet:qX,toCamelCase:UX,noop:KX,toFiniteNumber:GX,findKey:aV,global:f_,isContextDefined:iV,ALPHABET:cV,generateString:YX,isSpecCompliantForm:XX,toJSONObject:JX,isAsyncFn:QX,isThenable:eJ,setImmediate:dV,asap:tJ};function bs(w,g,S,B,W){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=w,this.name="AxiosError",g&&(this.code=g),S&&(this.config=S),B&&(this.request=B),W&&(this.response=W,this.status=W.status?W.status:null)}At.inherits(bs,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:At.toJSONObject(this.config),code:this.code,status:this.status}}});const uV=bs.prototype,fV={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(w=>{fV[w]={value:w}});Object.defineProperties(bs,fV);Object.defineProperty(uV,"isAxiosError",{value:!0});bs.from=(w,g,S,B,W,te)=>{const ce=Object.create(uV);return At.toFlatObject(w,ce,function($e){return $e!==Error.prototype},Ee=>Ee!=="isAxiosError"),bs.call(ce,w.message,g,S,B,W),ce.cause=w,ce.name=w.name,te&&Object.assign(ce,te),ce};const oJ=null;function w7(w){return At.isPlainObject(w)||At.isArray(w)}function mV(w){return At.endsWith(w,"[]")?w.slice(0,-2):w}function cH(w,g,S){return w?w.concat(g).map(function(W,te){return W=mV(W),!S&&te?"["+W+"]":W}).join(S?".":""):g}function nJ(w){return At.isArray(w)&&!w.some(w7)}const sJ=At.toFlatObject(At,{},null,function(g){return/^is[A-Z]/.test(g)});function M5(w,g,S){if(!At.isObject(w))throw new TypeError("target must be an object");g=g||new FormData,S=At.toFlatObject(S,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Bt,Rt){return!At.isUndefined(Rt[Bt])});const B=S.metaTokens,W=S.visitor||Me,te=S.dots,ce=S.indexes,$e=(S.Blob||typeof Blob<"u"&&Blob)&&At.isSpecCompliantForm(g);if(!At.isFunction(W))throw new TypeError("visitor must be a function");function We(ut){if(ut===null)return"";if(At.isDate(ut))return ut.toISOString();if(!$e&&At.isBlob(ut))throw new bs("Blob is not supported. Use a Buffer instead.");return At.isArrayBuffer(ut)||At.isTypedArray(ut)?$e&&typeof Blob=="function"?new Blob([ut]):Buffer.from(ut):ut}function Me(ut,Bt,Rt){let Ke=ut;if(ut&&!Rt&&typeof ut=="object"){if(At.endsWith(Bt,"{}"))Bt=B?Bt:Bt.slice(0,-2),ut=JSON.stringify(ut);else if(At.isArray(ut)&&nJ(ut)||(At.isFileList(ut)||At.endsWith(Bt,"[]"))&&(Ke=At.toArray(ut)))return Bt=mV(Bt),Ke.forEach(function(ft,ue){!(At.isUndefined(ft)||ft===null)&&g.append(ce===!0?cH([Bt],ue,te):ce===null?Bt:Bt+"[]",We(ft))}),!1}return w7(ut)?!0:(g.append(cH(Rt,Bt,te),We(ut)),!1)}const Ot=[],mo=Object.assign(sJ,{defaultVisitor:Me,convertValue:We,isVisitable:w7});function st(ut,Bt){if(!At.isUndefined(ut)){if(Ot.indexOf(ut)!==-1)throw Error("Circular reference detected in "+Bt.join("."));Ot.push(ut),At.forEach(ut,function(Ke,Ut){(!(At.isUndefined(Ke)||Ke===null)&&W.call(g,Ke,At.isString(Ut)?Ut.trim():Ut,Bt,mo))===!0&&st(Ke,Bt?Bt.concat(Ut):[Ut])}),Ot.pop()}}if(!At.isObject(w))throw new TypeError("data must be an object");return st(w),g}function dH(w){const g={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(w).replace(/[!'()~]|%20|%00/g,function(B){return g[B]})}function I7(w,g){this._pairs=[],w&&M5(w,this,g)}const pV=I7.prototype;pV.append=function(g,S){this._pairs.push([g,S])};pV.toString=function(g){const S=g?function(B){return g.call(this,B,dH)}:dH;return this._pairs.map(function(W){return S(W[0])+"="+S(W[1])},"").join("&")};function rJ(w){return encodeURIComponent(w).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gV(w,g,S){if(!g)return w;const B=S&&S.encode||rJ,W=S&&S.serialize;let te;if(W?te=W(g,S):te=At.isURLSearchParams(g)?g.toString():new I7(g,S).toString(B),te){const ce=w.indexOf("#");ce!==-1&&(w=w.slice(0,ce)),w+=(w.indexOf("?")===-1?"?":"&")+te}return w}class uH{constructor(){this.handlers=[]}use(g,S,B){return this.handlers.push({fulfilled:g,rejected:S,synchronous:B?B.synchronous:!1,runWhen:B?B.runWhen:null}),this.handlers.length-1}eject(g){this.handlers[g]&&(this.handlers[g]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(g){At.forEach(this.handlers,function(B){B!==null&&g(B)})}}const hV={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},aJ=typeof URLSearchParams<"u"?URLSearchParams:I7,iJ=typeof FormData<"u"?FormData:null,lJ=typeof Blob<"u"?Blob:null,cJ={isBrowser:!0,classes:{URLSearchParams:aJ,FormData:iJ,Blob:lJ},protocols:["http","https","file","blob","url","data"]},F7=typeof window<"u"&&typeof document<"u",k7=typeof navigator=="object"&&navigator||void 0,dJ=F7&&(!k7||["ReactNative","NativeScript","NS"].indexOf(k7.product)<0),uJ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fJ=F7&&window.location.href||"http://localhost",mJ=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:F7,hasStandardBrowserEnv:dJ,hasStandardBrowserWebWorkerEnv:uJ,navigator:k7,origin:fJ},Symbol.toStringTag,{value:"Module"})),Lf={...mJ,...cJ};function pJ(w,g){return M5(w,new Lf.classes.URLSearchParams,Object.assign({visitor:function(S,B,W,te){return Lf.isNode&&At.isBuffer(S)?(this.append(B,S.toString("base64")),!1):te.defaultVisitor.apply(this,arguments)}},g))}function gJ(w){return At.matchAll(/\w+|\[(\w*)]/g,w).map(g=>g[0]==="[]"?"":g[1]||g[0])}function hJ(w){const g={},S=Object.keys(w);let B;const W=S.length;let te;for(B=0;B=S.length;return ce=!ce&&At.isArray(W)?W.length:ce,$e?(At.hasOwnProp(W,ce)?W[ce]=[W[ce],B]:W[ce]=B,!Ee):((!W[ce]||!At.isObject(W[ce]))&&(W[ce]=[]),g(S,B,W[ce],te)&&At.isArray(W[ce])&&(W[ce]=hJ(W[ce])),!Ee)}if(At.isFormData(w)&&At.isFunction(w.entries)){const S={};return At.forEachEntry(w,(B,W)=>{g(gJ(B),W,S,0)}),S}return null}function bJ(w,g,S){if(At.isString(w))try{return(g||JSON.parse)(w),At.trim(w)}catch(B){if(B.name!=="SyntaxError")throw B}return(S||JSON.stringify)(w)}const f4={transitional:hV,adapter:["xhr","http","fetch"],transformRequest:[function(g,S){const B=S.getContentType()||"",W=B.indexOf("application/json")>-1,te=At.isObject(g);if(te&&At.isHTMLForm(g)&&(g=new FormData(g)),At.isFormData(g))return W?JSON.stringify(bV(g)):g;if(At.isArrayBuffer(g)||At.isBuffer(g)||At.isStream(g)||At.isFile(g)||At.isBlob(g)||At.isReadableStream(g))return g;if(At.isArrayBufferView(g))return g.buffer;if(At.isURLSearchParams(g))return S.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),g.toString();let Ee;if(te){if(B.indexOf("application/x-www-form-urlencoded")>-1)return pJ(g,this.formSerializer).toString();if((Ee=At.isFileList(g))||B.indexOf("multipart/form-data")>-1){const $e=this.env&&this.env.FormData;return M5(Ee?{"files[]":g}:g,$e&&new $e,this.formSerializer)}}return te||W?(S.setContentType("application/json",!1),bJ(g)):g}],transformResponse:[function(g){const S=this.transitional||f4.transitional,B=S&&S.forcedJSONParsing,W=this.responseType==="json";if(At.isResponse(g)||At.isReadableStream(g))return g;if(g&&At.isString(g)&&(B&&!this.responseType||W)){const ce=!(S&&S.silentJSONParsing)&&W;try{return JSON.parse(g)}catch(Ee){if(ce)throw Ee.name==="SyntaxError"?bs.from(Ee,bs.ERR_BAD_RESPONSE,this,null,this.response):Ee}}return g}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lf.classes.FormData,Blob:Lf.classes.Blob},validateStatus:function(g){return g>=200&&g<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};At.forEach(["delete","get","head","post","put","patch"],w=>{f4.headers[w]={}});const yJ=At.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),vJ=w=>{const g={};let S,B,W;return w&&w.split(` -`).forEach(function(ce){W=ce.indexOf(":"),S=ce.substring(0,W).trim().toLowerCase(),B=ce.substring(W+1).trim(),!(!S||g[S]&&yJ[S])&&(S==="set-cookie"?g[S]?g[S].push(B):g[S]=[B]:g[S]=g[S]?g[S]+", "+B:B)}),g},fH=Symbol("internals");function s4(w){return w&&String(w).trim().toLowerCase()}function x5(w){return w===!1||w==null?w:At.isArray(w)?w.map(x5):String(w)}function _J(w){const g=Object.create(null),S=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let B;for(;B=S.exec(w);)g[B[1]]=B[2];return g}const xJ=w=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(w.trim());function n7(w,g,S,B,W){if(At.isFunction(B))return B.call(this,g,S);if(W&&(g=S),!!At.isString(g)){if(At.isString(B))return g.indexOf(B)!==-1;if(At.isRegExp(B))return B.test(g)}}function wJ(w){return w.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(g,S,B)=>S.toUpperCase()+B)}function kJ(w,g){const S=At.toCamelCase(" "+g);["get","set","has"].forEach(B=>{Object.defineProperty(w,B+S,{value:function(W,te,ce){return this[B].call(this,g,W,te,ce)},configurable:!0})})}class Uu{constructor(g){g&&this.set(g)}set(g,S,B){const W=this;function te(Ee,$e,We){const Me=s4($e);if(!Me)throw new Error("header name must be a non-empty string");const Ot=At.findKey(W,Me);(!Ot||W[Ot]===void 0||We===!0||We===void 0&&W[Ot]!==!1)&&(W[Ot||$e]=x5(Ee))}const ce=(Ee,$e)=>At.forEach(Ee,(We,Me)=>te(We,Me,$e));if(At.isPlainObject(g)||g instanceof this.constructor)ce(g,S);else if(At.isString(g)&&(g=g.trim())&&!xJ(g))ce(vJ(g),S);else if(At.isHeaders(g))for(const[Ee,$e]of g.entries())te($e,Ee,B);else g!=null&&te(S,g,B);return this}get(g,S){if(g=s4(g),g){const B=At.findKey(this,g);if(B){const W=this[B];if(!S)return W;if(S===!0)return _J(W);if(At.isFunction(S))return S.call(this,W,B);if(At.isRegExp(S))return S.exec(W);throw new TypeError("parser must be boolean|regexp|function")}}}has(g,S){if(g=s4(g),g){const B=At.findKey(this,g);return!!(B&&this[B]!==void 0&&(!S||n7(this,this[B],B,S)))}return!1}delete(g,S){const B=this;let W=!1;function te(ce){if(ce=s4(ce),ce){const Ee=At.findKey(B,ce);Ee&&(!S||n7(B,B[Ee],Ee,S))&&(delete B[Ee],W=!0)}}return At.isArray(g)?g.forEach(te):te(g),W}clear(g){const S=Object.keys(this);let B=S.length,W=!1;for(;B--;){const te=S[B];(!g||n7(this,this[te],te,g,!0))&&(delete this[te],W=!0)}return W}normalize(g){const S=this,B={};return At.forEach(this,(W,te)=>{const ce=At.findKey(B,te);if(ce){S[ce]=x5(W),delete S[te];return}const Ee=g?wJ(te):String(te).trim();Ee!==te&&delete S[te],S[Ee]=x5(W),B[Ee]=!0}),this}concat(...g){return this.constructor.concat(this,...g)}toJSON(g){const S=Object.create(null);return At.forEach(this,(B,W)=>{B!=null&&B!==!1&&(S[W]=g&&At.isArray(B)?B.join(", "):B)}),S}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([g,S])=>g+": "+S).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(g){return g instanceof this?g:new this(g)}static concat(g,...S){const B=new this(g);return S.forEach(W=>B.set(W)),B}static accessor(g){const B=(this[fH]=this[fH]={accessors:{}}).accessors,W=this.prototype;function te(ce){const Ee=s4(ce);B[Ee]||(kJ(W,ce),B[Ee]=!0)}return At.isArray(g)?g.forEach(te):te(g),this}}Uu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);At.reduceDescriptors(Uu.prototype,({value:w},g)=>{let S=g[0].toUpperCase()+g.slice(1);return{get:()=>w,set(B){this[S]=B}}});At.freezeMethods(Uu);function s7(w,g){const S=this||f4,B=g||S,W=Uu.from(B.headers);let te=B.data;return At.forEach(w,function(Ee){te=Ee.call(S,te,W.normalize(),g?g.status:void 0)}),W.normalize(),te}function yV(w){return!!(w&&w.__CANCEL__)}function Mk(w,g,S){bs.call(this,w??"canceled",bs.ERR_CANCELED,g,S),this.name="CanceledError"}At.inherits(Mk,bs,{__CANCEL__:!0});function vV(w,g,S){const B=S.config.validateStatus;!S.status||!B||B(S.status)?w(S):g(new bs("Request failed with status code "+S.status,[bs.ERR_BAD_REQUEST,bs.ERR_BAD_RESPONSE][Math.floor(S.status/100)-4],S.config,S.request,S))}function CJ(w){const g=/^([-+\w]{1,25})(:?\/\/|:)/.exec(w);return g&&g[1]||""}function SJ(w,g){w=w||10;const S=new Array(w),B=new Array(w);let W=0,te=0,ce;return g=g!==void 0?g:1e3,function($e){const We=Date.now(),Me=B[te];ce||(ce=We),S[W]=$e,B[W]=We;let Ot=te,mo=0;for(;Ot!==W;)mo+=S[Ot++],Ot=Ot%w;if(W=(W+1)%w,W===te&&(te=(te+1)%w),We-ce{S=Me,W=null,te&&(clearTimeout(te),te=null),w.apply(null,We)};return[(...We)=>{const Me=Date.now(),Ot=Me-S;Ot>=B?ce(We,Me):(W=We,te||(te=setTimeout(()=>{te=null,ce(W)},B-Ot)))},()=>W&&ce(W)]}const S5=(w,g,S=3)=>{let B=0;const W=SJ(50,250);return EJ(te=>{const ce=te.loaded,Ee=te.lengthComputable?te.total:void 0,$e=ce-B,We=W($e),Me=ce<=Ee;B=ce;const Ot={loaded:ce,total:Ee,progress:Ee?ce/Ee:void 0,bytes:$e,rate:We||void 0,estimated:We&&Ee&&Me?(Ee-ce)/We:void 0,event:te,lengthComputable:Ee!=null,[g?"download":"upload"]:!0};w(Ot)},S)},mH=(w,g)=>{const S=w!=null;return[B=>g[0]({lengthComputable:S,total:w,loaded:B}),g[1]]},pH=w=>(...g)=>At.asap(()=>w(...g)),TJ=Lf.hasStandardBrowserEnv?function(){const g=Lf.navigator&&/(msie|trident)/i.test(Lf.navigator.userAgent),S=document.createElement("a");let B;function W(te){let ce=te;return g&&(S.setAttribute("href",ce),ce=S.href),S.setAttribute("href",ce),{href:S.href,protocol:S.protocol?S.protocol.replace(/:$/,""):"",host:S.host,search:S.search?S.search.replace(/^\?/,""):"",hash:S.hash?S.hash.replace(/^#/,""):"",hostname:S.hostname,port:S.port,pathname:S.pathname.charAt(0)==="/"?S.pathname:"/"+S.pathname}}return B=W(window.location.href),function(ce){const Ee=At.isString(ce)?W(ce):ce;return Ee.protocol===B.protocol&&Ee.host===B.host}}():function(){return function(){return!0}}(),AJ=Lf.hasStandardBrowserEnv?{write(w,g,S,B,W,te){const ce=[w+"="+encodeURIComponent(g)];At.isNumber(S)&&ce.push("expires="+new Date(S).toGMTString()),At.isString(B)&&ce.push("path="+B),At.isString(W)&&ce.push("domain="+W),te===!0&&ce.push("secure"),document.cookie=ce.join("; ")},read(w){const g=document.cookie.match(new RegExp("(^|;\\s*)("+w+")=([^;]*)"));return g?decodeURIComponent(g[3]):null},remove(w){this.write(w,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function OJ(w){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(w)}function zJ(w,g){return g?w.replace(/\/?\/$/,"")+"/"+g.replace(/^\/+/,""):w}function _V(w,g){return w&&!OJ(g)?zJ(w,g):g}const gH=w=>w instanceof Uu?{...w}:w;function b_(w,g){g=g||{};const S={};function B(We,Me,Ot){return At.isPlainObject(We)&&At.isPlainObject(Me)?At.merge.call({caseless:Ot},We,Me):At.isPlainObject(Me)?At.merge({},Me):At.isArray(Me)?Me.slice():Me}function W(We,Me,Ot){if(At.isUndefined(Me)){if(!At.isUndefined(We))return B(void 0,We,Ot)}else return B(We,Me,Ot)}function te(We,Me){if(!At.isUndefined(Me))return B(void 0,Me)}function ce(We,Me){if(At.isUndefined(Me)){if(!At.isUndefined(We))return B(void 0,We)}else return B(void 0,Me)}function Ee(We,Me,Ot){if(Ot in g)return B(We,Me);if(Ot in w)return B(void 0,We)}const $e={url:te,method:te,data:te,baseURL:ce,transformRequest:ce,transformResponse:ce,paramsSerializer:ce,timeout:ce,timeoutMessage:ce,withCredentials:ce,withXSRFToken:ce,adapter:ce,responseType:ce,xsrfCookieName:ce,xsrfHeaderName:ce,onUploadProgress:ce,onDownloadProgress:ce,decompress:ce,maxContentLength:ce,maxBodyLength:ce,beforeRedirect:ce,transport:ce,httpAgent:ce,httpsAgent:ce,cancelToken:ce,socketPath:ce,responseEncoding:ce,validateStatus:Ee,headers:(We,Me)=>W(gH(We),gH(Me),!0)};return At.forEach(Object.keys(Object.assign({},w,g)),function(Me){const Ot=$e[Me]||W,mo=Ot(w[Me],g[Me],Me);At.isUndefined(mo)&&Ot!==Ee||(S[Me]=mo)}),S}const xV=w=>{const g=b_({},w);let{data:S,withXSRFToken:B,xsrfHeaderName:W,xsrfCookieName:te,headers:ce,auth:Ee}=g;g.headers=ce=Uu.from(ce),g.url=gV(_V(g.baseURL,g.url),w.params,w.paramsSerializer),Ee&&ce.set("Authorization","Basic "+btoa((Ee.username||"")+":"+(Ee.password?unescape(encodeURIComponent(Ee.password)):"")));let $e;if(At.isFormData(S)){if(Lf.hasStandardBrowserEnv||Lf.hasStandardBrowserWebWorkerEnv)ce.setContentType(void 0);else if(($e=ce.getContentType())!==!1){const[We,...Me]=$e?$e.split(";").map(Ot=>Ot.trim()).filter(Boolean):[];ce.setContentType([We||"multipart/form-data",...Me].join("; "))}}if(Lf.hasStandardBrowserEnv&&(B&&At.isFunction(B)&&(B=B(g)),B||B!==!1&&TJ(g.url))){const We=W&&te&&AJ.read(te);We&&ce.set(W,We)}return g},NJ=typeof XMLHttpRequest<"u",DJ=NJ&&function(w){return new Promise(function(S,B){const W=xV(w);let te=W.data;const ce=Uu.from(W.headers).normalize();let{responseType:Ee,onUploadProgress:$e,onDownloadProgress:We}=W,Me,Ot,mo,st,ut;function Bt(){st&&st(),ut&&ut(),W.cancelToken&&W.cancelToken.unsubscribe(Me),W.signal&&W.signal.removeEventListener("abort",Me)}let Rt=new XMLHttpRequest;Rt.open(W.method.toUpperCase(),W.url,!0),Rt.timeout=W.timeout;function Ke(){if(!Rt)return;const ft=Uu.from("getAllResponseHeaders"in Rt&&Rt.getAllResponseHeaders()),Ct={data:!Ee||Ee==="text"||Ee==="json"?Rt.responseText:Rt.response,status:Rt.status,statusText:Rt.statusText,headers:ft,config:w,request:Rt};vV(function(ot){S(ot),Bt()},function(ot){B(ot),Bt()},Ct),Rt=null}"onloadend"in Rt?Rt.onloadend=Ke:Rt.onreadystatechange=function(){!Rt||Rt.readyState!==4||Rt.status===0&&!(Rt.responseURL&&Rt.responseURL.indexOf("file:")===0)||setTimeout(Ke)},Rt.onabort=function(){Rt&&(B(new bs("Request aborted",bs.ECONNABORTED,w,Rt)),Rt=null)},Rt.onerror=function(){B(new bs("Network Error",bs.ERR_NETWORK,w,Rt)),Rt=null},Rt.ontimeout=function(){let ue=W.timeout?"timeout of "+W.timeout+"ms exceeded":"timeout exceeded";const Ct=W.transitional||hV;W.timeoutErrorMessage&&(ue=W.timeoutErrorMessage),B(new bs(ue,Ct.clarifyTimeoutError?bs.ETIMEDOUT:bs.ECONNABORTED,w,Rt)),Rt=null},te===void 0&&ce.setContentType(null),"setRequestHeader"in Rt&&At.forEach(ce.toJSON(),function(ue,Ct){Rt.setRequestHeader(Ct,ue)}),At.isUndefined(W.withCredentials)||(Rt.withCredentials=!!W.withCredentials),Ee&&Ee!=="json"&&(Rt.responseType=W.responseType),We&&([mo,ut]=S5(We,!0),Rt.addEventListener("progress",mo)),$e&&Rt.upload&&([Ot,st]=S5($e),Rt.upload.addEventListener("progress",Ot),Rt.upload.addEventListener("loadend",st)),(W.cancelToken||W.signal)&&(Me=ft=>{Rt&&(B(!ft||ft.type?new Mk(null,w,Rt):ft),Rt.abort(),Rt=null)},W.cancelToken&&W.cancelToken.subscribe(Me),W.signal&&(W.signal.aborted?Me():W.signal.addEventListener("abort",Me)));const Ut=CJ(W.url);if(Ut&&Lf.protocols.indexOf(Ut)===-1){B(new bs("Unsupported protocol "+Ut+":",bs.ERR_BAD_REQUEST,w));return}Rt.send(te||null)})},RJ=(w,g)=>{let S=new AbortController,B;const W=function($e){if(!B){B=!0,ce();const We=$e instanceof Error?$e:this.reason;S.abort(We instanceof bs?We:new Mk(We instanceof Error?We.message:We))}};let te=g&&setTimeout(()=>{W(new bs(`timeout ${g} of ms exceeded`,bs.ETIMEDOUT))},g);const ce=()=>{w&&(te&&clearTimeout(te),te=null,w.forEach($e=>{$e&&($e.removeEventListener?$e.removeEventListener("abort",W):$e.unsubscribe(W))}),w=null)};w.forEach($e=>$e&&$e.addEventListener&&$e.addEventListener("abort",W));const{signal:Ee}=S;return Ee.unsubscribe=ce,[Ee,()=>{te&&clearTimeout(te),te=null}]},MJ=function*(w,g){let S=w.byteLength;if(!g||S{const te=BJ(w,g,W);let ce=0,Ee,$e=We=>{Ee||(Ee=!0,B&&B(We))};return new ReadableStream({async pull(We){try{const{done:Me,value:Ot}=await te.next();if(Me){$e(),We.close();return}let mo=Ot.byteLength;if(S){let st=ce+=mo;S(st)}We.enqueue(new Uint8Array(Ot))}catch(Me){throw $e(Me),Me}},cancel(We){return $e(We),te.return()}},{highWaterMark:2})},B5=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",wV=B5&&typeof ReadableStream=="function",C7=B5&&(typeof TextEncoder=="function"?(w=>g=>w.encode(g))(new TextEncoder):async w=>new Uint8Array(await new Response(w).arrayBuffer())),kV=(w,...g)=>{try{return!!w(...g)}catch{return!1}},LJ=wV&&kV(()=>{let w=!1;const g=new Request(Lf.origin,{body:new ReadableStream,method:"POST",get duplex(){return w=!0,"half"}}).headers.has("Content-Type");return w&&!g}),bH=64*1024,S7=wV&&kV(()=>At.isReadableStream(new Response("").body)),E5={stream:S7&&(w=>w.body)};B5&&(w=>{["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!E5[g]&&(E5[g]=At.isFunction(w[g])?S=>S[g]():(S,B)=>{throw new bs(`Response type '${g}' is not supported`,bs.ERR_NOT_SUPPORT,B)})})})(new Response);const PJ=async w=>{if(w==null)return 0;if(At.isBlob(w))return w.size;if(At.isSpecCompliantForm(w))return(await new Request(w).arrayBuffer()).byteLength;if(At.isArrayBufferView(w)||At.isArrayBuffer(w))return w.byteLength;if(At.isURLSearchParams(w)&&(w=w+""),At.isString(w))return(await C7(w)).byteLength},IJ=async(w,g)=>{const S=At.toFiniteNumber(w.getContentLength());return S??PJ(g)},FJ=B5&&(async w=>{let{url:g,method:S,data:B,signal:W,cancelToken:te,timeout:ce,onDownloadProgress:Ee,onUploadProgress:$e,responseType:We,headers:Me,withCredentials:Ot="same-origin",fetchOptions:mo}=xV(w);We=We?(We+"").toLowerCase():"text";let[st,ut]=W||te||ce?RJ([W,te],ce):[],Bt,Rt;const Ke=()=>{!Bt&&setTimeout(()=>{st&&st.unsubscribe()}),Bt=!0};let Ut;try{if($e&&LJ&&S!=="get"&&S!=="head"&&(Ut=await IJ(Me,B))!==0){let ot=new Request(g,{method:"POST",body:B,duplex:"half"}),bn;if(At.isFormData(B)&&(bn=ot.headers.get("content-type"))&&Me.setContentType(bn),ot.body){const[ln,uo]=mH(Ut,S5(pH($e)));B=hH(ot.body,bH,ln,uo,C7)}}At.isString(Ot)||(Ot=Ot?"include":"omit");const ft="credentials"in Request.prototype;Rt=new Request(g,{...mo,signal:st,method:S.toUpperCase(),headers:Me.normalize().toJSON(),body:B,duplex:"half",credentials:ft?Ot:void 0});let ue=await fetch(Rt);const Ct=S7&&(We==="stream"||We==="response");if(S7&&(Ee||Ct)){const ot={};["status","statusText","headers"].forEach(Fe=>{ot[Fe]=ue[Fe]});const bn=At.toFiniteNumber(ue.headers.get("content-length")),[ln,uo]=Ee&&mH(bn,S5(pH(Ee),!0))||[];ue=new Response(hH(ue.body,bH,ln,()=>{uo&&uo(),Ct&&Ke()},C7),ot)}We=We||"text";let ve=await E5[At.findKey(E5,We)||"text"](ue,w);return!Ct&&Ke(),ut&&ut(),await new Promise((ot,bn)=>{vV(ot,bn,{data:ve,headers:Uu.from(ue.headers),status:ue.status,statusText:ue.statusText,config:w,request:Rt})})}catch(ft){throw Ke(),ft&&ft.name==="TypeError"&&/fetch/i.test(ft.message)?Object.assign(new bs("Network Error",bs.ERR_NETWORK,w,Rt),{cause:ft.cause||ft}):bs.from(ft,ft&&ft.code,w,Rt)}}),E7={http:oJ,xhr:DJ,fetch:FJ};At.forEach(E7,(w,g)=>{if(w){try{Object.defineProperty(w,"name",{value:g})}catch{}Object.defineProperty(w,"adapterName",{value:g})}});const yH=w=>`- ${w}`,$J=w=>At.isFunction(w)||w===null||w===!1,CV={getAdapter:w=>{w=At.isArray(w)?w:[w];const{length:g}=w;let S,B;const W={};for(let te=0;te`adapter ${Ee} `+($e===!1?"is not supported by the environment":"is not available in the build"));let ce=g?te.length>1?`since : -`+te.map(yH).join(` -`):" "+yH(te[0]):"as no adapter specified";throw new bs("There is no suitable adapter to dispatch the request "+ce,"ERR_NOT_SUPPORT")}return B},adapters:E7};function r7(w){if(w.cancelToken&&w.cancelToken.throwIfRequested(),w.signal&&w.signal.aborted)throw new Mk(null,w)}function vH(w){return r7(w),w.headers=Uu.from(w.headers),w.data=s7.call(w,w.transformRequest),["post","put","patch"].indexOf(w.method)!==-1&&w.headers.setContentType("application/x-www-form-urlencoded",!1),CV.getAdapter(w.adapter||f4.adapter)(w).then(function(B){return r7(w),B.data=s7.call(w,w.transformResponse,B),B.headers=Uu.from(B.headers),B},function(B){return yV(B)||(r7(w),B&&B.response&&(B.response.data=s7.call(w,w.transformResponse,B.response),B.response.headers=Uu.from(B.response.headers))),Promise.reject(B)})}const SV="1.7.5",$7={};["object","boolean","number","function","string","symbol"].forEach((w,g)=>{$7[w]=function(B){return typeof B===w||"a"+(g<1?"n ":" ")+w}});const _H={};$7.transitional=function(g,S,B){function W(te,ce){return"[Axios v"+SV+"] Transitional option '"+te+"'"+ce+(B?". "+B:"")}return(te,ce,Ee)=>{if(g===!1)throw new bs(W(ce," has been removed"+(S?" in "+S:"")),bs.ERR_DEPRECATED);return S&&!_H[ce]&&(_H[ce]=!0,console.warn(W(ce," has been deprecated since v"+S+" and will be removed in the near future"))),g?g(te,ce,Ee):!0}};function HJ(w,g,S){if(typeof w!="object")throw new bs("options must be an object",bs.ERR_BAD_OPTION_VALUE);const B=Object.keys(w);let W=B.length;for(;W-- >0;){const te=B[W],ce=g[te];if(ce){const Ee=w[te],$e=Ee===void 0||ce(Ee,te,w);if($e!==!0)throw new bs("option "+te+" must be "+$e,bs.ERR_BAD_OPTION_VALUE);continue}if(S!==!0)throw new bs("Unknown option "+te,bs.ERR_BAD_OPTION)}}const T7={assertOptions:HJ,validators:$7},E1=T7.validators;class g_{constructor(g){this.defaults=g,this.interceptors={request:new uH,response:new uH}}async request(g,S){try{return await this._request(g,S)}catch(B){if(B instanceof Error){let W;Error.captureStackTrace?Error.captureStackTrace(W={}):W=new Error;const te=W.stack?W.stack.replace(/^.+\n/,""):"";try{B.stack?te&&!String(B.stack).endsWith(te.replace(/^.+\n.+\n/,""))&&(B.stack+=` -`+te):B.stack=te}catch{}}throw B}}_request(g,S){typeof g=="string"?(S=S||{},S.url=g):S=g||{},S=b_(this.defaults,S);const{transitional:B,paramsSerializer:W,headers:te}=S;B!==void 0&&T7.assertOptions(B,{silentJSONParsing:E1.transitional(E1.boolean),forcedJSONParsing:E1.transitional(E1.boolean),clarifyTimeoutError:E1.transitional(E1.boolean)},!1),W!=null&&(At.isFunction(W)?S.paramsSerializer={serialize:W}:T7.assertOptions(W,{encode:E1.function,serialize:E1.function},!0)),S.method=(S.method||this.defaults.method||"get").toLowerCase();let ce=te&&At.merge(te.common,te[S.method]);te&&At.forEach(["delete","get","head","post","put","patch","common"],ut=>{delete te[ut]}),S.headers=Uu.concat(ce,te);const Ee=[];let $e=!0;this.interceptors.request.forEach(function(Bt){typeof Bt.runWhen=="function"&&Bt.runWhen(S)===!1||($e=$e&&Bt.synchronous,Ee.unshift(Bt.fulfilled,Bt.rejected))});const We=[];this.interceptors.response.forEach(function(Bt){We.push(Bt.fulfilled,Bt.rejected)});let Me,Ot=0,mo;if(!$e){const ut=[vH.bind(this),void 0];for(ut.unshift.apply(ut,Ee),ut.push.apply(ut,We),mo=ut.length,Me=Promise.resolve(S);Ot{if(!B._listeners)return;let te=B._listeners.length;for(;te-- >0;)B._listeners[te](W);B._listeners=null}),this.promise.then=W=>{let te;const ce=new Promise(Ee=>{B.subscribe(Ee),te=Ee}).then(W);return ce.cancel=function(){B.unsubscribe(te)},ce},g(function(te,ce,Ee){B.reason||(B.reason=new Mk(te,ce,Ee),S(B.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(g){if(this.reason){g(this.reason);return}this._listeners?this._listeners.push(g):this._listeners=[g]}unsubscribe(g){if(!this._listeners)return;const S=this._listeners.indexOf(g);S!==-1&&this._listeners.splice(S,1)}static source(){let g;return{token:new H7(function(W){g=W}),cancel:g}}}function VJ(w){return function(S){return w.apply(null,S)}}function jJ(w){return At.isObject(w)&&w.isAxiosError===!0}const A7={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(A7).forEach(([w,g])=>{A7[g]=w});function EV(w){const g=new g_(w),S=nV(g_.prototype.request,g);return At.extend(S,g_.prototype,g,{allOwnKeys:!0}),At.extend(S,g,null,{allOwnKeys:!0}),S.create=function(W){return EV(b_(w,W))},S}const bl=EV(f4);bl.Axios=g_;bl.CanceledError=Mk;bl.CancelToken=H7;bl.isCancel=yV;bl.VERSION=SV;bl.toFormData=M5;bl.AxiosError=bs;bl.Cancel=bl.CanceledError;bl.all=function(g){return Promise.all(g)};bl.spread=VJ;bl.isAxiosError=jJ;bl.mergeConfig=b_;bl.AxiosHeaders=Uu;bl.formToJSON=w=>bV(At.isHTMLForm(w)?new FormData(w):w);bl.getAdapter=CV.getAdapter;bl.HttpStatusCode=A7;bl.default=bl;window.axios=bl;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var su="top",Pf="bottom",If="right",ru="left",L5="auto",Bk=[su,Pf,If,ru],y_="start",Ek="end",TV="clippingParents",V7="viewport",wk="popper",AV="reference",O7=Bk.reduce(function(w,g){return w.concat([g+"-"+y_,g+"-"+Ek])},[]),j7=[].concat(Bk,[L5]).reduce(function(w,g){return w.concat([g,g+"-"+y_,g+"-"+Ek])},[]),OV="beforeRead",zV="read",NV="afterRead",DV="beforeMain",RV="main",MV="afterMain",BV="beforeWrite",LV="write",PV="afterWrite",IV=[OV,zV,NV,DV,RV,MV,BV,LV,PV];function ih(w){return w?(w.nodeName||"").toLowerCase():null}function Ff(w){if(w==null)return window;if(w.toString()!=="[object Window]"){var g=w.ownerDocument;return g&&g.defaultView||window}return w}function v_(w){var g=Ff(w).Element;return w instanceof g||w instanceof Element}function Gm(w){var g=Ff(w).HTMLElement;return w instanceof g||w instanceof HTMLElement}function U7(w){if(typeof ShadowRoot>"u")return!1;var g=Ff(w).ShadowRoot;return w instanceof g||w instanceof ShadowRoot}function UJ(w){var g=w.state;Object.keys(g.elements).forEach(function(S){var B=g.styles[S]||{},W=g.attributes[S]||{},te=g.elements[S];!Gm(te)||!ih(te)||(Object.assign(te.style,B),Object.keys(W).forEach(function(ce){var Ee=W[ce];Ee===!1?te.removeAttribute(ce):te.setAttribute(ce,Ee===!0?"":Ee)}))})}function ZJ(w){var g=w.state,S={popper:{position:g.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(g.elements.popper.style,S.popper),g.styles=S,g.elements.arrow&&Object.assign(g.elements.arrow.style,S.arrow),function(){Object.keys(g.elements).forEach(function(B){var W=g.elements[B],te=g.attributes[B]||{},ce=Object.keys(g.styles.hasOwnProperty(B)?g.styles[B]:S[B]),Ee=ce.reduce(function($e,We){return $e[We]="",$e},{});!Gm(W)||!ih(W)||(Object.assign(W.style,Ee),Object.keys(te).forEach(function($e){W.removeAttribute($e)}))})}}const Z7={name:"applyStyles",enabled:!0,phase:"write",fn:UJ,effect:ZJ,requires:["computeStyles"]};function rh(w){return w.split("-")[0]}var h_=Math.max,T5=Math.min,Tk=Math.round;function z7(){var w=navigator.userAgentData;return w!=null&&w.brands&&Array.isArray(w.brands)?w.brands.map(function(g){return g.brand+"/"+g.version}).join(" "):navigator.userAgent}function FV(){return!/^((?!chrome|android).)*safari/i.test(z7())}function Ak(w,g,S){g===void 0&&(g=!1),S===void 0&&(S=!1);var B=w.getBoundingClientRect(),W=1,te=1;g&&Gm(w)&&(W=w.offsetWidth>0&&Tk(B.width)/w.offsetWidth||1,te=w.offsetHeight>0&&Tk(B.height)/w.offsetHeight||1);var ce=v_(w)?Ff(w):window,Ee=ce.visualViewport,$e=!FV()&&S,We=(B.left+($e&&Ee?Ee.offsetLeft:0))/W,Me=(B.top+($e&&Ee?Ee.offsetTop:0))/te,Ot=B.width/W,mo=B.height/te;return{width:Ot,height:mo,top:Me,right:We+Ot,bottom:Me+mo,left:We,x:We,y:Me}}function W7(w){var g=Ak(w),S=w.offsetWidth,B=w.offsetHeight;return Math.abs(g.width-S)<=1&&(S=g.width),Math.abs(g.height-B)<=1&&(B=g.height),{x:w.offsetLeft,y:w.offsetTop,width:S,height:B}}function $V(w,g){var S=g.getRootNode&&g.getRootNode();if(w.contains(g))return!0;if(S&&U7(S)){var B=g;do{if(B&&w.isSameNode(B))return!0;B=B.parentNode||B.host}while(B)}return!1}function jb(w){return Ff(w).getComputedStyle(w)}function WJ(w){return["table","td","th"].indexOf(ih(w))>=0}function N1(w){return((v_(w)?w.ownerDocument:w.document)||window.document).documentElement}function P5(w){return ih(w)==="html"?w:w.assignedSlot||w.parentNode||(U7(w)?w.host:null)||N1(w)}function xH(w){return!Gm(w)||jb(w).position==="fixed"?null:w.offsetParent}function qJ(w){var g=/firefox/i.test(z7()),S=/Trident/i.test(z7());if(S&&Gm(w)){var B=jb(w);if(B.position==="fixed")return null}var W=P5(w);for(U7(W)&&(W=W.host);Gm(W)&&["html","body"].indexOf(ih(W))<0;){var te=jb(W);if(te.transform!=="none"||te.perspective!=="none"||te.contain==="paint"||["transform","perspective"].indexOf(te.willChange)!==-1||g&&te.willChange==="filter"||g&&te.filter&&te.filter!=="none")return W;W=W.parentNode}return null}function m4(w){for(var g=Ff(w),S=xH(w);S&&WJ(S)&&jb(S).position==="static";)S=xH(S);return S&&(ih(S)==="html"||ih(S)==="body"&&jb(S).position==="static")?g:S||qJ(w)||g}function q7(w){return["top","bottom"].indexOf(w)>=0?"x":"y"}function i4(w,g,S){return h_(w,T5(g,S))}function KJ(w,g,S){var B=i4(w,g,S);return B>S?S:B}function HV(){return{top:0,right:0,bottom:0,left:0}}function VV(w){return Object.assign({},HV(),w)}function jV(w,g){return g.reduce(function(S,B){return S[B]=w,S},{})}var GJ=function(g,S){return g=typeof g=="function"?g(Object.assign({},S.rects,{placement:S.placement})):g,VV(typeof g!="number"?g:jV(g,Bk))};function YJ(w){var g,S=w.state,B=w.name,W=w.options,te=S.elements.arrow,ce=S.modifiersData.popperOffsets,Ee=rh(S.placement),$e=q7(Ee),We=[ru,If].indexOf(Ee)>=0,Me=We?"height":"width";if(!(!te||!ce)){var Ot=GJ(W.padding,S),mo=W7(te),st=$e==="y"?su:ru,ut=$e==="y"?Pf:If,Bt=S.rects.reference[Me]+S.rects.reference[$e]-ce[$e]-S.rects.popper[Me],Rt=ce[$e]-S.rects.reference[$e],Ke=m4(te),Ut=Ke?$e==="y"?Ke.clientHeight||0:Ke.clientWidth||0:0,ft=Bt/2-Rt/2,ue=Ot[st],Ct=Ut-mo[Me]-Ot[ut],ve=Ut/2-mo[Me]/2+ft,ot=i4(ue,ve,Ct),bn=$e;S.modifiersData[B]=(g={},g[bn]=ot,g.centerOffset=ot-ve,g)}}function XJ(w){var g=w.state,S=w.options,B=S.element,W=B===void 0?"[data-popper-arrow]":B;W!=null&&(typeof W=="string"&&(W=g.elements.popper.querySelector(W),!W)||$V(g.elements.popper,W)&&(g.elements.arrow=W))}const UV={name:"arrow",enabled:!0,phase:"main",fn:YJ,effect:XJ,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ok(w){return w.split("-")[1]}var JJ={top:"auto",right:"auto",bottom:"auto",left:"auto"};function QJ(w,g){var S=w.x,B=w.y,W=g.devicePixelRatio||1;return{x:Tk(S*W)/W||0,y:Tk(B*W)/W||0}}function wH(w){var g,S=w.popper,B=w.popperRect,W=w.placement,te=w.variation,ce=w.offsets,Ee=w.position,$e=w.gpuAcceleration,We=w.adaptive,Me=w.roundOffsets,Ot=w.isFixed,mo=ce.x,st=mo===void 0?0:mo,ut=ce.y,Bt=ut===void 0?0:ut,Rt=typeof Me=="function"?Me({x:st,y:Bt}):{x:st,y:Bt};st=Rt.x,Bt=Rt.y;var Ke=ce.hasOwnProperty("x"),Ut=ce.hasOwnProperty("y"),ft=ru,ue=su,Ct=window;if(We){var ve=m4(S),ot="clientHeight",bn="clientWidth";if(ve===Ff(S)&&(ve=N1(S),jb(ve).position!=="static"&&Ee==="absolute"&&(ot="scrollHeight",bn="scrollWidth")),ve=ve,W===su||(W===ru||W===If)&&te===Ek){ue=Pf;var ln=Ot&&ve===Ct&&Ct.visualViewport?Ct.visualViewport.height:ve[ot];Bt-=ln-B.height,Bt*=$e?1:-1}if(W===ru||(W===su||W===Pf)&&te===Ek){ft=If;var uo=Ot&&ve===Ct&&Ct.visualViewport?Ct.visualViewport.width:ve[bn];st-=uo-B.width,st*=$e?1:-1}}var Fe=Object.assign({position:Ee},We&&JJ),Gt=Me===!0?QJ({x:st,y:Bt},Ff(S)):{x:st,y:Bt};if(st=Gt.x,Bt=Gt.y,$e){var D;return Object.assign({},Fe,(D={},D[ue]=Ut?"0":"",D[ft]=Ke?"0":"",D.transform=(Ct.devicePixelRatio||1)<=1?"translate("+st+"px, "+Bt+"px)":"translate3d("+st+"px, "+Bt+"px, 0)",D))}return Object.assign({},Fe,(g={},g[ue]=Ut?Bt+"px":"",g[ft]=Ke?st+"px":"",g.transform="",g))}function eQ(w){var g=w.state,S=w.options,B=S.gpuAcceleration,W=B===void 0?!0:B,te=S.adaptive,ce=te===void 0?!0:te,Ee=S.roundOffsets,$e=Ee===void 0?!0:Ee,We={placement:rh(g.placement),variation:Ok(g.placement),popper:g.elements.popper,popperRect:g.rects.popper,gpuAcceleration:W,isFixed:g.options.strategy==="fixed"};g.modifiersData.popperOffsets!=null&&(g.styles.popper=Object.assign({},g.styles.popper,wH(Object.assign({},We,{offsets:g.modifiersData.popperOffsets,position:g.options.strategy,adaptive:ce,roundOffsets:$e})))),g.modifiersData.arrow!=null&&(g.styles.arrow=Object.assign({},g.styles.arrow,wH(Object.assign({},We,{offsets:g.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:$e})))),g.attributes.popper=Object.assign({},g.attributes.popper,{"data-popper-placement":g.placement})}const K7={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:eQ,data:{}};var m5={passive:!0};function tQ(w){var g=w.state,S=w.instance,B=w.options,W=B.scroll,te=W===void 0?!0:W,ce=B.resize,Ee=ce===void 0?!0:ce,$e=Ff(g.elements.popper),We=[].concat(g.scrollParents.reference,g.scrollParents.popper);return te&&We.forEach(function(Me){Me.addEventListener("scroll",S.update,m5)}),Ee&&$e.addEventListener("resize",S.update,m5),function(){te&&We.forEach(function(Me){Me.removeEventListener("scroll",S.update,m5)}),Ee&&$e.removeEventListener("resize",S.update,m5)}}const G7={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:tQ,data:{}};var oQ={left:"right",right:"left",bottom:"top",top:"bottom"};function w5(w){return w.replace(/left|right|bottom|top/g,function(g){return oQ[g]})}var nQ={start:"end",end:"start"};function kH(w){return w.replace(/start|end/g,function(g){return nQ[g]})}function Y7(w){var g=Ff(w),S=g.pageXOffset,B=g.pageYOffset;return{scrollLeft:S,scrollTop:B}}function X7(w){return Ak(N1(w)).left+Y7(w).scrollLeft}function sQ(w,g){var S=Ff(w),B=N1(w),W=S.visualViewport,te=B.clientWidth,ce=B.clientHeight,Ee=0,$e=0;if(W){te=W.width,ce=W.height;var We=FV();(We||!We&&g==="fixed")&&(Ee=W.offsetLeft,$e=W.offsetTop)}return{width:te,height:ce,x:Ee+X7(w),y:$e}}function rQ(w){var g,S=N1(w),B=Y7(w),W=(g=w.ownerDocument)==null?void 0:g.body,te=h_(S.scrollWidth,S.clientWidth,W?W.scrollWidth:0,W?W.clientWidth:0),ce=h_(S.scrollHeight,S.clientHeight,W?W.scrollHeight:0,W?W.clientHeight:0),Ee=-B.scrollLeft+X7(w),$e=-B.scrollTop;return jb(W||S).direction==="rtl"&&(Ee+=h_(S.clientWidth,W?W.clientWidth:0)-te),{width:te,height:ce,x:Ee,y:$e}}function J7(w){var g=jb(w),S=g.overflow,B=g.overflowX,W=g.overflowY;return/auto|scroll|overlay|hidden/.test(S+W+B)}function ZV(w){return["html","body","#document"].indexOf(ih(w))>=0?w.ownerDocument.body:Gm(w)&&J7(w)?w:ZV(P5(w))}function l4(w,g){var S;g===void 0&&(g=[]);var B=ZV(w),W=B===((S=w.ownerDocument)==null?void 0:S.body),te=Ff(B),ce=W?[te].concat(te.visualViewport||[],J7(B)?B:[]):B,Ee=g.concat(ce);return W?Ee:Ee.concat(l4(P5(ce)))}function N7(w){return Object.assign({},w,{left:w.x,top:w.y,right:w.x+w.width,bottom:w.y+w.height})}function aQ(w,g){var S=Ak(w,!1,g==="fixed");return S.top=S.top+w.clientTop,S.left=S.left+w.clientLeft,S.bottom=S.top+w.clientHeight,S.right=S.left+w.clientWidth,S.width=w.clientWidth,S.height=w.clientHeight,S.x=S.left,S.y=S.top,S}function CH(w,g,S){return g===V7?N7(sQ(w,S)):v_(g)?aQ(g,S):N7(rQ(N1(w)))}function iQ(w){var g=l4(P5(w)),S=["absolute","fixed"].indexOf(jb(w).position)>=0,B=S&&Gm(w)?m4(w):w;return v_(B)?g.filter(function(W){return v_(W)&&$V(W,B)&&ih(W)!=="body"}):[]}function lQ(w,g,S,B){var W=g==="clippingParents"?iQ(w):[].concat(g),te=[].concat(W,[S]),ce=te[0],Ee=te.reduce(function($e,We){var Me=CH(w,We,B);return $e.top=h_(Me.top,$e.top),$e.right=T5(Me.right,$e.right),$e.bottom=T5(Me.bottom,$e.bottom),$e.left=h_(Me.left,$e.left),$e},CH(w,ce,B));return Ee.width=Ee.right-Ee.left,Ee.height=Ee.bottom-Ee.top,Ee.x=Ee.left,Ee.y=Ee.top,Ee}function WV(w){var g=w.reference,S=w.element,B=w.placement,W=B?rh(B):null,te=B?Ok(B):null,ce=g.x+g.width/2-S.width/2,Ee=g.y+g.height/2-S.height/2,$e;switch(W){case su:$e={x:ce,y:g.y-S.height};break;case Pf:$e={x:ce,y:g.y+g.height};break;case If:$e={x:g.x+g.width,y:Ee};break;case ru:$e={x:g.x-S.width,y:Ee};break;default:$e={x:g.x,y:g.y}}var We=W?q7(W):null;if(We!=null){var Me=We==="y"?"height":"width";switch(te){case y_:$e[We]=$e[We]-(g[Me]/2-S[Me]/2);break;case Ek:$e[We]=$e[We]+(g[Me]/2-S[Me]/2);break}}return $e}function zk(w,g){g===void 0&&(g={});var S=g,B=S.placement,W=B===void 0?w.placement:B,te=S.strategy,ce=te===void 0?w.strategy:te,Ee=S.boundary,$e=Ee===void 0?TV:Ee,We=S.rootBoundary,Me=We===void 0?V7:We,Ot=S.elementContext,mo=Ot===void 0?wk:Ot,st=S.altBoundary,ut=st===void 0?!1:st,Bt=S.padding,Rt=Bt===void 0?0:Bt,Ke=VV(typeof Rt!="number"?Rt:jV(Rt,Bk)),Ut=mo===wk?AV:wk,ft=w.rects.popper,ue=w.elements[ut?Ut:mo],Ct=lQ(v_(ue)?ue:ue.contextElement||N1(w.elements.popper),$e,Me,ce),ve=Ak(w.elements.reference),ot=WV({reference:ve,element:ft,strategy:"absolute",placement:W}),bn=N7(Object.assign({},ft,ot)),ln=mo===wk?bn:ve,uo={top:Ct.top-ln.top+Ke.top,bottom:ln.bottom-Ct.bottom+Ke.bottom,left:Ct.left-ln.left+Ke.left,right:ln.right-Ct.right+Ke.right},Fe=w.modifiersData.offset;if(mo===wk&&Fe){var Gt=Fe[W];Object.keys(uo).forEach(function(D){var bt=[If,Pf].indexOf(D)>=0?1:-1,dt=[su,Pf].indexOf(D)>=0?"y":"x";uo[D]+=Gt[dt]*bt})}return uo}function cQ(w,g){g===void 0&&(g={});var S=g,B=S.placement,W=S.boundary,te=S.rootBoundary,ce=S.padding,Ee=S.flipVariations,$e=S.allowedAutoPlacements,We=$e===void 0?j7:$e,Me=Ok(B),Ot=Me?Ee?O7:O7.filter(function(ut){return Ok(ut)===Me}):Bk,mo=Ot.filter(function(ut){return We.indexOf(ut)>=0});mo.length===0&&(mo=Ot);var st=mo.reduce(function(ut,Bt){return ut[Bt]=zk(w,{placement:Bt,boundary:W,rootBoundary:te,padding:ce})[rh(Bt)],ut},{});return Object.keys(st).sort(function(ut,Bt){return st[ut]-st[Bt]})}function dQ(w){if(rh(w)===L5)return[];var g=w5(w);return[kH(w),g,kH(g)]}function uQ(w){var g=w.state,S=w.options,B=w.name;if(!g.modifiersData[B]._skip){for(var W=S.mainAxis,te=W===void 0?!0:W,ce=S.altAxis,Ee=ce===void 0?!0:ce,$e=S.fallbackPlacements,We=S.padding,Me=S.boundary,Ot=S.rootBoundary,mo=S.altBoundary,st=S.flipVariations,ut=st===void 0?!0:st,Bt=S.allowedAutoPlacements,Rt=g.options.placement,Ke=rh(Rt),Ut=Ke===Rt,ft=$e||(Ut||!ut?[w5(Rt)]:dQ(Rt)),ue=[Rt].concat(ft).reduce(function(ks,cn){return ks.concat(rh(cn)===L5?cQ(g,{placement:cn,boundary:Me,rootBoundary:Ot,padding:We,flipVariations:ut,allowedAutoPlacements:Bt}):cn)},[]),Ct=g.rects.reference,ve=g.rects.popper,ot=new Map,bn=!0,ln=ue[0],uo=0;uo=0,dt=bt?"width":"height",Kt=zk(g,{placement:Fe,boundary:Me,rootBoundary:Ot,altBoundary:mo,padding:We}),qo=bt?D?If:ru:D?Pf:su;Ct[dt]>ve[dt]&&(qo=w5(qo));var Ge=w5(qo),To=[];if(te&&To.push(Kt[Gt]<=0),Ee&&To.push(Kt[qo]<=0,Kt[Ge]<=0),To.every(function(ks){return ks})){ln=Fe,bn=!1;break}ot.set(Fe,To)}if(bn)for(var Cr=ut?3:1,$t=function(cn){var fn=ue.find(function(zo){var j=ot.get(zo);if(j)return j.slice(0,cn).every(function(Fr){return Fr})});if(fn)return ln=fn,"break"},pt=Cr;pt>0;pt--){var Ht=$t(pt);if(Ht==="break")break}g.placement!==ln&&(g.modifiersData[B]._skip=!0,g.placement=ln,g.reset=!0)}}const qV={name:"flip",enabled:!0,phase:"main",fn:uQ,requiresIfExists:["offset"],data:{_skip:!1}};function SH(w,g,S){return S===void 0&&(S={x:0,y:0}),{top:w.top-g.height-S.y,right:w.right-g.width+S.x,bottom:w.bottom-g.height+S.y,left:w.left-g.width-S.x}}function EH(w){return[su,If,Pf,ru].some(function(g){return w[g]>=0})}function fQ(w){var g=w.state,S=w.name,B=g.rects.reference,W=g.rects.popper,te=g.modifiersData.preventOverflow,ce=zk(g,{elementContext:"reference"}),Ee=zk(g,{altBoundary:!0}),$e=SH(ce,B),We=SH(Ee,W,te),Me=EH($e),Ot=EH(We);g.modifiersData[S]={referenceClippingOffsets:$e,popperEscapeOffsets:We,isReferenceHidden:Me,hasPopperEscaped:Ot},g.attributes.popper=Object.assign({},g.attributes.popper,{"data-popper-reference-hidden":Me,"data-popper-escaped":Ot})}const KV={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:fQ};function mQ(w,g,S){var B=rh(w),W=[ru,su].indexOf(B)>=0?-1:1,te=typeof S=="function"?S(Object.assign({},g,{placement:w})):S,ce=te[0],Ee=te[1];return ce=ce||0,Ee=(Ee||0)*W,[ru,If].indexOf(B)>=0?{x:Ee,y:ce}:{x:ce,y:Ee}}function pQ(w){var g=w.state,S=w.options,B=w.name,W=S.offset,te=W===void 0?[0,0]:W,ce=j7.reduce(function(Me,Ot){return Me[Ot]=mQ(Ot,g.rects,te),Me},{}),Ee=ce[g.placement],$e=Ee.x,We=Ee.y;g.modifiersData.popperOffsets!=null&&(g.modifiersData.popperOffsets.x+=$e,g.modifiersData.popperOffsets.y+=We),g.modifiersData[B]=ce}const GV={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:pQ};function gQ(w){var g=w.state,S=w.name;g.modifiersData[S]=WV({reference:g.rects.reference,element:g.rects.popper,strategy:"absolute",placement:g.placement})}const Q7={name:"popperOffsets",enabled:!0,phase:"read",fn:gQ,data:{}};function hQ(w){return w==="x"?"y":"x"}function bQ(w){var g=w.state,S=w.options,B=w.name,W=S.mainAxis,te=W===void 0?!0:W,ce=S.altAxis,Ee=ce===void 0?!1:ce,$e=S.boundary,We=S.rootBoundary,Me=S.altBoundary,Ot=S.padding,mo=S.tether,st=mo===void 0?!0:mo,ut=S.tetherOffset,Bt=ut===void 0?0:ut,Rt=zk(g,{boundary:$e,rootBoundary:We,padding:Ot,altBoundary:Me}),Ke=rh(g.placement),Ut=Ok(g.placement),ft=!Ut,ue=q7(Ke),Ct=hQ(ue),ve=g.modifiersData.popperOffsets,ot=g.rects.reference,bn=g.rects.popper,ln=typeof Bt=="function"?Bt(Object.assign({},g.rects,{placement:g.placement})):Bt,uo=typeof ln=="number"?{mainAxis:ln,altAxis:ln}:Object.assign({mainAxis:0,altAxis:0},ln),Fe=g.modifiersData.offset?g.modifiersData.offset[g.placement]:null,Gt={x:0,y:0};if(ve){if(te){var D,bt=ue==="y"?su:ru,dt=ue==="y"?Pf:If,Kt=ue==="y"?"height":"width",qo=ve[ue],Ge=qo+Rt[bt],To=qo-Rt[dt],Cr=st?-bn[Kt]/2:0,$t=Ut===y_?ot[Kt]:bn[Kt],pt=Ut===y_?-bn[Kt]:-ot[Kt],Ht=g.elements.arrow,ks=st&&Ht?W7(Ht):{width:0,height:0},cn=g.modifiersData["arrow#persistent"]?g.modifiersData["arrow#persistent"].padding:HV(),fn=cn[bt],zo=cn[dt],j=i4(0,ot[Kt],ks[Kt]),Fr=ft?ot[Kt]/2-Cr-j-fn-uo.mainAxis:$t-j-fn-uo.mainAxis,Cs=ft?-ot[Kt]/2+Cr+j+zo+uo.mainAxis:pt+j+zo+uo.mainAxis,Sn=g.elements.arrow&&m4(g.elements.arrow),bi=Sn?ue==="y"?Sn.clientTop||0:Sn.clientLeft||0:0,qi=(D=Fe==null?void 0:Fe[ue])!=null?D:0,mn=qo+Fr-qi-bi,Bn=qo+Cs-qi,dn=i4(st?T5(Ge,mn):Ge,qo,st?h_(To,Bn):To);ve[ue]=dn,Gt[ue]=dn-qo}if(Ee){var Le,Lt=ue==="x"?su:ru,yt=ue==="x"?Pf:If,rt=ve[Ct],ao=Ct==="y"?"height":"width",ko=rt+Rt[Lt],tn=rt-Rt[yt],On=[su,ru].indexOf(Ke)!==-1,rs=(Le=Fe==null?void 0:Fe[Ct])!=null?Le:0,Zn=On?ko:rt-ot[ao]-bn[ao]-rs+uo.altAxis,Ln=On?rt+ot[ao]+bn[ao]-rs-uo.altAxis:tn,Hs=st&&On?KJ(Zn,rt,Ln):i4(st?Zn:ko,rt,st?Ln:tn);ve[Ct]=Hs,Gt[Ct]=Hs-rt}g.modifiersData[B]=Gt}}const YV={name:"preventOverflow",enabled:!0,phase:"main",fn:bQ,requiresIfExists:["offset"]};function yQ(w){return{scrollLeft:w.scrollLeft,scrollTop:w.scrollTop}}function vQ(w){return w===Ff(w)||!Gm(w)?Y7(w):yQ(w)}function _Q(w){var g=w.getBoundingClientRect(),S=Tk(g.width)/w.offsetWidth||1,B=Tk(g.height)/w.offsetHeight||1;return S!==1||B!==1}function xQ(w,g,S){S===void 0&&(S=!1);var B=Gm(g),W=Gm(g)&&_Q(g),te=N1(g),ce=Ak(w,W,S),Ee={scrollLeft:0,scrollTop:0},$e={x:0,y:0};return(B||!B&&!S)&&((ih(g)!=="body"||J7(te))&&(Ee=vQ(g)),Gm(g)?($e=Ak(g,!0),$e.x+=g.clientLeft,$e.y+=g.clientTop):te&&($e.x=X7(te))),{x:ce.left+Ee.scrollLeft-$e.x,y:ce.top+Ee.scrollTop-$e.y,width:ce.width,height:ce.height}}function wQ(w){var g=new Map,S=new Set,B=[];w.forEach(function(te){g.set(te.name,te)});function W(te){S.add(te.name);var ce=[].concat(te.requires||[],te.requiresIfExists||[]);ce.forEach(function(Ee){if(!S.has(Ee)){var $e=g.get(Ee);$e&&W($e)}}),B.push(te)}return w.forEach(function(te){S.has(te.name)||W(te)}),B}function kQ(w){var g=wQ(w);return IV.reduce(function(S,B){return S.concat(g.filter(function(W){return W.phase===B}))},[])}function CQ(w){var g;return function(){return g||(g=new Promise(function(S){Promise.resolve().then(function(){g=void 0,S(w())})})),g}}function SQ(w){var g=w.reduce(function(S,B){var W=S[B.name];return S[B.name]=W?Object.assign({},W,B,{options:Object.assign({},W.options,B.options),data:Object.assign({},W.data,B.data)}):B,S},{});return Object.keys(g).map(function(S){return g[S]})}var TH={placement:"bottom",modifiers:[],strategy:"absolute"};function AH(){for(var w=arguments.length,g=new Array(w),S=0;Sg=>{const S=hX.call(g);return w[S]||(w[S]=S.slice(8,-1).toLowerCase())})(Object.create(null)),Jp=w=>(w=w.toLowerCase(),g=>z5(g)===w),N5=w=>g=>typeof g===w,{isArray:Dk}=Array,lT=N5("undefined");function bX(w){return w!==null&&!lT(w)&&w.constructor!==null&&!lT(w.constructor)&&Mf(w.constructor.isBuffer)&&w.constructor.isBuffer(w)}const n9=Jp("ArrayBuffer");function yX(w){let g;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?g=ArrayBuffer.isView(w):g=w&&w.buffer&&n9(w.buffer),g}const vX=N5("string"),Mf=N5("function"),s9=N5("number"),D5=w=>w!==null&&typeof w=="object",_X=w=>w===!0||w===!1,v5=w=>{if(z5(w)!=="object")return!1;const g=L7(w);return(g===null||g===Object.prototype||Object.getPrototypeOf(g)===null)&&!(Symbol.toStringTag in w)&&!(Symbol.iterator in w)},xX=Jp("Date"),wX=Jp("File"),kX=Jp("Blob"),CX=Jp("FileList"),SX=w=>D5(w)&&Mf(w.pipe),EX=w=>{let g;return w&&(typeof FormData=="function"&&w instanceof FormData||Mf(w.append)&&((g=z5(w))==="formdata"||g==="object"&&Mf(w.toString)&&w.toString()==="[object FormData]"))},AX=Jp("URLSearchParams"),[TX,OX,zX,NX]=["ReadableStream","Request","Response","Headers"].map(Jp),DX=w=>w.trim?w.trim():w.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function dT(w,g,{allOwnKeys:S=!1}={}){if(w===null||typeof w>"u")return;let L,W;if(typeof w!="object"&&(w=[w]),Dk(w))for(L=0,W=w.length;L0;)if(W=S[L],g===W.toLowerCase())return W;return null}const u_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,a9=w=>!lT(w)&&w!==u_;function _7(){const{caseless:w}=a9(this)&&this||{},g={},S=(L,W)=>{const te=w&&r9(g,W)||W;v5(g[te])&&v5(L)?g[te]=_7(g[te],L):v5(L)?g[te]=_7({},L):Dk(L)?g[te]=L.slice():g[te]=L};for(let L=0,W=arguments.length;L(dT(g,(W,te)=>{S&&Mf(W)?w[te]=o9(W,S):w[te]=W},{allOwnKeys:L}),w),MX=w=>(w.charCodeAt(0)===65279&&(w=w.slice(1)),w),LX=(w,g,S,L)=>{w.prototype=Object.create(g.prototype,L),w.prototype.constructor=w,Object.defineProperty(w,"super",{value:g.prototype}),S&&Object.assign(w.prototype,S)},BX=(w,g,S,L)=>{let W,te,ce;const Ee={};if(g=g||{},w==null)return g;do{for(W=Object.getOwnPropertyNames(w),te=W.length;te-- >0;)ce=W[te],(!L||L(ce,w,g))&&!Ee[ce]&&(g[ce]=w[ce],Ee[ce]=!0);w=S!==!1&&L7(w)}while(w&&(!S||S(w,g))&&w!==Object.prototype);return g},PX=(w,g,S)=>{w=String(w),(S===void 0||S>w.length)&&(S=w.length),S-=g.length;const L=w.indexOf(g,S);return L!==-1&&L===S},IX=w=>{if(!w)return null;if(Dk(w))return w;let g=w.length;if(!s9(g))return null;const S=new Array(g);for(;g-- >0;)S[g]=w[g];return S},FX=(w=>g=>w&&g instanceof w)(typeof Uint8Array<"u"&&L7(Uint8Array)),HX=(w,g)=>{const L=(w&&w[Symbol.iterator]).call(w);let W;for(;(W=L.next())&&!W.done;){const te=W.value;g.call(w,te[0],te[1])}},$X=(w,g)=>{let S;const L=[];for(;(S=w.exec(g))!==null;)L.push(S);return L},VX=Jp("HTMLFormElement"),jX=w=>w.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(S,L,W){return L.toUpperCase()+W}),r$=(({hasOwnProperty:w})=>(g,S)=>w.call(g,S))(Object.prototype),UX=Jp("RegExp"),i9=(w,g)=>{const S=Object.getOwnPropertyDescriptors(w),L={};dT(S,(W,te)=>{let ce;(ce=g(W,te,w))!==!1&&(L[te]=ce||W)}),Object.defineProperties(w,L)},ZX=w=>{i9(w,(g,S)=>{if(Mf(w)&&["arguments","caller","callee"].indexOf(S)!==-1)return!1;const L=w[S];if(Mf(L)){if(g.enumerable=!1,"writable"in g){g.writable=!1;return}g.set||(g.set=()=>{throw Error("Can not rewrite read-only method '"+S+"'")})}})},WX=(w,g)=>{const S={},L=W=>{W.forEach(te=>{S[te]=!0})};return Dk(w)?L(w):L(String(w).split(g)),S},qX=()=>{},KX=(w,g)=>w!=null&&Number.isFinite(w=+w)?w:g,t7="abcdefghijklmnopqrstuvwxyz",a$="0123456789",l9={DIGIT:a$,ALPHA:t7,ALPHA_DIGIT:t7+t7.toUpperCase()+a$},GX=(w=16,g=l9.ALPHA_DIGIT)=>{let S="";const{length:L}=g;for(;w--;)S+=g[Math.random()*L|0];return S};function YX(w){return!!(w&&Mf(w.append)&&w[Symbol.toStringTag]==="FormData"&&w[Symbol.iterator])}const XX=w=>{const g=new Array(10),S=(L,W)=>{if(D5(L)){if(g.indexOf(L)>=0)return;if(!("toJSON"in L)){g[W]=L;const te=Dk(L)?[]:{};return dT(L,(ce,Ee)=>{const He=S(ce,W+1);!lT(He)&&(te[Ee]=He)}),g[W]=void 0,te}}return L};return S(w,0)},JX=Jp("AsyncFunction"),QX=w=>w&&(D5(w)||Mf(w))&&Mf(w.then)&&Mf(w.catch),c9=((w,g)=>w?setImmediate:g?((S,L)=>(u_.addEventListener("message",({source:W,data:te})=>{W===u_&&te===S&&L.length&&L.shift()()},!1),W=>{L.push(W),u_.postMessage(S,"*")}))(`axios@${Math.random()}`,[]):S=>setTimeout(S))(typeof setImmediate=="function",Mf(u_.postMessage)),eJ=typeof queueMicrotask<"u"?queueMicrotask.bind(u_):typeof process<"u"&&process.nextTick||c9,Tt={isArray:Dk,isArrayBuffer:n9,isBuffer:bX,isFormData:EX,isArrayBufferView:yX,isString:vX,isNumber:s9,isBoolean:_X,isObject:D5,isPlainObject:v5,isReadableStream:TX,isRequest:OX,isResponse:zX,isHeaders:NX,isUndefined:lT,isDate:xX,isFile:wX,isBlob:kX,isRegExp:UX,isFunction:Mf,isStream:SX,isURLSearchParams:AX,isTypedArray:FX,isFileList:CX,forEach:dT,merge:_7,extend:RX,trim:DX,stripBOM:MX,inherits:LX,toFlatObject:BX,kindOf:z5,kindOfTest:Jp,endsWith:PX,toArray:IX,forEachEntry:HX,matchAll:$X,isHTMLForm:VX,hasOwnProperty:r$,hasOwnProp:r$,reduceDescriptors:i9,freezeMethods:ZX,toObjectSet:WX,toCamelCase:jX,noop:qX,toFiniteNumber:KX,findKey:r9,global:u_,isContextDefined:a9,ALPHABET:l9,generateString:GX,isSpecCompliantForm:YX,toJSONObject:XX,isAsyncFn:JX,isThenable:QX,setImmediate:c9,asap:eJ};function bs(w,g,S,L,W){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=w,this.name="AxiosError",g&&(this.code=g),S&&(this.config=S),L&&(this.request=L),W&&(this.response=W,this.status=W.status?W.status:null)}Tt.inherits(bs,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Tt.toJSONObject(this.config),code:this.code,status:this.status}}});const d9=bs.prototype,u9={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(w=>{u9[w]={value:w}});Object.defineProperties(bs,u9);Object.defineProperty(d9,"isAxiosError",{value:!0});bs.from=(w,g,S,L,W,te)=>{const ce=Object.create(d9);return Tt.toFlatObject(w,ce,function(He){return He!==Error.prototype},Ee=>Ee!=="isAxiosError"),bs.call(ce,w.message,g,S,L,W),ce.cause=w,ce.name=w.name,te&&Object.assign(ce,te),ce};const tJ=null;function x7(w){return Tt.isPlainObject(w)||Tt.isArray(w)}function f9(w){return Tt.endsWith(w,"[]")?w.slice(0,-2):w}function i$(w,g,S){return w?w.concat(g).map(function(W,te){return W=f9(W),!S&&te?"["+W+"]":W}).join(S?".":""):g}function oJ(w){return Tt.isArray(w)&&!w.some(x7)}const nJ=Tt.toFlatObject(Tt,{},null,function(g){return/^is[A-Z]/.test(g)});function R5(w,g,S){if(!Tt.isObject(w))throw new TypeError("target must be an object");g=g||new FormData,S=Tt.toFlatObject(S,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Lt,Rt){return!Tt.isUndefined(Rt[Lt])});const L=S.metaTokens,W=S.visitor||Me,te=S.dots,ce=S.indexes,He=(S.Blob||typeof Blob<"u"&&Blob)&&Tt.isSpecCompliantForm(g);if(!Tt.isFunction(W))throw new TypeError("visitor must be a function");function We(ut){if(ut===null)return"";if(Tt.isDate(ut))return ut.toISOString();if(!He&&Tt.isBlob(ut))throw new bs("Blob is not supported. Use a Buffer instead.");return Tt.isArrayBuffer(ut)||Tt.isTypedArray(ut)?He&&typeof Blob=="function"?new Blob([ut]):Buffer.from(ut):ut}function Me(ut,Lt,Rt){let Ke=ut;if(ut&&!Rt&&typeof ut=="object"){if(Tt.endsWith(Lt,"{}"))Lt=L?Lt:Lt.slice(0,-2),ut=JSON.stringify(ut);else if(Tt.isArray(ut)&&oJ(ut)||(Tt.isFileList(ut)||Tt.endsWith(Lt,"[]"))&&(Ke=Tt.toArray(ut)))return Lt=f9(Lt),Ke.forEach(function(ft,ue){!(Tt.isUndefined(ft)||ft===null)&&g.append(ce===!0?i$([Lt],ue,te):ce===null?Lt:Lt+"[]",We(ft))}),!1}return x7(ut)?!0:(g.append(i$(Rt,Lt,te),We(ut)),!1)}const Ot=[],mo=Object.assign(nJ,{defaultVisitor:Me,convertValue:We,isVisitable:x7});function st(ut,Lt){if(!Tt.isUndefined(ut)){if(Ot.indexOf(ut)!==-1)throw Error("Circular reference detected in "+Lt.join("."));Ot.push(ut),Tt.forEach(ut,function(Ke,Ut){(!(Tt.isUndefined(Ke)||Ke===null)&&W.call(g,Ke,Tt.isString(Ut)?Ut.trim():Ut,Lt,mo))===!0&&st(Ke,Lt?Lt.concat(Ut):[Ut])}),Ot.pop()}}if(!Tt.isObject(w))throw new TypeError("data must be an object");return st(w),g}function l$(w){const g={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(w).replace(/[!'()~]|%20|%00/g,function(L){return g[L]})}function B7(w,g){this._pairs=[],w&&R5(w,this,g)}const m9=B7.prototype;m9.append=function(g,S){this._pairs.push([g,S])};m9.toString=function(g){const S=g?function(L){return g.call(this,L,l$)}:l$;return this._pairs.map(function(W){return S(W[0])+"="+S(W[1])},"").join("&")};function sJ(w){return encodeURIComponent(w).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function p9(w,g,S){if(!g)return w;const L=S&&S.encode||sJ,W=S&&S.serialize;let te;if(W?te=W(g,S):te=Tt.isURLSearchParams(g)?g.toString():new B7(g,S).toString(L),te){const ce=w.indexOf("#");ce!==-1&&(w=w.slice(0,ce)),w+=(w.indexOf("?")===-1?"?":"&")+te}return w}class c${constructor(){this.handlers=[]}use(g,S,L){return this.handlers.push({fulfilled:g,rejected:S,synchronous:L?L.synchronous:!1,runWhen:L?L.runWhen:null}),this.handlers.length-1}eject(g){this.handlers[g]&&(this.handlers[g]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(g){Tt.forEach(this.handlers,function(L){L!==null&&g(L)})}}const g9={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},rJ=typeof URLSearchParams<"u"?URLSearchParams:B7,aJ=typeof FormData<"u"?FormData:null,iJ=typeof Blob<"u"?Blob:null,lJ={isBrowser:!0,classes:{URLSearchParams:rJ,FormData:aJ,Blob:iJ},protocols:["http","https","file","blob","url","data"]},P7=typeof window<"u"&&typeof document<"u",w7=typeof navigator=="object"&&navigator||void 0,cJ=P7&&(!w7||["ReactNative","NativeScript","NS"].indexOf(w7.product)<0),dJ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",uJ=P7&&window.location.href||"http://localhost",fJ=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:P7,hasStandardBrowserEnv:cJ,hasStandardBrowserWebWorkerEnv:dJ,navigator:w7,origin:uJ},Symbol.toStringTag,{value:"Module"})),Lf={...fJ,...lJ};function mJ(w,g){return R5(w,new Lf.classes.URLSearchParams,Object.assign({visitor:function(S,L,W,te){return Lf.isNode&&Tt.isBuffer(S)?(this.append(L,S.toString("base64")),!1):te.defaultVisitor.apply(this,arguments)}},g))}function pJ(w){return Tt.matchAll(/\w+|\[(\w*)]/g,w).map(g=>g[0]==="[]"?"":g[1]||g[0])}function gJ(w){const g={},S=Object.keys(w);let L;const W=S.length;let te;for(L=0;L=S.length;return ce=!ce&&Tt.isArray(W)?W.length:ce,He?(Tt.hasOwnProp(W,ce)?W[ce]=[W[ce],L]:W[ce]=L,!Ee):((!W[ce]||!Tt.isObject(W[ce]))&&(W[ce]=[]),g(S,L,W[ce],te)&&Tt.isArray(W[ce])&&(W[ce]=gJ(W[ce])),!Ee)}if(Tt.isFormData(w)&&Tt.isFunction(w.entries)){const S={};return Tt.forEachEntry(w,(L,W)=>{g(pJ(L),W,S,0)}),S}return null}function hJ(w,g,S){if(Tt.isString(w))try{return(g||JSON.parse)(w),Tt.trim(w)}catch(L){if(L.name!=="SyntaxError")throw L}return(S||JSON.stringify)(w)}const uT={transitional:g9,adapter:["xhr","http","fetch"],transformRequest:[function(g,S){const L=S.getContentType()||"",W=L.indexOf("application/json")>-1,te=Tt.isObject(g);if(te&&Tt.isHTMLForm(g)&&(g=new FormData(g)),Tt.isFormData(g))return W?JSON.stringify(h9(g)):g;if(Tt.isArrayBuffer(g)||Tt.isBuffer(g)||Tt.isStream(g)||Tt.isFile(g)||Tt.isBlob(g)||Tt.isReadableStream(g))return g;if(Tt.isArrayBufferView(g))return g.buffer;if(Tt.isURLSearchParams(g))return S.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),g.toString();let Ee;if(te){if(L.indexOf("application/x-www-form-urlencoded")>-1)return mJ(g,this.formSerializer).toString();if((Ee=Tt.isFileList(g))||L.indexOf("multipart/form-data")>-1){const He=this.env&&this.env.FormData;return R5(Ee?{"files[]":g}:g,He&&new He,this.formSerializer)}}return te||W?(S.setContentType("application/json",!1),hJ(g)):g}],transformResponse:[function(g){const S=this.transitional||uT.transitional,L=S&&S.forcedJSONParsing,W=this.responseType==="json";if(Tt.isResponse(g)||Tt.isReadableStream(g))return g;if(g&&Tt.isString(g)&&(L&&!this.responseType||W)){const ce=!(S&&S.silentJSONParsing)&&W;try{return JSON.parse(g)}catch(Ee){if(ce)throw Ee.name==="SyntaxError"?bs.from(Ee,bs.ERR_BAD_RESPONSE,this,null,this.response):Ee}}return g}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lf.classes.FormData,Blob:Lf.classes.Blob},validateStatus:function(g){return g>=200&&g<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Tt.forEach(["delete","get","head","post","put","patch"],w=>{uT.headers[w]={}});const bJ=Tt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),yJ=w=>{const g={};let S,L,W;return w&&w.split(` +`).forEach(function(ce){W=ce.indexOf(":"),S=ce.substring(0,W).trim().toLowerCase(),L=ce.substring(W+1).trim(),!(!S||g[S]&&bJ[S])&&(S==="set-cookie"?g[S]?g[S].push(L):g[S]=[L]:g[S]=g[S]?g[S]+", "+L:L)}),g},d$=Symbol("internals");function nT(w){return w&&String(w).trim().toLowerCase()}function _5(w){return w===!1||w==null?w:Tt.isArray(w)?w.map(_5):String(w)}function vJ(w){const g=Object.create(null),S=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let L;for(;L=S.exec(w);)g[L[1]]=L[2];return g}const _J=w=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(w.trim());function o7(w,g,S,L,W){if(Tt.isFunction(L))return L.call(this,g,S);if(W&&(g=S),!!Tt.isString(g)){if(Tt.isString(L))return g.indexOf(L)!==-1;if(Tt.isRegExp(L))return L.test(g)}}function xJ(w){return w.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(g,S,L)=>S.toUpperCase()+L)}function wJ(w,g){const S=Tt.toCamelCase(" "+g);["get","set","has"].forEach(L=>{Object.defineProperty(w,L+S,{value:function(W,te,ce){return this[L].call(this,g,W,te,ce)},configurable:!0})})}class ju{constructor(g){g&&this.set(g)}set(g,S,L){const W=this;function te(Ee,He,We){const Me=nT(He);if(!Me)throw new Error("header name must be a non-empty string");const Ot=Tt.findKey(W,Me);(!Ot||W[Ot]===void 0||We===!0||We===void 0&&W[Ot]!==!1)&&(W[Ot||He]=_5(Ee))}const ce=(Ee,He)=>Tt.forEach(Ee,(We,Me)=>te(We,Me,He));if(Tt.isPlainObject(g)||g instanceof this.constructor)ce(g,S);else if(Tt.isString(g)&&(g=g.trim())&&!_J(g))ce(yJ(g),S);else if(Tt.isHeaders(g))for(const[Ee,He]of g.entries())te(He,Ee,L);else g!=null&&te(S,g,L);return this}get(g,S){if(g=nT(g),g){const L=Tt.findKey(this,g);if(L){const W=this[L];if(!S)return W;if(S===!0)return vJ(W);if(Tt.isFunction(S))return S.call(this,W,L);if(Tt.isRegExp(S))return S.exec(W);throw new TypeError("parser must be boolean|regexp|function")}}}has(g,S){if(g=nT(g),g){const L=Tt.findKey(this,g);return!!(L&&this[L]!==void 0&&(!S||o7(this,this[L],L,S)))}return!1}delete(g,S){const L=this;let W=!1;function te(ce){if(ce=nT(ce),ce){const Ee=Tt.findKey(L,ce);Ee&&(!S||o7(L,L[Ee],Ee,S))&&(delete L[Ee],W=!0)}}return Tt.isArray(g)?g.forEach(te):te(g),W}clear(g){const S=Object.keys(this);let L=S.length,W=!1;for(;L--;){const te=S[L];(!g||o7(this,this[te],te,g,!0))&&(delete this[te],W=!0)}return W}normalize(g){const S=this,L={};return Tt.forEach(this,(W,te)=>{const ce=Tt.findKey(L,te);if(ce){S[ce]=_5(W),delete S[te];return}const Ee=g?xJ(te):String(te).trim();Ee!==te&&delete S[te],S[Ee]=_5(W),L[Ee]=!0}),this}concat(...g){return this.constructor.concat(this,...g)}toJSON(g){const S=Object.create(null);return Tt.forEach(this,(L,W)=>{L!=null&&L!==!1&&(S[W]=g&&Tt.isArray(L)?L.join(", "):L)}),S}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([g,S])=>g+": "+S).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(g){return g instanceof this?g:new this(g)}static concat(g,...S){const L=new this(g);return S.forEach(W=>L.set(W)),L}static accessor(g){const L=(this[d$]=this[d$]={accessors:{}}).accessors,W=this.prototype;function te(ce){const Ee=nT(ce);L[Ee]||(wJ(W,ce),L[Ee]=!0)}return Tt.isArray(g)?g.forEach(te):te(g),this}}ju.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Tt.reduceDescriptors(ju.prototype,({value:w},g)=>{let S=g[0].toUpperCase()+g.slice(1);return{get:()=>w,set(L){this[S]=L}}});Tt.freezeMethods(ju);function n7(w,g){const S=this||uT,L=g||S,W=ju.from(L.headers);let te=L.data;return Tt.forEach(w,function(Ee){te=Ee.call(S,te,W.normalize(),g?g.status:void 0)}),W.normalize(),te}function b9(w){return!!(w&&w.__CANCEL__)}function Rk(w,g,S){bs.call(this,w??"canceled",bs.ERR_CANCELED,g,S),this.name="CanceledError"}Tt.inherits(Rk,bs,{__CANCEL__:!0});function y9(w,g,S){const L=S.config.validateStatus;!S.status||!L||L(S.status)?w(S):g(new bs("Request failed with status code "+S.status,[bs.ERR_BAD_REQUEST,bs.ERR_BAD_RESPONSE][Math.floor(S.status/100)-4],S.config,S.request,S))}function kJ(w){const g=/^([-+\w]{1,25})(:?\/\/|:)/.exec(w);return g&&g[1]||""}function CJ(w,g){w=w||10;const S=new Array(w),L=new Array(w);let W=0,te=0,ce;return g=g!==void 0?g:1e3,function(He){const We=Date.now(),Me=L[te];ce||(ce=We),S[W]=He,L[W]=We;let Ot=te,mo=0;for(;Ot!==W;)mo+=S[Ot++],Ot=Ot%w;if(W=(W+1)%w,W===te&&(te=(te+1)%w),We-ce{S=Me,W=null,te&&(clearTimeout(te),te=null),w.apply(null,We)};return[(...We)=>{const Me=Date.now(),Ot=Me-S;Ot>=L?ce(We,Me):(W=We,te||(te=setTimeout(()=>{te=null,ce(W)},L-Ot)))},()=>W&&ce(W)]}const C5=(w,g,S=3)=>{let L=0;const W=CJ(50,250);return SJ(te=>{const ce=te.loaded,Ee=te.lengthComputable?te.total:void 0,He=ce-L,We=W(He),Me=ce<=Ee;L=ce;const Ot={loaded:ce,total:Ee,progress:Ee?ce/Ee:void 0,bytes:He,rate:We||void 0,estimated:We&&Ee&&Me?(Ee-ce)/We:void 0,event:te,lengthComputable:Ee!=null,[g?"download":"upload"]:!0};w(Ot)},S)},u$=(w,g)=>{const S=w!=null;return[L=>g[0]({lengthComputable:S,total:w,loaded:L}),g[1]]},f$=w=>(...g)=>Tt.asap(()=>w(...g)),EJ=Lf.hasStandardBrowserEnv?function(){const g=Lf.navigator&&/(msie|trident)/i.test(Lf.navigator.userAgent),S=document.createElement("a");let L;function W(te){let ce=te;return g&&(S.setAttribute("href",ce),ce=S.href),S.setAttribute("href",ce),{href:S.href,protocol:S.protocol?S.protocol.replace(/:$/,""):"",host:S.host,search:S.search?S.search.replace(/^\?/,""):"",hash:S.hash?S.hash.replace(/^#/,""):"",hostname:S.hostname,port:S.port,pathname:S.pathname.charAt(0)==="/"?S.pathname:"/"+S.pathname}}return L=W(window.location.href),function(ce){const Ee=Tt.isString(ce)?W(ce):ce;return Ee.protocol===L.protocol&&Ee.host===L.host}}():function(){return function(){return!0}}(),AJ=Lf.hasStandardBrowserEnv?{write(w,g,S,L,W,te){const ce=[w+"="+encodeURIComponent(g)];Tt.isNumber(S)&&ce.push("expires="+new Date(S).toGMTString()),Tt.isString(L)&&ce.push("path="+L),Tt.isString(W)&&ce.push("domain="+W),te===!0&&ce.push("secure"),document.cookie=ce.join("; ")},read(w){const g=document.cookie.match(new RegExp("(^|;\\s*)("+w+")=([^;]*)"));return g?decodeURIComponent(g[3]):null},remove(w){this.write(w,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function TJ(w){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(w)}function OJ(w,g){return g?w.replace(/\/?\/$/,"")+"/"+g.replace(/^\/+/,""):w}function v9(w,g){return w&&!TJ(g)?OJ(w,g):g}const m$=w=>w instanceof ju?{...w}:w;function h_(w,g){g=g||{};const S={};function L(We,Me,Ot){return Tt.isPlainObject(We)&&Tt.isPlainObject(Me)?Tt.merge.call({caseless:Ot},We,Me):Tt.isPlainObject(Me)?Tt.merge({},Me):Tt.isArray(Me)?Me.slice():Me}function W(We,Me,Ot){if(Tt.isUndefined(Me)){if(!Tt.isUndefined(We))return L(void 0,We,Ot)}else return L(We,Me,Ot)}function te(We,Me){if(!Tt.isUndefined(Me))return L(void 0,Me)}function ce(We,Me){if(Tt.isUndefined(Me)){if(!Tt.isUndefined(We))return L(void 0,We)}else return L(void 0,Me)}function Ee(We,Me,Ot){if(Ot in g)return L(We,Me);if(Ot in w)return L(void 0,We)}const He={url:te,method:te,data:te,baseURL:ce,transformRequest:ce,transformResponse:ce,paramsSerializer:ce,timeout:ce,timeoutMessage:ce,withCredentials:ce,withXSRFToken:ce,adapter:ce,responseType:ce,xsrfCookieName:ce,xsrfHeaderName:ce,onUploadProgress:ce,onDownloadProgress:ce,decompress:ce,maxContentLength:ce,maxBodyLength:ce,beforeRedirect:ce,transport:ce,httpAgent:ce,httpsAgent:ce,cancelToken:ce,socketPath:ce,responseEncoding:ce,validateStatus:Ee,headers:(We,Me)=>W(m$(We),m$(Me),!0)};return Tt.forEach(Object.keys(Object.assign({},w,g)),function(Me){const Ot=He[Me]||W,mo=Ot(w[Me],g[Me],Me);Tt.isUndefined(mo)&&Ot!==Ee||(S[Me]=mo)}),S}const _9=w=>{const g=h_({},w);let{data:S,withXSRFToken:L,xsrfHeaderName:W,xsrfCookieName:te,headers:ce,auth:Ee}=g;g.headers=ce=ju.from(ce),g.url=p9(v9(g.baseURL,g.url),w.params,w.paramsSerializer),Ee&&ce.set("Authorization","Basic "+btoa((Ee.username||"")+":"+(Ee.password?unescape(encodeURIComponent(Ee.password)):"")));let He;if(Tt.isFormData(S)){if(Lf.hasStandardBrowserEnv||Lf.hasStandardBrowserWebWorkerEnv)ce.setContentType(void 0);else if((He=ce.getContentType())!==!1){const[We,...Me]=He?He.split(";").map(Ot=>Ot.trim()).filter(Boolean):[];ce.setContentType([We||"multipart/form-data",...Me].join("; "))}}if(Lf.hasStandardBrowserEnv&&(L&&Tt.isFunction(L)&&(L=L(g)),L||L!==!1&&EJ(g.url))){const We=W&&te&&AJ.read(te);We&&ce.set(W,We)}return g},zJ=typeof XMLHttpRequest<"u",NJ=zJ&&function(w){return new Promise(function(S,L){const W=_9(w);let te=W.data;const ce=ju.from(W.headers).normalize();let{responseType:Ee,onUploadProgress:He,onDownloadProgress:We}=W,Me,Ot,mo,st,ut;function Lt(){st&&st(),ut&&ut(),W.cancelToken&&W.cancelToken.unsubscribe(Me),W.signal&&W.signal.removeEventListener("abort",Me)}let Rt=new XMLHttpRequest;Rt.open(W.method.toUpperCase(),W.url,!0),Rt.timeout=W.timeout;function Ke(){if(!Rt)return;const ft=ju.from("getAllResponseHeaders"in Rt&&Rt.getAllResponseHeaders()),Ct={data:!Ee||Ee==="text"||Ee==="json"?Rt.responseText:Rt.response,status:Rt.status,statusText:Rt.statusText,headers:ft,config:w,request:Rt};y9(function(ot){S(ot),Lt()},function(ot){L(ot),Lt()},Ct),Rt=null}"onloadend"in Rt?Rt.onloadend=Ke:Rt.onreadystatechange=function(){!Rt||Rt.readyState!==4||Rt.status===0&&!(Rt.responseURL&&Rt.responseURL.indexOf("file:")===0)||setTimeout(Ke)},Rt.onabort=function(){Rt&&(L(new bs("Request aborted",bs.ECONNABORTED,w,Rt)),Rt=null)},Rt.onerror=function(){L(new bs("Network Error",bs.ERR_NETWORK,w,Rt)),Rt=null},Rt.ontimeout=function(){let ue=W.timeout?"timeout of "+W.timeout+"ms exceeded":"timeout exceeded";const Ct=W.transitional||g9;W.timeoutErrorMessage&&(ue=W.timeoutErrorMessage),L(new bs(ue,Ct.clarifyTimeoutError?bs.ETIMEDOUT:bs.ECONNABORTED,w,Rt)),Rt=null},te===void 0&&ce.setContentType(null),"setRequestHeader"in Rt&&Tt.forEach(ce.toJSON(),function(ue,Ct){Rt.setRequestHeader(Ct,ue)}),Tt.isUndefined(W.withCredentials)||(Rt.withCredentials=!!W.withCredentials),Ee&&Ee!=="json"&&(Rt.responseType=W.responseType),We&&([mo,ut]=C5(We,!0),Rt.addEventListener("progress",mo)),He&&Rt.upload&&([Ot,st]=C5(He),Rt.upload.addEventListener("progress",Ot),Rt.upload.addEventListener("loadend",st)),(W.cancelToken||W.signal)&&(Me=ft=>{Rt&&(L(!ft||ft.type?new Rk(null,w,Rt):ft),Rt.abort(),Rt=null)},W.cancelToken&&W.cancelToken.subscribe(Me),W.signal&&(W.signal.aborted?Me():W.signal.addEventListener("abort",Me)));const Ut=kJ(W.url);if(Ut&&Lf.protocols.indexOf(Ut)===-1){L(new bs("Unsupported protocol "+Ut+":",bs.ERR_BAD_REQUEST,w));return}Rt.send(te||null)})},DJ=(w,g)=>{let S=new AbortController,L;const W=function(He){if(!L){L=!0,ce();const We=He instanceof Error?He:this.reason;S.abort(We instanceof bs?We:new Rk(We instanceof Error?We.message:We))}};let te=g&&setTimeout(()=>{W(new bs(`timeout ${g} of ms exceeded`,bs.ETIMEDOUT))},g);const ce=()=>{w&&(te&&clearTimeout(te),te=null,w.forEach(He=>{He&&(He.removeEventListener?He.removeEventListener("abort",W):He.unsubscribe(W))}),w=null)};w.forEach(He=>He&&He.addEventListener&&He.addEventListener("abort",W));const{signal:Ee}=S;return Ee.unsubscribe=ce,[Ee,()=>{te&&clearTimeout(te),te=null}]},RJ=function*(w,g){let S=w.byteLength;if(!g||S{const te=MJ(w,g,W);let ce=0,Ee,He=We=>{Ee||(Ee=!0,L&&L(We))};return new ReadableStream({async pull(We){try{const{done:Me,value:Ot}=await te.next();if(Me){He(),We.close();return}let mo=Ot.byteLength;if(S){let st=ce+=mo;S(st)}We.enqueue(new Uint8Array(Ot))}catch(Me){throw He(Me),Me}},cancel(We){return He(We),te.return()}},{highWaterMark:2})},M5=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",x9=M5&&typeof ReadableStream=="function",k7=M5&&(typeof TextEncoder=="function"?(w=>g=>w.encode(g))(new TextEncoder):async w=>new Uint8Array(await new Response(w).arrayBuffer())),w9=(w,...g)=>{try{return!!w(...g)}catch{return!1}},LJ=x9&&w9(()=>{let w=!1;const g=new Request(Lf.origin,{body:new ReadableStream,method:"POST",get duplex(){return w=!0,"half"}}).headers.has("Content-Type");return w&&!g}),g$=64*1024,C7=x9&&w9(()=>Tt.isReadableStream(new Response("").body)),S5={stream:C7&&(w=>w.body)};M5&&(w=>{["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!S5[g]&&(S5[g]=Tt.isFunction(w[g])?S=>S[g]():(S,L)=>{throw new bs(`Response type '${g}' is not supported`,bs.ERR_NOT_SUPPORT,L)})})})(new Response);const BJ=async w=>{if(w==null)return 0;if(Tt.isBlob(w))return w.size;if(Tt.isSpecCompliantForm(w))return(await new Request(w).arrayBuffer()).byteLength;if(Tt.isArrayBufferView(w)||Tt.isArrayBuffer(w))return w.byteLength;if(Tt.isURLSearchParams(w)&&(w=w+""),Tt.isString(w))return(await k7(w)).byteLength},PJ=async(w,g)=>{const S=Tt.toFiniteNumber(w.getContentLength());return S??BJ(g)},IJ=M5&&(async w=>{let{url:g,method:S,data:L,signal:W,cancelToken:te,timeout:ce,onDownloadProgress:Ee,onUploadProgress:He,responseType:We,headers:Me,withCredentials:Ot="same-origin",fetchOptions:mo}=_9(w);We=We?(We+"").toLowerCase():"text";let[st,ut]=W||te||ce?DJ([W,te],ce):[],Lt,Rt;const Ke=()=>{!Lt&&setTimeout(()=>{st&&st.unsubscribe()}),Lt=!0};let Ut;try{if(He&&LJ&&S!=="get"&&S!=="head"&&(Ut=await PJ(Me,L))!==0){let ot=new Request(g,{method:"POST",body:L,duplex:"half"}),bn;if(Tt.isFormData(L)&&(bn=ot.headers.get("content-type"))&&Me.setContentType(bn),ot.body){const[ln,uo]=u$(Ut,C5(f$(He)));L=p$(ot.body,g$,ln,uo,k7)}}Tt.isString(Ot)||(Ot=Ot?"include":"omit");const ft="credentials"in Request.prototype;Rt=new Request(g,{...mo,signal:st,method:S.toUpperCase(),headers:Me.normalize().toJSON(),body:L,duplex:"half",credentials:ft?Ot:void 0});let ue=await fetch(Rt);const Ct=C7&&(We==="stream"||We==="response");if(C7&&(Ee||Ct)){const ot={};["status","statusText","headers"].forEach(Fe=>{ot[Fe]=ue[Fe]});const bn=Tt.toFiniteNumber(ue.headers.get("content-length")),[ln,uo]=Ee&&u$(bn,C5(f$(Ee),!0))||[];ue=new Response(p$(ue.body,g$,ln,()=>{uo&&uo(),Ct&&Ke()},k7),ot)}We=We||"text";let ve=await S5[Tt.findKey(S5,We)||"text"](ue,w);return!Ct&&Ke(),ut&&ut(),await new Promise((ot,bn)=>{y9(ot,bn,{data:ve,headers:ju.from(ue.headers),status:ue.status,statusText:ue.statusText,config:w,request:Rt})})}catch(ft){throw Ke(),ft&&ft.name==="TypeError"&&/fetch/i.test(ft.message)?Object.assign(new bs("Network Error",bs.ERR_NETWORK,w,Rt),{cause:ft.cause||ft}):bs.from(ft,ft&&ft.code,w,Rt)}}),S7={http:tJ,xhr:NJ,fetch:IJ};Tt.forEach(S7,(w,g)=>{if(w){try{Object.defineProperty(w,"name",{value:g})}catch{}Object.defineProperty(w,"adapterName",{value:g})}});const h$=w=>`- ${w}`,FJ=w=>Tt.isFunction(w)||w===null||w===!1,k9={getAdapter:w=>{w=Tt.isArray(w)?w:[w];const{length:g}=w;let S,L;const W={};for(let te=0;te`adapter ${Ee} `+(He===!1?"is not supported by the environment":"is not available in the build"));let ce=g?te.length>1?`since : +`+te.map(h$).join(` +`):" "+h$(te[0]):"as no adapter specified";throw new bs("There is no suitable adapter to dispatch the request "+ce,"ERR_NOT_SUPPORT")}return L},adapters:S7};function s7(w){if(w.cancelToken&&w.cancelToken.throwIfRequested(),w.signal&&w.signal.aborted)throw new Rk(null,w)}function b$(w){return s7(w),w.headers=ju.from(w.headers),w.data=n7.call(w,w.transformRequest),["post","put","patch"].indexOf(w.method)!==-1&&w.headers.setContentType("application/x-www-form-urlencoded",!1),k9.getAdapter(w.adapter||uT.adapter)(w).then(function(L){return s7(w),L.data=n7.call(w,w.transformResponse,L),L.headers=ju.from(L.headers),L},function(L){return b9(L)||(s7(w),L&&L.response&&(L.response.data=n7.call(w,w.transformResponse,L.response),L.response.headers=ju.from(L.response.headers))),Promise.reject(L)})}const C9="1.7.5",I7={};["object","boolean","number","function","string","symbol"].forEach((w,g)=>{I7[w]=function(L){return typeof L===w||"a"+(g<1?"n ":" ")+w}});const y$={};I7.transitional=function(g,S,L){function W(te,ce){return"[Axios v"+C9+"] Transitional option '"+te+"'"+ce+(L?". "+L:"")}return(te,ce,Ee)=>{if(g===!1)throw new bs(W(ce," has been removed"+(S?" in "+S:"")),bs.ERR_DEPRECATED);return S&&!y$[ce]&&(y$[ce]=!0,console.warn(W(ce," has been deprecated since v"+S+" and will be removed in the near future"))),g?g(te,ce,Ee):!0}};function HJ(w,g,S){if(typeof w!="object")throw new bs("options must be an object",bs.ERR_BAD_OPTION_VALUE);const L=Object.keys(w);let W=L.length;for(;W-- >0;){const te=L[W],ce=g[te];if(ce){const Ee=w[te],He=Ee===void 0||ce(Ee,te,w);if(He!==!0)throw new bs("option "+te+" must be "+He,bs.ERR_BAD_OPTION_VALUE);continue}if(S!==!0)throw new bs("Unknown option "+te,bs.ERR_BAD_OPTION)}}const E7={assertOptions:HJ,validators:I7},S1=E7.validators;class p_{constructor(g){this.defaults=g,this.interceptors={request:new c$,response:new c$}}async request(g,S){try{return await this._request(g,S)}catch(L){if(L instanceof Error){let W;Error.captureStackTrace?Error.captureStackTrace(W={}):W=new Error;const te=W.stack?W.stack.replace(/^.+\n/,""):"";try{L.stack?te&&!String(L.stack).endsWith(te.replace(/^.+\n.+\n/,""))&&(L.stack+=` +`+te):L.stack=te}catch{}}throw L}}_request(g,S){typeof g=="string"?(S=S||{},S.url=g):S=g||{},S=h_(this.defaults,S);const{transitional:L,paramsSerializer:W,headers:te}=S;L!==void 0&&E7.assertOptions(L,{silentJSONParsing:S1.transitional(S1.boolean),forcedJSONParsing:S1.transitional(S1.boolean),clarifyTimeoutError:S1.transitional(S1.boolean)},!1),W!=null&&(Tt.isFunction(W)?S.paramsSerializer={serialize:W}:E7.assertOptions(W,{encode:S1.function,serialize:S1.function},!0)),S.method=(S.method||this.defaults.method||"get").toLowerCase();let ce=te&&Tt.merge(te.common,te[S.method]);te&&Tt.forEach(["delete","get","head","post","put","patch","common"],ut=>{delete te[ut]}),S.headers=ju.concat(ce,te);const Ee=[];let He=!0;this.interceptors.request.forEach(function(Lt){typeof Lt.runWhen=="function"&&Lt.runWhen(S)===!1||(He=He&&Lt.synchronous,Ee.unshift(Lt.fulfilled,Lt.rejected))});const We=[];this.interceptors.response.forEach(function(Lt){We.push(Lt.fulfilled,Lt.rejected)});let Me,Ot=0,mo;if(!He){const ut=[b$.bind(this),void 0];for(ut.unshift.apply(ut,Ee),ut.push.apply(ut,We),mo=ut.length,Me=Promise.resolve(S);Ot{if(!L._listeners)return;let te=L._listeners.length;for(;te-- >0;)L._listeners[te](W);L._listeners=null}),this.promise.then=W=>{let te;const ce=new Promise(Ee=>{L.subscribe(Ee),te=Ee}).then(W);return ce.cancel=function(){L.unsubscribe(te)},ce},g(function(te,ce,Ee){L.reason||(L.reason=new Rk(te,ce,Ee),S(L.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(g){if(this.reason){g(this.reason);return}this._listeners?this._listeners.push(g):this._listeners=[g]}unsubscribe(g){if(!this._listeners)return;const S=this._listeners.indexOf(g);S!==-1&&this._listeners.splice(S,1)}static source(){let g;return{token:new F7(function(W){g=W}),cancel:g}}}function $J(w){return function(S){return w.apply(null,S)}}function VJ(w){return Tt.isObject(w)&&w.isAxiosError===!0}const A7={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(A7).forEach(([w,g])=>{A7[g]=w});function S9(w){const g=new p_(w),S=o9(p_.prototype.request,g);return Tt.extend(S,p_.prototype,g,{allOwnKeys:!0}),Tt.extend(S,g,null,{allOwnKeys:!0}),S.create=function(W){return S9(h_(w,W))},S}const hl=S9(uT);hl.Axios=p_;hl.CanceledError=Rk;hl.CancelToken=F7;hl.isCancel=b9;hl.VERSION=C9;hl.toFormData=R5;hl.AxiosError=bs;hl.Cancel=hl.CanceledError;hl.all=function(g){return Promise.all(g)};hl.spread=$J;hl.isAxiosError=VJ;hl.mergeConfig=h_;hl.AxiosHeaders=ju;hl.formToJSON=w=>h9(Tt.isHTMLForm(w)?new FormData(w):w);hl.getAdapter=k9.getAdapter;hl.HttpStatusCode=A7;hl.default=hl;window.axios=hl;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var nu="top",Bf="bottom",Pf="right",su="left",L5="auto",Mk=[nu,Bf,Pf,su],b_="start",Sk="end",E9="clippingParents",H7="viewport",xk="popper",A9="reference",T7=Mk.reduce(function(w,g){return w.concat([g+"-"+b_,g+"-"+Sk])},[]),$7=[].concat(Mk,[L5]).reduce(function(w,g){return w.concat([g,g+"-"+b_,g+"-"+Sk])},[]),T9="beforeRead",O9="read",z9="afterRead",N9="beforeMain",D9="main",R9="afterMain",M9="beforeWrite",L9="write",B9="afterWrite",P9=[T9,O9,z9,N9,D9,R9,M9,L9,B9];function ah(w){return w?(w.nodeName||"").toLowerCase():null}function If(w){if(w==null)return window;if(w.toString()!=="[object Window]"){var g=w.ownerDocument;return g&&g.defaultView||window}return w}function y_(w){var g=If(w).Element;return w instanceof g||w instanceof Element}function Km(w){var g=If(w).HTMLElement;return w instanceof g||w instanceof HTMLElement}function V7(w){if(typeof ShadowRoot>"u")return!1;var g=If(w).ShadowRoot;return w instanceof g||w instanceof ShadowRoot}function jJ(w){var g=w.state;Object.keys(g.elements).forEach(function(S){var L=g.styles[S]||{},W=g.attributes[S]||{},te=g.elements[S];!Km(te)||!ah(te)||(Object.assign(te.style,L),Object.keys(W).forEach(function(ce){var Ee=W[ce];Ee===!1?te.removeAttribute(ce):te.setAttribute(ce,Ee===!0?"":Ee)}))})}function UJ(w){var g=w.state,S={popper:{position:g.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(g.elements.popper.style,S.popper),g.styles=S,g.elements.arrow&&Object.assign(g.elements.arrow.style,S.arrow),function(){Object.keys(g.elements).forEach(function(L){var W=g.elements[L],te=g.attributes[L]||{},ce=Object.keys(g.styles.hasOwnProperty(L)?g.styles[L]:S[L]),Ee=ce.reduce(function(He,We){return He[We]="",He},{});!Km(W)||!ah(W)||(Object.assign(W.style,Ee),Object.keys(te).forEach(function(He){W.removeAttribute(He)}))})}}const j7={name:"applyStyles",enabled:!0,phase:"write",fn:jJ,effect:UJ,requires:["computeStyles"]};function sh(w){return w.split("-")[0]}var g_=Math.max,E5=Math.min,Ek=Math.round;function O7(){var w=navigator.userAgentData;return w!=null&&w.brands&&Array.isArray(w.brands)?w.brands.map(function(g){return g.brand+"/"+g.version}).join(" "):navigator.userAgent}function I9(){return!/^((?!chrome|android).)*safari/i.test(O7())}function Ak(w,g,S){g===void 0&&(g=!1),S===void 0&&(S=!1);var L=w.getBoundingClientRect(),W=1,te=1;g&&Km(w)&&(W=w.offsetWidth>0&&Ek(L.width)/w.offsetWidth||1,te=w.offsetHeight>0&&Ek(L.height)/w.offsetHeight||1);var ce=y_(w)?If(w):window,Ee=ce.visualViewport,He=!I9()&&S,We=(L.left+(He&&Ee?Ee.offsetLeft:0))/W,Me=(L.top+(He&&Ee?Ee.offsetTop:0))/te,Ot=L.width/W,mo=L.height/te;return{width:Ot,height:mo,top:Me,right:We+Ot,bottom:Me+mo,left:We,x:We,y:Me}}function U7(w){var g=Ak(w),S=w.offsetWidth,L=w.offsetHeight;return Math.abs(g.width-S)<=1&&(S=g.width),Math.abs(g.height-L)<=1&&(L=g.height),{x:w.offsetLeft,y:w.offsetTop,width:S,height:L}}function F9(w,g){var S=g.getRootNode&&g.getRootNode();if(w.contains(g))return!0;if(S&&V7(S)){var L=g;do{if(L&&w.isSameNode(L))return!0;L=L.parentNode||L.host}while(L)}return!1}function Vb(w){return If(w).getComputedStyle(w)}function ZJ(w){return["table","td","th"].indexOf(ah(w))>=0}function z1(w){return((y_(w)?w.ownerDocument:w.document)||window.document).documentElement}function B5(w){return ah(w)==="html"?w:w.assignedSlot||w.parentNode||(V7(w)?w.host:null)||z1(w)}function v$(w){return!Km(w)||Vb(w).position==="fixed"?null:w.offsetParent}function WJ(w){var g=/firefox/i.test(O7()),S=/Trident/i.test(O7());if(S&&Km(w)){var L=Vb(w);if(L.position==="fixed")return null}var W=B5(w);for(V7(W)&&(W=W.host);Km(W)&&["html","body"].indexOf(ah(W))<0;){var te=Vb(W);if(te.transform!=="none"||te.perspective!=="none"||te.contain==="paint"||["transform","perspective"].indexOf(te.willChange)!==-1||g&&te.willChange==="filter"||g&&te.filter&&te.filter!=="none")return W;W=W.parentNode}return null}function fT(w){for(var g=If(w),S=v$(w);S&&ZJ(S)&&Vb(S).position==="static";)S=v$(S);return S&&(ah(S)==="html"||ah(S)==="body"&&Vb(S).position==="static")?g:S||WJ(w)||g}function Z7(w){return["top","bottom"].indexOf(w)>=0?"x":"y"}function aT(w,g,S){return g_(w,E5(g,S))}function qJ(w,g,S){var L=aT(w,g,S);return L>S?S:L}function H9(){return{top:0,right:0,bottom:0,left:0}}function $9(w){return Object.assign({},H9(),w)}function V9(w,g){return g.reduce(function(S,L){return S[L]=w,S},{})}var KJ=function(g,S){return g=typeof g=="function"?g(Object.assign({},S.rects,{placement:S.placement})):g,$9(typeof g!="number"?g:V9(g,Mk))};function GJ(w){var g,S=w.state,L=w.name,W=w.options,te=S.elements.arrow,ce=S.modifiersData.popperOffsets,Ee=sh(S.placement),He=Z7(Ee),We=[su,Pf].indexOf(Ee)>=0,Me=We?"height":"width";if(!(!te||!ce)){var Ot=KJ(W.padding,S),mo=U7(te),st=He==="y"?nu:su,ut=He==="y"?Bf:Pf,Lt=S.rects.reference[Me]+S.rects.reference[He]-ce[He]-S.rects.popper[Me],Rt=ce[He]-S.rects.reference[He],Ke=fT(te),Ut=Ke?He==="y"?Ke.clientHeight||0:Ke.clientWidth||0:0,ft=Lt/2-Rt/2,ue=Ot[st],Ct=Ut-mo[Me]-Ot[ut],ve=Ut/2-mo[Me]/2+ft,ot=aT(ue,ve,Ct),bn=He;S.modifiersData[L]=(g={},g[bn]=ot,g.centerOffset=ot-ve,g)}}function YJ(w){var g=w.state,S=w.options,L=S.element,W=L===void 0?"[data-popper-arrow]":L;W!=null&&(typeof W=="string"&&(W=g.elements.popper.querySelector(W),!W)||F9(g.elements.popper,W)&&(g.elements.arrow=W))}const j9={name:"arrow",enabled:!0,phase:"main",fn:GJ,effect:YJ,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Tk(w){return w.split("-")[1]}var XJ={top:"auto",right:"auto",bottom:"auto",left:"auto"};function JJ(w,g){var S=w.x,L=w.y,W=g.devicePixelRatio||1;return{x:Ek(S*W)/W||0,y:Ek(L*W)/W||0}}function _$(w){var g,S=w.popper,L=w.popperRect,W=w.placement,te=w.variation,ce=w.offsets,Ee=w.position,He=w.gpuAcceleration,We=w.adaptive,Me=w.roundOffsets,Ot=w.isFixed,mo=ce.x,st=mo===void 0?0:mo,ut=ce.y,Lt=ut===void 0?0:ut,Rt=typeof Me=="function"?Me({x:st,y:Lt}):{x:st,y:Lt};st=Rt.x,Lt=Rt.y;var Ke=ce.hasOwnProperty("x"),Ut=ce.hasOwnProperty("y"),ft=su,ue=nu,Ct=window;if(We){var ve=fT(S),ot="clientHeight",bn="clientWidth";if(ve===If(S)&&(ve=z1(S),Vb(ve).position!=="static"&&Ee==="absolute"&&(ot="scrollHeight",bn="scrollWidth")),ve=ve,W===nu||(W===su||W===Pf)&&te===Sk){ue=Bf;var ln=Ot&&ve===Ct&&Ct.visualViewport?Ct.visualViewport.height:ve[ot];Lt-=ln-L.height,Lt*=He?1:-1}if(W===su||(W===nu||W===Bf)&&te===Sk){ft=Pf;var uo=Ot&&ve===Ct&&Ct.visualViewport?Ct.visualViewport.width:ve[bn];st-=uo-L.width,st*=He?1:-1}}var Fe=Object.assign({position:Ee},We&&XJ),Gt=Me===!0?JJ({x:st,y:Lt},If(S)):{x:st,y:Lt};if(st=Gt.x,Lt=Gt.y,He){var D;return Object.assign({},Fe,(D={},D[ue]=Ut?"0":"",D[ft]=Ke?"0":"",D.transform=(Ct.devicePixelRatio||1)<=1?"translate("+st+"px, "+Lt+"px)":"translate3d("+st+"px, "+Lt+"px, 0)",D))}return Object.assign({},Fe,(g={},g[ue]=Ut?Lt+"px":"",g[ft]=Ke?st+"px":"",g.transform="",g))}function QJ(w){var g=w.state,S=w.options,L=S.gpuAcceleration,W=L===void 0?!0:L,te=S.adaptive,ce=te===void 0?!0:te,Ee=S.roundOffsets,He=Ee===void 0?!0:Ee,We={placement:sh(g.placement),variation:Tk(g.placement),popper:g.elements.popper,popperRect:g.rects.popper,gpuAcceleration:W,isFixed:g.options.strategy==="fixed"};g.modifiersData.popperOffsets!=null&&(g.styles.popper=Object.assign({},g.styles.popper,_$(Object.assign({},We,{offsets:g.modifiersData.popperOffsets,position:g.options.strategy,adaptive:ce,roundOffsets:He})))),g.modifiersData.arrow!=null&&(g.styles.arrow=Object.assign({},g.styles.arrow,_$(Object.assign({},We,{offsets:g.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:He})))),g.attributes.popper=Object.assign({},g.attributes.popper,{"data-popper-placement":g.placement})}const W7={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:QJ,data:{}};var f5={passive:!0};function eQ(w){var g=w.state,S=w.instance,L=w.options,W=L.scroll,te=W===void 0?!0:W,ce=L.resize,Ee=ce===void 0?!0:ce,He=If(g.elements.popper),We=[].concat(g.scrollParents.reference,g.scrollParents.popper);return te&&We.forEach(function(Me){Me.addEventListener("scroll",S.update,f5)}),Ee&&He.addEventListener("resize",S.update,f5),function(){te&&We.forEach(function(Me){Me.removeEventListener("scroll",S.update,f5)}),Ee&&He.removeEventListener("resize",S.update,f5)}}const q7={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:eQ,data:{}};var tQ={left:"right",right:"left",bottom:"top",top:"bottom"};function x5(w){return w.replace(/left|right|bottom|top/g,function(g){return tQ[g]})}var oQ={start:"end",end:"start"};function x$(w){return w.replace(/start|end/g,function(g){return oQ[g]})}function K7(w){var g=If(w),S=g.pageXOffset,L=g.pageYOffset;return{scrollLeft:S,scrollTop:L}}function G7(w){return Ak(z1(w)).left+K7(w).scrollLeft}function nQ(w,g){var S=If(w),L=z1(w),W=S.visualViewport,te=L.clientWidth,ce=L.clientHeight,Ee=0,He=0;if(W){te=W.width,ce=W.height;var We=I9();(We||!We&&g==="fixed")&&(Ee=W.offsetLeft,He=W.offsetTop)}return{width:te,height:ce,x:Ee+G7(w),y:He}}function sQ(w){var g,S=z1(w),L=K7(w),W=(g=w.ownerDocument)==null?void 0:g.body,te=g_(S.scrollWidth,S.clientWidth,W?W.scrollWidth:0,W?W.clientWidth:0),ce=g_(S.scrollHeight,S.clientHeight,W?W.scrollHeight:0,W?W.clientHeight:0),Ee=-L.scrollLeft+G7(w),He=-L.scrollTop;return Vb(W||S).direction==="rtl"&&(Ee+=g_(S.clientWidth,W?W.clientWidth:0)-te),{width:te,height:ce,x:Ee,y:He}}function Y7(w){var g=Vb(w),S=g.overflow,L=g.overflowX,W=g.overflowY;return/auto|scroll|overlay|hidden/.test(S+W+L)}function U9(w){return["html","body","#document"].indexOf(ah(w))>=0?w.ownerDocument.body:Km(w)&&Y7(w)?w:U9(B5(w))}function iT(w,g){var S;g===void 0&&(g=[]);var L=U9(w),W=L===((S=w.ownerDocument)==null?void 0:S.body),te=If(L),ce=W?[te].concat(te.visualViewport||[],Y7(L)?L:[]):L,Ee=g.concat(ce);return W?Ee:Ee.concat(iT(B5(ce)))}function z7(w){return Object.assign({},w,{left:w.x,top:w.y,right:w.x+w.width,bottom:w.y+w.height})}function rQ(w,g){var S=Ak(w,!1,g==="fixed");return S.top=S.top+w.clientTop,S.left=S.left+w.clientLeft,S.bottom=S.top+w.clientHeight,S.right=S.left+w.clientWidth,S.width=w.clientWidth,S.height=w.clientHeight,S.x=S.left,S.y=S.top,S}function w$(w,g,S){return g===H7?z7(nQ(w,S)):y_(g)?rQ(g,S):z7(sQ(z1(w)))}function aQ(w){var g=iT(B5(w)),S=["absolute","fixed"].indexOf(Vb(w).position)>=0,L=S&&Km(w)?fT(w):w;return y_(L)?g.filter(function(W){return y_(W)&&F9(W,L)&&ah(W)!=="body"}):[]}function iQ(w,g,S,L){var W=g==="clippingParents"?aQ(w):[].concat(g),te=[].concat(W,[S]),ce=te[0],Ee=te.reduce(function(He,We){var Me=w$(w,We,L);return He.top=g_(Me.top,He.top),He.right=E5(Me.right,He.right),He.bottom=E5(Me.bottom,He.bottom),He.left=g_(Me.left,He.left),He},w$(w,ce,L));return Ee.width=Ee.right-Ee.left,Ee.height=Ee.bottom-Ee.top,Ee.x=Ee.left,Ee.y=Ee.top,Ee}function Z9(w){var g=w.reference,S=w.element,L=w.placement,W=L?sh(L):null,te=L?Tk(L):null,ce=g.x+g.width/2-S.width/2,Ee=g.y+g.height/2-S.height/2,He;switch(W){case nu:He={x:ce,y:g.y-S.height};break;case Bf:He={x:ce,y:g.y+g.height};break;case Pf:He={x:g.x+g.width,y:Ee};break;case su:He={x:g.x-S.width,y:Ee};break;default:He={x:g.x,y:g.y}}var We=W?Z7(W):null;if(We!=null){var Me=We==="y"?"height":"width";switch(te){case b_:He[We]=He[We]-(g[Me]/2-S[Me]/2);break;case Sk:He[We]=He[We]+(g[Me]/2-S[Me]/2);break}}return He}function Ok(w,g){g===void 0&&(g={});var S=g,L=S.placement,W=L===void 0?w.placement:L,te=S.strategy,ce=te===void 0?w.strategy:te,Ee=S.boundary,He=Ee===void 0?E9:Ee,We=S.rootBoundary,Me=We===void 0?H7:We,Ot=S.elementContext,mo=Ot===void 0?xk:Ot,st=S.altBoundary,ut=st===void 0?!1:st,Lt=S.padding,Rt=Lt===void 0?0:Lt,Ke=$9(typeof Rt!="number"?Rt:V9(Rt,Mk)),Ut=mo===xk?A9:xk,ft=w.rects.popper,ue=w.elements[ut?Ut:mo],Ct=iQ(y_(ue)?ue:ue.contextElement||z1(w.elements.popper),He,Me,ce),ve=Ak(w.elements.reference),ot=Z9({reference:ve,element:ft,strategy:"absolute",placement:W}),bn=z7(Object.assign({},ft,ot)),ln=mo===xk?bn:ve,uo={top:Ct.top-ln.top+Ke.top,bottom:ln.bottom-Ct.bottom+Ke.bottom,left:Ct.left-ln.left+Ke.left,right:ln.right-Ct.right+Ke.right},Fe=w.modifiersData.offset;if(mo===xk&&Fe){var Gt=Fe[W];Object.keys(uo).forEach(function(D){var bt=[Pf,Bf].indexOf(D)>=0?1:-1,dt=[nu,Bf].indexOf(D)>=0?"y":"x";uo[D]+=Gt[dt]*bt})}return uo}function lQ(w,g){g===void 0&&(g={});var S=g,L=S.placement,W=S.boundary,te=S.rootBoundary,ce=S.padding,Ee=S.flipVariations,He=S.allowedAutoPlacements,We=He===void 0?$7:He,Me=Tk(L),Ot=Me?Ee?T7:T7.filter(function(ut){return Tk(ut)===Me}):Mk,mo=Ot.filter(function(ut){return We.indexOf(ut)>=0});mo.length===0&&(mo=Ot);var st=mo.reduce(function(ut,Lt){return ut[Lt]=Ok(w,{placement:Lt,boundary:W,rootBoundary:te,padding:ce})[sh(Lt)],ut},{});return Object.keys(st).sort(function(ut,Lt){return st[ut]-st[Lt]})}function cQ(w){if(sh(w)===L5)return[];var g=x5(w);return[x$(w),g,x$(g)]}function dQ(w){var g=w.state,S=w.options,L=w.name;if(!g.modifiersData[L]._skip){for(var W=S.mainAxis,te=W===void 0?!0:W,ce=S.altAxis,Ee=ce===void 0?!0:ce,He=S.fallbackPlacements,We=S.padding,Me=S.boundary,Ot=S.rootBoundary,mo=S.altBoundary,st=S.flipVariations,ut=st===void 0?!0:st,Lt=S.allowedAutoPlacements,Rt=g.options.placement,Ke=sh(Rt),Ut=Ke===Rt,ft=He||(Ut||!ut?[x5(Rt)]:cQ(Rt)),ue=[Rt].concat(ft).reduce(function(ks,cn){return ks.concat(sh(cn)===L5?lQ(g,{placement:cn,boundary:Me,rootBoundary:Ot,padding:We,flipVariations:ut,allowedAutoPlacements:Lt}):cn)},[]),Ct=g.rects.reference,ve=g.rects.popper,ot=new Map,bn=!0,ln=ue[0],uo=0;uo=0,dt=bt?"width":"height",Kt=Ok(g,{placement:Fe,boundary:Me,rootBoundary:Ot,altBoundary:mo,padding:We}),qo=bt?D?Pf:su:D?Bf:nu;Ct[dt]>ve[dt]&&(qo=x5(qo));var Ge=x5(qo),Ao=[];if(te&&Ao.push(Kt[Gt]<=0),Ee&&Ao.push(Kt[qo]<=0,Kt[Ge]<=0),Ao.every(function(ks){return ks})){ln=Fe,bn=!1;break}ot.set(Fe,Ao)}if(bn)for(var Cr=ut?3:1,Ht=function(cn){var fn=ue.find(function(zo){var j=ot.get(zo);if(j)return j.slice(0,cn).every(function(Fr){return Fr})});if(fn)return ln=fn,"break"},pt=Cr;pt>0;pt--){var $t=Ht(pt);if($t==="break")break}g.placement!==ln&&(g.modifiersData[L]._skip=!0,g.placement=ln,g.reset=!0)}}const W9={name:"flip",enabled:!0,phase:"main",fn:dQ,requiresIfExists:["offset"],data:{_skip:!1}};function k$(w,g,S){return S===void 0&&(S={x:0,y:0}),{top:w.top-g.height-S.y,right:w.right-g.width+S.x,bottom:w.bottom-g.height+S.y,left:w.left-g.width-S.x}}function C$(w){return[nu,Pf,Bf,su].some(function(g){return w[g]>=0})}function uQ(w){var g=w.state,S=w.name,L=g.rects.reference,W=g.rects.popper,te=g.modifiersData.preventOverflow,ce=Ok(g,{elementContext:"reference"}),Ee=Ok(g,{altBoundary:!0}),He=k$(ce,L),We=k$(Ee,W,te),Me=C$(He),Ot=C$(We);g.modifiersData[S]={referenceClippingOffsets:He,popperEscapeOffsets:We,isReferenceHidden:Me,hasPopperEscaped:Ot},g.attributes.popper=Object.assign({},g.attributes.popper,{"data-popper-reference-hidden":Me,"data-popper-escaped":Ot})}const q9={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:uQ};function fQ(w,g,S){var L=sh(w),W=[su,nu].indexOf(L)>=0?-1:1,te=typeof S=="function"?S(Object.assign({},g,{placement:w})):S,ce=te[0],Ee=te[1];return ce=ce||0,Ee=(Ee||0)*W,[su,Pf].indexOf(L)>=0?{x:Ee,y:ce}:{x:ce,y:Ee}}function mQ(w){var g=w.state,S=w.options,L=w.name,W=S.offset,te=W===void 0?[0,0]:W,ce=$7.reduce(function(Me,Ot){return Me[Ot]=fQ(Ot,g.rects,te),Me},{}),Ee=ce[g.placement],He=Ee.x,We=Ee.y;g.modifiersData.popperOffsets!=null&&(g.modifiersData.popperOffsets.x+=He,g.modifiersData.popperOffsets.y+=We),g.modifiersData[L]=ce}const K9={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:mQ};function pQ(w){var g=w.state,S=w.name;g.modifiersData[S]=Z9({reference:g.rects.reference,element:g.rects.popper,strategy:"absolute",placement:g.placement})}const X7={name:"popperOffsets",enabled:!0,phase:"read",fn:pQ,data:{}};function gQ(w){return w==="x"?"y":"x"}function hQ(w){var g=w.state,S=w.options,L=w.name,W=S.mainAxis,te=W===void 0?!0:W,ce=S.altAxis,Ee=ce===void 0?!1:ce,He=S.boundary,We=S.rootBoundary,Me=S.altBoundary,Ot=S.padding,mo=S.tether,st=mo===void 0?!0:mo,ut=S.tetherOffset,Lt=ut===void 0?0:ut,Rt=Ok(g,{boundary:He,rootBoundary:We,padding:Ot,altBoundary:Me}),Ke=sh(g.placement),Ut=Tk(g.placement),ft=!Ut,ue=Z7(Ke),Ct=gQ(ue),ve=g.modifiersData.popperOffsets,ot=g.rects.reference,bn=g.rects.popper,ln=typeof Lt=="function"?Lt(Object.assign({},g.rects,{placement:g.placement})):Lt,uo=typeof ln=="number"?{mainAxis:ln,altAxis:ln}:Object.assign({mainAxis:0,altAxis:0},ln),Fe=g.modifiersData.offset?g.modifiersData.offset[g.placement]:null,Gt={x:0,y:0};if(ve){if(te){var D,bt=ue==="y"?nu:su,dt=ue==="y"?Bf:Pf,Kt=ue==="y"?"height":"width",qo=ve[ue],Ge=qo+Rt[bt],Ao=qo-Rt[dt],Cr=st?-bn[Kt]/2:0,Ht=Ut===b_?ot[Kt]:bn[Kt],pt=Ut===b_?-bn[Kt]:-ot[Kt],$t=g.elements.arrow,ks=st&&$t?U7($t):{width:0,height:0},cn=g.modifiersData["arrow#persistent"]?g.modifiersData["arrow#persistent"].padding:H9(),fn=cn[bt],zo=cn[dt],j=aT(0,ot[Kt],ks[Kt]),Fr=ft?ot[Kt]/2-Cr-j-fn-uo.mainAxis:Ht-j-fn-uo.mainAxis,Cs=ft?-ot[Kt]/2+Cr+j+zo+uo.mainAxis:pt+j+zo+uo.mainAxis,Sn=g.elements.arrow&&fT(g.elements.arrow),hi=Sn?ue==="y"?Sn.clientTop||0:Sn.clientLeft||0:0,Wi=(D=Fe==null?void 0:Fe[ue])!=null?D:0,mn=qo+Fr-Wi-hi,Ln=qo+Cs-Wi,dn=aT(st?E5(Ge,mn):Ge,qo,st?g_(Ao,Ln):Ao);ve[ue]=dn,Gt[ue]=dn-qo}if(Ee){var Be,Bt=ue==="x"?nu:su,yt=ue==="x"?Bf:Pf,rt=ve[Ct],ao=Ct==="y"?"height":"width",ko=rt+Rt[Bt],tn=rt-Rt[yt],On=[nu,su].indexOf(Ke)!==-1,rs=(Be=Fe==null?void 0:Fe[Ct])!=null?Be:0,Zn=On?ko:rt-ot[ao]-bn[ao]-rs+uo.altAxis,Bn=On?rt+ot[ao]+bn[ao]-rs-uo.altAxis:tn,$s=st&&On?qJ(Zn,rt,Bn):aT(st?Zn:ko,rt,st?Bn:tn);ve[Ct]=$s,Gt[Ct]=$s-rt}g.modifiersData[L]=Gt}}const G9={name:"preventOverflow",enabled:!0,phase:"main",fn:hQ,requiresIfExists:["offset"]};function bQ(w){return{scrollLeft:w.scrollLeft,scrollTop:w.scrollTop}}function yQ(w){return w===If(w)||!Km(w)?K7(w):bQ(w)}function vQ(w){var g=w.getBoundingClientRect(),S=Ek(g.width)/w.offsetWidth||1,L=Ek(g.height)/w.offsetHeight||1;return S!==1||L!==1}function _Q(w,g,S){S===void 0&&(S=!1);var L=Km(g),W=Km(g)&&vQ(g),te=z1(g),ce=Ak(w,W,S),Ee={scrollLeft:0,scrollTop:0},He={x:0,y:0};return(L||!L&&!S)&&((ah(g)!=="body"||Y7(te))&&(Ee=yQ(g)),Km(g)?(He=Ak(g,!0),He.x+=g.clientLeft,He.y+=g.clientTop):te&&(He.x=G7(te))),{x:ce.left+Ee.scrollLeft-He.x,y:ce.top+Ee.scrollTop-He.y,width:ce.width,height:ce.height}}function xQ(w){var g=new Map,S=new Set,L=[];w.forEach(function(te){g.set(te.name,te)});function W(te){S.add(te.name);var ce=[].concat(te.requires||[],te.requiresIfExists||[]);ce.forEach(function(Ee){if(!S.has(Ee)){var He=g.get(Ee);He&&W(He)}}),L.push(te)}return w.forEach(function(te){S.has(te.name)||W(te)}),L}function wQ(w){var g=xQ(w);return P9.reduce(function(S,L){return S.concat(g.filter(function(W){return W.phase===L}))},[])}function kQ(w){var g;return function(){return g||(g=new Promise(function(S){Promise.resolve().then(function(){g=void 0,S(w())})})),g}}function CQ(w){var g=w.reduce(function(S,L){var W=S[L.name];return S[L.name]=W?Object.assign({},W,L,{options:Object.assign({},W.options,L.options),data:Object.assign({},W.data,L.data)}):L,S},{});return Object.keys(g).map(function(S){return g[S]})}var S$={placement:"bottom",modifiers:[],strategy:"absolute"};function E$(){for(var w=arguments.length,g=new Array(w),S=0;S(w&&window.CSS&&window.CSS.escape&&(w=w.replace(/#([^\s"#']+)/g,(g,S)=>`#${CSS.escape(S)}`)),w),DQ=w=>w==null?`${w}`:Object.prototype.toString.call(w).match(/\s([a-z]+)/i)[1].toLowerCase(),RQ=w=>{do w+=Math.floor(Math.random()*zQ);while(document.getElementById(w));return w},MQ=w=>{if(!w)return 0;let{transitionDuration:g,transitionDelay:S}=window.getComputedStyle(w);const B=Number.parseFloat(g),W=Number.parseFloat(S);return!B&&!W?0:(g=g.split(",")[0],S=S.split(",")[0],(Number.parseFloat(g)+Number.parseFloat(S))*NQ)},QV=w=>{w.dispatchEvent(new Event(D7))},Hb=w=>!w||typeof w!="object"?!1:(typeof w.jquery<"u"&&(w=w[0]),typeof w.nodeType<"u"),A1=w=>Hb(w)?w.jquery?w[0]:w:typeof w=="string"&&w.length>0?document.querySelector(JV(w)):null,Lk=w=>{if(!Hb(w)||w.getClientRects().length===0)return!1;const g=getComputedStyle(w).getPropertyValue("visibility")==="visible",S=w.closest("details:not([open])");if(!S)return g;if(S!==w){const B=w.closest("summary");if(B&&B.parentNode!==S||B===null)return!1}return g},O1=w=>!w||w.nodeType!==Node.ELEMENT_NODE||w.classList.contains("disabled")?!0:typeof w.disabled<"u"?w.disabled:w.hasAttribute("disabled")&&w.getAttribute("disabled")!=="false",e9=w=>{if(!document.documentElement.attachShadow)return null;if(typeof w.getRootNode=="function"){const g=w.getRootNode();return g instanceof ShadowRoot?g:null}return w instanceof ShadowRoot?w:w.parentNode?e9(w.parentNode):null},A5=()=>{},p4=w=>{w.offsetHeight},t9=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,i7=[],BQ=w=>{document.readyState==="loading"?(i7.length||document.addEventListener("DOMContentLoaded",()=>{for(const g of i7)g()}),i7.push(w)):w()},Ym=()=>document.documentElement.dir==="rtl",Jm=w=>{BQ(()=>{const g=t9();if(g){const S=w.NAME,B=g.fn[S];g.fn[S]=w.jQueryInterface,g.fn[S].Constructor=w,g.fn[S].noConflict=()=>(g.fn[S]=B,w.jQueryInterface)}})},ju=(w,g=[],S=w)=>typeof w=="function"?w(...g):S,o9=(w,g,S=!0)=>{if(!S){ju(w);return}const W=MQ(g)+5;let te=!1;const ce=({target:Ee})=>{Ee===g&&(te=!0,g.removeEventListener(D7,ce),ju(w))};g.addEventListener(D7,ce),setTimeout(()=>{te||QV(g)},W)},t8=(w,g,S,B)=>{const W=w.length;let te=w.indexOf(g);return te===-1?!S&&B?w[W-1]:w[0]:(te+=S?1:-1,B&&(te=(te+W)%W),w[Math.max(0,Math.min(te,W-1))])},LQ=/[^.]*(?=\..*)\.|.*/,PQ=/\..*/,IQ=/::\d+$/,l7={};let OH=1;const n9={mouseenter:"mouseover",mouseleave:"mouseout"},FQ=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function s9(w,g){return g&&`${g}::${OH++}`||w.uidEvent||OH++}function r9(w){const g=s9(w);return w.uidEvent=g,l7[g]=l7[g]||{},l7[g]}function $Q(w,g){return function S(B){return o8(B,{delegateTarget:w}),S.oneOff&&eo.off(w,B.type,g),g.apply(w,[B])}}function HQ(w,g,S){return function B(W){const te=w.querySelectorAll(g);for(let{target:ce}=W;ce&&ce!==this;ce=ce.parentNode)for(const Ee of te)if(Ee===ce)return o8(W,{delegateTarget:ce}),B.oneOff&&eo.off(w,W.type,g,S),S.apply(ce,[W])}}function a9(w,g,S=null){return Object.values(w).find(B=>B.callable===g&&B.delegationSelector===S)}function i9(w,g,S){const B=typeof g=="string",W=B?S:g||S;let te=l9(w);return FQ.has(te)||(te=w),[B,W,te]}function zH(w,g,S,B,W){if(typeof g!="string"||!w)return;let[te,ce,Ee]=i9(g,S,B);g in n9&&(ce=(ut=>function(Bt){if(!Bt.relatedTarget||Bt.relatedTarget!==Bt.delegateTarget&&!Bt.delegateTarget.contains(Bt.relatedTarget))return ut.call(this,Bt)})(ce));const $e=r9(w),We=$e[Ee]||($e[Ee]={}),Me=a9(We,ce,te?S:null);if(Me){Me.oneOff=Me.oneOff&&W;return}const Ot=s9(ce,g.replace(LQ,"")),mo=te?HQ(w,S,ce):$Q(w,ce);mo.delegationSelector=te?S:null,mo.callable=ce,mo.oneOff=W,mo.uidEvent=Ot,We[Ot]=mo,w.addEventListener(Ee,mo,te)}function R7(w,g,S,B,W){const te=a9(g[S],B,W);te&&(w.removeEventListener(S,te,!!W),delete g[S][te.uidEvent])}function VQ(w,g,S,B){const W=g[S]||{};for(const[te,ce]of Object.entries(W))te.includes(B)&&R7(w,g,S,ce.callable,ce.delegationSelector)}function l9(w){return w=w.replace(PQ,""),n9[w]||w}const eo={on(w,g,S,B){zH(w,g,S,B,!1)},one(w,g,S,B){zH(w,g,S,B,!0)},off(w,g,S,B){if(typeof g!="string"||!w)return;const[W,te,ce]=i9(g,S,B),Ee=ce!==g,$e=r9(w),We=$e[ce]||{},Me=g.startsWith(".");if(typeof te<"u"){if(!Object.keys(We).length)return;R7(w,$e,ce,te,W?S:null);return}if(Me)for(const Ot of Object.keys($e))VQ(w,$e,Ot,g.slice(1));for(const[Ot,mo]of Object.entries(We)){const st=Ot.replace(IQ,"");(!Ee||g.includes(st))&&R7(w,$e,ce,mo.callable,mo.delegationSelector)}},trigger(w,g,S){if(typeof g!="string"||!w)return null;const B=t9(),W=l9(g),te=g!==W;let ce=null,Ee=!0,$e=!0,We=!1;te&&B&&(ce=B.Event(g,S),B(w).trigger(ce),Ee=!ce.isPropagationStopped(),$e=!ce.isImmediatePropagationStopped(),We=ce.isDefaultPrevented());const Me=o8(new Event(g,{bubbles:Ee,cancelable:!0}),S);return We&&Me.preventDefault(),$e&&w.dispatchEvent(Me),Me.defaultPrevented&&ce&&ce.preventDefault(),Me}};function o8(w,g={}){for(const[S,B]of Object.entries(g))try{w[S]=B}catch{Object.defineProperty(w,S,{configurable:!0,get(){return B}})}return w}function NH(w){if(w==="true")return!0;if(w==="false")return!1;if(w===Number(w).toString())return Number(w);if(w===""||w==="null")return null;if(typeof w!="string")return w;try{return JSON.parse(decodeURIComponent(w))}catch{return w}}function c7(w){return w.replace(/[A-Z]/g,g=>`-${g.toLowerCase()}`)}const Vb={setDataAttribute(w,g,S){w.setAttribute(`data-bs-${c7(g)}`,S)},removeDataAttribute(w,g){w.removeAttribute(`data-bs-${c7(g)}`)},getDataAttributes(w){if(!w)return{};const g={},S=Object.keys(w.dataset).filter(B=>B.startsWith("bs")&&!B.startsWith("bsConfig"));for(const B of S){let W=B.replace(/^bs/,"");W=W.charAt(0).toLowerCase()+W.slice(1,W.length),g[W]=NH(w.dataset[B])}return g},getDataAttribute(w,g){return NH(w.getAttribute(`data-bs-${c7(g)}`))}};class g4{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(g){return g=this._mergeConfigObj(g),g=this._configAfterMerge(g),this._typeCheckConfig(g),g}_configAfterMerge(g){return g}_mergeConfigObj(g,S){const B=Hb(S)?Vb.getDataAttribute(S,"config"):{};return{...this.constructor.Default,...typeof B=="object"?B:{},...Hb(S)?Vb.getDataAttributes(S):{},...typeof g=="object"?g:{}}}_typeCheckConfig(g,S=this.constructor.DefaultType){for(const[B,W]of Object.entries(S)){const te=g[B],ce=Hb(te)?"element":DQ(te);if(!new RegExp(W).test(ce))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${B}" provided type "${ce}" but expected type "${W}".`)}}}const jQ="5.3.3";class eg extends g4{constructor(g,S){super(),g=A1(g),g&&(this._element=g,this._config=this._getConfig(S),a7.set(this._element,this.constructor.DATA_KEY,this))}dispose(){a7.remove(this._element,this.constructor.DATA_KEY),eo.off(this._element,this.constructor.EVENT_KEY);for(const g of Object.getOwnPropertyNames(this))this[g]=null}_queueCallback(g,S,B=!0){o9(g,S,B)}_getConfig(g){return g=this._mergeConfigObj(g,this._element),g=this._configAfterMerge(g),this._typeCheckConfig(g),g}static getInstance(g){return a7.get(A1(g),this.DATA_KEY)}static getOrCreateInstance(g,S={}){return this.getInstance(g)||new this(g,typeof S=="object"?S:null)}static get VERSION(){return jQ}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(g){return`${g}${this.EVENT_KEY}`}}const d7=w=>{let g=w.getAttribute("data-bs-target");if(!g||g==="#"){let S=w.getAttribute("href");if(!S||!S.includes("#")&&!S.startsWith("."))return null;S.includes("#")&&!S.startsWith("#")&&(S=`#${S.split("#")[1]}`),g=S&&S!=="#"?S.trim():null}return g?g.split(",").map(S=>JV(S)).join(","):null},$n={find(w,g=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(g,w))},findOne(w,g=document.documentElement){return Element.prototype.querySelector.call(g,w)},children(w,g){return[].concat(...w.children).filter(S=>S.matches(g))},parents(w,g){const S=[];let B=w.parentNode.closest(g);for(;B;)S.push(B),B=B.parentNode.closest(g);return S},prev(w,g){let S=w.previousElementSibling;for(;S;){if(S.matches(g))return[S];S=S.previousElementSibling}return[]},next(w,g){let S=w.nextElementSibling;for(;S;){if(S.matches(g))return[S];S=S.nextElementSibling}return[]},focusableChildren(w){const g=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(S=>`${S}:not([tabindex^="-"])`).join(",");return this.find(g,w).filter(S=>!O1(S)&&Lk(S))},getSelectorFromElement(w){const g=d7(w);return g&&$n.findOne(g)?g:null},getElementFromSelector(w){const g=d7(w);return g?$n.findOne(g):null},getMultipleElementsFromSelector(w){const g=d7(w);return g?$n.find(g):[]}},F5=(w,g="hide")=>{const S=`click.dismiss${w.EVENT_KEY}`,B=w.NAME;eo.on(document,S,`[data-bs-dismiss="${B}"]`,function(W){if(["A","AREA"].includes(this.tagName)&&W.preventDefault(),O1(this))return;const te=$n.getElementFromSelector(this)||this.closest(`.${B}`);w.getOrCreateInstance(te)[g]()})},UQ="alert",ZQ="bs.alert",c9=`.${ZQ}`,WQ=`close${c9}`,qQ=`closed${c9}`,KQ="fade",GQ="show";class $5 extends eg{static get NAME(){return UQ}close(){if(eo.trigger(this._element,WQ).defaultPrevented)return;this._element.classList.remove(GQ);const S=this._element.classList.contains(KQ);this._queueCallback(()=>this._destroyElement(),this._element,S)}_destroyElement(){this._element.remove(),eo.trigger(this._element,qQ),this.dispose()}static jQueryInterface(g){return this.each(function(){const S=$5.getOrCreateInstance(this);if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g](this)}})}}F5($5,"close");Jm($5);const YQ="button",XQ="bs.button",JQ=`.${XQ}`,QQ=".data-api",eee="active",DH='[data-bs-toggle="button"]',tee=`click${JQ}${QQ}`;class H5 extends eg{static get NAME(){return YQ}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(eee))}static jQueryInterface(g){return this.each(function(){const S=H5.getOrCreateInstance(this);g==="toggle"&&S[g]()})}}eo.on(document,tee,DH,w=>{w.preventDefault();const g=w.target.closest(DH);H5.getOrCreateInstance(g).toggle()});Jm(H5);const oee="swipe",Pk=".bs.swipe",nee=`touchstart${Pk}`,see=`touchmove${Pk}`,ree=`touchend${Pk}`,aee=`pointerdown${Pk}`,iee=`pointerup${Pk}`,lee="touch",cee="pen",dee="pointer-event",uee=40,fee={endCallback:null,leftCallback:null,rightCallback:null},mee={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class O5 extends g4{constructor(g,S){super(),this._element=g,!(!g||!O5.isSupported())&&(this._config=this._getConfig(S),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return fee}static get DefaultType(){return mee}static get NAME(){return oee}dispose(){eo.off(this._element,Pk)}_start(g){if(!this._supportPointerEvents){this._deltaX=g.touches[0].clientX;return}this._eventIsPointerPenTouch(g)&&(this._deltaX=g.clientX)}_end(g){this._eventIsPointerPenTouch(g)&&(this._deltaX=g.clientX-this._deltaX),this._handleSwipe(),ju(this._config.endCallback)}_move(g){this._deltaX=g.touches&&g.touches.length>1?0:g.touches[0].clientX-this._deltaX}_handleSwipe(){const g=Math.abs(this._deltaX);if(g<=uee)return;const S=g/this._deltaX;this._deltaX=0,S&&ju(S>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(eo.on(this._element,aee,g=>this._start(g)),eo.on(this._element,iee,g=>this._end(g)),this._element.classList.add(dee)):(eo.on(this._element,nee,g=>this._start(g)),eo.on(this._element,see,g=>this._move(g)),eo.on(this._element,ree,g=>this._end(g)))}_eventIsPointerPenTouch(g){return this._supportPointerEvents&&(g.pointerType===cee||g.pointerType===lee)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const pee="carousel",gee="bs.carousel",D1=`.${gee}`,d9=".data-api",hee="ArrowLeft",bee="ArrowRight",yee=500,r4="next",_k="prev",kk="left",k5="right",vee=`slide${D1}`,u7=`slid${D1}`,_ee=`keydown${D1}`,xee=`mouseenter${D1}`,wee=`mouseleave${D1}`,kee=`dragstart${D1}`,Cee=`load${D1}${d9}`,See=`click${D1}${d9}`,u9="carousel",p5="active",Eee="slide",Tee="carousel-item-end",Aee="carousel-item-start",Oee="carousel-item-next",zee="carousel-item-prev",f9=".active",m9=".carousel-item",Nee=f9+m9,Dee=".carousel-item img",Ree=".carousel-indicators",Mee="[data-bs-slide], [data-bs-slide-to]",Bee='[data-bs-ride="carousel"]',Lee={[hee]:k5,[bee]:kk},Pee={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Iee={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class h4 extends eg{constructor(g,S){super(g,S),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=$n.findOne(Ree,this._element),this._addEventListeners(),this._config.ride===u9&&this.cycle()}static get Default(){return Pee}static get DefaultType(){return Iee}static get NAME(){return pee}next(){this._slide(r4)}nextWhenVisible(){!document.hidden&&Lk(this._element)&&this.next()}prev(){this._slide(_k)}pause(){this._isSliding&&QV(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){eo.one(this._element,u7,()=>this.cycle());return}this.cycle()}}to(g){const S=this._getItems();if(g>S.length-1||g<0)return;if(this._isSliding){eo.one(this._element,u7,()=>this.to(g));return}const B=this._getItemIndex(this._getActive());if(B===g)return;const W=g>B?r4:_k;this._slide(W,S[g])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(g){return g.defaultInterval=g.interval,g}_addEventListeners(){this._config.keyboard&&eo.on(this._element,_ee,g=>this._keydown(g)),this._config.pause==="hover"&&(eo.on(this._element,xee,()=>this.pause()),eo.on(this._element,wee,()=>this._maybeEnableCycle())),this._config.touch&&O5.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const B of $n.find(Dee,this._element))eo.on(B,kee,W=>W.preventDefault());const S={leftCallback:()=>this._slide(this._directionToOrder(kk)),rightCallback:()=>this._slide(this._directionToOrder(k5)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),yee+this._config.interval))}};this._swipeHelper=new O5(this._element,S)}_keydown(g){if(/input|textarea/i.test(g.target.tagName))return;const S=Lee[g.key];S&&(g.preventDefault(),this._slide(this._directionToOrder(S)))}_getItemIndex(g){return this._getItems().indexOf(g)}_setActiveIndicatorElement(g){if(!this._indicatorsElement)return;const S=$n.findOne(f9,this._indicatorsElement);S.classList.remove(p5),S.removeAttribute("aria-current");const B=$n.findOne(`[data-bs-slide-to="${g}"]`,this._indicatorsElement);B&&(B.classList.add(p5),B.setAttribute("aria-current","true"))}_updateInterval(){const g=this._activeElement||this._getActive();if(!g)return;const S=Number.parseInt(g.getAttribute("data-bs-interval"),10);this._config.interval=S||this._config.defaultInterval}_slide(g,S=null){if(this._isSliding)return;const B=this._getActive(),W=g===r4,te=S||t8(this._getItems(),B,W,this._config.wrap);if(te===B)return;const ce=this._getItemIndex(te),Ee=st=>eo.trigger(this._element,st,{relatedTarget:te,direction:this._orderToDirection(g),from:this._getItemIndex(B),to:ce});if(Ee(vee).defaultPrevented||!B||!te)return;const We=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(ce),this._activeElement=te;const Me=W?Aee:Tee,Ot=W?Oee:zee;te.classList.add(Ot),p4(te),B.classList.add(Me),te.classList.add(Me);const mo=()=>{te.classList.remove(Me,Ot),te.classList.add(p5),B.classList.remove(p5,Ot,Me),this._isSliding=!1,Ee(u7)};this._queueCallback(mo,B,this._isAnimated()),We&&this.cycle()}_isAnimated(){return this._element.classList.contains(Eee)}_getActive(){return $n.findOne(Nee,this._element)}_getItems(){return $n.find(m9,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(g){return Ym()?g===kk?_k:r4:g===kk?r4:_k}_orderToDirection(g){return Ym()?g===_k?kk:k5:g===_k?k5:kk}static jQueryInterface(g){return this.each(function(){const S=h4.getOrCreateInstance(this,g);if(typeof g=="number"){S.to(g);return}if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g]()}})}}eo.on(document,See,Mee,function(w){const g=$n.getElementFromSelector(this);if(!g||!g.classList.contains(u9))return;w.preventDefault();const S=h4.getOrCreateInstance(g),B=this.getAttribute("data-bs-slide-to");if(B){S.to(B),S._maybeEnableCycle();return}if(Vb.getDataAttribute(this,"slide")==="next"){S.next(),S._maybeEnableCycle();return}S.prev(),S._maybeEnableCycle()});eo.on(window,Cee,()=>{const w=$n.find(Bee);for(const g of w)h4.getOrCreateInstance(g)});Jm(h4);const Fee="collapse",$ee="bs.collapse",b4=`.${$ee}`,Hee=".data-api",Vee=`show${b4}`,jee=`shown${b4}`,Uee=`hide${b4}`,Zee=`hidden${b4}`,Wee=`click${b4}${Hee}`,f7="show",Sk="collapse",g5="collapsing",qee="collapsed",Kee=`:scope .${Sk} .${Sk}`,Gee="collapse-horizontal",Yee="width",Xee="height",Jee=".collapse.show, .collapse.collapsing",M7='[data-bs-toggle="collapse"]',Qee={parent:null,toggle:!0},ete={parent:"(null|element)",toggle:"boolean"};class d4 extends eg{constructor(g,S){super(g,S),this._isTransitioning=!1,this._triggerArray=[];const B=$n.find(M7);for(const W of B){const te=$n.getSelectorFromElement(W),ce=$n.find(te).filter(Ee=>Ee===this._element);te!==null&&ce.length&&this._triggerArray.push(W)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Qee}static get DefaultType(){return ete}static get NAME(){return Fee}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let g=[];if(this._config.parent&&(g=this._getFirstLevelChildren(Jee).filter(Ee=>Ee!==this._element).map(Ee=>d4.getOrCreateInstance(Ee,{toggle:!1}))),g.length&&g[0]._isTransitioning||eo.trigger(this._element,Vee).defaultPrevented)return;for(const Ee of g)Ee.hide();const B=this._getDimension();this._element.classList.remove(Sk),this._element.classList.add(g5),this._element.style[B]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const W=()=>{this._isTransitioning=!1,this._element.classList.remove(g5),this._element.classList.add(Sk,f7),this._element.style[B]="",eo.trigger(this._element,jee)},ce=`scroll${B[0].toUpperCase()+B.slice(1)}`;this._queueCallback(W,this._element,!0),this._element.style[B]=`${this._element[ce]}px`}hide(){if(this._isTransitioning||!this._isShown()||eo.trigger(this._element,Uee).defaultPrevented)return;const S=this._getDimension();this._element.style[S]=`${this._element.getBoundingClientRect()[S]}px`,p4(this._element),this._element.classList.add(g5),this._element.classList.remove(Sk,f7);for(const W of this._triggerArray){const te=$n.getElementFromSelector(W);te&&!this._isShown(te)&&this._addAriaAndCollapsedClass([W],!1)}this._isTransitioning=!0;const B=()=>{this._isTransitioning=!1,this._element.classList.remove(g5),this._element.classList.add(Sk),eo.trigger(this._element,Zee)};this._element.style[S]="",this._queueCallback(B,this._element,!0)}_isShown(g=this._element){return g.classList.contains(f7)}_configAfterMerge(g){return g.toggle=!!g.toggle,g.parent=A1(g.parent),g}_getDimension(){return this._element.classList.contains(Gee)?Yee:Xee}_initializeChildren(){if(!this._config.parent)return;const g=this._getFirstLevelChildren(M7);for(const S of g){const B=$n.getElementFromSelector(S);B&&this._addAriaAndCollapsedClass([S],this._isShown(B))}}_getFirstLevelChildren(g){const S=$n.find(Kee,this._config.parent);return $n.find(g,this._config.parent).filter(B=>!S.includes(B))}_addAriaAndCollapsedClass(g,S){if(g.length)for(const B of g)B.classList.toggle(qee,!S),B.setAttribute("aria-expanded",S)}static jQueryInterface(g){const S={};return typeof g=="string"&&/show|hide/.test(g)&&(S.toggle=!1),this.each(function(){const B=d4.getOrCreateInstance(this,S);if(typeof g=="string"){if(typeof B[g]>"u")throw new TypeError(`No method named "${g}"`);B[g]()}})}}eo.on(document,Wee,M7,function(w){(w.target.tagName==="A"||w.delegateTarget&&w.delegateTarget.tagName==="A")&&w.preventDefault();for(const g of $n.getMultipleElementsFromSelector(this))d4.getOrCreateInstance(g,{toggle:!1}).toggle()});Jm(d4);const RH="dropdown",tte="bs.dropdown",__=`.${tte}`,n8=".data-api",ote="Escape",MH="Tab",nte="ArrowUp",BH="ArrowDown",ste=2,rte=`hide${__}`,ate=`hidden${__}`,ite=`show${__}`,lte=`shown${__}`,p9=`click${__}${n8}`,g9=`keydown${__}${n8}`,cte=`keyup${__}${n8}`,Ck="show",dte="dropup",ute="dropend",fte="dropstart",mte="dropup-center",pte="dropdown-center",m_='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',gte=`${m_}.${Ck}`,C5=".dropdown-menu",hte=".navbar",bte=".navbar-nav",yte=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",vte=Ym()?"top-end":"top-start",_te=Ym()?"top-start":"top-end",xte=Ym()?"bottom-end":"bottom-start",wte=Ym()?"bottom-start":"bottom-end",kte=Ym()?"left-start":"right-start",Cte=Ym()?"right-start":"left-start",Ste="top",Ete="bottom",Tte={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Ate={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class ah extends eg{constructor(g,S){super(g,S),this._popper=null,this._parent=this._element.parentNode,this._menu=$n.next(this._element,C5)[0]||$n.prev(this._element,C5)[0]||$n.findOne(C5,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Tte}static get DefaultType(){return Ate}static get NAME(){return RH}toggle(){return this._isShown()?this.hide():this.show()}show(){if(O1(this._element)||this._isShown())return;const g={relatedTarget:this._element};if(!eo.trigger(this._element,ite,g).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(bte))for(const B of[].concat(...document.body.children))eo.on(B,"mouseover",A5);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ck),this._element.classList.add(Ck),eo.trigger(this._element,lte,g)}}hide(){if(O1(this._element)||!this._isShown())return;const g={relatedTarget:this._element};this._completeHide(g)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(g){if(!eo.trigger(this._element,rte,g).defaultPrevented){if("ontouchstart"in document.documentElement)for(const B of[].concat(...document.body.children))eo.off(B,"mouseover",A5);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ck),this._element.classList.remove(Ck),this._element.setAttribute("aria-expanded","false"),Vb.removeDataAttribute(this._menu,"popper"),eo.trigger(this._element,ate,g)}}_getConfig(g){if(g=super._getConfig(g),typeof g.reference=="object"&&!Hb(g.reference)&&typeof g.reference.getBoundingClientRect!="function")throw new TypeError(`${RH.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return g}_createPopper(){if(typeof XV>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let g=this._element;this._config.reference==="parent"?g=this._parent:Hb(this._config.reference)?g=A1(this._config.reference):typeof this._config.reference=="object"&&(g=this._config.reference);const S=this._getPopperConfig();this._popper=e8(g,this._menu,S)}_isShown(){return this._menu.classList.contains(Ck)}_getPlacement(){const g=this._parent;if(g.classList.contains(ute))return kte;if(g.classList.contains(fte))return Cte;if(g.classList.contains(mte))return Ste;if(g.classList.contains(pte))return Ete;const S=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return g.classList.contains(dte)?S?_te:vte:S?wte:xte}_detectNavbar(){return this._element.closest(hte)!==null}_getOffset(){const{offset:g}=this._config;return typeof g=="string"?g.split(",").map(S=>Number.parseInt(S,10)):typeof g=="function"?S=>g(S,this._element):g}_getPopperConfig(){const g={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Vb.setDataAttribute(this._menu,"popper","static"),g.modifiers=[{name:"applyStyles",enabled:!1}]),{...g,...ju(this._config.popperConfig,[g])}}_selectMenuItem({key:g,target:S}){const B=$n.find(yte,this._menu).filter(W=>Lk(W));B.length&&t8(B,S,g===BH,!B.includes(S)).focus()}static jQueryInterface(g){return this.each(function(){const S=ah.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof S[g]>"u")throw new TypeError(`No method named "${g}"`);S[g]()}})}static clearMenus(g){if(g.button===ste||g.type==="keyup"&&g.key!==MH)return;const S=$n.find(gte);for(const B of S){const W=ah.getInstance(B);if(!W||W._config.autoClose===!1)continue;const te=g.composedPath(),ce=te.includes(W._menu);if(te.includes(W._element)||W._config.autoClose==="inside"&&!ce||W._config.autoClose==="outside"&&ce||W._menu.contains(g.target)&&(g.type==="keyup"&&g.key===MH||/input|select|option|textarea|form/i.test(g.target.tagName)))continue;const Ee={relatedTarget:W._element};g.type==="click"&&(Ee.clickEvent=g),W._completeHide(Ee)}}static dataApiKeydownHandler(g){const S=/input|textarea/i.test(g.target.tagName),B=g.key===ote,W=[nte,BH].includes(g.key);if(!W&&!B||S&&!B)return;g.preventDefault();const te=this.matches(m_)?this:$n.prev(this,m_)[0]||$n.next(this,m_)[0]||$n.findOne(m_,g.delegateTarget.parentNode),ce=ah.getOrCreateInstance(te);if(W){g.stopPropagation(),ce.show(),ce._selectMenuItem(g);return}ce._isShown()&&(g.stopPropagation(),ce.hide(),te.focus())}}eo.on(document,g9,m_,ah.dataApiKeydownHandler);eo.on(document,g9,C5,ah.dataApiKeydownHandler);eo.on(document,p9,ah.clearMenus);eo.on(document,cte,ah.clearMenus);eo.on(document,p9,m_,function(w){w.preventDefault(),ah.getOrCreateInstance(this).toggle()});Jm(ah);const h9="backdrop",Ote="fade",LH="show",PH=`mousedown.bs.${h9}`,zte={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Nte={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class b9 extends g4{constructor(g){super(),this._config=this._getConfig(g),this._isAppended=!1,this._element=null}static get Default(){return zte}static get DefaultType(){return Nte}static get NAME(){return h9}show(g){if(!this._config.isVisible){ju(g);return}this._append();const S=this._getElement();this._config.isAnimated&&p4(S),S.classList.add(LH),this._emulateAnimation(()=>{ju(g)})}hide(g){if(!this._config.isVisible){ju(g);return}this._getElement().classList.remove(LH),this._emulateAnimation(()=>{this.dispose(),ju(g)})}dispose(){this._isAppended&&(eo.off(this._element,PH),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const g=document.createElement("div");g.className=this._config.className,this._config.isAnimated&&g.classList.add(Ote),this._element=g}return this._element}_configAfterMerge(g){return g.rootElement=A1(g.rootElement),g}_append(){if(this._isAppended)return;const g=this._getElement();this._config.rootElement.append(g),eo.on(g,PH,()=>{ju(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(g){o9(g,this._getElement(),this._config.isAnimated)}}const Dte="focustrap",Rte="bs.focustrap",z5=`.${Rte}`,Mte=`focusin${z5}`,Bte=`keydown.tab${z5}`,Lte="Tab",Pte="forward",IH="backward",Ite={autofocus:!0,trapElement:null},Fte={autofocus:"boolean",trapElement:"element"};class y9 extends g4{constructor(g){super(),this._config=this._getConfig(g),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Ite}static get DefaultType(){return Fte}static get NAME(){return Dte}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),eo.off(document,z5),eo.on(document,Mte,g=>this._handleFocusin(g)),eo.on(document,Bte,g=>this._handleKeydown(g)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,eo.off(document,z5))}_handleFocusin(g){const{trapElement:S}=this._config;if(g.target===document||g.target===S||S.contains(g.target))return;const B=$n.focusableChildren(S);B.length===0?S.focus():this._lastTabNavDirection===IH?B[B.length-1].focus():B[0].focus()}_handleKeydown(g){g.key===Lte&&(this._lastTabNavDirection=g.shiftKey?IH:Pte)}}const FH=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",$H=".sticky-top",h5="padding-right",HH="margin-right";class B7{constructor(){this._element=document.body}getWidth(){const g=document.documentElement.clientWidth;return Math.abs(window.innerWidth-g)}hide(){const g=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,h5,S=>S+g),this._setElementAttributes(FH,h5,S=>S+g),this._setElementAttributes($H,HH,S=>S-g)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,h5),this._resetElementAttributes(FH,h5),this._resetElementAttributes($H,HH)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(g,S,B){const W=this.getWidth(),te=ce=>{if(ce!==this._element&&window.innerWidth>ce.clientWidth+W)return;this._saveInitialAttribute(ce,S);const Ee=window.getComputedStyle(ce).getPropertyValue(S);ce.style.setProperty(S,`${B(Number.parseFloat(Ee))}px`)};this._applyManipulationCallback(g,te)}_saveInitialAttribute(g,S){const B=g.style.getPropertyValue(S);B&&Vb.setDataAttribute(g,S,B)}_resetElementAttributes(g,S){const B=W=>{const te=Vb.getDataAttribute(W,S);if(te===null){W.style.removeProperty(S);return}Vb.removeDataAttribute(W,S),W.style.setProperty(S,te)};this._applyManipulationCallback(g,B)}_applyManipulationCallback(g,S){if(Hb(g)){S(g);return}for(const B of $n.find(g,this._element))S(B)}}const $te="modal",Hte="bs.modal",Xm=`.${Hte}`,Vte=".data-api",jte="Escape",Ute=`hide${Xm}`,Zte=`hidePrevented${Xm}`,v9=`hidden${Xm}`,_9=`show${Xm}`,Wte=`shown${Xm}`,qte=`resize${Xm}`,Kte=`click.dismiss${Xm}`,Gte=`mousedown.dismiss${Xm}`,Yte=`keydown.dismiss${Xm}`,Xte=`click${Xm}${Vte}`,VH="modal-open",Jte="fade",jH="show",m7="modal-static",Qte=".modal.show",eoe=".modal-dialog",toe=".modal-body",ooe='[data-bs-toggle="modal"]',noe={backdrop:!0,focus:!0,keyboard:!0},soe={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Nk extends eg{constructor(g,S){super(g,S),this._dialog=$n.findOne(eoe,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new B7,this._addEventListeners()}static get Default(){return noe}static get DefaultType(){return soe}static get NAME(){return $te}toggle(g){return this._isShown?this.hide():this.show(g)}show(g){this._isShown||this._isTransitioning||eo.trigger(this._element,_9,{relatedTarget:g}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(VH),this._adjustDialog(),this._backdrop.show(()=>this._showElement(g)))}hide(){!this._isShown||this._isTransitioning||eo.trigger(this._element,Ute).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(jH),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){eo.off(window,Xm),eo.off(this._dialog,Xm),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new b9({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new y9({trapElement:this._element})}_showElement(g){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const S=$n.findOne(toe,this._dialog);S&&(S.scrollTop=0),p4(this._element),this._element.classList.add(jH);const B=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,eo.trigger(this._element,Wte,{relatedTarget:g})};this._queueCallback(B,this._dialog,this._isAnimated())}_addEventListeners(){eo.on(this._element,Yte,g=>{if(g.key===jte){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),eo.on(window,qte,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),eo.on(this._element,Gte,g=>{eo.one(this._element,Kte,S=>{if(!(this._element!==g.target||this._element!==S.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(VH),this._resetAdjustments(),this._scrollBar.reset(),eo.trigger(this._element,v9)})}_isAnimated(){return this._element.classList.contains(Jte)}_triggerBackdropTransition(){if(eo.trigger(this._element,Zte).defaultPrevented)return;const S=this._element.scrollHeight>document.documentElement.clientHeight,B=this._element.style.overflowY;B==="hidden"||this._element.classList.contains(m7)||(S||(this._element.style.overflowY="hidden"),this._element.classList.add(m7),this._queueCallback(()=>{this._element.classList.remove(m7),this._queueCallback(()=>{this._element.style.overflowY=B},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const g=this._element.scrollHeight>document.documentElement.clientHeight,S=this._scrollBar.getWidth(),B=S>0;if(B&&!g){const W=Ym()?"paddingLeft":"paddingRight";this._element.style[W]=`${S}px`}if(!B&&g){const W=Ym()?"paddingRight":"paddingLeft";this._element.style[W]=`${S}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(g,S){return this.each(function(){const B=Nk.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof B[g]>"u")throw new TypeError(`No method named "${g}"`);B[g](S)}})}}eo.on(document,Xte,ooe,function(w){const g=$n.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&w.preventDefault(),eo.one(g,_9,W=>{W.defaultPrevented||eo.one(g,v9,()=>{Lk(this)&&this.focus()})});const S=$n.findOne(Qte);S&&Nk.getInstance(S).hide(),Nk.getOrCreateInstance(g).toggle(this)});F5(Nk);Jm(Nk);const roe="offcanvas",aoe="bs.offcanvas",Ub=`.${aoe}`,x9=".data-api",ioe=`load${Ub}${x9}`,loe="Escape",UH="show",ZH="showing",WH="hiding",coe="offcanvas-backdrop",w9=".offcanvas.show",doe=`show${Ub}`,uoe=`shown${Ub}`,foe=`hide${Ub}`,qH=`hidePrevented${Ub}`,k9=`hidden${Ub}`,moe=`resize${Ub}`,poe=`click${Ub}${x9}`,goe=`keydown.dismiss${Ub}`,hoe='[data-bs-toggle="offcanvas"]',boe={backdrop:!0,keyboard:!0,scroll:!1},yoe={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class z1 extends eg{constructor(g,S){super(g,S),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return boe}static get DefaultType(){return yoe}static get NAME(){return roe}toggle(g){return this._isShown?this.hide():this.show(g)}show(g){if(this._isShown||eo.trigger(this._element,doe,{relatedTarget:g}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new B7().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ZH);const B=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(UH),this._element.classList.remove(ZH),eo.trigger(this._element,uoe,{relatedTarget:g})};this._queueCallback(B,this._element,!0)}hide(){if(!this._isShown||eo.trigger(this._element,foe).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(WH),this._backdrop.hide();const S=()=>{this._element.classList.remove(UH,WH),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new B7().reset(),eo.trigger(this._element,k9)};this._queueCallback(S,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const g=()=>{if(this._config.backdrop==="static"){eo.trigger(this._element,qH);return}this.hide()},S=!!this._config.backdrop;return new b9({className:coe,isVisible:S,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:S?g:null})}_initializeFocusTrap(){return new y9({trapElement:this._element})}_addEventListeners(){eo.on(this._element,goe,g=>{if(g.key===loe){if(this._config.keyboard){this.hide();return}eo.trigger(this._element,qH)}})}static jQueryInterface(g){return this.each(function(){const S=z1.getOrCreateInstance(this,g);if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g](this)}})}}eo.on(document,poe,hoe,function(w){const g=$n.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&w.preventDefault(),O1(this))return;eo.one(g,k9,()=>{Lk(this)&&this.focus()});const S=$n.findOne(w9);S&&S!==g&&z1.getInstance(S).hide(),z1.getOrCreateInstance(g).toggle(this)});eo.on(window,ioe,()=>{for(const w of $n.find(w9))z1.getOrCreateInstance(w).show()});eo.on(window,moe,()=>{for(const w of $n.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(w).position!=="fixed"&&z1.getOrCreateInstance(w).hide()});F5(z1);Jm(z1);const voe=/^aria-[\w-]*$/i,C9={"*":["class","dir","id","lang","role",voe],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},_oe=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),xoe=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,woe=(w,g)=>{const S=w.nodeName.toLowerCase();return g.includes(S)?_oe.has(S)?!!xoe.test(w.nodeValue):!0:g.filter(B=>B instanceof RegExp).some(B=>B.test(S))};function koe(w,g,S){if(!w.length)return w;if(S&&typeof S=="function")return S(w);const W=new window.DOMParser().parseFromString(w,"text/html"),te=[].concat(...W.body.querySelectorAll("*"));for(const ce of te){const Ee=ce.nodeName.toLowerCase();if(!Object.keys(g).includes(Ee)){ce.remove();continue}const $e=[].concat(...ce.attributes),We=[].concat(g["*"]||[],g[Ee]||[]);for(const Me of $e)woe(Me,We)||ce.removeAttribute(Me.nodeName)}return W.body.innerHTML}const Coe="TemplateFactory",Soe={allowList:C9,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Eoe={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Toe={entry:"(string|element|function|null)",selector:"(string|element)"};class Aoe extends g4{constructor(g){super(),this._config=this._getConfig(g)}static get Default(){return Soe}static get DefaultType(){return Eoe}static get NAME(){return Coe}getContent(){return Object.values(this._config.content).map(g=>this._resolvePossibleFunction(g)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(g){return this._checkContent(g),this._config.content={...this._config.content,...g},this}toHtml(){const g=document.createElement("div");g.innerHTML=this._maybeSanitize(this._config.template);for(const[W,te]of Object.entries(this._config.content))this._setContent(g,te,W);const S=g.children[0],B=this._resolvePossibleFunction(this._config.extraClass);return B&&S.classList.add(...B.split(" ")),S}_typeCheckConfig(g){super._typeCheckConfig(g),this._checkContent(g.content)}_checkContent(g){for(const[S,B]of Object.entries(g))super._typeCheckConfig({selector:S,entry:B},Toe)}_setContent(g,S,B){const W=$n.findOne(B,g);if(W){if(S=this._resolvePossibleFunction(S),!S){W.remove();return}if(Hb(S)){this._putElementInTemplate(A1(S),W);return}if(this._config.html){W.innerHTML=this._maybeSanitize(S);return}W.textContent=S}}_maybeSanitize(g){return this._config.sanitize?koe(g,this._config.allowList,this._config.sanitizeFn):g}_resolvePossibleFunction(g){return ju(g,[this])}_putElementInTemplate(g,S){if(this._config.html){S.innerHTML="",S.append(g);return}S.textContent=g.textContent}}const Ooe="tooltip",zoe=new Set(["sanitize","allowList","sanitizeFn"]),p7="fade",Noe="modal",b5="show",Doe=".tooltip-inner",KH=`.${Noe}`,GH="hide.bs.modal",a4="hover",g7="focus",Roe="click",Moe="manual",Boe="hide",Loe="hidden",Poe="show",Ioe="shown",Foe="inserted",$oe="click",Hoe="focusin",Voe="focusout",joe="mouseenter",Uoe="mouseleave",Zoe={AUTO:"auto",TOP:"top",RIGHT:Ym()?"left":"right",BOTTOM:"bottom",LEFT:Ym()?"right":"left"},Woe={allowList:C9,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},qoe={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Ik extends eg{constructor(g,S){if(typeof XV>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(g,S),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Woe}static get DefaultType(){return qoe}static get NAME(){return Ooe}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),eo.off(this._element.closest(KH),GH,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const g=eo.trigger(this._element,this.constructor.eventName(Poe)),B=(e9(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(g.defaultPrevented||!B)return;this._disposePopper();const W=this._getTipElement();this._element.setAttribute("aria-describedby",W.getAttribute("id"));const{container:te}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(te.append(W),eo.trigger(this._element,this.constructor.eventName(Foe))),this._popper=this._createPopper(W),W.classList.add(b5),"ontouchstart"in document.documentElement)for(const Ee of[].concat(...document.body.children))eo.on(Ee,"mouseover",A5);const ce=()=>{eo.trigger(this._element,this.constructor.eventName(Ioe)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(ce,this.tip,this._isAnimated())}hide(){if(!this._isShown()||eo.trigger(this._element,this.constructor.eventName(Boe)).defaultPrevented)return;if(this._getTipElement().classList.remove(b5),"ontouchstart"in document.documentElement)for(const W of[].concat(...document.body.children))eo.off(W,"mouseover",A5);this._activeTrigger[Roe]=!1,this._activeTrigger[g7]=!1,this._activeTrigger[a4]=!1,this._isHovered=null;const B=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),eo.trigger(this._element,this.constructor.eventName(Loe)))};this._queueCallback(B,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(g){const S=this._getTemplateFactory(g).toHtml();if(!S)return null;S.classList.remove(p7,b5),S.classList.add(`bs-${this.constructor.NAME}-auto`);const B=RQ(this.constructor.NAME).toString();return S.setAttribute("id",B),this._isAnimated()&&S.classList.add(p7),S}setContent(g){this._newContent=g,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(g){return this._templateFactory?this._templateFactory.changeContent(g):this._templateFactory=new Aoe({...this._config,content:g,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Doe]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(g){return this.constructor.getOrCreateInstance(g.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(p7)}_isShown(){return this.tip&&this.tip.classList.contains(b5)}_createPopper(g){const S=ju(this._config.placement,[this,g,this._element]),B=Zoe[S.toUpperCase()];return e8(this._element,g,this._getPopperConfig(B))}_getOffset(){const{offset:g}=this._config;return typeof g=="string"?g.split(",").map(S=>Number.parseInt(S,10)):typeof g=="function"?S=>g(S,this._element):g}_resolvePossibleFunction(g){return ju(g,[this._element])}_getPopperConfig(g){const S={placement:g,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:B=>{this._getTipElement().setAttribute("data-popper-placement",B.state.placement)}}]};return{...S,...ju(this._config.popperConfig,[S])}}_setListeners(){const g=this._config.trigger.split(" ");for(const S of g)if(S==="click")eo.on(this._element,this.constructor.eventName($oe),this._config.selector,B=>{this._initializeOnDelegatedTarget(B).toggle()});else if(S!==Moe){const B=S===a4?this.constructor.eventName(joe):this.constructor.eventName(Hoe),W=S===a4?this.constructor.eventName(Uoe):this.constructor.eventName(Voe);eo.on(this._element,B,this._config.selector,te=>{const ce=this._initializeOnDelegatedTarget(te);ce._activeTrigger[te.type==="focusin"?g7:a4]=!0,ce._enter()}),eo.on(this._element,W,this._config.selector,te=>{const ce=this._initializeOnDelegatedTarget(te);ce._activeTrigger[te.type==="focusout"?g7:a4]=ce._element.contains(te.relatedTarget),ce._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},eo.on(this._element.closest(KH),GH,this._hideModalHandler)}_fixTitle(){const g=this._element.getAttribute("title");g&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",g),this._element.setAttribute("data-bs-original-title",g),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(g,S){clearTimeout(this._timeout),this._timeout=setTimeout(g,S)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(g){const S=Vb.getDataAttributes(this._element);for(const B of Object.keys(S))zoe.has(B)&&delete S[B];return g={...S,...typeof g=="object"&&g?g:{}},g=this._mergeConfigObj(g),g=this._configAfterMerge(g),this._typeCheckConfig(g),g}_configAfterMerge(g){return g.container=g.container===!1?document.body:A1(g.container),typeof g.delay=="number"&&(g.delay={show:g.delay,hide:g.delay}),typeof g.title=="number"&&(g.title=g.title.toString()),typeof g.content=="number"&&(g.content=g.content.toString()),g}_getDelegateConfig(){const g={};for(const[S,B]of Object.entries(this._config))this.constructor.Default[S]!==B&&(g[S]=B);return g.selector=!1,g.trigger="manual",g}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(g){return this.each(function(){const S=Ik.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof S[g]>"u")throw new TypeError(`No method named "${g}"`);S[g]()}})}}Jm(Ik);const Koe="popover",Goe=".popover-header",Yoe=".popover-body",Xoe={...Ik.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},Joe={...Ik.DefaultType,content:"(null|string|element|function)"};class s8 extends Ik{static get Default(){return Xoe}static get DefaultType(){return Joe}static get NAME(){return Koe}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Goe]:this._getTitle(),[Yoe]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(g){return this.each(function(){const S=s8.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof S[g]>"u")throw new TypeError(`No method named "${g}"`);S[g]()}})}}Jm(s8);const Qoe="scrollspy",ene="bs.scrollspy",r8=`.${ene}`,tne=".data-api",one=`activate${r8}`,YH=`click${r8}`,nne=`load${r8}${tne}`,sne="dropdown-item",xk="active",rne='[data-bs-spy="scroll"]',h7="[href]",ane=".nav, .list-group",XH=".nav-link",ine=".nav-item",lne=".list-group-item",cne=`${XH}, ${ine} > ${XH}, ${lne}`,dne=".dropdown",une=".dropdown-toggle",fne={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},mne={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class V5 extends eg{constructor(g,S){super(g,S),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return fne}static get DefaultType(){return mne}static get NAME(){return Qoe}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const g of this._observableSections.values())this._observer.observe(g)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(g){return g.target=A1(g.target)||document.body,g.rootMargin=g.offset?`${g.offset}px 0px -30%`:g.rootMargin,typeof g.threshold=="string"&&(g.threshold=g.threshold.split(",").map(S=>Number.parseFloat(S))),g}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(eo.off(this._config.target,YH),eo.on(this._config.target,YH,h7,g=>{const S=this._observableSections.get(g.target.hash);if(S){g.preventDefault();const B=this._rootElement||window,W=S.offsetTop-this._element.offsetTop;if(B.scrollTo){B.scrollTo({top:W,behavior:"smooth"});return}B.scrollTop=W}}))}_getNewObserver(){const g={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(S=>this._observerCallback(S),g)}_observerCallback(g){const S=ce=>this._targetLinks.get(`#${ce.target.id}`),B=ce=>{this._previousScrollData.visibleEntryTop=ce.target.offsetTop,this._process(S(ce))},W=(this._rootElement||document.documentElement).scrollTop,te=W>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=W;for(const ce of g){if(!ce.isIntersecting){this._activeTarget=null,this._clearActiveClass(S(ce));continue}const Ee=ce.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(te&&Ee){if(B(ce),!W)return;continue}!te&&!Ee&&B(ce)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const g=$n.find(h7,this._config.target);for(const S of g){if(!S.hash||O1(S))continue;const B=$n.findOne(decodeURI(S.hash),this._element);Lk(B)&&(this._targetLinks.set(decodeURI(S.hash),S),this._observableSections.set(S.hash,B))}}_process(g){this._activeTarget!==g&&(this._clearActiveClass(this._config.target),this._activeTarget=g,g.classList.add(xk),this._activateParents(g),eo.trigger(this._element,one,{relatedTarget:g}))}_activateParents(g){if(g.classList.contains(sne)){$n.findOne(une,g.closest(dne)).classList.add(xk);return}for(const S of $n.parents(g,ane))for(const B of $n.prev(S,cne))B.classList.add(xk)}_clearActiveClass(g){g.classList.remove(xk);const S=$n.find(`${h7}.${xk}`,g);for(const B of S)B.classList.remove(xk)}static jQueryInterface(g){return this.each(function(){const S=V5.getOrCreateInstance(this,g);if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g]()}})}}eo.on(window,nne,()=>{for(const w of $n.find(rne))V5.getOrCreateInstance(w)});Jm(V5);const pne="tab",gne="bs.tab",x_=`.${gne}`,hne=`hide${x_}`,bne=`hidden${x_}`,yne=`show${x_}`,vne=`shown${x_}`,_ne=`click${x_}`,xne=`keydown${x_}`,wne=`load${x_}`,kne="ArrowLeft",JH="ArrowRight",Cne="ArrowUp",QH="ArrowDown",b7="Home",eV="End",p_="active",tV="fade",y7="show",Sne="dropdown",S9=".dropdown-toggle",Ene=".dropdown-menu",v7=`:not(${S9})`,Tne='.list-group, .nav, [role="tablist"]',Ane=".nav-item, .list-group-item",One=`.nav-link${v7}, .list-group-item${v7}, [role="tab"]${v7}`,E9='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',_7=`${One}, ${E9}`,zne=`.${p_}[data-bs-toggle="tab"], .${p_}[data-bs-toggle="pill"], .${p_}[data-bs-toggle="list"]`;class Dk extends eg{constructor(g){super(g),this._parent=this._element.closest(Tne),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),eo.on(this._element,xne,S=>this._keydown(S)))}static get NAME(){return pne}show(){const g=this._element;if(this._elemIsActive(g))return;const S=this._getActiveElem(),B=S?eo.trigger(S,hne,{relatedTarget:g}):null;eo.trigger(g,yne,{relatedTarget:S}).defaultPrevented||B&&B.defaultPrevented||(this._deactivate(S,g),this._activate(g,S))}_activate(g,S){if(!g)return;g.classList.add(p_),this._activate($n.getElementFromSelector(g));const B=()=>{if(g.getAttribute("role")!=="tab"){g.classList.add(y7);return}g.removeAttribute("tabindex"),g.setAttribute("aria-selected",!0),this._toggleDropDown(g,!0),eo.trigger(g,vne,{relatedTarget:S})};this._queueCallback(B,g,g.classList.contains(tV))}_deactivate(g,S){if(!g)return;g.classList.remove(p_),g.blur(),this._deactivate($n.getElementFromSelector(g));const B=()=>{if(g.getAttribute("role")!=="tab"){g.classList.remove(y7);return}g.setAttribute("aria-selected",!1),g.setAttribute("tabindex","-1"),this._toggleDropDown(g,!1),eo.trigger(g,bne,{relatedTarget:S})};this._queueCallback(B,g,g.classList.contains(tV))}_keydown(g){if(![kne,JH,Cne,QH,b7,eV].includes(g.key))return;g.stopPropagation(),g.preventDefault();const S=this._getChildren().filter(W=>!O1(W));let B;if([b7,eV].includes(g.key))B=S[g.key===b7?0:S.length-1];else{const W=[JH,QH].includes(g.key);B=t8(S,g.target,W,!0)}B&&(B.focus({preventScroll:!0}),Dk.getOrCreateInstance(B).show())}_getChildren(){return $n.find(_7,this._parent)}_getActiveElem(){return this._getChildren().find(g=>this._elemIsActive(g))||null}_setInitialAttributes(g,S){this._setAttributeIfNotExists(g,"role","tablist");for(const B of S)this._setInitialAttributesOnChild(B)}_setInitialAttributesOnChild(g){g=this._getInnerElement(g);const S=this._elemIsActive(g),B=this._getOuterElement(g);g.setAttribute("aria-selected",S),B!==g&&this._setAttributeIfNotExists(B,"role","presentation"),S||g.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(g,"role","tab"),this._setInitialAttributesOnTargetPanel(g)}_setInitialAttributesOnTargetPanel(g){const S=$n.getElementFromSelector(g);S&&(this._setAttributeIfNotExists(S,"role","tabpanel"),g.id&&this._setAttributeIfNotExists(S,"aria-labelledby",`${g.id}`))}_toggleDropDown(g,S){const B=this._getOuterElement(g);if(!B.classList.contains(Sne))return;const W=(te,ce)=>{const Ee=$n.findOne(te,B);Ee&&Ee.classList.toggle(ce,S)};W(S9,p_),W(Ene,y7),B.setAttribute("aria-expanded",S)}_setAttributeIfNotExists(g,S,B){g.hasAttribute(S)||g.setAttribute(S,B)}_elemIsActive(g){return g.classList.contains(p_)}_getInnerElement(g){return g.matches(_7)?g:$n.findOne(_7,g)}_getOuterElement(g){return g.closest(Ane)||g}static jQueryInterface(g){return this.each(function(){const S=Dk.getOrCreateInstance(this);if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g]()}})}}eo.on(document,_ne,E9,function(w){["A","AREA"].includes(this.tagName)&&w.preventDefault(),!O1(this)&&Dk.getOrCreateInstance(this).show()});eo.on(window,wne,()=>{for(const w of $n.find(zne))Dk.getOrCreateInstance(w)});Jm(Dk);const Nne="toast",Dne="bs.toast",R1=`.${Dne}`,Rne=`mouseover${R1}`,Mne=`mouseout${R1}`,Bne=`focusin${R1}`,Lne=`focusout${R1}`,Pne=`hide${R1}`,Ine=`hidden${R1}`,Fne=`show${R1}`,$ne=`shown${R1}`,Hne="fade",oV="hide",y5="show",v5="showing",Vne={animation:"boolean",autohide:"boolean",delay:"number"},jne={animation:!0,autohide:!0,delay:5e3};class j5 extends eg{constructor(g,S){super(g,S),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return jne}static get DefaultType(){return Vne}static get NAME(){return Nne}show(){if(eo.trigger(this._element,Fne).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Hne);const S=()=>{this._element.classList.remove(v5),eo.trigger(this._element,$ne),this._maybeScheduleHide()};this._element.classList.remove(oV),p4(this._element),this._element.classList.add(y5,v5),this._queueCallback(S,this._element,this._config.animation)}hide(){if(!this.isShown()||eo.trigger(this._element,Pne).defaultPrevented)return;const S=()=>{this._element.classList.add(oV),this._element.classList.remove(v5,y5),eo.trigger(this._element,Ine)};this._element.classList.add(v5),this._queueCallback(S,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(y5),super.dispose()}isShown(){return this._element.classList.contains(y5)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(g,S){switch(g.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=S;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=S;break}}if(S){this._clearTimeout();return}const B=g.relatedTarget;this._element===B||this._element.contains(B)||this._maybeScheduleHide()}_setListeners(){eo.on(this._element,Rne,g=>this._onInteraction(g,!0)),eo.on(this._element,Mne,g=>this._onInteraction(g,!1)),eo.on(this._element,Bne,g=>this._onInteraction(g,!0)),eo.on(this._element,Lne,g=>this._onInteraction(g,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(g){return this.each(function(){const S=j5.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof S[g]>"u")throw new TypeError(`No method named "${g}"`);S[g](this)}})}}F5(j5);Jm(j5);function Une(w){return w&&w.__esModule&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w}var T9={exports:{}};(function(w){(function(){var g=function(e){if(e===null)return"null";if(e===void 0)return"undefined";var t=typeof e;return t==="object"&&(Array.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="Array")?"array":t==="object"&&(String.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="String")?"string":t},S=function(e){return["undefined","boolean","number","string","function","xml","null"].indexOf(e)!==-1},B=function(e,t){var o=Array.prototype.slice.call(e);return o.sort(t)},W=function(e,t){return te(function(o,s){return e.eq(t(o),t(s))})},te=function(e){return{eq:e}},ce=te(function(e,t){return e===t}),Ee=ce,$e=function(e){return te(function(t,o){if(t.length!==o.length)return!1;for(var s=t.length,a=0;a{var s;return o(e,t.prototype)?!0:((s=e.constructor)===null||s===void 0?void 0:s.name)===t.name},ut=e=>{const t=typeof e;return e===null?"null":t==="object"&&Array.isArray(e)?"array":t==="object"&&st(e,String,(o,s)=>s.isPrototypeOf(o))?"string":t},Bt=e=>t=>ut(t)===e,Rt=e=>t=>typeof t===e,Ke=e=>t=>e===t,Ut=(e,t)=>ue(e)&&st(e,t,(o,s)=>mo(o)===s),ft=Bt("string"),ue=Bt("object"),Ct=e=>Ut(e,Object),ve=Bt("array"),ot=Ke(null),bn=Rt("boolean"),ln=Ke(void 0),uo=e=>e==null,Fe=e=>!uo(e),Gt=Rt("function"),D=Rt("number"),bt=(e,t)=>{if(ve(e)){for(let o=0,s=e.length;o{},Kt=(e,t)=>(...o)=>e(t.apply(null,o)),qo=(e,t)=>o=>e(t(o)),Ge=e=>()=>e,To=e=>e,Cr=(e,t)=>e===t;function $t(e,...t){return(...o)=>{const s=t.concat(o);return e.apply(null,s)}}const pt=e=>t=>!e(t),Ht=e=>()=>{throw new Error(e)},ks=e=>e(),cn=e=>{e()},fn=Ge(!1),zo=Ge(!0);class j{constructor(t,o){this.tag=t,this.value=o}static some(t){return new j(!0,t)}static none(){return j.singletonNone}fold(t,o){return this.tag?o(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?j.some(t(this.value)):j.none()}bind(t){return this.tag?t(this.value):j.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:j.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(t??"Called getOrDie on None")}static from(t){return Fe(t)?j.some(t):j.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}j.singletonNone=new j(!1);const Fr=Array.prototype.slice,Cs=Array.prototype.indexOf,Sn=Array.prototype.push,bi=(e,t)=>Cs.call(e,t),qi=(e,t)=>{const o=bi(e,t);return o===-1?j.none():j.some(o)},mn=(e,t)=>bi(e,t)>-1,Bn=(e,t)=>{for(let o=0,s=e.length;o{const o=e.length,s=new Array(o);for(let a=0;a{for(let o=0,s=e.length;o{for(let o=e.length-1;o>=0;o--){const s=e[o];t(s,o)}},yt=(e,t)=>{const o=[],s=[];for(let a=0,c=e.length;a{const o=[];for(let s=0,a=e.length;s(Lt(e,(s,a)=>{o=t(o,s,a)}),o),ko=(e,t,o)=>(Le(e,(s,a)=>{o=t(o,s,a)}),o),tn=(e,t,o)=>{for(let s=0,a=e.length;stn(e,t,fn),rs=(e,t)=>{for(let o=0,s=e.length;o{const t=[];for(let o=0,s=e.length;oZn(dn(e,t)),Hs=(e,t)=>{for(let o=0,s=e.length;o{const t=Fr.call(e,0);return t.reverse(),t},os=(e,t)=>rt(e,o=>!mn(t,o)),Is=(e,t)=>{const o={};for(let s=0,a=e.length;s{const o=Fr.call(e,0);return o.sort(t),o},ra=(e,t)=>t>=0&&tra(e,0),Vo=e=>ra(e,e.length-1),an=Gt(Array.from)?Array.from:e=>Fr.call(e),Kr=(e,t)=>{for(let o=0;o{const o=[],s=Gt(t)?a=>Bn(o,c=>t(c,a)):a=>mn(o,a);for(let a=0,c=e.length;a{const o=vt(e);for(let s=0,a=o.length;sas(e,(o,s)=>({k:s,v:t(o,s)})),as=(e,t)=>{const o={};return nn(e,(s,a)=>{const c=t(s,a);o[c.k]=c.v}),o},hr=e=>(t,o)=>{e[o]=t},yl=(e,t,o,s)=>{nn(e,(a,c)=>{(t(a,c)?o:s)(a,c)})},cl=(e,t)=>{const o={},s={};return yl(e,t,hr(o),hr(s)),{t:o,f:s}},Bi=(e,t)=>{const o={};return yl(e,t,hr(o),dt),o},vi=(e,t)=>{const o=[];return nn(e,(s,a)=>{o.push(t(s,a))}),o},vl=e=>vi(e,To),Gn=(e,t)=>Ro(e,t)?j.from(e[t]):j.none(),Ro=(e,t)=>oi.call(e,t),$a=(e,t)=>Ro(e,t)&&e[t]!==void 0&&e[t]!==null,$r=(e,t,o=Ot)=>Me(o).eq(e,t),bd=e=>{const t={};return Le(e,o=>{t[o]={}}),vt(t)},Vt=e=>e.length!==void 0,Dr=Array.isArray,au=e=>{if(Dr(e))return e;{const t=[];for(let o=0,s=e.length;o{if(!e)return!1;if(o=o||e,Vt(e)){for(let s=0,a=e.length;s{const o=[];return zs(e,(s,a)=>{o.push(t(s,a,e))}),o},ni=(e,t)=>{const o=[];return zs(e,(s,a)=>{(!t||t(s,a,e))&&o.push(s)}),o},Ki=(e,t)=>{if(e){for(let o=0,s=e.length;o{let a=ln(o)?e[0]:o;for(let c=0;c{for(let s=0,a=e.length;se[e.length-1],si=e=>{let t=!1,o;return(...s)=>(t||(t=!0,o=e.apply(null,s)),o)},iu=(e,t,o,s)=>{const a=e.isiOS()&&/ipad/i.test(o)===!0,c=e.isiOS()&&!a,d=e.isiOS()||e.isAndroid(),h=d||s("(pointer:coarse)"),_=a||!c&&d&&s("(min-device-width:768px)"),z=c||d&&!_,I=t.isSafari()&&e.isiOS()&&/safari/i.test(o)===!1,$=!z&&!_&&!I;return{isiPad:Ge(a),isiPhone:Ge(c),isTablet:Ge(_),isPhone:Ge(z),isTouch:Ge(h),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:Ge(I),isDesktop:Ge($)}},gc=(e,t)=>{for(let o=0;o{const o=gc(e,t);if(!o)return{major:0,minor:0};const s=a=>Number(t.replace(o,"$"+a));return Hn(s(1),s(2))},lu=(e,t)=>{const o=String(t).toLowerCase();return e.length===0?Wc():xi(e,o)},Wc=()=>Hn(0,0),Hn=(e,t)=>({major:e,minor:t}),lr={nu:Hn,detect:lu,unknown:Wc},ha=(e,t)=>Kr(t.brands,o=>{const s=o.brand.toLowerCase();return On(e,a=>{var c;return s===((c=a.brand)===null||c===void 0?void 0:c.toLowerCase())}).map(a=>({current:a.name,version:lr.nu(parseInt(o.version,10),0)}))}),Zu=(e,t)=>{const o=String(t).toLowerCase();return On(e,s=>s.search(o))},Gi=(e,t)=>Zu(e,t).map(o=>{const s=lr.detect(o.versionRegexes,t);return{current:o.name,version:s}}),vd=(e,t)=>Zu(e,t).map(o=>{const s=lr.detect(o.versionRegexes,t);return{current:o.name,version:s}}),Hr=(e,t)=>e.substring(t),ba=(e,t,o)=>t===""||e.length>=t.length&&e.substr(o,o+t.length)===t,wi=(e,t)=>vs(e,t)?Hr(e,t.length):e,Yn=(e,t,o=0,s)=>{const a=e.indexOf(t,o);return a!==-1?ln(s)?!0:a+t.length<=s:!1},vs=(e,t)=>ba(e,t,0),Yi=(e,t)=>ba(e,t,e.length-t.length),hc=e=>t=>t.replace(e,""),br=hc(/^\s+|\s+$/g),_l=hc(/^\s+/g),Vs=hc(/\s+$/g),Pn=e=>e.length>0,ki=e=>!Pn(e),Oa=(e,t)=>t<=0?"":new Array(t+1).join(e),Vr=(e,t=10)=>{const o=parseInt(e,t);return isNaN(o)?j.none():j.some(o)},za=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Qs=e=>t=>Yn(t,e),_d=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>Yn(e,"edge/")&&Yn(e,"chrome")&&Yn(e,"safari")&&Yn(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,za],search:e=>Yn(e,"chrome")&&!Yn(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>Yn(e,"msie")||Yn(e,"trident")},{name:"Opera",versionRegexes:[za,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Qs("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Qs("firefox")},{name:"Safari",versionRegexes:[za,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(Yn(e,"safari")||Yn(e,"mobile/"))&&Yn(e,"applewebkit")}],wo=[{name:"Windows",search:Qs("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>Yn(e,"iphone")||Yn(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Qs("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:Qs("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Qs("linux"),versionRegexes:[]},{name:"Solaris",search:Qs("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Qs("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Qs("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],xl={browsers:Ge(_d),oses:Ge(wo)},yr="Edge",Fs="Chromium",qc="IE",pn="Opera",Vl="Firefox",ya="Safari",Mo=()=>Li({current:void 0,version:lr.unknown()}),Li=e=>{const t=e.current,o=e.version,s=a=>()=>t===a;return{current:t,version:o,isEdge:s(yr),isChromium:s(Fs),isIE:s(qc),isOpera:s(pn),isFirefox:s(Vl),isSafari:s(ya)}},ri={unknown:Mo,nu:Li,edge:Ge(yr),chromium:Ge(Fs),ie:Ge(qc),opera:Ge(pn),firefox:Ge(Vl),safari:Ge(ya)},Ns="Windows",jl="iOS",er="Android",bc="Linux",Gr="macOS",Vn="Solaris",wl="FreeBSD",Kc="ChromeOS",xd=()=>Ds({current:void 0,version:lr.unknown()}),Ds=e=>{const t=e.current,o=e.version,s=a=>()=>t===a;return{current:t,version:o,isWindows:s(Ns),isiOS:s(jl),isAndroid:s(er),isMacOS:s(Gr),isLinux:s(bc),isSolaris:s(Vn),isFreeBSD:s(wl),isChromeOS:s(Kc)}},Na={unknown:xd,nu:Ds,windows:Ge(Ns),ios:Ge(jl),android:Ge(er),linux:Ge(bc),macos:Ge(Gr),solaris:Ge(Vn),freebsd:Ge(wl),chromeos:Ge(Kc)},pe={detect:(e,t,o)=>{const s=xl.browsers(),a=xl.oses(),c=t.bind(_=>ha(s,_)).orThunk(()=>Gi(s,e)).fold(ri.unknown,ri.nu),d=vd(a,e).fold(Na.unknown,Na.nu),h=iu(d,c,e,o);return{browser:c,os:d,deviceType:h}}},Ae=e=>window.matchMedia(e).matches;let Ye=si(()=>pe.detect(window.navigator.userAgent,j.from(window.navigator.userAgentData),Ae));const _t=()=>Ye(),oo=window.navigator.userAgent,Go=_t(),Xn=Go.browser,sn=Go.os,is=Go.deviceType,tr=oo.indexOf("Windows Phone")!==-1,Jo={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:Xn.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!Xn.isIE(),windowsPhone:tr,browser:{current:Xn.current,version:Xn.version,isChromium:Xn.isChromium,isEdge:Xn.isEdge,isFirefox:Xn.isFirefox,isIE:Xn.isIE,isOpera:Xn.isOpera,isSafari:Xn.isSafari},os:{current:sn.current,version:sn.version,isAndroid:sn.isAndroid,isChromeOS:sn.isChromeOS,isFreeBSD:sn.isFreeBSD,isiOS:sn.isiOS,isLinux:sn.isLinux,isMacOS:sn.isMacOS,isSolaris:sn.isSolaris,isWindows:sn.isWindows},deviceType:{isDesktop:is.isDesktop,isiPad:is.isiPad,isiPhone:is.isiPhone,isPhone:is.isPhone,isTablet:is.isTablet,isTouch:is.isTouch,isWebView:is.isWebView}},dl=/^\s*|\s*$/g,Ul=e=>uo(e)?"":(""+e).replace(dl,""),yc=(e,t)=>t?t==="array"&&Dr(e)?!0:typeof e===t:e!==void 0,Qm=(e,t,o={})=>{const s=ft(e)?e.split(t||","):e||[];let a=s.length;for(;a--;)o[s[a]]={};return o},lh=Ro,Pi=(e,...t)=>{for(let o=0;ot.call(s,a,c,o)===!1?!1:(ep(a,t,o,s),!0)))},zt={trim:Ul,isArray:Dr,is:yc,toArray:au,makeMap:Qm,each:zs,map:yd,grep:ni,inArray:Ki,hasOwn:lh,extend:Pi,walk:ep,resolve:(e,t=window)=>{const o=e.split(".");for(let s=0,a=o.length;sve(e)?e:e===""?[]:yd(e.split(t||","),Ul),_addCacheSuffix:e=>{const t=Jo.cacheSuffix;return t&&(e+=(e.indexOf("?")===-1?"?":"&")+t),e}},wd=(e,t,o=Cr)=>e.exists(s=>o(s,t)),kd=(e,t,o=Cr)=>va(e,t,o).getOr(e.isNone()&&t.isNone()),Hf=e=>{const t=[],o=s=>{t.push(s)};for(let s=0;se.isSome()&&t.isSome()?j.some(o(e.getOrDie(),t.getOrDie())):j.none(),Cd=(e,t,o,s)=>e.isSome()&&t.isSome()&&o.isSome()?j.some(s(e.getOrDie(),t.getOrDie(),o.getOrDie())):j.none(),cu=(e,t)=>e?j.some(t):j.none(),dh=typeof window<"u"?window:Function("return this;")(),og=(e,t)=>{let o=t??dh;for(let s=0;s{const o=e.split(".");return og(o,t)},Zb=(e,t)=>ng(e,t),uh=(e,t)=>{const o=Zb(e,t);if(o==null)throw new Error(e+" not available on this browser");return o},Wb=Object.getPrototypeOf,Vf=e=>uh("HTMLElement",e),Zl=e=>{const t=ng("ownerDocument.defaultView",e);return ue(e)&&(Vf(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Wb(e).constructor.name))},Gc=8,Wl=9,Yr=11,Ci=1,Sd=3,En=e=>e.dom.nodeName.toLowerCase(),kl=e=>e.dom.nodeType,Wu=e=>t=>kl(t)===e,qu=e=>kl(e)===Gc||En(e)==="#comment",ai=e=>cr(e)&&Zl(e.dom),cr=Wu(Ci),Rs=Wu(Sd),aa=Wu(Wl),_s=Wu(Yr),Ed=e=>t=>cr(t)&&En(t)===e,Td=(e,t,o)=>{if(ft(o)||bn(o)||D(o))e.setAttribute(t,o+"");else throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple")},Rr=(e,t,o)=>{Td(e.dom,t,o)},Ha=(e,t)=>{const o=e.dom;nn(t,(s,a)=>{Td(o,a,s)})},Da=(e,t)=>{const o=e.dom.getAttribute(t);return o===null?void 0:o},Sr=(e,t)=>j.from(Da(e,t)),Yc=(e,t)=>{const o=e.dom;return o&&o.hasAttribute?o.hasAttribute(t):!1},rn=(e,t)=>{e.dom.removeAttribute(t)},vr=e=>{const t=e.dom.attributes;return t==null||t.length===0},Va=e=>ko(e.dom.attributes,(t,o)=>(t[o.name]=o.value,t),{}),ql=(e,t)=>{const o=Da(e,t);return o===void 0||o===""?[]:o.split(" ")},jr=(e,t,o)=>{const a=ql(e,t).concat([o]);return Rr(e,t,a.join(" ")),!0},so=(e,t,o)=>{const s=rt(ql(e,t),a=>a!==o);return s.length>0?Rr(e,t,s.join(" ")):rn(e,t),!1},Cl=e=>e.dom.classList!==void 0,Sl=e=>ql(e,"class"),Nn=(e,t)=>jr(e,"class",t),du=(e,t)=>so(e,"class",t),tp=(e,t)=>mn(Sl(e),t)?du(e,t):Nn(e,t),Kl=(e,t)=>{Cl(e)?e.dom.classList.add(t):Nn(e,t)},un=e=>{(Cl(e)?e.dom.classList:Sl(e)).length===0&&rn(e,"class")},Ra=(e,t)=>{Cl(e)?e.dom.classList.remove(t):du(e,t),un(e)},Ku=(e,t)=>{const o=Cl(e)?e.dom.classList.toggle(t):tp(e,t);return un(e),o},vc=(e,t)=>Cl(e)&&e.dom.classList.contains(t),jf=(e,t)=>{const s=(t||document).createElement("div");if(s.innerHTML=e,!s.hasChildNodes()||s.childNodes.length>1){const a="HTML does not have a single root node";throw console.error(a,e),new Error(a)}return Gl(s.childNodes[0])},El=(e,t)=>{const s=(t||document).createElement(e);return Gl(s)},ja=(e,t)=>{const s=(t||document).createTextNode(e);return Gl(s)},Gl=e=>{if(e==null)throw new Error("Node cannot be null or undefined");return{dom:e}},ye={fromHtml:jf,fromTag:El,fromText:ja,fromDom:Gl,fromPoint:(e,t,o)=>j.from(e.dom.elementFromPoint(t,o)).map(Gl)},uu=(e,t)=>{const o=[],s=c=>(o.push(c),t(c));let a=t(e);do a=a.bind(s);while(a.isSome());return o},ls=(e,t)=>{const o=e.dom;if(o.nodeType!==Ci)return!1;{const s=o;if(s.matches!==void 0)return s.matches(t);if(s.msMatchesSelector!==void 0)return s.msMatchesSelector(t);if(s.webkitMatchesSelector!==void 0)return s.webkitMatchesSelector(t);if(s.mozMatchesSelector!==void 0)return s.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},op=e=>e.nodeType!==Ci&&e.nodeType!==Wl&&e.nodeType!==Yr||e.childElementCount===0,Gu=(e,t)=>{const o=t===void 0?document:t.dom;return op(o)?[]:dn(o.querySelectorAll(e),ye.fromDom)},ul=(e,t)=>{const o=t===void 0?document:t.dom;return op(o)?j.none():j.from(o.querySelector(e)).map(ye.fromDom)},kn=(e,t)=>e.dom===t.dom,_a=(e,t)=>{const o=e.dom,s=t.dom;return o===s?!1:o.contains(s)},Xi=e=>ye.fromDom(e.dom.ownerDocument),fl=e=>aa(e)?e:Xi(e),Yl=e=>ye.fromDom(fl(e).dom.documentElement),_c=e=>ye.fromDom(fl(e).dom.defaultView),ia=e=>j.from(e.dom.parentNode).map(ye.fromDom),Od=e=>j.from(e.dom.parentElement).map(ye.fromDom),Yu=(e,t)=>{const o=Gt(t)?t:fn;let s=e.dom;const a=[];for(;s.parentNode!==null&&s.parentNode!==void 0;){const c=s.parentNode,d=ye.fromDom(c);if(a.push(d),o(d)===!0)break;s=c}return a},Uf=e=>{const t=o=>rt(o,s=>!kn(e,s));return ia(e).map(xa).map(t).getOr([])},Ur=e=>j.from(e.dom.previousSibling).map(ye.fromDom),ho=e=>j.from(e.dom.nextSibling).map(ye.fromDom),xc=e=>sa(uu(e,Ur)),fu=e=>uu(e,ho),xa=e=>dn(e.dom.childNodes,ye.fromDom),wc=(e,t)=>{const o=e.dom.childNodes;return j.from(o[t]).map(ye.fromDom)},Ii=e=>wc(e,0),kc=e=>wc(e,e.dom.childNodes.length-1),Xc=e=>e.dom.childNodes.length,Zr=e=>{const t=e.dom.head;if(t==null)throw new Error("Head is not available yet");return ye.fromDom(t)},ml=e=>_s(e)&&Fe(e.dom.host),Xl=e=>ye.fromDom(e.dom.getRootNode()),mu=e=>ml(e)?e:Zr(fl(e)),sg=e=>ml(e)?e:ye.fromDom(fl(e).dom.body),Cc=e=>{const t=Xl(e);return ml(t)?j.some(t):j.none()},zd=e=>ye.fromDom(e.dom.host),Xu=e=>{if(Fe(e.target)){const t=ye.fromDom(e.target);if(cr(t)&&Ms(t)&&e.composed&&e.composedPath){const o=e.composedPath();if(o)return St(o)}}return j.from(e.target)},Ms=e=>Fe(e.dom.shadowRoot),Ua=e=>{const t=Rs(e)?e.dom.parentNode:e.dom;if(t==null||t.ownerDocument===null)return!1;const o=t.ownerDocument;return Cc(ye.fromDom(t)).fold(()=>o.body.contains(t),qo(Ua,zd))};var la=(e,t,o,s,a)=>e(o,s)?j.some(o):Gt(a)&&a(o)?j.none():t(o,s,a);const ii=(e,t,o)=>{let s=e.dom;const a=Gt(o)?o:fn;for(;s.parentNode;){s=s.parentNode;const c=ye.fromDom(s);if(t(c))return j.some(c);if(a(c))break}return j.none()},_r=(e,t,o)=>la((a,c)=>c(a),ii,e,t,o),Zf=(e,t)=>{const o=e.dom;return o.parentNode?dr(ye.fromDom(o.parentNode),s=>!kn(e,s)&&t(s)):j.none()},dr=(e,t)=>{const o=a=>t(ye.fromDom(a));return On(e.dom.childNodes,o).map(ye.fromDom)},ca=(e,t)=>{const o=s=>{for(let a=0;aii(e,s=>ls(s,t),o),nt=(e,t)=>ul(t,e),Xr=(e,t,o)=>la((a,c)=>ls(a,c),Tl,e,t,o),pu=e=>Xr(e,"[contenteditable]"),js=(e,t=!1)=>Ua(e)?e.dom.isContentEditable:pu(e).fold(Ge(t),o=>Al(o)==="true"),Al=e=>e.dom.contentEditable,Za=e=>e.style!==void 0&&Gt(e.style.getPropertyValue),Ol=(e,t,o)=>{if(!ft(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);Za(e)&&e.style.setProperty(t,o)},gu=(e,t)=>{Za(e)&&e.style.removeProperty(t)},li=(e,t,o)=>{const s=e.dom;Ol(s,t,o)},vn=(e,t)=>{const o=e.dom;nn(t,(s,a)=>{Ol(o,a,s)})},ur=(e,t)=>{const o=e.dom,a=window.getComputedStyle(o).getPropertyValue(t);return a===""&&!Ua(e)?Sc(o,t):a},Sc=(e,t)=>Za(e)?e.style.getPropertyValue(t):"",Us=(e,t)=>{const o=e.dom,s=Sc(o,t);return j.from(s).filter(a=>a.length>0)},Ju=e=>{const t={},o=e.dom;if(Za(o))for(let s=0;s{const o=e.dom;gu(o,t),wd(Sr(e,"style").map(br),"")&&rn(e,"style")},np=e=>e.dom.offsetWidth,Zs=(e,t)=>{ia(e).each(s=>{s.dom.insertBefore(t.dom,e.dom)})},Ne=(e,t)=>{ho(e).fold(()=>{ia(e).each(a=>{fr(a,t)})},s=>{Zs(s,t)})},Wa=(e,t)=>{Ii(e).fold(()=>{fr(e,t)},s=>{e.dom.insertBefore(t.dom,s.dom)})},fr=(e,t)=>{e.dom.appendChild(t.dom)},Si=(e,t)=>{Zs(e,t),fr(t,e)},zl=(e,t)=>{Le(t,(o,s)=>{const a=s===0?e:t[s-1];Ne(a,o)})},xr=(e,t)=>{Le(t,o=>{fr(e,o)})},xs=e=>{e.dom.textContent="",Le(xa(e),t=>{Jn(t)})},Jn=e=>{const t=e.dom;t.parentNode!==null&&t.parentNode.removeChild(t)},wa=e=>{const t=xa(e);t.length>0&&zl(e,t),Jn(e)},Ei=(e,t)=>{const s=(t||document).createElement("div");return s.innerHTML=e,xa(ye.fromDom(s))},ci=e=>dn(e,ye.fromDom),Ji=e=>e.dom.innerHTML,Ql=(e,t)=>{const s=Xi(e).dom,a=ye.fromDom(s.createDocumentFragment()),c=Ei(t,s);xr(a,c),xs(e),fr(e,a)},Ec=e=>{const t=ye.fromTag("div"),o=ye.fromDom(e.dom.cloneNode(!0));return fr(t,o),Ji(t)},Jc=(e,t,o,s,a,c,d)=>({target:e,x:t,y:o,stop:s,prevent:a,kill:c,raw:d}),Wf=e=>{const t=ye.fromDom(Xu(e).getOr(e.target)),o=()=>e.stopPropagation(),s=()=>e.preventDefault(),a=Kt(s,o);return Jc(t,e.clientX,e.clientY,o,s,a,e)},qf=(e,t)=>o=>{e(o)&&t(Wf(o))},Tc=(e,t,o,s,a)=>{const c=qf(o,s);return e.dom.addEventListener(t,c,a),{unbind:$t(P,e,t,c,a)}},E=(e,t,o,s)=>Tc(e,t,o,s,!1),P=(e,t,o,s)=>{e.dom.removeEventListener(t,o,s)},q=(e,t)=>({left:e,top:t,translate:(s,a)=>q(e+s,t+a)}),ge=q,xe=e=>{const t=e.getBoundingClientRect();return ge(t.left,t.top)},at=(e,t)=>e!==void 0?e:t!==void 0?t:0,xo=e=>{const t=e.dom.ownerDocument,o=t.body,s=t.defaultView,a=t.documentElement;if(o===e.dom)return ge(o.offsetLeft,o.offsetTop);const c=at(s==null?void 0:s.pageYOffset,a.scrollTop),d=at(s==null?void 0:s.pageXOffset,a.scrollLeft),h=at(a.clientTop,o.clientTop),_=at(a.clientLeft,o.clientLeft);return Uo(e).translate(d-_,c-h)},Uo=e=>{const t=e.dom,s=t.ownerDocument.body;return s===t?ge(s.offsetLeft,s.offsetTop):Ua(e)?xe(t):ge(0,0)},Bo=e=>{const t=e!==void 0?e.dom:document,o=t.body.scrollLeft||t.documentElement.scrollLeft,s=t.body.scrollTop||t.documentElement.scrollTop;return ge(o,s)},io=(e,t,o)=>{const a=(o!==void 0?o.dom:document).defaultView;a&&a.scrollTo(e,t)},Wn=(e,t)=>{_t().browser.isSafari()&&Gt(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},sr=e=>{const t=e===void 0?window:e;return _t().browser.isFirefox()?j.none():j.from(t.visualViewport)},Ws=(e,t,o,s)=>({x:e,y:t,width:o,height:s,right:e+o,bottom:t+s}),Nl=e=>{const t=e===void 0?window:e,o=t.document,s=Bo(ye.fromDom(o));return sr(t).fold(()=>{const a=t.document.documentElement,c=a.clientWidth,d=a.clientHeight;return Ws(s.left,s.top,c,d)},a=>Ws(Math.max(a.pageLeft,s.left),Math.max(a.pageTop,s.top),a.width,a.height))},hu=(e,t)=>rt(xa(e),t),Nd=(e,t)=>{let o=[];return Le(xa(e),s=>{t(s)&&(o=o.concat([s])),o=o.concat(Nd(s,t))}),o},Mr=(e,t)=>Gu(t,e),fh=(e,t,o)=>ii(e,t,o).isSome(),sp=(e,t)=>Zf(e,t).isSome(),rg=(e,t)=>ca(e,t).isSome();class Ma{constructor(t,o){this.node=t,this.rootNode=o,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(t){return this.node=this.findSibling(this.node,"firstChild","nextSibling",t),this.node}prev(t){return this.node=this.findSibling(this.node,"lastChild","previousSibling",t),this.node}prev2(t){return this.node=this.findPreviousNode(this.node,t),this.node}findSibling(t,o,s,a){if(t){if(!a&&t[o])return t[o];if(t!==this.rootNode){let c=t[s];if(c)return c;for(let d=t.parentNode;d&&d!==this.rootNode;d=d.parentNode)if(c=d[s],c)return c}}}findPreviousNode(t,o){if(t){const s=t.previousSibling;if(this.rootNode&&s===this.rootNode)return;if(s){if(!o){for(let c=s.lastChild;c;c=c.lastChild)if(!c.lastChild)return c}return s}const a=t.parentNode;if(a&&a!==this.rootNode)return a}}}const rr="\uFEFF",da=" ",Qc=e=>e===rr,Kf=e=>e.replace(/\uFEFF/g,""),Gf=/^[ \t\r\n]*$/,Fi=e=>Gf.test(e),di=e=>{for(const t of e)if(!Qc(t))return!1;return!0},Yf=e=>" \f \v".indexOf(e)!==-1,Ac=e=>e===` -`||e==="\r",M1=(e,t)=>t=0?Ac(e[t]):!1,rp=(e,t=4,o=!0,s=!0)=>{const a=Oa(" ",t),c=e.replace(/\t/g,a);return ko(c,(h,_)=>Yf(_)||_===da?h.pcIsSpace||h.str===""&&o||h.str.length===c.length-1&&s||M1(c,h.str.length+1)?{pcIsSpace:!1,str:h.str+da}:{pcIsSpace:!0,str:h.str+" "}:{pcIsSpace:Ac(_),str:h.str+_},{pcIsSpace:!1,str:""}).str},ed=e=>t=>!!t&&t.nodeType===e,Dd=e=>!!e&&!Object.getPrototypeOf(e),no=ed(1),ec=e=>no(e)&&ai(ye.fromDom(e)),Xf=e=>no(e)&&e.namespaceURI==="http://www.w3.org/2000/svg",Rd=e=>{const t=e.toLowerCase();return o=>Fe(o)&&o.nodeName.toLowerCase()===t},ka=e=>{const t=e.map(o=>o.toLowerCase());return o=>{if(o&&o.nodeName){const s=o.nodeName.toLowerCase();return mn(t,s)}return!1}},Dl=(e,t)=>{const o=t.toLowerCase().split(" ");return s=>{if(no(s)){const a=s.ownerDocument.defaultView;if(a)for(let c=0;ct=>no(t)&&t.hasAttribute(e),Md=e=>no(e)&&e.hasAttribute("data-mce-bogus"),ag=e=>no(e)&&e.getAttribute("data-mce-bogus")==="all",tc=e=>no(e)&&e.tagName==="TABLE",Jf=e=>t=>!!(ec(t)&&(t.contentEditable===e||t.getAttribute("data-mce-contenteditable")===e)),Qf=ka(["textarea","input"]),wt=ed(3),ig=ed(4),Bd=ed(7),Qo=ed(8),lo=ed(9),Ld=ed(11),$s=Rd("br"),Rl=Rd("img"),Ml=Jf("true"),Ho=Jf("false"),ef=ka(["td","th"]),qb=ka(["td","th","caption"]),Xe=ka(["video","audio","object","embed"]),lg=Rd("li"),em=Rd("details"),tm=Rd("summary"),tf={skipBogus:!0,includeZwsp:!1,checkRootAsContent:!1},bu=(e,t,o)=>{const s=ye.fromDom(t),a=ye.fromDom(e),c=o.getWhitespaceElements();return fh(a,h=>Ro(c,En(h)),$t(kn,s))},Kb=e=>no(e)&&e.nodeName==="A"&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id")),Pd=(e,t)=>no(e)&&Ro(t.getNonEmptyElements(),e.nodeName),Ss=Qu("data-mce-bookmark"),Oc=e=>Od(ye.fromDom(e)).exists(t=>!js(t)),cg=(e,t,o)=>Fi(e.data)&&!bu(e,t,o),Bl=(e,t,o,s)=>wt(e)&&!cg(e,t,o)&&(!s.includeZwsp||!di(e.data)),yu=(e,t,o,s)=>Gt(s.isContent)&&s.isContent(t)||Pd(t,e)||Ss(t)||Kb(t)||Bl(t,o,e,s)||Ho(t)||Ml(t)&&Oc(t),pl=(e,t,o)=>{const s={...tf,...o};if(s.checkRootAsContent&&yu(e,t,t,s))return!1;let a=t.firstChild,c=0;if(!a)return!0;const d=new Ma(a,t);do{if(s.skipBogus&&no(a)){const h=a.getAttribute("data-mce-bogus");if(h){a=d.next(h==="all");continue}}if(Qo(a)){a=d.next(!0);continue}if($s(a)){c++,a=d.next();continue}if(yu(e,a,t,s))return!1;a=d.next()}while(a);return c<=1},ar=(e,t,o)=>pl(e,t.dom,{checkRootAsContent:!0,...o}),vu=(e,t,o)=>yu(e,t,t,{includeZwsp:tf.includeZwsp,...o}),Er=e=>{let t=e;return{get:()=>t,set:a=>{t=a}}},ap=e=>{const t=Er(j.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(j.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:h=>{o(),t.set(j.some(h))}}},Ll=e=>{const t=Er(j.none()),o=()=>t.get().each(h=>clearInterval(h));return{clear:()=>{o(),t.set(j.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:h=>{o(),t.set(j.some(setInterval(h,e)))}}},Jr=()=>{const e=ap(dt);return{...e,on:o=>e.get().each(o)}},xt=e=>{const t=e.toLowerCase();return t==="svg"?"svg":t==="math"?"math":"html"},_u=e=>xt(e)!=="html",Qr=e=>_u(e.nodeName),Gb=e=>xt(e.nodeName),k=["svg","math"],N=()=>{const e=Jr(),t=()=>e.get().map(Gb).getOr("html");return{track:a=>(Qr(a)?e.set(a):e.get().exists(c=>!c.contains(a))&&e.clear(),t()),current:t,reset:()=>{e.clear()}}},Z="data-mce-block",se=e=>rt(vt(e),t=>!/[A-Z]/.test(t)),Ce=e=>dn(se(e),t=>{const o=CSS.escape(t);return`${o}:`+dn(k,s=>`not(${s} ${o})`).join(":")}).join(","),et=(e,t)=>Fe(t.querySelector(e))?(t.setAttribute(Z,"true"),t.getAttribute("data-mce-selected")==="inline-boundary"&&t.removeAttribute("data-mce-selected"),!0):(t.removeAttribute(Z),!1),Et=(e,t)=>{const o=Ce(e.getTransparentElements()),s=Ce(e.getBlockElements());return rt(t.querySelectorAll(o),a=>et(s,a))},Tt=(e,t,o)=>{var s;const a=o?"lastChild":"firstChild";for(let c=t[a];c;c=c[a])if(pl(e,c,{checkRootAsContent:!0})){(s=c.parentNode)===null||s===void 0||s.removeChild(c);return}},Lo=(e,t,o)=>{const s=document.createRange(),a=t.parentNode;if(a){s.setStartBefore(t),s.setEndBefore(o);const c=s.extractContents();Tt(e,c,!0),s.setStartAfter(o),s.setEndAfter(t);const d=s.extractContents();Tt(e,d,!1),pl(e,c,{checkRootAsContent:!0})||a.insertBefore(c,t),pl(e,o,{checkRootAsContent:!0})||a.insertBefore(o,t),pl(e,d,{checkRootAsContent:!0})||a.insertBefore(d,t),a.removeChild(t)}},co=(e,t,o)=>{const s=e.getBlockElements(),a=ye.fromDom(t),c=h=>En(h)in s,d=h=>kn(h,a);Le(ci(o),h=>{ii(h,c,d).each(_=>{const z=hu(h,I=>c(I)&&!e.isValidChild(En(_),En(I)));if(z.length>0){const I=Od(_);Le(z,$=>{ii($,c,d).each(V=>{Lo(e,V.dom,$.dom)})}),I.each($=>Et(e,$.dom))}})})},_n=(e,t,o)=>{Le([...o,...zc(e,t)?[t]:[]],s=>Le(Mr(ye.fromDom(s),s.nodeName.toLowerCase()),a=>{ip(e,a.dom)&&wa(a)}))},Ko=(e,t)=>{const o=Et(e,t);co(e,t,o),_n(e,t,o)},Qn=(e,t)=>{if(nc(e,t)){const o=Ce(e.getBlockElements());et(o,t)}},ea=(e,t,o)=>{const s=c=>kn(c,ye.fromDom(t)),a=Yu(ye.fromDom(o),s);ra(a,a.length-2).filter(cr).fold(()=>Ko(e,t),c=>Ko(e,c.dom))},qs=e=>e.hasAttribute(Z),oc=(e,t)=>Ro(e.getTransparentElements(),t),nc=(e,t)=>no(t)&&oc(e,t.nodeName),zc=(e,t)=>nc(e,t)&&qs(t),ip=(e,t)=>nc(e,t)&&!qs(t),td=(e,t)=>t.type===1&&oc(e,t.name)&&ft(t.attr(Z)),of=_t().browser,om=e=>On(e,cr),xu=e=>of.isFirefox()&&En(e)==="table"?om(xa(e)).filter(t=>En(t)==="caption").bind(t=>om(fu(t)).map(o=>{const s=o.dom.offsetTop,a=t.dom.offsetTop,c=t.dom.offsetHeight;return s<=a?-c:0})).getOr(0):0,nf=(e,t)=>e.children&&mn(e.children,t),mh=(e,t,o)=>{let s=0,a=0;const c=e.ownerDocument;if(o=o||e,t){if(o===e&&t.getBoundingClientRect&&ur(ye.fromDom(e),"position")==="static"){const h=t.getBoundingClientRect();return s=h.left+(c.documentElement.scrollLeft||e.scrollLeft)-c.documentElement.clientLeft,a=h.top+(c.documentElement.scrollTop||e.scrollTop)-c.documentElement.clientTop,{x:s,y:a}}let d=t;for(;d&&d!==o&&d.nodeType&&!nf(d,o);){const h=d;s+=h.offsetLeft||0,a+=h.offsetTop||0,d=h.offsetParent}for(d=t.parentNode;d&&d!==o&&d.nodeType&&!nf(d,o);)s-=d.scrollLeft||0,a-=d.scrollTop||0,d=d.parentNode;a+=xu(ye.fromDom(t))}return{x:s,y:a}},wu=(e,t={})=>{let o=0;const s={},a=ye.fromDom(e),c=fl(a),d=ke=>{t.referrerPolicy=ke},h=ke=>{t.contentCssCors=ke},_=ke=>{fr(mu(a),ke)},z=ke=>{const Oe=mu(a);nt(Oe,"#"+ke).each(Jn)},I=ke=>Gn(s,ke).getOrThunk(()=>({id:"mce-u"+o++,passed:[],failed:[],count:0})),$=ke=>new Promise((Oe,Te)=>{let Pe;const ht=zt._addCacheSuffix(ke),Mt=I(ht);s[ht]=Mt,Mt.count++;const Yt=(to,bo)=>{Le(to,cn),Mt.status=bo,Mt.passed=[],Mt.failed=[],Pe&&(Pe.onload=null,Pe.onerror=null,Pe=null)},Qe=()=>Yt(Mt.passed,2),Ve=()=>Yt(Mt.failed,3);if(Oe&&Mt.passed.push(Oe),Te&&Mt.failed.push(Te),Mt.status===1)return;if(Mt.status===2){Qe();return}if(Mt.status===3){Ve();return}Mt.status=1;const mt=ye.fromTag("link",c.dom);Ha(mt,{rel:"stylesheet",type:"text/css",id:Mt.id}),t.contentCssCors&&Rr(mt,"crossOrigin","anonymous"),t.referrerPolicy&&Rr(mt,"referrerpolicy",t.referrerPolicy),Pe=mt.dom,Pe.onload=Qe,Pe.onerror=Ve,_(mt),Rr(mt,"href",ht)}),V=(ke,Oe)=>{const Te=I(ke);s[ke]=Te,Te.count++;const Pe=ye.fromTag("style",c.dom);Ha(Pe,{rel:"stylesheet",type:"text/css",id:Te.id}),Pe.dom.innerHTML=Oe,_(Pe)},ee=ke=>Promise.allSettled(dn(ke,Te=>$(Te).then(Ge(Te)))).then(Te=>{const Pe=yt(Te,ht=>ht.status==="fulfilled");return Pe.fail.length>0?Promise.reject(dn(Pe.fail,ht=>ht.reason)):dn(Pe.pass,ht=>ht.value)}),le=ke=>{const Oe=zt._addCacheSuffix(ke);Gn(s,Oe).each(Te=>{--Te.count===0&&(delete s[Oe],z(Te.id))})};return{load:$,loadRawCss:V,loadAll:ee,unload:le,unloadRawCss:ke=>{Gn(s,ke).each(Oe=>{--Oe.count===0&&(delete s[ke],z(Oe.id))})},unloadAll:ke=>{Le(ke,Oe=>{le(Oe)})},_setReferrerPolicy:d,_setContentCssCors:h}},Ks=(()=>{const e=new WeakMap;return{forElement:(o,s)=>{const c=Xl(o).dom;return j.from(e.get(c)).getOrThunk(()=>{const d=wu(c,s);return e.set(c,d),d})}}})(),qa=e=>e.nodeName.toLowerCase()==="span",Qi=(e,t)=>Fe(e)&&(vu(t,e)||t.isInline(e.nodeName.toLowerCase())),ph=(e,t,o)=>{const s=new Ma(e,t).prev(!1),a=new Ma(e,t).next(!1),c=ln(s)||Qi(s,o),d=ln(a)||Qi(a,o);return c&&d},lp=e=>qa(e)&&e.getAttribute("data-mce-type")==="bookmark",nm=(e,t,o)=>wt(e)&&e.data.length>0&&ph(e,t,o),sm=e=>no(e)?e.childNodes.length>0:!1,gh=e=>Ld(e)||lo(e),dg=(e,t,o,s)=>{var a;const c=s||t;if(no(t)&&lp(t))return t;const d=t.childNodes;for(let h=d.length-1;h>=0;h--)dg(e,d[h],o,c);if(no(t)){const h=t.childNodes;h.length===1&&lp(h[0])&&((a=t.parentNode)===null||a===void 0||a.insertBefore(h[0],t))}return!gh(t)&&!vu(o,t)&&!sm(t)&&!nm(t,c,o)&&e.remove(t),t},B1=zt.makeMap,hh=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,bh=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rm=/[<>&\"\']/g,ug=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,L1={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:"Ÿ"},ku={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},cp={"<":"<",">":">","&":"&",""":'"',"'":"'"},dp=e=>{const t=ye.fromTag("div").dom;return t.innerHTML=e,t.textContent||t.innerText||e},Cu=(e,t)=>{const o={};if(e){const s=e.split(",");t=t||10;for(let a=0;ae.replace(t?hh:bh,o=>ku[o]||o),Fk=e=>(""+e).replace(rm,t=>ku[t]||t),vh=(e,t)=>e.replace(t?hh:bh,o=>o.length>1?"&#"+((o.charCodeAt(0)-55296)*1024+(o.charCodeAt(1)-56320)+65536)+";":ku[o]||"&#"+o.charCodeAt(0)+";"),Nc=(e,t,o)=>{const s=o||sf;return e.replace(t?hh:bh,a=>ku[a]||s[a]||a)},up={encodeRaw:yh,encodeAllRaw:Fk,encodeNumeric:vh,encodeNamed:Nc,getEncodeFunc:(e,t)=>{const o=Cu(t)||sf,s=(d,h)=>d.replace(h?hh:bh,_=>ku[_]!==void 0?ku[_]:o[_]!==void 0?o[_]:_.length>1?"&#"+((_.charCodeAt(0)-55296)*1024+(_.charCodeAt(1)-56320)+65536)+";":"&#"+_.charCodeAt(0)+";"),a=(d,h)=>Nc(d,h,o),c=B1(e.replace(/\+/g,","));return c.named&&c.numeric?s:c.named?t?a:Nc:c.numeric?vh:yh},decode:e=>e.replace(ug,(t,o)=>o?(o.charAt(0).toLowerCase()==="x"?o=parseInt(o.substr(1),16):o=parseInt(o,10),o>65535?(o-=65536,String.fromCharCode(55296+(o>>10),56320+(o&1023))):L1[o]||String.fromCharCode(o)):cp[t]||sf[t]||dp(t))},Ka=(e,t)=>(e=zt.trim(e),e?e.split(t||" "):[]),fp=e=>new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$"),mp=e=>ue(e)&&e.source&&Object.prototype.toString.call(e)==="[object RegExp]",Yb=e=>{const t=o=>ve(o)?dn(o,t):mp(o)?new RegExp(o.source,o.flags):ue(o)?Mi(o,t):o;return t(e)},Dn=e=>{const t=/^(~)?(.+)$/;return Ln(Ka(e,","),o=>{const s=t.exec(o);if(s){const c=s[1]==="~"?"span":"div",d=s[2];return[{cloneName:c,name:d}]}else return[]})},el=e=>Object.freeze(["id","accesskey","class","dir","lang","style","tabindex","title","role",...e!=="html4"?["contenteditable","contextmenu","draggable","dropzone","hidden","spellcheck","translate","itemprop","itemscope","itemtype"]:[],...e!=="html5-strict"?["xml:lang"]:[]]),Id=e=>{let t,o;t="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",o="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",e!=="html4"&&(t+=" article aside details dialog figure main header footer hgroup section nav "+"a ins del canvas map",o+=" audio canvas command data datalist mark meter output picture progress time wbr video ruby bdi keygen svg"),e!=="html5-strict"&&(o=[o,"acronym applet basefont big font strike tt"].join(" "),t=[t,"center dir isindex noframes"].join(" "));const s=[t,o].join(" ");return{blockContent:t,phrasingContent:o,flowContent:s}},fi=e=>{const{blockContent:t,phrasingContent:o,flowContent:s}=Id(e),a=c=>Object.freeze(c.split(" "));return Object.freeze({blockContent:a(t),phrasingContent:a(o),flowContent:a(s)})},Es={html4:si(()=>fi("html4")),html5:si(()=>fi("html5")),"html5-strict":si(()=>fi("html5-strict"))},_h=(e,t)=>{const{blockContent:o,phrasingContent:s,flowContent:a}=Es[e]();return t==="blocks"?j.some(o):t==="phrasing"?j.some(s):t==="flow"?j.some(a):j.none()},k_=e=>{const t=el(e),{phrasingContent:o,flowContent:s}=Id(e),a={},c=(_,z,I)=>{a[_]={attributes:Is(z,Ge({})),attributesOrder:z,children:Is(I,Ge({}))}},d=(_,z="",I="")=>{const $=Ka(I),V=Ka(_);let ee=V.length;const le=[...t,...Ka(z)];for(;ee--;)c(V[ee],le.slice(),$)},h=(_,z)=>{const I=Ka(_),$=Ka(z);let V=I.length;for(;V--;){const ee=a[I[V]];for(let le=0,oe=$.length;le{d(I,"",o)}),Le(Ka("center dir isindex noframes"),I=>{d(I,"",s)})),d("html","manifest","head body"),d("head","","base command link meta noscript script style title"),d("title hr noscript br"),d("base","href target"),d("link","href rel media hreflang type sizes hreflang"),d("meta","name http-equiv content charset"),d("style","media type scoped"),d("script","src async defer type charset"),d("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",s),d("dd div","",s),d("address dt caption","",e==="html4"?o:s),d("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","",o),d("blockquote","cite",s),d("ol","reversed start type","li"),d("ul","","li"),d("li","value",s),d("dl","","dt dd"),d("a","href target rel media hreflang type",e==="html4"?o:s),d("q","cite",o),d("ins del","cite datetime",s),d("img","src sizes srcset alt usemap ismap width height"),d("iframe","src name width height",s),d("embed","src type width height"),d("object","data type typemustmatch name usemap form width height",[s,"param"].join(" ")),d("param","name value"),d("map","name",[s,"area"].join(" ")),d("area","alt coords shape href target rel media hreflang type"),d("table","border","caption colgroup thead tfoot tbody tr"+(e==="html4"?" col":"")),d("colgroup","span","col"),d("col","span"),d("tbody thead tfoot","","tr"),d("tr","","td th"),d("td","colspan rowspan headers",s),d("th","colspan rowspan headers scope abbr",s),d("form","accept-charset action autocomplete enctype method name novalidate target",s),d("fieldset","disabled form name",[s,"legend"].join(" ")),d("label","form for",o),d("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"),d("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value",e==="html4"?s:o),d("select","disabled form multiple name required size","option optgroup"),d("optgroup","disabled label","option"),d("option","disabled label selected value"),d("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),d("menu","type label",[s,"li"].join(" ")),d("noscript","",s),e!=="html4"&&(d("wbr"),d("ruby","",[o,"rt rp"].join(" ")),d("figcaption","",s),d("mark rt rp bdi","",o),d("summary","",[o,"h1 h2 h3 h4 h5 h6"].join(" ")),d("canvas","width height",s),d("data","value",o),d("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[s,"track source"].join(" ")),d("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[s,"track source"].join(" ")),d("picture","","img source"),d("source","src srcset type media sizes"),d("track","kind src srclang label default"),d("datalist","",[o,"option"].join(" ")),d("article section nav aside main header footer","",s),d("hgroup","","h1 h2 h3 h4 h5 h6"),d("figure","",[s,"figcaption"].join(" ")),d("time","datetime",o),d("dialog","open",s),d("command","type label icon disabled checked radiogroup command"),d("output","for form name",o),d("progress","value max",o),d("meter","value min max low high optimum",o),d("details","open",[s,"summary"].join(" ")),d("keygen","autofocus challenge disabled form keytype name"),c("svg","id tabindex lang xml:space class style x y width height viewBox preserveAspectRatio zoomAndPan transform".split(" "),[])),e!=="html5-strict"&&(h("script","language xml:space"),h("style","xml:space"),h("object","declare classid code codebase codetype archive standby align border hspace vspace"),h("embed","align name hspace vspace"),h("param","valuetype type"),h("a","charset name rev shape coords"),h("br","clear"),h("applet","codebase archive code object alt name width height align hspace vspace"),h("img","name longdesc align border hspace vspace"),h("iframe","longdesc frameborder marginwidth marginheight scrolling align"),h("font basefont","size color face"),h("input","usemap align"),h("select"),h("textarea"),h("h1 h2 h3 h4 h5 h6 div p legend caption","align"),h("ul","type compact"),h("li","type"),h("ol dl menu dir","compact"),h("pre","width xml:space"),h("hr","align noshade size width"),h("isindex","prompt"),h("table","summary width frame rules cellspacing cellpadding align bgcolor"),h("col","width align char charoff valign"),h("colgroup","width align char charoff valign"),h("thead","align char charoff valign"),h("tr","align char charoff valign bgcolor"),h("th","axis align char charoff valign nowrap bgcolor width height"),h("form","accept"),h("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),h("tfoot","align char charoff valign"),h("tbody","align char charoff valign"),h("area","nohref"),h("body","background bgcolor text link vlink alink")),e!=="html4"&&(h("input button select textarea","autofocus"),h("input textarea","placeholder"),h("a","download"),h("link script img","crossorigin"),h("img","loading"),h("iframe","sandbox seamless allow allowfullscreen loading referrerpolicy")),e!=="html4"&&Le([a.video,a.audio],_=>{delete _.children.audio,delete _.children.video}),Le(Ka("a form meter progress dfn"),_=>{a[_]&&delete a[_].children[_]}),delete a.caption.children.table,delete a.script,a},$k=e=>e==="-"?"remove":"add",Gs=e=>{const t=/^(@?)([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 j.from(t.exec(e)).map(o=>({preset:o[1]==="@",name:o[2]}))},Xb=e=>{const t=/^([+\-]?)([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 Ln(Ka(e,","),o=>{const s=t.exec(o);if(s){const a=s[1],c=a?$k(a):"replace",d=s[2],h=Ln(Ka(s[3],"|"),_=>Gs(_).toArray());return[{operation:c,name:d,validChildren:h}]}else return[]})},I1=(e,t)=>{const o=/^([!\-])?(\w+[\\:]:\w+|[^=~<]+)?(?:([=~<])(.*))?$/,s=/[*?+]/,{attributes:a,attributesOrder:c}=t;return Le(Ka(e,"|"),d=>{const h=o.exec(d);if(h){const _={},z=h[1],I=h[2].replace(/[\\:]:/g,":"),$=h[3],V=h[4];if(z==="!"&&(t.attributesRequired=t.attributesRequired||[],t.attributesRequired.push(I),_.required=!0),z==="-"){delete a[I],c.splice(zt.inArray(c,I),1);return}if($&&($==="="?(t.attributesDefault=t.attributesDefault||[],t.attributesDefault.push({name:I,value:V}),_.defaultValue=V):$==="~"?(t.attributesForced=t.attributesForced||[],t.attributesForced.push({name:I,value:V}),_.forcedValue=V):$==="<"&&(_.validValues=zt.makeMap(V,"?"))),s.test(I)){const ee=_;t.attributePatterns=t.attributePatterns||[],ee.pattern=fp(I),t.attributePatterns.push(ee)}else a[I]||c.push(I),a[I]=_}})},am=(e,t)=>{nn(e.attributes,(o,s)=>{t.attributes[s]=o}),t.attributesOrder.push(...e.attributesOrder)},Dc=(e,t)=>{const o=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/;return Ln(Ka(t,","),s=>{const a=o.exec(s);if(a){const c=a[1],d=a[2],h=a[3],_=a[4],z=a[5],I={attributes:{},attributesOrder:[]};if(e.each($=>am($,I)),c==="#"?I.paddEmpty=!0:c==="-"&&(I.removeEmpty=!0),_==="!"&&(I.removeEmptyAttrs=!0),z&&I1(z,I),h&&(I.outputName=d),d==="@")if(e.isNone())e=j.some(I);else return[];return[h?{name:d,element:I,aliasName:h}:{name:d,element:I}]}else return[]})},fg={},Xt=zt.makeMap,od=zt.each,F1=zt.extend,Jb=zt.explode,mg=(e,t={})=>{const o=Xt(e," ",Xt(e.toUpperCase()," "));return F1(o,t)},Qb=e=>mg("td th li dt dd figcaption caption details summary",e.getTextBlockElements()),pp=(e,t)=>{if(e){const o={};return ft(e)&&(e={"*":e}),od(e,(s,a)=>{o[a]=o[a.toUpperCase()]=t==="map"?Xt(s,/[, ]/):Jb(s,/[, ]/)}),o}else return},Rc=(e={})=>{var t;const o={},s={};let a=[];const c={},d={},h=(_o,Un,zr)=>{const na=e[_o];if(na)return Xt(na,/[, ]/,Xt(na.toUpperCase(),/[, ]/));{let Fa=fg[_o];return Fa||(Fa=mg(Un,zr),fg[_o]=Fa),Fa}},_=(t=e.schema)!==null&&t!==void 0?t:"html5",z=k_(_);e.verify_html===!1&&(e.valid_elements="*[*]");const I=pp(e.valid_styles),$=pp(e.invalid_styles,"map"),V=pp(e.valid_classes,"map"),ee=h("whitespace_elements","pre script noscript style textarea video audio iframe object code"),le=h("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),oe=h("void_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),fe=h("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls allowfullscreen"),ke="td th iframe video audio object script code",Oe=h("non_empty_elements",ke+" pre svg textarea summary",oe),Te=h("move_caret_before_on_enter_elements",ke+" table",oe),Pe="h1 h2 h3 h4 h5 h6",ht=h("text_block_elements",Pe+" p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),Mt=h("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",ht),Yt=h("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp"),Qe=h("transparent_elements","a ins del canvas map"),Ve=h("wrap_block_elements","pre "+Pe);od("script noscript iframe noframes noembed title style textarea xmp plaintext".split(" "),_o=>{d[_o]=new RegExp("]*>","gi")});const mt=_o=>{const Un=j.from(o["@"]),zr=/[*?+]/;Le(Dc(Un,_o??""),({name:na,element:Fa,aliasName:Wi})=>{if(Wi&&(o[Wi]=Fa),zr.test(na)){const Ta=Fa;Ta.pattern=fp(na),a.push(Ta)}else o[na]=Fa})},to=_o=>{a=[],Le(vt(o),Un=>{delete o[Un]}),mt(_o)},bo=(_o,Un)=>{var zr,na;delete fg.text_block_elements,delete fg.block_elements;const Fa=Un.extends?!ou(Un.extends):!1,Wi=Un.extends;if(s[_o]=Wi?s[Wi]:{},c[_o]=Wi??_o,Oe[_o.toUpperCase()]={},Oe[_o]={},Fa||(Mt[_o.toUpperCase()]={},Mt[_o]={}),Wi&&!o[_o]&&o[Wi]){const Ta=Yb(o[Wi]);delete Ta.removeEmptyAttrs,delete Ta.removeEmpty,o[_o]=Ta}else o[_o]={attributesOrder:[],attributes:{}};if(ve(Un.attributes)){const Ta=mc=>{Aa.attributesOrder.push(mc),Aa.attributes[mc]={}},Aa=(zr=o[_o])!==null&&zr!==void 0?zr:{};delete Aa.attributesDefault,delete Aa.attributesForced,delete Aa.attributePatterns,delete Aa.attributesRequired,Aa.attributesOrder=[],Aa.attributes={},Le(Un.attributes,mc=>{const jm=el(_);Gs(mc).each(({preset:Um,name:Zm})=>{Um?Zm==="global"&&Le(jm,Ta):Ta(Zm)})}),o[_o]=Aa}if(bn(Un.padEmpty)){const Ta=(na=o[_o])!==null&&na!==void 0?na:{};Ta.paddEmpty=Un.padEmpty,o[_o]=Ta}if(ve(Un.children)){const Ta={},Aa=jm=>{Ta[jm]={}},mc=jm=>{_h(_,jm).each(Um=>{Le(Um,Aa)})};Le(Un.children,jm=>{Gs(jm).each(({preset:Um,name:Zm})=>{Um?mc(Zm):Aa(Zm)})}),s[_o]=Ta}Wi&&nn(s,(Ta,Aa)=>{Ta[Wi]&&(s[Aa]=Ta=F1({},s[Aa]),Ta[_o]=Ta[Wi])})},gn=_o=>{Le(Dn(_o??""),({name:Un,cloneName:zr})=>{bo(Un,{extends:zr})})},Cn=_o=>{ue(_o)?nn(_o,(Un,zr)=>bo(zr,Un)):ft(_o)&&gn(_o)},ds=_o=>{Le(Xb(_o??""),({operation:Un,name:zr,validChildren:na})=>{const Fa=Un==="replace"?{"#comment":{}}:s[zr],Wi=Aa=>{Un==="remove"?delete Fa[Aa]:Fa[Aa]={}},Ta=Aa=>{_h(_,Aa).each(mc=>{Le(mc,Wi)})};Le(na,({preset:Aa,name:mc})=>{Aa?Ta(mc):Wi(mc)}),s[zr]=Fa})},hs=_o=>{const Un=o[_o];if(Un)return Un;let zr=a.length;for(;zr--;){const na=a[zr];if(na.pattern.test(_o))return na}},qr=()=>{e.valid_elements?(to(e.valid_elements),od(z,(_o,Un)=>{s[Un]=_o.children})):(od(z,(_o,Un)=>{o[Un]={attributes:_o.attributes,attributesOrder:_o.attributesOrder},s[Un]=_o.children}),od(Ka("strong/b em/i"),_o=>{const Un=Ka(_o,"/");o[Un[1]].outputName=Un[0]}),od(Yt,(_o,Un)=>{o[Un]&&(e.padd_empty_block_inline_children&&(o[Un].paddInEmptyBlock=!0),o[Un].removeEmpty=!0)}),od(Ka("ol ul blockquote a table tbody"),_o=>{o[_o]&&(o[_o].removeEmpty=!0)}),od(Ka("p h1 h2 h3 h4 h5 h6 th td pre div address caption li summary"),_o=>{o[_o]&&(o[_o].paddEmpty=!0)}),od(Ka("span"),_o=>{o[_o].removeEmptyAttrs=!0})),delete o.svg,Cn(e.custom_elements),ds(e.valid_children),mt(e.extended_valid_elements),ds("+ol[ul|ol],+ul[ul|ol]"),od({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"},(_o,Un)=>{o[Un]&&(o[Un].parentsRequired=Ka(_o))}),e.invalid_elements&&od(Jb(e.invalid_elements),_o=>{o[_o]&&delete o[_o]}),hs("span")||mt("span[!data-mce-type|*]")},ll=Ge(I),Os=Ge($),Ft=Ge(V),go=Ge(fe),ts=Ge(Mt),jt=Ge(ht),Eo=Ge(Yt),wn=Ge(Object.seal(oe)),qt=Ge(le),hn=Ge(Oe),Tn=Ge(Te),hi=Ge(ee),gs=Ge(Qe),ti=Ge(Ve),Nf=Ge(Object.seal(d)),Jp=(_o,Un)=>{const zr=s[_o.toLowerCase()];return!!(zr&&zr[Un.toLowerCase()])},fc=(_o,Un)=>{const zr=hs(_o);if(zr)if(Un){if(zr.attributes[Un])return!0;const na=zr.attributePatterns;if(na){let Fa=na.length;for(;Fa--;)if(na[Fa].pattern.test(Un))return!0}}else return!0;return!1},ou=_o=>Ro(ts(),_o),Df=_o=>!vs(_o,"#")&&fc(_o)&&!ou(_o),nu=_o=>Ro(ti(),_o)||Df(_o),Rf=Ge(c);return qr(),{type:_,children:s,elements:o,getValidStyles:ll,getValidClasses:Ft,getBlockElements:ts,getInvalidStyles:Os,getVoidElements:wn,getTextBlockElements:jt,getTextInlineElements:Eo,getBoolAttrs:go,getElementRule:hs,getSelfClosingElements:qt,getNonEmptyElements:hn,getMoveCaretBeforeOnEnterElements:Tn,getWhitespaceElements:hi,getTransparentElements:gs,getSpecialElements:Nf,isValidChild:Jp,isValid:fc,isBlock:ou,isInline:Df,isWrapper:nu,getCustomElements:Rf,addValidElements:mt,setValidElements:to,addCustomElements:Cn,addValidChildren:ds}},Hk=e=>({value:ey(e)}),ey=e=>wi(e,"#").toUpperCase(),$1=e=>{const t=e.toString(16);return(t.length===1?"0"+t:t).toUpperCase()},ty=e=>{const t=$1(e.red)+$1(e.green)+$1(e.blue);return Hk(t)},H1=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,V1=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,oy=(e,t,o,s)=>({red:e,green:t,blue:o,alpha:s}),j1=(e,t,o,s)=>{const a=parseInt(e,10),c=parseInt(t,10),d=parseInt(o,10),h=parseFloat(s);return oy(a,c,d,h)},U1=e=>H1.test(e)?"rgb":V1.test(e)?"rgba":"other",C_=e=>{const t=H1.exec(e);if(t!==null)return j.some(j1(t[1],t[2],t[3],"1"));const o=V1.exec(e);return o!==null?j.some(j1(o[1],o[2],o[3],o[4])):j.none()},Vk=e=>`rgba(${e.red},${e.green},${e.blue},${e.alpha})`,xh=e=>C_(e).map(ty).map(t=>"#"+t.value).getOr(e),Z1=(e={},t)=>{const o=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,s=/\s*([^:]+):\s*([^;]+);?/g,a=/\s+$/,c={};let d,h;const _=rr;t&&(d=t.getValidStyles(),h=t.getInvalidStyles());const z=(`\\" \\' \\; \\: ; : `+_).split(" ");for(let $=0;${const V={};let ee=!1;const le=e.url_converter,oe=e.url_converter_scope||I,fe=(Qe,Ve,mt)=>{const to=V[Qe+"-top"+Ve];if(!to)return;const bo=V[Qe+"-right"+Ve];if(!bo)return;const gn=V[Qe+"-bottom"+Ve];if(!gn)return;const Cn=V[Qe+"-left"+Ve];if(!Cn)return;const ds=[to,bo,gn,Cn];let hs=ds.length-1;for(;hs--&&ds[hs]===ds[hs+1];);hs>-1&&mt||(V[Qe+Ve]=hs===-1?ds[0]:ds.join(" "),delete V[Qe+"-top"+Ve],delete V[Qe+"-right"+Ve],delete V[Qe+"-bottom"+Ve],delete V[Qe+"-left"+Ve])},ke=Qe=>{const Ve=V[Qe];if(!Ve)return;const mt=Ve.indexOf(",")>-1?[Ve]:Ve.split(" ");let to=mt.length;for(;to--;)if(mt[to]!==mt[0])return!1;return V[Qe]=mt[0],!0},Oe=(Qe,Ve,mt,to)=>{ke(Ve)&&ke(mt)&&ke(to)&&(V[Qe]=V[Ve]+" "+V[mt]+" "+V[to],delete V[Ve],delete V[mt],delete V[to])},Te=Qe=>(ee=!0,c[Qe]),Pe=(Qe,Ve)=>(ee&&(Qe=Qe.replace(/\uFEFF[0-9]/g,mt=>c[mt])),Ve||(Qe=Qe.replace(/\\([\'\";:])/g,"$1")),Qe),ht=Qe=>String.fromCharCode(parseInt(Qe.slice(1),16)),Mt=Qe=>Qe.replace(/\\[0-9a-f]+/gi,ht),Yt=(Qe,Ve,mt,to,bo,gn)=>{if(bo=bo||gn,bo)return bo=Pe(bo),"'"+bo.replace(/\'/g,"\\'")+"'";if(Ve=Pe(Ve||mt||to||""),!e.allow_script_urls){const Cn=Ve.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(Cn)||!e.allow_svg_data_urls&&/^data:image\/svg/i.test(Cn))return""}return le&&(Ve=le.call(oe,Ve,"style")),"url('"+Ve.replace(/\'/g,"\\'")+"')"};if($){$=$.replace(/[\u0000-\u001F]/g,""),$=$.replace(/\\[\"\';:\uFEFF]/g,Te).replace(/\"[^\"]+\"|\'[^\']+\'/g,Ve=>Ve.replace(/[;:]/g,Te));let Qe;for(;Qe=s.exec($);){s.lastIndex=Qe.index+Qe[0].length;let Ve=Qe[1].replace(a,"").toLowerCase(),mt=Qe[2].replace(a,"");if(Ve&&mt){if(Ve=Mt(Ve),mt=Mt(mt),Ve.indexOf(_)!==-1||Ve.indexOf('"')!==-1||!e.allow_script_urls&&(Ve==="behavior"||/expression\s*\(|\/\*|\*\//.test(mt)))continue;Ve==="font-weight"&&mt==="700"?mt="bold":(Ve==="color"||Ve==="background-color")&&(mt=mt.toLowerCase()),U1(mt)==="rgb"&&C_(mt).each(to=>{mt=xh(Vk(to)).toLowerCase()}),mt=mt.replace(o,Yt),V[Ve]=ee?Pe(mt,!0):mt}}fe("border","",!0),fe("border","-width"),fe("border","-color"),fe("border","-style"),fe("padding",""),fe("margin",""),Oe("border","border-width","border-style","border-color"),V.border==="medium none"&&delete V.border,V["border-image"]==="none"&&delete V["border-image"]}return V},serialize:($,V)=>{let ee="";const le=(fe,ke)=>{const Oe=ke[fe];if(Oe)for(let Te=0,Pe=Oe.length;Te0?" ":"")+ht+": "+Mt+";")}},oe=(fe,ke)=>{if(!h||!ke)return!0;let Oe=h["*"];return Oe&&Oe[fe]?!1:(Oe=h[ke],!(Oe&&Oe[fe]))};return V&&d?(le("*",d),le(V,d)):nn($,(fe,ke)=>{fe&&oe(ke,V)&&(ee+=(ee.length>0?" ":"")+ke+": "+fe+";")}),ee}};return I},gp={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},jk=e=>e instanceof Event||Gt(e.initEvent),Uk=e=>e.isDefaultPrevented===zo||e.isDefaultPrevented===fn,rf=e=>uo(e.preventDefault)||jk(e),im=(e,t)=>{const o=t??{};for(const s in e)Ro(gp,s)||(o[s]=e[s]);return Fe(e.composedPath)&&(o.composedPath=()=>e.composedPath()),Fe(e.getModifierState)&&(o.getModifierState=s=>e.getModifierState(s)),Fe(e.getTargetRanges)&&(o.getTargetRanges=()=>e.getTargetRanges()),o},ny=(e,t,o,s)=>{var a;const c=im(t,s);return c.type=e,uo(c.target)&&(c.target=(a=c.srcElement)!==null&&a!==void 0?a:o),rf(t)&&(c.preventDefault=()=>{c.defaultPrevented=!0,c.isDefaultPrevented=zo,Gt(t.preventDefault)&&t.preventDefault()},c.stopPropagation=()=>{c.cancelBubble=!0,c.isPropagationStopped=zo,Gt(t.stopPropagation)&&t.stopPropagation()},c.stopImmediatePropagation=()=>{c.isImmediatePropagationStopped=zo,c.stopPropagation()},Uk(c)||(c.isDefaultPrevented=c.defaultPrevented===!0?zo:fn,c.isPropagationStopped=c.cancelBubble===!0?zo:fn,c.isImmediatePropagationStopped=fn)),c},S_="mce-data-",W1=/^(?:mouse|contextmenu)|click/,wh=(e,t,o,s)=>{e.addEventListener(t,o,s||!1)},Su=(e,t,o,s)=>{e.removeEventListener(t,o,s||!1)},sy=e=>Fe(e)&&W1.test(e.type),ta=(e,t)=>{const o=ny(e.type,e,document,t);if(sy(e)&&ln(e.pageX)&&!ln(e.clientX)){const s=o.target.ownerDocument||document,a=s.documentElement,c=s.body,d=o;d.pageX=e.clientX+(a&&a.scrollLeft||c&&c.scrollLeft||0)-(a&&a.clientLeft||c&&c.clientLeft||0),d.pageY=e.clientY+(a&&a.scrollTop||c&&c.scrollTop||0)-(a&&a.clientTop||c&&c.clientTop||0)}return o},wr=(e,t,o)=>{const s=e.document,a={type:"ready"};if(o.domLoaded){t(a);return}const c=()=>s.readyState==="complete"||s.readyState==="interactive"&&s.body,d=()=>{Su(e,"DOMContentLoaded",d),Su(e,"load",d),o.domLoaded||(o.domLoaded=!0,t(a)),e=null};c()?d():wh(e,"DOMContentLoaded",d),o.domLoaded||wh(e,"load",d)};class af{constructor(){this.domLoaded=!1,this.events={},this.count=1,this.expando=S_+(+new Date).toString(32),this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}bind(t,o,s,a){const c=this;let d;const h=window,_=V=>{c.executeHandlers(ta(V||h.event),z)};if(!t||wt(t)||Qo(t))return s;let z;t[c.expando]?z=t[c.expando]:(z=c.count++,t[c.expando]=z,c.events[z]={}),a=a||t;const I=o.split(" ");let $=I.length;for(;$--;){let V=I[$],ee=_,le=!1,oe=!1;if(V==="DOMContentLoaded"&&(V="ready"),c.domLoaded&&V==="ready"&&t.readyState==="complete"){s.call(a,ta({type:V}));continue}!c.hasFocusIn&&(V==="focusin"||V==="focusout")&&(le=!0,oe=V==="focusin"?"focus":"blur",ee=fe=>{const ke=ta(fe||h.event);ke.type=ke.type==="focus"?"focusin":"focusout",c.executeHandlers(ke,z)}),d=c.events[z][V],d?V==="ready"&&c.domLoaded?s(ta({type:V})):d.push({func:s,scope:a}):(c.events[z][V]=d=[{func:s,scope:a}],d.fakeName=oe,d.capture=le,d.nativeHandler=ee,V==="ready"?wr(t,ee,c):wh(t,oe||V,ee,le))}return t=d=null,s}unbind(t,o,s){if(!t||wt(t)||Qo(t))return this;const a=t[this.expando];if(a){let c=this.events[a];if(o){const d=o.split(" ");let h=d.length;for(;h--;){const _=d[h],z=c[_];if(z){if(s){let I=z.length;for(;I--;)if(z[I].func===s){const $=z.nativeHandler,V=z.fakeName,ee=z.capture,le=z.slice(0,I).concat(z.slice(I+1));le.nativeHandler=$,le.fakeName=V,le.capture=ee,c[_]=le}}(!s||z.length===0)&&(delete c[_],Su(t,z.fakeName||_,z.nativeHandler,z.capture))}}}else nn(c,(d,h)=>{Su(t,d.fakeName||h,d.nativeHandler,d.capture)}),c={};for(const d in c)if(Ro(c,d))return this;delete this.events[a];try{delete t[this.expando]}catch{t[this.expando]=null}}return this}fire(t,o,s){return this.dispatch(t,o,s)}dispatch(t,o,s){if(!t||wt(t)||Qo(t))return this;const a=ta({type:o,target:t},s);do{const c=t[this.expando];c&&this.executeHandlers(a,c),t=t.parentNode||t.ownerDocument||t.defaultView||t.parentWindow}while(t&&!a.isPropagationStopped());return this}clean(t){if(!t||wt(t)||Qo(t))return this;if(t[this.expando]&&this.unbind(t),t.getElementsByTagName||(t=t.document),t&&t.getElementsByTagName){this.unbind(t);const o=t.getElementsByTagName("*");let s=o.length;for(;s--;)t=o[s],t[this.expando]&&this.unbind(t)}return this}destroy(){this.events={}}cancel(t){return t&&(t.preventDefault(),t.stopImmediatePropagation()),!1}executeHandlers(t,o){const s=this.events[o],a=s&&s[t.type];if(a)for(let c=0,d=a.length;c{uo(o)||o===""?rn(e,t):Rr(e,t,o)},lf=e=>e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),lm=(e,t)=>{let o=0;if(e)for(let s=e.nodeType,a=e.previousSibling;a;a=a.previousSibling){const c=a.nodeType;t&&wt(a)&&(c===s||!a.data.length)||(o++,s=c)}return o},ay=(e,t)=>{const o=Da(t,"style"),s=e.serialize(e.parse(o),En(t));hp(t,Ba,s)},E_=(e,t)=>D(e)?Ro($i,t)?e+"":e+"px":e,K1=(e,t,o)=>{const s=lf(t);uo(o)||o===""?Jl(e,s):li(e,s,E_(o,s))},cm=(e,t,o)=>{const s=t.keep_values,a={set:(d,h,_)=>{const z=ye.fromDom(d);Gt(t.url_converter)&&Fe(h)&&(h=t.url_converter.call(t.url_converter_scope||o(),String(h),_,d));const I="data-mce-"+_;hp(z,I,h),hp(z,_,h)},get:(d,h)=>{const _=ye.fromDom(d);return Da(_,"data-mce-"+h)||Da(_,h)}},c={style:{set:(d,h)=>{const _=ye.fromDom(d);s&&hp(_,Ba,h),rn(_,"style"),ft(h)&&vn(_,e.parse(h))},get:d=>{const h=ye.fromDom(d),_=Da(h,Ba)||Da(h,"style");return e.serialize(e.parse(_),En(h))}}};return s&&(c.href=c.src=a),c},Ts=(e,t={})=>{const o={},s=window,a={};let c=0;const d=!0,h=!0,_=Ks.forElement(ye.fromDom(e),{contentCssCors:t.contentCssCors,referrerPolicy:t.referrerPolicy}),z=[],I=t.schema?t.schema:Rc({}),$=Z1({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),V=t.ownEvents?new af:af.Event,ee=I.getBlockElements(),le=He=>ft(He)?Ro(ee,He):no(He)&&(Ro(ee,He.nodeName)||zc(I,He)),oe=He=>He&&e&&ft(He)?e.getElementById(He):He,fe=He=>{const je=oe(He);return Fe(je)?ye.fromDom(je):null},ke=(He,je,It="")=>{let Dt;const Do=fe(He);if(Fe(Do)&&cr(Do)){const Mn=n4[je];Mn&&Mn.get?Dt=Mn.get(Do.dom,je):Dt=Da(Do,je)}return Fe(Dt)?Dt:It},Oe=He=>{const je=oe(He);return uo(je)?[]:je.attributes},Te=(He,je,It)=>{go(He,Dt=>{if(no(Dt)){const Do=ye.fromDom(Dt),Mn=It===""?null:It,Nr=Da(Do,je),Wm=n4[je];Wm&&Wm.set?Wm.set(Do.dom,Mn,je):hp(Do,je,Mn),Nr!==Mn&&t.onSetAttrib&&t.onSetAttrib({attrElm:Do.dom,attrName:je,attrValue:Mn})}})},Pe=(He,je)=>He.cloneNode(je),ht=()=>t.root_element||e.body,Mt=He=>{const je=Nl(He);return{x:je.x,y:je.y,w:je.width,h:je.height}},Yt=(He,je)=>mh(e.body,oe(He),je),Qe=(He,je,It)=>{go(He,Dt=>{const Do=ye.fromDom(Dt);K1(Do,je,It),t.update_styles&&ay($,Do)})},Ve=(He,je)=>{go(He,It=>{const Dt=ye.fromDom(It);nn(je,(Do,Mn)=>{K1(Dt,Mn,Do)}),t.update_styles&&ay($,Dt)})},mt=(He,je,It)=>{const Dt=oe(He);if(!(uo(Dt)||!ec(Dt)&&!Xf(Dt)))return It?ur(ye.fromDom(Dt),lf(je)):(je=je.replace(/-(\D)/g,(Do,Mn)=>Mn.toUpperCase()),je==="float"&&(je="cssFloat"),Dt.style?Dt.style[je]:void 0)},to=He=>{const je=oe(He);if(!je)return{w:0,h:0};let It=mt(je,"width"),Dt=mt(je,"height");return(!It||It.indexOf("px")===-1)&&(It="0"),(!Dt||Dt.indexOf("px")===-1)&&(Dt="0"),{w:parseInt(It,10)||je.offsetWidth||je.clientWidth,h:parseInt(Dt,10)||je.offsetHeight||je.clientHeight}},bo=He=>{const je=oe(He),It=Yt(je),Dt=to(je);return{x:It.x,y:It.y,w:Dt.w,h:Dt.h}},gn=(He,je)=>{if(!He)return!1;const It=ve(He)?He:[He];return Bn(It,Dt=>ls(ye.fromDom(Dt),je))},Cn=(He,je,It,Dt)=>{const Do=[];let Mn=oe(He);Dt=Dt===void 0;const Nr=It||(ht().nodeName!=="BODY"?ht().parentNode:null);if(ft(je))if(je==="*")je=no;else{const Wm=je;je=u5=>gn(u5,Wm)}for(;Mn&&!(Mn===Nr||uo(Mn.nodeType)||lo(Mn)||Ld(Mn));){if(!je||je(Mn))if(Dt)Do.push(Mn);else return[Mn];Mn=Mn.parentNode}return Dt?Do:null},ds=(He,je,It)=>{const Dt=Cn(He,je,It,!1);return Dt&&Dt.length>0?Dt[0]:null},hs=(He,je,It)=>{let Dt=je;if(He){ft(je)&&(Dt=Do=>gn(Do,je));for(let Do=He[It];Do;Do=Do[It])if(Gt(Dt)&&Dt(Do))return Do}return null},qr=(He,je)=>hs(He,je,"nextSibling"),ll=(He,je)=>hs(He,je,"previousSibling"),Os=He=>Gt(He.querySelectorAll),Ft=(He,je)=>{var It,Dt;const Do=(Dt=(It=oe(je))!==null&&It!==void 0?It:t.root_element)!==null&&Dt!==void 0?Dt:e;return Os(Do)?an(Do.querySelectorAll(He)):[]},go=function(He,je,It){const Dt=It??this;if(ve(He)){const Do=[];return q1(He,(Mn,Nr)=>{const Wm=oe(Mn);Wm&&Do.push(je.call(Dt,Wm,Nr))}),Do}else{const Do=oe(He);return Do?je.call(Dt,Do):!1}},ts=(He,je)=>{go(He,It=>{nn(je,(Dt,Do)=>{Te(It,Do,Dt)})})},jt=(He,je)=>{go(He,It=>{const Dt=ye.fromDom(It);Ql(Dt,je)})},Eo=(He,je,It,Dt,Do)=>go(He,Mn=>{const Nr=ft(je)?e.createElement(je):je;return Fe(It)&&ts(Nr,It),Dt&&(!ft(Dt)&&Dt.nodeType?Nr.appendChild(Dt):ft(Dt)&&jt(Nr,Dt)),Do?Nr:Mn.appendChild(Nr)}),wn=(He,je,It)=>Eo(e.createElement(He),He,je,It,!0),qt=up.decode,hn=up.encodeAllRaw,Tn=(He,je,It="")=>{let Dt="<"+He;for(const Do in je)$a(je,Do)&&(Dt+=" "+Do+'="'+hn(je[Do])+'"');return ki(It)&&Ro(I.getVoidElements(),He)?Dt+" />":Dt+">"+It+""},hi=He=>{const je=e.createElement("div"),It=e.createDocumentFragment();It.appendChild(je),He&&(je.innerHTML=He);let Dt;for(;Dt=je.firstChild;)It.appendChild(Dt);return It.removeChild(je),It},gs=(He,je)=>go(He,It=>{const Dt=ye.fromDom(It);return je&&Le(xa(Dt),Do=>{Rs(Do)&&Do.dom.length===0?Jn(Do):Zs(Dt,Do)}),Jn(Dt),Dt.dom}),ti=He=>go(He,je=>{const It=je.attributes;for(let Dt=It.length-1;Dt>=0;Dt--)je.removeAttributeNode(It.item(Dt))}),Nf=He=>$.parse(He),Jp=(He,je)=>$.serialize(He,je),fc=He=>{if(sh!==Ts.DOM&&e===document){if(o[He])return;o[He]=!0}let je=e.getElementById("mceDefaultStyles");if(!je){je=e.createElement("style"),je.id="mceDefaultStyles",je.type="text/css";const It=e.head;It.firstChild?It.insertBefore(je,It.firstChild):It.appendChild(je)}je.styleSheet?je.styleSheet.cssText+=He:je.appendChild(e.createTextNode(He))},ou=He=>{He||(He=""),Le(He.split(","),je=>{a[je]=!0,_.load(je).catch(dt)})},Df=(He,je,It)=>{go(He,Dt=>{if(no(Dt)){const Do=ye.fromDom(Dt),Mn=je.split(" ");Le(Mn,Nr=>{Fe(It)?(It?Kl:Ra)(Do,Nr):Ku(Do,Nr)})}})},nu=(He,je)=>{Df(He,je,!0)},Rf=(He,je)=>{Df(He,je,!1)},_o=(He,je)=>{const It=fe(He),Dt=je.split(" ");return Fe(It)&&Hs(Dt,Do=>vc(It,Do))},Un=He=>{go(He,je=>Jl(ye.fromDom(je),"display"))},zr=He=>{go(He,je=>li(ye.fromDom(je),"display","none"))},na=He=>{const je=fe(He);return Fe(je)&&wd(Us(je,"display"),"none")},Fa=He=>(He||"mce_")+c++,Wi=He=>{const je=fe(He);return Fe(je)?no(je.dom)?je.dom.outerHTML:Ec(je):""},Ta=(He,je)=>{go(He,It=>{no(It)&&(It.outerHTML=je)})},Aa=(He,je)=>{const It=oe(je);return go(He,Dt=>{const Do=It==null?void 0:It.parentNode,Mn=It==null?void 0:It.nextSibling;return Do&&(Mn?Do.insertBefore(Dt,Mn):Do.appendChild(Dt)),Dt})},mc=(He,je,It)=>go(je,Dt=>{var Do;const Mn=ve(je)?He.cloneNode(!0):He;return It&&q1(ry(Dt.childNodes),Nr=>{Mn.appendChild(Nr)}),(Do=Dt.parentNode)===null||Do===void 0||Do.replaceChild(Mn,Dt),Dt}),jm=(He,je)=>{if(He.nodeName!==je.toUpperCase()){const It=wn(je);return q1(Oe(He),Dt=>{Te(It,Dt.nodeName,ke(He,Dt.nodeName))}),mc(It,He,!0),It}else return He},Um=(He,je)=>{let It=He;for(;It;){let Dt=je;for(;Dt&&It!==Dt;)Dt=Dt.parentNode;if(It===Dt)break;It=It.parentNode}return!It&&He.ownerDocument?He.ownerDocument.documentElement:It},Zm=(He,je,It)=>Ct(je)?pl(I,He,{...It,isContent:Do=>{const Mn=Do.nodeName.toLowerCase();return!!je[Mn]}}):pl(I,He,It),Mf=()=>e.createRange(),S1=(He,je,It)=>{let Dt=Mf(),Do,Mn;if(He&&je&&He.parentNode&&je.parentNode){const Nr=He.parentNode;return Dt.setStart(Nr,lm(He)),Dt.setEnd(je.parentNode,lm(je)),Do=Dt.extractContents(),Dt=Mf(),Dt.setStart(je.parentNode,lm(je)+1),Dt.setEnd(Nr,lm(He)+1),Mn=Dt.extractContents(),Nr.insertBefore(dg(sh,Do,I),He),It?Nr.insertBefore(It,He):Nr.insertBefore(je,He),Nr.insertBefore(dg(sh,Mn,I),He),gs(He),It||je}else return},yk=(He,je,It,Dt)=>{if(ve(He)){let Do=He.length;const Mn=[];for(;Do--;)Mn[Do]=yk(He[Do],je,It,Dt);return Mn}else return t.collect&&(He===e||He===s)&&z.push([He,je,It,Dt]),V.bind(He,je,It,Dt||sh)},vk=(He,je,It)=>{if(ve(He)){let Dt=He.length;const Do=[];for(;Dt--;)Do[Dt]=vk(He[Dt],je,It);return Do}else{if(z.length>0&&(He===e||He===s)){let Dt=z.length;for(;Dt--;){const[Do,Mn,Nr]=z[Dt];He===Do&&(!je||je===Mn)&&(!It||It===Nr)&&V.unbind(Do,Mn,Nr)}}return V.unbind(He,je,It)}},QI=(He,je,It)=>V.dispatch(He,je,It),Fb=(He,je,It)=>V.dispatch(He,je,It),d5=He=>{if(He&&ec(He)){const je=He.getAttribute("data-mce-contenteditable");return je&&je!=="inherit"?je:He.contentEditable!=="inherit"?He.contentEditable:null}else return null},sh={doc:e,settings:t,win:s,files:a,stdMode:d,boxModel:h,styleSheetLoader:_,boundEvents:z,styles:$,schema:I,events:V,isBlock:le,root:null,clone:Pe,getRoot:ht,getViewPort:Mt,getRect:bo,getSize:to,getParent:ds,getParents:Cn,get:oe,getNext:qr,getPrev:ll,select:Ft,is:gn,add:Eo,create:wn,createHTML:Tn,createFragment:hi,remove:gs,setStyle:Qe,getStyle:mt,setStyles:Ve,removeAllAttribs:ti,setAttrib:Te,setAttribs:ts,getAttrib:ke,getPos:Yt,parseStyle:Nf,serializeStyle:Jp,addStyle:fc,loadCSS:ou,addClass:nu,removeClass:Rf,hasClass:_o,toggleClass:Df,show:Un,hide:zr,isHidden:na,uniqueId:Fa,setHTML:jt,getOuterHTML:Wi,setOuterHTML:Ta,decode:qt,encode:hn,insertAfter:Aa,replace:mc,rename:jm,findCommonAncestor:Um,run:go,getAttribs:Oe,isEmpty:Zm,createRng:Mf,nodeIndex:lm,split:S1,bind:yk,unbind:vk,fire:Fb,dispatch:QI,getContentEditable:d5,getContentEditableParent:He=>{const je=ht();let It=null;for(let Dt=He;Dt&&Dt!==je&&(It=d5(Dt),It===null);Dt=Dt.parentNode);return It},isEditable:He=>{if(Fe(He)){const je=no(He)?He:He.parentElement;return Fe(je)&&ec(je)&&js(ye.fromDom(je))}else return!1},destroy:()=>{if(z.length>0){let He=z.length;for(;He--;){const[je,It,Dt]=z[He];V.unbind(je,It,Dt)}}nn(a,(He,je)=>{_.unload(je),delete a[je]})},isChildOf:(He,je)=>He===je||je.contains(He),dumpRng:He=>"startContainer: "+He.startContainer.nodeName+", startOffset: "+He.startOffset+", endContainer: "+He.endContainer.nodeName+", endOffset: "+He.endOffset},n4=cm($,t,Ge(sh));return sh};Ts.DOM=Ts(document),Ts.nodeIndex=lm;const iy=Ts.DOM,Ys=0,Fd=1,nd=2,bp=3;class tl{constructor(t={}){this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=!1,this.settings=t}_setReferrerPolicy(t){this.settings.referrerPolicy=t}loadScript(t){return new Promise((o,s)=>{const a=iy;let c;const d=()=>{a.remove(z),c&&(c.onerror=c.onload=c=null)},h=()=>{d(),o()},_=()=>{d(),s("Failed to load script: "+t)},z=a.uniqueId();c=document.createElement("script"),c.id=z,c.type="text/javascript",c.src=zt._addCacheSuffix(t),this.settings.referrerPolicy&&a.setAttrib(c,"referrerpolicy",this.settings.referrerPolicy),c.onload=h,c.onerror=_,(document.getElementsByTagName("head")[0]||document.body).appendChild(c)})}isDone(t){return this.states[t]===nd}markDone(t){this.states[t]=nd}add(t){const o=this;return o.queue.push(t),o.states[t]===void 0&&(o.states[t]=Ys),new Promise((a,c)=>{o.scriptLoadedCallbacks[t]||(o.scriptLoadedCallbacks[t]=[]),o.scriptLoadedCallbacks[t].push({resolve:a,reject:c})})}load(t){return this.add(t)}remove(t){delete this.states[t],delete this.scriptLoadedCallbacks[t]}loadQueue(){const t=this.queue;return this.queue=[],this.loadScripts(t)}loadScripts(t){const o=this,s=(_,z)=>{Gn(o.scriptLoadedCallbacks,z).each(I=>{Le(I,$=>$[_](z))}),delete o.scriptLoadedCallbacks[z]},a=_=>{const z=rt(_,I=>I.status==="rejected");return z.length>0?Promise.reject(Ln(z,({reason:I})=>ve(I)?I:[I])):Promise.resolve()},c=_=>Promise.allSettled(dn(_,z=>o.states[z]===nd?(s("resolve",z),Promise.resolve()):o.states[z]===bp?(s("reject",z),Promise.reject(z)):(o.states[z]=Fd,o.loadScript(z).then(()=>{o.states[z]=nd,s("resolve",z);const I=o.queue;return I.length>0?(o.queue=[],c(I).then(a)):Promise.resolve()},()=>(o.states[z]=bp,s("reject",z),Promise.reject(z)))))),d=_=>(o.loading=!0,c(_).then(z=>{o.loading=!1;const I=o.queueLoadedCallbacks.shift();return j.from(I).each(cn),a(z)})),h=bd(t);return o.loading?new Promise((_,z)=>{o.queueLoadedCallbacks.push(()=>{d(h).then(_,z)})}):d(h)}}tl.ScriptLoader=new tl;const Ga=(e,t)=>{const o=e.indexOf(t);return o!==-1&&e.indexOf(t,o+1)>o},dm=e=>ue(e)&&Ro(e,"raw"),kh=e=>ve(e)&&e.length>1,yp={},Ch=Er("en"),vp=()=>Gn(yp,Ch.get()),Mc={getData:()=>Mi(yp,e=>({...e})),setCode:e=>{e&&Ch.set(e)},getCode:()=>Ch.get(),add:(e,t)=>{let o=yp[e];o||(yp[e]=o={});const s=dn(vt(t),a=>a.toLowerCase());nn(t,(a,c)=>{const d=c.toLowerCase();d!==c&&Ga(s,d)?(Ro(t,d)||(o[d]=a),o[c]=a):o[d]=a})},translate:e=>{const t=vp().getOr({}),o=d=>Gt(d)?Object.prototype.toString.call(d):s(d)?"":""+d,s=d=>d===""||d===null||d===void 0,a=d=>{const h=o(d);return Ro(t,h)?o(t[h]):Gn(t,h.toLowerCase()).map(o).getOr(h)},c=d=>d.replace(/{context:\w+}$/,"");if(s(e))return"";if(dm(e))return o(e.raw);if(kh(e)){const d=e.slice(1),h=a(e[0]).replace(/\{([0-9]+)\}/g,(_,z)=>Ro(d,z)?o(d[z]):_);return c(h)}return c(a(e))},isRtl:()=>vp().bind(e=>Gn(e,"_dir")).exists(e=>e==="rtl"),hasCode:e=>Ro(yp,e)},Hi=()=>{const e=[],t={},o={},s=[],a=(oe,fe)=>{const ke=rt(s,Oe=>Oe.name===oe&&Oe.state===fe);Le(ke,Oe=>Oe.resolve())},c=oe=>Ro(t,oe),d=oe=>Ro(o,oe),h=oe=>{if(o[oe])return o[oe].instance},_=(oe,fe)=>{const ke=Mc.getCode(),Oe=","+(fe||"")+",";!ke||fe&&Oe.indexOf(","+ke+",")===-1||tl.ScriptLoader.add(t[oe]+"/langs/"+ke+".js")},z=(oe,fe)=>{Hi.languageLoad!==!1&&(c(oe)?_(oe,fe):le(oe,"loaded").then(()=>_(oe,fe)))},I=(oe,fe)=>(e.push(fe),o[oe]={instance:fe},a(oe,"added"),fe),$=oe=>{delete t[oe],delete o[oe]},V=(oe,fe)=>ft(fe)?ft(oe)?{prefix:"",resource:fe,suffix:""}:{prefix:oe.prefix,resource:fe,suffix:oe.suffix}:fe,ee=(oe,fe)=>{if(t[oe])return Promise.resolve();let ke=ft(fe)?fe:fe.prefix+fe.resource+fe.suffix;ke.indexOf("/")!==0&&ke.indexOf("://")===-1&&(ke=Hi.baseURL+"/"+ke),t[oe]=ke.substring(0,ke.lastIndexOf("/"));const Oe=()=>(a(oe,"loaded"),Promise.resolve());return o[oe]?Oe():tl.ScriptLoader.add(ke).then(Oe)},le=(oe,fe="added")=>fe==="added"&&d(oe)||fe==="loaded"&&c(oe)?Promise.resolve():new Promise(ke=>{s.push({name:oe,state:fe,resolve:ke})});return{items:e,urls:t,lookup:o,get:h,requireLangPack:z,add:I,remove:$,createUrl:V,load:ee,waitFor:le}};Hi.languageLoad=!0,Hi.baseURL="",Hi.PluginManager=Hi(),Hi.ThemeManager=Hi(),Hi.ModelManager=Hi();const _p=(e,t)=>{let o=null;return{cancel:()=>{ot(o)||(clearTimeout(o),o=null)},throttle:(...c)=>{ot(o)&&(o=setTimeout(()=>{o=null,e.apply(null,c)},t))}}},pg=(e,t)=>{let o=null;const s=()=>{ot(o)||(clearTimeout(o),o=null)};return{cancel:s,throttle:(...c)=>{s(),o=setTimeout(()=>{o=null,e.apply(null,c)},t)}}},z_=(e,t,o)=>Tl(e,t,o).isSome(),mr=Ge("mce-annotation"),pr=Ge("data-mce-annotation"),Br=Ge("data-mce-annotation-uid"),us=Ge("data-mce-annotation-active"),ir=Ge("data-mce-annotation-classes"),Tr=Ge("data-mce-annotation-attrs"),ly=e=>t=>kn(t,e),cy=(e,t)=>{const o=e.selection.getRng(),s=ye.fromDom(o.startContainer),a=ye.fromDom(e.getBody()),c=t.fold(()=>"."+mr(),_=>`[${pr()}="${_}"]`),d=wc(s,o.startOffset).getOr(s);return Xr(d,c,ly(a)).bind(_=>Sr(_,`${Br()}`).bind(z=>Sr(_,`${pr()}`).map(I=>{const $=J1(e,z);return{uid:z,name:I,elements:$}})))},X1=e=>cr(e)&&vc(e,mr()),Sh=(e,t)=>Yc(e,"data-mce-bogus")||z_(e,'[data-mce-bogus="all"]',ly(t)),J1=(e,t)=>{const o=ye.fromDom(e.getBody()),s=Mr(o,`[${Br()}="${t}"]`);return rt(s,a=>!Sh(a,o))},xp=(e,t)=>{const o=ye.fromDom(e.getBody()),s=Mr(o,`[${pr()}="${t}"]`),a={};return Le(s,c=>{if(!Sh(c,o)){const d=Da(c,Br()),h=Gn(a,d).getOr([]);a[d]=h.concat([c])}}),a},dy=(e,t)=>{const o=Er({}),s=()=>({listeners:[],previous:Jr()}),a=($,V)=>{c($,ee=>(V(ee),ee))},c=($,V)=>{const ee=o.get(),le=Gn(ee,$).getOrThunk(s),oe=V(le);ee[$]=oe,o.set(ee)},d=($,V,ee)=>{a($,le=>{Le(le.listeners,oe=>oe(!0,$,{uid:V,nodes:dn(ee,fe=>fe.dom)}))})},h=$=>{a($,V=>{Le(V.listeners,ee=>ee(!1,$))})},_=($,V)=>{Le(J1(e,$),ee=>{V?Rr(ee,us(),"true"):rn(ee,us())})},z=pg(()=>{const $=yn(t.getNames());Le($,V=>{c(V,ee=>{const le=ee.previous.get();return cy(e,j.some(V)).fold(()=>{le.each(oe=>{h(V),ee.previous.clear(),_(oe,!1)})},({uid:oe,name:fe,elements:ke})=>{wd(le,oe)||(le.each(Oe=>_(Oe,!1)),d(fe,oe,ke),ee.previous.set(oe),_(oe,!0))}),{previous:ee.previous,listeners:ee.listeners}})})},30);return e.on("remove",()=>{z.cancel()}),e.on("NodeChange",()=>{z.throttle()}),{addListener:($,V)=>{c($,ee=>({previous:ee.previous,listeners:ee.listeners.concat([V])}))}}},uy=(e,t)=>{const o=pr(),s=c=>j.from(c.attr(o)).bind(t.lookup),a=c=>{var d,h;c.attr(Br(),null),c.attr(pr(),null),c.attr(us(),null);const _=j.from(c.attr(Tr())).map(V=>V.split(",")).getOr([]),z=j.from(c.attr(ir())).map(V=>V.split(",")).getOr([]);Le(_,V=>c.attr(V,null));const I=(h=(d=c.attr("class"))===null||d===void 0?void 0:d.split(" "))!==null&&h!==void 0?h:[],$=os(I,[mr()].concat(z));c.attr("class",$.length>0?$.join(" "):null),c.attr(ir(),null),c.attr(Tr(),null)};e.serializer.addTempAttr(us()),e.serializer.addAttributeFilter(o,c=>{for(const d of c)s(d).each(h=>{h.persistent===!1&&(d.name==="span"?d.unwrap():a(d))})})},Q1=()=>{const e={};return{register:(a,c)=>{e[a]={name:a,settings:c}},lookup:a=>Gn(e,a).map(c=>c.settings),getNames:()=>vt(e)}},Eh=(e,t,o)=>Math.min(Math.max(e,t),o),ol=()=>window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295;let ev=0;const Ti=e=>{const o=new Date().getTime(),s=Math.floor(ol()*1e9);return ev++,e+"_"+s+ev+String(o)},Th=(e,t)=>{Le(t,o=>{Kl(e,o)})},wp=(e,t)=>{Le(t,o=>{Ra(e,o)})},sd=(e,t)=>ye.fromDom(e.dom.cloneNode(t)),Ar=e=>sd(e,!1),fm=e=>sd(e,!0),tv=(e,t)=>{const o=ye.fromTag(t),s=Va(e);return Ha(o,s),o},ov=(e,t)=>{const o=tv(e,t);Ne(e,o);const s=xa(e);return xr(o,s),Jn(e),o},Ah=(e,t,o=fn)=>{const s=new Ma(e,t),a=c=>{let d;do d=s[c]();while(d&&!wt(d)&&!o(d));return j.from(d).filter(wt)};return{current:()=>j.from(s.current()).filter(wt),next:()=>a("next"),prev:()=>a("prev"),prev2:()=>a("prev2")}},Eu=(e,t)=>{const o=t||(d=>e.isBlock(d)||$s(d)||Ho(d)),s=(d,h,_,z)=>{if(wt(d)){const I=z(d,h,d.data);if(I!==-1)return j.some({container:d,offset:I})}return _().bind(I=>s(I.container,I.offset,_,z))};return{backwards:(d,h,_,z)=>{const I=Ah(d,z??e.getRoot(),o);return s(d,h,()=>I.prev().map($=>({container:$,offset:$.length})),_).getOrNull()},forwards:(d,h,_,z)=>{const I=Ah(d,z??e.getRoot(),o);return s(d,h,()=>I.next().map($=>({container:$,offset:0})),_).getOrNull()}}},Oh=((e,t)=>{const o=c=>{if(!e(c))throw new Error("Can only get "+t+" value of a "+t+" node");return s(c).getOr("")},s=c=>e(c)?j.from(c.dom.nodeValue):j.none();return{get:o,getOption:s,set:(c,d)=>{if(!e(c))throw new Error("Can only set raw "+t+" value of a "+t+" node");c.dom.nodeValue=d}}})(Rs,"text"),mm=e=>Oh.get(e),N_=e=>Oh.getOption(e),zh=(e,t)=>Oh.set(e,t),Nh=["td","th"],fy=["thead","tbody","tfoot"],gg=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],my=["li","dd","dt"],Ai=["ul","ol","dl"],nv=["pre","script","textarea","style"],Tu=e=>{let t;return o=>(t=t||Is(e,zo),Ro(t,En(o)))},Dh=e=>En(e)==="table",$d=e=>cr(e)&&En(e)==="br",Rh=Tu(gg),Mh=Tu(Ai),pm=Tu(my),kp=Tu(fy),Bc=Tu(Nh),Bh=Tu(nv),Wk=e=>{const t=[];let o=e.dom;for(;o;)t.push(ye.fromDom(o)),o=o.lastChild;return t},sc=e=>{const t=Mr(e,"br"),o=rt(Wk(e).slice(-1),$d);t.length===o.length&&Le(o,Jn)},Au=()=>{const e=ye.fromTag("br");return Rr(e,"data-mce-bogus","1"),e},Lc=e=>{xs(e),fr(e,Au())},sv=(e,t)=>{kc(e).each(o=>{Ur(o).each(s=>{t.isBlock(En(e))&&$d(o)&&t.isBlock(En(s))&&Jn(o)})})},ua=rr,Pc=Qc,nl=Kf,qk=e=>e.insertContent(ua,{preserve_zwsp:!0}),cf=no,Ou=wt,hg=e=>(Ou(e)&&(e=e.parentNode),cf(e)&&e.hasAttribute("data-mce-caret")),gm=e=>Ou(e)&&Pc(e.data),Pl=e=>hg(e)||gm(e),py=e=>e.firstChild!==e.lastChild||!$s(e.firstChild),gy=(e,t)=>{var o;const a=((o=e.ownerDocument)!==null&&o!==void 0?o:document).createTextNode(ua),c=e.parentNode;if(t){const d=e.previousSibling;if(Ou(d)){if(Pl(d))return d;if(zu(d))return d.splitText(d.data.length-1)}c==null||c.insertBefore(a,e)}else{const d=e.nextSibling;if(Ou(d)){if(Pl(d))return d;if(Ph(d))return d.splitText(1),d}e.nextSibling?c==null||c.insertBefore(a,e.nextSibling):c==null||c.appendChild(a)}return a},Lh=e=>{const t=e.container();return wt(t)?t.data.charAt(e.offset())===ua||e.isAtStart()&&gm(t.previousSibling):!1},hy=e=>{const t=e.container();return wt(t)?t.data.charAt(e.offset()-1)===ua||e.isAtEnd()&&gm(t.nextSibling):!1},D_=(e,t,o)=>{var s;const c=((s=t.ownerDocument)!==null&&s!==void 0?s:document).createElement(e);c.setAttribute("data-mce-caret",o?"before":"after"),c.setAttribute("data-mce-bogus","all"),c.appendChild(Au().dom);const d=t.parentNode;return o?d==null||d.insertBefore(c,t):t.nextSibling?d==null||d.insertBefore(c,t.nextSibling):d==null||d.appendChild(c),c},Ph=e=>Ou(e)&&e.data[0]===ua,zu=e=>Ou(e)&&e.data[e.data.length-1]===ua,Ih=e=>{var t;const o=e.getElementsByTagName("br"),s=o[o.length-1];Md(s)&&((t=s.parentNode)===null||t===void 0||t.removeChild(s))},Cp=e=>e&&e.hasAttribute("data-mce-caret")?(Ih(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("data-mce-style"),e.removeAttribute("_moz_abspos"),e):null,Sp=e=>hg(e.startContainer),df=Math.round,uf=e=>e?{left:df(e.left),top:df(e.top),bottom:df(e.bottom),right:df(e.right),width:df(e.width),height:df(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0},Fh=(e,t)=>(e=uf(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e),ff=(e,t)=>e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right,mf=(e,t,o)=>e>=0&&e<=Math.min(t.height,o.height)/2,pf=(e,t)=>{const o=Math.min(t.height/2,e.height/2);return e.bottom-ot.bottom?!1:mf(t.top-e.bottom,e,t)},Ep=(e,t)=>e.top>t.bottom?!0:e.bottomt>=e.left&&t<=e.right&&o>=e.top&&o<=e.bottom,bg=e=>ko(e,(t,o)=>t.fold(()=>j.some(o),s=>{const a=Math.min(o.left,s.left),c=Math.min(o.top,s.top),d=Math.max(o.right,s.right),h=Math.max(o.bottom,s.bottom);return j.some({top:c,right:d,bottom:h,left:a,width:d-a,height:h-c})}),j.none()),yy=(e,t,o)=>{const s=Math.max(Math.min(t,e.left+e.width),e.left),a=Math.max(Math.min(o,e.top+e.height),e.top);return Math.sqrt((t-s)*(t-s)+(o-a)*(o-a))},rv=(e,t)=>Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top)),yg=e=>{const t=e.startContainer,o=e.startOffset;return t===e.endContainer&&t.hasChildNodes()&&e.endOffset===o+1?t.childNodes[o]:null},fa=(e,t)=>{if(no(e)&&e.hasChildNodes()){const o=e.childNodes,s=Eh(t,0,o.length-1);return o[s]}else return e},av=(e,t)=>{if(!(t<0&&no(e)&&e.hasChildNodes()))return fa(e,t)},R_=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),iv=e=>ft(e)&&e.charCodeAt(0)>=768&&R_.test(e),lv=(...e)=>t=>{for(let o=0;ot=>{for(let o=0;oB_(e)?!1:Kk(e)?!hf(e.parentNode):Hh(e)||cv(e)||M_(e)||_y(e),dv=e=>no(e)&&e.getAttribute("unselectable")==="true",_y=e=>!dv(e)&&$h(e),L_=(e,t)=>{for(let o=e.parentNode;o&&o!==t;o=o.parentNode){if(_y(o))return!1;if(vy(o))return!0}return!0},Tp=e=>_y(e)?!ko(an(e.getElementsByTagName("*")),(t,o)=>t||vy(o),!1):!1,vg=e=>Hh(e)||Tp(e),Vh=(e,t)=>rd(e)&&L_(e,t),P_=no,ad=rd,hm=Dl("display","block table"),jh=Dl("float","left right"),Uh=gf(P_,ad,pt(jh)),xy=pt(Dl("white-space","pre pre-line pre-wrap")),Zh=wt,Xa=$s,wy=Ts.nodeIndex,bm=av,ym=e=>e?e.createRange():Ts.DOM.createRng(),Wh=e=>ft(e)&&/[\r\n\t ]/.test(e),ky=e=>!!e.setStart&&!!e.setEnd,Ap=e=>{const t=e.startContainer,o=e.startOffset;if(Wh(e.toString())&&xy(t.parentNode)&&wt(t)){const s=t.data;if(Wh(s[o-1])||Wh(s[o+1]))return!0}return!1},bf=e=>{const t=e.ownerDocument,o=ym(t),s=t.createTextNode(da),a=e.parentNode;a.insertBefore(s,e),o.setStart(s,0),o.setEnd(s,1);const c=uf(o.getBoundingClientRect());return a.removeChild(s),c},uv=e=>{const t=e.startContainer,o=e.endContainer,s=e.startOffset,a=e.endOffset;if(t===o&&wt(o)&&s===0&&a===1){const c=e.cloneRange();return c.setEndAfter(o),Vi(c)}else return null},Cy=e=>e.left===0&&e.right===0&&e.top===0&&e.bottom===0,Vi=e=>{var t;let o;const s=e.getClientRects();return s.length>0?o=uf(s[0]):o=uf(e.getBoundingClientRect()),!ky(e)&&Xa(e)&&Cy(o)?bf(e):Cy(o)&&ky(e)&&(t=uv(e))!==null&&t!==void 0?t:o},yf=(e,t)=>{const o=Fh(e,t);return o.width=1,o.right=o.left+1,o},fv=e=>{const t=[],o=d=>{d.height!==0&&(t.length>0&&ff(d,t[t.length-1])||t.push(d))},s=(d,h)=>{const _=ym(d.ownerDocument);if(h0&&(_.setStart(d,h-1),_.setEnd(d,h),Ap(_)||o(yf(Vi(_),!1))),h{const s=()=>(Zh(e),t===0),a=()=>Zh(e)?t>=e.data.length:t>=e.childNodes.length,c=()=>{const I=ym(e.ownerDocument);return I.setStart(e,t),I.setEnd(e,t),I},d=()=>(o||(o=fv(Ue(e,t))),o),h=()=>d().length>0,_=I=>I&&e===I.container()&&t===I.offset(),z=I=>bm(e,I?t-1:t);return{container:Ge(e),offset:Ge(t),toRange:c,getClientRects:d,isVisible:h,isAtStart:s,isAtEnd:a,isEqual:_,getNode:z}};Ue.fromRangeStart=e=>Ue(e.startContainer,e.startOffset),Ue.fromRangeEnd=e=>Ue(e.endContainer,e.endOffset),Ue.after=e=>Ue(e.parentNode,wy(e)+1),Ue.before=e=>Ue(e.parentNode,wy(e)),Ue.isAbove=(e,t)=>va(St(t.getClientRects()),Vo(e.getClientRects()),pf).getOr(!1),Ue.isBelow=(e,t)=>va(Vo(t.getClientRects()),St(e.getClientRects()),Ep).getOr(!1),Ue.isAtStart=e=>e?e.isAtStart():!1,Ue.isAtEnd=e=>e?e.isAtEnd():!1,Ue.isTextPosition=e=>e?wt(e.container()):!1,Ue.isElementPosition=e=>!Ue.isTextPosition(e);const _g=(e,t)=>{wt(t)&&t.data.length===0&&e.remove(t)},Gk=(e,t,o)=>{t.insertNode(o),_g(e,o.previousSibling),_g(e,o.nextSibling)},I_=(e,t,o)=>{const s=j.from(o.firstChild),a=j.from(o.lastChild);t.insertNode(o),s.each(c=>_g(e,c.previousSibling)),a.each(c=>_g(e,c.nextSibling))},Sy=(e,t,o)=>{Ld(o)?I_(e,t,o):Gk(e,t,o)},id=wt,Ey=Md,qh=Ts.nodeIndex,mv=e=>{const t=e.parentNode;return Ey(t)?mv(t):t},pv=e=>e?_i(e.childNodes,(t,o)=>(Ey(o)&&o.nodeName!=="BR"?t=t.concat(pv(o)):t.push(o),t),[]):[],Yk=(e,t)=>{let o=e;for(;(o=o.previousSibling)&&id(o);)t+=o.data.length;return t},m=e=>t=>e===t,b=e=>{let t,o;t=pv(mv(e)),o=ys(t,m(e),e),t=t.slice(0,o+1);const s=_i(t,(a,c,d)=>(id(c)&&id(t[d-1])&&a++,a),0);return t=ni(t,ka([e.nodeName])),o=ys(t,m(e),e),o-s},x=e=>(id(e)?"text()":e.nodeName.toLowerCase())+"["+b(e)+"]",A=(e,t,o)=>{const s=[];for(let a=t.parentNode;a&&a!==e;a=a.parentNode)s.push(a);return s},M=(e,t)=>{let o=[],s=t.container(),a=t.offset(),c;if(id(s))c=Yk(s,a);else{const h=s.childNodes;a>=h.length?(c="after",a=h.length-1):c="before",s=h[a]}o.push(x(s));let d=A(e,s);return d=ni(d,pt(Md)),o=o.concat(yd(d,h=>x(h))),o.reverse().join("/")+","+c},L=(e,t,o)=>{let s=pv(e);return s=ni(s,(a,c)=>!id(a)||!id(s[c-1])),s=ni(s,ka([t])),s[o]},U=(e,t)=>{let o=e,s=0;for(;id(o);){const a=o.data.length;if(t>=s&&t<=s+a){e=o,t=t-s;break}if(!id(o.nextSibling)){e=o,t=a;break}s+=a,o=o.nextSibling}return id(e)&&t>e.data.length&&(t=e.data.length),Ue(e,t)},K=(e,t)=>{if(!t)return null;const o=t.split(","),s=o[0].split("/"),a=o.length>1?o[1]:"before",c=_i(s,(d,h)=>{const _=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(h);return _?(_[1]==="text()"&&(_[1]="#text"),L(d,_[1],parseInt(_[2],10))):null},e);if(!c)return null;if(!id(c)&&c.parentNode){let d;return a==="after"?d=qh(c)+1:d=qh(c),Ue(c.parentNode,d)}return U(c,parseInt(a,10))},re=Ho,he=(e,t,o)=>{let s=e(t.data.slice(0,o)).length;for(let a=t.previousSibling;a&&wt(a);a=a.previousSibling)s+=e(a.data).length;return s},Se=(e,t,o,s,a)=>{const c=a?s.startContainer:s.endContainer;let d=a?s.startOffset:s.endOffset;const h=[],_=e.getRoot();if(wt(c))h.push(o?he(t,c,d):d);else{let z=0;const I=c.childNodes;d>=I.length&&I.length&&(z=1,d=Math.max(0,I.length-1)),h.push(e.nodeIndex(I[d],o)+z)}for(let z=c;z&&z!==_;z=z.parentNode)h.push(e.nodeIndex(z,o));return h},me=(e,t,o,s)=>{const a=t.dom,c=Se(a,e,o,s,!0),d=t.isForward(),h=Sp(s)?{isFakeCaret:!0}:{};if(t.isCollapsed())return{start:c,forward:d,...h};{const _=Se(a,e,o,s,!1);return{start:c,end:_,forward:d,...h}}},be=(e,t,o)=>{let s=0;return zt.each(e.select(t),a=>{if(a.getAttribute("data-mce-bogus")!=="all"){if(a===o)return!1;s++;return}}),s},_e=(e,t)=>{let o=t?e.startContainer:e.endContainer,s=t?e.startOffset:e.endOffset;if(no(o)&&o.nodeName==="TR"){const a=o.childNodes;o=a[Math.min(t?s:s-1,a.length-1)],o&&(s=t?0:o.childNodes.length,t?e.setStart(o,s):e.setEnd(o,s))}},De=e=>(_e(e,!0),_e(e,!1),e),Re=(e,t)=>{if(no(e)&&(e=fa(e,t),re(e)))return e;if(Pl(e)){wt(e)&&hg(e)&&(e=e.parentNode);let o=e.previousSibling;if(re(o)||(o=e.nextSibling,re(o)))return o}},lt=e=>Re(e.startContainer,e.startOffset)||Re(e.endContainer,e.endOffset),ct=(e,t,o)=>{const s=o.getNode(),a=o.getRng();if(s.nodeName==="IMG"||re(s)){const d=s.nodeName;return{name:d,index:be(o.dom,d,s)}}const c=lt(a);if(c){const d=c.tagName;return{name:d,index:be(o.dom,d,c)}}return me(e,o,t,a)},it=e=>{const t=e.getRng();return{start:M(e.dom.getRoot(),Ue.fromRangeStart(t)),end:M(e.dom.getRoot(),Ue.fromRangeEnd(t)),forward:e.isForward()}},gt=e=>({rng:e.getRng(),forward:e.isForward()}),Nt=(e,t,o)=>{const s={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return o?e.create("span",s,""):e.create("span",s)},Pt=(e,t)=>{const o=e.dom;let s=e.getRng();const a=o.uniqueId(),c=e.isCollapsed(),d=e.getNode(),h=d.nodeName,_=e.isForward();if(h==="IMG")return{name:h,index:be(o,h,d)};const z=De(s.cloneRange());if(!c){z.collapse(!1);const $=Nt(o,a+"_end",t);Sy(o,z,$)}s=De(s),s.collapse(!0);const I=Nt(o,a+"_start",t);return Sy(o,s,I),e.moveToBookmark({id:a,keep:!0,forward:_}),{id:a,forward:_}},Be=(e,t,o=!1)=>t===2?ct(nl,o,e):t===3?it(e):t?gt(e):Pt(e,!1),Jt=$t(ct,To,!0),Ao=e=>{const t=c=>c(e),o=Ge(e),s=()=>a,a={tag:!0,inner:e,fold:(c,d)=>d(e),isValue:zo,isError:fn,map:c=>Oo.value(c(e)),mapError:s,bind:t,exists:t,forall:t,getOr:o,or:s,getOrThunk:o,orThunk:s,getOrDie:o,each:c=>{c(e)},toOptional:()=>j.some(e)};return a},Xo=e=>{const t=()=>o,o={tag:!1,inner:e,fold:(s,a)=>s(e),isValue:fn,isError:zo,map:t,mapError:s=>Oo.error(s(e)),bind:t,exists:fn,forall:zo,getOr:To,or:To,getOrThunk:ks,orThunk:ks,getOrDie:Ht(String(e)),each:dt,toOptional:j.none};return o},Oo={value:Ao,error:Xo,fromOption:(e,t)=>e.fold(()=>Xo(t),Ao)},zn={generate:e=>{if(!ve(e))throw new Error("cases must be an array");if(e.length===0)throw new Error("there must be at least one case");const t=[],o={};return Le(e,(s,a)=>{const c=vt(s);if(c.length!==1)throw new Error("one and only one name per case");const d=c[0],h=s[d];if(o[d]!==void 0)throw new Error("duplicate key detected:"+d);if(d==="cata")throw new Error("cannot have a case named cata (sorry)");if(!ve(h))throw new Error("case arguments must be an array");t.push(d),o[d]=(..._)=>{const z=_.length;if(z!==h.length)throw new Error("Wrong number of arguments to case "+d+". Expected "+h.length+" ("+h+"), got "+z);return{fold:(...$)=>{if($.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+$.length);return $[a].apply(null,_)},match:$=>{const V=vt($);if(t.length!==V.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+` -Actual: `+V.join(","));if(!Hs(t,le=>mn(V,le)))throw new Error("Not all branches were specified when using match. Specified: "+V.join(", ")+` -Required: `+t.join(", "));return $[d].apply(null,_)},log:$=>{console.log($,{constructors:t,constructor:d,params:_})}}}}),o}};zn.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const Lr=e=>{const t=[],o=[];return Le(e,s=>{s.fold(a=>{t.push(a)},a=>{o.push(a)})}),{errors:t,values:o}},mi=e=>e.type==="inline-command"||e.type==="inline-format",La=e=>e.type==="block-command"||e.type==="block-format",rc=(e,t)=>(e.type==="block-command"||e.type==="block-format")&&e.trigger===t,vm=e=>{var t;const o=a=>Oo.error({message:a,pattern:e}),s=(a,c,d)=>{if(e.format!==void 0){let h;if(ve(e.format)){if(!Hs(e.format,ft))return o(a+" pattern has non-string items in the `format` array");h=e.format}else if(ft(e.format))h=[e.format];else return o(a+" pattern has non-string `format` parameter");return Oo.value(c(h))}else return e.cmd!==void 0?ft(e.cmd)?Oo.value(d(e.cmd,e.value)):o(a+" pattern has non-string `cmd` parameter"):o(a+" pattern is missing both `format` and `cmd` parameters")};if(!ue(e))return o("Raw pattern is not an object");if(!ft(e.start))return o("Raw pattern is missing `start` parameter");if(e.end!==void 0){if(!ft(e.end))return o("Inline pattern has non-string `end` parameter");if(e.start.length===0&&e.end.length===0)return o("Inline pattern has empty `start` and `end` parameters");let a=e.start,c=e.end;return c.length===0&&(c=a,a=""),s("Inline",d=>({type:"inline-format",start:a,end:c,format:d}),(d,h)=>({type:"inline-command",start:a,end:c,cmd:d,value:h}))}else{if(e.replacement!==void 0)return ft(e.replacement)?e.start.length===0?o("Replacement pattern has empty `start` parameter"):Oo.value({type:"inline-command",start:"",end:e.start,cmd:"mceInsertContent",value:e.replacement}):o("Replacement pattern has non-string `replacement` parameter");{const a=(t=e.trigger)!==null&&t!==void 0?t:"space";return e.start.length===0?o("Block pattern has empty `start` parameter"):s("Block",c=>({type:"block-format",start:e.start,format:c[0],trigger:a}),(c,d)=>({type:"block-command",start:e.start,cmd:c,value:d,trigger:a}))}}},pi=e=>rt(e,La),Hd=e=>rt(e,mi),xg=(e,t)=>({inlinePatterns:Hd(e),blockPatterns:pi(e),dynamicPatternsLookup:t}),vf=(e,t)=>({...e,blockPatterns:rt(e.blockPatterns,o=>rc(o,t))}),wg=e=>{const t=Lr(dn(e,vm));return Le(t.errors,o=>console.error(o.message,o.pattern)),t.values},Ty=e=>t=>{const o=e(t);return wg(o)},_f=_t().deviceType,F_=_f.isTouch(),U5=Ts.DOM,Z5=e=>{const t=e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(",");return ko(t,(o,s)=>{const a=s.split("="),c=a[0],d=a.length>1?a[1]:c;return o[br(c)]=br(d),o},{})},y4=e=>Ut(e,RegExp),Qt=e=>t=>t.options.get(e),gv=e=>ft(e)||ue(e),Xk=(e,t="")=>o=>{const s=ft(o);if(s)if(o.indexOf("=")!==-1){const a=Z5(o);return{value:Gn(a,e.id).getOr(t),valid:s}}else return{value:o,valid:s};else return{valid:!1,message:"Must be a string."}},$_=e=>{const t=e.options.register;t("id",{processor:"string",default:e.id}),t("selector",{processor:"string"}),t("target",{processor:"object"}),t("suffix",{processor:"string"}),t("cache_suffix",{processor:"string"}),t("base_url",{processor:"string"}),t("referrer_policy",{processor:"string",default:""}),t("language_load",{processor:"boolean",default:!0}),t("inline",{processor:"boolean",default:!1}),t("iframe_attrs",{processor:"object",default:{}}),t("doctype",{processor:"string",default:""}),t("document_base_url",{processor:"string",default:e.documentBaseUrl}),t("body_id",{processor:Xk(e,"tinymce"),default:"tinymce"}),t("body_class",{processor:Xk(e),default:""}),t("content_security_policy",{processor:"string",default:""}),t("br_in_pre",{processor:"boolean",default:!0}),t("forced_root_block",{processor:o=>{const s=ft(o)&&Pn(o);return s?{value:o,valid:s}:{valid:!1,message:"Must be a non-empty string."}},default:"p"}),t("forced_root_block_attrs",{processor:"object",default:{}}),t("newline_behavior",{processor:o=>{const s=mn(["block","linebreak","invert","default"],o);return s?{value:o,valid:s}:{valid:!1,message:"Must be one of: block, linebreak, invert or default."}},default:"default"}),t("br_newline_selector",{processor:"string",default:".mce-toc h2,figcaption,caption"}),t("no_newline_selector",{processor:"string",default:""}),t("keep_styles",{processor:"boolean",default:!0}),t("end_container_on_empty_block",{processor:o=>bn(o)?{valid:!0,value:o}:ft(o)?{valid:!0,value:o}:{valid:!1,message:"Must be boolean or a string"},default:"blockquote"}),t("font_size_style_values",{processor:"string",default:"xx-small,x-small,small,medium,large,x-large,xx-large"}),t("font_size_legacy_values",{processor:"string",default:"xx-small,small,medium,large,x-large,xx-large,300%"}),t("font_size_classes",{processor:"string",default:""}),t("automatic_uploads",{processor:"boolean",default:!0}),t("images_reuse_filename",{processor:"boolean",default:!1}),t("images_replace_blob_uris",{processor:"boolean",default:!0}),t("icons",{processor:"string",default:""}),t("icons_url",{processor:"string",default:""}),t("images_upload_url",{processor:"string",default:""}),t("images_upload_base_path",{processor:"string",default:""}),t("images_upload_credentials",{processor:"boolean",default:!1}),t("images_upload_handler",{processor:"function"}),t("language",{processor:"string",default:"en"}),t("language_url",{processor:"string",default:""}),t("entity_encoding",{processor:"string",default:"named"}),t("indent",{processor:"boolean",default:!0}),t("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"}),t("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"}),t("indent_use_margin",{processor:"boolean",default:!1}),t("indentation",{processor:"string",default:"40px"}),t("content_css",{processor:o=>{const s=o===!1||ft(o)||bt(o,ft);return s?ft(o)?{value:dn(o.split(","),br),valid:s}:ve(o)?{value:o,valid:s}:o===!1?{value:[],valid:s}:{value:o,valid:s}:{valid:!1,message:"Must be false, a string or an array of strings."}},default:Kh(e)?[]:["default"]}),t("content_style",{processor:"string"}),t("content_css_cors",{processor:"boolean",default:!1}),t("font_css",{processor:o=>{const s=ft(o)||bt(o,ft);return s?{value:ve(o)?o:dn(o.split(","),br),valid:s}:{valid:!1,message:"Must be a string or an array of strings."}},default:[]}),t("inline_boundaries",{processor:"boolean",default:!0}),t("inline_boundaries_selector",{processor:"string",default:"a[href],code,span.mce-annotation"}),t("object_resizing",{processor:o=>{const s=bn(o)||ft(o);return s?o===!1||_f.isiPhone()||_f.isiPad()?{value:"",valid:s}:{value:o===!0?"table,img,figure.image,div,video,iframe":o,valid:s}:{valid:!1,message:"Must be boolean or a string"}},default:!F_}),t("resize_img_proportional",{processor:"boolean",default:!0}),t("event_root",{processor:"string"}),t("service_message",{processor:"string"}),t("theme",{processor:o=>o===!1||ft(o)||Gt(o),default:"silver"}),t("theme_url",{processor:"string"}),t("formats",{processor:"object"}),t("format_empty_lines",{processor:"boolean",default:!1}),t("format_noneditable_selector",{processor:"string",default:""}),t("preview_styles",{processor:o=>{const s=o===!1||ft(o);return s?{value:o===!1?"":o,valid:s}:{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"}),t("custom_ui_selector",{processor:"string",default:""}),t("hidden_input",{processor:"boolean",default:!0}),t("submit_patch",{processor:"boolean",default:!0}),t("encoding",{processor:"string"}),t("add_form_submit_trigger",{processor:"boolean",default:!0}),t("add_unload_trigger",{processor:"boolean",default:!0}),t("custom_undo_redo_levels",{processor:"number",default:0}),t("disable_nodechange",{processor:"boolean",default:!1}),t("readonly",{processor:"boolean",default:!1}),t("editable_root",{processor:"boolean",default:!0}),t("plugins",{processor:"string[]",default:[]}),t("external_plugins",{processor:"object"}),t("forced_plugins",{processor:"string[]"}),t("model",{processor:"string",default:e.hasPlugin("rtc")?"plugin":"dom"}),t("model_url",{processor:"string"}),t("block_unsupported_drop",{processor:"boolean",default:!0}),t("visual",{processor:"boolean",default:!0}),t("visual_table_class",{processor:"string",default:"mce-item-table"}),t("visual_anchor_class",{processor:"string",default:"mce-item-anchor"}),t("iframe_aria_text",{processor:"string",default:"Rich Text Area. Press ALT-0 for help."}),t("setup",{processor:"function"}),t("init_instance_callback",{processor:"function"}),t("url_converter",{processor:"function",default:e.convertURL}),t("url_converter_scope",{processor:"object",default:e}),t("urlconverter_callback",{processor:"function"}),t("allow_conditional_comments",{processor:"boolean",default:!1}),t("allow_html_data_urls",{processor:"boolean",default:!1}),t("allow_svg_data_urls",{processor:"boolean"}),t("allow_html_in_named_anchor",{processor:"boolean",default:!1}),t("allow_script_urls",{processor:"boolean",default:!1}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("convert_fonts_to_spans",{processor:"boolean",default:!0,deprecated:!0}),t("fix_list_elements",{processor:"boolean",default:!1}),t("preserve_cdata",{processor:"boolean",default:!1}),t("remove_trailing_brs",{processor:"boolean",default:!0}),t("pad_empty_with_br",{processor:"boolean",default:!1}),t("inline_styles",{processor:"boolean",default:!0,deprecated:!0}),t("element_format",{processor:"string",default:"html"}),t("entities",{processor:"string"}),t("schema",{processor:"string",default:"html5"}),t("convert_urls",{processor:"boolean",default:!0}),t("relative_urls",{processor:"boolean",default:!0}),t("remove_script_host",{processor:"boolean",default:!0}),t("custom_elements",{processor:gv}),t("extended_valid_elements",{processor:"string"}),t("invalid_elements",{processor:"string"}),t("invalid_styles",{processor:gv}),t("valid_children",{processor:"string"}),t("valid_classes",{processor:gv}),t("valid_elements",{processor:"string"}),t("valid_styles",{processor:gv}),t("verify_html",{processor:"boolean",default:!0}),t("auto_focus",{processor:o=>ft(o)||o===!0}),t("browser_spellcheck",{processor:"boolean",default:!1}),t("protect",{processor:"array"}),t("images_file_types",{processor:"string",default:"jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp"}),t("deprecation_warnings",{processor:"boolean",default:!0}),t("a11y_advanced_options",{processor:"boolean",default:!1}),t("api_key",{processor:"string"}),t("license_key",{processor:"string"}),t("paste_block_drop",{processor:"boolean",default:!1}),t("paste_data_images",{processor:"boolean",default:!0}),t("paste_preprocess",{processor:"function"}),t("paste_postprocess",{processor:"function"}),t("paste_webkit_styles",{processor:"string",default:"none"}),t("paste_remove_styles_if_webkit",{processor:"boolean",default:!0}),t("paste_merge_formats",{processor:"boolean",default:!0}),t("smart_paste",{processor:"boolean",default:!0}),t("paste_as_text",{processor:"boolean",default:!1}),t("paste_tab_spaces",{processor:"number",default:4}),t("text_patterns",{processor:o=>bt(o,ue)||o===!1?{value:wg(o===!1?[]:o),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"}]}),t("text_patterns_lookup",{processor:o=>Gt(o)?{value:Ty(o),valid:!0}:{valid:!1,message:"Must be a single function"},default:o=>[]}),t("noneditable_class",{processor:"string",default:"mceNonEditable"}),t("editable_class",{processor:"string",default:"mceEditable"}),t("noneditable_regexp",{processor:o=>bt(o,y4)?{value:o,valid:!0}:y4(o)?{value:[o],valid:!0}:{valid:!1,message:"Must be a RegExp or an array of RegExp."},default:[]}),t("table_tab_navigation",{processor:"boolean",default:!0}),t("highlight_on_focus",{processor:"boolean",default:!0}),t("xss_sanitization",{processor:"boolean",default:!0}),t("details_initial_state",{processor:o=>{const s=mn(["inherited","collapsed","expanded"],o);return s?{value:o,valid:s}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),t("details_serialized_state",{processor:o=>{const s=mn(["inherited","collapsed","expanded"],o);return s?{value:o,valid:s}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),t("init_content_sync",{processor:"boolean",default:!1}),t("newdocument_content",{processor:"string",default:""}),t("sandbox_iframes",{processor:"boolean",default:!0}),t("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"]}),t("convert_unsafe_embeds",{processor:"boolean",default:!0}),e.on("ScriptsLoaded",()=>{t("directionality",{processor:"string",default:Mc.isRtl()?"rtl":void 0}),t("placeholder",{processor:"string",default:U5.getAttrib(e.getElement(),"placeholder")})})},sl=Qt("iframe_attrs"),Nu=Qt("doctype"),ld=Qt("document_base_url"),H_=Qt("body_id"),Jk=Qt("body_class"),v4=Qt("content_security_policy"),Qk=Qt("br_in_pre"),ji=Qt("forced_root_block"),hv=Qt("forced_root_block_attrs"),e2=Qt("newline_behavior"),_4=Qt("br_newline_selector"),x4=Qt("no_newline_selector"),t2=Qt("keep_styles"),o2=Qt("end_container_on_empty_block"),As=Qt("automatic_uploads"),Op=Qt("images_reuse_filename"),w4=Qt("images_replace_blob_uris"),n2=Qt("icons"),k4=Qt("icons_url"),s2=Qt("images_upload_url"),C4=Qt("images_upload_base_path"),r2=Qt("images_upload_credentials"),W5=Qt("images_upload_handler"),S4=Qt("content_css_cors"),bv=Qt("referrer_policy"),a2=Qt("language"),q5=Qt("language_url"),E4=Qt("indent_use_margin"),cd=Qt("indentation"),gl=Qt("content_css"),Ay=Qt("content_style"),T4=Qt("font_css"),K5=Qt("directionality"),In=Qt("inline_boundaries_selector"),A4=Qt("object_resizing"),O4=Qt("resize_img_proportional"),i2=Qt("placeholder"),z4=Qt("event_root"),G5=Qt("service_message"),Oy=Qt("theme"),Y5=Qt("theme_url"),yv=Qt("model"),l2=Qt("model_url"),zy=Qt("inline_boundaries"),X5=Qt("formats"),J5=Qt("preview_styles"),Q5=Qt("format_empty_lines"),Fo=Qt("format_noneditable_selector"),N4=Qt("custom_ui_selector"),Kh=Qt("inline"),c2=Qt("hidden_input"),D4=Qt("submit_patch"),R4=Qt("add_form_submit_trigger"),M4=Qt("add_unload_trigger"),B4=Qt("custom_undo_redo_levels"),eM=Qt("disable_nodechange"),L4=Qt("readonly"),ss=Qt("editable_root"),P4=Qt("content_css_cors"),Du=Qt("plugins"),_m=Qt("external_plugins"),V_=Qt("block_unsupported_drop"),Ic=Qt("visual"),j_=Qt("visual_table_class"),Ny=Qt("visual_anchor_class"),vv=Qt("iframe_aria_text"),Dy=Qt("setup"),tM=Qt("init_instance_callback"),oM=Qt("urlconverter_callback"),nM=Qt("auto_focus"),sM=Qt("browser_spellcheck"),jn=Qt("protect"),xf=Qt("paste_block_drop"),xm=Qt("paste_data_images"),rM=Qt("paste_preprocess"),_v=Qt("paste_postprocess"),qn=Qt("newdocument_content"),I4=Qt("paste_webkit_styles"),d2=Qt("paste_remove_styles_if_webkit"),aM=Qt("paste_merge_formats"),Gh=Qt("smart_paste"),Yh=Qt("paste_as_text"),F4=Qt("paste_tab_spaces"),iM=Qt("allow_html_data_urls"),lM=Qt("text_patterns"),xv=Qt("text_patterns_lookup"),Xh=Qt("noneditable_class"),cM=Qt("editable_class"),$4=Qt("noneditable_regexp"),dM=Qt("preserve_cdata"),H4=Qt("highlight_on_focus"),V4=Qt("xss_sanitization"),j4=Qt("init_content_sync"),u2=e=>e.options.isSet("text_patterns_lookup"),f2=e=>zt.explode(e.options.get("font_size_style_values")),m2=e=>zt.explode(e.options.get("font_size_classes")),U4=e=>e.options.get("encoding")==="xml",p2=e=>zt.explode(e.options.get("images_file_types")),Z4=Qt("table_tab_navigation"),U_=Qt("details_initial_state"),W4=Qt("details_serialized_state"),g2=Qt("sandbox_iframes"),Z_=e=>e.options.get("sandbox_iframes_exclusions"),q4=Qt("convert_unsafe_embeds"),K4=Qt("license_key"),G4=Qt("api_key"),uM=no,Y4=wt,wv=e=>{const t=e.parentNode;t&&t.removeChild(e)},h2=e=>{const t=nl(e);return{count:e.length-t.length,text:t}},b2=e=>{let t;for(;(t=e.data.lastIndexOf(ua))!==-1;)e.deleteData(t,1)},y2=(e,t)=>(kg(e),t),fM=(e,t)=>{const o=h2(e.data.substr(0,t.offset())),s=h2(e.data.substr(t.offset()));return(o.text+s.text).length>0?(b2(e),Ue(e,t.offset()-o.count)):t},mM=(e,t)=>{const o=t.container(),s=qi(an(o.childNodes),e).map(a=>aY4(e)&&t.container()===e?fM(e,t):y2(e,t),gM=(e,t)=>t.container()===e.parentNode?mM(e,t):y2(e,t),hM=(e,t)=>Ue.isTextPosition(t)?pM(e,t):gM(e,t),kg=e=>{uM(e)&&Pl(e)&&(py(e)?e.removeAttribute("data-mce-caret"):wv(e)),Y4(e)&&(b2(e),e.data.length===0&&wv(e))},X4=Ho,W_=Xe,bM=ef,v2="*[contentEditable=false],video,audio,embed,object",J4=(e,t,o)=>{const s=Fh(t.getBoundingClientRect(),o);let a,c;if(e.tagName==="BODY"){const h=e.ownerDocument.documentElement;a=e.scrollLeft||h.scrollLeft,c=e.scrollTop||h.scrollTop}else{const h=e.getBoundingClientRect();a=e.scrollLeft-h.left,c=e.scrollTop-h.top}s.left+=a,s.right+=a,s.top+=c,s.bottom+=c,s.width=1;let d=t.offsetWidth-t.clientWidth;return d>0&&(o&&(d*=-1),s.left+=d,s.right+=d),s},Q4=e=>{var t,o;const s=Mr(ye.fromDom(e),v2);for(let a=0;a{const a=Jr();let c,d;const h=ji(e),_=e.dom,z=(oe,fe)=>{let ke;if(I(),bM(fe))return null;if(o(fe)){const Oe=D_(h,fe,oe),Te=J4(t,fe,oe);_.setStyle(Oe,"top",Te.top),_.setStyle(Oe,"caret-color","transparent"),d=Oe;const Pe=_.create("div",{class:"mce-visual-caret","data-mce-bogus":"all"});_.setStyles(Pe,{...Te}),_.add(t,Pe),a.set({caret:Pe,element:fe,before:oe}),oe&&_.addClass(Pe,"mce-visual-caret-before"),$(),ke=fe.ownerDocument.createRange(),ke.setStart(Oe,0),ke.setEnd(Oe,0)}else return d=gy(fe,oe),ke=fe.ownerDocument.createRange(),kv(d.nextSibling)?(ke.setStart(d,0),ke.setEnd(d,0)):(ke.setStart(d,1),ke.setEnd(d,1)),ke;return ke},I=()=>{Q4(t),d&&(kg(d),d=null),a.on(oe=>{_.remove(oe.caret),a.clear()}),c&&(clearInterval(c),c=void 0)},$=()=>{c=setInterval(()=>{a.on(oe=>{s()?_.toggleClass(oe.caret,"mce-visual-caret-hidden"):_.addClass(oe.caret,"mce-visual-caret-hidden")})},500)};return{show:z,hide:I,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:()=>{a.on(oe=>{const fe=J4(t,oe.element,oe.before);_.setStyles(oe.caret,{...fe})})},destroy:()=>clearInterval(c)}},_2=()=>Jo.browser.isFirefox(),kv=e=>X4(e)||W_(e),Cv=e=>(kv(e)||tc(e)&&_2())&&Od(ye.fromDom(e)).exists(js),q_=Ml,K_=Ho,tA=Xe,x2=Dl("display","block table table-cell table-caption list-item"),w2=Pl,oA=hg,yM=no,G_=wt,nA=rd,Jh=e=>e>0,Qh=e=>e<0,Y_=(e,t)=>{let o;for(;o=e(t);)if(!oA(o))return o;return null},Sv=(e,t,o,s,a)=>{const c=new Ma(e,s),d=K_(e)||oA(e);let h;if(Qh(t)){if(d&&(h=Y_(c.prev.bind(c),!0),o(h)))return h;for(;h=Y_(c.prev.bind(c),a);)if(o(h))return h}if(Jh(t)){if(d&&(h=Y_(c.next.bind(c),!0),o(h)))return h;for(;h=Y_(c.next.bind(c),a);)if(o(h))return h}return null},vM=(e,t)=>{const o=a=>q_(a.dom),s=a=>a.dom===t;return ii(ye.fromDom(e),o,s).map(a=>a.dom).getOr(t)},Cg=(e,t)=>{for(;e&&e!==t;){if(x2(e))return e;e=e.parentNode}return null},wm=(e,t,o)=>Cg(e.container(),o)===Cg(t.container(),o),X_=(e,t)=>{if(!t)return j.none();const o=t.container(),s=t.offset();return yM(o)?j.from(o.childNodes[s+e]):j.none()},sA=(e,t)=>{var o;const a=((o=t.ownerDocument)!==null&&o!==void 0?o:document).createRange();return e?(a.setStartBefore(t),a.setEndBefore(t)):(a.setStartAfter(t),a.setEndAfter(t)),a},rA=(e,t,o)=>Cg(t,e)===Cg(o,e),k2=(e,t,o)=>{const s=e?"previousSibling":"nextSibling";let a=o;for(;a&&a!==t;){let c=a[s];if(c&&w2(c)&&(c=c[s]),K_(c)||tA(c)){if(rA(t,c,a))return c;break}if(nA(c))break;a=a.parentNode}return null},Ev=$t(sA,!0),Tv=$t(sA,!1),C2=(e,t,o)=>{let s;const a=$t(k2,!0,t),c=$t(k2,!1,t),d=o.startContainer,h=o.startOffset;if(hg(d)){const _=G_(d)?d.parentNode:d,z=_.getAttribute("data-mce-caret");if(z==="before"&&(s=_.nextSibling,Cv(s)))return Ev(s);if(z==="after"&&(s=_.previousSibling,Cv(s)))return Tv(s)}if(!o.collapsed)return o;if(wt(d)){if(w2(d)){if(e===1){if(s=c(d),s)return Ev(s);if(s=a(d),s)return Tv(s)}if(e===-1){if(s=a(d),s)return Tv(s);if(s=c(d),s)return Ev(s)}return o}if(zu(d)&&h>=d.data.length-1)return e===1&&(s=c(d),s)?Ev(s):o;if(Ph(d)&&h<=1)return e===-1&&(s=a(d),s)?Tv(s):o;if(h===d.data.length)return s=c(d),s?Ev(s):o;if(h===0)return s=a(d),s?Tv(s):o}return o},aA=(e,t)=>X_(e?0:-1,t).filter(K_),Av=(e,t,o)=>{const s=C2(e,t,o);return e===-1?Ue.fromRangeStart(s):Ue.fromRangeEnd(s)},J_=e=>j.from(e.getNode()).map(ye.fromDom),_M=e=>j.from(e.getNode(!0)).map(ye.fromDom),S2=(e,t)=>{let o=t;for(;o=e(o);)if(o.isVisible())return o;return o},Q_=(e,t)=>{const o=wm(e,t);return!o&&$s(e.getNode())?!0:o};var Oi;(function(e){e[e.Backwards=-1]="Backwards",e[e.Forwards=1]="Forwards"})(Oi||(Oi={}));const xM=Ho,km=wt,iA=no,po=$s,eb=rd,E2=vg,ex=Vh,T2=(e,t)=>{const o=[];let s=e;for(;s&&s!==t;)o.push(s),s=s.parentNode;return o},lA=(e,t)=>e.hasChildNodes()&&t{if(Jh(e)){if(eb(t.previousSibling)&&!km(t.previousSibling))return Ue.before(t);if(km(t))return Ue(t,0)}if(Qh(e)){if(eb(t.nextSibling)&&!km(t.nextSibling))return Ue.after(t);if(km(t))return Ue(t,t.data.length)}return Qh(e)?po(t)?Ue.before(t):Ue.after(t):Ue.before(t)},cA=(e,t)=>{const o=t.nextSibling;return o&&eb(o)?km(o)?Ue(o,0):Ue.before(o):A2(Oi.Forwards,Ue.after(t),e)},A2=(e,t,o)=>{let s,a,c,d;if(!iA(o)||!t)return null;if(t.isEqual(Ue.after(o))&&o.lastChild){if(d=Ue.after(o.lastChild),Qh(e)&&eb(o.lastChild)&&iA(o.lastChild))return po(o.lastChild)?Ue.before(o.lastChild):d}else d=t;const h=d.container();let _=d.offset();if(km(h)){if(Qh(e)&&_>0)return Ue(h,--_);if(Jh(e)&&_0&&(a=lA(h,_-1),eb(a)))return!E2(a)&&(c=Sv(a,e,ex,a),c)?km(c)?Ue(c,c.data.length):Ue.after(c):km(a)?Ue(a,a.data.length):Ue.before(a);if(Jh(e)&&_({next:t=>A2(Oi.Forwards,t,e),prev:t=>A2(Oi.Backwards,t,e)}),en=(e,t,o)=>{const s=e?Ue.before(o):Ue.after(o);return dd(e,t,s)},dA=e=>$s(e)?Ue.before(e):Ue.after(e),uA=e=>Ue.isTextPosition(e)?e.offset()===0:rd(e.getNode()),fA=e=>{if(Ue.isTextPosition(e)){const t=e.container();return e.offset()===t.data.length}else return rd(e.getNode(!0))},mA=(e,t)=>!Ue.isTextPosition(e)&&!Ue.isTextPosition(t)&&e.getNode()===t.getNode(!0),Po=e=>!Ue.isTextPosition(e)&&$s(e.getNode()),zv=(e,t,o)=>e?!mA(t,o)&&!Po(t)&&fA(t)&&uA(o):!mA(o,t)&&uA(t)&&fA(o),dd=(e,t,o)=>{const s=So(t);return j.from(e?s.next(o):s.prev(o))},tb=(e,t,o)=>dd(e,t,o).bind(s=>wm(o,s,t)&&zv(e,o,s)?dd(e,t,s):j.some(s)),pA=(e,t,o,s)=>tb(e,t,o).bind(a=>s(a)?pA(e,t,a,s):j.some(a)),Ry=(e,t)=>{const o=e?t.firstChild:t.lastChild;return wt(o)?j.some(Ue(o,e?0:o.data.length)):o?rd(o)?j.some(e?Ue.before(o):dA(o)):en(e,t,o):j.none()},Il=$t(dd,!0),Fc=$t(dd,!1),No=$t(Ry,!0),Vd=$t(Ry,!1),My="_mce_caret",ud=e=>no(e)&&e.id===My,Sg=(e,t)=>{let o=t;for(;o&&o!==e;){if(ud(o))return o;o=o.parentNode}return null},gA=e=>ft(e.start),hA=e=>Ro(e,"rng"),bA=e=>Ro(e,"id"),O2=e=>Ro(e,"name"),yA=e=>zt.isArray(e.start),tx=e=>!O2(e)&&bn(e.forward)?e.forward:!0,vA=(e,t)=>(no(t)&&e.isBlock(t)&&!t.innerHTML&&(t.innerHTML='
'),t),wM=(e,t)=>{const o=j.from(K(e.getRoot(),t.start)),s=j.from(K(e.getRoot(),t.end));return va(o,s,(a,c)=>{const d=e.createRng();return d.setStart(a.container(),a.offset()),d.setEnd(c.container(),c.offset()),{range:d,forward:tx(t)}})},kM=(e,t)=>{var o;const a=((o=e.ownerDocument)!==null&&o!==void 0?o:document).createTextNode(ua);e.appendChild(a),t.setStart(a,0),t.setEnd(a,0)},z2=e=>!e.hasChildNodes(),N2=(e,t)=>Vd(e).fold(fn,o=>(t.setStart(o.container(),o.offset()),t.setEnd(o.container(),o.offset()),!0)),_A=(e,t,o)=>z2(t)&&Sg(e,t)?(kM(t,o),!0):!1,xA=(e,t,o,s)=>{const a=o[t?"start":"end"],c=e.getRoot();if(a){let d=c,h=a[0];for(let _=a.length-1;d&&_>=1;_--){const z=d.childNodes;if(_A(c,d,s))return!0;if(a[_]>z.length-1)return _A(c,d,s)?!0:N2(d,s);d=z[a[_]]}wt(d)&&(h=Math.min(a[0],d.data.length)),no(d)&&(h=Math.min(a[0],d.childNodes.length)),t?s.setStart(d,h):s.setEnd(d,h)}return!0},D2=e=>wt(e)&&e.data.length>0,wA=(e,t,o)=>{const s=e.get(o.id+"_"+t),a=s==null?void 0:s.parentNode,c=o.keep;if(s&&a){let d,h;if(t==="start"?c?s.hasChildNodes()?(d=s.firstChild,h=1):D2(s.nextSibling)?(d=s.nextSibling,h=0):D2(s.previousSibling)?(d=s.previousSibling,h=s.previousSibling.data.length):(d=a,h=e.nodeIndex(s)+1):(d=a,h=e.nodeIndex(s)):c?s.hasChildNodes()?(d=s.firstChild,h=1):D2(s.previousSibling)?(d=s.previousSibling,h=s.previousSibling.data.length):(d=a,h=e.nodeIndex(s)):(d=a,h=e.nodeIndex(s)),!c){const _=s.previousSibling,z=s.nextSibling;zt.each(zt.grep(s.childNodes),$=>{wt($)&&($.data=$.data.replace(/\uFEFF/g,""))});let I;for(;I=e.get(o.id+"_"+t);)e.remove(I,!0);if(wt(z)&&wt(_)&&!Jo.browser.isOpera()){const $=_.data.length;_.appendData(z.data),e.remove(z),d=_,h=$}}return j.some(Ue(d,h))}else return j.none()},kA=(e,t)=>{const o=e.createRng();return xA(e,!0,t,o)&&xA(e,!1,t,o)?j.some({range:o,forward:tx(t)}):j.none()},ob=(e,t)=>{const o=wA(e,"start",t),s=wA(e,"end",t);return va(o,s.or(o),(a,c)=>{const d=e.createRng();return d.setStart(vA(e,a.container()),a.offset()),d.setEnd(vA(e,c.container()),c.offset()),{range:d,forward:tx(t)}})},CA=(e,t)=>j.from(e.select(t.name)[t.index]).map(o=>{const s=e.createRng();return s.selectNode(o),{range:s,forward:!0}}),SA=(e,t)=>{const o=e.dom;if(t){if(yA(t))return kA(o,t);if(gA(t))return wM(o,t);if(bA(t))return ob(o,t);if(O2(t))return CA(o,t);if(hA(t))return j.some({range:t.rng,forward:tx(t)})}return j.none()},CM=(e,t,o)=>Be(e,t,o),SM=(e,t)=>{SA(e,t).each(({range:o,forward:s})=>{e.setRng(o,s)})},fd=e=>no(e)&&e.tagName==="SPAN"&&e.getAttribute("data-mce-type")==="bookmark",Ui=(e=>t=>e===t)(da),nb=e=>e!==""&&` \f -\r \v`.indexOf(e)!==-1,zp=e=>!nb(e)&&!Ui(e)&&!Qc(e),or=e=>{const t=[];if(e)for(let o=0;oLn(e,t=>{const o=yg(t);return o?[ye.fromDom(o)]:[]}),Nv=e=>or(e).length>1,ox=e=>rt(jd(e),Bc),By=e=>Mr(e,"td[data-mce-selected],th[data-mce-selected]"),EA=(e,t)=>{const o=By(t);return o.length>0?o:ox(e)},wf=e=>EA(or(e.selection.getSel()),ye.fromDom(e.getBody())),fs=(e,t)=>Tl(e,"table",t),Dv=e=>{const t=e.startContainer,o=e.startOffset;return wt(t)?o===0?j.some(ye.fromDom(t)):j.none():j.from(t.childNodes[o]).map(ye.fromDom)},TA=e=>{const t=e.endContainer,o=e.endOffset;return wt(t)?o===t.data.length?j.some(ye.fromDom(t)):j.none():j.from(t.childNodes[o-1]).map(ye.fromDom)},R2=e=>Ii(e).fold(Ge([e]),t=>[e].concat(R2(t))),Rv=e=>kc(e).fold(Ge([e]),t=>En(t)==="br"?Ur(t).map(o=>[e].concat(Rv(o))).getOr([]):[e].concat(Rv(t))),Mv=(e,t)=>va(Dv(t),TA(t),(o,s)=>{const a=On(R2(e),$t(kn,o)),c=On(Rv(e),$t(kn,s));return a.isSome()&&c.isSome()}).getOr(!1),Bv=(e,t,o,s)=>{const a=o,c=new Ma(o,a),d=Bi(e.schema.getMoveCaretBeforeOnEnterElements(),(_,z)=>!mn(["td","th","table"],z.toLowerCase()));let h=o;do{if(wt(h)&&zt.trim(h.data).length!==0){s?t.setStart(h,0):t.setEnd(h,h.data.length);return}if(d[h.nodeName]){s?t.setStartBefore(h):h.nodeName==="BR"?t.setEndBefore(h):t.setEndAfter(h);return}}while(h=s?c.next():c.prev());a.nodeName==="BODY"&&(s?t.setStart(a,0):t.setEnd(a,a.childNodes.length))},Ly=e=>{const t=e.selection.getSel();return Fe(t)&&t.rangeCount>0},Py=(e,t)=>{const o=wf(e);o.length>0?Le(o,s=>{const a=s.dom,c=e.dom.createRng();c.setStartBefore(a),c.setEndAfter(a),t(c,!0)}):t(e.selection.getRng(),!1)},nx=(e,t,o)=>{const s=Pt(e,t);o(s),e.moveToBookmark(s)},Iy=e=>D(e==null?void 0:e.nodeType),sx=e=>no(e)&&!fd(e)&&!ud(e)&&!Md(e),AA=(e,t)=>{if(sx(t)&&!/^(TD|TH)$/.test(t.nodeName)){const o=e.getAttrib(t,"data-mce-selected"),s=parseInt(o,10);return!isNaN(s)&&s>0}else return!1},M2=(e,t,o)=>{const{selection:s,dom:a}=e,c=s.getNode(),d=Ho(c);nx(s,!0,()=>{t()}),d&&Ho(c)&&a.isChildOf(c,e.getBody())?e.selection.select(c):o(s.getStart())&&OA(a,s)},OA=(e,t)=>{var o,s;const a=t.getRng(),{startContainer:c,startOffset:d}=a,h=t.getNode();if(!AA(e,h)&&no(c)){const _=c.childNodes,z=e.getRoot();let I;if(d<_.length){const $=_[d];I=new Ma($,(o=e.getParent($,e.isBlock))!==null&&o!==void 0?o:z)}else{const $=_[_.length-1];I=new Ma($,(s=e.getParent($,e.isBlock))!==null&&s!==void 0?s:z),I.next(!0)}for(let $=I.current();$;$=I.next()){if(e.getContentEditable($)==="false")return;if(wt($)&&!B2($)){a.setStart($,0),t.setRng(a);return}}}},sb=(e,t,o)=>{if(e){const s=t?"nextSibling":"previousSibling";for(e=e[s];e;e=e[s])if(no(e)||!B2(e))return e}},rx=(e,t)=>!!e.getTextBlockElements()[t.nodeName.toLowerCase()]||zc(e,t),Eg=(e,t,o)=>e.schema.isValidChild(t,o),B2=(e,t=!1)=>{if(Fe(e)&&wt(e)){const o=t?e.data.replace(/ /g," "):e.data;return Fi(o)}else return!1},TM=e=>Fe(e)&&wt(e)&&e.length===0,zA=(e,t)=>{const o="[data-mce-cef-wrappable]",s=Fo(e),a=ki(s)?o:`${o},${s}`;return ls(ye.fromDom(t),a)},L2=(e,t)=>{const o=e.dom;return sx(t)&&o.getContentEditable(t)==="false"&&zA(e,t)&&o.select('[contenteditable="true"]',t).length===0},Np=(e,t)=>Gt(e)?e(t):(Fe(t)&&(e=e.replace(/%(\w+)/g,(o,s)=>t[s]||o)),e),Fy=(e,t)=>(e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()),ax=(e,t)=>{if(uo(e))return null;{let o=String(e);return(t==="color"||t==="backgroundColor")&&(o=xh(o)),t==="fontWeight"&&e===700&&(o="bold"),t==="fontFamily"&&(o=o.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),o}},Lv=(e,t,o)=>{const s=e.getStyle(t,o);return ax(s,o)},P2=(e,t)=>{let o;return e.getParent(t,s=>no(s)?(o=e.getStyle(s,"text-decoration"),!!o&&o!=="none"):!1),o},Pv=(e,t,o)=>e.getParents(t,o,e.getRoot()),ix=(e,t,o)=>{const s=e.formatter.get(t);return Fe(s)&&Bn(s,o)},NA=(e,t)=>ix(e,t,s=>{const a=c=>Gt(c)||c.length>1&&c.charAt(0)==="%";return Bn(["styles","attributes"],c=>Gn(s,c).exists(d=>{const h=ve(d)?d:vl(d);return Bn(h,a)}))}),DA=(e,t,o)=>{const s=["inline","block","selector","attributes","styles","classes"],a=c=>Bi(c,(d,h)=>Bn(s,_=>_===h));return ix(e,t,c=>{const d=a(c);return ix(e,o,h=>{const _=a(h);return $r(d,_)})})},kf=e=>$a(e,"block"),RA=e=>kf(e)&&e.wrapper===!0,MA=e=>kf(e)&&e.wrapper!==!0,$c=e=>$a(e,"selector"),Ja=e=>$a(e,"inline"),BA=e=>$c(e)&&Ja(e)&&wd(Gn(e,"mixed"),!0),lx=e=>$c(e)&&e.expand!==!1&&!Ja(e),LA=e=>{const t=[];let o=e;for(;o;){if(wt(o)&&o.data!==ua||o.childNodes.length>1)return[];no(o)&&t.push(o),o=o.firstChild}return t},I2=e=>LA(e).length>0,cx=e=>ud(e.dom)&&I2(e.dom),Tg=fd,Iv=Pv,dx=B2,ux=rx,PA=e=>$s(e)&&e.getAttribute("data-mce-bogus")&&!e.nextSibling,Fv=(e,t)=>{let o=t;for(;o;){if(no(o)&&e.getContentEditable(o))return e.getContentEditable(o)==="false"?o:t;o=o.parentNode}return t},fx=(e,t,o,s)=>{const a=t.data;if(e){for(let c=o;c>0;c--)if(s(a.charAt(c-1)))return c}else for(let c=o;cfx(e,t,o,s=>Ui(s)||nb(s)),F2=(e,t,o)=>fx(e,t,o,zp),$2=(e,t,o,s,a,c)=>{let d;const h=e.getParent(o,e.isBlock)||t,_=(I,$,V)=>{const ee=Eu(e),le=a?ee.backwards:ee.forwards;return j.from(le(I,$,(oe,fe)=>Tg(oe.parentNode)?-1:(d=oe,V(a,oe,fe)),h))};return _(o,s,$v).bind(I=>c?_(I.container,I.offset+(a?-1:0),F2):j.some(I)).orThunk(()=>d?j.some({container:d,offset:a?0:d.length}):j.none())},rb=(e,t,o,s,a)=>{const c=s[a];wt(s)&&ki(s.data)&&c&&(s=c);const d=Iv(e,s);for(let h=0;h{var a;let c=o;const d=e.getRoot(),h=t[0];if(kf(h)&&(c=h.wrapper?null:e.getParent(o,h.block,d)),!c){const _=(a=e.getParent(o,"LI,TD,TH,SUMMARY"))!==null&&a!==void 0?a:d;c=e.getParent(wt(o)?o.parentNode:o,z=>z!==d&&ux(e.schema,z),_)}if(c&&kf(h)&&h.wrapper&&(c=Iv(e,c,"ul,ol").reverse()[0]||c),!c)for(c=o;c&&c[s]&&!e.isBlock(c[s])&&(c=c[s],!Fy(c,"br")););return c||o},px=(e,t,o,s)=>{const a=o.parentNode;return Fe(o[s])?!1:a===t||uo(a)||e.isBlock(a)?!0:px(e,t,a,s)},Dp=(e,t,o,s,a)=>{let c=o;const d=a?"previousSibling":"nextSibling",h=e.getRoot();if(wt(o)&&!dx(o)&&(a?s>0:sTg(e.parentNode)||Tg(e),Ag=(e,t,o,s=!1)=>{let{startContainer:a,startOffset:c,endContainer:d,endOffset:h}=t;const _=o[0];return no(a)&&a.hasChildNodes()&&(a=fa(a,c),wt(a)&&(c=0)),no(d)&&d.hasChildNodes()&&(d=fa(d,t.collapsed?h:h-1),wt(d)&&(h=d.data.length)),a=Fv(e,a),d=Fv(e,d),Rp(a)&&(a=Tg(a)?a:a.parentNode,t.collapsed?a=a.previousSibling||a:a=a.nextSibling||a,wt(a)&&(c=t.collapsed?a.length:0)),Rp(d)&&(d=Tg(d)?d:d.parentNode,t.collapsed?d=d.nextSibling||d:d=d.previousSibling||d,wt(d)&&(h=t.collapsed?0:d.length)),t.collapsed&&($2(e,e.getRoot(),a,c,!0,s).each(({container:$,offset:V})=>{a=$,c=V}),$2(e,e.getRoot(),d,h,!1,s).each(({container:$,offset:V})=>{d=$,h=V})),(Ja(_)||_.block_expand)&&((!Ja(_)||!wt(a)||c===0)&&(a=Dp(e,o,a,c,!0)),(!Ja(_)||!wt(d)||h===d.data.length)&&(d=Dp(e,o,d,h,!1))),lx(_)&&(a=rb(e,o,t,a,"previousSibling"),d=rb(e,o,t,d,"nextSibling")),(kf(_)||$c(_))&&(a=mx(e,o,a,"previousSibling"),d=mx(e,o,d,"nextSibling"),kf(_)&&(e.isBlock(a)||(a=Dp(e,o,a,c,!0),wt(a)&&(c=0)),e.isBlock(d)||(d=Dp(e,o,d,h,!1),wt(d)&&(h=d.data.length)))),no(a)&&a.parentNode&&(c=e.nodeIndex(a),a=a.parentNode),no(d)&&d.parentNode&&(h=e.nodeIndex(d)+1,d=d.parentNode),{startContainer:a,startOffset:c,endContainer:d,endOffset:h}},Hv=(e,t,o)=>{var s;const a=t.startOffset,c=fa(t.startContainer,a),d=t.endOffset,h=fa(t.endContainer,d-1),_=fe=>{const ke=fe[0];wt(ke)&&ke===c&&a>=ke.data.length&&fe.splice(0,1);const Oe=fe[fe.length-1];return d===0&&fe.length>0&&Oe===h&&wt(Oe)&&fe.splice(fe.length-1,1),fe},z=(fe,ke,Oe)=>{const Te=[];for(;fe&&fe!==Oe;fe=fe[ke])Te.push(fe);return Te},I=(fe,ke)=>e.getParent(fe,Oe=>Oe.parentNode===ke,ke),$=(fe,ke,Oe)=>{const Te=Oe?"nextSibling":"previousSibling";for(let Pe=fe,ht=Pe.parentNode;Pe&&Pe!==ke;Pe=ht){ht=Pe.parentNode;const Mt=z(Pe===fe?Pe:Pe[Te],Te);Mt.length&&(Oe||Mt.reverse(),o(_(Mt)))}};if(c===h)return o(_([c]));const V=(s=e.findCommonAncestor(c,h))!==null&&s!==void 0?s:e.getRoot();if(e.isChildOf(c,h))return $(c,V,!0);if(e.isChildOf(h,c))return $(h,V);const ee=I(c,V)||c,le=I(h,V)||h;$(c,ee,!0);const oe=z(ee===c?ee:ee.nextSibling,"nextSibling",le===h?le.nextSibling:le);oe.length&&o(_(oe)),$(h,le)},AM=['pre[class*=language-][contenteditable="false"]',"figure.image","div[data-ephox-embed-iri]","div.tiny-pageembed","div.mce-toc","div[data-mce-toc]"],IA=e=>Rs(e)&&mm(e)===ua,FA=(e,t,o,s)=>ia(t).fold(()=>"skipping",a=>s==="br"||IA(t)?"valid":X1(t)?"existing":ud(t.dom)?"caret":Bn(AM,c=>ls(t,c))?"valid-block":!Eg(e,o,s)||!Eg(e,En(a),o)?"invalid-child":"valid"),Og=(e,t)=>{const o=Ag(e.dom,t,[{inline:"span"}]);t.setStart(o.startContainer,o.startOffset),t.setEnd(o.endContainer,o.endOffset),e.selection.setRng(t)},zg=(e,t,o,s,a,c)=>{const{uid:d=t,...h}=o;Kl(e,mr()),Rr(e,`${Br()}`,d),Rr(e,`${pr()}`,s);const{attributes:_={},classes:z=[]}=a(d,h);if(Ha(e,_),Th(e,z),c){z.length>0&&Rr(e,`${ir()}`,z.join(","));const I=vt(_);I.length>0&&Rr(e,`${Tr()}`,I.join(","))}},zi=e=>{Ra(e,mr()),rn(e,`${Br()}`),rn(e,`${pr()}`),rn(e,`${us()}`);const t=Sr(e,`${Tr()}`).map(s=>s.split(",")).getOr([]),o=Sr(e,`${ir()}`).map(s=>s.split(",")).getOr([]);Le(t,s=>rn(e,s)),wp(e,o),rn(e,`${ir()}`),rn(e,`${Tr()}`)},Cm=(e,t,o,s,a)=>{const c=ye.fromTag("span",e);return zg(c,t,o,s,a,!1),c},ns=(e,t,o,s,a,c)=>{const d=[],h=Cm(e.getDoc(),o,c,s,a),_=Jr(),z=()=>{_.clear()},I=()=>_.get().getOrThunk(()=>{const le=Ar(h);return d.push(le),_.set(le),le}),$=le=>{Le(le,V)},V=le=>{switch(FA(e,le,"span",En(le))){case"invalid-child":{z();const fe=xa(le);$(fe),z();break}case"valid-block":{z(),zg(le,o,c,s,a,!0);break}case"valid":{const fe=I();Si(le,fe);break}}},ee=le=>{const oe=dn(le,ye.fromDom);$(oe)};return Hv(e.dom,t,le=>{z(),ee(le)}),d},OM=(e,t,o,s)=>{e.undoManager.transact(()=>{const a=e.selection,c=a.getRng(),d=wf(e).length>0,h=Ti("mce-annotation");if(c.collapsed&&!d&&Og(e,c),a.getRng().collapsed&&!d){const _=Cm(e.getDoc(),h,s,t,o.decorate);Ql(_,da),a.getRng().insertNode(_.dom),a.select(_.dom)}else nx(a,!1,()=>{Py(e,_=>{ns(e,_,h,t,o.decorate,s)})})})},$A=e=>{const t=Q1();uy(e,t);const o=dy(e,t),s=Ed("span"),a=c=>{Le(c,d=>{s(d)?wa(d):zi(d)})};return{register:(c,d)=>{t.register(c,d)},annotate:(c,d)=>{t.lookup(c).each(h=>{OM(e,c,h,d)})},annotationChanged:(c,d)=>{o.addListener(c,d)},remove:c=>{cy(e,j.some(c)).each(({elements:d})=>{const h=e.selection.getBookmark();a(d),e.selection.moveToBookmark(h)})},removeAll:c=>{const d=e.selection.getBookmark();nn(xp(e,c),(h,_)=>{a(h)}),e.selection.moveToBookmark(d)},getAll:c=>{const d=xp(e,c);return Mi(d,h=>dn(h,_=>_.dom))}}},ws=e=>({getBookmark:$t(CM,e),moveToBookmark:$t(SM,e)});ws.isBookmarkNode=fd;const H2=(e,t,o)=>o.collapsed?!1:Bn(o.getClientRects(),s=>by(s,e,t)),Vv=(e,t)=>e.dispatch("PreProcess",t),jv=(e,t)=>e.dispatch("PostProcess",t),Uv=e=>{e.dispatch("remove")},Zv=e=>{e.dispatch("detach")},HA=(e,t)=>{e.dispatch("SwitchMode",{mode:t})},zM=(e,t,o,s,a)=>{e.dispatch("ObjectResizeStart",{target:t,width:o,height:s,origin:a})},NM=(e,t,o,s,a)=>{e.dispatch("ObjectResized",{target:t,width:o,height:s,origin:a})},DM=e=>{e.dispatch("PreInit")},RM=e=>{e.dispatch("PostRender")},Pr=e=>{e.dispatch("Init")},VA=(e,t)=>{e.dispatch("PlaceholderToggle",{state:t})},V2=(e,t,o)=>{e.dispatch(t,o)},jA=(e,t,o,s)=>{e.dispatch("FormatApply",{format:t,node:o,vars:s})},UA=(e,t,o,s)=>{e.dispatch("FormatRemove",{format:t,node:o,vars:s})},MM=(e,t)=>e.dispatch("BeforeSetContent",t),ac=(e,t)=>e.dispatch("SetContent",t),Cf=(e,t)=>e.dispatch("BeforeGetContent",t),ZA=(e,t)=>e.dispatch("GetContent",t),j2=(e,t)=>{e.dispatch("AutocompleterStart",t)},U2=(e,t)=>{e.dispatch("AutocompleterUpdate",t)},Z2=(e,t)=>{e.dispatch("AutocompleterUpdateActiveRange",t)},BM=e=>{e.dispatch("AutocompleterEnd")},Wv=(e,t,o)=>e.dispatch("PastePreProcess",{content:t,internal:o}),gx=(e,t,o)=>e.dispatch("PastePostProcess",{node:t,internal:o}),hx=(e,t)=>e.dispatch("PastePlainTextToggle",{state:t}),LM=(e,t)=>e.dispatch("EditableRootStateChange",{state:t}),Zt={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:e=>e.shiftKey||e.ctrlKey||e.altKey||Zt.metaKeyPressed(e),metaKeyPressed:e=>Jo.os.isMacOS()||Jo.os.isiOS()?e.metaKey:e.ctrlKey&&!e.altKey},ab="data-mce-selected",PM="table,img,figure.image,hr,video,span.mce-preview-object,details",md=Math.abs,Ng=Math.round,bx={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},Ru=e=>e.type==="longpress"||e.type.indexOf("touch")===0,ps=(e,t)=>{const o=t.dom,s=t.getDoc(),a=document,c=t.getBody();let d,h,_,z,I,$,V,ee,le,oe,fe,ke,Oe,Te,Pe,ht,Mt;const Yt=qt=>Fe(qt)&&(Rl(qt)||o.is(qt,"figure.image")),Qe=qt=>Xe(qt)||o.hasClass(qt,"mce-preview-object"),Ve=(qt,hn)=>{if(Ru(qt)){const Tn=qt.touches[0];return Yt(qt.target)&&!H2(Tn.clientX,Tn.clientY,hn)}else return Yt(qt.target)&&!H2(qt.clientX,qt.clientY,hn)},mt=qt=>{const hn=qt.target;Ve(qt,t.selection.getRng())&&!qt.isDefaultPrevented()&&t.selection.select(hn)},to=qt=>o.hasClass(qt,"mce-preview-object")&&Fe(qt.firstElementChild)?[qt,qt.firstElementChild]:o.is(qt,"figure.image")?[qt.querySelector("img")]:[qt],bo=qt=>{const hn=A4(t);return!hn||qt.getAttribute("data-mce-resize")==="false"||qt===t.getBody()?!1:o.hasClass(qt,"mce-preview-object")&&Fe(qt.firstElementChild)?ls(ye.fromDom(qt.firstElementChild),hn):ls(ye.fromDom(qt),hn)},gn=(qt,hn)=>{if(Qe(hn))return qt.create("img",{src:Jo.transparentSrc});if(tc(hn)){const hi=vs(z.name,"n")?St:Vo,gs=hn.cloneNode(!0);return hi(qt.select("tr",gs)).each(ti=>{const Nf=qt.select("td,th",ti);qt.setStyle(ti,"height",null),Le(Nf,Jp=>qt.setStyle(Jp,"height",null))}),gs}else return hn.cloneNode(!0)},Cn=(qt,hn,Tn)=>{if(Fe(Tn)){const hi=to(qt);Le(hi,gs=>{gs.style[hn]||!t.schema.isValid(gs.nodeName.toLowerCase(),hn)?o.setStyle(gs,hn,Tn):o.setAttrib(gs,hn,""+Tn)})}},ds=(qt,hn,Tn)=>{Cn(qt,"width",hn),Cn(qt,"height",Tn)},hs=qt=>{let hn,Tn,hi,gs,ti;hn=qt.screenX-$,Tn=qt.screenY-V,Te=hn*z[2]+oe,Pe=Tn*z[3]+fe,Te=Te<5?5:Te,Pe=Pe<5?5:Pe,(Yt(d)||Qe(d))&&O4(t)!==!1?hi=!Zt.modifierPressed(qt):hi=Zt.modifierPressed(qt),hi&&(md(hn)>md(Tn)?(Pe=Ng(Te*ke),Te=Ng(Pe/ke)):(Te=Ng(Pe/ke),Pe=Ng(Te*ke))),ds(h,Te,Pe),gs=z.startPos.x+hn,ti=z.startPos.y+Tn,gs=gs>0?gs:0,ti=ti>0?ti:0,o.setStyles(_,{left:gs,top:ti,display:"block"}),_.innerHTML=Te+" × "+Pe,z[2]<0&&h.clientWidth<=Te&&o.setStyle(h,"left",ee+(oe-Te)),z[3]<0&&h.clientHeight<=Pe&&o.setStyle(h,"top",le+(fe-Pe)),hn=c.scrollWidth-ht,Tn=c.scrollHeight-Mt,hn+Tn!==0&&o.setStyles(_,{left:gs-hn,top:ti-Tn}),Oe||(zM(t,d,oe,fe,"corner-"+z.name),Oe=!0)},qr=()=>{const qt=Oe;Oe=!1,qt&&(Cn(d,"width",Te),Cn(d,"height",Pe)),o.unbind(s,"mousemove",hs),o.unbind(s,"mouseup",qr),a!==s&&(o.unbind(a,"mousemove",hs),o.unbind(a,"mouseup",qr)),o.remove(h),o.remove(_),o.remove(I),ll(d),qt&&(NM(t,d,Te,Pe,"corner-"+z.name),o.setAttrib(d,"style",o.getAttrib(d,"style"))),t.nodeChanged()},ll=qt=>{jt();const hn=o.getPos(qt,c),Tn=hn.x,hi=hn.y,gs=qt.getBoundingClientRect(),ti=gs.width||gs.right-gs.left,Nf=gs.height||gs.bottom-gs.top;d!==qt&&(Ft(),d=qt,Te=Pe=0);const Jp=t.dispatch("ObjectSelected",{target:qt});bo(qt)&&!Jp.isDefaultPrevented()?nn(bx,(fc,ou)=>{const Df=Rf=>{const _o=to(d)[0];$=Rf.screenX,V=Rf.screenY,oe=_o.clientWidth,fe=_o.clientHeight,ke=fe/oe,z=fc,z.name=ou,z.startPos={x:ti*fc[0]+Tn,y:Nf*fc[1]+hi},ht=c.scrollWidth,Mt=c.scrollHeight,I=o.add(c,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),o.setStyles(I,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),h=gn(o,d),o.addClass(h,"mce-clonedresizable"),o.setAttrib(h,"data-mce-bogus","all"),h.contentEditable="false",o.setStyles(h,{left:Tn,top:hi,margin:0}),ds(h,ti,Nf),h.removeAttribute(ab),c.appendChild(h),o.bind(s,"mousemove",hs),o.bind(s,"mouseup",qr),a!==s&&(o.bind(a,"mousemove",hs),o.bind(a,"mouseup",qr)),_=o.add(c,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},oe+" × "+fe)};let nu=o.get("mceResizeHandle"+ou);nu&&o.remove(nu),nu=o.add(c,"div",{id:"mceResizeHandle"+ou,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+ou+"-resize; margin:0; padding:0"}),o.bind(nu,"mousedown",Rf=>{Rf.stopImmediatePropagation(),Rf.preventDefault(),Df(Rf)}),fc.elm=nu,o.setStyles(nu,{left:ti*fc[0]+Tn-nu.offsetWidth/2,top:Nf*fc[1]+hi-nu.offsetHeight/2})}):Ft(!1)},Os=_p(ll,0),Ft=(qt=!0)=>{Os.cancel(),jt(),d&&qt&&d.removeAttribute(ab),nn(bx,(hn,Tn)=>{const hi=o.get("mceResizeHandle"+Tn);hi&&(o.unbind(hi),o.remove(hi))})},go=(qt,hn)=>o.isChildOf(qt,hn),ts=qt=>{if(Oe||t.removed||t.composing)return;const hn=qt.type==="mousedown"?qt.target:e.getNode(),Tn=Xr(ye.fromDom(hn),PM).map(gs=>gs.dom).filter(gs=>o.isEditable(gs.parentElement)||gs.nodeName==="IMG"&&o.isEditable(gs)).getOrUndefined(),hi=Fe(Tn)?o.getAttrib(Tn,ab,"1"):"1";if(Le(o.select(`img[${ab}],hr[${ab}]`),gs=>{gs.removeAttribute(ab)}),Fe(Tn)&&go(Tn,c)&&t.hasFocus()){Eo();const gs=e.getStart(!0);if(go(gs,Tn)&&go(e.getEnd(!0),Tn)){o.setAttrib(Tn,ab,hi),Os.throttle(Tn);return}}Ft()},jt=()=>{nn(bx,qt=>{qt.elm&&(o.unbind(qt.elm),delete qt.elm)})},Eo=()=>{try{t.getDoc().execCommand("enableObjectResizing",!1,"false")}catch{}};return t.on("init",()=>{Eo(),t.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",ts),t.on("keyup compositionend",qt=>{d&&d.nodeName==="TABLE"&&ts(qt)}),t.on("hide blur",Ft),t.on("contextmenu longpress",mt,!0)}),t.on("remove",jt),{isResizable:bo,showResizeRect:ll,hideResizeRect:Ft,updateResizeRect:ts,destroy:()=>{Os.cancel(),d=h=I=null}}},$y=(e,t)=>{t.fold(o=>{e.setStartBefore(o.dom)},(o,s)=>{e.setStart(o.dom,s)},o=>{e.setStartAfter(o.dom)})},yx=(e,t)=>{t.fold(o=>{e.setEndBefore(o.dom)},(o,s)=>{e.setEnd(o.dom,s)},o=>{e.setEndAfter(o.dom)})},W2=(e,t,o)=>{const s=e.document.createRange();return $y(s,t),yx(s,o),s},qv=(e,t,o,s,a)=>{const c=e.document.createRange();return c.setStart(t.dom,o),c.setEnd(s.dom,a),c},ib=zn.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),WA=(e,t,o)=>t(ye.fromDom(o.startContainer),o.startOffset,ye.fromDom(o.endContainer),o.endOffset),q2=(e,t)=>t.match({domRange:o=>({ltr:Ge(o),rtl:j.none}),relative:(o,s)=>({ltr:si(()=>W2(e,o,s)),rtl:si(()=>j.some(W2(e,s,o)))}),exact:(o,s,a,c)=>({ltr:si(()=>qv(e,o,s,a,c)),rtl:si(()=>j.some(qv(e,a,c,o,s)))})}),IM=(e,t)=>{const o=t.ltr();return o.collapsed?t.rtl().filter(a=>a.collapsed===!1).map(a=>ib.rtl(ye.fromDom(a.endContainer),a.endOffset,ye.fromDom(a.startContainer),a.startOffset)).getOrThunk(()=>WA(e,ib.ltr,o)):WA(e,ib.ltr,o)},qA=(e,t)=>{const o=q2(e,t);return IM(e,o)};ib.ltr,ib.rtl;const vx={create:(e,t,o,s)=>({start:e,soffset:t,finish:o,foffset:s})},KA=(e,t,o)=>{var s;return j.from((s=e.caretPositionFromPoint)===null||s===void 0?void 0:s.call(e,t,o)).bind(a=>{if(a.offsetNode===null)return j.none();const c=e.createRange();return c.setStart(a.offsetNode,a.offset),c.collapse(),j.some(c)})},_x=(e,t,o)=>{var s;return j.from((s=e.caretRangeFromPoint)===null||s===void 0?void 0:s.call(e,t,o))},$M=(e,t,o)=>e.caretPositionFromPoint?KA(e,t,o):e.caretRangeFromPoint?_x(e,t,o):j.none(),HM=(e,t,o)=>{const s=e.document;return $M(s,t,o).map(a=>vx.create(ye.fromDom(a.startContainer),a.startOffset,ye.fromDom(a.endContainer),a.endOffset))},K2=zn.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),VM=(e,t,o,s)=>e.fold(t,o,s),jM=e=>e.fold(To,To,To),GA=K2.before,UM=K2.on,ZM=K2.after,Sm={before:GA,on:UM,after:ZM,cata:VM,getStart:jM},Kv=zn.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),WM=e=>Kv.exact(e.start,e.soffset,e.finish,e.foffset),qM=e=>e.match({domRange:t=>ye.fromDom(t.startContainer),relative:(t,o)=>Sm.getStart(t),exact:(t,o,s,a)=>t}),YA=Kv.domRange,Ud=Kv.relative,KM=Kv.exact,XA=e=>{const t=qM(e);return _c(t)},G2=vx.create,Dg={domRange:YA,relative:Ud,exact:KM,exactFromRange:WM,getWin:XA,range:G2},Gv=(e,t)=>{const o=En(e);return o==="input"?Sm.after(e):mn(["br","img"],o)?t===0?Sm.before(e):Sm.after(e):Sm.on(e,t)},JA=(e,t)=>{const o=e.fold(Sm.before,Gv,Sm.after),s=t.fold(Sm.before,Gv,Sm.after);return Dg.relative(o,s)},xx=(e,t,o,s)=>{const a=Gv(e,t),c=Gv(o,s);return Dg.relative(a,c)},QA=e=>e.match({domRange:t=>{const o=ye.fromDom(t.startContainer),s=ye.fromDom(t.endContainer);return xx(o,t.startOffset,s,t.endOffset)},relative:JA,exact:xx}),Hc=(e,t)=>{const s=document.createDocumentFragment();return Le(e,a=>{s.appendChild(a.dom)}),ye.fromDom(s)},GM=e=>{const t=Dg.getWin(e).dom,o=(a,c,d,h)=>qv(t,a,c,d,h),s=QA(e);return qA(t,s).match({ltr:o,rtl:o})},Y2=(e,t,o)=>HM(e,t,o),eO=(e,t,o)=>{const s=_c(ye.fromDom(o));return Y2(s.dom,e,t).map(a=>{const c=o.createRange();return c.setStart(a.start.dom,a.soffset),c.setEnd(a.finish.dom,a.foffset),c}).getOrUndefined()},Yv=(e,t)=>Fe(e)&&Fe(t)&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset,Sf=(e,t,o)=>{let s=e;for(;s&&s!==t;){if(o(s))return s;s=s.parentNode}return null},wx=(e,t,o)=>Sf(e,t,o)!==null,kx=(e,t,o)=>wx(e,t,s=>s.nodeName===o),tO=(e,t)=>Pl(e)&&!wx(e,t,ud),oO=(e,t,o)=>{const s=t.parentNode;if(s){const a=new Ma(t,e.getParent(s,e.isBlock)||e.getRoot());let c;for(;c=a[o?"prev":"next"]();)if($s(c))return!0}return!1},nO=(e,t)=>{var o;return((o=e.previousSibling)===null||o===void 0?void 0:o.nodeName)===t},sO=(e,t)=>{let o=t;for(;o&&o!==e;){if(Ho(o))return!0;o=o.parentNode}return!1},Xv=(e,t,o,s,a)=>{const c=e.getRoot(),d=e.schema.getNonEmptyElements(),h=a.parentNode;let _,z;if(!h)return j.none();const I=e.getParent(h,e.isBlock)||c;if(s&&$s(a)&&t&&e.isEmpty(I))return j.some(Ue(h,e.nodeIndex(a)));const $=new Ma(a,I);for(;z=$[s?"prev":"next"]();){if(e.getContentEditableParent(z)==="false"||tO(z,c))return j.none();if(wt(z)&&z.data.length>0)return kx(z,c,"A")?j.none():j.some(Ue(z,s?z.data.length:0));if(e.isBlock(z)||d[z.nodeName.toLowerCase()])return j.none();_=z}return Qo(_)?j.none():o&&_?j.some(Ue(_,0)):j.none()},X2=(e,t,o,s)=>{const a=e.getRoot();let c,d=!1,h=o?s.startContainer:s.endContainer,_=o?s.startOffset:s.endOffset;const z=no(h)&&_===h.childNodes.length,I=e.schema.getNonEmptyElements();let $=o;if(Pl(h))return j.none();if(no(h)&&_>h.childNodes.length-1&&($=!1),lo(h)&&(h=a,_=0),h===a){if($&&(c=h.childNodes[_>0?_-1:0],c&&(Pl(c)||I[c.nodeName]||tc(c))))return j.none();if(h.hasChildNodes()){if(_=Math.min(!$&&_>0?_-1:_,h.childNodes.length-1),h=h.childNodes[_],_=wt(h)&&z?h.data.length:0,!t&&h===a.lastChild&&tc(h)||sO(a,h)||Pl(h)||em(h))return j.none();if(h.hasChildNodes()&&!tc(h)){c=h;const V=new Ma(h,a);do{if(Ho(c)||Pl(c)){d=!1;break}if(wt(c)&&c.data.length>0){_=$?0:c.data.length,h=c,d=!0;break}if(I[c.nodeName.toLowerCase()]&&!qb(c)){_=e.nodeIndex(c),h=c.parentNode,$||_++,d=!0;break}}while(c=$?V.next():V.prev())}}}return t&&(wt(h)&&_===0&&Xv(e,z,t,!0,h).each(V=>{h=V.container(),_=V.offset(),d=!0}),no(h)&&(c=h.childNodes[_],c||(c=h.childNodes[_-1]),c&&$s(c)&&!nO(c,"A")&&!oO(e,c,!1)&&!oO(e,c,!0)&&Xv(e,z,t,!0,c).each(V=>{h=V.container(),_=V.offset(),d=!0}))),$&&!t&&wt(h)&&_===h.data.length&&Xv(e,z,t,!1,h).each(V=>{h=V.container(),_=V.offset(),d=!0}),d&&h?j.some(Ue(h,_)):j.none()},Em=(e,t)=>{const o=t.collapsed,s=t.cloneRange(),a=Ue.fromRangeStart(t);return X2(e,o,!0,s).each(c=>{(!o||!Ue.isAbove(a,c))&&s.setStart(c.container(),c.offset())}),o||X2(e,o,!1,s).each(c=>{s.setEnd(c.container(),c.offset())}),o&&s.collapse(!0),Yv(t,s)?j.none():j.some(s)},Jv=(e,t)=>e.splitText(t),Qv=e=>{let t=e.startContainer,o=e.startOffset,s=e.endContainer,a=e.endOffset;if(t===s&&wt(t)){if(o>0&&oo){a=a-o;const c=Jv(s,a).previousSibling;t=s=c,a=c.data.length,o=0}else a=0}else if(wt(t)&&o>0&&o0&&a({walk:(c,d)=>Hv(e,c,d),split:Qv,expand:(c,d={type:"word"})=>{if(d.type==="word"){const h=Ag(e,c,[{inline:"span"}]),_=e.createRng();return _.setStart(h.startContainer,h.startOffset),_.setEnd(h.endContainer,h.endOffset),_}return c},normalize:c=>Em(e,c).fold(fn,d=>(c.setStart(d.startContainer,d.startOffset),c.setEnd(d.endContainer,d.endOffset),!0))});Rg.compareRanges=Yv,Rg.getCaretRangeFromPoint=eO,Rg.getSelectedNode=yg,Rg.getNode=fa;const J2=((e,t)=>{const o=(h,_)=>{if(!D(_)&&!_.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+_);const z=h.dom;Za(z)&&(z.style[e]=_+"px")},s=h=>{const _=t(h);if(_<=0||_===null){const z=ur(h,e);return parseFloat(z)||0}return _},a=s,c=(h,_)=>ko(_,(z,I)=>{const $=ur(h,I),V=$===void 0?0:parseInt($,10);return isNaN(V)?z:z+V},0);return{set:o,get:s,getOuter:a,aggregate:c,max:(h,_,z)=>{const I=c(h,z);return _>I?_-I:0}}})("height",e=>{const t=e.dom;return Ua(e)?t.getBoundingClientRect().height:t.offsetHeight}),lb=e=>J2.get(e),rO=()=>ye.fromDom(document),aO=(e,t)=>e.view(t).fold(Ge([]),s=>{const a=e.owner(s),c=aO(e,a);return[s].concat(c)}),Cx=(e,t)=>{const o=t.owner(e);return aO(t,o)};var JM=Object.freeze({__proto__:null,view:e=>{var t;return(e.dom===document?j.none():j.from((t=e.dom.defaultView)===null||t===void 0?void 0:t.frameElement)).map(ye.fromDom)},owner:e=>fl(e)});const iO=e=>{const t=rO(),o=Bo(t),s=Cx(e,JM),a=Uo(e),c=ao(s,(d,h)=>{const _=Uo(h);return{left:d.left+_.left,top:d.top+_.top}},{left:0,top:0});return ge(c.left+a.left+o.left,c.top+a.top+o.top)},Mp=e=>En(e)==="textarea",lO=(e,t)=>e.dispatch("ScrollIntoView",t).isDefaultPrevented(),cO=(e,t)=>{e.dispatch("AfterScrollIntoView",t)},dO=(e,t)=>{const o=xa(e);if(o.length===0||Mp(e))return{element:e,offset:t};if(t{const o=xo(e),s=lb(e);return{element:e,bottom:o.top+s,height:s,pos:o,cleanup:t}},uO=(e,t)=>{const o=dO(e,t),s=ye.fromHtml(''+ua+"");return Zs(o.element,s),e0(s,()=>Jn(s))},fO=e=>e0(ye.fromDom(e),dt),mO=(e,t,o,s)=>{gO(e,(a,c)=>pO(e,t,o,s),o)},t0=(e,t,o,s,a)=>{const c={elm:s.element.dom,alignToTop:a};if(lO(e,c))return;const d=Bo(t).top;o(e,t,d,s,a),cO(e,c)},pO=(e,t,o,s)=>{const a=ye.fromDom(e.getBody()),c=ye.fromDom(e.getDoc());np(a);const d=uO(ye.fromDom(o.startContainer),o.startOffset);t0(e,c,t,d,s),d.cleanup()},Sx=(e,t,o,s)=>{const a=ye.fromDom(e.getDoc());t0(e,a,o,fO(t),s)},gO=(e,t,o)=>{const s=o.startContainer,a=o.startOffset,c=o.endContainer,d=o.endOffset;t(ye.fromDom(s),ye.fromDom(c));const h=e.dom.createRng();h.setStart(s,a),h.setEnd(c,d),e.selection.setRng(o)},o0=(e,t,o,s,a)=>{const c=t.pos;if(s)io(c.left,c.top,a);else{const d=c.top-o+t.height;io(-e.getBody().getBoundingClientRect().left,d,a)}},Q2=(e,t,o,s,a,c)=>{const d=s+o,h=a.pos.top,_=a.bottom,z=_-h>=s;hd?o0(e,a,s,z?c!==!1:c===!0,t):_>d&&!z&&o0(e,a,s,c===!0,t)},n0=(e,t,o,s,a)=>{const c=_c(t).dom.innerHeight;Q2(e,t,o,c,s,a)},Tm=(e,t,o,s,a)=>{const c=_c(t).dom.innerHeight;Q2(e,t,o,c,s,a);const d=iO(s.element),h=Nl(window);d.toph.bottom&&Wn(s.element,a===!0)},QM=(e,t,o)=>mO(e,n0,t,o),eC=(e,t,o)=>Sx(e,t,n0,o),oa=(e,t,o)=>mO(e,Tm,t,o),tC=(e,t,o)=>Sx(e,t,Tm,o),oC=(e,t,o)=>{(e.inline?eC:tC)(e,t,o)},Zd=(e,t,o)=>{(e.inline?QM:oa)(e,t,o)},nC=(e,t=!1)=>e.dom.focus({preventScroll:t}),sC=e=>{const t=Xl(e).dom;return e.dom===t.activeElement},cb=(e=rO())=>j.from(e.dom.activeElement).map(ye.fromDom),eB=e=>cb(Xl(e)).filter(t=>e.dom.contains(t.dom)),hO=(e,t)=>{const o=Rs(t)?mm(t).length:xa(t).length+1;return e>o?o:e<0?0:e},Hy=e=>Dg.range(e.start,hO(e.soffset,e.start),e.finish,hO(e.foffset,e.finish)),bO=(e,t)=>!Dd(t.dom)&&(_a(e,t)||kn(e,t)),Mg=e=>t=>bO(e,t.start)&&bO(e,t.finish),tB=e=>e.inline||Jo.browser.isFirefox(),Bg=e=>Dg.range(ye.fromDom(e.startContainer),e.startOffset,ye.fromDom(e.endContainer),e.endOffset),oB=e=>{const t=e.getSelection();return(!t||t.rangeCount===0?j.none():j.from(t.getRangeAt(0))).map(Bg)},Wd=e=>{const t=_c(e);return oB(t.dom).filter(Mg(e))},s0=(e,t)=>j.from(t).filter(Mg(e)).map(Hy),rC=e=>{const t=document.createRange();try{return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),j.some(t)}catch{return j.none()}},Vy=e=>{const t=tB(e)?Wd(ye.fromDom(e.getBody())):j.none();e.bookmark=t.isSome()?t:e.bookmark},aC=e=>(e.bookmark?e.bookmark:j.none()).bind(o=>s0(ye.fromDom(e.getBody()),o)).bind(rC),Ex=e=>{aC(e).each(t=>e.selection.setRng(t))},qd={isEditorUIElement:e=>{const t=e.className.toString();return t.indexOf("tox-")!==-1||t.indexOf("mce-")!==-1}},Tx=(e,t)=>(D(t)||(t=0),setTimeout(e,t)),yO=(e,t)=>(D(t)||(t=0),setInterval(e,t)),Vc={setEditorTimeout:(e,t,o)=>Tx(()=>{e.removed||t()},o),setEditorInterval:(e,t,o)=>{const s=yO(()=>{e.removed?clearInterval(s):t()},o);return s}},iC=e=>e.type==="nodechange"&&e.selectionChange,db=(e,t)=>{const o=()=>{t.throttle()};Ts.DOM.bind(document,"mouseup",o),e.on("remove",()=>{Ts.DOM.unbind(document,"mouseup",o)})},lC=(e,t)=>{e.on("mouseup touchend",o=>{t.throttle()})},vO=(e,t)=>{lC(e,t),e.on("keyup NodeChange AfterSetSelectionRange",o=>{iC(o)||Vy(e)})},nB=e=>{const t=_p(()=>{Vy(e)},0);e.on("init",()=>{e.inline&&db(e,t),vO(e,t)}),e.on("remove",()=>{t.cancel()})};let Am;const cC=Ts.DOM,_O=e=>no(e)&&qd.isEditorUIElement(e),r0=e=>{const t=e.classList;return t!==void 0?t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body"):!1},Ax=(e,t)=>{const o=N4(e);return cC.getParent(t,a=>_O(a)||(o?e.dom.is(a,o):!1))!==null},Ox=e=>{try{const t=Xl(ye.fromDom(e.getElement()));return cb(t).fold(()=>document.body,o=>o.dom)}catch{return document.body}},xO=(e,t)=>{const o=t.editor;nB(o);const s=(a,c)=>{if(H4(a)&&a.inline!==!0){const d=ye.fromDom(a.getContainer());c(d,"tox-edit-focus")}};o.on("focusin",()=>{const a=e.focusedEditor;r0(Ox(o))&&s(o,Kl),a!==o&&(a&&a.dispatch("blur",{focusedEditor:o}),e.setActive(o),e.focusedEditor=o,o.dispatch("focus",{blurredEditor:a}),o.focus(!0))}),o.on("focusout",()=>{Vc.setEditorTimeout(o,()=>{const a=e.focusedEditor;(!r0(Ox(o))||a!==o)&&s(o,Ra),!Ax(o,Ox(o))&&a===o&&(o.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null)})}),Am||(Am=a=>{const c=e.activeEditor;c&&Xu(a).each(d=>{const h=d;h.ownerDocument===document&&h!==document.body&&!Ax(c,h)&&e.focusedEditor===c&&(c.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null)})},cC.bind(document,"focusin",Am))},sB=(e,t)=>{e.focusedEditor===t.editor&&(e.focusedEditor=null),!e.activeEditor&&Am&&(cC.unbind(document,"focusin",Am),Am=null)},rB=e=>{e.on("AddEditor",$t(xO,e)),e.on("RemoveEditor",$t(sB,e))},aB=(e,t)=>e.dom.getParent(t,o=>e.dom.getContentEditable(o)==="true"),iB=(e,t)=>e.dom.getParent(t,o=>e.dom.getContentEditable(o)==="false")!==null,lB=e=>e.collapsed?j.from(fa(e.startContainer,e.startOffset)).map(ye.fromDom):j.none(),cB=(e,t)=>lB(t).bind(o=>kp(o)?j.some(o):_a(e,o)?j.none():j.some(e)),wO=(e,t)=>{cB(ye.fromDom(e.getBody()),t).bind(o=>No(o.dom)).fold(()=>{e.selection.normalize()},o=>e.selection.setRng(o.toRange()))},zx=e=>{if(e.setActive)try{e.setActive()}catch{e.focus()}else e.focus()},dB=e=>sC(e)||eB(e).isSome(),uB=e=>Fe(e.iframeElement)&&sC(ye.fromDom(e.iframeElement)),fB=e=>{const t=e.getBody();return t&&dB(ye.fromDom(t))},kO=e=>{const t=Xl(ye.fromDom(e.getElement()));return cb(t).filter(o=>!r0(o.dom)&&Ax(e,o.dom)).isSome()},jy=e=>e.inline?fB(e):uB(e),ub=e=>jy(e)||kO(e),mB=e=>{const t=e.selection,o=e.getBody();let s=t.getRng();e.quirks.refreshContentEditable();const a=d=>{aC(d).each(h=>{d.selection.setRng(h),s=h})};!jy(e)&&e.hasEditableRoot()&&a(e);const c=aB(e,t.getNode());if(c&&e.dom.isChildOf(c,o)){iB(e,c)||zx(o),zx(c),e.hasEditableRoot()||a(e),wO(e,s),dC(e);return}e.inline||(Jo.browser.isOpera()||zx(o),e.getWin().focus()),(Jo.browser.isFirefox()||e.inline)&&(zx(o),wO(e,s)),dC(e)},dC=e=>e.editorManager.setActive(e),CO=(e,t)=>{e.removed||(t?dC(e):mB(e))},SO=(e,t)=>t.collapsed?e.isEditable(t.startContainer):e.isEditable(t.startContainer)&&e.isEditable(t.endContainer),EO=(e,t,o,s,a)=>{const c=o?t.startContainer:t.endContainer,d=o?t.startOffset:t.endOffset;return j.from(c).map(ye.fromDom).map(h=>!s||!t.collapsed?wc(h,a(h,d)).getOr(h):h).bind(h=>cr(h)?j.some(h):ia(h).filter(cr)).map(h=>h.dom).getOr(e)},TO=(e,t,o=!1)=>EO(e,t,!0,o,(s,a)=>Math.min(Xc(s),a)),AO=(e,t,o=!1)=>EO(e,t,!1,o,(s,a)=>a>0?a-1:a),OO=(e,t)=>{const o=e;for(;e&&wt(e)&&e.length===0;)e=t?e.nextSibling:e.previousSibling;return e||o},pB=(e,t)=>{if(!t)return e;let o=t.startContainer,s=t.endContainer;const a=t.startOffset,c=t.endOffset;let d=t.commonAncestorContainer;t.collapsed||(o===s&&c-a<2&&o.hasChildNodes()&&(d=o.childNodes[a]),wt(o)&&wt(s)&&(o.length===a?o=OO(o.nextSibling,!0):o=o.parentNode,c===0?s=OO(s.previousSibling,!1):s=s.parentNode,o&&o===s&&(d=o)));const h=wt(d)?d.parentNode:d;return ec(h)?h:e},uC=(e,t,o,s)=>{const a=[],c=e.getRoot(),d=e.getParent(o||TO(c,t,t.collapsed),e.isBlock),h=e.getParent(s||AO(c,t,t.collapsed),e.isBlock);if(d&&d!==c&&a.push(d),d&&h&&d!==h){let _;const z=new Ma(d,c);for(;(_=z.next())&&_!==h;)e.isBlock(_)&&a.push(_)}return h&&d!==h&&h!==c&&a.push(h),a},a0=(e,t,o)=>j.from(t).bind(s=>j.from(s.parentNode).map(a=>{const c=e.nodeIndex(s),d=e.createRng();return d.setStart(a,c),d.setEnd(a,c+1),o&&(Bv(e,d,s,!0),Bv(e,d,s,!1)),d})),Nx=(e,t)=>dn(t,o=>{const s=e.dispatch("GetSelectionRange",{range:o});return s.range!==o?s.range:o}),gB={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},fb=(e,t,o)=>{const s=o?"lastChild":"firstChild",a=o?"prev":"next";if(e[s])return e[s];if(e!==t){let c=e[a];if(c)return c;for(let d=e.parent;d&&d!==t;d=d.parent)if(c=d[a],c)return c}},zO=e=>{var t;const o=(t=e.value)!==null&&t!==void 0?t:"";if(!Fi(o))return!1;const s=e.parent;return!(s&&(s.name!=="span"||s.attr("style"))&&/^[ ]+$/.test(o))},Ca=e=>{const t=e.name==="a"&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t};class gi{static create(t,o){const s=new gi(t,gB[t]||1);return o&&nn(o,(a,c)=>{s.attr(c,a)}),s}constructor(t,o){this.name=t,this.type=o,o===1&&(this.attributes=[],this.attributes.map={})}replace(t){const o=this;return t.parent&&t.remove(),o.insert(t,o),o.remove(),o}attr(t,o){const s=this;if(!ft(t))return Fe(t)&&nn(t,(c,d)=>{s.attr(d,c)}),s;const a=s.attributes;if(a){if(o!==void 0){if(o===null){if(t in a.map){delete a.map[t];let c=a.length;for(;c--;)if(a[c].name===t)return a.splice(c,1),s}return s}if(t in a.map){let c=a.length;for(;c--;)if(a[c].name===t){a[c].value=o;break}}else a.push({name:t,value:o});return a.map[t]=o,s}return a.map[t]}}clone(){const t=this,o=new gi(t.name,t.type),s=t.attributes;if(s){const a=[];a.map={};for(let c=0,d=s.length;cft(e.nodeValue)&&e.nodeValue.includes(ua),i0=e=>`${e.length===0?"":`${dn(e,t=>`[${t}]`).join(",")},`}[data-mce-bogus="all"]`,Lg=(e,t)=>t.querySelectorAll(i0(e)),Bp=e=>document.createTreeWalker(e,NodeFilter.SHOW_COMMENT,t=>Dx(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP),DO=e=>document.createTreeWalker(e,NodeFilter.SHOW_TEXT,t=>{if(Dx(t)){const o=t.parentNode;return o&&Ro(NO,o.nodeName)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}else return NodeFilter.FILTER_SKIP}),hB=e=>Bp(e).nextNode()!==null,Uy=e=>DO(e).nextNode()!==null,Zy=(e,t)=>t.querySelector(i0(e))!==null,Wy=(e,t)=>{Le(Lg(e,t),o=>{const s=ye.fromDom(o);Da(s,"data-mce-bogus")==="all"?Jn(s):Le(e,a=>{Yc(s,a)&&rn(s,a)})})},Rx=e=>{let t=e.nextNode();for(;t!==null;)t.nodeValue=null,t=e.nextNode()},fC=Kt(Rx,Bp),RO=Kt(Rx,DO),mC=(e,t)=>{const o=[{condition:$t(Zy,t),action:$t(Wy,t)},{condition:hB,action:fC},{condition:Uy,action:RO}];let s=e,a=!1;return Le(o,({condition:c,action:d})=>{c(s)&&(a||(s=e.cloneNode(!0),a=!0),d(s))}),s},MO=e=>{const t=Mr(e,"[data-mce-bogus]");Le(t,o=>{Da(o,"data-mce-bogus")==="all"?Jn(o):$d(o)?(Zs(o,ye.fromText(rr)),Jn(o)):wa(o)})},BO=e=>{const t=Mr(e,"input");Le(t,o=>{rn(o,"name")})},LO=(e,t)=>{const o=ji(e),s=new RegExp(`^(<${o}[^>]*>( | |\\s| |
|)<\\/${o}>[\r + */const E1=new Map,r7={set(w,g,S){E1.has(w)||E1.set(w,new Map);const L=E1.get(w);if(!L.has(g)&&L.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(L.keys())[0]}.`);return}L.set(g,S)},get(w,g){return E1.has(w)&&E1.get(w).get(g)||null},remove(w,g){if(!E1.has(w))return;const S=E1.get(w);S.delete(g),S.size===0&&E1.delete(w)}},OQ=1e6,zQ=1e3,N7="transitionend",X9=w=>(w&&window.CSS&&window.CSS.escape&&(w=w.replace(/#([^\s"#']+)/g,(g,S)=>`#${CSS.escape(S)}`)),w),NQ=w=>w==null?`${w}`:Object.prototype.toString.call(w).match(/\s([a-z]+)/i)[1].toLowerCase(),DQ=w=>{do w+=Math.floor(Math.random()*OQ);while(document.getElementById(w));return w},RQ=w=>{if(!w)return 0;let{transitionDuration:g,transitionDelay:S}=window.getComputedStyle(w);const L=Number.parseFloat(g),W=Number.parseFloat(S);return!L&&!W?0:(g=g.split(",")[0],S=S.split(",")[0],(Number.parseFloat(g)+Number.parseFloat(S))*zQ)},J9=w=>{w.dispatchEvent(new Event(N7))},Hb=w=>!w||typeof w!="object"?!1:(typeof w.jquery<"u"&&(w=w[0]),typeof w.nodeType<"u"),A1=w=>Hb(w)?w.jquery?w[0]:w:typeof w=="string"&&w.length>0?document.querySelector(X9(w)):null,Lk=w=>{if(!Hb(w)||w.getClientRects().length===0)return!1;const g=getComputedStyle(w).getPropertyValue("visibility")==="visible",S=w.closest("details:not([open])");if(!S)return g;if(S!==w){const L=w.closest("summary");if(L&&L.parentNode!==S||L===null)return!1}return g},T1=w=>!w||w.nodeType!==Node.ELEMENT_NODE||w.classList.contains("disabled")?!0:typeof w.disabled<"u"?w.disabled:w.hasAttribute("disabled")&&w.getAttribute("disabled")!=="false",Q9=w=>{if(!document.documentElement.attachShadow)return null;if(typeof w.getRootNode=="function"){const g=w.getRootNode();return g instanceof ShadowRoot?g:null}return w instanceof ShadowRoot?w:w.parentNode?Q9(w.parentNode):null},A5=()=>{},mT=w=>{w.offsetHeight},eV=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,a7=[],MQ=w=>{document.readyState==="loading"?(a7.length||document.addEventListener("DOMContentLoaded",()=>{for(const g of a7)g()}),a7.push(w)):w()},Gm=()=>document.documentElement.dir==="rtl",Xm=w=>{MQ(()=>{const g=eV();if(g){const S=w.NAME,L=g.fn[S];g.fn[S]=w.jQueryInterface,g.fn[S].Constructor=w,g.fn[S].noConflict=()=>(g.fn[S]=L,w.jQueryInterface)}})},Vu=(w,g=[],S=w)=>typeof w=="function"?w(...g):S,tV=(w,g,S=!0)=>{if(!S){Vu(w);return}const W=RQ(g)+5;let te=!1;const ce=({target:Ee})=>{Ee===g&&(te=!0,g.removeEventListener(N7,ce),Vu(w))};g.addEventListener(N7,ce),setTimeout(()=>{te||J9(g)},W)},Q7=(w,g,S,L)=>{const W=w.length;let te=w.indexOf(g);return te===-1?!S&&L?w[W-1]:w[0]:(te+=S?1:-1,L&&(te=(te+W)%W),w[Math.max(0,Math.min(te,W-1))])},LQ=/[^.]*(?=\..*)\.|.*/,BQ=/\..*/,PQ=/::\d+$/,i7={};let A$=1;const oV={mouseenter:"mouseover",mouseleave:"mouseout"},IQ=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function nV(w,g){return g&&`${g}::${A$++}`||w.uidEvent||A$++}function sV(w){const g=nV(w);return w.uidEvent=g,i7[g]=i7[g]||{},i7[g]}function FQ(w,g){return function S(L){return e8(L,{delegateTarget:w}),S.oneOff&&eo.off(w,L.type,g),g.apply(w,[L])}}function HQ(w,g,S){return function L(W){const te=w.querySelectorAll(g);for(let{target:ce}=W;ce&&ce!==this;ce=ce.parentNode)for(const Ee of te)if(Ee===ce)return e8(W,{delegateTarget:ce}),L.oneOff&&eo.off(w,W.type,g,S),S.apply(ce,[W])}}function rV(w,g,S=null){return Object.values(w).find(L=>L.callable===g&&L.delegationSelector===S)}function aV(w,g,S){const L=typeof g=="string",W=L?S:g||S;let te=iV(w);return IQ.has(te)||(te=w),[L,W,te]}function T$(w,g,S,L,W){if(typeof g!="string"||!w)return;let[te,ce,Ee]=aV(g,S,L);g in oV&&(ce=(ut=>function(Lt){if(!Lt.relatedTarget||Lt.relatedTarget!==Lt.delegateTarget&&!Lt.delegateTarget.contains(Lt.relatedTarget))return ut.call(this,Lt)})(ce));const He=sV(w),We=He[Ee]||(He[Ee]={}),Me=rV(We,ce,te?S:null);if(Me){Me.oneOff=Me.oneOff&&W;return}const Ot=nV(ce,g.replace(LQ,"")),mo=te?HQ(w,S,ce):FQ(w,ce);mo.delegationSelector=te?S:null,mo.callable=ce,mo.oneOff=W,mo.uidEvent=Ot,We[Ot]=mo,w.addEventListener(Ee,mo,te)}function D7(w,g,S,L,W){const te=rV(g[S],L,W);te&&(w.removeEventListener(S,te,!!W),delete g[S][te.uidEvent])}function $Q(w,g,S,L){const W=g[S]||{};for(const[te,ce]of Object.entries(W))te.includes(L)&&D7(w,g,S,ce.callable,ce.delegationSelector)}function iV(w){return w=w.replace(BQ,""),oV[w]||w}const eo={on(w,g,S,L){T$(w,g,S,L,!1)},one(w,g,S,L){T$(w,g,S,L,!0)},off(w,g,S,L){if(typeof g!="string"||!w)return;const[W,te,ce]=aV(g,S,L),Ee=ce!==g,He=sV(w),We=He[ce]||{},Me=g.startsWith(".");if(typeof te<"u"){if(!Object.keys(We).length)return;D7(w,He,ce,te,W?S:null);return}if(Me)for(const Ot of Object.keys(He))$Q(w,He,Ot,g.slice(1));for(const[Ot,mo]of Object.entries(We)){const st=Ot.replace(PQ,"");(!Ee||g.includes(st))&&D7(w,He,ce,mo.callable,mo.delegationSelector)}},trigger(w,g,S){if(typeof g!="string"||!w)return null;const L=eV(),W=iV(g),te=g!==W;let ce=null,Ee=!0,He=!0,We=!1;te&&L&&(ce=L.Event(g,S),L(w).trigger(ce),Ee=!ce.isPropagationStopped(),He=!ce.isImmediatePropagationStopped(),We=ce.isDefaultPrevented());const Me=e8(new Event(g,{bubbles:Ee,cancelable:!0}),S);return We&&Me.preventDefault(),He&&w.dispatchEvent(Me),Me.defaultPrevented&&ce&&ce.preventDefault(),Me}};function e8(w,g={}){for(const[S,L]of Object.entries(g))try{w[S]=L}catch{Object.defineProperty(w,S,{configurable:!0,get(){return L}})}return w}function O$(w){if(w==="true")return!0;if(w==="false")return!1;if(w===Number(w).toString())return Number(w);if(w===""||w==="null")return null;if(typeof w!="string")return w;try{return JSON.parse(decodeURIComponent(w))}catch{return w}}function l7(w){return w.replace(/[A-Z]/g,g=>`-${g.toLowerCase()}`)}const $b={setDataAttribute(w,g,S){w.setAttribute(`data-bs-${l7(g)}`,S)},removeDataAttribute(w,g){w.removeAttribute(`data-bs-${l7(g)}`)},getDataAttributes(w){if(!w)return{};const g={},S=Object.keys(w.dataset).filter(L=>L.startsWith("bs")&&!L.startsWith("bsConfig"));for(const L of S){let W=L.replace(/^bs/,"");W=W.charAt(0).toLowerCase()+W.slice(1,W.length),g[W]=O$(w.dataset[L])}return g},getDataAttribute(w,g){return O$(w.getAttribute(`data-bs-${l7(g)}`))}};class pT{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(g){return g=this._mergeConfigObj(g),g=this._configAfterMerge(g),this._typeCheckConfig(g),g}_configAfterMerge(g){return g}_mergeConfigObj(g,S){const L=Hb(S)?$b.getDataAttribute(S,"config"):{};return{...this.constructor.Default,...typeof L=="object"?L:{},...Hb(S)?$b.getDataAttributes(S):{},...typeof g=="object"?g:{}}}_typeCheckConfig(g,S=this.constructor.DefaultType){for(const[L,W]of Object.entries(S)){const te=g[L],ce=Hb(te)?"element":NQ(te);if(!new RegExp(W).test(ce))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${L}" provided type "${ce}" but expected type "${W}".`)}}}const VQ="5.3.3";class Qp extends pT{constructor(g,S){super(),g=A1(g),g&&(this._element=g,this._config=this._getConfig(S),r7.set(this._element,this.constructor.DATA_KEY,this))}dispose(){r7.remove(this._element,this.constructor.DATA_KEY),eo.off(this._element,this.constructor.EVENT_KEY);for(const g of Object.getOwnPropertyNames(this))this[g]=null}_queueCallback(g,S,L=!0){tV(g,S,L)}_getConfig(g){return g=this._mergeConfigObj(g,this._element),g=this._configAfterMerge(g),this._typeCheckConfig(g),g}static getInstance(g){return r7.get(A1(g),this.DATA_KEY)}static getOrCreateInstance(g,S={}){return this.getInstance(g)||new this(g,typeof S=="object"?S:null)}static get VERSION(){return VQ}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(g){return`${g}${this.EVENT_KEY}`}}const c7=w=>{let g=w.getAttribute("data-bs-target");if(!g||g==="#"){let S=w.getAttribute("href");if(!S||!S.includes("#")&&!S.startsWith("."))return null;S.includes("#")&&!S.startsWith("#")&&(S=`#${S.split("#")[1]}`),g=S&&S!=="#"?S.trim():null}return g?g.split(",").map(S=>X9(S)).join(","):null},Hn={find(w,g=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(g,w))},findOne(w,g=document.documentElement){return Element.prototype.querySelector.call(g,w)},children(w,g){return[].concat(...w.children).filter(S=>S.matches(g))},parents(w,g){const S=[];let L=w.parentNode.closest(g);for(;L;)S.push(L),L=L.parentNode.closest(g);return S},prev(w,g){let S=w.previousElementSibling;for(;S;){if(S.matches(g))return[S];S=S.previousElementSibling}return[]},next(w,g){let S=w.nextElementSibling;for(;S;){if(S.matches(g))return[S];S=S.nextElementSibling}return[]},focusableChildren(w){const g=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(S=>`${S}:not([tabindex^="-"])`).join(",");return this.find(g,w).filter(S=>!T1(S)&&Lk(S))},getSelectorFromElement(w){const g=c7(w);return g&&Hn.findOne(g)?g:null},getElementFromSelector(w){const g=c7(w);return g?Hn.findOne(g):null},getMultipleElementsFromSelector(w){const g=c7(w);return g?Hn.find(g):[]}},I5=(w,g="hide")=>{const S=`click.dismiss${w.EVENT_KEY}`,L=w.NAME;eo.on(document,S,`[data-bs-dismiss="${L}"]`,function(W){if(["A","AREA"].includes(this.tagName)&&W.preventDefault(),T1(this))return;const te=Hn.getElementFromSelector(this)||this.closest(`.${L}`);w.getOrCreateInstance(te)[g]()})},jQ="alert",UQ="bs.alert",lV=`.${UQ}`,ZQ=`close${lV}`,WQ=`closed${lV}`,qQ="fade",KQ="show";class F5 extends Qp{static get NAME(){return jQ}close(){if(eo.trigger(this._element,ZQ).defaultPrevented)return;this._element.classList.remove(KQ);const S=this._element.classList.contains(qQ);this._queueCallback(()=>this._destroyElement(),this._element,S)}_destroyElement(){this._element.remove(),eo.trigger(this._element,WQ),this.dispose()}static jQueryInterface(g){return this.each(function(){const S=F5.getOrCreateInstance(this);if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g](this)}})}}I5(F5,"close");Xm(F5);const GQ="button",YQ="bs.button",XQ=`.${YQ}`,JQ=".data-api",QQ="active",z$='[data-bs-toggle="button"]',eee=`click${XQ}${JQ}`;class H5 extends Qp{static get NAME(){return GQ}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(QQ))}static jQueryInterface(g){return this.each(function(){const S=H5.getOrCreateInstance(this);g==="toggle"&&S[g]()})}}eo.on(document,eee,z$,w=>{w.preventDefault();const g=w.target.closest(z$);H5.getOrCreateInstance(g).toggle()});Xm(H5);const tee="swipe",Bk=".bs.swipe",oee=`touchstart${Bk}`,nee=`touchmove${Bk}`,see=`touchend${Bk}`,ree=`pointerdown${Bk}`,aee=`pointerup${Bk}`,iee="touch",lee="pen",cee="pointer-event",dee=40,uee={endCallback:null,leftCallback:null,rightCallback:null},fee={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class T5 extends pT{constructor(g,S){super(),this._element=g,!(!g||!T5.isSupported())&&(this._config=this._getConfig(S),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return uee}static get DefaultType(){return fee}static get NAME(){return tee}dispose(){eo.off(this._element,Bk)}_start(g){if(!this._supportPointerEvents){this._deltaX=g.touches[0].clientX;return}this._eventIsPointerPenTouch(g)&&(this._deltaX=g.clientX)}_end(g){this._eventIsPointerPenTouch(g)&&(this._deltaX=g.clientX-this._deltaX),this._handleSwipe(),Vu(this._config.endCallback)}_move(g){this._deltaX=g.touches&&g.touches.length>1?0:g.touches[0].clientX-this._deltaX}_handleSwipe(){const g=Math.abs(this._deltaX);if(g<=dee)return;const S=g/this._deltaX;this._deltaX=0,S&&Vu(S>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(eo.on(this._element,ree,g=>this._start(g)),eo.on(this._element,aee,g=>this._end(g)),this._element.classList.add(cee)):(eo.on(this._element,oee,g=>this._start(g)),eo.on(this._element,nee,g=>this._move(g)),eo.on(this._element,see,g=>this._end(g)))}_eventIsPointerPenTouch(g){return this._supportPointerEvents&&(g.pointerType===lee||g.pointerType===iee)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const mee="carousel",pee="bs.carousel",N1=`.${pee}`,cV=".data-api",gee="ArrowLeft",hee="ArrowRight",bee=500,sT="next",vk="prev",wk="left",w5="right",yee=`slide${N1}`,d7=`slid${N1}`,vee=`keydown${N1}`,_ee=`mouseenter${N1}`,xee=`mouseleave${N1}`,wee=`dragstart${N1}`,kee=`load${N1}${cV}`,Cee=`click${N1}${cV}`,dV="carousel",m5="active",See="slide",Eee="carousel-item-end",Aee="carousel-item-start",Tee="carousel-item-next",Oee="carousel-item-prev",uV=".active",fV=".carousel-item",zee=uV+fV,Nee=".carousel-item img",Dee=".carousel-indicators",Ree="[data-bs-slide], [data-bs-slide-to]",Mee='[data-bs-ride="carousel"]',Lee={[gee]:w5,[hee]:wk},Bee={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Pee={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class gT extends Qp{constructor(g,S){super(g,S),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Hn.findOne(Dee,this._element),this._addEventListeners(),this._config.ride===dV&&this.cycle()}static get Default(){return Bee}static get DefaultType(){return Pee}static get NAME(){return mee}next(){this._slide(sT)}nextWhenVisible(){!document.hidden&&Lk(this._element)&&this.next()}prev(){this._slide(vk)}pause(){this._isSliding&&J9(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){eo.one(this._element,d7,()=>this.cycle());return}this.cycle()}}to(g){const S=this._getItems();if(g>S.length-1||g<0)return;if(this._isSliding){eo.one(this._element,d7,()=>this.to(g));return}const L=this._getItemIndex(this._getActive());if(L===g)return;const W=g>L?sT:vk;this._slide(W,S[g])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(g){return g.defaultInterval=g.interval,g}_addEventListeners(){this._config.keyboard&&eo.on(this._element,vee,g=>this._keydown(g)),this._config.pause==="hover"&&(eo.on(this._element,_ee,()=>this.pause()),eo.on(this._element,xee,()=>this._maybeEnableCycle())),this._config.touch&&T5.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const L of Hn.find(Nee,this._element))eo.on(L,wee,W=>W.preventDefault());const S={leftCallback:()=>this._slide(this._directionToOrder(wk)),rightCallback:()=>this._slide(this._directionToOrder(w5)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),bee+this._config.interval))}};this._swipeHelper=new T5(this._element,S)}_keydown(g){if(/input|textarea/i.test(g.target.tagName))return;const S=Lee[g.key];S&&(g.preventDefault(),this._slide(this._directionToOrder(S)))}_getItemIndex(g){return this._getItems().indexOf(g)}_setActiveIndicatorElement(g){if(!this._indicatorsElement)return;const S=Hn.findOne(uV,this._indicatorsElement);S.classList.remove(m5),S.removeAttribute("aria-current");const L=Hn.findOne(`[data-bs-slide-to="${g}"]`,this._indicatorsElement);L&&(L.classList.add(m5),L.setAttribute("aria-current","true"))}_updateInterval(){const g=this._activeElement||this._getActive();if(!g)return;const S=Number.parseInt(g.getAttribute("data-bs-interval"),10);this._config.interval=S||this._config.defaultInterval}_slide(g,S=null){if(this._isSliding)return;const L=this._getActive(),W=g===sT,te=S||Q7(this._getItems(),L,W,this._config.wrap);if(te===L)return;const ce=this._getItemIndex(te),Ee=st=>eo.trigger(this._element,st,{relatedTarget:te,direction:this._orderToDirection(g),from:this._getItemIndex(L),to:ce});if(Ee(yee).defaultPrevented||!L||!te)return;const We=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(ce),this._activeElement=te;const Me=W?Aee:Eee,Ot=W?Tee:Oee;te.classList.add(Ot),mT(te),L.classList.add(Me),te.classList.add(Me);const mo=()=>{te.classList.remove(Me,Ot),te.classList.add(m5),L.classList.remove(m5,Ot,Me),this._isSliding=!1,Ee(d7)};this._queueCallback(mo,L,this._isAnimated()),We&&this.cycle()}_isAnimated(){return this._element.classList.contains(See)}_getActive(){return Hn.findOne(zee,this._element)}_getItems(){return Hn.find(fV,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(g){return Gm()?g===wk?vk:sT:g===wk?sT:vk}_orderToDirection(g){return Gm()?g===vk?wk:w5:g===vk?w5:wk}static jQueryInterface(g){return this.each(function(){const S=gT.getOrCreateInstance(this,g);if(typeof g=="number"){S.to(g);return}if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g]()}})}}eo.on(document,Cee,Ree,function(w){const g=Hn.getElementFromSelector(this);if(!g||!g.classList.contains(dV))return;w.preventDefault();const S=gT.getOrCreateInstance(g),L=this.getAttribute("data-bs-slide-to");if(L){S.to(L),S._maybeEnableCycle();return}if($b.getDataAttribute(this,"slide")==="next"){S.next(),S._maybeEnableCycle();return}S.prev(),S._maybeEnableCycle()});eo.on(window,kee,()=>{const w=Hn.find(Mee);for(const g of w)gT.getOrCreateInstance(g)});Xm(gT);const Iee="collapse",Fee="bs.collapse",hT=`.${Fee}`,Hee=".data-api",$ee=`show${hT}`,Vee=`shown${hT}`,jee=`hide${hT}`,Uee=`hidden${hT}`,Zee=`click${hT}${Hee}`,u7="show",Ck="collapse",p5="collapsing",Wee="collapsed",qee=`:scope .${Ck} .${Ck}`,Kee="collapse-horizontal",Gee="width",Yee="height",Xee=".collapse.show, .collapse.collapsing",R7='[data-bs-toggle="collapse"]',Jee={parent:null,toggle:!0},Qee={parent:"(null|element)",toggle:"boolean"};class cT extends Qp{constructor(g,S){super(g,S),this._isTransitioning=!1,this._triggerArray=[];const L=Hn.find(R7);for(const W of L){const te=Hn.getSelectorFromElement(W),ce=Hn.find(te).filter(Ee=>Ee===this._element);te!==null&&ce.length&&this._triggerArray.push(W)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Jee}static get DefaultType(){return Qee}static get NAME(){return Iee}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let g=[];if(this._config.parent&&(g=this._getFirstLevelChildren(Xee).filter(Ee=>Ee!==this._element).map(Ee=>cT.getOrCreateInstance(Ee,{toggle:!1}))),g.length&&g[0]._isTransitioning||eo.trigger(this._element,$ee).defaultPrevented)return;for(const Ee of g)Ee.hide();const L=this._getDimension();this._element.classList.remove(Ck),this._element.classList.add(p5),this._element.style[L]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const W=()=>{this._isTransitioning=!1,this._element.classList.remove(p5),this._element.classList.add(Ck,u7),this._element.style[L]="",eo.trigger(this._element,Vee)},ce=`scroll${L[0].toUpperCase()+L.slice(1)}`;this._queueCallback(W,this._element,!0),this._element.style[L]=`${this._element[ce]}px`}hide(){if(this._isTransitioning||!this._isShown()||eo.trigger(this._element,jee).defaultPrevented)return;const S=this._getDimension();this._element.style[S]=`${this._element.getBoundingClientRect()[S]}px`,mT(this._element),this._element.classList.add(p5),this._element.classList.remove(Ck,u7);for(const W of this._triggerArray){const te=Hn.getElementFromSelector(W);te&&!this._isShown(te)&&this._addAriaAndCollapsedClass([W],!1)}this._isTransitioning=!0;const L=()=>{this._isTransitioning=!1,this._element.classList.remove(p5),this._element.classList.add(Ck),eo.trigger(this._element,Uee)};this._element.style[S]="",this._queueCallback(L,this._element,!0)}_isShown(g=this._element){return g.classList.contains(u7)}_configAfterMerge(g){return g.toggle=!!g.toggle,g.parent=A1(g.parent),g}_getDimension(){return this._element.classList.contains(Kee)?Gee:Yee}_initializeChildren(){if(!this._config.parent)return;const g=this._getFirstLevelChildren(R7);for(const S of g){const L=Hn.getElementFromSelector(S);L&&this._addAriaAndCollapsedClass([S],this._isShown(L))}}_getFirstLevelChildren(g){const S=Hn.find(qee,this._config.parent);return Hn.find(g,this._config.parent).filter(L=>!S.includes(L))}_addAriaAndCollapsedClass(g,S){if(g.length)for(const L of g)L.classList.toggle(Wee,!S),L.setAttribute("aria-expanded",S)}static jQueryInterface(g){const S={};return typeof g=="string"&&/show|hide/.test(g)&&(S.toggle=!1),this.each(function(){const L=cT.getOrCreateInstance(this,S);if(typeof g=="string"){if(typeof L[g]>"u")throw new TypeError(`No method named "${g}"`);L[g]()}})}}eo.on(document,Zee,R7,function(w){(w.target.tagName==="A"||w.delegateTarget&&w.delegateTarget.tagName==="A")&&w.preventDefault();for(const g of Hn.getMultipleElementsFromSelector(this))cT.getOrCreateInstance(g,{toggle:!1}).toggle()});Xm(cT);const N$="dropdown",ete="bs.dropdown",v_=`.${ete}`,t8=".data-api",tte="Escape",D$="Tab",ote="ArrowUp",R$="ArrowDown",nte=2,ste=`hide${v_}`,rte=`hidden${v_}`,ate=`show${v_}`,ite=`shown${v_}`,mV=`click${v_}${t8}`,pV=`keydown${v_}${t8}`,lte=`keyup${v_}${t8}`,kk="show",cte="dropup",dte="dropend",ute="dropstart",fte="dropup-center",mte="dropdown-center",f_='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',pte=`${f_}.${kk}`,k5=".dropdown-menu",gte=".navbar",hte=".navbar-nav",bte=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",yte=Gm()?"top-end":"top-start",vte=Gm()?"top-start":"top-end",_te=Gm()?"bottom-end":"bottom-start",xte=Gm()?"bottom-start":"bottom-end",wte=Gm()?"left-start":"right-start",kte=Gm()?"right-start":"left-start",Cte="top",Ste="bottom",Ete={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Ate={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class rh extends Qp{constructor(g,S){super(g,S),this._popper=null,this._parent=this._element.parentNode,this._menu=Hn.next(this._element,k5)[0]||Hn.prev(this._element,k5)[0]||Hn.findOne(k5,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Ete}static get DefaultType(){return Ate}static get NAME(){return N$}toggle(){return this._isShown()?this.hide():this.show()}show(){if(T1(this._element)||this._isShown())return;const g={relatedTarget:this._element};if(!eo.trigger(this._element,ate,g).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(hte))for(const L of[].concat(...document.body.children))eo.on(L,"mouseover",A5);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(kk),this._element.classList.add(kk),eo.trigger(this._element,ite,g)}}hide(){if(T1(this._element)||!this._isShown())return;const g={relatedTarget:this._element};this._completeHide(g)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(g){if(!eo.trigger(this._element,ste,g).defaultPrevented){if("ontouchstart"in document.documentElement)for(const L of[].concat(...document.body.children))eo.off(L,"mouseover",A5);this._popper&&this._popper.destroy(),this._menu.classList.remove(kk),this._element.classList.remove(kk),this._element.setAttribute("aria-expanded","false"),$b.removeDataAttribute(this._menu,"popper"),eo.trigger(this._element,rte,g)}}_getConfig(g){if(g=super._getConfig(g),typeof g.reference=="object"&&!Hb(g.reference)&&typeof g.reference.getBoundingClientRect!="function")throw new TypeError(`${N$.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return g}_createPopper(){if(typeof Y9>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let g=this._element;this._config.reference==="parent"?g=this._parent:Hb(this._config.reference)?g=A1(this._config.reference):typeof this._config.reference=="object"&&(g=this._config.reference);const S=this._getPopperConfig();this._popper=J7(g,this._menu,S)}_isShown(){return this._menu.classList.contains(kk)}_getPlacement(){const g=this._parent;if(g.classList.contains(dte))return wte;if(g.classList.contains(ute))return kte;if(g.classList.contains(fte))return Cte;if(g.classList.contains(mte))return Ste;const S=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return g.classList.contains(cte)?S?vte:yte:S?xte:_te}_detectNavbar(){return this._element.closest(gte)!==null}_getOffset(){const{offset:g}=this._config;return typeof g=="string"?g.split(",").map(S=>Number.parseInt(S,10)):typeof g=="function"?S=>g(S,this._element):g}_getPopperConfig(){const g={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&($b.setDataAttribute(this._menu,"popper","static"),g.modifiers=[{name:"applyStyles",enabled:!1}]),{...g,...Vu(this._config.popperConfig,[g])}}_selectMenuItem({key:g,target:S}){const L=Hn.find(bte,this._menu).filter(W=>Lk(W));L.length&&Q7(L,S,g===R$,!L.includes(S)).focus()}static jQueryInterface(g){return this.each(function(){const S=rh.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof S[g]>"u")throw new TypeError(`No method named "${g}"`);S[g]()}})}static clearMenus(g){if(g.button===nte||g.type==="keyup"&&g.key!==D$)return;const S=Hn.find(pte);for(const L of S){const W=rh.getInstance(L);if(!W||W._config.autoClose===!1)continue;const te=g.composedPath(),ce=te.includes(W._menu);if(te.includes(W._element)||W._config.autoClose==="inside"&&!ce||W._config.autoClose==="outside"&&ce||W._menu.contains(g.target)&&(g.type==="keyup"&&g.key===D$||/input|select|option|textarea|form/i.test(g.target.tagName)))continue;const Ee={relatedTarget:W._element};g.type==="click"&&(Ee.clickEvent=g),W._completeHide(Ee)}}static dataApiKeydownHandler(g){const S=/input|textarea/i.test(g.target.tagName),L=g.key===tte,W=[ote,R$].includes(g.key);if(!W&&!L||S&&!L)return;g.preventDefault();const te=this.matches(f_)?this:Hn.prev(this,f_)[0]||Hn.next(this,f_)[0]||Hn.findOne(f_,g.delegateTarget.parentNode),ce=rh.getOrCreateInstance(te);if(W){g.stopPropagation(),ce.show(),ce._selectMenuItem(g);return}ce._isShown()&&(g.stopPropagation(),ce.hide(),te.focus())}}eo.on(document,pV,f_,rh.dataApiKeydownHandler);eo.on(document,pV,k5,rh.dataApiKeydownHandler);eo.on(document,mV,rh.clearMenus);eo.on(document,lte,rh.clearMenus);eo.on(document,mV,f_,function(w){w.preventDefault(),rh.getOrCreateInstance(this).toggle()});Xm(rh);const gV="backdrop",Tte="fade",M$="show",L$=`mousedown.bs.${gV}`,Ote={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},zte={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class hV extends pT{constructor(g){super(),this._config=this._getConfig(g),this._isAppended=!1,this._element=null}static get Default(){return Ote}static get DefaultType(){return zte}static get NAME(){return gV}show(g){if(!this._config.isVisible){Vu(g);return}this._append();const S=this._getElement();this._config.isAnimated&&mT(S),S.classList.add(M$),this._emulateAnimation(()=>{Vu(g)})}hide(g){if(!this._config.isVisible){Vu(g);return}this._getElement().classList.remove(M$),this._emulateAnimation(()=>{this.dispose(),Vu(g)})}dispose(){this._isAppended&&(eo.off(this._element,L$),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const g=document.createElement("div");g.className=this._config.className,this._config.isAnimated&&g.classList.add(Tte),this._element=g}return this._element}_configAfterMerge(g){return g.rootElement=A1(g.rootElement),g}_append(){if(this._isAppended)return;const g=this._getElement();this._config.rootElement.append(g),eo.on(g,L$,()=>{Vu(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(g){tV(g,this._getElement(),this._config.isAnimated)}}const Nte="focustrap",Dte="bs.focustrap",O5=`.${Dte}`,Rte=`focusin${O5}`,Mte=`keydown.tab${O5}`,Lte="Tab",Bte="forward",B$="backward",Pte={autofocus:!0,trapElement:null},Ite={autofocus:"boolean",trapElement:"element"};class bV extends pT{constructor(g){super(),this._config=this._getConfig(g),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Pte}static get DefaultType(){return Ite}static get NAME(){return Nte}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),eo.off(document,O5),eo.on(document,Rte,g=>this._handleFocusin(g)),eo.on(document,Mte,g=>this._handleKeydown(g)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,eo.off(document,O5))}_handleFocusin(g){const{trapElement:S}=this._config;if(g.target===document||g.target===S||S.contains(g.target))return;const L=Hn.focusableChildren(S);L.length===0?S.focus():this._lastTabNavDirection===B$?L[L.length-1].focus():L[0].focus()}_handleKeydown(g){g.key===Lte&&(this._lastTabNavDirection=g.shiftKey?B$:Bte)}}const P$=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",I$=".sticky-top",g5="padding-right",F$="margin-right";class M7{constructor(){this._element=document.body}getWidth(){const g=document.documentElement.clientWidth;return Math.abs(window.innerWidth-g)}hide(){const g=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,g5,S=>S+g),this._setElementAttributes(P$,g5,S=>S+g),this._setElementAttributes(I$,F$,S=>S-g)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,g5),this._resetElementAttributes(P$,g5),this._resetElementAttributes(I$,F$)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(g,S,L){const W=this.getWidth(),te=ce=>{if(ce!==this._element&&window.innerWidth>ce.clientWidth+W)return;this._saveInitialAttribute(ce,S);const Ee=window.getComputedStyle(ce).getPropertyValue(S);ce.style.setProperty(S,`${L(Number.parseFloat(Ee))}px`)};this._applyManipulationCallback(g,te)}_saveInitialAttribute(g,S){const L=g.style.getPropertyValue(S);L&&$b.setDataAttribute(g,S,L)}_resetElementAttributes(g,S){const L=W=>{const te=$b.getDataAttribute(W,S);if(te===null){W.style.removeProperty(S);return}$b.removeDataAttribute(W,S),W.style.setProperty(S,te)};this._applyManipulationCallback(g,L)}_applyManipulationCallback(g,S){if(Hb(g)){S(g);return}for(const L of Hn.find(g,this._element))S(L)}}const Fte="modal",Hte="bs.modal",Ym=`.${Hte}`,$te=".data-api",Vte="Escape",jte=`hide${Ym}`,Ute=`hidePrevented${Ym}`,yV=`hidden${Ym}`,vV=`show${Ym}`,Zte=`shown${Ym}`,Wte=`resize${Ym}`,qte=`click.dismiss${Ym}`,Kte=`mousedown.dismiss${Ym}`,Gte=`keydown.dismiss${Ym}`,Yte=`click${Ym}${$te}`,H$="modal-open",Xte="fade",$$="show",f7="modal-static",Jte=".modal.show",Qte=".modal-dialog",eoe=".modal-body",toe='[data-bs-toggle="modal"]',ooe={backdrop:!0,focus:!0,keyboard:!0},noe={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class zk extends Qp{constructor(g,S){super(g,S),this._dialog=Hn.findOne(Qte,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new M7,this._addEventListeners()}static get Default(){return ooe}static get DefaultType(){return noe}static get NAME(){return Fte}toggle(g){return this._isShown?this.hide():this.show(g)}show(g){this._isShown||this._isTransitioning||eo.trigger(this._element,vV,{relatedTarget:g}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(H$),this._adjustDialog(),this._backdrop.show(()=>this._showElement(g)))}hide(){!this._isShown||this._isTransitioning||eo.trigger(this._element,jte).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove($$),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){eo.off(window,Ym),eo.off(this._dialog,Ym),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new hV({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new bV({trapElement:this._element})}_showElement(g){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const S=Hn.findOne(eoe,this._dialog);S&&(S.scrollTop=0),mT(this._element),this._element.classList.add($$);const L=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,eo.trigger(this._element,Zte,{relatedTarget:g})};this._queueCallback(L,this._dialog,this._isAnimated())}_addEventListeners(){eo.on(this._element,Gte,g=>{if(g.key===Vte){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),eo.on(window,Wte,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),eo.on(this._element,Kte,g=>{eo.one(this._element,qte,S=>{if(!(this._element!==g.target||this._element!==S.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(H$),this._resetAdjustments(),this._scrollBar.reset(),eo.trigger(this._element,yV)})}_isAnimated(){return this._element.classList.contains(Xte)}_triggerBackdropTransition(){if(eo.trigger(this._element,Ute).defaultPrevented)return;const S=this._element.scrollHeight>document.documentElement.clientHeight,L=this._element.style.overflowY;L==="hidden"||this._element.classList.contains(f7)||(S||(this._element.style.overflowY="hidden"),this._element.classList.add(f7),this._queueCallback(()=>{this._element.classList.remove(f7),this._queueCallback(()=>{this._element.style.overflowY=L},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const g=this._element.scrollHeight>document.documentElement.clientHeight,S=this._scrollBar.getWidth(),L=S>0;if(L&&!g){const W=Gm()?"paddingLeft":"paddingRight";this._element.style[W]=`${S}px`}if(!L&&g){const W=Gm()?"paddingRight":"paddingLeft";this._element.style[W]=`${S}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(g,S){return this.each(function(){const L=zk.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof L[g]>"u")throw new TypeError(`No method named "${g}"`);L[g](S)}})}}eo.on(document,Yte,toe,function(w){const g=Hn.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&w.preventDefault(),eo.one(g,vV,W=>{W.defaultPrevented||eo.one(g,yV,()=>{Lk(this)&&this.focus()})});const S=Hn.findOne(Jte);S&&zk.getInstance(S).hide(),zk.getOrCreateInstance(g).toggle(this)});I5(zk);Xm(zk);const soe="offcanvas",roe="bs.offcanvas",jb=`.${roe}`,_V=".data-api",aoe=`load${jb}${_V}`,ioe="Escape",V$="show",j$="showing",U$="hiding",loe="offcanvas-backdrop",xV=".offcanvas.show",coe=`show${jb}`,doe=`shown${jb}`,uoe=`hide${jb}`,Z$=`hidePrevented${jb}`,wV=`hidden${jb}`,foe=`resize${jb}`,moe=`click${jb}${_V}`,poe=`keydown.dismiss${jb}`,goe='[data-bs-toggle="offcanvas"]',hoe={backdrop:!0,keyboard:!0,scroll:!1},boe={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class O1 extends Qp{constructor(g,S){super(g,S),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return hoe}static get DefaultType(){return boe}static get NAME(){return soe}toggle(g){return this._isShown?this.hide():this.show(g)}show(g){if(this._isShown||eo.trigger(this._element,coe,{relatedTarget:g}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new M7().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(j$);const L=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(V$),this._element.classList.remove(j$),eo.trigger(this._element,doe,{relatedTarget:g})};this._queueCallback(L,this._element,!0)}hide(){if(!this._isShown||eo.trigger(this._element,uoe).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(U$),this._backdrop.hide();const S=()=>{this._element.classList.remove(V$,U$),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new M7().reset(),eo.trigger(this._element,wV)};this._queueCallback(S,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const g=()=>{if(this._config.backdrop==="static"){eo.trigger(this._element,Z$);return}this.hide()},S=!!this._config.backdrop;return new hV({className:loe,isVisible:S,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:S?g:null})}_initializeFocusTrap(){return new bV({trapElement:this._element})}_addEventListeners(){eo.on(this._element,poe,g=>{if(g.key===ioe){if(this._config.keyboard){this.hide();return}eo.trigger(this._element,Z$)}})}static jQueryInterface(g){return this.each(function(){const S=O1.getOrCreateInstance(this,g);if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g](this)}})}}eo.on(document,moe,goe,function(w){const g=Hn.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&w.preventDefault(),T1(this))return;eo.one(g,wV,()=>{Lk(this)&&this.focus()});const S=Hn.findOne(xV);S&&S!==g&&O1.getInstance(S).hide(),O1.getOrCreateInstance(g).toggle(this)});eo.on(window,aoe,()=>{for(const w of Hn.find(xV))O1.getOrCreateInstance(w).show()});eo.on(window,foe,()=>{for(const w of Hn.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(w).position!=="fixed"&&O1.getOrCreateInstance(w).hide()});I5(O1);Xm(O1);const yoe=/^aria-[\w-]*$/i,kV={"*":["class","dir","id","lang","role",yoe],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},voe=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),_oe=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,xoe=(w,g)=>{const S=w.nodeName.toLowerCase();return g.includes(S)?voe.has(S)?!!_oe.test(w.nodeValue):!0:g.filter(L=>L instanceof RegExp).some(L=>L.test(S))};function woe(w,g,S){if(!w.length)return w;if(S&&typeof S=="function")return S(w);const W=new window.DOMParser().parseFromString(w,"text/html"),te=[].concat(...W.body.querySelectorAll("*"));for(const ce of te){const Ee=ce.nodeName.toLowerCase();if(!Object.keys(g).includes(Ee)){ce.remove();continue}const He=[].concat(...ce.attributes),We=[].concat(g["*"]||[],g[Ee]||[]);for(const Me of He)xoe(Me,We)||ce.removeAttribute(Me.nodeName)}return W.body.innerHTML}const koe="TemplateFactory",Coe={allowList:kV,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Soe={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Eoe={entry:"(string|element|function|null)",selector:"(string|element)"};class Aoe extends pT{constructor(g){super(),this._config=this._getConfig(g)}static get Default(){return Coe}static get DefaultType(){return Soe}static get NAME(){return koe}getContent(){return Object.values(this._config.content).map(g=>this._resolvePossibleFunction(g)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(g){return this._checkContent(g),this._config.content={...this._config.content,...g},this}toHtml(){const g=document.createElement("div");g.innerHTML=this._maybeSanitize(this._config.template);for(const[W,te]of Object.entries(this._config.content))this._setContent(g,te,W);const S=g.children[0],L=this._resolvePossibleFunction(this._config.extraClass);return L&&S.classList.add(...L.split(" ")),S}_typeCheckConfig(g){super._typeCheckConfig(g),this._checkContent(g.content)}_checkContent(g){for(const[S,L]of Object.entries(g))super._typeCheckConfig({selector:S,entry:L},Eoe)}_setContent(g,S,L){const W=Hn.findOne(L,g);if(W){if(S=this._resolvePossibleFunction(S),!S){W.remove();return}if(Hb(S)){this._putElementInTemplate(A1(S),W);return}if(this._config.html){W.innerHTML=this._maybeSanitize(S);return}W.textContent=S}}_maybeSanitize(g){return this._config.sanitize?woe(g,this._config.allowList,this._config.sanitizeFn):g}_resolvePossibleFunction(g){return Vu(g,[this])}_putElementInTemplate(g,S){if(this._config.html){S.innerHTML="",S.append(g);return}S.textContent=g.textContent}}const Toe="tooltip",Ooe=new Set(["sanitize","allowList","sanitizeFn"]),m7="fade",zoe="modal",h5="show",Noe=".tooltip-inner",W$=`.${zoe}`,q$="hide.bs.modal",rT="hover",p7="focus",Doe="click",Roe="manual",Moe="hide",Loe="hidden",Boe="show",Poe="shown",Ioe="inserted",Foe="click",Hoe="focusin",$oe="focusout",Voe="mouseenter",joe="mouseleave",Uoe={AUTO:"auto",TOP:"top",RIGHT:Gm()?"left":"right",BOTTOM:"bottom",LEFT:Gm()?"right":"left"},Zoe={allowList:kV,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Woe={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Pk extends Qp{constructor(g,S){if(typeof Y9>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(g,S),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Zoe}static get DefaultType(){return Woe}static get NAME(){return Toe}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),eo.off(this._element.closest(W$),q$,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const g=eo.trigger(this._element,this.constructor.eventName(Boe)),L=(Q9(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(g.defaultPrevented||!L)return;this._disposePopper();const W=this._getTipElement();this._element.setAttribute("aria-describedby",W.getAttribute("id"));const{container:te}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(te.append(W),eo.trigger(this._element,this.constructor.eventName(Ioe))),this._popper=this._createPopper(W),W.classList.add(h5),"ontouchstart"in document.documentElement)for(const Ee of[].concat(...document.body.children))eo.on(Ee,"mouseover",A5);const ce=()=>{eo.trigger(this._element,this.constructor.eventName(Poe)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(ce,this.tip,this._isAnimated())}hide(){if(!this._isShown()||eo.trigger(this._element,this.constructor.eventName(Moe)).defaultPrevented)return;if(this._getTipElement().classList.remove(h5),"ontouchstart"in document.documentElement)for(const W of[].concat(...document.body.children))eo.off(W,"mouseover",A5);this._activeTrigger[Doe]=!1,this._activeTrigger[p7]=!1,this._activeTrigger[rT]=!1,this._isHovered=null;const L=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),eo.trigger(this._element,this.constructor.eventName(Loe)))};this._queueCallback(L,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(g){const S=this._getTemplateFactory(g).toHtml();if(!S)return null;S.classList.remove(m7,h5),S.classList.add(`bs-${this.constructor.NAME}-auto`);const L=DQ(this.constructor.NAME).toString();return S.setAttribute("id",L),this._isAnimated()&&S.classList.add(m7),S}setContent(g){this._newContent=g,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(g){return this._templateFactory?this._templateFactory.changeContent(g):this._templateFactory=new Aoe({...this._config,content:g,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Noe]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(g){return this.constructor.getOrCreateInstance(g.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(m7)}_isShown(){return this.tip&&this.tip.classList.contains(h5)}_createPopper(g){const S=Vu(this._config.placement,[this,g,this._element]),L=Uoe[S.toUpperCase()];return J7(this._element,g,this._getPopperConfig(L))}_getOffset(){const{offset:g}=this._config;return typeof g=="string"?g.split(",").map(S=>Number.parseInt(S,10)):typeof g=="function"?S=>g(S,this._element):g}_resolvePossibleFunction(g){return Vu(g,[this._element])}_getPopperConfig(g){const S={placement:g,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:L=>{this._getTipElement().setAttribute("data-popper-placement",L.state.placement)}}]};return{...S,...Vu(this._config.popperConfig,[S])}}_setListeners(){const g=this._config.trigger.split(" ");for(const S of g)if(S==="click")eo.on(this._element,this.constructor.eventName(Foe),this._config.selector,L=>{this._initializeOnDelegatedTarget(L).toggle()});else if(S!==Roe){const L=S===rT?this.constructor.eventName(Voe):this.constructor.eventName(Hoe),W=S===rT?this.constructor.eventName(joe):this.constructor.eventName($oe);eo.on(this._element,L,this._config.selector,te=>{const ce=this._initializeOnDelegatedTarget(te);ce._activeTrigger[te.type==="focusin"?p7:rT]=!0,ce._enter()}),eo.on(this._element,W,this._config.selector,te=>{const ce=this._initializeOnDelegatedTarget(te);ce._activeTrigger[te.type==="focusout"?p7:rT]=ce._element.contains(te.relatedTarget),ce._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},eo.on(this._element.closest(W$),q$,this._hideModalHandler)}_fixTitle(){const g=this._element.getAttribute("title");g&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",g),this._element.setAttribute("data-bs-original-title",g),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(g,S){clearTimeout(this._timeout),this._timeout=setTimeout(g,S)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(g){const S=$b.getDataAttributes(this._element);for(const L of Object.keys(S))Ooe.has(L)&&delete S[L];return g={...S,...typeof g=="object"&&g?g:{}},g=this._mergeConfigObj(g),g=this._configAfterMerge(g),this._typeCheckConfig(g),g}_configAfterMerge(g){return g.container=g.container===!1?document.body:A1(g.container),typeof g.delay=="number"&&(g.delay={show:g.delay,hide:g.delay}),typeof g.title=="number"&&(g.title=g.title.toString()),typeof g.content=="number"&&(g.content=g.content.toString()),g}_getDelegateConfig(){const g={};for(const[S,L]of Object.entries(this._config))this.constructor.Default[S]!==L&&(g[S]=L);return g.selector=!1,g.trigger="manual",g}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(g){return this.each(function(){const S=Pk.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof S[g]>"u")throw new TypeError(`No method named "${g}"`);S[g]()}})}}Xm(Pk);const qoe="popover",Koe=".popover-header",Goe=".popover-body",Yoe={...Pk.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},Xoe={...Pk.DefaultType,content:"(null|string|element|function)"};class o8 extends Pk{static get Default(){return Yoe}static get DefaultType(){return Xoe}static get NAME(){return qoe}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Koe]:this._getTitle(),[Goe]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(g){return this.each(function(){const S=o8.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof S[g]>"u")throw new TypeError(`No method named "${g}"`);S[g]()}})}}Xm(o8);const Joe="scrollspy",Qoe="bs.scrollspy",n8=`.${Qoe}`,ene=".data-api",tne=`activate${n8}`,K$=`click${n8}`,one=`load${n8}${ene}`,nne="dropdown-item",_k="active",sne='[data-bs-spy="scroll"]',g7="[href]",rne=".nav, .list-group",G$=".nav-link",ane=".nav-item",ine=".list-group-item",lne=`${G$}, ${ane} > ${G$}, ${ine}`,cne=".dropdown",dne=".dropdown-toggle",une={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},fne={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class $5 extends Qp{constructor(g,S){super(g,S),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return une}static get DefaultType(){return fne}static get NAME(){return Joe}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const g of this._observableSections.values())this._observer.observe(g)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(g){return g.target=A1(g.target)||document.body,g.rootMargin=g.offset?`${g.offset}px 0px -30%`:g.rootMargin,typeof g.threshold=="string"&&(g.threshold=g.threshold.split(",").map(S=>Number.parseFloat(S))),g}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(eo.off(this._config.target,K$),eo.on(this._config.target,K$,g7,g=>{const S=this._observableSections.get(g.target.hash);if(S){g.preventDefault();const L=this._rootElement||window,W=S.offsetTop-this._element.offsetTop;if(L.scrollTo){L.scrollTo({top:W,behavior:"smooth"});return}L.scrollTop=W}}))}_getNewObserver(){const g={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(S=>this._observerCallback(S),g)}_observerCallback(g){const S=ce=>this._targetLinks.get(`#${ce.target.id}`),L=ce=>{this._previousScrollData.visibleEntryTop=ce.target.offsetTop,this._process(S(ce))},W=(this._rootElement||document.documentElement).scrollTop,te=W>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=W;for(const ce of g){if(!ce.isIntersecting){this._activeTarget=null,this._clearActiveClass(S(ce));continue}const Ee=ce.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(te&&Ee){if(L(ce),!W)return;continue}!te&&!Ee&&L(ce)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const g=Hn.find(g7,this._config.target);for(const S of g){if(!S.hash||T1(S))continue;const L=Hn.findOne(decodeURI(S.hash),this._element);Lk(L)&&(this._targetLinks.set(decodeURI(S.hash),S),this._observableSections.set(S.hash,L))}}_process(g){this._activeTarget!==g&&(this._clearActiveClass(this._config.target),this._activeTarget=g,g.classList.add(_k),this._activateParents(g),eo.trigger(this._element,tne,{relatedTarget:g}))}_activateParents(g){if(g.classList.contains(nne)){Hn.findOne(dne,g.closest(cne)).classList.add(_k);return}for(const S of Hn.parents(g,rne))for(const L of Hn.prev(S,lne))L.classList.add(_k)}_clearActiveClass(g){g.classList.remove(_k);const S=Hn.find(`${g7}.${_k}`,g);for(const L of S)L.classList.remove(_k)}static jQueryInterface(g){return this.each(function(){const S=$5.getOrCreateInstance(this,g);if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g]()}})}}eo.on(window,one,()=>{for(const w of Hn.find(sne))$5.getOrCreateInstance(w)});Xm($5);const mne="tab",pne="bs.tab",__=`.${pne}`,gne=`hide${__}`,hne=`hidden${__}`,bne=`show${__}`,yne=`shown${__}`,vne=`click${__}`,_ne=`keydown${__}`,xne=`load${__}`,wne="ArrowLeft",Y$="ArrowRight",kne="ArrowUp",X$="ArrowDown",h7="Home",J$="End",m_="active",Q$="fade",b7="show",Cne="dropdown",CV=".dropdown-toggle",Sne=".dropdown-menu",y7=`:not(${CV})`,Ene='.list-group, .nav, [role="tablist"]',Ane=".nav-item, .list-group-item",Tne=`.nav-link${y7}, .list-group-item${y7}, [role="tab"]${y7}`,SV='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',v7=`${Tne}, ${SV}`,One=`.${m_}[data-bs-toggle="tab"], .${m_}[data-bs-toggle="pill"], .${m_}[data-bs-toggle="list"]`;class Nk extends Qp{constructor(g){super(g),this._parent=this._element.closest(Ene),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),eo.on(this._element,_ne,S=>this._keydown(S)))}static get NAME(){return mne}show(){const g=this._element;if(this._elemIsActive(g))return;const S=this._getActiveElem(),L=S?eo.trigger(S,gne,{relatedTarget:g}):null;eo.trigger(g,bne,{relatedTarget:S}).defaultPrevented||L&&L.defaultPrevented||(this._deactivate(S,g),this._activate(g,S))}_activate(g,S){if(!g)return;g.classList.add(m_),this._activate(Hn.getElementFromSelector(g));const L=()=>{if(g.getAttribute("role")!=="tab"){g.classList.add(b7);return}g.removeAttribute("tabindex"),g.setAttribute("aria-selected",!0),this._toggleDropDown(g,!0),eo.trigger(g,yne,{relatedTarget:S})};this._queueCallback(L,g,g.classList.contains(Q$))}_deactivate(g,S){if(!g)return;g.classList.remove(m_),g.blur(),this._deactivate(Hn.getElementFromSelector(g));const L=()=>{if(g.getAttribute("role")!=="tab"){g.classList.remove(b7);return}g.setAttribute("aria-selected",!1),g.setAttribute("tabindex","-1"),this._toggleDropDown(g,!1),eo.trigger(g,hne,{relatedTarget:S})};this._queueCallback(L,g,g.classList.contains(Q$))}_keydown(g){if(![wne,Y$,kne,X$,h7,J$].includes(g.key))return;g.stopPropagation(),g.preventDefault();const S=this._getChildren().filter(W=>!T1(W));let L;if([h7,J$].includes(g.key))L=S[g.key===h7?0:S.length-1];else{const W=[Y$,X$].includes(g.key);L=Q7(S,g.target,W,!0)}L&&(L.focus({preventScroll:!0}),Nk.getOrCreateInstance(L).show())}_getChildren(){return Hn.find(v7,this._parent)}_getActiveElem(){return this._getChildren().find(g=>this._elemIsActive(g))||null}_setInitialAttributes(g,S){this._setAttributeIfNotExists(g,"role","tablist");for(const L of S)this._setInitialAttributesOnChild(L)}_setInitialAttributesOnChild(g){g=this._getInnerElement(g);const S=this._elemIsActive(g),L=this._getOuterElement(g);g.setAttribute("aria-selected",S),L!==g&&this._setAttributeIfNotExists(L,"role","presentation"),S||g.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(g,"role","tab"),this._setInitialAttributesOnTargetPanel(g)}_setInitialAttributesOnTargetPanel(g){const S=Hn.getElementFromSelector(g);S&&(this._setAttributeIfNotExists(S,"role","tabpanel"),g.id&&this._setAttributeIfNotExists(S,"aria-labelledby",`${g.id}`))}_toggleDropDown(g,S){const L=this._getOuterElement(g);if(!L.classList.contains(Cne))return;const W=(te,ce)=>{const Ee=Hn.findOne(te,L);Ee&&Ee.classList.toggle(ce,S)};W(CV,m_),W(Sne,b7),L.setAttribute("aria-expanded",S)}_setAttributeIfNotExists(g,S,L){g.hasAttribute(S)||g.setAttribute(S,L)}_elemIsActive(g){return g.classList.contains(m_)}_getInnerElement(g){return g.matches(v7)?g:Hn.findOne(v7,g)}_getOuterElement(g){return g.closest(Ane)||g}static jQueryInterface(g){return this.each(function(){const S=Nk.getOrCreateInstance(this);if(typeof g=="string"){if(S[g]===void 0||g.startsWith("_")||g==="constructor")throw new TypeError(`No method named "${g}"`);S[g]()}})}}eo.on(document,vne,SV,function(w){["A","AREA"].includes(this.tagName)&&w.preventDefault(),!T1(this)&&Nk.getOrCreateInstance(this).show()});eo.on(window,xne,()=>{for(const w of Hn.find(One))Nk.getOrCreateInstance(w)});Xm(Nk);const zne="toast",Nne="bs.toast",D1=`.${Nne}`,Dne=`mouseover${D1}`,Rne=`mouseout${D1}`,Mne=`focusin${D1}`,Lne=`focusout${D1}`,Bne=`hide${D1}`,Pne=`hidden${D1}`,Ine=`show${D1}`,Fne=`shown${D1}`,Hne="fade",e9="hide",b5="show",y5="showing",$ne={animation:"boolean",autohide:"boolean",delay:"number"},Vne={animation:!0,autohide:!0,delay:5e3};class V5 extends Qp{constructor(g,S){super(g,S),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Vne}static get DefaultType(){return $ne}static get NAME(){return zne}show(){if(eo.trigger(this._element,Ine).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Hne);const S=()=>{this._element.classList.remove(y5),eo.trigger(this._element,Fne),this._maybeScheduleHide()};this._element.classList.remove(e9),mT(this._element),this._element.classList.add(b5,y5),this._queueCallback(S,this._element,this._config.animation)}hide(){if(!this.isShown()||eo.trigger(this._element,Bne).defaultPrevented)return;const S=()=>{this._element.classList.add(e9),this._element.classList.remove(y5,b5),eo.trigger(this._element,Pne)};this._element.classList.add(y5),this._queueCallback(S,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(b5),super.dispose()}isShown(){return this._element.classList.contains(b5)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(g,S){switch(g.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=S;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=S;break}}if(S){this._clearTimeout();return}const L=g.relatedTarget;this._element===L||this._element.contains(L)||this._maybeScheduleHide()}_setListeners(){eo.on(this._element,Dne,g=>this._onInteraction(g,!0)),eo.on(this._element,Rne,g=>this._onInteraction(g,!1)),eo.on(this._element,Mne,g=>this._onInteraction(g,!0)),eo.on(this._element,Lne,g=>this._onInteraction(g,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(g){return this.each(function(){const S=V5.getOrCreateInstance(this,g);if(typeof g=="string"){if(typeof S[g]>"u")throw new TypeError(`No method named "${g}"`);S[g](this)}})}}I5(V5);Xm(V5);function jne(w){return w&&w.__esModule&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w}var EV={exports:{}};(function(w){(function(){var g=function(e){if(e===null)return"null";if(e===void 0)return"undefined";var t=typeof e;return t==="object"&&(Array.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="Array")?"array":t==="object"&&(String.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="String")?"string":t},S=function(e){return["undefined","boolean","number","string","function","xml","null"].indexOf(e)!==-1},L=function(e,t){var o=Array.prototype.slice.call(e);return o.sort(t)},W=function(e,t){return te(function(o,s){return e.eq(t(o),t(s))})},te=function(e){return{eq:e}},ce=te(function(e,t){return e===t}),Ee=ce,He=function(e){return te(function(t,o){if(t.length!==o.length)return!1;for(var s=t.length,a=0;a{var s;return o(e,t.prototype)?!0:((s=e.constructor)===null||s===void 0?void 0:s.name)===t.name},ut=e=>{const t=typeof e;return e===null?"null":t==="object"&&Array.isArray(e)?"array":t==="object"&&st(e,String,(o,s)=>s.isPrototypeOf(o))?"string":t},Lt=e=>t=>ut(t)===e,Rt=e=>t=>typeof t===e,Ke=e=>t=>e===t,Ut=(e,t)=>ue(e)&&st(e,t,(o,s)=>mo(o)===s),ft=Lt("string"),ue=Lt("object"),Ct=e=>Ut(e,Object),ve=Lt("array"),ot=Ke(null),bn=Rt("boolean"),ln=Ke(void 0),uo=e=>e==null,Fe=e=>!uo(e),Gt=Rt("function"),D=Rt("number"),bt=(e,t)=>{if(ve(e)){for(let o=0,s=e.length;o{},Kt=(e,t)=>(...o)=>e(t.apply(null,o)),qo=(e,t)=>o=>e(t(o)),Ge=e=>()=>e,Ao=e=>e,Cr=(e,t)=>e===t;function Ht(e,...t){return(...o)=>{const s=t.concat(o);return e.apply(null,s)}}const pt=e=>t=>!e(t),$t=e=>()=>{throw new Error(e)},ks=e=>e(),cn=e=>{e()},fn=Ge(!1),zo=Ge(!0);class j{constructor(t,o){this.tag=t,this.value=o}static some(t){return new j(!0,t)}static none(){return j.singletonNone}fold(t,o){return this.tag?o(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?j.some(t(this.value)):j.none()}bind(t){return this.tag?t(this.value):j.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:j.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(t??"Called getOrDie on None")}static from(t){return Fe(t)?j.some(t):j.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}j.singletonNone=new j(!1);const Fr=Array.prototype.slice,Cs=Array.prototype.indexOf,Sn=Array.prototype.push,hi=(e,t)=>Cs.call(e,t),Wi=(e,t)=>{const o=hi(e,t);return o===-1?j.none():j.some(o)},mn=(e,t)=>hi(e,t)>-1,Ln=(e,t)=>{for(let o=0,s=e.length;o{const o=e.length,s=new Array(o);for(let a=0;a{for(let o=0,s=e.length;o{for(let o=e.length-1;o>=0;o--){const s=e[o];t(s,o)}},yt=(e,t)=>{const o=[],s=[];for(let a=0,c=e.length;a{const o=[];for(let s=0,a=e.length;s(Bt(e,(s,a)=>{o=t(o,s,a)}),o),ko=(e,t,o)=>(Be(e,(s,a)=>{o=t(o,s,a)}),o),tn=(e,t,o)=>{for(let s=0,a=e.length;stn(e,t,fn),rs=(e,t)=>{for(let o=0,s=e.length;o{const t=[];for(let o=0,s=e.length;oZn(dn(e,t)),$s=(e,t)=>{for(let o=0,s=e.length;o{const t=Fr.call(e,0);return t.reverse(),t},os=(e,t)=>rt(e,o=>!mn(t,o)),Is=(e,t)=>{const o={};for(let s=0,a=e.length;s{const o=Fr.call(e,0);return o.sort(t),o},ra=(e,t)=>t>=0&&tra(e,0),Vo=e=>ra(e,e.length-1),an=Gt(Array.from)?Array.from:e=>Fr.call(e),Kr=(e,t)=>{for(let o=0;o{const o=[],s=Gt(t)?a=>Ln(o,c=>t(c,a)):a=>mn(o,a);for(let a=0,c=e.length;a{const o=vt(e);for(let s=0,a=o.length;sas(e,(o,s)=>({k:s,v:t(o,s)})),as=(e,t)=>{const o={};return nn(e,(s,a)=>{const c=t(s,a);o[c.k]=c.v}),o},hr=e=>(t,o)=>{e[o]=t},bl=(e,t,o,s)=>{nn(e,(a,c)=>{(t(a,c)?o:s)(a,c)})},ll=(e,t)=>{const o={},s={};return bl(e,t,hr(o),hr(s)),{t:o,f:s}},Mi=(e,t)=>{const o={};return bl(e,t,hr(o),dt),o},yi=(e,t)=>{const o=[];return nn(e,(s,a)=>{o.push(t(s,a))}),o},yl=e=>yi(e,Ao),Gn=(e,t)=>Ro(e,t)?j.from(e[t]):j.none(),Ro=(e,t)=>oi.call(e,t),Ha=(e,t)=>Ro(e,t)&&e[t]!==void 0&&e[t]!==null,Hr=(e,t,o=Ot)=>Me(o).eq(e,t),hd=e=>{const t={};return Be(e,o=>{t[o]={}}),vt(t)},Vt=e=>e.length!==void 0,Dr=Array.isArray,ru=e=>{if(Dr(e))return e;{const t=[];for(let o=0,s=e.length;o{if(!e)return!1;if(o=o||e,Vt(e)){for(let s=0,a=e.length;s{const o=[];return zs(e,(s,a)=>{o.push(t(s,a,e))}),o},ni=(e,t)=>{const o=[];return zs(e,(s,a)=>{(!t||t(s,a,e))&&o.push(s)}),o},qi=(e,t)=>{if(e){for(let o=0,s=e.length;o{let a=ln(o)?e[0]:o;for(let c=0;c{for(let s=0,a=e.length;se[e.length-1],si=e=>{let t=!1,o;return(...s)=>(t||(t=!0,o=e.apply(null,s)),o)},au=(e,t,o,s)=>{const a=e.isiOS()&&/ipad/i.test(o)===!0,c=e.isiOS()&&!a,d=e.isiOS()||e.isAndroid(),h=d||s("(pointer:coarse)"),_=a||!c&&d&&s("(min-device-width:768px)"),z=c||d&&!_,I=t.isSafari()&&e.isiOS()&&/safari/i.test(o)===!1,H=!z&&!_&&!I;return{isiPad:Ge(a),isiPhone:Ge(c),isTablet:Ge(_),isPhone:Ge(z),isTouch:Ge(h),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:Ge(I),isDesktop:Ge(H)}},pc=(e,t)=>{for(let o=0;o{const o=pc(e,t);if(!o)return{major:0,minor:0};const s=a=>Number(t.replace(o,"$"+a));return $n(s(1),s(2))},iu=(e,t)=>{const o=String(t).toLowerCase();return e.length===0?Zc():_i(e,o)},Zc=()=>$n(0,0),$n=(e,t)=>({major:e,minor:t}),lr={nu:$n,detect:iu,unknown:Zc},ha=(e,t)=>Kr(t.brands,o=>{const s=o.brand.toLowerCase();return On(e,a=>{var c;return s===((c=a.brand)===null||c===void 0?void 0:c.toLowerCase())}).map(a=>({current:a.name,version:lr.nu(parseInt(o.version,10),0)}))}),Uu=(e,t)=>{const o=String(t).toLowerCase();return On(e,s=>s.search(o))},Ki=(e,t)=>Uu(e,t).map(o=>{const s=lr.detect(o.versionRegexes,t);return{current:o.name,version:s}}),yd=(e,t)=>Uu(e,t).map(o=>{const s=lr.detect(o.versionRegexes,t);return{current:o.name,version:s}}),$r=(e,t)=>e.substring(t),ba=(e,t,o)=>t===""||e.length>=t.length&&e.substr(o,o+t.length)===t,xi=(e,t)=>vs(e,t)?$r(e,t.length):e,Yn=(e,t,o=0,s)=>{const a=e.indexOf(t,o);return a!==-1?ln(s)?!0:a+t.length<=s:!1},vs=(e,t)=>ba(e,t,0),Gi=(e,t)=>ba(e,t,e.length-t.length),gc=e=>t=>t.replace(e,""),br=gc(/^\s+|\s+$/g),vl=gc(/^\s+/g),Vs=gc(/\s+$/g),Pn=e=>e.length>0,wi=e=>!Pn(e),Oa=(e,t)=>t<=0?"":new Array(t+1).join(e),Vr=(e,t=10)=>{const o=parseInt(e,t);return isNaN(o)?j.none():j.some(o)},za=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Qs=e=>t=>Yn(t,e),vd=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>Yn(e,"edge/")&&Yn(e,"chrome")&&Yn(e,"safari")&&Yn(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,za],search:e=>Yn(e,"chrome")&&!Yn(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>Yn(e,"msie")||Yn(e,"trident")},{name:"Opera",versionRegexes:[za,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Qs("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Qs("firefox")},{name:"Safari",versionRegexes:[za,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(Yn(e,"safari")||Yn(e,"mobile/"))&&Yn(e,"applewebkit")}],wo=[{name:"Windows",search:Qs("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>Yn(e,"iphone")||Yn(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Qs("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:Qs("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Qs("linux"),versionRegexes:[]},{name:"Solaris",search:Qs("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Qs("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Qs("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],_l={browsers:Ge(vd),oses:Ge(wo)},yr="Edge",Fs="Chromium",Wc="IE",pn="Opera",$l="Firefox",ya="Safari",Mo=()=>Li({current:void 0,version:lr.unknown()}),Li=e=>{const t=e.current,o=e.version,s=a=>()=>t===a;return{current:t,version:o,isEdge:s(yr),isChromium:s(Fs),isIE:s(Wc),isOpera:s(pn),isFirefox:s($l),isSafari:s(ya)}},ri={unknown:Mo,nu:Li,edge:Ge(yr),chromium:Ge(Fs),ie:Ge(Wc),opera:Ge(pn),firefox:Ge($l),safari:Ge(ya)},Ns="Windows",Vl="iOS",er="Android",hc="Linux",Gr="macOS",Vn="Solaris",xl="FreeBSD",qc="ChromeOS",_d=()=>Ds({current:void 0,version:lr.unknown()}),Ds=e=>{const t=e.current,o=e.version,s=a=>()=>t===a;return{current:t,version:o,isWindows:s(Ns),isiOS:s(Vl),isAndroid:s(er),isMacOS:s(Gr),isLinux:s(hc),isSolaris:s(Vn),isFreeBSD:s(xl),isChromeOS:s(qc)}},Na={unknown:_d,nu:Ds,windows:Ge(Ns),ios:Ge(Vl),android:Ge(er),linux:Ge(hc),macos:Ge(Gr),solaris:Ge(Vn),freebsd:Ge(xl),chromeos:Ge(qc)},pe={detect:(e,t,o)=>{const s=_l.browsers(),a=_l.oses(),c=t.bind(_=>ha(s,_)).orThunk(()=>Ki(s,e)).fold(ri.unknown,ri.nu),d=yd(a,e).fold(Na.unknown,Na.nu),h=au(d,c,e,o);return{browser:c,os:d,deviceType:h}}},Te=e=>window.matchMedia(e).matches;let Ye=si(()=>pe.detect(window.navigator.userAgent,j.from(window.navigator.userAgentData),Te));const _t=()=>Ye(),oo=window.navigator.userAgent,Go=_t(),Xn=Go.browser,sn=Go.os,is=Go.deviceType,tr=oo.indexOf("Windows Phone")!==-1,Jo={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:Xn.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!Xn.isIE(),windowsPhone:tr,browser:{current:Xn.current,version:Xn.version,isChromium:Xn.isChromium,isEdge:Xn.isEdge,isFirefox:Xn.isFirefox,isIE:Xn.isIE,isOpera:Xn.isOpera,isSafari:Xn.isSafari},os:{current:sn.current,version:sn.version,isAndroid:sn.isAndroid,isChromeOS:sn.isChromeOS,isFreeBSD:sn.isFreeBSD,isiOS:sn.isiOS,isLinux:sn.isLinux,isMacOS:sn.isMacOS,isSolaris:sn.isSolaris,isWindows:sn.isWindows},deviceType:{isDesktop:is.isDesktop,isiPad:is.isiPad,isiPhone:is.isiPhone,isPhone:is.isPhone,isTablet:is.isTablet,isTouch:is.isTouch,isWebView:is.isWebView}},cl=/^\s*|\s*$/g,jl=e=>uo(e)?"":(""+e).replace(cl,""),bc=(e,t)=>t?t==="array"&&Dr(e)?!0:typeof e===t:e!==void 0,Jm=(e,t,o={})=>{const s=ft(e)?e.split(t||","):e||[];let a=s.length;for(;a--;)o[s[a]]={};return o},ih=Ro,Bi=(e,...t)=>{for(let o=0;ot.call(s,a,c,o)===!1?!1:(Qm(a,t,o,s),!0)))},zt={trim:jl,isArray:Dr,is:bc,toArray:ru,makeMap:Jm,each:zs,map:bd,grep:ni,inArray:qi,hasOwn:ih,extend:Bi,walk:Qm,resolve:(e,t=window)=>{const o=e.split(".");for(let s=0,a=o.length;sve(e)?e:e===""?[]:bd(e.split(t||","),jl),_addCacheSuffix:e=>{const t=Jo.cacheSuffix;return t&&(e+=(e.indexOf("?")===-1?"?":"&")+t),e}},xd=(e,t,o=Cr)=>e.exists(s=>o(s,t)),wd=(e,t,o=Cr)=>va(e,t,o).getOr(e.isNone()&&t.isNone()),Hf=e=>{const t=[],o=s=>{t.push(s)};for(let s=0;se.isSome()&&t.isSome()?j.some(o(e.getOrDie(),t.getOrDie())):j.none(),kd=(e,t,o,s)=>e.isSome()&&t.isSome()&&o.isSome()?j.some(s(e.getOrDie(),t.getOrDie(),o.getOrDie())):j.none(),lu=(e,t)=>e?j.some(t):j.none(),ch=typeof window<"u"?window:Function("return this;")(),tg=(e,t)=>{let o=t??ch;for(let s=0;s{const o=e.split(".");return tg(o,t)},Ub=(e,t)=>og(e,t),dh=(e,t)=>{const o=Ub(e,t);if(o==null)throw new Error(e+" not available on this browser");return o},Zb=Object.getPrototypeOf,$f=e=>dh("HTMLElement",e),Ul=e=>{const t=og("ownerDocument.defaultView",e);return ue(e)&&($f(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Zb(e).constructor.name))},Kc=8,Zl=9,Yr=11,ki=1,Cd=3,En=e=>e.dom.nodeName.toLowerCase(),wl=e=>e.dom.nodeType,Zu=e=>t=>wl(t)===e,Wu=e=>wl(e)===Kc||En(e)==="#comment",ai=e=>cr(e)&&Ul(e.dom),cr=Zu(ki),Rs=Zu(Cd),aa=Zu(Zl),_s=Zu(Yr),Sd=e=>t=>cr(t)&&En(t)===e,Ed=(e,t,o)=>{if(ft(o)||bn(o)||D(o))e.setAttribute(t,o+"");else throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple")},Rr=(e,t,o)=>{Ed(e.dom,t,o)},$a=(e,t)=>{const o=e.dom;nn(t,(s,a)=>{Ed(o,a,s)})},Da=(e,t)=>{const o=e.dom.getAttribute(t);return o===null?void 0:o},Sr=(e,t)=>j.from(Da(e,t)),Gc=(e,t)=>{const o=e.dom;return o&&o.hasAttribute?o.hasAttribute(t):!1},rn=(e,t)=>{e.dom.removeAttribute(t)},vr=e=>{const t=e.dom.attributes;return t==null||t.length===0},Va=e=>ko(e.dom.attributes,(t,o)=>(t[o.name]=o.value,t),{}),Wl=(e,t)=>{const o=Da(e,t);return o===void 0||o===""?[]:o.split(" ")},jr=(e,t,o)=>{const a=Wl(e,t).concat([o]);return Rr(e,t,a.join(" ")),!0},so=(e,t,o)=>{const s=rt(Wl(e,t),a=>a!==o);return s.length>0?Rr(e,t,s.join(" ")):rn(e,t),!1},kl=e=>e.dom.classList!==void 0,Cl=e=>Wl(e,"class"),Nn=(e,t)=>jr(e,"class",t),cu=(e,t)=>so(e,"class",t),ep=(e,t)=>mn(Cl(e),t)?cu(e,t):Nn(e,t),ql=(e,t)=>{kl(e)?e.dom.classList.add(t):Nn(e,t)},un=e=>{(kl(e)?e.dom.classList:Cl(e)).length===0&&rn(e,"class")},Ra=(e,t)=>{kl(e)?e.dom.classList.remove(t):cu(e,t),un(e)},qu=(e,t)=>{const o=kl(e)?e.dom.classList.toggle(t):ep(e,t);return un(e),o},yc=(e,t)=>kl(e)&&e.dom.classList.contains(t),Vf=(e,t)=>{const s=(t||document).createElement("div");if(s.innerHTML=e,!s.hasChildNodes()||s.childNodes.length>1){const a="HTML does not have a single root node";throw console.error(a,e),new Error(a)}return Kl(s.childNodes[0])},Sl=(e,t)=>{const s=(t||document).createElement(e);return Kl(s)},ja=(e,t)=>{const s=(t||document).createTextNode(e);return Kl(s)},Kl=e=>{if(e==null)throw new Error("Node cannot be null or undefined");return{dom:e}},ye={fromHtml:Vf,fromTag:Sl,fromText:ja,fromDom:Kl,fromPoint:(e,t,o)=>j.from(e.dom.elementFromPoint(t,o)).map(Kl)},du=(e,t)=>{const o=[],s=c=>(o.push(c),t(c));let a=t(e);do a=a.bind(s);while(a.isSome());return o},ls=(e,t)=>{const o=e.dom;if(o.nodeType!==ki)return!1;{const s=o;if(s.matches!==void 0)return s.matches(t);if(s.msMatchesSelector!==void 0)return s.msMatchesSelector(t);if(s.webkitMatchesSelector!==void 0)return s.webkitMatchesSelector(t);if(s.mozMatchesSelector!==void 0)return s.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},tp=e=>e.nodeType!==ki&&e.nodeType!==Zl&&e.nodeType!==Yr||e.childElementCount===0,Ku=(e,t)=>{const o=t===void 0?document:t.dom;return tp(o)?[]:dn(o.querySelectorAll(e),ye.fromDom)},dl=(e,t)=>{const o=t===void 0?document:t.dom;return tp(o)?j.none():j.from(o.querySelector(e)).map(ye.fromDom)},kn=(e,t)=>e.dom===t.dom,_a=(e,t)=>{const o=e.dom,s=t.dom;return o===s?!1:o.contains(s)},Yi=e=>ye.fromDom(e.dom.ownerDocument),ul=e=>aa(e)?e:Yi(e),Gl=e=>ye.fromDom(ul(e).dom.documentElement),vc=e=>ye.fromDom(ul(e).dom.defaultView),ia=e=>j.from(e.dom.parentNode).map(ye.fromDom),Td=e=>j.from(e.dom.parentElement).map(ye.fromDom),Gu=(e,t)=>{const o=Gt(t)?t:fn;let s=e.dom;const a=[];for(;s.parentNode!==null&&s.parentNode!==void 0;){const c=s.parentNode,d=ye.fromDom(c);if(a.push(d),o(d)===!0)break;s=c}return a},jf=e=>{const t=o=>rt(o,s=>!kn(e,s));return ia(e).map(xa).map(t).getOr([])},Ur=e=>j.from(e.dom.previousSibling).map(ye.fromDom),ho=e=>j.from(e.dom.nextSibling).map(ye.fromDom),_c=e=>sa(du(e,Ur)),uu=e=>du(e,ho),xa=e=>dn(e.dom.childNodes,ye.fromDom),xc=(e,t)=>{const o=e.dom.childNodes;return j.from(o[t]).map(ye.fromDom)},Pi=e=>xc(e,0),wc=e=>xc(e,e.dom.childNodes.length-1),Yc=e=>e.dom.childNodes.length,Zr=e=>{const t=e.dom.head;if(t==null)throw new Error("Head is not available yet");return ye.fromDom(t)},fl=e=>_s(e)&&Fe(e.dom.host),Yl=e=>ye.fromDom(e.dom.getRootNode()),fu=e=>fl(e)?e:Zr(ul(e)),ng=e=>fl(e)?e:ye.fromDom(ul(e).dom.body),kc=e=>{const t=Yl(e);return fl(t)?j.some(t):j.none()},Od=e=>ye.fromDom(e.dom.host),Yu=e=>{if(Fe(e.target)){const t=ye.fromDom(e.target);if(cr(t)&&Ms(t)&&e.composed&&e.composedPath){const o=e.composedPath();if(o)return St(o)}}return j.from(e.target)},Ms=e=>Fe(e.dom.shadowRoot),Ua=e=>{const t=Rs(e)?e.dom.parentNode:e.dom;if(t==null||t.ownerDocument===null)return!1;const o=t.ownerDocument;return kc(ye.fromDom(t)).fold(()=>o.body.contains(t),qo(Ua,Od))};var la=(e,t,o,s,a)=>e(o,s)?j.some(o):Gt(a)&&a(o)?j.none():t(o,s,a);const ii=(e,t,o)=>{let s=e.dom;const a=Gt(o)?o:fn;for(;s.parentNode;){s=s.parentNode;const c=ye.fromDom(s);if(t(c))return j.some(c);if(a(c))break}return j.none()},_r=(e,t,o)=>la((a,c)=>c(a),ii,e,t,o),Uf=(e,t)=>{const o=e.dom;return o.parentNode?dr(ye.fromDom(o.parentNode),s=>!kn(e,s)&&t(s)):j.none()},dr=(e,t)=>{const o=a=>t(ye.fromDom(a));return On(e.dom.childNodes,o).map(ye.fromDom)},ca=(e,t)=>{const o=s=>{for(let a=0;aii(e,s=>ls(s,t),o),nt=(e,t)=>dl(t,e),Xr=(e,t,o)=>la((a,c)=>ls(a,c),El,e,t,o),mu=e=>Xr(e,"[contenteditable]"),js=(e,t=!1)=>Ua(e)?e.dom.isContentEditable:mu(e).fold(Ge(t),o=>Al(o)==="true"),Al=e=>e.dom.contentEditable,Za=e=>e.style!==void 0&&Gt(e.style.getPropertyValue),Tl=(e,t,o)=>{if(!ft(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);Za(e)&&e.style.setProperty(t,o)},pu=(e,t)=>{Za(e)&&e.style.removeProperty(t)},li=(e,t,o)=>{const s=e.dom;Tl(s,t,o)},vn=(e,t)=>{const o=e.dom;nn(t,(s,a)=>{Tl(o,a,s)})},ur=(e,t)=>{const o=e.dom,a=window.getComputedStyle(o).getPropertyValue(t);return a===""&&!Ua(e)?Cc(o,t):a},Cc=(e,t)=>Za(e)?e.style.getPropertyValue(t):"",Us=(e,t)=>{const o=e.dom,s=Cc(o,t);return j.from(s).filter(a=>a.length>0)},Xu=e=>{const t={},o=e.dom;if(Za(o))for(let s=0;s{const o=e.dom;pu(o,t),xd(Sr(e,"style").map(br),"")&&rn(e,"style")},op=e=>e.dom.offsetWidth,Zs=(e,t)=>{ia(e).each(s=>{s.dom.insertBefore(t.dom,e.dom)})},Ne=(e,t)=>{ho(e).fold(()=>{ia(e).each(a=>{fr(a,t)})},s=>{Zs(s,t)})},Wa=(e,t)=>{Pi(e).fold(()=>{fr(e,t)},s=>{e.dom.insertBefore(t.dom,s.dom)})},fr=(e,t)=>{e.dom.appendChild(t.dom)},Ci=(e,t)=>{Zs(e,t),fr(t,e)},Ol=(e,t)=>{Be(t,(o,s)=>{const a=s===0?e:t[s-1];Ne(a,o)})},xr=(e,t)=>{Be(t,o=>{fr(e,o)})},xs=e=>{e.dom.textContent="",Be(xa(e),t=>{Jn(t)})},Jn=e=>{const t=e.dom;t.parentNode!==null&&t.parentNode.removeChild(t)},wa=e=>{const t=xa(e);t.length>0&&Ol(e,t),Jn(e)},Si=(e,t)=>{const s=(t||document).createElement("div");return s.innerHTML=e,xa(ye.fromDom(s))},ci=e=>dn(e,ye.fromDom),Xi=e=>e.dom.innerHTML,Jl=(e,t)=>{const s=Yi(e).dom,a=ye.fromDom(s.createDocumentFragment()),c=Si(t,s);xr(a,c),xs(e),fr(e,a)},Sc=e=>{const t=ye.fromTag("div"),o=ye.fromDom(e.dom.cloneNode(!0));return fr(t,o),Xi(t)},Xc=(e,t,o,s,a,c,d)=>({target:e,x:t,y:o,stop:s,prevent:a,kill:c,raw:d}),Zf=e=>{const t=ye.fromDom(Yu(e).getOr(e.target)),o=()=>e.stopPropagation(),s=()=>e.preventDefault(),a=Kt(s,o);return Xc(t,e.clientX,e.clientY,o,s,a,e)},Wf=(e,t)=>o=>{e(o)&&t(Zf(o))},Ec=(e,t,o,s,a)=>{const c=Wf(o,s);return e.dom.addEventListener(t,c,a),{unbind:Ht(P,e,t,c,a)}},E=(e,t,o,s)=>Ec(e,t,o,s,!1),P=(e,t,o,s)=>{e.dom.removeEventListener(t,o,s)},q=(e,t)=>({left:e,top:t,translate:(s,a)=>q(e+s,t+a)}),ge=q,xe=e=>{const t=e.getBoundingClientRect();return ge(t.left,t.top)},at=(e,t)=>e!==void 0?e:t!==void 0?t:0,xo=e=>{const t=e.dom.ownerDocument,o=t.body,s=t.defaultView,a=t.documentElement;if(o===e.dom)return ge(o.offsetLeft,o.offsetTop);const c=at(s==null?void 0:s.pageYOffset,a.scrollTop),d=at(s==null?void 0:s.pageXOffset,a.scrollLeft),h=at(a.clientTop,o.clientTop),_=at(a.clientLeft,o.clientLeft);return Uo(e).translate(d-_,c-h)},Uo=e=>{const t=e.dom,s=t.ownerDocument.body;return s===t?ge(s.offsetLeft,s.offsetTop):Ua(e)?xe(t):ge(0,0)},Lo=e=>{const t=e!==void 0?e.dom:document,o=t.body.scrollLeft||t.documentElement.scrollLeft,s=t.body.scrollTop||t.documentElement.scrollTop;return ge(o,s)},io=(e,t,o)=>{const a=(o!==void 0?o.dom:document).defaultView;a&&a.scrollTo(e,t)},Wn=(e,t)=>{_t().browser.isSafari()&&Gt(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},sr=e=>{const t=e===void 0?window:e;return _t().browser.isFirefox()?j.none():j.from(t.visualViewport)},Ws=(e,t,o,s)=>({x:e,y:t,width:o,height:s,right:e+o,bottom:t+s}),zl=e=>{const t=e===void 0?window:e,o=t.document,s=Lo(ye.fromDom(o));return sr(t).fold(()=>{const a=t.document.documentElement,c=a.clientWidth,d=a.clientHeight;return Ws(s.left,s.top,c,d)},a=>Ws(Math.max(a.pageLeft,s.left),Math.max(a.pageTop,s.top),a.width,a.height))},gu=(e,t)=>rt(xa(e),t),zd=(e,t)=>{let o=[];return Be(xa(e),s=>{t(s)&&(o=o.concat([s])),o=o.concat(zd(s,t))}),o},Mr=(e,t)=>Ku(t,e),uh=(e,t,o)=>ii(e,t,o).isSome(),np=(e,t)=>Uf(e,t).isSome(),sg=(e,t)=>ca(e,t).isSome();class Ma{constructor(t,o){this.node=t,this.rootNode=o,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(t){return this.node=this.findSibling(this.node,"firstChild","nextSibling",t),this.node}prev(t){return this.node=this.findSibling(this.node,"lastChild","previousSibling",t),this.node}prev2(t){return this.node=this.findPreviousNode(this.node,t),this.node}findSibling(t,o,s,a){if(t){if(!a&&t[o])return t[o];if(t!==this.rootNode){let c=t[s];if(c)return c;for(let d=t.parentNode;d&&d!==this.rootNode;d=d.parentNode)if(c=d[s],c)return c}}}findPreviousNode(t,o){if(t){const s=t.previousSibling;if(this.rootNode&&s===this.rootNode)return;if(s){if(!o){for(let c=s.lastChild;c;c=c.lastChild)if(!c.lastChild)return c}return s}const a=t.parentNode;if(a&&a!==this.rootNode)return a}}}const rr="\uFEFF",da=" ",Jc=e=>e===rr,qf=e=>e.replace(/\uFEFF/g,""),Kf=/^[ \t\r\n]*$/,Ii=e=>Kf.test(e),di=e=>{for(const t of e)if(!Jc(t))return!1;return!0},Gf=e=>" \f \v".indexOf(e)!==-1,Ac=e=>e===` +`||e==="\r",R1=(e,t)=>t=0?Ac(e[t]):!1,sp=(e,t=4,o=!0,s=!0)=>{const a=Oa(" ",t),c=e.replace(/\t/g,a);return ko(c,(h,_)=>Gf(_)||_===da?h.pcIsSpace||h.str===""&&o||h.str.length===c.length-1&&s||R1(c,h.str.length+1)?{pcIsSpace:!1,str:h.str+da}:{pcIsSpace:!0,str:h.str+" "}:{pcIsSpace:Ac(_),str:h.str+_},{pcIsSpace:!1,str:""}).str},Qc=e=>t=>!!t&&t.nodeType===e,Nd=e=>!!e&&!Object.getPrototypeOf(e),no=Qc(1),Ql=e=>no(e)&&ai(ye.fromDom(e)),Yf=e=>no(e)&&e.namespaceURI==="http://www.w3.org/2000/svg",Dd=e=>{const t=e.toLowerCase();return o=>Fe(o)&&o.nodeName.toLowerCase()===t},ka=e=>{const t=e.map(o=>o.toLowerCase());return o=>{if(o&&o.nodeName){const s=o.nodeName.toLowerCase();return mn(t,s)}return!1}},Nl=(e,t)=>{const o=t.toLowerCase().split(" ");return s=>{if(no(s)){const a=s.ownerDocument.defaultView;if(a)for(let c=0;ct=>no(t)&&t.hasAttribute(e),Rd=e=>no(e)&&e.hasAttribute("data-mce-bogus"),rg=e=>no(e)&&e.getAttribute("data-mce-bogus")==="all",ec=e=>no(e)&&e.tagName==="TABLE",Xf=e=>t=>!!(Ql(t)&&(t.contentEditable===e||t.getAttribute("data-mce-contenteditable")===e)),Jf=ka(["textarea","input"]),wt=Qc(3),ag=Qc(4),Md=Qc(7),Qo=Qc(8),lo=Qc(9),Ld=Qc(11),Hs=Dd("br"),Dl=Dd("img"),Rl=Xf("true"),$o=Xf("false"),Qu=ka(["td","th"]),Wb=ka(["td","th","caption"]),Xe=ka(["video","audio","object","embed"]),ig=Dd("li"),Qf=Dd("details"),em=Dd("summary"),ef={skipBogus:!0,includeZwsp:!1,checkRootAsContent:!1},hu=(e,t,o)=>{const s=ye.fromDom(t),a=ye.fromDom(e),c=o.getWhitespaceElements();return uh(a,h=>Ro(c,En(h)),Ht(kn,s))},qb=e=>no(e)&&e.nodeName==="A"&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id")),Bd=(e,t)=>no(e)&&Ro(t.getNonEmptyElements(),e.nodeName),Ss=Ju("data-mce-bookmark"),Tc=e=>Td(ye.fromDom(e)).exists(t=>!js(t)),lg=(e,t,o)=>Ii(e.data)&&!hu(e,t,o),Ml=(e,t,o,s)=>wt(e)&&!lg(e,t,o)&&(!s.includeZwsp||!di(e.data)),bu=(e,t,o,s)=>Gt(s.isContent)&&s.isContent(t)||Bd(t,e)||Ss(t)||qb(t)||Ml(t,o,e,s)||$o(t)||Rl(t)&&Tc(t),ml=(e,t,o)=>{const s={...ef,...o};if(s.checkRootAsContent&&bu(e,t,t,s))return!1;let a=t.firstChild,c=0;if(!a)return!0;const d=new Ma(a,t);do{if(s.skipBogus&&no(a)){const h=a.getAttribute("data-mce-bogus");if(h){a=d.next(h==="all");continue}}if(Qo(a)){a=d.next(!0);continue}if(Hs(a)){c++,a=d.next();continue}if(bu(e,a,t,s))return!1;a=d.next()}while(a);return c<=1},ar=(e,t,o)=>ml(e,t.dom,{checkRootAsContent:!0,...o}),yu=(e,t,o)=>bu(e,t,t,{includeZwsp:ef.includeZwsp,...o}),Er=e=>{let t=e;return{get:()=>t,set:a=>{t=a}}},rp=e=>{const t=Er(j.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(j.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:h=>{o(),t.set(j.some(h))}}},Ll=e=>{const t=Er(j.none()),o=()=>t.get().each(h=>clearInterval(h));return{clear:()=>{o(),t.set(j.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:h=>{o(),t.set(j.some(setInterval(h,e)))}}},Jr=()=>{const e=rp(dt);return{...e,on:o=>e.get().each(o)}},xt=e=>{const t=e.toLowerCase();return t==="svg"?"svg":t==="math"?"math":"html"},vu=e=>xt(e)!=="html",Qr=e=>vu(e.nodeName),Kb=e=>xt(e.nodeName),k=["svg","math"],N=()=>{const e=Jr(),t=()=>e.get().map(Kb).getOr("html");return{track:a=>(Qr(a)?e.set(a):e.get().exists(c=>!c.contains(a))&&e.clear(),t()),current:t,reset:()=>{e.clear()}}},Z="data-mce-block",se=e=>rt(vt(e),t=>!/[A-Z]/.test(t)),Ce=e=>dn(se(e),t=>{const o=CSS.escape(t);return`${o}:`+dn(k,s=>`not(${s} ${o})`).join(":")}).join(","),et=(e,t)=>Fe(t.querySelector(e))?(t.setAttribute(Z,"true"),t.getAttribute("data-mce-selected")==="inline-boundary"&&t.removeAttribute("data-mce-selected"),!0):(t.removeAttribute(Z),!1),Et=(e,t)=>{const o=Ce(e.getTransparentElements()),s=Ce(e.getBlockElements());return rt(t.querySelectorAll(o),a=>et(s,a))},At=(e,t,o)=>{var s;const a=o?"lastChild":"firstChild";for(let c=t[a];c;c=c[a])if(ml(e,c,{checkRootAsContent:!0})){(s=c.parentNode)===null||s===void 0||s.removeChild(c);return}},Bo=(e,t,o)=>{const s=document.createRange(),a=t.parentNode;if(a){s.setStartBefore(t),s.setEndBefore(o);const c=s.extractContents();At(e,c,!0),s.setStartAfter(o),s.setEndAfter(t);const d=s.extractContents();At(e,d,!1),ml(e,c,{checkRootAsContent:!0})||a.insertBefore(c,t),ml(e,o,{checkRootAsContent:!0})||a.insertBefore(o,t),ml(e,d,{checkRootAsContent:!0})||a.insertBefore(d,t),a.removeChild(t)}},co=(e,t,o)=>{const s=e.getBlockElements(),a=ye.fromDom(t),c=h=>En(h)in s,d=h=>kn(h,a);Be(ci(o),h=>{ii(h,c,d).each(_=>{const z=gu(h,I=>c(I)&&!e.isValidChild(En(_),En(I)));if(z.length>0){const I=Td(_);Be(z,H=>{ii(H,c,d).each(V=>{Bo(e,V.dom,H.dom)})}),I.each(H=>Et(e,H.dom))}})})},_n=(e,t,o)=>{Be([...o,...Oc(e,t)?[t]:[]],s=>Be(Mr(ye.fromDom(s),s.nodeName.toLowerCase()),a=>{ap(e,a.dom)&&wa(a)}))},Ko=(e,t)=>{const o=Et(e,t);co(e,t,o),_n(e,t,o)},Qn=(e,t)=>{if(oc(e,t)){const o=Ce(e.getBlockElements());et(o,t)}},ea=(e,t,o)=>{const s=c=>kn(c,ye.fromDom(t)),a=Gu(ye.fromDom(o),s);ra(a,a.length-2).filter(cr).fold(()=>Ko(e,t),c=>Ko(e,c.dom))},qs=e=>e.hasAttribute(Z),tc=(e,t)=>Ro(e.getTransparentElements(),t),oc=(e,t)=>no(t)&&tc(e,t.nodeName),Oc=(e,t)=>oc(e,t)&&qs(t),ap=(e,t)=>oc(e,t)&&!qs(t),ed=(e,t)=>t.type===1&&tc(e,t.name)&&ft(t.attr(Z)),tf=_t().browser,tm=e=>On(e,cr),_u=e=>tf.isFirefox()&&En(e)==="table"?tm(xa(e)).filter(t=>En(t)==="caption").bind(t=>tm(uu(t)).map(o=>{const s=o.dom.offsetTop,a=t.dom.offsetTop,c=t.dom.offsetHeight;return s<=a?-c:0})).getOr(0):0,of=(e,t)=>e.children&&mn(e.children,t),fh=(e,t,o)=>{let s=0,a=0;const c=e.ownerDocument;if(o=o||e,t){if(o===e&&t.getBoundingClientRect&&ur(ye.fromDom(e),"position")==="static"){const h=t.getBoundingClientRect();return s=h.left+(c.documentElement.scrollLeft||e.scrollLeft)-c.documentElement.clientLeft,a=h.top+(c.documentElement.scrollTop||e.scrollTop)-c.documentElement.clientTop,{x:s,y:a}}let d=t;for(;d&&d!==o&&d.nodeType&&!of(d,o);){const h=d;s+=h.offsetLeft||0,a+=h.offsetTop||0,d=h.offsetParent}for(d=t.parentNode;d&&d!==o&&d.nodeType&&!of(d,o);)s-=d.scrollLeft||0,a-=d.scrollTop||0,d=d.parentNode;a+=_u(ye.fromDom(t))}return{x:s,y:a}},xu=(e,t={})=>{let o=0;const s={},a=ye.fromDom(e),c=ul(a),d=ke=>{t.referrerPolicy=ke},h=ke=>{t.contentCssCors=ke},_=ke=>{fr(fu(a),ke)},z=ke=>{const Oe=fu(a);nt(Oe,"#"+ke).each(Jn)},I=ke=>Gn(s,ke).getOrThunk(()=>({id:"mce-u"+o++,passed:[],failed:[],count:0})),H=ke=>new Promise((Oe,Ae)=>{let Pe;const ht=zt._addCacheSuffix(ke),Mt=I(ht);s[ht]=Mt,Mt.count++;const Yt=(to,bo)=>{Be(to,cn),Mt.status=bo,Mt.passed=[],Mt.failed=[],Pe&&(Pe.onload=null,Pe.onerror=null,Pe=null)},Qe=()=>Yt(Mt.passed,2),Ve=()=>Yt(Mt.failed,3);if(Oe&&Mt.passed.push(Oe),Ae&&Mt.failed.push(Ae),Mt.status===1)return;if(Mt.status===2){Qe();return}if(Mt.status===3){Ve();return}Mt.status=1;const mt=ye.fromTag("link",c.dom);$a(mt,{rel:"stylesheet",type:"text/css",id:Mt.id}),t.contentCssCors&&Rr(mt,"crossOrigin","anonymous"),t.referrerPolicy&&Rr(mt,"referrerpolicy",t.referrerPolicy),Pe=mt.dom,Pe.onload=Qe,Pe.onerror=Ve,_(mt),Rr(mt,"href",ht)}),V=(ke,Oe)=>{const Ae=I(ke);s[ke]=Ae,Ae.count++;const Pe=ye.fromTag("style",c.dom);$a(Pe,{rel:"stylesheet",type:"text/css",id:Ae.id}),Pe.dom.innerHTML=Oe,_(Pe)},ee=ke=>Promise.allSettled(dn(ke,Ae=>H(Ae).then(Ge(Ae)))).then(Ae=>{const Pe=yt(Ae,ht=>ht.status==="fulfilled");return Pe.fail.length>0?Promise.reject(dn(Pe.fail,ht=>ht.reason)):dn(Pe.pass,ht=>ht.value)}),le=ke=>{const Oe=zt._addCacheSuffix(ke);Gn(s,Oe).each(Ae=>{--Ae.count===0&&(delete s[Oe],z(Ae.id))})};return{load:H,loadRawCss:V,loadAll:ee,unload:le,unloadRawCss:ke=>{Gn(s,ke).each(Oe=>{--Oe.count===0&&(delete s[ke],z(Oe.id))})},unloadAll:ke=>{Be(ke,Oe=>{le(Oe)})},_setReferrerPolicy:d,_setContentCssCors:h}},Ks=(()=>{const e=new WeakMap;return{forElement:(o,s)=>{const c=Yl(o).dom;return j.from(e.get(c)).getOrThunk(()=>{const d=xu(c,s);return e.set(c,d),d})}}})(),qa=e=>e.nodeName.toLowerCase()==="span",Ji=(e,t)=>Fe(e)&&(yu(t,e)||t.isInline(e.nodeName.toLowerCase())),mh=(e,t,o)=>{const s=new Ma(e,t).prev(!1),a=new Ma(e,t).next(!1),c=ln(s)||Ji(s,o),d=ln(a)||Ji(a,o);return c&&d},ip=e=>qa(e)&&e.getAttribute("data-mce-type")==="bookmark",om=(e,t,o)=>wt(e)&&e.data.length>0&&mh(e,t,o),nm=e=>no(e)?e.childNodes.length>0:!1,ph=e=>Ld(e)||lo(e),cg=(e,t,o,s)=>{var a;const c=s||t;if(no(t)&&ip(t))return t;const d=t.childNodes;for(let h=d.length-1;h>=0;h--)cg(e,d[h],o,c);if(no(t)){const h=t.childNodes;h.length===1&&ip(h[0])&&((a=t.parentNode)===null||a===void 0||a.insertBefore(h[0],t))}return!ph(t)&&!yu(o,t)&&!nm(t)&&!om(t,c,o)&&e.remove(t),t},M1=zt.makeMap,gh=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,hh=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,sm=/[<>&\"\']/g,dg=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,L1={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:"Ÿ"},wu={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},lp={"<":"<",">":">","&":"&",""":'"',"'":"'"},cp=e=>{const t=ye.fromTag("div").dom;return t.innerHTML=e,t.textContent||t.innerText||e},ku=(e,t)=>{const o={};if(e){const s=e.split(",");t=t||10;for(let a=0;ae.replace(t?gh:hh,o=>wu[o]||o),Ik=e=>(""+e).replace(sm,t=>wu[t]||t),yh=(e,t)=>e.replace(t?gh:hh,o=>o.length>1?"&#"+((o.charCodeAt(0)-55296)*1024+(o.charCodeAt(1)-56320)+65536)+";":wu[o]||"&#"+o.charCodeAt(0)+";"),zc=(e,t,o)=>{const s=o||nf;return e.replace(t?gh:hh,a=>wu[a]||s[a]||a)},dp={encodeRaw:bh,encodeAllRaw:Ik,encodeNumeric:yh,encodeNamed:zc,getEncodeFunc:(e,t)=>{const o=ku(t)||nf,s=(d,h)=>d.replace(h?gh:hh,_=>wu[_]!==void 0?wu[_]:o[_]!==void 0?o[_]:_.length>1?"&#"+((_.charCodeAt(0)-55296)*1024+(_.charCodeAt(1)-56320)+65536)+";":"&#"+_.charCodeAt(0)+";"),a=(d,h)=>zc(d,h,o),c=M1(e.replace(/\+/g,","));return c.named&&c.numeric?s:c.named?t?a:zc:c.numeric?yh:bh},decode:e=>e.replace(dg,(t,o)=>o?(o.charAt(0).toLowerCase()==="x"?o=parseInt(o.substr(1),16):o=parseInt(o,10),o>65535?(o-=65536,String.fromCharCode(55296+(o>>10),56320+(o&1023))):L1[o]||String.fromCharCode(o)):lp[t]||nf[t]||cp(t))},Ka=(e,t)=>(e=zt.trim(e),e?e.split(t||" "):[]),up=e=>new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$"),fp=e=>ue(e)&&e.source&&Object.prototype.toString.call(e)==="[object RegExp]",Gb=e=>{const t=o=>ve(o)?dn(o,t):fp(o)?new RegExp(o.source,o.flags):ue(o)?Ri(o,t):o;return t(e)},Dn=e=>{const t=/^(~)?(.+)$/;return Bn(Ka(e,","),o=>{const s=t.exec(o);if(s){const c=s[1]==="~"?"span":"div",d=s[2];return[{cloneName:c,name:d}]}else return[]})},Qi=e=>Object.freeze(["id","accesskey","class","dir","lang","style","tabindex","title","role",...e!=="html4"?["contenteditable","contextmenu","draggable","dropzone","hidden","spellcheck","translate","itemprop","itemscope","itemtype"]:[],...e!=="html5-strict"?["xml:lang"]:[]]),Pd=e=>{let t,o;t="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",o="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",e!=="html4"&&(t+=" article aside details dialog figure main header footer hgroup section nav "+"a ins del canvas map",o+=" audio canvas command data datalist mark meter output picture progress time wbr video ruby bdi keygen svg"),e!=="html5-strict"&&(o=[o,"acronym applet basefont big font strike tt"].join(" "),t=[t,"center dir isindex noframes"].join(" "));const s=[t,o].join(" ");return{blockContent:t,phrasingContent:o,flowContent:s}},ui=e=>{const{blockContent:t,phrasingContent:o,flowContent:s}=Pd(e),a=c=>Object.freeze(c.split(" "));return Object.freeze({blockContent:a(t),phrasingContent:a(o),flowContent:a(s)})},Es={html4:si(()=>ui("html4")),html5:si(()=>ui("html5")),"html5-strict":si(()=>ui("html5-strict"))},vh=(e,t)=>{const{blockContent:o,phrasingContent:s,flowContent:a}=Es[e]();return t==="blocks"?j.some(o):t==="phrasing"?j.some(s):t==="flow"?j.some(a):j.none()},w_=e=>{const t=Qi(e),{phrasingContent:o,flowContent:s}=Pd(e),a={},c=(_,z,I)=>{a[_]={attributes:Is(z,Ge({})),attributesOrder:z,children:Is(I,Ge({}))}},d=(_,z="",I="")=>{const H=Ka(I),V=Ka(_);let ee=V.length;const le=[...t,...Ka(z)];for(;ee--;)c(V[ee],le.slice(),H)},h=(_,z)=>{const I=Ka(_),H=Ka(z);let V=I.length;for(;V--;){const ee=a[I[V]];for(let le=0,oe=H.length;le{d(I,"",o)}),Be(Ka("center dir isindex noframes"),I=>{d(I,"",s)})),d("html","manifest","head body"),d("head","","base command link meta noscript script style title"),d("title hr noscript br"),d("base","href target"),d("link","href rel media hreflang type sizes hreflang"),d("meta","name http-equiv content charset"),d("style","media type scoped"),d("script","src async defer type charset"),d("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",s),d("dd div","",s),d("address dt caption","",e==="html4"?o:s),d("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","",o),d("blockquote","cite",s),d("ol","reversed start type","li"),d("ul","","li"),d("li","value",s),d("dl","","dt dd"),d("a","href target rel media hreflang type",e==="html4"?o:s),d("q","cite",o),d("ins del","cite datetime",s),d("img","src sizes srcset alt usemap ismap width height"),d("iframe","src name width height",s),d("embed","src type width height"),d("object","data type typemustmatch name usemap form width height",[s,"param"].join(" ")),d("param","name value"),d("map","name",[s,"area"].join(" ")),d("area","alt coords shape href target rel media hreflang type"),d("table","border","caption colgroup thead tfoot tbody tr"+(e==="html4"?" col":"")),d("colgroup","span","col"),d("col","span"),d("tbody thead tfoot","","tr"),d("tr","","td th"),d("td","colspan rowspan headers",s),d("th","colspan rowspan headers scope abbr",s),d("form","accept-charset action autocomplete enctype method name novalidate target",s),d("fieldset","disabled form name",[s,"legend"].join(" ")),d("label","form for",o),d("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"),d("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value",e==="html4"?s:o),d("select","disabled form multiple name required size","option optgroup"),d("optgroup","disabled label","option"),d("option","disabled label selected value"),d("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),d("menu","type label",[s,"li"].join(" ")),d("noscript","",s),e!=="html4"&&(d("wbr"),d("ruby","",[o,"rt rp"].join(" ")),d("figcaption","",s),d("mark rt rp bdi","",o),d("summary","",[o,"h1 h2 h3 h4 h5 h6"].join(" ")),d("canvas","width height",s),d("data","value",o),d("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[s,"track source"].join(" ")),d("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[s,"track source"].join(" ")),d("picture","","img source"),d("source","src srcset type media sizes"),d("track","kind src srclang label default"),d("datalist","",[o,"option"].join(" ")),d("article section nav aside main header footer","",s),d("hgroup","","h1 h2 h3 h4 h5 h6"),d("figure","",[s,"figcaption"].join(" ")),d("time","datetime",o),d("dialog","open",s),d("command","type label icon disabled checked radiogroup command"),d("output","for form name",o),d("progress","value max",o),d("meter","value min max low high optimum",o),d("details","open",[s,"summary"].join(" ")),d("keygen","autofocus challenge disabled form keytype name"),c("svg","id tabindex lang xml:space class style x y width height viewBox preserveAspectRatio zoomAndPan transform".split(" "),[])),e!=="html5-strict"&&(h("script","language xml:space"),h("style","xml:space"),h("object","declare classid code codebase codetype archive standby align border hspace vspace"),h("embed","align name hspace vspace"),h("param","valuetype type"),h("a","charset name rev shape coords"),h("br","clear"),h("applet","codebase archive code object alt name width height align hspace vspace"),h("img","name longdesc align border hspace vspace"),h("iframe","longdesc frameborder marginwidth marginheight scrolling align"),h("font basefont","size color face"),h("input","usemap align"),h("select"),h("textarea"),h("h1 h2 h3 h4 h5 h6 div p legend caption","align"),h("ul","type compact"),h("li","type"),h("ol dl menu dir","compact"),h("pre","width xml:space"),h("hr","align noshade size width"),h("isindex","prompt"),h("table","summary width frame rules cellspacing cellpadding align bgcolor"),h("col","width align char charoff valign"),h("colgroup","width align char charoff valign"),h("thead","align char charoff valign"),h("tr","align char charoff valign bgcolor"),h("th","axis align char charoff valign nowrap bgcolor width height"),h("form","accept"),h("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),h("tfoot","align char charoff valign"),h("tbody","align char charoff valign"),h("area","nohref"),h("body","background bgcolor text link vlink alink")),e!=="html4"&&(h("input button select textarea","autofocus"),h("input textarea","placeholder"),h("a","download"),h("link script img","crossorigin"),h("img","loading"),h("iframe","sandbox seamless allow allowfullscreen loading referrerpolicy")),e!=="html4"&&Be([a.video,a.audio],_=>{delete _.children.audio,delete _.children.video}),Be(Ka("a form meter progress dfn"),_=>{a[_]&&delete a[_].children[_]}),delete a.caption.children.table,delete a.script,a},Fk=e=>e==="-"?"remove":"add",Gs=e=>{const t=/^(@?)([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 j.from(t.exec(e)).map(o=>({preset:o[1]==="@",name:o[2]}))},Yb=e=>{const t=/^([+\-]?)([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 Bn(Ka(e,","),o=>{const s=t.exec(o);if(s){const a=s[1],c=a?Fk(a):"replace",d=s[2],h=Bn(Ka(s[3],"|"),_=>Gs(_).toArray());return[{operation:c,name:d,validChildren:h}]}else return[]})},P1=(e,t)=>{const o=/^([!\-])?(\w+[\\:]:\w+|[^=~<]+)?(?:([=~<])(.*))?$/,s=/[*?+]/,{attributes:a,attributesOrder:c}=t;return Be(Ka(e,"|"),d=>{const h=o.exec(d);if(h){const _={},z=h[1],I=h[2].replace(/[\\:]:/g,":"),H=h[3],V=h[4];if(z==="!"&&(t.attributesRequired=t.attributesRequired||[],t.attributesRequired.push(I),_.required=!0),z==="-"){delete a[I],c.splice(zt.inArray(c,I),1);return}if(H&&(H==="="?(t.attributesDefault=t.attributesDefault||[],t.attributesDefault.push({name:I,value:V}),_.defaultValue=V):H==="~"?(t.attributesForced=t.attributesForced||[],t.attributesForced.push({name:I,value:V}),_.forcedValue=V):H==="<"&&(_.validValues=zt.makeMap(V,"?"))),s.test(I)){const ee=_;t.attributePatterns=t.attributePatterns||[],ee.pattern=up(I),t.attributePatterns.push(ee)}else a[I]||c.push(I),a[I]=_}})},rm=(e,t)=>{nn(e.attributes,(o,s)=>{t.attributes[s]=o}),t.attributesOrder.push(...e.attributesOrder)},Nc=(e,t)=>{const o=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/;return Bn(Ka(t,","),s=>{const a=o.exec(s);if(a){const c=a[1],d=a[2],h=a[3],_=a[4],z=a[5],I={attributes:{},attributesOrder:[]};if(e.each(H=>rm(H,I)),c==="#"?I.paddEmpty=!0:c==="-"&&(I.removeEmpty=!0),_==="!"&&(I.removeEmptyAttrs=!0),z&&P1(z,I),h&&(I.outputName=d),d==="@")if(e.isNone())e=j.some(I);else return[];return[h?{name:d,element:I,aliasName:h}:{name:d,element:I}]}else return[]})},ug={},Xt=zt.makeMap,td=zt.each,I1=zt.extend,Xb=zt.explode,fg=(e,t={})=>{const o=Xt(e," ",Xt(e.toUpperCase()," "));return I1(o,t)},Jb=e=>fg("td th li dt dd figcaption caption details summary",e.getTextBlockElements()),mp=(e,t)=>{if(e){const o={};return ft(e)&&(e={"*":e}),td(e,(s,a)=>{o[a]=o[a.toUpperCase()]=t==="map"?Xt(s,/[, ]/):Xb(s,/[, ]/)}),o}else return},Dc=(e={})=>{var t;const o={},s={};let a=[];const c={},d={},h=(_o,Un,zr)=>{const na=e[_o];if(na)return Xt(na,/[, ]/,Xt(na.toUpperCase(),/[, ]/));{let Fa=ug[_o];return Fa||(Fa=fg(Un,zr),ug[_o]=Fa),Fa}},_=(t=e.schema)!==null&&t!==void 0?t:"html5",z=w_(_);e.verify_html===!1&&(e.valid_elements="*[*]");const I=mp(e.valid_styles),H=mp(e.invalid_styles,"map"),V=mp(e.valid_classes,"map"),ee=h("whitespace_elements","pre script noscript style textarea video audio iframe object code"),le=h("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),oe=h("void_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),fe=h("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls allowfullscreen"),ke="td th iframe video audio object script code",Oe=h("non_empty_elements",ke+" pre svg textarea summary",oe),Ae=h("move_caret_before_on_enter_elements",ke+" table",oe),Pe="h1 h2 h3 h4 h5 h6",ht=h("text_block_elements",Pe+" p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),Mt=h("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",ht),Yt=h("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp"),Qe=h("transparent_elements","a ins del canvas map"),Ve=h("wrap_block_elements","pre "+Pe);td("script noscript iframe noframes noembed title style textarea xmp plaintext".split(" "),_o=>{d[_o]=new RegExp("]*>","gi")});const mt=_o=>{const Un=j.from(o["@"]),zr=/[*?+]/;Be(Nc(Un,_o??""),({name:na,element:Fa,aliasName:Zi})=>{if(Zi&&(o[Zi]=Fa),zr.test(na)){const Aa=Fa;Aa.pattern=up(na),a.push(Aa)}else o[na]=Fa})},to=_o=>{a=[],Be(vt(o),Un=>{delete o[Un]}),mt(_o)},bo=(_o,Un)=>{var zr,na;delete ug.text_block_elements,delete ug.block_elements;const Fa=Un.extends?!tu(Un.extends):!1,Zi=Un.extends;if(s[_o]=Zi?s[Zi]:{},c[_o]=Zi??_o,Oe[_o.toUpperCase()]={},Oe[_o]={},Fa||(Mt[_o.toUpperCase()]={},Mt[_o]={}),Zi&&!o[_o]&&o[Zi]){const Aa=Gb(o[Zi]);delete Aa.removeEmptyAttrs,delete Aa.removeEmpty,o[_o]=Aa}else o[_o]={attributesOrder:[],attributes:{}};if(ve(Un.attributes)){const Aa=fc=>{Ta.attributesOrder.push(fc),Ta.attributes[fc]={}},Ta=(zr=o[_o])!==null&&zr!==void 0?zr:{};delete Ta.attributesDefault,delete Ta.attributesForced,delete Ta.attributePatterns,delete Ta.attributesRequired,Ta.attributesOrder=[],Ta.attributes={},Be(Un.attributes,fc=>{const Vm=Qi(_);Gs(fc).each(({preset:jm,name:Um})=>{jm?Um==="global"&&Be(Vm,Aa):Aa(Um)})}),o[_o]=Ta}if(bn(Un.padEmpty)){const Aa=(na=o[_o])!==null&&na!==void 0?na:{};Aa.paddEmpty=Un.padEmpty,o[_o]=Aa}if(ve(Un.children)){const Aa={},Ta=Vm=>{Aa[Vm]={}},fc=Vm=>{vh(_,Vm).each(jm=>{Be(jm,Ta)})};Be(Un.children,Vm=>{Gs(Vm).each(({preset:jm,name:Um})=>{jm?fc(Um):Ta(Um)})}),s[_o]=Aa}Zi&&nn(s,(Aa,Ta)=>{Aa[Zi]&&(s[Ta]=Aa=I1({},s[Ta]),Aa[_o]=Aa[Zi])})},gn=_o=>{Be(Dn(_o??""),({name:Un,cloneName:zr})=>{bo(Un,{extends:zr})})},Cn=_o=>{ue(_o)?nn(_o,(Un,zr)=>bo(zr,Un)):ft(_o)&&gn(_o)},ds=_o=>{Be(Yb(_o??""),({operation:Un,name:zr,validChildren:na})=>{const Fa=Un==="replace"?{"#comment":{}}:s[zr],Zi=Ta=>{Un==="remove"?delete Fa[Ta]:Fa[Ta]={}},Aa=Ta=>{vh(_,Ta).each(fc=>{Be(fc,Zi)})};Be(na,({preset:Ta,name:fc})=>{Ta?Aa(fc):Zi(fc)}),s[zr]=Fa})},hs=_o=>{const Un=o[_o];if(Un)return Un;let zr=a.length;for(;zr--;){const na=a[zr];if(na.pattern.test(_o))return na}},qr=()=>{e.valid_elements?(to(e.valid_elements),td(z,(_o,Un)=>{s[Un]=_o.children})):(td(z,(_o,Un)=>{o[Un]={attributes:_o.attributes,attributesOrder:_o.attributesOrder},s[Un]=_o.children}),td(Ka("strong/b em/i"),_o=>{const Un=Ka(_o,"/");o[Un[1]].outputName=Un[0]}),td(Yt,(_o,Un)=>{o[Un]&&(e.padd_empty_block_inline_children&&(o[Un].paddInEmptyBlock=!0),o[Un].removeEmpty=!0)}),td(Ka("ol ul blockquote a table tbody"),_o=>{o[_o]&&(o[_o].removeEmpty=!0)}),td(Ka("p h1 h2 h3 h4 h5 h6 th td pre div address caption li summary"),_o=>{o[_o]&&(o[_o].paddEmpty=!0)}),td(Ka("span"),_o=>{o[_o].removeEmptyAttrs=!0})),delete o.svg,Cn(e.custom_elements),ds(e.valid_children),mt(e.extended_valid_elements),ds("+ol[ul|ol],+ul[ul|ol]"),td({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"},(_o,Un)=>{o[Un]&&(o[Un].parentsRequired=Ka(_o))}),e.invalid_elements&&td(Xb(e.invalid_elements),_o=>{o[_o]&&delete o[_o]}),hs("span")||mt("span[!data-mce-type|*]")},il=Ge(I),Os=Ge(H),Ft=Ge(V),go=Ge(fe),ts=Ge(Mt),jt=Ge(ht),Eo=Ge(Yt),wn=Ge(Object.seal(oe)),qt=Ge(le),hn=Ge(Oe),An=Ge(Ae),gi=Ge(ee),gs=Ge(Qe),ti=Ge(Ve),zf=Ge(Object.seal(d)),Xp=(_o,Un)=>{const zr=s[_o.toLowerCase()];return!!(zr&&zr[Un.toLowerCase()])},uc=(_o,Un)=>{const zr=hs(_o);if(zr)if(Un){if(zr.attributes[Un])return!0;const na=zr.attributePatterns;if(na){let Fa=na.length;for(;Fa--;)if(na[Fa].pattern.test(Un))return!0}}else return!0;return!1},tu=_o=>Ro(ts(),_o),Nf=_o=>!vs(_o,"#")&&uc(_o)&&!tu(_o),ou=_o=>Ro(ti(),_o)||Nf(_o),Df=Ge(c);return qr(),{type:_,children:s,elements:o,getValidStyles:il,getValidClasses:Ft,getBlockElements:ts,getInvalidStyles:Os,getVoidElements:wn,getTextBlockElements:jt,getTextInlineElements:Eo,getBoolAttrs:go,getElementRule:hs,getSelfClosingElements:qt,getNonEmptyElements:hn,getMoveCaretBeforeOnEnterElements:An,getWhitespaceElements:gi,getTransparentElements:gs,getSpecialElements:zf,isValidChild:Xp,isValid:uc,isBlock:tu,isInline:Nf,isWrapper:ou,getCustomElements:Df,addValidElements:mt,setValidElements:to,addCustomElements:Cn,addValidChildren:ds}},Hk=e=>({value:Qb(e)}),Qb=e=>xi(e,"#").toUpperCase(),F1=e=>{const t=e.toString(16);return(t.length===1?"0"+t:t).toUpperCase()},ey=e=>{const t=F1(e.red)+F1(e.green)+F1(e.blue);return Hk(t)},H1=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,$1=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,ty=(e,t,o,s)=>({red:e,green:t,blue:o,alpha:s}),V1=(e,t,o,s)=>{const a=parseInt(e,10),c=parseInt(t,10),d=parseInt(o,10),h=parseFloat(s);return ty(a,c,d,h)},j1=e=>H1.test(e)?"rgb":$1.test(e)?"rgba":"other",k_=e=>{const t=H1.exec(e);if(t!==null)return j.some(V1(t[1],t[2],t[3],"1"));const o=$1.exec(e);return o!==null?j.some(V1(o[1],o[2],o[3],o[4])):j.none()},$k=e=>`rgba(${e.red},${e.green},${e.blue},${e.alpha})`,_h=e=>k_(e).map(ey).map(t=>"#"+t.value).getOr(e),U1=(e={},t)=>{const o=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,s=/\s*([^:]+):\s*([^;]+);?/g,a=/\s+$/,c={};let d,h;const _=rr;t&&(d=t.getValidStyles(),h=t.getInvalidStyles());const z=(`\\" \\' \\; \\: ; : `+_).split(" ");for(let H=0;H{const V={};let ee=!1;const le=e.url_converter,oe=e.url_converter_scope||I,fe=(Qe,Ve,mt)=>{const to=V[Qe+"-top"+Ve];if(!to)return;const bo=V[Qe+"-right"+Ve];if(!bo)return;const gn=V[Qe+"-bottom"+Ve];if(!gn)return;const Cn=V[Qe+"-left"+Ve];if(!Cn)return;const ds=[to,bo,gn,Cn];let hs=ds.length-1;for(;hs--&&ds[hs]===ds[hs+1];);hs>-1&&mt||(V[Qe+Ve]=hs===-1?ds[0]:ds.join(" "),delete V[Qe+"-top"+Ve],delete V[Qe+"-right"+Ve],delete V[Qe+"-bottom"+Ve],delete V[Qe+"-left"+Ve])},ke=Qe=>{const Ve=V[Qe];if(!Ve)return;const mt=Ve.indexOf(",")>-1?[Ve]:Ve.split(" ");let to=mt.length;for(;to--;)if(mt[to]!==mt[0])return!1;return V[Qe]=mt[0],!0},Oe=(Qe,Ve,mt,to)=>{ke(Ve)&&ke(mt)&&ke(to)&&(V[Qe]=V[Ve]+" "+V[mt]+" "+V[to],delete V[Ve],delete V[mt],delete V[to])},Ae=Qe=>(ee=!0,c[Qe]),Pe=(Qe,Ve)=>(ee&&(Qe=Qe.replace(/\uFEFF[0-9]/g,mt=>c[mt])),Ve||(Qe=Qe.replace(/\\([\'\";:])/g,"$1")),Qe),ht=Qe=>String.fromCharCode(parseInt(Qe.slice(1),16)),Mt=Qe=>Qe.replace(/\\[0-9a-f]+/gi,ht),Yt=(Qe,Ve,mt,to,bo,gn)=>{if(bo=bo||gn,bo)return bo=Pe(bo),"'"+bo.replace(/\'/g,"\\'")+"'";if(Ve=Pe(Ve||mt||to||""),!e.allow_script_urls){const Cn=Ve.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(Cn)||!e.allow_svg_data_urls&&/^data:image\/svg/i.test(Cn))return""}return le&&(Ve=le.call(oe,Ve,"style")),"url('"+Ve.replace(/\'/g,"\\'")+"')"};if(H){H=H.replace(/[\u0000-\u001F]/g,""),H=H.replace(/\\[\"\';:\uFEFF]/g,Ae).replace(/\"[^\"]+\"|\'[^\']+\'/g,Ve=>Ve.replace(/[;:]/g,Ae));let Qe;for(;Qe=s.exec(H);){s.lastIndex=Qe.index+Qe[0].length;let Ve=Qe[1].replace(a,"").toLowerCase(),mt=Qe[2].replace(a,"");if(Ve&&mt){if(Ve=Mt(Ve),mt=Mt(mt),Ve.indexOf(_)!==-1||Ve.indexOf('"')!==-1||!e.allow_script_urls&&(Ve==="behavior"||/expression\s*\(|\/\*|\*\//.test(mt)))continue;Ve==="font-weight"&&mt==="700"?mt="bold":(Ve==="color"||Ve==="background-color")&&(mt=mt.toLowerCase()),j1(mt)==="rgb"&&k_(mt).each(to=>{mt=_h($k(to)).toLowerCase()}),mt=mt.replace(o,Yt),V[Ve]=ee?Pe(mt,!0):mt}}fe("border","",!0),fe("border","-width"),fe("border","-color"),fe("border","-style"),fe("padding",""),fe("margin",""),Oe("border","border-width","border-style","border-color"),V.border==="medium none"&&delete V.border,V["border-image"]==="none"&&delete V["border-image"]}return V},serialize:(H,V)=>{let ee="";const le=(fe,ke)=>{const Oe=ke[fe];if(Oe)for(let Ae=0,Pe=Oe.length;Ae0?" ":"")+ht+": "+Mt+";")}},oe=(fe,ke)=>{if(!h||!ke)return!0;let Oe=h["*"];return Oe&&Oe[fe]?!1:(Oe=h[ke],!(Oe&&Oe[fe]))};return V&&d?(le("*",d),le(V,d)):nn(H,(fe,ke)=>{fe&&oe(ke,V)&&(ee+=(ee.length>0?" ":"")+ke+": "+fe+";")}),ee}};return I},pp={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},Vk=e=>e instanceof Event||Gt(e.initEvent),jk=e=>e.isDefaultPrevented===zo||e.isDefaultPrevented===fn,sf=e=>uo(e.preventDefault)||Vk(e),am=(e,t)=>{const o=t??{};for(const s in e)Ro(pp,s)||(o[s]=e[s]);return Fe(e.composedPath)&&(o.composedPath=()=>e.composedPath()),Fe(e.getModifierState)&&(o.getModifierState=s=>e.getModifierState(s)),Fe(e.getTargetRanges)&&(o.getTargetRanges=()=>e.getTargetRanges()),o},oy=(e,t,o,s)=>{var a;const c=am(t,s);return c.type=e,uo(c.target)&&(c.target=(a=c.srcElement)!==null&&a!==void 0?a:o),sf(t)&&(c.preventDefault=()=>{c.defaultPrevented=!0,c.isDefaultPrevented=zo,Gt(t.preventDefault)&&t.preventDefault()},c.stopPropagation=()=>{c.cancelBubble=!0,c.isPropagationStopped=zo,Gt(t.stopPropagation)&&t.stopPropagation()},c.stopImmediatePropagation=()=>{c.isImmediatePropagationStopped=zo,c.stopPropagation()},jk(c)||(c.isDefaultPrevented=c.defaultPrevented===!0?zo:fn,c.isPropagationStopped=c.cancelBubble===!0?zo:fn,c.isImmediatePropagationStopped=fn)),c},C_="mce-data-",Z1=/^(?:mouse|contextmenu)|click/,xh=(e,t,o,s)=>{e.addEventListener(t,o,s||!1)},Cu=(e,t,o,s)=>{e.removeEventListener(t,o,s||!1)},ny=e=>Fe(e)&&Z1.test(e.type),ta=(e,t)=>{const o=oy(e.type,e,document,t);if(ny(e)&&ln(e.pageX)&&!ln(e.clientX)){const s=o.target.ownerDocument||document,a=s.documentElement,c=s.body,d=o;d.pageX=e.clientX+(a&&a.scrollLeft||c&&c.scrollLeft||0)-(a&&a.clientLeft||c&&c.clientLeft||0),d.pageY=e.clientY+(a&&a.scrollTop||c&&c.scrollTop||0)-(a&&a.clientTop||c&&c.clientTop||0)}return o},wr=(e,t,o)=>{const s=e.document,a={type:"ready"};if(o.domLoaded){t(a);return}const c=()=>s.readyState==="complete"||s.readyState==="interactive"&&s.body,d=()=>{Cu(e,"DOMContentLoaded",d),Cu(e,"load",d),o.domLoaded||(o.domLoaded=!0,t(a)),e=null};c()?d():xh(e,"DOMContentLoaded",d),o.domLoaded||xh(e,"load",d)};class rf{constructor(){this.domLoaded=!1,this.events={},this.count=1,this.expando=C_+(+new Date).toString(32),this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}bind(t,o,s,a){const c=this;let d;const h=window,_=V=>{c.executeHandlers(ta(V||h.event),z)};if(!t||wt(t)||Qo(t))return s;let z;t[c.expando]?z=t[c.expando]:(z=c.count++,t[c.expando]=z,c.events[z]={}),a=a||t;const I=o.split(" ");let H=I.length;for(;H--;){let V=I[H],ee=_,le=!1,oe=!1;if(V==="DOMContentLoaded"&&(V="ready"),c.domLoaded&&V==="ready"&&t.readyState==="complete"){s.call(a,ta({type:V}));continue}!c.hasFocusIn&&(V==="focusin"||V==="focusout")&&(le=!0,oe=V==="focusin"?"focus":"blur",ee=fe=>{const ke=ta(fe||h.event);ke.type=ke.type==="focus"?"focusin":"focusout",c.executeHandlers(ke,z)}),d=c.events[z][V],d?V==="ready"&&c.domLoaded?s(ta({type:V})):d.push({func:s,scope:a}):(c.events[z][V]=d=[{func:s,scope:a}],d.fakeName=oe,d.capture=le,d.nativeHandler=ee,V==="ready"?wr(t,ee,c):xh(t,oe||V,ee,le))}return t=d=null,s}unbind(t,o,s){if(!t||wt(t)||Qo(t))return this;const a=t[this.expando];if(a){let c=this.events[a];if(o){const d=o.split(" ");let h=d.length;for(;h--;){const _=d[h],z=c[_];if(z){if(s){let I=z.length;for(;I--;)if(z[I].func===s){const H=z.nativeHandler,V=z.fakeName,ee=z.capture,le=z.slice(0,I).concat(z.slice(I+1));le.nativeHandler=H,le.fakeName=V,le.capture=ee,c[_]=le}}(!s||z.length===0)&&(delete c[_],Cu(t,z.fakeName||_,z.nativeHandler,z.capture))}}}else nn(c,(d,h)=>{Cu(t,d.fakeName||h,d.nativeHandler,d.capture)}),c={};for(const d in c)if(Ro(c,d))return this;delete this.events[a];try{delete t[this.expando]}catch{t[this.expando]=null}}return this}fire(t,o,s){return this.dispatch(t,o,s)}dispatch(t,o,s){if(!t||wt(t)||Qo(t))return this;const a=ta({type:o,target:t},s);do{const c=t[this.expando];c&&this.executeHandlers(a,c),t=t.parentNode||t.ownerDocument||t.defaultView||t.parentWindow}while(t&&!a.isPropagationStopped());return this}clean(t){if(!t||wt(t)||Qo(t))return this;if(t[this.expando]&&this.unbind(t),t.getElementsByTagName||(t=t.document),t&&t.getElementsByTagName){this.unbind(t);const o=t.getElementsByTagName("*");let s=o.length;for(;s--;)t=o[s],t[this.expando]&&this.unbind(t)}return this}destroy(){this.events={}}cancel(t){return t&&(t.preventDefault(),t.stopImmediatePropagation()),!1}executeHandlers(t,o){const s=this.events[o],a=s&&s[t.type];if(a)for(let c=0,d=a.length;c{uo(o)||o===""?rn(e,t):Rr(e,t,o)},af=e=>e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),im=(e,t)=>{let o=0;if(e)for(let s=e.nodeType,a=e.previousSibling;a;a=a.previousSibling){const c=a.nodeType;t&&wt(a)&&(c===s||!a.data.length)||(o++,s=c)}return o},ry=(e,t)=>{const o=Da(t,"style"),s=e.serialize(e.parse(o),En(t));gp(t,La,s)},S_=(e,t)=>D(e)?Ro(Fi,t)?e+"":e+"px":e,q1=(e,t,o)=>{const s=af(t);uo(o)||o===""?Xl(e,s):li(e,s,S_(o,s))},lm=(e,t,o)=>{const s=t.keep_values,a={set:(d,h,_)=>{const z=ye.fromDom(d);Gt(t.url_converter)&&Fe(h)&&(h=t.url_converter.call(t.url_converter_scope||o(),String(h),_,d));const I="data-mce-"+_;gp(z,I,h),gp(z,_,h)},get:(d,h)=>{const _=ye.fromDom(d);return Da(_,"data-mce-"+h)||Da(_,h)}},c={style:{set:(d,h)=>{const _=ye.fromDom(d);s&&gp(_,La,h),rn(_,"style"),ft(h)&&vn(_,e.parse(h))},get:d=>{const h=ye.fromDom(d),_=Da(h,La)||Da(h,"style");return e.serialize(e.parse(_),En(h))}}};return s&&(c.href=c.src=a),c},As=(e,t={})=>{const o={},s=window,a={};let c=0;const d=!0,h=!0,_=Ks.forElement(ye.fromDom(e),{contentCssCors:t.contentCssCors,referrerPolicy:t.referrerPolicy}),z=[],I=t.schema?t.schema:Dc({}),H=U1({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),V=t.ownEvents?new rf:rf.Event,ee=I.getBlockElements(),le=$e=>ft($e)?Ro(ee,$e):no($e)&&(Ro(ee,$e.nodeName)||Oc(I,$e)),oe=$e=>$e&&e&&ft($e)?e.getElementById($e):$e,fe=$e=>{const je=oe($e);return Fe(je)?ye.fromDom(je):null},ke=($e,je,It="")=>{let Dt;const Do=fe($e);if(Fe(Do)&&cr(Do)){const Mn=oT[je];Mn&&Mn.get?Dt=Mn.get(Do.dom,je):Dt=Da(Do,je)}return Fe(Dt)?Dt:It},Oe=$e=>{const je=oe($e);return uo(je)?[]:je.attributes},Ae=($e,je,It)=>{go($e,Dt=>{if(no(Dt)){const Do=ye.fromDom(Dt),Mn=It===""?null:It,Nr=Da(Do,je),Zm=oT[je];Zm&&Zm.set?Zm.set(Do.dom,Mn,je):gp(Do,je,Mn),Nr!==Mn&&t.onSetAttrib&&t.onSetAttrib({attrElm:Do.dom,attrName:je,attrValue:Mn})}})},Pe=($e,je)=>$e.cloneNode(je),ht=()=>t.root_element||e.body,Mt=$e=>{const je=zl($e);return{x:je.x,y:je.y,w:je.width,h:je.height}},Yt=($e,je)=>fh(e.body,oe($e),je),Qe=($e,je,It)=>{go($e,Dt=>{const Do=ye.fromDom(Dt);q1(Do,je,It),t.update_styles&&ry(H,Do)})},Ve=($e,je)=>{go($e,It=>{const Dt=ye.fromDom(It);nn(je,(Do,Mn)=>{q1(Dt,Mn,Do)}),t.update_styles&&ry(H,Dt)})},mt=($e,je,It)=>{const Dt=oe($e);if(!(uo(Dt)||!Ql(Dt)&&!Yf(Dt)))return It?ur(ye.fromDom(Dt),af(je)):(je=je.replace(/-(\D)/g,(Do,Mn)=>Mn.toUpperCase()),je==="float"&&(je="cssFloat"),Dt.style?Dt.style[je]:void 0)},to=$e=>{const je=oe($e);if(!je)return{w:0,h:0};let It=mt(je,"width"),Dt=mt(je,"height");return(!It||It.indexOf("px")===-1)&&(It="0"),(!Dt||Dt.indexOf("px")===-1)&&(Dt="0"),{w:parseInt(It,10)||je.offsetWidth||je.clientWidth,h:parseInt(Dt,10)||je.offsetHeight||je.clientHeight}},bo=$e=>{const je=oe($e),It=Yt(je),Dt=to(je);return{x:It.x,y:It.y,w:Dt.w,h:Dt.h}},gn=($e,je)=>{if(!$e)return!1;const It=ve($e)?$e:[$e];return Ln(It,Dt=>ls(ye.fromDom(Dt),je))},Cn=($e,je,It,Dt)=>{const Do=[];let Mn=oe($e);Dt=Dt===void 0;const Nr=It||(ht().nodeName!=="BODY"?ht().parentNode:null);if(ft(je))if(je==="*")je=no;else{const Zm=je;je=d5=>gn(d5,Zm)}for(;Mn&&!(Mn===Nr||uo(Mn.nodeType)||lo(Mn)||Ld(Mn));){if(!je||je(Mn))if(Dt)Do.push(Mn);else return[Mn];Mn=Mn.parentNode}return Dt?Do:null},ds=($e,je,It)=>{const Dt=Cn($e,je,It,!1);return Dt&&Dt.length>0?Dt[0]:null},hs=($e,je,It)=>{let Dt=je;if($e){ft(je)&&(Dt=Do=>gn(Do,je));for(let Do=$e[It];Do;Do=Do[It])if(Gt(Dt)&&Dt(Do))return Do}return null},qr=($e,je)=>hs($e,je,"nextSibling"),il=($e,je)=>hs($e,je,"previousSibling"),Os=$e=>Gt($e.querySelectorAll),Ft=($e,je)=>{var It,Dt;const Do=(Dt=(It=oe(je))!==null&&It!==void 0?It:t.root_element)!==null&&Dt!==void 0?Dt:e;return Os(Do)?an(Do.querySelectorAll($e)):[]},go=function($e,je,It){const Dt=It??this;if(ve($e)){const Do=[];return W1($e,(Mn,Nr)=>{const Zm=oe(Mn);Zm&&Do.push(je.call(Dt,Zm,Nr))}),Do}else{const Do=oe($e);return Do?je.call(Dt,Do):!1}},ts=($e,je)=>{go($e,It=>{nn(je,(Dt,Do)=>{Ae(It,Do,Dt)})})},jt=($e,je)=>{go($e,It=>{const Dt=ye.fromDom(It);Jl(Dt,je)})},Eo=($e,je,It,Dt,Do)=>go($e,Mn=>{const Nr=ft(je)?e.createElement(je):je;return Fe(It)&&ts(Nr,It),Dt&&(!ft(Dt)&&Dt.nodeType?Nr.appendChild(Dt):ft(Dt)&&jt(Nr,Dt)),Do?Nr:Mn.appendChild(Nr)}),wn=($e,je,It)=>Eo(e.createElement($e),$e,je,It,!0),qt=dp.decode,hn=dp.encodeAllRaw,An=($e,je,It="")=>{let Dt="<"+$e;for(const Do in je)Ha(je,Do)&&(Dt+=" "+Do+'="'+hn(je[Do])+'"');return wi(It)&&Ro(I.getVoidElements(),$e)?Dt+" />":Dt+">"+It+""},gi=$e=>{const je=e.createElement("div"),It=e.createDocumentFragment();It.appendChild(je),$e&&(je.innerHTML=$e);let Dt;for(;Dt=je.firstChild;)It.appendChild(Dt);return It.removeChild(je),It},gs=($e,je)=>go($e,It=>{const Dt=ye.fromDom(It);return je&&Be(xa(Dt),Do=>{Rs(Do)&&Do.dom.length===0?Jn(Do):Zs(Dt,Do)}),Jn(Dt),Dt.dom}),ti=$e=>go($e,je=>{const It=je.attributes;for(let Dt=It.length-1;Dt>=0;Dt--)je.removeAttributeNode(It.item(Dt))}),zf=$e=>H.parse($e),Xp=($e,je)=>H.serialize($e,je),uc=$e=>{if(nh!==As.DOM&&e===document){if(o[$e])return;o[$e]=!0}let je=e.getElementById("mceDefaultStyles");if(!je){je=e.createElement("style"),je.id="mceDefaultStyles",je.type="text/css";const It=e.head;It.firstChild?It.insertBefore(je,It.firstChild):It.appendChild(je)}je.styleSheet?je.styleSheet.cssText+=$e:je.appendChild(e.createTextNode($e))},tu=$e=>{$e||($e=""),Be($e.split(","),je=>{a[je]=!0,_.load(je).catch(dt)})},Nf=($e,je,It)=>{go($e,Dt=>{if(no(Dt)){const Do=ye.fromDom(Dt),Mn=je.split(" ");Be(Mn,Nr=>{Fe(It)?(It?ql:Ra)(Do,Nr):qu(Do,Nr)})}})},ou=($e,je)=>{Nf($e,je,!0)},Df=($e,je)=>{Nf($e,je,!1)},_o=($e,je)=>{const It=fe($e),Dt=je.split(" ");return Fe(It)&&$s(Dt,Do=>yc(It,Do))},Un=$e=>{go($e,je=>Xl(ye.fromDom(je),"display"))},zr=$e=>{go($e,je=>li(ye.fromDom(je),"display","none"))},na=$e=>{const je=fe($e);return Fe(je)&&xd(Us(je,"display"),"none")},Fa=$e=>($e||"mce_")+c++,Zi=$e=>{const je=fe($e);return Fe(je)?no(je.dom)?je.dom.outerHTML:Sc(je):""},Aa=($e,je)=>{go($e,It=>{no(It)&&(It.outerHTML=je)})},Ta=($e,je)=>{const It=oe(je);return go($e,Dt=>{const Do=It==null?void 0:It.parentNode,Mn=It==null?void 0:It.nextSibling;return Do&&(Mn?Do.insertBefore(Dt,Mn):Do.appendChild(Dt)),Dt})},fc=($e,je,It)=>go(je,Dt=>{var Do;const Mn=ve(je)?$e.cloneNode(!0):$e;return It&&W1(sy(Dt.childNodes),Nr=>{Mn.appendChild(Nr)}),(Do=Dt.parentNode)===null||Do===void 0||Do.replaceChild(Mn,Dt),Dt}),Vm=($e,je)=>{if($e.nodeName!==je.toUpperCase()){const It=wn(je);return W1(Oe($e),Dt=>{Ae(It,Dt.nodeName,ke($e,Dt.nodeName))}),fc(It,$e,!0),It}else return $e},jm=($e,je)=>{let It=$e;for(;It;){let Dt=je;for(;Dt&&It!==Dt;)Dt=Dt.parentNode;if(It===Dt)break;It=It.parentNode}return!It&&$e.ownerDocument?$e.ownerDocument.documentElement:It},Um=($e,je,It)=>Ct(je)?ml(I,$e,{...It,isContent:Do=>{const Mn=Do.nodeName.toLowerCase();return!!je[Mn]}}):ml(I,$e,It),Rf=()=>e.createRange(),C1=($e,je,It)=>{let Dt=Rf(),Do,Mn;if($e&&je&&$e.parentNode&&je.parentNode){const Nr=$e.parentNode;return Dt.setStart(Nr,im($e)),Dt.setEnd(je.parentNode,im(je)),Do=Dt.extractContents(),Dt=Rf(),Dt.setStart(je.parentNode,im(je)+1),Dt.setEnd(Nr,im($e)+1),Mn=Dt.extractContents(),Nr.insertBefore(cg(nh,Do,I),$e),It?Nr.insertBefore(It,$e):Nr.insertBefore(je,$e),Nr.insertBefore(cg(nh,Mn,I),$e),gs($e),It||je}else return},bk=($e,je,It,Dt)=>{if(ve($e)){let Do=$e.length;const Mn=[];for(;Do--;)Mn[Do]=bk($e[Do],je,It,Dt);return Mn}else return t.collect&&($e===e||$e===s)&&z.push([$e,je,It,Dt]),V.bind($e,je,It,Dt||nh)},yk=($e,je,It)=>{if(ve($e)){let Dt=$e.length;const Do=[];for(;Dt--;)Do[Dt]=yk($e[Dt],je,It);return Do}else{if(z.length>0&&($e===e||$e===s)){let Dt=z.length;for(;Dt--;){const[Do,Mn,Nr]=z[Dt];$e===Do&&(!je||je===Mn)&&(!It||It===Nr)&&V.unbind(Do,Mn,Nr)}}return V.unbind($e,je,It)}},JI=($e,je,It)=>V.dispatch($e,je,It),Ib=($e,je,It)=>V.dispatch($e,je,It),c5=$e=>{if($e&&Ql($e)){const je=$e.getAttribute("data-mce-contenteditable");return je&&je!=="inherit"?je:$e.contentEditable!=="inherit"?$e.contentEditable:null}else return null},nh={doc:e,settings:t,win:s,files:a,stdMode:d,boxModel:h,styleSheetLoader:_,boundEvents:z,styles:H,schema:I,events:V,isBlock:le,root:null,clone:Pe,getRoot:ht,getViewPort:Mt,getRect:bo,getSize:to,getParent:ds,getParents:Cn,get:oe,getNext:qr,getPrev:il,select:Ft,is:gn,add:Eo,create:wn,createHTML:An,createFragment:gi,remove:gs,setStyle:Qe,getStyle:mt,setStyles:Ve,removeAllAttribs:ti,setAttrib:Ae,setAttribs:ts,getAttrib:ke,getPos:Yt,parseStyle:zf,serializeStyle:Xp,addStyle:uc,loadCSS:tu,addClass:ou,removeClass:Df,hasClass:_o,toggleClass:Nf,show:Un,hide:zr,isHidden:na,uniqueId:Fa,setHTML:jt,getOuterHTML:Zi,setOuterHTML:Aa,decode:qt,encode:hn,insertAfter:Ta,replace:fc,rename:Vm,findCommonAncestor:jm,run:go,getAttribs:Oe,isEmpty:Um,createRng:Rf,nodeIndex:im,split:C1,bind:bk,unbind:yk,fire:Ib,dispatch:JI,getContentEditable:c5,getContentEditableParent:$e=>{const je=ht();let It=null;for(let Dt=$e;Dt&&Dt!==je&&(It=c5(Dt),It===null);Dt=Dt.parentNode);return It},isEditable:$e=>{if(Fe($e)){const je=no($e)?$e:$e.parentElement;return Fe(je)&&Ql(je)&&js(ye.fromDom(je))}else return!1},destroy:()=>{if(z.length>0){let $e=z.length;for(;$e--;){const[je,It,Dt]=z[$e];V.unbind(je,It,Dt)}}nn(a,($e,je)=>{_.unload(je),delete a[je]})},isChildOf:($e,je)=>$e===je||je.contains($e),dumpRng:$e=>"startContainer: "+$e.startContainer.nodeName+", startOffset: "+$e.startOffset+", endContainer: "+$e.endContainer.nodeName+", endOffset: "+$e.endOffset},oT=lm(H,t,Ge(nh));return nh};As.DOM=As(document),As.nodeIndex=im;const ay=As.DOM,Ys=0,Id=1,od=2,hp=3;class el{constructor(t={}){this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=!1,this.settings=t}_setReferrerPolicy(t){this.settings.referrerPolicy=t}loadScript(t){return new Promise((o,s)=>{const a=ay;let c;const d=()=>{a.remove(z),c&&(c.onerror=c.onload=c=null)},h=()=>{d(),o()},_=()=>{d(),s("Failed to load script: "+t)},z=a.uniqueId();c=document.createElement("script"),c.id=z,c.type="text/javascript",c.src=zt._addCacheSuffix(t),this.settings.referrerPolicy&&a.setAttrib(c,"referrerpolicy",this.settings.referrerPolicy),c.onload=h,c.onerror=_,(document.getElementsByTagName("head")[0]||document.body).appendChild(c)})}isDone(t){return this.states[t]===od}markDone(t){this.states[t]=od}add(t){const o=this;return o.queue.push(t),o.states[t]===void 0&&(o.states[t]=Ys),new Promise((a,c)=>{o.scriptLoadedCallbacks[t]||(o.scriptLoadedCallbacks[t]=[]),o.scriptLoadedCallbacks[t].push({resolve:a,reject:c})})}load(t){return this.add(t)}remove(t){delete this.states[t],delete this.scriptLoadedCallbacks[t]}loadQueue(){const t=this.queue;return this.queue=[],this.loadScripts(t)}loadScripts(t){const o=this,s=(_,z)=>{Gn(o.scriptLoadedCallbacks,z).each(I=>{Be(I,H=>H[_](z))}),delete o.scriptLoadedCallbacks[z]},a=_=>{const z=rt(_,I=>I.status==="rejected");return z.length>0?Promise.reject(Bn(z,({reason:I})=>ve(I)?I:[I])):Promise.resolve()},c=_=>Promise.allSettled(dn(_,z=>o.states[z]===od?(s("resolve",z),Promise.resolve()):o.states[z]===hp?(s("reject",z),Promise.reject(z)):(o.states[z]=Id,o.loadScript(z).then(()=>{o.states[z]=od,s("resolve",z);const I=o.queue;return I.length>0?(o.queue=[],c(I).then(a)):Promise.resolve()},()=>(o.states[z]=hp,s("reject",z),Promise.reject(z)))))),d=_=>(o.loading=!0,c(_).then(z=>{o.loading=!1;const I=o.queueLoadedCallbacks.shift();return j.from(I).each(cn),a(z)})),h=hd(t);return o.loading?new Promise((_,z)=>{o.queueLoadedCallbacks.push(()=>{d(h).then(_,z)})}):d(h)}}el.ScriptLoader=new el;const Ga=(e,t)=>{const o=e.indexOf(t);return o!==-1&&e.indexOf(t,o+1)>o},cm=e=>ue(e)&&Ro(e,"raw"),wh=e=>ve(e)&&e.length>1,bp={},kh=Er("en"),yp=()=>Gn(bp,kh.get()),Rc={getData:()=>Ri(bp,e=>({...e})),setCode:e=>{e&&kh.set(e)},getCode:()=>kh.get(),add:(e,t)=>{let o=bp[e];o||(bp[e]=o={});const s=dn(vt(t),a=>a.toLowerCase());nn(t,(a,c)=>{const d=c.toLowerCase();d!==c&&Ga(s,d)?(Ro(t,d)||(o[d]=a),o[c]=a):o[d]=a})},translate:e=>{const t=yp().getOr({}),o=d=>Gt(d)?Object.prototype.toString.call(d):s(d)?"":""+d,s=d=>d===""||d===null||d===void 0,a=d=>{const h=o(d);return Ro(t,h)?o(t[h]):Gn(t,h.toLowerCase()).map(o).getOr(h)},c=d=>d.replace(/{context:\w+}$/,"");if(s(e))return"";if(cm(e))return o(e.raw);if(wh(e)){const d=e.slice(1),h=a(e[0]).replace(/\{([0-9]+)\}/g,(_,z)=>Ro(d,z)?o(d[z]):_);return c(h)}return c(a(e))},isRtl:()=>yp().bind(e=>Gn(e,"_dir")).exists(e=>e==="rtl"),hasCode:e=>Ro(bp,e)},Hi=()=>{const e=[],t={},o={},s=[],a=(oe,fe)=>{const ke=rt(s,Oe=>Oe.name===oe&&Oe.state===fe);Be(ke,Oe=>Oe.resolve())},c=oe=>Ro(t,oe),d=oe=>Ro(o,oe),h=oe=>{if(o[oe])return o[oe].instance},_=(oe,fe)=>{const ke=Rc.getCode(),Oe=","+(fe||"")+",";!ke||fe&&Oe.indexOf(","+ke+",")===-1||el.ScriptLoader.add(t[oe]+"/langs/"+ke+".js")},z=(oe,fe)=>{Hi.languageLoad!==!1&&(c(oe)?_(oe,fe):le(oe,"loaded").then(()=>_(oe,fe)))},I=(oe,fe)=>(e.push(fe),o[oe]={instance:fe},a(oe,"added"),fe),H=oe=>{delete t[oe],delete o[oe]},V=(oe,fe)=>ft(fe)?ft(oe)?{prefix:"",resource:fe,suffix:""}:{prefix:oe.prefix,resource:fe,suffix:oe.suffix}:fe,ee=(oe,fe)=>{if(t[oe])return Promise.resolve();let ke=ft(fe)?fe:fe.prefix+fe.resource+fe.suffix;ke.indexOf("/")!==0&&ke.indexOf("://")===-1&&(ke=Hi.baseURL+"/"+ke),t[oe]=ke.substring(0,ke.lastIndexOf("/"));const Oe=()=>(a(oe,"loaded"),Promise.resolve());return o[oe]?Oe():el.ScriptLoader.add(ke).then(Oe)},le=(oe,fe="added")=>fe==="added"&&d(oe)||fe==="loaded"&&c(oe)?Promise.resolve():new Promise(ke=>{s.push({name:oe,state:fe,resolve:ke})});return{items:e,urls:t,lookup:o,get:h,requireLangPack:z,add:I,remove:H,createUrl:V,load:ee,waitFor:le}};Hi.languageLoad=!0,Hi.baseURL="",Hi.PluginManager=Hi(),Hi.ThemeManager=Hi(),Hi.ModelManager=Hi();const vp=(e,t)=>{let o=null;return{cancel:()=>{ot(o)||(clearTimeout(o),o=null)},throttle:(...c)=>{ot(o)&&(o=setTimeout(()=>{o=null,e.apply(null,c)},t))}}},mg=(e,t)=>{let o=null;const s=()=>{ot(o)||(clearTimeout(o),o=null)};return{cancel:s,throttle:(...c)=>{s(),o=setTimeout(()=>{o=null,e.apply(null,c)},t)}}},O_=(e,t,o)=>El(e,t,o).isSome(),mr=Ge("mce-annotation"),pr=Ge("data-mce-annotation"),Lr=Ge("data-mce-annotation-uid"),us=Ge("data-mce-annotation-active"),ir=Ge("data-mce-annotation-classes"),Ar=Ge("data-mce-annotation-attrs"),iy=e=>t=>kn(t,e),ly=(e,t)=>{const o=e.selection.getRng(),s=ye.fromDom(o.startContainer),a=ye.fromDom(e.getBody()),c=t.fold(()=>"."+mr(),_=>`[${pr()}="${_}"]`),d=xc(s,o.startOffset).getOr(s);return Xr(d,c,iy(a)).bind(_=>Sr(_,`${Lr()}`).bind(z=>Sr(_,`${pr()}`).map(I=>{const H=X1(e,z);return{uid:z,name:I,elements:H}})))},Y1=e=>cr(e)&&yc(e,mr()),Ch=(e,t)=>Gc(e,"data-mce-bogus")||O_(e,'[data-mce-bogus="all"]',iy(t)),X1=(e,t)=>{const o=ye.fromDom(e.getBody()),s=Mr(o,`[${Lr()}="${t}"]`);return rt(s,a=>!Ch(a,o))},_p=(e,t)=>{const o=ye.fromDom(e.getBody()),s=Mr(o,`[${pr()}="${t}"]`),a={};return Be(s,c=>{if(!Ch(c,o)){const d=Da(c,Lr()),h=Gn(a,d).getOr([]);a[d]=h.concat([c])}}),a},cy=(e,t)=>{const o=Er({}),s=()=>({listeners:[],previous:Jr()}),a=(H,V)=>{c(H,ee=>(V(ee),ee))},c=(H,V)=>{const ee=o.get(),le=Gn(ee,H).getOrThunk(s),oe=V(le);ee[H]=oe,o.set(ee)},d=(H,V,ee)=>{a(H,le=>{Be(le.listeners,oe=>oe(!0,H,{uid:V,nodes:dn(ee,fe=>fe.dom)}))})},h=H=>{a(H,V=>{Be(V.listeners,ee=>ee(!1,H))})},_=(H,V)=>{Be(X1(e,H),ee=>{V?Rr(ee,us(),"true"):rn(ee,us())})},z=mg(()=>{const H=yn(t.getNames());Be(H,V=>{c(V,ee=>{const le=ee.previous.get();return ly(e,j.some(V)).fold(()=>{le.each(oe=>{h(V),ee.previous.clear(),_(oe,!1)})},({uid:oe,name:fe,elements:ke})=>{xd(le,oe)||(le.each(Oe=>_(Oe,!1)),d(fe,oe,ke),ee.previous.set(oe),_(oe,!0))}),{previous:ee.previous,listeners:ee.listeners}})})},30);return e.on("remove",()=>{z.cancel()}),e.on("NodeChange",()=>{z.throttle()}),{addListener:(H,V)=>{c(H,ee=>({previous:ee.previous,listeners:ee.listeners.concat([V])}))}}},dy=(e,t)=>{const o=pr(),s=c=>j.from(c.attr(o)).bind(t.lookup),a=c=>{var d,h;c.attr(Lr(),null),c.attr(pr(),null),c.attr(us(),null);const _=j.from(c.attr(Ar())).map(V=>V.split(",")).getOr([]),z=j.from(c.attr(ir())).map(V=>V.split(",")).getOr([]);Be(_,V=>c.attr(V,null));const I=(h=(d=c.attr("class"))===null||d===void 0?void 0:d.split(" "))!==null&&h!==void 0?h:[],H=os(I,[mr()].concat(z));c.attr("class",H.length>0?H.join(" "):null),c.attr(ir(),null),c.attr(Ar(),null)};e.serializer.addTempAttr(us()),e.serializer.addAttributeFilter(o,c=>{for(const d of c)s(d).each(h=>{h.persistent===!1&&(d.name==="span"?d.unwrap():a(d))})})},J1=()=>{const e={};return{register:(a,c)=>{e[a]={name:a,settings:c}},lookup:a=>Gn(e,a).map(c=>c.settings),getNames:()=>vt(e)}},Sh=(e,t,o)=>Math.min(Math.max(e,t),o),tl=()=>window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295;let Q1=0;const Ei=e=>{const o=new Date().getTime(),s=Math.floor(tl()*1e9);return Q1++,e+"_"+s+Q1+String(o)},Eh=(e,t)=>{Be(t,o=>{ql(e,o)})},xp=(e,t)=>{Be(t,o=>{Ra(e,o)})},nd=(e,t)=>ye.fromDom(e.dom.cloneNode(t)),Tr=e=>nd(e,!1),um=e=>nd(e,!0),e0=(e,t)=>{const o=ye.fromTag(t),s=Va(e);return $a(o,s),o},t0=(e,t)=>{const o=e0(e,t);Ne(e,o);const s=xa(e);return xr(o,s),Jn(e),o},Ah=(e,t,o=fn)=>{const s=new Ma(e,t),a=c=>{let d;do d=s[c]();while(d&&!wt(d)&&!o(d));return j.from(d).filter(wt)};return{current:()=>j.from(s.current()).filter(wt),next:()=>a("next"),prev:()=>a("prev"),prev2:()=>a("prev2")}},Su=(e,t)=>{const o=t||(d=>e.isBlock(d)||Hs(d)||$o(d)),s=(d,h,_,z)=>{if(wt(d)){const I=z(d,h,d.data);if(I!==-1)return j.some({container:d,offset:I})}return _().bind(I=>s(I.container,I.offset,_,z))};return{backwards:(d,h,_,z)=>{const I=Ah(d,z??e.getRoot(),o);return s(d,h,()=>I.prev().map(H=>({container:H,offset:H.length})),_).getOrNull()},forwards:(d,h,_,z)=>{const I=Ah(d,z??e.getRoot(),o);return s(d,h,()=>I.next().map(H=>({container:H,offset:0})),_).getOrNull()}}},Th=((e,t)=>{const o=c=>{if(!e(c))throw new Error("Can only get "+t+" value of a "+t+" node");return s(c).getOr("")},s=c=>e(c)?j.from(c.dom.nodeValue):j.none();return{get:o,getOption:s,set:(c,d)=>{if(!e(c))throw new Error("Can only set raw "+t+" value of a "+t+" node");c.dom.nodeValue=d}}})(Rs,"text"),fm=e=>Th.get(e),z_=e=>Th.getOption(e),Oh=(e,t)=>Th.set(e,t),zh=["td","th"],uy=["thead","tbody","tfoot"],pg=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],fy=["li","dd","dt"],Ai=["ul","ol","dl"],o0=["pre","script","textarea","style"],Eu=e=>{let t;return o=>(t=t||Is(e,zo),Ro(t,En(o)))},Nh=e=>En(e)==="table",Fd=e=>cr(e)&&En(e)==="br",Dh=Eu(pg),Rh=Eu(Ai),mm=Eu(fy),wp=Eu(uy),Mc=Eu(zh),Mh=Eu(o0),Zk=e=>{const t=[];let o=e.dom;for(;o;)t.push(ye.fromDom(o)),o=o.lastChild;return t},nc=e=>{const t=Mr(e,"br"),o=rt(Zk(e).slice(-1),Fd);t.length===o.length&&Be(o,Jn)},Au=()=>{const e=ye.fromTag("br");return Rr(e,"data-mce-bogus","1"),e},Lc=e=>{xs(e),fr(e,Au())},n0=(e,t)=>{wc(e).each(o=>{Ur(o).each(s=>{t.isBlock(En(e))&&Fd(o)&&t.isBlock(En(s))&&Jn(o)})})},ua=rr,Bc=Jc,ol=qf,Wk=e=>e.insertContent(ua,{preserve_zwsp:!0}),lf=no,Tu=wt,gg=e=>(Tu(e)&&(e=e.parentNode),lf(e)&&e.hasAttribute("data-mce-caret")),pm=e=>Tu(e)&&Bc(e.data),Bl=e=>gg(e)||pm(e),my=e=>e.firstChild!==e.lastChild||!Hs(e.firstChild),py=(e,t)=>{var o;const a=((o=e.ownerDocument)!==null&&o!==void 0?o:document).createTextNode(ua),c=e.parentNode;if(t){const d=e.previousSibling;if(Tu(d)){if(Bl(d))return d;if(Ou(d))return d.splitText(d.data.length-1)}c==null||c.insertBefore(a,e)}else{const d=e.nextSibling;if(Tu(d)){if(Bl(d))return d;if(Bh(d))return d.splitText(1),d}e.nextSibling?c==null||c.insertBefore(a,e.nextSibling):c==null||c.appendChild(a)}return a},Lh=e=>{const t=e.container();return wt(t)?t.data.charAt(e.offset())===ua||e.isAtStart()&&pm(t.previousSibling):!1},gy=e=>{const t=e.container();return wt(t)?t.data.charAt(e.offset()-1)===ua||e.isAtEnd()&&pm(t.nextSibling):!1},N_=(e,t,o)=>{var s;const c=((s=t.ownerDocument)!==null&&s!==void 0?s:document).createElement(e);c.setAttribute("data-mce-caret",o?"before":"after"),c.setAttribute("data-mce-bogus","all"),c.appendChild(Au().dom);const d=t.parentNode;return o?d==null||d.insertBefore(c,t):t.nextSibling?d==null||d.insertBefore(c,t.nextSibling):d==null||d.appendChild(c),c},Bh=e=>Tu(e)&&e.data[0]===ua,Ou=e=>Tu(e)&&e.data[e.data.length-1]===ua,Ph=e=>{var t;const o=e.getElementsByTagName("br"),s=o[o.length-1];Rd(s)&&((t=s.parentNode)===null||t===void 0||t.removeChild(s))},kp=e=>e&&e.hasAttribute("data-mce-caret")?(Ph(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("data-mce-style"),e.removeAttribute("_moz_abspos"),e):null,Cp=e=>gg(e.startContainer),cf=Math.round,df=e=>e?{left:cf(e.left),top:cf(e.top),bottom:cf(e.bottom),right:cf(e.right),width:cf(e.width),height:cf(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0},Ih=(e,t)=>(e=df(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e),uf=(e,t)=>e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right,ff=(e,t,o)=>e>=0&&e<=Math.min(t.height,o.height)/2,mf=(e,t)=>{const o=Math.min(t.height/2,e.height/2);return e.bottom-ot.bottom?!1:ff(t.top-e.bottom,e,t)},Sp=(e,t)=>e.top>t.bottom?!0:e.bottomt>=e.left&&t<=e.right&&o>=e.top&&o<=e.bottom,hg=e=>ko(e,(t,o)=>t.fold(()=>j.some(o),s=>{const a=Math.min(o.left,s.left),c=Math.min(o.top,s.top),d=Math.max(o.right,s.right),h=Math.max(o.bottom,s.bottom);return j.some({top:c,right:d,bottom:h,left:a,width:d-a,height:h-c})}),j.none()),by=(e,t,o)=>{const s=Math.max(Math.min(t,e.left+e.width),e.left),a=Math.max(Math.min(o,e.top+e.height),e.top);return Math.sqrt((t-s)*(t-s)+(o-a)*(o-a))},s0=(e,t)=>Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top)),bg=e=>{const t=e.startContainer,o=e.startOffset;return t===e.endContainer&&t.hasChildNodes()&&e.endOffset===o+1?t.childNodes[o]:null},fa=(e,t)=>{if(no(e)&&e.hasChildNodes()){const o=e.childNodes,s=Sh(t,0,o.length-1);return o[s]}else return e},r0=(e,t)=>{if(!(t<0&&no(e)&&e.hasChildNodes()))return fa(e,t)},D_=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),a0=e=>ft(e)&&e.charCodeAt(0)>=768&&D_.test(e),i0=(...e)=>t=>{for(let o=0;ot=>{for(let o=0;oM_(e)?!1:qk(e)?!gf(e.parentNode):Hh(e)||l0(e)||R_(e)||vy(e),c0=e=>no(e)&&e.getAttribute("unselectable")==="true",vy=e=>!c0(e)&&Fh(e),L_=(e,t)=>{for(let o=e.parentNode;o&&o!==t;o=o.parentNode){if(vy(o))return!1;if(yy(o))return!0}return!0},Ep=e=>vy(e)?!ko(an(e.getElementsByTagName("*")),(t,o)=>t||yy(o),!1):!1,yg=e=>Hh(e)||Ep(e),$h=(e,t)=>sd(e)&&L_(e,t),B_=no,rd=sd,gm=Nl("display","block table"),Vh=Nl("float","left right"),jh=pf(B_,rd,pt(Vh)),_y=pt(Nl("white-space","pre pre-line pre-wrap")),Uh=wt,Xa=Hs,xy=As.nodeIndex,hm=r0,bm=e=>e?e.createRange():As.DOM.createRng(),Zh=e=>ft(e)&&/[\r\n\t ]/.test(e),wy=e=>!!e.setStart&&!!e.setEnd,Ap=e=>{const t=e.startContainer,o=e.startOffset;if(Zh(e.toString())&&_y(t.parentNode)&&wt(t)){const s=t.data;if(Zh(s[o-1])||Zh(s[o+1]))return!0}return!1},hf=e=>{const t=e.ownerDocument,o=bm(t),s=t.createTextNode(da),a=e.parentNode;a.insertBefore(s,e),o.setStart(s,0),o.setEnd(s,1);const c=df(o.getBoundingClientRect());return a.removeChild(s),c},d0=e=>{const t=e.startContainer,o=e.endContainer,s=e.startOffset,a=e.endOffset;if(t===o&&wt(o)&&s===0&&a===1){const c=e.cloneRange();return c.setEndAfter(o),$i(c)}else return null},ky=e=>e.left===0&&e.right===0&&e.top===0&&e.bottom===0,$i=e=>{var t;let o;const s=e.getClientRects();return s.length>0?o=df(s[0]):o=df(e.getBoundingClientRect()),!wy(e)&&Xa(e)&&ky(o)?hf(e):ky(o)&&wy(e)&&(t=d0(e))!==null&&t!==void 0?t:o},bf=(e,t)=>{const o=Ih(e,t);return o.width=1,o.right=o.left+1,o},u0=e=>{const t=[],o=d=>{d.height!==0&&(t.length>0&&uf(d,t[t.length-1])||t.push(d))},s=(d,h)=>{const _=bm(d.ownerDocument);if(h0&&(_.setStart(d,h-1),_.setEnd(d,h),Ap(_)||o(bf($i(_),!1))),h{const s=()=>(Uh(e),t===0),a=()=>Uh(e)?t>=e.data.length:t>=e.childNodes.length,c=()=>{const I=bm(e.ownerDocument);return I.setStart(e,t),I.setEnd(e,t),I},d=()=>(o||(o=u0(Ue(e,t))),o),h=()=>d().length>0,_=I=>I&&e===I.container()&&t===I.offset(),z=I=>hm(e,I?t-1:t);return{container:Ge(e),offset:Ge(t),toRange:c,getClientRects:d,isVisible:h,isAtStart:s,isAtEnd:a,isEqual:_,getNode:z}};Ue.fromRangeStart=e=>Ue(e.startContainer,e.startOffset),Ue.fromRangeEnd=e=>Ue(e.endContainer,e.endOffset),Ue.after=e=>Ue(e.parentNode,xy(e)+1),Ue.before=e=>Ue(e.parentNode,xy(e)),Ue.isAbove=(e,t)=>va(St(t.getClientRects()),Vo(e.getClientRects()),mf).getOr(!1),Ue.isBelow=(e,t)=>va(Vo(t.getClientRects()),St(e.getClientRects()),Sp).getOr(!1),Ue.isAtStart=e=>e?e.isAtStart():!1,Ue.isAtEnd=e=>e?e.isAtEnd():!1,Ue.isTextPosition=e=>e?wt(e.container()):!1,Ue.isElementPosition=e=>!Ue.isTextPosition(e);const vg=(e,t)=>{wt(t)&&t.data.length===0&&e.remove(t)},Kk=(e,t,o)=>{t.insertNode(o),vg(e,o.previousSibling),vg(e,o.nextSibling)},P_=(e,t,o)=>{const s=j.from(o.firstChild),a=j.from(o.lastChild);t.insertNode(o),s.each(c=>vg(e,c.previousSibling)),a.each(c=>vg(e,c.nextSibling))},Cy=(e,t,o)=>{Ld(o)?P_(e,t,o):Kk(e,t,o)},ad=wt,Sy=Rd,Wh=As.nodeIndex,f0=e=>{const t=e.parentNode;return Sy(t)?f0(t):t},m0=e=>e?vi(e.childNodes,(t,o)=>(Sy(o)&&o.nodeName!=="BR"?t=t.concat(m0(o)):t.push(o),t),[]):[],Gk=(e,t)=>{let o=e;for(;(o=o.previousSibling)&&ad(o);)t+=o.data.length;return t},m=e=>t=>e===t,b=e=>{let t,o;t=m0(f0(e)),o=ys(t,m(e),e),t=t.slice(0,o+1);const s=vi(t,(a,c,d)=>(ad(c)&&ad(t[d-1])&&a++,a),0);return t=ni(t,ka([e.nodeName])),o=ys(t,m(e),e),o-s},x=e=>(ad(e)?"text()":e.nodeName.toLowerCase())+"["+b(e)+"]",T=(e,t,o)=>{const s=[];for(let a=t.parentNode;a&&a!==e;a=a.parentNode)s.push(a);return s},M=(e,t)=>{let o=[],s=t.container(),a=t.offset(),c;if(ad(s))c=Gk(s,a);else{const h=s.childNodes;a>=h.length?(c="after",a=h.length-1):c="before",s=h[a]}o.push(x(s));let d=T(e,s);return d=ni(d,pt(Rd)),o=o.concat(bd(d,h=>x(h))),o.reverse().join("/")+","+c},B=(e,t,o)=>{let s=m0(e);return s=ni(s,(a,c)=>!ad(a)||!ad(s[c-1])),s=ni(s,ka([t])),s[o]},U=(e,t)=>{let o=e,s=0;for(;ad(o);){const a=o.data.length;if(t>=s&&t<=s+a){e=o,t=t-s;break}if(!ad(o.nextSibling)){e=o,t=a;break}s+=a,o=o.nextSibling}return ad(e)&&t>e.data.length&&(t=e.data.length),Ue(e,t)},K=(e,t)=>{if(!t)return null;const o=t.split(","),s=o[0].split("/"),a=o.length>1?o[1]:"before",c=vi(s,(d,h)=>{const _=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(h);return _?(_[1]==="text()"&&(_[1]="#text"),B(d,_[1],parseInt(_[2],10))):null},e);if(!c)return null;if(!ad(c)&&c.parentNode){let d;return a==="after"?d=Wh(c)+1:d=Wh(c),Ue(c.parentNode,d)}return U(c,parseInt(a,10))},re=$o,he=(e,t,o)=>{let s=e(t.data.slice(0,o)).length;for(let a=t.previousSibling;a&&wt(a);a=a.previousSibling)s+=e(a.data).length;return s},Se=(e,t,o,s,a)=>{const c=a?s.startContainer:s.endContainer;let d=a?s.startOffset:s.endOffset;const h=[],_=e.getRoot();if(wt(c))h.push(o?he(t,c,d):d);else{let z=0;const I=c.childNodes;d>=I.length&&I.length&&(z=1,d=Math.max(0,I.length-1)),h.push(e.nodeIndex(I[d],o)+z)}for(let z=c;z&&z!==_;z=z.parentNode)h.push(e.nodeIndex(z,o));return h},me=(e,t,o,s)=>{const a=t.dom,c=Se(a,e,o,s,!0),d=t.isForward(),h=Cp(s)?{isFakeCaret:!0}:{};if(t.isCollapsed())return{start:c,forward:d,...h};{const _=Se(a,e,o,s,!1);return{start:c,end:_,forward:d,...h}}},be=(e,t,o)=>{let s=0;return zt.each(e.select(t),a=>{if(a.getAttribute("data-mce-bogus")!=="all"){if(a===o)return!1;s++;return}}),s},_e=(e,t)=>{let o=t?e.startContainer:e.endContainer,s=t?e.startOffset:e.endOffset;if(no(o)&&o.nodeName==="TR"){const a=o.childNodes;o=a[Math.min(t?s:s-1,a.length-1)],o&&(s=t?0:o.childNodes.length,t?e.setStart(o,s):e.setEnd(o,s))}},De=e=>(_e(e,!0),_e(e,!1),e),Re=(e,t)=>{if(no(e)&&(e=fa(e,t),re(e)))return e;if(Bl(e)){wt(e)&&gg(e)&&(e=e.parentNode);let o=e.previousSibling;if(re(o)||(o=e.nextSibling,re(o)))return o}},lt=e=>Re(e.startContainer,e.startOffset)||Re(e.endContainer,e.endOffset),ct=(e,t,o)=>{const s=o.getNode(),a=o.getRng();if(s.nodeName==="IMG"||re(s)){const d=s.nodeName;return{name:d,index:be(o.dom,d,s)}}const c=lt(a);if(c){const d=c.tagName;return{name:d,index:be(o.dom,d,c)}}return me(e,o,t,a)},it=e=>{const t=e.getRng();return{start:M(e.dom.getRoot(),Ue.fromRangeStart(t)),end:M(e.dom.getRoot(),Ue.fromRangeEnd(t)),forward:e.isForward()}},gt=e=>({rng:e.getRng(),forward:e.isForward()}),Nt=(e,t,o)=>{const s={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return o?e.create("span",s,""):e.create("span",s)},Pt=(e,t)=>{const o=e.dom;let s=e.getRng();const a=o.uniqueId(),c=e.isCollapsed(),d=e.getNode(),h=d.nodeName,_=e.isForward();if(h==="IMG")return{name:h,index:be(o,h,d)};const z=De(s.cloneRange());if(!c){z.collapse(!1);const H=Nt(o,a+"_end",t);Cy(o,z,H)}s=De(s),s.collapse(!0);const I=Nt(o,a+"_start",t);return Cy(o,s,I),e.moveToBookmark({id:a,keep:!0,forward:_}),{id:a,forward:_}},Le=(e,t,o=!1)=>t===2?ct(ol,o,e):t===3?it(e):t?gt(e):Pt(e,!1),Jt=Ht(ct,Ao,!0),To=e=>{const t=c=>c(e),o=Ge(e),s=()=>a,a={tag:!0,inner:e,fold:(c,d)=>d(e),isValue:zo,isError:fn,map:c=>Oo.value(c(e)),mapError:s,bind:t,exists:t,forall:t,getOr:o,or:s,getOrThunk:o,orThunk:s,getOrDie:o,each:c=>{c(e)},toOptional:()=>j.some(e)};return a},Xo=e=>{const t=()=>o,o={tag:!1,inner:e,fold:(s,a)=>s(e),isValue:fn,isError:zo,map:t,mapError:s=>Oo.error(s(e)),bind:t,exists:fn,forall:zo,getOr:Ao,or:Ao,getOrThunk:ks,orThunk:ks,getOrDie:$t(String(e)),each:dt,toOptional:j.none};return o},Oo={value:To,error:Xo,fromOption:(e,t)=>e.fold(()=>Xo(t),To)},zn={generate:e=>{if(!ve(e))throw new Error("cases must be an array");if(e.length===0)throw new Error("there must be at least one case");const t=[],o={};return Be(e,(s,a)=>{const c=vt(s);if(c.length!==1)throw new Error("one and only one name per case");const d=c[0],h=s[d];if(o[d]!==void 0)throw new Error("duplicate key detected:"+d);if(d==="cata")throw new Error("cannot have a case named cata (sorry)");if(!ve(h))throw new Error("case arguments must be an array");t.push(d),o[d]=(..._)=>{const z=_.length;if(z!==h.length)throw new Error("Wrong number of arguments to case "+d+". Expected "+h.length+" ("+h+"), got "+z);return{fold:(...H)=>{if(H.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+H.length);return H[a].apply(null,_)},match:H=>{const V=vt(H);if(t.length!==V.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+` +Actual: `+V.join(","));if(!$s(t,le=>mn(V,le)))throw new Error("Not all branches were specified when using match. Specified: "+V.join(", ")+` +Required: `+t.join(", "));return H[d].apply(null,_)},log:H=>{console.log(H,{constructors:t,constructor:d,params:_})}}}}),o}};zn.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const Br=e=>{const t=[],o=[];return Be(e,s=>{s.fold(a=>{t.push(a)},a=>{o.push(a)})}),{errors:t,values:o}},fi=e=>e.type==="inline-command"||e.type==="inline-format",Ba=e=>e.type==="block-command"||e.type==="block-format",sc=(e,t)=>(e.type==="block-command"||e.type==="block-format")&&e.trigger===t,ym=e=>{var t;const o=a=>Oo.error({message:a,pattern:e}),s=(a,c,d)=>{if(e.format!==void 0){let h;if(ve(e.format)){if(!$s(e.format,ft))return o(a+" pattern has non-string items in the `format` array");h=e.format}else if(ft(e.format))h=[e.format];else return o(a+" pattern has non-string `format` parameter");return Oo.value(c(h))}else return e.cmd!==void 0?ft(e.cmd)?Oo.value(d(e.cmd,e.value)):o(a+" pattern has non-string `cmd` parameter"):o(a+" pattern is missing both `format` and `cmd` parameters")};if(!ue(e))return o("Raw pattern is not an object");if(!ft(e.start))return o("Raw pattern is missing `start` parameter");if(e.end!==void 0){if(!ft(e.end))return o("Inline pattern has non-string `end` parameter");if(e.start.length===0&&e.end.length===0)return o("Inline pattern has empty `start` and `end` parameters");let a=e.start,c=e.end;return c.length===0&&(c=a,a=""),s("Inline",d=>({type:"inline-format",start:a,end:c,format:d}),(d,h)=>({type:"inline-command",start:a,end:c,cmd:d,value:h}))}else{if(e.replacement!==void 0)return ft(e.replacement)?e.start.length===0?o("Replacement pattern has empty `start` parameter"):Oo.value({type:"inline-command",start:"",end:e.start,cmd:"mceInsertContent",value:e.replacement}):o("Replacement pattern has non-string `replacement` parameter");{const a=(t=e.trigger)!==null&&t!==void 0?t:"space";return e.start.length===0?o("Block pattern has empty `start` parameter"):s("Block",c=>({type:"block-format",start:e.start,format:c[0],trigger:a}),(c,d)=>({type:"block-command",start:e.start,cmd:c,value:d,trigger:a}))}}},mi=e=>rt(e,Ba),Hd=e=>rt(e,fi),_g=(e,t)=>({inlinePatterns:Hd(e),blockPatterns:mi(e),dynamicPatternsLookup:t}),yf=(e,t)=>({...e,blockPatterns:rt(e.blockPatterns,o=>sc(o,t))}),xg=e=>{const t=Br(dn(e,ym));return Be(t.errors,o=>console.error(o.message,o.pattern)),t.values},Ey=e=>t=>{const o=e(t);return xg(o)},vf=_t().deviceType,I_=vf.isTouch(),j5=As.DOM,U5=e=>{const t=e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(",");return ko(t,(o,s)=>{const a=s.split("="),c=a[0],d=a.length>1?a[1]:c;return o[br(c)]=br(d),o},{})},bT=e=>Ut(e,RegExp),Qt=e=>t=>t.options.get(e),p0=e=>ft(e)||ue(e),Yk=(e,t="")=>o=>{const s=ft(o);if(s)if(o.indexOf("=")!==-1){const a=U5(o);return{value:Gn(a,e.id).getOr(t),valid:s}}else return{value:o,valid:s};else return{valid:!1,message:"Must be a string."}},F_=e=>{const t=e.options.register;t("id",{processor:"string",default:e.id}),t("selector",{processor:"string"}),t("target",{processor:"object"}),t("suffix",{processor:"string"}),t("cache_suffix",{processor:"string"}),t("base_url",{processor:"string"}),t("referrer_policy",{processor:"string",default:""}),t("language_load",{processor:"boolean",default:!0}),t("inline",{processor:"boolean",default:!1}),t("iframe_attrs",{processor:"object",default:{}}),t("doctype",{processor:"string",default:""}),t("document_base_url",{processor:"string",default:e.documentBaseUrl}),t("body_id",{processor:Yk(e,"tinymce"),default:"tinymce"}),t("body_class",{processor:Yk(e),default:""}),t("content_security_policy",{processor:"string",default:""}),t("br_in_pre",{processor:"boolean",default:!0}),t("forced_root_block",{processor:o=>{const s=ft(o)&&Pn(o);return s?{value:o,valid:s}:{valid:!1,message:"Must be a non-empty string."}},default:"p"}),t("forced_root_block_attrs",{processor:"object",default:{}}),t("newline_behavior",{processor:o=>{const s=mn(["block","linebreak","invert","default"],o);return s?{value:o,valid:s}:{valid:!1,message:"Must be one of: block, linebreak, invert or default."}},default:"default"}),t("br_newline_selector",{processor:"string",default:".mce-toc h2,figcaption,caption"}),t("no_newline_selector",{processor:"string",default:""}),t("keep_styles",{processor:"boolean",default:!0}),t("end_container_on_empty_block",{processor:o=>bn(o)?{valid:!0,value:o}:ft(o)?{valid:!0,value:o}:{valid:!1,message:"Must be boolean or a string"},default:"blockquote"}),t("font_size_style_values",{processor:"string",default:"xx-small,x-small,small,medium,large,x-large,xx-large"}),t("font_size_legacy_values",{processor:"string",default:"xx-small,small,medium,large,x-large,xx-large,300%"}),t("font_size_classes",{processor:"string",default:""}),t("automatic_uploads",{processor:"boolean",default:!0}),t("images_reuse_filename",{processor:"boolean",default:!1}),t("images_replace_blob_uris",{processor:"boolean",default:!0}),t("icons",{processor:"string",default:""}),t("icons_url",{processor:"string",default:""}),t("images_upload_url",{processor:"string",default:""}),t("images_upload_base_path",{processor:"string",default:""}),t("images_upload_credentials",{processor:"boolean",default:!1}),t("images_upload_handler",{processor:"function"}),t("language",{processor:"string",default:"en"}),t("language_url",{processor:"string",default:""}),t("entity_encoding",{processor:"string",default:"named"}),t("indent",{processor:"boolean",default:!0}),t("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"}),t("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"}),t("indent_use_margin",{processor:"boolean",default:!1}),t("indentation",{processor:"string",default:"40px"}),t("content_css",{processor:o=>{const s=o===!1||ft(o)||bt(o,ft);return s?ft(o)?{value:dn(o.split(","),br),valid:s}:ve(o)?{value:o,valid:s}:o===!1?{value:[],valid:s}:{value:o,valid:s}:{valid:!1,message:"Must be false, a string or an array of strings."}},default:qh(e)?[]:["default"]}),t("content_style",{processor:"string"}),t("content_css_cors",{processor:"boolean",default:!1}),t("font_css",{processor:o=>{const s=ft(o)||bt(o,ft);return s?{value:ve(o)?o:dn(o.split(","),br),valid:s}:{valid:!1,message:"Must be a string or an array of strings."}},default:[]}),t("inline_boundaries",{processor:"boolean",default:!0}),t("inline_boundaries_selector",{processor:"string",default:"a[href],code,span.mce-annotation"}),t("object_resizing",{processor:o=>{const s=bn(o)||ft(o);return s?o===!1||vf.isiPhone()||vf.isiPad()?{value:"",valid:s}:{value:o===!0?"table,img,figure.image,div,video,iframe":o,valid:s}:{valid:!1,message:"Must be boolean or a string"}},default:!I_}),t("resize_img_proportional",{processor:"boolean",default:!0}),t("event_root",{processor:"string"}),t("service_message",{processor:"string"}),t("theme",{processor:o=>o===!1||ft(o)||Gt(o),default:"silver"}),t("theme_url",{processor:"string"}),t("formats",{processor:"object"}),t("format_empty_lines",{processor:"boolean",default:!1}),t("format_noneditable_selector",{processor:"string",default:""}),t("preview_styles",{processor:o=>{const s=o===!1||ft(o);return s?{value:o===!1?"":o,valid:s}:{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"}),t("custom_ui_selector",{processor:"string",default:""}),t("hidden_input",{processor:"boolean",default:!0}),t("submit_patch",{processor:"boolean",default:!0}),t("encoding",{processor:"string"}),t("add_form_submit_trigger",{processor:"boolean",default:!0}),t("add_unload_trigger",{processor:"boolean",default:!0}),t("custom_undo_redo_levels",{processor:"number",default:0}),t("disable_nodechange",{processor:"boolean",default:!1}),t("readonly",{processor:"boolean",default:!1}),t("editable_root",{processor:"boolean",default:!0}),t("plugins",{processor:"string[]",default:[]}),t("external_plugins",{processor:"object"}),t("forced_plugins",{processor:"string[]"}),t("model",{processor:"string",default:e.hasPlugin("rtc")?"plugin":"dom"}),t("model_url",{processor:"string"}),t("block_unsupported_drop",{processor:"boolean",default:!0}),t("visual",{processor:"boolean",default:!0}),t("visual_table_class",{processor:"string",default:"mce-item-table"}),t("visual_anchor_class",{processor:"string",default:"mce-item-anchor"}),t("iframe_aria_text",{processor:"string",default:"Rich Text Area. Press ALT-0 for help."}),t("setup",{processor:"function"}),t("init_instance_callback",{processor:"function"}),t("url_converter",{processor:"function",default:e.convertURL}),t("url_converter_scope",{processor:"object",default:e}),t("urlconverter_callback",{processor:"function"}),t("allow_conditional_comments",{processor:"boolean",default:!1}),t("allow_html_data_urls",{processor:"boolean",default:!1}),t("allow_svg_data_urls",{processor:"boolean"}),t("allow_html_in_named_anchor",{processor:"boolean",default:!1}),t("allow_script_urls",{processor:"boolean",default:!1}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("convert_fonts_to_spans",{processor:"boolean",default:!0,deprecated:!0}),t("fix_list_elements",{processor:"boolean",default:!1}),t("preserve_cdata",{processor:"boolean",default:!1}),t("remove_trailing_brs",{processor:"boolean",default:!0}),t("pad_empty_with_br",{processor:"boolean",default:!1}),t("inline_styles",{processor:"boolean",default:!0,deprecated:!0}),t("element_format",{processor:"string",default:"html"}),t("entities",{processor:"string"}),t("schema",{processor:"string",default:"html5"}),t("convert_urls",{processor:"boolean",default:!0}),t("relative_urls",{processor:"boolean",default:!0}),t("remove_script_host",{processor:"boolean",default:!0}),t("custom_elements",{processor:p0}),t("extended_valid_elements",{processor:"string"}),t("invalid_elements",{processor:"string"}),t("invalid_styles",{processor:p0}),t("valid_children",{processor:"string"}),t("valid_classes",{processor:p0}),t("valid_elements",{processor:"string"}),t("valid_styles",{processor:p0}),t("verify_html",{processor:"boolean",default:!0}),t("auto_focus",{processor:o=>ft(o)||o===!0}),t("browser_spellcheck",{processor:"boolean",default:!1}),t("protect",{processor:"array"}),t("images_file_types",{processor:"string",default:"jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp"}),t("deprecation_warnings",{processor:"boolean",default:!0}),t("a11y_advanced_options",{processor:"boolean",default:!1}),t("api_key",{processor:"string"}),t("license_key",{processor:"string"}),t("paste_block_drop",{processor:"boolean",default:!1}),t("paste_data_images",{processor:"boolean",default:!0}),t("paste_preprocess",{processor:"function"}),t("paste_postprocess",{processor:"function"}),t("paste_webkit_styles",{processor:"string",default:"none"}),t("paste_remove_styles_if_webkit",{processor:"boolean",default:!0}),t("paste_merge_formats",{processor:"boolean",default:!0}),t("smart_paste",{processor:"boolean",default:!0}),t("paste_as_text",{processor:"boolean",default:!1}),t("paste_tab_spaces",{processor:"number",default:4}),t("text_patterns",{processor:o=>bt(o,ue)||o===!1?{value:xg(o===!1?[]:o),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"}]}),t("text_patterns_lookup",{processor:o=>Gt(o)?{value:Ey(o),valid:!0}:{valid:!1,message:"Must be a single function"},default:o=>[]}),t("noneditable_class",{processor:"string",default:"mceNonEditable"}),t("editable_class",{processor:"string",default:"mceEditable"}),t("noneditable_regexp",{processor:o=>bt(o,bT)?{value:o,valid:!0}:bT(o)?{value:[o],valid:!0}:{valid:!1,message:"Must be a RegExp or an array of RegExp."},default:[]}),t("table_tab_navigation",{processor:"boolean",default:!0}),t("highlight_on_focus",{processor:"boolean",default:!0}),t("xss_sanitization",{processor:"boolean",default:!0}),t("details_initial_state",{processor:o=>{const s=mn(["inherited","collapsed","expanded"],o);return s?{value:o,valid:s}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),t("details_serialized_state",{processor:o=>{const s=mn(["inherited","collapsed","expanded"],o);return s?{value:o,valid:s}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),t("init_content_sync",{processor:"boolean",default:!1}),t("newdocument_content",{processor:"string",default:""}),t("sandbox_iframes",{processor:"boolean",default:!0}),t("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"]}),t("convert_unsafe_embeds",{processor:"boolean",default:!0}),e.on("ScriptsLoaded",()=>{t("directionality",{processor:"string",default:Rc.isRtl()?"rtl":void 0}),t("placeholder",{processor:"string",default:j5.getAttrib(e.getElement(),"placeholder")})})},nl=Qt("iframe_attrs"),zu=Qt("doctype"),id=Qt("document_base_url"),H_=Qt("body_id"),Xk=Qt("body_class"),yT=Qt("content_security_policy"),Jk=Qt("br_in_pre"),Vi=Qt("forced_root_block"),g0=Qt("forced_root_block_attrs"),Qk=Qt("newline_behavior"),vT=Qt("br_newline_selector"),_T=Qt("no_newline_selector"),e2=Qt("keep_styles"),t2=Qt("end_container_on_empty_block"),Ts=Qt("automatic_uploads"),Tp=Qt("images_reuse_filename"),xT=Qt("images_replace_blob_uris"),o2=Qt("icons"),wT=Qt("icons_url"),n2=Qt("images_upload_url"),kT=Qt("images_upload_base_path"),s2=Qt("images_upload_credentials"),Z5=Qt("images_upload_handler"),CT=Qt("content_css_cors"),h0=Qt("referrer_policy"),r2=Qt("language"),W5=Qt("language_url"),ST=Qt("indent_use_margin"),ld=Qt("indentation"),pl=Qt("content_css"),Ay=Qt("content_style"),ET=Qt("font_css"),q5=Qt("directionality"),In=Qt("inline_boundaries_selector"),AT=Qt("object_resizing"),TT=Qt("resize_img_proportional"),a2=Qt("placeholder"),OT=Qt("event_root"),K5=Qt("service_message"),Ty=Qt("theme"),G5=Qt("theme_url"),b0=Qt("model"),i2=Qt("model_url"),Oy=Qt("inline_boundaries"),Y5=Qt("formats"),X5=Qt("preview_styles"),J5=Qt("format_empty_lines"),Fo=Qt("format_noneditable_selector"),zT=Qt("custom_ui_selector"),qh=Qt("inline"),l2=Qt("hidden_input"),NT=Qt("submit_patch"),DT=Qt("add_form_submit_trigger"),RT=Qt("add_unload_trigger"),MT=Qt("custom_undo_redo_levels"),Q5=Qt("disable_nodechange"),LT=Qt("readonly"),ss=Qt("editable_root"),BT=Qt("content_css_cors"),Nu=Qt("plugins"),vm=Qt("external_plugins"),$_=Qt("block_unsupported_drop"),Pc=Qt("visual"),V_=Qt("visual_table_class"),zy=Qt("visual_anchor_class"),y0=Qt("iframe_aria_text"),Ny=Qt("setup"),eM=Qt("init_instance_callback"),tM=Qt("urlconverter_callback"),oM=Qt("auto_focus"),nM=Qt("browser_spellcheck"),jn=Qt("protect"),_f=Qt("paste_block_drop"),_m=Qt("paste_data_images"),sM=Qt("paste_preprocess"),v0=Qt("paste_postprocess"),qn=Qt("newdocument_content"),PT=Qt("paste_webkit_styles"),c2=Qt("paste_remove_styles_if_webkit"),rM=Qt("paste_merge_formats"),Kh=Qt("smart_paste"),Gh=Qt("paste_as_text"),IT=Qt("paste_tab_spaces"),aM=Qt("allow_html_data_urls"),iM=Qt("text_patterns"),_0=Qt("text_patterns_lookup"),Yh=Qt("noneditable_class"),lM=Qt("editable_class"),FT=Qt("noneditable_regexp"),cM=Qt("preserve_cdata"),HT=Qt("highlight_on_focus"),$T=Qt("xss_sanitization"),VT=Qt("init_content_sync"),d2=e=>e.options.isSet("text_patterns_lookup"),u2=e=>zt.explode(e.options.get("font_size_style_values")),f2=e=>zt.explode(e.options.get("font_size_classes")),jT=e=>e.options.get("encoding")==="xml",m2=e=>zt.explode(e.options.get("images_file_types")),UT=Qt("table_tab_navigation"),j_=Qt("details_initial_state"),ZT=Qt("details_serialized_state"),p2=Qt("sandbox_iframes"),U_=e=>e.options.get("sandbox_iframes_exclusions"),WT=Qt("convert_unsafe_embeds"),qT=Qt("license_key"),KT=Qt("api_key"),dM=no,GT=wt,x0=e=>{const t=e.parentNode;t&&t.removeChild(e)},g2=e=>{const t=ol(e);return{count:e.length-t.length,text:t}},h2=e=>{let t;for(;(t=e.data.lastIndexOf(ua))!==-1;)e.deleteData(t,1)},b2=(e,t)=>(wg(e),t),uM=(e,t)=>{const o=g2(e.data.substr(0,t.offset())),s=g2(e.data.substr(t.offset()));return(o.text+s.text).length>0?(h2(e),Ue(e,t.offset()-o.count)):t},fM=(e,t)=>{const o=t.container(),s=Wi(an(o.childNodes),e).map(a=>aGT(e)&&t.container()===e?uM(e,t):b2(e,t),pM=(e,t)=>t.container()===e.parentNode?fM(e,t):b2(e,t),gM=(e,t)=>Ue.isTextPosition(t)?mM(e,t):pM(e,t),wg=e=>{dM(e)&&Bl(e)&&(my(e)?e.removeAttribute("data-mce-caret"):x0(e)),GT(e)&&(h2(e),e.data.length===0&&x0(e))},YT=$o,Z_=Xe,hM=Qu,y2="*[contentEditable=false],video,audio,embed,object",XT=(e,t,o)=>{const s=Ih(t.getBoundingClientRect(),o);let a,c;if(e.tagName==="BODY"){const h=e.ownerDocument.documentElement;a=e.scrollLeft||h.scrollLeft,c=e.scrollTop||h.scrollTop}else{const h=e.getBoundingClientRect();a=e.scrollLeft-h.left,c=e.scrollTop-h.top}s.left+=a,s.right+=a,s.top+=c,s.bottom+=c,s.width=1;let d=t.offsetWidth-t.clientWidth;return d>0&&(o&&(d*=-1),s.left+=d,s.right+=d),s},JT=e=>{var t,o;const s=Mr(ye.fromDom(e),y2);for(let a=0;a{const a=Jr();let c,d;const h=Vi(e),_=e.dom,z=(oe,fe)=>{let ke;if(I(),hM(fe))return null;if(o(fe)){const Oe=N_(h,fe,oe),Ae=XT(t,fe,oe);_.setStyle(Oe,"top",Ae.top),_.setStyle(Oe,"caret-color","transparent"),d=Oe;const Pe=_.create("div",{class:"mce-visual-caret","data-mce-bogus":"all"});_.setStyles(Pe,{...Ae}),_.add(t,Pe),a.set({caret:Pe,element:fe,before:oe}),oe&&_.addClass(Pe,"mce-visual-caret-before"),H(),ke=fe.ownerDocument.createRange(),ke.setStart(Oe,0),ke.setEnd(Oe,0)}else return d=py(fe,oe),ke=fe.ownerDocument.createRange(),w0(d.nextSibling)?(ke.setStart(d,0),ke.setEnd(d,0)):(ke.setStart(d,1),ke.setEnd(d,1)),ke;return ke},I=()=>{JT(t),d&&(wg(d),d=null),a.on(oe=>{_.remove(oe.caret),a.clear()}),c&&(clearInterval(c),c=void 0)},H=()=>{c=setInterval(()=>{a.on(oe=>{s()?_.toggleClass(oe.caret,"mce-visual-caret-hidden"):_.addClass(oe.caret,"mce-visual-caret-hidden")})},500)};return{show:z,hide:I,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:()=>{a.on(oe=>{const fe=XT(t,oe.element,oe.before);_.setStyles(oe.caret,{...fe})})},destroy:()=>clearInterval(c)}},v2=()=>Jo.browser.isFirefox(),w0=e=>YT(e)||Z_(e),k0=e=>(w0(e)||ec(e)&&v2())&&Td(ye.fromDom(e)).exists(js),W_=Rl,q_=$o,e4=Xe,_2=Nl("display","block table table-cell table-caption list-item"),x2=Bl,t4=gg,bM=no,K_=wt,o4=sd,Xh=e=>e>0,Jh=e=>e<0,G_=(e,t)=>{let o;for(;o=e(t);)if(!t4(o))return o;return null},C0=(e,t,o,s,a)=>{const c=new Ma(e,s),d=q_(e)||t4(e);let h;if(Jh(t)){if(d&&(h=G_(c.prev.bind(c),!0),o(h)))return h;for(;h=G_(c.prev.bind(c),a);)if(o(h))return h}if(Xh(t)){if(d&&(h=G_(c.next.bind(c),!0),o(h)))return h;for(;h=G_(c.next.bind(c),a);)if(o(h))return h}return null},yM=(e,t)=>{const o=a=>W_(a.dom),s=a=>a.dom===t;return ii(ye.fromDom(e),o,s).map(a=>a.dom).getOr(t)},kg=(e,t)=>{for(;e&&e!==t;){if(_2(e))return e;e=e.parentNode}return null},xm=(e,t,o)=>kg(e.container(),o)===kg(t.container(),o),Y_=(e,t)=>{if(!t)return j.none();const o=t.container(),s=t.offset();return bM(o)?j.from(o.childNodes[s+e]):j.none()},n4=(e,t)=>{var o;const a=((o=t.ownerDocument)!==null&&o!==void 0?o:document).createRange();return e?(a.setStartBefore(t),a.setEndBefore(t)):(a.setStartAfter(t),a.setEndAfter(t)),a},s4=(e,t,o)=>kg(t,e)===kg(o,e),w2=(e,t,o)=>{const s=e?"previousSibling":"nextSibling";let a=o;for(;a&&a!==t;){let c=a[s];if(c&&x2(c)&&(c=c[s]),q_(c)||e4(c)){if(s4(t,c,a))return c;break}if(o4(c))break;a=a.parentNode}return null},S0=Ht(n4,!0),E0=Ht(n4,!1),k2=(e,t,o)=>{let s;const a=Ht(w2,!0,t),c=Ht(w2,!1,t),d=o.startContainer,h=o.startOffset;if(gg(d)){const _=K_(d)?d.parentNode:d,z=_.getAttribute("data-mce-caret");if(z==="before"&&(s=_.nextSibling,k0(s)))return S0(s);if(z==="after"&&(s=_.previousSibling,k0(s)))return E0(s)}if(!o.collapsed)return o;if(wt(d)){if(x2(d)){if(e===1){if(s=c(d),s)return S0(s);if(s=a(d),s)return E0(s)}if(e===-1){if(s=a(d),s)return E0(s);if(s=c(d),s)return S0(s)}return o}if(Ou(d)&&h>=d.data.length-1)return e===1&&(s=c(d),s)?S0(s):o;if(Bh(d)&&h<=1)return e===-1&&(s=a(d),s)?E0(s):o;if(h===d.data.length)return s=c(d),s?S0(s):o;if(h===0)return s=a(d),s?E0(s):o}return o},r4=(e,t)=>Y_(e?0:-1,t).filter(q_),A0=(e,t,o)=>{const s=k2(e,t,o);return e===-1?Ue.fromRangeStart(s):Ue.fromRangeEnd(s)},X_=e=>j.from(e.getNode()).map(ye.fromDom),vM=e=>j.from(e.getNode(!0)).map(ye.fromDom),C2=(e,t)=>{let o=t;for(;o=e(o);)if(o.isVisible())return o;return o},J_=(e,t)=>{const o=xm(e,t);return!o&&Hs(e.getNode())?!0:o};var Ti;(function(e){e[e.Backwards=-1]="Backwards",e[e.Forwards=1]="Forwards"})(Ti||(Ti={}));const _M=$o,wm=wt,a4=no,po=Hs,Qh=sd,S2=yg,Q_=$h,E2=(e,t)=>{const o=[];let s=e;for(;s&&s!==t;)o.push(s),s=s.parentNode;return o},i4=(e,t)=>e.hasChildNodes()&&t{if(Xh(e)){if(Qh(t.previousSibling)&&!wm(t.previousSibling))return Ue.before(t);if(wm(t))return Ue(t,0)}if(Jh(e)){if(Qh(t.nextSibling)&&!wm(t.nextSibling))return Ue.after(t);if(wm(t))return Ue(t,t.data.length)}return Jh(e)?po(t)?Ue.before(t):Ue.after(t):Ue.before(t)},l4=(e,t)=>{const o=t.nextSibling;return o&&Qh(o)?wm(o)?Ue(o,0):Ue.before(o):A2(Ti.Forwards,Ue.after(t),e)},A2=(e,t,o)=>{let s,a,c,d;if(!a4(o)||!t)return null;if(t.isEqual(Ue.after(o))&&o.lastChild){if(d=Ue.after(o.lastChild),Jh(e)&&Qh(o.lastChild)&&a4(o.lastChild))return po(o.lastChild)?Ue.before(o.lastChild):d}else d=t;const h=d.container();let _=d.offset();if(wm(h)){if(Jh(e)&&_>0)return Ue(h,--_);if(Xh(e)&&_0&&(a=i4(h,_-1),Qh(a)))return!S2(a)&&(c=C0(a,e,Q_,a),c)?wm(c)?Ue(c,c.data.length):Ue.after(c):wm(a)?Ue(a,a.data.length):Ue.before(a);if(Xh(e)&&_({next:t=>A2(Ti.Forwards,t,e),prev:t=>A2(Ti.Backwards,t,e)}),en=(e,t,o)=>{const s=e?Ue.before(o):Ue.after(o);return cd(e,t,s)},c4=e=>Hs(e)?Ue.before(e):Ue.after(e),d4=e=>Ue.isTextPosition(e)?e.offset()===0:sd(e.getNode()),u4=e=>{if(Ue.isTextPosition(e)){const t=e.container();return e.offset()===t.data.length}else return sd(e.getNode(!0))},f4=(e,t)=>!Ue.isTextPosition(e)&&!Ue.isTextPosition(t)&&e.getNode()===t.getNode(!0),Po=e=>!Ue.isTextPosition(e)&&Hs(e.getNode()),O0=(e,t,o)=>e?!f4(t,o)&&!Po(t)&&u4(t)&&d4(o):!f4(o,t)&&d4(t)&&u4(o),cd=(e,t,o)=>{const s=So(t);return j.from(e?s.next(o):s.prev(o))},eb=(e,t,o)=>cd(e,t,o).bind(s=>xm(o,s,t)&&O0(e,o,s)?cd(e,t,s):j.some(s)),m4=(e,t,o,s)=>eb(e,t,o).bind(a=>s(a)?m4(e,t,a,s):j.some(a)),Dy=(e,t)=>{const o=e?t.firstChild:t.lastChild;return wt(o)?j.some(Ue(o,e?0:o.data.length)):o?sd(o)?j.some(e?Ue.before(o):c4(o)):en(e,t,o):j.none()},Pl=Ht(cd,!0),Ic=Ht(cd,!1),No=Ht(Dy,!0),$d=Ht(Dy,!1),Ry="_mce_caret",dd=e=>no(e)&&e.id===Ry,Cg=(e,t)=>{let o=t;for(;o&&o!==e;){if(dd(o))return o;o=o.parentNode}return null},p4=e=>ft(e.start),g4=e=>Ro(e,"rng"),h4=e=>Ro(e,"id"),T2=e=>Ro(e,"name"),b4=e=>zt.isArray(e.start),ex=e=>!T2(e)&&bn(e.forward)?e.forward:!0,y4=(e,t)=>(no(t)&&e.isBlock(t)&&!t.innerHTML&&(t.innerHTML='
'),t),xM=(e,t)=>{const o=j.from(K(e.getRoot(),t.start)),s=j.from(K(e.getRoot(),t.end));return va(o,s,(a,c)=>{const d=e.createRng();return d.setStart(a.container(),a.offset()),d.setEnd(c.container(),c.offset()),{range:d,forward:ex(t)}})},wM=(e,t)=>{var o;const a=((o=e.ownerDocument)!==null&&o!==void 0?o:document).createTextNode(ua);e.appendChild(a),t.setStart(a,0),t.setEnd(a,0)},O2=e=>!e.hasChildNodes(),z2=(e,t)=>$d(e).fold(fn,o=>(t.setStart(o.container(),o.offset()),t.setEnd(o.container(),o.offset()),!0)),v4=(e,t,o)=>O2(t)&&Cg(e,t)?(wM(t,o),!0):!1,_4=(e,t,o,s)=>{const a=o[t?"start":"end"],c=e.getRoot();if(a){let d=c,h=a[0];for(let _=a.length-1;d&&_>=1;_--){const z=d.childNodes;if(v4(c,d,s))return!0;if(a[_]>z.length-1)return v4(c,d,s)?!0:z2(d,s);d=z[a[_]]}wt(d)&&(h=Math.min(a[0],d.data.length)),no(d)&&(h=Math.min(a[0],d.childNodes.length)),t?s.setStart(d,h):s.setEnd(d,h)}return!0},N2=e=>wt(e)&&e.data.length>0,x4=(e,t,o)=>{const s=e.get(o.id+"_"+t),a=s==null?void 0:s.parentNode,c=o.keep;if(s&&a){let d,h;if(t==="start"?c?s.hasChildNodes()?(d=s.firstChild,h=1):N2(s.nextSibling)?(d=s.nextSibling,h=0):N2(s.previousSibling)?(d=s.previousSibling,h=s.previousSibling.data.length):(d=a,h=e.nodeIndex(s)+1):(d=a,h=e.nodeIndex(s)):c?s.hasChildNodes()?(d=s.firstChild,h=1):N2(s.previousSibling)?(d=s.previousSibling,h=s.previousSibling.data.length):(d=a,h=e.nodeIndex(s)):(d=a,h=e.nodeIndex(s)),!c){const _=s.previousSibling,z=s.nextSibling;zt.each(zt.grep(s.childNodes),H=>{wt(H)&&(H.data=H.data.replace(/\uFEFF/g,""))});let I;for(;I=e.get(o.id+"_"+t);)e.remove(I,!0);if(wt(z)&&wt(_)&&!Jo.browser.isOpera()){const H=_.data.length;_.appendData(z.data),e.remove(z),d=_,h=H}}return j.some(Ue(d,h))}else return j.none()},w4=(e,t)=>{const o=e.createRng();return _4(e,!0,t,o)&&_4(e,!1,t,o)?j.some({range:o,forward:ex(t)}):j.none()},tb=(e,t)=>{const o=x4(e,"start",t),s=x4(e,"end",t);return va(o,s.or(o),(a,c)=>{const d=e.createRng();return d.setStart(y4(e,a.container()),a.offset()),d.setEnd(y4(e,c.container()),c.offset()),{range:d,forward:ex(t)}})},k4=(e,t)=>j.from(e.select(t.name)[t.index]).map(o=>{const s=e.createRng();return s.selectNode(o),{range:s,forward:!0}}),C4=(e,t)=>{const o=e.dom;if(t){if(b4(t))return w4(o,t);if(p4(t))return xM(o,t);if(h4(t))return tb(o,t);if(T2(t))return k4(o,t);if(g4(t))return j.some({range:t.rng,forward:ex(t)})}return j.none()},kM=(e,t,o)=>Le(e,t,o),CM=(e,t)=>{C4(e,t).each(({range:o,forward:s})=>{e.setRng(o,s)})},ud=e=>no(e)&&e.tagName==="SPAN"&&e.getAttribute("data-mce-type")==="bookmark",ji=(e=>t=>e===t)(da),ob=e=>e!==""&&` \f +\r \v`.indexOf(e)!==-1,Op=e=>!ob(e)&&!ji(e)&&!Jc(e),or=e=>{const t=[];if(e)for(let o=0;oBn(e,t=>{const o=bg(t);return o?[ye.fromDom(o)]:[]}),z0=e=>or(e).length>1,tx=e=>rt(Vd(e),Mc),My=e=>Mr(e,"td[data-mce-selected],th[data-mce-selected]"),S4=(e,t)=>{const o=My(t);return o.length>0?o:tx(e)},xf=e=>S4(or(e.selection.getSel()),ye.fromDom(e.getBody())),fs=(e,t)=>El(e,"table",t),N0=e=>{const t=e.startContainer,o=e.startOffset;return wt(t)?o===0?j.some(ye.fromDom(t)):j.none():j.from(t.childNodes[o]).map(ye.fromDom)},E4=e=>{const t=e.endContainer,o=e.endOffset;return wt(t)?o===t.data.length?j.some(ye.fromDom(t)):j.none():j.from(t.childNodes[o-1]).map(ye.fromDom)},D2=e=>Pi(e).fold(Ge([e]),t=>[e].concat(D2(t))),D0=e=>wc(e).fold(Ge([e]),t=>En(t)==="br"?Ur(t).map(o=>[e].concat(D0(o))).getOr([]):[e].concat(D0(t))),R0=(e,t)=>va(N0(t),E4(t),(o,s)=>{const a=On(D2(e),Ht(kn,o)),c=On(D0(e),Ht(kn,s));return a.isSome()&&c.isSome()}).getOr(!1),M0=(e,t,o,s)=>{const a=o,c=new Ma(o,a),d=Mi(e.schema.getMoveCaretBeforeOnEnterElements(),(_,z)=>!mn(["td","th","table"],z.toLowerCase()));let h=o;do{if(wt(h)&&zt.trim(h.data).length!==0){s?t.setStart(h,0):t.setEnd(h,h.data.length);return}if(d[h.nodeName]){s?t.setStartBefore(h):h.nodeName==="BR"?t.setEndBefore(h):t.setEndAfter(h);return}}while(h=s?c.next():c.prev());a.nodeName==="BODY"&&(s?t.setStart(a,0):t.setEnd(a,a.childNodes.length))},Ly=e=>{const t=e.selection.getSel();return Fe(t)&&t.rangeCount>0},By=(e,t)=>{const o=xf(e);o.length>0?Be(o,s=>{const a=s.dom,c=e.dom.createRng();c.setStartBefore(a),c.setEndAfter(a),t(c,!0)}):t(e.selection.getRng(),!1)},ox=(e,t,o)=>{const s=Pt(e,t);o(s),e.moveToBookmark(s)},Py=e=>D(e==null?void 0:e.nodeType),nx=e=>no(e)&&!ud(e)&&!dd(e)&&!Rd(e),A4=(e,t)=>{if(nx(t)&&!/^(TD|TH)$/.test(t.nodeName)){const o=e.getAttrib(t,"data-mce-selected"),s=parseInt(o,10);return!isNaN(s)&&s>0}else return!1},R2=(e,t,o)=>{const{selection:s,dom:a}=e,c=s.getNode(),d=$o(c);ox(s,!0,()=>{t()}),d&&$o(c)&&a.isChildOf(c,e.getBody())?e.selection.select(c):o(s.getStart())&&T4(a,s)},T4=(e,t)=>{var o,s;const a=t.getRng(),{startContainer:c,startOffset:d}=a,h=t.getNode();if(!A4(e,h)&&no(c)){const _=c.childNodes,z=e.getRoot();let I;if(d<_.length){const H=_[d];I=new Ma(H,(o=e.getParent(H,e.isBlock))!==null&&o!==void 0?o:z)}else{const H=_[_.length-1];I=new Ma(H,(s=e.getParent(H,e.isBlock))!==null&&s!==void 0?s:z),I.next(!0)}for(let H=I.current();H;H=I.next()){if(e.getContentEditable(H)==="false")return;if(wt(H)&&!M2(H)){a.setStart(H,0),t.setRng(a);return}}}},nb=(e,t,o)=>{if(e){const s=t?"nextSibling":"previousSibling";for(e=e[s];e;e=e[s])if(no(e)||!M2(e))return e}},sx=(e,t)=>!!e.getTextBlockElements()[t.nodeName.toLowerCase()]||Oc(e,t),Sg=(e,t,o)=>e.schema.isValidChild(t,o),M2=(e,t=!1)=>{if(Fe(e)&&wt(e)){const o=t?e.data.replace(/ /g," "):e.data;return Ii(o)}else return!1},EM=e=>Fe(e)&&wt(e)&&e.length===0,O4=(e,t)=>{const o="[data-mce-cef-wrappable]",s=Fo(e),a=wi(s)?o:`${o},${s}`;return ls(ye.fromDom(t),a)},L2=(e,t)=>{const o=e.dom;return nx(t)&&o.getContentEditable(t)==="false"&&O4(e,t)&&o.select('[contenteditable="true"]',t).length===0},zp=(e,t)=>Gt(e)?e(t):(Fe(t)&&(e=e.replace(/%(\w+)/g,(o,s)=>t[s]||o)),e),Iy=(e,t)=>(e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()),rx=(e,t)=>{if(uo(e))return null;{let o=String(e);return(t==="color"||t==="backgroundColor")&&(o=_h(o)),t==="fontWeight"&&e===700&&(o="bold"),t==="fontFamily"&&(o=o.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),o}},L0=(e,t,o)=>{const s=e.getStyle(t,o);return rx(s,o)},B2=(e,t)=>{let o;return e.getParent(t,s=>no(s)?(o=e.getStyle(s,"text-decoration"),!!o&&o!=="none"):!1),o},B0=(e,t,o)=>e.getParents(t,o,e.getRoot()),ax=(e,t,o)=>{const s=e.formatter.get(t);return Fe(s)&&Ln(s,o)},z4=(e,t)=>ax(e,t,s=>{const a=c=>Gt(c)||c.length>1&&c.charAt(0)==="%";return Ln(["styles","attributes"],c=>Gn(s,c).exists(d=>{const h=ve(d)?d:yl(d);return Ln(h,a)}))}),N4=(e,t,o)=>{const s=["inline","block","selector","attributes","styles","classes"],a=c=>Mi(c,(d,h)=>Ln(s,_=>_===h));return ax(e,t,c=>{const d=a(c);return ax(e,o,h=>{const _=a(h);return Hr(d,_)})})},wf=e=>Ha(e,"block"),D4=e=>wf(e)&&e.wrapper===!0,R4=e=>wf(e)&&e.wrapper!==!0,Fc=e=>Ha(e,"selector"),Ja=e=>Ha(e,"inline"),M4=e=>Fc(e)&&Ja(e)&&xd(Gn(e,"mixed"),!0),ix=e=>Fc(e)&&e.expand!==!1&&!Ja(e),L4=e=>{const t=[];let o=e;for(;o;){if(wt(o)&&o.data!==ua||o.childNodes.length>1)return[];no(o)&&t.push(o),o=o.firstChild}return t},P2=e=>L4(e).length>0,lx=e=>dd(e.dom)&&P2(e.dom),Eg=ud,P0=B0,cx=M2,dx=sx,B4=e=>Hs(e)&&e.getAttribute("data-mce-bogus")&&!e.nextSibling,I0=(e,t)=>{let o=t;for(;o;){if(no(o)&&e.getContentEditable(o))return e.getContentEditable(o)==="false"?o:t;o=o.parentNode}return t},ux=(e,t,o,s)=>{const a=t.data;if(e){for(let c=o;c>0;c--)if(s(a.charAt(c-1)))return c}else for(let c=o;cux(e,t,o,s=>ji(s)||ob(s)),I2=(e,t,o)=>ux(e,t,o,Op),F2=(e,t,o,s,a,c)=>{let d;const h=e.getParent(o,e.isBlock)||t,_=(I,H,V)=>{const ee=Su(e),le=a?ee.backwards:ee.forwards;return j.from(le(I,H,(oe,fe)=>Eg(oe.parentNode)?-1:(d=oe,V(a,oe,fe)),h))};return _(o,s,F0).bind(I=>c?_(I.container,I.offset+(a?-1:0),I2):j.some(I)).orThunk(()=>d?j.some({container:d,offset:a?0:d.length}):j.none())},sb=(e,t,o,s,a)=>{const c=s[a];wt(s)&&wi(s.data)&&c&&(s=c);const d=P0(e,s);for(let h=0;h{var a;let c=o;const d=e.getRoot(),h=t[0];if(wf(h)&&(c=h.wrapper?null:e.getParent(o,h.block,d)),!c){const _=(a=e.getParent(o,"LI,TD,TH,SUMMARY"))!==null&&a!==void 0?a:d;c=e.getParent(wt(o)?o.parentNode:o,z=>z!==d&&dx(e.schema,z),_)}if(c&&wf(h)&&h.wrapper&&(c=P0(e,c,"ul,ol").reverse()[0]||c),!c)for(c=o;c&&c[s]&&!e.isBlock(c[s])&&(c=c[s],!Iy(c,"br")););return c||o},mx=(e,t,o,s)=>{const a=o.parentNode;return Fe(o[s])?!1:a===t||uo(a)||e.isBlock(a)?!0:mx(e,t,a,s)},Np=(e,t,o,s,a)=>{let c=o;const d=a?"previousSibling":"nextSibling",h=e.getRoot();if(wt(o)&&!cx(o)&&(a?s>0:sEg(e.parentNode)||Eg(e),Ag=(e,t,o,s=!1)=>{let{startContainer:a,startOffset:c,endContainer:d,endOffset:h}=t;const _=o[0];return no(a)&&a.hasChildNodes()&&(a=fa(a,c),wt(a)&&(c=0)),no(d)&&d.hasChildNodes()&&(d=fa(d,t.collapsed?h:h-1),wt(d)&&(h=d.data.length)),a=I0(e,a),d=I0(e,d),Dp(a)&&(a=Eg(a)?a:a.parentNode,t.collapsed?a=a.previousSibling||a:a=a.nextSibling||a,wt(a)&&(c=t.collapsed?a.length:0)),Dp(d)&&(d=Eg(d)?d:d.parentNode,t.collapsed?d=d.nextSibling||d:d=d.previousSibling||d,wt(d)&&(h=t.collapsed?0:d.length)),t.collapsed&&(F2(e,e.getRoot(),a,c,!0,s).each(({container:H,offset:V})=>{a=H,c=V}),F2(e,e.getRoot(),d,h,!1,s).each(({container:H,offset:V})=>{d=H,h=V})),(Ja(_)||_.block_expand)&&((!Ja(_)||!wt(a)||c===0)&&(a=Np(e,o,a,c,!0)),(!Ja(_)||!wt(d)||h===d.data.length)&&(d=Np(e,o,d,h,!1))),ix(_)&&(a=sb(e,o,t,a,"previousSibling"),d=sb(e,o,t,d,"nextSibling")),(wf(_)||Fc(_))&&(a=fx(e,o,a,"previousSibling"),d=fx(e,o,d,"nextSibling"),wf(_)&&(e.isBlock(a)||(a=Np(e,o,a,c,!0),wt(a)&&(c=0)),e.isBlock(d)||(d=Np(e,o,d,h,!1),wt(d)&&(h=d.data.length)))),no(a)&&a.parentNode&&(c=e.nodeIndex(a),a=a.parentNode),no(d)&&d.parentNode&&(h=e.nodeIndex(d)+1,d=d.parentNode),{startContainer:a,startOffset:c,endContainer:d,endOffset:h}},H0=(e,t,o)=>{var s;const a=t.startOffset,c=fa(t.startContainer,a),d=t.endOffset,h=fa(t.endContainer,d-1),_=fe=>{const ke=fe[0];wt(ke)&&ke===c&&a>=ke.data.length&&fe.splice(0,1);const Oe=fe[fe.length-1];return d===0&&fe.length>0&&Oe===h&&wt(Oe)&&fe.splice(fe.length-1,1),fe},z=(fe,ke,Oe)=>{const Ae=[];for(;fe&&fe!==Oe;fe=fe[ke])Ae.push(fe);return Ae},I=(fe,ke)=>e.getParent(fe,Oe=>Oe.parentNode===ke,ke),H=(fe,ke,Oe)=>{const Ae=Oe?"nextSibling":"previousSibling";for(let Pe=fe,ht=Pe.parentNode;Pe&&Pe!==ke;Pe=ht){ht=Pe.parentNode;const Mt=z(Pe===fe?Pe:Pe[Ae],Ae);Mt.length&&(Oe||Mt.reverse(),o(_(Mt)))}};if(c===h)return o(_([c]));const V=(s=e.findCommonAncestor(c,h))!==null&&s!==void 0?s:e.getRoot();if(e.isChildOf(c,h))return H(c,V,!0);if(e.isChildOf(h,c))return H(h,V);const ee=I(c,V)||c,le=I(h,V)||h;H(c,ee,!0);const oe=z(ee===c?ee:ee.nextSibling,"nextSibling",le===h?le.nextSibling:le);oe.length&&o(_(oe)),H(h,le)},AM=['pre[class*=language-][contenteditable="false"]',"figure.image","div[data-ephox-embed-iri]","div.tiny-pageembed","div.mce-toc","div[data-mce-toc]"],P4=e=>Rs(e)&&fm(e)===ua,I4=(e,t,o,s)=>ia(t).fold(()=>"skipping",a=>s==="br"||P4(t)?"valid":Y1(t)?"existing":dd(t.dom)?"caret":Ln(AM,c=>ls(t,c))?"valid-block":!Sg(e,o,s)||!Sg(e,En(a),o)?"invalid-child":"valid"),Tg=(e,t)=>{const o=Ag(e.dom,t,[{inline:"span"}]);t.setStart(o.startContainer,o.startOffset),t.setEnd(o.endContainer,o.endOffset),e.selection.setRng(t)},Og=(e,t,o,s,a,c)=>{const{uid:d=t,...h}=o;ql(e,mr()),Rr(e,`${Lr()}`,d),Rr(e,`${pr()}`,s);const{attributes:_={},classes:z=[]}=a(d,h);if($a(e,_),Eh(e,z),c){z.length>0&&Rr(e,`${ir()}`,z.join(","));const I=vt(_);I.length>0&&Rr(e,`${Ar()}`,I.join(","))}},Oi=e=>{Ra(e,mr()),rn(e,`${Lr()}`),rn(e,`${pr()}`),rn(e,`${us()}`);const t=Sr(e,`${Ar()}`).map(s=>s.split(",")).getOr([]),o=Sr(e,`${ir()}`).map(s=>s.split(",")).getOr([]);Be(t,s=>rn(e,s)),xp(e,o),rn(e,`${ir()}`),rn(e,`${Ar()}`)},km=(e,t,o,s,a)=>{const c=ye.fromTag("span",e);return Og(c,t,o,s,a,!1),c},ns=(e,t,o,s,a,c)=>{const d=[],h=km(e.getDoc(),o,c,s,a),_=Jr(),z=()=>{_.clear()},I=()=>_.get().getOrThunk(()=>{const le=Tr(h);return d.push(le),_.set(le),le}),H=le=>{Be(le,V)},V=le=>{switch(I4(e,le,"span",En(le))){case"invalid-child":{z();const fe=xa(le);H(fe),z();break}case"valid-block":{z(),Og(le,o,c,s,a,!0);break}case"valid":{const fe=I();Ci(le,fe);break}}},ee=le=>{const oe=dn(le,ye.fromDom);H(oe)};return H0(e.dom,t,le=>{z(),ee(le)}),d},TM=(e,t,o,s)=>{e.undoManager.transact(()=>{const a=e.selection,c=a.getRng(),d=xf(e).length>0,h=Ei("mce-annotation");if(c.collapsed&&!d&&Tg(e,c),a.getRng().collapsed&&!d){const _=km(e.getDoc(),h,s,t,o.decorate);Jl(_,da),a.getRng().insertNode(_.dom),a.select(_.dom)}else ox(a,!1,()=>{By(e,_=>{ns(e,_,h,t,o.decorate,s)})})})},F4=e=>{const t=J1();dy(e,t);const o=cy(e,t),s=Sd("span"),a=c=>{Be(c,d=>{s(d)?wa(d):Oi(d)})};return{register:(c,d)=>{t.register(c,d)},annotate:(c,d)=>{t.lookup(c).each(h=>{TM(e,c,h,d)})},annotationChanged:(c,d)=>{o.addListener(c,d)},remove:c=>{ly(e,j.some(c)).each(({elements:d})=>{const h=e.selection.getBookmark();a(d),e.selection.moveToBookmark(h)})},removeAll:c=>{const d=e.selection.getBookmark();nn(_p(e,c),(h,_)=>{a(h)}),e.selection.moveToBookmark(d)},getAll:c=>{const d=_p(e,c);return Ri(d,h=>dn(h,_=>_.dom))}}},ws=e=>({getBookmark:Ht(kM,e),moveToBookmark:Ht(CM,e)});ws.isBookmarkNode=ud;const H2=(e,t,o)=>o.collapsed?!1:Ln(o.getClientRects(),s=>hy(s,e,t)),$0=(e,t)=>e.dispatch("PreProcess",t),V0=(e,t)=>e.dispatch("PostProcess",t),j0=e=>{e.dispatch("remove")},U0=e=>{e.dispatch("detach")},H4=(e,t)=>{e.dispatch("SwitchMode",{mode:t})},OM=(e,t,o,s,a)=>{e.dispatch("ObjectResizeStart",{target:t,width:o,height:s,origin:a})},zM=(e,t,o,s,a)=>{e.dispatch("ObjectResized",{target:t,width:o,height:s,origin:a})},NM=e=>{e.dispatch("PreInit")},DM=e=>{e.dispatch("PostRender")},Pr=e=>{e.dispatch("Init")},$4=(e,t)=>{e.dispatch("PlaceholderToggle",{state:t})},$2=(e,t,o)=>{e.dispatch(t,o)},V4=(e,t,o,s)=>{e.dispatch("FormatApply",{format:t,node:o,vars:s})},j4=(e,t,o,s)=>{e.dispatch("FormatRemove",{format:t,node:o,vars:s})},RM=(e,t)=>e.dispatch("BeforeSetContent",t),rc=(e,t)=>e.dispatch("SetContent",t),kf=(e,t)=>e.dispatch("BeforeGetContent",t),U4=(e,t)=>e.dispatch("GetContent",t),V2=(e,t)=>{e.dispatch("AutocompleterStart",t)},j2=(e,t)=>{e.dispatch("AutocompleterUpdate",t)},U2=(e,t)=>{e.dispatch("AutocompleterUpdateActiveRange",t)},MM=e=>{e.dispatch("AutocompleterEnd")},Z0=(e,t,o)=>e.dispatch("PastePreProcess",{content:t,internal:o}),px=(e,t,o)=>e.dispatch("PastePostProcess",{node:t,internal:o}),gx=(e,t)=>e.dispatch("PastePlainTextToggle",{state:t}),LM=(e,t)=>e.dispatch("EditableRootStateChange",{state:t}),Zt={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:e=>e.shiftKey||e.ctrlKey||e.altKey||Zt.metaKeyPressed(e),metaKeyPressed:e=>Jo.os.isMacOS()||Jo.os.isiOS()?e.metaKey:e.ctrlKey&&!e.altKey},rb="data-mce-selected",BM="table,img,figure.image,hr,video,span.mce-preview-object,details",fd=Math.abs,zg=Math.round,hx={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},Du=e=>e.type==="longpress"||e.type.indexOf("touch")===0,ps=(e,t)=>{const o=t.dom,s=t.getDoc(),a=document,c=t.getBody();let d,h,_,z,I,H,V,ee,le,oe,fe,ke,Oe,Ae,Pe,ht,Mt;const Yt=qt=>Fe(qt)&&(Dl(qt)||o.is(qt,"figure.image")),Qe=qt=>Xe(qt)||o.hasClass(qt,"mce-preview-object"),Ve=(qt,hn)=>{if(Du(qt)){const An=qt.touches[0];return Yt(qt.target)&&!H2(An.clientX,An.clientY,hn)}else return Yt(qt.target)&&!H2(qt.clientX,qt.clientY,hn)},mt=qt=>{const hn=qt.target;Ve(qt,t.selection.getRng())&&!qt.isDefaultPrevented()&&t.selection.select(hn)},to=qt=>o.hasClass(qt,"mce-preview-object")&&Fe(qt.firstElementChild)?[qt,qt.firstElementChild]:o.is(qt,"figure.image")?[qt.querySelector("img")]:[qt],bo=qt=>{const hn=AT(t);return!hn||qt.getAttribute("data-mce-resize")==="false"||qt===t.getBody()?!1:o.hasClass(qt,"mce-preview-object")&&Fe(qt.firstElementChild)?ls(ye.fromDom(qt.firstElementChild),hn):ls(ye.fromDom(qt),hn)},gn=(qt,hn)=>{if(Qe(hn))return qt.create("img",{src:Jo.transparentSrc});if(ec(hn)){const gi=vs(z.name,"n")?St:Vo,gs=hn.cloneNode(!0);return gi(qt.select("tr",gs)).each(ti=>{const zf=qt.select("td,th",ti);qt.setStyle(ti,"height",null),Be(zf,Xp=>qt.setStyle(Xp,"height",null))}),gs}else return hn.cloneNode(!0)},Cn=(qt,hn,An)=>{if(Fe(An)){const gi=to(qt);Be(gi,gs=>{gs.style[hn]||!t.schema.isValid(gs.nodeName.toLowerCase(),hn)?o.setStyle(gs,hn,An):o.setAttrib(gs,hn,""+An)})}},ds=(qt,hn,An)=>{Cn(qt,"width",hn),Cn(qt,"height",An)},hs=qt=>{let hn,An,gi,gs,ti;hn=qt.screenX-H,An=qt.screenY-V,Ae=hn*z[2]+oe,Pe=An*z[3]+fe,Ae=Ae<5?5:Ae,Pe=Pe<5?5:Pe,(Yt(d)||Qe(d))&&TT(t)!==!1?gi=!Zt.modifierPressed(qt):gi=Zt.modifierPressed(qt),gi&&(fd(hn)>fd(An)?(Pe=zg(Ae*ke),Ae=zg(Pe/ke)):(Ae=zg(Pe/ke),Pe=zg(Ae*ke))),ds(h,Ae,Pe),gs=z.startPos.x+hn,ti=z.startPos.y+An,gs=gs>0?gs:0,ti=ti>0?ti:0,o.setStyles(_,{left:gs,top:ti,display:"block"}),_.innerHTML=Ae+" × "+Pe,z[2]<0&&h.clientWidth<=Ae&&o.setStyle(h,"left",ee+(oe-Ae)),z[3]<0&&h.clientHeight<=Pe&&o.setStyle(h,"top",le+(fe-Pe)),hn=c.scrollWidth-ht,An=c.scrollHeight-Mt,hn+An!==0&&o.setStyles(_,{left:gs-hn,top:ti-An}),Oe||(OM(t,d,oe,fe,"corner-"+z.name),Oe=!0)},qr=()=>{const qt=Oe;Oe=!1,qt&&(Cn(d,"width",Ae),Cn(d,"height",Pe)),o.unbind(s,"mousemove",hs),o.unbind(s,"mouseup",qr),a!==s&&(o.unbind(a,"mousemove",hs),o.unbind(a,"mouseup",qr)),o.remove(h),o.remove(_),o.remove(I),il(d),qt&&(zM(t,d,Ae,Pe,"corner-"+z.name),o.setAttrib(d,"style",o.getAttrib(d,"style"))),t.nodeChanged()},il=qt=>{jt();const hn=o.getPos(qt,c),An=hn.x,gi=hn.y,gs=qt.getBoundingClientRect(),ti=gs.width||gs.right-gs.left,zf=gs.height||gs.bottom-gs.top;d!==qt&&(Ft(),d=qt,Ae=Pe=0);const Xp=t.dispatch("ObjectSelected",{target:qt});bo(qt)&&!Xp.isDefaultPrevented()?nn(hx,(uc,tu)=>{const Nf=Df=>{const _o=to(d)[0];H=Df.screenX,V=Df.screenY,oe=_o.clientWidth,fe=_o.clientHeight,ke=fe/oe,z=uc,z.name=tu,z.startPos={x:ti*uc[0]+An,y:zf*uc[1]+gi},ht=c.scrollWidth,Mt=c.scrollHeight,I=o.add(c,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),o.setStyles(I,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),h=gn(o,d),o.addClass(h,"mce-clonedresizable"),o.setAttrib(h,"data-mce-bogus","all"),h.contentEditable="false",o.setStyles(h,{left:An,top:gi,margin:0}),ds(h,ti,zf),h.removeAttribute(rb),c.appendChild(h),o.bind(s,"mousemove",hs),o.bind(s,"mouseup",qr),a!==s&&(o.bind(a,"mousemove",hs),o.bind(a,"mouseup",qr)),_=o.add(c,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},oe+" × "+fe)};let ou=o.get("mceResizeHandle"+tu);ou&&o.remove(ou),ou=o.add(c,"div",{id:"mceResizeHandle"+tu,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+tu+"-resize; margin:0; padding:0"}),o.bind(ou,"mousedown",Df=>{Df.stopImmediatePropagation(),Df.preventDefault(),Nf(Df)}),uc.elm=ou,o.setStyles(ou,{left:ti*uc[0]+An-ou.offsetWidth/2,top:zf*uc[1]+gi-ou.offsetHeight/2})}):Ft(!1)},Os=vp(il,0),Ft=(qt=!0)=>{Os.cancel(),jt(),d&&qt&&d.removeAttribute(rb),nn(hx,(hn,An)=>{const gi=o.get("mceResizeHandle"+An);gi&&(o.unbind(gi),o.remove(gi))})},go=(qt,hn)=>o.isChildOf(qt,hn),ts=qt=>{if(Oe||t.removed||t.composing)return;const hn=qt.type==="mousedown"?qt.target:e.getNode(),An=Xr(ye.fromDom(hn),BM).map(gs=>gs.dom).filter(gs=>o.isEditable(gs.parentElement)||gs.nodeName==="IMG"&&o.isEditable(gs)).getOrUndefined(),gi=Fe(An)?o.getAttrib(An,rb,"1"):"1";if(Be(o.select(`img[${rb}],hr[${rb}]`),gs=>{gs.removeAttribute(rb)}),Fe(An)&&go(An,c)&&t.hasFocus()){Eo();const gs=e.getStart(!0);if(go(gs,An)&&go(e.getEnd(!0),An)){o.setAttrib(An,rb,gi),Os.throttle(An);return}}Ft()},jt=()=>{nn(hx,qt=>{qt.elm&&(o.unbind(qt.elm),delete qt.elm)})},Eo=()=>{try{t.getDoc().execCommand("enableObjectResizing",!1,"false")}catch{}};return t.on("init",()=>{Eo(),t.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",ts),t.on("keyup compositionend",qt=>{d&&d.nodeName==="TABLE"&&ts(qt)}),t.on("hide blur",Ft),t.on("contextmenu longpress",mt,!0)}),t.on("remove",jt),{isResizable:bo,showResizeRect:il,hideResizeRect:Ft,updateResizeRect:ts,destroy:()=>{Os.cancel(),d=h=I=null}}},Fy=(e,t)=>{t.fold(o=>{e.setStartBefore(o.dom)},(o,s)=>{e.setStart(o.dom,s)},o=>{e.setStartAfter(o.dom)})},bx=(e,t)=>{t.fold(o=>{e.setEndBefore(o.dom)},(o,s)=>{e.setEnd(o.dom,s)},o=>{e.setEndAfter(o.dom)})},Z2=(e,t,o)=>{const s=e.document.createRange();return Fy(s,t),bx(s,o),s},W0=(e,t,o,s,a)=>{const c=e.document.createRange();return c.setStart(t.dom,o),c.setEnd(s.dom,a),c},ab=zn.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Z4=(e,t,o)=>t(ye.fromDom(o.startContainer),o.startOffset,ye.fromDom(o.endContainer),o.endOffset),W2=(e,t)=>t.match({domRange:o=>({ltr:Ge(o),rtl:j.none}),relative:(o,s)=>({ltr:si(()=>Z2(e,o,s)),rtl:si(()=>j.some(Z2(e,s,o)))}),exact:(o,s,a,c)=>({ltr:si(()=>W0(e,o,s,a,c)),rtl:si(()=>j.some(W0(e,a,c,o,s)))})}),PM=(e,t)=>{const o=t.ltr();return o.collapsed?t.rtl().filter(a=>a.collapsed===!1).map(a=>ab.rtl(ye.fromDom(a.endContainer),a.endOffset,ye.fromDom(a.startContainer),a.startOffset)).getOrThunk(()=>Z4(e,ab.ltr,o)):Z4(e,ab.ltr,o)},W4=(e,t)=>{const o=W2(e,t);return PM(e,o)};ab.ltr,ab.rtl;const yx={create:(e,t,o,s)=>({start:e,soffset:t,finish:o,foffset:s})},q4=(e,t,o)=>{var s;return j.from((s=e.caretPositionFromPoint)===null||s===void 0?void 0:s.call(e,t,o)).bind(a=>{if(a.offsetNode===null)return j.none();const c=e.createRange();return c.setStart(a.offsetNode,a.offset),c.collapse(),j.some(c)})},vx=(e,t,o)=>{var s;return j.from((s=e.caretRangeFromPoint)===null||s===void 0?void 0:s.call(e,t,o))},FM=(e,t,o)=>e.caretPositionFromPoint?q4(e,t,o):e.caretRangeFromPoint?vx(e,t,o):j.none(),HM=(e,t,o)=>{const s=e.document;return FM(s,t,o).map(a=>yx.create(ye.fromDom(a.startContainer),a.startOffset,ye.fromDom(a.endContainer),a.endOffset))},q2=zn.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),$M=(e,t,o,s)=>e.fold(t,o,s),VM=e=>e.fold(Ao,Ao,Ao),K4=q2.before,jM=q2.on,UM=q2.after,Cm={before:K4,on:jM,after:UM,cata:$M,getStart:VM},q0=zn.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),ZM=e=>q0.exact(e.start,e.soffset,e.finish,e.foffset),WM=e=>e.match({domRange:t=>ye.fromDom(t.startContainer),relative:(t,o)=>Cm.getStart(t),exact:(t,o,s,a)=>t}),G4=q0.domRange,jd=q0.relative,qM=q0.exact,Y4=e=>{const t=WM(e);return vc(t)},K2=yx.create,Ng={domRange:G4,relative:jd,exact:qM,exactFromRange:ZM,getWin:Y4,range:K2},K0=(e,t)=>{const o=En(e);return o==="input"?Cm.after(e):mn(["br","img"],o)?t===0?Cm.before(e):Cm.after(e):Cm.on(e,t)},X4=(e,t)=>{const o=e.fold(Cm.before,K0,Cm.after),s=t.fold(Cm.before,K0,Cm.after);return Ng.relative(o,s)},_x=(e,t,o,s)=>{const a=K0(e,t),c=K0(o,s);return Ng.relative(a,c)},J4=e=>e.match({domRange:t=>{const o=ye.fromDom(t.startContainer),s=ye.fromDom(t.endContainer);return _x(o,t.startOffset,s,t.endOffset)},relative:X4,exact:_x}),Hc=(e,t)=>{const s=document.createDocumentFragment();return Be(e,a=>{s.appendChild(a.dom)}),ye.fromDom(s)},KM=e=>{const t=Ng.getWin(e).dom,o=(a,c,d,h)=>W0(t,a,c,d,h),s=J4(e);return W4(t,s).match({ltr:o,rtl:o})},G2=(e,t,o)=>HM(e,t,o),Q4=(e,t,o)=>{const s=vc(ye.fromDom(o));return G2(s.dom,e,t).map(a=>{const c=o.createRange();return c.setStart(a.start.dom,a.soffset),c.setEnd(a.finish.dom,a.foffset),c}).getOrUndefined()},G0=(e,t)=>Fe(e)&&Fe(t)&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset,Cf=(e,t,o)=>{let s=e;for(;s&&s!==t;){if(o(s))return s;s=s.parentNode}return null},xx=(e,t,o)=>Cf(e,t,o)!==null,wx=(e,t,o)=>xx(e,t,s=>s.nodeName===o),e3=(e,t)=>Bl(e)&&!xx(e,t,dd),t3=(e,t,o)=>{const s=t.parentNode;if(s){const a=new Ma(t,e.getParent(s,e.isBlock)||e.getRoot());let c;for(;c=a[o?"prev":"next"]();)if(Hs(c))return!0}return!1},o3=(e,t)=>{var o;return((o=e.previousSibling)===null||o===void 0?void 0:o.nodeName)===t},n3=(e,t)=>{let o=t;for(;o&&o!==e;){if($o(o))return!0;o=o.parentNode}return!1},Y0=(e,t,o,s,a)=>{const c=e.getRoot(),d=e.schema.getNonEmptyElements(),h=a.parentNode;let _,z;if(!h)return j.none();const I=e.getParent(h,e.isBlock)||c;if(s&&Hs(a)&&t&&e.isEmpty(I))return j.some(Ue(h,e.nodeIndex(a)));const H=new Ma(a,I);for(;z=H[s?"prev":"next"]();){if(e.getContentEditableParent(z)==="false"||e3(z,c))return j.none();if(wt(z)&&z.data.length>0)return wx(z,c,"A")?j.none():j.some(Ue(z,s?z.data.length:0));if(e.isBlock(z)||d[z.nodeName.toLowerCase()])return j.none();_=z}return Qo(_)?j.none():o&&_?j.some(Ue(_,0)):j.none()},Y2=(e,t,o,s)=>{const a=e.getRoot();let c,d=!1,h=o?s.startContainer:s.endContainer,_=o?s.startOffset:s.endOffset;const z=no(h)&&_===h.childNodes.length,I=e.schema.getNonEmptyElements();let H=o;if(Bl(h))return j.none();if(no(h)&&_>h.childNodes.length-1&&(H=!1),lo(h)&&(h=a,_=0),h===a){if(H&&(c=h.childNodes[_>0?_-1:0],c&&(Bl(c)||I[c.nodeName]||ec(c))))return j.none();if(h.hasChildNodes()){if(_=Math.min(!H&&_>0?_-1:_,h.childNodes.length-1),h=h.childNodes[_],_=wt(h)&&z?h.data.length:0,!t&&h===a.lastChild&&ec(h)||n3(a,h)||Bl(h)||Qf(h))return j.none();if(h.hasChildNodes()&&!ec(h)){c=h;const V=new Ma(h,a);do{if($o(c)||Bl(c)){d=!1;break}if(wt(c)&&c.data.length>0){_=H?0:c.data.length,h=c,d=!0;break}if(I[c.nodeName.toLowerCase()]&&!Wb(c)){_=e.nodeIndex(c),h=c.parentNode,H||_++,d=!0;break}}while(c=H?V.next():V.prev())}}}return t&&(wt(h)&&_===0&&Y0(e,z,t,!0,h).each(V=>{h=V.container(),_=V.offset(),d=!0}),no(h)&&(c=h.childNodes[_],c||(c=h.childNodes[_-1]),c&&Hs(c)&&!o3(c,"A")&&!t3(e,c,!1)&&!t3(e,c,!0)&&Y0(e,z,t,!0,c).each(V=>{h=V.container(),_=V.offset(),d=!0}))),H&&!t&&wt(h)&&_===h.data.length&&Y0(e,z,t,!1,h).each(V=>{h=V.container(),_=V.offset(),d=!0}),d&&h?j.some(Ue(h,_)):j.none()},Sm=(e,t)=>{const o=t.collapsed,s=t.cloneRange(),a=Ue.fromRangeStart(t);return Y2(e,o,!0,s).each(c=>{(!o||!Ue.isAbove(a,c))&&s.setStart(c.container(),c.offset())}),o||Y2(e,o,!1,s).each(c=>{s.setEnd(c.container(),c.offset())}),o&&s.collapse(!0),G0(t,s)?j.none():j.some(s)},X0=(e,t)=>e.splitText(t),J0=e=>{let t=e.startContainer,o=e.startOffset,s=e.endContainer,a=e.endOffset;if(t===s&&wt(t)){if(o>0&&oo){a=a-o;const c=X0(s,a).previousSibling;t=s=c,a=c.data.length,o=0}else a=0}else if(wt(t)&&o>0&&o0&&a({walk:(c,d)=>H0(e,c,d),split:J0,expand:(c,d={type:"word"})=>{if(d.type==="word"){const h=Ag(e,c,[{inline:"span"}]),_=e.createRng();return _.setStart(h.startContainer,h.startOffset),_.setEnd(h.endContainer,h.endOffset),_}return c},normalize:c=>Sm(e,c).fold(fn,d=>(c.setStart(d.startContainer,d.startOffset),c.setEnd(d.endContainer,d.endOffset),!0))});Dg.compareRanges=G0,Dg.getCaretRangeFromPoint=Q4,Dg.getSelectedNode=bg,Dg.getNode=fa;const X2=((e,t)=>{const o=(h,_)=>{if(!D(_)&&!_.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+_);const z=h.dom;Za(z)&&(z.style[e]=_+"px")},s=h=>{const _=t(h);if(_<=0||_===null){const z=ur(h,e);return parseFloat(z)||0}return _},a=s,c=(h,_)=>ko(_,(z,I)=>{const H=ur(h,I),V=H===void 0?0:parseInt(H,10);return isNaN(V)?z:z+V},0);return{set:o,get:s,getOuter:a,aggregate:c,max:(h,_,z)=>{const I=c(h,z);return _>I?_-I:0}}})("height",e=>{const t=e.dom;return Ua(e)?t.getBoundingClientRect().height:t.offsetHeight}),ib=e=>X2.get(e),s3=()=>ye.fromDom(document),r3=(e,t)=>e.view(t).fold(Ge([]),s=>{const a=e.owner(s),c=r3(e,a);return[s].concat(c)}),kx=(e,t)=>{const o=t.owner(e);return r3(t,o)};var XM=Object.freeze({__proto__:null,view:e=>{var t;return(e.dom===document?j.none():j.from((t=e.dom.defaultView)===null||t===void 0?void 0:t.frameElement)).map(ye.fromDom)},owner:e=>ul(e)});const a3=e=>{const t=s3(),o=Lo(t),s=kx(e,XM),a=Uo(e),c=ao(s,(d,h)=>{const _=Uo(h);return{left:d.left+_.left,top:d.top+_.top}},{left:0,top:0});return ge(c.left+a.left+o.left,c.top+a.top+o.top)},Rp=e=>En(e)==="textarea",i3=(e,t)=>e.dispatch("ScrollIntoView",t).isDefaultPrevented(),l3=(e,t)=>{e.dispatch("AfterScrollIntoView",t)},c3=(e,t)=>{const o=xa(e);if(o.length===0||Rp(e))return{element:e,offset:t};if(t{const o=xo(e),s=ib(e);return{element:e,bottom:o.top+s,height:s,pos:o,cleanup:t}},d3=(e,t)=>{const o=c3(e,t),s=ye.fromHtml(''+ua+"");return Zs(o.element,s),Q0(s,()=>Jn(s))},u3=e=>Q0(ye.fromDom(e),dt),f3=(e,t,o,s)=>{p3(e,(a,c)=>m3(e,t,o,s),o)},ev=(e,t,o,s,a)=>{const c={elm:s.element.dom,alignToTop:a};if(i3(e,c))return;const d=Lo(t).top;o(e,t,d,s,a),l3(e,c)},m3=(e,t,o,s)=>{const a=ye.fromDom(e.getBody()),c=ye.fromDom(e.getDoc());op(a);const d=d3(ye.fromDom(o.startContainer),o.startOffset);ev(e,c,t,d,s),d.cleanup()},Cx=(e,t,o,s)=>{const a=ye.fromDom(e.getDoc());ev(e,a,o,u3(t),s)},p3=(e,t,o)=>{const s=o.startContainer,a=o.startOffset,c=o.endContainer,d=o.endOffset;t(ye.fromDom(s),ye.fromDom(c));const h=e.dom.createRng();h.setStart(s,a),h.setEnd(c,d),e.selection.setRng(o)},tv=(e,t,o,s,a)=>{const c=t.pos;if(s)io(c.left,c.top,a);else{const d=c.top-o+t.height;io(-e.getBody().getBoundingClientRect().left,d,a)}},J2=(e,t,o,s,a,c)=>{const d=s+o,h=a.pos.top,_=a.bottom,z=_-h>=s;hd?tv(e,a,s,z?c!==!1:c===!0,t):_>d&&!z&&tv(e,a,s,c===!0,t)},ov=(e,t,o,s,a)=>{const c=vc(t).dom.innerHeight;J2(e,t,o,c,s,a)},Em=(e,t,o,s,a)=>{const c=vc(t).dom.innerHeight;J2(e,t,o,c,s,a);const d=a3(s.element),h=zl(window);d.toph.bottom&&Wn(s.element,a===!0)},JM=(e,t,o)=>f3(e,ov,t,o),Q2=(e,t,o)=>Cx(e,t,ov,o),oa=(e,t,o)=>f3(e,Em,t,o),eC=(e,t,o)=>Cx(e,t,Em,o),tC=(e,t,o)=>{(e.inline?Q2:eC)(e,t,o)},Ud=(e,t,o)=>{(e.inline?JM:oa)(e,t,o)},oC=(e,t=!1)=>e.dom.focus({preventScroll:t}),nC=e=>{const t=Yl(e).dom;return e.dom===t.activeElement},lb=(e=s3())=>j.from(e.dom.activeElement).map(ye.fromDom),QM=e=>lb(Yl(e)).filter(t=>e.dom.contains(t.dom)),g3=(e,t)=>{const o=Rs(t)?fm(t).length:xa(t).length+1;return e>o?o:e<0?0:e},Hy=e=>Ng.range(e.start,g3(e.soffset,e.start),e.finish,g3(e.foffset,e.finish)),h3=(e,t)=>!Nd(t.dom)&&(_a(e,t)||kn(e,t)),Rg=e=>t=>h3(e,t.start)&&h3(e,t.finish),e6=e=>e.inline||Jo.browser.isFirefox(),Mg=e=>Ng.range(ye.fromDom(e.startContainer),e.startOffset,ye.fromDom(e.endContainer),e.endOffset),t6=e=>{const t=e.getSelection();return(!t||t.rangeCount===0?j.none():j.from(t.getRangeAt(0))).map(Mg)},Zd=e=>{const t=vc(e);return t6(t.dom).filter(Rg(e))},nv=(e,t)=>j.from(t).filter(Rg(e)).map(Hy),sC=e=>{const t=document.createRange();try{return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),j.some(t)}catch{return j.none()}},$y=e=>{const t=e6(e)?Zd(ye.fromDom(e.getBody())):j.none();e.bookmark=t.isSome()?t:e.bookmark},rC=e=>(e.bookmark?e.bookmark:j.none()).bind(o=>nv(ye.fromDom(e.getBody()),o)).bind(sC),Sx=e=>{rC(e).each(t=>e.selection.setRng(t))},Wd={isEditorUIElement:e=>{const t=e.className.toString();return t.indexOf("tox-")!==-1||t.indexOf("mce-")!==-1}},Ex=(e,t)=>(D(t)||(t=0),setTimeout(e,t)),b3=(e,t)=>(D(t)||(t=0),setInterval(e,t)),$c={setEditorTimeout:(e,t,o)=>Ex(()=>{e.removed||t()},o),setEditorInterval:(e,t,o)=>{const s=b3(()=>{e.removed?clearInterval(s):t()},o);return s}},aC=e=>e.type==="nodechange"&&e.selectionChange,cb=(e,t)=>{const o=()=>{t.throttle()};As.DOM.bind(document,"mouseup",o),e.on("remove",()=>{As.DOM.unbind(document,"mouseup",o)})},iC=(e,t)=>{e.on("mouseup touchend",o=>{t.throttle()})},y3=(e,t)=>{iC(e,t),e.on("keyup NodeChange AfterSetSelectionRange",o=>{aC(o)||$y(e)})},o6=e=>{const t=vp(()=>{$y(e)},0);e.on("init",()=>{e.inline&&cb(e,t),y3(e,t)}),e.on("remove",()=>{t.cancel()})};let Am;const lC=As.DOM,v3=e=>no(e)&&Wd.isEditorUIElement(e),sv=e=>{const t=e.classList;return t!==void 0?t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body"):!1},Ax=(e,t)=>{const o=zT(e);return lC.getParent(t,a=>v3(a)||(o?e.dom.is(a,o):!1))!==null},Tx=e=>{try{const t=Yl(ye.fromDom(e.getElement()));return lb(t).fold(()=>document.body,o=>o.dom)}catch{return document.body}},_3=(e,t)=>{const o=t.editor;o6(o);const s=(a,c)=>{if(HT(a)&&a.inline!==!0){const d=ye.fromDom(a.getContainer());c(d,"tox-edit-focus")}};o.on("focusin",()=>{const a=e.focusedEditor;sv(Tx(o))&&s(o,ql),a!==o&&(a&&a.dispatch("blur",{focusedEditor:o}),e.setActive(o),e.focusedEditor=o,o.dispatch("focus",{blurredEditor:a}),o.focus(!0))}),o.on("focusout",()=>{$c.setEditorTimeout(o,()=>{const a=e.focusedEditor;(!sv(Tx(o))||a!==o)&&s(o,Ra),!Ax(o,Tx(o))&&a===o&&(o.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null)})}),Am||(Am=a=>{const c=e.activeEditor;c&&Yu(a).each(d=>{const h=d;h.ownerDocument===document&&h!==document.body&&!Ax(c,h)&&e.focusedEditor===c&&(c.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null)})},lC.bind(document,"focusin",Am))},n6=(e,t)=>{e.focusedEditor===t.editor&&(e.focusedEditor=null),!e.activeEditor&&Am&&(lC.unbind(document,"focusin",Am),Am=null)},s6=e=>{e.on("AddEditor",Ht(_3,e)),e.on("RemoveEditor",Ht(n6,e))},r6=(e,t)=>e.dom.getParent(t,o=>e.dom.getContentEditable(o)==="true"),a6=(e,t)=>e.dom.getParent(t,o=>e.dom.getContentEditable(o)==="false")!==null,i6=e=>e.collapsed?j.from(fa(e.startContainer,e.startOffset)).map(ye.fromDom):j.none(),l6=(e,t)=>i6(t).bind(o=>wp(o)?j.some(o):_a(e,o)?j.none():j.some(e)),x3=(e,t)=>{l6(ye.fromDom(e.getBody()),t).bind(o=>No(o.dom)).fold(()=>{e.selection.normalize()},o=>e.selection.setRng(o.toRange()))},Ox=e=>{if(e.setActive)try{e.setActive()}catch{e.focus()}else e.focus()},c6=e=>nC(e)||QM(e).isSome(),d6=e=>Fe(e.iframeElement)&&nC(ye.fromDom(e.iframeElement)),u6=e=>{const t=e.getBody();return t&&c6(ye.fromDom(t))},w3=e=>{const t=Yl(ye.fromDom(e.getElement()));return lb(t).filter(o=>!sv(o.dom)&&Ax(e,o.dom)).isSome()},Vy=e=>e.inline?u6(e):d6(e),db=e=>Vy(e)||w3(e),f6=e=>{const t=e.selection,o=e.getBody();let s=t.getRng();e.quirks.refreshContentEditable();const a=d=>{rC(d).each(h=>{d.selection.setRng(h),s=h})};!Vy(e)&&e.hasEditableRoot()&&a(e);const c=r6(e,t.getNode());if(c&&e.dom.isChildOf(c,o)){a6(e,c)||Ox(o),Ox(c),e.hasEditableRoot()||a(e),x3(e,s),cC(e);return}e.inline||(Jo.browser.isOpera()||Ox(o),e.getWin().focus()),(Jo.browser.isFirefox()||e.inline)&&(Ox(o),x3(e,s)),cC(e)},cC=e=>e.editorManager.setActive(e),k3=(e,t)=>{e.removed||(t?cC(e):f6(e))},C3=(e,t)=>t.collapsed?e.isEditable(t.startContainer):e.isEditable(t.startContainer)&&e.isEditable(t.endContainer),S3=(e,t,o,s,a)=>{const c=o?t.startContainer:t.endContainer,d=o?t.startOffset:t.endOffset;return j.from(c).map(ye.fromDom).map(h=>!s||!t.collapsed?xc(h,a(h,d)).getOr(h):h).bind(h=>cr(h)?j.some(h):ia(h).filter(cr)).map(h=>h.dom).getOr(e)},E3=(e,t,o=!1)=>S3(e,t,!0,o,(s,a)=>Math.min(Yc(s),a)),A3=(e,t,o=!1)=>S3(e,t,!1,o,(s,a)=>a>0?a-1:a),T3=(e,t)=>{const o=e;for(;e&&wt(e)&&e.length===0;)e=t?e.nextSibling:e.previousSibling;return e||o},m6=(e,t)=>{if(!t)return e;let o=t.startContainer,s=t.endContainer;const a=t.startOffset,c=t.endOffset;let d=t.commonAncestorContainer;t.collapsed||(o===s&&c-a<2&&o.hasChildNodes()&&(d=o.childNodes[a]),wt(o)&&wt(s)&&(o.length===a?o=T3(o.nextSibling,!0):o=o.parentNode,c===0?s=T3(s.previousSibling,!1):s=s.parentNode,o&&o===s&&(d=o)));const h=wt(d)?d.parentNode:d;return Ql(h)?h:e},dC=(e,t,o,s)=>{const a=[],c=e.getRoot(),d=e.getParent(o||E3(c,t,t.collapsed),e.isBlock),h=e.getParent(s||A3(c,t,t.collapsed),e.isBlock);if(d&&d!==c&&a.push(d),d&&h&&d!==h){let _;const z=new Ma(d,c);for(;(_=z.next())&&_!==h;)e.isBlock(_)&&a.push(_)}return h&&d!==h&&h!==c&&a.push(h),a},rv=(e,t,o)=>j.from(t).bind(s=>j.from(s.parentNode).map(a=>{const c=e.nodeIndex(s),d=e.createRng();return d.setStart(a,c),d.setEnd(a,c+1),o&&(M0(e,d,s,!0),M0(e,d,s,!1)),d})),zx=(e,t)=>dn(t,o=>{const s=e.dispatch("GetSelectionRange",{range:o});return s.range!==o?s.range:o}),p6={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},ub=(e,t,o)=>{const s=o?"lastChild":"firstChild",a=o?"prev":"next";if(e[s])return e[s];if(e!==t){let c=e[a];if(c)return c;for(let d=e.parent;d&&d!==t;d=d.parent)if(c=d[a],c)return c}},O3=e=>{var t;const o=(t=e.value)!==null&&t!==void 0?t:"";if(!Ii(o))return!1;const s=e.parent;return!(s&&(s.name!=="span"||s.attr("style"))&&/^[ ]+$/.test(o))},Ca=e=>{const t=e.name==="a"&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t};class pi{static create(t,o){const s=new pi(t,p6[t]||1);return o&&nn(o,(a,c)=>{s.attr(c,a)}),s}constructor(t,o){this.name=t,this.type=o,o===1&&(this.attributes=[],this.attributes.map={})}replace(t){const o=this;return t.parent&&t.remove(),o.insert(t,o),o.remove(),o}attr(t,o){const s=this;if(!ft(t))return Fe(t)&&nn(t,(c,d)=>{s.attr(d,c)}),s;const a=s.attributes;if(a){if(o!==void 0){if(o===null){if(t in a.map){delete a.map[t];let c=a.length;for(;c--;)if(a[c].name===t)return a.splice(c,1),s}return s}if(t in a.map){let c=a.length;for(;c--;)if(a[c].name===t){a[c].value=o;break}}else a.push({name:t,value:o});return a.map[t]=o,s}return a.map[t]}}clone(){const t=this,o=new pi(t.name,t.type),s=t.attributes;if(s){const a=[];a.map={};for(let c=0,d=s.length;cft(e.nodeValue)&&e.nodeValue.includes(ua),av=e=>`${e.length===0?"":`${dn(e,t=>`[${t}]`).join(",")},`}[data-mce-bogus="all"]`,Lg=(e,t)=>t.querySelectorAll(av(e)),Mp=e=>document.createTreeWalker(e,NodeFilter.SHOW_COMMENT,t=>Nx(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP),N3=e=>document.createTreeWalker(e,NodeFilter.SHOW_TEXT,t=>{if(Nx(t)){const o=t.parentNode;return o&&Ro(z3,o.nodeName)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}else return NodeFilter.FILTER_SKIP}),g6=e=>Mp(e).nextNode()!==null,jy=e=>N3(e).nextNode()!==null,Uy=(e,t)=>t.querySelector(av(e))!==null,Zy=(e,t)=>{Be(Lg(e,t),o=>{const s=ye.fromDom(o);Da(s,"data-mce-bogus")==="all"?Jn(s):Be(e,a=>{Gc(s,a)&&rn(s,a)})})},Dx=e=>{let t=e.nextNode();for(;t!==null;)t.nodeValue=null,t=e.nextNode()},uC=Kt(Dx,Mp),D3=Kt(Dx,N3),fC=(e,t)=>{const o=[{condition:Ht(Uy,t),action:Ht(Zy,t)},{condition:g6,action:uC},{condition:jy,action:D3}];let s=e,a=!1;return Be(o,({condition:c,action:d})=>{c(s)&&(a||(s=e.cloneNode(!0),a=!0),d(s))}),s},R3=e=>{const t=Mr(e,"[data-mce-bogus]");Be(t,o=>{Da(o,"data-mce-bogus")==="all"?Jn(o):Fd(o)?(Zs(o,ye.fromText(rr)),Jn(o)):wa(o)})},M3=e=>{const t=Mr(e,"input");Be(t,o=>{rn(o,"name")})},L3=(e,t)=>{const o=Vi(e),s=new RegExp(`^(<${o}[^>]*>( | |\\s| |
|)<\\/${o}>[\r ]*|
[\r -]*)$`);return t.replace(s,"")},PO=(e,t)=>{const o=e.getDoc(),s=Xl(ye.fromDom(e.getBody())),a=ye.fromTag("div",o);Rr(a,"data-mce-bogus","all"),vn(a,{position:"fixed",left:"-9999999px",top:"0"}),Ql(a,t.innerHTML),MO(a),BO(a);const c=sg(s);fr(c,a);const d=nl(a.dom.innerText);return Jn(a),d},l0=(e,t,o)=>{let s;return t.format==="raw"?s=zt.trim(nl(mC(o,e.serializer.getTempAttrs()).innerHTML)):t.format==="text"?s=PO(e,o):t.format==="tree"?s=e.serializer.serialize(o,t):s=LO(e,e.serializer.serialize(o,t)),t.format!=="text"&&!Bh(ye.fromDom(o))&&ft(s)?zt.trim(s):s},IO=(e,t)=>j.from(e.getBody()).fold(Ge(t.format==="tree"?new gi("body",11):""),o=>l0(e,t,o)),pC=zt.makeMap,gC=e=>{const t=[];e=e||{};const o=e.indent,s=pC(e.indent_before||""),a=pC(e.indent_after||""),c=up.getEncodeFunc(e.entity_encoding||"raw",e.entities),d=e.element_format!=="xhtml";return{start:(h,_,z)=>{if(o&&s[h]&&t.length>0){const I=t[t.length-1];I.length>0&&I!==` +]*)$`);return t.replace(s,"")},B3=(e,t)=>{const o=e.getDoc(),s=Yl(ye.fromDom(e.getBody())),a=ye.fromTag("div",o);Rr(a,"data-mce-bogus","all"),vn(a,{position:"fixed",left:"-9999999px",top:"0"}),Jl(a,t.innerHTML),R3(a),M3(a);const c=ng(s);fr(c,a);const d=ol(a.dom.innerText);return Jn(a),d},iv=(e,t,o)=>{let s;return t.format==="raw"?s=zt.trim(ol(fC(o,e.serializer.getTempAttrs()).innerHTML)):t.format==="text"?s=B3(e,o):t.format==="tree"?s=e.serializer.serialize(o,t):s=L3(e,e.serializer.serialize(o,t)),t.format!=="text"&&!Mh(ye.fromDom(o))&&ft(s)?zt.trim(s):s},P3=(e,t)=>j.from(e.getBody()).fold(Ge(t.format==="tree"?new pi("body",11):""),o=>iv(e,t,o)),mC=zt.makeMap,pC=e=>{const t=[];e=e||{};const o=e.indent,s=mC(e.indent_before||""),a=mC(e.indent_after||""),c=dp.getEncodeFunc(e.entity_encoding||"raw",e.entities),d=e.element_format!=="xhtml";return{start:(h,_,z)=>{if(o&&s[h]&&t.length>0){const I=t[t.length-1];I.length>0&&I!==` `&&t.push(` -`)}if(t.push("<",h),_)for(let I=0,$=_.length;I<$;I++){const V=_[I];t.push(" ",V.name,'="',c(V.value,!0),'"')}if(!z||d?t[t.length]=">":t[t.length]=" />",z&&o&&a[h]&&t.length>0){const I=t[t.length-1];I.length>0&&I!==` +`)}if(t.push("<",h),_)for(let I=0,H=_.length;I0){const I=t[t.length-1];I.length>0&&I!==` `&&t.push(` `)}},end:h=>{let _;t.push(""),o&&a[h]&&t.length>0&&(_=t[t.length-1],_.length>0&&_!==` `&&t.push(` `))},text:(h,_)=>{h.length>0&&(t[t.length]=_?h:c(h))},cdata:h=>{t.push("")},comment:h=>{t.push("")},pi:(h,_)=>{_?t.push(""):t.push(""),o&&t.push(` `)},doctype:h=>{t.push("",o?` -`:"")},reset:()=>{t.length=0},getContent:()=>t.join("").replace(/\n$/,"")}},Lp=(e={},t=Rc())=>{const o=gC(e);return e.validate="validate"in e?e.validate:!0,{serialize:a=>{const c=e.validate,d={3:_=>{var z;o.text((z=_.value)!==null&&z!==void 0?z:"",_.raw)},8:_=>{var z;o.comment((z=_.value)!==null&&z!==void 0?z:"")},7:_=>{o.pi(_.name,_.value)},10:_=>{var z;o.doctype((z=_.value)!==null&&z!==void 0?z:"")},4:_=>{var z;o.cdata((z=_.value)!==null&&z!==void 0?z:"")},11:_=>{let z=_;if(z=z.firstChild)do h(z);while(z=z.next)}};o.reset();const h=_=>{var z;const I=d[_.type];if(I)I(_);else{const $=_.name,V=$ in t.getVoidElements();let ee=_.attributes;if(c&&ee&&ee.length>1){const le=[];le.map={};const oe=t.getElementRule(_.name);if(oe){for(let fe=0,ke=oe.attributesOrder.length;fe{t.length=0},getContent:()=>t.join("").replace(/\n$/,"")}},Lp=(e={},t=Dc())=>{const o=pC(e);return e.validate="validate"in e?e.validate:!0,{serialize:a=>{const c=e.validate,d={3:_=>{var z;o.text((z=_.value)!==null&&z!==void 0?z:"",_.raw)},8:_=>{var z;o.comment((z=_.value)!==null&&z!==void 0?z:"")},7:_=>{o.pi(_.name,_.value)},10:_=>{var z;o.doctype((z=_.value)!==null&&z!==void 0?z:"")},4:_=>{var z;o.cdata((z=_.value)!==null&&z!==void 0?z:"")},11:_=>{let z=_;if(z=z.firstChild)do h(z);while(z=z.next)}};o.reset();const h=_=>{var z;const I=d[_.type];if(I)I(_);else{const H=_.name,V=H in t.getVoidElements();let ee=_.attributes;if(c&&ee&&ee.length>1){const le=[];le.map={};const oe=t.getElementRule(_.name);if(oe){for(let fe=0,ke=oe.attributesOrder.length;fe{hC.add(t)});const bC=new Set;Le(["background-color"],t=>{bC.add(t)});const yC=["font","text-decoration","text-emphasis"],FO=(e,t)=>e.parseStyle(e.getAttrib(t,"style")),mb=(e,t)=>vt(FO(e,t)),vC=e=>hC.has(e),c0=e=>bC.has(e),_C=(e,t)=>Bn(mb(e,t),o=>vC(o)),$O=(e,t)=>_C(e,t)&&Bn(mb(e,t),o=>c0(o)),Mx=e=>rt(e,t=>Bn(yC,o=>vs(t,o))),bB=(e,t,o)=>{const s=mb(e,t),a=mb(e,o),c=d=>{var h,_;const z=(h=e.getStyle(t,d))!==null&&h!==void 0?h:"",I=(_=e.getStyle(o,d))!==null&&_!==void 0?_:"";return Pn(z)&&Pn(I)&&z!==I};return Bn(s,d=>{const h=_=>Bn(_,z=>z===d);if(!h(a)&&h(yC)){const _=Mx(a);return Bn(_,c)}else return c(d)})},HO=(e,t,o)=>j.from(o.container()).filter(wt).exists(s=>{const a=e?0:-1;return t(s.data.charAt(o.offset()+a))}),Pp=$t(HO,!0,nb),d0=$t(HO,!1,nb),VO=e=>{const t=e.container();return wt(t)&&(t.data.length===0||Pc(t.data)&&ws.isBookmarkNode(t.parentNode))},Mu=(e,t)=>o=>X_(e?0:-1,o).filter(t).isSome(),xC=e=>Rl(e)&&ur(ye.fromDom(e),"display")==="block",Bx=e=>Ho(e)&&!ag(e),jO=Mu(!0,xC),UO=Mu(!1,xC),pb=Mu(!0,Xe),qy=Mu(!1,Xe),ZO=Mu(!0,tc),Ky=Mu(!1,tc),Sa=Mu(!0,Bx),Ef=Mu(!1,Bx),gb=e=>e.slice(0,-1),WO=(e,t,o)=>_a(t,e)?gb(Yu(e,s=>o(s)||kn(s,t))):[],ic=(e,t)=>WO(e,t,fn),jc=(e,t)=>[e].concat(ic(e,t)),Lx=(e,t,o)=>pA(e,t,o,VO),qO=e=>t=>e.isBlock(En(t)),wC=(e,t,o)=>On(jc(ye.fromDom(t.container()),e),qO(o)),Gy=(e,t,o,s)=>Lx(e,t.dom,o).forall(a=>wC(t,o,s).fold(()=>!wm(a,o,t.dom),c=>!wm(a,o,t.dom)&&_a(c,ye.fromDom(a.container())))),Px=(e,t,o,s)=>wC(t,o,s).fold(()=>Lx(e,t.dom,o).forall(a=>!wm(a,o,t.dom)),a=>Lx(e,a.dom,o).isNone()),Ix=$t(Px,!1),KO=$t(Px,!0),kC=$t(Gy,!1),CC=$t(Gy,!0),yB=e=>J_(e).exists($d),Kd=(e,t,o,s)=>{const a=rt(jc(ye.fromDom(o.container()),t),d=>s.isBlock(En(d))),c=St(a).getOr(t);return dd(e,c.dom,o).filter(yB)},u0=(e,t,o)=>J_(t).exists($d)||Kd(!0,e,t,o).isSome(),hb=(e,t,o)=>_M(t).exists($d)||Kd(!1,e,t,o).isSome(),Fx=$t(Kd,!1),GO=$t(Kd,!0),SC=e=>Ue.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd(),EC=(e,t,o)=>{const s=rt(jc(ye.fromDom(t.container()),e),a=>o.isBlock(En(a)));return St(s).getOr(e)},YO=(e,t,o)=>SC(t)?d0(t):d0(t)||Fc(EC(e,t,o).dom,t).exists(d0),XO=(e,t,o)=>SC(t)?Pp(t):Pp(t)||Il(EC(e,t,o).dom,t).exists(Pp),JO=e=>mn(["pre","pre-wrap"],e),$x=e=>J_(e).bind(t=>_r(t,cr)).exists(t=>JO(ur(t,"white-space"))),TC=(e,t)=>Fc(e.dom,t).isNone(),AC=(e,t)=>Il(e.dom,t).isNone(),QO=(e,t,o)=>TC(e,t)||AC(e,t)||Ix(e,t,o)||KO(e,t,o)||hb(e,t,o)||u0(e,t,o),OC=e=>Fe(e)&&Ho(e)&&x2(e),zC=(e,t)=>o=>OC(new Ma(o,e)[t]()),e3=(e,t)=>{const o=Il(e.dom,t).getOr(t),s=zC(e.dom,"next");return t.isAtEnd()&&(s(t.container())||s(o.container()))},NC=(e,t)=>{const o=Fc(e.dom,t).getOr(t),s=zC(e.dom,"prev");return t.isAtStart()&&(s(t.container())||s(o.container()))},DC=(e,t,o)=>$x(t)?!1:QO(e,t,o)||YO(e,t,o)||XO(e,t,o),Yy=(e,t,o)=>$x(t)?!1:Ix(e,t,o)||kC(e,t,o)||hb(e,t,o)||YO(e,t,o)||NC(e,t),t3=e=>{const t=e.container(),o=e.offset();return wt(t)&&o$x(t)?!1:KO(e,t,o)||CC(e,t,o)||u0(e,t,o)||XO(e,t,o)||e3(e,t),RC=(e,t,o)=>Yy(e,t,o)||bb(e,t3(t),o),f0=(e,t)=>Ui(e.charAt(t)),MC=(e,t)=>nb(e.charAt(t)),o3=e=>{const t=e.container();return wt(t)&&Yn(t.data,da)},vB=e=>{const t=e.split("");return dn(t,(o,s)=>Ui(o)&&s>0&&s{const a=t.data,c=Ue(t,0);return!o&&f0(a,0)&&!RC(e,c,s)?(t.data=" "+a.slice(1),!0):o&&MC(a,0)&&Yy(e,c,s)?(t.data=da+a.slice(1),!0):!1},s3=e=>{const t=e.data,o=vB(t);return o!==t?(e.data=o,!0):!1},r3=(e,t,o,s)=>{const a=t.data,c=Ue(t,a.length-1);return!o&&f0(a,a.length-1)&&!RC(e,c,s)?(t.data=a.slice(0,-1)+" ",!0):o&&MC(a,a.length-1)&&bb(e,c,s)?(t.data=a.slice(0,-1)+da,!0):!1},a3=(e,t,o)=>{const s=t.container();if(!wt(s))return j.none();if(o3(t)){const a=n3(e,s,!1,o)||s3(s)||r3(e,s,!1,o);return cu(a,t)}else if(RC(e,t,o)){const a=n3(e,s,!0,o)||r3(e,s,!0,o);return cu(a,t)}else return j.none()},_B=e=>{const t=ye.fromDom(e.getBody());e.selection.isCollapsed()&&a3(t,Ue.fromRangeStart(e.selection.getRng()),e.schema).each(o=>{e.selection.setRng(o.toRange())})},i3=(e,t,o,s)=>{if(o===0)return;const a=ye.fromDom(e),c=ii(a,z=>s.isBlock(En(z))).getOr(a),d=e.data.slice(t,t+o),h=t+o>=e.data.length&&bb(c,Ue(e,e.data.length),s),_=t===0&&Yy(c,Ue(e,0),s);e.replaceData(t,o,rp(d,4,_,h))},Hx=(e,t,o)=>{const s=e.data.slice(t),a=s.length-_l(s).length;i3(e,t,a,o)},kr=(e,t,o)=>{const s=e.data.slice(0,t),a=s.length-Vs(s).length;i3(e,t-a,a,o)},m0=(e,t,o,s,a=!0)=>{const c=Vs(e.data).length,d=a?e:t,h=a?t:e;return a?d.appendData(h.data):d.insertData(0,h.data),Jn(ye.fromDom(h)),s&&Hx(d,c,o),d},xB=(e,t)=>{const o=e.container(),s=e.offset();return!Ue.isTextPosition(e)&&o===t.parentNode&&s>Ue.before(t).offset()},wB=(e,t)=>xB(t,e)?Ue(t.container(),t.offset()-1):t,Xy=e=>wt(e)?Ue(e,0):Ue.before(e),Pg=e=>wt(e)?Ue(e,e.data.length):Ue.after(e),Om=e=>rd(e.previousSibling)?j.some(Pg(e.previousSibling)):e.previousSibling?Vd(e.previousSibling):j.none(),BC=e=>rd(e.nextSibling)?j.some(Xy(e.nextSibling)):e.nextSibling?No(e.nextSibling):j.none(),l3=(e,t)=>j.from(t.previousSibling?t.previousSibling:t.parentNode).bind(o=>Fc(e,Ue.before(o))).orThunk(()=>Il(e,Ue.after(t))),c3=(e,t)=>Il(e,Ue.after(t)).orThunk(()=>Fc(e,Ue.before(t))),Vx=(e,t)=>Om(t).orThunk(()=>BC(t)).orThunk(()=>l3(e,t)),kB=(e,t)=>BC(t).orThunk(()=>Om(t)).orThunk(()=>c3(e,t)),LC=(e,t,o)=>e?kB(t,o):Vx(t,o),d3=(e,t,o)=>LC(e,t,o).map($t(wB,o)),PC=(e,t,o)=>{o.fold(()=>{e.focus()},s=>{e.selection.setRng(s.toRange(),t)})},IC=e=>t=>t.dom===e,u3=(e,t)=>t&&Ro(e.schema.getBlockElements(),En(t)),FC=(e,t,o)=>{if(ar(e,t)){const s=ye.fromHtml('
');return o?Le(xa(t),a=>{cx(a)||Jn(a)}):xs(t),fr(t,s),j.some(Ue.before(s.dom))}else return j.none()},CB=(e,t,o,s)=>{const a=Ur(e).filter(Rs),c=ho(e).filter(Rs);return Jn(e),Cd(a,c,t,(d,h,_)=>{const z=d.dom,I=h.dom,$=z.data.length;return m0(z,I,o,s),_.container()===I?Ue(z,$):_}).orThunk(()=>(s&&(a.each(d=>kr(d.dom,d.dom.length,o)),c.each(d=>Hx(d.dom,0,o))),t))},SB=(e,t)=>Ro(e.schema.getTextInlineElements(),En(t)),rl=(e,t,o,s=!0,a=!1)=>{const c=d3(t,e.getBody(),o.dom),d=ii(o,$t(u3,e),IC(e.getBody())),h=CB(o,c,e.schema,SB(e,o));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):d.bind(_=>FC(e.schema,_,a)).fold(()=>{s&&PC(e,t,h)},_=>{s&&PC(e,t,j.some(_))})},f3=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,EB=e=>f3.test(e),yb=(e,t)=>ls(ye.fromDom(t),In(e))&&!zc(e.schema,t)&&e.dom.isEditable(t),p0=e=>{var t;return Ts.DOM.getStyle(e,"direction",!0)==="rtl"||EB((t=e.textContent)!==null&&t!==void 0?t:"")},TB=(e,t,o)=>rt(Ts.DOM.getParents(o.container(),"*",t),e),Ig=(e,t,o)=>{const s=TB(e,t,o);return j.from(s[s.length-1])},m3=(e,t,o)=>{const s=Cg(t,e),a=Cg(o,e);return Fe(s)&&s===a},$C=e=>Lh(e)||hy(e),Gd=(e,t)=>{const o=t.container(),s=t.offset();return e?gm(o)?wt(o.nextSibling)?Ue(o.nextSibling,0):Ue.after(o):Lh(t)?Ue(o,s+1):t:gm(o)?wt(o.previousSibling)?Ue(o.previousSibling,o.previousSibling.data.length):Ue.before(o):hy(t)?Ue(o,s-1):t},p3=$t(Gd,!0),Jy=$t(Gd,!1),HC=(e,t)=>{const o=s=>s.stopImmediatePropagation();e.on("beforeinput input",o,!0),e.getDoc().execCommand(t),e.off("beforeinput input",o)},g3=e=>{e.execCommand("delete")},jx=e=>HC(e,"Delete"),VC=e=>HC(e,"ForwardDelete"),g0=e=>t=>wd(ia(t),e,kn),h3=e=>Rh(e)||pm(e),h0=(e,t)=>_a(e,t)?_r(t,h3,g0(e)):j.none(),Ux=(e,t=!0)=>{e.dom.isEmpty(e.getBody())&&e.setContent("",{no_selection:!t})},b3=(e,t,o)=>va(No(o),Vd(o),(s,a)=>{const c=Gd(!0,s),d=Gd(!1,a),h=Gd(!1,t);return e?Il(o,h).exists(_=>_.isEqual(d)&&t.isEqual(c)):Fc(o,h).exists(_=>_.isEqual(c)&&t.isEqual(d))}).getOr(!0),Bu=e=>(qu(e)?Ur(e):kc(e)).bind(Bu).orThunk(()=>j.some(e)),Zx=(e,t,o,s=!0)=>{var a;t.deleteContents();const c=Bu(o).getOr(o),d=ye.fromDom((a=e.dom.getParent(c.dom,e.dom.isBlock))!==null&&a!==void 0?a:o.dom);if(d.dom===e.getBody()?Ux(e,s):ar(e.schema,d,{checkRootAsContent:!1})&&(Lc(d),s&&e.selection.setCursorLocation(d.dom,0)),!kn(o,d)){const h=wd(ia(d),o)?[]:Uf(d);Le(h.concat(xa(o)),_=>{!kn(_,d)&&!_a(_,d)&&ar(e.schema,_)&&Jn(_)})}},AB=e=>t=>kn(e,t),jC=e=>Mr(e,"td,th"),cs=(e,t)=>fs(ye.fromDom(e),t),OB=e=>va(e.startTable,e.endTable,(t,o)=>{const s=rg(t,c=>kn(c,o)),a=rg(o,c=>kn(c,t));return!s&&!a?e:{...e,startTable:s?j.none():e.startTable,endTable:a?j.none():e.endTable,isSameTable:!1,isMultiTable:!1}}).getOr(e),b0=e=>OB(e),zB=(e,t)=>{const o=cs(e.startContainer,t),s=cs(e.endContainer,t),a=o.isSome(),c=s.isSome(),d=va(o,s,kn).getOr(!1);return b0({startTable:o,endTable:s,isStartInTable:a,isEndInTable:c,isSameTable:d,isMultiTable:!d&&a&&c})},Wx=(e,t)=>({start:e,end:t}),Fg=(e,t,o)=>({rng:e,table:t,cells:o}),Zi=zn.generate([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),$g=(e,t)=>Xr(ye.fromDom(e),"td,th",t),Ip=e=>!kn(e.start,e.end),Tf=(e,t)=>fs(e.start,t).bind(o=>fs(e.end,t).bind(s=>cu(kn(o,s),o))),y0=(e,t)=>!Ip(e)&&Tf(e,t).exists(o=>{const s=o.dom.rows;return s.length===1&&s[0].cells.length===1}),UC=(e,t)=>{const o=$g(e.startContainer,t),s=$g(e.endContainer,t);return va(o,s,Wx)},ZC=e=>t=>fs(t,e).bind(o=>Vo(jC(o)).map(s=>Wx(t,s))),y3=e=>t=>fs(t,e).bind(o=>St(jC(o)).map(s=>Wx(s,t))),qx=e=>t=>Tf(t,e).map(o=>Fg(t,o,jC(o))),v3=(e,t,o,s)=>{if(o.collapsed||!e.forall(Ip))return j.none();if(t.isSameTable){const a=e.bind(qx(s));return j.some({start:a,end:a})}else{const a=$g(o.startContainer,s),c=$g(o.endContainer,s),d=a.bind(ZC(s)).bind(qx(s)),h=c.bind(y3(s)).bind(qx(s));return j.some({start:d,end:h})}},_3=(e,t)=>rs(e,o=>kn(o,t)),Kx=e=>va(_3(e.cells,e.rng.start),_3(e.cells,e.rng.end),(t,o)=>e.cells.slice(t,o+1)),x3=(e,t,o)=>e.exists(s=>y0(s,o)&&Mv(s.start,t)),WC=(e,t)=>{const{startTable:o,endTable:s}=t,a=e.cloneRange();return o.each(c=>a.setStartAfter(c.dom)),s.each(c=>a.setEndBefore(c.dom)),a},w3=(e,t,o,s)=>v3(e,t,o,s).bind(({start:a,end:c})=>a.or(c)).bind(a=>{const{isSameTable:c}=t,d=Kx(a).getOr([]);if(c&&a.cells.length===d.length)return j.some(Zi.fullTable(a.table));if(d.length>0){if(c)return j.some(Zi.partialTable(d,j.none()));{const h=WC(o,t);return j.some(Zi.partialTable(d,j.some({...t,rng:h})))}}else return j.none()}),qC=(e,t,o,s)=>v3(e,t,o,s).bind(({start:a,end:c})=>{const d=a.bind(Kx).getOr([]),h=c.bind(Kx).getOr([]);if(d.length>0&&h.length>0){const _=WC(o,t);return j.some(Zi.multiTable(d,h,_))}else return j.none()}),NB=(e,t)=>{const o=AB(e),s=UC(t,o),a=zB(t,o);return x3(s,t,o)?s.map(c=>Zi.singleCellTable(t,c.start)):a.isMultiTable?qC(s,a,t,o):w3(s,a,t,o)},k3=e=>Le(e,t=>{rn(t,"contenteditable"),Lc(t)}),DB=(e,t)=>j.from(e.dom.getParent(t,e.dom.isBlock)).map(ye.fromDom),zm=(e,t,o)=>{o.each(s=>{t?Jn(s):(Lc(s),e.selection.setCursorLocation(s.dom,0))})},vb=(e,t,o,s)=>{const a=o.cloneRange();s?(a.setStart(o.startContainer,o.startOffset),a.setEndAfter(t.dom.lastChild)):(a.setStartBefore(t.dom.firstChild),a.setEnd(o.endContainer,o.endOffset)),YC(e,a,t,!1).each(c=>c())},KC=e=>{const t=wf(e),o=ye.fromDom(e.selection.getNode());ef(o.dom)&&ar(e.schema,o)?e.selection.setCursorLocation(o.dom,0):e.selection.collapse(!0),t.length>1&&Bn(t,s=>kn(s,o))&&Rr(o,"data-mce-selected","1")},GC=(e,t,o)=>j.some(()=>{const s=e.selection.getRng(),a=o.bind(({rng:c,isStartInTable:d})=>{const h=DB(e,d?c.endContainer:c.startContainer);c.deleteContents(),zm(e,d,h.filter($t(ar,e.schema)));const _=d?t[0]:t[t.length-1];return vb(e,_,s,d),ar(e.schema,_)?j.none():j.some(d?t.slice(1):t.slice(0,-1))}).getOr(t);k3(a),KC(e)}),C3=(e,t,o,s)=>j.some(()=>{const a=e.selection.getRng(),c=t[0],d=o[o.length-1];vb(e,c,a,!0),vb(e,d,a,!1);const h=ar(e.schema,c)?t:t.slice(1),_=ar(e.schema,d)?o:o.slice(0,-1);k3(h.concat(_)),s.deleteContents(),KC(e)}),YC=(e,t,o,s=!0)=>j.some(()=>{Zx(e,t,o,s)}),Hg=(e,t)=>j.some(()=>rl(e,!1,t)),RB=(e,t,o)=>NB(t,o).bind(s=>s.fold($t(YC,e),$t(Hg,e),$t(GC,e),$t(C3,e))),MB=(e,t)=>Gx(e,t),BB=(e,t,o,s)=>XC(t,s).fold(()=>RB(e,t,o),a=>MB(e,a)),LB=(e,t,o)=>{const s=ye.fromDom(e.getBody()),a=e.selection.getRng();return o.length!==0?GC(e,o,j.none()):BB(e,s,a,t)},S3=(e,t)=>On(jc(t,e),Bc),XC=(e,t)=>On(jc(t,e),Ed("caption")),PB=(e,t,o,s,a)=>tb(o,e.getBody(),a).bind(c=>S3(t,ye.fromDom(c.getNode())).bind(d=>kn(d,s)?j.none():j.some(dt))),Gx=(e,t)=>j.some(()=>{Lc(t),e.selection.setCursorLocation(t.dom,0)}),IB=(e,t,o,s)=>No(e.dom).bind(a=>Vd(e.dom).map(c=>t?o.isEqual(a)&&s.isEqual(c):o.isEqual(c)&&s.isEqual(a))).getOr(!0),Yx=(e,t)=>Gx(e,t),FB=(e,t,o)=>XC(e,ye.fromDom(o.getNode())).fold(()=>j.some(dt),s=>cu(!kn(s,t),dt)),v0=(e,t,o,s,a)=>tb(o,e.getBody(),a).fold(()=>j.some(dt),c=>IB(s,o,a,c)?Yx(e,s):FB(t,s,c)),JC=(e,t,o,s)=>{const a=Ue.fromRangeStart(e.selection.getRng());return S3(o,s).bind(c=>ar(e.schema,c,{checkRootAsContent:!1})?Gx(e,c):PB(e,o,t,c,a))},_b=(e,t,o,s)=>{const a=Ue.fromRangeStart(e.selection.getRng());return ar(e.schema,s)?Gx(e,s):v0(e,o,t,s,a)},Vg=(e,t)=>e?ZO(t):Ky(t),Xx=(e,t)=>{const o=Ue.fromRangeStart(e.selection.getRng());return Vg(t,o)||dd(t,e.getBody(),o).exists(s=>Vg(t,s))},Jx=(e,t,o)=>{const s=ye.fromDom(e.getBody());return XC(s,o).fold(()=>JC(e,t,s,o).orThunk(()=>cu(Xx(e,t),dt)),a=>_b(e,t,s,a))},Fp=(e,t)=>{const o=ye.fromDom(e.selection.getStart(!0)),s=wf(e);return e.selection.isCollapsed()&&s.length===0?Jx(e,t,o):LB(e,o,s)},Yd=(e,t)=>{let o=t;for(;o&&o!==e;){if(Ml(o)||Ho(o))return o;o=o.parentNode}return null},Qx=["data-ephox-","data-mce-","data-alloy-","data-snooker-","_"],ew=zt.each,tw=e=>{const t=e.dom,o=new Set(e.serializer.getTempAttrs()),s=(c,d)=>{if(c.nodeName!==d.nodeName||c.nodeType!==d.nodeType)return!1;const h=z=>{const I={};return ew(t.getAttribs(z),$=>{const V=$.nodeName.toLowerCase();V!=="style"&&!a(V)&&(I[V]=t.getAttrib(z,V))}),I},_=(z,I)=>{for(const $ in z)if(Ro(z,$)){const V=I[$];if(ln(V)||z[$]!==V)return!1;delete I[$]}for(const $ in I)if(Ro(I,$))return!1;return!0};return no(c)&&no(d)&&(!_(h(c),h(d))||!_(t.parseStyle(t.getAttrib(c,"style")),t.parseStyle(t.getAttrib(d,"style"))))?!1:!fd(c)&&!fd(d)},a=c=>Bn(Qx,d=>vs(c,d))||o.has(c);return{compare:s,isAttributeInternal:a}},ow=e=>["h1","h2","h3","h4","h5","h6"].includes(e.name),QC=e=>e.name==="summary",E3=(e,t)=>{let o=e;for(;o=o.walk();)t(o)},eS=(e,t,o,s)=>{const a=o.name;for(let c=0,d=e.length;c{const s={nodes:{},attributes:{}};return o.firstChild&&E3(o,a=>{eS(e,t,a,s)}),s},tS=(e,t)=>{const o=(s,a)=>{nn(s,c=>{const d=an(c.nodes);Le(c.filter.callbacks,h=>{for(let _=d.length-1;_>=0;_--){const z=d[_];(!(a?z.attr(c.filter.name)!==void 0:z.name===c.filter.name)||uo(z.parent))&&d.splice(_,1)}d.length>0&&h(d,c.filter.name,t)})})};o(e.nodes,!1),o(e.attributes,!0)},oS=(e,t,o,s={})=>{const a=Qy(e,t,o);tS(a,s)},nw=(e,t,o,s)=>{if((e.pad_empty_with_br||t.insert)&&o(s)){const c=new gi("br",1);t.insert&&c.attr("data-mce-bogus","1"),s.empty().append(c)}else s.empty().append(new gi("#text",3)).value=da},sw=e=>{var t;return nS(e,"#text")&&((t=e==null?void 0:e.firstChild)===null||t===void 0?void 0:t.value)===da},nS=(e,t)=>{const o=e==null?void 0:e.firstChild;return Fe(o)&&o===e.lastChild&&o.name===t},T3=(e,t)=>{const o=e.getElementRule(t.name);return(o==null?void 0:o.paddEmpty)===!0},e1=(e,t,o,s)=>s.isEmpty(t,o,a=>T3(e,a)),A3=(e,t)=>Fe(e)&&(t(e)||e.name==="br"),$p=e=>{let t;for(let o=e;o;o=o.parent){const s=o.attr("contenteditable");if(s==="false")break;s==="true"&&(t=o)}return j.from(t)},Nm=(e,t,o=e.parent)=>{if(t.getSpecialElements()[e.name])e.empty().remove();else{const s=e.children();for(const a of s)o&&!t.isValidChild(o.name,a.name)&&Nm(a,t,o);e.unwrap()}},pd=(e,t,o,s=dt)=>{const a=t.getTextBlockElements(),c=t.getNonEmptyElements(),d=t.getWhitespaceElements(),h=zt.makeMap("tr,td,th,tbody,thead,tfoot,table,summary"),_=new Set,z=I=>I!==o&&!h[I.name];for(let I=0;I1)if(_0(t,$,V))Nm($,t);else{oe.reverse(),ee=oe[0].clone(),s(ee);let fe=ee;for(let ke=0;ke0?(le=oe[ke].clone(),s(le),fe.append(le)):le=fe;for(let Oe=oe[ke].firstChild;Oe&&Oe!==oe[ke+1];){const Te=Oe.next;le.append(Oe),Oe=Te}fe=le}e1(t,c,d,ee)?V.insert($,oe[0],!0):(V.insert(ee,oe[0],!0),V.insert($,ee)),V=oe[0],(e1(t,c,d,V)||nS(V,"br"))&&V.empty().remove()}else if($.parent){if($.name==="li"){let fe=$.prev;if(fe&&(fe.name==="ul"||fe.name==="ol")){fe.append($);continue}if(fe=$.next,fe&&(fe.name==="ul"||fe.name==="ol")&&fe.firstChild){fe.insert($,fe.firstChild,!0);continue}const ke=new gi("ul",1);s(ke),$.wrap(ke);continue}if(t.isValidChild($.parent.name,"div")&&t.isValidChild("div",$.name)){const fe=new gi("div",1);s(fe),$.wrap(fe)}else Nm($,t)}}},sS=(e,t)=>{let o=e;for(;o;){if(o.name===t)return!0;o=o.parent}return!1},_0=(e,t,o=t.parent)=>o?e.children[t.name]&&!e.isValidChild(o.name,t.name)||t.name==="a"&&sS(o,"a")?!0:QC(o)&&ow(t)?!((o==null?void 0:o.firstChild)===t&&(o==null?void 0:o.lastChild)===t):!1:!1,O3=(e,t,o,s)=>{const a=document.createRange();return a.setStart(e,t),a.setEnd(o,s),a},z3=e=>{const t=Ue.fromRangeStart(e),o=Ue.fromRangeEnd(e),s=e.commonAncestorContainer;return dd(!1,s,o).map(a=>!wm(t,o,s)&&wm(t,a,s)?O3(t.container(),t.offset(),a.container(),a.offset()):e).getOr(e)},rw=e=>e.collapsed?e:z3(e),rS=e=>Fe(e.firstChild)&&e.firstChild===e.lastChild,N3=e=>e.name==="br"||e.value===da,D3=(e,t)=>e.getBlockElements()[t.name]&&rS(t)&&N3(t.firstChild),aS=(e,t)=>{const o=e.getNonEmptyElements();return Fe(t)&&(t.isEmpty(o)||D3(e,t))},Dm=(e,t)=>{let o=t.firstChild,s=t.lastChild;return o&&o.name==="meta"&&(o=o.next),s&&s.attr("id")==="mce_marker"&&(s=s.prev),aS(e,s)&&(s=s==null?void 0:s.prev),!o||o!==s?!1:o.name==="ul"||o.name==="ol"},Lu=e=>{var t,o;const s=e.firstChild,a=e.lastChild;return s&&s.nodeName==="META"&&((t=s.parentNode)===null||t===void 0||t.removeChild(s)),a&&a.id==="mce_marker"&&((o=a.parentNode)===null||o===void 0||o.removeChild(a)),e},aw=(e,t,o)=>{const s=t.serialize(o),a=e.createFragment(s);return Lu(a)},R3=e=>{var t;return rt((t=e==null?void 0:e.childNodes)!==null&&t!==void 0?t:[],o=>o.nodeName==="LI")},iw=e=>e.data===da||$s(e),M3=e=>Fe(e==null?void 0:e.firstChild)&&e.firstChild===e.lastChild&&iw(e.firstChild),B3=e=>!e.firstChild||M3(e),L3=e=>e.length>0&&B3(e[e.length-1])?e.slice(0,-1):e,lw=(e,t)=>{const o=e.getParent(t,e.isBlock);return o&&o.nodeName==="LI"?o:null},P3=(e,t)=>!!lw(e,t),I3=(e,t)=>{const o=t.cloneRange(),s=t.cloneRange();return o.setStartBefore(e),s.setEndAfter(e),[o.cloneContents(),s.cloneContents()]},cw=(e,t)=>{const o=Ue.before(e),a=So(t).next(o);return a?a.toRange():null},dw=(e,t)=>{const o=Ue.after(e),a=So(t).prev(o);return a?a.toRange():null},F3=(e,t,o,s)=>{const a=I3(e,s),c=e.parentNode;return c&&(c.insertBefore(a[0],e),zt.each(t,d=>{c.insertBefore(d,e)}),c.insertBefore(a[1],e),c.removeChild(e)),dw(t[t.length-1],o)},iS=(e,t,o)=>{const s=e.parentNode;return s&&zt.each(t,a=>{s.insertBefore(a,e)}),cw(e,o)},$B=(e,t,o,s)=>(s.insertAfter(t.reverse(),e),dw(t[0],o)),HB=(e,t,o,s)=>{const a=aw(t,e,s),c=lw(t,o.startContainer),d=L3(R3(a.firstChild)),h=1,_=2,z=t.getRoot(),I=$=>{const V=Ue.fromRangeStart(o),ee=So(t.getRoot()),le=$===h?ee.prev(V):ee.next(V),oe=le==null?void 0:le.getNode();return oe?lw(t,oe)!==c:!0};return c?I(h)?iS(c,d,z):I(_)?$B(c,d,z,t):F3(c,d,z,o):null},VB=["pre"],jB=(e,t,o,s)=>{var a;const c=t.firstChild,d=t.lastChild,h=d.attr("data-mce-type")==="bookmark"?d.prev:d,_=c===h,z=mn(VB,c.name);if(_&&z){const I=c.attr("contenteditable")!=="false",$=((a=e.getParent(o,e.isBlock))===null||a===void 0?void 0:a.nodeName.toLowerCase())===c.name,V=j.from(Yd(s,o)).forall(Ml);return I&&$&&V}else return!1},lS=ef,UB=(e,t,o)=>{if(Fe(o)){const s=e.getParent(t.endContainer,lS);return o===s&&Mv(ye.fromDom(o),t)}else return!1},uw=(e,t,o)=>{var s;if(o.getAttribute("data-mce-bogus")==="all")(s=o.parentNode)===null||s===void 0||s.insertBefore(e.dom.createFragment(t),o);else{const a=o.firstChild,c=o.lastChild;!a||a===c&&a.nodeName==="BR"?e.dom.setHTML(o,t):e.selection.setContent(t,{no_events:!0})}},cS=(e,t,o)=>{j.from(e.getParent(t,"td,th")).map(ye.fromDom).each(s=>sv(s,o))},$3=(e,t)=>{const o=e.schema.getTextInlineElements(),s=e.dom;if(t){const a=e.getBody(),c=tw(e),d="*[data-mce-fragment]",h=s.select(d);zt.each(h,_=>{const z=V=>Fe(o[V.nodeName.toLowerCase()]),I=V=>V.childNodes.length===1;if((V=>!(_C(s,V)||$O(s,V)))(_)&&z(_)&&I(_)){const V=mb(s,_),ee=(ke,Oe)=>Hs(ke,Te=>mn(Oe,Te)),le=ke=>I(_)&&s.is(ke,d)&&z(ke)&&(ke.nodeName===_.nodeName&&ee(V,mb(s,ke))||le(ke.children[0])),oe=ke=>Fe(ke)&&ke!==a&&(c.compare(_,ke)||oe(ke.parentElement)),fe=ke=>Fe(ke)&&ke!==a&&s.is(ke,d)&&(bB(s,_,ke)||fe(ke.parentElement));(le(_.children[0])||oe(_.parentElement)&&!fe(_.parentElement))&&s.remove(_,!0)}})}},dS=e=>{let t=e;for(;t=t.walk();)t.type===1&&t.attr("data-mce-fragment","1")},ZB=e=>{zt.each(e.getElementsByTagName("*"),t=>{t.removeAttribute("data-mce-fragment")})},WB=e=>!!e.getAttribute("data-mce-fragment"),qB=(e,t)=>Fe(t)&&!e.schema.getVoidElements()[t.nodeName],KB=(e,t)=>{var o,s,a;let c;const d=e.dom,h=e.selection;if(!t)return;h.scrollIntoView(t);const _=Yd(e.getBody(),t);if(_&&d.getContentEditable(_)==="false"){d.remove(t),h.select(_);return}let z=d.createRng();const I=t.previousSibling;if(wt(I)){z.setStart(I,(s=(o=I.nodeValue)===null||o===void 0?void 0:o.length)!==null&&s!==void 0?s:0);const ee=t.nextSibling;wt(ee)&&(I.appendData(ee.data),(a=ee.parentNode)===null||a===void 0||a.removeChild(ee))}else z.setStartBefore(t),z.setEndBefore(t);const $=ee=>{let le=Ue.fromRangeStart(ee);return le=So(e.getBody()).next(le),le==null?void 0:le.toRange()},V=d.getParent(t,d.isBlock);if(d.remove(t),V&&d.isEmpty(V)){const ee=lS(V);xs(ye.fromDom(V)),z.setStart(V,0),z.setEnd(V,0),!ee&&!WB(V)&&(c=$(z))?(z=c,d.remove(V)):d.add(V,d.create("br",ee?{}:{"data-mce-bogus":"1"}))}h.setRng(z)},GB=e=>{const t=e.dom,o=rw(e.selection.getRng());e.selection.setRng(o);const s=t.getParent(o.startContainer,lS);UB(t,o,s)?YC(e,o,ye.fromDom(s)):o.startContainer===o.endContainer&&o.endOffset-o.startOffset===1&&wt(o.startContainer.childNodes[o.startOffset])?o.deleteContents():e.getDoc().execCommand("Delete",!1)},YB=e=>{for(let t=e;t;t=t.walk())if(t.attr("id")==="mce_marker")return j.some(t);return j.none()},fw=(e,t,o)=>{var s;return Bn(o.children(),ow)&&((s=e.getParent(t,e.isBlock))===null||s===void 0?void 0:s.nodeName)==="SUMMARY"},mw=(e,t,o)=>{var s,a;const c=e.selection,d=e.dom,h=e.parser,_=o.merge,z=Lp({validate:!0},e.schema),I='';o.preserve_zwsp||(t=nl(t)),t.indexOf("{$caret}")===-1&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,I);let $=c.getRng();const V=$.startContainer,ee=e.getBody();V===ee&&c.isCollapsed()&&d.isBlock(ee.firstChild)&&qB(e,ee.firstChild)&&d.isEmpty(ee.firstChild)&&($=d.createRng(),$.setStart(ee.firstChild,0),$.setEnd(ee.firstChild,0),c.setRng($)),c.isCollapsed()||GB(e);const le=c.getNode(),oe={context:le.nodeName.toLowerCase(),data:o.data,insert:!0},fe=h.parse(t,oe);if(o.paste===!0&&Dm(e.schema,fe)&&P3(d,le))return $=HB(z,d,c.getRng(),fe),$&&c.setRng($),t;o.paste===!0&&jB(d,fe,le,e.getBody())&&((s=fe.firstChild)===null||s===void 0||s.unwrap()),dS(fe);let ke=fe.lastChild;if(ke&&ke.attr("id")==="mce_marker"){const Oe=ke;for(ke=ke.prev;ke;ke=ke.walk(!0))if(ke.type===3||!d.isBlock(ke.name)){ke.parent&&e.schema.isValidChild(ke.parent.name,"span")&&ke.parent.insert(Oe,ke,ke.name==="br");break}}if(e._selectionOverrides.showBlockCaretContainer(le),!oe.invalid&&!fw(d,le,fe))t=z.serialize(fe),uw(e,t,le);else{e.selection.setContent(I);let Oe=c.getNode(),Te;const Pe=e.getBody();for(lo(Oe)?Oe=Te=Pe:Te=Oe;Te&&Te!==Pe;)Oe=Te,Te=Te.parentNode;t=Oe===Pe?Pe.innerHTML:d.getOuterHTML(Oe);const ht=h.parse(t),Mt=YB(ht),Yt=Mt.bind($p).getOr(ht);Mt.each(to=>to.replace(fe));const Qe=fe.children(),Ve=(a=fe.parent)!==null&&a!==void 0?a:ht;fe.unwrap();const mt=rt(Qe,to=>_0(e.schema,to,Ve));pd(mt,e.schema,Yt),oS(h.getNodeFilters(),h.getAttributeFilters(),ht),t=z.serialize(ht),Oe===Pe?d.setHTML(Pe,t):d.setOuterHTML(Oe,t)}return $3(e,_),KB(e,d.get("mce_marker")),ZB(e.getBody()),cS(d,c.getStart(),e.schema),ea(e.schema,e.getBody(),c.getStart()),t},xb=e=>e instanceof gi,XB=e=>{jy(e)&&No(e.getBody()).each(t=>{const o=t.getNode(),s=tc(o)?No(o).getOr(t):t;e.selection.setRng(s.toRange())})},uS=(e,t,o)=>{e.dom.setHTML(e.getBody(),t),o!==!0&&XB(e)},JB=(e,t,o,s)=>{if(o=nl(o),o.length===0||/^\s+$/.test(o)){const a='
';t.nodeName==="TABLE"?o=""+a+"":/^(UL|OL)$/.test(t.nodeName)&&(o="
  • "+a+"
  • ");const c=ji(e);return e.schema.isValidChild(t.nodeName.toLowerCase(),c.toLowerCase())?(o=a,o=e.dom.createHTML(c,hv(e),o)):o||(o=a),uS(e,o,s.no_selection),{content:o,html:o}}else{s.format!=="raw"&&(o=Lp({validate:!1},e.schema).serialize(e.parser.parse(o,{isRootContent:!0,insert:!0})));const a=Bh(ye.fromDom(t))?o:zt.trim(o);return uS(e,a,s.no_selection),{content:a,html:a}}},QB=(e,t,o,s)=>{oS(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),o);const a=Lp({validate:!1},e.schema).serialize(o),c=nl(Bh(ye.fromDom(t))?a:zt.trim(a));return uS(e,c,s.no_selection),{content:o,html:c}},eL=(e,t,o)=>j.from(e.getBody()).map(s=>xb(t)?QB(e,s,t,o):JB(e,s,t,o)).getOr({content:t,html:xb(o.content)?"":o.content}),H3=e=>Gt(e)?e:fn,Pu=(e,t,o)=>{let s=e.dom;const a=H3(o);for(;s.parentNode;){s=s.parentNode;const c=ye.fromDom(s),d=t(c);if(d.isSome())return d;if(a(c))break}return j.none()},x0=(e,t,o)=>{const s=t(e),a=H3(o);return s.orThunk(()=>a(e)?j.none():Pu(e,t,a))},pw=Fy,fS=(e,t,o)=>{const s=e.formatter.get(o);if(s)for(let a=0;a{const c=e.dom.getRoot();if(t===c)return!1;const d=e.dom.getParent(t,h=>fS(e,h,o)?!0:h.parentNode===c||!!Rm(e,h,o,s,!0));return!!Rm(e,d,o,s,a)},hw=(e,t,o)=>Ja(o)&&pw(t,o.inline)||kf(o)&&pw(t,o.block)?!0:$c(o)?no(t)&&e.is(t,o.selector):!1,mS=(e,t,o,s,a,c)=>{const d=o[s],h=s==="attributes";if(Gt(o.onmatch))return o.onmatch(t,o,s);if(d){if(Vt(d)){for(let _=0;_{const c=e.formatter.get(o),d=e.dom;if(c&&no(t))for(let h=0;h{if(s)return gw(e,s,t,o,a);if(s=e.selection.getNode(),gw(e,s,t,o,a))return!0;const c=e.selection.getStart();return!!(c!==s&&gw(e,c,t,o,a))},V3=(e,t,o)=>{const s=[],a={},c=e.selection.getStart();return e.dom.getParent(c,d=>{for(let h=0;h{const o=a=>kn(a,ye.fromDom(e.getBody())),s=(a,c)=>Rm(e,a.dom,c)?j.some(c):j.none();return j.from(e.selection.getStart(!0)).bind(a=>x0(ye.fromDom(a),c=>Kr(t,d=>s(c,d)),o)).getOrNull()},U3=(e,t)=>{const o=e.formatter.get(t),s=e.dom;if(o&&e.selection.isEditable()){const a=e.selection.getStart(),c=Pv(s,a);for(let d=o.length-1;d>=0;d--){const h=o[d];if(!$c(h))return!0;for(let _=c.length-1;_>=0;_--)if(s.is(c[_],h.selector))return!0}}return!1},pS=(e,t,o)=>ko(o,(s,a)=>{const c=NA(e,a);return e.formatter.matchNode(t,a,{},c)?s.concat([a]):s},[]),w0=ua,tL=(e,t)=>e.importNode(t,!0),Z3=e=>{if(e){const t=new Ma(e,e);for(let o=t.current();o;o=t.next())if(wt(o))return o}return null},Mm=e=>{const t=ye.fromTag("span");return Ha(t,{id:My,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&fr(t,ye.fromText(w0)),t},gS=e=>{const t=Z3(e);return t&&t.data.charAt(0)===w0&&t.deleteData(0,1),t},hS=(e,t,o)=>{const s=e.dom,a=e.selection;if(I2(t))rl(e,!1,ye.fromDom(t),o,!0);else{const c=a.getRng(),d=s.getParent(t,s.isBlock),h=c.startContainer,_=c.startOffset,z=c.endContainer,I=c.endOffset,$=gS(t);s.remove(t,!0),h===$&&_>0&&c.setStart($,_-1),z===$&&I>0&&c.setEnd($,I-1),d&&s.isEmpty(d)&&Lc(ye.fromDom(d)),a.setRng(c)}},bS=(e,t,o)=>{const s=e.dom,a=e.selection;if(t)hS(e,t,o);else if(t=Sg(e.getBody(),a.getStart()),!t)for(;t=s.get(My);)hS(e,t,o)},wb=(e,t,o)=>{var s,a;const c=e.dom,d=c.getParent(o,$t(rx,e.schema));d&&c.isEmpty(d)?(s=o.parentNode)===null||s===void 0||s.replaceChild(t,o):(sc(ye.fromDom(o)),c.isEmpty(o)?(a=o.parentNode)===null||a===void 0||a.replaceChild(t,o):c.insertAfter(t,o))},yS=(e,t)=>(e.appendChild(t),t),k0=(e,t)=>{var o;const s=ao(e,(c,d)=>yS(c,d.cloneNode(!1)),t),a=(o=s.ownerDocument)!==null&&o!==void 0?o:document;return yS(s,a.createTextNode(w0))},oL=(e,t,o,s,a,c)=>{const d=e.formatter,h=e.dom,_=rt(vt(d.get()),$=>$!==s&&!Yn($,"removeformat")),z=pS(e,o,_);if(rt(z,$=>!DA(e,$,s)).length>0){const $=o.cloneNode(!1);return h.add(t,$),d.remove(s,a,$,c),h.remove($),j.some($)}else return j.none()},W3=e=>zh(e,mm(e).replace(new RegExp(`${da}$`)," ")),vS=(e,t)=>{const o=()=>{t!==null&&!e.dom.isEmpty(t)&&Ur(ye.fromDom(t)).each(s=>{Rs(s)?W3(s):ca(s,a=>Rs(a)).each(a=>{Rs(a)&&W3(a)})})};e.once("input",s=>{s.data&&!nb(s.data)&&(s.isComposing?e.once("compositionend",()=>{o()}):o())})},Hp=(e,t,o)=>{let s;const a=e.selection,c=e.formatter.get(t);if(!c)return;const d=a.getRng();let h=d.startOffset;const z=d.startContainer.nodeValue;s=Sg(e.getBody(),a.getStart());const I=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(z&&h>0&&h{const a=e.dom,c=e.selection;let d=!1;const h=e.formatter.get(t);if(!h)return;const _=c.getRng(),z=_.startContainer,I=_.startOffset;let $=z;wt(z)&&(I!==z.data.length&&(d=!0),$=$.parentNode);const V=[];let ee;for(;$;){if(Rm(e,$,t,o,s)){ee=$;break}$.nextSibling&&(d=!0),V.push($),$=$.parentNode}if(ee)if(d){const le=c.getBookmark();_.collapse(!0);let oe=Ag(a,_,h,!0);oe=Qv(oe),e.formatter.remove(t,o,oe,s),c.moveToBookmark(le)}else{const le=Sg(e.getBody(),ee),oe=Fe(le)?a.getParents(ee.parentNode,zo,le):[],fe=Mm(!1).dom;wb(e,fe,le??ee);const ke=oL(e,fe,ee,t,o,s),Oe=k0([...V,...ke.toArray(),...oe],fe);le&&hS(e,le,Fe(le)),c.setCursorLocation(Oe,1),vS(e,fe),a.isEmpty(ee)&&a.remove(ee)}},xS=(e,t,o)=>{const s=e.selection,a=e.getBody();bS(e,null,o),(t===8||t===46)&&s.isCollapsed()&&s.getStart().innerHTML===w0&&bS(e,Sg(a,s.getStart()),!0),(t===37||t===39)&&bS(e,Sg(a,s.getStart()),!0)},wS=e=>wt(e)&&Yi(e.data,da),q3=e=>{e.on("mouseup keydown",t=>{xS(e,t.keyCode,wS(e.selection.getRng().endContainer))})},kS=e=>{const t=Mm(!1),o=k0(e,t.dom);return{caretContainer:t,caretPosition:Ue(o,0)}},CS=(e,t)=>{const{caretContainer:o,caretPosition:s}=kS(t);return Zs(ye.fromDom(e),o),Jn(ye.fromDom(e)),s},nL=(e,t)=>{const{caretContainer:o,caretPosition:s}=kS(t);return e.insertNode(o.dom),s},t1=(e,t)=>{if(ud(t.dom))return!1;const o=e.schema.getTextInlineElements();return Ro(o,En(t))&&!ud(t.dom)&&!Md(t.dom)},Ug={},SS=ka(["pre"]),K3=(e,t)=>{Ug[e]||(Ug[e]=[]),Ug[e].push(t)},G3=(e,t)=>{Ro(Ug,e)&&Le(Ug[e],o=>{o(t)})};K3("pre",e=>{const t=e.selection.getRng(),o=a=>c=>{const d=c.previousSibling;return SS(d)&&mn(a,d)},s=(a,c)=>{const d=ye.fromDom(c),h=fl(d).dom;Jn(d),xr(ye.fromDom(a),[ye.fromTag("br",h),ye.fromTag("br",h),...xa(d)])};if(!t.collapsed){const a=e.selection.getSelectedBlocks(),c=rt(rt(a,SS),o(a));Le(c,d=>{s(d.previousSibling,d)})}});const ES=["fontWeight","fontStyle","color","fontSize","fontFamily"],bw=e=>ue(e.styles)&&Bn(vt(e.styles),t=>mn(ES,t)),TS=e=>On(e,t=>Ja(t)&&t.inline==="span"&&bw(t)),o1=(e,t)=>{const o=e.get(t);return ve(o)?TS(o):j.none()},Y3=(e,t)=>Fc(t,Ue.fromRangeStart(e)).isNone(),AS=(e,t)=>Il(t,Ue.fromRangeEnd(e)).exists(o=>!$s(o.getNode())||Il(t,o).isSome())===!1,X3=e=>t=>lg(t)&&e.isEditable(t),sL=e=>{const t=e.getSelectedBlocks(),o=e.getRng();if(e.isCollapsed())return[];if(t.length===1)return Y3(o,t[0])&&AS(o,t[0])?t:[];{const s=St(t).filter(d=>Y3(o,d)).toArray(),a=Vo(t).filter(d=>AS(o,d)).toArray(),c=t.slice(1,-1);return s.concat(c).concat(a)}},J3=e=>rt(sL(e),X3(e.dom)),OS=e=>rt(e.getSelectedBlocks(),X3(e.dom)),zS=zt.each,yw=e=>no(e)&&!fd(e)&&!ud(e)&&!Md(e),Zg=(e,t)=>{for(let o=e;o;o=o[t]){if(wt(o)&&Pn(o.data))return e;if(no(o)&&!fd(o))return o}return e},NS=(e,t,o)=>{const s=tw(e),a=ec(t)&&e.dom.isEditable(t),c=ec(o)&&e.dom.isEditable(o);if(a&&c){const d=Zg(t,"previousSibling"),h=Zg(o,"nextSibling");if(s.compare(d,h)){for(let _=d.nextSibling;_&&_!==h;){const z=_;_=_.nextSibling,d.appendChild(z)}return e.dom.remove(h),zt.each(zt.grep(h.childNodes),_=>{d.appendChild(_)}),d}}return o},vw=(e,t,o,s)=>{var a;if(s&&t.merge_siblings!==!1){const c=(a=NS(e,sb(s),s))!==null&&a!==void 0?a:s;NS(e,c,sb(c,!0))}},Q3=(e,t,o)=>{if(t.clear_child_styles){const s=t.links?"*:not(a)":"*";zS(e.select(s,o),a=>{yw(a)&&e.isEditable(a)&&zS(t.styles,(c,d)=>{e.setStyle(a,d,"")})})}},C0=(e,t,o)=>{zS(e.childNodes,s=>{yw(s)&&(t(s)&&o(s),s.hasChildNodes()&&C0(s,t,o))})},Wg=(e,t)=>{t.nodeName==="SPAN"&&e.getAttribs(t).length===0&&e.remove(t,!0)},DS=(e,t)=>o=>!!(o&&Lv(e,o,t)),gd=(e,t,o)=>s=>{e.setStyle(s,t,o),s.getAttribute("style")===""&&s.removeAttribute("style"),Wg(e,s)},Xd=zn.generate([{keep:[]},{rename:["name"]},{removed:[]}]),RS=/^(src|href|style)$/,_w=zt.each,xw=Fy,ez=e=>/^(TR|TH|TD)$/.test(e.nodeName),kb=(e,t,o)=>e.isChildOf(t,o)&&t!==o&&!e.isBlock(o),S0=(e,t,o)=>{let s=t[o?"startContainer":"endContainer"],a=t[o?"startOffset":"endOffset"];if(no(s)){const c=s.childNodes.length-1;!o&&a&&a--,s=s.childNodes[a>c?c:a]}return wt(s)&&o&&a>=s.data.length&&(s=new Ma(s,e.getBody()).next()||s),wt(s)&&!o&&a===0&&(s=new Ma(s,e.getBody()).prev()||s),s},MS=(e,t)=>{const o=t?"firstChild":"lastChild",s=e[o];return ez(e)&&s?e.nodeName==="TR"&&s[o]||s:e},ww=(e,t,o,s)=>{var a;const c=e.create(o,s);return(a=t.parentNode)===null||a===void 0||a.insertBefore(c,t),c.appendChild(t),c},kw=(e,t,o,s,a)=>{const c=ye.fromDom(t),d=ye.fromDom(e.create(s,a)),h=o?fu(c):xc(c);return xr(d,h),o?(Zs(c,d),Wa(d,c)):(Ne(c,d),fr(d,c)),d.dom},rL=(e,t)=>t.links&&e.nodeName==="A",tz=(e,t,o)=>{const s=t.parentNode;let a;const c=e.dom,d=ji(e);kf(o)&&s===c.getRoot()&&(!o.list_block||!xw(t,o.list_block))&&Le(an(t.childNodes),h=>{Eg(e,d,h.nodeName.toLowerCase())?a?a.appendChild(h):(a=ww(c,h,d),c.setAttribs(a,hv(e))):a=null}),!(BA(o)&&!xw(o.inline,t))&&c.remove(t,!0)},BS=(e,t,o)=>D(e)?{name:t,value:null}:{name:e,value:Np(t,o)},oz=(e,t)=>{e.getAttrib(t,"style")===""&&(t.removeAttribute("style"),t.removeAttribute("data-mce-style"))},Uc=(e,t,o,s,a)=>{let c=!1;_w(o.styles,(d,h)=>{const{name:_,value:z}=BS(h,d,s),I=ax(z,_);(o.remove_similar||ot(z)||!no(a)||xw(Lv(e,a,_),I))&&e.setStyle(t,_,""),c=!0}),c&&oz(e,t)},LS=(e,t,o)=>{t==="removeformat"?Le(OS(e.selection),s=>{Le(ES,a=>e.dom.setStyle(s,a,"")),oz(e.dom,s)}):o1(e.formatter,t).each(s=>{Le(OS(e.selection),a=>Uc(e.dom,a,s,o,null))})},PS=(e,t,o,s,a)=>{const c=e.dom,d=tw(e),h=e.schema;if(Ja(t)&&oc(h,t.inline)&&zc(h,s)&&s.parentElement===e.getBody())return tz(e,s,t),Xd.removed();if(!t.ceFalseOverride&&s&&c.getContentEditableParent(s)==="false"||s&&!hw(c,s,t)&&!rL(s,t))return Xd.keep();const _=s,z=t.preserve_attributes;if(Ja(t)&&t.remove==="all"&&ve(z)){const I=rt(c.getAttribs(_),$=>mn(z,$.name.toLowerCase()));if(c.removeAllAttribs(_),Le(I,$=>c.setAttrib(_,$.name,$.value)),I.length>0)return Xd.rename("span")}if(t.remove!=="all"){Uc(c,_,t,o,a),_w(t.attributes,($,V)=>{const{name:ee,value:le}=BS(V,$,o);if(t.remove_similar||ot(le)||!no(a)||xw(c.getAttrib(a,ee),le)){if(ee==="class"){const oe=c.getAttrib(_,ee);if(oe){let fe="";if(Le(oe.split(/\s+/),ke=>{/mce\-\w+/.test(ke)&&(fe+=(fe?" ":"")+ke)}),fe){c.setAttrib(_,ee,fe);return}}}if(RS.test(ee)&&_.removeAttribute("data-mce-"+ee),ee==="style"&&ka(["li"])(_)&&c.getStyle(_,"list-style-type")==="none"){_.removeAttribute(ee),c.setStyle(_,"list-style-type","none");return}ee==="class"&&_.removeAttribute("className"),_.removeAttribute(ee)}}),_w(t.classes,$=>{$=Np($,o),(!no(a)||c.hasClass(a,$))&&c.removeClass(_,$)});const I=c.getAttribs(_);for(let $=0;${let c;return t.parentNode&&Le(Pv(e.dom,t.parentNode).reverse(),d=>{if(!c&&no(d)&&d.id!=="_start"&&d.id!=="_end"){const h=Rm(e,d,o,s,a);h&&h.split!==!1&&(c=d)}}),c},nz=(e,t,o,s)=>PS(e,t,o,s,s).fold(Ge(s),a=>(e.dom.createFragment().appendChild(s),e.dom.rename(s,a)),Ge(null)),E0=(e,t,o,s,a,c,d,h)=>{var _,z;let I,$;const V=e.dom;if(o){const ee=o.parentNode;for(let le=s.parentNode;le&&le!==ee;le=le.parentNode){let oe=V.clone(le,!1);for(let fe=0;fe{const c=e.formatter.get(t),d=c[0],h=e.dom,_=e.selection,z=oe=>{const fe=IS(e,oe,t,o,a);return E0(e,c,fe,oe,oe,!0,d,o)},I=oe=>fd(oe)&&no(oe)&&(oe.id==="_start"||oe.id==="_end"),$=oe=>Bn(c,fe=>Kg(e,fe,o,oe,oe)),V=oe=>{const fe=an(oe.childNodes),Oe=$(oe)||Bn(c,ht=>hw(h,oe,ht)),Te=oe.parentNode;if(!Oe&&Fe(Te)&&lx(d)&&$(Te),d.deep&&fe.length)for(let ht=0;ht{no(oe)&&e.dom.getStyle(oe,"text-decoration")===ht&&oe.parentNode&&P2(h,oe.parentNode)===ht&&Kg(e,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:ht}},void 0,oe)})},ee=oe=>{const fe=h.get(oe?"_start":"_end");if(fe){let ke=fe[oe?"firstChild":"lastChild"];return I(ke)&&(ke=ke[oe?"firstChild":"lastChild"]),wt(ke)&&ke.data.length===0&&(ke=oe?fe.previousSibling||fe.nextSibling:fe.nextSibling||fe.previousSibling),h.remove(fe,!0),ke}else return null},le=oe=>{let fe,ke,Oe=Ag(h,oe,c,oe.collapsed);if(d.split){if(Oe=Qv(Oe),fe=S0(e,Oe,!0),ke=S0(e,Oe),fe!==ke){if(fe=MS(fe,!0),ke=MS(ke,!1),kb(h,fe,ke)){const Pe=j.from(fe.firstChild).getOr(fe);z(kw(h,Pe,!0,"span",{id:"_start","data-mce-type":"bookmark"})),ee(!0);return}if(kb(h,ke,fe)){const Pe=j.from(ke.lastChild).getOr(ke);z(kw(h,Pe,!1,"span",{id:"_end","data-mce-type":"bookmark"})),ee(!1);return}fe=ww(h,fe,"span",{id:"_start","data-mce-type":"bookmark"}),ke=ww(h,ke,"span",{id:"_end","data-mce-type":"bookmark"});const Te=h.createRng();Te.setStartAfter(fe),Te.setEndBefore(ke),Hv(h,Te,Pe=>{Le(Pe,ht=>{!fd(ht)&&!fd(ht.parentNode)&&z(ht)})}),z(fe),z(ke),fe=ee(!0),ke=ee()}else fe=ke=z(fe);Oe.startContainer=fe.parentNode?fe.parentNode:fe,Oe.startOffset=h.nodeIndex(fe),Oe.endContainer=ke.parentNode?ke.parentNode:ke,Oe.endOffset=h.nodeIndex(ke)+1}Hv(h,Oe,Te=>{Le(Te,V)})};if(s){if(Iy(s)){const oe=h.createRng();oe.setStartBefore(s),oe.setEndAfter(s),le(oe)}else le(s);UA(e,t,s,o);return}!_.isCollapsed()||!Ja(d)||wf(e).length?(M2(e,()=>Py(e,le),oe=>Ja(d)&&jg(e,t,o,oe)),e.nodeChanged()):_S(e,t,o,a),LS(e,t,o),UA(e,t,s,o)},qg=(e,t,o,s,a)=>{(s||e.selection.isEditable())&&Vp(e,t,o,s,a)},Kg=(e,t,o,s,a)=>PS(e,t,o,s,a).fold(fn,c=>(e.dom.rename(s,c),!0),zo),Cw=zt.each,FS=(e,t,o,s)=>{const a=c=>{if(ec(c)&&no(c.parentNode)&&e.isEditable(c)){const d=P2(e,c.parentNode);e.getStyle(c,"color")&&d?e.setStyle(c,"text-decoration",d):e.getStyle(c,"text-decoration")===d&&e.setStyle(c,"text-decoration",null)}};t.styles&&(t.styles.color||t.styles.textDecoration)&&(zt.walk(s,a,"childNodes"),a(s))},sz=(e,t,o,s)=>{if(t.styles&&t.styles.backgroundColor){const a=DS(e,"fontSize");C0(s,c=>a(c)&&e.isEditable(c),gd(e,"backgroundColor",Np(t.styles.backgroundColor,o)))}},aL=(e,t,o,s)=>{if(Ja(t)&&(t.inline==="sub"||t.inline==="sup")){const a=DS(e,"fontSize");C0(s,d=>a(d)&&e.isEditable(d),gd(e,"fontSize",""));const c=rt(e.select(t.inline==="sup"?"sub":"sup",s),e.isEditable);e.remove(c,!0)}},rz=(e,t,o,s)=>{Cw(t,a=>{Ja(a)&&Cw(e.dom.select(a.inline,s),c=>{yw(c)&&Kg(e,a,o,c,a.exact?c:null)}),Q3(e.dom,a,s)})},az=(e,t,o,s,a)=>{const c=a.parentNode;Rm(e,c,o,s)&&Kg(e,t,s,a)||t.merge_with_parents&&c&&e.dom.getParent(c,d=>Rm(e,d,o,s)?(Kg(e,t,s,a),!0):!1)},T0=zt.each,iz=(e,t,o,s)=>{if(Q5(e)&&Ja(t)&&o.parentNode){const a=Qb(e.schema),c=sp(ye.fromDom(o),d=>ud(d.dom));return $a(a,s)&&pl(e.schema,o.parentNode,{skipBogus:!1,includeZwsp:!0})&&!c}else return!1},lz=(e,t,o,s)=>{if(T0(o.styles,(a,c)=>{e.setStyle(t,c,Np(a,s))}),o.styles){const a=e.getAttrib(t,"style");a&&e.setAttrib(t,"data-mce-style",a)}},iL=(e,t,o,s)=>{const a=e.formatter.get(t),c=a[0],d=!s&&e.selection.isCollapsed(),h=e.dom,_=e.selection,z=(le,oe=c)=>{Gt(oe.onformat)&&oe.onformat(le,oe,o,s),lz(h,le,oe,o),T0(oe.attributes,(fe,ke)=>{h.setAttrib(le,ke,Np(fe,o))}),T0(oe.classes,fe=>{const ke=Np(fe,o);h.hasClass(le,ke)||h.addClass(le,ke)})},I=(le,oe)=>{let fe=!1;return T0(le,ke=>$c(ke)?h.getContentEditable(oe)==="false"&&!ke.ceFalseOverride||Fe(ke.collapsed)&&ke.collapsed!==d?!0:h.is(oe,ke.selector)&&!ud(oe)?(z(oe,ke),fe=!0,!1):!0:!1),fe},$=le=>{if(ft(le)){const oe=h.create(le);return z(oe),oe}else return null},V=(le,oe,fe)=>{const ke=[];let Oe=!0;const Te=c.inline||c.block,Pe=$(Te),ht=Qe=>RA(c)&&Rm(e,Qe,t,o),Mt=(Qe,Ve,mt)=>{const to=MA(c)&&rx(e.schema,Qe)&&Eg(e,Ve,Te);return mt&&to},Yt=(Qe,Ve,mt,to)=>{const bo=Qe.nodeName.toLowerCase(),gn=Eg(e,Te,bo)&&Eg(e,Ve,Te),Cn=!fe&&wt(Qe)&&Pc(Qe.data),ds=ud(Qe),hs=!Ja(c)||!le.isBlock(Qe);return(mt||to)&&gn&&!Cn&&!ds&&hs};Hv(le,oe,Qe=>{let Ve;const mt=to=>{let bo=!1,gn=Oe,Cn=!1;const ds=to.parentNode,hs=ds.nodeName.toLowerCase(),qr=le.getContentEditable(to);Fe(qr)&&(gn=Oe,Oe=qr==="true",bo=!0,Cn=L2(e,to));const ll=Oe&&!bo;if($s(to)&&!iz(e,c,to,hs)){Ve=null,kf(c)&&le.remove(to);return}if(ht(to)){Ve=null;return}if(Mt(to,hs,ll)){const Os=le.rename(to,Te);z(Os),ke.push(Os),Ve=null;return}if($c(c)){let Os=I(a,to);if(!Os&&Fe(ds)&&lx(c)&&(Os=I(a,ds)),!Ja(c)||Os){Ve=null;return}}Fe(Pe)&&Yt(to,hs,ll,Cn)?(Ve||(Ve=le.clone(Pe,!1),ds.insertBefore(Ve,to),ke.push(Ve)),Cn&&bo&&(Oe=gn),Ve.appendChild(to)):(Ve=null,Le(an(to.childNodes),mt),bo&&(Oe=gn),Ve=null)};Le(Qe,mt)}),c.links===!0&&Le(ke,Qe=>{const Ve=mt=>{mt.nodeName==="A"&&z(mt,c),Le(an(mt.childNodes),Ve)};Ve(Qe)}),Le(ke,Qe=>{const Ve=bo=>{let gn=0;return Le(bo.childNodes,Cn=>{!TM(Cn)&&!fd(Cn)&&gn++}),gn},mt=bo=>On(bo.childNodes,sx).filter(Cn=>le.getContentEditable(Cn)!=="false"&&hw(le,Cn,c)).map(Cn=>{const ds=le.clone(Cn,!1);return z(ds),le.replace(ds,bo,!0),le.remove(Cn,!0),ds}).getOr(bo),to=Ve(Qe);if((ke.length>1||!le.isBlock(Qe))&&to===0){le.remove(Qe,!0);return}(Ja(c)||kf(c)&&c.wrapper)&&(!c.exact&&to===1&&(Qe=mt(Qe)),rz(e,a,o,Qe),az(e,c,t,o,Qe),sz(le,c,o,Qe),FS(le,c,o,Qe),aL(le,c,o,Qe),vw(e,c,o,Qe))})},ee=Iy(s)?s:_.getNode();if(h.getContentEditable(ee)==="false"&&!L2(e,ee)){s=ee,I(a,s),jA(e,t,s,o);return}if(c){if(s)if(Iy(s)){if(!I(a,s)){const le=h.createRng();le.setStartBefore(s),le.setEndAfter(s),V(h,Ag(h,le,a),!0)}}else V(h,s,!0);else!d||!Ja(c)||wf(e).length?(_.setRng(rw(_.getRng())),M2(e,()=>{Py(e,(le,oe)=>{const fe=oe?le:Ag(h,le,a);V(h,fe,!1)})},zo),e.nodeChanged()):Hp(e,t,o),o1(e.formatter,t).each(le=>{Le(J3(e.selection),oe=>lz(h,oe,le,o))});G3(t,e)}jA(e,t,s,o)},cz=(e,t,o,s)=>{(s||e.selection.isEditable())&&iL(e,t,o,s)},Fl=e=>Ro(e,"vars"),dz=(e,t)=>{e.set({}),t.on("NodeChange",o=>{HS(t,o.element,e.get())}),t.on("FormatApply FormatRemove",o=>{const s=j.from(o.node).map(a=>Iy(a)?a:a.startContainer).bind(a=>no(a)?j.some(a):j.from(a.parentElement)).getOrThunk(()=>n1(t));HS(t,s,e.get())})},n1=e=>e.selection.getStart(),uz=(e,t,o,s,a)=>tn(t,h=>{const _=e.formatter.matchNode(h,o,a??{},s);return!ln(_)},h=>fS(e,h,o)?!0:s?!1:Fe(e.formatter.matchNode(h,o,a,!0))),$S=(e,t)=>{const o=t??n1(e);return rt(Pv(e.dom,o),s=>no(s)&&!Md(s))},HS=(e,t,o)=>{const s=$S(e,t);nn(o,(a,c)=>{const d=h=>{const _=uz(e,s,c,h.similar,Fl(h)?h.vars:void 0),z=_.isSome();if(h.state.get()!==z){h.state.set(z);const I=_.getOr(t);Fl(h)?h.callback(z,{node:I,format:c,parents:s}):Le(h.callbacks,$=>$(z,{node:I,format:c,parents:s}))}};Le([a.withSimilar,a.withoutSimilar],d),Le(a.withVars,d)})},VS=(e,t,o,s,a,c)=>{const d=t.get();Le(o.split(","),h=>{const _=Gn(d,h).getOrThunk(()=>{const I={withSimilar:{state:Er(!1),similar:!0,callbacks:[]},withoutSimilar:{state:Er(!1),similar:!1,callbacks:[]},withVars:[]};return d[h]=I,I}),z=()=>{const I=$S(e);return uz(e,I,h,a,c).isSome()};if(ln(c)){const I=a?_.withSimilar:_.withoutSimilar;I.callbacks.push(s),I.callbacks.length===1&&I.state.set(z())}else _.withVars.push({state:Er(z()),similar:a,vars:c,callback:s})}),t.set(d)},fz=(e,t,o)=>{const s=e.get();Le(t.split(","),a=>Gn(s,a).each(c=>{s[a]={withSimilar:{...c.withSimilar,callbacks:rt(c.withSimilar.callbacks,d=>d!==o)},withoutSimilar:{...c.withoutSimilar,callbacks:rt(c.withoutSimilar.callbacks,d=>d!==o)},withVars:rt(c.withVars,d=>d.callback!==o)}})),e.set(s)},lL=(e,t,o,s,a,c)=>(VS(e,t,o,s,a,c),{unbind:()=>fz(t,o,s)}),cL=(e,t,o,s)=>{const a=e.formatter.get(t);a&&(jg(e,t,o,s)&&(!("toggle"in a[0])||a[0].toggle)?qg(e,t,o,s):cz(e,t,o,s))},mz=zt.explode,Sw=()=>{const e={};return{addFilter:(a,c)=>{Le(mz(a),d=>{Ro(e,d)||(e[d]={name:d,callbacks:[]}),e[d].callbacks.push(c)})},getFilters:()=>vl(e),removeFilter:(a,c)=>{Le(mz(a),d=>{if(Ro(e,d))if(Fe(c)){const h=e[d],_=rt(h.callbacks,z=>z!==c);_.length>0?h.callbacks=_:delete e[d]}else delete e[d]})}}},dL=(e,t)=>{Le(t,o=>{e.attr(o,null)})},uL=(e,t,o)=>{e.addNodeFilter("font",s=>{Le(s,a=>{const c=t.parse(a.attr("style")),d=a.attr("color"),h=a.attr("face"),_=a.attr("size");d&&(c.color=d),h&&(c["font-family"]=h),_&&Vr(_).each(z=>{c["font-size"]=o[z-1]}),a.name="span",a.attr("style",t.serialize(c)),dL(a,["color","face","size"])})})},pz=(e,t,o)=>{e.addNodeFilter("strike",s=>{const a=t.type!=="html4";Le(s,c=>{if(a)c.name="s";else{const d=o.parse(c.attr("style"));d["text-decoration"]="line-through",c.name="span",c.attr("style",o.serialize(d))}})})},fL=(e,t,o)=>{var s;const a=Z1();t.convert_fonts_to_spans&&uL(e,a,zt.explode((s=t.font_size_legacy_values)!==null&&s!==void 0?s:"")),pz(e,o,a)},mL=(e,t,o)=>{t.inline_styles&&fL(e,t,o)},jS=e=>fetch(e).then(t=>t.ok?t.blob():Promise.reject()).catch(()=>Promise.reject({message:`Cannot convert ${e} to Blob. Resource might not exist or is inaccessible.`,uriType:"blob"})),Ew=e=>{const t=/([a-z0-9+\/=\s]+)/i.exec(e);return t?t[1]:""},Tw=e=>{const[t,...o]=e.split(","),s=o.join(","),a=/data:([^/]+\/[^;]+)(;.+)?/.exec(t);if(a){const c=a[2]===";base64",d=c?Ew(s):decodeURIComponent(s);return j.some({type:a[1],data:d,base64Encoded:c})}else return j.none()},US=(e,t,o=!0)=>{let s=t;if(o)try{s=atob(t)}catch{return j.none()}const a=new Uint8Array(s.length);for(let c=0;cnew Promise((t,o)=>{Tw(e).bind(({type:s,data:a,base64Encoded:c})=>US(s,a,c)).fold(()=>o("Invalid data URI"),t)}),pL=e=>vs(e,"blob:")?jS(e):vs(e,"data:")?ZS(e):Promise.reject("Unknown URI format"),gz=e=>new Promise((t,o)=>{const s=new FileReader;s.onloadend=()=>{t(s.result)},s.onerror=()=>{var a;o((a=s.error)===null||a===void 0?void 0:a.message)},s.readAsDataURL(e)});let gL=0;const Cb=e=>"blobid"+gL++,hz=(e,t,o)=>Tw(e).bind(({data:s,type:a,base64Encoded:c})=>{if(t&&!c)return j.none();{const d=c?s:btoa(s);return o(d,a)}}),A0=(e,t,o)=>{const s=e.create(Cb(),t,o);return e.add(s),s},bz=(e,t,o=!1)=>hz(t,o,(s,a)=>j.from(e.getByData(s,a)).orThunk(()=>US(a,s).map(c=>A0(e,c,s)))),WS=(e,t)=>{const o=()=>Promise.reject("Invalid data URI");if(vs(t,"blob:")){const s=e.getByUri(t);return Fe(s)?Promise.resolve(s):pL(t).then(a=>gz(a).then(c=>hz(c,!1,d=>j.some(A0(e,a,d))).getOrThunk(o)))}else return vs(t,"data:")?bz(e,t).fold(o,s=>Promise.resolve(s)):Promise.reject("Unknown image data format")},yz=/^(?:(?:(?:[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]+)?)?)$/,vz=e=>j.from(e.match(yz)).bind(t=>ra(t,1)).map(t=>vs(t,"www.")?t.substring(4):t),qS=(e,t)=>{j.from(e.attr("src")).bind(vz).forall(o=>!mn(t,o))&&e.attr("sandbox","")},s1=(e,t)=>vs(e,`${t}/`),hL=e=>ln(e)?"iframe":s1(e,"image")?"img":s1(e,"video")?"video":s1(e,"audio")?"audio":"iframe",bL=({type:e,src:t,width:o,height:s}={},a,c)=>{const d=hL(e),h=new gi(d,1);return h.attr(d==="audio"?{src:t}:{src:t,width:o,height:s}),(d==="audio"||d==="video")&&h.attr("controls",""),d==="iframe"&&a&&qS(h,c),h},KS=e=>Fe(e.attr("data-mce-bogus")),_z=e=>e.attr("src")===Jo.transparentSrc||Fe(e.attr("data-mce-placeholder")),yL=(e,t)=>{const{blob_cache:o}=t;if(o){const s=a=>{const c=a.attr("src");_z(a)||KS(a)||uo(c)||bz(o,c,!0).each(d=>{a.attr("src",d.blobUri())})};e.addAttributeFilter("src",a=>Le(a,s))}},vL=(e,t)=>{var o,s;const a=e.schema;e.addAttributeFilter("href",_=>{let z=_.length;const I=V=>V.split(" ").filter(le=>le.length>0).concat(["noopener"]).sort().join(" "),$=V=>{const ee=V?zt.trim(V):"";return/\b(noopener)\b/g.test(ee)?ee:I(ee)};if(!t.allow_unsafe_link_target)for(;z--;){const V=_[z];V.name==="a"&&V.attr("target")==="_blank"&&V.attr("rel",$(V.attr("rel")))}}),t.allow_html_in_named_anchor||e.addAttributeFilter("id,name",_=>{let z=_.length,I,$,V,ee;for(;z--;)if(ee=_[z],ee.name==="a"&&ee.firstChild&&!ee.attr("href"))for(V=ee.parent,I=ee.lastChild;I&&V;)$=I.prev,V.insert(I,ee),I=$}),t.fix_list_elements&&e.addNodeFilter("ul,ol",_=>{let z=_.length,I,$;for(;z--;)if(I=_[z],$=I.parent,$&&($.name==="ul"||$.name==="ol"))if(I.prev&&I.prev.name==="li")I.prev.append(I);else{const V=new gi("li",1);V.attr("style","list-style-type: none"),I.wrap(V)}});const c=a.getValidClasses();t.validate&&c&&e.addAttributeFilter("class",_=>{var z;let I=_.length;for(;I--;){const $=_[I],V=(z=$.attr("class"))!==null&&z!==void 0?z:"",ee=zt.explode(V," ");let le="";for(let oe=0;oeLe(_,z=>{z.replace(bL({type:z.attr("type"),src:z.name==="object"?z.attr("data"):z.attr("src"),width:z.attr("width"),height:z.attr("height")},d,h))})),d&&e.addNodeFilter("iframe",_=>Le(_,z=>qS(z,h)))},{entries:xz,setPrototypeOf:wz,isFrozen:GS,getPrototypeOf:kz,getOwnPropertyDescriptor:_L}=Object;let{freeze:Zc,seal:nr,create:xL}=Object,{apply:YS,construct:Aw}=typeof Reflect<"u"&&Reflect;YS||(YS=function(t,o,s){return t.apply(o,s)}),Zc||(Zc=function(t){return t}),nr||(nr=function(t){return t}),Aw||(Aw=function(t,o){return new t(...o)});const XS=cc(Array.prototype.forEach),Cz=cc(Array.prototype.pop),Iu=cc(Array.prototype.push),r1=cc(String.prototype.toLowerCase),Ow=cc(String.prototype.toString),JS=cc(String.prototype.match),Jd=cc(String.prototype.replace),QS=cc(String.prototype.indexOf),Sz=cc(String.prototype.trim),lc=cc(RegExp.prototype.test),Gg=O0(TypeError);function cc(e){return function(t){for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a/gm),SL=nr(/\${[\w\W]*}/gm),EL=nr(/^data-[\-\w.\u00B7-\uFFFF]/),TL=nr(/^aria-[\-\w]+$/),Oz=nr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),zz=nr(/^(?:\w+script|data):/i),Nz=nr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),sE=nr(/^html$/i);var rE=Object.freeze({__proto__:null,MUSTACHE_EXPR:kL,ERB_EXPR:CL,TMPLIT_EXPR:SL,DATA_ATTR:EL,ARIA_ATTR:TL,IS_ALLOWED_URI:Oz,IS_SCRIPT_OR_DATA:zz,ATTR_WHITESPACE:Nz,DOCTYPE_NAME:sE});const Dz=()=>typeof window>"u"?null:window,Rz=function(t,o){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let s=null;const a="data-tt-policy-suffix";o&&o.hasAttribute(a)&&(s=o.getAttribute(a));const c="dompurify"+(s?"#"+s:"");try{return t.createPolicy(c,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}};function aE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dz();const t=An=>aE(An);if(t.version="3.0.5",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;const o=e.document,s=o.currentScript;let{document:a}=e;const{DocumentFragment:c,HTMLTemplateElement:d,Node:h,Element:_,NodeFilter:z,NamedNodeMap:I=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:$,DOMParser:V,trustedTypes:ee}=e,le=_.prototype,oe=z0(le,"cloneNode"),fe=z0(le,"nextSibling"),ke=z0(le,"childNodes"),Oe=z0(le,"parentNode");if(typeof d=="function"){const An=a.createElement("template");An.content&&An.content.ownerDocument&&(a=An.content.ownerDocument)}let Te,Pe="";const{implementation:ht,createNodeIterator:Mt,createDocumentFragment:Yt,getElementsByTagName:Qe}=a,{importNode:Ve}=o;let mt={};t.isSupported=typeof xz=="function"&&typeof Oe=="function"&&ht&&ht.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:to,ERB_EXPR:bo,TMPLIT_EXPR:gn,DATA_ATTR:Cn,ARIA_ATTR:ds,IS_SCRIPT_OR_DATA:hs,ATTR_WHITESPACE:qr}=rE;let{IS_ALLOWED_URI:ll}=rE,Os=null;const Ft=Fn({},[...eE,...tE,...zw,...oE,...Ez]);let go=null;const ts=Fn({},[...Tz,...nE,...Az,...Nw]);let jt=Object.seal(Object.create(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}})),Eo=null,wn=null,qt=!0,hn=!0,Tn=!1,hi=!0,gs=!1,ti=!1,Nf=!1,Jp=!1,fc=!1,ou=!1,Df=!1,nu=!0,Rf=!1;const _o="user-content-";let Un=!0,zr=!1,na={},Fa=null;const Wi=Fn({},["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 Ta=null;const Aa=Fn({},["audio","video","img","source","image","track"]);let mc=null;const jm=Fn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Um="http://www.w3.org/1998/Math/MathML",Zm="http://www.w3.org/2000/svg",Mf="http://www.w3.org/1999/xhtml";let S1=Mf,yk=!1,vk=null;const QI=Fn({},[Um,Zm,Mf],Ow);let Fb;const d5=["application/xhtml+xml","text/html"],eH="text/html";let Hl,u_=null;const tH=a.createElement("form"),e7=function(qe){return qe instanceof RegExp||qe instanceof Function},sh=function(qe){if(!(u_&&u_===qe)){if((!qe||typeof qe!="object")&&(qe={}),qe=Bm(qe),Fb=d5.indexOf(qe.PARSER_MEDIA_TYPE)===-1?Fb=eH:Fb=qe.PARSER_MEDIA_TYPE,Hl=Fb==="application/xhtml+xml"?Ow:r1,Os="ALLOWED_TAGS"in qe?Fn({},qe.ALLOWED_TAGS,Hl):Ft,go="ALLOWED_ATTR"in qe?Fn({},qe.ALLOWED_ATTR,Hl):ts,vk="ALLOWED_NAMESPACES"in qe?Fn({},qe.ALLOWED_NAMESPACES,Ow):QI,mc="ADD_URI_SAFE_ATTR"in qe?Fn(Bm(jm),qe.ADD_URI_SAFE_ATTR,Hl):jm,Ta="ADD_DATA_URI_TAGS"in qe?Fn(Bm(Aa),qe.ADD_DATA_URI_TAGS,Hl):Aa,Fa="FORBID_CONTENTS"in qe?Fn({},qe.FORBID_CONTENTS,Hl):Wi,Eo="FORBID_TAGS"in qe?Fn({},qe.FORBID_TAGS,Hl):{},wn="FORBID_ATTR"in qe?Fn({},qe.FORBID_ATTR,Hl):{},na="USE_PROFILES"in qe?qe.USE_PROFILES:!1,qt=qe.ALLOW_ARIA_ATTR!==!1,hn=qe.ALLOW_DATA_ATTR!==!1,Tn=qe.ALLOW_UNKNOWN_PROTOCOLS||!1,hi=qe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,gs=qe.SAFE_FOR_TEMPLATES||!1,ti=qe.WHOLE_DOCUMENT||!1,fc=qe.RETURN_DOM||!1,ou=qe.RETURN_DOM_FRAGMENT||!1,Df=qe.RETURN_TRUSTED_TYPE||!1,Jp=qe.FORCE_BODY||!1,nu=qe.SANITIZE_DOM!==!1,Rf=qe.SANITIZE_NAMED_PROPS||!1,Un=qe.KEEP_CONTENT!==!1,zr=qe.IN_PLACE||!1,ll=qe.ALLOWED_URI_REGEXP||Oz,S1=qe.NAMESPACE||Mf,jt=qe.CUSTOM_ELEMENT_HANDLING||{},qe.CUSTOM_ELEMENT_HANDLING&&e7(qe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(jt.tagNameCheck=qe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),qe.CUSTOM_ELEMENT_HANDLING&&e7(qe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(jt.attributeNameCheck=qe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),qe.CUSTOM_ELEMENT_HANDLING&&typeof qe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(jt.allowCustomizedBuiltInElements=qe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),gs&&(hn=!1),ou&&(fc=!0),na&&(Os=Fn({},[...Ez]),go=[],na.html===!0&&(Fn(Os,eE),Fn(go,Tz)),na.svg===!0&&(Fn(Os,tE),Fn(go,nE),Fn(go,Nw)),na.svgFilters===!0&&(Fn(Os,zw),Fn(go,nE),Fn(go,Nw)),na.mathMl===!0&&(Fn(Os,oE),Fn(go,Az),Fn(go,Nw))),qe.ADD_TAGS&&(Os===Ft&&(Os=Bm(Os)),Fn(Os,qe.ADD_TAGS,Hl)),qe.ADD_ATTR&&(go===ts&&(go=Bm(go)),Fn(go,qe.ADD_ATTR,Hl)),qe.ADD_URI_SAFE_ATTR&&Fn(mc,qe.ADD_URI_SAFE_ATTR,Hl),qe.FORBID_CONTENTS&&(Fa===Wi&&(Fa=Bm(Fa)),Fn(Fa,qe.FORBID_CONTENTS,Hl)),Un&&(Os["#text"]=!0),ti&&Fn(Os,["html","head","body"]),Os.table&&(Fn(Os,["tbody"]),delete Eo.tbody),qe.TRUSTED_TYPES_POLICY){if(typeof qe.TRUSTED_TYPES_POLICY.createHTML!="function")throw Gg('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof qe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Gg('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Te=qe.TRUSTED_TYPES_POLICY,Pe=Te.createHTML("")}else Te===void 0&&(Te=Rz(ee,s)),Te!==null&&typeof Pe=="string"&&(Pe=Te.createHTML(""));Zc&&Zc(qe),u_=qe}},n4=Fn({},["mi","mo","mn","ms","mtext"]),He=Fn({},["foreignobject","desc","title","annotation-xml"]),je=Fn({},["title","style","font","a","script"]),It=Fn({},tE);Fn(It,zw),Fn(It,wL);const Dt=Fn({},oE);Fn(Dt,N0);const Do=function(qe){let fo=Oe(qe);(!fo||!fo.tagName)&&(fo={namespaceURI:S1,tagName:"template"});const Wo=r1(qe.tagName),pa=r1(fo.tagName);return vk[qe.namespaceURI]?qe.namespaceURI===Zm?fo.namespaceURI===Mf?Wo==="svg":fo.namespaceURI===Um?Wo==="svg"&&(pa==="annotation-xml"||n4[pa]):!!It[Wo]:qe.namespaceURI===Um?fo.namespaceURI===Mf?Wo==="math":fo.namespaceURI===Zm?Wo==="math"&&He[pa]:!!Dt[Wo]:qe.namespaceURI===Mf?fo.namespaceURI===Zm&&!He[pa]||fo.namespaceURI===Um&&!n4[pa]?!1:!Dt[Wo]&&(je[Wo]||!It[Wo]):!!(Fb==="application/xhtml+xml"&&vk[qe.namespaceURI]):!1},Mn=function(qe){Iu(t.removed,{element:qe});try{qe.parentNode.removeChild(qe)}catch{qe.remove()}},Nr=function(qe,fo){try{Iu(t.removed,{attribute:fo.getAttributeNode(qe),from:fo})}catch{Iu(t.removed,{attribute:null,from:fo})}if(fo.removeAttribute(qe),qe==="is"&&!go[qe])if(fc||ou)try{Mn(fo)}catch{}else try{fo.setAttribute(qe,"")}catch{}},Wm=function(qe){let fo,Wo;if(Jp)qe=""+qe;else{const qm=JS(qe,/^[\r\n\t ]+/);Wo=qm&&qm[0]}Fb==="application/xhtml+xml"&&S1===Mf&&(qe=''+qe+"");const pa=Te?Te.createHTML(qe):qe;if(S1===Mf)try{fo=new V().parseFromString(pa,Fb)}catch{}if(!fo||!fo.documentElement){fo=ht.createDocument(S1,"template",null);try{fo.documentElement.innerHTML=yk?Pe:pa}catch{}}const pc=fo.body||fo.documentElement;return qe&&Wo&&pc.insertBefore(a.createTextNode(Wo),pc.childNodes[0]||null),S1===Mf?Qe.call(fo,ti?"html":"body")[0]:ti?fo.documentElement:pc},u5=function(qe){return Mt.call(qe.ownerDocument||qe,qe,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT,null,!1)},pX=function(qe){return qe instanceof $&&(typeof qe.nodeName!="string"||typeof qe.textContent!="string"||typeof qe.removeChild!="function"||!(qe.attributes instanceof I)||typeof qe.removeAttribute!="function"||typeof qe.setAttribute!="function"||typeof qe.namespaceURI!="string"||typeof qe.insertBefore!="function"||typeof qe.hasChildNodes!="function")},f5=function(qe){return typeof h=="object"?qe instanceof h:qe&&typeof qe=="object"&&typeof qe.nodeType=="number"&&typeof qe.nodeName=="string"},$b=function(qe,fo,Wo){mt[qe]&&XS(mt[qe],pa=>{pa.call(t,fo,Wo,u_)})},oH=function(qe){let fo;if($b("beforeSanitizeElements",qe,null),pX(qe))return Mn(qe),!0;const Wo=Hl(qe.nodeName);if($b("uponSanitizeElement",qe,{tagName:Wo,allowedTags:Os}),qe.hasChildNodes()&&!f5(qe.firstElementChild)&&(!f5(qe.content)||!f5(qe.content.firstElementChild))&&lc(/<[/\w]/g,qe.innerHTML)&&lc(/<[/\w]/g,qe.textContent))return Mn(qe),!0;if(!Os[Wo]||Eo[Wo]){if(!Eo[Wo]&&sH(Wo)&&(jt.tagNameCheck instanceof RegExp&&lc(jt.tagNameCheck,Wo)||jt.tagNameCheck instanceof Function&&jt.tagNameCheck(Wo)))return!1;if(Un&&!Fa[Wo]){const pa=Oe(qe)||qe.parentNode,pc=ke(qe)||qe.childNodes;if(pc&&pa){const qm=pc.length;for(let Ri=qm-1;Ri>=0;--Ri)pa.insertBefore(oe(pc[Ri],!0),fe(qe))}}return Mn(qe),!0}return qe instanceof _&&!Do(qe)||(Wo==="noscript"||Wo==="noembed"||Wo==="noframes")&&lc(/<\/no(script|embed|frames)/i,qe.innerHTML)?(Mn(qe),!0):(gs&&qe.nodeType===3&&(fo=qe.textContent,fo=Jd(fo,to," "),fo=Jd(fo,bo," "),fo=Jd(fo,gn," "),qe.textContent!==fo&&(Iu(t.removed,{element:qe.cloneNode()}),qe.textContent=fo)),$b("afterSanitizeElements",qe,null),!1)},nH=function(qe,fo,Wo){if(nu&&(fo==="id"||fo==="name")&&(Wo in a||Wo in tH))return!1;if(!(hn&&!wn[fo]&&lc(Cn,fo))){if(!(qt&&lc(ds,fo))){if(!go[fo]||wn[fo]){if(!(sH(qe)&&(jt.tagNameCheck instanceof RegExp&&lc(jt.tagNameCheck,qe)||jt.tagNameCheck instanceof Function&&jt.tagNameCheck(qe))&&(jt.attributeNameCheck instanceof RegExp&&lc(jt.attributeNameCheck,fo)||jt.attributeNameCheck instanceof Function&&jt.attributeNameCheck(fo))||fo==="is"&&jt.allowCustomizedBuiltInElements&&(jt.tagNameCheck instanceof RegExp&&lc(jt.tagNameCheck,Wo)||jt.tagNameCheck instanceof Function&&jt.tagNameCheck(Wo))))return!1}else if(!mc[fo]){if(!lc(ll,Jd(Wo,qr,""))){if(!((fo==="src"||fo==="xlink:href"||fo==="href")&&qe!=="script"&&QS(Wo,"data:")===0&&Ta[qe])){if(!(Tn&&!lc(hs,Jd(Wo,qr,"")))){if(Wo)return!1}}}}}}return!0},sH=function(qe){return qe.indexOf("-")>0},rH=function(qe){let fo,Wo,pa,pc;$b("beforeSanitizeAttributes",qe,null);const{attributes:qm}=qe;if(!qm)return;const Ri={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:go};for(pc=qm.length;pc--;){fo=qm[pc];const{name:Km,namespaceURI:t7}=fo;Wo=Km==="value"?fo.value:Sz(fo.value);const hX=Wo;if(pa=Hl(Km),Ri.attrName=pa,Ri.attrValue=Wo,Ri.keepAttr=!0,Ri.forceKeepAttr=void 0,$b("uponSanitizeAttribute",qe,Ri),Wo=Ri.attrValue,Ri.forceKeepAttr)continue;if(!Ri.keepAttr){Nr(Km,qe);continue}if(!hi&&lc(/\/>/i,Wo)){Nr(Km,qe);continue}gs&&(Wo=Jd(Wo,to," "),Wo=Jd(Wo,bo," "),Wo=Jd(Wo,gn," "));const aH=Hl(qe.nodeName);if(!nH(aH,pa,Wo)){Nr(Km,qe);continue}if(Rf&&(pa==="id"||pa==="name")&&(Nr(Km,qe),Wo=_o+Wo),Te&&typeof ee=="object"&&typeof ee.getAttributeType=="function"&&!t7)switch(ee.getAttributeType(aH,pa)){case"TrustedHTML":{Wo=Te.createHTML(Wo);break}case"TrustedScriptURL":{Wo=Te.createScriptURL(Wo);break}}if(Wo!==hX)try{t7?qe.setAttributeNS(t7,Km,Wo):qe.setAttribute(Km,Wo)}catch{Nr(Km,qe)}}$b("afterSanitizeAttributes",qe,null)},gX=function An(qe){let fo;const Wo=u5(qe);for($b("beforeSanitizeShadowDOM",qe,null);fo=Wo.nextNode();)$b("uponSanitizeShadowNode",fo,null),!oH(fo)&&(fo.content instanceof c&&An(fo.content),rH(fo));$b("afterSanitizeShadowDOM",qe,null)};return t.sanitize=function(An){let qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},fo,Wo,pa,pc;if(yk=!An,yk&&(An=""),typeof An!="string"&&!f5(An))if(typeof An.toString=="function"){if(An=An.toString(),typeof An!="string")throw Gg("dirty is not a string, aborting")}else throw Gg("toString is not a function");if(!t.isSupported)return An;if(Nf||sh(qe),t.removed=[],typeof An=="string"&&(zr=!1),zr){if(An.nodeName){const Km=Hl(An.nodeName);if(!Os[Km]||Eo[Km])throw Gg("root node is forbidden and cannot be sanitized in-place")}}else if(An instanceof h)fo=Wm(""),Wo=fo.ownerDocument.importNode(An,!0),Wo.nodeType===1&&Wo.nodeName==="BODY"||Wo.nodeName==="HTML"?fo=Wo:fo.appendChild(Wo);else{if(!fc&&!gs&&!ti&&An.indexOf("<")===-1)return Te&&Df?Te.createHTML(An):An;if(fo=Wm(An),!fo)return fc?null:Df?Pe:""}fo&&Jp&&Mn(fo.firstChild);const qm=u5(zr?An:fo);for(;pa=qm.nextNode();)oH(pa)||(pa.content instanceof c&&gX(pa.content),rH(pa));if(zr)return An;if(fc){if(ou)for(pc=Yt.call(fo.ownerDocument);fo.firstChild;)pc.appendChild(fo.firstChild);else pc=fo;return(go.shadowroot||go.shadowrootmode)&&(pc=Ve.call(o,pc,!0)),pc}let Ri=ti?fo.outerHTML:fo.innerHTML;return ti&&Os["!doctype"]&&fo.ownerDocument&&fo.ownerDocument.doctype&&fo.ownerDocument.doctype.name&&lc(sE,fo.ownerDocument.doctype.name)&&(Ri=" -`+Ri),gs&&(Ri=Jd(Ri,to," "),Ri=Jd(Ri,bo," "),Ri=Jd(Ri,gn," ")),Te&&Df?Te.createHTML(Ri):Ri},t.setConfig=function(An){sh(An),Nf=!0},t.clearConfig=function(){u_=null,Nf=!1},t.isValidAttribute=function(An,qe,fo){u_||sh({});const Wo=Hl(An),pa=Hl(qe);return nH(Wo,pa,fo)},t.addHook=function(An,qe){typeof qe=="function"&&(mt[An]=mt[An]||[],Iu(mt[An],qe))},t.removeHook=function(An){if(mt[An])return Cz(mt[An])},t.removeHooks=function(An){mt[An]&&(mt[An]=[])},t.removeAllHooks=function(){mt={}},t}var iE=aE();const Mz=zt.each,Bz=zt.trim,AL=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],OL={ftp:21,http:80,https:443,mailto:25},Lz=["img","video"],Pz=(e,t)=>Fe(e)?!e:Fe(t)?!mn(Lz,t):!0,zL=e=>{try{return decodeURIComponent(e)}catch{return unescape(e)}},lE=(e,t,o)=>{const s=zL(t).replace(/\s/g,"");return e.allow_script_urls?!1:/((java|vb)script|mhtml):/i.test(s)?!0:e.allow_html_data_urls?!1:/^data:image\//i.test(s)?Pz(e.allow_svg_data_urls,o)&&/^data:image\/svg\+xml/i.test(s):/^data:/i.test(s)};class Qd{static parseDataUri(t){let o;const s=decodeURIComponent(t).split(","),a=/data:([^;]+)/.exec(s[0]);return a&&(o=a[1]),{type:o,data:s[1]}}static isDomSafe(t,o,s={}){if(s.allow_script_urls)return!0;{const a=up.decode(t).replace(/[\s\u0000-\u001F]+/g,"");return!lE(s,a,o)}}static getDocumentBaseUrl(t){var o;let s;return t.protocol.indexOf("http")!==0&&t.protocol!=="file:"?s=(o=t.href)!==null&&o!==void 0?o:"":s=t.protocol+"//"+t.host+t.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(s)&&(s=s.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(s)||(s+="/")),s}constructor(t,o={}){this.path="",this.directory="",t=Bz(t),this.settings=o;const s=o.base_uri,a=this;if(/^([\w\-]+):([^\/]{2})/i.test(t)||/^\s*#/.test(t)){a.source=t;return}const c=t.indexOf("//")===0;if(t.indexOf("/")===0&&!c&&(t=(s&&s.protocol||"http")+"://mce_host"+t),!/^[\w\-]*:?\/\//.test(t)){const h=s?s.path:new Qd(document.location.href).directory;if((s==null?void 0:s.protocol)==="")t="//mce_host"+a.toAbsPath(h,t);else{const _=/([^#?]*)([#?]?.*)/.exec(t);_&&(t=(s&&s.protocol||"http")+"://mce_host"+a.toAbsPath(h,_[1])+_[2])}}t=t.replace(/@@/g,"(mce_at)");const d=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(t);d&&Mz(AL,(h,_)=>{let z=d[_];z&&(z=z.replace(/\(mce_at\)/g,"@@")),a[h]=z}),s&&(a.protocol||(a.protocol=s.protocol),a.userInfo||(a.userInfo=s.userInfo),!a.port&&a.host==="mce_host"&&(a.port=s.port),(!a.host||a.host==="mce_host")&&(a.host=s.host),a.source=""),c&&(a.protocol="")}setPath(t){const o=/^(.*?)\/?(\w+)?$/.exec(t);o&&(this.path=o[0],this.directory=o[1],this.file=o[2]),this.source="",this.getURI()}toRelative(t){if(t==="./")return t;const o=new Qd(t,{base_uri:this});if(o.host!=="mce_host"&&this.host!==o.host&&o.host||this.port!==o.port||this.protocol!==o.protocol&&o.protocol!=="")return o.getURI();const s=this.getURI(),a=o.getURI();if(s===a||s.charAt(s.length-1)==="/"&&s.substr(0,s.length-1)===a)return s;let c=this.toRelPath(this.path,o.path);return o.query&&(c+="?"+o.query),o.anchor&&(c+="#"+o.anchor),c}toAbsolute(t,o){const s=new Qd(t,{base_uri:this});return s.getURI(o&&this.isSameOrigin(s))}isSameOrigin(t){if(this.host==t.host&&this.protocol==t.protocol){if(this.port==t.port)return!0;const o=this.protocol?OL[this.protocol]:null;if(o&&(this.port||o)==(t.port||o))return!0}return!1}toRelPath(t,o){let s=0,a="",c,d;const h=t.substring(0,t.lastIndexOf("/")).split("/"),_=o.split("/");if(h.length>=_.length){for(c=0,d=h.length;c=_.length||h[c]!==_[c]){s=c+1;break}}if(h.length<_.length){for(c=0,d=_.length;c=h.length||h[c]!==_[c]){s=c+1;break}}if(s===1)return o;for(c=0,d=h.length-(s-1);c{$&&h.push($)});const _=[];for(let $=d.length-1;$>=0;$--)if(!(d[$].length===0||d[$]===".")){if(d[$]===".."){s++;continue}if(s>0){s--;continue}_.push(d[$])}const z=h.length-s;let I;return z<=0?I=sa(_).join("/"):I=h.slice(0,z).join("/")+"/"+sa(_).join("/"),I.indexOf("/")!==0&&(I="/"+I),a&&I.lastIndexOf("/")!==I.length-1&&(I+=a),I}getURI(t=!1){let o;return(!this.source||t)&&(o="",t||(this.protocol?o+=this.protocol+"://":o+="//",this.userInfo&&(o+=this.userInfo+"@"),this.host&&(o+=this.host),this.port&&(o+=":"+this.port)),this.path&&(o+=this.path),this.query&&(o+="?"+this.query),this.anchor&&(o+="#"+this.anchor),this.source=o),this.source}}const NL=zt.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),cE="data-mce-type";let Iz=0;const Fz=(e,t,o,s,a)=>{var c,d,h,_;const z=t.validate,I=o.getSpecialElements();e.nodeType===Gc&&!t.allow_conditional_comments&&/^\[if/i.test((c=e.nodeValue)!==null&&c!==void 0?c:"")&&(e.nodeValue=" "+e.nodeValue);const $=(d=a==null?void 0:a.tagName)!==null&&d!==void 0?d:e.nodeName.toLowerCase();if(s!=="html"&&o.isValid(s)){Fe(a)&&(a.allowedTags[$]=!0);return}if(e.nodeType!==Ci||$==="body")return;const V=ye.fromDom(e),ee=Yc(V,cE),le=Da(V,"data-mce-bogus");if(!ee&&ft(le)){le==="all"?Jn(V):wa(V);return}const oe=o.getElementRule($);if(z&&!oe){Ro(I,$)?Jn(V):wa(V);return}else Fe(a)&&(a.allowedTags[$]=!0);if(z&&oe&&!ee){if(Le((h=oe.attributesForced)!==null&&h!==void 0?h:[],fe=>{Rr(V,fe.name,fe.value==="{$uid}"?`mce_${Iz++}`:fe.value)}),Le((_=oe.attributesDefault)!==null&&_!==void 0?_:[],fe=>{Yc(V,fe.name)||Rr(V,fe.name,fe.value==="{$uid}"?`mce_${Iz++}`:fe.value)}),oe.attributesRequired&&!Bn(oe.attributesRequired,fe=>Yc(V,fe))){wa(V);return}if(oe.removeEmptyAttrs&&vr(V)){wa(V);return}oe.outputName&&oe.outputName!==$&&ov(V,oe.outputName)}},DL=(e,t,o,s,a)=>{const c=e.tagName.toLowerCase(),{attrName:d,attrValue:h}=a;a.keepAttr=D0(t,o,s,c,d,h),a.keepAttr?(a.allowedAttributes[d]=!0,uE(d,o)&&(a.attrValue=d),t.allow_svg_data_urls&&vs(h,"data:image/svg+xml")&&(a.forceKeepAttr=!0)):dE(e,d)&&(a.forceKeepAttr=!0)},D0=(e,t,o,s,a,c)=>o!=="html"&&!_u(s)?!0:!(a in NL&&lE(e,c,s))&&(!e.validate||t.isValid(s,a)||vs(a,"data-")||vs(a,"aria-")),dE=(e,t)=>e.hasAttribute(cE)&&(t==="id"||t==="class"||t==="style"),uE=(e,t)=>e in t.getBoolAttrs(),$z=(e,t,o,s)=>{const{attributes:a}=e;for(let c=a.length-1;c>=0;c--){const d=a[c],h=d.name,_=d.value;!D0(t,o,s,e.tagName.toLowerCase(),h,_)&&!dE(e,h)?e.removeAttribute(h):uE(h,o)&&e.setAttribute(h,h)}},RL=(e,t,o)=>{const s=iE();return s.addHook("uponSanitizeElement",(a,c)=>{Fz(a,e,t,o.track(a),c)}),s.addHook("uponSanitizeAttribute",(a,c)=>{DL(a,e,t,o.current(),c)}),s},ML=(e,t)=>{const s={...{IN_PLACE:!0,ALLOW_UNKNOWN_PROTOCOLS:!0,ALLOWED_TAGS:["#comment","#cdata-section","body"],ALLOWED_ATTR:[]}};return s.PARSER_MEDIA_TYPE=t,e.allow_script_urls?s.ALLOWED_URI_REGEXP=/.*/:e.allow_html_data_urls&&(s.ALLOWED_URI_REGEXP=/^(?!(\w+script|mhtml):)/i),s},Hz=e=>{const t=Gb(e);if(t==="svg"){const o=["type","href","role","arcrole","title","show","actuate","label","from","to"].map(a=>`xlink:${a}`),s={IN_PLACE:!0,USE_PROFILES:{html:!0,svg:!0,svgFilters:!0},ALLOWED_ATTR:o};iE().sanitize(e,s)}else if(t==="math"){const o={IN_PLACE:!0,USE_PROFILES:{mathMl:!0}};iE().sanitize(e,o)}else throw new Error("Not a namespace element")},BL=(e,t)=>{const o=N();if(e.sanitize){const s=RL(e,t,o);return{sanitizeHtmlElement:(c,d)=>{s.sanitize(c,ML(e,d)),s.removed=[],o.reset()},sanitizeNamespaceElement:Hz}}else return{sanitizeHtmlElement:(c,d)=>{const h=document.createNodeIterator(c,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT);let _;for(;_=h.nextNode();){const z=o.track(_);Fz(_,e,t,z),no(_)&&$z(_,e,t,z)}o.reset()},sanitizeNamespaceElement:dt}},Dw=zt.makeMap,fE=zt.extend,Vz=(e,t,o,s)=>{const a=e.name,c=a in o&&a!=="title"&&a!=="textarea"&&a!=="noscript",d=t.childNodes;for(let h=0,_=d.length;h<_;h++){const z=d[h],I=new gi(z.nodeName.toLowerCase(),z.nodeType);if(no(z)){const $=z.attributes;for(let V=0,ee=$.length;V{const s=[];for(let a=e,c=a;a;c=a,a=a.walk()){const d=a;Le(t,h=>h(d)),uo(d.parent)&&d!==e?a=c:s.push(d)}for(let a=s.length-1;a>=0;a--){const c=s[a];Le(o,d=>d(c))}},Lm=(e,t,o,s)=>{const a=o.validate,c=t.getNonEmptyElements(),d=t.getWhitespaceElements(),h=fE(Dw("script,style,head,html,body,title,meta,param"),t.getBlockElements()),_=Qb(t),z=/[ \t\r\n]+/g,I=/^[ \t\r\n]+/,$=/[ \t\r\n]+$/,V=Oe=>{let Te=Oe.parent;for(;Fe(Te);){if(Te.name in d)return!0;Te=Te.parent}return!1},ee=Oe=>{let Te=Oe;for(;Fe(Te);){if(Te.name in _)return e1(t,c,d,Te);Te=Te.parent}return!1},le=Oe=>Oe.name in h||td(t,Oe)||_u(Oe.name)&&Oe.parent===e,oe=(Oe,Te)=>{const Pe=Te?Oe.prev:Oe.next;return Fe(Pe)||uo(Oe.parent)?!1:le(Oe.parent)&&(Oe.parent!==e||s.isRootContent===!0)};return[Oe=>{var Te;if(Oe.type===3&&!V(Oe)){let Pe=(Te=Oe.value)!==null&&Te!==void 0?Te:"";Pe=Pe.replace(z," "),(A3(Oe.prev,le)||oe(Oe,!0))&&(Pe=Pe.replace(I,"")),Pe.length===0||Pe===" "&&Oe.prev&&Oe.prev.type===Gc&&Oe.next&&Oe.next.type===Gc?Oe.remove():Oe.value=Pe}},Oe=>{var Te;if(Oe.type===1){const Pe=t.getElementRule(Oe.name);if(a&&Pe){const ht=e1(t,c,d,Oe);Pe.paddInEmptyBlock&&ht&&ee(Oe)?nw(o,s,le,Oe):Pe.removeEmpty&&ht?le(Oe)?Oe.remove():Oe.unwrap():Pe.paddEmpty&&(ht||sw(Oe))&&nw(o,s,le,Oe)}}else if(Oe.type===3&&!V(Oe)){let Pe=(Te=Oe.value)!==null&&Te!==void 0?Te:"";(Oe.next&&le(Oe.next)||oe(Oe,!1))&&(Pe=Pe.replace($,"")),Pe.length===0?Oe.remove():Oe.value=Pe}}]},LL=(e,t)=>{var o;const s=(o=t.forced_root_block)!==null&&o!==void 0?o:e.forced_root_block;return s===!1?"":s===!0?"p":s},a1=(e={},t=Rc())=>{const o=Sw(),s=Sw(),a={validate:!0,root_name:"body",sanitize:!0,...e},c=new DOMParser,d=BL(a,t),h=(Te,Pe,ht="html")=>{const Mt=ht==="xhtml"?"application/xhtml+xml":"text/html",Yt=Ro(t.getSpecialElements(),Pe.toLowerCase()),Qe=Yt?`<${Pe}>${Te}`:Te,Ve=()=>ht==="xhtml"?`${Qe}`:/^[\s]*${Qe}`:`${Qe}`,mt=c.parseFromString(Ve(),Mt).body;return d.sanitizeHtmlElement(mt,Mt),Yt?mt.firstChild:mt},_=o.addFilter,z=o.getFilters,I=o.removeFilter,$=s.addFilter,V=s.getFilters,ee=s.removeFilter,le=(Te,Pe)=>{_0(t,Te)&&Pe.push(Te)},oe=(Te,Pe)=>{const ht=ft(Pe.attr(cE)),Mt=Pe.type===1&&!Ro(Te,Pe.name)&&!td(t,Pe)&&!_u(Pe.name);return Pe.type===3||Mt&&!ht},fe=(Te,Pe)=>{const ht=fE(Dw("script,style,head,html,body,title,meta,param"),t.getBlockElements()),Mt=/^[ \t\r\n]+/,Yt=/[ \t\r\n]+$/;let Qe=Te.firstChild,Ve=null;const mt=to=>{var bo,gn;to&&(Qe=to.firstChild,Qe&&Qe.type===3&&(Qe.value=(bo=Qe.value)===null||bo===void 0?void 0:bo.replace(Mt,"")),Qe=to.lastChild,Qe&&Qe.type===3&&(Qe.value=(gn=Qe.value)===null||gn===void 0?void 0:gn.replace(Yt,"")))};if(t.isValidChild(Te.name,Pe.toLowerCase())){for(;Qe;){const to=Qe.next;oe(ht,Qe)?(Ve||(Ve=new gi(Pe,1),Ve.attr(a.forced_root_block_attrs),Te.insert(Ve,Qe)),Ve.append(Qe)):(mt(Ve),Ve=null),Qe=to}mt(Ve)}},Oe={schema:t,addAttributeFilter:$,getAttributeFilters:V,removeAttributeFilter:ee,addNodeFilter:_,getNodeFilters:z,removeNodeFilter:I,parse:(Te,Pe={})=>{var ht;const Mt=a.validate,Yt=(ht=Pe.context)!==null&&ht!==void 0?ht:a.root_name,Qe=h(Te,Yt,Pe.format);Ko(t,Qe);const Ve=new gi(Yt,11);Vz(Ve,Qe,t.getSpecialElements(),d.sanitizeNamespaceElement),Qe.innerHTML="";const[mt,to]=Lm(Ve,t,a,Pe),bo=[],gn=Mt?qr=>le(qr,bo):dt,Cn={nodes:{},attributes:{}},ds=qr=>eS(z(),V(),qr,Cn);if(Qa(Ve,[mt,ds],[to,gn]),bo.reverse(),Mt&&bo.length>0)if(Pe.context){const{pass:qr,fail:ll}=yt(bo,Os=>Os.parent===Ve);pd(ll,t,Ve,ds),Pe.invalid=qr.length>0}else pd(bo,t,Ve,ds);const hs=LL(a,Pe);return hs&&(Ve.name==="body"||Pe.isRootContent)&&fe(Ve,hs),Pe.invalid||tS(Cn,Pe),Ve}};return vL(Oe,a),mL(Oe,a,t),Oe},PL=e=>xb(e)?Lp({validate:!1}).serialize(e):e,mE=(e,t,o)=>{const s=PL(e),a=t(s);if(a.isDefaultPrevented())return a;if(xb(e))if(a.content!==s){const c=a1({validate:!1,forced_root_block:!1,...o}).parse(a.content,{context:e.name});return{...a,content:c}}else return{...a,content:e};else return a},Sb=e=>({sanitize:V4(e),sandbox_iframes:g2(e),sandbox_iframes_exclusions:Z_(e)}),jz=(e,t)=>{if(t.no_events)return Oo.value(t);{const o=Cf(e,t);return o.isDefaultPrevented()?Oo.error(ZA(e,{content:"",...o}).content):Oo.value(o)}},Fu=(e,t,o)=>o.no_events?t:mE(t,a=>ZA(e,{...o,content:a}),Sb(e)).content,pE=(e,t)=>{if(t.no_events)return Oo.value(t);{const o=mE(t.content,s=>MM(e,{...t,content:s}),Sb(e));return o.isDefaultPrevented()?(ac(e,o),Oo.error(void 0)):Oo.value(o)}},gE=(e,t,o)=>{o.no_events||ac(e,{...o,content:t})},Rw=(e,t,o)=>({element:e,width:t,rows:o}),hE=(e,t)=>({element:e,cells:t}),IL=(e,t)=>({x:e,y:t}),Mw=(e,t)=>Sr(e,t).bind(Vr).getOr(1),Pm=(e,t,o,s,a)=>{const c=Mw(a,"rowspan"),d=Mw(a,"colspan"),h=e.rows;for(let _=o;_{const s=e.rows;return!!(s[o]?s[o].cells:[])[t]},Zz=(e,t,o)=>{for(;Uz(e,t,o);)t++;return t},R0=e=>ko(e,(t,o)=>o.cells.length>t?o.cells.length:t,0),Bw=(e,t)=>{const o=e.rows;for(let s=0;s{const c=[],d=e.rows;for(let h=o;h<=a;h++){const _=d[h].cells,z=t{const s=t.x,a=t.y,c=o.x,d=o.y,h=a{const o=Ar(e.element),s=ye.fromTag("tbody");return xr(s,t),fr(o,s),o},FL=e=>dn(e.rows,t=>{const o=dn(t.cells,a=>{const c=fm(a);return rn(c,"colspan"),rn(c,"rowspan"),c}),s=Ar(t.element);return xr(s,o),s}),$L=e=>{const t=Rw(Ar(e),0,[]);return Le(Mr(e,"tr"),(o,s)=>{Le(Mr(o,"td,th"),(a,c)=>{Pm(t,Zz(t,c,s),s,o,a)})}),Rw(t.element,R0(t.rows),t.rows)},HL=e=>qz(e,FL(e)),Kz=(e,t,o)=>Bw(e,t).bind(s=>Bw(e,o).map(a=>Wz(e,s,a))),Gz=e=>On(e,t=>En(t)==="ul"||En(t)==="ol"),VL=(e,t)=>On(e,o=>En(o)==="li"&&Mv(o,t)).fold(Ge([]),o=>Gz(e).map(s=>{const a=ye.fromTag(En(s)),c=Bi(Ju(s),(d,h)=>vs(h,"list-style"));return vn(a,c),[ye.fromTag("li"),a]}).getOr([])),yE=(e,t)=>{const o=ko(t,(s,a)=>(fr(a,s),a),e);return t.length>0?Hc([o]):o},Yz=e=>pm(e)?ia(e).filter(Mh).fold(Ge([]),t=>[e,t]):Mh(e)?[e]:[],jL=(e,t,o)=>{const s=ye.fromDom(t.commonAncestorContainer),a=jc(s,e),c=rt(a,_=>o.isWrapper(En(_))),d=VL(a,t),h=c.concat(d.length?d:Yz(s));return dn(h,Ar)},vE=()=>Hc([]),UL=(e,t,o)=>yE(ye.fromDom(t.cloneContents()),jL(e,t,o)),ZL=(e,t)=>Tl(t,"table",$t(kn,e)),al=(e,t)=>ZL(e,t[0]).bind(o=>{const s=t[0],a=t[t.length-1],c=$L(o);return Kz(c,s,a).map(d=>Hc([HL(d)]))}).getOrThunk(vE),WL=(e,t,o)=>t.length>0&&t[0].collapsed?vE():UL(e,t[0],o),qL=(e,t,o)=>{const s=EA(t,e);return s.length>0?al(e,s):WL(e,t,o)},Lw=(e,t)=>t>=0&&tnl(e.innerText),Pw=e=>e.map(t=>t.nodeName).getOr("div").toLowerCase(),KL=e=>j.from(e.selection.getRng()).map(t=>{var o;const s=j.from(e.dom.getParent(t.commonAncestorContainer,e.dom.isBlock)),a=e.getBody(),c=Pw(s),d=ye.fromDom(t.cloneContents());MO(d),BO(d);const h=e.dom.add(a,c,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},d.dom),_=Xz(h),z=nl((o=h.textContent)!==null&&o!==void 0?o:"");if(e.dom.remove(h),Lw(z,0)||Lw(z,z.length-1)){const I=s.getOr(a),$=Xz(I),V=$.indexOf(_);if(V===-1)return _;{const ee=Lw($,V-1),le=Lw($,V+_.length);return(ee?" ":"")+_+(le?" ":"")}}else return _}).getOr(""),_E=(e,t)=>{const o=e.selection.getRng(),s=e.dom.create("body"),a=e.selection.getSel(),c=Nx(e,or(a)),d=t.contextual?qL(ye.fromDom(e.getBody()),c,e.schema).dom:o.cloneContents();return d&&s.appendChild(d),e.selection.serializer.serialize(s,t)},xE=(e,t)=>{if(t.format==="text")return KL(e);{const o=_E(e,t);return t.format==="tree"?o:e.selection.isCollapsed()?"":o}},GL=(e,t)=>({...e,format:t,get:!0,selection:!0,getInner:!0}),YL=(e,t,o={})=>{const s=GL(o,t);return jz(e,s).fold(To,a=>{const c=xE(e,a);return Fu(e,c,a)})},eu=0,wE=1,Jz=2,kE=(e,t)=>{const o=e.length+t.length+2,s=new Array(o),a=new Array(o),c=(I,$,V)=>({start:I,end:$,diag:V}),d=(I,$,V,ee,le)=>{const oe=_(I,$,V,ee);if(oe===null||oe.start===$&&oe.diag===$-ee||oe.end===I&&oe.diag===I-V){let fe=I,ke=V;for(;fe<$||keee-V?(le.push([Jz,e[fe]]),++fe):(le.push([wE,t[ke]]),++ke)}else{d(I,oe.start,V,oe.start-oe.diag,le);for(let fe=oe.start;fe{let le=I;for(;le-${const le=$-I,oe=ee-V;if(le===0||oe===0)return null;const fe=le-oe,ke=oe+le,Oe=(ke%2===0?ke:ke+1)/2;s[1+Oe]=I,a[1+Oe]=$+1;let Te,Pe,ht,Mt,Yt;for(Te=0;Te<=Oe;++Te){for(Pe=-Te;Pe<=Te;Pe+=2){for(ht=Pe+Oe,Pe===-Te||Pe!==Te&&s[ht-1]=I&&Yt>=V&&e[Mt]===t[Yt];)a[ht]=Mt--,Yt--;if(fe%2===0&&-Te<=Pe&&Pe<=Te&&a[ht]<=s[ht+fe])return h(a[ht],Pe+I-V,$,ee)}}return null},z=[];return d(0,e.length,0,t.length,z),z},CE=e=>no(e)?e.outerHTML:wt(e)?up.encodeRaw(e.data,!1):Qo(e)?"":"",Iw=e=>{let t;const o=document.createElement("div"),s=document.createDocumentFragment();for(e&&(o.innerHTML=e);t=o.firstChild;)s.appendChild(t);return s},Qz=(e,t,o)=>{const s=Iw(t);if(e.hasChildNodes()&&o{if(e.hasChildNodes()&&t{let o=0;Le(e,s=>{s[0]===eu?o++:s[0]===wE?(Qz(t,s[1],o),o++):s[0]===Jz&&eN(t,o)})},XL=(e,t)=>rt(dn(an(e.childNodes),Kt(nl,CE)),o=>o.length>0),JL=(e,t)=>{const o=dn(an(t.childNodes),CE);return tN(kE(o,e),t),t},SE=si(()=>document.implementation.createHTMLDocument("undo")),QL=e=>e.querySelector("iframe")!==null,eP=e=>({type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}),Fw=e=>({type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}),i1=e=>{const t=e.serializer.getTempAttrs(),o=mC(e.getBody(),t);return QL(o)?eP(XL(o)):Fw(nl(o.innerHTML))},M0=(e,t,o)=>{const s=o?t.beforeBookmark:t.bookmark;t.type==="fragmented"?JL(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw",no_selection:Fe(s)&&yA(s)?!s.isFakeCaret:!0}),s&&(e.selection.moveToBookmark(s),e.selection.scrollIntoView())},$w=e=>e.type==="fragmented"?e.fragments.join(""):e.content,jp=e=>{const t=ye.fromTag("body",SE());return Ql(t,$w(e)),Le(Mr(t,"*[data-mce-bogus]"),wa),Ji(t)},tP=(e,t)=>$w(e)===$w(t),oP=(e,t)=>jp(e)===jp(t),l1=(e,t)=>!e||!t?!1:tP(e,t)?!0:oP(e,t),Hw=e=>e.get()===0,B0=(e,t,o)=>{Hw(o)&&(e.typing=t)},EE=(e,t)=>{e.typing&&(B0(e,!1,t),e.add())},nP=e=>{e.typing&&(e.typing=!1,e.add())},sP=(e,t,o)=>{Hw(t)&&o.set(Jt(e.selection))},TE=(e,t,o,s,a,c,d)=>{const h=i1(e),_=zt.extend(c||{},h);if(!Hw(s)||e.removed)return null;const z=t.data[o.get()];if(e.dispatch("BeforeAddUndo",{level:_,lastLevel:z,originalEvent:d}).isDefaultPrevented()||z&&l1(z,_))return null;t.data[o.get()]&&a.get().each(V=>{t.data[o.get()].beforeBookmark=V});const I=B4(e);if(I&&t.data.length>I){for(let V=0;V0?(e.setDirty(!0),e.dispatch("AddUndo",$),e.dispatch("change",$)):e.dispatch("AddUndo",$),_},AE=(e,t,o)=>{t.data=[],o.set(0),t.typing=!1,e.dispatch("ClearUndos")},OE=(e,t,o,s,a)=>{if(t.transact(s)){const c=t.data[o.get()].bookmark,d=t.data[o.get()-1];M0(e,d,!0),t.transact(a)&&(t.data[o.get()-1].beforeBookmark=c)}},oN=(e,t,o)=>{let s;return t.get(){let a;return t.typing&&(t.add(),t.typing=!1,B0(t,!1,o)),s.get()>0&&(s.set(s.get()-1),a=t.data[s.get()],M0(e,a,!0),e.setDirty(!0),e.dispatch("Undo",{level:a})),a},nN=e=>{e.clear(),e.add()},sN=(e,t,o)=>o.get()>0||t.typing&&t.data[0]&&!l1(i1(e),t.data[0]),rP=(e,t)=>t.get()(EE(e,t),e.beforeChange(),e.ignore(o),e.add()),zE=(e,t)=>{try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}},rN=(e,t)=>{const o=e.dom,s=Fe(t)?t:e.getBody();Le(o.select("table,a",s),a=>{switch(a.nodeName){case"TABLE":const c=j_(e),d=o.getAttrib(a,"border");(!d||d==="0")&&e.hasVisual?o.addClass(a,c):o.removeClass(a,c);break;case"A":if(!o.getAttrib(a,"href")){const h=o.getAttrib(a,"name")||a.id,_=Ny(e);h&&e.hasVisual?o.addClass(a,_):o.removeClass(a,_)}break}}),e.dispatch("VisualAid",{element:t,hasVisual:e.hasVisual})},NE=e=>({init:{bindEvents:dt},undoManager:{beforeChange:(t,o)=>sP(e,t,o),add:(t,o,s,a,c,d)=>TE(e,t,o,s,a,c,d),undo:(t,o,s)=>Vw(e,t,o,s),redo:(t,o)=>oN(e,t,o),clear:(t,o)=>AE(e,t,o),reset:t=>nN(t),hasUndo:(t,o)=>sN(e,t,o),hasRedo:(t,o)=>rP(t,o),transact:(t,o,s)=>aP(t,o,s),ignore:(t,o)=>zE(t,o),extra:(t,o,s,a)=>OE(e,t,o,s,a)},formatter:{match:(t,o,s,a)=>jg(e,t,o,s,a),matchAll:(t,o)=>V3(e,t,o),matchNode:(t,o,s,a)=>Rm(e,t,o,s,a),canApply:t=>U3(e,t),closest:t=>j3(e,t),apply:(t,o,s)=>cz(e,t,o,s),remove:(t,o,s,a)=>qg(e,t,o,s,a),toggle:(t,o,s)=>cL(e,t,o,s),formatChanged:(t,o,s,a,c)=>lL(e,t,o,s,a,c)},editor:{getContent:t=>IO(e,t),setContent:(t,o)=>eL(e,t,o),insertContent:(t,o)=>mw(e,t,o),addVisual:t=>rN(e,t)},selection:{getContent:(t,o)=>YL(e,t,o)},autocompleter:{addDecoration:dt,removeDecoration:dt},raw:{getModel:()=>j.none()}}),iP=e=>{const t=z=>ue(z)?z:{},{init:o,undoManager:s,formatter:a,editor:c,selection:d,autocompleter:h,raw:_}=e;return{init:{bindEvents:o.bindEvents},undoManager:{beforeChange:s.beforeChange,add:s.add,undo:s.undo,redo:s.redo,clear:s.clear,reset:s.reset,hasUndo:s.hasUndo,hasRedo:s.hasRedo,transact:(z,I,$)=>s.transact($),ignore:(z,I)=>s.ignore(I),extra:(z,I,$,V)=>s.extra($,V)},formatter:{match:(z,I,$,V)=>a.match(z,t(I),V),matchAll:a.matchAll,matchNode:a.matchNode,canApply:z=>a.canApply(z),closest:z=>a.closest(z),apply:(z,I,$)=>a.apply(z,t(I)),remove:(z,I,$,V)=>a.remove(z,t(I)),toggle:(z,I,$)=>a.toggle(z,t(I)),formatChanged:(z,I,$,V,ee)=>a.formatChanged(I,$,V,ee)},editor:{getContent:z=>c.getContent(z),setContent:(z,I)=>({content:c.setContent(z,I),html:""}),insertContent:(z,I)=>(c.insertContent(z),""),addVisual:c.addVisual},selection:{getContent:(z,I)=>d.getContent(I)},autocompleter:{addDecoration:h.addDecoration,removeDecoration:h.removeDecoration},raw:{getModel:()=>j.some(_.getRawModel())}}},lP=()=>{const e=Ge(null),t=Ge("");return{init:{bindEvents:dt},undoManager:{beforeChange:dt,add:e,undo:e,redo:e,clear:dt,reset:dt,hasUndo:fn,hasRedo:fn,transact:e,ignore:dt,extra:dt},formatter:{match:fn,matchAll:Ge([]),matchNode:Ge(void 0),canApply:fn,closest:t,apply:dt,remove:dt,toggle:dt,formatChanged:Ge({unbind:dt})},editor:{getContent:t,setContent:Ge({content:"",html:""}),insertContent:Ge(""),addVisual:dt},selection:{getContent:t},autocompleter:{addDecoration:dt,removeDecoration:dt},raw:{getModel:Ge(j.none())}}},Im=e=>Ro(e.plugins,"rtc"),aN=e=>Gn(e.plugins,"rtc").bind(t=>j.from(t.setup)),iN=e=>{const t=e;return aN(e).fold(()=>(t.rtcInstance=NE(e),j.none()),o=>(t.rtcInstance=lP(),j.some(()=>o().then(s=>(t.rtcInstance=iP(s),s.rtc.isRemote)))))},DE=e=>e.rtcInstance?e.rtcInstance:NE(e),ei=e=>{const t=e.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.")},c1=(e,t,o)=>{ei(e).undoManager.beforeChange(t,o)},cP=(e,t,o,s,a,c,d)=>ei(e).undoManager.add(t,o,s,a,c,d),dP=(e,t,o,s)=>ei(e).undoManager.undo(t,o,s),lN=(e,t,o)=>ei(e).undoManager.redo(t,o),cN=(e,t,o)=>{ei(e).undoManager.clear(t,o)},jw=(e,t)=>{ei(e).undoManager.reset(t)},uP=(e,t,o)=>ei(e).undoManager.hasUndo(t,o),fP=(e,t,o)=>ei(e).undoManager.hasRedo(t,o),mP=(e,t,o,s)=>ei(e).undoManager.transact(t,o,s),pP=(e,t,o)=>{ei(e).undoManager.ignore(t,o)},gP=(e,t,o,s,a)=>{ei(e).undoManager.extra(t,o,s,a)},hP=(e,t,o,s,a)=>ei(e).formatter.match(t,o,s,a),bP=(e,t,o)=>ei(e).formatter.matchAll(t,o),yP=(e,t,o,s,a)=>ei(e).formatter.matchNode(t,o,s,a),vP=(e,t)=>ei(e).formatter.canApply(t),_P=(e,t)=>ei(e).formatter.closest(t),Bs=(e,t,o,s)=>{ei(e).formatter.apply(t,o,s)},dN=(e,t,o,s,a)=>{ei(e).formatter.remove(t,o,s,a)},RE=(e,t,o,s)=>{ei(e).formatter.toggle(t,o,s)},uN=(e,t,o,s,a,c)=>ei(e).formatter.formatChanged(t,o,s,a,c),fN=(e,t)=>DE(e).editor.getContent(t),ME=(e,t,o)=>DE(e).editor.setContent(t,o),xP=(e,t,o)=>DE(e).editor.insertContent(t,o),wP=(e,t,o)=>ei(e).selection.getContent(t,o),mN=(e,t)=>ei(e).editor.addVisual(t),pN=e=>ei(e).init.bindEvents(),kP=(e,t={})=>{const o=t.format?t.format:"html";return wP(e,o,t)},Eb=e=>e.dom.length===0?(Jn(e),j.none()):j.some(e),CP=(e,t)=>e.filter(o=>ws.isBookmarkNode(o.dom)).bind(t?ho:Ur),d1=(e,t,o,s,a)=>{const c=e.dom,d=t.dom,h=s?c.length:d.length;s?(m0(c,d,a,!1,!s),o.setStart(d,h)):(m0(d,c,a,!1,!s),o.setEnd(d,h))},L0=(e,t,o)=>{ia(e).each(s=>{const a=e.dom;t&&Yy(s,Ue(a,0),o)?Hx(a,0,o):!t&&bb(s,Ue(a,a.length),o)&&kr(a,a.length,o)})},Tb=(e,t,o,s,a)=>{e.bind(c=>((s?kr:Hx)(c.dom,s?c.dom.length:0,a),t.filter(Rs).map(h=>d1(c,h,o,s,a)))).orThunk(()=>CP(t,s).or(t).filter(Rs).map(d=>L0(d,s,a)))},BE=(e,t,o)=>{const s=j.from(t.firstChild).map(ye.fromDom),a=j.from(t.lastChild).map(ye.fromDom);e.deleteContents(),e.insertNode(t);const c=s.bind(Ur).filter(Rs).bind(Eb),d=a.bind(ho).filter(Rs).bind(Eb);Tb(c,s,e,!0,o),Tb(d,a,e,!1,o),e.collapse(!1)},gN=(e,t)=>({format:"html",...e,set:!0,selection:!0,content:t}),hN=(e,t)=>{if(t.format!=="raw"){const o=e.selection.getRng(),s=e.dom.getParent(o.commonAncestorContainer,e.dom.isBlock),a=s?{context:s.nodeName.toLowerCase()}:{},c=e.parser.parse(t.content,{forced_root_block:!1,...a,...t});return Lp({validate:!1},e.schema).serialize(c)}else return t.content},LE=(e,t,o={})=>{const s=gN(o,t);pE(e,s).each(a=>{const c=hN(e,a),d=e.selection.getRng();BE(d,d.createContextualFragment(c),e.schema),e.selection.setRng(d),Zd(e,d),gE(e,c,a)})},PE=(e,t,o)=>{if(Ro(e,t)){const s=rt(e[t],a=>a!==o);s.length===0?delete e[t]:e[t]=s}};var bN=(e,t)=>{let o,s;const a=(h,_)=>On(_,z=>e.is(z,h)),c=h=>e.getParents(h,void 0,e.getRoot()),d=()=>{o={},s={},t.on("NodeChange",h=>{const _=h.element,z=c(_),I={};nn(o,($,V)=>{a(V,z).each(ee=>{s[V]||(Le($,le=>{le(!0,{node:ee,selector:V,parents:z})}),s[V]=$),I[V]=$})}),nn(s,($,V)=>{I[V]||(delete s[V],Le($,ee=>{ee(!1,{node:_,selector:V,parents:z})}))})})};return{selectorChangedWithUnbind:(h,_)=>(o||d(),o[h]||(o[h]=[]),o[h].push(_),a(h,c(t.selection.getStart())).each(()=>{s[h]=o[h]}),{unbind:()=>{PE(o,h,_),PE(s,h,_)}})}};const IE=e=>!!(e&&e.ownerDocument)&&_a(ye.fromDom(e.ownerDocument),ye.fromDom(e)),FE=e=>e?IE(e.startContainer)&&IE(e.endContainer):!1,$E=(e,t,o,s)=>{let a,c;const{selectorChangedWithUnbind:d}=bN(e,s),h=(Ft,go)=>{const ts=e.createRng();Fe(Ft)&&Fe(go)?(ts.setStart(Ft,go),ts.setEnd(Ft,go),Pe(ts),ke(!1)):(Bv(e,ts,s.getBody(),!0),Pe(ts))},_=Ft=>kP(s,Ft),z=(Ft,go)=>LE(s,Ft,go),I=Ft=>TO(s.getBody(),Te(),Ft),$=Ft=>AO(s.getBody(),Te(),Ft),V=(Ft,go)=>ll.getBookmark(Ft,go),ee=Ft=>ll.moveToBookmark(Ft),le=(Ft,go)=>(a0(e,Ft,go).each(Pe),Ft),oe=()=>{const Ft=Te(),go=Oe();return!Ft||Ft.item?!1:Ft.compareEndPoints?Ft.compareEndPoints("StartToEnd",Ft)===0:!go||Ft.collapsed},fe=()=>{const Ft=Te(),go=s.getBody().querySelectorAll('[data-mce-selected="1"]');return go.length>0?Hs(go,ts=>e.isEditable(ts.parentElement)):SO(e,Ft)},ke=Ft=>{const go=Te();go.collapse(!!Ft),Pe(go)},Oe=()=>t.getSelection?t.getSelection():t.document.selection,Te=()=>{let Ft;const go=(jt,Eo,wn)=>{try{return Eo.compareBoundaryPoints(jt,wn)}catch{return-1}},ts=t.document;if(Fe(s.bookmark)&&!jy(s)){const jt=aC(s);if(jt.isSome())return jt.map(Eo=>Nx(s,[Eo])[0]).getOr(ts.createRange())}try{const jt=Oe();jt&&!Dd(jt.anchorNode)&&(jt.rangeCount>0?Ft=jt.getRangeAt(0):Ft=ts.createRange(),Ft=Nx(s,[Ft])[0])}catch{}if(Ft||(Ft=ts.createRange()),lo(Ft.startContainer)&&Ft.collapsed){const jt=e.getRoot();Ft.setStart(jt,0),Ft.setEnd(jt,0)}return a&&c&&(go(Ft.START_TO_START,Ft,a)===0&&go(Ft.END_TO_END,Ft,a)===0?Ft=c:(a=null,c=null)),Ft},Pe=(Ft,go)=>{if(!FE(Ft))return;const ts=Oe();if(Ft=s.dispatch("SetSelectionRange",{range:Ft,forward:go}).range,ts){c=Ft;try{ts.removeAllRanges(),ts.addRange(Ft)}catch{}go===!1&&ts.extend&&(ts.collapse(Ft.endContainer,Ft.endOffset),ts.extend(Ft.startContainer,Ft.startOffset)),a=ts.rangeCount>0?ts.getRangeAt(0):null}if(!Ft.collapsed&&Ft.startContainer===Ft.endContainer&&(ts!=null&&ts.setBaseAndExtent)&&Ft.endOffset-Ft.startOffset<2&&Ft.startContainer.hasChildNodes()){const Eo=Ft.startContainer.childNodes[Ft.startOffset];Eo&&Eo.nodeName==="IMG"&&(ts.setBaseAndExtent(Ft.startContainer,Ft.startOffset,Ft.endContainer,Ft.endOffset),(ts.anchorNode!==Ft.startContainer||ts.focusNode!==Ft.endContainer)&&ts.setBaseAndExtent(Eo,0,Eo,1))}s.dispatch("AfterSetSelectionRange",{range:Ft,forward:go})},ht=Ft=>(z(e.getOuterHTML(Ft)),Ft),Mt=()=>pB(s.getBody(),Te()),Yt=(Ft,go)=>uC(e,Te(),Ft,go),Qe=()=>{const Ft=Oe(),go=Ft==null?void 0:Ft.anchorNode,ts=Ft==null?void 0:Ft.focusNode;if(!Ft||!go||!ts||Dd(go)||Dd(ts))return!0;const jt=e.createRng(),Eo=e.createRng();try{jt.setStart(go,Ft.anchorOffset),jt.collapse(!0),Eo.setStart(ts,Ft.focusOffset),Eo.collapse(!0)}catch{return!0}return jt.compareBoundaryPoints(jt.START_TO_START,Eo)<=0},qr={dom:e,win:t,serializer:o,editor:s,expand:(Ft={type:"word"})=>Pe(Rg(e).expand(Te(),Ft)),collapse:ke,setCursorLocation:h,getContent:_,setContent:z,getBookmark:V,moveToBookmark:ee,select:le,isCollapsed:oe,isEditable:fe,isForward:Qe,setNode:ht,getNode:Mt,getSel:Oe,setRng:Pe,getRng:Te,getStart:I,getEnd:$,getSelectedBlocks:Yt,normalize:()=>{const Ft=Te(),go=Oe();if(!Nv(go)&&Ly(s)){const ts=Em(e,Ft);return ts.each(jt=>{Pe(jt,Qe())}),ts.getOr(Ft)}return Ft},selectorChanged:(Ft,go)=>(d(Ft,go),qr),selectorChangedWithUnbind:d,getScrollContainer:()=>{let Ft,go=e.getRoot();for(;go&&go.nodeName!=="BODY";){if(go.scrollHeight>go.clientHeight){Ft=go;break}go=go.parentNode}return Ft},scrollIntoView:(Ft,go)=>{Fe(Ft)?oC(s,Ft,go):Zd(s,Te(),go)},placeCaretAt:(Ft,go)=>Pe(eO(Ft,go,s.getDoc())),getBoundingClientRect:()=>{const Ft=Te();return Ft.collapsed?Ue.fromRangeStart(Ft).getClientRects()[0]:Ft.getBoundingClientRect()},destroy:()=>{t=a=c=null,Os.destroy()}},ll=ws(qr),Os=ps(qr,s);return qr.bookmarkManager=ll,qr.controlSelection=Os,qr},yN=(e,t,o)=>{t.addNodeFilter("br",(s,a,c)=>{const d=zt.extend({},o.getBlockElements()),h=o.getNonEmptyElements(),_=o.getWhitespaceElements();d.body=1;const z=I=>I.name in d||td(o,I);for(let I=0,$=s.length;I<$;I++){let V=s[I],ee=V.parent;if(ee&&z(ee)&&V===ee.lastChild){let le=V.prev;for(;le;){const oe=le.name;if(oe!=="span"||le.attr("data-mce-type")!=="bookmark"){oe==="br"&&(V=null);break}le=le.prev}if(V&&(V.remove(),e1(o,h,_,ee))){const oe=o.getElementRule(ee.name);oe&&(oe.removeEmpty?ee.remove():oe.paddEmpty&&nw(e,c,z,ee))}}else{let le=V;for(;ee&&ee.firstChild===le&&ee.lastChild===le&&(le=ee,!d[ee.name]);)ee=ee.parent;if(le===ee){const oe=new gi("#text",3);oe.value=da,V.replace(oe)}}}})},HE=(e,t,o)=>{e.addAttributeFilter("data-mce-tabindex",(s,a)=>{let c=s.length;for(;c--;){const d=s[c];d.attr("tabindex",d.attr("data-mce-tabindex")),d.attr(a,null)}}),e.addAttributeFilter("src,href,style",(s,a)=>{const c="data-mce-"+a,d=t.url_converter,h=t.url_converter_scope;let _=s.length;for(;_--;){const z=s[_];let I=z.attr(c);I!==void 0?(z.attr(a,I.length>0?I:null),z.attr(c,null)):(I=z.attr(a),a==="style"?I=o.serializeStyle(o.parseStyle(I),z.name):d&&(I=d.call(h,I,a,z.name)),z.attr(a,I.length>0?I:null))}}),e.addAttributeFilter("class",s=>{let a=s.length;for(;a--;){const c=s[a];let d=c.attr("class");d&&(d=d.replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),c.attr("class",d.length>0?d:null))}}),e.addAttributeFilter("data-mce-type",(s,a,c)=>{let d=s.length;for(;d--;){const h=s[d];h.attr("data-mce-type")==="bookmark"&&!c.cleanup&&(j.from(h.firstChild).exists(z=>{var I;return!Pc((I=z.value)!==null&&I!==void 0?I:"")})?h.unwrap():h.remove())}}),e.addNodeFilter("script,style",(s,a)=>{var c;const d=_=>_.replace(/()/g,` -`).replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"");let h=s.length;for(;h--;){const _=s[h],z=_.firstChild,I=(c=z==null?void 0:z.value)!==null&&c!==void 0?c:"";if(a==="script"){const $=_.attr("type");$&&_.attr("type",$==="mce-no/type"?null:$.replace(/^mce\-/,"")),t.element_format==="xhtml"&&z&&I.length>0&&(z.value=`// {gC.add(t)});const hC=new Set;Be(["background-color"],t=>{hC.add(t)});const bC=["font","text-decoration","text-emphasis"],I3=(e,t)=>e.parseStyle(e.getAttrib(t,"style")),fb=(e,t)=>vt(I3(e,t)),yC=e=>gC.has(e),lv=e=>hC.has(e),vC=(e,t)=>Ln(fb(e,t),o=>yC(o)),F3=(e,t)=>vC(e,t)&&Ln(fb(e,t),o=>lv(o)),Rx=e=>rt(e,t=>Ln(bC,o=>vs(t,o))),h6=(e,t,o)=>{const s=fb(e,t),a=fb(e,o),c=d=>{var h,_;const z=(h=e.getStyle(t,d))!==null&&h!==void 0?h:"",I=(_=e.getStyle(o,d))!==null&&_!==void 0?_:"";return Pn(z)&&Pn(I)&&z!==I};return Ln(s,d=>{const h=_=>Ln(_,z=>z===d);if(!h(a)&&h(bC)){const _=Rx(a);return Ln(_,c)}else return c(d)})},H3=(e,t,o)=>j.from(o.container()).filter(wt).exists(s=>{const a=e?0:-1;return t(s.data.charAt(o.offset()+a))}),Bp=Ht(H3,!0,ob),cv=Ht(H3,!1,ob),$3=e=>{const t=e.container();return wt(t)&&(t.data.length===0||Bc(t.data)&&ws.isBookmarkNode(t.parentNode))},Ru=(e,t)=>o=>Y_(e?0:-1,o).filter(t).isSome(),_C=e=>Dl(e)&&ur(ye.fromDom(e),"display")==="block",Mx=e=>$o(e)&&!rg(e),V3=Ru(!0,_C),j3=Ru(!1,_C),mb=Ru(!0,Xe),Wy=Ru(!1,Xe),U3=Ru(!0,ec),qy=Ru(!1,ec),Sa=Ru(!0,Mx),Sf=Ru(!1,Mx),pb=e=>e.slice(0,-1),Z3=(e,t,o)=>_a(t,e)?pb(Gu(e,s=>o(s)||kn(s,t))):[],ac=(e,t)=>Z3(e,t,fn),Vc=(e,t)=>[e].concat(ac(e,t)),Lx=(e,t,o)=>m4(e,t,o,$3),W3=e=>t=>e.isBlock(En(t)),xC=(e,t,o)=>On(Vc(ye.fromDom(t.container()),e),W3(o)),Ky=(e,t,o,s)=>Lx(e,t.dom,o).forall(a=>xC(t,o,s).fold(()=>!xm(a,o,t.dom),c=>!xm(a,o,t.dom)&&_a(c,ye.fromDom(a.container())))),Bx=(e,t,o,s)=>xC(t,o,s).fold(()=>Lx(e,t.dom,o).forall(a=>!xm(a,o,t.dom)),a=>Lx(e,a.dom,o).isNone()),Px=Ht(Bx,!1),q3=Ht(Bx,!0),wC=Ht(Ky,!1),kC=Ht(Ky,!0),b6=e=>X_(e).exists(Fd),qd=(e,t,o,s)=>{const a=rt(Vc(ye.fromDom(o.container()),t),d=>s.isBlock(En(d))),c=St(a).getOr(t);return cd(e,c.dom,o).filter(b6)},dv=(e,t,o)=>X_(t).exists(Fd)||qd(!0,e,t,o).isSome(),gb=(e,t,o)=>vM(t).exists(Fd)||qd(!1,e,t,o).isSome(),Ix=Ht(qd,!1),K3=Ht(qd,!0),CC=e=>Ue.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd(),SC=(e,t,o)=>{const s=rt(Vc(ye.fromDom(t.container()),e),a=>o.isBlock(En(a)));return St(s).getOr(e)},G3=(e,t,o)=>CC(t)?cv(t):cv(t)||Ic(SC(e,t,o).dom,t).exists(cv),Y3=(e,t,o)=>CC(t)?Bp(t):Bp(t)||Pl(SC(e,t,o).dom,t).exists(Bp),X3=e=>mn(["pre","pre-wrap"],e),Fx=e=>X_(e).bind(t=>_r(t,cr)).exists(t=>X3(ur(t,"white-space"))),EC=(e,t)=>Ic(e.dom,t).isNone(),AC=(e,t)=>Pl(e.dom,t).isNone(),J3=(e,t,o)=>EC(e,t)||AC(e,t)||Px(e,t,o)||q3(e,t,o)||gb(e,t,o)||dv(e,t,o),TC=e=>Fe(e)&&$o(e)&&_2(e),OC=(e,t)=>o=>TC(new Ma(o,e)[t]()),Q3=(e,t)=>{const o=Pl(e.dom,t).getOr(t),s=OC(e.dom,"next");return t.isAtEnd()&&(s(t.container())||s(o.container()))},zC=(e,t)=>{const o=Ic(e.dom,t).getOr(t),s=OC(e.dom,"prev");return t.isAtStart()&&(s(t.container())||s(o.container()))},NC=(e,t,o)=>Fx(t)?!1:J3(e,t,o)||G3(e,t,o)||Y3(e,t,o),Gy=(e,t,o)=>Fx(t)?!1:Px(e,t,o)||wC(e,t,o)||gb(e,t,o)||G3(e,t,o)||zC(e,t),eO=e=>{const t=e.container(),o=e.offset();return wt(t)&&oFx(t)?!1:q3(e,t,o)||kC(e,t,o)||dv(e,t,o)||Y3(e,t,o)||Q3(e,t),DC=(e,t,o)=>Gy(e,t,o)||hb(e,eO(t),o),uv=(e,t)=>ji(e.charAt(t)),RC=(e,t)=>ob(e.charAt(t)),tO=e=>{const t=e.container();return wt(t)&&Yn(t.data,da)},y6=e=>{const t=e.split("");return dn(t,(o,s)=>ji(o)&&s>0&&s{const a=t.data,c=Ue(t,0);return!o&&uv(a,0)&&!DC(e,c,s)?(t.data=" "+a.slice(1),!0):o&&RC(a,0)&&Gy(e,c,s)?(t.data=da+a.slice(1),!0):!1},nO=e=>{const t=e.data,o=y6(t);return o!==t?(e.data=o,!0):!1},sO=(e,t,o,s)=>{const a=t.data,c=Ue(t,a.length-1);return!o&&uv(a,a.length-1)&&!DC(e,c,s)?(t.data=a.slice(0,-1)+" ",!0):o&&RC(a,a.length-1)&&hb(e,c,s)?(t.data=a.slice(0,-1)+da,!0):!1},rO=(e,t,o)=>{const s=t.container();if(!wt(s))return j.none();if(tO(t)){const a=oO(e,s,!1,o)||nO(s)||sO(e,s,!1,o);return lu(a,t)}else if(DC(e,t,o)){const a=oO(e,s,!0,o)||sO(e,s,!0,o);return lu(a,t)}else return j.none()},v6=e=>{const t=ye.fromDom(e.getBody());e.selection.isCollapsed()&&rO(t,Ue.fromRangeStart(e.selection.getRng()),e.schema).each(o=>{e.selection.setRng(o.toRange())})},aO=(e,t,o,s)=>{if(o===0)return;const a=ye.fromDom(e),c=ii(a,z=>s.isBlock(En(z))).getOr(a),d=e.data.slice(t,t+o),h=t+o>=e.data.length&&hb(c,Ue(e,e.data.length),s),_=t===0&&Gy(c,Ue(e,0),s);e.replaceData(t,o,sp(d,4,_,h))},Hx=(e,t,o)=>{const s=e.data.slice(t),a=s.length-vl(s).length;aO(e,t,a,o)},kr=(e,t,o)=>{const s=e.data.slice(0,t),a=s.length-Vs(s).length;aO(e,t-a,a,o)},fv=(e,t,o,s,a=!0)=>{const c=Vs(e.data).length,d=a?e:t,h=a?t:e;return a?d.appendData(h.data):d.insertData(0,h.data),Jn(ye.fromDom(h)),s&&Hx(d,c,o),d},_6=(e,t)=>{const o=e.container(),s=e.offset();return!Ue.isTextPosition(e)&&o===t.parentNode&&s>Ue.before(t).offset()},x6=(e,t)=>_6(t,e)?Ue(t.container(),t.offset()-1):t,Yy=e=>wt(e)?Ue(e,0):Ue.before(e),Bg=e=>wt(e)?Ue(e,e.data.length):Ue.after(e),Tm=e=>sd(e.previousSibling)?j.some(Bg(e.previousSibling)):e.previousSibling?$d(e.previousSibling):j.none(),MC=e=>sd(e.nextSibling)?j.some(Yy(e.nextSibling)):e.nextSibling?No(e.nextSibling):j.none(),iO=(e,t)=>j.from(t.previousSibling?t.previousSibling:t.parentNode).bind(o=>Ic(e,Ue.before(o))).orThunk(()=>Pl(e,Ue.after(t))),lO=(e,t)=>Pl(e,Ue.after(t)).orThunk(()=>Ic(e,Ue.before(t))),$x=(e,t)=>Tm(t).orThunk(()=>MC(t)).orThunk(()=>iO(e,t)),w6=(e,t)=>MC(t).orThunk(()=>Tm(t)).orThunk(()=>lO(e,t)),LC=(e,t,o)=>e?w6(t,o):$x(t,o),cO=(e,t,o)=>LC(e,t,o).map(Ht(x6,o)),BC=(e,t,o)=>{o.fold(()=>{e.focus()},s=>{e.selection.setRng(s.toRange(),t)})},PC=e=>t=>t.dom===e,dO=(e,t)=>t&&Ro(e.schema.getBlockElements(),En(t)),IC=(e,t,o)=>{if(ar(e,t)){const s=ye.fromHtml('
    ');return o?Be(xa(t),a=>{lx(a)||Jn(a)}):xs(t),fr(t,s),j.some(Ue.before(s.dom))}else return j.none()},k6=(e,t,o,s)=>{const a=Ur(e).filter(Rs),c=ho(e).filter(Rs);return Jn(e),kd(a,c,t,(d,h,_)=>{const z=d.dom,I=h.dom,H=z.data.length;return fv(z,I,o,s),_.container()===I?Ue(z,H):_}).orThunk(()=>(s&&(a.each(d=>kr(d.dom,d.dom.length,o)),c.each(d=>Hx(d.dom,0,o))),t))},C6=(e,t)=>Ro(e.schema.getTextInlineElements(),En(t)),sl=(e,t,o,s=!0,a=!1)=>{const c=cO(t,e.getBody(),o.dom),d=ii(o,Ht(dO,e),PC(e.getBody())),h=k6(o,c,e.schema,C6(e,o));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):d.bind(_=>IC(e.schema,_,a)).fold(()=>{s&&BC(e,t,h)},_=>{s&&BC(e,t,j.some(_))})},uO=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,S6=e=>uO.test(e),bb=(e,t)=>ls(ye.fromDom(t),In(e))&&!Oc(e.schema,t)&&e.dom.isEditable(t),mv=e=>{var t;return As.DOM.getStyle(e,"direction",!0)==="rtl"||S6((t=e.textContent)!==null&&t!==void 0?t:"")},E6=(e,t,o)=>rt(As.DOM.getParents(o.container(),"*",t),e),Pg=(e,t,o)=>{const s=E6(e,t,o);return j.from(s[s.length-1])},fO=(e,t,o)=>{const s=kg(t,e),a=kg(o,e);return Fe(s)&&s===a},FC=e=>Lh(e)||gy(e),Kd=(e,t)=>{const o=t.container(),s=t.offset();return e?pm(o)?wt(o.nextSibling)?Ue(o.nextSibling,0):Ue.after(o):Lh(t)?Ue(o,s+1):t:pm(o)?wt(o.previousSibling)?Ue(o.previousSibling,o.previousSibling.data.length):Ue.before(o):gy(t)?Ue(o,s-1):t},mO=Ht(Kd,!0),Xy=Ht(Kd,!1),HC=(e,t)=>{const o=s=>s.stopImmediatePropagation();e.on("beforeinput input",o,!0),e.getDoc().execCommand(t),e.off("beforeinput input",o)},pO=e=>{e.execCommand("delete")},Vx=e=>HC(e,"Delete"),$C=e=>HC(e,"ForwardDelete"),pv=e=>t=>xd(ia(t),e,kn),gO=e=>Dh(e)||mm(e),gv=(e,t)=>_a(e,t)?_r(t,gO,pv(e)):j.none(),jx=(e,t=!0)=>{e.dom.isEmpty(e.getBody())&&e.setContent("",{no_selection:!t})},hO=(e,t,o)=>va(No(o),$d(o),(s,a)=>{const c=Kd(!0,s),d=Kd(!1,a),h=Kd(!1,t);return e?Pl(o,h).exists(_=>_.isEqual(d)&&t.isEqual(c)):Ic(o,h).exists(_=>_.isEqual(c)&&t.isEqual(d))}).getOr(!0),Mu=e=>(Wu(e)?Ur(e):wc(e)).bind(Mu).orThunk(()=>j.some(e)),Ux=(e,t,o,s=!0)=>{var a;t.deleteContents();const c=Mu(o).getOr(o),d=ye.fromDom((a=e.dom.getParent(c.dom,e.dom.isBlock))!==null&&a!==void 0?a:o.dom);if(d.dom===e.getBody()?jx(e,s):ar(e.schema,d,{checkRootAsContent:!1})&&(Lc(d),s&&e.selection.setCursorLocation(d.dom,0)),!kn(o,d)){const h=xd(ia(d),o)?[]:jf(d);Be(h.concat(xa(o)),_=>{!kn(_,d)&&!_a(_,d)&&ar(e.schema,_)&&Jn(_)})}},A6=e=>t=>kn(e,t),VC=e=>Mr(e,"td,th"),cs=(e,t)=>fs(ye.fromDom(e),t),T6=e=>va(e.startTable,e.endTable,(t,o)=>{const s=sg(t,c=>kn(c,o)),a=sg(o,c=>kn(c,t));return!s&&!a?e:{...e,startTable:s?j.none():e.startTable,endTable:a?j.none():e.endTable,isSameTable:!1,isMultiTable:!1}}).getOr(e),hv=e=>T6(e),O6=(e,t)=>{const o=cs(e.startContainer,t),s=cs(e.endContainer,t),a=o.isSome(),c=s.isSome(),d=va(o,s,kn).getOr(!1);return hv({startTable:o,endTable:s,isStartInTable:a,isEndInTable:c,isSameTable:d,isMultiTable:!d&&a&&c})},Zx=(e,t)=>({start:e,end:t}),Ig=(e,t,o)=>({rng:e,table:t,cells:o}),Ui=zn.generate([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),Fg=(e,t)=>Xr(ye.fromDom(e),"td,th",t),Pp=e=>!kn(e.start,e.end),Ef=(e,t)=>fs(e.start,t).bind(o=>fs(e.end,t).bind(s=>lu(kn(o,s),o))),bv=(e,t)=>!Pp(e)&&Ef(e,t).exists(o=>{const s=o.dom.rows;return s.length===1&&s[0].cells.length===1}),jC=(e,t)=>{const o=Fg(e.startContainer,t),s=Fg(e.endContainer,t);return va(o,s,Zx)},UC=e=>t=>fs(t,e).bind(o=>Vo(VC(o)).map(s=>Zx(t,s))),bO=e=>t=>fs(t,e).bind(o=>St(VC(o)).map(s=>Zx(s,t))),Wx=e=>t=>Ef(t,e).map(o=>Ig(t,o,VC(o))),yO=(e,t,o,s)=>{if(o.collapsed||!e.forall(Pp))return j.none();if(t.isSameTable){const a=e.bind(Wx(s));return j.some({start:a,end:a})}else{const a=Fg(o.startContainer,s),c=Fg(o.endContainer,s),d=a.bind(UC(s)).bind(Wx(s)),h=c.bind(bO(s)).bind(Wx(s));return j.some({start:d,end:h})}},vO=(e,t)=>rs(e,o=>kn(o,t)),qx=e=>va(vO(e.cells,e.rng.start),vO(e.cells,e.rng.end),(t,o)=>e.cells.slice(t,o+1)),_O=(e,t,o)=>e.exists(s=>bv(s,o)&&R0(s.start,t)),ZC=(e,t)=>{const{startTable:o,endTable:s}=t,a=e.cloneRange();return o.each(c=>a.setStartAfter(c.dom)),s.each(c=>a.setEndBefore(c.dom)),a},xO=(e,t,o,s)=>yO(e,t,o,s).bind(({start:a,end:c})=>a.or(c)).bind(a=>{const{isSameTable:c}=t,d=qx(a).getOr([]);if(c&&a.cells.length===d.length)return j.some(Ui.fullTable(a.table));if(d.length>0){if(c)return j.some(Ui.partialTable(d,j.none()));{const h=ZC(o,t);return j.some(Ui.partialTable(d,j.some({...t,rng:h})))}}else return j.none()}),WC=(e,t,o,s)=>yO(e,t,o,s).bind(({start:a,end:c})=>{const d=a.bind(qx).getOr([]),h=c.bind(qx).getOr([]);if(d.length>0&&h.length>0){const _=ZC(o,t);return j.some(Ui.multiTable(d,h,_))}else return j.none()}),z6=(e,t)=>{const o=A6(e),s=jC(t,o),a=O6(t,o);return _O(s,t,o)?s.map(c=>Ui.singleCellTable(t,c.start)):a.isMultiTable?WC(s,a,t,o):xO(s,a,t,o)},wO=e=>Be(e,t=>{rn(t,"contenteditable"),Lc(t)}),N6=(e,t)=>j.from(e.dom.getParent(t,e.dom.isBlock)).map(ye.fromDom),Om=(e,t,o)=>{o.each(s=>{t?Jn(s):(Lc(s),e.selection.setCursorLocation(s.dom,0))})},yb=(e,t,o,s)=>{const a=o.cloneRange();s?(a.setStart(o.startContainer,o.startOffset),a.setEndAfter(t.dom.lastChild)):(a.setStartBefore(t.dom.firstChild),a.setEnd(o.endContainer,o.endOffset)),GC(e,a,t,!1).each(c=>c())},qC=e=>{const t=xf(e),o=ye.fromDom(e.selection.getNode());Qu(o.dom)&&ar(e.schema,o)?e.selection.setCursorLocation(o.dom,0):e.selection.collapse(!0),t.length>1&&Ln(t,s=>kn(s,o))&&Rr(o,"data-mce-selected","1")},KC=(e,t,o)=>j.some(()=>{const s=e.selection.getRng(),a=o.bind(({rng:c,isStartInTable:d})=>{const h=N6(e,d?c.endContainer:c.startContainer);c.deleteContents(),Om(e,d,h.filter(Ht(ar,e.schema)));const _=d?t[0]:t[t.length-1];return yb(e,_,s,d),ar(e.schema,_)?j.none():j.some(d?t.slice(1):t.slice(0,-1))}).getOr(t);wO(a),qC(e)}),kO=(e,t,o,s)=>j.some(()=>{const a=e.selection.getRng(),c=t[0],d=o[o.length-1];yb(e,c,a,!0),yb(e,d,a,!1);const h=ar(e.schema,c)?t:t.slice(1),_=ar(e.schema,d)?o:o.slice(0,-1);wO(h.concat(_)),s.deleteContents(),qC(e)}),GC=(e,t,o,s=!0)=>j.some(()=>{Ux(e,t,o,s)}),Hg=(e,t)=>j.some(()=>sl(e,!1,t)),D6=(e,t,o)=>z6(t,o).bind(s=>s.fold(Ht(GC,e),Ht(Hg,e),Ht(KC,e),Ht(kO,e))),R6=(e,t)=>Kx(e,t),M6=(e,t,o,s)=>YC(t,s).fold(()=>D6(e,t,o),a=>R6(e,a)),L6=(e,t,o)=>{const s=ye.fromDom(e.getBody()),a=e.selection.getRng();return o.length!==0?KC(e,o,j.none()):M6(e,s,a,t)},CO=(e,t)=>On(Vc(t,e),Mc),YC=(e,t)=>On(Vc(t,e),Sd("caption")),B6=(e,t,o,s,a)=>eb(o,e.getBody(),a).bind(c=>CO(t,ye.fromDom(c.getNode())).bind(d=>kn(d,s)?j.none():j.some(dt))),Kx=(e,t)=>j.some(()=>{Lc(t),e.selection.setCursorLocation(t.dom,0)}),P6=(e,t,o,s)=>No(e.dom).bind(a=>$d(e.dom).map(c=>t?o.isEqual(a)&&s.isEqual(c):o.isEqual(c)&&s.isEqual(a))).getOr(!0),Gx=(e,t)=>Kx(e,t),I6=(e,t,o)=>YC(e,ye.fromDom(o.getNode())).fold(()=>j.some(dt),s=>lu(!kn(s,t),dt)),yv=(e,t,o,s,a)=>eb(o,e.getBody(),a).fold(()=>j.some(dt),c=>P6(s,o,a,c)?Gx(e,s):I6(t,s,c)),XC=(e,t,o,s)=>{const a=Ue.fromRangeStart(e.selection.getRng());return CO(o,s).bind(c=>ar(e.schema,c,{checkRootAsContent:!1})?Kx(e,c):B6(e,o,t,c,a))},vb=(e,t,o,s)=>{const a=Ue.fromRangeStart(e.selection.getRng());return ar(e.schema,s)?Kx(e,s):yv(e,o,t,s,a)},$g=(e,t)=>e?U3(t):qy(t),Yx=(e,t)=>{const o=Ue.fromRangeStart(e.selection.getRng());return $g(t,o)||cd(t,e.getBody(),o).exists(s=>$g(t,s))},Xx=(e,t,o)=>{const s=ye.fromDom(e.getBody());return YC(s,o).fold(()=>XC(e,t,s,o).orThunk(()=>lu(Yx(e,t),dt)),a=>vb(e,t,s,a))},Ip=(e,t)=>{const o=ye.fromDom(e.selection.getStart(!0)),s=xf(e);return e.selection.isCollapsed()&&s.length===0?Xx(e,t,o):L6(e,o,s)},Gd=(e,t)=>{let o=t;for(;o&&o!==e;){if(Rl(o)||$o(o))return o;o=o.parentNode}return null},Jx=["data-ephox-","data-mce-","data-alloy-","data-snooker-","_"],Qx=zt.each,ew=e=>{const t=e.dom,o=new Set(e.serializer.getTempAttrs()),s=(c,d)=>{if(c.nodeName!==d.nodeName||c.nodeType!==d.nodeType)return!1;const h=z=>{const I={};return Qx(t.getAttribs(z),H=>{const V=H.nodeName.toLowerCase();V!=="style"&&!a(V)&&(I[V]=t.getAttrib(z,V))}),I},_=(z,I)=>{for(const H in z)if(Ro(z,H)){const V=I[H];if(ln(V)||z[H]!==V)return!1;delete I[H]}for(const H in I)if(Ro(I,H))return!1;return!0};return no(c)&&no(d)&&(!_(h(c),h(d))||!_(t.parseStyle(t.getAttrib(c,"style")),t.parseStyle(t.getAttrib(d,"style"))))?!1:!ud(c)&&!ud(d)},a=c=>Ln(Jx,d=>vs(c,d))||o.has(c);return{compare:s,isAttributeInternal:a}},tw=e=>["h1","h2","h3","h4","h5","h6"].includes(e.name),JC=e=>e.name==="summary",SO=(e,t)=>{let o=e;for(;o=o.walk();)t(o)},QC=(e,t,o,s)=>{const a=o.name;for(let c=0,d=e.length;c{const s={nodes:{},attributes:{}};return o.firstChild&&SO(o,a=>{QC(e,t,a,s)}),s},eS=(e,t)=>{const o=(s,a)=>{nn(s,c=>{const d=an(c.nodes);Be(c.filter.callbacks,h=>{for(let _=d.length-1;_>=0;_--){const z=d[_];(!(a?z.attr(c.filter.name)!==void 0:z.name===c.filter.name)||uo(z.parent))&&d.splice(_,1)}d.length>0&&h(d,c.filter.name,t)})})};o(e.nodes,!1),o(e.attributes,!0)},tS=(e,t,o,s={})=>{const a=Jy(e,t,o);eS(a,s)},ow=(e,t,o,s)=>{if((e.pad_empty_with_br||t.insert)&&o(s)){const c=new pi("br",1);t.insert&&c.attr("data-mce-bogus","1"),s.empty().append(c)}else s.empty().append(new pi("#text",3)).value=da},nw=e=>{var t;return oS(e,"#text")&&((t=e==null?void 0:e.firstChild)===null||t===void 0?void 0:t.value)===da},oS=(e,t)=>{const o=e==null?void 0:e.firstChild;return Fe(o)&&o===e.lastChild&&o.name===t},EO=(e,t)=>{const o=e.getElementRule(t.name);return(o==null?void 0:o.paddEmpty)===!0},Qy=(e,t,o,s)=>s.isEmpty(t,o,a=>EO(e,a)),AO=(e,t)=>Fe(e)&&(t(e)||e.name==="br"),Fp=e=>{let t;for(let o=e;o;o=o.parent){const s=o.attr("contenteditable");if(s==="false")break;s==="true"&&(t=o)}return j.from(t)},zm=(e,t,o=e.parent)=>{if(t.getSpecialElements()[e.name])e.empty().remove();else{const s=e.children();for(const a of s)o&&!t.isValidChild(o.name,a.name)&&zm(a,t,o);e.unwrap()}},md=(e,t,o,s=dt)=>{const a=t.getTextBlockElements(),c=t.getNonEmptyElements(),d=t.getWhitespaceElements(),h=zt.makeMap("tr,td,th,tbody,thead,tfoot,table,summary"),_=new Set,z=I=>I!==o&&!h[I.name];for(let I=0;I1)if(vv(t,H,V))zm(H,t);else{oe.reverse(),ee=oe[0].clone(),s(ee);let fe=ee;for(let ke=0;ke0?(le=oe[ke].clone(),s(le),fe.append(le)):le=fe;for(let Oe=oe[ke].firstChild;Oe&&Oe!==oe[ke+1];){const Ae=Oe.next;le.append(Oe),Oe=Ae}fe=le}Qy(t,c,d,ee)?V.insert(H,oe[0],!0):(V.insert(ee,oe[0],!0),V.insert(H,ee)),V=oe[0],(Qy(t,c,d,V)||oS(V,"br"))&&V.empty().remove()}else if(H.parent){if(H.name==="li"){let fe=H.prev;if(fe&&(fe.name==="ul"||fe.name==="ol")){fe.append(H);continue}if(fe=H.next,fe&&(fe.name==="ul"||fe.name==="ol")&&fe.firstChild){fe.insert(H,fe.firstChild,!0);continue}const ke=new pi("ul",1);s(ke),H.wrap(ke);continue}if(t.isValidChild(H.parent.name,"div")&&t.isValidChild("div",H.name)){const fe=new pi("div",1);s(fe),H.wrap(fe)}else zm(H,t)}}},nS=(e,t)=>{let o=e;for(;o;){if(o.name===t)return!0;o=o.parent}return!1},vv=(e,t,o=t.parent)=>o?e.children[t.name]&&!e.isValidChild(o.name,t.name)||t.name==="a"&&nS(o,"a")?!0:JC(o)&&tw(t)?!((o==null?void 0:o.firstChild)===t&&(o==null?void 0:o.lastChild)===t):!1:!1,TO=(e,t,o,s)=>{const a=document.createRange();return a.setStart(e,t),a.setEnd(o,s),a},OO=e=>{const t=Ue.fromRangeStart(e),o=Ue.fromRangeEnd(e),s=e.commonAncestorContainer;return cd(!1,s,o).map(a=>!xm(t,o,s)&&xm(t,a,s)?TO(t.container(),t.offset(),a.container(),a.offset()):e).getOr(e)},sw=e=>e.collapsed?e:OO(e),sS=e=>Fe(e.firstChild)&&e.firstChild===e.lastChild,zO=e=>e.name==="br"||e.value===da,NO=(e,t)=>e.getBlockElements()[t.name]&&sS(t)&&zO(t.firstChild),rS=(e,t)=>{const o=e.getNonEmptyElements();return Fe(t)&&(t.isEmpty(o)||NO(e,t))},Nm=(e,t)=>{let o=t.firstChild,s=t.lastChild;return o&&o.name==="meta"&&(o=o.next),s&&s.attr("id")==="mce_marker"&&(s=s.prev),rS(e,s)&&(s=s==null?void 0:s.prev),!o||o!==s?!1:o.name==="ul"||o.name==="ol"},Lu=e=>{var t,o;const s=e.firstChild,a=e.lastChild;return s&&s.nodeName==="META"&&((t=s.parentNode)===null||t===void 0||t.removeChild(s)),a&&a.id==="mce_marker"&&((o=a.parentNode)===null||o===void 0||o.removeChild(a)),e},rw=(e,t,o)=>{const s=t.serialize(o),a=e.createFragment(s);return Lu(a)},DO=e=>{var t;return rt((t=e==null?void 0:e.childNodes)!==null&&t!==void 0?t:[],o=>o.nodeName==="LI")},aw=e=>e.data===da||Hs(e),RO=e=>Fe(e==null?void 0:e.firstChild)&&e.firstChild===e.lastChild&&aw(e.firstChild),MO=e=>!e.firstChild||RO(e),LO=e=>e.length>0&&MO(e[e.length-1])?e.slice(0,-1):e,iw=(e,t)=>{const o=e.getParent(t,e.isBlock);return o&&o.nodeName==="LI"?o:null},BO=(e,t)=>!!iw(e,t),PO=(e,t)=>{const o=t.cloneRange(),s=t.cloneRange();return o.setStartBefore(e),s.setEndAfter(e),[o.cloneContents(),s.cloneContents()]},lw=(e,t)=>{const o=Ue.before(e),a=So(t).next(o);return a?a.toRange():null},cw=(e,t)=>{const o=Ue.after(e),a=So(t).prev(o);return a?a.toRange():null},IO=(e,t,o,s)=>{const a=PO(e,s),c=e.parentNode;return c&&(c.insertBefore(a[0],e),zt.each(t,d=>{c.insertBefore(d,e)}),c.insertBefore(a[1],e),c.removeChild(e)),cw(t[t.length-1],o)},aS=(e,t,o)=>{const s=e.parentNode;return s&&zt.each(t,a=>{s.insertBefore(a,e)}),lw(e,o)},F6=(e,t,o,s)=>(s.insertAfter(t.reverse(),e),cw(t[0],o)),H6=(e,t,o,s)=>{const a=rw(t,e,s),c=iw(t,o.startContainer),d=LO(DO(a.firstChild)),h=1,_=2,z=t.getRoot(),I=H=>{const V=Ue.fromRangeStart(o),ee=So(t.getRoot()),le=H===h?ee.prev(V):ee.next(V),oe=le==null?void 0:le.getNode();return oe?iw(t,oe)!==c:!0};return c?I(h)?aS(c,d,z):I(_)?F6(c,d,z,t):IO(c,d,z,o):null},$6=["pre"],V6=(e,t,o,s)=>{var a;const c=t.firstChild,d=t.lastChild,h=d.attr("data-mce-type")==="bookmark"?d.prev:d,_=c===h,z=mn($6,c.name);if(_&&z){const I=c.attr("contenteditable")!=="false",H=((a=e.getParent(o,e.isBlock))===null||a===void 0?void 0:a.nodeName.toLowerCase())===c.name,V=j.from(Gd(s,o)).forall(Rl);return I&&H&&V}else return!1},iS=Qu,j6=(e,t,o)=>{if(Fe(o)){const s=e.getParent(t.endContainer,iS);return o===s&&R0(ye.fromDom(o),t)}else return!1},dw=(e,t,o)=>{var s;if(o.getAttribute("data-mce-bogus")==="all")(s=o.parentNode)===null||s===void 0||s.insertBefore(e.dom.createFragment(t),o);else{const a=o.firstChild,c=o.lastChild;!a||a===c&&a.nodeName==="BR"?e.dom.setHTML(o,t):e.selection.setContent(t,{no_events:!0})}},lS=(e,t,o)=>{j.from(e.getParent(t,"td,th")).map(ye.fromDom).each(s=>n0(s,o))},FO=(e,t)=>{const o=e.schema.getTextInlineElements(),s=e.dom;if(t){const a=e.getBody(),c=ew(e),d="*[data-mce-fragment]",h=s.select(d);zt.each(h,_=>{const z=V=>Fe(o[V.nodeName.toLowerCase()]),I=V=>V.childNodes.length===1;if((V=>!(vC(s,V)||F3(s,V)))(_)&&z(_)&&I(_)){const V=fb(s,_),ee=(ke,Oe)=>$s(ke,Ae=>mn(Oe,Ae)),le=ke=>I(_)&&s.is(ke,d)&&z(ke)&&(ke.nodeName===_.nodeName&&ee(V,fb(s,ke))||le(ke.children[0])),oe=ke=>Fe(ke)&&ke!==a&&(c.compare(_,ke)||oe(ke.parentElement)),fe=ke=>Fe(ke)&&ke!==a&&s.is(ke,d)&&(h6(s,_,ke)||fe(ke.parentElement));(le(_.children[0])||oe(_.parentElement)&&!fe(_.parentElement))&&s.remove(_,!0)}})}},cS=e=>{let t=e;for(;t=t.walk();)t.type===1&&t.attr("data-mce-fragment","1")},U6=e=>{zt.each(e.getElementsByTagName("*"),t=>{t.removeAttribute("data-mce-fragment")})},Z6=e=>!!e.getAttribute("data-mce-fragment"),W6=(e,t)=>Fe(t)&&!e.schema.getVoidElements()[t.nodeName],q6=(e,t)=>{var o,s,a;let c;const d=e.dom,h=e.selection;if(!t)return;h.scrollIntoView(t);const _=Gd(e.getBody(),t);if(_&&d.getContentEditable(_)==="false"){d.remove(t),h.select(_);return}let z=d.createRng();const I=t.previousSibling;if(wt(I)){z.setStart(I,(s=(o=I.nodeValue)===null||o===void 0?void 0:o.length)!==null&&s!==void 0?s:0);const ee=t.nextSibling;wt(ee)&&(I.appendData(ee.data),(a=ee.parentNode)===null||a===void 0||a.removeChild(ee))}else z.setStartBefore(t),z.setEndBefore(t);const H=ee=>{let le=Ue.fromRangeStart(ee);return le=So(e.getBody()).next(le),le==null?void 0:le.toRange()},V=d.getParent(t,d.isBlock);if(d.remove(t),V&&d.isEmpty(V)){const ee=iS(V);xs(ye.fromDom(V)),z.setStart(V,0),z.setEnd(V,0),!ee&&!Z6(V)&&(c=H(z))?(z=c,d.remove(V)):d.add(V,d.create("br",ee?{}:{"data-mce-bogus":"1"}))}h.setRng(z)},K6=e=>{const t=e.dom,o=sw(e.selection.getRng());e.selection.setRng(o);const s=t.getParent(o.startContainer,iS);j6(t,o,s)?GC(e,o,ye.fromDom(s)):o.startContainer===o.endContainer&&o.endOffset-o.startOffset===1&&wt(o.startContainer.childNodes[o.startOffset])?o.deleteContents():e.getDoc().execCommand("Delete",!1)},G6=e=>{for(let t=e;t;t=t.walk())if(t.attr("id")==="mce_marker")return j.some(t);return j.none()},uw=(e,t,o)=>{var s;return Ln(o.children(),tw)&&((s=e.getParent(t,e.isBlock))===null||s===void 0?void 0:s.nodeName)==="SUMMARY"},fw=(e,t,o)=>{var s,a;const c=e.selection,d=e.dom,h=e.parser,_=o.merge,z=Lp({validate:!0},e.schema),I='';o.preserve_zwsp||(t=ol(t)),t.indexOf("{$caret}")===-1&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,I);let H=c.getRng();const V=H.startContainer,ee=e.getBody();V===ee&&c.isCollapsed()&&d.isBlock(ee.firstChild)&&W6(e,ee.firstChild)&&d.isEmpty(ee.firstChild)&&(H=d.createRng(),H.setStart(ee.firstChild,0),H.setEnd(ee.firstChild,0),c.setRng(H)),c.isCollapsed()||K6(e);const le=c.getNode(),oe={context:le.nodeName.toLowerCase(),data:o.data,insert:!0},fe=h.parse(t,oe);if(o.paste===!0&&Nm(e.schema,fe)&&BO(d,le))return H=H6(z,d,c.getRng(),fe),H&&c.setRng(H),t;o.paste===!0&&V6(d,fe,le,e.getBody())&&((s=fe.firstChild)===null||s===void 0||s.unwrap()),cS(fe);let ke=fe.lastChild;if(ke&&ke.attr("id")==="mce_marker"){const Oe=ke;for(ke=ke.prev;ke;ke=ke.walk(!0))if(ke.type===3||!d.isBlock(ke.name)){ke.parent&&e.schema.isValidChild(ke.parent.name,"span")&&ke.parent.insert(Oe,ke,ke.name==="br");break}}if(e._selectionOverrides.showBlockCaretContainer(le),!oe.invalid&&!uw(d,le,fe))t=z.serialize(fe),dw(e,t,le);else{e.selection.setContent(I);let Oe=c.getNode(),Ae;const Pe=e.getBody();for(lo(Oe)?Oe=Ae=Pe:Ae=Oe;Ae&&Ae!==Pe;)Oe=Ae,Ae=Ae.parentNode;t=Oe===Pe?Pe.innerHTML:d.getOuterHTML(Oe);const ht=h.parse(t),Mt=G6(ht),Yt=Mt.bind(Fp).getOr(ht);Mt.each(to=>to.replace(fe));const Qe=fe.children(),Ve=(a=fe.parent)!==null&&a!==void 0?a:ht;fe.unwrap();const mt=rt(Qe,to=>vv(e.schema,to,Ve));md(mt,e.schema,Yt),tS(h.getNodeFilters(),h.getAttributeFilters(),ht),t=z.serialize(ht),Oe===Pe?d.setHTML(Pe,t):d.setOuterHTML(Oe,t)}return FO(e,_),q6(e,d.get("mce_marker")),U6(e.getBody()),lS(d,c.getStart(),e.schema),ea(e.schema,e.getBody(),c.getStart()),t},_b=e=>e instanceof pi,Y6=e=>{Vy(e)&&No(e.getBody()).each(t=>{const o=t.getNode(),s=ec(o)?No(o).getOr(t):t;e.selection.setRng(s.toRange())})},dS=(e,t,o)=>{e.dom.setHTML(e.getBody(),t),o!==!0&&Y6(e)},X6=(e,t,o,s)=>{if(o=ol(o),o.length===0||/^\s+$/.test(o)){const a='
    ';t.nodeName==="TABLE"?o=""+a+"":/^(UL|OL)$/.test(t.nodeName)&&(o="
  • "+a+"
  • ");const c=Vi(e);return e.schema.isValidChild(t.nodeName.toLowerCase(),c.toLowerCase())?(o=a,o=e.dom.createHTML(c,g0(e),o)):o||(o=a),dS(e,o,s.no_selection),{content:o,html:o}}else{s.format!=="raw"&&(o=Lp({validate:!1},e.schema).serialize(e.parser.parse(o,{isRootContent:!0,insert:!0})));const a=Mh(ye.fromDom(t))?o:zt.trim(o);return dS(e,a,s.no_selection),{content:a,html:a}}},J6=(e,t,o,s)=>{tS(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),o);const a=Lp({validate:!1},e.schema).serialize(o),c=ol(Mh(ye.fromDom(t))?a:zt.trim(a));return dS(e,c,s.no_selection),{content:o,html:c}},Q6=(e,t,o)=>j.from(e.getBody()).map(s=>_b(t)?J6(e,s,t,o):X6(e,s,t,o)).getOr({content:t,html:_b(o.content)?"":o.content}),HO=e=>Gt(e)?e:fn,Bu=(e,t,o)=>{let s=e.dom;const a=HO(o);for(;s.parentNode;){s=s.parentNode;const c=ye.fromDom(s),d=t(c);if(d.isSome())return d;if(a(c))break}return j.none()},_v=(e,t,o)=>{const s=t(e),a=HO(o);return s.orThunk(()=>a(e)?j.none():Bu(e,t,a))},mw=Iy,uS=(e,t,o)=>{const s=e.formatter.get(o);if(s)for(let a=0;a{const c=e.dom.getRoot();if(t===c)return!1;const d=e.dom.getParent(t,h=>uS(e,h,o)?!0:h.parentNode===c||!!Dm(e,h,o,s,!0));return!!Dm(e,d,o,s,a)},gw=(e,t,o)=>Ja(o)&&mw(t,o.inline)||wf(o)&&mw(t,o.block)?!0:Fc(o)?no(t)&&e.is(t,o.selector):!1,fS=(e,t,o,s,a,c)=>{const d=o[s],h=s==="attributes";if(Gt(o.onmatch))return o.onmatch(t,o,s);if(d){if(Vt(d)){for(let _=0;_{const c=e.formatter.get(o),d=e.dom;if(c&&no(t))for(let h=0;h{if(s)return pw(e,s,t,o,a);if(s=e.selection.getNode(),pw(e,s,t,o,a))return!0;const c=e.selection.getStart();return!!(c!==s&&pw(e,c,t,o,a))},$O=(e,t,o)=>{const s=[],a={},c=e.selection.getStart();return e.dom.getParent(c,d=>{for(let h=0;h{const o=a=>kn(a,ye.fromDom(e.getBody())),s=(a,c)=>Dm(e,a.dom,c)?j.some(c):j.none();return j.from(e.selection.getStart(!0)).bind(a=>_v(ye.fromDom(a),c=>Kr(t,d=>s(c,d)),o)).getOrNull()},jO=(e,t)=>{const o=e.formatter.get(t),s=e.dom;if(o&&e.selection.isEditable()){const a=e.selection.getStart(),c=B0(s,a);for(let d=o.length-1;d>=0;d--){const h=o[d];if(!Fc(h))return!0;for(let _=c.length-1;_>=0;_--)if(s.is(c[_],h.selector))return!0}}return!1},mS=(e,t,o)=>ko(o,(s,a)=>{const c=z4(e,a);return e.formatter.matchNode(t,a,{},c)?s.concat([a]):s},[]),xv=ua,eL=(e,t)=>e.importNode(t,!0),UO=e=>{if(e){const t=new Ma(e,e);for(let o=t.current();o;o=t.next())if(wt(o))return o}return null},Rm=e=>{const t=ye.fromTag("span");return $a(t,{id:Ry,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&fr(t,ye.fromText(xv)),t},pS=e=>{const t=UO(e);return t&&t.data.charAt(0)===xv&&t.deleteData(0,1),t},gS=(e,t,o)=>{const s=e.dom,a=e.selection;if(P2(t))sl(e,!1,ye.fromDom(t),o,!0);else{const c=a.getRng(),d=s.getParent(t,s.isBlock),h=c.startContainer,_=c.startOffset,z=c.endContainer,I=c.endOffset,H=pS(t);s.remove(t,!0),h===H&&_>0&&c.setStart(H,_-1),z===H&&I>0&&c.setEnd(H,I-1),d&&s.isEmpty(d)&&Lc(ye.fromDom(d)),a.setRng(c)}},hS=(e,t,o)=>{const s=e.dom,a=e.selection;if(t)gS(e,t,o);else if(t=Cg(e.getBody(),a.getStart()),!t)for(;t=s.get(Ry);)gS(e,t,o)},xb=(e,t,o)=>{var s,a;const c=e.dom,d=c.getParent(o,Ht(sx,e.schema));d&&c.isEmpty(d)?(s=o.parentNode)===null||s===void 0||s.replaceChild(t,o):(nc(ye.fromDom(o)),c.isEmpty(o)?(a=o.parentNode)===null||a===void 0||a.replaceChild(t,o):c.insertAfter(t,o))},bS=(e,t)=>(e.appendChild(t),t),wv=(e,t)=>{var o;const s=ao(e,(c,d)=>bS(c,d.cloneNode(!1)),t),a=(o=s.ownerDocument)!==null&&o!==void 0?o:document;return bS(s,a.createTextNode(xv))},tL=(e,t,o,s,a,c)=>{const d=e.formatter,h=e.dom,_=rt(vt(d.get()),H=>H!==s&&!Yn(H,"removeformat")),z=mS(e,o,_);if(rt(z,H=>!N4(e,H,s)).length>0){const H=o.cloneNode(!1);return h.add(t,H),d.remove(s,a,H,c),h.remove(H),j.some(H)}else return j.none()},ZO=e=>Oh(e,fm(e).replace(new RegExp(`${da}$`)," ")),yS=(e,t)=>{const o=()=>{t!==null&&!e.dom.isEmpty(t)&&Ur(ye.fromDom(t)).each(s=>{Rs(s)?ZO(s):ca(s,a=>Rs(a)).each(a=>{Rs(a)&&ZO(a)})})};e.once("input",s=>{s.data&&!ob(s.data)&&(s.isComposing?e.once("compositionend",()=>{o()}):o())})},Hp=(e,t,o)=>{let s;const a=e.selection,c=e.formatter.get(t);if(!c)return;const d=a.getRng();let h=d.startOffset;const z=d.startContainer.nodeValue;s=Cg(e.getBody(),a.getStart());const I=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(z&&h>0&&h{const a=e.dom,c=e.selection;let d=!1;const h=e.formatter.get(t);if(!h)return;const _=c.getRng(),z=_.startContainer,I=_.startOffset;let H=z;wt(z)&&(I!==z.data.length&&(d=!0),H=H.parentNode);const V=[];let ee;for(;H;){if(Dm(e,H,t,o,s)){ee=H;break}H.nextSibling&&(d=!0),V.push(H),H=H.parentNode}if(ee)if(d){const le=c.getBookmark();_.collapse(!0);let oe=Ag(a,_,h,!0);oe=J0(oe),e.formatter.remove(t,o,oe,s),c.moveToBookmark(le)}else{const le=Cg(e.getBody(),ee),oe=Fe(le)?a.getParents(ee.parentNode,zo,le):[],fe=Rm(!1).dom;xb(e,fe,le??ee);const ke=tL(e,fe,ee,t,o,s),Oe=wv([...V,...ke.toArray(),...oe],fe);le&&gS(e,le,Fe(le)),c.setCursorLocation(Oe,1),yS(e,fe),a.isEmpty(ee)&&a.remove(ee)}},_S=(e,t,o)=>{const s=e.selection,a=e.getBody();hS(e,null,o),(t===8||t===46)&&s.isCollapsed()&&s.getStart().innerHTML===xv&&hS(e,Cg(a,s.getStart()),!0),(t===37||t===39)&&hS(e,Cg(a,s.getStart()),!0)},xS=e=>wt(e)&&Gi(e.data,da),WO=e=>{e.on("mouseup keydown",t=>{_S(e,t.keyCode,xS(e.selection.getRng().endContainer))})},wS=e=>{const t=Rm(!1),o=wv(e,t.dom);return{caretContainer:t,caretPosition:Ue(o,0)}},kS=(e,t)=>{const{caretContainer:o,caretPosition:s}=wS(t);return Zs(ye.fromDom(e),o),Jn(ye.fromDom(e)),s},oL=(e,t)=>{const{caretContainer:o,caretPosition:s}=wS(t);return e.insertNode(o.dom),s},e1=(e,t)=>{if(dd(t.dom))return!1;const o=e.schema.getTextInlineElements();return Ro(o,En(t))&&!dd(t.dom)&&!Rd(t.dom)},jg={},CS=ka(["pre"]),qO=(e,t)=>{jg[e]||(jg[e]=[]),jg[e].push(t)},KO=(e,t)=>{Ro(jg,e)&&Be(jg[e],o=>{o(t)})};qO("pre",e=>{const t=e.selection.getRng(),o=a=>c=>{const d=c.previousSibling;return CS(d)&&mn(a,d)},s=(a,c)=>{const d=ye.fromDom(c),h=ul(d).dom;Jn(d),xr(ye.fromDom(a),[ye.fromTag("br",h),ye.fromTag("br",h),...xa(d)])};if(!t.collapsed){const a=e.selection.getSelectedBlocks(),c=rt(rt(a,CS),o(a));Be(c,d=>{s(d.previousSibling,d)})}});const SS=["fontWeight","fontStyle","color","fontSize","fontFamily"],hw=e=>ue(e.styles)&&Ln(vt(e.styles),t=>mn(SS,t)),ES=e=>On(e,t=>Ja(t)&&t.inline==="span"&&hw(t)),t1=(e,t)=>{const o=e.get(t);return ve(o)?ES(o):j.none()},GO=(e,t)=>Ic(t,Ue.fromRangeStart(e)).isNone(),AS=(e,t)=>Pl(t,Ue.fromRangeEnd(e)).exists(o=>!Hs(o.getNode())||Pl(t,o).isSome())===!1,YO=e=>t=>ig(t)&&e.isEditable(t),nL=e=>{const t=e.getSelectedBlocks(),o=e.getRng();if(e.isCollapsed())return[];if(t.length===1)return GO(o,t[0])&&AS(o,t[0])?t:[];{const s=St(t).filter(d=>GO(o,d)).toArray(),a=Vo(t).filter(d=>AS(o,d)).toArray(),c=t.slice(1,-1);return s.concat(c).concat(a)}},XO=e=>rt(nL(e),YO(e.dom)),TS=e=>rt(e.getSelectedBlocks(),YO(e.dom)),OS=zt.each,bw=e=>no(e)&&!ud(e)&&!dd(e)&&!Rd(e),Ug=(e,t)=>{for(let o=e;o;o=o[t]){if(wt(o)&&Pn(o.data))return e;if(no(o)&&!ud(o))return o}return e},zS=(e,t,o)=>{const s=ew(e),a=Ql(t)&&e.dom.isEditable(t),c=Ql(o)&&e.dom.isEditable(o);if(a&&c){const d=Ug(t,"previousSibling"),h=Ug(o,"nextSibling");if(s.compare(d,h)){for(let _=d.nextSibling;_&&_!==h;){const z=_;_=_.nextSibling,d.appendChild(z)}return e.dom.remove(h),zt.each(zt.grep(h.childNodes),_=>{d.appendChild(_)}),d}}return o},yw=(e,t,o,s)=>{var a;if(s&&t.merge_siblings!==!1){const c=(a=zS(e,nb(s),s))!==null&&a!==void 0?a:s;zS(e,c,nb(c,!0))}},JO=(e,t,o)=>{if(t.clear_child_styles){const s=t.links?"*:not(a)":"*";OS(e.select(s,o),a=>{bw(a)&&e.isEditable(a)&&OS(t.styles,(c,d)=>{e.setStyle(a,d,"")})})}},kv=(e,t,o)=>{OS(e.childNodes,s=>{bw(s)&&(t(s)&&o(s),s.hasChildNodes()&&kv(s,t,o))})},Zg=(e,t)=>{t.nodeName==="SPAN"&&e.getAttribs(t).length===0&&e.remove(t,!0)},NS=(e,t)=>o=>!!(o&&L0(e,o,t)),pd=(e,t,o)=>s=>{e.setStyle(s,t,o),s.getAttribute("style")===""&&s.removeAttribute("style"),Zg(e,s)},Yd=zn.generate([{keep:[]},{rename:["name"]},{removed:[]}]),DS=/^(src|href|style)$/,vw=zt.each,_w=Iy,QO=e=>/^(TR|TH|TD)$/.test(e.nodeName),wb=(e,t,o)=>e.isChildOf(t,o)&&t!==o&&!e.isBlock(o),Cv=(e,t,o)=>{let s=t[o?"startContainer":"endContainer"],a=t[o?"startOffset":"endOffset"];if(no(s)){const c=s.childNodes.length-1;!o&&a&&a--,s=s.childNodes[a>c?c:a]}return wt(s)&&o&&a>=s.data.length&&(s=new Ma(s,e.getBody()).next()||s),wt(s)&&!o&&a===0&&(s=new Ma(s,e.getBody()).prev()||s),s},RS=(e,t)=>{const o=t?"firstChild":"lastChild",s=e[o];return QO(e)&&s?e.nodeName==="TR"&&s[o]||s:e},xw=(e,t,o,s)=>{var a;const c=e.create(o,s);return(a=t.parentNode)===null||a===void 0||a.insertBefore(c,t),c.appendChild(t),c},ww=(e,t,o,s,a)=>{const c=ye.fromDom(t),d=ye.fromDom(e.create(s,a)),h=o?uu(c):_c(c);return xr(d,h),o?(Zs(c,d),Wa(d,c)):(Ne(c,d),fr(d,c)),d.dom},sL=(e,t)=>t.links&&e.nodeName==="A",ez=(e,t,o)=>{const s=t.parentNode;let a;const c=e.dom,d=Vi(e);wf(o)&&s===c.getRoot()&&(!o.list_block||!_w(t,o.list_block))&&Be(an(t.childNodes),h=>{Sg(e,d,h.nodeName.toLowerCase())?a?a.appendChild(h):(a=xw(c,h,d),c.setAttribs(a,g0(e))):a=null}),!(M4(o)&&!_w(o.inline,t))&&c.remove(t,!0)},MS=(e,t,o)=>D(e)?{name:t,value:null}:{name:e,value:zp(t,o)},tz=(e,t)=>{e.getAttrib(t,"style")===""&&(t.removeAttribute("style"),t.removeAttribute("data-mce-style"))},jc=(e,t,o,s,a)=>{let c=!1;vw(o.styles,(d,h)=>{const{name:_,value:z}=MS(h,d,s),I=rx(z,_);(o.remove_similar||ot(z)||!no(a)||_w(L0(e,a,_),I))&&e.setStyle(t,_,""),c=!0}),c&&tz(e,t)},LS=(e,t,o)=>{t==="removeformat"?Be(TS(e.selection),s=>{Be(SS,a=>e.dom.setStyle(s,a,"")),tz(e.dom,s)}):t1(e.formatter,t).each(s=>{Be(TS(e.selection),a=>jc(e.dom,a,s,o,null))})},BS=(e,t,o,s,a)=>{const c=e.dom,d=ew(e),h=e.schema;if(Ja(t)&&tc(h,t.inline)&&Oc(h,s)&&s.parentElement===e.getBody())return ez(e,s,t),Yd.removed();if(!t.ceFalseOverride&&s&&c.getContentEditableParent(s)==="false"||s&&!gw(c,s,t)&&!sL(s,t))return Yd.keep();const _=s,z=t.preserve_attributes;if(Ja(t)&&t.remove==="all"&&ve(z)){const I=rt(c.getAttribs(_),H=>mn(z,H.name.toLowerCase()));if(c.removeAllAttribs(_),Be(I,H=>c.setAttrib(_,H.name,H.value)),I.length>0)return Yd.rename("span")}if(t.remove!=="all"){jc(c,_,t,o,a),vw(t.attributes,(H,V)=>{const{name:ee,value:le}=MS(V,H,o);if(t.remove_similar||ot(le)||!no(a)||_w(c.getAttrib(a,ee),le)){if(ee==="class"){const oe=c.getAttrib(_,ee);if(oe){let fe="";if(Be(oe.split(/\s+/),ke=>{/mce\-\w+/.test(ke)&&(fe+=(fe?" ":"")+ke)}),fe){c.setAttrib(_,ee,fe);return}}}if(DS.test(ee)&&_.removeAttribute("data-mce-"+ee),ee==="style"&&ka(["li"])(_)&&c.getStyle(_,"list-style-type")==="none"){_.removeAttribute(ee),c.setStyle(_,"list-style-type","none");return}ee==="class"&&_.removeAttribute("className"),_.removeAttribute(ee)}}),vw(t.classes,H=>{H=zp(H,o),(!no(a)||c.hasClass(a,H))&&c.removeClass(_,H)});const I=c.getAttribs(_);for(let H=0;H{let c;return t.parentNode&&Be(B0(e.dom,t.parentNode).reverse(),d=>{if(!c&&no(d)&&d.id!=="_start"&&d.id!=="_end"){const h=Dm(e,d,o,s,a);h&&h.split!==!1&&(c=d)}}),c},oz=(e,t,o,s)=>BS(e,t,o,s,s).fold(Ge(s),a=>(e.dom.createFragment().appendChild(s),e.dom.rename(s,a)),Ge(null)),Sv=(e,t,o,s,a,c,d,h)=>{var _,z;let I,H;const V=e.dom;if(o){const ee=o.parentNode;for(let le=s.parentNode;le&&le!==ee;le=le.parentNode){let oe=V.clone(le,!1);for(let fe=0;fe{const c=e.formatter.get(t),d=c[0],h=e.dom,_=e.selection,z=oe=>{const fe=PS(e,oe,t,o,a);return Sv(e,c,fe,oe,oe,!0,d,o)},I=oe=>ud(oe)&&no(oe)&&(oe.id==="_start"||oe.id==="_end"),H=oe=>Ln(c,fe=>qg(e,fe,o,oe,oe)),V=oe=>{const fe=an(oe.childNodes),Oe=H(oe)||Ln(c,ht=>gw(h,oe,ht)),Ae=oe.parentNode;if(!Oe&&Fe(Ae)&&ix(d)&&H(Ae),d.deep&&fe.length)for(let ht=0;ht{no(oe)&&e.dom.getStyle(oe,"text-decoration")===ht&&oe.parentNode&&B2(h,oe.parentNode)===ht&&qg(e,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:ht}},void 0,oe)})},ee=oe=>{const fe=h.get(oe?"_start":"_end");if(fe){let ke=fe[oe?"firstChild":"lastChild"];return I(ke)&&(ke=ke[oe?"firstChild":"lastChild"]),wt(ke)&&ke.data.length===0&&(ke=oe?fe.previousSibling||fe.nextSibling:fe.nextSibling||fe.previousSibling),h.remove(fe,!0),ke}else return null},le=oe=>{let fe,ke,Oe=Ag(h,oe,c,oe.collapsed);if(d.split){if(Oe=J0(Oe),fe=Cv(e,Oe,!0),ke=Cv(e,Oe),fe!==ke){if(fe=RS(fe,!0),ke=RS(ke,!1),wb(h,fe,ke)){const Pe=j.from(fe.firstChild).getOr(fe);z(ww(h,Pe,!0,"span",{id:"_start","data-mce-type":"bookmark"})),ee(!0);return}if(wb(h,ke,fe)){const Pe=j.from(ke.lastChild).getOr(ke);z(ww(h,Pe,!1,"span",{id:"_end","data-mce-type":"bookmark"})),ee(!1);return}fe=xw(h,fe,"span",{id:"_start","data-mce-type":"bookmark"}),ke=xw(h,ke,"span",{id:"_end","data-mce-type":"bookmark"});const Ae=h.createRng();Ae.setStartAfter(fe),Ae.setEndBefore(ke),H0(h,Ae,Pe=>{Be(Pe,ht=>{!ud(ht)&&!ud(ht.parentNode)&&z(ht)})}),z(fe),z(ke),fe=ee(!0),ke=ee()}else fe=ke=z(fe);Oe.startContainer=fe.parentNode?fe.parentNode:fe,Oe.startOffset=h.nodeIndex(fe),Oe.endContainer=ke.parentNode?ke.parentNode:ke,Oe.endOffset=h.nodeIndex(ke)+1}H0(h,Oe,Ae=>{Be(Ae,V)})};if(s){if(Py(s)){const oe=h.createRng();oe.setStartBefore(s),oe.setEndAfter(s),le(oe)}else le(s);j4(e,t,s,o);return}!_.isCollapsed()||!Ja(d)||xf(e).length?(R2(e,()=>By(e,le),oe=>Ja(d)&&Vg(e,t,o,oe)),e.nodeChanged()):vS(e,t,o,a),LS(e,t,o),j4(e,t,s,o)},Wg=(e,t,o,s,a)=>{(s||e.selection.isEditable())&&$p(e,t,o,s,a)},qg=(e,t,o,s,a)=>BS(e,t,o,s,a).fold(fn,c=>(e.dom.rename(s,c),!0),zo),kw=zt.each,IS=(e,t,o,s)=>{const a=c=>{if(Ql(c)&&no(c.parentNode)&&e.isEditable(c)){const d=B2(e,c.parentNode);e.getStyle(c,"color")&&d?e.setStyle(c,"text-decoration",d):e.getStyle(c,"text-decoration")===d&&e.setStyle(c,"text-decoration",null)}};t.styles&&(t.styles.color||t.styles.textDecoration)&&(zt.walk(s,a,"childNodes"),a(s))},nz=(e,t,o,s)=>{if(t.styles&&t.styles.backgroundColor){const a=NS(e,"fontSize");kv(s,c=>a(c)&&e.isEditable(c),pd(e,"backgroundColor",zp(t.styles.backgroundColor,o)))}},rL=(e,t,o,s)=>{if(Ja(t)&&(t.inline==="sub"||t.inline==="sup")){const a=NS(e,"fontSize");kv(s,d=>a(d)&&e.isEditable(d),pd(e,"fontSize",""));const c=rt(e.select(t.inline==="sup"?"sub":"sup",s),e.isEditable);e.remove(c,!0)}},sz=(e,t,o,s)=>{kw(t,a=>{Ja(a)&&kw(e.dom.select(a.inline,s),c=>{bw(c)&&qg(e,a,o,c,a.exact?c:null)}),JO(e.dom,a,s)})},rz=(e,t,o,s,a)=>{const c=a.parentNode;Dm(e,c,o,s)&&qg(e,t,s,a)||t.merge_with_parents&&c&&e.dom.getParent(c,d=>Dm(e,d,o,s)?(qg(e,t,s,a),!0):!1)},Ev=zt.each,az=(e,t,o,s)=>{if(J5(e)&&Ja(t)&&o.parentNode){const a=Jb(e.schema),c=np(ye.fromDom(o),d=>dd(d.dom));return Ha(a,s)&&ml(e.schema,o.parentNode,{skipBogus:!1,includeZwsp:!0})&&!c}else return!1},iz=(e,t,o,s)=>{if(Ev(o.styles,(a,c)=>{e.setStyle(t,c,zp(a,s))}),o.styles){const a=e.getAttrib(t,"style");a&&e.setAttrib(t,"data-mce-style",a)}},aL=(e,t,o,s)=>{const a=e.formatter.get(t),c=a[0],d=!s&&e.selection.isCollapsed(),h=e.dom,_=e.selection,z=(le,oe=c)=>{Gt(oe.onformat)&&oe.onformat(le,oe,o,s),iz(h,le,oe,o),Ev(oe.attributes,(fe,ke)=>{h.setAttrib(le,ke,zp(fe,o))}),Ev(oe.classes,fe=>{const ke=zp(fe,o);h.hasClass(le,ke)||h.addClass(le,ke)})},I=(le,oe)=>{let fe=!1;return Ev(le,ke=>Fc(ke)?h.getContentEditable(oe)==="false"&&!ke.ceFalseOverride||Fe(ke.collapsed)&&ke.collapsed!==d?!0:h.is(oe,ke.selector)&&!dd(oe)?(z(oe,ke),fe=!0,!1):!0:!1),fe},H=le=>{if(ft(le)){const oe=h.create(le);return z(oe),oe}else return null},V=(le,oe,fe)=>{const ke=[];let Oe=!0;const Ae=c.inline||c.block,Pe=H(Ae),ht=Qe=>D4(c)&&Dm(e,Qe,t,o),Mt=(Qe,Ve,mt)=>{const to=R4(c)&&sx(e.schema,Qe)&&Sg(e,Ve,Ae);return mt&&to},Yt=(Qe,Ve,mt,to)=>{const bo=Qe.nodeName.toLowerCase(),gn=Sg(e,Ae,bo)&&Sg(e,Ve,Ae),Cn=!fe&&wt(Qe)&&Bc(Qe.data),ds=dd(Qe),hs=!Ja(c)||!le.isBlock(Qe);return(mt||to)&&gn&&!Cn&&!ds&&hs};H0(le,oe,Qe=>{let Ve;const mt=to=>{let bo=!1,gn=Oe,Cn=!1;const ds=to.parentNode,hs=ds.nodeName.toLowerCase(),qr=le.getContentEditable(to);Fe(qr)&&(gn=Oe,Oe=qr==="true",bo=!0,Cn=L2(e,to));const il=Oe&&!bo;if(Hs(to)&&!az(e,c,to,hs)){Ve=null,wf(c)&&le.remove(to);return}if(ht(to)){Ve=null;return}if(Mt(to,hs,il)){const Os=le.rename(to,Ae);z(Os),ke.push(Os),Ve=null;return}if(Fc(c)){let Os=I(a,to);if(!Os&&Fe(ds)&&ix(c)&&(Os=I(a,ds)),!Ja(c)||Os){Ve=null;return}}Fe(Pe)&&Yt(to,hs,il,Cn)?(Ve||(Ve=le.clone(Pe,!1),ds.insertBefore(Ve,to),ke.push(Ve)),Cn&&bo&&(Oe=gn),Ve.appendChild(to)):(Ve=null,Be(an(to.childNodes),mt),bo&&(Oe=gn),Ve=null)};Be(Qe,mt)}),c.links===!0&&Be(ke,Qe=>{const Ve=mt=>{mt.nodeName==="A"&&z(mt,c),Be(an(mt.childNodes),Ve)};Ve(Qe)}),Be(ke,Qe=>{const Ve=bo=>{let gn=0;return Be(bo.childNodes,Cn=>{!EM(Cn)&&!ud(Cn)&&gn++}),gn},mt=bo=>On(bo.childNodes,nx).filter(Cn=>le.getContentEditable(Cn)!=="false"&&gw(le,Cn,c)).map(Cn=>{const ds=le.clone(Cn,!1);return z(ds),le.replace(ds,bo,!0),le.remove(Cn,!0),ds}).getOr(bo),to=Ve(Qe);if((ke.length>1||!le.isBlock(Qe))&&to===0){le.remove(Qe,!0);return}(Ja(c)||wf(c)&&c.wrapper)&&(!c.exact&&to===1&&(Qe=mt(Qe)),sz(e,a,o,Qe),rz(e,c,t,o,Qe),nz(le,c,o,Qe),IS(le,c,o,Qe),rL(le,c,o,Qe),yw(e,c,o,Qe))})},ee=Py(s)?s:_.getNode();if(h.getContentEditable(ee)==="false"&&!L2(e,ee)){s=ee,I(a,s),V4(e,t,s,o);return}if(c){if(s)if(Py(s)){if(!I(a,s)){const le=h.createRng();le.setStartBefore(s),le.setEndAfter(s),V(h,Ag(h,le,a),!0)}}else V(h,s,!0);else!d||!Ja(c)||xf(e).length?(_.setRng(sw(_.getRng())),R2(e,()=>{By(e,(le,oe)=>{const fe=oe?le:Ag(h,le,a);V(h,fe,!1)})},zo),e.nodeChanged()):Hp(e,t,o),t1(e.formatter,t).each(le=>{Be(XO(e.selection),oe=>iz(h,oe,le,o))});KO(t,e)}V4(e,t,s,o)},lz=(e,t,o,s)=>{(s||e.selection.isEditable())&&aL(e,t,o,s)},Il=e=>Ro(e,"vars"),cz=(e,t)=>{e.set({}),t.on("NodeChange",o=>{HS(t,o.element,e.get())}),t.on("FormatApply FormatRemove",o=>{const s=j.from(o.node).map(a=>Py(a)?a:a.startContainer).bind(a=>no(a)?j.some(a):j.from(a.parentElement)).getOrThunk(()=>o1(t));HS(t,s,e.get())})},o1=e=>e.selection.getStart(),dz=(e,t,o,s,a)=>tn(t,h=>{const _=e.formatter.matchNode(h,o,a??{},s);return!ln(_)},h=>uS(e,h,o)?!0:s?!1:Fe(e.formatter.matchNode(h,o,a,!0))),FS=(e,t)=>{const o=t??o1(e);return rt(B0(e.dom,o),s=>no(s)&&!Rd(s))},HS=(e,t,o)=>{const s=FS(e,t);nn(o,(a,c)=>{const d=h=>{const _=dz(e,s,c,h.similar,Il(h)?h.vars:void 0),z=_.isSome();if(h.state.get()!==z){h.state.set(z);const I=_.getOr(t);Il(h)?h.callback(z,{node:I,format:c,parents:s}):Be(h.callbacks,H=>H(z,{node:I,format:c,parents:s}))}};Be([a.withSimilar,a.withoutSimilar],d),Be(a.withVars,d)})},$S=(e,t,o,s,a,c)=>{const d=t.get();Be(o.split(","),h=>{const _=Gn(d,h).getOrThunk(()=>{const I={withSimilar:{state:Er(!1),similar:!0,callbacks:[]},withoutSimilar:{state:Er(!1),similar:!1,callbacks:[]},withVars:[]};return d[h]=I,I}),z=()=>{const I=FS(e);return dz(e,I,h,a,c).isSome()};if(ln(c)){const I=a?_.withSimilar:_.withoutSimilar;I.callbacks.push(s),I.callbacks.length===1&&I.state.set(z())}else _.withVars.push({state:Er(z()),similar:a,vars:c,callback:s})}),t.set(d)},uz=(e,t,o)=>{const s=e.get();Be(t.split(","),a=>Gn(s,a).each(c=>{s[a]={withSimilar:{...c.withSimilar,callbacks:rt(c.withSimilar.callbacks,d=>d!==o)},withoutSimilar:{...c.withoutSimilar,callbacks:rt(c.withoutSimilar.callbacks,d=>d!==o)},withVars:rt(c.withVars,d=>d.callback!==o)}})),e.set(s)},iL=(e,t,o,s,a,c)=>($S(e,t,o,s,a,c),{unbind:()=>uz(t,o,s)}),lL=(e,t,o,s)=>{const a=e.formatter.get(t);a&&(Vg(e,t,o,s)&&(!("toggle"in a[0])||a[0].toggle)?Wg(e,t,o,s):lz(e,t,o,s))},fz=zt.explode,Cw=()=>{const e={};return{addFilter:(a,c)=>{Be(fz(a),d=>{Ro(e,d)||(e[d]={name:d,callbacks:[]}),e[d].callbacks.push(c)})},getFilters:()=>yl(e),removeFilter:(a,c)=>{Be(fz(a),d=>{if(Ro(e,d))if(Fe(c)){const h=e[d],_=rt(h.callbacks,z=>z!==c);_.length>0?h.callbacks=_:delete e[d]}else delete e[d]})}}},cL=(e,t)=>{Be(t,o=>{e.attr(o,null)})},dL=(e,t,o)=>{e.addNodeFilter("font",s=>{Be(s,a=>{const c=t.parse(a.attr("style")),d=a.attr("color"),h=a.attr("face"),_=a.attr("size");d&&(c.color=d),h&&(c["font-family"]=h),_&&Vr(_).each(z=>{c["font-size"]=o[z-1]}),a.name="span",a.attr("style",t.serialize(c)),cL(a,["color","face","size"])})})},mz=(e,t,o)=>{e.addNodeFilter("strike",s=>{const a=t.type!=="html4";Be(s,c=>{if(a)c.name="s";else{const d=o.parse(c.attr("style"));d["text-decoration"]="line-through",c.name="span",c.attr("style",o.serialize(d))}})})},uL=(e,t,o)=>{var s;const a=U1();t.convert_fonts_to_spans&&dL(e,a,zt.explode((s=t.font_size_legacy_values)!==null&&s!==void 0?s:"")),mz(e,o,a)},fL=(e,t,o)=>{t.inline_styles&&uL(e,t,o)},VS=e=>fetch(e).then(t=>t.ok?t.blob():Promise.reject()).catch(()=>Promise.reject({message:`Cannot convert ${e} to Blob. Resource might not exist or is inaccessible.`,uriType:"blob"})),Sw=e=>{const t=/([a-z0-9+\/=\s]+)/i.exec(e);return t?t[1]:""},Ew=e=>{const[t,...o]=e.split(","),s=o.join(","),a=/data:([^/]+\/[^;]+)(;.+)?/.exec(t);if(a){const c=a[2]===";base64",d=c?Sw(s):decodeURIComponent(s);return j.some({type:a[1],data:d,base64Encoded:c})}else return j.none()},jS=(e,t,o=!0)=>{let s=t;if(o)try{s=atob(t)}catch{return j.none()}const a=new Uint8Array(s.length);for(let c=0;cnew Promise((t,o)=>{Ew(e).bind(({type:s,data:a,base64Encoded:c})=>jS(s,a,c)).fold(()=>o("Invalid data URI"),t)}),mL=e=>vs(e,"blob:")?VS(e):vs(e,"data:")?US(e):Promise.reject("Unknown URI format"),pz=e=>new Promise((t,o)=>{const s=new FileReader;s.onloadend=()=>{t(s.result)},s.onerror=()=>{var a;o((a=s.error)===null||a===void 0?void 0:a.message)},s.readAsDataURL(e)});let pL=0;const kb=e=>"blobid"+pL++,gz=(e,t,o)=>Ew(e).bind(({data:s,type:a,base64Encoded:c})=>{if(t&&!c)return j.none();{const d=c?s:btoa(s);return o(d,a)}}),Av=(e,t,o)=>{const s=e.create(kb(),t,o);return e.add(s),s},hz=(e,t,o=!1)=>gz(t,o,(s,a)=>j.from(e.getByData(s,a)).orThunk(()=>jS(a,s).map(c=>Av(e,c,s)))),ZS=(e,t)=>{const o=()=>Promise.reject("Invalid data URI");if(vs(t,"blob:")){const s=e.getByUri(t);return Fe(s)?Promise.resolve(s):mL(t).then(a=>pz(a).then(c=>gz(c,!1,d=>j.some(Av(e,a,d))).getOrThunk(o)))}else return vs(t,"data:")?hz(e,t).fold(o,s=>Promise.resolve(s)):Promise.reject("Unknown image data format")},bz=/^(?:(?:(?:[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]+)?)?)$/,yz=e=>j.from(e.match(bz)).bind(t=>ra(t,1)).map(t=>vs(t,"www.")?t.substring(4):t),WS=(e,t)=>{j.from(e.attr("src")).bind(yz).forall(o=>!mn(t,o))&&e.attr("sandbox","")},n1=(e,t)=>vs(e,`${t}/`),gL=e=>ln(e)?"iframe":n1(e,"image")?"img":n1(e,"video")?"video":n1(e,"audio")?"audio":"iframe",hL=({type:e,src:t,width:o,height:s}={},a,c)=>{const d=gL(e),h=new pi(d,1);return h.attr(d==="audio"?{src:t}:{src:t,width:o,height:s}),(d==="audio"||d==="video")&&h.attr("controls",""),d==="iframe"&&a&&WS(h,c),h},qS=e=>Fe(e.attr("data-mce-bogus")),vz=e=>e.attr("src")===Jo.transparentSrc||Fe(e.attr("data-mce-placeholder")),bL=(e,t)=>{const{blob_cache:o}=t;if(o){const s=a=>{const c=a.attr("src");vz(a)||qS(a)||uo(c)||hz(o,c,!0).each(d=>{a.attr("src",d.blobUri())})};e.addAttributeFilter("src",a=>Be(a,s))}},yL=(e,t)=>{var o,s;const a=e.schema;e.addAttributeFilter("href",_=>{let z=_.length;const I=V=>V.split(" ").filter(le=>le.length>0).concat(["noopener"]).sort().join(" "),H=V=>{const ee=V?zt.trim(V):"";return/\b(noopener)\b/g.test(ee)?ee:I(ee)};if(!t.allow_unsafe_link_target)for(;z--;){const V=_[z];V.name==="a"&&V.attr("target")==="_blank"&&V.attr("rel",H(V.attr("rel")))}}),t.allow_html_in_named_anchor||e.addAttributeFilter("id,name",_=>{let z=_.length,I,H,V,ee;for(;z--;)if(ee=_[z],ee.name==="a"&&ee.firstChild&&!ee.attr("href"))for(V=ee.parent,I=ee.lastChild;I&&V;)H=I.prev,V.insert(I,ee),I=H}),t.fix_list_elements&&e.addNodeFilter("ul,ol",_=>{let z=_.length,I,H;for(;z--;)if(I=_[z],H=I.parent,H&&(H.name==="ul"||H.name==="ol"))if(I.prev&&I.prev.name==="li")I.prev.append(I);else{const V=new pi("li",1);V.attr("style","list-style-type: none"),I.wrap(V)}});const c=a.getValidClasses();t.validate&&c&&e.addAttributeFilter("class",_=>{var z;let I=_.length;for(;I--;){const H=_[I],V=(z=H.attr("class"))!==null&&z!==void 0?z:"",ee=zt.explode(V," ");let le="";for(let oe=0;oeBe(_,z=>{z.replace(hL({type:z.attr("type"),src:z.name==="object"?z.attr("data"):z.attr("src"),width:z.attr("width"),height:z.attr("height")},d,h))})),d&&e.addNodeFilter("iframe",_=>Be(_,z=>WS(z,h)))},{entries:_z,setPrototypeOf:xz,isFrozen:KS,getPrototypeOf:wz,getOwnPropertyDescriptor:vL}=Object;let{freeze:Uc,seal:nr,create:_L}=Object,{apply:GS,construct:Aw}=typeof Reflect<"u"&&Reflect;GS||(GS=function(t,o,s){return t.apply(o,s)}),Uc||(Uc=function(t){return t}),nr||(nr=function(t){return t}),Aw||(Aw=function(t,o){return new t(...o)});const YS=lc(Array.prototype.forEach),kz=lc(Array.prototype.pop),Pu=lc(Array.prototype.push),s1=lc(String.prototype.toLowerCase),Tw=lc(String.prototype.toString),XS=lc(String.prototype.match),Xd=lc(String.prototype.replace),JS=lc(String.prototype.indexOf),Cz=lc(String.prototype.trim),ic=lc(RegExp.prototype.test),Kg=Tv(TypeError);function lc(e){return function(t){for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a/gm),CL=nr(/\${[\w\W]*}/gm),SL=nr(/^data-[\-\w.\u00B7-\uFFFF]/),EL=nr(/^aria-[\-\w]+$/),Tz=nr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Oz=nr(/^(?:\w+script|data):/i),zz=nr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nE=nr(/^html$/i);var sE=Object.freeze({__proto__:null,MUSTACHE_EXPR:wL,ERB_EXPR:kL,TMPLIT_EXPR:CL,DATA_ATTR:SL,ARIA_ATTR:EL,IS_ALLOWED_URI:Tz,IS_SCRIPT_OR_DATA:Oz,ATTR_WHITESPACE:zz,DOCTYPE_NAME:nE});const Nz=()=>typeof window>"u"?null:window,Dz=function(t,o){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let s=null;const a="data-tt-policy-suffix";o&&o.hasAttribute(a)&&(s=o.getAttribute(a));const c="dompurify"+(s?"#"+s:"");try{return t.createPolicy(c,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}};function rE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Nz();const t=Tn=>rE(Tn);if(t.version="3.0.5",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;const o=e.document,s=o.currentScript;let{document:a}=e;const{DocumentFragment:c,HTMLTemplateElement:d,Node:h,Element:_,NodeFilter:z,NamedNodeMap:I=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:H,DOMParser:V,trustedTypes:ee}=e,le=_.prototype,oe=Ov(le,"cloneNode"),fe=Ov(le,"nextSibling"),ke=Ov(le,"childNodes"),Oe=Ov(le,"parentNode");if(typeof d=="function"){const Tn=a.createElement("template");Tn.content&&Tn.content.ownerDocument&&(a=Tn.content.ownerDocument)}let Ae,Pe="";const{implementation:ht,createNodeIterator:Mt,createDocumentFragment:Yt,getElementsByTagName:Qe}=a,{importNode:Ve}=o;let mt={};t.isSupported=typeof _z=="function"&&typeof Oe=="function"&&ht&&ht.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:to,ERB_EXPR:bo,TMPLIT_EXPR:gn,DATA_ATTR:Cn,ARIA_ATTR:ds,IS_SCRIPT_OR_DATA:hs,ATTR_WHITESPACE:qr}=sE;let{IS_ALLOWED_URI:il}=sE,Os=null;const Ft=Fn({},[...QS,...eE,...Ow,...tE,...Sz]);let go=null;const ts=Fn({},[...Ez,...oE,...Az,...zw]);let jt=Object.seal(Object.create(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}})),Eo=null,wn=null,qt=!0,hn=!0,An=!1,gi=!0,gs=!1,ti=!1,zf=!1,Xp=!1,uc=!1,tu=!1,Nf=!1,ou=!0,Df=!1;const _o="user-content-";let Un=!0,zr=!1,na={},Fa=null;const Zi=Fn({},["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 Aa=null;const Ta=Fn({},["audio","video","img","source","image","track"]);let fc=null;const Vm=Fn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),jm="http://www.w3.org/1998/Math/MathML",Um="http://www.w3.org/2000/svg",Rf="http://www.w3.org/1999/xhtml";let C1=Rf,bk=!1,yk=null;const JI=Fn({},[jm,Um,Rf],Tw);let Ib;const c5=["application/xhtml+xml","text/html"],JH="text/html";let Hl,d_=null;const QH=a.createElement("form"),QI=function(qe){return qe instanceof RegExp||qe instanceof Function},nh=function(qe){if(!(d_&&d_===qe)){if((!qe||typeof qe!="object")&&(qe={}),qe=Mm(qe),Ib=c5.indexOf(qe.PARSER_MEDIA_TYPE)===-1?Ib=JH:Ib=qe.PARSER_MEDIA_TYPE,Hl=Ib==="application/xhtml+xml"?Tw:s1,Os="ALLOWED_TAGS"in qe?Fn({},qe.ALLOWED_TAGS,Hl):Ft,go="ALLOWED_ATTR"in qe?Fn({},qe.ALLOWED_ATTR,Hl):ts,yk="ALLOWED_NAMESPACES"in qe?Fn({},qe.ALLOWED_NAMESPACES,Tw):JI,fc="ADD_URI_SAFE_ATTR"in qe?Fn(Mm(Vm),qe.ADD_URI_SAFE_ATTR,Hl):Vm,Aa="ADD_DATA_URI_TAGS"in qe?Fn(Mm(Ta),qe.ADD_DATA_URI_TAGS,Hl):Ta,Fa="FORBID_CONTENTS"in qe?Fn({},qe.FORBID_CONTENTS,Hl):Zi,Eo="FORBID_TAGS"in qe?Fn({},qe.FORBID_TAGS,Hl):{},wn="FORBID_ATTR"in qe?Fn({},qe.FORBID_ATTR,Hl):{},na="USE_PROFILES"in qe?qe.USE_PROFILES:!1,qt=qe.ALLOW_ARIA_ATTR!==!1,hn=qe.ALLOW_DATA_ATTR!==!1,An=qe.ALLOW_UNKNOWN_PROTOCOLS||!1,gi=qe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,gs=qe.SAFE_FOR_TEMPLATES||!1,ti=qe.WHOLE_DOCUMENT||!1,uc=qe.RETURN_DOM||!1,tu=qe.RETURN_DOM_FRAGMENT||!1,Nf=qe.RETURN_TRUSTED_TYPE||!1,Xp=qe.FORCE_BODY||!1,ou=qe.SANITIZE_DOM!==!1,Df=qe.SANITIZE_NAMED_PROPS||!1,Un=qe.KEEP_CONTENT!==!1,zr=qe.IN_PLACE||!1,il=qe.ALLOWED_URI_REGEXP||Tz,C1=qe.NAMESPACE||Rf,jt=qe.CUSTOM_ELEMENT_HANDLING||{},qe.CUSTOM_ELEMENT_HANDLING&&QI(qe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(jt.tagNameCheck=qe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),qe.CUSTOM_ELEMENT_HANDLING&&QI(qe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(jt.attributeNameCheck=qe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),qe.CUSTOM_ELEMENT_HANDLING&&typeof qe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(jt.allowCustomizedBuiltInElements=qe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),gs&&(hn=!1),tu&&(uc=!0),na&&(Os=Fn({},[...Sz]),go=[],na.html===!0&&(Fn(Os,QS),Fn(go,Ez)),na.svg===!0&&(Fn(Os,eE),Fn(go,oE),Fn(go,zw)),na.svgFilters===!0&&(Fn(Os,Ow),Fn(go,oE),Fn(go,zw)),na.mathMl===!0&&(Fn(Os,tE),Fn(go,Az),Fn(go,zw))),qe.ADD_TAGS&&(Os===Ft&&(Os=Mm(Os)),Fn(Os,qe.ADD_TAGS,Hl)),qe.ADD_ATTR&&(go===ts&&(go=Mm(go)),Fn(go,qe.ADD_ATTR,Hl)),qe.ADD_URI_SAFE_ATTR&&Fn(fc,qe.ADD_URI_SAFE_ATTR,Hl),qe.FORBID_CONTENTS&&(Fa===Zi&&(Fa=Mm(Fa)),Fn(Fa,qe.FORBID_CONTENTS,Hl)),Un&&(Os["#text"]=!0),ti&&Fn(Os,["html","head","body"]),Os.table&&(Fn(Os,["tbody"]),delete Eo.tbody),qe.TRUSTED_TYPES_POLICY){if(typeof qe.TRUSTED_TYPES_POLICY.createHTML!="function")throw Kg('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof qe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Kg('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Ae=qe.TRUSTED_TYPES_POLICY,Pe=Ae.createHTML("")}else Ae===void 0&&(Ae=Dz(ee,s)),Ae!==null&&typeof Pe=="string"&&(Pe=Ae.createHTML(""));Uc&&Uc(qe),d_=qe}},oT=Fn({},["mi","mo","mn","ms","mtext"]),$e=Fn({},["foreignobject","desc","title","annotation-xml"]),je=Fn({},["title","style","font","a","script"]),It=Fn({},eE);Fn(It,Ow),Fn(It,xL);const Dt=Fn({},tE);Fn(Dt,zv);const Do=function(qe){let fo=Oe(qe);(!fo||!fo.tagName)&&(fo={namespaceURI:C1,tagName:"template"});const Wo=s1(qe.tagName),pa=s1(fo.tagName);return yk[qe.namespaceURI]?qe.namespaceURI===Um?fo.namespaceURI===Rf?Wo==="svg":fo.namespaceURI===jm?Wo==="svg"&&(pa==="annotation-xml"||oT[pa]):!!It[Wo]:qe.namespaceURI===jm?fo.namespaceURI===Rf?Wo==="math":fo.namespaceURI===Um?Wo==="math"&&$e[pa]:!!Dt[Wo]:qe.namespaceURI===Rf?fo.namespaceURI===Um&&!$e[pa]||fo.namespaceURI===jm&&!oT[pa]?!1:!Dt[Wo]&&(je[Wo]||!It[Wo]):!!(Ib==="application/xhtml+xml"&&yk[qe.namespaceURI]):!1},Mn=function(qe){Pu(t.removed,{element:qe});try{qe.parentNode.removeChild(qe)}catch{qe.remove()}},Nr=function(qe,fo){try{Pu(t.removed,{attribute:fo.getAttributeNode(qe),from:fo})}catch{Pu(t.removed,{attribute:null,from:fo})}if(fo.removeAttribute(qe),qe==="is"&&!go[qe])if(uc||tu)try{Mn(fo)}catch{}else try{fo.setAttribute(qe,"")}catch{}},Zm=function(qe){let fo,Wo;if(Xp)qe=""+qe;else{const Wm=XS(qe,/^[\r\n\t ]+/);Wo=Wm&&Wm[0]}Ib==="application/xhtml+xml"&&C1===Rf&&(qe=''+qe+"");const pa=Ae?Ae.createHTML(qe):qe;if(C1===Rf)try{fo=new V().parseFromString(pa,Ib)}catch{}if(!fo||!fo.documentElement){fo=ht.createDocument(C1,"template",null);try{fo.documentElement.innerHTML=bk?Pe:pa}catch{}}const mc=fo.body||fo.documentElement;return qe&&Wo&&mc.insertBefore(a.createTextNode(Wo),mc.childNodes[0]||null),C1===Rf?Qe.call(fo,ti?"html":"body")[0]:ti?fo.documentElement:mc},d5=function(qe){return Mt.call(qe.ownerDocument||qe,qe,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT,null,!1)},mX=function(qe){return qe instanceof H&&(typeof qe.nodeName!="string"||typeof qe.textContent!="string"||typeof qe.removeChild!="function"||!(qe.attributes instanceof I)||typeof qe.removeAttribute!="function"||typeof qe.setAttribute!="function"||typeof qe.namespaceURI!="string"||typeof qe.insertBefore!="function"||typeof qe.hasChildNodes!="function")},u5=function(qe){return typeof h=="object"?qe instanceof h:qe&&typeof qe=="object"&&typeof qe.nodeType=="number"&&typeof qe.nodeName=="string"},Fb=function(qe,fo,Wo){mt[qe]&&YS(mt[qe],pa=>{pa.call(t,fo,Wo,d_)})},e$=function(qe){let fo;if(Fb("beforeSanitizeElements",qe,null),mX(qe))return Mn(qe),!0;const Wo=Hl(qe.nodeName);if(Fb("uponSanitizeElement",qe,{tagName:Wo,allowedTags:Os}),qe.hasChildNodes()&&!u5(qe.firstElementChild)&&(!u5(qe.content)||!u5(qe.content.firstElementChild))&&ic(/<[/\w]/g,qe.innerHTML)&&ic(/<[/\w]/g,qe.textContent))return Mn(qe),!0;if(!Os[Wo]||Eo[Wo]){if(!Eo[Wo]&&o$(Wo)&&(jt.tagNameCheck instanceof RegExp&&ic(jt.tagNameCheck,Wo)||jt.tagNameCheck instanceof Function&&jt.tagNameCheck(Wo)))return!1;if(Un&&!Fa[Wo]){const pa=Oe(qe)||qe.parentNode,mc=ke(qe)||qe.childNodes;if(mc&&pa){const Wm=mc.length;for(let Di=Wm-1;Di>=0;--Di)pa.insertBefore(oe(mc[Di],!0),fe(qe))}}return Mn(qe),!0}return qe instanceof _&&!Do(qe)||(Wo==="noscript"||Wo==="noembed"||Wo==="noframes")&&ic(/<\/no(script|embed|frames)/i,qe.innerHTML)?(Mn(qe),!0):(gs&&qe.nodeType===3&&(fo=qe.textContent,fo=Xd(fo,to," "),fo=Xd(fo,bo," "),fo=Xd(fo,gn," "),qe.textContent!==fo&&(Pu(t.removed,{element:qe.cloneNode()}),qe.textContent=fo)),Fb("afterSanitizeElements",qe,null),!1)},t$=function(qe,fo,Wo){if(ou&&(fo==="id"||fo==="name")&&(Wo in a||Wo in QH))return!1;if(!(hn&&!wn[fo]&&ic(Cn,fo))){if(!(qt&&ic(ds,fo))){if(!go[fo]||wn[fo]){if(!(o$(qe)&&(jt.tagNameCheck instanceof RegExp&&ic(jt.tagNameCheck,qe)||jt.tagNameCheck instanceof Function&&jt.tagNameCheck(qe))&&(jt.attributeNameCheck instanceof RegExp&&ic(jt.attributeNameCheck,fo)||jt.attributeNameCheck instanceof Function&&jt.attributeNameCheck(fo))||fo==="is"&&jt.allowCustomizedBuiltInElements&&(jt.tagNameCheck instanceof RegExp&&ic(jt.tagNameCheck,Wo)||jt.tagNameCheck instanceof Function&&jt.tagNameCheck(Wo))))return!1}else if(!fc[fo]){if(!ic(il,Xd(Wo,qr,""))){if(!((fo==="src"||fo==="xlink:href"||fo==="href")&&qe!=="script"&&JS(Wo,"data:")===0&&Aa[qe])){if(!(An&&!ic(hs,Xd(Wo,qr,"")))){if(Wo)return!1}}}}}}return!0},o$=function(qe){return qe.indexOf("-")>0},n$=function(qe){let fo,Wo,pa,mc;Fb("beforeSanitizeAttributes",qe,null);const{attributes:Wm}=qe;if(!Wm)return;const Di={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:go};for(mc=Wm.length;mc--;){fo=Wm[mc];const{name:qm,namespaceURI:e7}=fo;Wo=qm==="value"?fo.value:Cz(fo.value);const gX=Wo;if(pa=Hl(qm),Di.attrName=pa,Di.attrValue=Wo,Di.keepAttr=!0,Di.forceKeepAttr=void 0,Fb("uponSanitizeAttribute",qe,Di),Wo=Di.attrValue,Di.forceKeepAttr)continue;if(!Di.keepAttr){Nr(qm,qe);continue}if(!gi&&ic(/\/>/i,Wo)){Nr(qm,qe);continue}gs&&(Wo=Xd(Wo,to," "),Wo=Xd(Wo,bo," "),Wo=Xd(Wo,gn," "));const s$=Hl(qe.nodeName);if(!t$(s$,pa,Wo)){Nr(qm,qe);continue}if(Df&&(pa==="id"||pa==="name")&&(Nr(qm,qe),Wo=_o+Wo),Ae&&typeof ee=="object"&&typeof ee.getAttributeType=="function"&&!e7)switch(ee.getAttributeType(s$,pa)){case"TrustedHTML":{Wo=Ae.createHTML(Wo);break}case"TrustedScriptURL":{Wo=Ae.createScriptURL(Wo);break}}if(Wo!==gX)try{e7?qe.setAttributeNS(e7,qm,Wo):qe.setAttribute(qm,Wo)}catch{Nr(qm,qe)}}Fb("afterSanitizeAttributes",qe,null)},pX=function Tn(qe){let fo;const Wo=d5(qe);for(Fb("beforeSanitizeShadowDOM",qe,null);fo=Wo.nextNode();)Fb("uponSanitizeShadowNode",fo,null),!e$(fo)&&(fo.content instanceof c&&Tn(fo.content),n$(fo));Fb("afterSanitizeShadowDOM",qe,null)};return t.sanitize=function(Tn){let qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},fo,Wo,pa,mc;if(bk=!Tn,bk&&(Tn=""),typeof Tn!="string"&&!u5(Tn))if(typeof Tn.toString=="function"){if(Tn=Tn.toString(),typeof Tn!="string")throw Kg("dirty is not a string, aborting")}else throw Kg("toString is not a function");if(!t.isSupported)return Tn;if(zf||nh(qe),t.removed=[],typeof Tn=="string"&&(zr=!1),zr){if(Tn.nodeName){const qm=Hl(Tn.nodeName);if(!Os[qm]||Eo[qm])throw Kg("root node is forbidden and cannot be sanitized in-place")}}else if(Tn instanceof h)fo=Zm(""),Wo=fo.ownerDocument.importNode(Tn,!0),Wo.nodeType===1&&Wo.nodeName==="BODY"||Wo.nodeName==="HTML"?fo=Wo:fo.appendChild(Wo);else{if(!uc&&!gs&&!ti&&Tn.indexOf("<")===-1)return Ae&&Nf?Ae.createHTML(Tn):Tn;if(fo=Zm(Tn),!fo)return uc?null:Nf?Pe:""}fo&&Xp&&Mn(fo.firstChild);const Wm=d5(zr?Tn:fo);for(;pa=Wm.nextNode();)e$(pa)||(pa.content instanceof c&&pX(pa.content),n$(pa));if(zr)return Tn;if(uc){if(tu)for(mc=Yt.call(fo.ownerDocument);fo.firstChild;)mc.appendChild(fo.firstChild);else mc=fo;return(go.shadowroot||go.shadowrootmode)&&(mc=Ve.call(o,mc,!0)),mc}let Di=ti?fo.outerHTML:fo.innerHTML;return ti&&Os["!doctype"]&&fo.ownerDocument&&fo.ownerDocument.doctype&&fo.ownerDocument.doctype.name&&ic(nE,fo.ownerDocument.doctype.name)&&(Di=" +`+Di),gs&&(Di=Xd(Di,to," "),Di=Xd(Di,bo," "),Di=Xd(Di,gn," ")),Ae&&Nf?Ae.createHTML(Di):Di},t.setConfig=function(Tn){nh(Tn),zf=!0},t.clearConfig=function(){d_=null,zf=!1},t.isValidAttribute=function(Tn,qe,fo){d_||nh({});const Wo=Hl(Tn),pa=Hl(qe);return t$(Wo,pa,fo)},t.addHook=function(Tn,qe){typeof qe=="function"&&(mt[Tn]=mt[Tn]||[],Pu(mt[Tn],qe))},t.removeHook=function(Tn){if(mt[Tn])return kz(mt[Tn])},t.removeHooks=function(Tn){mt[Tn]&&(mt[Tn]=[])},t.removeAllHooks=function(){mt={}},t}var aE=rE();const Rz=zt.each,Mz=zt.trim,AL=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],TL={ftp:21,http:80,https:443,mailto:25},Lz=["img","video"],Bz=(e,t)=>Fe(e)?!e:Fe(t)?!mn(Lz,t):!0,OL=e=>{try{return decodeURIComponent(e)}catch{return unescape(e)}},iE=(e,t,o)=>{const s=OL(t).replace(/\s/g,"");return e.allow_script_urls?!1:/((java|vb)script|mhtml):/i.test(s)?!0:e.allow_html_data_urls?!1:/^data:image\//i.test(s)?Bz(e.allow_svg_data_urls,o)&&/^data:image\/svg\+xml/i.test(s):/^data:/i.test(s)};class Jd{static parseDataUri(t){let o;const s=decodeURIComponent(t).split(","),a=/data:([^;]+)/.exec(s[0]);return a&&(o=a[1]),{type:o,data:s[1]}}static isDomSafe(t,o,s={}){if(s.allow_script_urls)return!0;{const a=dp.decode(t).replace(/[\s\u0000-\u001F]+/g,"");return!iE(s,a,o)}}static getDocumentBaseUrl(t){var o;let s;return t.protocol.indexOf("http")!==0&&t.protocol!=="file:"?s=(o=t.href)!==null&&o!==void 0?o:"":s=t.protocol+"//"+t.host+t.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(s)&&(s=s.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(s)||(s+="/")),s}constructor(t,o={}){this.path="",this.directory="",t=Mz(t),this.settings=o;const s=o.base_uri,a=this;if(/^([\w\-]+):([^\/]{2})/i.test(t)||/^\s*#/.test(t)){a.source=t;return}const c=t.indexOf("//")===0;if(t.indexOf("/")===0&&!c&&(t=(s&&s.protocol||"http")+"://mce_host"+t),!/^[\w\-]*:?\/\//.test(t)){const h=s?s.path:new Jd(document.location.href).directory;if((s==null?void 0:s.protocol)==="")t="//mce_host"+a.toAbsPath(h,t);else{const _=/([^#?]*)([#?]?.*)/.exec(t);_&&(t=(s&&s.protocol||"http")+"://mce_host"+a.toAbsPath(h,_[1])+_[2])}}t=t.replace(/@@/g,"(mce_at)");const d=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(t);d&&Rz(AL,(h,_)=>{let z=d[_];z&&(z=z.replace(/\(mce_at\)/g,"@@")),a[h]=z}),s&&(a.protocol||(a.protocol=s.protocol),a.userInfo||(a.userInfo=s.userInfo),!a.port&&a.host==="mce_host"&&(a.port=s.port),(!a.host||a.host==="mce_host")&&(a.host=s.host),a.source=""),c&&(a.protocol="")}setPath(t){const o=/^(.*?)\/?(\w+)?$/.exec(t);o&&(this.path=o[0],this.directory=o[1],this.file=o[2]),this.source="",this.getURI()}toRelative(t){if(t==="./")return t;const o=new Jd(t,{base_uri:this});if(o.host!=="mce_host"&&this.host!==o.host&&o.host||this.port!==o.port||this.protocol!==o.protocol&&o.protocol!=="")return o.getURI();const s=this.getURI(),a=o.getURI();if(s===a||s.charAt(s.length-1)==="/"&&s.substr(0,s.length-1)===a)return s;let c=this.toRelPath(this.path,o.path);return o.query&&(c+="?"+o.query),o.anchor&&(c+="#"+o.anchor),c}toAbsolute(t,o){const s=new Jd(t,{base_uri:this});return s.getURI(o&&this.isSameOrigin(s))}isSameOrigin(t){if(this.host==t.host&&this.protocol==t.protocol){if(this.port==t.port)return!0;const o=this.protocol?TL[this.protocol]:null;if(o&&(this.port||o)==(t.port||o))return!0}return!1}toRelPath(t,o){let s=0,a="",c,d;const h=t.substring(0,t.lastIndexOf("/")).split("/"),_=o.split("/");if(h.length>=_.length){for(c=0,d=h.length;c=_.length||h[c]!==_[c]){s=c+1;break}}if(h.length<_.length){for(c=0,d=_.length;c=h.length||h[c]!==_[c]){s=c+1;break}}if(s===1)return o;for(c=0,d=h.length-(s-1);c{H&&h.push(H)});const _=[];for(let H=d.length-1;H>=0;H--)if(!(d[H].length===0||d[H]===".")){if(d[H]===".."){s++;continue}if(s>0){s--;continue}_.push(d[H])}const z=h.length-s;let I;return z<=0?I=sa(_).join("/"):I=h.slice(0,z).join("/")+"/"+sa(_).join("/"),I.indexOf("/")!==0&&(I="/"+I),a&&I.lastIndexOf("/")!==I.length-1&&(I+=a),I}getURI(t=!1){let o;return(!this.source||t)&&(o="",t||(this.protocol?o+=this.protocol+"://":o+="//",this.userInfo&&(o+=this.userInfo+"@"),this.host&&(o+=this.host),this.port&&(o+=":"+this.port)),this.path&&(o+=this.path),this.query&&(o+="?"+this.query),this.anchor&&(o+="#"+this.anchor),this.source=o),this.source}}const zL=zt.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),lE="data-mce-type";let Pz=0;const Iz=(e,t,o,s,a)=>{var c,d,h,_;const z=t.validate,I=o.getSpecialElements();e.nodeType===Kc&&!t.allow_conditional_comments&&/^\[if/i.test((c=e.nodeValue)!==null&&c!==void 0?c:"")&&(e.nodeValue=" "+e.nodeValue);const H=(d=a==null?void 0:a.tagName)!==null&&d!==void 0?d:e.nodeName.toLowerCase();if(s!=="html"&&o.isValid(s)){Fe(a)&&(a.allowedTags[H]=!0);return}if(e.nodeType!==ki||H==="body")return;const V=ye.fromDom(e),ee=Gc(V,lE),le=Da(V,"data-mce-bogus");if(!ee&&ft(le)){le==="all"?Jn(V):wa(V);return}const oe=o.getElementRule(H);if(z&&!oe){Ro(I,H)?Jn(V):wa(V);return}else Fe(a)&&(a.allowedTags[H]=!0);if(z&&oe&&!ee){if(Be((h=oe.attributesForced)!==null&&h!==void 0?h:[],fe=>{Rr(V,fe.name,fe.value==="{$uid}"?`mce_${Pz++}`:fe.value)}),Be((_=oe.attributesDefault)!==null&&_!==void 0?_:[],fe=>{Gc(V,fe.name)||Rr(V,fe.name,fe.value==="{$uid}"?`mce_${Pz++}`:fe.value)}),oe.attributesRequired&&!Ln(oe.attributesRequired,fe=>Gc(V,fe))){wa(V);return}if(oe.removeEmptyAttrs&&vr(V)){wa(V);return}oe.outputName&&oe.outputName!==H&&t0(V,oe.outputName)}},NL=(e,t,o,s,a)=>{const c=e.tagName.toLowerCase(),{attrName:d,attrValue:h}=a;a.keepAttr=Nv(t,o,s,c,d,h),a.keepAttr?(a.allowedAttributes[d]=!0,dE(d,o)&&(a.attrValue=d),t.allow_svg_data_urls&&vs(h,"data:image/svg+xml")&&(a.forceKeepAttr=!0)):cE(e,d)&&(a.forceKeepAttr=!0)},Nv=(e,t,o,s,a,c)=>o!=="html"&&!vu(s)?!0:!(a in zL&&iE(e,c,s))&&(!e.validate||t.isValid(s,a)||vs(a,"data-")||vs(a,"aria-")),cE=(e,t)=>e.hasAttribute(lE)&&(t==="id"||t==="class"||t==="style"),dE=(e,t)=>e in t.getBoolAttrs(),Fz=(e,t,o,s)=>{const{attributes:a}=e;for(let c=a.length-1;c>=0;c--){const d=a[c],h=d.name,_=d.value;!Nv(t,o,s,e.tagName.toLowerCase(),h,_)&&!cE(e,h)?e.removeAttribute(h):dE(h,o)&&e.setAttribute(h,h)}},DL=(e,t,o)=>{const s=aE();return s.addHook("uponSanitizeElement",(a,c)=>{Iz(a,e,t,o.track(a),c)}),s.addHook("uponSanitizeAttribute",(a,c)=>{NL(a,e,t,o.current(),c)}),s},RL=(e,t)=>{const s={...{IN_PLACE:!0,ALLOW_UNKNOWN_PROTOCOLS:!0,ALLOWED_TAGS:["#comment","#cdata-section","body"],ALLOWED_ATTR:[]}};return s.PARSER_MEDIA_TYPE=t,e.allow_script_urls?s.ALLOWED_URI_REGEXP=/.*/:e.allow_html_data_urls&&(s.ALLOWED_URI_REGEXP=/^(?!(\w+script|mhtml):)/i),s},Hz=e=>{const t=Kb(e);if(t==="svg"){const o=["type","href","role","arcrole","title","show","actuate","label","from","to"].map(a=>`xlink:${a}`),s={IN_PLACE:!0,USE_PROFILES:{html:!0,svg:!0,svgFilters:!0},ALLOWED_ATTR:o};aE().sanitize(e,s)}else if(t==="math"){const o={IN_PLACE:!0,USE_PROFILES:{mathMl:!0}};aE().sanitize(e,o)}else throw new Error("Not a namespace element")},ML=(e,t)=>{const o=N();if(e.sanitize){const s=DL(e,t,o);return{sanitizeHtmlElement:(c,d)=>{s.sanitize(c,RL(e,d)),s.removed=[],o.reset()},sanitizeNamespaceElement:Hz}}else return{sanitizeHtmlElement:(c,d)=>{const h=document.createNodeIterator(c,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT);let _;for(;_=h.nextNode();){const z=o.track(_);Iz(_,e,t,z),no(_)&&Fz(_,e,t,z)}o.reset()},sanitizeNamespaceElement:dt}},Nw=zt.makeMap,uE=zt.extend,$z=(e,t,o,s)=>{const a=e.name,c=a in o&&a!=="title"&&a!=="textarea"&&a!=="noscript",d=t.childNodes;for(let h=0,_=d.length;h<_;h++){const z=d[h],I=new pi(z.nodeName.toLowerCase(),z.nodeType);if(no(z)){const H=z.attributes;for(let V=0,ee=H.length;V{const s=[];for(let a=e,c=a;a;c=a,a=a.walk()){const d=a;Be(t,h=>h(d)),uo(d.parent)&&d!==e?a=c:s.push(d)}for(let a=s.length-1;a>=0;a--){const c=s[a];Be(o,d=>d(c))}},Lm=(e,t,o,s)=>{const a=o.validate,c=t.getNonEmptyElements(),d=t.getWhitespaceElements(),h=uE(Nw("script,style,head,html,body,title,meta,param"),t.getBlockElements()),_=Jb(t),z=/[ \t\r\n]+/g,I=/^[ \t\r\n]+/,H=/[ \t\r\n]+$/,V=Oe=>{let Ae=Oe.parent;for(;Fe(Ae);){if(Ae.name in d)return!0;Ae=Ae.parent}return!1},ee=Oe=>{let Ae=Oe;for(;Fe(Ae);){if(Ae.name in _)return Qy(t,c,d,Ae);Ae=Ae.parent}return!1},le=Oe=>Oe.name in h||ed(t,Oe)||vu(Oe.name)&&Oe.parent===e,oe=(Oe,Ae)=>{const Pe=Ae?Oe.prev:Oe.next;return Fe(Pe)||uo(Oe.parent)?!1:le(Oe.parent)&&(Oe.parent!==e||s.isRootContent===!0)};return[Oe=>{var Ae;if(Oe.type===3&&!V(Oe)){let Pe=(Ae=Oe.value)!==null&&Ae!==void 0?Ae:"";Pe=Pe.replace(z," "),(AO(Oe.prev,le)||oe(Oe,!0))&&(Pe=Pe.replace(I,"")),Pe.length===0||Pe===" "&&Oe.prev&&Oe.prev.type===Kc&&Oe.next&&Oe.next.type===Kc?Oe.remove():Oe.value=Pe}},Oe=>{var Ae;if(Oe.type===1){const Pe=t.getElementRule(Oe.name);if(a&&Pe){const ht=Qy(t,c,d,Oe);Pe.paddInEmptyBlock&&ht&&ee(Oe)?ow(o,s,le,Oe):Pe.removeEmpty&&ht?le(Oe)?Oe.remove():Oe.unwrap():Pe.paddEmpty&&(ht||nw(Oe))&&ow(o,s,le,Oe)}}else if(Oe.type===3&&!V(Oe)){let Pe=(Ae=Oe.value)!==null&&Ae!==void 0?Ae:"";(Oe.next&&le(Oe.next)||oe(Oe,!1))&&(Pe=Pe.replace(H,"")),Pe.length===0?Oe.remove():Oe.value=Pe}}]},LL=(e,t)=>{var o;const s=(o=t.forced_root_block)!==null&&o!==void 0?o:e.forced_root_block;return s===!1?"":s===!0?"p":s},r1=(e={},t=Dc())=>{const o=Cw(),s=Cw(),a={validate:!0,root_name:"body",sanitize:!0,...e},c=new DOMParser,d=ML(a,t),h=(Ae,Pe,ht="html")=>{const Mt=ht==="xhtml"?"application/xhtml+xml":"text/html",Yt=Ro(t.getSpecialElements(),Pe.toLowerCase()),Qe=Yt?`<${Pe}>${Ae}`:Ae,Ve=()=>ht==="xhtml"?`${Qe}`:/^[\s]*${Qe}`:`${Qe}`,mt=c.parseFromString(Ve(),Mt).body;return d.sanitizeHtmlElement(mt,Mt),Yt?mt.firstChild:mt},_=o.addFilter,z=o.getFilters,I=o.removeFilter,H=s.addFilter,V=s.getFilters,ee=s.removeFilter,le=(Ae,Pe)=>{vv(t,Ae)&&Pe.push(Ae)},oe=(Ae,Pe)=>{const ht=ft(Pe.attr(lE)),Mt=Pe.type===1&&!Ro(Ae,Pe.name)&&!ed(t,Pe)&&!vu(Pe.name);return Pe.type===3||Mt&&!ht},fe=(Ae,Pe)=>{const ht=uE(Nw("script,style,head,html,body,title,meta,param"),t.getBlockElements()),Mt=/^[ \t\r\n]+/,Yt=/[ \t\r\n]+$/;let Qe=Ae.firstChild,Ve=null;const mt=to=>{var bo,gn;to&&(Qe=to.firstChild,Qe&&Qe.type===3&&(Qe.value=(bo=Qe.value)===null||bo===void 0?void 0:bo.replace(Mt,"")),Qe=to.lastChild,Qe&&Qe.type===3&&(Qe.value=(gn=Qe.value)===null||gn===void 0?void 0:gn.replace(Yt,"")))};if(t.isValidChild(Ae.name,Pe.toLowerCase())){for(;Qe;){const to=Qe.next;oe(ht,Qe)?(Ve||(Ve=new pi(Pe,1),Ve.attr(a.forced_root_block_attrs),Ae.insert(Ve,Qe)),Ve.append(Qe)):(mt(Ve),Ve=null),Qe=to}mt(Ve)}},Oe={schema:t,addAttributeFilter:H,getAttributeFilters:V,removeAttributeFilter:ee,addNodeFilter:_,getNodeFilters:z,removeNodeFilter:I,parse:(Ae,Pe={})=>{var ht;const Mt=a.validate,Yt=(ht=Pe.context)!==null&&ht!==void 0?ht:a.root_name,Qe=h(Ae,Yt,Pe.format);Ko(t,Qe);const Ve=new pi(Yt,11);$z(Ve,Qe,t.getSpecialElements(),d.sanitizeNamespaceElement),Qe.innerHTML="";const[mt,to]=Lm(Ve,t,a,Pe),bo=[],gn=Mt?qr=>le(qr,bo):dt,Cn={nodes:{},attributes:{}},ds=qr=>QC(z(),V(),qr,Cn);if(Qa(Ve,[mt,ds],[to,gn]),bo.reverse(),Mt&&bo.length>0)if(Pe.context){const{pass:qr,fail:il}=yt(bo,Os=>Os.parent===Ve);md(il,t,Ve,ds),Pe.invalid=qr.length>0}else md(bo,t,Ve,ds);const hs=LL(a,Pe);return hs&&(Ve.name==="body"||Pe.isRootContent)&&fe(Ve,hs),Pe.invalid||eS(Cn,Pe),Ve}};return yL(Oe,a),fL(Oe,a,t),Oe},BL=e=>_b(e)?Lp({validate:!1}).serialize(e):e,fE=(e,t,o)=>{const s=BL(e),a=t(s);if(a.isDefaultPrevented())return a;if(_b(e))if(a.content!==s){const c=r1({validate:!1,forced_root_block:!1,...o}).parse(a.content,{context:e.name});return{...a,content:c}}else return{...a,content:e};else return a},Cb=e=>({sanitize:$T(e),sandbox_iframes:p2(e),sandbox_iframes_exclusions:U_(e)}),Vz=(e,t)=>{if(t.no_events)return Oo.value(t);{const o=kf(e,t);return o.isDefaultPrevented()?Oo.error(U4(e,{content:"",...o}).content):Oo.value(o)}},Iu=(e,t,o)=>o.no_events?t:fE(t,a=>U4(e,{...o,content:a}),Cb(e)).content,mE=(e,t)=>{if(t.no_events)return Oo.value(t);{const o=fE(t.content,s=>RM(e,{...t,content:s}),Cb(e));return o.isDefaultPrevented()?(rc(e,o),Oo.error(void 0)):Oo.value(o)}},pE=(e,t,o)=>{o.no_events||rc(e,{...o,content:t})},Dw=(e,t,o)=>({element:e,width:t,rows:o}),gE=(e,t)=>({element:e,cells:t}),PL=(e,t)=>({x:e,y:t}),Rw=(e,t)=>Sr(e,t).bind(Vr).getOr(1),Bm=(e,t,o,s,a)=>{const c=Rw(a,"rowspan"),d=Rw(a,"colspan"),h=e.rows;for(let _=o;_{const s=e.rows;return!!(s[o]?s[o].cells:[])[t]},Uz=(e,t,o)=>{for(;jz(e,t,o);)t++;return t},Dv=e=>ko(e,(t,o)=>o.cells.length>t?o.cells.length:t,0),Mw=(e,t)=>{const o=e.rows;for(let s=0;s{const c=[],d=e.rows;for(let h=o;h<=a;h++){const _=d[h].cells,z=t{const s=t.x,a=t.y,c=o.x,d=o.y,h=a{const o=Tr(e.element),s=ye.fromTag("tbody");return xr(s,t),fr(o,s),o},IL=e=>dn(e.rows,t=>{const o=dn(t.cells,a=>{const c=um(a);return rn(c,"colspan"),rn(c,"rowspan"),c}),s=Tr(t.element);return xr(s,o),s}),FL=e=>{const t=Dw(Tr(e),0,[]);return Be(Mr(e,"tr"),(o,s)=>{Be(Mr(o,"td,th"),(a,c)=>{Bm(t,Uz(t,c,s),s,o,a)})}),Dw(t.element,Dv(t.rows),t.rows)},HL=e=>Wz(e,IL(e)),qz=(e,t,o)=>Mw(e,t).bind(s=>Mw(e,o).map(a=>Zz(e,s,a))),Kz=e=>On(e,t=>En(t)==="ul"||En(t)==="ol"),$L=(e,t)=>On(e,o=>En(o)==="li"&&R0(o,t)).fold(Ge([]),o=>Kz(e).map(s=>{const a=ye.fromTag(En(s)),c=Mi(Xu(s),(d,h)=>vs(h,"list-style"));return vn(a,c),[ye.fromTag("li"),a]}).getOr([])),bE=(e,t)=>{const o=ko(t,(s,a)=>(fr(a,s),a),e);return t.length>0?Hc([o]):o},Gz=e=>mm(e)?ia(e).filter(Rh).fold(Ge([]),t=>[e,t]):Rh(e)?[e]:[],VL=(e,t,o)=>{const s=ye.fromDom(t.commonAncestorContainer),a=Vc(s,e),c=rt(a,_=>o.isWrapper(En(_))),d=$L(a,t),h=c.concat(d.length?d:Gz(s));return dn(h,Tr)},yE=()=>Hc([]),jL=(e,t,o)=>bE(ye.fromDom(t.cloneContents()),VL(e,t,o)),UL=(e,t)=>El(t,"table",Ht(kn,e)),rl=(e,t)=>UL(e,t[0]).bind(o=>{const s=t[0],a=t[t.length-1],c=FL(o);return qz(c,s,a).map(d=>Hc([HL(d)]))}).getOrThunk(yE),ZL=(e,t,o)=>t.length>0&&t[0].collapsed?yE():jL(e,t[0],o),WL=(e,t,o)=>{const s=S4(t,e);return s.length>0?rl(e,s):ZL(e,t,o)},Lw=(e,t)=>t>=0&&tol(e.innerText),Bw=e=>e.map(t=>t.nodeName).getOr("div").toLowerCase(),qL=e=>j.from(e.selection.getRng()).map(t=>{var o;const s=j.from(e.dom.getParent(t.commonAncestorContainer,e.dom.isBlock)),a=e.getBody(),c=Bw(s),d=ye.fromDom(t.cloneContents());R3(d),M3(d);const h=e.dom.add(a,c,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},d.dom),_=Yz(h),z=ol((o=h.textContent)!==null&&o!==void 0?o:"");if(e.dom.remove(h),Lw(z,0)||Lw(z,z.length-1)){const I=s.getOr(a),H=Yz(I),V=H.indexOf(_);if(V===-1)return _;{const ee=Lw(H,V-1),le=Lw(H,V+_.length);return(ee?" ":"")+_+(le?" ":"")}}else return _}).getOr(""),vE=(e,t)=>{const o=e.selection.getRng(),s=e.dom.create("body"),a=e.selection.getSel(),c=zx(e,or(a)),d=t.contextual?WL(ye.fromDom(e.getBody()),c,e.schema).dom:o.cloneContents();return d&&s.appendChild(d),e.selection.serializer.serialize(s,t)},_E=(e,t)=>{if(t.format==="text")return qL(e);{const o=vE(e,t);return t.format==="tree"?o:e.selection.isCollapsed()?"":o}},KL=(e,t)=>({...e,format:t,get:!0,selection:!0,getInner:!0}),GL=(e,t,o={})=>{const s=KL(o,t);return Vz(e,s).fold(Ao,a=>{const c=_E(e,a);return Iu(e,c,a)})},Qd=0,xE=1,Xz=2,wE=(e,t)=>{const o=e.length+t.length+2,s=new Array(o),a=new Array(o),c=(I,H,V)=>({start:I,end:H,diag:V}),d=(I,H,V,ee,le)=>{const oe=_(I,H,V,ee);if(oe===null||oe.start===H&&oe.diag===H-ee||oe.end===I&&oe.diag===I-V){let fe=I,ke=V;for(;feee-V?(le.push([Xz,e[fe]]),++fe):(le.push([xE,t[ke]]),++ke)}else{d(I,oe.start,V,oe.start-oe.diag,le);for(let fe=oe.start;fe{let le=I;for(;le-H{const le=H-I,oe=ee-V;if(le===0||oe===0)return null;const fe=le-oe,ke=oe+le,Oe=(ke%2===0?ke:ke+1)/2;s[1+Oe]=I,a[1+Oe]=H+1;let Ae,Pe,ht,Mt,Yt;for(Ae=0;Ae<=Oe;++Ae){for(Pe=-Ae;Pe<=Ae;Pe+=2){for(ht=Pe+Oe,Pe===-Ae||Pe!==Ae&&s[ht-1]=I&&Yt>=V&&e[Mt]===t[Yt];)a[ht]=Mt--,Yt--;if(fe%2===0&&-Ae<=Pe&&Pe<=Ae&&a[ht]<=s[ht+fe])return h(a[ht],Pe+I-V,H,ee)}}return null},z=[];return d(0,e.length,0,t.length,z),z},kE=e=>no(e)?e.outerHTML:wt(e)?dp.encodeRaw(e.data,!1):Qo(e)?"":"",Pw=e=>{let t;const o=document.createElement("div"),s=document.createDocumentFragment();for(e&&(o.innerHTML=e);t=o.firstChild;)s.appendChild(t);return s},Jz=(e,t,o)=>{const s=Pw(t);if(e.hasChildNodes()&&o{if(e.hasChildNodes()&&t{let o=0;Be(e,s=>{s[0]===Qd?o++:s[0]===xE?(Jz(t,s[1],o),o++):s[0]===Xz&&Qz(t,o)})},YL=(e,t)=>rt(dn(an(e.childNodes),Kt(ol,kE)),o=>o.length>0),XL=(e,t)=>{const o=dn(an(t.childNodes),kE);return eN(wE(o,e),t),t},CE=si(()=>document.implementation.createHTMLDocument("undo")),JL=e=>e.querySelector("iframe")!==null,QL=e=>({type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}),Iw=e=>({type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}),a1=e=>{const t=e.serializer.getTempAttrs(),o=fC(e.getBody(),t);return JL(o)?QL(YL(o)):Iw(ol(o.innerHTML))},Rv=(e,t,o)=>{const s=o?t.beforeBookmark:t.bookmark;t.type==="fragmented"?XL(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw",no_selection:Fe(s)&&b4(s)?!s.isFakeCaret:!0}),s&&(e.selection.moveToBookmark(s),e.selection.scrollIntoView())},Fw=e=>e.type==="fragmented"?e.fragments.join(""):e.content,Vp=e=>{const t=ye.fromTag("body",CE());return Jl(t,Fw(e)),Be(Mr(t,"*[data-mce-bogus]"),wa),Xi(t)},eB=(e,t)=>Fw(e)===Fw(t),tB=(e,t)=>Vp(e)===Vp(t),i1=(e,t)=>!e||!t?!1:eB(e,t)?!0:tB(e,t),Hw=e=>e.get()===0,Mv=(e,t,o)=>{Hw(o)&&(e.typing=t)},SE=(e,t)=>{e.typing&&(Mv(e,!1,t),e.add())},oB=e=>{e.typing&&(e.typing=!1,e.add())},nB=(e,t,o)=>{Hw(t)&&o.set(Jt(e.selection))},EE=(e,t,o,s,a,c,d)=>{const h=a1(e),_=zt.extend(c||{},h);if(!Hw(s)||e.removed)return null;const z=t.data[o.get()];if(e.dispatch("BeforeAddUndo",{level:_,lastLevel:z,originalEvent:d}).isDefaultPrevented()||z&&i1(z,_))return null;t.data[o.get()]&&a.get().each(V=>{t.data[o.get()].beforeBookmark=V});const I=MT(e);if(I&&t.data.length>I){for(let V=0;V0?(e.setDirty(!0),e.dispatch("AddUndo",H),e.dispatch("change",H)):e.dispatch("AddUndo",H),_},AE=(e,t,o)=>{t.data=[],o.set(0),t.typing=!1,e.dispatch("ClearUndos")},TE=(e,t,o,s,a)=>{if(t.transact(s)){const c=t.data[o.get()].bookmark,d=t.data[o.get()-1];Rv(e,d,!0),t.transact(a)&&(t.data[o.get()-1].beforeBookmark=c)}},tN=(e,t,o)=>{let s;return t.get(){let a;return t.typing&&(t.add(),t.typing=!1,Mv(t,!1,o)),s.get()>0&&(s.set(s.get()-1),a=t.data[s.get()],Rv(e,a,!0),e.setDirty(!0),e.dispatch("Undo",{level:a})),a},oN=e=>{e.clear(),e.add()},nN=(e,t,o)=>o.get()>0||t.typing&&t.data[0]&&!i1(a1(e),t.data[0]),sB=(e,t)=>t.get()(SE(e,t),e.beforeChange(),e.ignore(o),e.add()),OE=(e,t)=>{try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}},sN=(e,t)=>{const o=e.dom,s=Fe(t)?t:e.getBody();Be(o.select("table,a",s),a=>{switch(a.nodeName){case"TABLE":const c=V_(e),d=o.getAttrib(a,"border");(!d||d==="0")&&e.hasVisual?o.addClass(a,c):o.removeClass(a,c);break;case"A":if(!o.getAttrib(a,"href")){const h=o.getAttrib(a,"name")||a.id,_=zy(e);h&&e.hasVisual?o.addClass(a,_):o.removeClass(a,_)}break}}),e.dispatch("VisualAid",{element:t,hasVisual:e.hasVisual})},zE=e=>({init:{bindEvents:dt},undoManager:{beforeChange:(t,o)=>nB(e,t,o),add:(t,o,s,a,c,d)=>EE(e,t,o,s,a,c,d),undo:(t,o,s)=>$w(e,t,o,s),redo:(t,o)=>tN(e,t,o),clear:(t,o)=>AE(e,t,o),reset:t=>oN(t),hasUndo:(t,o)=>nN(e,t,o),hasRedo:(t,o)=>sB(t,o),transact:(t,o,s)=>rB(t,o,s),ignore:(t,o)=>OE(t,o),extra:(t,o,s,a)=>TE(e,t,o,s,a)},formatter:{match:(t,o,s,a)=>Vg(e,t,o,s,a),matchAll:(t,o)=>$O(e,t,o),matchNode:(t,o,s,a)=>Dm(e,t,o,s,a),canApply:t=>jO(e,t),closest:t=>VO(e,t),apply:(t,o,s)=>lz(e,t,o,s),remove:(t,o,s,a)=>Wg(e,t,o,s,a),toggle:(t,o,s)=>lL(e,t,o,s),formatChanged:(t,o,s,a,c)=>iL(e,t,o,s,a,c)},editor:{getContent:t=>P3(e,t),setContent:(t,o)=>Q6(e,t,o),insertContent:(t,o)=>fw(e,t,o),addVisual:t=>sN(e,t)},selection:{getContent:(t,o)=>GL(e,t,o)},autocompleter:{addDecoration:dt,removeDecoration:dt},raw:{getModel:()=>j.none()}}),aB=e=>{const t=z=>ue(z)?z:{},{init:o,undoManager:s,formatter:a,editor:c,selection:d,autocompleter:h,raw:_}=e;return{init:{bindEvents:o.bindEvents},undoManager:{beforeChange:s.beforeChange,add:s.add,undo:s.undo,redo:s.redo,clear:s.clear,reset:s.reset,hasUndo:s.hasUndo,hasRedo:s.hasRedo,transact:(z,I,H)=>s.transact(H),ignore:(z,I)=>s.ignore(I),extra:(z,I,H,V)=>s.extra(H,V)},formatter:{match:(z,I,H,V)=>a.match(z,t(I),V),matchAll:a.matchAll,matchNode:a.matchNode,canApply:z=>a.canApply(z),closest:z=>a.closest(z),apply:(z,I,H)=>a.apply(z,t(I)),remove:(z,I,H,V)=>a.remove(z,t(I)),toggle:(z,I,H)=>a.toggle(z,t(I)),formatChanged:(z,I,H,V,ee)=>a.formatChanged(I,H,V,ee)},editor:{getContent:z=>c.getContent(z),setContent:(z,I)=>({content:c.setContent(z,I),html:""}),insertContent:(z,I)=>(c.insertContent(z),""),addVisual:c.addVisual},selection:{getContent:(z,I)=>d.getContent(I)},autocompleter:{addDecoration:h.addDecoration,removeDecoration:h.removeDecoration},raw:{getModel:()=>j.some(_.getRawModel())}}},iB=()=>{const e=Ge(null),t=Ge("");return{init:{bindEvents:dt},undoManager:{beforeChange:dt,add:e,undo:e,redo:e,clear:dt,reset:dt,hasUndo:fn,hasRedo:fn,transact:e,ignore:dt,extra:dt},formatter:{match:fn,matchAll:Ge([]),matchNode:Ge(void 0),canApply:fn,closest:t,apply:dt,remove:dt,toggle:dt,formatChanged:Ge({unbind:dt})},editor:{getContent:t,setContent:Ge({content:"",html:""}),insertContent:Ge(""),addVisual:dt},selection:{getContent:t},autocompleter:{addDecoration:dt,removeDecoration:dt},raw:{getModel:Ge(j.none())}}},Pm=e=>Ro(e.plugins,"rtc"),rN=e=>Gn(e.plugins,"rtc").bind(t=>j.from(t.setup)),aN=e=>{const t=e;return rN(e).fold(()=>(t.rtcInstance=zE(e),j.none()),o=>(t.rtcInstance=iB(),j.some(()=>o().then(s=>(t.rtcInstance=aB(s),s.rtc.isRemote)))))},NE=e=>e.rtcInstance?e.rtcInstance:zE(e),ei=e=>{const t=e.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.")},l1=(e,t,o)=>{ei(e).undoManager.beforeChange(t,o)},lB=(e,t,o,s,a,c,d)=>ei(e).undoManager.add(t,o,s,a,c,d),cB=(e,t,o,s)=>ei(e).undoManager.undo(t,o,s),iN=(e,t,o)=>ei(e).undoManager.redo(t,o),lN=(e,t,o)=>{ei(e).undoManager.clear(t,o)},Vw=(e,t)=>{ei(e).undoManager.reset(t)},dB=(e,t,o)=>ei(e).undoManager.hasUndo(t,o),uB=(e,t,o)=>ei(e).undoManager.hasRedo(t,o),fB=(e,t,o,s)=>ei(e).undoManager.transact(t,o,s),mB=(e,t,o)=>{ei(e).undoManager.ignore(t,o)},pB=(e,t,o,s,a)=>{ei(e).undoManager.extra(t,o,s,a)},gB=(e,t,o,s,a)=>ei(e).formatter.match(t,o,s,a),hB=(e,t,o)=>ei(e).formatter.matchAll(t,o),bB=(e,t,o,s,a)=>ei(e).formatter.matchNode(t,o,s,a),yB=(e,t)=>ei(e).formatter.canApply(t),vB=(e,t)=>ei(e).formatter.closest(t),Ls=(e,t,o,s)=>{ei(e).formatter.apply(t,o,s)},cN=(e,t,o,s,a)=>{ei(e).formatter.remove(t,o,s,a)},DE=(e,t,o,s)=>{ei(e).formatter.toggle(t,o,s)},dN=(e,t,o,s,a,c)=>ei(e).formatter.formatChanged(t,o,s,a,c),uN=(e,t)=>NE(e).editor.getContent(t),RE=(e,t,o)=>NE(e).editor.setContent(t,o),_B=(e,t,o)=>NE(e).editor.insertContent(t,o),xB=(e,t,o)=>ei(e).selection.getContent(t,o),fN=(e,t)=>ei(e).editor.addVisual(t),mN=e=>ei(e).init.bindEvents(),wB=(e,t={})=>{const o=t.format?t.format:"html";return xB(e,o,t)},Sb=e=>e.dom.length===0?(Jn(e),j.none()):j.some(e),kB=(e,t)=>e.filter(o=>ws.isBookmarkNode(o.dom)).bind(t?ho:Ur),c1=(e,t,o,s,a)=>{const c=e.dom,d=t.dom,h=s?c.length:d.length;s?(fv(c,d,a,!1,!s),o.setStart(d,h)):(fv(d,c,a,!1,!s),o.setEnd(d,h))},Lv=(e,t,o)=>{ia(e).each(s=>{const a=e.dom;t&&Gy(s,Ue(a,0),o)?Hx(a,0,o):!t&&hb(s,Ue(a,a.length),o)&&kr(a,a.length,o)})},Eb=(e,t,o,s,a)=>{e.bind(c=>((s?kr:Hx)(c.dom,s?c.dom.length:0,a),t.filter(Rs).map(h=>c1(c,h,o,s,a)))).orThunk(()=>kB(t,s).or(t).filter(Rs).map(d=>Lv(d,s,a)))},ME=(e,t,o)=>{const s=j.from(t.firstChild).map(ye.fromDom),a=j.from(t.lastChild).map(ye.fromDom);e.deleteContents(),e.insertNode(t);const c=s.bind(Ur).filter(Rs).bind(Sb),d=a.bind(ho).filter(Rs).bind(Sb);Eb(c,s,e,!0,o),Eb(d,a,e,!1,o),e.collapse(!1)},pN=(e,t)=>({format:"html",...e,set:!0,selection:!0,content:t}),gN=(e,t)=>{if(t.format!=="raw"){const o=e.selection.getRng(),s=e.dom.getParent(o.commonAncestorContainer,e.dom.isBlock),a=s?{context:s.nodeName.toLowerCase()}:{},c=e.parser.parse(t.content,{forced_root_block:!1,...a,...t});return Lp({validate:!1},e.schema).serialize(c)}else return t.content},LE=(e,t,o={})=>{const s=pN(o,t);mE(e,s).each(a=>{const c=gN(e,a),d=e.selection.getRng();ME(d,d.createContextualFragment(c),e.schema),e.selection.setRng(d),Ud(e,d),pE(e,c,a)})},BE=(e,t,o)=>{if(Ro(e,t)){const s=rt(e[t],a=>a!==o);s.length===0?delete e[t]:e[t]=s}};var hN=(e,t)=>{let o,s;const a=(h,_)=>On(_,z=>e.is(z,h)),c=h=>e.getParents(h,void 0,e.getRoot()),d=()=>{o={},s={},t.on("NodeChange",h=>{const _=h.element,z=c(_),I={};nn(o,(H,V)=>{a(V,z).each(ee=>{s[V]||(Be(H,le=>{le(!0,{node:ee,selector:V,parents:z})}),s[V]=H),I[V]=H})}),nn(s,(H,V)=>{I[V]||(delete s[V],Be(H,ee=>{ee(!1,{node:_,selector:V,parents:z})}))})})};return{selectorChangedWithUnbind:(h,_)=>(o||d(),o[h]||(o[h]=[]),o[h].push(_),a(h,c(t.selection.getStart())).each(()=>{s[h]=o[h]}),{unbind:()=>{BE(o,h,_),BE(s,h,_)}})}};const PE=e=>!!(e&&e.ownerDocument)&&_a(ye.fromDom(e.ownerDocument),ye.fromDom(e)),IE=e=>e?PE(e.startContainer)&&PE(e.endContainer):!1,FE=(e,t,o,s)=>{let a,c;const{selectorChangedWithUnbind:d}=hN(e,s),h=(Ft,go)=>{const ts=e.createRng();Fe(Ft)&&Fe(go)?(ts.setStart(Ft,go),ts.setEnd(Ft,go),Pe(ts),ke(!1)):(M0(e,ts,s.getBody(),!0),Pe(ts))},_=Ft=>wB(s,Ft),z=(Ft,go)=>LE(s,Ft,go),I=Ft=>E3(s.getBody(),Ae(),Ft),H=Ft=>A3(s.getBody(),Ae(),Ft),V=(Ft,go)=>il.getBookmark(Ft,go),ee=Ft=>il.moveToBookmark(Ft),le=(Ft,go)=>(rv(e,Ft,go).each(Pe),Ft),oe=()=>{const Ft=Ae(),go=Oe();return!Ft||Ft.item?!1:Ft.compareEndPoints?Ft.compareEndPoints("StartToEnd",Ft)===0:!go||Ft.collapsed},fe=()=>{const Ft=Ae(),go=s.getBody().querySelectorAll('[data-mce-selected="1"]');return go.length>0?$s(go,ts=>e.isEditable(ts.parentElement)):C3(e,Ft)},ke=Ft=>{const go=Ae();go.collapse(!!Ft),Pe(go)},Oe=()=>t.getSelection?t.getSelection():t.document.selection,Ae=()=>{let Ft;const go=(jt,Eo,wn)=>{try{return Eo.compareBoundaryPoints(jt,wn)}catch{return-1}},ts=t.document;if(Fe(s.bookmark)&&!Vy(s)){const jt=rC(s);if(jt.isSome())return jt.map(Eo=>zx(s,[Eo])[0]).getOr(ts.createRange())}try{const jt=Oe();jt&&!Nd(jt.anchorNode)&&(jt.rangeCount>0?Ft=jt.getRangeAt(0):Ft=ts.createRange(),Ft=zx(s,[Ft])[0])}catch{}if(Ft||(Ft=ts.createRange()),lo(Ft.startContainer)&&Ft.collapsed){const jt=e.getRoot();Ft.setStart(jt,0),Ft.setEnd(jt,0)}return a&&c&&(go(Ft.START_TO_START,Ft,a)===0&&go(Ft.END_TO_END,Ft,a)===0?Ft=c:(a=null,c=null)),Ft},Pe=(Ft,go)=>{if(!IE(Ft))return;const ts=Oe();if(Ft=s.dispatch("SetSelectionRange",{range:Ft,forward:go}).range,ts){c=Ft;try{ts.removeAllRanges(),ts.addRange(Ft)}catch{}go===!1&&ts.extend&&(ts.collapse(Ft.endContainer,Ft.endOffset),ts.extend(Ft.startContainer,Ft.startOffset)),a=ts.rangeCount>0?ts.getRangeAt(0):null}if(!Ft.collapsed&&Ft.startContainer===Ft.endContainer&&(ts!=null&&ts.setBaseAndExtent)&&Ft.endOffset-Ft.startOffset<2&&Ft.startContainer.hasChildNodes()){const Eo=Ft.startContainer.childNodes[Ft.startOffset];Eo&&Eo.nodeName==="IMG"&&(ts.setBaseAndExtent(Ft.startContainer,Ft.startOffset,Ft.endContainer,Ft.endOffset),(ts.anchorNode!==Ft.startContainer||ts.focusNode!==Ft.endContainer)&&ts.setBaseAndExtent(Eo,0,Eo,1))}s.dispatch("AfterSetSelectionRange",{range:Ft,forward:go})},ht=Ft=>(z(e.getOuterHTML(Ft)),Ft),Mt=()=>m6(s.getBody(),Ae()),Yt=(Ft,go)=>dC(e,Ae(),Ft,go),Qe=()=>{const Ft=Oe(),go=Ft==null?void 0:Ft.anchorNode,ts=Ft==null?void 0:Ft.focusNode;if(!Ft||!go||!ts||Nd(go)||Nd(ts))return!0;const jt=e.createRng(),Eo=e.createRng();try{jt.setStart(go,Ft.anchorOffset),jt.collapse(!0),Eo.setStart(ts,Ft.focusOffset),Eo.collapse(!0)}catch{return!0}return jt.compareBoundaryPoints(jt.START_TO_START,Eo)<=0},qr={dom:e,win:t,serializer:o,editor:s,expand:(Ft={type:"word"})=>Pe(Dg(e).expand(Ae(),Ft)),collapse:ke,setCursorLocation:h,getContent:_,setContent:z,getBookmark:V,moveToBookmark:ee,select:le,isCollapsed:oe,isEditable:fe,isForward:Qe,setNode:ht,getNode:Mt,getSel:Oe,setRng:Pe,getRng:Ae,getStart:I,getEnd:H,getSelectedBlocks:Yt,normalize:()=>{const Ft=Ae(),go=Oe();if(!z0(go)&&Ly(s)){const ts=Sm(e,Ft);return ts.each(jt=>{Pe(jt,Qe())}),ts.getOr(Ft)}return Ft},selectorChanged:(Ft,go)=>(d(Ft,go),qr),selectorChangedWithUnbind:d,getScrollContainer:()=>{let Ft,go=e.getRoot();for(;go&&go.nodeName!=="BODY";){if(go.scrollHeight>go.clientHeight){Ft=go;break}go=go.parentNode}return Ft},scrollIntoView:(Ft,go)=>{Fe(Ft)?tC(s,Ft,go):Ud(s,Ae(),go)},placeCaretAt:(Ft,go)=>Pe(Q4(Ft,go,s.getDoc())),getBoundingClientRect:()=>{const Ft=Ae();return Ft.collapsed?Ue.fromRangeStart(Ft).getClientRects()[0]:Ft.getBoundingClientRect()},destroy:()=>{t=a=c=null,Os.destroy()}},il=ws(qr),Os=ps(qr,s);return qr.bookmarkManager=il,qr.controlSelection=Os,qr},bN=(e,t,o)=>{t.addNodeFilter("br",(s,a,c)=>{const d=zt.extend({},o.getBlockElements()),h=o.getNonEmptyElements(),_=o.getWhitespaceElements();d.body=1;const z=I=>I.name in d||ed(o,I);for(let I=0,H=s.length;I{e.addAttributeFilter("data-mce-tabindex",(s,a)=>{let c=s.length;for(;c--;){const d=s[c];d.attr("tabindex",d.attr("data-mce-tabindex")),d.attr(a,null)}}),e.addAttributeFilter("src,href,style",(s,a)=>{const c="data-mce-"+a,d=t.url_converter,h=t.url_converter_scope;let _=s.length;for(;_--;){const z=s[_];let I=z.attr(c);I!==void 0?(z.attr(a,I.length>0?I:null),z.attr(c,null)):(I=z.attr(a),a==="style"?I=o.serializeStyle(o.parseStyle(I),z.name):d&&(I=d.call(h,I,a,z.name)),z.attr(a,I.length>0?I:null))}}),e.addAttributeFilter("class",s=>{let a=s.length;for(;a--;){const c=s[a];let d=c.attr("class");d&&(d=d.replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),c.attr("class",d.length>0?d:null))}}),e.addAttributeFilter("data-mce-type",(s,a,c)=>{let d=s.length;for(;d--;){const h=s[d];h.attr("data-mce-type")==="bookmark"&&!c.cleanup&&(j.from(h.firstChild).exists(z=>{var I;return!Bc((I=z.value)!==null&&I!==void 0?I:"")})?h.unwrap():h.remove())}}),e.addNodeFilter("script,style",(s,a)=>{var c;const d=_=>_.replace(/()/g,` +`).replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"");let h=s.length;for(;h--;){const _=s[h],z=_.firstChild,I=(c=z==null?void 0:z.value)!==null&&c!==void 0?c:"";if(a==="script"){const H=_.attr("type");H&&_.attr("type",H==="mce-no/type"?null:H.replace(/^mce\-/,"")),t.element_format==="xhtml"&&z&&I.length>0&&(z.value=`// `)}else t.element_format==="xhtml"&&z&&I.length>0&&(z.value=``)}}),e.addNodeFilter("#comment",s=>{let a=s.length;for(;a--;){const c=s[a],d=c.value;t.preserve_cdata&&(d==null?void 0:d.indexOf("[CDATA["))===0?(c.name="#cdata",c.type=4,c.value=o.decode(d.replace(/^\[CDATA\[|\]\]$/g,""))):(d==null?void 0:d.indexOf("mce:protected "))===0&&(c.name="#text",c.type=3,c.raw=!0,c.value=unescape(d).substr(14))}}),e.addNodeFilter("xml:namespace,input",(s,a)=>{let c=s.length;for(;c--;){const d=s[c];d.type===7?d.remove():d.type===1&&a==="input"&&!d.attr("type")&&d.attr("type","text")}}),e.addAttributeFilter("data-mce-type",s=>{Le(s,a=>{a.attr("data-mce-type")==="format-caret"&&(a.isEmpty(e.schema.getNonEmptyElements())?a.remove():a.unwrap())})}),e.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",(s,a)=>{let c=s.length;for(;c--;)s[c].attr(a,null)}),t.remove_trailing_brs&&yN(t,e,e.schema)},SP=e=>{const t=s=>(s==null?void 0:s.name)==="br",o=e.lastChild;if(t(o)){const s=o.prev;t(s)&&(o.remove(),s.remove())}},vN=(e,t,o)=>{let s;const a=e.dom;let c=t.cloneNode(!0);const d=document.implementation;if(d.createHTMLDocument){const h=d.createHTMLDocument("");zt.each(c.nodeName==="BODY"?c.childNodes:[c],_=>{h.body.appendChild(h.importNode(_,!0))}),c.nodeName!=="BODY"?c=h.body.firstChild:c=h.body,s=a.doc,a.doc=h}return Vv(e,{...o,node:c}),s&&(a.doc=s),c},_N=(e,t)=>Fe(e)&&e.hasEventListeners("PreProcess")&&!t.no_events,xN=(e,t,o)=>_N(e,o)?vN(e,t,o):t,EP=(e,t,o)=>{zt.inArray(t,o)===-1&&(e.addAttributeFilter(o,(s,a)=>{let c=s.length;for(;c--;)s[c].attr(a,null)}),t.push(o))},TP=(e,t,o)=>!t.no_events&&e?jv(e,{...t,content:o}).content:o,Uw=(e,t,o)=>{const s=nl(o.getInner?t.innerHTML:e.getOuterHTML(t));return o.selection||Bh(ye.fromDom(t))?s:zt.trim(s)},wN=(e,t,o)=>{const s=o.selection?{forced_root_block:!1,...o}:o,a=e.parse(t,s);return SP(a),a},kN=(e,t,o)=>Lp(e,t).serialize(o),CN=(e,t,o,s,a)=>{const c=kN(t,o,s);return TP(e,a,c)},AP=(e,t)=>{const o=["data-mce-selected"],s={entity_encoding:"named",remove_trailing_brs:!0,pad_empty_with_br:!1,...e},a=t&&t.dom?t.dom:Ts.DOM,c=t&&t.schema?t.schema:Rc(s),d=a1(s,c);HE(d,s,a);const h=(_,z={})=>{const I={format:"html",...z},$=xN(t,_,I),V=Uw(a,$,I),ee=wN(d,V,I);return I.format==="tree"?ee:CN(t,s,c,ee,I)};return{schema:c,addNodeFilter:d.addNodeFilter,addAttributeFilter:d.addAttributeFilter,serialize:h,addRules:c.addValidElements,setRules:c.setValidElements,addTempAttr:$t(EP,d,o),getTempAttrs:Ge(o),getNodeFilters:d.getNodeFilters,getAttributeFilters:d.getAttributeFilters,removeNodeFilter:d.removeNodeFilter,removeAttributeFilter:d.removeAttributeFilter}},SN=(e,t)=>{const o=AP(e,t);return{schema:o.schema,addNodeFilter:o.addNodeFilter,addAttributeFilter:o.addAttributeFilter,serialize:o.serialize,addRules:o.addRules,setRules:o.setRules,addTempAttr:o.addTempAttr,getTempAttrs:o.getTempAttrs,getNodeFilters:o.getNodeFilters,getAttributeFilters:o.getAttributeFilters,removeNodeFilter:o.removeNodeFilter,removeAttributeFilter:o.removeAttributeFilter}},OP="html",zP=(e,t)=>({...e,format:t,get:!0,getInner:!0}),EN=(e,t={})=>{const o=t.format?t.format:OP,s=zP(t,o);return jz(e,s).fold(To,a=>{const c=fN(e,a);return Fu(e,c,a)})},TN="html",AN=(e,t)=>({format:TN,...e,set:!0,content:t}),VE=(e,t,o={})=>{const s=AN(o,t);return pE(e,s).map(a=>{const c=ME(e,a.content,a);return gE(e,c.html,a),c.content}).getOr(t)},NP="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(","),DP=[],RP="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,template,textcolor,rtc".split(","),P0=[],jE=(e,t)=>{const o=rt(t,s=>Ro(e,s));return yn(o)},MP=e=>{const t=jE(e,NP),o=e.forced_root_block;return(o===!1||o==="")&&t.push("forced_root_block (false only)"),yn(t)},ON=e=>jE(e,DP),UE=(e,t)=>{const o=zt.makeMap(e.plugins," "),a=rt(t,c=>Ro(o,c));return yn(a)},ZE=e=>UE(e,RP),zN=e=>UE(e,P0.map(t=>t.name)),NN=(e,t)=>{const o=MP(e),s=ZE(t),a=s.length>0,c=o.length>0,d=t.theme==="mobile";if(a||c||d){const h=` +-->`)}}),e.addNodeFilter("#comment",s=>{let a=s.length;for(;a--;){const c=s[a],d=c.value;t.preserve_cdata&&(d==null?void 0:d.indexOf("[CDATA["))===0?(c.name="#cdata",c.type=4,c.value=o.decode(d.replace(/^\[CDATA\[|\]\]$/g,""))):(d==null?void 0:d.indexOf("mce:protected "))===0&&(c.name="#text",c.type=3,c.raw=!0,c.value=unescape(d).substr(14))}}),e.addNodeFilter("xml:namespace,input",(s,a)=>{let c=s.length;for(;c--;){const d=s[c];d.type===7?d.remove():d.type===1&&a==="input"&&!d.attr("type")&&d.attr("type","text")}}),e.addAttributeFilter("data-mce-type",s=>{Be(s,a=>{a.attr("data-mce-type")==="format-caret"&&(a.isEmpty(e.schema.getNonEmptyElements())?a.remove():a.unwrap())})}),e.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",(s,a)=>{let c=s.length;for(;c--;)s[c].attr(a,null)}),t.remove_trailing_brs&&bN(t,e,e.schema)},CB=e=>{const t=s=>(s==null?void 0:s.name)==="br",o=e.lastChild;if(t(o)){const s=o.prev;t(s)&&(o.remove(),s.remove())}},yN=(e,t,o)=>{let s;const a=e.dom;let c=t.cloneNode(!0);const d=document.implementation;if(d.createHTMLDocument){const h=d.createHTMLDocument("");zt.each(c.nodeName==="BODY"?c.childNodes:[c],_=>{h.body.appendChild(h.importNode(_,!0))}),c.nodeName!=="BODY"?c=h.body.firstChild:c=h.body,s=a.doc,a.doc=h}return $0(e,{...o,node:c}),s&&(a.doc=s),c},vN=(e,t)=>Fe(e)&&e.hasEventListeners("PreProcess")&&!t.no_events,_N=(e,t,o)=>vN(e,o)?yN(e,t,o):t,SB=(e,t,o)=>{zt.inArray(t,o)===-1&&(e.addAttributeFilter(o,(s,a)=>{let c=s.length;for(;c--;)s[c].attr(a,null)}),t.push(o))},EB=(e,t,o)=>!t.no_events&&e?V0(e,{...t,content:o}).content:o,jw=(e,t,o)=>{const s=ol(o.getInner?t.innerHTML:e.getOuterHTML(t));return o.selection||Mh(ye.fromDom(t))?s:zt.trim(s)},xN=(e,t,o)=>{const s=o.selection?{forced_root_block:!1,...o}:o,a=e.parse(t,s);return CB(a),a},wN=(e,t,o)=>Lp(e,t).serialize(o),kN=(e,t,o,s,a)=>{const c=wN(t,o,s);return EB(e,a,c)},AB=(e,t)=>{const o=["data-mce-selected"],s={entity_encoding:"named",remove_trailing_brs:!0,pad_empty_with_br:!1,...e},a=t&&t.dom?t.dom:As.DOM,c=t&&t.schema?t.schema:Dc(s),d=r1(s,c);HE(d,s,a);const h=(_,z={})=>{const I={format:"html",...z},H=_N(t,_,I),V=jw(a,H,I),ee=xN(d,V,I);return I.format==="tree"?ee:kN(t,s,c,ee,I)};return{schema:c,addNodeFilter:d.addNodeFilter,addAttributeFilter:d.addAttributeFilter,serialize:h,addRules:c.addValidElements,setRules:c.setValidElements,addTempAttr:Ht(SB,d,o),getTempAttrs:Ge(o),getNodeFilters:d.getNodeFilters,getAttributeFilters:d.getAttributeFilters,removeNodeFilter:d.removeNodeFilter,removeAttributeFilter:d.removeAttributeFilter}},CN=(e,t)=>{const o=AB(e,t);return{schema:o.schema,addNodeFilter:o.addNodeFilter,addAttributeFilter:o.addAttributeFilter,serialize:o.serialize,addRules:o.addRules,setRules:o.setRules,addTempAttr:o.addTempAttr,getTempAttrs:o.getTempAttrs,getNodeFilters:o.getNodeFilters,getAttributeFilters:o.getAttributeFilters,removeNodeFilter:o.removeNodeFilter,removeAttributeFilter:o.removeAttributeFilter}},TB="html",OB=(e,t)=>({...e,format:t,get:!0,getInner:!0}),SN=(e,t={})=>{const o=t.format?t.format:TB,s=OB(t,o);return Vz(e,s).fold(Ao,a=>{const c=uN(e,a);return Iu(e,c,a)})},EN="html",AN=(e,t)=>({format:EN,...e,set:!0,content:t}),$E=(e,t,o={})=>{const s=AN(o,t);return mE(e,s).map(a=>{const c=RE(e,a.content,a);return pE(e,c.html,a),c.content}).getOr(t)},zB="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(","),NB=[],DB="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,template,textcolor,rtc".split(","),Bv=[],VE=(e,t)=>{const o=rt(t,s=>Ro(e,s));return yn(o)},RB=e=>{const t=VE(e,zB),o=e.forced_root_block;return(o===!1||o==="")&&t.push("forced_root_block (false only)"),yn(t)},TN=e=>VE(e,NB),jE=(e,t)=>{const o=zt.makeMap(e.plugins," "),a=rt(t,c=>Ro(o,c));return yn(a)},UE=e=>jE(e,DB),ON=e=>jE(e,Bv.map(t=>t.name)),zN=(e,t)=>{const o=RB(e),s=UE(t),a=s.length>0,c=o.length>0,d=t.theme==="mobile";if(a||c||d){const h=` - `,_=d?` Themes:${h}mobile`:"",z=a?` Plugins:${h}${s.join(h)}`:"",I=c?` -Options:${h}${o.join(h)}`:"";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."+_+z+I)}},DN=e=>On(P0,t=>t.name===e).fold(()=>e,t=>t.replacedWith?`${e}, replaced by ${t.replacedWith}`:e),BP=(e,t)=>{const o=ON(e),s=zN(t),a=s.length>0,c=o.length>0;if(a||c){const d=` +Options:${h}${o.join(h)}`:"";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."+_+z+I)}},NN=e=>On(Bv,t=>t.name===e).fold(()=>e,t=>t.replacedWith?`${e}, replaced by ${t.replacedWith}`:e),MB=(e,t)=>{const o=TN(e),s=ON(t),a=s.length>0,c=o.length>0;if(a||c){const d=` - `,h=a?` -Plugins:${d}${s.map(DN).join(d)}`:"",_=c?` +Plugins:${d}${s.map(NN).join(d)}`:"",_=c?` -Options:${d}${o.join(d)}`:"";console.warn("The following deprecated features are currently enabled but will be removed soon."+h+_)}},LP=(e,t)=>{NN(e,t),BP(e,t)},Yg=Ts.DOM,PP=e=>{Yg.setStyle(e.id,"display",e.orgDisplay)},I0=e=>j.from(e).each(t=>t.destroy()),Zw=e=>{const t=e;t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null;const o=e.selection;if(o){const s=o.dom;t.selection=o.win=o.dom=s.doc=null}},RN=e=>{const t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,delete t._mceOldSubmit),Yg.unbind(t,"submit reset",e.formEventDelegate))},MN=e=>{if(!e.removed){const{_selectionOverrides:t,editorUpload:o}=e,s=e.getBody(),a=e.getElement();s&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&Fe(a==null?void 0:a.nextSibling)&&Yg.remove(a.nextSibling),Uv(e),e.editorManager.remove(e),!e.inline&&s&&PP(e),Zv(e),Yg.remove(e.getContainer()),I0(t),I0(o),e.destroy()}},IP=(e,t)=>{const{selection:o,dom:s}=e;if(!e.destroyed){if(!t&&!e.removed){e.remove();return}t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),I0(o),I0(s)),RN(e),Zw(e),e.destroyed=!0}},F0=(()=>{const e={};return{add:(a,c)=>{e[a]=c},get:a=>e[a]?e[a]:{icons:{}},has:a=>Ro(e,a)}})(),Xg=Hi.ModelManager,$0=(e,t)=>t.dom[e],WE=(e,t)=>parseInt(ur(t,e),10),qE=$t($0,"clientWidth"),BN=$t($0,"clientHeight"),FP=$t(WE,"margin-top"),LN=$t(WE,"margin-left"),$P=e=>e.dom.getBoundingClientRect(),PN=(e,t,o)=>{const s=qE(e),a=BN(e);return t>=0&&o>=0&&t<=s&&o<=a},IN=(e,t,o,s)=>{const a=$P(t),c=e?a.left+t.dom.clientLeft+LN(t):0,d=e?a.top+t.dom.clientTop+FP(t):0,h=o-c,_=s-d;return{x:h,y:_}},HP=(e,t,o)=>{const s=ye.fromDom(e.getBody()),a=e.inline?s:Yl(s),c=IN(e.inline,a,t,o);return PN(a,c.x,c.y)},FN=e=>j.from(e).map(ye.fromDom),KE=e=>{const t=e.inline?e.getBody():e.getContentAreaContainer();return FN(t).map(Ua).getOr(!1)};var $N=()=>{const e=()=>{throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:e,close:e,getArgs:e}};const GE=e=>{const t=[],o=()=>{const V=e.theme;return V&&V.getNotificationManagerImpl?V.getNotificationManagerImpl():$N()},s=()=>j.from(t[0]),a=(V,ee)=>V.type===ee.type&&V.text===ee.text&&!V.progressBar&&!V.timeout&&!ee.progressBar&&!ee.timeout,c=()=>{s().each(V=>{V.reposition()})},d=V=>{t.push(V)},h=V=>{rs(t,ee=>ee===V).each(ee=>{t.splice(ee,1)})},_=(V,ee=!0)=>e.removed||!KE(e)?{}:(ee&&e.dispatch("BeforeOpenNotification",{notification:V}),On(t,le=>a(o().getArgs(le),V)).getOrThunk(()=>{e.editorManager.setActive(e);const le=o().open(V,()=>{h(le)},()=>ub(e));return d(le),c(),e.dispatch("OpenNotification",{notification:{...le}}),le})),z=()=>{s().each(V=>{o().close(V),h(V),c()})},I=Ge(t);return(V=>{V.on("SkinLoaded",()=>{const ee=G5(V);ee&&_({text:ee,type:"warning",timeout:0},!1),c()}),V.on("show ResizeEditor ResizeWindow NodeChange ToggleView FullscreenStateChanged",()=>{requestAnimationFrame(c)}),V.on("remove",()=>{Le(t.slice(),ee=>{o().close(ee)})}),V.addShortcut("alt+F12","Focus to notification",()=>s().map(ee=>ye.fromDom(ee.getEl())).each(ee=>nC(ee)))})(e),{open:_,close:z,getNotifications:I}},Ab=Hi.PluginManager,Jg=Hi.ThemeManager;var VP=()=>{const e=()=>{throw new Error("Theme did not provide a WindowManager implementation.")};return{open:e,openUrl:e,alert:e,confirm:e,close:e}};const HN=e=>{let t=[];const o=()=>{const oe=e.theme;return oe&&oe.getWindowManagerImpl?oe.getWindowManagerImpl():VP()},s=(oe,fe)=>(...ke)=>fe?fe.apply(oe,ke):void 0,a=oe=>{e.dispatch("OpenWindow",{dialog:oe})},c=oe=>{e.dispatch("CloseWindow",{dialog:oe})},d=oe=>{t.push(oe),a(oe)},h=oe=>{c(oe),t=rt(t,fe=>fe!==oe),t.length===0&&e.focus()},_=()=>j.from(t[t.length-1]),z=oe=>{e.editorManager.setActive(e),Vy(e),e.ui.show();const fe=oe();return d(fe),fe},I=(oe,fe)=>z(()=>o().open(oe,fe,h)),$=oe=>z(()=>o().openUrl(oe,h)),V=(oe,fe,ke)=>{const Oe=o();Oe.alert(oe,s(ke||Oe,fe))},ee=(oe,fe,ke)=>{const Oe=o();Oe.confirm(oe,s(ke||Oe,fe))},le=()=>{_().each(oe=>{o().close(oe),h(oe)})};return e.on("remove",()=>{Le(t,oe=>{o().close(oe)})}),{open:I,openUrl:$,alert:V,confirm:ee,close:le}},Ww=(e,t)=>{e.notificationManager.open({type:"error",text:t})},qw=(e,t)=>{e._skinLoaded?Ww(e,t):e.on("SkinLoaded",()=>{Ww(e,t)})},VN=(e,t)=>{qw(e,Mc.translate(["Failed to upload image: {0}",t]))},u1=(e,t,o)=>{V2(e,t,{message:o}),console.error(o)},Ob=(e,t,o)=>o?`Failed to load ${e}: ${o} from url ${t}`:`Failed to load ${e} url: ${t}`,YE=(e,t,o)=>{u1(e,"PluginLoadError",Ob("plugin",t,o))},XE=(e,t,o)=>{u1(e,"IconsLoadError",Ob("icons",t,o))},jP=(e,t,o)=>{u1(e,"LanguageLoadError",Ob("language",t,o))},jN=(e,t,o)=>{u1(e,"ThemeLoadError",Ob("theme",t,o))},UP=(e,t,o)=>{u1(e,"ModelLoadError",Ob("model",t,o))},ZP=(e,t,o)=>{const s=Mc.translate(["Failed to initialize plugin: {0}",t]);V2(e,"PluginLoadError",{message:s}),H0(s,o),qw(e,s)},H0=(e,...t)=>{const o=window.console;o&&(o.error?o.error(e,...t):o.log(e,...t))},JE=e=>/^[a-z0-9\-]+$/i.test(e),QE=e=>"content/"+e+"/content.css",Kw=e=>tinymce.Resource.has(QE(e)),WP=e=>UN(e,gl(e)),qP=e=>UN(e,T4(e)),UN=(e,t)=>{const o=e.editorManager.baseURL+"/skins/content",a=`content${e.editorManager.suffix}.css`;return dn(t,c=>Kw(c)?c:JE(c)&&!e.inline?`${o}/${c}/${a}`:e.documentBaseURI.toAbsolute(c))},ZN=e=>{e.contentCSS=e.contentCSS.concat(WP(e),qP(e))},WN=e=>e?an(e.getElementsByTagName("img")):[],KP=(e,t)=>{const o={};return{findAll:(a,c=zo)=>{const d=rt(WN(a),_=>{const z=_.src;return _.hasAttribute("data-mce-bogus")||_.hasAttribute("data-mce-placeholder")||!z||z===Jo.transparentSrc?!1:vs(z,"blob:")?!e.isUploaded(z)&&c(_):vs(z,"data:")?c(_):!1}),h=dn(d,_=>{const z=_.src;if(Ro(o,z))return o[z].then(I=>ft(I)?I:{image:_,blobInfo:I.blobInfo});{const I=WS(t,z).then($=>(delete o[z],{image:_,blobInfo:$})).catch($=>(delete o[z],$));return o[z]=I,I}});return Promise.all(h)}}},eT=()=>{let o={};const s=(V,ee)=>({status:V,resultUri:ee}),a=V=>V in o;return{hasBlobUri:a,getResultUri:V=>{const ee=o[V];return ee?ee.resultUri:null},isPending:V=>a(V)?o[V].status===1:!1,isUploaded:V=>a(V)?o[V].status===2:!1,markPending:V=>{o[V]=s(1,null)},markUploaded:(V,ee)=>{o[V]=s(2,ee)},removeFailed:V=>{delete o[V]},destroy:()=>{o={}}}};let V0=0;const qN=()=>{const e=()=>Math.round(ol()*4294967295).toString(36);return"s"+new Date().getTime().toString(36)+e()+e()+e()},GP=e=>e+V0+++qN(),KN=()=>{let e=[];const t=$=>({"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"})[$.toLowerCase()]||"dat",o=($,V,ee,le,oe)=>{if(ft($))return s({id:$,name:le,filename:oe,blob:V,base64:ee});if(ue($))return s($);throw new Error("Unknown input type")},s=$=>{if(!$.blob||!$.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");const V=$.id||GP("blobid"),ee=$.name||V,le=$.blob;return{id:Ge(V),name:Ge(ee),filename:Ge($.filename||ee+"."+t(le.type)),blob:Ge(le),base64:Ge($.base64),blobUri:Ge($.blobUri||URL.createObjectURL(le)),uri:Ge($.uri)}},a=$=>{d($.id())||e.push($)},c=$=>On(e,$).getOrUndefined(),d=$=>c(V=>V.id()===$);return{create:o,add:a,get:d,getByUri:$=>c(V=>V.blobUri()===$),getByData:($,V)=>c(ee=>ee.base64()===$&&ee.blob().type===V),findFirst:c,removeByUri:$=>{e=rt(e,V=>V.blobUri()===$?(URL.revokeObjectURL(V.blobUri()),!1):!0)},destroy:()=>{Le(e,$=>{URL.revokeObjectURL($.blobUri())}),e=[]}}},GN=(e,t)=>{const o={},s=(oe,fe)=>oe?oe.replace(/\/$/,"")+"/"+fe.replace(/^\//,""):fe,a=(oe,fe)=>new Promise((ke,Oe)=>{const Te=new XMLHttpRequest;Te.open("POST",t.url),Te.withCredentials=t.credentials,Te.upload.onprogress=ht=>{fe(ht.loaded/ht.total*100)},Te.onerror=()=>{Oe("Image upload failed due to a XHR Transport error. Code: "+Te.status)},Te.onload=()=>{if(Te.status<200||Te.status>=300){Oe("HTTP Error: "+Te.status);return}const ht=JSON.parse(Te.responseText);if(!ht||!ft(ht.location)){Oe("Invalid JSON: "+Te.responseText);return}ke(s(t.basePath,ht.location))};const Pe=new FormData;Pe.append("file",oe.blob(),oe.filename()),Te.send(Pe)}),c=Gt(t.handler)?t.handler:a,d=()=>new Promise(oe=>{oe([])}),h=(oe,fe)=>({url:fe,blobInfo:oe,status:!0}),_=(oe,fe)=>({url:"",blobInfo:oe,status:!1,error:fe}),z=(oe,fe)=>{zt.each(o[oe],ke=>{ke(fe)}),delete o[oe]},I=(oe,fe,ke)=>(e.markPending(oe.blobUri()),new Promise(Oe=>{let Te,Pe;try{const ht=()=>{Te&&(Te.close(),Pe=dt)},Mt=Qe=>{ht(),e.markUploaded(oe.blobUri(),Qe),z(oe.blobUri(),h(oe,Qe)),Oe(h(oe,Qe))},Yt=Qe=>{ht(),e.removeFailed(oe.blobUri()),z(oe.blobUri(),_(oe,Qe)),Oe(_(oe,Qe))};Pe=Qe=>{Qe<0||Qe>100||j.from(Te).orThunk(()=>j.from(ke).map(ks)).each(Ve=>{Te=Ve,Ve.progressBar.value(Qe)})},fe(oe,Pe).then(Mt,Qe=>{Yt(ft(Qe)?{message:Qe}:Qe)})}catch(ht){Oe(_(oe,ht))}})),$=oe=>oe===a,V=oe=>{const fe=oe.blobUri();return new Promise(ke=>{o[fe]=o[fe]||[],o[fe].push(ke)})},ee=(oe,fe)=>(oe=zt.grep(oe,ke=>!e.isUploaded(ke.blobUri())),Promise.all(zt.map(oe,ke=>e.isPending(ke.blobUri())?V(ke):I(ke,c,fe))));return{upload:(oe,fe)=>!t.url&&$(c)?d():ee(oe,fe)}},YN=e=>()=>e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0}),XN=(e,t)=>GN(t,{url:s2(e),basePath:C4(e),credentials:r2(e),handler:W5(e)}),YP=e=>{const t=eT(),o=XN(e,t);return{upload:(s,a=!0)=>o.upload(s,a?YN(e):void 0)}},XP=(e,t)=>e.dom.isEmpty(t.dom)&&Fe(e.schema.getTextBlockElements()[En(t)]),JN=e=>t=>{XP(e,t)&&fr(t,ye.fromHtml('
    '))},tT=e=>{const t=KN();let o,s;const a=eT(),c=[],d=Te=>Pe=>e.selection?Te(Pe):[],h=Te=>Te+(Te.indexOf("?")===-1?"?":"&")+new Date().getTime(),_=(Te,Pe,ht)=>{let Mt=0;do Mt=Te.indexOf(Pe,Mt),Mt!==-1&&(Te=Te.substring(0,Mt)+ht+Te.substr(Mt+Pe.length),Mt+=ht.length-Pe.length+1);while(Mt!==-1);return Te},z=(Te,Pe,ht)=>{const Mt=`src="${ht}"${ht===Jo.transparentSrc?' data-mce-placeholder="1"':""}`;return Te=_(Te,`src="${Pe}"`,Mt),Te=_(Te,'data-mce-src="'+Pe+'"','data-mce-src="'+ht+'"'),Te},I=(Te,Pe)=>{Le(e.undoManager.data,ht=>{ht.type==="fragmented"?ht.fragments=dn(ht.fragments,Mt=>z(Mt,Te,Pe)):ht.content=z(ht.content,Te,Pe)})},$=(Te,Pe)=>{const ht=e.convertURL(Pe,"src");I(Te.src,Pe),Ha(ye.fromDom(Te),{src:Op(e)?h(Pe):Pe,"data-mce-src":ht})},V=()=>(o||(o=XN(e,a)),fe().then(d(Te=>{const Pe=dn(Te,ht=>ht.blobInfo);return o.upload(Pe,YN(e)).then(d(ht=>{const Mt=[];let Yt=!1;const Qe=dn(ht,(Ve,mt)=>{const{blobInfo:to,image:bo}=Te[mt];let gn=!1;return Ve.status&&w4(e)?(Ve.url&&!Yn(bo.src,Ve.url)&&(Yt=!0),t.removeByUri(bo.src),Im(e)||$(bo,Ve.url)):Ve.error&&(Ve.error.remove&&(I(bo.src,Jo.transparentSrc),Mt.push(bo),gn=!0),VN(e,Ve.error.message)),{element:bo,status:Ve.status,uploadUri:Ve.url,blobInfo:to,removed:gn}});return Mt.length>0&&!Im(e)?e.undoManager.transact(()=>{Le(ci(Mt),Ve=>{const mt=ia(Ve);Jn(Ve),mt.each(JN(e)),t.removeByUri(Ve.dom.src)})}):Yt&&e.undoManager.dispatchChange(),Qe}))}))),ee=()=>As(e)?V():Promise.resolve([]),le=Te=>Hs(c,Pe=>Pe(Te)),oe=Te=>{c.push(Te)},fe=()=>(s||(s=KP(a,t)),s.findAll(e.getBody(),le).then(d(Te=>{const Pe=rt(Te,ht=>ft(ht)?(qw(e,ht),!1):ht.uriType!=="blob");return Im(e)||Le(Pe,ht=>{I(ht.image.src,ht.blobInfo.blobUri()),ht.image.src=ht.blobInfo.blobUri(),ht.image.removeAttribute("data-mce-src")}),Pe}))),ke=()=>{t.destroy(),a.destroy(),s=o=null},Oe=Te=>Te.replace(/src="(blob:[^"]+)"/g,(Pe,ht)=>{const Mt=a.getResultUri(ht);if(Mt)return'src="'+Mt+'"';let Yt=t.getByUri(ht);return Yt||(Yt=ko(e.editorManager.get(),(Qe,Ve)=>Qe||Ve.editorUpload&&Ve.editorUpload.blobCache.getByUri(ht),void 0)),Yt?'src="data:'+Yt.blob().type+";base64,"+Yt.base64()+'"':Pe});return e.on("SetContent",()=>{As(e)?ee():fe()}),e.on("RawSaveContent",Te=>{Te.content=Oe(Te.content)}),e.on("GetContent",Te=>{Te.source_view||Te.format==="raw"||Te.format==="tree"||(Te.content=Oe(Te.content))}),e.on("PostRender",()=>{e.parser.addNodeFilter("img",Te=>{Le(Te,Pe=>{const ht=Pe.attr("src");if(!ht||t.getByUri(ht))return;const Mt=a.getResultUri(ht);Mt&&Pe.attr("src",Mt)})})}),{blobCache:t,addFilter:oe,uploadImages:V,uploadImagesAuto:ee,scanForImages:fe,destroy:ke}},QN=e=>{const t=e.dom,o=e.schema.type,s={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:"table",collapsed:!1,styles:{marginLeft:"0px",marginRight:"auto"},onformat:a=>{t.setStyle(a,"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:"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:"table",collapsed:!1,styles:{marginRight:"0px",marginLeft:"auto"},onformat:a=>{t.setStyle(a,"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 a={inline:"span",styles:{textDecoration:"line-through"},exact:!0},c={inline:"strike",remove:"all",preserve_attributes:["class","style"]},d={inline:"s",remove:"all",preserve_attributes:["class","style"]};return o!=="html4"?[d,a,c]:[a,d,c]})(),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"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:(a,c,d)=>no(a)&&a.hasAttribute("href"),onformat:(a,c,d)=>{zt.each(d,(h,_)=>{t.setAttrib(a,_,h)})}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":a=>{var c;return(c=a==null?void 0:a.customValue)!==null&&c!==void 0?c: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 zt.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),a=>{s[a]={block:a,remove:"all"}}),s},oT={remove_similar:!0,inherit:!1},zb={selector:"td,th",...oT},eD={tablecellbackgroundcolor:{styles:{backgroundColor:"%value"},...zb},tablecellverticalalign:{styles:{"vertical-align":"%value"},...zb},tablecellbordercolor:{styles:{borderColor:"%value"},...zb},tablecellclass:{classes:["%value"],...zb},tableclass:{selector:"table",classes:["%value"],...oT},tablecellborderstyle:{styles:{borderStyle:"%value"},...zb},tablecellborderwidth:{styles:{borderWidth:"%value"},...zb}},JP=Ge(eD),nT=e=>{const t={},o=d=>Fe(d)?t[d]:t,s=d=>Ro(t,d),a=(d,h)=>{d&&(ft(d)?(ve(h)||(h=[h]),Le(h,_=>{ln(_.deep)&&(_.deep=!$c(_)),ln(_.split)&&(_.split=!$c(_)||Ja(_)),ln(_.remove)&&$c(_)&&!Ja(_)&&(_.remove="none"),$c(_)&&Ja(_)&&(_.mixed=!0,_.block_expand=!0),ft(_.classes)&&(_.classes=_.classes.split(/\s+/))}),t[d]=h):nn(d,(_,z)=>{a(z,_)}))},c=d=>(d&&t[d]&&delete t[d],t);return a(QN(e)),a(JP()),a(X5(e)),{get:o,has:s,register:a,unregister:c}},Nb=zt.each,dc=Ts.DOM,Af=e=>Fe(e)&&ue(e),j0=(e,t)=>{const o=t&&t.schema||Rc({}),s=(_,z)=>{z.classes.length>0&&dc.addClass(_,z.classes.join(" ")),dc.setAttribs(_,z.attrs)},a=_=>{const z=ft(_)?{name:_,classes:[],attrs:{}}:_,I=dc.create(z.name);return s(I,z),I},c=(_,z)=>{const I=o.getElementRule(_.nodeName.toLowerCase()),$=I==null?void 0:I.parentsRequired;return $&&$.length?z&&mn($,z)?z:$[0]:!1},d=(_,z,I)=>{let $;const V=z[0],ee=Af(V)?V.name:void 0,le=c(_,ee);if(le)ee===le?($=V,z=z.slice(1)):$=le;else if(V)$=V,z=z.slice(1);else if(!I)return _;const oe=$?a($):dc.create("div");oe.appendChild(_),I&&zt.each(I,ke=>{const Oe=a(ke);oe.insertBefore(Oe,_)});const fe=Af($)?$.siblings:void 0;return d(oe,z,fe)},h=dc.create("div");if(e.length>0){const _=e[0],z=a(_),I=Af(_)?_.siblings:void 0;h.appendChild(d(z,e.slice(1),I))}return h},f1=e=>{e=zt.trim(e);let t="div";const o={name:t,classes:[],attrs:{},selector:e};return e!=="*"&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,(s,a,c,d,h)=>{switch(a){case"#":o.attrs.id=c;break;case".":o.classes.push(c);break;case":":zt.inArray("checked disabled enabled read-only required".split(" "),c)!==-1&&(o.attrs[c]=c);break}if(d==="["){const _=h.match(/([\w\-]+)(?:\=\"([^\"]+))?/);_&&(o.attrs[_[1]]=_[2])}return""})),o.name=t||"div",o},tD=e=>ft(e)?(e=e.split(/\s*,\s*/)[0],e=e.replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),zt.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),t=>{const o=zt.map(t.split(/(?:~\+|~|\+)/),f1),s=o.pop();return o.length&&(s.siblings=o),s}).reverse()):[],oD=(e,t)=>{let o="",s=J5(e);if(s==="")return"";const a=V=>ft(V)?V.replace(/%(\w+)/g,""):"",c=(V,ee)=>dc.getStyle(ee??e.getBody(),V,!0);if(ft(t)){const V=e.formatter.get(t);if(!V)return"";t=V[0]}if("preview"in t){const V=t.preview;if(V===!1)return"";s=V||s}let d=t.block||t.inline||"span",h;const _=tD(t.selector);_.length>0?(_[0].name||(_[0].name=d),d=t.selector,h=j0(_,e)):h=j0([d],e);const z=dc.select(d,h)[0]||h.firstChild;Nb(t.styles,(V,ee)=>{const le=a(V);le&&dc.setStyle(z,ee,le)}),Nb(t.attributes,(V,ee)=>{const le=a(V);le&&dc.setAttrib(z,ee,le)}),Nb(t.classes,V=>{const ee=a(V);dc.hasClass(z,ee)||dc.addClass(z,ee)}),e.dispatch("PreviewFormats"),dc.setStyles(h,{position:"absolute",left:-65535}),e.getBody().appendChild(h);const I=c("fontSize"),$=/px$/.test(I)?parseInt(I,10):0;return Nb(s.split(" "),V=>{let ee=c(V,z);if(!(V==="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(ee)&&(ee=c(V),xh(ee).toLowerCase()==="#ffffff"))&&!(V==="color"&&xh(ee).toLowerCase()==="#000000")){if(V==="font-size"&&/em|%$/.test(ee)){if($===0)return;ee=parseFloat(ee)/(/%$/.test(ee)?100:1)*$+"px"}V==="border"&&ee&&(o+="padding:0 2px;"),o+=V+":"+ee+";"}}),e.dispatch("AfterPreviewFormats"),dc.remove(h),o},sT=e=>{e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(let t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])},U0=e=>{const t=nT(e),o=Er({});return sT(e),q3(e),Im(e)||dz(o,e),{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:(s,a,c)=>{Bs(e,s,a,c)},remove:(s,a,c,d)=>{dN(e,s,a,c,d)},toggle:(s,a,c)=>{RE(e,s,a,c)},match:(s,a,c,d)=>hP(e,s,a,c,d),closest:s=>_P(e,s),matchAll:(s,a)=>bP(e,s,a),matchNode:(s,a,c,d)=>yP(e,s,a,c,d),canApply:s=>vP(e,s),formatChanged:(s,a,c,d)=>uN(e,o,s,a,c,d),getCssText:$t(oD,e)}},Up=e=>{switch(e.toLowerCase()){case"undo":case"redo":case"mcefocus":return!0;default:return!1}},Db=(e,t,o)=>{const s=Er(!1),a=_=>{B0(t,!1,o),t.add({},_)};e.on("init",()=>{t.add()}),e.on("BeforeExecCommand",_=>{const z=_.command;Up(z)||(EE(t,o),t.beforeChange())}),e.on("ExecCommand",_=>{const z=_.command;Up(z)||a(_)}),e.on("ObjectResizeStart cut",()=>{t.beforeChange()}),e.on("SaveContent ObjectResized blur",a),e.on("dragend",a),e.on("keyup",_=>{const z=_.keyCode;if(_.isDefaultPrevented())return;const I=Jo.os.isMacOS()&&_.key==="Meta";(z>=33&&z<=36||z>=37&&z<=40||z===45||_.ctrlKey||I)&&(a(),e.nodeChanged()),(z===46||z===8)&&e.nodeChanged(),s.get()&&t.typing&&!l1(i1(e),t.data[0])&&(e.isDirty()||e.setDirty(!0),e.dispatch("TypingUndo"),s.set(!1),e.nodeChanged())}),e.on("keydown",_=>{const z=_.keyCode;if(_.isDefaultPrevented())return;if(z>=33&&z<=36||z>=37&&z<=40||z===45){t.typing&&a(_);return}const I=_.ctrlKey&&!_.altKey||_.metaKey;if((z<16||z>20)&&z!==224&&z!==91&&!t.typing&&!I){t.beforeChange(),B0(t,!0,o),t.add({},_),s.set(!0);return}(Jo.os.isMacOS()?_.metaKey:_.ctrlKey&&!_.altKey)&&t.beforeChange()}),e.on("mousedown",_=>{t.typing&&a(_)});const c=_=>_.inputType==="insertReplacementText",d=_=>_.inputType==="insertText"&&_.data===null,h=_=>_.inputType==="insertFromPaste"||_.inputType==="insertFromDrop";e.on("input",_=>{_.inputType&&(c(_)||d(_)||h(_))&&a(_)}),e.on("AddUndo Undo Redo ClearUndos",_=>{_.isDefaultPrevented()||e.nodeChanged()})},nD=e=>{e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo")},sD=e=>{const t=Jr(),o=Er(0),s=Er(0),a={data:[],typing:!1,beforeChange:()=>{c1(e,o,t)},add:(c,d)=>cP(e,a,s,o,t,c,d),dispatchChange:()=>{e.setDirty(!0);const c=i1(e);c.bookmark=Jt(e.selection),e.dispatch("change",{level:c,lastLevel:ra(a.data,s.get()).getOrUndefined()})},undo:()=>dP(e,a,o,s),redo:()=>lN(e,s,a.data),clear:()=>{cN(e,a,s)},reset:()=>{jw(e,a)},hasUndo:()=>uP(e,a,s),hasRedo:()=>fP(e,a,s),transact:c=>mP(e,a,o,c),ignore:c=>{pP(e,o,c)},extra:(c,d)=>{gP(e,a,s,c,d)}};return Im(e)||Db(e,a,o),nD(e),a},rD=[9,27,Zt.HOME,Zt.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,Zt.DOWN,Zt.UP,Zt.LEFT,Zt.RIGHT].concat(Jo.browser.isFirefox()?[224]:[]),aD="data-mce-placeholder",iD=e=>e.type==="keydown"||e.type==="keyup",lD=e=>{const t=e.keyCode;return t===Zt.BACKSPACE||t===Zt.DELETE},rT=e=>{if(iD(e)){const t=e.keyCode;return!lD(e)&&(Zt.metaKeyPressed(e)||e.altKey||t>=112&&t<=123||mn(rD,t))}else return!1},cD=e=>iD(e)&&!(lD(e)||e.type==="keyup"&&e.keyCode===229),QP=(e,t,o)=>{if(e.isEmpty(t,void 0,{skipBogus:!1,includeZwsp:!0})){const s=t.firstElementChild;return s?e.getStyle(t.firstElementChild,"padding-left")||e.getStyle(t.firstElementChild,"padding-right")?!1:o===s.nodeName.toLowerCase():!0}else return!1},dD=e=>{var t;const o=e.dom,s=ji(e),a=(t=i2(e))!==null&&t!==void 0?t:"",c=(d,h)=>{if(rT(d))return;const _=e.getBody(),z=cD(d)?!1:QP(o,_,s);(o.getAttrib(_,aD)!==""!==z||h)&&(o.setAttrib(_,aD,z?a:null),VA(e,z),e.on(z?"keydown":"keyup",c),e.off(z?"keyup":"keydown",c))};Pn(a)&&e.on("init",d=>{c(d,!0),e.on("change SetContent ExecCommand",c),e.on("paste",h=>Vc.setEditorTimeout(e,()=>c(h)))})},e6=(e,t)=>({block:e,position:t}),aT=(e,t)=>({from:e,to:t}),iT=(e,t)=>{const o=ye.fromDom(e),s=ye.fromDom(t.container());return h0(o,s).map(a=>e6(a,t))},uD=e=>!(_a(e.to.block,e.from.block)||_a(e.from.block,e.to.block)),lT=e=>!kn(e.from.block,e.to.block),cT=(e,t)=>_r(t,a=>Bc(a)||Ml(a.dom),a=>kn(a,e)).filter(cr).getOr(e),dT=(e,t)=>{const o=ye.fromDom(e);return kn(cT(o,t.from.block),cT(o,t.to.block))},t6=e=>Ho(e.from.block.dom)===!1&&Ho(e.to.block.dom)===!1,fD=e=>{const t=o=>Rh(o)||qs(o.dom)||pm(o);return t(e.from.block)&&t(e.to.block)},o6=(e,t,o,s)=>$s(s.position.getNode())&&!ar(e,s.block)?Ry(!1,s.block.dom).bind(a=>a.isEqual(s.position)?dd(o,t,a).bind(c=>iT(t,c)):j.some(s)).getOr(s):s,mD=(e,t,o,s)=>{const a=iT(t,Ue.fromRangeStart(s)),c=a.bind(d=>dd(o,t,d.position).bind(h=>iT(t,h).map(_=>o6(e,t,o,_))));return va(a,c,aT).filter(d=>lT(d)&&dT(t,d)&&t6(d)&&fD(d)&&uD(d))},pD=(e,t,o,s)=>s.collapsed?mD(e,t,o,s):j.none(),n6=(e,t)=>{const o=xa(e);return rs(o,s=>t.isBlock(En(s))).fold(Ge(o),s=>o.slice(0,s))},gD=(e,t)=>{const o=n6(e,t);return Le(o,Jn),o},hD=(e,t,o)=>{const s=jc(o,t);return On(s.reverse(),a=>ar(e,a)).each(Jn)},s6=(e,t)=>rt(xc(t),o=>!ar(e,o)).length===0,r6=(e,t,o,s,a)=>{if(ar(s,o))return Lc(o),No(o.dom);s6(s,a)&&ar(s,t)&&Zs(a,ye.fromTag("br"));const c=Fc(o.dom,Ue.before(a.dom));return Le(gD(t,s),d=>{Zs(a,d)}),hD(s,e,t),c},Rb=(e,t)=>e.isInline(En(t)),bD=(e,t,o,s)=>{if(ar(s,o)){if(ar(s,t)){const d=ao((h=>{const _=(z,I)=>Ii(z).fold(()=>I,$=>Rb(s,$)?_($,I.concat(Ar($))):I);return _(h,[])})(o),(h,_)=>(Si(h,_),_),Au());xs(t),fr(t,d)}return Jn(o),No(t.dom)}const a=Vd(o.dom);return Le(gD(t,s),c=>{fr(o,c)}),hD(s,e,t),a},yD=(e,t)=>{const o=jc(t,e);return j.from(o[o.length-1])},vD=(e,t)=>_a(t,e)?yD(t,e):j.none(),_D=(e,t)=>{Ry(e,t.dom).bind(o=>j.from(o.getNode())).map(ye.fromDom).filter($d).each(Jn)},xD=(e,t,o,s)=>(_D(!0,t),_D(!1,o),vD(t,o).fold($t(bD,e,t,o,s),$t(r6,e,t,o,s))),Zp=(e,t,o,s,a)=>t?xD(e,s,o,a):xD(e,o,s,a),Gw=(e,t)=>{const o=ye.fromDom(e.getBody());return pD(e.schema,o.dom,t,e.selection.getRng()).map(a=>()=>{Zp(o,t,a.from.block,a.to.block,e.schema).each(c=>{e.selection.setRng(c.toRange())})})},Yw=(e,t,o)=>{const s=t.getRng();return va(h0(e,ye.fromDom(s.startContainer)),h0(e,ye.fromDom(s.endContainer)),(a,c)=>kn(a,c)?j.none():j.some(()=>{s.deleteContents(),Zp(e,!0,a,c,o).each(d=>{t.setRng(d.toRange())})})).getOr(j.none())},wD=(e,t)=>{const o=ye.fromDom(t),s=$t(kn,e);return ii(o,Bc,s).isSome()},kD=(e,t)=>wD(e,t.startContainer)||wD(e,t.endContainer),a6=(e,t)=>{const o=Fc(e.dom,Ue.fromRangeStart(t)).isNone(),s=Il(e.dom,Ue.fromRangeEnd(t)).isNone();return!kD(e,t)&&o&&s},i6=e=>j.some(()=>{e.setContent(""),e.selection.setCursorLocation()}),uT=e=>{const t=ye.fromDom(e.getBody()),o=e.selection.getRng();return a6(t,o)?i6(e):Yw(t,e.selection,e.schema)},fT=(e,t)=>e.selection.isCollapsed()?j.none():uT(e),gr=(e,t,o,s,a)=>j.from(t._selectionOverrides.showCaret(e,o,s,a)),l6=e=>{const t=e.ownerDocument.createRange();return t.selectNode(e),t},Z0=(e,t)=>e.dispatch("BeforeObjectSelected",{target:t}).isDefaultPrevented()?j.none():j.some(l6(t)),mT=(e,t,o)=>{const s=C2(1,e.getBody(),t),a=Ue.fromRangeStart(s),c=a.getNode();if(kv(c))return gr(1,e,c,!a.isAtEnd(),!1);const d=a.getNode(!0);if(kv(d))return gr(1,e,d,!1,!1);const h=Yd(e.dom.getRoot(),a.getNode());return kv(h)?gr(1,e,h,!1,o):j.none()},Xw=(e,t,o)=>t.collapsed?mT(e,t,o).getOr(t):t,pT=e=>Sa(e)||pb(e),c6=e=>Ef(e)||qy(e),d6=(e,t)=>{wt(t)&&t.data.length===0&&e.remove(t)},CD=(e,t,o,s,a,c)=>{gr(s,e,c.getNode(!a),a,!0).each(d=>{if(t.collapsed){const h=t.cloneRange();a?h.setEnd(d.startContainer,d.startOffset):h.setStart(d.endContainer,d.endOffset),h.deleteContents()}else t.deleteContents();e.selection.setRng(d)}),d6(e.dom,o)},u6=(e,t)=>{const o=e.selection.getRng();if(!wt(o.commonAncestorContainer))return j.none();const s=t?Oi.Forwards:Oi.Backwards,a=So(e.getBody()),c=$t(S2,t?a.next:a.prev),d=t?pT:c6,h=Av(s,e.getBody(),o),_=c(h),z=_&&Gd(t,_);if(!z||!Q_(h,z))return j.none();if(d(z))return j.some(()=>CD(e,o,h.getNode(),s,t,z));const I=c(z);return I&&d(I)&&Q_(z,I)?j.some(()=>CD(e,o,h.getNode(),s,t,I)):j.none()},gT=(e,t)=>u6(e,t),hT=(e,t)=>{const o=e.getBody();return t?No(o).filter(Sa):Vd(o).filter(Ef)},bT=e=>{const t=e.selection.getRng();return!t.collapsed&&(hT(e,!0).exists(o=>o.isEqual(Ue.fromRangeStart(t)))||hT(e,!1).exists(o=>o.isEqual(Ue.fromRangeEnd(t))))},m1=e=>Fe(e)&&(Bc(ye.fromDom(e))||pm(ye.fromDom(e))),Pa=zn.generate([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),f6=(e,t)=>{const o=t.getNode(!e),s=e?"after":"before";return no(o)&&o.getAttribute("data-mce-caret")===s},m6=(e,t,o,s,a)=>{const c=d=>a.isInline(d.nodeName.toLowerCase())&&!wm(o,s,e);return aA(!t,o).fold(()=>aA(t,s).fold(fn,c),c)},SD=(e,t,o,s,a)=>{const c=a.getNode(!o);return h0(ye.fromDom(t),ye.fromDom(s.getNode())).map(d=>ar(e,d)?Pa.remove(d.dom):Pa.moveToElement(c)).orThunk(()=>j.some(Pa.moveToElement(c)))},ED=(e,t,o,s)=>dd(t,e,o).bind(a=>m1(a.getNode())||m6(e,t,o,a,s)?j.none():t&&Ho(a.getNode())||!t&&Ho(a.getNode(!0))?SD(s,e,t,o,a):t&&Ef(o)||!t&&Sa(o)?j.some(Pa.moveToPosition(a)):j.none()),p6=(e,t)=>uo(t)?j.none():e&&Ho(t.nextSibling)?j.some(Pa.moveToElement(t.nextSibling)):!e&&Ho(t.previousSibling)?j.some(Pa.moveToElement(t.previousSibling)):j.none(),g6=(e,t,o)=>o.fold(s=>j.some(Pa.remove(s)),s=>j.some(Pa.moveToElement(s)),s=>wm(t,s,e)?j.none():j.some(Pa.moveToPosition(s))),h6=(e,t,o,s)=>f6(t,o)?p6(t,o.getNode(!t)).orThunk(()=>ED(e,t,o,s)):ED(e,t,o,s).bind(a=>g6(e,o,a)),b6=(e,t,o,s)=>{const a=C2(t?1:-1,e,o),c=Ue.fromRangeStart(a),d=ye.fromDom(e);return!t&&Ef(c)?j.some(Pa.remove(c.getNode(!0))):t&&Sa(c)?j.some(Pa.remove(c.getNode())):!t&&Sa(c)&&hb(d,c,s)?Fx(d,c,s).map(h=>Pa.remove(h.getNode())):t&&Ef(c)&&u0(d,c,s)?GO(d,c,s).map(h=>Pa.remove(h.getNode())):h6(e,t,c,s)},y6=(e,t)=>o=>(e._selectionOverrides.hideFakeCaret(),rl(e,t,ye.fromDom(o)),!0),v6=(e,t)=>o=>{const s=t?Ue.before(o):Ue.after(o);return e.selection.setRng(s.toRange()),!0},_6=e=>t=>(e.selection.setRng(t.toRange()),!0),TD=(e,t)=>j.from(Yd(e.getBody(),t)),x6=(e,t)=>{const o=e.selection.getNode();return TD(e,o).filter(Ho).fold(()=>b6(e.getBody(),t,e.selection.getRng(),e.schema).map(s=>()=>s.fold(y6(e,t),v6(e,t),_6(e))),()=>j.some(dt))},w6=e=>{Le(Mr(e,".mce-offscreen-selection"),Jn)},k6=(e,t)=>{const o=e.selection.getNode();return Ho(o)&&!ef(o)?TD(e,o.parentNode).filter(Ho).fold(()=>j.some(()=>{w6(ye.fromDom(e.getBody())),rl(e,t,ye.fromDom(e.selection.getNode())),Ux(e)}),()=>j.some(dt)):bT(e)?j.some(()=>{Zx(e,e.selection.getRng(),ye.fromDom(e.getBody()))}):j.none()},AD=e=>{const t=e.dom,o=e.selection,s=Yd(e.getBody(),o.getNode());if(Ml(s)&&t.isBlock(s)&&t.isEmpty(s)){const a=t.create("br",{"data-mce-bogus":"1"});t.setHTML(s,""),s.appendChild(a),o.setRng(Ue.before(a).toRange())}return!0},yT=(e,t)=>e.selection.isCollapsed()?x6(e,t):k6(e,t),OD=e=>e.hasOwnProperty("text"),zD=e=>e.hasOwnProperty("marker"),ND=(e,t)=>{const o=(c,d)=>{if(wt(c))return{text:c,offset:d};{const h=t(),_=c.childNodes;return d<_.length?(c.insertBefore(h,_[d]),{marker:h,before:!0}):(c.appendChild(h),{marker:h,before:!1})}},s=o(e.endContainer,e.endOffset);return{start:o(e.startContainer,e.startOffset),end:s}},DD=e=>{var t,o;const{start:s,end:a}=e,c=new window.Range;return OD(s)?c.setStart(s.text,s.offset):zD(s)&&(s.before?c.setStartBefore(s.marker):c.setStartAfter(s.marker),(t=s.marker.parentNode)===null||t===void 0||t.removeChild(s.marker)),OD(a)?c.setEnd(a.text,a.offset):zD(a)&&(a.before?c.setEndBefore(a.marker):c.setEndAfter(a.marker),(o=a.marker.parentNode)===null||o===void 0||o.removeChild(a.marker)),c},vT=(e,t)=>{var o;const s=e.dom,a=s.getParent(e.selection.getStart(),s.isBlock),c=s.getParent(e.selection.getEnd(),s.isBlock),d=e.getBody();if(((o=a==null?void 0:a.nodeName)===null||o===void 0?void 0:o.toLowerCase())==="div"&&a&&c&&a===d.firstChild&&c===d.lastChild&&!s.isEmpty(d)){const _=a.cloneNode(!1),z=()=>{if(t?VC(e):jx(e),d.firstChild!==a){const I=ND(e.selection.getRng(),()=>document.createElement("span"));Array.from(d.childNodes).forEach($=>_.appendChild($)),d.appendChild(_),e.selection.setRng(DD(I))}};return j.some(z)}return j.none()},C6=(e,t)=>{const o=Ue.fromRangeStart(e.selection.getRng());return dd(t,e.getBody(),o).filter(s=>t?jO(s):UO(s)).bind(s=>X_(t?0:-1,s)).map(s=>()=>e.selection.select(s))},_T=(e,t)=>e.selection.isCollapsed()?C6(e,t):j.none(),p1=wt,RD=e=>p1(e)&&e.data[0]===ua,MD=e=>p1(e)&&e.data[e.data.length-1]===ua,BD=e=>{var t;return((t=e.ownerDocument)!==null&&t!==void 0?t:document).createTextNode(ua)},S6=e=>{var t;if(p1(e.previousSibling))return MD(e.previousSibling)||e.previousSibling.appendData(ua),e.previousSibling;if(p1(e))return RD(e)||e.insertData(0,ua),e;{const o=BD(e);return(t=e.parentNode)===null||t===void 0||t.insertBefore(o,e),o}},E6=e=>{var t,o;if(p1(e.nextSibling))return RD(e.nextSibling)||e.nextSibling.insertData(0,ua),e.nextSibling;if(p1(e))return MD(e)||e.appendData(ua),e;{const s=BD(e);return e.nextSibling?(t=e.parentNode)===null||t===void 0||t.insertBefore(s,e.nextSibling):(o=e.parentNode)===null||o===void 0||o.appendChild(s),s}},Jw=(e,t)=>e?S6(t):E6(t),LD=$t(Jw,!0),T6=$t(Jw,!1),PD=(e,t)=>wt(e.container())?Jw(t,e.container()):Jw(t,e.getNode()),ID=(e,t)=>{const o=t.get();return o&&e.container()===o&&gm(o)},xT=(e,t)=>t.fold(o=>{kg(e.get());const s=LD(o);return e.set(s),j.some(Ue(s,s.length-1))},o=>No(o).map(s=>{if(ID(s,e)){const a=e.get();return Ue(a,1)}else{kg(e.get());const a=PD(s,!0);return e.set(a),Ue(a,1)}}),o=>Vd(o).map(s=>{if(ID(s,e)){const a=e.get();return Ue(a,a.length-1)}else{kg(e.get());const a=PD(s,!1);return e.set(a),Ue(a,a.length-1)}}),o=>{kg(e.get());const s=T6(o);return e.set(s),j.some(Ue(s,1))}),FD=(e,t)=>{for(let o=0;o{const o=Cg(t,e);return o||e},A6=(e,t,o)=>{const s=p3(o),a=$D(t,s.container());return Ig(e,a,s).fold(()=>Il(a,s).bind($t(Ig,e,a)).map(c=>$l.before(c)),j.none)},HD=(e,t)=>Sg(e,t)===null,VD=(e,t,o)=>Ig(e,t,o).filter($t(HD,t)),O6=(e,t,o)=>{const s=Jy(o);return VD(e,t,s).bind(a=>Fc(a,s).isNone()?j.some($l.start(a)):j.none())},z6=(e,t,o)=>{const s=p3(o);return VD(e,t,s).bind(a=>Il(a,s).isNone()?j.some($l.end(a)):j.none())},N6=(e,t,o)=>{const s=Jy(o),a=$D(t,s.container());return Ig(e,a,s).fold(()=>Fc(a,s).bind($t(Ig,e,a)).map(c=>$l.after(c)),j.none)},jD=e=>!p0(wT(e)),Fm=(e,t,o)=>FD([A6,O6,z6,N6],[e,t,o]).filter(jD),wT=e=>e.fold(To,To,To,To),UD=e=>e.fold(Ge("before"),Ge("start"),Ge("end"),Ge("after")),W0=e=>e.fold($l.before,$l.before,$l.after,$l.after),Qw=e=>e.fold($l.start,$l.start,$l.end,$l.end),D6=(e,t)=>UD(e)===UD(t)&&wT(e)===wT(t),ZD=(e,t,o,s,a,c)=>va(Ig(t,o,s),Ig(t,o,a),(d,h)=>d!==h&&m3(o,d,h)?$l.after(e?d:h):c).getOr(c),R6=(e,t)=>e.fold(zo,o=>!D6(o,t)),M6=(e,t,o,s,a)=>{const c=Gd(e,a);return dd(e,o,c).map($t(Gd,e)).fold(()=>s.map(W0),_=>Fm(t,o,_).map($t(ZD,e,t,o,c,_)).filter($t(R6,s))).filter(jD)},B6=(e,t)=>e?t.fold(Kt(j.some,$l.start),j.none,Kt(j.some,$l.after),j.none):t.fold(j.none,Kt(j.some,$l.before),j.none,Kt(j.some,$l.end)),L6=(e,t,o,s)=>{const a=Gd(e,s),c=Fm(t,o,a);return Fm(t,o,a).bind($t(B6,e)).orThunk(()=>M6(e,t,o,c,s))},P6=e=>Gt(e.selection.getSel().modify),WD=(e,t,o)=>{const s=e?1:-1;return t.setRng(Ue(o.container(),o.offset()+s).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},kT=(e,t)=>{const o=t.selection.getRng(),s=e?Ue.fromRangeEnd(o):Ue.fromRangeStart(o);return P6(t)?e&&Lh(s)?WD(!0,t.selection,s):!e&&hy(s)?WD(!1,t.selection,s):!1:!1};var $u;(function(e){e[e.Br=0]="Br",e[e.Block=1]="Block",e[e.Wrap=2]="Wrap",e[e.Eol=3]="Eol"})($u||($u={}));const ek=(e,t)=>e===Oi.Backwards?sa(t):t,qD=(e,t,o)=>e===Oi.Forwards?t.next(o):t.prev(o),I6=(e,t,o,s)=>$s(s.getNode(t===Oi.Forwards))?$u.Br:wm(o,s)===!1?$u.Block:$u.Wrap,KD=(e,t,o,s)=>{const a=So(o);let c=s;const d=[];for(;c;){const h=qD(t,a,c);if(!h)break;if($s(h.getNode(!1)))return t===Oi.Forwards?{positions:ek(t,d).concat([h]),breakType:$u.Br,breakAt:j.some(h)}:{positions:ek(t,d),breakType:$u.Br,breakAt:j.some(h)};if(!h.isVisible()){c=h;continue}if(e(c,h)){const _=I6(o,t,c,h);return{positions:ek(t,d),breakType:_,breakAt:j.some(h)}}d.push(h),c=h}return{positions:ek(t,d),breakType:$u.Eol,breakAt:j.none()}},GD=(e,t,o,s)=>t(o,s).breakAt.map(a=>{const c=t(o,a).positions;return e===Oi.Backwards?c.concat(a):[a].concat(c)}).getOr([]),CT=(e,t)=>ko(e,(o,s)=>o.fold(()=>j.some(s),a=>va(St(a.getClientRects()),St(s.getClientRects()),(c,d)=>{const h=Math.abs(t-c.left);return Math.abs(t-d.left)<=h?s:a}).or(o)),j.none()),tk=(e,t)=>St(t.getClientRects()).bind(o=>CT(e,o.left)),q0=$t(KD,Ue.isAbove,-1),K0=$t(KD,Ue.isBelow,1),YD=$t(GD,-1,q0),ok=$t(GD,1,K0),XD=(e,t)=>q0(e,t).breakAt.isNone(),JD=(e,t)=>K0(e,t).breakAt.isNone(),F6=e=>No(e).map(t=>[t].concat(K0(e,t).positions)).getOr([]),QD=e=>Vd(e).map(t=>q0(e,t).positions.concat(t)).getOr([]),Mb=(e,t)=>tk(YD(e,t),t),$6=(e,t)=>tk(ok(e,t),t),H6=Ho,eR=(e,t)=>Math.abs(e.left-t),uc=(e,t)=>Math.abs(e.right-t),tR=e=>$a(e,"node"),oR=(e,t)=>_i(e,(o,s)=>{const a=Math.min(eR(o,t),uc(o,t)),c=Math.min(eR(s,t),uc(s,t));return c===a&&tR(s)&&H6(s.node)||c{const t=o=>dn(o,s=>{const a=uf(s);return a.node=e,a});if(no(e))return t(e.getClientRects());if(wt(e)){const o=e.ownerDocument.createRange();return o.setStart(e,0),o.setEnd(e,e.data.length),t(o.getClientRects())}else return[]},nR=e=>Ln(e,V6);var G0;(function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"})(G0||(G0={}));const j6=(e,t,o,s)=>{let a=s;for(;a=Sv(a,e,Vh,t);)if(o(a))return},ST=(e,t,o,s,a,c)=>{let d=0;const h=[],_=$=>{let V=nR([$]);e===-1&&(V=V.reverse());for(let ee=0;ee0&&t(le,ga(h))&&d++,le.line=d,a(le))return!0;h.push(le)}}return!1},z=ga(c.getClientRects());if(!z)return h;const I=c.getNode();return I&&(_(I),j6(e,s,_,I)),h},U6=(e,t)=>t.line>e,Z6=(e,t)=>t.line===e,W6=$t(ST,G0.Up,pf,Ep),q6=$t(ST,G0.Down,Ep,pf),sR=e=>ga(e.getClientRects()),g1=(e,t,o,s)=>{const a=So(t);let c,d,h,_;const z=[];let I=0;e===1?(c=a.next,d=Ep,h=pf,_=Ue.after(s)):(c=a.prev,d=pf,h=Ep,_=Ue.before(s));const $=sR(_);do{if(!_.isVisible())continue;const V=sR(_);if(h(V,$))continue;z.length>0&&d(V,ga(z))&&I++;const ee=uf(V);if(ee.position=_,ee.line=I,o(ee))return z;z.push(ee)}while(_=c(_));return z},ET=e=>t=>U6(e,t),h1=e=>t=>Z6(e,t),Of=(e,t)=>{e.selection.setRng(t),Zd(e,e.selection.getRng())},nk=(e,t,o)=>j.some(Xw(e,t,o)),TT=(e,t,o,s,a,c)=>{const d=t===Oi.Forwards,h=So(e.getBody()),_=$t(S2,d?h.next:h.prev),z=d?s:a;if(!o.collapsed){const le=yg(o);if(c(le))return gr(t,e,le,t===Oi.Backwards,!1);if(bT(e)){const oe=o.cloneRange();return oe.collapse(t===Oi.Backwards),j.from(oe)}}const I=Av(t,e.getBody(),o);if(z(I))return Z0(e,I.getNode(!d));let $=_(I);const V=Sp(o);if($)$=Gd(d,$);else return V?j.some(o):j.none();if(z($))return gr(t,e,$.getNode(!d),d,!1);const ee=_($);return ee&&z(ee)&&Q_($,ee)?gr(t,e,ee.getNode(!d),d,!1):V?nk(e,$.toRange(),!1):j.none()},rR=(e,t,o,s,a,c)=>{const d=Av(t,e.getBody(),o),h=ga(d.getClientRects()),_=t===G0.Down,z=e.getBody();if(!h)return j.none();if(bT(e)){const fe=_?Ue.fromRangeEnd(o):Ue.fromRangeStart(o);return(_?$6:Mb)(z,fe).orThunk(()=>j.from(fe)).map(Oe=>Oe.toRange())}const $=(_?q6:W6)(z,ET(1),d),V=rt($,h1(1)),ee=h.left,le=oR(V,ee);if(le&&c(le.node)){const fe=Math.abs(ee-le.left),ke=Math.abs(ee-le.right);return gr(t,e,le.node,feXw(e,fe.toRange(),!1)):j.none()},sk=(e,t)=>{const o=e.selection.getRng(),s=t?Ue.fromRangeEnd(o):Ue.fromRangeStart(o),a=vM(s.container(),e.getBody());if(t){const c=K0(a,s);return Vo(c.positions)}else{const c=q0(a,s);return St(c.positions)}},aR=(e,t,o)=>sk(e,t).filter(o).exists(s=>(e.selection.setRng(s.toRange()),!0)),Y0=(e,t)=>{const o=e.dom.createRng();o.setStart(t.container(),t.offset()),o.setEnd(t.container(),t.offset()),e.selection.setRng(o)},AT=(e,t)=>{e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},OT=(e,t,o)=>xT(t,o).map(s=>(Y0(e,s),o)),iR=(e,t,o)=>{const s=Ue.fromRangeStart(e);if(e.collapsed)return s;{const a=Ue.fromRangeEnd(e);return o?Fc(t,a).getOr(a):Il(t,s).getOr(s)}},lR=(e,t,o)=>{const s=e.getBody(),a=iR(e.selection.getRng(),s,o),c=$t(yb,e);return L6(o,c,s,a).bind(h=>OT(e,t,h))},cR=(e,t,o)=>{const s=dn(Mr(ye.fromDom(t.getRoot()),'*[data-mce-selected="inline-boundary"]'),d=>d.dom),a=rt(s,e),c=rt(o,e);Le(os(a,c),$t(AT,!1)),Le(os(c,a),$t(AT,!0))},zT=(e,t)=>{const o=t.get();if(e.selection.isCollapsed()&&!e.composing&&o){const s=Ue.fromRangeStart(e.selection.getRng());Ue.isTextPosition(s)&&!$C(s)&&(Y0(e,hM(o,s)),t.set(null))}},dR=(e,t,o,s)=>{if(t.selection.isCollapsed()){const a=rt(s,e);Le(a,c=>{const d=Ue.fromRangeStart(t.selection.getRng());Fm(e,t.getBody(),d).bind(h=>OT(t,o,h))})}},NT=(e,t,o)=>zy(e)?lR(e,t,o).isSome():!1,DT=(e,t,o)=>zy(t)?kT(e,t):!1,uR=e=>{const t=Er(null),o=$t(yb,e);return e.on("NodeChange",s=>{zy(e)&&(cR(o,e.dom,s.parents),zT(e,t),dR(o,e,t,s.parents))}),t},fR=$t(DT,!0),mR=$t(DT,!1),X0=(e,t,o)=>{if(zy(e)){const s=sk(e,t).getOrThunk(()=>{const a=e.selection.getRng();return t?Ue.fromRangeEnd(a):Ue.fromRangeStart(a)});return Fm($t(yb,e),e.getBody(),s).exists(a=>{const c=W0(a);return xT(o,c).exists(d=>(Y0(e,d),!0))})}else return!1},RT=(e,t)=>{const o=document.createRange();return o.setStart(e.container(),e.offset()),o.setEnd(t.container(),t.offset()),o},MT=e=>va(No(e),Vd(e),(t,o)=>{const s=Gd(!0,t),a=Gd(!1,o);return Il(e,s).forall(c=>c.isEqual(a))}).getOr(!0),J0=(e,t)=>o=>xT(t,o).map(s=>()=>Y0(e,s)),BT=(e,t,o,s)=>{const a=e.getBody(),c=$t(yb,e);e.undoManager.ignore(()=>{e.selection.setRng(RT(o,s)),jx(e),Fm(c,a,Ue.fromRangeStart(e.selection.getRng())).map(Qw).bind(J0(e,t)).each(cn)}),e.nodeChanged()},pR=(e,t)=>{const o=Cg(t,e);return o||e},gR=(e,t,o,s)=>{const a=pR(e.getBody(),s.container()),c=$t(yb,e),d=Fm(c,a,s);return d.bind(_=>o?_.fold(Ge(j.some(Qw(_))),j.none,Ge(j.some(W0(_))),j.none):_.fold(j.none,Ge(j.some(W0(_))),j.none,Ge(j.some(Qw(_))))).map(J0(e,t)).getOrThunk(()=>{const _=tb(o,a,s),z=_.bind(I=>Fm(c,a,I));return va(d,z,()=>Ig(c,a,s).bind(I=>MT(I)?j.some(()=>{rl(e,o,ye.fromDom(I))}):j.none())).getOrThunk(()=>z.bind(()=>_.map(I=>()=>{o?BT(e,t,s,I):BT(e,t,I,s)})))})},Q0=(e,t,o)=>{if(e.selection.isCollapsed()&&zy(e)){const s=Ue.fromRangeStart(e.selection.getRng());return gR(e,t,o,s)}return j.none()},hR=e=>Xc(e)>1,LT=(e,t)=>{const o=ye.fromDom(e.getBody()),s=ye.fromDom(e.selection.getStart()),a=jc(s,o);return rs(a,t).fold(Ge(a),c=>a.slice(0,c))},bR=e=>Xc(e)===1,K6=e=>LT(e,t=>e.schema.isBlock(En(t))||hR(t)),yR=e=>LT(e,t=>e.schema.isBlock(En(t))),PT=(e,t)=>{const o=$t(t1,e);return Ln(t,s=>o(s)?[s.dom]:[])},e_=e=>{const t=yR(e);return PT(e,t)},vR=(e,t,o,s)=>{const a=PT(t,s);if(a.length===0)rl(t,e,o);else{const c=CS(o.dom,a);t.selection.setRng(c.toRange())}},_R=(e,t)=>{const o=rt(K6(e),bR);return Vo(o).bind(s=>{const a=Ue.fromRangeStart(e.selection.getRng());return b3(t,a,s.dom)&&!cx(s)?j.some(()=>vR(t,e,s,o)):j.none()})},IT=(e,t)=>{const o=t.parentElement;return $s(t)&&!ot(o)&&e.dom.isEmpty(o)},G6=e=>cx(ye.fromDom(e)),FT=(e,t)=>{const o=e.selection.getStart(),s=IT(e,o)||G6(o)?CS(o,t):nL(e.selection.getRng(),t);e.selection.setRng(s.toRange())},Y6=(e,t)=>{const o=os(t,e_(e));o.length>0&&FT(e,o)},$T=e=>wt(e.startContainer),xR=e=>e.startOffset===0&&$T(e),X6=(e,t)=>{const o=t.startContainer.parentElement;return!ot(o)&&t1(e,ye.fromDom(o))},J6=e=>{const t=e.startContainer.parentNode,o=e.endContainer.parentNode;return!ot(t)&&!ot(o)&&t.isEqualNode(o)},n=e=>{const t=e.endContainer;return e.endOffset===(wt(t)?t.length:t.childNodes.length)},r=e=>J6(e)&&n(e),i=e=>!e.endContainer.isEqualNode(e.commonAncestorContainer),l=e=>r(e)||i(e),u=e=>{const t=e.selection.getRng();return xR(t)&&X6(e,t)&&l(t)},f=e=>{if(u(e)){const t=e_(e);return j.some(()=>{jx(e),Y6(e,t)})}else return j.none()},p=(e,t)=>e.selection.isCollapsed()?_R(e,t):f(e),y=(e,t)=>fh(e,o=>ud(o.dom),o=>t.isBlock(En(o))),v=e=>y(ye.fromDom(e.selection.getStart()),e.schema),C=e=>{const t=e.selection.getRng();return t.collapsed&&($T(t)||e.dom.isEmpty(t.startContainer))&&!v(e)},O=e=>(C(e)&&FT(e,[]),!0),T=(e,t,o)=>Fe(o)?j.some(()=>{e._selectionOverrides.hideFakeCaret(),rl(e,t,ye.fromDom(o))}):j.none(),R=(e,t)=>{const o=t?pb:qy,s=t?Oi.Forwards:Oi.Backwards,a=Av(s,e.getBody(),e.selection.getRng());return o(a)?T(e,t,a.getNode(!t)):j.from(Gd(t,a)).filter(c=>o(c)&&Q_(a,c)).bind(c=>T(e,t,c.getNode(!t)))},F=(e,t)=>{const o=e.selection.getNode();return Xe(o)?T(e,t,o):j.none()},H=(e,t)=>e.selection.isCollapsed()?R(e,t):F(e,t),G=e=>_r(e,t=>Ml(t.dom)||Ho(t.dom)).exists(t=>Ml(t.dom)),J=e=>Vr(e??"").getOr(0),ae=(e,t)=>{const o=e||Dh(t)?"margin":"padding",s=ur(t,"direction")==="rtl"?"-right":"-left";return o+s},X=(e,t,o,s,a,c)=>{const d=ae(o,ye.fromDom(c)),h=J(e.getStyle(c,d));if(t==="outdent"){const _=Math.max(0,h-s);e.setStyle(c,d,_?_+a:"")}else{const _=h+s+a;e.setStyle(c,d,_)}},Y=(e,t)=>Hs(t,o=>{const s=ae(E4(e),o),a=Us(o,s).map(J).getOr(0);return e.dom.getContentEditable(o.dom)!=="false"&&a>0}),ne=e=>{const t=we(e);return!e.mode.isReadOnly()&&(t.length>1||Y(e,t))},ie=e=>Mh(e)||pm(e),de=e=>ia(e).exists(ie),we=e=>rt(ci(e.selection.getSelectedBlocks()),t=>!ie(t)&&!de(t)&&G(t)),ze=(e,t)=>{var o,s;const{dom:a}=e,c=cd(e),d=(s=(o=/[a-z%]+$/i.exec(c))===null||o===void 0?void 0:o[0])!==null&&s!==void 0?s:"px",h=J(c),_=E4(e);Le(we(e),z=>{X(a,t,_,h,d,z.dom)})},tt=e=>ze(e,"indent"),Je=e=>ze(e,"outdent"),Ze=e=>{if(e.selection.isCollapsed()&&ne(e)){const t=e.dom,o=e.selection.getRng(),s=Ue.fromRangeStart(o),a=t.getParent(o.startContainer,t.isBlock);if(a!==null&&Ix(ye.fromDom(a),s,e.schema))return j.some(()=>Je(e))}return j.none()},kt=(e,t,o)=>Kr([Ze,yT,gT,(s,a)=>Q0(s,t,a),Gw,Fp,_T,H,fT,p,vT],s=>s(e,o)).filter(s=>e.selection.isEditable()),Wt=(e,t)=>{kt(e,t,!1).fold(()=>{e.selection.isEditable()&&(jx(e),Ux(e))},cn)},ro=(e,t)=>{kt(e,t,!0).fold(()=>{e.selection.isEditable()&&VC(e)},cn)},yo=(e,t)=>{e.addCommand("delete",()=>{Wt(e,t)}),e.addCommand("forwardDelete",()=>{ro(e,t)})},$o=5,xn=400,Ls=e=>e.touches===void 0||e.touches.length!==1?j.none():j.some(e.touches[0]),Xs=(e,t)=>{const o=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y);return o>$o||s>$o},on=e=>{const t=Jr(),o=Er(!1),s=pg(a=>{e.dispatch("longpress",{...a,type:"longpress"}),o.set(!0)},xn);e.on("touchstart",a=>{Ls(a).each(c=>{s.cancel();const d={x:c.clientX,y:c.clientY,target:a.target};s.throttle(a),o.set(!1),t.set(d)})},!0),e.on("touchmove",a=>{s.cancel(),Ls(a).each(c=>{t.on(d=>{Xs(c,d)&&(t.clear(),o.set(!1),e.dispatch("longpresscancel"))})})},!0),e.on("touchend touchcancel",a=>{s.cancel(),a.type!=="touchcancel"&&t.get().filter(c=>c.target.isEqualNode(a.target)).each(()=>{o.get()?a.preventDefault():e.dispatch("tap",{...a,type:"tap"})})},!0)},Rn=(e,t)=>Ro(e,t.nodeName),Co=(e,t)=>wt(t)?!0:no(t)?!Rn(e.getBlockElements(),t)&&!fd(t)&&!zc(e,t)&&!Qr(t):!1,Js=(e,t,o)=>Bn(ic(ye.fromDom(o),ye.fromDom(t)),s=>Rn(e,s.dom)),ms=(e,t)=>{if(wt(t)){if(t.data.length===0)return!0;if(/^\s+$/.test(t.data))return!t.nextSibling||Rn(e,t.nextSibling)||Qr(t.nextSibling)}return!1},Ni=e=>e.dom.create(ji(e),hv(e)),Di=e=>{const t=e.dom,o=e.selection,s=e.schema,a=s.getBlockElements(),c=o.getStart(),d=e.getBody();let h,_,z=null;const I=ji(e);if(!c||!no(c))return;const $=d.nodeName.toLowerCase();if(!s.isValidChild($,I.toLowerCase())||Js(a,d,c))return;if(d.firstChild===d.lastChild&&$s(d.firstChild)){h=Ni(e),h.appendChild(Au().dom),d.replaceChild(h,d.firstChild),e.selection.setCursorLocation(h,0),e.nodeChanged();return}let V=d.firstChild;for(;V;)if(no(V)&&Qn(s,V),Co(s,V)){if(ms(a,V)){_=V,V=V.nextSibling,t.remove(_);continue}if(!h){if(!z&&e.hasFocus()&&(z=ND(e.selection.getRng(),()=>document.createElement("span"))),!V.parentNode){V=null;break}h=Ni(e),d.insertBefore(h,V)}_=V,V=V.nextSibling,h.appendChild(_)}else h=null,V=V.nextSibling;z&&(e.selection.setRng(DD(z)),e.nodeChanged())},Ia=(e,t,o)=>{const s=ye.fromDom(Ni(e)),a=Au();fr(s,a),o(t,s);const c=document.createRange();return c.setStartBefore(a.dom),c.setEndBefore(a.dom),c},Ea=e=>{e.on("NodeChange",()=>Di(e))},Wp=e=>t=>(" "+t.attr("class")+" ").indexOf(e)!==-1,b1=(e,t,o)=>function(s){const a=arguments,c=a[a.length-2],d=c>0?t.charAt(c-1):"";if(d==='"')return s;if(d===">"){const h=t.lastIndexOf("<",c);if(h!==-1&&t.substring(h,c).indexOf('contenteditable="false"')!==-1)return s}return''+e.dom.encode(typeof a[1]=="string"?a[1]:a[0])+""},Qg=(e,t,o)=>{let s=t.length,a=o.content;if(o.format!=="raw"){for(;s--;)a=a.replace(t[s],b1(e,a,Xh(e)));o.content=a}},qp=(e,t)=>Hs(e,o=>{const s=t.match(o);return s!==null&&s[0].length===t.length}),t_=e=>{const t="contenteditable",o=" "+zt.trim(cM(e))+" ",s=" "+zt.trim(Xh(e))+" ",a=Wp(o),c=Wp(s),d=$4(e);d.length>0&&e.on("BeforeSetContent",h=>{Qg(e,d,h)}),e.parser.addAttributeFilter("class",h=>{let _=h.length;for(;_--;){const z=h[_];a(z)?z.attr(t,"true"):c(z)&&z.attr(t,"false")}}),e.serializer.addAttributeFilter(t,h=>{let _=h.length;for(;_--;){const z=h[_];if(!a(z)&&!c(z))continue;const I=z.attr("data-mce-content");d.length>0&&I?qp(d,I)?(z.name="#text",z.type=3,z.raw=!0,z.value=I):z.remove():z.attr(t,null)}})},eh=e=>nt(ye.fromDom(e.getBody()),"*[data-mce-caret]").map(t=>t.dom).getOrNull(),$m=(e,t)=>{t.hasAttribute("data-mce-caret")&&(Cp(t),e.selection.setRng(e.selection.getRng()),e.selection.scrollIntoView(t))},Bb=(e,t)=>{const o=eh(e);if(o){if(t.type==="compositionstart"){t.preventDefault(),t.stopPropagation(),$m(e,o);return}py(o)&&($m(e,o),e.undoManager.add())}},Lb=e=>{e.on("keyup compositionstart",$t(Bb,e))},y1=Ho,rk=(e,t,o)=>TT(t,e,o,Sa,Ef,y1),o_=(e,t,o)=>rR(t,e,o,c=>Sa(c)||ZO(c),c=>Ef(c)||Ky(c),y1),th=e=>{const t=e.dom.create(ji(e));return t.innerHTML='
    ',t},Hm=(e,t,o)=>{const s=So(e.getBody()),a=$t(S2,t===1?s.next:s.prev);if(o.collapsed){const c=e.dom.getParent(o.startContainer,"PRE");if(!c)return;if(!a(Ue.fromRangeStart(o))){const h=ye.fromDom(th(e));t===1?Ne(ye.fromDom(c),h):Zs(ye.fromDom(c),h),e.selection.select(h.dom,!0),e.selection.collapse()}}},Kp=(e,t)=>{const o=t?Oi.Forwards:Oi.Backwards,s=e.selection.getRng();return rk(o,e,s).orThunk(()=>(Hm(e,o,s),j.none()))},n_=(e,t)=>{const o=t?1:-1,s=e.selection.getRng();return o_(o,e,s).orThunk(()=>(Hm(e,o,s),j.none()))},s_=(e,t)=>{const o=t?e.getEnd(!0):e.getStart(!0);return p0(o)?!t:t},Kn=(e,t)=>Kp(e,s_(e.selection,t)).exists(o=>(Of(e,o),!0)),Vm=(e,t)=>n_(e,t).exists(o=>(Of(e,o),!0)),Hu=(e,t)=>aR(e,t,t?Ef:Sa),Pb=(e,t)=>hT(e,!t).map(o=>{const s=o.toRange(),a=e.selection.getRng();return t?s.setStart(a.startContainer,a.startOffset):s.setEnd(a.endContainer,a.endOffset),s}).exists(o=>(Of(e,o),!0)),ak=e=>mn(["figcaption"],En(e)),Gp=(e,t,o)=>{const s=$t(kn,t);return _r(ye.fromDom(e.container()),a=>o.isBlock(En(a)),s).filter(ak)},v1=(e,t,o)=>t?JD(e.dom,o):XD(e.dom,o),HT=(e,t)=>{const o=ye.fromDom(e.getBody()),s=Ue.fromRangeStart(e.selection.getRng());return Gp(s,o,e.schema).exists(()=>{if(v1(o,t,s)){const c=Ia(e,o,t?fr:Wa);return e.selection.setRng(c),!0}else return!1})},ik=(e,t)=>e.selection.isCollapsed()?HT(e,t):!1,Q6=(e,t,o)=>{const s=e.selection.getRng(),a=Ue.fromRangeStart(s);return e.getBody().firstChild===t&&XD(o,a)?(e.execCommand("InsertNewBlockBefore"),!0):!1},_1=(e,t)=>{const o=e.selection.getRng(),s=Ue.fromRangeStart(o);return e.getBody().lastChild===t&&JD(t,s)?(e.execCommand("InsertNewBlockAfter"),!0):!1},eI=(e,t)=>t?j.from(e.dom.getParent(e.selection.getNode(),"details")).map(o=>_1(e,o)).getOr(!1):j.from(e.dom.getParent(e.selection.getNode(),"summary")).bind(o=>j.from(e.dom.getParent(o,"details")).map(s=>Q6(e,s,o))).getOr(!1),il=(e,t)=>eI(e,t),Ib={shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0},tI=e=>dn(e,t=>({...Ib,...t})),wR=e=>dn(e,t=>({...Ib,...t})),lk=(e,t)=>t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey,kR=(e,t)=>Ln(tI(e),o=>lk(o,t)?[o]:[]),CR=(e,t)=>Ln(wR(e),o=>lk(o,t)?[o]:[]),jo=(e,...t)=>()=>e.apply(null,t),oh=(e,t)=>On(kR(e,t),o=>o.action()),ck=(e,t)=>Kr(CR(e,t),o=>o.action()),nh=(e,t)=>{const o=t?Oi.Forwards:Oi.Backwards,s=e.selection.getRng();return TT(e,o,s,pb,qy,Xe).exists(a=>(Of(e,a),!0))},x1=(e,t)=>{const o=t?1:-1,s=e.selection.getRng();return rR(e,o,s,pb,qy,Xe).exists(a=>(Of(e,a),!0))},VT=(e,t)=>aR(e,t,t?qy:pb),jT=zn.generate([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),tu={...jT,none:e=>jT.none(e)},SR=(e,t)=>ZT(e,t,zo),ZT=(e,t,o)=>Ln(xa(e),s=>ls(s,t)?o(s)?[s]:[]:ZT(s,t,o)),ER=(e,t,o=fn)=>{if(o(t))return j.none();if(mn(e,En(t)))return j.some(t);const s=a=>ls(a,"table")||o(a);return Tl(t,e.join(","),s)},TR=(e,t)=>ER(["td","th"],e,t),oI=e=>SR(e,"th,td"),Ie=(e,t)=>Xr(e,"table",t),vo=(e,t,o,s,a=zo)=>{const c=s===1;if(!c&&o<=0)return tu.first(e[0]);if(c&&o>=e.length-1)return tu.last(e[e.length-1]);{const d=o+s,h=e[d];return a(h)?tu.middle(t,h):vo(e,t,d,s,a)}},Zo=(e,t)=>Ie(e,t).bind(o=>{const s=oI(o);return rs(s,c=>kn(e,c)).map(c=>({index:c,all:s}))}),Ps=(e,t,o)=>Zo(e,o).fold(()=>tu.none(e),a=>vo(a.all,e,a.index,1,t)),Or=(e,t,o)=>Zo(e,o).fold(()=>tu.none(),a=>vo(a.all,e,a.index,-1,t)),Wr=e=>N_(e).filter(t=>t.trim().length!==0||t.indexOf(da)>-1).isSome(),Ir=e=>ai(e)&&Da(e,"contenteditable")==="false",ma=["img","br"],w1=e=>Wr(e)||mn(ma,En(e))||Ir(e),nI=e=>ca(e,w1),AR=(e,t)=>({left:e.left-t,top:e.top-t,right:e.right+t*2,bottom:e.bottom+t*2,width:e.width+t,height:e.height+t}),c8=(e,t)=>Ln(t,o=>{const s=AR(uf(o.getBoundingClientRect()),-1);return[{x:s.left,y:e(s),cell:o},{x:s.right,y:e(s),cell:o}]}),A9=(e,t,o)=>ko(e,(s,a)=>s.fold(()=>j.some(a),c=>{const d=Math.sqrt(Math.abs(c.x-t)+Math.abs(c.y-o)),h=Math.sqrt(Math.abs(a.x-t)+Math.abs(a.y-o));return j.some(h{const c=Mr(ye.fromDom(o),"td,th,caption").map(h=>h.dom),d=rt(c8(e,c),h=>t(h,a));return A9(d,s,a).map(h=>h.cell)},O9=e=>e.bottom,z9=e=>e.top,N9=(e,t)=>e.ye.y>t,R9=$t(d8,O9,N9),M9=$t(d8,z9,D9),B9=(e,t)=>St(t.getClientRects()).bind(o=>R9(e,o.left,o.top)).bind(o=>tk(QD(o),t)),L9=(e,t)=>Vo(t.getClientRects()).bind(o=>M9(e,o.left,o.top)).bind(o=>tk(F6(o),t)),P9=(e,t,o)=>o.breakAt.exists(s=>e(t,s).breakAt.isSome()),I9=e=>e.breakType===$u.Wrap&&e.positions.length===0,F9=e=>e.breakType===$u.Br&&e.positions.length===1,u8=(e,t,o)=>{const s=e(t,o);return I9(s)||!$s(o.getNode())&&F9(s)?!P9(e,t,s):s.breakAt.isNone()},$9=$t(u8,q0),H9=$t(u8,K0),V9=(e,t,o)=>{const s=Ue.fromRangeStart(t);return Ry(!e,o).exists(a=>a.isEqual(s))},j9=(e,t,o,s)=>{const a=e.selection.getRng(),c=t?1:-1;return _2()&&V9(t,a,o)?(gr(c,e,o,!t,!1).each(d=>{Of(e,d)}),!0):!1},U9=(e,t,o)=>B9(t,o).orThunk(()=>St(o.getClientRects()).bind(s=>CT(YD(e,Ue.before(t)),s.left))).getOr(Ue.before(t)),Z9=(e,t,o)=>L9(t,o).orThunk(()=>St(o.getClientRects()).bind(s=>CT(ok(e,Ue.after(t)),s.left))).getOr(Ue.after(t)),f8=(e,t)=>{const o=t.getNode(e);return tc(o)?j.some(o):j.none()},W9=(e,t,o)=>{t.undoManager.transact(()=>{const s=e?Ne:Zs,a=Ia(t,ye.fromDom(o),s);Of(t,a)})},m8=(e,t,o)=>{const s=f8(!!t,o),a=t===!1;s.fold(()=>Of(e,o.toRange()),c=>Ry(a,e.getBody()).filter(d=>d.isEqual(o)).fold(()=>Of(e,o.toRange()),d=>W9(t,e,c)))},q9=(e,t,o,s)=>{const a=e.selection.getRng(),c=Ue.fromRangeStart(a),d=e.getBody();if(!t&&$9(s,c)){const h=U9(d,o,c);return m8(e,t,h),!0}else if(t&&H9(s,c)){const h=Z9(d,o,c);return m8(e,t,h),!0}else return!1},p8=(e,t,o)=>j.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind(s=>j.from(e.dom.getParent(s,"table")).map(a=>o(e,t,a,s))).getOr(!1),g8=(e,t)=>p8(e,t,j9),sI=(e,t)=>p8(e,t,q9),K9=e=>{const t=Dg.exact(e,0,e,0);return GM(t)},h8=(e,t,o)=>o.fold(j.none,j.none,(s,a)=>nI(a).map(c=>K9(c)),s=>(e.execCommand("mceTableInsertRowAfter"),b8(e,t,s))),b8=(e,t,o)=>h8(e,t,Ps(o,js)),G9=(e,t,o)=>h8(e,t,Or(o,js)),y8=(e,t)=>{const o=["table","li","dl"],s=ye.fromDom(e.getBody()),a=h=>{const _=En(h);return kn(h,s)||mn(o,_)},c=e.selection.getRng(),d=ye.fromDom(t?c.endContainer:c.startContainer);return TR(d,a).map(h=>(Ie(h,a).each(I=>{e.model.table.clearSelectedCells(I.dom)}),e.selection.collapse(!t),(t?b8:G9)(e,a,h).each(I=>{e.selection.setRng(I)}),!0)).getOr(!1)},Y9=(e,t,o)=>{const s=Jo.os.isMacOS()||Jo.os.isiOS();oh([{keyCode:Zt.RIGHT,action:jo(Kn,e,!0)},{keyCode:Zt.LEFT,action:jo(Kn,e,!1)},{keyCode:Zt.UP,action:jo(Vm,e,!1)},{keyCode:Zt.DOWN,action:jo(Vm,e,!0)},...s?[{keyCode:Zt.UP,action:jo(Pb,e,!1),metaKey:!0,shiftKey:!0},{keyCode:Zt.DOWN,action:jo(Pb,e,!0),metaKey:!0,shiftKey:!0}]:[],{keyCode:Zt.RIGHT,action:jo(g8,e,!0)},{keyCode:Zt.LEFT,action:jo(g8,e,!1)},{keyCode:Zt.UP,action:jo(sI,e,!1)},{keyCode:Zt.DOWN,action:jo(sI,e,!0)},{keyCode:Zt.UP,action:jo(sI,e,!1)},{keyCode:Zt.UP,action:jo(il,e,!1)},{keyCode:Zt.DOWN,action:jo(il,e,!0)},{keyCode:Zt.RIGHT,action:jo(nh,e,!0)},{keyCode:Zt.LEFT,action:jo(nh,e,!1)},{keyCode:Zt.UP,action:jo(x1,e,!1)},{keyCode:Zt.DOWN,action:jo(x1,e,!0)},{keyCode:Zt.RIGHT,action:jo(NT,e,t,!0)},{keyCode:Zt.LEFT,action:jo(NT,e,t,!1)},{keyCode:Zt.RIGHT,ctrlKey:!s,altKey:s,action:jo(fR,e,t)},{keyCode:Zt.LEFT,ctrlKey:!s,altKey:s,action:jo(mR,e,t)},{keyCode:Zt.UP,action:jo(ik,e,!1)},{keyCode:Zt.DOWN,action:jo(ik,e,!0)}],o).each(a=>{o.preventDefault()})},X9=(e,t)=>{e.on("keydown",o=>{o.isDefaultPrevented()||Y9(e,t,o)})},Yp=(e,t)=>({container:e,offset:t}),OR=Ts.DOM,zR=e=>t=>e===t?-1:0,J9=e=>t=>e.isBlock(t)||mn(["BR","IMG","HR","INPUT"],t.nodeName)||e.getContentEditable(t)==="false",rI=(e,t,o)=>{if(wt(e)&&t>=0)return j.some(Yp(e,t));{const s=Eu(OR);return j.from(s.backwards(e,t,zR(e),o)).map(a=>Yp(a.container,a.container.data.length))}},Q9=(e,t,o)=>{if(wt(e)&&t>=e.length)return j.some(Yp(e,t));{const s=Eu(OR);return j.from(s.forwards(e,t,zR(e),o)).map(a=>Yp(a.container,0))}},aI=(e,t,o)=>{if(!wt(e))return j.none();const s=e.data;if(t>=0&&t<=s.length)return j.some(Yp(e,t));{const a=Eu(OR);return j.from(a.backwards(e,t,zR(e),o)).bind(c=>{const d=c.container.data;return aI(c.container,t+d.length,o)})}},v8=(e,t,o)=>{if(!wt(e))return j.none();const s=e.data;if(t<=s.length)return j.some(Yp(e,t));{const a=Eu(OR);return j.from(a.forwards(e,t,zR(e),o)).bind(c=>v8(c.container,t-s.length,o))}},iI=(e,t,o,s,a)=>{const c=Eu(e,J9(e));return j.from(c.backwards(t,o,s,a))},ej=e=>e.collapsed&&wt(e.startContainer),tj=e=>nl(e.toString().replace(/\u00A0/g," ")),_8=e=>e!==""&&`  \f -\r \v`.indexOf(e)!==-1,oj=(e,t)=>e.substring(t.length),nj=(e,t,o,s=!1)=>{let a;const c=o.charAt(0);for(a=t-1;a>=0;a--){const d=e.charAt(a);if(!s&&_8(d))return j.none();if(c===d&&Yn(e,o,a,t))break}return j.some(a)},lI=(e,t,o,s=!1)=>{if(!ej(t))return j.none();const a={text:"",offset:0},c=(h,_,z)=>(a.text=z+a.text,a.offset+=_,nj(a.text,a.offset,o,s).getOr(_)),d=e.getParent(t.startContainer,e.isBlock)||e.getRoot();return iI(e,t.startContainer,t.startOffset,c,d).bind(h=>{const _=t.cloneRange();if(_.setStart(h.container,h.offset),_.setEnd(t.endContainer,t.endOffset),_.collapsed)return j.none();const z=tj(_);return z.lastIndexOf(o)!==0?j.none():j.some({text:oj(z,o),range:_,trigger:o})})},sj=e=>e.nodeType===Sd,rj=e=>e.nodeType===Ci,x8=e=>{if(sj(e))return Yp(e,e.data.length);{const t=e.childNodes;return t.length>0?x8(t[t.length-1]):Yp(e,t.length)}},w8=(e,t)=>{const o=e.childNodes;return o.length>0&&t0&&rj(e)&&o.length===t?x8(o[o.length-1]):Yp(e,t)},aj=(e,t)=>{var o;const s=(o=e.getParent(t.container,e.isBlock))!==null&&o!==void 0?o:e.getRoot();return iI(e,t.container,t.offset,(a,c)=>c===0?-1:c,s).filter(a=>{const c=a.container.data.charAt(a.offset-1);return!_8(c)}).isSome()},ij=e=>t=>{const o=w8(t.startContainer,t.startOffset);return!aj(e,o)},lj=(e,t,o)=>Kr(o.triggers,s=>lI(e,t,s)),cj=(e,t)=>{const o=t(),s=e.selection.getRng();return lj(e.dom,s,o).bind(a=>k8(e,t,a))},k8=(e,t,o,s={})=>{var a;const c=t(),h=(a=e.selection.getRng().startContainer.nodeValue)!==null&&a!==void 0?a:"",_=rt(c.lookupByTrigger(o.trigger),I=>o.text.length>=I.minChars&&I.matches.getOrThunk(()=>ij(e.dom))(o.range,h,o.text));if(_.length===0)return j.none();const z=Promise.all(dn(_,I=>I.fetch(o.text,I.maxResults,s).then(V=>({matchText:o.text,items:V,columns:I.columns,onAction:I.onAction,highlightOn:I.highlightOn}))));return j.some({lookupData:z,context:o})};var Xp;(function(e){e[e.Error=0]="Error",e[e.Value=1]="Value"})(Xp||(Xp={}));const cI=(e,t,o)=>e.stype===Xp.Error?t(e.serror):o(e.svalue),dj=e=>{const t=[],o=[];return Le(e,s=>{cI(s,a=>o.push(a),a=>t.push(a))}),{values:t,errors:o}},uj=(e,t)=>e.stype===Xp.Error?{stype:Xp.Error,serror:t(e.serror)}:e,fj=(e,t)=>e.stype===Xp.Value?{stype:Xp.Value,svalue:t(e.svalue)}:e,mj=(e,t)=>e.stype===Xp.Value?t(e.svalue):e,pj=(e,t)=>e.stype===Xp.Error?t(e.serror):e,C8=e=>({stype:Xp.Value,svalue:e}),S8=e=>({stype:Xp.Error,serror:e}),hl={fromResult:e=>e.fold(S8,C8),toResult:e=>cI(e,Oo.error,Oo.value),svalue:C8,partition:dj,serror:S8,bind:mj,bindError:pj,map:fj,mapError:uj,fold:cI},dI=e=>ue(e)&&vt(e).length>100?" removed due to size":JSON.stringify(e,null,2),gj=e=>{const t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:Ge("... (only showing first ten failures)")}]):e;return dn(t,o=>"Failed path: ("+o.path.join(" > ")+`) -`+o.getErrorInfo())},NR=(e,t)=>hl.serror([{path:e,getErrorInfo:t}]),hj=(e,t,o)=>NR(e,()=>'Could not find valid *required* value for "'+t+'" in '+dI(o)),bj=(e,t)=>NR(e,()=>'Choice schema did not contain choice key: "'+t+'"'),yj=(e,t,o)=>NR(e,()=>'The chosen schema: "'+o+'" did not exist in branches: '+dI(t)),vj=(e,t)=>NR(e,Ge(t)),_j=(e,t,o,s)=>Gn(o,s).fold(()=>yj(e,o,s),c=>c.extract(e.concat(["branch: "+s]),t)),xj=(e,t)=>({extract:(a,c)=>Gn(c,e).fold(()=>bj(a,e),h=>_j(a,c,t,h)),toString:()=>"chooseOn("+e+"). Possible values: "+vt(t)}),wj=(e,t)=>t,kj=(e,t)=>Ct(e)&&Ct(t)?DR(e,t):t,E8=e=>(...t)=>{if(t.length===0)throw new Error("Can't merge zero objects");const o={};for(let s=0;s({tag:"required",process:{}}),Cj=e=>({tag:"defaultedThunk",process:e}),O8=e=>Cj(Ge(e)),Sj=()=>({tag:"option",process:{}}),Ej=(e,t)=>e.length>0?hl.svalue(DR(t,T8.apply(void 0,e))):hl.svalue(t),z8=e=>Kt(hl.serror,Zn)(e),Tj={consolidateObj:(e,t)=>{const o=hl.partition(e);return o.errors.length>0?z8(o.errors):Ej(o.values,t)},consolidateArr:e=>{const t=hl.partition(e);return t.errors.length>0?z8(t.errors):hl.svalue(t.values)}},Aj=(e,t,o,s)=>({tag:"field",key:e,newKey:t,presence:o,prop:s}),Oj=(e,t)=>({tag:"custom",newKey:e,instantiator:t}),N8=(e,t,o)=>{switch(e.tag){case"field":return t(e.key,e.newKey,e.presence,e.prop);case"custom":return o(e.newKey,e.instantiator)}},uI=e=>{const t=(s,a)=>hl.bindError(e(a),c=>vj(s,c)),o=Ge("val");return{extract:t,toString:o}},zj=uI(hl.svalue),Nj=(e,t,o,s)=>Gn(t,o).fold(()=>hj(e,o,t),s),D8=(e,t,o,s)=>{const a=Gn(e,t).getOrThunk(()=>o(e));return s(a)},Dj=(e,t,o)=>o(Gn(e,t)),Rj=(e,t,o,s)=>{const a=Gn(e,t).map(c=>c===!0?o(e):c);return s(a)},Mj=(e,t,o,s,a)=>{const c=h=>a.extract(t.concat([s]),h),d=h=>h.fold(()=>hl.svalue(j.none()),_=>{const z=a.extract(t.concat([s]),_);return hl.map(z,j.some)});switch(e.tag){case"required":return Nj(t,o,s,c);case"defaultedThunk":return D8(o,s,e.process,c);case"option":return Dj(o,s,d);case"defaultedOptionThunk":return Rj(o,s,e.process,d);case"mergeWithThunk":return D8(o,s,Ge({}),h=>{const _=DR(e.process(o),h);return c(_)})}},Bj=(e,t,o)=>{const s={},a=[];for(const c of o)N8(c,(d,h,_,z)=>{const I=Mj(_,e,t,d,z);hl.fold(I,$=>{a.push(...$)},$=>{s[h]=$})},(d,h)=>{s[d]=h(t)});return a.length>0?hl.serror(a):hl.svalue(s)},fI=e=>({extract:(s,a)=>Bj(s,a,e),toString:()=>`obj{ -`+dn(e,a=>N8(a,(c,d,h,_)=>c+" -> "+_.toString(),(c,d)=>"state("+c+")")).join(` -`)+"}"}),R8=e=>({extract:(s,a)=>{const c=dn(a,(d,h)=>e.extract(s.concat(["["+h+"]"]),d));return Tj.consolidateArr(c)},toString:()=>"array("+e.toString()+")"}),Lj=e=>uI(t=>e(t).fold(hl.serror,hl.svalue)),Pj=(e,t,o)=>{const s=t.extract([e],o);return hl.mapError(s,a=>({input:o,errors:a}))},Ij=(e,t,o)=>hl.toResult(Pj(e,t,o)),Fj=e=>`Errors: -`+gj(e.errors).join(` +Options:${d}${o.join(d)}`:"";console.warn("The following deprecated features are currently enabled but will be removed soon."+h+_)}},LB=(e,t)=>{zN(e,t),MB(e,t)},Gg=As.DOM,BB=e=>{Gg.setStyle(e.id,"display",e.orgDisplay)},Pv=e=>j.from(e).each(t=>t.destroy()),Uw=e=>{const t=e;t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null;const o=e.selection;if(o){const s=o.dom;t.selection=o.win=o.dom=s.doc=null}},DN=e=>{const t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,delete t._mceOldSubmit),Gg.unbind(t,"submit reset",e.formEventDelegate))},RN=e=>{if(!e.removed){const{_selectionOverrides:t,editorUpload:o}=e,s=e.getBody(),a=e.getElement();s&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&Fe(a==null?void 0:a.nextSibling)&&Gg.remove(a.nextSibling),j0(e),e.editorManager.remove(e),!e.inline&&s&&BB(e),U0(e),Gg.remove(e.getContainer()),Pv(t),Pv(o),e.destroy()}},PB=(e,t)=>{const{selection:o,dom:s}=e;if(!e.destroyed){if(!t&&!e.removed){e.remove();return}t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),Pv(o),Pv(s)),DN(e),Uw(e),e.destroyed=!0}},Iv=(()=>{const e={};return{add:(a,c)=>{e[a]=c},get:a=>e[a]?e[a]:{icons:{}},has:a=>Ro(e,a)}})(),Yg=Hi.ModelManager,Fv=(e,t)=>t.dom[e],ZE=(e,t)=>parseInt(ur(t,e),10),WE=Ht(Fv,"clientWidth"),MN=Ht(Fv,"clientHeight"),IB=Ht(ZE,"margin-top"),LN=Ht(ZE,"margin-left"),FB=e=>e.dom.getBoundingClientRect(),BN=(e,t,o)=>{const s=WE(e),a=MN(e);return t>=0&&o>=0&&t<=s&&o<=a},PN=(e,t,o,s)=>{const a=FB(t),c=e?a.left+t.dom.clientLeft+LN(t):0,d=e?a.top+t.dom.clientTop+IB(t):0,h=o-c,_=s-d;return{x:h,y:_}},HB=(e,t,o)=>{const s=ye.fromDom(e.getBody()),a=e.inline?s:Gl(s),c=PN(e.inline,a,t,o);return BN(a,c.x,c.y)},IN=e=>j.from(e).map(ye.fromDom),qE=e=>{const t=e.inline?e.getBody():e.getContentAreaContainer();return IN(t).map(Ua).getOr(!1)};var FN=()=>{const e=()=>{throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:e,close:e,getArgs:e}};const KE=e=>{const t=[],o=()=>{const V=e.theme;return V&&V.getNotificationManagerImpl?V.getNotificationManagerImpl():FN()},s=()=>j.from(t[0]),a=(V,ee)=>V.type===ee.type&&V.text===ee.text&&!V.progressBar&&!V.timeout&&!ee.progressBar&&!ee.timeout,c=()=>{s().each(V=>{V.reposition()})},d=V=>{t.push(V)},h=V=>{rs(t,ee=>ee===V).each(ee=>{t.splice(ee,1)})},_=(V,ee=!0)=>e.removed||!qE(e)?{}:(ee&&e.dispatch("BeforeOpenNotification",{notification:V}),On(t,le=>a(o().getArgs(le),V)).getOrThunk(()=>{e.editorManager.setActive(e);const le=o().open(V,()=>{h(le)},()=>db(e));return d(le),c(),e.dispatch("OpenNotification",{notification:{...le}}),le})),z=()=>{s().each(V=>{o().close(V),h(V),c()})},I=Ge(t);return(V=>{V.on("SkinLoaded",()=>{const ee=K5(V);ee&&_({text:ee,type:"warning",timeout:0},!1),c()}),V.on("show ResizeEditor ResizeWindow NodeChange ToggleView FullscreenStateChanged",()=>{requestAnimationFrame(c)}),V.on("remove",()=>{Be(t.slice(),ee=>{o().close(ee)})}),V.addShortcut("alt+F12","Focus to notification",()=>s().map(ee=>ye.fromDom(ee.getEl())).each(ee=>oC(ee)))})(e),{open:_,close:z,getNotifications:I}},Ab=Hi.PluginManager,Xg=Hi.ThemeManager;var $B=()=>{const e=()=>{throw new Error("Theme did not provide a WindowManager implementation.")};return{open:e,openUrl:e,alert:e,confirm:e,close:e}};const HN=e=>{let t=[];const o=()=>{const oe=e.theme;return oe&&oe.getWindowManagerImpl?oe.getWindowManagerImpl():$B()},s=(oe,fe)=>(...ke)=>fe?fe.apply(oe,ke):void 0,a=oe=>{e.dispatch("OpenWindow",{dialog:oe})},c=oe=>{e.dispatch("CloseWindow",{dialog:oe})},d=oe=>{t.push(oe),a(oe)},h=oe=>{c(oe),t=rt(t,fe=>fe!==oe),t.length===0&&e.focus()},_=()=>j.from(t[t.length-1]),z=oe=>{e.editorManager.setActive(e),$y(e),e.ui.show();const fe=oe();return d(fe),fe},I=(oe,fe)=>z(()=>o().open(oe,fe,h)),H=oe=>z(()=>o().openUrl(oe,h)),V=(oe,fe,ke)=>{const Oe=o();Oe.alert(oe,s(ke||Oe,fe))},ee=(oe,fe,ke)=>{const Oe=o();Oe.confirm(oe,s(ke||Oe,fe))},le=()=>{_().each(oe=>{o().close(oe),h(oe)})};return e.on("remove",()=>{Be(t,oe=>{o().close(oe)})}),{open:I,openUrl:H,alert:V,confirm:ee,close:le}},Zw=(e,t)=>{e.notificationManager.open({type:"error",text:t})},Ww=(e,t)=>{e._skinLoaded?Zw(e,t):e.on("SkinLoaded",()=>{Zw(e,t)})},$N=(e,t)=>{Ww(e,Rc.translate(["Failed to upload image: {0}",t]))},d1=(e,t,o)=>{$2(e,t,{message:o}),console.error(o)},Tb=(e,t,o)=>o?`Failed to load ${e}: ${o} from url ${t}`:`Failed to load ${e} url: ${t}`,GE=(e,t,o)=>{d1(e,"PluginLoadError",Tb("plugin",t,o))},YE=(e,t,o)=>{d1(e,"IconsLoadError",Tb("icons",t,o))},VB=(e,t,o)=>{d1(e,"LanguageLoadError",Tb("language",t,o))},VN=(e,t,o)=>{d1(e,"ThemeLoadError",Tb("theme",t,o))},jB=(e,t,o)=>{d1(e,"ModelLoadError",Tb("model",t,o))},UB=(e,t,o)=>{const s=Rc.translate(["Failed to initialize plugin: {0}",t]);$2(e,"PluginLoadError",{message:s}),Hv(s,o),Ww(e,s)},Hv=(e,...t)=>{const o=window.console;o&&(o.error?o.error(e,...t):o.log(e,...t))},XE=e=>/^[a-z0-9\-]+$/i.test(e),JE=e=>"content/"+e+"/content.css",qw=e=>tinymce.Resource.has(JE(e)),ZB=e=>jN(e,pl(e)),WB=e=>jN(e,ET(e)),jN=(e,t)=>{const o=e.editorManager.baseURL+"/skins/content",a=`content${e.editorManager.suffix}.css`;return dn(t,c=>qw(c)?c:XE(c)&&!e.inline?`${o}/${c}/${a}`:e.documentBaseURI.toAbsolute(c))},UN=e=>{e.contentCSS=e.contentCSS.concat(ZB(e),WB(e))},ZN=e=>e?an(e.getElementsByTagName("img")):[],qB=(e,t)=>{const o={};return{findAll:(a,c=zo)=>{const d=rt(ZN(a),_=>{const z=_.src;return _.hasAttribute("data-mce-bogus")||_.hasAttribute("data-mce-placeholder")||!z||z===Jo.transparentSrc?!1:vs(z,"blob:")?!e.isUploaded(z)&&c(_):vs(z,"data:")?c(_):!1}),h=dn(d,_=>{const z=_.src;if(Ro(o,z))return o[z].then(I=>ft(I)?I:{image:_,blobInfo:I.blobInfo});{const I=ZS(t,z).then(H=>(delete o[z],{image:_,blobInfo:H})).catch(H=>(delete o[z],H));return o[z]=I,I}});return Promise.all(h)}}},QE=()=>{let o={};const s=(V,ee)=>({status:V,resultUri:ee}),a=V=>V in o;return{hasBlobUri:a,getResultUri:V=>{const ee=o[V];return ee?ee.resultUri:null},isPending:V=>a(V)?o[V].status===1:!1,isUploaded:V=>a(V)?o[V].status===2:!1,markPending:V=>{o[V]=s(1,null)},markUploaded:(V,ee)=>{o[V]=s(2,ee)},removeFailed:V=>{delete o[V]},destroy:()=>{o={}}}};let $v=0;const WN=()=>{const e=()=>Math.round(tl()*4294967295).toString(36);return"s"+new Date().getTime().toString(36)+e()+e()+e()},KB=e=>e+$v+++WN(),qN=()=>{let e=[];const t=H=>({"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"})[H.toLowerCase()]||"dat",o=(H,V,ee,le,oe)=>{if(ft(H))return s({id:H,name:le,filename:oe,blob:V,base64:ee});if(ue(H))return s(H);throw new Error("Unknown input type")},s=H=>{if(!H.blob||!H.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");const V=H.id||KB("blobid"),ee=H.name||V,le=H.blob;return{id:Ge(V),name:Ge(ee),filename:Ge(H.filename||ee+"."+t(le.type)),blob:Ge(le),base64:Ge(H.base64),blobUri:Ge(H.blobUri||URL.createObjectURL(le)),uri:Ge(H.uri)}},a=H=>{d(H.id())||e.push(H)},c=H=>On(e,H).getOrUndefined(),d=H=>c(V=>V.id()===H);return{create:o,add:a,get:d,getByUri:H=>c(V=>V.blobUri()===H),getByData:(H,V)=>c(ee=>ee.base64()===H&&ee.blob().type===V),findFirst:c,removeByUri:H=>{e=rt(e,V=>V.blobUri()===H?(URL.revokeObjectURL(V.blobUri()),!1):!0)},destroy:()=>{Be(e,H=>{URL.revokeObjectURL(H.blobUri())}),e=[]}}},KN=(e,t)=>{const o={},s=(oe,fe)=>oe?oe.replace(/\/$/,"")+"/"+fe.replace(/^\//,""):fe,a=(oe,fe)=>new Promise((ke,Oe)=>{const Ae=new XMLHttpRequest;Ae.open("POST",t.url),Ae.withCredentials=t.credentials,Ae.upload.onprogress=ht=>{fe(ht.loaded/ht.total*100)},Ae.onerror=()=>{Oe("Image upload failed due to a XHR Transport error. Code: "+Ae.status)},Ae.onload=()=>{if(Ae.status<200||Ae.status>=300){Oe("HTTP Error: "+Ae.status);return}const ht=JSON.parse(Ae.responseText);if(!ht||!ft(ht.location)){Oe("Invalid JSON: "+Ae.responseText);return}ke(s(t.basePath,ht.location))};const Pe=new FormData;Pe.append("file",oe.blob(),oe.filename()),Ae.send(Pe)}),c=Gt(t.handler)?t.handler:a,d=()=>new Promise(oe=>{oe([])}),h=(oe,fe)=>({url:fe,blobInfo:oe,status:!0}),_=(oe,fe)=>({url:"",blobInfo:oe,status:!1,error:fe}),z=(oe,fe)=>{zt.each(o[oe],ke=>{ke(fe)}),delete o[oe]},I=(oe,fe,ke)=>(e.markPending(oe.blobUri()),new Promise(Oe=>{let Ae,Pe;try{const ht=()=>{Ae&&(Ae.close(),Pe=dt)},Mt=Qe=>{ht(),e.markUploaded(oe.blobUri(),Qe),z(oe.blobUri(),h(oe,Qe)),Oe(h(oe,Qe))},Yt=Qe=>{ht(),e.removeFailed(oe.blobUri()),z(oe.blobUri(),_(oe,Qe)),Oe(_(oe,Qe))};Pe=Qe=>{Qe<0||Qe>100||j.from(Ae).orThunk(()=>j.from(ke).map(ks)).each(Ve=>{Ae=Ve,Ve.progressBar.value(Qe)})},fe(oe,Pe).then(Mt,Qe=>{Yt(ft(Qe)?{message:Qe}:Qe)})}catch(ht){Oe(_(oe,ht))}})),H=oe=>oe===a,V=oe=>{const fe=oe.blobUri();return new Promise(ke=>{o[fe]=o[fe]||[],o[fe].push(ke)})},ee=(oe,fe)=>(oe=zt.grep(oe,ke=>!e.isUploaded(ke.blobUri())),Promise.all(zt.map(oe,ke=>e.isPending(ke.blobUri())?V(ke):I(ke,c,fe))));return{upload:(oe,fe)=>!t.url&&H(c)?d():ee(oe,fe)}},GN=e=>()=>e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0}),YN=(e,t)=>KN(t,{url:n2(e),basePath:kT(e),credentials:s2(e),handler:Z5(e)}),GB=e=>{const t=QE(),o=YN(e,t);return{upload:(s,a=!0)=>o.upload(s,a?GN(e):void 0)}},YB=(e,t)=>e.dom.isEmpty(t.dom)&&Fe(e.schema.getTextBlockElements()[En(t)]),XN=e=>t=>{YB(e,t)&&fr(t,ye.fromHtml('
    '))},eA=e=>{const t=qN();let o,s;const a=QE(),c=[],d=Ae=>Pe=>e.selection?Ae(Pe):[],h=Ae=>Ae+(Ae.indexOf("?")===-1?"?":"&")+new Date().getTime(),_=(Ae,Pe,ht)=>{let Mt=0;do Mt=Ae.indexOf(Pe,Mt),Mt!==-1&&(Ae=Ae.substring(0,Mt)+ht+Ae.substr(Mt+Pe.length),Mt+=ht.length-Pe.length+1);while(Mt!==-1);return Ae},z=(Ae,Pe,ht)=>{const Mt=`src="${ht}"${ht===Jo.transparentSrc?' data-mce-placeholder="1"':""}`;return Ae=_(Ae,`src="${Pe}"`,Mt),Ae=_(Ae,'data-mce-src="'+Pe+'"','data-mce-src="'+ht+'"'),Ae},I=(Ae,Pe)=>{Be(e.undoManager.data,ht=>{ht.type==="fragmented"?ht.fragments=dn(ht.fragments,Mt=>z(Mt,Ae,Pe)):ht.content=z(ht.content,Ae,Pe)})},H=(Ae,Pe)=>{const ht=e.convertURL(Pe,"src");I(Ae.src,Pe),$a(ye.fromDom(Ae),{src:Tp(e)?h(Pe):Pe,"data-mce-src":ht})},V=()=>(o||(o=YN(e,a)),fe().then(d(Ae=>{const Pe=dn(Ae,ht=>ht.blobInfo);return o.upload(Pe,GN(e)).then(d(ht=>{const Mt=[];let Yt=!1;const Qe=dn(ht,(Ve,mt)=>{const{blobInfo:to,image:bo}=Ae[mt];let gn=!1;return Ve.status&&xT(e)?(Ve.url&&!Yn(bo.src,Ve.url)&&(Yt=!0),t.removeByUri(bo.src),Pm(e)||H(bo,Ve.url)):Ve.error&&(Ve.error.remove&&(I(bo.src,Jo.transparentSrc),Mt.push(bo),gn=!0),$N(e,Ve.error.message)),{element:bo,status:Ve.status,uploadUri:Ve.url,blobInfo:to,removed:gn}});return Mt.length>0&&!Pm(e)?e.undoManager.transact(()=>{Be(ci(Mt),Ve=>{const mt=ia(Ve);Jn(Ve),mt.each(XN(e)),t.removeByUri(Ve.dom.src)})}):Yt&&e.undoManager.dispatchChange(),Qe}))}))),ee=()=>Ts(e)?V():Promise.resolve([]),le=Ae=>$s(c,Pe=>Pe(Ae)),oe=Ae=>{c.push(Ae)},fe=()=>(s||(s=qB(a,t)),s.findAll(e.getBody(),le).then(d(Ae=>{const Pe=rt(Ae,ht=>ft(ht)?(Ww(e,ht),!1):ht.uriType!=="blob");return Pm(e)||Be(Pe,ht=>{I(ht.image.src,ht.blobInfo.blobUri()),ht.image.src=ht.blobInfo.blobUri(),ht.image.removeAttribute("data-mce-src")}),Pe}))),ke=()=>{t.destroy(),a.destroy(),s=o=null},Oe=Ae=>Ae.replace(/src="(blob:[^"]+)"/g,(Pe,ht)=>{const Mt=a.getResultUri(ht);if(Mt)return'src="'+Mt+'"';let Yt=t.getByUri(ht);return Yt||(Yt=ko(e.editorManager.get(),(Qe,Ve)=>Qe||Ve.editorUpload&&Ve.editorUpload.blobCache.getByUri(ht),void 0)),Yt?'src="data:'+Yt.blob().type+";base64,"+Yt.base64()+'"':Pe});return e.on("SetContent",()=>{Ts(e)?ee():fe()}),e.on("RawSaveContent",Ae=>{Ae.content=Oe(Ae.content)}),e.on("GetContent",Ae=>{Ae.source_view||Ae.format==="raw"||Ae.format==="tree"||(Ae.content=Oe(Ae.content))}),e.on("PostRender",()=>{e.parser.addNodeFilter("img",Ae=>{Be(Ae,Pe=>{const ht=Pe.attr("src");if(!ht||t.getByUri(ht))return;const Mt=a.getResultUri(ht);Mt&&Pe.attr("src",Mt)})})}),{blobCache:t,addFilter:oe,uploadImages:V,uploadImagesAuto:ee,scanForImages:fe,destroy:ke}},JN=e=>{const t=e.dom,o=e.schema.type,s={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:"table",collapsed:!1,styles:{marginLeft:"0px",marginRight:"auto"},onformat:a=>{t.setStyle(a,"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:"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:"table",collapsed:!1,styles:{marginRight:"0px",marginLeft:"auto"},onformat:a=>{t.setStyle(a,"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 a={inline:"span",styles:{textDecoration:"line-through"},exact:!0},c={inline:"strike",remove:"all",preserve_attributes:["class","style"]},d={inline:"s",remove:"all",preserve_attributes:["class","style"]};return o!=="html4"?[d,a,c]:[a,d,c]})(),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"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:(a,c,d)=>no(a)&&a.hasAttribute("href"),onformat:(a,c,d)=>{zt.each(d,(h,_)=>{t.setAttrib(a,_,h)})}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":a=>{var c;return(c=a==null?void 0:a.customValue)!==null&&c!==void 0?c: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 zt.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),a=>{s[a]={block:a,remove:"all"}}),s},tA={remove_similar:!0,inherit:!1},Ob={selector:"td,th",...tA},QN={tablecellbackgroundcolor:{styles:{backgroundColor:"%value"},...Ob},tablecellverticalalign:{styles:{"vertical-align":"%value"},...Ob},tablecellbordercolor:{styles:{borderColor:"%value"},...Ob},tablecellclass:{classes:["%value"],...Ob},tableclass:{selector:"table",classes:["%value"],...tA},tablecellborderstyle:{styles:{borderStyle:"%value"},...Ob},tablecellborderwidth:{styles:{borderWidth:"%value"},...Ob}},XB=Ge(QN),oA=e=>{const t={},o=d=>Fe(d)?t[d]:t,s=d=>Ro(t,d),a=(d,h)=>{d&&(ft(d)?(ve(h)||(h=[h]),Be(h,_=>{ln(_.deep)&&(_.deep=!Fc(_)),ln(_.split)&&(_.split=!Fc(_)||Ja(_)),ln(_.remove)&&Fc(_)&&!Ja(_)&&(_.remove="none"),Fc(_)&&Ja(_)&&(_.mixed=!0,_.block_expand=!0),ft(_.classes)&&(_.classes=_.classes.split(/\s+/))}),t[d]=h):nn(d,(_,z)=>{a(z,_)}))},c=d=>(d&&t[d]&&delete t[d],t);return a(JN(e)),a(XB()),a(Y5(e)),{get:o,has:s,register:a,unregister:c}},zb=zt.each,cc=As.DOM,Af=e=>Fe(e)&&ue(e),Vv=(e,t)=>{const o=t&&t.schema||Dc({}),s=(_,z)=>{z.classes.length>0&&cc.addClass(_,z.classes.join(" ")),cc.setAttribs(_,z.attrs)},a=_=>{const z=ft(_)?{name:_,classes:[],attrs:{}}:_,I=cc.create(z.name);return s(I,z),I},c=(_,z)=>{const I=o.getElementRule(_.nodeName.toLowerCase()),H=I==null?void 0:I.parentsRequired;return H&&H.length?z&&mn(H,z)?z:H[0]:!1},d=(_,z,I)=>{let H;const V=z[0],ee=Af(V)?V.name:void 0,le=c(_,ee);if(le)ee===le?(H=V,z=z.slice(1)):H=le;else if(V)H=V,z=z.slice(1);else if(!I)return _;const oe=H?a(H):cc.create("div");oe.appendChild(_),I&&zt.each(I,ke=>{const Oe=a(ke);oe.insertBefore(Oe,_)});const fe=Af(H)?H.siblings:void 0;return d(oe,z,fe)},h=cc.create("div");if(e.length>0){const _=e[0],z=a(_),I=Af(_)?_.siblings:void 0;h.appendChild(d(z,e.slice(1),I))}return h},u1=e=>{e=zt.trim(e);let t="div";const o={name:t,classes:[],attrs:{},selector:e};return e!=="*"&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,(s,a,c,d,h)=>{switch(a){case"#":o.attrs.id=c;break;case".":o.classes.push(c);break;case":":zt.inArray("checked disabled enabled read-only required".split(" "),c)!==-1&&(o.attrs[c]=c);break}if(d==="["){const _=h.match(/([\w\-]+)(?:\=\"([^\"]+))?/);_&&(o.attrs[_[1]]=_[2])}return""})),o.name=t||"div",o},eD=e=>ft(e)?(e=e.split(/\s*,\s*/)[0],e=e.replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),zt.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),t=>{const o=zt.map(t.split(/(?:~\+|~|\+)/),u1),s=o.pop();return o.length&&(s.siblings=o),s}).reverse()):[],tD=(e,t)=>{let o="",s=X5(e);if(s==="")return"";const a=V=>ft(V)?V.replace(/%(\w+)/g,""):"",c=(V,ee)=>cc.getStyle(ee??e.getBody(),V,!0);if(ft(t)){const V=e.formatter.get(t);if(!V)return"";t=V[0]}if("preview"in t){const V=t.preview;if(V===!1)return"";s=V||s}let d=t.block||t.inline||"span",h;const _=eD(t.selector);_.length>0?(_[0].name||(_[0].name=d),d=t.selector,h=Vv(_,e)):h=Vv([d],e);const z=cc.select(d,h)[0]||h.firstChild;zb(t.styles,(V,ee)=>{const le=a(V);le&&cc.setStyle(z,ee,le)}),zb(t.attributes,(V,ee)=>{const le=a(V);le&&cc.setAttrib(z,ee,le)}),zb(t.classes,V=>{const ee=a(V);cc.hasClass(z,ee)||cc.addClass(z,ee)}),e.dispatch("PreviewFormats"),cc.setStyles(h,{position:"absolute",left:-65535}),e.getBody().appendChild(h);const I=c("fontSize"),H=/px$/.test(I)?parseInt(I,10):0;return zb(s.split(" "),V=>{let ee=c(V,z);if(!(V==="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(ee)&&(ee=c(V),_h(ee).toLowerCase()==="#ffffff"))&&!(V==="color"&&_h(ee).toLowerCase()==="#000000")){if(V==="font-size"&&/em|%$/.test(ee)){if(H===0)return;ee=parseFloat(ee)/(/%$/.test(ee)?100:1)*H+"px"}V==="border"&&ee&&(o+="padding:0 2px;"),o+=V+":"+ee+";"}}),e.dispatch("AfterPreviewFormats"),cc.remove(h),o},nA=e=>{e.addShortcut("meta+b","","Bold"),e.addShortcut("meta+i","","Italic"),e.addShortcut("meta+u","","Underline");for(let t=1;t<=6;t++)e.addShortcut("access+"+t,"",["FormatBlock",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])},jv=e=>{const t=oA(e),o=Er({});return nA(e),WO(e),Pm(e)||cz(o,e),{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:(s,a,c)=>{Ls(e,s,a,c)},remove:(s,a,c,d)=>{cN(e,s,a,c,d)},toggle:(s,a,c)=>{DE(e,s,a,c)},match:(s,a,c,d)=>gB(e,s,a,c,d),closest:s=>vB(e,s),matchAll:(s,a)=>hB(e,s,a),matchNode:(s,a,c,d)=>bB(e,s,a,c,d),canApply:s=>yB(e,s),formatChanged:(s,a,c,d)=>dN(e,o,s,a,c,d),getCssText:Ht(tD,e)}},jp=e=>{switch(e.toLowerCase()){case"undo":case"redo":case"mcefocus":return!0;default:return!1}},Nb=(e,t,o)=>{const s=Er(!1),a=_=>{Mv(t,!1,o),t.add({},_)};e.on("init",()=>{t.add()}),e.on("BeforeExecCommand",_=>{const z=_.command;jp(z)||(SE(t,o),t.beforeChange())}),e.on("ExecCommand",_=>{const z=_.command;jp(z)||a(_)}),e.on("ObjectResizeStart cut",()=>{t.beforeChange()}),e.on("SaveContent ObjectResized blur",a),e.on("dragend",a),e.on("keyup",_=>{const z=_.keyCode;if(_.isDefaultPrevented())return;const I=Jo.os.isMacOS()&&_.key==="Meta";(z>=33&&z<=36||z>=37&&z<=40||z===45||_.ctrlKey||I)&&(a(),e.nodeChanged()),(z===46||z===8)&&e.nodeChanged(),s.get()&&t.typing&&!i1(a1(e),t.data[0])&&(e.isDirty()||e.setDirty(!0),e.dispatch("TypingUndo"),s.set(!1),e.nodeChanged())}),e.on("keydown",_=>{const z=_.keyCode;if(_.isDefaultPrevented())return;if(z>=33&&z<=36||z>=37&&z<=40||z===45){t.typing&&a(_);return}const I=_.ctrlKey&&!_.altKey||_.metaKey;if((z<16||z>20)&&z!==224&&z!==91&&!t.typing&&!I){t.beforeChange(),Mv(t,!0,o),t.add({},_),s.set(!0);return}(Jo.os.isMacOS()?_.metaKey:_.ctrlKey&&!_.altKey)&&t.beforeChange()}),e.on("mousedown",_=>{t.typing&&a(_)});const c=_=>_.inputType==="insertReplacementText",d=_=>_.inputType==="insertText"&&_.data===null,h=_=>_.inputType==="insertFromPaste"||_.inputType==="insertFromDrop";e.on("input",_=>{_.inputType&&(c(_)||d(_)||h(_))&&a(_)}),e.on("AddUndo Undo Redo ClearUndos",_=>{_.isDefaultPrevented()||e.nodeChanged()})},oD=e=>{e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo")},nD=e=>{const t=Jr(),o=Er(0),s=Er(0),a={data:[],typing:!1,beforeChange:()=>{l1(e,o,t)},add:(c,d)=>lB(e,a,s,o,t,c,d),dispatchChange:()=>{e.setDirty(!0);const c=a1(e);c.bookmark=Jt(e.selection),e.dispatch("change",{level:c,lastLevel:ra(a.data,s.get()).getOrUndefined()})},undo:()=>cB(e,a,o,s),redo:()=>iN(e,s,a.data),clear:()=>{lN(e,a,s)},reset:()=>{Vw(e,a)},hasUndo:()=>dB(e,a,s),hasRedo:()=>uB(e,a,s),transact:c=>fB(e,a,o,c),ignore:c=>{mB(e,o,c)},extra:(c,d)=>{pB(e,a,s,c,d)}};return Pm(e)||Nb(e,a,o),oD(e),a},sD=[9,27,Zt.HOME,Zt.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,Zt.DOWN,Zt.UP,Zt.LEFT,Zt.RIGHT].concat(Jo.browser.isFirefox()?[224]:[]),rD="data-mce-placeholder",aD=e=>e.type==="keydown"||e.type==="keyup",iD=e=>{const t=e.keyCode;return t===Zt.BACKSPACE||t===Zt.DELETE},sA=e=>{if(aD(e)){const t=e.keyCode;return!iD(e)&&(Zt.metaKeyPressed(e)||e.altKey||t>=112&&t<=123||mn(sD,t))}else return!1},lD=e=>aD(e)&&!(iD(e)||e.type==="keyup"&&e.keyCode===229),JB=(e,t,o)=>{if(e.isEmpty(t,void 0,{skipBogus:!1,includeZwsp:!0})){const s=t.firstElementChild;return s?e.getStyle(t.firstElementChild,"padding-left")||e.getStyle(t.firstElementChild,"padding-right")?!1:o===s.nodeName.toLowerCase():!0}else return!1},cD=e=>{var t;const o=e.dom,s=Vi(e),a=(t=a2(e))!==null&&t!==void 0?t:"",c=(d,h)=>{if(sA(d))return;const _=e.getBody(),z=lD(d)?!1:JB(o,_,s);(o.getAttrib(_,rD)!==""!==z||h)&&(o.setAttrib(_,rD,z?a:null),$4(e,z),e.on(z?"keydown":"keyup",c),e.off(z?"keyup":"keydown",c))};Pn(a)&&e.on("init",d=>{c(d,!0),e.on("change SetContent ExecCommand",c),e.on("paste",h=>$c.setEditorTimeout(e,()=>c(h)))})},QB=(e,t)=>({block:e,position:t}),rA=(e,t)=>({from:e,to:t}),aA=(e,t)=>{const o=ye.fromDom(e),s=ye.fromDom(t.container());return gv(o,s).map(a=>QB(a,t))},dD=e=>!(_a(e.to.block,e.from.block)||_a(e.from.block,e.to.block)),iA=e=>!kn(e.from.block,e.to.block),lA=(e,t)=>_r(t,a=>Mc(a)||Rl(a.dom),a=>kn(a,e)).filter(cr).getOr(e),cA=(e,t)=>{const o=ye.fromDom(e);return kn(lA(o,t.from.block),lA(o,t.to.block))},eP=e=>$o(e.from.block.dom)===!1&&$o(e.to.block.dom)===!1,uD=e=>{const t=o=>Dh(o)||qs(o.dom)||mm(o);return t(e.from.block)&&t(e.to.block)},tP=(e,t,o,s)=>Hs(s.position.getNode())&&!ar(e,s.block)?Dy(!1,s.block.dom).bind(a=>a.isEqual(s.position)?cd(o,t,a).bind(c=>aA(t,c)):j.some(s)).getOr(s):s,fD=(e,t,o,s)=>{const a=aA(t,Ue.fromRangeStart(s)),c=a.bind(d=>cd(o,t,d.position).bind(h=>aA(t,h).map(_=>tP(e,t,o,_))));return va(a,c,rA).filter(d=>iA(d)&&cA(t,d)&&eP(d)&&uD(d)&&dD(d))},mD=(e,t,o,s)=>s.collapsed?fD(e,t,o,s):j.none(),oP=(e,t)=>{const o=xa(e);return rs(o,s=>t.isBlock(En(s))).fold(Ge(o),s=>o.slice(0,s))},pD=(e,t)=>{const o=oP(e,t);return Be(o,Jn),o},gD=(e,t,o)=>{const s=Vc(o,t);return On(s.reverse(),a=>ar(e,a)).each(Jn)},nP=(e,t)=>rt(_c(t),o=>!ar(e,o)).length===0,sP=(e,t,o,s,a)=>{if(ar(s,o))return Lc(o),No(o.dom);nP(s,a)&&ar(s,t)&&Zs(a,ye.fromTag("br"));const c=Ic(o.dom,Ue.before(a.dom));return Be(pD(t,s),d=>{Zs(a,d)}),gD(s,e,t),c},Db=(e,t)=>e.isInline(En(t)),hD=(e,t,o,s)=>{if(ar(s,o)){if(ar(s,t)){const d=ao((h=>{const _=(z,I)=>Pi(z).fold(()=>I,H=>Db(s,H)?_(H,I.concat(Tr(H))):I);return _(h,[])})(o),(h,_)=>(Ci(h,_),_),Au());xs(t),fr(t,d)}return Jn(o),No(t.dom)}const a=$d(o.dom);return Be(pD(t,s),c=>{fr(o,c)}),gD(s,e,t),a},bD=(e,t)=>{const o=Vc(t,e);return j.from(o[o.length-1])},yD=(e,t)=>_a(t,e)?bD(t,e):j.none(),vD=(e,t)=>{Dy(e,t.dom).bind(o=>j.from(o.getNode())).map(ye.fromDom).filter(Fd).each(Jn)},_D=(e,t,o,s)=>(vD(!0,t),vD(!1,o),yD(t,o).fold(Ht(hD,e,t,o,s),Ht(sP,e,t,o,s))),Up=(e,t,o,s,a)=>t?_D(e,s,o,a):_D(e,o,s,a),Kw=(e,t)=>{const o=ye.fromDom(e.getBody());return mD(e.schema,o.dom,t,e.selection.getRng()).map(a=>()=>{Up(o,t,a.from.block,a.to.block,e.schema).each(c=>{e.selection.setRng(c.toRange())})})},Gw=(e,t,o)=>{const s=t.getRng();return va(gv(e,ye.fromDom(s.startContainer)),gv(e,ye.fromDom(s.endContainer)),(a,c)=>kn(a,c)?j.none():j.some(()=>{s.deleteContents(),Up(e,!0,a,c,o).each(d=>{t.setRng(d.toRange())})})).getOr(j.none())},xD=(e,t)=>{const o=ye.fromDom(t),s=Ht(kn,e);return ii(o,Mc,s).isSome()},wD=(e,t)=>xD(e,t.startContainer)||xD(e,t.endContainer),rP=(e,t)=>{const o=Ic(e.dom,Ue.fromRangeStart(t)).isNone(),s=Pl(e.dom,Ue.fromRangeEnd(t)).isNone();return!wD(e,t)&&o&&s},aP=e=>j.some(()=>{e.setContent(""),e.selection.setCursorLocation()}),dA=e=>{const t=ye.fromDom(e.getBody()),o=e.selection.getRng();return rP(t,o)?aP(e):Gw(t,e.selection,e.schema)},uA=(e,t)=>e.selection.isCollapsed()?j.none():dA(e),gr=(e,t,o,s,a)=>j.from(t._selectionOverrides.showCaret(e,o,s,a)),iP=e=>{const t=e.ownerDocument.createRange();return t.selectNode(e),t},Uv=(e,t)=>e.dispatch("BeforeObjectSelected",{target:t}).isDefaultPrevented()?j.none():j.some(iP(t)),fA=(e,t,o)=>{const s=k2(1,e.getBody(),t),a=Ue.fromRangeStart(s),c=a.getNode();if(w0(c))return gr(1,e,c,!a.isAtEnd(),!1);const d=a.getNode(!0);if(w0(d))return gr(1,e,d,!1,!1);const h=Gd(e.dom.getRoot(),a.getNode());return w0(h)?gr(1,e,h,!1,o):j.none()},Yw=(e,t,o)=>t.collapsed?fA(e,t,o).getOr(t):t,mA=e=>Sa(e)||mb(e),lP=e=>Sf(e)||Wy(e),cP=(e,t)=>{wt(t)&&t.data.length===0&&e.remove(t)},kD=(e,t,o,s,a,c)=>{gr(s,e,c.getNode(!a),a,!0).each(d=>{if(t.collapsed){const h=t.cloneRange();a?h.setEnd(d.startContainer,d.startOffset):h.setStart(d.endContainer,d.endOffset),h.deleteContents()}else t.deleteContents();e.selection.setRng(d)}),cP(e.dom,o)},dP=(e,t)=>{const o=e.selection.getRng();if(!wt(o.commonAncestorContainer))return j.none();const s=t?Ti.Forwards:Ti.Backwards,a=So(e.getBody()),c=Ht(C2,t?a.next:a.prev),d=t?mA:lP,h=A0(s,e.getBody(),o),_=c(h),z=_&&Kd(t,_);if(!z||!J_(h,z))return j.none();if(d(z))return j.some(()=>kD(e,o,h.getNode(),s,t,z));const I=c(z);return I&&d(I)&&J_(z,I)?j.some(()=>kD(e,o,h.getNode(),s,t,I)):j.none()},pA=(e,t)=>dP(e,t),gA=(e,t)=>{const o=e.getBody();return t?No(o).filter(Sa):$d(o).filter(Sf)},hA=e=>{const t=e.selection.getRng();return!t.collapsed&&(gA(e,!0).exists(o=>o.isEqual(Ue.fromRangeStart(t)))||gA(e,!1).exists(o=>o.isEqual(Ue.fromRangeEnd(t))))},f1=e=>Fe(e)&&(Mc(ye.fromDom(e))||mm(ye.fromDom(e))),Pa=zn.generate([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),uP=(e,t)=>{const o=t.getNode(!e),s=e?"after":"before";return no(o)&&o.getAttribute("data-mce-caret")===s},fP=(e,t,o,s,a)=>{const c=d=>a.isInline(d.nodeName.toLowerCase())&&!xm(o,s,e);return r4(!t,o).fold(()=>r4(t,s).fold(fn,c),c)},CD=(e,t,o,s,a)=>{const c=a.getNode(!o);return gv(ye.fromDom(t),ye.fromDom(s.getNode())).map(d=>ar(e,d)?Pa.remove(d.dom):Pa.moveToElement(c)).orThunk(()=>j.some(Pa.moveToElement(c)))},SD=(e,t,o,s)=>cd(t,e,o).bind(a=>f1(a.getNode())||fP(e,t,o,a,s)?j.none():t&&$o(a.getNode())||!t&&$o(a.getNode(!0))?CD(s,e,t,o,a):t&&Sf(o)||!t&&Sa(o)?j.some(Pa.moveToPosition(a)):j.none()),mP=(e,t)=>uo(t)?j.none():e&&$o(t.nextSibling)?j.some(Pa.moveToElement(t.nextSibling)):!e&&$o(t.previousSibling)?j.some(Pa.moveToElement(t.previousSibling)):j.none(),pP=(e,t,o)=>o.fold(s=>j.some(Pa.remove(s)),s=>j.some(Pa.moveToElement(s)),s=>xm(t,s,e)?j.none():j.some(Pa.moveToPosition(s))),gP=(e,t,o,s)=>uP(t,o)?mP(t,o.getNode(!t)).orThunk(()=>SD(e,t,o,s)):SD(e,t,o,s).bind(a=>pP(e,o,a)),hP=(e,t,o,s)=>{const a=k2(t?1:-1,e,o),c=Ue.fromRangeStart(a),d=ye.fromDom(e);return!t&&Sf(c)?j.some(Pa.remove(c.getNode(!0))):t&&Sa(c)?j.some(Pa.remove(c.getNode())):!t&&Sa(c)&&gb(d,c,s)?Ix(d,c,s).map(h=>Pa.remove(h.getNode())):t&&Sf(c)&&dv(d,c,s)?K3(d,c,s).map(h=>Pa.remove(h.getNode())):gP(e,t,c,s)},bP=(e,t)=>o=>(e._selectionOverrides.hideFakeCaret(),sl(e,t,ye.fromDom(o)),!0),yP=(e,t)=>o=>{const s=t?Ue.before(o):Ue.after(o);return e.selection.setRng(s.toRange()),!0},vP=e=>t=>(e.selection.setRng(t.toRange()),!0),ED=(e,t)=>j.from(Gd(e.getBody(),t)),_P=(e,t)=>{const o=e.selection.getNode();return ED(e,o).filter($o).fold(()=>hP(e.getBody(),t,e.selection.getRng(),e.schema).map(s=>()=>s.fold(bP(e,t),yP(e,t),vP(e))),()=>j.some(dt))},xP=e=>{Be(Mr(e,".mce-offscreen-selection"),Jn)},wP=(e,t)=>{const o=e.selection.getNode();return $o(o)&&!Qu(o)?ED(e,o.parentNode).filter($o).fold(()=>j.some(()=>{xP(ye.fromDom(e.getBody())),sl(e,t,ye.fromDom(e.selection.getNode())),jx(e)}),()=>j.some(dt)):hA(e)?j.some(()=>{Ux(e,e.selection.getRng(),ye.fromDom(e.getBody()))}):j.none()},AD=e=>{const t=e.dom,o=e.selection,s=Gd(e.getBody(),o.getNode());if(Rl(s)&&t.isBlock(s)&&t.isEmpty(s)){const a=t.create("br",{"data-mce-bogus":"1"});t.setHTML(s,""),s.appendChild(a),o.setRng(Ue.before(a).toRange())}return!0},bA=(e,t)=>e.selection.isCollapsed()?_P(e,t):wP(e,t),TD=e=>e.hasOwnProperty("text"),OD=e=>e.hasOwnProperty("marker"),zD=(e,t)=>{const o=(c,d)=>{if(wt(c))return{text:c,offset:d};{const h=t(),_=c.childNodes;return d<_.length?(c.insertBefore(h,_[d]),{marker:h,before:!0}):(c.appendChild(h),{marker:h,before:!1})}},s=o(e.endContainer,e.endOffset);return{start:o(e.startContainer,e.startOffset),end:s}},ND=e=>{var t,o;const{start:s,end:a}=e,c=new window.Range;return TD(s)?c.setStart(s.text,s.offset):OD(s)&&(s.before?c.setStartBefore(s.marker):c.setStartAfter(s.marker),(t=s.marker.parentNode)===null||t===void 0||t.removeChild(s.marker)),TD(a)?c.setEnd(a.text,a.offset):OD(a)&&(a.before?c.setEndBefore(a.marker):c.setEndAfter(a.marker),(o=a.marker.parentNode)===null||o===void 0||o.removeChild(a.marker)),c},yA=(e,t)=>{var o;const s=e.dom,a=s.getParent(e.selection.getStart(),s.isBlock),c=s.getParent(e.selection.getEnd(),s.isBlock),d=e.getBody();if(((o=a==null?void 0:a.nodeName)===null||o===void 0?void 0:o.toLowerCase())==="div"&&a&&c&&a===d.firstChild&&c===d.lastChild&&!s.isEmpty(d)){const _=a.cloneNode(!1),z=()=>{if(t?$C(e):Vx(e),d.firstChild!==a){const I=zD(e.selection.getRng(),()=>document.createElement("span"));Array.from(d.childNodes).forEach(H=>_.appendChild(H)),d.appendChild(_),e.selection.setRng(ND(I))}};return j.some(z)}return j.none()},kP=(e,t)=>{const o=Ue.fromRangeStart(e.selection.getRng());return cd(t,e.getBody(),o).filter(s=>t?V3(s):j3(s)).bind(s=>Y_(t?0:-1,s)).map(s=>()=>e.selection.select(s))},vA=(e,t)=>e.selection.isCollapsed()?kP(e,t):j.none(),m1=wt,DD=e=>m1(e)&&e.data[0]===ua,RD=e=>m1(e)&&e.data[e.data.length-1]===ua,MD=e=>{var t;return((t=e.ownerDocument)!==null&&t!==void 0?t:document).createTextNode(ua)},CP=e=>{var t;if(m1(e.previousSibling))return RD(e.previousSibling)||e.previousSibling.appendData(ua),e.previousSibling;if(m1(e))return DD(e)||e.insertData(0,ua),e;{const o=MD(e);return(t=e.parentNode)===null||t===void 0||t.insertBefore(o,e),o}},SP=e=>{var t,o;if(m1(e.nextSibling))return DD(e.nextSibling)||e.nextSibling.insertData(0,ua),e.nextSibling;if(m1(e))return RD(e)||e.appendData(ua),e;{const s=MD(e);return e.nextSibling?(t=e.parentNode)===null||t===void 0||t.insertBefore(s,e.nextSibling):(o=e.parentNode)===null||o===void 0||o.appendChild(s),s}},Xw=(e,t)=>e?CP(t):SP(t),LD=Ht(Xw,!0),EP=Ht(Xw,!1),BD=(e,t)=>wt(e.container())?Xw(t,e.container()):Xw(t,e.getNode()),PD=(e,t)=>{const o=t.get();return o&&e.container()===o&&pm(o)},_A=(e,t)=>t.fold(o=>{wg(e.get());const s=LD(o);return e.set(s),j.some(Ue(s,s.length-1))},o=>No(o).map(s=>{if(PD(s,e)){const a=e.get();return Ue(a,1)}else{wg(e.get());const a=BD(s,!0);return e.set(a),Ue(a,1)}}),o=>$d(o).map(s=>{if(PD(s,e)){const a=e.get();return Ue(a,a.length-1)}else{wg(e.get());const a=BD(s,!1);return e.set(a),Ue(a,a.length-1)}}),o=>{wg(e.get());const s=EP(o);return e.set(s),j.some(Ue(s,1))}),ID=(e,t)=>{for(let o=0;o{const o=kg(t,e);return o||e},AP=(e,t,o)=>{const s=mO(o),a=FD(t,s.container());return Pg(e,a,s).fold(()=>Pl(a,s).bind(Ht(Pg,e,a)).map(c=>Fl.before(c)),j.none)},HD=(e,t)=>Cg(e,t)===null,$D=(e,t,o)=>Pg(e,t,o).filter(Ht(HD,t)),TP=(e,t,o)=>{const s=Xy(o);return $D(e,t,s).bind(a=>Ic(a,s).isNone()?j.some(Fl.start(a)):j.none())},OP=(e,t,o)=>{const s=mO(o);return $D(e,t,s).bind(a=>Pl(a,s).isNone()?j.some(Fl.end(a)):j.none())},zP=(e,t,o)=>{const s=Xy(o),a=FD(t,s.container());return Pg(e,a,s).fold(()=>Ic(a,s).bind(Ht(Pg,e,a)).map(c=>Fl.after(c)),j.none)},VD=e=>!mv(xA(e)),Im=(e,t,o)=>ID([AP,TP,OP,zP],[e,t,o]).filter(VD),xA=e=>e.fold(Ao,Ao,Ao,Ao),jD=e=>e.fold(Ge("before"),Ge("start"),Ge("end"),Ge("after")),Zv=e=>e.fold(Fl.before,Fl.before,Fl.after,Fl.after),Jw=e=>e.fold(Fl.start,Fl.start,Fl.end,Fl.end),NP=(e,t)=>jD(e)===jD(t)&&xA(e)===xA(t),UD=(e,t,o,s,a,c)=>va(Pg(t,o,s),Pg(t,o,a),(d,h)=>d!==h&&fO(o,d,h)?Fl.after(e?d:h):c).getOr(c),DP=(e,t)=>e.fold(zo,o=>!NP(o,t)),RP=(e,t,o,s,a)=>{const c=Kd(e,a);return cd(e,o,c).map(Ht(Kd,e)).fold(()=>s.map(Zv),_=>Im(t,o,_).map(Ht(UD,e,t,o,c,_)).filter(Ht(DP,s))).filter(VD)},MP=(e,t)=>e?t.fold(Kt(j.some,Fl.start),j.none,Kt(j.some,Fl.after),j.none):t.fold(j.none,Kt(j.some,Fl.before),j.none,Kt(j.some,Fl.end)),LP=(e,t,o,s)=>{const a=Kd(e,s),c=Im(t,o,a);return Im(t,o,a).bind(Ht(MP,e)).orThunk(()=>RP(e,t,o,c,s))},BP=e=>Gt(e.selection.getSel().modify),ZD=(e,t,o)=>{const s=e?1:-1;return t.setRng(Ue(o.container(),o.offset()+s).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0},wA=(e,t)=>{const o=t.selection.getRng(),s=e?Ue.fromRangeEnd(o):Ue.fromRangeStart(o);return BP(t)?e&&Lh(s)?ZD(!0,t.selection,s):!e&&gy(s)?ZD(!1,t.selection,s):!1:!1};var Fu;(function(e){e[e.Br=0]="Br",e[e.Block=1]="Block",e[e.Wrap=2]="Wrap",e[e.Eol=3]="Eol"})(Fu||(Fu={}));const Qw=(e,t)=>e===Ti.Backwards?sa(t):t,WD=(e,t,o)=>e===Ti.Forwards?t.next(o):t.prev(o),PP=(e,t,o,s)=>Hs(s.getNode(t===Ti.Forwards))?Fu.Br:xm(o,s)===!1?Fu.Block:Fu.Wrap,qD=(e,t,o,s)=>{const a=So(o);let c=s;const d=[];for(;c;){const h=WD(t,a,c);if(!h)break;if(Hs(h.getNode(!1)))return t===Ti.Forwards?{positions:Qw(t,d).concat([h]),breakType:Fu.Br,breakAt:j.some(h)}:{positions:Qw(t,d),breakType:Fu.Br,breakAt:j.some(h)};if(!h.isVisible()){c=h;continue}if(e(c,h)){const _=PP(o,t,c,h);return{positions:Qw(t,d),breakType:_,breakAt:j.some(h)}}d.push(h),c=h}return{positions:Qw(t,d),breakType:Fu.Eol,breakAt:j.none()}},KD=(e,t,o,s)=>t(o,s).breakAt.map(a=>{const c=t(o,a).positions;return e===Ti.Backwards?c.concat(a):[a].concat(c)}).getOr([]),kA=(e,t)=>ko(e,(o,s)=>o.fold(()=>j.some(s),a=>va(St(a.getClientRects()),St(s.getClientRects()),(c,d)=>{const h=Math.abs(t-c.left);return Math.abs(t-d.left)<=h?s:a}).or(o)),j.none()),ek=(e,t)=>St(t.getClientRects()).bind(o=>kA(e,o.left)),Wv=Ht(qD,Ue.isAbove,-1),qv=Ht(qD,Ue.isBelow,1),GD=Ht(KD,-1,Wv),tk=Ht(KD,1,qv),YD=(e,t)=>Wv(e,t).breakAt.isNone(),XD=(e,t)=>qv(e,t).breakAt.isNone(),IP=e=>No(e).map(t=>[t].concat(qv(e,t).positions)).getOr([]),JD=e=>$d(e).map(t=>Wv(e,t).positions.concat(t)).getOr([]),Rb=(e,t)=>ek(GD(e,t),t),FP=(e,t)=>ek(tk(e,t),t),HP=$o,QD=(e,t)=>Math.abs(e.left-t),dc=(e,t)=>Math.abs(e.right-t),eR=e=>Ha(e,"node"),tR=(e,t)=>vi(e,(o,s)=>{const a=Math.min(QD(o,t),dc(o,t)),c=Math.min(QD(s,t),dc(s,t));return c===a&&eR(s)&&HP(s.node)||c{const t=o=>dn(o,s=>{const a=df(s);return a.node=e,a});if(no(e))return t(e.getClientRects());if(wt(e)){const o=e.ownerDocument.createRange();return o.setStart(e,0),o.setEnd(e,e.data.length),t(o.getClientRects())}else return[]},oR=e=>Bn(e,$P);var Kv;(function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"})(Kv||(Kv={}));const VP=(e,t,o,s)=>{let a=s;for(;a=C0(a,e,$h,t);)if(o(a))return},CA=(e,t,o,s,a,c)=>{let d=0;const h=[],_=H=>{let V=oR([H]);e===-1&&(V=V.reverse());for(let ee=0;ee0&&t(le,ga(h))&&d++,le.line=d,a(le))return!0;h.push(le)}}return!1},z=ga(c.getClientRects());if(!z)return h;const I=c.getNode();return I&&(_(I),VP(e,s,_,I)),h},jP=(e,t)=>t.line>e,UP=(e,t)=>t.line===e,ZP=Ht(CA,Kv.Up,mf,Sp),WP=Ht(CA,Kv.Down,Sp,mf),nR=e=>ga(e.getClientRects()),p1=(e,t,o,s)=>{const a=So(t);let c,d,h,_;const z=[];let I=0;e===1?(c=a.next,d=Sp,h=mf,_=Ue.after(s)):(c=a.prev,d=mf,h=Sp,_=Ue.before(s));const H=nR(_);do{if(!_.isVisible())continue;const V=nR(_);if(h(V,H))continue;z.length>0&&d(V,ga(z))&&I++;const ee=df(V);if(ee.position=_,ee.line=I,o(ee))return z;z.push(ee)}while(_=c(_));return z},SA=e=>t=>jP(e,t),g1=e=>t=>UP(e,t),Tf=(e,t)=>{e.selection.setRng(t),Ud(e,e.selection.getRng())},ok=(e,t,o)=>j.some(Yw(e,t,o)),EA=(e,t,o,s,a,c)=>{const d=t===Ti.Forwards,h=So(e.getBody()),_=Ht(C2,d?h.next:h.prev),z=d?s:a;if(!o.collapsed){const le=bg(o);if(c(le))return gr(t,e,le,t===Ti.Backwards,!1);if(hA(e)){const oe=o.cloneRange();return oe.collapse(t===Ti.Backwards),j.from(oe)}}const I=A0(t,e.getBody(),o);if(z(I))return Uv(e,I.getNode(!d));let H=_(I);const V=Cp(o);if(H)H=Kd(d,H);else return V?j.some(o):j.none();if(z(H))return gr(t,e,H.getNode(!d),d,!1);const ee=_(H);return ee&&z(ee)&&J_(H,ee)?gr(t,e,ee.getNode(!d),d,!1):V?ok(e,H.toRange(),!1):j.none()},sR=(e,t,o,s,a,c)=>{const d=A0(t,e.getBody(),o),h=ga(d.getClientRects()),_=t===Kv.Down,z=e.getBody();if(!h)return j.none();if(hA(e)){const fe=_?Ue.fromRangeEnd(o):Ue.fromRangeStart(o);return(_?FP:Rb)(z,fe).orThunk(()=>j.from(fe)).map(Oe=>Oe.toRange())}const H=(_?WP:ZP)(z,SA(1),d),V=rt(H,g1(1)),ee=h.left,le=tR(V,ee);if(le&&c(le.node)){const fe=Math.abs(ee-le.left),ke=Math.abs(ee-le.right);return gr(t,e,le.node,feYw(e,fe.toRange(),!1)):j.none()},nk=(e,t)=>{const o=e.selection.getRng(),s=t?Ue.fromRangeEnd(o):Ue.fromRangeStart(o),a=yM(s.container(),e.getBody());if(t){const c=qv(a,s);return Vo(c.positions)}else{const c=Wv(a,s);return St(c.positions)}},rR=(e,t,o)=>nk(e,t).filter(o).exists(s=>(e.selection.setRng(s.toRange()),!0)),Gv=(e,t)=>{const o=e.dom.createRng();o.setStart(t.container(),t.offset()),o.setEnd(t.container(),t.offset()),e.selection.setRng(o)},AA=(e,t)=>{e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},TA=(e,t,o)=>_A(t,o).map(s=>(Gv(e,s),o)),aR=(e,t,o)=>{const s=Ue.fromRangeStart(e);if(e.collapsed)return s;{const a=Ue.fromRangeEnd(e);return o?Ic(t,a).getOr(a):Pl(t,s).getOr(s)}},iR=(e,t,o)=>{const s=e.getBody(),a=aR(e.selection.getRng(),s,o),c=Ht(bb,e);return LP(o,c,s,a).bind(h=>TA(e,t,h))},lR=(e,t,o)=>{const s=dn(Mr(ye.fromDom(t.getRoot()),'*[data-mce-selected="inline-boundary"]'),d=>d.dom),a=rt(s,e),c=rt(o,e);Be(os(a,c),Ht(AA,!1)),Be(os(c,a),Ht(AA,!0))},OA=(e,t)=>{const o=t.get();if(e.selection.isCollapsed()&&!e.composing&&o){const s=Ue.fromRangeStart(e.selection.getRng());Ue.isTextPosition(s)&&!FC(s)&&(Gv(e,gM(o,s)),t.set(null))}},cR=(e,t,o,s)=>{if(t.selection.isCollapsed()){const a=rt(s,e);Be(a,c=>{const d=Ue.fromRangeStart(t.selection.getRng());Im(e,t.getBody(),d).bind(h=>TA(t,o,h))})}},zA=(e,t,o)=>Oy(e)?iR(e,t,o).isSome():!1,NA=(e,t,o)=>Oy(t)?wA(e,t):!1,dR=e=>{const t=Er(null),o=Ht(bb,e);return e.on("NodeChange",s=>{Oy(e)&&(lR(o,e.dom,s.parents),OA(e,t),cR(o,e,t,s.parents))}),t},uR=Ht(NA,!0),fR=Ht(NA,!1),Yv=(e,t,o)=>{if(Oy(e)){const s=nk(e,t).getOrThunk(()=>{const a=e.selection.getRng();return t?Ue.fromRangeEnd(a):Ue.fromRangeStart(a)});return Im(Ht(bb,e),e.getBody(),s).exists(a=>{const c=Zv(a);return _A(o,c).exists(d=>(Gv(e,d),!0))})}else return!1},DA=(e,t)=>{const o=document.createRange();return o.setStart(e.container(),e.offset()),o.setEnd(t.container(),t.offset()),o},RA=e=>va(No(e),$d(e),(t,o)=>{const s=Kd(!0,t),a=Kd(!1,o);return Pl(e,s).forall(c=>c.isEqual(a))}).getOr(!0),Xv=(e,t)=>o=>_A(t,o).map(s=>()=>Gv(e,s)),MA=(e,t,o,s)=>{const a=e.getBody(),c=Ht(bb,e);e.undoManager.ignore(()=>{e.selection.setRng(DA(o,s)),Vx(e),Im(c,a,Ue.fromRangeStart(e.selection.getRng())).map(Jw).bind(Xv(e,t)).each(cn)}),e.nodeChanged()},mR=(e,t)=>{const o=kg(t,e);return o||e},pR=(e,t,o,s)=>{const a=mR(e.getBody(),s.container()),c=Ht(bb,e),d=Im(c,a,s);return d.bind(_=>o?_.fold(Ge(j.some(Jw(_))),j.none,Ge(j.some(Zv(_))),j.none):_.fold(j.none,Ge(j.some(Zv(_))),j.none,Ge(j.some(Jw(_))))).map(Xv(e,t)).getOrThunk(()=>{const _=eb(o,a,s),z=_.bind(I=>Im(c,a,I));return va(d,z,()=>Pg(c,a,s).bind(I=>RA(I)?j.some(()=>{sl(e,o,ye.fromDom(I))}):j.none())).getOrThunk(()=>z.bind(()=>_.map(I=>()=>{o?MA(e,t,s,I):MA(e,t,I,s)})))})},Jv=(e,t,o)=>{if(e.selection.isCollapsed()&&Oy(e)){const s=Ue.fromRangeStart(e.selection.getRng());return pR(e,t,o,s)}return j.none()},gR=e=>Yc(e)>1,LA=(e,t)=>{const o=ye.fromDom(e.getBody()),s=ye.fromDom(e.selection.getStart()),a=Vc(s,o);return rs(a,t).fold(Ge(a),c=>a.slice(0,c))},hR=e=>Yc(e)===1,qP=e=>LA(e,t=>e.schema.isBlock(En(t))||gR(t)),bR=e=>LA(e,t=>e.schema.isBlock(En(t))),BA=(e,t)=>{const o=Ht(e1,e);return Bn(t,s=>o(s)?[s.dom]:[])},Qv=e=>{const t=bR(e);return BA(e,t)},yR=(e,t,o,s)=>{const a=BA(t,s);if(a.length===0)sl(t,e,o);else{const c=kS(o.dom,a);t.selection.setRng(c.toRange())}},vR=(e,t)=>{const o=rt(qP(e),hR);return Vo(o).bind(s=>{const a=Ue.fromRangeStart(e.selection.getRng());return hO(t,a,s.dom)&&!lx(s)?j.some(()=>yR(t,e,s,o)):j.none()})},PA=(e,t)=>{const o=t.parentElement;return Hs(t)&&!ot(o)&&e.dom.isEmpty(o)},KP=e=>lx(ye.fromDom(e)),IA=(e,t)=>{const o=e.selection.getStart(),s=PA(e,o)||KP(o)?kS(o,t):oL(e.selection.getRng(),t);e.selection.setRng(s.toRange())},GP=(e,t)=>{const o=os(t,Qv(e));o.length>0&&IA(e,o)},FA=e=>wt(e.startContainer),_R=e=>e.startOffset===0&&FA(e),YP=(e,t)=>{const o=t.startContainer.parentElement;return!ot(o)&&e1(e,ye.fromDom(o))},XP=e=>{const t=e.startContainer.parentNode,o=e.endContainer.parentNode;return!ot(t)&&!ot(o)&&t.isEqualNode(o)},n=e=>{const t=e.endContainer;return e.endOffset===(wt(t)?t.length:t.childNodes.length)},r=e=>XP(e)&&n(e),i=e=>!e.endContainer.isEqualNode(e.commonAncestorContainer),l=e=>r(e)||i(e),u=e=>{const t=e.selection.getRng();return _R(t)&&YP(e,t)&&l(t)},f=e=>{if(u(e)){const t=Qv(e);return j.some(()=>{Vx(e),GP(e,t)})}else return j.none()},p=(e,t)=>e.selection.isCollapsed()?vR(e,t):f(e),y=(e,t)=>uh(e,o=>dd(o.dom),o=>t.isBlock(En(o))),v=e=>y(ye.fromDom(e.selection.getStart()),e.schema),C=e=>{const t=e.selection.getRng();return t.collapsed&&(FA(t)||e.dom.isEmpty(t.startContainer))&&!v(e)},O=e=>(C(e)&&IA(e,[]),!0),A=(e,t,o)=>Fe(o)?j.some(()=>{e._selectionOverrides.hideFakeCaret(),sl(e,t,ye.fromDom(o))}):j.none(),R=(e,t)=>{const o=t?mb:Wy,s=t?Ti.Forwards:Ti.Backwards,a=A0(s,e.getBody(),e.selection.getRng());return o(a)?A(e,t,a.getNode(!t)):j.from(Kd(t,a)).filter(c=>o(c)&&J_(a,c)).bind(c=>A(e,t,c.getNode(!t)))},F=(e,t)=>{const o=e.selection.getNode();return Xe(o)?A(e,t,o):j.none()},$=(e,t)=>e.selection.isCollapsed()?R(e,t):F(e,t),G=e=>_r(e,t=>Rl(t.dom)||$o(t.dom)).exists(t=>Rl(t.dom)),J=e=>Vr(e??"").getOr(0),ae=(e,t)=>{const o=e||Nh(t)?"margin":"padding",s=ur(t,"direction")==="rtl"?"-right":"-left";return o+s},X=(e,t,o,s,a,c)=>{const d=ae(o,ye.fromDom(c)),h=J(e.getStyle(c,d));if(t==="outdent"){const _=Math.max(0,h-s);e.setStyle(c,d,_?_+a:"")}else{const _=h+s+a;e.setStyle(c,d,_)}},Y=(e,t)=>$s(t,o=>{const s=ae(ST(e),o),a=Us(o,s).map(J).getOr(0);return e.dom.getContentEditable(o.dom)!=="false"&&a>0}),ne=e=>{const t=we(e);return!e.mode.isReadOnly()&&(t.length>1||Y(e,t))},ie=e=>Rh(e)||mm(e),de=e=>ia(e).exists(ie),we=e=>rt(ci(e.selection.getSelectedBlocks()),t=>!ie(t)&&!de(t)&&G(t)),ze=(e,t)=>{var o,s;const{dom:a}=e,c=ld(e),d=(s=(o=/[a-z%]+$/i.exec(c))===null||o===void 0?void 0:o[0])!==null&&s!==void 0?s:"px",h=J(c),_=ST(e);Be(we(e),z=>{X(a,t,_,h,d,z.dom)})},tt=e=>ze(e,"indent"),Je=e=>ze(e,"outdent"),Ze=e=>{if(e.selection.isCollapsed()&&ne(e)){const t=e.dom,o=e.selection.getRng(),s=Ue.fromRangeStart(o),a=t.getParent(o.startContainer,t.isBlock);if(a!==null&&Px(ye.fromDom(a),s,e.schema))return j.some(()=>Je(e))}return j.none()},kt=(e,t,o)=>Kr([Ze,bA,pA,(s,a)=>Jv(s,t,a),Kw,Ip,vA,$,uA,p,yA],s=>s(e,o)).filter(s=>e.selection.isEditable()),Wt=(e,t)=>{kt(e,t,!1).fold(()=>{e.selection.isEditable()&&(Vx(e),jx(e))},cn)},ro=(e,t)=>{kt(e,t,!0).fold(()=>{e.selection.isEditable()&&$C(e)},cn)},yo=(e,t)=>{e.addCommand("delete",()=>{Wt(e,t)}),e.addCommand("forwardDelete",()=>{ro(e,t)})},Ho=5,xn=400,Bs=e=>e.touches===void 0||e.touches.length!==1?j.none():j.some(e.touches[0]),Xs=(e,t)=>{const o=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y);return o>Ho||s>Ho},on=e=>{const t=Jr(),o=Er(!1),s=mg(a=>{e.dispatch("longpress",{...a,type:"longpress"}),o.set(!0)},xn);e.on("touchstart",a=>{Bs(a).each(c=>{s.cancel();const d={x:c.clientX,y:c.clientY,target:a.target};s.throttle(a),o.set(!1),t.set(d)})},!0),e.on("touchmove",a=>{s.cancel(),Bs(a).each(c=>{t.on(d=>{Xs(c,d)&&(t.clear(),o.set(!1),e.dispatch("longpresscancel"))})})},!0),e.on("touchend touchcancel",a=>{s.cancel(),a.type!=="touchcancel"&&t.get().filter(c=>c.target.isEqualNode(a.target)).each(()=>{o.get()?a.preventDefault():e.dispatch("tap",{...a,type:"tap"})})},!0)},Rn=(e,t)=>Ro(e,t.nodeName),Co=(e,t)=>wt(t)?!0:no(t)?!Rn(e.getBlockElements(),t)&&!ud(t)&&!Oc(e,t)&&!Qr(t):!1,Js=(e,t,o)=>Ln(ac(ye.fromDom(o),ye.fromDom(t)),s=>Rn(e,s.dom)),ms=(e,t)=>{if(wt(t)){if(t.data.length===0)return!0;if(/^\s+$/.test(t.data))return!t.nextSibling||Rn(e,t.nextSibling)||Qr(t.nextSibling)}return!1},zi=e=>e.dom.create(Vi(e),g0(e)),Ni=e=>{const t=e.dom,o=e.selection,s=e.schema,a=s.getBlockElements(),c=o.getStart(),d=e.getBody();let h,_,z=null;const I=Vi(e);if(!c||!no(c))return;const H=d.nodeName.toLowerCase();if(!s.isValidChild(H,I.toLowerCase())||Js(a,d,c))return;if(d.firstChild===d.lastChild&&Hs(d.firstChild)){h=zi(e),h.appendChild(Au().dom),d.replaceChild(h,d.firstChild),e.selection.setCursorLocation(h,0),e.nodeChanged();return}let V=d.firstChild;for(;V;)if(no(V)&&Qn(s,V),Co(s,V)){if(ms(a,V)){_=V,V=V.nextSibling,t.remove(_);continue}if(!h){if(!z&&e.hasFocus()&&(z=zD(e.selection.getRng(),()=>document.createElement("span"))),!V.parentNode){V=null;break}h=zi(e),d.insertBefore(h,V)}_=V,V=V.nextSibling,h.appendChild(_)}else h=null,V=V.nextSibling;z&&(e.selection.setRng(ND(z)),e.nodeChanged())},Ia=(e,t,o)=>{const s=ye.fromDom(zi(e)),a=Au();fr(s,a),o(t,s);const c=document.createRange();return c.setStartBefore(a.dom),c.setEndBefore(a.dom),c},Ea=e=>{e.on("NodeChange",()=>Ni(e))},Zp=e=>t=>(" "+t.attr("class")+" ").indexOf(e)!==-1,h1=(e,t,o)=>function(s){const a=arguments,c=a[a.length-2],d=c>0?t.charAt(c-1):"";if(d==='"')return s;if(d===">"){const h=t.lastIndexOf("<",c);if(h!==-1&&t.substring(h,c).indexOf('contenteditable="false"')!==-1)return s}return''+e.dom.encode(typeof a[1]=="string"?a[1]:a[0])+""},Jg=(e,t,o)=>{let s=t.length,a=o.content;if(o.format!=="raw"){for(;s--;)a=a.replace(t[s],h1(e,a,Yh(e)));o.content=a}},Wp=(e,t)=>$s(e,o=>{const s=t.match(o);return s!==null&&s[0].length===t.length}),e_=e=>{const t="contenteditable",o=" "+zt.trim(lM(e))+" ",s=" "+zt.trim(Yh(e))+" ",a=Zp(o),c=Zp(s),d=FT(e);d.length>0&&e.on("BeforeSetContent",h=>{Jg(e,d,h)}),e.parser.addAttributeFilter("class",h=>{let _=h.length;for(;_--;){const z=h[_];a(z)?z.attr(t,"true"):c(z)&&z.attr(t,"false")}}),e.serializer.addAttributeFilter(t,h=>{let _=h.length;for(;_--;){const z=h[_];if(!a(z)&&!c(z))continue;const I=z.attr("data-mce-content");d.length>0&&I?Wp(d,I)?(z.name="#text",z.type=3,z.raw=!0,z.value=I):z.remove():z.attr(t,null)}})},Qg=e=>nt(ye.fromDom(e.getBody()),"*[data-mce-caret]").map(t=>t.dom).getOrNull(),Fm=(e,t)=>{t.hasAttribute("data-mce-caret")&&(kp(t),e.selection.setRng(e.selection.getRng()),e.selection.scrollIntoView(t))},Mb=(e,t)=>{const o=Qg(e);if(o){if(t.type==="compositionstart"){t.preventDefault(),t.stopPropagation(),Fm(e,o);return}my(o)&&(Fm(e,o),e.undoManager.add())}},Lb=e=>{e.on("keyup compositionstart",Ht(Mb,e))},b1=$o,sk=(e,t,o)=>EA(t,e,o,Sa,Sf,b1),t_=(e,t,o)=>sR(t,e,o,c=>Sa(c)||U3(c),c=>Sf(c)||qy(c),b1),eh=e=>{const t=e.dom.create(Vi(e));return t.innerHTML='
    ',t},Hm=(e,t,o)=>{const s=So(e.getBody()),a=Ht(C2,t===1?s.next:s.prev);if(o.collapsed){const c=e.dom.getParent(o.startContainer,"PRE");if(!c)return;if(!a(Ue.fromRangeStart(o))){const h=ye.fromDom(eh(e));t===1?Ne(ye.fromDom(c),h):Zs(ye.fromDom(c),h),e.selection.select(h.dom,!0),e.selection.collapse()}}},qp=(e,t)=>{const o=t?Ti.Forwards:Ti.Backwards,s=e.selection.getRng();return sk(o,e,s).orThunk(()=>(Hm(e,o,s),j.none()))},o_=(e,t)=>{const o=t?1:-1,s=e.selection.getRng();return t_(o,e,s).orThunk(()=>(Hm(e,o,s),j.none()))},n_=(e,t)=>{const o=t?e.getEnd(!0):e.getStart(!0);return mv(o)?!t:t},Kn=(e,t)=>qp(e,n_(e.selection,t)).exists(o=>(Tf(e,o),!0)),$m=(e,t)=>o_(e,t).exists(o=>(Tf(e,o),!0)),Hu=(e,t)=>rR(e,t,t?Sf:Sa),Bb=(e,t)=>gA(e,!t).map(o=>{const s=o.toRange(),a=e.selection.getRng();return t?s.setStart(a.startContainer,a.startOffset):s.setEnd(a.endContainer,a.endOffset),s}).exists(o=>(Tf(e,o),!0)),rk=e=>mn(["figcaption"],En(e)),Kp=(e,t,o)=>{const s=Ht(kn,t);return _r(ye.fromDom(e.container()),a=>o.isBlock(En(a)),s).filter(rk)},y1=(e,t,o)=>t?XD(e.dom,o):YD(e.dom,o),HA=(e,t)=>{const o=ye.fromDom(e.getBody()),s=Ue.fromRangeStart(e.selection.getRng());return Kp(s,o,e.schema).exists(()=>{if(y1(o,t,s)){const c=Ia(e,o,t?fr:Wa);return e.selection.setRng(c),!0}else return!1})},ak=(e,t)=>e.selection.isCollapsed()?HA(e,t):!1,JP=(e,t,o)=>{const s=e.selection.getRng(),a=Ue.fromRangeStart(s);return e.getBody().firstChild===t&&YD(o,a)?(e.execCommand("InsertNewBlockBefore"),!0):!1},v1=(e,t)=>{const o=e.selection.getRng(),s=Ue.fromRangeStart(o);return e.getBody().lastChild===t&&XD(t,s)?(e.execCommand("InsertNewBlockAfter"),!0):!1},QP=(e,t)=>t?j.from(e.dom.getParent(e.selection.getNode(),"details")).map(o=>v1(e,o)).getOr(!1):j.from(e.dom.getParent(e.selection.getNode(),"summary")).bind(o=>j.from(e.dom.getParent(o,"details")).map(s=>JP(e,s,o))).getOr(!1),al=(e,t)=>QP(e,t),Pb={shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0},eI=e=>dn(e,t=>({...Pb,...t})),xR=e=>dn(e,t=>({...Pb,...t})),ik=(e,t)=>t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey,wR=(e,t)=>Bn(eI(e),o=>ik(o,t)?[o]:[]),kR=(e,t)=>Bn(xR(e),o=>ik(o,t)?[o]:[]),jo=(e,...t)=>()=>e.apply(null,t),th=(e,t)=>On(wR(e,t),o=>o.action()),lk=(e,t)=>Kr(kR(e,t),o=>o.action()),oh=(e,t)=>{const o=t?Ti.Forwards:Ti.Backwards,s=e.selection.getRng();return EA(e,o,s,mb,Wy,Xe).exists(a=>(Tf(e,a),!0))},_1=(e,t)=>{const o=t?1:-1,s=e.selection.getRng();return sR(e,o,s,mb,Wy,Xe).exists(a=>(Tf(e,a),!0))},$A=(e,t)=>rR(e,t,t?Wy:mb),VA=zn.generate([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),eu={...VA,none:e=>VA.none(e)},CR=(e,t)=>UA(e,t,zo),UA=(e,t,o)=>Bn(xa(e),s=>ls(s,t)?o(s)?[s]:[]:UA(s,t,o)),SR=(e,t,o=fn)=>{if(o(t))return j.none();if(mn(e,En(t)))return j.some(t);const s=a=>ls(a,"table")||o(a);return El(t,e.join(","),s)},ER=(e,t)=>SR(["td","th"],e,t),tI=e=>CR(e,"th,td"),Ie=(e,t)=>Xr(e,"table",t),vo=(e,t,o,s,a=zo)=>{const c=s===1;if(!c&&o<=0)return eu.first(e[0]);if(c&&o>=e.length-1)return eu.last(e[e.length-1]);{const d=o+s,h=e[d];return a(h)?eu.middle(t,h):vo(e,t,d,s,a)}},Zo=(e,t)=>Ie(e,t).bind(o=>{const s=tI(o);return rs(s,c=>kn(e,c)).map(c=>({index:c,all:s}))}),Ps=(e,t,o)=>Zo(e,o).fold(()=>eu.none(e),a=>vo(a.all,e,a.index,1,t)),Or=(e,t,o)=>Zo(e,o).fold(()=>eu.none(),a=>vo(a.all,e,a.index,-1,t)),Wr=e=>z_(e).filter(t=>t.trim().length!==0||t.indexOf(da)>-1).isSome(),Ir=e=>ai(e)&&Da(e,"contenteditable")==="false",ma=["img","br"],x1=e=>Wr(e)||mn(ma,En(e))||Ir(e),oI=e=>ca(e,x1),AR=(e,t)=>({left:e.left-t,top:e.top-t,right:e.right+t*2,bottom:e.bottom+t*2,width:e.width+t,height:e.height+t}),i8=(e,t)=>Bn(t,o=>{const s=AR(df(o.getBoundingClientRect()),-1);return[{x:s.left,y:e(s),cell:o},{x:s.right,y:e(s),cell:o}]}),AV=(e,t,o)=>ko(e,(s,a)=>s.fold(()=>j.some(a),c=>{const d=Math.sqrt(Math.abs(c.x-t)+Math.abs(c.y-o)),h=Math.sqrt(Math.abs(a.x-t)+Math.abs(a.y-o));return j.some(h{const c=Mr(ye.fromDom(o),"td,th,caption").map(h=>h.dom),d=rt(i8(e,c),h=>t(h,a));return AV(d,s,a).map(h=>h.cell)},TV=e=>e.bottom,OV=e=>e.top,zV=(e,t)=>e.ye.y>t,DV=Ht(l8,TV,zV),RV=Ht(l8,OV,NV),MV=(e,t)=>St(t.getClientRects()).bind(o=>DV(e,o.left,o.top)).bind(o=>ek(JD(o),t)),LV=(e,t)=>Vo(t.getClientRects()).bind(o=>RV(e,o.left,o.top)).bind(o=>ek(IP(o),t)),BV=(e,t,o)=>o.breakAt.exists(s=>e(t,s).breakAt.isSome()),PV=e=>e.breakType===Fu.Wrap&&e.positions.length===0,IV=e=>e.breakType===Fu.Br&&e.positions.length===1,c8=(e,t,o)=>{const s=e(t,o);return PV(s)||!Hs(o.getNode())&&IV(s)?!BV(e,t,s):s.breakAt.isNone()},FV=Ht(c8,Wv),HV=Ht(c8,qv),$V=(e,t,o)=>{const s=Ue.fromRangeStart(t);return Dy(!e,o).exists(a=>a.isEqual(s))},VV=(e,t,o,s)=>{const a=e.selection.getRng(),c=t?1:-1;return v2()&&$V(t,a,o)?(gr(c,e,o,!t,!1).each(d=>{Tf(e,d)}),!0):!1},jV=(e,t,o)=>MV(t,o).orThunk(()=>St(o.getClientRects()).bind(s=>kA(GD(e,Ue.before(t)),s.left))).getOr(Ue.before(t)),UV=(e,t,o)=>LV(t,o).orThunk(()=>St(o.getClientRects()).bind(s=>kA(tk(e,Ue.after(t)),s.left))).getOr(Ue.after(t)),d8=(e,t)=>{const o=t.getNode(e);return ec(o)?j.some(o):j.none()},ZV=(e,t,o)=>{t.undoManager.transact(()=>{const s=e?Ne:Zs,a=Ia(t,ye.fromDom(o),s);Tf(t,a)})},u8=(e,t,o)=>{const s=d8(!!t,o),a=t===!1;s.fold(()=>Tf(e,o.toRange()),c=>Dy(a,e.getBody()).filter(d=>d.isEqual(o)).fold(()=>Tf(e,o.toRange()),d=>ZV(t,e,c)))},WV=(e,t,o,s)=>{const a=e.selection.getRng(),c=Ue.fromRangeStart(a),d=e.getBody();if(!t&&FV(s,c)){const h=jV(d,o,c);return u8(e,t,h),!0}else if(t&&HV(s,c)){const h=UV(d,o,c);return u8(e,t,h),!0}else return!1},f8=(e,t,o)=>j.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind(s=>j.from(e.dom.getParent(s,"table")).map(a=>o(e,t,a,s))).getOr(!1),m8=(e,t)=>f8(e,t,VV),nI=(e,t)=>f8(e,t,WV),qV=e=>{const t=Ng.exact(e,0,e,0);return KM(t)},p8=(e,t,o)=>o.fold(j.none,j.none,(s,a)=>oI(a).map(c=>qV(c)),s=>(e.execCommand("mceTableInsertRowAfter"),g8(e,t,s))),g8=(e,t,o)=>p8(e,t,Ps(o,js)),KV=(e,t,o)=>p8(e,t,Or(o,js)),h8=(e,t)=>{const o=["table","li","dl"],s=ye.fromDom(e.getBody()),a=h=>{const _=En(h);return kn(h,s)||mn(o,_)},c=e.selection.getRng(),d=ye.fromDom(t?c.endContainer:c.startContainer);return ER(d,a).map(h=>(Ie(h,a).each(I=>{e.model.table.clearSelectedCells(I.dom)}),e.selection.collapse(!t),(t?g8:KV)(e,a,h).each(I=>{e.selection.setRng(I)}),!0)).getOr(!1)},GV=(e,t,o)=>{const s=Jo.os.isMacOS()||Jo.os.isiOS();th([{keyCode:Zt.RIGHT,action:jo(Kn,e,!0)},{keyCode:Zt.LEFT,action:jo(Kn,e,!1)},{keyCode:Zt.UP,action:jo($m,e,!1)},{keyCode:Zt.DOWN,action:jo($m,e,!0)},...s?[{keyCode:Zt.UP,action:jo(Bb,e,!1),metaKey:!0,shiftKey:!0},{keyCode:Zt.DOWN,action:jo(Bb,e,!0),metaKey:!0,shiftKey:!0}]:[],{keyCode:Zt.RIGHT,action:jo(m8,e,!0)},{keyCode:Zt.LEFT,action:jo(m8,e,!1)},{keyCode:Zt.UP,action:jo(nI,e,!1)},{keyCode:Zt.DOWN,action:jo(nI,e,!0)},{keyCode:Zt.UP,action:jo(nI,e,!1)},{keyCode:Zt.UP,action:jo(al,e,!1)},{keyCode:Zt.DOWN,action:jo(al,e,!0)},{keyCode:Zt.RIGHT,action:jo(oh,e,!0)},{keyCode:Zt.LEFT,action:jo(oh,e,!1)},{keyCode:Zt.UP,action:jo(_1,e,!1)},{keyCode:Zt.DOWN,action:jo(_1,e,!0)},{keyCode:Zt.RIGHT,action:jo(zA,e,t,!0)},{keyCode:Zt.LEFT,action:jo(zA,e,t,!1)},{keyCode:Zt.RIGHT,ctrlKey:!s,altKey:s,action:jo(uR,e,t)},{keyCode:Zt.LEFT,ctrlKey:!s,altKey:s,action:jo(fR,e,t)},{keyCode:Zt.UP,action:jo(ak,e,!1)},{keyCode:Zt.DOWN,action:jo(ak,e,!0)}],o).each(a=>{o.preventDefault()})},YV=(e,t)=>{e.on("keydown",o=>{o.isDefaultPrevented()||GV(e,t,o)})},Gp=(e,t)=>({container:e,offset:t}),TR=As.DOM,OR=e=>t=>e===t?-1:0,XV=e=>t=>e.isBlock(t)||mn(["BR","IMG","HR","INPUT"],t.nodeName)||e.getContentEditable(t)==="false",sI=(e,t,o)=>{if(wt(e)&&t>=0)return j.some(Gp(e,t));{const s=Su(TR);return j.from(s.backwards(e,t,OR(e),o)).map(a=>Gp(a.container,a.container.data.length))}},JV=(e,t,o)=>{if(wt(e)&&t>=e.length)return j.some(Gp(e,t));{const s=Su(TR);return j.from(s.forwards(e,t,OR(e),o)).map(a=>Gp(a.container,0))}},rI=(e,t,o)=>{if(!wt(e))return j.none();const s=e.data;if(t>=0&&t<=s.length)return j.some(Gp(e,t));{const a=Su(TR);return j.from(a.backwards(e,t,OR(e),o)).bind(c=>{const d=c.container.data;return rI(c.container,t+d.length,o)})}},b8=(e,t,o)=>{if(!wt(e))return j.none();const s=e.data;if(t<=s.length)return j.some(Gp(e,t));{const a=Su(TR);return j.from(a.forwards(e,t,OR(e),o)).bind(c=>b8(c.container,t-s.length,o))}},aI=(e,t,o,s,a)=>{const c=Su(e,XV(e));return j.from(c.backwards(t,o,s,a))},QV=e=>e.collapsed&&wt(e.startContainer),ej=e=>ol(e.toString().replace(/\u00A0/g," ")),y8=e=>e!==""&&`  \f +\r \v`.indexOf(e)!==-1,tj=(e,t)=>e.substring(t.length),oj=(e,t,o,s=!1)=>{let a;const c=o.charAt(0);for(a=t-1;a>=0;a--){const d=e.charAt(a);if(!s&&y8(d))return j.none();if(c===d&&Yn(e,o,a,t))break}return j.some(a)},iI=(e,t,o,s=!1)=>{if(!QV(t))return j.none();const a={text:"",offset:0},c=(h,_,z)=>(a.text=z+a.text,a.offset+=_,oj(a.text,a.offset,o,s).getOr(_)),d=e.getParent(t.startContainer,e.isBlock)||e.getRoot();return aI(e,t.startContainer,t.startOffset,c,d).bind(h=>{const _=t.cloneRange();if(_.setStart(h.container,h.offset),_.setEnd(t.endContainer,t.endOffset),_.collapsed)return j.none();const z=ej(_);return z.lastIndexOf(o)!==0?j.none():j.some({text:tj(z,o),range:_,trigger:o})})},nj=e=>e.nodeType===Cd,sj=e=>e.nodeType===ki,v8=e=>{if(nj(e))return Gp(e,e.data.length);{const t=e.childNodes;return t.length>0?v8(t[t.length-1]):Gp(e,t.length)}},_8=(e,t)=>{const o=e.childNodes;return o.length>0&&t0&&sj(e)&&o.length===t?v8(o[o.length-1]):Gp(e,t)},rj=(e,t)=>{var o;const s=(o=e.getParent(t.container,e.isBlock))!==null&&o!==void 0?o:e.getRoot();return aI(e,t.container,t.offset,(a,c)=>c===0?-1:c,s).filter(a=>{const c=a.container.data.charAt(a.offset-1);return!y8(c)}).isSome()},aj=e=>t=>{const o=_8(t.startContainer,t.startOffset);return!rj(e,o)},ij=(e,t,o)=>Kr(o.triggers,s=>iI(e,t,s)),lj=(e,t)=>{const o=t(),s=e.selection.getRng();return ij(e.dom,s,o).bind(a=>x8(e,t,a))},x8=(e,t,o,s={})=>{var a;const c=t(),h=(a=e.selection.getRng().startContainer.nodeValue)!==null&&a!==void 0?a:"",_=rt(c.lookupByTrigger(o.trigger),I=>o.text.length>=I.minChars&&I.matches.getOrThunk(()=>aj(e.dom))(o.range,h,o.text));if(_.length===0)return j.none();const z=Promise.all(dn(_,I=>I.fetch(o.text,I.maxResults,s).then(V=>({matchText:o.text,items:V,columns:I.columns,onAction:I.onAction,highlightOn:I.highlightOn}))));return j.some({lookupData:z,context:o})};var Yp;(function(e){e[e.Error=0]="Error",e[e.Value=1]="Value"})(Yp||(Yp={}));const lI=(e,t,o)=>e.stype===Yp.Error?t(e.serror):o(e.svalue),cj=e=>{const t=[],o=[];return Be(e,s=>{lI(s,a=>o.push(a),a=>t.push(a))}),{values:t,errors:o}},dj=(e,t)=>e.stype===Yp.Error?{stype:Yp.Error,serror:t(e.serror)}:e,uj=(e,t)=>e.stype===Yp.Value?{stype:Yp.Value,svalue:t(e.svalue)}:e,fj=(e,t)=>e.stype===Yp.Value?t(e.svalue):e,mj=(e,t)=>e.stype===Yp.Error?t(e.serror):e,w8=e=>({stype:Yp.Value,svalue:e}),k8=e=>({stype:Yp.Error,serror:e}),gl={fromResult:e=>e.fold(k8,w8),toResult:e=>lI(e,Oo.error,Oo.value),svalue:w8,partition:cj,serror:k8,bind:fj,bindError:mj,map:uj,mapError:dj,fold:lI},cI=e=>ue(e)&&vt(e).length>100?" removed due to size":JSON.stringify(e,null,2),pj=e=>{const t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:Ge("... (only showing first ten failures)")}]):e;return dn(t,o=>"Failed path: ("+o.path.join(" > ")+`) +`+o.getErrorInfo())},zR=(e,t)=>gl.serror([{path:e,getErrorInfo:t}]),gj=(e,t,o)=>zR(e,()=>'Could not find valid *required* value for "'+t+'" in '+cI(o)),hj=(e,t)=>zR(e,()=>'Choice schema did not contain choice key: "'+t+'"'),bj=(e,t,o)=>zR(e,()=>'The chosen schema: "'+o+'" did not exist in branches: '+cI(t)),yj=(e,t)=>zR(e,Ge(t)),vj=(e,t,o,s)=>Gn(o,s).fold(()=>bj(e,o,s),c=>c.extract(e.concat(["branch: "+s]),t)),_j=(e,t)=>({extract:(a,c)=>Gn(c,e).fold(()=>hj(a,e),h=>vj(a,c,t,h)),toString:()=>"chooseOn("+e+"). Possible values: "+vt(t)}),xj=(e,t)=>t,wj=(e,t)=>Ct(e)&&Ct(t)?NR(e,t):t,C8=e=>(...t)=>{if(t.length===0)throw new Error("Can't merge zero objects");const o={};for(let s=0;s({tag:"required",process:{}}),kj=e=>({tag:"defaultedThunk",process:e}),A8=e=>kj(Ge(e)),Cj=()=>({tag:"option",process:{}}),Sj=(e,t)=>e.length>0?gl.svalue(NR(t,S8.apply(void 0,e))):gl.svalue(t),T8=e=>Kt(gl.serror,Zn)(e),Ej={consolidateObj:(e,t)=>{const o=gl.partition(e);return o.errors.length>0?T8(o.errors):Sj(o.values,t)},consolidateArr:e=>{const t=gl.partition(e);return t.errors.length>0?T8(t.errors):gl.svalue(t.values)}},Aj=(e,t,o,s)=>({tag:"field",key:e,newKey:t,presence:o,prop:s}),Tj=(e,t)=>({tag:"custom",newKey:e,instantiator:t}),O8=(e,t,o)=>{switch(e.tag){case"field":return t(e.key,e.newKey,e.presence,e.prop);case"custom":return o(e.newKey,e.instantiator)}},dI=e=>{const t=(s,a)=>gl.bindError(e(a),c=>yj(s,c)),o=Ge("val");return{extract:t,toString:o}},Oj=dI(gl.svalue),zj=(e,t,o,s)=>Gn(t,o).fold(()=>gj(e,o,t),s),z8=(e,t,o,s)=>{const a=Gn(e,t).getOrThunk(()=>o(e));return s(a)},Nj=(e,t,o)=>o(Gn(e,t)),Dj=(e,t,o,s)=>{const a=Gn(e,t).map(c=>c===!0?o(e):c);return s(a)},Rj=(e,t,o,s,a)=>{const c=h=>a.extract(t.concat([s]),h),d=h=>h.fold(()=>gl.svalue(j.none()),_=>{const z=a.extract(t.concat([s]),_);return gl.map(z,j.some)});switch(e.tag){case"required":return zj(t,o,s,c);case"defaultedThunk":return z8(o,s,e.process,c);case"option":return Nj(o,s,d);case"defaultedOptionThunk":return Dj(o,s,e.process,d);case"mergeWithThunk":return z8(o,s,Ge({}),h=>{const _=NR(e.process(o),h);return c(_)})}},Mj=(e,t,o)=>{const s={},a=[];for(const c of o)O8(c,(d,h,_,z)=>{const I=Rj(_,e,t,d,z);gl.fold(I,H=>{a.push(...H)},H=>{s[h]=H})},(d,h)=>{s[d]=h(t)});return a.length>0?gl.serror(a):gl.svalue(s)},uI=e=>({extract:(s,a)=>Mj(s,a,e),toString:()=>`obj{ +`+dn(e,a=>O8(a,(c,d,h,_)=>c+" -> "+_.toString(),(c,d)=>"state("+c+")")).join(` +`)+"}"}),N8=e=>({extract:(s,a)=>{const c=dn(a,(d,h)=>e.extract(s.concat(["["+h+"]"]),d));return Ej.consolidateArr(c)},toString:()=>"array("+e.toString()+")"}),Lj=e=>dI(t=>e(t).fold(gl.serror,gl.svalue)),Bj=(e,t,o)=>{const s=t.extract([e],o);return gl.mapError(s,a=>({input:o,errors:a}))},Pj=(e,t,o)=>gl.toResult(Bj(e,t,o)),Ij=e=>`Errors: +`+pj(e.errors).join(` `)+` -Input object: `+dI(e.input),M8=(e,t)=>xj(e,Mi(t,fI)),$j=Ge(zj),RR=(e,t)=>uI(o=>{const s=typeof o;return e(o)?hl.svalue(o):hl.serror(`Expected type: ${t} but got: ${s}`)}),Hj=RR(D,"number"),MR=RR(ft,"string"),Vj=RR(bn,"boolean"),mI=RR(Gt,"function"),WT=Aj,B8=Oj,jj=e=>Lj(t=>mn(e,t)?Oo.value(t):Oo.error(`Unsupported value: "${t}", choose one of "${e.join(", ")}".`)),L8=(e,t)=>WT(e,e,A8(),t),P8=e=>L8(e,MR),I8=e=>L8(e,mI),Uj=(e,t)=>WT(e,e,A8(),R8(t)),pI=(e,t)=>WT(e,e,Sj(),t),BR=e=>pI(e,MR),Zj=e=>pI(e,mI),Wj=(e,t)=>WT(e,e,O8(t),$j()),dk=(e,t,o)=>WT(e,e,O8(t),o),F8=(e,t)=>dk(e,t,Hj),qj=(e,t)=>dk(e,t,MR),$8=(e,t,o)=>dk(e,t,jj(o)),gI=(e,t)=>dk(e,t,Vj),hI=(e,t)=>dk(e,t,mI),Kj=(e,t,o)=>dk(e,t,R8(o)),Gj=P8("type"),Yj=I8("fetch"),bI=I8("onAction"),Xj=hI("onSetup",()=>dt),Jj=BR("text"),Qj=BR("icon"),eU=BR("tooltip"),tU=BR("label"),oU=gI("active",!1),nU=gI("enabled",!0),H8=gI("primary",!1),sU=e=>Wj("columns",e),qT=e=>qj("type",e),rU=fI([Gj,P8("trigger"),F8("minChars",1),sU(1),F8("maxResults",10),Zj("matches"),Yj,bI,Kj("highlightOn",[],MR)]),aU=e=>Ij("Autocompleter",rU,e),yI=[nU,eU,Qj,Jj,Xj],V8=[oU].concat(yI),iU=[hI("predicate",fn),$8("scope","node",["node","editor"]),$8("position","selection",["node","selection","line"])],lU=yI.concat([qT("contextformbutton"),H8,bI,B8("original",To)]),cU=V8.concat([qT("contextformbutton"),H8,bI,B8("original",To)]),dU=yI.concat([qT("contextformbutton")]),uU=V8.concat([qT("contextformtogglebutton")]),fU=M8("type",{contextformbutton:lU,contextformtogglebutton:cU});fI([qT("contextform"),hI("initValue",Ge("")),tU,Uj("commands",fU),pI("launch",M8("type",{contextformbutton:dU,contextformtogglebutton:uU}))].concat(iU));const mU=e=>{const t=e.ui.registry.getAll().popups,o=Mi(t,d=>aU(d).fold(h=>{throw new Error(Fj(h))},To)),s=bd(vi(o,d=>d.trigger)),a=vl(o);return{dataset:o,triggers:s,lookupByTrigger:d=>rt(a,h=>h.trigger===d)}},pU=(e,t)=>{const o=pg(t.load,50);e.on("input",s=>{s.inputType==="insertCompositionText"&&!e.composing||o.throttle()}),e.on("keydown",s=>{const a=s.which;a===8?o.throttle():a===27?(o.cancel(),t.cancelIfNecessary()):(a===38||a===40)&&o.cancel()},!0),e.on("remove",o.cancel)},gU=e=>{const t=Jr(),o=Er(!1),s=t.isSet,a=()=>{s()&&(BM(e),o.set(!1),t.clear())},c=$=>{s()||t.set({trigger:$.trigger,matchLength:$.text.length})},d=si(()=>mU(e)),h=$=>t.get().map(V=>lI(e.dom,e.selection.getRng(),V.trigger,!0).bind(ee=>k8(e,d,ee,$))).getOrThunk(()=>cj(e,d)),_=$=>{h($).fold(a,V=>{c(V.context),V.lookupData.then(ee=>{t.get().map(le=>{const oe=V.context;le.trigger===oe.trigger&&(t.set({...le,matchLength:oe.text.length}),o.get()?(Z2(e,{range:oe.range}),U2(e,{lookupData:ee})):(o.set(!0),Z2(e,{range:oe.range}),j2(e,{lookupData:ee})))})})})},z=($,V)=>{const ee=$.compareBoundaryPoints(window.Range.START_TO_START,V),le=$.compareBoundaryPoints(window.Range.END_TO_END,V);return ee>=0&&le<=0},I=()=>t.get().bind(({trigger:$})=>{const V=e.selection.getRng();return lI(e.dom,V,$,o.get()).filter(({range:ee})=>z(V,ee)).map(({range:ee})=>ee)});e.addCommand("mceAutocompleterReload",($,V)=>{const ee=ue(V)?V.fetchOptions:{};_(ee)}),e.addCommand("mceAutocompleterClose",a),e.addCommand("mceAutocompleterRefreshActiveRange",()=>{I().each($=>{Z2(e,{range:$})})}),e.editorCommands.addQueryStateHandler("mceAutoCompleterInRange",()=>I().isSome()),pU(e,{cancelIfNecessary:a,load:_})},hU=_t().browser.isSafari(),j8=e=>Lc(ye.fromDom(e)),U8=(e,t)=>{var o;return e.startOffset===0&&e.endOffset===((o=t.textContent)===null||o===void 0?void 0:o.length)},LR=(e,t)=>j.from(e.getParent(t.container(),"details")),Z8=(e,t)=>LR(e,t).isSome(),bU=(e,t)=>{const o=j.from(e.getParent(t.startContainer,"details")),s=j.from(e.getParent(t.endContainer,"details"));if(o.isSome()||s.isSome()){const a=o.bind(c=>j.from(e.select("summary",c)[0]));return j.some({startSummary:a,startDetails:o,endDetails:s})}else return j.none()},yU=(e,t)=>No(t).exists(o=>o.isEqual(e)),vU=(e,t)=>Vd(t).exists(o=>$s(o.getNode())&&Fc(t,o).exists(s=>s.isEqual(e))||o.isEqual(e)),_U=(e,t)=>t.startSummary.exists(o=>yU(e,o)),xU=(e,t)=>t.startSummary.exists(o=>vU(e,o)),wU=(e,t)=>t.startDetails.exists(o=>Fc(o,e).forall(s=>t.startSummary.exists(a=>!a.contains(e.container())&&a.contains(s.container())))),kU=(e,t,o)=>o.startDetails.exists(s=>Il(e,t).forall(a=>!s.contains(a.container()))),W8=(e,t)=>{const o=t.getNode();ln(o)||e.selection.setCursorLocation(o,t.offset())},q8=(e,t,o)=>{const s=e.dom.getParent(t.container(),"details");if(s&&!s.open){const a=e.dom.select("summary",s)[0];a&&(o?No(a):Vd(a)).each(d=>W8(e,d))}else W8(e,t)},CU=(e,t)=>{const o=_=>_.contains(e.startContainer),s=_=>_.contains(e.endContainer),a=t.startSummary.exists(o),c=t.startSummary.exists(s),d=t.startDetails.forall(_=>t.endDetails.forall(z=>_!==z));return(a||c)&&!(a&&c)||d},K8=(e,t,o)=>{const{dom:s,selection:a}=e,c=e.getBody();if(o==="character"){const d=Ue.fromRangeStart(a.getRng()),h=s.getParent(d.container(),s.isBlock),_=LR(s,d),z=h&&s.isEmpty(h),I=ot(h==null?void 0:h.previousSibling),$=ot(h==null?void 0:h.nextSibling);return z&&(t?$:I)&&tb(!t,c,d).exists(le=>Z8(s,le)&&!kd(_,LR(s,le)))?!0:tb(t,c,d).fold(fn,V=>{const ee=LR(s,V);if(Z8(s,V)&&!kd(_,ee)){if(t||q8(e,V,!1),h&&z){if(t&&I)return!0;if(!t&&$)return!0;q8(e,V,t),e.dom.remove(h)}return!0}else return!1})}else return!1},SU=(e,t,o,s)=>{const c=e.selection.getRng(),d=Ue.fromRangeStart(c),h=e.getBody();return s==="selection"?CU(c,t):o?xU(d,t)||kU(h,d,t):_U(d,t)||wU(d,t)},EU=(e,t,o)=>bU(e.dom,e.selection.getRng()).fold(()=>K8(e,t,o),s=>SU(e,s,t,o)||K8(e,t,o)),TU=(e,t,o)=>{const s=e.selection,a=s.getNode(),c=s.getRng(),d=Ue.fromRangeStart(c);return tm(a)?(o==="selection"&&U8(c,a)||b3(t,d,a)?j8(a):e.undoManager.transact(()=>{const h=s.getSel();let{anchorNode:_,anchorOffset:z,focusNode:I,focusOffset:$}=h??{};const V=()=>{Fe(_)&&Fe(z)&&Fe(I)&&Fe($)&&(h==null||h.setBaseAndExtent(_,z,I,$))},ee=()=>{_=h==null?void 0:h.anchorNode,z=h==null?void 0:h.anchorOffset,I=h==null?void 0:h.focusNode,$=h==null?void 0:h.focusOffset},le=(fe,ke)=>{Le(fe.childNodes,Oe=>{Iy(Oe)&&ke.appendChild(Oe)})},oe=e.dom.create("span",{"data-mce-bogus":"1"});le(a,oe),a.appendChild(oe),V(),(o==="word"||o==="line")&&(h==null||h.modify("extend",t?"right":"left",o)),!s.isCollapsed()&&U8(s.getRng(),oe)?j8(a):(e.execCommand(t?"ForwardDelete":"Delete"),ee(),le(oe,a),V()),e.dom.remove(oe)}),!0):!1},r_=(e,t,o)=>EU(e,t,o)||hU&&TU(e,t,o)?j.some(dt):j.none(),G8=e=>(t,o,s={})=>{const a=t.getBody(),c={bubbles:!0,composed:!0,data:null,isComposing:!1,detail:0,view:null,target:a,currentTarget:a,eventPhase:Event.AT_TARGET,originalTarget:a,explicitOriginalTarget:a,isTrusted:!1,srcElement:a,cancelable:!1,preventDefault:dt,inputType:o},d=im(new InputEvent(e));return t.dispatch(e,{...d,...c,...s})},KT=G8("input"),PR=G8("beforeinput"),Y8=_t(),X8=Y8.os,J8=X8.isMacOS()||X8.isiOS(),AU=Y8.browser.isFirefox(),OU=(e,t,o)=>{const s=o.keyCode===Zt.BACKSPACE?"deleteContentBackward":"deleteContentForward",a=e.selection.isCollapsed(),c=a?"character":"selection",d=h=>a?h?"word":"line":"selection";ck([{keyCode:Zt.BACKSPACE,action:jo(Ze,e)},{keyCode:Zt.BACKSPACE,action:jo(yT,e,!1)},{keyCode:Zt.DELETE,action:jo(yT,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(gT,e,!1)},{keyCode:Zt.DELETE,action:jo(gT,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(Q0,e,t,!1)},{keyCode:Zt.DELETE,action:jo(Q0,e,t,!0)},{keyCode:Zt.BACKSPACE,action:jo(Fp,e,!1)},{keyCode:Zt.DELETE,action:jo(Fp,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(r_,e,!1,c)},{keyCode:Zt.DELETE,action:jo(r_,e,!0,c)},...J8?[{keyCode:Zt.BACKSPACE,altKey:!0,action:jo(r_,e,!1,d(!0))},{keyCode:Zt.DELETE,altKey:!0,action:jo(r_,e,!0,d(!0))},{keyCode:Zt.BACKSPACE,metaKey:!0,action:jo(r_,e,!1,d(!1))}]:[{keyCode:Zt.BACKSPACE,ctrlKey:!0,action:jo(r_,e,!1,d(!0))},{keyCode:Zt.DELETE,ctrlKey:!0,action:jo(r_,e,!0,d(!0))}],{keyCode:Zt.BACKSPACE,action:jo(_T,e,!1)},{keyCode:Zt.DELETE,action:jo(_T,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(H,e,!1)},{keyCode:Zt.DELETE,action:jo(H,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(fT,e,!1)},{keyCode:Zt.DELETE,action:jo(fT,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(Gw,e,!1)},{keyCode:Zt.DELETE,action:jo(Gw,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(p,e,!1)},{keyCode:Zt.DELETE,action:jo(p,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(vT,e,!1)},{keyCode:Zt.DELETE,action:jo(vT,e,!0)}],o).filter(h=>e.selection.isEditable()).each(h=>{o.preventDefault(),PR(e,s).isDefaultPrevented()||(h(),KT(e,s))})},zU=(e,t,o)=>oh([{keyCode:Zt.BACKSPACE,action:jo(AD,e)},{keyCode:Zt.DELETE,action:jo(AD,e)},...J8?[{keyCode:Zt.BACKSPACE,altKey:!0,action:jo(O,e)},{keyCode:Zt.DELETE,altKey:!0,action:jo(O,e)},...o?[{keyCode:AU?224:91,action:jo(O,e)}]:[]]:[{keyCode:Zt.BACKSPACE,ctrlKey:!0,action:jo(O,e)},{keyCode:Zt.DELETE,ctrlKey:!0,action:jo(O,e)}]],t),NU=(e,t)=>{let o=!1;e.on("keydown",s=>{o=s.keyCode===Zt.BACKSPACE,s.isDefaultPrevented()||OU(e,t,s)}),e.on("keyup",s=>{s.isDefaultPrevented()||zU(e,s,o),o=!1})},DU=e=>{for(;e;){if(no(e)||wt(e)&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}return null},uk=(e,t)=>{const o=e.dom,s=e.schema.getMoveCaretBeforeOnEnterElements();if(!t)return;if(/^(LI|DT|DD)$/.test(t.nodeName)){const c=DU(t.firstChild);c&&/^(UL|OL|DL)$/.test(c.nodeName)&&t.insertBefore(o.doc.createTextNode(da),t.firstChild)}const a=o.createRng();if(t.normalize(),t.hasChildNodes()){const c=new Ma(t,t);let d=t,h;for(;h=c.current();){if(wt(h)){a.setStart(h,0),a.setEnd(h,0);break}if(s[h.nodeName.toLowerCase()]){a.setStartBefore(h),a.setEndBefore(h);break}d=h,h=c.next()}h||(a.setStart(d,0),a.setEnd(d,0))}else $s(t)?t.nextSibling&&o.isBlock(t.nextSibling)?(a.setStartBefore(t),a.setEndBefore(t)):(a.setStartAfter(t),a.setEndAfter(t)):(a.setStart(t,0),a.setEnd(t,0));e.selection.setRng(a),Zd(e,a)},GT=(e,t)=>{const o=e.getRoot();let s,a=t;for(;a!==o&&a&&e.getContentEditable(a)!=="false";){if(e.getContentEditable(a)==="true"){s=a;break}a=a.parentNode}return a!==o?s:o},vI=e=>j.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock)),RU=e=>vI(e).fold(Ge(""),t=>t.nodeName.toUpperCase()),MU=e=>vI(e).filter(t=>pm(ye.fromDom(t))).isSome(),_I=e=>{e.innerHTML='
    '},BU=(e,t,o)=>{const s=e.dom;j.from(o.style).map(s.parseStyle).each(_=>{const I={...Ju(ye.fromDom(t)),..._};s.setStyles(t,I)});const a=j.from(o.class).map(_=>_.split(/\s+/)),c=j.from(t.className).map(_=>rt(_.split(/\s+/),z=>z!==""));va(a,c,(_,z)=>{const I=rt(z,V=>!mn(_,V)),$=[..._,...I];s.setAttrib(t,"class",$.join(" "))});const d=["style","class"],h=Bi(o,(_,z)=>!mn(d,z));s.setAttribs(t,h)},YT=(e,t)=>{if(ji(e).toLowerCase()===t.tagName.toLowerCase()){const s=hv(e);BU(e,t,s)}},Q8=(e,t,o,s,a=!0,c,d)=>{const h=e.dom,_=e.schema,z=ji(e),I=o?o.nodeName.toUpperCase():"";let $=t;const V=_.getTextInlineElements();let ee;c||I==="TABLE"||I==="HR"?ee=h.create(c||z,d||{}):ee=o.cloneNode(!1);let le=ee;if(!a)h.setAttrib(ee,"style",null),h.setAttrib(ee,"class",null);else do if(V[$.nodeName]){if(ud($)||fd($))continue;const oe=$.cloneNode(!1);h.setAttrib(oe,"id",""),ee.hasChildNodes()?(oe.appendChild(ee.firstChild),ee.appendChild(oe)):(le=oe,ee.appendChild(oe))}while(($=$.parentNode)&&$!==s);return YT(e,ee),_I(le),ee},LU=(e,t)=>e.dom.getParent(t,em),PU=(e,t,o)=>{let s=t;for(;s&&s!==e&&ot(s.nextSibling);){const a=s.parentElement;if(!a||!o(a))return em(a);s=a}return!1},IU=(e,t,o)=>!t&&o.nodeName.toLowerCase()===ji(e)&&e.dom.isEmpty(o)&&PU(e.getBody(),o,s=>Ro(e.schema.getTextBlockElements(),s.nodeName.toLowerCase())),FU=(e,t,o)=>{var s,a,c;const d=t(ji(e)),h=LU(e,o);h&&(e.dom.insertAfter(d,h),uk(e,d),((c=(a=(s=o.parentElement)===null||s===void 0?void 0:s.childNodes)===null||a===void 0?void 0:a.length)!==null&&c!==void 0?c:0)>1&&e.dom.remove(o))},$U=(e,t)=>e.firstChild&&e.firstChild.nodeName===t,HU=e=>{var t;return((t=e.parentNode)===null||t===void 0?void 0:t.firstChild)===e},eF=(e,t)=>{const o=e==null?void 0:e.parentNode;return Fe(o)&&o.nodeName===t},tF=e=>Fe(e)&&/^(OL|UL|LI)$/.test(e.nodeName),xI=e=>Fe(e)&&/^(LI|DT|DD)$/.test(e.nodeName),VU=e=>tF(e)&&tF(e.parentNode),IR=e=>{const t=e.parentNode;return xI(t)?t:e},FR=(e,t,o)=>{let s=e[o?"firstChild":"lastChild"];for(;s&&!no(s);)s=s[o?"nextSibling":"previousSibling"];return s===t},oF=e=>ko(vi(Ju(ye.fromDom(e)),(t,o)=>`${o}: ${t};`),(t,o)=>t+o,""),jU=(e,t,o,s,a)=>{const c=e.dom,d=e.selection.getRng(),h=o.parentNode;if(o===e.getBody()||!h)return;VU(o)&&(a="LI");const _=xI(s)?oF(s):void 0;let z=xI(s)&&_?t(a,{style:oF(s)}):t(a);if(FR(o,s,!0)&&FR(o,s,!1))if(eF(o,"LI")){const I=IR(o);c.insertAfter(z,I),HU(o)?c.remove(I):c.remove(o)}else c.replace(z,o);else if(FR(o,s,!0))eF(o,"LI")?(c.insertAfter(z,IR(o)),z.appendChild(c.doc.createTextNode(" ")),z.appendChild(o)):h.insertBefore(z,o),c.remove(s);else if(FR(o,s,!1))c.insertAfter(z,IR(o)),c.remove(s);else{o=IR(o);const I=d.cloneRange();I.setStartAfter(s),I.setEndAfter(o);const $=I.extractContents();if(a==="LI"&&$U($,"LI")){const V=rt(dn(z.children,ye.fromDom),pt(Ed("br")));z=$.firstChild,c.insertAfter($,o),Le(V,ee=>Wa(ye.fromDom(z),ee)),_&&z.setAttribute("style",_)}else c.insertAfter($,o),c.insertAfter(z,o);c.remove(s)}uk(e,z)},UU=e=>{Le(Nd(ye.fromDom(e),Rs),t=>{const o=t.dom;o.nodeValue=nl(o.data)})},ZU=(e,t)=>{const o=e.dom.getParent(t,"ol,ul,dl");return o!==null&&e.dom.getContentEditableParent(o)==="false"},WU=(e,t)=>t&&t.nodeName==="A"&&e.isEmpty(t),wI=(e,t)=>e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t,kI=(e,t)=>Fe(t)&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&e.isEditable(t.parentNode)&&e.getContentEditable(t)!=="false",qU=(e,t,o)=>{var s;const a=[];if(!o)return;let c=o;for(;c=c.firstChild;){if(e.isBlock(c))return;no(c)&&!t[c.nodeName.toLowerCase()]&&a.push(c)}let d=a.length;for(;d--;)c=a[d],(!c.hasChildNodes()||c.firstChild===c.lastChild&&((s=c.firstChild)===null||s===void 0?void 0:s.nodeValue)===""||WU(e,c))&&e.remove(c)},CI=(e,t,o)=>wt(t)?e?o===1&&t.data.charAt(o-1)===ua?0:o:o===t.data.length-1&&t.data.charAt(o)===ua?t.data.length:o:o,KU=e=>{const t=e.cloneRange();return t.setStart(e.startContainer,CI(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,CI(!1,e.endContainer,e.endOffset)),t},GU=e=>{let t=e;do wt(t)&&(t.data=t.data.replace(/^[\r\n]+/,"")),t=t.firstChild;while(t)},YU=(e,t,o,s,a)=>{var c,d;const h=e.dom,_=(c=GT(h,s))!==null&&c!==void 0?c:h.getRoot();let z=h.getParent(s,h.isBlock);if(!z||!kI(h,z)){if(z=z||_,!z.hasChildNodes()){const ee=h.create(t);return YT(e,ee),z.appendChild(ee),o.setStart(ee,0),o.setEnd(ee,0),ee}let I=s;for(;I&&I.parentNode!==z;)I=I.parentNode;let $;for(;I&&!h.isBlock(I);)$=I,I=I.previousSibling;const V=(d=$==null?void 0:$.parentElement)===null||d===void 0?void 0:d.nodeName;if($&&V&&e.schema.isValidChild(V,t.toLowerCase())){const ee=$.parentNode,le=h.create(t);for(YT(e,le),ee.insertBefore(le,$),I=$;I&&!h.isBlock(I);){const oe=I.nextSibling;le.appendChild(I),I=oe}o.setStart(s,a),o.setEnd(s,a)}}return s},XU=(e,t)=>{t.normalize();const o=t.lastChild;(!o||no(o)&&/^(left|right)$/gi.test(e.getStyle(o,"float",!0)))&&e.add(t,"br")},JU=(e,t)=>{const o=o2(e);return uo(t)?!1:ft(o)?mn(zt.explode(o),t.nodeName.toLowerCase()):o},nF={insert:(e,t)=>{let o,s,a,c,d=!1;const h=e.dom,_=e.schema,z=_.getNonEmptyElements(),I=e.selection.getRng(),$=ji(e),V=ye.fromDom(I.startContainer),ee=wc(V,I.startOffset),le=ee.exists(mt=>ai(mt)&&!js(mt)),oe=I.collapsed&&le,fe=(mt,to)=>Q8(e,o,Mt,ht,t2(e),mt,to),ke=mt=>{const to=CI(mt,o,s);if(wt(o)&&(mt?to>0:to{let mt;return/^(H[1-6]|PRE|FIGURE)$/.test(a)&&Yt!=="HGROUP"?mt=fe($):mt=fe(),JU(e,c)&&kI(h,c)&&h.isEmpty(Mt,void 0,{includeZwsp:!0})?mt=h.split(c,Mt):h.insertAfter(mt,Mt),uk(e,mt),mt};Em(h,I).each(mt=>{I.setStart(mt.startContainer,mt.startOffset),I.setEnd(mt.endContainer,mt.endOffset)}),o=I.startContainer,s=I.startOffset;const Te=!!(t&&t.shiftKey),Pe=!!(t&&t.ctrlKey);no(o)&&o.hasChildNodes()&&!oe&&(d=s>o.childNodes.length-1,o=o.childNodes[Math.min(s,o.childNodes.length-1)]||o,d&&wt(o)?s=o.data.length:s=0);const ht=GT(h,o);if(!ht||ZU(e,o))return;Te||(o=YU(e,$,I,o,s));let Mt=h.getParent(o,h.isBlock)||h.getRoot();c=Fe(Mt==null?void 0:Mt.parentNode)?h.getParent(Mt.parentNode,h.isBlock):null,a=Mt?Mt.nodeName.toUpperCase():"";const Yt=c?c.nodeName.toUpperCase():"";if(Yt==="LI"&&!Pe){const mt=c;Mt=mt,c=mt.parentNode,a=Yt}if(no(c)&&IU(e,Te,Mt))return FU(e,fe,Mt);if(/^(LI|DT|DD)$/.test(a)&&no(c)&&h.isEmpty(Mt)){jU(e,fe,c,Mt,$);return}if(!oe&&(Mt===e.getBody()||!kI(h,Mt)))return;const Qe=Mt.parentNode;let Ve;if(oe)Ve=fe($),ee.fold(()=>{fr(V,ye.fromDom(Ve))},mt=>{Zs(mt,ye.fromDom(Ve))}),e.selection.setCursorLocation(Ve,0);else if(hg(Mt))Ve=Cp(Mt),h.isEmpty(Mt)&&_I(Mt),YT(e,Ve),uk(e,Ve);else if(ke(!1))Ve=Oe();else if(ke(!0)&&Qe){const mt=Ue.fromRangeStart(I),to=Ky(mt),bo=ye.fromDom(Mt),Cn=hb(bo,mt,e.schema)?Fx(bo,mt,e.schema).bind(hs=>j.from(hs.getNode())):j.none();Ve=Qe.insertBefore(fe(),Mt);const ds=wI(Mt,"HR")||to?Ve:Cn.getOr(Mt);uk(e,ds)}else{const mt=KU(I).cloneRange();mt.setEndAfter(Mt);const to=mt.extractContents();UU(to),GU(to),Ve=to.firstChild,h.insertAfter(to,Mt),qU(h,z,Ve),XU(h,Mt),h.isEmpty(Mt)&&_I(Mt),Ve.normalize(),h.isEmpty(Ve)?(h.remove(Ve),Oe()):(YT(e,Ve),uk(e,Ve))}h.setAttrib(Ve,"id",""),e.dispatch("NewBlock",{newBlock:Ve})},fakeEventName:"insertParagraph"},QU=(e,t,o)=>{const s=new Ma(t,o);let a;const c=e.getNonEmptyElements();for(;a=s.next();)if(c[a.nodeName.toLowerCase()]||wt(a)&&a.length>0)return!0;return!1},sF=(e,t,o)=>{const s=e.dom.createRng();o?(s.setStartBefore(t),s.setEndBefore(t)):(s.setStartAfter(t),s.setEndAfter(t)),e.selection.setRng(s),Zd(e,s)},eZ=(e,t)=>{const o=e.selection,s=e.dom,a=o.getRng();let c,d=!1;Em(s,a).each(ee=>{a.setStart(ee.startContainer,ee.startOffset),a.setEnd(ee.endContainer,ee.endOffset)});let h=a.startOffset,_=a.startContainer;if(no(_)&&_.hasChildNodes()){const ee=h>_.childNodes.length-1;_=_.childNodes[Math.min(h,_.childNodes.length-1)]||_,ee&&wt(_)?h=_.data.length:h=0}let z=s.getParent(_,s.isBlock);const I=z&&z.parentNode?s.getParent(z.parentNode,s.isBlock):null,$=I?I.nodeName.toUpperCase():"",V=!!(t&&t.ctrlKey);$==="LI"&&!V&&(z=I),wt(_)&&h>=_.data.length&&(QU(e.schema,_,z||s.getRoot())||(c=s.create("br"),a.insertNode(c),a.setStartAfter(c),a.setEndAfter(c),d=!0)),c=s.create("br"),Sy(s,a,c),sF(e,c,d),e.undoManager.add()},tZ=(e,t)=>{const o=ye.fromTag("br");Zs(ye.fromDom(t),o),e.undoManager.add()},oZ=(e,t)=>{sZ(e.getBody(),t)||Ne(ye.fromDom(t),ye.fromTag("br"));const o=ye.fromTag("br");Ne(ye.fromDom(t),o),sF(e,o.dom,!1),e.undoManager.add()},nZ=e=>$s(e.getNode()),sZ=(e,t)=>nZ(Ue.after(t))?!0:Il(e,Ue.after(t)).map(o=>$s(o.getNode())).getOr(!1),rF=e=>e&&e.nodeName==="A"&&"href"in e,rZ=e=>e.fold(fn,rF,rF,fn),aZ=e=>{const t=$t(yb,e),o=Ue.fromRangeStart(e.selection.getRng());return Fm(t,e.getBody(),o).filter(rZ)},iZ=(e,t)=>{t.fold(dt,$t(tZ,e),$t(oZ,e),dt)},aF={insert:(e,t)=>{const o=aZ(e);o.isSome()?o.each($t(iZ,e)):eZ(e,t)},fakeEventName:"insertLineBreak"},iF=(e,t)=>vI(e).filter(o=>t.length>0&&ls(ye.fromDom(o),t)).isSome(),lZ=e=>iF(e,_4(e)),cZ=e=>iF(e,x4(e)),Vu=zn.generate([{br:[]},{block:[]},{none:[]}]),dZ=(e,t)=>cZ(e),lF=e=>(t,o)=>MU(t)===e,cF=(e,t)=>(o,s)=>RU(o)===e.toUpperCase()===t,uZ=e=>{const t=GT(e.dom,e.selection.getStart());return uo(t)},XT=e=>cF("pre",e),fZ=()=>cF("summary",!0),$R=e=>(t,o)=>Qk(t)===e,mZ=(e,t)=>lZ(e),HR=(e,t)=>t,pZ=e=>{const t=ji(e),o=GT(e.dom,e.selection.getStart());return Fe(o)&&e.schema.isValidChild(o.nodeName,t)},gZ=e=>{const t=e.selection.getRng(),o=ye.fromDom(t.startContainer),a=wc(o,t.startOffset).map(c=>ai(c)&&!js(c));return t.collapsed&&a.getOr(!0)},zf=(e,t)=>(o,s)=>ko(e,(c,d)=>c&&d(o,s),!0)?j.some(t):j.none(),hZ=(e,t)=>FD([zf([dZ],Vu.none()),zf([XT(!0),uZ],Vu.none()),zf([fZ()],Vu.br()),zf([XT(!0),$R(!1),HR],Vu.br()),zf([XT(!0),$R(!1)],Vu.block()),zf([XT(!0),$R(!0),HR],Vu.block()),zf([XT(!0),$R(!0)],Vu.br()),zf([lF(!0),HR],Vu.br()),zf([lF(!0)],Vu.block()),zf([mZ],Vu.br()),zf([HR],Vu.br()),zf([pZ],Vu.block()),zf([gZ],Vu.block())],[e,!!(t&&t.shiftKey)]).getOr(Vu.none()),VR=(e,t,o)=>{t.selection.isCollapsed()||g3(t),!(Fe(o)&&PR(t,e.fakeEventName).isDefaultPrevented())&&(e.insert(t,o),Fe(o)&&KT(t,e.fakeEventName))},dF=(e,t)=>{const o=()=>VR(aF,e,t),s=()=>VR(nF,e,t),a=hZ(e,t);switch(e2(e)){case"linebreak":a.fold(o,o,dt);break;case"block":a.fold(s,s,dt);break;case"invert":a.fold(s,o,dt);break;default:a.fold(o,s,dt);break}},uF=_t(),bZ=uF.os.isiOS()&&uF.browser.isSafari(),fF=(e,t)=>{t.isDefaultPrevented()||(t.preventDefault(),nP(e.undoManager),e.undoManager.transact(()=>{dF(e,t)}))},yZ=e=>{if(!e.collapsed)return!1;const t=e.startContainer;if(wt(t)){const o=/^[\uAC00-\uD7AF\u1100-\u11FF\u3130-\u318F\uA960-\uA97F\uD7B0-\uD7FF]$/,s=t.data.charAt(e.startOffset-1);return o.test(s)}else return!1},vZ=e=>{let t=j.none();const o=a=>{t=j.some(a.selection.getBookmark()),a.undoManager.add()},s=(a,c)=>{a.undoManager.undo(),t.fold(dt,d=>a.selection.moveToBookmark(d)),fF(a,c),t=j.none()};e.on("keydown",a=>{a.keyCode===Zt.ENTER&&(bZ&&yZ(e.selection.getRng())?o(e):fF(e,a))}),e.on("keyup",a=>{a.keyCode===Zt.ENTER&&t.each(()=>s(e,a))})},_Z=(e,t,o)=>{const s=Jo.os.isMacOS()||Jo.os.isiOS();oh([{keyCode:Zt.END,action:jo(Hu,e,!0)},{keyCode:Zt.HOME,action:jo(Hu,e,!1)},...s?[]:[{keyCode:Zt.HOME,action:jo(Pb,e,!1),ctrlKey:!0,shiftKey:!0},{keyCode:Zt.END,action:jo(Pb,e,!0),ctrlKey:!0,shiftKey:!0}],{keyCode:Zt.END,action:jo(VT,e,!0)},{keyCode:Zt.HOME,action:jo(VT,e,!1)},{keyCode:Zt.END,action:jo(X0,e,!0,t)},{keyCode:Zt.HOME,action:jo(X0,e,!1,t)}],o).each(a=>{o.preventDefault()})},xZ=(e,t)=>{e.on("keydown",o=>{o.isDefaultPrevented()||_Z(e,t,o)})},wZ=e=>{e.on("input",t=>{t.isComposing||_B(e)})},kZ=_t(),CZ=(e,t,o)=>{oh([{keyCode:Zt.PAGE_UP,action:jo(X0,e,!1,t)},{keyCode:Zt.PAGE_DOWN,action:jo(X0,e,!0,t)}],o)},mF=e=>e.stopImmediatePropagation(),pF=e=>e.keyCode===Zt.PAGE_UP||e.keyCode===Zt.PAGE_DOWN,gF=(e,t,o)=>{o&&!e.get()?t.on("NodeChange",mF,!0):!o&&e.get()&&t.off("NodeChange",mF),e.set(o)},SZ=(e,t)=>{if(kZ.os.isMacOS())return;const o=Er(!1);e.on("keydown",s=>{pF(s)&&gF(o,e,!0)}),e.on("keyup",s=>{s.isDefaultPrevented()||CZ(e,t,s),pF(s)&&o.get()&&(gF(o,e,!1),e.nodeChanged())})},EZ=e=>{e.on("beforeinput",t=>{(!e.selection.isEditable()||Bn(t.getTargetRanges(),o=>!SO(e.dom,o)))&&t.preventDefault()})},hF=(e,t)=>{const o=t.container(),s=t.offset();return wt(o)?(o.insertData(s,e),j.some(Ue(o,s+e.length))):J_(t).map(a=>{const c=ye.fromText(e);return t.isAtEnd()?Ne(a,c):Zs(a,c),Ue(c.dom,e.length)})},bF=$t(hF,da),yF=$t(hF," "),TZ=(e,t,o)=>DC(e,t,o)?bF(t):yF(t),AZ=e=>t=>t.fold(o=>Fc(e.dom,Ue.before(o)),o=>No(o),o=>Vd(o),o=>Il(e.dom,Ue.after(o))),OZ=(e,t,o)=>s=>DC(e,s,o)?bF(t):yF(t),vF=e=>t=>{e.selection.setRng(t.toRange()),e.nodeChanged()},zZ=(e,t)=>e.isEditable(e.getParent(t,"summary")),NZ=e=>{const t=Ue.fromRangeStart(e.selection.getRng()),o=ye.fromDom(e.getBody());if(e.selection.isCollapsed()){const s=$t(yb,e),a=Ue.fromRangeStart(e.selection.getRng());return Fm(s,e.getBody(),a).bind(AZ(o)).map(c=>()=>OZ(o,t,e.schema)(c).each(vF(e)))}else return j.none()},DZ=e=>{const t=()=>{const o=ye.fromDom(e.getBody());e.selection.isCollapsed()||e.getDoc().execCommand("Delete");const s=Ue.fromRangeStart(e.selection.getRng());TZ(o,s,e.schema).each(vF(e))};return cu(Jo.browser.isFirefox()&&e.selection.isEditable()&&zZ(e.dom,e.selection.getRng().startContainer),t)},RZ=(e,t)=>{ck([{keyCode:Zt.SPACEBAR,action:jo(NZ,e)},{keyCode:Zt.SPACEBAR,action:jo(DZ,e)}],t).each(o=>{t.preventDefault(),PR(e,"insertText",{data:" "}).isDefaultPrevented()||(o(),KT(e,"insertText",{data:" "}))})},MZ=e=>{e.on("keydown",t=>{t.isDefaultPrevented()||RZ(e,t)})},BZ=e=>Z4(e)?[{keyCode:Zt.TAB,action:jo(y8,e,!0)},{keyCode:Zt.TAB,shiftKey:!0,action:jo(y8,e,!1)}]:[],LZ=(e,t)=>{oh([...BZ(e)],t).each(o=>{t.preventDefault()})},PZ=e=>{e.on("keydown",t=>{t.isDefaultPrevented()||LZ(e,t)})},IZ=e=>{if(e.addShortcut("Meta+P","","mcePrint"),gU(e),Im(e))return Er(null);{const t=uR(e);return EZ(e),Lb(e),X9(e,t),NU(e,t),vZ(e),MZ(e),wZ(e),PZ(e),xZ(e,t),SZ(e,t),t}};class FZ{constructor(t){this.lastPath=[],this.editor=t;let o;const s=this;"onselectionchange"in t.getDoc()||t.on("NodeChange click mouseup keyup focus",a=>{const c=t.selection.getRng(),d={startContainer:c.startContainer,startOffset:c.startOffset,endContainer:c.endContainer,endOffset:c.endOffset};(a.type==="nodechange"||!Yv(d,o))&&t.dispatch("SelectionChange"),o=d}),t.on("contextmenu",()=>{Vy(t),t.dispatch("SelectionChange")}),t.on("SelectionChange",()=>{const a=t.selection.getStart(!0);a&&Ly(t)&&!s.isSameElementPath(a)&&t.dom.isChildOf(a,t.getBody())&&t.nodeChanged({selectionChange:!0})}),t.on("mouseup",a=>{!a.isDefaultPrevented()&&Ly(t)&&(t.selection.getNode().nodeName==="IMG"?Vc.setEditorTimeout(t,()=>{t.nodeChanged()}):t.nodeChanged())})}nodeChanged(t={}){const o=this.editor.selection;let s;if(this.editor.initialized&&o&&!eM(this.editor)&&!this.editor.mode.isReadOnly()){const a=this.editor.getBody();s=o.getStart(!0)||a,(s.ownerDocument!==this.editor.getDoc()||!this.editor.dom.isChildOf(s,a))&&(s=a);const c=[];this.editor.dom.getParent(s,d=>d===a?!0:(c.push(d),!1)),this.editor.dispatch("NodeChange",{...t,element:s,parents:c})}}isSameElementPath(t){let o;const s=this.editor,a=sa(s.dom.getParents(t,zo,s.getBody()));if(a.length===this.lastPath.length){for(o=a.length;o>=0&&a[o]===this.lastPath[o];o--);if(o===-1)return this.lastPath=a,!0}return this.lastPath=a,!1}}const _F=Ti("image"),$Z=e=>{const t=e;return j.from(t[_F])},HZ=(e,t)=>{const o=e;o[_F]=t},SI=Ti("event"),VZ=e=>{const t=e;return j.from(t[SI])},jR=e=>t=>{const o=t;o[SI]=e},jZ=(e,t)=>jR(t)(e),xF=jR(0),UZ=jR(2),ZZ=jR(1),WZ=(e=>t=>{const o=t;return j.from(o[SI]).exists(s=>s===e)})(0),qZ=()=>Object.freeze({length:0,item:e=>null}),EI=Ti("mode"),KZ=e=>{const t=e;return j.from(t[EI])},UR=e=>t=>{const o=t;o[EI]=e},wF=(e,t)=>UR(t)(e),kF=UR(0),TI=UR(2),GZ=UR(1),CF=e=>t=>{const o=t;return j.from(o[EI]).exists(s=>s===e)},fk=CF(0),SF=CF(1),YZ=(e,t)=>({...t,get length(){return t.length},add:(o,s)=>{if(fk(e))if(ft(o)){if(!ln(s))return t.add(o,s)}else return t.add(o);return null},remove:o=>{fk(e)&&t.remove(o)},clear:()=>{fk(e)&&t.clear()}}),XZ=["none","copy","link","move"],JZ=["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"],AI=()=>{const e=new window.DataTransfer;let t="move",o="all";const s={get dropEffect(){return t},set dropEffect(a){mn(XZ,a)&&(t=a)},get effectAllowed(){return o},set effectAllowed(a){WZ(s)&&mn(JZ,a)&&(o=a)},get items(){return YZ(s,e.items)},get files(){return SF(s)?qZ():e.files},get types(){return e.types},setDragImage:(a,c,d)=>{fk(s)&&(HZ(s,{image:a,x:c,y:d}),e.setDragImage(a,c,d))},getData:a=>SF(s)?"":e.getData(a),setData:(a,c)=>{fk(s)&&e.setData(a,c)},clearData:a=>{fk(s)&&e.clearData(a)}};return kF(s),s},QZ=e=>{const t=AI(),o=KZ(e);return TI(e),xF(t),t.dropEffect=e.dropEffect,t.effectAllowed=e.effectAllowed,$Z(e).each(s=>t.setDragImage(s.image,s.x,s.y)),Le(e.types,s=>{s!=="Files"&&t.setData(s,e.getData(s))}),Le(e.files,s=>t.items.add(s)),VZ(e).each(s=>{jZ(t,s)}),o.each(s=>{wF(e,s),wF(t,s)}),t},eW=e=>{const t=e.getData("text/html");return t===""?j.none():j.some(t)},EF=(e,t)=>e.setData("text/html",t),TF="x-tinymce/html",ZR=Ge(TF),OI="",tW=e=>OI+e,oW=e=>e.replace(OI,""),AF=e=>e.indexOf(OI)!==-1,nW=e=>!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e),sW=(e,t)=>{let o="<"+e;const s=vi(t,(a,c)=>c+'="'+up.encodeAllRaw(a)+'"');return s.length&&(o+=" "+s.join(" ")),o+">"},rW=(e,t,o)=>{const s=e.split(/\n\n/),a=sW(t,o),c="",d=dn(s,_=>_.split(/\n/).join("
    ")),h=_=>a+_+c;return d.length===1?d[0]:dn(d,h).join("")},OF="%MCEPASTEBIN%",aW=(e,t)=>{const{dom:o,selection:s}=e,a=e.getBody();t.set(s.getRng());const c=o.add(e.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"},OF);Jo.browser.isFirefox()&&o.setStyle(c,"left",o.getStyle(a,"direction",!0)==="rtl"?65535:-65535),o.bind(c,"beforedeactivate focusin focusout",d=>{d.stopPropagation()}),c.focus(),s.select(c,!0)},iW=(e,t)=>{const o=e.dom;if(zI(e)){let s;const a=t.get();for(;s=zI(e);)o.remove(s),o.unbind(s);a&&e.selection.setRng(a)}t.set(null)},zI=e=>e.dom.get("mcepastebin"),lW=e=>Fe(e)&&e.id==="mcepastebin",cW=e=>{const t=e.dom,o=(d,h)=>{d.appendChild(h),t.remove(h,!0)},[s,...a]=rt(e.getBody().childNodes,lW);Le(a,d=>{o(s,d)});const c=t.select("div[id=mcepastebin]",s);for(let d=c.length-1;d>=0;d--){const h=t.create("div");s.insertBefore(h,c[d]),o(h,c[d])}return s?s.innerHTML:""},zF=e=>e===OF,dW=e=>{const t=Er(null);return{create:()=>aW(e,t),remove:()=>iW(e,t),getEl:()=>zI(e),getHtml:()=>cW(e),getLastRng:t.get}},NF=(e,t)=>(zt.each(t,o=>{Ut(o,RegExp)?e=e.replace(o,""):e=e.replace(o[0],o[1])}),e),uW=e=>{const t=Rc(),o=a1({},t);let s="";const a=t.getVoidElements(),c=zt.makeMap("script noscript style textarea video audio iframe object"," "),d=t.getBlockElements(),h=_=>{const z=_.name,I=_;if(z==="br"){s+=` -`;return}if(z!=="wbr"){if(a[z]&&(s+=" "),c[z]){s+=" ";return}if(_.type===3&&(s+=_.value),!(_.name in t.getVoidElements())){let $=_.firstChild;if($)do h($);while($=$.next)}d[z]&&I.next&&(s+=` +Input object: `+cI(e.input),D8=(e,t)=>_j(e,Ri(t,uI)),Fj=Ge(Oj),DR=(e,t)=>dI(o=>{const s=typeof o;return e(o)?gl.svalue(o):gl.serror(`Expected type: ${t} but got: ${s}`)}),Hj=DR(D,"number"),RR=DR(ft,"string"),$j=DR(bn,"boolean"),fI=DR(Gt,"function"),ZA=Aj,R8=Tj,Vj=e=>Lj(t=>mn(e,t)?Oo.value(t):Oo.error(`Unsupported value: "${t}", choose one of "${e.join(", ")}".`)),M8=(e,t)=>ZA(e,e,E8(),t),L8=e=>M8(e,RR),B8=e=>M8(e,fI),jj=(e,t)=>ZA(e,e,E8(),N8(t)),mI=(e,t)=>ZA(e,e,Cj(),t),MR=e=>mI(e,RR),Uj=e=>mI(e,fI),Zj=(e,t)=>ZA(e,e,A8(t),Fj()),ck=(e,t,o)=>ZA(e,e,A8(t),o),P8=(e,t)=>ck(e,t,Hj),Wj=(e,t)=>ck(e,t,RR),I8=(e,t,o)=>ck(e,t,Vj(o)),pI=(e,t)=>ck(e,t,$j),gI=(e,t)=>ck(e,t,fI),qj=(e,t,o)=>ck(e,t,N8(o)),Kj=L8("type"),Gj=B8("fetch"),hI=B8("onAction"),Yj=gI("onSetup",()=>dt),Xj=MR("text"),Jj=MR("icon"),Qj=MR("tooltip"),eU=MR("label"),tU=pI("active",!1),oU=pI("enabled",!0),F8=pI("primary",!1),nU=e=>Zj("columns",e),WA=e=>Wj("type",e),sU=uI([Kj,L8("trigger"),P8("minChars",1),nU(1),P8("maxResults",10),Uj("matches"),Gj,hI,qj("highlightOn",[],RR)]),rU=e=>Pj("Autocompleter",sU,e),bI=[oU,Qj,Jj,Xj,Yj],H8=[tU].concat(bI),aU=[gI("predicate",fn),I8("scope","node",["node","editor"]),I8("position","selection",["node","selection","line"])],iU=bI.concat([WA("contextformbutton"),F8,hI,R8("original",Ao)]),lU=H8.concat([WA("contextformbutton"),F8,hI,R8("original",Ao)]),cU=bI.concat([WA("contextformbutton")]),dU=H8.concat([WA("contextformtogglebutton")]),uU=D8("type",{contextformbutton:iU,contextformtogglebutton:lU});uI([WA("contextform"),gI("initValue",Ge("")),eU,jj("commands",uU),mI("launch",D8("type",{contextformbutton:cU,contextformtogglebutton:dU}))].concat(aU));const fU=e=>{const t=e.ui.registry.getAll().popups,o=Ri(t,d=>rU(d).fold(h=>{throw new Error(Ij(h))},Ao)),s=hd(yi(o,d=>d.trigger)),a=yl(o);return{dataset:o,triggers:s,lookupByTrigger:d=>rt(a,h=>h.trigger===d)}},mU=(e,t)=>{const o=mg(t.load,50);e.on("input",s=>{s.inputType==="insertCompositionText"&&!e.composing||o.throttle()}),e.on("keydown",s=>{const a=s.which;a===8?o.throttle():a===27?(o.cancel(),t.cancelIfNecessary()):(a===38||a===40)&&o.cancel()},!0),e.on("remove",o.cancel)},pU=e=>{const t=Jr(),o=Er(!1),s=t.isSet,a=()=>{s()&&(MM(e),o.set(!1),t.clear())},c=H=>{s()||t.set({trigger:H.trigger,matchLength:H.text.length})},d=si(()=>fU(e)),h=H=>t.get().map(V=>iI(e.dom,e.selection.getRng(),V.trigger,!0).bind(ee=>x8(e,d,ee,H))).getOrThunk(()=>lj(e,d)),_=H=>{h(H).fold(a,V=>{c(V.context),V.lookupData.then(ee=>{t.get().map(le=>{const oe=V.context;le.trigger===oe.trigger&&(t.set({...le,matchLength:oe.text.length}),o.get()?(U2(e,{range:oe.range}),j2(e,{lookupData:ee})):(o.set(!0),U2(e,{range:oe.range}),V2(e,{lookupData:ee})))})})})},z=(H,V)=>{const ee=H.compareBoundaryPoints(window.Range.START_TO_START,V),le=H.compareBoundaryPoints(window.Range.END_TO_END,V);return ee>=0&&le<=0},I=()=>t.get().bind(({trigger:H})=>{const V=e.selection.getRng();return iI(e.dom,V,H,o.get()).filter(({range:ee})=>z(V,ee)).map(({range:ee})=>ee)});e.addCommand("mceAutocompleterReload",(H,V)=>{const ee=ue(V)?V.fetchOptions:{};_(ee)}),e.addCommand("mceAutocompleterClose",a),e.addCommand("mceAutocompleterRefreshActiveRange",()=>{I().each(H=>{U2(e,{range:H})})}),e.editorCommands.addQueryStateHandler("mceAutoCompleterInRange",()=>I().isSome()),mU(e,{cancelIfNecessary:a,load:_})},gU=_t().browser.isSafari(),$8=e=>Lc(ye.fromDom(e)),V8=(e,t)=>{var o;return e.startOffset===0&&e.endOffset===((o=t.textContent)===null||o===void 0?void 0:o.length)},LR=(e,t)=>j.from(e.getParent(t.container(),"details")),j8=(e,t)=>LR(e,t).isSome(),hU=(e,t)=>{const o=j.from(e.getParent(t.startContainer,"details")),s=j.from(e.getParent(t.endContainer,"details"));if(o.isSome()||s.isSome()){const a=o.bind(c=>j.from(e.select("summary",c)[0]));return j.some({startSummary:a,startDetails:o,endDetails:s})}else return j.none()},bU=(e,t)=>No(t).exists(o=>o.isEqual(e)),yU=(e,t)=>$d(t).exists(o=>Hs(o.getNode())&&Ic(t,o).exists(s=>s.isEqual(e))||o.isEqual(e)),vU=(e,t)=>t.startSummary.exists(o=>bU(e,o)),_U=(e,t)=>t.startSummary.exists(o=>yU(e,o)),xU=(e,t)=>t.startDetails.exists(o=>Ic(o,e).forall(s=>t.startSummary.exists(a=>!a.contains(e.container())&&a.contains(s.container())))),wU=(e,t,o)=>o.startDetails.exists(s=>Pl(e,t).forall(a=>!s.contains(a.container()))),U8=(e,t)=>{const o=t.getNode();ln(o)||e.selection.setCursorLocation(o,t.offset())},Z8=(e,t,o)=>{const s=e.dom.getParent(t.container(),"details");if(s&&!s.open){const a=e.dom.select("summary",s)[0];a&&(o?No(a):$d(a)).each(d=>U8(e,d))}else U8(e,t)},kU=(e,t)=>{const o=_=>_.contains(e.startContainer),s=_=>_.contains(e.endContainer),a=t.startSummary.exists(o),c=t.startSummary.exists(s),d=t.startDetails.forall(_=>t.endDetails.forall(z=>_!==z));return(a||c)&&!(a&&c)||d},W8=(e,t,o)=>{const{dom:s,selection:a}=e,c=e.getBody();if(o==="character"){const d=Ue.fromRangeStart(a.getRng()),h=s.getParent(d.container(),s.isBlock),_=LR(s,d),z=h&&s.isEmpty(h),I=ot(h==null?void 0:h.previousSibling),H=ot(h==null?void 0:h.nextSibling);return z&&(t?H:I)&&eb(!t,c,d).exists(le=>j8(s,le)&&!wd(_,LR(s,le)))?!0:eb(t,c,d).fold(fn,V=>{const ee=LR(s,V);if(j8(s,V)&&!wd(_,ee)){if(t||Z8(e,V,!1),h&&z){if(t&&I)return!0;if(!t&&H)return!0;Z8(e,V,t),e.dom.remove(h)}return!0}else return!1})}else return!1},CU=(e,t,o,s)=>{const c=e.selection.getRng(),d=Ue.fromRangeStart(c),h=e.getBody();return s==="selection"?kU(c,t):o?_U(d,t)||wU(h,d,t):vU(d,t)||xU(d,t)},SU=(e,t,o)=>hU(e.dom,e.selection.getRng()).fold(()=>W8(e,t,o),s=>CU(e,s,t,o)||W8(e,t,o)),EU=(e,t,o)=>{const s=e.selection,a=s.getNode(),c=s.getRng(),d=Ue.fromRangeStart(c);return em(a)?(o==="selection"&&V8(c,a)||hO(t,d,a)?$8(a):e.undoManager.transact(()=>{const h=s.getSel();let{anchorNode:_,anchorOffset:z,focusNode:I,focusOffset:H}=h??{};const V=()=>{Fe(_)&&Fe(z)&&Fe(I)&&Fe(H)&&(h==null||h.setBaseAndExtent(_,z,I,H))},ee=()=>{_=h==null?void 0:h.anchorNode,z=h==null?void 0:h.anchorOffset,I=h==null?void 0:h.focusNode,H=h==null?void 0:h.focusOffset},le=(fe,ke)=>{Be(fe.childNodes,Oe=>{Py(Oe)&&ke.appendChild(Oe)})},oe=e.dom.create("span",{"data-mce-bogus":"1"});le(a,oe),a.appendChild(oe),V(),(o==="word"||o==="line")&&(h==null||h.modify("extend",t?"right":"left",o)),!s.isCollapsed()&&V8(s.getRng(),oe)?$8(a):(e.execCommand(t?"ForwardDelete":"Delete"),ee(),le(oe,a),V()),e.dom.remove(oe)}),!0):!1},s_=(e,t,o)=>SU(e,t,o)||gU&&EU(e,t,o)?j.some(dt):j.none(),q8=e=>(t,o,s={})=>{const a=t.getBody(),c={bubbles:!0,composed:!0,data:null,isComposing:!1,detail:0,view:null,target:a,currentTarget:a,eventPhase:Event.AT_TARGET,originalTarget:a,explicitOriginalTarget:a,isTrusted:!1,srcElement:a,cancelable:!1,preventDefault:dt,inputType:o},d=am(new InputEvent(e));return t.dispatch(e,{...d,...c,...s})},qA=q8("input"),BR=q8("beforeinput"),K8=_t(),G8=K8.os,Y8=G8.isMacOS()||G8.isiOS(),AU=K8.browser.isFirefox(),TU=(e,t,o)=>{const s=o.keyCode===Zt.BACKSPACE?"deleteContentBackward":"deleteContentForward",a=e.selection.isCollapsed(),c=a?"character":"selection",d=h=>a?h?"word":"line":"selection";lk([{keyCode:Zt.BACKSPACE,action:jo(Ze,e)},{keyCode:Zt.BACKSPACE,action:jo(bA,e,!1)},{keyCode:Zt.DELETE,action:jo(bA,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(pA,e,!1)},{keyCode:Zt.DELETE,action:jo(pA,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(Jv,e,t,!1)},{keyCode:Zt.DELETE,action:jo(Jv,e,t,!0)},{keyCode:Zt.BACKSPACE,action:jo(Ip,e,!1)},{keyCode:Zt.DELETE,action:jo(Ip,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(s_,e,!1,c)},{keyCode:Zt.DELETE,action:jo(s_,e,!0,c)},...Y8?[{keyCode:Zt.BACKSPACE,altKey:!0,action:jo(s_,e,!1,d(!0))},{keyCode:Zt.DELETE,altKey:!0,action:jo(s_,e,!0,d(!0))},{keyCode:Zt.BACKSPACE,metaKey:!0,action:jo(s_,e,!1,d(!1))}]:[{keyCode:Zt.BACKSPACE,ctrlKey:!0,action:jo(s_,e,!1,d(!0))},{keyCode:Zt.DELETE,ctrlKey:!0,action:jo(s_,e,!0,d(!0))}],{keyCode:Zt.BACKSPACE,action:jo(vA,e,!1)},{keyCode:Zt.DELETE,action:jo(vA,e,!0)},{keyCode:Zt.BACKSPACE,action:jo($,e,!1)},{keyCode:Zt.DELETE,action:jo($,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(uA,e,!1)},{keyCode:Zt.DELETE,action:jo(uA,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(Kw,e,!1)},{keyCode:Zt.DELETE,action:jo(Kw,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(p,e,!1)},{keyCode:Zt.DELETE,action:jo(p,e,!0)},{keyCode:Zt.BACKSPACE,action:jo(yA,e,!1)},{keyCode:Zt.DELETE,action:jo(yA,e,!0)}],o).filter(h=>e.selection.isEditable()).each(h=>{o.preventDefault(),BR(e,s).isDefaultPrevented()||(h(),qA(e,s))})},OU=(e,t,o)=>th([{keyCode:Zt.BACKSPACE,action:jo(AD,e)},{keyCode:Zt.DELETE,action:jo(AD,e)},...Y8?[{keyCode:Zt.BACKSPACE,altKey:!0,action:jo(O,e)},{keyCode:Zt.DELETE,altKey:!0,action:jo(O,e)},...o?[{keyCode:AU?224:91,action:jo(O,e)}]:[]]:[{keyCode:Zt.BACKSPACE,ctrlKey:!0,action:jo(O,e)},{keyCode:Zt.DELETE,ctrlKey:!0,action:jo(O,e)}]],t),zU=(e,t)=>{let o=!1;e.on("keydown",s=>{o=s.keyCode===Zt.BACKSPACE,s.isDefaultPrevented()||TU(e,t,s)}),e.on("keyup",s=>{s.isDefaultPrevented()||OU(e,s,o),o=!1})},NU=e=>{for(;e;){if(no(e)||wt(e)&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}return null},dk=(e,t)=>{const o=e.dom,s=e.schema.getMoveCaretBeforeOnEnterElements();if(!t)return;if(/^(LI|DT|DD)$/.test(t.nodeName)){const c=NU(t.firstChild);c&&/^(UL|OL|DL)$/.test(c.nodeName)&&t.insertBefore(o.doc.createTextNode(da),t.firstChild)}const a=o.createRng();if(t.normalize(),t.hasChildNodes()){const c=new Ma(t,t);let d=t,h;for(;h=c.current();){if(wt(h)){a.setStart(h,0),a.setEnd(h,0);break}if(s[h.nodeName.toLowerCase()]){a.setStartBefore(h),a.setEndBefore(h);break}d=h,h=c.next()}h||(a.setStart(d,0),a.setEnd(d,0))}else Hs(t)?t.nextSibling&&o.isBlock(t.nextSibling)?(a.setStartBefore(t),a.setEndBefore(t)):(a.setStartAfter(t),a.setEndAfter(t)):(a.setStart(t,0),a.setEnd(t,0));e.selection.setRng(a),Ud(e,a)},KA=(e,t)=>{const o=e.getRoot();let s,a=t;for(;a!==o&&a&&e.getContentEditable(a)!=="false";){if(e.getContentEditable(a)==="true"){s=a;break}a=a.parentNode}return a!==o?s:o},yI=e=>j.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock)),DU=e=>yI(e).fold(Ge(""),t=>t.nodeName.toUpperCase()),RU=e=>yI(e).filter(t=>mm(ye.fromDom(t))).isSome(),vI=e=>{e.innerHTML='
    '},MU=(e,t,o)=>{const s=e.dom;j.from(o.style).map(s.parseStyle).each(_=>{const I={...Xu(ye.fromDom(t)),..._};s.setStyles(t,I)});const a=j.from(o.class).map(_=>_.split(/\s+/)),c=j.from(t.className).map(_=>rt(_.split(/\s+/),z=>z!==""));va(a,c,(_,z)=>{const I=rt(z,V=>!mn(_,V)),H=[..._,...I];s.setAttrib(t,"class",H.join(" "))});const d=["style","class"],h=Mi(o,(_,z)=>!mn(d,z));s.setAttribs(t,h)},GA=(e,t)=>{if(Vi(e).toLowerCase()===t.tagName.toLowerCase()){const s=g0(e);MU(e,t,s)}},X8=(e,t,o,s,a=!0,c,d)=>{const h=e.dom,_=e.schema,z=Vi(e),I=o?o.nodeName.toUpperCase():"";let H=t;const V=_.getTextInlineElements();let ee;c||I==="TABLE"||I==="HR"?ee=h.create(c||z,d||{}):ee=o.cloneNode(!1);let le=ee;if(!a)h.setAttrib(ee,"style",null),h.setAttrib(ee,"class",null);else do if(V[H.nodeName]){if(dd(H)||ud(H))continue;const oe=H.cloneNode(!1);h.setAttrib(oe,"id",""),ee.hasChildNodes()?(oe.appendChild(ee.firstChild),ee.appendChild(oe)):(le=oe,ee.appendChild(oe))}while((H=H.parentNode)&&H!==s);return GA(e,ee),vI(le),ee},LU=(e,t)=>e.dom.getParent(t,Qf),BU=(e,t,o)=>{let s=t;for(;s&&s!==e&&ot(s.nextSibling);){const a=s.parentElement;if(!a||!o(a))return Qf(a);s=a}return!1},PU=(e,t,o)=>!t&&o.nodeName.toLowerCase()===Vi(e)&&e.dom.isEmpty(o)&&BU(e.getBody(),o,s=>Ro(e.schema.getTextBlockElements(),s.nodeName.toLowerCase())),IU=(e,t,o)=>{var s,a,c;const d=t(Vi(e)),h=LU(e,o);h&&(e.dom.insertAfter(d,h),dk(e,d),((c=(a=(s=o.parentElement)===null||s===void 0?void 0:s.childNodes)===null||a===void 0?void 0:a.length)!==null&&c!==void 0?c:0)>1&&e.dom.remove(o))},FU=(e,t)=>e.firstChild&&e.firstChild.nodeName===t,HU=e=>{var t;return((t=e.parentNode)===null||t===void 0?void 0:t.firstChild)===e},J8=(e,t)=>{const o=e==null?void 0:e.parentNode;return Fe(o)&&o.nodeName===t},Q8=e=>Fe(e)&&/^(OL|UL|LI)$/.test(e.nodeName),_I=e=>Fe(e)&&/^(LI|DT|DD)$/.test(e.nodeName),$U=e=>Q8(e)&&Q8(e.parentNode),PR=e=>{const t=e.parentNode;return _I(t)?t:e},IR=(e,t,o)=>{let s=e[o?"firstChild":"lastChild"];for(;s&&!no(s);)s=s[o?"nextSibling":"previousSibling"];return s===t},eF=e=>ko(yi(Xu(ye.fromDom(e)),(t,o)=>`${o}: ${t};`),(t,o)=>t+o,""),VU=(e,t,o,s,a)=>{const c=e.dom,d=e.selection.getRng(),h=o.parentNode;if(o===e.getBody()||!h)return;$U(o)&&(a="LI");const _=_I(s)?eF(s):void 0;let z=_I(s)&&_?t(a,{style:eF(s)}):t(a);if(IR(o,s,!0)&&IR(o,s,!1))if(J8(o,"LI")){const I=PR(o);c.insertAfter(z,I),HU(o)?c.remove(I):c.remove(o)}else c.replace(z,o);else if(IR(o,s,!0))J8(o,"LI")?(c.insertAfter(z,PR(o)),z.appendChild(c.doc.createTextNode(" ")),z.appendChild(o)):h.insertBefore(z,o),c.remove(s);else if(IR(o,s,!1))c.insertAfter(z,PR(o)),c.remove(s);else{o=PR(o);const I=d.cloneRange();I.setStartAfter(s),I.setEndAfter(o);const H=I.extractContents();if(a==="LI"&&FU(H,"LI")){const V=rt(dn(z.children,ye.fromDom),pt(Sd("br")));z=H.firstChild,c.insertAfter(H,o),Be(V,ee=>Wa(ye.fromDom(z),ee)),_&&z.setAttribute("style",_)}else c.insertAfter(H,o),c.insertAfter(z,o);c.remove(s)}dk(e,z)},jU=e=>{Be(zd(ye.fromDom(e),Rs),t=>{const o=t.dom;o.nodeValue=ol(o.data)})},UU=(e,t)=>{const o=e.dom.getParent(t,"ol,ul,dl");return o!==null&&e.dom.getContentEditableParent(o)==="false"},ZU=(e,t)=>t&&t.nodeName==="A"&&e.isEmpty(t),xI=(e,t)=>e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t,wI=(e,t)=>Fe(t)&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&e.isEditable(t.parentNode)&&e.getContentEditable(t)!=="false",WU=(e,t,o)=>{var s;const a=[];if(!o)return;let c=o;for(;c=c.firstChild;){if(e.isBlock(c))return;no(c)&&!t[c.nodeName.toLowerCase()]&&a.push(c)}let d=a.length;for(;d--;)c=a[d],(!c.hasChildNodes()||c.firstChild===c.lastChild&&((s=c.firstChild)===null||s===void 0?void 0:s.nodeValue)===""||ZU(e,c))&&e.remove(c)},kI=(e,t,o)=>wt(t)?e?o===1&&t.data.charAt(o-1)===ua?0:o:o===t.data.length-1&&t.data.charAt(o)===ua?t.data.length:o:o,qU=e=>{const t=e.cloneRange();return t.setStart(e.startContainer,kI(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,kI(!1,e.endContainer,e.endOffset)),t},KU=e=>{let t=e;do wt(t)&&(t.data=t.data.replace(/^[\r\n]+/,"")),t=t.firstChild;while(t)},GU=(e,t,o,s,a)=>{var c,d;const h=e.dom,_=(c=KA(h,s))!==null&&c!==void 0?c:h.getRoot();let z=h.getParent(s,h.isBlock);if(!z||!wI(h,z)){if(z=z||_,!z.hasChildNodes()){const ee=h.create(t);return GA(e,ee),z.appendChild(ee),o.setStart(ee,0),o.setEnd(ee,0),ee}let I=s;for(;I&&I.parentNode!==z;)I=I.parentNode;let H;for(;I&&!h.isBlock(I);)H=I,I=I.previousSibling;const V=(d=H==null?void 0:H.parentElement)===null||d===void 0?void 0:d.nodeName;if(H&&V&&e.schema.isValidChild(V,t.toLowerCase())){const ee=H.parentNode,le=h.create(t);for(GA(e,le),ee.insertBefore(le,H),I=H;I&&!h.isBlock(I);){const oe=I.nextSibling;le.appendChild(I),I=oe}o.setStart(s,a),o.setEnd(s,a)}}return s},YU=(e,t)=>{t.normalize();const o=t.lastChild;(!o||no(o)&&/^(left|right)$/gi.test(e.getStyle(o,"float",!0)))&&e.add(t,"br")},XU=(e,t)=>{const o=t2(e);return uo(t)?!1:ft(o)?mn(zt.explode(o),t.nodeName.toLowerCase()):o},tF={insert:(e,t)=>{let o,s,a,c,d=!1;const h=e.dom,_=e.schema,z=_.getNonEmptyElements(),I=e.selection.getRng(),H=Vi(e),V=ye.fromDom(I.startContainer),ee=xc(V,I.startOffset),le=ee.exists(mt=>ai(mt)&&!js(mt)),oe=I.collapsed&&le,fe=(mt,to)=>X8(e,o,Mt,ht,e2(e),mt,to),ke=mt=>{const to=kI(mt,o,s);if(wt(o)&&(mt?to>0:to{let mt;return/^(H[1-6]|PRE|FIGURE)$/.test(a)&&Yt!=="HGROUP"?mt=fe(H):mt=fe(),XU(e,c)&&wI(h,c)&&h.isEmpty(Mt,void 0,{includeZwsp:!0})?mt=h.split(c,Mt):h.insertAfter(mt,Mt),dk(e,mt),mt};Sm(h,I).each(mt=>{I.setStart(mt.startContainer,mt.startOffset),I.setEnd(mt.endContainer,mt.endOffset)}),o=I.startContainer,s=I.startOffset;const Ae=!!(t&&t.shiftKey),Pe=!!(t&&t.ctrlKey);no(o)&&o.hasChildNodes()&&!oe&&(d=s>o.childNodes.length-1,o=o.childNodes[Math.min(s,o.childNodes.length-1)]||o,d&&wt(o)?s=o.data.length:s=0);const ht=KA(h,o);if(!ht||UU(e,o))return;Ae||(o=GU(e,H,I,o,s));let Mt=h.getParent(o,h.isBlock)||h.getRoot();c=Fe(Mt==null?void 0:Mt.parentNode)?h.getParent(Mt.parentNode,h.isBlock):null,a=Mt?Mt.nodeName.toUpperCase():"";const Yt=c?c.nodeName.toUpperCase():"";if(Yt==="LI"&&!Pe){const mt=c;Mt=mt,c=mt.parentNode,a=Yt}if(no(c)&&PU(e,Ae,Mt))return IU(e,fe,Mt);if(/^(LI|DT|DD)$/.test(a)&&no(c)&&h.isEmpty(Mt)){VU(e,fe,c,Mt,H);return}if(!oe&&(Mt===e.getBody()||!wI(h,Mt)))return;const Qe=Mt.parentNode;let Ve;if(oe)Ve=fe(H),ee.fold(()=>{fr(V,ye.fromDom(Ve))},mt=>{Zs(mt,ye.fromDom(Ve))}),e.selection.setCursorLocation(Ve,0);else if(gg(Mt))Ve=kp(Mt),h.isEmpty(Mt)&&vI(Mt),GA(e,Ve),dk(e,Ve);else if(ke(!1))Ve=Oe();else if(ke(!0)&&Qe){const mt=Ue.fromRangeStart(I),to=qy(mt),bo=ye.fromDom(Mt),Cn=gb(bo,mt,e.schema)?Ix(bo,mt,e.schema).bind(hs=>j.from(hs.getNode())):j.none();Ve=Qe.insertBefore(fe(),Mt);const ds=xI(Mt,"HR")||to?Ve:Cn.getOr(Mt);dk(e,ds)}else{const mt=qU(I).cloneRange();mt.setEndAfter(Mt);const to=mt.extractContents();jU(to),KU(to),Ve=to.firstChild,h.insertAfter(to,Mt),WU(h,z,Ve),YU(h,Mt),h.isEmpty(Mt)&&vI(Mt),Ve.normalize(),h.isEmpty(Ve)?(h.remove(Ve),Oe()):(GA(e,Ve),dk(e,Ve))}h.setAttrib(Ve,"id",""),e.dispatch("NewBlock",{newBlock:Ve})},fakeEventName:"insertParagraph"},JU=(e,t,o)=>{const s=new Ma(t,o);let a;const c=e.getNonEmptyElements();for(;a=s.next();)if(c[a.nodeName.toLowerCase()]||wt(a)&&a.length>0)return!0;return!1},oF=(e,t,o)=>{const s=e.dom.createRng();o?(s.setStartBefore(t),s.setEndBefore(t)):(s.setStartAfter(t),s.setEndAfter(t)),e.selection.setRng(s),Ud(e,s)},QU=(e,t)=>{const o=e.selection,s=e.dom,a=o.getRng();let c,d=!1;Sm(s,a).each(ee=>{a.setStart(ee.startContainer,ee.startOffset),a.setEnd(ee.endContainer,ee.endOffset)});let h=a.startOffset,_=a.startContainer;if(no(_)&&_.hasChildNodes()){const ee=h>_.childNodes.length-1;_=_.childNodes[Math.min(h,_.childNodes.length-1)]||_,ee&&wt(_)?h=_.data.length:h=0}let z=s.getParent(_,s.isBlock);const I=z&&z.parentNode?s.getParent(z.parentNode,s.isBlock):null,H=I?I.nodeName.toUpperCase():"",V=!!(t&&t.ctrlKey);H==="LI"&&!V&&(z=I),wt(_)&&h>=_.data.length&&(JU(e.schema,_,z||s.getRoot())||(c=s.create("br"),a.insertNode(c),a.setStartAfter(c),a.setEndAfter(c),d=!0)),c=s.create("br"),Cy(s,a,c),oF(e,c,d),e.undoManager.add()},eZ=(e,t)=>{const o=ye.fromTag("br");Zs(ye.fromDom(t),o),e.undoManager.add()},tZ=(e,t)=>{nZ(e.getBody(),t)||Ne(ye.fromDom(t),ye.fromTag("br"));const o=ye.fromTag("br");Ne(ye.fromDom(t),o),oF(e,o.dom,!1),e.undoManager.add()},oZ=e=>Hs(e.getNode()),nZ=(e,t)=>oZ(Ue.after(t))?!0:Pl(e,Ue.after(t)).map(o=>Hs(o.getNode())).getOr(!1),nF=e=>e&&e.nodeName==="A"&&"href"in e,sZ=e=>e.fold(fn,nF,nF,fn),rZ=e=>{const t=Ht(bb,e),o=Ue.fromRangeStart(e.selection.getRng());return Im(t,e.getBody(),o).filter(sZ)},aZ=(e,t)=>{t.fold(dt,Ht(eZ,e),Ht(tZ,e),dt)},sF={insert:(e,t)=>{const o=rZ(e);o.isSome()?o.each(Ht(aZ,e)):QU(e,t)},fakeEventName:"insertLineBreak"},rF=(e,t)=>yI(e).filter(o=>t.length>0&&ls(ye.fromDom(o),t)).isSome(),iZ=e=>rF(e,vT(e)),lZ=e=>rF(e,_T(e)),$u=zn.generate([{br:[]},{block:[]},{none:[]}]),cZ=(e,t)=>lZ(e),aF=e=>(t,o)=>RU(t)===e,iF=(e,t)=>(o,s)=>DU(o)===e.toUpperCase()===t,dZ=e=>{const t=KA(e.dom,e.selection.getStart());return uo(t)},YA=e=>iF("pre",e),uZ=()=>iF("summary",!0),FR=e=>(t,o)=>Jk(t)===e,fZ=(e,t)=>iZ(e),HR=(e,t)=>t,mZ=e=>{const t=Vi(e),o=KA(e.dom,e.selection.getStart());return Fe(o)&&e.schema.isValidChild(o.nodeName,t)},pZ=e=>{const t=e.selection.getRng(),o=ye.fromDom(t.startContainer),a=xc(o,t.startOffset).map(c=>ai(c)&&!js(c));return t.collapsed&&a.getOr(!0)},Of=(e,t)=>(o,s)=>ko(e,(c,d)=>c&&d(o,s),!0)?j.some(t):j.none(),gZ=(e,t)=>ID([Of([cZ],$u.none()),Of([YA(!0),dZ],$u.none()),Of([uZ()],$u.br()),Of([YA(!0),FR(!1),HR],$u.br()),Of([YA(!0),FR(!1)],$u.block()),Of([YA(!0),FR(!0),HR],$u.block()),Of([YA(!0),FR(!0)],$u.br()),Of([aF(!0),HR],$u.br()),Of([aF(!0)],$u.block()),Of([fZ],$u.br()),Of([HR],$u.br()),Of([mZ],$u.block()),Of([pZ],$u.block())],[e,!!(t&&t.shiftKey)]).getOr($u.none()),$R=(e,t,o)=>{t.selection.isCollapsed()||pO(t),!(Fe(o)&&BR(t,e.fakeEventName).isDefaultPrevented())&&(e.insert(t,o),Fe(o)&&qA(t,e.fakeEventName))},lF=(e,t)=>{const o=()=>$R(sF,e,t),s=()=>$R(tF,e,t),a=gZ(e,t);switch(Qk(e)){case"linebreak":a.fold(o,o,dt);break;case"block":a.fold(s,s,dt);break;case"invert":a.fold(s,o,dt);break;default:a.fold(o,s,dt);break}},cF=_t(),hZ=cF.os.isiOS()&&cF.browser.isSafari(),dF=(e,t)=>{t.isDefaultPrevented()||(t.preventDefault(),oB(e.undoManager),e.undoManager.transact(()=>{lF(e,t)}))},bZ=e=>{if(!e.collapsed)return!1;const t=e.startContainer;if(wt(t)){const o=/^[\uAC00-\uD7AF\u1100-\u11FF\u3130-\u318F\uA960-\uA97F\uD7B0-\uD7FF]$/,s=t.data.charAt(e.startOffset-1);return o.test(s)}else return!1},yZ=e=>{let t=j.none();const o=a=>{t=j.some(a.selection.getBookmark()),a.undoManager.add()},s=(a,c)=>{a.undoManager.undo(),t.fold(dt,d=>a.selection.moveToBookmark(d)),dF(a,c),t=j.none()};e.on("keydown",a=>{a.keyCode===Zt.ENTER&&(hZ&&bZ(e.selection.getRng())?o(e):dF(e,a))}),e.on("keyup",a=>{a.keyCode===Zt.ENTER&&t.each(()=>s(e,a))})},vZ=(e,t,o)=>{const s=Jo.os.isMacOS()||Jo.os.isiOS();th([{keyCode:Zt.END,action:jo(Hu,e,!0)},{keyCode:Zt.HOME,action:jo(Hu,e,!1)},...s?[]:[{keyCode:Zt.HOME,action:jo(Bb,e,!1),ctrlKey:!0,shiftKey:!0},{keyCode:Zt.END,action:jo(Bb,e,!0),ctrlKey:!0,shiftKey:!0}],{keyCode:Zt.END,action:jo($A,e,!0)},{keyCode:Zt.HOME,action:jo($A,e,!1)},{keyCode:Zt.END,action:jo(Yv,e,!0,t)},{keyCode:Zt.HOME,action:jo(Yv,e,!1,t)}],o).each(a=>{o.preventDefault()})},_Z=(e,t)=>{e.on("keydown",o=>{o.isDefaultPrevented()||vZ(e,t,o)})},xZ=e=>{e.on("input",t=>{t.isComposing||v6(e)})},wZ=_t(),kZ=(e,t,o)=>{th([{keyCode:Zt.PAGE_UP,action:jo(Yv,e,!1,t)},{keyCode:Zt.PAGE_DOWN,action:jo(Yv,e,!0,t)}],o)},uF=e=>e.stopImmediatePropagation(),fF=e=>e.keyCode===Zt.PAGE_UP||e.keyCode===Zt.PAGE_DOWN,mF=(e,t,o)=>{o&&!e.get()?t.on("NodeChange",uF,!0):!o&&e.get()&&t.off("NodeChange",uF),e.set(o)},CZ=(e,t)=>{if(wZ.os.isMacOS())return;const o=Er(!1);e.on("keydown",s=>{fF(s)&&mF(o,e,!0)}),e.on("keyup",s=>{s.isDefaultPrevented()||kZ(e,t,s),fF(s)&&o.get()&&(mF(o,e,!1),e.nodeChanged())})},SZ=e=>{e.on("beforeinput",t=>{(!e.selection.isEditable()||Ln(t.getTargetRanges(),o=>!C3(e.dom,o)))&&t.preventDefault()})},pF=(e,t)=>{const o=t.container(),s=t.offset();return wt(o)?(o.insertData(s,e),j.some(Ue(o,s+e.length))):X_(t).map(a=>{const c=ye.fromText(e);return t.isAtEnd()?Ne(a,c):Zs(a,c),Ue(c.dom,e.length)})},gF=Ht(pF,da),hF=Ht(pF," "),EZ=(e,t,o)=>NC(e,t,o)?gF(t):hF(t),AZ=e=>t=>t.fold(o=>Ic(e.dom,Ue.before(o)),o=>No(o),o=>$d(o),o=>Pl(e.dom,Ue.after(o))),TZ=(e,t,o)=>s=>NC(e,s,o)?gF(t):hF(t),bF=e=>t=>{e.selection.setRng(t.toRange()),e.nodeChanged()},OZ=(e,t)=>e.isEditable(e.getParent(t,"summary")),zZ=e=>{const t=Ue.fromRangeStart(e.selection.getRng()),o=ye.fromDom(e.getBody());if(e.selection.isCollapsed()){const s=Ht(bb,e),a=Ue.fromRangeStart(e.selection.getRng());return Im(s,e.getBody(),a).bind(AZ(o)).map(c=>()=>TZ(o,t,e.schema)(c).each(bF(e)))}else return j.none()},NZ=e=>{const t=()=>{const o=ye.fromDom(e.getBody());e.selection.isCollapsed()||e.getDoc().execCommand("Delete");const s=Ue.fromRangeStart(e.selection.getRng());EZ(o,s,e.schema).each(bF(e))};return lu(Jo.browser.isFirefox()&&e.selection.isEditable()&&OZ(e.dom,e.selection.getRng().startContainer),t)},DZ=(e,t)=>{lk([{keyCode:Zt.SPACEBAR,action:jo(zZ,e)},{keyCode:Zt.SPACEBAR,action:jo(NZ,e)}],t).each(o=>{t.preventDefault(),BR(e,"insertText",{data:" "}).isDefaultPrevented()||(o(),qA(e,"insertText",{data:" "}))})},RZ=e=>{e.on("keydown",t=>{t.isDefaultPrevented()||DZ(e,t)})},MZ=e=>UT(e)?[{keyCode:Zt.TAB,action:jo(h8,e,!0)},{keyCode:Zt.TAB,shiftKey:!0,action:jo(h8,e,!1)}]:[],LZ=(e,t)=>{th([...MZ(e)],t).each(o=>{t.preventDefault()})},BZ=e=>{e.on("keydown",t=>{t.isDefaultPrevented()||LZ(e,t)})},PZ=e=>{if(e.addShortcut("Meta+P","","mcePrint"),pU(e),Pm(e))return Er(null);{const t=dR(e);return SZ(e),Lb(e),YV(e,t),zU(e,t),yZ(e),RZ(e),xZ(e),BZ(e),_Z(e,t),CZ(e,t),t}};class IZ{constructor(t){this.lastPath=[],this.editor=t;let o;const s=this;"onselectionchange"in t.getDoc()||t.on("NodeChange click mouseup keyup focus",a=>{const c=t.selection.getRng(),d={startContainer:c.startContainer,startOffset:c.startOffset,endContainer:c.endContainer,endOffset:c.endOffset};(a.type==="nodechange"||!G0(d,o))&&t.dispatch("SelectionChange"),o=d}),t.on("contextmenu",()=>{$y(t),t.dispatch("SelectionChange")}),t.on("SelectionChange",()=>{const a=t.selection.getStart(!0);a&&Ly(t)&&!s.isSameElementPath(a)&&t.dom.isChildOf(a,t.getBody())&&t.nodeChanged({selectionChange:!0})}),t.on("mouseup",a=>{!a.isDefaultPrevented()&&Ly(t)&&(t.selection.getNode().nodeName==="IMG"?$c.setEditorTimeout(t,()=>{t.nodeChanged()}):t.nodeChanged())})}nodeChanged(t={}){const o=this.editor.selection;let s;if(this.editor.initialized&&o&&!Q5(this.editor)&&!this.editor.mode.isReadOnly()){const a=this.editor.getBody();s=o.getStart(!0)||a,(s.ownerDocument!==this.editor.getDoc()||!this.editor.dom.isChildOf(s,a))&&(s=a);const c=[];this.editor.dom.getParent(s,d=>d===a?!0:(c.push(d),!1)),this.editor.dispatch("NodeChange",{...t,element:s,parents:c})}}isSameElementPath(t){let o;const s=this.editor,a=sa(s.dom.getParents(t,zo,s.getBody()));if(a.length===this.lastPath.length){for(o=a.length;o>=0&&a[o]===this.lastPath[o];o--);if(o===-1)return this.lastPath=a,!0}return this.lastPath=a,!1}}const yF=Ei("image"),FZ=e=>{const t=e;return j.from(t[yF])},HZ=(e,t)=>{const o=e;o[yF]=t},CI=Ei("event"),$Z=e=>{const t=e;return j.from(t[CI])},VR=e=>t=>{const o=t;o[CI]=e},VZ=(e,t)=>VR(t)(e),vF=VR(0),jZ=VR(2),UZ=VR(1),ZZ=(e=>t=>{const o=t;return j.from(o[CI]).exists(s=>s===e)})(0),WZ=()=>Object.freeze({length:0,item:e=>null}),SI=Ei("mode"),qZ=e=>{const t=e;return j.from(t[SI])},jR=e=>t=>{const o=t;o[SI]=e},_F=(e,t)=>jR(t)(e),xF=jR(0),EI=jR(2),KZ=jR(1),wF=e=>t=>{const o=t;return j.from(o[SI]).exists(s=>s===e)},uk=wF(0),kF=wF(1),GZ=(e,t)=>({...t,get length(){return t.length},add:(o,s)=>{if(uk(e))if(ft(o)){if(!ln(s))return t.add(o,s)}else return t.add(o);return null},remove:o=>{uk(e)&&t.remove(o)},clear:()=>{uk(e)&&t.clear()}}),YZ=["none","copy","link","move"],XZ=["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"],AI=()=>{const e=new window.DataTransfer;let t="move",o="all";const s={get dropEffect(){return t},set dropEffect(a){mn(YZ,a)&&(t=a)},get effectAllowed(){return o},set effectAllowed(a){ZZ(s)&&mn(XZ,a)&&(o=a)},get items(){return GZ(s,e.items)},get files(){return kF(s)?WZ():e.files},get types(){return e.types},setDragImage:(a,c,d)=>{uk(s)&&(HZ(s,{image:a,x:c,y:d}),e.setDragImage(a,c,d))},getData:a=>kF(s)?"":e.getData(a),setData:(a,c)=>{uk(s)&&e.setData(a,c)},clearData:a=>{uk(s)&&e.clearData(a)}};return xF(s),s},JZ=e=>{const t=AI(),o=qZ(e);return EI(e),vF(t),t.dropEffect=e.dropEffect,t.effectAllowed=e.effectAllowed,FZ(e).each(s=>t.setDragImage(s.image,s.x,s.y)),Be(e.types,s=>{s!=="Files"&&t.setData(s,e.getData(s))}),Be(e.files,s=>t.items.add(s)),$Z(e).each(s=>{VZ(t,s)}),o.each(s=>{_F(e,s),_F(t,s)}),t},QZ=e=>{const t=e.getData("text/html");return t===""?j.none():j.some(t)},CF=(e,t)=>e.setData("text/html",t),SF="x-tinymce/html",UR=Ge(SF),TI="",eW=e=>TI+e,tW=e=>e.replace(TI,""),EF=e=>e.indexOf(TI)!==-1,oW=e=>!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e),nW=(e,t)=>{let o="<"+e;const s=yi(t,(a,c)=>c+'="'+dp.encodeAllRaw(a)+'"');return s.length&&(o+=" "+s.join(" ")),o+">"},sW=(e,t,o)=>{const s=e.split(/\n\n/),a=nW(t,o),c="",d=dn(s,_=>_.split(/\n/).join("
    ")),h=_=>a+_+c;return d.length===1?d[0]:dn(d,h).join("")},AF="%MCEPASTEBIN%",rW=(e,t)=>{const{dom:o,selection:s}=e,a=e.getBody();t.set(s.getRng());const c=o.add(e.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"},AF);Jo.browser.isFirefox()&&o.setStyle(c,"left",o.getStyle(a,"direction",!0)==="rtl"?65535:-65535),o.bind(c,"beforedeactivate focusin focusout",d=>{d.stopPropagation()}),c.focus(),s.select(c,!0)},aW=(e,t)=>{const o=e.dom;if(OI(e)){let s;const a=t.get();for(;s=OI(e);)o.remove(s),o.unbind(s);a&&e.selection.setRng(a)}t.set(null)},OI=e=>e.dom.get("mcepastebin"),iW=e=>Fe(e)&&e.id==="mcepastebin",lW=e=>{const t=e.dom,o=(d,h)=>{d.appendChild(h),t.remove(h,!0)},[s,...a]=rt(e.getBody().childNodes,iW);Be(a,d=>{o(s,d)});const c=t.select("div[id=mcepastebin]",s);for(let d=c.length-1;d>=0;d--){const h=t.create("div");s.insertBefore(h,c[d]),o(h,c[d])}return s?s.innerHTML:""},TF=e=>e===AF,cW=e=>{const t=Er(null);return{create:()=>rW(e,t),remove:()=>aW(e,t),getEl:()=>OI(e),getHtml:()=>lW(e),getLastRng:t.get}},OF=(e,t)=>(zt.each(t,o=>{Ut(o,RegExp)?e=e.replace(o,""):e=e.replace(o[0],o[1])}),e),dW=e=>{const t=Dc(),o=r1({},t);let s="";const a=t.getVoidElements(),c=zt.makeMap("script noscript style textarea video audio iframe object"," "),d=t.getBlockElements(),h=_=>{const z=_.name,I=_;if(z==="br"){s+=` +`;return}if(z!=="wbr"){if(a[z]&&(s+=" "),c[z]){s+=" ";return}if(_.type===3&&(s+=_.value),!(_.name in t.getVoidElements())){let H=_.firstChild;if(H)do h(H);while(H=H.next)}d[z]&&I.next&&(s+=` `,z==="p"&&(s+=` -`))}};return e=NF(e,[//g]),h(o.parse(e)),s},DF=e=>(e=NF(e,[/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/ig,/|/g,[/( ?)\u00a0<\/span>( ?)/g,(o,s,a)=>!s&&!a?" ":da],/
    /g,/
    $/i]),e),fW=e=>{let t=0;return()=>e+t++},mW=e=>{const t=e.toLowerCase(),o={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"};return zt.hasOwn(o,t)?"image/"+o[t]:"image/"+t},pW=(e,t)=>{const o=a1({sanitize:V4(e),sandbox_iframes:g2(e),sandbox_iframes_exclusions:Z_(e),convert_unsafe_embeds:q4(e)},e.schema);o.addNodeFilter("meta",a=>{zt.each(a,c=>{c.remove()})});const s=o.parse(t,{forced_root_block:!1,isRootContent:!0});return Lp({validate:!0},e.schema).serialize(s)},RF=(e,t)=>({content:e,cancelled:t}),gW=(e,t,o)=>{const s=e.dom.create("div",{style:"display:none"},t),a=gx(e,s,o);return RF(a.node.innerHTML,a.isDefaultPrevented())},hW=(e,t,o)=>{const s=Wv(e,t,o),a=pW(e,s.content);return e.hasEventListeners("PastePostProcess")&&!s.isDefaultPrevented()?gW(e,a,o):RF(a,s.isDefaultPrevented())},bW=(e,t,o)=>hW(e,t,o),NI=(e,t)=>(e.insertContent(t,{merge:aM(e),paste:!0}),!0),DI=e=>/^https?:\/\/[\w\-\/+=.,!;:&%@^~(){}?#]+$/i.test(e),yW=(e,t)=>DI(t)&&Bn(p2(e),o=>Yi(t.toLowerCase(),`.${o.toLowerCase()}`)),vW=(e,t,o)=>(e.undoManager.extra(()=>{o(e,t)},()=>{e.insertContent('')}),!0),_W=(e,t,o)=>(e.undoManager.extra(()=>{o(e,t)},()=>{e.execCommand("mceInsertLink",!1,t)}),!0),xW=(e,t,o)=>!e.selection.isCollapsed()&&DI(t)?_W(e,t,o):!1,wW=(e,t,o)=>yW(e,t)?vW(e,t,o):!1,kW=(e,t)=>{zt.each([xW,wW,NI],o=>!o(e,t,NI))},CW=(e,t,o)=>{o||!Gh(e)?NI(e,t):kW(e,t)},SW=fW("mceclip"),EW=e=>{const t=AI();return EF(t,e),TI(t),t},MF=(e,t,o,s,a)=>{const c=bW(e,t,o);if(!c.cancelled){const d=c.content,h=()=>CW(e,d,s);a?PR(e,"insertFromPaste",{dataTransfer:EW(d)}).isDefaultPrevented()||(h(),KT(e,"insertFromPaste")):h()}},WR=(e,t,o,s)=>{const a=o||AF(t);MF(e,oW(t),a,!1,s)},RI=(e,t,o)=>{const s=e.dom.encode(t).replace(/\r\n/g,` -`),a=rp(s,F4(e)),c=rW(a,ji(e),hv(e));MF(e,c,!1,!0,o)},BF=e=>{const t={};if(e&&e.types)for(let o=0;ot in e&&e[t].length>0,LF=e=>k1(e,"text/html")||k1(e,"text/plain"),TW=(e,t)=>{const o=t.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return Fe(o)?e.dom.encode(o[1]):void 0},AW=(e,t,o,s)=>{const a=SW(),c=Op(e)&&Fe(o.name),d=c?TW(e,o.name):a,h=c?o.name:void 0,_=t.create(a,o,s,d,h);return t.add(_),_},OW=(e,t)=>{Tw(t.uri).each(({data:o,type:s,base64Encoded:a})=>{const c=a?o:btoa(o),d=t.file,h=e.editorUpload.blobCache,_=h.getByData(c,s),z=_??AW(e,h,d,c);WR(e,``,!1,!0)})},zW=e=>e.type==="paste",NW=e=>Promise.all(dn(e,t=>gz(t).then(o=>({file:t,uri:o})))),DW=e=>{const t=p2(e);return o=>vs(o.type,"image/")&&Bn(t,s=>mW(s)===o.type)},RW=(e,t)=>{const o=t.items?Ln(an(t.items),a=>a.kind==="file"?[a.getAsFile()]:[]):[],s=t.files?an(t.files):[];return rt(o.length>0?o:s,DW(e))},PF=(e,t,o)=>{const s=zW(t)?t.clipboardData:t.dataTransfer;if(xm(e)&&s){const a=RW(e,s);if(a.length>0)return t.preventDefault(),NW(a).then(c=>{o&&e.selection.setRng(o),Le(c,d=>{OW(e,d)})}),!0}return!1},MW=e=>{var t,o;return Jo.os.isAndroid()&&((o=(t=e.clipboardData)===null||t===void 0?void 0:t.items)===null||o===void 0?void 0:o.length)===0},BW=e=>Zt.metaKeyPressed(e)&&e.keyCode===86||e.shiftKey&&e.keyCode===45,MI=(e,t,o,s,a)=>{let c=DF(o);const d=k1(t,ZR())||AF(o),h=!d&&nW(c),_=DI(c);(zF(c)||!c.length||h&&!_)&&(s=!0),(s||_)&&(k1(t,"text/plain")&&h?c=t["text/plain"]:c=uW(c)),!zF(c)&&(s?RI(e,c,a):WR(e,c,d,a))},LW=(e,t,o)=>{let s;const a=()=>t.getLastRng()||e.selection.getRng();e.on("keydown",c=>{BW(c)&&!c.isDefaultPrevented()&&(s=c.shiftKey&&c.keyCode===86)}),e.on("paste",c=>{if(c.isDefaultPrevented()||MW(c))return;const d=o.get()==="text"||s;s=!1;const h=BF(c.clipboardData);!LF(h)&&PF(e,c,a())||(k1(h,"text/html")?(c.preventDefault(),MI(e,h,h["text/html"],d,!0)):k1(h,"text/plain")&&k1(h,"text/uri-list")?(c.preventDefault(),MI(e,h,h["text/plain"],d,!0)):(t.create(),Vc.setEditorTimeout(e,()=>{const _=t.getHtml();t.remove(),MI(e,h,_,d,!1)},0)))})},PW=e=>{const t=a=>vs(a,"webkit-fake-url"),o=a=>vs(a,"data:"),s=a=>{var c;return((c=a.data)===null||c===void 0?void 0:c.paste)===!0};e.parser.addNodeFilter("img",(a,c,d)=>{if(!xm(e)&&s(d))for(const h of a){const _=h.attr("src");ft(_)&&!h.attr("data-mce-object")&&_!==Jo.transparentSrc&&(t(_)||!iM(e)&&o(_))&&h.remove()}})},IW=(e,t,o)=>{LW(e,t,o),PW(e)},FW=(e,t)=>{t.get()==="text"?(t.set("html"),hx(e,!1)):(t.set("text"),hx(e,!0)),e.focus()},$W=(e,t)=>{e.addCommand("mceTogglePlainTextPaste",()=>{FW(e,t)}),e.addCommand("mceInsertClipboardContent",(o,s)=>{s.html&&WR(e,s.html,s.internal,!1),s.text&&RI(e,s.text,!1)})},HW=(e,t,o)=>{if(e)try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",o),e.setData(ZR(),t),!0}catch{return!1}else return!1},IF=(e,t,o,s)=>{HW(e.clipboardData,t.html,t.text)?(e.preventDefault(),s()):o(t.html,s)},FF=e=>(t,o)=>{const{dom:s,selection:a}=e,c=s.create("div",{contenteditable:"false","data-mce-bogus":"all"}),d=s.create("div",{contenteditable:"true"},t);s.setStyles(c,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),c.appendChild(d),s.add(e.getBody(),c);const h=a.getRng();d.focus();const _=s.createRng();_.selectNodeContents(d),a.setRng(_),Vc.setEditorTimeout(e,()=>{a.setRng(h),s.remove(c),o()},0)},$F=e=>({html:tW(e.selection.getContent({contextual:!0})),text:e.selection.getContent({format:"text"})}),VW=e=>!!e.dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody()),HF=e=>!e.selection.isCollapsed()||VW(e),jW=e=>t=>{!t.isDefaultPrevented()&&HF(e)&&e.selection.isEditable()&&IF(t,$F(e),FF(e),()=>{if(Jo.browser.isChromium()||Jo.browser.isFirefox()){const o=e.selection.getRng();Vc.setEditorTimeout(e,()=>{e.selection.setRng(o),e.execCommand("Delete")},0)}else e.execCommand("Delete")})},UW=e=>t=>{!t.isDefaultPrevented()&&HF(e)&&IF(t,$F(e),FF(e),dt)},ZW=e=>{e.on("cut",jW(e)),e.on("copy",UW(e))},VF=(e,t)=>{var o,s;return Rg.getCaretRangeFromPoint((o=t.clientX)!==null&&o!==void 0?o:0,(s=t.clientY)!==null&&s!==void 0?s:0,e.getDoc())},WW=e=>{const t=e["text/plain"];return t?t.indexOf("file://")===0:!1},jF=(e,t)=>{e.focus(),t&&e.selection.setRng(t)},qW=e=>Bn(e.files,t=>/^image\//.test(t.type)),KW=(e,t,o,s)=>{const a=e.getParent(o,d=>zc(t,d));if(!ot(e.getParent(o,"summary")))return!0;if(a&&Ro(s,"text/html")){const d=new DOMParser().parseFromString(s["text/html"],"text/html").body;return!ot(d.querySelector(a.nodeName.toLowerCase()))}else return!1},GW=e=>{e.on("input",t=>{const o=s=>ot(s.querySelector("summary"));if(t.inputType==="deleteByDrag"){const s=rt(e.dom.select("details"),o);Le(s,a=>{$s(a.firstChild)&&a.firstChild.remove();const c=e.dom.create("summary");c.appendChild(Au().dom),a.prepend(c)})}})},YW=(e,t)=>{xf(e)&&e.on("dragend dragover draggesture dragdrop drop drag",o=>{o.preventDefault(),o.stopPropagation()}),xm(e)||e.on("drop",o=>{const s=o.dataTransfer;s&&qW(s)&&o.preventDefault()}),e.on("drop",o=>{if(o.isDefaultPrevented())return;const s=VF(e,o);if(uo(s))return;const a=BF(o.dataTransfer),c=k1(a,ZR());if((!LF(a)||WW(a))&&PF(e,o,s))return;const d=a[ZR()],h=d||a["text/html"]||a["text/plain"],_=KW(e.dom,e.schema,s.startContainer,a),z=t.get();z&&!_||h&&(o.preventDefault(),Vc.setEditorTimeout(e,()=>{e.undoManager.transact(()=>{(d||z&&_)&&e.execCommand("Delete"),jF(e,s);const I=DF(h);a["text/html"]?WR(e,I,c,!0):RI(e,I,!0)})}))}),e.on("dragstart",o=>{t.set(!0)}),e.on("dragover dragend",o=>{xm(e)&&!t.get()&&(o.preventDefault(),jF(e,VF(e,o))),o.type==="dragend"&&t.set(!1)}),GW(e)},XW=e=>{const t=a=>c=>{a(e,c)},o=rM(e);Gt(o)&&e.on("PastePreProcess",t(o));const s=_v(e);Gt(s)&&e.on("PastePostProcess",t(s))},JW=(e,t)=>{e.on("PastePreProcess",o=>{o.content=t(e,o.content,o.internal)})},QW=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,UF=e=>zt.trim(e).replace(QW,xh).toLowerCase(),eq=(e,t,o)=>{const s=I4(e);if(o||s==="all"||!d2(e))return t;const a=s?s.split(/[, ]/):[];if(a&&s!=="none"){const c=e.dom,d=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,(h,_,z,I)=>{const $=c.parseStyle(c.decode(z)),V={};for(let le=0;le]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,(c,d,h,_)=>d+' style="'+h+'"'+_),t},tq=e=>{(Jo.browser.isChromium()||Jo.browser.isSafari())&&JW(e,eq)},oq=e=>{const t=Er(!1),o=Er(Yh(e)?"text":"html"),s=dW(e);tq(e),$W(e,o),XW(e),e.addQueryStateHandler("mceTogglePlainTextPaste",()=>o.get()==="text"),e.on("PreInit",()=>{ZW(e),YW(e,t),IW(e,s,o)})},nq=e=>{e.on("click",t=>{e.dom.getParent(t.target,"details")&&t.preventDefault()})},sq=e=>{e.parser.addNodeFilter("details",t=>{const o=U_(e);Le(t,s=>{o==="expanded"?s.attr("open","open"):o==="collapsed"&&s.attr("open",null)})}),e.serializer.addNodeFilter("details",t=>{const o=W4(e);Le(t,s=>{o==="expanded"?s.attr("open","open"):o==="collapsed"&&s.attr("open",null)})})},rq=e=>{nq(e),sq(e)},aq=$s,ZF=wt,iq=e=>Ho(e.dom),lq=e=>Ml(e.dom),WF=e=>t=>kn(ye.fromDom(e),t),cq=(e,t,o)=>_r(ye.fromDom(e),s=>lq(s)||o.isBlock(En(s)),WF(t)).getOr(ye.fromDom(t)).dom,qF=(e,t)=>_r(ye.fromDom(e),iq,WF(t)),KF=(e,t,o)=>{const s=new Ma(e,t),a=o?s.next.bind(s):s.prev.bind(s);let c=e;for(let d=o?e:a();d&&!aq(d);d=a())rd(d)&&(c=d);return c},dq=(e,t,o)=>{const a=Ue.fromRangeStart(e).getNode(),c=cq(a,t,o),d=KF(a,c,!1),h=KF(a,c,!0),_=document.createRange();return qF(d,c).fold(()=>{ZF(d)?_.setStart(d,0):_.setStartBefore(d)},z=>_.setStartBefore(z.dom)),qF(h,c).fold(()=>{ZF(h)?_.setEnd(h,h.data.length):_.setEndAfter(h)},z=>_.setEndAfter(z.dom)),_},uq=e=>{const t=dq(e.selection.getRng(),e.getBody(),e.schema);e.selection.setRng(rw(t))},fq=e=>{e.on("mousedown",t=>{t.detail>=3&&(t.preventDefault(),uq(e))})};var mk;(function(e){e.Before="before",e.After="after"})(mk||(mk={}));const mq=(e,t)=>Math.abs(e.left-t),pq=(e,t)=>Math.abs(e.right-t),gq=(e,t)=>e>=t.top&&e<=t.bottom,hq=(e,t)=>e.topt.top,bq=(e,t)=>{const o=rv(e,t)/Math.min(e.height,t.height);return hq(e,t)&&o>.5},yq=(e,t)=>{const o=rt(e,s=>gq(t,s));return bg(o).fold(()=>[[],e],s=>{const{pass:a,fail:c}=yt(e,d=>bq(d,s));return[a,c]})},vq=(e,t)=>({node:e.node,position:mq(e,t)t>e.left&&t{const a=$=>rd($.node)?j.some($):no($.node)?BI(an($.node.childNodes),t,o,!1):j.none(),c=($,V,ee)=>a(V).filter(le=>Math.abs(ee($,t,o)-ee(le,t,o))<2&&wt(le.node)),d=($,V)=>{const ee=yn($,(le,oe)=>V(le,t,o)-V(oe,t,o));return Kr(ee,a).map(le=>s&&!wt(le.node)&&ee.length>1?c(le,ee[1],V).getOr(le):le)},[h,_]=yq(nR(e),o),{pass:z,fail:I}=yt(_,$=>$.topd(I,yy)).orThunk(()=>d(z,yy))},xq=(e,t,o,s)=>{const a=(c,d)=>{const h=z=>no(z)&&z.classList.contains("mce-drag-container"),_=rt(c.dom.childNodes,pt(h));return d.fold(()=>BI(_,o,s,!0),z=>{const I=rt(_,$=>$!==z.dom);return BI(I,o,s,!0)}).orThunk(()=>(kn(c,e)?j.none():Od(c)).bind(I=>a(I,j.some(c))))};return a(t,j.none())},wq=(e,t,o)=>{const s=ye.fromDom(e),a=fl(s),d=ye.fromPoint(a,t,o).filter(h=>_a(s,h)).getOr(s);return xq(s,d,t,o)},GF=(e,t,o)=>wq(e,t,o).filter(s=>Cv(s.node)).map(s=>vq(s,t)),YF=e=>{var t,o;const s=e.getBoundingClientRect(),a=e.ownerDocument,c=a.documentElement,d=a.defaultView;return{top:s.top+((t=d==null?void 0:d.scrollY)!==null&&t!==void 0?t:0)-c.clientTop,left:s.left+((o=d==null?void 0:d.scrollX)!==null&&o!==void 0?o:0)-c.clientLeft}},kq=e=>e.inline?YF(e.getBody()):{left:0,top:0},Cq=e=>{const t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}},Sq=e=>{const t=e.getBody(),o=e.getDoc().documentElement,s={left:t.scrollLeft,top:t.scrollTop},a={left:t.scrollLeft||o.scrollLeft,top:t.scrollTop||o.scrollTop};return e.inline?s:a},Eq=(e,t)=>{if(t.target.ownerDocument!==e.getDoc()){const o=YF(e.getContentAreaContainer()),s=Sq(e);return{left:t.pageX-o.left+s.left,top:t.pageY-o.top+s.top}}return{left:t.pageX,top:t.pageY}},Tq=(e,t,o)=>({pageX:o.left-e.left+t.left,pageY:o.top-e.top+t.top}),Aq=(e,t)=>Tq(kq(e),Cq(e),Eq(e,t)),XF=e=>({target:e,srcElement:e}),Oq=(e,t,o,s)=>({...t,dataTransfer:s,type:e,...XF(o)}),zq=(e,t,o)=>{const s=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:e,composedPath:s,initEvent:s,preventDefault:dt,stopImmediatePropagation:dt,stopPropagation:dt,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,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:s,initMouseEvent:s,getModifierState:s,dataTransfer:o,...XF(t)}},Nq=(e,t)=>{const o=QZ(e);return t==="dragstart"?(xF(o),kF(o)):t==="drop"?(UZ(o),TI(o)):(ZZ(o),GZ(o)),o},Dq=(e,t,o,s)=>{const a=Nq(o,e);return ln(s)?zq(e,t,a):Oq(e,s,t,a)},qR=32,Rq=100,KR=8,GR=16,JF=Ho,Mq=lv(JF,Ml),Bq=(e,t,o)=>JF(o)&&o!==t&&e.isEditable(o.parentElement),Lq=(e,t,o)=>uo(t)||t===o||e.dom.isChildOf(t,o)?!1:e.dom.isEditable(t),Pq=(e,t,o,s)=>{const a=e.dom,c=t.cloneNode(!0);a.setStyles(c,{width:o,height:s}),a.setAttrib(c,"data-mce-selected",null);const d=a.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return a.setStyles(d,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:o,height:s}),a.setStyles(c,{margin:0,boxSizing:"border-box"}),d.appendChild(c),d},Iq=(e,t)=>{e.parentNode!==t&&t.appendChild(e)},YR=(e,t)=>o=>()=>{const s=e==="left"?o.scrollX:o.scrollY;o.scroll({[e]:s+t,behavior:"smooth"})},QF=YR("left",-qR),e$=YR("left",qR),t$=YR("top",-qR),o$=YR("top",qR),Fq=(e,t,o,s,a,c,d,h,_,z,I,$)=>{let V=0,ee=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+o>a&&(V=t.pageX+o-a),t.pageY+s>c&&(ee=t.pageY+s-c),e.style.width=o-V+"px",e.style.height=s-ee+"px";const le=_.clientHeight,oe=_.clientWidth,fe=d+_.getBoundingClientRect().top,ke=h+_.getBoundingClientRect().left;I.on(Oe=>{Oe.intervalId.clear(),Oe.dragging&&$&&(d+KR>=le?Oe.intervalId.set(o$(z)):d-KR<=0?Oe.intervalId.set(t$(z)):h+KR>=oe?Oe.intervalId.set(e$(z)):h-KR<=0?Oe.intervalId.set(QF(z)):fe+GR>=window.innerHeight?Oe.intervalId.set(o$(window)):fe-GR<=0?Oe.intervalId.set(t$(window)):ke+GR>=window.innerWidth?Oe.intervalId.set(e$(window)):ke-GR<=0&&Oe.intervalId.set(QF(window)))})},n$=e=>{e&&e.parentNode&&e.parentNode.removeChild(e)},$q=(e,t)=>{const o=e.getParent(t.parentNode,e.isBlock);n$(t),o&&o!==e.getRoot()&&e.isEmpty(o)&&Lc(ye.fromDom(o))},Hq=e=>e.button===0,Vq=(e,t)=>({pageX:t.pageX-e.relX,pageY:t.pageY+5}),jq=(e,t)=>o=>{if(Hq(o)){const s=On(t.dom.getParents(o.target),Mq).getOr(null);if(Fe(s)&&Bq(t.dom,t.getBody(),s)){const a=t.dom.getPos(s),c=t.getBody(),d=t.getDoc().documentElement;e.set({element:s,dataTransfer:AI(),dragging:!1,screenX:o.screenX,screenY:o.screenY,maxX:(t.inline?c.scrollWidth:d.offsetWidth)-2,maxY:(t.inline?c.scrollHeight:d.offsetHeight)-2,relX:o.pageX-a.x,relY:o.pageY-a.y,width:s.offsetWidth,height:s.offsetHeight,ghost:Pq(t,s,s.offsetWidth,s.offsetHeight),intervalId:Ll(Rq)})}}},Uq=(e,t,o)=>{e._selectionOverrides.hideFakeCaret(),GF(e.getBody(),t,o).fold(()=>e.selection.placeCaretAt(t,o),s=>{const a=e._selectionOverrides.showCaret(1,s.node,s.position===mk.Before,!1);a?e.selection.setRng(a):e.selection.placeCaretAt(t,o)})},JT=(e,t,o,s,a)=>{t==="dragstart"&&EF(s,e.dom.getOuterHTML(o));const c=Dq(t,o,s,a);return e.dispatch(t,c)},Zq=(e,t)=>{const o=_p((a,c)=>Uq(t,a,c),0);t.on("remove",o.cancel);const s=e;return a=>e.on(c=>{const d=Math.max(Math.abs(a.screenX-c.screenX),Math.abs(a.screenY-c.screenY));if(!c.dragging&&d>10){const h=JT(t,"dragstart",c.element,c.dataTransfer,a);if(Fe(h.dataTransfer)&&(c.dataTransfer=h.dataTransfer),h.isDefaultPrevented())return;c.dragging=!0,t.focus()}if(c.dragging){const h=a.currentTarget===t.getDoc().documentElement,_=Vq(c,Aq(t,a));Iq(c.ghost,t.getBody()),Fq(c.ghost,_,c.width,c.height,c.maxX,c.maxY,a.clientY,a.clientX,t.getContentAreaContainer(),t.getWin(),s,h),o.throttle(a.clientX,a.clientY)}})},Wq=e=>{const t=e.getSel();if(Fe(t)){const s=t.getRangeAt(0).startContainer;return wt(s)?s.parentNode:s}else return null},qq=(e,t)=>o=>{e.on(s=>{var a;if(s.intervalId.clear(),s.dragging){if(Lq(t,Wq(t.selection),s.element)){const c=(a=t.getDoc().elementFromPoint(o.clientX,o.clientY))!==null&&a!==void 0?a:t.getBody();JT(t,"drop",c,s.dataTransfer,o).isDefaultPrevented()||t.undoManager.transact(()=>{$q(t.dom,s.element),eW(s.dataTransfer).each(h=>t.insertContent(h)),t._selectionOverrides.hideFakeCaret()})}JT(t,"dragend",t.getBody(),s.dataTransfer,o)}}),r$(e)},s$=(e,t,o)=>{e.on(s=>{s.intervalId.clear(),s.dragging&&o.fold(()=>JT(t,"dragend",s.element,s.dataTransfer),a=>JT(t,"dragend",s.element,s.dataTransfer,a))}),r$(e)},Kq=(e,t)=>o=>s$(e,t,j.some(o)),r$=e=>{e.on(t=>{t.intervalId.clear(),n$(t.ghost)}),e.clear()},Gq=e=>{const t=Jr(),o=Ts.DOM,s=document,a=jq(t,e),c=Zq(t,e),d=qq(t,e),h=Kq(t,e);e.on("mousedown",a),e.on("mousemove",c),e.on("mouseup",d),o.bind(s,"mousemove",c),o.bind(s,"mouseup",h),e.on("remove",()=>{o.unbind(s,"mousemove",c),o.unbind(s,"mouseup",h)}),e.on("keydown",_=>{_.keyCode===Zt.ESC&&s$(t,e,j.none())})},Yq=e=>{const t=a=>{if(!a.isDefaultPrevented()){const c=a.dataTransfer;c&&(mn(c.types,"Files")||c.files.length>0)&&(a.preventDefault(),a.type==="drop"&&qw(e,"Dropped file type is not supported"))}},o=a=>{Ax(e,a.target)&&t(a)},s=()=>{const a=Ts.DOM,c=e.dom,d=document,h=e.inline?e.getBody():e.getDoc(),_=["drop","dragover"];Le(_,z=>{a.bind(d,z,o),c.bind(h,z,t)}),e.on("remove",()=>{Le(_,z=>{a.unbind(d,z,o),c.unbind(h,z,t)})})};e.on("init",()=>{Vc.setEditorTimeout(e,s,0)})},Xq=e=>{Gq(e),V_(e)&&Yq(e)},Jq=e=>{const t=_p(()=>{if(!e.removed&&e.getBody().contains(document.activeElement)){const o=e.selection.getRng();if(o.collapsed){const s=Xw(e,o,!1);e.selection.setRng(s)}}},0);e.on("focus",()=>{t.throttle()}),e.on("blur",()=>{t.cancel()})},Qq=e=>{e.on("init",()=>{e.on("focusin",t=>{const o=t.target;if(Xe(o)){const s=Yd(e.getBody(),o),a=Ho(s)?s:o;e.selection.getNode()!==a&&Z0(e,a).each(c=>e.selection.setRng(c))}})})},QT=Ho,a$=(e,t)=>Yd(e.getBody(),t),eK=e=>{const t=e.selection,o=e.dom,s=e.getBody(),a=eA(e,s,o.isBlock,()=>jy(e)),c="sel-"+o.uniqueId(),d="data-mce-selected";let h;const _=Yt=>Fe(Yt)&&o.hasClass(Yt,"mce-offscreen-selection"),z=Yt=>Yt!==s&&(QT(Yt)||Xe(Yt))&&o.isChildOf(Yt,s)&&o.isEditable(Yt.parentNode),I=Yt=>{Yt&&t.setRng(Yt)},$=(Yt,Qe,Ve,mt=!0)=>e.dispatch("ShowCaret",{target:Qe,direction:Yt,before:Ve}).isDefaultPrevented()?null:(mt&&t.scrollIntoView(Qe,Yt===-1),a.show(Ve,Qe)),V=Yt=>{Yt.hasAttribute("data-mce-caret")&&(Cp(Yt),t.scrollIntoView(Yt))},ee=()=>{e.on("click",Qe=>{o.isEditable(Qe.target)||(Qe.preventDefault(),e.focus())}),e.on("blur NewBlock",Pe),e.on("ResizeWindow FullscreenStateChanged",a.reposition),e.on("tap",Qe=>{const Ve=Qe.target,mt=a$(e,Ve);QT(mt)?(Qe.preventDefault(),Z0(e,mt).each(Te)):z(Ve)&&Z0(e,Ve).each(Te)},!0),e.on("mousedown",Qe=>{const Ve=Qe.target;if(Ve!==s&&Ve.nodeName!=="HTML"&&!o.isChildOf(Ve,s)||!HP(e,Qe.clientX,Qe.clientY))return;Pe(),Mt();const mt=a$(e,Ve);QT(mt)?(Qe.preventDefault(),Z0(e,mt).each(Te)):GF(s,Qe.clientX,Qe.clientY).each(to=>{Qe.preventDefault();const bo=$(1,to.node,to.position===mk.Before,!1);I(bo),ec(mt)?mt.focus():e.getBody().focus()})}),e.on("keypress",Qe=>{Zt.modifierPressed(Qe)||QT(t.getNode())&&Qe.preventDefault()}),e.on("GetSelectionRange",Qe=>{let Ve=Qe.range;if(h){if(!h.parentNode){h=null;return}Ve=Ve.cloneRange(),Ve.selectNode(h),Qe.range=Ve}}),e.on("SetSelectionRange",Qe=>{Qe.range=fe(Qe.range);const Ve=Te(Qe.range,Qe.forward);Ve&&(Qe.range=Ve)});const Yt=Qe=>no(Qe)&&Qe.id==="mcepastebin";e.on("AfterSetSelectionRange",Qe=>{const Ve=Qe.range,mt=Ve.startContainer.parentElement;!oe(Ve)&&!Yt(mt)&&Mt(),_(mt)||Pe()}),Xq(e),Jq(e),Qq(e)},le=Yt=>Pl(Yt)||Ph(Yt)||zu(Yt),oe=Yt=>le(Yt.startContainer)||le(Yt.endContainer),fe=Yt=>{const Qe=e.schema.getVoidElements(),Ve=o.createRng(),mt=Yt.startContainer,to=Yt.startOffset,bo=Yt.endContainer,gn=Yt.endOffset;return Ro(Qe,mt.nodeName.toLowerCase())?to===0?Ve.setStartBefore(mt):Ve.setStartAfter(mt):Ve.setStart(mt,to),Ro(Qe,bo.nodeName.toLowerCase())?gn===0?Ve.setEndBefore(bo):Ve.setEndAfter(bo):Ve.setEnd(bo,gn),Ve},ke=(Yt,Qe)=>{const Ve=ye.fromDom(e.getBody()),mt=e.getDoc(),to=nt(Ve,"#"+c).getOrThunk(()=>{const Cn=ye.fromHtml('
    ',mt);return Rr(Cn,"id",c),fr(Ve,Cn),Cn}),bo=o.createRng();xs(to),xr(to,[ye.fromText(da,mt),ye.fromDom(Qe),ye.fromText(da,mt)]),bo.setStart(to.dom.firstChild,1),bo.setEnd(to.dom.lastChild,0),vn(to,{top:o.getPos(Yt,e.getBody()).y+"px"}),nC(to);const gn=t.getSel();return gn&&(gn.removeAllRanges(),gn.addRange(bo)),bo},Oe=Yt=>{const Qe=Yt.cloneNode(!0),Ve=e.dispatch("ObjectSelected",{target:Yt,targetClone:Qe});if(Ve.isDefaultPrevented())return null;const mt=ke(Yt,Ve.targetClone),to=ye.fromDom(Yt);return Le(Mr(ye.fromDom(e.getBody()),`*[${d}]`),bo=>{kn(to,bo)||rn(bo,d)}),o.getAttrib(Yt,d)||Yt.setAttribute(d,"1"),h=Yt,Mt(),mt},Te=(Yt,Qe)=>{if(!Yt)return null;if(Yt.collapsed){if(!oe(Yt)){const bo=Qe?1:-1,gn=Av(bo,s,Yt),Cn=gn.getNode(!Qe);if(Fe(Cn)){if(Cv(Cn))return $(bo,Cn,Qe?!gn.isAtEnd():!1,!1);if(gm(Cn)&&Ho(Cn.nextSibling)){const hs=o.createRng();return hs.setStart(Cn,0),hs.setEnd(Cn,0),hs}}const ds=gn.getNode(Qe);if(Fe(ds)){if(Cv(ds))return $(bo,ds,Qe?!1:!gn.isAtEnd(),!1);if(gm(ds)&&Ho(ds.previousSibling)){const hs=o.createRng();return hs.setStart(ds,1),hs.setEnd(ds,1),hs}}}return null}let Ve=Yt.startContainer,mt=Yt.startOffset;const to=Yt.endOffset;if(wt(Ve)&&mt===0&&QT(Ve.parentNode)&&(Ve=Ve.parentNode,mt=o.nodeIndex(Ve),Ve=Ve.parentNode),!no(Ve))return null;if(to===mt+1&&Ve===Yt.endContainer){const bo=Ve.childNodes[mt];if(z(bo))return Oe(bo)}return null},Pe=()=>{h&&h.removeAttribute(d),nt(ye.fromDom(e.getBody()),"#"+c).each(Jn),h=null},ht=()=>{a.destroy(),h=null},Mt=()=>{a.hide()};return Im(e)||ee(),{showCaret:$,showBlockCaretContainer:V,hideFakeCaret:Mt,destroy:ht}},tK=(e,t)=>{let o=t;for(let s=e.previousSibling;wt(s);s=s.previousSibling)o+=s.data.length;return o},i$=(e,t,o,s,a)=>{if(wt(o)&&(s<0||s>o.data.length))return[];const c=a&&wt(o)?[tK(o,s)]:[s];let d=o;for(;d!==t&&d.parentNode;)c.push(e.nodeIndex(d,a)),d=d.parentNode;return d===t?c.reverse():[]},LI=(e,t,o,s,a,c,d=!1)=>{const h=i$(e,t,o,s,d),_=i$(e,t,a,c,d);return{start:h,end:_}},l$=(e,t)=>{const o=t.slice(),s=o.pop();return D(s)?ko(o,(c,d)=>c.bind(h=>j.from(h.childNodes[d])),j.some(e)).bind(c=>wt(c)&&(s<0||s>c.data.length)?j.none():j.some({node:c,offset:s})):j.none()},c$=(e,t)=>l$(e,t.start).bind(({node:o,offset:s})=>l$(e,t.end).map(({node:a,offset:c})=>{const d=document.createRange();return d.setStart(o,s),d.setEnd(a,c),d})),oK=(e,t,o,s=!1)=>LI(e,t,o.startContainer,o.startOffset,o.endContainer,o.endOffset,s),pk=(e,t,o)=>{if(t&&e.isEmpty(t)&&!o(t)){const s=t.parentNode;e.remove(t,wt(t.firstChild)&&Fi(t.firstChild.data)),pk(e,s,o)}},XR=(e,t,o,s=!0)=>{const a=t.startContainer.parentNode,c=t.endContainer.parentNode;t.deleteContents(),s&&!o(t.startContainer)&&(wt(t.startContainer)&&t.startContainer.data.length===0&&e.remove(t.startContainer),wt(t.endContainer)&&t.endContainer.data.length===0&&e.remove(t.endContainer),pk(e,a,o),a!==c&&pk(e,c,o))},JR=(e,t)=>j.from(e.dom.getParent(t.startContainer,e.dom.isBlock)),PI=(e,t,o)=>{const s=e.dynamicPatternsLookup({text:o,block:t});return{...e,blockPatterns:pi(s).concat(e.blockPatterns),inlinePatterns:Hd(s).concat(e.inlinePatterns)}},II=(e,t,o,s)=>{const a=e.createRng();return a.setStart(t,0),a.setEnd(o,s),a.toString()},d$=(e,t)=>e.create("span",{"data-mce-type":"bookmark",id:t}),QR=(e,t)=>{const o=e.createRng();return o.setStartAfter(t.start),o.setEndBefore(t.end),o},u$=(e,t,o)=>{const s=c$(e.getRoot(),o).getOrDie("Unable to resolve path range"),a=s.startContainer,c=s.endContainer,d=s.endOffset===0?c:c.splitText(s.endOffset),h=s.startOffset===0?a:a.splitText(s.startOffset),_=h.parentNode,z=d.parentNode;return{prefix:t,end:z.insertBefore(d$(e,t+"-end"),d),start:_.insertBefore(d$(e,t+"-start"),h)}},f$=(e,t,o)=>{pk(e,e.get(t.prefix+"-end"),o),pk(e,e.get(t.prefix+"-start"),o)},FI=e=>e.start.length===0,nK=e=>(t,o)=>{const a=t.data.substring(0,o),c=a.lastIndexOf(e.charAt(e.length-1)),d=a.lastIndexOf(e);return d!==-1?d+e.length:c!==-1?c+1:-1},m$=(e,t,o,s)=>{const a=t.start;return iI(e,s.container,s.offset,nK(a),o).bind(d=>{var h,_;const z=(_=(h=o.textContent)===null||h===void 0?void 0:h.indexOf(a))!==null&&_!==void 0?_:-1;if(z!==-1&&d.offset>=z+a.length){const $=e.createRng();return $.setStart(d.container,d.offset-a.length),$.setEnd(d.container,d.offset),j.some($)}else{const $=d.offset-a.length;return aI(d.container,$,o).map(V=>{const ee=e.createRng();return ee.setStart(V.container,V.offset),ee.setEnd(d.container,d.offset),ee}).filter(V=>V.toString()===a).orThunk(()=>m$(e,t,o,Yp(d.container,0)))}})},sK=(e,t,o,s,a,c=!1)=>{if(t.start.length===0&&!c){const d=e.createRng();return d.setStart(o,s),d.setEnd(o,s),j.some(d)}return rI(o,s,a).bind(d=>m$(e,t,a,d).bind(_=>{var z;if(c){if(_.endContainer===d.container&&_.endOffset===d.offset)return j.none();if(d.offset===0&&((z=_.endContainer.textContent)===null||z===void 0?void 0:z.length)===_.endOffset)return j.none()}return j.some(_)}))},rK=(e,t,o,s)=>{const a=e.dom,c=a.getRoot(),d=o.pattern,h=o.position.container,_=o.position.offset;return aI(h,_-o.pattern.end.length,t).bind(z=>{const I=LI(a,c,z.container,z.offset,h,_,s);if(FI(d))return j.some({matches:[{pattern:d,startRng:I,endRng:I}],position:z});{const $=e5(e,o.remainingPatterns,z.container,z.offset,t,s),V=$.getOr({matches:[],position:z}),ee=V.position;return sK(a,d,ee.container,ee.offset,t,$.isNone()).map(oe=>{const fe=oK(a,c,oe,s);return{matches:V.matches.concat([{pattern:d,startRng:fe,endRng:I}]),position:Yp(oe.startContainer,oe.startOffset)}})}})},e5=(e,t,o,s,a,c)=>{const d=e.dom;return rI(o,s,d.getRoot()).bind(h=>{const _=II(d,a,o,s);for(let z=0;z0)return e5(e,t,o,s-1,a,c);if(V.isSome())return V}return j.none()})},p$=(e,t,o)=>{e.selection.setRng(o),t.type==="inline-format"?Le(t.format,s=>{e.formatter.apply(s)}):e.execCommand(t.cmd,!1,t.value)},aK=(e,t,o,s)=>{const a=QR(e.dom,o);XR(e.dom,a,s),p$(e,t,a)},iK=(e,t,o,s,a)=>{const c=e.dom,d=QR(c,s),h=QR(c,o);XR(c,h,a),XR(c,d,a);const _={prefix:o.prefix,start:o.end,end:s.start},z=QR(c,_);p$(e,t,z)},lK=(e,t)=>{const o=Ti("mce_textpattern"),s=ao(t,(a,c)=>{const d=u$(e,o+`_end${a.length}`,c.endRng);return a.concat([{...c,endMarker:d}])},[]);return ao(s,(a,c)=>{const d=s.length-a.length-1,h=FI(c.pattern)?c.endMarker:u$(e,o+`_start${d}`,c.startRng);return a.concat([{...c,startMarker:h}])},[])},cK=e=>yn(e,(t,o)=>o.end.length-t.end.length),dK=(e,t)=>{const o=Hs(e,s=>Bn(t,a=>s.pattern.start===a.pattern.start&&s.pattern.end===a.pattern.end));return e.length===t.length?o?e:t:e.length>t.length?e:t},g$=(e,t,o,s,a,c)=>{const d=e5(e,a.inlinePatterns,o,s,t,c).fold(()=>[],_=>_.matches),h=e5(e,cK(a.inlinePatterns),o,s,t,c).fold(()=>[],_=>_.matches);return dK(d,h)},h$=(e,t)=>{if(t.length===0)return;const o=e.dom,s=e.selection.getBookmark(),a=lK(o,t);Le(a,c=>{const d=o.getParent(c.startMarker.start,o.isBlock),h=_=>_===d;FI(c.pattern)?aK(e,c.pattern,c.endMarker,h):iK(e,c.pattern,c.startMarker,c.endMarker,h),f$(o,c.endMarker,h),f$(o,c.startMarker,h)}),e.selection.moveToBookmark(s)},b$=(e,t,o)=>Q9(t,0,t).map(s=>{const a=s.container;return v8(a,o.start.length,t).each(c=>{const d=e.createRng();d.setStart(a,0),d.setEnd(c.container,c.offset),XR(e,d,h=>h===t)}),a}),y$=e=>(t,o)=>{const s=t.dom,a=o.pattern,c=c$(s.getRoot(),o.range).getOrDie("Unable to resolve path range"),d=(h,_)=>{const z=_.get(h);return ve(z)&&St(z).exists(I=>Ro(I,"block"))};return JR(t,c).each(h=>{a.type==="block-format"?d(a.format,t.formatter)&&t.undoManager.transact(()=>{e(t.dom,h,a),t.formatter.apply(a.format)}):a.type==="block-command"&&t.undoManager.transact(()=>{e(t.dom,h,a),t.execCommand(a.cmd,!1,a.value)})}),!0},uK=e=>yn(e,(t,o)=>o.start.length-t.start.length),v$=e=>(t,o)=>{const s=uK(t),a=o.replace(da," ");return On(s,c=>e(c,o,a))},_$=(e,t)=>(o,s,a,c,d)=>{var h;d===void 0&&(d=(h=s.textContent)!==null&&h!==void 0?h:"");const _=o.dom,z=ji(o);return _.is(s,z)?e(a.blockPatterns,d).map(I=>t&&zt.trim(d).length===I.start.length?[]:[{pattern:I,range:LI(_,_.getRoot(),s,0,s,0,c)}]).getOr([]):[]},fK=e=>/^\s[^\s]/.test(e),mK=y$((e,t,o)=>{b$(e,t,o).each(s=>{const a=ye.fromDom(s),c=mm(a);fK(c)&&zh(a,c.slice(1))})}),pK=v$((e,t,o)=>t.indexOf(e.start)===0||o.indexOf(e.start)===0),gK=_$(pK,!0),hK=(e,t)=>{const o=e.selection.getRng();return JR(e,o).map(s=>{var a;const c=Math.max(0,o.startOffset),d=PI(t,s,(a=s.textContent)!==null&&a!==void 0?a:""),h=g$(e,s,o.startContainer,c,d,!0),_=gK(e,s,d,!0);return{inlineMatches:h,blockMatches:_}}).filter(({inlineMatches:s,blockMatches:a})=>a.length>0||s.length>0)},bK=(e,t)=>{if(t.length===0)return;const o=e.selection.getBookmark();Le(t,s=>mK(e,s)),e.selection.moveToBookmark(o)},yK=y$(b$),vK=v$((e,t,o)=>t===e.start||o===e.start),_K=_$(vK,!1),xK=(e,t)=>{const o=e.selection.getRng();return JR(e,o).map(s=>{const a=Math.max(0,o.startOffset),c=II(e.dom,s,o.startContainer,a),d=PI(t,s,c);return _K(e,s,d,!1,c)}).filter(s=>s.length>0)},wK=(e,t)=>{Le(t,o=>yK(e,o))},kK=(e,t)=>hK(e,t).fold(fn,({inlineMatches:o,blockMatches:s})=>(e.undoManager.add(),e.undoManager.extra(()=>{e.execCommand("mceInsertNewLine")},()=>{qk(e),h$(e,o),bK(e,s);const a=e.selection.getRng(),c=rI(a.startContainer,a.startOffset,e.dom.getRoot());e.execCommand("mceInsertNewLine"),c.each(d=>{const h=d.container;h.data.charAt(d.offset-1)===rr&&(h.deleteData(d.offset-1,1),pk(e.dom,h.parentNode,_=>_===e.dom.getRoot()))})}),!0)),CK=(e,t)=>{const o=e.selection.getRng();JR(e,o).map(s=>{const a=Math.max(0,o.startOffset-1),c=II(e.dom,s,o.startContainer,a),d=PI(t,s,c),h=g$(e,s,o.startContainer,a,d,!1);h.length>0&&e.undoManager.transact(()=>{h$(e,h)})})},SK=(e,t)=>xK(e,t).fold(fn,o=>(e.undoManager.transact(()=>{wK(e,o)}),!0)),x$=(e,t,o)=>{for(let s=0;sx$(e,t,(o,s)=>o===s.keyCode&&!Zt.modifierPressed(s)),TK=(e,t)=>x$(e,t,(o,s)=>o.charCodeAt(0)===s.charCode),AK=e=>{const t=[",",".",";",":","!","?"],o=[32],s=()=>xg(lM(e).filter(d=>d.type==="inline-command"||d.type==="block-command"?e.queryCommandSupported(d.cmd):!0),xv(e)),a=()=>u2(e);e.on("keydown",d=>{if(d.keyCode===13&&!Zt.modifierPressed(d)&&e.selection.isCollapsed()){const h=vf(s(),"enter");(h.inlinePatterns.length>0||h.blockPatterns.length>0||a())&&kK(e,h)&&d.preventDefault()}},!0),e.on("keydown",d=>{if(d.keyCode===32&&e.selection.isCollapsed()){const h=vf(s(),"space");(h.blockPatterns.length>0||a())&&SK(e,h)&&d.preventDefault()}},!0);const c=()=>{if(e.selection.isCollapsed()){const d=vf(s(),"space");(d.inlinePatterns.length>0||a())&&CK(e,d)}};e.on("keyup",d=>{EK(o,d)&&c()}),e.on("keypress",d=>{TK(t,d)&&Vc.setEditorTimeout(e,c)})},OK=e=>{AK(e)},zK=e=>{const t=zt.each,o=Zt.BACKSPACE,s=Zt.DELETE,a=e.dom,c=e.selection,d=e.parser,h=Jo.browser,_=h.isFirefox(),z=h.isChromium()||h.isSafari(),I=Jo.deviceType.isiPhone()||Jo.deviceType.isiPad(),$=Jo.os.isMacOS()||Jo.os.isiOS(),V=(jt,Eo)=>{try{e.getDoc().execCommand(jt,!1,String(Eo))}catch{}},ee=jt=>jt.isDefaultPrevented(),le=()=>{const jt=wn=>{const qt=a.create("body"),hn=wn.cloneContents();return qt.appendChild(hn),c.serializer.serialize(qt,{format:"html"})},Eo=wn=>{const qt=jt(wn),hn=a.createRng();hn.selectNode(e.getBody());const Tn=jt(hn);return qt===Tn};e.on("keydown",wn=>{const qt=wn.keyCode;if(!ee(wn)&&(qt===s||qt===o)&&e.selection.isEditable()){const hn=e.selection.isCollapsed(),Tn=e.getBody();if(hn&&!pl(e.schema,Tn)||!hn&&!Eo(e.selection.getRng()))return;wn.preventDefault(),e.setContent(""),Tn.firstChild&&a.isBlock(Tn.firstChild)?e.selection.setCursorLocation(Tn.firstChild,0):e.selection.setCursorLocation(Tn,0),e.nodeChanged()}})},oe=()=>{e.shortcuts.add("meta+a",null,"SelectAll")},fe=()=>{e.inline||a.bind(e.getDoc(),"mousedown mouseup",jt=>{let Eo;if(jt.target===e.getDoc().documentElement)if(Eo=c.getRng(),e.getBody().focus(),jt.type==="mousedown"){if(Pl(Eo.startContainer))return;c.placeCaretAt(jt.clientX,jt.clientY)}else c.setRng(Eo)})},ke=()=>{e.on("keydown",jt=>{if(!ee(jt)&&jt.keyCode===o){if(!e.getBody().getElementsByTagName("hr").length)return;if(c.isCollapsed()&&c.getRng().startOffset===0){const Eo=c.getNode(),wn=Eo.previousSibling;if(Eo.nodeName==="HR"){a.remove(Eo),jt.preventDefault();return}wn&&wn.nodeName&&wn.nodeName.toLowerCase()==="hr"&&(a.remove(wn),jt.preventDefault())}}})},Oe=()=>{Range.prototype.getClientRects||e.on("mousedown",jt=>{if(!ee(jt)&&jt.target.nodeName==="HTML"){const Eo=e.getBody();Eo.blur(),Vc.setEditorTimeout(e,()=>{Eo.focus()})}})},Te=()=>{const jt=Ny(e);e.on("click",Eo=>{const wn=Eo.target;/^(IMG|HR)$/.test(wn.nodeName)&&a.isEditable(wn)&&(Eo.preventDefault(),e.selection.select(wn),e.nodeChanged()),wn.nodeName==="A"&&a.hasClass(wn,jt)&&wn.childNodes.length===0&&a.isEditable(wn.parentNode)&&(Eo.preventDefault(),c.select(wn))})},Pe=()=>{const jt=()=>{const wn=a.getAttribs(c.getStart().cloneNode(!1));return()=>{const qt=c.getStart();qt!==e.getBody()&&(a.setAttrib(qt,"style",null),t(wn,hn=>{qt.setAttributeNode(hn.cloneNode(!0))}))}},Eo=()=>!c.isCollapsed()&&a.getParent(c.getStart(),a.isBlock)!==a.getParent(c.getEnd(),a.isBlock);e.on("keypress",wn=>{let qt;return!ee(wn)&&(wn.keyCode===8||wn.keyCode===46)&&Eo()?(qt=jt(),e.getDoc().execCommand("delete",!1),qt(),wn.preventDefault(),!1):!0}),a.bind(e.getDoc(),"cut",wn=>{if(!ee(wn)&&Eo()){const qt=jt();Vc.setEditorTimeout(e,()=>{qt()})}})},ht=()=>{e.on("keydown",jt=>{if(!ee(jt)&&jt.keyCode===o&&c.isCollapsed()&&c.getRng().startOffset===0){const Eo=c.getNode().previousSibling;if(Eo&&Eo.nodeName&&Eo.nodeName.toLowerCase()==="table")return jt.preventDefault(),!1}return!0})},Mt=()=>{e.on("keydown",jt=>{if(ee(jt)||jt.keyCode!==Zt.BACKSPACE)return;let Eo=c.getRng();const wn=Eo.startContainer,qt=Eo.startOffset,hn=a.getRoot();let Tn=wn;if(!(!Eo.collapsed||qt!==0)){for(;Tn.parentNode&&Tn.parentNode.firstChild===Tn&&Tn.parentNode!==hn;)Tn=Tn.parentNode;Tn.nodeName==="BLOCKQUOTE"&&(e.formatter.toggle("blockquote",void 0,Tn),Eo=a.createRng(),Eo.setStart(wn,0),Eo.setEnd(wn,0),c.setRng(Eo))}})},Yt=()=>{const jt=()=>{V("StyleWithCSS",!1),V("enableInlineTableEditing",!1),A4(e)||V("enableObjectResizing",!1)};L4(e)||e.on("BeforeExecCommand mousedown",jt)},Qe=()=>{const jt=()=>{t(a.select("a:not([data-mce-block])"),Eo=>{var wn;let qt=Eo.parentNode;const hn=a.getRoot();if((qt==null?void 0:qt.lastChild)===Eo){for(;qt&&!a.isBlock(qt);){if(((wn=qt.parentNode)===null||wn===void 0?void 0:wn.lastChild)!==qt||qt===hn)return;qt=qt.parentNode}a.add(qt,"br",{"data-mce-bogus":1})}})};e.on("SetContent ExecCommand",Eo=>{(Eo.type==="setcontent"||Eo.command==="mceInsertLink")&&jt()})},Ve=()=>{e.on("init",()=>{V("DefaultParagraphSeparator",ji(e))})},mt=jt=>{const Eo=jt.getBody(),wn=jt.selection.getRng();return wn.startContainer===wn.endContainer&&wn.startContainer===Eo&&wn.startOffset===0&&wn.endOffset===Eo.childNodes.length},to=()=>{e.on("keyup focusin mouseup",jt=>{!Zt.modifierPressed(jt)&&!mt(e)&&c.normalize()},!0)},bo=()=>{e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},gn=()=>{e.inline||e.on("keydown",()=>{document.activeElement===document.body&&e.getWin().focus()})},Cn=()=>{e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",jt=>{let Eo;jt.target.nodeName==="HTML"&&(Eo=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(Eo),e.selection.normalize(),e.nodeChanged())}))},ds=()=>{$&&e.on("keydown",jt=>{Zt.metaKeyPressed(jt)&&!jt.shiftKey&&(jt.keyCode===37||jt.keyCode===39)&&(jt.preventDefault(),e.selection.getSel().modify("move",jt.keyCode===37?"backward":"forward","lineboundary"))})},hs=()=>{e.on("click",jt=>{let Eo=jt.target;do if(Eo.tagName==="A"){jt.preventDefault();return}while(Eo=Eo.parentNode)}),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},qr=()=>{e.on("init",()=>{e.dom.bind(e.getBody(),"submit",jt=>{jt.preventDefault()})})},ll=()=>{d.addNodeFilter("br",jt=>{let Eo=jt.length;for(;Eo--;)jt[Eo].attr("class")==="Apple-interchange-newline"&&jt[Eo].remove()})},Os=dt,Ft=()=>{if(!_||e.removed)return!1;const jt=e.selection.getSel();return!jt||!jt.rangeCount||jt.rangeCount===0},go=()=>{z&&(fe(),Te(),qr(),oe(),I&&(gn(),Cn(),hs())),_&&(Oe(),Yt(),bo(),ds())},ts=()=>{Mt(),le(),Jo.windowsPhone||to(),z&&(fe(),Te(),Ve(),qr(),ht(),ll(),I?(gn(),Cn(),hs()):oe()),_&&(ke(),Oe(),Pe(),Yt(),Qe(),bo(),ds(),ht())};return Im(e)?go():ts(),{refreshContentEditable:Os,isHidden:Ft}},NK=e=>e.toLowerCase()==="gpl",DK=e=>e.length>=64&&e.length<=255,RK=e=>NK(e)||DK(e)?"VALID":"INVALID",MK=e=>{const t=K4(e);!ft(G4(e))&&(ln(t)||RK(t)==="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/")},$I=Ts.DOM,BK=(e,t)=>{const o=ye.fromDom(e.getBody()),s=mu(Xl(o)),a=ye.fromTag("style");Rr(a,"type","text/css"),fr(a,ye.fromText(t)),fr(s,a),e.on("remove",()=>{Jn(a)})},LK=e=>e.inline?e.getElement().nodeName.toLowerCase():void 0,HI=e=>Bi(e,t=>ln(t)===!1),w$=e=>{const t=e.options.get,o=e.editorUpload.blobCache;return HI({allow_conditional_comments:t("allow_conditional_comments"),allow_html_data_urls:t("allow_html_data_urls"),allow_svg_data_urls:t("allow_svg_data_urls"),allow_html_in_named_anchor:t("allow_html_in_named_anchor"),allow_script_urls:t("allow_script_urls"),allow_unsafe_link_target:t("allow_unsafe_link_target"),convert_unsafe_embeds:t("convert_unsafe_embeds"),convert_fonts_to_spans:t("convert_fonts_to_spans"),fix_list_elements:t("fix_list_elements"),font_size_legacy_values:t("font_size_legacy_values"),forced_root_block:t("forced_root_block"),forced_root_block_attrs:t("forced_root_block_attrs"),preserve_cdata:t("preserve_cdata"),inline_styles:t("inline_styles"),root_name:LK(e),sandbox_iframes:t("sandbox_iframes"),sandbox_iframes_exclusions:Z_(e),sanitize:t("xss_sanitization"),validate:!0,blob_cache:o,document:e.getDoc()})},k$=e=>{const t=e.options.get;return HI({custom_elements:t("custom_elements"),extended_valid_elements:t("extended_valid_elements"),invalid_elements:t("invalid_elements"),invalid_styles:t("invalid_styles"),schema:t("schema"),valid_children:t("valid_children"),valid_classes:t("valid_classes"),valid_elements:t("valid_elements"),valid_styles:t("valid_styles"),verify_html:t("verify_html"),padd_empty_block_inline_children:t("format_empty_lines")})},PK=e=>{const t=e.options.get;return{...w$(e),...k$(e),...HI({remove_trailing_brs:t("remove_trailing_brs"),pad_empty_with_br:t("pad_empty_with_br"),url_converter:t("url_converter"),url_converter_scope:t("url_converter_scope"),element_format:t("element_format"),entities:t("entities"),entity_encoding:t("entity_encoding"),indent:t("indent"),indent_after:t("indent_after"),indent_before:t("indent_before")})}},IK=e=>{const t=a1(w$(e),e.schema);return t.addAttributeFilter("src,href,style,tabindex",(o,s)=>{const a=e.dom,c="data-mce-"+s;let d=o.length;for(;d--;){const h=o[d];let _=h.attr(s);if(_&&!h.attr(c)){if(_.indexOf("data:")===0||_.indexOf("blob:")===0)continue;s==="style"?(_=a.serializeStyle(a.parseStyle(_),h.name),_.length||(_=null),h.attr(c,_),h.attr(s,_)):s==="tabindex"?(h.attr(c,_),h.attr(s,null)):h.attr(c,e.convertURL(_,s,h.name))}}}),t.addNodeFilter("script",o=>{let s=o.length;for(;s--;){const a=o[s],c=a.attr("type")||"no/type";c.indexOf("mce-")!==0&&a.attr("type","mce-"+c)}}),dM(e)&&t.addNodeFilter("#cdata",o=>{var s;let a=o.length;for(;a--;){const c=o[a];c.type=8,c.name="#comment",c.value="[CDATA["+e.dom.encode((s=c.value)!==null&&s!==void 0?s:"")+"]]"}}),t.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",o=>{let s=o.length;const a=e.schema.getNonEmptyElements();for(;s--;){const c=o[s];c.isEmpty(a)&&c.getAll("br").length===0&&c.append(new gi("br",1))}}),t},FK=e=>{const t=nM(e);t&&Vc.setEditorTimeout(e,()=>{let o;t===!0?o=e:o=e.editorManager.get(t),o&&!o.destroyed&&(o.focus(),o.selection.scrollIntoView())},100)},$K=e=>{const t=e.dom.getRoot();!e.inline&&(!Ly(e)||e.selection.getStart(!0)===t)&&No(t).each(o=>{const s=o.getNode(),a=tc(s)?No(s).getOr(o):o;e.selection.setRng(a.toRange())})},HK=e=>{e.bindPendingEventDelegates(),e.initialized=!0,Pr(e),e.focus(!0),$K(e),e.nodeChanged({initial:!0});const t=tM(e);Gt(t)&&t.call(e,e),FK(e)},VI=e=>e.inline?e.ui.styleSheetLoader:e.dom.styleSheetLoader,VK=(e,t,o)=>{const{pass:s,fail:a}=yt(t,h=>tinymce.Resource.has(QE(h))),d=[...s.map(h=>{const _=tinymce.Resource.get(QE(h));return ft(_)?Promise.resolve(VI(e).loadRawCss(h,_)):Promise.resolve()}),VI(e).loadAll(a)];return e.inline?d:d.concat([e.ui.styleSheetLoader.loadAll(o)])},C$=e=>{const t=VI(e),o=T4(e),s=e.contentCSS,a=()=>{t.unloadAll(s),e.inline||e.ui.styleSheetLoader.unloadAll(o)},c=()=>{e.removed?a():e.on("remove",a)};if(e.contentStyles.length>0){let _="";zt.each(e.contentStyles,z=>{_+=z+`\r -`}),e.dom.addStyle(_)}const d=Promise.all(VK(e,s,o)).then(c).catch(c),h=Ay(e);return h&&BK(e,h),d},jK=e=>{const t=e.getDoc(),o=e.getBody();DM(e),sM(e)||(t.body.spellcheck=!1,$I.setAttrib(o,"spellcheck","false")),e.quirks=zK(e),RM(e);const s=K5(e);s!==void 0&&(o.dir=s);const a=jn(e);a&&e.on("BeforeSetContent",c=>{zt.each(a,d=>{c.content=c.content.replace(d,h=>"")})}),e.on("SetContent",()=>{e.addVisual(e.getBody())}),e.on("compositionstart compositionend",c=>{e.composing=c.type==="compositionstart"})},UK=e=>{Im(e)||e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"})},jI=e=>{e.removed!==!0&&(UK(e),HK(e))},ZK=e=>{let t=!1;const o=setTimeout(()=>{t||e.setProgressState(!0)},500);return()=>{clearTimeout(o),t=!0,e.setProgressState(!1)}},S$=e=>{const t=e.getElement();let o=e.getDoc();e.inline&&($I.addClass(t,"mce-content-body"),e.contentDocument=o=document,e.contentWindow=window,e.bodyElement=t,e.contentAreaContainer=t);const s=e.getBody();s.disabled=!0,e.readonly=L4(e),e._editableRoot=ss(e),!e.readonly&&e.hasEditableRoot()&&(e.inline&&$I.getStyle(s,"position",!0)==="static"&&(s.style.position="relative"),s.contentEditable="true"),s.disabled=!1,e.editorUpload=tT(e),e.schema=Rc(k$(e)),e.dom=Ts(o,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,update_styles:!0,root_element:e.inline?e.getBody():null,collect:e.inline,schema:e.schema,contentCssCors:S4(e),referrerPolicy:bv(e),onSetAttrib:d=>{e.dispatch("SetAttrib",d)}}),e.parser=IK(e),e.serializer=SN(PK(e),e),e.selection=$E(e.dom,e.getWin(),e.serializer,e),e.annotator=$A(e),e.formatter=U0(e),e.undoManager=sD(e),e._nodeChangeDispatcher=new FZ(e),e._selectionOverrides=eK(e),on(e),rq(e),t_(e),Im(e)||(fq(e),OK(e));const a=IZ(e);yo(e,a),Ea(e),dD(e),oq(e);const c=iN(e);jK(e),MK(e),c.fold(()=>{const d=ZK(e);C$(e).then(()=>{jI(e),d()})},d=>{e.setProgressState(!0),C$(e).then(()=>{d().then(h=>{e.setProgressState(!1),jI(e),pN(e)},h=>{e.notificationManager.open({type:"error",text:String(h)}),jI(e),pN(e)})})})},WK=zo,qK=(e,t,o)=>E(e,t,WK,o),UI=Ts.DOM,KK=(e,t,o,s)=>{const a=ye.fromTag("iframe");return s.each(c=>Rr(a,"tabindex",c)),Ha(a,o),Ha(a,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),Kl(a,"tox-edit-area__iframe"),a},GK=e=>{let t=Nu(e)+"";ld(e)!==e.documentBaseUrl&&(t+=''),t+='';const o=H_(e),s=Jk(e),a=e.translate(vv(e));return v4(e)&&(t+=''),t+=`
    `,t},YK=(e,t)=>{const o=Jo.browser.isFirefox()?vv(e):"Rich Text Area",s=e.translate(o),a=Sr(ye.fromDom(e.getElement()),"tabindex").bind(Vr),c=KK(e.id,s,sl(e),a).dom;c.onload=()=>{c.onload=null,e.dispatch("load")},e.contentAreaContainer=t.iframeContainer,e.iframeElement=c,e.iframeHTML=GK(e),UI.add(t.iframeContainer,c)},XK=e=>{const t=e.iframeElement,o=()=>{e.contentDocument=t.contentDocument,S$(e)};if(j4(e)||Jo.browser.isFirefox()){const s=e.getDoc();s.open(),s.write(e.iframeHTML),s.close(),o()}else{const s=qK(ye.fromDom(t),"load",()=>{s.unbind(),o()});t.srcdoc=e.iframeHTML}},JK=(e,t)=>{YK(e,t),t.editorContainer&&(t.editorContainer.style.display=e.orgDisplay,e.hidden=UI.isHidden(t.editorContainer)),e.getElement().style.display="none",UI.setAttrib(e.id,"aria-hidden","true"),e.getElement().style.visibility=e.orgVisibility,XK(e)},E$=Ts.DOM,QK=(e,t,o)=>{const s=Ab.get(o),a=Ab.urls[o]||e.documentBaseUrl.replace(/\/$/,"");if(o=zt.trim(o),s&&zt.inArray(t,o)===-1){if(e.plugins[o])return;try{const c=s(e,a)||{};e.plugins[o]=c,Gt(c.init)&&(c.init(e,a),t.push(o))}catch(c){ZP(e,o,c)}}},eG=e=>e.replace(/^\-/,""),tG=e=>{const t=[];Le(Du(e),o=>{QK(e,t,eG(o))})},oG=e=>{const t=zt.trim(n2(e)),o=e.ui.registry.getAll().icons,s={...F0.get("default").icons,...F0.get(t).icons};nn(s,(a,c)=>{Ro(o,c)||e.ui.registry.addIcon(c,a)})},nG=e=>{const t=Oy(e);if(ft(t)){const o=Jg.get(t);e.theme=o(e,Jg.urls[t])||{},Gt(e.theme.init)&&e.theme.init(e,Jg.urls[t]||e.documentBaseUrl.replace(/\/$/,""))}else e.theme={}},sG=e=>{const t=yv(e),o=Xg.get(t);e.model=o(e,Xg.urls[t])},rG=e=>{const t=e.theme.renderUI;return t?t():A$(e)},aG=e=>{const t=e.getElement(),s=Oy(e)(e,t);return s.editorContainer.nodeType&&(s.editorContainer.id=s.editorContainer.id||e.id+"_parent"),s.iframeContainer&&s.iframeContainer.nodeType&&(s.iframeContainer.id=s.iframeContainer.id||e.id+"_iframecontainer"),s.height=s.iframeHeight?s.iframeHeight:t.offsetHeight,s},T$=(e,t)=>({editorContainer:e,iframeContainer:t,api:{}}),iG=e=>{const t=E$.create("div");return E$.insertAfter(t,e),T$(t,t)},A$=e=>{const t=e.getElement();return e.inline?T$(null):iG(t)},lG=e=>{const t=e.getElement();return e.orgDisplay=t.style.display,ft(Oy(e))?rG(e):Gt(Oy(e))?aG(e):A$(e)},cG=(e,t)=>{const o={show:j.from(t.show).getOr(dt),hide:j.from(t.hide).getOr(dt),isEnabled:j.from(t.isEnabled).getOr(zo),setEnabled:s=>{e.mode.isReadOnly()||j.from(t.setEnabled).each(a=>a(s))}};e.ui={...e.ui,...o}},dG=async e=>{e.dispatch("ScriptsLoaded"),oG(e),nG(e),sG(e),tG(e);const t=await lG(e);cG(e,j.from(t.api).getOr({})),e.editorContainer=t.editorContainer,ZN(e),e.inline?S$(e):JK(e,{editorContainer:t.editorContainer,iframeContainer:t.iframeContainer})},a_=Ts.DOM,O$=e=>e.charAt(0)==="-",uG=(e,t)=>{const o=a2(t),s=q5(t);if(!Mc.hasCode(o)&&o!=="en"){const a=Pn(s)?s:`${t.editorManager.baseURL}/langs/${o}.js`;e.add(a).catch(()=>{jP(t,a,o)})}},fG=(e,t)=>{const o=Oy(e);if(ft(o)&&!O$(o)&&!Ro(Jg.urls,o)){const s=Y5(e),a=s?e.documentBaseURI.toAbsolute(s):`themes/${o}/theme${t}.js`;Jg.load(o,a).catch(()=>{jN(e,a,o)})}},mG=(e,t)=>{const o=yv(e);if(o!=="plugin"&&!Ro(Xg.urls,o)){const s=l2(e),a=ft(s)?e.documentBaseURI.toAbsolute(s):`models/${o}/model${t}.js`;Xg.load(o,a).catch(()=>{UP(e,a,o)})}},pG=e=>j.from(k4(e)).filter(Pn).map(t=>({url:t,name:j.none()})),z$=(e,t,o)=>j.from(t).filter(s=>Pn(s)&&!F0.has(s)).map(s=>({url:`${e.editorManager.baseURL}/icons/${s}/icons${o}.js`,name:j.some(s)})),gG=(e,t,o)=>{const s=z$(t,"default",o),a=pG(t).orThunk(()=>z$(t,n2(t),""));Le(Hf([s,a]),c=>{e.add(c.url).catch(()=>{XE(t,c.url,c.name.getOrUndefined())})})},hG=(e,t)=>{const o=(s,a)=>{Ab.load(s,a).catch(()=>{YE(e,a,s)})};nn(_m(e),(s,a)=>{o(a,s),e.options.set("plugins",Du(e).concat(a))}),Le(Du(e),s=>{s=zt.trim(s),s&&!Ab.urls[s]&&!O$(s)&&o(s,`plugins/${s}/plugin${t}.js`)})},bG=e=>{const t=Oy(e);return!ft(t)||Fe(Jg.get(t))},yG=e=>{const t=yv(e);return Fe(Xg.get(t))},vG=(e,t)=>{const o=tl.ScriptLoader,s=()=>{!e.removed&&bG(e)&&yG(e)&&dG(e)};fG(e,t),mG(e,t),uG(o,e),gG(o,e,t),hG(e,t),o.loadQueue().then(s,s)},_G=(e,t)=>Ks.forElement(e,{contentCssCors:P4(t),referrerPolicy:bv(t)}),xG=e=>{const t=e.id;Mc.setCode(a2(e));const o=()=>{a_.unbind(window,"ready",o),e.render()};if(!af.Event.domLoaded){a_.bind(window,"ready",o);return}if(!e.getElement())return;const s=ye.fromDom(e.getElement()),a=Va(s);e.on("remove",()=>{Lt(s.dom.attributes,d=>rn(s,d.name)),Ha(s,a)}),e.ui.styleSheetLoader=_G(s,e),Kh(e)?e.inline=!0:(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden");const c=e.getElement().form||a_.getParent(t,"form");c&&(e.formElement=c,c2(e)&&!Qf(e.getElement())&&(a_.insertAfter(a_.create("input",{type:"hidden",name:t}),t),e.hasHiddenInput=!0),e.formEventDelegate=d=>{e.dispatch(d.type,d)},a_.bind(c,"submit reset",e.formEventDelegate),e.on("reset",()=>{e.resetContent()}),D4(e)&&!c.submit.nodeType&&!c.submit.length&&!c._mceOldSubmit&&(c._mceOldSubmit=c.submit,c.submit=()=>(e.editorManager.triggerSave(),e.setDirty(!1),c._mceOldSubmit(c)))),e.windowManager=HN(e),e.notificationManager=GE(e),U4(e)&&e.on("GetContent",d=>{d.save&&(d.content=a_.encode(d.content))}),R4(e)&&e.on("submit",()=>{e.initialized&&e.save()}),M4(e)&&(e._beforeUnload=()=>{e.initialized&&!e.destroyed&&!e.isHidden()&&e.save({format:"raw",no_events:!0,set_dirty:!1})},e.editorManager.on("BeforeUnload",e._beforeUnload)),e.editorManager.add(e),vG(e,e.suffix)},wG=(e,t)=>{e._editableRoot!==t&&(e._editableRoot=t,e.readonly||(e.getBody().contentEditable=String(e.hasEditableRoot()),e.nodeChanged()),LM(e,t))},kG=e=>e._editableRoot,CG=(e,t)=>({sections:Ge(e),options:Ge(t)}),N$=_t().deviceType,D$=N$.isPhone(),SG=N$.isTablet(),e4=e=>{if(uo(e))return[];{const t=ve(e)?e:e.split(/[ ,]/),o=dn(t,br);return rt(o,Pn)}},EG=(e,t)=>{const o=cl(t,(s,a)=>mn(e,a));return CG(o.t,o.f)},TG=(e,t,o={})=>{const s=e.sections(),a=Gn(s,t).getOr({});return zt.extend({},o,a)},ZI=(e,t)=>Ro(e.sections(),t),AG=(e,t)=>ZI(e,t)?e.sections()[t]:{},OG=(e,t)=>({...{table_grid:!1,object_resizing:!1,resize:!1,toolbar_mode:Gn(e,"toolbar_mode").getOr("scrolling"),toolbar_sticky:!1},...t?{menubar:!1}:{}}),zG=(e,t)=>{var o;const s=(o=t.external_plugins)!==null&&o!==void 0?o:{};return e&&e.external_plugins?zt.extend({},e.external_plugins,s):s},NG=(e,t)=>[...e4(e),...e4(t)],DG=(e,t,o,s)=>e&&ZI(t,"mobile")?s:o,RG=(e,t,o,s)=>{const a=e4(o.forced_plugins),c=e4(s.plugins),d=AG(t,"mobile"),h=d.plugins?e4(d.plugins):c,_=DG(e,t,c,h),z=NG(a,_);return zt.extend(s,{forced_plugins:a,plugins:z})},MG=(e,t)=>e&&ZI(t,"mobile"),BG=(e,t,o,s,a)=>{var c;const d=e?{mobile:OG((c=a.mobile)!==null&&c!==void 0?c:{},t)}:{},h=EG(["mobile"],DR(d,a)),_=zt.extend(o,s,h.options(),MG(e,h)?TG(h,"mobile"):{},{external_plugins:zG(s,h.options())});return RG(e,h,s,_)},LG=(e,t)=>{const o=T8(t);return BG(D$||SG,D$,o,e,o)},PG=(e,t)=>mN(e,t),IG=e=>{const t=(s,a)=>{e.formatter.toggle(s,a),e.nodeChanged()},o=s=>()=>{Le("left,center,right,justify".split(","),a=>{s!==a&&e.formatter.remove("align"+a)}),s!=="none"&&t("align"+s)};e.editorCommands.addCommands({JustifyLeft:o("left"),JustifyCenter:o("center"),JustifyRight:o("right"),JustifyFull:o("justify"),JustifyNone:o("none")})},FG=e=>{const t=o=>()=>{const s=e.selection,a=s.isCollapsed()?[e.dom.getParent(s.getNode(),e.dom.isBlock)]:s.getSelectedBlocks();return Bn(a,c=>Fe(e.formatter.matchNode(c,o)))};e.editorCommands.addCommands({JustifyLeft:t("alignleft"),JustifyCenter:t("aligncenter"),JustifyRight:t("alignright"),JustifyFull:t("alignjustify")},"state")},$G=e=>{IG(e),FG(e)},HG=e=>{e.editorCommands.addCommands({"Cut,Copy,Paste":t=>{const o=e.getDoc();let s;try{o.execCommand(t)}catch{s=!0}if(t==="paste"&&!o.queryCommandEnabled(t)&&(s=!0),s||!o.queryCommandSupported(t)){let a=e.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");(Jo.os.isMacOS()||Jo.os.isiOS())&&(a=a.replace(/Ctrl\+/g,"⌘+")),e.notificationManager.open({text:a,type:"error"})}}})},VG=(e,t,o,s)=>{const a=ye.fromDom(e.getRoot());return Yy(a,Ue.fromRangeStart(t),s)?o=o.replace(/^ /," "):o=o.replace(/^ /," "),bb(a,Ue.fromRangeEnd(t),s)?o=o.replace(/( | )()?$/," "):o=o.replace(/ ()?$/," "),o},jG=e=>{if(typeof e!="string"){const t=zt.extend({paste:e.paste,data:{paste:e.paste}},e);return{content:e.content,details:t}}return{content:e,details:{}}},UG=(e,t)=>{const o=e.selection,s=e.dom;return/^ | $/.test(t)?VG(s,o.getRng(),t,e.schema):t},t5=(e,t)=>{if(e.selection.isEditable()){const{content:o,details:s}=jG(t);pE(e,{...s,content:UG(e,o),format:"html",set:!1,selection:!0}).each(a=>{const c=xP(e,a.content,s);gE(e,c,a),e.addVisual()})}},ZG=e=>{e.editorCommands.addCommands({mceCleanup:()=>{const t=e.selection.getBookmark();e.setContent(e.getContent()),e.selection.moveToBookmark(t)},insertImage:(t,o,s)=>{t5(e,e.dom.createHTML("img",{src:s}))},insertHorizontalRule:()=>{e.execCommand("mceInsertContent",!1,"
    ")},insertText:(t,o,s)=>{t5(e,e.dom.encode(s))},insertHTML:(t,o,s)=>{t5(e,s)},mceInsertContent:(t,o,s)=>{t5(e,s)},mceSetContent:(t,o,s)=>{e.setContent(s)},mceReplaceContent:(t,o,s)=>{e.execCommand("mceInsertContent",!1,s.replace(/\{\$selection\}/g,e.selection.getContent({format:"text"})))},mceNewDocument:()=>{e.setContent(qn(e))}})},WG={"font-size":"size","font-family":"face"},qG=Ed("font"),KG=(e,t,o)=>{const s=c=>Us(c,e).orThunk(()=>qG(c)?Gn(WG,e).bind(d=>Sr(c,d)):j.none()),a=c=>kn(ye.fromDom(t),c);return x0(ye.fromDom(o),c=>s(c),a)},GG=e=>e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,","),YG=(e,t)=>j.from(Ts.DOM.getStyle(t,e,!0)),R$=e=>(t,o)=>j.from(o).map(ye.fromDom).filter(cr).bind(s=>KG(e,t,s.dom).or(YG(e,s.dom))).getOr(""),XG=R$("font-size"),JG=Kt(GG,R$("font-family")),QG=e=>No(e.getBody()).bind(t=>{const o=t.container();return j.from(wt(o)?o.parentNode:o)}),eY=e=>j.from(e.selection.getRng()).bind(t=>{const o=e.getBody();return t.startContainer===o&&t.startOffset===0?j.none():j.from(e.selection.getStart(!0))}),tY=(e,t)=>eY(e).orThunk($t(QG,e)).map(ye.fromDom).filter(cr).bind(t),WI=(e,t)=>tY(e,qo(j.some,t)),M$=(e,t)=>{if(/^[0-9.]+$/.test(t)){const o=parseInt(t,10);if(o>=1&&o<=7){const s=f2(e),a=m2(e);return a.length>0?a[o-1]||t:s[o-1]||t}else return t}else return t},oY=e=>{const t=e.split(/\s*,\s*/);return dn(t,o=>o.indexOf(" ")!==-1&&!(vs(o,'"')||vs(o,"'"))?`'${o}'`:o).join(",")},nY=(e,t)=>{const o=M$(e,t);e.formatter.toggle("fontname",{value:oY(o)}),e.nodeChanged()},sY=e=>WI(e,t=>JG(e.getBody(),t.dom)).getOr(""),rY=(e,t)=>{e.formatter.toggle("fontsize",{value:M$(e,t)}),e.nodeChanged()},aY=e=>WI(e,t=>XG(e.getBody(),t.dom)).getOr(""),iY=e=>WI(e,t=>{const o=ye.fromDom(e.getBody()),s=x0(t,c=>Us(c,"line-height"),$t(kn,o)),a=()=>{const c=parseFloat(ur(t,"line-height")),d=parseFloat(ur(t,"font-size"));return String(c/d)};return s.getOrThunk(a)}).getOr(""),lY=(e,t)=>{e.formatter.toggle("lineheight",{value:String(t)}),e.nodeChanged()},cY=e=>{const t=(o,s)=>{e.formatter.toggle(o,s),e.nodeChanged()};e.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":o=>{t(o)},"ForeColor,HiliteColor":(o,s,a)=>{t(o,{value:a})},BackColor:(o,s,a)=>{t("hilitecolor",{value:a})},FontName:(o,s,a)=>{nY(e,a)},FontSize:(o,s,a)=>{rY(e,a)},LineHeight:(o,s,a)=>{lY(e,a)},Lang:(o,s,a)=>{var c;t(o,{value:a.code,customValue:(c=a.customCode)!==null&&c!==void 0?c:null})},RemoveFormat:o=>{e.formatter.remove(o)},mceBlockQuote:()=>{t("blockquote")},FormatBlock:(o,s,a)=>{t(ft(a)?a:"p")},mceToggleFormat:(o,s,a)=>{t(a)}})},dY=e=>{const t=o=>e.formatter.match(o);e.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":o=>t(o),mceBlockQuote:()=>t("blockquote")},"state"),e.editorCommands.addQueryValueHandler("FontName",()=>sY(e)),e.editorCommands.addQueryValueHandler("FontSize",()=>aY(e)),e.editorCommands.addQueryValueHandler("LineHeight",()=>iY(e))},uY=e=>{cY(e),dY(e)},fY=e=>{e.editorCommands.addCommands({mceAddUndoLevel:()=>{e.undoManager.add()},mceEndUndoLevel:()=>{e.undoManager.add()},Undo:()=>{e.undoManager.undo()},Redo:()=>{e.undoManager.redo()}})},mY=e=>{e.editorCommands.addCommands({Indent:()=>{tt(e)},Outdent:()=>{Je(e)}}),e.editorCommands.addCommands({Outdent:()=>ne(e)},"state")},pY=e=>{const t=(o,s,a)=>{const c=ft(a)?{href:a}:a,d=e.dom.getParent(e.selection.getNode(),"a");ue(c)&&ft(c.href)&&(c.href=c.href.replace(/ /g,"%20"),(!d||!c.href)&&e.formatter.remove("link"),c.href&&e.formatter.apply("link",c,d))};e.editorCommands.addCommands({unlink:()=>{if(e.selection.isEditable()){if(e.selection.isCollapsed()){const o=e.dom.getParent(e.selection.getStart(),"a");o&&e.dom.remove(o,!0);return}e.formatter.remove("link")}},mceInsertLink:t,createLink:t})},gY=(e,t,o,s)=>{const a=e.dom,c=h=>a.isBlock(h)&&h.parentElement===o,d=c(t)?t:a.getParent(s,c,o);return j.from(d).map(ye.fromDom)},B$=(e,t)=>{const o=e.dom,s=e.selection.getRng(),a=t?e.selection.getStart():e.selection.getEnd(),c=t?s.startContainer:s.endContainer,d=GT(o,c);if(!d||!d.isContentEditable)return;const h=t?Zs:Ne,_=ji(e);gY(e,a,d,c).each(z=>{const I=Q8(e,c,z.dom,d,!1,_);h(z,ye.fromDom(I)),e.selection.setCursorLocation(I,0),e.dispatch("NewBlock",{newBlock:I}),KT(e,"insertParagraph")})},hY=e=>B$(e,!0),bY=e=>B$(e,!1),yY=e=>{e.editorCommands.addCommands({InsertNewBlockBefore:()=>{hY(e)},InsertNewBlockAfter:()=>{bY(e)}})},vY=e=>{e.editorCommands.addCommands({insertParagraph:()=>{VR(nF,e)},mceInsertNewLine:(t,o,s)=>{dF(e,s)},InsertLineBreak:(t,o,s)=>{VR(aF,e)}})},_Y=e=>{e.editorCommands.addCommands({mceSelectNodeDepth:(t,o,s)=>{let a=0;e.dom.getParent(e.selection.getNode(),c=>no(c)&&a++===s?(e.selection.select(c),!1):!0,e.getBody())},mceSelectNode:(t,o,s)=>{e.selection.select(s)},selectAll:()=>{const t=e.dom.getParent(e.selection.getStart(),Ml);if(t){const o=e.dom.createRng();o.selectNodeContents(t),e.selection.setRng(o)}}})},xY=e=>{e.editorCommands.addCommands({mceRemoveNode:(t,o,s)=>{const a=s??e.selection.getNode();if(a!==e.getBody()){const c=e.selection.getBookmark();e.dom.remove(a,!0),e.selection.moveToBookmark(c)}},mcePrint:()=>{e.getWin().print()},mceFocus:(t,o,s)=>{CO(e,s===!0)},mceToggleVisualAid:()=>{e.hasVisual=!e.hasVisual,e.addVisual()}})},wY=e=>{$G(e),HG(e),fY(e),_Y(e),ZG(e),pY(e),mY(e),yY(e),vY(e),uY(e),xY(e)},kY=["toggleview"],L$=e=>mn(kY,e.toLowerCase());class P${constructor(t){this.commands={state:{},exec:{},value:{}},this.editor=t}execCommand(t,o=!1,s,a){const c=this.editor,d=t.toLowerCase(),h=a==null?void 0:a.skip_focus;if(c.removed||(d!=="mcefocus"&&(!/^(mceAddUndoLevel|mceEndUndoLevel)$/i.test(d)&&!h?c.focus():Ex(c)),c.dispatch("BeforeExecCommand",{command:t,ui:o,value:s}).isDefaultPrevented()))return!1;const z=this.commands.exec[d];return Gt(z)?(z(d,o,s),c.dispatch("ExecCommand",{command:t,ui:o,value:s}),!0):!1}queryCommandState(t){if(!L$(t)&&this.editor.quirks.isHidden()||this.editor.removed)return!1;const o=t.toLowerCase(),s=this.commands.state[o];return Gt(s)?s(o):!1}queryCommandValue(t){if(!L$(t)&&this.editor.quirks.isHidden()||this.editor.removed)return"";const o=t.toLowerCase(),s=this.commands.value[o];return Gt(s)?s(o):""}addCommands(t,o="exec"){const s=this.commands;nn(t,(a,c)=>{Le(c.toLowerCase().split(","),d=>{s[o][d]=a})})}addCommand(t,o,s){const a=t.toLowerCase();this.commands.exec[a]=(c,d,h)=>o.call(s??this.editor,d,h)}queryCommandSupported(t){const o=t.toLowerCase();return!!this.commands.exec[o]}addQueryStateHandler(t,o,s){this.commands.state[t.toLowerCase()]=()=>o.call(s??this.editor)}addQueryValueHandler(t,o,s){this.commands.value[t.toLowerCase()]=()=>o.call(s??this.editor)}}const i_="data-mce-contenteditable",CY=(e,t,o)=>{vc(e,t)&&!o?Ra(e,t):o&&Kl(e,t)},qI=(e,t,o)=>{try{e.getDoc().execCommand(t,!1,String(o))}catch{}},o5=(e,t)=>{e.dom.contentEditable=t?"true":"false"},SY=e=>{Le(Mr(e,'*[contenteditable="true"]'),t=>{Rr(t,i_,"true"),o5(t,!1)})},EY=e=>{Le(Mr(e,`*[${i_}="true"]`),t=>{rn(t,i_),o5(t,!0)})},TY=e=>{j.from(e.selection.getNode()).each(t=>{t.removeAttribute("data-mce-selected")})},AY=e=>{e.selection.setRng(e.selection.getRng())},OY=(e,t)=>{const o=ye.fromDom(e.getBody());CY(o,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),TY(e),e.readonly=!0,o5(o,!1),SY(o)):(e.readonly=!1,e.hasEditableRoot()&&o5(o,!0),EY(o),qI(e,"StyleWithCSS",!1),qI(e,"enableInlineTableEditing",!1),qI(e,"enableObjectResizing",!1),ub(e)&&e.focus(),AY(e),e.nodeChanged())},l_=e=>e.readonly,I$=e=>{e.parser.addAttributeFilter("contenteditable",t=>{l_(e)&&Le(t,o=>{o.attr(i_,o.attr("contenteditable")),o.attr("contenteditable","false")})}),e.serializer.addAttributeFilter(i_,t=>{l_(e)&&Le(t,o=>{o.attr("contenteditable",o.attr(i_))})}),e.serializer.addTempAttr(i_)},zY=e=>{e.serializer?I$(e):e.on("PreInit",()=>{I$(e)})},NY=e=>e.type==="click",DY=["copy"],RY=e=>mn(DY,e.type),MY=(e,t)=>Xr(t,"a",s=>kn(s,ye.fromDom(e.getBody()))).bind(s=>Sr(s,"href")),BY=(e,t)=>{if(NY(t)&&!Zt.metaKeyPressed(t)){const o=ye.fromDom(t.target);MY(e,o).each(s=>{if(t.preventDefault(),/^#/.test(s)){const a=e.dom.select(`${s},[name="${wi(s,"#")}"]`);a.length&&e.selection.scrollIntoView(a[0],!0)}else window.open(s,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")})}else RY(t)&&e.dispatch(t.type,t)},LY=e=>{e.on("ShowCaret",t=>{l_(e)&&t.preventDefault()}),e.on("ObjectSelected",t=>{l_(e)&&t.preventDefault()})},PY=zt.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 KI{static isNative(t){return!!PY[t.toLowerCase()]}constructor(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||fn}fire(t,o){return this.dispatch(t,o)}dispatch(t,o){const s=t.toLowerCase(),a=ny(s,o??{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(a);const c=this.bindings[s];if(c)for(let d=0,h=c.length;d{this.toggleEvent(_,!1),delete this.bindings[_]}),this;if(d){if(!o)d.length=0;else{const h=yt(d,_=>_.func===o);d=h.fail,this.bindings[c]=d,Le(h.pass,_=>{_.removed=!0})}d.length||(this.toggleEvent(t,!1),delete this.bindings[c])}}}else nn(this.bindings,(s,a)=>{this.toggleEvent(a,!1)}),this.bindings={};return this}once(t,o,s){return this.on(t,o,s,{once:!0})}has(t){t=t.toLowerCase();const o=this.bindings[t];return!(!o||o.length===0)}}const t4=e=>(e._eventDispatcher||(e._eventDispatcher=new KI({scope:e,toggleEvent:(t,o)=>{KI.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,o)}})),e._eventDispatcher),GI={fire(e,t,o){return this.dispatch(e,t,o)},dispatch(e,t,o){const s=this;if(s.removed&&e!=="remove"&&e!=="detach")return ny(e.toLowerCase(),t??{},s);const a=t4(s).dispatch(e,t);if(o!==!1&&s.parent){let c=s.parent();for(;c&&!a.isPropagationStopped();)c.dispatch(e,a,!1),c=c.parent?c.parent():void 0}return a},on(e,t,o){return t4(this).on(e,t,o)},off(e,t){return t4(this).off(e,t)},once(e,t){return t4(this).once(e,t)},hasEventListeners(e){return t4(this).has(e)}},n5=Ts.DOM;let c_;const s5=(e,t)=>{if(t==="selectionchange")return e.getDoc();if(!e.inline&&/^(?:mouse|touch|click|contextmenu|drop|dragover|dragend)/.test(t))return e.getDoc().documentElement;const o=z4(e);return o?(e.eventRoot||(e.eventRoot=n5.select(o)[0]),e.eventRoot):e.getBody()},IY=e=>!e.hidden&&!l_(e),F$=(e,t,o)=>{IY(e)?e.dispatch(t,o):l_(e)&&BY(e,o)},$$=(e,t)=>{if(e.delegates||(e.delegates={}),e.delegates[t]||e.removed)return;const o=s5(e,t);if(z4(e)){if(c_||(c_={},e.editorManager.on("removeEditor",()=>{e.editorManager.activeEditor||c_&&(nn(c_,(a,c)=>{e.dom.unbind(s5(e,c))}),c_=null)})),c_[t])return;const s=a=>{const c=a.target,d=e.editorManager.get();let h=d.length;for(;h--;){const _=d[h].getBody();(_===c||n5.isChildOf(c,_))&&F$(d[h],t,a)}};c_[t]=s,n5.bind(o,t,s)}else{const s=a=>{F$(e,t,a)};n5.bind(o,t,s),e.delegates[t]=s}},H$={...GI,bindPendingEventDelegates(){const e=this;zt.each(e._pendingNativeEvents,t=>{$$(e,t)})},toggleNativeEvent(e,t){const o=this;e==="focus"||e==="blur"||o.removed||(t?o.initialized?$$(o,e):o._pendingNativeEvents?o._pendingNativeEvents.push(e):o._pendingNativeEvents=[e]:o.initialized&&o.delegates&&(o.dom.unbind(s5(o,e),e,o.delegates[e]),delete o.delegates[e]))},unbindAllNativeEvents(){const e=this,t=e.getBody(),o=e.dom;e.delegates&&(nn(e.delegates,(s,a)=>{e.dom.unbind(s5(e,a),a,s)}),delete e.delegates),!e.inline&&t&&o&&(t.onload=null,o.unbind(e.getWin()),o.unbind(e.getDoc())),o&&(o.unbind(t),o.unbind(e.getContainer()))}},FY=e=>ft(e)?{value:e.split(/[ ,]/),valid:!0}:bt(e,ft)?{value:e,valid:!0}:{valid:!1,message:"The value must be a string[] or a comma/space separated string."},$Y=e=>{const t=(()=>{switch(e){case"array":return ve;case"boolean":return bn;case"function":return Gt;case"number":return D;case"object":return ue;case"string":return ft;case"string[]":return FY;case"object[]":return o=>bt(o,ue);case"regexp":return o=>Ut(o,RegExp);default:return zo}})();return o=>YI(o,t,`The value must be a ${e}.`)},HY=e=>ft(e.processor),V$=(e,t)=>{const o=ki(t.message)?"":`. ${t.message}`;return e+o},j$=e=>e.valid,YI=(e,t,o="")=>{const s=t(e);return bn(s)?s?{value:e,valid:!0}:{valid:!1,message:o}:s},VY=(e,t,o)=>{if(!ln(t)){const s=YI(t,o);if(j$(s))return s.value;console.error(V$(`Invalid default value passed for the "${e}" option`,s))}},jY=(e,t,o=t)=>{const s={},a={},c=(ee,le,oe)=>{const fe=YI(le,oe);return j$(fe)?(a[ee]=fe.value,!0):(console.warn(V$(`Invalid value passed for the ${ee} option`,fe)),!1)},d=(ee,le)=>{const oe=HY(le)?$Y(le.processor):le.processor,fe=VY(ee,le.default,oe);s[ee]={...le,default:fe,processor:oe},Gn(a,ee).orThunk(()=>Gn(t,ee)).each(Oe=>c(ee,Oe,oe))},h=ee=>Ro(s,ee);return{register:d,isRegistered:h,get:ee=>Gn(a,ee).orThunk(()=>Gn(s,ee).map(le=>le.default)).getOrUndefined(),set:(ee,le)=>{if(h(ee)){const oe=s[ee];return oe.immutable?(console.error(`"${ee}" is an immutable option and cannot be updated`),!1):c(ee,le,oe.processor)}else return console.warn(`"${ee}" is not a registered option. Ensure the option has been registered before setting a value.`),!1},unset:ee=>{const le=h(ee);return le&&delete a[ee],le},isSet:ee=>Ro(a,ee),debug:()=>{try{console.log(JSON.parse(JSON.stringify(o,(ee,le)=>bn(le)||D(le)||ft(le)||ot(le)||ve(le)||Ct(le)?le:Object.prototype.toString.call(le))))}catch(ee){console.error(ee)}}}},UY=["design","readonly"],U$=(e,t,o,s)=>{const a=o[t.get()],c=o[s];try{c.activate()}catch(d){console.error(`problem while activating editor mode ${s}:`,d);return}a.deactivate(),a.editorReadOnly!==c.editorReadOnly&&OY(e,c.editorReadOnly),t.set(s),HA(e,s)},ZY=(e,t,o,s)=>{if(s!==o.get()){if(!Ro(t,s))throw new Error(`Editor mode '${s}' is invalid`);e.initialized?U$(e,o,t,s):e.on("init",()=>U$(e,o,t,s))}},WY=(e,t,o)=>{if(mn(UY,t))throw new Error(`Cannot override default mode ${t}`);return{...e,[t]:{...o,deactivate:()=>{try{o.deactivate()}catch(s){console.error(`problem while deactivating editor mode ${t}:`,s)}}}}},qY=e=>{const t=Er("design"),o=Er({design:{activate:dt,deactivate:dt,editorReadOnly:!1},readonly:{activate:dt,deactivate:dt,editorReadOnly:!0}});return zY(e),LY(e),{isReadOnly:()=>l_(e),set:s=>ZY(e,o.get(),t,s),get:()=>t.get(),register:(s,a)=>{o.set(WY(o.get(),s,a))}}},XI=zt.each,JI=zt.explode,KY={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},Z$=zt.makeMap("alt,ctrl,shift,meta,access"),GY=e=>e in Z$,YY=e=>{const t={},o=Jo.os.isMacOS()||Jo.os.isiOS();XI(JI(e.toLowerCase(),"+"),c=>{GY(c)?t[c]=!0:/^[0-9]{2,}$/.test(c)?t.keyCode=parseInt(c,10):(t.charCode=c.charCodeAt(0),t.keyCode=KY[c]||c.toUpperCase().charCodeAt(0))});const s=[t.keyCode];let a;for(a in Z$)t[a]?s.push(a):t[a]=!1;return t.id=s.join(","),t.access&&(t.alt=!0,o?t.ctrl=!0:t.shift=!0),t.meta&&(o?t.meta=!0:(t.ctrl=!0,t.meta=!1)),t};class W${constructor(t){this.shortcuts={},this.pendingPatterns=[],this.editor=t;const o=this;t.on("keyup keypress keydown",s=>{(o.hasModifier(s)||o.isFunctionKey(s))&&!s.isDefaultPrevented()&&(XI(o.shortcuts,a=>{o.matchShortcut(s,a)&&(o.pendingPatterns=a.subpatterns.slice(0),s.type==="keydown"&&o.executeShortcutAction(a))}),o.matchShortcut(s,o.pendingPatterns[0])&&(o.pendingPatterns.length===1&&s.type==="keydown"&&o.executeShortcutAction(o.pendingPatterns[0]),o.pendingPatterns.shift()))})}add(t,o,s,a){const c=this,d=c.normalizeCommandFunc(s);return XI(JI(zt.trim(t)),h=>{const _=c.createShortcut(h,o,d,a);c.shortcuts[_.id]=_}),!0}remove(t){const o=this.createShortcut(t);return this.shortcuts[o.id]?(delete this.shortcuts[o.id],!0):!1}normalizeCommandFunc(t){const o=this,s=t;return typeof s=="string"?()=>{o.editor.execCommand(s,!1,null)}:zt.isArray(s)?()=>{o.editor.execCommand(s[0],s[1],s[2])}:s}createShortcut(t,o,s,a){const c=zt.map(JI(t,">"),YY);return c[c.length-1]=zt.extend(c[c.length-1],{func:s,scope:a||this.editor}),zt.extend(c[0],{desc:this.editor.translate(o),subpatterns:c.slice(1)})}hasModifier(t){return t.altKey||t.ctrlKey||t.metaKey}isFunctionKey(t){return t.type==="keydown"&&t.keyCode>=112&&t.keyCode<=123}matchShortcut(t,o){return!o||o.ctrl!==t.ctrlKey||o.meta!==t.metaKey||o.alt!==t.altKey||o.shift!==t.shiftKey?!1:t.keyCode===o.keyCode||t.charCode&&t.charCode===o.charCode?(t.preventDefault(),!0):!1}executeShortcutAction(t){return t.func?t.func.call(t.scope):null}}const XY=()=>{const e={},t={},o={},s={},a={},c={},d={},h={},_=(I,$)=>(V,ee)=>{I[V.toLowerCase()]={...ee,type:$}},z=(I,$)=>s[I.toLowerCase()]=$;return{addButton:_(e,"button"),addGroupToolbarButton:_(e,"grouptoolbarbutton"),addToggleButton:_(e,"togglebutton"),addMenuButton:_(e,"menubutton"),addSplitButton:_(e,"splitbutton"),addMenuItem:_(t,"menuitem"),addNestedMenuItem:_(t,"nestedmenuitem"),addToggleMenuItem:_(t,"togglemenuitem"),addAutocompleter:_(o,"autocompleter"),addContextMenu:_(a,"contextmenu"),addContextToolbar:_(c,"contexttoolbar"),addContextForm:_(c,"contextform"),addSidebar:_(d,"sidebar"),addView:_(h,"views"),addIcon:z,getAll:()=>({buttons:e,menuItems:t,icons:s,popups:o,contextMenus:a,contextToolbars:c,sidebars:d,views:h})}},JY=()=>{const e=XY();return{addAutocompleter:e.addAutocompleter,addButton:e.addButton,addContextForm:e.addContextForm,addContextMenu:e.addContextMenu,addContextToolbar:e.addContextToolbar,addIcon:e.addIcon,addMenuButton:e.addMenuButton,addMenuItem:e.addMenuItem,addNestedMenuItem:e.addNestedMenuItem,addSidebar:e.addSidebar,addSplitButton:e.addSplitButton,addToggleButton:e.addToggleButton,addGroupToolbarButton:e.addGroupToolbarButton,addToggleMenuItem:e.addToggleMenuItem,addView:e.addView,getAll:e.getAll}},d_=Ts.DOM,q$=zt.extend,QY=zt.each;class r5{constructor(t,o,s){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=s,this.documentBaseUrl=s.documentBaseURL,q$(this,H$);const a=this;this.id=t,this.hidden=!1;const c=LG(s.defaultOptions,o);this.options=jY(a,c,o),$_(a);const d=this.options.get;d("deprecation_warnings")&&LP(o,c);const h=d("suffix");h&&(s.suffix=h),this.suffix=s.suffix;const _=d("base_url");_&&s._setBaseUrl(_),this.baseUri=s.baseURI;const z=bv(a);z&&(tl.ScriptLoader._setReferrerPolicy(z),Ts.DOM.styleSheetLoader._setReferrerPolicy(z));const I=P4(a);Fe(I)&&Ts.DOM.styleSheetLoader._setContentCssCors(I),Hi.languageLoad=d("language_load"),Hi.baseURL=s.baseURL,this.setDirty(!1),this.documentBaseURI=new Qd(ld(a),{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=Kh(a),this.hasVisual=Ic(a),this.shortcuts=new W$(this),this.editorCommands=new P$(this),wY(this);const $=d("cache_suffix");$&&(Jo.cacheSuffix=$.replace(/^[\?\&]+/,"")),this.ui={registry:JY(),styleSheetLoader:void 0,show:dt,hide:dt,setEnabled:dt,isEnabled:zo},this.mode=qY(a),s.dispatch("SetupEditor",{editor:this});const V=Dy(a);Gt(V)&&V.call(a,a)}render(){xG(this)}focus(t){this.execCommand("mceFocus",!1,t)}hasFocus(){return jy(this)}translate(t){return Mc.translate(t)}getParam(t,o,s){const a=this.options;return a.isRegistered(t)||(Fe(s)?a.register(t,{processor:s,default:o}):a.register(t,{processor:zo,default:o})),!a.isSet(t)&&!ln(o)?o:a.get(t)}hasPlugin(t,o){return mn(Du(this),t)?o?Ab.get(t)!==void 0:!0:!1}nodeChanged(t){this._nodeChangeDispatcher.nodeChanged(t)}addCommand(t,o,s){this.editorCommands.addCommand(t,o,s)}addQueryStateHandler(t,o,s){this.editorCommands.addQueryStateHandler(t,o,s)}addQueryValueHandler(t,o,s){this.editorCommands.addQueryValueHandler(t,o,s)}addShortcut(t,o,s,a){this.shortcuts.add(t,o,s,a)}execCommand(t,o,s,a){return this.editorCommands.execCommand(t,o,s,a)}queryCommandState(t){return this.editorCommands.queryCommandState(t)}queryCommandValue(t){return this.editorCommands.queryCommandValue(t)}queryCommandSupported(t){return this.editorCommands.queryCommandSupported(t)}show(){const t=this;t.hidden&&(t.hidden=!1,t.inline?t.getBody().contentEditable="true":(d_.show(t.getContainer()),d_.hide(t.id)),t.load(),t.dispatch("show"))}hide(){const t=this;t.hidden||(t.save(),t.inline?(t.getBody().contentEditable="false",t===t.editorManager.focusedEditor&&(t.editorManager.focusedEditor=null)):(d_.hide(t.getContainer()),d_.setStyle(t.id,"display",t.orgDisplay)),t.hidden=!0,t.dispatch("hide"))}isHidden(){return this.hidden}setProgressState(t,o){this.dispatch("ProgressState",{state:t,time:o})}load(t={}){const o=this,s=o.getElement();if(o.removed)return"";if(s){const a={...t,load:!0},c=Qf(s)?s.value:s.innerHTML,d=o.setContent(c,a);return a.no_events||o.dispatch("LoadContent",{...a,element:s}),d}else return""}save(t={}){const o=this;let s=o.getElement();if(!s||!o.initialized||o.removed)return"";const a={...t,save:!0,element:s};let c=o.getContent(a);const d={...a,content:c};if(d.no_events||o.dispatch("SaveContent",d),d.format==="raw"&&o.dispatch("RawSaveContent",d),c=d.content,Qf(s))s.value=c;else{(t.is_removing||!o.inline)&&(s.innerHTML=c);const h=d_.getParent(o.id,"form");h&&QY(h.elements,_=>_.name===o.id?(_.value=c,!1):!0)}return d.element=a.element=s=null,d.set_dirty!==!1&&o.setDirty(!1),c}setContent(t,o){return VE(this,t,o)}getContent(t){return EN(this,t)}insertContent(t,o){o&&(t=q$({content:t},o)),this.execCommand("mceInsertContent",!1,t)}resetContent(t){t===void 0?VE(this,this.startContent,{format:"raw"}):VE(this,t),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()}isDirty(){return!this.isNotDirty}setDirty(t){const o=!this.isNotDirty;this.isNotDirty=!t,t&&t!==o&&this.dispatch("dirty")}getContainer(){const t=this;return t.container||(t.container=t.editorContainer||d_.get(t.id+"_parent")),t.container}getContentAreaContainer(){return this.contentAreaContainer}getElement(){return this.targetElm||(this.targetElm=d_.get(this.id)),this.targetElm}getWin(){const t=this;if(!t.contentWindow){const o=t.iframeElement;o&&(t.contentWindow=o.contentWindow)}return t.contentWindow}getDoc(){const t=this;if(!t.contentDocument){const o=t.getWin();o&&(t.contentDocument=o.document)}return t.contentDocument}getBody(){var t,o;const s=this.getDoc();return(o=(t=this.bodyElement)!==null&&t!==void 0?t:s==null?void 0:s.body)!==null&&o!==void 0?o:null}convertURL(t,o,s){const a=this,c=a.options.get,d=oM(a);if(Gt(d))return d.call(a,t,s,!0,o);if(!c("convert_urls")||s==="link"||ue(s)&&s.nodeName==="LINK"||t.indexOf("file:")===0||t.length===0)return t;const h=new Qd(t);return h.protocol!=="http"&&h.protocol!=="https"&&h.protocol!==""?t:c("relative_urls")?a.documentBaseURI.toRelative(t):(t=a.documentBaseURI.toAbsolute(t,c("remove_script_host")),t)}addVisual(t){PG(this,t)}setEditableRoot(t){wG(this,t)}hasEditableRoot(){return kG(this)}remove(){MN(this)}destroy(t){IP(this,t)}uploadImages(){return this.editorUpload.uploadImages()}_scanForImages(){return this.editorUpload.scanForImages()}}const gk=Ts.DOM,a5=zt.each;let K$=!1,i5,hd=[];const l5=e=>{const t=e.type;a5(C1.get(),o=>{switch(t){case"scroll":o.dispatch("ScrollWindow",e);break;case"resize":o.dispatch("ResizeWindow",e);break}})},G$=e=>{if(e!==K$){const t=Ts.DOM;e?(t.bind(window,"resize",l5),t.bind(window,"scroll",l5)):(t.unbind(window,"resize",l5),t.unbind(window,"scroll",l5)),K$=e}},Y$=e=>{const t=hd;return hd=rt(hd,o=>e!==o),C1.activeEditor===e&&(C1.activeEditor=hd.length>0?hd[0]:null),C1.focusedEditor===e&&(C1.focusedEditor=null),t.length!==hd.length},eX=e=>{e&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(Y$(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0)},tX=document.compatMode!=="CSS1Compat",C1={...GI,baseURI:null,baseURL:null,defaultOptions:{},documentBaseURL:null,suffix:null,majorVersion:"7",minorVersion:"3.0",releaseDate:"2024-08-07",i18n:Mc,activeEditor:null,focusedEditor:null,setup(){const e=this;let t="",o="",s=Qd.getDocumentBaseUrl(document.location);/^[^:]+:\/\/\/?[^\/]+\//.test(s)&&(s=s.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(s)||(s+="/"));const a=window.tinymce||window.tinyMCEPreInit;if(a)t=a.base||a.baseURL,o=a.suffix;else{const c=document.getElementsByTagName("script");for(let d=0;d{Hi.PluginManager.urls[c]=a})},init(e){const t=this;let o;const s=zt.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"," "),a=(I,$)=>I.inline&&$.tagName.toLowerCase()in s,c=I=>{let $=I.id;return $||($=Gn(I,"name").filter(V=>!gk.get(V)).getOrThunk(gk.uniqueId),I.setAttribute("id",$)),$},d=I=>{const $=e[I];if($)return $.apply(t,[])},h=I=>Jo.browser.isIE()||Jo.browser.isEdge()?(H0("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"),[]):tX?(H0("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[]):ft(I.selector)?gk.select(I.selector):Fe(I.target)?[I.target]:[];let _=I=>{o=I};const z=()=>{let I=0;const $=[];let V;const ee=(le,oe,fe)=>{const ke=new r5(le,oe,t);$.push(ke),ke.on("init",()=>{++I===V.length&&_($)}),ke.targetElm=ke.targetElm||fe,ke.render()};gk.unbind(window,"ready",z),d("onpageload"),V=yi(h(e)),zt.each(V,le=>{eX(t.get(le.id))}),V=zt.grep(V,le=>!t.get(le.id)),V.length===0?_([]):a5(V,le=>{a(e,le)?H0("Could not initialize inline editor on invalid inline target element",le):ee(c(le),e,le)})};return gk.bind(window,"ready",z),new Promise(I=>{o?I(o):_=$=>{I($)}})},get(e){return arguments.length===0?hd.slice(0):ft(e)?On(hd,t=>t.id===e).getOr(null):D(e)&&hd[e]?hd[e]:null},add(e){const t=this,o=t.get(e.id);return o===e||(o===null&&hd.push(e),G$(!0),t.activeEditor=e,t.dispatch("AddEditor",{editor:e}),i5||(i5=s=>{const a=t.dispatch("BeforeUnload");if(a.returnValue)return s.preventDefault(),s.returnValue=a.returnValue,a.returnValue},window.addEventListener("beforeunload",i5))),e},createEditor(e,t){return this.add(new r5(e,t,this))},remove(e){const t=this;let o;if(!e){for(let s=hd.length-1;s>=0;s--)t.remove(hd[s]);return}if(ft(e)){a5(gk.select(e),s=>{o=t.get(s.id),o&&t.remove(o)});return}return o=e,ot(t.get(o.id))?null:(Y$(o)&&t.dispatch("RemoveEditor",{editor:o}),hd.length===0&&window.removeEventListener("beforeunload",i5),o.remove(),G$(hd.length>0),o)},execCommand(e,t,o){var s;const a=this,c=ue(o)?(s=o.id)!==null&&s!==void 0?s:o.index:o;switch(e){case"mceAddEditor":{if(!a.get(c)){const d=o.options;new r5(c,d,a).render()}return!0}case"mceRemoveEditor":{const d=a.get(c);return d&&d.remove(),!0}case"mceToggleEditor":{const d=a.get(c);return d?(d.isHidden()?d.show():d.hide(),!0):(a.execCommand("mceAddEditor",!1,o),!0)}}return a.activeEditor?a.activeEditor.execCommand(e,t,o):!1},triggerSave:()=>{a5(hd,e=>{e.save()})},addI18n:(e,t)=>{Mc.add(e,t)},translate:e=>Mc.translate(e),setActive(e){const t=this.activeEditor;this.activeEditor!==e&&(t&&t.dispatch("deactivate",{relatedTarget:e}),e.dispatch("activate",{relatedTarget:t})),this.activeEditor=e},_setBaseUrl(e){this.baseURL=new Qd(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new Qd(this.baseURL)}};C1.setup();const oX=(()=>{const e=Jr(),t=c=>({items:c,types:vt(c),getType:d=>Gn(c,d).getOrUndefined()}),o=c=>{e.set(c)},s=()=>e.get().getOrUndefined(),a=e.clear;return{FakeClipboardItem:t,write:o,read:s,clear:a}})(),X$=Math.min,hk=Math.max,c5=Math.round,J$=(e,t,o)=>{let s=t.x,a=t.y;const c=e.w,d=e.h,h=t.w,_=t.h,z=(o||"").split("");return z[0]==="b"&&(a+=_),z[1]==="r"&&(s+=h),z[0]==="c"&&(a+=c5(_/2)),z[1]==="c"&&(s+=c5(h/2)),z[3]==="b"&&(a-=d),z[4]==="r"&&(s-=c),z[3]==="c"&&(a-=c5(d/2)),z[4]==="c"&&(s-=c5(c/2)),bk(s,a,c,d)},nX=(e,t,o,s)=>{for(let a=0;a=o.x&&c.x+c.w<=o.w+o.x&&c.y>=o.y&&c.y+c.h<=o.h+o.y)return s[a]}return null},sX=(e,t,o)=>bk(e.x-t,e.y-o,e.w+t*2,e.h+o*2),rX=(e,t)=>{const o=hk(e.x,t.x),s=hk(e.y,t.y),a=X$(e.x+e.w,t.x+t.w),c=X$(e.y+e.h,t.y+t.h);return a-o<0||c-s<0?null:bk(o,s,a-o,c-s)},aX=(e,t,o)=>{let s=e.x,a=e.y,c=e.x+e.w,d=e.y+e.h;const h=t.x+t.w,_=t.y+t.h,z=hk(0,t.x-s),I=hk(0,t.y-a),$=hk(0,c-h),V=hk(0,d-_);return s+=z,a+=I,o&&(c+=z,d+=I,s-=$,a-=V),c-=$,d-=V,bk(s,a,c-s,d-a)},bk=(e,t,o,s)=>({x:e,y:t,w:o,h:s}),iX={inflate:sX,relativePosition:J$,findBestRelativePosition:nX,intersect:rX,clamp:aX,create:bk,fromClientRect:e=>bk(e.left,e.top,e.width,e.height)},lX=(e,t,o=1e3)=>{let s=!1,a=null;const c=z=>(...I)=>{s||(s=!0,a!==null&&(clearTimeout(a),a=null),z.apply(null,I))},d=c(e),h=c(t);return{start:(...z)=>{!s&&a===null&&(a=setTimeout(()=>h.apply(null,z),o))},resolve:d,reject:h}},cX=(()=>{const e={},t={},o={};return{load:(_,z)=>{const I=`Script at URL "${z}" failed to load`,$=`Script at URL "${z}" did not call \`tinymce.Resource.add('${_}', data)\` within 1 second`;if(e[_]!==void 0)return e[_];{const V=new Promise((ee,le)=>{const oe=lX(ee,le);t[_]=oe.resolve,tl.ScriptLoader.loadScript(z).then(()=>oe.start($),()=>oe.reject(I))});return e[_]=V,V}},add:(_,z)=>{t[_]!==void 0&&(t[_](z),delete t[_]),e[_]=Promise.resolve(z),o[_]=z},has:_=>_ in o,get:_=>o[_],unload:_=>{delete e[_],delete o[_]}}})(),dX=()=>(()=>{let e={},t=[];const o={getItem:s=>{const a=e[s];return a||null},setItem:(s,a)=>{t.push(s),e[s]=String(a)},key:s=>t[s],removeItem:s=>{t=t.filter(a=>a===s),delete e[s]},clear:()=>{t=[],e={}},length:0};return Object.defineProperty(o,"length",{get:()=>t.length,configurable:!1,enumerable:!1}),o})();let o4;try{const e="__storage_test__";o4=window.localStorage,o4.setItem(e,e),o4.removeItem(e)}catch{o4=dX()}var uX=o4;const fX={geom:{Rect:iX},util:{Delay:Vc,Tools:zt,VK:Zt,URI:Qd,EventDispatcher:KI,Observable:GI,I18n:Mc,LocalStorage:uX,ImageUploader:YP},dom:{EventUtils:af,TreeWalker:Ma,TextSeeker:Eu,DOMUtils:Ts,ScriptLoader:tl,RangeUtils:Rg,Serializer:SN,StyleSheetLoader:wu,ControlSelection:ps,BookmarkManager:ws,Selection:$E,Event:af.Event},html:{Styles:Z1,Entities:up,Node:gi,Schema:Rc,DomParser:a1,Writer:gC,Serializer:Lp},Env:Jo,AddOnManager:Hi,Annotator:$A,Formatter:U0,UndoManager:sD,EditorCommands:P$,WindowManager:HN,NotificationManager:GE,EditorObservable:H$,Shortcuts:W$,Editor:r5,FocusManager:qd,EditorManager:C1,DOM:Ts.DOM,ScriptLoader:tl.ScriptLoader,PluginManager:Ab,ThemeManager:Jg,ModelManager:Xg,IconManager:F0,Resource:cX,FakeClipboard:oX,trim:zt.trim,isArray:zt.isArray,is:zt.is,toArray:zt.toArray,makeMap:zt.makeMap,each:zt.each,map:zt.map,grep:zt.grep,inArray:zt.inArray,extend:zt.extend,walk:zt.walk,resolve:zt.resolve,explode:zt.explode,_addCacheSuffix:zt._addCacheSuffix},Q$=zt.extend(C1,fX),mX=e=>{try{w.exports=e}catch{}};(e=>{window.tinymce=e,window.tinyMCE=e})(Q$),mX(Q$)})()})(T9);var Zne=T9.exports;const L7=Une(Zne);tinymce.IconManager.add("default",{icons:{"accessibility-check":'',"accordion-toggle":'',accordion:'',"action-next":'',"action-prev":'',addtag:'',"ai-prompt":'',ai:'',"align-center":'',"align-justify":'',"align-left":'',"align-none":'',"align-right":'',"arrow-left":'',"arrow-right":'',bold:'',bookmark:'',"border-style":'',"border-width":'',brightness:'',browse:'',cancel:'',"cell-background-color":'',"cell-border-color":'',"change-case":'',"character-count":'',"checklist-rtl":'',checklist:'',checkmark:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',close:'',"code-sample":'',"color-levels":'',"color-picker":'',"color-swatch-remove-color":'',"color-swatch":'',"comment-add":'',comment:'',contrast:'',copy:'',crop:'',"cut-column":'',"cut-row":'',cut:'',"document-properties":'',drag:'',"duplicate-column":'',"duplicate-row":'',duplicate:'',"edit-block":'',"edit-image":'',"embed-page":'',embed:'',emoji:'',export:'',fill:'',"flip-horizontally":'',"flip-vertically":'',footnote:'',"format-code":'',"format-painter":'',format:'',fullscreen:'',gallery:'',gamma:'',help:'',"highlight-bg-color":'',home:'',"horizontal-rule":'',"image-options":'',image:'',indent:'',info:'',"insert-character":'',"insert-time":'',invert:'',italic:'',language:'',"line-height":'',line:'',link:'',"list-bull-circle":'',"list-bull-default":'',"list-bull-square":'',"list-num-default-rtl":'',"list-num-default":'',"list-num-lower-alpha-rtl":'',"list-num-lower-alpha":'',"list-num-lower-greek-rtl":'',"list-num-lower-greek":'',"list-num-lower-roman-rtl":'',"list-num-lower-roman":'',"list-num-upper-alpha-rtl":'',"list-num-upper-alpha":'',"list-num-upper-roman-rtl":'',"list-num-upper-roman":'',lock:'',ltr:'',"math-equation":'',minus:'',"more-drawer":'',"new-document":'',"new-tab":'',"non-breaking":'',notice:'',"ordered-list-rtl":'',"ordered-list":'',orientation:'',outdent:'',"export-pdf":'',"export-word":'',"import-word":'',"page-break":'',paragraph:'',"paste-column-after":'',"paste-column-before":'',"paste-row-after":'',"paste-row-before":'',"paste-text":'',paste:'',"permanent-pen":'',plus:'',preferences:'',preview:'',print:'',quote:'',redo:'',reload:'',"remove-formatting":'',remove:'',"resize-handle":'',resize:'',"restore-draft":'',"revision-history":'',"rotate-left":'',"rotate-right":'',rtl:'',save:'',search:'',"select-all":'',selected:'',send:'',settings:'',sharpen:'',sourcecode:'',"spell-check":'',"strike-through":'',subscript:'',superscript:'',"table-caption":'',"table-cell-classes":'',"table-cell-properties":'',"table-cell-select-all":'',"table-cell-select-inner":'',"table-classes":'',"table-delete-column":'',"table-delete-row":'',"table-delete-table":'',"table-insert-column-after":'',"table-insert-column-before":'',"table-insert-row-above":'',"table-insert-row-after":'',"table-left-header":'',"table-merge-cells":'',"table-row-numbering-rtl":'',"table-row-numbering":'',"table-row-properties":'',"table-split-cells":'',"table-top-header":'',table:'',"template-add":'',template:'',"temporary-placeholder":'',"text-color":'',"text-size-decrease":'',"text-size-increase":'',toc:'',translate:'',typography:'',underline:'',undo:'',unlink:'',unlock:'',"unordered-list":'',unselected:'',upload:'',user:'',"vertical-align":'',visualblocks:'',visualchars:'',warning:'',"zoom-in":'',"zoom-out":''}});(function(){const w=Object.getPrototypeOf,g=(n,r,i)=>{var l;return!!i(n,r.prototype)||((l=n.constructor)===null||l===void 0?void 0:l.name)===r.name},S=n=>r=>(i=>{const l=typeof i;return i===null?"null":l==="object"&&Array.isArray(i)?"array":l==="object"&&g(i,String,(u,f)=>f.isPrototypeOf(u))?"string":l})(r)===n,B=n=>r=>typeof r===n,W=n=>r=>n===r,te=S("string"),ce=S("object"),Ee=n=>((r,i)=>ce(r)&&g(r,i,(l,u)=>w(l)===u))(n,Object),$e=S("array"),We=W(null),Me=B("boolean"),Ot=W(void 0),mo=n=>n==null,st=n=>!mo(n),ut=B("function"),Bt=B("number"),Rt=(n,r)=>{if($e(n)){for(let i=0,l=n.length;i{},Ut=n=>()=>n(),ft=(n,r)=>(...i)=>n(r.apply(null,i)),ue=n=>()=>n,Ct=n=>n,ve=(n,r)=>n===r;function ot(n,...r){return(...i)=>{const l=r.concat(i);return n.apply(null,l)}}const bn=n=>r=>!n(r),ln=n=>()=>{throw new Error(n)},uo=n=>n(),Fe=ue(!1),Gt=ue(!0);class D{constructor(r,i){this.tag=r,this.value=i}static some(r){return new D(!0,r)}static none(){return D.singletonNone}fold(r,i){return this.tag?i(this.value):r()}isSome(){return this.tag}isNone(){return!this.tag}map(r){return this.tag?D.some(r(this.value)):D.none()}bind(r){return this.tag?r(this.value):D.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:D.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??"Called getOrDie on None")}static from(r){return st(r)?D.some(r):D.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(${this.value})`:"none()"}}D.singletonNone=new D(!1);const bt=Array.prototype.slice,dt=Array.prototype.indexOf,Kt=Array.prototype.push,qo=(n,r)=>dt.call(n,r),Ge=(n,r)=>qo(n,r)>-1,To=(n,r)=>{for(let i=0,l=n.length;i{const i=[];for(let l=0;l{const i=[];for(let l=0;l{const i=n.length,l=new Array(i);for(let u=0;u{for(let i=0,l=n.length;i{const i=[],l=[];for(let u=0,f=n.length;u{const i=[];for(let l=0,u=n.length;l(((l,u)=>{for(let f=l.length-1;f>=0;f--)u(l[f],f)})(n,(l,u)=>{i=r(i,l,u)}),i),zo=(n,r,i)=>(Ht(n,(l,u)=>{i=r(i,l,u)}),i),j=(n,r)=>((i,l,u)=>{for(let f=0,p=i.length;f{for(let i=0,l=n.length;i{const r=[];for(let i=0,l=n.length;iCs(pt(n,r)),bi=(n,r)=>{for(let i=0,l=n.length;i{const r=bt.call(n,0);return r.reverse(),r},mn=(n,r)=>cn(n,i=>!Ge(r,i)),Bn=(n,r)=>{const i={};for(let l=0,u=n.length;l[n],Le=(n,r)=>{const i=bt.call(n,0);return i.sort(r),i},Lt=(n,r)=>r>=0&&rLt(n,0),rt=n=>Lt(n,n.length-1),ao=ut(Array.from)?Array.from:n=>bt.call(n),ko=(n,r)=>{for(let i=0;i{const i=tn(n);for(let l=0,u=i.length;lLn(n,(i,l)=>({k:l,v:r(i,l)})),Ln=(n,r)=>{const i={};return rs(n,(l,u)=>{const f=r(l,u);i[f.k]=f.v}),i},Hs=n=>(r,i)=>{n[i]=r},sa=(n,r,i,l)=>{rs(n,(u,f)=>{(r(u,f)?i:l)(u,f)})},os=(n,r)=>{const i={};return sa(n,r,Hs(i),Ke),i},Is=(n,r)=>{const i=[];return rs(n,(l,u)=>{i.push(r(l,u))}),i},yn=(n,r)=>{const i=tn(n);for(let l=0,u=i.length;lIs(n,Ct),St=(n,r)=>Vo(n,r)?D.from(n[r]):D.none(),Vo=(n,r)=>On.call(n,r),an=(n,r)=>Vo(n,r)&&n[r]!==void 0&&n[r]!==null,Kr=(n,r,i=ve)=>n.exists(l=>i(l,r)),yi=n=>{const r=[],i=l=>{r.push(l)};for(let l=0;ln.isSome()&&r.isSome()?D.some(i(n.getOrDie(),r.getOrDie())):D.none(),oi=(n,r)=>n!=null?D.some(r(n)):D.none(),nn=(n,r)=>n?D.some(r):D.none(),Mi=(n,r,i)=>r===""||n.length>=r.length&&n.substr(i,i+r.length)===r,as=(n,r)=>yl(n,r)?((i,l)=>i.substring(l))(n,r.length):n,hr=(n,r,i=0,l)=>{const u=n.indexOf(r,i);return u!==-1&&(!!Ot(l)||u+r.length<=l)},yl=(n,r)=>Mi(n,r,0),cl=(n,r)=>Mi(n,r,n.length-r.length),Bi=(Gc=/^\s+|\s+$/g,n=>n.replace(Gc,"")),vi=n=>n.length>0,vl=n=>!vi(n),Gn=n=>n.style!==void 0&&ut(n.style.getPropertyValue),Ro=n=>{if(n==null)throw new Error("Node cannot be null or undefined");return{dom:n}},$a=(n,r)=>{const i=document.createElement("div");if(i.innerHTML=n,!i.hasChildNodes()||i.childNodes.length>1){const l="HTML does not have a single root node";throw console.error(l,n),new Error(l)}return Ro(i.childNodes[0])},$r=(n,r)=>{const i=document.createElement(n);return Ro(i)},bd=(n,r)=>{const i=document.createTextNode(n);return Ro(i)},Vt=Ro,Dr=typeof window<"u"?window:Function("return this;")(),au=(n,r)=>((i,l)=>{let u=l??Dr;for(let f=0;f{const r=au("ownerDocument.defaultView",n);return ce(n)&&((i=>((l,u)=>{const f=((p,y)=>au(p,y))(l,u);if(f==null)throw new Error(l+" not available on this browser");return f})("HTMLElement",i))(r).prototype.isPrototypeOf(n)||/^HTML\w*Element$/.test(zs(n).constructor.name))},ni=n=>n.dom.nodeName.toLowerCase(),Ki=n=>r=>(i=>i.dom.nodeType)(r)===n,_i=n=>ys(n)&&yd(n.dom),ys=Ki(1),ga=Ki(3),si=Ki(9),iu=Ki(11),gc=n=>r=>ys(r)&&ni(r)===n,xi=(n,r)=>{const i=n.dom;if(i.nodeType!==1)return!1;{const l=i;if(l.matches!==void 0)return l.matches(r);if(l.msMatchesSelector!==void 0)return l.msMatchesSelector(r);if(l.webkitMatchesSelector!==void 0)return l.webkitMatchesSelector(r);if(l.mozMatchesSelector!==void 0)return l.mozMatchesSelector(r);throw new Error("Browser lacks native selectors")}},lu=n=>n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11||n.childElementCount===0,Wc=(n,r)=>{const i=r===void 0?document:r.dom;return lu(i)?D.none():D.from(i.querySelector(n)).map(Vt)},Hn=(n,r)=>n.dom===r.dom,lr=(n,r)=>{const i=n.dom,l=r.dom;return i!==l&&i.contains(l)},ha=n=>Vt(n.dom.ownerDocument),Zu=n=>si(n)?n:ha(n),Gi=n=>Vt(Zu(n).dom.documentElement),vd=n=>Vt(Zu(n).dom.defaultView),Hr=n=>D.from(n.dom.parentNode).map(Vt),ba=n=>D.from(n.dom.parentElement).map(Vt),wi=n=>D.from(n.dom.offsetParent).map(Vt),Yn=n=>pt(n.dom.childNodes,Vt),vs=(n,r)=>{const i=n.dom.childNodes;return D.from(i[r]).map(Vt)},Yi=n=>vs(n,0),hc=(n,r)=>({element:n,offset:r}),br=(n,r)=>{const i=Yn(n);return i.length>0&&riu(n)&&st(n.dom.host),Vs=n=>Vt(n.dom.getRootNode()),Pn=n=>_l(n)?n:Vt(Zu(n).dom.body),ki=n=>{const r=Vs(n);return _l(r)?D.some(r):D.none()},Oa=n=>Vt(n.dom.host),Vr=n=>{const r=ga(n)?n.dom.parentNode:n.dom;if(r==null||r.ownerDocument===null)return!1;const i=r.ownerDocument;return ki(Vt(r)).fold(()=>i.body.contains(r),(l=Vr,u=Oa,f=>l(u(f))));var l,u},za=()=>Qs(Vt(document)),Qs=n=>{const r=n.dom.body;if(r==null)throw new Error("Body is not available yet");return Vt(r)},_d=(n,r,i)=>{if(!(te(i)||Me(i)||Bt(i)))throw console.error("Invalid call to Attribute.set. Key ",r,":: Value ",i,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(r,i+"")},wo=(n,r,i)=>{_d(n.dom,r,i)},xl=(n,r)=>{const i=n.dom;rs(r,(l,u)=>{_d(i,u,l)})},yr=(n,r)=>{const i=n.dom.getAttribute(r);return i===null?void 0:i},Fs=(n,r)=>D.from(yr(n,r)),qc=(n,r)=>{const i=n.dom;return!(!i||!i.hasAttribute)&&i.hasAttribute(r)},pn=(n,r)=>{n.dom.removeAttribute(r)},Vl=(n,r,i)=>{if(!te(i))throw console.error("Invalid call to CSS.set. Property ",r,":: Value ",i,":: Element ",n),new Error("CSS value must be a string: "+i);Gn(n)&&n.style.setProperty(r,i)},ya=(n,r)=>{Gn(n)&&n.style.removeProperty(r)},Mo=(n,r,i)=>{const l=n.dom;Vl(l,r,i)},Li=(n,r)=>{const i=n.dom;rs(r,(l,u)=>{Vl(i,u,l)})},ri=(n,r)=>{const i=n.dom;rs(r,(l,u)=>{l.fold(()=>{ya(i,u)},f=>{Vl(i,u,f)})})},Ns=(n,r)=>{const i=n.dom,l=window.getComputedStyle(i).getPropertyValue(r);return l!==""||Vr(n)?l:jl(i,r)},jl=(n,r)=>Gn(n)?n.style.getPropertyValue(r):"",er=(n,r)=>{const i=n.dom,l=jl(i,r);return D.from(l).filter(u=>u.length>0)},bc=n=>{const r={},i=n.dom;if(Gn(i))for(let l=0;l{const l=$r(n);return Mo(l,r,i),er(l,r).isSome()},Vn=(n,r)=>{const i=n.dom;ya(i,r),Kr(Fs(n,"style").map(Bi),"")&&pn(n,"style")},wl=n=>n.dom.offsetWidth,Kc=(n,r)=>{const i=u=>{const f=r(u);if(f<=0||f===null){const p=Ns(u,n);return parseFloat(p)||0}return f},l=(u,f)=>zo(f,(p,y)=>{const v=Ns(u,y),C=v===void 0?0:parseInt(v,10);return isNaN(C)?p:p+C},0);return{set:(u,f)=>{if(!Bt(f)&&!f.match(/^[0-9]+$/))throw new Error(n+".set accepts only positive integer values. Value was "+f);const p=u.dom;Gn(p)&&(p.style[n]=f+"px")},get:i,getOuter:i,aggregate:l,max:(u,f,p)=>{const y=l(u,p);return f>y?f-y:0}}},xd=Kc("height",n=>{const r=n.dom;return Vr(n)?r.getBoundingClientRect().height:r.offsetHeight}),Ds=n=>xd.get(n),Na=n=>xd.getOuter(n),Q=(n,r)=>({left:n,top:r,translate:(i,l)=>Q(n+i,r+l)}),pe=Q,Ae=(n,r)=>n!==void 0?n:r!==void 0?r:0,Ye=n=>{const r=n.dom.ownerDocument,i=r.body,l=r.defaultView,u=r.documentElement;if(i===n.dom)return pe(i.offsetLeft,i.offsetTop);const f=Ae(l==null?void 0:l.pageYOffset,u.scrollTop),p=Ae(l==null?void 0:l.pageXOffset,u.scrollLeft),y=Ae(u.clientTop,i.clientTop),v=Ae(u.clientLeft,i.clientLeft);return _t(n).translate(p-v,f-y)},_t=n=>{const r=n.dom,i=r.ownerDocument.body;return i===r?pe(i.offsetLeft,i.offsetTop):Vr(n)?(l=>{const u=l.getBoundingClientRect();return pe(u.left,u.top)})(r):pe(0,0)},oo=Kc("width",n=>n.dom.offsetWidth),Go=n=>oo.get(n),Xn=n=>oo.getOuter(n),sn=n=>{let r,i=!1;return(...l)=>(i||(i=!0,r=n.apply(null,l)),r)},is=()=>tr(0,0),tr=(n,r)=>({major:n,minor:r}),Jo={nu:tr,detect:(n,r)=>{const i=String(r).toLowerCase();return n.length===0?is():((l,u)=>{const f=((y,v)=>{for(let C=0;CNumber(u.replace(f,"$"+y));return tr(p(1),p(2))})(n,i)},unknown:is},dl=(n,r)=>{const i=String(r).toLowerCase();return j(n,l=>l.search(i))},Ul=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,yc=n=>r=>hr(r,n),Qm=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:n=>hr(n,"edge/")&&hr(n,"chrome")&&hr(n,"safari")&&hr(n,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ul],search:n=>hr(n,"chrome")&&!hr(n,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:n=>hr(n,"msie")||hr(n,"trident")},{name:"Opera",versionRegexes:[Ul,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:yc("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:yc("firefox")},{name:"Safari",versionRegexes:[Ul,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:n=>(hr(n,"safari")||hr(n,"mobile/"))&&hr(n,"applewebkit")}],lh=[{name:"Windows",search:yc("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:n=>hr(n,"iphone")||hr(n,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:yc("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:yc("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:yc("linux"),versionRegexes:[]},{name:"Solaris",search:yc("sunos"),versionRegexes:[]},{name:"FreeBSD",search:yc("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:yc("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Pi={browsers:ue(Qm),oses:ue(lh)},ep="Edge",ch="Chromium",$f="Opera",tg="Firefox",zt="Safari",wd=n=>{const r=n.current,i=n.version,l=u=>()=>r===u;return{current:r,version:i,isEdge:l(ep),isChromium:l(ch),isIE:l("IE"),isOpera:l($f),isFirefox:l(tg),isSafari:l(zt)}},kd=()=>wd({current:void 0,version:Jo.unknown()}),Hf=wd,va="Windows",Cd="Android",cu="Linux",dh="macOS",og="Solaris",ng="FreeBSD",Zb="ChromeOS",uh=n=>{const r=n.current,i=n.version,l=u=>()=>r===u;return{current:r,version:i,isWindows:l(va),isiOS:l("iOS"),isAndroid:l(Cd),isMacOS:l(dh),isLinux:l(cu),isSolaris:l(og),isFreeBSD:l(ng),isChromeOS:l(Zb)}},Wb=()=>uh({current:void 0,version:Jo.unknown()}),Vf=uh,Zl=n=>window.matchMedia(n).matches;var Gc;let Wl=sn(()=>((n,r,i)=>{const l=Pi.browsers(),u=Pi.oses(),f=r.bind(v=>((C,O)=>ko(O.brands,T=>{const R=T.brand.toLowerCase();return j(C,F=>{var H;return R===((H=F.brand)===null||H===void 0?void 0:H.toLowerCase())}).map(F=>({current:F.name,version:Jo.nu(parseInt(T.version,10),0)}))}))(l,v)).orThunk(()=>((v,C)=>dl(v,C).map(O=>{const T=Jo.detect(O.versionRegexes,C);return{current:O.name,version:T}}))(l,n)).fold(kd,Hf),p=((v,C)=>dl(v,C).map(O=>{const T=Jo.detect(O.versionRegexes,C);return{current:O.name,version:T}}))(u,n).fold(Wb,Vf),y=((v,C,O,T)=>{const R=v.isiOS()&&/ipad/i.test(O)===!0,F=v.isiOS()&&!R,H=v.isiOS()||v.isAndroid(),G=H||T("(pointer:coarse)"),J=R||!F&&H&&T("(min-device-width:768px)"),ae=F||H&&!J,X=C.isSafari()&&v.isiOS()&&/safari/i.test(O)===!1,Y=!ae&&!J&&!X;return{isiPad:ue(R),isiPhone:ue(F),isTablet:ue(J),isPhone:ue(ae),isTouch:ue(G),isAndroid:v.isAndroid,isiOS:v.isiOS,isWebView:ue(X),isDesktop:ue(Y)}})(p,f,n,i);return{browser:f,os:p,deviceType:y}})(window.navigator.userAgent,D.from(window.navigator.userAgentData),Zl));const Yr=()=>Wl(),Ci=n=>{const r=Vt((f=>{if(st(f.target)){const p=Vt(f.target);if(ys(p)&&(y=>st(y.dom.shadowRoot))(p)&&f.composed&&f.composedPath){const y=f.composedPath();if(y)return yt(y)}}return D.from(f.target)})(n).getOr(n.target)),i=()=>n.stopPropagation(),l=()=>n.preventDefault(),u=ft(l,i);return((f,p,y,v,C,O,T)=>({target:f,x:p,y,stop:v,prevent:C,kill:O,raw:T}))(r,n.clientX,n.clientY,i,l,u,n)},Sd=(n,r,i,l,u)=>{const f=((p,y)=>v=>{p(v)&&y(Ci(v))})(i,l);return n.dom.addEventListener(r,f,u),{unbind:ot(En,n,r,f,u)}},En=(n,r,i,l)=>{n.dom.removeEventListener(r,i,l)},kl=(n,r)=>{Hr(n).each(i=>{i.dom.insertBefore(r.dom,n.dom)})},Wu=(n,r)=>{(l=>D.from(l.dom.nextSibling).map(Vt))(n).fold(()=>{Hr(n).each(l=>{ai(l,r)})},l=>{kl(l,r)})},qu=(n,r)=>{Yi(n).fold(()=>{ai(n,r)},i=>{n.dom.insertBefore(r.dom,i.dom)})},ai=(n,r)=>{n.dom.appendChild(r.dom)},cr=(n,r)=>{Ht(r,i=>{ai(n,i)})},Rs=n=>{n.dom.textContent="",Ht(Yn(n),r=>{aa(r)})},aa=n=>{const r=n.dom;r.parentNode!==null&&r.parentNode.removeChild(r)},_s=n=>{const r=n!==void 0?n.dom:document,i=r.body.scrollLeft||r.documentElement.scrollLeft,l=r.body.scrollTop||r.documentElement.scrollTop;return pe(i,l)},Ed=(n,r,i)=>{const l=(i!==void 0?i.dom:document).defaultView;l&&l.scrollTo(n,r)},Td=(n,r,i,l)=>({x:n,y:r,width:i,height:l,right:n+i,bottom:r+l}),Rr=n=>{const r=n===void 0?window:n,i=r.document,l=_s(Vt(i));return(u=>{const f=u===void 0?window:u;return Yr().browser.isFirefox()?D.none():D.from(f.visualViewport)})(r).fold(()=>{const u=r.document.documentElement,f=u.clientWidth,p=u.clientHeight;return Td(l.left,l.top,f,p)},u=>Td(Math.max(u.pageLeft,l.left),Math.max(u.pageTop,l.top),u.width,u.height))},Ha=()=>Vt(document),Da=(n,r)=>n.view(r).fold(ue([]),i=>{const l=n.owner(i),u=Da(n,l);return[i].concat(u)});var Sr=Object.freeze({__proto__:null,view:n=>{var r;return(n.dom===document?D.none():D.from((r=n.dom.defaultView)===null||r===void 0?void 0:r.frameElement)).map(Vt)},owner:n=>ha(n)});const Yc=n=>{const r=Ha(),i=_s(r);return((u,f)=>{const p=f.owner(u),y=Da(f,p);return D.some(y)})(n,Sr).fold(ot(Ye,n),u=>{const f=_t(n),p=fn(u,(y,v)=>{const C=_t(v);return{left:y.left+C.left,top:y.top+C.top}},{left:0,top:0});return pe(p.left+f.left+i.left,p.top+f.top+i.top)})},rn=(n,r,i,l)=>({x:n,y:r,width:i,height:l,right:n+i,bottom:r+l}),vr=n=>{const r=Ye(n),i=Xn(n),l=Na(n);return rn(r.left,r.top,i,l)},Va=n=>{const r=Yc(n),i=Xn(n),l=Na(n);return rn(r.left,r.top,i,l)},ql=(n,r)=>{const i=Math.max(n.x,r.x),l=Math.max(n.y,r.y),u=Math.min(n.right,r.right),f=Math.min(n.bottom,r.bottom);return rn(i,l,u-i,f-l)},jr=()=>Rr(window),so=n=>{let r=n;return{get:()=>r,set:i=>{r=i}}},Cl=n=>{const r=so(D.none()),i=()=>r.get().each(n);return{clear:()=>{i(),r.set(D.none())},isSet:()=>r.get().isSome(),get:()=>r.get(),set:l=>{i(),r.set(D.some(l))}}},Sl=()=>Cl(n=>n.unbind()),Nn=()=>{const n=Cl(Ke);return{...n,on:r=>n.get().each(r)}};var du=tinymce.util.Tools.resolve("tinymce.ThemeManager");const tp=n=>{const r=f=>f(n),i=ue(n),l=()=>u,u={tag:!0,inner:n,fold:(f,p)=>p(n),isValue:Gt,isError:Fe,map:f=>un.value(f(n)),mapError:l,bind:r,exists:r,forall:r,getOr:i,or:l,getOrThunk:i,orThunk:l,getOrDie:i,each:f=>{f(n)},toOptional:()=>D.some(n)};return u},Kl=n=>{const r=()=>i,i={tag:!1,inner:n,fold:(l,u)=>l(n),isValue:Fe,isError:Gt,map:r,mapError:l=>un.error(l(n)),bind:r,exists:Fe,forall:Gt,getOr:Ct,or:Ct,getOrThunk:uo,orThunk:uo,getOrDie:ln(String(n)),each:Ke,toOptional:D.none};return i},un={value:tp,error:Kl,fromOption:(n,r)=>n.fold(()=>Kl(r),tp)};var Ra;(function(n){n[n.Error=0]="Error",n[n.Value=1]="Value"})(Ra||(Ra={}));const Ku=(n,r,i)=>n.stype===Ra.Error?r(n.serror):i(n.svalue),vc=n=>({stype:Ra.Value,svalue:n}),jf=n=>({stype:Ra.Error,serror:n}),El=vc,ja=jf,Gl=Ku,Ad=(n,r,i,l)=>({tag:"field",key:n,newKey:r,presence:i,prop:l}),ye=(n,r,i)=>{switch(n.tag){case"field":return r(n.key,n.newKey,n.presence,n.prop);case"custom":return i(n.newKey,n.instantiator)}},uu=n=>(...r)=>{if(r.length===0)throw new Error("Can't merge zero objects");const i={};for(let l=0;lEe(n)&&Ee(r)?ls(n,r):r),op=uu((n,r)=>r),Gu=n=>({tag:"defaultedThunk",process:n}),ul=n=>Gu(ue(n)),kn=n=>({tag:"mergeWithThunk",process:n}),_a=n=>{const r=(l=>{const u=[],f=[];return Ht(l,p=>{Ku(p,y=>f.push(y),y=>u.push(y))}),{values:u,errors:f}})(n);return r.errors.length>0?(i=r.errors,ft(ja,Cs)(i)):El(r.values);var i},Xi=n=>ce(n)&&tn(n).length>100?" removed due to size":JSON.stringify(n,null,2),fl=(n,r)=>ja([{path:n,getErrorInfo:r}]),Yl=n=>({extract:(r,i)=>((l,u)=>l.stype===Ra.Error?u(l.serror):l)(n(i),l=>((u,f)=>fl(u,ue(f)))(r,l)),toString:ue("val")}),_c=Yl(El),ia=(n,r,i,l)=>l(St(n,r).getOrThunk(()=>i(n))),Od=(n,r,i,l,u)=>{const f=y=>u.extract(r.concat([l]),y),p=y=>y.fold(()=>El(D.none()),v=>((C,O)=>C.stype===Ra.Value?{stype:Ra.Value,svalue:O(C.svalue)}:C)(u.extract(r.concat([l]),v),D.some));switch(n.tag){case"required":return((y,v,C,O)=>St(v,C).fold(()=>((T,R,F)=>fl(T,()=>'Could not find valid *required* value for "'+R+'" in '+Xi(F)))(y,C,v),O))(r,i,l,f);case"defaultedThunk":return ia(i,l,n.process,f);case"option":return((y,v,C)=>C(St(y,v)))(i,l,p);case"defaultedOptionThunk":return((y,v,C,O)=>O(St(y,v).map(T=>T===!0?C(y):T)))(i,l,n.process,p);case"mergeWithThunk":return ia(i,l,ue({}),y=>{const v=ls(n.process(i),y);return f(v)})}},Yu=n=>({extract:(r,i)=>n().extract(r,i),toString:()=>n().toString()}),Uf=n=>tn(os(n,st)),Ur=n=>{const r=ho(n),i=fn(n,(l,u)=>ye(u,f=>ls(l,{[f]:!0}),ue(l)),{});return{extract:(l,u)=>{const f=Me(u)?[]:Uf(u),p=cn(f,y=>!an(i,y));return p.length===0?r.extract(l,u):((y,v)=>fl(y,()=>"There are unsupported fields: ["+v.join(", ")+"] specified"))(l,p)},toString:r.toString}},ho=n=>({extract:(r,i)=>((l,u,f)=>{const p={},y=[];for(const v of f)ye(v,(C,O,T,R)=>{const F=Od(T,l,u,C,R);Gl(F,H=>{y.push(...H)},H=>{p[O]=H})},(C,O)=>{p[C]=O(u)});return y.length>0?ja(y):El(p)})(r,i,n),toString:()=>`obj{ +`))}};return e=OF(e,[//g]),h(o.parse(e)),s},zF=e=>(e=OF(e,[/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/ig,/|/g,[/( ?)\u00a0<\/span>( ?)/g,(o,s,a)=>!s&&!a?" ":da],/
    /g,/
    $/i]),e),uW=e=>{let t=0;return()=>e+t++},fW=e=>{const t=e.toLowerCase(),o={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"};return zt.hasOwn(o,t)?"image/"+o[t]:"image/"+t},mW=(e,t)=>{const o=r1({sanitize:$T(e),sandbox_iframes:p2(e),sandbox_iframes_exclusions:U_(e),convert_unsafe_embeds:WT(e)},e.schema);o.addNodeFilter("meta",a=>{zt.each(a,c=>{c.remove()})});const s=o.parse(t,{forced_root_block:!1,isRootContent:!0});return Lp({validate:!0},e.schema).serialize(s)},NF=(e,t)=>({content:e,cancelled:t}),pW=(e,t,o)=>{const s=e.dom.create("div",{style:"display:none"},t),a=px(e,s,o);return NF(a.node.innerHTML,a.isDefaultPrevented())},gW=(e,t,o)=>{const s=Z0(e,t,o),a=mW(e,s.content);return e.hasEventListeners("PastePostProcess")&&!s.isDefaultPrevented()?pW(e,a,o):NF(a,s.isDefaultPrevented())},hW=(e,t,o)=>gW(e,t,o),zI=(e,t)=>(e.insertContent(t,{merge:rM(e),paste:!0}),!0),NI=e=>/^https?:\/\/[\w\-\/+=.,!;:&%@^~(){}?#]+$/i.test(e),bW=(e,t)=>NI(t)&&Ln(m2(e),o=>Gi(t.toLowerCase(),`.${o.toLowerCase()}`)),yW=(e,t,o)=>(e.undoManager.extra(()=>{o(e,t)},()=>{e.insertContent('')}),!0),vW=(e,t,o)=>(e.undoManager.extra(()=>{o(e,t)},()=>{e.execCommand("mceInsertLink",!1,t)}),!0),_W=(e,t,o)=>!e.selection.isCollapsed()&&NI(t)?vW(e,t,o):!1,xW=(e,t,o)=>bW(e,t)?yW(e,t,o):!1,wW=(e,t)=>{zt.each([_W,xW,zI],o=>!o(e,t,zI))},kW=(e,t,o)=>{o||!Kh(e)?zI(e,t):wW(e,t)},CW=uW("mceclip"),SW=e=>{const t=AI();return CF(t,e),EI(t),t},DF=(e,t,o,s,a)=>{const c=hW(e,t,o);if(!c.cancelled){const d=c.content,h=()=>kW(e,d,s);a?BR(e,"insertFromPaste",{dataTransfer:SW(d)}).isDefaultPrevented()||(h(),qA(e,"insertFromPaste")):h()}},ZR=(e,t,o,s)=>{const a=o||EF(t);DF(e,tW(t),a,!1,s)},DI=(e,t,o)=>{const s=e.dom.encode(t).replace(/\r\n/g,` +`),a=sp(s,IT(e)),c=sW(a,Vi(e),g0(e));DF(e,c,!1,!0,o)},RF=e=>{const t={};if(e&&e.types)for(let o=0;ot in e&&e[t].length>0,MF=e=>w1(e,"text/html")||w1(e,"text/plain"),EW=(e,t)=>{const o=t.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return Fe(o)?e.dom.encode(o[1]):void 0},AW=(e,t,o,s)=>{const a=CW(),c=Tp(e)&&Fe(o.name),d=c?EW(e,o.name):a,h=c?o.name:void 0,_=t.create(a,o,s,d,h);return t.add(_),_},TW=(e,t)=>{Ew(t.uri).each(({data:o,type:s,base64Encoded:a})=>{const c=a?o:btoa(o),d=t.file,h=e.editorUpload.blobCache,_=h.getByData(c,s),z=_??AW(e,h,d,c);ZR(e,``,!1,!0)})},OW=e=>e.type==="paste",zW=e=>Promise.all(dn(e,t=>pz(t).then(o=>({file:t,uri:o})))),NW=e=>{const t=m2(e);return o=>vs(o.type,"image/")&&Ln(t,s=>fW(s)===o.type)},DW=(e,t)=>{const o=t.items?Bn(an(t.items),a=>a.kind==="file"?[a.getAsFile()]:[]):[],s=t.files?an(t.files):[];return rt(o.length>0?o:s,NW(e))},LF=(e,t,o)=>{const s=OW(t)?t.clipboardData:t.dataTransfer;if(_m(e)&&s){const a=DW(e,s);if(a.length>0)return t.preventDefault(),zW(a).then(c=>{o&&e.selection.setRng(o),Be(c,d=>{TW(e,d)})}),!0}return!1},RW=e=>{var t,o;return Jo.os.isAndroid()&&((o=(t=e.clipboardData)===null||t===void 0?void 0:t.items)===null||o===void 0?void 0:o.length)===0},MW=e=>Zt.metaKeyPressed(e)&&e.keyCode===86||e.shiftKey&&e.keyCode===45,RI=(e,t,o,s,a)=>{let c=zF(o);const d=w1(t,UR())||EF(o),h=!d&&oW(c),_=NI(c);(TF(c)||!c.length||h&&!_)&&(s=!0),(s||_)&&(w1(t,"text/plain")&&h?c=t["text/plain"]:c=dW(c)),!TF(c)&&(s?DI(e,c,a):ZR(e,c,d,a))},LW=(e,t,o)=>{let s;const a=()=>t.getLastRng()||e.selection.getRng();e.on("keydown",c=>{MW(c)&&!c.isDefaultPrevented()&&(s=c.shiftKey&&c.keyCode===86)}),e.on("paste",c=>{if(c.isDefaultPrevented()||RW(c))return;const d=o.get()==="text"||s;s=!1;const h=RF(c.clipboardData);!MF(h)&&LF(e,c,a())||(w1(h,"text/html")?(c.preventDefault(),RI(e,h,h["text/html"],d,!0)):w1(h,"text/plain")&&w1(h,"text/uri-list")?(c.preventDefault(),RI(e,h,h["text/plain"],d,!0)):(t.create(),$c.setEditorTimeout(e,()=>{const _=t.getHtml();t.remove(),RI(e,h,_,d,!1)},0)))})},BW=e=>{const t=a=>vs(a,"webkit-fake-url"),o=a=>vs(a,"data:"),s=a=>{var c;return((c=a.data)===null||c===void 0?void 0:c.paste)===!0};e.parser.addNodeFilter("img",(a,c,d)=>{if(!_m(e)&&s(d))for(const h of a){const _=h.attr("src");ft(_)&&!h.attr("data-mce-object")&&_!==Jo.transparentSrc&&(t(_)||!aM(e)&&o(_))&&h.remove()}})},PW=(e,t,o)=>{LW(e,t,o),BW(e)},IW=(e,t)=>{t.get()==="text"?(t.set("html"),gx(e,!1)):(t.set("text"),gx(e,!0)),e.focus()},FW=(e,t)=>{e.addCommand("mceTogglePlainTextPaste",()=>{IW(e,t)}),e.addCommand("mceInsertClipboardContent",(o,s)=>{s.html&&ZR(e,s.html,s.internal,!1),s.text&&DI(e,s.text,!1)})},HW=(e,t,o)=>{if(e)try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",o),e.setData(UR(),t),!0}catch{return!1}else return!1},BF=(e,t,o,s)=>{HW(e.clipboardData,t.html,t.text)?(e.preventDefault(),s()):o(t.html,s)},PF=e=>(t,o)=>{const{dom:s,selection:a}=e,c=s.create("div",{contenteditable:"false","data-mce-bogus":"all"}),d=s.create("div",{contenteditable:"true"},t);s.setStyles(c,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),c.appendChild(d),s.add(e.getBody(),c);const h=a.getRng();d.focus();const _=s.createRng();_.selectNodeContents(d),a.setRng(_),$c.setEditorTimeout(e,()=>{a.setRng(h),s.remove(c),o()},0)},IF=e=>({html:eW(e.selection.getContent({contextual:!0})),text:e.selection.getContent({format:"text"})}),$W=e=>!!e.dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody()),FF=e=>!e.selection.isCollapsed()||$W(e),VW=e=>t=>{!t.isDefaultPrevented()&&FF(e)&&e.selection.isEditable()&&BF(t,IF(e),PF(e),()=>{if(Jo.browser.isChromium()||Jo.browser.isFirefox()){const o=e.selection.getRng();$c.setEditorTimeout(e,()=>{e.selection.setRng(o),e.execCommand("Delete")},0)}else e.execCommand("Delete")})},jW=e=>t=>{!t.isDefaultPrevented()&&FF(e)&&BF(t,IF(e),PF(e),dt)},UW=e=>{e.on("cut",VW(e)),e.on("copy",jW(e))},HF=(e,t)=>{var o,s;return Dg.getCaretRangeFromPoint((o=t.clientX)!==null&&o!==void 0?o:0,(s=t.clientY)!==null&&s!==void 0?s:0,e.getDoc())},ZW=e=>{const t=e["text/plain"];return t?t.indexOf("file://")===0:!1},$F=(e,t)=>{e.focus(),t&&e.selection.setRng(t)},WW=e=>Ln(e.files,t=>/^image\//.test(t.type)),qW=(e,t,o,s)=>{const a=e.getParent(o,d=>Oc(t,d));if(!ot(e.getParent(o,"summary")))return!0;if(a&&Ro(s,"text/html")){const d=new DOMParser().parseFromString(s["text/html"],"text/html").body;return!ot(d.querySelector(a.nodeName.toLowerCase()))}else return!1},KW=e=>{e.on("input",t=>{const o=s=>ot(s.querySelector("summary"));if(t.inputType==="deleteByDrag"){const s=rt(e.dom.select("details"),o);Be(s,a=>{Hs(a.firstChild)&&a.firstChild.remove();const c=e.dom.create("summary");c.appendChild(Au().dom),a.prepend(c)})}})},GW=(e,t)=>{_f(e)&&e.on("dragend dragover draggesture dragdrop drop drag",o=>{o.preventDefault(),o.stopPropagation()}),_m(e)||e.on("drop",o=>{const s=o.dataTransfer;s&&WW(s)&&o.preventDefault()}),e.on("drop",o=>{if(o.isDefaultPrevented())return;const s=HF(e,o);if(uo(s))return;const a=RF(o.dataTransfer),c=w1(a,UR());if((!MF(a)||ZW(a))&&LF(e,o,s))return;const d=a[UR()],h=d||a["text/html"]||a["text/plain"],_=qW(e.dom,e.schema,s.startContainer,a),z=t.get();z&&!_||h&&(o.preventDefault(),$c.setEditorTimeout(e,()=>{e.undoManager.transact(()=>{(d||z&&_)&&e.execCommand("Delete"),$F(e,s);const I=zF(h);a["text/html"]?ZR(e,I,c,!0):DI(e,I,!0)})}))}),e.on("dragstart",o=>{t.set(!0)}),e.on("dragover dragend",o=>{_m(e)&&!t.get()&&(o.preventDefault(),$F(e,HF(e,o))),o.type==="dragend"&&t.set(!1)}),KW(e)},YW=e=>{const t=a=>c=>{a(e,c)},o=sM(e);Gt(o)&&e.on("PastePreProcess",t(o));const s=v0(e);Gt(s)&&e.on("PastePostProcess",t(s))},XW=(e,t)=>{e.on("PastePreProcess",o=>{o.content=t(e,o.content,o.internal)})},JW=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,VF=e=>zt.trim(e).replace(JW,_h).toLowerCase(),QW=(e,t,o)=>{const s=PT(e);if(o||s==="all"||!c2(e))return t;const a=s?s.split(/[, ]/):[];if(a&&s!=="none"){const c=e.dom,d=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,(h,_,z,I)=>{const H=c.parseStyle(c.decode(z)),V={};for(let le=0;le]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,(c,d,h,_)=>d+' style="'+h+'"'+_),t},eq=e=>{(Jo.browser.isChromium()||Jo.browser.isSafari())&&XW(e,QW)},tq=e=>{const t=Er(!1),o=Er(Gh(e)?"text":"html"),s=cW(e);eq(e),FW(e,o),YW(e),e.addQueryStateHandler("mceTogglePlainTextPaste",()=>o.get()==="text"),e.on("PreInit",()=>{UW(e),GW(e,t),PW(e,s,o)})},oq=e=>{e.on("click",t=>{e.dom.getParent(t.target,"details")&&t.preventDefault()})},nq=e=>{e.parser.addNodeFilter("details",t=>{const o=j_(e);Be(t,s=>{o==="expanded"?s.attr("open","open"):o==="collapsed"&&s.attr("open",null)})}),e.serializer.addNodeFilter("details",t=>{const o=ZT(e);Be(t,s=>{o==="expanded"?s.attr("open","open"):o==="collapsed"&&s.attr("open",null)})})},sq=e=>{oq(e),nq(e)},rq=Hs,jF=wt,aq=e=>$o(e.dom),iq=e=>Rl(e.dom),UF=e=>t=>kn(ye.fromDom(e),t),lq=(e,t,o)=>_r(ye.fromDom(e),s=>iq(s)||o.isBlock(En(s)),UF(t)).getOr(ye.fromDom(t)).dom,ZF=(e,t)=>_r(ye.fromDom(e),aq,UF(t)),WF=(e,t,o)=>{const s=new Ma(e,t),a=o?s.next.bind(s):s.prev.bind(s);let c=e;for(let d=o?e:a();d&&!rq(d);d=a())sd(d)&&(c=d);return c},cq=(e,t,o)=>{const a=Ue.fromRangeStart(e).getNode(),c=lq(a,t,o),d=WF(a,c,!1),h=WF(a,c,!0),_=document.createRange();return ZF(d,c).fold(()=>{jF(d)?_.setStart(d,0):_.setStartBefore(d)},z=>_.setStartBefore(z.dom)),ZF(h,c).fold(()=>{jF(h)?_.setEnd(h,h.data.length):_.setEndAfter(h)},z=>_.setEndAfter(z.dom)),_},dq=e=>{const t=cq(e.selection.getRng(),e.getBody(),e.schema);e.selection.setRng(sw(t))},uq=e=>{e.on("mousedown",t=>{t.detail>=3&&(t.preventDefault(),dq(e))})};var fk;(function(e){e.Before="before",e.After="after"})(fk||(fk={}));const fq=(e,t)=>Math.abs(e.left-t),mq=(e,t)=>Math.abs(e.right-t),pq=(e,t)=>e>=t.top&&e<=t.bottom,gq=(e,t)=>e.topt.top,hq=(e,t)=>{const o=s0(e,t)/Math.min(e.height,t.height);return gq(e,t)&&o>.5},bq=(e,t)=>{const o=rt(e,s=>pq(t,s));return hg(o).fold(()=>[[],e],s=>{const{pass:a,fail:c}=yt(e,d=>hq(d,s));return[a,c]})},yq=(e,t)=>({node:e.node,position:fq(e,t)t>e.left&&t{const a=H=>sd(H.node)?j.some(H):no(H.node)?MI(an(H.node.childNodes),t,o,!1):j.none(),c=(H,V,ee)=>a(V).filter(le=>Math.abs(ee(H,t,o)-ee(le,t,o))<2&&wt(le.node)),d=(H,V)=>{const ee=yn(H,(le,oe)=>V(le,t,o)-V(oe,t,o));return Kr(ee,a).map(le=>s&&!wt(le.node)&&ee.length>1?c(le,ee[1],V).getOr(le):le)},[h,_]=bq(oR(e),o),{pass:z,fail:I}=yt(_,H=>H.topd(I,by)).orThunk(()=>d(z,by))},_q=(e,t,o,s)=>{const a=(c,d)=>{const h=z=>no(z)&&z.classList.contains("mce-drag-container"),_=rt(c.dom.childNodes,pt(h));return d.fold(()=>MI(_,o,s,!0),z=>{const I=rt(_,H=>H!==z.dom);return MI(I,o,s,!0)}).orThunk(()=>(kn(c,e)?j.none():Td(c)).bind(I=>a(I,j.some(c))))};return a(t,j.none())},xq=(e,t,o)=>{const s=ye.fromDom(e),a=ul(s),d=ye.fromPoint(a,t,o).filter(h=>_a(s,h)).getOr(s);return _q(s,d,t,o)},qF=(e,t,o)=>xq(e,t,o).filter(s=>k0(s.node)).map(s=>yq(s,t)),KF=e=>{var t,o;const s=e.getBoundingClientRect(),a=e.ownerDocument,c=a.documentElement,d=a.defaultView;return{top:s.top+((t=d==null?void 0:d.scrollY)!==null&&t!==void 0?t:0)-c.clientTop,left:s.left+((o=d==null?void 0:d.scrollX)!==null&&o!==void 0?o:0)-c.clientLeft}},wq=e=>e.inline?KF(e.getBody()):{left:0,top:0},kq=e=>{const t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}},Cq=e=>{const t=e.getBody(),o=e.getDoc().documentElement,s={left:t.scrollLeft,top:t.scrollTop},a={left:t.scrollLeft||o.scrollLeft,top:t.scrollTop||o.scrollTop};return e.inline?s:a},Sq=(e,t)=>{if(t.target.ownerDocument!==e.getDoc()){const o=KF(e.getContentAreaContainer()),s=Cq(e);return{left:t.pageX-o.left+s.left,top:t.pageY-o.top+s.top}}return{left:t.pageX,top:t.pageY}},Eq=(e,t,o)=>({pageX:o.left-e.left+t.left,pageY:o.top-e.top+t.top}),Aq=(e,t)=>Eq(wq(e),kq(e),Sq(e,t)),GF=e=>({target:e,srcElement:e}),Tq=(e,t,o,s)=>({...t,dataTransfer:s,type:e,...GF(o)}),Oq=(e,t,o)=>{const s=$t("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:e,composedPath:s,initEvent:s,preventDefault:dt,stopImmediatePropagation:dt,stopPropagation:dt,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,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:s,initMouseEvent:s,getModifierState:s,dataTransfer:o,...GF(t)}},zq=(e,t)=>{const o=JZ(e);return t==="dragstart"?(vF(o),xF(o)):t==="drop"?(jZ(o),EI(o)):(UZ(o),KZ(o)),o},Nq=(e,t,o,s)=>{const a=zq(o,e);return ln(s)?Oq(e,t,a):Tq(e,s,t,a)},WR=32,Dq=100,qR=8,KR=16,YF=$o,Rq=i0(YF,Rl),Mq=(e,t,o)=>YF(o)&&o!==t&&e.isEditable(o.parentElement),Lq=(e,t,o)=>uo(t)||t===o||e.dom.isChildOf(t,o)?!1:e.dom.isEditable(t),Bq=(e,t,o,s)=>{const a=e.dom,c=t.cloneNode(!0);a.setStyles(c,{width:o,height:s}),a.setAttrib(c,"data-mce-selected",null);const d=a.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return a.setStyles(d,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:o,height:s}),a.setStyles(c,{margin:0,boxSizing:"border-box"}),d.appendChild(c),d},Pq=(e,t)=>{e.parentNode!==t&&t.appendChild(e)},GR=(e,t)=>o=>()=>{const s=e==="left"?o.scrollX:o.scrollY;o.scroll({[e]:s+t,behavior:"smooth"})},XF=GR("left",-WR),JF=GR("left",WR),QF=GR("top",-WR),eH=GR("top",WR),Iq=(e,t,o,s,a,c,d,h,_,z,I,H)=>{let V=0,ee=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+o>a&&(V=t.pageX+o-a),t.pageY+s>c&&(ee=t.pageY+s-c),e.style.width=o-V+"px",e.style.height=s-ee+"px";const le=_.clientHeight,oe=_.clientWidth,fe=d+_.getBoundingClientRect().top,ke=h+_.getBoundingClientRect().left;I.on(Oe=>{Oe.intervalId.clear(),Oe.dragging&&H&&(d+qR>=le?Oe.intervalId.set(eH(z)):d-qR<=0?Oe.intervalId.set(QF(z)):h+qR>=oe?Oe.intervalId.set(JF(z)):h-qR<=0?Oe.intervalId.set(XF(z)):fe+KR>=window.innerHeight?Oe.intervalId.set(eH(window)):fe-KR<=0?Oe.intervalId.set(QF(window)):ke+KR>=window.innerWidth?Oe.intervalId.set(JF(window)):ke-KR<=0&&Oe.intervalId.set(XF(window)))})},tH=e=>{e&&e.parentNode&&e.parentNode.removeChild(e)},Fq=(e,t)=>{const o=e.getParent(t.parentNode,e.isBlock);tH(t),o&&o!==e.getRoot()&&e.isEmpty(o)&&Lc(ye.fromDom(o))},Hq=e=>e.button===0,$q=(e,t)=>({pageX:t.pageX-e.relX,pageY:t.pageY+5}),Vq=(e,t)=>o=>{if(Hq(o)){const s=On(t.dom.getParents(o.target),Rq).getOr(null);if(Fe(s)&&Mq(t.dom,t.getBody(),s)){const a=t.dom.getPos(s),c=t.getBody(),d=t.getDoc().documentElement;e.set({element:s,dataTransfer:AI(),dragging:!1,screenX:o.screenX,screenY:o.screenY,maxX:(t.inline?c.scrollWidth:d.offsetWidth)-2,maxY:(t.inline?c.scrollHeight:d.offsetHeight)-2,relX:o.pageX-a.x,relY:o.pageY-a.y,width:s.offsetWidth,height:s.offsetHeight,ghost:Bq(t,s,s.offsetWidth,s.offsetHeight),intervalId:Ll(Dq)})}}},jq=(e,t,o)=>{e._selectionOverrides.hideFakeCaret(),qF(e.getBody(),t,o).fold(()=>e.selection.placeCaretAt(t,o),s=>{const a=e._selectionOverrides.showCaret(1,s.node,s.position===fk.Before,!1);a?e.selection.setRng(a):e.selection.placeCaretAt(t,o)})},XA=(e,t,o,s,a)=>{t==="dragstart"&&CF(s,e.dom.getOuterHTML(o));const c=Nq(t,o,s,a);return e.dispatch(t,c)},Uq=(e,t)=>{const o=vp((a,c)=>jq(t,a,c),0);t.on("remove",o.cancel);const s=e;return a=>e.on(c=>{const d=Math.max(Math.abs(a.screenX-c.screenX),Math.abs(a.screenY-c.screenY));if(!c.dragging&&d>10){const h=XA(t,"dragstart",c.element,c.dataTransfer,a);if(Fe(h.dataTransfer)&&(c.dataTransfer=h.dataTransfer),h.isDefaultPrevented())return;c.dragging=!0,t.focus()}if(c.dragging){const h=a.currentTarget===t.getDoc().documentElement,_=$q(c,Aq(t,a));Pq(c.ghost,t.getBody()),Iq(c.ghost,_,c.width,c.height,c.maxX,c.maxY,a.clientY,a.clientX,t.getContentAreaContainer(),t.getWin(),s,h),o.throttle(a.clientX,a.clientY)}})},Zq=e=>{const t=e.getSel();if(Fe(t)){const s=t.getRangeAt(0).startContainer;return wt(s)?s.parentNode:s}else return null},Wq=(e,t)=>o=>{e.on(s=>{var a;if(s.intervalId.clear(),s.dragging){if(Lq(t,Zq(t.selection),s.element)){const c=(a=t.getDoc().elementFromPoint(o.clientX,o.clientY))!==null&&a!==void 0?a:t.getBody();XA(t,"drop",c,s.dataTransfer,o).isDefaultPrevented()||t.undoManager.transact(()=>{Fq(t.dom,s.element),QZ(s.dataTransfer).each(h=>t.insertContent(h)),t._selectionOverrides.hideFakeCaret()})}XA(t,"dragend",t.getBody(),s.dataTransfer,o)}}),nH(e)},oH=(e,t,o)=>{e.on(s=>{s.intervalId.clear(),s.dragging&&o.fold(()=>XA(t,"dragend",s.element,s.dataTransfer),a=>XA(t,"dragend",s.element,s.dataTransfer,a))}),nH(e)},qq=(e,t)=>o=>oH(e,t,j.some(o)),nH=e=>{e.on(t=>{t.intervalId.clear(),tH(t.ghost)}),e.clear()},Kq=e=>{const t=Jr(),o=As.DOM,s=document,a=Vq(t,e),c=Uq(t,e),d=Wq(t,e),h=qq(t,e);e.on("mousedown",a),e.on("mousemove",c),e.on("mouseup",d),o.bind(s,"mousemove",c),o.bind(s,"mouseup",h),e.on("remove",()=>{o.unbind(s,"mousemove",c),o.unbind(s,"mouseup",h)}),e.on("keydown",_=>{_.keyCode===Zt.ESC&&oH(t,e,j.none())})},Gq=e=>{const t=a=>{if(!a.isDefaultPrevented()){const c=a.dataTransfer;c&&(mn(c.types,"Files")||c.files.length>0)&&(a.preventDefault(),a.type==="drop"&&Ww(e,"Dropped file type is not supported"))}},o=a=>{Ax(e,a.target)&&t(a)},s=()=>{const a=As.DOM,c=e.dom,d=document,h=e.inline?e.getBody():e.getDoc(),_=["drop","dragover"];Be(_,z=>{a.bind(d,z,o),c.bind(h,z,t)}),e.on("remove",()=>{Be(_,z=>{a.unbind(d,z,o),c.unbind(h,z,t)})})};e.on("init",()=>{$c.setEditorTimeout(e,s,0)})},Yq=e=>{Kq(e),$_(e)&&Gq(e)},Xq=e=>{const t=vp(()=>{if(!e.removed&&e.getBody().contains(document.activeElement)){const o=e.selection.getRng();if(o.collapsed){const s=Yw(e,o,!1);e.selection.setRng(s)}}},0);e.on("focus",()=>{t.throttle()}),e.on("blur",()=>{t.cancel()})},Jq=e=>{e.on("init",()=>{e.on("focusin",t=>{const o=t.target;if(Xe(o)){const s=Gd(e.getBody(),o),a=$o(s)?s:o;e.selection.getNode()!==a&&Uv(e,a).each(c=>e.selection.setRng(c))}})})},JA=$o,sH=(e,t)=>Gd(e.getBody(),t),Qq=e=>{const t=e.selection,o=e.dom,s=e.getBody(),a=QT(e,s,o.isBlock,()=>Vy(e)),c="sel-"+o.uniqueId(),d="data-mce-selected";let h;const _=Yt=>Fe(Yt)&&o.hasClass(Yt,"mce-offscreen-selection"),z=Yt=>Yt!==s&&(JA(Yt)||Xe(Yt))&&o.isChildOf(Yt,s)&&o.isEditable(Yt.parentNode),I=Yt=>{Yt&&t.setRng(Yt)},H=(Yt,Qe,Ve,mt=!0)=>e.dispatch("ShowCaret",{target:Qe,direction:Yt,before:Ve}).isDefaultPrevented()?null:(mt&&t.scrollIntoView(Qe,Yt===-1),a.show(Ve,Qe)),V=Yt=>{Yt.hasAttribute("data-mce-caret")&&(kp(Yt),t.scrollIntoView(Yt))},ee=()=>{e.on("click",Qe=>{o.isEditable(Qe.target)||(Qe.preventDefault(),e.focus())}),e.on("blur NewBlock",Pe),e.on("ResizeWindow FullscreenStateChanged",a.reposition),e.on("tap",Qe=>{const Ve=Qe.target,mt=sH(e,Ve);JA(mt)?(Qe.preventDefault(),Uv(e,mt).each(Ae)):z(Ve)&&Uv(e,Ve).each(Ae)},!0),e.on("mousedown",Qe=>{const Ve=Qe.target;if(Ve!==s&&Ve.nodeName!=="HTML"&&!o.isChildOf(Ve,s)||!HB(e,Qe.clientX,Qe.clientY))return;Pe(),Mt();const mt=sH(e,Ve);JA(mt)?(Qe.preventDefault(),Uv(e,mt).each(Ae)):qF(s,Qe.clientX,Qe.clientY).each(to=>{Qe.preventDefault();const bo=H(1,to.node,to.position===fk.Before,!1);I(bo),Ql(mt)?mt.focus():e.getBody().focus()})}),e.on("keypress",Qe=>{Zt.modifierPressed(Qe)||JA(t.getNode())&&Qe.preventDefault()}),e.on("GetSelectionRange",Qe=>{let Ve=Qe.range;if(h){if(!h.parentNode){h=null;return}Ve=Ve.cloneRange(),Ve.selectNode(h),Qe.range=Ve}}),e.on("SetSelectionRange",Qe=>{Qe.range=fe(Qe.range);const Ve=Ae(Qe.range,Qe.forward);Ve&&(Qe.range=Ve)});const Yt=Qe=>no(Qe)&&Qe.id==="mcepastebin";e.on("AfterSetSelectionRange",Qe=>{const Ve=Qe.range,mt=Ve.startContainer.parentElement;!oe(Ve)&&!Yt(mt)&&Mt(),_(mt)||Pe()}),Yq(e),Xq(e),Jq(e)},le=Yt=>Bl(Yt)||Bh(Yt)||Ou(Yt),oe=Yt=>le(Yt.startContainer)||le(Yt.endContainer),fe=Yt=>{const Qe=e.schema.getVoidElements(),Ve=o.createRng(),mt=Yt.startContainer,to=Yt.startOffset,bo=Yt.endContainer,gn=Yt.endOffset;return Ro(Qe,mt.nodeName.toLowerCase())?to===0?Ve.setStartBefore(mt):Ve.setStartAfter(mt):Ve.setStart(mt,to),Ro(Qe,bo.nodeName.toLowerCase())?gn===0?Ve.setEndBefore(bo):Ve.setEndAfter(bo):Ve.setEnd(bo,gn),Ve},ke=(Yt,Qe)=>{const Ve=ye.fromDom(e.getBody()),mt=e.getDoc(),to=nt(Ve,"#"+c).getOrThunk(()=>{const Cn=ye.fromHtml('
    ',mt);return Rr(Cn,"id",c),fr(Ve,Cn),Cn}),bo=o.createRng();xs(to),xr(to,[ye.fromText(da,mt),ye.fromDom(Qe),ye.fromText(da,mt)]),bo.setStart(to.dom.firstChild,1),bo.setEnd(to.dom.lastChild,0),vn(to,{top:o.getPos(Yt,e.getBody()).y+"px"}),oC(to);const gn=t.getSel();return gn&&(gn.removeAllRanges(),gn.addRange(bo)),bo},Oe=Yt=>{const Qe=Yt.cloneNode(!0),Ve=e.dispatch("ObjectSelected",{target:Yt,targetClone:Qe});if(Ve.isDefaultPrevented())return null;const mt=ke(Yt,Ve.targetClone),to=ye.fromDom(Yt);return Be(Mr(ye.fromDom(e.getBody()),`*[${d}]`),bo=>{kn(to,bo)||rn(bo,d)}),o.getAttrib(Yt,d)||Yt.setAttribute(d,"1"),h=Yt,Mt(),mt},Ae=(Yt,Qe)=>{if(!Yt)return null;if(Yt.collapsed){if(!oe(Yt)){const bo=Qe?1:-1,gn=A0(bo,s,Yt),Cn=gn.getNode(!Qe);if(Fe(Cn)){if(k0(Cn))return H(bo,Cn,Qe?!gn.isAtEnd():!1,!1);if(pm(Cn)&&$o(Cn.nextSibling)){const hs=o.createRng();return hs.setStart(Cn,0),hs.setEnd(Cn,0),hs}}const ds=gn.getNode(Qe);if(Fe(ds)){if(k0(ds))return H(bo,ds,Qe?!1:!gn.isAtEnd(),!1);if(pm(ds)&&$o(ds.previousSibling)){const hs=o.createRng();return hs.setStart(ds,1),hs.setEnd(ds,1),hs}}}return null}let Ve=Yt.startContainer,mt=Yt.startOffset;const to=Yt.endOffset;if(wt(Ve)&&mt===0&&JA(Ve.parentNode)&&(Ve=Ve.parentNode,mt=o.nodeIndex(Ve),Ve=Ve.parentNode),!no(Ve))return null;if(to===mt+1&&Ve===Yt.endContainer){const bo=Ve.childNodes[mt];if(z(bo))return Oe(bo)}return null},Pe=()=>{h&&h.removeAttribute(d),nt(ye.fromDom(e.getBody()),"#"+c).each(Jn),h=null},ht=()=>{a.destroy(),h=null},Mt=()=>{a.hide()};return Pm(e)||ee(),{showCaret:H,showBlockCaretContainer:V,hideFakeCaret:Mt,destroy:ht}},eK=(e,t)=>{let o=t;for(let s=e.previousSibling;wt(s);s=s.previousSibling)o+=s.data.length;return o},rH=(e,t,o,s,a)=>{if(wt(o)&&(s<0||s>o.data.length))return[];const c=a&&wt(o)?[eK(o,s)]:[s];let d=o;for(;d!==t&&d.parentNode;)c.push(e.nodeIndex(d,a)),d=d.parentNode;return d===t?c.reverse():[]},LI=(e,t,o,s,a,c,d=!1)=>{const h=rH(e,t,o,s,d),_=rH(e,t,a,c,d);return{start:h,end:_}},aH=(e,t)=>{const o=t.slice(),s=o.pop();return D(s)?ko(o,(c,d)=>c.bind(h=>j.from(h.childNodes[d])),j.some(e)).bind(c=>wt(c)&&(s<0||s>c.data.length)?j.none():j.some({node:c,offset:s})):j.none()},iH=(e,t)=>aH(e,t.start).bind(({node:o,offset:s})=>aH(e,t.end).map(({node:a,offset:c})=>{const d=document.createRange();return d.setStart(o,s),d.setEnd(a,c),d})),tK=(e,t,o,s=!1)=>LI(e,t,o.startContainer,o.startOffset,o.endContainer,o.endOffset,s),mk=(e,t,o)=>{if(t&&e.isEmpty(t)&&!o(t)){const s=t.parentNode;e.remove(t,wt(t.firstChild)&&Ii(t.firstChild.data)),mk(e,s,o)}},YR=(e,t,o,s=!0)=>{const a=t.startContainer.parentNode,c=t.endContainer.parentNode;t.deleteContents(),s&&!o(t.startContainer)&&(wt(t.startContainer)&&t.startContainer.data.length===0&&e.remove(t.startContainer),wt(t.endContainer)&&t.endContainer.data.length===0&&e.remove(t.endContainer),mk(e,a,o),a!==c&&mk(e,c,o))},XR=(e,t)=>j.from(e.dom.getParent(t.startContainer,e.dom.isBlock)),BI=(e,t,o)=>{const s=e.dynamicPatternsLookup({text:o,block:t});return{...e,blockPatterns:mi(s).concat(e.blockPatterns),inlinePatterns:Hd(s).concat(e.inlinePatterns)}},PI=(e,t,o,s)=>{const a=e.createRng();return a.setStart(t,0),a.setEnd(o,s),a.toString()},lH=(e,t)=>e.create("span",{"data-mce-type":"bookmark",id:t}),JR=(e,t)=>{const o=e.createRng();return o.setStartAfter(t.start),o.setEndBefore(t.end),o},cH=(e,t,o)=>{const s=iH(e.getRoot(),o).getOrDie("Unable to resolve path range"),a=s.startContainer,c=s.endContainer,d=s.endOffset===0?c:c.splitText(s.endOffset),h=s.startOffset===0?a:a.splitText(s.startOffset),_=h.parentNode,z=d.parentNode;return{prefix:t,end:z.insertBefore(lH(e,t+"-end"),d),start:_.insertBefore(lH(e,t+"-start"),h)}},dH=(e,t,o)=>{mk(e,e.get(t.prefix+"-end"),o),mk(e,e.get(t.prefix+"-start"),o)},II=e=>e.start.length===0,oK=e=>(t,o)=>{const a=t.data.substring(0,o),c=a.lastIndexOf(e.charAt(e.length-1)),d=a.lastIndexOf(e);return d!==-1?d+e.length:c!==-1?c+1:-1},uH=(e,t,o,s)=>{const a=t.start;return aI(e,s.container,s.offset,oK(a),o).bind(d=>{var h,_;const z=(_=(h=o.textContent)===null||h===void 0?void 0:h.indexOf(a))!==null&&_!==void 0?_:-1;if(z!==-1&&d.offset>=z+a.length){const H=e.createRng();return H.setStart(d.container,d.offset-a.length),H.setEnd(d.container,d.offset),j.some(H)}else{const H=d.offset-a.length;return rI(d.container,H,o).map(V=>{const ee=e.createRng();return ee.setStart(V.container,V.offset),ee.setEnd(d.container,d.offset),ee}).filter(V=>V.toString()===a).orThunk(()=>uH(e,t,o,Gp(d.container,0)))}})},nK=(e,t,o,s,a,c=!1)=>{if(t.start.length===0&&!c){const d=e.createRng();return d.setStart(o,s),d.setEnd(o,s),j.some(d)}return sI(o,s,a).bind(d=>uH(e,t,a,d).bind(_=>{var z;if(c){if(_.endContainer===d.container&&_.endOffset===d.offset)return j.none();if(d.offset===0&&((z=_.endContainer.textContent)===null||z===void 0?void 0:z.length)===_.endOffset)return j.none()}return j.some(_)}))},sK=(e,t,o,s)=>{const a=e.dom,c=a.getRoot(),d=o.pattern,h=o.position.container,_=o.position.offset;return rI(h,_-o.pattern.end.length,t).bind(z=>{const I=LI(a,c,z.container,z.offset,h,_,s);if(II(d))return j.some({matches:[{pattern:d,startRng:I,endRng:I}],position:z});{const H=QR(e,o.remainingPatterns,z.container,z.offset,t,s),V=H.getOr({matches:[],position:z}),ee=V.position;return nK(a,d,ee.container,ee.offset,t,H.isNone()).map(oe=>{const fe=tK(a,c,oe,s);return{matches:V.matches.concat([{pattern:d,startRng:fe,endRng:I}]),position:Gp(oe.startContainer,oe.startOffset)}})}})},QR=(e,t,o,s,a,c)=>{const d=e.dom;return sI(o,s,d.getRoot()).bind(h=>{const _=PI(d,a,o,s);for(let z=0;z0)return QR(e,t,o,s-1,a,c);if(V.isSome())return V}return j.none()})},fH=(e,t,o)=>{e.selection.setRng(o),t.type==="inline-format"?Be(t.format,s=>{e.formatter.apply(s)}):e.execCommand(t.cmd,!1,t.value)},rK=(e,t,o,s)=>{const a=JR(e.dom,o);YR(e.dom,a,s),fH(e,t,a)},aK=(e,t,o,s,a)=>{const c=e.dom,d=JR(c,s),h=JR(c,o);YR(c,h,a),YR(c,d,a);const _={prefix:o.prefix,start:o.end,end:s.start},z=JR(c,_);fH(e,t,z)},iK=(e,t)=>{const o=Ei("mce_textpattern"),s=ao(t,(a,c)=>{const d=cH(e,o+`_end${a.length}`,c.endRng);return a.concat([{...c,endMarker:d}])},[]);return ao(s,(a,c)=>{const d=s.length-a.length-1,h=II(c.pattern)?c.endMarker:cH(e,o+`_start${d}`,c.startRng);return a.concat([{...c,startMarker:h}])},[])},lK=e=>yn(e,(t,o)=>o.end.length-t.end.length),cK=(e,t)=>{const o=$s(e,s=>Ln(t,a=>s.pattern.start===a.pattern.start&&s.pattern.end===a.pattern.end));return e.length===t.length?o?e:t:e.length>t.length?e:t},mH=(e,t,o,s,a,c)=>{const d=QR(e,a.inlinePatterns,o,s,t,c).fold(()=>[],_=>_.matches),h=QR(e,lK(a.inlinePatterns),o,s,t,c).fold(()=>[],_=>_.matches);return cK(d,h)},pH=(e,t)=>{if(t.length===0)return;const o=e.dom,s=e.selection.getBookmark(),a=iK(o,t);Be(a,c=>{const d=o.getParent(c.startMarker.start,o.isBlock),h=_=>_===d;II(c.pattern)?rK(e,c.pattern,c.endMarker,h):aK(e,c.pattern,c.startMarker,c.endMarker,h),dH(o,c.endMarker,h),dH(o,c.startMarker,h)}),e.selection.moveToBookmark(s)},gH=(e,t,o)=>JV(t,0,t).map(s=>{const a=s.container;return b8(a,o.start.length,t).each(c=>{const d=e.createRng();d.setStart(a,0),d.setEnd(c.container,c.offset),YR(e,d,h=>h===t)}),a}),hH=e=>(t,o)=>{const s=t.dom,a=o.pattern,c=iH(s.getRoot(),o.range).getOrDie("Unable to resolve path range"),d=(h,_)=>{const z=_.get(h);return ve(z)&&St(z).exists(I=>Ro(I,"block"))};return XR(t,c).each(h=>{a.type==="block-format"?d(a.format,t.formatter)&&t.undoManager.transact(()=>{e(t.dom,h,a),t.formatter.apply(a.format)}):a.type==="block-command"&&t.undoManager.transact(()=>{e(t.dom,h,a),t.execCommand(a.cmd,!1,a.value)})}),!0},dK=e=>yn(e,(t,o)=>o.start.length-t.start.length),bH=e=>(t,o)=>{const s=dK(t),a=o.replace(da," ");return On(s,c=>e(c,o,a))},yH=(e,t)=>(o,s,a,c,d)=>{var h;d===void 0&&(d=(h=s.textContent)!==null&&h!==void 0?h:"");const _=o.dom,z=Vi(o);return _.is(s,z)?e(a.blockPatterns,d).map(I=>t&&zt.trim(d).length===I.start.length?[]:[{pattern:I,range:LI(_,_.getRoot(),s,0,s,0,c)}]).getOr([]):[]},uK=e=>/^\s[^\s]/.test(e),fK=hH((e,t,o)=>{gH(e,t,o).each(s=>{const a=ye.fromDom(s),c=fm(a);uK(c)&&Oh(a,c.slice(1))})}),mK=bH((e,t,o)=>t.indexOf(e.start)===0||o.indexOf(e.start)===0),pK=yH(mK,!0),gK=(e,t)=>{const o=e.selection.getRng();return XR(e,o).map(s=>{var a;const c=Math.max(0,o.startOffset),d=BI(t,s,(a=s.textContent)!==null&&a!==void 0?a:""),h=mH(e,s,o.startContainer,c,d,!0),_=pK(e,s,d,!0);return{inlineMatches:h,blockMatches:_}}).filter(({inlineMatches:s,blockMatches:a})=>a.length>0||s.length>0)},hK=(e,t)=>{if(t.length===0)return;const o=e.selection.getBookmark();Be(t,s=>fK(e,s)),e.selection.moveToBookmark(o)},bK=hH(gH),yK=bH((e,t,o)=>t===e.start||o===e.start),vK=yH(yK,!1),_K=(e,t)=>{const o=e.selection.getRng();return XR(e,o).map(s=>{const a=Math.max(0,o.startOffset),c=PI(e.dom,s,o.startContainer,a),d=BI(t,s,c);return vK(e,s,d,!1,c)}).filter(s=>s.length>0)},xK=(e,t)=>{Be(t,o=>bK(e,o))},wK=(e,t)=>gK(e,t).fold(fn,({inlineMatches:o,blockMatches:s})=>(e.undoManager.add(),e.undoManager.extra(()=>{e.execCommand("mceInsertNewLine")},()=>{Wk(e),pH(e,o),hK(e,s);const a=e.selection.getRng(),c=sI(a.startContainer,a.startOffset,e.dom.getRoot());e.execCommand("mceInsertNewLine"),c.each(d=>{const h=d.container;h.data.charAt(d.offset-1)===rr&&(h.deleteData(d.offset-1,1),mk(e.dom,h.parentNode,_=>_===e.dom.getRoot()))})}),!0)),kK=(e,t)=>{const o=e.selection.getRng();XR(e,o).map(s=>{const a=Math.max(0,o.startOffset-1),c=PI(e.dom,s,o.startContainer,a),d=BI(t,s,c),h=mH(e,s,o.startContainer,a,d,!1);h.length>0&&e.undoManager.transact(()=>{pH(e,h)})})},CK=(e,t)=>_K(e,t).fold(fn,o=>(e.undoManager.transact(()=>{xK(e,o)}),!0)),vH=(e,t,o)=>{for(let s=0;svH(e,t,(o,s)=>o===s.keyCode&&!Zt.modifierPressed(s)),EK=(e,t)=>vH(e,t,(o,s)=>o.charCodeAt(0)===s.charCode),AK=e=>{const t=[",",".",";",":","!","?"],o=[32],s=()=>_g(iM(e).filter(d=>d.type==="inline-command"||d.type==="block-command"?e.queryCommandSupported(d.cmd):!0),_0(e)),a=()=>d2(e);e.on("keydown",d=>{if(d.keyCode===13&&!Zt.modifierPressed(d)&&e.selection.isCollapsed()){const h=yf(s(),"enter");(h.inlinePatterns.length>0||h.blockPatterns.length>0||a())&&wK(e,h)&&d.preventDefault()}},!0),e.on("keydown",d=>{if(d.keyCode===32&&e.selection.isCollapsed()){const h=yf(s(),"space");(h.blockPatterns.length>0||a())&&CK(e,h)&&d.preventDefault()}},!0);const c=()=>{if(e.selection.isCollapsed()){const d=yf(s(),"space");(d.inlinePatterns.length>0||a())&&kK(e,d)}};e.on("keyup",d=>{SK(o,d)&&c()}),e.on("keypress",d=>{EK(t,d)&&$c.setEditorTimeout(e,c)})},TK=e=>{AK(e)},OK=e=>{const t=zt.each,o=Zt.BACKSPACE,s=Zt.DELETE,a=e.dom,c=e.selection,d=e.parser,h=Jo.browser,_=h.isFirefox(),z=h.isChromium()||h.isSafari(),I=Jo.deviceType.isiPhone()||Jo.deviceType.isiPad(),H=Jo.os.isMacOS()||Jo.os.isiOS(),V=(jt,Eo)=>{try{e.getDoc().execCommand(jt,!1,String(Eo))}catch{}},ee=jt=>jt.isDefaultPrevented(),le=()=>{const jt=wn=>{const qt=a.create("body"),hn=wn.cloneContents();return qt.appendChild(hn),c.serializer.serialize(qt,{format:"html"})},Eo=wn=>{const qt=jt(wn),hn=a.createRng();hn.selectNode(e.getBody());const An=jt(hn);return qt===An};e.on("keydown",wn=>{const qt=wn.keyCode;if(!ee(wn)&&(qt===s||qt===o)&&e.selection.isEditable()){const hn=e.selection.isCollapsed(),An=e.getBody();if(hn&&!ml(e.schema,An)||!hn&&!Eo(e.selection.getRng()))return;wn.preventDefault(),e.setContent(""),An.firstChild&&a.isBlock(An.firstChild)?e.selection.setCursorLocation(An.firstChild,0):e.selection.setCursorLocation(An,0),e.nodeChanged()}})},oe=()=>{e.shortcuts.add("meta+a",null,"SelectAll")},fe=()=>{e.inline||a.bind(e.getDoc(),"mousedown mouseup",jt=>{let Eo;if(jt.target===e.getDoc().documentElement)if(Eo=c.getRng(),e.getBody().focus(),jt.type==="mousedown"){if(Bl(Eo.startContainer))return;c.placeCaretAt(jt.clientX,jt.clientY)}else c.setRng(Eo)})},ke=()=>{e.on("keydown",jt=>{if(!ee(jt)&&jt.keyCode===o){if(!e.getBody().getElementsByTagName("hr").length)return;if(c.isCollapsed()&&c.getRng().startOffset===0){const Eo=c.getNode(),wn=Eo.previousSibling;if(Eo.nodeName==="HR"){a.remove(Eo),jt.preventDefault();return}wn&&wn.nodeName&&wn.nodeName.toLowerCase()==="hr"&&(a.remove(wn),jt.preventDefault())}}})},Oe=()=>{Range.prototype.getClientRects||e.on("mousedown",jt=>{if(!ee(jt)&&jt.target.nodeName==="HTML"){const Eo=e.getBody();Eo.blur(),$c.setEditorTimeout(e,()=>{Eo.focus()})}})},Ae=()=>{const jt=zy(e);e.on("click",Eo=>{const wn=Eo.target;/^(IMG|HR)$/.test(wn.nodeName)&&a.isEditable(wn)&&(Eo.preventDefault(),e.selection.select(wn),e.nodeChanged()),wn.nodeName==="A"&&a.hasClass(wn,jt)&&wn.childNodes.length===0&&a.isEditable(wn.parentNode)&&(Eo.preventDefault(),c.select(wn))})},Pe=()=>{const jt=()=>{const wn=a.getAttribs(c.getStart().cloneNode(!1));return()=>{const qt=c.getStart();qt!==e.getBody()&&(a.setAttrib(qt,"style",null),t(wn,hn=>{qt.setAttributeNode(hn.cloneNode(!0))}))}},Eo=()=>!c.isCollapsed()&&a.getParent(c.getStart(),a.isBlock)!==a.getParent(c.getEnd(),a.isBlock);e.on("keypress",wn=>{let qt;return!ee(wn)&&(wn.keyCode===8||wn.keyCode===46)&&Eo()?(qt=jt(),e.getDoc().execCommand("delete",!1),qt(),wn.preventDefault(),!1):!0}),a.bind(e.getDoc(),"cut",wn=>{if(!ee(wn)&&Eo()){const qt=jt();$c.setEditorTimeout(e,()=>{qt()})}})},ht=()=>{e.on("keydown",jt=>{if(!ee(jt)&&jt.keyCode===o&&c.isCollapsed()&&c.getRng().startOffset===0){const Eo=c.getNode().previousSibling;if(Eo&&Eo.nodeName&&Eo.nodeName.toLowerCase()==="table")return jt.preventDefault(),!1}return!0})},Mt=()=>{e.on("keydown",jt=>{if(ee(jt)||jt.keyCode!==Zt.BACKSPACE)return;let Eo=c.getRng();const wn=Eo.startContainer,qt=Eo.startOffset,hn=a.getRoot();let An=wn;if(!(!Eo.collapsed||qt!==0)){for(;An.parentNode&&An.parentNode.firstChild===An&&An.parentNode!==hn;)An=An.parentNode;An.nodeName==="BLOCKQUOTE"&&(e.formatter.toggle("blockquote",void 0,An),Eo=a.createRng(),Eo.setStart(wn,0),Eo.setEnd(wn,0),c.setRng(Eo))}})},Yt=()=>{const jt=()=>{V("StyleWithCSS",!1),V("enableInlineTableEditing",!1),AT(e)||V("enableObjectResizing",!1)};LT(e)||e.on("BeforeExecCommand mousedown",jt)},Qe=()=>{const jt=()=>{t(a.select("a:not([data-mce-block])"),Eo=>{var wn;let qt=Eo.parentNode;const hn=a.getRoot();if((qt==null?void 0:qt.lastChild)===Eo){for(;qt&&!a.isBlock(qt);){if(((wn=qt.parentNode)===null||wn===void 0?void 0:wn.lastChild)!==qt||qt===hn)return;qt=qt.parentNode}a.add(qt,"br",{"data-mce-bogus":1})}})};e.on("SetContent ExecCommand",Eo=>{(Eo.type==="setcontent"||Eo.command==="mceInsertLink")&&jt()})},Ve=()=>{e.on("init",()=>{V("DefaultParagraphSeparator",Vi(e))})},mt=jt=>{const Eo=jt.getBody(),wn=jt.selection.getRng();return wn.startContainer===wn.endContainer&&wn.startContainer===Eo&&wn.startOffset===0&&wn.endOffset===Eo.childNodes.length},to=()=>{e.on("keyup focusin mouseup",jt=>{!Zt.modifierPressed(jt)&&!mt(e)&&c.normalize()},!0)},bo=()=>{e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},gn=()=>{e.inline||e.on("keydown",()=>{document.activeElement===document.body&&e.getWin().focus()})},Cn=()=>{e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",jt=>{let Eo;jt.target.nodeName==="HTML"&&(Eo=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(Eo),e.selection.normalize(),e.nodeChanged())}))},ds=()=>{H&&e.on("keydown",jt=>{Zt.metaKeyPressed(jt)&&!jt.shiftKey&&(jt.keyCode===37||jt.keyCode===39)&&(jt.preventDefault(),e.selection.getSel().modify("move",jt.keyCode===37?"backward":"forward","lineboundary"))})},hs=()=>{e.on("click",jt=>{let Eo=jt.target;do if(Eo.tagName==="A"){jt.preventDefault();return}while(Eo=Eo.parentNode)}),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},qr=()=>{e.on("init",()=>{e.dom.bind(e.getBody(),"submit",jt=>{jt.preventDefault()})})},il=()=>{d.addNodeFilter("br",jt=>{let Eo=jt.length;for(;Eo--;)jt[Eo].attr("class")==="Apple-interchange-newline"&&jt[Eo].remove()})},Os=dt,Ft=()=>{if(!_||e.removed)return!1;const jt=e.selection.getSel();return!jt||!jt.rangeCount||jt.rangeCount===0},go=()=>{z&&(fe(),Ae(),qr(),oe(),I&&(gn(),Cn(),hs())),_&&(Oe(),Yt(),bo(),ds())},ts=()=>{Mt(),le(),Jo.windowsPhone||to(),z&&(fe(),Ae(),Ve(),qr(),ht(),il(),I?(gn(),Cn(),hs()):oe()),_&&(ke(),Oe(),Pe(),Yt(),Qe(),bo(),ds(),ht())};return Pm(e)?go():ts(),{refreshContentEditable:Os,isHidden:Ft}},zK=e=>e.toLowerCase()==="gpl",NK=e=>e.length>=64&&e.length<=255,DK=e=>zK(e)||NK(e)?"VALID":"INVALID",RK=e=>{const t=qT(e);!ft(KT(e))&&(ln(t)||DK(t)==="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/")},FI=As.DOM,MK=(e,t)=>{const o=ye.fromDom(e.getBody()),s=fu(Yl(o)),a=ye.fromTag("style");Rr(a,"type","text/css"),fr(a,ye.fromText(t)),fr(s,a),e.on("remove",()=>{Jn(a)})},LK=e=>e.inline?e.getElement().nodeName.toLowerCase():void 0,HI=e=>Mi(e,t=>ln(t)===!1),_H=e=>{const t=e.options.get,o=e.editorUpload.blobCache;return HI({allow_conditional_comments:t("allow_conditional_comments"),allow_html_data_urls:t("allow_html_data_urls"),allow_svg_data_urls:t("allow_svg_data_urls"),allow_html_in_named_anchor:t("allow_html_in_named_anchor"),allow_script_urls:t("allow_script_urls"),allow_unsafe_link_target:t("allow_unsafe_link_target"),convert_unsafe_embeds:t("convert_unsafe_embeds"),convert_fonts_to_spans:t("convert_fonts_to_spans"),fix_list_elements:t("fix_list_elements"),font_size_legacy_values:t("font_size_legacy_values"),forced_root_block:t("forced_root_block"),forced_root_block_attrs:t("forced_root_block_attrs"),preserve_cdata:t("preserve_cdata"),inline_styles:t("inline_styles"),root_name:LK(e),sandbox_iframes:t("sandbox_iframes"),sandbox_iframes_exclusions:U_(e),sanitize:t("xss_sanitization"),validate:!0,blob_cache:o,document:e.getDoc()})},xH=e=>{const t=e.options.get;return HI({custom_elements:t("custom_elements"),extended_valid_elements:t("extended_valid_elements"),invalid_elements:t("invalid_elements"),invalid_styles:t("invalid_styles"),schema:t("schema"),valid_children:t("valid_children"),valid_classes:t("valid_classes"),valid_elements:t("valid_elements"),valid_styles:t("valid_styles"),verify_html:t("verify_html"),padd_empty_block_inline_children:t("format_empty_lines")})},BK=e=>{const t=e.options.get;return{..._H(e),...xH(e),...HI({remove_trailing_brs:t("remove_trailing_brs"),pad_empty_with_br:t("pad_empty_with_br"),url_converter:t("url_converter"),url_converter_scope:t("url_converter_scope"),element_format:t("element_format"),entities:t("entities"),entity_encoding:t("entity_encoding"),indent:t("indent"),indent_after:t("indent_after"),indent_before:t("indent_before")})}},PK=e=>{const t=r1(_H(e),e.schema);return t.addAttributeFilter("src,href,style,tabindex",(o,s)=>{const a=e.dom,c="data-mce-"+s;let d=o.length;for(;d--;){const h=o[d];let _=h.attr(s);if(_&&!h.attr(c)){if(_.indexOf("data:")===0||_.indexOf("blob:")===0)continue;s==="style"?(_=a.serializeStyle(a.parseStyle(_),h.name),_.length||(_=null),h.attr(c,_),h.attr(s,_)):s==="tabindex"?(h.attr(c,_),h.attr(s,null)):h.attr(c,e.convertURL(_,s,h.name))}}}),t.addNodeFilter("script",o=>{let s=o.length;for(;s--;){const a=o[s],c=a.attr("type")||"no/type";c.indexOf("mce-")!==0&&a.attr("type","mce-"+c)}}),cM(e)&&t.addNodeFilter("#cdata",o=>{var s;let a=o.length;for(;a--;){const c=o[a];c.type=8,c.name="#comment",c.value="[CDATA["+e.dom.encode((s=c.value)!==null&&s!==void 0?s:"")+"]]"}}),t.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",o=>{let s=o.length;const a=e.schema.getNonEmptyElements();for(;s--;){const c=o[s];c.isEmpty(a)&&c.getAll("br").length===0&&c.append(new pi("br",1))}}),t},IK=e=>{const t=oM(e);t&&$c.setEditorTimeout(e,()=>{let o;t===!0?o=e:o=e.editorManager.get(t),o&&!o.destroyed&&(o.focus(),o.selection.scrollIntoView())},100)},FK=e=>{const t=e.dom.getRoot();!e.inline&&(!Ly(e)||e.selection.getStart(!0)===t)&&No(t).each(o=>{const s=o.getNode(),a=ec(s)?No(s).getOr(o):o;e.selection.setRng(a.toRange())})},HK=e=>{e.bindPendingEventDelegates(),e.initialized=!0,Pr(e),e.focus(!0),FK(e),e.nodeChanged({initial:!0});const t=eM(e);Gt(t)&&t.call(e,e),IK(e)},$I=e=>e.inline?e.ui.styleSheetLoader:e.dom.styleSheetLoader,$K=(e,t,o)=>{const{pass:s,fail:a}=yt(t,h=>tinymce.Resource.has(JE(h))),d=[...s.map(h=>{const _=tinymce.Resource.get(JE(h));return ft(_)?Promise.resolve($I(e).loadRawCss(h,_)):Promise.resolve()}),$I(e).loadAll(a)];return e.inline?d:d.concat([e.ui.styleSheetLoader.loadAll(o)])},wH=e=>{const t=$I(e),o=ET(e),s=e.contentCSS,a=()=>{t.unloadAll(s),e.inline||e.ui.styleSheetLoader.unloadAll(o)},c=()=>{e.removed?a():e.on("remove",a)};if(e.contentStyles.length>0){let _="";zt.each(e.contentStyles,z=>{_+=z+`\r +`}),e.dom.addStyle(_)}const d=Promise.all($K(e,s,o)).then(c).catch(c),h=Ay(e);return h&&MK(e,h),d},VK=e=>{const t=e.getDoc(),o=e.getBody();NM(e),nM(e)||(t.body.spellcheck=!1,FI.setAttrib(o,"spellcheck","false")),e.quirks=OK(e),DM(e);const s=q5(e);s!==void 0&&(o.dir=s);const a=jn(e);a&&e.on("BeforeSetContent",c=>{zt.each(a,d=>{c.content=c.content.replace(d,h=>"")})}),e.on("SetContent",()=>{e.addVisual(e.getBody())}),e.on("compositionstart compositionend",c=>{e.composing=c.type==="compositionstart"})},jK=e=>{Pm(e)||e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"})},VI=e=>{e.removed!==!0&&(jK(e),HK(e))},UK=e=>{let t=!1;const o=setTimeout(()=>{t||e.setProgressState(!0)},500);return()=>{clearTimeout(o),t=!0,e.setProgressState(!1)}},kH=e=>{const t=e.getElement();let o=e.getDoc();e.inline&&(FI.addClass(t,"mce-content-body"),e.contentDocument=o=document,e.contentWindow=window,e.bodyElement=t,e.contentAreaContainer=t);const s=e.getBody();s.disabled=!0,e.readonly=LT(e),e._editableRoot=ss(e),!e.readonly&&e.hasEditableRoot()&&(e.inline&&FI.getStyle(s,"position",!0)==="static"&&(s.style.position="relative"),s.contentEditable="true"),s.disabled=!1,e.editorUpload=eA(e),e.schema=Dc(xH(e)),e.dom=As(o,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,update_styles:!0,root_element:e.inline?e.getBody():null,collect:e.inline,schema:e.schema,contentCssCors:CT(e),referrerPolicy:h0(e),onSetAttrib:d=>{e.dispatch("SetAttrib",d)}}),e.parser=PK(e),e.serializer=CN(BK(e),e),e.selection=FE(e.dom,e.getWin(),e.serializer,e),e.annotator=F4(e),e.formatter=jv(e),e.undoManager=nD(e),e._nodeChangeDispatcher=new IZ(e),e._selectionOverrides=Qq(e),on(e),sq(e),e_(e),Pm(e)||(uq(e),TK(e));const a=PZ(e);yo(e,a),Ea(e),cD(e),tq(e);const c=aN(e);VK(e),RK(e),c.fold(()=>{const d=UK(e);wH(e).then(()=>{VI(e),d()})},d=>{e.setProgressState(!0),wH(e).then(()=>{d().then(h=>{e.setProgressState(!1),VI(e),mN(e)},h=>{e.notificationManager.open({type:"error",text:String(h)}),VI(e),mN(e)})})})},ZK=zo,WK=(e,t,o)=>E(e,t,ZK,o),jI=As.DOM,qK=(e,t,o,s)=>{const a=ye.fromTag("iframe");return s.each(c=>Rr(a,"tabindex",c)),$a(a,o),$a(a,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),ql(a,"tox-edit-area__iframe"),a},KK=e=>{let t=zu(e)+"";id(e)!==e.documentBaseUrl&&(t+=''),t+='';const o=H_(e),s=Xk(e),a=e.translate(y0(e));return yT(e)&&(t+=''),t+=`
    `,t},GK=(e,t)=>{const o=Jo.browser.isFirefox()?y0(e):"Rich Text Area",s=e.translate(o),a=Sr(ye.fromDom(e.getElement()),"tabindex").bind(Vr),c=qK(e.id,s,nl(e),a).dom;c.onload=()=>{c.onload=null,e.dispatch("load")},e.contentAreaContainer=t.iframeContainer,e.iframeElement=c,e.iframeHTML=KK(e),jI.add(t.iframeContainer,c)},YK=e=>{const t=e.iframeElement,o=()=>{e.contentDocument=t.contentDocument,kH(e)};if(VT(e)||Jo.browser.isFirefox()){const s=e.getDoc();s.open(),s.write(e.iframeHTML),s.close(),o()}else{const s=WK(ye.fromDom(t),"load",()=>{s.unbind(),o()});t.srcdoc=e.iframeHTML}},XK=(e,t)=>{GK(e,t),t.editorContainer&&(t.editorContainer.style.display=e.orgDisplay,e.hidden=jI.isHidden(t.editorContainer)),e.getElement().style.display="none",jI.setAttrib(e.id,"aria-hidden","true"),e.getElement().style.visibility=e.orgVisibility,YK(e)},CH=As.DOM,JK=(e,t,o)=>{const s=Ab.get(o),a=Ab.urls[o]||e.documentBaseUrl.replace(/\/$/,"");if(o=zt.trim(o),s&&zt.inArray(t,o)===-1){if(e.plugins[o])return;try{const c=s(e,a)||{};e.plugins[o]=c,Gt(c.init)&&(c.init(e,a),t.push(o))}catch(c){UB(e,o,c)}}},QK=e=>e.replace(/^\-/,""),eG=e=>{const t=[];Be(Nu(e),o=>{JK(e,t,QK(o))})},tG=e=>{const t=zt.trim(o2(e)),o=e.ui.registry.getAll().icons,s={...Iv.get("default").icons,...Iv.get(t).icons};nn(s,(a,c)=>{Ro(o,c)||e.ui.registry.addIcon(c,a)})},oG=e=>{const t=Ty(e);if(ft(t)){const o=Xg.get(t);e.theme=o(e,Xg.urls[t])||{},Gt(e.theme.init)&&e.theme.init(e,Xg.urls[t]||e.documentBaseUrl.replace(/\/$/,""))}else e.theme={}},nG=e=>{const t=b0(e),o=Yg.get(t);e.model=o(e,Yg.urls[t])},sG=e=>{const t=e.theme.renderUI;return t?t():EH(e)},rG=e=>{const t=e.getElement(),s=Ty(e)(e,t);return s.editorContainer.nodeType&&(s.editorContainer.id=s.editorContainer.id||e.id+"_parent"),s.iframeContainer&&s.iframeContainer.nodeType&&(s.iframeContainer.id=s.iframeContainer.id||e.id+"_iframecontainer"),s.height=s.iframeHeight?s.iframeHeight:t.offsetHeight,s},SH=(e,t)=>({editorContainer:e,iframeContainer:t,api:{}}),aG=e=>{const t=CH.create("div");return CH.insertAfter(t,e),SH(t,t)},EH=e=>{const t=e.getElement();return e.inline?SH(null):aG(t)},iG=e=>{const t=e.getElement();return e.orgDisplay=t.style.display,ft(Ty(e))?sG(e):Gt(Ty(e))?rG(e):EH(e)},lG=(e,t)=>{const o={show:j.from(t.show).getOr(dt),hide:j.from(t.hide).getOr(dt),isEnabled:j.from(t.isEnabled).getOr(zo),setEnabled:s=>{e.mode.isReadOnly()||j.from(t.setEnabled).each(a=>a(s))}};e.ui={...e.ui,...o}},cG=async e=>{e.dispatch("ScriptsLoaded"),tG(e),oG(e),nG(e),eG(e);const t=await iG(e);lG(e,j.from(t.api).getOr({})),e.editorContainer=t.editorContainer,UN(e),e.inline?kH(e):XK(e,{editorContainer:t.editorContainer,iframeContainer:t.iframeContainer})},r_=As.DOM,AH=e=>e.charAt(0)==="-",dG=(e,t)=>{const o=r2(t),s=W5(t);if(!Rc.hasCode(o)&&o!=="en"){const a=Pn(s)?s:`${t.editorManager.baseURL}/langs/${o}.js`;e.add(a).catch(()=>{VB(t,a,o)})}},uG=(e,t)=>{const o=Ty(e);if(ft(o)&&!AH(o)&&!Ro(Xg.urls,o)){const s=G5(e),a=s?e.documentBaseURI.toAbsolute(s):`themes/${o}/theme${t}.js`;Xg.load(o,a).catch(()=>{VN(e,a,o)})}},fG=(e,t)=>{const o=b0(e);if(o!=="plugin"&&!Ro(Yg.urls,o)){const s=i2(e),a=ft(s)?e.documentBaseURI.toAbsolute(s):`models/${o}/model${t}.js`;Yg.load(o,a).catch(()=>{jB(e,a,o)})}},mG=e=>j.from(wT(e)).filter(Pn).map(t=>({url:t,name:j.none()})),TH=(e,t,o)=>j.from(t).filter(s=>Pn(s)&&!Iv.has(s)).map(s=>({url:`${e.editorManager.baseURL}/icons/${s}/icons${o}.js`,name:j.some(s)})),pG=(e,t,o)=>{const s=TH(t,"default",o),a=mG(t).orThunk(()=>TH(t,o2(t),""));Be(Hf([s,a]),c=>{e.add(c.url).catch(()=>{YE(t,c.url,c.name.getOrUndefined())})})},gG=(e,t)=>{const o=(s,a)=>{Ab.load(s,a).catch(()=>{GE(e,a,s)})};nn(vm(e),(s,a)=>{o(a,s),e.options.set("plugins",Nu(e).concat(a))}),Be(Nu(e),s=>{s=zt.trim(s),s&&!Ab.urls[s]&&!AH(s)&&o(s,`plugins/${s}/plugin${t}.js`)})},hG=e=>{const t=Ty(e);return!ft(t)||Fe(Xg.get(t))},bG=e=>{const t=b0(e);return Fe(Yg.get(t))},yG=(e,t)=>{const o=el.ScriptLoader,s=()=>{!e.removed&&hG(e)&&bG(e)&&cG(e)};uG(e,t),fG(e,t),dG(o,e),pG(o,e,t),gG(e,t),o.loadQueue().then(s,s)},vG=(e,t)=>Ks.forElement(e,{contentCssCors:BT(t),referrerPolicy:h0(t)}),_G=e=>{const t=e.id;Rc.setCode(r2(e));const o=()=>{r_.unbind(window,"ready",o),e.render()};if(!rf.Event.domLoaded){r_.bind(window,"ready",o);return}if(!e.getElement())return;const s=ye.fromDom(e.getElement()),a=Va(s);e.on("remove",()=>{Bt(s.dom.attributes,d=>rn(s,d.name)),$a(s,a)}),e.ui.styleSheetLoader=vG(s,e),qh(e)?e.inline=!0:(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden");const c=e.getElement().form||r_.getParent(t,"form");c&&(e.formElement=c,l2(e)&&!Jf(e.getElement())&&(r_.insertAfter(r_.create("input",{type:"hidden",name:t}),t),e.hasHiddenInput=!0),e.formEventDelegate=d=>{e.dispatch(d.type,d)},r_.bind(c,"submit reset",e.formEventDelegate),e.on("reset",()=>{e.resetContent()}),NT(e)&&!c.submit.nodeType&&!c.submit.length&&!c._mceOldSubmit&&(c._mceOldSubmit=c.submit,c.submit=()=>(e.editorManager.triggerSave(),e.setDirty(!1),c._mceOldSubmit(c)))),e.windowManager=HN(e),e.notificationManager=KE(e),jT(e)&&e.on("GetContent",d=>{d.save&&(d.content=r_.encode(d.content))}),DT(e)&&e.on("submit",()=>{e.initialized&&e.save()}),RT(e)&&(e._beforeUnload=()=>{e.initialized&&!e.destroyed&&!e.isHidden()&&e.save({format:"raw",no_events:!0,set_dirty:!1})},e.editorManager.on("BeforeUnload",e._beforeUnload)),e.editorManager.add(e),yG(e,e.suffix)},xG=(e,t)=>{e._editableRoot!==t&&(e._editableRoot=t,e.readonly||(e.getBody().contentEditable=String(e.hasEditableRoot()),e.nodeChanged()),LM(e,t))},wG=e=>e._editableRoot,kG=(e,t)=>({sections:Ge(e),options:Ge(t)}),OH=_t().deviceType,zH=OH.isPhone(),CG=OH.isTablet(),QA=e=>{if(uo(e))return[];{const t=ve(e)?e:e.split(/[ ,]/),o=dn(t,br);return rt(o,Pn)}},SG=(e,t)=>{const o=ll(t,(s,a)=>mn(e,a));return kG(o.t,o.f)},EG=(e,t,o={})=>{const s=e.sections(),a=Gn(s,t).getOr({});return zt.extend({},o,a)},UI=(e,t)=>Ro(e.sections(),t),AG=(e,t)=>UI(e,t)?e.sections()[t]:{},TG=(e,t)=>({...{table_grid:!1,object_resizing:!1,resize:!1,toolbar_mode:Gn(e,"toolbar_mode").getOr("scrolling"),toolbar_sticky:!1},...t?{menubar:!1}:{}}),OG=(e,t)=>{var o;const s=(o=t.external_plugins)!==null&&o!==void 0?o:{};return e&&e.external_plugins?zt.extend({},e.external_plugins,s):s},zG=(e,t)=>[...QA(e),...QA(t)],NG=(e,t,o,s)=>e&&UI(t,"mobile")?s:o,DG=(e,t,o,s)=>{const a=QA(o.forced_plugins),c=QA(s.plugins),d=AG(t,"mobile"),h=d.plugins?QA(d.plugins):c,_=NG(e,t,c,h),z=zG(a,_);return zt.extend(s,{forced_plugins:a,plugins:z})},RG=(e,t)=>e&&UI(t,"mobile"),MG=(e,t,o,s,a)=>{var c;const d=e?{mobile:TG((c=a.mobile)!==null&&c!==void 0?c:{},t)}:{},h=SG(["mobile"],NR(d,a)),_=zt.extend(o,s,h.options(),RG(e,h)?EG(h,"mobile"):{},{external_plugins:OG(s,h.options())});return DG(e,h,s,_)},LG=(e,t)=>{const o=S8(t);return MG(zH||CG,zH,o,e,o)},BG=(e,t)=>fN(e,t),PG=e=>{const t=(s,a)=>{e.formatter.toggle(s,a),e.nodeChanged()},o=s=>()=>{Be("left,center,right,justify".split(","),a=>{s!==a&&e.formatter.remove("align"+a)}),s!=="none"&&t("align"+s)};e.editorCommands.addCommands({JustifyLeft:o("left"),JustifyCenter:o("center"),JustifyRight:o("right"),JustifyFull:o("justify"),JustifyNone:o("none")})},IG=e=>{const t=o=>()=>{const s=e.selection,a=s.isCollapsed()?[e.dom.getParent(s.getNode(),e.dom.isBlock)]:s.getSelectedBlocks();return Ln(a,c=>Fe(e.formatter.matchNode(c,o)))};e.editorCommands.addCommands({JustifyLeft:t("alignleft"),JustifyCenter:t("aligncenter"),JustifyRight:t("alignright"),JustifyFull:t("alignjustify")},"state")},FG=e=>{PG(e),IG(e)},HG=e=>{e.editorCommands.addCommands({"Cut,Copy,Paste":t=>{const o=e.getDoc();let s;try{o.execCommand(t)}catch{s=!0}if(t==="paste"&&!o.queryCommandEnabled(t)&&(s=!0),s||!o.queryCommandSupported(t)){let a=e.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");(Jo.os.isMacOS()||Jo.os.isiOS())&&(a=a.replace(/Ctrl\+/g,"⌘+")),e.notificationManager.open({text:a,type:"error"})}}})},$G=(e,t,o,s)=>{const a=ye.fromDom(e.getRoot());return Gy(a,Ue.fromRangeStart(t),s)?o=o.replace(/^ /," "):o=o.replace(/^ /," "),hb(a,Ue.fromRangeEnd(t),s)?o=o.replace(/( | )()?$/," "):o=o.replace(/ ()?$/," "),o},VG=e=>{if(typeof e!="string"){const t=zt.extend({paste:e.paste,data:{paste:e.paste}},e);return{content:e.content,details:t}}return{content:e,details:{}}},jG=(e,t)=>{const o=e.selection,s=e.dom;return/^ | $/.test(t)?$G(s,o.getRng(),t,e.schema):t},e5=(e,t)=>{if(e.selection.isEditable()){const{content:o,details:s}=VG(t);mE(e,{...s,content:jG(e,o),format:"html",set:!1,selection:!0}).each(a=>{const c=_B(e,a.content,s);pE(e,c,a),e.addVisual()})}},UG=e=>{e.editorCommands.addCommands({mceCleanup:()=>{const t=e.selection.getBookmark();e.setContent(e.getContent()),e.selection.moveToBookmark(t)},insertImage:(t,o,s)=>{e5(e,e.dom.createHTML("img",{src:s}))},insertHorizontalRule:()=>{e.execCommand("mceInsertContent",!1,"
    ")},insertText:(t,o,s)=>{e5(e,e.dom.encode(s))},insertHTML:(t,o,s)=>{e5(e,s)},mceInsertContent:(t,o,s)=>{e5(e,s)},mceSetContent:(t,o,s)=>{e.setContent(s)},mceReplaceContent:(t,o,s)=>{e.execCommand("mceInsertContent",!1,s.replace(/\{\$selection\}/g,e.selection.getContent({format:"text"})))},mceNewDocument:()=>{e.setContent(qn(e))}})},ZG={"font-size":"size","font-family":"face"},WG=Sd("font"),qG=(e,t,o)=>{const s=c=>Us(c,e).orThunk(()=>WG(c)?Gn(ZG,e).bind(d=>Sr(c,d)):j.none()),a=c=>kn(ye.fromDom(t),c);return _v(ye.fromDom(o),c=>s(c),a)},KG=e=>e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,","),GG=(e,t)=>j.from(As.DOM.getStyle(t,e,!0)),NH=e=>(t,o)=>j.from(o).map(ye.fromDom).filter(cr).bind(s=>qG(e,t,s.dom).or(GG(e,s.dom))).getOr(""),YG=NH("font-size"),XG=Kt(KG,NH("font-family")),JG=e=>No(e.getBody()).bind(t=>{const o=t.container();return j.from(wt(o)?o.parentNode:o)}),QG=e=>j.from(e.selection.getRng()).bind(t=>{const o=e.getBody();return t.startContainer===o&&t.startOffset===0?j.none():j.from(e.selection.getStart(!0))}),eY=(e,t)=>QG(e).orThunk(Ht(JG,e)).map(ye.fromDom).filter(cr).bind(t),ZI=(e,t)=>eY(e,qo(j.some,t)),DH=(e,t)=>{if(/^[0-9.]+$/.test(t)){const o=parseInt(t,10);if(o>=1&&o<=7){const s=u2(e),a=f2(e);return a.length>0?a[o-1]||t:s[o-1]||t}else return t}else return t},tY=e=>{const t=e.split(/\s*,\s*/);return dn(t,o=>o.indexOf(" ")!==-1&&!(vs(o,'"')||vs(o,"'"))?`'${o}'`:o).join(",")},oY=(e,t)=>{const o=DH(e,t);e.formatter.toggle("fontname",{value:tY(o)}),e.nodeChanged()},nY=e=>ZI(e,t=>XG(e.getBody(),t.dom)).getOr(""),sY=(e,t)=>{e.formatter.toggle("fontsize",{value:DH(e,t)}),e.nodeChanged()},rY=e=>ZI(e,t=>YG(e.getBody(),t.dom)).getOr(""),aY=e=>ZI(e,t=>{const o=ye.fromDom(e.getBody()),s=_v(t,c=>Us(c,"line-height"),Ht(kn,o)),a=()=>{const c=parseFloat(ur(t,"line-height")),d=parseFloat(ur(t,"font-size"));return String(c/d)};return s.getOrThunk(a)}).getOr(""),iY=(e,t)=>{e.formatter.toggle("lineheight",{value:String(t)}),e.nodeChanged()},lY=e=>{const t=(o,s)=>{e.formatter.toggle(o,s),e.nodeChanged()};e.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":o=>{t(o)},"ForeColor,HiliteColor":(o,s,a)=>{t(o,{value:a})},BackColor:(o,s,a)=>{t("hilitecolor",{value:a})},FontName:(o,s,a)=>{oY(e,a)},FontSize:(o,s,a)=>{sY(e,a)},LineHeight:(o,s,a)=>{iY(e,a)},Lang:(o,s,a)=>{var c;t(o,{value:a.code,customValue:(c=a.customCode)!==null&&c!==void 0?c:null})},RemoveFormat:o=>{e.formatter.remove(o)},mceBlockQuote:()=>{t("blockquote")},FormatBlock:(o,s,a)=>{t(ft(a)?a:"p")},mceToggleFormat:(o,s,a)=>{t(a)}})},cY=e=>{const t=o=>e.formatter.match(o);e.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":o=>t(o),mceBlockQuote:()=>t("blockquote")},"state"),e.editorCommands.addQueryValueHandler("FontName",()=>nY(e)),e.editorCommands.addQueryValueHandler("FontSize",()=>rY(e)),e.editorCommands.addQueryValueHandler("LineHeight",()=>aY(e))},dY=e=>{lY(e),cY(e)},uY=e=>{e.editorCommands.addCommands({mceAddUndoLevel:()=>{e.undoManager.add()},mceEndUndoLevel:()=>{e.undoManager.add()},Undo:()=>{e.undoManager.undo()},Redo:()=>{e.undoManager.redo()}})},fY=e=>{e.editorCommands.addCommands({Indent:()=>{tt(e)},Outdent:()=>{Je(e)}}),e.editorCommands.addCommands({Outdent:()=>ne(e)},"state")},mY=e=>{const t=(o,s,a)=>{const c=ft(a)?{href:a}:a,d=e.dom.getParent(e.selection.getNode(),"a");ue(c)&&ft(c.href)&&(c.href=c.href.replace(/ /g,"%20"),(!d||!c.href)&&e.formatter.remove("link"),c.href&&e.formatter.apply("link",c,d))};e.editorCommands.addCommands({unlink:()=>{if(e.selection.isEditable()){if(e.selection.isCollapsed()){const o=e.dom.getParent(e.selection.getStart(),"a");o&&e.dom.remove(o,!0);return}e.formatter.remove("link")}},mceInsertLink:t,createLink:t})},pY=(e,t,o,s)=>{const a=e.dom,c=h=>a.isBlock(h)&&h.parentElement===o,d=c(t)?t:a.getParent(s,c,o);return j.from(d).map(ye.fromDom)},RH=(e,t)=>{const o=e.dom,s=e.selection.getRng(),a=t?e.selection.getStart():e.selection.getEnd(),c=t?s.startContainer:s.endContainer,d=KA(o,c);if(!d||!d.isContentEditable)return;const h=t?Zs:Ne,_=Vi(e);pY(e,a,d,c).each(z=>{const I=X8(e,c,z.dom,d,!1,_);h(z,ye.fromDom(I)),e.selection.setCursorLocation(I,0),e.dispatch("NewBlock",{newBlock:I}),qA(e,"insertParagraph")})},gY=e=>RH(e,!0),hY=e=>RH(e,!1),bY=e=>{e.editorCommands.addCommands({InsertNewBlockBefore:()=>{gY(e)},InsertNewBlockAfter:()=>{hY(e)}})},yY=e=>{e.editorCommands.addCommands({insertParagraph:()=>{$R(tF,e)},mceInsertNewLine:(t,o,s)=>{lF(e,s)},InsertLineBreak:(t,o,s)=>{$R(sF,e)}})},vY=e=>{e.editorCommands.addCommands({mceSelectNodeDepth:(t,o,s)=>{let a=0;e.dom.getParent(e.selection.getNode(),c=>no(c)&&a++===s?(e.selection.select(c),!1):!0,e.getBody())},mceSelectNode:(t,o,s)=>{e.selection.select(s)},selectAll:()=>{const t=e.dom.getParent(e.selection.getStart(),Rl);if(t){const o=e.dom.createRng();o.selectNodeContents(t),e.selection.setRng(o)}}})},_Y=e=>{e.editorCommands.addCommands({mceRemoveNode:(t,o,s)=>{const a=s??e.selection.getNode();if(a!==e.getBody()){const c=e.selection.getBookmark();e.dom.remove(a,!0),e.selection.moveToBookmark(c)}},mcePrint:()=>{e.getWin().print()},mceFocus:(t,o,s)=>{k3(e,s===!0)},mceToggleVisualAid:()=>{e.hasVisual=!e.hasVisual,e.addVisual()}})},xY=e=>{FG(e),HG(e),uY(e),vY(e),UG(e),mY(e),fY(e),bY(e),yY(e),dY(e),_Y(e)},wY=["toggleview"],MH=e=>mn(wY,e.toLowerCase());class LH{constructor(t){this.commands={state:{},exec:{},value:{}},this.editor=t}execCommand(t,o=!1,s,a){const c=this.editor,d=t.toLowerCase(),h=a==null?void 0:a.skip_focus;if(c.removed||(d!=="mcefocus"&&(!/^(mceAddUndoLevel|mceEndUndoLevel)$/i.test(d)&&!h?c.focus():Sx(c)),c.dispatch("BeforeExecCommand",{command:t,ui:o,value:s}).isDefaultPrevented()))return!1;const z=this.commands.exec[d];return Gt(z)?(z(d,o,s),c.dispatch("ExecCommand",{command:t,ui:o,value:s}),!0):!1}queryCommandState(t){if(!MH(t)&&this.editor.quirks.isHidden()||this.editor.removed)return!1;const o=t.toLowerCase(),s=this.commands.state[o];return Gt(s)?s(o):!1}queryCommandValue(t){if(!MH(t)&&this.editor.quirks.isHidden()||this.editor.removed)return"";const o=t.toLowerCase(),s=this.commands.value[o];return Gt(s)?s(o):""}addCommands(t,o="exec"){const s=this.commands;nn(t,(a,c)=>{Be(c.toLowerCase().split(","),d=>{s[o][d]=a})})}addCommand(t,o,s){const a=t.toLowerCase();this.commands.exec[a]=(c,d,h)=>o.call(s??this.editor,d,h)}queryCommandSupported(t){const o=t.toLowerCase();return!!this.commands.exec[o]}addQueryStateHandler(t,o,s){this.commands.state[t.toLowerCase()]=()=>o.call(s??this.editor)}addQueryValueHandler(t,o,s){this.commands.value[t.toLowerCase()]=()=>o.call(s??this.editor)}}const a_="data-mce-contenteditable",kY=(e,t,o)=>{yc(e,t)&&!o?Ra(e,t):o&&ql(e,t)},WI=(e,t,o)=>{try{e.getDoc().execCommand(t,!1,String(o))}catch{}},t5=(e,t)=>{e.dom.contentEditable=t?"true":"false"},CY=e=>{Be(Mr(e,'*[contenteditable="true"]'),t=>{Rr(t,a_,"true"),t5(t,!1)})},SY=e=>{Be(Mr(e,`*[${a_}="true"]`),t=>{rn(t,a_),t5(t,!0)})},EY=e=>{j.from(e.selection.getNode()).each(t=>{t.removeAttribute("data-mce-selected")})},AY=e=>{e.selection.setRng(e.selection.getRng())},TY=(e,t)=>{const o=ye.fromDom(e.getBody());kY(o,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),EY(e),e.readonly=!0,t5(o,!1),CY(o)):(e.readonly=!1,e.hasEditableRoot()&&t5(o,!0),SY(o),WI(e,"StyleWithCSS",!1),WI(e,"enableInlineTableEditing",!1),WI(e,"enableObjectResizing",!1),db(e)&&e.focus(),AY(e),e.nodeChanged())},i_=e=>e.readonly,BH=e=>{e.parser.addAttributeFilter("contenteditable",t=>{i_(e)&&Be(t,o=>{o.attr(a_,o.attr("contenteditable")),o.attr("contenteditable","false")})}),e.serializer.addAttributeFilter(a_,t=>{i_(e)&&Be(t,o=>{o.attr("contenteditable",o.attr(a_))})}),e.serializer.addTempAttr(a_)},OY=e=>{e.serializer?BH(e):e.on("PreInit",()=>{BH(e)})},zY=e=>e.type==="click",NY=["copy"],DY=e=>mn(NY,e.type),RY=(e,t)=>Xr(t,"a",s=>kn(s,ye.fromDom(e.getBody()))).bind(s=>Sr(s,"href")),MY=(e,t)=>{if(zY(t)&&!Zt.metaKeyPressed(t)){const o=ye.fromDom(t.target);RY(e,o).each(s=>{if(t.preventDefault(),/^#/.test(s)){const a=e.dom.select(`${s},[name="${xi(s,"#")}"]`);a.length&&e.selection.scrollIntoView(a[0],!0)}else window.open(s,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")})}else DY(t)&&e.dispatch(t.type,t)},LY=e=>{e.on("ShowCaret",t=>{i_(e)&&t.preventDefault()}),e.on("ObjectSelected",t=>{i_(e)&&t.preventDefault()})},BY=zt.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 qI{static isNative(t){return!!BY[t.toLowerCase()]}constructor(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||fn}fire(t,o){return this.dispatch(t,o)}dispatch(t,o){const s=t.toLowerCase(),a=oy(s,o??{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(a);const c=this.bindings[s];if(c)for(let d=0,h=c.length;d{this.toggleEvent(_,!1),delete this.bindings[_]}),this;if(d){if(!o)d.length=0;else{const h=yt(d,_=>_.func===o);d=h.fail,this.bindings[c]=d,Be(h.pass,_=>{_.removed=!0})}d.length||(this.toggleEvent(t,!1),delete this.bindings[c])}}}else nn(this.bindings,(s,a)=>{this.toggleEvent(a,!1)}),this.bindings={};return this}once(t,o,s){return this.on(t,o,s,{once:!0})}has(t){t=t.toLowerCase();const o=this.bindings[t];return!(!o||o.length===0)}}const eT=e=>(e._eventDispatcher||(e._eventDispatcher=new qI({scope:e,toggleEvent:(t,o)=>{qI.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,o)}})),e._eventDispatcher),KI={fire(e,t,o){return this.dispatch(e,t,o)},dispatch(e,t,o){const s=this;if(s.removed&&e!=="remove"&&e!=="detach")return oy(e.toLowerCase(),t??{},s);const a=eT(s).dispatch(e,t);if(o!==!1&&s.parent){let c=s.parent();for(;c&&!a.isPropagationStopped();)c.dispatch(e,a,!1),c=c.parent?c.parent():void 0}return a},on(e,t,o){return eT(this).on(e,t,o)},off(e,t){return eT(this).off(e,t)},once(e,t){return eT(this).once(e,t)},hasEventListeners(e){return eT(this).has(e)}},o5=As.DOM;let l_;const n5=(e,t)=>{if(t==="selectionchange")return e.getDoc();if(!e.inline&&/^(?:mouse|touch|click|contextmenu|drop|dragover|dragend)/.test(t))return e.getDoc().documentElement;const o=OT(e);return o?(e.eventRoot||(e.eventRoot=o5.select(o)[0]),e.eventRoot):e.getBody()},PY=e=>!e.hidden&&!i_(e),PH=(e,t,o)=>{PY(e)?e.dispatch(t,o):i_(e)&&MY(e,o)},IH=(e,t)=>{if(e.delegates||(e.delegates={}),e.delegates[t]||e.removed)return;const o=n5(e,t);if(OT(e)){if(l_||(l_={},e.editorManager.on("removeEditor",()=>{e.editorManager.activeEditor||l_&&(nn(l_,(a,c)=>{e.dom.unbind(n5(e,c))}),l_=null)})),l_[t])return;const s=a=>{const c=a.target,d=e.editorManager.get();let h=d.length;for(;h--;){const _=d[h].getBody();(_===c||o5.isChildOf(c,_))&&PH(d[h],t,a)}};l_[t]=s,o5.bind(o,t,s)}else{const s=a=>{PH(e,t,a)};o5.bind(o,t,s),e.delegates[t]=s}},FH={...KI,bindPendingEventDelegates(){const e=this;zt.each(e._pendingNativeEvents,t=>{IH(e,t)})},toggleNativeEvent(e,t){const o=this;e==="focus"||e==="blur"||o.removed||(t?o.initialized?IH(o,e):o._pendingNativeEvents?o._pendingNativeEvents.push(e):o._pendingNativeEvents=[e]:o.initialized&&o.delegates&&(o.dom.unbind(n5(o,e),e,o.delegates[e]),delete o.delegates[e]))},unbindAllNativeEvents(){const e=this,t=e.getBody(),o=e.dom;e.delegates&&(nn(e.delegates,(s,a)=>{e.dom.unbind(n5(e,a),a,s)}),delete e.delegates),!e.inline&&t&&o&&(t.onload=null,o.unbind(e.getWin()),o.unbind(e.getDoc())),o&&(o.unbind(t),o.unbind(e.getContainer()))}},IY=e=>ft(e)?{value:e.split(/[ ,]/),valid:!0}:bt(e,ft)?{value:e,valid:!0}:{valid:!1,message:"The value must be a string[] or a comma/space separated string."},FY=e=>{const t=(()=>{switch(e){case"array":return ve;case"boolean":return bn;case"function":return Gt;case"number":return D;case"object":return ue;case"string":return ft;case"string[]":return IY;case"object[]":return o=>bt(o,ue);case"regexp":return o=>Ut(o,RegExp);default:return zo}})();return o=>GI(o,t,`The value must be a ${e}.`)},HY=e=>ft(e.processor),HH=(e,t)=>{const o=wi(t.message)?"":`. ${t.message}`;return e+o},$H=e=>e.valid,GI=(e,t,o="")=>{const s=t(e);return bn(s)?s?{value:e,valid:!0}:{valid:!1,message:o}:s},$Y=(e,t,o)=>{if(!ln(t)){const s=GI(t,o);if($H(s))return s.value;console.error(HH(`Invalid default value passed for the "${e}" option`,s))}},VY=(e,t,o=t)=>{const s={},a={},c=(ee,le,oe)=>{const fe=GI(le,oe);return $H(fe)?(a[ee]=fe.value,!0):(console.warn(HH(`Invalid value passed for the ${ee} option`,fe)),!1)},d=(ee,le)=>{const oe=HY(le)?FY(le.processor):le.processor,fe=$Y(ee,le.default,oe);s[ee]={...le,default:fe,processor:oe},Gn(a,ee).orThunk(()=>Gn(t,ee)).each(Oe=>c(ee,Oe,oe))},h=ee=>Ro(s,ee);return{register:d,isRegistered:h,get:ee=>Gn(a,ee).orThunk(()=>Gn(s,ee).map(le=>le.default)).getOrUndefined(),set:(ee,le)=>{if(h(ee)){const oe=s[ee];return oe.immutable?(console.error(`"${ee}" is an immutable option and cannot be updated`),!1):c(ee,le,oe.processor)}else return console.warn(`"${ee}" is not a registered option. Ensure the option has been registered before setting a value.`),!1},unset:ee=>{const le=h(ee);return le&&delete a[ee],le},isSet:ee=>Ro(a,ee),debug:()=>{try{console.log(JSON.parse(JSON.stringify(o,(ee,le)=>bn(le)||D(le)||ft(le)||ot(le)||ve(le)||Ct(le)?le:Object.prototype.toString.call(le))))}catch(ee){console.error(ee)}}}},jY=["design","readonly"],VH=(e,t,o,s)=>{const a=o[t.get()],c=o[s];try{c.activate()}catch(d){console.error(`problem while activating editor mode ${s}:`,d);return}a.deactivate(),a.editorReadOnly!==c.editorReadOnly&&TY(e,c.editorReadOnly),t.set(s),H4(e,s)},UY=(e,t,o,s)=>{if(s!==o.get()){if(!Ro(t,s))throw new Error(`Editor mode '${s}' is invalid`);e.initialized?VH(e,o,t,s):e.on("init",()=>VH(e,o,t,s))}},ZY=(e,t,o)=>{if(mn(jY,t))throw new Error(`Cannot override default mode ${t}`);return{...e,[t]:{...o,deactivate:()=>{try{o.deactivate()}catch(s){console.error(`problem while deactivating editor mode ${t}:`,s)}}}}},WY=e=>{const t=Er("design"),o=Er({design:{activate:dt,deactivate:dt,editorReadOnly:!1},readonly:{activate:dt,deactivate:dt,editorReadOnly:!0}});return OY(e),LY(e),{isReadOnly:()=>i_(e),set:s=>UY(e,o.get(),t,s),get:()=>t.get(),register:(s,a)=>{o.set(ZY(o.get(),s,a))}}},YI=zt.each,XI=zt.explode,qY={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},jH=zt.makeMap("alt,ctrl,shift,meta,access"),KY=e=>e in jH,GY=e=>{const t={},o=Jo.os.isMacOS()||Jo.os.isiOS();YI(XI(e.toLowerCase(),"+"),c=>{KY(c)?t[c]=!0:/^[0-9]{2,}$/.test(c)?t.keyCode=parseInt(c,10):(t.charCode=c.charCodeAt(0),t.keyCode=qY[c]||c.toUpperCase().charCodeAt(0))});const s=[t.keyCode];let a;for(a in jH)t[a]?s.push(a):t[a]=!1;return t.id=s.join(","),t.access&&(t.alt=!0,o?t.ctrl=!0:t.shift=!0),t.meta&&(o?t.meta=!0:(t.ctrl=!0,t.meta=!1)),t};class UH{constructor(t){this.shortcuts={},this.pendingPatterns=[],this.editor=t;const o=this;t.on("keyup keypress keydown",s=>{(o.hasModifier(s)||o.isFunctionKey(s))&&!s.isDefaultPrevented()&&(YI(o.shortcuts,a=>{o.matchShortcut(s,a)&&(o.pendingPatterns=a.subpatterns.slice(0),s.type==="keydown"&&o.executeShortcutAction(a))}),o.matchShortcut(s,o.pendingPatterns[0])&&(o.pendingPatterns.length===1&&s.type==="keydown"&&o.executeShortcutAction(o.pendingPatterns[0]),o.pendingPatterns.shift()))})}add(t,o,s,a){const c=this,d=c.normalizeCommandFunc(s);return YI(XI(zt.trim(t)),h=>{const _=c.createShortcut(h,o,d,a);c.shortcuts[_.id]=_}),!0}remove(t){const o=this.createShortcut(t);return this.shortcuts[o.id]?(delete this.shortcuts[o.id],!0):!1}normalizeCommandFunc(t){const o=this,s=t;return typeof s=="string"?()=>{o.editor.execCommand(s,!1,null)}:zt.isArray(s)?()=>{o.editor.execCommand(s[0],s[1],s[2])}:s}createShortcut(t,o,s,a){const c=zt.map(XI(t,">"),GY);return c[c.length-1]=zt.extend(c[c.length-1],{func:s,scope:a||this.editor}),zt.extend(c[0],{desc:this.editor.translate(o),subpatterns:c.slice(1)})}hasModifier(t){return t.altKey||t.ctrlKey||t.metaKey}isFunctionKey(t){return t.type==="keydown"&&t.keyCode>=112&&t.keyCode<=123}matchShortcut(t,o){return!o||o.ctrl!==t.ctrlKey||o.meta!==t.metaKey||o.alt!==t.altKey||o.shift!==t.shiftKey?!1:t.keyCode===o.keyCode||t.charCode&&t.charCode===o.charCode?(t.preventDefault(),!0):!1}executeShortcutAction(t){return t.func?t.func.call(t.scope):null}}const YY=()=>{const e={},t={},o={},s={},a={},c={},d={},h={},_=(I,H)=>(V,ee)=>{I[V.toLowerCase()]={...ee,type:H}},z=(I,H)=>s[I.toLowerCase()]=H;return{addButton:_(e,"button"),addGroupToolbarButton:_(e,"grouptoolbarbutton"),addToggleButton:_(e,"togglebutton"),addMenuButton:_(e,"menubutton"),addSplitButton:_(e,"splitbutton"),addMenuItem:_(t,"menuitem"),addNestedMenuItem:_(t,"nestedmenuitem"),addToggleMenuItem:_(t,"togglemenuitem"),addAutocompleter:_(o,"autocompleter"),addContextMenu:_(a,"contextmenu"),addContextToolbar:_(c,"contexttoolbar"),addContextForm:_(c,"contextform"),addSidebar:_(d,"sidebar"),addView:_(h,"views"),addIcon:z,getAll:()=>({buttons:e,menuItems:t,icons:s,popups:o,contextMenus:a,contextToolbars:c,sidebars:d,views:h})}},XY=()=>{const e=YY();return{addAutocompleter:e.addAutocompleter,addButton:e.addButton,addContextForm:e.addContextForm,addContextMenu:e.addContextMenu,addContextToolbar:e.addContextToolbar,addIcon:e.addIcon,addMenuButton:e.addMenuButton,addMenuItem:e.addMenuItem,addNestedMenuItem:e.addNestedMenuItem,addSidebar:e.addSidebar,addSplitButton:e.addSplitButton,addToggleButton:e.addToggleButton,addGroupToolbarButton:e.addGroupToolbarButton,addToggleMenuItem:e.addToggleMenuItem,addView:e.addView,getAll:e.getAll}},c_=As.DOM,ZH=zt.extend,JY=zt.each;class s5{constructor(t,o,s){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=s,this.documentBaseUrl=s.documentBaseURL,ZH(this,FH);const a=this;this.id=t,this.hidden=!1;const c=LG(s.defaultOptions,o);this.options=VY(a,c,o),F_(a);const d=this.options.get;d("deprecation_warnings")&&LB(o,c);const h=d("suffix");h&&(s.suffix=h),this.suffix=s.suffix;const _=d("base_url");_&&s._setBaseUrl(_),this.baseUri=s.baseURI;const z=h0(a);z&&(el.ScriptLoader._setReferrerPolicy(z),As.DOM.styleSheetLoader._setReferrerPolicy(z));const I=BT(a);Fe(I)&&As.DOM.styleSheetLoader._setContentCssCors(I),Hi.languageLoad=d("language_load"),Hi.baseURL=s.baseURL,this.setDirty(!1),this.documentBaseURI=new Jd(id(a),{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=qh(a),this.hasVisual=Pc(a),this.shortcuts=new UH(this),this.editorCommands=new LH(this),xY(this);const H=d("cache_suffix");H&&(Jo.cacheSuffix=H.replace(/^[\?\&]+/,"")),this.ui={registry:XY(),styleSheetLoader:void 0,show:dt,hide:dt,setEnabled:dt,isEnabled:zo},this.mode=WY(a),s.dispatch("SetupEditor",{editor:this});const V=Ny(a);Gt(V)&&V.call(a,a)}render(){_G(this)}focus(t){this.execCommand("mceFocus",!1,t)}hasFocus(){return Vy(this)}translate(t){return Rc.translate(t)}getParam(t,o,s){const a=this.options;return a.isRegistered(t)||(Fe(s)?a.register(t,{processor:s,default:o}):a.register(t,{processor:zo,default:o})),!a.isSet(t)&&!ln(o)?o:a.get(t)}hasPlugin(t,o){return mn(Nu(this),t)?o?Ab.get(t)!==void 0:!0:!1}nodeChanged(t){this._nodeChangeDispatcher.nodeChanged(t)}addCommand(t,o,s){this.editorCommands.addCommand(t,o,s)}addQueryStateHandler(t,o,s){this.editorCommands.addQueryStateHandler(t,o,s)}addQueryValueHandler(t,o,s){this.editorCommands.addQueryValueHandler(t,o,s)}addShortcut(t,o,s,a){this.shortcuts.add(t,o,s,a)}execCommand(t,o,s,a){return this.editorCommands.execCommand(t,o,s,a)}queryCommandState(t){return this.editorCommands.queryCommandState(t)}queryCommandValue(t){return this.editorCommands.queryCommandValue(t)}queryCommandSupported(t){return this.editorCommands.queryCommandSupported(t)}show(){const t=this;t.hidden&&(t.hidden=!1,t.inline?t.getBody().contentEditable="true":(c_.show(t.getContainer()),c_.hide(t.id)),t.load(),t.dispatch("show"))}hide(){const t=this;t.hidden||(t.save(),t.inline?(t.getBody().contentEditable="false",t===t.editorManager.focusedEditor&&(t.editorManager.focusedEditor=null)):(c_.hide(t.getContainer()),c_.setStyle(t.id,"display",t.orgDisplay)),t.hidden=!0,t.dispatch("hide"))}isHidden(){return this.hidden}setProgressState(t,o){this.dispatch("ProgressState",{state:t,time:o})}load(t={}){const o=this,s=o.getElement();if(o.removed)return"";if(s){const a={...t,load:!0},c=Jf(s)?s.value:s.innerHTML,d=o.setContent(c,a);return a.no_events||o.dispatch("LoadContent",{...a,element:s}),d}else return""}save(t={}){const o=this;let s=o.getElement();if(!s||!o.initialized||o.removed)return"";const a={...t,save:!0,element:s};let c=o.getContent(a);const d={...a,content:c};if(d.no_events||o.dispatch("SaveContent",d),d.format==="raw"&&o.dispatch("RawSaveContent",d),c=d.content,Jf(s))s.value=c;else{(t.is_removing||!o.inline)&&(s.innerHTML=c);const h=c_.getParent(o.id,"form");h&&JY(h.elements,_=>_.name===o.id?(_.value=c,!1):!0)}return d.element=a.element=s=null,d.set_dirty!==!1&&o.setDirty(!1),c}setContent(t,o){return $E(this,t,o)}getContent(t){return SN(this,t)}insertContent(t,o){o&&(t=ZH({content:t},o)),this.execCommand("mceInsertContent",!1,t)}resetContent(t){t===void 0?$E(this,this.startContent,{format:"raw"}):$E(this,t),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()}isDirty(){return!this.isNotDirty}setDirty(t){const o=!this.isNotDirty;this.isNotDirty=!t,t&&t!==o&&this.dispatch("dirty")}getContainer(){const t=this;return t.container||(t.container=t.editorContainer||c_.get(t.id+"_parent")),t.container}getContentAreaContainer(){return this.contentAreaContainer}getElement(){return this.targetElm||(this.targetElm=c_.get(this.id)),this.targetElm}getWin(){const t=this;if(!t.contentWindow){const o=t.iframeElement;o&&(t.contentWindow=o.contentWindow)}return t.contentWindow}getDoc(){const t=this;if(!t.contentDocument){const o=t.getWin();o&&(t.contentDocument=o.document)}return t.contentDocument}getBody(){var t,o;const s=this.getDoc();return(o=(t=this.bodyElement)!==null&&t!==void 0?t:s==null?void 0:s.body)!==null&&o!==void 0?o:null}convertURL(t,o,s){const a=this,c=a.options.get,d=tM(a);if(Gt(d))return d.call(a,t,s,!0,o);if(!c("convert_urls")||s==="link"||ue(s)&&s.nodeName==="LINK"||t.indexOf("file:")===0||t.length===0)return t;const h=new Jd(t);return h.protocol!=="http"&&h.protocol!=="https"&&h.protocol!==""?t:c("relative_urls")?a.documentBaseURI.toRelative(t):(t=a.documentBaseURI.toAbsolute(t,c("remove_script_host")),t)}addVisual(t){BG(this,t)}setEditableRoot(t){xG(this,t)}hasEditableRoot(){return wG(this)}remove(){RN(this)}destroy(t){PB(this,t)}uploadImages(){return this.editorUpload.uploadImages()}_scanForImages(){return this.editorUpload.scanForImages()}}const pk=As.DOM,r5=zt.each;let WH=!1,a5,gd=[];const i5=e=>{const t=e.type;r5(k1.get(),o=>{switch(t){case"scroll":o.dispatch("ScrollWindow",e);break;case"resize":o.dispatch("ResizeWindow",e);break}})},qH=e=>{if(e!==WH){const t=As.DOM;e?(t.bind(window,"resize",i5),t.bind(window,"scroll",i5)):(t.unbind(window,"resize",i5),t.unbind(window,"scroll",i5)),WH=e}},KH=e=>{const t=gd;return gd=rt(gd,o=>e!==o),k1.activeEditor===e&&(k1.activeEditor=gd.length>0?gd[0]:null),k1.focusedEditor===e&&(k1.focusedEditor=null),t.length!==gd.length},QY=e=>{e&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(KH(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0)},eX=document.compatMode!=="CSS1Compat",k1={...KI,baseURI:null,baseURL:null,defaultOptions:{},documentBaseURL:null,suffix:null,majorVersion:"7",minorVersion:"3.0",releaseDate:"2024-08-07",i18n:Rc,activeEditor:null,focusedEditor:null,setup(){const e=this;let t="",o="",s=Jd.getDocumentBaseUrl(document.location);/^[^:]+:\/\/\/?[^\/]+\//.test(s)&&(s=s.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(s)||(s+="/"));const a=window.tinymce||window.tinyMCEPreInit;if(a)t=a.base||a.baseURL,o=a.suffix;else{const c=document.getElementsByTagName("script");for(let d=0;d{Hi.PluginManager.urls[c]=a})},init(e){const t=this;let o;const s=zt.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"," "),a=(I,H)=>I.inline&&H.tagName.toLowerCase()in s,c=I=>{let H=I.id;return H||(H=Gn(I,"name").filter(V=>!pk.get(V)).getOrThunk(pk.uniqueId),I.setAttribute("id",H)),H},d=I=>{const H=e[I];if(H)return H.apply(t,[])},h=I=>Jo.browser.isIE()||Jo.browser.isEdge()?(Hv("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"),[]):eX?(Hv("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[]):ft(I.selector)?pk.select(I.selector):Fe(I.target)?[I.target]:[];let _=I=>{o=I};const z=()=>{let I=0;const H=[];let V;const ee=(le,oe,fe)=>{const ke=new s5(le,oe,t);H.push(ke),ke.on("init",()=>{++I===V.length&&_(H)}),ke.targetElm=ke.targetElm||fe,ke.render()};pk.unbind(window,"ready",z),d("onpageload"),V=bi(h(e)),zt.each(V,le=>{QY(t.get(le.id))}),V=zt.grep(V,le=>!t.get(le.id)),V.length===0?_([]):r5(V,le=>{a(e,le)?Hv("Could not initialize inline editor on invalid inline target element",le):ee(c(le),e,le)})};return pk.bind(window,"ready",z),new Promise(I=>{o?I(o):_=H=>{I(H)}})},get(e){return arguments.length===0?gd.slice(0):ft(e)?On(gd,t=>t.id===e).getOr(null):D(e)&&gd[e]?gd[e]:null},add(e){const t=this,o=t.get(e.id);return o===e||(o===null&&gd.push(e),qH(!0),t.activeEditor=e,t.dispatch("AddEditor",{editor:e}),a5||(a5=s=>{const a=t.dispatch("BeforeUnload");if(a.returnValue)return s.preventDefault(),s.returnValue=a.returnValue,a.returnValue},window.addEventListener("beforeunload",a5))),e},createEditor(e,t){return this.add(new s5(e,t,this))},remove(e){const t=this;let o;if(!e){for(let s=gd.length-1;s>=0;s--)t.remove(gd[s]);return}if(ft(e)){r5(pk.select(e),s=>{o=t.get(s.id),o&&t.remove(o)});return}return o=e,ot(t.get(o.id))?null:(KH(o)&&t.dispatch("RemoveEditor",{editor:o}),gd.length===0&&window.removeEventListener("beforeunload",a5),o.remove(),qH(gd.length>0),o)},execCommand(e,t,o){var s;const a=this,c=ue(o)?(s=o.id)!==null&&s!==void 0?s:o.index:o;switch(e){case"mceAddEditor":{if(!a.get(c)){const d=o.options;new s5(c,d,a).render()}return!0}case"mceRemoveEditor":{const d=a.get(c);return d&&d.remove(),!0}case"mceToggleEditor":{const d=a.get(c);return d?(d.isHidden()?d.show():d.hide(),!0):(a.execCommand("mceAddEditor",!1,o),!0)}}return a.activeEditor?a.activeEditor.execCommand(e,t,o):!1},triggerSave:()=>{r5(gd,e=>{e.save()})},addI18n:(e,t)=>{Rc.add(e,t)},translate:e=>Rc.translate(e),setActive(e){const t=this.activeEditor;this.activeEditor!==e&&(t&&t.dispatch("deactivate",{relatedTarget:e}),e.dispatch("activate",{relatedTarget:t})),this.activeEditor=e},_setBaseUrl(e){this.baseURL=new Jd(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new Jd(this.baseURL)}};k1.setup();const tX=(()=>{const e=Jr(),t=c=>({items:c,types:vt(c),getType:d=>Gn(c,d).getOrUndefined()}),o=c=>{e.set(c)},s=()=>e.get().getOrUndefined(),a=e.clear;return{FakeClipboardItem:t,write:o,read:s,clear:a}})(),GH=Math.min,gk=Math.max,l5=Math.round,YH=(e,t,o)=>{let s=t.x,a=t.y;const c=e.w,d=e.h,h=t.w,_=t.h,z=(o||"").split("");return z[0]==="b"&&(a+=_),z[1]==="r"&&(s+=h),z[0]==="c"&&(a+=l5(_/2)),z[1]==="c"&&(s+=l5(h/2)),z[3]==="b"&&(a-=d),z[4]==="r"&&(s-=c),z[3]==="c"&&(a-=l5(d/2)),z[4]==="c"&&(s-=l5(c/2)),hk(s,a,c,d)},oX=(e,t,o,s)=>{for(let a=0;a=o.x&&c.x+c.w<=o.w+o.x&&c.y>=o.y&&c.y+c.h<=o.h+o.y)return s[a]}return null},nX=(e,t,o)=>hk(e.x-t,e.y-o,e.w+t*2,e.h+o*2),sX=(e,t)=>{const o=gk(e.x,t.x),s=gk(e.y,t.y),a=GH(e.x+e.w,t.x+t.w),c=GH(e.y+e.h,t.y+t.h);return a-o<0||c-s<0?null:hk(o,s,a-o,c-s)},rX=(e,t,o)=>{let s=e.x,a=e.y,c=e.x+e.w,d=e.y+e.h;const h=t.x+t.w,_=t.y+t.h,z=gk(0,t.x-s),I=gk(0,t.y-a),H=gk(0,c-h),V=gk(0,d-_);return s+=z,a+=I,o&&(c+=z,d+=I,s-=H,a-=V),c-=H,d-=V,hk(s,a,c-s,d-a)},hk=(e,t,o,s)=>({x:e,y:t,w:o,h:s}),aX={inflate:nX,relativePosition:YH,findBestRelativePosition:oX,intersect:sX,clamp:rX,create:hk,fromClientRect:e=>hk(e.left,e.top,e.width,e.height)},iX=(e,t,o=1e3)=>{let s=!1,a=null;const c=z=>(...I)=>{s||(s=!0,a!==null&&(clearTimeout(a),a=null),z.apply(null,I))},d=c(e),h=c(t);return{start:(...z)=>{!s&&a===null&&(a=setTimeout(()=>h.apply(null,z),o))},resolve:d,reject:h}},lX=(()=>{const e={},t={},o={};return{load:(_,z)=>{const I=`Script at URL "${z}" failed to load`,H=`Script at URL "${z}" did not call \`tinymce.Resource.add('${_}', data)\` within 1 second`;if(e[_]!==void 0)return e[_];{const V=new Promise((ee,le)=>{const oe=iX(ee,le);t[_]=oe.resolve,el.ScriptLoader.loadScript(z).then(()=>oe.start(H),()=>oe.reject(I))});return e[_]=V,V}},add:(_,z)=>{t[_]!==void 0&&(t[_](z),delete t[_]),e[_]=Promise.resolve(z),o[_]=z},has:_=>_ in o,get:_=>o[_],unload:_=>{delete e[_],delete o[_]}}})(),cX=()=>(()=>{let e={},t=[];const o={getItem:s=>{const a=e[s];return a||null},setItem:(s,a)=>{t.push(s),e[s]=String(a)},key:s=>t[s],removeItem:s=>{t=t.filter(a=>a===s),delete e[s]},clear:()=>{t=[],e={}},length:0};return Object.defineProperty(o,"length",{get:()=>t.length,configurable:!1,enumerable:!1}),o})();let tT;try{const e="__storage_test__";tT=window.localStorage,tT.setItem(e,e),tT.removeItem(e)}catch{tT=cX()}var dX=tT;const uX={geom:{Rect:aX},util:{Delay:$c,Tools:zt,VK:Zt,URI:Jd,EventDispatcher:qI,Observable:KI,I18n:Rc,LocalStorage:dX,ImageUploader:GB},dom:{EventUtils:rf,TreeWalker:Ma,TextSeeker:Su,DOMUtils:As,ScriptLoader:el,RangeUtils:Dg,Serializer:CN,StyleSheetLoader:xu,ControlSelection:ps,BookmarkManager:ws,Selection:FE,Event:rf.Event},html:{Styles:U1,Entities:dp,Node:pi,Schema:Dc,DomParser:r1,Writer:pC,Serializer:Lp},Env:Jo,AddOnManager:Hi,Annotator:F4,Formatter:jv,UndoManager:nD,EditorCommands:LH,WindowManager:HN,NotificationManager:KE,EditorObservable:FH,Shortcuts:UH,Editor:s5,FocusManager:Wd,EditorManager:k1,DOM:As.DOM,ScriptLoader:el.ScriptLoader,PluginManager:Ab,ThemeManager:Xg,ModelManager:Yg,IconManager:Iv,Resource:lX,FakeClipboard:tX,trim:zt.trim,isArray:zt.isArray,is:zt.is,toArray:zt.toArray,makeMap:zt.makeMap,each:zt.each,map:zt.map,grep:zt.grep,inArray:zt.inArray,extend:zt.extend,walk:zt.walk,resolve:zt.resolve,explode:zt.explode,_addCacheSuffix:zt._addCacheSuffix},XH=zt.extend(k1,uX),fX=e=>{try{w.exports=e}catch{}};(e=>{window.tinymce=e,window.tinyMCE=e})(XH),fX(XH)})()})(EV);var Une=EV.exports;const t9=jne(Une);tinymce.IconManager.add("default",{icons:{"accessibility-check":'',"accordion-toggle":'',accordion:'',"action-next":'',"action-prev":'',addtag:'',"ai-prompt":'',ai:'',"align-center":'',"align-justify":'',"align-left":'',"align-none":'',"align-right":'',"arrow-left":'',"arrow-right":'',bold:'',bookmark:'',"border-style":'',"border-width":'',brightness:'',browse:'',cancel:'',"cell-background-color":'',"cell-border-color":'',"change-case":'',"character-count":'',"checklist-rtl":'',checklist:'',checkmark:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',close:'',"code-sample":'',"color-levels":'',"color-picker":'',"color-swatch-remove-color":'',"color-swatch":'',"comment-add":'',comment:'',contrast:'',copy:'',crop:'',"cut-column":'',"cut-row":'',cut:'',"document-properties":'',drag:'',"duplicate-column":'',"duplicate-row":'',duplicate:'',"edit-block":'',"edit-image":'',"embed-page":'',embed:'',emoji:'',export:'',fill:'',"flip-horizontally":'',"flip-vertically":'',footnote:'',"format-code":'',"format-painter":'',format:'',fullscreen:'',gallery:'',gamma:'',help:'',"highlight-bg-color":'',home:'',"horizontal-rule":'',"image-options":'',image:'',indent:'',info:'',"insert-character":'',"insert-time":'',invert:'',italic:'',language:'',"line-height":'',line:'',link:'',"list-bull-circle":'',"list-bull-default":'',"list-bull-square":'',"list-num-default-rtl":'',"list-num-default":'',"list-num-lower-alpha-rtl":'',"list-num-lower-alpha":'',"list-num-lower-greek-rtl":'',"list-num-lower-greek":'',"list-num-lower-roman-rtl":'',"list-num-lower-roman":'',"list-num-upper-alpha-rtl":'',"list-num-upper-alpha":'',"list-num-upper-roman-rtl":'',"list-num-upper-roman":'',lock:'',ltr:'',"math-equation":'',minus:'',"more-drawer":'',"new-document":'',"new-tab":'',"non-breaking":'',notice:'',"ordered-list-rtl":'',"ordered-list":'',orientation:'',outdent:'',"export-pdf":'',"export-word":'',"import-word":'',"page-break":'',paragraph:'',"paste-column-after":'',"paste-column-before":'',"paste-row-after":'',"paste-row-before":'',"paste-text":'',paste:'',"permanent-pen":'',plus:'',preferences:'',preview:'',print:'',quote:'',redo:'',reload:'',"remove-formatting":'',remove:'',"resize-handle":'',resize:'',"restore-draft":'',"revision-history":'',"rotate-left":'',"rotate-right":'',rtl:'',save:'',search:'',"select-all":'',selected:'',send:'',settings:'',sharpen:'',sourcecode:'',"spell-check":'',"strike-through":'',subscript:'',superscript:'',"table-caption":'',"table-cell-classes":'',"table-cell-properties":'',"table-cell-select-all":'',"table-cell-select-inner":'',"table-classes":'',"table-delete-column":'',"table-delete-row":'',"table-delete-table":'',"table-insert-column-after":'',"table-insert-column-before":'',"table-insert-row-above":'',"table-insert-row-after":'',"table-left-header":'',"table-merge-cells":'',"table-row-numbering-rtl":'',"table-row-numbering":'',"table-row-properties":'',"table-split-cells":'',"table-top-header":'',table:'',"template-add":'',template:'',"temporary-placeholder":'',"text-color":'',"text-size-decrease":'',"text-size-increase":'',toc:'',translate:'',typography:'',underline:'',undo:'',unlink:'',unlock:'',"unordered-list":'',unselected:'',upload:'',user:'',"vertical-align":'',visualblocks:'',visualchars:'',warning:'',"zoom-in":'',"zoom-out":''}});(function(){const w=Object.getPrototypeOf,g=(n,r,i)=>{var l;return!!i(n,r.prototype)||((l=n.constructor)===null||l===void 0?void 0:l.name)===r.name},S=n=>r=>(i=>{const l=typeof i;return i===null?"null":l==="object"&&Array.isArray(i)?"array":l==="object"&&g(i,String,(u,f)=>f.isPrototypeOf(u))?"string":l})(r)===n,L=n=>r=>typeof r===n,W=n=>r=>n===r,te=S("string"),ce=S("object"),Ee=n=>((r,i)=>ce(r)&&g(r,i,(l,u)=>w(l)===u))(n,Object),He=S("array"),We=W(null),Me=L("boolean"),Ot=W(void 0),mo=n=>n==null,st=n=>!mo(n),ut=L("function"),Lt=L("number"),Rt=(n,r)=>{if(He(n)){for(let i=0,l=n.length;i{},Ut=n=>()=>n(),ft=(n,r)=>(...i)=>n(r.apply(null,i)),ue=n=>()=>n,Ct=n=>n,ve=(n,r)=>n===r;function ot(n,...r){return(...i)=>{const l=r.concat(i);return n.apply(null,l)}}const bn=n=>r=>!n(r),ln=n=>()=>{throw new Error(n)},uo=n=>n(),Fe=ue(!1),Gt=ue(!0);class D{constructor(r,i){this.tag=r,this.value=i}static some(r){return new D(!0,r)}static none(){return D.singletonNone}fold(r,i){return this.tag?i(this.value):r()}isSome(){return this.tag}isNone(){return!this.tag}map(r){return this.tag?D.some(r(this.value)):D.none()}bind(r){return this.tag?r(this.value):D.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:D.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??"Called getOrDie on None")}static from(r){return st(r)?D.some(r):D.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(${this.value})`:"none()"}}D.singletonNone=new D(!1);const bt=Array.prototype.slice,dt=Array.prototype.indexOf,Kt=Array.prototype.push,qo=(n,r)=>dt.call(n,r),Ge=(n,r)=>qo(n,r)>-1,Ao=(n,r)=>{for(let i=0,l=n.length;i{const i=[];for(let l=0;l{const i=[];for(let l=0;l{const i=n.length,l=new Array(i);for(let u=0;u{for(let i=0,l=n.length;i{const i=[],l=[];for(let u=0,f=n.length;u{const i=[];for(let l=0,u=n.length;l(((l,u)=>{for(let f=l.length-1;f>=0;f--)u(l[f],f)})(n,(l,u)=>{i=r(i,l,u)}),i),zo=(n,r,i)=>($t(n,(l,u)=>{i=r(i,l,u)}),i),j=(n,r)=>((i,l,u)=>{for(let f=0,p=i.length;f{for(let i=0,l=n.length;i{const r=[];for(let i=0,l=n.length;iCs(pt(n,r)),hi=(n,r)=>{for(let i=0,l=n.length;i{const r=bt.call(n,0);return r.reverse(),r},mn=(n,r)=>cn(n,i=>!Ge(r,i)),Ln=(n,r)=>{const i={};for(let l=0,u=n.length;l[n],Be=(n,r)=>{const i=bt.call(n,0);return i.sort(r),i},Bt=(n,r)=>r>=0&&rBt(n,0),rt=n=>Bt(n,n.length-1),ao=ut(Array.from)?Array.from:n=>bt.call(n),ko=(n,r)=>{for(let i=0;i{const i=tn(n);for(let l=0,u=i.length;lBn(n,(i,l)=>({k:l,v:r(i,l)})),Bn=(n,r)=>{const i={};return rs(n,(l,u)=>{const f=r(l,u);i[f.k]=f.v}),i},$s=n=>(r,i)=>{n[i]=r},sa=(n,r,i,l)=>{rs(n,(u,f)=>{(r(u,f)?i:l)(u,f)})},os=(n,r)=>{const i={};return sa(n,r,$s(i),Ke),i},Is=(n,r)=>{const i=[];return rs(n,(l,u)=>{i.push(r(l,u))}),i},yn=(n,r)=>{const i=tn(n);for(let l=0,u=i.length;lIs(n,Ct),St=(n,r)=>Vo(n,r)?D.from(n[r]):D.none(),Vo=(n,r)=>On.call(n,r),an=(n,r)=>Vo(n,r)&&n[r]!==void 0&&n[r]!==null,Kr=(n,r,i=ve)=>n.exists(l=>i(l,r)),bi=n=>{const r=[],i=l=>{r.push(l)};for(let l=0;ln.isSome()&&r.isSome()?D.some(i(n.getOrDie(),r.getOrDie())):D.none(),oi=(n,r)=>n!=null?D.some(r(n)):D.none(),nn=(n,r)=>n?D.some(r):D.none(),Ri=(n,r,i)=>r===""||n.length>=r.length&&n.substr(i,i+r.length)===r,as=(n,r)=>bl(n,r)?((i,l)=>i.substring(l))(n,r.length):n,hr=(n,r,i=0,l)=>{const u=n.indexOf(r,i);return u!==-1&&(!!Ot(l)||u+r.length<=l)},bl=(n,r)=>Ri(n,r,0),ll=(n,r)=>Ri(n,r,n.length-r.length),Mi=(Kc=/^\s+|\s+$/g,n=>n.replace(Kc,"")),yi=n=>n.length>0,yl=n=>!yi(n),Gn=n=>n.style!==void 0&&ut(n.style.getPropertyValue),Ro=n=>{if(n==null)throw new Error("Node cannot be null or undefined");return{dom:n}},Ha=(n,r)=>{const i=document.createElement("div");if(i.innerHTML=n,!i.hasChildNodes()||i.childNodes.length>1){const l="HTML does not have a single root node";throw console.error(l,n),new Error(l)}return Ro(i.childNodes[0])},Hr=(n,r)=>{const i=document.createElement(n);return Ro(i)},hd=(n,r)=>{const i=document.createTextNode(n);return Ro(i)},Vt=Ro,Dr=typeof window<"u"?window:Function("return this;")(),ru=(n,r)=>((i,l)=>{let u=l??Dr;for(let f=0;f{const r=ru("ownerDocument.defaultView",n);return ce(n)&&((i=>((l,u)=>{const f=((p,y)=>ru(p,y))(l,u);if(f==null)throw new Error(l+" not available on this browser");return f})("HTMLElement",i))(r).prototype.isPrototypeOf(n)||/^HTML\w*Element$/.test(zs(n).constructor.name))},ni=n=>n.dom.nodeName.toLowerCase(),qi=n=>r=>(i=>i.dom.nodeType)(r)===n,vi=n=>ys(n)&&bd(n.dom),ys=qi(1),ga=qi(3),si=qi(9),au=qi(11),pc=n=>r=>ys(r)&&ni(r)===n,_i=(n,r)=>{const i=n.dom;if(i.nodeType!==1)return!1;{const l=i;if(l.matches!==void 0)return l.matches(r);if(l.msMatchesSelector!==void 0)return l.msMatchesSelector(r);if(l.webkitMatchesSelector!==void 0)return l.webkitMatchesSelector(r);if(l.mozMatchesSelector!==void 0)return l.mozMatchesSelector(r);throw new Error("Browser lacks native selectors")}},iu=n=>n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11||n.childElementCount===0,Zc=(n,r)=>{const i=r===void 0?document:r.dom;return iu(i)?D.none():D.from(i.querySelector(n)).map(Vt)},$n=(n,r)=>n.dom===r.dom,lr=(n,r)=>{const i=n.dom,l=r.dom;return i!==l&&i.contains(l)},ha=n=>Vt(n.dom.ownerDocument),Uu=n=>si(n)?n:ha(n),Ki=n=>Vt(Uu(n).dom.documentElement),yd=n=>Vt(Uu(n).dom.defaultView),$r=n=>D.from(n.dom.parentNode).map(Vt),ba=n=>D.from(n.dom.parentElement).map(Vt),xi=n=>D.from(n.dom.offsetParent).map(Vt),Yn=n=>pt(n.dom.childNodes,Vt),vs=(n,r)=>{const i=n.dom.childNodes;return D.from(i[r]).map(Vt)},Gi=n=>vs(n,0),gc=(n,r)=>({element:n,offset:r}),br=(n,r)=>{const i=Yn(n);return i.length>0&&rau(n)&&st(n.dom.host),Vs=n=>Vt(n.dom.getRootNode()),Pn=n=>vl(n)?n:Vt(Uu(n).dom.body),wi=n=>{const r=Vs(n);return vl(r)?D.some(r):D.none()},Oa=n=>Vt(n.dom.host),Vr=n=>{const r=ga(n)?n.dom.parentNode:n.dom;if(r==null||r.ownerDocument===null)return!1;const i=r.ownerDocument;return wi(Vt(r)).fold(()=>i.body.contains(r),(l=Vr,u=Oa,f=>l(u(f))));var l,u},za=()=>Qs(Vt(document)),Qs=n=>{const r=n.dom.body;if(r==null)throw new Error("Body is not available yet");return Vt(r)},vd=(n,r,i)=>{if(!(te(i)||Me(i)||Lt(i)))throw console.error("Invalid call to Attribute.set. Key ",r,":: Value ",i,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(r,i+"")},wo=(n,r,i)=>{vd(n.dom,r,i)},_l=(n,r)=>{const i=n.dom;rs(r,(l,u)=>{vd(i,u,l)})},yr=(n,r)=>{const i=n.dom.getAttribute(r);return i===null?void 0:i},Fs=(n,r)=>D.from(yr(n,r)),Wc=(n,r)=>{const i=n.dom;return!(!i||!i.hasAttribute)&&i.hasAttribute(r)},pn=(n,r)=>{n.dom.removeAttribute(r)},$l=(n,r,i)=>{if(!te(i))throw console.error("Invalid call to CSS.set. Property ",r,":: Value ",i,":: Element ",n),new Error("CSS value must be a string: "+i);Gn(n)&&n.style.setProperty(r,i)},ya=(n,r)=>{Gn(n)&&n.style.removeProperty(r)},Mo=(n,r,i)=>{const l=n.dom;$l(l,r,i)},Li=(n,r)=>{const i=n.dom;rs(r,(l,u)=>{$l(i,u,l)})},ri=(n,r)=>{const i=n.dom;rs(r,(l,u)=>{l.fold(()=>{ya(i,u)},f=>{$l(i,u,f)})})},Ns=(n,r)=>{const i=n.dom,l=window.getComputedStyle(i).getPropertyValue(r);return l!==""||Vr(n)?l:Vl(i,r)},Vl=(n,r)=>Gn(n)?n.style.getPropertyValue(r):"",er=(n,r)=>{const i=n.dom,l=Vl(i,r);return D.from(l).filter(u=>u.length>0)},hc=n=>{const r={},i=n.dom;if(Gn(i))for(let l=0;l{const l=Hr(n);return Mo(l,r,i),er(l,r).isSome()},Vn=(n,r)=>{const i=n.dom;ya(i,r),Kr(Fs(n,"style").map(Mi),"")&&pn(n,"style")},xl=n=>n.dom.offsetWidth,qc=(n,r)=>{const i=u=>{const f=r(u);if(f<=0||f===null){const p=Ns(u,n);return parseFloat(p)||0}return f},l=(u,f)=>zo(f,(p,y)=>{const v=Ns(u,y),C=v===void 0?0:parseInt(v,10);return isNaN(C)?p:p+C},0);return{set:(u,f)=>{if(!Lt(f)&&!f.match(/^[0-9]+$/))throw new Error(n+".set accepts only positive integer values. Value was "+f);const p=u.dom;Gn(p)&&(p.style[n]=f+"px")},get:i,getOuter:i,aggregate:l,max:(u,f,p)=>{const y=l(u,p);return f>y?f-y:0}}},_d=qc("height",n=>{const r=n.dom;return Vr(n)?r.getBoundingClientRect().height:r.offsetHeight}),Ds=n=>_d.get(n),Na=n=>_d.getOuter(n),Q=(n,r)=>({left:n,top:r,translate:(i,l)=>Q(n+i,r+l)}),pe=Q,Te=(n,r)=>n!==void 0?n:r!==void 0?r:0,Ye=n=>{const r=n.dom.ownerDocument,i=r.body,l=r.defaultView,u=r.documentElement;if(i===n.dom)return pe(i.offsetLeft,i.offsetTop);const f=Te(l==null?void 0:l.pageYOffset,u.scrollTop),p=Te(l==null?void 0:l.pageXOffset,u.scrollLeft),y=Te(u.clientTop,i.clientTop),v=Te(u.clientLeft,i.clientLeft);return _t(n).translate(p-v,f-y)},_t=n=>{const r=n.dom,i=r.ownerDocument.body;return i===r?pe(i.offsetLeft,i.offsetTop):Vr(n)?(l=>{const u=l.getBoundingClientRect();return pe(u.left,u.top)})(r):pe(0,0)},oo=qc("width",n=>n.dom.offsetWidth),Go=n=>oo.get(n),Xn=n=>oo.getOuter(n),sn=n=>{let r,i=!1;return(...l)=>(i||(i=!0,r=n.apply(null,l)),r)},is=()=>tr(0,0),tr=(n,r)=>({major:n,minor:r}),Jo={nu:tr,detect:(n,r)=>{const i=String(r).toLowerCase();return n.length===0?is():((l,u)=>{const f=((y,v)=>{for(let C=0;CNumber(u.replace(f,"$"+y));return tr(p(1),p(2))})(n,i)},unknown:is},cl=(n,r)=>{const i=String(r).toLowerCase();return j(n,l=>l.search(i))},jl=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,bc=n=>r=>hr(r,n),Jm=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:n=>hr(n,"edge/")&&hr(n,"chrome")&&hr(n,"safari")&&hr(n,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,jl],search:n=>hr(n,"chrome")&&!hr(n,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:n=>hr(n,"msie")||hr(n,"trident")},{name:"Opera",versionRegexes:[jl,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:bc("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:bc("firefox")},{name:"Safari",versionRegexes:[jl,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:n=>(hr(n,"safari")||hr(n,"mobile/"))&&hr(n,"applewebkit")}],ih=[{name:"Windows",search:bc("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:n=>hr(n,"iphone")||hr(n,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:bc("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:bc("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:bc("linux"),versionRegexes:[]},{name:"Solaris",search:bc("sunos"),versionRegexes:[]},{name:"FreeBSD",search:bc("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:bc("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Bi={browsers:ue(Jm),oses:ue(ih)},Qm="Edge",lh="Chromium",Ff="Opera",eg="Firefox",zt="Safari",xd=n=>{const r=n.current,i=n.version,l=u=>()=>r===u;return{current:r,version:i,isEdge:l(Qm),isChromium:l(lh),isIE:l("IE"),isOpera:l(Ff),isFirefox:l(eg),isSafari:l(zt)}},wd=()=>xd({current:void 0,version:Jo.unknown()}),Hf=xd,va="Windows",kd="Android",lu="Linux",ch="macOS",tg="Solaris",og="FreeBSD",Ub="ChromeOS",dh=n=>{const r=n.current,i=n.version,l=u=>()=>r===u;return{current:r,version:i,isWindows:l(va),isiOS:l("iOS"),isAndroid:l(kd),isMacOS:l(ch),isLinux:l(lu),isSolaris:l(tg),isFreeBSD:l(og),isChromeOS:l(Ub)}},Zb=()=>dh({current:void 0,version:Jo.unknown()}),$f=dh,Ul=n=>window.matchMedia(n).matches;var Kc;let Zl=sn(()=>((n,r,i)=>{const l=Bi.browsers(),u=Bi.oses(),f=r.bind(v=>((C,O)=>ko(O.brands,A=>{const R=A.brand.toLowerCase();return j(C,F=>{var $;return R===(($=F.brand)===null||$===void 0?void 0:$.toLowerCase())}).map(F=>({current:F.name,version:Jo.nu(parseInt(A.version,10),0)}))}))(l,v)).orThunk(()=>((v,C)=>cl(v,C).map(O=>{const A=Jo.detect(O.versionRegexes,C);return{current:O.name,version:A}}))(l,n)).fold(wd,Hf),p=((v,C)=>cl(v,C).map(O=>{const A=Jo.detect(O.versionRegexes,C);return{current:O.name,version:A}}))(u,n).fold(Zb,$f),y=((v,C,O,A)=>{const R=v.isiOS()&&/ipad/i.test(O)===!0,F=v.isiOS()&&!R,$=v.isiOS()||v.isAndroid(),G=$||A("(pointer:coarse)"),J=R||!F&&$&&A("(min-device-width:768px)"),ae=F||$&&!J,X=C.isSafari()&&v.isiOS()&&/safari/i.test(O)===!1,Y=!ae&&!J&&!X;return{isiPad:ue(R),isiPhone:ue(F),isTablet:ue(J),isPhone:ue(ae),isTouch:ue(G),isAndroid:v.isAndroid,isiOS:v.isiOS,isWebView:ue(X),isDesktop:ue(Y)}})(p,f,n,i);return{browser:f,os:p,deviceType:y}})(window.navigator.userAgent,D.from(window.navigator.userAgentData),Ul));const Yr=()=>Zl(),ki=n=>{const r=Vt((f=>{if(st(f.target)){const p=Vt(f.target);if(ys(p)&&(y=>st(y.dom.shadowRoot))(p)&&f.composed&&f.composedPath){const y=f.composedPath();if(y)return yt(y)}}return D.from(f.target)})(n).getOr(n.target)),i=()=>n.stopPropagation(),l=()=>n.preventDefault(),u=ft(l,i);return((f,p,y,v,C,O,A)=>({target:f,x:p,y,stop:v,prevent:C,kill:O,raw:A}))(r,n.clientX,n.clientY,i,l,u,n)},Cd=(n,r,i,l,u)=>{const f=((p,y)=>v=>{p(v)&&y(ki(v))})(i,l);return n.dom.addEventListener(r,f,u),{unbind:ot(En,n,r,f,u)}},En=(n,r,i,l)=>{n.dom.removeEventListener(r,i,l)},wl=(n,r)=>{$r(n).each(i=>{i.dom.insertBefore(r.dom,n.dom)})},Zu=(n,r)=>{(l=>D.from(l.dom.nextSibling).map(Vt))(n).fold(()=>{$r(n).each(l=>{ai(l,r)})},l=>{wl(l,r)})},Wu=(n,r)=>{Gi(n).fold(()=>{ai(n,r)},i=>{n.dom.insertBefore(r.dom,i.dom)})},ai=(n,r)=>{n.dom.appendChild(r.dom)},cr=(n,r)=>{$t(r,i=>{ai(n,i)})},Rs=n=>{n.dom.textContent="",$t(Yn(n),r=>{aa(r)})},aa=n=>{const r=n.dom;r.parentNode!==null&&r.parentNode.removeChild(r)},_s=n=>{const r=n!==void 0?n.dom:document,i=r.body.scrollLeft||r.documentElement.scrollLeft,l=r.body.scrollTop||r.documentElement.scrollTop;return pe(i,l)},Sd=(n,r,i)=>{const l=(i!==void 0?i.dom:document).defaultView;l&&l.scrollTo(n,r)},Ed=(n,r,i,l)=>({x:n,y:r,width:i,height:l,right:n+i,bottom:r+l}),Rr=n=>{const r=n===void 0?window:n,i=r.document,l=_s(Vt(i));return(u=>{const f=u===void 0?window:u;return Yr().browser.isFirefox()?D.none():D.from(f.visualViewport)})(r).fold(()=>{const u=r.document.documentElement,f=u.clientWidth,p=u.clientHeight;return Ed(l.left,l.top,f,p)},u=>Ed(Math.max(u.pageLeft,l.left),Math.max(u.pageTop,l.top),u.width,u.height))},$a=()=>Vt(document),Da=(n,r)=>n.view(r).fold(ue([]),i=>{const l=n.owner(i),u=Da(n,l);return[i].concat(u)});var Sr=Object.freeze({__proto__:null,view:n=>{var r;return(n.dom===document?D.none():D.from((r=n.dom.defaultView)===null||r===void 0?void 0:r.frameElement)).map(Vt)},owner:n=>ha(n)});const Gc=n=>{const r=$a(),i=_s(r);return((u,f)=>{const p=f.owner(u),y=Da(f,p);return D.some(y)})(n,Sr).fold(ot(Ye,n),u=>{const f=_t(n),p=fn(u,(y,v)=>{const C=_t(v);return{left:y.left+C.left,top:y.top+C.top}},{left:0,top:0});return pe(p.left+f.left+i.left,p.top+f.top+i.top)})},rn=(n,r,i,l)=>({x:n,y:r,width:i,height:l,right:n+i,bottom:r+l}),vr=n=>{const r=Ye(n),i=Xn(n),l=Na(n);return rn(r.left,r.top,i,l)},Va=n=>{const r=Gc(n),i=Xn(n),l=Na(n);return rn(r.left,r.top,i,l)},Wl=(n,r)=>{const i=Math.max(n.x,r.x),l=Math.max(n.y,r.y),u=Math.min(n.right,r.right),f=Math.min(n.bottom,r.bottom);return rn(i,l,u-i,f-l)},jr=()=>Rr(window),so=n=>{let r=n;return{get:()=>r,set:i=>{r=i}}},kl=n=>{const r=so(D.none()),i=()=>r.get().each(n);return{clear:()=>{i(),r.set(D.none())},isSet:()=>r.get().isSome(),get:()=>r.get(),set:l=>{i(),r.set(D.some(l))}}},Cl=()=>kl(n=>n.unbind()),Nn=()=>{const n=kl(Ke);return{...n,on:r=>n.get().each(r)}};var cu=tinymce.util.Tools.resolve("tinymce.ThemeManager");const ep=n=>{const r=f=>f(n),i=ue(n),l=()=>u,u={tag:!0,inner:n,fold:(f,p)=>p(n),isValue:Gt,isError:Fe,map:f=>un.value(f(n)),mapError:l,bind:r,exists:r,forall:r,getOr:i,or:l,getOrThunk:i,orThunk:l,getOrDie:i,each:f=>{f(n)},toOptional:()=>D.some(n)};return u},ql=n=>{const r=()=>i,i={tag:!1,inner:n,fold:(l,u)=>l(n),isValue:Fe,isError:Gt,map:r,mapError:l=>un.error(l(n)),bind:r,exists:Fe,forall:Gt,getOr:Ct,or:Ct,getOrThunk:uo,orThunk:uo,getOrDie:ln(String(n)),each:Ke,toOptional:D.none};return i},un={value:ep,error:ql,fromOption:(n,r)=>n.fold(()=>ql(r),ep)};var Ra;(function(n){n[n.Error=0]="Error",n[n.Value=1]="Value"})(Ra||(Ra={}));const qu=(n,r,i)=>n.stype===Ra.Error?r(n.serror):i(n.svalue),yc=n=>({stype:Ra.Value,svalue:n}),Vf=n=>({stype:Ra.Error,serror:n}),Sl=yc,ja=Vf,Kl=qu,Ad=(n,r,i,l)=>({tag:"field",key:n,newKey:r,presence:i,prop:l}),ye=(n,r,i)=>{switch(n.tag){case"field":return r(n.key,n.newKey,n.presence,n.prop);case"custom":return i(n.newKey,n.instantiator)}},du=n=>(...r)=>{if(r.length===0)throw new Error("Can't merge zero objects");const i={};for(let l=0;lEe(n)&&Ee(r)?ls(n,r):r),tp=du((n,r)=>r),Ku=n=>({tag:"defaultedThunk",process:n}),dl=n=>Ku(ue(n)),kn=n=>({tag:"mergeWithThunk",process:n}),_a=n=>{const r=(l=>{const u=[],f=[];return $t(l,p=>{qu(p,y=>f.push(y),y=>u.push(y))}),{values:u,errors:f}})(n);return r.errors.length>0?(i=r.errors,ft(ja,Cs)(i)):Sl(r.values);var i},Yi=n=>ce(n)&&tn(n).length>100?" removed due to size":JSON.stringify(n,null,2),ul=(n,r)=>ja([{path:n,getErrorInfo:r}]),Gl=n=>({extract:(r,i)=>((l,u)=>l.stype===Ra.Error?u(l.serror):l)(n(i),l=>((u,f)=>ul(u,ue(f)))(r,l)),toString:ue("val")}),vc=Gl(Sl),ia=(n,r,i,l)=>l(St(n,r).getOrThunk(()=>i(n))),Td=(n,r,i,l,u)=>{const f=y=>u.extract(r.concat([l]),y),p=y=>y.fold(()=>Sl(D.none()),v=>((C,O)=>C.stype===Ra.Value?{stype:Ra.Value,svalue:O(C.svalue)}:C)(u.extract(r.concat([l]),v),D.some));switch(n.tag){case"required":return((y,v,C,O)=>St(v,C).fold(()=>((A,R,F)=>ul(A,()=>'Could not find valid *required* value for "'+R+'" in '+Yi(F)))(y,C,v),O))(r,i,l,f);case"defaultedThunk":return ia(i,l,n.process,f);case"option":return((y,v,C)=>C(St(y,v)))(i,l,p);case"defaultedOptionThunk":return((y,v,C,O)=>O(St(y,v).map(A=>A===!0?C(y):A)))(i,l,n.process,p);case"mergeWithThunk":return ia(i,l,ue({}),y=>{const v=ls(n.process(i),y);return f(v)})}},Gu=n=>({extract:(r,i)=>n().extract(r,i),toString:()=>n().toString()}),jf=n=>tn(os(n,st)),Ur=n=>{const r=ho(n),i=fn(n,(l,u)=>ye(u,f=>ls(l,{[f]:!0}),ue(l)),{});return{extract:(l,u)=>{const f=Me(u)?[]:jf(u),p=cn(f,y=>!an(i,y));return p.length===0?r.extract(l,u):((y,v)=>ul(y,()=>"There are unsupported fields: ["+v.join(", ")+"] specified"))(l,p)},toString:r.toString}},ho=n=>({extract:(r,i)=>((l,u,f)=>{const p={},y=[];for(const v of f)ye(v,(C,O,A,R)=>{const F=Td(A,l,u,C,R);Kl(F,$=>{y.push(...$)},$=>{p[O]=$})},(C,O)=>{p[C]=O(u)});return y.length>0?ja(y):Sl(p)})(r,i,n),toString:()=>`obj{ `+pt(n,i=>ye(i,(l,u,f,p)=>l+" -> "+p.toString(),(l,u)=>"state("+l+")")).join(` -`)+"}"}),xc=n=>({extract:(r,i)=>{const l=pt(i,(u,f)=>n.extract(r.concat(["["+f+"]"]),u));return _a(l)},toString:()=>"array("+n.toString()+")"}),fu=(n,r)=>{const i=r!==void 0?r:Ct;return{extract:(l,u)=>{const f=[];for(const p of n){const y=p.extract(l,u);if(y.stype===Ra.Value)return{stype:Ra.Value,svalue:i(y.svalue)};f.push(y)}return _a(f)},toString:()=>"oneOf("+pt(n,l=>l.toString()).join(", ")+")"}},xa=(n,r)=>({extract:(i,l)=>{const u=tn(l),f=((p,y)=>xc(Yl(n)).extract(p,y))(i,u);return((p,y)=>p.stype===Ra.Value?y(p.svalue):p)(f,p=>{const y=pt(p,v=>Ad(v,v,{tag:"required",process:{}},r));return ho(y).extract(i,l)})},toString:()=>"setOf("+r.toString()+")"}),wc=ft(xc,ho),Ii=ue(_c),kc=(n,r)=>Yl(i=>{const l=typeof i;return n(i)?El(i):ja(`Expected type: ${r} but got: ${l}`)}),Xc=kc(Bt,"number"),Zr=kc(te,"string"),ml=kc(Me,"boolean"),Xl=kc(ut,"function"),mu=n=>{if(Object(n)!==n)return!0;switch({}.toString.call(n).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(n).every(r=>mu(n[r]));default:return!1}},sg=Yl(n=>mu(n)?El(n):ja("Expected value to be acceptable for sending via postMessage")),Cc=(n,r)=>({extract:(i,l)=>St(l,n).fold(()=>((u,f)=>fl(u,()=>'Choice schema did not contain choice key: "'+f+'"'))(i,n),u=>((f,p,y,v)=>St(y,v).fold(()=>((C,O,T)=>fl(C,()=>'The chosen schema: "'+T+'" did not exist in branches: '+Xi(O)))(f,y,v),C=>C.extract(f.concat(["branch: "+v]),p)))(i,l,r,u)),toString:()=>"chooseOn("+n+"). Possible values: "+tn(r)}),zd=n=>Yl(r=>n(r).fold(ja,El)),Xu=(n,r)=>xa(i=>n(i).fold(jf,vc),r),Ms=(n,r,i)=>{return l=((u,f,p)=>((y,v)=>y.stype===Ra.Error?{stype:Ra.Error,serror:v(y.serror)}:y)(f.extract([u],p),y=>({input:p,errors:y})))(n,r,i),Ku(l,un.error,un.value);var l},Ua=n=>n.fold(r=>{throw new Error(ii(r))},Ct),la=(n,r,i)=>Ua(Ms(n,r,i)),ii=n=>`Errors: +`)+"}"}),_c=n=>({extract:(r,i)=>{const l=pt(i,(u,f)=>n.extract(r.concat(["["+f+"]"]),u));return _a(l)},toString:()=>"array("+n.toString()+")"}),uu=(n,r)=>{const i=r!==void 0?r:Ct;return{extract:(l,u)=>{const f=[];for(const p of n){const y=p.extract(l,u);if(y.stype===Ra.Value)return{stype:Ra.Value,svalue:i(y.svalue)};f.push(y)}return _a(f)},toString:()=>"oneOf("+pt(n,l=>l.toString()).join(", ")+")"}},xa=(n,r)=>({extract:(i,l)=>{const u=tn(l),f=((p,y)=>_c(Gl(n)).extract(p,y))(i,u);return((p,y)=>p.stype===Ra.Value?y(p.svalue):p)(f,p=>{const y=pt(p,v=>Ad(v,v,{tag:"required",process:{}},r));return ho(y).extract(i,l)})},toString:()=>"setOf("+r.toString()+")"}),xc=ft(_c,ho),Pi=ue(vc),wc=(n,r)=>Gl(i=>{const l=typeof i;return n(i)?Sl(i):ja(`Expected type: ${r} but got: ${l}`)}),Yc=wc(Lt,"number"),Zr=wc(te,"string"),fl=wc(Me,"boolean"),Yl=wc(ut,"function"),fu=n=>{if(Object(n)!==n)return!0;switch({}.toString.call(n).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(n).every(r=>fu(n[r]));default:return!1}},ng=Gl(n=>fu(n)?Sl(n):ja("Expected value to be acceptable for sending via postMessage")),kc=(n,r)=>({extract:(i,l)=>St(l,n).fold(()=>((u,f)=>ul(u,()=>'Choice schema did not contain choice key: "'+f+'"'))(i,n),u=>((f,p,y,v)=>St(y,v).fold(()=>((C,O,A)=>ul(C,()=>'The chosen schema: "'+A+'" did not exist in branches: '+Yi(O)))(f,y,v),C=>C.extract(f.concat(["branch: "+v]),p)))(i,l,r,u)),toString:()=>"chooseOn("+n+"). Possible values: "+tn(r)}),Od=n=>Gl(r=>n(r).fold(ja,Sl)),Yu=(n,r)=>xa(i=>n(i).fold(Vf,yc),r),Ms=(n,r,i)=>{return l=((u,f,p)=>((y,v)=>y.stype===Ra.Error?{stype:Ra.Error,serror:v(y.serror)}:y)(f.extract([u],p),y=>({input:p,errors:y})))(n,r,i),qu(l,un.error,un.value);var l},Ua=n=>n.fold(r=>{throw new Error(ii(r))},Ct),la=(n,r,i)=>Ua(Ms(n,r,i)),ii=n=>`Errors: `+(r=>{const i=r.length>10?r.slice(0,10).concat([{path:[],getErrorInfo:ue("... (only showing first ten failures)")}]):r;return pt(i,l=>"Failed path: ("+l.path.join(" > ")+`) `+l.getErrorInfo())})(n.errors).join(` `)+` -Input object: `+Xi(n.input),_r=(n,r)=>Cc(n,Zn(r,ho)),Zf=(n,r)=>((i,l)=>{const u=sn(l);return{extract:(f,p)=>u().extract(f,p),toString:()=>u().toString()}})(0,r),dr=Ad,ca=(n,r)=>({tag:"custom",newKey:n,instantiator:r}),Tl=n=>zd(r=>Ge(n,r)?un.value(r):un.error(`Unsupported value: "${r}", choose one of "${n.join(", ")}".`)),nt=n=>dr(n,n,{tag:"required",process:{}},Ii()),Xr=(n,r)=>dr(n,n,{tag:"required",process:{}},r),pu=n=>Xr(n,Xc),js=n=>Xr(n,Zr),Al=(n,r)=>dr(n,n,{tag:"required",process:{}},Tl(r)),Za=n=>Xr(n,Xl),Ol=(n,r)=>dr(n,n,{tag:"required",process:{}},ho(r)),gu=(n,r)=>dr(n,n,{tag:"required",process:{}},wc(r)),li=(n,r)=>dr(n,n,{tag:"required",process:{}},xc(r)),vn=n=>dr(n,n,{tag:"option",process:{}},Ii()),ur=(n,r)=>dr(n,n,{tag:"option",process:{}},r),Sc=n=>ur(n,Xc),Us=n=>ur(n,Zr),Ju=(n,r)=>ur(n,Tl(r)),Jl=n=>ur(n,Xl),np=(n,r)=>ur(n,xc(r)),Zs=(n,r)=>ur(n,ho(r)),Ne=(n,r)=>dr(n,n,ul(r),Ii()),Wa=(n,r,i)=>dr(n,n,ul(r),i),fr=(n,r)=>Wa(n,r,Xc),Si=(n,r)=>Wa(n,r,Zr),zl=(n,r,i)=>Wa(n,r,Tl(i)),xr=(n,r)=>Wa(n,r,ml),xs=(n,r)=>Wa(n,r,Xl),Jn=(n,r,i)=>Wa(n,r,xc(i)),wa=(n,r,i)=>Wa(n,r,ho(i)),Ei=n=>{if(!$e(n))throw new Error("cases must be an array");if(n.length===0)throw new Error("there must be at least one case");const r=[],i={};return Ht(n,(l,u)=>{const f=tn(l);if(f.length!==1)throw new Error("one and only one name per case");const p=f[0],y=l[p];if(i[p]!==void 0)throw new Error("duplicate key detected:"+p);if(p==="cata")throw new Error("cannot have a case named cata (sorry)");if(!$e(y))throw new Error("case arguments must be an array");r.push(p),i[p]=(...v)=>{const C=v.length;if(C!==y.length)throw new Error("Wrong number of arguments to case "+p+". Expected "+y.length+" ("+y+"), got "+C);return{fold:(...O)=>{if(O.length!==n.length)throw new Error("Wrong number of arguments to fold. Expected "+n.length+", got "+O.length);return O[u].apply(null,v)},match:O=>{const T=tn(O);if(r.length!==T.length)throw new Error("Wrong number of arguments to match. Expected: "+r.join(",")+` -Actual: `+T.join(","));if(!bi(r,R=>Ge(T,R)))throw new Error("Not all branches were specified when using match. Specified: "+T.join(", ")+` -Required: `+r.join(", "));return O[p].apply(null,v)},log:O=>{console.log(O,{constructors:r,constructor:p,params:v})}}}}),i};Ei([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const ci=(n,r)=>((i,l)=>({[i]:l}))(n,r),Ji=n=>(r=>{const i={};return Ht(r,l=>{i[l.key]=l.value}),i})(n),Ql=n=>ut(n)?n:Fe,Ec=(n,r,i)=>{let l=n.dom;const u=Ql(i);for(;l.parentNode;){l=l.parentNode;const f=Vt(l),p=r(f);if(p.isSome())return p;if(u(f))break}return D.none()},Jc=(n,r,i)=>{const l=r(n),u=Ql(i);return l.orThunk(()=>u(n)?D.none():Ec(n,r,u))},Wf=(n,r)=>Hn(n.element,r.event.target),qf={can:Gt,abort:Fe,run:Ke},Tc=n=>{if(!an(n,"can")&&!an(n,"abort")&&!an(n,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(n,null,2)+" does not have can, abort, or run!");return{...qf,...n}},E=ue,P=E("touchstart"),q=E("touchmove"),ge=E("touchend"),xe=E("touchcancel"),at=E("mousedown"),xo=E("mousemove"),Uo=E("mouseout"),Bo=E("mouseup"),io=E("mouseover"),Wn=E("focusin"),sr=E("focusout"),Ws=E("keydown"),Nl=E("keyup"),hu=E("input"),Nd=E("change"),Mr=E("click"),fh=E("transitioncancel"),sp=E("transitionend"),rg=E("transitionstart"),Ma=E("selectstart"),rr=n=>ue("alloy."+n),da={tap:rr("tap")},Qc=rr("focus"),Kf=rr("blur.post"),Gf=rr("paste.post"),Fi=rr("receive"),di=rr("execute"),Yf=rr("focus.item"),Ac=da.tap,M1=rr("longpress"),rp=rr("sandbox.close"),ed=rr("typeahead.cancel"),Dd=rr("system.init"),no=rr("system.touchmove"),ec=rr("system.touchend"),Xf=rr("system.scroll"),Rd=rr("system.resize"),ka=rr("system.attached"),Dl=rr("system.detached"),Qu=rr("system.dismissRequested"),Md=rr("system.repositionRequested"),ag=rr("focusmanager.shifted"),tc=rr("slotcontainer.visibility"),Jf=rr("system.external.element.scroll"),Qf=rr("change.tab"),wt=rr("dismiss.tab"),ig=rr("highlight"),Bd=rr("dehighlight"),Qo=(n,r)=>{Rl(n,n.element,r,{})},lo=(n,r,i)=>{Rl(n,n.element,r,i)},Ld=n=>{Qo(n,di())},$s=(n,r,i)=>{Rl(n,r,i,{})},Rl=(n,r,i,l)=>{const u={target:r,...l};n.getSystem().triggerEvent(i,r,u)},Ml=(n,r,i,l)=>{n.getSystem().triggerEvent(i,r,l.event)},Ho=n=>Ji(n),ef=(n,r)=>({key:n,value:Tc({abort:r})}),qb=n=>({key:n,value:Tc({run:(r,i)=>{i.event.prevent()}})}),Xe=(n,r)=>({key:n,value:Tc({run:r})}),lg=(n,r,i)=>({key:n,value:Tc({run:(l,u)=>{r.apply(void 0,[l,u].concat(i))}})}),em=n=>r=>({key:n,value:Tc({run:(i,l)=>{Wf(i,l)&&r(i,l)}})}),tm=(n,r,i)=>((l,u)=>Xe(l,(f,p)=>{f.getSystem().getByUid(u).each(y=>{Ml(y,y.element,l,p)})}))(n,r.partUids[i]),tf=(n,r)=>Xe(n,(i,l)=>{const u=l.event,f=i.getSystem().getByDom(u.target).getOrThunk(()=>Jc(u.target,p=>i.getSystem().getByDom(p).toOptional(),Fe).getOr(i));r(i,f,l)}),bu=n=>Xe(n,(r,i)=>{i.cut()}),Kb=n=>Xe(n,(r,i)=>{i.stop()}),Pd=(n,r)=>em(n)(r),Ss=em(ka()),Oc=em(Dl()),cg=em(Dd()),Bl=(rm=di(),n=>Xe(rm,n)),yu=n=>pt(n,r=>cl(r,"/*")?r.substring(0,r.length-2):r),pl=(n,r)=>{const i=n.toString(),l=i.indexOf(")")+1,u=i.indexOf("("),f=i.substring(u+1,l-1).split(/,\s*/);return n.toFunctionAnnotation=()=>({name:r,parameters:yu(f)}),n},ar=n=>({classes:Ot(n.classes)?[]:n.classes,attributes:Ot(n.attributes)?{}:n.attributes,styles:Ot(n.styles)?{}:n.styles}),vu=(n,r,i)=>cg((l,u)=>{i(l,n,r)}),Er=n=>({key:n,value:void 0}),ap=(n,r,i,l,u,f,p)=>{const y=O=>an(O,i)?O[i]():D.none(),v=Zn(u,(O,T)=>((R,F,H)=>((G,J,ae)=>{const X=ae.toString(),Y=X.indexOf(")")+1,ne=X.indexOf("("),ie=X.substring(ne+1,Y-1).split(/,\s*/);return G.toFunctionAnnotation=()=>({name:J,parameters:yu(ie.slice(0,1).concat(ie.slice(3)))}),G})((G,...J)=>{const ae=[G].concat(J);return G.config({name:ue(R)}).fold(()=>{throw new Error("We could not find any behaviour configuration for: "+R+". Using API: "+H)},X=>{const Y=Array.prototype.slice.call(ae,1);return F.apply(void 0,[G,X.config,X.state].concat(Y))})},H,F))(i,O,T)),C={...Zn(f,(O,T)=>pl(O,T)),...v,revoke:ot(Er,i),config:O=>{const T=la(i+"-config",n,O);return{key:i,value:{config:T,me:C,configAsRaw:sn(()=>la(i+"-config",n,O)),initialConfig:O,state:p}}},schema:ue(r),exhibit:(O,T)=>vt(y(O),St(l,"exhibit"),(R,F)=>F(T,R.config,R.state)).getOrThunk(()=>ar({})),name:ue(i),handlers:O=>y(O).map(T=>St(l,"events").getOr(()=>({}))(T.config,T.state)).getOr({})};return C},Ll={init:()=>Jr({readState:ue("No State required")})},Jr=n=>n,xt=n=>Ji(n),_u=Ur([nt("fields"),nt("name"),Ne("active",{}),Ne("apis",{}),Ne("state",Ll),Ne("extra",{})]),Qr=n=>{const r=la("Creating behaviour: "+n.name,_u,n);return((i,l,u,f,p,y)=>{const v=Ur(i),C=Zs(l,[(O=i,ur("config",Ur(O)))]);var O;return ap(v,C,l,u,f,p,y)})(r.fields,r.name,r.active,r.apis,r.extra,r.state)},Gb=Ur([nt("branchKey"),nt("branches"),nt("name"),Ne("active",{}),Ne("apis",{}),Ne("state",Ll),Ne("extra",{})]),k=n=>{const r=la("Creating behaviour: "+n.name,Gb,n);return((i,l,u,f,p,y)=>{const v=i,C=Zs(l,[ur("config",i)]);return ap(v,C,l,u,f,p,y)})(_r(r.branchKey,r.branches),r.name,r.active,r.apis,r.extra,r.state)},N=ue(void 0),Z=(n,r)=>{const i=yr(n,r);return i===void 0||i===""?[]:i.split(" ")},se=n=>n.dom.classList!==void 0,Ce=n=>Z(n,"class"),et=(n,r)=>((i,l,u)=>{const f=Z(i,l).concat([u]);return wo(i,l,f.join(" ")),!0})(n,"class",r),Et=(n,r)=>((i,l,u)=>{const f=cn(Z(i,l),p=>p!==u);return f.length>0?wo(i,l,f.join(" ")):pn(i,l),!1})(n,"class",r),Tt=(n,r)=>{se(n)?n.dom.classList.add(r):et(n,r)},Lo=n=>{(se(n)?n.dom.classList:Ce(n)).length===0&&pn(n,"class")},co=(n,r)=>{se(n)?n.dom.classList.remove(r):Et(n,r),Lo(n)},_n=(n,r)=>se(n)&&n.dom.classList.contains(r),Ko=(n,r)=>{Ht(r,i=>{Tt(n,i)})},Qn=(n,r)=>{Ht(r,i=>{co(n,i)})},ea=n=>se(n)?(r=>{const i=r.dom.classList,l=new Array(i.length);for(let u=0;u{const f=p=>p+"px";return{position:n,left:r.map(f),top:i.map(f),right:l.map(f),bottom:u.map(f)}},oc=(n,r)=>{ri(n,(i=>({...i,position:D.some(i.position)}))(r))},nc=n=>(Kr(er(n,"position"),"fixed")?D.none():wi(n)).orThunk(()=>{const r=$r("span");return Hr(n).bind(i=>{ai(i,r);const l=wi(r);return aa(r),l})}),zc=n=>nc(n).map(Ye).getOrThunk(()=>pe(0,0)),ip=(n,r)=>{const i=n.element;Tt(i,r.transitionClass),co(i,r.fadeOutClass),Tt(i,r.fadeInClass),r.onShow(n)},td=(n,r)=>{const i=n.element;Tt(i,r.transitionClass),co(i,r.fadeInClass),Tt(i,r.fadeOutClass),r.onHide(n)},of=(n,r)=>n.y>=r.y,om=(n,r)=>n.bottom<=r.bottom,xu=(n,r,i)=>({location:"top",leftX:r,topY:i.bounds.y-n.y}),nf=(n,r,i)=>({location:"bottom",leftX:r,bottomY:n.bottom-i.bounds.bottom}),mh=n=>n.box.x-n.win.x,wu=(n,r,i)=>i.getInitialPos().map(l=>{const u=((f,p)=>{const y=p.optScrollEnv.fold(ue(f.bounds.y),v=>v.scrollElmTop+(f.bounds.y-v.currentScrollTop));return pe(f.bounds.x,y)})(l,r);return{box:rn(u.left,u.top,Go(n),Ds(n)),location:l.location}}),es=(n,r,i,l,u)=>{const f=((y,v)=>{const C=v.optScrollEnv.fold(ue(y.y),O=>y.y+O.currentScrollTop-O.scrollElmTop);return pe(y.x,C)})(r,i),p=rn(f.left,f.top,r.width,r.height);l.setInitialPos({style:bc(n),position:Ns(n,"position")||"static",bounds:p,location:u.location})},Ks=(n,r,i)=>i.getInitialPos().bind(l=>{var u;switch(i.clearInitialPos(),l.position){case"static":return D.some({morph:"static"});case"absolute":const f=nc(n).getOr(za()),p=vr(f),y=(u=f.dom.scrollTop)!==null&&u!==void 0?u:0;return D.some({morph:"absolute",positionCss:qs("absolute",St(l.style,"left").map(v=>r.x-p.x),St(l.style,"top").map(v=>r.y-p.y+y),St(l.style,"right").map(v=>p.right-r.right),St(l.style,"bottom").map(v=>p.bottom-r.bottom))});default:return D.none()}}),qa=n=>{switch(n.location){case"top":return D.some({morph:"fixed",positionCss:qs("fixed",D.some(n.leftX),D.some(n.topY),D.none(),D.none())});case"bottom":return D.some({morph:"fixed",positionCss:qs("fixed",D.some(n.leftX),D.none(),D.none(),D.some(n.bottomY))});default:return D.none()}},Qi=(n,r,i)=>{const l=n.element;return Kr(er(l,"position"),"fixed")?((u,f,p)=>((y,v,C)=>wu(y,v,C).filter(({box:O})=>((T,R,F)=>bi(T,H=>{switch(H){case"bottom":return om(R,F.bounds);case"top":return of(R,F.bounds)}}))(C.getModes(),O,v)).bind(({box:O})=>Ks(y,O,C)))(u,f,p).orThunk(()=>f.optScrollEnv.bind(y=>wu(u,f,p)).bind(({box:y,location:v})=>{const C=jr(),O=mh({win:C,box:y}),T=v==="top"?xu(C,O,f):nf(C,O,f);return qa(T)})))(l,r,i):((u,f,p)=>{const y=vr(u),v=jr(),C=((O,T,R)=>{const F=T.win,H=T.box,G=mh(T);return ko(O,J=>{switch(J){case"bottom":return om(H,R.bounds)?D.none():D.some(nf(F,G,R));case"top":return of(H,R.bounds)?D.none():D.some(xu(F,G,R));default:return D.none()}}).getOr({location:"no-dock"})})(p.getModes(),{win:v,box:y},f);return C.location==="top"||C.location==="bottom"?(es(u,y,f,p,C),qa(C)):D.none()})(l,r,i)},ph=(n,r,i)=>{i.setDocked(!1),Ht(["left","right","top","bottom","position"],l=>Vn(n.element,l)),r.onUndocked(n)},lp=(n,r,i,l)=>{const u=l.position==="fixed";i.setDocked(u),oc(n.element,l),(u?r.onDocked:r.onUndocked)(n)},nm=(n,r,i,l,u=!1)=>{r.contextual.each(f=>{f.lazyContext(n).each(p=>{const y=((v,C)=>v.yC.y)(p,l.bounds);y!==i.isVisible()&&(i.setVisible(y),u&&!y?(Ko(n.element,[f.fadeOutClass]),f.onHide(n)):(y?ip:td)(n,f))})})},sm=(n,r,i,l,u)=>{nm(n,r,i,l,!0),lp(n,r,i,u.positionCss)},gh=(n,r,i)=>{n.getSystem().isConnected()&&((l,u,f)=>{const p=u.lazyViewport(l);nm(l,u,f,p),Qi(l,p,f).each(y=>{((v,C,O,T,R)=>{switch(R.morph){case"static":return ph(v,C,O);case"absolute":return lp(v,C,O,R.positionCss);case"fixed":sm(v,C,O,T,R)}})(l,u,f,p,y)})})(n,r,i)},dg=(n,r,i)=>{i.isDocked()&&((l,u,f)=>{const p=l.element;f.setDocked(!1);const y=u.lazyViewport(l);((v,C,O)=>{const T=v.element;return wu(T,C,O).bind(({box:R})=>Ks(T,R,O))})(l,y,f).each(v=>{switch(v.morph){case"static":ph(l,u,f);break;case"absolute":lp(l,u,f,v.positionCss)}}),f.setVisible(!0),u.contextual.each(v=>{Qn(p,[v.fadeInClass,v.fadeOutClass,v.transitionClass]),v.onShow(l)}),gh(l,u,f)})(n,r,i)},B1=n=>(r,i,l)=>{const u=i.lazyViewport(r);((f,p,y,v)=>{const C=vr(f),O=jr(),T=v(O,mh({win:O,box:C}),p);return T.location==="bottom"||T.location==="top"?(((R,F,H,G,J)=>{G.getInitialPos().fold(()=>es(R,F,H,G,J),()=>Ke)})(f,C,p,y,T),qa(T)):D.none()})(r.element,u,l,n).each(f=>{sm(r,i,l,u,f)})},hh=B1(xu),bh=B1(nf);var rm,ug=Object.freeze({__proto__:null,refresh:gh,reset:dg,isDocked:(n,r,i)=>i.isDocked(),getModes:(n,r,i)=>i.getModes(),setModes:(n,r,i,l)=>i.setModes(l),forceDockToTop:hh,forceDockToBottom:bh}),L1=Object.freeze({__proto__:null,events:(n,r)=>Ho([Pd(sp(),(i,l)=>{n.contextual.each(u=>{_n(i.element,u.transitionClass)&&(Qn(i.element,[u.transitionClass,u.fadeInClass]),(r.isVisible()?u.onShown:u.onHidden)(i)),l.stop()})}),Xe(Xf(),(i,l)=>{gh(i,n,r)}),Xe(Jf(),(i,l)=>{gh(i,n,r)}),Xe(Rd(),(i,l)=>{dg(i,n,r)})])});const ku=n=>n.dom.innerHTML,cp=(n,r)=>{const i=ha(n).dom,l=Vt(i.createDocumentFragment()),u=((f,p)=>{const y=(p||document).createElement("div");return y.innerHTML=f,Yn(Vt(y))})(r,i);cr(l,u),Rs(n),ai(n,l)},dp=(n,r)=>Vt(n.dom.cloneNode(r)),Cu=n=>(r=>{if(_l(r))return"#shadow-root";{const i=(l=>dp(l,!1))(r);return(l=>{const u=$r("div"),f=Vt(l.dom.cloneNode(!0));return ai(u,f),ku(u)})(i)}})(n);var sf;(function(n){n[n.STOP=0]="STOP",n[n.NORMAL=1]="NORMAL",n[n.LOGGING=2]="LOGGING"})(sf||(sf={}));const yh=so({}),Fk=["alloy/data/Fields","alloy/debugging/Debugging"],vh=(n,r,i)=>((l,u,f)=>{switch(St(yh.get(),l).orThunk(()=>{const p=tn(yh.get());return ko(p,y=>l.indexOf(y)>-1?D.some(yh.get()[y]):D.none())}).getOr(sf.NORMAL)){case sf.NORMAL:return f(Nc());case sf.LOGGING:{const p=((v,C)=>{const O=[],T=new Date().getTime();return{logEventCut:(R,F,H)=>{O.push({outcome:"cut",target:F,purpose:H})},logEventStopped:(R,F,H)=>{O.push({outcome:"stopped",target:F,purpose:H})},logNoParent:(R,F,H)=>{O.push({outcome:"no-parent",target:F,purpose:H})},logEventNoHandlers:(R,F)=>{O.push({outcome:"no-handlers-left",target:F})},logEventResponse:(R,F,H)=>{O.push({outcome:"response",purpose:H,target:F})},write:()=>{const R=new Date().getTime();Ge(["mousemove","mouseover","mouseout",Dd()],v)||console.log(v,{event:v,time:R-T,target:C.dom,sequence:pt(O,F=>Ge(["cut","stopped","response"],F.outcome)?"{"+F.purpose+"} "+F.outcome+" at ("+Cu(F.target)+")":F.outcome)})}}})(l,u),y=f(p);return p.write(),y}case sf.STOP:return!0}})(n,r,i),Nc=ue({logEventCut:Ke,logEventStopped:Ke,logNoParent:Ke,logEventNoHandlers:Ke,logEventResponse:Ke,write:Ke}),w_=ue([nt("menu"),nt("selectedMenu")]),P1=ue([nt("item"),nt("selectedItem")]);ue(ho(P1().concat(w_())));const up=ue(ho(P1())),Ka=Ol("initSize",[nt("numColumns"),nt("numRows")]),fp=()=>Ol("markers",[nt("backgroundMenu")].concat(w_()).concat(P1())),mp=n=>Ol("markers",pt(n,nt)),Yb=(n,r,i)=>((()=>{const l=new Error;if(l.stack!==void 0){const u=l.stack.split(` -`);j(u,f=>f.indexOf("alloy")>0&&!To(Fk,p=>f.indexOf(p)>-1)).getOr("unknown")}})(),dr(r,r,i,zd(l=>un.value((...u)=>l.apply(void 0,u))))),Dn=n=>Yb(0,n,ul(Ke)),el=n=>Yb(0,n,ul(D.none)),Id=n=>Yb(0,n,{tag:"required",process:{}}),fi=n=>Yb(0,n,{tag:"required",process:{}}),Es=(n,r)=>ca(n,ue(r)),_h=n=>ca(n,Ct),k_=ue(Ka);var $k=[Zs("contextual",[js("fadeInClass"),js("fadeOutClass"),js("transitionClass"),Za("lazyContext"),Dn("onShow"),Dn("onShown"),Dn("onHide"),Dn("onHidden")]),xs("lazyViewport",()=>({bounds:jr(),optScrollEnv:D.none()})),Jn("modes",["top","bottom"],Zr),Dn("onDocked"),Dn("onUndocked")];const Gs=Qr({fields:$k,name:"docking",active:L1,apis:ug,state:Object.freeze({__proto__:null,init:n=>{const r=so(!1),i=so(!0),l=Nn(),u=so(n.modes);return Jr({isDocked:r.get,setDocked:r.set,getInitialPos:l.get,setInitialPos:l.set,clearInitialPos:l.clear,isVisible:i.get,setVisible:i.set,getModes:u.get,setModes:u.set,readState:()=>`docked: ${r.get()}, visible: ${i.get()}, modes: ${u.get().join(",")}`})}})}),Xb=Ho([((n,r)=>({key:n,value:Tc({can:(i,l)=>{const u=l.event,f=u.originator,p=u.target;return!((y,v,C)=>Hn(v,y.element)&&!Hn(v,C))(i,f,p)||(console.warn(Qc()+` did not get interpreted by the desired target. -Originator: `+Cu(f)+` -Target: `+Cu(p)+` -Check the `+Qc()+" event handlers"),!1)}})}))(Qc())]);var I1=Object.freeze({__proto__:null,events:Xb});const am=(n,r,i,l)=>{const u=n+r;return u>l?i:uMath.min(Math.max(n,r),i);let fg=0;const Xt=n=>{const r=new Date().getTime(),i=Math.floor(window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295*1e9);return fg++,n+"_"+i+fg+String(r)},od=ue("alloy-id-"),F1=ue("data-alloy-id"),Jb=od(),mg=F1(),Qb=(n,r)=>{Object.defineProperty(n.dom,mg,{value:r,writable:!0})},pp=n=>{const r=ys(n)?n.dom[mg]:null;return D.from(r)},Rc=n=>Xt(n),Hk=Ct,ey=n=>{const r=u=>`The component must be in a context to execute: ${u}`+(n?` -`+Cu(n().element)+" is not in context.":""),i=u=>()=>{throw new Error(r(u))},l=u=>()=>{console.warn(r(u))};return{debugInfo:ue("fake"),triggerEvent:l("triggerEvent"),triggerFocus:l("triggerFocus"),triggerEscape:l("triggerEscape"),broadcast:l("broadcast"),broadcastOn:l("broadcastOn"),broadcastEvent:l("broadcastEvent"),build:i("build"),buildOrPatch:i("buildOrPatch"),addToWorld:i("addToWorld"),removeFromWorld:i("removeFromWorld"),addToGui:i("addToGui"),removeFromGui:i("removeFromGui"),getByUid:i("getByUid"),getByDom:i("getByDom"),isConnected:Fe}},$1=ey(),ty=Xt("alloy-premade"),H1=n=>(Object.defineProperty(n.element.dom,ty,{value:n.uid,writable:!0}),ci(ty,n)),V1=n=>St(n,ty),oy=n=>((r,i)=>{const l=i.toString(),u=l.indexOf(")")+1,f=l.indexOf("("),p=l.substring(f+1,u-1).split(/,\s*/);return r.toFunctionAnnotation=()=>({name:"OVERRIDE",parameters:yu(p.slice(1))}),r})((r,...i)=>n(r.getApis(),r,...i),n),j1=(n,r)=>{const i={};return rs(n,(l,u)=>{rs(l,(f,p)=>{const y=St(i,p).getOr([]);i[p]=y.concat([r(u,f)])})}),i},U1=n=>n.cHandler,C_=(n,r)=>({name:n,handler:r}),Vk=(n,r)=>{const i={};return Ht(n,l=>{i[l.name()]=l.handlers(r)}),i},xh=(n,r,i)=>{const l=r[i];return l?((u,f,p,y)=>{try{const v=Le(p,(C,O)=>{const T=C[f],R=O[f],F=y.indexOf(T),H=y.indexOf(R);if(F===-1)throw new Error("The ordering for "+u+" does not have an entry for "+T+`. -Order specified: `+JSON.stringify(y,null,2));if(H===-1)throw new Error("The ordering for "+u+" does not have an entry for "+R+`. -Order specified: `+JSON.stringify(y,null,2));return F(f=>({can:((v,C)=>(...O)=>zo(v,(T,R)=>T&&(F=>F.can)(R).apply(void 0,O),!0))(f),abort:((v,C)=>(...O)=>zo(v,(T,R)=>T||(F=>F.abort)(R).apply(void 0,O),!1))(f),run:(...v)=>{Ht(f,C=>{C.run.apply(void 0,v)})}}))(pt(u,f=>f.handler))):((u,f)=>un.error(["The event ("+u+`) has more than one behaviour that listens to it. +Input object: `+Yi(n.input),_r=(n,r)=>kc(n,Zn(r,ho)),Uf=(n,r)=>((i,l)=>{const u=sn(l);return{extract:(f,p)=>u().extract(f,p),toString:()=>u().toString()}})(0,r),dr=Ad,ca=(n,r)=>({tag:"custom",newKey:n,instantiator:r}),El=n=>Od(r=>Ge(n,r)?un.value(r):un.error(`Unsupported value: "${r}", choose one of "${n.join(", ")}".`)),nt=n=>dr(n,n,{tag:"required",process:{}},Pi()),Xr=(n,r)=>dr(n,n,{tag:"required",process:{}},r),mu=n=>Xr(n,Yc),js=n=>Xr(n,Zr),Al=(n,r)=>dr(n,n,{tag:"required",process:{}},El(r)),Za=n=>Xr(n,Yl),Tl=(n,r)=>dr(n,n,{tag:"required",process:{}},ho(r)),pu=(n,r)=>dr(n,n,{tag:"required",process:{}},xc(r)),li=(n,r)=>dr(n,n,{tag:"required",process:{}},_c(r)),vn=n=>dr(n,n,{tag:"option",process:{}},Pi()),ur=(n,r)=>dr(n,n,{tag:"option",process:{}},r),Cc=n=>ur(n,Yc),Us=n=>ur(n,Zr),Xu=(n,r)=>ur(n,El(r)),Xl=n=>ur(n,Yl),op=(n,r)=>ur(n,_c(r)),Zs=(n,r)=>ur(n,ho(r)),Ne=(n,r)=>dr(n,n,dl(r),Pi()),Wa=(n,r,i)=>dr(n,n,dl(r),i),fr=(n,r)=>Wa(n,r,Yc),Ci=(n,r)=>Wa(n,r,Zr),Ol=(n,r,i)=>Wa(n,r,El(i)),xr=(n,r)=>Wa(n,r,fl),xs=(n,r)=>Wa(n,r,Yl),Jn=(n,r,i)=>Wa(n,r,_c(i)),wa=(n,r,i)=>Wa(n,r,ho(i)),Si=n=>{if(!He(n))throw new Error("cases must be an array");if(n.length===0)throw new Error("there must be at least one case");const r=[],i={};return $t(n,(l,u)=>{const f=tn(l);if(f.length!==1)throw new Error("one and only one name per case");const p=f[0],y=l[p];if(i[p]!==void 0)throw new Error("duplicate key detected:"+p);if(p==="cata")throw new Error("cannot have a case named cata (sorry)");if(!He(y))throw new Error("case arguments must be an array");r.push(p),i[p]=(...v)=>{const C=v.length;if(C!==y.length)throw new Error("Wrong number of arguments to case "+p+". Expected "+y.length+" ("+y+"), got "+C);return{fold:(...O)=>{if(O.length!==n.length)throw new Error("Wrong number of arguments to fold. Expected "+n.length+", got "+O.length);return O[u].apply(null,v)},match:O=>{const A=tn(O);if(r.length!==A.length)throw new Error("Wrong number of arguments to match. Expected: "+r.join(",")+` +Actual: `+A.join(","));if(!hi(r,R=>Ge(A,R)))throw new Error("Not all branches were specified when using match. Specified: "+A.join(", ")+` +Required: `+r.join(", "));return O[p].apply(null,v)},log:O=>{console.log(O,{constructors:r,constructor:p,params:v})}}}}),i};Si([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const ci=(n,r)=>((i,l)=>({[i]:l}))(n,r),Xi=n=>(r=>{const i={};return $t(r,l=>{i[l.key]=l.value}),i})(n),Jl=n=>ut(n)?n:Fe,Sc=(n,r,i)=>{let l=n.dom;const u=Jl(i);for(;l.parentNode;){l=l.parentNode;const f=Vt(l),p=r(f);if(p.isSome())return p;if(u(f))break}return D.none()},Xc=(n,r,i)=>{const l=r(n),u=Jl(i);return l.orThunk(()=>u(n)?D.none():Sc(n,r,u))},Zf=(n,r)=>$n(n.element,r.event.target),Wf={can:Gt,abort:Fe,run:Ke},Ec=n=>{if(!an(n,"can")&&!an(n,"abort")&&!an(n,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(n,null,2)+" does not have can, abort, or run!");return{...Wf,...n}},E=ue,P=E("touchstart"),q=E("touchmove"),ge=E("touchend"),xe=E("touchcancel"),at=E("mousedown"),xo=E("mousemove"),Uo=E("mouseout"),Lo=E("mouseup"),io=E("mouseover"),Wn=E("focusin"),sr=E("focusout"),Ws=E("keydown"),zl=E("keyup"),gu=E("input"),zd=E("change"),Mr=E("click"),uh=E("transitioncancel"),np=E("transitionend"),sg=E("transitionstart"),Ma=E("selectstart"),rr=n=>ue("alloy."+n),da={tap:rr("tap")},Jc=rr("focus"),qf=rr("blur.post"),Kf=rr("paste.post"),Ii=rr("receive"),di=rr("execute"),Gf=rr("focus.item"),Ac=da.tap,R1=rr("longpress"),sp=rr("sandbox.close"),Qc=rr("typeahead.cancel"),Nd=rr("system.init"),no=rr("system.touchmove"),Ql=rr("system.touchend"),Yf=rr("system.scroll"),Dd=rr("system.resize"),ka=rr("system.attached"),Nl=rr("system.detached"),Ju=rr("system.dismissRequested"),Rd=rr("system.repositionRequested"),rg=rr("focusmanager.shifted"),ec=rr("slotcontainer.visibility"),Xf=rr("system.external.element.scroll"),Jf=rr("change.tab"),wt=rr("dismiss.tab"),ag=rr("highlight"),Md=rr("dehighlight"),Qo=(n,r)=>{Dl(n,n.element,r,{})},lo=(n,r,i)=>{Dl(n,n.element,r,i)},Ld=n=>{Qo(n,di())},Hs=(n,r,i)=>{Dl(n,r,i,{})},Dl=(n,r,i,l)=>{const u={target:r,...l};n.getSystem().triggerEvent(i,r,u)},Rl=(n,r,i,l)=>{n.getSystem().triggerEvent(i,r,l.event)},$o=n=>Xi(n),Qu=(n,r)=>({key:n,value:Ec({abort:r})}),Wb=n=>({key:n,value:Ec({run:(r,i)=>{i.event.prevent()}})}),Xe=(n,r)=>({key:n,value:Ec({run:r})}),ig=(n,r,i)=>({key:n,value:Ec({run:(l,u)=>{r.apply(void 0,[l,u].concat(i))}})}),Qf=n=>r=>({key:n,value:Ec({run:(i,l)=>{Zf(i,l)&&r(i,l)}})}),em=(n,r,i)=>((l,u)=>Xe(l,(f,p)=>{f.getSystem().getByUid(u).each(y=>{Rl(y,y.element,l,p)})}))(n,r.partUids[i]),ef=(n,r)=>Xe(n,(i,l)=>{const u=l.event,f=i.getSystem().getByDom(u.target).getOrThunk(()=>Xc(u.target,p=>i.getSystem().getByDom(p).toOptional(),Fe).getOr(i));r(i,f,l)}),hu=n=>Xe(n,(r,i)=>{i.cut()}),qb=n=>Xe(n,(r,i)=>{i.stop()}),Bd=(n,r)=>Qf(n)(r),Ss=Qf(ka()),Tc=Qf(Nl()),lg=Qf(Nd()),Ml=(sm=di(),n=>Xe(sm,n)),bu=n=>pt(n,r=>ll(r,"/*")?r.substring(0,r.length-2):r),ml=(n,r)=>{const i=n.toString(),l=i.indexOf(")")+1,u=i.indexOf("("),f=i.substring(u+1,l-1).split(/,\s*/);return n.toFunctionAnnotation=()=>({name:r,parameters:bu(f)}),n},ar=n=>({classes:Ot(n.classes)?[]:n.classes,attributes:Ot(n.attributes)?{}:n.attributes,styles:Ot(n.styles)?{}:n.styles}),yu=(n,r,i)=>lg((l,u)=>{i(l,n,r)}),Er=n=>({key:n,value:void 0}),rp=(n,r,i,l,u,f,p)=>{const y=O=>an(O,i)?O[i]():D.none(),v=Zn(u,(O,A)=>((R,F,$)=>((G,J,ae)=>{const X=ae.toString(),Y=X.indexOf(")")+1,ne=X.indexOf("("),ie=X.substring(ne+1,Y-1).split(/,\s*/);return G.toFunctionAnnotation=()=>({name:J,parameters:bu(ie.slice(0,1).concat(ie.slice(3)))}),G})((G,...J)=>{const ae=[G].concat(J);return G.config({name:ue(R)}).fold(()=>{throw new Error("We could not find any behaviour configuration for: "+R+". Using API: "+$)},X=>{const Y=Array.prototype.slice.call(ae,1);return F.apply(void 0,[G,X.config,X.state].concat(Y))})},$,F))(i,O,A)),C={...Zn(f,(O,A)=>ml(O,A)),...v,revoke:ot(Er,i),config:O=>{const A=la(i+"-config",n,O);return{key:i,value:{config:A,me:C,configAsRaw:sn(()=>la(i+"-config",n,O)),initialConfig:O,state:p}}},schema:ue(r),exhibit:(O,A)=>vt(y(O),St(l,"exhibit"),(R,F)=>F(A,R.config,R.state)).getOrThunk(()=>ar({})),name:ue(i),handlers:O=>y(O).map(A=>St(l,"events").getOr(()=>({}))(A.config,A.state)).getOr({})};return C},Ll={init:()=>Jr({readState:ue("No State required")})},Jr=n=>n,xt=n=>Xi(n),vu=Ur([nt("fields"),nt("name"),Ne("active",{}),Ne("apis",{}),Ne("state",Ll),Ne("extra",{})]),Qr=n=>{const r=la("Creating behaviour: "+n.name,vu,n);return((i,l,u,f,p,y)=>{const v=Ur(i),C=Zs(l,[(O=i,ur("config",Ur(O)))]);var O;return rp(v,C,l,u,f,p,y)})(r.fields,r.name,r.active,r.apis,r.extra,r.state)},Kb=Ur([nt("branchKey"),nt("branches"),nt("name"),Ne("active",{}),Ne("apis",{}),Ne("state",Ll),Ne("extra",{})]),k=n=>{const r=la("Creating behaviour: "+n.name,Kb,n);return((i,l,u,f,p,y)=>{const v=i,C=Zs(l,[ur("config",i)]);return rp(v,C,l,u,f,p,y)})(_r(r.branchKey,r.branches),r.name,r.active,r.apis,r.extra,r.state)},N=ue(void 0),Z=(n,r)=>{const i=yr(n,r);return i===void 0||i===""?[]:i.split(" ")},se=n=>n.dom.classList!==void 0,Ce=n=>Z(n,"class"),et=(n,r)=>((i,l,u)=>{const f=Z(i,l).concat([u]);return wo(i,l,f.join(" ")),!0})(n,"class",r),Et=(n,r)=>((i,l,u)=>{const f=cn(Z(i,l),p=>p!==u);return f.length>0?wo(i,l,f.join(" ")):pn(i,l),!1})(n,"class",r),At=(n,r)=>{se(n)?n.dom.classList.add(r):et(n,r)},Bo=n=>{(se(n)?n.dom.classList:Ce(n)).length===0&&pn(n,"class")},co=(n,r)=>{se(n)?n.dom.classList.remove(r):Et(n,r),Bo(n)},_n=(n,r)=>se(n)&&n.dom.classList.contains(r),Ko=(n,r)=>{$t(r,i=>{At(n,i)})},Qn=(n,r)=>{$t(r,i=>{co(n,i)})},ea=n=>se(n)?(r=>{const i=r.dom.classList,l=new Array(i.length);for(let u=0;u{const f=p=>p+"px";return{position:n,left:r.map(f),top:i.map(f),right:l.map(f),bottom:u.map(f)}},tc=(n,r)=>{ri(n,(i=>({...i,position:D.some(i.position)}))(r))},oc=n=>(Kr(er(n,"position"),"fixed")?D.none():xi(n)).orThunk(()=>{const r=Hr("span");return $r(n).bind(i=>{ai(i,r);const l=xi(r);return aa(r),l})}),Oc=n=>oc(n).map(Ye).getOrThunk(()=>pe(0,0)),ap=(n,r)=>{const i=n.element;At(i,r.transitionClass),co(i,r.fadeOutClass),At(i,r.fadeInClass),r.onShow(n)},ed=(n,r)=>{const i=n.element;At(i,r.transitionClass),co(i,r.fadeInClass),At(i,r.fadeOutClass),r.onHide(n)},tf=(n,r)=>n.y>=r.y,tm=(n,r)=>n.bottom<=r.bottom,_u=(n,r,i)=>({location:"top",leftX:r,topY:i.bounds.y-n.y}),of=(n,r,i)=>({location:"bottom",leftX:r,bottomY:n.bottom-i.bounds.bottom}),fh=n=>n.box.x-n.win.x,xu=(n,r,i)=>i.getInitialPos().map(l=>{const u=((f,p)=>{const y=p.optScrollEnv.fold(ue(f.bounds.y),v=>v.scrollElmTop+(f.bounds.y-v.currentScrollTop));return pe(f.bounds.x,y)})(l,r);return{box:rn(u.left,u.top,Go(n),Ds(n)),location:l.location}}),es=(n,r,i,l,u)=>{const f=((y,v)=>{const C=v.optScrollEnv.fold(ue(y.y),O=>y.y+O.currentScrollTop-O.scrollElmTop);return pe(y.x,C)})(r,i),p=rn(f.left,f.top,r.width,r.height);l.setInitialPos({style:hc(n),position:Ns(n,"position")||"static",bounds:p,location:u.location})},Ks=(n,r,i)=>i.getInitialPos().bind(l=>{var u;switch(i.clearInitialPos(),l.position){case"static":return D.some({morph:"static"});case"absolute":const f=oc(n).getOr(za()),p=vr(f),y=(u=f.dom.scrollTop)!==null&&u!==void 0?u:0;return D.some({morph:"absolute",positionCss:qs("absolute",St(l.style,"left").map(v=>r.x-p.x),St(l.style,"top").map(v=>r.y-p.y+y),St(l.style,"right").map(v=>p.right-r.right),St(l.style,"bottom").map(v=>p.bottom-r.bottom))});default:return D.none()}}),qa=n=>{switch(n.location){case"top":return D.some({morph:"fixed",positionCss:qs("fixed",D.some(n.leftX),D.some(n.topY),D.none(),D.none())});case"bottom":return D.some({morph:"fixed",positionCss:qs("fixed",D.some(n.leftX),D.none(),D.none(),D.some(n.bottomY))});default:return D.none()}},Ji=(n,r,i)=>{const l=n.element;return Kr(er(l,"position"),"fixed")?((u,f,p)=>((y,v,C)=>xu(y,v,C).filter(({box:O})=>((A,R,F)=>hi(A,$=>{switch($){case"bottom":return tm(R,F.bounds);case"top":return tf(R,F.bounds)}}))(C.getModes(),O,v)).bind(({box:O})=>Ks(y,O,C)))(u,f,p).orThunk(()=>f.optScrollEnv.bind(y=>xu(u,f,p)).bind(({box:y,location:v})=>{const C=jr(),O=fh({win:C,box:y}),A=v==="top"?_u(C,O,f):of(C,O,f);return qa(A)})))(l,r,i):((u,f,p)=>{const y=vr(u),v=jr(),C=((O,A,R)=>{const F=A.win,$=A.box,G=fh(A);return ko(O,J=>{switch(J){case"bottom":return tm($,R.bounds)?D.none():D.some(of(F,G,R));case"top":return tf($,R.bounds)?D.none():D.some(_u(F,G,R));default:return D.none()}}).getOr({location:"no-dock"})})(p.getModes(),{win:v,box:y},f);return C.location==="top"||C.location==="bottom"?(es(u,y,f,p,C),qa(C)):D.none()})(l,r,i)},mh=(n,r,i)=>{i.setDocked(!1),$t(["left","right","top","bottom","position"],l=>Vn(n.element,l)),r.onUndocked(n)},ip=(n,r,i,l)=>{const u=l.position==="fixed";i.setDocked(u),tc(n.element,l),(u?r.onDocked:r.onUndocked)(n)},om=(n,r,i,l,u=!1)=>{r.contextual.each(f=>{f.lazyContext(n).each(p=>{const y=((v,C)=>v.yC.y)(p,l.bounds);y!==i.isVisible()&&(i.setVisible(y),u&&!y?(Ko(n.element,[f.fadeOutClass]),f.onHide(n)):(y?ap:ed)(n,f))})})},nm=(n,r,i,l,u)=>{om(n,r,i,l,!0),ip(n,r,i,u.positionCss)},ph=(n,r,i)=>{n.getSystem().isConnected()&&((l,u,f)=>{const p=u.lazyViewport(l);om(l,u,f,p),Ji(l,p,f).each(y=>{((v,C,O,A,R)=>{switch(R.morph){case"static":return mh(v,C,O);case"absolute":return ip(v,C,O,R.positionCss);case"fixed":nm(v,C,O,A,R)}})(l,u,f,p,y)})})(n,r,i)},cg=(n,r,i)=>{i.isDocked()&&((l,u,f)=>{const p=l.element;f.setDocked(!1);const y=u.lazyViewport(l);((v,C,O)=>{const A=v.element;return xu(A,C,O).bind(({box:R})=>Ks(A,R,O))})(l,y,f).each(v=>{switch(v.morph){case"static":mh(l,u,f);break;case"absolute":ip(l,u,f,v.positionCss)}}),f.setVisible(!0),u.contextual.each(v=>{Qn(p,[v.fadeInClass,v.fadeOutClass,v.transitionClass]),v.onShow(l)}),ph(l,u,f)})(n,r,i)},M1=n=>(r,i,l)=>{const u=i.lazyViewport(r);((f,p,y,v)=>{const C=vr(f),O=jr(),A=v(O,fh({win:O,box:C}),p);return A.location==="bottom"||A.location==="top"?(((R,F,$,G,J)=>{G.getInitialPos().fold(()=>es(R,F,$,G,J),()=>Ke)})(f,C,p,y,A),qa(A)):D.none()})(r.element,u,l,n).each(f=>{nm(r,i,l,u,f)})},gh=M1(_u),hh=M1(of);var sm,dg=Object.freeze({__proto__:null,refresh:ph,reset:cg,isDocked:(n,r,i)=>i.isDocked(),getModes:(n,r,i)=>i.getModes(),setModes:(n,r,i,l)=>i.setModes(l),forceDockToTop:gh,forceDockToBottom:hh}),L1=Object.freeze({__proto__:null,events:(n,r)=>$o([Bd(np(),(i,l)=>{n.contextual.each(u=>{_n(i.element,u.transitionClass)&&(Qn(i.element,[u.transitionClass,u.fadeInClass]),(r.isVisible()?u.onShown:u.onHidden)(i)),l.stop()})}),Xe(Yf(),(i,l)=>{ph(i,n,r)}),Xe(Xf(),(i,l)=>{ph(i,n,r)}),Xe(Dd(),(i,l)=>{cg(i,n,r)})])});const wu=n=>n.dom.innerHTML,lp=(n,r)=>{const i=ha(n).dom,l=Vt(i.createDocumentFragment()),u=((f,p)=>{const y=(p||document).createElement("div");return y.innerHTML=f,Yn(Vt(y))})(r,i);cr(l,u),Rs(n),ai(n,l)},cp=(n,r)=>Vt(n.dom.cloneNode(r)),ku=n=>(r=>{if(vl(r))return"#shadow-root";{const i=(l=>cp(l,!1))(r);return(l=>{const u=Hr("div"),f=Vt(l.dom.cloneNode(!0));return ai(u,f),wu(u)})(i)}})(n);var nf;(function(n){n[n.STOP=0]="STOP",n[n.NORMAL=1]="NORMAL",n[n.LOGGING=2]="LOGGING"})(nf||(nf={}));const bh=so({}),Ik=["alloy/data/Fields","alloy/debugging/Debugging"],yh=(n,r,i)=>((l,u,f)=>{switch(St(bh.get(),l).orThunk(()=>{const p=tn(bh.get());return ko(p,y=>l.indexOf(y)>-1?D.some(bh.get()[y]):D.none())}).getOr(nf.NORMAL)){case nf.NORMAL:return f(zc());case nf.LOGGING:{const p=((v,C)=>{const O=[],A=new Date().getTime();return{logEventCut:(R,F,$)=>{O.push({outcome:"cut",target:F,purpose:$})},logEventStopped:(R,F,$)=>{O.push({outcome:"stopped",target:F,purpose:$})},logNoParent:(R,F,$)=>{O.push({outcome:"no-parent",target:F,purpose:$})},logEventNoHandlers:(R,F)=>{O.push({outcome:"no-handlers-left",target:F})},logEventResponse:(R,F,$)=>{O.push({outcome:"response",purpose:$,target:F})},write:()=>{const R=new Date().getTime();Ge(["mousemove","mouseover","mouseout",Nd()],v)||console.log(v,{event:v,time:R-A,target:C.dom,sequence:pt(O,F=>Ge(["cut","stopped","response"],F.outcome)?"{"+F.purpose+"} "+F.outcome+" at ("+ku(F.target)+")":F.outcome)})}}})(l,u),y=f(p);return p.write(),y}case nf.STOP:return!0}})(n,r,i),zc=ue({logEventCut:Ke,logEventStopped:Ke,logNoParent:Ke,logEventNoHandlers:Ke,logEventResponse:Ke,write:Ke}),x_=ue([nt("menu"),nt("selectedMenu")]),B1=ue([nt("item"),nt("selectedItem")]);ue(ho(B1().concat(x_())));const dp=ue(ho(B1())),Ka=Tl("initSize",[nt("numColumns"),nt("numRows")]),up=()=>Tl("markers",[nt("backgroundMenu")].concat(x_()).concat(B1())),fp=n=>Tl("markers",pt(n,nt)),Gb=(n,r,i)=>((()=>{const l=new Error;if(l.stack!==void 0){const u=l.stack.split(` +`);j(u,f=>f.indexOf("alloy")>0&&!Ao(Ik,p=>f.indexOf(p)>-1)).getOr("unknown")}})(),dr(r,r,i,Od(l=>un.value((...u)=>l.apply(void 0,u))))),Dn=n=>Gb(0,n,dl(Ke)),Qi=n=>Gb(0,n,dl(D.none)),Pd=n=>Gb(0,n,{tag:"required",process:{}}),ui=n=>Gb(0,n,{tag:"required",process:{}}),Es=(n,r)=>ca(n,ue(r)),vh=n=>ca(n,Ct),w_=ue(Ka);var Fk=[Zs("contextual",[js("fadeInClass"),js("fadeOutClass"),js("transitionClass"),Za("lazyContext"),Dn("onShow"),Dn("onShown"),Dn("onHide"),Dn("onHidden")]),xs("lazyViewport",()=>({bounds:jr(),optScrollEnv:D.none()})),Jn("modes",["top","bottom"],Zr),Dn("onDocked"),Dn("onUndocked")];const Gs=Qr({fields:Fk,name:"docking",active:L1,apis:dg,state:Object.freeze({__proto__:null,init:n=>{const r=so(!1),i=so(!0),l=Nn(),u=so(n.modes);return Jr({isDocked:r.get,setDocked:r.set,getInitialPos:l.get,setInitialPos:l.set,clearInitialPos:l.clear,isVisible:i.get,setVisible:i.set,getModes:u.get,setModes:u.set,readState:()=>`docked: ${r.get()}, visible: ${i.get()}, modes: ${u.get().join(",")}`})}})}),Yb=$o([((n,r)=>({key:n,value:Ec({can:(i,l)=>{const u=l.event,f=u.originator,p=u.target;return!((y,v,C)=>$n(v,y.element)&&!$n(v,C))(i,f,p)||(console.warn(Jc()+` did not get interpreted by the desired target. +Originator: `+ku(f)+` +Target: `+ku(p)+` +Check the `+Jc()+" event handlers"),!1)}})}))(Jc())]);var P1=Object.freeze({__proto__:null,events:Yb});const rm=(n,r,i,l)=>{const u=n+r;return u>l?i:uMath.min(Math.max(n,r),i);let ug=0;const Xt=n=>{const r=new Date().getTime(),i=Math.floor(window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295*1e9);return ug++,n+"_"+i+ug+String(r)},td=ue("alloy-id-"),I1=ue("data-alloy-id"),Xb=td(),fg=I1(),Jb=(n,r)=>{Object.defineProperty(n.dom,fg,{value:r,writable:!0})},mp=n=>{const r=ys(n)?n.dom[fg]:null;return D.from(r)},Dc=n=>Xt(n),Hk=Ct,Qb=n=>{const r=u=>`The component must be in a context to execute: ${u}`+(n?` +`+ku(n().element)+" is not in context.":""),i=u=>()=>{throw new Error(r(u))},l=u=>()=>{console.warn(r(u))};return{debugInfo:ue("fake"),triggerEvent:l("triggerEvent"),triggerFocus:l("triggerFocus"),triggerEscape:l("triggerEscape"),broadcast:l("broadcast"),broadcastOn:l("broadcastOn"),broadcastEvent:l("broadcastEvent"),build:i("build"),buildOrPatch:i("buildOrPatch"),addToWorld:i("addToWorld"),removeFromWorld:i("removeFromWorld"),addToGui:i("addToGui"),removeFromGui:i("removeFromGui"),getByUid:i("getByUid"),getByDom:i("getByDom"),isConnected:Fe}},F1=Qb(),ey=Xt("alloy-premade"),H1=n=>(Object.defineProperty(n.element.dom,ey,{value:n.uid,writable:!0}),ci(ey,n)),$1=n=>St(n,ey),ty=n=>((r,i)=>{const l=i.toString(),u=l.indexOf(")")+1,f=l.indexOf("("),p=l.substring(f+1,u-1).split(/,\s*/);return r.toFunctionAnnotation=()=>({name:"OVERRIDE",parameters:bu(p.slice(1))}),r})((r,...i)=>n(r.getApis(),r,...i),n),V1=(n,r)=>{const i={};return rs(n,(l,u)=>{rs(l,(f,p)=>{const y=St(i,p).getOr([]);i[p]=y.concat([r(u,f)])})}),i},j1=n=>n.cHandler,k_=(n,r)=>({name:n,handler:r}),$k=(n,r)=>{const i={};return $t(n,l=>{i[l.name()]=l.handlers(r)}),i},_h=(n,r,i)=>{const l=r[i];return l?((u,f,p,y)=>{try{const v=Be(p,(C,O)=>{const A=C[f],R=O[f],F=y.indexOf(A),$=y.indexOf(R);if(F===-1)throw new Error("The ordering for "+u+" does not have an entry for "+A+`. +Order specified: `+JSON.stringify(y,null,2));if($===-1)throw new Error("The ordering for "+u+" does not have an entry for "+R+`. +Order specified: `+JSON.stringify(y,null,2));return F<$?-1:$(f=>({can:((v,C)=>(...O)=>zo(v,(A,R)=>A&&(F=>F.can)(R).apply(void 0,O),!0))(f),abort:((v,C)=>(...O)=>zo(v,(A,R)=>A||(F=>F.abort)(R).apply(void 0,O),!1))(f),run:(...v)=>{$t(f,C=>{C.run.apply(void 0,v)})}}))(pt(u,f=>f.handler))):((u,f)=>un.error(["The event ("+u+`) has more than one behaviour that listens to it. When this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]). -The behaviours that can trigger it are: `+JSON.stringify(pt(f,p=>p.name),null,2)]))(i,n)},Z1=(n,r)=>((i,l)=>{const u=(p=>{const y=[],v=[];return Ht(p,C=>{C.fold(O=>{y.push(O)},O=>{v.push(O)})}),{errors:y,values:v}})(i);return u.errors.length>0?(f=u.errors,un.error(Cs(f))):((p,y)=>p.length===0?un.value(y):un.value(ls(y,op.apply(void 0,p))))(u.values,l);var f})(Is(n,(i,l)=>(i.length===1?un.value(i[0].handler):xh(i,r,l)).map(u=>{const f=(y=>{const v=(C=>ut(C)?{can:Gt,abort:Fe,run:C}:C)(y);return(C,O,...T)=>{const R=[C,O].concat(T);v.abort.apply(void 0,R)?O.stop():v.can.apply(void 0,R)&&v.run.apply(void 0,R)}})(u),p=i.length>1?cn(r[l],y=>To(i,v=>v.name===y)).join(" > "):i[0].name;return ci(l,((y,v)=>({handler:y,purpose:v}))(f,p))})),{}),gp="alloy.base.behaviour",jk=ho([dr("dom","dom",{tag:"required",process:{}},ho([nt("tag"),Ne("styles",{}),Ne("classes",[]),Ne("attributes",{}),vn("value"),vn("innerHtml")])),nt("components"),nt("uid"),Ne("events",{}),Ne("apis",{}),dr("eventOrder","eventOrder",(hp={[di()]:["disabling",gp,"toggling","typeaheadevents"],[Qc()]:[gp,"focusing","keying"],[Dd()]:[gp,"disabling","toggling","representing","tooltipping"],[hu()]:[gp,"representing","streaming","invalidating"],[Dl()]:[gp,"representing","item-events","toolbar-button-events","tooltipping"],[at()]:["focusing",gp,"item-type-events"],[P()]:["focusing",gp,"item-type-events"],[io()]:["item-type-events","tooltipping"],[Fi()]:["receiving","reflecting","tooltipping"]},kn(ue(hp))),Ii()),vn("domModification")]),Uk=n=>n.events,rf=n=>n.dom.value,im=(n,r)=>{if(r===void 0)throw new Error("Value.set was undefined");n.dom.value=r},ny=(n,r,i)=>{i.fold(()=>ai(n,r),l=>{Hn(l,r)||(kl(l,r),aa(l))})},S_=(n,r,i)=>{const l=pt(r,i),u=Yn(n);return Ht(u.slice(l.length),aa),l},W1=(n,r,i,l)=>{const u=vs(n,r),f=l(i,u),p=((y,v,C)=>vs(y,v).map(O=>{if(C.exists(T=>!Hn(T,O))){const T=C.map(ni).getOr("span"),R=$r(T);return kl(O,R),R}return O}))(n,r,u);return ny(n,f.element,p),f},wh=(n,r)=>{const i=tn(n),l=tn(r),u=mn(l,i),f=((p,y)=>{const v={},C={};return sa(p,(O,T)=>!Vo(r,T)||O!==r[T],Hs(v),Hs(C)),{t:v,f:C}})(n).t;return{toRemove:u,toSet:f}},Su=(n,r)=>{const i=r.filter(l=>ni(l)===n.tag&&!(u=>u.innerHtml.isSome()&&u.domChildren.length>0)(n)&&!(u=>Vo(u.dom,ty))(l)).bind(l=>((u,f)=>{try{const p=((y,v)=>{const{class:C,style:O,...T}=(ne=>zo(ne.dom.attributes,(ie,de)=>(ie[de.name]=de.value,ie),{}))(v),{toSet:R,toRemove:F}=wh(y.attributes,T),H=bc(v),{toSet:G,toRemove:J}=wh(y.styles,H),ae=ea(v),X=mn(ae,y.classes),Y=mn(y.classes,ae);return Ht(F,ne=>pn(v,ne)),xl(v,R),Ko(v,Y),Qn(v,X),Ht(J,ne=>Vn(v,ne)),Li(v,G),y.innerHtml.fold(()=>{const ne=y.domChildren;((ie,de)=>{S_(ie,de,(we,ze)=>{const tt=vs(ie,ze);return ny(ie,we,tt),we})})(v,ne)},ne=>{cp(v,ne)}),(()=>{const ne=v,ie=y.value.getOrUndefined();ie!==rf(ne)&&im(ne,ie??"")})(),v})(u,f);return D.some(p)}catch{return D.none()}})(n,l)).getOrThunk(()=>(l=>{const u=$r(l.tag);xl(u,l.attributes),Ko(u,l.classes),Li(u,l.styles),l.innerHtml.each(p=>cp(u,p));const f=l.domChildren;return cr(u,f),l.value.each(p=>{im(u,p)}),u})(n));return Qb(i,n.uid),i},sy=n=>{const r=(i=>{const l=St(i,"behaviours").getOr({});return Sn(tn(l),u=>{const f=l[u];return st(f)?[f.me]:[]})})(n);return((i,l)=>((u,f)=>{const p=pt(f,v=>Zs(v.name(),[nt("config"),Ne("state",Ll)])),y=Ms("component.behaviours",ho(p),u.behaviours).fold(v=>{throw new Error(ii(v)+` +The behaviours that can trigger it are: `+JSON.stringify(pt(f,p=>p.name),null,2)]))(i,n)},U1=(n,r)=>((i,l)=>{const u=(p=>{const y=[],v=[];return $t(p,C=>{C.fold(O=>{y.push(O)},O=>{v.push(O)})}),{errors:y,values:v}})(i);return u.errors.length>0?(f=u.errors,un.error(Cs(f))):((p,y)=>p.length===0?un.value(y):un.value(ls(y,tp.apply(void 0,p))))(u.values,l);var f})(Is(n,(i,l)=>(i.length===1?un.value(i[0].handler):_h(i,r,l)).map(u=>{const f=(y=>{const v=(C=>ut(C)?{can:Gt,abort:Fe,run:C}:C)(y);return(C,O,...A)=>{const R=[C,O].concat(A);v.abort.apply(void 0,R)?O.stop():v.can.apply(void 0,R)&&v.run.apply(void 0,R)}})(u),p=i.length>1?cn(r[l],y=>Ao(i,v=>v.name===y)).join(" > "):i[0].name;return ci(l,((y,v)=>({handler:y,purpose:v}))(f,p))})),{}),pp="alloy.base.behaviour",Vk=ho([dr("dom","dom",{tag:"required",process:{}},ho([nt("tag"),Ne("styles",{}),Ne("classes",[]),Ne("attributes",{}),vn("value"),vn("innerHtml")])),nt("components"),nt("uid"),Ne("events",{}),Ne("apis",{}),dr("eventOrder","eventOrder",(gp={[di()]:["disabling",pp,"toggling","typeaheadevents"],[Jc()]:[pp,"focusing","keying"],[Nd()]:[pp,"disabling","toggling","representing","tooltipping"],[gu()]:[pp,"representing","streaming","invalidating"],[Nl()]:[pp,"representing","item-events","toolbar-button-events","tooltipping"],[at()]:["focusing",pp,"item-type-events"],[P()]:["focusing",pp,"item-type-events"],[io()]:["item-type-events","tooltipping"],[Ii()]:["receiving","reflecting","tooltipping"]},kn(ue(gp))),Pi()),vn("domModification")]),jk=n=>n.events,sf=n=>n.dom.value,am=(n,r)=>{if(r===void 0)throw new Error("Value.set was undefined");n.dom.value=r},oy=(n,r,i)=>{i.fold(()=>ai(n,r),l=>{$n(l,r)||(wl(l,r),aa(l))})},C_=(n,r,i)=>{const l=pt(r,i),u=Yn(n);return $t(u.slice(l.length),aa),l},Z1=(n,r,i,l)=>{const u=vs(n,r),f=l(i,u),p=((y,v,C)=>vs(y,v).map(O=>{if(C.exists(A=>!$n(A,O))){const A=C.map(ni).getOr("span"),R=Hr(A);return wl(O,R),R}return O}))(n,r,u);return oy(n,f.element,p),f},xh=(n,r)=>{const i=tn(n),l=tn(r),u=mn(l,i),f=((p,y)=>{const v={},C={};return sa(p,(O,A)=>!Vo(r,A)||O!==r[A],$s(v),$s(C)),{t:v,f:C}})(n).t;return{toRemove:u,toSet:f}},Cu=(n,r)=>{const i=r.filter(l=>ni(l)===n.tag&&!(u=>u.innerHtml.isSome()&&u.domChildren.length>0)(n)&&!(u=>Vo(u.dom,ey))(l)).bind(l=>((u,f)=>{try{const p=((y,v)=>{const{class:C,style:O,...A}=(ne=>zo(ne.dom.attributes,(ie,de)=>(ie[de.name]=de.value,ie),{}))(v),{toSet:R,toRemove:F}=xh(y.attributes,A),$=hc(v),{toSet:G,toRemove:J}=xh(y.styles,$),ae=ea(v),X=mn(ae,y.classes),Y=mn(y.classes,ae);return $t(F,ne=>pn(v,ne)),_l(v,R),Ko(v,Y),Qn(v,X),$t(J,ne=>Vn(v,ne)),Li(v,G),y.innerHtml.fold(()=>{const ne=y.domChildren;((ie,de)=>{C_(ie,de,(we,ze)=>{const tt=vs(ie,ze);return oy(ie,we,tt),we})})(v,ne)},ne=>{lp(v,ne)}),(()=>{const ne=v,ie=y.value.getOrUndefined();ie!==sf(ne)&&am(ne,ie??"")})(),v})(u,f);return D.some(p)}catch{return D.none()}})(n,l)).getOrThunk(()=>(l=>{const u=Hr(l.tag);_l(u,l.attributes),Ko(u,l.classes),Li(u,l.styles),l.innerHtml.each(p=>lp(u,p));const f=l.domChildren;return cr(u,f),l.value.each(p=>{am(u,p)}),u})(n));return Jb(i,n.uid),i},ny=n=>{const r=(i=>{const l=St(i,"behaviours").getOr({});return Sn(tn(l),u=>{const f=l[u];return st(f)?[f.me]:[]})})(n);return((i,l)=>((u,f)=>{const p=pt(f,v=>Zs(v.name(),[nt("config"),Ne("state",Ll)])),y=Ms("component.behaviours",ho(p),u.behaviours).fold(v=>{throw new Error(ii(v)+` Complete spec: -`+JSON.stringify(u,null,2))},Ct);return{list:f,data:Zn(y,v=>{const C=v.map(O=>({config:O.config,state:O.state.init(O.config)}));return ue(C)})}})(i,l))(n,r)},ta=(n,r)=>{const i=()=>R,l=so($1),u=Ua((F=>Ms("custom.definition",jk,F))(n)),f=sy(n),p=(F=>F.list)(f),y=(F=>F.data)(f),v=((F,H,G)=>{const J={...(ae=F).dom,uid:ae.uid,domChildren:pt(ae.components,we=>we.element)};var ae;const X=(we=>we.domModification.fold(()=>ar({}),ar))(F),Y={"alloy.base.modification":X},ne=H.length>0?((we,ze,tt,Je)=>{const Ze={...ze};Ht(tt,xn=>{Ze[xn.name()]=xn.exhibit(we,Je)});const kt=j1(Ze,(xn,Ls)=>({name:xn,modification:Ls})),Wt=xn=>fn(xn,(Ls,Xs)=>({...Xs.modification,...Ls}),{}),ro=fn(kt.classes,(xn,Ls)=>Ls.modification.concat(xn),[]),yo=Wt(kt.attributes),$o=Wt(kt.styles);return ar({classes:ro,attributes:yo,styles:$o})})(G,Y,H,J):X;return ie=J,de=ne,{...ie,attributes:{...ie.attributes,...de.attributes},styles:{...ie.styles,...de.styles},classes:ie.classes.concat(de.classes)};var ie,de})(u,p,y),C=Su(v,r),O=((F,H,G)=>{const J={"alloy.base.behaviour":Uk(F)};return((ae,X,Y,ne)=>{const ie=((de,we,ze)=>{const tt={...ze,...Vk(we,de)};return j1(tt,C_)})(ae,Y,ne);return Z1(ie,X)})(G,F.eventOrder,H,J).getOrDie()})(u,p,y),T=so(u.components),R={uid:n.uid,getSystem:l.get,config:F=>{const H=y;return(ut(H[F.name()])?H[F.name()]:()=>{throw new Error("Could not find "+F.name()+" in "+JSON.stringify(n,null,2))})()},hasConfigured:F=>ut(y[F.name()]),spec:n,readState:F=>y[F]().map(H=>H.state.readState()).getOr("not enabled"),getApis:()=>u.apis,connect:F=>{l.set(F)},disconnect:()=>{l.set(ey(i))},element:C,syncComponents:()=>{const F=Yn(C),H=Sn(F,G=>l.get().getByDom(G).fold(()=>[],dn));T.set(H)},components:T.get,events:O};return R},wr=n=>{const r=bd(n);return af({element:r})},af=n=>{const r=la("external.component",Ur([nt("element"),vn("uid")]),n),i=so(ey()),l=r.uid.getOrThunk(()=>Rc("external"));Qb(r.element,l);const u={uid:l,getSystem:i.get,config:D.none,hasConfigured:Fe,connect:f=>{i.set(f)},disconnect:()=>{i.set(ey(()=>u))},getApis:()=>({}),element:r.element,spec:n,readState:ue("No state"),syncComponents:Ke,components:ue([]),events:{}};return H1(u)},q1=Rc,ry=(n,r)=>V1(n).getOrThunk(()=>((i,l)=>{const{events:u,...f}=Hk(i),p=((v,C)=>{const O=St(v,"components").getOr([]);return C.fold(()=>pt(O,Ba),T=>pt(O,(R,F)=>ry(R,vs(T,F))))})(f,l),y={...f,events:{...I1,...u},components:p};return un.value(ta(y,l))})((i=>Vo(i,"uid"))(n)?n:{uid:q1(""),...n},r).getOrDie()),Ba=n=>ry(n,D.none()),$i=H1;var hp,lf=(n,r,i,l,u)=>n(i,l)?D.some(i):ut(u)&&u(i)?D.none():r(i,l,u);const lm=(n,r,i)=>{let l=n.dom;const u=ut(i)?i:Fe;for(;l.parentNode;){l=l.parentNode;const f=Vt(l);if(r(f))return D.some(f);if(u(f))break}return D.none()},ay=(n,r,i)=>lf((l,u)=>u(l),lm,n,r,i),E_=(n,r)=>j(n.dom.childNodes,i=>r(Vt(i))).map(Vt),K1=(n,r,i)=>ay(n,r,i).isSome(),cm=(n,r,i)=>lm(n,l=>xi(l,r),i),Ts=(n,r)=>((i,l)=>{const u=i.dom;return u.parentNode?E_(Vt(u.parentNode),f=>!Hn(i,f)&&xi(f,r)):D.none()})(n),iy=(n,r)=>E_(n,i=>xi(i,r)),Ys=(n,r)=>Wc(r,n),Fd=(n,r,i)=>lf((l,u)=>xi(l,u),cm,n,r,i),nd="aria-controls",bp=()=>{const n=Xt(nd);return{id:n,link:r=>{wo(r,nd,n)},unlink:r=>{pn(r,nd)}}},tl=(n,r)=>K1(r,i=>Hn(i,n.element),Fe)||((i,l)=>(u=>ay(u,f=>{if(!ys(f))return!1;const p=yr(f,"id");return p!==void 0&&p.indexOf(nd)>-1}).bind(f=>{const p=yr(f,"id"),y=Vs(f);return Ys(y,`[${nd}="${p}"]`)}))(l).exists(u=>tl(i,u)))(n,r),Ga=(n,r,i,l,u,f,p,y=!1)=>({x:n,y:r,bubble:i,direction:l,placement:u,restriction:f,label:`${p}-${u}`,alwaysFit:y}),dm=Ei([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),kh=dm.southeast,yp=dm.southwest,Ch=dm.northeast,vp=dm.northwest,T_=dm.south,G1=dm.north,Y1=dm.east,A_=dm.west,Ya=(n,r)=>Bn(["left","right","top","bottom"],i=>St(r,i).map(l=>((u,f)=>{switch(f){case 1:return u.x;case 0:return u.x+u.width;case 2:return u.y;case 3:return u.y+u.height}})(n,l))),um="layout",O_=n=>n.x,Mc=(n,r)=>n.x+n.width/2-r.width/2,Hi=(n,r)=>n.x+n.width-r.width,_p=(n,r)=>n.y-r.height,pg=n=>n.y+n.height,z_=(n,r)=>n.y+n.height/2-r.height/2,mr=(n,r,i)=>Ga(O_(n),pg(n),i.southeast(),kh(),"southeast",Ya(n,{left:1,top:3}),um),pr=(n,r,i)=>Ga(Hi(n,r),pg(n),i.southwest(),yp(),"southwest",Ya(n,{right:0,top:3}),um),Br=(n,r,i)=>Ga(O_(n),_p(n,r),i.northeast(),Ch(),"northeast",Ya(n,{left:1,bottom:2}),um),us=(n,r,i)=>Ga(Hi(n,r),_p(n,r),i.northwest(),vp(),"northwest",Ya(n,{right:0,bottom:2}),um),ir=(n,r,i)=>Ga(Mc(n,r),_p(n,r),i.north(),G1(),"north",Ya(n,{bottom:2}),um),Tr=(n,r,i)=>Ga(Mc(n,r),pg(n),i.south(),T_(),"south",Ya(n,{top:3}),um),ly=(n,r,i)=>Ga((l=>l.x+l.width)(n),z_(n,r),i.east(),Y1(),"east",Ya(n,{left:0}),um),cy=(n,r,i)=>Ga(((l,u)=>l.x-u.width)(n,r),z_(n,r),i.west(),A_(),"west",Ya(n,{right:1}),um),X1=()=>[mr,pr,Br,us,Tr,ir,ly,cy],Sh=()=>[pr,mr,us,Br,Tr,ir,ly,cy],J1=()=>[Br,us,mr,pr,ir,Tr],xp=()=>[us,Br,pr,mr,ir,Tr],dy=()=>[mr,pr,Br,us,Tr,ir],uy=()=>[pr,mr,us,Br,Tr,ir];var Q1=Object.freeze({__proto__:null,events:n=>Ho([Xe(Fi(),(r,i)=>{const l=n.channels,u=tn(l),f=i,p=((y,v)=>v.universal?y:cn(y,C=>Ge(v.channels,C)))(u,f);Ht(p,y=>{const v=l[y],C=v.schema,O=la("channel["+y+`] data -Receiver: `+Cu(r.element),C,f.data);v.onReceive(r,O)})})])}),Eh=[Xr("channels",Xu(un.value,Ur([Id("onReceive"),Ne("schema",Ii())])))];const ol=Qr({fields:Eh,name:"receiving",active:Q1});var ev=Object.freeze({__proto__:null,exhibit:(n,r)=>ar({classes:[],styles:r.useFixed()?{}:{position:"relative"}})});const Ti=(n,r=!1)=>n.dom.focus({preventScroll:r}),Th=n=>n.dom.blur(),wp=n=>{const r=Vs(n).dom;return n.dom===r.activeElement},sd=(n=Ha())=>D.from(n.dom.activeElement).map(Vt),Ar=n=>sd(Vs(n)).filter(r=>n.dom.contains(r.dom)),fm=(n,r)=>{const i=Vs(r),l=sd(i).bind(f=>{const p=y=>Hn(f,y);return p(r)?D.some(r):((y,v)=>{const C=O=>{for(let T=0;T{sd(i).filter(p=>Hn(p,f)).fold(()=>{Ti(f)},Ke)}),u},tv=Ei([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),ov=(n,r,i,l,u,f)=>{const p=r.rect,y=p.x-i,v=p.y-l,C=u-(y+p.width),O=f-(v+p.height),T=D.some(y),R=D.some(v),F=D.some(C),H=D.some(O),G=D.none();return r.direction.fold(()=>qs(n,T,R,G,G),()=>qs(n,G,R,F,G),()=>qs(n,T,G,G,H),()=>qs(n,G,G,F,H),()=>qs(n,T,R,G,G),()=>qs(n,T,G,G,H),()=>qs(n,T,R,G,G),()=>qs(n,G,R,F,G))},Ah=(n,r)=>n.fold(()=>{const i=r.rect;return qs("absolute",D.some(i.x),D.some(i.y),D.none(),D.none())},(i,l,u,f)=>ov("absolute",r,i,l,u,f),(i,l,u,f)=>ov("fixed",r,i,l,u,f)),Eu=(n,r)=>{const i=ot(Yc,r),l=n.fold(i,i,()=>{const p=_s();return Yc(r).translate(-p.left,-p.top)}),u=Xn(r),f=Na(r);return rn(l.left,l.top,u,f)},Zk=(n,r)=>r.fold(()=>n.fold(jr,jr,rn),i=>n.fold(ue(i),ue(i),()=>{const l=Oh(n,i.x,i.y);return rn(l.left,l.top,i.width,i.height)})),Oh=(n,r,i)=>{const l=pe(r,i);return n.fold(ue(l),ue(l),()=>{const u=_s();return l.translate(-u.left,-u.top)})};tv.none;const mm=tv.relative,N_=tv.fixed,zh="data-alloy-placement",Nh=n=>Fs(n,zh),fy=Ei([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),gg=(n,r,i,l)=>{const u=n.bubble,f=u.offset,p=((ne,ie,de)=>{const we=(kt,Wt)=>ie[kt].map(ro=>{const yo=kt==="top"||kt==="bottom",$o=yo?de.top:de.left,xn=(kt==="left"||kt==="top"?Math.max:Math.min)(ro,Wt)+$o;return yo?Dc(xn,ne.y,ne.bottom):Dc(xn,ne.x,ne.right)}).getOr(Wt),ze=we("left",ne.x),tt=we("top",ne.y),Je=we("right",ne.right),Ze=we("bottom",ne.bottom);return rn(ze,tt,Je-ze,Ze-tt)})(l,n.restriction,f),y=n.x+f.left,v=n.y+f.top,C=rn(y,v,r,i),{originInBounds:O,sizeInBounds:T,visibleW:R,visibleH:F}=((ne,ie)=>{const{x:de,y:we,right:ze,bottom:tt}=ie,{x:Je,y:Ze,right:kt,bottom:Wt,width:ro,height:yo}=ne;return{originInBounds:Je>=de&&Je<=ze&&Ze>=we&&Ze<=tt,sizeInBounds:kt<=ze&&kt>=de&&Wt<=tt&&Wt>=we,visibleW:Math.min(ro,Je>=de?ze-Je:kt-de),visibleH:Math.min(yo,Ze>=we?tt-Ze:Wt-we)}})(C,p),H=O&&T,G=H?C:((ne,ie)=>{const{x:de,y:we,right:ze,bottom:tt}=ie,{x:Je,y:Ze,width:kt,height:Wt}=ne,ro=Math.max(de,ze-kt),yo=Math.max(we,tt-Wt),$o=Dc(Je,de,ro),xn=Dc(Ze,we,yo),Ls=Math.min($o+kt,ze)-$o,Xs=Math.min(xn+Wt,tt)-xn;return rn($o,xn,Ls,Xs)})(C,p),J=G.width>0&&G.height>0,{maxWidth:ae,maxHeight:X}=((ne,ie,de)=>{const we=ue(ie.bottom-de.y),ze=ue(de.bottom-ie.y),tt=((Wt,ro,yo,$o)=>Wt.fold(ro,ro,$o,$o,ro,$o,yo,yo))(ne,ze,ze,we),Je=ue(ie.right-de.x),Ze=ue(de.right-ie.x);return{maxWidth:((Wt,ro,yo,$o)=>Wt.fold(ro,$o,ro,$o,yo,yo,ro,$o))(ne,Ze,Ze,Je),maxHeight:tt}})(n.direction,G,l),Y={rect:G,maxHeight:X,maxWidth:ae,direction:n.direction,placement:n.placement,classes:{on:u.classesOn,off:u.classesOff},layout:n.label,testY:v};return H||n.alwaysFit?fy.fit(Y):fy.nofit(Y,R,F,J)},my=Gt,Ai=(n,r,i)=>((l,u,f,p)=>Sd(l,u,f,p,!1))(n,r,my,i),nv=(n,r,i)=>((l,u,f,p)=>Sd(l,u,f,p,!0))(n,r,my,i),Tu=Ci,Dh=["top","bottom","right","left"],$d="data-alloy-transition-timer",Rh=(n,r,i,l,u,f)=>{const p=((y,v,C)=>C.exists(O=>{const T=y.mode;return T==="all"||O[T]!==v[T]}))(l,u,f);if(p||((y,v)=>((C,O)=>bi(O,T=>_n(C,T)))(y,v.classes))(n,l)){Mo(n,"position",i.position);const y=Eu(r,n),v=Ah(r,{...u,rect:y}),C=Bn(Dh,O=>v[O]);((O,T)=>{const R=F=>parseFloat(F).toFixed(3);return yn(T,(F,H)=>!((G,J,ae=ve)=>vt(G,J,ae).getOr(G.isNone()&&J.isNone()))(O[H].map(R),F.map(R))).isSome()})(i,C)&&(ri(n,C),p&&((O,T)=>{Ko(O,T.classes),Fs(O,$d).each(R=>{clearTimeout(parseInt(R,10)),pn(O,$d)}),((R,F)=>{const H=Sl(),G=Sl();let J;const ae=ie=>{var de;const we=(de=ie.raw.pseudoElement)!==null&&de!==void 0?de:"";return Hn(ie.target,R)&&vl(we)&&Ge(Dh,ie.raw.propertyName)},X=ie=>{if(mo(ie)||ae(ie)){H.clear(),G.clear();const de=ie==null?void 0:ie.raw.type;(mo(de)||de===sp())&&(clearTimeout(J),pn(R,$d),Qn(R,F.classes))}},Y=Ai(R,rg(),ie=>{ae(ie)&&(Y.unbind(),H.set(Ai(R,sp(),X)),G.set(Ai(R,fh(),X)))}),ne=(ie=>{const de=Je=>{const Ze=Ns(ie,Je).split(/\s*,\s*/);return cn(Ze,vi)},we=Je=>{if(te(Je)&&/^[\d.]+/.test(Je)){const Ze=parseFloat(Je);return cl(Je,"ms")?Ze:1e3*Ze}return 0},ze=de("transition-delay"),tt=de("transition-duration");return zo(tt,(Je,Ze,kt)=>{const Wt=we(ze[kt])+we(Ze);return Math.max(Je,Wt)},0)})(R);requestAnimationFrame(()=>{J=setTimeout(X,ne+17),wo(R,$d,J)})})(O,T)})(n,l),wl(n))}else Qn(n,l.classes)},Mh=(n,r)=>{((i,l)=>{const u=xd.max(i,l,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]);Mo(i,"max-height",u+"px")})(n,Math.floor(r))},pm=ue((n,r)=>{Mh(n,r),Li(n,{"overflow-x":"hidden","overflow-y":"auto"})}),kp=ue((n,r)=>{Mh(n,r)}),Bc=(n,r,i)=>n[r]===void 0?i:n[r],Bh=(n,r,i,l)=>{const u=((f,p,y,v)=>{Vn(p,"max-height"),Vn(p,"max-width");const C={width:Xn(O=p),height:Na(O)};var O;return((T,R,F,H,G,J)=>{const ae=H.width,X=H.height,Y=(ne,ie,de,we,ze)=>{const tt=ne(F,H,G,T,J),Je=gg(tt,ae,X,J);return Je.fold(ue(Je),(Ze,kt,Wt,ro)=>(ze===ro?Wt>we||kt>de:!ze&&ro)?Je:fy.nofit(ie,de,we,ze))};return zo(R,(ne,ie)=>{const de=ot(Y,ie);return ne.fold(ue(ne),de)},fy.nofit({rect:F,maxHeight:H.height,maxWidth:H.width,direction:kh(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:F.y},-1,-1,!1)).fold(Ct,Ct)})(p,v.preference,f,C,y,v.bounds)})(n,r,i,l);return((f,p,y)=>{const v=Ah(y.origin,p);y.transition.each(C=>{Rh(f,y.origin,v,C,p,y.lastPlacement)}),oc(f,v)})(r,u,l),((f,p)=>{((y,v)=>{wo(y,zh,v)})(f,p.placement)})(r,u),((f,p)=>{const y=p.classes;Qn(f,y.off),Ko(f,y.on)})(r,u),((f,p,y)=>{(0,y.maxHeightFunction)(f,p.maxHeight)})(r,u,l),((f,p,y)=>{(0,y.maxWidthFunction)(f,p.maxWidth)})(r,u,l),{layout:u.layout,placement:u.placement}},Wk=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],sc=(n,r,i,l=1)=>{const u=n*l,f=r*l,p=v=>St(i,v).getOr([]),y=(v,C,O)=>{const T=mn(Wk,O);return{offset:pe(v,C),classesOn:Sn(O,p),classesOff:Sn(T,p)}};return{southeast:()=>y(-n,r,["top","alignLeft"]),southwest:()=>y(n,r,["top","alignRight"]),south:()=>y(-n/2,r,["top","alignCentre"]),northeast:()=>y(-n,-r,["bottom","alignLeft"]),northwest:()=>y(n,-r,["bottom","alignRight"]),north:()=>y(-n/2,-r,["bottom","alignCentre"]),east:()=>y(n,-r/2,["valignCentre","left"]),west:()=>y(-n,-r/2,["valignCentre","right"]),insetNortheast:()=>y(u,f,["top","alignLeft","inset"]),insetNorthwest:()=>y(-u,f,["top","alignRight","inset"]),insetNorth:()=>y(-u/2,f,["top","alignCentre","inset"]),insetSoutheast:()=>y(u,-f,["bottom","alignLeft","inset"]),insetSouthwest:()=>y(-u,-f,["bottom","alignRight","inset"]),insetSouth:()=>y(-u/2,-f,["bottom","alignCentre","inset"]),insetEast:()=>y(-u,-f/2,["valignCentre","right","inset"]),insetWest:()=>y(u,-f/2,["valignCentre","left","inset"])}},Au=()=>sc(0,0,{}),Lc=Ct,sv=(n,r)=>i=>ua(i)==="rtl"?r:n,ua=n=>Ns(n,"direction")==="rtl"?"rtl":"ltr";var Pc;(function(n){n.TopToBottom="toptobottom",n.BottomToTop="bottomtotop"})(Pc||(Pc={}));const nl="data-alloy-vertical-dir",qk=n=>K1(n,r=>ys(r)&&yr(r,"data-alloy-vertical-dir")===Pc.BottomToTop),cf=()=>Zs("layouts",[nt("onLtr"),nt("onRtl"),vn("onBottomLtr"),vn("onBottomRtl")]),Ou=(n,r,i,l,u,f,p)=>{const y=p.map(qk).getOr(!1),v=r.layouts.map(R=>R.onLtr(n)),C=r.layouts.map(R=>R.onRtl(n)),O=y?r.layouts.bind(R=>R.onBottomLtr.map(F=>F(n))).or(v).getOr(u):v.getOr(i),T=y?r.layouts.bind(R=>R.onBottomRtl.map(F=>F(n))).or(C).getOr(f):C.getOr(l);return sv(O,T)(n)};var hg=[nt("hotspot"),vn("bubble"),Ne("overrides",{}),cf(),Es("placement",(n,r,i)=>{const l=r.hotspot,u=Eu(i,l.element),f=Ou(n.element,r,dy(),uy(),J1(),xp(),D.some(r.hotspot.element));return D.some(Lc({anchorBox:u,bubble:r.bubble.getOr(Au()),overrides:r.overrides,layouts:f}))})],gm=[nt("x"),nt("y"),Ne("height",0),Ne("width",0),Ne("bubble",Au()),Ne("overrides",{}),cf(),Es("placement",(n,r,i)=>{const l=Oh(i,r.x,r.y),u=rn(l.left,l.top,r.width,r.height),f=Ou(n.element,r,X1(),Sh(),X1(),Sh(),D.none());return D.some(Lc({anchorBox:u,bubble:r.bubble,overrides:r.overrides,layouts:f}))})];const Pl=Ei([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),py=n=>n.fold(Ct,(r,i,l)=>r.translate(-i,-l)),gy=n=>n.fold(Ct,Ct),Lh=n=>zo(n,(r,i)=>r.translate(i.left,i.top),pe(0,0)),hy=n=>{const r=pt(n,gy);return Lh(r)},D_=Pl.screen,Ph=Pl.absolute,zu=(n,r,i)=>{const l=ha(n.element),u=_s(l),f=((p,y,v)=>{const C=vd(v.root).dom;return D.from(C.frameElement).map(Vt).filter(O=>{const T=ha(O),R=ha(p.element);return Hn(T,R)}).map(Ye)})(n,0,i).getOr(u);return Ph(f,u.left,u.top)},Ih=(n,r,i,l)=>{const u=D_(pe(n,r));return D.some(((f,p,y)=>({point:f,width:p,height:y}))(u,i,l))},Cp=(n,r,i,l,u)=>n.map(f=>{const p=[r,f.point],y=(v=()=>hy(p),C=()=>hy(p),O=()=>(Y=>{const ne=pt(Y,py);return Lh(ne)})(p),l.fold(v,C,O));var v,C,O;const T=(G=y.left,J=y.top,ae=f.width,X=f.height,{x:G,y:J,width:ae,height:X}),R=i.showAbove?J1():dy(),F=i.showAbove?xp():uy(),H=Ou(u,i,R,F,R,F,D.none());var G,J,ae,X;return Lc({anchorBox:T,bubble:i.bubble.getOr(Au()),overrides:i.overrides,layouts:H})});var Sp=[nt("node"),nt("root"),vn("bubble"),cf(),Ne("overrides",{}),Ne("showAbove",!1),Es("placement",(n,r,i)=>{const l=zu(n,0,r);return r.node.filter(Vr).bind(u=>{const f=u.dom.getBoundingClientRect(),p=Ih(f.left,f.top,f.width,f.height),y=r.node.getOr(n.element);return Cp(p,l,r,i,y)})})];const df=(n,r,i,l)=>({start:n,soffset:r,finish:i,foffset:l}),uf=Ei([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Fh=(uf.before,uf.on,uf.after,n=>n.fold(Ct,Ct,Ct)),ff=Ei([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),mf={domRange:ff.domRange,relative:ff.relative,exact:ff.exact,exactFromRange:n=>ff.exact(n.start,n.soffset,n.finish,n.foffset),getWin:n=>{const r=(i=>i.match({domRange:l=>Vt(l.startContainer),relative:(l,u)=>Fh(l),exact:(l,u,f,p)=>l}))(n);return vd(r)},range:df},pf=(n,r,i)=>{const l=n.document.createRange();var u;return u=l,r.fold(f=>{u.setStartBefore(f.dom)},(f,p)=>{u.setStart(f.dom,p)},f=>{u.setStartAfter(f.dom)}),((f,p)=>{p.fold(y=>{f.setEndBefore(y.dom)},(y,v)=>{f.setEnd(y.dom,v)},y=>{f.setEndAfter(y.dom)})})(l,i),l},Ep=(n,r,i,l,u)=>{const f=n.document.createRange();return f.setStart(r.dom,i),f.setEnd(l.dom,u),f},by=n=>({left:n.left,top:n.top,right:n.right,bottom:n.bottom,width:n.width,height:n.height}),bg=Ei([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),yy=(n,r,i)=>r(Vt(i.startContainer),i.startOffset,Vt(i.endContainer),i.endOffset),rv=(n,r)=>((i,l)=>{const u=((f,p)=>p.match({domRange:y=>({ltr:ue(y),rtl:D.none}),relative:(y,v)=>({ltr:sn(()=>pf(f,y,v)),rtl:sn(()=>D.some(pf(f,v,y)))}),exact:(y,v,C,O)=>({ltr:sn(()=>Ep(f,y,v,C,O)),rtl:sn(()=>D.some(Ep(f,C,O,y,v)))})}))(i,l);return((f,p)=>{const y=p.ltr();return y.collapsed?p.rtl().filter(v=>v.collapsed===!1).map(v=>bg.rtl(Vt(v.endContainer),v.endOffset,Vt(v.startContainer),v.startOffset)).getOrThunk(()=>yy(0,bg.ltr,y)):yy(0,bg.ltr,y)})(0,u)})(n,r).match({ltr:(i,l,u,f)=>{const p=n.document.createRange();return p.setStart(i.dom,l),p.setEnd(u.dom,f),p},rtl:(i,l,u,f)=>{const p=n.document.createRange();return p.setStart(u.dom,f),p.setEnd(i.dom,l),p}});bg.ltr,bg.rtl;const yg=(n,r,i)=>cn(((l,u)=>{const f=ut(u)?u:Fe;let p=l.dom;const y=[];for(;p.parentNode!==null&&p.parentNode!==void 0;){const v=p.parentNode,C=Vt(v);if(y.push(C),f(C)===!0)break;p=v}return y})(n,i),r),fa=(n,r)=>((i,l)=>{const u=l===void 0?document:l.dom;return lu(u)?[]:pt(u.querySelectorAll(i),Vt)})(r,n),av=n=>{if(n.rangeCount>0){const r=n.getRangeAt(0),i=n.getRangeAt(n.rangeCount-1);return D.some(df(Vt(r.startContainer),r.startOffset,Vt(i.endContainer),i.endOffset))}return D.none()},R_=n=>{if(n.anchorNode===null||n.focusNode===null)return av(n);{const r=Vt(n.anchorNode),i=Vt(n.focusNode);return((l,u,f,p)=>{const y=((C,O,T,R)=>{const F=ha(C).dom.createRange();return F.setStart(C.dom,O),F.setEnd(T.dom,R),F})(l,u,f,p),v=Hn(l,f)&&u===p;return y.collapsed&&!v})(r,n.anchorOffset,i,n.focusOffset)?D.some(df(r,n.anchorOffset,i,n.focusOffset)):av(n)}},iv=(n,r)=>(i=>{const l=i.getClientRects(),u=l.length>0?l[0]:i.getBoundingClientRect();return u.width>0||u.height>0?D.some(u).map(by):D.none()})(rv(n,r)),lv=((n,r)=>{const i=l=>n(l)?D.from(l.dom.nodeValue):D.none();return{get:l=>{if(!n(l))throw new Error("Can only get text value of a text node");return i(l).getOr("")},getOption:i,set:(l,u)=>{if(!n(l))throw new Error("Can only set raw text value of a text node");l.dom.nodeValue=u}}})(ga),gf=(n,r)=>({element:n,offset:r}),vy=(n,r)=>ga(n)?gf(n,r):((i,l)=>{const u=Yn(i);if(u.length===0)return gf(i,l);if(llv.get(y))(f).length:Yn(f).length;return gf(f,p)}})(n,r),$h=n=>n.foffset!==void 0,cv=(n,r)=>r.getSelection.getOrThunk(()=>()=>(i=>(l=>D.from(l.getSelection()))(i).filter(l=>l.rangeCount>0).bind(R_))(n))().map(i=>{if($h(i)){const l=vy(i.start,i.soffset),u=vy(i.finish,i.foffset);return mf.range(l.element,l.offset,u.element,u.offset)}return i});var Kk=[vn("getSelection"),nt("root"),vn("bubble"),cf(),Ne("overrides",{}),Ne("showAbove",!1),Es("placement",(n,r,i)=>{const l=vd(r.root).dom,u=zu(n,0,r),f=cv(l,r).bind(y=>{if($h(y))return((C,O)=>(T=>{const R=T.getBoundingClientRect();return R.width>0||R.height>0?D.some(R).map(by):D.none()})(rv(C,O)))(l,mf.exactFromRange(y)).orThunk(()=>{const C=bd("\uFEFF");kl(y.start,C);const O=iv(l,mf.exact(C,0,C,1));return aa(C),O}).bind(C=>Ih(C.left,C.top,C.width,C.height));{const v=Zn(y,O=>O.dom.getBoundingClientRect()),C={left:Math.min(v.firstCell.left,v.lastCell.left),right:Math.max(v.firstCell.right,v.lastCell.right),top:Math.min(v.firstCell.top,v.lastCell.top),bottom:Math.max(v.firstCell.bottom,v.lastCell.bottom)};return Ih(C.left,C.top,C.right-C.left,C.bottom-C.top)}}),p=cv(l,r).bind(y=>$h(y)?ys(y.start)?D.some(y.start):ba(y.start):D.some(y.firstCell)).getOr(n.element);return Cp(f,u,r,i,p)})];const hf="link-layout",Hh=n=>n.x+n.width,M_=(n,r)=>n.x-r.width,B_=(n,r)=>n.y-r.height+n.height,rd=n=>n.y,dv=(n,r,i)=>Ga(Hh(n),rd(n),i.southeast(),kh(),"southeast",Ya(n,{left:0,top:2}),hf),_y=(n,r,i)=>Ga(M_(n,r),rd(n),i.southwest(),yp(),"southwest",Ya(n,{right:1,top:2}),hf),L_=(n,r,i)=>Ga(Hh(n),B_(n,r),i.northeast(),Ch(),"northeast",Ya(n,{left:0,bottom:3}),hf),Tp=(n,r,i)=>Ga(M_(n,r),B_(n,r),i.northwest(),vp(),"northwest",Ya(n,{right:1,bottom:3}),hf),vg=()=>[dv,_y,L_,Tp],Vh=()=>[_y,dv,Tp,L_];var P_=[nt("item"),cf(),Ne("overrides",{}),Es("placement",(n,r,i)=>{const l=Eu(i,r.item.element),u=Ou(n.element,r,vg(),Vh(),vg(),Vh(),D.none());return D.some(Lc({anchorBox:l,bubble:Au(),overrides:r.overrides,layouts:u}))})],ad=_r("type",{selection:Kk,node:Sp,hotspot:hg,submenu:P_,makeshift:gm});const hm=[li("classes",Zr),zl("mode","all",["all","layout","placement"])],jh=[Ne("useFixed",Fe),vn("getBounds")],Uh=[Xr("anchor",ad),Zs("transition",hm)],xy=(n,r,i,l,u,f)=>{const p=la("placement.info",ho(Uh),u),y=p.anchor,v=l.element,C=i.get(l.uid);fm(()=>{Mo(v,"position","fixed");const O=er(v,"visibility");Mo(v,"visibility","hidden");const T=r.useFixed()?(()=>{const R=document.documentElement;return N_(0,0,R.clientWidth,R.clientHeight)})():(R=>{const F=Ye(R.element),H=R.element.dom.getBoundingClientRect();return mm(F.left,F.top,H.width,H.height)})(n);y.placement(n,y,T).each(R=>{const F=f.orThunk(()=>r.getBounds.map(uo)),H=((G,J,ae,X,Y,ne)=>((ie,de,we,ze,tt,Je,Ze,kt)=>{const Wt=Bc(Ze,"maxHeightFunction",pm()),ro=Bc(Ze,"maxWidthFunction",Ke),yo=ie.anchorBox,$o=ie.origin,xn={bounds:Zk($o,Je),origin:$o,preference:ze,maxHeightFunction:Wt,maxWidthFunction:ro,lastPlacement:tt,transition:kt};return Bh(yo,de,we,xn)})(((ie,de)=>((we,ze)=>({anchorBox:we,origin:ze}))(ie,de))(J.anchorBox,G),X.element,J.bubble,J.layouts,Y,ae,J.overrides,ne))(T,R,F,l,C,p.transition);i.set(l.uid,H)}),O.fold(()=>{Vn(v,"visibility")},R=>{Mo(v,"visibility",R)}),er(v,"left").isNone()&&er(v,"top").isNone()&&er(v,"right").isNone()&&er(v,"bottom").isNone()&&Kr(er(v,"position"),"fixed")&&Vn(v,"position")},v)};var Zh=Object.freeze({__proto__:null,position:(n,r,i,l,u)=>{const f=D.none();xy(n,r,i,l,u,f)},positionWithinBounds:xy,getMode:(n,r,i)=>r.useFixed()?"fixed":"absolute",reset:(n,r,i,l)=>{const u=l.element;Ht(["position","left","right","top","bottom"],f=>Vn(u,f)),(f=>{pn(f,zh)})(u),i.clear(l.uid)}});const Xa=Qr({fields:jh,name:"positioning",active:ev,apis:Zh,state:Object.freeze({__proto__:null,init:()=>{let n={};return Jr({readState:()=>n,clear:r=>{st(r)?delete n[r]:n={}},set:(r,i)=>{n[r]=i},get:r=>St(n,r)})}})}),wy=n=>n.getSystem().isConnected(),bm=n=>{Qo(n,Dl());const r=n.components();Ht(r,bm)},ym=n=>{const r=n.components();Ht(r,ym),Qo(n,ka())},Wh=(n,r)=>{n.getSystem().addToWorld(r),Vr(n.element)&&ym(r)},ky=n=>{bm(n),n.getSystem().removeFromWorld(n)},Ap=(n,r)=>{ai(n.element,r.element)},bf=(n,r)=>{uv(n,r,ai)},uv=(n,r,i)=>{n.getSystem().addToWorld(r),i(n.element,r.element),Vr(n.element)&&ym(r),n.syncComponents()},Cy=n=>{bm(n),aa(n.element),n.getSystem().removeFromWorld(n)},Vi=n=>{const r=Hr(n.element).bind(i=>n.getSystem().getByDom(i).toOptional());Cy(n),r.each(i=>{i.syncComponents()})},yf=n=>{const r=n.components();Ht(r,Cy),Rs(n.element),n.syncComponents()},fv=(n,r)=>{_g(n,r,ai)},Ue=(n,r)=>{_g(n,r,Wu)},_g=(n,r,i)=>{i(n,r.element);const l=Yn(r.element);Ht(l,u=>{r.getByDom(u).each(ym)})},Gk=n=>{const r=Yn(n.element);Ht(r,i=>{n.getByDom(i).each(bm)}),aa(n.element)},I_=(n,r,i,l)=>{i.get().each(p=>{yf(n)});const u=r.getAttachPoint(n);bf(u,n);const f=n.getSystem().build(l);return bf(n,f),i.set(f),f},Sy=(n,r,i,l)=>{const u=I_(n,r,i,l);return r.onOpen(n,u),u},id=(n,r,i)=>{i.get().each(l=>{yf(n),Vi(n),r.onClose(n,l),i.clear()})},Ey=(n,r,i)=>i.isOpen(),qh=(n,r,i)=>{const l=r.getAttachPoint(n);Mo(n.element,"position",Xa.getMode(l)),((u,f,p,y)=>{er(u.element,f).fold(()=>{pn(u.element,p)},v=>{wo(u.element,p,v)}),Mo(u.element,f,"hidden")})(n,"visibility",r.cloakVisibilityAttr)},mv=(n,r,i)=>{(l=>To(["top","left","right","bottom"],u=>er(l,u).isSome()))(n.element)||Vn(n.element,"position"),((l,u,f)=>{Fs(l.element,f).fold(()=>Vn(l.element,u),p=>Mo(l.element,u,p))})(n,"visibility",r.cloakVisibilityAttr)};var pv=Object.freeze({__proto__:null,cloak:qh,decloak:mv,open:Sy,openWhileCloaked:(n,r,i,l,u)=>{qh(n,r),Sy(n,r,i,l),u(),mv(n,r)},close:id,isOpen:Ey,isPartOf:(n,r,i,l)=>Ey(0,0,i)&&i.get().exists(u=>r.isPartOf(n,u,l)),getState:(n,r,i)=>i.get(),setContent:(n,r,i,l)=>i.get().map(()=>I_(n,r,i,l))}),Yk=Object.freeze({__proto__:null,events:(n,r)=>Ho([Xe(rp(),(i,l)=>{id(i,n,r)})])}),m=[Dn("onOpen"),Dn("onClose"),nt("isPartOf"),nt("getAttachPoint"),Ne("cloakVisibilityAttr","data-precloak-visibility")],b=Object.freeze({__proto__:null,init:()=>{const n=Nn(),r=ue("not-implemented");return Jr({readState:r,isOpen:n.isSet,clear:n.clear,set:n.set,get:n.get})}});const x=Qr({fields:m,name:"sandboxing",active:Yk,apis:pv,state:b}),A=ue("dismiss.popups"),M=ue("reposition.popups"),L=ue("mouse.released"),U=Ur([Ne("isExtraPart",Fe),Zs("fireEventInstead",[Ne("event",Qu())])]),K=n=>{const r=la("Dismissal",U,n);return{[A()]:{schema:Ur([nt("target")]),onReceive:(i,l)=>{x.isOpen(i)&&(x.isPartOf(i,l.target)||r.isExtraPart(i,l.target)||r.fireEventInstead.fold(()=>x.close(i),u=>Qo(i,u.event)))}}}},re=Ur([Zs("fireEventInstead",[Ne("event",Md())]),Za("doReposition")]),he=n=>{const r=la("Reposition",re,n);return{[M()]:{onReceive:i=>{x.isOpen(i)&&r.fireEventInstead.fold(()=>r.doReposition(i),l=>Qo(i,l.event))}}}},Se=(n,r,i)=>{r.store.manager.onLoad(n,r,i)},me=(n,r,i)=>{r.store.manager.onUnload(n,r,i)};var be=Object.freeze({__proto__:null,onLoad:Se,onUnload:me,setValue:(n,r,i,l)=>{r.store.manager.setValue(n,r,i,l)},getValue:(n,r,i)=>r.store.manager.getValue(n,r,i),getState:(n,r,i)=>i}),_e=Object.freeze({__proto__:null,events:(n,r)=>{const i=n.resetOnDom?[Ss((l,u)=>{Se(l,n,r)}),Oc((l,u)=>{me(l,n,r)})]:[vu(n,r,Se)];return Ho(i)}});const De=()=>{const n=so(null);return Jr({set:n.set,get:n.get,isNotSet:()=>n.get()===null,clear:()=>{n.set(null)},readState:()=>({mode:"memory",value:n.get()})})},Re=()=>{const n=so({}),r=so({});return Jr({readState:()=>({mode:"dataset",dataByValue:n.get(),dataByText:r.get()}),lookup:i=>St(n.get(),i).orThunk(()=>St(r.get(),i)),update:i=>{const l=n.get(),u=r.get(),f={},p={};Ht(i,y=>{f[y.value]=y,St(y,"meta").each(v=>{St(v,"text").each(C=>{p[C]=y})})}),n.set({...l,...f}),r.set({...u,...p})},clear:()=>{n.set({}),r.set({})}})};var lt=Object.freeze({__proto__:null,memory:De,dataset:Re,manual:()=>Jr({readState:Ke}),init:n=>n.store.manager.state(n)});const ct=(n,r,i,l)=>{const u=r.store;i.update([l]),u.setValue(n,l),r.onSetValue(n,l)};var it=[vn("initialValue"),nt("getFallbackEntry"),nt("getDataKey"),nt("setValue"),Es("manager",{setValue:ct,getValue:(n,r,i)=>{const l=r.store,u=l.getDataKey(n);return i.lookup(u).getOrThunk(()=>l.getFallbackEntry(u))},onLoad:(n,r,i)=>{r.store.initialValue.each(l=>{ct(n,r,i,l)})},onUnload:(n,r,i)=>{i.clear()},state:Re})],gt=[nt("getValue"),Ne("setValue",Ke),vn("initialValue"),Es("manager",{setValue:(n,r,i,l)=>{r.store.setValue(n,l),r.onSetValue(n,l)},getValue:(n,r,i)=>r.store.getValue(n),onLoad:(n,r,i)=>{r.store.initialValue.each(l=>{r.store.setValue(n,l)})},onUnload:Ke,state:Ll.init})],Nt=[vn("initialValue"),Es("manager",{setValue:(n,r,i,l)=>{i.set(l),r.onSetValue(n,l)},getValue:(n,r,i)=>i.get(),onLoad:(n,r,i)=>{r.store.initialValue.each(l=>{i.isNotSet()&&i.set(l)})},onUnload:(n,r,i)=>{i.clear()},state:De})],Pt=[Wa("store",{mode:"memory"},_r("mode",{memory:Nt,manual:gt,dataset:it})),Dn("onSetValue"),Ne("resetOnDom",!1)];const Be=Qr({fields:Pt,name:"representing",active:_e,apis:be,extra:{setValueFrom:(n,r)=>{const i=Be.getValue(r);Be.setValue(n,i)}},state:lt}),Jt=(n,r)=>wa(n,{},pt(r,i=>{return l=i.name(),u="Cannot configure "+i.name()+" for "+n,dr(l,l,{tag:"option",process:{}},Yl(f=>ja("The field: "+l+" is forbidden. "+u)));var l,u}).concat([ca("dump",Ct)])),Ao=n=>n.dump,Xo=(n,r)=>({...xt(r),...n.dump}),Io=Jt,Oo=Xo,Yo="placeholder",zn=Ei([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),Lr=n=>Vo(n,"uiType"),mi=(n,r,i,l)=>((u,f,p,y)=>Lr(p)&&p.uiType===Yo?((v,C,O,T)=>v.exists(R=>R!==O.owner)?zn.single(!0,ue(O)):St(T,O.name).fold(()=>{throw new Error("Unknown placeholder component: "+O.name+` -Known: [`+tn(T)+`] +`+JSON.stringify(u,null,2))},Ct);return{list:f,data:Zn(y,v=>{const C=v.map(O=>({config:O.config,state:O.state.init(O.config)}));return ue(C)})}})(i,l))(n,r)},ta=(n,r)=>{const i=()=>R,l=so(F1),u=Ua((F=>Ms("custom.definition",Vk,F))(n)),f=ny(n),p=(F=>F.list)(f),y=(F=>F.data)(f),v=((F,$,G)=>{const J={...(ae=F).dom,uid:ae.uid,domChildren:pt(ae.components,we=>we.element)};var ae;const X=(we=>we.domModification.fold(()=>ar({}),ar))(F),Y={"alloy.base.modification":X},ne=$.length>0?((we,ze,tt,Je)=>{const Ze={...ze};$t(tt,xn=>{Ze[xn.name()]=xn.exhibit(we,Je)});const kt=V1(Ze,(xn,Bs)=>({name:xn,modification:Bs})),Wt=xn=>fn(xn,(Bs,Xs)=>({...Xs.modification,...Bs}),{}),ro=fn(kt.classes,(xn,Bs)=>Bs.modification.concat(xn),[]),yo=Wt(kt.attributes),Ho=Wt(kt.styles);return ar({classes:ro,attributes:yo,styles:Ho})})(G,Y,$,J):X;return ie=J,de=ne,{...ie,attributes:{...ie.attributes,...de.attributes},styles:{...ie.styles,...de.styles},classes:ie.classes.concat(de.classes)};var ie,de})(u,p,y),C=Cu(v,r),O=((F,$,G)=>{const J={"alloy.base.behaviour":jk(F)};return((ae,X,Y,ne)=>{const ie=((de,we,ze)=>{const tt={...ze,...$k(we,de)};return V1(tt,k_)})(ae,Y,ne);return U1(ie,X)})(G,F.eventOrder,$,J).getOrDie()})(u,p,y),A=so(u.components),R={uid:n.uid,getSystem:l.get,config:F=>{const $=y;return(ut($[F.name()])?$[F.name()]:()=>{throw new Error("Could not find "+F.name()+" in "+JSON.stringify(n,null,2))})()},hasConfigured:F=>ut(y[F.name()]),spec:n,readState:F=>y[F]().map($=>$.state.readState()).getOr("not enabled"),getApis:()=>u.apis,connect:F=>{l.set(F)},disconnect:()=>{l.set(Qb(i))},element:C,syncComponents:()=>{const F=Yn(C),$=Sn(F,G=>l.get().getByDom(G).fold(()=>[],dn));A.set($)},components:A.get,events:O};return R},wr=n=>{const r=hd(n);return rf({element:r})},rf=n=>{const r=la("external.component",Ur([nt("element"),vn("uid")]),n),i=so(Qb()),l=r.uid.getOrThunk(()=>Dc("external"));Jb(r.element,l);const u={uid:l,getSystem:i.get,config:D.none,hasConfigured:Fe,connect:f=>{i.set(f)},disconnect:()=>{i.set(Qb(()=>u))},getApis:()=>({}),element:r.element,spec:n,readState:ue("No state"),syncComponents:Ke,components:ue([]),events:{}};return H1(u)},W1=Dc,sy=(n,r)=>$1(n).getOrThunk(()=>((i,l)=>{const{events:u,...f}=Hk(i),p=((v,C)=>{const O=St(v,"components").getOr([]);return C.fold(()=>pt(O,La),A=>pt(O,(R,F)=>sy(R,vs(A,F))))})(f,l),y={...f,events:{...P1,...u},components:p};return un.value(ta(y,l))})((i=>Vo(i,"uid"))(n)?n:{uid:W1(""),...n},r).getOrDie()),La=n=>sy(n,D.none()),Fi=H1;var gp,af=(n,r,i,l,u)=>n(i,l)?D.some(i):ut(u)&&u(i)?D.none():r(i,l,u);const im=(n,r,i)=>{let l=n.dom;const u=ut(i)?i:Fe;for(;l.parentNode;){l=l.parentNode;const f=Vt(l);if(r(f))return D.some(f);if(u(f))break}return D.none()},ry=(n,r,i)=>af((l,u)=>u(l),im,n,r,i),S_=(n,r)=>j(n.dom.childNodes,i=>r(Vt(i))).map(Vt),q1=(n,r,i)=>ry(n,r,i).isSome(),lm=(n,r,i)=>im(n,l=>_i(l,r),i),As=(n,r)=>((i,l)=>{const u=i.dom;return u.parentNode?S_(Vt(u.parentNode),f=>!$n(i,f)&&_i(f,r)):D.none()})(n),ay=(n,r)=>S_(n,i=>_i(i,r)),Ys=(n,r)=>Zc(r,n),Id=(n,r,i)=>af((l,u)=>_i(l,u),lm,n,r,i),od="aria-controls",hp=()=>{const n=Xt(od);return{id:n,link:r=>{wo(r,od,n)},unlink:r=>{pn(r,od)}}},el=(n,r)=>q1(r,i=>$n(i,n.element),Fe)||((i,l)=>(u=>ry(u,f=>{if(!ys(f))return!1;const p=yr(f,"id");return p!==void 0&&p.indexOf(od)>-1}).bind(f=>{const p=yr(f,"id"),y=Vs(f);return Ys(y,`[${od}="${p}"]`)}))(l).exists(u=>el(i,u)))(n,r),Ga=(n,r,i,l,u,f,p,y=!1)=>({x:n,y:r,bubble:i,direction:l,placement:u,restriction:f,label:`${p}-${u}`,alwaysFit:y}),cm=Si([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),wh=cm.southeast,bp=cm.southwest,kh=cm.northeast,yp=cm.northwest,E_=cm.south,K1=cm.north,G1=cm.east,A_=cm.west,Ya=(n,r)=>Ln(["left","right","top","bottom"],i=>St(r,i).map(l=>((u,f)=>{switch(f){case 1:return u.x;case 0:return u.x+u.width;case 2:return u.y;case 3:return u.y+u.height}})(n,l))),dm="layout",T_=n=>n.x,Rc=(n,r)=>n.x+n.width/2-r.width/2,Hi=(n,r)=>n.x+n.width-r.width,vp=(n,r)=>n.y-r.height,mg=n=>n.y+n.height,O_=(n,r)=>n.y+n.height/2-r.height/2,mr=(n,r,i)=>Ga(T_(n),mg(n),i.southeast(),wh(),"southeast",Ya(n,{left:1,top:3}),dm),pr=(n,r,i)=>Ga(Hi(n,r),mg(n),i.southwest(),bp(),"southwest",Ya(n,{right:0,top:3}),dm),Lr=(n,r,i)=>Ga(T_(n),vp(n,r),i.northeast(),kh(),"northeast",Ya(n,{left:1,bottom:2}),dm),us=(n,r,i)=>Ga(Hi(n,r),vp(n,r),i.northwest(),yp(),"northwest",Ya(n,{right:0,bottom:2}),dm),ir=(n,r,i)=>Ga(Rc(n,r),vp(n,r),i.north(),K1(),"north",Ya(n,{bottom:2}),dm),Ar=(n,r,i)=>Ga(Rc(n,r),mg(n),i.south(),E_(),"south",Ya(n,{top:3}),dm),iy=(n,r,i)=>Ga((l=>l.x+l.width)(n),O_(n,r),i.east(),G1(),"east",Ya(n,{left:0}),dm),ly=(n,r,i)=>Ga(((l,u)=>l.x-u.width)(n,r),O_(n,r),i.west(),A_(),"west",Ya(n,{right:1}),dm),Y1=()=>[mr,pr,Lr,us,Ar,ir,iy,ly],Ch=()=>[pr,mr,us,Lr,Ar,ir,iy,ly],X1=()=>[Lr,us,mr,pr,ir,Ar],_p=()=>[us,Lr,pr,mr,ir,Ar],cy=()=>[mr,pr,Lr,us,Ar,ir],dy=()=>[pr,mr,us,Lr,Ar,ir];var J1=Object.freeze({__proto__:null,events:n=>$o([Xe(Ii(),(r,i)=>{const l=n.channels,u=tn(l),f=i,p=((y,v)=>v.universal?y:cn(y,C=>Ge(v.channels,C)))(u,f);$t(p,y=>{const v=l[y],C=v.schema,O=la("channel["+y+`] data +Receiver: `+ku(r.element),C,f.data);v.onReceive(r,O)})})])}),Sh=[Xr("channels",Yu(un.value,Ur([Pd("onReceive"),Ne("schema",Pi())])))];const tl=Qr({fields:Sh,name:"receiving",active:J1});var Q1=Object.freeze({__proto__:null,exhibit:(n,r)=>ar({classes:[],styles:r.useFixed()?{}:{position:"relative"}})});const Ei=(n,r=!1)=>n.dom.focus({preventScroll:r}),Eh=n=>n.dom.blur(),xp=n=>{const r=Vs(n).dom;return n.dom===r.activeElement},nd=(n=$a())=>D.from(n.dom.activeElement).map(Vt),Tr=n=>nd(Vs(n)).filter(r=>n.dom.contains(r.dom)),um=(n,r)=>{const i=Vs(r),l=nd(i).bind(f=>{const p=y=>$n(f,y);return p(r)?D.some(r):((y,v)=>{const C=O=>{for(let A=0;A{nd(i).filter(p=>$n(p,f)).fold(()=>{Ei(f)},Ke)}),u},e0=Si([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),t0=(n,r,i,l,u,f)=>{const p=r.rect,y=p.x-i,v=p.y-l,C=u-(y+p.width),O=f-(v+p.height),A=D.some(y),R=D.some(v),F=D.some(C),$=D.some(O),G=D.none();return r.direction.fold(()=>qs(n,A,R,G,G),()=>qs(n,G,R,F,G),()=>qs(n,A,G,G,$),()=>qs(n,G,G,F,$),()=>qs(n,A,R,G,G),()=>qs(n,A,G,G,$),()=>qs(n,A,R,G,G),()=>qs(n,G,R,F,G))},Ah=(n,r)=>n.fold(()=>{const i=r.rect;return qs("absolute",D.some(i.x),D.some(i.y),D.none(),D.none())},(i,l,u,f)=>t0("absolute",r,i,l,u,f),(i,l,u,f)=>t0("fixed",r,i,l,u,f)),Su=(n,r)=>{const i=ot(Gc,r),l=n.fold(i,i,()=>{const p=_s();return Gc(r).translate(-p.left,-p.top)}),u=Xn(r),f=Na(r);return rn(l.left,l.top,u,f)},Uk=(n,r)=>r.fold(()=>n.fold(jr,jr,rn),i=>n.fold(ue(i),ue(i),()=>{const l=Th(n,i.x,i.y);return rn(l.left,l.top,i.width,i.height)})),Th=(n,r,i)=>{const l=pe(r,i);return n.fold(ue(l),ue(l),()=>{const u=_s();return l.translate(-u.left,-u.top)})};e0.none;const fm=e0.relative,z_=e0.fixed,Oh="data-alloy-placement",zh=n=>Fs(n,Oh),uy=Si([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),pg=(n,r,i,l)=>{const u=n.bubble,f=u.offset,p=((ne,ie,de)=>{const we=(kt,Wt)=>ie[kt].map(ro=>{const yo=kt==="top"||kt==="bottom",Ho=yo?de.top:de.left,xn=(kt==="left"||kt==="top"?Math.max:Math.min)(ro,Wt)+Ho;return yo?Nc(xn,ne.y,ne.bottom):Nc(xn,ne.x,ne.right)}).getOr(Wt),ze=we("left",ne.x),tt=we("top",ne.y),Je=we("right",ne.right),Ze=we("bottom",ne.bottom);return rn(ze,tt,Je-ze,Ze-tt)})(l,n.restriction,f),y=n.x+f.left,v=n.y+f.top,C=rn(y,v,r,i),{originInBounds:O,sizeInBounds:A,visibleW:R,visibleH:F}=((ne,ie)=>{const{x:de,y:we,right:ze,bottom:tt}=ie,{x:Je,y:Ze,right:kt,bottom:Wt,width:ro,height:yo}=ne;return{originInBounds:Je>=de&&Je<=ze&&Ze>=we&&Ze<=tt,sizeInBounds:kt<=ze&&kt>=de&&Wt<=tt&&Wt>=we,visibleW:Math.min(ro,Je>=de?ze-Je:kt-de),visibleH:Math.min(yo,Ze>=we?tt-Ze:Wt-we)}})(C,p),$=O&&A,G=$?C:((ne,ie)=>{const{x:de,y:we,right:ze,bottom:tt}=ie,{x:Je,y:Ze,width:kt,height:Wt}=ne,ro=Math.max(de,ze-kt),yo=Math.max(we,tt-Wt),Ho=Nc(Je,de,ro),xn=Nc(Ze,we,yo),Bs=Math.min(Ho+kt,ze)-Ho,Xs=Math.min(xn+Wt,tt)-xn;return rn(Ho,xn,Bs,Xs)})(C,p),J=G.width>0&&G.height>0,{maxWidth:ae,maxHeight:X}=((ne,ie,de)=>{const we=ue(ie.bottom-de.y),ze=ue(de.bottom-ie.y),tt=((Wt,ro,yo,Ho)=>Wt.fold(ro,ro,Ho,Ho,ro,Ho,yo,yo))(ne,ze,ze,we),Je=ue(ie.right-de.x),Ze=ue(de.right-ie.x);return{maxWidth:((Wt,ro,yo,Ho)=>Wt.fold(ro,Ho,ro,Ho,yo,yo,ro,Ho))(ne,Ze,Ze,Je),maxHeight:tt}})(n.direction,G,l),Y={rect:G,maxHeight:X,maxWidth:ae,direction:n.direction,placement:n.placement,classes:{on:u.classesOn,off:u.classesOff},layout:n.label,testY:v};return $||n.alwaysFit?uy.fit(Y):uy.nofit(Y,R,F,J)},fy=Gt,Ai=(n,r,i)=>((l,u,f,p)=>Cd(l,u,f,p,!1))(n,r,fy,i),o0=(n,r,i)=>((l,u,f,p)=>Cd(l,u,f,p,!0))(n,r,fy,i),Eu=ki,Nh=["top","bottom","right","left"],Fd="data-alloy-transition-timer",Dh=(n,r,i,l,u,f)=>{const p=((y,v,C)=>C.exists(O=>{const A=y.mode;return A==="all"||O[A]!==v[A]}))(l,u,f);if(p||((y,v)=>((C,O)=>hi(O,A=>_n(C,A)))(y,v.classes))(n,l)){Mo(n,"position",i.position);const y=Su(r,n),v=Ah(r,{...u,rect:y}),C=Ln(Nh,O=>v[O]);((O,A)=>{const R=F=>parseFloat(F).toFixed(3);return yn(A,(F,$)=>!((G,J,ae=ve)=>vt(G,J,ae).getOr(G.isNone()&&J.isNone()))(O[$].map(R),F.map(R))).isSome()})(i,C)&&(ri(n,C),p&&((O,A)=>{Ko(O,A.classes),Fs(O,Fd).each(R=>{clearTimeout(parseInt(R,10)),pn(O,Fd)}),((R,F)=>{const $=Cl(),G=Cl();let J;const ae=ie=>{var de;const we=(de=ie.raw.pseudoElement)!==null&&de!==void 0?de:"";return $n(ie.target,R)&&yl(we)&&Ge(Nh,ie.raw.propertyName)},X=ie=>{if(mo(ie)||ae(ie)){$.clear(),G.clear();const de=ie==null?void 0:ie.raw.type;(mo(de)||de===np())&&(clearTimeout(J),pn(R,Fd),Qn(R,F.classes))}},Y=Ai(R,sg(),ie=>{ae(ie)&&(Y.unbind(),$.set(Ai(R,np(),X)),G.set(Ai(R,uh(),X)))}),ne=(ie=>{const de=Je=>{const Ze=Ns(ie,Je).split(/\s*,\s*/);return cn(Ze,yi)},we=Je=>{if(te(Je)&&/^[\d.]+/.test(Je)){const Ze=parseFloat(Je);return ll(Je,"ms")?Ze:1e3*Ze}return 0},ze=de("transition-delay"),tt=de("transition-duration");return zo(tt,(Je,Ze,kt)=>{const Wt=we(ze[kt])+we(Ze);return Math.max(Je,Wt)},0)})(R);requestAnimationFrame(()=>{J=setTimeout(X,ne+17),wo(R,Fd,J)})})(O,A)})(n,l),xl(n))}else Qn(n,l.classes)},Rh=(n,r)=>{((i,l)=>{const u=_d.max(i,l,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]);Mo(i,"max-height",u+"px")})(n,Math.floor(r))},mm=ue((n,r)=>{Rh(n,r),Li(n,{"overflow-x":"hidden","overflow-y":"auto"})}),wp=ue((n,r)=>{Rh(n,r)}),Mc=(n,r,i)=>n[r]===void 0?i:n[r],Mh=(n,r,i,l)=>{const u=((f,p,y,v)=>{Vn(p,"max-height"),Vn(p,"max-width");const C={width:Xn(O=p),height:Na(O)};var O;return((A,R,F,$,G,J)=>{const ae=$.width,X=$.height,Y=(ne,ie,de,we,ze)=>{const tt=ne(F,$,G,A,J),Je=pg(tt,ae,X,J);return Je.fold(ue(Je),(Ze,kt,Wt,ro)=>(ze===ro?Wt>we||kt>de:!ze&&ro)?Je:uy.nofit(ie,de,we,ze))};return zo(R,(ne,ie)=>{const de=ot(Y,ie);return ne.fold(ue(ne),de)},uy.nofit({rect:F,maxHeight:$.height,maxWidth:$.width,direction:wh(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:F.y},-1,-1,!1)).fold(Ct,Ct)})(p,v.preference,f,C,y,v.bounds)})(n,r,i,l);return((f,p,y)=>{const v=Ah(y.origin,p);y.transition.each(C=>{Dh(f,y.origin,v,C,p,y.lastPlacement)}),tc(f,v)})(r,u,l),((f,p)=>{((y,v)=>{wo(y,Oh,v)})(f,p.placement)})(r,u),((f,p)=>{const y=p.classes;Qn(f,y.off),Ko(f,y.on)})(r,u),((f,p,y)=>{(0,y.maxHeightFunction)(f,p.maxHeight)})(r,u,l),((f,p,y)=>{(0,y.maxWidthFunction)(f,p.maxWidth)})(r,u,l),{layout:u.layout,placement:u.placement}},Zk=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],nc=(n,r,i,l=1)=>{const u=n*l,f=r*l,p=v=>St(i,v).getOr([]),y=(v,C,O)=>{const A=mn(Zk,O);return{offset:pe(v,C),classesOn:Sn(O,p),classesOff:Sn(A,p)}};return{southeast:()=>y(-n,r,["top","alignLeft"]),southwest:()=>y(n,r,["top","alignRight"]),south:()=>y(-n/2,r,["top","alignCentre"]),northeast:()=>y(-n,-r,["bottom","alignLeft"]),northwest:()=>y(n,-r,["bottom","alignRight"]),north:()=>y(-n/2,-r,["bottom","alignCentre"]),east:()=>y(n,-r/2,["valignCentre","left"]),west:()=>y(-n,-r/2,["valignCentre","right"]),insetNortheast:()=>y(u,f,["top","alignLeft","inset"]),insetNorthwest:()=>y(-u,f,["top","alignRight","inset"]),insetNorth:()=>y(-u/2,f,["top","alignCentre","inset"]),insetSoutheast:()=>y(u,-f,["bottom","alignLeft","inset"]),insetSouthwest:()=>y(-u,-f,["bottom","alignRight","inset"]),insetSouth:()=>y(-u/2,-f,["bottom","alignCentre","inset"]),insetEast:()=>y(-u,-f/2,["valignCentre","right","inset"]),insetWest:()=>y(u,-f/2,["valignCentre","left","inset"])}},Au=()=>nc(0,0,{}),Lc=Ct,n0=(n,r)=>i=>ua(i)==="rtl"?r:n,ua=n=>Ns(n,"direction")==="rtl"?"rtl":"ltr";var Bc;(function(n){n.TopToBottom="toptobottom",n.BottomToTop="bottomtotop"})(Bc||(Bc={}));const ol="data-alloy-vertical-dir",Wk=n=>q1(n,r=>ys(r)&&yr(r,"data-alloy-vertical-dir")===Bc.BottomToTop),lf=()=>Zs("layouts",[nt("onLtr"),nt("onRtl"),vn("onBottomLtr"),vn("onBottomRtl")]),Tu=(n,r,i,l,u,f,p)=>{const y=p.map(Wk).getOr(!1),v=r.layouts.map(R=>R.onLtr(n)),C=r.layouts.map(R=>R.onRtl(n)),O=y?r.layouts.bind(R=>R.onBottomLtr.map(F=>F(n))).or(v).getOr(u):v.getOr(i),A=y?r.layouts.bind(R=>R.onBottomRtl.map(F=>F(n))).or(C).getOr(f):C.getOr(l);return n0(O,A)(n)};var gg=[nt("hotspot"),vn("bubble"),Ne("overrides",{}),lf(),Es("placement",(n,r,i)=>{const l=r.hotspot,u=Su(i,l.element),f=Tu(n.element,r,cy(),dy(),X1(),_p(),D.some(r.hotspot.element));return D.some(Lc({anchorBox:u,bubble:r.bubble.getOr(Au()),overrides:r.overrides,layouts:f}))})],pm=[nt("x"),nt("y"),Ne("height",0),Ne("width",0),Ne("bubble",Au()),Ne("overrides",{}),lf(),Es("placement",(n,r,i)=>{const l=Th(i,r.x,r.y),u=rn(l.left,l.top,r.width,r.height),f=Tu(n.element,r,Y1(),Ch(),Y1(),Ch(),D.none());return D.some(Lc({anchorBox:u,bubble:r.bubble,overrides:r.overrides,layouts:f}))})];const Bl=Si([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),my=n=>n.fold(Ct,(r,i,l)=>r.translate(-i,-l)),py=n=>n.fold(Ct,Ct),Lh=n=>zo(n,(r,i)=>r.translate(i.left,i.top),pe(0,0)),gy=n=>{const r=pt(n,py);return Lh(r)},N_=Bl.screen,Bh=Bl.absolute,Ou=(n,r,i)=>{const l=ha(n.element),u=_s(l),f=((p,y,v)=>{const C=yd(v.root).dom;return D.from(C.frameElement).map(Vt).filter(O=>{const A=ha(O),R=ha(p.element);return $n(A,R)}).map(Ye)})(n,0,i).getOr(u);return Bh(f,u.left,u.top)},Ph=(n,r,i,l)=>{const u=N_(pe(n,r));return D.some(((f,p,y)=>({point:f,width:p,height:y}))(u,i,l))},kp=(n,r,i,l,u)=>n.map(f=>{const p=[r,f.point],y=(v=()=>gy(p),C=()=>gy(p),O=()=>(Y=>{const ne=pt(Y,my);return Lh(ne)})(p),l.fold(v,C,O));var v,C,O;const A=(G=y.left,J=y.top,ae=f.width,X=f.height,{x:G,y:J,width:ae,height:X}),R=i.showAbove?X1():cy(),F=i.showAbove?_p():dy(),$=Tu(u,i,R,F,R,F,D.none());var G,J,ae,X;return Lc({anchorBox:A,bubble:i.bubble.getOr(Au()),overrides:i.overrides,layouts:$})});var Cp=[nt("node"),nt("root"),vn("bubble"),lf(),Ne("overrides",{}),Ne("showAbove",!1),Es("placement",(n,r,i)=>{const l=Ou(n,0,r);return r.node.filter(Vr).bind(u=>{const f=u.dom.getBoundingClientRect(),p=Ph(f.left,f.top,f.width,f.height),y=r.node.getOr(n.element);return kp(p,l,r,i,y)})})];const cf=(n,r,i,l)=>({start:n,soffset:r,finish:i,foffset:l}),df=Si([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Ih=(df.before,df.on,df.after,n=>n.fold(Ct,Ct,Ct)),uf=Si([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),ff={domRange:uf.domRange,relative:uf.relative,exact:uf.exact,exactFromRange:n=>uf.exact(n.start,n.soffset,n.finish,n.foffset),getWin:n=>{const r=(i=>i.match({domRange:l=>Vt(l.startContainer),relative:(l,u)=>Ih(l),exact:(l,u,f,p)=>l}))(n);return yd(r)},range:cf},mf=(n,r,i)=>{const l=n.document.createRange();var u;return u=l,r.fold(f=>{u.setStartBefore(f.dom)},(f,p)=>{u.setStart(f.dom,p)},f=>{u.setStartAfter(f.dom)}),((f,p)=>{p.fold(y=>{f.setEndBefore(y.dom)},(y,v)=>{f.setEnd(y.dom,v)},y=>{f.setEndAfter(y.dom)})})(l,i),l},Sp=(n,r,i,l,u)=>{const f=n.document.createRange();return f.setStart(r.dom,i),f.setEnd(l.dom,u),f},hy=n=>({left:n.left,top:n.top,right:n.right,bottom:n.bottom,width:n.width,height:n.height}),hg=Si([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),by=(n,r,i)=>r(Vt(i.startContainer),i.startOffset,Vt(i.endContainer),i.endOffset),s0=(n,r)=>((i,l)=>{const u=((f,p)=>p.match({domRange:y=>({ltr:ue(y),rtl:D.none}),relative:(y,v)=>({ltr:sn(()=>mf(f,y,v)),rtl:sn(()=>D.some(mf(f,v,y)))}),exact:(y,v,C,O)=>({ltr:sn(()=>Sp(f,y,v,C,O)),rtl:sn(()=>D.some(Sp(f,C,O,y,v)))})}))(i,l);return((f,p)=>{const y=p.ltr();return y.collapsed?p.rtl().filter(v=>v.collapsed===!1).map(v=>hg.rtl(Vt(v.endContainer),v.endOffset,Vt(v.startContainer),v.startOffset)).getOrThunk(()=>by(0,hg.ltr,y)):by(0,hg.ltr,y)})(0,u)})(n,r).match({ltr:(i,l,u,f)=>{const p=n.document.createRange();return p.setStart(i.dom,l),p.setEnd(u.dom,f),p},rtl:(i,l,u,f)=>{const p=n.document.createRange();return p.setStart(u.dom,f),p.setEnd(i.dom,l),p}});hg.ltr,hg.rtl;const bg=(n,r,i)=>cn(((l,u)=>{const f=ut(u)?u:Fe;let p=l.dom;const y=[];for(;p.parentNode!==null&&p.parentNode!==void 0;){const v=p.parentNode,C=Vt(v);if(y.push(C),f(C)===!0)break;p=v}return y})(n,i),r),fa=(n,r)=>((i,l)=>{const u=l===void 0?document:l.dom;return iu(u)?[]:pt(u.querySelectorAll(i),Vt)})(r,n),r0=n=>{if(n.rangeCount>0){const r=n.getRangeAt(0),i=n.getRangeAt(n.rangeCount-1);return D.some(cf(Vt(r.startContainer),r.startOffset,Vt(i.endContainer),i.endOffset))}return D.none()},D_=n=>{if(n.anchorNode===null||n.focusNode===null)return r0(n);{const r=Vt(n.anchorNode),i=Vt(n.focusNode);return((l,u,f,p)=>{const y=((C,O,A,R)=>{const F=ha(C).dom.createRange();return F.setStart(C.dom,O),F.setEnd(A.dom,R),F})(l,u,f,p),v=$n(l,f)&&u===p;return y.collapsed&&!v})(r,n.anchorOffset,i,n.focusOffset)?D.some(cf(r,n.anchorOffset,i,n.focusOffset)):r0(n)}},a0=(n,r)=>(i=>{const l=i.getClientRects(),u=l.length>0?l[0]:i.getBoundingClientRect();return u.width>0||u.height>0?D.some(u).map(hy):D.none()})(s0(n,r)),i0=((n,r)=>{const i=l=>n(l)?D.from(l.dom.nodeValue):D.none();return{get:l=>{if(!n(l))throw new Error("Can only get text value of a text node");return i(l).getOr("")},getOption:i,set:(l,u)=>{if(!n(l))throw new Error("Can only set raw text value of a text node");l.dom.nodeValue=u}}})(ga),pf=(n,r)=>({element:n,offset:r}),yy=(n,r)=>ga(n)?pf(n,r):((i,l)=>{const u=Yn(i);if(u.length===0)return pf(i,l);if(li0.get(y))(f).length:Yn(f).length;return pf(f,p)}})(n,r),Fh=n=>n.foffset!==void 0,l0=(n,r)=>r.getSelection.getOrThunk(()=>()=>(i=>(l=>D.from(l.getSelection()))(i).filter(l=>l.rangeCount>0).bind(D_))(n))().map(i=>{if(Fh(i)){const l=yy(i.start,i.soffset),u=yy(i.finish,i.foffset);return ff.range(l.element,l.offset,u.element,u.offset)}return i});var qk=[vn("getSelection"),nt("root"),vn("bubble"),lf(),Ne("overrides",{}),Ne("showAbove",!1),Es("placement",(n,r,i)=>{const l=yd(r.root).dom,u=Ou(n,0,r),f=l0(l,r).bind(y=>{if(Fh(y))return((C,O)=>(A=>{const R=A.getBoundingClientRect();return R.width>0||R.height>0?D.some(R).map(hy):D.none()})(s0(C,O)))(l,ff.exactFromRange(y)).orThunk(()=>{const C=hd("\uFEFF");wl(y.start,C);const O=a0(l,ff.exact(C,0,C,1));return aa(C),O}).bind(C=>Ph(C.left,C.top,C.width,C.height));{const v=Zn(y,O=>O.dom.getBoundingClientRect()),C={left:Math.min(v.firstCell.left,v.lastCell.left),right:Math.max(v.firstCell.right,v.lastCell.right),top:Math.min(v.firstCell.top,v.lastCell.top),bottom:Math.max(v.firstCell.bottom,v.lastCell.bottom)};return Ph(C.left,C.top,C.right-C.left,C.bottom-C.top)}}),p=l0(l,r).bind(y=>Fh(y)?ys(y.start)?D.some(y.start):ba(y.start):D.some(y.firstCell)).getOr(n.element);return kp(f,u,r,i,p)})];const gf="link-layout",Hh=n=>n.x+n.width,R_=(n,r)=>n.x-r.width,M_=(n,r)=>n.y-r.height+n.height,sd=n=>n.y,c0=(n,r,i)=>Ga(Hh(n),sd(n),i.southeast(),wh(),"southeast",Ya(n,{left:0,top:2}),gf),vy=(n,r,i)=>Ga(R_(n,r),sd(n),i.southwest(),bp(),"southwest",Ya(n,{right:1,top:2}),gf),L_=(n,r,i)=>Ga(Hh(n),M_(n,r),i.northeast(),kh(),"northeast",Ya(n,{left:0,bottom:3}),gf),Ep=(n,r,i)=>Ga(R_(n,r),M_(n,r),i.northwest(),yp(),"northwest",Ya(n,{right:1,bottom:3}),gf),yg=()=>[c0,vy,L_,Ep],$h=()=>[vy,c0,Ep,L_];var B_=[nt("item"),lf(),Ne("overrides",{}),Es("placement",(n,r,i)=>{const l=Su(i,r.item.element),u=Tu(n.element,r,yg(),$h(),yg(),$h(),D.none());return D.some(Lc({anchorBox:l,bubble:Au(),overrides:r.overrides,layouts:u}))})],rd=_r("type",{selection:qk,node:Cp,hotspot:gg,submenu:B_,makeshift:pm});const gm=[li("classes",Zr),Ol("mode","all",["all","layout","placement"])],Vh=[Ne("useFixed",Fe),vn("getBounds")],jh=[Xr("anchor",rd),Zs("transition",gm)],_y=(n,r,i,l,u,f)=>{const p=la("placement.info",ho(jh),u),y=p.anchor,v=l.element,C=i.get(l.uid);um(()=>{Mo(v,"position","fixed");const O=er(v,"visibility");Mo(v,"visibility","hidden");const A=r.useFixed()?(()=>{const R=document.documentElement;return z_(0,0,R.clientWidth,R.clientHeight)})():(R=>{const F=Ye(R.element),$=R.element.dom.getBoundingClientRect();return fm(F.left,F.top,$.width,$.height)})(n);y.placement(n,y,A).each(R=>{const F=f.orThunk(()=>r.getBounds.map(uo)),$=((G,J,ae,X,Y,ne)=>((ie,de,we,ze,tt,Je,Ze,kt)=>{const Wt=Mc(Ze,"maxHeightFunction",mm()),ro=Mc(Ze,"maxWidthFunction",Ke),yo=ie.anchorBox,Ho=ie.origin,xn={bounds:Uk(Ho,Je),origin:Ho,preference:ze,maxHeightFunction:Wt,maxWidthFunction:ro,lastPlacement:tt,transition:kt};return Mh(yo,de,we,xn)})(((ie,de)=>((we,ze)=>({anchorBox:we,origin:ze}))(ie,de))(J.anchorBox,G),X.element,J.bubble,J.layouts,Y,ae,J.overrides,ne))(A,R,F,l,C,p.transition);i.set(l.uid,$)}),O.fold(()=>{Vn(v,"visibility")},R=>{Mo(v,"visibility",R)}),er(v,"left").isNone()&&er(v,"top").isNone()&&er(v,"right").isNone()&&er(v,"bottom").isNone()&&Kr(er(v,"position"),"fixed")&&Vn(v,"position")},v)};var Uh=Object.freeze({__proto__:null,position:(n,r,i,l,u)=>{const f=D.none();_y(n,r,i,l,u,f)},positionWithinBounds:_y,getMode:(n,r,i)=>r.useFixed()?"fixed":"absolute",reset:(n,r,i,l)=>{const u=l.element;$t(["position","left","right","top","bottom"],f=>Vn(u,f)),(f=>{pn(f,Oh)})(u),i.clear(l.uid)}});const Xa=Qr({fields:Vh,name:"positioning",active:Q1,apis:Uh,state:Object.freeze({__proto__:null,init:()=>{let n={};return Jr({readState:()=>n,clear:r=>{st(r)?delete n[r]:n={}},set:(r,i)=>{n[r]=i},get:r=>St(n,r)})}})}),xy=n=>n.getSystem().isConnected(),hm=n=>{Qo(n,Nl());const r=n.components();$t(r,hm)},bm=n=>{const r=n.components();$t(r,bm),Qo(n,ka())},Zh=(n,r)=>{n.getSystem().addToWorld(r),Vr(n.element)&&bm(r)},wy=n=>{hm(n),n.getSystem().removeFromWorld(n)},Ap=(n,r)=>{ai(n.element,r.element)},hf=(n,r)=>{d0(n,r,ai)},d0=(n,r,i)=>{n.getSystem().addToWorld(r),i(n.element,r.element),Vr(n.element)&&bm(r),n.syncComponents()},ky=n=>{hm(n),aa(n.element),n.getSystem().removeFromWorld(n)},$i=n=>{const r=$r(n.element).bind(i=>n.getSystem().getByDom(i).toOptional());ky(n),r.each(i=>{i.syncComponents()})},bf=n=>{const r=n.components();$t(r,ky),Rs(n.element),n.syncComponents()},u0=(n,r)=>{vg(n,r,ai)},Ue=(n,r)=>{vg(n,r,Zu)},vg=(n,r,i)=>{i(n,r.element);const l=Yn(r.element);$t(l,u=>{r.getByDom(u).each(bm)})},Kk=n=>{const r=Yn(n.element);$t(r,i=>{n.getByDom(i).each(hm)}),aa(n.element)},P_=(n,r,i,l)=>{i.get().each(p=>{bf(n)});const u=r.getAttachPoint(n);hf(u,n);const f=n.getSystem().build(l);return hf(n,f),i.set(f),f},Cy=(n,r,i,l)=>{const u=P_(n,r,i,l);return r.onOpen(n,u),u},ad=(n,r,i)=>{i.get().each(l=>{bf(n),$i(n),r.onClose(n,l),i.clear()})},Sy=(n,r,i)=>i.isOpen(),Wh=(n,r,i)=>{const l=r.getAttachPoint(n);Mo(n.element,"position",Xa.getMode(l)),((u,f,p,y)=>{er(u.element,f).fold(()=>{pn(u.element,p)},v=>{wo(u.element,p,v)}),Mo(u.element,f,"hidden")})(n,"visibility",r.cloakVisibilityAttr)},f0=(n,r,i)=>{(l=>Ao(["top","left","right","bottom"],u=>er(l,u).isSome()))(n.element)||Vn(n.element,"position"),((l,u,f)=>{Fs(l.element,f).fold(()=>Vn(l.element,u),p=>Mo(l.element,u,p))})(n,"visibility",r.cloakVisibilityAttr)};var m0=Object.freeze({__proto__:null,cloak:Wh,decloak:f0,open:Cy,openWhileCloaked:(n,r,i,l,u)=>{Wh(n,r),Cy(n,r,i,l),u(),f0(n,r)},close:ad,isOpen:Sy,isPartOf:(n,r,i,l)=>Sy(0,0,i)&&i.get().exists(u=>r.isPartOf(n,u,l)),getState:(n,r,i)=>i.get(),setContent:(n,r,i,l)=>i.get().map(()=>P_(n,r,i,l))}),Gk=Object.freeze({__proto__:null,events:(n,r)=>$o([Xe(sp(),(i,l)=>{ad(i,n,r)})])}),m=[Dn("onOpen"),Dn("onClose"),nt("isPartOf"),nt("getAttachPoint"),Ne("cloakVisibilityAttr","data-precloak-visibility")],b=Object.freeze({__proto__:null,init:()=>{const n=Nn(),r=ue("not-implemented");return Jr({readState:r,isOpen:n.isSet,clear:n.clear,set:n.set,get:n.get})}});const x=Qr({fields:m,name:"sandboxing",active:Gk,apis:m0,state:b}),T=ue("dismiss.popups"),M=ue("reposition.popups"),B=ue("mouse.released"),U=Ur([Ne("isExtraPart",Fe),Zs("fireEventInstead",[Ne("event",Ju())])]),K=n=>{const r=la("Dismissal",U,n);return{[T()]:{schema:Ur([nt("target")]),onReceive:(i,l)=>{x.isOpen(i)&&(x.isPartOf(i,l.target)||r.isExtraPart(i,l.target)||r.fireEventInstead.fold(()=>x.close(i),u=>Qo(i,u.event)))}}}},re=Ur([Zs("fireEventInstead",[Ne("event",Rd())]),Za("doReposition")]),he=n=>{const r=la("Reposition",re,n);return{[M()]:{onReceive:i=>{x.isOpen(i)&&r.fireEventInstead.fold(()=>r.doReposition(i),l=>Qo(i,l.event))}}}},Se=(n,r,i)=>{r.store.manager.onLoad(n,r,i)},me=(n,r,i)=>{r.store.manager.onUnload(n,r,i)};var be=Object.freeze({__proto__:null,onLoad:Se,onUnload:me,setValue:(n,r,i,l)=>{r.store.manager.setValue(n,r,i,l)},getValue:(n,r,i)=>r.store.manager.getValue(n,r,i),getState:(n,r,i)=>i}),_e=Object.freeze({__proto__:null,events:(n,r)=>{const i=n.resetOnDom?[Ss((l,u)=>{Se(l,n,r)}),Tc((l,u)=>{me(l,n,r)})]:[yu(n,r,Se)];return $o(i)}});const De=()=>{const n=so(null);return Jr({set:n.set,get:n.get,isNotSet:()=>n.get()===null,clear:()=>{n.set(null)},readState:()=>({mode:"memory",value:n.get()})})},Re=()=>{const n=so({}),r=so({});return Jr({readState:()=>({mode:"dataset",dataByValue:n.get(),dataByText:r.get()}),lookup:i=>St(n.get(),i).orThunk(()=>St(r.get(),i)),update:i=>{const l=n.get(),u=r.get(),f={},p={};$t(i,y=>{f[y.value]=y,St(y,"meta").each(v=>{St(v,"text").each(C=>{p[C]=y})})}),n.set({...l,...f}),r.set({...u,...p})},clear:()=>{n.set({}),r.set({})}})};var lt=Object.freeze({__proto__:null,memory:De,dataset:Re,manual:()=>Jr({readState:Ke}),init:n=>n.store.manager.state(n)});const ct=(n,r,i,l)=>{const u=r.store;i.update([l]),u.setValue(n,l),r.onSetValue(n,l)};var it=[vn("initialValue"),nt("getFallbackEntry"),nt("getDataKey"),nt("setValue"),Es("manager",{setValue:ct,getValue:(n,r,i)=>{const l=r.store,u=l.getDataKey(n);return i.lookup(u).getOrThunk(()=>l.getFallbackEntry(u))},onLoad:(n,r,i)=>{r.store.initialValue.each(l=>{ct(n,r,i,l)})},onUnload:(n,r,i)=>{i.clear()},state:Re})],gt=[nt("getValue"),Ne("setValue",Ke),vn("initialValue"),Es("manager",{setValue:(n,r,i,l)=>{r.store.setValue(n,l),r.onSetValue(n,l)},getValue:(n,r,i)=>r.store.getValue(n),onLoad:(n,r,i)=>{r.store.initialValue.each(l=>{r.store.setValue(n,l)})},onUnload:Ke,state:Ll.init})],Nt=[vn("initialValue"),Es("manager",{setValue:(n,r,i,l)=>{i.set(l),r.onSetValue(n,l)},getValue:(n,r,i)=>i.get(),onLoad:(n,r,i)=>{r.store.initialValue.each(l=>{i.isNotSet()&&i.set(l)})},onUnload:(n,r,i)=>{i.clear()},state:De})],Pt=[Wa("store",{mode:"memory"},_r("mode",{memory:Nt,manual:gt,dataset:it})),Dn("onSetValue"),Ne("resetOnDom",!1)];const Le=Qr({fields:Pt,name:"representing",active:_e,apis:be,extra:{setValueFrom:(n,r)=>{const i=Le.getValue(r);Le.setValue(n,i)}},state:lt}),Jt=(n,r)=>wa(n,{},pt(r,i=>{return l=i.name(),u="Cannot configure "+i.name()+" for "+n,dr(l,l,{tag:"option",process:{}},Gl(f=>ja("The field: "+l+" is forbidden. "+u)));var l,u}).concat([ca("dump",Ct)])),To=n=>n.dump,Xo=(n,r)=>({...xt(r),...n.dump}),Io=Jt,Oo=Xo,Yo="placeholder",zn=Si([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),Br=n=>Vo(n,"uiType"),fi=(n,r,i,l)=>((u,f,p,y)=>Br(p)&&p.uiType===Yo?((v,C,O,A)=>v.exists(R=>R!==O.owner)?zn.single(!0,ue(O)):St(A,O.name).fold(()=>{throw new Error("Unknown placeholder component: "+O.name+` +Known: [`+tn(A)+`] Namespace: `+v.getOr("none")+` -Spec: `+JSON.stringify(O,null,2))},R=>R.replace()))(u,0,p,y):zn.single(!1,ue(p)))(n,0,i,l).fold((u,f)=>{const p=Lr(i)?f(r,i.config,i.validated):f(r),y=St(p,"components").getOr([]),v=Sn(y,C=>mi(n,r,C,l));return[{...p,components:v}]},(u,f)=>{if(Lr(i)){const p=f(r,i.config,i.validated);return i.validated.preprocess.getOr(Ct)(p)}return f(r)}),La=zn.single,rc=zn.multiple,vm=ue(Yo),pi=Ei([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),Hd=Ne("factory",{sketch:Ct}),xg=Ne("schema",[]),vf=nt("name"),wg=dr("pname","pname",Gu(n=>""),Ii()),Ty=ca("schema",()=>[vn("preprocess")]),_f=Ne("defaults",ue({})),F_=Ne("overrides",ue({})),U5=ho([Hd,xg,vf,wg,_f,F_]),Z5=ho([Hd,xg,vf,_f,F_]),y4=ho([Hd,xg,vf,wg,_f,F_]),Qt=ho([Hd,Ty,vf,nt("unit"),wg,_f,F_]),gv=n=>n.fold(D.some,D.none,D.some,D.some),Xk=n=>{const r=i=>i.name;return n.fold(r,r,r,r)},$_=(n,r)=>i=>{const l=la("Converting part type",r,i);return n(l)},sl=$_(pi.required,U5),Nu=$_(pi.external,Z5),ld=$_(pi.optional,y4),H_=$_(pi.group,Qt),Jk=ue("entirety");var v4=Object.freeze({__proto__:null,required:sl,external:Nu,optional:ld,group:H_,asNamedPart:gv,name:Xk,asCommon:n=>n.fold(Ct,Ct,Ct,Ct),original:Jk});const Qk=(n,r,i,l)=>ls(r.defaults(n,i,l),i,{uid:n.partUids[r.name]},r.overrides(n,i,l)),ji=(n,r)=>{const i={};return Ht(r,l=>{gv(l).each(u=>{const f=hv(n,u.pname);i[u.name]=p=>{const y=la("Part: "+u.name+" in "+n,ho(u.schema),p);return{...f,config:p,validated:y}}})}),i},hv=(n,r)=>({uiType:vm(),owner:n,name:r}),e2=(n,r,i)=>({uiType:vm(),owner:n,name:r,config:i,validated:{}}),_4=n=>Sn(n,r=>r.fold(D.none,D.some,D.none,D.none).map(i=>Ol(i.name,i.schema.concat([_h(Jk())]))).toArray()),x4=n=>pt(n,Xk),t2=(n,r,i)=>((l,u,f)=>{const p={},y={};return Ht(f,v=>{v.fold(C=>{p[C.pname]=La(!0,(O,T,R)=>C.factory.sketch(Qk(O,C,T,R)))},C=>{const O=u.parts[C.name];y[C.name]=ue(C.factory.sketch(Qk(u,C,O[Jk()]),O))},C=>{p[C.pname]=La(!1,(O,T,R)=>C.factory.sketch(Qk(O,C,T,R)))},C=>{p[C.pname]=rc(!0,(O,T,R)=>{const F=O[C.name];return pt(F,H=>C.factory.sketch(ls(C.defaults(O,H,R),H,C.overrides(O,H))))})})}),{internals:ue(p),externals:ue(y)}})(0,r,i),o2=(n,r,i)=>((l,u,f,p)=>{const y=Zn(p,(C,O)=>((T,R)=>{let F=!1;return{name:ue(T),required:()=>R.fold((H,G)=>H,(H,G)=>H),used:()=>F,replace:()=>{if(F)throw new Error("Trying to use the same placeholder more than once: "+T);return F=!0,R}}})(O,C)),v=((C,O,T,R)=>Sn(T,F=>mi(C,O,F,R)))(l,u,f,y);return rs(y,C=>{if(C.used()===!1&&C.required())throw new Error("Placeholder: "+C.name()+` was not found in components list +Spec: `+JSON.stringify(O,null,2))},R=>R.replace()))(u,0,p,y):zn.single(!1,ue(p)))(n,0,i,l).fold((u,f)=>{const p=Br(i)?f(r,i.config,i.validated):f(r),y=St(p,"components").getOr([]),v=Sn(y,C=>fi(n,r,C,l));return[{...p,components:v}]},(u,f)=>{if(Br(i)){const p=f(r,i.config,i.validated);return i.validated.preprocess.getOr(Ct)(p)}return f(r)}),Ba=zn.single,sc=zn.multiple,ym=ue(Yo),mi=Si([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),Hd=Ne("factory",{sketch:Ct}),_g=Ne("schema",[]),yf=nt("name"),xg=dr("pname","pname",Ku(n=>""),Pi()),Ey=ca("schema",()=>[vn("preprocess")]),vf=Ne("defaults",ue({})),I_=Ne("overrides",ue({})),j5=ho([Hd,_g,yf,xg,vf,I_]),U5=ho([Hd,_g,yf,vf,I_]),bT=ho([Hd,_g,yf,xg,vf,I_]),Qt=ho([Hd,Ey,yf,nt("unit"),xg,vf,I_]),p0=n=>n.fold(D.some,D.none,D.some,D.some),Yk=n=>{const r=i=>i.name;return n.fold(r,r,r,r)},F_=(n,r)=>i=>{const l=la("Converting part type",r,i);return n(l)},nl=F_(mi.required,j5),zu=F_(mi.external,U5),id=F_(mi.optional,bT),H_=F_(mi.group,Qt),Xk=ue("entirety");var yT=Object.freeze({__proto__:null,required:nl,external:zu,optional:id,group:H_,asNamedPart:p0,name:Yk,asCommon:n=>n.fold(Ct,Ct,Ct,Ct),original:Xk});const Jk=(n,r,i,l)=>ls(r.defaults(n,i,l),i,{uid:n.partUids[r.name]},r.overrides(n,i,l)),Vi=(n,r)=>{const i={};return $t(r,l=>{p0(l).each(u=>{const f=g0(n,u.pname);i[u.name]=p=>{const y=la("Part: "+u.name+" in "+n,ho(u.schema),p);return{...f,config:p,validated:y}}})}),i},g0=(n,r)=>({uiType:ym(),owner:n,name:r}),Qk=(n,r,i)=>({uiType:ym(),owner:n,name:r,config:i,validated:{}}),vT=n=>Sn(n,r=>r.fold(D.none,D.some,D.none,D.none).map(i=>Tl(i.name,i.schema.concat([vh(Xk())]))).toArray()),_T=n=>pt(n,Yk),e2=(n,r,i)=>((l,u,f)=>{const p={},y={};return $t(f,v=>{v.fold(C=>{p[C.pname]=Ba(!0,(O,A,R)=>C.factory.sketch(Jk(O,C,A,R)))},C=>{const O=u.parts[C.name];y[C.name]=ue(C.factory.sketch(Jk(u,C,O[Xk()]),O))},C=>{p[C.pname]=Ba(!1,(O,A,R)=>C.factory.sketch(Jk(O,C,A,R)))},C=>{p[C.pname]=sc(!0,(O,A,R)=>{const F=O[C.name];return pt(F,$=>C.factory.sketch(ls(C.defaults(O,$,R),$,C.overrides(O,$))))})})}),{internals:ue(p),externals:ue(y)}})(0,r,i),t2=(n,r,i)=>((l,u,f,p)=>{const y=Zn(p,(C,O)=>((A,R)=>{let F=!1;return{name:ue(A),required:()=>R.fold(($,G)=>$,($,G)=>$),used:()=>F,replace:()=>{if(F)throw new Error("Trying to use the same placeholder more than once: "+A);return F=!0,R}}})(O,C)),v=((C,O,A,R)=>Sn(A,F=>fi(C,O,F,R)))(l,u,f,y);return rs(y,C=>{if(C.used()===!1&&C.required())throw new Error("Placeholder: "+C.name()+` was not found in components list Namespace: `+l.getOr("none")+` -Components: `+JSON.stringify(u.components,null,2))}),v})(D.some(n),r,r.components,i),As=(n,r,i)=>{const l=r.partUids[i];return n.getSystem().getByUid(l).toOptional()},Op=(n,r,i)=>As(n,r,i).getOrDie("Could not find part: "+i),w4=(n,r,i)=>{const l={},u=r.partUids,f=n.getSystem();return Ht(i,p=>{l[p]=ue(f.getByUid(u[p]))}),l},n2=(n,r)=>{const i=n.getSystem();return Zn(r.partUids,(l,u)=>ue(i.getByUid(l)))},k4=n=>tn(n.partUids),s2=(n,r,i)=>{const l={},u=r.partUids,f=n.getSystem();return Ht(i,p=>{l[p]=ue(f.getByUid(u[p]).getOrDie())}),l},C4=(n,r)=>{const i=x4(r);return Ji(pt(i,l=>({key:l,value:n+"-"+l})))},r2=n=>dr("partUids","partUids",kn(r=>C4(r.uid,n)),Ii());var W5=Object.freeze({__proto__:null,generate:ji,generateOne:e2,schemas:_4,names:x4,substitutes:t2,components:o2,defaultUids:C4,defaultUidsSchema:r2,getAllParts:n2,getAllPartNames:k4,getPart:As,getPartOrDie:Op,getParts:w4,getPartsOrDie:s2});const S4=(n,r,i,l,u)=>{const f=((p,y)=>(p.length>0?[Ol("parts",p)]:[]).concat([nt("uid"),Ne("dom",{}),Ne("components",[]),_h("originalSpec"),Ne("debug.sketcher",{})]).concat(y))(l,u);return la(n+" [SpecSchema]",Ur(f.concat(r)),i)},bv=(n,r,i,l,u)=>{const f=a2(u),p=_4(i),y=r2(i),v=S4(n,r,f,p,[y]),C=t2(0,v,i);return l(v,o2(n,v,C.internals()),f,C.externals())},a2=n=>(r=>Vo(r,"uid"))(n)?n:{...n,uid:Rc("uid")},q5=Ur([nt("name"),nt("factory"),nt("configFields"),Ne("apis",{}),Ne("extraApis",{})]),E4=Ur([nt("name"),nt("factory"),nt("configFields"),nt("partFields"),Ne("apis",{}),Ne("extraApis",{})]),cd=n=>{const r=la("Sketcher for "+n.name,q5,n),i=Zn(r.apis,oy),l=Zn(r.extraApis,(u,f)=>pl(u,f));return{name:r.name,configFields:r.configFields,sketch:u=>((f,p,y,v)=>{const C=a2(v);return y(S4(f,p,C,[],[]),C)})(r.name,r.configFields,r.factory,u),...i,...l}},gl=n=>{const r=la("Sketcher for "+n.name,E4,n),i=ji(r.name,r.partFields),l=Zn(r.apis,oy),u=Zn(r.extraApis,(f,p)=>pl(f,p));return{name:r.name,partFields:r.partFields,configFields:r.configFields,sketch:f=>bv(r.name,r.configFields,r.partFields,r.factory,f),parts:i,...l,...u}},Ay=n=>gc("input")(n)&&yr(n,"type")!=="radio"||gc("textarea")(n);var T4=Object.freeze({__proto__:null,getCurrent:(n,r,i)=>r.find(n)});const K5=[nt("find")],In=Qr({fields:K5,name:"composing",apis:T4}),A4=["input","button","textarea","select"],O4=(n,r,i)=>{(r.disabled()?yv:l2)(n,r)},i2=(n,r)=>r.useNative===!0&&Ge(A4,ni(n.element)),z4=n=>{wo(n.element,"disabled","disabled")},G5=n=>{pn(n.element,"disabled")},Oy=n=>{wo(n.element,"aria-disabled","true")},Y5=n=>{wo(n.element,"aria-disabled","false")},yv=(n,r,i)=>{r.disableClass.each(l=>{Tt(n.element,l)}),(i2(n,r)?z4:Oy)(n),r.onDisabled(n)},l2=(n,r,i)=>{r.disableClass.each(l=>{co(n.element,l)}),(i2(n,r)?G5:Y5)(n),r.onEnabled(n)},zy=(n,r)=>i2(n,r)?(i=>qc(i.element,"disabled"))(n):(i=>yr(i.element,"aria-disabled")==="true")(n);var X5=Object.freeze({__proto__:null,enable:l2,disable:yv,isDisabled:zy,onLoad:O4,set:(n,r,i,l)=>{(l?yv:l2)(n,r)}}),J5=Object.freeze({__proto__:null,exhibit:(n,r)=>ar({classes:r.disabled()?r.disableClass.toArray():[]}),events:(n,r)=>Ho([ef(di(),(i,l)=>zy(i,n)),vu(n,r,O4)])}),Q5=[xs("disabled",Fe),Ne("useNative",!0),vn("disableClass"),Dn("onDisabled"),Dn("onEnabled")];const Fo=Qr({fields:Q5,name:"disabling",active:J5,apis:X5}),N4=(n,r,i,l)=>{const u=fa(n.element,"."+r.highlightClass);Ht(u,f=>{To(l,p=>Hn(p.element,f))||(co(f,r.highlightClass),n.getSystem().getByDom(f).each(p=>{r.onDehighlight(n,p),Qo(p,Bd())}))})},Kh=(n,r,i,l)=>{N4(n,r,0,[l]),c2(n,r,i,l)||(Tt(l.element,r.highlightClass),r.onHighlight(n,l),Qo(l,ig()))},c2=(n,r,i,l)=>_n(l.element,r.highlightClass),D4=(n,r,i)=>Ys(n.element,"."+r.itemClass).bind(l=>n.getSystem().getByDom(l).toOptional()),R4=(n,r,i)=>{const l=fa(n.element,"."+r.itemClass);return(l.length>0?D.some(l[l.length-1]):D.none()).bind(u=>n.getSystem().getByDom(u).toOptional())},M4=(n,r,i,l)=>{const u=fa(n.element,"."+r.itemClass);return Fr(u,f=>_n(f,r.highlightClass)).bind(f=>{const p=am(f,l,0,u.length-1);return n.getSystem().getByDom(u[p]).toOptional()})},B4=(n,r,i)=>{const l=fa(n.element,"."+r.itemClass);return yi(pt(l,u=>n.getSystem().getByDom(u).toOptional()))};var eM=Object.freeze({__proto__:null,dehighlightAll:(n,r,i)=>N4(n,r,0,[]),dehighlight:(n,r,i,l)=>{c2(n,r,i,l)&&(co(l.element,r.highlightClass),r.onDehighlight(n,l),Qo(l,Bd()))},highlight:Kh,highlightFirst:(n,r,i)=>{D4(n,r).each(l=>{Kh(n,r,i,l)})},highlightLast:(n,r,i)=>{R4(n,r).each(l=>{Kh(n,r,i,l)})},highlightAt:(n,r,i,l)=>{((u,f,p,y)=>{const v=fa(u.element,"."+f.itemClass);return D.from(v[y]).fold(()=>un.error(new Error("No element found with index "+y)),u.getSystem().getByDom)})(n,r,0,l).fold(u=>{throw u},u=>{Kh(n,r,i,u)})},highlightBy:(n,r,i,l)=>{const u=B4(n,r);j(u,l).each(f=>{Kh(n,r,i,f)})},isHighlighted:c2,getHighlighted:(n,r,i)=>Ys(n.element,"."+r.highlightClass).bind(l=>n.getSystem().getByDom(l).toOptional()),getFirst:D4,getLast:R4,getPrevious:(n,r,i)=>M4(n,r,0,-1),getNext:(n,r,i)=>M4(n,r,0,1),getCandidates:B4}),L4=[nt("highlightClass"),nt("itemClass"),Dn("onHighlight"),Dn("onDehighlight")];const ss=Qr({fields:L4,name:"highlighting",apis:eM}),P4=[8],Du=[9],_m=[13],V_=[27],Ic=[32],j_=[37],Ny=[38],vv=[39],Dy=[40],tM=(n,r,i)=>{const l=qi(n.slice(0,r)),u=qi(n.slice(r+1));return j(l.concat(u),i)},oM=(n,r,i)=>{const l=qi(n.slice(0,r));return j(l,i)},nM=(n,r,i)=>{const l=n.slice(0,r),u=n.slice(r+1);return j(u.concat(l),i)},sM=(n,r,i)=>{const l=n.slice(r+1);return j(l,i)},jn=n=>r=>{const i=r.raw;return Ge(n,i.which)},xf=n=>r=>bi(n,i=>i(r)),xm=n=>n.raw.shiftKey===!0,rM=n=>n.raw.ctrlKey===!0,_v=bn(xm),qn=(n,r)=>({matches:n,classification:r}),I4=(n,r,i)=>{r.exists(l=>i.exists(u=>Hn(u,l)))||lo(n,ag(),{prevFocus:r,newFocus:i})},d2=()=>{const n=r=>Ar(r.element);return{get:n,set:(r,i)=>{const l=n(r);r.getSystem().triggerFocus(i,r.element);const u=n(r);I4(r,l,u)}}},aM=()=>{const n=r=>ss.getHighlighted(r).map(i=>i.element);return{get:n,set:(r,i)=>{const l=n(r);r.getSystem().getByDom(i).fold(Ke,f=>{ss.highlight(r,f)});const u=n(r);I4(r,l,u)}}};var Gh;(function(n){n.OnFocusMode="onFocus",n.OnEnterOrSpaceMode="onEnterOrSpace",n.OnApiMode="onApi"})(Gh||(Gh={}));const Yh=(n,r,i,l,u)=>{const f=(y,v,C,O,T)=>{return(R=C(y,v,O,T),F=v.event,j(R,H=>H.matches(F)).map(H=>H.classification)).bind(H=>H(y,v,O,T));var R,F},p={schema:()=>n.concat([Ne("focusManager",d2()),Wa("focusInside","onFocus",zd(y=>Ge(["onFocus","onEnterOrSpace","onApi"],y)?un.value(y):un.error("Invalid value for focusInside"))),Es("handler",p),Es("state",r),Es("sendFocusIn",u)]),processKey:f,toEvents:(y,v)=>{const C=y.focusInside!==Gh.OnFocusMode?D.none():u(y).map(T=>Xe(Qc(),(R,F)=>{T(R,y,v),F.stop()})),O=[Xe(Ws(),(T,R)=>{f(T,R,i,y,v).fold(()=>{((F,H)=>{const G=jn(Ic.concat(_m))(H.event);y.focusInside===Gh.OnEnterOrSpaceMode&&G&&Wf(F,H)&&u(y).each(J=>{J(F,y,v),H.stop()})})(T,R)},F=>{R.stop()})}),Xe(Nl(),(T,R)=>{f(T,R,l,y,v).each(F=>{R.stop()})})];return Ho(C.toArray().concat(O))}};return p},F4=n=>{const r=[vn("onEscape"),vn("onEnter"),Ne("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Ne("firstTabstop",0),Ne("useTabstopAt",Gt),vn("visibilitySelector")].concat([n]),i=(O,T)=>{const R=O.visibilitySelector.bind(F=>Fd(T,F)).getOr(T);return Ds(R)>0},l=(O,T)=>T.focusManager.get(O).bind(R=>Fd(R,T.selector)),u=(O,T,R)=>{((F,H)=>{const G=fa(F.element,H.selector),J=cn(G,ae=>i(H,ae));return D.from(J[H.firstTabstop])})(O,T).each(F=>{T.focusManager.set(O,F)})},f=(O,T,R,F)=>{const H=fa(O.element,R.selector);return l(O,R).bind(G=>Fr(H,ot(Hn,G)).bind(J=>((ae,X,Y,ne,ie)=>ie(X,Y,de=>((we,ze)=>i(we,ze)&&we.useTabstopAt(ze))(ne,de)).fold(()=>ne.cyclic?D.some(!0):D.none(),de=>(ne.focusManager.set(ae,de),D.some(!0))))(O,H,J,R,F)))},p=(O,T,R)=>{const F=R.cyclic?tM:oM;return f(O,0,R,F)},y=(O,T,R)=>{const F=R.cyclic?nM:sM;return f(O,0,R,F)},v=ue([qn(xf([xm,jn(Du)]),p),qn(jn(Du),y),qn(xf([_v,jn(_m)]),(O,T,R)=>R.onEnter.bind(F=>F(O,T)))]),C=ue([qn(jn(V_),(O,T,R)=>R.onEscape.bind(F=>F(O,T))),qn(jn(Du),(O,T,R)=>l(O,R).filter(F=>!R.useTabstopAt(F)).bind(F=>((H=>(G=>Hr(G))(H).bind(Yi).exists(G=>Hn(G,H)))(F)?p:y)(O,T,R)))]);return Yh(r,Ll.init,v,C,()=>D.some(u))};var iM=F4(ca("cyclic",Fe)),lM=F4(ca("cyclic",Gt));const xv=(n,r,i)=>Ay(i)&&jn(Ic)(r.event)?D.none():((l,u,f)=>($s(l,f,di()),D.some(!0)))(n,0,i),Xh=(n,r)=>D.some(!0),cM=[Ne("execute",xv),Ne("useSpace",!1),Ne("useEnter",!0),Ne("useControlEnter",!1),Ne("useDown",!1)],$4=(n,r,i)=>i.execute(n,r,n.element);var dM=Yh(cM,Ll.init,(n,r,i,l)=>{const u=i.useSpace&&!Ay(n.element)?Ic:[],f=i.useEnter?_m:[],p=i.useDown?Dy:[],y=u.concat(f).concat(p);return[qn(jn(y),$4)].concat(i.useControlEnter?[qn(xf([rM,jn(_m)]),$4)]:[])},(n,r,i,l)=>i.useSpace&&!Ay(n.element)?[qn(jn(Ic),Xh)]:[],()=>D.none());const H4=()=>{const n=Nn();return Jr({readState:()=>n.get().map(r=>({numRows:String(r.numRows),numColumns:String(r.numColumns)})).getOr({numRows:"?",numColumns:"?"}),setGridSize:(r,i)=>{n.set({numRows:r,numColumns:i})},getNumRows:()=>n.get().map(r=>r.numRows),getNumColumns:()=>n.get().map(r=>r.numColumns)})};var V4=Object.freeze({__proto__:null,flatgrid:H4,init:n=>n.state(n)});const j4=n=>(r,i,l,u)=>{const f=n(r.element);return U4(f,r,i,l,u)},u2=(n,r)=>{const i=sv(n,r);return j4(i)},f2=(n,r)=>{const i=sv(r,n);return j4(i)},m2=n=>(r,i,l,u)=>U4(n,r,i,l,u),U4=(n,r,i,l,u)=>l.focusManager.get(r).bind(f=>n(r.element,f,l,u)).map(f=>(l.focusManager.set(r,f),!0)),p2=m2,Z4=m2,U_=m2,W4=n=>!(r=>r.offsetWidth<=0&&r.offsetHeight<=0)(n.dom),g2=(n,r,i)=>{const l=fa(n,i);return((u,f)=>Fr(u,p=>Hn(p,r)).map(p=>({index:p,candidates:u})))(cn(l,W4))},Z_=(n,r)=>Fr(n,i=>Hn(r,i)),q4=(n,r,i,l)=>l(Math.floor(r/i),r%i).bind(u=>{const f=u.row*i+u.column;return f>=0&&fq4(n,r,l,(f,p)=>{const y=f===i-1?n.length-f*l:l,v=am(p,u,0,y-1);return D.some({row:f,column:v})}),G4=(n,r,i,l,u)=>q4(n,r,l,(f,p)=>{const y=am(f,u,0,i-1),v=y===i-1?n.length-y*l:l,C=Dc(p,0,v-1);return D.some({row:y,column:C})}),uM=[nt("selector"),Ne("execute",xv),el("onEscape"),Ne("captureTab",!1),k_()],Y4=(n,r,i)=>{Ys(n.element,r.selector).each(l=>{r.focusManager.set(n,l)})},wv=n=>(r,i,l,u)=>g2(r,i,l.selector).bind(f=>n(f.candidates,f.index,u.getNumRows().getOr(l.initSize.numRows),u.getNumColumns().getOr(l.initSize.numColumns))),h2=(n,r,i)=>i.captureTab?D.some(!0):D.none(),b2=wv((n,r,i,l)=>K4(n,r,i,l,-1)),y2=wv((n,r,i,l)=>K4(n,r,i,l,1)),fM=wv((n,r,i,l)=>G4(n,r,i,l,-1)),mM=wv((n,r,i,l)=>G4(n,r,i,l,1)),pM=ue([qn(jn(j_),u2(b2,y2)),qn(jn(vv),f2(b2,y2)),qn(jn(Ny),p2(fM)),qn(jn(Dy),Z4(mM)),qn(xf([xm,jn(Du)]),h2),qn(xf([_v,jn(Du)]),h2),qn(jn(Ic.concat(_m)),(n,r,i,l)=>((u,f)=>f.focusManager.get(u).bind(p=>Fd(p,f.selector)))(n,i).bind(u=>i.execute(n,r,u)))]),gM=ue([qn(jn(V_),(n,r,i)=>i.onEscape(n,r)),qn(jn(Ic),Xh)]);var hM=Yh(uM,H4,pM,gM,()=>D.some(Y4));const kg=(n,r,i,l,u)=>{const f=(p,y,v)=>u(p,y,l,0,v.length-1,v[y],C=>{return O=v[C],ni(O)==="button"&&yr(O,"disabled")==="disabled"?f(p,C,v):D.from(v[C]);var O});return g2(n,i,r).bind(p=>{const y=p.index,v=p.candidates;return f(y,y,v)})},X4=(n,r,i,l)=>kg(n,r,i,l,(u,f,p,y,v,C,O)=>{const T=Dc(f+p,y,v);return T===u?D.from(C):O(T)}),W_=(n,r,i,l)=>kg(n,r,i,l,(u,f,p,y,v,C,O)=>{const T=am(f,p,y,v);return T===u?D.none():O(T)}),bM=[nt("selector"),Ne("getInitial",D.none),Ne("execute",xv),el("onEscape"),Ne("executeOnMove",!1),Ne("allowVertical",!0),Ne("allowHorizontal",!0),Ne("cycles",!0)],v2=(n,r,i)=>((l,u)=>u.focusManager.get(l).bind(f=>Fd(f,u.selector)))(n,i).bind(l=>i.execute(n,r,l)),J4=(n,r,i)=>{r.getInitial(n).orThunk(()=>Ys(n.element,r.selector)).each(l=>{r.focusManager.set(n,l)})},Q4=(n,r,i)=>(i.cycles?W_:X4)(n,i.selector,r,-1),eA=(n,r,i)=>(i.cycles?W_:X4)(n,i.selector,r,1),_2=n=>(r,i,l,u)=>n(r,i,l,u).bind(()=>l.executeOnMove?v2(r,i,l):D.some(!0)),kv=ue([qn(jn(Ic),Xh),qn(jn(V_),(n,r,i)=>i.onEscape(n,r))]);var Cv=Yh(bM,Ll.init,(n,r,i,l)=>{const u=[...i.allowHorizontal?j_:[]].concat(i.allowVertical?Ny:[]),f=[...i.allowHorizontal?vv:[]].concat(i.allowVertical?Dy:[]);return[qn(jn(u),_2(u2(Q4,eA))),qn(jn(f),_2(f2(Q4,eA))),qn(jn(_m),v2),qn(jn(Ic),v2)]},kv,()=>D.some(J4));const q_=(n,r,i)=>D.from(n[r]).bind(l=>D.from(l[i]).map(u=>({rowIndex:r,columnIndex:i,cell:u}))),K_=(n,r,i,l)=>{const u=n[r].length,f=am(i,l,0,u-1);return q_(n,r,f)},tA=(n,r,i,l)=>{const u=am(i,l,0,n.length-1),f=n[u].length,p=Dc(r,0,f-1);return q_(n,u,p)},x2=(n,r,i,l)=>{const u=n[r].length,f=Dc(i+l,0,u-1);return q_(n,r,f)},w2=(n,r,i,l)=>{const u=Dc(i+l,0,n.length-1),f=n[u].length,p=Dc(r,0,f-1);return q_(n,u,p)},oA=[Ol("selectors",[nt("row"),nt("cell")]),Ne("cycles",!0),Ne("previousSelector",D.none),Ne("execute",xv)],yM=(n,r,i)=>{r.previousSelector(n).orThunk(()=>{const l=r.selectors;return Ys(n.element,l.cell)}).each(l=>{r.focusManager.set(n,l)})},G_=(n,r)=>(i,l,u)=>{const f=u.cycles?n:r;return Fd(l,u.selectors.row).bind(p=>{const y=fa(p,u.selectors.cell);return Z_(y,l).bind(v=>{const C=fa(i,u.selectors.row);return Z_(C,p).bind(O=>{const T=((R,F)=>pt(R,H=>fa(H,F.selectors.cell)))(C,u);return f(T,O,v).map(R=>R.cell)})})})},nA=G_((n,r,i)=>K_(n,r,i,-1),(n,r,i)=>x2(n,r,i,-1)),Jh=G_((n,r,i)=>K_(n,r,i,1),(n,r,i)=>x2(n,r,i,1)),Qh=G_((n,r,i)=>tA(n,i,r,-1),(n,r,i)=>w2(n,i,r,-1)),Y_=G_((n,r,i)=>tA(n,i,r,1),(n,r,i)=>w2(n,i,r,1)),Sv=ue([qn(jn(j_),u2(nA,Jh)),qn(jn(vv),f2(nA,Jh)),qn(jn(Ny),p2(Qh)),qn(jn(Dy),Z4(Y_)),qn(jn(Ic.concat(_m)),(n,r,i)=>Ar(n.element).bind(l=>i.execute(n,r,l)))]),vM=ue([qn(jn(Ic),Xh)]);var Cg=Yh(oA,Ll.init,Sv,vM,()=>D.some(yM));const wm=[nt("selector"),Ne("execute",xv),Ne("moveOnTab",!1)],X_=(n,r,i)=>i.focusManager.get(n).bind(l=>i.execute(n,r,l)),sA=(n,r,i)=>{Ys(n.element,r.selector).each(l=>{r.focusManager.set(n,l)})},rA=(n,r,i)=>W_(n,i.selector,r,-1),k2=(n,r,i)=>W_(n,i.selector,r,1),Ev=ue([qn(jn(Ny),U_(rA)),qn(jn(Dy),U_(k2)),qn(xf([xm,jn(Du)]),(n,r,i,l)=>i.moveOnTab?U_(rA)(n,r,i,l):D.none()),qn(xf([_v,jn(Du)]),(n,r,i,l)=>i.moveOnTab?U_(k2)(n,r,i,l):D.none()),qn(jn(_m),X_),qn(jn(Ic),X_)]),Tv=ue([qn(jn(Ic),Xh)]);var C2=Yh(wm,Ll.init,Ev,Tv,()=>D.some(sA));const aA=[el("onSpace"),el("onEnter"),el("onShiftEnter"),el("onLeft"),el("onRight"),el("onTab"),el("onShiftTab"),el("onUp"),el("onDown"),el("onEscape"),Ne("stopSpaceKeyup",!1),vn("focusIn")];var Av=Yh(aA,Ll.init,(n,r,i)=>[qn(jn(Ic),i.onSpace),qn(xf([_v,jn(_m)]),i.onEnter),qn(xf([xm,jn(_m)]),i.onShiftEnter),qn(xf([xm,jn(Du)]),i.onShiftTab),qn(xf([_v,jn(Du)]),i.onTab),qn(jn(Ny),i.onUp),qn(jn(Dy),i.onDown),qn(jn(j_),i.onLeft),qn(jn(vv),i.onRight),qn(jn(Ic),i.onSpace)],(n,r,i)=>[...i.stopSpaceKeyup?[qn(jn(Ic),Xh)]:[],qn(jn(V_),i.onEscape)],n=>n.focusIn);const J_=iM.schema(),_M=lM.schema(),S2=Cv.schema(),Q_=hM.schema(),Oi=Cg.schema(),xM=dM.schema(),km=C2.schema(),iA=Av.schema(),po=k({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:J_,cyclic:_M,flow:S2,flatgrid:Q_,matrix:Oi,execution:xM,menu:km,special:iA}),name:"keying",active:{events:(n,r)=>n.handler.toEvents(n,r)},apis:{focusIn:(n,r,i)=>{r.sendFocusIn(r).fold(()=>{n.getSystem().triggerFocus(n.element,n.element)},l=>{l(n,r,i)})},setGridSize:(n,r,i,l,u)=>{(f=>an(f,"setGridSize"))(i)?i.setGridSize(l,u):console.error("Layout does not support setGridSize")}},state:V4}),eb=(n,r)=>{fm(()=>{((i,l,u)=>{const f=i.components();(v=>{Ht(v.components(),C=>aa(C.element)),Rs(v.element),v.syncComponents()})(i);const p=u(l),y=mn(f,p);Ht(y,v=>{bm(v),i.getSystem().removeFromWorld(v)}),Ht(p,v=>{wy(v)?Ap(i,v):(i.getSystem().addToWorld(v),Ap(i,v),Vr(i.element)&&ym(v))}),i.syncComponents()})(n,r,()=>pt(r,n.getSystem().build))},n.element)},E2=(n,r)=>{fm(()=>{((i,l,u)=>{const f=i.components(),p=Sn(l,C=>V1(C).toArray());Ht(f,C=>{Ge(p,C)||ky(C)});const y=((C,O,T)=>S_(C,O,(R,F)=>W1(C,F,R,T)))(n.element,r,n.getSystem().buildOrPatch),v=mn(f,y);Ht(v,C=>{wy(C)&&ky(C)}),Ht(y,C=>{wy(C)||Wh(i,C)}),i.syncComponents()})(n,r)},n.element)},ex=(n,r,i,l)=>{ky(r);const u=W1(n.element,i,l,n.getSystem().buildOrPatch);Wh(n,u),n.syncComponents()},T2=(n,r,i)=>{const l=n.getSystem().build(i);uv(n,l,r)},lA=(n,r,i,l)=>{Vi(r),T2(n,(u,f)=>((p,y,v)=>{vs(p,v).fold(()=>{ai(p,y)},C=>{kl(C,y)})})(u,f,i),l)},Ov=(n,r)=>n.components(),cA=(n,r,i,l,u)=>{const f=Ov(n);return D.from(f[l]).map(p=>(u.fold(()=>Vi(p),y=>{(r.reuseDom?ex:lA)(n,p,l,y)}),p))};var A2=Object.freeze({__proto__:null,append:(n,r,i,l)=>{T2(n,ai,l)},prepend:(n,r,i,l)=>{T2(n,qu,l)},remove:(n,r,i,l)=>{const u=Ov(n);j(u,p=>Hn(l.element,p.element)).each(Vi)},replaceAt:cA,replaceBy:(n,r,i,l,u)=>{const f=Ov(n);return Fr(f,l).bind(p=>cA(n,r,0,p,u))},set:(n,r,i,l)=>(r.reuseDom?E2:eb)(n,l),contents:Ov});const So=Qr({fields:[xr("reuseDom",!0)],name:"replacing",apis:A2}),en=(n,r)=>{const i=((l,u)=>{const f=Ho(u);return Qr({fields:[nt("enabled")],name:l,active:{events:ue(f)}})})(n,r);return{key:n,value:{config:{},me:i,configAsRaw:ue({}),initialConfig:{},state:Ll}}},dA=(n,r)=>{r.ignore||(Ti(n.element),r.onFocus(n))};var uA=Object.freeze({__proto__:null,focus:dA,blur:(n,r)=>{r.ignore||Th(n.element)},isFocused:n=>wp(n.element)}),fA=Object.freeze({__proto__:null,exhibit:(n,r)=>{const i=r.ignore?{}:{attributes:{tabindex:"-1"}};return ar(i)},events:n=>Ho([Xe(Qc(),(r,i)=>{dA(r,n),i.stop()})].concat(n.stopMousedown?[Xe(at(),(r,i)=>{i.event.prevent()})]:[]))}),mA=[Dn("onFocus"),Ne("stopMousedown",!1),Ne("ignore",!1)];const Po=Qr({fields:mA,name:"focusing",active:fA,apis:uA}),zv=(n,r,i,l)=>{const u=i.get();i.set(l),((f,p,y)=>{p.toggleClass.each(v=>{y.get()?Tt(f.element,v):co(f.element,v)})})(n,r,i),((f,p,y)=>{const v=p.aria;v.update(f,v,y.get())})(n,r,i),u!==l&&r.onToggled(n,l)},dd=(n,r,i)=>{zv(n,r,i,!i.get())},tb=(n,r,i)=>{zv(n,r,i,r.selected)};var pA=Object.freeze({__proto__:null,onLoad:tb,toggle:dd,isOn:(n,r,i)=>i.get(),on:(n,r,i)=>{zv(n,r,i,!0)},off:(n,r,i)=>{zv(n,r,i,!1)},set:zv}),Ry=Object.freeze({__proto__:null,exhibit:()=>ar({}),events:(n,r)=>{const i=(l=n,u=r,f=dd,Bl(y=>{f(y,l,u)}));var l,u,f;const p=vu(n,r,tb);return Ho(Cs([n.toggleOnExecute?[i]:[],[p]]))}});const Il=(n,r,i)=>{wo(n.element,"aria-expanded",i)};var Fc=[Ne("selected",!1),vn("toggleClass"),Ne("toggleOnExecute",!0),Dn("onToggled"),Wa("aria",{mode:"none"},_r("mode",{pressed:[Ne("syncWithExpanded",!1),Es("update",(n,r,i)=>{wo(n.element,"aria-pressed",i),r.syncWithExpanded&&Il(n,0,i)})],checked:[Es("update",(n,r,i)=>{wo(n.element,"aria-checked",i)})],expanded:[Es("update",Il)],selected:[Es("update",(n,r,i)=>{wo(n.element,"aria-selected",i)})],none:[Es("update",Ke)]}))];const No=Qr({fields:Fc,name:"toggling",active:Ry,apis:pA,state:{init:()=>{const n=so(!1);return{get:()=>n.get(),set:r=>n.set(r),clear:()=>n.set(!1),readState:()=>n.get()}}}}),Vd=()=>{const n=(r,i)=>{i.stop(),Ld(r)};return[Xe(Mr(),n),Xe(Ac(),n),bu(P()),bu(at())]},My=n=>Ho(Cs([n.map(r=>Bl((i,l)=>{r(i),l.stop()})).toArray(),Vd()])),ud="alloy.item-hover",Sg="alloy.item-focus",gA="alloy.item-toggled",hA=n=>{(Ar(n.element).isNone()||Po.isFocused(n))&&(Po.isFocused(n)||Po.focus(n),lo(n,ud,{item:n}))},bA=n=>{lo(n,Sg,{item:n})},O2=ue(ud),yA=ue(Sg),tx=ue(gA),vA=n=>n.role.fold(()=>n.toggling.map(r=>r.exclusive?"menuitemradio":"menuitemcheckbox").getOr("menuitem"),Ct),wM=[nt("data"),nt("components"),nt("dom"),Ne("hasSubmenu",!1),vn("toggling"),vn("role"),Io("itemBehaviours",[No,Po,po,Be]),Ne("ignoreFocus",!1),Ne("domModification",{}),Es("builder",n=>({dom:n.dom,domModification:{...n.domModification,attributes:{role:vA(n),...n.domModification.attributes,"aria-haspopup":n.hasSubmenu,...n.hasSubmenu?{"aria-expanded":!1}:{}}},behaviours:Oo(n.itemBehaviours,[n.toggling.fold(No.revoke,r=>No.config(((i,l)=>({aria:{mode:l?"selected":"checked"},...os(i,(u,f)=>f!=="exclusive"),onToggled:(u,f)=>{ut(i.onToggled)&&i.onToggled(u,f),((p,y)=>{lo(p,gA,{item:p,state:y})})(u,f)}}))(r,n.role.exists(i=>i==="option")))),Po.config({ignore:n.ignoreFocus,stopMousedown:n.ignoreFocus,onFocus:r=>{bA(r)}}),po.config({mode:"execution"}),Be.config({store:{mode:"memory",initialValue:n.data}}),en("item-type-events",[...Vd(),Xe(io(),hA),Xe(Yf(),Po.focus)])]),components:n.components,eventOrder:n.eventOrder})),Ne("eventOrder",{})],kM=[nt("dom"),nt("components"),Es("builder",n=>({dom:n.dom,components:n.components,events:Ho([Kb(Yf())])}))],z2=ue("item-widget"),N2=ue([sl({name:"widget",overrides:n=>({behaviours:xt([Be.config({store:{mode:"manual",getValue:r=>n.data,setValue:Ke}})])})})]),_A=[nt("uid"),nt("data"),nt("components"),nt("dom"),Ne("autofocus",!1),Ne("ignoreFocus",!1),Io("widgetBehaviours",[Be,Po,po]),Ne("domModification",{}),r2(N2()),Es("builder",n=>{const r=t2(z2(),n,N2()),i=o2(z2(),n,r.internals()),l=f=>As(f,n,"widget").map(p=>(po.focusIn(p),p)),u=(f,p)=>(Ay(p.event.target)||n.autofocus&&p.setSource(f.element),D.none());return{dom:n.dom,components:i,domModification:n.domModification,events:Ho([Bl((f,p)=>{l(f).each(y=>{p.stop()})}),Xe(io(),hA),Xe(Yf(),(f,p)=>{n.autofocus?l(f):Po.focus(f)})]),behaviours:Oo(n.widgetBehaviours,[Be.config({store:{mode:"memory",initialValue:n.data}}),Po.config({ignore:n.ignoreFocus,onFocus:f=>{bA(f)}}),po.config({mode:"special",focusIn:n.autofocus?f=>{l(f)}:N(),onLeft:u,onRight:u,onEscape:(f,p)=>Po.isFocused(f)||n.autofocus?(n.autofocus&&p.setSource(f.element),D.none()):(Po.focus(f),D.some(!0))})])}})],xA=_r("type",{widget:_A,item:wM,separator:kM}),D2=ue([H_({factory:{sketch:n=>{const r=la("menu.spec item",xA,n);return r.builder(r)}},name:"items",unit:"item",defaults:(n,r)=>Vo(r,"uid")?r:{...r,uid:Rc("item")},overrides:(n,r)=>({type:r.type,ignoreFocus:n.fakeFocus,domModification:{classes:[n.markers.item]}})})]),wA=ue([Us("role"),nt("value"),nt("items"),nt("dom"),nt("components"),Ne("eventOrder",{}),Jt("menuBehaviours",[ss,Be,In,po]),Wa("movement",{mode:"menu",moveOnTab:!0},_r("mode",{grid:[k_(),Es("config",(n,r)=>({mode:"flatgrid",selector:"."+n.markers.item,initSize:{numColumns:r.initSize.numColumns,numRows:r.initSize.numRows},focusManager:n.focusManager}))],matrix:[Es("config",(n,r)=>({mode:"matrix",selectors:{row:r.rowSelector,cell:"."+n.markers.item},previousSelector:r.previousSelector,focusManager:n.focusManager})),nt("rowSelector"),Ne("previousSelector",D.none)],menu:[Ne("moveOnTab",!0),Es("config",(n,r)=>({mode:"menu",selector:"."+n.markers.item,moveOnTab:r.moveOnTab,focusManager:n.focusManager}))]})),Xr("markers",up()),Ne("fakeFocus",!1),Ne("focusManager",d2()),Dn("onHighlight"),Dn("onDehighlight"),Ne("showMenuRole",!0)]),kA=ue("alloy.menu-focus"),ob=gl({name:"Menu",configFields:wA(),partFields:D2(),factory:(n,r,i,l)=>({uid:n.uid,dom:n.dom,markers:n.markers,behaviours:Xo(n.menuBehaviours,[ss.config({highlightClass:n.markers.selectedItem,itemClass:n.markers.item,onHighlight:n.onHighlight,onDehighlight:n.onDehighlight}),Be.config({store:{mode:"memory",initialValue:n.value}}),In.config({find:D.some}),po.config(n.movement.config(n,n.movement))]),events:Ho([Xe(yA(),(u,f)=>{const p=f.event;u.getSystem().getByDom(p.target).each(y=>{ss.highlight(u,y),f.stop(),lo(u,kA(),{menu:u,item:y})})}),Xe(O2(),(u,f)=>{const p=f.event.item;ss.highlight(u,p)}),Xe(tx(),(u,f)=>{const{item:p,state:y}=f.event;y&&yr(p.element,"role")==="menuitemradio"&&((v,C)=>{const O=fa(v.element,'[role="menuitemradio"][aria-checked="true"]');Ht(O,T=>{Hn(T,C.element)||v.getSystem().getByDom(T).each(R=>{No.off(R)})})})(u,p)})]),components:r,eventOrder:n.eventOrder,...n.showMenuRole?{domModification:{attributes:{role:n.role.getOr("menu")}}}:{}})}),CA=(n,r,i,l)=>St(i,l).bind(u=>St(n,u).bind(f=>{const p=CA(n,r,i,f);return D.some([f].concat(p))})).getOr([]),SA=n=>n.type==="prepared"?D.some(n.menu):D.none(),CM=()=>{const n=so({}),r=so({}),i=so({}),l=Nn(),u=so({}),f=v=>p(v).bind(SA),p=v=>St(r.get(),v),y=v=>St(n.get(),v);return{setMenuBuilt:(v,C)=>{r.set({...r.get(),[v]:{type:"prepared",menu:C}})},setContents:(v,C,O,T)=>{l.set(v),n.set(O),r.set(C),u.set(T);const R=((F,H)=>{const G={};rs(F,(Y,ne)=>{Ht(Y,ie=>{G[ie]=ne})});const J=H,ae=Ln(H,(Y,ne)=>({k:Y,v:ne})),X=Zn(ae,(Y,ne)=>[ne].concat(CA(G,J,ae,ne)));return Zn(G,Y=>St(X,Y).getOr([Y]))})(T,O);i.set(R)},expand:v=>St(n.get(),v).map(C=>{const O=St(i.get(),v).getOr([]);return[C].concat(O)}),refresh:v=>St(i.get(),v),collapse:v=>St(i.get(),v).bind(C=>C.length>1?D.some(C.slice(1)):D.none()),lookupMenu:p,lookupItem:y,otherMenus:v=>{const C=u.get();return mn(tn(C),v)},getPrimary:()=>l.get().bind(f),getMenus:()=>r.get(),clear:()=>{n.set({}),r.set({}),i.set({}),l.clear()},isClear:()=>l.get().isNone(),getTriggeringPath:(v,C)=>{const O=cn(y(v).toArray(),T=>f(T).isSome());return St(i.get(),v).bind(T=>{const R=qi(O.concat(T));return(F=>{const H=[];for(let G=0;G((G,J,ae)=>f(G).bind(X=>(Y=>yn(n.get(),(ne,ie)=>ne===Y))(G).bind(Y=>J(Y).map(ne=>({triggeredMenu:X,triggeringItem:ne,triggeringPath:ae})))))(F,C,R.slice(0,H+1)).fold(()=>Kr(l.get(),F)?[]:[D.none()],G=>[D.some(G)])))})}}},SM=SA,fd=Xt("tiered-menu-item-highlight"),EM=Xt("tiered-menu-item-dehighlight");var Ui;(function(n){n[n.HighlightMenuAndItem=0]="HighlightMenuAndItem",n[n.HighlightJustMenu=1]="HighlightJustMenu",n[n.HighlightNone=2]="HighlightNone"})(Ui||(Ui={}));const nb=ue("collapse-item"),zp=cd({name:"TieredMenu",configFields:[fi("onExecute"),fi("onEscape"),Id("onOpenMenu"),Id("onOpenSubmenu"),Dn("onRepositionMenu"),Dn("onCollapseMenu"),Ne("highlightOnOpen",Ui.HighlightMenuAndItem),Ol("data",[nt("primary"),nt("menus"),nt("expansions")]),Ne("fakeFocus",!1),Dn("onHighlightItem"),Dn("onDehighlightItem"),Dn("onHover"),fp(),nt("dom"),Ne("navigateOnHover",!0),Ne("stayInDom",!1),Jt("tmenuBehaviours",[po,ss,In,So]),Ne("eventOrder",{})],apis:{collapseMenu:(n,r)=>{n.collapseMenu(r)},highlightPrimary:(n,r)=>{n.highlightPrimary(r)},repositionMenus:(n,r)=>{n.repositionMenus(r)}},factory:(n,r)=>{const i=Nn(),l=CM(),u=Y=>Be.getValue(Y).value,f=Y=>Zn(n.data.menus,(ne,ie)=>Sn(ne.items,de=>de.type==="separator"?[]:[de.data.value])),p=ss.highlight,y=(Y,ne)=>{p(Y,ne),ss.getHighlighted(ne).orThunk(()=>ss.getFirst(ne)).each(ie=>{n.fakeFocus?ss.highlight(ne,ie):$s(Y,ie.element,Yf())})},v=(Y,ne)=>yi(pt(ne,ie=>Y.lookupMenu(ie).bind(de=>de.type==="prepared"?D.some(de.menu):D.none()))),C=(Y,ne,ie)=>{const de=v(ne,ne.otherMenus(ie));Ht(de,we=>{Qn(we.element,[n.markers.backgroundMenu]),n.stayInDom||So.remove(Y,we)})},O=(Y,ne)=>{const ie=(de=>i.get().getOrThunk(()=>{const we={},ze=fa(de.element,`.${n.markers.item}`),tt=cn(ze,Je=>yr(Je,"aria-haspopup")==="true");return Ht(tt,Je=>{de.getSystem().getByDom(Je).each(Ze=>{const kt=u(Ze);we[kt]=Ze})}),i.set(we),we}))(Y);rs(ie,(de,we)=>{const ze=Ge(ne,we);wo(de.element,"aria-expanded",ze)})},T=(Y,ne,ie)=>D.from(ie[0]).bind(de=>ne.lookupMenu(de).bind(we=>{if(we.type==="notbuilt")return D.none();{const ze=we.menu,tt=v(ne,ie.slice(1));return Ht(tt,Je=>{Tt(Je.element,n.markers.backgroundMenu)}),Vr(ze.element)||So.append(Y,$i(ze)),Qn(ze.element,[n.markers.backgroundMenu]),y(Y,ze),C(Y,ne,ie),D.some(ze)}}));let R;(function(Y){Y[Y.HighlightSubmenu=0]="HighlightSubmenu",Y[Y.HighlightParent=1]="HighlightParent"})(R||(R={}));const F=(Y,ne,ie=R.HighlightSubmenu)=>{if(ne.hasConfigured(Fo)&&Fo.isDisabled(ne))return D.some(ne);{const de=u(ne);return l.expand(de).bind(we=>(O(Y,we),D.from(we[0]).bind(ze=>l.lookupMenu(ze).bind(tt=>{const Je=((Ze,kt,Wt)=>{if(Wt.type==="notbuilt"){const ro=Ze.getSystem().build(Wt.nbMenu());return l.setMenuBuilt(kt,ro),ro}return Wt.menu})(Y,ze,tt);return Vr(Je.element)||So.append(Y,$i(Je)),n.onOpenSubmenu(Y,ne,Je,qi(we)),ie===R.HighlightSubmenu?(ss.highlightFirst(Je),T(Y,l,we)):(ss.dehighlightAll(Je),D.some(ne))}))))}},H=(Y,ne)=>{const ie=u(ne);return l.collapse(ie).bind(de=>(O(Y,de),T(Y,l,de).map(we=>(n.onCollapseMenu(Y,ne,we),we))))},G=Y=>(ne,ie)=>Fd(ie.getSource(),`.${n.markers.item}`).bind(de=>ne.getSystem().getByDom(de).toOptional().bind(we=>Y(ne,we).map(Gt))),J=Ho([Xe(kA(),(Y,ne)=>{const ie=ne.event.item;l.lookupItem(u(ie)).each(()=>{const de=ne.event.menu;ss.highlight(Y,de);const we=u(ne.event.item);l.refresh(we).each(ze=>C(Y,l,ze))})}),Bl((Y,ne)=>{const ie=ne.event.target;Y.getSystem().getByDom(ie).each(de=>{u(de).indexOf("collapse-item")===0&&H(Y,de),F(Y,de,R.HighlightSubmenu).fold(()=>{n.onExecute(Y,de)},Ke)})}),Ss((Y,ne)=>{(ie=>{const de=((ze,tt,Je)=>Zn(Je,(Ze,kt)=>{const Wt=()=>ob.sketch({...Ze,value:kt,markers:n.markers,fakeFocus:n.fakeFocus,onHighlight:(ro,yo)=>{lo(ro,fd,{menuComp:ro,itemComp:yo})},onDehighlight:(ro,yo)=>{lo(ro,EM,{menuComp:ro,itemComp:yo})},focusManager:n.fakeFocus?aM():d2()});return kt===tt?{type:"prepared",menu:ze.getSystem().build(Wt())}:{type:"notbuilt",nbMenu:Wt}}))(ie,n.data.primary,n.data.menus),we=f();return l.setContents(n.data.primary,de,n.data.expansions,we),l.getPrimary()})(Y).each(ie=>{So.append(Y,$i(ie)),n.onOpenMenu(Y,ie),n.highlightOnOpen===Ui.HighlightMenuAndItem?y(Y,ie):n.highlightOnOpen===Ui.HighlightJustMenu&&p(Y,ie)})}),Xe(fd,(Y,ne)=>{n.onHighlightItem(Y,ne.event.menuComp,ne.event.itemComp)}),Xe(EM,(Y,ne)=>{n.onDehighlightItem(Y,ne.event.menuComp,ne.event.itemComp)}),...n.navigateOnHover?[Xe(O2(),(Y,ne)=>{const ie=ne.event.item;((de,we)=>{const ze=u(we);l.refresh(ze).bind(tt=>(O(de,tt),T(de,l,tt)))})(Y,ie),F(Y,ie,R.HighlightParent),n.onHover(Y,ie)})]:[]]),ae=Y=>ss.getHighlighted(Y).bind(ss.getHighlighted),X={collapseMenu:Y=>{ae(Y).each(ne=>{H(Y,ne)})},highlightPrimary:Y=>{l.getPrimary().each(ne=>{y(Y,ne)})},repositionMenus:Y=>{l.getPrimary().bind(ie=>ae(Y).bind(de=>{const we=u(de),ze=ra(l.getMenus()),tt=yi(pt(ze,SM));return l.getTriggeringPath(we,Je=>((Ze,kt,Wt)=>ko(kt,ro=>{if(!ro.getSystem().isConnected())return D.none();const yo=ss.getCandidates(ro);return j(yo,$o=>u($o)===Wt)}))(0,tt,Je))}).map(de=>({primary:ie,triggeringPath:de}))).fold(()=>{(ie=>D.from(ie.components()[0]).filter(de=>yr(de.element,"role")==="menu"))(Y).each(ie=>{n.onRepositionMenu(Y,ie,[])})},({primary:ie,triggeringPath:de})=>{n.onRepositionMenu(Y,ie,de)})}};return{uid:n.uid,dom:n.dom,markers:n.markers,behaviours:Xo(n.tmenuBehaviours,[po.config({mode:"special",onRight:G((Y,ne)=>Ay(ne.element)?D.none():F(Y,ne,R.HighlightSubmenu)),onLeft:G((Y,ne)=>Ay(ne.element)?D.none():H(Y,ne)),onEscape:G((Y,ne)=>H(Y,ne).orThunk(()=>n.onEscape(Y,ne).map(()=>Y))),focusIn:(Y,ne)=>{l.getPrimary().each(ie=>{$s(Y,ie.element,Yf())})}}),ss.config({highlightClass:n.markers.selectedMenu,itemClass:n.markers.menu}),In.config({find:Y=>ss.getHighlighted(Y)}),So.config({})]),eventOrder:n.eventOrder,apis:X,events:J}},extraApis:{tieredData:(n,r,i)=>({primary:n,menus:r,expansions:i}),singleData:(n,r)=>({primary:n,menus:ci(n,r),expansions:{}}),collapseItem:n=>({value:Xt(nb()),meta:{text:n}})}}),or=cd({name:"InlineView",configFields:[nt("lazySink"),Dn("onShow"),Dn("onHide"),Jl("onEscape"),Jt("inlineBehaviours",[x,Be,ol]),Zs("fireDismissalEventInstead",[Ne("event",Qu())]),Zs("fireRepositionEventInstead",[Ne("event",Md())]),Ne("getRelated",D.none),Ne("isExtraPart",Fe),Ne("eventOrder",D.none)],factory:(n,r)=>{const i=(p,y,v,C)=>{const O=n.lazySink(p).getOrDie();x.openWhileCloaked(p,y,()=>Xa.positionWithinBounds(O,p,v,C())),Be.setValue(p,D.some({mode:"position",config:v,getBounds:C}))},l=(p,y,v,C)=>{const O=((T,R,F,H,G)=>{const J=()=>T.lazySink(R),ae=H.type==="horizontal"?{layouts:{onLtr:()=>dy(),onRtl:()=>uy()}}:{},X=Y=>(ne=>ne.length===2)(Y)?ae:{};return zp.sketch({dom:{tag:"div"},data:H.data,markers:H.menu.markers,highlightOnOpen:H.menu.highlightOnOpen,fakeFocus:H.menu.fakeFocus,onEscape:()=>(x.close(R),T.onEscape.map(Y=>Y(R)),D.some(!0)),onExecute:()=>D.some(!0),onOpenMenu:(Y,ne)=>{Xa.positionWithinBounds(J().getOrDie(),ne,F,G())},onOpenSubmenu:(Y,ne,ie,de)=>{const we=J().getOrDie();Xa.position(we,ie,{anchor:{type:"submenu",item:ne,...X(de)}})},onRepositionMenu:(Y,ne,ie)=>{const de=J().getOrDie();Xa.positionWithinBounds(de,ne,F,G()),Ht(ie,we=>{const ze=X(we.triggeringPath);Xa.position(de,we.triggeredMenu,{anchor:{type:"submenu",item:we.triggeringItem,...ze}})})}})})(n,p,y,v,C);x.open(p,O),Be.setValue(p,D.some({mode:"menu",menu:O}))},u=p=>{x.isOpen(p)&&Be.getValue(p).each(y=>{switch(y.mode){case"menu":x.getState(p).each(zp.repositionMenus);break;case"position":const v=n.lazySink(p).getOrDie();Xa.positionWithinBounds(v,p,y.config,y.getBounds())}})},f={setContent:(p,y)=>{x.setContent(p,y)},showAt:(p,y,v)=>{const C=D.none;i(p,y,v,C)},showWithinBounds:i,showMenuAt:(p,y,v)=>{l(p,y,v,D.none)},showMenuWithinBounds:l,hide:p=>{x.isOpen(p)&&(Be.setValue(p,D.none()),x.close(p))},getContent:p=>x.getState(p),reposition:u,isOpen:x.isOpen};return{uid:n.uid,dom:n.dom,behaviours:Xo(n.inlineBehaviours,[x.config({isPartOf:(p,y,v)=>tl(y,v)||((C,O)=>n.getRelated(C).exists(T=>tl(T,O)))(p,v),getAttachPoint:p=>n.lazySink(p).getOrDie(),onOpen:p=>{n.onShow(p)},onClose:p=>{n.onHide(p)}}),Be.config({store:{mode:"memory",initialValue:D.none()}}),ol.config({channels:{...K({isExtraPart:r.isExtraPart,...n.fireDismissalEventInstead.map(p=>({fireEventInstead:{event:p.event}})).getOr({})}),...he({...n.fireRepositionEventInstead.map(p=>({fireEventInstead:{event:p.event}})).getOr({}),doReposition:u})}})]),eventOrder:n.eventOrder,apis:f}},apis:{showAt:(n,r,i,l)=>{n.showAt(r,i,l)},showWithinBounds:(n,r,i,l,u)=>{n.showWithinBounds(r,i,l,u)},showMenuAt:(n,r,i,l)=>{n.showMenuAt(r,i,l)},showMenuWithinBounds:(n,r,i,l,u)=>{n.showMenuWithinBounds(r,i,l,u)},hide:(n,r)=>{n.hide(r)},isOpen:(n,r)=>n.isOpen(r),getContent:(n,r)=>n.getContent(r),setContent:(n,r,i)=>{n.setContent(r,i)},reposition:(n,r)=>{n.reposition(r)}}});var jd,Nv,ox=tinymce.util.Tools.resolve("tinymce.util.Delay"),By=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),EA=tinymce.util.Tools.resolve("tinymce.EditorManager"),wf=tinymce.util.Tools.resolve("tinymce.Env");(function(n){n.default="wrap",n.floating="floating",n.sliding="sliding",n.scrolling="scrolling"})(jd||(jd={})),function(n){n.auto="auto",n.top="top",n.bottom="bottom"}(Nv||(Nv={}));const fs=n=>r=>r.options.get(n),Dv=n=>r=>D.from(n(r)),TA=n=>{const r=wf.deviceType.isPhone(),i=wf.deviceType.isTablet()||r,l=n.options.register,u=p=>te(p)||p===!1,f=p=>te(p)||Bt(p);l("skin",{processor:p=>te(p)||p===!1,default:"oxide"}),l("skin_url",{processor:"string"}),l("height",{processor:f,default:Math.max(n.getElement().offsetHeight,400)}),l("width",{processor:f,default:By.DOM.getStyle(n.getElement(),"width")}),l("min_height",{processor:"number",default:100}),l("min_width",{processor:"number"}),l("max_height",{processor:"number"}),l("max_width",{processor:"number"}),l("style_formats",{processor:"object[]"}),l("style_formats_merge",{processor:"boolean",default:!1}),l("style_formats_autohide",{processor:"boolean",default:!1}),l("line_height_formats",{processor:"string",default:"1 1.1 1.2 1.3 1.4 1.5 2"}),l("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"}),l("font_size_formats",{processor:"string",default:"8pt 10pt 12pt 14pt 18pt 24pt 36pt"}),l("font_size_input_default_unit",{processor:"string",default:"pt"}),l("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"}),l("content_langs",{processor:"object[]"}),l("removed_menuitems",{processor:"string",default:""}),l("menubar",{processor:p=>te(p)||Me(p),default:!r}),l("menu",{processor:"object",default:{}}),l("toolbar",{processor:p=>Me(p)||te(p)||$e(p)?{value:p,valid:!0}:{valid:!1,message:"Must be a boolean, string or array."},default:!0}),Cr(9,p=>{l("toolbar"+(p+1),{processor:"string"})}),l("toolbar_mode",{processor:"string",default:i?"scrolling":"floating"}),l("toolbar_groups",{processor:"object",default:{}}),l("toolbar_location",{processor:"string",default:Nv.auto}),l("toolbar_persist",{processor:"boolean",default:!1}),l("toolbar_sticky",{processor:"boolean",default:n.inline}),l("toolbar_sticky_offset",{processor:"number",default:0}),l("fixed_toolbar_container",{processor:"string",default:""}),l("fixed_toolbar_container_target",{processor:"object"}),l("ui_mode",{processor:"string",default:"combined"}),l("file_picker_callback",{processor:"function"}),l("file_picker_validator_handler",{processor:"function"}),l("file_picker_types",{processor:"string"}),l("typeahead_urls",{processor:"boolean",default:!0}),l("anchor_top",{processor:u,default:"#top"}),l("anchor_bottom",{processor:u,default:"#bottom"}),l("draggable_modal",{processor:"boolean",default:!1}),l("statusbar",{processor:"boolean",default:!0}),l("elementpath",{processor:"boolean",default:!0}),l("branding",{processor:"boolean",default:!0}),l("promotion",{processor:"boolean",default:!0}),l("resize",{processor:p=>p==="both"||Me(p),default:!wf.deviceType.isTouch()}),l("sidebar_show",{processor:"string"}),l("help_accessibility",{processor:"boolean",default:n.hasPlugin("help")}),l("default_font_stack",{processor:"string[]",default:[]})},R2=fs("readonly"),Rv=fs("height"),Mv=fs("width"),Bv=Dv(fs("min_width")),Ly=Dv(fs("min_height")),Py=Dv(fs("max_width")),nx=Dv(fs("max_height")),Iy=Dv(fs("style_formats")),sx=fs("style_formats_merge"),AA=fs("style_formats_autohide"),M2=fs("content_langs"),OA=fs("removed_menuitems"),sb=fs("toolbar_mode"),rx=fs("toolbar_groups"),Eg=fs("toolbar_location"),B2=fs("fixed_toolbar_container"),TM=fs("fixed_toolbar_container_target"),zA=fs("toolbar_persist"),L2=fs("toolbar_sticky_offset"),Np=fs("menubar"),Fy=fs("toolbar"),ax=fs("file_picker_callback"),Lv=fs("file_picker_validator_handler"),P2=fs("font_size_input_default_unit"),Pv=fs("file_picker_types"),ix=fs("typeahead_urls"),NA=fs("anchor_top"),DA=fs("anchor_bottom"),kf=fs("draggable_modal"),RA=fs("statusbar"),MA=fs("elementpath"),$c=fs("branding"),Ja=fs("resize"),BA=fs("paste_as_text"),lx=fs("sidebar_show"),LA=fs("promotion"),I2=fs("help_accessibility"),cx=fs("default_font_stack"),Tg=n=>n.options.get("skin")===!1,Iv=n=>n.options.get("menubar")!==!1,dx=n=>{const r=n.options.get("skin_url");if(Tg(n))return r;if(r)return n.documentBaseURI.toAbsolute(r);{const i=n.options.get("skin");return EA.baseURL+"/skins/ui/"+i}},ux=n=>D.from(n.options.get("skin_url")),PA=n=>n.options.get("line_height_formats").split(" "),Fv=n=>{const r=Fy(n),i=te(r),l=$e(r)&&r.length>0;return!$v(n)&&(l||i||r===!0)},fx=n=>{const r=Cr(9,l=>n.options.get("toolbar"+(l+1))),i=cn(r,te);return nn(i.length>0,i)},$v=n=>fx(n).fold(()=>{const r=Fy(n);return Rt(r,te)&&r.length>0},Gt),F2=n=>Eg(n)===Nv.bottom,$2=n=>{var r;if(!n.inline)return D.none();const i=(r=B2(n))!==null&&r!==void 0?r:"";if(i.length>0)return Ys(za(),i);const l=TM(n);return st(l)?D.some(Vt(l)):D.none()},rb=n=>n.inline&&$2(n).isSome(),mx=n=>$2(n).getOrThunk(()=>Pn(Vs(Vt(n.getElement())))),px=n=>n.inline&&!Iv(n)&&!Fv(n)&&!$v(n),Dp=n=>(n.options.get("toolbar_sticky")||n.inline)&&!rb(n)&&!px(n),Rp=n=>!rb(n)&&n.options.get("ui_mode")==="split",Ag=n=>{const r=n.options.get("menu");return Zn(r,i=>({...i,items:i.items}))};var Hv=Object.freeze({__proto__:null,get ToolbarMode(){return jd},get ToolbarLocation(){return Nv},register:TA,getSkinUrl:dx,getSkinUrlOption:ux,isReadOnly:R2,isSkinDisabled:Tg,getHeightOption:Rv,getWidthOption:Mv,getMinWidthOption:Bv,getMinHeightOption:Ly,getMaxWidthOption:Py,getMaxHeightOption:nx,getUserStyleFormats:Iy,shouldMergeStyleFormats:sx,shouldAutoHideStyleFormats:AA,getLineHeightFormats:PA,getContentLanguages:M2,getRemovedMenuItems:OA,isMenubarEnabled:Iv,isMultipleToolbars:$v,isToolbarEnabled:Fv,isToolbarPersist:zA,getMultipleToolbarsOption:fx,getUiContainer:mx,useFixedContainer:rb,isSplitUiMode:Rp,getToolbarMode:sb,isDraggableModal:kf,isDistractionFree:px,isStickyToolbar:Dp,getStickyToolbarOffset:L2,getToolbarLocation:Eg,isToolbarLocationBottom:F2,getToolbarGroups:rx,getMenus:Ag,getMenubar:Np,getToolbar:Fy,getFilePickerCallback:ax,getFilePickerTypes:Pv,useTypeaheadUrls:ix,getAnchorTop:NA,getAnchorBottom:DA,getFilePickerValidatorHandler:Lv,getFontSizeInputDefaultUnit:P2,useStatusBar:RA,useElementPath:MA,promotionEnabled:LA,useBranding:$c,getResize:Ja,getPasteAsText:BA,getSidebarShow:lx,useHelpAccessibility:I2,getDefaultFontStack:cx});const AM=["visible","hidden","clip"],IA=n=>Bi(n).length>0&&!Ge(AM,n),FA=n=>{if(_i(n)){const r=Ns(n,"overflow-x"),i=Ns(n,"overflow-y");return IA(r)||IA(i)}return!1},Og=(n,r)=>Rp(n)?((i,l)=>{const u=yg(l,FA),f=u.length===0?ki(l).map(Oa).map(p=>yg(p,FA)).getOr([]):u;return yt(f).map(p=>({element:p,others:f.slice(1),isFullscreen:()=>(y=>y.plugins.fullscreen&&y.plugins.fullscreen.isFullscreen())(i)}))})(n,r):D.none(),zg=n=>{const r=[...pt(n.others,vr),jr()];return n.isFullscreen()?jr():((i,l)=>zo(l,(u,f)=>ql(u,f),i))(vr(n.element),r)},zi=cd({name:"Button",factory:n=>{const r=My(n.action),i=n.dom.tag,l=u=>St(n.dom,"attributes").bind(f=>St(f,u));return{uid:n.uid,dom:n.dom,components:n.components,events:r,behaviours:Oo(n.buttonBehaviours,[Po.config({}),po.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:i==="button"?{type:l("type").getOr("button"),...l("role").map(u=>({role:u})).getOr({})}:{role:n.role.getOr(l("role").getOr("button"))}},eventOrder:n.eventOrder}},configFields:[Ne("uid",void 0),nt("dom"),Ne("components",[]),Io("buttonBehaviours",[Po,po]),vn("action"),vn("role"),Ne("eventOrder",{})]}),Cm=n=>{const r=$a(n),i=Yn(r),l=(p=>{const y=p.dom.attributes!==void 0?p.dom.attributes:[];return zo(y,(v,C)=>C.name==="class"?v:{...v,[C.name]:C.value},{})})(r),u=(p=>Array.prototype.slice.call(p.dom.classList,0))(r),f=i.length===0?{}:{innerHtml:ku(r)};return{tag:ni(r),classes:u,attributes:l,...f}},ns=n=>{const r=(i=>i.uid!==void 0)(n)&&an(n,"uid")?n.uid:Rc("memento");return{get:i=>i.getSystem().getByUid(r).getOrDie(),getOpt:i=>i.getSystem().getByUid(r).toOptional(),asSpec:()=>({...n,uid:r})}};var OM=Object.freeze({__proto__:null,exhibit:(n,r)=>ar({attributes:Ji([{key:r.tabAttr,value:"true"}])})}),$A=[Ne("tabAttr","data-alloy-tabstop")];const ws=Qr({fields:$A,name:"tabstopping",active:OM}),H2=Xt("tooltip.exclusive"),Vv=Xt("tooltip.show"),jv=Xt("tooltip.hide"),Uv=Xt("tooltip.immediateHide"),Zv=Xt("tooltip.immediateShow"),HA=(n,r,i)=>{n.getSystem().broadcastOn([H2],{})};var zM=Object.freeze({__proto__:null,hideAllExclusive:HA,immediateOpenClose:(n,r,i,l)=>Qo(n,l?Zv:Uv),isEnabled:(n,r,i)=>i.isEnabled(),setComponents:(n,r,i,l)=>{i.getTooltip().each(u=>{u.getSystem().isConnected()&&So.set(u,l)})},setEnabled:(n,r,i,l)=>i.setEnabled(l)}),NM=Object.freeze({__proto__:null,events:(n,r)=>{const i=f=>{r.getTooltip().each(p=>{p.getSystem().isConnected()&&(Vi(p),n.onHide(f,p),r.clearTooltip())}),r.clearTimer()},l=f=>{if(!r.isShowing()&&r.isEnabled()){HA(f);const p=n.lazySink(f).getOrDie(),y=f.getSystem().build({dom:n.tooltipDom,components:n.tooltipComponents,events:Ho(n.mode==="normal"?[Xe(io(),v=>{Qo(f,Vv)}),Xe(Uo(),v=>{Qo(f,jv)})]:[]),behaviours:xt([So.config({})])});r.setTooltip(y),bf(p,y),n.onShow(f,y),Xa.position(p,y,{anchor:n.anchor(f)})}},u=f=>{r.getTooltip().each(p=>{const y=n.lazySink(f).getOrDie();Xa.position(y,p,{anchor:n.anchor(f)})})};return Ho(Cs([[cg(f=>{n.onSetup(f)}),Xe(Vv,f=>{r.resetTimer(()=>{l(f)},n.delayForShow())}),Xe(jv,f=>{r.resetTimer(()=>{i(f)},n.delayForHide())}),Xe(Zv,f=>{r.resetTimer(()=>{l(f)},0)}),Xe(Uv,f=>{r.resetTimer(()=>{i(f)},0)}),Xe(Fi(),(f,p)=>{const y=p;y.universal||Ge(y.channels,H2)&&i(f)}),Oc(f=>{i(f)})],(()=>{switch(n.mode){case"normal":return[Xe(Wn(),f=>{Qo(f,Zv)}),Xe(Kf(),f=>{Qo(f,Uv)}),Xe(io(),f=>{Qo(f,Vv)}),Xe(Uo(),f=>{Qo(f,jv)})];case"follow-highlight":return[Xe(ig(),(f,p)=>{Qo(f,Vv)}),Xe(Bd(),f=>{Qo(f,jv)})];case"children-normal":return[Xe(Wn(),(f,p)=>{Ar(f.element).each(y=>{xi(p.event.target,"[data-mce-tooltip]")&&r.getTooltip().fold(()=>{Qo(f,Zv)},v=>{r.isShowing()&&(n.onShow(f,v),u(f))})})}),Xe(Kf(),f=>{Ar(f.element).fold(()=>{Qo(f,Uv)},Ke)}),Xe(io(),f=>{Ys(f.element,"[data-mce-tooltip]:hover").each(p=>{r.getTooltip().fold(()=>{Qo(f,Vv)},y=>{r.isShowing()&&(n.onShow(f,y),u(f))})})}),Xe(Uo(),f=>{Ys(f.element,"[data-mce-tooltip]:hover").fold(()=>{Qo(f,jv)},Ke)})];default:return[Xe(Wn(),(f,p)=>{Ar(f.element).each(y=>{xi(p.event.target,"[data-mce-tooltip]")&&r.getTooltip().fold(()=>{Qo(f,Zv)},v=>{r.isShowing()&&(n.onShow(f,v),u(f))})})}),Xe(Kf(),f=>{Ar(f.element).fold(()=>{Qo(f,Uv)},Ke)})]}})()]))}}),DM=[nt("lazySink"),nt("tooltipDom"),Ne("exclusive",!0),Ne("tooltipComponents",[]),xs("delayForShow",ue(300)),xs("delayForHide",ue(300)),xs("onSetup",Ke),zl("mode","normal",["normal","follow-highlight","children-keyboard-focus","children-normal"]),Ne("anchor",n=>({type:"hotspot",hotspot:n,layouts:{onLtr:ue([Tr,ir,mr,Br,pr,us]),onRtl:ue([Tr,ir,mr,Br,pr,us])},bubble:sc(0,-2,{})})),Dn("onHide"),Dn("onShow")],RM=Object.freeze({__proto__:null,init:()=>{const n=so(!0),r=Nn(),i=Nn(),l=()=>{r.on(clearTimeout)},u=ue("not-implemented");return Jr({getTooltip:i.get,isShowing:i.isSet,setTooltip:i.set,clearTooltip:i.clear,clearTimer:l,resetTimer:(f,p)=>{l(),r.set(setTimeout(f,p))},readState:u,isEnabled:()=>n.get(),setEnabled:f=>n.set(f)})}});const Pr=Qr({fields:DM,name:"tooltipping",active:NM,state:RM,apis:zM}),{entries:VA,setPrototypeOf:V2,isFrozen:jA,getPrototypeOf:UA,getOwnPropertyDescriptor:MM}=Object;let{freeze:ac,seal:Cf,create:ZA}=Object,{apply:j2,construct:U2}=typeof Reflect<"u"&&Reflect;j2||(j2=function(n,r,i){return n.apply(r,i)}),ac||(ac=function(n){return n}),Cf||(Cf=function(n){return n}),U2||(U2=function(n,r){return new n(...r)});const Z2=Ru(Array.prototype.forEach),BM=Ru(Array.prototype.pop),Wv=Ru(Array.prototype.push),gx=Ru(String.prototype.toLowerCase),hx=Ru(String.prototype.toString),LM=Ru(String.prototype.match),Zt=Ru(String.prototype.replace),ab=Ru(String.prototype.indexOf),PM=Ru(String.prototype.trim),md=Ru(RegExp.prototype.test),Ng=(bx=TypeError,function(){for(var n=arguments.length,r=new Array(n),i=0;i1?i-1:0),u=1;u/gm),K2=Cf(/\${[\w\W]*}/gm),VM=Cf(/^data-[\-\w.\u00B7-\uFFFF]/),jM=Cf(/^aria-[\-\w]+$/),GA=Cf(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),UM=Cf(/^(?:\w+script|data):/i),ZM=Cf(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Sm=Cf(/^html$/i);var Kv=Object.freeze({__proto__:null,MUSTACHE_EXPR:$M,ERB_EXPR:HM,TMPLIT_EXPR:K2,DATA_ATTR:VM,ARIA_ATTR:jM,IS_ALLOWED_URI:GA,IS_SCRIPT_OR_DATA:UM,ATTR_WHITESPACE:ZM,DOCTYPE_NAME:Sm});const WM=()=>typeof window>"u"?null:window;var qM=function n(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:WM();const i=Ie=>n(Ie);if(i.version="3.0.5",i.removed=[],!r||!r.document||r.document.nodeType!==9)return i.isSupported=!1,i;const l=r.document,u=l.currentScript;let{document:f}=r;const{DocumentFragment:p,HTMLTemplateElement:y,Node:v,Element:C,NodeFilter:O,NamedNodeMap:T=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:R,DOMParser:F,trustedTypes:H}=r,G=C.prototype,J=yx(G,"cloneNode"),ae=yx(G,"nextSibling"),X=yx(G,"childNodes"),Y=yx(G,"parentNode");if(typeof y=="function"){const Ie=f.createElement("template");Ie.content&&Ie.content.ownerDocument&&(f=Ie.content.ownerDocument)}let ne,ie="";const{implementation:de,createNodeIterator:we,createDocumentFragment:ze,getElementsByTagName:tt}=f,{importNode:Je}=l;let Ze={};i.isSupported=typeof VA=="function"&&typeof Y=="function"&&de&&de.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:kt,ERB_EXPR:Wt,TMPLIT_EXPR:ro,DATA_ATTR:yo,ARIA_ATTR:$o,IS_SCRIPT_OR_DATA:xn,ATTR_WHITESPACE:Ls}=Kv;let{IS_ALLOWED_URI:Xs}=Kv,on=null;const Rn=ps({},[...W2,...qv,...ib,...q2,...qA]);let Co=null;const Js=ps({},[...FM,...vx,...KA,..._x]);let ms=Object.seal(Object.create(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}})),Ni=null,Di=null,Ia=!0,Ea=!0,Wp=!1,b1=!0,Qg=!1,qp=!1,t_=!1,eh=!1,$m=!1,Bb=!1,Lb=!1,y1=!0,rk=!1,o_=!0,th=!1,Hm={},Kp=null;const n_=ps({},["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 s_=null;const Kn=ps({},["audio","video","img","source","image","track"]);let Vm=null;const Hu=ps({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pb="http://www.w3.org/1998/Math/MathML",ak="http://www.w3.org/2000/svg",Gp="http://www.w3.org/1999/xhtml";let v1=Gp,HT=!1,ik=null;const Q6=ps({},[Pb,ak,Gp],hx);let _1;const eI=["application/xhtml+xml","text/html"];let il,Ib=null;const tI=f.createElement("form"),wR=function(Ie){return Ie instanceof RegExp||Ie instanceof Function},lk=function(Ie){if(!Ib||Ib!==Ie){if(Ie&&typeof Ie=="object"||(Ie={}),Ie=$y(Ie),_1=_1=eI.indexOf(Ie.PARSER_MEDIA_TYPE)===-1?"text/html":Ie.PARSER_MEDIA_TYPE,il=_1==="application/xhtml+xml"?hx:gx,on="ALLOWED_TAGS"in Ie?ps({},Ie.ALLOWED_TAGS,il):Rn,Co="ALLOWED_ATTR"in Ie?ps({},Ie.ALLOWED_ATTR,il):Js,ik="ALLOWED_NAMESPACES"in Ie?ps({},Ie.ALLOWED_NAMESPACES,hx):Q6,Vm="ADD_URI_SAFE_ATTR"in Ie?ps($y(Hu),Ie.ADD_URI_SAFE_ATTR,il):Hu,s_="ADD_DATA_URI_TAGS"in Ie?ps($y(Kn),Ie.ADD_DATA_URI_TAGS,il):Kn,Kp="FORBID_CONTENTS"in Ie?ps({},Ie.FORBID_CONTENTS,il):n_,Ni="FORBID_TAGS"in Ie?ps({},Ie.FORBID_TAGS,il):{},Di="FORBID_ATTR"in Ie?ps({},Ie.FORBID_ATTR,il):{},Hm="USE_PROFILES"in Ie&&Ie.USE_PROFILES,Ia=Ie.ALLOW_ARIA_ATTR!==!1,Ea=Ie.ALLOW_DATA_ATTR!==!1,Wp=Ie.ALLOW_UNKNOWN_PROTOCOLS||!1,b1=Ie.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qg=Ie.SAFE_FOR_TEMPLATES||!1,qp=Ie.WHOLE_DOCUMENT||!1,$m=Ie.RETURN_DOM||!1,Bb=Ie.RETURN_DOM_FRAGMENT||!1,Lb=Ie.RETURN_TRUSTED_TYPE||!1,eh=Ie.FORCE_BODY||!1,y1=Ie.SANITIZE_DOM!==!1,rk=Ie.SANITIZE_NAMED_PROPS||!1,o_=Ie.KEEP_CONTENT!==!1,th=Ie.IN_PLACE||!1,Xs=Ie.ALLOWED_URI_REGEXP||GA,v1=Ie.NAMESPACE||Gp,ms=Ie.CUSTOM_ELEMENT_HANDLING||{},Ie.CUSTOM_ELEMENT_HANDLING&&wR(Ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ms.tagNameCheck=Ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ie.CUSTOM_ELEMENT_HANDLING&&wR(Ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ms.attributeNameCheck=Ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ie.CUSTOM_ELEMENT_HANDLING&&typeof Ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ms.allowCustomizedBuiltInElements=Ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Qg&&(Ea=!1),Bb&&($m=!0),Hm&&(on=ps({},[...qA]),Co=[],Hm.html===!0&&(ps(on,W2),ps(Co,FM)),Hm.svg===!0&&(ps(on,qv),ps(Co,vx),ps(Co,_x)),Hm.svgFilters===!0&&(ps(on,ib),ps(Co,vx),ps(Co,_x)),Hm.mathMl===!0&&(ps(on,q2),ps(Co,KA),ps(Co,_x))),Ie.ADD_TAGS&&(on===Rn&&(on=$y(on)),ps(on,Ie.ADD_TAGS,il)),Ie.ADD_ATTR&&(Co===Js&&(Co=$y(Co)),ps(Co,Ie.ADD_ATTR,il)),Ie.ADD_URI_SAFE_ATTR&&ps(Vm,Ie.ADD_URI_SAFE_ATTR,il),Ie.FORBID_CONTENTS&&(Kp===n_&&(Kp=$y(Kp)),ps(Kp,Ie.FORBID_CONTENTS,il)),o_&&(on["#text"]=!0),qp&&ps(on,["html","head","body"]),on.table&&(ps(on,["tbody"]),delete Ni.tbody),Ie.TRUSTED_TYPES_POLICY){if(typeof Ie.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ng('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ie.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ng('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=Ie.TRUSTED_TYPES_POLICY,ie=ne.createHTML("")}else ne===void 0&&(ne=function(vo,Zo){if(typeof vo!="object"||typeof vo.createPolicy!="function")return null;let Ps=null;const Or="data-tt-policy-suffix";Zo&&Zo.hasAttribute(Or)&&(Ps=Zo.getAttribute(Or));const Wr="dompurify"+(Ps?"#"+Ps:"");try{return vo.createPolicy(Wr,{createHTML:Ir=>Ir,createScriptURL:Ir=>Ir})}catch{return console.warn("TrustedTypes policy "+Wr+" could not be created."),null}}(H,u)),ne!==null&&typeof ie=="string"&&(ie=ne.createHTML(""));ac&&ac(Ie),Ib=Ie}},kR=ps({},["mi","mo","mn","ms","mtext"]),CR=ps({},["foreignobject","desc","title","annotation-xml"]),jo=ps({},["title","style","font","a","script"]),oh=ps({},qv);ps(oh,ib),ps(oh,WA);const ck=ps({},q2);ps(ck,IM);const nh=function(Ie){Wv(i.removed,{element:Ie});try{Ie.parentNode.removeChild(Ie)}catch{Ie.remove()}},x1=function(Ie,vo){try{Wv(i.removed,{attribute:vo.getAttributeNode(Ie),from:vo})}catch{Wv(i.removed,{attribute:null,from:vo})}if(vo.removeAttribute(Ie),Ie==="is"&&!Co[Ie])if($m||Bb)try{nh(vo)}catch{}else try{vo.setAttribute(Ie,"")}catch{}},VT=function(Ie){let vo,Zo;if(eh)Ie=""+Ie;else{const Wr=LM(Ie,/^[\r\n\t ]+/);Zo=Wr&&Wr[0]}_1==="application/xhtml+xml"&&v1===Gp&&(Ie=''+Ie+"");const Ps=ne?ne.createHTML(Ie):Ie;if(v1===Gp)try{vo=new F().parseFromString(Ps,_1)}catch{}if(!vo||!vo.documentElement){vo=de.createDocument(v1,"template",null);try{vo.documentElement.innerHTML=HT?ie:Ps}catch{}}const Or=vo.body||vo.documentElement;return Ie&&Zo&&Or.insertBefore(f.createTextNode(Zo),Or.childNodes[0]||null),v1===Gp?tt.call(vo,qp?"html":"body")[0]:qp?vo.documentElement:Or},jT=function(Ie){return we.call(Ie.ownerDocument||Ie,Ie,O.SHOW_ELEMENT|O.SHOW_COMMENT|O.SHOW_TEXT,null,!1)},UT=function(Ie){return typeof v=="object"?Ie instanceof v:Ie&&typeof Ie=="object"&&typeof Ie.nodeType=="number"&&typeof Ie.nodeName=="string"},tu=function(Ie,vo,Zo){Ze[Ie]&&Z2(Ze[Ie],Ps=>{Ps.call(i,vo,Zo,Ib)})},SR=function(Ie){let vo;if(tu("beforeSanitizeElements",Ie,null),(Zo=Ie)instanceof R&&(typeof Zo.nodeName!="string"||typeof Zo.textContent!="string"||typeof Zo.removeChild!="function"||!(Zo.attributes instanceof T)||typeof Zo.removeAttribute!="function"||typeof Zo.setAttribute!="function"||typeof Zo.namespaceURI!="string"||typeof Zo.insertBefore!="function"||typeof Zo.hasChildNodes!="function"))return nh(Ie),!0;var Zo;const Ps=il(Ie.nodeName);if(tu("uponSanitizeElement",Ie,{tagName:Ps,allowedTags:on}),Ie.hasChildNodes()&&!UT(Ie.firstElementChild)&&(!UT(Ie.content)||!UT(Ie.content.firstElementChild))&&md(/<[/\w]/g,Ie.innerHTML)&&md(/<[/\w]/g,Ie.textContent))return nh(Ie),!0;if(!on[Ps]||Ni[Ps]){if(!Ni[Ps]&&ER(Ps)&&(ms.tagNameCheck instanceof RegExp&&md(ms.tagNameCheck,Ps)||ms.tagNameCheck instanceof Function&&ms.tagNameCheck(Ps)))return!1;if(o_&&!Kp[Ps]){const Or=Y(Ie)||Ie.parentNode,Wr=X(Ie)||Ie.childNodes;if(Wr&&Or)for(let Ir=Wr.length-1;Ir>=0;--Ir)Or.insertBefore(J(Wr[Ir],!0),ae(Ie))}return nh(Ie),!0}return Ie instanceof C&&!function(Or){let Wr=Y(Or);Wr&&Wr.tagName||(Wr={namespaceURI:v1,tagName:"template"});const Ir=gx(Or.tagName),ma=gx(Wr.tagName);return!!ik[Or.namespaceURI]&&(Or.namespaceURI===ak?Wr.namespaceURI===Gp?Ir==="svg":Wr.namespaceURI===Pb?Ir==="svg"&&(ma==="annotation-xml"||kR[ma]):!!oh[Ir]:Or.namespaceURI===Pb?Wr.namespaceURI===Gp?Ir==="math":Wr.namespaceURI===ak?Ir==="math"&&CR[ma]:!!ck[Ir]:Or.namespaceURI===Gp?!(Wr.namespaceURI===ak&&!CR[ma])&&!(Wr.namespaceURI===Pb&&!kR[ma])&&!ck[Ir]&&(jo[Ir]||!oh[Ir]):!(_1!=="application/xhtml+xml"||!ik[Or.namespaceURI]))}(Ie)?(nh(Ie),!0):Ps!=="noscript"&&Ps!=="noembed"&&Ps!=="noframes"||!md(/<\/no(script|embed|frames)/i,Ie.innerHTML)?(Qg&&Ie.nodeType===3&&(vo=Ie.textContent,vo=Zt(vo,kt," "),vo=Zt(vo,Wt," "),vo=Zt(vo,ro," "),Ie.textContent!==vo&&(Wv(i.removed,{element:Ie.cloneNode()}),Ie.textContent=vo)),tu("afterSanitizeElements",Ie,null),!1):(nh(Ie),!0)},ZT=function(Ie,vo,Zo){if(y1&&(vo==="id"||vo==="name")&&(Zo in f||Zo in tI))return!1;if(!(Ea&&!Di[vo]&&md(yo,vo))){if(!(Ia&&md($o,vo))){if(!Co[vo]||Di[vo]){if(!(ER(Ie)&&(ms.tagNameCheck instanceof RegExp&&md(ms.tagNameCheck,Ie)||ms.tagNameCheck instanceof Function&&ms.tagNameCheck(Ie))&&(ms.attributeNameCheck instanceof RegExp&&md(ms.attributeNameCheck,vo)||ms.attributeNameCheck instanceof Function&&ms.attributeNameCheck(vo))||vo==="is"&&ms.allowCustomizedBuiltInElements&&(ms.tagNameCheck instanceof RegExp&&md(ms.tagNameCheck,Zo)||ms.tagNameCheck instanceof Function&&ms.tagNameCheck(Zo))))return!1}else if(!Vm[vo]){if(!md(Xs,Zt(Zo,Ls,""))){if((vo!=="src"&&vo!=="xlink:href"&&vo!=="href"||Ie==="script"||ab(Zo,"data:")!==0||!s_[Ie])&&!(Wp&&!md(xn,Zt(Zo,Ls,"")))){if(Zo)return!1}}}}}return!0},ER=function(Ie){return Ie.indexOf("-")>0},TR=function(Ie){let vo,Zo,Ps,Or;tu("beforeSanitizeAttributes",Ie,null);const{attributes:Wr}=Ie;if(!Wr)return;const Ir={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Co};for(Or=Wr.length;Or--;){vo=Wr[Or];const{name:ma,namespaceURI:w1}=vo;Zo=ma==="value"?vo.value:PM(vo.value);const nI=Zo;if(Ps=il(ma),Ir.attrName=Ps,Ir.attrValue=Zo,Ir.keepAttr=!0,Ir.forceKeepAttr=void 0,tu("uponSanitizeAttribute",Ie,Ir),Zo=Ir.attrValue,Ir.forceKeepAttr)continue;if(!Ir.keepAttr){x1(ma,Ie);continue}if(!b1&&md(/\/>/i,Zo)){x1(ma,Ie);continue}Qg&&(Zo=Zt(Zo,kt," "),Zo=Zt(Zo,Wt," "),Zo=Zt(Zo,ro," "));const AR=il(Ie.nodeName);if(ZT(AR,Ps,Zo)){if(!rk||Ps!=="id"&&Ps!=="name"||(x1(ma,Ie),Zo="user-content-"+Zo),ne&&typeof H=="object"&&typeof H.getAttributeType=="function"&&!w1)switch(H.getAttributeType(AR,Ps)){case"TrustedHTML":Zo=ne.createHTML(Zo);break;case"TrustedScriptURL":Zo=ne.createScriptURL(Zo)}if(Zo!==nI)try{w1?Ie.setAttributeNS(w1,ma,Zo):Ie.setAttribute(ma,Zo)}catch{x1(ma,Ie)}}else x1(ma,Ie)}tu("afterSanitizeAttributes",Ie,null)},oI=function Ie(vo){let Zo;const Ps=jT(vo);for(tu("beforeSanitizeShadowDOM",vo,null);Zo=Ps.nextNode();)tu("uponSanitizeShadowNode",Zo,null),SR(Zo)||(Zo.content instanceof p&&Ie(Zo.content),TR(Zo));tu("afterSanitizeShadowDOM",vo,null)};return i.sanitize=function(Ie){let vo,Zo,Ps,Or,Wr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(HT=!Ie,HT&&(Ie=""),typeof Ie!="string"&&!UT(Ie)){if(typeof Ie.toString!="function")throw Ng("toString is not a function");if(typeof(Ie=Ie.toString())!="string")throw Ng("dirty is not a string, aborting")}if(!i.isSupported)return Ie;if(t_||lk(Wr),i.removed=[],typeof Ie=="string"&&(th=!1),th){if(Ie.nodeName){const w1=il(Ie.nodeName);if(!on[w1]||Ni[w1])throw Ng("root node is forbidden and cannot be sanitized in-place")}}else if(Ie instanceof v)vo=VT(""),Zo=vo.ownerDocument.importNode(Ie,!0),Zo.nodeType===1&&Zo.nodeName==="BODY"||Zo.nodeName==="HTML"?vo=Zo:vo.appendChild(Zo);else{if(!$m&&!Qg&&!qp&&Ie.indexOf("<")===-1)return ne&&Lb?ne.createHTML(Ie):Ie;if(vo=VT(Ie),!vo)return $m?null:Lb?ie:""}vo&&eh&&nh(vo.firstChild);const Ir=jT(th?Ie:vo);for(;Ps=Ir.nextNode();)SR(Ps)||(Ps.content instanceof p&&oI(Ps.content),TR(Ps));if(th)return Ie;if($m){if(Bb)for(Or=ze.call(vo.ownerDocument);vo.firstChild;)Or.appendChild(vo.firstChild);else Or=vo;return(Co.shadowroot||Co.shadowrootmode)&&(Or=Je.call(l,Or,!0)),Or}let ma=qp?vo.outerHTML:vo.innerHTML;return qp&&on["!doctype"]&&vo.ownerDocument&&vo.ownerDocument.doctype&&vo.ownerDocument.doctype.name&&md(Sm,vo.ownerDocument.doctype.name)&&(ma=" -`+ma),Qg&&(ma=Zt(ma,kt," "),ma=Zt(ma,Wt," "),ma=Zt(ma,ro," ")),ne&&Lb?ne.createHTML(ma):ma},i.setConfig=function(Ie){lk(Ie),t_=!0},i.clearConfig=function(){Ib=null,t_=!1},i.isValidAttribute=function(Ie,vo,Zo){Ib||lk({});const Ps=il(Ie),Or=il(vo);return ZT(Ps,Or,Zo)},i.addHook=function(Ie,vo){typeof vo=="function"&&(Ze[Ie]=Ze[Ie]||[],Wv(Ze[Ie],vo))},i.removeHook=function(Ie){if(Ze[Ie])return BM(Ze[Ie])},i.removeHooks=function(Ie){Ze[Ie]&&(Ze[Ie]=[])},i.removeAllHooks=function(){Ze={}},i}();const YA=n=>qM().sanitize(n);var Ud=tinymce.util.Tools.resolve("tinymce.util.I18n");const KM={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},XA="temporary-placeholder",G2=n=>()=>St(n,XA).getOr("!not found!"),Dg=(n,r)=>{const i=n.toLowerCase();if(Ud.isRtl()){const l=((u,f)=>cl(u,f)?u:((p,y)=>p+y)(u,f))(i,"-rtl");return Vo(r,l)?l:i}return i},Gv=(n,r)=>St(r,Dg(n,r)),JA=(n,r)=>{const i=r();return Gv(n,i).getOrThunk(G2(i))},xx=()=>en("add-focusable",[Ss(n=>{iy(n.element,"svg").each(r=>wo(r,"focusable","false"))})]),QA=(n,r,i,l)=>{var u,f;const p=(v=>!!Ud.isRtl()&&Vo(KM,v))(r)?["tox-icon--flip"]:[],y=St(i,Dg(r,i)).or(l).getOrThunk(G2(i));return{dom:{tag:n.tag,attributes:(u=n.attributes)!==null&&u!==void 0?u:{},classes:n.classes.concat(p),innerHtml:y},behaviours:xt([...(f=n.behaviours)!==null&&f!==void 0?f:[],xx()])}},Hc=(n,r,i,l=D.none())=>QA(r,n,i(),l),GM={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},Y2=cd({name:"Notification",factory:n=>{const r=Xt("notification-text"),i=ns({dom:Cm(`

    ${YA(n.backstageProvider.translate(n.text))}

    `),behaviours:xt([So.config({})])}),l=T=>({dom:{tag:"div",classes:["tox-bar"],styles:{width:`${T}%`}}}),u=T=>({dom:{tag:"div",classes:["tox-text"],innerHtml:`${T}%`}}),f=ns({dom:{tag:"div",classes:n.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[l(0)]},u(0)],behaviours:xt([So.config({})])}),p={updateProgress:(T,R)=>{T.getSystem().isConnected()&&f.getOpt(T).each(F=>{So.set(F,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[l(R)]},u(R)])})},updateText:(T,R)=>{if(T.getSystem().isConnected()){const F=i.get(T);So.set(F,[wr(R)])}}},y=Cs([n.icon.toArray(),n.level.toArray(),n.level.bind(T=>D.from(GM[T])).toArray()]),v=ns(zi.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":n.backstageProvider.translate("Close")}},components:[Hc("close",{tag:"span",classes:["tox-icon"]},n.iconProvider)],buttonBehaviours:xt([ws.config({}),Pr.config({...n.backstageProvider.tooltips.getConfig({tooltipText:n.backstageProvider.translate("Close")})})]),action:T=>{n.onAction(T)}})),C=((T,R,F)=>{const H=F(),G=j(T,J=>Vo(H,Dg(J,H)));return QA({tag:"div",classes:["tox-notification__icon"]},G.getOr(XA),H,D.none())})(y,0,n.iconProvider),O=[C,{dom:{tag:"div",classes:["tox-notification__body"]},components:[i.asSpec()],behaviours:xt([So.config({})])}];return{uid:n.uid,dom:{tag:"div",attributes:{role:"alert","aria-labelledby":r},classes:n.level.map(T=>["tox-notification","tox-notification--in",`tox-notification--${T}`]).getOr(["tox-notification","tox-notification--in"])},behaviours:xt([ws.config({}),Po.config({}),po.config({mode:"special",onEscape:T=>(n.onAction(T),D.some(!0))})]),components:O.concat(n.progress?[f.asSpec()]:[]).concat([v.asSpec()]),apis:p}},configFields:[vn("level"),nt("progress"),vn("icon"),nt("onAction"),nt("text"),nt("iconProvider"),nt("backstageProvider")],apis:{updateProgress:(n,r,i)=>{n.updateProgress(r,i)},updateText:(n,r,i)=>{n.updateText(r,i)}}});var eO=(n,r,i,l)=>{const u=r.backstage.shared,f=()=>Vt(n.queryCommandValue("ToggleView")===""?n.getContentAreaContainer():n.getContainer()),p=()=>{const v=vr(f());return D.some(v)},y=v=>{p().each(C=>{Ht(v,O=>{Vn(O.element,"width"),Go(O.element)>C.width&&Mo(O.element,"width",C.width+"px")})})};return{open:(v,C,O)=>{const T=()=>{l.on(H=>{C();const G=O();(J=>{So.remove(J,R),F()})(H),((J,ae)=>{Yn(J.element).length===0?((X,Y)=>{or.hide(X),l.clear(),Y&&n.focus()})(J,ae):((X,Y)=>{Y&&po.focusIn(X)})(J,ae)})(H,G)})},R=Ba(Y2.sketch({text:v.text,level:Ge(["success","error","warning","warn","info"],v.type)?v.type:void 0,progress:v.progressBar===!0,icon:v.icon,onAction:T,iconProvider:u.providers.icons,backstageProvider:u.providers}));if(l.isSet()){const H=$i(R);l.on(G=>{So.append(G,H),or.reposition(G),Gs.refresh(G),y(G.components())})}else{const H=Ba(or.sketch({dom:{tag:"div",classes:["tox-notifications-container"],attributes:{"aria-label":"Notifications",role:"region"}},lazySink:u.getSink,fireDismissalEventInstead:{},...u.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}},inlineBehaviours:xt([po.config({mode:"cyclic",selector:".tox-notification, .tox-notification a, .tox-notification button"}),So.config({}),...Dp(n)&&!u.header.isPositionedAtTop()?[]:[Gs.config({contextual:{lazyContext:()=>D.some(vr(f())),fadeInClass:"tox-notification-container-dock-fadein",fadeOutClass:"tox-notification-container-dock-fadeout",transitionClass:"tox-notification-container-dock-transition"},modes:["top"],lazyViewport:X=>Og(n,X.element).map(Y=>({bounds:zg(Y),optScrollEnv:D.some({currentScrollTop:Y.element.dom.scrollTop,scrollElmTop:Ye(Y.element).top})})).getOrThunk(()=>({bounds:jr(),optScrollEnv:D.none()}))})]])})),G=$i(R),J={maxHeightFunction:kp()},ae={...u.anchors.banner(),overrides:J};l.set(H),i.add(H),or.showWithinBounds(H,G,{anchor:ae},p)}Bt(v.timeout)&&v.timeout>0&&ox.setEditorTimeout(n,()=>{T()},v.timeout);const F=()=>{l.on(H=>{or.reposition(H),Gs.refresh(H),y(H.components())})};return{close:T,reposition:F,text:H=>{Y2.updateText(R,H)},settings:v,getEl:()=>R.element.dom,progressBar:{value:H=>{Y2.updateProgress(R,H)}}}},close:v=>{v.close()},getArgs:v=>v.settings}},Yv;(function(n){n[n.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",n[n.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"})(Yv||(Yv={}));var Sf=Yv;const wx="tox-menu-nav__js",kx="tox-collection__item",tO="tox-swatch",oO={normal:wx,color:tO},nO="tox-collection__item--enabled",sO="tox-collection__item-icon",Xv="tox-collection__item-label",X2="tox-collection__item-caret",Em="tox-collection__item--active",Jv="tox-collection__item-container",Qv="tox-collection__item-container--row",Rg=n=>St(oO,n).getOr(wx),a8=n=>n==="color"?"tox-swatches":"tox-menu",J2=n=>({backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:a8(n),tieredMenu:"tox-tiered-menu"}),lb=n=>{const r=J2(n);return{backgroundMenu:r.backgroundMenu,selectedMenu:r.selectedMenu,menu:r.menu,selectedItem:r.selectedItem,item:Rg(n)}},rO=(n,r,i)=>{const l=J2(i);return{tag:"div",classes:Cs([[l.menu,`tox-menu-${r}-column`],n?[l.hasIcons]:[]])}},aO=[ob.parts.items({})],Cx=(n,r,i)=>{const l=J2(i);return{dom:{tag:"div",classes:Cs([[l.tieredMenu]])},markers:lb(i)}},YM=ue([vn("data"),Ne("inputAttributes",{}),Ne("inputStyles",{}),Ne("tag","input"),Ne("inputClasses",[]),Dn("onSetValue"),Ne("styles",{}),Ne("eventOrder",{}),Jt("inputBehaviours",[Be,Po]),Ne("selectOnFocus",!0)]),XM=n=>xt([Po.config({onFocus:n.selectOnFocus?r=>{const i=r.element,l=rf(i);i.dom.setSelectionRange(0,l.length)}:Ke})]),JM=n=>({...XM(n),...Xo(n.inputBehaviours,[Be.config({store:{mode:"manual",...n.data.map(r=>({initialValue:r})).getOr({}),getValue:r=>rf(r.element),setValue:(r,i)=>{rf(r.element)!==i&&im(r.element,i)}},onSetValue:n.onSetValue})])}),iO=n=>({tag:n.tag,attributes:{type:"text",...n.inputAttributes},styles:n.inputStyles,classes:n.inputClasses}),Mp=cd({name:"Input",configFields:YM(),factory:(n,r)=>({uid:n.uid,dom:iO(n),components:[],behaviours:JM(n),eventOrder:n.eventOrder})}),lO=Xt("refetch-trigger-event"),cO=Xt("redirect-menu-item-interaction"),dO="tox-menu__searcher",e0=n=>Ys(n.element,`.${dO}`).bind(r=>n.getSystem().getByDom(r).toOptional()),uO=e0,fO=n=>({fetchPattern:Be.getValue(n),selectionStart:n.element.dom.selectionStart,selectionEnd:n.element.dom.selectionEnd}),mO=n=>{const r=(u,f)=>(f.cut(),D.none()),i=(u,f)=>{const p={interactionEvent:f.event,eventType:f.event.raw.type};return lo(u,cO,p),D.some(!0)},l="searcher-events";return{dom:{tag:"div",classes:[kx]},components:[Mp.sketch({inputClasses:[dO,"tox-textfield"],inputAttributes:{...n.placeholder.map(u=>({placeholder:n.i18n(u)})).getOr({}),type:"search","aria-autocomplete":"list"},inputBehaviours:xt([en(l,[Xe(hu(),u=>{Qo(u,lO)}),Xe(Ws(),(u,f)=>{f.event.raw.key==="Escape"&&f.stop()})]),po.config({mode:"special",onLeft:r,onRight:r,onSpace:r,onEnter:i,onEscape:i,onUp:i,onDown:i})]),eventOrder:{keydown:[l,po.name()]}})]}},t0="tox-collection--results__js",pO=n=>{var r;return n.dom?{...n,dom:{...n.dom,attributes:{...(r=n.dom.attributes)!==null&&r!==void 0?r:{},id:Xt("aria-item-search-result-id"),"aria-selected":"false"}}}:n},Sx=(n,r)=>i=>{const l=$t(i,r);return pt(l,u=>({dom:n,components:u}))},gO=(n,r)=>{const i=[];let l=[];return Ht(n,(u,f)=>{r(u,f)?(l.length>0&&i.push(l),l=[],(Vo(u.dom,"innerHtml")||u.components&&u.components.length>0)&&l.push(u)):l.push(u)}),l.length>0&&i.push(l),pt(i,u=>({dom:{tag:"div",classes:["tox-collection__group"]},components:u}))},o0=(n,r,i)=>ob.parts.items({preprocess:l=>{const u=pt(l,i);return n!=="auto"&&n>1?Sx({tag:"div",classes:["tox-collection__group"]},n)(u):gO(u,(f,p)=>r[p].type==="separator")}}),Q2=(n,r,i=!0)=>({dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(n===1?["tox-collection--list"]:["tox-collection--grid"])},components:[o0(n,r,Ct)]}),n0=n=>To(n,r=>"icon"in r&&r.icon!==void 0),Tm=n=>(console.error(ii(n)),console.log(n),D.none()),QM=(n,r,i,l,u)=>{const f=(p=i,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[ob.parts.items({preprocess:y=>gO(y,(v,C)=>p[C].type==="separator")})]});var p;return{value:n,dom:f.dom,components:f.components,items:i}},eC=(n,r,i,l,u)=>{if(u.menuType==="color"){const f=(p=>({dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[ob.parts.items({preprocess:p!=="auto"?Sx({tag:"div",classes:["tox-swatches__row"]},p):Ct})]}]}))(l);return{value:n,dom:f.dom,components:f.components,items:i}}if(u.menuType==="normal"&&l==="auto"){const f=Q2(l,i);return{value:n,dom:f.dom,components:f.components,items:i}}if(u.menuType==="normal"||u.menuType==="searchable"){const f=u.menuType!=="searchable"?Q2(l,i):u.searchMode.searchMode==="search-with-field"?((p,y,v)=>{const C=Xt("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(p===1?["tox-collection--list"]:["tox-collection--grid"])},components:[mO({i18n:Ud.translate,placeholder:v.placeholder}),{dom:{tag:"div",classes:[...p===1?["tox-collection--list"]:["tox-collection--grid"],t0],attributes:{id:C}},components:[o0(p,y,pO)]}]}})(l,i,u.searchMode):((p,y,v=!0)=>{const C=Xt("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection",t0].concat(p===1?["tox-collection--list"]:["tox-collection--grid"]),attributes:{id:C}},components:[o0(p,y,pO)]}})(l,i);return{value:n,dom:f.dom,components:f.components,items:i}}if(u.menuType==="listpreview"&&l!=="auto"){const f=(p=>({dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[ob.parts.items({preprocess:Sx({tag:"div",classes:["tox-collection__group"]},p)})]}))(l);return{value:n,dom:f.dom,components:f.components,items:i}}return{value:n,dom:rO(r,l,u.menuType),components:aO,items:i}},oa=js("type"),tC=js("name"),oC=js("label"),Zd=js("text"),nC=js("title"),sC=js("icon"),cb=js("value"),eB=Za("fetch"),hO=Za("getSubmenuItems"),Hy=Za("onAction"),bO=Za("onItemAction"),Mg=xs("onSetup",()=>Ke),tB=Us("name"),Bg=Us("text"),oB=Us("role"),Wd=Us("icon"),s0=Us("tooltip"),rC=Us("label"),Vy=Us("shortcut"),aC=Jl("select"),Ex=xr("active",!1),i8=xr("borderless",!1),qd=xr("enabled",!0),Tx=xr("primary",!1),yO=n=>Ne("columns",n),Vc=Ne("meta",{}),iC=xs("onAction",Ke),db=n=>Si("type",n),lC=n=>dr("name","name",Gu(()=>Xt(`${n}-name`)),Zr),vO=ho([oa,Bg]),nB=ho([db("autocompleteitem"),Ex,qd,Vc,cb,Bg,Wd]),Am=[qd,s0,Wd,Bg,Mg],cC=ho([oa,Hy,Vy].concat(Am)),_O=n=>Ms("toolbarbutton",cC,n),r0=[Ex].concat(Am),Ax=ho(r0.concat([oa,Hy,Vy])),Ox=n=>Ms("ToggleButton",Ax,n),xO=[xs("predicate",Fe),zl("scope","node",["node","editor"]),zl("position","selection",["node","selection","line"])],sB=Am.concat([db("contextformbutton"),Tx,Hy,ca("original",Ct)]),rB=r0.concat([db("contextformbutton"),Tx,Hy,ca("original",Ct)]),aB=Am.concat([db("contextformbutton")]),iB=r0.concat([db("contextformtogglebutton")]),lB=_r("type",{contextformbutton:sB,contextformtogglebutton:rB}),cB=ho([db("contextform"),xs("initValue",ue("")),rC,li("commands",lB),ur("launch",_r("type",{contextformbutton:aB,contextformtogglebutton:iB}))].concat(xO)),wO=ho([db("contexttoolbar"),js("items")].concat(xO)),zx=[oa,js("src"),Us("alt"),Jn("classes",[],Zr)],dB=ho(zx),uB=[oa,Zd,tB,Jn("classes",["tox-collection__item-label"],Zr)],fB=ho(uB),kO=Yu(()=>Cc("type",{cardimage:dB,cardtext:fB,cardcontainer:jy})),jy=ho([oa,Si("direction","horizontal"),Si("align","left"),Si("valign","middle"),li("items",kO)]),ub=[qd,Bg,oB,Vy,dr("value","value",Gu(()=>Xt("menuitem-value")),Ii()),Vc],mB=ho([oa,rC,li("items",kO),Mg,iC].concat(ub)),dC=ho([oa,Ex,Wd].concat(ub)),CO=[oa,js("fancytype"),iC],SO=[Ne("initData",{})].concat(CO),EO=[Jl("select"),wa("initData",{},[xr("allowCustomColors",!0),Si("storageKey","default"),np("colors",Ii())])].concat(CO),TO=_r("fancytype",{inserttable:SO,colorswatch:EO}),AO=ho([oa,Mg,iC,Wd].concat(ub)),OO=ho([oa,hO,Mg,Wd].concat(ub)),pB=ho([oa,Wd,Ex,Mg,Hy].concat(ub)),uC=(n,r,i)=>{const l=fa(n.element,"."+i);if(l.length>0){const u=Fr(l,f=>{const p=f.dom.getBoundingClientRect().top,y=l[0].dom.getBoundingClientRect().top;return Math.abs(p-y)>r}).getOr(l.length);return D.some({numColumns:u,numRows:Math.ceil(l.length/u)})}return D.none()},a0=n=>((r,i)=>xt([en(r,i)]))(Xt("unnamed-events"),n),Nx="silver.readonly",gB=ho([Xr("readonly",ml)]),fb=(n,r)=>{const i=n.mainUi.outerContainer.element,l=[n.mainUi.mothership,...n.uiMotherships];r&&Ht(l,u=>{u.broadcastOn([A()],{target:i})}),Ht(l,u=>{u.broadcastOn([Nx],{readonly:r})})},zO=(n,r)=>{n.on("init",()=>{n.mode.isReadOnly()&&fb(r,!0)}),n.on("SwitchMode",()=>fb(r,n.mode.isReadOnly())),R2(n)&&n.mode.set("readonly")},Ca=()=>ol.config({channels:{[Nx]:{schema:gB,onReceive:(n,r)=>{Fo.set(n,r.readonly)}}}}),gi=n=>Fo.config({disabled:n}),NO=n=>Fo.config({disabled:n,disableClass:"tox-tbtn--disabled"}),Dx=n=>Fo.config({disabled:n,disableClass:"tox-tbtn--disabled",useNative:!1}),i0=(n,r)=>{const i=n.getApi(r);return l=>{l(i)}},Lg=(n,r)=>Ss(i=>{i0(n,i)(l=>{const u=n.onSetup(l);ut(u)&&r.set(u)})}),Bp=(n,r)=>Oc(i=>i0(n,i)(r.get())),DO=(n,r)=>Bl((i,l)=>{i0(n,i)(n.onAction),n.triggersSubmenu||r!==Sf.CLOSE_ON_EXECUTE||(i.getSystem().isConnected()&&Qo(i,rp()),l.stop())}),hB={[di()]:["disabling","alloy.base.behaviour","toggling","item-events"]},Uy=yi,Zy=(n,r,i,l)=>{const u=so(Ke);return{type:"item",dom:r.dom,components:Uy(r.optComponents),data:n.data,eventOrder:hB,hasSubmenu:n.triggersSubmenu,itemBehaviours:xt([en("item-events",[DO(n,i),Lg(n,u),Bp(n,u)]),(f=()=>!n.enabled||l.isDisabled(),Fo.config({disabled:f,disableClass:"tox-collection__item--state-disabled"})),Ca(),So.config({})].concat(n.itemBehaviours))};var f},Wy=n=>({value:n.value,meta:{text:n.text.getOr(""),...n.meta}}),Rx=n=>{const r=wf.os.isMacOS()||wf.os.isiOS(),i=r?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"},l=n.split("+"),u=pt(l,f=>{const p=f.toLowerCase().trim();return Vo(i,p)?i[p]:f});return r?u.join(""):u.join("+")},fC=(n,r,i=[sO])=>Hc(n,{tag:"div",classes:i},r),RO=n=>({dom:{tag:"div",classes:[Xv]},components:[wr(Ud.translate(n))]}),mC=(n,r)=>({dom:{tag:"div",classes:r,innerHtml:n}}),MO=(n,r)=>({dom:{tag:"div",classes:[Xv]},components:[{dom:{tag:n.tag,styles:n.styles},components:[wr(Ud.translate(r))]}]}),BO=n=>({dom:{tag:"div",classes:["tox-collection__item-accessory"]},components:[wr(Rx(n))]}),LO=n=>fC("checkmark",n,["tox-collection__item-checkmark"]),PO=n=>{const r=n.map(i=>({attributes:{id:Xt("menu-item"),"aria-label":Ud.translate(i)}})).getOr({});return{tag:"div",classes:[wx,kx],...r}},l0=(n,r,i,l=D.none())=>n.presets==="color"?((u,f,p)=>{const y=u.value,v=u.iconContent.map(O=>((T,R,F)=>{const H=R();return Gv(T,H).or(F).getOrThunk(G2(H))})(O,f.icons,p)),C=u.ariaLabel.map(O=>({"aria-label":f.translate(O),"data-mce-name":O})).getOr({});return{dom:(()=>{const O=tO,T=v.getOr(""),R={tag:"div",attributes:C,classes:[O]};return y==="custom"?{...R,tag:"button",classes:[...R.classes,"tox-swatches__picker-btn"],innerHtml:T}:y==="remove"?{...R,classes:[...R.classes,"tox-swatch--remove"],innerHtml:T}:st(y)?{...R,attributes:{...R.attributes,"data-mce-color":y},styles:{"background-color":y},innerHtml:T}:R})(),optComponents:[]}})(n,r,l):((u,f,p,y)=>{const v={tag:"div",classes:[sO]},C=p?u.iconContent.map(F=>Hc(F,v,f.icons,y)).orThunk(()=>D.some({dom:v})):D.none(),O=u.checkMark,T=D.from(u.meta).fold(()=>RO,F=>Vo(F,"style")?ot(MO,F.style):RO),R=u.htmlContent.fold(()=>u.textContent.map(T),F=>D.some(mC(F,[Xv])));return{dom:PO(u.ariaLabel),optComponents:[C,R,u.shortcutContent.map(BO),O,u.caret]}})(n,r,i,l),IO=(n,r,i)=>St(n,"tooltipWorker").map(l=>[Pr.config({lazySink:r.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:u=>({type:"submenu",item:u,overrides:{maxHeightFunction:kp}}),mode:"follow-highlight",onShow:(u,f)=>{l(p=>{Pr.setComponents(u,[af({element:Vt(p)})])})}})]).getOrThunk(()=>i.map(l=>[Pr.config({...r.providers.tooltips.getConfig({tooltipText:l}),mode:"follow-highlight"})]).getOr([])),pC=(n,r)=>{const i=(l=>By.DOM.encode(l))(Ud.translate(n));if(r.length>0){const l=new RegExp((u=>u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(r),"gi");return i.replace(l,u=>`${u}`)}return i},gC=(n,r)=>pt(n,i=>{switch(i.type){case"cardcontainer":return((f,p)=>{const y=f.direction==="vertical"?"tox-collection__item-container--column":Qv,v=f.align==="left"?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right";return{dom:{tag:"div",classes:[Jv,y,v,(()=>{switch(f.valign){case"top":return"tox-collection__item-container--valign-top";case"middle":return"tox-collection__item-container--valign-middle";case"bottom":return"tox-collection__item-container--valign-bottom"}})()]},components:p}})(i,gC(i.items,r));case"cardimage":return((f,p,y)=>({dom:{tag:"img",classes:p,attributes:{src:f,alt:y.getOr("")}}}))(i.src,i.classes,i.alt);case"cardtext":const l=i.name.exists(f=>Ge(r.cardText.highlightOn,f)),u=l?D.from(r.cardText.matchText).getOr(""):"";return mC(pC(i.text,u),i.classes)}}),Lp=ji(z2(),N2()),hC=n=>({value:mb(n)}),bC=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,yC=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,FO=n=>bC.test(n)||yC.test(n),mb=n=>as(n,"#").toUpperCase(),vC=n=>{const r=n.toString(16);return(r.length===1?"0"+r:r).toUpperCase()},c0=n=>{const r=vC(n.red)+vC(n.green)+vC(n.blue);return hC(r)},_C=Math.min,$O=Math.max,Mx=Math.round,bB=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,HO=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,Pp=(n,r,i,l)=>({red:n,green:r,blue:i,alpha:l}),d0=n=>{const r=parseInt(n,10);return r.toString()===n&&r>=0&&r<=255},VO=n=>{let r,i,l;const u=(n.hue||0)%360;let f=n.saturation/100,p=n.value/100;if(f=$O(0,_C(f,1)),p=$O(0,_C(p,1)),f===0)return r=i=l=Mx(255*p),Pp(r,i,l,1);const y=u/60,v=p*f,C=v*(1-Math.abs(y%2-1)),O=p-v;switch(Math.floor(y)){case 0:r=v,i=C,l=0;break;case 1:r=C,i=v,l=0;break;case 2:r=0,i=v,l=C;break;case 3:r=0,i=C,l=v;break;case 4:r=C,i=0,l=v;break;case 5:r=v,i=0,l=C;break;default:r=i=l=0}return r=Mx(255*(r+O)),i=Mx(255*(i+O)),l=Mx(255*(l+O)),Pp(r,i,l,1)},Mu=n=>{const r=(f=>{const p=(v=>({value:v.value.replace(bC,(O,T,R,F)=>T+T+R+R+F+F)}))(f),y=yC.exec(p.value);return y===null?["FFFFFF","FF","FF","FF"]:y})(n),i=parseInt(r[1],16),l=parseInt(r[2],16),u=parseInt(r[3],16);return Pp(i,l,u,1)},xC=(n,r,i,l)=>{const u=parseInt(n,10),f=parseInt(r,10),p=parseInt(i,10),y=parseFloat(l);return Pp(u,f,p,y)},Bx=n=>{const r=bB.exec(n);if(r!==null)return D.some(xC(r[1],r[2],r[3],"1"));const i=HO.exec(n);return i!==null?D.some(xC(i[1],i[2],i[3],i[4])):D.none()},jO=n=>`rgba(${n.red},${n.green},${n.blue},${n.alpha})`,UO=Pp(255,0,0,1),pb=(n,r)=>{n.dispatch("ResizeContent",r)},qy=(n,r)=>{n.dispatch("TextColorChange",r)},ZO=(n,r)=>n.dispatch("ResolveName",{name:r.nodeName.toLowerCase(),target:r}),Ky=(n,r)=>()=>{n(),r()},Sa=n=>gb(n,"NodeChange",r=>{r.setEnabled(n.selection.isEditable())}),Ef=(n,r)=>i=>{const l=Sa(n)(i),u=((f,p)=>y=>{const v=Sl(),C=()=>{y.setActive(f.formatter.match(p));const O=f.formatter.formatChanged(p,y.setActive);v.set(O)};return f.initialized?C():f.once("init",C),()=>{f.off("init",C),v.clear()}})(n,r)(i);return()=>{l(),u()}},gb=(n,r,i)=>l=>{const u=()=>i(l),f=()=>{i(l),n.on(r,u)};return n.initialized?f():n.once("init",f),()=>{n.off("init",f),n.off(r,u)}},WO=n=>r=>()=>{n.undoManager.transact(()=>{n.focus(),n.execCommand("mceToggleFormat",!1,r.format)})},ic=(n,r)=>()=>n.execCommand(r);var jc=tinymce.util.Tools.resolve("tinymce.util.LocalStorage");const Lx={},qO=n=>St(Lx,n).getOrThunk(()=>{const r=`tinymce-custom-colors-${n}`,i=jc.getItem(r);if(mo(i)){const u=jc.getItem("tinymce-custom-colors");jc.setItem(r,st(u)?u:"[]")}const l=((u,f=10)=>{const p=jc.getItem(u),y=te(p)?JSON.parse(p):[],v=f-(C=y).length<0?C.slice(0,f):C;var C;const O=T=>{v.splice(T,1)};return{add:T=>{((R,F)=>{const H=qo(R,F);return H===-1?D.none():D.some(H)})(v,T).each(O),v.unshift(T),v.length>f&&v.pop(),jc.setItem(u,JSON.stringify(v))},state:()=>v.slice(0)}})(r,10);return Lx[n]=l,l}),wC=(n,r)=>{qO(n).add(r)},Gy=(n,r,i)=>({hue:n,saturation:r,value:i}),Px=n=>{let r=0,i=0,l=0;const u=n.red/255,f=n.green/255,p=n.blue/255,y=Math.min(u,Math.min(f,p)),v=Math.max(u,Math.max(f,p));return y===v?(l=y,Gy(0,0,100*l)):(r=u===y?3:p===y?1:5,r=60*(r-(u===y?f-p:p===y?u-f:p-u)/(v-y)),i=(v-y)/v,l=v,Gy(Math.round(r),Math.round(100*i),Math.round(100*l)))},Ix=n=>c0(VO(n)),KO=n=>{return(r=n,FO(r)?D.some({value:mb(r)}):D.none()).orThunk(()=>Bx(n).map(c0)).getOrThunk(()=>{const i=document.createElement("canvas");i.height=1,i.width=1;const l=i.getContext("2d");l.clearRect(0,0,i.width,i.height),l.fillStyle="#FFFFFF",l.fillStyle=n,l.fillRect(0,0,1,1);const u=l.getImageData(0,0,1,1).data,f=u[0],p=u[1],y=u[2],v=u[3];return c0(Pp(f,p,y,v))});var r},kC="forecolor",CC="hilitecolor",yB=n=>{const r=[];for(let i=0;ir=>r.options.get(n),u0="#000000",hb=(n,r)=>r===kC&&n.options.isSet("color_map_foreground")?Kd("color_map_foreground")(n):r===CC&&n.options.isSet("color_map_background")?Kd("color_map_background")(n):Kd("color_map")(n),Fx=(n,r="default")=>Math.max(5,Math.ceil(Math.sqrt(hb(n,r).length))),GO=(n,r)=>{const i=Kd("color_cols")(n),l=Fx(n,r);return i===Fx(n)?l:i},SC=(n,r="default")=>Math.round(r===kC?Kd("color_cols_foreground")(n):r===CC?Kd("color_cols_background")(n):Kd("color_cols")(n)),EC=Kd("custom_colors"),YO=Kd("color_default_foreground"),XO=Kd("color_default_background"),JO=(n,r)=>{const i=Vt(n.selection.getStart()),l=r==="hilitecolor"?Jc(i,u=>{if(ys(u)){const f=Ns(u,"background-color");return nn(Bx(f).exists(p=>p.alpha!==0),f)}return D.none()}).getOr("rgba(0, 0, 0, 0)"):Ns(i,"color");return Bx(l).map(u=>"#"+c0(u).value)},$x=n=>{const r="choiceitem",i={type:r,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return n?[i,{type:r,text:"Custom color",icon:"color-picker",value:"custom"}]:[i]},TC=(n,r,i,l)=>{i==="custom"?t3(n)(u=>{u.each(f=>{wC(r,f),n.execCommand("mceApplyTextcolor",r,f),l(f)})},JO(n,r).getOr(u0)):i==="remove"?(l(""),n.execCommand("mceRemoveTextcolor",r)):(l(i),n.execCommand("mceApplyTextcolor",r,i))},AC=(n,r,i)=>n.concat((l=>pt(qO(l).state(),u=>({type:"choiceitem",text:u,icon:"checkmark",value:u})))(r).concat($x(i))),QO=(n,r,i)=>l=>{l(AC(n,r,i))},OC=(n,r,i)=>{const l=r==="forecolor"?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";n.setIconFill(l,i)},zC=(n,r)=>{n.setTooltip(r)},e3=(n,r)=>i=>{const l=JO(n,r);return Kr(l,i.toUpperCase())},NC=(n,r,i)=>{if(vl(i))return r==="forecolor"?"Text color":"Background color";const l=r==="forecolor"?"Text color {0}":"Background color {0}",u=AC(hb(n,r),r,!1),f=j(u,p=>p.value===i).getOr({text:""}).text;return n.translate([l,n.translate(f)])},DC=(n,r,i,l)=>{n.ui.registry.addSplitButton(r,{tooltip:NC(n,i,l.get()),presets:"color",icon:r==="forecolor"?"text-color":"highlight-bg-color",select:e3(n,i),columns:SC(n,i),fetch:QO(hb(n,i),i,EC(n)),onAction:u=>{TC(n,i,l.get(),Ke)},onItemAction:(u,f)=>{TC(n,i,f,p=>{l.set(p),qy(n,{name:r,color:p})})},onSetup:u=>{OC(u,r,l.get());const f=p=>{p.name===r&&(OC(u,p.name,p.color),zC(u,NC(n,i,p.color)))};return n.on("TextColorChange",f),Ky(Sa(n)(u),()=>{n.off("TextColorChange",f)})}})},Yy=(n,r,i,l,u)=>{n.ui.registry.addNestedMenuItem(r,{text:l,icon:r==="forecolor"?"text-color":"highlight-bg-color",onSetup:f=>(zC(f,NC(n,i,u.get())),OC(f,r,u.get()),Sa(n)(f)),getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"colorswatch",select:e3(n,i),initData:{storageKey:i},onAction:f=>{TC(n,i,f.value,p=>{u.set(p),qy(n,{name:r,color:p})})}}]})},t3=n=>(r,i)=>{let l=!1;const u={colorpicker:i};n.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:u,onAction:(f,p)=>{p.name==="hex-valid"&&(l=p.value)},onSubmit:f=>{const p=f.getData().colorpicker;l?(r(D.from(p)),f.close()):n.windowManager.alert(n.translate(["Invalid hex color code: {0}",p]))},onClose:Ke,onCancel:()=>{r(D.none())}})},bb=(n,r,i,l,u,f,p,y)=>{const v=n0(r),C=RC(r,i,l,u!=="color"?"normal":"color",f,p,y);return eC(n,v,C,l,{menuType:u})},RC=(n,r,i,l,u,f,p)=>yi(pt(n,y=>{return y.type==="choiceitem"?(v=y,Ms("choicemenuitem",dC,v)).fold(Tm,C=>D.some(((O,T,R,F,H,G,J,ae=!0)=>{const X=l0({presets:R,textContent:T?O.text:D.none(),htmlContent:D.none(),ariaLabel:O.text,iconContent:O.icon,shortcutContent:T?O.shortcut:D.none(),checkMark:T?D.some(LO(J.icons)):D.none(),caret:D.none(),value:O.value},J,ae),Y=O.text.filter(ue(!T)).map(ne=>Pr.config(J.tooltips.getConfig({tooltipText:J.translate(ne)})));return ls(Zy({data:Wy(O),enabled:O.enabled,getApi:ne=>({setActive:ie=>{No.set(ne,ie)},isActive:()=>No.isOn(ne),isEnabled:()=>!Fo.isDisabled(ne),setEnabled:ie=>Fo.set(ne,!ie)}),onAction:ne=>F(O.value),onSetup:ne=>(ne.setActive(H),Ke),triggersSubmenu:!1,itemBehaviours:[...Y.toArray()]},X,G,J),{toggling:{toggleClass:nO,toggleOnExecute:!1,selected:O.active,exclusive:!0}})})(C,i===1,l,r,f(C.value),u,p,n0(n)))):D.none();var v})),f0=(n,r)=>{const i=lb(r);return n===1?{mode:"menu",moveOnTab:!0}:n==="auto"?{mode:"grid",selector:"."+i.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+(r==="color"?"tox-swatches__row":"tox-collection__group"),previousSelector:l=>r==="color"?Ys(l.element,"[aria-checked=true]"):D.none()}},MC=Xt("cell-over"),o3=Xt("cell-execute"),vB=(n,r,i)=>{const l=f=>lo(f,o3,{row:n,col:r}),u=(f,p)=>{p.stop(),l(f)};return Ba({dom:{tag:"div",attributes:{role:"button","aria-label":i}},behaviours:xt([en("insert-table-picker-cell",[Xe(io(),Po.focus),Xe(di(),l),Xe(Mr(),u),Xe(Ac(),u)]),No.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Po.config({onFocus:f=>lo(f,MC,{row:n,col:r})})])})},n3=n=>Sn(n,r=>pt(r,$i)),s3=(n,r)=>wr(`${r}x${n}`),r3={inserttable:(n,r)=>{const i=(p=>(y,v)=>p.shared.providers.translate(["{0} columns, {1} rows",v,y]))(r),l=((p,y,v)=>{const C=[];for(let O=0;O<10;O++){const T=[];for(let R=0;R<10;R++){const F=p(O+1,R+1);T.push(vB(O,R,F))}C.push(T)}return C})(i),u=s3(0,0),f=ns({dom:{tag:"span",classes:["tox-insert-table-picker__label"]},components:[u],behaviours:xt([So.config({})])});return{type:"widget",data:{value:Xt("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Lp.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:n3(l).concat(f.asSpec()),behaviours:xt([en("insert-table-picker",[Ss(p=>{So.set(f.get(p),[u])}),tf(MC,(p,y,v)=>{const{row:C,col:O}=v.event;((T,R,F,H,G)=>{for(let J=0;J<10;J++)for(let ae=0;ae<10;ae++)No.set(T[J][ae],J<=R&&ae<=F)})(l,C,O),So.set(f.get(p),[s3(C+1,O+1)])}),tf(o3,(p,y,v)=>{const{row:C,col:O}=v.event;Qo(p,rp()),n.onAction({numRows:C+1,numColumns:O+1})})]),po.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:(n,r)=>{const i=((p,y)=>{const v=p.initData.allowCustomColors&&y.colorinput.hasCustomColors();return p.initData.colors.fold(()=>AC(y.colorinput.getColors(p.initData.storageKey),p.initData.storageKey,v),C=>C.concat($x(v)))})(n,r),l=r.colorinput.getColorCols(n.initData.storageKey),u="color",f={...bb(Xt("menu-value"),i,p=>{n.onAction({value:p})},l,u,Sf.CLOSE_ON_EXECUTE,n.select.getOr(Fe),r.shared.providers),markers:lb(u),movement:f0(l,u),showMenuRole:!1};return{type:"widget",data:{value:Xt("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Lp.widget(ob.sketch(f))]}}},a3=n=>({type:"separator",dom:{tag:"div",classes:[kx,"tox-collection__group-heading"]},components:n.text.map(wr).toArray()});var _B=Object.freeze({__proto__:null,getCoupled:(n,r,i,l)=>i.getOrCreate(n,r,l),getExistingCoupled:(n,r,i,l)=>i.getExisting(n,r,l)}),i3=[Xr("others",Xu(un.value,Ii()))],Hx=Object.freeze({__proto__:null,init:()=>{const n={},r=(l,u)=>{if(tn(l.others).length===0)throw new Error("Cannot find any known coupled components");return St(n,u)},i=ue({});return Jr({readState:i,getExisting:(l,u,f)=>r(u,f).orThunk(()=>(St(u.others,f).getOrDie("No information found for coupled component: "+f),D.none())),getOrCreate:(l,u,f)=>r(u,f).getOrThunk(()=>{const p=St(u.others,f).getOrDie("No information found for coupled component: "+f)(l),y=l.getSystem().build(p);return n[f]=y,y})})}});const kr=Qr({fields:i3,name:"coupling",apis:_B,state:Hx}),m0=n=>{let r=D.none(),i=[];const l=p=>{u()?f(p):i.push(p)},u=()=>r.isSome(),f=p=>{r.each(y=>{setTimeout(()=>{p(y)},0)})};return n(p=>{u()||(r=D.some(p),Ht(i,f),i=[])}),{get:l,map:p=>m0(y=>{l(v=>{y(p(v))})}),isReady:u}},xB={nu:m0,pure:n=>m0(r=>{r(n)})},wB=n=>{setTimeout(()=>{throw n},0)},Xy=n=>{const r=i=>{n().then(i,wB)};return{map:i=>Xy(()=>n().then(i)),bind:i=>Xy(()=>n().then(l=>i(l).toPromise())),anonBind:i=>Xy(()=>n().then(()=>i.toPromise())),toLazy:()=>xB.nu(r),toCached:()=>{let i=null;return Xy(()=>(i===null&&(i=n()),i))},toPromise:n,get:r}},Pg=n=>Xy(()=>new Promise(n)),Om=n=>Xy(()=>Promise.resolve(n)),BC=ue("sink"),l3=ue(ld({name:BC(),overrides:ue({dom:{tag:"div"},behaviours:xt([Xa.config({useFixed:Gt})]),events:Ho([bu(Ws()),bu(at()),bu(Mr())])})})),c3=(n,r)=>{const i=n.getHotspot(r).getOr(r),l="hotspot",u=n.getAnchorOverrides();return n.layouts.fold(()=>({type:l,hotspot:i,overrides:u}),f=>({type:l,hotspot:i,overrides:u,layouts:f}))},Vx=(n,r,i,l,u,f,p)=>((v,C,O,T,R,F,H)=>{const G=((ae,X,Y)=>(0,ae.fetch)(Y).map(X))(v,C,T),J=d3(T,v);return G.map(ae=>ae.bind(X=>{const Y=X.menus[X.primary];return D.from(Y).each(ne=>{v.listRole.each(ie=>{ne.role=ie})}),D.from(zp.sketch({...F.menu(),uid:Rc(""),data:X,highlightOnOpen:H,onOpenMenu:(ne,ie)=>{const de=J().getOrDie();Xa.position(de,ie,{anchor:O}),x.decloak(R)},onOpenSubmenu:(ne,ie,de)=>{const we=J().getOrDie();Xa.position(we,de,{anchor:{type:"submenu",item:ie}}),x.decloak(R)},onRepositionMenu:(ne,ie,de)=>{const we=J().getOrDie();Xa.position(we,ie,{anchor:O}),Ht(de,ze=>{Xa.position(we,ze.triggeredMenu,{anchor:{type:"submenu",item:ze.triggeringItem}})})},onEscape:()=>(Po.focus(T),x.close(R),D.some(!0))}))}))})(n,r,c3(n,i),i,l,u,p).map(v=>(v.fold(()=>{x.isOpen(l)&&x.close(l)},C=>{x.cloak(l),x.open(l,C),f(l)}),l)),kB=(n,r,i,l,u,f,p)=>(x.close(l),Om(l)),LC=(n,r,i,l,u,f)=>{const p=kr.getCoupled(i,"sandbox");return(x.isOpen(p)?kB:Vx)(n,r,i,p,l,u,f)},d3=(n,r)=>n.getSystem().getByUid(r.uid+"-"+BC()).map(i=>()=>un.value(i)).getOrThunk(()=>r.lazySink.fold(()=>()=>un.error(new Error("No internal sink is specified, nor could an external sink be found")),i=>()=>i(n))),PC=n=>{x.getState(n).each(r=>{zp.repositionMenus(r)})},IC=(n,r,i)=>{const l=bp(),u=d3(r,n);return{dom:{tag:"div",classes:n.sandboxClasses,attributes:{id:l.id}},behaviours:Oo(n.sandboxBehaviours,[Be.config({store:{mode:"memory",initialValue:r}}),x.config({onOpen:(f,p)=>{const y=c3(n,r);l.link(r.element),n.matchWidth&&((v,C,O)=>{const T=In.getCurrent(C).getOr(C),R=Go(v.element);O?Mo(T.element,"min-width",R+"px"):((F,H)=>{oo.set(F,H)})(T.element,R)})(y.hotspot,p,n.useMinWidth),n.onOpen(y,f,p),i!==void 0&&i.onOpen!==void 0&&i.onOpen(f,p)},onClose:(f,p)=>{l.unlink(r.element),u().getOr(p).element.dom.dispatchEvent(new window.FocusEvent("focusout")),i!==void 0&&i.onClose!==void 0&&i.onClose(f,p)},isPartOf:(f,p,y)=>tl(p,y)||tl(r,y),getAttachPoint:()=>u().getOrDie()}),In.config({find:f=>x.getState(f).bind(p=>In.getCurrent(p))}),ol.config({channels:{...K({isExtraPart:Fe}),...he({doReposition:PC})}})])}},u3=n=>{const r=kr.getCoupled(n,"sandbox");PC(r)},FC=()=>[Ne("sandboxClasses",[]),Io("sandboxBehaviours",[In,ol,x,Be])],CB=ue([nt("dom"),nt("fetch"),Dn("onOpen"),el("onExecute"),Ne("getHotspot",D.some),Ne("getAnchorOverrides",ue({})),cf(),Jt("dropdownBehaviours",[No,kr,po,Po]),nt("toggleClass"),Ne("eventOrder",{}),vn("lazySink"),Ne("matchWidth",!1),Ne("useMinWidth",!1),vn("role"),vn("listRole")].concat(FC())),SB=ue([Nu({schema:[fp(),Ne("fakeFocus",!1)],name:"menu",defaults:n=>({onExecute:n.onExecute})}),l3()]),rl=gl({name:"Dropdown",configFields:CB(),partFields:SB(),factory:(n,r,i,l)=>{const u=v=>{x.getState(v).each(C=>{zp.highlightPrimary(C)})},f=(v,C,O)=>LC(n,Ct,v,l,C,O),p={expand:v=>{No.isOn(v)||f(v,Ke,Ui.HighlightNone).get(Ke)},open:v=>{No.isOn(v)||f(v,Ke,Ui.HighlightMenuAndItem).get(Ke)},refetch:v=>kr.getExistingCoupled(v,"sandbox").fold(()=>f(v,Ke,Ui.HighlightMenuAndItem).map(Ke),C=>Vx(n,Ct,v,C,l,Ke,Ui.HighlightMenuAndItem).map(Ke)),isOpen:No.isOn,close:v=>{No.isOn(v)&&f(v,Ke,Ui.HighlightMenuAndItem).get(Ke)},repositionMenus:v=>{No.isOn(v)&&u3(v)}},y=(v,C)=>(Ld(v),D.some(!0));return{uid:n.uid,dom:n.dom,components:r,behaviours:Xo(n.dropdownBehaviours,[No.config({toggleClass:n.toggleClass,aria:{mode:"expanded"}}),kr.config({others:{sandbox:v=>IC(n,v,{onOpen:()=>No.on(v),onClose:()=>No.off(v)})}}),po.config({mode:"special",onSpace:y,onEnter:y,onDown:(v,C)=>{if(rl.isOpen(v)){const O=kr.getCoupled(v,"sandbox");u(O)}else rl.open(v);return D.some(!0)},onEscape:(v,C)=>rl.isOpen(v)?(rl.close(v),D.some(!0)):D.none()}),Po.config({})]),events:My(D.some(v=>{f(v,u,Ui.HighlightMenuAndItem).get(Ke)})),eventOrder:{...n.eventOrder,[di()]:["disabling","toggling","alloy.base.behaviour"]},apis:p,domModification:{attributes:{"aria-haspopup":n.listRole.getOr("true"),...n.role.fold(()=>({}),v=>({role:v})),...n.dom.tag==="button"?{type:St(n.dom,"attributes").bind(v=>St(v,"type")).getOr("button")}:{}}}}},apis:{open:(n,r)=>n.open(r),refetch:(n,r)=>n.refetch(r),expand:(n,r)=>n.expand(r),close:(n,r)=>n.close(r),isOpen:(n,r)=>n.isOpen(r),repositionMenus:(n,r)=>n.repositionMenus(r)}}),f3=(n,r,i)=>{uO(n).each(l=>{var u;((f,p)=>{Fs(p.element,"id").each(y=>wo(f.element,"aria-activedescendant",y))})(l,i),(_n((u=r).element,t0)?D.some(u.element):Ys(u.element,"."+t0)).each(f=>{Fs(f,"id").each(p=>wo(l.element,"aria-controls",p))})}),wo(i.element,"aria-selected","true")},EB=(n,r,i)=>{wo(i.element,"aria-selected","false")},yb=n=>kr.getExistingCoupled(n,"sandbox").bind(e0).map(fO).map(r=>r.fetchPattern).getOr("");var p0;(function(n){n[n.ContentFocus=0]="ContentFocus",n[n.UiFocus=1]="UiFocus"})(p0||(p0={}));const TB=(n,r,i,l,u)=>{const f=i.shared.providers,p=v=>u?{...v,shortcut:D.none(),icon:v.text.isSome()?D.none():v.icon}:v;switch(n.type){case"menuitem":return(y=n,Ms("menuitem",AO,y)).fold(Tm,v=>D.some(((C,O,T,R=!0)=>{const F=l0({presets:"normal",iconContent:C.icon,textContent:C.text,htmlContent:D.none(),ariaLabel:C.text,caret:D.none(),checkMark:D.none(),shortcutContent:C.shortcut},T,R);return Zy({data:Wy(C),getApi:H=>({isEnabled:()=>!Fo.isDisabled(H),setEnabled:G=>Fo.set(H,!G)}),enabled:C.enabled,onAction:C.onAction,onSetup:C.onSetup,triggersSubmenu:!1,itemBehaviours:[]},F,O,T)})(p(v),r,f,l)));case"nestedmenuitem":return(v=>Ms("nestedmenuitem",OO,v))(n).fold(Tm,v=>D.some(((C,O,T,R=!0,F=!1)=>{const H=F?(G=T.icons,fC("chevron-down",G,[X2])):(ae=>fC("chevron-right",ae,[X2]))(T.icons);var G;const J=l0({presets:"normal",iconContent:C.icon,textContent:C.text,htmlContent:D.none(),ariaLabel:C.text,caret:D.some(H),checkMark:D.none(),shortcutContent:C.shortcut},T,R);return Zy({data:Wy(C),getApi:ae=>({isEnabled:()=>!Fo.isDisabled(ae),setEnabled:X=>Fo.set(ae,!X),setIconFill:(X,Y)=>{Ys(ae.element,`svg path[class="${X}"], rect[class="${X}"]`).each(ne=>{wo(ne,"fill",Y)})},setTooltip:X=>{const Y=T.translate(X);wo(ae.element,"aria-label",Y)}}),enabled:C.enabled,onAction:Ke,onSetup:C.onSetup,triggersSubmenu:!0,itemBehaviours:[]},J,O,T)})(p(v),r,f,l,u)));case"togglemenuitem":return(v=>Ms("togglemenuitem",pB,v))(n).fold(Tm,v=>D.some(((C,O,T,R=!0)=>{const F=l0({iconContent:C.icon,textContent:C.text,htmlContent:D.none(),ariaLabel:C.text,checkMark:D.some(LO(T.icons)),caret:D.none(),shortcutContent:C.shortcut,presets:"normal",meta:C.meta},T,R);return ls(Zy({data:Wy(C),enabled:C.enabled,getApi:H=>({setActive:G=>{No.set(H,G)},isActive:()=>No.isOn(H),isEnabled:()=>!Fo.isDisabled(H),setEnabled:G=>Fo.set(H,!G)}),onAction:C.onAction,onSetup:C.onSetup,triggersSubmenu:!1,itemBehaviours:[]},F,O,T),{toggling:{toggleClass:nO,toggleOnExecute:!1,selected:C.active},role:C.role.getOrUndefined()})})(p(v),r,f,l)));case"separator":return(v=>Ms("separatormenuitem",vO,v))(n).fold(Tm,v=>D.some(a3(v)));case"fancymenuitem":return(v=>Ms("fancymenuitem",TO,v))(n).fold(Tm,v=>((C,O)=>St(r3,C.fancytype).map(T=>T(C,O)))(v,i));default:return console.error("Unknown item in general menu",n),D.none()}var y},Ig=(n,r,i,l,u,f,p)=>{const y=l===1,v=!y||n0(n);return yi(pt(n,C=>{switch(C.type){case"separator":return(O=C,Ms("Autocompleter.Separator",vO,O)).fold(Tm,T=>D.some(a3(T)));case"cardmenuitem":return(T=>Ms("cardmenuitem",mB,T))(C).fold(Tm,T=>D.some(((R,F,H,G)=>{const J={dom:PO(R.label),optComponents:[D.some({dom:{tag:"div",classes:[Jv,Qv]},components:gC(R.items,G)})]};return Zy({data:Wy({text:D.none(),...R}),enabled:R.enabled,getApi:ae=>({isEnabled:()=>!Fo.isDisabled(ae),setEnabled:X=>{Fo.set(ae,!X),Ht(fa(ae.element,"*"),Y=>{ae.getSystem().getByDom(Y).each(ne=>{ne.hasConfigured(Fo)&&Fo.set(ne,!X)})})}}),onAction:R.onAction,onSetup:R.onSetup,triggersSubmenu:!1,itemBehaviours:D.from(G.itemBehaviours).getOr([])},J,F,H.providers)})({...T,onAction:R=>{T.onAction(R),i(T.value,T.meta)}},u,f,{itemBehaviours:IO(T.meta,f,D.none()),cardText:{matchText:r,highlightOn:p}})));default:return(T=>Ms("Autocompleter.Item",nB,T))(C).fold(Tm,T=>D.some(((R,F,H,G,J,ae,X,Y=!0)=>{const ne=l0({presets:G,textContent:D.none(),htmlContent:H?R.text.map(de=>pC(de,F)):D.none(),ariaLabel:R.text,iconContent:R.icon,shortcutContent:D.none(),checkMark:D.none(),caret:D.none(),value:R.value},X.providers,Y,R.icon),ie=R.text.filter(de=>!H&&de!=="");return Zy({data:Wy(R),enabled:R.enabled,getApi:ue({}),onAction:de=>J(R.value,R.meta),onSetup:ue(Ke),triggersSubmenu:!1,itemBehaviours:IO(R,X,ie)},ne,ae,X.providers)})(T,r,y,"normal",i,u,f,v)))}var O}))},m3=(n,r,i,l,u,f)=>{const p=n0(r),y=yi(pt(r,C=>{const O=T=>TB(T,i,l,(R=>u?!Vo(R,"text"):p)(T),u);return C.type==="nestedmenuitem"&&C.getSubmenuItems().length<=0?O({...C,enabled:!1}):O(C)})),v=(C=>C.searchMode==="no-search"?{menuType:"normal"}:{menuType:"searchable",searchMode:C})(f);return(u?QM:eC)(n,p,y,1,v)},$C=n=>zp.singleData(n.value,n),Gd=n=>df(Vt(n.startContainer),n.startOffset,Vt(n.endContainer),n.endOffset),p3=(n,r)=>{const i=Xt("autocompleter"),l=so(!1),u=so(!1),f=Nn(),p=Ba(or.sketch({dom:{tag:"div",classes:["tox-autocompleter"],attributes:{id:i}},components:[],fireDismissalEventInstead:{},inlineBehaviours:xt([en("dismissAutocompleter",[Xe(Qu(),()=>T()),Xe(ig(),(H,G)=>{Fs(G.event.target,"id").each(J=>wo(Vt(n.getBody()),"aria-activedescendant",J))})])]),lazySink:r.getSink})),y=()=>or.isOpen(p),v=u.get,C=()=>{if(y()){or.hide(p),n.dom.remove(i,!1);const H=Vt(n.getBody());Fs(H,"aria-owns").filter(G=>G===i).each(()=>{pn(H,"aria-owns"),pn(H,"aria-activedescendant")})}},O=()=>or.getContent(p).bind(H=>Lt(H.components(),0)),T=()=>n.execCommand("mceAutocompleterClose"),R=H=>{const G=(J=>{const ae=ko(J,X=>D.from(X.columns)).getOr(1);return Sn(J,X=>{const Y=X.items;return Ig(Y,X.matchText,(ne,ie)=>{const de={hide:()=>T(),reload:we=>{C(),n.execCommand("mceAutocompleterReload",!1,{fetchOptions:we})}};n.execCommand("mceAutocompleterRefreshActiveRange"),f.get().each(we=>{l.set(!0),X.onAction(de,we,ne,ie),l.set(!1)})},ae,Sf.BUBBLE_TO_SANDBOX,r,X.highlightOn)})})(H);G.length>0?(((J,ae)=>{const X=ko(J,Y=>D.from(Y.columns)).getOr(1);or.showMenuAt(p,{anchor:{type:"selection",getSelection:()=>f.get().map(Gd),root:Vt(n.getBody())}},((Y,ne,ie,de)=>{const we=f0(ne,de),ze=lb(de);return{data:$C({...Y,movement:we,menuBehaviours:a0(ne!=="auto"?[]:[Ss((tt,Je)=>{uC(tt,4,ze.item).each(({numColumns:Ze,numRows:kt})=>{po.setGridSize(tt,kt,Ze)})})])}),menu:{markers:lb(de),fakeFocus:ie===p0.ContentFocus}}})(eC("autocompleter-value",!0,ae,X,{menuType:"normal"}),X,p0.ContentFocus,"normal")),O().each(ss.highlightFirst)})(H,G),wo(Vt(n.getBody()),"aria-owns",i),n.inline||F()):C()},F=()=>{n.dom.get(i)&&n.dom.remove(i,!1);const H=n.getDoc().documentElement,G=n.selection.getNode(),J=(ae=>dp(ae,!0))(p.element);Li(J,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",top:`${G.offsetTop}px`,left:`${G.offsetLeft}px`}),n.dom.add(H,J.dom),Ys(J,'[role="menu"]').each(ae=>{Vn(ae,"position"),Vn(ae,"max-height")})};n.on("AutocompleterStart",({lookupData:H})=>{u.set(!0),l.set(!1),R(H)}),n.on("AutocompleterUpdate",({lookupData:H})=>R(H)),n.on("AutocompleterUpdateActiveRange",({range:H})=>f.set(H)),n.on("AutocompleterEnd",()=>{C(),u.set(!1),l.set(!1),f.clear()}),((H,G)=>{const J=(X,Y)=>{lo(X,Ws(),{raw:Y})},ae=()=>H.getMenu().bind(ss.getHighlighted);G.on("keydown",X=>{const Y=X.which;H.isActive()&&(H.isMenuOpen()?Y===13?(ae().each(Ld),X.preventDefault()):Y===40?(ae().fold(()=>{H.getMenu().each(ss.highlightFirst)},ne=>{J(ne,X)}),X.preventDefault(),X.stopImmediatePropagation()):Y!==37&&Y!==38&&Y!==39||ae().each(ne=>{J(ne,X),X.preventDefault(),X.stopImmediatePropagation()}):Y!==13&&Y!==38&&Y!==40||H.cancelIfNecessary())}),G.on("NodeChange",()=>{!H.isActive()||H.isProcessingAction()||G.queryCommandState("mceAutoCompleterInRange")||H.cancelIfNecessary()})})({cancelIfNecessary:T,isMenuOpen:y,isActive:v,isProcessingAction:l.get,getMenu:O},n)},Jy=(n,r,i)=>Fd(n,r,i).isSome(),HC=(n,r)=>{let i=null;return{cancel:()=>{i!==null&&(clearTimeout(i),i=null)},schedule:(...l)=>{i=setTimeout(()=>{n.apply(null,l),i=null},r)}}},g3=n=>{const r=n.raw;return r.touches===void 0||r.touches.length!==1?D.none():D.some(r.touches[0])},jx=(n,r)=>{const i={stopBackspace:!0,...r},l=(T=>{const R=Nn(),F=so(!1),H=HC(J=>{T.triggerEvent(M1(),J),F.set(!0)},400),G=Ji([{key:P(),value:J=>(g3(J).each(ae=>{H.cancel();const X={x:ae.clientX,y:ae.clientY,target:J.target};H.schedule(J),F.set(!1),R.set(X)}),D.none())},{key:q(),value:J=>(H.cancel(),g3(J).each(ae=>{R.on(X=>{((Y,ne)=>{const ie=Math.abs(Y.clientX-ne.x),de=Math.abs(Y.clientY-ne.y);return ie>5||de>5})(ae,X)&&R.clear()})}),D.none())},{key:ge(),value:J=>(H.cancel(),R.get().filter(ae=>Hn(ae.target,J.target)).map(ae=>F.get()?(J.prevent(),!1):T.triggerEvent(Ac(),J)))}]);return{fireIfReady:(J,ae)=>St(G,ae).bind(X=>X(J))}})(i),u=pt(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),T=>Ai(n,T,R=>{l.fireIfReady(R,T).each(F=>{F&&R.kill()}),i.triggerEvent(T,R)&&R.kill()})),f=Nn(),p=Ai(n,"paste",T=>{l.fireIfReady(T,"paste").each(R=>{R&&T.kill()}),i.triggerEvent("paste",T)&&T.kill(),f.set(setTimeout(()=>{i.triggerEvent(Gf(),T)},0))}),y=Ai(n,"keydown",T=>{i.triggerEvent("keydown",T)?T.kill():i.stopBackspace&&(R=>R.raw.which===P4[0]&&!Ge(["input","textarea"],ni(R.target))&&!Jy(R.target,'[contenteditable="true"]'))(T)&&T.prevent()}),v=Ai(n,"focusin",T=>{i.triggerEvent("focusin",T)&&T.kill()}),C=Nn(),O=Ai(n,"focusout",T=>{i.triggerEvent("focusout",T)&&T.kill(),C.set(setTimeout(()=>{i.triggerEvent(Kf(),T)},0))});return{unbind:()=>{Ht(u,T=>{T.unbind()}),y.unbind(),v.unbind(),O.unbind(),p.unbind(),f.on(clearTimeout),C.on(clearTimeout)}}},VC=(n,r)=>{const i=St(n,"target").getOr(r);return so(i)},g0=Ei([{stopped:[]},{resume:["element"]},{complete:[]}]),h3=(n,r,i,l,u,f)=>{const p=n(r,l),y=((v,C)=>{const O=so(!1),T=so(!1);return{stop:()=>{O.set(!0)},cut:()=>{T.set(!0)},isStopped:O.get,isCut:T.get,event:v,setSource:C.set,getSource:C.get}})(i,u);return p.fold(()=>(f.logEventNoHandlers(r,l),g0.complete()),v=>{const C=v.descHandler;return U1(C)(y),y.isStopped()?(f.logEventStopped(r,v.element,C.purpose),g0.stopped()):y.isCut()?(f.logEventCut(r,v.element,C.purpose),g0.complete()):Hr(v.element).fold(()=>(f.logNoParent(r,v.element,C.purpose),g0.complete()),O=>(f.logEventResponse(r,v.element,C.purpose),g0.resume(O)))})},h0=(n,r,i,l,u,f)=>h3(n,r,i,l,u,f).fold(Gt,p=>h0(n,r,i,p,u,f),Fe),Ux=(n,r,i,l,u)=>{const f=VC(i,l);return h0(n,r,i,l,f,u)},b3=()=>{const n=(()=>{const l={};return{registerId:(u,f,p)=>{rs(p,(y,v)=>{const C=l[v]!==void 0?l[v]:{};C[f]=((O,T)=>({cHandler:ot.apply(void 0,[O.handler].concat(T)),purpose:O.purpose}))(y,u),l[v]=C})},unregisterId:u=>{rs(l,(f,p)=>{Vo(f,u)&&delete f[u]})},filterByType:u=>St(l,u).map(f=>Is(f,(p,y)=>((v,C)=>({id:v,descHandler:C}))(y,p))).getOr([]),find:(u,f,p)=>St(l,f).bind(y=>Jc(p,v=>((C,O)=>pp(O).bind(T=>St(C,T)).map(T=>((R,F)=>({element:R,descHandler:F}))(O,T)))(y,v),u))}})(),r={},i=l=>{pp(l.element).each(u=>{delete r[u],n.unregisterId(u)})};return{find:(l,u,f)=>n.find(l,u,f),filter:l=>n.filterByType(l),register:l=>{const u=(p=>{const y=p.element;return pp(y).getOrThunk(()=>((v,C)=>{const O=Xt(Jb+"uid-");return Qb(C,O),O})(0,p.element))})(l);an(r,u)&&((p,y)=>{const v=r[y];if(v!==p)throw new Error('The tagId "'+y+'" is already used by: '+Cu(v.element)+` -Cannot use it for: `+Cu(p.element)+` -The conflicting element is`+(Vr(v.element)?" ":" not ")+"already in the DOM");i(p)})(l,u);const f=[l];n.registerId(f,u,l.events),r[u]=l},unregister:i,getById:l=>St(r,l)}},Bu=cd({name:"Container",factory:n=>{const{attributes:r,...i}=n.dom;return{uid:n.uid,dom:{tag:"div",attributes:{role:"presentation",...r},...i},components:n.components,behaviours:Ao(n.containerBehaviours),events:n.events,domModification:n.domModification,eventOrder:n.eventOrder}},configFields:[Ne("components",[]),Jt("containerBehaviours",[]),Ne("events",{}),Ne("domModification",{}),Ne("eventOrder",{})]}),Zx=n=>{const r=J=>Hr(n.element).fold(Gt,ae=>Hn(J,ae)),i=b3(),l=(J,ae)=>i.find(r,J,ae),u=jx(n.element,{triggerEvent:(J,ae)=>vh(J,ae.target,X=>((Y,ne,ie,de)=>Ux(Y,ne,ie,ie.target,de))(l,J,ae,X))}),f={debugInfo:ue("real"),triggerEvent:(J,ae,X)=>{vh(J,ae,Y=>Ux(l,J,X,ae,Y))},triggerFocus:(J,ae)=>{pp(J).fold(()=>{Ti(J)},X=>{vh(Qc(),J,Y=>(((ne,ie,de,we,ze)=>{const tt=VC(de,we);h3(ne,ie,de,we,tt,ze)})(l,Qc(),{originator:ae,kill:Ke,prevent:Ke,target:J},J,Y),!1))})},triggerEscape:(J,ae)=>{f.triggerEvent("keydown",J.element,ae.event)},getByUid:J=>H(J),getByDom:J=>G(J),build:Ba,buildOrPatch:ry,addToGui:J=>{v(J)},removeFromGui:J=>{C(J)},addToWorld:J=>{p(J)},removeFromWorld:J=>{y(J)},broadcast:J=>{T(J)},broadcastOn:(J,ae)=>{R(J,ae)},broadcastEvent:(J,ae)=>{F(J,ae)},isConnected:Gt},p=J=>{J.connect(f),ga(J.element)||(i.register(J),Ht(J.components(),p),f.triggerEvent(Dd(),J.element,{target:J.element}))},y=J=>{ga(J.element)||(Ht(J.components(),y),i.unregister(J)),J.disconnect()},v=J=>{bf(n,J)},C=J=>{Vi(J)},O=J=>{const ae=i.filter(Fi());Ht(ae,X=>{const Y=X.descHandler;U1(Y)(J)})},T=J=>{O({universal:!0,data:J})},R=(J,ae)=>{O({universal:!1,channels:J,data:ae})},F=(J,ae)=>((X,Y,ne)=>{const ie=(de=>{const we=so(!1);return{stop:()=>{we.set(!0)},cut:Ke,isStopped:we.get,isCut:Fe,event:de,setSource:ln("Cannot set source of a broadcasted event"),getSource:ln("Cannot get source of a broadcasted event")}})(Y);return Ht(X,de=>{const we=de.descHandler;U1(we)(ie)}),ie.isStopped()})(i.filter(J),ae),H=J=>i.getById(J).fold(()=>un.error(new Error('Could not find component with uid: "'+J+'" in system.')),un.value),G=J=>{const ae=pp(J).getOr("not found");return H(ae)};return p(n),{root:n,element:n.element,destroy:()=>{u.unbind(),aa(n.element)},add:v,remove:C,getByUid:H,getByDom:G,addToWorld:p,removeFromWorld:y,broadcast:T,broadcastOn:R,broadcastEvent:F}},AB=ue([Ne("prefix","form-field"),Jt("fieldBehaviours",[In,Be])]),jC=ue([ld({schema:[nt("dom")],name:"label"}),ld({factory:{sketch:n=>({uid:n.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:n.text}})},schema:[nt("text")],name:"aria-descriptor"}),sl({factory:{sketch:n=>{const r=((i,l)=>{const u={};return rs(i,(f,p)=>{Ge(l,p)||(u[p]=f)}),u})(n,["factory"]);return n.factory.sketch(r)}},schema:[nt("factory")],name:"field"})]),cs=gl({name:"FormField",configFields:AB(),partFields:jC(),factory:(n,r,i,l)=>{const u=Xo(n.fieldBehaviours,[In.config({find:y=>As(y,n,"field")}),Be.config({store:{mode:"manual",getValue:y=>In.getCurrent(y).bind(Be.getValue),setValue:(y,v)=>{In.getCurrent(y).each(C=>{Be.setValue(C,v)})}}})]),f=Ho([Ss((y,v)=>{const C=w4(y,n,["label","field","aria-descriptor"]);C.field().each(O=>{const T=Xt(n.prefix);C.label().each(R=>{wo(R.element,"for",T),wo(O.element,"id",T)}),C["aria-descriptor"]().each(R=>{const F=Xt(n.prefix);wo(R.element,"id",F),wo(O.element,"aria-describedby",F)})})})]),p={getField:y=>As(y,n,"field"),getLabel:y=>As(y,n,"label")};return{uid:n.uid,dom:n.dom,components:r,behaviours:u,events:f,apis:p}},apis:{getField:(n,r)=>n.getField(r),getLabel:(n,r)=>n.getLabel(r)}});var OB=tinymce.util.Tools.resolve("tinymce.html.Entities");const b0=(n,r,i,l)=>{const u=zB(n,r,i,l);return cs.sketch(u)},zB=(n,r,i,l)=>({dom:Wx(i),components:n.toArray().concat([r]),fieldBehaviours:xt(l)}),Wx=n=>({tag:"div",classes:["tox-form__group"].concat(n)}),Fg=(n,r)=>cs.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[wr(r.translate(n))]}),Zi=Xt("form-component-change"),$g=Xt("form-close"),Ip=Xt("form-cancel"),Tf=Xt("form-action"),y0=Xt("form-submit"),UC=Xt("form-block"),ZC=Xt("form-unblock"),y3=Xt("form-tabchange"),qx=Xt("form-resize"),v3=(n,r,i)=>{const l=n.label.map(T=>Fg(T,r)),u=r.icons(),f=T=>(R,F)=>{Fd(F.event.target,"[data-collection-item-value]").each(H=>{T(R,F,H,yr(H,"data-collection-item-value"))})},p=f((T,R,F,H)=>{R.stop(),r.isDisabled()||lo(T,Tf,{name:n.name,value:H})}),y=[Xe(io(),f((T,R,F)=>{Ti(F)})),Xe(Mr(),p),Xe(Ac(),p),Xe(Wn(),f((T,R,F)=>{Ys(T.element,"."+Em).each(H=>{co(H,Em)}),Tt(F,Em)})),Xe(sr(),f(T=>{Ys(T.element,"."+Em).each(R=>{co(R,Em),Th(R)})})),Bl(f((T,R,F,H)=>{lo(T,Tf,{name:n.name,value:H})}))],v=(T,R)=>pt(fa(T.element,".tox-collection__item"),R),C=cs.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(n.columns!==1?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:Ct},behaviours:xt([Fo.config({disabled:r.isDisabled,onDisabled:T=>{v(T,R=>{Tt(R,"tox-collection__item--state-disabled"),wo(R,"aria-disabled",!0)})},onEnabled:T=>{v(T,R=>{co(R,"tox-collection__item--state-disabled"),pn(R,"aria-disabled")})}}),Ca(),So.config({}),Pr.config({...r.tooltips.getConfig({tooltipText:"",onShow:T=>{Ys(T.element,"."+Em+"[data-mce-tooltip]").each(R=>{Fs(R,"data-mce-tooltip").each(F=>{Pr.setComponents(T,r.tooltips.getComponents({tooltipText:F}))})})}}),mode:"children-keyboard-focus",anchor:T=>({type:"node",node:Ys(T.element,"."+Em).orThunk(()=>Wc(".tox-collection__item")),root:T.element,layouts:{onLtr:ue([Tr,ir,mr,Br,pr,us]),onRtl:ue([Tr,ir,mr,Br,pr,us])},bubble:sc(0,-2,{})})}),Be.config({store:{mode:"memory",initialValue:i.getOr([])},onSetValue:(T,R)=>{((F,H)=>{const G=pt(H,X=>{const Y=Ud.translate(X.text),ne=n.columns===1?`
    ${Y}
    `:"",ie=`
    ${(ze=>{var tt;return(tt=u[ze])!==null&&tt!==void 0?tt:ze})(X.icon)}
    `,de={_:" "," - ":" ","-":" "},we=Y.replace(/\_| \- |\-/g,ze=>de[ze]);return`
    ${ie}${ne}
    `}),J=n.columns!=="auto"&&n.columns>1?$t(G,n.columns):[G],ae=pt(J,X=>`
    ${X.join("")}
    `);cp(F.element,ae.join(""))})(T,R),n.columns==="auto"&&uC(T,5,"tox-collection__item").each(({numRows:F,numColumns:H})=>{po.setGridSize(T,F,H)}),Qo(T,qx)}}),ws.config({}),po.config((O=n.columns,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:".tox-collection__group",cell:`.${kx}`}})),en("collection-events",y)]),eventOrder:{[di()]:["disabling","alloy.base.behaviour","collection-events"],[Wn()]:["collection-events","tooltipping"]}});var O;return b0(l,C,["tox-form__group--collection"],[])},_3=["input","textarea"],Kx=n=>{const r=ni(n);return Ge(_3,r)},x3=(n,r)=>{const i=r.getRoot(n).getOr(n.element);co(i,r.invalidClass),r.notify.each(l=>{Kx(n.element)&&wo(n.element,"aria-invalid",!1),l.getContainer(n).each(u=>{cp(u,l.validHtml)}),l.onValid(n)})},WC=(n,r,i,l)=>{const u=r.getRoot(n).getOr(n.element);Tt(u,r.invalidClass),r.notify.each(f=>{Kx(n.element)&&wo(n.element,"aria-invalid",!0),f.getContainer(n).each(p=>{cp(p,l)}),f.onInvalid(n,l)})},w3=(n,r,i)=>r.validator.fold(()=>Om(un.value(!0)),l=>l.validate(n)),qC=(n,r,i)=>(r.notify.each(l=>{l.onValidate(n)}),w3(n,r).map(l=>n.getSystem().isConnected()?l.fold(u=>(WC(n,r,0,u),un.error(u)),u=>(x3(n,r),un.value(u))):un.error("No longer in system")));var NB=Object.freeze({__proto__:null,markValid:x3,markInvalid:WC,query:w3,run:qC,isInvalid:(n,r)=>{const i=r.getRoot(n).getOr(n.element);return _n(i,r.invalidClass)}}),k3=Object.freeze({__proto__:null,events:(n,r)=>n.validator.map(i=>Ho([Xe(i.onEvent,l=>{qC(l,n).get(Ct)})].concat(i.validateOnLoad?[Ss(l=>{qC(l,n).get(Ke)})]:[]))).getOr({})}),DB=[nt("invalidClass"),Ne("getRoot",D.none),Zs("notify",[Ne("aria","alert"),Ne("getContainer",D.none),Ne("validHtml",""),Dn("onValid"),Dn("onInvalid"),Dn("onValidate")]),Zs("validator",[nt("validate"),Ne("onEvent","input"),Ne("validateOnLoad",!0)])];const zm=Qr({fields:DB,name:"invalidating",active:k3,apis:NB,extra:{validation:n=>r=>{const i=Be.getValue(r);return Om(n(i))}}}),vb=Qr({fields:[],name:"unselecting",active:Object.freeze({__proto__:null,events:()=>Ho([ef(Ma(),Gt)]),exhibit:()=>ar({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})})}),KC=Xt("color-input-change"),GC=Xt("color-swatch-change"),C3=Xt("color-picker-cancel"),YC=ld({schema:[nt("dom")],name:"label"}),Hg=n=>ld({name:n+"-edge",overrides:r=>r.model.manager.edgeActions[n].fold(()=>({}),i=>({events:Ho([lg(P(),(l,u,f)=>i(l,f),[r]),lg(at(),(l,u,f)=>i(l,f),[r]),lg(xo(),(l,u,f)=>{f.mouseIsDown.get()&&i(l,f)},[r])])}))}),RB=Hg("top-left"),MB=Hg("top"),BB=Hg("top-right"),LB=Hg("right"),S3=Hg("bottom-right"),XC=Hg("bottom"),PB=Hg("bottom-left"),Gx=Hg("left"),IB=sl({name:"thumb",defaults:ue({dom:{styles:{position:"absolute"}}}),overrides:n=>({events:Ho([tm(P(),n,"spectrum"),tm(q(),n,"spectrum"),tm(ge(),n,"spectrum"),tm(at(),n,"spectrum"),tm(xo(),n,"spectrum"),tm(Bo(),n,"spectrum")])})}),Yx=n=>xm(n.event);var FB=[YC,Gx,LB,MB,XC,RB,BB,PB,S3,IB,sl({schema:[ca("mouseIsDown",()=>so(!1))],name:"spectrum",overrides:n=>{const r=n.model.manager,i=(l,u)=>r.getValueFromEvent(u).map(f=>r.setValueFrom(l,n,f));return{behaviours:xt([po.config({mode:"special",onLeft:(l,u)=>r.onLeft(l,n,Yx(u)),onRight:(l,u)=>r.onRight(l,n,Yx(u)),onUp:(l,u)=>r.onUp(l,n,Yx(u)),onDown:(l,u)=>r.onDown(l,n,Yx(u))}),ws.config({}),Po.config({})]),events:Ho([Xe(P(),i),Xe(q(),i),Xe(at(),i),Xe(xo(),(l,u)=>{n.mouseIsDown.get()&&i(l,u)})])}}})];const v0=ue("slider.change.value"),JC=n=>{const r=n.event.raw;if((i=>i.type.indexOf("touch")!==-1)(r)){const i=r;return i.touches!==void 0&&i.touches.length===1?D.some(i.touches[0]).map(l=>pe(l.clientX,l.clientY)):D.none()}{const i=r;return i.clientX!==void 0?D.some(i).map(l=>pe(l.clientX,l.clientY)):D.none()}},_b=n=>n.model.minX,Vg=n=>n.model.minY,Xx=n=>n.model.minX-1,Jx=n=>n.model.minY-1,Fp=n=>n.model.maxX,Yd=n=>n.model.maxY,Qx=n=>n.model.maxX+1,ew=n=>n.model.maxY+1,tw=(n,r,i)=>r(n)-i(n),ow=n=>tw(n,Fp,_b),QC=n=>tw(n,Yd,Vg),E3=n=>ow(n)/2,eS=n=>QC(n)/2,Qy=(n,r)=>r?n.stepSize*n.speedMultiplier:n.stepSize,tS=n=>n.snapToGrid,oS=n=>n.snapStart,nw=n=>n.rounded,sw=(n,r)=>n[r+"-edge"]!==void 0,nS=n=>sw(n,"left"),T3=n=>sw(n,"right"),e1=n=>sw(n,"top"),A3=n=>sw(n,"bottom"),$p=n=>n.model.value.get(),Nm=(n,r)=>({x:n,y:r}),pd=(n,r)=>{lo(n,v0(),{value:r})},sS=(n,r,i,l)=>ni?i:n===r?r-1:Math.max(r,n-l),_0=(n,r,i,l)=>n>i?n:nMath.max(r,Math.min(i,n)),z3=n=>{const{min:r,max:i,range:l,value:u,step:f,snap:p,snapStart:y,rounded:v,hasMinEdge:C,hasMaxEdge:O,minBound:T,maxBound:R,screenRange:F}=n,H=C?r-1:r,G=O?i+1:i;if(uR)return G;{const J=((X,Y,ne)=>Math.min(ne,Math.max(X,Y))-Y)(u,T,R),ae=O3(J/F*l+r,H,G);return p&&ae>=r&&ae<=i?((X,Y,ne,ie,de)=>de.fold(()=>{const we=X-Y,ze=Math.round(we/ie)*ie;return O3(Y+ze,Y-1,ne+1)},we=>{const ze=(X-we)%ie,tt=Math.round(ze/ie),Je=Math.floor((X-we)/ie),Ze=Math.floor((ne-we)/ie),kt=we+Math.min(Ze,Je+tt)*ie;return Math.max(we,kt)}))(ae,r,i,f,y):v?Math.round(ae):ae}},rw=n=>{const{min:r,max:i,range:l,value:u,hasMinEdge:f,hasMaxEdge:p,maxBound:y,maxOffset:v,centerMinEdge:C,centerMaxEdge:O}=n;return ui?p?y:O:(u-r)/l*v},rS="top",N3="right",D3="bottom",aS="left",Dm=n=>n.element.dom.getBoundingClientRect(),Lu=(n,r)=>n[r],aw=n=>{const r=Dm(n);return Lu(r,aS)},R3=n=>{const r=Dm(n);return Lu(r,N3)},iw=n=>{const r=Dm(n);return Lu(r,rS)},M3=n=>{const r=Dm(n);return Lu(r,D3)},B3=n=>{const r=Dm(n);return Lu(r,"width")},L3=n=>{const r=Dm(n);return Lu(r,"height")},lw=(n,r,i)=>(n+r)/2-i,P3=(n,r)=>{const i=Dm(n),l=Dm(r),u=Lu(i,aS),f=Lu(i,N3),p=Lu(l,aS);return lw(u,f,p)},I3=(n,r)=>{const i=Dm(n),l=Dm(r),u=Lu(i,rS),f=Lu(i,D3),p=Lu(l,rS);return lw(u,f,p)},cw=(n,r)=>{lo(n,v0(),{value:r})},dw=(n,r,i)=>{const l={min:_b(r),max:Fp(r),range:ow(r),value:i,step:Qy(r),snap:tS(r),snapStart:oS(r),rounded:nw(r),hasMinEdge:nS(r),hasMaxEdge:T3(r),minBound:aw(n),maxBound:R3(n),screenRange:B3(n)};return z3(l)},F3=n=>(r,i,l)=>((u,f,p,y)=>{const v=(u>0?_0:sS)($p(p),_b(p),Fp(p),Qy(p,y));return cw(f,v),D.some(v)})(n,r,i,l).map(Gt),iS=(n,r,i,l,u,f)=>{const p=((y,v,C,O,T)=>{const R=B3(y),F=O.bind(J=>D.some(P3(J,y))).getOr(0),H=T.bind(J=>D.some(P3(J,y))).getOr(R),G={min:_b(v),max:Fp(v),range:ow(v),value:C,hasMinEdge:nS(v),hasMaxEdge:T3(v),minBound:aw(y),minOffset:0,maxBound:R3(y),maxOffset:R,centerMinEdge:F,centerMaxEdge:H};return rw(G)})(r,f,i,l,u);return aw(r)-aw(n)+p},$B=F3(-1),HB=F3(1),VB=D.none,jB=D.none,lS={"top-left":D.none(),top:D.none(),"top-right":D.none(),right:D.some((n,r)=>{pd(n,Qx(r))}),"bottom-right":D.none(),bottom:D.none(),"bottom-left":D.none(),left:D.some((n,r)=>{pd(n,Xx(r))})};var UB=Object.freeze({__proto__:null,setValueFrom:(n,r,i)=>{const l=dw(n,r,i);return cw(n,l),l},setToMin:(n,r)=>{const i=_b(r);cw(n,i)},setToMax:(n,r)=>{const i=Fp(r);cw(n,i)},findValueOfOffset:dw,getValueFromEvent:n=>JC(n).map(r=>r.left),findPositionOfValue:iS,setPositionFromValue:(n,r,i,l)=>{const u=$p(i),f=iS(n,l.getSpectrum(n),u,l.getLeftEdge(n),l.getRightEdge(n),i),p=Go(r.element)/2;Mo(r.element,"left",f-p+"px")},onLeft:$B,onRight:HB,onUp:VB,onDown:jB,edgeActions:lS});const uw=(n,r)=>{lo(n,v0(),{value:r})},cS=(n,r,i)=>{const l={min:Vg(r),max:Yd(r),range:QC(r),value:i,step:Qy(r),snap:tS(r),snapStart:oS(r),rounded:nw(r),hasMinEdge:e1(r),hasMaxEdge:A3(r),minBound:iw(n),maxBound:M3(n),screenRange:L3(n)};return z3(l)},$3=n=>(r,i,l)=>((u,f,p,y)=>{const v=(u>0?_0:sS)($p(p),Vg(p),Yd(p),Qy(p,y));return uw(f,v),D.some(v)})(n,r,i,l).map(Gt),dS=(n,r,i,l,u,f)=>{const p=((y,v,C,O,T)=>{const R=L3(y),F=O.bind(J=>D.some(I3(J,y))).getOr(0),H=T.bind(J=>D.some(I3(J,y))).getOr(R),G={min:Vg(v),max:Yd(v),range:QC(v),value:C,hasMinEdge:e1(v),hasMaxEdge:A3(v),minBound:iw(y),minOffset:0,maxBound:M3(y),maxOffset:R,centerMinEdge:F,centerMaxEdge:H};return rw(G)})(r,f,i,l,u);return iw(r)-iw(n)+p},ZB=D.none,WB=D.none,qB=$3(-1),KB=$3(1),GB={"top-left":D.none(),top:D.some((n,r)=>{pd(n,Jx(r))}),"top-right":D.none(),right:D.none(),"bottom-right":D.none(),bottom:D.some((n,r)=>{pd(n,ew(r))}),"bottom-left":D.none(),left:D.none()};var YB=Object.freeze({__proto__:null,setValueFrom:(n,r,i)=>{const l=cS(n,r,i);return uw(n,l),l},setToMin:(n,r)=>{const i=Vg(r);uw(n,i)},setToMax:(n,r)=>{const i=Yd(r);uw(n,i)},findValueOfOffset:cS,getValueFromEvent:n=>JC(n).map(r=>r.top),findPositionOfValue:dS,setPositionFromValue:(n,r,i,l)=>{const u=$p(i),f=dS(n,l.getSpectrum(n),u,l.getTopEdge(n),l.getBottomEdge(n),i),p=Ds(r.element)/2;Mo(r.element,"top",f-p+"px")},onLeft:ZB,onRight:WB,onUp:qB,onDown:KB,edgeActions:GB});const fw=(n,r)=>{lo(n,v0(),{value:r})},mw=(n,r)=>({x:n,y:r}),xb=(n,r)=>(i,l,u)=>((f,p,y,v,C)=>{const O=f>0?_0:sS,T=p?$p(v).x:O($p(v).x,_b(v),Fp(v),Qy(v,C)),R=p?O($p(v).y,Vg(v),Yd(v),Qy(v,C)):$p(v).y;return fw(y,mw(T,R)),D.some(T)})(n,r,i,l,u).map(Gt),XB=xb(-1,!1),uS=xb(1,!1),JB=xb(-1,!0),QB=xb(1,!0),eL={"top-left":D.some((n,r)=>{pd(n,Nm(Xx(r),Jx(r)))}),top:D.some((n,r)=>{pd(n,Nm(E3(r),Jx(r)))}),"top-right":D.some((n,r)=>{pd(n,Nm(Qx(r),Jx(r)))}),right:D.some((n,r)=>{pd(n,Nm(Qx(r),eS(r)))}),"bottom-right":D.some((n,r)=>{pd(n,Nm(Qx(r),ew(r)))}),bottom:D.some((n,r)=>{pd(n,Nm(E3(r),ew(r)))}),"bottom-left":D.some((n,r)=>{pd(n,Nm(Xx(r),ew(r)))}),left:D.some((n,r)=>{pd(n,Nm(Xx(r),eS(r)))})};var H3=Object.freeze({__proto__:null,setValueFrom:(n,r,i)=>{const l=dw(n,r,i.left),u=cS(n,r,i.top),f=mw(l,u);return fw(n,f),f},setToMin:(n,r)=>{const i=_b(r),l=Vg(r);fw(n,mw(i,l))},setToMax:(n,r)=>{const i=Fp(r),l=Yd(r);fw(n,mw(i,l))},getValueFromEvent:n=>JC(n),setPositionFromValue:(n,r,i,l)=>{const u=$p(i),f=iS(n,l.getSpectrum(n),u.x,l.getLeftEdge(n),l.getRightEdge(n),i),p=dS(n,l.getSpectrum(n),u.y,l.getTopEdge(n),l.getBottomEdge(n),i),y=Go(r.element)/2,v=Ds(r.element)/2;Mo(r.element,"left",f-y+"px"),Mo(r.element,"top",p-v+"px")},onLeft:XB,onRight:uS,onUp:JB,onDown:QB,edgeActions:eL});const Pu=gl({name:"Slider",configFields:[Ne("stepSize",1),Ne("speedMultiplier",10),Ne("onChange",Ke),Ne("onChoose",Ke),Ne("onInit",Ke),Ne("onDragStart",Ke),Ne("onDragEnd",Ke),Ne("snapToGrid",!1),Ne("rounded",!0),vn("snapStart"),Xr("model",_r("mode",{x:[Ne("minX",0),Ne("maxX",100),ca("value",n=>so(n.mode.minX)),nt("getInitialValue"),Es("manager",UB)],y:[Ne("minY",0),Ne("maxY",100),ca("value",n=>so(n.mode.minY)),nt("getInitialValue"),Es("manager",YB)],xy:[Ne("minX",0),Ne("maxX",100),Ne("minY",0),Ne("maxY",100),ca("value",n=>so({x:n.mode.minX,y:n.mode.minY})),nt("getInitialValue"),Es("manager",H3)]})),Jt("sliderBehaviours",[po,Be]),ca("mouseIsDown",()=>so(!1))],partFields:FB,factory:(n,r,i,l)=>{const u=X=>Op(X,n,"thumb"),f=X=>Op(X,n,"spectrum"),p=X=>As(X,n,"left-edge"),y=X=>As(X,n,"right-edge"),v=X=>As(X,n,"top-edge"),C=X=>As(X,n,"bottom-edge"),O=n.model,T=O.manager,R=(X,Y)=>{T.setPositionFromValue(X,Y,n,{getLeftEdge:p,getRightEdge:y,getTopEdge:v,getBottomEdge:C,getSpectrum:f})},F=(X,Y)=>{O.value.set(Y);const ne=u(X);R(X,ne)},H=X=>{const Y=n.mouseIsDown.get();n.mouseIsDown.set(!1),Y&&As(X,n,"thumb").each(ne=>{const ie=O.value.get();n.onChoose(X,ne,ie)})},G=(X,Y)=>{Y.stop(),n.mouseIsDown.set(!0),n.onDragStart(X,u(X))},J=(X,Y)=>{Y.stop(),n.onDragEnd(X,u(X)),H(X)},ae=X=>{As(X,n,"spectrum").map(po.focusIn)};return{uid:n.uid,dom:n.dom,components:r,behaviours:Xo(n.sliderBehaviours,[po.config({mode:"special",focusIn:ae}),Be.config({store:{mode:"manual",getValue:X=>O.value.get(),setValue:F}}),ol.config({channels:{[L()]:{onReceive:H}}})]),events:Ho([Xe(v0(),(X,Y)=>{((ne,ie)=>{F(ne,ie);const de=u(ne);n.onChange(ne,de,ie)})(X,Y.event.value)}),Ss((X,Y)=>{const ne=O.getInitialValue();O.value.set(ne);const ie=u(X);R(X,ie);const de=f(X);n.onInit(X,ie,de,O.value.get())}),Xe(P(),G),Xe(ge(),J),Xe(at(),(X,Y)=>{ae(X),G(X,Y)}),Xe(Bo(),J)]),apis:{resetToMin:X=>{T.setToMin(X,n)},resetToMax:X=>{T.setToMax(X,n)},setValue:F,refresh:R},domModification:{styles:{position:"relative"}}}},apis:{setValue:(n,r,i)=>{n.setValue(r,i)},resetToMin:(n,r)=>{n.resetToMin(r)},resetToMax:(n,r)=>{n.resetToMax(r)},refresh:(n,r)=>{n.refresh(r)}}}),x0=Xt("rgb-hex-update"),pw=Xt("slider-update"),fS=Xt("palette-update"),gw="form",hw=[Jt("formBehaviours",[Be])],mS=n=>"",Rm=(n,r)=>({uid:n.uid,dom:n.dom,components:r,behaviours:Xo(n.formBehaviours,[Be.config({store:{mode:"manual",getValue:i=>{const l=n2(i,n);return Zn(l,(u,f)=>u().bind(p=>{return y=In.getCurrent(p),v=new Error(`Cannot find a current component to extract the value from for form part '${f}': `+Cu(p.element)),y.fold(()=>un.error(v),un.value);var y,v}).map(Be.getValue))},setValue:(i,l)=>{rs(l,(u,f)=>{As(i,n,f).each(p=>{In.getCurrent(p).each(y=>{Be.setValue(y,u)})})})}}})]),apis:{getField:(i,l)=>As(i,n,l).bind(In.getCurrent)}}),jg={getField:oy((n,r,i)=>n.getField(r,i)),sketch:n=>{const r=(()=>{const f=[];return{field:(p,y)=>(f.push(p),e2(gw,mS(p),y)),record:ue(f)}})(),i=n(r),l=r.record(),u=pt(l,f=>sl({name:f,pname:mS(f)}));return bv(gw,hw,u,Rm,i)}},V3=Xt("valid-input"),j3=Xt("invalid-input"),U3=Xt("validating-input"),pS="colorcustom.rgb.",w0={isEnabled:Gt,setEnabled:Ke,immediatelyShow:Ke,immediatelyHide:Ke},tL=(n,r,i,l,u,f)=>{const p=(F,H)=>{const G=H.get();F!==G.isEnabled()&&(G.setEnabled(F),F?G.immediatelyShow():G.immediatelyHide())},y=(F,H,G)=>zm.config({invalidClass:r("invalid"),notify:{onValidate:J=>{lo(J,U3,{type:F})},onValid:J=>{p(!1,G),lo(J,V3,{type:F,value:Be.getValue(J)})},onInvalid:J=>{p(!0,G),lo(J,j3,{type:F,value:Be.getValue(J)})}},validator:{validate:J=>{const ae=Be.getValue(J),X=H(ae)?un.value(!0):un.error(n("aria.input.invalid"));return Om(X)},validateOnLoad:!1}}),v=(F,H,G,J,ae)=>{const X=so(w0),Y=n(pS+"range"),ne=cs.parts.label({dom:{tag:"label",attributes:{"aria-label":J}},components:[wr(G)]}),ie=cs.parts.field({data:ae,factory:Mp,inputAttributes:{type:"text",...H==="hex"?{"aria-live":"polite"}:{}},inputClasses:[r("textfield")],inputBehaviours:xt([y(H,F,X),ws.config({}),Pr.config({...u({tooltipText:"",onSetup:Ze=>{X.set({isEnabled:()=>Pr.isEnabled(Ze),setEnabled:kt=>Pr.setEnabled(Ze,kt),immediatelyShow:()=>Pr.immediateOpenClose(Ze,!0),immediatelyHide:()=>Pr.immediateOpenClose(Ze,!1)}),Pr.setEnabled(Ze,!1)},onShow:(Ze,kt)=>{Pr.setComponents(Ze,[{dom:{tag:"p",classes:[r("rgb-warning-note")]},components:[wr(n(H==="hex"?"colorcustom.rgb.invalidHex":"colorcustom.rgb.invalid"))]}])}})})]),onSetValue:Ze=>{zm.isInvalid(Ze)&&zm.run(Ze).get(Ke)}}),de=Xt("aria-invalid"),we=ns(f("invalid",D.some(de),"warning")),ze=[ne,ie,ns({dom:{tag:"div",classes:[r("invalid-icon")]},components:[we.asSpec()]}).asSpec()],tt=H!=="hex"?[cs.parts["aria-descriptor"]({text:Y})]:[],Je=ze.concat(tt);return{dom:{tag:"div",attributes:{role:"presentation"},classes:[r("rgb-container")]},components:Je}},C=(F,H)=>{const G=H.red,J=H.green,ae=H.blue;Be.setValue(F,{red:G,green:J,blue:ae})},O=ns({dom:{tag:"div",classes:[r("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),T=(F,H)=>{O.getOpt(F).each(G=>{Mo(G.element,"background-color","#"+H.value)})};return cd({factory:()=>{const F={red:so(D.some(255)),green:so(D.some(255)),blue:so(D.some(255)),hex:so(D.some("ffffff"))},H=ze=>F[ze].get(),G=(ze,tt)=>{F[ze].set(tt)},J=ze=>{const tt=ze.red,Je=ze.green,Ze=ze.blue;G("red",D.some(tt)),G("green",D.some(Je)),G("blue",D.some(Ze))},ae=(ze,tt)=>{const Je=tt.event;Je.type!=="hex"?G(Je.type,D.none()):l(ze)},X=(ze,tt)=>{const Je=tt.event;(Ze=>Ze.type==="hex")(Je)?((Ze,kt)=>{i(Ze);const Wt=hC(kt);G("hex",D.some(Wt.value));const ro=Mu(Wt);C(Ze,ro),J(ro),lo(Ze,x0,{hex:Wt}),T(Ze,Wt)})(ze,Je.value):((Ze,kt,Wt)=>{const ro=parseInt(Wt,10);G(kt,D.some(ro)),H("red").bind(yo=>H("green").bind($o=>H("blue").map(xn=>Pp(yo,$o,xn,1)))).each(yo=>{const $o=((xn,Ls)=>{const Xs=c0(Ls);return jg.getField(xn,"hex").each(on=>{Po.isFocused(on)||Be.setValue(xn,{hex:Xs.value})}),Xs})(Ze,yo);lo(Ze,x0,{hex:$o}),T(Ze,$o)})})(ze,Je.type,Je.value)},Y=ze=>({label:n(pS+ze+".label"),description:n(pS+ze+".description")}),ne=Y("red"),ie=Y("green"),de=Y("blue"),we=Y("hex");return ls(jg.sketch(ze=>({dom:{tag:"form",classes:[r("rgb-form")],attributes:{"aria-label":n("aria.color.picker")}},components:[ze.field("red",cs.sketch(v(d0,"red",ne.label,ne.description,255))),ze.field("green",cs.sketch(v(d0,"green",ie.label,ie.description,255))),ze.field("blue",cs.sketch(v(d0,"blue",de.label,de.description,255))),ze.field("hex",cs.sketch(v(FO,"hex",we.label,we.description,"ffffff"))),O.asSpec()],formBehaviours:xt([zm.config({invalidClass:r("form-invalid")}),en("rgb-form-events",[Xe(V3,X),Xe(j3,ae),Xe(U3,ae)])])})),{apis:{updateHex:(ze,tt)=>{Be.setValue(ze,{hex:tt.value}),((Je,Ze)=>{const kt=Mu(Ze);C(Je,kt),J(kt)})(ze,tt),T(ze,tt)}}})},name:"RgbForm",configFields:[],apis:{updateHex:(F,H,G)=>{F.updateHex(H,G)}},extraApis:{}})},Z3=(n,r,i,l)=>cd({name:"ColourPicker",configFields:[nt("dom"),Ne("onValidHex",Ke),Ne("onInvalidHex",Ke)],factory:f=>{const p=tL(n,r,f.onValidHex,f.onInvalidHex,i,l),y=((ae,X)=>{const Y=Pu.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[X("sv-palette-spectrum")]}}),ne=Pu.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[X("sv-palette-thumb")],innerHtml:``}}),ie=(de,we)=>{const{width:ze,height:tt}=de,Je=de.getContext("2d");if(Je===null)return;Je.fillStyle=we,Je.fillRect(0,0,ze,tt);const Ze=Je.createLinearGradient(0,0,ze,0);Ze.addColorStop(0,"rgba(255,255,255,1)"),Ze.addColorStop(1,"rgba(255,255,255,0)"),Je.fillStyle=Ze,Je.fillRect(0,0,ze,tt);const kt=Je.createLinearGradient(0,0,0,tt);kt.addColorStop(0,"rgba(0,0,0,0)"),kt.addColorStop(1,"rgba(0,0,0,1)"),Je.fillStyle=kt,Je.fillRect(0,0,ze,tt)};return cd({factory:de=>{const we=ue({x:0,y:0}),ze=xt([In.config({find:D.some}),Po.config({})]);return Pu.sketch({dom:{tag:"div",attributes:{role:"slider","aria-valuetext":ae(["Saturation {0}%, Brightness {1}%",0,0])},classes:[X("sv-palette")]},model:{mode:"xy",getInitialValue:we},rounded:!1,components:[Y,ne],onChange:(tt,Je,Ze)=>{Bt(Ze)||wo(tt.element,"aria-valuetext",ae(["Saturation {0}%, Brightness {1}%",Math.floor(Ze.x),Math.floor(100-Ze.y)])),lo(tt,fS,{value:Ze})},onInit:(tt,Je,Ze,kt)=>{ie(Ze.element.dom,jO(UO))},sliderBehaviours:ze})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:(de,we,ze)=>{((tt,Je)=>{const Ze=tt.components()[0].element.dom,kt=Gy(Je,100,100),Wt=VO(kt);ie(Ze,jO(Wt))})(we,ze)},setThumb:(de,we,ze)=>{((tt,Je)=>{const Ze=Px(Mu(Je));Pu.setValue(tt,{x:Ze.saturation,y:100-Ze.value}),wo(tt.element,"aria-valuetext",ae(["Saturation {0}%, Brightness {1}%",Ze.saturation,Ze.value]))})(we,ze)}},extraApis:{}})})(n,r),v={paletteRgba:so(UO),paletteHue:so(0)},C=ns(((ae,X)=>{const Y=Pu.parts.spectrum({dom:{tag:"div",classes:[X("hue-slider-spectrum")],attributes:{role:"presentation"}}}),ne=Pu.parts.thumb({dom:{tag:"div",classes:[X("hue-slider-thumb")],attributes:{role:"presentation"}}});return Pu.sketch({dom:{tag:"div",classes:[X("hue-slider")],attributes:{role:"slider","aria-valuemin":0,"aria-valuemax":360,"aria-valuenow":120}},rounded:!1,model:{mode:"y",getInitialValue:ue(0)},components:[Y,ne],sliderBehaviours:xt([Po.config({})]),onChange:(ie,de,we)=>{wo(ie.element,"aria-valuenow",Math.floor(360-3.6*we)),lo(ie,pw,{value:we})}})})(0,r)),O=ns(y.sketch({})),T=ns(p.sketch({})),R=(ae,X,Y)=>{O.getOpt(ae).each(ne=>{y.setHue(ne,Y)})},F=(ae,X)=>{T.getOpt(ae).each(Y=>{p.updateHex(Y,X)})},H=(ae,X,Y)=>{C.getOpt(ae).each(ne=>{Pu.setValue(ne,(ie=>100-ie/360*100)(Y))})},G=(ae,X)=>{O.getOpt(ae).each(Y=>{y.setThumb(Y,X)})},J=(ae,X,Y,ne)=>{((ie,de)=>{const we=Mu(ie);v.paletteRgba.set(we),v.paletteHue.set(de)})(X,Y),Ht(ne,ie=>{ie(ae,X,Y)})};return{uid:f.uid,dom:f.dom,components:[O.asSpec(),C.asSpec(),T.asSpec()],behaviours:xt([en("colour-picker-events",[Xe(x0,(()=>{const ae=[R,H,G];return(X,Y)=>{const ne=Y.event.hex,ie=(de=>Px(Mu(de)))(ne);J(X,ne,ie.hue,ae)}})()),Xe(fS,(()=>{const ae=[F];return(X,Y)=>{const ne=Y.event.value,ie=v.paletteHue.get(),de=Gy(ie,ne.x,100-ne.y),we=Ix(de);J(X,we,ie,ae)}})()),Xe(pw,(()=>{const ae=[R,F];return(X,Y)=>{const ne=(tt=>(100-tt)/100*360)(Y.event.value),ie=v.paletteRgba.get(),de=Px(ie),we=Gy(ne,de.saturation,de.value),ze=Ix(we);J(X,ze,ne,ae)}})())]),In.config({find:ae=>T.getOpt(ae)}),po.config({mode:"acyclic"})])}}}),Mm=()=>In.config({find:D.some}),gS=n=>In.config({find:r=>vs(r.element,n).bind(i=>r.getSystem().getByDom(i).toOptional())}),hS=ho([Ne("preprocess",Ct),Ne("postprocess",Ct)]),bS=(n,r)=>{const i=la("RepresentingConfigs.memento processors",hS,r);return Be.config({store:{mode:"manual",getValue:l=>{const u=n.get(l),f=Be.getValue(u);return i.postprocess(f)},setValue:(l,u)=>{const f=i.preprocess(u),p=n.get(l);Be.setValue(p,f)}}})},wb=(n,r,i)=>Be.config({store:{mode:"manual",...n.map(l=>({initialValue:l})).getOr({}),getValue:r,setValue:i}}),yS=(n,r,i)=>wb(n,l=>r(l.element),(l,u)=>i(l.element,u)),k0=n=>Be.config({store:{mode:"memory",initialValue:n}}),oL={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","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"};var W3=tinymce.util.Tools.resolve("tinymce.Resource");const vS=n=>Vo(n,"init");var Hp=tinymce.util.Tools.resolve("tinymce.util.Tools");const _S=(n,r)=>{let i=null;const l=()=>{We(i)||(clearTimeout(i),i=null)};return{cancel:l,throttle:(...u)=>{l(),i=setTimeout(()=>{i=null,n.apply(null,u)},r)}}},xS=Xt("alloy-fake-before-tabstop"),wS=Xt("alloy-fake-after-tabstop"),q3=n=>({dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:n},behaviours:xt([Po.config({ignore:!0}),ws.config({})])}),kS=(n,r)=>({dom:{tag:"div",classes:["tox-navobj",...n.getOr([])]},components:[q3([xS]),r,q3([wS])],behaviours:xt([gS(1)])}),CS=(n,r)=>{lo(n,Ws(),{raw:{which:9,shiftKey:r}})},nL=(n,r)=>{const i=r.element;_n(i,xS)?CS(n,!0):_n(i,wS)&&CS(n,!1)},t1=n=>Jy(n,["."+xS,"."+wS].join(","),Fe),Ug=Xt("update-dialog"),SS=Xt("update-title"),K3=Xt("update-body"),G3=Xt("update-footer"),ES=Xt("body-send-message"),bw=Xt("dialog-focus-shifted"),TS=Yr().browser,o1=TS.isSafari(),Y3=TS.isFirefox(),AS=o1||Y3,X3=TS.isChromium(),sL=({scrollTop:n,scrollHeight:r,clientHeight:i})=>Math.ceil(n)+i>=r,J3=(n,r)=>n.scrollTo(0,r==="bottom"?99999999:r),OS=(n,r,i)=>{const l=n.dom;D.from(l.contentDocument).fold(i,u=>{let f=0;const p=((v,C)=>{const O=v.body;return D.from(!/^1))?O:v.documentElement)})(u,r).map(v=>(f=v.scrollTop,v)).forall(sL),y=()=>{const v=l.contentWindow;st(v)&&(p?J3(v,"bottom"):!p&&AS&&f!==0&&J3(v,f))};o1&&l.addEventListener("load",y,{once:!0}),u.open(),u.write(r),u.close(),o1||y()})},zS=nn(AS,o1?500:200).map(n=>((r,i)=>{let l=null,u=null;return{cancel:()=>{We(l)||(clearTimeout(l),l=null,u=null)},throttle:(...f)=>{u=f,We(l)&&(l=setTimeout(()=>{const p=u;l=null,u=null,r.apply(null,p)},i))}}})(OS,n)),yw=Xt("toolbar.button.execute"),Zg=Xt("common-button-display-events"),NS={[di()]:["disabling","alloy.base.behaviour","toggling","toolbar-button-events","tooltipping"],[ka()]:["toolbar-button-events",Zg],[Dl()]:["toolbar-button-events","dropdown-events","tooltipping"],[at()]:["focusing","alloy.base.behaviour",Zg]},vw=n=>Mo(n.element,"width",Ns(n.element,"width")),Q3=(n,r,i)=>Hc(n,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:i},r),C0=(n,r)=>Q3(n,r,[]),Wg=(n,r)=>Q3(n,r,[So.config({})]),DS=(n,r,i)=>({dom:{tag:"span",classes:[`${r}__select-label`]},components:[wr(i.translate(n))],behaviours:xt([So.config({})])}),gd=Xt("update-menu-text"),Xd=Xt("update-menu-icon"),RS=(n,r,i,l)=>{const u=so(Ke),f=n.text.map(G=>ns(DS(G,r,i.providers))),p=n.icon.map(G=>ns(Wg(G,i.providers.icons))),y=(G,J)=>{const ae=Be.getValue(G);return Po.focus(ae),lo(ae,"keydown",{raw:J.event.raw}),rl.close(ae),D.some(!0)},v=n.role.fold(()=>({}),G=>({role:G})),C=D.from(n.listRole).map(G=>({listRole:G})).getOr({}),O=n.ariaLabel.fold(()=>({}),G=>({"aria-label":i.providers.translate(G)})),T=Hc("chevron-down",{tag:"div",classes:[`${r}__select-chevron`]},i.providers.icons),R=Xt("common-button-display-events"),F="dropdown-events";return ns(rl.sketch({...n.uid?{uid:n.uid}:{},...v,...C,dom:{tag:"button",classes:[r,`${r}--select`].concat(pt(n.classes,G=>`${r}--${G}`)),attributes:{...O,...st(l)?{"data-mce-name":l}:{}}},components:Uy([p.map(G=>G.asSpec()),f.map(G=>G.asSpec()),D.some(T)]),matchWidth:!0,useMinWidth:!0,onOpen:(G,J,ae)=>{n.searchable&&(X=>{uO(X).each(Y=>Po.focus(Y))})(ae)},dropdownBehaviours:xt([...n.dropdownBehaviours,gi(()=>n.disabled||i.providers.isDisabled()),Ca(),vb.config({}),So.config({}),...n.tooltip.map(G=>Pr.config(i.providers.tooltips.getConfig({tooltipText:i.providers.translate(G)}))).toArray(),en(F,[Lg(n,u),Bp(n,u)]),en(R,[Ss((G,J)=>n.listRole==="listbox"?Ke:vw(G))]),en("menubutton-update-display-text",[Xe(gd,(G,J)=>{f.bind(ae=>ae.getOpt(G)).each(ae=>{So.set(ae,[wr(i.providers.translate(J.event.text))])})}),Xe(Xd,(G,J)=>{p.bind(ae=>ae.getOpt(G)).each(ae=>{So.set(ae,[Wg(J.event.icon,i.providers.icons)])})})])]),eventOrder:ls(NS,{[at()]:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"],[ka()]:["toolbar-button-events",Pr.name(),F,R]}),sandboxBehaviours:xt([po.config({mode:"special",onLeft:y,onRight:y}),en("dropdown-sandbox-events",[Xe(lO,(G,J)=>{(ae=>{const X=Be.getValue(ae),Y=e0(ae).map(fO);rl.refetch(X).get(()=>{const ne=kr.getCoupled(X,"sandbox");Y.each(ie=>e0(ne).each(de=>((we,ze)=>{Be.setValue(we,ze.fetchPattern),we.element.dom.selectionStart=ze.selectionStart,we.element.dom.selectionEnd=ze.selectionEnd})(de,ie)))})})(G),J.stop()}),Xe(cO,(G,J)=>{((ae,X)=>{(Y=>x.getState(Y).bind(ss.getHighlighted).bind(ss.getHighlighted))(ae).each(Y=>{((ne,ie,de,we)=>{const ze={...we,target:ie};ne.getSystem().triggerEvent(de,ie,ze)})(ae,Y.element,X.event.eventType,X.event.interactionEvent)})})(G,J),J.stop()})])]),lazySink:i.getSink,toggleClass:`${r}--active`,parts:{menu:{...Cx(0,n.columns,n.presets),fakeFocus:n.searchable,...n.listRole==="listbox"?{}:{onHighlightItem:f3,onCollapseMenu:(G,J,ae)=>{ss.getHighlighted(ae).each(X=>{f3(G,ae,X)})},onDehighlightItem:EB}}},getAnchorOverrides:()=>({maxHeightFunction:(G,J)=>{pm()(G,J-10)}}),fetch:G=>Pg(ot(n.fetch,G))})).asSpec()},_w=n=>n.type==="separator",xw={type:"separator"},ez=(n,r)=>{const i=((l,u)=>{const f=zo(l,(p,y)=>(v=>te(v))(y)?y===""?p:y==="|"?p.length>0&&!_w(p[p.length-1])?p.concat([xw]):p:Vo(u,y.toLowerCase())?p.concat([u[y.toLowerCase()]]):p:p.concat([y]),[]);return f.length>0&&_w(f[f.length-1])&&f.pop(),f})(te(n)?n.split(" "):n,r);return fn(i,(l,u)=>{if((f=>Vo(f,"getSubmenuItems"))(u)){const f=(y=>{const v=St(y,"value").getOrThunk(()=>Xt("generated-menu-item"));return ls({value:v},y)})(u),p=((y,v)=>{const C=y.getSubmenuItems(),O=ez(C,v);return{item:y,menus:ls(O.menus,{[y.value]:O.items}),expansions:ls(O.expansions,{[y.value]:y.value})}})(f,r);return{menus:ls(l.menus,p.menus),items:[p.item,...l.items],expansions:ls(l.expansions,p.expansions)}}return{...l,items:[u,...l.items]}},{menus:{},expansions:{},items:[]})},kb=(n,r,i,l)=>{const u=Xt("primary-menu"),f=ez(n,i.shared.providers.menuItems());if(f.items.length===0)return D.none();const p=(T=>T.search.fold(()=>({searchMode:"no-search"}),R=>({searchMode:"search-with-field",placeholder:R.placeholder})))(l),y=m3(u,f.items,r,i,l.isHorizontalMenu,p),v=(T=>T.search.fold(()=>({searchMode:"no-search"}),R=>({searchMode:"search-with-results"})))(l),C=Zn(f.menus,(T,R)=>m3(R,T,r,i,!1,v)),O=ls(C,ci(u,y));return D.from(zp.tieredData(u,O,f.expansions))},S0=n=>!Vo(n,"items"),MS="data-value",ww=(n,r,i,l,u)=>pt(i,f=>S0(f)?{type:"togglemenuitem",...u?{}:{role:"option"},text:f.text,value:f.value,active:f.value===l,onAction:()=>{Be.setValue(n,f.value),lo(n,Zi,{name:r}),Po.focus(n)}}:{type:"nestedmenuitem",text:f.text,getSubmenuItems:()=>ww(n,r,f.items,l,u)}),kw=(n,r)=>ko(n,i=>S0(i)?nn(i.value===r,i):kw(i.items,r)),rL=cd({name:"HtmlSelect",configFields:[nt("options"),Jt("selectBehaviours",[Po,Be]),Ne("selectClasses",[]),Ne("selectAttributes",{}),vn("data")],factory:(n,r)=>{const i=pt(n.options,u=>({dom:{tag:"option",value:u.value,innerHtml:u.text}})),l=n.data.map(u=>ci("initialValue",u)).getOr({});return{uid:n.uid,dom:{tag:"select",classes:n.selectClasses,attributes:n.selectAttributes},components:i,behaviours:Xo(n.selectBehaviours,[Po.config({}),Be.config({store:{mode:"manual",getValue:u=>rf(u.element),setValue:(u,f)=>{const p=yt(n.options);j(n.options,y=>y.value===f).isSome()?im(u.element,f):u.element.dom.selectedIndex===-1&&f===""&&p.each(y=>im(u.element,y.value))},...l}})])}}}),tz=ue([Ne("field1Name","field1"),Ne("field2Name","field2"),Id("onLockedChange"),mp(["lockClass"]),Ne("locked",!1),Io("coupledFieldBehaviours",[In,Be])]),BS=(n,r)=>sl({factory:cs,name:n,overrides:i=>({fieldBehaviours:xt([en("coupled-input-behaviour",[Xe(hu(),l=>{((u,f,p)=>As(u,f,p).bind(In.getCurrent))(l,i,r).each(u=>{As(l,i,"lock").each(f=>{No.isOn(f)&&i.onLockedChange(l,u,f)})})})])])})}),oz=ue([BS("field1","field2"),BS("field2","field1"),sl({factory:zi,schema:[nt("dom")],name:"lock",overrides:n=>({buttonBehaviours:xt([No.config({selected:n.locked,toggleClass:n.markers.lockClass,aria:{mode:"pressed"}})])})})]),Uc=gl({name:"FormCoupledInputs",configFields:tz(),partFields:oz(),factory:(n,r,i,l)=>({uid:n.uid,dom:n.dom,components:r,behaviours:Oo(n.coupledFieldBehaviours,[In.config({find:D.some}),Be.config({store:{mode:"manual",getValue:u=>{const f=s2(u,n,["field1","field2"]);return{[n.field1Name]:Be.getValue(f.field1()),[n.field2Name]:Be.getValue(f.field2())}},setValue:(u,f)=>{const p=s2(u,n,["field1","field2"]);an(f,n.field1Name)&&Be.setValue(p.field1(),f[n.field1Name]),an(f,n.field2Name)&&Be.setValue(p.field2(),f[n.field2Name])}}})]),apis:{getField1:u=>As(u,n,"field1"),getField2:u=>As(u,n,"field2"),getLock:u=>As(u,n,"lock")}}),apis:{getField1:(n,r)=>n.getField1(r),getField2:(n,r)=>n.getField2(r),getLock:(n,r)=>n.getLock(r)}}),LS=n=>{const r=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(n);if(r!==null){const i=parseFloat(r[1]),l=r[2];return un.value({value:i,unit:l})}return un.error(n)},PS=(n,r)=>{const i={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},l=u=>Vo(i,u);return n.unit===r?D.some(n.value):l(n.unit)&&l(r)?i[n.unit]===i[r]?D.some(n.value):D.some(n.value/i[n.unit]*i[r]):D.none()},IS=n=>D.none(),nz=(n,r)=>{const i=n.label.map(O=>Fg(O,r)),l=[Fo.config({disabled:()=>n.disabled||r.isDisabled()}),Ca(),po.config({mode:"execution",useEnter:n.multiline!==!0,useControlEnter:n.multiline===!0,execute:O=>(Qo(O,y0),D.some(!0))}),en("textfield-change",[Xe(hu(),(O,T)=>{lo(O,Zi,{name:n.name})}),Xe(Gf(),(O,T)=>{lo(O,Zi,{name:n.name})})]),ws.config({})],u=n.validation.map(O=>zm.config({getRoot:T=>ba(T.element),invalidClass:"tox-invalid",validator:{validate:T=>{const R=Be.getValue(T),F=O.validator(R);return Om(F===!0?un.value(R):un.error(F))},validateOnLoad:O.validateOnLoad}})).toArray(),f={...n.placeholder.fold(ue({}),O=>({placeholder:r.translate(O)})),...n.inputMode.fold(ue({}),O=>({inputmode:O})),"data-mce-name":n.name},p=cs.parts.field({tag:n.multiline===!0?"textarea":"input",...n.data.map(O=>({data:O})).getOr({}),inputAttributes:f,inputClasses:[n.classname],inputBehaviours:xt(Cs([l,u])),selectOnFocus:!1,factory:Mp}),y=n.multiline?{dom:{tag:"div",classes:["tox-textarea-wrap"]},components:[p]}:p,v=(n.flex?["tox-form__group--stretched"]:[]).concat(n.maximized?["tox-form-group--maximize"]:[]),C=[Fo.config({disabled:()=>n.disabled||r.isDisabled(),onDisabled:O=>{cs.getField(O).each(Fo.disable)},onEnabled:O=>{cs.getField(O).each(Fo.enable)}}),Ca()];return b0(i,y,v,C)},E0=(n,r)=>r.getAnimationRoot.fold(()=>n.element,i=>i(n)),Vp=n=>n.dimension.property,qg=(n,r)=>n.dimension.getDimension(r),Kg=(n,r)=>{const i=E0(n,r);Qn(i,[r.shrinkingClass,r.growingClass])},Cw=(n,r)=>{co(n.element,r.openClass),Tt(n.element,r.closedClass),Mo(n.element,Vp(r),"0px"),wl(n.element)},FS=(n,r)=>{co(n.element,r.closedClass),Tt(n.element,r.openClass),Vn(n.element,Vp(r))},sz=(n,r,i,l)=>{i.setCollapsed(),Mo(n.element,Vp(r),qg(r,n.element)),Kg(n,r),Cw(n,r),r.onStartShrink(n),r.onShrunk(n)},aL=(n,r,i,l)=>{const u=l.getOrThunk(()=>qg(r,n.element));i.setCollapsed(),Mo(n.element,Vp(r),u),wl(n.element);const f=E0(n,r);co(f,r.growingClass),Tt(f,r.shrinkingClass),Cw(n,r),r.onStartShrink(n)},rz=(n,r,i)=>{const l=qg(r,n.element);(l==="0px"?sz:aL)(n,r,i,D.some(l))},az=(n,r,i)=>{const l=E0(n,r),u=_n(l,r.shrinkingClass),f=qg(r,n.element);FS(n,r);const p=qg(r,n.element);(u?()=>{Mo(n.element,Vp(r),f),wl(n.element)}:()=>{Cw(n,r)})(),co(l,r.shrinkingClass),Tt(l,r.growingClass),FS(n,r),Mo(n.element,Vp(r),p),i.setExpanded(),r.onStartGrow(n)},T0=(n,r,i)=>{const l=E0(n,r);return _n(l,r.growingClass)===!0},iz=(n,r,i)=>{const l=E0(n,r);return _n(l,r.shrinkingClass)===!0};var lz=Object.freeze({__proto__:null,refresh:(n,r,i)=>{if(i.isExpanded()){Vn(n.element,Vp(r));const l=qg(r,n.element);Mo(n.element,Vp(r),l)}},grow:(n,r,i)=>{i.isExpanded()||az(n,r,i)},shrink:(n,r,i)=>{i.isExpanded()&&rz(n,r,i)},immediateShrink:(n,r,i)=>{i.isExpanded()&&sz(n,r,i)},hasGrown:(n,r,i)=>i.isExpanded(),hasShrunk:(n,r,i)=>i.isCollapsed(),isGrowing:T0,isShrinking:iz,isTransitioning:(n,r,i)=>T0(n,r)||iz(n,r),toggleGrow:(n,r,i)=>{(i.isExpanded()?rz:az)(n,r,i)},disableTransitions:Kg,immediateGrow:(n,r,i)=>{i.isExpanded()||(FS(n,r),Mo(n.element,Vp(r),qg(r,n.element)),Kg(n,r),i.setExpanded(),r.onStartGrow(n),r.onGrown(n))}}),iL=Object.freeze({__proto__:null,exhibit:(n,r,i)=>{const l=r.expanded;return ar(l?{classes:[r.openClass],styles:{}}:{classes:[r.closedClass],styles:ci(r.dimension.property,"0px")})},events:(n,r)=>Ho([Pd(sp(),(i,l)=>{l.event.raw.propertyName===n.dimension.property&&(Kg(i,n),r.isExpanded()&&Vn(i.element,n.dimension.property),(r.isExpanded()?n.onGrown:n.onShrunk)(i))})])}),cz=[nt("closedClass"),nt("openClass"),nt("shrinkingClass"),nt("growingClass"),vn("getAnimationRoot"),Dn("onShrunk"),Dn("onStartShrink"),Dn("onGrown"),Dn("onStartGrow"),Ne("expanded",!1),Xr("dimension",_r("property",{width:[Es("property","width"),Es("getDimension",n=>Go(n)+"px")],height:[Es("property","height"),Es("getDimension",n=>Ds(n)+"px")]}))];const Fl=Qr({fields:cz,name:"sliding",active:iL,apis:lz,state:Object.freeze({__proto__:null,init:n=>{const r=so(n.expanded);return Jr({isExpanded:()=>r.get()===!0,isCollapsed:()=>r.get()===!1,setCollapsed:ot(r.set,!1),setExpanded:ot(r.set,!0),readState:()=>"expanded: "+r.get()})}})}),dz=n=>({isEnabled:()=>!Fo.isDisabled(n),setEnabled:r=>Fo.set(n,!r),setActive:r=>{const i=n.element;r?(Tt(i,"tox-tbtn--enabled"),wo(i,"aria-pressed",!0)):(co(i,"tox-tbtn--enabled"),pn(i,"aria-pressed"))},isActive:()=>_n(n.element,"tox-tbtn--enabled"),setText:r=>{lo(n,gd,{text:r})},setIcon:r=>lo(n,Xd,{icon:r})}),n1=(n,r,i,l,u=!0,f)=>RS({text:n.text,icon:n.icon,tooltip:n.tooltip,ariaLabel:n.tooltip,searchable:n.search.isSome(),role:l,fetch:(p,y)=>{const v={pattern:n.search.isSome()?yb(p):""};n.fetch(C=>{y(kb(C,Sf.CLOSE_ON_EXECUTE,i,{isHorizontalMenu:!1,search:n.search}))},v,dz(p))},onSetup:n.onSetup,getApi:dz,columns:1,presets:"normal",classes:[],dropdownBehaviours:[...u?[ws.config({})]:[]]},r,i.shared,f),uz=(n,r,i)=>{const l=f=>p=>{const y=!p.isActive();p.setActive(y),f.storage.set(y),i.shared.getSink().each(v=>{r().getOpt(v).each(C=>{Ti(C.element),lo(C,Tf,{name:f.name,value:f.storage.get()})})})},u=f=>p=>{p.setActive(f.storage.get())};return f=>{f(pt(n,p=>{const y=p.text.fold(()=>({}),v=>({text:v}));return{type:p.type,active:!1,...y,onAction:l(p),onSetup:u(p)}}))}},$S=n=>({dom:{tag:"span",classes:["tox-tree__label"],attributes:{"aria-label":n}},components:[wr(n)]}),HS=Xt("leaf-label-event-id"),VS=({leaf:n,onLeafAction:r,visible:i,treeId:l,selectedId:u,backstage:f})=>{const p=n.menu.map(v=>n1(v,"tox-mbtn",f,D.none(),i)),y=[$S(n.title)];return p.each(v=>y.push(v)),zi.sketch({dom:{tag:"div",classes:["tox-tree--leaf__label","tox-trbtn"].concat(i?["tox-tree--leaf__label--visible"]:[])},components:y,role:"treeitem",action:v=>{r(n.id),v.getSystem().broadcastOn([`update-active-item-${l}`],{value:n.id})},eventOrder:{[Ws()]:[HS,"keying"]},buttonBehaviours:xt([...i?[ws.config({})]:[],No.config({toggleClass:"tox-trbtn--enabled",toggleOnExecute:!1,aria:{mode:"selected"}}),ol.config({channels:{[`update-active-item-${l}`]:{onReceive:(v,C)=>{(C.value===n.id?No.on:No.off)(v)}}}}),en(HS,[Ss((v,C)=>{u.each(O=>{(O===n.id?No.on:No.off)(v)})}),Xe(Ws(),(v,C)=>{const O=C.event.raw.code==="ArrowLeft",T=C.event.raw.code==="ArrowRight";O?(cm(v.element,".tox-tree--directory").each(R=>{v.getSystem().getByDom(R).each(F=>{iy(R,".tox-tree--directory__label").each(H=>{F.getSystem().getByDom(H).each(Po.focus)})})}),C.stop()):T&&C.stop()})])])})},fz=Xt("directory-label-event-id"),lL=({directory:n,visible:r,noChildren:i,backstage:l})=>{const u=n.menu.map(C=>n1(C,"tox-mbtn",l,D.none())),f=[{dom:{tag:"div",classes:["tox-chevron"]},components:[(p="chevron-right",y=l.shared.providers.icons,((C,O,T)=>Hc(C,{tag:"span",classes:["tox-tree__icon-wrap","tox-icon"],behaviours:[]},O))(p,y))]},$S(n.title)];var p,y;u.each(C=>{f.push(C)});const v=C=>{cm(C.element,".tox-tree--directory").each(O=>{C.getSystem().getByDom(O).each(T=>{const R=!No.isOn(T);No.toggle(T),lo(C,"expand-tree-node",{expanded:R,node:n.id})})})};return zi.sketch({dom:{tag:"div",classes:["tox-tree--directory__label","tox-trbtn"].concat(r?["tox-tree--directory__label--visible"]:[])},components:f,action:v,eventOrder:{[Ws()]:[fz,"keying"]},buttonBehaviours:xt([...r?[ws.config({})]:[],en(fz,[Xe(Ws(),(C,O)=>{const T=O.event.raw.code==="ArrowRight",R=O.event.raw.code==="ArrowLeft";T&&i&&O.stop(),(T||R)&&cm(C.element,".tox-tree--directory").each(F=>{C.getSystem().getByDom(F).each(H=>{!No.isOn(H)&&T||No.isOn(H)&&R?(v(C),O.stop()):R&&!No.isOn(H)&&(cm(H.element,".tox-tree--directory").each(G=>{iy(G,".tox-tree--directory__label").each(J=>{H.getSystem().getByDom(J).each(Po.focus)})}),O.stop())})})})])])})},cL=({children:n,onLeafAction:r,visible:i,treeId:l,expandedIds:u,selectedId:f,backstage:p})=>({dom:{tag:"div",classes:["tox-tree--directory__children"]},components:n.map(y=>y.type==="leaf"?VS({leaf:y,selectedId:f,onLeafAction:r,visible:i,treeId:l,backstage:p}):Sw({directory:y,expandedIds:u,selectedId:f,onLeafAction:r,labelTabstopping:i,treeId:l,backstage:p})),behaviours:xt([Fl.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:i}),So.config({})])}),mz=Xt("directory-event-id"),Sw=({directory:n,onLeafAction:r,labelTabstopping:i,treeId:l,backstage:u,expandedIds:f,selectedId:p})=>{const{children:y}=n,v=so(f),C=f.includes(n.id);return{dom:{tag:"div",classes:["tox-tree--directory"],attributes:{role:"treeitem"}},components:[lL({directory:n,visible:i,noChildren:n.children.length===0,backstage:u}),cL({children:y,expandedIds:f,selectedId:p,onLeafAction:r,visible:C,treeId:l,backstage:u})],behaviours:xt([en(mz,[Ss((O,T)=>{No.set(O,C)}),Xe("expand-tree-node",(O,T)=>{const{expanded:R,node:F}=T.event;v.set(R?[...v.get(),F]:v.get().filter(H=>H!==F))})]),No.config({...n.children.length>0?{aria:{mode:"expanded"}}:{},toggleClass:"tox-tree--directory--expanded",onToggled:(O,T)=>{const R=O.components()[1],F=(H=T,y.map(G=>G.type==="leaf"?VS({leaf:G,selectedId:p,onLeafAction:r,visible:H,treeId:l,backstage:u}):Sw({directory:G,expandedIds:v.get(),selectedId:p,onLeafAction:r,labelTabstopping:H,treeId:l,backstage:u})));var H;T?Fl.grow(R):Fl.shrink(R),So.set(R,F)}})])}},dL=Xt("tree-event-id");var uL=Object.freeze({__proto__:null,events:(n,r)=>{const i=n.stream.streams.setup(n,r);return Ho([Xe(n.event,i),Oc(()=>r.cancel())].concat(n.cancelEvent.map(l=>[Xe(l,()=>r.cancel())]).getOr([])))}});const pz=n=>{const r=so(null);return Jr({readState:()=>({timer:r.get()!==null?"set":"unset"}),setTimer:i=>{r.set(i)},cancel:()=>{const i=r.get();i!==null&&i.cancel()}})};var fL=Object.freeze({__proto__:null,throttle:pz,init:n=>n.stream.streams.state(n)}),mL=[Xr("stream",_r("mode",{throttle:[nt("delay"),Ne("stopEvent",!0),Es("streams",{setup:(n,r)=>{const i=n.stream,l=_S(n.onStream,i.delay);return r.setTimer(l),(u,f)=>{l.throttle(u,f),i.stopEvent&&f.stop()}},state:pz})]})),Ne("event","input"),vn("cancelEvent"),Id("onStream")];const jS=Qr({fields:mL,name:"streaming",active:uL,state:fL}),Ew=(n,r,i)=>{const l=Be.getValue(i);Be.setValue(r,l),US(r)},Tw=(n,r)=>{const i=n.element,l=rf(i),u=i.dom;yr(i,"type")!=="number"&&r(u,l)},US=n=>{Tw(n,(r,i)=>r.setSelectionRange(i.length,i.length))},ZS=ue("alloy.typeahead.itemexecute"),pL=ue([vn("lazySink"),nt("fetch"),Ne("minChars",5),Ne("responseTime",1e3),Dn("onOpen"),Ne("getHotspot",D.some),Ne("getAnchorOverrides",ue({})),Ne("layouts",D.none()),Ne("eventOrder",{}),wa("model",{},[Ne("getDisplayText",n=>n.meta!==void 0&&n.meta.text!==void 0?n.meta.text:n.value),Ne("selectsOver",!0),Ne("populateFromBrowse",!0)]),Dn("onSetValue"),el("onExecute"),Dn("onItemExecute"),Ne("inputClasses",[]),Ne("inputAttributes",{}),Ne("inputStyles",{}),Ne("matchWidth",!0),Ne("useMinWidth",!1),Ne("dismissOnBlur",!0),mp(["openClass"]),vn("initialData"),vn("listRole"),Jt("typeaheadBehaviours",[Po,Be,jS,po,No,kr]),ca("lazyTypeaheadComp",()=>so(D.none)),ca("previewing",()=>so(!0))].concat(YM()).concat(FC())),gz=ue([Nu({schema:[fp()],name:"menu",overrides:n=>({fakeFocus:!0,onHighlightItem:(r,i,l)=>{n.previewing.get()?n.lazyTypeaheadComp.get().each(u=>{((f,p,y)=>{if(f.selectsOver){const v=Be.getValue(p),C=f.getDisplayText(v),O=Be.getValue(y);return f.getDisplayText(O).indexOf(C)===0?D.some(()=>{Ew(0,p,y),((T,R)=>{Tw(T,(F,H)=>F.setSelectionRange(R,H.length))})(p,C.length)}):D.none()}return D.none()})(n.model,u,l).fold(()=>{n.model.selectsOver?(ss.dehighlight(i,l),n.previewing.set(!0)):n.previewing.set(!1)},f=>{f(),n.previewing.set(!1)})}):n.lazyTypeaheadComp.get().each(u=>{n.model.populateFromBrowse&&Ew(n.model,u,l),Fs(l.element,"id").each(f=>wo(u.element,"aria-activedescendant",f))})},onExecute:(r,i)=>n.lazyTypeaheadComp.get().map(l=>(lo(l,ZS(),{item:i}),!0)),onHover:(r,i)=>{n.previewing.set(!1),n.lazyTypeaheadComp.get().each(l=>{n.model.populateFromBrowse&&Ew(n.model,l,i)})}})})]),gL=gl({name:"Typeahead",configFields:pL(),partFields:gz(),factory:(n,r,i,l)=>{const u=(T,R,F)=>{n.previewing.set(!1);const H=kr.getCoupled(T,"sandbox");if(x.isOpen(H))In.getCurrent(H).each(G=>{ss.getHighlighted(G).fold(()=>{F(G)},()=>{Ml(H,G.element,"keydown",R)})});else{const G=J=>{In.getCurrent(J).each(F)};Vx(n,p(T),T,H,l,G,Ui.HighlightMenuAndItem).get(Ke)}},f=XM(n),p=T=>R=>R.map(F=>{const H=ra(F.menus),G=Sn(H,J=>cn(J.items,ae=>ae.type==="item"));return Be.getState(T).update(pt(G,J=>J.data)),F}),y=T=>In.getCurrent(T),v="typeaheadevents",C=[Po.config({}),Be.config({onSetValue:n.onSetValue,store:{mode:"dataset",getDataKey:T=>rf(T.element),getFallbackEntry:T=>({value:T,meta:{}}),setValue:(T,R)=>{im(T.element,n.model.getDisplayText(R))},...n.initialData.map(T=>ci("initialValue",T)).getOr({})}}),jS.config({stream:{mode:"throttle",delay:n.responseTime,stopEvent:!1},onStream:(T,R)=>{const F=kr.getCoupled(T,"sandbox");if(Po.isFocused(T)&&rf(T.element).length>=n.minChars){const H=y(F).bind(J=>ss.getHighlighted(J).map(Be.getValue));n.previewing.set(!0);const G=J=>{y(F).each(ae=>{H.fold(()=>{n.model.selectsOver&&ss.highlightFirst(ae)},X=>{ss.highlightBy(ae,Y=>Be.getValue(Y).value===X.value),ss.getHighlighted(ae).orThunk(()=>(ss.highlightFirst(ae),D.none()))})})};Vx(n,p(T),T,F,l,G,Ui.HighlightJustMenu).get(Ke)}},cancelEvent:ed()}),po.config({mode:"special",onDown:(T,R)=>(u(T,R,ss.highlightFirst),D.some(!0)),onEscape:T=>{const R=kr.getCoupled(T,"sandbox");return x.isOpen(R)?(x.close(R),D.some(!0)):D.none()},onUp:(T,R)=>(u(T,R,ss.highlightLast),D.some(!0)),onEnter:T=>{const R=kr.getCoupled(T,"sandbox"),F=x.isOpen(R);if(F&&!n.previewing.get())return y(R).bind(H=>ss.getHighlighted(H)).map(H=>(lo(T,ZS(),{item:H}),!0));{const H=Be.getValue(T);return Qo(T,ed()),n.onExecute(R,T,H),F&&x.close(R),D.some(!0)}}}),No.config({toggleClass:n.markers.openClass,aria:{mode:"expanded"}}),kr.config({others:{sandbox:T=>IC(n,T,{onOpen:()=>No.on(T),onClose:()=>{n.lazyTypeaheadComp.get().each(R=>pn(R.element,"aria-activedescendant")),No.off(T)}})}}),en(v,[Ss(T=>{n.lazyTypeaheadComp.set(D.some(T))}),Oc(T=>{n.lazyTypeaheadComp.set(D.none())}),Bl(T=>{const R=Ke;LC(n,p(T),T,l,R,Ui.HighlightMenuAndItem).get(Ke)}),Xe(ZS(),(T,R)=>{const F=kr.getCoupled(T,"sandbox");Ew(n.model,T,R.event.item),Qo(T,ed()),n.onItemExecute(T,F,R.event.item,Be.getValue(T)),x.close(F),US(T)})].concat(n.dismissOnBlur?[Xe(Kf(),T=>{const R=kr.getCoupled(T,"sandbox");Ar(R.element).isNone()&&x.close(R)})]:[]))],O={[Dl()]:[Be.name(),jS.name(),v],...n.eventOrder};return{uid:n.uid,dom:iO(ls(n,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:{...f,...Xo(n.typeaheadBehaviours,C)},eventOrder:O}}}),Cb=n=>({...n,toCached:()=>Cb(n.toCached()),bindFuture:r=>Cb(n.bind(i=>i.fold(l=>Om(un.error(l)),l=>r(l)))),bindResult:r=>Cb(n.map(i=>i.bind(r))),mapResult:r=>Cb(n.map(i=>i.map(r))),mapError:r=>Cb(n.map(i=>i.mapError(r))),foldResult:(r,i)=>n.map(l=>l.fold(r,i)),withTimeout:(r,i)=>Cb(Pg(l=>{let u=!1;const f=setTimeout(()=>{u=!0,l(un.error(i()))},r);n.get(p=>{u||(clearTimeout(f),l(p))})}))}),hz=n=>Cb(Pg(n)),A0=(n,r,i=[],l,u,f,p)=>{const y=r.fold(()=>({}),O=>({action:O})),v={buttonBehaviours:xt([gi(()=>!n.enabled||p.isDisabled()),Ca(),ws.config({}),...f.map(O=>Pr.config(p.tooltips.getConfig({tooltipText:p.translate(O)}))).toArray(),en("button press",[qb("click")])].concat(i)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]},...y},C=ls(v,{dom:l});return ls(C,{components:u})},bz=(n,r,i,l=[],u)=>{const f={tag:"button",classes:["tox-tbtn"],attributes:{...n.tooltip.map(v=>({"aria-label":i.translate(v)})).getOr({}),"data-mce-name":u}},p=n.icon.map(v=>C0(v,i.icons)),y=Uy([p]);return A0(n,r,l,f,y,n.tooltip,i)},WS=n=>{switch(n){case"primary":return["tox-button"];case"toolbar":return["tox-tbtn"];default:return["tox-button","tox-button--secondary"]}},yz=(n,r,i,l=[],u=[])=>{const f=i.translate(n.text),p=n.icon.map(T=>C0(T,i.icons)),y=[p.getOrThunk(()=>wr(f))],v=n.buttonType.getOr(n.primary||n.borderless?"primary":"secondary"),C={tag:"button",classes:[...WS(v),...p.isSome()?["tox-button--icon"]:[],...n.borderless?["tox-button--naked"]:[],...u],attributes:{"aria-label":f,"data-mce-name":n.text}},O=n.icon.map(ue(f));return A0(n,r,l,C,y,O,i)},vz=(n,r,i,l=[],u=[])=>{const f=yz(n,D.some(r),i,l,u);return zi.sketch(f)},qS=(n,r)=>i=>{r==="custom"?lo(i,Tf,{name:n,value:{}}):r==="submit"?Qo(i,y0):r==="cancel"?Qo(i,Ip):console.error("Unknown button type: ",r)},s1=(n,r,i)=>{if(((l,u)=>u==="menu")(0,r)){const l=()=>p,u=n,f={...n,type:"menubutton",search:D.none(),onSetup:y=>(y.setEnabled(n.enabled),Ke),fetch:uz(u.items,l,i)},p=ns(n1(f,"tox-tbtn",i,D.none(),!0,n.text.or(n.tooltip).getOrUndefined()));return p.asSpec()}if(((l,u)=>u==="custom"||u==="cancel"||u==="submit")(0,r)){const l=qS(n.name,r),u={...n,borderless:!1};return vz(u,l,i.shared.providers,[])}if(((l,u)=>u==="togglebutton")(0,r))return((l,u,f)=>{var p,y;const v=l.icon.map(Y=>Wg(Y,u.icons)).map(ns),C=l.buttonType.getOr(l.primary?"primary":"secondary"),O={...l,name:(p=l.name)!==null&&p!==void 0?p:"",primary:C==="primary",tooltip:l.tooltip,enabled:(y=l.enabled)!==null&&y!==void 0&&y,borderless:!1},T=O.tooltip.or(l.text).map(Y=>({"aria-label":u.translate(Y)})).getOr({}),R=WS(C??"secondary"),F=l.icon.isSome()&&l.text.isSome(),H={tag:"button",classes:[...R.concat(l.icon.isSome()?["tox-button--icon"]:[]),...l.active?["tox-button--enabled"]:[],...F?["tox-button--icon-and-text"]:[]],attributes:{...T,...st(f)?{"data-mce-name":f}:{}}},G=u.translate(l.text.getOr("")),J=wr(G),ae=[...Uy([v.map(Y=>Y.asSpec())]),...l.text.isSome()?[J]:[]],X=A0(O,D.some(Y=>{lo(Y,Tf,{name:l.name,value:{setIcon:ne=>{v.map(ie=>ie.getOpt(Y).each(de=>{So.set(de,[Wg(ne,u.icons)])}))}}})}),[],H,ae,l.tooltip,u);return zi.sketch(X)})(n,i.shared.providers,n.text.or(n.tooltip).getOrUndefined());throw console.error("Unknown footer button type: ",r),new Error("Unknown footer button type")},hL={type:"separator"},bL=n=>({type:"menuitem",value:n.url,text:n.title,meta:{attach:n.attach},onAction:Ke}),KS=(n,r)=>({type:"menuitem",value:r,text:n,meta:{attach:void 0},onAction:Ke}),_z=(n,r)=>(i=>pt(i,bL))(((i,l)=>cn(l,u=>u.type===i))(n,r)),yL=n=>_z("header",n.targets),vL=n=>_z("anchor",n.targets),xz=n=>D.from(n.anchorTop).map(r=>KS("",r)).toArray(),wz=n=>D.from(n.anchorBottom).map(r=>KS("",r)).toArray(),GS=(n,r)=>{const i=n.toLowerCase();return cn(r,l=>{var u;const f=l.meta!==void 0&&l.meta.text!==void 0?l.meta.text:l.text,p=(u=l.value)!==null&&u!==void 0?u:"";return hr(f.toLowerCase(),i)||hr(p.toLowerCase(),i)})},kz=Xt("aria-invalid"),_L=(n,r)=>{n.dom.checked=r},Zc=n=>n.dom.checked,nr=n=>(r,i,l,u,f)=>St(i,"name").fold(()=>n(i,u,D.none(),f),p=>r.field(p,n(i,u,St(l,p),f))),xL={bar:nr((n,r)=>((i,l)=>({dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:pt(i.items,l.interpreter)}))(n,r.shared)),collection:nr((n,r,i)=>v3(n,r.shared.providers,i)),alertbanner:nr((n,r)=>((i,l)=>{const u=JA(i.icon,l.icons);return Bu.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in",`tox-notification--${i.level}`]},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:i.url?void 0:u},components:i.url?[zi.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:u,attributes:{title:l.translate(i.iconTooltip)}},action:f=>lo(f,Tf,{name:"alert-banner",value:i.url}),buttonBehaviours:xt([xx()])})]:void 0},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:l.translate(i.text)}}]})})(n,r.shared.providers)),input:nr((n,r,i)=>((l,u,f)=>nz({name:l.name,multiline:!1,label:l.label,inputMode:l.inputMode,placeholder:l.placeholder,flex:!1,disabled:!l.enabled,classname:"tox-textfield",validation:D.none(),maximized:l.maximized,data:f},u))(n,r.shared.providers,i)),textarea:nr((n,r,i)=>((l,u,f)=>nz({name:l.name,multiline:!0,label:l.label,inputMode:D.none(),placeholder:l.placeholder,flex:!0,disabled:!l.enabled,classname:"tox-textarea",validation:D.none(),maximized:l.maximized,data:f},u))(n,r.shared.providers,i)),label:nr((n,r,i,l)=>((u,f,p)=>{const y="tox-label",v=u.align==="center"?[`${y}--center`]:[],C=u.align==="end"?[`${y}--end`]:[],O=ns({dom:{tag:"label",classes:[y,...v,...C]},components:[wr(f.providers.translate(u.label))]}),T=pt(u.items,f.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[O.asSpec(),...T],behaviours:xt([Mm(),So.config({}),(R=D.none(),yS(R,ku,cp)),po.config({mode:"acyclic"}),en("label",[Ss(F=>{u.for.each(H=>{p(H).each(G=>{O.getOpt(F).each(J=>{var ae;const X=(ae=yr(G.element,"id"))!==null&&ae!==void 0?ae:Xt("form-field");wo(G.element,"id",X),wo(J.element,"for",X)})})})})])])};var R})(n,r.shared,l)),iframe:(hE=(n,r,i)=>((l,u,f)=>{const p="tox-dialog__iframe",y=l.transparent?[]:[`${p}--opaque`],v=l.border?["tox-navobj-bordered"]:[],C={...l.label.map(F=>({title:F})).getOr({}),...f.map(F=>({srcdoc:F})).getOr({}),...l.sandboxed?{sandbox:"allow-scripts allow-same-origin"}:{}},O=((F,H)=>{const G=so(F.getOr(""));return{getValue:J=>G.get(),setValue:(J,ae)=>{if(G.get()!==ae){const X=J.element,Y=()=>wo(X,"srcdoc",ae);H?zS.fold(ue(OS),ne=>ne.throttle)(X,ae,Y):Y()}G.set(ae)}}})(f,l.streamContent),T=l.label.map(F=>Fg(F,u)),R=cs.parts.field({factory:{sketch:F=>kS(D.from(v),{uid:F.uid,dom:{tag:"iframe",attributes:C,classes:[p,...y]},behaviours:xt([ws.config({}),Po.config({}),wb(f,O.getValue,O.setValue),ol.config({channels:{[bw]:{onReceive:(H,G)=>{G.newFocus.each(J=>{ba(H.element).each(ae=>{(Hn(H.element,J)?Tt:co)(ae,"tox-navobj-bordered-focus")})})}}}})])})}});return b0(T,R,["tox-form__group--stretched"],[])})(n,r.shared.providers,i),(n,r,i,l,u)=>{const f=ls(r,{source:"dynamic"});return nr(hE)(n,f,i,l,u)}),button:nr((n,r)=>((i,l)=>{const u=qS(i.name,"custom");return f=D.none(),p=cs.parts.field({factory:zi,...yz(i,D.some(u),l,[k0(""),Mm()])}),b0(f,p,[],[]);var f,p})(n,r.shared.providers)),checkbox:nr((n,r,i)=>((l,u,f)=>{const p=T=>(T.element.dom.click(),D.some(!0)),y=cs.parts.field({factory:{sketch:Ct},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:xt([Mm(),Fo.config({disabled:()=>!l.enabled||u.isDisabled(),onDisabled:T=>{ba(T.element).each(R=>Tt(R,"tox-checkbox--disabled"))},onEnabled:T=>{ba(T.element).each(R=>co(R,"tox-checkbox--disabled"))}}),ws.config({}),Po.config({}),yS(f,Zc,_L),po.config({mode:"special",onEnter:p,onSpace:p,stopSpaceKeyup:!0}),en("checkbox-events",[Xe(Nd(),(T,R)=>{lo(T,Zi,{name:l.name})})])])}),v=cs.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"]},components:[wr(u.translate(l.label))],behaviours:xt([vb.config({})])}),C=T=>Hc(T==="checked"?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+T]},u.icons),O=ns({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[C("checked"),C("unchecked")]});return cs.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[y,O.asSpec(),v],fieldBehaviours:xt([Fo.config({disabled:()=>!l.enabled||u.isDisabled()}),Ca()])})})(n,r.shared.providers,i)),colorinput:nr((n,r,i)=>((l,u,f,p)=>{const y=cs.parts.field({factory:Mp,inputClasses:["tox-textfield"],data:p,onSetValue:T=>zm.run(T).get(Ke),inputBehaviours:xt([Fo.config({disabled:u.providers.isDisabled}),Ca(),ws.config({}),zm.config({invalidClass:"tox-textbox-field-invalid",getRoot:T=>ba(T.element),notify:{onValid:T=>{const R=Be.getValue(T);lo(T,KC,{color:R})}},validator:{validateOnLoad:!1,validate:T=>{const R=Be.getValue(T);if(R.length===0)return Om(un.value(!0));{const F=$r("span");Mo(F,"background-color",R);const H=er(F,"background-color").fold(()=>un.error("blah"),G=>un.value(R));return Om(H)}}}})]),selectOnFocus:!1}),v=l.label.map(T=>Fg(T,u.providers)),C=(T,R)=>{lo(T,GC,{value:R})},O=ns(((T,R)=>rl.sketch({dom:T.dom,components:T.components,toggleClass:"mce-active",dropdownBehaviours:xt([gi(R.providers.isDisabled),Ca(),vb.config({}),ws.config({})]),layouts:T.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:R.getSink,fetch:F=>Pg(H=>T.fetch(H)).map(H=>D.from($C(ls(bb(Xt("menu-value"),H,G=>{T.onItemAction(F,G)},T.columns,T.presets,Sf.CLOSE_ON_EXECUTE,Fe,R.providers),{movement:f0(T.columns,T.presets)})))),parts:{menu:Cx(0,0,T.presets)}}))({dom:{tag:"span",attributes:{"aria-label":u.providers.translate("Color swatch")}},layouts:{onRtl:()=>[pr,mr,Tr],onLtr:()=>[mr,pr,Tr]},components:[],fetch:QO(f.getColors(l.storageKey),l.storageKey,f.hasCustomColors()),columns:f.getColorCols(l.storageKey),presets:"color",onItemAction:(T,R)=>{O.getOpt(T).each(F=>{R==="custom"?f.colorPicker(H=>{H.fold(()=>Qo(F,C3),G=>{C(F,G),wC(l.storageKey,G)})},"#ffffff"):C(F,R==="remove"?"":R)})}},u));return cs.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:v.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[y,O.asSpec()]}]),fieldBehaviours:xt([en("form-field-events",[Xe(KC,(T,R)=>{O.getOpt(T).each(F=>{Mo(F.element,"background-color",R.event.color)}),lo(T,Zi,{name:l.name})}),Xe(GC,(T,R)=>{cs.getField(T).each(F=>{Be.setValue(F,R.event.value),In.getCurrent(T).each(Po.focus)})}),Xe(C3,(T,R)=>{cs.getField(T).each(F=>{In.getCurrent(T).each(Po.focus)})})])])})})(n,r.shared,r.colorinput,i)),colorpicker:nr((n,r,i)=>((l,u,f)=>{const p=C=>"tox-"+C,y=Z3((C=>O=>te(O)?C.translate(oL[O]):C.translate(O))(u),p,u.tooltips.getConfig,(C,O,T=C,R=C)=>Hc(T,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+C],attributes:{title:u.translate(R),"aria-live":"polite",...O.fold(()=>({}),F=>({id:F}))}},u.icons)),v=ns(y.sketch({dom:{tag:"div",classes:[p("color-picker-container")],attributes:{role:"presentation"}},onValidHex:C=>{lo(C,Tf,{name:"hex-valid",value:!0})},onInvalidHex:C=>{lo(C,Tf,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[v.asSpec()],behaviours:xt([wb(f,C=>{const O=v.get(C);return In.getCurrent(O).bind(T=>Be.getValue(T).hex).map(T=>"#"+as(T,"#")).getOr("")},(C,O)=>{const T=D.from(/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(O)).bind(F=>Lt(F,1)),R=v.get(C);In.getCurrent(R).fold(()=>{console.log("Can not find form")},F=>{Be.setValue(F,{hex:T.getOr("")}),jg.getField(F,"hex").each(H=>{Qo(H,hu())})})}),Mm()])}})(0,r.shared.providers,i)),dropzone:nr((n,r,i)=>((l,u,f)=>{const p=(H,G)=>{G.stop()},y=H=>(G,J)=>{Ht(H,ae=>{ae(G,J)})},v=(H,G)=>{var J;if(!Fo.isDisabled(H)){const ae=G.event.raw;O(H,(J=ae.dataTransfer)===null||J===void 0?void 0:J.files)}},C=(H,G)=>{const J=G.event.raw.target;O(H,J.files)},O=(H,G)=>{G&&(Be.setValue(H,((J,ae)=>{const X=Hp.explode(ae.getOption("images_file_types"));return cn(ao(J),Y=>To(X,ne=>cl(Y.name.toLowerCase(),`.${ne.toLowerCase()}`)))})(G,u)),lo(H,Zi,{name:l.name}))},T=ns({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:xt([en("input-file-events",[bu(Mr()),bu(Ac())])])}),R=l.label.map(H=>Fg(H,u)),F=cs.parts.field({factory:{sketch:H=>({uid:H.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:xt([k0(f.getOr([])),Mm(),Fo.config({}),No.config({toggleClass:"dragenter",toggleOnExecute:!1}),en("dropzone-events",[Xe("dragenter",y([p,No.toggle])),Xe("dragleave",y([p,No.toggle])),Xe("dragover",p),Xe("drop",y([p,v])),Xe(Nd(),C)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p"},components:[wr(u.translate("Drop an image here"))]},zi.sketch({dom:{tag:"button",styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[wr(u.translate("Browse for an image")),T.asSpec()],action:G=>{T.get(G).element.dom.click()},buttonBehaviours:xt([ws.config({}),gi(u.isDisabled),Ca()])})]}]})}});return b0(R,F,["tox-form__group--stretched"],[])})(n,r.shared.providers,i)),grid:nr((n,r)=>((i,l)=>({dom:{tag:"div",classes:["tox-form__grid",`tox-form__grid--${i.columns}col`]},components:pt(i.items,l.interpreter)}))(n,r.shared)),listbox:nr((n,r,i)=>((l,u,f)=>{const p=To(l.items,R=>!S0(R)),y=u.shared.providers,v=f.bind(R=>kw(l.items,R)).orThunk(()=>yt(l.items).filter(S0)),C=l.label.map(R=>Fg(R,y)),O=cs.parts.field({dom:{},factory:{sketch:R=>RS({uid:R.uid,text:v.map(F=>F.text),icon:D.none(),tooltip:D.none(),role:nn(!p,"combobox"),...p?{}:{listRole:"listbox"},ariaLabel:l.label,fetch:(F,H)=>{const G=ww(F,l.name,l.items,Be.getValue(F),p);H(kb(G,Sf.CLOSE_ON_EXECUTE,u,{isHorizontalMenu:!1,search:D.none()}))},onSetup:ue(Ke),getApi:ue({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[ws.config({}),wb(v.map(F=>F.value),F=>yr(F.element,MS),(F,H)=>{kw(l.items,H).each(G=>{wo(F.element,MS,G.value),lo(F,gd,{text:G.text})})})]},"tox-listbox",u.shared)}}),T={dom:{tag:"div",classes:["tox-listboxfield"]},components:[O]};return cs.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:Cs([C.toArray(),[T]]),fieldBehaviours:xt([Fo.config({disabled:ue(!l.enabled),onDisabled:R=>{cs.getField(R).each(Fo.disable)},onEnabled:R=>{cs.getField(R).each(Fo.enable)}})])})})(n,r,i)),selectbox:nr((n,r,i)=>((l,u,f)=>{const p=pt(l.items,T=>({text:u.translate(T.text),value:T.value})),y=l.label.map(T=>Fg(T,u)),v=cs.parts.field({dom:{},...f.map(T=>({data:T})).getOr({}),selectAttributes:{size:l.size},options:p,factory:rL,selectBehaviours:xt([Fo.config({disabled:()=>!l.enabled||u.isDisabled()}),ws.config({}),en("selectbox-change",[Xe(Nd(),(T,R)=>{lo(T,Zi,{name:l.name})})])])}),C=l.size>1?D.none():D.some(Hc("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},u.icons)),O={dom:{tag:"div",classes:["tox-selectfield"]},components:Cs([[v],C.toArray()])};return cs.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:Cs([y.toArray(),[O]]),fieldBehaviours:xt([Fo.config({disabled:()=>!l.enabled||u.isDisabled(),onDisabled:T=>{cs.getField(T).each(Fo.disable)},onEnabled:T=>{cs.getField(T).each(Fo.enable)}}),Ca()])})})(n,r.shared.providers,i)),sizeinput:nr((n,r)=>((i,l)=>{let u=IS;const f=Xt("ratio-event"),p=G=>Hc(G,{tag:"span",classes:["tox-icon","tox-lock-icon__"+G]},l.icons),y=i.label.getOr("Constrain proportions"),v=l.translate(y),C=Uc.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":v,"data-mce-name":y}},components:[p("lock"),p("unlock")],buttonBehaviours:xt([Fo.config({disabled:()=>!i.enabled||l.isDisabled()}),Ca(),ws.config({}),Pr.config(l.tooltips.getConfig({tooltipText:v}))])}),O=G=>({dom:{tag:"div",classes:["tox-form__group"]},components:G}),T=G=>cs.parts.field({factory:Mp,inputClasses:["tox-textfield"],inputBehaviours:xt([Fo.config({disabled:()=>!i.enabled||l.isDisabled()}),Ca(),ws.config({}),en("size-input-events",[Xe(Wn(),(J,ae)=>{lo(J,f,{isField1:G})}),Xe(Nd(),(J,ae)=>{lo(J,Zi,{name:i.name})})])]),selectOnFocus:!1}),R=G=>({dom:{tag:"label",classes:["tox-label"]},components:[wr(l.translate(G))]}),F=Uc.parts.field1(O([cs.parts.label(R("Width")),T(!0)])),H=Uc.parts.field2(O([cs.parts.label(R("Height")),T(!1)]));return Uc.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[F,H,O([R(" "),C])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:(G,J,ae)=>{LS(Be.getValue(G)).each(X=>{u(X).each(Y=>{Be.setValue(J,(ne=>{const ie={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4};let de=ne.value.toFixed((we=ne.unit)in ie?ie[we]:1);var we;return de.indexOf(".")!==-1&&(de=de.replace(/\.?0*$/,"")),de+ne.unit})(Y))})})},coupledFieldBehaviours:xt([Fo.config({disabled:()=>!i.enabled||l.isDisabled(),onDisabled:G=>{Uc.getField1(G).bind(cs.getField).each(Fo.disable),Uc.getField2(G).bind(cs.getField).each(Fo.disable),Uc.getLock(G).each(Fo.disable)},onEnabled:G=>{Uc.getField1(G).bind(cs.getField).each(Fo.enable),Uc.getField2(G).bind(cs.getField).each(Fo.enable),Uc.getLock(G).each(Fo.enable)}}),Ca(),en("size-input-events2",[Xe(f,(G,J)=>{const ae=J.event.isField1,X=ae?Uc.getField1(G):Uc.getField2(G),Y=ae?Uc.getField2(G):Uc.getField1(G),ne=X.map(Be.getValue).getOr(""),ie=Y.map(Be.getValue).getOr("");u=((de,we)=>{const ze=LS(de).toOptional(),tt=LS(we).toOptional();return vt(ze,tt,(Je,Ze)=>PS(Je,Ze.unit).map(kt=>Ze.value/kt).map(kt=>{return Wt=kt,ro=Ze.unit,yo=>PS(yo,ro).map($o=>({value:$o*Wt,unit:ro}));var Wt,ro}).getOr(IS)).getOr(IS)})(ne,ie)})])])})})(n,r.shared.providers)),slider:nr((n,r,i)=>((l,u,f)=>{const p=Pu.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[wr(u.translate(l.label))]}),y=Pu.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),v=Pu.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return Pu.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:l.min,maxX:l.max,getInitialValue:ue(f.getOrThunk(()=>(Math.abs(l.max)-Math.abs(l.min))/2))},components:[p,y,v],sliderBehaviours:xt([Mm(),Po.config({})]),onChoose:(C,O,T)=>{lo(C,Zi,{name:l.name,value:T})},onChange:(C,O,T)=>{lo(C,Zi,{name:l.name,value:T})}})})(n,r.shared.providers,i)),urlinput:nr((n,r,i)=>((l,u,f,p)=>{const y=u.shared.providers,v=X=>{const Y=Be.getValue(X);f.addToHistory(Y.value,l.filetype)},C={...p.map(X=>({initialData:X})).getOr({}),dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":kz,type:"url"},minChars:0,responseTime:0,fetch:X=>{const Y=((ie,de,we)=>{var ze,tt;const Je=Be.getValue(de),Ze=(tt=(ze=Je==null?void 0:Je.meta)===null||ze===void 0?void 0:ze.text)!==null&&tt!==void 0?tt:Je.value;return we.getLinkInformation().fold(()=>[],kt=>{const Wt=GS(Ze,(yo=>pt(yo,$o=>KS($o,$o)))(we.getHistory(ie)));return ie==="file"?(ro=[Wt,GS(Ze,yL(kt)),GS(Ze,Cs([xz(kt),vL(kt),wz(kt)]))],zo(ro,(yo,$o)=>yo.length===0||$o.length===0?yo.concat($o):yo.concat(hL,$o),[])):Wt;var ro})})(l.filetype,X,f),ne=kb(Y,Sf.BUBBLE_TO_SANDBOX,u,{isHorizontalMenu:!1,search:D.none()});return Om(ne)},getHotspot:X=>J.getOpt(X),onSetValue:(X,Y)=>{X.hasConfigured(zm)&&zm.run(X).get(Ke)},typeaheadBehaviours:xt([...f.getValidationHandler().map(X=>zm.config({getRoot:Y=>ba(Y.element),invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:(Y,ne)=>{R.getOpt(Y).each(ie=>{wo(ie.element,"title",y.translate(ne))})}},validator:{validate:Y=>{const ne=Be.getValue(Y);return hz(ie=>{X({type:l.filetype,url:ne.value},de=>{if(de.status==="invalid"){const we=un.error(de.message);ie(we)}else{const we=un.value(de.message);ie(we)}})})},validateOnLoad:!1}})).toArray(),Fo.config({disabled:()=>!l.enabled||y.isDisabled()}),ws.config({}),en("urlinput-events",[Xe(hu(),X=>{const Y=rf(X.element),ne=Y.trim();ne!==Y&&im(X.element,ne),l.filetype==="file"&&lo(X,Zi,{name:l.name})}),Xe(Nd(),X=>{lo(X,Zi,{name:l.name}),v(X)}),Xe(Gf(),X=>{lo(X,Zi,{name:l.name}),v(X)})])]),eventOrder:{[hu()]:["streaming","urlinput-events","invalidating"]},model:{getDisplayText:X=>X.value,selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:u.shared.getSink,parts:{menu:Cx(0,0,"normal")},onExecute:(X,Y,ne)=>{lo(Y,y0,{})},onItemExecute:(X,Y,ne,ie)=>{v(X),lo(X,Zi,{name:l.name})}},O=cs.parts.field({...C,factory:gL}),T=l.label.map(X=>Fg(X,y)),R=ns(((X,Y,ne=X,ie=X)=>Hc(ne,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+X],attributes:{title:y.translate(ie),"aria-live":"polite",...Y.fold(()=>({}),de=>({id:de}))}},y.icons))("invalid",D.some(kz),"warning")),F=ns({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[R.asSpec()]}),H=f.getUrlPicker(l.filetype),G=Xt("browser.url.event"),J=ns({dom:{tag:"div",classes:["tox-control-wrap"]},components:[O,F.asSpec()],behaviours:xt([Fo.config({disabled:()=>!l.enabled||y.isDisabled()})])}),ae=ns(vz({name:l.name,icon:D.some("browse"),text:l.picker_text.or(l.label).getOr(""),enabled:l.enabled,primary:!1,buttonType:D.none(),borderless:!0},X=>Qo(X,G),y,[],["tox-browse-url"]));return cs.sketch({dom:Wx([]),components:T.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:Cs([[J.asSpec()],H.map(()=>ae.asSpec()).toArray()])}]),fieldBehaviours:xt([Fo.config({disabled:()=>!l.enabled||y.isDisabled(),onDisabled:X=>{cs.getField(X).each(Fo.disable),ae.getOpt(X).each(Fo.disable)},onEnabled:X=>{cs.getField(X).each(Fo.enable),ae.getOpt(X).each(Fo.enable)}}),Ca(),en("url-input-events",[Xe(G,X=>{In.getCurrent(X).each(Y=>{const ne=Be.getValue(Y),ie={fieldname:l.name,...ne};H.each(de=>{de(ie).get(we=>{Be.setValue(Y,we),lo(X,Zi,{name:l.name})})})})})])])})})(n,r,r.urlinput,i)),customeditor:nr(n=>{const r=Nn(),i=ns({dom:{tag:n.tag}}),l=Nn(),u=!vS(n)&&n.onFocus.isSome()?[Po.config({onFocus:f=>{n.onFocus.each(p=>{p(f.element.dom)})}}),ws.config({})]:[];return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:xt([en("custom-editor-events",[Ss(f=>{i.getOpt(f).each(p=>{(vS(n)?n.init(p.element.dom):W3.load(n.scriptId,n.scriptUrl).then(y=>y(p.element.dom,n.settings))).then(y=>{l.on(v=>{y.setValue(v)}),l.clear(),r.set(y)})})})]),wb(D.none(),()=>r.get().fold(()=>l.get().getOr(""),f=>f.getValue()),(f,p)=>{r.get().fold(()=>l.set(p),y=>y.setValue(p))}),Mm()].concat(u)),components:[i.asSpec()]}}),htmlpanel:nr((n,r)=>((i,l)=>{const u=["tox-form__group",...i.stretched?["tox-form__group--stretched"]:[]],f=en("htmlpanel",[Ss(p=>{i.onInit(p.element.dom)})]);return i.presets==="presentation"?Bu.sketch({dom:{tag:"div",classes:u,innerHtml:i.html},containerBehaviours:xt([Pr.config({...l.tooltips.getConfig({tooltipText:"",onShow:p=>{Ys(p.element,"[data-mce-tooltip]:hover").orThunk(()=>Ar(p.element)).each(y=>{Fs(y,"data-mce-tooltip").each(v=>{Pr.setComponents(p,l.tooltips.getComponents({tooltipText:v}))})})}}),mode:"children-normal",anchor:p=>({type:"node",node:Ys(p.element,"[data-mce-tooltip]:hover").orThunk(()=>Ar(p.element).filter(y=>Fs(y,"data-mce-tooltip").isSome())),root:p.element,layouts:{onLtr:ue([Tr,ir,mr,Br,pr,us]),onRtl:ue([Tr,ir,mr,Br,pr,us])},bubble:sc(0,-2,{})})}),f])}):Bu.sketch({dom:{tag:"div",classes:u,innerHtml:i.html,attributes:{role:"document"}},containerBehaviours:xt([ws.config({}),Po.config({}),f])})})(n,r.shared.providers)),imagepreview:nr((n,r,i)=>((l,u)=>{const f=so(u.getOr({url:""})),p=ns({dom:{tag:"img",classes:["tox-imagepreview__image"],attributes:u.map(O=>({src:O.url})).getOr({})}}),y=ns({dom:{tag:"div",classes:["tox-imagepreview__container"],attributes:{role:"presentation"}},components:[p.asSpec()]}),v={};l.height.each(O=>v.height=O);const C=u.map(O=>({url:O.url,zoom:D.from(O.zoom),cachedWidth:D.from(O.cachedWidth),cachedHeight:D.from(O.cachedHeight)}));return{dom:{tag:"div",classes:["tox-imagepreview"],styles:v,attributes:{role:"presentation"}},components:[y.asSpec()],behaviours:xt([Mm(),wb(C,()=>f.get(),(O,T)=>{const R={url:T.url};T.zoom.each(H=>R.zoom=H),T.cachedWidth.each(H=>R.cachedWidth=H),T.cachedHeight.each(H=>R.cachedHeight=H),f.set(R);const F=()=>{const{cachedWidth:H,cachedHeight:G,zoom:J}=R;if(!Ot(H)&&!Ot(G)){if(Ot(J)){const X=((Y,ne,ie)=>{const de=Go(Y),we=Ds(Y);return Math.min(de/ne,we/ie,1)})(O.element,H,G);R.zoom=X}const ae=((X,Y,ne,ie,de)=>{const we=ne*de,ze=ie*de,tt=Math.max(0,X/2-we/2),Je=Math.max(0,Y/2-ze/2);return{left:tt.toString()+"px",top:Je.toString()+"px",width:we.toString()+"px",height:ze.toString()+"px"}})(Go(O.element),Ds(O.element),H,G,R.zoom);y.getOpt(O).each(X=>{Li(X.element,ae)})}};p.getOpt(O).each(H=>{const G=H.element;var J;T.url!==yr(G,"src")&&(wo(G,"src",T.url),co(O.element,"tox-imagepreview__loaded")),F(),(J=G,new Promise((ae,X)=>{const Y=()=>{ie(),ae(J)},ne=[Ai(J,"load",Y),Ai(J,"error",()=>{ie(),X("Unable to load data from image: "+J.dom.src)})],ie=()=>Ht(ne,de=>de.unbind());J.dom.complete&&Y()})).then(ae=>{O.getSystem().isConnected()&&(Tt(O.element,"tox-imagepreview__loaded"),R.cachedWidth=ae.dom.naturalWidth,R.cachedHeight=ae.dom.naturalHeight,F())})})})])}})(n,i)),table:nr((n,r)=>((i,l)=>{const u=y=>({dom:{tag:"td",innerHtml:l.translate(y)}});return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(p=i.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:pt(p,y=>({dom:{tag:"th",innerHtml:l.translate(y)}}))}]}),(f=i.cells,{dom:{tag:"tbody"},components:pt(f,y=>({dom:{tag:"tr"},components:pt(y,u)}))})],behaviours:xt([ws.config({}),Po.config({})])};var f,p})(n,r.shared.providers)),tree:nr((n,r)=>((i,l)=>{const u=i.onLeafAction.getOr(Ke),f=i.onToggleExpand.getOr(Ke),p=i.defaultExpandedIds,y=so(p),v=so(i.defaultSelectedId),C=Xt("tree-id"),O=(T,R)=>i.items.map(F=>F.type==="leaf"?VS({leaf:F,selectedId:T,onLeafAction:u,visible:!0,treeId:C,backstage:l}):Sw({directory:F,selectedId:T,onLeafAction:u,expandedIds:R,labelTabstopping:!0,treeId:C,backstage:l}));return{dom:{tag:"div",classes:["tox-tree"],attributes:{role:"tree"}},components:O(v.get(),y.get()),behaviours:xt([po.config({mode:"flow",selector:".tox-tree--leaf__label--visible, .tox-tree--directory__label--visible",cycles:!1}),en(dL,[Xe("expand-tree-node",(T,R)=>{const{expanded:F,node:H}=R.event;y.set(F?[...y.get(),H]:y.get().filter(G=>G!==H)),f(y.get(),{expanded:F,node:H})})]),ol.config({channels:{[`update-active-item-${C}`]:{onReceive:(T,R)=>{v.set(D.some(R.value)),So.set(T,O(D.some(R.value),y.get()))}}}}),So.config({})])}})(n,r)),panel:nr((n,r)=>((i,l)=>({dom:{tag:"div",classes:i.classes},components:pt(i.items,l.shared.interpreter)}))(n,r))},YS={field:(n,r)=>r,record:ue([])},Aw=(n,r,i,l,u)=>{const f=ls(l,{shared:{interpreter:p=>XS(n,p,i,f,u)}});return XS(n,r,i,f,u)},XS=(n,r,i,l,u)=>St(xL,r.type).fold(()=>(console.error(`Unknown factory type "${r.type}", defaulting to container: `,r),r),f=>f(n,r,i,l,u)),Cz=(n,r,i,l)=>XS(YS,n,r,i,l),Iu="layout-inset",r1=n=>n.x,Ow=(n,r)=>n.x+n.width/2-r.width/2,JS=(n,r)=>n.x+n.width-r.width,Jd=n=>n.y,QS=(n,r)=>n.y+n.height-r.height,Sz=(n,r)=>n.y+n.height/2-r.height/2,lc=(n,r,i)=>Ga(JS(n,r),QS(n,r),i.insetSouthwest(),vp(),"southwest",Ya(n,{right:0,bottom:3}),Iu),Gg=(n,r,i)=>Ga(r1(n),QS(n,r),i.insetSoutheast(),Ch(),"southeast",Ya(n,{left:1,bottom:3}),Iu),cc=(n,r,i)=>Ga(JS(n,r),Jd(n),i.insetNorthwest(),yp(),"northwest",Ya(n,{right:0,top:2}),Iu),O0=(n,r,i)=>Ga(r1(n),Jd(n),i.insetNortheast(),kh(),"northeast",Ya(n,{left:1,top:2}),Iu),Fn=(n,r,i)=>Ga(Ow(n,r),Jd(n),i.insetNorth(),T_(),"north",Ya(n,{top:2}),Iu),Bm=(n,r,i)=>Ga(Ow(n,r),QS(n,r),i.insetSouth(),G1(),"south",Ya(n,{bottom:3}),Iu),z0=(n,r,i)=>Ga(JS(n,r),Sz(n,r),i.insetEast(),A_(),"east",Ya(n,{right:0}),Iu),eE=(n,r,i)=>Ga(r1(n),Sz(n,r),i.insetWest(),Y1(),"west",Ya(n,{left:1}),Iu),tE=n=>{switch(n){case"north":return Fn;case"northeast":return O0;case"northwest":return cc;case"south":return Bm;case"southeast":return Gg;case"southwest":return lc;case"east":return z0;case"west":return eE}},zw=(n,r,i,l,u)=>Nh(l).map(tE).getOr(Fn)(n,r,i,l,u),wL=n=>{switch(n){case"north":return Bm;case"northeast":return Gg;case"northwest":return lc;case"south":return Fn;case"southeast":return O0;case"southwest":return cc;case"east":return eE;case"west":return z0}},oE=(n,r,i,l,u)=>Nh(l).map(wL).getOr(Fn)(n,r,i,l,u),N0={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},Ez=(n,r,i)=>{const l={maxHeightFunction:kp()};return()=>i()?{type:"node",root:Pn(Vs(n())),node:D.from(n()),bubble:sc(12,12,N0),layouts:{onRtl:()=>[O0],onLtr:()=>[cc]},overrides:l}:{type:"hotspot",hotspot:r(),bubble:sc(-12,12,N0),layouts:{onRtl:()=>[mr,pr,Tr],onLtr:()=>[pr,mr,Tr]},overrides:l}},Tz=(n,r,i,l)=>{const u={maxHeightFunction:kp()};return()=>l()?{type:"node",root:Pn(Vs(r())),node:D.from(r()),bubble:sc(12,12,N0),layouts:{onRtl:()=>[Fn],onLtr:()=>[Fn]},overrides:u}:n?{type:"node",root:Pn(Vs(r())),node:D.from(r()),bubble:sc(0,-Na(r()),N0),layouts:{onRtl:()=>[ir],onLtr:()=>[ir]},overrides:u}:{type:"hotspot",hotspot:i(),bubble:sc(0,0,N0),layouts:{onRtl:()=>[ir],onLtr:()=>[ir]},overrides:u}},nE=(n,r,i)=>()=>i()?{type:"node",root:Pn(Vs(n())),node:D.from(n()),layouts:{onRtl:()=>[Fn],onLtr:()=>[Fn]}}:{type:"hotspot",hotspot:r(),layouts:{onRtl:()=>[Tr],onLtr:()=>[Tr]}},Az=(n,r)=>()=>({type:"selection",root:r(),getSelection:()=>{const i=n.selection.getRng(),l=n.model.table.getSelectedCells();if(l.length>1){const u=l[0],f=l[l.length-1],p={firstCell:Vt(u),lastCell:Vt(f)};return D.some(p)}return D.some(mf.range(Vt(i.startContainer),i.startOffset,Vt(i.endContainer),i.endOffset))}}),Nw=n=>r=>({type:"node",root:n(),node:r}),kL=(n,r,i,l)=>{const u=rb(n),f=()=>Vt(n.getBody()),p=()=>Vt(n.getContentAreaContainer()),y=()=>u||!l();return{inlineDialog:Ez(p,r,y),inlineBottomDialog:Tz(n.inline,p,i,y),banner:nE(p,r,y),cursor:Az(n,f),node:Nw(f)}},CL=n=>(r,i)=>{t3(n)(r,i)},SL=n=>()=>EC(n),EL=n=>r=>hb(n,r),TL=n=>r=>SC(n,r),Oz=n=>()=>kf(n),zz=n=>an(n,"items"),Nz=n=>an(n,"format"),sE=[{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"}]}],rE=n=>zo(n,(r,i)=>{if(Vo(i,"items")){const l=rE(i.items);return{customFormats:r.customFormats.concat(l.customFormats),formats:r.formats.concat([{title:i.title,items:l.formats}])}}if(Vo(i,"inline")||(l=>Vo(l,"block"))(i)||(l=>Vo(l,"selector"))(i)){const l=`custom-${te(i.name)?i.name:i.title.toLowerCase()}`;return{customFormats:r.customFormats.concat([{name:l,format:i}]),formats:r.formats.concat([{title:i.title,format:l,icon:i.icon}])}}return{...r,formats:r.formats.concat(i)}},{customFormats:[],formats:[]}),Dz=n=>Iy(n).map(r=>{const i=((l,u)=>{const f=rE(u),p=y=>{Ht(y,v=>{l.formatter.has(v.name)||l.formatter.register(v.name,v.format)})};return l.formatter?p(f.customFormats):l.on("init",()=>{p(f.customFormats)}),f.formats})(n,r);return sx(n)?sE.concat(i):i}).getOr(sE),Rz=(n,r,i)=>({...n,type:"formatter",isSelected:r(n.format),getStylePreview:i(n.format)}),aE=(n,r,i,l)=>{const u=f=>pt(f,p=>zz(p)?(y=>{const v=u(y.items);return{...y,type:"submenu",getStyleItems:ue(v)}})(p):Nz(p)?(y=>Rz(y,i,l))(p):(y=>{const v=tn(y);return v.length===1&&Ge(v,"title")})(p)?{...p,type:"separator"}:(y=>{const v=te(y.name)?y.name:Xt(y.title),C=`custom-${v}`,O={...y,type:"formatter",format:C,isSelected:i(C),getStylePreview:l(C)};return n.formatter.register(v,O),O})(p));return u(r)},iE=n=>{let r=0;const i=l=>[{dom:{tag:"div",classes:["tox-tooltip__body"]},components:[wr(l.tooltipText)]}];return{getConfig:l=>({delayForShow:()=>r>0?60:300,delayForHide:ue(300),exclusive:!0,lazySink:n,tooltipDom:{tag:"div",classes:["tox-tooltip","tox-tooltip--up"]},tooltipComponents:i(l),onShow:(u,f)=>{r++,l.onShow&&l.onShow(u,f)},onHide:(u,f)=>{r--,l.onHide&&l.onHide(u,f)},onSetup:l.onSetup}),getComponents:i}},Mz=Hp.trim,Bz=n=>r=>!!((i=>st(i)&&i.nodeType===1)(r)&&(r.contentEditable===n||r.getAttribute("data-mce-contenteditable")===n)),AL=Bz("true"),OL=Bz("false"),Lz=(n,r,i,l,u)=>({type:n,title:r,url:i,level:l,attach:u}),Pz=n=>n.innerText||n.textContent,zL=n=>(r=>r&&r.nodeName==="A"&&(r.id||r.name)!==void 0)(n)&&Qd(n),lE=n=>n&&/^(H[1-6])$/.test(n.nodeName),Qd=n=>(r=>{let i=r;for(;i=i.parentNode;){const l=i.contentEditable;if(l&&l!=="inherit")return AL(i)}return!1})(n)&&!OL(n),NL=n=>lE(n)&&Qd(n),cE=n=>{var r;const i=(l=>l.id?l.id:Xt("h"))(n);return Lz("header",(r=Pz(n))!==null&&r!==void 0?r:"","#"+i,(l=>lE(l)?parseInt(l.nodeName.substr(1),10):0)(n),()=>{n.id=i})},Iz=n=>{const r=n.id||n.name,i=Pz(n);return Lz("anchor",i||"#"+r,"#"+r,0,Ke)},Fz=n=>Mz(n.title).length>0,DL=n=>{const r=(i=>pt(fa(Vt(i),"h1,h2,h3,h4,h5,h6,a:not([href])"),u=>u.dom))(n);return cn((i=>pt(cn(i,NL),cE))(r).concat((i=>pt(cn(i,zL),Iz))(r)),Fz)},D0="tinymce-url-history",dE=n=>te(n)&&/^https?/.test(n),uE=n=>ce(n)&&yn(n,r=>{return!($e(i=r)&&i.length<=5&&bi(i,dE));var i}).isNone(),$z=()=>{const n=jc.getItem(D0);if(n===null)return{};let r;try{r=JSON.parse(n)}catch(i){if(i instanceof SyntaxError)return console.log("Local storage "+D0+" was not valid JSON",i),{};throw i}return uE(r)?r:(console.log("Local storage "+D0+" was not valid format",r),{})},RL=n=>{const r=$z();return St(r,n).getOr([])},ML=(n,r)=>{if(!dE(n))return;const i=$z(),l=St(i,r).getOr([]),u=cn(l,f=>f!==n);i[r]=[n].concat(u).slice(0,5),(f=>{if(!uE(f))throw new Error(`Bad format for history: -`+JSON.stringify(f));jc.setItem(D0,JSON.stringify(f))})(i)},Hz=n=>!!n,BL=n=>Zn(Hp.makeMap(n,/[, ]/),Hz),Dw=n=>D.from(ax(n)),fE=n=>D.from(n).filter(te).getOrUndefined(),Vz=n=>({getHistory:RL,addToHistory:ML,getLinkInformation:()=>(r=>ix(r)?D.some({targets:DL(r.getBody()),anchorTop:fE(NA(r)),anchorBottom:fE(DA(r))}):D.none())(n),getValidationHandler:()=>(r=>D.from(Lv(r)))(n),getUrlPicker:r=>((i,l)=>((u,f)=>{const p=(y=>{const v=D.from(Pv(y)).filter(Hz).map(BL);return Dw(y).fold(Fe,C=>v.fold(Gt,O=>tn(O).length>0&&O))})(u);return Me(p)?p?Dw(u):D.none():p[f]?Dw(u):D.none()})(i,l).map(u=>f=>Pg(p=>{const y={filetype:l,fieldname:f.fieldname,...D.from(f.meta).getOr({})};u.call(i,(v,C)=>{if(!te(v))throw new Error("Expected value to be string");if(C!==void 0&&!ce(C))throw new Error("Expected meta to be a object");p({value:v,meta:C})},f.value,y)})))(n,r)}),Qa=W5,Lm=v4,LL=ue([Ne("shell",!1),nt("makeItem"),Ne("setupItem",Ke),Io("listBehaviours",[So])]),a1=ld({name:"items",overrides:()=>({behaviours:xt([So.config({})])})}),PL=ue([a1]),mE=gl({name:ue("CustomList")(),configFields:LL(),partFields:PL(),factory:(n,r,i,l)=>{const u=n.shell?{behaviours:[So.config({})],components:[]}:{behaviours:[],components:r};return{uid:n.uid,dom:n.dom,components:u.components,behaviours:Xo(n.listBehaviours,u.behaviours),apis:{setItems:(f,p)=>{var y;(y=f,n.shell?D.some(y):As(y,n,"items")).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")},v=>{const C=So.contents(v),O=p.length,T=O-C.length,R=T>0?Cr(T,()=>n.makeItem()):[],F=C.slice(O);Ht(F,G=>So.remove(v,G)),Ht(R,G=>So.append(v,G));const H=So.contents(v);Ht(H,(G,J)=>{n.setupItem(f,G,p[J],J)})})}}}},apis:{setItems:(n,r,i)=>{n.setItems(r,i)}}}),Sb=ue([nt("dom"),Ne("shell",!0),Jt("toolbarBehaviours",[So])]),jz=ue([ld({name:"groups",overrides:()=>({behaviours:xt([So.config({})])})})]),Fu=gl({name:"Toolbar",configFields:Sb(),partFields:jz(),factory:(n,r,i,l)=>{const u=n.shell?{behaviours:[So.config({})],components:[]}:{behaviours:[],components:r};return{uid:n.uid,dom:n.dom,components:u.components,behaviours:Xo(n.toolbarBehaviours,u.behaviours),apis:{setGroups:(f,p)=>{var y;(y=f,n.shell?D.some(y):As(y,n,"groups")).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")},v=>{So.set(v,p)})},refresh:Ke},domModification:{attributes:{role:"group"}}}},apis:{setGroups:(n,r,i)=>{n.setGroups(r,i)}}}),pE=Ke,gE=Fe,Rw=ue([]);var hE,IL=Object.freeze({__proto__:null,setup:pE,isDocked:gE,getBehaviours:Rw});const Mw=ue(Xt("toolbar-height-change")),Pm={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},Uz="tox-tinymce--toolbar-sticky-on",Zz="tox-tinymce--toolbar-sticky-off",R0=(n,r)=>Ge(Gs.getModes(n),r),Bw=n=>{const r=n.element;ba(r).each(i=>{const l="padding-"+Gs.getModes(n)[0];if(Gs.isDocked(n)){const u=Go(i);Mo(r,"width",u+"px"),Mo(i,l,(f=>Na(f)+(parseInt(Ns(f,"margin-top"),10)||0)+(parseInt(Ns(f,"margin-bottom"),10)||0))(r)+"px")}else Vn(r,"width"),Vn(i,l)})},bE=(n,r)=>{r?(co(n,Pm.fadeOutClass),Ko(n,[Pm.transitionClass,Pm.fadeInClass])):(co(n,Pm.fadeInClass),Ko(n,[Pm.fadeOutClass,Pm.transitionClass]))},Wz=(n,r)=>{const i=Vt(n.getContainer());r?(Tt(i,Uz),co(i,Zz)):(Tt(i,Zz),co(i,Uz))},qz=(n,r)=>{const i=Nn(),l=r.getSink,u=y=>{l().each(v=>y(v.element))},f=y=>{n.inline||Bw(y),Wz(n,Gs.isDocked(y)),y.getSystem().broadcastOn([M()],{}),l().each(v=>v.getSystem().broadcastOn([M()],{}))},p=n.inline?[]:[ol.config({channels:{[Mw()]:{onReceive:Bw}}})];return[Po.config({}),Gs.config({contextual:{lazyContext:y=>{const v=Na(y.element),C=n.inline?n.getContentAreaContainer():n.getContainer();return D.from(C).map(O=>{const T=vr(Vt(O));return Og(n,y.element).fold(()=>{const R=T.height-v,F=T.y+(R0(y,"top")?0:v);return rn(T.x,F,T.width,R)},R=>{const F=ql(T,zg(R)),H=R0(y,"top")?F.y:F.y+v;return rn(F.x,H,F.width,F.height-v)})})},onShow:()=>{u(y=>bE(y,!0))},onShown:y=>{u(v=>Qn(v,[Pm.transitionClass,Pm.fadeInClass])),i.get().each(v=>{((C,O)=>{const T=ha(O);sd(T).filter(R=>!Hn(O,R)).filter(R=>Hn(R,Vt(T.dom.body))||lr(C,R)).each(()=>Ti(O))})(y.element,v),i.clear()})},onHide:y=>{((v,C)=>Ar(v).orThunk(()=>C().toOptional().bind(O=>Ar(O.element))))(y.element,l).fold(i.clear,i.set),u(v=>bE(v,!1))},onHidden:()=>{u(y=>Qn(y,[Pm.transitionClass]))},...Pm},lazyViewport:y=>Og(n,y.element).fold(()=>{const v=jr(),C=L2(n),O=v.y+(R0(y,"top")?C:0),T=v.height-(R0(y,"bottom")?C:0);return{bounds:rn(v.x,O,v.width,T),optScrollEnv:D.none()}},v=>({bounds:zg(v),optScrollEnv:D.some({currentScrollTop:v.element.dom.scrollTop,scrollElmTop:Ye(v.element).top})})),modes:[r.header.getDockingMode()],onDocked:f,onUndocked:f}),...p]};var FL=Object.freeze({__proto__:null,setup:(n,r,i)=>{n.inline||(r.header.isPositionedAtTop()||n.on("ResizeEditor",()=>{i().each(Gs.reset)}),n.on("ResizeWindow ResizeEditor",()=>{i().each(Bw)}),n.on("SkinLoaded",()=>{i().each(l=>{Gs.isDocked(l)?Gs.reset(l):Gs.refresh(l)})}),n.on("FullscreenStateChanged",()=>{i().each(Gs.reset)})),n.on("AfterScrollIntoView",l=>{i().each(u=>{Gs.refresh(u);const f=u.element;W4(f)&&((p,y)=>{const v=ha(y),C=vd(y).dom.innerHeight,O=_s(v),T=Vt(p.elm),R=Va(T),F=Ds(T),H=R.y,G=H+F,J=Ye(y),ae=Ds(y),X=J.top,Y=X+ae,ne=Math.abs(X-O.top)<2,ie=Math.abs(Y-(O.top+C))<2;if(ne&&HX){const de=H-C+F+ae;Ed(O.left,de,v)}})(l,f)})}),n.on("PostRender",()=>{Wz(n,!1)})},isDocked:n=>n().map(Gs.isDocked).getOr(!1),getBehaviours:qz});const $L=ho([oa,Xr("items",fu([wc([tC,li("items",Zr)]),Zr]))].concat(Am)),HL=[Us("text"),Us("tooltip"),Us("icon"),Wa("search",!1,fu([ml,ho([Us("placeholder")])],n=>Me(n)?n?D.some({placeholder:D.none()}):D.none():D.some(n))),Za("fetch"),xs("onSetup",()=>Ke)],Kz=ho([oa,...HL]),Gz=n=>Ms("menubutton",Kz,n),VL=ho([oa,s0,Wd,Bg,aC,eB,Mg,zl("presets","normal",["normal","color","listpreview"]),yO(1),Hy,bO]);var yE=cd({factory:(n,r)=>{const i={focus:po.focusIn,setMenus:(l,u)=>{const f=pt(u,p=>{const y={type:"menubutton",text:p.text,fetch:C=>{C(p.getItems())}},v=Gz(y).mapError(C=>ii(C)).getOrDie();return n1(v,"tox-mbtn",r.backstage,D.some("menuitem"))});So.set(l,f)}};return{uid:n.uid,dom:n.dom,components:[],behaviours:xt([So.config({}),en("menubar-events",[Ss(l=>{n.onSetup(l)}),Xe(io(),(l,u)=>{Ys(l.element,".tox-mbtn--active").each(f=>{Fd(u.event.target,".tox-mbtn").each(p=>{Hn(f,p)||l.getSystem().getByDom(f).each(y=>{l.getSystem().getByDom(p).each(v=>{rl.expand(v),rl.close(y),Po.focus(v)})})})})}),Xe(ag(),(l,u)=>{u.event.prevFocus.bind(f=>l.getSystem().getByDom(f).toOptional()).each(f=>{u.event.newFocus.bind(p=>l.getSystem().getByDom(p).toOptional()).each(p=>{rl.isOpen(f)&&(rl.expand(p),rl.close(f))})})})]),po.config({mode:"flow",selector:".tox-mbtn",onEscape:l=>(n.onEscape(l),D.some(!0))}),ws.config({})]),apis:i,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[nt("dom"),nt("uid"),nt("onEscape"),nt("backstage"),Ne("onSetup",Ke)],apis:{focus:(n,r)=>{n.focus(r)},setMenus:(n,r,i)=>{n.setMenus(r,i)}}});const Yz="container",jL=[Jt("slotBehaviours",[])],vE=n=>"",UL=(n,r)=>{const i=O=>k4(n),l=(O,T)=>(R,F)=>As(R,n,F).map(H=>O(H,F)).getOr(T),u=(O,T)=>yr(O.element,"aria-hidden")!=="true",f=l(u,!1),p=l((O,T)=>{if(u(O)){const R=O.element;Mo(R,"display","none"),wo(R,"aria-hidden","true"),lo(O,tc(),{name:T,visible:!1})}}),y=(O=>(T,R)=>{Ht(R,F=>O(T,F))})(p),v=l((O,T)=>{if(!u(O)){const R=O.element;Vn(R,"display"),pn(R,"aria-hidden"),lo(O,tc(),{name:T,visible:!0})}}),C={getSlotNames:i,getSlot:(O,T)=>As(O,n,T),isShowing:f,hideSlot:p,hideAllSlots:O=>y(O,i()),showSlot:v};return{uid:n.uid,dom:n.dom,components:r,behaviours:Ao(n.slotBehaviours),apis:C}},ZL=Zn({getSlotNames:(n,r)=>n.getSlotNames(r),getSlot:(n,r,i)=>n.getSlot(r,i),isShowing:(n,r,i)=>n.isShowing(r,i),hideSlot:(n,r,i)=>n.hideSlot(r,i),hideAllSlots:(n,r)=>n.hideAllSlots(r),showSlot:(n,r,i)=>n.showSlot(r,i)},n=>oy(n)),al={...ZL,sketch:n=>{const r=(()=>{const f=[];return{slot:(p,y)=>(f.push(p),e2(Yz,vE(p),y)),record:ue(f)}})(),i=n(r),l=r.record(),u=pt(l,f=>sl({name:f,pname:vE(f)}));return bv(Yz,jL,u,UL,i)}},WL=ho([Wd,s0,xs("onShow",Ke),xs("onHide",Ke),Mg]),qL=n=>({element:()=>n.element.dom}),Lw=(n,r)=>{const i=pt(tn(r),l=>{const u=r[l],f=Ua((p=>Ms("sidebar",WL,p))(u));return{name:l,getApi:qL,onSetup:f.onSetup,onShow:f.onShow,onHide:f.onHide}});return pt(i,l=>{const u=so(Ke);return n.slot(l.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:a0([Lg(l,u),Bp(l,u),Xe(tc(),(f,p)=>{const y=p.event;j(i,C=>C.name===y.name).each(C=>{(y.visible?C.onShow:C.onHide)(C.getApi(f))})})])})})},Xz=n=>al.sketch(r=>({dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:Lw(r,n),slotBehaviours:a0([Ss(i=>al.hideAllSlots(i))])})),Pw=(n,r)=>{wo(n,"role",r)},KL=n=>In.getCurrent(n).bind(r=>Fl.isGrowing(r)||Fl.hasGrown(r)?In.getCurrent(r).bind(i=>j(al.getSlotNames(i),l=>al.isShowing(i,l))):D.none()),_E=Xt("FixSizeEvent"),xE=Xt("AutoSizeEvent");var GL=Object.freeze({__proto__:null,block:(n,r,i,l)=>{wo(n.element,"aria-busy",!0);const u=r.getRoot(n).getOr(n),f=xt([po.config({mode:"special",onTab:()=>D.some(!0),onShiftTab:()=>D.some(!0)}),Po.config({})]),p=l(u,f),y=u.getSystem().build(p);So.append(u,$i(y)),y.hasConfigured(po)&&r.focus&&po.focusIn(y),i.isBlocked()||r.onBlock(n),i.blockWith(()=>So.remove(u,y))},unblock:(n,r,i)=>{pn(n.element,"aria-busy"),i.isBlocked()&&r.onUnblock(n),i.clear()},isBlocked:(n,r,i)=>i.isBlocked()}),YL=[xs("getRoot",D.none),xr("focus",!0),Dn("onBlock"),Dn("onUnblock")];const eu=Qr({fields:YL,name:"blocking",apis:GL,state:Object.freeze({__proto__:null,init:()=>{const n=Cl(r=>r.destroy());return Jr({readState:n.isSet,blockWith:r=>{n.set({destroy:r})},clear:n.clear,isBlocked:n.isSet})}})}),wE=n=>In.getCurrent(n).each(r=>Ti(r.element,!0)),Jz=(n,r,i)=>{const l=so(!1),u=Nn(),f=y=>{var v;l.get()&&(!(C=>C.type==="focusin")(v=y)||!(v.composed?yt(v.composedPath()):D.from(v.target)).map(Vt).filter(ys).exists(C=>_n(C,"mce-pastebin")))&&(y.preventDefault(),wE(r()),n.editorManager.setActive(n))};n.inline||n.on("PreInit",()=>{n.dom.bind(n.getWin(),"focusin",f),n.on("BeforeExecCommand",y=>{y.command.toLowerCase()==="mcefocus"&&y.value!==!0&&f(y)})});const p=y=>{y!==l.get()&&(l.set(y),((v,C,O,T)=>{const R=C.element;if(((F,H)=>{const G="tabindex",J=`data-mce-${G}`;D.from(F.iframeElement).map(Vt).each(ae=>{H?(Fs(ae,G).each(X=>wo(ae,J,X)),wo(ae,G,-1)):(pn(ae,G),Fs(ae,J).each(X=>{wo(ae,G,X),pn(ae,J)}))})})(v,O),O)eu.block(C,(F=>(H,G)=>({dom:{tag:"div",attributes:{"aria-label":F.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:Cm('
    ')}]}))(T)),Vn(R,"display"),pn(R,"aria-hidden"),v.hasFocus()&&wE(C);else{const F=In.getCurrent(C).exists(H=>wp(H.element));eu.unblock(C),Mo(R,"display","none"),wo(R,"aria-hidden","true"),F&&v.focus()}})(n,r(),y,i.providers),((v,C)=>{v.dispatch("AfterProgressState",{state:C})})(n,y))};n.on("ProgressState",y=>{if(u.on(clearTimeout),Bt(y.time)){const v=ox.setEditorTimeout(n,()=>p(y.state),y.time);u.set(v)}else p(y.state),u.clear()})},kE=(n,r,i)=>({within:n,extra:r,withinWidth:i}),CE=(n,r,i)=>{const l=zo(n,(p,y)=>((v,C)=>{const O=i(v);return D.some({element:v,start:C,finish:C+O,width:O})})(y,p.len).fold(ue(p),v=>({len:v.finish,list:p.list.concat([v])})),{len:0,list:[]}).list,u=cn(l,p=>p.finish<=r),f=fn(u,(p,y)=>p+y.width,0);return{within:u,extra:l.slice(u.length),withinWidth:f}},Iw=n=>pt(n,r=>r.element),Qz=(n,r)=>{const i=pt(r,l=>$i(l));Fu.setGroups(n,i)},eN=(n,r,i)=>{const l=r.builtGroups.get();if(l.length===0)return;const u=Op(n,r,"primary"),f=kr.getCoupled(n,"overflowGroup");Mo(u.element,"visibility","hidden");const p=l.concat([f]),y=ko(p,C=>Ar(C.element).bind(O=>C.getSystem().getByDom(O).toOptional()));i([]),Qz(u,p);const v=((C,O,T,R)=>{const F=((ae,X,Y)=>{const ne=CE(X,ae,Y);return ne.extra.length===0?D.some(ne):D.none()})(C,O,T).getOrThunk(()=>CE(O,C-T(R),T)),H=F.within,G=F.extra,J=F.withinWidth;return G.length===1&&G[0].width<=T(R)?((ae,X,Y)=>{const ne=Iw(ae.concat(X));return kE(ne,[],Y)})(H,G,J):G.length>=1?((ae,X,Y,ne)=>{const ie=Iw(ae).concat([Y]);return kE(ie,Iw(X),ne)})(H,G,R,J):((ae,X,Y)=>kE(Iw(ae),[],Y))(H,0,J)})(Go(u.element),r.builtGroups.get(),C=>Math.ceil(C.element.dom.getBoundingClientRect().width),f);v.extra.length===0?(So.remove(u,f),i([])):(Qz(u,v.within),i(v.extra)),Vn(u.element,"visibility"),wl(u.element),y.each(Po.focus)},tN=ue([Jt("splitToolbarBehaviours",[kr]),ca("builtGroups",()=>so([]))]),XL=ue([mp(["overflowToggledClass"]),Jl("getOverflowBounds"),nt("lazySink"),ca("overflowGroups",()=>so([])),Dn("onOpened"),Dn("onClosed")].concat(tN())),JL=ue([sl({factory:Fu,schema:Sb(),name:"primary"}),Nu({schema:Sb(),name:"overflow"}),Nu({name:"overflow-button"}),Nu({name:"overflow-group"})]),SE=ue((n,r)=>{((i,l)=>{const u=oo.max(i,l,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]);Mo(i,"max-width",u+"px")})(n,Math.floor(r))}),QL=ue([mp(["toggledClass"]),nt("lazySink"),Za("fetch"),Jl("getBounds"),Zs("fireDismissalEventInstead",[Ne("event",Qu())]),cf(),Dn("onToggled")]),eP=ue([Nu({name:"button",overrides:n=>({dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:xt([No.config({toggleClass:n.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1,onToggled:n.onToggled})])})}),Nu({factory:Fu,schema:Sb(),name:"toolbar",overrides:n=>({toolbarBehaviours:xt([po.config({mode:"cyclic",onEscape:r=>(As(r,n,"button").each(Po.focus),D.none())})])})})]),Fw=Nn(),i1=(n,r)=>{const i=kr.getCoupled(n,"toolbarSandbox");x.isOpen(i)?x.close(i):x.open(i,r.toolbar())},M0=(n,r,i,l)=>{const u=i.getBounds.map(p=>p()),f=i.lazySink(n).getOrDie();Xa.positionWithinBounds(f,r,{anchor:{type:"hotspot",hotspot:n,layouts:l,overrides:{maxWidthFunction:SE()}}},u)},$w=(n,r,i,l,u)=>{Fu.setGroups(r,u),M0(n,r,i,l),No.on(n)},jp=gl({name:"FloatingToolbarButton",factory:(n,r,i,l)=>({...zi.sketch({...l.button(),action:u=>{i1(u,l)},buttonBehaviours:Oo({dump:l.button().buttonBehaviours},[kr.config({others:{toolbarSandbox:u=>((f,p,y)=>{const v=bp();return{dom:{tag:"div",attributes:{id:v.id}},behaviours:xt([po.config({mode:"special",onEscape:C=>(x.close(C),D.some(!0))}),x.config({onOpen:(C,O)=>{const T=Fw.get().getOr(!1);y.fetch().get(R=>{$w(f,O,y,p.layouts,R),v.link(f.element),T||po.focusIn(O)})},onClose:()=>{No.off(f),Fw.get().getOr(!1)||Po.focus(f),v.unlink(f.element)},isPartOf:(C,O,T)=>tl(O,T)||tl(f,T),getAttachPoint:()=>y.lazySink(f).getOrDie()}),ol.config({channels:{...K({isExtraPart:Fe,...y.fireDismissalEventInstead.map(C=>({fireEventInstead:{event:C.event}})).getOr({})}),...he({doReposition:()=>{x.getState(kr.getCoupled(f,"toolbarSandbox")).each(C=>{M0(f,C,y,p.layouts)})}})}})])}})(u,i,n)}})])}),apis:{setGroups:(u,f)=>{x.getState(kr.getCoupled(u,"toolbarSandbox")).each(p=>{$w(u,p,n,i.layouts,f)})},reposition:u=>{x.getState(kr.getCoupled(u,"toolbarSandbox")).each(f=>{M0(u,f,n,i.layouts)})},toggle:u=>{i1(u,l)},toggleWithoutFocusing:u=>{((f,p)=>{Fw.set(!0),i1(f,p),Fw.clear()})(u,l)},getToolbar:u=>x.getState(kr.getCoupled(u,"toolbarSandbox")),isOpen:u=>x.isOpen(kr.getCoupled(u,"toolbarSandbox"))}}),configFields:QL(),partFields:eP(),apis:{setGroups:(n,r,i)=>{n.setGroups(r,i)},reposition:(n,r)=>{n.reposition(r)},toggle:(n,r)=>{n.toggle(r)},toggleWithoutFocusing:(n,r)=>{n.toggleWithoutFocusing(r)},getToolbar:(n,r)=>n.getToolbar(r),isOpen:(n,r)=>n.isOpen(r)}}),tP=ue([nt("items"),mp(["itemSelector"]),Jt("tgroupBehaviours",[po])]),oP=ue([H_({name:"items",unit:"item"})]),l1=gl({name:"ToolbarGroup",configFields:tP(),partFields:oP(),factory:(n,r,i,l)=>({uid:n.uid,dom:n.dom,components:r,behaviours:Xo(n.tgroupBehaviours,[po.config({mode:"flow",selector:n.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}})}),Hw=n=>pt(n,r=>$i(r)),B0=(n,r,i)=>{eN(n,i,l=>{i.overflowGroups.set(l),r.getOpt(n).each(u=>{jp.setGroups(u,Hw(l))})})},EE=gl({name:"SplitFloatingToolbar",configFields:XL(),partFields:JL(),factory:(n,r,i,l)=>{const u=ns(jp.sketch({fetch:()=>Pg(f=>{f(Hw(n.overflowGroups.get()))}),layouts:{onLtr:()=>[pr,mr],onRtl:()=>[mr,pr],onBottomLtr:()=>[us,Br],onBottomRtl:()=>[Br,us]},getBounds:i.getOverflowBounds,lazySink:n.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:n.markers.overflowToggledClass},parts:{button:l["overflow-button"](),toolbar:l.overflow()},onToggled:(f,p)=>n[p?"onOpened":"onClosed"](f)}));return{uid:n.uid,dom:n.dom,components:r,behaviours:Xo(n.splitToolbarBehaviours,[kr.config({others:{overflowGroup:()=>l1.sketch({...l["overflow-group"](),items:[u.asSpec()]})}})]),apis:{setGroups:(f,p)=>{n.builtGroups.set(pt(p,f.getSystem().build)),B0(f,u,n)},refresh:f=>B0(f,u,n),toggle:f=>{u.getOpt(f).each(p=>{jp.toggle(p)})},toggleWithoutFocusing:f=>{u.getOpt(f).each(jp.toggleWithoutFocusing)},isOpen:f=>u.getOpt(f).map(jp.isOpen).getOr(!1),reposition:f=>{u.getOpt(f).each(p=>{jp.reposition(p)})},getOverflow:f=>u.getOpt(f).bind(jp.getToolbar)},domModification:{attributes:{role:"group"}}}},apis:{setGroups:(n,r,i)=>{n.setGroups(r,i)},refresh:(n,r)=>{n.refresh(r)},reposition:(n,r)=>{n.reposition(r)},toggle:(n,r)=>{n.toggle(r)},toggleWithoutFocusing:(n,r)=>{n.toggle(r)},isOpen:(n,r)=>n.isOpen(r),getOverflow:(n,r)=>n.getOverflow(r)}}),nP=ue([mp(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),Dn("onOpened"),Dn("onClosed")].concat(tN())),sP=ue([sl({factory:Fu,schema:Sb(),name:"primary"}),sl({factory:Fu,schema:Sb(),name:"overflow",overrides:n=>({toolbarBehaviours:xt([Fl.config({dimension:{property:"height"},closedClass:n.markers.closedClass,openClass:n.markers.openClass,shrinkingClass:n.markers.shrinkingClass,growingClass:n.markers.growingClass,onShrunk:r=>{As(r,n,"overflow-button").each(i=>{No.off(i)}),n.onClosed(r)},onGrown:r=>{n.onOpened(r)},onStartGrow:r=>{As(r,n,"overflow-button").each(No.on)}}),po.config({mode:"acyclic",onEscape:r=>(As(r,n,"overflow-button").each(Po.focus),D.some(!0))})])})}),Nu({name:"overflow-button",overrides:n=>({buttonBehaviours:xt([No.config({toggleClass:n.markers.overflowToggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])})}),Nu({name:"overflow-group"})]),TE=(n,r,i)=>{As(n,r,"overflow-button").each(l=>{As(n,r,"overflow").each(u=>{if(AE(n,r),Fl.hasShrunk(u)){const f=r.onOpened;r.onOpened=p=>{i||po.focusIn(u),f(p),r.onOpened=f}}else{const f=r.onClosed;r.onClosed=p=>{i||Po.focus(l),f(p),r.onClosed=f}}Fl.toggleGrow(u)})})},AE=(n,r)=>{As(n,r,"overflow").each(i=>{eN(n,r,l=>{const u=pt(l,f=>$i(f));Fu.setGroups(i,u)}),As(n,r,"overflow-button").each(l=>{Fl.hasGrown(i)&&No.on(l)}),Fl.refresh(i)})},OE=gl({name:"SplitSlidingToolbar",configFields:nP(),partFields:sP(),factory:(n,r,i,l)=>{const u="alloy.toolbar.toggle";return{uid:n.uid,dom:n.dom,components:r,behaviours:Xo(n.splitToolbarBehaviours,[kr.config({others:{overflowGroup:f=>l1.sketch({...l["overflow-group"](),items:[zi.sketch({...l["overflow-button"](),action:p=>{Qo(f,u)}})]})}}),en("toolbar-toggle-events",[Xe(u,f=>{TE(f,n,!1)})])]),apis:{setGroups:(f,p)=>{((y,v)=>{const C=pt(v,y.getSystem().build);n.builtGroups.set(C)})(f,p),AE(f,n)},refresh:f=>AE(f,n),toggle:f=>{TE(f,n,!1)},toggleWithoutFocusing:f=>{TE(f,n,!0)},isOpen:f=>((p,y)=>As(p,y,"overflow").map(Fl.hasGrown).getOr(!1))(f,n)},domModification:{attributes:{role:"group"}}}},apis:{setGroups:(n,r,i)=>{n.setGroups(r,i)},refresh:(n,r)=>{n.refresh(r)},toggle:(n,r)=>{n.toggle(r)},isOpen:(n,r)=>n.isOpen(r)}}),oN=n=>{const r=n.title.fold(()=>({}),i=>({attributes:{title:i}}));return{dom:{tag:"div",classes:["tox-toolbar__group"],...r},components:[l1.parts.items({})],items:n.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled]), .tox-number-input:not([disabled])"},tgroupBehaviours:xt([ws.config({}),Po.config({})])}},Vw=n=>l1.sketch(oN(n)),nN=(n,r)=>{const i=Ss(l=>{const u=pt(n.initGroups,Vw);Fu.setGroups(l,u)});return xt([Dx(n.providers.isDisabled),Ca(),po.config({mode:r,onEscape:n.onEscape,selector:".tox-toolbar__group"}),en("toolbar-events",[i])])},sN=n=>{const r=n.cyclicKeying?"cyclic":"acyclic";return{uid:n.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":oN({title:D.none(),items:[]}),"overflow-button":bz({name:"more",icon:D.some("more-drawer"),enabled:!0,tooltip:D.some("Reveal or hide additional toolbar items"),primary:!1,buttonType:D.none(),borderless:!1},D.none(),n.providers,[],"overflow-button")},splitToolbarBehaviours:nN(n,r)}},rP=n=>{const r=sN(n),i=EE.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return EE.sketch({...r,lazySink:n.getSink,getOverflowBounds:()=>{const l=n.moreDrawerData.lazyHeader().element,u=Va(l),f=Gi(l),p=Va(f),y=Math.max(f.dom.scrollHeight,p.height);return rn(u.x+4,p.y,u.width-8,y)},parts:{...r.parts,overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:n.attributes}}},components:[i],markers:{overflowToggledClass:"tox-tbtn--enabled"},onOpened:l=>n.onToggled(l,!0),onClosed:l=>n.onToggled(l,!1)})},aP=n=>{const r=OE.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),i=OE.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),l=sN(n);return OE.sketch({...l,components:[r,i],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:u=>{u.getSystem().broadcastOn([Mw()],{type:"opened"}),n.onToggled(u,!0)},onClosed:u=>{u.getSystem().broadcastOn([Mw()],{type:"closed"}),n.onToggled(u,!1)}})},zE=n=>{const r=n.cyclicKeying?"cyclic":"acyclic";return Fu.sketch({uid:n.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(n.type===jd.scrolling?["tox-toolbar--scrolling"]:[])},components:[Fu.parts.groups({})],toolbarBehaviours:nN(n,r)})},rN=[Bg,Wd,Us("tooltip"),zl("buttonType","secondary",["primary","secondary"]),xr("borderless",!1),Za("onAction")],NE={button:[...rN,Zd,Al("type",["button"])],togglebutton:[...rN,xr("active",!1),Al("type",["togglebutton"])]},iP=[Al("type",["group"]),Jn("buttons",[],_r("type",NE))],lP=_r("type",{...NE,group:iP}),Im=ho([Jn("buttons",[],lP),Za("onShow"),Za("onHide")]),aN=(n,r)=>((i,l)=>{var u,f;const p=i.type==="togglebutton",y=i.icon.map(X=>Wg(X,l.icons)).map(ns),v={...i,name:p?i.text.getOr(i.icon.getOr("")):(u=i.text)!==null&&u!==void 0?u:i.icon.getOr(""),primary:i.buttonType==="primary",buttonType:D.from(i.buttonType),tooltip:i.tooltip,icon:i.icon,enabled:!0,borderless:i.borderless},C=WS((f=i.buttonType)!==null&&f!==void 0?f:"secondary"),O=p?i.text.map(l.translate):D.some(l.translate(i.text)),T=O.map(wr),R=v.tooltip.or(O).map(X=>({"aria-label":l.translate(X)})).getOr({}),F=y.map(X=>X.asSpec()),H=Uy([F,T]),G=i.icon.isSome()&&T.isSome(),J={tag:"button",classes:C.concat(...i.icon.isSome()&&!G?["tox-button--icon"]:[]).concat(...G?["tox-button--icon-and-text"]:[]).concat(...i.borderless?["tox-button--naked"]:[]).concat(...i.type==="togglebutton"&&i.active?["tox-button--enabled"]:[]),attributes:R},ae=A0(v,D.some(X=>{const Y=ne=>{y.map(ie=>ie.getOpt(X).each(de=>{So.set(de,[Wg(ne,l.icons)])}))};return p?i.onAction({setIcon:Y,setActive:ne=>{const ie=X.element;ne?(Tt(ie,"tox-button--enabled"),wo(ie,"aria-pressed",!0)):(co(ie,"tox-button--enabled"),pn(ie,"aria-pressed"))},isActive:()=>_n(X.element,"tox-button--enabled")}):i.type==="button"?i.onAction({setIcon:Y}):void 0}),[],J,H,i.tooltip,l);return zi.sketch(ae)})(n,r),iN=Yr().deviceType,DE=iN.isPhone(),ei=iN.isTablet();var c1=gl({name:"silver.View",configFields:[nt("viewConfig")],partFields:[ld({factory:{sketch:n=>{let r=!1;const i=pt(n.buttons,l=>l.type==="group"?(r=!0,((u,f)=>({dom:{tag:"div",classes:["tox-view__toolbar__group"]},components:pt(u.buttons,p=>aN(p,f))}))(l,n.providers)):aN(l,n.providers));return{uid:n.uid,dom:{tag:"div",classes:[r?"tox-view__toolbar":"tox-view__header",...DE||ei?["tox-view--mobile","tox-view--scrolling"]:[]]},behaviours:xt([Po.config({}),po.config({mode:"flow",selector:"button, .tox-button",focusInside:Gh.OnEnterOrSpaceMode})]),components:r?i:[Bu.sketch({dom:{tag:"div",classes:["tox-view__header-start"]},components:[]}),Bu.sketch({dom:{tag:"div",classes:["tox-view__header-end"]},components:i})]}}},schema:[nt("buttons"),nt("providers")],name:"header"}),ld({factory:{sketch:n=>({uid:n.uid,behaviours:xt([Po.config({}),ws.config({})]),dom:{tag:"div",classes:["tox-view__pane"]}})},schema:[],name:"pane"})],factory:(n,r,i,l)=>{const u={getPane:f=>Qa.getPart(f,n,"pane"),getOnShow:f=>n.viewConfig.onShow,getOnHide:f=>n.viewConfig.onHide};return{uid:n.uid,dom:n.dom,components:r,behaviours:xt([Po.config({}),po.config({mode:"cyclic",focusInside:Gh.OnEnterOrSpaceMode})]),apis:u}},apis:{getPane:(n,r)=>n.getPane(r),getOnShow:(n,r)=>n.getOnShow(r),getOnHide:(n,r)=>n.getOnHide(r)}});const cP=(n,r,i)=>Is(r,(l,u)=>{const f=Ua(Ms("view",Im,l));return n.slot(u,c1.sketch({dom:{tag:"div",classes:["tox-view"]},viewConfig:f,components:[...f.buttons.length>0?[c1.parts.header({buttons:f.buttons,providers:i})]:[],c1.parts.pane({})]}))}),dP=(n,r)=>al.sketch(i=>({dom:{tag:"div",classes:["tox-view-wrap__slot-container"]},components:cP(i,n,r),slotBehaviours:a0([Ss(l=>al.hideAllSlots(l))])})),lN=n=>j(al.getSlotNames(n),r=>al.isShowing(n,r)),cN=(n,r,i)=>{al.getSlot(n,r).each(l=>{c1.getPane(l).each(u=>{var f;i(l)((f=u.element.dom,{getContainer:ue(f)}))})})};var jw=cd({factory:(n,r)=>{const i={setViews:(l,u)=>{So.set(l,[dP(u,r.backstage.shared.providers)])},whichView:l=>In.getCurrent(l).bind(lN),toggleView:(l,u,f,p)=>In.getCurrent(l).exists(y=>{const v=lN(y),C=v.exists(T=>p===T),O=al.getSlot(y,p).isSome();return O&&(al.hideAllSlots(y),C?((T=>{const R=T.element;Mo(R,"display","none"),wo(R,"aria-hidden","true")})(l),u()):(f(),(T=>{const R=T.element;Vn(R,"display"),pn(R,"aria-hidden")})(l),al.showSlot(y,p),((T,R)=>{cN(T,R,c1.getOnShow)})(y,p)),v.each(T=>((R,F)=>cN(R,F,c1.getOnHide))(y,T))),O})};return{uid:n.uid,dom:{tag:"div",classes:["tox-view-wrap"],attributes:{"aria-hidden":"true"},styles:{display:"none"}},components:[],behaviours:xt([So.config({}),In.config({find:l=>{const u=So.contents(l);return yt(u)}})]),apis:i}},name:"silver.ViewWrapper",configFields:[nt("backstage")],apis:{setViews:(n,r,i)=>n.setViews(r,i),toggleView:(n,r,i,l,u)=>n.toggleView(r,i,l,u),whichView:(n,r)=>n.whichView(r)}});const uP=Lm.optional({factory:yE,name:"menubar",schema:[nt("backstage")]}),fP=Lm.optional({factory:{sketch:n=>mE.sketch({uid:n.uid,dom:n.dom,listBehaviours:xt([po.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:()=>zE({type:n.type,uid:Xt("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:n.providers,onEscape:()=>(n.onEscape(),D.some(!0))}),setupItem:(r,i,l,u)=>{Fu.setGroups(i,l)},shell:!0})},name:"multiple-toolbar",schema:[nt("dom"),nt("onEscape")]}),mP=Lm.optional({factory:{sketch:n=>(i=>i.type===jd.sliding?aP:i.type===jd.floating?rP:zE)(n)({type:n.type,uid:n.uid,onEscape:()=>(n.onEscape(),D.some(!0)),onToggled:(i,l)=>n.onToolbarToggled(l),cyclicKeying:!1,initGroups:[],getSink:n.getSink,providers:n.providers,moreDrawerData:{lazyToolbar:n.lazyToolbar,lazyMoreButton:n.lazyMoreButton,lazyHeader:n.lazyHeader},attributes:n.attributes})},name:"toolbar",schema:[nt("dom"),nt("onEscape"),nt("getSink")]}),pP=Lm.optional({factory:{sketch:n=>{const r=n.editor,i=n.sticky?qz:Rw;return{uid:n.uid,dom:n.dom,components:n.components,behaviours:xt(i(r,n.sharedBackstage))}}},name:"header",schema:[nt("dom")]}),gP=Lm.optional({factory:{sketch:n=>({uid:n.uid,dom:n.dom,components:[{dom:{tag:"a",attributes:{href:"https://www.tiny.cloud/tinymce-self-hosted-premium-features/?utm_campaign=self_hosted_upgrade_promo&utm_source=tiny&utm_medium=referral",rel:"noopener",target:"_blank","aria-hidden":"true"},classes:["tox-promotion-link"],innerHtml:"⚡️Upgrade"}}]})},name:"promotion",schema:[nt("dom")]}),hP=Lm.optional({name:"socket",schema:[nt("dom")]}),bP=Lm.optional({factory:{sketch:n=>({uid:n.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"presentation"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:xt([ws.config({}),Po.config({}),Fl.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:r=>{In.getCurrent(r).each(al.hideAllSlots),Qo(r,xE)},onGrown:r=>{Qo(r,xE)},onStartGrow:r=>{lo(r,_E,{width:er(r.element,"width").getOr("")})},onStartShrink:r=>{lo(r,_E,{width:Go(r.element)+"px"})}}),So.config({}),In.config({find:r=>{const i=So.contents(r);return yt(i)}})])}],behaviours:xt([gS(0),en("sidebar-sliding-events",[Xe(_E,(r,i)=>{Mo(r.element,"width",i.event.width)}),Xe(xE,(r,i)=>{Vn(r.element,"width")})])])})},name:"sidebar",schema:[nt("dom")]}),yP=Lm.optional({factory:{sketch:n=>({uid:n.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:xt([So.config({}),eu.config({focus:!1}),In.config({find:r=>yt(r.components())})]),components:[]})},name:"throbber",schema:[nt("dom")]}),vP=Lm.optional({factory:jw,name:"viewWrapper",schema:[nt("backstage")]}),_P=Lm.optional({factory:{sketch:n=>({uid:n.uid,dom:{tag:"div",classes:["tox-editor-container"]},components:n.components})},name:"editorContainer",schema:[]});var Bs=gl({name:"OuterContainer",factory:(n,r,i)=>{let l=!1;const u=p=>{Ts(p,".tox-statusbar").each(y=>{Ns(y,"display")==="none"&&yr(y,"aria-hidden")==="true"?(Vn(y,"display"),pn(y,"aria-hidden")):(Mo(y,"display","none"),wo(y,"aria-hidden","true"))})},f={getSocket:p=>Qa.getPart(p,n,"socket"),setSidebar:(p,y,v)=>{Qa.getPart(p,n,"sidebar").each(C=>((O,T,R)=>{In.getCurrent(O).each(F=>{So.set(F,[Xz(T)]);const H=R==null?void 0:R.toLowerCase();te(H)&&Vo(T,H)&&In.getCurrent(F).each(G=>{al.showSlot(G,H),Fl.immediateGrow(F),Vn(F.element,"width"),Pw(O.element,"region")})})})(C,y,v))},toggleSidebar:(p,y)=>{Qa.getPart(p,n,"sidebar").each(v=>((C,O)=>{In.getCurrent(C).each(T=>{In.getCurrent(T).each(R=>{Fl.hasGrown(T)?al.isShowing(R,O)?(Fl.shrink(T),Pw(C.element,"presentation")):(al.hideAllSlots(R),al.showSlot(R,O),Pw(C.element,"region")):(al.hideAllSlots(R),al.showSlot(R,O),Fl.grow(T),Pw(C.element,"region"))})})})(v,y))},whichSidebar:p=>Qa.getPart(p,n,"sidebar").bind(KL).getOrNull(),getHeader:p=>Qa.getPart(p,n,"header"),getToolbar:p=>Qa.getPart(p,n,"toolbar"),setToolbar:(p,y)=>{Qa.getPart(p,n,"toolbar").each(v=>{const C=pt(y,Vw);v.getApis().setGroups(v,C)})},setToolbars:(p,y)=>{Qa.getPart(p,n,"multiple-toolbar").each(v=>{const C=pt(y,O=>pt(O,Vw));mE.setItems(v,C)})},refreshToolbar:p=>{Qa.getPart(p,n,"toolbar").each(y=>y.getApis().refresh(y))},toggleToolbarDrawer:p=>{Qa.getPart(p,n,"toolbar").each(y=>{oi(y.getApis().toggle,v=>v(y))})},toggleToolbarDrawerWithoutFocusing:p=>{Qa.getPart(p,n,"toolbar").each(y=>{oi(y.getApis().toggleWithoutFocusing,v=>v(y))})},isToolbarDrawerToggled:p=>Qa.getPart(p,n,"toolbar").bind(y=>D.from(y.getApis().isOpen).map(v=>v(y))).getOr(!1),getThrobber:p=>Qa.getPart(p,n,"throbber"),focusToolbar:p=>{Qa.getPart(p,n,"toolbar").orThunk(()=>Qa.getPart(p,n,"multiple-toolbar")).each(y=>{po.focusIn(y)})},setMenubar:(p,y)=>{Qa.getPart(p,n,"menubar").each(v=>{yE.setMenus(v,y)})},focusMenubar:p=>{Qa.getPart(p,n,"menubar").each(y=>{yE.focus(y)})},setViews:(p,y)=>{Qa.getPart(p,n,"viewWrapper").each(v=>{jw.setViews(v,y)})},toggleView:(p,y)=>Qa.getPart(p,n,"viewWrapper").exists(v=>jw.toggleView(v,()=>f.showMainView(p),()=>f.hideMainView(p),y)),whichView:p=>Qa.getPart(p,n,"viewWrapper").bind(jw.whichView).getOrNull(),hideMainView:p=>{l=f.isToolbarDrawerToggled(p),l&&f.toggleToolbarDrawer(p),Qa.getPart(p,n,"editorContainer").each(y=>{const v=y.element;u(v),Mo(v,"display","none"),wo(v,"aria-hidden","true")})},showMainView:p=>{l&&f.toggleToolbarDrawer(p),Qa.getPart(p,n,"editorContainer").each(y=>{const v=y.element;u(v),Vn(v,"display"),pn(v,"aria-hidden")})}};return{uid:n.uid,dom:n.dom,components:r,apis:f,behaviours:n.behaviours}},configFields:[nt("dom"),nt("behaviours")],partFields:[pP,uP,mP,fP,hP,bP,gP,yP,vP,_P],apis:{getSocket:(n,r)=>n.getSocket(r),setSidebar:(n,r,i,l)=>{n.setSidebar(r,i,l)},toggleSidebar:(n,r,i)=>{n.toggleSidebar(r,i)},whichSidebar:(n,r)=>n.whichSidebar(r),getHeader:(n,r)=>n.getHeader(r),getToolbar:(n,r)=>n.getToolbar(r),setToolbar:(n,r,i)=>{n.setToolbar(r,i)},setToolbars:(n,r,i)=>{n.setToolbars(r,i)},refreshToolbar:(n,r)=>n.refreshToolbar(r),toggleToolbarDrawer:(n,r)=>{n.toggleToolbarDrawer(r)},toggleToolbarDrawerWithoutFocusing:(n,r)=>{n.toggleToolbarDrawerWithoutFocusing(r)},isToolbarDrawerToggled:(n,r)=>n.isToolbarDrawerToggled(r),getThrobber:(n,r)=>n.getThrobber(r),setMenubar:(n,r,i)=>{n.setMenubar(r,i)},focusMenubar:(n,r)=>{n.focusMenubar(r)},focusToolbar:(n,r)=>{n.focusToolbar(r)},setViews:(n,r,i)=>{n.setViews(r,i)},toggleView:(n,r,i)=>n.toggleView(r,i),whichView:(n,r)=>n.whichView(r)}});const dN={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"}},RE=n=>n.split(" "),uN=(n,r)=>{const i={...dN,...r.menus},l=tn(r.menus).length>0,u=r.menubar===void 0||r.menubar===!0?RE("file edit view insert format tools table help"):RE(r.menubar===!1?"":r.menubar),f=cn(u,y=>{const v=Vo(dN,y);return l?v||St(r.menus,y).exists(C=>Vo(C,"items")):v}),p=pt(f,y=>{const v=i[y];return((C,O,T)=>{const R=OA(T).split(/[ ,]/);return{text:C.title,getItems:()=>Sn(C.items,F=>{const H=F.toLowerCase();return H.trim().length===0||To(R,G=>G===H)?[]:H==="separator"||H==="|"?[{type:"separator"}]:O.menuItems[H]?[O.menuItems[H]]:[]})}})({title:v.title,items:RE(v.items)},r,n)});return cn(p,y=>y.getItems().length>0&&To(y.getItems(),v=>te(v)||v.type!=="separator"))},fN=(n,r,i)=>(n.on("remove",()=>i.unload(r)),i.load(r)),ME=(n,r,i,l)=>(n.on("remove",()=>l.unloadRawCss(r)),l.loadRawCss(r,i)),xP=async(n,r)=>{const i="ui/"+ux(n).getOr("default")+"/skin.css",l=tinymce.Resource.get(i);if(!te(l)){const u=n.editorManager.suffix;return fN(n,r+`/skin${u}.css`,n.ui.styleSheetLoader)}ME(n,i,l,n.ui.styleSheetLoader)},wP=async(n,r)=>{var i;if(i=Vt(n.getElement()),ki(i).isSome()){const l="ui/"+ux(n).getOr("default")+"/skin.shadowdom.css",u=tinymce.Resource.get(l);if(!te(u)){const f=n.editorManager.suffix;return fN(n,r+`/skin.shadowdom${f}.css`,By.DOM.styleSheetLoader)}ME(n,l,u,By.DOM.styleSheetLoader)}},mN=(n,r)=>(async(i,l)=>{const u=()=>{const p=dx(l),y=l.editorManager.suffix;p&&l.contentCSS.push(p+(i?"/content.inline":"/content")+`${y}.css`)};ux(l).fold(u,p=>{const y="ui/"+p+(i?"/content.inline":"/content")+".css",v=tinymce.Resource.get(y);te(v)?ME(l,y,v,l.ui.styleSheetLoader):u()});const f=dx(l);if(!Tg(l)&&te(f))return Promise.all([xP(l,f),wP(l,f)]).then()})(n,r).then((i=>{const l=()=>{i._skinLoaded=!0,(u=>{u.dispatch("SkinLoaded")})(i)};return()=>{i.initialized?l():i.on("init",l)}})(r),((i,l)=>()=>((u,f)=>{u.dispatch("SkinLoadError",f)})(i,{message:"Skin could not be loaded"}))(r)),pN=ot(mN,!1),kP=ot(mN,!0),Eb=(n,r,i)=>vl(i)?n.translate(r):n.translate([r,n.translate(i)]),CP=(n,r)=>{const i=(f,p,y,v)=>{const C=n.shared.providers.translate(f.title);if(f.type==="separator")return D.some({type:"separator",text:C});if(f.type==="submenu"){const O=Sn(f.getStyleItems(),T=>l(T,p,v));return p===0&&O.length<=0?D.none():D.some({type:"nestedmenuitem",text:C,enabled:O.length>0,getSubmenuItems:()=>Sn(f.getStyleItems(),T=>l(T,p,v))})}return D.some({type:"togglemenuitem",text:C,icon:f.icon,active:f.isSelected(v),enabled:!y,onAction:r.onAction(f),...f.getStylePreview().fold(()=>({}),O=>({meta:{style:O}}))})},l=(f,p,y)=>{const v=f.type==="formatter"&&r.isInvalid(f);return p===0?v?[]:i(f,p,!1,y).toArray():i(f,p,v,y).toArray()},u=f=>{const p=r.getCurrentValue(),y=r.shouldHide?0:1;return Sn(f,v=>l(v,y,p))};return{validateItems:u,getFetch:(f,p)=>(y,v)=>{const C=p(),O=u(C);v(kb(O,Sf.CLOSE_ON_EXECUTE,f,{isHorizontalMenu:!1,search:D.none()}))}}},d1=(n,r)=>{const i=r.dataset,l=i.type==="basic"?()=>pt(i.data,u=>Rz(u,r.isSelectedFor,r.getPreviewFor)):i.getData;return{items:CP(n,r),getStyleItems:l}},L0=(n,r,i,l,u,f)=>{const{items:p,getStyleItems:y}=d1(r,i),v=so(i.tooltip);return RS({text:i.icon.isSome()?D.none():i.text,icon:i.icon,ariaLabel:D.some(i.tooltip),tooltip:D.none(),role:D.none(),fetch:p.getFetch(r,y),onSetup:C=>{const O=T=>C.setTooltip(Eb(n,l(T.value),T.value));return n.on(u,O),Ky(gb(n,"NodeChange",T=>{const R=T.getComponent();i.updateText(R),Fo.set(T.getComponent(),!n.selection.isEditable())})(C),()=>n.off(u,O))},getApi:C=>({getComponent:ue(C),setTooltip:O=>{const T=r.shared.providers.translate(O);wo(C.element,"aria-label",T),v.set(O)}}),columns:1,presets:"normal",classes:i.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[Pr.config({...r.shared.providers.tooltips.getConfig({tooltipText:r.shared.providers.translate(i.tooltip),onShow:C=>{if(i.tooltip!==v.get()){const O=r.shared.providers.translate(v.get());Pr.setComponents(C,r.shared.providers.tooltips.getComponents({tooltipText:O}))}}})})]},"tox-tbtn",r.shared,f)};var Tb;(function(n){n[n.SemiColon=0]="SemiColon",n[n.Space=1]="Space"})(Tb||(Tb={}));const BE=(n,r,i)=>{const l=(u=((f,p)=>p===Tb.SemiColon?f.replace(/;$/,"").split(";"):f.split(" "))(n.options.get(r),i),pt(u,f=>{let p=f,y=f;const v=f.split("=");return v.length>1&&(p=v[0],y=v[1]),{title:p,format:y}}));var u;return{type:"basic",data:l}},gN=ue("Alignment {0}"),hN="left",LE=[{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"}],PE=n=>{const r={type:"basic",data:LE};return{tooltip:Eb(n,gN(),hN),text:D.none(),icon:D.some("align-left"),isSelectedFor:i=>()=>n.formatter.match(i),getCurrentValue:D.none,getPreviewFor:i=>D.none,onAction:i=>()=>j(LE,l=>l.format===i.format).each(l=>n.execCommand(l.command)),updateText:i=>{const l=j(LE,u=>n.formatter.match(u.format)).fold(ue(hN),u=>u.title.toLowerCase());lo(i,Xd,{icon:`align-${l}`}),((u,f)=>{u.dispatch("AlignTextUpdate",f)})(n,{value:l})},dataset:r,shouldHide:!1,isInvalid:i=>!n.formatter.canApply(i.format)}},bN=(n,r)=>{const i=r(),l=pt(i,u=>u.format);return D.from(n.formatter.closest(l)).bind(u=>j(i,f=>f.format===u))},IE=ue("Block {0}"),FE="Paragraph",$E=n=>{const r=BE(n,"block_formats",Tb.SemiColon);return{tooltip:Eb(n,IE(),FE),text:D.some(FE),icon:D.none(),isSelectedFor:i=>()=>n.formatter.match(i),getCurrentValue:D.none,getPreviewFor:i=>()=>{const l=n.formatter.get(i);return l?D.some({tag:l.length>0&&(l[0].inline||l[0].block)||"div",styles:n.dom.parseStyle(n.formatter.getCssText(i))}):D.none()},onAction:WO(n),updateText:i=>{const l=bN(n,()=>r.data).fold(ue(FE),u=>u.title);lo(i,gd,{text:l}),((u,f)=>{u.dispatch("BlocksTextUpdate",f)})(n,{value:l})},dataset:r,shouldHide:!1,isInvalid:i=>!n.formatter.canApply(i.format)}},yN=ue("Font {0}"),HE="System Font",SP=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],vN=n=>{const r=n.split(/\s*,\s*/);return pt(r,i=>i.replace(/^['"]+|['"]+$/g,""))},_N=(n,r)=>r.length>0&&bi(r,i=>n.indexOf(i.toLowerCase())>-1),xN=n=>{const r=()=>{const l=C=>C?vN(C)[0]:"",u=n.queryCommandValue("FontName"),f=i.data,p=u?u.toLowerCase():"",y=cx(n);return{matchOpt:j(f,C=>{const O=C.format;return O.toLowerCase()===p||l(O).toLowerCase()===l(p).toLowerCase()}).orThunk(()=>nn(((C,O)=>{if(C.indexOf("-apple-system")===0||O.length>0){const T=vN(C.toLowerCase());return _N(T,SP)||_N(T,O)}return!1})(p,y),{title:HE,format:p})),font:u}},i=BE(n,"font_family_formats",Tb.SemiColon);return{tooltip:Eb(n,yN(),HE),text:D.some(HE),icon:D.none(),isSelectedFor:l=>u=>u.exists(f=>f.format===l),getCurrentValue:()=>{const{matchOpt:l}=r();return l},getPreviewFor:l=>()=>D.some({tag:"div",styles:l.indexOf("dings")===-1?{"font-family":l}:{}}),onAction:l=>()=>{n.undoManager.transact(()=>{n.focus(),n.execCommand("FontName",!1,l.format)})},updateText:l=>{const{matchOpt:u,font:f}=r(),p=u.fold(ue(f),y=>y.title);lo(l,gd,{text:p}),((y,v)=>{y.dispatch("FontFamilyTextUpdate",v)})(n,{value:p})},dataset:i,shouldHide:!1,isInvalid:Fe}},EP={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:[""]},TP=(()=>{const n="[0-9]+",r="[eE][+-]?"+n,i=u=>`(?:${u})?`,l=["Infinity",n+"\\."+i(n)+i(r),"\\."+n+i(r),n+i(r)].join("|");return new RegExp(`^([+-]?(?:${l}))(.*)$`)})(),Uw=(n,r)=>D.from(TP.exec(n)).bind(i=>{const l=Number(i[1]),u=i[2];return((f,p)=>To(p,y=>To(EP[y],v=>f===v)))(u,r)?D.some({value:l,unit:u}):D.none()}),wN={tab:ue(9),escape:ue(27),enter:ue(13),backspace:ue(8),delete:ue(46),left:ue(37),up:ue(38),right:ue(39),down:ue(40),space:ue(32),home:ue(36),end:ue(35),pageUp:ue(33),pageDown:ue(34)},kN=ue("Font size {0}"),CN="12pt",AP={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},SN={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},OP=(n,r)=>/[0-9.]+px$/.test(n)?((i,l)=>{const u=Math.pow(10,l);return Math.round(i*u)/u})(72*parseInt(n,10)/96,r||0)+"pt":St(SN,n).getOr(n),zP=n=>St(AP,n).getOr(""),EN=n=>{const r=()=>{let u=D.none();const f=l.data,p=n.queryCommandValue("FontSize");if(p)for(let y=3;u.isNone()&&y>=0;y--){const v=OP(p,y),C=zP(v);u=j(f,O=>O.format===p||O.format===v||O.format===C)}return{matchOpt:u,size:p}},i=ue(D.none),l=BE(n,"font_size_formats",Tb.Space);return{tooltip:Eb(n,kN(),CN),text:D.some(CN),icon:D.none(),isSelectedFor:u=>f=>f.exists(p=>p.format===u),getPreviewFor:i,getCurrentValue:()=>{const{matchOpt:u}=r();return u},onAction:u=>()=>{n.undoManager.transact(()=>{n.focus(),n.execCommand("FontSize",!1,u.format)})},updateText:u=>{const{matchOpt:f,size:p}=r(),y=f.fold(ue(p),v=>v.title);lo(u,gd,{text:y}),((v,C)=>{v.dispatch("FontSizeTextUpdate",C)})(n,{value:y})},dataset:l,shouldHide:!1,isInvalid:Fe}},TN=n=>vl(n)?"Formats":"Format {0}",AN=(n,r)=>{const i="Formats";return{tooltip:Eb(n,TN(""),""),text:D.some(i),icon:D.none(),isSelectedFor:l=>()=>n.formatter.match(l),getCurrentValue:D.none,getPreviewFor:l=>()=>{const u=n.formatter.get(l);return u!==void 0?D.some({tag:u.length>0&&(u[0].inline||u[0].block)||"div",styles:n.dom.parseStyle(n.formatter.getCssText(l))}):D.none()},onAction:WO(n),updateText:l=>{const u=y=>zz(y)?Sn(y.items,u):Nz(y)?[{title:y.title,format:y.format}]:[],f=Sn(Dz(n),u),p=bN(n,ue(f)).fold(ue({title:i,tooltipLabel:""}),y=>({title:y.title,tooltipLabel:y.title}));lo(l,gd,{text:p.title}),((y,v)=>{y.dispatch("StylesTextUpdate",v)})(n,{value:p.tooltipLabel})},shouldHide:AA(n),isInvalid:l=>!n.formatter.canApply(l.format),dataset:r}},VE=ue([nt("toggleClass"),nt("fetch"),Id("onExecute"),Ne("getHotspot",D.some),Ne("getAnchorOverrides",ue({})),cf(),Id("onItemExecute"),vn("lazySink"),nt("dom"),Dn("onOpen"),Jt("splitDropdownBehaviours",[kr,po,Po]),Ne("matchWidth",!1),Ne("useMinWidth",!1),Ne("eventOrder",{}),vn("role"),vn("listRole")].concat(FC())),NP=sl({factory:zi,schema:[nt("dom")],name:"arrow",defaults:()=>({buttonBehaviours:xt([Po.revoke()])}),overrides:n=>({dom:{tag:"span",attributes:{role:"presentation"}},action:r=>{r.getSystem().getByUid(n.uid).each(Ld)},buttonBehaviours:xt([No.config({toggleOnExecute:!1,toggleClass:n.toggleClass})])})}),DP=sl({factory:zi,schema:[nt("dom")],name:"button",defaults:()=>({buttonBehaviours:xt([Po.revoke()])}),overrides:n=>({dom:{tag:"span",attributes:{role:"presentation"}},action:r=>{r.getSystem().getByUid(n.uid).each(i=>{n.onExecute(i,r)})}})}),RP=ue([NP,DP,ld({factory:{sketch:n=>({uid:n.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:n.text}})},schema:[nt("text")],name:"aria-descriptor"}),Nu({schema:[fp()],name:"menu",defaults:n=>({onExecute:(r,i)=>{r.getSystem().getByUid(n.uid).each(l=>{n.onItemExecute(l,r,i)})}})}),l3()]),P0=gl({name:"SplitDropdown",configFields:VE(),partFields:RP(),factory:(n,r,i,l)=>{const u=C=>{In.getCurrent(C).each(O=>{ss.highlightFirst(O),po.focusIn(O)})},f=C=>{LC(n,Ct,C,l,u,Ui.HighlightMenuAndItem).get(Ke)},p=C=>{const O=Op(C,n,"button");return Ld(O),D.some(!0)},y={...Ho([Ss((C,O)=>{As(C,n,"aria-descriptor").each(T=>{const R=Xt("aria");wo(T.element,"id",R),wo(C.element,"aria-describedby",R)})})]),...My(D.some(f))},v={repositionMenus:C=>{No.isOn(C)&&u3(C)}};return{uid:n.uid,dom:n.dom,components:r,apis:v,eventOrder:{...n.eventOrder,[di()]:["disabling","toggling","alloy.base.behaviour"]},events:y,behaviours:Xo(n.splitDropdownBehaviours,[kr.config({others:{sandbox:C=>{const O=Op(C,n,"arrow");return IC(n,C,{onOpen:()=>{No.on(O),No.on(C)},onClose:()=>{No.off(O),No.off(C)}})}}}),po.config({mode:"special",onSpace:p,onEnter:p,onDown:C=>(f(C),D.some(!0))}),Po.config({}),No.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:n.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:(n,r)=>n.repositionMenus(r)}}),jE=n=>({isEnabled:()=>!Fo.isDisabled(n),setEnabled:r=>Fo.set(n,!r),setText:r=>lo(n,gd,{text:r}),setIcon:r=>lo(n,Xd,{icon:r})}),MP=n=>({setActive:r=>{No.set(n,r)},isActive:()=>No.isOn(n),isEnabled:()=>!Fo.isDisabled(n),setEnabled:r=>Fo.set(n,!r),setText:r=>lo(n,gd,{text:r}),setIcon:r=>lo(n,Xd,{icon:r})}),ON=(n,r)=>n.map(i=>({"aria-label":r.translate(i)})).getOr({}),UE=Xt("focus-button"),ZE=(n,r,i,l,u,f)=>{const p=r.map(v=>ns(DS(v,"tox-tbtn",u))),y=n.map(v=>ns(Wg(v,u.icons)));return{dom:{tag:"button",classes:["tox-tbtn"].concat(r.isSome()?["tox-tbtn--select"]:[]),attributes:{...ON(i,u),...st(f)?{"data-mce-name":f}:{}}},components:Uy([y.map(v=>v.asSpec()),p.map(v=>v.asSpec())]),eventOrder:{[at()]:["focusing","alloy.base.behaviour",Zg],[ka()]:[Zg,"toolbar-group-button-events"]},buttonBehaviours:xt([Dx(u.isDisabled),Ca(),en(Zg,[Ss((v,C)=>vw(v)),Xe(gd,(v,C)=>{p.bind(O=>O.getOpt(v)).each(O=>{So.set(O,[wr(u.translate(C.event.text))])})}),Xe(Xd,(v,C)=>{y.bind(O=>O.getOpt(v)).each(O=>{So.set(O,[Wg(C.event.icon,u.icons)])})}),Xe(at(),(v,C)=>{C.event.prevent(),Qo(v,UE)})])].concat(l.getOr([])))}},zN=(n,r,i,l)=>{var u;const f=so(Ke),p=ZE(n.icon,n.text,n.tooltip,D.none(),i,l);return zi.sketch({dom:p.dom,components:p.components,eventOrder:NS,buttonBehaviours:{...xt([en("toolbar-button-events",[(y={onAction:n.onAction,getApi:r.getApi},Bl((v,C)=>{i0(y,v)(O=>{lo(v,yw,{buttonApi:O}),y.onAction(O)})})),Lg(r,f),Bp(r,f)]),...n.tooltip.map(v=>Pr.config(i.tooltips.getConfig({tooltipText:i.translate(v)+n.shortcut.map(C=>` (${Rx(C)})`).getOr("")}))).toArray(),Dx(()=>!n.enabled||i.isDisabled()),Ca()].concat(r.toolbarButtonBehaviours)),[Zg]:(u=p.buttonBehaviours)===null||u===void 0?void 0:u[Zg]}});var y},NN=(n,r,i,l)=>zN(n,{toolbarButtonBehaviours:i.length>0?[en("toolbarButtonWith",i)]:[],getApi:jE,onSetup:n.onSetup},r,l),DN=(n,r,i,l)=>zN(n,{toolbarButtonBehaviours:[So.config({}),No.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(i.length>0?[en("toolbarToggleButtonWith",i)]:[]),getApi:MP,onSetup:n.onSetup},r,l),BP=(n,r,i)=>l=>Pg(u=>r.fetch(u)).map(u=>D.from($C(ls(bb(Xt("menu-value"),u,f=>{r.onItemAction(n(l),f)},r.columns,r.presets,Sf.CLOSE_ON_EXECUTE,r.select.getOr(Fe),i),{movement:f0(r.columns,r.presets),menuBehaviours:a0(r.columns!=="auto"?[]:[Ss((f,p)=>{uC(f,4,Rg(r.presets)).each(({numRows:y,numColumns:v})=>{po.setGridSize(f,y,v)})})])})))),LP=[{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"]}],Yg=(n,r)=>(i,l,u,f)=>{const p=n(i).mapError(y=>ii(y)).getOrDie();return r(p,l,u,f)},PP={button:Yg(_O,(n,r,i,l)=>((u,f,p)=>NN(u,f,[],p))(n,r.shared.providers,l)),togglebutton:Yg(Ox,(n,r,i,l)=>((u,f,p)=>DN(u,f,[],p))(n,r.shared.providers,l)),menubutton:Yg(Gz,(n,r,i,l)=>n1(n,"tox-tbtn",r,D.none(),!1,l)),splitbutton:Yg(n=>Ms("SplitButton",VL,n),(n,r,i,l)=>((u,f,p)=>{const y=so(u.tooltip.getOr("")),v=T=>({isEnabled:()=>!Fo.isDisabled(T),setEnabled:R=>Fo.set(T,!R),setIconFill:(R,F)=>{Ys(T.element,`svg path[class="${R}"], rect[class="${R}"]`).each(H=>{wo(H,"fill",F)})},setActive:R=>{wo(T.element,"aria-pressed",R),Ys(T.element,"span").each(F=>{T.getSystem().getByDom(F).each(H=>No.set(H,R))})},isActive:()=>Ys(T.element,"span").exists(R=>T.getSystem().getByDom(R).exists(No.isOn)),setText:R=>Ys(T.element,"span").each(F=>T.getSystem().getByDom(F).each(H=>lo(H,gd,{text:R}))),setIcon:R=>Ys(T.element,"span").each(F=>T.getSystem().getByDom(F).each(H=>lo(H,Xd,{icon:R}))),setTooltip:R=>{const F=f.providers.translate(R);wo(T.element,"aria-label",F),y.set(R)}}),C=so(Ke),O={getApi:v,onSetup:u.onSetup};return P0.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:{"aria-pressed":!1,...ON(u.tooltip,f.providers),...st(p)?{"data-mce-name":p}:{}}},onExecute:T=>{const R=v(T);R.isEnabled()&&u.onAction(R)},onItemExecute:(T,R,F)=>{},splitDropdownBehaviours:xt([NO(f.providers.isDisabled),Ca(),en("split-dropdown-events",[Ss((T,R)=>vw(T)),Xe(UE,Po.focus),Lg(O,C),Bp(O,C)]),vb.config({}),...u.tooltip.map(T=>Pr.config({...f.providers.tooltips.getConfig({tooltipText:f.providers.translate(T),onShow:R=>{if(y.get()!==T){const F=f.providers.translate(y.get());Pr.setComponents(R,f.providers.tooltips.getComponents({tooltipText:F}))}}})})).toArray()]),eventOrder:{[ka()]:["alloy.base.behaviour","split-dropdown-events","tooltipping"],[Dl()]:["split-dropdown-events","tooltipping"]},toggleClass:"tox-tbtn--enabled",lazySink:f.getSink,fetch:BP(v,u,f.providers),parts:{menu:Cx(0,u.columns,u.presets)},components:[P0.parts.button(ZE(u.icon,u.text,D.none(),D.some([No.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),f.providers)),P0.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:JA("chevron-down",f.providers.icons)},buttonBehaviours:xt([NO(f.providers.isDisabled),Ca(),xx()])}),P0.parts["aria-descriptor"]({text:f.providers.translate("To open the popup, press Shift+Enter")})]})})(n,r.shared,l)),grouptoolbarbutton:Yg(n=>Ms("GroupToolbarButton",$L,n),(n,r,i,l)=>{const u=i.ui.registry.getAll().buttons,f={[nl]:r.shared.header.isPositionedAtTop()?Pc.TopToBottom:Pc.BottomToTop};if(sb(i)===jd.floating)return((p,y,v,C,O)=>{const T=y.shared,R=so(Ke),F={toolbarButtonBehaviours:[],getApi:jE,onSetup:p.onSetup},H=[en("toolbar-group-button-events",[Lg(F,R),Bp(F,R)])];return jp.sketch({lazySink:T.getSink,fetch:()=>Pg(G=>{G(pt(v(p.items),Vw))}),markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:ZE(p.icon,p.text,p.tooltip,D.some(H),T.providers,O),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:C}}}})})(n,r,p=>Zw(i,{buttons:u,toolbar:p,allowToolbarGroups:!1},r,D.none()),f,l);throw new Error("Toolbar groups are only supported when using floating toolbar mode")})},I0={styles:(n,r)=>{const i={type:"advanced",...r.styles};return L0(n,r,AN(n,i),TN,"StylesTextUpdate","styles")},fontsize:(n,r)=>L0(n,r,EN(n),kN,"FontSizeTextUpdate","fontsize"),fontsizeinput:(n,r)=>((i,l,u,f)=>{let p=D.none();const y=gb(i,"NodeChange SwitchMode",ne=>{const ie=ne.getComponent();p=D.some(ie),u.updateInputValue(ie),Fo.set(ie,!i.selection.isEditable())}),v=ne=>({getComponent:ue(ne)}),C=so(Ke),O=Xt("custom-number-input-events"),T=(ne,ie,de)=>{const we=p.map(kt=>Be.getValue(kt)).getOr(""),ze=u.getNewValue(we,ne),tt=we.length-`${ze}`.length,Je=p.map(kt=>kt.element.dom.selectionStart-tt),Ze=p.map(kt=>kt.element.dom.selectionEnd-tt);u.onAction(ze,de),p.each(kt=>{Be.setValue(kt,ze),ie&&(Je.each(Wt=>kt.element.dom.selectionStart=Wt),Ze.each(Wt=>kt.element.dom.selectionEnd=Wt))})},R=(ne,ie)=>T((de,we)=>de-we,ne,ie),F=(ne,ie)=>T((de,we)=>de+we,ne,ie),H=ne=>ba(ne.element).fold(D.none,ie=>(Ti(ie),D.some(!0))),G=ne=>wp(ne.element)?(Yi(ne.element).each(ie=>Ti(ie)),D.some(!0)):D.none(),J=(ne,ie,de,we)=>{const ze=so(Ke),tt=l.shared.providers.translate(de),Je=Xt("altExecuting"),Ze=gb(i,"NodeChange SwitchMode",Wt=>{Fo.set(Wt.getComponent(),!i.selection.isEditable())}),kt=Wt=>{Fo.isDisabled(Wt)||ne(!0)};return zi.sketch({dom:{tag:"button",attributes:{"aria-label":tt,"data-mce-name":ie},classes:we.concat(ie)},components:[C0(ie,l.shared.providers.icons)],buttonBehaviours:xt([Fo.config({}),Pr.config(l.shared.providers.tooltips.getConfig({tooltipText:tt})),en(Je,[Lg({onSetup:Ze,getApi:v},ze),Bp({getApi:v},ze),Xe(Ws(),(Wt,ro)=>{ro.event.raw.keyCode!==wN.space()&&ro.event.raw.keyCode!==wN.enter()||Fo.isDisabled(Wt)||ne(!1)}),Xe(Mr(),kt),Xe(ge(),kt)])]),eventOrder:{[Ws()]:[Je,"keying"],[Mr()]:[Je,"alloy.base.behaviour"],[ge()]:[Je,"alloy.base.behaviour"],[ka()]:["alloy.base.behaviour",Je,"tooltipping"],[Dl()]:[Je,"tooltipping"]}})},ae=ns(J(ne=>R(!1,ne),"minus","Decrease font size",[])),X=ns(J(ne=>F(!1,ne),"plus","Increase font size",[])),Y=ns({dom:{tag:"div",classes:["tox-input-wrapper"]},components:[Mp.sketch({inputBehaviours:xt([Fo.config({}),en(O,[Lg({onSetup:y,getApi:v},C),Bp({getApi:v},C)]),en("input-update-display-text",[Xe(gd,(ne,ie)=>{Be.setValue(ne,ie.event.text)}),Xe(sr(),ne=>{u.onAction(Be.getValue(ne))}),Xe(Nd(),ne=>{u.onAction(Be.getValue(ne))})]),po.config({mode:"special",onEnter:ne=>(T(Ct,!0,!0),D.some(!0)),onEscape:H,onUp:ne=>(F(!0,!1),D.some(!0)),onDown:ne=>(R(!0,!1),D.some(!0)),onLeft:(ne,ie)=>(ie.cut(),D.none()),onRight:(ne,ie)=>(ie.cut(),D.none())})])})],behaviours:xt([Po.config({}),po.config({mode:"special",onEnter:G,onSpace:G,onEscape:H}),en("input-wrapper-events",[Xe(io(),ne=>{Ht([ae,X],ie=>{const de=Vt(ie.get(ne).element.dom);wp(de)&&Th(de)})})])])});return{dom:{tag:"div",classes:["tox-number-input"],attributes:{...st(f)?{"data-mce-name":f}:{}}},components:[ae.asSpec(),Y.asSpec(),X.asSpec()],behaviours:xt([Po.config({}),po.config({mode:"flow",focusInside:Gh.OnEnterOrSpaceMode,cycles:!1,selector:"button, .tox-input-wrapper",onEscape:ne=>wp(ne.element)?D.none():(Ti(ne.element),D.some(!0))})])}})(n,r,(i=>{const l=()=>i.queryCommandValue("FontSize");return{updateInputValue:u=>lo(u,gd,{text:l()}),onAction:(u,f)=>i.execCommand("FontSize",!1,u,{skip_focus:!f}),getNewValue:(u,f)=>{Uw(u,["unsupportedLength","empty"]);const p=l(),y=Uw(u,["unsupportedLength","empty"]).or(Uw(p,["unsupportedLength","empty"])),v=y.map(F=>F.value).getOr(16),C=P2(i),O=y.map(F=>F.unit).filter(F=>F!=="").getOr(C),T=f(v,(F=>{var H;return(H={em:{step:.1},cm:{step:.1},in:{step:.1},pc:{step:.1},ch:{step:.1},rem:{step:.1}}[F])!==null&&H!==void 0?H:{step:1}})(O).step),R=`${(F=>F>=0)(T)?T:v}${O}`;return R!==p&&((F,H)=>{F.dispatch("FontSizeInputTextUpdate",H)})(i,{value:R}),R}}})(n),"fontsizeinput"),fontfamily:(n,r)=>L0(n,r,xN(n),yN,"FontFamilyTextUpdate","fontfamily"),blocks:(n,r)=>L0(n,r,$E(n),IE,"BlocksTextUpdate","blocks"),align:(n,r)=>L0(n,r,PE(n),gN,"AlignTextUpdate","align")},Zw=(n,r,i,l)=>{const u=(p=>{const y=p.toolbar,v=p.buttons;return y===!1?[]:y===void 0||y===!0?(C=>{const O=pt(LP,T=>{const R=cn(T.items,F=>Vo(C,F)||Vo(I0,F));return{name:T.name,items:R}});return cn(O,T=>T.items.length>0)})(v):te(y)?(C=>{const O=C.split("|");return pt(O,T=>({items:T.trim().split(" ")}))})(y):(C=>Rt(C,O=>Vo(O,"name")&&Vo(O,"items")))(y)?y:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])})(r),f=pt(u,p=>{const y=Sn(p.items,v=>v.trim().length===0?[]:((C,O,T,R,F,H)=>St(O,T.toLowerCase()).orThunk(()=>H.bind(G=>ko(G,J=>St(O,J+T.toLowerCase())))).fold(()=>St(I0,T.toLowerCase()).map(G=>G(C,F)),G=>G.type!=="grouptoolbarbutton"||R?((J,ae,X,Y)=>St(PP,J.type).fold(()=>(console.error("skipping button defined by",J),D.none()),ne=>D.some(ne(J,ae,X,Y))))(G,F,C,T.toLowerCase()):(console.warn(`Ignoring the '${T}' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.`),D.none())))(n,r.buttons,v,r.allowToolbarGroups,i,l).toArray());return{title:D.from(n.translate(p.name)),items:y}});return cn(f,p=>p.items.length>0)},RN=(n,r,i,l)=>{const u=r.mainUi.outerContainer,f=i.toolbar,p=i.buttons;if(Rt(f,te)){const y=f.map(v=>{const C={toolbar:v,buttons:p,allowToolbarGroups:i.allowToolbarGroups};return Zw(n,C,l,D.none())});Bs.setToolbars(u,y)}else Bs.setToolbar(u,Zw(n,i,l,D.none()))},MN=Yr(),IP=MN.os.isiOS()&&MN.os.version.major<=12;var l8=Object.freeze({__proto__:null,render:(n,r,i,l,u)=>{const{mainUi:f,uiMotherships:p}=r,y=so(0),v=f.outerContainer;pN(n);const C=Vt(u.targetNode),O=Pn(Vs(C));Ue(C,f.mothership),((H,G,J)=>{Rp(H)&&Ue(J.mainUi.mothership.element,J.popupUi.mothership),fv(G,J.dialogUi.mothership)})(n,O,r),n.on("SkinLoaded",()=>{Bs.setSidebar(v,i.sidebar,lx(n)),RN(n,r,i,l),y.set(n.getWin().innerWidth),Bs.setMenubar(v,uN(n,i)),Bs.setViews(v,i.views),((H,G)=>{const{uiMotherships:J}=G,ae=H.dom;let X=H.getWin();const Y=H.getDoc().documentElement,ne=so(pe(X.innerWidth,X.innerHeight)),ie=so(pe(Y.offsetWidth,Y.offsetHeight)),de=()=>{const Je=ne.get();Je.left===X.innerWidth&&Je.top===X.innerHeight||(ne.set(pe(X.innerWidth,X.innerHeight)),pb(H))},we=()=>{const Je=H.getDoc().documentElement,Ze=ie.get();Ze.left===Je.offsetWidth&&Ze.top===Je.offsetHeight||(ie.set(pe(Je.offsetWidth,Je.offsetHeight)),pb(H))},ze=Je=>{((Ze,kt)=>{Ze.dispatch("ScrollContent",kt)})(H,Je)};ae.bind(X,"resize",de),ae.bind(X,"scroll",ze);const tt=nv(Vt(H.getBody()),"load",we);H.on("hide",()=>{Ht(J,Je=>{Mo(Je.element,"display","none")})}),H.on("show",()=>{Ht(J,Je=>{Vn(Je.element,"display")})}),H.on("NodeChange",we),H.on("remove",()=>{tt.unbind(),ae.unbind(X,"resize",de),ae.unbind(X,"scroll",ze),X=null})})(n,r)});const T=Bs.getSocket(v).getOrDie("Could not find expected socket element");if(IP){Li(T.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});const H=((J,ae)=>{let X=null;return{cancel:()=>{We(X)||(clearTimeout(X),X=null)},throttle:(...Y)=>{We(X)&&(X=setTimeout(()=>{X=null,J.apply(null,Y)},20))}}})(()=>{n.dispatch("ScrollContent")}),G=Ai(T.element,"scroll",H.throttle);n.on("remove",G.unbind)}zO(n,r),n.addCommand("ToggleSidebar",(H,G)=>{Bs.toggleSidebar(v,G),(J=>{J.dispatch("ToggleSidebar")})(n)}),n.addQueryValueHandler("ToggleSidebar",()=>{var H;return(H=Bs.whichSidebar(v))!==null&&H!==void 0?H:""}),n.addCommand("ToggleView",(H,G)=>{if(Bs.toggleView(v,G)){const J=v.element;f.mothership.broadcastOn([A()],{target:J}),Ht(p,ae=>{ae.broadcastOn([A()],{target:J})}),We(Bs.whichView(v))&&(n.focus(),n.nodeChanged(),Bs.refreshToolbar(v)),(ae=>{ae.dispatch("ToggleView")})(n)}}),n.addQueryValueHandler("ToggleView",()=>{var H;return(H=Bs.whichView(v))!==null&&H!==void 0?H:""});const R=sb(n);R!==jd.sliding&&R!==jd.floating||n.on("ResizeWindow ResizeEditor ResizeContent",()=>{const H=n.getWin().innerWidth;H!==y.get()&&(Bs.refreshToolbar(r.mainUi.outerContainer),y.set(H))});const F={setEnabled:H=>{fb(r,!H)},isEnabled:()=>!Fo.isDisabled(v)};return{iframeContainer:T.element.dom,editorContainer:v.element.dom,api:F}}});const F0=n=>/^[0-9\.]+(|px)$/i.test(""+n)?D.some(parseInt(""+n,10)):D.none(),Xg=n=>Bt(n)?n+"px":n,$0=(n,r,i)=>{const l=r.filter(f=>nn>f);return l.or(u).getOr(n)},WE=n=>{const r=Mv(n),i=Bv(n),l=Py(n);return F0(r).map(u=>$0(u,i,l))},{ToolbarLocation:qE,ToolbarMode:BN}=Hv,FP=(n,r,i,l,u)=>{const{mainUi:f,uiMotherships:p}=i,y=By.DOM,v=rb(n),C=Dp(n),O=Py(n).or(WE(n)),T=l.shared.header,R=T.isPositionedAtTop,F=sb(n),H=F===BN.sliding||F===BN.floating,G=so(!1),J=()=>G.get()&&!n.removed,ae=ie=>H?ie.fold(ue(0),de=>de.components().length>1?Ds(de.components()[1].element):0):0,X=()=>{Ht(p,ie=>{ie.broadcastOn([M()],{})})},Y=ie=>{if(!J())return;v||u.on(ze=>{const tt=O.getOrThunk(()=>Rr().width-_t(r).left-10);Mo(ze.element,"max-width",tt+"px")});const de=_s(),we=!(v||v||!(Ye(f.outerContainer.element).left+Xn(f.outerContainer.element)>=window.innerWidth-40||er(f.outerContainer.element,"width").isSome())||(Mo(f.outerContainer.element,"position","absolute"),Mo(f.outerContainer.element,"left","0px"),Vn(f.outerContainer.element,"width"),0));if(H&&Bs.refreshToolbar(f.outerContainer),!v){const ze=_s(),tt=nn(de.left!==ze.left,de);((Je,Ze)=>{u.on(kt=>{const Wt=Bs.getToolbar(f.outerContainer),ro=ae(Wt),yo=vr(r),$o=((on,Rn)=>Rp(on)?nc(Rn):D.none())(n,f.outerContainer.element),xn=$o.fold(()=>yo.x,on=>{const Rn=vr(on);return Hn(on,za())?yo.x:yo.x-Rn.x}),Ls=nn(Je,Math.ceil(f.outerContainer.element.dom.getBoundingClientRect().width)).filter(on=>on>150).map(on=>{const Rn=Ze.getOr(_s()),Co=window.innerWidth-(xn-Rn.left),Js=Math.max(Math.min(on,Co),150);return CoR()?Math.max(yo.y-Ds(kt.element)+ro,0):yo.bottom,on=>{var Rn;const Co=vr(on),Js=(Rn=on.dom.scrollTop)!==null&&Rn!==void 0?Rn:0,ms=Hn(on,za())?Math.max(yo.y-Ds(kt.element)+ro,0):yo.y-Co.y+Js-Ds(kt.element)+ro;return R()?ms:yo.bottom})+"px"};Li(f.outerContainer.element,{...Xs,...Ls})})})(we,tt),tt.each(Je=>{Ed(Je.left,ze.top)})}C&&u.on(ie),X()},ne=()=>!(v||!C||!J())&&u.get().exists(ie=>{const de=T.getDockingMode(),we=(tt=>{switch(Eg(n)){case qE.auto:const Je=Bs.getToolbar(f.outerContainer),Ze=ae(Je),kt=Ds(tt.element)-Ze,Wt=vr(r);if(Wt.y>kt)return"top";{const ro=Gi(r),yo=Math.max(ro.dom.scrollHeight,Ds(ro));return Wt.bottom{Gs.setModes(tt,[ze]),T.setDockingMode(ze);const Je=R()?Pc.TopToBottom:Pc.BottomToTop;wo(tt.element,nl,Je)}),!0);var ze});return{isVisible:J,isPositionedAtTop:R,show:()=>{G.set(!0),Mo(f.outerContainer.element,"display","flex"),y.addClass(n.getBody(),"mce-edit-focus"),Ht(p,ie=>{Vn(ie.element,"display")}),ne(),Rp(n)?Y(ie=>Gs.isDocked(ie)?Gs.reset(ie):Gs.refresh(ie)):Y(Gs.refresh)},hide:()=>{G.set(!1),Mo(f.outerContainer.element,"display","none"),y.removeClass(n.getBody(),"mce-edit-focus"),Ht(p,ie=>{Mo(ie.element,"display","none")})},update:Y,updateMode:()=>{ne()&&Y(Gs.reset)},repositionPopups:X}},LN=(n,r)=>{const i=vr(n);return{pos:r?i.y:i.bottom,bounds:i}};var $P=Object.freeze({__proto__:null,render:(n,r,i,l,u)=>{const{mainUi:f}=r,p=Nn(),y=Vt(u.targetNode),v=FP(n,y,r,l,p),C=zA(n);kP(n);const O=()=>{if(p.isSet())return void v.show();p.set(Bs.getHeader(f.outerContainer).getOrDie());const R=mx(n);Rp(n)?(Ue(y,f.mothership),Ue(y,r.popupUi.mothership)):fv(R,f.mothership),fv(R,r.dialogUi.mothership);const F=()=>{RN(n,r,i,l),Bs.setMenubar(f.outerContainer,uN(n,i)),v.show(),((H,G,J,ae)=>{const X=so(LN(G,J.isPositionedAtTop())),Y=we=>{const{pos:ze,bounds:tt}=LN(G,J.isPositionedAtTop()),{pos:Je,bounds:Ze}=X.get(),kt=tt.height!==Ze.height||tt.width!==Ze.width;X.set({pos:ze,bounds:tt}),kt&&pb(H,we),J.isVisible()&&(Je!==ze?J.update(Gs.reset):kt&&(J.updateMode(),J.repositionPopups()))};ae||(H.on("activate",J.show),H.on("deactivate",J.hide)),H.on("SkinLoaded ResizeWindow",()=>J.update(Gs.reset)),H.on("NodeChange keydown",we=>{requestAnimationFrame(()=>Y(we))});let ne=0;const ie=_S(()=>J.update(Gs.refresh),33);H.on("ScrollWindow",()=>{const we=_s().left;we!==ne&&(ne=we,ie.throttle()),J.updateMode()}),Rp(H)&&H.on("ElementScroll",we=>{J.update(Gs.refresh)});const de=Sl();de.set(nv(Vt(H.getBody()),"load",we=>Y(we.raw))),H.on("remove",()=>{de.clear()})})(n,y,v,C),n.nodeChanged()};C?n.once("SkinLoaded",F):F()};n.on("show",O),n.on("hide",v.hide),C||(n.on("focus",O),n.on("blur",v.hide)),n.on("init",()=>{(n.hasFocus()||C)&&O()}),zO(n,r);const T={show:O,hide:v.hide,setEnabled:R=>{fb(r,!R)},isEnabled:()=>!Fo.isDisabled(f.outerContainer)};return{editorContainer:f.outerContainer.element.dom,api:T}}});const PN="contexttoolbar-hide",IN=(n,r)=>Xe(yw,(i,l)=>{const u=(f=>({hide:()=>Qo(f,rp()),getValue:()=>Be.getValue(f)}))(n.get(i));r.onAction(u,l.event.buttonApi)}),HP=(n,r)=>{const i=n.label.fold(()=>({}),f=>({"aria-label":f})),l=ns(Mp.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:n.initValue(),inputAttributes:i,selectOnFocus:!0,inputBehaviours:xt([po.config({mode:"special",onEnter:f=>u.findPrimary(f).map(p=>(Ld(p),!0)),onLeft:(f,p)=>(p.cut(),D.none()),onRight:(f,p)=>(p.cut(),D.none())})])})),u=((f,p,y)=>{const v=pt(p,C=>ns(((O,T,R)=>(F=>F.type==="contextformtogglebutton")(T)?((F,H,G)=>{const{primary:J,...ae}=H.original,X=Ua(Ox({...ae,type:"togglebutton",onAction:Ke}));return DN(X,G,[IN(F,H)])})(O,T,R):((F,H,G)=>{const{primary:J,...ae}=H.original,X=Ua(_O({...ae,type:"button",onAction:Ke}));return NN(X,G,[IN(F,H)])})(O,T,R))(f,C,y)));return{asSpecs:()=>pt(v,C=>C.asSpec()),findPrimary:C=>ko(p,(O,T)=>O.primary?D.from(v[T]).bind(R=>R.getOpt(C)).filter(bn(Fo.isDisabled)):D.none())}})(l,n.commands,r);return[{title:D.none(),items:[l.asSpec()]},{title:D.none(),items:u.asSpecs()}]},FN=(n,r,i)=>r.bottom-n.y>=i&&n.bottom-r.y>=i,KE=n=>{const r=(i=>{const l=i.getBoundingClientRect();if(l.height<=0&&l.width<=0){const u=br(Vt(i.startContainer),i.startOffset).element;return(ga(u)?Hr(u):D.some(u)).filter(ys).map(f=>f.dom.getBoundingClientRect()).getOr(l)}return l})(n.selection.getRng());if(n.inline){const i=_s();return rn(i.left+r.left,i.top+r.top,r.width,r.height)}{const i=Va(Vt(n.getBody()));return rn(i.x+r.left,i.y+r.top,r.width,r.height)}},$N=(n,r,i,l=0)=>{const u=Rr(window),f=vr(Vt(n.getContentAreaContainer())),p=Iv(n)||Fv(n)||$v(n),{x:y,width:v}=((C,O,T)=>{const R=Math.max(C.x+T,O.x);return{x:R,width:Math.min(C.right-T,O.right)-R}})(f,u,l);if(n.inline&&!p)return rn(y,u.y,v,u.height);{const C=r.header.isPositionedAtTop(),{y:O,bottom:T}=((R,F,H,G,J,ae)=>{const X=Vt(R.getContainer()),Y=Ys(X,".tox-editor-header").getOr(X),ne=vr(Y),ie=ne.y>=F.bottom,de=G&&!ie;if(R.inline&&de)return{y:Math.max(ne.bottom+ae,H.y),bottom:H.bottom};if(R.inline&&!de)return{y:H.y,bottom:Math.min(ne.y-ae,H.bottom)};const we=J==="line"?vr(X):F;return de?{y:Math.max(ne.bottom+ae,H.y),bottom:Math.min(we.bottom-ae,H.bottom)}:{y:Math.max(we.y+ae,H.y),bottom:Math.min(ne.y-ae,H.bottom)}})(n,f,u,C,i,l);return rn(y,O,v,T-O)}},GE={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"]},Ab={maxHeightFunction:kp(),maxWidthFunction:SE()},Jg=n=>n==="node",VP=(n,r,i,l,u)=>{const f=KE(n),p=l.lastElement().exists(y=>Hn(i,y));return((y,v)=>{const C=y.selection.getRng(),O=br(Vt(C.startContainer),C.startOffset);return C.startContainer===C.endContainer&&C.startOffset===C.endOffset-1&&Hn(O.element,v)})(n,i)?p?zw:Fn:p?((y,v,C)=>{const O=er(y,"position");Mo(y,"position",v);const T=FN(f,vr(r),-20)&&!l.isReposition()?oE:zw;return O.each(R=>Mo(y,"position",R)),T})(r,l.getMode()):(l.getMode()==="fixed"?u.y+_s().top:u.y)+(Ds(r)+12)<=f.y?Fn:Bm},HN=(n,r,i,l)=>{const u=p=>(y,v,C,O,T)=>({...VP(n,O,p,i,T)({...y,y:T.y,height:T.height},v,C,O,T),alwaysFit:!0}),f=p=>Jg(l)?[u(p)]:[];return r?{onLtr:p=>[Tr,mr,pr,Br,us,ir].concat(f(p)),onRtl:p=>[Tr,pr,mr,us,Br,ir].concat(f(p))}:{onLtr:p=>[ir,Tr,Br,mr,us,pr].concat(f(p)),onRtl:p=>[ir,Tr,us,pr,Br,mr].concat(f(p))}},Ww=(n,r)=>{const i=cn(r,f=>f.predicate(n.dom)),{pass:l,fail:u}=ks(i,f=>f.type==="contexttoolbar");return{contextToolbars:l,contextForms:u}},qw=(n,r)=>{const i={},l=[],u=[],f={},p={},y=tn(n);return Ht(y,v=>{const C=n[v];C.type==="contextform"?((O,T)=>{const R=Ua(Ms("ContextForm",cB,T));i[O]=R,R.launch.map(F=>{f["form:"+O]={...T.launch,type:F.type==="contextformtogglebutton"?"togglebutton":"button",onAction:()=>{r(R)}}}),R.scope==="editor"?u.push(R):l.push(R),p[O]=R})(v,C):C.type==="contexttoolbar"&&((O,T)=>{var R;(R=T,Ms("ContextToolbar",wO,R)).each(F=>{T.scope==="editor"?u.push(F):l.push(F),p[O]=F})})(v,C)}),{forms:i,inNodeScope:l,inEditorScope:u,lookupTable:p,formNavigators:f}},VN=Xt("forward-slide"),u1=Xt("backward-slide"),Ob=Xt("change-slide-event"),YE="tox-pop--resizing",XE="tox-pop--transition",jP=(n,r,i,l)=>{const u=l.backstage,f=u.shared,p=Yr().deviceType.isTouch,y=Nn(),v=Nn(),C=Nn(),O=Ba((de=>{const we=so([]);return or.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:ze=>{we.set([]),or.getContent(ze).each(tt=>{Vn(tt.element,"visibility")}),co(ze.element,YE),Vn(ze.element,"width")},inlineBehaviours:xt([en("context-toolbar-events",[Pd(sp(),(ze,tt)=>{tt.event.raw.propertyName==="width"&&(co(ze.element,YE),Vn(ze.element,"width"))}),Xe(Ob,(ze,tt)=>{const Je=ze.element;Vn(Je,"width");const Ze=Go(Je);or.setContent(ze,tt.event.contents),Tt(Je,YE);const kt=Go(Je);Mo(Je,"width",Ze+"px"),or.getContent(ze).each(Wt=>{tt.event.focus.bind(ro=>(Ti(ro),Ar(Je))).orThunk(()=>(po.focusIn(Wt),sd(Vs(Je))))}),setTimeout(()=>{Mo(ze.element,"width",kt+"px")},0)}),Xe(VN,(ze,tt)=>{or.getContent(ze).each(Je=>{we.set(we.get().concat([{bar:Je,focus:sd(Vs(ze.element))}]))}),lo(ze,Ob,{contents:tt.event.forwardContents,focus:D.none()})}),Xe(u1,(ze,tt)=>{rt(we.get()).each(Je=>{we.set(we.get().slice(0,we.get().length-1)),lo(ze,Ob,{contents:$i(Je.bar),focus:Je.focus})})})]),po.config({mode:"special",onEscape:ze=>rt(we.get()).fold(()=>de.onEscape(),tt=>(Qo(ze,u1),D.some(!0)))})]),lazySink:()=>un.value(de.sink)})})({sink:i,onEscape:()=>(n.focus(),D.some(!0))})),T=()=>{const de=C.get().getOr("node"),we=Jg(de)?1:0;return $N(n,f,de,we)},R=()=>!(n.removed||p()&&u.isContextMenuOpen()),F=()=>{if(R()){const de=T(),we=Kr(C.get(),"node")?((ze,tt)=>tt.filter(Je=>Vr(Je)&&_i(Je)).map(Va).getOrThunk(()=>KE(ze)))(n,y.get()):KE(n);return de.height<=0||!FN(we,de,.01)}return!0},H=()=>{y.clear(),v.clear(),C.clear(),or.hide(O)},G=()=>{if(or.isOpen(O)){const de=O.element;Vn(de,"display"),F()?Mo(de,"display","none"):(v.set(0),or.reposition(O))}},J=de=>({dom:{tag:"div",classes:["tox-pop__dialog"]},components:[de],behaviours:xt([po.config({mode:"acyclic"}),en("pop-dialog-wrap-events",[Ss(we=>{n.shortcuts.add("ctrl+F9","focus statusbar",()=>po.focusIn(we))}),Oc(we=>{n.shortcuts.remove("ctrl+F9")})])])}),ae=sn(()=>qw(r,de=>{const we=X([de]);lo(O,VN,{forwardContents:J(we)})})),X=de=>{const{buttons:we}=n.ui.registry.getAll(),ze={...we,...ae().formNavigators},tt=sb(n)===jd.scrolling?jd.scrolling:jd.default,Je=Cs(pt(de,Ze=>Ze.type==="contexttoolbar"?((kt,Wt)=>Zw(n,{buttons:kt,toolbar:Wt.items,allowToolbarGroups:!1},l.backstage,D.some(["form:"])))(ze,Ze):((kt,Wt)=>HP(kt,Wt))(Ze,f.providers)));return zE({type:tt,uid:Xt("context-toolbar"),initGroups:Je,onEscape:D.none,cyclicKeying:!0,providers:f.providers})},Y=(de,we)=>{if(ie.cancel(),!R())return;const ze=X(de),tt=de[0].position,Je=((kt,Wt)=>{const ro=kt==="node"?f.anchors.node(Wt):f.anchors.cursor(),yo=(($o,xn,Ls,Xs)=>xn==="line"?{bubble:sc(12,0,GE),layouts:{onLtr:()=>[ly],onRtl:()=>[cy]},overrides:Ab}:{bubble:sc(0,12,GE,1/12),layouts:HN($o,Ls,Xs,xn),overrides:Ab})(n,kt,p(),{lastElement:y.get,isReposition:()=>Kr(v.get(),0),getMode:()=>Xa.getMode(i)});return ls(ro,yo)})(tt,we);C.set(tt),v.set(1);const Ze=O.element;Vn(Ze,"display"),(kt=>Kr(vt(kt,y.get(),Hn),!0))(we)||(co(Ze,XE),Xa.reset(i,O)),or.showWithinBounds(O,J(ze),{anchor:Je,transition:{classes:[XE],mode:"placement"}},()=>D.some(T())),we.fold(y.clear,y.set),F()&&Mo(Ze,"display","none")};let ne=!1;const ie=_S(()=>{!n.hasFocus()||n.removed||ne||(_n(O.element,XE)?ie.throttle():((de,we)=>{const ze=Vt(we.getBody()),tt=Ze=>Hn(Ze,ze),Je=Vt(we.selection.getNode());return(Ze=>!tt(Ze)&&!lr(ze,Ze))(Je)?D.none():((Ze,kt,Wt)=>{const ro=Ww(Ze,kt);if(ro.contextForms.length>0)return D.some({elem:Ze,toolbars:[ro.contextForms[0]]});{const yo=Ww(Ze,Wt);if(yo.contextForms.length>0)return D.some({elem:Ze,toolbars:[yo.contextForms[0]]});if(ro.contextToolbars.length>0||yo.contextToolbars.length>0){const $o=(xn=>{if(xn.length<=1)return xn;{const Ls=Co=>To(xn,Js=>Js.position===Co),Xs=Co=>cn(xn,Js=>Js.position===Co),on=Ls("selection"),Rn=Ls("node");if(on||Rn){if(Rn&&on){const Co=Xs("node"),Js=pt(Xs("selection"),ms=>({...ms,position:"node"}));return Co.concat(Js)}return Xs(on?"selection":"node")}return Xs("line")}})(ro.contextToolbars.concat(yo.contextToolbars));return D.some({elem:Ze,toolbars:$o})}return D.none()}})(Je,de.inNodeScope,de.inEditorScope).orThunk(()=>((Ze,kt,Wt)=>Ze(kt)?D.none():Ec(kt,ro=>{if(ys(ro)){const{contextToolbars:yo,contextForms:$o}=Ww(ro,Wt.inNodeScope),xn=$o.length>0?$o:(Ls=>{if(Ls.length<=1)return Ls;{const Xs=on=>j(Ls,Rn=>Rn.position===on);return Xs("selection").orThunk(()=>Xs("node")).orThunk(()=>Xs("line")).map(on=>on.position).fold(()=>[],on=>cn(Ls,Rn=>Rn.position===on))}})(yo);return xn.length>0?D.some({elem:ro,toolbars:xn}):D.none()}return D.none()},Ze))(tt,Je,de))})(ae(),n).fold(H,de=>{Y(de.toolbars,D.some(de.elem))}))},17);n.on("init",()=>{n.on("remove",H),n.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",G),n.on("click keyup focus SetContent",ie.throttle),n.on(PN,H),n.on("contexttoolbar-show",de=>{const we=ae();St(we.lookupTable,de.toolbarKey).each(ze=>{Y([ze],nn(de.target!==n,de.target)),or.getContent(O).each(po.focusIn)})}),n.on("focusout",de=>{ox.setEditorTimeout(n,()=>{Ar(i.element).isNone()&&Ar(O.element).isNone()&&H()},0)}),n.on("SwitchMode",()=>{n.mode.isReadOnly()&&H()}),n.on("ExecCommand",({command:de})=>{de.toLowerCase()==="toggleview"&&H()}),n.on("AfterProgressState",de=>{de.state?H():n.hasFocus()&&ie.throttle()}),n.on("dragstart",()=>{ne=!0}),n.on("dragend drop",()=>{ne=!1}),n.on("NodeChange",de=>{Ar(O.element).fold(ie.throttle,Ke)})})},jN=(n,r)=>{const i=()=>{const l=r.getOptions(n),u=r.getCurrent(n).map(r.hash),f=Nn();return pt(l,p=>({type:"togglemenuitem",text:r.display(p),onSetup:y=>{const v=O=>{O&&(f.on(T=>T.setActive(!1)),f.set(y)),y.setActive(O)};v(Kr(u,r.hash(p)));const C=r.watcher(n,p,v);return()=>{f.clear(),C()}},onAction:()=>r.setCurrent(n,p)}))};n.ui.registry.addMenuButton(r.name,{tooltip:r.text,icon:r.icon,fetch:l=>l(i()),onSetup:r.onToolbarSetup}),n.ui.registry.addNestedMenuItem(r.name,{type:"nestedmenuitem",text:r.text,getSubmenuItems:i,onSetup:r.onMenuSetup})},UP=n=>{jN(n,(r=>({name:"lineheight",text:"Line height",icon:"line-height",getOptions:PA,hash:i=>((l,u)=>Uw(l,["fixed","relative","empty"]).map(({value:f,unit:p})=>f+p))(i).getOr(i),display:Ct,watcher:(i,l,u)=>i.formatter.formatChanged("lineheight",u,!1,{value:l}).unbind,getCurrent:i=>D.from(i.queryCommandValue("LineHeight")),setCurrent:(i,l)=>i.execCommand("LineHeight",!1,l),onToolbarSetup:Sa(r),onMenuSetup:Sa(r)}))(n)),(r=>D.from(M2(r)).map(i=>({name:"language",text:"Language",icon:"language",getOptions:ue(i),hash:l=>Ot(l.customCode)?l.code:`${l.code}/${l.customCode}`,display:l=>l.title,watcher:(l,u,f)=>{var p;return l.formatter.formatChanged("lang",f,!1,{value:u.code,customValue:(p=u.customCode)!==null&&p!==void 0?p:null}).unbind},getCurrent:l=>{const u=Vt(l.selection.getNode());return Jc(u,f=>D.some(f).filter(ys).bind(p=>Fs(p,"lang").map(y=>({code:y,customCode:Fs(p,"data-mce-lang").getOrUndefined(),title:""}))))},setCurrent:(l,u)=>l.execCommand("Lang",!1,u),onToolbarSetup:l=>{const u=Sl();return l.setActive(r.formatter.match("lang",{},void 0,!0)),u.set(r.formatter.formatChanged("lang",l.setActive,!0)),Ky(u.clear,Sa(r)(l))},onMenuSetup:Sa(r)})))(n).each(r=>jN(n,r))},ZP=n=>gb(n,"NodeChange",r=>{r.setEnabled(n.queryCommandState("outdent")&&n.selection.isEditable())}),H0=(n,r)=>i=>{i.setActive(r.get());const l=u=>{r.set(u.state),i.setActive(u.state)};return n.on("PastePlainTextToggle",l),Ky(()=>n.off("PastePlainTextToggle",l),Sa(n)(i))},JE=(n,r)=>()=>{n.execCommand("mceToggleFormat",!1,r)},QE=n=>{(r=>{(i=>{Hp.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"}],(l,u)=>{i.ui.registry.addToggleButton(l.name,{tooltip:l.text,icon:l.icon,onSetup:Ef(i,l.name),onAction:JE(i,l.name),shortcut:l.shortcut})});for(let l=1;l<=6;l++){const u="h"+l,f=`Access+${l}`;i.ui.registry.addToggleButton(u,{text:u.toUpperCase(),tooltip:"Heading "+l,onSetup:Ef(i,u),onAction:JE(i,u),shortcut:f})}})(r),(i=>{Hp.each([{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"help",text:"Help",action:"mceHelp",icon:"help",shortcut:"Alt+0"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"print",text:"Print",action:"mcePrint",icon:"print",shortcut:"Meta+P"}],l=>{i.ui.registry.addButton(l.name,{tooltip:l.text,icon:l.icon,onAction:ic(i,l.action),shortcut:l.shortcut})}),Hp.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"}],l=>{i.ui.registry.addButton(l.name,{tooltip:l.text,icon:l.icon,onSetup:Sa(i),onAction:ic(i,l.action)})})})(r),(i=>{Hp.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],l=>{i.ui.registry.addToggleButton(l.name,{tooltip:l.text,icon:l.icon,onAction:ic(i,l.action),onSetup:Ef(i,l.name)})})})(r)})(n),(r=>{Hp.each([{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"},{name:"print",text:"Print...",action:"mcePrint",icon:"print",shortcut:"Meta+P"}],i=>{r.ui.registry.addMenuItem(i.name,{text:i.text,icon:i.icon,shortcut:i.shortcut,onAction:ic(r,i.action)})}),Hp.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"}],i=>{r.ui.registry.addMenuItem(i.name,{text:i.text,icon:i.icon,shortcut:i.shortcut,onSetup:Sa(r),onAction:ic(r,i.action)})}),r.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onSetup:Sa(r),onAction:JE(r,"code")})})(n)},Kw=(n,r)=>gb(n,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",i=>{i.setEnabled(!n.mode.isReadOnly()&&n.undoManager[r]())}),WP=n=>gb(n,"VisualAid",r=>{r.setActive(n.hasVisual)}),qP=(n,r)=>{(i=>{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"}],l=>{i.ui.registry.addToggleButton(l.name,{tooltip:l.text,icon:l.icon,onAction:ic(i,l.cmd),onSetup:Ef(i,l.name)})}),i.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onSetup:Sa(i),onAction:ic(i,"JustifyNone")})})(n),QE(n),((i,l)=>{((u,f)=>{const p=d1(f,PE(u));u.ui.registry.addNestedMenuItem("align",{text:f.shared.providers.translate("Align"),onSetup:Sa(u),getSubmenuItems:()=>p.items.validateItems(p.getStyleItems())})})(i,l),((u,f)=>{const p=d1(f,xN(u));u.ui.registry.addNestedMenuItem("fontfamily",{text:f.shared.providers.translate("Fonts"),onSetup:Sa(u),getSubmenuItems:()=>p.items.validateItems(p.getStyleItems())})})(i,l),((u,f)=>{const p={type:"advanced",...f.styles},y=d1(f,AN(u,p));u.ui.registry.addNestedMenuItem("styles",{text:"Formats",onSetup:Sa(u),getSubmenuItems:()=>y.items.validateItems(y.getStyleItems())})})(i,l),((u,f)=>{const p=d1(f,$E(u));u.ui.registry.addNestedMenuItem("blocks",{text:"Blocks",onSetup:Sa(u),getSubmenuItems:()=>p.items.validateItems(p.getStyleItems())})})(i,l),((u,f)=>{const p=d1(f,EN(u));u.ui.registry.addNestedMenuItem("fontsize",{text:"Font sizes",onSetup:Sa(u),getSubmenuItems:()=>p.items.validateItems(p.getStyleItems())})})(i,l)})(n,r),(i=>{(l=>{l.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:Kw(l,"hasUndo"),onAction:ic(l,"undo")}),l.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:Kw(l,"hasRedo"),onAction:ic(l,"redo")})})(i),(l=>{l.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",enabled:!1,onSetup:Kw(l,"hasUndo"),onAction:ic(l,"undo"),shortcut:"Meta+Z"}),l.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",enabled:!1,onSetup:Kw(l,"hasRedo"),onAction:ic(l,"redo"),shortcut:"Meta+Y"})})(i)})(n),(i=>{(y=>{y.addCommand("mceApplyTextcolor",(v,C)=>{((O,T,R)=>{O.undoManager.transact(()=>{O.focus(),O.formatter.apply(T,{value:R}),O.nodeChanged()})})(y,v,C)}),y.addCommand("mceRemoveTextcolor",v=>{((C,O)=>{C.undoManager.transact(()=>{C.focus(),C.formatter.remove(O,{value:null},void 0,!0),C.nodeChanged()})})(y,v)})})(i);const l=YO(i),u=XO(i),f=so(l),p=so(u);DC(i,"forecolor","forecolor",f),DC(i,"backcolor","hilitecolor",p),Yy(i,"forecolor","forecolor","Text color",f),Yy(i,"backcolor","hilitecolor","Background color",p)})(n),(i=>{(l=>{l.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:ic(l,"mceToggleVisualAid")})})(i),(l=>{l.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:WP(l),onAction:ic(l,"mceToggleVisualAid")})})(i)})(n),(i=>{(l=>{l.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:ZP(l),onAction:ic(l,"outdent")}),l.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onSetup:Sa(l),onAction:ic(l,"indent")})})(i)})(n),UP(n),(i=>{const l=so(BA(i)),u=()=>i.execCommand("mceTogglePlainTextPaste");i.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:u,onSetup:H0(i,l)}),i.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:u,onSetup:H0(i,l)})})(n)},UN=n=>te(n)?n.split(/[ ,]/):n,ZN=n=>r=>r.options.get(n),WN=ZN("contextmenu_never_use_native"),KP=ZN("contextmenu_avoid_overlap"),eT=n=>{const r=n.ui.registry.getAll().contextMenus,i=n.options.get("contextmenu");return n.options.isSet("contextmenu")?i:cn(i,l=>Vo(r,l))},V0=(n,r)=>({type:"makeshift",x:n,y:r}),qN=n=>n.type==="longpress"||n.type.indexOf("touch")===0,GP=(n,r)=>r.type==="contextmenu"||r.type==="longpress"?n.inline?(i=>{if(qN(i)){const l=i.touches[0];return V0(l.pageX,l.pageY)}return V0(i.pageX,i.pageY)})(r):((i,l)=>{const u=By.DOM.getPos(i);return((f,p,y)=>V0(f.x+p,f.y+y))(l,u.x,u.y)})(n.getContentAreaContainer(),(i=>{if(qN(i)){const l=i.touches[0];return V0(l.clientX,l.clientY)}return V0(i.clientX,i.clientY)})(r)):KN(n),KN=n=>({type:"selection",root:Vt(n.selection.getNode())}),GN=(n,r,i)=>{switch(i){case"node":return(l=>({type:"node",node:D.some(Vt(l.selection.getNode())),root:Vt(l.getBody())}))(n);case"point":return GP(n,r);case"selection":return KN(n)}},YN=(n,r,i,l,u,f)=>{const p=i(),y=GN(n,r,f);kb(p,Sf.CLOSE_ON_EXECUTE,l,{isHorizontalMenu:!1,search:D.none()}).map(v=>{r.preventDefault(),or.showMenuAt(u,{anchor:y},{menu:{markers:lb("normal")},data:v})})},XN={onLtr:()=>[Tr,mr,pr,Br,us,ir,Fn,Bm,O0,Gg,cc,lc],onRtl:()=>[Tr,pr,mr,us,Br,ir,Fn,Bm,cc,lc,O0,Gg]},YP={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"]},XP=(n,r,i,l,u,f)=>{const p=Yr(),y=p.os.isiOS(),v=p.os.isMacOS(),C=p.os.isAndroid(),O=p.deviceType.isTouch(),T=()=>{const R=i();((F,H,G,J,ae,X,Y)=>{const ne=((ie,de,we)=>{const ze=GN(ie,de,we);return{bubble:sc(0,we==="point"?12:0,YP),layouts:XN,overrides:{maxWidthFunction:SE(),maxHeightFunction:kp()},...ze}})(F,H,X);kb(G,Sf.CLOSE_ON_EXECUTE,J,{isHorizontalMenu:!0,search:D.none()}).map(ie=>{H.preventDefault();const de=Y?Ui.HighlightMenuAndItem:Ui.HighlightNone;or.showMenuWithinBounds(ae,{anchor:ne},{menu:{markers:lb("normal"),highlightOnOpen:de},data:ie,type:"horizontal"},()=>D.some($N(F,J.shared,X==="node"?"node":"selection"))),F.dispatch(PN)})})(n,r,R,l,u,f,!(C||y||v&&O))};if((v||y)&&f!=="node"){const R=()=>{(F=>{const H=F.selection.getRng(),G=()=>{ox.setEditorTimeout(F,()=>{F.selection.setRng(H)},10),X()};F.once("touchend",G);const J=Y=>{Y.preventDefault(),Y.stopImmediatePropagation()};F.on("mousedown",J,!0);const ae=()=>X();F.once("longpresscancel",ae);const X=()=>{F.off("touchend",G),F.off("longpresscancel",ae),F.off("mousedown",J)}})(n),T()};((F,H)=>{const G=F.selection;if(G.isCollapsed()||H.touches.length<1)return!1;{const J=H.touches[0],ae=G.getRng();return iv(F.getWin(),mf.domRange(ae)).exists(X=>X.left<=J.clientX&&X.right>=J.clientX&&X.top<=J.clientY&&X.bottom>=J.clientY)}})(n,r)?R():(n.once("selectionchange",R),n.once("touchend",()=>n.off("selectionchange",R)))}else T()},JN=n=>te(n)?n==="|":n.type==="separator",tT={type:"separator"},QN=n=>{const r=i=>({text:i.text,icon:i.icon,enabled:i.enabled,shortcut:i.shortcut});if(te(n))return n;switch(n.type){case"separator":return tT;case"submenu":return{type:"nestedmenuitem",...r(n),getSubmenuItems:()=>{const l=n.getSubmenuItems();return te(l)?l:pt(l,QN)}};default:const i=n;return{type:"menuitem",...r(i),onAction:Ut(i.onAction)}}},oT=(n,r)=>{if(r.length===0)return n;const i=rt(n).filter(l=>!JN(l)).fold(()=>[],l=>[tT]);return n.concat(i).concat(r).concat([tT])},zb=(n,r)=>!(i=>i.type==="longpress"||Vo(i,"touches"))(r)&&(r.button!==2||r.target===n.getBody()&&r.pointerType===""),eD=(n,r)=>zb(n,r)?n.selection.getStart(!0):r.target,JP=(n,r,i)=>{const l=Yr().deviceType.isTouch,u=Ba(or.sketch({dom:{tag:"div"},lazySink:r,onEscape:()=>n.focus(),onShow:()=>i.setContextMenuState(!0),onHide:()=>i.setContextMenuState(!1),fireDismissalEventInstead:{},inlineBehaviours:xt([en("dismissContextMenu",[Xe(Qu(),(y,v)=>{x.close(y),n.focus()})])])})),f=()=>or.hide(u),p=y=>{if(WN(n)&&y.preventDefault(),((C,O)=>O.ctrlKey&&!WN(C))(n,y)||(C=>eT(C).length===0)(n))return;const v=((C,O)=>{const T=KP(C),R=zb(C,O)?"selection":"point";if(vi(T)){const F=eD(C,O);return Jy(Vt(F),T)?"node":R}return R})(n,y);(l()?XP:YN)(n,y,()=>{const C=eD(n,y),O=n.ui.registry.getAll(),T=eT(n);return((R,F,H)=>{const G=zo(F,(J,ae)=>St(R,ae.toLowerCase()).map(X=>{const Y=X.update(H);if(te(Y)&&vi(Bi(Y)))return oT(J,Y.split(" "));if($e(Y)&&Y.length>0){const ne=pt(Y,QN);return oT(J,ne)}return J}).getOrThunk(()=>J.concat([ae])),[]);return G.length>0&&JN(G[G.length-1])&&G.pop(),G})(O.contextMenus,T,C)},i,u,v)};n.on("init",()=>{const y="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(l()?"":" ResizeWindow");n.on(y,f),n.on("longpress contextmenu",p)})},nT=Ei([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),Nb=n=>r=>r.translate(-n.left,-n.top),dc=n=>r=>r.translate(n.left,n.top),Af=n=>(r,i)=>zo(n,(l,u)=>u(l),pe(r,i)),j0=(n,r,i)=>n.fold(Af([dc(i),Nb(r)]),Af([Nb(r)]),Af([])),f1=(n,r,i)=>n.fold(Af([dc(i)]),Af([]),Af([dc(r)])),tD=(n,r,i)=>n.fold(Af([]),Af([Nb(i)]),Af([dc(r),Nb(i)])),oD=(n,r,i)=>{const l=n.fold((u,f)=>({position:D.some("absolute"),left:D.some(u+"px"),top:D.some(f+"px")}),(u,f)=>({position:D.some("absolute"),left:D.some(u-i.left+"px"),top:D.some(f-i.top+"px")}),(u,f)=>({position:D.some("fixed"),left:D.some(u+"px"),top:D.some(f+"px")}));return{right:D.none(),bottom:D.none(),...l}},sT=(n,r,i,l)=>{const u=(f,p)=>(y,v)=>{const C=f(r,i,l);return p(y.getOr(C.left),v.getOr(C.top))};return n.fold(u(tD,U0),u(f1,Up),u(j0,Db))},U0=nT.offset,Up=nT.absolute,Db=nT.fixed,nD=(n,r)=>{const i=yr(n,r);return Ot(i)?NaN:parseInt(i,10)},sD=(n,r,i,l,u,f)=>{const p=((C,O,T,R)=>((F,H)=>{const G=F.element,J=nD(G,H.leftAttr),ae=nD(G,H.topAttr);return isNaN(J)||isNaN(ae)?D.none():D.some(pe(J,ae))})(C,O).fold(()=>T,F=>Db(F.left+R.left,F.top+R.top)))(n,r,i,l),y=r.mustSnap?aD(n,r,p,u,f):iD(n,r,p,u,f),v=j0(p,u,f);return((C,O,T)=>{const R=C.element;wo(R,O.leftAttr,T.left+"px"),wo(R,O.topAttr,T.top+"px")})(n,r,v),y.fold(()=>({coord:Db(v.left,v.top),extra:D.none()}),C=>({coord:C.output,extra:C.extra}))},rD=(n,r,i,l)=>ko(n,u=>{const f=u.sensor;return((y,v,C,O,T,R)=>{const F=f1(y,T,R),H=f1(v,T,R);return Math.abs(F.left-H.left)<=C&&Math.abs(F.top-H.top)<=O})(r,f,u.range.left,u.range.top,i,l)?D.some({output:sT(u.output,r,i,l),extra:u.extra}):D.none()}),aD=(n,r,i,l,u)=>{const f=r.getSnapPoints(n);return rD(f,i,l,u).orThunk(()=>zo(f,(y,v)=>{const C=v.sensor,O=((T,R,F,H,G,J)=>{const ae=f1(T,G,J),X=f1(R,G,J),Y=Math.abs(ae.left-X.left),ne=Math.abs(ae.top-X.top);return pe(Y,ne)})(i,C,v.range.left,v.range.top,l,u);return y.deltas.fold(()=>({deltas:D.some(O),snap:D.some(v)}),T=>(O.left+O.top)/2<=(T.left+T.top)/2?{deltas:D.some(O),snap:D.some(v)}:y)},{deltas:D.none(),snap:D.none()}).snap.map(y=>({output:sT(y.output,i,l,u),extra:y.extra})))},iD=(n,r,i,l,u)=>{const f=r.getSnapPoints(n);return rD(f,i,l,u)};var lD=Object.freeze({__proto__:null,snapTo:(n,r,i,l)=>{const u=r.getTarget(n.element);if(r.repositionTarget){const f=ha(n.element),p=_s(f),y=zc(u),v=((O,T,R)=>({coord:sT(O.output,O.output,T,R),extra:O.extra}))(l,p,y),C=oD(v.coord,0,y);ri(u,C)}}});const rT="data-initial-z-index",cD=(n,r)=>{n.getSystem().addToGui(r),(i=>{Hr(i.element).filter(ys).each(l=>{er(l,"z-index").each(u=>{wo(l,rT,u)}),Mo(l,"z-index",Ns(i.element,"z-index"))})})(r)},QP=n=>{(r=>{Hr(r.element).filter(ys).each(i=>{Fs(i,rT).fold(()=>Vn(i,"z-index"),l=>Mo(i,"z-index",l)),pn(i,rT)})})(n),n.getSystem().removeFromGui(n)},dD=(n,r,i)=>n.getSystem().build(Bu.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[r]},events:i}));var e6=Zs("snaps",[nt("getSnapPoints"),Dn("onSensor"),nt("leftAttr"),nt("topAttr"),Ne("lazyViewport",jr),Ne("mustSnap",!1)]);const aT=[Ne("useFixed",Fe),nt("blockerClass"),Ne("getTarget",Ct),Ne("onDrag",Ke),Ne("repositionTarget",!0),Ne("onDrop",Ke),xs("getBounds",jr),e6],iT=n=>{return(r=er(n,"left"),i=er(n,"top"),l=er(n,"position"),r.isSome()&&i.isSome()&&l.isSome()?D.some(((u,f,p)=>(p==="fixed"?Db:U0)(parseInt(u,10),parseInt(f,10)))(r.getOrDie(),i.getOrDie(),l.getOrDie())):D.none()).getOrThunk(()=>{const u=Ye(n);return Up(u.left,u.top)});var r,i,l},uD=(n,r)=>({bounds:n.getBounds(),height:Na(r.element),width:Xn(r.element)}),lT=(n,r,i,l,u)=>{const f=i.update(l,u),p=i.getStartData().getOrThunk(()=>uD(r,n));f.each(y=>{((v,C,O,T)=>{const R=C.getTarget(v.element);if(C.repositionTarget){const F=ha(v.element),H=_s(F),G=zc(R),J=iT(R),ae=((Y,ne,ie,de,we,ze,tt)=>((Je,Ze,kt,Wt,ro)=>{const yo=ro.bounds,$o=f1(Ze,kt,Wt),xn=Dc($o.left,yo.x,yo.x+yo.width-ro.width),Ls=Dc($o.top,yo.y,yo.y+yo.height-ro.height),Xs=Up(xn,Ls);return Ze.fold(()=>{const on=tD(Xs,kt,Wt);return U0(on.left,on.top)},ue(Xs),()=>{const on=j0(Xs,kt,Wt);return Db(on.left,on.top)})})(0,ne.fold(()=>{const Je=(Ze=ie,kt=ze.left,Wt=ze.top,Ze.fold((yo,$o)=>U0(yo+kt,$o+Wt),(yo,$o)=>Up(yo+kt,$o+Wt),(yo,$o)=>Db(yo+kt,$o+Wt)));var Ze,kt,Wt;const ro=j0(Je,de,we);return Db(ro.left,ro.top)},Je=>{const Ze=sD(Y,Je,ie,ze,de,we);return Ze.extra.each(kt=>{Je.onSensor(Y,kt)}),Ze.coord}),de,we,tt))(v,C.snaps,J,H,G,T,O),X=oD(ae,0,G);ri(R,X)}C.onDrag(v,R,T)})(n,r,p,y)})},cT=(n,r,i,l)=>{r.each(QP),i.snaps.each(f=>{((p,y)=>{((v,C)=>{const O=v.element;pn(O,C.leftAttr),pn(O,C.topAttr)})(p,y)})(n,f)});const u=i.getTarget(n.element);l.reset(),i.onDrop(n,u)},dT=n=>(r,i)=>{const l=u=>{i.setStartData(uD(r,u))};return Ho([Xe(Xf(),u=>{i.getStartData().each(()=>l(u))}),...n(r,i,l)])};var t6=Object.freeze({__proto__:null,getData:n=>D.from(pe(n.x,n.y)),getDelta:(n,r)=>pe(r.left-n.left,r.top-n.top)});const fD=(n,r,i)=>[Xe(at(),(l,u)=>{if(u.event.raw.button!==0)return;u.stop();const f=()=>cT(l,D.some(v),n,r),p=HC(f,200),y={drop:f,delayDrop:p.schedule,forceDrop:f,move:C=>{p.cancel(),lT(l,n,r,t6,C)}},v=dD(l,n.blockerClass,(C=>Ho([Xe(at(),C.forceDrop),Xe(Bo(),C.drop),Xe(xo(),(O,T)=>{C.move(T.event)}),Xe(Uo(),C.delayDrop)]))(y));i(l),cD(l,v)})],o6=[...aT,Es("dragger",{handlers:dT(fD)})];var mD=Object.freeze({__proto__:null,getData:n=>{const r=n.raw.touches;return r.length===1?(i=>{const l=i[0];return D.some(pe(l.clientX,l.clientY))})(r):D.none()},getDelta:(n,r)=>pe(r.left-n.left,r.top-n.top)});const pD=(n,r,i)=>{const l=Nn(),u=f=>{cT(f,l.get(),n,r),l.clear()};return[Xe(P(),(f,p)=>{p.stop();const y=()=>u(f),v={drop:y,delayDrop:Ke,forceDrop:y,move:O=>{lT(f,n,r,mD,O)}},C=dD(f,n.blockerClass,(O=>Ho([Xe(P(),O.forceDrop),Xe(ge(),O.drop),Xe(xe(),O.drop),Xe(q(),(T,R)=>{O.move(R.event)})]))(v));l.set(C),i(f),cD(f,C)}),Xe(q(),(f,p)=>{p.stop(),lT(f,n,r,mD,p.event)}),Xe(ge(),(f,p)=>{p.stop(),u(f)}),Xe(xe(),u)]},n6=o6,gD=[...aT,Es("dragger",{handlers:dT(pD)})],hD=[...aT,Es("dragger",{handlers:dT((n,r,i)=>[...fD(n,r,i),...pD(n,r,i)])})];var s6=Object.freeze({__proto__:null,mouse:n6,touch:gD,mouseOrTouch:hD}),r6=Object.freeze({__proto__:null,init:()=>{let n=D.none(),r=D.none();const i=ue({});return Jr({readState:i,reset:()=>{n=D.none(),r=D.none()},update:(l,u)=>l.getData(u).bind(f=>((p,y)=>{const v=n.map(C=>p.getDelta(C,y));return n=D.some(y),v})(l,f)),getStartData:()=>r,setStartData:l=>{r=D.some(l)}})}});const Rb=k({branchKey:"mode",branches:s6,name:"dragging",active:{events:(n,r)=>n.dragger.handlers(n,r)},extra:{snap:n=>({sensor:n.sensor,range:n.range,output:n.output,extra:D.from(n.extra)})},state:r6,apis:lD}),bD=(n,r,i,l,u,f)=>n.fold(()=>Rb.snap({sensor:Up(i-20,l-20),range:pe(u,f),output:Up(D.some(i),D.some(l)),extra:{td:r}}),p=>{const y=i-20,v=l-20,C=p.element.dom.getBoundingClientRect();return Rb.snap({sensor:Up(y,v),range:pe(40,40),output:Up(D.some(i-C.width/2),D.some(l-C.height/2)),extra:{td:r}})}),yD=(n,r,i)=>({getSnapPoints:n,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:(l,u)=>{const f=u.td;((p,y)=>p.exists(v=>Hn(v,y)))(r.get(),f)||(r.set(f),i(f))},mustSnap:!0}),vD=n=>ns(zi.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:xt([Rb.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:n}),vb.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}})),_D=(n,r)=>{const i=so([]),l=so([]),u=so(!1),f=Nn(),p=Nn(),y=X=>{const Y=Va(X);return bD(T.getOpt(r),X,Y.x,Y.y,Y.width,Y.height)},v=X=>{const Y=Va(X);return bD(R.getOpt(r),X,Y.right,Y.bottom,Y.width,Y.height)},C=yD(()=>pt(i.get(),X=>y(X)),f,X=>{p.get().each(Y=>{n.dispatch("TableSelectorChange",{start:X,finish:Y})})}),O=yD(()=>pt(l.get(),X=>v(X)),p,X=>{f.get().each(Y=>{n.dispatch("TableSelectorChange",{start:Y,finish:X})})}),T=vD(C),R=vD(O),F=Ba(T.asSpec()),H=Ba(R.asSpec()),G=(X,Y,ne,ie)=>{const de=ne(Y);Rb.snapTo(X,de),((we,ze,tt,Je)=>{const Ze=ze.dom.getBoundingClientRect();Vn(we.element,"display");const kt=vd(Vt(n.getBody())).dom.innerHeight,Wt=Ze[ie]<0,ro=((yo,$o)=>yo[ie]>$o)(Ze,kt);(Wt||ro)&&Mo(we.element,"display","none")})(X,Y)},J=X=>G(F,X,y,"top"),ae=X=>G(H,X,v,"bottom");if(Yr().deviceType.isTouch()){const X=Y=>pt(Y,Vt);n.on("TableSelectionChange",Y=>{u.get()||(bf(r,F),bf(r,H),u.set(!0));const ne=Vt(Y.start),ie=Vt(Y.finish);f.set(ne),p.set(ie),D.from(Y.otherCells).each(de=>{i.set(X(de.upOrLeftCells)),l.set(X(de.downOrRightCells)),J(ne),ae(ie)})}),n.on("ResizeEditor ResizeWindow ScrollContent",()=>{f.get().each(J),p.get().each(ae)}),n.on("TableSelectionClear",()=>{u.get()&&(Vi(F),Vi(H),u.set(!1)),f.clear(),p.clear()})}},xD=(n,r,i)=>{var l;const u=(l=r.delimiter)!==null&&l!==void 0?l:"›";return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:xt([po.config({mode:"flow",selector:"div[role=button]"}),Fo.config({disabled:i.isDisabled}),Ca(),ws.config({}),So.config({}),en("elementPathEvents",[Ss((f,p)=>{n.shortcuts.add("alt+F11","focus statusbar elementpath",()=>po.focusIn(f)),n.on("NodeChange",y=>{const v=(O=>{const T=[];let R=O.length;for(;R-- >0;){const H=O[R];if(H.nodeType===1&&(F=H).nodeName!=="BR"&&!F.getAttribute("data-mce-bogus")&&F.getAttribute("data-mce-type")!=="bookmark"){const G=ZO(n,H);if(G.isDefaultPrevented()||T.push({name:G.name,element:H}),G.isPropagationStopped())break}}var F;return T})(y.parents),C=v.length>0?zo(v,(O,T,R)=>{const F=((H,G,J)=>zi.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{"data-index":J}},components:[wr(H)],action:ae=>{n.focus(),n.selection.select(G),n.nodeChanged()},buttonBehaviours:xt([Pr.config({...i.tooltips.getConfig({tooltipText:i.translate(["Select the {0} element",G.nodeName.toLowerCase()]),onShow:(ae,X)=>{((Y,ne)=>{const ie=D.from(yr(Y,"id")).getOrThunk(()=>{const de=Xt("aria");return wo(ne,"id",de),de});wo(Y,"aria-describedby",ie)})(ae.element,X.element)},onHide:ae=>{var X;X=ae.element,pn(X,"aria-describedby")}})}),gi(i.isDisabled),Ca()])}))(T.name,T.element,R);return R===0?O.concat([F]):O.concat([{dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0}},components:[wr(` ${u} `)]},F])},[]):[];So.set(f,C)})})])]),components:[]}};var Zp;(function(n){n[n.None=0]="None",n[n.Both=1]="Both",n[n.Vertical=2]="Vertical"})(Zp||(Zp={}));const Gw=(n,r,i)=>{const l=Vt(n.getContainer()),u=((f,p,y,v,C)=>{const O={height:$0(v+p.top,Ly(f),nx(f))};return y===Zp.Both&&(O.width=$0(C+p.left,Bv(f),Py(f))),O})(n,r,i,Ds(l),Go(l));rs(u,(f,p)=>{Bt(f)&&Mo(l,p,Xg(f))}),(f=>{f.dispatch("ResizeEditor")})(n)},Yw=(n,r,i,l)=>{const u=pe(20*i,20*l);return Gw(n,u,r),D.some(!0)},wD=(n,r)=>{const i=()=>{const l=[],u=I2(n),f=MA(n),p=$c(n)||n.hasPlugin("wordcount");return f&&l.push(xD(n,{},r)),u&&l.push((()=>{const y=Rx("Alt+0");return{dom:{tag:"div",classes:["tox-statusbar__help-text"]},components:[wr(Ud.translate(["Press {0} for help",y]))]}})()),p&&l.push((()=>{const y=[];return n.hasPlugin("wordcount")&&y.push(((v,C)=>{const O=(T,R,F)=>So.set(T,[wr(C.translate(["{0} "+F,R[F]]))]);return zi.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:xt([gi(C.isDisabled),Ca(),ws.config({}),So.config({}),Be.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),en("wordcount-events",[Bl(T=>{const R=Be.getValue(T),F=R.mode==="words"?"characters":"words";Be.setValue(T,{mode:F,count:R.count}),O(T,R.count,F)}),Ss(T=>{v.on("wordCountUpdate",R=>{const{mode:F}=Be.getValue(T);Be.setValue(T,{mode:F,count:R.wordCount}),O(T,R.wordCount,F)})})])]),eventOrder:{[di()]:["disabling","alloy.base.behaviour","wordcount-events"]}})})(n,r)),$c(n)&&y.push({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":n.translate(["Build with {0}","TinyMCE"])},innerHtml:n.translate(["Build with {0}",` -`.trim()])},behaviours:xt([Po.config({})])}]}),{dom:{tag:"div",classes:["tox-statusbar__right-container"]},components:y}})()),l.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container",...(()=>{const y="tox-statusbar__text-container--flex-start",v="tox-statusbar__text-container--flex-end";if(u){const C="tox-statusbar__text-container-3-cols";return p||f?p&&!f?[C,v]:[C,y]:[C,"tox-statusbar__text-container--space-around"]}return[p&&!f?v:y]})()]},components:l}]:[]};return{dom:{tag:"div",classes:["tox-statusbar"]},components:(()=>{const l=i(),u=((f,p)=>{const y=(C=>{const O=Ja(C);return O===!1?Zp.None:O==="both"?Zp.Both:Zp.Vertical})(f);if(y===Zp.None)return D.none();const v=y===Zp.Both?"Press the arrow keys to resize the editor.":"Press the Up and Down arrow keys to resize the editor.";return D.some(Hc("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{"aria-label":p.translate(v),"data-mce-name":"resize-handle"},behaviours:[Rb.config({mode:"mouse",repositionTarget:!1,onDrag:(C,O,T)=>Gw(f,T,y),blockerClass:"tox-blocker"}),po.config({mode:"special",onLeft:()=>Yw(f,y,-1,0),onRight:()=>Yw(f,y,1,0),onUp:()=>Yw(f,y,0,-1),onDown:()=>Yw(f,y,0,1)}),ws.config({}),Po.config({}),Pr.config(p.tooltips.getConfig({tooltipText:p.translate("Resize")}))]},p.icons))})(n,r);return l.concat(u.toArray())})()}},kD=(n,r)=>r.get().getOrDie(`UI for ${n} has not been rendered`),a6=(n,r)=>{const i=n.inline,l=i?$P:l8,u=Dp(n)?FL:IL,f=(()=>{const de=Nn(),we=Nn(),ze=Nn();return{dialogUi:de,popupUi:we,mainUi:ze,getUiMotherships:()=>{const tt=de.get().map(Ze=>Ze.mothership),Je=we.get().map(Ze=>Ze.mothership);return tt.fold(()=>Je.toArray(),Ze=>Je.fold(()=>[Ze],kt=>Hn(Ze.element,kt.element)?[Ze]:[Ze,kt]))},lazyGetInOuterOrDie:(tt,Je)=>()=>ze.get().bind(Ze=>Je(Ze.outerContainer)).getOrDie(`Could not find ${tt} element in OuterContainer`)}})(),p=Nn(),y=Nn(),v=Nn(),C=Yr().deviceType.isTouch()?["tox-platform-touch"]:[],O=F2(n),T=sb(n),R=ns({dom:{tag:"div",classes:["tox-anchorbar"]}}),F=ns({dom:{tag:"div",classes:["tox-bottom-anchorbar"]}}),H=()=>f.mainUi.get().map(de=>de.outerContainer).bind(Bs.getHeader),G=f.lazyGetInOuterOrDie("anchor bar",R.getOpt),J=f.lazyGetInOuterOrDie("bottom anchor bar",F.getOpt),ae=f.lazyGetInOuterOrDie("toolbar",Bs.getToolbar),X=f.lazyGetInOuterOrDie("throbber",Bs.getThrobber),Y=((de,we,ze,tt)=>{const Je=so(!1),Ze=(Rn=>{const Co=so(F2(Rn)?"bottom":"top");return{isPositionedAtTop:()=>Co.get()==="top",getDockingMode:Co.get,setDockingMode:Co.set}})(we),kt={icons:()=>we.ui.registry.getAll().icons,menuItems:()=>we.ui.registry.getAll().menuItems,translate:Ud.translate,isDisabled:()=>we.mode.isReadOnly()||!we.ui.isEnabled(),getOption:we.options.get,tooltips:iE(de.dialog)},Wt=Vz(we),ro=(Rn=>{const Co=Ia=>()=>Rn.formatter.match(Ia),Js=Ia=>()=>{const Ea=Rn.formatter.get(Ia);return Ea!==void 0?D.some({tag:Ea.length>0&&(Ea[0].inline||Ea[0].block)||"div",styles:Rn.dom.parseStyle(Rn.formatter.getCssText(Ia))}):D.none()},ms=so([]),Ni=so([]),Di=so(!1);return Rn.on("PreInit",Ia=>{const Ea=Dz(Rn),Wp=aE(Rn,Ea,Co,Js);ms.set(Wp)}),Rn.on("addStyleModifications",Ia=>{const Ea=aE(Rn,Ia.items,Co,Js);Ni.set(Ea),Di.set(Ia.replace)}),{getData:()=>{const Ia=Di.get()?[]:ms.get(),Ea=Ni.get();return Ia.concat(Ea)}}})(we),yo=(Rn=>({colorPicker:CL(Rn),hasCustomColors:SL(Rn),getColors:EL(Rn),getColorCols:TL(Rn)}))(we),$o=(Rn=>({isDraggableModal:Oz(Rn)}))(we),xn={shared:{providers:kt,anchors:kL(we,ze,tt,Ze.isPositionedAtTop),header:Ze},urlinput:Wt,styles:ro,colorinput:yo,dialog:$o,isContextMenuOpen:()=>Je.get(),setContextMenuState:Rn=>Je.set(Rn)},Ls=Rn=>D.none(),Xs={...xn,shared:{...xn.shared,interpreter:Rn=>Cz(Rn,{},Xs,Ls),getSink:de.popup}},on={...xn,shared:{...xn.shared,interpreter:Rn=>Cz(Rn,{},on,Ls),getSink:de.dialog}};return{popup:Xs,dialog:on}})({popup:()=>un.fromOption(f.popupUi.get().map(de=>de.sink),"(popup) UI has not been rendered"),dialog:()=>un.fromOption(f.dialogUi.get().map(de=>de.sink),"UI has not been rendered")},n,G,J),ne=()=>{const de=(()=>{const xn={attributes:{[nl]:O?Pc.BottomToTop:Pc.TopToBottom}},Ls=Bs.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:Y.popup,onEscape:()=>{n.focus()}}),Xs=Bs.parts.toolbar({dom:{tag:"div",classes:["tox-toolbar"]},getSink:Y.popup.shared.getSink,providers:Y.popup.shared.providers,onEscape:()=>{n.focus()},onToolbarToggled:Ea=>{((Wp,b1)=>{Wp.dispatch("ToggleToolbarDrawer",{state:b1})})(n,Ea)},type:T,lazyToolbar:ae,lazyHeader:()=>H().getOrDie("Could not find header element"),...xn}),on=Bs.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:Y.popup.shared.providers,onEscape:()=>{n.focus()},type:T}),Rn=$v(n),Co=Fv(n),Js=Iv(n),ms=LA(n),Ni=Bs.parts.promotion({dom:{tag:"div",classes:["tox-promotion"]}}),Di=Rn||Co||Js,Ia=ms?[Ni,Ls]:[Ls];return Bs.parts.header({dom:{tag:"div",classes:["tox-editor-header"].concat(Di?[]:["tox-editor-header--empty"]),...xn},components:Cs([Js?Ia:[],Rn?[on]:Co?[Xs]:[],rb(n)?[]:[R.asSpec()]]),sticky:Dp(n),editor:n,sharedBackstage:Y.popup.shared})})(),we={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[Bs.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),Bs.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}})]},ze=Bs.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:Y.popup}),tt=Bs.parts.viewWrapper({backstage:Y.popup}),Je=RA(n)&&!i?D.some(wD(n,Y.popup.shared.providers)):D.none(),Ze=Cs([O?[]:[de],i?[]:[we],O?[de]:[]]),kt=Bs.parts.editorContainer({components:Cs([Ze,i?[]:[F.asSpec()]])}),Wt=px(n),ro={role:"application",...Ud.isRtl()?{dir:"rtl"}:{},...Wt?{"aria-hidden":"true"}:{}},yo=Ba(Bs.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(i?["tox-tinymce-inline"]:[]).concat(O?["tox-tinymce--toolbar-bottom"]:[]).concat(C),styles:{visibility:"hidden",...Wt?{opacity:"0",border:"0"}:{}},attributes:ro},components:[kt,...i?[]:[tt,...Je.toArray()],ze],behaviours:xt([Ca(),Fo.config({disableClass:"tox-tinymce--disabled"}),po.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"})])})),$o=Zx(yo);return p.set($o),{mothership:$o,outerContainer:yo}},ie=de=>{const we=Xg((tt=>(Ze=>{const kt=Rv(Ze),Wt=Ly(Ze),ro=nx(Ze);return F0(kt).map(yo=>$0(yo,Wt,ro))})(tt).getOr(Rv(tt)))(n)),ze=Xg((tt=>WE(tt).getOr(Mv(tt)))(n));return n.inline||(Gr("div","width",ze)&&Mo(de.element,"width",ze),Gr("div","height",we)?Mo(de.element,"height",we):Mo(de.element,"height","400px")),we};return{popups:{backstage:Y.popup,getMothership:()=>kD("popups",v)},dialogs:{backstage:Y.dialog,getMothership:()=>kD("dialogs",y)},renderUI:()=>{const de=ne(),we=(()=>{const tt=mx(n),Je=Hn(za(),tt)&&Ns(tt,"display")==="grid",Ze={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(C),attributes:{...Ud.isRtl()?{dir:"rtl"}:{}}},behaviours:xt([Xa.config({useFixed:()=>u.isDocked(H)})])},kt={dom:{styles:{width:document.body.clientWidth+"px"}},events:Ho([Xe(Rd(),yo=>{Mo(yo.element,"width",document.body.clientWidth+"px")})])},Wt=Ba(ls(Ze,Je?kt:{})),ro=Zx(Wt);return y.set(ro),{sink:Wt,mothership:ro}})(),ze=Rp(n)?(()=>{const tt={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-silver-popup-sink","tox-tinymce-aux"].concat(C),attributes:{...Ud.isRtl()?{dir:"rtl"}:{}}},behaviours:xt([Xa.config({useFixed:()=>u.isDocked(H),getBounds:()=>r.getPopupSinkBounds()})])},Je=Ba(tt),Ze=Zx(Je);return v.set(Ze),{sink:Je,mothership:Ze}})():(tt=>(v.set(tt.mothership),tt))(we);return f.dialogUi.set(we),f.popupUi.set(ze),f.mainUi.set(de),(tt=>{const{mainUi:Je,popupUi:Ze,uiMotherships:kt}=tt;Zn(rx(n),(Co,Js)=>{n.ui.registry.addGroupToolbarButton(Js,Co)});const{buttons:Wt,menuItems:ro,contextToolbars:yo,sidebars:$o,views:xn}=n.ui.registry.getAll(),Ls=fx(n),Xs={menuItems:ro,menus:Ag(n),menubar:Np(n),toolbar:Ls.getOrThunk(()=>Fy(n)),allowToolbarGroups:T===jd.floating,buttons:Wt,sidebar:$o,views:xn};var on;on=Je.outerContainer,n.addShortcut("alt+F9","focus menubar",()=>{Bs.focusMenubar(on)}),n.addShortcut("alt+F10","focus toolbar",()=>{Bs.focusToolbar(on)}),n.addCommand("ToggleToolbarDrawer",(Co,Js)=>{Js!=null&&Js.skipFocus?Bs.toggleToolbarDrawerWithoutFocusing(on):Bs.toggleToolbarDrawer(on)}),n.addQueryStateHandler("ToggleToolbarDrawer",()=>Bs.isToolbarDrawerToggled(on)),((Co,Js,ms)=>{const Ni=(Kn,Vm)=>{Ht([Js,...ms],Hu=>{Hu.broadcastEvent(Kn,Vm)})},Di=(Kn,Vm)=>{Ht([Js,...ms],Hu=>{Hu.broadcastOn([Kn],Vm)})},Ia=Kn=>Di(A(),{target:Kn.target}),Ea=Ha(),Wp=Ai(Ea,"touchstart",Ia),b1=Ai(Ea,"touchmove",Kn=>Ni(no(),Kn)),Qg=Ai(Ea,"touchend",Kn=>Ni(ec(),Kn)),qp=Ai(Ea,"mousedown",Ia),t_=Ai(Ea,"mouseup",Kn=>{Kn.raw.button===0&&Di(L(),{target:Kn.target})}),eh=Kn=>Di(A(),{target:Vt(Kn.target)}),$m=Kn=>{Kn.button===0&&Di(L(),{target:Vt(Kn.target)})},Bb=()=>{Ht(Co.editorManager.get(),Kn=>{Co!==Kn&&Kn.dispatch("DismissPopups",{relatedTarget:Co})})},Lb=Kn=>Ni(Xf(),Tu(Kn)),y1=Kn=>{Di(M(),{}),Ni(Rd(),Tu(Kn))},rk=Vs(Vt(Co.getElement())),o_=nv(rk,"scroll",Kn=>{requestAnimationFrame(()=>{if(Co.getContainer()!=null){const Vm=Og(Co,Js.element).map(Hu=>[Hu.element,...Hu.others]).getOr([]);To(Vm,Hu=>Hn(Hu,Kn.target))&&(Co.dispatch("ElementScroll",{target:Kn.target.dom}),Ni(Jf(),Kn))}})}),th=()=>Di(M(),{}),Hm=Kn=>{Kn.state&&Di(A(),{target:Vt(Co.getContainer())})},Kp=Kn=>{Di(A(),{target:Vt(Kn.relatedTarget.getContainer())})},n_=Kn=>Co.dispatch("focusin",Kn),s_=Kn=>Co.dispatch("focusout",Kn);Co.on("PostRender",()=>{Co.on("click",eh),Co.on("tap",eh),Co.on("mouseup",$m),Co.on("mousedown",Bb),Co.on("ScrollWindow",Lb),Co.on("ResizeWindow",y1),Co.on("ResizeEditor",th),Co.on("AfterProgressState",Hm),Co.on("DismissPopups",Kp),Ht([Js,...ms],Kn=>{Kn.element.dom.addEventListener("focusin",n_),Kn.element.dom.addEventListener("focusout",s_)})}),Co.on("remove",()=>{Co.off("click",eh),Co.off("tap",eh),Co.off("mouseup",$m),Co.off("mousedown",Bb),Co.off("ScrollWindow",Lb),Co.off("ResizeWindow",y1),Co.off("ResizeEditor",th),Co.off("AfterProgressState",Hm),Co.off("DismissPopups",Kp),Ht([Js,...ms],Kn=>{Kn.element.dom.removeEventListener("focusin",n_),Kn.element.dom.removeEventListener("focusout",s_)}),qp.unbind(),Wp.unbind(),b1.unbind(),Qg.unbind(),t_.unbind(),o_.unbind()}),Co.on("detach",()=>{Ht([Js,...ms],Gk),Ht([Js,...ms],Kn=>Kn.destroy())})})(n,Je.mothership,kt),u.setup(n,Y.popup.shared,H),qP(n,Y.popup),JP(n,Y.popup.shared.getSink,Y.popup),(Co=>{const{sidebars:Js}=Co.ui.registry.getAll();Ht(tn(Js),ms=>{const Ni=Js[ms],Di=()=>Kr(D.from(Co.queryCommandValue("ToggleSidebar")),ms);Co.ui.registry.addToggleButton(ms,{icon:Ni.icon,tooltip:Ni.tooltip,onAction:Ia=>{Co.execCommand("ToggleSidebar",!1,ms),Ia.setActive(Di())},onSetup:Ia=>{Ia.setActive(Di());const Ea=()=>Ia.setActive(Di());return Co.on("ToggleSidebar",Ea),()=>{Co.off("ToggleSidebar",Ea)}}})})})(n),Jz(n,X,Y.popup.shared),jP(n,yo,Ze.sink,{backstage:Y.popup}),_D(n,Ze.sink);const Rn={targetNode:n.getElement(),height:ie(Je.outerContainer)};return l.render(n,tt,Xs,Y.popup,Rn)})({popupUi:ze,dialogUi:we,mainUi:de,uiMotherships:f.getUiMotherships()})}}},i6=ue([nt("lazySink"),vn("dragBlockClass"),xs("getBounds",jr),Ne("useTabstopAt",Gt),Ne("firstTabstop",0),Ne("eventOrder",{}),Jt("modalBehaviours",[po]),el("onExecute"),fi("onEscape")]),uT={sketch:Ct},fT=ue([ld({name:"draghandle",overrides:(n,r)=>({behaviours:xt([Rb.config({mode:"mouse",getTarget:i=>cm(i,'[role="dialog"]').getOr(i),blockerClass:n.dragBlockClass.getOrDie(new Error(`The drag blocker class was not specified for a dialog with a drag handle: -`+JSON.stringify(r,null,2)).message),getBounds:n.getDragBounds})])})}),sl({schema:[nt("dom")],name:"title"}),sl({factory:uT,schema:[nt("dom")],name:"close"}),sl({factory:uT,schema:[nt("dom")],name:"body"}),ld({factory:uT,schema:[nt("dom")],name:"footer"}),Nu({factory:{sketch:(n,r)=>({...n,dom:r.dom,components:r.components})},schema:[Ne("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Ne("components",[])],name:"blocker"})]),gr=gl({name:"ModalDialog",configFields:i6(),partFields:fT(),factory:(n,r,i,l)=>{const u=Nn(),f=Xt("modal-events"),p={...n.eventOrder,[ka()]:[f].concat(n.eventOrder["alloy.system.attached"]||[])},y=Yr();return{uid:n.uid,dom:n.dom,components:r,apis:{show:v=>{u.set(v);const C=n.lazySink(v).getOrDie(),O=l.blocker(),T=C.getSystem().build({...O,components:O.components.concat([$i(v)]),behaviours:xt([Po.config({}),en("dialog-blocker-events",[Pd(Wn(),()=>{eu.isBlocked(v)||po.focusIn(v)})])])});bf(C,T),po.focusIn(v)},hide:v=>{u.clear(),Hr(v.element).each(C=>{v.getSystem().getByDom(C).each(O=>{Vi(O)})})},getBody:v=>Op(v,n,"body"),getFooter:v=>As(v,n,"footer"),setIdle:v=>{eu.unblock(v)},setBusy:(v,C)=>{eu.block(v,C)}},eventOrder:p,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Xo(n.modalBehaviours,[So.config({}),po.config({mode:"cyclic",onEnter:n.onExecute,onEscape:n.onEscape,useTabstopAt:n.useTabstopAt,firstTabstop:n.firstTabstop}),eu.config({getRoot:u.get}),en(f,[Ss(v=>{const C=Op(v,n,"title").element,O=(T=>T.dom.textContent)(C);y.os.isMacOS()&&st(O)?wo(v.element,"aria-label",O):((T,R)=>{const F=Fs(T,"id").fold(()=>{const H=Xt("dialog-label");return wo(R,"id",H),H},Ct);wo(T,"aria-labelledby",F)})(v.element,C)})])])}},apis:{show:(n,r)=>{n.show(r)},hide:(n,r)=>{n.hide(r)},getBody:(n,r)=>n.getBody(r),getFooter:(n,r)=>n.getFooter(r),setBusy:(n,r,i)=>{n.setBusy(r,i)},setIdle:(n,r)=>{n.setIdle(r)}}}),l6=ho([oa,tC].concat(ub)),Z0=ml,mT=[lC("button"),Wd,zl("align","end",["start","end"]),Tx,qd,Ju("buttonType",["primary","secondary"])],Xw=[...mT,Zd],pT=[Al("type",["submit","cancel","custom"]),...Xw],c6=[Al("type",["menu"]),Bg,s0,Wd,li("items",l6),...mT],d6=[...mT,Al("type",["togglebutton"]),s0,Wd,Bg,xr("active",!1)],CD=_r("type",{submit:pT,cancel:pT,custom:pT,menu:c6,togglebutton:d6}),u6=[oa,Zd,Al("level",["info","warn","error","success"]),sC,Ne("url","")],gT=ho(u6),hT=[oa,Zd,qd,lC("button"),Wd,i8,Ju("buttonType",["primary","secondary","toolbar"]),Tx],bT=ho(hT),m1=[oa,tC],Pa=m1.concat([rC]),f6=m1.concat([oC,qd]),m6=ho(f6),SD=ml,ED=Pa.concat([yO("auto")]),p6=ho(ED),g6=wc([cb,Zd,sC]),h6=Pa.concat([Si("storageKey","default")]),b6=ho(h6),y6=Zr,v6=ho(Pa),_6=Zr,TD=m1.concat([Si("tag","textarea"),js("scriptId"),js("scriptUrl"),Jl("onFocus"),Wa("settings",void 0,sg)]),x6=m1.concat([Si("tag","textarea"),Za("init")]),w6=zd(n=>Ms("customeditor.old",Ur(x6),n).orThunk(()=>Ms("customeditor.new",Ur(TD),n))),k6=Zr,AD=ho(Pa),yT=xc(_c),OD=n=>[oa,pu("columns"),n],zD=[oa,js("html"),zl("presets","presentation",["presentation","document"]),xs("onInit",Ke),xr("stretched",!1)],ND=ho(zD),DD=Pa.concat([xr("border",!1),xr("sandboxed",!0),xr("streamContent",!1),xr("transparent",!0)]),vT=ho(DD),C6=Zr,_T=ho(m1.concat([Us("height")])),p1=ho([js("url"),Sc("zoom"),Sc("cachedWidth"),Sc("cachedHeight")]),RD=Pa.concat([Us("inputMode"),Us("placeholder"),xr("maximized",!1),qd]),MD=ho(RD),BD=Zr,S6=n=>[oa,oC,n,zl("align","start",["start","center","end"]),Us("for")],E6=[Zd,cb],Jw=[Zd,li("items",Zf(0,()=>LD))],LD=fu([ho(E6),ho(Jw)]),T6=Pa.concat([li("items",LD),qd]),PD=ho(T6),ID=Zr,xT=Pa.concat([gu("items",[Zd,cb]),fr("size",1),qd]),FD=ho(xT),$l=Zr,$D=Pa.concat([xr("constrain",!0),qd]),A6=ho($D),HD=ho([js("width"),js("height")]),VD=m1.concat([oC,fr("min",0),fr("max",0)]),O6=ho(VD),z6=Xc,N6=[oa,li("header",Zr),li("cells",xc(Zr))],jD=ho(N6),Fm=Pa.concat([Us("placeholder"),xr("maximized",!1),qd]),wT=ho(Fm),UD=Zr,W0=[Al("type",["directory","leaf"]),nC,js("id"),ur("menu",Kz)],Qw=ho(W0),D6=W0.concat([li("children",Zf(0,()=>Cc("type",{directory:ZD,leaf:Qw})))]),ZD=ho(D6),R6=Cc("type",{directory:ZD,leaf:Qw}),M6=[oa,li("items",R6),Jl("onLeafAction"),Jl("onToggleExpand"),Jn("defaultExpandedIds",[],Zr),Us("defaultSelectedId")],B6=ho(M6),L6=Pa.concat([zl("filetype","file",["image","media","file"]),qd,Us("picker_text")]),P6=ho(L6),WD=ho([cb,Vc]),kT=n=>dr("items","items",{tag:"required",process:{}},xc(zd(r=>Ms(`Checking item of ${n}`,$u,r).fold(i=>un.error(ii(i)),i=>un.value(i))))),$u=Yu(()=>{return Cc("type",{alertbanner:gT,bar:ho((n=kT("bar"),[oa,n])),button:bT,checkbox:m6,colorinput:b6,colorpicker:v6,dropzone:AD,grid:ho(OD(kT("grid"))),iframe:vT,input:MD,listbox:PD,selectbox:FD,sizeinput:A6,slider:O6,textarea:wT,urlinput:P6,customeditor:w6,htmlpanel:ND,imagepreview:_T,collection:p6,label:ho(S6(kT("label"))),table:jD,tree:B6,panel:qD});var n}),ek=[oa,Ne("classes",[]),li("items",$u)],qD=ho(ek),I6=[lC("tab"),nC,li("items",$u)],KD=[oa,gu("tabs",I6)],GD=ho(KD),CT=Xw,tk=CD,q0=ho([js("title"),Xr("body",Cc("type",{panel:qD,tabpanel:GD})),Si("size","normal"),Jn("buttons",[],tk),Ne("initialData",{}),xs("onAction",Ke),xs("onChange",Ke),xs("onSubmit",Ke),xs("onClose",Ke),xs("onCancel",Ke),xs("onTabChange",Ke)]),K0=ho([Al("type",["cancel","custom"]),...CT]),YD=ho([js("title"),js("url"),Sc("height"),Sc("width"),np("buttons",K0),xs("onAction",Ke),xs("onCancel",Ke),xs("onClose",Ke),xs("onMessage",Ke)]),ok=n=>ce(n)?[n].concat(Sn(ra(n),ok)):$e(n)?Sn(n,ok):[],XD=n=>te(n.type)&&te(n.name),JD={checkbox:SD,colorinput:y6,colorpicker:_6,dropzone:yT,input:BD,iframe:C6,imagepreview:p1,selectbox:$l,sizeinput:HD,slider:z6,listbox:ID,size:HD,textarea:UD,urlinput:WD,customeditor:k6,collection:g6,togglemenuitem:Z0},F6=n=>{const r=(l=>cn(ok(l),XD))(n),i=Sn(r,l=>(u=>D.from(JD[u.type]))(l).fold(()=>[],u=>[Xr(l.name,u)]));return ho(i)},QD=n=>{var r;return{internalDialog:Ua(Ms("dialog",q0,n)),dataValidator:F6(n),initialData:(r=n.initialData)!==null&&r!==void 0?r:{}}},Mb={open:(n,r)=>{const i=QD(r);return n(i.internalDialog,i.initialData,i.dataValidator)},openUrl:(n,r)=>n(Ua(Ms("dialog",YD,r))),redial:n=>QD(n)};var $6=Object.freeze({__proto__:null,events:(n,r)=>{const i=(l,u)=>{n.updateState.each(f=>{const p=f(l,u);r.set(p)}),n.renderComponents.each(f=>{const p=f(u,r.get());(n.reuseDom?E2:eb)(l,p)})};return Ho([Xe(Fi(),(l,u)=>{const f=u;if(!f.universal){const p=n.channel;Ge(f.channels,p)&&i(l,f.data)}}),Ss((l,u)=>{n.initialData.each(f=>{i(l,f)})})])}}),H6=Object.freeze({__proto__:null,getState:(n,r,i)=>i}),eR=[nt("channel"),vn("renderComponents"),vn("updateState"),vn("initialData"),xr("reuseDom",!0)];const uc=Qr({fields:eR,name:"reflecting",active:$6,apis:H6,state:Object.freeze({__proto__:null,init:()=>{const n=so(D.none());return{readState:()=>n.get().getOr("none"),get:n.get,set:n.set,clear:()=>n.set(D.none())}}})}),tR=n=>{const r=[],i={};return rs(n,(l,u)=>{l.fold(()=>{r.push(u)},f=>{i[u]=f})}),r.length>0?un.error(r):un.value(i)},oR=(n,r,i,l)=>{const u=ns(jg.sketch(p=>({dom:{tag:"div",classes:["tox-form"].concat(n.classes)},components:pt(n.items,y=>Aw(p,y,r,i,l))})));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[u.asSpec()]}],behaviours:xt([po.config({mode:"acyclic",useTabstopAt:bn(t1)}),(f=u,In.config({find:f.getOpt})),bS(u,{postprocess:p=>tR(p).fold(y=>(console.error(y),{}),Ct)}),en("dialog-body-panel",[Xe(Wn(),(p,y)=>{p.getSystem().broadcastOn([bw],{newFocus:D.some(y.event.target)})})])])};var f},V6=cd({name:"TabButton",configFields:[Ne("uid",void 0),nt("value"),dr("dom","dom",kn(()=>({attributes:{role:"tab",id:Xt("aria"),"aria-selected":"false"}})),Ii()),vn("action"),Ne("domModification",{}),Jt("tabButtonBehaviours",[Po,po,Be]),nt("view")],factory:(n,r)=>({uid:n.uid,dom:n.dom,components:n.components,events:My(n.action),behaviours:Xo(n.tabButtonBehaviours,[Po.config({}),po.config({mode:"execution",useSpace:!0,useEnter:!0}),Be.config({store:{mode:"memory",initialValue:n.value}})]),domModification:n.domModification})}),nR=ue([nt("tabs"),nt("dom"),Ne("clickToDismiss",!1),Jt("tabbarBehaviours",[ss,po]),mp(["tabClass","selectedClass"])]),G0=H_({factory:V6,name:"tabs",unit:"tab",overrides:n=>{const r=(l,u)=>{ss.dehighlight(l,u),lo(l,wt(),{tabbar:l,button:u})},i=(l,u)=>{ss.highlight(l,u),lo(l,Qf(),{tabbar:l,button:u})};return{action:l=>{const u=l.getSystem().getByUid(n.uid).getOrDie(),f=ss.isHighlighted(u,l);(f&&n.clickToDismiss?r:f?Ke:i)(u,l)},domModification:{classes:[n.markers.tabClass]}}}}),j6=ue([G0]),ST=gl({name:"Tabbar",configFields:nR(),partFields:j6(),factory:(n,r,i,l)=>({uid:n.uid,dom:n.dom,components:r,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Xo(n.tabbarBehaviours,[ss.config({highlightClass:n.markers.selectedClass,itemClass:n.markers.tabClass,onHighlight:(u,f)=>{wo(f.element,"aria-selected","true")},onDehighlight:(u,f)=>{wo(f.element,"aria-selected","false")}}),po.config({mode:"flow",getInitial:u=>ss.getHighlighted(u).map(f=>f.element),selector:"."+n.markers.tabClass,executeOnMove:!0})])})}),U6=cd({name:"Tabview",configFields:[Jt("tabviewBehaviours",[So])],factory:(n,r)=>({uid:n.uid,dom:n.dom,behaviours:Xo(n.tabviewBehaviours,[So.config({})]),domModification:{attributes:{role:"tabpanel"}}})}),Z6=ue([Ne("selectFirst",!0),Dn("onChangeTab"),Dn("onDismissTab"),Ne("tabs",[]),Jt("tabSectionBehaviours",[])]),W6=sl({factory:ST,schema:[nt("dom"),Ol("markers",[nt("tabClass"),nt("selectedClass")])],name:"tabbar",defaults:n=>({tabs:n.tabs})}),q6=sl({factory:U6,name:"tabview"}),sR=ue([W6,q6]),g1=gl({name:"TabSection",configFields:Z6(),partFields:sR(),factory:(n,r,i,l)=>{const u=(f,p)=>{As(f,n,"tabbar").each(y=>{p(y).each(Ld)})};return{uid:n.uid,dom:n.dom,components:r,behaviours:Ao(n.tabSectionBehaviours),events:Ho(Cs([n.selectFirst?[Ss((f,p)=>{u(f,ss.getFirst)})]:[],[Xe(Qf(),(f,p)=>{(y=>{const v=Be.getValue(y);As(y,n,"tabview").each(C=>{j(n.tabs,O=>O.value===v).each(O=>{const T=O.view();Fs(y.element,"id").each(R=>{wo(C.element,"aria-labelledby",R)}),So.set(C,T),n.onChangeTab(C,y,T)})})})(p.event.button)}),Xe(wt(),(f,p)=>{const y=p.event.button;n.onDismissTab(f,y)})]])),apis:{getViewItems:f=>As(f,n,"tabview").map(p=>So.contents(p)).getOr([]),showTab:(f,p)=>{u(f,y=>{const v=ss.getCandidates(y);return j(v,C=>Be.getValue(C)===p).filter(C=>!ss.isHighlighted(y,C))})}}}},apis:{getViewItems:(n,r)=>n.getViewItems(r),showTab:(n,r,i)=>{n.showTab(r,i)}}}),ET=(n,r)=>{Mo(n,"height",r+"px"),Mo(n,"flex-basis",r+"px")},h1=(n,r,i)=>{cm(n,'[role="dialog"]').each(l=>{Ys(l,'[role="tablist"]').each(u=>{i.get().map(f=>(Mo(r,"height","0"),Mo(r,"flex-basis","0"),Math.min(f,((p,y,v)=>{const C=Gi(p).dom,O=cm(p,".tox-dialog-wrap").getOr(p);let T;T=Ns(O,"position")==="fixed"?Math.max(C.clientHeight,window.innerHeight):Math.max(C.offsetHeight,C.scrollHeight);const R=Ds(y),F=y.dom.offsetLeft>=v.dom.offsetLeft+Go(v)?Math.max(Ds(v),R):R,H=parseInt(Ns(p,"margin-top"),10)||0,G=parseInt(Ns(p,"margin-bottom"),10)||0;return T-(Ds(p)+H+G-F)})(l,r,u)))).each(f=>{ET(r,f)})})})},Of=n=>Ys(n,'[role="tabpanel"]'),nk="send-data-to-section",TT="send-data-to-view",rR=(n,r,i,l)=>{const u=so({}),f=O=>{const T=Be.getValue(O),R=tR(T).getOr({}),F=u.get(),H=ls(F,R);u.set(H)},p=O=>{const T=u.get();Be.setValue(O,T)},y=so(null),v=pt(n.tabs,O=>({value:O.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"]},components:[wr(i.shared.providers.translate(O.title))],view:()=>[jg.sketch(T=>({dom:{tag:"div",classes:["tox-form"]},components:pt(O.items,R=>Aw(T,R,r,i,l)),formBehaviours:xt([po.config({mode:"acyclic",useTabstopAt:bn(t1)}),en("TabView.form.events",[Ss(p),Oc(f)]),ol.config({channels:Ji([{key:nk,value:{onReceive:f}},{key:TT,value:{onReceive:p}}])})])}))]})),C=(O=>{const T=Nn();return{extraEvents:[Ss(F=>{const H=F.element;Of(H).each(G=>{Mo(G,"visibility","hidden"),F.getSystem().getByDom(G).toOptional().each(J=>{const ae=((Y,ne,ie)=>pt(Y,(de,we)=>{So.set(ie,Y[we].view());const ze=ne.dom.getBoundingClientRect();return So.set(ie,[]),ze.height}))(O,G,J);(Y=>yt(Le(Y,(ne,ie)=>ne>ie?-1:ne{yt(J).each(X=>g1.showTab(ae,X.value))})(O,F),requestAnimationFrame(()=>{h1(H,G,T)})})}),Xe(Rd(),F=>{const H=F.element;Of(H).each(G=>{h1(H,G,T)})}),Xe(qx,(F,H)=>{const G=F.element;Of(G).each(J=>{const ae=sd(Vs(J));Mo(J,"visibility","hidden");const X=er(J,"height").map(ne=>parseInt(ne,10));Vn(J,"height"),Vn(J,"flex-basis");const Y=J.dom.getBoundingClientRect().height;X.forall(ne=>Y>ne)?(T.set(Y),h1(G,J,T)):X.each(ne=>{ET(J,ne)}),Vn(J,"visibility"),ae.each(Ti)})})],selectFirst:!1}})(v);return g1.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:(O,T,R)=>{const F=Be.getValue(T);lo(O,y3,{name:F,oldName:y.get()}),y.set(F)},tabs:v,components:[g1.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[ST.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:xt([ws.config({})])}),g1.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:C.selectFirst,tabSectionBehaviours:xt([en("tabpanel",C.extraEvents),po.config({mode:"acyclic"}),In.config({find:O=>yt(g1.getViewItems(O))}),wb(D.none(),O=>(O.getSystem().broadcastOn([nk],{}),u.get()),(O,T)=>{u.set(T),O.getSystem().broadcastOn([TT],{})})])})},sk=(n,r,i,l,u,f)=>({dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:{...i.map(p=>({id:p})).getOr({}),...u?{"aria-live":"polite"}:{}}},components:[],behaviours:xt([gS(0),uc.config({channel:`${K3}-${r}`,updateState:(p,y)=>D.some({isTabPanel:()=>y.body.type==="tabpanel"}),renderComponents:p=>{const y=p.body;return y.type==="tabpanel"?[rR(y,p.initialData,l,f)]:[oR(y,p.initialData,l,f)]},initialData:n})])}),aR=wf.deviceType.isTouch(),Y0=(n,r)=>({dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[n,r]}),AT=(n,r)=>gr.parts.close(zi.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":r.translate("Close")}},action:n,buttonBehaviours:xt([ws.config({})])})),OT=()=>gr.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}}),iR=(n,r)=>gr.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:Cm(`

    ${YA(r.translate(n))}

    `)}]}]}),lR=n=>gr.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:n}),cR=(n,r)=>[Bu.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:n}),Bu.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:r})],zT=n=>{const r="tox-dialog",i=r+"-wrap",l=i+"__backdrop",u=r+"__disable-scroll";return gr.sketch({lazySink:n.lazySink,onEscape:f=>(n.onEscape(f),D.some(!0)),useTabstopAt:f=>!t1(f),firstTabstop:n.firstTabstop,dom:{tag:"div",classes:[r].concat(n.extraClasses),styles:{position:"relative",...n.extraStyles}},components:[n.header,n.body,...n.footer.toArray()],parts:{blocker:{dom:Cm(`
    `),components:[{dom:{tag:"div",classes:aR?[l,l+"--opaque"]:[l]}}]}},dragBlockClass:i,modalBehaviours:xt([Po.config({}),en("dialog-events",n.dialogEvents.concat([Pd(Wn(),(f,p)=>{eu.isBlocked(f)||po.focusIn(f)}),Xe(ag(),(f,p)=>{f.getSystem().broadcastOn([bw],{newFocus:p.event.newFocus})})])),en("scroll-lock",[Ss(()=>{Tt(za(),u)}),Oc(()=>{co(za(),u)})]),...n.extraBehaviours]),eventOrder:{[di()]:["dialog-events"],[ka()]:["scroll-lock","dialog-events","alloy.base.behaviour"],[Dl()]:["alloy.base.behaviour","dialog-events","scroll-lock"],...n.eventOrder}})},dR=n=>zi.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":n.translate("Close"),"data-mce-name":"close"}},buttonBehaviours:xt([ws.config({}),Pr.config(n.tooltips.getConfig({tooltipText:n.translate("Close")}))]),components:[Hc("close",{tag:"span",classes:["tox-icon"]},n.icons)],action:r=>{Qo(r,Ip)}}),NT=(n,r,i,l)=>({dom:{tag:"h1",classes:["tox-dialog__title"],attributes:{...i.map(u=>({id:u})).getOr({})}},components:[],behaviours:xt([uc.config({channel:`${SS}-${r}`,initialData:n,renderComponents:u=>[wr(l.translate(u.title))]})])}),DT=()=>({dom:Cm('
    ')}),uR=(n,r,i)=>((l,u,f)=>{const p=gr.parts.title(NT(l,u,D.none(),f)),y=gr.parts.draghandle(DT()),v=gr.parts.close(dR(f)),C=[p].concat(l.draggable?[y]:[]).concat([v]);return Bu.sketch({dom:Cm('
    '),components:C})})({title:i.shared.providers.translate(n),draggable:i.dialog.isDraggableModal()},r,i.shared.providers),fR=(n,r,i,l)=>({dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":i.translate(n)},styles:{left:"0px",right:"0px",bottom:"0px",top:`${l.getOr(0)}px`,position:"absolute"}},behaviours:r,components:[{dom:Cm('
    ')}]}),mR=(n,r,i)=>({onClose:()=>i.closeWindow(),onBlock:l=>{const u=Ys(n().element,".tox-dialog__header").map(f=>Ds(f));gr.setBusy(n(),(f,p)=>fR(l.message,p,r,u))},onUnblock:()=>{gr.setIdle(n())}}),X0="tox-dialog--fullscreen",RT="tox-dialog--width-lg",MT="tox-dialog--width-md",J0=n=>{switch(n){case"large":return D.some(RT);case"medium":return D.some(MT);default:return D.none()}},BT=(n,r)=>{const i=Vt(r.element.dom);_n(i,X0)||(Qn(i,[RT,MT]),J0(n).each(l=>Tt(i,l)))},pR=(n,r)=>{const i=Vt(n.element.dom),l=ea(i),u=j(l,f=>f===RT||f===MT).or(J0(r));((f,p)=>{Ht(p,y=>{((v,C)=>{se(v)?v.dom.classList.toggle(C):((O,T)=>Ge(Ce(O),T)?Et(O,T):et(O,T))(v,C),Lo(v)})(f,y)})})(i,[X0,...u.toArray()])},gR=(n,r,i)=>Ba(zT({...n,firstTabstop:1,lazySink:i.shared.getSink,extraBehaviours:[k0({}),...n.extraBehaviours],onEscape:l=>{Qo(l,Ip)},dialogEvents:r,eventOrder:{[Fi()]:[uc.name(),ol.name()],[ka()]:["scroll-lock",uc.name(),"messages","dialog-events","alloy.base.behaviour"],[Dl()]:["alloy.base.behaviour","dialog-events","messages",uc.name(),"scroll-lock"]}})),Q0=(n,r={})=>pt(n,i=>i.type==="menu"?(l=>{const u=pt(l.items,f=>{const p=St(r,f.name).getOr(so(!1));return{...f,storage:p}});return{...l,items:u}})(i):i),hR=n=>zo(n,(r,i)=>i.type==="menu"?zo(i.items,(l,u)=>(l[u.name]=u.storage,l),r):r,{}),LT=(n,r)=>[tf(Wn(),nL),n($g,(i,l,u,f)=>{sd(Vs(f.element)).fold(Ke,Th),r.onClose(),l.onClose()}),n(Ip,(i,l,u,f)=>{l.onCancel(i),Qo(f,$g)}),Xe(ZC,(i,l)=>r.onUnblock()),Xe(UC,(i,l)=>r.onBlock(l.event))],bR=(n,r,i)=>{const l=(f,p)=>Xe(f,(y,v)=>{u(y,(C,O)=>{p(n(),C,v.event,y)})}),u=(f,p)=>{uc.getState(f).get().each(y=>{p(y.internalDialog,f)})};return[...LT(l,r),l(y0,(f,p)=>p.onSubmit(f)),l(Zi,(f,p,y)=>{p.onChange(f,{name:y.name})}),l(Tf,(f,p,y,v)=>{const C=()=>v.getSystem().isConnected()?po.focusIn(v):void 0,O=F=>qc(F,"disabled")||Fs(F,"aria-disabled").exists(H=>H==="true"),T=Vs(v.element),R=sd(T);p.onAction(f,{name:y.name,value:y.value}),sd(T).fold(C,F=>{O(F)||R.exists(H=>lr(F,H)&&O(H))?C():i().toOptional().filter(H=>!lr(H.element,F)).each(C)})}),l(y3,(f,p,y)=>{p.onTabChange(f,{newTabName:y.name,oldTabName:y.oldName})}),Oc(f=>{const p=n();Be.setValue(f,p.getData())})]},K6=(n,r)=>{const i=r.map(f=>f.footerButtons).getOr([]),l=ks(i,f=>f.align==="start"),u=(f,p)=>Bu.sketch({dom:{tag:"div",classes:[`tox-dialog__footer-${f}`]},components:pt(p,y=>y.memento.asSpec())});return[u("start",l.pass),u("end",l.fail)]},yR=(n,r,i)=>({dom:Cm(''),components:[],behaviours:xt([uc.config({channel:`${G3}-${r}`,initialData:n,updateState:(l,u)=>{const f=pt(u.buttons,p=>{const y=ns(((v,C)=>s1(v,v.type,C))(p,i));return{name:p.name,align:p.align,memento:y}});return D.some({lookupByName:p=>((y,v,C)=>j(v,O=>O.name===C).bind(O=>O.memento.getOpt(y)))(l,f,p),footerButtons:f})},renderComponents:K6})])}),PT=(n,r,i)=>gr.parts.footer(yR(n,r,i)),e_=(n,r)=>{if(n.getRoot().getSystem().isConnected()){const i=In.getCurrent(n.getFormWrapper()).getOr(n.getFormWrapper());return jg.getField(i,r).orThunk(()=>n.getFooter().bind(u=>uc.getState(u).get()).bind(u=>u.lookupByName(r)))}return D.none()},vR=(n,r,i)=>{const l=f=>{const p=n.getRoot();p.getSystem().isConnected()&&f(p)},u={getData:()=>{const f=n.getRoot(),p=f.getSystem().isConnected()?n.getFormWrapper():f;return{...Be.getValue(p),...Zn(i,y=>y.get())}},setData:f=>{l(p=>{const y=u.getData(),v=ls(y,f),C=((T,R)=>{const F=T.getRoot();return uc.getState(F).get().map(H=>Ua(Ms("data",H.dataValidator,R))).getOr(R)})(n,v),O=n.getFormWrapper();Be.setValue(O,C),rs(i,(T,R)=>{Vo(v,R)&&T.set(v[R])})})},setEnabled:(f,p)=>{e_(n,f).each(p?Fo.enable:Fo.disable)},focus:f=>{e_(n,f).each(Po.focus)},block:f=>{if(!te(f))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");l(p=>{lo(p,UC,{message:f})})},unblock:()=>{l(f=>{Qo(f,ZC)})},showTab:f=>{l(p=>{const y=n.getBody();uc.getState(y).get().exists(v=>v.isTabPanel())&&In.getCurrent(y).each(v=>{g1.showTab(v,f)})})},redial:f=>{l(p=>{const y=n.getId(),v=r(f),C=Q0(v.internalDialog.buttons,i);p.getSystem().broadcastOn([`${Ug}-${y}`],v),p.getSystem().broadcastOn([`${SS}-${y}`],v.internalDialog),p.getSystem().broadcastOn([`${K3}-${y}`],v.internalDialog),p.getSystem().broadcastOn([`${G3}-${y}`],{...v.internalDialog,buttons:C}),u.setData(v.initialData)})},close:()=>{l(f=>{Qo(f,$g)})},toggleFullscreen:n.toggleFullscreen};return u},_R=(n,r,i,l=!1,u)=>{const f=Xt("dialog"),p=Xt("dialog-label"),y=Xt("dialog-content"),v=n.internalDialog,C=so(v.size),O=J0(C.get()).toArray(),T=ns(((ie,de,we,ze)=>Bu.sketch({dom:Cm('
    '),components:[NT(ie,de,D.some(we),ze),DT(),dR(ze)],containerBehaviours:xt([Rb.config({mode:"mouse",blockerClass:"blocker",getTarget:tt=>Fd(tt,'[role="dialog"]').getOrDie(),snaps:{getSnapPoints:()=>[],leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))({title:v.title,draggable:!0},f,p,i.shared.providers)),R=ns(((ie,de,we,ze,tt,Je)=>sk(ie,de,D.some(we),ze,tt,Je))({body:v.body,initialData:v.initialData},f,y,i,l,ie=>e_(Y,ie))),F=Q0(v.buttons),H=hR(F),G=nn(F.length!==0,ns(((ie,de,we)=>yR(ie,de,we))({buttons:F},f,i))),J=bR(()=>ne,{onBlock:ie=>{eu.block(X,(de,we)=>{const ze=T.getOpt(X).map(tt=>Ds(tt.element));return fR(ie.message,we,i.shared.providers,ze)})},onUnblock:()=>{eu.unblock(X)},onClose:()=>r.closeWindow()},i.shared.getSink),ae=Yr().os,X=Ba({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline",...O],attributes:{role:"dialog",...ae.isMacOS()?{"aria-label":v.title}:{"aria-labelledby":p}}},eventOrder:{[Fi()]:[uc.name(),ol.name()],[di()]:["execute-on-form"],[ka()]:["reflecting","execute-on-form"]},behaviours:xt([po.config({mode:"cyclic",onEscape:ie=>(Qo(ie,$g),D.some(!0)),useTabstopAt:ie=>!t1(ie)&&(ni(ie)!=="button"||yr(ie,"disabled")!=="disabled"),firstTabstop:1}),uc.config({channel:`${Ug}-${f}`,updateState:(ie,de)=>(C.set(de.internalDialog.size),BT(de.internalDialog.size,ie),u(),D.some(de)),initialData:n}),Po.config({}),en("execute-on-form",J.concat([Pd(Wn(),(ie,de)=>{po.focusIn(ie)}),Xe(ag(),(ie,de)=>{ie.getSystem().broadcastOn([bw],{newFocus:de.event.newFocus})})])),eu.config({getRoot:()=>D.some(X)}),So.config({}),k0({})]),components:[T.asSpec(),R.asSpec(),...G.map(ie=>ie.asSpec()).toArray()]}),Y={getId:ue(f),getRoot:ue(X),getFooter:()=>G.map(ie=>ie.get(X)),getBody:()=>R.get(X),getFormWrapper:()=>{const ie=R.get(X);return In.getCurrent(ie).getOr(ie)},toggleFullscreen:()=>{pR(X,C.get())}},ne=vR(Y,r.redial,H);return{dialog:X,instanceApi:ne}};var IT=tinymce.util.Tools.resolve("tinymce.util.URI");const G6=["insertContent","setContent","execCommand","close","block","unblock"],FT=n=>ce(n)&&G6.indexOf(n.mceAction)!==-1,Y6=(n,r,i,l)=>{const u=Xt("dialog"),f=uR(n.title,u,l),p=(ae=>{const X={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[kS(D.none(),{dom:{tag:"iframe",attributes:{src:ae.url}},behaviours:xt([ws.config({}),Po.config({})])})]}],behaviours:xt([po.config({mode:"acyclic",useTabstopAt:bn(t1)})])};return gr.parts.body(X)})(n),y=n.buttons.bind(ae=>ae.length===0?D.none():D.some(PT({buttons:ae},u,l))),v=((ae,X)=>{const Y=(ie,de)=>Xe(ie,(we,ze)=>{ne(we,(tt,Je)=>{de(J,tt,ze.event,we)})}),ne=(ie,de)=>{uc.getState(ie).get().each(we=>{de(we,ie)})};return[...LT(Y,X),Y(Tf,(ie,de,we)=>{de.onAction(ie,{name:we.name})})]})(0,mR(()=>G,l.shared.providers,r)),C={...n.height.fold(()=>({}),ae=>({height:ae+"px","max-height":ae+"px"})),...n.width.fold(()=>({}),ae=>({width:ae+"px","max-width":ae+"px"}))},O=n.width.isNone()&&n.height.isNone()?["tox-dialog--width-lg"]:[],T=new IT(n.url,{base_uri:new IT(window.location.href)}),R=`${T.protocol}://${T.host}${T.port?":"+T.port:""}`,F=Sl(),H=[uc.config({channel:`${Ug}-${u}`,updateState:(ae,X)=>D.some(X),initialData:n}),en("messages",[Ss(()=>{const ae=Ai(Vt(window),"message",X=>{if(T.isSameOrigin(new IT(X.raw.origin))){const Y=X.raw.data;FT(Y)?((ne,ie,de)=>{switch(de.mceAction){case"insertContent":ne.insertContent(de.content);break;case"setContent":ne.setContent(de.content);break;case"execCommand":const we=!!Me(de.ui)&&de.ui;ne.execCommand(de.cmd,we,de.value);break;case"close":ie.close();break;case"block":ie.block(de.message);break;case"unblock":ie.unblock()}})(i,J,Y):(ne=>!FT(ne)&&ce(ne)&&Vo(ne,"mceAction"))(Y)&&n.onMessage(J,Y)}});F.set(ae)}),Oc(F.clear)]),ol.config({channels:{[ES]:{onReceive:(ae,X)=>{Ys(ae.element,"iframe").each(Y=>{const ne=Y.dom.contentWindow;st(ne)&&ne.postMessage(X,R)})}}}})],G=gR({id:u,header:f,body:p,footer:y,extraClasses:O,extraBehaviours:H,extraStyles:C},v,l),J=(ae=>{const X=Y=>{ae.getSystem().isConnected()&&Y(ae)};return{block:Y=>{if(!te(Y))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");X(ne=>{lo(ne,UC,{message:Y})})},unblock:()=>{X(Y=>{Qo(Y,ZC)})},close:()=>{X(Y=>{Qo(Y,$g)})},sendMessage:Y=>{X(ne=>{ne.getSystem().broadcastOn([ES],Y)})}}})(G);return{dialog:G,instanceApi:J}},$T=(n,r)=>Ua(Ms("data",r,n)),xR=n=>Jy(n,".tox-alert-dialog")||Jy(n,".tox-confirm-dialog"),X6=(n,r,i)=>r&&i?[]:[Gs.config({contextual:{lazyContext:()=>D.some(vr(Vt(n.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"],lazyViewport:l=>Og(n,l.element).map(u=>({bounds:zg(u),optScrollEnv:D.some({currentScrollTop:u.element.dom.scrollTop,scrollElmTop:Ye(u.element).top})})).getOrThunk(()=>({bounds:jr(),optScrollEnv:D.none()}))})],J6=n=>{const r=n.editor,i=Dp(r),l=(v=>{const C=v.shared;return{open:(O,T)=>{const R=()=>{gr.hide(J),T()},F=ns(s1({name:"close-alert",text:"OK",primary:!0,buttonType:D.some("primary"),align:"end",enabled:!0,icon:D.none()},"cancel",v)),H=OT(),G=AT(R,C.providers),J=Ba(zT({lazySink:()=>C.getSink(),header:Y0(H,G),body:iR(O,C.providers),footer:D.some(lR(cR([],[F.asSpec()]))),onEscape:R,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Xe(Ip,R)],eventOrder:{}}));gr.show(J);const ae=F.get(J);Po.focus(ae)}}})(n.backstages.dialog),u=(v=>{const C=v.shared;return{open:(O,T)=>{const R=Y=>{gr.hide(ae),T(Y)},F=ns(s1({name:"yes",text:"Yes",primary:!0,buttonType:D.some("primary"),align:"end",enabled:!0,icon:D.none()},"submit",v)),H=s1({name:"no",text:"No",primary:!1,buttonType:D.some("secondary"),align:"end",enabled:!0,icon:D.none()},"cancel",v),G=OT(),J=AT(()=>R(!1),C.providers),ae=Ba(zT({lazySink:()=>C.getSink(),header:Y0(G,J),body:iR(O,C.providers),footer:D.some(lR(cR([],[H,F.asSpec()]))),onEscape:()=>R(!1),extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Xe(Ip,()=>R(!1)),Xe(y0,()=>R(!0))],eventOrder:{}}));gr.show(ae);const X=F.get(ae);Po.focus(X)}}})(n.backstages.dialog),f=(v,C)=>Mb.open((O,T,R)=>{const F=T,H=((G,J,ae)=>{const X=Xt("dialog"),Y=G.internalDialog,ne=uR(Y.title,X,ae),ie=so(Y.size),de=J0(ie.get()).toArray(),we=(($o,xn,Ls,Xs)=>{const on=sk($o,xn,D.none(),Ls,!1,Xs);return gr.parts.body(on)})({body:Y.body,initialData:Y.initialData},X,ae,$o=>e_(ro,$o)),ze=Q0(Y.buttons),tt=hR(ze),Je=nn(ze.length!==0,PT({buttons:ze},X,ae)),Ze=bR(()=>yo,mR(()=>Wt,ae.shared.providers,J),ae.shared.getSink),kt={id:X,header:ne,body:we,footer:Je,extraClasses:de,extraBehaviours:[uc.config({channel:`${Ug}-${X}`,updateState:($o,xn)=>(ie.set(xn.internalDialog.size),BT(xn.internalDialog.size,$o),D.some(xn)),initialData:G})],extraStyles:{}},Wt=gR(kt,Ze,ae),ro={getId:ue(X),getRoot:ue(Wt),getBody:()=>gr.getBody(Wt),getFooter:()=>gr.getFooter(Wt),getFormWrapper:()=>{const $o=gr.getBody(Wt);return In.getCurrent($o).getOr($o)},toggleFullscreen:()=>{pR(Wt,ie.get())}},yo=vR(ro,J.redial,tt);return{dialog:Wt,instanceApi:yo}})({dataValidator:R,initialData:F,internalDialog:O},{redial:Mb.redial,closeWindow:()=>{gr.hide(H.dialog),C(H.instanceApi)}},n.backstages.dialog);return gr.show(H.dialog),H.instanceApi.setData(F),H.instanceApi},v),p=(v,C,O,T)=>Mb.open((R,F,H)=>{const G=$T(F,H),J=Nn(),ae=n.backstages.popup.shared.header.isPositionedAtTop(),X=()=>J.on(ie=>{or.reposition(ie),i&&ae||Gs.refresh(ie)}),Y=_R({dataValidator:H,initialData:G,internalDialog:R},{redial:Mb.redial,closeWindow:()=>{J.on(or.hide),r.off("ResizeEditor",X),J.clear(),O(Y.instanceApi)}},n.backstages.popup,T.ariaAttrs,X),ne=Ba(or.sketch({lazySink:n.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:T.persistent?{event:"doNotDismissYet"}:{},...ae?{}:{fireRepositionEventInstead:{}},inlineBehaviours:xt([en("window-manager-inline-events",[Xe(Qu(),(ie,de)=>{Qo(Y.dialog,Ip)})]),...X6(r,i,ae)]),isExtraPart:(ie,de)=>xR(de)}));return J.set(ne),or.showWithinBounds(ne,$i(Y.dialog),{anchor:C},()=>{const ie=r.inline?za():Vt(r.getContainer()),de=vr(ie);return D.some(de)}),i&&ae||(Gs.refresh(ne),r.on("ResizeEditor",X)),Y.instanceApi.setData(G),po.focusIn(Y.dialog),Y.instanceApi},v),y=(v,C,O,T)=>Mb.open((R,F,H)=>{const G=$T(F,H),J=Nn(),ae=n.backstages.popup.shared.header.isPositionedAtTop(),X=()=>J.on(ie=>{or.reposition(ie),Gs.refresh(ie)}),Y=_R({dataValidator:H,initialData:G,internalDialog:R},{redial:Mb.redial,closeWindow:()=>{J.on(or.hide),r.off("ResizeEditor ScrollWindow ElementScroll",X),J.clear(),O(Y.instanceApi)}},n.backstages.popup,T.ariaAttrs,X),ne=Ba(or.sketch({lazySink:n.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:T.persistent?{event:"doNotDismissYet"}:{},...ae?{}:{fireRepositionEventInstead:{}},inlineBehaviours:xt([en("window-manager-inline-events",[Xe(Qu(),(ie,de)=>{Qo(Y.dialog,Ip)})]),Gs.config({contextual:{lazyContext:()=>D.some(vr(Vt(r.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top","bottom"],lazyViewport:ie=>Og(r,ie.element).map(de=>({bounds:zg(de),optScrollEnv:D.some({currentScrollTop:de.element.dom.scrollTop,scrollElmTop:Ye(de.element).top})})).getOrThunk(()=>({bounds:jr(),optScrollEnv:D.none()}))})]),isExtraPart:(ie,de)=>xR(de)}));return J.set(ne),or.showWithinBounds(ne,$i(Y.dialog),{anchor:C},()=>n.backstages.popup.shared.getSink().toOptional().bind(ie=>{const de=Og(r,ie.element).map(tt=>zg(tt)).getOr(jr()),we=vr(Vt(r.getContentAreaContainer())),ze=ql(we,de);return D.some(rn(ze.x,ze.y,ze.width,ze.height-15))})),Gs.refresh(ne),r.on("ResizeEditor ScrollWindow ElementScroll ResizeWindow",X),Y.instanceApi.setData(G),po.focusIn(Y.dialog),Y.instanceApi},v);return{open:(v,C,O)=>{if(!Ot(C)){if(C.inline==="toolbar")return p(v,n.backstages.popup.shared.anchors.inlineDialog(),O,C);if(C.inline==="bottom")return y(v,n.backstages.popup.shared.anchors.inlineBottomDialog(),O,C);if(C.inline==="cursor")return p(v,n.backstages.popup.shared.anchors.cursor(),O,C)}return f(v,O)},openUrl:(v,C)=>((O,T)=>Mb.openUrl(R=>{const F=Y6(R,{closeWindow:()=>{gr.hide(F.dialog),T(F.instanceApi)}},r,n.backstages.dialog);return gr.show(F.dialog),F.instanceApi},O))(v,C),alert:(v,C)=>{l.open(v,C)},close:v=>{v.close()},confirm:(v,C)=>{u.open(v,C)}}};du.add("silver",n=>{(y=>{TA(y),(v=>{const C=v.options.register,O=R=>Rt(R,te)?{value:yB(R),valid:!0}:{valid:!1,message:"Must be an array of strings."},T=R=>Bt(R)&&R>0?{value:R,valid:!0}:{valid:!1,message:"Must be a positive number."};C("color_map",{processor:O,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"]}),C("color_map_background",{processor:O}),C("color_map_foreground",{processor:O}),C("color_cols",{processor:T,default:Fx(v)}),C("color_cols_foreground",{processor:T,default:GO(v,kC)}),C("color_cols_background",{processor:T,default:GO(v,CC)}),C("custom_colors",{processor:"boolean",default:!0}),C("color_default_foreground",{processor:"string",default:u0}),C("color_default_background",{processor:"string",default:u0})})(y),(v=>{const C=v.options.register;C("contextmenu_avoid_overlap",{processor:"string",default:""}),C("contextmenu_never_use_native",{processor:"boolean",default:!1}),C("contextmenu",{processor:O=>O===!1?{value:[],valid:!0}:te(O)||Rt(O,te)?{value:UN(O),valid:!0}:{valid:!1,message:"Must be false or a string."},default:"link linkchecker image editimage table spellchecker configurepermanentpen"})})(y)})(n);let r=()=>jr();const{dialogs:i,popups:l,renderUI:u}=a6(n,{getPopupSinkBounds:()=>r()});p3(n,l.backstage.shared);const f=J6({editor:n,backstages:{popup:l.backstage,dialog:i.backstage}}),p=Nn();return{renderUI:()=>{const y=u();return Og(n,l.getMothership().element).each(v=>{r=()=>zg(v)}),y},getWindowManagerImpl:ue(f),getNotificationManagerImpl:()=>eO(n,{backstage:l.backstage},l.getMothership(),p)}})})();(function(){var w=tinymce.util.Tools.resolve("tinymce.ModelManager");const g=m=>b=>(x=>{const A=typeof x;return x===null?"null":A==="object"&&Array.isArray(x)?"array":A==="object"&&(M=L=x,(U=String).prototype.isPrototypeOf(M)||((K=L.constructor)===null||K===void 0?void 0:K.name)===U.name)?"string":A;var M,L,U,K})(b)===m,S=m=>b=>typeof b===m,B=m=>b=>m===b,W=g("string"),te=g("object"),ce=g("array"),Ee=B(null),$e=S("boolean"),We=B(void 0),Me=m=>!(b=>b==null)(m),Ot=S("function"),mo=S("number"),st=()=>{},ut=m=>()=>m,Bt=m=>m,Rt=(m,b)=>m===b;function Ke(m,...b){return(...x)=>{const A=b.concat(x);return m.apply(null,A)}}const Ut=m=>b=>!m(b),ft=m=>m(),ue=ut(!1),Ct=ut(!0);class ve{constructor(b,x){this.tag=b,this.value=x}static some(b){return new ve(!0,b)}static none(){return ve.singletonNone}fold(b,x){return this.tag?x(this.value):b()}isSome(){return this.tag}isNone(){return!this.tag}map(b){return this.tag?ve.some(b(this.value)):ve.none()}bind(b){return this.tag?b(this.value):ve.none()}exists(b){return this.tag&&b(this.value)}forall(b){return!this.tag||b(this.value)}filter(b){return!this.tag||b(this.value)?this:ve.none()}getOr(b){return this.tag?this.value:b}or(b){return this.tag?this:b}getOrThunk(b){return this.tag?this.value:b()}orThunk(b){return this.tag?this:b()}getOrDie(b){if(this.tag)return this.value;throw new Error(b??"Called getOrDie on None")}static from(b){return Me(b)?ve.some(b):ve.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(b){this.tag&&b(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}ve.singletonNone=new ve(!1);const ot=Array.prototype.slice,bn=Array.prototype.indexOf,ln=Array.prototype.push,uo=(m,b)=>{return x=m,A=b,bn.call(x,A)>-1;var x,A},Fe=(m,b)=>{for(let x=0,A=m.length;x{const x=[];for(let A=0;A{const x=m.length,A=new Array(x);for(let M=0;M{for(let x=0,A=m.length;x{const x=[],A=[];for(let M=0,L=m.length;M{const x=[];for(let A=0,M=m.length;A(((A,M)=>{for(let L=A.length-1;L>=0;L--)M(A[L],L)})(m,(A,M)=>{x=b(x,A,M)}),x),Ge=(m,b,x)=>(bt(m,(A,M)=>{x=b(x,A,M)}),x),To=(m,b)=>((x,A,M)=>{for(let L=0,U=x.length;L{for(let x=0,A=m.length;x{const b=[];for(let x=0,A=m.length;x$t(D(m,b)),Ht=(m,b)=>{for(let x=0,A=m.length;x{const x={};for(let A=0,M=m.length;Ab>=0&&bcn(m,0),zo=m=>cn(m,m.length-1),j=(m,b)=>{for(let x=0;x{const x=Fr(m);for(let A=0,M=x.length;Aqi(m,(x,A)=>({k:A,v:b(x,A)})),qi=(m,b)=>{const x={};return Sn(m,(A,M)=>{const L=b(A,M);x[L.k]=L.v}),x},mn=(m,b)=>{const x=[];return Sn(m,(A,M)=>{x.push(b(A,M))}),x},Bn=m=>mn(m,Bt),dn=(m,b)=>Cs.call(m,b),Le=typeof window<"u"?window:Function("return this;")(),Lt=(m,b)=>((x,A)=>{let M=A??Le;for(let L=0;L{const b=Lt("ownerDocument.defaultView",m);return te(m)&&((x=>((A,M)=>{const L=((U,K)=>Lt(U,K))(A,M);if(L==null)throw new Error(A+" not available on this browser");return L})("HTMLElement",x))(b).prototype.isPrototypeOf(m)||/^HTML\w*Element$/.test(yt(m).constructor.name))},ao=m=>m.dom.nodeName.toLowerCase(),ko=m=>m.dom.nodeType,tn=m=>b=>ko(b)===m,On=m=>ko(m)===8||ao(m)==="#comment",rs=m=>Zn(m)&&rt(m.dom),Zn=tn(1),Ln=tn(3),Hs=tn(9),sa=tn(11),os=m=>b=>Zn(b)&&ao(b)===m,Is=(m,b,x)=>{if(!(W(x)||$e(x)||mo(x)))throw console.error("Invalid call to Attribute.set. Key ",b,":: Value ",x,":: Element ",m),new Error("Attribute value was not simple");m.setAttribute(b,x+"")},yn=(m,b,x)=>{Is(m.dom,b,x)},ra=(m,b)=>{const x=m.dom;Sn(b,(A,M)=>{Is(x,M,A)})},St=(m,b)=>{const x=m.dom.getAttribute(b);return x===null?void 0:x},Vo=(m,b)=>ve.from(St(m,b)),an=(m,b)=>{m.dom.removeAttribute(b)},Kr=m=>Ge(m.dom.attributes,(b,x)=>(b[x.name]=x.value,b),{}),yi=m=>{if(m==null)throw new Error("Node cannot be null or undefined");return{dom:m}},vt={fromHtml:(m,b)=>{const x=(b||document).createElement("div");if(x.innerHTML=m,!x.hasChildNodes()||x.childNodes.length>1){const A="HTML does not have a single root node";throw console.error(A,m),new Error(A)}return yi(x.childNodes[0])},fromTag:(m,b)=>{const x=(b||document).createElement(m);return yi(x)},fromText:(m,b)=>{const x=(b||document).createTextNode(m);return yi(x)},fromDom:yi,fromPoint:(m,b,x)=>ve.from(m.dom.elementFromPoint(b,x)).map(yi)},oi=(m,b)=>{const x=m.dom;if(x.nodeType!==1)return!1;{const A=x;if(A.matches!==void 0)return A.matches(b);if(A.msMatchesSelector!==void 0)return A.msMatchesSelector(b);if(A.webkitMatchesSelector!==void 0)return A.webkitMatchesSelector(b);if(A.mozMatchesSelector!==void 0)return A.mozMatchesSelector(b);throw new Error("Browser lacks native selectors")}},nn=m=>m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11||m.childElementCount===0,Mi=(m,b)=>{const x=b===void 0?document:b.dom;return nn(x)?ve.none():ve.from(x.querySelector(m)).map(vt.fromDom)},as=(m,b)=>m.dom===b.dom,hr=(m,b)=>{const x=m.dom,A=b.dom;return x!==A&&x.contains(A)},yl=oi,cl=m=>vt.fromDom(m.dom.ownerDocument),Bi=m=>Hs(m)?m:cl(m),vi=m=>ve.from(m.dom.parentNode).map(vt.fromDom),vl=m=>ve.from(m.dom.parentElement).map(vt.fromDom),Gn=(m,b)=>{const x=Ot(b)?b:ue;let A=m.dom;const M=[];for(;A.parentNode!==null&&A.parentNode!==void 0;){const L=A.parentNode,U=vt.fromDom(L);if(M.push(U),x(U)===!0)break;A=L}return M},Ro=m=>ve.from(m.dom.previousSibling).map(vt.fromDom),$a=m=>ve.from(m.dom.nextSibling).map(vt.fromDom),$r=m=>D(m.dom.childNodes,vt.fromDom),bd=(m,b)=>{const x=m.dom.childNodes;return ve.from(x[b]).map(vt.fromDom)},Vt=(m,b)=>{vi(m).each(x=>{x.dom.insertBefore(b.dom,m.dom)})},Dr=(m,b)=>{$a(m).fold(()=>{vi(m).each(x=>{zs(x,b)})},x=>{Vt(x,b)})},au=(m,b)=>{(A=>bd(A,0))(m).fold(()=>{zs(m,b)},A=>{m.dom.insertBefore(b.dom,A.dom)})},zs=(m,b)=>{m.dom.appendChild(b.dom)},yd=(m,b)=>{Vt(m,b),zs(b,m)},ni=(m,b)=>{bt(b,(x,A)=>{const M=A===0?m:b[A-1];Dr(M,x)})},Ki=(m,b)=>{bt(b,x=>{zs(m,x)})},_i=m=>{m.dom.textContent="",bt($r(m),b=>{ys(b)})},ys=m=>{const b=m.dom;b.parentNode!==null&&b.parentNode.removeChild(b)},ga=m=>{const b=$r(m);b.length>0&&ni(m,b),ys(m)},si=(m,b)=>vt.fromDom(m.dom.cloneNode(b)),iu=m=>si(m,!1),gc=m=>si(m,!0),xi=(m,b)=>{const x=vt.fromTag(b),A=Kr(m);return ra(x,A),x},lu=["tfoot","thead","tbody","colgroup"],Wc=(m,b,x)=>({element:m,rowspan:b,colspan:x}),Hn=(m,b,x)=>({element:m,cells:b,section:x}),lr=(m,b,x)=>({element:m,isNew:b,isLocked:x}),ha=(m,b,x,A)=>({element:m,cells:b,section:x,isNew:A}),Zu=m=>vt.fromDom(m.dom.host),Gi=m=>{const b=Ln(m)?m.dom.parentNode:m.dom;if(b==null||b.ownerDocument===null)return!1;const x=b.ownerDocument;return(L=>{const U=(re=>vt.fromDom(re.dom.getRootNode()))(L);return sa(K=U)&&Me(K.dom.host)?ve.some(U):ve.none();var K})(vt.fromDom(b)).fold(()=>x.body.contains(b),(A=Gi,M=Zu,L=>A(M(L))));var A,M},vd=m=>{const b=m.dom.body;if(b==null)throw new Error("Body is not available yet");return vt.fromDom(b)},Hr=(m,b)=>{let x=[];return bt($r(m),A=>{b(A)&&(x=x.concat([A])),x=x.concat(Hr(A,b))}),x},ba=(m,b,x)=>((A,M,L)=>Kt(Gn(A,L),U=>oi(U,b)))(m,0,x),wi=(m,b)=>((x,A)=>Kt($r(x),M=>oi(M,b)))(m),Yn=(m,b)=>((x,A)=>{const M=A===void 0?document:A.dom;return nn(M)?[]:D(M.querySelectorAll(x),vt.fromDom)})(b,m);var vs=(m,b,x,A,M)=>m(x,A)?ve.some(x):Ot(M)&&M(x)?ve.none():b(x,A,M);const Yi=(m,b,x)=>{let A=m.dom;const M=Ot(x)?x:ue;for(;A.parentNode;){A=A.parentNode;const L=vt.fromDom(A);if(b(L))return ve.some(L);if(M(L))break}return ve.none()},hc=(m,b,x)=>vs((A,M)=>M(A),Yi,m,b,x),br=(m,b,x)=>Yi(m,A=>oi(A,b),x),_l=(m,b)=>((x,A)=>To(x.dom.childNodes,M=>{return L=vt.fromDom(M),oi(L,b);var L}).map(vt.fromDom))(m),Vs=(m,b)=>Mi(b,m),Pn=(m,b,x)=>vs((A,M)=>oi(A,M),br,m,b,x),ki=(m,b,x=Rt)=>m.exists(A=>x(A,b)),Oa=m=>{const b=[],x=A=>{b.push(A)};for(let A=0;Am?ve.some(b):ve.none(),za=(m,b,x)=>b===""||m.length>=b.length&&m.substr(x,x+b.length)===b,Qs=(m,b,x=0,A)=>{const M=m.indexOf(b,x);return M!==-1&&(!!We(A)||M+b.length<=A)},_d=(m,b)=>za(m,b,0),wo=(m,b)=>za(m,b,m.length-b.length),xl=(m=>b=>b.replace(m,""))(/^\s+|\s+$/g),yr=m=>m.length>0,Fs=m=>m.style!==void 0&&Ot(m.style.getPropertyValue),qc=(m,b,x)=>{if(!W(x))throw console.error("Invalid call to CSS.set. Property ",b,":: Value ",x,":: Element ",m),new Error("CSS value must be a string: "+x);Fs(m)&&m.style.setProperty(b,x)},pn=(m,b,x)=>{const A=m.dom;qc(A,b,x)},Vl=(m,b)=>{const x=m.dom;Sn(b,(A,M)=>{qc(x,M,A)})},ya=(m,b)=>{const x=m.dom,A=window.getComputedStyle(x).getPropertyValue(b);return A!==""||Gi(m)?A:Mo(x,b)},Mo=(m,b)=>Fs(m)?m.style.getPropertyValue(b):"",Li=(m,b)=>{const x=m.dom,A=Mo(x,b);return ve.from(A).filter(M=>M.length>0)},ri=(m,b)=>{((x,A)=>{Fs(x)&&x.style.removeProperty(A)})(m.dom,b),ki(Vo(m,"style").map(xl),"")&&an(m,"style")},Ns=(m,b,x=0)=>Vo(m,b).map(A=>parseInt(A,10)).getOr(x),jl=(m,b)=>Ns(m,b,1),er=m=>os("col")(m)?Ns(m,"span",1)>1:jl(m,"colspan")>1,bc=(m,b)=>parseInt(ya(m,b),10),Gr=ut(10),Vn=ut(10),wl=(m,b)=>Kc(m,b,Ct),Kc=(m,b,x)=>pt($r(m),A=>oi(A,b)?x(A)?[A]:[]:Kc(A,b,x)),xd=(m,b)=>((x,A,M=ue)=>M(A)?ve.none():uo(x,ao(A))?ve.some(A):br(A,x.join(","),L=>oi(L,"table")||M(L)))(["td","th"],m,b),Ds=m=>wl(m,"th,td"),Na=m=>oi(m,"colgroup")?wi(m,"col"):pt(Ae(m),b=>wi(b,"col")),Q=(m,b)=>Pn(m,"table",b),pe=m=>wl(m,"tr"),Ae=m=>Q(m).fold(ut([]),b=>wi(b,"colgroup")),Ye=(m,b)=>D(m,x=>{if(ao(x)==="colgroup"){const A=D(Na(x),M=>{const L=Ns(M,"span",1);return Wc(M,1,L)});return Hn(x,A,"colgroup")}{const A=D(Ds(x),M=>{const L=Ns(M,"rowspan",1),U=Ns(M,"colspan",1);return Wc(M,L,U)});return Hn(x,A,b(x))}}),_t=m=>vi(m).map(b=>{const x=ao(b);return(A=>uo(lu,A))(x)?x:"tbody"}).getOr("tbody"),oo=m=>{const b=pe(m),x=[...Ae(m),...b];return Ye(x,_t)},Go=m=>{let b,x=!1;return(...A)=>(x||(x=!0,b=m.apply(null,A)),b)},Xn=()=>sn(0,0),sn=(m,b)=>({major:m,minor:b}),is={nu:sn,detect:(m,b)=>{const x=String(b).toLowerCase();return m.length===0?Xn():((A,M)=>{const L=((K,re)=>{for(let he=0;heNumber(M.replace(L,"$"+K));return sn(U(1),U(2))})(m,x)},unknown:Xn},tr=(m,b)=>{const x=String(b).toLowerCase();return To(m,A=>A.search(x))},Jo=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,dl=m=>b=>Qs(b,m),Ul=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:m=>Qs(m,"edge/")&&Qs(m,"chrome")&&Qs(m,"safari")&&Qs(m,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Jo],search:m=>Qs(m,"chrome")&&!Qs(m,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:m=>Qs(m,"msie")||Qs(m,"trident")},{name:"Opera",versionRegexes:[Jo,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:dl("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:dl("firefox")},{name:"Safari",versionRegexes:[Jo,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:m=>(Qs(m,"safari")||Qs(m,"mobile/"))&&Qs(m,"applewebkit")}],yc=[{name:"Windows",search:dl("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:m=>Qs(m,"iphone")||Qs(m,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:dl("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:dl("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:dl("linux"),versionRegexes:[]},{name:"Solaris",search:dl("sunos"),versionRegexes:[]},{name:"FreeBSD",search:dl("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:dl("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Qm={browsers:ut(Ul),oses:ut(yc)},lh="Edge",Pi="Chromium",ep="Opera",ch="Firefox",$f="Safari",tg=m=>{const b=m.current,x=m.version,A=M=>()=>b===M;return{current:b,version:x,isEdge:A(lh),isChromium:A(Pi),isIE:A("IE"),isOpera:A(ep),isFirefox:A(ch),isSafari:A($f)}},zt=()=>tg({current:void 0,version:is.unknown()}),wd=tg,kd="Windows",Hf="Android",va="Linux",Cd="macOS",cu="Solaris",dh="FreeBSD",og="ChromeOS",ng=m=>{const b=m.current,x=m.version,A=M=>()=>b===M;return{current:b,version:x,isWindows:A(kd),isiOS:A("iOS"),isAndroid:A(Hf),isMacOS:A(Cd),isLinux:A(va),isSolaris:A(cu),isFreeBSD:A(dh),isChromeOS:A(og)}},Zb=()=>ng({current:void 0,version:is.unknown()}),uh=ng,Wb=m=>window.matchMedia(m).matches;let Vf=Go(()=>((m,b,x)=>{const A=Qm.browsers(),M=Qm.oses(),L=b.bind(re=>((he,Se)=>j(Se.brands,me=>{const be=me.brand.toLowerCase();return To(he,_e=>{var De;return be===((De=_e.brand)===null||De===void 0?void 0:De.toLowerCase())}).map(_e=>({current:_e.name,version:is.nu(parseInt(me.version,10),0)}))}))(A,re)).orThunk(()=>((re,he)=>tr(re,he).map(Se=>{const me=is.detect(Se.versionRegexes,he);return{current:Se.name,version:me}}))(A,m)).fold(zt,wd),U=((re,he)=>tr(re,he).map(Se=>{const me=is.detect(Se.versionRegexes,he);return{current:Se.name,version:me}}))(M,m).fold(Zb,uh),K=((re,he,Se,me)=>{const be=re.isiOS()&&/ipad/i.test(Se)===!0,_e=re.isiOS()&&!be,De=re.isiOS()||re.isAndroid(),Re=De||me("(pointer:coarse)"),lt=be||!_e&&De&&me("(min-device-width:768px)"),ct=_e||De&&!lt,it=he.isSafari()&&re.isiOS()&&/safari/i.test(Se)===!1,gt=!ct&&!lt&&!it;return{isiPad:ut(be),isiPhone:ut(_e),isTablet:ut(lt),isPhone:ut(ct),isTouch:ut(Re),isAndroid:re.isAndroid,isiOS:re.isiOS,isWebView:ut(it),isDesktop:ut(gt)}})(U,L,m,x);return{browser:L,os:U,deviceType:K}})(window.navigator.userAgent,ve.from(window.navigator.userAgentData),Wb));const Zl=()=>Vf(),Gc=(m,b)=>{const x=M=>{const L=b(M);if(L<=0||L===null){const U=ya(M,m);return parseFloat(U)||0}return L},A=(M,L)=>Ge(L,(U,K)=>{const re=ya(M,K),he=re===void 0?0:parseInt(re,10);return isNaN(he)?U:U+he},0);return{set:(M,L)=>{if(!mo(L)&&!L.match(/^[0-9]+$/))throw new Error(m+".set accepts only positive integer values. Value was "+L);const U=M.dom;Fs(U)&&(U.style[m]=L+"px")},get:x,getOuter:x,aggregate:A,max:(M,L,U)=>{const K=A(M,U);return L>K?L-K:0}}},Wl=(m,b,x)=>((A,M)=>(L=>{const U=parseFloat(L);return isNaN(U)?ve.none():ve.some(U)})(A).getOr(M))(ya(m,b),x),Yr=Gc("width",m=>m.dom.offsetWidth),Ci=m=>Yr.get(m),Sd=m=>Yr.getOuter(m),En=m=>((b,x)=>{const A=b.dom,M=A.getBoundingClientRect().width||A.offsetWidth;return x==="border-box"?M:((L,U,K,re)=>U-Wl(L,`padding-${K}`,0)-Wl(L,`padding-${re}`,0)-Wl(L,`border-${K}-width`,0)-Wl(L,`border-${re}-width`,0))(b,M,"left","right")})(m,"content-box"),kl=(m,b,x)=>{const A=m.cells,M=A.slice(0,b),L=A.slice(b),U=M.concat(x).concat(L);return ai(m,U)},Wu=(m,b,x)=>kl(m,b,[x]),qu=(m,b,x)=>{m.cells[b]=x},ai=(m,b)=>ha(m.element,b,m.section,m.isNew),cr=(m,b)=>m.cells[b],Rs=(m,b)=>cr(m,b).element,aa=m=>m.cells.length,_s=m=>{const b=dt(m,x=>x.section==="colgroup");return{rows:b.fail,cols:b.pass}},Ed=(m,b,x)=>{const A=D(m.cells,x);return ha(b(m.element),A,m.section,!0)},Td="data-snooker-locked-cols",Rr=m=>Vo(m,Td).bind(b=>ve.from(b.match(/\d+/g))).map(b=>ks(b,Ct)),Ha=m=>{const b=Ge(_s(m).rows,(A,M)=>(bt(M.cells,(L,U)=>{L.isLocked&&(A[U]=!0)}),A),{}),x=mn(b,(A,M)=>parseInt(M,10));return((A,M)=>{const L=ot.call(A,0);return L.sort(void 0),L})(x)},Da=(m,b)=>m+","+b,Sr=(m,b)=>{const x=pt(m.all,A=>A.cells);return Kt(x,b)},Yc=m=>{const b={},x=[],A=fn(m).map(be=>be.element).bind(Q).bind(Rr).getOr({});let M=0,L=0,U=0;const{pass:K,fail:re}=dt(m,be=>be.section==="colgroup");bt(re,be=>{const _e=[];bt(be.cells,De=>{let Re=0;for(;b[Da(U,Re)]!==void 0;)Re++;const lt=((it,gt)=>dn(it,gt)&&it[gt]!==void 0&&it[gt]!==null)(A,Re.toString()),ct=((it,gt,Nt,Pt,Be,Jt)=>({element:it,rowspan:gt,colspan:Nt,row:Pt,column:Be,isLocked:Jt}))(De.element,De.rowspan,De.colspan,U,Re,lt);for(let it=0;it{const _e=(Re=>{const lt={};let ct=0;return bt(Re.cells,it=>{const gt=it.colspan;Gt(gt,Nt=>{const Pt=ct+Nt;lt[Pt]=((Be,Jt,Ao)=>({element:Be,colspan:Jt,column:Ao}))(it.element,gt,Pt)}),ct+=gt}),lt})(be);return{colgroups:[((Re,lt)=>({element:Re,columns:lt}))(be.element,Bn(_e))],columns:_e}}).getOrThunk(()=>({colgroups:[],columns:{}}));return{grid:((be,_e)=>({rows:be,columns:_e}))(M,L),access:b,all:x,columns:he,colgroups:Se}},rn=m=>{const b=oo(m);return Yc(b)},vr=Yc,Va=(m,b,x)=>ve.from(m.access[Da(b,x)]),ql=(m,b,x)=>{const A=Sr(m,M=>x(b,M.element));return A.length>0?ve.some(A[0]):ve.none()},jr=Sr,so=m=>pt(m.all,b=>b.cells),Cl=m=>Bn(m.columns),Sl=m=>Fr(m.columns).length>0,Nn=(m,b)=>ve.from(m.columns[b]),du=(m,b=Ct)=>{const x=m.grid,A=Gt(x.columns,Bt),M=Gt(x.rows,Bt);return D(A,L=>tp(()=>pt(M,U=>Va(m,U,L).filter(K=>K.column===L).toArray()),U=>U.colspan===1&&b(U.element),()=>Va(m,0,L)))},tp=(m,b,x)=>{const A=m();return To(A,b).orThunk(()=>ve.from(A[0]).orThunk(x)).map(M=>M.element)},Kl=m=>{const b=m.grid,x=Gt(b.rows,Bt),A=Gt(b.columns,Bt);return D(x,M=>tp(()=>pt(A,L=>Va(m,M,L).filter(U=>U.row===M).fold(ut([]),U=>[U])),L=>L.rowspan===1,()=>Va(m,M,0)))},un=(m,b)=>x=>Ra(x)==="rtl"?b:m,Ra=m=>ya(m,"direction")==="rtl"?"rtl":"ltr",Ku=Gc("height",m=>{const b=m.dom;return Gi(m)?b.getBoundingClientRect().height:b.offsetHeight}),vc=m=>Ku.get(m),jf=m=>Ku.getOuter(m),El=(m,b)=>({left:m,top:b,translate:(x,A)=>El(m+x,b+A)}),ja=El,Gl=(m,b)=>m!==void 0?m:b!==void 0?b:0,Ad=m=>{const b=m.dom.ownerDocument,x=b.body,A=b.defaultView,M=b.documentElement;if(x===m.dom)return ja(x.offsetLeft,x.offsetTop);const L=Gl(A==null?void 0:A.pageYOffset,M.scrollTop),U=Gl(A==null?void 0:A.pageXOffset,M.scrollLeft),K=Gl(M.clientTop,x.clientTop),re=Gl(M.clientLeft,x.clientLeft);return ye(m).translate(U-re,L-K)},ye=m=>{const b=m.dom,x=b.ownerDocument.body;return x===b?ja(x.offsetLeft,x.offsetTop):Gi(m)?(A=>{const M=A.getBoundingClientRect();return ja(M.left,M.top)})(b):ja(0,0)},uu=(m,b)=>({row:m,y:b}),ls=(m,b)=>({col:m,x:b}),op=m=>Ad(m).left+Sd(m),Gu=m=>Ad(m).left,ul=(m,b)=>ls(m,Gu(b)),kn=(m,b)=>ls(m,op(b)),_a=m=>Ad(m).top,Xi=(m,b)=>uu(m,_a(b)),fl=(m,b)=>uu(m,_a(b)+jf(b)),Yl=(m,b,x)=>{if(x.length===0)return[];const A=D(x.slice(1),(L,U)=>L.map(K=>m(U,K))),M=x[x.length-1].map(L=>b(x.length-1,L));return A.concat([M])},_c={delta:Bt,positions:m=>Yl(Xi,fl,m),edge:_a},ia=un({delta:Bt,edge:Gu,positions:m=>Yl(ul,kn,m)},{delta:m=>-m,edge:op,positions:m=>Yl(kn,ul,m)}),Od={delta:(m,b)=>ia(b).delta(m,b),positions:(m,b)=>ia(b).positions(m,b),edge:m=>ia(m).edge(m)},Yu={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:[""]},Uf=(()=>{const m="[0-9]+",b="[eE][+-]?"+m,x=M=>`(?:${M})?`,A=["Infinity",m+"\\."+x(m)+x(b),"\\."+m+x(b),m+x(b)].join("|");return new RegExp(`^([+-]?(?:${A}))(.*)$`)})(),Ur=/(\d+(\.\d+)?)%/,ho=/(\d+(\.\d+)?)px|em/,xc=os("col"),fu=os("tr"),xa=(m,b,x)=>{const A=vl(m).getOrThunk(()=>vd(cl(m)));return b(m)/x(A)*100},wc=(m,b)=>{pn(m,"width",b+"px")},Ii=(m,b)=>{pn(m,"width",b+"%")},kc=(m,b)=>{pn(m,"height",b+"px")},Xc=m=>{const b=(x=>{return Wl(A=x,"height",A.dom.offsetHeight)+"px";var A})(m);return b?((x,A,M,L)=>{const U=parseFloat(x);return wo(x,"%")&&ao(A)!=="table"?((K,re,he,Se)=>{const me=Q(K).map(be=>{const _e=he(be);return Math.floor(re/100*_e)}).getOr(re);return Se(K,me),me})(A,U,M,L):U})(b,m,vc,kc):vc(m)},Zr=(m,b)=>Li(m,b).orThunk(()=>Vo(m,b).map(x=>x+"px")),ml=m=>Zr(m,"width"),Xl=m=>xa(m,Ci,En),mu=m=>{return xc(m)?Ci(m):Wl(b=m,"width",b.dom.offsetWidth);var b},sg=m=>fu(m)?vc(m):((b,x,A)=>A(b)/jl(b,"rowspan"))(m,0,Xc),Cc=(m,b,x)=>{pn(m,"width",b+x)},zd=m=>xa(m,Ci,En)+"%",Xu=ut(Ur),Ms=os("col"),Ua=m=>ml(m).getOrThunk(()=>mu(m)+"px"),la=m=>{return(b=m,Zr(b,"height")).getOrThunk(()=>sg(m)+"px");var b},ii=(m,b,x,A,M,L)=>m.filter(A).fold(()=>L(((U,K)=>{if(K<0||K>=U.length-1)return ve.none();const re=U[K].fold(()=>{const Se=(me=>{const be=ot.call(me,0);return be.reverse(),be})(U.slice(0,K));return j(Se,(me,be)=>me.map(_e=>({value:_e,delta:be+1})))},Se=>ve.some({value:Se,delta:0})),he=U[K+1].fold(()=>{const Se=U.slice(K+1);return j(Se,(me,be)=>me.map(_e=>({value:_e,delta:be+1})))},Se=>ve.some({value:Se,delta:1}));return re.bind(Se=>he.map(me=>{const be=me.delta+Se.delta;return Math.abs(me.value-Se.value)/be}))})(x,b)),U=>M(U)),_r=(m,b,x,A)=>{const M=du(m),L=Sl(m)?(re=>D(Cl(re),he=>ve.from(he.element)))(m):M,U=[ve.some(Od.edge(b))].concat(D(Od.positions(M,b),re=>re.map(he=>he.x))),K=Ut(er);return D(L,(re,he)=>ii(re,he,U,K,Se=>{if((be=>{const _e=Zl().browser,De=_e.isChromium()||_e.isFirefox();return!Ms(be)||De})(Se))return x(Se);{const be=(me=M[he])!=null?Bt(me):ve.none();return ii(be,he,U,K,_e=>A(ve.some(Ci(_e))),A)}var me},A))},Zf=m=>m.map(b=>b+"px").getOr(""),dr=(m,b,x)=>_r(m,b,mu,A=>A.getOrThunk(x.minCellWidth)),ca=(m,b,x,A)=>{const M=Kl(m),L=D(m.all,K=>ve.some(K.element)),U=[ve.some(_c.edge(b))].concat(D(_c.positions(M,b),K=>K.map(re=>re.y)));return D(L,(K,re)=>ii(K,re,U,Ct,x,A))},Tl=(m,b)=>()=>Gi(m)?b(m):parseFloat(Li(m,"width").getOr("0")),nt=m=>{const b=Tl(m,A=>parseFloat(zd(A))),x=Tl(m,Ci);return{width:b,pixelWidth:x,getWidths:(A,M)=>((L,U,K)=>_r(L,U,Xl,re=>re.fold(()=>K.minCellWidth(),he=>he/K.pixelWidth()*100)))(A,m,M),getCellDelta:A=>A/x()*100,singleColumnWidth:(A,M)=>[100-A],minCellWidth:()=>Gr()/x()*100,setElementWidth:Ii,adjustTableWidth:A=>{const M=b();Ii(m,M+A/100*M)},isRelative:!0,label:"percent"}},Xr=m=>{const b=Tl(m,Ci);return{width:b,pixelWidth:b,getWidths:(x,A)=>dr(x,m,A),getCellDelta:Bt,singleColumnWidth:(x,A)=>[Math.max(Gr(),x+A)-x],minCellWidth:Gr,setElementWidth:wc,adjustTableWidth:x=>{const A=b()+x;wc(m,A)},isRelative:!1,label:"pixel"}},pu=m=>ml(m).fold(()=>(b=>{const x=Tl(b,Ci),A=ut(0);return{width:x,pixelWidth:x,getWidths:(M,L)=>dr(M,b,L),getCellDelta:A,singleColumnWidth:ut([0]),minCellWidth:A,setElementWidth:st,adjustTableWidth:st,isRelative:!0,label:"none"}})(m),b=>((x,A)=>Xu().exec(A)!==null?nt(x):Xr(x))(m,b)),js=Xr,Al=nt,Za=(m,b,x)=>{const A=m[x].element,M=vt.fromTag("td");zs(M,vt.fromTag("br")),(b?zs:au)(A,M)},Ol=((m,b)=>{const x=A=>m(A)?ve.from(A.dom.nodeValue):ve.none();return{get:A=>{if(!m(A))throw new Error("Can only get text value of a text node");return x(A).getOr("")},getOption:x,set:(A,M)=>{if(!m(A))throw new Error("Can only set raw text value of a text node");A.dom.nodeValue=M}}})(Ln),gu=m=>Ol.get(m),li=m=>Ol.getOption(m),vn=(m,b)=>Ol.set(m,b),ur=m=>ao(m)==="img"?1:li(m).fold(()=>$r(m).length,b=>b.length),Sc=["img","br"],Us=m=>li(m).filter(b=>b.trim().length!==0||b.indexOf(" ")>-1).isSome()||uo(Sc,ao(m))||(b=>rs(b)&&St(b,"contenteditable")==="false")(m),Ju=m=>((b,x)=>{const A=M=>{for(let L=0;Lnp(m,Us),np=(m,b)=>{const x=A=>{const M=$r(A);for(let L=M.length-1;L>=0;L--){const U=M[L];if(b(U))return ve.some(U);const K=x(U);if(K.isSome())return K}return ve.none()};return x(m)},Zs={scope:["row","col"]},Ne=m=>()=>{const b=vt.fromTag("td",m.dom);return zs(b,vt.fromTag("br",m.dom)),b},Wa=m=>()=>vt.fromTag("col",m.dom),fr=m=>()=>vt.fromTag("colgroup",m.dom),Si=m=>()=>vt.fromTag("tr",m.dom),zl=(m,b,x)=>{const A=((M,L)=>{const U=xi(M,L),K=$r(gc(M));return Ki(U,K),U})(m,b);return Sn(x,(M,L)=>{M===null?an(A,L):yn(A,L,M)}),A},xr=m=>m,xs=(m,b,x)=>{const A=(M,L)=>{((U,K)=>{const re=U.dom,he=K.dom;Fs(re)&&Fs(he)&&(he.style.cssText=re.style.cssText)})(M.element,L),ri(L,"height"),M.colspan!==1&&ri(L,"width")};return{col:M=>{const L=vt.fromTag(ao(M.element),b.dom);return A(M,L),m(M.element,L),L},colgroup:fr(b),row:Si(b),cell:M=>{const L=vt.fromTag(ao(M.element),b.dom),U=x.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),K=U.length>0?((re,he,Se)=>Ju(re).map(me=>{const be=Se.join(","),_e=ba(me,be,De=>as(De,re));return qo(_e,(De,Re)=>{const lt=iu(Re);return zs(De,lt),lt},he)}).getOr(he))(M.element,L,U):L;return zs(K,vt.fromTag("br")),A(M,L),((re,he)=>{Sn(Zs,(Se,me)=>Vo(re,me).filter(be=>uo(Se,be)).each(be=>yn(he,me,be)))})(M.element,L),m(M.element,L),L},replace:zl,colGap:Wa(b),gap:Ne(b)}},Jn=m=>({col:Wa(m),colgroup:fr(m),row:Si(m),cell:Ne(m),replace:xr,colGap:Wa(m),gap:Ne(m)}),wa=m=>b=>b.options.get(m),Ei="100%",ci=m=>{var b;const x=m.dom,A=(b=x.getParent(m.selection.getStart(),x.isBlock))!==null&&b!==void 0?b:m.getBody();return En(vt.fromDom(A))+"px"},Ji=m=>ve.from(m.options.get("table_clone_elements")),Ql=wa("table_header_type"),Ec=wa("table_column_resizing"),Jc=m=>Ec(m)==="preservetable",Wf=m=>Ec(m)==="resizetable",qf=wa("table_sizing_mode"),Tc=m=>qf(m)==="relative",E=m=>qf(m)==="fixed",P=m=>qf(m)==="responsive",q=wa("table_resize_bars"),ge=wa("table_style_by_css"),xe=wa("table_merge_content_on_paste"),at=m=>{const b=m.options,x=b.get("table_default_attributes");return b.isSet("table_default_attributes")?x:((A,M)=>P(A)||ge(A)?M:E(A)?{...M,width:ci(A)}:{...M,width:Ei})(m,x)},xo=wa("table_use_colgroups"),Uo=m=>Pn(m,"[contenteditable]"),Bo=(m,b=!1)=>Gi(m)?m.dom.isContentEditable:Uo(m).fold(ut(b),x=>io(x)==="true"),io=m=>m.dom.contentEditable,Wn=m=>vt.fromDom(m.getBody()),sr=m=>b=>as(b,Wn(m)),Ws=m=>{an(m,"data-mce-style");const b=x=>an(x,"data-mce-style");bt(Ds(m),b),bt(Na(m),b),bt(pe(m),b)},Nl=m=>vt.fromDom(m.selection.getStart()),hu=m=>m.getBoundingClientRect().width,Nd=m=>m.getBoundingClientRect().height,Mr=m=>(b,x)=>{const A=b.dom.getStyle(x,m)||b.dom.getAttrib(x,m);return ve.from(A).filter(yr)},fh=Mr("width"),sp=Mr("height"),rg=m=>hc(m,os("table")).exists(Bo),Ma=(m,b)=>{const x=b.column,A=b.column+b.colspan-1,M=b.row,L=b.row+b.rowspan-1;return x<=m.finishCol&&A>=m.startCol&&M<=m.finishRow&&L>=m.startRow},rr=(m,b)=>b.column>=m.startCol&&b.column+b.colspan-1<=m.finishCol&&b.row>=m.startRow&&b.row+b.rowspan-1<=m.finishRow,da=(m,b,x)=>{const A=ql(m,b,as),M=ql(m,x,as);return A.bind(L=>M.map(U=>{return K=L,re=U,{startRow:Math.min(K.row,re.row),startCol:Math.min(K.column,re.column),finishRow:Math.max(K.row+K.rowspan-1,re.row+re.rowspan-1),finishCol:Math.max(K.column+K.colspan-1,re.column+re.colspan-1)};var K,re}))},Qc=(m,b,x)=>da(m,b,x).map(A=>{const M=jr(m,Ke(Ma,A));return D(M,L=>L.element)}),Kf=(m,b)=>ql(m,b,(x,A)=>hr(A,x)).map(x=>x.element),Gf=(m,b,x)=>{const A=di(m);return Qc(A,b,x)},Fi=(m,b,x,A,M)=>{const L=di(m),U=as(m,x)?ve.some(b):Kf(L,b),K=as(m,M)?ve.some(A):Kf(L,A);return U.bind(re=>K.bind(he=>Qc(L,re,he)))},di=rn;var Yf=["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"],Ac=()=>({up:ut({selector:br,closest:Pn,predicate:Yi,all:Gn}),down:ut({selector:Yn,predicate:Hr}),styles:ut({get:ya,getRaw:Li,set:pn,remove:ri}),attrs:ut({get:St,set:yn,remove:an,copyTo:(m,b)=>{const x=Kr(m);ra(b,x)}}),insert:ut({before:Vt,after:Dr,afterAll:ni,append:zs,appendAll:Ki,prepend:au,wrap:yd}),remove:ut({unwrap:ga,remove:ys}),create:ut({nu:vt.fromTag,clone:m=>vt.fromDom(m.dom.cloneNode(!1)),text:vt.fromText}),query:ut({comparePosition:(m,b)=>m.dom.compareDocumentPosition(b.dom),prevSibling:Ro,nextSibling:$a}),property:ut({children:$r,name:ao,parent:vi,document:m=>Bi(m).dom,isText:Ln,isComment:On,isElement:Zn,isSpecial:m=>{const b=ao(m);return uo(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],b)},getLanguage:m=>Zn(m)?Vo(m,"lang"):ve.none(),getText:gu,setText:vn,isBoundary:m=>!!Zn(m)&&(ao(m)==="body"||uo(Yf,ao(m))),isEmptyTag:m=>!!Zn(m)&&uo(["br","img","hr","input"],ao(m)),isNonEditable:m=>Zn(m)&&St(m,"contenteditable")==="false"}),eq:as,is:yl});const M1=(m,b,x,A)=>{const M=b(m,x);return qo(A,(L,U)=>{const K=b(m,U);return rp(m,L,K)},M)},rp=(m,b,x)=>b.bind(A=>x.filter(Ke(m.eq,A))),ed=Ac(),Dd=(m,b)=>((x,A,M)=>M.length>0?((L,U,K,re)=>re(L,U,K[0],K.slice(1)))(x,A,M,M1):ve.none())(ed,(x,A)=>m(A),b),no=m=>br(m,"table"),ec=(m,b,x)=>{const A=M=>L=>x!==void 0&&x(L)||as(L,M);return as(m,b)?ve.some({boxes:ve.some([m]),start:m,finish:b}):no(m).bind(M=>no(b).bind(L=>{if(as(M,L))return ve.some({boxes:Gf(M,m,b),start:m,finish:b});if(hr(M,L)){const U=ba(b,"td,th",A(M)),K=U.length>0?U[U.length-1]:b;return ve.some({boxes:Fi(M,m,M,b,L),start:m,finish:K})}if(hr(L,M)){const U=ba(m,"td,th",A(L)),K=U.length>0?U[U.length-1]:m;return ve.some({boxes:Fi(L,m,M,b,L),start:m,finish:K})}return((U,K,re)=>((he,Se,me,be=ue)=>{const _e=[Se].concat(he.up().all(Se)),De=[me].concat(he.up().all(me)),Re=gt=>Cr(gt,be).fold(()=>gt,Nt=>gt.slice(0,Nt+1)),lt=Re(_e),ct=Re(De),it=To(lt,gt=>Fe(ct,((Nt,Pt)=>Ke(Nt.eq,Pt))(he,gt)));return{firstpath:lt,secondpath:ct,shared:it}})(ed,U,K,void 0))(m,b).shared.bind(U=>Pn(U,"table",x).bind(K=>{const re=ba(b,"td,th",A(K)),he=re.length>0?re[re.length-1]:b,Se=ba(m,"td,th",A(K)),me=Se.length>0?Se[Se.length-1]:m;return ve.some({boxes:Fi(K,m,M,b,L),start:me,finish:he})}))}))},Xf=(m,b)=>{const x=Yn(m,b);return x.length>0?ve.some(x):ve.none()},Rd=(m,b,x)=>Vs(m,b).bind(A=>Vs(m,x).bind(M=>Dd(no,[A,M]).map(L=>({first:A,last:M,table:L})))),ka=(m,b,x,A,M)=>((L,U)=>To(L,K=>oi(K,U)))(m,M).bind(L=>((U,K,re)=>Q(U).bind(he=>((Se,me,be,_e)=>ql(Se,me,as).bind(De=>{const Re=be>0?De.row+De.rowspan-1:De.row,lt=_e>0?De.column+De.colspan-1:De.column;return Va(Se,Re+be,lt+_e).map(ct=>ct.element)}))(di(he),U,K,re)))(L,b,x).bind(U=>((K,re)=>br(K,"table").bind(he=>Vs(he,re).bind(Se=>ec(Se,K).bind(me=>me.boxes.map(be=>({boxes:be,start:me.start,finish:me.finish}))))))(U,A))),Dl=(m,b)=>Xf(m,b),Qu=(m,b,x)=>Rd(m,b,x).bind(A=>{const M=re=>as(m,re),L="thead,tfoot,tbody,table",U=br(A.first,L,M),K=br(A.last,L,M);return U.bind(re=>K.bind(he=>as(re,he)?((Se,me,be)=>((_e,De,Re)=>da(_e,De,Re).bind(lt=>((ct,it)=>{let gt=!0;const Nt=Ke(rr,it);for(let Pt=it.startRow;Pt<=it.finishRow;Pt++)for(let Be=it.startCol;Be<=it.finishCol;Be++)gt=gt&&Va(ct,Pt,Be).exists(Nt);return gt?ve.some(it):ve.none()})(_e,lt)))(di(Se),me,be))(A.table,A.first,A.last):ve.none()))}),Md=Bt,ag=m=>{const b=(x,A)=>Vo(x,A).exists(M=>parseInt(M,10)>1);return m.length>0&&Ht(m,x=>b(x,"rowspan")||b(x,"colspan"))?ve.some(m):ve.none()},tc=(m,b,x)=>b.length<=1?ve.none():Qu(m,x.firstSelectedSelector,x.lastSelectedSelector).map(A=>({bounds:A,cells:b})),Jf="data-mce-selected",Qf="data-mce-first-selected",wt="data-mce-last-selected",ig="["+Jf+"]",Bd={selected:Jf,selectedSelector:"td["+Jf+"],th["+Jf+"]",firstSelected:Qf,firstSelectedSelector:"td["+Qf+"],th["+Qf+"]",lastSelected:wt,lastSelectedSelector:"td["+wt+"],th["+wt+"]"},Qo=(m,b,x)=>({element:x,mergable:tc(b,m,Bd),unmergable:ag(m),selection:Md(m)}),lo=m=>(b,x)=>{const A=ao(b),M=A==="col"||A==="colgroup"?Q(L=b).bind(U=>Dl(U,Bd.firstSelectedSelector)).fold(ut(L),U=>U[0]):b;var L;return Pn(M,m,x)},Ld=lo("th,td,caption"),$s=lo("th,td"),Rl=m=>{return b=m.model.table.getSelectedCells(),D(b,vt.fromDom);var b},Ml=(m,b)=>{m.on("BeforeGetContent",x=>{const A=M=>{x.preventDefault(),(L=>Q(L[0]).map(U=>{const K=((re,he)=>{const Se=gt=>oi(gt.element,he),me=gc(re),be=oo(me),_e=pu(re),De=vr(be),Re=((gt,Nt)=>{const Pt=gt.grid.columns;let Be=gt.grid.rows,Jt=Pt,Ao=0,Xo=0;const Io=[],Oo=[];return Sn(gt.access,Yo=>{if(Io.push(Yo),Nt(Yo)){Oo.push(Yo);const zn=Yo.row,Lr=zn+Yo.rowspan-1,mi=Yo.column,La=mi+Yo.colspan-1;znAo&&(Ao=Lr),miXo&&(Xo=La)}}),((Yo,zn,Lr,mi,La,rc)=>({minRow:Yo,minCol:zn,maxRow:Lr,maxCol:mi,allCells:La,selectedCells:rc}))(Be,Jt,Ao,Xo,Io,Oo)})(De,Se),lt="th:not("+he+"),td:not("+he+")",ct=Kc(me,"th,td",gt=>oi(gt,lt));bt(ct,ys),((gt,Nt,Pt,Be)=>{const Jt=Kt(gt,Io=>Io.section!=="colgroup"),Ao=Nt.grid.columns,Xo=Nt.grid.rows;for(let Io=0;IoPt.maxRow||YoPt.maxCol||(Va(Nt,Io,Yo).filter(Be).isNone()?Za(Jt,Oo,Io):Oo=!0)}})(be,De,Re,Se);const it=((gt,Nt,Pt,Be)=>{if(Be.minCol===0&&Nt.grid.columns===Be.maxCol+1)return 0;const Jt=dr(Nt,gt,Pt),Ao=Ge(Jt,(Oo,Yo)=>Oo+Yo,0),Xo=Ge(Jt.slice(Be.minCol,Be.maxCol+1),(Oo,Yo)=>Oo+Yo,0),Io=Xo/Ao*Pt.pixelWidth()-Pt.pixelWidth();return Pt.getCellDelta(Io)})(re,rn(re),_e,Re);return((gt,Nt,Pt,Be)=>{Sn(Pt.columns,Ao=>{(Ao.columnNt.maxCol)&&ys(Ao.element)});const Jt=Kt(wl(gt,"tr"),Ao=>Ao.dom.childElementCount===0);bt(Jt,ys),Nt.minCol!==Nt.maxCol&&Nt.minRow!==Nt.maxRow||bt(wl(gt,"th,td"),Ao=>{an(Ao,"rowspan"),an(Ao,"colspan")}),an(gt,Td),an(gt,"data-snooker-col-series"),pu(gt).adjustTableWidth(Be)})(me,Re,De,it),me})(U,ig);return Ws(K),[K]}))(M).each(L=>{x.content=x.format==="text"?(U=>D(U,K=>K.dom.innerText).join(""))(L):((U,K)=>D(K,re=>U.selection.serializer.serialize(re.dom,{})).join(""))(m,L)})};if(x.selection===!0){const M=(L=>Kt(Rl(L),U=>oi(U,Bd.selectedSelector)))(m);M.length>=1&&A(M)}}),m.on("BeforeSetContent",x=>{if(x.selection===!0&&x.paste===!0){const A=Rl(m);fn(A).each(M=>{Q(M).each(L=>{const U=Kt(((re,he)=>{const Se=document.createElement("div");return Se.innerHTML=re,$r(vt.fromDom(Se))})(x.content),re=>ao(re)!=="meta"),K=os("table");if(xe(m)&&U.length===1&&K(U[0])){x.preventDefault();const re=vt.fromDom(m.getDoc()),he=Jn(re),Se=((me,be,_e)=>({element:me,clipboard:be,generators:_e}))(M,U[0],he);b.pasteCells(L,Se).each(()=>{m.focus()})}})})}})},Ho=(m,b)=>({element:m,offset:b}),ef=(m,b,x)=>m.property().isText(b)&&m.property().getText(b).trim().length===0||m.property().isComment(b)?x(b).bind(A=>ef(m,A,x).orThunk(()=>ve.some(A))):ve.none(),qb=(m,b)=>m.property().isText(b)?m.property().getText(b).length:m.property().children(b).length,Xe=(m,b)=>{const x=ef(m,b,m.query().prevSibling).getOr(b);if(m.property().isText(x))return Ho(x,qb(m,x));const A=m.property().children(x);return A.length>0?Xe(m,A[A.length-1]):Ho(x,qb(m,x))},lg=Xe,em=Ac(),tm=(m,b)=>{er(m)||(A=>ml(A).bind(M=>{return L=M,U=["fixed","relative","empty"],ve.from(Uf.exec(L)).bind(K=>{const re=Number(K[1]),he=K[2];return((Se,me)=>Fe(me,be=>Fe(Yu[be],_e=>Se===_e)))(he,U)?ve.some({value:re,unit:he}):ve.none()});var L,U}))(m).each(A=>{const M=A.value/2;Cc(m,M,A.unit),Cc(b,M,A.unit)})},tf=m=>D(m,ut(0)),bu=(m,b,x,A,M)=>M(m.slice(0,b)).concat(A).concat(M(m.slice(x))),Kb=m=>(b,x,A,M)=>{if(m(A)){const L=Math.max(M,b[x]-Math.abs(A)),U=Math.abs(L-b[x]);return A>=0?U:-U}return A},Pd=Kb(m=>m<0),Ss=Kb(Ct),Oc=()=>{const m=(x,A,M,L)=>{const U=(100+M)/100,K=Math.max(L,(x[A]+M)/U);return D(x,(re,he)=>(he===A?K:re/U)-re)},b=(x,A,M,L,U,K)=>K?m(x,A,L,U):((re,he,Se,me,be)=>{const _e=Pd(re,he,me,be);return bu(re,he,Se+1,[_e,0],tf)})(x,A,M,L,U);return{resizeTable:(x,A)=>x(A),clampTableDelta:Pd,calcLeftEdgeDeltas:b,calcMiddleDeltas:(x,A,M,L,U,K,re)=>b(x,M,L,U,K,re),calcRightEdgeDeltas:(x,A,M,L,U,K)=>{if(K)return m(x,M,L,U);{const re=Pd(x,M,L,U);return tf(x.slice(0,M)).concat([re])}},calcRedestributedWidths:(x,A,M,L)=>{if(L){const U=(A+M)/A,K=D(x,re=>re/U);return{delta:100*U-100,newSizes:K}}return{delta:M,newSizes:x}}}},cg=()=>{const m=(b,x,A,M,L)=>{const U=Ss(b,M>=0?A:x,M,L);return bu(b,x,A+1,[U,-U],tf)};return{resizeTable:(b,x,A)=>{A&&b(x)},clampTableDelta:(b,x,A,M,L)=>{if(L){if(A>=0)return A;{const U=Ge(b,(K,re)=>K+re-M,0);return Math.max(-U,A)}}return Pd(b,x,A,M)},calcLeftEdgeDeltas:m,calcMiddleDeltas:(b,x,A,M,L,U)=>m(b,A,M,L,U),calcRightEdgeDeltas:(b,x,A,M,L,U)=>{if(U)return tf(b);{const K=M/b.length;return D(b,ut(K))}},calcRedestributedWidths:(b,x,A,M)=>({delta:0,newSizes:b})}},Bl=m=>rn(m).grid,yu=os("th"),pl=m=>Ht(m,b=>yu(b.element)),ar=(m,b)=>m&&b?"sectionCells":m?"section":"cells",vu=m=>{const b=m.section==="thead",x=ki(Er(m.cells),"th");return m.section==="tfoot"?{type:"footer"}:b||x?{type:"header",subType:ar(b,x)}:{type:"body"}},Er=m=>{const b=Kt(m,x=>yu(x.element));return b.length===0?ve.some("td"):b.length===m.length?ve.some("th"):ve.none()},ap=(m,b,x)=>lr(x(m.element,b),!0,m.isLocked),Ll=(m,b)=>m.section!==b?ha(m.element,m.cells,b,m.isNew):m,Jr=()=>({transformRow:Ll,transformCell:(m,b,x)=>{const A=x(m.element,b),M=ao(A)!=="td"?((L,U)=>{const K=xi(L,"td");Dr(L,K);const re=$r(L);return Ki(K,re),ys(L),K})(A):A;return lr(M,m.isNew,m.isLocked)}}),xt=()=>({transformRow:Ll,transformCell:ap}),_u=()=>({transformRow:(m,b)=>Ll(m,b==="thead"?"tbody":b),transformCell:ap}),Qr=Jr,Gb=xt,k=_u,N=()=>({transformRow:Bt,transformCell:ap}),Z=(m,b,x,A)=>{x===A?an(m,b):yn(m,b,x)},se=(m,b,x)=>{zo(wi(m,b)).fold(()=>au(m,x),A=>Dr(A,x))},Ce=(m,b)=>{const x=[],A=[],M=be=>D(be,_e=>{_e.isNew&&x.push(_e.element);const De=_e.element;return _i(De),bt(_e.cells,Re=>{Re.isNew&&A.push(Re.element),Z(Re.element,"colspan",Re.colspan,1),Z(Re.element,"rowspan",Re.rowspan,1),zs(De,Re.element)}),De}),L=be=>pt(be,_e=>D(_e.cells,De=>(Z(De.element,"span",De.colspan,1),De.element))),U=(be,_e)=>{const De=((lt,ct)=>{const it=_l(lt,ct).getOrThunk(()=>{const gt=vt.fromTag(ct,cl(lt).dom);return ct==="thead"?se(lt,"caption,colgroup",gt):ct==="colgroup"?se(lt,"caption",gt):zs(lt,gt),gt});return _i(it),it})(m,_e),Re=(_e==="colgroup"?L:M)(be);Ki(De,Re)},K=(be,_e)=>{be.length>0?U(be,_e):(De=>{_l(m,De).each(ys)})(_e)},re=[],he=[],Se=[],me=[];return bt(b,be=>{switch(be.section){case"thead":re.push(be);break;case"tbody":he.push(be);break;case"tfoot":Se.push(be);break;case"colgroup":me.push(be)}}),K(me,"colgroup"),K(re,"thead"),K(he,"tbody"),K(Se,"tfoot"),{newRows:x,newCells:A}},et=(m,b)=>{if(m.length===0)return 0;const x=m[0];return Cr(m,A=>!b(x.element,A.element)).getOr(m.length)},Et=(m,b)=>{const x=D(m,A=>D(A.cells,ue));return D(m,(A,M)=>{const L=pt(A.cells,(U,K)=>{if(x[M][K]===!1){const be=((_e,De,Re,lt)=>{const ct=((Pt,Be)=>Pt[Be])(_e,De),it=ct.section==="colgroup",gt=et(ct.cells.slice(Re),lt),Nt=it?1:et(((Pt,Be)=>D(Pt,Jt=>cr(Jt,Be)))(_e.slice(De),Re),lt);return{colspan:gt,rowspan:Nt}})(m,M,K,b);return((_e,De,Re,lt)=>{for(let ct=_e;ct<_e+Re;ct++)for(let it=De;it({element:U,cells:K,section:re,isNew:he}))(A.element,L,A.section,A.isNew)})},Tt=(m,b,x)=>{const A=[];bt(m.colgroups,M=>{const L=[];for(let U=0;Ulr(re.element,x,!1)).getOrThunk(()=>lr(b.colGap(),!0,!1));L.push(K)}A.push(ha(M.element,L,"colgroup",x))});for(let M=0;Mlr(Se.element,x,Se.isLocked)).getOrThunk(()=>lr(b.gap(),!0,!1));L.push(he)}const U=m.all[M],K=ha(U.element,L,U.section,x);A.push(K)}return A},Lo=m=>Et(m,as),co=(m,b)=>j(m.all,x=>To(x.cells,A=>as(b,A.element))),_n=(m,b,x)=>{const A=D(b.selection,L=>xd(L).bind(U=>co(m,U)).filter(x)),M=Oa(A);return Vr(M.length>0,M)},Ko=(m,b,x,A,M)=>(L,U,K,re)=>{const he=rn(L),Se=ve.from(re==null?void 0:re.section).getOrThunk(N);return b(he,U).map(me=>{const be=((Re,lt)=>Tt(Re,lt,!1))(he,K),_e=m(be,me,as,M(K),Se),De=Ha(_e.grid);return{info:me,grid:Lo(_e.grid),cursor:_e.cursor,lockedColumns:De}}).bind(me=>{const be=Ce(L,me.grid),_e=ve.from(re==null?void 0:re.sizing).getOrThunk(()=>pu(L)),De=ve.from(re==null?void 0:re.resize).getOrThunk(cg);return x(L,me.grid,me.info,{sizing:_e,resize:De,section:Se}),A(L),an(L,Td),me.lockedColumns.length>0&&yn(L,Td,me.lockedColumns.join(",")),ve.some({cursor:me.cursor,newRows:be.newRows,newCells:be.newCells})})},Qn=(m,b)=>_n(m,b,Ct).map(x=>({cells:x,generators:b.generators,clipboard:b.clipboard})),ea=(m,b)=>_n(m,b,Ct),qs=(m,b)=>_n(m,b,x=>!x.isLocked),oc=(m,b)=>Ht(b,x=>((A,M)=>co(A,M).exists(L=>!L.isLocked))(m,x)),nc=(m,b,x,A)=>{const M=_s(m).rows;let L=!0;for(let U=0;U{const b=L=>L(m),x=ut(m),A=()=>M,M={tag:!0,inner:m,fold:(L,U)=>U(m),isValue:Ct,isError:ue,map:L=>td.value(L(m)),mapError:A,bind:b,exists:b,forall:b,getOr:x,or:A,getOrThunk:x,orThunk:A,getOrDie:x,each:L=>{L(m)},toOptional:()=>ve.some(m)};return M},ip=m=>{const b=()=>x,x={tag:!1,inner:m,fold:(M,L)=>M(m),isValue:ue,isError:Ct,map:b,mapError:M=>td.error(M(m)),bind:b,exists:ue,forall:Ct,getOr:Bt,or:Bt,getOrThunk:ft,orThunk:ft,getOrDie:(A=String(m),()=>{throw new Error(A)}),each:st,toOptional:ve.none};var A;return x},td={value:zc,error:ip,fromOption:(m,b)=>m.fold(()=>ip(b),zc)},of=(m,b)=>({rowDelta:0,colDelta:aa(m[0])-aa(b[0])}),om=(m,b)=>({rowDelta:m.length-b.length,colDelta:0}),xu=(m,b,x,A)=>{const M=b.section==="colgroup"?x.col:x.cell;return Gt(m,L=>lr(M(),!0,A(L)))},nf=(m,b,x,A)=>{const M=m[m.length-1];return m.concat(Gt(b,()=>{const L=M.section==="colgroup"?x.colgroup:x.row,U=Ed(M,L,Bt),K=xu(U.cells.length,U,x,re=>dn(A,re.toString()));return ai(U,K)}))},mh=(m,b,x,A)=>D(m,M=>{const L=xu(b,M,x,ue);return kl(M,A,L)}),wu=(m,b,x)=>{const A=b.colDelta<0?mh:Bt,M=b.rowDelta<0?nf:Bt,L=Ha(m),U=aa(m[0]),K=Fe(L,Se=>Se===U-1),re=A(m,Math.abs(b.colDelta),x,K?U-1:U),he=Ha(re);return M(re,Math.abs(b.rowDelta),x,ks(he,Ct))},es=(m,b,x,A)=>{const M=Ke(A,cr(m[b],x).element),L=m[b];return m.length>1&&aa(L)>1&&(x>0&&M(Rs(L,x-1))||x0&&M(Rs(m[b-1],x))||bKt(x,A=>A>=m.column&&A<=aa(b[0])+m.column),qa=(m,b,x,A,M)=>{((he,Se,me,be)=>{Se>0&&Se{const De=_e.cells[Se-1];let Re=0;const lt=be();for(;_e.cells.length>Se+Re&&me(De.element,_e.cells[Se+Re].element);)qu(_e,Se+Re,lr(lt,!0,_e.cells[Se+Re].isLocked)),Re++})})(b,m,M,A.cell);const L=om(x,b),U=wu(x,L,A),K=om(b,U),re=wu(b,K,A);return D(re,(he,Se)=>kl(he,m,U[Se].cells))},Qi=(m,b,x,A,M)=>{((it,gt,Nt,Pt)=>{const Be=_s(it).rows;if(gt>0&>Ge(Ao,(Io,Oo)=>Fe(Io,Yo=>Xo(Yo.element,Oo.element))?Io:Io.concat([Oo]),[]))(Be[gt-1].cells,Nt);bt(Jt,Ao=>{let Xo=ve.none();for(let Io=gt;Io{qu(Yo,Oo,lr(Lr,!0,zn.isLocked))}))}})}})(b,m,M,A.cell);const L=Ha(b),U=of(b,x),K={...U,colDelta:U.colDelta-L.length},re=wu(b,K,A),{cols:he,rows:Se}=_s(re),me=Ha(re),be=of(x,b),_e={...be,colDelta:be.colDelta+me.length},De=(lt=A,ct=me,D(x,it=>Ge(ct,(gt,Nt)=>{const Pt=xu(1,it,lt,Ct)[0];return Wu(gt,Nt,Pt)},it))),Re=wu(De,_e,A);var lt,ct;return[...he,...Se.slice(0,m),...Re,...Se.slice(m,Se.length)]},ph=(m,b,x,A,M)=>{const{rows:L,cols:U}=_s(m),K=L.slice(0,b),re=L.slice(b);return[...U,...K,((he,Se,me,be)=>Ed(he,_e=>be(_e,me),Se))(L[x],(he,Se)=>b>0&&bD(m,L=>{const U=b>0&&b{if(Se!=="colgroup"&&me)return cr(re,he);{const Re=cr(re,be);return lr(De(Re.element,_e),!0,!1)}})(L,b,L.section,U,x,A,M);return Wu(L,b,K)}),nm=(m,b,x,A)=>((M,L,U,K)=>Rs(M[L],U)!==void 0&&L>0&&K(Rs(M[L-1],U),Rs(M[L],U)))(m,b,x,A)||((M,L,U)=>L>0&&U(Rs(M,L-1),Rs(M,L)))(m[b],x,A),sm=(m,b,x,A)=>{const M=L=>(U=>U==="row"?(K=>jl(K,"rowspan")>1)(b):er(b))(L)?`${L}group`:L;return m?yu(b)?M(x):null:A&&yu(b)?M(x==="row"?"col":"row"):null},gh=(m,b,x)=>lr(x(m.element,b),!0,m.isLocked),dg=(m,b,x,A,M,L,U)=>D(m,(K,re)=>((he,Se)=>{const me=he.cells,be=D(me,(_e,De)=>{if((Re=>Fe(b,lt=>x(Re.element,lt.element)))(_e)){const Re=U(_e,re,De)?M(_e,x,A):_e;return L(Re,re,De).each(lt=>{var ct,it;ct=Re.element,it={scope:ve.from(lt)},Sn(it,(gt,Nt)=>{gt.fold(()=>{an(ct,Nt)},Pt=>{Is(ct.dom,Nt,Pt)})})}),Re}return _e});return ha(he.element,be,he.section,he.isNew)})(K)),B1=(m,b,x)=>pt(m,(A,M)=>nm(m,M,b,x)?[]:[cr(A,b)]),hh=(m,b,x,A,M)=>{const L=_s(m).rows,U=pt(b,Se=>B1(L,Se,A)),K=D(L,Se=>pl(Se.cells)),re=((Se,me)=>Ht(me,Bt)&&pl(Se)?Ct:(be,_e,De)=>!(ao(be.element)==="th"&&me[_e]))(U,K);return dg(m,U,A,M,gh,((Se,me)=>(be,_e)=>ve.some(sm(Se,be.element,"row",me[_e])))(x,K),re)},bh=(m,b,x,A)=>{const M=_s(m).rows,L=D(b,U=>cr(M[U.row],U.column));return dg(m,L,x,A,gh,ve.none,Ct)},rm=m=>{if(!ce(m))throw new Error("cases must be an array");if(m.length===0)throw new Error("there must be at least one case");const b=[],x={};return bt(m,(A,M)=>{const L=Fr(A);if(L.length!==1)throw new Error("one and only one name per case");const U=L[0],K=A[U];if(x[U]!==void 0)throw new Error("duplicate key detected:"+U);if(U==="cata")throw new Error("cannot have a case named cata (sorry)");if(!ce(K))throw new Error("case arguments must be an array");b.push(U),x[U]=(...re)=>{const he=re.length;if(he!==K.length)throw new Error("Wrong number of arguments to case "+U+". Expected "+K.length+" ("+K+"), got "+he);return{fold:(...Se)=>{if(Se.length!==m.length)throw new Error("Wrong number of arguments to fold. Expected "+m.length+", got "+Se.length);return Se[M].apply(null,re)},match:Se=>{const me=Fr(Se);if(b.length!==me.length)throw new Error("Wrong number of arguments to match. Expected: "+b.join(",")+` -Actual: `+me.join(","));if(!Ht(b,be=>uo(me,be)))throw new Error("Not all branches were specified when using match. Specified: "+me.join(", ")+` -Required: `+b.join(", "));return Se[U].apply(null,re)},log:Se=>{console.log(Se,{constructors:b,constructor:U,params:re})}}}}),x},ug={...rm([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}])},L1=(m,b,x)=>{const A=((M,L)=>Sl(M)?((U,K)=>{const re=Cl(U);return D(re,(he,Se)=>({element:he.element,width:K[Se],colspan:he.colspan}))})(M,L):((U,K)=>{const re=so(U);return D(re,he=>{const Se=((me,be,_e)=>{let De=0;for(let Re=me;Re{x.setElementWidth(M.element,M.width)})},ku=(m,b,x,A,M)=>{const L=rn(m),U=M.getCellDelta(b),K=M.getWidths(L,M),re=x===L.grid.columns-1,he=A.clampTableDelta(K,x,U,M.minCellWidth(),re),Se=((be,_e,De,Re,lt)=>{const ct=be.slice(0),it=((Nt,Pt)=>Nt.length===0?ug.none():Nt.length===1?ug.only(0):Pt===0?ug.left(0,1):Pt===Nt.length-1?ug.right(Pt-1,Pt):Pt>0&&PtRe.singleColumnWidth(ct[Nt],De),(Nt,Pt)=>lt.calcLeftEdgeDeltas(ct,Nt,Pt,De,Re.minCellWidth(),Re.isRelative),(Nt,Pt,Be)=>lt.calcMiddleDeltas(ct,Nt,Pt,Be,De,Re.minCellWidth(),Re.isRelative),(Nt,Pt)=>lt.calcRightEdgeDeltas(ct,Nt,Pt,De,Re.minCellWidth(),Re.isRelative))})(K,x,he,M,A),me=D(Se,(be,_e)=>be+K[_e]);L1(L,me,M),A.resizeTable(M.adjustTableWidth,he,re)},cp=(m,b,x)=>{const A=rn(m),M=((re,he)=>ca(re,he,sg,Se=>Se.getOrThunk(Vn)))(A,m),L=D(M,(re,he)=>x===he?Math.max(b+re,Vn()):re),U=((re,he)=>D(re.all,(Se,me)=>({element:Se.element,height:he[me]})))(A,L);bt(U,re=>{kc(re.element,re.height)}),bt(so(A),re=>{(he=>{ri(he,"height")})(re.element)});const K=qo(L,(re,he)=>re+he,0);kc(m,K)},dp=m=>Ge(m,(b,x)=>Fe(b,A=>A.column===x.column)?b:b.concat([x]),[]).sort((b,x)=>b.column-x.column),Cu=os("col"),sf=os("colgroup"),yh=m=>ao(m)==="tr"||sf(m),Fk=m=>({element:m,colspan:Ns(m,"colspan",1),rowspan:Ns(m,"rowspan",1)}),vh=m=>Vo(m,"scope").map(b=>b.substr(0,3)),Nc=(m,b=Fk)=>{const x=M=>{if(yh(M))return sf((L={element:M}).element)?m.colgroup(L):m.row(L);{const U=M,K=(re=>Cu(re.element)?m.col(re):m.cell(re))(b(U));return A=ve.some({item:U,replacement:K}),K}var L};let A=ve.none();return{getOrInit:(M,L)=>A.fold(()=>x(M),U=>L(M,U.item)?U.replacement:x(M))}},w_=m=>b=>{const x=[],A=M=>{const L=m==="td"?{scope:null}:{},U=b.replace(M,m,L);return x.push({item:M,sub:U}),U};return{replaceOrInit:(M,L)=>{if(yh(M)||Cu(M))return M;{const U=M;return((K,re)=>To(x,he=>re(he.item,K)))(U,L).fold(()=>A(U),K=>L(M,K.item)?K.sub:A(U))}}}},P1=m=>({unmerge:b=>{const x=vh(b);return x.each(A=>yn(b,"scope",A)),()=>{const A=m.cell({element:b,colspan:1,rowspan:1});return ri(A,"width"),ri(b,"width"),x.each(M=>yn(A,"scope",M)),A}},merge:b=>(ri(b[0],"width"),(()=>{const x=Oa(D(b,vh));if(x.length===0)return ve.none();{const A=x[0],M=["row","col"];return Fe(x,L=>L!==A&&uo(M,L))?ve.none():ve.from(A)}})().fold(()=>an(b[0],"scope"),x=>yn(b[0],"scope",x+"group")),ut(b[0]))}),up=["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"],Ka=Ac(),fp=m=>((b,x)=>{const A=b.property().name(x);return uo(up,A)})(Ka,m),mp=m=>((b,x)=>{const A=b.property().name(x);return uo(["ol","ul"],A)})(Ka,m),Yb=m=>{const b=os("br"),x=M=>Jl(M).bind(L=>{const U=$a(L).map(K=>!!fp(K)||!!((re,he)=>uo(["br","img","hr","input"],re.property().name(he)))(Ka,K)&&ao(K)!=="img").getOr(!1);return vi(L).map(K=>{return U===!0||ao(re=K)==="li"||Yi(re,mp).isSome()||b(L)||fp(K)&&!as(M,K)?[]:[vt.fromTag("br")];var re})}).getOr([]),A=(()=>{const M=pt(m,L=>{const U=$r(L);return(K=>Ht(K,re=>b(re)||Ln(re)&&gu(re).trim().length===0))(U)?[]:U.concat(x(L))});return M.length===0?[vt.fromTag("br")]:M})();_i(m[0]),Ki(m[0],A)},Dn=m=>Bo(m,!0),el=m=>{Ds(m).length===0&&ys(m)},Id=(m,b)=>({grid:m,cursor:b}),fi=(m,b,x)=>{const A=((M,L,U)=>{var K,re;const he=_s(M).rows;return ve.from((re=(K=he[L])===null||K===void 0?void 0:K.cells[U])===null||re===void 0?void 0:re.element).filter(Dn).orThunk(()=>(Se=>j(Se,me=>j(me.cells,be=>{const _e=be.element;return Vr(Dn(_e),_e)})))(he))})(m,b,x);return Id(m,A)},Es=m=>Ge(m,(b,x)=>Fe(b,A=>A.row===x.row)?b:b.concat([x]),[]).sort((b,x)=>b.row-x.row),_h=(m,b)=>(x,A,M,L,U)=>{const K=Es(A),re=D(K,Se=>Se.row),he=((Se,me,be,_e,De,Re,lt)=>{const{cols:ct,rows:it}=_s(Se),gt=it[me[0]],Nt=pt(me,Io=>((Oo,Yo,zn)=>{const Lr=Oo[Yo];return pt(Lr.cells,(mi,La)=>nm(Oo,Yo,La,zn)?[]:[mi])})(it,Io,De)),Pt=D(gt.cells,(Io,Oo)=>pl(B1(it,Oo,De))),Be=[...it];bt(me,Io=>{Be[Io]=lt.transformRow(it[Io],be)});const Jt=[...ct,...Be],Ao=((Io,Oo)=>Ht(Oo,Bt)&&pl(Io.cells)?Ct:(Yo,zn,Lr)=>!(ao(Yo.element)==="th"&&Oo[Lr]))(gt,Pt),Xo=((Io,Oo)=>(Yo,zn,Lr)=>ve.some(sm(Io,Yo.element,"col",Oo[Lr])))(_e,Pt);return dg(Jt,Nt,De,Re,lt.transformCell,Xo,Ao)})(x,re,m,b,M,L.replaceOrInit,U);return fi(he,A[0].row,A[0].column)},k_=_h("thead",!0),$k=_h("tbody",!1),Gs=_h("tfoot",!1),Xb=(m,b,x)=>{const A=((L,U)=>Ye(L,()=>U))(m,x.section),M=vr(A);return Tt(M,b,!0)},I1=(m,b,x,A)=>((M,L,U,K)=>{const re=vr(L),he=K.getWidths(re,K);L1(re,he,K)})(0,b,0,A.sizing),am=(m,b,x,A)=>((M,L,U,K,re)=>{const he=vr(L),Se=K.getWidths(he,K),me=K.pixelWidth(),{newSizes:be,delta:_e}=re.calcRedestributedWidths(Se,me,U.pixelDelta,K.isRelative);L1(he,be,K),K.adjustTableWidth(_e)})(0,b,x,A.sizing,A.resize),Dc=(m,b)=>Fe(b,x=>x.column===0&&x.isLocked),fg=(m,b)=>Fe(b,x=>x.column+x.colspan>=m.grid.columns&&x.isLocked),Xt=(m,b)=>{const x=du(m),A=dp(b);return Ge(A,(M,L)=>M+x[L.column].map(Sd).getOr(0),0)},od=m=>(b,x)=>ea(b,x).filter(A=>!(m?Dc:fg)(b,A)).map(A=>({details:A,pixelDelta:Xt(b,A)})),F1=m=>(b,x)=>Qn(b,x).filter(A=>!(m?Dc:fg)(b,A.cells)),Jb=w_("th"),mg=w_("td"),Qb=Ko((m,b,x,A)=>{const M=b[0].row,L=Es(b),U=qo(L,(K,re)=>({grid:ph(K.grid,M,re.row+K.delta,x,A.getOrInit),delta:K.delta+1}),{grid:m,delta:0}).grid;return fi(U,M,b[0].column)},ea,st,st,Nc),pp=Ko((m,b,x,A)=>{const M=Es(b),L=M[M.length-1],U=L.row+L.rowspan,K=qo(M,(re,he)=>ph(re,U,he.row,x,A.getOrInit),m);return fi(K,U,b[0].column)},ea,st,st,Nc),Rc=Ko((m,b,x,A)=>{const M=b.details,L=dp(M),U=L[0].column,K=qo(L,(re,he)=>({grid:lp(re.grid,U,he.column+re.delta,x,A.getOrInit),delta:re.delta+1}),{grid:m,delta:0}).grid;return fi(K,M[0].row,U)},od(!0),am,st,Nc),Hk=Ko((m,b,x,A)=>{const M=b.details,L=M[M.length-1],U=L.column+L.colspan,K=dp(M),re=qo(K,(he,Se)=>lp(he,U,Se.column,x,A.getOrInit),m);return fi(re,M[0].row,U)},od(!1),am,st,Nc),ey=Ko((m,b,x,A)=>{const M=dp(b.details),L=((K,re)=>pt(K,he=>{const Se=he.cells,me=qo(re,(be,_e)=>_e>=0&&_e0?[ha(he.element,me,he.section,he.isNew)]:[]}))(m,D(M,K=>K.column)),U=L.length>0?L[0].cells.length-1:0;return fi(L,M[0].row,Math.min(M[0].column,U))},(m,b)=>qs(m,b).map(x=>({details:x,pixelDelta:-Xt(m,x)})),am,el,Nc),$1=Ko((m,b,x,A)=>{const M=Es(b),L=((K,re,he)=>{const{rows:Se,cols:me}=_s(K);return[...me,...Se.slice(0,re),...Se.slice(he+1)]})(m,M[0].row,M[M.length-1].row),U=Math.max(_s(L).rows.length-1,0);return fi(L,Math.min(b[0].row,U),b[0].column)},ea,st,el,Nc),ty=Ko((m,b,x,A)=>{const M=dp(b),L=D(M,K=>K.column),U=hh(m,L,!0,x,A.replaceOrInit);return fi(U,b[0].row,b[0].column)},qs,st,st,Jb),H1=Ko((m,b,x,A)=>{const M=dp(b),L=D(M,K=>K.column),U=hh(m,L,!1,x,A.replaceOrInit);return fi(U,b[0].row,b[0].column)},qs,st,st,mg),V1=Ko(k_,qs,st,st,Jb),oy=Ko($k,qs,st,st,mg),j1=Ko(Gs,qs,st,st,mg),U1=Ko((m,b,x,A)=>{const M=bh(m,b,x,A.replaceOrInit);return fi(M,b[0].row,b[0].column)},qs,st,st,Jb),C_=Ko((m,b,x,A)=>{const M=bh(m,b,x,A.replaceOrInit);return fi(M,b[0].row,b[0].column)},qs,st,st,mg),Vk=Ko((m,b,x,A)=>{const M=b.cells;Yb(M);const L=((U,K,re,he)=>{const Se=_s(U).rows;if(Se.length===0)return U;for(let me=K.startRow;me<=K.finishRow;me++)for(let be=K.startCol;be<=K.finishCol;be++){const _e=Se[me],De=cr(_e,be).isLocked;qu(_e,be,lr(he(),!1,De))}return U})(m,b.bounds,0,A.merge(M));return Id(L,ve.from(M[0]))},(m,b)=>((x,A)=>A.mergable)(0,b).filter(x=>oc(m,x.cells)),I1,st,P1),xh=Ko((m,b,x,A)=>{const M=qo(b,(L,U)=>nc(L,U,x,A.unmerge(U)),m);return Id(M,ve.from(b[0]))},(m,b)=>((x,A)=>A.unmergable)(0,b).filter(x=>oc(m,x)),I1,st,P1),Z1=Ko((m,b,x,A)=>{const M=((K,re)=>{const he=rn(K);return Tt(he,re,!0)})(b.clipboard,b.generators);var L,U;return((K,re,he,Se,me)=>{const be=Ha(re),_e=((ct,it,gt)=>{const Nt=aa(it[0]),Pt=_s(it).cols.length+ct.row,Be=Gt(Nt-ct.column,Jt=>Jt+ct.column);return{row:Pt,column:To(Be,Jt=>Ht(gt,Ao=>Ao!==Jt)).getOr(Nt-1)}})(K,re,be),De=_s(he).rows,Re=Ks(_e,De,be);return((ct,it,gt)=>{if(ct.row>=it.length||ct.column>aa(it[0]))return td.error("invalid start address out of table bounds, row: "+ct.row+", column: "+ct.column);const Nt=it.slice(ct.row),Pt=Nt[0].cells.slice(ct.column),Be=aa(gt[0]),Jt=gt.length;return td.value({rowDelta:Nt.length-Jt,colDelta:Pt.length-Be})})(_e,re,De).map(ct=>{const it={...ct,colDelta:ct.colDelta-Re.length},gt=wu(re,it,Se),Nt=Ha(gt),Pt=Ks(_e,De,Nt);return((Be,Jt,Ao,Xo,Io,Oo)=>{const Yo=Be.row,zn=Be.column,Lr=Yo+Ao.length,mi=zn+aa(Ao[0])+Oo.length,La=ks(Oo,Ct);for(let rc=Yo;rcId(m,ve.some(b.element)),K=>fi(K,b.row,b.column))},(m,b)=>xd(b.element).bind(x=>co(m,x).map(A=>({...A,generators:b.generators,clipboard:b.clipboard}))),I1,st,Nc),gp=Ko((m,b,x,A)=>{const M=_s(m).rows,L=b.cells[0].column,U=M[b.cells[0].row],K=Xb(b.clipboard,b.generators,U),re=qa(L,m,K,b.generators,x);return fi(re,b.cells[0].row,b.cells[0].column)},F1(!0),st,st,Nc),jk=Ko((m,b,x,A)=>{const M=_s(m).rows,L=b.cells[b.cells.length-1].column+b.cells[b.cells.length-1].colspan,U=M[b.cells[0].row],K=Xb(b.clipboard,b.generators,U),re=qa(L,m,K,b.generators,x);return fi(re,b.cells[0].row,L)},F1(!1),st,st,Nc),Uk=Ko((m,b,x,A)=>{const M=_s(m).rows,L=b.cells[0].row,U=M[L],K=Xb(b.clipboard,b.generators,U),re=Qi(L,m,K,b.generators,x);return fi(re,b.cells[0].row,b.cells[0].column)},Qn,st,st,Nc),rf=Ko((m,b,x,A)=>{const M=_s(m).rows,L=b.cells[b.cells.length-1].row+b.cells[b.cells.length-1].rowspan,U=M[b.cells[0].row],K=Xb(b.clipboard,b.generators,U),re=Qi(L,m,K,b.generators,x);return fi(re,L,b.cells[0].column)},Qn,st,st,Nc),im=(m,b)=>{const x=rn(m);return ea(x,b).bind(A=>{const M=A[A.length-1],L=A[0].column,U=M.column+M.colspan,K=$t(D(x.all,re=>Kt(re.cells,he=>he.column>=L&&he.column{const x=rn(m);return ea(x,b).bind(Er).getOr("")},S_=(m,b)=>{const x=rn(m);return ea(x,b).bind(A=>{const M=A[A.length-1],L=A[0].row,U=M.row+M.rowspan;return(K=>{const re=D(K,me=>vu(me).type),he=uo(re,"header"),Se=uo(re,"footer");if(he||Se){const me=uo(re,"body");return!he||me||Se?he||me||!Se?ve.none():ve.some("footer"):ve.some("header")}return ve.some("body")})(x.all.slice(L,U))}).getOr("")},W1=(m,b)=>m.dispatch("NewRow",{node:b}),wh=(m,b)=>m.dispatch("NewCell",{node:b}),Su=(m,b,x)=>{m.dispatch("TableModified",{...x,table:b})},sy={structure:!1,style:!0},ta={structure:!0,style:!1},wr={structure:!0,style:!0},af=(m,b)=>Tc(m)?Al(b):E(m)?js(b):pu(b),q1=(m,b,x)=>{const A=Se=>ao(Wn(Se))==="table",M=Ji(m),L=Wf(m)?st:tm,U=Se=>{switch(Ql(m)){case"section":return Qr();case"sectionCells":return Gb();case"cells":return k();default:return((me,be)=>{var _e;switch((_e=rn(me),j(_e.all,De=>{const Re=vu(De);return Re.type==="header"?ve.from(Re.subType):ve.none()})).getOr(be)){case"section":return Jr();case"sectionCells":return xt();case"cells":return _u()}})(Se,"section")}},K=(Se,me,be,_e)=>(De,Re,lt=!1)=>{Ws(De);const ct=vt.fromDom(m.getDoc()),it=xs(be,ct,M),gt={sizing:af(m,De),resize:Wf(m)?Oc():cg(),section:U(De)};return me(De)?Se(De,Re,it,gt).bind(Nt=>{b.refresh(De.dom),bt(Nt.newRows,Be=>{W1(m,Be.dom)}),bt(Nt.newCells,Be=>{wh(m,Be.dom)});const Pt=((Be,Jt)=>Jt.cursor.fold(()=>{const Ao=Ds(Be);return fn(Ao).filter(Gi).map(Xo=>{x.clearSelectedCells(Be.dom);const Io=m.dom.createRng();return Io.selectNode(Xo.dom),m.selection.setRng(Io),yn(Xo,"data-mce-selected","1"),Io})},Ao=>{const Xo=lg(em,Ao),Io=m.dom.createRng();return Io.setStart(Xo.element.dom,Xo.offset),Io.setEnd(Xo.element.dom,Xo.offset),m.selection.setRng(Io),x.clearSelectedCells(Be.dom),ve.some(Io)}))(De,Nt);return Gi(De)&&(Ws(De),lt||Su(m,De.dom,_e)),Pt.map(Be=>({rng:Be,effect:_e}))}):ve.none()},re=K($1,Se=>!A(m)||Bl(Se).rows>1,st,ta),he=K(ey,Se=>!A(m)||Bl(Se).columns>1,st,ta);return{deleteRow:re,deleteColumn:he,insertRowsBefore:K(Qb,Ct,st,ta),insertRowsAfter:K(pp,Ct,st,ta),insertColumnsBefore:K(Rc,Ct,L,ta),insertColumnsAfter:K(Hk,Ct,L,ta),mergeCells:K(Vk,Ct,st,ta),unmergeCells:K(xh,Ct,st,ta),pasteColsBefore:K(gp,Ct,st,ta),pasteColsAfter:K(jk,Ct,st,ta),pasteRowsBefore:K(Uk,Ct,st,ta),pasteRowsAfter:K(rf,Ct,st,ta),pasteCells:K(Z1,Ct,st,wr),makeCellsHeader:K(U1,Ct,st,ta),unmakeCellsHeader:K(C_,Ct,st,ta),makeColumnsHeader:K(ty,Ct,st,ta),unmakeColumnsHeader:K(H1,Ct,st,ta),makeRowsHeader:K(V1,Ct,st,ta),makeRowsBody:K(oy,Ct,st,ta),makeRowsFooter:K(j1,Ct,st,ta),getTableRowType:S_,getTableCellType:ny,getTableColType:im}},ry=(m,b,x)=>{const A=Ns(m,b,1);x===1||A<=1?an(m,b):yn(m,b,Math.min(x,A))},Ba=(m,b)=>x=>{const A=x.column+x.colspan-1,M=x.column;return A>=m&&M{const A=x.substring(0,x.length-m.length),M=parseFloat(A);return A===M.toString()?b(M):$i.invalid(x)},lf={...$i,from:m=>wo(m,"%")?hp("%",$i.percent,m):wo(m,"px")?hp("px",$i.pixels,m):$i.invalid(m)},lm=(m,b,x)=>{const A=lf.from(x),M=Ht(m,L=>L==="0px")?((L,U)=>{const K=L.fold(()=>ut(""),re=>ut(re/U+"px"),()=>ut(100/U+"%"));return Gt(U,K)})(A,m.length):((L,U,K)=>L.fold(()=>U,re=>((he,Se,me)=>{const be=me/Se;return D(he,_e=>lf.from(_e).fold(()=>_e,De=>De*be+"px",De=>De/100*me+"px"))})(U,K,re),re=>((he,Se)=>D(he,me=>lf.from(me).fold(()=>me,be=>be/Se*100+"%",be=>be+"%")))(U,K)))(A,m,b);return K1(M)},ay=(m,b)=>m.length===0?b:qo(m,(x,A)=>lf.from(A).fold(ut(0),Bt,Bt)+x,0),E_=(m,b)=>lf.from(m).fold(ut(m),x=>x+b+"px",x=>x+b+"%"),K1=m=>{if(m.length===0)return m;const b=qo(m,(A,M)=>{const L=lf.from(M).fold(()=>({value:M,remainder:0}),U=>((K,re)=>{const he=Math.floor(K);return{value:he+"px",remainder:K-he}})(U),U=>({value:U+"%",remainder:0}));return{output:[L.value].concat(A.output),remainder:A.remainder+L.remainder}},{output:[],remainder:0}),x=b.output;return x.slice(0,x.length-1).concat([E_(x[x.length-1],Math.round(b.remainder))])},cm=lf.from,Ts=(m,b,x)=>{const A=rn(m),M=A.all,L=so(A),U=Cl(A);b.each(K=>{const re=cm(K).fold(ut("px"),ut("px"),ut("%")),he=Ci(m),Se=((be,_e)=>_r(be,_e,Ua,Zf))(A,m),me=lm(Se,he,K);Sl(A)?((be,_e,De)=>{bt(_e,(Re,lt)=>{const ct=ay([be[lt]],Gr());pn(Re.element,"width",ct+De)})})(me,U,re):((be,_e,De)=>{bt(_e,Re=>{const lt=be.slice(Re.column,Re.colspan+Re.column),ct=ay(lt,Gr());pn(Re.element,"width",ct+De)})})(me,L,re),pn(m,"width",K)}),x.each(K=>{const re=vc(m),he=((Se,me)=>ca(Se,me,la,Zf))(A,m);((Se,me,be)=>{bt(be,_e=>{ri(_e.element,"height")}),bt(me,(_e,De)=>{pn(_e.element,"height",Se[De])})})(lm(he,re,K),M,L),pn(m,"height",K)})},iy=m=>ml(m).exists(b=>Ur.test(b)),Ys=m=>ml(m).exists(b=>ho.test(b)),Fd=m=>ml(m).isNone(),nd=m=>{an(m,"width"),an(m,"height")},bp=m=>{const b=zd(m);Ts(m,ve.some(b),ve.none()),nd(m)},tl=m=>{const b=(x=>Ci(x)+"px")(m);Ts(m,ve.some(b),ve.none()),nd(m)},Ga=m=>{ri(m,"width");const b=Na(m),x=b.length>0?b:Ds(m);bt(x,A=>{ri(A,"width"),nd(A)}),nd(m)},dm={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},kh=(m,b,x,A)=>Gt(m,M=>((L,U,K,re)=>{const he=vt.fromTag("tr");for(let Se=0;Se{m.selection.select(b.dom,!0),m.selection.collapse(!0)},Ch=(m,b,x,A,M)=>{const L=(K=>{const re=K.options,he=re.get("table_default_styles");return re.isSet("table_default_styles")?he:((Se,me)=>P(Se)||!ge(Se)?me:E(Se)?{...me,width:ci(Se)}:{...me,width:Ei})(K,he)})(m),U={styles:L,attributes:at(m),colGroups:xo(m)};return m.undoManager.ignore(()=>{const K=((he,Se,me,be,_e,De=dm)=>{const Re=vt.fromTag("table"),lt=_e!=="cells";Vl(Re,De.styles),ra(Re,De.attributes),De.colGroups&&zs(Re,(Nt=>{const Pt=vt.fromTag("colgroup");return Gt(Nt,()=>zs(Pt,vt.fromTag("col"))),Pt})(Se));const ct=Math.min(he,me);if(lt&&me>0){const Nt=vt.fromTag("thead");zs(Re,Nt);const Pt=kh(me,Se,_e==="sectionCells"?ct:0,be);Ki(Nt,Pt)}const it=vt.fromTag("tbody");zs(Re,it);const gt=kh(lt?he-ct:he,Se,lt?0:me,be);return Ki(it,gt),Re})(x,b,M,A,Ql(m),U);yn(K,"data-mce-id","__mce");const re=(he=>{const Se=vt.fromTag("div"),me=vt.fromDom(he.dom.cloneNode(!0));return zs(Se,me),(be=>be.dom.innerHTML)(Se)})(K);m.insertContent(re),m.addVisual()}),Vs(Wn(m),'table[data-mce-id="__mce"]').map(K=>(E(m)?tl(K):P(m)?Ga(K):(Tc(m)||(re=>W(re)&&re.indexOf("%")!==-1)(L.width))&&bp(K),Ws(K),an(K,"data-mce-id"),((re,he)=>{bt(Yn(he,"tr"),Se=>{W1(re,Se.dom),bt(Yn(Se,"th,td"),me=>{wh(re,me.dom)})})})(m,K),((re,he)=>{Vs(he,"td,th").each(Ke(yp,re))})(m,K),K.dom)).getOrNull()};var vp=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const T_="x-tinymce/dom-table-",G1=T_+"rows",Y1=T_+"columns",A_=m=>{const b=vp.FakeClipboardItem(m);vp.write([b])},Ya=m=>{var b;const x=(b=vp.read())!==null&&b!==void 0?b:[];return j(x,A=>ve.from(A.getType(m)))},um=m=>{Ya(m).isSome()&&vp.clear()},O_=m=>{m.fold(Hi,b=>A_({[G1]:b}))},Mc=()=>Ya(G1),Hi=()=>um(G1),_p=m=>{m.fold(z_,b=>A_({[Y1]:b}))},pg=()=>Ya(Y1),z_=()=>um(Y1),mr=m=>Ld(Nl(m),sr(m)).filter(rg),pr=(m,b)=>{const x=sr(m),A=me=>Q(me,x),M=me=>(be=>$s(Nl(be),sr(be)).filter(rg))(m).bind(be=>A(be).map(_e=>me(_e,be))),L=me=>{m.focus()},U=(me,be=!1)=>M((_e,De)=>{const Re=Qo(Rl(m),_e,De);me(_e,Re,be).each(L)}),K=()=>M((me,be)=>((_e,De,Re)=>{const lt=rn(_e);return ea(lt,De).bind(ct=>{const it=Tt(lt,Re,!1),gt=_s(it).rows.slice(ct[0].row,ct[ct.length-1].row+ct[ct.length-1].rowspan),Nt=pt(gt,Be=>{const Jt=Kt(Be.cells,Ao=>!Ao.isLocked);return Jt.length>0?[{...Be,cells:Jt}]:[]}),Pt=Lo(Nt);return Vr(Pt.length>0,Pt)}).map(ct=>D(ct,it=>{const gt=iu(it.element);return bt(it.cells,Nt=>{const Pt=gc(Nt.element);Z(Pt,"colspan",Nt.colspan,1),Z(Pt,"rowspan",Nt.rowspan,1),zs(gt,Pt)}),gt}))})(me,Qo(Rl(m),me,be),xs(st,vt.fromDom(m.getDoc()),ve.none()))),re=()=>M((me,be)=>((_e,De)=>{const Re=rn(_e);return qs(Re,De).map(lt=>{const ct=lt[lt.length-1],it=lt[0].column,gt=ct.column+ct.colspan,Nt=((Be,Jt,Ao)=>{if(Sl(Be)){const Xo=Kt(Cl(Be),Ba(Jt,Ao)),Io=D(Xo,Yo=>{const zn=gc(Yo.element);return ry(zn,"span",Ao-Jt),zn}),Oo=vt.fromTag("colgroup");return Ki(Oo,Io),[Oo]}return[]})(Re,it,gt),Pt=((Be,Jt,Ao)=>D(Be.all,Xo=>{const Io=Kt(Xo.cells,Ba(Jt,Ao)),Oo=D(Io,zn=>{const Lr=gc(zn.element);return ry(Lr,"colspan",Ao-Jt),Lr}),Yo=vt.fromTag("tr");return Ki(Yo,Oo),Yo}))(Re,it,gt);return[...Nt,...Pt]})})(me,Qo(Rl(m),me,be))),he=(me,be)=>be().each(_e=>{const De=D(_e,Re=>gc(Re));M((Re,lt)=>{const ct=Jn(vt.fromDom(m.getDoc())),it=((gt,Nt,Pt,Be)=>({selection:Md(gt),clipboard:Pt,generators:Be}))(Rl(m),0,De,ct);me(Re,it).each(L)})}),Se=me=>(be,_e)=>((De,Re)=>dn(De,Re)?ve.from(De[Re]):ve.none())(_e,"type").each(De=>{U(me(De),_e.no_events)});Sn({mceTableSplitCells:()=>U(b.unmergeCells),mceTableMergeCells:()=>U(b.mergeCells),mceTableInsertRowBefore:()=>U(b.insertRowsBefore),mceTableInsertRowAfter:()=>U(b.insertRowsAfter),mceTableInsertColBefore:()=>U(b.insertColumnsBefore),mceTableInsertColAfter:()=>U(b.insertColumnsAfter),mceTableDeleteCol:()=>U(b.deleteColumn),mceTableDeleteRow:()=>U(b.deleteRow),mceTableCutCol:()=>re().each(me=>{_p(me),U(b.deleteColumn)}),mceTableCutRow:()=>K().each(me=>{O_(me),U(b.deleteRow)}),mceTableCopyCol:()=>re().each(me=>_p(me)),mceTableCopyRow:()=>K().each(me=>O_(me)),mceTablePasteColBefore:()=>he(b.pasteColsBefore,pg),mceTablePasteColAfter:()=>he(b.pasteColsAfter,pg),mceTablePasteRowBefore:()=>he(b.pasteRowsBefore,Mc),mceTablePasteRowAfter:()=>he(b.pasteRowsAfter,Mc),mceTableDelete:()=>mr(m).each(me=>{Q(me,x).filter(Ut(x)).each(be=>{const _e=vt.fromText("");if(Dr(be,_e),ys(be),m.dom.isEmpty(m.getBody()))m.setContent(""),m.selection.setCursorLocation();else{const De=m.dom.createRng();De.setStart(_e.dom,0),De.setEnd(_e.dom,0),m.selection.setRng(De),m.nodeChanged()}})}),mceTableCellToggleClass:(me,be)=>{M(_e=>{const De=Rl(m),Re=Ht(De,ct=>m.formatter.match("tablecellclass",{value:be},ct.dom)),lt=Re?m.formatter.remove:m.formatter.apply;bt(De,ct=>lt("tablecellclass",{value:be},ct.dom)),Su(m,_e.dom,sy)})},mceTableToggleClass:(me,be)=>{M(_e=>{m.formatter.toggle("tableclass",{value:be},_e.dom),Su(m,_e.dom,sy)})},mceTableToggleCaption:()=>{mr(m).each(me=>{Q(me,x).each(be=>{_l(be,"caption").fold(()=>{const _e=vt.fromTag("caption");zs(_e,vt.fromText("Caption")),((De,Re,lt)=>{bd(De,0).fold(()=>{zs(De,Re)},ct=>{Vt(ct,Re)})})(be,_e),m.selection.setCursorLocation(_e.dom,0)},_e=>{os("caption")(me)&&Mi("td",be).each(De=>m.selection.setCursorLocation(De.dom,0)),ys(_e)}),Su(m,be.dom,ta)})})},mceTableSizingMode:(me,be)=>(_e=>mr(m).each(De=>{P(m)||E(m)||Tc(m)||Q(De,x).each(Re=>{_e!=="relative"||iy(Re)?_e!=="fixed"||Ys(Re)?_e!=="responsive"||Fd(Re)||Ga(Re):tl(Re):bp(Re),Ws(Re),Su(m,Re.dom,ta)})}))(be),mceTableCellType:Se(me=>me==="th"?b.makeCellsHeader:b.unmakeCellsHeader),mceTableColType:Se(me=>me==="th"?b.makeColumnsHeader:b.unmakeColumnsHeader),mceTableRowType:Se(me=>{switch(me){case"header":return b.makeRowsHeader;case"footer":return b.makeRowsFooter;default:return b.makeRowsBody}})},(me,be)=>m.addCommand(be,me)),m.addCommand("mceInsertTable",(me,be)=>{((_e,De,Re,lt={})=>{const ct=it=>mo(it)&&it>0;if(ct(De)&&ct(Re)){const it=lt.headerRows||0,gt=lt.headerColumns||0;return Ch(_e,Re,De,gt,it)}console.error("Invalid values for mceInsertTable - rows and columns values are required to insert a table.")})(m,be.rows,be.columns,be.options)}),m.addCommand("mceTableApplyCellStyle",(me,be)=>{const _e=lt=>"tablecell"+lt.toLowerCase().replace("-","");if(!te(be))return;const De=Kt(Rl(m),rg);if(De.length===0)return;const Re=((lt,ct)=>{const it={};return((gt,Nt,Pt,Be)=>{Sn(gt,(Jt,Ao)=>{(Nt(Jt,Ao)?Pt:Be)(Jt,Ao)})})(lt,ct,(gt=>(Nt,Pt)=>{gt[Pt]=Nt})(it),st),it})(be,(lt,ct)=>m.formatter.has(_e(ct))&&W(lt));(lt=>{for(const ct in lt)if(Cs.call(lt,ct))return!1;return!0})(Re)||(Sn(Re,(lt,ct)=>{const it=_e(ct);bt(De,gt=>{lt===""?m.formatter.remove(it,{value:null},gt.dom,!0):m.formatter.apply(it,{value:lt},gt.dom)})}),A(De[0]).each(lt=>Su(m,lt.dom,sy)))})},Br=rm([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),us={before:Br.before,on:Br.on,after:Br.after,cata:(m,b,x,A)=>m.fold(b,x,A),getStart:m=>m.fold(Bt,Bt,Bt)},ir=(m,b)=>({selection:m,kill:b}),Tr=(m,b)=>{const x=m.document.createRange();return x.selectNode(b.dom),x},ly=(m,b)=>{const x=m.document.createRange();return cy(x,b),x},cy=(m,b)=>m.selectNodeContents(b.dom),X1=(m,b,x)=>{const A=m.document.createRange();var M;return M=A,b.fold(L=>{M.setStartBefore(L.dom)},(L,U)=>{M.setStart(L.dom,U)},L=>{M.setStartAfter(L.dom)}),((L,U)=>{U.fold(K=>{L.setEndBefore(K.dom)},(K,re)=>{L.setEnd(K.dom,re)},K=>{L.setEndAfter(K.dom)})})(A,x),A},Sh=(m,b,x,A,M)=>{const L=m.document.createRange();return L.setStart(b.dom,x),L.setEnd(A.dom,M),L},J1=m=>({left:m.left,top:m.top,right:m.right,bottom:m.bottom,width:m.width,height:m.height}),xp=rm([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),dy=(m,b,x)=>b(vt.fromDom(x.startContainer),x.startOffset,vt.fromDom(x.endContainer),x.endOffset),uy=(m,b)=>{const x=((A,M)=>M.match({domRange:L=>({ltr:ut(L),rtl:ve.none}),relative:(L,U)=>({ltr:Go(()=>X1(A,L,U)),rtl:Go(()=>ve.some(X1(A,U,L)))}),exact:(L,U,K,re)=>({ltr:Go(()=>Sh(A,L,U,K,re)),rtl:Go(()=>ve.some(Sh(A,K,re,L,U)))})}))(m,b);return((A,M)=>{const L=M.ltr();return L.collapsed?M.rtl().filter(U=>U.collapsed===!1).map(U=>xp.rtl(vt.fromDom(U.endContainer),U.endOffset,vt.fromDom(U.startContainer),U.startOffset)).getOrThunk(()=>dy(0,xp.ltr,L)):dy(0,xp.ltr,L)})(0,x)},Q1=(m,b)=>uy(m,b).match({ltr:(x,A,M,L)=>{const U=m.document.createRange();return U.setStart(x.dom,A),U.setEnd(M.dom,L),U},rtl:(x,A,M,L)=>{const U=m.document.createRange();return U.setStart(M.dom,L),U.setEnd(x.dom,A),U}});xp.ltr,xp.rtl;const Eh=(m,b,x,A)=>({start:m,soffset:b,finish:x,foffset:A}),ol=(m,b,x,A)=>({start:us.on(m,b),finish:us.on(x,A)}),ev=(m,b)=>{const x=Q1(m,b);return Eh(vt.fromDom(x.startContainer),x.startOffset,vt.fromDom(x.endContainer),x.endOffset)},Ti=ol,Th=(m,b,x,A,M)=>as(x,A)?ve.none():ec(x,A,b).bind(L=>{const U=L.boxes.getOr([]);return U.length>1?(M(m,U,L.start,L.finish),ve.some(ir(ve.some(Ti(x,0,x,ur(x))),!0))):ve.none()}),wp=(m,b)=>({item:m,mode:b}),sd=(m,b,x,A=Ar)=>m.property().parent(b).map(M=>wp(M,A)),Ar=(m,b,x,A=fm)=>x.sibling(m,b).map(M=>wp(M,A)),fm=(m,b,x,A=fm)=>{const M=m.property().children(b);return x.first(M).map(L=>wp(L,A))},tv=[{current:sd,next:Ar,fallback:ve.none()},{current:Ar,next:fm,fallback:ve.some(sd)},{current:fm,next:fm,fallback:ve.some(Ar)}],ov=(m,b,x,A,M=tv)=>To(M,L=>L.current===x).bind(L=>L.current(m,b,A,L.next).orThunk(()=>L.fallback.bind(U=>ov(m,b,U,A)))),Ah=(m,b,x,A,M,L)=>ov(m,b,A,M).bind(U=>L(U.item)?ve.none():x(U.item)?ve.some(U.item):Ah(m,U.item,x,U.mode,M,L)),Eu=m=>b=>m.property().children(b).length===0,Zk=(m,b,x,A)=>Ah(m,b,x,Ar,{sibling:(M,L)=>M.query().prevSibling(L),first:M=>M.length>0?ve.some(M[M.length-1]):ve.none()},A),Oh=(m,b,x,A)=>Ah(m,b,x,Ar,{sibling:(M,L)=>M.query().nextSibling(L),first:M=>M.length>0?ve.some(M[0]):ve.none()},A),mm=Ac(),N_=(m,b)=>((x,A,M)=>Zk(x,A,Eu(x),M))(mm,m,b),zh=(m,b)=>((x,A,M)=>Oh(x,A,Eu(x),M))(mm,m,b),Nh=rm([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),fy=m=>Pn(m,"tr"),gg={...Nh,verify:(m,b,x,A,M,L,U)=>Pn(A,"td,th",U).bind(K=>Pn(b,"td,th",U).map(re=>as(K,re)?as(A,K)&&ur(K)===M?L(re):Nh.none("in same cell"):Dd(fy,[K,re]).fold(()=>((he,Se,me)=>{const be=he.getRect(Se),_e=he.getRect(me);return _e.right>be.left&&_e.leftL(re)))).getOr(Nh.none("default")),cata:(m,b,x,A,M)=>m.fold(b,x,A,M)},my=os("br"),Ai=(m,b,x)=>b(m,x).bind(A=>Ln(A)&&gu(A).trim().length===0?Ai(A,b,x):ve.some(A)),nv=(m,b,x,A)=>((M,L)=>bd(M,L).filter(my).orThunk(()=>bd(M,L-1).filter(my)))(b,x).bind(M=>A.traverse(M).fold(()=>Ai(M,A.gather,m).map(A.relative),L=>(U=>vi(U).bind(K=>{const re=$r(K);return((he,Se)=>Cr(he,Ke(as,Se)))(re,U).map(he=>((Se,me,be,_e)=>({parent:Se,children:me,element:be,index:_e}))(K,re,U,he))}))(L).map(U=>us.on(U.parent,U.index)))),Tu=(m,b)=>({left:m.left,top:m.top+b,right:m.right,bottom:m.bottom+b}),Dh=(m,b)=>({left:m.left,top:m.top-b,right:m.right,bottom:m.bottom-b}),$d=(m,b,x)=>({left:m.left+b,top:m.top+x,right:m.right+b,bottom:m.bottom+x}),Rh=m=>({left:m.left,top:m.top,right:m.right,bottom:m.bottom}),Mh=(m,b)=>ve.some(m.getRect(b)),pm=(m,b,x)=>Zn(b)?Mh(m,b).map(Rh):Ln(b)?((A,M,L)=>L>=0&&L0?A.getRangedRect(M,L-1,M,L):ve.none())(m,b,x).map(Rh):ve.none(),kp=(m,b)=>Zn(b)?Mh(m,b).map(Rh):Ln(b)?m.getRangedRect(b,0,b,ur(b)).map(Rh):ve.none(),Bc=rm([{none:[]},{retry:["caret"]}]),Bh=(m,b,x)=>hc(b,fp).fold(ue,A=>kp(m,A).exists(M=>((L,U)=>L.leftU.right)(x,M))),Wk={point:m=>m.bottom,adjuster:(m,b,x,A,M)=>{const L=Tu(M,5);return Math.abs(x.bottom-A.bottom)<1||x.top>M.bottom?Bc.retry(L):x.top===M.bottom?Bc.retry(Tu(M,1)):Bh(m,b,M)?Bc.retry($d(L,5,0)):Bc.none()},move:Tu,gather:zh},sc=(m,b,x,A,M)=>M===0?ve.some(A):((L,U,K)=>L.elementFromPoint(U,K).filter(re=>ao(re)==="table").isSome())(m,A.left,b.point(A))?((L,U,K,re,he)=>sc(L,U,K,U.move(re,5),he))(m,b,x,A,M-1):m.situsFromPoint(A.left,b.point(A)).bind(L=>L.start.fold(ve.none,U=>kp(m,U).bind(K=>b.adjuster(m,U,K,x,A).fold(ve.none,re=>sc(m,b,x,re,M-1))).orThunk(()=>ve.some(A)),ve.none)),Au=(m,b,x)=>{const A=m.move(x,5),M=sc(b,m,x,A,100).getOr(A);return((L,U,K)=>L.point(U)>K.getInnerHeight()?ve.some(L.point(U)-K.getInnerHeight()):L.point(U)<0?ve.some(-L.point(U)):ve.none())(m,M,b).fold(()=>b.situsFromPoint(M.left,m.point(M)),L=>(b.scrollBy(0,L),b.situsFromPoint(M.left,m.point(M)-L)))},Lc={tryUp:Ke(Au,{point:m=>m.top,adjuster:(m,b,x,A,M)=>{const L=Dh(M,5);return Math.abs(x.top-A.top)<1||x.bottomm.getSelection().bind(A=>((M,L,U,K)=>(my(L)?((he,Se,me)=>me.traverse(Se).orThunk(()=>Ai(Se,me.gather,he)).map(me.relative))(M,L,K):nv(M,L,U,K)).map(he=>({start:he,finish:he})))(b,A.finish,A.foffset,x).fold(()=>ve.some(Ho(A.finish,A.foffset)),M=>{const L=m.fromSitus(M);return U=gg.verify(m,A.finish,A.foffset,L.finish,L.foffset,x.failure,b),gg.cata(U,K=>ve.none(),()=>ve.none(),K=>ve.some(Ho(K,0)),K=>ve.some(Ho(K,ur(K))));var U})),ua=(m,b,x,A,M,L)=>L===0?ve.none():qk(m,b,x,A,M).bind(U=>{const K=m.fromSitus(U),re=gg.verify(m,x,A,K.finish,K.foffset,M.failure,b);return gg.cata(re,()=>ve.none(),()=>ve.some(U),he=>as(x,he)&&A===0?Pc(m,x,A,Dh,M):ua(m,b,he,0,M,L-1),he=>as(x,he)&&A===ur(he)?Pc(m,x,A,Tu,M):ua(m,b,he,ur(he),M,L-1))}),Pc=(m,b,x,A,M)=>pm(m,b,x).bind(L=>nl(m,M,A(L,Lc.getJumpSize()))),nl=(m,b,x)=>{const A=Zl().browser;return A.isChromium()||A.isSafari()||A.isFirefox()?b.retry(m,x):ve.none()},qk=(m,b,x,A,M)=>pm(m,x,A).bind(L=>nl(m,M,L)),cf=(m,b,x,A,M)=>Pn(A,"td,th",b).bind(L=>Pn(L,"table",b).bind(U=>((K,re)=>Yi(K,he=>vi(he).exists(Se=>as(Se,re)),void 0).isSome())(M,U)?((K,re,he)=>sv(K,re,he).bind(Se=>ua(K,re,Se.element,Se.offset,he,20).map(K.fromSitus)))(m,b,x).bind(K=>Pn(K.finish,"td,th",b).map(re=>({start:L,finish:re,range:K}))):ve.none())),Ou=(m,b,x,A,M,L)=>L(A,b).orThunk(()=>cf(m,b,x,A,M).map(U=>{const K=U.range;return ir(ve.some(Ti(K.start,K.soffset,K.finish,K.foffset)),!0)})),hg=(m,b)=>Pn(m,"tr",b).bind(x=>Pn(x,"table",b).bind(A=>{const M=Yn(A,"tr");return as(x,M[0])?((L,U,K)=>Zk(mm,L,re=>Jl(re).isSome(),K))(A,0,b).map(L=>{const U=ur(L);return ir(ve.some(Ti(L,U,L,U)),!0)}):ve.none()})),gm=(m,b)=>Pn(m,"tr",b).bind(x=>Pn(x,"table",b).bind(A=>{const M=Yn(A,"tr");return as(x,M[M.length-1])?((L,U,K)=>Oh(mm,L,re=>Ju(re).isSome(),K))(A,0,b).map(L=>ir(ve.some(Ti(L,0,L,0)),!0)):ve.none()})),Pl=(m,b,x,A,M,L,U)=>cf(m,x,A,M,L).bind(K=>Th(b,x,K.start,K.finish,U)),py=m=>{let b=m;return{get:()=>b,set:x=>{b=x}}},gy=()=>{const m=(b=>{const x=py(ve.none()),A=()=>x.get().each(b);return{clear:()=>{A(),x.set(ve.none())},isSet:()=>x.get().isSome(),get:()=>x.get(),set:M=>{A(),x.set(ve.some(M))}}})(st);return{...m,on:b=>m.get().each(b)}},Lh=(m,b)=>Pn(m,"td,th",b),hy=m=>vl(m).exists(Bo),D_={traverse:$a,gather:zh,relative:us.before,retry:Lc.tryDown,failure:gg.failedDown},Ph={traverse:Ro,gather:N_,relative:us.before,retry:Lc.tryUp,failure:gg.failedUp},zu=m=>b=>b===m,Ih=zu(38),Cp=zu(40),Sp=m=>m>=37&&m<=40,df={isBackward:zu(37),isForward:zu(39)},uf={isBackward:zu(39),isForward:zu(37)},Fh=rm([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),ff={domRange:Fh.domRange,relative:Fh.relative,exact:Fh.exact,exactFromRange:m=>Fh.exact(m.start,m.soffset,m.finish,m.foffset),getWin:m=>{const b=(x=>x.match({domRange:A=>vt.fromDom(A.startContainer),relative:(A,M)=>us.getStart(A),exact:(A,M,L,U)=>A}))(m);return vt.fromDom(Bi(b).dom.defaultView)},range:Eh},mf=(m,b)=>{const x=ao(m);return x==="input"?us.after(m):uo(["br","img"],x)?b===0?us.before(m):us.after(m):us.on(m,b)},pf=m=>ve.from(m.getSelection()),Ep=(m,b)=>{pf(m).each(x=>{x.removeAllRanges(),x.addRange(b)})},by=(m,b,x,A,M)=>{const L=Sh(m,b,x,A,M);Ep(m,L)},bg=(m,b)=>uy(m,b).match({ltr:(x,A,M,L)=>{by(m,x,A,M,L)},rtl:(x,A,M,L)=>{pf(m).each(U=>{if(U.setBaseAndExtent)U.setBaseAndExtent(x.dom,A,M.dom,L);else if(U.extend)try{((K,re,he,Se,me,be)=>{re.collapse(he.dom,Se),re.extend(me.dom,be)})(0,U,x,A,M,L)}catch{by(m,M,L,x,A)}else by(m,M,L,x,A)})}}),yy=(m,b,x,A,M)=>{const L=((U,K,re,he)=>{const Se=mf(U,K),me=mf(re,he);return ff.relative(Se,me)})(b,x,A,M);bg(m,L)},rv=(m,b,x)=>{const A=((M,L)=>{const U=M.fold(us.before,mf,us.after),K=L.fold(us.before,mf,us.after);return ff.relative(U,K)})(b,x);bg(m,A)},yg=m=>{if(m.rangeCount>0){const b=m.getRangeAt(0),x=m.getRangeAt(m.rangeCount-1);return ve.some(Eh(vt.fromDom(b.startContainer),b.startOffset,vt.fromDom(x.endContainer),x.endOffset))}return ve.none()},fa=m=>{if(m.anchorNode===null||m.focusNode===null)return yg(m);{const b=vt.fromDom(m.anchorNode),x=vt.fromDom(m.focusNode);return((A,M,L,U)=>{const K=((he,Se,me,be)=>{const _e=cl(he).dom.createRange();return _e.setStart(he.dom,Se),_e.setEnd(me.dom,be),_e})(A,M,L,U),re=as(A,L)&&M===U;return K.collapsed&&!re})(b,m.anchorOffset,x,m.focusOffset)?ve.some(Eh(b,m.anchorOffset,x,m.focusOffset)):yg(m)}},av=(m,b,x=!0)=>{const A=(x?ly:Tr)(m,b);Ep(m,A)},R_=m=>(b=>pf(b).filter(x=>x.rangeCount>0).bind(fa))(m).map(b=>ff.exact(b.start,b.soffset,b.finish,b.foffset)),iv=(m,b,x)=>((A,M,L)=>((U,K,re)=>U.caretPositionFromPoint?((he,Se,me)=>{var be;return ve.from((be=he.caretPositionFromPoint)===null||be===void 0?void 0:be.call(he,Se,me)).bind(_e=>{if(_e.offsetNode===null)return ve.none();const De=he.createRange();return De.setStart(_e.offsetNode,_e.offset),De.collapse(),ve.some(De)})})(U,K,re):U.caretRangeFromPoint?((he,Se,me)=>{var be;return ve.from((be=he.caretRangeFromPoint)===null||be===void 0?void 0:be.call(he,Se,me))})(U,K,re):ve.none())(A.document,M,L).map(U=>Eh(vt.fromDom(U.startContainer),U.startOffset,vt.fromDom(U.endContainer),U.endOffset)))(m,b,x),lv=m=>({elementFromPoint:(b,x)=>vt.fromPoint(vt.fromDom(m.document),b,x),getRect:b=>b.dom.getBoundingClientRect(),getRangedRect:(b,x,A,M)=>{const L=ff.exact(b,x,A,M);return((U,K)=>(re=>{const he=re.getClientRects(),Se=he.length>0?he[0]:re.getBoundingClientRect();return Se.width>0||Se.height>0?ve.some(Se).map(J1):ve.none()})(Q1(U,K)))(m,L)},getSelection:()=>R_(m).map(b=>ev(m,b)),fromSitus:b=>{const x=ff.relative(b.start,b.finish);return ev(m,x)},situsFromPoint:(b,x)=>iv(m,b,x).map(A=>ol(A.start,A.soffset,A.finish,A.foffset)),clearSelection:()=>{(b=>{pf(b).each(x=>x.removeAllRanges())})(m)},collapseSelection:(b=!1)=>{R_(m).each(x=>x.fold(A=>A.collapse(b),(A,M)=>{const L=b?A:M;rv(m,L,L)},(A,M,L,U)=>{const K=b?A:L,re=b?M:U;yy(m,K,re,K,re)}))},setSelection:b=>{yy(m,b.start,b.soffset,b.finish,b.foffset)},setRelativeSelection:(b,x)=>{rv(m,b,x)},selectNode:b=>{av(m,b,!1)},selectContents:b=>{av(m,b)},getInnerHeight:()=>m.innerHeight,getScrollY:()=>(b=>{const x=b!==void 0?b.dom:document,A=x.body.scrollLeft||x.documentElement.scrollLeft,M=x.body.scrollTop||x.documentElement.scrollTop;return ja(A,M)})(vt.fromDom(m.document)).top,scrollBy:(b,x)=>{((A,M,L)=>{const U=(L!==void 0?L.dom:document).defaultView;U&&U.scrollBy(A,M)})(b,x,vt.fromDom(m.document))}}),gf=(m,b)=>({rows:m,cols:b}),vy=m=>hc(m,rs).exists(Bo),$h=(m,b)=>vy(m)||vy(b),cv=m=>m.dom.classList!==void 0,Kk=(m,b)=>((x,A,M)=>{const L=((U,K)=>{const re=St(U,K);return re===void 0||re===""?[]:re.split(" ")})(x,A).concat([M]);return yn(x,A,L.join(" ")),!0})(m,"class",b),hf=(m,b)=>{cv(m)?m.dom.classList.add(b):Kk(m,b)},Hh=(m,b)=>cv(m)&&m.dom.classList.contains(b),M_=()=>({tag:"none"}),B_=m=>({tag:"multiple",elements:m}),rd=m=>({tag:"single",element:m}),dv=m=>{const b=vt.fromDom((K=>{if(Me(K.target)){const re=vt.fromDom(K.target);if(Zn(re)&&Me(re.dom.shadowRoot)&&K.composed&&K.composedPath){const he=K.composedPath();if(he)return fn(he)}}return ve.from(K.target)})(m).getOr(m.target)),x=()=>m.stopPropagation(),A=()=>m.preventDefault(),M=(L=A,U=x,(...K)=>L(U.apply(null,K)));var L,U;return((K,re,he,Se,me,be,_e)=>({target:K,x:re,y:he,stop:Se,prevent:me,kill:be,raw:_e}))(b,m.clientX,m.clientY,x,A,M,m)},_y=(m,b,x,A)=>{m.dom.removeEventListener(b,x,A)},L_=Ct,Tp=(m,b,x)=>((A,M,L,U)=>((K,re,he,Se,me)=>{const be=((_e,De)=>Re=>{_e(Re)&&De(dv(Re))})(he,Se);return K.dom.addEventListener(re,be,me),{unbind:Ke(_y,K,re,be,me)}})(A,M,L,U,!1))(m,b,L_,x),vg=dv,Vh=m=>!Hh(vt.fromDom(m.target),"ephox-snooker-resizer-bar"),P_=(m,b)=>{const x=(M=Bd.selectedSelector,{get:()=>Dl(vt.fromDom(m.getBody()),M).fold(()=>$s(Nl(m),sr(m)).fold(M_,rd),B_)}),A=((L,U,K)=>{const re=be=>{an(be,L.selected),an(be,L.firstSelected),an(be,L.lastSelected)},he=be=>{yn(be,L.selected,"1")},Se=be=>{me(be),K()},me=be=>{const _e=Yn(be,`${L.selectedSelector},${L.firstSelectedSelector},${L.lastSelectedSelector}`);bt(_e,re)};return{clearBeforeUpdate:me,clear:Se,selectRange:(be,_e,De,Re)=>{Se(be),bt(_e,he),yn(De,L.firstSelected,"1"),yn(Re,L.lastSelected,"1"),U(_e,De,Re)},selectedSelector:L.selectedSelector,firstSelectedSelector:L.firstSelectedSelector,lastSelectedSelector:L.lastSelectedSelector}})(Bd,(L,U,K)=>{Q(U).each(re=>{const he=D(L,_e=>_e.dom),Se=Ji(m),me=xs(st,vt.fromDom(m.getDoc()),Se),be=((_e,De,Re)=>{const lt=rn(_e);return ea(lt,De).map(ct=>{const it=Tt(lt,Re,!1),{rows:gt}=_s(it),Nt=((Be,Jt)=>{const Ao=Be.slice(0,Jt[Jt.length-1].row+1),Xo=Lo(Ao);return pt(Xo,Io=>{const Oo=Io.cells.slice(0,Jt[Jt.length-1].column+1);return D(Oo,Yo=>Yo.element)})})(gt,ct),Pt=((Be,Jt)=>{const Ao=Be.slice(Jt[0].row+Jt[0].rowspan-1,Be.length),Xo=Lo(Ao);return pt(Xo,Io=>{const Oo=Io.cells.slice(Jt[0].column+Jt[0].colspan-1,Io.cells.length);return D(Oo,Yo=>Yo.element)})})(gt,ct);return{upOrLeftCells:Nt,downOrRightCells:Pt}})})(re,{selection:Rl(m)},me).map(_e=>bi(_e,De=>D(De,Re=>Re.dom))).getOrUndefined();((_e,De,Re,lt,ct)=>{_e.dispatch("TableSelectionChange",{cells:De,start:Re,finish:lt,otherCells:ct})})(m,he,U.dom,K.dom,be)})},()=>(L=>{L.dispatch("TableSelectionClear")})(m));var M;return m.on("init",L=>{const U=m.getWin(),K=Wn(m),re=sr(m),he=((Re,lt,ct,it)=>{const gt=((Nt,Pt,Be,Jt)=>{const Ao=gy(),Xo=Ao.clear,Io=Oo=>{Ao.on(Yo=>{Jt.clearBeforeUpdate(Pt),Lh(Oo.target,Be).each(zn=>{ec(Yo,zn,Be).each(Lr=>{const mi=Lr.boxes.getOr([]);if(mi.length===1){const La=mi[0],rc=io(La)==="false",vm=ki(Uo(Oo.target),La,as);rc&&vm&&Jt.selectRange(Pt,mi,La,La)}else mi.length>1&&(Jt.selectRange(Pt,mi,Lr.start,Lr.finish),Nt.selectContents(zn))})})})};return{clearstate:Xo,mousedown:Oo=>{Jt.clear(Pt),Lh(Oo.target,Be).filter(hy).each(Ao.set)},mouseover:Oo=>{Io(Oo)},mouseup:Oo=>{Io(Oo),Xo()}}})(lv(Re),lt,ct,it);return{clearstate:gt.clearstate,mousedown:gt.mousedown,mouseover:gt.mouseover,mouseup:gt.mouseup}})(U,K,re,A),Se=((Re,lt,ct,it)=>{const gt=lv(Re),Nt=()=>(it.clear(lt),ve.none());return{keydown:(Pt,Be,Jt,Ao,Xo,Io)=>{const Oo=Pt.raw,Yo=Oo.which,zn=Oo.shiftKey===!0;return Xf(lt,it.selectedSelector).fold(()=>(Sp(Yo)&&!zn&&it.clearBeforeUpdate(lt),Sp(Yo)&&zn&&!$h(Be,Ao)?ve.none:Cp(Yo)&&zn?Ke(Pl,gt,lt,ct,D_,Ao,Be,it.selectRange):Ih(Yo)&&zn?Ke(Pl,gt,lt,ct,Ph,Ao,Be,it.selectRange):Cp(Yo)?Ke(Ou,gt,ct,D_,Ao,Be,gm):Ih(Yo)?Ke(Ou,gt,ct,Ph,Ao,Be,hg):ve.none),mi=>{const La=rc=>()=>j(rc,pi=>((Hd,xg,vf,wg,Ty)=>ka(wg,Hd,xg,Ty.firstSelectedSelector,Ty.lastSelectedSelector).map(_f=>(Ty.clearBeforeUpdate(vf),Ty.selectRange(vf,_f.boxes,_f.start,_f.finish),_f.boxes)))(pi.rows,pi.cols,lt,mi,it)).fold(()=>Rd(lt,it.firstSelectedSelector,it.lastSelectedSelector).map(pi=>{const Hd=Cp(Yo)||Io.isForward(Yo)?us.after:us.before;return gt.setRelativeSelection(us.on(pi.first,0),Hd(pi.table)),it.clear(lt),ir(ve.none(),!0)}),pi=>ve.some(ir(ve.none(),!0)));return Sp(Yo)&&zn&&!$h(Be,Ao)?ve.none:Cp(Yo)&&zn?La([gf(1,0)]):Ih(Yo)&&zn?La([gf(-1,0)]):Io.isBackward(Yo)&&zn?La([gf(0,-1),gf(-1,0)]):Io.isForward(Yo)&&zn?La([gf(0,1),gf(1,0)]):Sp(Yo)&&!zn?Nt:ve.none})()},keyup:(Pt,Be,Jt,Ao,Xo)=>Xf(lt,it.selectedSelector).fold(()=>{const Io=Pt.raw,Oo=Io.which;return Io.shiftKey===!0&&Sp(Oo)&&$h(Be,Ao)?((Yo,zn,Lr,mi,La,rc,vm)=>as(Lr,La)&&mi===rc?ve.none():Pn(Lr,"td,th",zn).bind(pi=>Pn(La,"td,th",zn).bind(Hd=>Th(Yo,zn,pi,Hd,vm))))(lt,ct,Be,Jt,Ao,Xo,it.selectRange):ve.none()},ve.none)}})(U,K,re,A),me=((Re,lt,ct,it)=>{const gt=lv(Re);return(Nt,Pt)=>{it.clearBeforeUpdate(lt),ec(Nt,Pt,ct).each(Be=>{const Jt=Be.boxes.getOr([]);it.selectRange(lt,Jt,Be.start,Be.finish),gt.selectContents(Pt),gt.collapseSelection()})}})(U,K,re,A);m.on("TableSelectorChange",Re=>me(Re.start,Re.finish));const be=(Re,lt)=>{(ct=>ct.raw.shiftKey===!0)(Re)&&(lt.kill&&Re.kill(),lt.selection.each(ct=>{const it=ff.relative(ct.start,ct.finish),gt=Q1(U,it);m.selection.setRng(gt)}))},_e=Re=>Re.button===0,De=(()=>{const Re=py(vt.fromDom(K)),lt=py(0);return{touchEnd:ct=>{const it=vt.fromDom(ct.target);if(os("td")(it)||os("th")(it)){const gt=Re.get(),Nt=lt.get();as(gt,it)&&ct.timeStamp-Nt<300&&(ct.preventDefault(),me(it,it))}Re.set(it),lt.set(ct.timeStamp)}}})();m.on("dragstart",Re=>{he.clearstate()}),m.on("mousedown",Re=>{_e(Re)&&Vh(Re)&&he.mousedown(vg(Re))}),m.on("mouseover",Re=>{var lt;(lt=Re).buttons!==void 0&&!(1<.buttons)||!Vh(Re)||he.mouseover(vg(Re))}),m.on("mouseup",Re=>{_e(Re)&&Vh(Re)&&he.mouseup(vg(Re))}),m.on("touchend",De.touchEnd),m.on("keyup",Re=>{const lt=vg(Re);if(lt.raw.shiftKey&&Sp(lt.raw.which)){const ct=m.selection.getRng(),it=vt.fromDom(ct.startContainer),gt=vt.fromDom(ct.endContainer);Se.keyup(lt,it,ct.startOffset,gt,ct.endOffset).each(Nt=>{be(lt,Nt)})}}),m.on("keydown",Re=>{const lt=vg(Re);b.hide();const ct=m.selection.getRng(),it=vt.fromDom(ct.startContainer),gt=vt.fromDom(ct.endContainer),Nt=un(df,uf)(vt.fromDom(m.selection.getStart()));Se.keydown(lt,it,ct.startOffset,gt,ct.endOffset,Nt).each(Pt=>{be(lt,Pt)}),b.show()}),m.on("NodeChange",()=>{const Re=m.selection,lt=vt.fromDom(Re.getStart()),ct=vt.fromDom(Re.getEnd());Dd(Q,[lt,ct]).fold(()=>A.clear(K),st)})}),m.on("PreInit",()=>{m.serializer.addTempAttr(Bd.firstSelected),m.serializer.addTempAttr(Bd.lastSelected)}),{getSelectedCells:()=>((L,U,K,re)=>{switch(L.tag){case"none":return U();case"single":return(he=>[he.dom])(L.element);case"multiple":return(he=>D(he,Se=>Se.dom))(L.elements)}})(x.get(),ut([])),clearSelectedCells:L=>A.clear(vt.fromDom(L))}},ad=m=>{let b=[];return{bind:x=>{if(x===void 0)throw new Error("Event bind error: undefined handler");b.push(x)},unbind:x=>{b=Kt(b,A=>A!==x)},trigger:(...x)=>{const A={};bt(m,(M,L)=>{A[M]=x[L]}),bt(b,M=>{M(A)})}}},hm=m=>({registry:bi(m,b=>({bind:b.bind,unbind:b.unbind})),trigger:bi(m,b=>b.trigger)}),jh=m=>m.slice(0).sort(),Uh=(m,b)=>{const x=Kt(b,A=>!uo(m,A));x.length>0&&(A=>{throw new Error("Unsupported keys for object: "+jh(A).join(", "))})(x)},xy=m=>((b,x)=>((A,M,L)=>{if(M.length===0)throw new Error("You must specify at least one required field.");return((U,K)=>{if(!ce(K))throw new Error("The "+U+" fields must be an array. Was: "+K+".");bt(K,re=>{if(!W(re))throw new Error("The value "+re+" in the "+U+" fields was not a string.")})})("required",M),(U=>{const K=jh(U);To(K,(re,he)=>he{throw new Error("The field: "+re+" occurs more than once in the combined fields: ["+K.join(", ")+"].")})})(M),U=>{const K=Fr(U);Ht(M,he=>uo(K,he))||((he,Se)=>{throw new Error("All required keys ("+jh(he).join(", ")+") were not specified. Specified keys were: "+jh(Se).join(", ")+".")})(M,K),A(M,K);const re=Kt(M,he=>!L.validate(U[he],he));return re.length>0&&((he,Se)=>{throw new Error("All values need to be of type: "+Se+". Keys ("+jh(he).join(", ")+") were not.")})(re,L.label),U}})(b,x,{validate:Ot,label:"function"}))(Uh,m),Zh=xy(["compare","extract","mutate","sink"]),Xa=xy(["element","start","stop","destroy"]),wy=xy(["forceDrop","drop","move","delayDrop"]),bm=()=>{const m=(()=>{const A=hm({move:ad(["info"])});return{onEvent:st,reset:st,events:A.registry}})(),b=(()=>{let A=ve.none();const M=hm({move:ad(["info"])});return{onEvent:(L,U)=>{U.extract(L).each(K=>{((he,Se)=>{const me=A.map(be=>he.compare(be,Se));return A=ve.some(Se),me})(U,K).each(he=>{M.trigger.move(he)})})},reset:()=>{A=ve.none()},events:M.registry}})();let x=m;return{on:()=>{x.reset(),x=b},off:()=>{x.reset(),x=m},isOn:()=>x===b,onEvent:(A,M)=>{x.onEvent(A,M)},events:b.events}},ym=m=>{const b=m.replace(/\./g,"-");return{resolve:x=>b+"-"+x}},Wh=ym("ephox-dragster").resolve;var ky=Zh({compare:(m,b)=>ja(b.left-m.left,b.top-m.top),extract:m=>ve.some(ja(m.x,m.y)),sink:(m,b)=>{const x=(K=>{const re={layerClass:Wh("blocker"),...K},he=vt.fromTag("div");return yn(he,"role","presentation"),Vl(he,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),hf(he,Wh("blocker")),hf(he,re.layerClass),{element:ut(he),destroy:()=>{ys(he)}}})(b),A=Tp(x.element(),"mousedown",m.forceDrop),M=Tp(x.element(),"mouseup",m.drop),L=Tp(x.element(),"mousemove",m.move),U=Tp(x.element(),"mouseout",m.delayDrop);return Xa({element:x.element,start:K=>{zs(K,x.element())},stop:()=>{ys(x.element())},destroy:()=>{x.destroy(),M.unbind(),L.unbind(),U.unbind(),A.unbind()}})},mutate:(m,b)=>{m.mutate(b.left,b.top)}});const Ap=ym("ephox-snooker").resolve,bf=Ap("resizer-bar"),uv=Ap("resizer-rows"),Cy=Ap("resizer-cols"),Vi=m=>{const b=Yn(m.parent(),"."+bf);bt(b,ys)},yf=(m,b,x)=>{const A=m.origin();bt(b,M=>{M.each(L=>{const U=x(A,L);hf(U,bf),zs(m.parent(),U)})})},fv=(m,b,x,A,M)=>{const L=Ad(x),U=b.isResizable,K=A.length>0?_c.positions(A,x):[],re=K.length>0?((me,be)=>pt(me.all,(_e,De)=>be(_e.element)?[De]:[]))(m,U):[];((me,be,_e,De)=>{yf(me,be,(Re,lt)=>{const ct=((it,gt,Nt,Pt,Be)=>{const Jt=vt.fromTag("div");return Vl(Jt,{position:"absolute",left:gt+"px",top:Nt-3.5+"px",height:"7px",width:Pt+"px"}),ra(Jt,{"data-row":it,role:"presentation"}),Jt})(lt.row,_e.left-Re.left,lt.y-Re.top,De);return hf(ct,uv),ct})})(b,Kt(K,(me,be)=>Fe(re,_e=>be===_e)),L,Sd(x));const he=M.length>0?Od.positions(M,x):[],Se=he.length>0?((me,be)=>{const _e=[];return Gt(me.grid.columns,De=>{Nn(me,De).map(Re=>Re.element).forall(be)&&_e.push(De)}),Kt(_e,De=>{const Re=jr(me,lt=>lt.column===De);return Ht(Re,lt=>be(lt.element))})})(m,U):[];((me,be,_e,De)=>{yf(me,be,(Re,lt)=>{const ct=((it,gt,Nt,Pt,Be)=>{const Jt=vt.fromTag("div");return Vl(Jt,{position:"absolute",left:gt-3.5+"px",top:Nt+"px",height:Be+"px",width:"7px"}),ra(Jt,{"data-column":it,role:"presentation"}),Jt})(lt.col,lt.x-Re.left,_e.top-Re.top,0,De);return hf(ct,Cy),ct})})(b,Kt(he,(me,be)=>Fe(Se,_e=>be===_e)),L,jf(x))},Ue=(m,b)=>{if(Vi(m),m.isResizable(b)){const x=rn(b),A=Kl(x),M=du(x);fv(x,m,b,A,M)}},_g=(m,b)=>{const x=Yn(m.parent(),"."+bf);bt(x,b)},Gk=m=>{_g(m,b=>{pn(b,"display","none")})},I_=m=>{_g(m,b=>{pn(b,"display","block")})},Sy=Ap("resizer-bar-dragging"),id=m=>{const b=(()=>{const me=hm({drag:ad(["xDelta","yDelta","target"])});let be=ve.none();const _e=(()=>{const De=hm({drag:ad(["xDelta","yDelta"])});return{mutate:(Re,lt)=>{De.trigger.drag(Re,lt)},events:De.registry}})();return _e.events.drag.bind(De=>{be.each(Re=>{me.trigger.drag(De.xDelta,De.yDelta,Re)})}),{assign:De=>{be=ve.some(De)},get:()=>be,mutate:_e.mutate,events:me.registry}})(),x=((me,be={})=>{var _e;return((De,Re,lt)=>{let ct=!1;const it=hm({start:ad([]),stop:ad([])}),gt=bm(),Nt=()=>{Jt.stop(),gt.isOn()&&(gt.off(),it.trigger.stop())},Pt=((Ao,Xo)=>{let Io=null;const Oo=()=>{Ee(Io)||(clearTimeout(Io),Io=null)};return{cancel:Oo,throttle:(...Yo)=>{Oo(),Io=setTimeout(()=>{Io=null,Ao.apply(null,Yo)},200)}}})(Nt);gt.events.move.bind(Ao=>{Re.mutate(De,Ao.info)});const Be=Ao=>(...Xo)=>{ct&&Ao.apply(null,Xo)},Jt=Re.sink(wy({forceDrop:Nt,drop:Be(Nt),move:Be(Ao=>{Pt.cancel(),gt.onEvent(Ao,Re)}),delayDrop:Be(Pt.throttle)}),lt);return{element:Jt.element,go:Ao=>{Jt.start(Ao),gt.on(),it.trigger.start()},on:()=>{ct=!0},off:()=>{ct=!1},isActive:()=>ct,destroy:()=>{Jt.destroy()},events:it.registry}})(me,(_e=be.mode)!==null&&_e!==void 0?_e:ky,be)})(b,{});let A=ve.none();const M=(me,be)=>ve.from(St(me,be));b.events.drag.bind(me=>{M(me.target,"data-row").each(be=>{const _e=bc(me.target,"top");pn(me.target,"top",_e+me.yDelta+"px")}),M(me.target,"data-column").each(be=>{const _e=bc(me.target,"left");pn(me.target,"left",_e+me.xDelta+"px")})});const L=(me,be)=>bc(me,be)-Ns(me,"data-initial-"+be,0);x.events.stop.bind(()=>{b.get().each(me=>{A.each(be=>{M(me,"data-row").each(_e=>{const De=L(me,"top");an(me,"data-initial-top"),Se.trigger.adjustHeight(be,De,parseInt(_e,10))}),M(me,"data-column").each(_e=>{const De=L(me,"left");an(me,"data-initial-left"),Se.trigger.adjustWidth(be,De,parseInt(_e,10))}),Ue(m,be)})})});const U=(me,be)=>{Se.trigger.startAdjust(),b.assign(me),yn(me,"data-initial-"+be,bc(me,be)),hf(me,Sy),pn(me,"opacity","0.2"),x.go(m.parent())},K=Tp(m.parent(),"mousedown",me=>{var be;be=me.target,Hh(be,uv)&&U(me.target,"top"),(_e=>Hh(_e,Cy))(me.target)&&U(me.target,"left")}),re=me=>as(me,m.view()),he=Tp(m.view(),"mouseover",me=>{var be;(be=me.target,Pn(be,"table",re).filter(Bo)).fold(()=>{Gi(me.target)&&Vi(m)},_e=>{x.isActive()&&(A=ve.some(_e),Ue(m,_e))})}),Se=hm({adjustHeight:ad(["table","delta","row"]),adjustWidth:ad(["table","delta","column"]),startAdjust:ad([])});return{destroy:()=>{K.unbind(),he.unbind(),x.destroy(),Vi(m)},refresh:me=>{Ue(m,me)},on:x.on,off:x.off,hideBars:Ke(Gk,m),showBars:Ke(I_,m),events:Se.registry}},Ey=m=>Me(m)&&m.nodeName==="TABLE",qh="bar-",mv=m=>St(m,"data-mce-resize")!=="false",pv=m=>{const b=gy(),x=gy(),A=gy();let M,L,U,K;const re=me=>af(m,me),he=()=>Jc(m)?cg():Oc(),Se=(me,be,_e,De)=>{const Re=(it=>{return _d(gt=it,"corner-")?((Nt,Pt)=>Nt.substring(7))(gt):gt;var gt})(be),lt=wo(Re,"e"),ct=_d(Re,"n");if(L===""&&bp(me),K===""&&(it=>{const gt=(Nt=>vc(Nt)+"px")(it);Ts(it,ve.none(),ve.some(gt)),nd(it)})(me),_e!==M&&L!==""){pn(me,"width",L);const it=he(),gt=re(me),Nt=Jc(m)||lt?(Pt=>Bl(Pt).columns)(me)-1:0;ku(me,_e-M,Nt,it,gt)}else if((it=>/^(\d+(\.\d+)?)%$/.test(it))(L)){const it=parseFloat(L.replace("%",""));pn(me,"width",_e*it/M+"%")}if((it=>/^(\d+(\.\d+)?)px$/.test(it))(L)&&(it=>{const gt=rn(it);Sl(gt)||bt(Ds(it),Nt=>{const Pt=ya(Nt,"width");pn(Nt,"width",Pt),an(Nt,"width")})})(me),De!==U&&K!==""){pn(me,"height",K);const it=ct?0:(gt=>Bl(gt).rows)(me)-1;cp(me,De-U,it)}};return m.on("init",()=>{const me=((be,_e)=>be.inline?((De,Re,lt)=>({parent:ut(Re),view:ut(De),origin:ut(ja(0,0)),isResizable:lt}))(vt.fromDom(be.getBody()),(()=>{const De=vt.fromTag("div");return Vl(De,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),zs(vd(vt.fromDom(document)),De),De})(),_e):((De,Re)=>{const lt=Hs(De)?(ct=>vt.fromDom(Bi(ct).dom.documentElement))(De):De;return{parent:ut(lt),view:ut(De),origin:ut(ja(0,0)),isResizable:Re}})(vt.fromDom(be.getDoc()),_e))(m,mv);if(A.set(me),(be=>{const _e=be.options.get("object_resizing");return uo(_e.split(","),"table")})(m)&&q(m)){const be=((_e,De,Re)=>{const lt=_c,ct=Od,it=id(_e),gt=hm({beforeResize:ad(["table","type"]),afterResize:ad(["table","type"]),startDrag:ad([])});return it.events.adjustHeight.bind(Nt=>{const Pt=Nt.table;gt.trigger.beforeResize(Pt,"row");const Be=lt.delta(Nt.delta,Pt);cp(Pt,Be,Nt.row),gt.trigger.afterResize(Pt,"row")}),it.events.startAdjust.bind(Nt=>{gt.trigger.startDrag()}),it.events.adjustWidth.bind(Nt=>{const Pt=Nt.table;gt.trigger.beforeResize(Pt,"col");const Be=ct.delta(Nt.delta,Pt),Jt=Re(Pt);ku(Pt,Be,Nt.column,De,Jt),gt.trigger.afterResize(Pt,"col")}),{on:it.on,off:it.off,refreshBars:it.refresh,hideBars:it.hideBars,showBars:it.showBars,destroy:it.destroy,events:gt.registry}})(me,he(),re);be.on(),be.events.startDrag.bind(_e=>{b.set(m.selection.getRng())}),be.events.beforeResize.bind(_e=>{const De=_e.table.dom;((Re,lt,ct,it,gt)=>{Re.dispatch("ObjectResizeStart",{target:lt,width:ct,height:it,origin:gt})})(m,De,hu(De),Nd(De),qh+_e.type)}),be.events.afterResize.bind(_e=>{const De=_e.table,Re=De.dom;Ws(De),b.on(lt=>{m.selection.setRng(lt),m.focus()}),((lt,ct,it,gt,Nt)=>{lt.dispatch("ObjectResized",{target:ct,width:it,height:gt,origin:Nt})})(m,Re,hu(Re),Nd(Re),qh+_e.type),m.undoManager.add()}),x.set(be)}}),m.on("ObjectResizeStart",me=>{const be=me.target;if(Ey(be)){const _e=vt.fromDom(be);bt(m.dom.select(".mce-clonedresizable"),De=>{m.dom.addClass(De,"mce-"+Ec(m)+"-columns")}),!Ys(_e)&&E(m)?tl(_e):!iy(_e)&&Tc(m)&&bp(_e),Fd(_e)&&_d(me.origin,qh)&&bp(_e),M=me.width,L=P(m)?"":fh(m,be).getOr(""),U=me.height,K=sp(m,be).getOr("")}}),m.on("ObjectResized",me=>{const be=me.target;if(Ey(be)){const _e=vt.fromDom(be),De=me.origin;(Re=>_d(Re,"corner-"))(De)&&Se(_e,De,me.width,me.height),Ws(_e),Su(m,_e.dom,sy)}}),m.on("SwitchMode",()=>{x.on(me=>{m.mode.isReadOnly()?me.hideBars():me.showBars()})}),m.on("dragstart dragend",me=>{x.on(be=>{me.type==="dragstart"?(be.hideBars(),be.off()):(be.on(),be.showBars())})}),m.on("remove",()=>{x.on(me=>{me.destroy()}),A.on(me=>{((be,_e)=>{be.inline&&ys(_e.parent())})(m,me)})}),{refresh:me=>{x.on(be=>be.refreshBars(vt.fromDom(me)))},hide:()=>{x.on(me=>me.hideBars())},show:()=>{x.on(me=>me.showBars())}}},Yk=m=>{(M=>{const L=M.options.register;L("table_clone_elements",{processor:"string[]"}),L("table_use_colgroups",{processor:"boolean",default:!0}),L("table_header_type",{processor:U=>{const K=uo(["section","cells","sectionCells","auto"],U);return K?{value:U,valid:K}:{valid:!1,message:"Must be one of: section, cells, sectionCells or auto."}},default:"section"}),L("table_sizing_mode",{processor:"string",default:"auto"}),L("table_default_attributes",{processor:"object",default:{border:"1"}}),L("table_default_styles",{processor:"object",default:{"border-collapse":"collapse"}}),L("table_column_resizing",{processor:U=>{const K=uo(["preservetable","resizetable"],U);return K?{value:U,valid:K}:{valid:!1,message:"Must be preservetable, or resizetable."}},default:"preservetable"}),L("table_resize_bars",{processor:"boolean",default:!0}),L("table_style_by_css",{processor:"boolean",default:!0}),L("table_merge_content_on_paste",{processor:"boolean",default:!0})})(m);const b=pv(m),x=P_(m,b),A=q1(m,b,x);return pr(m,A),((M,L)=>{const U=sr(M),K=re=>$s(Nl(M)).bind(he=>Q(he,U).map(Se=>{const me=Qo(Rl(M),Se,he);return re(Se,me)})).getOr("");Sn({mceTableRowType:()=>K(L.getTableRowType),mceTableCellType:()=>K(L.getTableCellType),mceTableColType:()=>K(L.getTableColType)},(re,he)=>M.addQueryValueHandler(he,re))})(m,A),Ml(m,A),{getSelectedCells:x.getSelectedCells,clearSelectedCells:x.clearSelectedCells}};w.add("dom",m=>({table:Yk(m)}))})();tinymce.Resource.add("ui/default/skin.css",`.tox{box-shadow:none;box-sizing:content-box;color:#222f3e;cursor:auto;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:normal;-webkit-tap-highlight-color:transparent;-webkit-text-decoration:none;text-decoration:none;text-shadow:none;text-transform:none;vertical-align:initial;white-space:normal}.tox :not(svg):not(rect){box-sizing:inherit;color:inherit;cursor:inherit;direction:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;-webkit-tap-highlight-color:inherit;text-align:inherit;text-decoration:inherit;text-shadow:inherit;text-transform:inherit;vertical-align:inherit;white-space:inherit}.tox :not(svg):not(rect){background:0 0;border:0;box-shadow:none;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.tox:not([dir=rtl]){direction:ltr;text-align:left}.tox[dir=rtl]{direction:rtl;text-align:right}.tox-tinymce{border:2px solid #eee;border-radius:10px;box-shadow:none;box-sizing:border-box;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;overflow:hidden;position:relative;visibility:inherit!important}.tox.tox-tinymce-inline{border:none;box-shadow:none;overflow:initial}.tox.tox-tinymce-inline .tox-editor-container{overflow:initial}.tox.tox-tinymce-inline .tox-editor-header{background-color:#fff;border:2px solid #eee;border-radius:10px;box-shadow:none;overflow:hidden}.tox-tinymce-aux{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;z-index:1300}.tox-tinymce :focus,.tox-tinymce-aux :focus{outline:0}button::-moz-focus-inner{border:0}.tox[dir=rtl] .tox-icon--flip svg{transform:rotateY(180deg)}.tox .accessibility-issue__header{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description{align-items:stretch;border-radius:6px;display:flex;justify-content:space-between}.tox .accessibility-issue__description>div{padding-bottom:4px}.tox .accessibility-issue__description>div>div{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description>div>div .tox-icon svg{display:block}.tox .accessibility-issue__repair{margin-top:16px}.tox .tox-dialog__body-content .accessibility-issue--info .accessibility-issue__description{background-color:rgba(0,101,216,.1);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--info .tox-form__group h2{color:#006ce7}.tox .tox-dialog__body-content .accessibility-issue--info .tox-icon svg{fill:#006ce7}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon{background-color:#006ce7;color:#fff}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:hover{background-color:#0060ce}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:active{background-color:#0054b4}.tox .tox-dialog__body-content .accessibility-issue--warn .accessibility-issue__description{background-color:rgba(255,165,0,.08);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-form__group h2{color:#8f5d00}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-icon svg{fill:#8f5d00}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon{background-color:#ffe89d;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:hover{background-color:#f2d574;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:active{background-color:#e8c657;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error .accessibility-issue__description{background-color:rgba(204,0,0,.1);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error .tox-form__group h2{color:#c00}.tox .tox-dialog__body-content .accessibility-issue--error .tox-icon svg{fill:#c00}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon{background-color:#f2bfbf;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:hover{background-color:#e9a4a4;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:active{background-color:#ee9494;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description{background-color:rgba(120,171,70,.1);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description>:last-child{display:none}.tox .tox-dialog__body-content .accessibility-issue--success .tox-form__group h2{color:#527530}.tox .tox-dialog__body-content .accessibility-issue--success .tox-icon svg{fill:#527530}.tox .tox-dialog__body-content .accessibility-issue__header .tox-form__group h1,.tox .tox-dialog__body-content .tox-form__group .accessibility-issue__description h2{font-size:14px;margin-top:0}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-left:4px}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-left:auto}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__description{padding:4px 4px 4px 8px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-right:4px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-right:auto}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__description{padding:4px 8px 4px 4px}.tox .mce-codemirror{background:#fff;bottom:0;font-size:13px;left:0;position:absolute;right:0;top:0;z-index:1}.tox .mce-codemirror.tox-inline-codemirror{margin:8px;position:absolute}.tox .tox-advtemplate .tox-form__grid{flex:1}.tox .tox-advtemplate .tox-form__grid>div:first-child{display:flex;flex-direction:column;width:30%}.tox .tox-advtemplate .tox-form__grid>div:first-child>div:nth-child(2){flex-basis:0;flex-grow:1;overflow:auto}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-advtemplate .tox-form__grid>div:first-child{width:100%}}.tox .tox-advtemplate iframe{border-color:#eee;border-radius:10px;border-style:solid;border-width:1px;margin:0 10px}.tox .tox-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bottom-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bar{display:flex;flex:0 0 auto}.tox .tox-button{background-color:#006ce7;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#006ce7;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;font-style:normal;font-weight:700;letter-spacing:normal;line-height:24px;margin:0;outline:0;padding:4px 16px;position:relative;text-align:center;-webkit-text-decoration:none;text-decoration:none;text-transform:none;white-space:nowrap}.tox .tox-button::before{border-radius:6px;bottom:-1px;box-shadow:inset 0 0 0 1px #fff,0 0 0 2px #006ce7;content:'';left:-1px;opacity:0;pointer-events:none;position:absolute;right:-1px;top:-1px}.tox .tox-button[disabled]{background-color:#006ce7;background-image:none;border-color:#006ce7;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-button:focus:not(:disabled){background-color:#0060ce;background-image:none;border-color:#0060ce;box-shadow:none;color:#fff}.tox .tox-button:focus:not(:disabled)::before{opacity:1}.tox .tox-button:hover:not(:disabled){background-color:#0060ce;background-image:none;border-color:#0060ce;box-shadow:none;color:#fff}.tox .tox-button:active:not(:disabled){background-color:#0054b4;background-image:none;border-color:#0054b4;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled{background-color:#0054b4;background-image:none;border-color:#0054b4;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled[disabled]{background-color:#0054b4;background-image:none;border-color:#0054b4;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-button.tox-button--enabled:focus:not(:disabled){background-color:#00489b;background-image:none;border-color:#00489b;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled:hover:not(:disabled){background-color:#00489b;background-image:none;border-color:#00489b;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled:active:not(:disabled){background-color:#003c81;background-image:none;border-color:#003c81;box-shadow:none;color:#fff}.tox .tox-button--icon-and-text,.tox .tox-button.tox-button--icon-and-text,.tox .tox-button.tox-button--secondary.tox-button--icon-and-text{display:flex;padding:5px 4px}.tox .tox-button--icon-and-text .tox-icon svg,.tox .tox-button.tox-button--icon-and-text .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon-and-text .tox-icon svg{display:block;fill:currentColor}.tox .tox-button--secondary{background-color:#f0f0f0;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#f0f0f0;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;color:#222f3e;font-size:14px;font-style:normal;font-weight:700;letter-spacing:normal;outline:0;padding:4px 16px;-webkit-text-decoration:none;text-decoration:none;text-transform:none}.tox .tox-button--secondary[disabled]{background-color:#f0f0f0;background-image:none;border-color:#f0f0f0;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-button--secondary:focus:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--secondary:hover:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--secondary:active:not(:disabled){background-color:#d6d6d6;background-image:none;border-color:#d6d6d6;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled{background-color:#a8c8ed;background-image:none;border-color:#a8c8ed;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled[disabled]{background-color:#a8c8ed;background-image:none;border-color:#a8c8ed;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-button--secondary.tox-button--enabled:focus:not(:disabled){background-color:#93bbe9;background-image:none;border-color:#93bbe9;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled:hover:not(:disabled){background-color:#93bbe9;background-image:none;border-color:#93bbe9;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled:active:not(:disabled){background-color:#7daee4;background-image:none;border-color:#7daee4;box-shadow:none;color:#222f3e}.tox .tox-button--icon,.tox .tox-button.tox-button--icon,.tox .tox-button.tox-button--secondary.tox-button--icon{padding:4px}.tox .tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg{display:block;fill:currentColor}.tox .tox-button-link{background:0;border:none;box-sizing:border-box;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;white-space:nowrap}.tox .tox-button-link--sm{font-size:14px}.tox .tox-button--naked{background-color:transparent;border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked[disabled]{background-color:rgba(34,47,62,.12);border-color:transparent;box-shadow:unset;color:rgba(34,47,62,.5)}.tox .tox-button--naked:hover:not(:disabled){background-color:rgba(34,47,62,.12);border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked:focus:not(:disabled){background-color:rgba(34,47,62,.12);border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked:active:not(:disabled){background-color:rgba(34,47,62,.18);border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked .tox-icon svg{fill:currentColor}.tox .tox-button--naked.tox-button--icon:hover:not(:disabled){color:#222f3e}.tox .tox-checkbox{align-items:center;border-radius:6px;cursor:pointer;display:flex;height:36px;min-width:36px}.tox .tox-checkbox__input{height:1px;overflow:hidden;position:absolute;top:auto;width:1px}.tox .tox-checkbox__icons{align-items:center;border-radius:6px;box-shadow:0 0 0 2px transparent;box-sizing:content-box;display:flex;height:24px;justify-content:center;padding:calc(4px - 1px);width:24px}.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:block;fill:rgba(34,47,62,0.3)}@media (forced-colors:active){.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:currentColor!important}}.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:none;fill:#006ce7}.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg{display:none;fill:#006ce7}.tox .tox-checkbox--disabled{color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__checked svg{fill:rgba(34,47,62,0.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:rgba(34,47,62,0.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{fill:rgba(34,47,62,0.5)}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__checked svg{display:block}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:block}.tox input.tox-checkbox__input:focus+.tox-checkbox__icons{border-radius:6px;box-shadow:inset 0 0 0 1px #006ce7;padding:calc(4px - 1px)}.tox:not([dir=rtl]) .tox-checkbox__label{margin-left:4px}.tox:not([dir=rtl]) .tox-checkbox__input{left:-10000px}.tox:not([dir=rtl]) .tox-bar .tox-checkbox{margin-left:4px}.tox[dir=rtl] .tox-checkbox__label{margin-right:4px}.tox[dir=rtl] .tox-checkbox__input{right:-10000px}.tox[dir=rtl] .tox-bar .tox-checkbox{margin-right:4px}.tox .tox-collection--toolbar .tox-collection__group{display:flex;padding:0}.tox .tox-collection--grid .tox-collection__group{display:flex;flex-wrap:wrap;max-height:208px;overflow-x:hidden;overflow-y:auto;padding:0}.tox .tox-collection--list .tox-collection__group{border-bottom-width:0;border-color:#e3e3e3;border-left-width:0;border-right-width:0;border-style:solid;border-top-width:1px;padding:4px 0}.tox .tox-collection--list .tox-collection__group:first-child{border-top-width:0}.tox .tox-collection__group-heading{background-color:#fcfcfc;color:rgba(34,47,62,.7);cursor:default;font-size:12px;font-style:normal;font-weight:400;margin-bottom:4px;margin-top:-4px;padding:4px 8px;text-transform:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.tox .tox-collection__item{align-items:center;border-radius:3px;color:#222f3e;display:flex;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.tox .tox-collection--list .tox-collection__item{padding:4px 8px}.tox .tox-collection--toolbar .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--grid .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--list .tox-collection__item--enabled{background-color:#fff;color:#222f3e}.tox .tox-collection--list .tox-collection__item--active{background-color:#006ce7}.tox .tox-collection--toolbar .tox-collection__item--enabled,.tox .tox-collection--toolbar .tox-collection__item--enabled.tox-collection__item--active,.tox .tox-collection--toolbar .tox-collection__item--enabled.tox-collection__item--active:hover{background-color:#a6ccf7;color:#222f3e}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--enabled,.tox .tox-collection--toolbar .tox-collection__item--enabled.tox-collection__item--active,.tox .tox-collection--toolbar .tox-collection__item--enabled.tox-collection__item--active:hover{border-radius:3px;outline:solid 1px}}.tox .tox-collection--toolbar .tox-collection__item--active{background-color:#fff;position:relative}.tox .tox-collection--toolbar .tox-collection__item--active:hover{background-color:#f0f0f0;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active:focus{background-color:#f0f0f0;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--active:focus::after{border:2px solid highlight}}.tox .tox-collection--grid .tox-collection__item--enabled{background-color:#a6ccf7;color:#222f3e}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#f0f0f0;color:#222f3e;position:relative;z-index:1}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 inset;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border:2px solid highlight}}.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#fff}@media (forced-colors:active){.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){border:solid 1px}}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#222f3e}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):hover{border-radius:3px;outline:solid 1px}}.tox .tox-collection__item-checkmark,.tox .tox-collection__item-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.tox .tox-collection__item-checkmark svg,.tox .tox-collection__item-icon svg{fill:currentColor}.tox .tox-collection--toolbar-lg .tox-collection__item-icon{height:48px;width:48px}.tox .tox-collection__item-label{color:currentColor;display:inline-block;flex:1;font-size:14px;font-style:normal;font-weight:400;line-height:24px;max-width:100%;text-transform:none;word-break:break-all}.tox .tox-collection__item-accessory{color:currentColor;display:inline-block;font-size:14px;height:24px;line-height:24px;text-transform:none}.tox .tox-collection__item-caret{align-items:center;display:flex;min-height:24px}.tox .tox-collection__item-caret::after{content:'';font-size:0;min-height:inherit}.tox .tox-collection__item-caret svg{fill:currentColor}.tox .tox-collection__item--state-disabled{background-color:transparent;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-collection__item--state-disabled .tox-collection__item-caret svg{fill:rgba(34,47,62,0.5)}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg{display:none}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-accessory+.tox-collection__item-checkmark{display:none}.tox .tox-collection--horizontal{background-color:#fff;border:1px solid #e3e3e3;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:nowrap;margin-bottom:0;overflow-x:auto;padding:0}.tox .tox-collection--horizontal .tox-collection__group{align-items:center;display:flex;flex-wrap:nowrap;margin:0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item{height:28px;margin:6px 1px 5px 0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item-label{white-space:nowrap}.tox .tox-collection--horizontal .tox-collection__item-caret{margin-left:4px}.tox .tox-collection__item-container{display:flex}.tox .tox-collection__item-container--row{align-items:center;flex:1 1 auto;flex-direction:row}.tox .tox-collection__item-container--row.tox-collection__item-container--align-left{margin-right:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--align-right{justify-content:flex-end;margin-left:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-top{align-items:flex-start;margin-bottom:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-middle{align-items:center}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-bottom{align-items:flex-end;margin-top:auto}.tox .tox-collection__item-container--column{align-self:center;flex:1 1 auto;flex-direction:column}.tox .tox-collection__item-container--column.tox-collection__item-container--align-left{align-items:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--align-right{align-items:flex-end}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-top{align-self:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-middle{align-self:center}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-bottom{align-self:flex-end}.tox:not([dir=rtl]) .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-right:1px solid transparent}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>:not(:first-child){margin-left:8px}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-left:4px}.tox:not([dir=rtl]) .tox-collection__item-accessory{margin-left:16px;text-align:right}.tox:not([dir=rtl]) .tox-collection .tox-collection__item-caret{margin-left:16px}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-left:1px solid transparent}.tox[dir=rtl] .tox-collection--list .tox-collection__item>:not(:first-child){margin-right:8px}.tox[dir=rtl] .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-right:4px}.tox[dir=rtl] .tox-collection__item-accessory{margin-right:16px;text-align:left}.tox[dir=rtl] .tox-collection .tox-collection__item-caret{margin-right:16px;transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__item-caret{margin-right:4px}@media (forced-colors:active){.tox .tox-hue-slider,.tox .tox-rgb-form .tox-rgba-preview{background-color:currentColor!important;border:1px solid highlight!important;forced-color-adjust:none}}.tox .tox-color-picker-container{display:flex;flex-direction:row;height:225px;margin:0}.tox .tox-sv-palette{box-sizing:border-box;display:flex;height:100%}.tox .tox-sv-palette-spectrum{height:100%}.tox .tox-sv-palette,.tox .tox-sv-palette-spectrum{width:225px}.tox .tox-sv-palette-thumb{background:0 0;border:1px solid #000;border-radius:50%;box-sizing:content-box;height:12px;position:absolute;width:12px}.tox .tox-sv-palette-inner-thumb{border:1px solid #fff;border-radius:50%;height:10px;position:absolute;width:10px}.tox .tox-hue-slider{box-sizing:border-box;height:100%;width:25px}.tox .tox-hue-slider-spectrum{background:linear-gradient(to bottom,red,#ff0080,#f0f,#8000ff,#00f,#0080ff,#0ff,#00ff80,#0f0,#80ff00,#ff0,#ff8000,red);height:100%;width:100%}.tox .tox-hue-slider,.tox .tox-hue-slider-spectrum{width:20px}.tox .tox-hue-slider-spectrum:focus,.tox .tox-sv-palette-spectrum:focus{outline:#08f solid}.tox .tox-hue-slider-thumb{background:#fff;border:1px solid #000;box-sizing:content-box;height:4px;width:100%}.tox .tox-rgb-form{display:flex;flex-direction:column;justify-content:space-between}.tox .tox-rgb-form div{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px;width:inherit}.tox .tox-rgb-form input{min-width:6em}.tox .tox-rgb-form input.tox-invalid{border:1px solid red!important;box-shadow:0 0 0 1px red}.tox .tox-rgb-container{position:relative}.tox .tox-rgb-form .tox-invalid-icon{align-content:center;align-items:center;display:none;height:100%;position:absolute;right:0;top:0}.tox .tox-rgb-form .tox-invalid-icon .tox-control-wrap__status-icon-invalid{margin:0}.tox .tox-rgb-warning-note{background-color:#f5cccc;border:1px solid #f0b3b3;border-radius:3px;color:#77181f;padding:3px}.tox input.tox-invalid+.tox-invalid-icon{display:flex}.tox .tox-rgb-form .tox-rgba-preview{border:1px solid #000;flex-grow:2;margin-bottom:0}.tox:not([dir=rtl]) .tox-sv-palette{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider-thumb{margin-left:-1px}.tox:not([dir=rtl]) .tox-rgb-form label{margin-right:.5em}.tox[dir=rtl] .tox-sv-palette{margin-left:15px}.tox[dir=rtl] .tox-hue-slider{margin-left:15px}.tox[dir=rtl] .tox-hue-slider-thumb{margin-right:-1px}.tox[dir=rtl] .tox-rgb-form label{margin-left:.5em}.tox .tox-toolbar .tox-swatches,.tox .tox-toolbar__overflow .tox-swatches,.tox .tox-toolbar__primary .tox-swatches{margin:5px 0 6px 11px}.tox .tox-collection--list .tox-collection__group .tox-swatches-menu{border:0;margin:-4px -4px}.tox .tox-swatches__row{display:flex}@media (forced-colors:active){.tox .tox-swatches__row{forced-color-adjust:none}}.tox .tox-swatch{height:30px;transition:transform .15s,box-shadow .15s;width:30px}.tox .tox-swatch:focus,.tox .tox-swatch:hover{box-shadow:0 0 0 1px rgba(127,127,127,.3) inset;transform:scale(.8)}.tox .tox-swatch--remove{align-items:center;display:flex;justify-content:center}.tox .tox-swatch--remove svg path{stroke:#e74c3c}.tox .tox-swatches__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-swatches__picker-btn svg{fill:#222f3e;height:24px;width:24px}.tox .tox-swatches__picker-btn:hover{background:#f0f0f0}.tox div.tox-swatch:not(.tox-swatch--remove) svg{display:none;fill:#222f3e;height:24px;margin:calc((30px - 24px)/ 2) calc((30px - 24px)/ 2);width:24px}.tox div.tox-swatch:not(.tox-swatch--remove) svg path{fill:#fff;paint-order:stroke;stroke:#222f3e;stroke-width:2px}.tox div.tox-swatch:not(.tox-swatch--remove).tox-collection__item--enabled svg{display:block}.tox:not([dir=rtl]) .tox-swatches__picker-btn{margin-left:auto}.tox[dir=rtl] .tox-swatches__picker-btn{margin-right:auto}.tox .tox-comment-thread{background:#fff;position:relative}.tox .tox-comment-thread>:not(:first-child){margin-top:8px}.tox .tox-comment{background:#fff;border:1px solid #eee;border-radius:6px;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);padding:8px 8px 16px 8px;position:relative}.tox .tox-comment__header{align-items:center;color:#222f3e;display:flex;justify-content:space-between}.tox .tox-comment__date{color:#222f3e;font-size:12px;line-height:18px}.tox .tox-comment__body{color:#222f3e;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;margin-top:8px;position:relative;text-transform:initial}.tox .tox-comment__body textarea{resize:none;white-space:normal;width:100%}.tox .tox-comment__expander{padding-top:8px}.tox .tox-comment__expander p{color:rgba(34,47,62,.7);font-size:14px;font-style:normal}.tox .tox-comment__body p{margin:0}.tox .tox-comment__buttonspacing{padding-top:16px;text-align:center}.tox .tox-comment-thread__overlay::after{background:#fff;bottom:0;content:"";display:flex;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:5}.tox .tox-comment__reply{display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}.tox .tox-comment__reply>:first-child{margin-bottom:8px;width:100%}.tox .tox-comment__edit{display:flex;flex-wrap:wrap;justify-content:flex-end;margin-top:16px}.tox .tox-comment__gradient::after{background:linear-gradient(rgba(255,255,255,0),#fff);bottom:0;content:"";display:block;height:5em;margin-top:-40px;position:absolute;width:100%}.tox .tox-comment__overlay{background:#fff;bottom:0;display:flex;flex-direction:column;flex-grow:1;left:0;opacity:.9;position:absolute;right:0;text-align:center;top:0;z-index:5}.tox .tox-comment__loading-text{align-items:center;color:#222f3e;display:flex;flex-direction:column;position:relative}.tox .tox-comment__loading-text>div{padding-bottom:16px}.tox .tox-comment__overlaytext{bottom:0;flex-direction:column;font-size:14px;left:0;padding:1em;position:absolute;right:0;top:0;z-index:10}.tox .tox-comment__overlaytext p{background-color:#fff;box-shadow:0 0 8px 8px #fff;color:#222f3e;text-align:center}.tox .tox-comment__overlaytext div:nth-of-type(2){font-size:.8em}.tox .tox-comment__busy-spinner{align-items:center;background-color:#fff;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:20}.tox .tox-comment__scroll{display:flex;flex-direction:column;flex-shrink:1;overflow:auto}.tox .tox-conversations{margin:8px}.tox:not([dir=rtl]) .tox-comment__edit{margin-left:8px}.tox:not([dir=rtl]) .tox-comment__buttonspacing>:last-child,.tox:not([dir=rtl]) .tox-comment__edit>:last-child,.tox:not([dir=rtl]) .tox-comment__reply>:last-child{margin-left:8px}.tox[dir=rtl] .tox-comment__edit{margin-right:8px}.tox[dir=rtl] .tox-comment__buttonspacing>:last-child,.tox[dir=rtl] .tox-comment__edit>:last-child,.tox[dir=rtl] .tox-comment__reply>:last-child{margin-right:8px}.tox .tox-user{align-items:center;display:flex}.tox .tox-user__avatar svg{fill:rgba(34,47,62,0.7)}.tox .tox-user__avatar img{border-radius:50%;height:36px;object-fit:cover;vertical-align:middle;width:36px}.tox .tox-user__name{color:#222f3e;font-size:14px;font-style:normal;font-weight:700;line-height:18px;text-transform:none}.tox:not([dir=rtl]) .tox-user__avatar img,.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right:8px}.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left:8px}.tox[dir=rtl] .tox-user__avatar img,.tox[dir=rtl] .tox-user__avatar svg{margin-left:8px}.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right:8px}.tox .tox-dialog-wrap{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:1100}.tox .tox-dialog-wrap__backdrop{background-color:rgba(255,255,255,.75);bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}.tox .tox-dialog-wrap__backdrop--opaque{background-color:#fff}.tox .tox-dialog{background-color:#fff;border-color:#eee;border-radius:10px;border-style:solid;border-width:0;box-shadow:0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);display:flex;flex-direction:column;max-height:100%;max-width:480px;overflow:hidden;position:relative;width:95vw;z-index:2}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog{align-self:flex-start;margin:8px auto;max-height:calc(100vh - 8px * 2);width:calc(100vw - 16px)}}.tox .tox-dialog-inline{z-index:1100}.tox .tox-dialog__header{align-items:center;background-color:#fff;border-bottom:none;color:#222f3e;display:flex;font-size:16px;justify-content:space-between;padding:8px 16px 0 16px;position:relative}.tox .tox-dialog__header .tox-button{z-index:1}.tox .tox-dialog__draghandle{cursor:grab;height:100%;left:0;position:absolute;top:0;width:100%}.tox .tox-dialog__draghandle:active{cursor:grabbing}.tox .tox-dialog__dismiss{margin-left:auto}.tox .tox-dialog__title{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-style:normal;font-weight:400;line-height:1.3;margin:0;text-transform:none}.tox .tox-dialog__body{color:#222f3e;display:flex;flex:1;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;min-width:0;text-align:left;text-transform:none}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body{flex-direction:column}}.tox .tox-dialog__body-nav{align-items:flex-start;display:flex;flex-direction:column;flex-shrink:0;padding:16px 16px}@media only screen and (min-width:768px){.tox .tox-dialog__body-nav{max-width:11em}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body-nav{flex-direction:row;-webkit-overflow-scrolling:touch;overflow-x:auto;padding-bottom:0}}.tox .tox-dialog__body-nav-item{border-bottom:2px solid transparent;color:rgba(34,47,62,.7);display:inline-block;flex-shrink:0;font-size:14px;line-height:1.3;margin-bottom:8px;max-width:13em;-webkit-text-decoration:none;text-decoration:none}.tox .tox-dialog__body-nav-item:focus{background-color:rgba(0,108,231,.1)}.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid #006ce7;color:#006ce7}@media (forced-colors:active){.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid highlight;color:highlight}}.tox .tox-dialog__body-content{box-sizing:border-box;display:flex;flex:1;flex-direction:column;max-height:min(650px,calc(100vh - 110px));overflow:auto;-webkit-overflow-scrolling:touch;padding:16px 16px}.tox .tox-dialog__body-content>*{margin-bottom:0;margin-top:16px}.tox .tox-dialog__body-content>:first-child{margin-top:0}.tox .tox-dialog__body-content>:last-child{margin-bottom:0}.tox .tox-dialog__body-content>:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content a{color:#006ce7;cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content a:focus,.tox .tox-dialog__body-content a:hover{color:#003c81;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content a:focus-visible{border-radius:1px;outline:2px solid #006ce7;outline-offset:2px}.tox .tox-dialog__body-content a:active{color:#00244e;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content svg{fill:#222f3e}.tox .tox-dialog__body-content strong{font-weight:700}.tox .tox-dialog__body-content ul{list-style-type:disc}.tox .tox-dialog__body-content dd,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{padding-inline-start:2.5rem}.tox .tox-dialog__body-content dl,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{margin-bottom:16px}.tox .tox-dialog__body-content dd,.tox .tox-dialog__body-content dl,.tox .tox-dialog__body-content dt,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{display:block;margin-inline-end:0;margin-inline-start:0}.tox .tox-dialog__body-content .tox-form__group h1{color:#222f3e;font-size:20px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group h2{color:#222f3e;font-size:16px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group p{margin-bottom:16px}.tox .tox-dialog__body-content .tox-form__group h1:first-child,.tox .tox-dialog__body-content .tox-form__group h2:first-child,.tox .tox-dialog__body-content .tox-form__group p:first-child{margin-top:0}.tox .tox-dialog__body-content .tox-form__group h1:last-child,.tox .tox-dialog__body-content .tox-form__group h2:last-child,.tox .tox-dialog__body-content .tox-form__group p:last-child{margin-bottom:0}.tox .tox-dialog__body-content .tox-form__group h1:only-child,.tox .tox-dialog__body-content .tox-form__group h2:only-child,.tox .tox-dialog__body-content .tox-form__group p:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--center{text-align:center}.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--end{text-align:end}.tox .tox-dialog--width-lg{height:650px;max-width:1200px}.tox .tox-dialog--fullscreen{height:100%;max-width:100%}.tox .tox-dialog--fullscreen .tox-dialog__body-content{max-height:100%}.tox .tox-dialog--width-md{max-width:800px}.tox .tox-dialog--width-md .tox-dialog__body-content{overflow:auto}.tox .tox-dialog__body-content--centered{text-align:center}.tox .tox-dialog__footer{align-items:center;background-color:#fff;border-top:none;display:flex;justify-content:space-between;padding:8px 16px}.tox .tox-dialog__footer-end,.tox .tox-dialog__footer-start{display:flex}.tox .tox-dialog__busy-spinner{align-items:center;background-color:rgba(255,255,255,.75);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:3}.tox .tox-dialog__table{border-collapse:collapse;width:100%}.tox .tox-dialog__table thead th{font-weight:700;padding-bottom:8px}.tox .tox-dialog__table thead th:first-child{padding-right:8px}.tox .tox-dialog__table tbody tr{border-bottom:1px solid #626262}.tox .tox-dialog__table tbody tr:last-child{border-bottom:none}.tox .tox-dialog__table td{padding-bottom:8px;padding-top:8px}.tox .tox-dialog__table td:first-child{padding-right:8px}.tox .tox-dialog__iframe{min-height:200px}.tox .tox-dialog__iframe.tox-dialog__iframe--opaque{background:#fff}.tox .tox-navobj-bordered{position:relative}.tox .tox-navobj-bordered::before{border:1px solid #eee;border-radius:6px;content:'';inset:0;opacity:1;pointer-events:none;position:absolute;z-index:1}.tox .tox-navobj-bordered iframe{border-radius:6px}.tox .tox-navobj-bordered-focus.tox-navobj-bordered::before{border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-dialog__popups{position:absolute;width:100%;z-index:1100}.tox .tox-dialog__body-iframe{display:flex;flex:1;flex-direction:column}.tox .tox-dialog__body-iframe .tox-navobj{display:flex;flex:1}.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2){flex:1;height:100%}.tox .tox-dialog-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-dialog-dock-fadein{opacity:1;visibility:visible}.tox .tox-dialog-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein{transition-delay:0s}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav{margin-right:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child){margin-left:8px}}.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end>*,.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start>*{margin-left:8px}.tox[dir=rtl] .tox-dialog__body{text-align:right}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav{margin-left:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child){margin-right:8px}}.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end>*,.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start>*{margin-right:8px}body.tox-dialog__disable-scroll{overflow:hidden}.tox .tox-dropzone-container{display:flex;flex:1}.tox .tox-dropzone{align-items:center;background:#fff;border:2px dashed #eee;box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;min-height:100px;padding:10px}.tox .tox-dropzone p{color:rgba(34,47,62,.7);margin:0 0 16px 0}.tox .tox-edit-area{display:flex;flex:1;overflow:hidden;position:relative}.tox .tox-edit-area::before{border:2px solid #006ce7;border-radius:4px;content:'';inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .15s;z-index:1}@media (forced-colors:active){.tox .tox-edit-area::before{border:2px solid highlight}}.tox .tox-edit-area__iframe{background-color:#fff;border:0;box-sizing:border-box;flex:1;height:100%;position:absolute;width:100%}.tox.tox-edit-focus .tox-edit-area::before{opacity:1}.tox.tox-inline-edit-area{border:1px dotted #eee}.tox .tox-editor-container{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-editor-header{display:grid;grid-template-columns:1fr min-content;z-index:2}.tox:not(.tox-tinymce-inline) .tox-editor-header{background-color:#fff;border-bottom:none;box-shadow:0 2px 2px -2px rgba(34,47,62,.1),0 8px 8px -4px rgba(34,47,62,.07);padding:4px 0}.tox:not(.tox-tinymce-inline) .tox-editor-header:not(.tox-editor-dock-transition){transition:box-shadow .5s}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-bottom .tox-editor-header{border-top:1px solid #e3e3e3;box-shadow:none}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on .tox-editor-header{background-color:#fff;box-shadow:0 2px 2px -2px rgba(34,47,62,.2),0 8px 8px -4px rgba(34,47,62,.15);padding:4px 0}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on.tox-tinymce--toolbar-bottom .tox-editor-header{box-shadow:0 2px 2px -2px rgba(34,47,62,.2),0 8px 8px -4px rgba(34,47,62,.15)}.tox.tox:not(.tox-tinymce-inline) .tox-editor-header.tox-editor-header--empty{background:0 0;border:none;box-shadow:none;padding:0}.tox-editor-dock-fadeout{opacity:0;visibility:hidden}.tox-editor-dock-fadein{opacity:1;visibility:visible}.tox-editor-dock-transition{transition:visibility 0s linear .25s,opacity .25s ease}.tox-editor-dock-transition.tox-editor-dock-fadein{transition-delay:0s}.tox .tox-control-wrap{flex:1;position:relative}.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid{display:none}.tox .tox-control-wrap svg{display:block}.tox .tox-control-wrap__status-icon-wrap{position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-control-wrap__status-icon-invalid svg{fill:#c00}.tox .tox-control-wrap__status-icon-unknown svg{fill:orange}.tox .tox-control-wrap__status-icon-valid svg{fill:green}.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield{padding-right:32px}.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap{right:4px}.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield{padding-left:32px}.tox[dir=rtl] .tox-control-wrap__status-icon-wrap{left:4px}.tox .tox-custom-preview{border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;flex:1;padding:8px}.tox .tox-autocompleter{max-width:25em}.tox .tox-autocompleter .tox-menu{box-sizing:border-box;max-width:25em}.tox .tox-autocompleter .tox-autocompleter-highlight{font-weight:700}.tox .tox-color-input{display:flex;position:relative;z-index:1}.tox .tox-color-input .tox-textfield{z-index:-1}.tox .tox-color-input span{border-color:rgba(34 47 3.1%);border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;height:24px;position:absolute;top:6px;width:24px}@media (forced-colors:active){.tox .tox-color-input span{border-color:currentColor;border-width:2px!important;forced-color-adjust:none}}.tox .tox-color-input span:focus:not([aria-disabled=true]),.tox .tox-color-input span:hover:not([aria-disabled=true]){border-color:#006ce7;cursor:pointer}.tox .tox-color-input span::before{background-image:linear-gradient(45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(-45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.25) 75%),linear-gradient(-45deg,transparent 75%,rgba(0,0,0,.25) 75%);background-position:0 0,0 6px,6px -6px,-6px 0;background-size:12px 12px;border:1px solid #fff;border-radius:6px;box-sizing:border-box;content:'';height:24px;left:-1px;position:absolute;top:-1px;width:24px;z-index:-1}@media (forced-colors:active){.tox .tox-color-input span::before{border:none}}.tox .tox-color-input span[aria-disabled=true]{cursor:not-allowed}.tox:not([dir=rtl]) .tox-color-input .tox-textfield{padding-left:36px}.tox:not([dir=rtl]) .tox-color-input span{left:6px}.tox[dir=rtl] .tox-color-input .tox-textfield{padding-right:36px}.tox[dir=rtl] .tox-color-input span{right:6px}.tox .tox-label,.tox .tox-toolbar-label{color:rgba(34,47,62,.7);display:block;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;padding:0 8px 0 0;text-transform:none;white-space:nowrap}.tox .tox-toolbar-label{padding:0 8px}.tox[dir=rtl] .tox-label{padding:0 0 0 8px}.tox .tox-form{display:flex;flex:1;flex-direction:column}.tox .tox-form__group{box-sizing:border-box;margin-bottom:4px}.tox .tox-form-group--maximize{flex:1}.tox .tox-form__group--error{color:#c00}.tox .tox-form__group--collection{display:flex}.tox .tox-form__grid{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}.tox .tox-form__grid--2col>.tox-form__group{width:calc(50% - (8px / 2))}.tox .tox-form__grid--3col>.tox-form__group{width:calc(100% / 3 - (8px / 2))}.tox .tox-form__grid--4col>.tox-form__group{width:calc(25% - (8px / 2))}.tox .tox-form__controls-h-stack{align-items:center;display:flex}.tox .tox-form__group--inline{align-items:center;display:flex}.tox .tox-form__group--stretched{display:flex;flex:1;flex-direction:column}.tox .tox-form__group--stretched .tox-textarea{flex:1}.tox .tox-form__group--stretched .tox-navobj{display:flex;flex:1}.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex:1;height:100%}.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-form__controls-h-stack>:not(:first-child){margin-right:4px}.tox .tox-lock.tox-locked .tox-lock-icon__unlock,.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock{display:none}.tox .tox-listboxfield .tox-listbox--select,.tox .tox-textarea,.tox .tox-textarea-wrap .tox-textarea:focus,.tox .tox-textfield,.tox .tox-toolbar-textfield{appearance:none;background-color:#fff;border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 5.5px;resize:none;width:100%}.tox .tox-textarea[disabled],.tox .tox-textfield[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-custom-editor:focus-within,.tox .tox-listboxfield .tox-listbox--select:focus,.tox .tox-textarea-wrap:focus-within,.tox .tox-textarea:focus,.tox .tox-textfield:focus{background-color:#fff;border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-toolbar-textfield{border-width:0;margin-bottom:3px;margin-top:2px;max-width:250px}.tox .tox-naked-btn{background-color:transparent;border:0;border-color:transparent;box-shadow:unset;color:#006ce7;cursor:pointer;display:block;margin:0;padding:0}.tox .tox-naked-btn svg{display:block;fill:#222f3e}.tox:not([dir=rtl]) .tox-toolbar-textfield+*{margin-left:4px}.tox[dir=rtl] .tox-toolbar-textfield+*{margin-right:4px}.tox .tox-listboxfield{cursor:pointer;position:relative}.tox .tox-listboxfield .tox-listbox--select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-listbox__select-label{cursor:default;flex:1;margin:0 4px}.tox .tox-listbox__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-listbox__select-chevron svg{fill:#222f3e}@media (forced-colors:active){.tox .tox-listbox__select-chevron svg{fill:currentColor!important}}.tox .tox-listboxfield .tox-listbox--select{align-items:center;display:flex}.tox:not([dir=rtl]) .tox-listboxfield svg{right:8px}.tox[dir=rtl] .tox-listboxfield svg{left:8px}.tox .tox-selectfield{cursor:pointer;position:relative}.tox .tox-selectfield select{appearance:none;background-color:#fff;border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 5.5px;resize:none;width:100%}.tox .tox-selectfield select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-selectfield select::-ms-expand{display:none}.tox .tox-selectfield select:focus{background-color:#fff;border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-selectfield svg{pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}.tox:not([dir=rtl]) .tox-selectfield select[size="0"],.tox:not([dir=rtl]) .tox-selectfield select[size="1"]{padding-right:24px}.tox:not([dir=rtl]) .tox-selectfield svg{right:8px}.tox[dir=rtl] .tox-selectfield select[size="0"],.tox[dir=rtl] .tox-selectfield select[size="1"]{padding-left:24px}.tox[dir=rtl] .tox-selectfield svg{left:8px}.tox .tox-textarea-wrap{border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;display:flex;flex:1;overflow:hidden}.tox .tox-textarea{appearance:textarea;white-space:pre-wrap}.tox .tox-textarea-wrap .tox-textarea{border:none}.tox .tox-textarea-wrap .tox-textarea:focus{border:none}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201}.tox .tox-help__more-link{list-style:none;margin-top:1em}.tox .tox-imagepreview{background-color:#666;height:380px;overflow:hidden;position:relative;width:100%}.tox .tox-imagepreview.tox-imagepreview__loaded{overflow:auto}.tox .tox-imagepreview__container{display:flex;left:100vw;position:absolute;top:100vw}.tox .tox-imagepreview__image{background:url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==)}.tox .tox-image-tools .tox-spacer{flex:1}.tox .tox-image-tools .tox-bar{align-items:center;display:flex;height:60px;justify-content:center}.tox .tox-image-tools .tox-imagepreview,.tox .tox-image-tools .tox-imagepreview+.tox-bar{margin-top:8px}.tox .tox-image-tools .tox-croprect-block{background:#000;opacity:.5;position:absolute;zoom:1}.tox .tox-image-tools .tox-croprect-handle{border:2px solid #fff;height:20px;left:0;position:absolute;top:0;width:20px}.tox .tox-image-tools .tox-croprect-handle-move{border:0;cursor:move;position:absolute}.tox .tox-image-tools .tox-croprect-handle-nw{border-width:2px 0 0 2px;cursor:nw-resize;left:100px;margin:-2px 0 0 -2px;top:100px}.tox .tox-image-tools .tox-croprect-handle-ne{border-width:2px 2px 0 0;cursor:ne-resize;left:200px;margin:-2px 0 0 -20px;top:100px}.tox .tox-image-tools .tox-croprect-handle-sw{border-width:0 0 2px 2px;cursor:sw-resize;left:100px;margin:-20px 2px 0 -2px;top:200px}.tox .tox-image-tools .tox-croprect-handle-se{border-width:0 2px 2px 0;cursor:se-resize;left:200px;margin:-20px 0 0 -20px;top:200px}.tox .tox-insert-table-picker{background-color:#fff;display:flex;flex-wrap:wrap;width:170px}.tox .tox-insert-table-picker>div{border-color:#eee;border-style:solid;border-width:0 1px 1px 0;box-sizing:border-box;height:17px;width:17px}.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin:-4px -4px}.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color:#006ce7;border-color:#eee}@media (forced-colors:active){.tox .tox-insert-table-picker .tox-insert-table-picker__selected{border-color:Highlight;filter:contrast(50%)}}.tox .tox-insert-table-picker__label{color:rgba(34,47,62,.7);display:block;font-size:14px;padding:4px;text-align:center;width:100%}.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right:0}.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right:0}.tox .tox-menu{background-color:#fff;border:1px solid transparent;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);display:inline-block;overflow:hidden;vertical-align:top;z-index:1150}.tox .tox-menu.tox-collection.tox-collection--list{padding:0 4px}.tox .tox-menu.tox-collection.tox-collection--toolbar{padding:8px}.tox .tox-menu.tox-collection.tox-collection--grid{padding:8px}@media only screen and (min-width:768px){.tox .tox-menu .tox-collection__item-label{overflow-wrap:break-word;word-break:normal}.tox .tox-dialog__popups .tox-menu .tox-collection__item-label{word-break:break-all}}.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin:0}.tox .tox-menubar{background:repeating-linear-gradient(transparent 0 1px,transparent 1px 39px) center top 39px/100% calc(100% - 39px) no-repeat;background-color:#fff;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;grid-column:1/-1;grid-row:1;padding:0 11px 0 12px}.tox .tox-promotion+.tox-menubar{grid-column:1}.tox .tox-promotion{background:repeating-linear-gradient(transparent 0 1px,transparent 1px 39px) center top 39px/100% calc(100% - 39px) no-repeat;background-color:#fff;grid-column:2;grid-row:1;padding-inline-end:8px;padding-inline-start:4px;padding-top:5px}.tox .tox-promotion-link{align-items:unsafe center;background-color:#e8f1f8;border-radius:5px;color:#086be6;cursor:pointer;display:flex;font-size:14px;height:26.6px;padding:4px 8px;white-space:nowrap}.tox .tox-promotion-link:hover{background-color:#b4d7ff}.tox .tox-promotion-link:focus{background-color:#d9edf7}.tox .tox-mbtn{align-items:center;background:#fff;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;justify-content:center;margin:5px 1px 6px 0;outline:0;padding:0 4px;text-transform:none;width:auto}.tox .tox-mbtn[disabled]{background-color:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-mbtn:focus:not(:disabled){background:#fff;border:0;box-shadow:none;color:#222f3e;position:relative;z-index:1}.tox .tox-mbtn:focus:not(:disabled)::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-mbtn:focus:not(:disabled)::after{border:2px solid highlight}}.tox .tox-mbtn--active,.tox .tox-mbtn:not(:disabled).tox-mbtn--active:focus{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active){background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-mbtn[disabled] .tox-mbtn__select-label{cursor:not-allowed}.tox .tox-mbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px;display:none}.tox .tox-notification{border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;display:grid;font-size:14px;font-weight:400;grid-template-columns:minmax(40px,1fr) auto minmax(40px,1fr);margin-left:auto;margin-right:auto;margin-top:4px;opacity:0;padding:4px;transition:transform .1s ease-in,opacity 150ms ease-in;width:max-content}.tox .tox-notification a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification p{font-size:14px;font-weight:400}.tox .tox-notification:focus{border-color:#006ce7;box-shadow:0 0 0 1px #006ce7}.tox .tox-notification--in{opacity:1}.tox .tox-notification--success{background-color:#e4eeda;border-color:#d7e6c8;color:#222f3e}.tox .tox-notification--success p{color:#222f3e}.tox .tox-notification--success a{color:#517342}.tox .tox-notification--success a:focus,.tox .tox-notification--success a:hover{color:#24321d;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--success a:focus-visible{border-radius:1px;outline:2px solid #517342;outline-offset:2px}.tox .tox-notification--success a:active{color:#0d120a;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--success svg{fill:#222f3e}.tox .tox-notification--error{background-color:#f5cccc;border-color:#f0b3b3;color:#222f3e}.tox .tox-notification--error p{color:#222f3e}.tox .tox-notification--error a{color:#77181f}.tox .tox-notification--error a:focus,.tox .tox-notification--error a:hover{color:#220709;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--error a:focus-visible{border-radius:1px;outline:2px solid #77181f;outline-offset:2px}.tox .tox-notification--error a:active{color:#000;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--error svg{fill:#222f3e}.tox .tox-notification--warn,.tox .tox-notification--warning{background-color:#fff5cc;border-color:#fff0b3;color:#222f3e}.tox .tox-notification--warn p,.tox .tox-notification--warning p{color:#222f3e}.tox .tox-notification--warn a,.tox .tox-notification--warning a{color:#7a6e25}.tox .tox-notification--warn a:focus,.tox .tox-notification--warn a:hover,.tox .tox-notification--warning a:focus,.tox .tox-notification--warning a:hover{color:#2c280d;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--warn a:focus-visible,.tox .tox-notification--warning a:focus-visible{border-radius:1px;outline:2px solid #7a6e25;outline-offset:2px}.tox .tox-notification--warn a:active,.tox .tox-notification--warning a:active{color:#050502;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--warn svg,.tox .tox-notification--warning svg{fill:#222f3e}.tox .tox-notification--info{background-color:#d6e7fb;border-color:#c1dbf9;color:#222f3e}.tox .tox-notification--info p{color:#222f3e}.tox .tox-notification--info a{color:#2a64a6}.tox .tox-notification--info a:focus,.tox .tox-notification--info a:hover{color:#163355;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--info a:focus-visible{border-radius:1px;outline:2px solid #2a64a6;outline-offset:2px}.tox .tox-notification--info a:active{color:#0b1a2c;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--info svg{fill:#222f3e}.tox .tox-notification__body{align-self:center;color:#222f3e;font-size:14px;grid-column-end:3;grid-column-start:2;grid-row-end:2;grid-row-start:1;text-align:center;white-space:normal;word-break:break-all;word-break:break-word}.tox .tox-notification__body>*{margin:0}.tox .tox-notification__body>*+*{margin-top:1rem}.tox .tox-notification__icon{align-self:center;grid-column-end:2;grid-column-start:1;grid-row-end:2;grid-row-start:1;justify-self:end}.tox .tox-notification__icon svg{display:block}.tox .tox-notification__dismiss{align-self:start;grid-column-end:4;grid-column-start:3;grid-row-end:2;grid-row-start:1;justify-self:end}.tox .tox-notification .tox-progress-bar{grid-column-end:4;grid-column-start:1;grid-row-end:3;grid-row-start:2;justify-self:center}.tox .tox-notification-container-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-notification-container-dock-fadein{opacity:1;visibility:visible}.tox .tox-notification-container-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-notification-container-dock-transition.tox-notification-container-dock-fadein{transition-delay:0s}.tox .tox-pop{display:inline-block;position:relative}.tox .tox-pop--resizing{transition:width .1s ease}.tox .tox-pop--resizing .tox-toolbar,.tox .tox-pop--resizing .tox-toolbar__group{flex-wrap:nowrap}.tox .tox-pop--transition{transition:.15s ease;transition-property:left,right,top,bottom}.tox .tox-pop--transition::after,.tox .tox-pop--transition::before{transition:all .15s,visibility 0s,opacity 75ms ease 75ms}.tox .tox-pop__dialog{background-color:#fff;border:1px solid #eee;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);min-width:0;overflow:hidden}.tox .tox-pop__dialog>:not(.tox-toolbar){margin:4px 4px 4px 8px}.tox .tox-pop__dialog .tox-toolbar{background-color:transparent;margin-bottom:-1px}.tox .tox-pop::after,.tox .tox-pop::before{border-style:solid;content:'';display:block;height:0;opacity:1;position:absolute;width:0}@media (forced-colors:active){.tox .tox-pop::after,.tox .tox-pop::before{content:none}}.tox .tox-pop.tox-pop--inset::after,.tox .tox-pop.tox-pop--inset::before{opacity:0;transition:all 0s .15s,visibility 0s,opacity 75ms ease}.tox .tox-pop.tox-pop--bottom::after,.tox .tox-pop.tox-pop--bottom::before{left:50%;top:100%}.tox .tox-pop.tox-pop--bottom::after{border-color:#fff transparent transparent transparent;border-width:8px;margin-left:-8px;margin-top:-1px}.tox .tox-pop.tox-pop--bottom::before{border-color:#eee transparent transparent transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--top::after,.tox .tox-pop.tox-pop--top::before{left:50%;top:0;transform:translateY(-100%)}.tox .tox-pop.tox-pop--top::after{border-color:transparent transparent #fff transparent;border-width:8px;margin-left:-8px;margin-top:1px}.tox .tox-pop.tox-pop--top::before{border-color:transparent transparent #eee transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--left::after,.tox .tox-pop.tox-pop--left::before{left:0;top:calc(50% - 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--left::after{border-color:transparent #fff transparent transparent;border-width:8px;margin-left:-15px}.tox .tox-pop.tox-pop--left::before{border-color:transparent #eee transparent transparent;border-width:10px;margin-left:-19px}.tox .tox-pop.tox-pop--right::after,.tox .tox-pop.tox-pop--right::before{left:100%;top:calc(50% + 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--right::after{border-color:transparent transparent transparent #fff;border-width:8px;margin-left:-1px}.tox .tox-pop.tox-pop--right::before{border-color:transparent transparent transparent #eee;border-width:10px;margin-left:-1px}.tox .tox-pop.tox-pop--align-left::after,.tox .tox-pop.tox-pop--align-left::before{left:20px}.tox .tox-pop.tox-pop--align-right::after,.tox .tox-pop.tox-pop--align-right::before{left:calc(100% - 20px)}.tox .tox-sidebar-wrap{display:flex;flex-direction:row;flex-grow:1;min-height:0}.tox .tox-sidebar{background-color:#fff;display:flex;flex-direction:row;justify-content:flex-end}.tox .tox-sidebar__slider{display:flex;overflow:hidden}.tox .tox-sidebar__pane-container{display:flex}.tox .tox-sidebar__pane{display:flex}.tox .tox-sidebar--sliding-closed{opacity:0}.tox .tox-sidebar--sliding-open{opacity:1}.tox .tox-sidebar--sliding-growing,.tox .tox-sidebar--sliding-shrinking{transition:width .5s ease,opacity .5s ease}.tox .tox-selector{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;display:inline-block;height:10px;position:absolute;width:10px}.tox.tox-platform-touch .tox-selector{height:12px;width:12px}.tox .tox-slider{align-items:center;display:flex;flex:1;height:24px;justify-content:center;position:relative}.tox .tox-slider__rail{background-color:transparent;border:1px solid #eee;border-radius:6px;height:10px;min-width:120px;width:100%}.tox .tox-slider__handle{background-color:#006ce7;border:2px solid #0054b4;border-radius:6px;box-shadow:none;height:24px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:14px}.tox .tox-form__controls-h-stack>.tox-slider:not(:first-of-type){margin-inline-start:8px}.tox .tox-form__controls-h-stack>.tox-form__group+.tox-slider{margin-inline-start:32px}.tox .tox-form__controls-h-stack>.tox-slider+.tox-form__group{margin-inline-start:32px}.tox .tox-source-code{overflow:auto}.tox .tox-spinner{display:flex}.tox .tox-spinner>div{animation:tam-bouncing-dots 1.5s ease-in-out 0s infinite both;background-color:rgba(34,47,62,.7);border-radius:100%;height:8px;width:8px}.tox .tox-spinner>div:first-child{animation-delay:-.32s}.tox .tox-spinner>div:nth-child(2){animation-delay:-.16s}@keyframes tam-bouncing-dots{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.tox:not([dir=rtl]) .tox-spinner>div:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-spinner>div:not(:first-child){margin-right:4px}.tox .tox-statusbar{align-items:center;background-color:#fff;border-top:1px solid #e3e3e3;color:rgba(34,47,62,.7);display:flex;flex:0 0 auto;font-size:14px;font-weight:400;height:25px;overflow:hidden;padding:0 8px;position:relative;text-transform:none}.tox .tox-statusbar__path{display:flex;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap}.tox .tox-statusbar__right-container{display:flex;justify-content:flex-end;white-space:nowrap}.tox .tox-statusbar__help-text{text-align:center}.tox .tox-statusbar__text-container{align-items:flex-start;display:flex;flex:1 1 auto;height:16px;justify-content:space-between;overflow:hidden}@media only screen and (min-width:768px){.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__help-text,.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__path,.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__right-container{flex:0 0 calc(100% / 3)}}.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-end{justify-content:flex-end}.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-start{justify-content:flex-start}.tox .tox-statusbar__text-container.tox-statusbar__text-container--space-around{justify-content:space-around}.tox .tox-statusbar__path>*{display:inline;white-space:nowrap}.tox .tox-statusbar__wordcount{flex:0 0 auto;margin-left:1ch}@media only screen and (max-width:767px){.tox .tox-statusbar__text-container .tox-statusbar__help-text{display:none}.tox .tox-statusbar__text-container .tox-statusbar__help-text:only-child{display:block}}.tox .tox-statusbar a,.tox .tox-statusbar__path-item,.tox .tox-statusbar__wordcount{color:rgba(34,47,62,.7);position:relative;-webkit-text-decoration:none;text-decoration:none}.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled=true]){color:#222f3e;cursor:pointer}.tox .tox-statusbar a:focus-visible::after,.tox .tox-statusbar__path-item:focus-visible::after,.tox .tox-statusbar__wordcount:focus-visible::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-statusbar a:focus-visible::after,.tox .tox-statusbar__path-item:focus-visible::after,.tox .tox-statusbar__wordcount:focus-visible::after{border:2px solid highlight}}.tox .tox-statusbar__branding svg{fill:rgba(34,47,62,0.8);height:1em;margin-left:.3em;width:auto}@media (forced-colors:active){.tox .tox-statusbar__branding svg{fill:currentColor}}.tox .tox-statusbar__branding a{align-items:center;display:inline-flex}.tox .tox-statusbar__branding a:focus:not(:disabled):not([aria-disabled=true]) svg,.tox .tox-statusbar__branding a:hover:not(:disabled):not([aria-disabled=true]) svg{fill:#222f3e}.tox .tox-statusbar__resize-handle{align-items:flex-end;align-self:stretch;cursor:nwse-resize;display:flex;flex:0 0 auto;justify-content:flex-end;margin-bottom:3px;margin-left:4px;margin-right:calc(3px - 8px);margin-top:3px;padding-bottom:0;padding-left:0;padding-right:0;position:relative}.tox .tox-statusbar__resize-handle svg{display:block;fill:rgba(34,47,62,0.5)}.tox .tox-statusbar__resize-handle:focus svg,.tox .tox-statusbar__resize-handle:hover svg{fill:#222f3e}.tox .tox-statusbar__resize-handle:focus-visible{background-color:transparent;border-radius:1px 1px 5px 1px;box-shadow:0 0 0 2px transparent}.tox .tox-statusbar__resize-handle:focus-visible::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-statusbar__resize-handle:focus-visible::after{border:2px solid highlight}}.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right:4px}.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left:2ch}.tox[dir=rtl] .tox-statusbar{flex-direction:row-reverse}.tox[dir=rtl] .tox-statusbar__path>*{margin-left:4px}.tox[dir=rtl] .tox-statusbar__branding svg{margin-left:0;margin-right:.3em}.tox .tox-throbber{z-index:1299}.tox .tox-throbber__busy-spinner{align-items:center;background-color:rgba(255,255,255,.6);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.tox .tox-tbtn{align-items:center;background:#fff;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;justify-content:center;margin:6px 1px 5px 0;outline:0;padding:0;text-transform:none;width:34px}@media (forced-colors:active){.tox .tox-tbtn.tox-tbtn:hover,.tox .tox-tbtn:hover{outline:1px dashed currentColor}.tox .tox-tbtn.tox-tbtn--active,.tox .tox-tbtn.tox-tbtn--enabled,.tox .tox-tbtn.tox-tbtn--enabled:focus,.tox .tox-tbtn.tox-tbtn--enabled:hover,.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){outline:1px solid currentColor;position:relative}}.tox .tox-tbtn svg{display:block;fill:#222f3e}@media (forced-colors:active){.tox .tox-tbtn svg{fill:currentColor!important}.tox .tox-tbtn svg.tox-tbtn--enabled,.tox .tox-tbtn svg:focus:not(.tox-tbtn--disabled){fill:currentColor!important}.tox .tox-tbtn svg .tox-tbtn:disabled,.tox .tox-tbtn svg .tox-tbtn:disabled:hover,.tox .tox-tbtn svg.tox-tbtn--disabled,.tox .tox-tbtn svg.tox-tbtn--disabled:hover{filter:contrast(0%)}}.tox .tox-tbtn.tox-tbtn-more{padding-left:5px;padding-right:5px;width:inherit}.tox .tox-tbtn:focus{background:#fff;border:0;box-shadow:none;position:relative;z-index:1}.tox .tox-tbtn:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-tbtn:focus::after{border:2px solid highlight}}.tox .tox-tbtn:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:hover svg{fill:#222f3e}.tox .tox-tbtn:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:active svg{fill:#222f3e}.tox .tox-tbtn--disabled .tox-tbtn--enabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--active,.tox .tox-tbtn--enabled,.tox .tox-tbtn--enabled:focus,.tox .tox-tbtn--enabled:hover{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e;position:relative}.tox .tox-tbtn--active>*,.tox .tox-tbtn--enabled:focus>*,.tox .tox-tbtn--enabled:hover>*,.tox .tox-tbtn--enabled>*{transform:none}.tox .tox-tbtn--active svg,.tox .tox-tbtn--enabled svg,.tox .tox-tbtn--enabled:focus svg,.tox .tox-tbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tbtn--active.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled:focus.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled:hover.tox-tbtn--disabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--enabled:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-tbtn--enabled:focus::after{border:2px solid highlight}}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){color:#222f3e}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg{fill:#222f3e}.tox .tox-tbtn:active>*{transform:none}.tox .tox-tbtn--md{height:42px;width:51px}.tox .tox-tbtn--lg{flex-direction:column;height:56px;width:68px}.tox .tox-tbtn--return{align-self:stretch;height:unset;width:16px}.tox .tox-tbtn--labeled{padding:0 4px;width:unset}.tox .tox-tbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-number-input{background:#f7f7f7;border-radius:3px;display:flex;margin:6px 1px 5px 0;position:relative;width:auto}.tox .tox-number-input:focus{background:#f7f7f7}.tox .tox-number-input:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input:focus::after{border:2px solid highlight}}.tox .tox-number-input .tox-input-wrapper{display:flex;pointer-events:none;position:relative;text-align:center}.tox .tox-number-input .tox-input-wrapper:focus{background-color:#f7f7f7;z-index:1}.tox .tox-number-input .tox-input-wrapper:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input .tox-input-wrapper:focus::after{border:2px solid highlight}}.tox .tox-number-input .tox-input-wrapper:has(input:focus)::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input .tox-input-wrapper:has(input:focus)::after{border:2px solid highlight}}.tox .tox-number-input input{border-radius:3px;color:#222f3e;font-size:14px;margin:2px 0;pointer-events:all;position:relative;width:60px}.tox .tox-number-input input:hover{background:#f0f0f0;color:#222f3e}.tox .tox-number-input input:focus{background-color:#f7f7f7}.tox .tox-number-input input:disabled{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-number-input button{color:#222f3e;height:28px;position:relative;text-align:center;width:24px}@media (forced-colors:active){.tox .tox-number-input button:active,.tox .tox-number-input button:focus,.tox .tox-number-input button:hover{outline:1px solid currentColor!important}}.tox .tox-number-input button svg{display:block;fill:#222f3e;margin:0 auto;transform:scale(.67)}@media (forced-colors:active){.tox .tox-number-input button svg,.tox .tox-number-input button svg:active,.tox .tox-number-input button svg:hover{fill:currentColor!important}.tox .tox-number-input button svg:disabled{filter:contrast(0)}}.tox .tox-number-input button:focus{background:#f7f7f7;z-index:1}.tox .tox-number-input button:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input button:focus::after{border:2px solid highlight}}.tox .tox-number-input button:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-number-input button:hover svg{fill:#222f3e}.tox .tox-number-input button:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-number-input button:active svg{fill:#222f3e}.tox .tox-number-input button:disabled{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-number-input button:disabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-number-input button.minus{border-radius:3px 0 0 3px}.tox .tox-number-input button.plus{border-radius:0 3px 3px 0}.tox .tox-number-input:focus:not(:active)>.tox-input-wrapper,.tox .tox-number-input:focus:not(:active)>button{background:#f7f7f7}.tox .tox-tbtn--select{margin:6px 1px 5px 0;padding:0 4px;width:auto}.tox .tox-tbtn__select-label{cursor:default;font-weight:400;height:initial;margin:0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-tbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-tbtn__select-chevron svg{fill:rgba(34,47,62,0.5)}@media (forced-colors:active){.tox .tox-tbtn__select-chevron svg{fill:currentColor}}.tox .tox-tbtn--bespoke{background:#f7f7f7}.tox .tox-tbtn--bespoke:focus{background:#f7f7f7}.tox .tox-tbtn--bespoke+.tox-tbtn--bespoke{margin-inline-start:4px}.tox .tox-tbtn--bespoke .tox-tbtn__select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:7em}.tox .tox-tbtn--disabled .tox-tbtn__select-label,.tox .tox-tbtn--select:disabled .tox-tbtn__select-label{cursor:not-allowed}.tox .tox-split-button{border:0;border-radius:3px;box-sizing:border-box;display:flex;margin:6px 1px 5px 0}.tox .tox-split-button:hover{box-shadow:0 0 0 1px #f0f0f0 inset}.tox .tox-split-button:focus{background:#fff;box-shadow:none;color:#222f3e;position:relative;z-index:1}.tox .tox-split-button:focus::after{pointer-events:none;border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-split-button:focus::after{border:2px solid highlight}}.tox .tox-split-button>*{border-radius:0}.tox .tox-split-button>:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}.tox .tox-split-button>:nth-child(2){border-bottom-right-radius:3px;border-top-right-radius:3px}.tox .tox-split-button__chevron{width:16px}.tox .tox-split-button__chevron svg{fill:rgba(34,47,62,0.5)}@media (forced-colors:active){.tox .tox-split-button__chevron svg{fill:currentColor}}.tox .tox-split-button .tox-tbtn{margin:0}.tox .tox-split-button:focus .tox-tbtn{background-color:transparent}.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus,.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover,.tox .tox-split-button.tox-tbtn--disabled:focus,.tox .tox-split-button.tox-tbtn--disabled:hover{background:#fff;box-shadow:none;color:rgba(34,47,62,.5)}.tox.tox-platform-touch .tox-split-button .tox-tbtn--select{padding:0 0}.tox.tox-platform-touch .tox-split-button .tox-tbtn:not(.tox-tbtn--select):first-child{width:30px}.tox.tox-platform-touch .tox-split-button__chevron{width:20px}.tox .tox-split-button.tox-tbtn--disabled svg #tox-icon-highlight-bg-color__color,.tox .tox-split-button.tox-tbtn--disabled svg #tox-icon-text-color__color{opacity:.6}.tox .tox-toolbar-overlord{background-color:#fff}.tox .tox-toolbar,.tox .tox-toolbar__overflow,.tox .tox-toolbar__primary{background-attachment:local;background-color:#fff;background-image:repeating-linear-gradient(#e3e3e3 0 1px,transparent 1px 39px);background-position:center top 40px;background-repeat:no-repeat;background-size:calc(100% - 11px * 2) calc(100% - 41px);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 0;transform:perspective(1px)}.tox .tox-toolbar-overlord>.tox-toolbar,.tox .tox-toolbar-overlord>.tox-toolbar__overflow,.tox .tox-toolbar-overlord>.tox-toolbar__primary{background-position:center top 0;background-size:calc(100% - 11px * 2) calc(100% - 0)}.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed{height:0;opacity:0;padding-bottom:0;padding-top:0;visibility:hidden}.tox .tox-toolbar__overflow--growing{transition:height .3s ease,opacity .2s linear .1s}.tox .tox-toolbar__overflow--shrinking{transition:opacity .3s ease,height .2s linear .1s,visibility 0s linear .3s}.tox .tox-anchorbar,.tox .tox-toolbar-overlord{grid-column:1/-1}.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord{border-top:1px solid transparent;margin-top:-1px;padding-bottom:1px;padding-top:1px}@media (forced-colors:active){.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord{outline:1px solid currentColor}}.tox .tox-toolbar--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-pop .tox-toolbar{border-width:0}.tox .tox-toolbar--no-divider{background-image:none}.tox .tox-toolbar-overlord .tox-toolbar:not(.tox-toolbar--scrolling):first-child,.tox .tox-toolbar-overlord .tox-toolbar__primary{background-position:center top 39px}.tox .tox-editor-header>.tox-toolbar--scrolling,.tox .tox-toolbar-overlord .tox-toolbar--scrolling:first-child{background-image:none}.tox.tox-tinymce-aux .tox-toolbar__overflow{background-color:#fff;background-position:center top 43px;background-size:calc(100% - 8px * 2) calc(100% - 51px);border:none;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);overscroll-behavior:none;padding:4px 0}@media (forced-colors:active){.tox.tox-tinymce-aux .tox-toolbar__overflow{border:solid}}.tox-pop .tox-pop__dialog .tox-toolbar{background-position:center top 43px;background-size:calc(100% - 11px * 2) calc(100% - 51px);padding:4px 0}.tox .tox-toolbar__group{align-items:center;display:flex;flex-wrap:wrap;margin:0 0;padding:0 11px 0 12px}.tox .tox-toolbar__group--pull-right{margin-left:auto}.tox .tox-toolbar--scrolling .tox-toolbar__group{flex-shrink:0;flex-wrap:nowrap}.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right:1px solid transparent}.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left:1px solid transparent}.tox .tox-tooltip{display:inline-block;max-width:15em;padding:8px;pointer-events:none;position:relative;width:max-content;z-index:1150}.tox .tox-tooltip__body{background-color:#222f3e;border-radius:6px;box-shadow:none;color:#fff;font-size:12px;font-style:normal;font-weight:600;overflow-wrap:break-word;padding:4px 6px;text-transform:none}@media (forced-colors:active){.tox .tox-tooltip__body{outline:outset 1px}}.tox .tox-tooltip__arrow{position:absolute}.tox .tox-tooltip--down .tox-tooltip__arrow{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #222f3e;bottom:0;left:50%;position:absolute;transform:translateX(-50%)}.tox .tox-tooltip--up .tox-tooltip__arrow{border-bottom:8px solid #222f3e;border-left:8px solid transparent;border-right:8px solid transparent;left:50%;position:absolute;top:0;transform:translateX(-50%)}.tox .tox-tooltip--right .tox-tooltip__arrow{border-bottom:8px solid transparent;border-left:8px solid #222f3e;border-top:8px solid transparent;position:absolute;right:0;top:50%;transform:translateY(-50%)}.tox .tox-tooltip--left .tox-tooltip__arrow{border-bottom:8px solid transparent;border-right:8px solid #222f3e;border-top:8px solid transparent;left:0;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-tree{display:flex;flex-direction:column}.tox .tox-tree .tox-trbtn{align-items:center;background:0 0;border:0;border-radius:4px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;margin-bottom:4px;margin-top:4px;outline:0;overflow:hidden;padding:0;padding-left:8px;text-transform:none}.tox .tox-tree .tox-trbtn .tox-tree__label{cursor:default;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-tree .tox-trbtn svg{display:block;fill:#222f3e}.tox .tox-tree .tox-trbtn:focus{background:#f0f0f0;border:0;box-shadow:none}.tox .tox-tree .tox-trbtn:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn:hover svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn:active svg{fill:#222f3e}.tox .tox-tree .tox-trbtn--disabled,.tox .tox-tree .tox-trbtn--disabled:hover,.tox .tox-tree .tox-trbtn:disabled,.tox .tox-tree .tox-trbtn:disabled:hover{background:0 0;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tree .tox-trbtn--disabled svg,.tox .tox-tree .tox-trbtn--disabled:hover svg,.tox .tox-tree .tox-trbtn:disabled svg,.tox .tox-tree .tox-trbtn:disabled:hover svg{fill:rgba(34,47,62,0.5)}.tox .tox-tree .tox-trbtn--enabled,.tox .tox-tree .tox-trbtn--enabled:hover{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn--enabled:hover>*,.tox .tox-tree .tox-trbtn--enabled>*{transform:none}.tox .tox-tree .tox-trbtn--enabled svg,.tox .tox-tree .tox-trbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled){color:#222f3e}.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled) svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:active>*{transform:none}.tox .tox-tree .tox-trbtn--return{align-self:stretch;height:unset;width:16px}.tox .tox-tree .tox-trbtn--labeled{padding:0 4px;width:unset}.tox .tox-tree .tox-trbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-tree .tox-tree--directory{display:flex;flex-direction:column}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label{font-weight:700}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn{margin-left:auto}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn svg{fill:transparent}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn.tox-mbtn--active svg,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn:focus svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:focus .tox-mbtn svg,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover .tox-mbtn svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover:has(.tox-mbtn:hover){background-color:transparent;color:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover:has(.tox-mbtn:hover) .tox-chevron svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-chevron{margin-right:6px}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--growing) .tox-chevron,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--shrinking) .tox-chevron{transition:transform .5s ease-in-out}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--growing) .tox-chevron,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--open) .tox-chevron{transform:rotate(90deg)}.tox .tox-tree .tox-tree--leaf__label{font-weight:400}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn{margin-left:auto}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn svg{fill:transparent}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn.tox-mbtn--active svg,.tox .tox-tree .tox-tree--leaf__label .tox-mbtn:focus svg{fill:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover .tox-mbtn svg{fill:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover:has(.tox-mbtn:hover){background-color:transparent;color:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover:has(.tox-mbtn:hover) .tox-chevron svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory__children{overflow:hidden;padding-left:16px}.tox .tox-tree .tox-tree--directory__children.tox-tree--directory__children--growing,.tox .tox-tree .tox-tree--directory__children.tox-tree--directory__children--shrinking{transition:height .5s ease-in-out}.tox .tox-tree .tox-trbtn.tox-tree--leaf__label{display:flex;justify-content:space-between}.tox .tox-revisionhistory__pane{padding:0!important}.tox .tox-revisionhistory__container{display:flex;flex-direction:column;height:100%}.tox .tox-revisionhistory{background-color:#fff;border-top:1px solid #f0f0f0;display:flex;flex:1;height:100%;margin-top:8px;overflow-x:auto;overflow-y:hidden;position:relative;width:100%}.tox .tox-revisionhistory--align-right{margin-left:auto}.tox .tox-revisionhistory__iframe{flex:1}.tox .tox-revisionhistory__sidebar{display:flex;flex-direction:column;height:100%;min-width:248px;width:316px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__sidebar-title{background-color:#fff;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);color:#222f3e;font-size:20px;font-weight:400;line-height:28px;padding:12px;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions{background-color:#f0f0f0;display:flex;flex:1;flex-direction:column;gap:12px;overflow-y:auto;padding:10px 12px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus{height:100%;position:relative;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0;border-radius:6px;bottom:1px;left:1px;right:1px;top:1px}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card{background-color:#fff;border:1px solid #f0f0f0;border-radius:6px;color:#222f3e;cursor:pointer;display:flex;flex-direction:column;font-size:14px;gap:12px;padding:12px;width:100%}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:hover{box-shadow:0 4px 8px 0 rgba(34,47,62,.1)}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus{position:relative;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 #006ce7;content:'';left:0;position:absolute;right:0;top:0;border-radius:6px;box-shadow:0 0 0 2px #006ce7;box-shadow:0 0 0 2px #006ce7!important}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected{background-color:#fff5cc;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);position:relative}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 #e3b82a;content:'';left:0;position:absolute;right:0;top:0;border-radius:6px;box-shadow:0 0 0 2px #e3b82a}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-date{display:flex;gap:12px;justify-content:space-between}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-date-label{font-size:16px;line-height:24px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-label{font-size:12px;font-weight:600;line-height:24px;padding:0}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-author{align-items:center;display:flex;flex:1 0 0;gap:8px;height:36px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-author-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:700;line-height:18px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__avatar{border-radius:50%;height:36px;object-fit:cover;vertical-align:middle;width:36px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__norevision{color:rgba(34,47,62,.7);font-size:16px;line-height:24px;padding:5px 5.5px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-check-icon{color:#222f3e;height:24px}.tox .tox-view-wrap,.tox .tox-view-wrap__slot-container{background-color:#fff;display:flex;flex:1;flex-direction:column;height:100%}.tox .tox-view{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-view__header{align-items:center;display:flex;font-size:16px;justify-content:space-between;padding:10px 10px 2px 10px;position:relative}.tox .tox-view__label{color:#222f3e;font-weight:700;line-height:24px;padding:4px 16px;text-align:center;white-space:nowrap}.tox .tox-view__label--normal{font-size:16px}.tox .tox-view__label--large{font-size:20px}.tox .tox-view--mobile.tox-view__header,.tox .tox-view--mobile.tox-view__toolbar{padding:8px}.tox .tox-view--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-view__toolbar{display:flex;flex-direction:row;gap:8px;justify-content:space-between;overflow-x:auto;padding:10px 10px 2px 10px}.tox .tox-view__toolbar__group{display:flex;flex-direction:row;gap:12px}.tox .tox-view__header-end,.tox .tox-view__header-start{display:flex}.tox .tox-view__pane{height:100%;padding:8px;position:relative;width:100%}.tox .tox-view__pane_panel{border:1px solid #eee;border-radius:6px}.tox:not([dir=rtl]) .tox-view__header .tox-view__header-end>*,.tox:not([dir=rtl]) .tox-view__header .tox-view__header-start>*{margin-left:8px}.tox[dir=rtl] .tox-view__header .tox-view__header-end>*,.tox[dir=rtl] .tox-view__header .tox-view__header-start>*{margin-right:8px}.tox .tox-well{border:1px solid #eee;border-radius:6px;padding:8px;width:100%}.tox .tox-well>:first-child{margin-top:0}.tox .tox-well>:last-child{margin-bottom:0}.tox .tox-well>:only-child{margin:0}.tox .tox-custom-editor{border:1px solid #eee;border-radius:6px;display:flex;flex:1;overflow:hidden;position:relative}.tox .tox-dialog-loading::before{background-color:rgba(0,0,0,.5);content:"";height:100%;position:absolute;width:100%;z-index:1000}.tox .tox-tab{cursor:pointer}.tox .tox-dialog__content-js{display:flex;flex:1}.tox .tox-dialog__body-content .tox-collection{display:flex;flex:1}`);(function(){var w=tinymce.util.Tools.resolve("tinymce.PluginManager");const g=(bt,dt,Kt)=>{const qo=dt==="UL"?"InsertUnorderedList":"InsertOrderedList";bt.execCommand(qo,!1,Kt===!1?null:{"list-style-type":Kt})},S=bt=>{bt.addCommand("ApplyUnorderedListStyle",(dt,Kt)=>{g(bt,"UL",Kt["list-style-type"])}),bt.addCommand("ApplyOrderedListStyle",(dt,Kt)=>{g(bt,"OL",Kt["list-style-type"])})},B=bt=>dt=>dt.options.get(bt),W=bt=>{const dt=bt.options.register;dt("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),dt("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})},te=B("advlist_number_styles"),ce=B("advlist_bullet_styles"),Ee=bt=>bt==null,$e=bt=>!Ee(bt);var We=tinymce.util.Tools.resolve("tinymce.util.Tools");class Me{constructor(dt,Kt){this.tag=dt,this.value=Kt}static some(dt){return new Me(!0,dt)}static none(){return Me.singletonNone}fold(dt,Kt){return this.tag?Kt(this.value):dt()}isSome(){return this.tag}isNone(){return!this.tag}map(dt){return this.tag?Me.some(dt(this.value)):Me.none()}bind(dt){return this.tag?dt(this.value):Me.none()}exists(dt){return this.tag&&dt(this.value)}forall(dt){return!this.tag||dt(this.value)}filter(dt){return!this.tag||dt(this.value)?this:Me.none()}getOr(dt){return this.tag?this.value:dt}or(dt){return this.tag?this:dt}getOrThunk(dt){return this.tag?this.value:dt()}orThunk(dt){return this.tag?this:dt()}getOrDie(dt){if(this.tag)return this.value;throw new Error(dt??"Called getOrDie on None")}static from(dt){return $e(dt)?Me.some(dt):Me.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(dt){this.tag&&dt(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}Me.singletonNone=new Me(!1);const Ot=(bt,dt,Kt)=>{for(let qo=0,Ge=bt.length;qo/\btox\-/.test(bt.className),st=(bt,dt)=>bt.dom.isChildOf(dt,bt.getBody()),ut=bt=>dt=>$e(dt)&&bt.test(dt.nodeName),Bt=ut(/^(OL|UL|DL)$/),Rt=ut(/^(TH|TD)$/),Ke=(bt,dt,Kt)=>Ot(dt,qo=>Bt(qo)&&!mo(qo),Rt).exists(qo=>qo.nodeName===Kt&&st(bt,qo)),Ut=bt=>{const dt=bt.dom.getParent(bt.selection.getNode(),"ol,ul"),Kt=bt.dom.getStyle(dt,"listStyleType");return Me.from(Kt)},ft=(bt,dt)=>dt!==null&&!bt.dom.isEditable(dt),ue=(bt,dt)=>{const Kt=bt.dom.getParent(dt,"ol,ul,dl");return ft(bt,Kt)&&bt.selection.isEditable()},Ct=(bt,dt)=>{const Kt=bt.selection.getNode();return dt({parents:bt.dom.getParents(Kt),element:Kt}),bt.on("NodeChange",dt),()=>bt.off("NodeChange",dt)},ve=bt=>bt.replace(/\-/g," ").replace(/\b\w/g,dt=>dt.toUpperCase()),ot=bt=>Ee(bt)||bt==="default"?"":bt,bn=(bt,dt)=>Kt=>{const qo=(To,Cr)=>{const $t=To.selection.getStart(!0);Kt.setActive(Ke(To,Cr,dt)),Kt.setEnabled(!ue(To,$t)&&To.selection.isEditable())};return Ct(bt,To=>qo(bt,To.parents))},ln=(bt,dt,Kt,qo,Ge,To)=>{bt.ui.registry.addSplitButton(dt,{tooltip:Kt,icon:Ge==="OL"?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:Cr=>{const $t=We.map(To,pt=>{const Ht=Ge==="OL"?"num":"bull",ks=pt==="disc"||pt==="decimal"?"default":pt,cn=ot(pt),fn=ve(pt);return{type:"choiceitem",value:cn,icon:"list-"+Ht+"-"+ks,text:fn}});Cr($t)},onAction:()=>bt.execCommand(qo),onItemAction:(Cr,$t)=>{g(bt,Ge,$t)},select:Cr=>Ut(bt).map(pt=>Cr===pt).getOr(!1),onSetup:bn(bt,Ge)})},uo=(bt,dt,Kt,qo,Ge,To)=>{bt.ui.registry.addToggleButton(dt,{active:!1,tooltip:Kt,icon:Ge==="OL"?"ordered-list":"unordered-list",onSetup:bn(bt,Ge),onAction:()=>bt.queryCommandState(qo)||To===""?bt.execCommand(qo):g(bt,Ge,To)})},Fe=(bt,dt,Kt,qo,Ge,To)=>{To.length>1?ln(bt,dt,Kt,qo,Ge,To):uo(bt,dt,Kt,qo,Ge,ot(To[0]))},Gt=bt=>{Fe(bt,"numlist","Numbered list","InsertOrderedList","OL",te(bt)),Fe(bt,"bullist","Bullet list","InsertUnorderedList","UL",ce(bt))};var D=()=>{w.add("advlist",bt=>{bt.hasPlugin("lists")?(W(bt),Gt(bt),S(bt)):console.error("Please use the Lists plugin together with the List Styles plugin.")})};D()})();(function(){var w=tinymce.util.Tools.resolve("tinymce.PluginManager");const g=(Ee,$e)=>{Ee.focus(),Ee.undoManager.transact(()=>{Ee.setContent($e)}),Ee.selection.setCursorLocation(),Ee.nodeChanged()},S=Ee=>Ee.getContent({source_view:!0}),B=Ee=>{const $e=S(Ee);Ee.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:$e},onSubmit:We=>{g(Ee,We.getData().code),We.close()}})},W=Ee=>{Ee.addCommand("mceCodeEditor",()=>{B(Ee)})},te=Ee=>{const $e=()=>Ee.execCommand("mceCodeEditor");Ee.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:$e}),Ee.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:$e})};var ce=()=>{w.add("code",Ee=>(W(Ee),te(Ee),{}))};ce()})();(function(){var w=tinymce.util.Tools.resolve("tinymce.PluginManager");const g=Lt=>yt=>Lt===yt,S=g(null),B=g(void 0),W=Lt=>Lt==null,te=Lt=>!W(Lt),ce=()=>{},$e=(Lt=>()=>Lt)(!1);class We{constructor(yt,rt){this.tag=yt,this.value=rt}static some(yt){return new We(!0,yt)}static none(){return We.singletonNone}fold(yt,rt){return this.tag?rt(this.value):yt()}isSome(){return this.tag}isNone(){return!this.tag}map(yt){return this.tag?We.some(yt(this.value)):We.none()}bind(yt){return this.tag?yt(this.value):We.none()}exists(yt){return this.tag&&yt(this.value)}forall(yt){return!this.tag||yt(this.value)}filter(yt){return!this.tag||yt(this.value)?this:We.none()}getOr(yt){return this.tag?this.value:yt}or(yt){return this.tag?this:yt}getOrThunk(yt){return this.tag?this.value:yt()}orThunk(yt){return this.tag?this:yt()}getOrDie(yt){if(this.tag)return this.value;throw new Error(yt??"Called getOrDie on None")}static from(yt){return te(yt)?We.some(yt):We.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(yt){this.tag&&yt(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}We.singletonNone=new We(!1);const Me=(Lt,yt)=>{for(let rt=0,ao=Lt.length;rt{const rt=Lt.length,ao=new Array(rt);for(let ko=0;ko{for(let rt=0,ao=Lt.length;rt{let yt=Lt;return{get:()=>yt,set:ko=>{yt=ko}}},ut=(Lt,yt)=>{let rt=null;const ao=()=>{S(rt)||(clearTimeout(rt),rt=null)};return{cancel:ao,throttle:(...tn)=>{ao(),rt=setTimeout(()=>{rt=null,Lt.apply(null,tn)},yt)}}},Bt=(Lt,yt)=>{Lt.insertContent(yt)},Rt=Object.keys,Ke=Object.hasOwnProperty,Ut=(Lt,yt)=>{const rt=Rt(Lt);for(let ao=0,ko=rt.length;aoue(Lt,(rt,ao)=>({k:ao,v:yt(rt,ao)})),ue=(Lt,yt)=>{const rt={};return Ut(Lt,(ao,ko)=>{const tn=yt(ao,ko);rt[tn.k]=tn.v}),rt},Ct=(Lt,yt)=>Ke.call(Lt,yt),bn=(Lt=>(...yt)=>{if(yt.length===0)throw new Error("Can't merge zero objects");const rt={};for(let ao=0;aoyt),ln=Lt=>{const yt=st(We.none()),rt=()=>yt.get().each(Lt);return{clear:()=>{rt(),yt.set(We.none())},isSet:()=>yt.get().isSome(),get:()=>yt.get(),set:rs=>{rt(),yt.set(We.some(rs))}}},uo=()=>{const Lt=ln(ce);return{...Lt,on:rt=>Lt.get().each(rt)}},Fe=(Lt,yt,rt)=>yt===""||Lt.length>=yt.length&&Lt.substr(rt,rt+yt.length)===yt,Gt=(Lt,yt,rt=0,ao)=>{const ko=Lt.indexOf(yt,rt);return ko!==-1?B(ao)?!0:ko+yt.length<=ao:!1},D=(Lt,yt)=>Fe(Lt,yt,0);var bt=tinymce.util.Tools.resolve("tinymce.Resource");const dt="tinymce.plugins.emoticons",Kt=Lt=>yt=>yt.options.get(Lt),qo=(Lt,yt)=>{const rt=Lt.options.register;rt("emoticons_database",{processor:"string",default:"emojis"}),rt("emoticons_database_url",{processor:"string",default:`${yt}/js/${Ge(Lt)}${Lt.suffix}.js`}),rt("emoticons_database_id",{processor:"string",default:dt}),rt("emoticons_append",{processor:"object",default:{}}),rt("emoticons_images_url",{processor:"string",default:"https://cdnjs.cloudflare.com/ajax/libs/twemoji/15.1.0/72x72/"})},Ge=Kt("emoticons_database"),To=Kt("emoticons_database_url"),Cr=Kt("emoticons_database_id"),$t=Kt("emoticons_append"),pt=Kt("emoticons_images_url"),Ht="All",ks={symbols:"Symbols",people:"People",animals_and_nature:"Animals and Nature",food_and_drink:"Food and Drink",activity:"Activity",travel_and_places:"Travel and Places",objects:"Objects",flags:"Flags",user:"User Defined"},cn=(Lt,yt)=>Ct(Lt,yt)?Lt[yt]:yt,fn=Lt=>{const yt=$t(Lt);return ft(yt,rt=>({keywords:[],category:"user",...rt}))},zo=(Lt,yt,rt)=>{const ao=uo(),ko=uo(),tn=pt(Lt),On=Is=>D(Is.char,"`src="${tn}${ra}"`):Is.char,rs=Is=>{const yn={},ra=[];Ut(Is,(St,Vo)=>{const an={title:Vo,keywords:St.keywords,char:On(St),category:cn(ks,St.category)},Kr=yn[an.category]!==void 0?yn[an.category]:[];yn[an.category]=Kr.concat([an]),ra.push(an)}),ao.set(yn),ko.set(ra)};Lt.on("init",()=>{bt.load(rt,yt).then(Is=>{const yn=fn(Lt);rs(bn(Is,yn))},Is=>{console.log(`Failed to load emojis: ${Is}`),ao.set({}),ko.set([])})});const Zn=Is=>Is===Ht?Ln():ao.get().bind(yn=>We.from(yn[Is])).getOr([]),Ln=()=>ko.get().getOr([]),Hs=()=>[Ht].concat(Rt(ao.get().getOr({}))),sa=()=>os()?Promise.resolve(!0):new Promise((Is,yn)=>{let ra=15;const St=setInterval(()=>{os()?(clearInterval(St),Is(!0)):(ra--,ra<0&&(console.log("Could not load emojis from url: "+yt),clearInterval(St),yn(!1)))},100)}),os=()=>ao.isSet()&&ko.isSet();return{listCategories:Hs,hasLoaded:os,waitForLoad:sa,listAll:Ln,listCategory:Zn}},j=(Lt,yt)=>Gt(Lt.title.toLowerCase(),yt)||Me(Lt.keywords,rt=>Gt(rt.toLowerCase(),yt)),Fr=(Lt,yt,rt)=>{const ao=[],ko=yt.toLowerCase(),tn=rt.fold(()=>$e,On=>rs=>rs>=On);for(let On=0;On{const rt={pattern:"",results:Fr(yt.listAll(),"",We.some(300))},ao=st(Ht),ko=Hs=>{const sa=Hs.getData(),os=ao.get(),Is=yt.listCategory(os),yn=Fr(Is,sa[Cs],os===Ht?We.some(300):We.none());Hs.setData({results:yn})},tn=ut(Hs=>{ko(Hs)},200),On={label:"Search",type:"input",name:Cs},rs={type:"collection",name:"results"},Zn=()=>({title:"Emojis",size:"normal",body:{type:"tabpanel",tabs:Ot(yt.listCategories(),sa=>({title:sa,name:sa,items:[On,rs]}))},initialData:rt,onTabChange:(sa,os)=>{ao.set(os.newTabName),tn.throttle(sa)},onChange:tn.throttle,onAction:(sa,os)=>{os.name==="results"&&(Bt(Lt,os.value),sa.close())},buttons:[{type:"cancel",text:"Close",primary:!0}]}),Ln=Lt.windowManager.open(Zn());Ln.focus(Cs),yt.hasLoaded()||(Ln.block("Loading emojis..."),yt.waitForLoad().then(()=>{Ln.redial(Zn()),tn.throttle(Ln),Ln.focus(Cs),Ln.unblock()}).catch(Hs=>{Ln.redial({title:"Emojis",body:{type:"panel",items:[{type:"alertbanner",level:"error",icon:"warning",text:"Could not load emojis"}]},buttons:[{type:"cancel",text:"Close",primary:!0}],initialData:{pattern:"",results:[]}}),Ln.focus(Cs),Ln.unblock()}))},bi=(Lt,yt)=>{Lt.addCommand("mceEmoticons",()=>Sn(Lt,yt))},qi=Lt=>{Lt.on("PreInit",()=>{Lt.parser.addAttributeFilter("data-emoticon",yt=>{mo(yt,rt=>{rt.attr("data-mce-resize","false"),rt.attr("data-mce-placeholder","1")})})})},mn=(Lt,yt)=>{Lt.ui.registry.addAutocompleter("emoticons",{trigger:":",columns:"auto",minChars:2,fetch:(rt,ao)=>yt.waitForLoad().then(()=>{const ko=yt.listAll();return Fr(ko,rt,We.some(ao))}),onAction:(rt,ao,ko)=>{Lt.selection.setRng(ao),Lt.insertContent(ko),rt.hide()}})},Bn=Lt=>yt=>{const rt=()=>{yt.setEnabled(Lt.selection.isEditable())};return Lt.on("NodeChange",rt),rt(),()=>{Lt.off("NodeChange",rt)}},dn=Lt=>{const yt=()=>Lt.execCommand("mceEmoticons");Lt.ui.registry.addButton("emoticons",{tooltip:"Emojis",icon:"emoji",onAction:yt,onSetup:Bn(Lt)}),Lt.ui.registry.addMenuItem("emoticons",{text:"Emojis...",icon:"emoji",onAction:yt,onSetup:Bn(Lt)})};var Le=()=>{w.add("emoticons",(Lt,yt)=>{qo(Lt,yt);const rt=To(Lt),ao=Cr(Lt),ko=zo(Lt,rt,ao);return bi(Lt,ko),dn(Lt),mn(Lt,ko),qi(Lt),{getAllEmojis:()=>ko.waitForLoad().then(()=>ko.listAll())}})};Le()})();window.tinymce.Resource.add("tinymce.plugins.emoticons",{grinning:{keywords:["face","smile","happy","joy",":D","grin"],char:"😀",fitzpatrick_scale:!1,category:"people"},grimacing:{keywords:["face","grimace","teeth"],char:"😬",fitzpatrick_scale:!1,category:"people"},grin:{keywords:["face","happy","smile","joy","kawaii"],char:"😁",fitzpatrick_scale:!1,category:"people"},joy:{keywords:["face","cry","tears","weep","happy","happytears","haha"],char:"😂",fitzpatrick_scale:!1,category:"people"},rofl:{keywords:["face","rolling","floor","laughing","lol","haha"],char:"🤣",fitzpatrick_scale:!1,category:"people"},partying:{keywords:["face","celebration","woohoo"],char:"🥳",fitzpatrick_scale:!1,category:"people"},smiley:{keywords:["face","happy","joy","haha",":D",":)","smile","funny"],char:"😃",fitzpatrick_scale:!1,category:"people"},smile:{keywords:["face","happy","joy","funny","haha","laugh","like",":D",":)"],char:"😄",fitzpatrick_scale:!1,category:"people"},sweat_smile:{keywords:["face","hot","happy","laugh","sweat","smile","relief"],char:"😅",fitzpatrick_scale:!1,category:"people"},laughing:{keywords:["happy","joy","lol","satisfied","haha","face","glad","XD","laugh"],char:"😆",fitzpatrick_scale:!1,category:"people"},innocent:{keywords:["face","angel","heaven","halo"],char:"😇",fitzpatrick_scale:!1,category:"people"},wink:{keywords:["face","happy","mischievous","secret",";)","smile","eye"],char:"😉",fitzpatrick_scale:!1,category:"people"},blush:{keywords:["face","smile","happy","flushed","crush","embarrassed","shy","joy"],char:"😊",fitzpatrick_scale:!1,category:"people"},slightly_smiling_face:{keywords:["face","smile"],char:"🙂",fitzpatrick_scale:!1,category:"people"},upside_down_face:{keywords:["face","flipped","silly","smile"],char:"🙃",fitzpatrick_scale:!1,category:"people"},relaxed:{keywords:["face","blush","massage","happiness"],char:"☺️",fitzpatrick_scale:!1,category:"people"},yum:{keywords:["happy","joy","tongue","smile","face","silly","yummy","nom","delicious","savouring"],char:"😋",fitzpatrick_scale:!1,category:"people"},relieved:{keywords:["face","relaxed","phew","massage","happiness"],char:"😌",fitzpatrick_scale:!1,category:"people"},heart_eyes:{keywords:["face","love","like","affection","valentines","infatuation","crush","heart"],char:"😍",fitzpatrick_scale:!1,category:"people"},smiling_face_with_three_hearts:{keywords:["face","love","like","affection","valentines","infatuation","crush","hearts","adore"],char:"🥰",fitzpatrick_scale:!1,category:"people"},kissing_heart:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:"😘",fitzpatrick_scale:!1,category:"people"},kissing:{keywords:["love","like","face","3","valentines","infatuation","kiss"],char:"😗",fitzpatrick_scale:!1,category:"people"},kissing_smiling_eyes:{keywords:["face","affection","valentines","infatuation","kiss"],char:"😙",fitzpatrick_scale:!1,category:"people"},kissing_closed_eyes:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:"😚",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_winking_eye:{keywords:["face","prank","childish","playful","mischievous","smile","wink","tongue"],char:"😜",fitzpatrick_scale:!1,category:"people"},zany:{keywords:["face","goofy","crazy"],char:"🤪",fitzpatrick_scale:!1,category:"people"},raised_eyebrow:{keywords:["face","distrust","scepticism","disapproval","disbelief","surprise"],char:"🤨",fitzpatrick_scale:!1,category:"people"},monocle:{keywords:["face","stuffy","wealthy"],char:"🧐",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_closed_eyes:{keywords:["face","prank","playful","mischievous","smile","tongue"],char:"😝",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue:{keywords:["face","prank","childish","playful","mischievous","smile","tongue"],char:"😛",fitzpatrick_scale:!1,category:"people"},money_mouth_face:{keywords:["face","rich","dollar","money"],char:"🤑",fitzpatrick_scale:!1,category:"people"},nerd_face:{keywords:["face","nerdy","geek","dork"],char:"🤓",fitzpatrick_scale:!1,category:"people"},sunglasses:{keywords:["face","cool","smile","summer","beach","sunglass"],char:"😎",fitzpatrick_scale:!1,category:"people"},star_struck:{keywords:["face","smile","starry","eyes","grinning"],char:"🤩",fitzpatrick_scale:!1,category:"people"},clown_face:{keywords:["face"],char:"🤡",fitzpatrick_scale:!1,category:"people"},cowboy_hat_face:{keywords:["face","cowgirl","hat"],char:"🤠",fitzpatrick_scale:!1,category:"people"},hugs:{keywords:["face","smile","hug"],char:"🤗",fitzpatrick_scale:!1,category:"people"},smirk:{keywords:["face","smile","mean","prank","smug","sarcasm"],char:"😏",fitzpatrick_scale:!1,category:"people"},no_mouth:{keywords:["face","hellokitty"],char:"😶",fitzpatrick_scale:!1,category:"people"},neutral_face:{keywords:["indifference","meh",":|","neutral"],char:"😐",fitzpatrick_scale:!1,category:"people"},expressionless:{keywords:["face","indifferent","-_-","meh","deadpan"],char:"😑",fitzpatrick_scale:!1,category:"people"},unamused:{keywords:["indifference","bored","straight face","serious","sarcasm","unimpressed","skeptical","dubious","side_eye"],char:"😒",fitzpatrick_scale:!1,category:"people"},roll_eyes:{keywords:["face","eyeroll","frustrated"],char:"🙄",fitzpatrick_scale:!1,category:"people"},thinking:{keywords:["face","hmmm","think","consider"],char:"🤔",fitzpatrick_scale:!1,category:"people"},lying_face:{keywords:["face","lie","pinocchio"],char:"🤥",fitzpatrick_scale:!1,category:"people"},hand_over_mouth:{keywords:["face","whoops","shock","surprise"],char:"🤭",fitzpatrick_scale:!1,category:"people"},shushing:{keywords:["face","quiet","shhh"],char:"🤫",fitzpatrick_scale:!1,category:"people"},symbols_over_mouth:{keywords:["face","swearing","cursing","cussing","profanity","expletive"],char:"🤬",fitzpatrick_scale:!1,category:"people"},exploding_head:{keywords:["face","shocked","mind","blown"],char:"🤯",fitzpatrick_scale:!1,category:"people"},flushed:{keywords:["face","blush","shy","flattered"],char:"😳",fitzpatrick_scale:!1,category:"people"},disappointed:{keywords:["face","sad","upset","depressed",":("],char:"😞",fitzpatrick_scale:!1,category:"people"},worried:{keywords:["face","concern","nervous",":("],char:"😟",fitzpatrick_scale:!1,category:"people"},angry:{keywords:["mad","face","annoyed","frustrated"],char:"😠",fitzpatrick_scale:!1,category:"people"},rage:{keywords:["angry","mad","hate","despise"],char:"😡",fitzpatrick_scale:!1,category:"people"},pensive:{keywords:["face","sad","depressed","upset"],char:"😔",fitzpatrick_scale:!1,category:"people"},confused:{keywords:["face","indifference","huh","weird","hmmm",":/"],char:"😕",fitzpatrick_scale:!1,category:"people"},slightly_frowning_face:{keywords:["face","frowning","disappointed","sad","upset"],char:"🙁",fitzpatrick_scale:!1,category:"people"},frowning_face:{keywords:["face","sad","upset","frown"],char:"☹",fitzpatrick_scale:!1,category:"people"},persevere:{keywords:["face","sick","no","upset","oops"],char:"😣",fitzpatrick_scale:!1,category:"people"},confounded:{keywords:["face","confused","sick","unwell","oops",":S"],char:"😖",fitzpatrick_scale:!1,category:"people"},tired_face:{keywords:["sick","whine","upset","frustrated"],char:"😫",fitzpatrick_scale:!1,category:"people"},weary:{keywords:["face","tired","sleepy","sad","frustrated","upset"],char:"😩",fitzpatrick_scale:!1,category:"people"},pleading:{keywords:["face","begging","mercy"],char:"🥺",fitzpatrick_scale:!1,category:"people"},triumph:{keywords:["face","gas","phew","proud","pride"],char:"😤",fitzpatrick_scale:!1,category:"people"},open_mouth:{keywords:["face","surprise","impressed","wow","whoa",":O"],char:"😮",fitzpatrick_scale:!1,category:"people"},scream:{keywords:["face","munch","scared","omg"],char:"😱",fitzpatrick_scale:!1,category:"people"},fearful:{keywords:["face","scared","terrified","nervous","oops","huh"],char:"😨",fitzpatrick_scale:!1,category:"people"},cold_sweat:{keywords:["face","nervous","sweat"],char:"😰",fitzpatrick_scale:!1,category:"people"},hushed:{keywords:["face","woo","shh"],char:"😯",fitzpatrick_scale:!1,category:"people"},frowning:{keywords:["face","aw","what"],char:"😦",fitzpatrick_scale:!1,category:"people"},anguished:{keywords:["face","stunned","nervous"],char:"😧",fitzpatrick_scale:!1,category:"people"},cry:{keywords:["face","tears","sad","depressed","upset",":'("],char:"😢",fitzpatrick_scale:!1,category:"people"},disappointed_relieved:{keywords:["face","phew","sweat","nervous"],char:"😥",fitzpatrick_scale:!1,category:"people"},drooling_face:{keywords:["face"],char:"🤤",fitzpatrick_scale:!1,category:"people"},sleepy:{keywords:["face","tired","rest","nap"],char:"😪",fitzpatrick_scale:!1,category:"people"},sweat:{keywords:["face","hot","sad","tired","exercise"],char:"😓",fitzpatrick_scale:!1,category:"people"},hot:{keywords:["face","feverish","heat","red","sweating"],char:"🥵",fitzpatrick_scale:!1,category:"people"},cold:{keywords:["face","blue","freezing","frozen","frostbite","icicles"],char:"🥶",fitzpatrick_scale:!1,category:"people"},sob:{keywords:["face","cry","tears","sad","upset","depressed"],char:"😭",fitzpatrick_scale:!1,category:"people"},dizzy_face:{keywords:["spent","unconscious","xox","dizzy"],char:"😵",fitzpatrick_scale:!1,category:"people"},astonished:{keywords:["face","xox","surprised","poisoned"],char:"😲",fitzpatrick_scale:!1,category:"people"},zipper_mouth_face:{keywords:["face","sealed","zipper","secret"],char:"🤐",fitzpatrick_scale:!1,category:"people"},nauseated_face:{keywords:["face","vomit","gross","green","sick","throw up","ill"],char:"🤢",fitzpatrick_scale:!1,category:"people"},sneezing_face:{keywords:["face","gesundheit","sneeze","sick","allergy"],char:"🤧",fitzpatrick_scale:!1,category:"people"},vomiting:{keywords:["face","sick"],char:"🤮",fitzpatrick_scale:!1,category:"people"},mask:{keywords:["face","sick","ill","disease"],char:"😷",fitzpatrick_scale:!1,category:"people"},face_with_thermometer:{keywords:["sick","temperature","thermometer","cold","fever"],char:"🤒",fitzpatrick_scale:!1,category:"people"},face_with_head_bandage:{keywords:["injured","clumsy","bandage","hurt"],char:"🤕",fitzpatrick_scale:!1,category:"people"},woozy:{keywords:["face","dizzy","intoxicated","tipsy","wavy"],char:"🥴",fitzpatrick_scale:!1,category:"people"},sleeping:{keywords:["face","tired","sleepy","night","zzz"],char:"😴",fitzpatrick_scale:!1,category:"people"},zzz:{keywords:["sleepy","tired","dream"],char:"💤",fitzpatrick_scale:!1,category:"people"},poop:{keywords:["hankey","shitface","fail","turd","shit"],char:"💩",fitzpatrick_scale:!1,category:"people"},smiling_imp:{keywords:["devil","horns"],char:"😈",fitzpatrick_scale:!1,category:"people"},imp:{keywords:["devil","angry","horns"],char:"👿",fitzpatrick_scale:!1,category:"people"},japanese_ogre:{keywords:["monster","red","mask","halloween","scary","creepy","devil","demon","japanese","ogre"],char:"👹",fitzpatrick_scale:!1,category:"people"},japanese_goblin:{keywords:["red","evil","mask","monster","scary","creepy","japanese","goblin"],char:"👺",fitzpatrick_scale:!1,category:"people"},skull:{keywords:["dead","skeleton","creepy","death"],char:"💀",fitzpatrick_scale:!1,category:"people"},ghost:{keywords:["halloween","spooky","scary"],char:"👻",fitzpatrick_scale:!1,category:"people"},alien:{keywords:["UFO","paul","weird","outer_space"],char:"👽",fitzpatrick_scale:!1,category:"people"},robot:{keywords:["computer","machine","bot"],char:"🤖",fitzpatrick_scale:!1,category:"people"},smiley_cat:{keywords:["animal","cats","happy","smile"],char:"😺",fitzpatrick_scale:!1,category:"people"},smile_cat:{keywords:["animal","cats","smile"],char:"😸",fitzpatrick_scale:!1,category:"people"},joy_cat:{keywords:["animal","cats","haha","happy","tears"],char:"😹",fitzpatrick_scale:!1,category:"people"},heart_eyes_cat:{keywords:["animal","love","like","affection","cats","valentines","heart"],char:"😻",fitzpatrick_scale:!1,category:"people"},smirk_cat:{keywords:["animal","cats","smirk"],char:"😼",fitzpatrick_scale:!1,category:"people"},kissing_cat:{keywords:["animal","cats","kiss"],char:"😽",fitzpatrick_scale:!1,category:"people"},scream_cat:{keywords:["animal","cats","munch","scared","scream"],char:"🙀",fitzpatrick_scale:!1,category:"people"},crying_cat_face:{keywords:["animal","tears","weep","sad","cats","upset","cry"],char:"😿",fitzpatrick_scale:!1,category:"people"},pouting_cat:{keywords:["animal","cats"],char:"😾",fitzpatrick_scale:!1,category:"people"},palms_up:{keywords:["hands","gesture","cupped","prayer"],char:"🤲",fitzpatrick_scale:!0,category:"people"},raised_hands:{keywords:["gesture","hooray","yea","celebration","hands"],char:"🙌",fitzpatrick_scale:!0,category:"people"},clap:{keywords:["hands","praise","applause","congrats","yay"],char:"👏",fitzpatrick_scale:!0,category:"people"},wave:{keywords:["hands","gesture","goodbye","solong","farewell","hello","hi","palm"],char:"👋",fitzpatrick_scale:!0,category:"people"},call_me_hand:{keywords:["hands","gesture"],char:"🤙",fitzpatrick_scale:!0,category:"people"},"+1":{keywords:["thumbsup","yes","awesome","good","agree","accept","cool","hand","like"],char:"👍",fitzpatrick_scale:!0,category:"people"},"-1":{keywords:["thumbsdown","no","dislike","hand"],char:"👎",fitzpatrick_scale:!0,category:"people"},facepunch:{keywords:["angry","violence","fist","hit","attack","hand"],char:"👊",fitzpatrick_scale:!0,category:"people"},fist:{keywords:["fingers","hand","grasp"],char:"✊",fitzpatrick_scale:!0,category:"people"},fist_left:{keywords:["hand","fistbump"],char:"🤛",fitzpatrick_scale:!0,category:"people"},fist_right:{keywords:["hand","fistbump"],char:"🤜",fitzpatrick_scale:!0,category:"people"},v:{keywords:["fingers","ohyeah","hand","peace","victory","two"],char:"✌",fitzpatrick_scale:!0,category:"people"},ok_hand:{keywords:["fingers","limbs","perfect","ok","okay"],char:"👌",fitzpatrick_scale:!0,category:"people"},raised_hand:{keywords:["fingers","stop","highfive","palm","ban"],char:"✋",fitzpatrick_scale:!0,category:"people"},raised_back_of_hand:{keywords:["fingers","raised","backhand"],char:"🤚",fitzpatrick_scale:!0,category:"people"},open_hands:{keywords:["fingers","butterfly","hands","open"],char:"👐",fitzpatrick_scale:!0,category:"people"},muscle:{keywords:["arm","flex","hand","summer","strong","biceps"],char:"💪",fitzpatrick_scale:!0,category:"people"},pray:{keywords:["please","hope","wish","namaste","highfive"],char:"🙏",fitzpatrick_scale:!0,category:"people"},foot:{keywords:["kick","stomp"],char:"🦶",fitzpatrick_scale:!0,category:"people"},leg:{keywords:["kick","limb"],char:"🦵",fitzpatrick_scale:!0,category:"people"},handshake:{keywords:["agreement","shake"],char:"🤝",fitzpatrick_scale:!1,category:"people"},point_up:{keywords:["hand","fingers","direction","up"],char:"☝",fitzpatrick_scale:!0,category:"people"},point_up_2:{keywords:["fingers","hand","direction","up"],char:"👆",fitzpatrick_scale:!0,category:"people"},point_down:{keywords:["fingers","hand","direction","down"],char:"👇",fitzpatrick_scale:!0,category:"people"},point_left:{keywords:["direction","fingers","hand","left"],char:"👈",fitzpatrick_scale:!0,category:"people"},point_right:{keywords:["fingers","hand","direction","right"],char:"👉",fitzpatrick_scale:!0,category:"people"},fu:{keywords:["hand","fingers","rude","middle","flipping"],char:"🖕",fitzpatrick_scale:!0,category:"people"},raised_hand_with_fingers_splayed:{keywords:["hand","fingers","palm"],char:"🖐",fitzpatrick_scale:!0,category:"people"},love_you:{keywords:["hand","fingers","gesture"],char:"🤟",fitzpatrick_scale:!0,category:"people"},metal:{keywords:["hand","fingers","evil_eye","sign_of_horns","rock_on"],char:"🤘",fitzpatrick_scale:!0,category:"people"},crossed_fingers:{keywords:["good","lucky"],char:"🤞",fitzpatrick_scale:!0,category:"people"},vulcan_salute:{keywords:["hand","fingers","spock","star trek"],char:"🖖",fitzpatrick_scale:!0,category:"people"},writing_hand:{keywords:["lower_left_ballpoint_pen","stationery","write","compose"],char:"✍",fitzpatrick_scale:!0,category:"people"},selfie:{keywords:["camera","phone"],char:"🤳",fitzpatrick_scale:!0,category:"people"},nail_care:{keywords:["beauty","manicure","finger","fashion","nail"],char:"💅",fitzpatrick_scale:!0,category:"people"},lips:{keywords:["mouth","kiss"],char:"👄",fitzpatrick_scale:!1,category:"people"},tooth:{keywords:["teeth","dentist"],char:"🦷",fitzpatrick_scale:!1,category:"people"},tongue:{keywords:["mouth","playful"],char:"👅",fitzpatrick_scale:!1,category:"people"},ear:{keywords:["face","hear","sound","listen"],char:"👂",fitzpatrick_scale:!0,category:"people"},nose:{keywords:["smell","sniff"],char:"👃",fitzpatrick_scale:!0,category:"people"},eye:{keywords:["face","look","see","watch","stare"],char:"👁",fitzpatrick_scale:!1,category:"people"},eyes:{keywords:["look","watch","stalk","peek","see"],char:"👀",fitzpatrick_scale:!1,category:"people"},brain:{keywords:["smart","intelligent"],char:"🧠",fitzpatrick_scale:!1,category:"people"},bust_in_silhouette:{keywords:["user","person","human"],char:"👤",fitzpatrick_scale:!1,category:"people"},busts_in_silhouette:{keywords:["user","person","human","group","team"],char:"👥",fitzpatrick_scale:!1,category:"people"},speaking_head:{keywords:["user","person","human","sing","say","talk"],char:"🗣",fitzpatrick_scale:!1,category:"people"},baby:{keywords:["child","boy","girl","toddler"],char:"👶",fitzpatrick_scale:!0,category:"people"},child:{keywords:["gender-neutral","young"],char:"🧒",fitzpatrick_scale:!0,category:"people"},boy:{keywords:["man","male","guy","teenager"],char:"👦",fitzpatrick_scale:!0,category:"people"},girl:{keywords:["female","woman","teenager"],char:"👧",fitzpatrick_scale:!0,category:"people"},adult:{keywords:["gender-neutral","person"],char:"🧑",fitzpatrick_scale:!0,category:"people"},man:{keywords:["mustache","father","dad","guy","classy","sir","moustache"],char:"👨",fitzpatrick_scale:!0,category:"people"},woman:{keywords:["female","girls","lady"],char:"👩",fitzpatrick_scale:!0,category:"people"},blonde_woman:{keywords:["woman","female","girl","blonde","person"],char:"👱‍♀️",fitzpatrick_scale:!0,category:"people"},blonde_man:{keywords:["man","male","boy","blonde","guy","person"],char:"👱",fitzpatrick_scale:!0,category:"people"},bearded_person:{keywords:["person","bewhiskered"],char:"🧔",fitzpatrick_scale:!0,category:"people"},older_adult:{keywords:["human","elder","senior","gender-neutral"],char:"🧓",fitzpatrick_scale:!0,category:"people"},older_man:{keywords:["human","male","men","old","elder","senior"],char:"👴",fitzpatrick_scale:!0,category:"people"},older_woman:{keywords:["human","female","women","lady","old","elder","senior"],char:"👵",fitzpatrick_scale:!0,category:"people"},man_with_gua_pi_mao:{keywords:["male","boy","chinese"],char:"👲",fitzpatrick_scale:!0,category:"people"},woman_with_headscarf:{keywords:["female","hijab","mantilla","tichel"],char:"🧕",fitzpatrick_scale:!0,category:"people"},woman_with_turban:{keywords:["female","indian","hinduism","arabs","woman"],char:"👳‍♀️",fitzpatrick_scale:!0,category:"people"},man_with_turban:{keywords:["male","indian","hinduism","arabs"],char:"👳",fitzpatrick_scale:!0,category:"people"},policewoman:{keywords:["woman","police","law","legal","enforcement","arrest","911","female"],char:"👮‍♀️",fitzpatrick_scale:!0,category:"people"},policeman:{keywords:["man","police","law","legal","enforcement","arrest","911"],char:"👮",fitzpatrick_scale:!0,category:"people"},construction_worker_woman:{keywords:["female","human","wip","build","construction","worker","labor","woman"],char:"👷‍♀️",fitzpatrick_scale:!0,category:"people"},construction_worker_man:{keywords:["male","human","wip","guy","build","construction","worker","labor"],char:"👷",fitzpatrick_scale:!0,category:"people"},guardswoman:{keywords:["uk","gb","british","female","royal","woman"],char:"💂‍♀️",fitzpatrick_scale:!0,category:"people"},guardsman:{keywords:["uk","gb","british","male","guy","royal"],char:"💂",fitzpatrick_scale:!0,category:"people"},female_detective:{keywords:["human","spy","detective","female","woman"],char:"🕵️‍♀️",fitzpatrick_scale:!0,category:"people"},male_detective:{keywords:["human","spy","detective"],char:"🕵",fitzpatrick_scale:!0,category:"people"},woman_health_worker:{keywords:["doctor","nurse","therapist","healthcare","woman","human"],char:"👩‍⚕️",fitzpatrick_scale:!0,category:"people"},man_health_worker:{keywords:["doctor","nurse","therapist","healthcare","man","human"],char:"👨‍⚕️",fitzpatrick_scale:!0,category:"people"},woman_farmer:{keywords:["rancher","gardener","woman","human"],char:"👩‍🌾",fitzpatrick_scale:!0,category:"people"},man_farmer:{keywords:["rancher","gardener","man","human"],char:"👨‍🌾",fitzpatrick_scale:!0,category:"people"},woman_cook:{keywords:["chef","woman","human"],char:"👩‍🍳",fitzpatrick_scale:!0,category:"people"},man_cook:{keywords:["chef","man","human"],char:"👨‍🍳",fitzpatrick_scale:!0,category:"people"},woman_student:{keywords:["graduate","woman","human"],char:"👩‍🎓",fitzpatrick_scale:!0,category:"people"},man_student:{keywords:["graduate","man","human"],char:"👨‍🎓",fitzpatrick_scale:!0,category:"people"},woman_singer:{keywords:["rockstar","entertainer","woman","human"],char:"👩‍🎤",fitzpatrick_scale:!0,category:"people"},man_singer:{keywords:["rockstar","entertainer","man","human"],char:"👨‍🎤",fitzpatrick_scale:!0,category:"people"},woman_teacher:{keywords:["instructor","professor","woman","human"],char:"👩‍🏫",fitzpatrick_scale:!0,category:"people"},man_teacher:{keywords:["instructor","professor","man","human"],char:"👨‍🏫",fitzpatrick_scale:!0,category:"people"},woman_factory_worker:{keywords:["assembly","industrial","woman","human"],char:"👩‍🏭",fitzpatrick_scale:!0,category:"people"},man_factory_worker:{keywords:["assembly","industrial","man","human"],char:"👨‍🏭",fitzpatrick_scale:!0,category:"people"},woman_technologist:{keywords:["coder","developer","engineer","programmer","software","woman","human","laptop","computer"],char:"👩‍💻",fitzpatrick_scale:!0,category:"people"},man_technologist:{keywords:["coder","developer","engineer","programmer","software","man","human","laptop","computer"],char:"👨‍💻",fitzpatrick_scale:!0,category:"people"},woman_office_worker:{keywords:["business","manager","woman","human"],char:"👩‍💼",fitzpatrick_scale:!0,category:"people"},man_office_worker:{keywords:["business","manager","man","human"],char:"👨‍💼",fitzpatrick_scale:!0,category:"people"},woman_mechanic:{keywords:["plumber","woman","human","wrench"],char:"👩‍🔧",fitzpatrick_scale:!0,category:"people"},man_mechanic:{keywords:["plumber","man","human","wrench"],char:"👨‍🔧",fitzpatrick_scale:!0,category:"people"},woman_scientist:{keywords:["biologist","chemist","engineer","physicist","woman","human"],char:"👩‍🔬",fitzpatrick_scale:!0,category:"people"},man_scientist:{keywords:["biologist","chemist","engineer","physicist","man","human"],char:"👨‍🔬",fitzpatrick_scale:!0,category:"people"},woman_artist:{keywords:["painter","woman","human"],char:"👩‍🎨",fitzpatrick_scale:!0,category:"people"},man_artist:{keywords:["painter","man","human"],char:"👨‍🎨",fitzpatrick_scale:!0,category:"people"},woman_firefighter:{keywords:["fireman","woman","human"],char:"👩‍🚒",fitzpatrick_scale:!0,category:"people"},man_firefighter:{keywords:["fireman","man","human"],char:"👨‍🚒",fitzpatrick_scale:!0,category:"people"},woman_pilot:{keywords:["aviator","plane","woman","human"],char:"👩‍✈️",fitzpatrick_scale:!0,category:"people"},man_pilot:{keywords:["aviator","plane","man","human"],char:"👨‍✈️",fitzpatrick_scale:!0,category:"people"},woman_astronaut:{keywords:["space","rocket","woman","human"],char:"👩‍🚀",fitzpatrick_scale:!0,category:"people"},man_astronaut:{keywords:["space","rocket","man","human"],char:"👨‍🚀",fitzpatrick_scale:!0,category:"people"},woman_judge:{keywords:["justice","court","woman","human"],char:"👩‍⚖️",fitzpatrick_scale:!0,category:"people"},man_judge:{keywords:["justice","court","man","human"],char:"👨‍⚖️",fitzpatrick_scale:!0,category:"people"},woman_superhero:{keywords:["woman","female","good","heroine","superpowers"],char:"🦸‍♀️",fitzpatrick_scale:!0,category:"people"},man_superhero:{keywords:["man","male","good","hero","superpowers"],char:"🦸‍♂️",fitzpatrick_scale:!0,category:"people"},woman_supervillain:{keywords:["woman","female","evil","bad","criminal","heroine","superpowers"],char:"🦹‍♀️",fitzpatrick_scale:!0,category:"people"},man_supervillain:{keywords:["man","male","evil","bad","criminal","hero","superpowers"],char:"🦹‍♂️",fitzpatrick_scale:!0,category:"people"},mrs_claus:{keywords:["woman","female","xmas","mother christmas"],char:"🤶",fitzpatrick_scale:!0,category:"people"},santa:{keywords:["festival","man","male","xmas","father christmas"],char:"🎅",fitzpatrick_scale:!0,category:"people"},sorceress:{keywords:["woman","female","mage","witch"],char:"🧙‍♀️",fitzpatrick_scale:!0,category:"people"},wizard:{keywords:["man","male","mage","sorcerer"],char:"🧙‍♂️",fitzpatrick_scale:!0,category:"people"},woman_elf:{keywords:["woman","female"],char:"🧝‍♀️",fitzpatrick_scale:!0,category:"people"},man_elf:{keywords:["man","male"],char:"🧝‍♂️",fitzpatrick_scale:!0,category:"people"},woman_vampire:{keywords:["woman","female"],char:"🧛‍♀️",fitzpatrick_scale:!0,category:"people"},man_vampire:{keywords:["man","male","dracula"],char:"🧛‍♂️",fitzpatrick_scale:!0,category:"people"},woman_zombie:{keywords:["woman","female","undead","walking dead"],char:"🧟‍♀️",fitzpatrick_scale:!1,category:"people"},man_zombie:{keywords:["man","male","dracula","undead","walking dead"],char:"🧟‍♂️",fitzpatrick_scale:!1,category:"people"},woman_genie:{keywords:["woman","female"],char:"🧞‍♀️",fitzpatrick_scale:!1,category:"people"},man_genie:{keywords:["man","male"],char:"🧞‍♂️",fitzpatrick_scale:!1,category:"people"},mermaid:{keywords:["woman","female","merwoman","ariel"],char:"🧜‍♀️",fitzpatrick_scale:!0,category:"people"},merman:{keywords:["man","male","triton"],char:"🧜‍♂️",fitzpatrick_scale:!0,category:"people"},woman_fairy:{keywords:["woman","female"],char:"🧚‍♀️",fitzpatrick_scale:!0,category:"people"},man_fairy:{keywords:["man","male"],char:"🧚‍♂️",fitzpatrick_scale:!0,category:"people"},angel:{keywords:["heaven","wings","halo"],char:"👼",fitzpatrick_scale:!0,category:"people"},pregnant_woman:{keywords:["baby"],char:"🤰",fitzpatrick_scale:!0,category:"people"},breastfeeding:{keywords:["nursing","baby"],char:"🤱",fitzpatrick_scale:!0,category:"people"},princess:{keywords:["girl","woman","female","blond","crown","royal","queen"],char:"👸",fitzpatrick_scale:!0,category:"people"},prince:{keywords:["boy","man","male","crown","royal","king"],char:"🤴",fitzpatrick_scale:!0,category:"people"},bride_with_veil:{keywords:["couple","marriage","wedding","woman","bride"],char:"👰",fitzpatrick_scale:!0,category:"people"},man_in_tuxedo:{keywords:["couple","marriage","wedding","groom"],char:"🤵",fitzpatrick_scale:!0,category:"people"},running_woman:{keywords:["woman","walking","exercise","race","running","female"],char:"🏃‍♀️",fitzpatrick_scale:!0,category:"people"},running_man:{keywords:["man","walking","exercise","race","running"],char:"🏃",fitzpatrick_scale:!0,category:"people"},walking_woman:{keywords:["human","feet","steps","woman","female"],char:"🚶‍♀️",fitzpatrick_scale:!0,category:"people"},walking_man:{keywords:["human","feet","steps"],char:"🚶",fitzpatrick_scale:!0,category:"people"},dancer:{keywords:["female","girl","woman","fun"],char:"💃",fitzpatrick_scale:!0,category:"people"},man_dancing:{keywords:["male","boy","fun","dancer"],char:"🕺",fitzpatrick_scale:!0,category:"people"},dancing_women:{keywords:["female","bunny","women","girls"],char:"👯",fitzpatrick_scale:!1,category:"people"},dancing_men:{keywords:["male","bunny","men","boys"],char:"👯‍♂️",fitzpatrick_scale:!1,category:"people"},couple:{keywords:["pair","people","human","love","date","dating","like","affection","valentines","marriage"],char:"👫",fitzpatrick_scale:!1,category:"people"},two_men_holding_hands:{keywords:["pair","couple","love","like","bromance","friendship","people","human"],char:"👬",fitzpatrick_scale:!1,category:"people"},two_women_holding_hands:{keywords:["pair","friendship","couple","love","like","female","people","human"],char:"👭",fitzpatrick_scale:!1,category:"people"},bowing_woman:{keywords:["woman","female","girl"],char:"🙇‍♀️",fitzpatrick_scale:!0,category:"people"},bowing_man:{keywords:["man","male","boy"],char:"🙇",fitzpatrick_scale:!0,category:"people"},man_facepalming:{keywords:["man","male","boy","disbelief"],char:"🤦‍♂️",fitzpatrick_scale:!0,category:"people"},woman_facepalming:{keywords:["woman","female","girl","disbelief"],char:"🤦‍♀️",fitzpatrick_scale:!0,category:"people"},woman_shrugging:{keywords:["woman","female","girl","confused","indifferent","doubt"],char:"🤷",fitzpatrick_scale:!0,category:"people"},man_shrugging:{keywords:["man","male","boy","confused","indifferent","doubt"],char:"🤷‍♂️",fitzpatrick_scale:!0,category:"people"},tipping_hand_woman:{keywords:["female","girl","woman","human","information"],char:"💁",fitzpatrick_scale:!0,category:"people"},tipping_hand_man:{keywords:["male","boy","man","human","information"],char:"💁‍♂️",fitzpatrick_scale:!0,category:"people"},no_good_woman:{keywords:["female","girl","woman","nope"],char:"🙅",fitzpatrick_scale:!0,category:"people"},no_good_man:{keywords:["male","boy","man","nope"],char:"🙅‍♂️",fitzpatrick_scale:!0,category:"people"},ok_woman:{keywords:["women","girl","female","pink","human","woman"],char:"🙆",fitzpatrick_scale:!0,category:"people"},ok_man:{keywords:["men","boy","male","blue","human","man"],char:"🙆‍♂️",fitzpatrick_scale:!0,category:"people"},raising_hand_woman:{keywords:["female","girl","woman"],char:"🙋",fitzpatrick_scale:!0,category:"people"},raising_hand_man:{keywords:["male","boy","man"],char:"🙋‍♂️",fitzpatrick_scale:!0,category:"people"},pouting_woman:{keywords:["female","girl","woman"],char:"🙎",fitzpatrick_scale:!0,category:"people"},pouting_man:{keywords:["male","boy","man"],char:"🙎‍♂️",fitzpatrick_scale:!0,category:"people"},frowning_woman:{keywords:["female","girl","woman","sad","depressed","discouraged","unhappy"],char:"🙍",fitzpatrick_scale:!0,category:"people"},frowning_man:{keywords:["male","boy","man","sad","depressed","discouraged","unhappy"],char:"🙍‍♂️",fitzpatrick_scale:!0,category:"people"},haircut_woman:{keywords:["female","girl","woman"],char:"💇",fitzpatrick_scale:!0,category:"people"},haircut_man:{keywords:["male","boy","man"],char:"💇‍♂️",fitzpatrick_scale:!0,category:"people"},massage_woman:{keywords:["female","girl","woman","head"],char:"💆",fitzpatrick_scale:!0,category:"people"},massage_man:{keywords:["male","boy","man","head"],char:"💆‍♂️",fitzpatrick_scale:!0,category:"people"},woman_in_steamy_room:{keywords:["female","woman","spa","steamroom","sauna"],char:"🧖‍♀️",fitzpatrick_scale:!0,category:"people"},man_in_steamy_room:{keywords:["male","man","spa","steamroom","sauna"],char:"🧖‍♂️",fitzpatrick_scale:!0,category:"people"},couple_with_heart_woman_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"💑",fitzpatrick_scale:!1,category:"people"},couple_with_heart_woman_woman:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"👩‍❤️‍👩",fitzpatrick_scale:!1,category:"people"},couple_with_heart_man_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"👨‍❤️‍👨",fitzpatrick_scale:!1,category:"people"},couplekiss_man_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:"💏",fitzpatrick_scale:!1,category:"people"},couplekiss_woman_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:"👩‍❤️‍💋‍👩",fitzpatrick_scale:!1,category:"people"},couplekiss_man_man:{keywords:["pair","valentines","love","like","dating","marriage"],char:"👨‍❤️‍💋‍👨",fitzpatrick_scale:!1,category:"people"},family_man_woman_boy:{keywords:["home","parents","child","mom","dad","father","mother","people","human"],char:"👪",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl:{keywords:["home","parents","people","human","child"],char:"👨‍👩‍👧",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👩‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_man_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👩‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:"👨‍👩‍👧‍👧",fitzpatrick_scale:!1,category:"people"},family_woman_woman_boy:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👧",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👧‍👧",fitzpatrick_scale:!1,category:"people"},family_man_man_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👦",fitzpatrick_scale:!1,category:"people"},family_man_man_girl:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👧",fitzpatrick_scale:!1,category:"people"},family_man_man_girl_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_man_man_boy_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_man_man_girl_girl:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👧‍👧",fitzpatrick_scale:!1,category:"people"},family_woman_boy:{keywords:["home","parent","people","human","child"],char:"👩‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_girl:{keywords:["home","parent","people","human","child"],char:"👩‍👧",fitzpatrick_scale:!1,category:"people"},family_woman_girl_boy:{keywords:["home","parent","people","human","children"],char:"👩‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_boy_boy:{keywords:["home","parent","people","human","children"],char:"👩‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_girl_girl:{keywords:["home","parent","people","human","children"],char:"👩‍👧‍👧",fitzpatrick_scale:!1,category:"people"},family_man_boy:{keywords:["home","parent","people","human","child"],char:"👨‍👦",fitzpatrick_scale:!1,category:"people"},family_man_girl:{keywords:["home","parent","people","human","child"],char:"👨‍👧",fitzpatrick_scale:!1,category:"people"},family_man_girl_boy:{keywords:["home","parent","people","human","children"],char:"👨‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_man_boy_boy:{keywords:["home","parent","people","human","children"],char:"👨‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_man_girl_girl:{keywords:["home","parent","people","human","children"],char:"👨‍👧‍👧",fitzpatrick_scale:!1,category:"people"},yarn:{keywords:["ball","crochet","knit"],char:"🧶",fitzpatrick_scale:!1,category:"people"},thread:{keywords:["needle","sewing","spool","string"],char:"🧵",fitzpatrick_scale:!1,category:"people"},coat:{keywords:["jacket"],char:"🧥",fitzpatrick_scale:!1,category:"people"},labcoat:{keywords:["doctor","experiment","scientist","chemist"],char:"🥼",fitzpatrick_scale:!1,category:"people"},womans_clothes:{keywords:["fashion","shopping_bags","female"],char:"👚",fitzpatrick_scale:!1,category:"people"},tshirt:{keywords:["fashion","cloth","casual","shirt","tee"],char:"👕",fitzpatrick_scale:!1,category:"people"},jeans:{keywords:["fashion","shopping"],char:"👖",fitzpatrick_scale:!1,category:"people"},necktie:{keywords:["shirt","suitup","formal","fashion","cloth","business"],char:"👔",fitzpatrick_scale:!1,category:"people"},dress:{keywords:["clothes","fashion","shopping"],char:"👗",fitzpatrick_scale:!1,category:"people"},bikini:{keywords:["swimming","female","woman","girl","fashion","beach","summer"],char:"👙",fitzpatrick_scale:!1,category:"people"},kimono:{keywords:["dress","fashion","women","female","japanese"],char:"👘",fitzpatrick_scale:!1,category:"people"},lipstick:{keywords:["female","girl","fashion","woman"],char:"💄",fitzpatrick_scale:!1,category:"people"},kiss:{keywords:["face","lips","love","like","affection","valentines"],char:"💋",fitzpatrick_scale:!1,category:"people"},footprints:{keywords:["feet","tracking","walking","beach"],char:"👣",fitzpatrick_scale:!1,category:"people"},flat_shoe:{keywords:["ballet","slip-on","slipper"],char:"🥿",fitzpatrick_scale:!1,category:"people"},high_heel:{keywords:["fashion","shoes","female","pumps","stiletto"],char:"👠",fitzpatrick_scale:!1,category:"people"},sandal:{keywords:["shoes","fashion","flip flops"],char:"👡",fitzpatrick_scale:!1,category:"people"},boot:{keywords:["shoes","fashion"],char:"👢",fitzpatrick_scale:!1,category:"people"},mans_shoe:{keywords:["fashion","male"],char:"👞",fitzpatrick_scale:!1,category:"people"},athletic_shoe:{keywords:["shoes","sports","sneakers"],char:"👟",fitzpatrick_scale:!1,category:"people"},hiking_boot:{keywords:["backpacking","camping","hiking"],char:"🥾",fitzpatrick_scale:!1,category:"people"},socks:{keywords:["stockings","clothes"],char:"🧦",fitzpatrick_scale:!1,category:"people"},gloves:{keywords:["hands","winter","clothes"],char:"🧤",fitzpatrick_scale:!1,category:"people"},scarf:{keywords:["neck","winter","clothes"],char:"🧣",fitzpatrick_scale:!1,category:"people"},womans_hat:{keywords:["fashion","accessories","female","lady","spring"],char:"👒",fitzpatrick_scale:!1,category:"people"},tophat:{keywords:["magic","gentleman","classy","circus"],char:"🎩",fitzpatrick_scale:!1,category:"people"},billed_hat:{keywords:["cap","baseball"],char:"🧢",fitzpatrick_scale:!1,category:"people"},rescue_worker_helmet:{keywords:["construction","build"],char:"⛑",fitzpatrick_scale:!1,category:"people"},mortar_board:{keywords:["school","college","degree","university","graduation","cap","hat","legal","learn","education"],char:"🎓",fitzpatrick_scale:!1,category:"people"},crown:{keywords:["king","kod","leader","royalty","lord"],char:"👑",fitzpatrick_scale:!1,category:"people"},school_satchel:{keywords:["student","education","bag","backpack"],char:"🎒",fitzpatrick_scale:!1,category:"people"},luggage:{keywords:["packing","travel"],char:"🧳",fitzpatrick_scale:!1,category:"people"},pouch:{keywords:["bag","accessories","shopping"],char:"👝",fitzpatrick_scale:!1,category:"people"},purse:{keywords:["fashion","accessories","money","sales","shopping"],char:"👛",fitzpatrick_scale:!1,category:"people"},handbag:{keywords:["fashion","accessory","accessories","shopping"],char:"👜",fitzpatrick_scale:!1,category:"people"},briefcase:{keywords:["business","documents","work","law","legal","job","career"],char:"💼",fitzpatrick_scale:!1,category:"people"},eyeglasses:{keywords:["fashion","accessories","eyesight","nerdy","dork","geek"],char:"👓",fitzpatrick_scale:!1,category:"people"},dark_sunglasses:{keywords:["face","cool","accessories"],char:"🕶",fitzpatrick_scale:!1,category:"people"},goggles:{keywords:["eyes","protection","safety"],char:"🥽",fitzpatrick_scale:!1,category:"people"},ring:{keywords:["wedding","propose","marriage","valentines","diamond","fashion","jewelry","gem","engagement"],char:"💍",fitzpatrick_scale:!1,category:"people"},closed_umbrella:{keywords:["weather","rain","drizzle"],char:"🌂",fitzpatrick_scale:!1,category:"people"},dog:{keywords:["animal","friend","nature","woof","puppy","pet","faithful"],char:"🐶",fitzpatrick_scale:!1,category:"animals_and_nature"},cat:{keywords:["animal","meow","nature","pet","kitten"],char:"🐱",fitzpatrick_scale:!1,category:"animals_and_nature"},mouse:{keywords:["animal","nature","cheese_wedge","rodent"],char:"🐭",fitzpatrick_scale:!1,category:"animals_and_nature"},hamster:{keywords:["animal","nature"],char:"🐹",fitzpatrick_scale:!1,category:"animals_and_nature"},rabbit:{keywords:["animal","nature","pet","spring","magic","bunny"],char:"🐰",fitzpatrick_scale:!1,category:"animals_and_nature"},fox_face:{keywords:["animal","nature","face"],char:"🦊",fitzpatrick_scale:!1,category:"animals_and_nature"},bear:{keywords:["animal","nature","wild"],char:"🐻",fitzpatrick_scale:!1,category:"animals_and_nature"},panda_face:{keywords:["animal","nature","panda"],char:"🐼",fitzpatrick_scale:!1,category:"animals_and_nature"},koala:{keywords:["animal","nature"],char:"🐨",fitzpatrick_scale:!1,category:"animals_and_nature"},tiger:{keywords:["animal","cat","danger","wild","nature","roar"],char:"🐯",fitzpatrick_scale:!1,category:"animals_and_nature"},lion:{keywords:["animal","nature"],char:"🦁",fitzpatrick_scale:!1,category:"animals_and_nature"},cow:{keywords:["beef","ox","animal","nature","moo","milk"],char:"🐮",fitzpatrick_scale:!1,category:"animals_and_nature"},pig:{keywords:["animal","oink","nature"],char:"🐷",fitzpatrick_scale:!1,category:"animals_and_nature"},pig_nose:{keywords:["animal","oink"],char:"🐽",fitzpatrick_scale:!1,category:"animals_and_nature"},frog:{keywords:["animal","nature","croak","toad"],char:"🐸",fitzpatrick_scale:!1,category:"animals_and_nature"},squid:{keywords:["animal","nature","ocean","sea"],char:"🦑",fitzpatrick_scale:!1,category:"animals_and_nature"},octopus:{keywords:["animal","creature","ocean","sea","nature","beach"],char:"🐙",fitzpatrick_scale:!1,category:"animals_and_nature"},shrimp:{keywords:["animal","ocean","nature","seafood"],char:"🦐",fitzpatrick_scale:!1,category:"animals_and_nature"},monkey_face:{keywords:["animal","nature","circus"],char:"🐵",fitzpatrick_scale:!1,category:"animals_and_nature"},gorilla:{keywords:["animal","nature","circus"],char:"🦍",fitzpatrick_scale:!1,category:"animals_and_nature"},see_no_evil:{keywords:["monkey","animal","nature","haha"],char:"🙈",fitzpatrick_scale:!1,category:"animals_and_nature"},hear_no_evil:{keywords:["animal","monkey","nature"],char:"🙉",fitzpatrick_scale:!1,category:"animals_and_nature"},speak_no_evil:{keywords:["monkey","animal","nature","omg"],char:"🙊",fitzpatrick_scale:!1,category:"animals_and_nature"},monkey:{keywords:["animal","nature","banana","circus"],char:"🐒",fitzpatrick_scale:!1,category:"animals_and_nature"},chicken:{keywords:["animal","cluck","nature","bird"],char:"🐔",fitzpatrick_scale:!1,category:"animals_and_nature"},penguin:{keywords:["animal","nature"],char:"🐧",fitzpatrick_scale:!1,category:"animals_and_nature"},bird:{keywords:["animal","nature","fly","tweet","spring"],char:"🐦",fitzpatrick_scale:!1,category:"animals_and_nature"},baby_chick:{keywords:["animal","chicken","bird"],char:"🐤",fitzpatrick_scale:!1,category:"animals_and_nature"},hatching_chick:{keywords:["animal","chicken","egg","born","baby","bird"],char:"🐣",fitzpatrick_scale:!1,category:"animals_and_nature"},hatched_chick:{keywords:["animal","chicken","baby","bird"],char:"🐥",fitzpatrick_scale:!1,category:"animals_and_nature"},duck:{keywords:["animal","nature","bird","mallard"],char:"🦆",fitzpatrick_scale:!1,category:"animals_and_nature"},eagle:{keywords:["animal","nature","bird"],char:"🦅",fitzpatrick_scale:!1,category:"animals_and_nature"},owl:{keywords:["animal","nature","bird","hoot"],char:"🦉",fitzpatrick_scale:!1,category:"animals_and_nature"},bat:{keywords:["animal","nature","blind","vampire"],char:"🦇",fitzpatrick_scale:!1,category:"animals_and_nature"},wolf:{keywords:["animal","nature","wild"],char:"🐺",fitzpatrick_scale:!1,category:"animals_and_nature"},boar:{keywords:["animal","nature"],char:"🐗",fitzpatrick_scale:!1,category:"animals_and_nature"},horse:{keywords:["animal","brown","nature"],char:"🐴",fitzpatrick_scale:!1,category:"animals_and_nature"},unicorn:{keywords:["animal","nature","mystical"],char:"🦄",fitzpatrick_scale:!1,category:"animals_and_nature"},honeybee:{keywords:["animal","insect","nature","bug","spring","honey"],char:"🐝",fitzpatrick_scale:!1,category:"animals_and_nature"},bug:{keywords:["animal","insect","nature","worm"],char:"🐛",fitzpatrick_scale:!1,category:"animals_and_nature"},butterfly:{keywords:["animal","insect","nature","caterpillar"],char:"🦋",fitzpatrick_scale:!1,category:"animals_and_nature"},snail:{keywords:["slow","animal","shell"],char:"🐌",fitzpatrick_scale:!1,category:"animals_and_nature"},beetle:{keywords:["animal","insect","nature","ladybug"],char:"🐞",fitzpatrick_scale:!1,category:"animals_and_nature"},ant:{keywords:["animal","insect","nature","bug"],char:"🐜",fitzpatrick_scale:!1,category:"animals_and_nature"},grasshopper:{keywords:["animal","cricket","chirp"],char:"🦗",fitzpatrick_scale:!1,category:"animals_and_nature"},spider:{keywords:["animal","arachnid"],char:"🕷",fitzpatrick_scale:!1,category:"animals_and_nature"},scorpion:{keywords:["animal","arachnid"],char:"🦂",fitzpatrick_scale:!1,category:"animals_and_nature"},crab:{keywords:["animal","crustacean"],char:"🦀",fitzpatrick_scale:!1,category:"animals_and_nature"},snake:{keywords:["animal","evil","nature","hiss","python"],char:"🐍",fitzpatrick_scale:!1,category:"animals_and_nature"},lizard:{keywords:["animal","nature","reptile"],char:"🦎",fitzpatrick_scale:!1,category:"animals_and_nature"},"t-rex":{keywords:["animal","nature","dinosaur","tyrannosaurus","extinct"],char:"🦖",fitzpatrick_scale:!1,category:"animals_and_nature"},sauropod:{keywords:["animal","nature","dinosaur","brachiosaurus","brontosaurus","diplodocus","extinct"],char:"🦕",fitzpatrick_scale:!1,category:"animals_and_nature"},turtle:{keywords:["animal","slow","nature","tortoise"],char:"🐢",fitzpatrick_scale:!1,category:"animals_and_nature"},tropical_fish:{keywords:["animal","swim","ocean","beach","nemo"],char:"🐠",fitzpatrick_scale:!1,category:"animals_and_nature"},fish:{keywords:["animal","food","nature"],char:"🐟",fitzpatrick_scale:!1,category:"animals_and_nature"},blowfish:{keywords:["animal","nature","food","sea","ocean"],char:"🐡",fitzpatrick_scale:!1,category:"animals_and_nature"},dolphin:{keywords:["animal","nature","fish","sea","ocean","flipper","fins","beach"],char:"🐬",fitzpatrick_scale:!1,category:"animals_and_nature"},shark:{keywords:["animal","nature","fish","sea","ocean","jaws","fins","beach"],char:"🦈",fitzpatrick_scale:!1,category:"animals_and_nature"},whale:{keywords:["animal","nature","sea","ocean"],char:"🐳",fitzpatrick_scale:!1,category:"animals_and_nature"},whale2:{keywords:["animal","nature","sea","ocean"],char:"🐋",fitzpatrick_scale:!1,category:"animals_and_nature"},crocodile:{keywords:["animal","nature","reptile","lizard","alligator"],char:"🐊",fitzpatrick_scale:!1,category:"animals_and_nature"},leopard:{keywords:["animal","nature"],char:"🐆",fitzpatrick_scale:!1,category:"animals_and_nature"},zebra:{keywords:["animal","nature","stripes","safari"],char:"🦓",fitzpatrick_scale:!1,category:"animals_and_nature"},tiger2:{keywords:["animal","nature","roar"],char:"🐅",fitzpatrick_scale:!1,category:"animals_and_nature"},water_buffalo:{keywords:["animal","nature","ox","cow"],char:"🐃",fitzpatrick_scale:!1,category:"animals_and_nature"},ox:{keywords:["animal","cow","beef"],char:"🐂",fitzpatrick_scale:!1,category:"animals_and_nature"},cow2:{keywords:["beef","ox","animal","nature","moo","milk"],char:"🐄",fitzpatrick_scale:!1,category:"animals_and_nature"},deer:{keywords:["animal","nature","horns","venison"],char:"🦌",fitzpatrick_scale:!1,category:"animals_and_nature"},dromedary_camel:{keywords:["animal","hot","desert","hump"],char:"🐪",fitzpatrick_scale:!1,category:"animals_and_nature"},camel:{keywords:["animal","nature","hot","desert","hump"],char:"🐫",fitzpatrick_scale:!1,category:"animals_and_nature"},giraffe:{keywords:["animal","nature","spots","safari"],char:"🦒",fitzpatrick_scale:!1,category:"animals_and_nature"},elephant:{keywords:["animal","nature","nose","th","circus"],char:"🐘",fitzpatrick_scale:!1,category:"animals_and_nature"},rhinoceros:{keywords:["animal","nature","horn"],char:"🦏",fitzpatrick_scale:!1,category:"animals_and_nature"},goat:{keywords:["animal","nature"],char:"🐐",fitzpatrick_scale:!1,category:"animals_and_nature"},ram:{keywords:["animal","sheep","nature"],char:"🐏",fitzpatrick_scale:!1,category:"animals_and_nature"},sheep:{keywords:["animal","nature","wool","shipit"],char:"🐑",fitzpatrick_scale:!1,category:"animals_and_nature"},racehorse:{keywords:["animal","gamble","luck"],char:"🐎",fitzpatrick_scale:!1,category:"animals_and_nature"},pig2:{keywords:["animal","nature"],char:"🐖",fitzpatrick_scale:!1,category:"animals_and_nature"},rat:{keywords:["animal","mouse","rodent"],char:"🐀",fitzpatrick_scale:!1,category:"animals_and_nature"},mouse2:{keywords:["animal","nature","rodent"],char:"🐁",fitzpatrick_scale:!1,category:"animals_and_nature"},rooster:{keywords:["animal","nature","chicken"],char:"🐓",fitzpatrick_scale:!1,category:"animals_and_nature"},turkey:{keywords:["animal","bird"],char:"🦃",fitzpatrick_scale:!1,category:"animals_and_nature"},dove:{keywords:["animal","bird"],char:"🕊",fitzpatrick_scale:!1,category:"animals_and_nature"},dog2:{keywords:["animal","nature","friend","doge","pet","faithful"],char:"🐕",fitzpatrick_scale:!1,category:"animals_and_nature"},poodle:{keywords:["dog","animal","101","nature","pet"],char:"🐩",fitzpatrick_scale:!1,category:"animals_and_nature"},cat2:{keywords:["animal","meow","pet","cats"],char:"🐈",fitzpatrick_scale:!1,category:"animals_and_nature"},rabbit2:{keywords:["animal","nature","pet","magic","spring"],char:"🐇",fitzpatrick_scale:!1,category:"animals_and_nature"},chipmunk:{keywords:["animal","nature","rodent","squirrel"],char:"🐿",fitzpatrick_scale:!1,category:"animals_and_nature"},hedgehog:{keywords:["animal","nature","spiny"],char:"🦔",fitzpatrick_scale:!1,category:"animals_and_nature"},raccoon:{keywords:["animal","nature"],char:"🦝",fitzpatrick_scale:!1,category:"animals_and_nature"},llama:{keywords:["animal","nature","alpaca"],char:"🦙",fitzpatrick_scale:!1,category:"animals_and_nature"},hippopotamus:{keywords:["animal","nature"],char:"🦛",fitzpatrick_scale:!1,category:"animals_and_nature"},kangaroo:{keywords:["animal","nature","australia","joey","hop","marsupial"],char:"🦘",fitzpatrick_scale:!1,category:"animals_and_nature"},badger:{keywords:["animal","nature","honey"],char:"🦡",fitzpatrick_scale:!1,category:"animals_and_nature"},swan:{keywords:["animal","nature","bird"],char:"🦢",fitzpatrick_scale:!1,category:"animals_and_nature"},peacock:{keywords:["animal","nature","peahen","bird"],char:"🦚",fitzpatrick_scale:!1,category:"animals_and_nature"},parrot:{keywords:["animal","nature","bird","pirate","talk"],char:"🦜",fitzpatrick_scale:!1,category:"animals_and_nature"},lobster:{keywords:["animal","nature","bisque","claws","seafood"],char:"🦞",fitzpatrick_scale:!1,category:"animals_and_nature"},mosquito:{keywords:["animal","nature","insect","malaria"],char:"🦟",fitzpatrick_scale:!1,category:"animals_and_nature"},paw_prints:{keywords:["animal","tracking","footprints","dog","cat","pet","feet"],char:"🐾",fitzpatrick_scale:!1,category:"animals_and_nature"},dragon:{keywords:["animal","myth","nature","chinese","green"],char:"🐉",fitzpatrick_scale:!1,category:"animals_and_nature"},dragon_face:{keywords:["animal","myth","nature","chinese","green"],char:"🐲",fitzpatrick_scale:!1,category:"animals_and_nature"},cactus:{keywords:["vegetable","plant","nature"],char:"🌵",fitzpatrick_scale:!1,category:"animals_and_nature"},christmas_tree:{keywords:["festival","vacation","december","xmas","celebration"],char:"🎄",fitzpatrick_scale:!1,category:"animals_and_nature"},evergreen_tree:{keywords:["plant","nature"],char:"🌲",fitzpatrick_scale:!1,category:"animals_and_nature"},deciduous_tree:{keywords:["plant","nature"],char:"🌳",fitzpatrick_scale:!1,category:"animals_and_nature"},palm_tree:{keywords:["plant","vegetable","nature","summer","beach","mojito","tropical"],char:"🌴",fitzpatrick_scale:!1,category:"animals_and_nature"},seedling:{keywords:["plant","nature","grass","lawn","spring"],char:"🌱",fitzpatrick_scale:!1,category:"animals_and_nature"},herb:{keywords:["vegetable","plant","medicine","weed","grass","lawn"],char:"🌿",fitzpatrick_scale:!1,category:"animals_and_nature"},shamrock:{keywords:["vegetable","plant","nature","irish","clover"],char:"☘",fitzpatrick_scale:!1,category:"animals_and_nature"},four_leaf_clover:{keywords:["vegetable","plant","nature","lucky","irish"],char:"🍀",fitzpatrick_scale:!1,category:"animals_and_nature"},bamboo:{keywords:["plant","nature","vegetable","panda","pine_decoration"],char:"🎍",fitzpatrick_scale:!1,category:"animals_and_nature"},tanabata_tree:{keywords:["plant","nature","branch","summer"],char:"🎋",fitzpatrick_scale:!1,category:"animals_and_nature"},leaves:{keywords:["nature","plant","tree","vegetable","grass","lawn","spring"],char:"🍃",fitzpatrick_scale:!1,category:"animals_and_nature"},fallen_leaf:{keywords:["nature","plant","vegetable","leaves"],char:"🍂",fitzpatrick_scale:!1,category:"animals_and_nature"},maple_leaf:{keywords:["nature","plant","vegetable","ca","fall"],char:"🍁",fitzpatrick_scale:!1,category:"animals_and_nature"},ear_of_rice:{keywords:["nature","plant"],char:"🌾",fitzpatrick_scale:!1,category:"animals_and_nature"},hibiscus:{keywords:["plant","vegetable","flowers","beach"],char:"🌺",fitzpatrick_scale:!1,category:"animals_and_nature"},sunflower:{keywords:["nature","plant","fall"],char:"🌻",fitzpatrick_scale:!1,category:"animals_and_nature"},rose:{keywords:["flowers","valentines","love","spring"],char:"🌹",fitzpatrick_scale:!1,category:"animals_and_nature"},wilted_flower:{keywords:["plant","nature","flower"],char:"🥀",fitzpatrick_scale:!1,category:"animals_and_nature"},tulip:{keywords:["flowers","plant","nature","summer","spring"],char:"🌷",fitzpatrick_scale:!1,category:"animals_and_nature"},blossom:{keywords:["nature","flowers","yellow"],char:"🌼",fitzpatrick_scale:!1,category:"animals_and_nature"},cherry_blossom:{keywords:["nature","plant","spring","flower"],char:"🌸",fitzpatrick_scale:!1,category:"animals_and_nature"},bouquet:{keywords:["flowers","nature","spring"],char:"💐",fitzpatrick_scale:!1,category:"animals_and_nature"},mushroom:{keywords:["plant","vegetable"],char:"🍄",fitzpatrick_scale:!1,category:"animals_and_nature"},chestnut:{keywords:["food","squirrel"],char:"🌰",fitzpatrick_scale:!1,category:"animals_and_nature"},jack_o_lantern:{keywords:["halloween","light","pumpkin","creepy","fall"],char:"🎃",fitzpatrick_scale:!1,category:"animals_and_nature"},shell:{keywords:["nature","sea","beach"],char:"🐚",fitzpatrick_scale:!1,category:"animals_and_nature"},spider_web:{keywords:["animal","insect","arachnid","silk"],char:"🕸",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_americas:{keywords:["globe","world","USA","international"],char:"🌎",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_africa:{keywords:["globe","world","international"],char:"🌍",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_asia:{keywords:["globe","world","east","international"],char:"🌏",fitzpatrick_scale:!1,category:"animals_and_nature"},full_moon:{keywords:["nature","yellow","twilight","planet","space","night","evening","sleep"],char:"🌕",fitzpatrick_scale:!1,category:"animals_and_nature"},waning_gibbous_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep","waxing_gibbous_moon"],char:"🌖",fitzpatrick_scale:!1,category:"animals_and_nature"},last_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌗",fitzpatrick_scale:!1,category:"animals_and_nature"},waning_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌘",fitzpatrick_scale:!1,category:"animals_and_nature"},new_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌑",fitzpatrick_scale:!1,category:"animals_and_nature"},waxing_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌒",fitzpatrick_scale:!1,category:"animals_and_nature"},first_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌓",fitzpatrick_scale:!1,category:"animals_and_nature"},waxing_gibbous_moon:{keywords:["nature","night","sky","gray","twilight","planet","space","evening","sleep"],char:"🌔",fitzpatrick_scale:!1,category:"animals_and_nature"},new_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌚",fitzpatrick_scale:!1,category:"animals_and_nature"},full_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌝",fitzpatrick_scale:!1,category:"animals_and_nature"},first_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌛",fitzpatrick_scale:!1,category:"animals_and_nature"},last_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌜",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_with_face:{keywords:["nature","morning","sky"],char:"🌞",fitzpatrick_scale:!1,category:"animals_and_nature"},crescent_moon:{keywords:["night","sleep","sky","evening","magic"],char:"🌙",fitzpatrick_scale:!1,category:"animals_and_nature"},star:{keywords:["night","yellow"],char:"⭐",fitzpatrick_scale:!1,category:"animals_and_nature"},star2:{keywords:["night","sparkle","awesome","good","magic"],char:"🌟",fitzpatrick_scale:!1,category:"animals_and_nature"},dizzy:{keywords:["star","sparkle","shoot","magic"],char:"💫",fitzpatrick_scale:!1,category:"animals_and_nature"},sparkles:{keywords:["stars","shine","shiny","cool","awesome","good","magic"],char:"✨",fitzpatrick_scale:!1,category:"animals_and_nature"},comet:{keywords:["space"],char:"☄",fitzpatrick_scale:!1,category:"animals_and_nature"},sunny:{keywords:["weather","nature","brightness","summer","beach","spring"],char:"☀️",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_small_cloud:{keywords:["weather"],char:"🌤",fitzpatrick_scale:!1,category:"animals_and_nature"},partly_sunny:{keywords:["weather","nature","cloudy","morning","fall","spring"],char:"⛅",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_large_cloud:{keywords:["weather"],char:"🌥",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_rain_cloud:{keywords:["weather"],char:"🌦",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud:{keywords:["weather","sky"],char:"☁️",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_rain:{keywords:["weather"],char:"🌧",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_lightning_and_rain:{keywords:["weather","lightning"],char:"⛈",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_lightning:{keywords:["weather","thunder"],char:"🌩",fitzpatrick_scale:!1,category:"animals_and_nature"},zap:{keywords:["thunder","weather","lightning bolt","fast"],char:"⚡",fitzpatrick_scale:!1,category:"animals_and_nature"},fire:{keywords:["hot","cook","flame"],char:"🔥",fitzpatrick_scale:!1,category:"animals_and_nature"},boom:{keywords:["bomb","explode","explosion","collision","blown"],char:"💥",fitzpatrick_scale:!1,category:"animals_and_nature"},snowflake:{keywords:["winter","season","cold","weather","christmas","xmas"],char:"❄️",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_snow:{keywords:["weather"],char:"🌨",fitzpatrick_scale:!1,category:"animals_and_nature"},snowman:{keywords:["winter","season","cold","weather","christmas","xmas","frozen","without_snow"],char:"⛄",fitzpatrick_scale:!1,category:"animals_and_nature"},snowman_with_snow:{keywords:["winter","season","cold","weather","christmas","xmas","frozen"],char:"☃",fitzpatrick_scale:!1,category:"animals_and_nature"},wind_face:{keywords:["gust","air"],char:"🌬",fitzpatrick_scale:!1,category:"animals_and_nature"},dash:{keywords:["wind","air","fast","shoo","fart","smoke","puff"],char:"💨",fitzpatrick_scale:!1,category:"animals_and_nature"},tornado:{keywords:["weather","cyclone","twister"],char:"🌪",fitzpatrick_scale:!1,category:"animals_and_nature"},fog:{keywords:["weather"],char:"🌫",fitzpatrick_scale:!1,category:"animals_and_nature"},open_umbrella:{keywords:["weather","spring"],char:"☂",fitzpatrick_scale:!1,category:"animals_and_nature"},umbrella:{keywords:["rainy","weather","spring"],char:"☔",fitzpatrick_scale:!1,category:"animals_and_nature"},droplet:{keywords:["water","drip","faucet","spring"],char:"💧",fitzpatrick_scale:!1,category:"animals_and_nature"},sweat_drops:{keywords:["water","drip","oops"],char:"💦",fitzpatrick_scale:!1,category:"animals_and_nature"},ocean:{keywords:["sea","water","wave","nature","tsunami","disaster"],char:"🌊",fitzpatrick_scale:!1,category:"animals_and_nature"},green_apple:{keywords:["fruit","nature"],char:"🍏",fitzpatrick_scale:!1,category:"food_and_drink"},apple:{keywords:["fruit","mac","school"],char:"🍎",fitzpatrick_scale:!1,category:"food_and_drink"},pear:{keywords:["fruit","nature","food"],char:"🍐",fitzpatrick_scale:!1,category:"food_and_drink"},tangerine:{keywords:["food","fruit","nature","orange"],char:"🍊",fitzpatrick_scale:!1,category:"food_and_drink"},lemon:{keywords:["fruit","nature"],char:"🍋",fitzpatrick_scale:!1,category:"food_and_drink"},banana:{keywords:["fruit","food","monkey"],char:"🍌",fitzpatrick_scale:!1,category:"food_and_drink"},watermelon:{keywords:["fruit","food","picnic","summer"],char:"🍉",fitzpatrick_scale:!1,category:"food_and_drink"},grapes:{keywords:["fruit","food","wine"],char:"🍇",fitzpatrick_scale:!1,category:"food_and_drink"},strawberry:{keywords:["fruit","food","nature"],char:"🍓",fitzpatrick_scale:!1,category:"food_and_drink"},melon:{keywords:["fruit","nature","food"],char:"🍈",fitzpatrick_scale:!1,category:"food_and_drink"},cherries:{keywords:["food","fruit"],char:"🍒",fitzpatrick_scale:!1,category:"food_and_drink"},peach:{keywords:["fruit","nature","food"],char:"🍑",fitzpatrick_scale:!1,category:"food_and_drink"},pineapple:{keywords:["fruit","nature","food"],char:"🍍",fitzpatrick_scale:!1,category:"food_and_drink"},coconut:{keywords:["fruit","nature","food","palm"],char:"🥥",fitzpatrick_scale:!1,category:"food_and_drink"},kiwi_fruit:{keywords:["fruit","food"],char:"🥝",fitzpatrick_scale:!1,category:"food_and_drink"},mango:{keywords:["fruit","food","tropical"],char:"🥭",fitzpatrick_scale:!1,category:"food_and_drink"},avocado:{keywords:["fruit","food"],char:"🥑",fitzpatrick_scale:!1,category:"food_and_drink"},broccoli:{keywords:["fruit","food","vegetable"],char:"🥦",fitzpatrick_scale:!1,category:"food_and_drink"},tomato:{keywords:["fruit","vegetable","nature","food"],char:"🍅",fitzpatrick_scale:!1,category:"food_and_drink"},eggplant:{keywords:["vegetable","nature","food","aubergine"],char:"🍆",fitzpatrick_scale:!1,category:"food_and_drink"},cucumber:{keywords:["fruit","food","pickle"],char:"🥒",fitzpatrick_scale:!1,category:"food_and_drink"},carrot:{keywords:["vegetable","food","orange"],char:"🥕",fitzpatrick_scale:!1,category:"food_and_drink"},hot_pepper:{keywords:["food","spicy","chilli","chili"],char:"🌶",fitzpatrick_scale:!1,category:"food_and_drink"},potato:{keywords:["food","tuber","vegatable","starch"],char:"🥔",fitzpatrick_scale:!1,category:"food_and_drink"},corn:{keywords:["food","vegetable","plant"],char:"🌽",fitzpatrick_scale:!1,category:"food_and_drink"},leafy_greens:{keywords:["food","vegetable","plant","bok choy","cabbage","kale","lettuce"],char:"🥬",fitzpatrick_scale:!1,category:"food_and_drink"},sweet_potato:{keywords:["food","nature"],char:"🍠",fitzpatrick_scale:!1,category:"food_and_drink"},peanuts:{keywords:["food","nut"],char:"🥜",fitzpatrick_scale:!1,category:"food_and_drink"},honey_pot:{keywords:["bees","sweet","kitchen"],char:"🍯",fitzpatrick_scale:!1,category:"food_and_drink"},croissant:{keywords:["food","bread","french"],char:"🥐",fitzpatrick_scale:!1,category:"food_and_drink"},bread:{keywords:["food","wheat","breakfast","toast"],char:"🍞",fitzpatrick_scale:!1,category:"food_and_drink"},baguette_bread:{keywords:["food","bread","french"],char:"🥖",fitzpatrick_scale:!1,category:"food_and_drink"},bagel:{keywords:["food","bread","bakery","schmear"],char:"🥯",fitzpatrick_scale:!1,category:"food_and_drink"},pretzel:{keywords:["food","bread","twisted"],char:"🥨",fitzpatrick_scale:!1,category:"food_and_drink"},cheese:{keywords:["food","chadder"],char:"🧀",fitzpatrick_scale:!1,category:"food_and_drink"},egg:{keywords:["food","chicken","breakfast"],char:"🥚",fitzpatrick_scale:!1,category:"food_and_drink"},bacon:{keywords:["food","breakfast","pork","pig","meat"],char:"🥓",fitzpatrick_scale:!1,category:"food_and_drink"},steak:{keywords:["food","cow","meat","cut","chop","lambchop","porkchop"],char:"🥩",fitzpatrick_scale:!1,category:"food_and_drink"},pancakes:{keywords:["food","breakfast","flapjacks","hotcakes"],char:"🥞",fitzpatrick_scale:!1,category:"food_and_drink"},poultry_leg:{keywords:["food","meat","drumstick","bird","chicken","turkey"],char:"🍗",fitzpatrick_scale:!1,category:"food_and_drink"},meat_on_bone:{keywords:["good","food","drumstick"],char:"🍖",fitzpatrick_scale:!1,category:"food_and_drink"},bone:{keywords:["skeleton"],char:"🦴",fitzpatrick_scale:!1,category:"food_and_drink"},fried_shrimp:{keywords:["food","animal","appetizer","summer"],char:"🍤",fitzpatrick_scale:!1,category:"food_and_drink"},fried_egg:{keywords:["food","breakfast","kitchen","egg"],char:"🍳",fitzpatrick_scale:!1,category:"food_and_drink"},hamburger:{keywords:["meat","fast food","beef","cheeseburger","mcdonalds","burger king"],char:"🍔",fitzpatrick_scale:!1,category:"food_and_drink"},fries:{keywords:["chips","snack","fast food"],char:"🍟",fitzpatrick_scale:!1,category:"food_and_drink"},stuffed_flatbread:{keywords:["food","flatbread","stuffed","gyro"],char:"🥙",fitzpatrick_scale:!1,category:"food_and_drink"},hotdog:{keywords:["food","frankfurter"],char:"🌭",fitzpatrick_scale:!1,category:"food_and_drink"},pizza:{keywords:["food","party"],char:"🍕",fitzpatrick_scale:!1,category:"food_and_drink"},sandwich:{keywords:["food","lunch","bread"],char:"🥪",fitzpatrick_scale:!1,category:"food_and_drink"},canned_food:{keywords:["food","soup"],char:"🥫",fitzpatrick_scale:!1,category:"food_and_drink"},spaghetti:{keywords:["food","italian","noodle"],char:"🍝",fitzpatrick_scale:!1,category:"food_and_drink"},taco:{keywords:["food","mexican"],char:"🌮",fitzpatrick_scale:!1,category:"food_and_drink"},burrito:{keywords:["food","mexican"],char:"🌯",fitzpatrick_scale:!1,category:"food_and_drink"},green_salad:{keywords:["food","healthy","lettuce"],char:"🥗",fitzpatrick_scale:!1,category:"food_and_drink"},shallow_pan_of_food:{keywords:["food","cooking","casserole","paella"],char:"🥘",fitzpatrick_scale:!1,category:"food_and_drink"},ramen:{keywords:["food","japanese","noodle","chopsticks"],char:"🍜",fitzpatrick_scale:!1,category:"food_and_drink"},stew:{keywords:["food","meat","soup"],char:"🍲",fitzpatrick_scale:!1,category:"food_and_drink"},fish_cake:{keywords:["food","japan","sea","beach","narutomaki","pink","swirl","kamaboko","surimi","ramen"],char:"🍥",fitzpatrick_scale:!1,category:"food_and_drink"},fortune_cookie:{keywords:["food","prophecy"],char:"🥠",fitzpatrick_scale:!1,category:"food_and_drink"},sushi:{keywords:["food","fish","japanese","rice"],char:"🍣",fitzpatrick_scale:!1,category:"food_and_drink"},bento:{keywords:["food","japanese","box"],char:"🍱",fitzpatrick_scale:!1,category:"food_and_drink"},curry:{keywords:["food","spicy","hot","indian"],char:"🍛",fitzpatrick_scale:!1,category:"food_and_drink"},rice_ball:{keywords:["food","japanese"],char:"🍙",fitzpatrick_scale:!1,category:"food_and_drink"},rice:{keywords:["food","china","asian"],char:"🍚",fitzpatrick_scale:!1,category:"food_and_drink"},rice_cracker:{keywords:["food","japanese"],char:"🍘",fitzpatrick_scale:!1,category:"food_and_drink"},oden:{keywords:["food","japanese"],char:"🍢",fitzpatrick_scale:!1,category:"food_and_drink"},dango:{keywords:["food","dessert","sweet","japanese","barbecue","meat"],char:"🍡",fitzpatrick_scale:!1,category:"food_and_drink"},shaved_ice:{keywords:["hot","dessert","summer"],char:"🍧",fitzpatrick_scale:!1,category:"food_and_drink"},ice_cream:{keywords:["food","hot","dessert"],char:"🍨",fitzpatrick_scale:!1,category:"food_and_drink"},icecream:{keywords:["food","hot","dessert","summer"],char:"🍦",fitzpatrick_scale:!1,category:"food_and_drink"},pie:{keywords:["food","dessert","pastry"],char:"🥧",fitzpatrick_scale:!1,category:"food_and_drink"},cake:{keywords:["food","dessert"],char:"🍰",fitzpatrick_scale:!1,category:"food_and_drink"},cupcake:{keywords:["food","dessert","bakery","sweet"],char:"🧁",fitzpatrick_scale:!1,category:"food_and_drink"},moon_cake:{keywords:["food","autumn"],char:"🥮",fitzpatrick_scale:!1,category:"food_and_drink"},birthday:{keywords:["food","dessert","cake"],char:"🎂",fitzpatrick_scale:!1,category:"food_and_drink"},custard:{keywords:["dessert","food"],char:"🍮",fitzpatrick_scale:!1,category:"food_and_drink"},candy:{keywords:["snack","dessert","sweet","lolly"],char:"🍬",fitzpatrick_scale:!1,category:"food_and_drink"},lollipop:{keywords:["food","snack","candy","sweet"],char:"🍭",fitzpatrick_scale:!1,category:"food_and_drink"},chocolate_bar:{keywords:["food","snack","dessert","sweet"],char:"🍫",fitzpatrick_scale:!1,category:"food_and_drink"},popcorn:{keywords:["food","movie theater","films","snack"],char:"🍿",fitzpatrick_scale:!1,category:"food_and_drink"},dumpling:{keywords:["food","empanada","pierogi","potsticker"],char:"🥟",fitzpatrick_scale:!1,category:"food_and_drink"},doughnut:{keywords:["food","dessert","snack","sweet","donut"],char:"🍩",fitzpatrick_scale:!1,category:"food_and_drink"},cookie:{keywords:["food","snack","oreo","chocolate","sweet","dessert"],char:"🍪",fitzpatrick_scale:!1,category:"food_and_drink"},milk_glass:{keywords:["beverage","drink","cow"],char:"🥛",fitzpatrick_scale:!1,category:"food_and_drink"},beer:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:"🍺",fitzpatrick_scale:!1,category:"food_and_drink"},beers:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:"🍻",fitzpatrick_scale:!1,category:"food_and_drink"},clinking_glasses:{keywords:["beverage","drink","party","alcohol","celebrate","cheers","wine","champagne","toast"],char:"🥂",fitzpatrick_scale:!1,category:"food_and_drink"},wine_glass:{keywords:["drink","beverage","drunk","alcohol","booze"],char:"🍷",fitzpatrick_scale:!1,category:"food_and_drink"},tumbler_glass:{keywords:["drink","beverage","drunk","alcohol","liquor","booze","bourbon","scotch","whisky","glass","shot"],char:"🥃",fitzpatrick_scale:!1,category:"food_and_drink"},cocktail:{keywords:["drink","drunk","alcohol","beverage","booze","mojito"],char:"🍸",fitzpatrick_scale:!1,category:"food_and_drink"},tropical_drink:{keywords:["beverage","cocktail","summer","beach","alcohol","booze","mojito"],char:"🍹",fitzpatrick_scale:!1,category:"food_and_drink"},champagne:{keywords:["drink","wine","bottle","celebration"],char:"🍾",fitzpatrick_scale:!1,category:"food_and_drink"},sake:{keywords:["wine","drink","drunk","beverage","japanese","alcohol","booze"],char:"🍶",fitzpatrick_scale:!1,category:"food_and_drink"},tea:{keywords:["drink","bowl","breakfast","green","british"],char:"🍵",fitzpatrick_scale:!1,category:"food_and_drink"},cup_with_straw:{keywords:["drink","soda"],char:"🥤",fitzpatrick_scale:!1,category:"food_and_drink"},coffee:{keywords:["beverage","caffeine","latte","espresso"],char:"☕",fitzpatrick_scale:!1,category:"food_and_drink"},baby_bottle:{keywords:["food","container","milk"],char:"🍼",fitzpatrick_scale:!1,category:"food_and_drink"},salt:{keywords:["condiment","shaker"],char:"🧂",fitzpatrick_scale:!1,category:"food_and_drink"},spoon:{keywords:["cutlery","kitchen","tableware"],char:"🥄",fitzpatrick_scale:!1,category:"food_and_drink"},fork_and_knife:{keywords:["cutlery","kitchen"],char:"🍴",fitzpatrick_scale:!1,category:"food_and_drink"},plate_with_cutlery:{keywords:["food","eat","meal","lunch","dinner","restaurant"],char:"🍽",fitzpatrick_scale:!1,category:"food_and_drink"},bowl_with_spoon:{keywords:["food","breakfast","cereal","oatmeal","porridge"],char:"🥣",fitzpatrick_scale:!1,category:"food_and_drink"},takeout_box:{keywords:["food","leftovers"],char:"🥡",fitzpatrick_scale:!1,category:"food_and_drink"},chopsticks:{keywords:["food"],char:"🥢",fitzpatrick_scale:!1,category:"food_and_drink"},soccer:{keywords:["sports","football"],char:"⚽",fitzpatrick_scale:!1,category:"activity"},basketball:{keywords:["sports","balls","NBA"],char:"🏀",fitzpatrick_scale:!1,category:"activity"},football:{keywords:["sports","balls","NFL"],char:"🏈",fitzpatrick_scale:!1,category:"activity"},baseball:{keywords:["sports","balls"],char:"⚾",fitzpatrick_scale:!1,category:"activity"},softball:{keywords:["sports","balls"],char:"🥎",fitzpatrick_scale:!1,category:"activity"},tennis:{keywords:["sports","balls","green"],char:"🎾",fitzpatrick_scale:!1,category:"activity"},volleyball:{keywords:["sports","balls"],char:"🏐",fitzpatrick_scale:!1,category:"activity"},rugby_football:{keywords:["sports","team"],char:"🏉",fitzpatrick_scale:!1,category:"activity"},flying_disc:{keywords:["sports","frisbee","ultimate"],char:"🥏",fitzpatrick_scale:!1,category:"activity"},"8ball":{keywords:["pool","hobby","game","luck","magic"],char:"🎱",fitzpatrick_scale:!1,category:"activity"},golf:{keywords:["sports","business","flag","hole","summer"],char:"⛳",fitzpatrick_scale:!1,category:"activity"},golfing_woman:{keywords:["sports","business","woman","female"],char:"🏌️‍♀️",fitzpatrick_scale:!1,category:"activity"},golfing_man:{keywords:["sports","business"],char:"🏌",fitzpatrick_scale:!0,category:"activity"},ping_pong:{keywords:["sports","pingpong"],char:"🏓",fitzpatrick_scale:!1,category:"activity"},badminton:{keywords:["sports"],char:"🏸",fitzpatrick_scale:!1,category:"activity"},goal_net:{keywords:["sports"],char:"🥅",fitzpatrick_scale:!1,category:"activity"},ice_hockey:{keywords:["sports"],char:"🏒",fitzpatrick_scale:!1,category:"activity"},field_hockey:{keywords:["sports"],char:"🏑",fitzpatrick_scale:!1,category:"activity"},lacrosse:{keywords:["sports","ball","stick"],char:"🥍",fitzpatrick_scale:!1,category:"activity"},cricket:{keywords:["sports"],char:"🏏",fitzpatrick_scale:!1,category:"activity"},ski:{keywords:["sports","winter","cold","snow"],char:"🎿",fitzpatrick_scale:!1,category:"activity"},skier:{keywords:["sports","winter","snow"],char:"⛷",fitzpatrick_scale:!1,category:"activity"},snowboarder:{keywords:["sports","winter"],char:"🏂",fitzpatrick_scale:!0,category:"activity"},person_fencing:{keywords:["sports","fencing","sword"],char:"🤺",fitzpatrick_scale:!1,category:"activity"},women_wrestling:{keywords:["sports","wrestlers"],char:"🤼‍♀️",fitzpatrick_scale:!1,category:"activity"},men_wrestling:{keywords:["sports","wrestlers"],char:"🤼‍♂️",fitzpatrick_scale:!1,category:"activity"},woman_cartwheeling:{keywords:["gymnastics"],char:"🤸‍♀️",fitzpatrick_scale:!0,category:"activity"},man_cartwheeling:{keywords:["gymnastics"],char:"🤸‍♂️",fitzpatrick_scale:!0,category:"activity"},woman_playing_handball:{keywords:["sports"],char:"🤾‍♀️",fitzpatrick_scale:!0,category:"activity"},man_playing_handball:{keywords:["sports"],char:"🤾‍♂️",fitzpatrick_scale:!0,category:"activity"},ice_skate:{keywords:["sports"],char:"⛸",fitzpatrick_scale:!1,category:"activity"},curling_stone:{keywords:["sports"],char:"🥌",fitzpatrick_scale:!1,category:"activity"},skateboard:{keywords:["board"],char:"🛹",fitzpatrick_scale:!1,category:"activity"},sled:{keywords:["sleigh","luge","toboggan"],char:"🛷",fitzpatrick_scale:!1,category:"activity"},bow_and_arrow:{keywords:["sports"],char:"🏹",fitzpatrick_scale:!1,category:"activity"},fishing_pole_and_fish:{keywords:["food","hobby","summer"],char:"🎣",fitzpatrick_scale:!1,category:"activity"},boxing_glove:{keywords:["sports","fighting"],char:"🥊",fitzpatrick_scale:!1,category:"activity"},martial_arts_uniform:{keywords:["judo","karate","taekwondo"],char:"🥋",fitzpatrick_scale:!1,category:"activity"},rowing_woman:{keywords:["sports","hobby","water","ship","woman","female"],char:"🚣‍♀️",fitzpatrick_scale:!0,category:"activity"},rowing_man:{keywords:["sports","hobby","water","ship"],char:"🚣",fitzpatrick_scale:!0,category:"activity"},climbing_woman:{keywords:["sports","hobby","woman","female","rock"],char:"🧗‍♀️",fitzpatrick_scale:!0,category:"activity"},climbing_man:{keywords:["sports","hobby","man","male","rock"],char:"🧗‍♂️",fitzpatrick_scale:!0,category:"activity"},swimming_woman:{keywords:["sports","exercise","human","athlete","water","summer","woman","female"],char:"🏊‍♀️",fitzpatrick_scale:!0,category:"activity"},swimming_man:{keywords:["sports","exercise","human","athlete","water","summer"],char:"🏊",fitzpatrick_scale:!0,category:"activity"},woman_playing_water_polo:{keywords:["sports","pool"],char:"🤽‍♀️",fitzpatrick_scale:!0,category:"activity"},man_playing_water_polo:{keywords:["sports","pool"],char:"🤽‍♂️",fitzpatrick_scale:!0,category:"activity"},woman_in_lotus_position:{keywords:["woman","female","meditation","yoga","serenity","zen","mindfulness"],char:"🧘‍♀️",fitzpatrick_scale:!0,category:"activity"},man_in_lotus_position:{keywords:["man","male","meditation","yoga","serenity","zen","mindfulness"],char:"🧘‍♂️",fitzpatrick_scale:!0,category:"activity"},surfing_woman:{keywords:["sports","ocean","sea","summer","beach","woman","female"],char:"🏄‍♀️",fitzpatrick_scale:!0,category:"activity"},surfing_man:{keywords:["sports","ocean","sea","summer","beach"],char:"🏄",fitzpatrick_scale:!0,category:"activity"},bath:{keywords:["clean","shower","bathroom"],char:"🛀",fitzpatrick_scale:!0,category:"activity"},basketball_woman:{keywords:["sports","human","woman","female"],char:"⛹️‍♀️",fitzpatrick_scale:!0,category:"activity"},basketball_man:{keywords:["sports","human"],char:"⛹",fitzpatrick_scale:!0,category:"activity"},weight_lifting_woman:{keywords:["sports","training","exercise","woman","female"],char:"🏋️‍♀️",fitzpatrick_scale:!0,category:"activity"},weight_lifting_man:{keywords:["sports","training","exercise"],char:"🏋",fitzpatrick_scale:!0,category:"activity"},biking_woman:{keywords:["sports","bike","exercise","hipster","woman","female"],char:"🚴‍♀️",fitzpatrick_scale:!0,category:"activity"},biking_man:{keywords:["sports","bike","exercise","hipster"],char:"🚴",fitzpatrick_scale:!0,category:"activity"},mountain_biking_woman:{keywords:["transportation","sports","human","race","bike","woman","female"],char:"🚵‍♀️",fitzpatrick_scale:!0,category:"activity"},mountain_biking_man:{keywords:["transportation","sports","human","race","bike"],char:"🚵",fitzpatrick_scale:!0,category:"activity"},horse_racing:{keywords:["animal","betting","competition","gambling","luck"],char:"🏇",fitzpatrick_scale:!0,category:"activity"},business_suit_levitating:{keywords:["suit","business","levitate","hover","jump"],char:"🕴",fitzpatrick_scale:!0,category:"activity"},trophy:{keywords:["win","award","contest","place","ftw","ceremony"],char:"🏆",fitzpatrick_scale:!1,category:"activity"},running_shirt_with_sash:{keywords:["play","pageant"],char:"🎽",fitzpatrick_scale:!1,category:"activity"},medal_sports:{keywords:["award","winning"],char:"🏅",fitzpatrick_scale:!1,category:"activity"},medal_military:{keywords:["award","winning","army"],char:"🎖",fitzpatrick_scale:!1,category:"activity"},"1st_place_medal":{keywords:["award","winning","first"],char:"🥇",fitzpatrick_scale:!1,category:"activity"},"2nd_place_medal":{keywords:["award","second"],char:"🥈",fitzpatrick_scale:!1,category:"activity"},"3rd_place_medal":{keywords:["award","third"],char:"🥉",fitzpatrick_scale:!1,category:"activity"},reminder_ribbon:{keywords:["sports","cause","support","awareness"],char:"🎗",fitzpatrick_scale:!1,category:"activity"},rosette:{keywords:["flower","decoration","military"],char:"🏵",fitzpatrick_scale:!1,category:"activity"},ticket:{keywords:["event","concert","pass"],char:"🎫",fitzpatrick_scale:!1,category:"activity"},tickets:{keywords:["sports","concert","entrance"],char:"🎟",fitzpatrick_scale:!1,category:"activity"},performing_arts:{keywords:["acting","theater","drama"],char:"🎭",fitzpatrick_scale:!1,category:"activity"},art:{keywords:["design","paint","draw","colors"],char:"🎨",fitzpatrick_scale:!1,category:"activity"},circus_tent:{keywords:["festival","carnival","party"],char:"🎪",fitzpatrick_scale:!1,category:"activity"},woman_juggling:{keywords:["juggle","balance","skill","multitask"],char:"🤹‍♀️",fitzpatrick_scale:!0,category:"activity"},man_juggling:{keywords:["juggle","balance","skill","multitask"],char:"🤹‍♂️",fitzpatrick_scale:!0,category:"activity"},microphone:{keywords:["sound","music","PA","sing","talkshow"],char:"🎤",fitzpatrick_scale:!1,category:"activity"},headphones:{keywords:["music","score","gadgets"],char:"🎧",fitzpatrick_scale:!1,category:"activity"},musical_score:{keywords:["treble","clef","compose"],char:"🎼",fitzpatrick_scale:!1,category:"activity"},musical_keyboard:{keywords:["piano","instrument","compose"],char:"🎹",fitzpatrick_scale:!1,category:"activity"},drum:{keywords:["music","instrument","drumsticks","snare"],char:"🥁",fitzpatrick_scale:!1,category:"activity"},saxophone:{keywords:["music","instrument","jazz","blues"],char:"🎷",fitzpatrick_scale:!1,category:"activity"},trumpet:{keywords:["music","brass"],char:"🎺",fitzpatrick_scale:!1,category:"activity"},guitar:{keywords:["music","instrument"],char:"🎸",fitzpatrick_scale:!1,category:"activity"},violin:{keywords:["music","instrument","orchestra","symphony"],char:"🎻",fitzpatrick_scale:!1,category:"activity"},clapper:{keywords:["movie","film","record"],char:"🎬",fitzpatrick_scale:!1,category:"activity"},video_game:{keywords:["play","console","PS4","controller"],char:"🎮",fitzpatrick_scale:!1,category:"activity"},space_invader:{keywords:["game","arcade","play"],char:"👾",fitzpatrick_scale:!1,category:"activity"},dart:{keywords:["game","play","bar","target","bullseye"],char:"🎯",fitzpatrick_scale:!1,category:"activity"},game_die:{keywords:["dice","random","tabletop","play","luck"],char:"🎲",fitzpatrick_scale:!1,category:"activity"},chess_pawn:{keywords:["expendable"],char:"♟",fitzpatrick_scale:!1,category:"activity"},slot_machine:{keywords:["bet","gamble","vegas","fruit machine","luck","casino"],char:"🎰",fitzpatrick_scale:!1,category:"activity"},jigsaw:{keywords:["interlocking","puzzle","piece"],char:"🧩",fitzpatrick_scale:!1,category:"activity"},bowling:{keywords:["sports","fun","play"],char:"🎳",fitzpatrick_scale:!1,category:"activity"},red_car:{keywords:["red","transportation","vehicle"],char:"🚗",fitzpatrick_scale:!1,category:"travel_and_places"},taxi:{keywords:["uber","vehicle","cars","transportation"],char:"🚕",fitzpatrick_scale:!1,category:"travel_and_places"},blue_car:{keywords:["transportation","vehicle"],char:"🚙",fitzpatrick_scale:!1,category:"travel_and_places"},bus:{keywords:["car","vehicle","transportation"],char:"🚌",fitzpatrick_scale:!1,category:"travel_and_places"},trolleybus:{keywords:["bart","transportation","vehicle"],char:"🚎",fitzpatrick_scale:!1,category:"travel_and_places"},racing_car:{keywords:["sports","race","fast","formula","f1"],char:"🏎",fitzpatrick_scale:!1,category:"travel_and_places"},police_car:{keywords:["vehicle","cars","transportation","law","legal","enforcement"],char:"🚓",fitzpatrick_scale:!1,category:"travel_and_places"},ambulance:{keywords:["health","911","hospital"],char:"🚑",fitzpatrick_scale:!1,category:"travel_and_places"},fire_engine:{keywords:["transportation","cars","vehicle"],char:"🚒",fitzpatrick_scale:!1,category:"travel_and_places"},minibus:{keywords:["vehicle","car","transportation"],char:"🚐",fitzpatrick_scale:!1,category:"travel_and_places"},truck:{keywords:["cars","transportation"],char:"🚚",fitzpatrick_scale:!1,category:"travel_and_places"},articulated_lorry:{keywords:["vehicle","cars","transportation","express"],char:"🚛",fitzpatrick_scale:!1,category:"travel_and_places"},tractor:{keywords:["vehicle","car","farming","agriculture"],char:"🚜",fitzpatrick_scale:!1,category:"travel_and_places"},kick_scooter:{keywords:["vehicle","kick","razor"],char:"🛴",fitzpatrick_scale:!1,category:"travel_and_places"},motorcycle:{keywords:["race","sports","fast"],char:"🏍",fitzpatrick_scale:!1,category:"travel_and_places"},bike:{keywords:["sports","bicycle","exercise","hipster"],char:"🚲",fitzpatrick_scale:!1,category:"travel_and_places"},motor_scooter:{keywords:["vehicle","vespa","sasha"],char:"🛵",fitzpatrick_scale:!1,category:"travel_and_places"},rotating_light:{keywords:["police","ambulance","911","emergency","alert","error","pinged","law","legal"],char:"🚨",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_police_car:{keywords:["vehicle","law","legal","enforcement","911"],char:"🚔",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_bus:{keywords:["vehicle","transportation"],char:"🚍",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_automobile:{keywords:["car","vehicle","transportation"],char:"🚘",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_taxi:{keywords:["vehicle","cars","uber"],char:"🚖",fitzpatrick_scale:!1,category:"travel_and_places"},aerial_tramway:{keywords:["transportation","vehicle","ski"],char:"🚡",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_cableway:{keywords:["transportation","vehicle","ski"],char:"🚠",fitzpatrick_scale:!1,category:"travel_and_places"},suspension_railway:{keywords:["vehicle","transportation"],char:"🚟",fitzpatrick_scale:!1,category:"travel_and_places"},railway_car:{keywords:["transportation","vehicle"],char:"🚃",fitzpatrick_scale:!1,category:"travel_and_places"},train:{keywords:["transportation","vehicle","carriage","public","travel"],char:"🚋",fitzpatrick_scale:!1,category:"travel_and_places"},monorail:{keywords:["transportation","vehicle"],char:"🚝",fitzpatrick_scale:!1,category:"travel_and_places"},bullettrain_side:{keywords:["transportation","vehicle"],char:"🚄",fitzpatrick_scale:!1,category:"travel_and_places"},bullettrain_front:{keywords:["transportation","vehicle","speed","fast","public","travel"],char:"🚅",fitzpatrick_scale:!1,category:"travel_and_places"},light_rail:{keywords:["transportation","vehicle"],char:"🚈",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_railway:{keywords:["transportation","vehicle"],char:"🚞",fitzpatrick_scale:!1,category:"travel_and_places"},steam_locomotive:{keywords:["transportation","vehicle","train"],char:"🚂",fitzpatrick_scale:!1,category:"travel_and_places"},train2:{keywords:["transportation","vehicle"],char:"🚆",fitzpatrick_scale:!1,category:"travel_and_places"},metro:{keywords:["transportation","blue-square","mrt","underground","tube"],char:"🚇",fitzpatrick_scale:!1,category:"travel_and_places"},tram:{keywords:["transportation","vehicle"],char:"🚊",fitzpatrick_scale:!1,category:"travel_and_places"},station:{keywords:["transportation","vehicle","public"],char:"🚉",fitzpatrick_scale:!1,category:"travel_and_places"},flying_saucer:{keywords:["transportation","vehicle","ufo"],char:"🛸",fitzpatrick_scale:!1,category:"travel_and_places"},helicopter:{keywords:["transportation","vehicle","fly"],char:"🚁",fitzpatrick_scale:!1,category:"travel_and_places"},small_airplane:{keywords:["flight","transportation","fly","vehicle"],char:"🛩",fitzpatrick_scale:!1,category:"travel_and_places"},airplane:{keywords:["vehicle","transportation","flight","fly"],char:"✈️",fitzpatrick_scale:!1,category:"travel_and_places"},flight_departure:{keywords:["airport","flight","landing"],char:"🛫",fitzpatrick_scale:!1,category:"travel_and_places"},flight_arrival:{keywords:["airport","flight","boarding"],char:"🛬",fitzpatrick_scale:!1,category:"travel_and_places"},sailboat:{keywords:["ship","summer","transportation","water","sailing"],char:"⛵",fitzpatrick_scale:!1,category:"travel_and_places"},motor_boat:{keywords:["ship"],char:"🛥",fitzpatrick_scale:!1,category:"travel_and_places"},speedboat:{keywords:["ship","transportation","vehicle","summer"],char:"🚤",fitzpatrick_scale:!1,category:"travel_and_places"},ferry:{keywords:["boat","ship","yacht"],char:"⛴",fitzpatrick_scale:!1,category:"travel_and_places"},passenger_ship:{keywords:["yacht","cruise","ferry"],char:"🛳",fitzpatrick_scale:!1,category:"travel_and_places"},rocket:{keywords:["launch","ship","staffmode","NASA","outer space","outer_space","fly"],char:"🚀",fitzpatrick_scale:!1,category:"travel_and_places"},artificial_satellite:{keywords:["communication","gps","orbit","spaceflight","NASA","ISS"],char:"🛰",fitzpatrick_scale:!1,category:"travel_and_places"},seat:{keywords:["sit","airplane","transport","bus","flight","fly"],char:"💺",fitzpatrick_scale:!1,category:"travel_and_places"},canoe:{keywords:["boat","paddle","water","ship"],char:"🛶",fitzpatrick_scale:!1,category:"travel_and_places"},anchor:{keywords:["ship","ferry","sea","boat"],char:"⚓",fitzpatrick_scale:!1,category:"travel_and_places"},construction:{keywords:["wip","progress","caution","warning"],char:"🚧",fitzpatrick_scale:!1,category:"travel_and_places"},fuelpump:{keywords:["gas station","petroleum"],char:"⛽",fitzpatrick_scale:!1,category:"travel_and_places"},busstop:{keywords:["transportation","wait"],char:"🚏",fitzpatrick_scale:!1,category:"travel_and_places"},vertical_traffic_light:{keywords:["transportation","driving"],char:"🚦",fitzpatrick_scale:!1,category:"travel_and_places"},traffic_light:{keywords:["transportation","signal"],char:"🚥",fitzpatrick_scale:!1,category:"travel_and_places"},checkered_flag:{keywords:["contest","finishline","race","gokart"],char:"🏁",fitzpatrick_scale:!1,category:"travel_and_places"},ship:{keywords:["transportation","titanic","deploy"],char:"🚢",fitzpatrick_scale:!1,category:"travel_and_places"},ferris_wheel:{keywords:["photo","carnival","londoneye"],char:"🎡",fitzpatrick_scale:!1,category:"travel_and_places"},roller_coaster:{keywords:["carnival","playground","photo","fun"],char:"🎢",fitzpatrick_scale:!1,category:"travel_and_places"},carousel_horse:{keywords:["photo","carnival"],char:"🎠",fitzpatrick_scale:!1,category:"travel_and_places"},building_construction:{keywords:["wip","working","progress"],char:"🏗",fitzpatrick_scale:!1,category:"travel_and_places"},foggy:{keywords:["photo","mountain"],char:"🌁",fitzpatrick_scale:!1,category:"travel_and_places"},tokyo_tower:{keywords:["photo","japanese"],char:"🗼",fitzpatrick_scale:!1,category:"travel_and_places"},factory:{keywords:["building","industry","pollution","smoke"],char:"🏭",fitzpatrick_scale:!1,category:"travel_and_places"},fountain:{keywords:["photo","summer","water","fresh"],char:"⛲",fitzpatrick_scale:!1,category:"travel_and_places"},rice_scene:{keywords:["photo","japan","asia","tsukimi"],char:"🎑",fitzpatrick_scale:!1,category:"travel_and_places"},mountain:{keywords:["photo","nature","environment"],char:"⛰",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_snow:{keywords:["photo","nature","environment","winter","cold"],char:"🏔",fitzpatrick_scale:!1,category:"travel_and_places"},mount_fuji:{keywords:["photo","mountain","nature","japanese"],char:"🗻",fitzpatrick_scale:!1,category:"travel_and_places"},volcano:{keywords:["photo","nature","disaster"],char:"🌋",fitzpatrick_scale:!1,category:"travel_and_places"},japan:{keywords:["nation","country","japanese","asia"],char:"🗾",fitzpatrick_scale:!1,category:"travel_and_places"},camping:{keywords:["photo","outdoors","tent"],char:"🏕",fitzpatrick_scale:!1,category:"travel_and_places"},tent:{keywords:["photo","camping","outdoors"],char:"⛺",fitzpatrick_scale:!1,category:"travel_and_places"},national_park:{keywords:["photo","environment","nature"],char:"🏞",fitzpatrick_scale:!1,category:"travel_and_places"},motorway:{keywords:["road","cupertino","interstate","highway"],char:"🛣",fitzpatrick_scale:!1,category:"travel_and_places"},railway_track:{keywords:["train","transportation"],char:"🛤",fitzpatrick_scale:!1,category:"travel_and_places"},sunrise:{keywords:["morning","view","vacation","photo"],char:"🌅",fitzpatrick_scale:!1,category:"travel_and_places"},sunrise_over_mountains:{keywords:["view","vacation","photo"],char:"🌄",fitzpatrick_scale:!1,category:"travel_and_places"},desert:{keywords:["photo","warm","saharah"],char:"🏜",fitzpatrick_scale:!1,category:"travel_and_places"},beach_umbrella:{keywords:["weather","summer","sunny","sand","mojito"],char:"🏖",fitzpatrick_scale:!1,category:"travel_and_places"},desert_island:{keywords:["photo","tropical","mojito"],char:"🏝",fitzpatrick_scale:!1,category:"travel_and_places"},city_sunrise:{keywords:["photo","good morning","dawn"],char:"🌇",fitzpatrick_scale:!1,category:"travel_and_places"},city_sunset:{keywords:["photo","evening","sky","buildings"],char:"🌆",fitzpatrick_scale:!1,category:"travel_and_places"},cityscape:{keywords:["photo","night life","urban"],char:"🏙",fitzpatrick_scale:!1,category:"travel_and_places"},night_with_stars:{keywords:["evening","city","downtown"],char:"🌃",fitzpatrick_scale:!1,category:"travel_and_places"},bridge_at_night:{keywords:["photo","sanfrancisco"],char:"🌉",fitzpatrick_scale:!1,category:"travel_and_places"},milky_way:{keywords:["photo","space","stars"],char:"🌌",fitzpatrick_scale:!1,category:"travel_and_places"},stars:{keywords:["night","photo"],char:"🌠",fitzpatrick_scale:!1,category:"travel_and_places"},sparkler:{keywords:["stars","night","shine"],char:"🎇",fitzpatrick_scale:!1,category:"travel_and_places"},fireworks:{keywords:["photo","festival","carnival","congratulations"],char:"🎆",fitzpatrick_scale:!1,category:"travel_and_places"},rainbow:{keywords:["nature","happy","unicorn_face","photo","sky","spring"],char:"🌈",fitzpatrick_scale:!1,category:"travel_and_places"},houses:{keywords:["buildings","photo"],char:"🏘",fitzpatrick_scale:!1,category:"travel_and_places"},european_castle:{keywords:["building","royalty","history"],char:"🏰",fitzpatrick_scale:!1,category:"travel_and_places"},japanese_castle:{keywords:["photo","building"],char:"🏯",fitzpatrick_scale:!1,category:"travel_and_places"},stadium:{keywords:["photo","place","sports","concert","venue"],char:"🏟",fitzpatrick_scale:!1,category:"travel_and_places"},statue_of_liberty:{keywords:["american","newyork"],char:"🗽",fitzpatrick_scale:!1,category:"travel_and_places"},house:{keywords:["building","home"],char:"🏠",fitzpatrick_scale:!1,category:"travel_and_places"},house_with_garden:{keywords:["home","plant","nature"],char:"🏡",fitzpatrick_scale:!1,category:"travel_and_places"},derelict_house:{keywords:["abandon","evict","broken","building"],char:"🏚",fitzpatrick_scale:!1,category:"travel_and_places"},office:{keywords:["building","bureau","work"],char:"🏢",fitzpatrick_scale:!1,category:"travel_and_places"},department_store:{keywords:["building","shopping","mall"],char:"🏬",fitzpatrick_scale:!1,category:"travel_and_places"},post_office:{keywords:["building","envelope","communication"],char:"🏣",fitzpatrick_scale:!1,category:"travel_and_places"},european_post_office:{keywords:["building","email"],char:"🏤",fitzpatrick_scale:!1,category:"travel_and_places"},hospital:{keywords:["building","health","surgery","doctor"],char:"🏥",fitzpatrick_scale:!1,category:"travel_and_places"},bank:{keywords:["building","money","sales","cash","business","enterprise"],char:"🏦",fitzpatrick_scale:!1,category:"travel_and_places"},hotel:{keywords:["building","accomodation","checkin"],char:"🏨",fitzpatrick_scale:!1,category:"travel_and_places"},convenience_store:{keywords:["building","shopping","groceries"],char:"🏪",fitzpatrick_scale:!1,category:"travel_and_places"},school:{keywords:["building","student","education","learn","teach"],char:"🏫",fitzpatrick_scale:!1,category:"travel_and_places"},love_hotel:{keywords:["like","affection","dating"],char:"🏩",fitzpatrick_scale:!1,category:"travel_and_places"},wedding:{keywords:["love","like","affection","couple","marriage","bride","groom"],char:"💒",fitzpatrick_scale:!1,category:"travel_and_places"},classical_building:{keywords:["art","culture","history"],char:"🏛",fitzpatrick_scale:!1,category:"travel_and_places"},church:{keywords:["building","religion","christ"],char:"⛪",fitzpatrick_scale:!1,category:"travel_and_places"},mosque:{keywords:["islam","worship","minaret"],char:"🕌",fitzpatrick_scale:!1,category:"travel_and_places"},synagogue:{keywords:["judaism","worship","temple","jewish"],char:"🕍",fitzpatrick_scale:!1,category:"travel_and_places"},kaaba:{keywords:["mecca","mosque","islam"],char:"🕋",fitzpatrick_scale:!1,category:"travel_and_places"},shinto_shrine:{keywords:["temple","japan","kyoto"],char:"⛩",fitzpatrick_scale:!1,category:"travel_and_places"},watch:{keywords:["time","accessories"],char:"⌚",fitzpatrick_scale:!1,category:"objects"},iphone:{keywords:["technology","apple","gadgets","dial"],char:"📱",fitzpatrick_scale:!1,category:"objects"},calling:{keywords:["iphone","incoming"],char:"📲",fitzpatrick_scale:!1,category:"objects"},computer:{keywords:["technology","laptop","screen","display","monitor"],char:"💻",fitzpatrick_scale:!1,category:"objects"},keyboard:{keywords:["technology","computer","type","input","text"],char:"⌨",fitzpatrick_scale:!1,category:"objects"},desktop_computer:{keywords:["technology","computing","screen"],char:"🖥",fitzpatrick_scale:!1,category:"objects"},printer:{keywords:["paper","ink"],char:"🖨",fitzpatrick_scale:!1,category:"objects"},computer_mouse:{keywords:["click"],char:"🖱",fitzpatrick_scale:!1,category:"objects"},trackball:{keywords:["technology","trackpad"],char:"🖲",fitzpatrick_scale:!1,category:"objects"},joystick:{keywords:["game","play"],char:"🕹",fitzpatrick_scale:!1,category:"objects"},clamp:{keywords:["tool"],char:"🗜",fitzpatrick_scale:!1,category:"objects"},minidisc:{keywords:["technology","record","data","disk","90s"],char:"💽",fitzpatrick_scale:!1,category:"objects"},floppy_disk:{keywords:["oldschool","technology","save","90s","80s"],char:"💾",fitzpatrick_scale:!1,category:"objects"},cd:{keywords:["technology","dvd","disk","disc","90s"],char:"💿",fitzpatrick_scale:!1,category:"objects"},dvd:{keywords:["cd","disk","disc"],char:"📀",fitzpatrick_scale:!1,category:"objects"},vhs:{keywords:["record","video","oldschool","90s","80s"],char:"📼",fitzpatrick_scale:!1,category:"objects"},camera:{keywords:["gadgets","photography"],char:"📷",fitzpatrick_scale:!1,category:"objects"},camera_flash:{keywords:["photography","gadgets"],char:"📸",fitzpatrick_scale:!1,category:"objects"},video_camera:{keywords:["film","record"],char:"📹",fitzpatrick_scale:!1,category:"objects"},movie_camera:{keywords:["film","record"],char:"🎥",fitzpatrick_scale:!1,category:"objects"},film_projector:{keywords:["video","tape","record","movie"],char:"📽",fitzpatrick_scale:!1,category:"objects"},film_strip:{keywords:["movie"],char:"🎞",fitzpatrick_scale:!1,category:"objects"},telephone_receiver:{keywords:["technology","communication","dial"],char:"📞",fitzpatrick_scale:!1,category:"objects"},phone:{keywords:["technology","communication","dial","telephone"],char:"☎️",fitzpatrick_scale:!1,category:"objects"},pager:{keywords:["bbcall","oldschool","90s"],char:"📟",fitzpatrick_scale:!1,category:"objects"},fax:{keywords:["communication","technology"],char:"📠",fitzpatrick_scale:!1,category:"objects"},tv:{keywords:["technology","program","oldschool","show","television"],char:"📺",fitzpatrick_scale:!1,category:"objects"},radio:{keywords:["communication","music","podcast","program"],char:"📻",fitzpatrick_scale:!1,category:"objects"},studio_microphone:{keywords:["sing","recording","artist","talkshow"],char:"🎙",fitzpatrick_scale:!1,category:"objects"},level_slider:{keywords:["scale"],char:"🎚",fitzpatrick_scale:!1,category:"objects"},control_knobs:{keywords:["dial"],char:"🎛",fitzpatrick_scale:!1,category:"objects"},compass:{keywords:["magnetic","navigation","orienteering"],char:"🧭",fitzpatrick_scale:!1,category:"objects"},stopwatch:{keywords:["time","deadline"],char:"⏱",fitzpatrick_scale:!1,category:"objects"},timer_clock:{keywords:["alarm"],char:"⏲",fitzpatrick_scale:!1,category:"objects"},alarm_clock:{keywords:["time","wake"],char:"⏰",fitzpatrick_scale:!1,category:"objects"},mantelpiece_clock:{keywords:["time"],char:"🕰",fitzpatrick_scale:!1,category:"objects"},hourglass_flowing_sand:{keywords:["oldschool","time","countdown"],char:"⏳",fitzpatrick_scale:!1,category:"objects"},hourglass:{keywords:["time","clock","oldschool","limit","exam","quiz","test"],char:"⌛",fitzpatrick_scale:!1,category:"objects"},satellite:{keywords:["communication","future","radio","space"],char:"📡",fitzpatrick_scale:!1,category:"objects"},battery:{keywords:["power","energy","sustain"],char:"🔋",fitzpatrick_scale:!1,category:"objects"},electric_plug:{keywords:["charger","power"],char:"🔌",fitzpatrick_scale:!1,category:"objects"},bulb:{keywords:["light","electricity","idea"],char:"💡",fitzpatrick_scale:!1,category:"objects"},flashlight:{keywords:["dark","camping","sight","night"],char:"🔦",fitzpatrick_scale:!1,category:"objects"},candle:{keywords:["fire","wax"],char:"🕯",fitzpatrick_scale:!1,category:"objects"},fire_extinguisher:{keywords:["quench"],char:"🧯",fitzpatrick_scale:!1,category:"objects"},wastebasket:{keywords:["bin","trash","rubbish","garbage","toss"],char:"🗑",fitzpatrick_scale:!1,category:"objects"},oil_drum:{keywords:["barrell"],char:"🛢",fitzpatrick_scale:!1,category:"objects"},money_with_wings:{keywords:["dollar","bills","payment","sale"],char:"💸",fitzpatrick_scale:!1,category:"objects"},dollar:{keywords:["money","sales","bill","currency"],char:"💵",fitzpatrick_scale:!1,category:"objects"},yen:{keywords:["money","sales","japanese","dollar","currency"],char:"💴",fitzpatrick_scale:!1,category:"objects"},euro:{keywords:["money","sales","dollar","currency"],char:"💶",fitzpatrick_scale:!1,category:"objects"},pound:{keywords:["british","sterling","money","sales","bills","uk","england","currency"],char:"💷",fitzpatrick_scale:!1,category:"objects"},moneybag:{keywords:["dollar","payment","coins","sale"],char:"💰",fitzpatrick_scale:!1,category:"objects"},credit_card:{keywords:["money","sales","dollar","bill","payment","shopping"],char:"💳",fitzpatrick_scale:!1,category:"objects"},gem:{keywords:["blue","ruby","diamond","jewelry"],char:"💎",fitzpatrick_scale:!1,category:"objects"},balance_scale:{keywords:["law","fairness","weight"],char:"⚖",fitzpatrick_scale:!1,category:"objects"},toolbox:{keywords:["tools","diy","fix","maintainer","mechanic"],char:"🧰",fitzpatrick_scale:!1,category:"objects"},wrench:{keywords:["tools","diy","ikea","fix","maintainer"],char:"🔧",fitzpatrick_scale:!1,category:"objects"},hammer:{keywords:["tools","build","create"],char:"🔨",fitzpatrick_scale:!1,category:"objects"},hammer_and_pick:{keywords:["tools","build","create"],char:"⚒",fitzpatrick_scale:!1,category:"objects"},hammer_and_wrench:{keywords:["tools","build","create"],char:"🛠",fitzpatrick_scale:!1,category:"objects"},pick:{keywords:["tools","dig"],char:"⛏",fitzpatrick_scale:!1,category:"objects"},nut_and_bolt:{keywords:["handy","tools","fix"],char:"🔩",fitzpatrick_scale:!1,category:"objects"},gear:{keywords:["cog"],char:"⚙",fitzpatrick_scale:!1,category:"objects"},brick:{keywords:["bricks"],char:"🧱",fitzpatrick_scale:!1,category:"objects"},chains:{keywords:["lock","arrest"],char:"⛓",fitzpatrick_scale:!1,category:"objects"},magnet:{keywords:["attraction","magnetic"],char:"🧲",fitzpatrick_scale:!1,category:"objects"},gun:{keywords:["violence","weapon","pistol","revolver"],char:"🔫",fitzpatrick_scale:!1,category:"objects"},bomb:{keywords:["boom","explode","explosion","terrorism"],char:"💣",fitzpatrick_scale:!1,category:"objects"},firecracker:{keywords:["dynamite","boom","explode","explosion","explosive"],char:"🧨",fitzpatrick_scale:!1,category:"objects"},hocho:{keywords:["knife","blade","cutlery","kitchen","weapon"],char:"🔪",fitzpatrick_scale:!1,category:"objects"},dagger:{keywords:["weapon"],char:"🗡",fitzpatrick_scale:!1,category:"objects"},crossed_swords:{keywords:["weapon"],char:"⚔",fitzpatrick_scale:!1,category:"objects"},shield:{keywords:["protection","security"],char:"🛡",fitzpatrick_scale:!1,category:"objects"},smoking:{keywords:["kills","tobacco","cigarette","joint","smoke"],char:"🚬",fitzpatrick_scale:!1,category:"objects"},skull_and_crossbones:{keywords:["poison","danger","deadly","scary","death","pirate","evil"],char:"☠",fitzpatrick_scale:!1,category:"objects"},coffin:{keywords:["vampire","dead","die","death","rip","graveyard","cemetery","casket","funeral","box"],char:"⚰",fitzpatrick_scale:!1,category:"objects"},funeral_urn:{keywords:["dead","die","death","rip","ashes"],char:"⚱",fitzpatrick_scale:!1,category:"objects"},amphora:{keywords:["vase","jar"],char:"🏺",fitzpatrick_scale:!1,category:"objects"},crystal_ball:{keywords:["disco","party","magic","circus","fortune_teller"],char:"🔮",fitzpatrick_scale:!1,category:"objects"},prayer_beads:{keywords:["dhikr","religious"],char:"📿",fitzpatrick_scale:!1,category:"objects"},nazar_amulet:{keywords:["bead","charm"],char:"🧿",fitzpatrick_scale:!1,category:"objects"},barber:{keywords:["hair","salon","style"],char:"💈",fitzpatrick_scale:!1,category:"objects"},alembic:{keywords:["distilling","science","experiment","chemistry"],char:"⚗",fitzpatrick_scale:!1,category:"objects"},telescope:{keywords:["stars","space","zoom","science","astronomy"],char:"🔭",fitzpatrick_scale:!1,category:"objects"},microscope:{keywords:["laboratory","experiment","zoomin","science","study"],char:"🔬",fitzpatrick_scale:!1,category:"objects"},hole:{keywords:["embarrassing"],char:"🕳",fitzpatrick_scale:!1,category:"objects"},pill:{keywords:["health","medicine","doctor","pharmacy","drug"],char:"💊",fitzpatrick_scale:!1,category:"objects"},syringe:{keywords:["health","hospital","drugs","blood","medicine","needle","doctor","nurse"],char:"💉",fitzpatrick_scale:!1,category:"objects"},dna:{keywords:["biologist","genetics","life"],char:"🧬",fitzpatrick_scale:!1,category:"objects"},microbe:{keywords:["amoeba","bacteria","germs"],char:"🦠",fitzpatrick_scale:!1,category:"objects"},petri_dish:{keywords:["bacteria","biology","culture","lab"],char:"🧫",fitzpatrick_scale:!1,category:"objects"},test_tube:{keywords:["chemistry","experiment","lab","science"],char:"🧪",fitzpatrick_scale:!1,category:"objects"},thermometer:{keywords:["weather","temperature","hot","cold"],char:"🌡",fitzpatrick_scale:!1,category:"objects"},broom:{keywords:["cleaning","sweeping","witch"],char:"🧹",fitzpatrick_scale:!1,category:"objects"},basket:{keywords:["laundry"],char:"🧺",fitzpatrick_scale:!1,category:"objects"},toilet_paper:{keywords:["roll"],char:"🧻",fitzpatrick_scale:!1,category:"objects"},label:{keywords:["sale","tag"],char:"🏷",fitzpatrick_scale:!1,category:"objects"},bookmark:{keywords:["favorite","label","save"],char:"🔖",fitzpatrick_scale:!1,category:"objects"},toilet:{keywords:["restroom","wc","washroom","bathroom","potty"],char:"🚽",fitzpatrick_scale:!1,category:"objects"},shower:{keywords:["clean","water","bathroom"],char:"🚿",fitzpatrick_scale:!1,category:"objects"},bathtub:{keywords:["clean","shower","bathroom"],char:"🛁",fitzpatrick_scale:!1,category:"objects"},soap:{keywords:["bar","bathing","cleaning","lather"],char:"🧼",fitzpatrick_scale:!1,category:"objects"},sponge:{keywords:["absorbing","cleaning","porous"],char:"🧽",fitzpatrick_scale:!1,category:"objects"},lotion_bottle:{keywords:["moisturizer","sunscreen"],char:"🧴",fitzpatrick_scale:!1,category:"objects"},key:{keywords:["lock","door","password"],char:"🔑",fitzpatrick_scale:!1,category:"objects"},old_key:{keywords:["lock","door","password"],char:"🗝",fitzpatrick_scale:!1,category:"objects"},couch_and_lamp:{keywords:["read","chill"],char:"🛋",fitzpatrick_scale:!1,category:"objects"},sleeping_bed:{keywords:["bed","rest"],char:"🛌",fitzpatrick_scale:!0,category:"objects"},bed:{keywords:["sleep","rest"],char:"🛏",fitzpatrick_scale:!1,category:"objects"},door:{keywords:["house","entry","exit"],char:"🚪",fitzpatrick_scale:!1,category:"objects"},bellhop_bell:{keywords:["service"],char:"🛎",fitzpatrick_scale:!1,category:"objects"},teddy_bear:{keywords:["plush","stuffed"],char:"🧸",fitzpatrick_scale:!1,category:"objects"},framed_picture:{keywords:["photography"],char:"🖼",fitzpatrick_scale:!1,category:"objects"},world_map:{keywords:["location","direction"],char:"🗺",fitzpatrick_scale:!1,category:"objects"},parasol_on_ground:{keywords:["weather","summer"],char:"⛱",fitzpatrick_scale:!1,category:"objects"},moyai:{keywords:["rock","easter island","moai"],char:"🗿",fitzpatrick_scale:!1,category:"objects"},shopping:{keywords:["mall","buy","purchase"],char:"🛍",fitzpatrick_scale:!1,category:"objects"},shopping_cart:{keywords:["trolley"],char:"🛒",fitzpatrick_scale:!1,category:"objects"},balloon:{keywords:["party","celebration","birthday","circus"],char:"🎈",fitzpatrick_scale:!1,category:"objects"},flags:{keywords:["fish","japanese","koinobori","carp","banner"],char:"🎏",fitzpatrick_scale:!1,category:"objects"},ribbon:{keywords:["decoration","pink","girl","bowtie"],char:"🎀",fitzpatrick_scale:!1,category:"objects"},gift:{keywords:["present","birthday","christmas","xmas"],char:"🎁",fitzpatrick_scale:!1,category:"objects"},confetti_ball:{keywords:["festival","party","birthday","circus"],char:"🎊",fitzpatrick_scale:!1,category:"objects"},tada:{keywords:["party","congratulations","birthday","magic","circus","celebration"],char:"🎉",fitzpatrick_scale:!1,category:"objects"},dolls:{keywords:["japanese","toy","kimono"],char:"🎎",fitzpatrick_scale:!1,category:"objects"},wind_chime:{keywords:["nature","ding","spring","bell"],char:"🎐",fitzpatrick_scale:!1,category:"objects"},crossed_flags:{keywords:["japanese","nation","country","border"],char:"🎌",fitzpatrick_scale:!1,category:"objects"},izakaya_lantern:{keywords:["light","paper","halloween","spooky"],char:"🏮",fitzpatrick_scale:!1,category:"objects"},red_envelope:{keywords:["gift"],char:"🧧",fitzpatrick_scale:!1,category:"objects"},email:{keywords:["letter","postal","inbox","communication"],char:"✉️",fitzpatrick_scale:!1,category:"objects"},envelope_with_arrow:{keywords:["email","communication"],char:"📩",fitzpatrick_scale:!1,category:"objects"},incoming_envelope:{keywords:["email","inbox"],char:"📨",fitzpatrick_scale:!1,category:"objects"},"e-mail":{keywords:["communication","inbox"],char:"📧",fitzpatrick_scale:!1,category:"objects"},love_letter:{keywords:["email","like","affection","envelope","valentines"],char:"💌",fitzpatrick_scale:!1,category:"objects"},postbox:{keywords:["email","letter","envelope"],char:"📮",fitzpatrick_scale:!1,category:"objects"},mailbox_closed:{keywords:["email","communication","inbox"],char:"📪",fitzpatrick_scale:!1,category:"objects"},mailbox:{keywords:["email","inbox","communication"],char:"📫",fitzpatrick_scale:!1,category:"objects"},mailbox_with_mail:{keywords:["email","inbox","communication"],char:"📬",fitzpatrick_scale:!1,category:"objects"},mailbox_with_no_mail:{keywords:["email","inbox"],char:"📭",fitzpatrick_scale:!1,category:"objects"},package:{keywords:["mail","gift","cardboard","box","moving"],char:"📦",fitzpatrick_scale:!1,category:"objects"},postal_horn:{keywords:["instrument","music"],char:"📯",fitzpatrick_scale:!1,category:"objects"},inbox_tray:{keywords:["email","documents"],char:"📥",fitzpatrick_scale:!1,category:"objects"},outbox_tray:{keywords:["inbox","email"],char:"📤",fitzpatrick_scale:!1,category:"objects"},scroll:{keywords:["documents","ancient","history","paper"],char:"📜",fitzpatrick_scale:!1,category:"objects"},page_with_curl:{keywords:["documents","office","paper"],char:"📃",fitzpatrick_scale:!1,category:"objects"},bookmark_tabs:{keywords:["favorite","save","order","tidy"],char:"📑",fitzpatrick_scale:!1,category:"objects"},receipt:{keywords:["accounting","expenses"],char:"🧾",fitzpatrick_scale:!1,category:"objects"},bar_chart:{keywords:["graph","presentation","stats"],char:"📊",fitzpatrick_scale:!1,category:"objects"},chart_with_upwards_trend:{keywords:["graph","presentation","stats","recovery","business","economics","money","sales","good","success"],char:"📈",fitzpatrick_scale:!1,category:"objects"},chart_with_downwards_trend:{keywords:["graph","presentation","stats","recession","business","economics","money","sales","bad","failure"],char:"📉",fitzpatrick_scale:!1,category:"objects"},page_facing_up:{keywords:["documents","office","paper","information"],char:"📄",fitzpatrick_scale:!1,category:"objects"},date:{keywords:["calendar","schedule"],char:"📅",fitzpatrick_scale:!1,category:"objects"},calendar:{keywords:["schedule","date","planning"],char:"📆",fitzpatrick_scale:!1,category:"objects"},spiral_calendar:{keywords:["date","schedule","planning"],char:"🗓",fitzpatrick_scale:!1,category:"objects"},card_index:{keywords:["business","stationery"],char:"📇",fitzpatrick_scale:!1,category:"objects"},card_file_box:{keywords:["business","stationery"],char:"🗃",fitzpatrick_scale:!1,category:"objects"},ballot_box:{keywords:["election","vote"],char:"🗳",fitzpatrick_scale:!1,category:"objects"},file_cabinet:{keywords:["filing","organizing"],char:"🗄",fitzpatrick_scale:!1,category:"objects"},clipboard:{keywords:["stationery","documents"],char:"📋",fitzpatrick_scale:!1,category:"objects"},spiral_notepad:{keywords:["memo","stationery"],char:"🗒",fitzpatrick_scale:!1,category:"objects"},file_folder:{keywords:["documents","business","office"],char:"📁",fitzpatrick_scale:!1,category:"objects"},open_file_folder:{keywords:["documents","load"],char:"📂",fitzpatrick_scale:!1,category:"objects"},card_index_dividers:{keywords:["organizing","business","stationery"],char:"🗂",fitzpatrick_scale:!1,category:"objects"},newspaper_roll:{keywords:["press","headline"],char:"🗞",fitzpatrick_scale:!1,category:"objects"},newspaper:{keywords:["press","headline"],char:"📰",fitzpatrick_scale:!1,category:"objects"},notebook:{keywords:["stationery","record","notes","paper","study"],char:"📓",fitzpatrick_scale:!1,category:"objects"},closed_book:{keywords:["read","library","knowledge","textbook","learn"],char:"📕",fitzpatrick_scale:!1,category:"objects"},green_book:{keywords:["read","library","knowledge","study"],char:"📗",fitzpatrick_scale:!1,category:"objects"},blue_book:{keywords:["read","library","knowledge","learn","study"],char:"📘",fitzpatrick_scale:!1,category:"objects"},orange_book:{keywords:["read","library","knowledge","textbook","study"],char:"📙",fitzpatrick_scale:!1,category:"objects"},notebook_with_decorative_cover:{keywords:["classroom","notes","record","paper","study"],char:"📔",fitzpatrick_scale:!1,category:"objects"},ledger:{keywords:["notes","paper"],char:"📒",fitzpatrick_scale:!1,category:"objects"},books:{keywords:["literature","library","study"],char:"📚",fitzpatrick_scale:!1,category:"objects"},open_book:{keywords:["book","read","library","knowledge","literature","learn","study"],char:"📖",fitzpatrick_scale:!1,category:"objects"},safety_pin:{keywords:["diaper"],char:"🧷",fitzpatrick_scale:!1,category:"objects"},link:{keywords:["rings","url"],char:"🔗",fitzpatrick_scale:!1,category:"objects"},paperclip:{keywords:["documents","stationery"],char:"📎",fitzpatrick_scale:!1,category:"objects"},paperclips:{keywords:["documents","stationery"],char:"🖇",fitzpatrick_scale:!1,category:"objects"},scissors:{keywords:["stationery","cut"],char:"✂️",fitzpatrick_scale:!1,category:"objects"},triangular_ruler:{keywords:["stationery","math","architect","sketch"],char:"📐",fitzpatrick_scale:!1,category:"objects"},straight_ruler:{keywords:["stationery","calculate","length","math","school","drawing","architect","sketch"],char:"📏",fitzpatrick_scale:!1,category:"objects"},abacus:{keywords:["calculation"],char:"🧮",fitzpatrick_scale:!1,category:"objects"},pushpin:{keywords:["stationery","mark","here"],char:"📌",fitzpatrick_scale:!1,category:"objects"},round_pushpin:{keywords:["stationery","location","map","here"],char:"📍",fitzpatrick_scale:!1,category:"objects"},triangular_flag_on_post:{keywords:["mark","milestone","place"],char:"🚩",fitzpatrick_scale:!1,category:"objects"},white_flag:{keywords:["losing","loser","lost","surrender","give up","fail"],char:"🏳",fitzpatrick_scale:!1,category:"objects"},black_flag:{keywords:["pirate"],char:"🏴",fitzpatrick_scale:!1,category:"objects"},rainbow_flag:{keywords:["flag","rainbow","pride","gay","lgbt","glbt","queer","homosexual","lesbian","bisexual","transgender"],char:"🏳️‍🌈",fitzpatrick_scale:!1,category:"objects"},closed_lock_with_key:{keywords:["security","privacy"],char:"🔐",fitzpatrick_scale:!1,category:"objects"},lock:{keywords:["security","password","padlock"],char:"🔒",fitzpatrick_scale:!1,category:"objects"},unlock:{keywords:["privacy","security"],char:"🔓",fitzpatrick_scale:!1,category:"objects"},lock_with_ink_pen:{keywords:["security","secret"],char:"🔏",fitzpatrick_scale:!1,category:"objects"},pen:{keywords:["stationery","writing","write"],char:"🖊",fitzpatrick_scale:!1,category:"objects"},fountain_pen:{keywords:["stationery","writing","write"],char:"🖋",fitzpatrick_scale:!1,category:"objects"},black_nib:{keywords:["pen","stationery","writing","write"],char:"✒️",fitzpatrick_scale:!1,category:"objects"},memo:{keywords:["write","documents","stationery","pencil","paper","writing","legal","exam","quiz","test","study","compose"],char:"📝",fitzpatrick_scale:!1,category:"objects"},pencil2:{keywords:["stationery","write","paper","writing","school","study"],char:"✏️",fitzpatrick_scale:!1,category:"objects"},crayon:{keywords:["drawing","creativity"],char:"🖍",fitzpatrick_scale:!1,category:"objects"},paintbrush:{keywords:["drawing","creativity","art"],char:"🖌",fitzpatrick_scale:!1,category:"objects"},mag:{keywords:["search","zoom","find","detective"],char:"🔍",fitzpatrick_scale:!1,category:"objects"},mag_right:{keywords:["search","zoom","find","detective"],char:"🔎",fitzpatrick_scale:!1,category:"objects"},heart:{keywords:["love","like","valentines"],char:"❤️",fitzpatrick_scale:!1,category:"symbols"},orange_heart:{keywords:["love","like","affection","valentines"],char:"🧡",fitzpatrick_scale:!1,category:"symbols"},yellow_heart:{keywords:["love","like","affection","valentines"],char:"💛",fitzpatrick_scale:!1,category:"symbols"},green_heart:{keywords:["love","like","affection","valentines"],char:"💚",fitzpatrick_scale:!1,category:"symbols"},blue_heart:{keywords:["love","like","affection","valentines"],char:"💙",fitzpatrick_scale:!1,category:"symbols"},purple_heart:{keywords:["love","like","affection","valentines"],char:"💜",fitzpatrick_scale:!1,category:"symbols"},black_heart:{keywords:["evil"],char:"🖤",fitzpatrick_scale:!1,category:"symbols"},broken_heart:{keywords:["sad","sorry","break","heart","heartbreak"],char:"💔",fitzpatrick_scale:!1,category:"symbols"},heavy_heart_exclamation:{keywords:["decoration","love"],char:"❣",fitzpatrick_scale:!1,category:"symbols"},two_hearts:{keywords:["love","like","affection","valentines","heart"],char:"💕",fitzpatrick_scale:!1,category:"symbols"},revolving_hearts:{keywords:["love","like","affection","valentines"],char:"💞",fitzpatrick_scale:!1,category:"symbols"},heartbeat:{keywords:["love","like","affection","valentines","pink","heart"],char:"💓",fitzpatrick_scale:!1,category:"symbols"},heartpulse:{keywords:["like","love","affection","valentines","pink"],char:"💗",fitzpatrick_scale:!1,category:"symbols"},sparkling_heart:{keywords:["love","like","affection","valentines"],char:"💖",fitzpatrick_scale:!1,category:"symbols"},cupid:{keywords:["love","like","heart","affection","valentines"],char:"💘",fitzpatrick_scale:!1,category:"symbols"},gift_heart:{keywords:["love","valentines"],char:"💝",fitzpatrick_scale:!1,category:"symbols"},heart_decoration:{keywords:["purple-square","love","like"],char:"💟",fitzpatrick_scale:!1,category:"symbols"},peace_symbol:{keywords:["hippie"],char:"☮",fitzpatrick_scale:!1,category:"symbols"},latin_cross:{keywords:["christianity"],char:"✝",fitzpatrick_scale:!1,category:"symbols"},star_and_crescent:{keywords:["islam"],char:"☪",fitzpatrick_scale:!1,category:"symbols"},om:{keywords:["hinduism","buddhism","sikhism","jainism"],char:"🕉",fitzpatrick_scale:!1,category:"symbols"},wheel_of_dharma:{keywords:["hinduism","buddhism","sikhism","jainism"],char:"☸",fitzpatrick_scale:!1,category:"symbols"},star_of_david:{keywords:["judaism"],char:"✡",fitzpatrick_scale:!1,category:"symbols"},six_pointed_star:{keywords:["purple-square","religion","jewish","hexagram"],char:"🔯",fitzpatrick_scale:!1,category:"symbols"},menorah:{keywords:["hanukkah","candles","jewish"],char:"🕎",fitzpatrick_scale:!1,category:"symbols"},yin_yang:{keywords:["balance"],char:"☯",fitzpatrick_scale:!1,category:"symbols"},orthodox_cross:{keywords:["suppedaneum","religion"],char:"☦",fitzpatrick_scale:!1,category:"symbols"},place_of_worship:{keywords:["religion","church","temple","prayer"],char:"🛐",fitzpatrick_scale:!1,category:"symbols"},ophiuchus:{keywords:["sign","purple-square","constellation","astrology"],char:"⛎",fitzpatrick_scale:!1,category:"symbols"},aries:{keywords:["sign","purple-square","zodiac","astrology"],char:"♈",fitzpatrick_scale:!1,category:"symbols"},taurus:{keywords:["purple-square","sign","zodiac","astrology"],char:"♉",fitzpatrick_scale:!1,category:"symbols"},gemini:{keywords:["sign","zodiac","purple-square","astrology"],char:"♊",fitzpatrick_scale:!1,category:"symbols"},cancer:{keywords:["sign","zodiac","purple-square","astrology"],char:"♋",fitzpatrick_scale:!1,category:"symbols"},leo:{keywords:["sign","purple-square","zodiac","astrology"],char:"♌",fitzpatrick_scale:!1,category:"symbols"},virgo:{keywords:["sign","zodiac","purple-square","astrology"],char:"♍",fitzpatrick_scale:!1,category:"symbols"},libra:{keywords:["sign","purple-square","zodiac","astrology"],char:"♎",fitzpatrick_scale:!1,category:"symbols"},scorpius:{keywords:["sign","zodiac","purple-square","astrology","scorpio"],char:"♏",fitzpatrick_scale:!1,category:"symbols"},sagittarius:{keywords:["sign","zodiac","purple-square","astrology"],char:"♐",fitzpatrick_scale:!1,category:"symbols"},capricorn:{keywords:["sign","zodiac","purple-square","astrology"],char:"♑",fitzpatrick_scale:!1,category:"symbols"},aquarius:{keywords:["sign","purple-square","zodiac","astrology"],char:"♒",fitzpatrick_scale:!1,category:"symbols"},pisces:{keywords:["purple-square","sign","zodiac","astrology"],char:"♓",fitzpatrick_scale:!1,category:"symbols"},id:{keywords:["purple-square","words"],char:"🆔",fitzpatrick_scale:!1,category:"symbols"},atom_symbol:{keywords:["science","physics","chemistry"],char:"⚛",fitzpatrick_scale:!1,category:"symbols"},u7a7a:{keywords:["kanji","japanese","chinese","empty","sky","blue-square"],char:"🈳",fitzpatrick_scale:!1,category:"symbols"},u5272:{keywords:["cut","divide","chinese","kanji","pink-square"],char:"🈹",fitzpatrick_scale:!1,category:"symbols"},radioactive:{keywords:["nuclear","danger"],char:"☢",fitzpatrick_scale:!1,category:"symbols"},biohazard:{keywords:["danger"],char:"☣",fitzpatrick_scale:!1,category:"symbols"},mobile_phone_off:{keywords:["mute","orange-square","silence","quiet"],char:"📴",fitzpatrick_scale:!1,category:"symbols"},vibration_mode:{keywords:["orange-square","phone"],char:"📳",fitzpatrick_scale:!1,category:"symbols"},u6709:{keywords:["orange-square","chinese","have","kanji"],char:"🈶",fitzpatrick_scale:!1,category:"symbols"},u7121:{keywords:["nothing","chinese","kanji","japanese","orange-square"],char:"🈚",fitzpatrick_scale:!1,category:"symbols"},u7533:{keywords:["chinese","japanese","kanji","orange-square"],char:"🈸",fitzpatrick_scale:!1,category:"symbols"},u55b6:{keywords:["japanese","opening hours","orange-square"],char:"🈺",fitzpatrick_scale:!1,category:"symbols"},u6708:{keywords:["chinese","month","moon","japanese","orange-square","kanji"],char:"🈷️",fitzpatrick_scale:!1,category:"symbols"},eight_pointed_black_star:{keywords:["orange-square","shape","polygon"],char:"✴️",fitzpatrick_scale:!1,category:"symbols"},vs:{keywords:["words","orange-square"],char:"🆚",fitzpatrick_scale:!1,category:"symbols"},accept:{keywords:["ok","good","chinese","kanji","agree","yes","orange-circle"],char:"🉑",fitzpatrick_scale:!1,category:"symbols"},white_flower:{keywords:["japanese","spring"],char:"💮",fitzpatrick_scale:!1,category:"symbols"},ideograph_advantage:{keywords:["chinese","kanji","obtain","get","circle"],char:"🉐",fitzpatrick_scale:!1,category:"symbols"},secret:{keywords:["privacy","chinese","sshh","kanji","red-circle"],char:"㊙️",fitzpatrick_scale:!1,category:"symbols"},congratulations:{keywords:["chinese","kanji","japanese","red-circle"],char:"㊗️",fitzpatrick_scale:!1,category:"symbols"},u5408:{keywords:["japanese","chinese","join","kanji","red-square"],char:"🈴",fitzpatrick_scale:!1,category:"symbols"},u6e80:{keywords:["full","chinese","japanese","red-square","kanji"],char:"🈵",fitzpatrick_scale:!1,category:"symbols"},u7981:{keywords:["kanji","japanese","chinese","forbidden","limit","restricted","red-square"],char:"🈲",fitzpatrick_scale:!1,category:"symbols"},a:{keywords:["red-square","alphabet","letter"],char:"🅰️",fitzpatrick_scale:!1,category:"symbols"},b:{keywords:["red-square","alphabet","letter"],char:"🅱️",fitzpatrick_scale:!1,category:"symbols"},ab:{keywords:["red-square","alphabet"],char:"🆎",fitzpatrick_scale:!1,category:"symbols"},cl:{keywords:["alphabet","words","red-square"],char:"🆑",fitzpatrick_scale:!1,category:"symbols"},o2:{keywords:["alphabet","red-square","letter"],char:"🅾️",fitzpatrick_scale:!1,category:"symbols"},sos:{keywords:["help","red-square","words","emergency","911"],char:"🆘",fitzpatrick_scale:!1,category:"symbols"},no_entry:{keywords:["limit","security","privacy","bad","denied","stop","circle"],char:"⛔",fitzpatrick_scale:!1,category:"symbols"},name_badge:{keywords:["fire","forbid"],char:"📛",fitzpatrick_scale:!1,category:"symbols"},no_entry_sign:{keywords:["forbid","stop","limit","denied","disallow","circle"],char:"🚫",fitzpatrick_scale:!1,category:"symbols"},x:{keywords:["no","delete","remove","cancel","red"],char:"❌",fitzpatrick_scale:!1,category:"symbols"},o:{keywords:["circle","round"],char:"⭕",fitzpatrick_scale:!1,category:"symbols"},stop_sign:{keywords:["stop"],char:"🛑",fitzpatrick_scale:!1,category:"symbols"},anger:{keywords:["angry","mad"],char:"💢",fitzpatrick_scale:!1,category:"symbols"},hotsprings:{keywords:["bath","warm","relax"],char:"♨️",fitzpatrick_scale:!1,category:"symbols"},no_pedestrians:{keywords:["rules","crossing","walking","circle"],char:"🚷",fitzpatrick_scale:!1,category:"symbols"},do_not_litter:{keywords:["trash","bin","garbage","circle"],char:"🚯",fitzpatrick_scale:!1,category:"symbols"},no_bicycles:{keywords:["cyclist","prohibited","circle"],char:"🚳",fitzpatrick_scale:!1,category:"symbols"},"non-potable_water":{keywords:["drink","faucet","tap","circle"],char:"🚱",fitzpatrick_scale:!1,category:"symbols"},underage:{keywords:["18","drink","pub","night","minor","circle"],char:"🔞",fitzpatrick_scale:!1,category:"symbols"},no_mobile_phones:{keywords:["iphone","mute","circle"],char:"📵",fitzpatrick_scale:!1,category:"symbols"},exclamation:{keywords:["heavy_exclamation_mark","danger","surprise","punctuation","wow","warning"],char:"❗",fitzpatrick_scale:!1,category:"symbols"},grey_exclamation:{keywords:["surprise","punctuation","gray","wow","warning"],char:"❕",fitzpatrick_scale:!1,category:"symbols"},question:{keywords:["doubt","confused"],char:"❓",fitzpatrick_scale:!1,category:"symbols"},grey_question:{keywords:["doubts","gray","huh","confused"],char:"❔",fitzpatrick_scale:!1,category:"symbols"},bangbang:{keywords:["exclamation","surprise"],char:"‼️",fitzpatrick_scale:!1,category:"symbols"},interrobang:{keywords:["wat","punctuation","surprise"],char:"⁉️",fitzpatrick_scale:!1,category:"symbols"},100:{keywords:["score","perfect","numbers","century","exam","quiz","test","pass","hundred"],char:"💯",fitzpatrick_scale:!1,category:"symbols"},low_brightness:{keywords:["sun","afternoon","warm","summer"],char:"🔅",fitzpatrick_scale:!1,category:"symbols"},high_brightness:{keywords:["sun","light"],char:"🔆",fitzpatrick_scale:!1,category:"symbols"},trident:{keywords:["weapon","spear"],char:"🔱",fitzpatrick_scale:!1,category:"symbols"},fleur_de_lis:{keywords:["decorative","scout"],char:"⚜",fitzpatrick_scale:!1,category:"symbols"},part_alternation_mark:{keywords:["graph","presentation","stats","business","economics","bad"],char:"〽️",fitzpatrick_scale:!1,category:"symbols"},warning:{keywords:["exclamation","wip","alert","error","problem","issue"],char:"⚠️",fitzpatrick_scale:!1,category:"symbols"},children_crossing:{keywords:["school","warning","danger","sign","driving","yellow-diamond"],char:"🚸",fitzpatrick_scale:!1,category:"symbols"},beginner:{keywords:["badge","shield"],char:"🔰",fitzpatrick_scale:!1,category:"symbols"},recycle:{keywords:["arrow","environment","garbage","trash"],char:"♻️",fitzpatrick_scale:!1,category:"symbols"},u6307:{keywords:["chinese","point","green-square","kanji"],char:"🈯",fitzpatrick_scale:!1,category:"symbols"},chart:{keywords:["green-square","graph","presentation","stats"],char:"💹",fitzpatrick_scale:!1,category:"symbols"},sparkle:{keywords:["stars","green-square","awesome","good","fireworks"],char:"❇️",fitzpatrick_scale:!1,category:"symbols"},eight_spoked_asterisk:{keywords:["star","sparkle","green-square"],char:"✳️",fitzpatrick_scale:!1,category:"symbols"},negative_squared_cross_mark:{keywords:["x","green-square","no","deny"],char:"❎",fitzpatrick_scale:!1,category:"symbols"},white_check_mark:{keywords:["green-square","ok","agree","vote","election","answer","tick"],char:"✅",fitzpatrick_scale:!1,category:"symbols"},diamond_shape_with_a_dot_inside:{keywords:["jewel","blue","gem","crystal","fancy"],char:"💠",fitzpatrick_scale:!1,category:"symbols"},cyclone:{keywords:["weather","swirl","blue","cloud","vortex","spiral","whirlpool","spin","tornado","hurricane","typhoon"],char:"🌀",fitzpatrick_scale:!1,category:"symbols"},loop:{keywords:["tape","cassette"],char:"➿",fitzpatrick_scale:!1,category:"symbols"},globe_with_meridians:{keywords:["earth","international","world","internet","interweb","i18n"],char:"🌐",fitzpatrick_scale:!1,category:"symbols"},m:{keywords:["alphabet","blue-circle","letter"],char:"Ⓜ️",fitzpatrick_scale:!1,category:"symbols"},atm:{keywords:["money","sales","cash","blue-square","payment","bank"],char:"🏧",fitzpatrick_scale:!1,category:"symbols"},sa:{keywords:["japanese","blue-square","katakana"],char:"🈂️",fitzpatrick_scale:!1,category:"symbols"},passport_control:{keywords:["custom","blue-square"],char:"🛂",fitzpatrick_scale:!1,category:"symbols"},customs:{keywords:["passport","border","blue-square"],char:"🛃",fitzpatrick_scale:!1,category:"symbols"},baggage_claim:{keywords:["blue-square","airport","transport"],char:"🛄",fitzpatrick_scale:!1,category:"symbols"},left_luggage:{keywords:["blue-square","travel"],char:"🛅",fitzpatrick_scale:!1,category:"symbols"},wheelchair:{keywords:["blue-square","disabled","a11y","accessibility"],char:"♿",fitzpatrick_scale:!1,category:"symbols"},no_smoking:{keywords:["cigarette","blue-square","smell","smoke"],char:"🚭",fitzpatrick_scale:!1,category:"symbols"},wc:{keywords:["toilet","restroom","blue-square"],char:"🚾",fitzpatrick_scale:!1,category:"symbols"},parking:{keywords:["cars","blue-square","alphabet","letter"],char:"🅿️",fitzpatrick_scale:!1,category:"symbols"},potable_water:{keywords:["blue-square","liquid","restroom","cleaning","faucet"],char:"🚰",fitzpatrick_scale:!1,category:"symbols"},mens:{keywords:["toilet","restroom","wc","blue-square","gender","male"],char:"🚹",fitzpatrick_scale:!1,category:"symbols"},womens:{keywords:["purple-square","woman","female","toilet","loo","restroom","gender"],char:"🚺",fitzpatrick_scale:!1,category:"symbols"},baby_symbol:{keywords:["orange-square","child"],char:"🚼",fitzpatrick_scale:!1,category:"symbols"},restroom:{keywords:["blue-square","toilet","refresh","wc","gender"],char:"🚻",fitzpatrick_scale:!1,category:"symbols"},put_litter_in_its_place:{keywords:["blue-square","sign","human","info"],char:"🚮",fitzpatrick_scale:!1,category:"symbols"},cinema:{keywords:["blue-square","record","film","movie","curtain","stage","theater"],char:"🎦",fitzpatrick_scale:!1,category:"symbols"},signal_strength:{keywords:["blue-square","reception","phone","internet","connection","wifi","bluetooth","bars"],char:"📶",fitzpatrick_scale:!1,category:"symbols"},koko:{keywords:["blue-square","here","katakana","japanese","destination"],char:"🈁",fitzpatrick_scale:!1,category:"symbols"},ng:{keywords:["blue-square","words","shape","icon"],char:"🆖",fitzpatrick_scale:!1,category:"symbols"},ok:{keywords:["good","agree","yes","blue-square"],char:"🆗",fitzpatrick_scale:!1,category:"symbols"},up:{keywords:["blue-square","above","high"],char:"🆙",fitzpatrick_scale:!1,category:"symbols"},cool:{keywords:["words","blue-square"],char:"🆒",fitzpatrick_scale:!1,category:"symbols"},new:{keywords:["blue-square","words","start"],char:"🆕",fitzpatrick_scale:!1,category:"symbols"},free:{keywords:["blue-square","words"],char:"🆓",fitzpatrick_scale:!1,category:"symbols"},zero:{keywords:["0","numbers","blue-square","null"],char:"0️⃣",fitzpatrick_scale:!1,category:"symbols"},one:{keywords:["blue-square","numbers","1"],char:"1️⃣",fitzpatrick_scale:!1,category:"symbols"},two:{keywords:["numbers","2","prime","blue-square"],char:"2️⃣",fitzpatrick_scale:!1,category:"symbols"},three:{keywords:["3","numbers","prime","blue-square"],char:"3️⃣",fitzpatrick_scale:!1,category:"symbols"},four:{keywords:["4","numbers","blue-square"],char:"4️⃣",fitzpatrick_scale:!1,category:"symbols"},five:{keywords:["5","numbers","blue-square","prime"],char:"5️⃣",fitzpatrick_scale:!1,category:"symbols"},six:{keywords:["6","numbers","blue-square"],char:"6️⃣",fitzpatrick_scale:!1,category:"symbols"},seven:{keywords:["7","numbers","blue-square","prime"],char:"7️⃣",fitzpatrick_scale:!1,category:"symbols"},eight:{keywords:["8","blue-square","numbers"],char:"8️⃣",fitzpatrick_scale:!1,category:"symbols"},nine:{keywords:["blue-square","numbers","9"],char:"9️⃣",fitzpatrick_scale:!1,category:"symbols"},keycap_ten:{keywords:["numbers","10","blue-square"],char:"🔟",fitzpatrick_scale:!1,category:"symbols"},asterisk:{keywords:["star","keycap"],char:"*⃣",fitzpatrick_scale:!1,category:"symbols"},1234:{keywords:["numbers","blue-square"],char:"🔢",fitzpatrick_scale:!1,category:"symbols"},eject_button:{keywords:["blue-square"],char:"⏏️",fitzpatrick_scale:!1,category:"symbols"},arrow_forward:{keywords:["blue-square","right","direction","play"],char:"▶️",fitzpatrick_scale:!1,category:"symbols"},pause_button:{keywords:["pause","blue-square"],char:"⏸",fitzpatrick_scale:!1,category:"symbols"},next_track_button:{keywords:["forward","next","blue-square"],char:"⏭",fitzpatrick_scale:!1,category:"symbols"},stop_button:{keywords:["blue-square"],char:"⏹",fitzpatrick_scale:!1,category:"symbols"},record_button:{keywords:["blue-square"],char:"⏺",fitzpatrick_scale:!1,category:"symbols"},play_or_pause_button:{keywords:["blue-square","play","pause"],char:"⏯",fitzpatrick_scale:!1,category:"symbols"},previous_track_button:{keywords:["backward"],char:"⏮",fitzpatrick_scale:!1,category:"symbols"},fast_forward:{keywords:["blue-square","play","speed","continue"],char:"⏩",fitzpatrick_scale:!1,category:"symbols"},rewind:{keywords:["play","blue-square"],char:"⏪",fitzpatrick_scale:!1,category:"symbols"},twisted_rightwards_arrows:{keywords:["blue-square","shuffle","music","random"],char:"🔀",fitzpatrick_scale:!1,category:"symbols"},repeat:{keywords:["loop","record"],char:"🔁",fitzpatrick_scale:!1,category:"symbols"},repeat_one:{keywords:["blue-square","loop"],char:"🔂",fitzpatrick_scale:!1,category:"symbols"},arrow_backward:{keywords:["blue-square","left","direction"],char:"◀️",fitzpatrick_scale:!1,category:"symbols"},arrow_up_small:{keywords:["blue-square","triangle","direction","point","forward","top"],char:"🔼",fitzpatrick_scale:!1,category:"symbols"},arrow_down_small:{keywords:["blue-square","direction","bottom"],char:"🔽",fitzpatrick_scale:!1,category:"symbols"},arrow_double_up:{keywords:["blue-square","direction","top"],char:"⏫",fitzpatrick_scale:!1,category:"symbols"},arrow_double_down:{keywords:["blue-square","direction","bottom"],char:"⏬",fitzpatrick_scale:!1,category:"symbols"},arrow_right:{keywords:["blue-square","next"],char:"➡️",fitzpatrick_scale:!1,category:"symbols"},arrow_left:{keywords:["blue-square","previous","back"],char:"⬅️",fitzpatrick_scale:!1,category:"symbols"},arrow_up:{keywords:["blue-square","continue","top","direction"],char:"⬆️",fitzpatrick_scale:!1,category:"symbols"},arrow_down:{keywords:["blue-square","direction","bottom"],char:"⬇️",fitzpatrick_scale:!1,category:"symbols"},arrow_upper_right:{keywords:["blue-square","point","direction","diagonal","northeast"],char:"↗️",fitzpatrick_scale:!1,category:"symbols"},arrow_lower_right:{keywords:["blue-square","direction","diagonal","southeast"],char:"↘️",fitzpatrick_scale:!1,category:"symbols"},arrow_lower_left:{keywords:["blue-square","direction","diagonal","southwest"],char:"↙️",fitzpatrick_scale:!1,category:"symbols"},arrow_upper_left:{keywords:["blue-square","point","direction","diagonal","northwest"],char:"↖️",fitzpatrick_scale:!1,category:"symbols"},arrow_up_down:{keywords:["blue-square","direction","way","vertical"],char:"↕️",fitzpatrick_scale:!1,category:"symbols"},left_right_arrow:{keywords:["shape","direction","horizontal","sideways"],char:"↔️",fitzpatrick_scale:!1,category:"symbols"},arrows_counterclockwise:{keywords:["blue-square","sync","cycle"],char:"🔄",fitzpatrick_scale:!1,category:"symbols"},arrow_right_hook:{keywords:["blue-square","return","rotate","direction"],char:"↪️",fitzpatrick_scale:!1,category:"symbols"},leftwards_arrow_with_hook:{keywords:["back","return","blue-square","undo","enter"],char:"↩️",fitzpatrick_scale:!1,category:"symbols"},arrow_heading_up:{keywords:["blue-square","direction","top"],char:"⤴️",fitzpatrick_scale:!1,category:"symbols"},arrow_heading_down:{keywords:["blue-square","direction","bottom"],char:"⤵️",fitzpatrick_scale:!1,category:"symbols"},hash:{keywords:["symbol","blue-square","twitter"],char:"#️⃣",fitzpatrick_scale:!1,category:"symbols"},information_source:{keywords:["blue-square","alphabet","letter"],char:"ℹ️",fitzpatrick_scale:!1,category:"symbols"},abc:{keywords:["blue-square","alphabet"],char:"🔤",fitzpatrick_scale:!1,category:"symbols"},abcd:{keywords:["blue-square","alphabet"],char:"🔡",fitzpatrick_scale:!1,category:"symbols"},capital_abcd:{keywords:["alphabet","words","blue-square"],char:"🔠",fitzpatrick_scale:!1,category:"symbols"},symbols:{keywords:["blue-square","music","note","ampersand","percent","glyphs","characters"],char:"🔣",fitzpatrick_scale:!1,category:"symbols"},musical_note:{keywords:["score","tone","sound"],char:"🎵",fitzpatrick_scale:!1,category:"symbols"},notes:{keywords:["music","score"],char:"🎶",fitzpatrick_scale:!1,category:"symbols"},wavy_dash:{keywords:["draw","line","moustache","mustache","squiggle","scribble"],char:"〰️",fitzpatrick_scale:!1,category:"symbols"},curly_loop:{keywords:["scribble","draw","shape","squiggle"],char:"➰",fitzpatrick_scale:!1,category:"symbols"},heavy_check_mark:{keywords:["ok","nike","answer","yes","tick"],char:"✔️",fitzpatrick_scale:!1,category:"symbols"},arrows_clockwise:{keywords:["sync","cycle","round","repeat"],char:"🔃",fitzpatrick_scale:!1,category:"symbols"},heavy_plus_sign:{keywords:["math","calculation","addition","more","increase"],char:"➕",fitzpatrick_scale:!1,category:"symbols"},heavy_minus_sign:{keywords:["math","calculation","subtract","less"],char:"➖",fitzpatrick_scale:!1,category:"symbols"},heavy_division_sign:{keywords:["divide","math","calculation"],char:"➗",fitzpatrick_scale:!1,category:"symbols"},heavy_multiplication_x:{keywords:["math","calculation"],char:"✖️",fitzpatrick_scale:!1,category:"symbols"},infinity:{keywords:["forever"],char:"♾",fitzpatrick_scale:!1,category:"symbols"},heavy_dollar_sign:{keywords:["money","sales","payment","currency","buck"],char:"💲",fitzpatrick_scale:!1,category:"symbols"},currency_exchange:{keywords:["money","sales","dollar","travel"],char:"💱",fitzpatrick_scale:!1,category:"symbols"},copyright:{keywords:["ip","license","circle","law","legal"],char:"©️",fitzpatrick_scale:!1,category:"symbols"},registered:{keywords:["alphabet","circle"],char:"®️",fitzpatrick_scale:!1,category:"symbols"},tm:{keywords:["trademark","brand","law","legal"],char:"™️",fitzpatrick_scale:!1,category:"symbols"},end:{keywords:["words","arrow"],char:"🔚",fitzpatrick_scale:!1,category:"symbols"},back:{keywords:["arrow","words","return"],char:"🔙",fitzpatrick_scale:!1,category:"symbols"},on:{keywords:["arrow","words"],char:"🔛",fitzpatrick_scale:!1,category:"symbols"},top:{keywords:["words","blue-square"],char:"🔝",fitzpatrick_scale:!1,category:"symbols"},soon:{keywords:["arrow","words"],char:"🔜",fitzpatrick_scale:!1,category:"symbols"},ballot_box_with_check:{keywords:["ok","agree","confirm","black-square","vote","election","yes","tick"],char:"☑️",fitzpatrick_scale:!1,category:"symbols"},radio_button:{keywords:["input","old","music","circle"],char:"🔘",fitzpatrick_scale:!1,category:"symbols"},white_circle:{keywords:["shape","round"],char:"⚪",fitzpatrick_scale:!1,category:"symbols"},black_circle:{keywords:["shape","button","round"],char:"⚫",fitzpatrick_scale:!1,category:"symbols"},red_circle:{keywords:["shape","error","danger"],char:"🔴",fitzpatrick_scale:!1,category:"symbols"},large_blue_circle:{keywords:["shape","icon","button"],char:"🔵",fitzpatrick_scale:!1,category:"symbols"},small_orange_diamond:{keywords:["shape","jewel","gem"],char:"🔸",fitzpatrick_scale:!1,category:"symbols"},small_blue_diamond:{keywords:["shape","jewel","gem"],char:"🔹",fitzpatrick_scale:!1,category:"symbols"},large_orange_diamond:{keywords:["shape","jewel","gem"],char:"🔶",fitzpatrick_scale:!1,category:"symbols"},large_blue_diamond:{keywords:["shape","jewel","gem"],char:"🔷",fitzpatrick_scale:!1,category:"symbols"},small_red_triangle:{keywords:["shape","direction","up","top"],char:"🔺",fitzpatrick_scale:!1,category:"symbols"},black_small_square:{keywords:["shape","icon"],char:"▪️",fitzpatrick_scale:!1,category:"symbols"},white_small_square:{keywords:["shape","icon"],char:"▫️",fitzpatrick_scale:!1,category:"symbols"},black_large_square:{keywords:["shape","icon","button"],char:"⬛",fitzpatrick_scale:!1,category:"symbols"},white_large_square:{keywords:["shape","icon","stone","button"],char:"⬜",fitzpatrick_scale:!1,category:"symbols"},small_red_triangle_down:{keywords:["shape","direction","bottom"],char:"🔻",fitzpatrick_scale:!1,category:"symbols"},black_medium_square:{keywords:["shape","button","icon"],char:"◼️",fitzpatrick_scale:!1,category:"symbols"},white_medium_square:{keywords:["shape","stone","icon"],char:"◻️",fitzpatrick_scale:!1,category:"symbols"},black_medium_small_square:{keywords:["icon","shape","button"],char:"◾",fitzpatrick_scale:!1,category:"symbols"},white_medium_small_square:{keywords:["shape","stone","icon","button"],char:"◽",fitzpatrick_scale:!1,category:"symbols"},black_square_button:{keywords:["shape","input","frame"],char:"🔲",fitzpatrick_scale:!1,category:"symbols"},white_square_button:{keywords:["shape","input"],char:"🔳",fitzpatrick_scale:!1,category:"symbols"},speaker:{keywords:["sound","volume","silence","broadcast"],char:"🔈",fitzpatrick_scale:!1,category:"symbols"},sound:{keywords:["volume","speaker","broadcast"],char:"🔉",fitzpatrick_scale:!1,category:"symbols"},loud_sound:{keywords:["volume","noise","noisy","speaker","broadcast"],char:"🔊",fitzpatrick_scale:!1,category:"symbols"},mute:{keywords:["sound","volume","silence","quiet"],char:"🔇",fitzpatrick_scale:!1,category:"symbols"},mega:{keywords:["sound","speaker","volume"],char:"📣",fitzpatrick_scale:!1,category:"symbols"},loudspeaker:{keywords:["volume","sound"],char:"📢",fitzpatrick_scale:!1,category:"symbols"},bell:{keywords:["sound","notification","christmas","xmas","chime"],char:"🔔",fitzpatrick_scale:!1,category:"symbols"},no_bell:{keywords:["sound","volume","mute","quiet","silent"],char:"🔕",fitzpatrick_scale:!1,category:"symbols"},black_joker:{keywords:["poker","cards","game","play","magic"],char:"🃏",fitzpatrick_scale:!1,category:"symbols"},mahjong:{keywords:["game","play","chinese","kanji"],char:"🀄",fitzpatrick_scale:!1,category:"symbols"},spades:{keywords:["poker","cards","suits","magic"],char:"♠️",fitzpatrick_scale:!1,category:"symbols"},clubs:{keywords:["poker","cards","magic","suits"],char:"♣️",fitzpatrick_scale:!1,category:"symbols"},hearts:{keywords:["poker","cards","magic","suits"],char:"♥️",fitzpatrick_scale:!1,category:"symbols"},diamonds:{keywords:["poker","cards","magic","suits"],char:"♦️",fitzpatrick_scale:!1,category:"symbols"},flower_playing_cards:{keywords:["game","sunset","red"],char:"🎴",fitzpatrick_scale:!1,category:"symbols"},thought_balloon:{keywords:["bubble","cloud","speech","thinking","dream"],char:"💭",fitzpatrick_scale:!1,category:"symbols"},right_anger_bubble:{keywords:["caption","speech","thinking","mad"],char:"🗯",fitzpatrick_scale:!1,category:"symbols"},speech_balloon:{keywords:["bubble","words","message","talk","chatting"],char:"💬",fitzpatrick_scale:!1,category:"symbols"},left_speech_bubble:{keywords:["words","message","talk","chatting"],char:"🗨",fitzpatrick_scale:!1,category:"symbols"},clock1:{keywords:["time","late","early","schedule"],char:"🕐",fitzpatrick_scale:!1,category:"symbols"},clock2:{keywords:["time","late","early","schedule"],char:"🕑",fitzpatrick_scale:!1,category:"symbols"},clock3:{keywords:["time","late","early","schedule"],char:"🕒",fitzpatrick_scale:!1,category:"symbols"},clock4:{keywords:["time","late","early","schedule"],char:"🕓",fitzpatrick_scale:!1,category:"symbols"},clock5:{keywords:["time","late","early","schedule"],char:"🕔",fitzpatrick_scale:!1,category:"symbols"},clock6:{keywords:["time","late","early","schedule","dawn","dusk"],char:"🕕",fitzpatrick_scale:!1,category:"symbols"},clock7:{keywords:["time","late","early","schedule"],char:"🕖",fitzpatrick_scale:!1,category:"symbols"},clock8:{keywords:["time","late","early","schedule"],char:"🕗",fitzpatrick_scale:!1,category:"symbols"},clock9:{keywords:["time","late","early","schedule"],char:"🕘",fitzpatrick_scale:!1,category:"symbols"},clock10:{keywords:["time","late","early","schedule"],char:"🕙",fitzpatrick_scale:!1,category:"symbols"},clock11:{keywords:["time","late","early","schedule"],char:"🕚",fitzpatrick_scale:!1,category:"symbols"},clock12:{keywords:["time","noon","midnight","midday","late","early","schedule"],char:"🕛",fitzpatrick_scale:!1,category:"symbols"},clock130:{keywords:["time","late","early","schedule"],char:"🕜",fitzpatrick_scale:!1,category:"symbols"},clock230:{keywords:["time","late","early","schedule"],char:"🕝",fitzpatrick_scale:!1,category:"symbols"},clock330:{keywords:["time","late","early","schedule"],char:"🕞",fitzpatrick_scale:!1,category:"symbols"},clock430:{keywords:["time","late","early","schedule"],char:"🕟",fitzpatrick_scale:!1,category:"symbols"},clock530:{keywords:["time","late","early","schedule"],char:"🕠",fitzpatrick_scale:!1,category:"symbols"},clock630:{keywords:["time","late","early","schedule"],char:"🕡",fitzpatrick_scale:!1,category:"symbols"},clock730:{keywords:["time","late","early","schedule"],char:"🕢",fitzpatrick_scale:!1,category:"symbols"},clock830:{keywords:["time","late","early","schedule"],char:"🕣",fitzpatrick_scale:!1,category:"symbols"},clock930:{keywords:["time","late","early","schedule"],char:"🕤",fitzpatrick_scale:!1,category:"symbols"},clock1030:{keywords:["time","late","early","schedule"],char:"🕥",fitzpatrick_scale:!1,category:"symbols"},clock1130:{keywords:["time","late","early","schedule"],char:"🕦",fitzpatrick_scale:!1,category:"symbols"},clock1230:{keywords:["time","late","early","schedule"],char:"🕧",fitzpatrick_scale:!1,category:"symbols"},afghanistan:{keywords:["af","flag","nation","country","banner"],char:"🇦🇫",fitzpatrick_scale:!1,category:"flags"},aland_islands:{keywords:["Åland","islands","flag","nation","country","banner"],char:"🇦🇽",fitzpatrick_scale:!1,category:"flags"},albania:{keywords:["al","flag","nation","country","banner"],char:"🇦🇱",fitzpatrick_scale:!1,category:"flags"},algeria:{keywords:["dz","flag","nation","country","banner"],char:"🇩🇿",fitzpatrick_scale:!1,category:"flags"},american_samoa:{keywords:["american","ws","flag","nation","country","banner"],char:"🇦🇸",fitzpatrick_scale:!1,category:"flags"},andorra:{keywords:["ad","flag","nation","country","banner"],char:"🇦🇩",fitzpatrick_scale:!1,category:"flags"},angola:{keywords:["ao","flag","nation","country","banner"],char:"🇦🇴",fitzpatrick_scale:!1,category:"flags"},anguilla:{keywords:["ai","flag","nation","country","banner"],char:"🇦🇮",fitzpatrick_scale:!1,category:"flags"},antarctica:{keywords:["aq","flag","nation","country","banner"],char:"🇦🇶",fitzpatrick_scale:!1,category:"flags"},antigua_barbuda:{keywords:["antigua","barbuda","flag","nation","country","banner"],char:"🇦🇬",fitzpatrick_scale:!1,category:"flags"},argentina:{keywords:["ar","flag","nation","country","banner"],char:"🇦🇷",fitzpatrick_scale:!1,category:"flags"},armenia:{keywords:["am","flag","nation","country","banner"],char:"🇦🇲",fitzpatrick_scale:!1,category:"flags"},aruba:{keywords:["aw","flag","nation","country","banner"],char:"🇦🇼",fitzpatrick_scale:!1,category:"flags"},australia:{keywords:["au","flag","nation","country","banner"],char:"🇦🇺",fitzpatrick_scale:!1,category:"flags"},austria:{keywords:["at","flag","nation","country","banner"],char:"🇦🇹",fitzpatrick_scale:!1,category:"flags"},azerbaijan:{keywords:["az","flag","nation","country","banner"],char:"🇦🇿",fitzpatrick_scale:!1,category:"flags"},bahamas:{keywords:["bs","flag","nation","country","banner"],char:"🇧🇸",fitzpatrick_scale:!1,category:"flags"},bahrain:{keywords:["bh","flag","nation","country","banner"],char:"🇧🇭",fitzpatrick_scale:!1,category:"flags"},bangladesh:{keywords:["bd","flag","nation","country","banner"],char:"🇧🇩",fitzpatrick_scale:!1,category:"flags"},barbados:{keywords:["bb","flag","nation","country","banner"],char:"🇧🇧",fitzpatrick_scale:!1,category:"flags"},belarus:{keywords:["by","flag","nation","country","banner"],char:"🇧🇾",fitzpatrick_scale:!1,category:"flags"},belgium:{keywords:["be","flag","nation","country","banner"],char:"🇧🇪",fitzpatrick_scale:!1,category:"flags"},belize:{keywords:["bz","flag","nation","country","banner"],char:"🇧🇿",fitzpatrick_scale:!1,category:"flags"},benin:{keywords:["bj","flag","nation","country","banner"],char:"🇧🇯",fitzpatrick_scale:!1,category:"flags"},bermuda:{keywords:["bm","flag","nation","country","banner"],char:"🇧🇲",fitzpatrick_scale:!1,category:"flags"},bhutan:{keywords:["bt","flag","nation","country","banner"],char:"🇧🇹",fitzpatrick_scale:!1,category:"flags"},bolivia:{keywords:["bo","flag","nation","country","banner"],char:"🇧🇴",fitzpatrick_scale:!1,category:"flags"},caribbean_netherlands:{keywords:["bonaire","flag","nation","country","banner"],char:"🇧🇶",fitzpatrick_scale:!1,category:"flags"},bosnia_herzegovina:{keywords:["bosnia","herzegovina","flag","nation","country","banner"],char:"🇧🇦",fitzpatrick_scale:!1,category:"flags"},botswana:{keywords:["bw","flag","nation","country","banner"],char:"🇧🇼",fitzpatrick_scale:!1,category:"flags"},brazil:{keywords:["br","flag","nation","country","banner"],char:"🇧🇷",fitzpatrick_scale:!1,category:"flags"},british_indian_ocean_territory:{keywords:["british","indian","ocean","territory","flag","nation","country","banner"],char:"🇮🇴",fitzpatrick_scale:!1,category:"flags"},british_virgin_islands:{keywords:["british","virgin","islands","bvi","flag","nation","country","banner"],char:"🇻🇬",fitzpatrick_scale:!1,category:"flags"},brunei:{keywords:["bn","darussalam","flag","nation","country","banner"],char:"🇧🇳",fitzpatrick_scale:!1,category:"flags"},bulgaria:{keywords:["bg","flag","nation","country","banner"],char:"🇧🇬",fitzpatrick_scale:!1,category:"flags"},burkina_faso:{keywords:["burkina","faso","flag","nation","country","banner"],char:"🇧🇫",fitzpatrick_scale:!1,category:"flags"},burundi:{keywords:["bi","flag","nation","country","banner"],char:"🇧🇮",fitzpatrick_scale:!1,category:"flags"},cape_verde:{keywords:["cabo","verde","flag","nation","country","banner"],char:"🇨🇻",fitzpatrick_scale:!1,category:"flags"},cambodia:{keywords:["kh","flag","nation","country","banner"],char:"🇰🇭",fitzpatrick_scale:!1,category:"flags"},cameroon:{keywords:["cm","flag","nation","country","banner"],char:"🇨🇲",fitzpatrick_scale:!1,category:"flags"},canada:{keywords:["ca","flag","nation","country","banner"],char:"🇨🇦",fitzpatrick_scale:!1,category:"flags"},canary_islands:{keywords:["canary","islands","flag","nation","country","banner"],char:"🇮🇨",fitzpatrick_scale:!1,category:"flags"},cayman_islands:{keywords:["cayman","islands","flag","nation","country","banner"],char:"🇰🇾",fitzpatrick_scale:!1,category:"flags"},central_african_republic:{keywords:["central","african","republic","flag","nation","country","banner"],char:"🇨🇫",fitzpatrick_scale:!1,category:"flags"},chad:{keywords:["td","flag","nation","country","banner"],char:"🇹🇩",fitzpatrick_scale:!1,category:"flags"},chile:{keywords:["flag","nation","country","banner"],char:"🇨🇱",fitzpatrick_scale:!1,category:"flags"},cn:{keywords:["china","chinese","prc","flag","country","nation","banner"],char:"🇨🇳",fitzpatrick_scale:!1,category:"flags"},christmas_island:{keywords:["christmas","island","flag","nation","country","banner"],char:"🇨🇽",fitzpatrick_scale:!1,category:"flags"},cocos_islands:{keywords:["cocos","keeling","islands","flag","nation","country","banner"],char:"🇨🇨",fitzpatrick_scale:!1,category:"flags"},colombia:{keywords:["co","flag","nation","country","banner"],char:"🇨🇴",fitzpatrick_scale:!1,category:"flags"},comoros:{keywords:["km","flag","nation","country","banner"],char:"🇰🇲",fitzpatrick_scale:!1,category:"flags"},congo_brazzaville:{keywords:["congo","flag","nation","country","banner"],char:"🇨🇬",fitzpatrick_scale:!1,category:"flags"},congo_kinshasa:{keywords:["congo","democratic","republic","flag","nation","country","banner"],char:"🇨🇩",fitzpatrick_scale:!1,category:"flags"},cook_islands:{keywords:["cook","islands","flag","nation","country","banner"],char:"🇨🇰",fitzpatrick_scale:!1,category:"flags"},costa_rica:{keywords:["costa","rica","flag","nation","country","banner"],char:"🇨🇷",fitzpatrick_scale:!1,category:"flags"},croatia:{keywords:["hr","flag","nation","country","banner"],char:"🇭🇷",fitzpatrick_scale:!1,category:"flags"},cuba:{keywords:["cu","flag","nation","country","banner"],char:"🇨🇺",fitzpatrick_scale:!1,category:"flags"},curacao:{keywords:["curaçao","flag","nation","country","banner"],char:"🇨🇼",fitzpatrick_scale:!1,category:"flags"},cyprus:{keywords:["cy","flag","nation","country","banner"],char:"🇨🇾",fitzpatrick_scale:!1,category:"flags"},czech_republic:{keywords:["cz","flag","nation","country","banner"],char:"🇨🇿",fitzpatrick_scale:!1,category:"flags"},denmark:{keywords:["dk","flag","nation","country","banner"],char:"🇩🇰",fitzpatrick_scale:!1,category:"flags"},djibouti:{keywords:["dj","flag","nation","country","banner"],char:"🇩🇯",fitzpatrick_scale:!1,category:"flags"},dominica:{keywords:["dm","flag","nation","country","banner"],char:"🇩🇲",fitzpatrick_scale:!1,category:"flags"},dominican_republic:{keywords:["dominican","republic","flag","nation","country","banner"],char:"🇩🇴",fitzpatrick_scale:!1,category:"flags"},ecuador:{keywords:["ec","flag","nation","country","banner"],char:"🇪🇨",fitzpatrick_scale:!1,category:"flags"},egypt:{keywords:["eg","flag","nation","country","banner"],char:"🇪🇬",fitzpatrick_scale:!1,category:"flags"},el_salvador:{keywords:["el","salvador","flag","nation","country","banner"],char:"🇸🇻",fitzpatrick_scale:!1,category:"flags"},equatorial_guinea:{keywords:["equatorial","gn","flag","nation","country","banner"],char:"🇬🇶",fitzpatrick_scale:!1,category:"flags"},eritrea:{keywords:["er","flag","nation","country","banner"],char:"🇪🇷",fitzpatrick_scale:!1,category:"flags"},estonia:{keywords:["ee","flag","nation","country","banner"],char:"🇪🇪",fitzpatrick_scale:!1,category:"flags"},ethiopia:{keywords:["et","flag","nation","country","banner"],char:"🇪🇹",fitzpatrick_scale:!1,category:"flags"},eu:{keywords:["european","union","flag","banner"],char:"🇪🇺",fitzpatrick_scale:!1,category:"flags"},falkland_islands:{keywords:["falkland","islands","malvinas","flag","nation","country","banner"],char:"🇫🇰",fitzpatrick_scale:!1,category:"flags"},faroe_islands:{keywords:["faroe","islands","flag","nation","country","banner"],char:"🇫🇴",fitzpatrick_scale:!1,category:"flags"},fiji:{keywords:["fj","flag","nation","country","banner"],char:"🇫🇯",fitzpatrick_scale:!1,category:"flags"},finland:{keywords:["fi","flag","nation","country","banner"],char:"🇫🇮",fitzpatrick_scale:!1,category:"flags"},fr:{keywords:["banner","flag","nation","france","french","country"],char:"🇫🇷",fitzpatrick_scale:!1,category:"flags"},french_guiana:{keywords:["french","guiana","flag","nation","country","banner"],char:"🇬🇫",fitzpatrick_scale:!1,category:"flags"},french_polynesia:{keywords:["french","polynesia","flag","nation","country","banner"],char:"🇵🇫",fitzpatrick_scale:!1,category:"flags"},french_southern_territories:{keywords:["french","southern","territories","flag","nation","country","banner"],char:"🇹🇫",fitzpatrick_scale:!1,category:"flags"},gabon:{keywords:["ga","flag","nation","country","banner"],char:"🇬🇦",fitzpatrick_scale:!1,category:"flags"},gambia:{keywords:["gm","flag","nation","country","banner"],char:"🇬🇲",fitzpatrick_scale:!1,category:"flags"},georgia:{keywords:["ge","flag","nation","country","banner"],char:"🇬🇪",fitzpatrick_scale:!1,category:"flags"},de:{keywords:["german","nation","flag","country","banner"],char:"🇩🇪",fitzpatrick_scale:!1,category:"flags"},ghana:{keywords:["gh","flag","nation","country","banner"],char:"🇬🇭",fitzpatrick_scale:!1,category:"flags"},gibraltar:{keywords:["gi","flag","nation","country","banner"],char:"🇬🇮",fitzpatrick_scale:!1,category:"flags"},greece:{keywords:["gr","flag","nation","country","banner"],char:"🇬🇷",fitzpatrick_scale:!1,category:"flags"},greenland:{keywords:["gl","flag","nation","country","banner"],char:"🇬🇱",fitzpatrick_scale:!1,category:"flags"},grenada:{keywords:["gd","flag","nation","country","banner"],char:"🇬🇩",fitzpatrick_scale:!1,category:"flags"},guadeloupe:{keywords:["gp","flag","nation","country","banner"],char:"🇬🇵",fitzpatrick_scale:!1,category:"flags"},guam:{keywords:["gu","flag","nation","country","banner"],char:"🇬🇺",fitzpatrick_scale:!1,category:"flags"},guatemala:{keywords:["gt","flag","nation","country","banner"],char:"🇬🇹",fitzpatrick_scale:!1,category:"flags"},guernsey:{keywords:["gg","flag","nation","country","banner"],char:"🇬🇬",fitzpatrick_scale:!1,category:"flags"},guinea:{keywords:["gn","flag","nation","country","banner"],char:"🇬🇳",fitzpatrick_scale:!1,category:"flags"},guinea_bissau:{keywords:["gw","bissau","flag","nation","country","banner"],char:"🇬🇼",fitzpatrick_scale:!1,category:"flags"},guyana:{keywords:["gy","flag","nation","country","banner"],char:"🇬🇾",fitzpatrick_scale:!1,category:"flags"},haiti:{keywords:["ht","flag","nation","country","banner"],char:"🇭🇹",fitzpatrick_scale:!1,category:"flags"},honduras:{keywords:["hn","flag","nation","country","banner"],char:"🇭🇳",fitzpatrick_scale:!1,category:"flags"},hong_kong:{keywords:["hong","kong","flag","nation","country","banner"],char:"🇭🇰",fitzpatrick_scale:!1,category:"flags"},hungary:{keywords:["hu","flag","nation","country","banner"],char:"🇭🇺",fitzpatrick_scale:!1,category:"flags"},iceland:{keywords:["is","flag","nation","country","banner"],char:"🇮🇸",fitzpatrick_scale:!1,category:"flags"},india:{keywords:["in","flag","nation","country","banner"],char:"🇮🇳",fitzpatrick_scale:!1,category:"flags"},indonesia:{keywords:["flag","nation","country","banner"],char:"🇮🇩",fitzpatrick_scale:!1,category:"flags"},iran:{keywords:["iran,","islamic","republic","flag","nation","country","banner"],char:"🇮🇷",fitzpatrick_scale:!1,category:"flags"},iraq:{keywords:["iq","flag","nation","country","banner"],char:"🇮🇶",fitzpatrick_scale:!1,category:"flags"},ireland:{keywords:["ie","flag","nation","country","banner"],char:"🇮🇪",fitzpatrick_scale:!1,category:"flags"},isle_of_man:{keywords:["isle","man","flag","nation","country","banner"],char:"🇮🇲",fitzpatrick_scale:!1,category:"flags"},israel:{keywords:["il","flag","nation","country","banner"],char:"🇮🇱",fitzpatrick_scale:!1,category:"flags"},it:{keywords:["italy","flag","nation","country","banner"],char:"🇮🇹",fitzpatrick_scale:!1,category:"flags"},cote_divoire:{keywords:["ivory","coast","flag","nation","country","banner"],char:"🇨🇮",fitzpatrick_scale:!1,category:"flags"},jamaica:{keywords:["jm","flag","nation","country","banner"],char:"🇯🇲",fitzpatrick_scale:!1,category:"flags"},jp:{keywords:["japanese","nation","flag","country","banner"],char:"🇯🇵",fitzpatrick_scale:!1,category:"flags"},jersey:{keywords:["je","flag","nation","country","banner"],char:"🇯🇪",fitzpatrick_scale:!1,category:"flags"},jordan:{keywords:["jo","flag","nation","country","banner"],char:"🇯🇴",fitzpatrick_scale:!1,category:"flags"},kazakhstan:{keywords:["kz","flag","nation","country","banner"],char:"🇰🇿",fitzpatrick_scale:!1,category:"flags"},kenya:{keywords:["ke","flag","nation","country","banner"],char:"🇰🇪",fitzpatrick_scale:!1,category:"flags"},kiribati:{keywords:["ki","flag","nation","country","banner"],char:"🇰🇮",fitzpatrick_scale:!1,category:"flags"},kosovo:{keywords:["xk","flag","nation","country","banner"],char:"🇽🇰",fitzpatrick_scale:!1,category:"flags"},kuwait:{keywords:["kw","flag","nation","country","banner"],char:"🇰🇼",fitzpatrick_scale:!1,category:"flags"},kyrgyzstan:{keywords:["kg","flag","nation","country","banner"],char:"🇰🇬",fitzpatrick_scale:!1,category:"flags"},laos:{keywords:["lao","democratic","republic","flag","nation","country","banner"],char:"🇱🇦",fitzpatrick_scale:!1,category:"flags"},latvia:{keywords:["lv","flag","nation","country","banner"],char:"🇱🇻",fitzpatrick_scale:!1,category:"flags"},lebanon:{keywords:["lb","flag","nation","country","banner"],char:"🇱🇧",fitzpatrick_scale:!1,category:"flags"},lesotho:{keywords:["ls","flag","nation","country","banner"],char:"🇱🇸",fitzpatrick_scale:!1,category:"flags"},liberia:{keywords:["lr","flag","nation","country","banner"],char:"🇱🇷",fitzpatrick_scale:!1,category:"flags"},libya:{keywords:["ly","flag","nation","country","banner"],char:"🇱🇾",fitzpatrick_scale:!1,category:"flags"},liechtenstein:{keywords:["li","flag","nation","country","banner"],char:"🇱🇮",fitzpatrick_scale:!1,category:"flags"},lithuania:{keywords:["lt","flag","nation","country","banner"],char:"🇱🇹",fitzpatrick_scale:!1,category:"flags"},luxembourg:{keywords:["lu","flag","nation","country","banner"],char:"🇱🇺",fitzpatrick_scale:!1,category:"flags"},macau:{keywords:["macao","flag","nation","country","banner"],char:"🇲🇴",fitzpatrick_scale:!1,category:"flags"},macedonia:{keywords:["macedonia,","flag","nation","country","banner"],char:"🇲🇰",fitzpatrick_scale:!1,category:"flags"},madagascar:{keywords:["mg","flag","nation","country","banner"],char:"🇲🇬",fitzpatrick_scale:!1,category:"flags"},malawi:{keywords:["mw","flag","nation","country","banner"],char:"🇲🇼",fitzpatrick_scale:!1,category:"flags"},malaysia:{keywords:["my","flag","nation","country","banner"],char:"🇲🇾",fitzpatrick_scale:!1,category:"flags"},maldives:{keywords:["mv","flag","nation","country","banner"],char:"🇲🇻",fitzpatrick_scale:!1,category:"flags"},mali:{keywords:["ml","flag","nation","country","banner"],char:"🇲🇱",fitzpatrick_scale:!1,category:"flags"},malta:{keywords:["mt","flag","nation","country","banner"],char:"🇲🇹",fitzpatrick_scale:!1,category:"flags"},marshall_islands:{keywords:["marshall","islands","flag","nation","country","banner"],char:"🇲🇭",fitzpatrick_scale:!1,category:"flags"},martinique:{keywords:["mq","flag","nation","country","banner"],char:"🇲🇶",fitzpatrick_scale:!1,category:"flags"},mauritania:{keywords:["mr","flag","nation","country","banner"],char:"🇲🇷",fitzpatrick_scale:!1,category:"flags"},mauritius:{keywords:["mu","flag","nation","country","banner"],char:"🇲🇺",fitzpatrick_scale:!1,category:"flags"},mayotte:{keywords:["yt","flag","nation","country","banner"],char:"🇾🇹",fitzpatrick_scale:!1,category:"flags"},mexico:{keywords:["mx","flag","nation","country","banner"],char:"🇲🇽",fitzpatrick_scale:!1,category:"flags"},micronesia:{keywords:["micronesia,","federated","states","flag","nation","country","banner"],char:"🇫🇲",fitzpatrick_scale:!1,category:"flags"},moldova:{keywords:["moldova,","republic","flag","nation","country","banner"],char:"🇲🇩",fitzpatrick_scale:!1,category:"flags"},monaco:{keywords:["mc","flag","nation","country","banner"],char:"🇲🇨",fitzpatrick_scale:!1,category:"flags"},mongolia:{keywords:["mn","flag","nation","country","banner"],char:"🇲🇳",fitzpatrick_scale:!1,category:"flags"},montenegro:{keywords:["me","flag","nation","country","banner"],char:"🇲🇪",fitzpatrick_scale:!1,category:"flags"},montserrat:{keywords:["ms","flag","nation","country","banner"],char:"🇲🇸",fitzpatrick_scale:!1,category:"flags"},morocco:{keywords:["ma","flag","nation","country","banner"],char:"🇲🇦",fitzpatrick_scale:!1,category:"flags"},mozambique:{keywords:["mz","flag","nation","country","banner"],char:"🇲🇿",fitzpatrick_scale:!1,category:"flags"},myanmar:{keywords:["mm","flag","nation","country","banner"],char:"🇲🇲",fitzpatrick_scale:!1,category:"flags"},namibia:{keywords:["na","flag","nation","country","banner"],char:"🇳🇦",fitzpatrick_scale:!1,category:"flags"},nauru:{keywords:["nr","flag","nation","country","banner"],char:"🇳🇷",fitzpatrick_scale:!1,category:"flags"},nepal:{keywords:["np","flag","nation","country","banner"],char:"🇳🇵",fitzpatrick_scale:!1,category:"flags"},netherlands:{keywords:["nl","flag","nation","country","banner"],char:"🇳🇱",fitzpatrick_scale:!1,category:"flags"},new_caledonia:{keywords:["new","caledonia","flag","nation","country","banner"],char:"🇳🇨",fitzpatrick_scale:!1,category:"flags"},new_zealand:{keywords:["new","zealand","flag","nation","country","banner"],char:"🇳🇿",fitzpatrick_scale:!1,category:"flags"},nicaragua:{keywords:["ni","flag","nation","country","banner"],char:"🇳🇮",fitzpatrick_scale:!1,category:"flags"},niger:{keywords:["ne","flag","nation","country","banner"],char:"🇳🇪",fitzpatrick_scale:!1,category:"flags"},nigeria:{keywords:["flag","nation","country","banner"],char:"🇳🇬",fitzpatrick_scale:!1,category:"flags"},niue:{keywords:["nu","flag","nation","country","banner"],char:"🇳🇺",fitzpatrick_scale:!1,category:"flags"},norfolk_island:{keywords:["norfolk","island","flag","nation","country","banner"],char:"🇳🇫",fitzpatrick_scale:!1,category:"flags"},northern_mariana_islands:{keywords:["northern","mariana","islands","flag","nation","country","banner"],char:"🇲🇵",fitzpatrick_scale:!1,category:"flags"},north_korea:{keywords:["north","korea","nation","flag","country","banner"],char:"🇰🇵",fitzpatrick_scale:!1,category:"flags"},norway:{keywords:["no","flag","nation","country","banner"],char:"🇳🇴",fitzpatrick_scale:!1,category:"flags"},oman:{keywords:["om_symbol","flag","nation","country","banner"],char:"🇴🇲",fitzpatrick_scale:!1,category:"flags"},pakistan:{keywords:["pk","flag","nation","country","banner"],char:"🇵🇰",fitzpatrick_scale:!1,category:"flags"},palau:{keywords:["pw","flag","nation","country","banner"],char:"🇵🇼",fitzpatrick_scale:!1,category:"flags"},palestinian_territories:{keywords:["palestine","palestinian","territories","flag","nation","country","banner"],char:"🇵🇸",fitzpatrick_scale:!1,category:"flags"},panama:{keywords:["pa","flag","nation","country","banner"],char:"🇵🇦",fitzpatrick_scale:!1,category:"flags"},papua_new_guinea:{keywords:["papua","new","guinea","flag","nation","country","banner"],char:"🇵🇬",fitzpatrick_scale:!1,category:"flags"},paraguay:{keywords:["py","flag","nation","country","banner"],char:"🇵🇾",fitzpatrick_scale:!1,category:"flags"},peru:{keywords:["pe","flag","nation","country","banner"],char:"🇵🇪",fitzpatrick_scale:!1,category:"flags"},philippines:{keywords:["ph","flag","nation","country","banner"],char:"🇵🇭",fitzpatrick_scale:!1,category:"flags"},pitcairn_islands:{keywords:["pitcairn","flag","nation","country","banner"],char:"🇵🇳",fitzpatrick_scale:!1,category:"flags"},poland:{keywords:["pl","flag","nation","country","banner"],char:"🇵🇱",fitzpatrick_scale:!1,category:"flags"},portugal:{keywords:["pt","flag","nation","country","banner"],char:"🇵🇹",fitzpatrick_scale:!1,category:"flags"},puerto_rico:{keywords:["puerto","rico","flag","nation","country","banner"],char:"🇵🇷",fitzpatrick_scale:!1,category:"flags"},qatar:{keywords:["qa","flag","nation","country","banner"],char:"🇶🇦",fitzpatrick_scale:!1,category:"flags"},reunion:{keywords:["réunion","flag","nation","country","banner"],char:"🇷🇪",fitzpatrick_scale:!1,category:"flags"},romania:{keywords:["ro","flag","nation","country","banner"],char:"🇷🇴",fitzpatrick_scale:!1,category:"flags"},ru:{keywords:["russian","federation","flag","nation","country","banner"],char:"🇷🇺",fitzpatrick_scale:!1,category:"flags"},rwanda:{keywords:["rw","flag","nation","country","banner"],char:"🇷🇼",fitzpatrick_scale:!1,category:"flags"},st_barthelemy:{keywords:["saint","barthélemy","flag","nation","country","banner"],char:"🇧🇱",fitzpatrick_scale:!1,category:"flags"},st_helena:{keywords:["saint","helena","ascension","tristan","cunha","flag","nation","country","banner"],char:"🇸🇭",fitzpatrick_scale:!1,category:"flags"},st_kitts_nevis:{keywords:["saint","kitts","nevis","flag","nation","country","banner"],char:"🇰🇳",fitzpatrick_scale:!1,category:"flags"},st_lucia:{keywords:["saint","lucia","flag","nation","country","banner"],char:"🇱🇨",fitzpatrick_scale:!1,category:"flags"},st_pierre_miquelon:{keywords:["saint","pierre","miquelon","flag","nation","country","banner"],char:"🇵🇲",fitzpatrick_scale:!1,category:"flags"},st_vincent_grenadines:{keywords:["saint","vincent","grenadines","flag","nation","country","banner"],char:"🇻🇨",fitzpatrick_scale:!1,category:"flags"},samoa:{keywords:["ws","flag","nation","country","banner"],char:"🇼🇸",fitzpatrick_scale:!1,category:"flags"},san_marino:{keywords:["san","marino","flag","nation","country","banner"],char:"🇸🇲",fitzpatrick_scale:!1,category:"flags"},sao_tome_principe:{keywords:["sao","tome","principe","flag","nation","country","banner"],char:"🇸🇹",fitzpatrick_scale:!1,category:"flags"},saudi_arabia:{keywords:["flag","nation","country","banner"],char:"🇸🇦",fitzpatrick_scale:!1,category:"flags"},senegal:{keywords:["sn","flag","nation","country","banner"],char:"🇸🇳",fitzpatrick_scale:!1,category:"flags"},serbia:{keywords:["rs","flag","nation","country","banner"],char:"🇷🇸",fitzpatrick_scale:!1,category:"flags"},seychelles:{keywords:["sc","flag","nation","country","banner"],char:"🇸🇨",fitzpatrick_scale:!1,category:"flags"},sierra_leone:{keywords:["sierra","leone","flag","nation","country","banner"],char:"🇸🇱",fitzpatrick_scale:!1,category:"flags"},singapore:{keywords:["sg","flag","nation","country","banner"],char:"🇸🇬",fitzpatrick_scale:!1,category:"flags"},sint_maarten:{keywords:["sint","maarten","dutch","flag","nation","country","banner"],char:"🇸🇽",fitzpatrick_scale:!1,category:"flags"},slovakia:{keywords:["sk","flag","nation","country","banner"],char:"🇸🇰",fitzpatrick_scale:!1,category:"flags"},slovenia:{keywords:["si","flag","nation","country","banner"],char:"🇸🇮",fitzpatrick_scale:!1,category:"flags"},solomon_islands:{keywords:["solomon","islands","flag","nation","country","banner"],char:"🇸🇧",fitzpatrick_scale:!1,category:"flags"},somalia:{keywords:["so","flag","nation","country","banner"],char:"🇸🇴",fitzpatrick_scale:!1,category:"flags"},south_africa:{keywords:["south","africa","flag","nation","country","banner"],char:"🇿🇦",fitzpatrick_scale:!1,category:"flags"},south_georgia_south_sandwich_islands:{keywords:["south","georgia","sandwich","islands","flag","nation","country","banner"],char:"🇬🇸",fitzpatrick_scale:!1,category:"flags"},kr:{keywords:["south","korea","nation","flag","country","banner"],char:"🇰🇷",fitzpatrick_scale:!1,category:"flags"},south_sudan:{keywords:["south","sd","flag","nation","country","banner"],char:"🇸🇸",fitzpatrick_scale:!1,category:"flags"},es:{keywords:["spain","flag","nation","country","banner"],char:"🇪🇸",fitzpatrick_scale:!1,category:"flags"},sri_lanka:{keywords:["sri","lanka","flag","nation","country","banner"],char:"🇱🇰",fitzpatrick_scale:!1,category:"flags"},sudan:{keywords:["sd","flag","nation","country","banner"],char:"🇸🇩",fitzpatrick_scale:!1,category:"flags"},suriname:{keywords:["sr","flag","nation","country","banner"],char:"🇸🇷",fitzpatrick_scale:!1,category:"flags"},swaziland:{keywords:["sz","flag","nation","country","banner"],char:"🇸🇿",fitzpatrick_scale:!1,category:"flags"},sweden:{keywords:["se","flag","nation","country","banner"],char:"🇸🇪",fitzpatrick_scale:!1,category:"flags"},switzerland:{keywords:["ch","flag","nation","country","banner"],char:"🇨🇭",fitzpatrick_scale:!1,category:"flags"},syria:{keywords:["syrian","arab","republic","flag","nation","country","banner"],char:"🇸🇾",fitzpatrick_scale:!1,category:"flags"},taiwan:{keywords:["tw","flag","nation","country","banner"],char:"🇹🇼",fitzpatrick_scale:!1,category:"flags"},tajikistan:{keywords:["tj","flag","nation","country","banner"],char:"🇹🇯",fitzpatrick_scale:!1,category:"flags"},tanzania:{keywords:["tanzania,","united","republic","flag","nation","country","banner"],char:"🇹🇿",fitzpatrick_scale:!1,category:"flags"},thailand:{keywords:["th","flag","nation","country","banner"],char:"🇹🇭",fitzpatrick_scale:!1,category:"flags"},timor_leste:{keywords:["timor","leste","flag","nation","country","banner"],char:"🇹🇱",fitzpatrick_scale:!1,category:"flags"},togo:{keywords:["tg","flag","nation","country","banner"],char:"🇹🇬",fitzpatrick_scale:!1,category:"flags"},tokelau:{keywords:["tk","flag","nation","country","banner"],char:"🇹🇰",fitzpatrick_scale:!1,category:"flags"},tonga:{keywords:["to","flag","nation","country","banner"],char:"🇹🇴",fitzpatrick_scale:!1,category:"flags"},trinidad_tobago:{keywords:["trinidad","tobago","flag","nation","country","banner"],char:"🇹🇹",fitzpatrick_scale:!1,category:"flags"},tunisia:{keywords:["tn","flag","nation","country","banner"],char:"🇹🇳",fitzpatrick_scale:!1,category:"flags"},tr:{keywords:["turkey","flag","nation","country","banner"],char:"🇹🇷",fitzpatrick_scale:!1,category:"flags"},turkmenistan:{keywords:["flag","nation","country","banner"],char:"🇹🇲",fitzpatrick_scale:!1,category:"flags"},turks_caicos_islands:{keywords:["turks","caicos","islands","flag","nation","country","banner"],char:"🇹🇨",fitzpatrick_scale:!1,category:"flags"},tuvalu:{keywords:["flag","nation","country","banner"],char:"🇹🇻",fitzpatrick_scale:!1,category:"flags"},uganda:{keywords:["ug","flag","nation","country","banner"],char:"🇺🇬",fitzpatrick_scale:!1,category:"flags"},ukraine:{keywords:["ua","flag","nation","country","banner"],char:"🇺🇦",fitzpatrick_scale:!1,category:"flags"},united_arab_emirates:{keywords:["united","arab","emirates","flag","nation","country","banner"],char:"🇦🇪",fitzpatrick_scale:!1,category:"flags"},uk:{keywords:["united","kingdom","great","britain","northern","ireland","flag","nation","country","banner","british","UK","english","england","union jack"],char:"🇬🇧",fitzpatrick_scale:!1,category:"flags"},england:{keywords:["flag","english"],char:"🏴󠁧󠁢󠁥󠁮󠁧󠁿",fitzpatrick_scale:!1,category:"flags"},scotland:{keywords:["flag","scottish"],char:"🏴󠁧󠁢󠁳󠁣󠁴󠁿",fitzpatrick_scale:!1,category:"flags"},wales:{keywords:["flag","welsh"],char:"🏴󠁧󠁢󠁷󠁬󠁳󠁿",fitzpatrick_scale:!1,category:"flags"},us:{keywords:["united","states","america","flag","nation","country","banner"],char:"🇺🇸",fitzpatrick_scale:!1,category:"flags"},us_virgin_islands:{keywords:["virgin","islands","us","flag","nation","country","banner"],char:"🇻🇮",fitzpatrick_scale:!1,category:"flags"},uruguay:{keywords:["uy","flag","nation","country","banner"],char:"🇺🇾",fitzpatrick_scale:!1,category:"flags"},uzbekistan:{keywords:["uz","flag","nation","country","banner"],char:"🇺🇿",fitzpatrick_scale:!1,category:"flags"},vanuatu:{keywords:["vu","flag","nation","country","banner"],char:"🇻🇺",fitzpatrick_scale:!1,category:"flags"},vatican_city:{keywords:["vatican","city","flag","nation","country","banner"],char:"🇻🇦",fitzpatrick_scale:!1,category:"flags"},venezuela:{keywords:["ve","bolivarian","republic","flag","nation","country","banner"],char:"🇻🇪",fitzpatrick_scale:!1,category:"flags"},vietnam:{keywords:["viet","nam","flag","nation","country","banner"],char:"🇻🇳",fitzpatrick_scale:!1,category:"flags"},wallis_futuna:{keywords:["wallis","futuna","flag","nation","country","banner"],char:"🇼🇫",fitzpatrick_scale:!1,category:"flags"},western_sahara:{keywords:["western","sahara","flag","nation","country","banner"],char:"🇪🇭",fitzpatrick_scale:!1,category:"flags"},yemen:{keywords:["ye","flag","nation","country","banner"],char:"🇾🇪",fitzpatrick_scale:!1,category:"flags"},zambia:{keywords:["zm","flag","nation","country","banner"],char:"🇿🇲",fitzpatrick_scale:!1,category:"flags"},zimbabwe:{keywords:["zw","flag","nation","country","banner"],char:"🇿🇼",fitzpatrick_scale:!1,category:"flags"},united_nations:{keywords:["un","flag","banner"],char:"🇺🇳",fitzpatrick_scale:!1,category:"flags"},pirate_flag:{keywords:["skull","crossbones","flag","banner"],char:"🏴‍☠️",fitzpatrick_scale:!1,category:"flags"}});(function(){var w=tinymce.util.Tools.resolve("tinymce.PluginManager");const g=(Q,pe,Ae)=>{var Ye;return Ae(Q,pe.prototype)?!0:((Ye=Q.constructor)===null||Ye===void 0?void 0:Ye.name)===pe.name},S=Q=>{const pe=typeof Q;return Q===null?"null":pe==="object"&&Array.isArray(Q)?"array":pe==="object"&&g(Q,String,(Ae,Ye)=>Ye.isPrototypeOf(Ae))?"string":pe},B=Q=>pe=>S(pe)===Q,W=Q=>pe=>typeof pe===Q,te=Q=>pe=>Q===pe,ce=B("string"),Ee=B("object"),$e=B("array"),We=te(null),Me=W("boolean"),Ot=Q=>Q==null,mo=Q=>!Ot(Q),st=W("function"),ut=(Q,pe)=>{if($e(Q)){for(let Ae=0,Ye=Q.length;Ae{},Rt=Q=>()=>Q,Ke=(Q,pe)=>Q===pe;class Ut{constructor(pe,Ae){this.tag=pe,this.value=Ae}static some(pe){return new Ut(!0,pe)}static none(){return Ut.singletonNone}fold(pe,Ae){return this.tag?Ae(this.value):pe()}isSome(){return this.tag}isNone(){return!this.tag}map(pe){return this.tag?Ut.some(pe(this.value)):Ut.none()}bind(pe){return this.tag?pe(this.value):Ut.none()}exists(pe){return this.tag&&pe(this.value)}forall(pe){return!this.tag||pe(this.value)}filter(pe){return!this.tag||pe(this.value)?this:Ut.none()}getOr(pe){return this.tag?this.value:pe}or(pe){return this.tag?this:pe}getOrThunk(pe){return this.tag?this.value:pe()}orThunk(pe){return this.tag?this:pe()}getOrDie(pe){if(this.tag)return this.value;throw new Error(pe??"Called getOrDie on None")}static from(pe){return mo(pe)?Ut.some(pe):Ut.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(pe){this.tag&&pe(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}Ut.singletonNone=new Ut(!1);const ft=Array.prototype.indexOf,ue=Array.prototype.push,Ct=(Q,pe)=>ft.call(Q,pe),ve=(Q,pe)=>Ct(Q,pe)>-1,ot=(Q,pe)=>{const Ae=Q.length,Ye=new Array(Ae);for(let _t=0;_t{for(let Ae=0,Ye=Q.length;Ae(bn(Q,(Ye,_t)=>{Ae=pe(Ae,Ye,_t)}),Ae),uo=Q=>{const pe=[];for(let Ae=0,Ye=Q.length;Aeuo(ot(Q,pe)),Gt=(Q,pe)=>{for(let Ae=0;AeQ.exists(Ye=>Ae(Ye,pe)),bt=Q=>{const pe=[],Ae=Ye=>{pe.push(Ye)};for(let Ye=0;YeQ?Ut.some(pe):Ut.none(),Kt=Q=>pe=>pe.options.get(Q),qo=Q=>{const pe=Q.options.register;pe("link_assume_external_targets",{processor:Ae=>{const Ye=ce(Ae)||Me(Ae);return Ye?Ae===!0?{value:1,valid:Ye}:Ae==="http"||Ae==="https"?{value:Ae,valid:Ye}:{value:0,valid:Ye}:{valid:!1,message:"Must be a string or a boolean."}},default:!1}),pe("link_context_toolbar",{processor:"boolean",default:!1}),pe("link_list",{processor:Ae=>ce(Ae)||st(Ae)||ut(Ae,Ee)}),pe("link_default_target",{processor:"string"}),pe("link_default_protocol",{processor:"string",default:"https"}),pe("link_target_list",{processor:Ae=>Me(Ae)||ut(Ae,Ee),default:!0}),pe("link_rel_list",{processor:"object[]",default:[]}),pe("link_class_list",{processor:"object[]",default:[]}),pe("link_title",{processor:"boolean",default:!0}),pe("allow_unsafe_link_target",{processor:"boolean",default:!1}),pe("link_quicklink",{processor:"boolean",default:!1})},Ge=Kt("link_assume_external_targets"),To=Kt("link_context_toolbar"),Cr=Kt("link_list"),$t=Kt("link_default_target"),pt=Kt("link_default_protocol"),Ht=Kt("link_target_list"),ks=Kt("link_rel_list"),cn=Kt("link_class_list"),fn=Kt("link_title"),zo=Kt("allow_unsafe_link_target"),j=Kt("link_quicklink"),Fr=Object.keys,Cs=Object.hasOwnProperty,Sn=(Q,pe)=>{const Ae=Fr(Q);for(let Ye=0,_t=Ae.length;Ye<_t;Ye++){const oo=Ae[Ye],Go=Q[oo];pe(Go,oo)}},bi=Q=>(pe,Ae)=>{Q[Ae]=pe},qi=(Q,pe,Ae,Ye)=>{Sn(Q,(_t,oo)=>{(pe(_t,oo)?Ae:Ye)(_t,oo)})},mn=(Q,pe)=>{const Ae={};return qi(Q,pe,bi(Ae),Bt),Ae},Bn=(Q,pe)=>Cs.call(Q,pe),dn=(Q,pe)=>Bn(Q,pe)&&Q[pe]!==void 0&&Q[pe]!==null;var Le=tinymce.util.Tools.resolve("tinymce.util.URI"),Lt=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),yt=tinymce.util.Tools.resolve("tinymce.util.Tools");const rt=Q=>mo(Q)&&Q.nodeName.toLowerCase()==="a",ao=Q=>rt(Q)&&!!On(Q),ko=(Q,pe)=>{if(Q.collapsed)return[];{const Ae=Q.cloneContents(),Ye=Ae.firstChild,_t=new Lt(Ye,Ae),oo=[];let Go=Ye;do pe(Go)&&oo.push(Go);while(Go=_t.next());return oo}},tn=Q=>/^\w+:/i.test(Q),On=Q=>{var pe,Ae;return(Ae=(pe=Q.getAttribute("data-mce-href"))!==null&&pe!==void 0?pe:Q.getAttribute("href"))!==null&&Ae!==void 0?Ae:""},rs=(Q,pe)=>{const Ae=["noopener"],Ye=Q?Q.split(/\s+/):[],_t=sn=>yt.trim(sn.sort().join(" ")),oo=sn=>(sn=Go(sn),sn.length>0?sn.concat(Ae):Ae),Go=sn=>sn.filter(is=>yt.inArray(Ae,is)===-1),Xn=pe?oo(Ye):Go(Ye);return Xn.length>0?_t(Xn):""},Zn=Q=>Q.replace(/\uFEFF/g,""),Ln=(Q,pe)=>(pe=pe||os(Q.selection.getRng())[0]||Q.selection.getNode(),Vo(pe)?Ut.from(Q.dom.select("a[href]",pe)[0]):Ut.from(Q.dom.getParent(pe,"a[href]"))),Hs=(Q,pe)=>Ln(Q,pe).isSome(),sa=(Q,pe)=>{const Ae=pe.fold(()=>Q.getContent({format:"text"}),Ye=>Ye.innerText||Ye.textContent||"");return Zn(Ae)},os=Q=>ko(Q,ao),Is=Q=>yt.grep(Q,ao),yn=Q=>Is(Q).length>0,ra=Q=>os(Q).length>0,St=Q=>{const pe=Q.schema.getTextInlineElements(),Ae=oo=>oo.nodeType===1&&!rt(oo)&&!Bn(pe,oo.nodeName.toLowerCase());if(Ln(Q).exists(oo=>oo.hasAttribute("data-mce-block")))return!1;const _t=Q.selection.getRng();return _t.collapsed?!0:ko(_t,Ae).length===0},Vo=Q=>mo(Q)&&Q.nodeName==="FIGURE"&&/\bimage\b/i.test(Q.className),an=Q=>ln(["title","rel","class","target"],(Ae,Ye)=>(Q[Ye].each(_t=>{Ae[Ye]=_t.length>0?_t:null}),Ae),{href:Q.href}),Kr=(Q,pe)=>(pe==="http"||pe==="https")&&!tn(Q)?pe+"://"+Q:Q,yi=(Q,pe)=>{const Ae={...pe};if(ks(Q).length===0&&!zo(Q)){const Ye=rs(Ae.rel,Ae.target==="_blank");Ae.rel=Ye||null}return Ut.from(Ae.target).isNone()&&Ht(Q)===!1&&(Ae.target=$t(Q)),Ae.href=Kr(Ae.href,Ge(Q)),Ae},vt=(Q,pe,Ae,Ye)=>{Ae.each(_t=>{Bn(pe,"innerText")?pe.innerText=_t:pe.textContent=_t}),Q.dom.setAttribs(pe,Ye),Q.selection.select(pe)},oi=(Q,pe,Ae,Ye)=>{const _t=Q.dom;Vo(pe)?vl(_t,pe,Ye):Ae.fold(()=>{Q.execCommand("mceInsertLink",!1,Ye)},oo=>{Q.insertContent(_t.createHTML("a",Ye,_t.encode(oo)))})},nn=(Q,pe,Ae)=>{const Ye=Q.selection.getNode(),_t=Ln(Q,Ye),oo=yi(Q,an(Ae));Q.undoManager.transact(()=>{Ae.href===pe.href&&pe.attach(),_t.fold(()=>{oi(Q,Ye,Ae.text,oo)},Go=>{Q.focus(),vt(Q,Go,Ae.text,oo)})})},Mi=Q=>{const pe=Q.dom,Ae=Q.selection,Ye=Ae.getBookmark(),_t=Ae.getRng().cloneRange(),oo=pe.getParent(_t.startContainer,"a[href]",Q.getBody()),Go=pe.getParent(_t.endContainer,"a[href]",Q.getBody());oo&&_t.setStartBefore(oo),Go&&_t.setEndAfter(Go),Ae.setRng(_t),Q.execCommand("unlink"),Ae.moveToBookmark(Ye)},as=Q=>{Q.undoManager.transact(()=>{const pe=Q.selection.getNode();Vo(pe)?vi(Q,pe):Mi(Q),Q.focus()})},hr=Q=>{const{class:pe,href:Ae,rel:Ye,target:_t,text:oo,title:Go}=Q;return mn({class:pe.getOrNull(),href:Ae,rel:Ye.getOrNull(),target:_t.getOrNull(),text:oo.getOrNull(),title:Go.getOrNull()},(Xn,sn)=>We(Xn)===!1)},yl=(Q,pe)=>{const Ae=Q.options.get,Ye={allow_html_data_urls:Ae("allow_html_data_urls"),allow_script_urls:Ae("allow_script_urls"),allow_svg_data_urls:Ae("allow_svg_data_urls")},_t=pe.href;return{...pe,href:Le.isDomSafe(_t,"a",Ye)?_t:""}},cl=(Q,pe,Ae)=>{const Ye=yl(Q,Ae);Q.hasPlugin("rtc",!0)?Q.execCommand("createlink",!1,hr(Ye)):nn(Q,pe,Ye)},Bi=Q=>{Q.hasPlugin("rtc",!0)?Q.execCommand("unlink"):as(Q)},vi=(Q,pe)=>{var Ae;const Ye=Q.dom.select("img",pe)[0];if(Ye){const _t=Q.dom.getParents(Ye,"a[href]",pe)[0];_t&&((Ae=_t.parentNode)===null||Ae===void 0||Ae.insertBefore(Ye,_t),Q.dom.remove(_t))}},vl=(Q,pe,Ae)=>{var Ye;const _t=Q.select("img",pe)[0];if(_t){const oo=Q.create("a",Ae);(Ye=_t.parentNode)===null||Ye===void 0||Ye.insertBefore(oo,_t),oo.appendChild(_t)}},Gn=Q=>ce(Q.value)?Q.value:"",Ro=Q=>ce(Q.text)?Q.text:ce(Q.title)?Q.title:"",$a=(Q,pe)=>{const Ae=[];return yt.each(Q,Ye=>{const _t=Ro(Ye);if(Ye.menu!==void 0){const oo=$a(Ye.menu,pe);Ae.push({text:_t,items:oo})}else{const oo=pe(Ye);Ae.push({text:_t,value:oo})}}),Ae},$r=(Q=Gn)=>pe=>Ut.from(pe).map(Ae=>$a(Ae,Q)),Dr={sanitize:Q=>$r(Gn)(Q),sanitizeWith:$r,createUi:(Q,pe)=>Ae=>({name:Q,type:"listbox",label:pe,items:Ae}),getValue:Gn},au=Q=>dn(Q,"items"),zs=(Q,pe)=>Gt(pe,Ae=>au(Ae)?zs(Q,Ae.items):dt(Ae.value===Q,Ae)),yd=(Q,pe,Ae,Ye)=>{const _t=Ye[pe],oo=Q.length>0;return _t!==void 0?zs(_t,Ae).map(Go=>({url:{value:Go.value,meta:{text:oo?Q:Go.text,attach:Bt}},text:oo?Q:Go.text})):Ut.none()},ni=(Q,pe)=>pe==="link"?Q.link:pe==="anchor"?Q.anchor:Ut.none(),_i={init:(Q,pe)=>{const Ae={text:Q.text,title:Q.title},Ye=sn=>{var is;return dt(Ae.title.length<=0,Ut.from((is=sn.meta)===null||is===void 0?void 0:is.title).getOr(""))},_t=sn=>{var is;return dt(Ae.text.length<=0,Ut.from((is=sn.meta)===null||is===void 0?void 0:is.text).getOr(sn.value))},oo=sn=>{const is=_t(sn.url),tr=Ye(sn.url);return is.isSome()||tr.isSome()?Ut.some({...is.map(Jo=>({text:Jo})).getOr({}),...tr.map(Jo=>({title:Jo})).getOr({})}):Ut.none()},Go=(sn,is)=>{const tr=ni(pe,is).getOr([]);return yd(Ae.text,is,tr,sn)};return{onChange:(sn,is)=>{const tr=is.name;return tr==="url"?oo(sn()):ve(["anchor","link"],tr)?Go(sn(),tr):((tr==="text"||tr==="title")&&(Ae[tr]=sn()[tr]),Ut.none())}}},getDelta:yd};var ys=tinymce.util.Tools.resolve("tinymce.util.Delay");const ga=(Q,pe,Ae)=>{const Ye=Q.selection.getRng();ys.setEditorTimeout(Q,()=>{Q.windowManager.confirm(pe,_t=>{Q.selection.setRng(Ye),Ae(_t)})})},si=Q=>{const pe=Q.href;return pe.indexOf("@")>0&&pe.indexOf("/")===-1&&pe.indexOf("mailto:")===-1?Ut.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:Ye=>({...Ye,href:"mailto:"+pe})}):Ut.none()},iu=(Q,pe)=>Ae=>{const Ye=Ae.href;return Q===1&&!tn(Ye)||Q===0&&/^\s*www(\.|\d\.)/i.test(Ye)?Ut.some({message:`The URL you entered seems to be an external link. Do you want to add the required ${pe}:// prefix?`,preprocess:oo=>({...oo,href:pe+"://"+Ye})}):Ut.none()},xi={preprocess:(Q,pe)=>Gt([si,iu(Ge(Q),pt(Q))],Ae=>Ae(pe)).fold(()=>Promise.resolve(pe),Ae=>new Promise(Ye=>{ga(Q,Ae.message,_t=>{Ye(_t?Ae.preprocess(pe):pe)})}))},Wc={getAnchors:Q=>{const pe=Q.dom.select("a:not([href])"),Ae=Fe(pe,Ye=>{const _t=Ye.name||Ye.id;return _t?[{text:_t,value:"#"+_t}]:[]});return Ae.length>0?Ut.some([{text:"None",value:""}].concat(Ae)):Ut.none()}},lr={getClasses:Q=>{const pe=cn(Q);return pe.length>0?Dr.sanitize(pe):Ut.none()}},ha=Q=>{try{return Ut.some(JSON.parse(Q))}catch{return Ut.none()}},Gi={getLinks:Q=>{const pe=Ye=>Q.convertURL(Ye.value||Ye.url||"","href"),Ae=Cr(Q);return new Promise(Ye=>{ce(Ae)?fetch(Ae).then(_t=>_t.ok?_t.text().then(ha):Promise.reject()).then(Ye,()=>Ye(Ut.none())):st(Ae)?Ae(_t=>Ye(Ut.some(_t))):Ye(Ut.from(Ae))}).then(Ye=>Ye.bind(Dr.sanitizeWith(pe)).map(_t=>_t.length>0?[{text:"None",value:""}].concat(_t):_t))}},Hr={getRels:(Q,pe)=>{const Ae=ks(Q);if(Ae.length>0){const Ye=D(pe,"_blank"),_t=zo(Q)===!1,oo=Xn=>rs(Dr.getValue(Xn),Ye);return(_t?Dr.sanitizeWith(oo):Dr.sanitize)(Ae)}return Ut.none()}},ba=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],Yn={getTargets:Q=>{const pe=Ht(Q);return $e(pe)?Dr.sanitize(pe).orThunk(()=>Ut.some(ba)):pe===!1?Ut.none():Ut.some(ba)}},vs=(Q,pe,Ae)=>{const Ye=Q.getAttrib(pe,Ae);return Ye!==null&&Ye.length>0?Ut.some(Ye):Ut.none()},Yi=(Q,pe)=>{const Ae=Q.dom,_t=St(Q)?Ut.some(sa(Q.selection,pe)):Ut.none(),oo=pe.bind(tr=>Ut.from(Ae.getAttrib(tr,"href"))),Go=pe.bind(tr=>Ut.from(Ae.getAttrib(tr,"target"))),Xn=pe.bind(tr=>vs(Ae,tr,"rel")),sn=pe.bind(tr=>vs(Ae,tr,"class")),is=pe.bind(tr=>vs(Ae,tr,"title"));return{url:oo,text:_t,title:is,target:Go,rel:Xn,linkClass:sn}},br={collect:(Q,pe)=>Gi.getLinks(Q).then(Ae=>{const Ye=Yi(Q,pe);return{anchor:Ye,catalogs:{targets:Yn.getTargets(Q),rels:Hr.getRels(Q,Ye.target),classes:lr.getClasses(Q),anchor:Wc.getAnchors(Q),link:Ae},optNode:pe,flags:{titleEnabled:fn(Q)}}})},_l=(Q,pe)=>Ae=>{const Ye=Ae.getData();if(!Ye.url.value){Bi(Q),Ae.close();return}const _t=Xn=>Ut.from(Ye[Xn]).filter(sn=>!D(pe.anchor[Xn],sn)),oo={href:Ye.url.value,text:_t("text"),target:_t("target"),rel:_t("rel"),class:_t("linkClass"),title:_t("title")},Go={href:Ye.url.value,attach:Ye.url.meta!==void 0&&Ye.url.meta.attach?Ye.url.meta.attach:Bt};xi.preprocess(Q,oo).then(Xn=>{cl(Q,Go,Xn)}),Ae.close()},Vs=Q=>{const pe=Ln(Q);return br.collect(Q,pe)},Pn=(Q,pe)=>{const Ae=Q.anchor,Ye=Ae.url.getOr("");return{url:{value:Ye,meta:{original:{value:Ye}}},text:Ae.text.getOr(""),title:Ae.title.getOr(""),anchor:Ye,link:Ye,rel:Ae.rel.getOr(""),target:Ae.target.or(pe).getOr(""),linkClass:Ae.linkClass.getOr("")}},ki=(Q,pe,Ae)=>{const Ye=[{name:"url",type:"urlinput",filetype:"file",label:"URL",picker_text:"Browse links"}],_t=Q.anchor.text.map(()=>({name:"text",type:"input",label:"Text to display"})).toArray(),oo=Q.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],Go=Ut.from($t(Ae)),Xn=Pn(Q,Go),sn=Q.catalogs,is=_i.init(Xn,sn);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:uo([Ye,_t,oo,bt([sn.anchor.map(Dr.createUi("anchor","Anchors")),sn.rels.map(Dr.createUi("rel","Rel")),sn.targets.map(Dr.createUi("target","Open link in...")),sn.link.map(Dr.createUi("link","Link list")),sn.classes.map(Dr.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Xn,onChange:(Jo,{name:dl})=>{is.onChange(Jo.getData,{name:dl}).each(Ul=>{Jo.setData(Ul)})},onSubmit:pe}},Oa=Q=>{Vs(Q).then(Ae=>{const Ye=_l(Q,Ae);return ki(Ae,Ye,Q)}).then(Ae=>{Q.windowManager.open(Ae)})},Vr=Q=>{Q.addCommand("mceLink",(pe,Ae)=>{(Ae==null?void 0:Ae.dialog)===!0||!j(Q)?Oa(Q):Q.dispatch("contexttoolbar-show",{toolbarKey:"quicklink"})})},za=Q=>{Q.addShortcut("Meta+K","",()=>{Q.execCommand("mceLink")})},Qs=Q=>{let pe=Q;return{get:()=>pe,set:_t=>{pe=_t}}},_d=Q=>{const pe=Qs(Ut.none()),Ae=()=>pe.get().each(Q);return{clear:()=>{Ae(),pe.set(Ut.none())},isSet:()=>pe.get().isSome(),get:()=>pe.get(),set:Xn=>{Ae(),pe.set(Ut.some(Xn))}}},wo=()=>{const Q=_d(Bt);return{...Q,on:Ae=>Q.get().each(Ae)}};var xl=tinymce.util.Tools.resolve("tinymce.util.VK");const yr=(Q,pe)=>{document.body.appendChild(Q),Q.dispatchEvent(pe),document.body.removeChild(Q)},Fs=Q=>{const pe=document.createElement("a");pe.target="_blank",pe.href=Q,pe.rel="noreferrer noopener";const Ae=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});document.dispatchEvent(Ae),yr(pe,Ae)},qc=Q=>Q.altKey===!0&&Q.shiftKey===!1&&Q.ctrlKey===!1&&Q.metaKey===!1,pn=(Q,pe)=>{if(pe){const Ae=On(pe);if(/^#/.test(Ae)){const Ye=Q.dom.select(Ae);Ye.length&&Q.selection.scrollIntoView(Ye[0],!0)}else Fs(pe.href)}},Vl=Q=>{const pe=Q.selection.getRng(),Ae=pe.startContainer;return ao(Ae)&&pe.startContainer===pe.endContainer&&Q.dom.select("img",Ae).length===1},ya=(Q,pe)=>{const Ae=Is(Q.dom.getParents(pe));return dt(Ae.length===1,Ae[0])},Mo=Q=>{const pe=os(Q.selection.getRng());return dt(pe.length>0,pe[0]).or(ya(Q,Q.selection.getNode()))},Li=Q=>Q.selection.isCollapsed()||Vl(Q)?ya(Q,Q.selection.getStart()):Mo(Q),ri=Q=>{const pe=wo(),Ae=()=>pe.get().or(Li(Q)),Ye=()=>Ae().each(_t=>pn(Q,_t));return Q.on("contextmenu",_t=>{ya(Q,_t.target).each(pe.set)}),Q.on("SelectionChange",()=>{pe.isSet()||Li(Q).each(pe.set)}),Q.on("click",_t=>{pe.clear();const oo=Is(Q.dom.getParents(_t.target));oo.length===1&&xl.metaKeyPressed(_t)&&(_t.preventDefault(),pn(Q,oo[0]))}),Q.on("keydown",_t=>{pe.clear(),!_t.isDefaultPrevented()&&_t.keyCode===13&&qc(_t)&&Ae().each(oo=>{_t.preventDefault(),pn(Q,oo)})}),{gotoSelectedLink:Ye}},Ns=Q=>()=>{Q.execCommand("mceLink",!1,{dialog:!0})},jl=(Q,pe)=>(Q.on("NodeChange",pe),()=>Q.off("NodeChange",pe)),er=Q=>pe=>{const Ae=()=>{pe.setActive(!Q.mode.isReadOnly()&&Hs(Q,Q.selection.getNode())),pe.setEnabled(Q.selection.isEditable())};return Ae(),jl(Q,Ae)},bc=Q=>pe=>{const Ae=()=>{pe.setEnabled(Q.selection.isEditable())};return Ae(),jl(Q,Ae)},Gr=Q=>pe=>{const Ae=oo=>yn(oo)||ra(Q.selection.getRng()),Ye=Q.dom.getParents(Q.selection.getStart()),_t=oo=>{pe.setEnabled(Ae(oo)&&Q.selection.isEditable())};return _t(Ye),jl(Q,oo=>_t(oo.parents))},Vn=(Q,pe)=>{Q.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onAction:Ns(Q),onSetup:er(Q)}),Q.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:pe.gotoSelectedLink,onSetup:Gr(Q)}),Q.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:()=>Bi(Q),onSetup:Gr(Q)})},wl=(Q,pe)=>{Q.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:pe.gotoSelectedLink,onSetup:Gr(Q)}),Q.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Ns(Q),onSetup:bc(Q)}),Q.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:()=>Bi(Q),onSetup:Gr(Q)})},Kc=Q=>{const pe="link unlink openlink",Ae="link";Q.ui.registry.addContextMenu("link",{update:Ye=>Q.dom.isEditable(Ye)?yn(Q.dom.getParents(Ye,"a"))?pe:Ae:""})},xd=(Q,pe)=>{const Ae=oo=>{oo.selection.collapse(!1)},Ye=oo=>{const Go=Q.selection.getNode();return oo.setEnabled(Hs(Q,Go)),Bt},_t=oo=>{const Go=Ln(Q),Xn=St(Q);if(Go.isNone()&&Xn){const sn=sa(Q.selection,Go);return dt(sn.length===0,oo)}else return Ut.none()};Q.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:er(Q)},label:"Link",predicate:oo=>To(Q)&&Hs(Q,oo),initValue:()=>Ln(Q).fold(Rt(""),On),commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:oo=>{const Go=Q.selection.getNode();return oo.setActive(Hs(Q,Go)),er(Q)(oo)},onAction:oo=>{const Go=oo.getValue(),Xn=_t(Go);cl(Q,{href:Go,attach:Bt},{href:Go,text:Xn,title:Ut.none(),rel:Ut.none(),target:Ut.from($t(Q)),class:Ut.none()}),Ae(Q),oo.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:Ye,onAction:oo=>{Bi(Q),oo.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:Ye,onAction:oo=>{pe.gotoSelectedLink(),oo.hide()}}]})},Ds=Q=>{const pe=ri(Q);Vn(Q,pe),wl(Q,pe),Kc(Q),xd(Q,pe)};var Na=()=>{w.add("link",Q=>{qo(Q),Vr(Q),Ds(Q),za(Q)})};Na()})();(function(){var w=tinymce.util.Tools.resolve("tinymce.PluginManager");const g=(E,P,q)=>{var ge;return q(E,P.prototype)?!0:((ge=E.constructor)===null||ge===void 0?void 0:ge.name)===P.name},S=E=>{const P=typeof E;return E===null?"null":P==="object"&&Array.isArray(E)?"array":P==="object"&&g(E,String,(q,ge)=>ge.isPrototypeOf(q))?"string":P},B=E=>P=>S(P)===E,W=E=>P=>typeof P===E,te=B("string"),ce=B("object"),Ee=B("array"),$e=W("boolean"),We=E=>E==null,Me=E=>!We(E),Ot=W("function"),mo=W("number"),st=()=>{},ut=(E,P)=>q=>E(P(q)),Bt=E=>()=>E,Rt=(E,P)=>E===P;function Ke(E,...P){return(...q)=>{const ge=P.concat(q);return E.apply(null,ge)}}const Ut=E=>P=>!E(P),ft=Bt(!1);class ue{constructor(P,q){this.tag=P,this.value=q}static some(P){return new ue(!0,P)}static none(){return ue.singletonNone}fold(P,q){return this.tag?q(this.value):P()}isSome(){return this.tag}isNone(){return!this.tag}map(P){return this.tag?ue.some(P(this.value)):ue.none()}bind(P){return this.tag?P(this.value):ue.none()}exists(P){return this.tag&&P(this.value)}forall(P){return!this.tag||P(this.value)}filter(P){return!this.tag||P(this.value)?this:ue.none()}getOr(P){return this.tag?this.value:P}or(P){return this.tag?this:P}getOrThunk(P){return this.tag?this.value:P()}orThunk(P){return this.tag?this:P()}getOrDie(P){if(this.tag)return this.value;throw new Error(P??"Called getOrDie on None")}static from(P){return Me(P)?ue.some(P):ue.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(P){this.tag&&P(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}ue.singletonNone=new ue(!1);const Ct=Array.prototype.slice,ve=Array.prototype.indexOf,ot=Array.prototype.push,bn=(E,P)=>ve.call(E,P),ln=(E,P)=>bn(E,P)>-1,uo=(E,P)=>{for(let q=0,ge=E.length;q{const q=E.length,ge=new Array(q);for(let xe=0;xe{for(let q=0,ge=E.length;q{const q=[];for(let ge=0,xe=E.length;ge{if(E.length===0)return[];{let q=P(E[0]);const ge=[];let xe=[];for(let at=0,xo=E.length;at(Gt(E,(ge,xe)=>{q=P(q,ge,xe)}),q),Kt=(E,P,q)=>{for(let ge=0,xe=E.length;geKt(E,P,ft),Ge=E=>{const P=[];for(let q=0,ge=E.length;qGe(Fe(E,P)),Cr=E=>{const P=Ct.call(E,0);return P.reverse(),P},$t=(E,P)=>P>=0&&P$t(E,0),Ht=E=>$t(E,E.length-1),ks=(E,P)=>{const q=[],ge=Ot(P)?xe=>uo(q,at=>P(at,xe)):xe=>ln(q,xe);for(let xe=0,at=E.length;xeE.exists(ge=>q(ge,P)),fn=(E,P,q=Rt)=>zo(E,P,q).getOr(E.isNone()&&P.isNone()),zo=(E,P,q)=>E.isSome()&&P.isSome()?ue.some(q(E.getOrDie(),P.getOrDie())):ue.none(),j=8,Fr=11,Cs=1,Sn=3,bi=(E,P)=>{const ge=(P||document).createElement("div");if(ge.innerHTML=E,!ge.hasChildNodes()||ge.childNodes.length>1){const xe="HTML does not have a single root node";throw console.error(xe,E),new Error(xe)}return Bn(ge.childNodes[0])},qi=(E,P)=>{const ge=(P||document).createElement(E);return Bn(ge)},mn=(E,P)=>{const ge=(P||document).createTextNode(E);return Bn(ge)},Bn=E=>{if(E==null)throw new Error("Node cannot be null or undefined");return{dom:E}},Le={fromHtml:bi,fromTag:qi,fromText:mn,fromDom:Bn,fromPoint:(E,P,q)=>ue.from(E.dom.elementFromPoint(P,q)).map(Bn)},Lt=(E,P)=>{const q=E.dom;if(q.nodeType!==Cs)return!1;{const ge=q;if(ge.matches!==void 0)return ge.matches(P);if(ge.msMatchesSelector!==void 0)return ge.msMatchesSelector(P);if(ge.webkitMatchesSelector!==void 0)return ge.webkitMatchesSelector(P);if(ge.mozMatchesSelector!==void 0)return ge.mozMatchesSelector(P);throw new Error("Browser lacks native selectors")}},yt=(E,P)=>E.dom===P.dom,rt=(E,P)=>{const q=E.dom,ge=P.dom;return q===ge?!1:q.contains(ge)},ao=Lt,ko=typeof window<"u"?window:Function("return this;")(),tn=(E,P)=>{let q=P??ko;for(let ge=0;ge{const q=E.split(".");return tn(q,P)},rs=(E,P)=>On(E,P),Zn=(E,P)=>{const q=rs(E,P);if(q==null)throw new Error(E+" not available on this browser");return q},Ln=Object.getPrototypeOf,Hs=E=>Zn("HTMLElement",E),sa=E=>{const P=On("ownerDocument.defaultView",E);return ce(E)&&(Hs(P).prototype.isPrototypeOf(E)||/^HTML\w*Element$/.test(Ln(E).constructor.name))},os=E=>E.dom.nodeName.toLowerCase(),Is=E=>E.dom.nodeType,yn=E=>P=>Is(P)===E,ra=E=>Is(E)===j||os(E)==="#comment",St=E=>Vo(E)&&sa(E.dom),Vo=yn(Cs),an=yn(Sn),Kr=yn(Fr),yi=E=>P=>Vo(P)&&os(P)===E,vt=E=>ue.from(E.dom.parentNode).map(Le.fromDom),oi=E=>ue.from(E.dom.parentElement).map(Le.fromDom),nn=E=>ue.from(E.dom.nextSibling).map(Le.fromDom),Mi=E=>Fe(E.dom.childNodes,Le.fromDom),as=(E,P)=>{const q=E.dom.childNodes;return ue.from(q[P]).map(Le.fromDom)},hr=E=>as(E,0),yl=E=>as(E,E.dom.childNodes.length-1),cl=E=>Kr(E)&&Me(E.dom.host),Bi=E=>Le.fromDom(E.dom.getRootNode()),vi=E=>{const P=Bi(E);return cl(P)?ue.some(P):ue.none()},vl=E=>Le.fromDom(E.dom.host),Gn=E=>{const P=an(E)?E.dom.parentNode:E.dom;if(P==null||P.ownerDocument===null)return!1;const q=P.ownerDocument;return vi(Le.fromDom(P)).fold(()=>q.body.contains(P),ut(Gn,vl))};var Ro=(E,P,q,ge,xe)=>E(q,ge)?ue.some(q):Ot(xe)&&xe(q)?ue.none():P(q,ge,xe);const $a=(E,P,q)=>{let ge=E.dom;const xe=Ot(q)?q:ft;for(;ge.parentNode;){ge=ge.parentNode;const at=Le.fromDom(ge);if(P(at))return ue.some(at);if(xe(at))break}return ue.none()},$r=(E,P,q)=>Ro((xe,at)=>at(xe),$a,E,P,q),bd=(E,P,q)=>$a(E,ge=>Lt(ge,P),q),Vt=(E,P,q)=>Ro((xe,at)=>Lt(xe,at),bd,E,P,q),Dr=E=>Vt(E,"[contenteditable]"),au=(E,P=!1)=>Gn(E)?E.dom.isContentEditable:Dr(E).fold(Bt(P),q=>zs(q)==="true"),zs=E=>E.dom.contentEditable,yd=(E,P)=>{vt(E).each(ge=>{ge.dom.insertBefore(P.dom,E.dom)})},ni=(E,P)=>{nn(E).fold(()=>{vt(E).each(xe=>{_i(xe,P)})},ge=>{yd(ge,P)})},Ki=(E,P)=>{hr(E).fold(()=>{_i(E,P)},ge=>{E.dom.insertBefore(P.dom,ge.dom)})},_i=(E,P)=>{E.dom.appendChild(P.dom)},ys=(E,P)=>{Gt(P,q=>{yd(E,q)})},ga=(E,P)=>{Gt(P,q=>{_i(E,q)})},si=E=>{E.dom.textContent="",Gt(Mi(E),P=>{iu(P)})},iu=E=>{const P=E.dom;P.parentNode!==null&&P.parentNode.removeChild(P)};var gc=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),xi=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),lu=tinymce.util.Tools.resolve("tinymce.util.VK");const Wc=E=>Fe(E,Le.fromDom),Hn=Object.keys,lr=(E,P)=>{const q=Hn(E);for(let ge=0,xe=q.length;ge(P,q)=>{E[q]=P},Zu=(E,P,q,ge)=>{lr(E,(xe,at)=>{(P(xe,at)?q:ge)(xe,at)})},Gi=(E,P)=>{const q={};return Zu(E,P,ha(q),st),q},vd=(E,P,q)=>{if(te(q)||$e(q)||mo(q))E.setAttribute(P,q+"");else throw console.error("Invalid call to Attribute.set. Key ",P,":: Value ",q,":: Element ",E),new Error("Attribute value was not simple")},Hr=(E,P)=>{const q=E.dom;lr(P,(ge,xe)=>{vd(q,xe,ge)})},ba=E=>dt(E.dom.attributes,(P,q)=>(P[q.name]=q.value,P),{}),wi=(E,P)=>Le.fromDom(E.dom.cloneNode(P)),Yn=E=>wi(E,!0),vs=(E,P)=>{const q=Le.fromTag(P),ge=ba(E);return Hr(q,ge),q},Yi=(E,P)=>{const q=vs(E,P);ni(E,q);const ge=Mi(E);return ga(q,ge),iu(E),q};var hc=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),br=tinymce.util.Tools.resolve("tinymce.util.Tools");const _l=E=>P=>Me(P)&&P.nodeName.toLowerCase()===E,Vs=E=>P=>Me(P)&&E.test(P.nodeName),Pn=E=>Me(E)&&E.nodeType===3,ki=E=>Me(E)&&E.nodeType===1,Oa=Vs(/^(OL|UL|DL)$/),Vr=Vs(/^(OL|UL)$/),za=_l("ol"),Qs=Vs(/^(LI|DT|DD)$/),_d=Vs(/^(DT|DD)$/),wo=Vs(/^(TH|TD)$/),xl=_l("br"),yr=E=>{var P;return((P=E.parentNode)===null||P===void 0?void 0:P.firstChild)===E},Fs=(E,P)=>Me(P)&&P.nodeName in E.schema.getTextBlockElements(),qc=(E,P)=>Me(E)&&E.nodeName in P,pn=(E,P)=>Me(P)&&P.nodeName in E.schema.getVoidElements(),Vl=(E,P)=>xl(P)?E.isBlock(P.nextSibling)&&!xl(P.previousSibling):!1,ya=(E,P,q)=>{const ge=E.isEmpty(P);return q&&E.select("span[data-mce-type=bookmark]",P).length>0?!1:ge},Mo=(E,P)=>E.isChildOf(P,E.getRoot()),Li=E=>P=>P.options.get(E),ri=E=>{const P=E.options.register;P("lists_indent_on_tab",{processor:"boolean",default:!0})},Ns=Li("lists_indent_on_tab"),jl=Li("forced_root_block"),er=Li("forced_root_block_attrs"),bc=(E,P,q={})=>{const ge=E.dom,xe=E.schema.getBlockElements(),at=ge.createFragment(),xo=jl(E),Uo=er(E);let Bo,io,Wn=!1;for(io=ge.create(xo,{...Uo,...q.style?{style:q.style}:{}}),qc(P.firstChild,xe)||at.appendChild(io);Bo=P.firstChild;){const sr=Bo.nodeName;!Wn&&(sr!=="SPAN"||Bo.getAttribute("data-mce-type")!=="bookmark")&&(Wn=!0),qc(Bo,xe)?(at.appendChild(Bo),io=null):(io||(io=ge.create(xo,Uo),at.appendChild(io)),io.appendChild(Bo))}return!Wn&&io&&io.appendChild(ge.create("br",{"data-mce-bogus":"1"})),at},Gr=hc.DOM,Vn=(E,P,q)=>{const ge=io=>{const Wn=io.parentNode;Wn&&br.each(xe,sr=>{Wn.insertBefore(sr,q.parentNode)}),Gr.remove(io)},xe=Gr.select('span[data-mce-type="bookmark"]',P),at=bc(E,q),xo=Gr.createRng();xo.setStartAfter(q),xo.setEndAfter(P);const Uo=xo.extractContents();for(let io=Uo.firstChild;io;io=io.firstChild)if(io.nodeName==="LI"&&E.dom.isEmpty(io)){Gr.remove(io);break}E.dom.isEmpty(Uo)||Gr.insertAfter(Uo,P),Gr.insertAfter(at,P);const Bo=q.parentElement;Bo&&ya(E.dom,Bo)&&ge(Bo),Gr.remove(q),ya(E.dom,P)&&Gr.remove(P)},wl=yi("dd"),Kc=yi("dt"),xd=(E,P)=>{wl(P)?Yi(P,"dt"):Kc(P)&&oi(P).each(q=>Vn(E,q.dom,P.dom))},Ds=E=>{Kc(E)&&Yi(E,"dd")},Na=(E,P,q)=>{P==="Indent"?Gt(q,Ds):Gt(q,ge=>xd(E,ge))},Q=(E,P)=>{if(Pn(E))return{container:E,offset:P};const q=gc.getNode(E,P);return Pn(q)?{container:q,offset:P>=E.childNodes.length?q.data.length:0}:q.previousSibling&&Pn(q.previousSibling)?{container:q.previousSibling,offset:q.previousSibling.data.length}:q.nextSibling&&Pn(q.nextSibling)?{container:q.nextSibling,offset:0}:{container:E,offset:P}},pe=E=>{const P=E.cloneRange(),q=Q(E.startContainer,E.startOffset);P.setStart(q.container,q.offset);const ge=Q(E.endContainer,E.endOffset);return P.setEnd(ge.container,ge.offset),P},Ae=["OL","UL","DL"],Ye=Ae.join(","),_t=(E,P)=>{const q=P||E.selection.getStart(!0);return E.dom.getParent(q,Ye,Ul(E,q))},oo=(E,P)=>Me(E)&&P.length===1&&P[0]===E,Go=E=>D(E.querySelectorAll(Ye),Oa),Xn=E=>{const P=_t(E),q=E.selection.getSelectedBlocks();return oo(P,q)?Go(P):D(q,ge=>Oa(ge)&&P!==ge)},sn=(E,P)=>{const q=br.map(P,ge=>{const xe=E.dom.getParent(ge,"li,dd,dt",Ul(E,ge));return xe||ge});return ks(q)},is=E=>{const P=E.selection.getSelectedBlocks();return D(sn(E,P),Qs)},tr=E=>D(is(E),_d),Jo=(E,P)=>{const q=E.dom.getParents(P,"TD,TH");return q.length>0?q[0]:E.getBody()},dl=(E,P)=>!Oa(P)&&!Qs(P)&&uo(Ae,q=>E.isValidChild(P.nodeName,q)),Ul=(E,P)=>{const q=E.dom.getParents(P,E.dom.isBlock),ge=at=>at.nodeName.toLowerCase()!==jl(E);return qo(q,at=>ge(at)&&dl(E.schema,at)).getOr(E.getBody())},yc=E=>vt(E).exists(P=>Qs(P.dom)&&hr(P).exists(q=>!Oa(q.dom))&&yl(P).exists(q=>!Oa(q.dom))),Qm=(E,P)=>{const q=E.dom.getParents(P,"ol,ul",Ul(E,P));return Ht(q)},lh=E=>{const P=Qm(E,E.selection.getStart()),q=D(E.selection.getSelectedBlocks(),Vr);return P.toArray().concat(q)},Pi=E=>{const P=E.selection.getStart();return E.dom.getParents(P,"ol,ul",Ul(E,P))},ep=E=>{const P=lh(E),q=Pi(E);return qo(q,ge=>yc(Le.fromDom(ge))).fold(()=>ch(E,P),ge=>[ge])},ch=(E,P)=>{const q=Fe(P,ge=>Qm(E,ge).getOr(ge));return ks(q)},$f=E=>/\btox\-/.test(E.className),tg=(E,P)=>Kt(E,Oa,wo).exists(q=>q.nodeName===P&&!$f(q)),zt=(E,P)=>P!==null&&!E.dom.isEditable(P),wd=E=>{const P=_t(E);return zt(E,P)},kd=(E,P)=>{const q=E.dom.getParent(P,"ol,ul,dl");return zt(E,q)},Hf=(E,P)=>{const q=E.selection.getNode();return P({parents:E.dom.getParents(q),element:q}),E.on("NodeChange",P),()=>E.off("NodeChange",P)},va=(E,P)=>{const ge=document.createDocumentFragment();return Gt(E,xe=>{ge.appendChild(xe.dom)}),Le.fromDom(ge)},Cd=(E,P,q)=>E.dispatch("ListMutation",{action:P,element:q}),dh=(E=>P=>P.replace(E,""))(/^\s+|\s+$/g),og=E=>E.length>0,ng=E=>!og(E),Zb=E=>E.style!==void 0&&Ot(E.style.getPropertyValue),uh=(E,P,q)=>{if(!te(q))throw console.error("Invalid call to CSS.set. Property ",P,":: Value ",q,":: Element ",E),new Error("CSS value must be a string: "+q);Zb(E)&&E.style.setProperty(P,q)},Wb=(E,P,q)=>{const ge=E.dom;uh(ge,P,q)},Vf=E=>ao(E,"OL,UL"),Zl=E=>ao(E,"LI"),Gc=E=>hr(E).exists(Vf),Wl=E=>yl(E).exists(Vf),Yr=E=>"listAttributes"in E,Ci=E=>"isComment"in E,Sd=E=>"isFragment"in E,En=E=>E.depth>0,kl=E=>E.isSelected,Wu=E=>{const P=Mi(E),q=Wl(E)?P.slice(0,-1):P;return Fe(q,Yn)},qu=(E,P,q)=>vt(E).filter(Vo).map(ge=>({depth:P,dirty:!1,isSelected:q,content:Wu(E),itemAttributes:ba(E),listAttributes:ba(ge),listType:os(ge),isInPreviousLi:!1})),ai=(E,P)=>{_i(E.item,P.list)},cr=E=>{for(let P=1;P{zo(Ht(E),pt(P),ai)},aa=(E,P)=>{const q={list:Le.fromTag(P,E),item:Le.fromTag("li",E)};return _i(q.list,q.item),q},_s=(E,P,q)=>{const ge=[];for(let xe=0;xe{for(let q=0;q{Yr(P)&&(Hr(q.list,P.listAttributes),Hr(q.item,P.itemAttributes)),ga(q.item,P.content)})},Td=(E,P)=>{os(E.list)!==P.listType&&(E.list=Yi(E.list,P.listType)),Hr(E.list,P.listAttributes)},Rr=(E,P,q)=>{const ge=Le.fromTag("li",E);return Hr(ge,P),ga(ge,q),ge},Ha=(E,P)=>{_i(E.list,P),E.item=P},Da=(E,P,q)=>{const ge=P.slice(0,q.depth);return Ht(ge).each(xe=>{if(Yr(q)){const at=Rr(E,q.itemAttributes,q.content);Ha(xe,at),Td(xe,q)}else if(Sd(q))ga(xe.item,q.content);else{const at=Le.fromHtml(``);_i(xe.list,at)}}),ge},Sr=(E,P,q)=>{const ge=_s(E,q,q.depth-P.length);return cr(ge),Ed(ge,q),Rs(P,ge),P.concat(ge)},Yc=(E,P)=>{let q=ue.none();const ge=dt(P,(xe,at,xo)=>Ci(at)?xo===0?(q=ue.some(at),xe):Da(E,xe,at):at.depth>xe.length?Sr(E,xe,at):Da(E,xe,at),[]);return q.each(xe=>{const at=Le.fromHtml(``);pt(ge).each(xo=>{Ki(xo.list,at)})}),pt(ge).map(xe=>xe.list)},rn=(E,P)=>{switch(E){case"Indent":P.depth++;break;case"Outdent":P.depth--;break;case"Flatten":P.depth=0}P.dirty=!0},vr=(E,P)=>{Yr(E)&&Yr(P)&&(E.listType=P.listType,E.listAttributes={...P.listAttributes})},Va=E=>{E.listAttributes=Gi(E.listAttributes,(P,q)=>q!=="start")},ql=(E,P)=>{const q=E[P].depth,ge=at=>at.depth===q&&!at.dirty,xe=at=>at.depthKt(E.slice(P+1),ge,xe))},jr=E=>(Gt(E,(P,q)=>{ql(E,q).fold(()=>{P.dirty&&Yr(P)&&Va(P)},ge=>vr(P,ge))}),E),so=E=>{let P=E;return{get:()=>P,set:xe=>{P=xe}}},Cl=(E,P,q,ge)=>{var xe;if(ra(ge))return[{depth:E+1,content:(xe=ge.dom.nodeValue)!==null&&xe!==void 0?xe:"",dirty:!1,isSelected:!1,isComment:!0}];P.each(Uo=>{yt(Uo.start,ge)&&q.set(!0)});const at=qu(ge,E,q.get());P.each(Uo=>{yt(Uo.end,ge)&&q.set(!1)});const xo=yl(ge).filter(Vf).map(Uo=>Nn(E,P,q,Uo)).getOr([]);return at.toArray().concat(xo)},Sl=(E,P,q,ge)=>hr(ge).filter(Vf).fold(()=>Cl(E,P,q,ge),xe=>{const at=dt(Mi(ge),(xo,Uo,Bo)=>{if(Bo===0)return xo;if(Zl(Uo))return xo.concat(Cl(E,P,q,Uo));{const io={isFragment:!0,depth:E,content:[Uo],isSelected:!1,dirty:!1,parentListType:os(xe)};return xo.concat(io)}},[]);return Nn(E,P,q,xe).concat(at)}),Nn=(E,P,q,ge)=>To(Mi(ge),xe=>{const at=Vf(xe)?Nn:Sl,xo=E+1;return at(xo,P,q,xe)}),du=(E,P)=>{const q=so(!1),ge=0;return Fe(E,xe=>({sourceList:xe,entries:Nn(ge,P,q,xe)}))},tp=(E,P)=>{const q=jr(P);return Fe(q,ge=>{const xe=Ci(ge)?va([Le.fromHtml(``)]):va(ge.content),at=Yr(ge)?ge.itemAttributes:{};return Le.fromDom(bc(E,xe.dom,at))})},Kl=(E,P)=>{const q=jr(P);return Yc(E.contentDocument,q).toArray()},un=(E,P)=>To(bt(P,En),q=>pt(q).exists(En)?Kl(E,q):tp(E,q)),Ra=(E,P)=>{Gt(D(E,kl),q=>rn(P,q))},Ku=E=>{const P=Fe(is(E),Le.fromDom);return zo(qo(P,Ut(Gc)),qo(Cr(P),Ut(Gc)),(q,ge)=>({start:q,end:ge}))},vc=(E,P,q)=>{const ge=du(P,Ku(E));Gt(ge,xe=>{Ra(xe.entries,q);const at=un(E,xe.entries);Gt(at,xo=>{Cd(E,q==="Indent"?"IndentList":"OutdentList",xo.dom)}),ys(xe.sourceList,at),iu(xe.sourceList)})},jf=(E,P)=>{const q=Wc(ep(E)),ge=Wc(tr(E));let xe=!1;if(q.length||ge.length){const at=E.selection.getBookmark();vc(E,q,P),Na(E,P,ge),E.selection.moveToBookmark(at),E.selection.setRng(pe(E.selection.getRng())),E.nodeChanged(),xe=!0}return xe},El=(E,P)=>!wd(E)&&jf(E,P),ja=E=>El(E,"Indent"),Gl=E=>El(E,"Outdent"),Ad=E=>El(E,"Flatten"),ye="\uFEFF",uu=E=>E===ye,ls=(E,P,q)=>$a(E,P,q).isSome(),op=(E,P)=>ls(E,Ke(yt,P));var Gu=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager");const ul=hc.DOM,kn=E=>{const P={},q=ge=>{let xe=E[ge?"startContainer":"endContainer"],at=E[ge?"startOffset":"endOffset"];if(ki(xe)){const xo=ul.create("span",{"data-mce-type":"bookmark"});xe.hasChildNodes()?(at=Math.min(at,xe.childNodes.length-1),ge?xe.insertBefore(xo,xe.childNodes[at]):ul.insertAfter(xo,xe.childNodes[at])):xe.appendChild(xo),xe=xo,at=0}P[ge?"startContainer":"endContainer"]=xe,P[ge?"startOffset":"endOffset"]=at};return q(!0),E.collapsed||q(),P},_a=E=>{const P=ge=>{const xe=Uo=>{var Bo;let io=(Bo=Uo.parentNode)===null||Bo===void 0?void 0:Bo.firstChild,Wn=0;for(;io;){if(io===Uo)return Wn;(!ki(io)||io.getAttribute("data-mce-type")!=="bookmark")&&Wn++,io=io.nextSibling}return-1};let at=E[ge?"startContainer":"endContainer"],xo=E[ge?"startOffset":"endOffset"];if(at){if(ki(at)&&at.parentNode){const Uo=at;xo=xe(at),at=at.parentNode,ul.remove(Uo),!at.hasChildNodes()&&ul.isBlock(at)&&at.appendChild(ul.create("br"))}E[ge?"startContainer":"endContainer"]=at,E[ge?"startOffset":"endOffset"]=xo}};P(!0),P();const q=ul.createRng();return q.setStart(E.startContainer,E.startOffset),E.endContainer&&q.setEnd(E.endContainer,E.endOffset),pe(q)},Xi=E=>{switch(E){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},fl=(E,P,q)=>{const ge=q["list-style-type"]?q["list-style-type"]:null;E.setStyle(P,"list-style-type",ge)},Yl=(E,P)=>{br.each(P,(q,ge)=>{E.setAttribute(ge,q)})},_c=(E,P,q)=>{Yl(P,q["list-attributes"]),br.each(E.select("li",P),ge=>{Yl(ge,q["list-item-attributes"])})},ia=(E,P,q)=>{fl(E,P,q),_c(E,P,q)},Od=(E,P,q)=>{br.each(q,ge=>E.setStyle(P,ge,""))},Yu=(E,P)=>Me(P)&&!qc(P,E.schema.getBlockElements()),Uf=(E,P,q,ge)=>{let xe=P[q?"startContainer":"endContainer"];const at=P[q?"startOffset":"endOffset"];ki(xe)&&(xe=xe.childNodes[Math.min(at,xe.childNodes.length-1)]||xe),!q&&xl(xe.nextSibling)&&(xe=xe.nextSibling);const xo=Bo=>{for(;!E.dom.isBlock(Bo)&&Bo.parentNode&&ge!==Bo;)Bo=Bo.parentNode;return Bo},Uo=(Bo,io)=>{var Wn;const sr=new xi(Bo,xo(Bo)),Ws=io?"next":"prev";let Nl;for(;Nl=sr[Ws]();)if(!(pn(E,Nl)||uu(Nl.textContent)||((Wn=Nl.textContent)===null||Wn===void 0?void 0:Wn.length)===0))return ue.some(Nl);return ue.none()};if(q&&Pn(xe))if(uu(xe.textContent))xe=Uo(xe,!1).getOr(xe);else for(xe.parentNode!==null&&Yu(E,xe.parentNode)&&(xe=xe.parentNode);xe.previousSibling!==null&&(Yu(E,xe.previousSibling)||Pn(xe.previousSibling));)xe=xe.previousSibling;if(!q&&Pn(xe))if(uu(xe.textContent))xe=Uo(xe,!0).getOr(xe);else for(xe.parentNode!==null&&Yu(E,xe.parentNode)&&(xe=xe.parentNode);xe.nextSibling!==null&&(Yu(E,xe.nextSibling)||Pn(xe.nextSibling));)xe=xe.nextSibling;for(;xe.parentNode!==ge;){const Bo=xe.parentNode;if(Fs(E,xe)||/^(TD|TH)$/.test(Bo.nodeName))return xe;xe=Bo}return xe},Ur=(E,P,q)=>{const ge=[],xe=E.dom,at=Uf(E,P,!0,q),xo=Uf(E,P,!1,q);let Uo;const Bo=[];for(let io=at;io&&(Bo.push(io),io!==xo);io=io.nextSibling);return br.each(Bo,io=>{var Wn;if(Fs(E,io)){ge.push(io),Uo=null;return}if(xe.isBlock(io)||xl(io)){xl(io)&&xe.remove(io),Uo=null;return}const sr=io.nextSibling;if(Gu.isBookmarkNode(io)&&(Oa(sr)||Fs(E,sr)||!sr&&io.parentNode===q)){Uo=null;return}Uo||(Uo=xe.create("p"),(Wn=io.parentNode)===null||Wn===void 0||Wn.insertBefore(Uo,io),ge.push(Uo)),Uo.appendChild(io)}),ge},ho=(E,P,q)=>{const ge=E.getStyle(P,"list-style-type");let xe=q?q["list-style-type"]:"";return xe=xe===null?"":xe,ge===xe},xc=(E,P)=>{const q=E.selection.getStart(!0),ge=Uf(E,P,!0,E.getBody());return op(Le.fromDom(ge),Le.fromDom(P.commonAncestorContainer))?P.commonAncestorContainer:q},fu=(E,P,q)=>{const ge=E.selection.getRng();let xe="LI";const at=Ul(E,xc(E,ge)),xo=E.dom;if(xo.getContentEditable(E.selection.getNode())==="false")return;P=P.toUpperCase(),P==="DL"&&(xe="DT");const Uo=kn(ge),Bo=D(Ur(E,ge,at),E.dom.isEditable);br.each(Bo,io=>{let Wn;const sr=io.previousSibling,Ws=io.parentNode;Qs(Ws)||(sr&&Oa(sr)&&sr.nodeName===P&&ho(xo,sr,q)?(Wn=sr,io=xo.rename(io,xe),sr.appendChild(io)):(Wn=xo.create(P),Ws.insertBefore(Wn,io),Wn.appendChild(io),io=xo.rename(io,xe)),Od(xo,io,["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"]),ia(xo,Wn,q),Xc(E.dom,Wn))}),E.selection.setRng(_a(Uo))},xa=(E,P)=>Oa(E)&&E.nodeName===(P==null?void 0:P.nodeName),wc=(E,P,q)=>{const ge=E.getStyle(P,"list-style-type",!0),xe=E.getStyle(q,"list-style-type",!0);return ge===xe},Ii=(E,P)=>E.className===P.className,kc=(E,P,q)=>xa(P,q)&&wc(E,P,q)&&Ii(P,q),Xc=(E,P)=>{let q,ge=P.nextSibling;if(kc(E,P,ge)){const xe=ge;for(;q=xe.firstChild;)P.appendChild(q);E.remove(xe)}if(ge=P.previousSibling,kc(E,P,ge)){const xe=ge;for(;q=xe.lastChild;)P.insertBefore(q,P.firstChild);E.remove(xe)}},Zr=(E,P,q,ge)=>{if(P.nodeName!==q){const xe=E.dom.rename(P,q);ia(E.dom,xe,ge),Cd(E,Xi(q),xe)}else ia(E.dom,P,ge),Cd(E,Xi(q),P)},ml=(E,P,q,ge)=>{if(P.classList.forEach((xe,at,xo)=>{xe.startsWith("tox-")&&(xo.remove(xe),xo.length===0&&P.removeAttribute("class"))}),P.nodeName!==q){const xe=E.dom.rename(P,q);ia(E.dom,xe,ge),Cd(E,Xi(q),xe)}else ia(E.dom,P,ge),Cd(E,Xi(q),P)},Xl=(E,P,q,ge,xe)=>{const at=Oa(P);if(at&&P.nodeName===ge&&!mu(xe)&&!$f(P))Ad(E);else{fu(E,ge,xe);const xo=kn(E.selection.getRng()),Uo=at?[P,...q]:q,Bo=at&&$f(P)?ml:Zr;br.each(Uo,io=>{Bo(E,io,ge,xe)}),E.selection.setRng(_a(xo))}},mu=E=>"list-style-type"in E,sg=(E,P,q,ge)=>{if(P!==E.getBody())if(P)if(P.nodeName===q&&!mu(ge)&&!$f(P))Ad(E);else{const xe=kn(E.selection.getRng());$f(P)&&P.classList.forEach((xo,Uo,Bo)=>{xo.startsWith("tox-")&&(Bo.remove(xo),Bo.length===0&&P.removeAttribute("class"))}),ia(E.dom,P,ge);const at=E.dom.rename(P,q);Xc(E.dom,at),E.selection.setRng(_a(xe)),fu(E,q,ge),Cd(E,Xi(q),at)}else fu(E,q,ge),Cd(E,Xi(q),P)},Cc=(E,P,q)=>{const ge=_t(E);if(kd(E,ge))return;const xe=Xn(E),at=ce(q)?q:{};xe.length>0?Xl(E,ge,xe,P,at):sg(E,ge,P,at)},zd=hc.DOM,Xu=(E,P)=>{const q=P.parentElement;if(q&&q.nodeName==="LI"&&q.firstChild===P){const ge=q.previousSibling;ge&&ge.nodeName==="LI"?(ge.appendChild(P),ya(E,q)&&zd.remove(q)):zd.setStyle(q,"listStyleType","none")}if(Oa(q)){const ge=q.previousSibling;ge&&ge.nodeName==="LI"&&ge.appendChild(P)}},Ms=(E,P)=>{const q=br.grep(E.select("ol,ul",P));br.each(q,ge=>{Xu(E,ge)})},Ua=(E,P,q,ge)=>{let xe=P.startContainer;const at=P.startOffset;if(Pn(xe)&&(q?at0))return xe;const xo=E.schema.getNonEmptyElements();ki(xe)&&(xe=gc.getNode(xe,at));const Uo=new xi(xe,ge);q&&Vl(E.dom,xe)&&Uo.next();const Bo=q?Uo.next.bind(Uo):Uo.prev2.bind(Uo);for(;xe=Bo();)if(xe.nodeName==="LI"&&!xe.hasChildNodes()||xo[xe.nodeName]||Pn(xe)&&xe.data.length>0)return xe;return null},la=(E,P)=>{const q=P.childNodes;return q.length===1&&!Oa(q[0])&&E.isBlock(q[0])},ii=E=>ue.from(E).map(Le.fromDom).filter(St).exists(P=>au(P)&&!ln(["details"],os(P))),_r=(E,P)=>{la(E,P)&&ii(P.firstChild)&&E.remove(P.firstChild,!0)},Zf=(E,P,q)=>{let ge;const xe=la(E,q)?q.firstChild:q;if(_r(E,P),!ya(E,P,!0))for(;ge=P.firstChild;)xe.appendChild(ge)},dr=(E,P,q)=>{let ge;const xe=P.parentNode;if(!Mo(E,P)||!Mo(E,q))return;Oa(q.lastChild)&&(ge=q.lastChild),xe===q.lastChild&&xl(xe.previousSibling)&&E.remove(xe.previousSibling);const at=q.lastChild;at&&xl(at)&&P.hasChildNodes()&&E.remove(at),ya(E,q,!0)&&si(Le.fromDom(q)),Zf(E,P,q),ge&&q.appendChild(ge);const Uo=rt(Le.fromDom(q),Le.fromDom(P))?E.getParents(P,Oa,q):[];E.remove(P),Gt(Uo,Bo=>{ya(E,Bo)&&Bo!==E.getRoot()&&E.remove(Bo)})},ca=(E,P,q)=>{si(Le.fromDom(q)),dr(E.dom,P,q),E.selection.setCursorLocation(q,0)},Tl=(E,P,q,ge)=>{const xe=E.dom;if(xe.isEmpty(ge))ca(E,q,ge);else{const at=kn(P);dr(xe,q,ge),E.selection.setRng(_a(at))}},nt=(E,P,q,ge)=>{const xe=kn(P);dr(E.dom,q,ge);const at=_a(xe);E.selection.setRng(at)},Xr=(E,P)=>{const q=E.dom,ge=E.selection,xe=ge.getStart(),at=Jo(E,xe),xo=q.getParent(ge.getStart(),"LI",at);if(xo){const Uo=xo.parentElement;if(Uo===E.getBody()&&ya(q,Uo))return!0;const Bo=pe(ge.getRng()),io=q.getParent(Ua(E,Bo,P,at),"LI",at),Wn=io&&(P?q.isChildOf(xo,io):q.isChildOf(io,xo));if(io&&io!==xo&&!Wn)return E.undoManager.transact(()=>{P?Tl(E,Bo,io,xo):yr(xo)?Gl(E):nt(E,Bo,xo,io)}),!0;if(Wn&&!P&&io!==xo)return E.undoManager.transact(()=>{if(Bo.commonAncestorContainer.parentElement){const sr=kn(Bo),Ws=Bo.commonAncestorContainer.parentElement;Zf(q,Bo.commonAncestorContainer.parentElement,io),Ws.remove();const Nl=_a(sr);E.selection.setRng(Nl)}}),!0;if(!io&&!P&&Bo.startOffset===0&&Bo.endOffset===0)return E.undoManager.transact(()=>{Ad(E)}),!0}return!1},pu=(E,P,q)=>{const ge=E.getParent(P.parentNode,E.isBlock,q);E.remove(P),ge&&E.isEmpty(ge)&&E.remove(ge)},js=(E,P)=>{const q=E.dom,ge=E.selection.getStart(),xe=Jo(E,ge),at=q.getParent(ge,q.isBlock,xe);if(at&&q.isEmpty(at,void 0,{checkRootAsContent:!0})){const xo=pe(E.selection.getRng()),Uo=q.getParent(Ua(E,xo,P,xe),"LI",xe);if(Uo){const Bo=Ws=>ln(["td","th","caption"],os(Ws)),io=Ws=>Ws.dom===xe,Wn=$r(Le.fromDom(Uo),Bo,io),sr=$r(Le.fromDom(xo.startContainer),Bo,io);return fn(Wn,sr,yt)?(E.undoManager.transact(()=>{const Ws=Uo.parentNode;pu(q,at,xe),Xc(q,Ws),E.selection.select(Uo,!0),E.selection.collapse(P)}),!0):!1}}return!1},Al=(E,P)=>Xr(E,P)||js(E,P),Za=E=>{const P=E.selection.getStart(),q=Jo(E,P);return E.dom.getParent(P,"LI,DT,DD",q)||is(E).length>0},Ol=E=>Za(E)?(E.undoManager.transact(()=>{E.execCommand("Delete"),Ms(E.dom,E.getBody())}),!0):!1,gu=(E,P)=>{const q=E.selection;return!kd(E,q.getNode())&&(q.isCollapsed()?Al(E,P):Ol(E))},li=E=>{E.on("ExecCommand",P=>{const q=P.command.toLowerCase();(q==="delete"||q==="forwarddelete")&&Za(E)&&Ms(E.dom,E.getBody())}),E.on("keydown",P=>{P.keyCode===lu.BACKSPACE?gu(E,!1)&&P.preventDefault():P.keyCode===lu.DELETE&&gu(E,!0)&&P.preventDefault()})},vn=E=>({backspaceDelete:P=>{gu(E,P)}}),ur=(E,P)=>{const q=_t(E);q===null||kd(E,q)||E.undoManager.transact(()=>{ce(P.styles)&&E.dom.setStyles(q,P.styles),ce(P.attrs)&&lr(P.attrs,(ge,xe)=>E.dom.setAttrib(q,xe,ge))})},Sc=E=>{const P=Cr(dh(E).split("")),q=Fe(P,(ge,xe)=>{const at=ge.toUpperCase().charCodeAt(0)-65+1;return Math.pow(26,xe)*at});return dt(q,(ge,xe)=>ge+xe,0)},Us=E=>{if(E--,E<0)return"";{const P=E%26,q=Math.floor(E/26),ge=Us(q),xe=String.fromCharCode(65+P);return ge+xe}},Ju=E=>/^[A-Z]+$/.test(E),Jl=E=>/^[a-z]+$/.test(E),np=E=>/^[0-9]+$/.test(E),Zs=E=>np(E)?2:Ju(E)?0:Jl(E)?1:ng(E)?3:4,Ne=E=>{switch(Zs(E)){case 2:return ue.some({listStyleType:ue.none(),start:E});case 0:return ue.some({listStyleType:ue.some("upper-alpha"),start:Sc(E).toString()});case 1:return ue.some({listStyleType:ue.some("lower-alpha"),start:Sc(E).toString()});case 3:return ue.some({listStyleType:ue.none(),start:""});case 4:return ue.none()}},Wa=E=>{const P=parseInt(E.start,10);return cn(E.listStyleType,"upper-alpha")?Us(P):cn(E.listStyleType,"lower-alpha")?Us(P).toLowerCase():E.start},fr=E=>{const P=_t(E);!za(P)||kd(E,P)||E.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:Wa({start:E.dom.getAttrib(P,"start","1"),listStyleType:ue.from(E.dom.getStyle(P,"list-style-type"))})},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:q=>{const ge=q.getData();Ne(ge.start).each(xe=>{E.execCommand("mceListUpdate",!1,{attrs:{start:xe.start==="1"?"":xe.start},styles:{"list-style-type":xe.listStyleType.getOr("")}})}),q.close()}})},Si=(E,P)=>()=>{const q=_t(E);return Me(q)&&q.nodeName===P},zl=E=>{E.addCommand("mceListProps",()=>{fr(E)})},xr=E=>{E.on("BeforeExecCommand",P=>{const q=P.command.toLowerCase();q==="indent"?ja(E):q==="outdent"&&Gl(E)}),E.addCommand("InsertUnorderedList",(P,q)=>{Cc(E,"UL",q)}),E.addCommand("InsertOrderedList",(P,q)=>{Cc(E,"OL",q)}),E.addCommand("InsertDefinitionList",(P,q)=>{Cc(E,"DL",q)}),E.addCommand("RemoveList",()=>{Ad(E)}),zl(E),E.addCommand("mceListUpdate",(P,q)=>{ce(q)&&ur(E,q)}),E.addQueryStateHandler("InsertUnorderedList",Si(E,"UL")),E.addQueryStateHandler("InsertOrderedList",Si(E,"OL")),E.addQueryStateHandler("InsertDefinitionList",Si(E,"DL"))};var xs=tinymce.util.Tools.resolve("tinymce.html.Node");const Jn=E=>E.type===3,wa=E=>E.length===0,Ei=E=>{const P=(xe,at)=>{const xo=xs.create("li");Gt(xe,Uo=>xo.append(Uo)),at?E.insert(xo,at,!0):E.append(xo)},q=(xe,at)=>Jn(at)?[...xe,at]:!wa(xe)&&!Jn(at)?(P(xe,at),[]):xe,ge=dt(E.children(),q,[]);wa(ge)||P(ge)},ci=E=>{E.on("PreInit",()=>{const{parser:P}=E;P.addNodeFilter("ul,ol",q=>Gt(q,Ei))})},Ji=E=>{E.on("keydown",P=>{P.keyCode!==lu.TAB||lu.metaKeyPressed(P)||E.undoManager.transact(()=>{(P.shiftKey?Gl(E):ja(E))&&P.preventDefault()})})},Ql=E=>{Ns(E)&&Ji(E),li(E)},Ec=(E,P)=>q=>{const ge=xe=>{q.setActive(tg(xe.parents,P)),q.setEnabled(!kd(E,xe.element)&&E.selection.isEditable())};return q.setEnabled(E.selection.isEditable()),Hf(E,ge)},Jc=E=>{const P=q=>()=>E.execCommand(q);E.hasPlugin("advlist")||(E.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:P("InsertOrderedList"),onSetup:Ec(E,"OL")}),E.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:P("InsertUnorderedList"),onSetup:Ec(E,"UL")}))},Wf=(E,P)=>q=>Hf(E,xe=>q.setEnabled(tg(xe.parents,P)&&!kd(E,xe.element))),qf=E=>{const P={text:"List properties...",icon:"ordered-list",onAction:()=>E.execCommand("mceListProps"),onSetup:Wf(E,"OL")};E.ui.registry.addMenuItem("listprops",P),E.ui.registry.addContextMenu("lists",{update:q=>{const ge=_t(E,q);return za(ge)?["listprops"]:[]}})};var Tc=()=>{w.add("lists",E=>(ri(E),ci(E),E.hasPlugin("rtc",!0)?zl(E):(Ql(E),xr(E)),Jc(E),qf(E),vn(E)))};Tc()})();(function(){var w=tinymce.util.Tools.resolve("tinymce.PluginManager");const g=(k,N,Z)=>{var se;return Z(k,N.prototype)?!0:((se=k.constructor)===null||se===void 0?void 0:se.name)===N.name},S=k=>{const N=typeof k;return k===null?"null":N==="object"&&Array.isArray(k)?"array":N==="object"&&g(k,String,(Z,se)=>se.isPrototypeOf(Z))?"string":N},B=k=>N=>S(N)===k,W=k=>N=>typeof N===k,te=k=>N=>k===N,ce=B("string"),Ee=B("array"),$e=W("boolean"),We=te(void 0),Me=k=>k==null,Ot=k=>!Me(k),mo=W("function"),st=W("number"),ut=()=>{},Bt=(k,N)=>Z=>k(N(Z)),Rt=k=>()=>k,Ke=k=>k,Ut=(k,N)=>k===N;function ft(k,...N){return(...Z)=>{const se=N.concat(Z);return k.apply(null,se)}}const ue=k=>{k()},Ct=Rt(!1),ve=Rt(!0);class ot{constructor(N,Z){this.tag=N,this.value=Z}static some(N){return new ot(!0,N)}static none(){return ot.singletonNone}fold(N,Z){return this.tag?Z(this.value):N()}isSome(){return this.tag}isNone(){return!this.tag}map(N){return this.tag?ot.some(N(this.value)):ot.none()}bind(N){return this.tag?N(this.value):ot.none()}exists(N){return this.tag&&N(this.value)}forall(N){return!this.tag||N(this.value)}filter(N){return!this.tag||N(this.value)?this:ot.none()}getOr(N){return this.tag?this.value:N}or(N){return this.tag?this:N}getOrThunk(N){return this.tag?this.value:N()}orThunk(N){return this.tag?this:N()}getOrDie(N){if(this.tag)return this.value;throw new Error(N??"Called getOrDie on None")}static from(N){return Ot(N)?ot.some(N):ot.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(N){this.tag&&N(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}ot.singletonNone=new ot(!1);const bn=Object.keys,ln=Object.hasOwnProperty,uo=(k,N)=>{const Z=bn(k);for(let se=0,Ce=Z.length;se(N,Z)=>{k[Z]=N},Gt=(k,N,Z,se)=>{uo(k,(Ce,et)=>{(N(Ce,et)?Z:se)(Ce,et)})},D=(k,N)=>{const Z={};return Gt(k,N,Fe(Z),ut),Z},bt=(k,N)=>{const Z=[];return uo(k,(se,Ce)=>{Z.push(N(se,Ce))}),Z},dt=k=>bt(k,Ke),Kt=k=>bn(k).length,qo=(k,N)=>Ge(k,N)?ot.from(k[N]):ot.none(),Ge=(k,N)=>ln.call(k,N),To=(k,N)=>Ge(k,N)&&k[N]!==void 0&&k[N]!==null,Cr=k=>{for(const N in k)if(ln.call(k,N))return!1;return!0},$t=Array.prototype.indexOf,pt=Array.prototype.push,Ht=(k,N)=>$t.call(k,N),ks=(k,N)=>Ht(k,N)>-1,cn=(k,N)=>{for(let Z=0,se=k.length;Z{const Z=[];for(let se=0;se{const Z=k.length,se=new Array(Z);for(let Ce=0;Ce{for(let Z=0,se=k.length;Z{for(let Z=k.length-1;Z>=0;Z--){const se=k[Z];N(se,Z)}},Cs=(k,N)=>{const Z=[],se=[];for(let Ce=0,et=k.length;Ce{const Z=[];for(let se=0,Ce=k.length;se(Fr(k,(se,Ce)=>{Z=N(Z,se,Ce)}),Z),qi=(k,N,Z)=>(j(k,(se,Ce)=>{Z=N(Z,se,Ce)}),Z),mn=(k,N,Z)=>{for(let se=0,Ce=k.length;semn(k,N,Ct),dn=k=>{const N=[];for(let Z=0,se=k.length;Zdn(zo(k,N)),Lt=(k,N)=>{for(let Z=0,se=k.length;Z{const Z={};for(let se=0,Ce=k.length;seN>=0&&Nrt(k,0),ko=k=>rt(k,k.length-1),tn=(k,N)=>{for(let Z=0;Z{const se=(N||document).createElement("div");if(se.innerHTML=k,!se.hasChildNodes()||se.childNodes.length>1){const Ce="HTML does not have a single root node";throw console.error(Ce,k),new Error(Ce)}return yn(se.childNodes[0])},os=(k,N)=>{const se=(N||document).createElement(k);return yn(se)},Is=(k,N)=>{const se=(N||document).createTextNode(k);return yn(se)},yn=k=>{if(k==null)throw new Error("Node cannot be null or undefined");return{dom:k}},St={fromHtml:sa,fromTag:os,fromText:Is,fromDom:yn,fromPoint:(k,N,Z)=>ot.from(k.dom.elementFromPoint(N,Z)).map(yn)},Vo=(k,N)=>{const Z=k.dom;if(Z.nodeType!==Ln)return!1;{const se=Z;if(se.matches!==void 0)return se.matches(N);if(se.msMatchesSelector!==void 0)return se.msMatchesSelector(N);if(se.webkitMatchesSelector!==void 0)return se.webkitMatchesSelector(N);if(se.mozMatchesSelector!==void 0)return se.mozMatchesSelector(N);throw new Error("Browser lacks native selectors")}},an=k=>k.nodeType!==Ln&&k.nodeType!==rs&&k.nodeType!==Zn||k.childElementCount===0,Kr=(k,N)=>{const Z=N===void 0?document:N.dom;return an(Z)?[]:zo(Z.querySelectorAll(k),St.fromDom)},yi=(k,N)=>{const Z=N===void 0?document:N.dom;return an(Z)?ot.none():ot.from(Z.querySelector(k)).map(St.fromDom)},vt=(k,N)=>k.dom===N.dom,oi=Vo;typeof window<"u"||Function("return this;")();const nn=k=>k.dom.nodeName.toLowerCase(),Mi=k=>k.dom.nodeType,as=k=>N=>Mi(N)===k,hr=k=>Mi(k)===On||nn(k)==="#comment",yl=as(Ln),cl=as(Hs),Bi=as(rs),vi=as(Zn),vl=k=>N=>yl(N)&&nn(N)===k,Gn=k=>St.fromDom(k.dom.ownerDocument),Ro=k=>Bi(k)?k:Gn(k),$a=k=>ot.from(k.dom.parentNode).map(St.fromDom),$r=(k,N)=>{const Z=mo(N)?N:Ct;let se=k.dom;const Ce=[];for(;se.parentNode!==null&&se.parentNode!==void 0;){const et=se.parentNode,Et=St.fromDom(et);if(Ce.push(Et),Z(Et)===!0)break;se=et}return Ce},bd=k=>ot.from(k.dom.previousSibling).map(St.fromDom),Vt=k=>ot.from(k.dom.nextSibling).map(St.fromDom),Dr=k=>zo(k.dom.childNodes,St.fromDom),au=(k,N)=>{const Z=k.dom.childNodes;return ot.from(Z[N]).map(St.fromDom)},zs=k=>au(k,0),yd=k=>vi(k)&&Ot(k.dom.host),ni=k=>St.fromDom(k.dom.getRootNode()),Ki=k=>{const N=ni(k);return yd(N)?ot.some(N):ot.none()},_i=k=>St.fromDom(k.dom.host),ys=k=>{const N=cl(k)?k.dom.parentNode:k.dom;if(N==null||N.ownerDocument===null)return!1;const Z=N.ownerDocument;return Ki(St.fromDom(N)).fold(()=>Z.body.contains(N),Bt(ys,_i))};var ga=(k,N,Z,se,Ce)=>k(Z,se)?ot.some(Z):mo(Ce)&&Ce(Z)?ot.none():N(Z,se,Ce);const si=(k,N,Z)=>{let se=k.dom;const Ce=mo(Z)?Z:Ct;for(;se.parentNode;){se=se.parentNode;const et=St.fromDom(se);if(N(et))return ot.some(et);if(Ce(et))break}return ot.none()},iu=(k,N,Z)=>ga((Ce,et)=>et(Ce),si,k,N,Z),gc=(k,N)=>{const Z=Ce=>N(St.fromDom(Ce));return Bn(k.dom.childNodes,Z).map(St.fromDom)},xi=(k,N,Z)=>si(k,se=>Vo(se,N),Z),lu=(k,N)=>gc(k,Z=>Vo(Z,N)),Wc=(k,N)=>yi(N,k),Hn=(k,N,Z)=>ga((Ce,et)=>Vo(Ce,et),xi,k,N,Z),lr=k=>Hn(k,"[contenteditable]"),ha=(k,N=!1)=>ys(k)?k.dom.isContentEditable:lr(k).fold(Rt(N),Z=>Zu(Z)==="true"),Zu=k=>k.dom.contentEditable,Gi=k=>k.nodeName.toLowerCase(),vd=k=>St.fromDom(k.getBody()),Hr=k=>N=>vt(N,vd(k)),ba=k=>k?k.replace(/px$/,""):"",wi=k=>/^\d+(\.\d+)?$/.test(k)?k+"px":k,Yn=k=>St.fromDom(k.selection.getStart()),vs=k=>St.fromDom(k.selection.getEnd()),Yi=k=>iu(k,vl("table")).forall(ha),hc=(k,N)=>Sn(Dr(k),N),br=(k,N)=>{let Z=[];return j(Dr(k),se=>{N(se)&&(Z=Z.concat([se])),Z=Z.concat(br(se,N))}),Z},_l=(k,N)=>hc(k,Z=>Vo(Z,N)),Vs=(k,N)=>Kr(N,k),Pn=(k,N,Z)=>{if(ce(Z)||$e(Z)||st(Z))k.setAttribute(N,Z+"");else throw console.error("Invalid call to Attribute.set. Key ",N,":: Value ",Z,":: Element ",k),new Error("Attribute value was not simple")},ki=(k,N,Z)=>{Pn(k.dom,N,Z)},Oa=(k,N)=>{const Z=k.dom;uo(N,(se,Ce)=>{Pn(Z,Ce,se)})},Vr=(k,N)=>{const Z=k.dom.getAttribute(N);return Z===null?void 0:Z},za=(k,N)=>ot.from(Vr(k,N)),Qs=(k,N)=>{k.dom.removeAttribute(N)},_d=k=>qi(k.dom.attributes,(N,Z)=>(N[Z.name]=Z.value,N),{}),wo=(k,N,Z=Ut)=>k.exists(se=>Z(se,N)),xl=k=>{const N=[],Z=se=>{N.push(se)};for(let se=0;sek.isSome()&&N.isSome()?ot.some(Z(k.getOrDie(),N.getOrDie())):ot.none(),Fs=k=>k.bind(Ke),qc=(k,N)=>k?ot.some(N):ot.none(),pn=(k,N)=>k.substring(N),Vl=(k,N,Z)=>N===""||k.length>=N.length&&k.substr(Z,Z+N.length)===N,ya=(k,N)=>Mo(k,N)?pn(k,N.length):k,Mo=(k,N)=>Vl(k,N,0),ri=(k=>N=>N.replace(k,""))(/^\s+|\s+$/g),Ns=k=>k.length>0,jl=k=>!Ns(k),er=(k,N=10)=>{const Z=parseInt(k,N);return isNaN(Z)?ot.none():ot.some(Z)},bc=k=>{const N=parseFloat(k);return isNaN(N)?ot.none():ot.some(N)},Gr=k=>k.style!==void 0&&mo(k.style.getPropertyValue),Vn=(k,N,Z)=>{if(!ce(Z))throw console.error("Invalid call to CSS.set. Property ",N,":: Value ",Z,":: Element ",k),new Error("CSS value must be a string: "+Z);Gr(k)&&k.style.setProperty(N,Z)},wl=(k,N)=>{Gr(k)&&k.style.removeProperty(N)},Kc=(k,N,Z)=>{const se=k.dom;Vn(se,N,Z)},xd=(k,N)=>{const Z=k.dom,Ce=window.getComputedStyle(Z).getPropertyValue(N);return Ce===""&&!ys(k)?Ds(Z,N):Ce},Ds=(k,N)=>Gr(k)?k.style.getPropertyValue(N):"",Na=(k,N)=>{const Z=k.dom,se=Ds(Z,N);return ot.from(se).filter(Ce=>Ce.length>0)},Q=(k,N)=>{const Z=k.dom;wl(Z,N),wo(za(k,"style").map(ri),"")&&Qs(k,"style")},pe=(k,N,Z=0)=>za(k,N).map(se=>parseInt(se,10)).getOr(Z),Ae=(k,N)=>Ye(k,N,ve),Ye=(k,N,Z)=>Le(Dr(k),se=>Vo(se,N)?Z(se)?[se]:[]:Ye(se,N,Z)),_t=["tfoot","thead","tbody","colgroup"],oo=k=>ks(_t,k),Go=(k,N)=>({rows:k,columns:N}),Xn=(k,N,Z)=>({element:k,rowspan:N,colspan:Z}),sn=(k,N,Z,se,Ce,et)=>({element:k,rowspan:N,colspan:Z,row:se,column:Ce,isLocked:et}),is=(k,N,Z)=>({element:k,cells:N,section:Z}),tr=(k,N,Z,se)=>({startRow:k,startCol:N,finishRow:Z,finishCol:se}),Jo=(k,N,Z)=>({element:k,colspan:N,column:Z}),dl=(k,N)=>({element:k,columns:N}),Ul=(k,N,Z=Ct)=>{if(Z(N))return ot.none();if(ks(k,nn(N)))return ot.some(N);const se=Ce=>Vo(Ce,"table")||Z(Ce);return xi(N,k.join(","),se)},yc=(k,N)=>Ul(["td","th"],k,N),Qm=k=>Ae(k,"th,td"),lh=k=>Vo(k,"colgroup")?_l(k,"col"):Le(ch(k),N=>_l(N,"col")),Pi=(k,N)=>Hn(k,"table",N),ep=k=>Ae(k,"tr"),ch=k=>Pi(k).fold(Rt([]),N=>_l(N,"colgroup")),$f=(k,N)=>zo(k,Z=>{if(nn(Z)==="colgroup"){const se=zo(lh(Z),Ce=>{const et=pe(Ce,"span",1);return Xn(Ce,1,et)});return is(Z,se,"colgroup")}else{const se=zo(Qm(Z),Ce=>{const et=pe(Ce,"rowspan",1),Et=pe(Ce,"colspan",1);return Xn(Ce,et,Et)});return is(Z,se,N(Z))}}),tg=k=>$a(k).map(N=>{const Z=nn(N);return oo(Z)?Z:"tbody"}).getOr("tbody"),zt=k=>{const N=ep(k),se=[...ch(k),...N];return $f(se,tg)},wd="data-snooker-locked-cols",kd=k=>za(k,wd).bind(N=>ot.from(N.match(/\d+/g))).map(N=>yt(N,ve)),Hf=(k,N)=>k+","+N,va=(k,N,Z)=>ot.from(k.access[Hf(N,Z)]),Cd=(k,N,Z)=>{const se=cu(k,Ce=>Z(N,Ce.element));return se.length>0?ot.some(se[0]):ot.none()},cu=(k,N)=>{const Z=Le(k.all,se=>se.cells);return Sn(Z,N)},dh=k=>{const N={};let Z=0;return j(k.cells,se=>{const Ce=se.colspan;fn(Ce,et=>{const Et=Z+et;N[Et]=Jo(se.element,Ce,Et)}),Z+=Ce}),N},og=k=>{const N={},Z=[],Ce=ao(k).map(ea=>ea.element).bind(Pi).bind(kd).getOr({});let et=0,Et=0,Tt=0;const{pass:Lo,fail:co}=Cs(k,ea=>ea.section==="colgroup");j(co,ea=>{const qs=[];j(ea.cells,oc=>{let nc=0;for(;N[Hf(Tt,nc)]!==void 0;)nc++;const zc=To(Ce,nc.toString()),ip=sn(oc.element,oc.rowspan,oc.colspan,Tt,nc,zc);for(let td=0;td{const qs=dh(ea);return{colgroups:[dl(ea.element,dt(qs))],columns:qs}}).getOrThunk(()=>({colgroups:[],columns:{}}));return{grid:Go(et,Et),access:N,all:Z,columns:_n,colgroups:Ko}},Zl={fromTable:k=>{const N=zt(k);return og(N)},generate:og,getAt:va,findItem:Cd,filterItems:cu,justCells:k=>Le(k.all,N=>N.cells),justColumns:k=>dt(k.columns),hasColumns:k=>bn(k.columns).length>0,getColumnAt:(k,N)=>ot.from(k.columns[N])};var Gc=tinymce.util.Tools.resolve("tinymce.util.Tools");const Wl=(k,N,Z)=>{const se=k.select("td,th",N);let Ce;for(let et=0;et{Gc.each("left center right".split(" "),se=>{se!==Z&&k.formatter.remove("align"+se,{},N)}),Z&&k.formatter.apply("align"+Z,{},N)},Ci=(k,N,Z)=>{Gc.each("top middle bottom".split(" "),se=>{se!==Z&&k.formatter.remove("valign"+se,{},N)}),Z&&k.formatter.apply("valign"+Z,{},N)},Sd=(k,N,Z)=>{k.dispatch("TableModified",{...Z,table:N})},En=(k,N)=>bc(k).getOr(N),kl=(k,N,Z)=>En(xd(k,N),Z),Wu=(k,N,Z,se)=>{const Ce=kl(k,`padding-${Z}`,0),et=kl(k,`padding-${se}`,0),Et=kl(k,`border-${Z}-width`,0),Tt=kl(k,`border-${se}-width`,0);return N-Ce-et-Et-Tt},qu=(k,N)=>{const Z=k.dom,se=Z.getBoundingClientRect().width||Z.offsetWidth;return N==="border-box"?se:Wu(k,se,"left","right")},cr=k=>qu(k,"content-box");var Rs=tinymce.util.Tools.resolve("tinymce.Env");const aa="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol",_s=fn(5,k=>{const N=`${k+1}px`;return{title:N,value:N}}),Ed=zo(["Solid","Dotted","Dashed","Double","Groove","Ridge","Inset","Outset","None","Hidden"],k=>({title:k,value:k.toLowerCase()})),Td="100%",Rr=k=>{var N;const Z=k.dom,se=(N=Z.getParent(k.selection.getStart(),Z.isBlock))!==null&&N!==void 0?N:k.getBody();return cr(St.fromDom(se))+"px"},Ha=(k,N)=>jf(k)||!Nn(k)?N:vc(k)?{...N,width:Rr(k)}:{...N,width:Td},Da=(k,N)=>jf(k)||Nn(k)?N:vc(k)?{...N,width:Rr(k)}:{...N,width:Td},Sr=k=>N=>N.options.get(k),Yc=k=>{const N=k.options.register;N("table_border_widths",{processor:"object[]",default:_s}),N("table_border_styles",{processor:"object[]",default:Ed}),N("table_cell_advtab",{processor:"boolean",default:!0}),N("table_row_advtab",{processor:"boolean",default:!0}),N("table_advtab",{processor:"boolean",default:!0}),N("table_appearance_options",{processor:"boolean",default:!0}),N("table_grid",{processor:"boolean",default:!Rs.deviceType.isTouch()}),N("table_cell_class_list",{processor:"object[]",default:[]}),N("table_row_class_list",{processor:"object[]",default:[]}),N("table_class_list",{processor:"object[]",default:[]}),N("table_toolbar",{processor:"string",default:aa}),N("table_background_color_map",{processor:"object[]",default:[]}),N("table_border_color_map",{processor:"object[]",default:[]})},rn=Sr("table_sizing_mode"),vr=Sr("table_border_widths"),Va=Sr("table_border_styles"),ql=Sr("table_cell_advtab"),jr=Sr("table_row_advtab"),so=Sr("table_advtab"),Cl=Sr("table_appearance_options"),Sl=Sr("table_grid"),Nn=Sr("table_style_by_css"),du=Sr("table_cell_class_list"),tp=Sr("table_row_class_list"),Kl=Sr("table_class_list"),un=Sr("table_toolbar"),Ra=Sr("table_background_color_map"),Ku=Sr("table_border_color_map"),vc=k=>rn(k)==="fixed",jf=k=>rn(k)==="responsive",El=k=>{const N=k.options,Z=N.get("table_default_styles");return N.isSet("table_default_styles")?Z:Ha(k,Z)},ja=k=>{const N=k.options,Z=N.get("table_default_attributes");return N.isSet("table_default_attributes")?Z:Da(k,Z)},Gl=(k,N)=>N.column>=k.startCol&&N.column+N.colspan-1<=k.finishCol&&N.row>=k.startRow&&N.row+N.rowspan-1<=k.finishRow,Ad=(k,N)=>{let Z=!0;const se=ft(Gl,N);for(let Ce=N.startRow;Ce<=N.finishRow;Ce++)for(let et=N.startCol;et<=N.finishCol;et++)Z=Z&&Zl.getAt(k,Ce,et).exists(se);return Z?ot.some(N):ot.none()},ye=(k,N)=>tr(Math.min(k.row,N.row),Math.min(k.column,N.column),Math.max(k.row+k.rowspan-1,N.row+N.rowspan-1),Math.max(k.column+k.colspan-1,N.column+N.colspan-1)),uu=(k,N,Z)=>{const se=Zl.findItem(k,N,vt),Ce=Zl.findItem(k,Z,vt);return se.bind(et=>Ce.map(Et=>ye(et,Et)))},ls=(k,N,Z)=>uu(k,N,Z).bind(se=>Ad(k,se)),op=(k,N,Z)=>{const se=Gu(k);return ls(se,N,Z)},Gu=Zl.fromTable,ul=(k,N)=>{$a(k).each(se=>{se.dom.insertBefore(N.dom,k.dom)})},kn=(k,N)=>{Vt(k).fold(()=>{$a(k).each(Ce=>{Xi(Ce,N)})},se=>{ul(se,N)})},_a=(k,N)=>{zs(k).fold(()=>{Xi(k,N)},se=>{k.dom.insertBefore(N.dom,se.dom)})},Xi=(k,N)=>{k.dom.appendChild(N.dom)},fl=(k,N)=>{ul(k,N),Xi(N,k)},Yl=(k,N)=>{j(N,(Z,se)=>{const Ce=se===0?k:N[se-1];kn(Ce,Z)})},_c=(k,N)=>{j(N,Z=>{Xi(k,Z)})},ia=k=>{const N=k.dom;N.parentNode!==null&&N.parentNode.removeChild(N)},Od=k=>{const N=Dr(k);N.length>0&&Yl(k,N),ia(k)},Uf=((k,N)=>{const Z=et=>{if(!k(et))throw new Error("Can only get "+N+" value of a "+N+" node");return se(et).getOr("")},se=et=>k(et)?ot.from(et.dom.nodeValue):ot.none();return{get:Z,getOption:se,set:(et,Et)=>{if(!k(et))throw new Error("Can only set raw "+N+" value of a "+N+" node");et.dom.nodeValue=Et}}})(cl,"text"),Ur=k=>Uf.get(k),ho=(k,N)=>Uf.set(k,N);var xc=["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"],fu=()=>{const k=co=>St.fromDom(co.dom.cloneNode(!1)),N=co=>Ro(co).dom,Z=co=>yl(co)?nn(co)==="body"?!0:ks(xc,nn(co)):!1,se=co=>yl(co)?ks(["br","img","hr","input"],nn(co)):!1,Ce=co=>yl(co)&&Vr(co,"contenteditable")==="false",et=(co,_n)=>co.dom.compareDocumentPosition(_n.dom),Et=(co,_n)=>{const Ko=_d(co);Oa(_n,Ko)},Tt=co=>{const _n=nn(co);return ks(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],_n)},Lo=co=>yl(co)?za(co,"lang"):ot.none();return{up:Rt({selector:xi,closest:Hn,predicate:si,all:$r}),down:Rt({selector:Vs,predicate:br}),styles:Rt({get:xd,getRaw:Na,set:Kc,remove:Q}),attrs:Rt({get:Vr,set:ki,remove:Qs,copyTo:Et}),insert:Rt({before:ul,after:kn,afterAll:Yl,append:Xi,appendAll:_c,prepend:_a,wrap:fl}),remove:Rt({unwrap:Od,remove:ia}),create:Rt({nu:St.fromTag,clone:k,text:St.fromText}),query:Rt({comparePosition:et,prevSibling:bd,nextSibling:Vt}),property:Rt({children:Dr,name:nn,parent:$a,document:N,isText:cl,isComment:hr,isElement:yl,isSpecial:Tt,getLanguage:Lo,getText:Ur,setText:ho,isBoundary:Z,isEmptyTag:se,isNonEditable:Ce}),eq:vt,is:oi}};const xa=(k,N,Z,se)=>{const Ce=Z[0],et=Z.slice(1);return se(k,N,Ce,et)},wc=(k,N,Z)=>Z.length>0?xa(k,N,Z,Ii):ot.none(),Ii=(k,N,Z,se)=>{const Ce=N(k,Z);return bi(se,(et,Et)=>{const Tt=N(k,Et);return kc(k,et,Tt)},Ce)},kc=(k,N,Z)=>N.bind(se=>Z.filter(ft(k.eq,se))),Xc=wc,Zr=fu(),ml=(k,N)=>Xc(Zr,(Z,se)=>k(se),N),Xl=k=>xi(k,"table"),mu=(k,N)=>{const Z=Vs(k,N);return Z.length>0?ot.some(Z):ot.none()},sg=(k,N,Z)=>Wc(k,N).bind(se=>Wc(k,Z).bind(Ce=>ml(Xl,[se,Ce]).map(et=>({first:se,last:Ce,table:et})))),Cc=(k,N)=>mu(k,N),zd=(k,N,Z)=>sg(k,N,Z).bind(se=>{const Ce=Lo=>vt(k,Lo),et="thead,tfoot,tbody,table",Et=xi(se.first,et,Ce),Tt=xi(se.last,et,Ce);return Et.bind(Lo=>Tt.bind(co=>vt(Lo,co)?op(se.table,se.first,se.last):ot.none()))}),Xu=k=>zo(k,St.fromDom),Ms="data-mce-selected",Ua="td["+Ms+"],th["+Ms+"]",la="data-mce-first-selected",ii="td["+la+"],th["+la+"]",_r="data-mce-last-selected",Zf="td["+_r+"],th["+_r+"]",dr={selected:Ms,selectedSelector:Ua,firstSelected:la,firstSelectedSelector:ii,lastSelected:_r,lastSelectedSelector:Zf},ca=k=>Pi(k).bind(N=>Cc(N,dr.firstSelectedSelector)).fold(Rt(k),N=>N[0]),Tl=k=>(N,Z)=>{const se=nn(N),Ce=se==="col"||se==="colgroup"?ca(N):N;return Hn(Ce,k,Z)},nt=Tl("th,td,caption"),Xr=Tl("th,td"),pu=k=>Xu(k.model.table.getSelectedCells()),js=(k,N)=>{const Z=Xr(k),se=Z.bind(Ce=>Pi(Ce)).map(Ce=>ep(Ce));return yr(Z,se,(Ce,et)=>Sn(et,Et=>cn(Xu(Et.dom.cells),Tt=>Vr(Tt,N)==="1"||vt(Tt,Ce)))).getOr([])},Al=[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}],Za=k=>({value:vn(k)}),Ol=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,gu=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,li=k=>Ol.test(k)||gu.test(k),vn=k=>ya(k,"#").toUpperCase(),ur=k=>li(k)?ot.some({value:vn(k)}):ot.none(),Sc=k=>{const N=k.toString(16);return(N.length===1?"0"+N:N).toUpperCase()},Us=k=>{const N=Sc(k.red)+Sc(k.green)+Sc(k.blue);return Za(N)},Ju=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,Jl=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,np=(k,N,Z,se)=>({red:k,green:N,blue:Z,alpha:se}),Zs=(k,N,Z,se)=>{const Ce=parseInt(k,10),et=parseInt(N,10),Et=parseInt(Z,10),Tt=parseFloat(se);return np(Ce,et,Et,Tt)},Ne=k=>{const N=Ju.exec(k);if(N!==null)return ot.some(Zs(N[1],N[2],N[3],"1"));const Z=Jl.exec(k);return Z!==null?ot.some(Zs(Z[1],Z[2],Z[3],Z[4])):ot.none()},Wa=k=>ur(k).orThunk(()=>Ne(k).map(Us)).getOrThunk(()=>{const N=document.createElement("canvas");N.height=1,N.width=1;const Z=N.getContext("2d");Z.clearRect(0,0,N.width,N.height),Z.fillStyle="#FFFFFF",Z.fillStyle=k,Z.fillRect(0,0,1,1);const se=Z.getImageData(0,0,1,1).data,Ce=se[0],et=se[1],Et=se[2],Tt=se[3];return Us(np(Ce,et,Et,Tt))}),fr=k=>Ne(k).map(Us).map(N=>"#"+N.value).getOr(k),Si=k=>{let N=k;return{get:()=>N,set:Ce=>{N=Ce}}},zl=k=>{const N=Si(ot.none()),Z=()=>N.get().each(k);return{clear:()=>{Z(),N.set(ot.none())},isSet:()=>N.get().isSome(),get:()=>N.get(),set:Tt=>{Z(),N.set(ot.some(Tt))}}},xr=()=>zl(k=>k.unbind()),xs=(k,N,Z)=>se=>{const Ce=xr(),et=jl(Z),Et=()=>{const Tt=pu(k),Lo=co=>k.formatter.match(N,{value:Z},co.dom,et);et?(se.setActive(!cn(Tt,Lo)),Ce.set(k.formatter.formatChanged(N,co=>se.setActive(!co),!0))):(se.setActive(Lt(Tt,Lo)),Ce.set(k.formatter.formatChanged(N,se.setActive,!1,{value:Z})))};return k.initialized?Et():k.on("init",Et),Ce.clear},Jn=k=>To(k,"menu"),wa=k=>zo(k,N=>{const Z=N.text||N.title||"";return Jn(N)?{text:Z,items:wa(N.menu)}:{text:Z,value:N.value}}),Ei=k=>k.length?ot.some(wa([{text:"Select...",value:"mce-no-match"},...k])):ot.none(),ci=(k,N,Z,se)=>zo(N,Ce=>{const et=Ce.text||Ce.title;return Jn(Ce)?{type:"nestedmenuitem",text:et,getSubmenuItems:()=>ci(k,Ce.menu,Z,se)}:{text:et,type:"togglemenuitem",onAction:()=>se(Ce.value),onSetup:xs(k,Z,Ce.value)}}),Ji=(k,N)=>Z=>{k.execCommand("mceTableApplyCellStyle",!1,{[N]:Z})},Ql=k=>Le(k,N=>Jn(N)?[{...N,menu:Ql(N.menu)}]:Ns(N.value)?[N]:[]),Ec=(k,N,Z,se)=>Ce=>Ce(ci(k,N,Z,se)),Jc=(k,N,Z)=>{const se=zo(N,Ce=>({text:Ce.title,value:"#"+Wa(Ce.value).value,type:"choiceitem"}));return[{type:"fancymenuitem",fancytype:"colorswatch",initData:{colors:se.length>0?se:void 0,allowCustomColors:!1},onAction:Ce=>{const et=Ce.value==="remove"?"":Ce.value;k.execCommand("mceTableApplyCellStyle",!1,{[Z]:et})}}]},Wf=k=>()=>{const Z=k.queryCommandValue("mceTableRowType")==="header"?"body":"header";k.execCommand("mceTableRowType",!1,{type:Z})},qf=k=>()=>{const Z=k.queryCommandValue("mceTableColType")==="th"?"td":"th";k.execCommand("mceTableColType",!1,{type:Z})},Tc=k=>Ei(du(k)).map(N=>({name:"class",type:"listbox",label:"Class",items:N})),E=[{name:"width",type:"input",label:"Width"},{name:"celltype",type:"listbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"listbox",label:"Scope",items:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{name:"halign",type:"listbox",label:"Horizontal align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"listbox",label:"Vertical align",items:Al}],P=k=>E.concat(Tc(k).toArray()),q=(k,N)=>{const se=[{name:"borderstyle",type:"listbox",label:"Border style",items:[{text:"Select...",value:""}].concat(wa(Va(k)))},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}];return{title:"Advanced",name:"advanced",items:N==="cell"?[{name:"borderwidth",type:"input",label:"Border width"}].concat(se):se}},xe={normal:(k,N)=>{const Z=k.dom;return{setAttrib:(Et,Tt)=>{Z.setAttrib(N,Et,Tt)},setStyle:(Et,Tt)=>{Z.setStyle(N,Et,Tt)},setFormat:(Et,Tt)=>{Tt===""?k.formatter.remove(Et,{value:null},N,!0):k.formatter.apply(Et,{value:Tt},N)}}}},at=vl("th"),xo=(k,N)=>k&&N?"sectionCells":k?"section":"cells",Uo=k=>{const N=k.section==="thead",Z=wo(Bo(k.cells),"th");return k.section==="tfoot"?{type:"footer"}:N||Z?{type:"header",subType:xo(N,Z)}:{type:"body"}},Bo=k=>{const N=Sn(k,Z=>at(Z.element));return N.length===0?ot.some("td"):N.length===k.length?ot.some("th"):ot.none()},io=k=>{const N=zo(k,Ce=>Uo(Ce).type),Z=ks(N,"header"),se=ks(N,"footer");if(!Z&&!se)return ot.some("body");{const Ce=ks(N,"body");return Z&&!Ce&&!se?ot.some("header"):!Z&&!Ce&&se?ot.some("footer"):ot.none()}},Wn=k=>{let N=!1,Z;return(...se)=>(N||(N=!0,Z=k.apply(null,se)),Z)},sr=(k,N)=>tn(k.all,Z=>Bn(Z.cells,se=>vt(N,se.element))),Ws=(k,N,Z)=>{const se=zo(N.selection,et=>yc(et).bind(Et=>sr(k,Et)).filter(Z)),Ce=xl(se);return qc(Ce.length>0,Ce)},Nl=(k,N)=>N.mergable,hu=(k,N)=>N.unmergable,Nd=(k,N)=>Ws(k,N,ve),Mr=(k,N)=>sr(k,N).exists(Z=>!Z.isLocked),fh=(k,N)=>Lt(N,Z=>Mr(k,Z)),sp=(k,N)=>Nl(k,N).filter(Z=>fh(k,Z.cells)),rg=(k,N)=>hu(k,N).filter(Z=>fh(k,Z));({...{generate:k=>{if(!Ee(k))throw new Error("cases must be an array");if(k.length===0)throw new Error("there must be at least one case");const N=[],Z={};return j(k,(se,Ce)=>{const et=bn(se);if(et.length!==1)throw new Error("one and only one name per case");const Et=et[0],Tt=se[Et];if(Z[Et]!==void 0)throw new Error("duplicate key detected:"+Et);if(Et==="cata")throw new Error("cannot have a case named cata (sorry)");if(!Ee(Tt))throw new Error("case arguments must be an array");N.push(Et),Z[Et]=(...Lo)=>{const co=Lo.length;if(co!==Tt.length)throw new Error("Wrong number of arguments to case "+Et+". Expected "+Tt.length+" ("+Tt+"), got "+co);return{fold:(...Ko)=>{if(Ko.length!==k.length)throw new Error("Wrong number of arguments to fold. Expected "+k.length+", got "+Ko.length);return Ko[Ce].apply(null,Lo)},match:Ko=>{const Qn=bn(Ko);if(N.length!==Qn.length)throw new Error("Wrong number of arguments to match. Expected: "+N.join(",")+` -Actual: `+Qn.join(","));if(!Lt(N,qs=>ks(Qn,qs)))throw new Error("Not all branches were specified when using match. Specified: "+Qn.join(", ")+` -Required: `+N.join(", "));return Ko[Et].apply(null,Lo)},log:Ko=>{console.log(Ko,{constructors:N,constructor:Et,params:Lo})}}}}),Z}}.generate([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}])});const Kf=(k,N)=>{const Z=Zl.fromTable(k);return Nd(Z,N).bind(Ce=>{const et=Ce[Ce.length-1],Et=Ce[0].row,Tt=et.row+et.rowspan,Lo=Z.all.slice(Et,Tt);return io(Lo)}).getOr("")},Gf=k=>Mo(k,"rgb")?fr(k):k,Fi=k=>{const N=St.fromDom(k);return{borderwidth:Na(N,"border-width").getOr(""),borderstyle:Na(N,"border-style").getOr(""),bordercolor:Na(N,"border-color").map(Gf).getOr(""),backgroundcolor:Na(N,"background-color").map(Gf).getOr("")}},di=k=>{const N=k[0],Z=k.slice(1);return j(Z,se=>{j(bn(N),Ce=>{uo(se,(et,Et)=>{const Tt=N[Ce];Tt!==""&&Ce===Et&&Tt!==et&&(N[Ce]=Ce==="class"?"mce-no-match":"")})})}),N},Yf=(k,N,Z,se)=>Bn(k,Ce=>!We(Z.formatter.matchNode(se,N+Ce))).getOr(""),Ac=ft(Yf,["left","center","right"],"align"),M1=ft(Yf,["top","middle","bottom"],"valign"),rp=(k,N)=>{const Z=El(k),se=ja(k),Ce=()=>({borderstyle:qo(Z,"border-style").getOr(""),bordercolor:Gf(qo(Z,"border-color").getOr("")),backgroundcolor:Gf(qo(Z,"background-color").getOr(""))}),et={height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,class:"",align:"",border:""},Et=()=>{const _n=Z["border-width"];return Nn(k)&&_n?{border:_n}:qo(se,"border").fold(()=>({}),Ko=>({border:Ko}))},Tt=N?Ce():{},Lo=()=>{const _n=qo(Z,"border-spacing").or(qo(se,"cellspacing")).fold(()=>({}),Qn=>({cellspacing:Qn})),Ko=qo(Z,"border-padding").or(qo(se,"cellpadding")).fold(()=>({}),Qn=>({cellpadding:Qn}));return{..._n,...Ko}};return{...et,...Z,...se,...Tt,...Et(),...Lo()}},ed=k=>Pi(St.fromDom(k)).map(N=>{const Z={selection:Xu(k.cells)};return Kf(N,Z)}).getOr(""),Dd=(k,N,Z)=>{const se=(Tt,Lo)=>{const co=Na(St.fromDom(Lo),"border-width");return Nn(k)&&co.isSome()?co.getOr(""):Tt.getAttrib(Lo,"border")||Wl(k.dom,Lo,"border-width")||Wl(k.dom,Lo,"border")||""},Ce=k.dom,et=Nn(k)?Ce.getStyle(N,"border-spacing")||Ce.getAttrib(N,"cellspacing"):Ce.getAttrib(N,"cellspacing")||Ce.getStyle(N,"border-spacing"),Et=Nn(k)?Wl(Ce,N,"padding")||Ce.getAttrib(N,"cellpadding"):Ce.getAttrib(N,"cellpadding")||Wl(Ce,N,"padding");return{width:Ce.getStyle(N,"width")||Ce.getAttrib(N,"width"),height:Ce.getStyle(N,"height")||Ce.getAttrib(N,"height"),cellspacing:et??"",cellpadding:Et??"",border:se(Ce,N),caption:!!Ce.select("caption",N)[0],class:Ce.getAttrib(N,"class",""),align:Ac(k,N),...Z?Fi(N):{}}},no=(k,N,Z)=>{const se=k.dom;return{height:se.getStyle(N,"height")||se.getAttrib(N,"height"),class:se.getAttrib(N,"class",""),type:ed(N),align:Ac(k,N),...Z?Fi(N):{}}},ec=(k,N,Z,se)=>{const Ce=k.dom,et=se.getOr(N);return{width:((Tt,Lo)=>Ce.getStyle(Tt,Lo)||Ce.getAttrib(Tt,Lo))(et,"width"),scope:Ce.getAttrib(N,"scope"),celltype:Gi(N),class:Ce.getAttrib(N,"class",""),halign:Ac(k,N),valign:M1(k,N),...Z?Fi(N):{}}},Xf=(k,N)=>{const Z=Zl.fromTable(k),se=Zl.justCells(Z),Ce=Sn(se,et=>cn(N,Et=>vt(et.element,Et)));return zo(Ce,et=>({element:et.element.dom,column:Zl.getColumnAt(Z,et.column).map(Et=>Et.element.dom)}))},Rd=(k,N,Z,se)=>{se("scope")&&k.setAttrib("scope",Z.scope),se("class")&&Z.class!=="mce-no-match"&&k.setAttrib("class",Z.class),se("width")&&N.setStyle("width",wi(Z.width))},ka=(k,N,Z)=>{Z("backgroundcolor")&&k.setFormat("tablecellbackgroundcolor",N.backgroundcolor),Z("bordercolor")&&k.setFormat("tablecellbordercolor",N.bordercolor),Z("borderstyle")&&k.setFormat("tablecellborderstyle",N.borderstyle),Z("borderwidth")&&k.setFormat("tablecellborderwidth",wi(N.borderwidth))},Dl=(k,N,Z,se)=>{const Ce=N.length===1;j(N,et=>{const Et=et.element,Tt=Ce?ve:se,Lo=xe.normal(k,Et),co=et.column.map(_n=>xe.normal(k,_n)).getOr(Lo);Rd(Lo,co,Z,Tt),ql(k)&&ka(Lo,Z,Tt),se("halign")&&Yr(k,Et,Z.halign),se("valign")&&Ci(k,Et,Z.valign)})},Qu=(k,N)=>{k.execCommand("mceTableCellType",!1,{type:N.celltype,no_events:!0})},Md=(k,N,Z,se)=>{const Ce=D(se,(et,Et)=>Z[Et]!==et);Kt(Ce)>0&&N.length>=1&&Pi(N[0]).each(et=>{const Et=Xf(et,N),Tt=Kt(D(Ce,(co,_n)=>_n!=="scope"&&_n!=="celltype"))>0,Lo=Ge(Ce,"celltype");(Tt||Ge(Ce,"scope"))&&Dl(k,Et,se,ft(Ge,Ce)),Lo&&Qu(k,se),Sd(k,et.dom,{structure:Lo,style:Tt})})},ag=(k,N,Z,se)=>{const Ce=se.getData();se.close(),k.undoManager.transact(()=>{Md(k,N,Z,Ce),k.focus()})},tc=(k,N)=>{const Z=Pi(N[0]).map(se=>zo(Xf(se,N),Ce=>ec(k,Ce.element,ql(k),Ce.column)));return di(Z.getOrDie())},Jf=k=>{const N=pu(k);if(N.length===0)return;const Z=tc(k,N),se={type:"tabpanel",tabs:[{title:"General",name:"general",items:P(k)},q(k,"cell")]},Ce={type:"panel",items:[{type:"grid",columns:2,items:P(k)}]};k.windowManager.open({title:"Cell Properties",size:"normal",body:ql(k)?se:Ce,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Z,onSubmit:ft(ag,k,N,Z)})},Qf=k=>Ei(tp(k)).map(N=>({name:"class",type:"listbox",label:"Class",items:N})),wt=[{type:"listbox",name:"type",label:"Row type",items:[{text:"Header",value:"header"},{text:"Body",value:"body"},{text:"Footer",value:"footer"}]},{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height",type:"input"}],ig=k=>wt.concat(Qf(k).toArray()),Bd=(k,N,Z)=>{Z("class")&&N.class!=="mce-no-match"&&k.setAttrib("class",N.class),Z("height")&&k.setStyle("height",wi(N.height))},Qo=(k,N,Z)=>{Z("backgroundcolor")&&k.setStyle("background-color",N.backgroundcolor),Z("bordercolor")&&k.setStyle("border-color",N.bordercolor),Z("borderstyle")&&k.setStyle("border-style",N.borderstyle)},lo=(k,N,Z,se)=>{const et=N.length===1?ve:se;j(N,Et=>{const Tt=_l(St.fromDom(Et),"td,th"),Lo=xe.normal(k,Et);Bd(Lo,Z,et),jr(k)&&Qo(Lo,Z,et),se("height")&&j(Tt,co=>{k.dom.setStyle(co.dom,"height",null)}),se("align")&&Yr(k,Et,Z.align)})},Ld=(k,N)=>{k.execCommand("mceTableRowType",!1,{type:N.type,no_events:!0})},$s=(k,N,Z,se)=>{const Ce=D(se,(et,Et)=>Z[Et]!==et);if(Kt(Ce)>0){const et=Ge(Ce,"type"),Et=et?Kt(Ce)>1:!0;Et&&lo(k,N,se,ft(Ge,Ce)),et&&Ld(k,se),Pi(St.fromDom(N[0])).each(Tt=>Sd(k,Tt.dom,{structure:et,style:Et}))}},Rl=(k,N,Z,se)=>{const Ce=se.getData();se.close(),k.undoManager.transact(()=>{$s(k,N,Z,Ce),k.focus()})},Ml=k=>{const N=js(Yn(k),dr.selected);if(N.length===0)return;const Z=zo(N,Et=>no(k,Et.dom,jr(k))),se=di(Z),Ce={type:"tabpanel",tabs:[{title:"General",name:"general",items:ig(k)},q(k,"row")]},et={type:"panel",items:[{type:"grid",columns:2,items:ig(k)}]};k.windowManager.open({title:"Row Properties",size:"normal",body:jr(k)?Ce:et,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:se,onSubmit:ft(Rl,k,zo(N,Et=>Et.dom),se)})},Ho=(k,N,Z)=>{const se=Z?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],Ce=[{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}],et=Cl(k)?[{type:"input",name:"cellspacing",label:"Cell spacing",inputMode:"numeric"},{type:"input",name:"cellpadding",label:"Cell padding",inputMode:"numeric"},{type:"input",name:"border",label:"Border width"},{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[],Et=[{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}],Tt=N.length>0?[{name:"class",type:"listbox",label:"Class",items:N}]:[];return se.concat(Ce).concat(et).concat(Et).concat(Tt)},ef=(k,N,Z,se)=>{if(N.tagName==="TD"||N.tagName==="TH")ce(Z)&&Ot(se)?k.setStyle(N,Z,se):k.setStyles(N,Z);else if(N.children)for(let Ce=0;Ce{const Ce=k.dom,et={},Et={},Tt=Nn(k),Lo=so(k),co=parseFloat(Z.border)===0;if(!We(Z.class)&&Z.class!=="mce-no-match"&&(et.class=Z.class),Et.height=wi(Z.height),Tt?Et.width=wi(Z.width):Ce.getAttrib(N,"width")&&(et.width=ba(Z.width)),Tt?(co?(et.border=0,Et["border-width"]=""):(Et["border-width"]=wi(Z.border),et.border=1),Et["border-spacing"]=wi(Z.cellspacing)):(et.border=co?0:Z.border,et.cellpadding=Z.cellpadding,et.cellspacing=Z.cellspacing),Tt&&N.children){const _n={};if(co?_n["border-width"]="":se.border&&(_n["border-width"]=wi(Z.border)),se.cellpadding&&(_n.padding=wi(Z.cellpadding)),Lo&&se.bordercolor&&(_n["border-color"]=Z.bordercolor),!Cr(_n))for(let Ko=0;Ko{const Ce=k.dom,et=se.getData(),Et=D(et,(Tt,Lo)=>Z[Lo]!==Tt);se.close(),k.undoManager.transact(()=>{if(!N){const Tt=er(et.cols).getOr(1),Lo=er(et.rows).getOr(1);k.execCommand("mceInsertTable",!1,{rows:Lo,columns:Tt}),N=Xr(Yn(k),Hr(k)).bind(co=>Pi(co,Hr(k))).map(co=>co.dom).getOrDie()}if(Kt(Et)>0){const Tt={border:Ge(Et,"border"),bordercolor:Ge(Et,"bordercolor"),cellpadding:Ge(Et,"cellpadding")};qb(k,N,et,Tt);const Lo=Ce.select("caption",N)[0];(Lo&&!et.caption||!Lo&&et.caption)&&k.execCommand("mceTableToggleCaption"),Yr(k,N,et.align)}if(k.focus(),k.addVisual(),Kt(Et)>0){const Tt=Ge(Et,"caption"),Lo=Tt?Kt(Et)>1:!0;Sd(k,N,{structure:Tt,style:Lo})}})},lg=(k,N)=>{const Z=k.dom;let se,Ce=rp(k,so(k));N?(Ce.cols="1",Ce.rows="1",so(k)&&(Ce.borderstyle="",Ce.bordercolor="",Ce.backgroundcolor="")):(se=Z.getParent(k.selection.getStart(),"table",k.getBody()),se?Ce=Dd(k,se,so(k)):so(k)&&(Ce.borderstyle="",Ce.bordercolor="",Ce.backgroundcolor=""));const et=Ei(Kl(k));et.isSome()&&Ce.class&&(Ce.class=Ce.class.replace(/\s*mce\-item\-table\s*/g,""));const Et={type:"grid",columns:2,items:Ho(k,et.getOr([]),N)},Tt=()=>({type:"panel",items:[Et]}),Lo=()=>({type:"tabpanel",tabs:[{title:"General",name:"general",items:[Et]},q(k,"table")]}),co=so(k)?Lo():Tt();k.windowManager.open({title:"Table Properties",size:"normal",body:co,onSubmit:ft(Xe,k,se,Ce),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Ce})},em=k=>{const N=Z=>{Yi(Yn(k))&&Z()};uo({mceTableProps:ft(lg,k,!1),mceTableRowProps:ft(Ml,k),mceTableCellProps:ft(Jf,k),mceInsertTableDialog:ft(lg,k,!0)},(Z,se)=>k.addCommand(se,()=>N(Z)))},tm=(k,N)=>lu(k,N).isSome(),tf=Ke,bu=k=>{const N=(se,Ce)=>za(se,Ce).exists(et=>parseInt(et,10)>1),Z=se=>N(se,"rowspan")||N(se,"colspan");return k.length>0&&Lt(k,Z)?ot.some(k):ot.none()},Kb=(k,N,Z)=>N.length<=1?ot.none():zd(k,Z.firstSelectedSelector,Z.lastSelectedSelector).map(se=>({bounds:se,cells:N})),Pd=k=>({element:k,mergable:ot.none(),unmergable:ot.none(),selection:[k]}),Ss=(k,N,Z)=>({element:Z,mergable:Kb(N,k,dr),unmergable:bu(k),selection:tf(k)}),Oc=k=>{const N=Si(ot.none()),Z=Si([]);let se=ot.none();const Ce=vl("caption"),et=es=>se.forall(Ks=>!Ks[es]),Et=()=>nt(Yn(k),Hr(k)),Tt=()=>nt(vs(k),Hr(k)),Lo=()=>Et().bind(es=>Fs(yr(Pi(es),Tt().bind(Pi),(Ks,qa)=>vt(Ks,qa)?Ce(es)?ot.some(Pd(es)):ot.some(Ss(pu(k),Ks,es)):ot.none()))),co=es=>Pi(es.element).map(qa=>{const Qi=Zl.fromTable(qa),ph=Nd(Qi,es).getOr([]),lp=qi(ph,(nm,sm)=>(sm.isLocked&&(nm.onAny=!0,sm.column===0?nm.onFirst=!0:sm.column+sm.colspan>=Qi.grid.columns&&(nm.onLast=!0)),nm),{onAny:!1,onFirst:!1,onLast:!1});return{mergeable:sp(Qi,es).isSome(),unmergeable:rg(Qi,es).isSome(),locked:lp}}),_n=()=>{N.set(Wn(Lo)()),se=N.get().bind(co),j(Z.get(),ue)},Ko=es=>(es(),Z.set(Z.get().concat([es])),()=>{Z.set(Sn(Z.get(),Ks=>Ks!==es))}),Qn=(es,Ks)=>Ko(()=>N.get().fold(()=>{es.setEnabled(!1)},qa=>{es.setEnabled(!Ks(qa)&&k.selection.isEditable())})),ea=(es,Ks,qa)=>Ko(()=>N.get().fold(()=>{es.setEnabled(!1),es.setActive(!1)},Qi=>{es.setEnabled(!Ks(Qi)&&k.selection.isEditable()),es.setActive(qa(Qi))})),qs=es=>se.exists(Ks=>Ks.locked[es]),oc=es=>Qn(es,Ks=>!1),nc=es=>Qn(es,Ks=>Ce(Ks.element)),zc=es=>Ks=>Qn(Ks,qa=>Ce(qa.element)||qs(es)),ip=es=>Ks=>Qn(Ks,qa=>Ce(qa.element)||es().isNone()),td=(es,Ks)=>qa=>Qn(qa,Qi=>Ce(Qi.element)||es().isNone()||qs(Ks)),of=es=>Qn(es,Ks=>et("mergeable")),om=es=>Qn(es,Ks=>et("unmergeable")),xu=es=>ea(es,Ct,Ks=>Pi(Ks.element,Hr(k)).exists(Qi=>tm(Qi,"caption"))),nf=(es,Ks)=>qa=>ea(qa,Qi=>Ce(Qi.element),()=>k.queryCommandValue(es)===Ks),mh=nf("mceTableRowType","header"),wu=nf("mceTableColType","th");return k.on("NodeChange ExecCommand TableSelectorChange",_n),{onSetupTable:oc,onSetupCellOrRow:nc,onSetupColumn:zc,onSetupPasteable:ip,onSetupPasteableColumn:td,onSetupMergeable:of,onSetupUnmergeable:om,resetTargets:_n,onSetupTableWithCaption:xu,onSetupTableRowHeaders:mh,onSetupTableColumnHeaders:wu,targets:N.get}};var cg=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const Bl="x-tinymce/dom-table-",yu=Bl+"rows",pl=Bl+"columns",ar=k=>{var N;const Z=(N=cg.read())!==null&&N!==void 0?N:[];return tn(Z,se=>ot.from(se.getType(k)))},vu=()=>ar(yu),Er=()=>ar(pl),ap=k=>N=>{const Z=()=>{N.setEnabled(k.selection.isEditable())};return k.on("NodeChange",Z),Z(),()=>{k.off("NodeChange",Z)}},Ll=(k,N)=>{k.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",onSetup:ap(k),fetch:Tt=>Tt("inserttable | cell row column | advtablesort | tableprops deletetable")});const Z=Tt=>()=>k.execCommand(Tt),se=(Tt,Lo)=>{k.queryCommandSupported(Lo.command)&&k.ui.registry.addButton(Tt,{...Lo,onAction:mo(Lo.onAction)?Lo.onAction:Z(Lo.command)})},Ce=(Tt,Lo)=>{k.queryCommandSupported(Lo.command)&&k.ui.registry.addToggleButton(Tt,{...Lo,onAction:mo(Lo.onAction)?Lo.onAction:Z(Lo.command)})};se("tableprops",{tooltip:"Table properties",command:"mceTableProps",icon:"table",onSetup:N.onSetupTable}),se("tabledelete",{tooltip:"Delete table",command:"mceTableDelete",icon:"table-delete-table",onSetup:N.onSetupTable}),se("tablecellprops",{tooltip:"Cell properties",command:"mceTableCellProps",icon:"table-cell-properties",onSetup:N.onSetupCellOrRow}),se("tablemergecells",{tooltip:"Merge cells",command:"mceTableMergeCells",icon:"table-merge-cells",onSetup:N.onSetupMergeable}),se("tablesplitcells",{tooltip:"Split cell",command:"mceTableSplitCells",icon:"table-split-cells",onSetup:N.onSetupUnmergeable}),se("tableinsertrowbefore",{tooltip:"Insert row before",command:"mceTableInsertRowBefore",icon:"table-insert-row-above",onSetup:N.onSetupCellOrRow}),se("tableinsertrowafter",{tooltip:"Insert row after",command:"mceTableInsertRowAfter",icon:"table-insert-row-after",onSetup:N.onSetupCellOrRow}),se("tabledeleterow",{tooltip:"Delete row",command:"mceTableDeleteRow",icon:"table-delete-row",onSetup:N.onSetupCellOrRow}),se("tablerowprops",{tooltip:"Row properties",command:"mceTableRowProps",icon:"table-row-properties",onSetup:N.onSetupCellOrRow}),se("tableinsertcolbefore",{tooltip:"Insert column before",command:"mceTableInsertColBefore",icon:"table-insert-column-before",onSetup:N.onSetupColumn("onFirst")}),se("tableinsertcolafter",{tooltip:"Insert column after",command:"mceTableInsertColAfter",icon:"table-insert-column-after",onSetup:N.onSetupColumn("onLast")}),se("tabledeletecol",{tooltip:"Delete column",command:"mceTableDeleteCol",icon:"table-delete-column",onSetup:N.onSetupColumn("onAny")}),se("tablecutrow",{tooltip:"Cut row",command:"mceTableCutRow",icon:"cut-row",onSetup:N.onSetupCellOrRow}),se("tablecopyrow",{tooltip:"Copy row",command:"mceTableCopyRow",icon:"duplicate-row",onSetup:N.onSetupCellOrRow}),se("tablepasterowbefore",{tooltip:"Paste row before",command:"mceTablePasteRowBefore",icon:"paste-row-before",onSetup:N.onSetupPasteable(vu)}),se("tablepasterowafter",{tooltip:"Paste row after",command:"mceTablePasteRowAfter",icon:"paste-row-after",onSetup:N.onSetupPasteable(vu)}),se("tablecutcol",{tooltip:"Cut column",command:"mceTableCutCol",icon:"cut-column",onSetup:N.onSetupColumn("onAny")}),se("tablecopycol",{tooltip:"Copy column",command:"mceTableCopyCol",icon:"duplicate-column",onSetup:N.onSetupColumn("onAny")}),se("tablepastecolbefore",{tooltip:"Paste column before",command:"mceTablePasteColBefore",icon:"paste-column-before",onSetup:N.onSetupPasteableColumn(Er,"onFirst")}),se("tablepastecolafter",{tooltip:"Paste column after",command:"mceTablePasteColAfter",icon:"paste-column-after",onSetup:N.onSetupPasteableColumn(Er,"onLast")}),se("tableinsertdialog",{tooltip:"Insert table",command:"mceInsertTableDialog",icon:"table",onSetup:ap(k)});const et=Ql(Kl(k));et.length!==0&&k.queryCommandSupported("mceTableToggleClass")&&k.ui.registry.addMenuButton("tableclass",{icon:"table-classes",tooltip:"Table styles",fetch:Ec(k,et,"tableclass",Tt=>k.execCommand("mceTableToggleClass",!1,Tt)),onSetup:N.onSetupTable});const Et=Ql(du(k));Et.length!==0&&k.queryCommandSupported("mceTableCellToggleClass")&&k.ui.registry.addMenuButton("tablecellclass",{icon:"table-cell-classes",tooltip:"Cell styles",fetch:Ec(k,Et,"tablecellclass",Tt=>k.execCommand("mceTableCellToggleClass",!1,Tt)),onSetup:N.onSetupCellOrRow}),k.queryCommandSupported("mceTableApplyCellStyle")&&(k.ui.registry.addMenuButton("tablecellvalign",{icon:"vertical-align",tooltip:"Vertical align",fetch:Ec(k,Al,"tablecellverticalalign",Ji(k,"vertical-align")),onSetup:N.onSetupCellOrRow}),k.ui.registry.addMenuButton("tablecellborderwidth",{icon:"border-width",tooltip:"Border width",fetch:Ec(k,vr(k),"tablecellborderwidth",Ji(k,"border-width")),onSetup:N.onSetupCellOrRow}),k.ui.registry.addMenuButton("tablecellborderstyle",{icon:"border-style",tooltip:"Border style",fetch:Ec(k,Va(k),"tablecellborderstyle",Ji(k,"border-style")),onSetup:N.onSetupCellOrRow}),k.ui.registry.addMenuButton("tablecellbackgroundcolor",{icon:"cell-background-color",tooltip:"Background color",fetch:Tt=>Tt(Jc(k,Ra(k),"background-color")),onSetup:N.onSetupCellOrRow}),k.ui.registry.addMenuButton("tablecellbordercolor",{icon:"cell-border-color",tooltip:"Border color",fetch:Tt=>Tt(Jc(k,Ku(k),"border-color")),onSetup:N.onSetupCellOrRow})),Ce("tablecaption",{tooltip:"Table caption",icon:"table-caption",command:"mceTableToggleCaption",onSetup:N.onSetupTableWithCaption}),Ce("tablerowheader",{tooltip:"Row header",icon:"table-top-header",command:"mceTableRowType",onAction:Wf(k),onSetup:N.onSetupTableRowHeaders}),Ce("tablecolheader",{tooltip:"Column header",icon:"table-left-header",command:"mceTableColType",onAction:qf(k),onSetup:N.onSetupTableColumnHeaders})},Jr=k=>{const N=se=>k.dom.is(se,"table")&&k.getBody().contains(se)&&k.dom.isEditable(se.parentNode),Z=un(k);Z.length>0&&k.ui.registry.addContextToolbar("table",{predicate:N,items:Z,scope:"node",position:"node"})},xt=k=>N=>{const Z=()=>{N.setEnabled(k.selection.isEditable())};return k.on("NodeChange",Z),Z(),()=>{k.off("NodeChange",Z)}},_u=(k,N)=>{const Z=Ko=>()=>k.execCommand(Ko),se=(Ko,Qn)=>k.queryCommandSupported(Qn.command)?(k.ui.registry.addMenuItem(Ko,{...Qn,onAction:mo(Qn.onAction)?Qn.onAction:Z(Qn.command)}),!0):!1,Ce=(Ko,Qn)=>{k.queryCommandSupported(Qn.command)&&k.ui.registry.addToggleMenuItem(Ko,{...Qn,onAction:mo(Qn.onAction)?Qn.onAction:Z(Qn.command)})},et=Ko=>{k.execCommand("mceInsertTable",!1,{rows:Ko.numRows,columns:Ko.numColumns})},Et=[se("tableinsertrowbefore",{text:"Insert row before",icon:"table-insert-row-above",command:"mceTableInsertRowBefore",onSetup:N.onSetupCellOrRow}),se("tableinsertrowafter",{text:"Insert row after",icon:"table-insert-row-after",command:"mceTableInsertRowAfter",onSetup:N.onSetupCellOrRow}),se("tabledeleterow",{text:"Delete row",icon:"table-delete-row",command:"mceTableDeleteRow",onSetup:N.onSetupCellOrRow}),se("tablerowprops",{text:"Row properties",icon:"table-row-properties",command:"mceTableRowProps",onSetup:N.onSetupCellOrRow}),se("tablecutrow",{text:"Cut row",icon:"cut-row",command:"mceTableCutRow",onSetup:N.onSetupCellOrRow}),se("tablecopyrow",{text:"Copy row",icon:"duplicate-row",command:"mceTableCopyRow",onSetup:N.onSetupCellOrRow}),se("tablepasterowbefore",{text:"Paste row before",icon:"paste-row-before",command:"mceTablePasteRowBefore",onSetup:N.onSetupPasteable(vu)}),se("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",command:"mceTablePasteRowAfter",onSetup:N.onSetupPasteable(vu)})],Tt=[se("tableinsertcolumnbefore",{text:"Insert column before",icon:"table-insert-column-before",command:"mceTableInsertColBefore",onSetup:N.onSetupColumn("onFirst")}),se("tableinsertcolumnafter",{text:"Insert column after",icon:"table-insert-column-after",command:"mceTableInsertColAfter",onSetup:N.onSetupColumn("onLast")}),se("tabledeletecolumn",{text:"Delete column",icon:"table-delete-column",command:"mceTableDeleteCol",onSetup:N.onSetupColumn("onAny")}),se("tablecutcolumn",{text:"Cut column",icon:"cut-column",command:"mceTableCutCol",onSetup:N.onSetupColumn("onAny")}),se("tablecopycolumn",{text:"Copy column",icon:"duplicate-column",command:"mceTableCopyCol",onSetup:N.onSetupColumn("onAny")}),se("tablepastecolumnbefore",{text:"Paste column before",icon:"paste-column-before",command:"mceTablePasteColBefore",onSetup:N.onSetupPasteableColumn(Er,"onFirst")}),se("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",command:"mceTablePasteColAfter",onSetup:N.onSetupPasteableColumn(Er,"onLast")})],Lo=[se("tablecellprops",{text:"Cell properties",icon:"table-cell-properties",command:"mceTableCellProps",onSetup:N.onSetupCellOrRow}),se("tablemergecells",{text:"Merge cells",icon:"table-merge-cells",command:"mceTableMergeCells",onSetup:N.onSetupMergeable}),se("tablesplitcells",{text:"Split cell",icon:"table-split-cells",command:"mceTableSplitCells",onSetup:N.onSetupUnmergeable})];Sl(k)?k.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"inserttable",onAction:et}],onSetup:xt(k)}):k.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:Z("mceInsertTableDialog"),onSetup:xt(k)}),k.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:Z("mceInsertTableDialog"),onSetup:xt(k)}),se("tableprops",{text:"Table properties",onSetup:N.onSetupTable,command:"mceTableProps"}),se("deletetable",{text:"Delete table",icon:"table-delete-table",onSetup:N.onSetupTable,command:"mceTableDelete"}),ks(Et,!0)&&k.ui.registry.addNestedMenuItem("row",{type:"nestedmenuitem",text:"Row",getSubmenuItems:Rt("tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter")}),ks(Tt,!0)&&k.ui.registry.addNestedMenuItem("column",{type:"nestedmenuitem",text:"Column",getSubmenuItems:Rt("tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter")}),ks(Lo,!0)&&k.ui.registry.addNestedMenuItem("cell",{type:"nestedmenuitem",text:"Cell",getSubmenuItems:Rt("tablecellprops tablemergecells tablesplitcells")}),k.ui.registry.addContextMenu("table",{update:()=>(N.resetTargets(),N.targets().fold(Rt(""),Ko=>nn(Ko.element)==="caption"?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable"))});const co=Ql(Kl(k));co.length!==0&&k.queryCommandSupported("mceTableToggleClass")&&k.ui.registry.addNestedMenuItem("tableclass",{icon:"table-classes",text:"Table styles",getSubmenuItems:()=>ci(k,co,"tableclass",Ko=>k.execCommand("mceTableToggleClass",!1,Ko)),onSetup:N.onSetupTable});const _n=Ql(du(k));_n.length!==0&&k.queryCommandSupported("mceTableCellToggleClass")&&k.ui.registry.addNestedMenuItem("tablecellclass",{icon:"table-cell-classes",text:"Cell styles",getSubmenuItems:()=>ci(k,_n,"tablecellclass",Ko=>k.execCommand("mceTableCellToggleClass",!1,Ko)),onSetup:N.onSetupCellOrRow}),k.queryCommandSupported("mceTableApplyCellStyle")&&(k.ui.registry.addNestedMenuItem("tablecellvalign",{icon:"vertical-align",text:"Vertical align",getSubmenuItems:()=>ci(k,Al,"tablecellverticalalign",Ji(k,"vertical-align")),onSetup:N.onSetupCellOrRow}),k.ui.registry.addNestedMenuItem("tablecellborderwidth",{icon:"border-width",text:"Border width",getSubmenuItems:()=>ci(k,vr(k),"tablecellborderwidth",Ji(k,"border-width")),onSetup:N.onSetupCellOrRow}),k.ui.registry.addNestedMenuItem("tablecellborderstyle",{icon:"border-style",text:"Border style",getSubmenuItems:()=>ci(k,Va(k),"tablecellborderstyle",Ji(k,"border-style")),onSetup:N.onSetupCellOrRow}),k.ui.registry.addNestedMenuItem("tablecellbackgroundcolor",{icon:"cell-background-color",text:"Background color",getSubmenuItems:()=>Jc(k,Ra(k),"background-color"),onSetup:N.onSetupCellOrRow}),k.ui.registry.addNestedMenuItem("tablecellbordercolor",{icon:"cell-border-color",text:"Border color",getSubmenuItems:()=>Jc(k,Ku(k),"border-color"),onSetup:N.onSetupCellOrRow})),Ce("tablecaption",{icon:"table-caption",text:"Table caption",command:"mceTableToggleCaption",onSetup:N.onSetupTableWithCaption}),Ce("tablerowheader",{text:"Row header",icon:"table-top-header",command:"mceTableRowType",onAction:Wf(k),onSetup:N.onSetupTableRowHeaders}),Ce("tablecolheader",{text:"Column header",icon:"table-left-header",command:"mceTableColType",onAction:qf(k),onSetup:N.onSetupTableRowHeaders})},Qr=k=>{const N=Oc(k);Yc(k),em(k),_u(k,N),Ll(k,N),Jr(k)};var Gb=()=>{w.add("table",Qr)};Gb()})();tinymce.Resource.add("content/default/content.css",`body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border="0"]):not([style*=border-width]) td,table[border]:not([border="0"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border="0"]):not([style*=border-style]) td,table[border]:not([border="0"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border="0"]):not([style*=border-color]) td,table[border]:not([border="0"]):not([style*=border-color]) th{border-color:#ccc}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}`);L7/skins/ui/oxide/content.js;L7.init({selector:"textarea.wysiwyg",menubar:!1,license_key:"gpl",statusbar:!1,browser_spellcheck:!0,toolbar1:"undo redo | styleselect | bold italic | link bullist numlist outdent indent | forecolor backcolor | paste",plugins:["lists","link"],contextmenu:[],paste_data_images:!1,paste_webkit_styles:"color",paste_merge_formats:!0,setup:function(w){w.on("blur",function(g){var S=L7.activeEditor.getContent();S.includes("{const l=r.partUids[i];return n.getSystem().getByUid(l).toOptional()},Tp=(n,r,i)=>Ts(n,r,i).getOrDie("Could not find part: "+i),xT=(n,r,i)=>{const l={},u=r.partUids,f=n.getSystem();return $t(i,p=>{l[p]=ue(f.getByUid(u[p]))}),l},o2=(n,r)=>{const i=n.getSystem();return Zn(r.partUids,(l,u)=>ue(i.getByUid(l)))},wT=n=>tn(n.partUids),n2=(n,r,i)=>{const l={},u=r.partUids,f=n.getSystem();return $t(i,p=>{l[p]=ue(f.getByUid(u[p]).getOrDie())}),l},kT=(n,r)=>{const i=_T(r);return Xi(pt(i,l=>({key:l,value:n+"-"+l})))},s2=n=>dr("partUids","partUids",kn(r=>kT(r.uid,n)),Pi());var Z5=Object.freeze({__proto__:null,generate:Vi,generateOne:Qk,schemas:vT,names:_T,substitutes:e2,components:t2,defaultUids:kT,defaultUidsSchema:s2,getAllParts:o2,getAllPartNames:wT,getPart:Ts,getPartOrDie:Tp,getParts:xT,getPartsOrDie:n2});const CT=(n,r,i,l,u)=>{const f=((p,y)=>(p.length>0?[Tl("parts",p)]:[]).concat([nt("uid"),Ne("dom",{}),Ne("components",[]),vh("originalSpec"),Ne("debug.sketcher",{})]).concat(y))(l,u);return la(n+" [SpecSchema]",Ur(f.concat(r)),i)},h0=(n,r,i,l,u)=>{const f=r2(u),p=vT(i),y=s2(i),v=CT(n,r,f,p,[y]),C=e2(0,v,i);return l(v,t2(n,v,C.internals()),f,C.externals())},r2=n=>(r=>Vo(r,"uid"))(n)?n:{...n,uid:Dc("uid")},W5=Ur([nt("name"),nt("factory"),nt("configFields"),Ne("apis",{}),Ne("extraApis",{})]),ST=Ur([nt("name"),nt("factory"),nt("configFields"),nt("partFields"),Ne("apis",{}),Ne("extraApis",{})]),ld=n=>{const r=la("Sketcher for "+n.name,W5,n),i=Zn(r.apis,ty),l=Zn(r.extraApis,(u,f)=>ml(u,f));return{name:r.name,configFields:r.configFields,sketch:u=>((f,p,y,v)=>{const C=r2(v);return y(CT(f,p,C,[],[]),C)})(r.name,r.configFields,r.factory,u),...i,...l}},pl=n=>{const r=la("Sketcher for "+n.name,ST,n),i=Vi(r.name,r.partFields),l=Zn(r.apis,ty),u=Zn(r.extraApis,(f,p)=>ml(f,p));return{name:r.name,partFields:r.partFields,configFields:r.configFields,sketch:f=>h0(r.name,r.configFields,r.partFields,r.factory,f),parts:i,...l,...u}},Ay=n=>pc("input")(n)&&yr(n,"type")!=="radio"||pc("textarea")(n);var ET=Object.freeze({__proto__:null,getCurrent:(n,r,i)=>r.find(n)});const q5=[nt("find")],In=Qr({fields:q5,name:"composing",apis:ET}),AT=["input","button","textarea","select"],TT=(n,r,i)=>{(r.disabled()?b0:i2)(n,r)},a2=(n,r)=>r.useNative===!0&&Ge(AT,ni(n.element)),OT=n=>{wo(n.element,"disabled","disabled")},K5=n=>{pn(n.element,"disabled")},Ty=n=>{wo(n.element,"aria-disabled","true")},G5=n=>{wo(n.element,"aria-disabled","false")},b0=(n,r,i)=>{r.disableClass.each(l=>{At(n.element,l)}),(a2(n,r)?OT:Ty)(n),r.onDisabled(n)},i2=(n,r,i)=>{r.disableClass.each(l=>{co(n.element,l)}),(a2(n,r)?K5:G5)(n),r.onEnabled(n)},Oy=(n,r)=>a2(n,r)?(i=>Wc(i.element,"disabled"))(n):(i=>yr(i.element,"aria-disabled")==="true")(n);var Y5=Object.freeze({__proto__:null,enable:i2,disable:b0,isDisabled:Oy,onLoad:TT,set:(n,r,i,l)=>{(l?b0:i2)(n,r)}}),X5=Object.freeze({__proto__:null,exhibit:(n,r)=>ar({classes:r.disabled()?r.disableClass.toArray():[]}),events:(n,r)=>$o([Qu(di(),(i,l)=>Oy(i,n)),yu(n,r,TT)])}),J5=[xs("disabled",Fe),Ne("useNative",!0),vn("disableClass"),Dn("onDisabled"),Dn("onEnabled")];const Fo=Qr({fields:J5,name:"disabling",active:X5,apis:Y5}),zT=(n,r,i,l)=>{const u=fa(n.element,"."+r.highlightClass);$t(u,f=>{Ao(l,p=>$n(p.element,f))||(co(f,r.highlightClass),n.getSystem().getByDom(f).each(p=>{r.onDehighlight(n,p),Qo(p,Md())}))})},qh=(n,r,i,l)=>{zT(n,r,0,[l]),l2(n,r,i,l)||(At(l.element,r.highlightClass),r.onHighlight(n,l),Qo(l,ag()))},l2=(n,r,i,l)=>_n(l.element,r.highlightClass),NT=(n,r,i)=>Ys(n.element,"."+r.itemClass).bind(l=>n.getSystem().getByDom(l).toOptional()),DT=(n,r,i)=>{const l=fa(n.element,"."+r.itemClass);return(l.length>0?D.some(l[l.length-1]):D.none()).bind(u=>n.getSystem().getByDom(u).toOptional())},RT=(n,r,i,l)=>{const u=fa(n.element,"."+r.itemClass);return Fr(u,f=>_n(f,r.highlightClass)).bind(f=>{const p=rm(f,l,0,u.length-1);return n.getSystem().getByDom(u[p]).toOptional()})},MT=(n,r,i)=>{const l=fa(n.element,"."+r.itemClass);return bi(pt(l,u=>n.getSystem().getByDom(u).toOptional()))};var Q5=Object.freeze({__proto__:null,dehighlightAll:(n,r,i)=>zT(n,r,0,[]),dehighlight:(n,r,i,l)=>{l2(n,r,i,l)&&(co(l.element,r.highlightClass),r.onDehighlight(n,l),Qo(l,Md()))},highlight:qh,highlightFirst:(n,r,i)=>{NT(n,r).each(l=>{qh(n,r,i,l)})},highlightLast:(n,r,i)=>{DT(n,r).each(l=>{qh(n,r,i,l)})},highlightAt:(n,r,i,l)=>{((u,f,p,y)=>{const v=fa(u.element,"."+f.itemClass);return D.from(v[y]).fold(()=>un.error(new Error("No element found with index "+y)),u.getSystem().getByDom)})(n,r,0,l).fold(u=>{throw u},u=>{qh(n,r,i,u)})},highlightBy:(n,r,i,l)=>{const u=MT(n,r);j(u,l).each(f=>{qh(n,r,i,f)})},isHighlighted:l2,getHighlighted:(n,r,i)=>Ys(n.element,"."+r.highlightClass).bind(l=>n.getSystem().getByDom(l).toOptional()),getFirst:NT,getLast:DT,getPrevious:(n,r,i)=>RT(n,r,0,-1),getNext:(n,r,i)=>RT(n,r,0,1),getCandidates:MT}),LT=[nt("highlightClass"),nt("itemClass"),Dn("onHighlight"),Dn("onDehighlight")];const ss=Qr({fields:LT,name:"highlighting",apis:Q5}),BT=[8],Nu=[9],vm=[13],$_=[27],Pc=[32],V_=[37],zy=[38],y0=[39],Ny=[40],eM=(n,r,i)=>{const l=Wi(n.slice(0,r)),u=Wi(n.slice(r+1));return j(l.concat(u),i)},tM=(n,r,i)=>{const l=Wi(n.slice(0,r));return j(l,i)},oM=(n,r,i)=>{const l=n.slice(0,r),u=n.slice(r+1);return j(u.concat(l),i)},nM=(n,r,i)=>{const l=n.slice(r+1);return j(l,i)},jn=n=>r=>{const i=r.raw;return Ge(n,i.which)},_f=n=>r=>hi(n,i=>i(r)),_m=n=>n.raw.shiftKey===!0,sM=n=>n.raw.ctrlKey===!0,v0=bn(_m),qn=(n,r)=>({matches:n,classification:r}),PT=(n,r,i)=>{r.exists(l=>i.exists(u=>$n(u,l)))||lo(n,rg(),{prevFocus:r,newFocus:i})},c2=()=>{const n=r=>Tr(r.element);return{get:n,set:(r,i)=>{const l=n(r);r.getSystem().triggerFocus(i,r.element);const u=n(r);PT(r,l,u)}}},rM=()=>{const n=r=>ss.getHighlighted(r).map(i=>i.element);return{get:n,set:(r,i)=>{const l=n(r);r.getSystem().getByDom(i).fold(Ke,f=>{ss.highlight(r,f)});const u=n(r);PT(r,l,u)}}};var Kh;(function(n){n.OnFocusMode="onFocus",n.OnEnterOrSpaceMode="onEnterOrSpace",n.OnApiMode="onApi"})(Kh||(Kh={}));const Gh=(n,r,i,l,u)=>{const f=(y,v,C,O,A)=>{return(R=C(y,v,O,A),F=v.event,j(R,$=>$.matches(F)).map($=>$.classification)).bind($=>$(y,v,O,A));var R,F},p={schema:()=>n.concat([Ne("focusManager",c2()),Wa("focusInside","onFocus",Od(y=>Ge(["onFocus","onEnterOrSpace","onApi"],y)?un.value(y):un.error("Invalid value for focusInside"))),Es("handler",p),Es("state",r),Es("sendFocusIn",u)]),processKey:f,toEvents:(y,v)=>{const C=y.focusInside!==Kh.OnFocusMode?D.none():u(y).map(A=>Xe(Jc(),(R,F)=>{A(R,y,v),F.stop()})),O=[Xe(Ws(),(A,R)=>{f(A,R,i,y,v).fold(()=>{((F,$)=>{const G=jn(Pc.concat(vm))($.event);y.focusInside===Kh.OnEnterOrSpaceMode&&G&&Zf(F,$)&&u(y).each(J=>{J(F,y,v),$.stop()})})(A,R)},F=>{R.stop()})}),Xe(zl(),(A,R)=>{f(A,R,l,y,v).each(F=>{R.stop()})})];return $o(C.toArray().concat(O))}};return p},IT=n=>{const r=[vn("onEscape"),vn("onEnter"),Ne("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Ne("firstTabstop",0),Ne("useTabstopAt",Gt),vn("visibilitySelector")].concat([n]),i=(O,A)=>{const R=O.visibilitySelector.bind(F=>Id(A,F)).getOr(A);return Ds(R)>0},l=(O,A)=>A.focusManager.get(O).bind(R=>Id(R,A.selector)),u=(O,A,R)=>{((F,$)=>{const G=fa(F.element,$.selector),J=cn(G,ae=>i($,ae));return D.from(J[$.firstTabstop])})(O,A).each(F=>{A.focusManager.set(O,F)})},f=(O,A,R,F)=>{const $=fa(O.element,R.selector);return l(O,R).bind(G=>Fr($,ot($n,G)).bind(J=>((ae,X,Y,ne,ie)=>ie(X,Y,de=>((we,ze)=>i(we,ze)&&we.useTabstopAt(ze))(ne,de)).fold(()=>ne.cyclic?D.some(!0):D.none(),de=>(ne.focusManager.set(ae,de),D.some(!0))))(O,$,J,R,F)))},p=(O,A,R)=>{const F=R.cyclic?eM:tM;return f(O,0,R,F)},y=(O,A,R)=>{const F=R.cyclic?oM:nM;return f(O,0,R,F)},v=ue([qn(_f([_m,jn(Nu)]),p),qn(jn(Nu),y),qn(_f([v0,jn(vm)]),(O,A,R)=>R.onEnter.bind(F=>F(O,A)))]),C=ue([qn(jn($_),(O,A,R)=>R.onEscape.bind(F=>F(O,A))),qn(jn(Nu),(O,A,R)=>l(O,R).filter(F=>!R.useTabstopAt(F)).bind(F=>(($=>(G=>$r(G))($).bind(Gi).exists(G=>$n(G,$)))(F)?p:y)(O,A,R)))]);return Gh(r,Ll.init,v,C,()=>D.some(u))};var aM=IT(ca("cyclic",Fe)),iM=IT(ca("cyclic",Gt));const _0=(n,r,i)=>Ay(i)&&jn(Pc)(r.event)?D.none():((l,u,f)=>(Hs(l,f,di()),D.some(!0)))(n,0,i),Yh=(n,r)=>D.some(!0),lM=[Ne("execute",_0),Ne("useSpace",!1),Ne("useEnter",!0),Ne("useControlEnter",!1),Ne("useDown",!1)],FT=(n,r,i)=>i.execute(n,r,n.element);var cM=Gh(lM,Ll.init,(n,r,i,l)=>{const u=i.useSpace&&!Ay(n.element)?Pc:[],f=i.useEnter?vm:[],p=i.useDown?Ny:[],y=u.concat(f).concat(p);return[qn(jn(y),FT)].concat(i.useControlEnter?[qn(_f([sM,jn(vm)]),FT)]:[])},(n,r,i,l)=>i.useSpace&&!Ay(n.element)?[qn(jn(Pc),Yh)]:[],()=>D.none());const HT=()=>{const n=Nn();return Jr({readState:()=>n.get().map(r=>({numRows:String(r.numRows),numColumns:String(r.numColumns)})).getOr({numRows:"?",numColumns:"?"}),setGridSize:(r,i)=>{n.set({numRows:r,numColumns:i})},getNumRows:()=>n.get().map(r=>r.numRows),getNumColumns:()=>n.get().map(r=>r.numColumns)})};var $T=Object.freeze({__proto__:null,flatgrid:HT,init:n=>n.state(n)});const VT=n=>(r,i,l,u)=>{const f=n(r.element);return jT(f,r,i,l,u)},d2=(n,r)=>{const i=n0(n,r);return VT(i)},u2=(n,r)=>{const i=n0(r,n);return VT(i)},f2=n=>(r,i,l,u)=>jT(n,r,i,l,u),jT=(n,r,i,l,u)=>l.focusManager.get(r).bind(f=>n(r.element,f,l,u)).map(f=>(l.focusManager.set(r,f),!0)),m2=f2,UT=f2,j_=f2,ZT=n=>!(r=>r.offsetWidth<=0&&r.offsetHeight<=0)(n.dom),p2=(n,r,i)=>{const l=fa(n,i);return((u,f)=>Fr(u,p=>$n(p,r)).map(p=>({index:p,candidates:u})))(cn(l,ZT))},U_=(n,r)=>Fr(n,i=>$n(r,i)),WT=(n,r,i,l)=>l(Math.floor(r/i),r%i).bind(u=>{const f=u.row*i+u.column;return f>=0&&fWT(n,r,l,(f,p)=>{const y=f===i-1?n.length-f*l:l,v=rm(p,u,0,y-1);return D.some({row:f,column:v})}),KT=(n,r,i,l,u)=>WT(n,r,l,(f,p)=>{const y=rm(f,u,0,i-1),v=y===i-1?n.length-y*l:l,C=Nc(p,0,v-1);return D.some({row:y,column:C})}),dM=[nt("selector"),Ne("execute",_0),Qi("onEscape"),Ne("captureTab",!1),w_()],GT=(n,r,i)=>{Ys(n.element,r.selector).each(l=>{r.focusManager.set(n,l)})},x0=n=>(r,i,l,u)=>p2(r,i,l.selector).bind(f=>n(f.candidates,f.index,u.getNumRows().getOr(l.initSize.numRows),u.getNumColumns().getOr(l.initSize.numColumns))),g2=(n,r,i)=>i.captureTab?D.some(!0):D.none(),h2=x0((n,r,i,l)=>qT(n,r,i,l,-1)),b2=x0((n,r,i,l)=>qT(n,r,i,l,1)),uM=x0((n,r,i,l)=>KT(n,r,i,l,-1)),fM=x0((n,r,i,l)=>KT(n,r,i,l,1)),mM=ue([qn(jn(V_),d2(h2,b2)),qn(jn(y0),u2(h2,b2)),qn(jn(zy),m2(uM)),qn(jn(Ny),UT(fM)),qn(_f([_m,jn(Nu)]),g2),qn(_f([v0,jn(Nu)]),g2),qn(jn(Pc.concat(vm)),(n,r,i,l)=>((u,f)=>f.focusManager.get(u).bind(p=>Id(p,f.selector)))(n,i).bind(u=>i.execute(n,r,u)))]),pM=ue([qn(jn($_),(n,r,i)=>i.onEscape(n,r)),qn(jn(Pc),Yh)]);var gM=Gh(dM,HT,mM,pM,()=>D.some(GT));const wg=(n,r,i,l,u)=>{const f=(p,y,v)=>u(p,y,l,0,v.length-1,v[y],C=>{return O=v[C],ni(O)==="button"&&yr(O,"disabled")==="disabled"?f(p,C,v):D.from(v[C]);var O});return p2(n,i,r).bind(p=>{const y=p.index,v=p.candidates;return f(y,y,v)})},YT=(n,r,i,l)=>wg(n,r,i,l,(u,f,p,y,v,C,O)=>{const A=Nc(f+p,y,v);return A===u?D.from(C):O(A)}),Z_=(n,r,i,l)=>wg(n,r,i,l,(u,f,p,y,v,C,O)=>{const A=rm(f,p,y,v);return A===u?D.none():O(A)}),hM=[nt("selector"),Ne("getInitial",D.none),Ne("execute",_0),Qi("onEscape"),Ne("executeOnMove",!1),Ne("allowVertical",!0),Ne("allowHorizontal",!0),Ne("cycles",!0)],y2=(n,r,i)=>((l,u)=>u.focusManager.get(l).bind(f=>Id(f,u.selector)))(n,i).bind(l=>i.execute(n,r,l)),XT=(n,r,i)=>{r.getInitial(n).orThunk(()=>Ys(n.element,r.selector)).each(l=>{r.focusManager.set(n,l)})},JT=(n,r,i)=>(i.cycles?Z_:YT)(n,i.selector,r,-1),QT=(n,r,i)=>(i.cycles?Z_:YT)(n,i.selector,r,1),v2=n=>(r,i,l,u)=>n(r,i,l,u).bind(()=>l.executeOnMove?y2(r,i,l):D.some(!0)),w0=ue([qn(jn(Pc),Yh),qn(jn($_),(n,r,i)=>i.onEscape(n,r))]);var k0=Gh(hM,Ll.init,(n,r,i,l)=>{const u=[...i.allowHorizontal?V_:[]].concat(i.allowVertical?zy:[]),f=[...i.allowHorizontal?y0:[]].concat(i.allowVertical?Ny:[]);return[qn(jn(u),v2(d2(JT,QT))),qn(jn(f),v2(u2(JT,QT))),qn(jn(vm),y2),qn(jn(Pc),y2)]},w0,()=>D.some(XT));const W_=(n,r,i)=>D.from(n[r]).bind(l=>D.from(l[i]).map(u=>({rowIndex:r,columnIndex:i,cell:u}))),q_=(n,r,i,l)=>{const u=n[r].length,f=rm(i,l,0,u-1);return W_(n,r,f)},e4=(n,r,i,l)=>{const u=rm(i,l,0,n.length-1),f=n[u].length,p=Nc(r,0,f-1);return W_(n,u,p)},_2=(n,r,i,l)=>{const u=n[r].length,f=Nc(i+l,0,u-1);return W_(n,r,f)},x2=(n,r,i,l)=>{const u=Nc(i+l,0,n.length-1),f=n[u].length,p=Nc(r,0,f-1);return W_(n,u,p)},t4=[Tl("selectors",[nt("row"),nt("cell")]),Ne("cycles",!0),Ne("previousSelector",D.none),Ne("execute",_0)],bM=(n,r,i)=>{r.previousSelector(n).orThunk(()=>{const l=r.selectors;return Ys(n.element,l.cell)}).each(l=>{r.focusManager.set(n,l)})},K_=(n,r)=>(i,l,u)=>{const f=u.cycles?n:r;return Id(l,u.selectors.row).bind(p=>{const y=fa(p,u.selectors.cell);return U_(y,l).bind(v=>{const C=fa(i,u.selectors.row);return U_(C,p).bind(O=>{const A=((R,F)=>pt(R,$=>fa($,F.selectors.cell)))(C,u);return f(A,O,v).map(R=>R.cell)})})})},o4=K_((n,r,i)=>q_(n,r,i,-1),(n,r,i)=>_2(n,r,i,-1)),Xh=K_((n,r,i)=>q_(n,r,i,1),(n,r,i)=>_2(n,r,i,1)),Jh=K_((n,r,i)=>e4(n,i,r,-1),(n,r,i)=>x2(n,i,r,-1)),G_=K_((n,r,i)=>e4(n,i,r,1),(n,r,i)=>x2(n,i,r,1)),C0=ue([qn(jn(V_),d2(o4,Xh)),qn(jn(y0),u2(o4,Xh)),qn(jn(zy),m2(Jh)),qn(jn(Ny),UT(G_)),qn(jn(Pc.concat(vm)),(n,r,i)=>Tr(n.element).bind(l=>i.execute(n,r,l)))]),yM=ue([qn(jn(Pc),Yh)]);var kg=Gh(t4,Ll.init,C0,yM,()=>D.some(bM));const xm=[nt("selector"),Ne("execute",_0),Ne("moveOnTab",!1)],Y_=(n,r,i)=>i.focusManager.get(n).bind(l=>i.execute(n,r,l)),n4=(n,r,i)=>{Ys(n.element,r.selector).each(l=>{r.focusManager.set(n,l)})},s4=(n,r,i)=>Z_(n,i.selector,r,-1),w2=(n,r,i)=>Z_(n,i.selector,r,1),S0=ue([qn(jn(zy),j_(s4)),qn(jn(Ny),j_(w2)),qn(_f([_m,jn(Nu)]),(n,r,i,l)=>i.moveOnTab?j_(s4)(n,r,i,l):D.none()),qn(_f([v0,jn(Nu)]),(n,r,i,l)=>i.moveOnTab?j_(w2)(n,r,i,l):D.none()),qn(jn(vm),Y_),qn(jn(Pc),Y_)]),E0=ue([qn(jn(Pc),Yh)]);var k2=Gh(xm,Ll.init,S0,E0,()=>D.some(n4));const r4=[Qi("onSpace"),Qi("onEnter"),Qi("onShiftEnter"),Qi("onLeft"),Qi("onRight"),Qi("onTab"),Qi("onShiftTab"),Qi("onUp"),Qi("onDown"),Qi("onEscape"),Ne("stopSpaceKeyup",!1),vn("focusIn")];var A0=Gh(r4,Ll.init,(n,r,i)=>[qn(jn(Pc),i.onSpace),qn(_f([v0,jn(vm)]),i.onEnter),qn(_f([_m,jn(vm)]),i.onShiftEnter),qn(_f([_m,jn(Nu)]),i.onShiftTab),qn(_f([v0,jn(Nu)]),i.onTab),qn(jn(zy),i.onUp),qn(jn(Ny),i.onDown),qn(jn(V_),i.onLeft),qn(jn(y0),i.onRight),qn(jn(Pc),i.onSpace)],(n,r,i)=>[...i.stopSpaceKeyup?[qn(jn(Pc),Yh)]:[],qn(jn($_),i.onEscape)],n=>n.focusIn);const X_=aM.schema(),vM=iM.schema(),C2=k0.schema(),J_=gM.schema(),Ti=kg.schema(),_M=cM.schema(),wm=k2.schema(),a4=A0.schema(),po=k({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:X_,cyclic:vM,flow:C2,flatgrid:J_,matrix:Ti,execution:_M,menu:wm,special:a4}),name:"keying",active:{events:(n,r)=>n.handler.toEvents(n,r)},apis:{focusIn:(n,r,i)=>{r.sendFocusIn(r).fold(()=>{n.getSystem().triggerFocus(n.element,n.element)},l=>{l(n,r,i)})},setGridSize:(n,r,i,l,u)=>{(f=>an(f,"setGridSize"))(i)?i.setGridSize(l,u):console.error("Layout does not support setGridSize")}},state:$T}),Qh=(n,r)=>{um(()=>{((i,l,u)=>{const f=i.components();(v=>{$t(v.components(),C=>aa(C.element)),Rs(v.element),v.syncComponents()})(i);const p=u(l),y=mn(f,p);$t(y,v=>{hm(v),i.getSystem().removeFromWorld(v)}),$t(p,v=>{xy(v)?Ap(i,v):(i.getSystem().addToWorld(v),Ap(i,v),Vr(i.element)&&bm(v))}),i.syncComponents()})(n,r,()=>pt(r,n.getSystem().build))},n.element)},S2=(n,r)=>{um(()=>{((i,l,u)=>{const f=i.components(),p=Sn(l,C=>$1(C).toArray());$t(f,C=>{Ge(p,C)||wy(C)});const y=((C,O,A)=>C_(C,O,(R,F)=>Z1(C,F,R,A)))(n.element,r,n.getSystem().buildOrPatch),v=mn(f,y);$t(v,C=>{xy(C)&&wy(C)}),$t(y,C=>{xy(C)||Zh(i,C)}),i.syncComponents()})(n,r)},n.element)},Q_=(n,r,i,l)=>{wy(r);const u=Z1(n.element,i,l,n.getSystem().buildOrPatch);Zh(n,u),n.syncComponents()},E2=(n,r,i)=>{const l=n.getSystem().build(i);d0(n,l,r)},i4=(n,r,i,l)=>{$i(r),E2(n,(u,f)=>((p,y,v)=>{vs(p,v).fold(()=>{ai(p,y)},C=>{wl(C,y)})})(u,f,i),l)},T0=(n,r)=>n.components(),l4=(n,r,i,l,u)=>{const f=T0(n);return D.from(f[l]).map(p=>(u.fold(()=>$i(p),y=>{(r.reuseDom?Q_:i4)(n,p,l,y)}),p))};var A2=Object.freeze({__proto__:null,append:(n,r,i,l)=>{E2(n,ai,l)},prepend:(n,r,i,l)=>{E2(n,Wu,l)},remove:(n,r,i,l)=>{const u=T0(n);j(u,p=>$n(l.element,p.element)).each($i)},replaceAt:l4,replaceBy:(n,r,i,l,u)=>{const f=T0(n);return Fr(f,l).bind(p=>l4(n,r,0,p,u))},set:(n,r,i,l)=>(r.reuseDom?S2:Qh)(n,l),contents:T0});const So=Qr({fields:[xr("reuseDom",!0)],name:"replacing",apis:A2}),en=(n,r)=>{const i=((l,u)=>{const f=$o(u);return Qr({fields:[nt("enabled")],name:l,active:{events:ue(f)}})})(n,r);return{key:n,value:{config:{},me:i,configAsRaw:ue({}),initialConfig:{},state:Ll}}},c4=(n,r)=>{r.ignore||(Ei(n.element),r.onFocus(n))};var d4=Object.freeze({__proto__:null,focus:c4,blur:(n,r)=>{r.ignore||Eh(n.element)},isFocused:n=>xp(n.element)}),u4=Object.freeze({__proto__:null,exhibit:(n,r)=>{const i=r.ignore?{}:{attributes:{tabindex:"-1"}};return ar(i)},events:n=>$o([Xe(Jc(),(r,i)=>{c4(r,n),i.stop()})].concat(n.stopMousedown?[Xe(at(),(r,i)=>{i.event.prevent()})]:[]))}),f4=[Dn("onFocus"),Ne("stopMousedown",!1),Ne("ignore",!1)];const Po=Qr({fields:f4,name:"focusing",active:u4,apis:d4}),O0=(n,r,i,l)=>{const u=i.get();i.set(l),((f,p,y)=>{p.toggleClass.each(v=>{y.get()?At(f.element,v):co(f.element,v)})})(n,r,i),((f,p,y)=>{const v=p.aria;v.update(f,v,y.get())})(n,r,i),u!==l&&r.onToggled(n,l)},cd=(n,r,i)=>{O0(n,r,i,!i.get())},eb=(n,r,i)=>{O0(n,r,i,r.selected)};var m4=Object.freeze({__proto__:null,onLoad:eb,toggle:cd,isOn:(n,r,i)=>i.get(),on:(n,r,i)=>{O0(n,r,i,!0)},off:(n,r,i)=>{O0(n,r,i,!1)},set:O0}),Dy=Object.freeze({__proto__:null,exhibit:()=>ar({}),events:(n,r)=>{const i=(l=n,u=r,f=cd,Ml(y=>{f(y,l,u)}));var l,u,f;const p=yu(n,r,eb);return $o(Cs([n.toggleOnExecute?[i]:[],[p]]))}});const Pl=(n,r,i)=>{wo(n.element,"aria-expanded",i)};var Ic=[Ne("selected",!1),vn("toggleClass"),Ne("toggleOnExecute",!0),Dn("onToggled"),Wa("aria",{mode:"none"},_r("mode",{pressed:[Ne("syncWithExpanded",!1),Es("update",(n,r,i)=>{wo(n.element,"aria-pressed",i),r.syncWithExpanded&&Pl(n,0,i)})],checked:[Es("update",(n,r,i)=>{wo(n.element,"aria-checked",i)})],expanded:[Es("update",Pl)],selected:[Es("update",(n,r,i)=>{wo(n.element,"aria-selected",i)})],none:[Es("update",Ke)]}))];const No=Qr({fields:Ic,name:"toggling",active:Dy,apis:m4,state:{init:()=>{const n=so(!1);return{get:()=>n.get(),set:r=>n.set(r),clear:()=>n.set(!1),readState:()=>n.get()}}}}),$d=()=>{const n=(r,i)=>{i.stop(),Ld(r)};return[Xe(Mr(),n),Xe(Ac(),n),hu(P()),hu(at())]},Ry=n=>$o(Cs([n.map(r=>Ml((i,l)=>{r(i),l.stop()})).toArray(),$d()])),dd="alloy.item-hover",Cg="alloy.item-focus",p4="alloy.item-toggled",g4=n=>{(Tr(n.element).isNone()||Po.isFocused(n))&&(Po.isFocused(n)||Po.focus(n),lo(n,dd,{item:n}))},h4=n=>{lo(n,Cg,{item:n})},T2=ue(dd),b4=ue(Cg),ex=ue(p4),y4=n=>n.role.fold(()=>n.toggling.map(r=>r.exclusive?"menuitemradio":"menuitemcheckbox").getOr("menuitem"),Ct),xM=[nt("data"),nt("components"),nt("dom"),Ne("hasSubmenu",!1),vn("toggling"),vn("role"),Io("itemBehaviours",[No,Po,po,Le]),Ne("ignoreFocus",!1),Ne("domModification",{}),Es("builder",n=>({dom:n.dom,domModification:{...n.domModification,attributes:{role:y4(n),...n.domModification.attributes,"aria-haspopup":n.hasSubmenu,...n.hasSubmenu?{"aria-expanded":!1}:{}}},behaviours:Oo(n.itemBehaviours,[n.toggling.fold(No.revoke,r=>No.config(((i,l)=>({aria:{mode:l?"selected":"checked"},...os(i,(u,f)=>f!=="exclusive"),onToggled:(u,f)=>{ut(i.onToggled)&&i.onToggled(u,f),((p,y)=>{lo(p,p4,{item:p,state:y})})(u,f)}}))(r,n.role.exists(i=>i==="option")))),Po.config({ignore:n.ignoreFocus,stopMousedown:n.ignoreFocus,onFocus:r=>{h4(r)}}),po.config({mode:"execution"}),Le.config({store:{mode:"memory",initialValue:n.data}}),en("item-type-events",[...$d(),Xe(io(),g4),Xe(Gf(),Po.focus)])]),components:n.components,eventOrder:n.eventOrder})),Ne("eventOrder",{})],wM=[nt("dom"),nt("components"),Es("builder",n=>({dom:n.dom,components:n.components,events:$o([qb(Gf())])}))],O2=ue("item-widget"),z2=ue([nl({name:"widget",overrides:n=>({behaviours:xt([Le.config({store:{mode:"manual",getValue:r=>n.data,setValue:Ke}})])})})]),v4=[nt("uid"),nt("data"),nt("components"),nt("dom"),Ne("autofocus",!1),Ne("ignoreFocus",!1),Io("widgetBehaviours",[Le,Po,po]),Ne("domModification",{}),s2(z2()),Es("builder",n=>{const r=e2(O2(),n,z2()),i=t2(O2(),n,r.internals()),l=f=>Ts(f,n,"widget").map(p=>(po.focusIn(p),p)),u=(f,p)=>(Ay(p.event.target)||n.autofocus&&p.setSource(f.element),D.none());return{dom:n.dom,components:i,domModification:n.domModification,events:$o([Ml((f,p)=>{l(f).each(y=>{p.stop()})}),Xe(io(),g4),Xe(Gf(),(f,p)=>{n.autofocus?l(f):Po.focus(f)})]),behaviours:Oo(n.widgetBehaviours,[Le.config({store:{mode:"memory",initialValue:n.data}}),Po.config({ignore:n.ignoreFocus,onFocus:f=>{h4(f)}}),po.config({mode:"special",focusIn:n.autofocus?f=>{l(f)}:N(),onLeft:u,onRight:u,onEscape:(f,p)=>Po.isFocused(f)||n.autofocus?(n.autofocus&&p.setSource(f.element),D.none()):(Po.focus(f),D.some(!0))})])}})],_4=_r("type",{widget:v4,item:xM,separator:wM}),N2=ue([H_({factory:{sketch:n=>{const r=la("menu.spec item",_4,n);return r.builder(r)}},name:"items",unit:"item",defaults:(n,r)=>Vo(r,"uid")?r:{...r,uid:Dc("item")},overrides:(n,r)=>({type:r.type,ignoreFocus:n.fakeFocus,domModification:{classes:[n.markers.item]}})})]),x4=ue([Us("role"),nt("value"),nt("items"),nt("dom"),nt("components"),Ne("eventOrder",{}),Jt("menuBehaviours",[ss,Le,In,po]),Wa("movement",{mode:"menu",moveOnTab:!0},_r("mode",{grid:[w_(),Es("config",(n,r)=>({mode:"flatgrid",selector:"."+n.markers.item,initSize:{numColumns:r.initSize.numColumns,numRows:r.initSize.numRows},focusManager:n.focusManager}))],matrix:[Es("config",(n,r)=>({mode:"matrix",selectors:{row:r.rowSelector,cell:"."+n.markers.item},previousSelector:r.previousSelector,focusManager:n.focusManager})),nt("rowSelector"),Ne("previousSelector",D.none)],menu:[Ne("moveOnTab",!0),Es("config",(n,r)=>({mode:"menu",selector:"."+n.markers.item,moveOnTab:r.moveOnTab,focusManager:n.focusManager}))]})),Xr("markers",dp()),Ne("fakeFocus",!1),Ne("focusManager",c2()),Dn("onHighlight"),Dn("onDehighlight"),Ne("showMenuRole",!0)]),w4=ue("alloy.menu-focus"),tb=pl({name:"Menu",configFields:x4(),partFields:N2(),factory:(n,r,i,l)=>({uid:n.uid,dom:n.dom,markers:n.markers,behaviours:Xo(n.menuBehaviours,[ss.config({highlightClass:n.markers.selectedItem,itemClass:n.markers.item,onHighlight:n.onHighlight,onDehighlight:n.onDehighlight}),Le.config({store:{mode:"memory",initialValue:n.value}}),In.config({find:D.some}),po.config(n.movement.config(n,n.movement))]),events:$o([Xe(b4(),(u,f)=>{const p=f.event;u.getSystem().getByDom(p.target).each(y=>{ss.highlight(u,y),f.stop(),lo(u,w4(),{menu:u,item:y})})}),Xe(T2(),(u,f)=>{const p=f.event.item;ss.highlight(u,p)}),Xe(ex(),(u,f)=>{const{item:p,state:y}=f.event;y&&yr(p.element,"role")==="menuitemradio"&&((v,C)=>{const O=fa(v.element,'[role="menuitemradio"][aria-checked="true"]');$t(O,A=>{$n(A,C.element)||v.getSystem().getByDom(A).each(R=>{No.off(R)})})})(u,p)})]),components:r,eventOrder:n.eventOrder,...n.showMenuRole?{domModification:{attributes:{role:n.role.getOr("menu")}}}:{}})}),k4=(n,r,i,l)=>St(i,l).bind(u=>St(n,u).bind(f=>{const p=k4(n,r,i,f);return D.some([f].concat(p))})).getOr([]),C4=n=>n.type==="prepared"?D.some(n.menu):D.none(),kM=()=>{const n=so({}),r=so({}),i=so({}),l=Nn(),u=so({}),f=v=>p(v).bind(C4),p=v=>St(r.get(),v),y=v=>St(n.get(),v);return{setMenuBuilt:(v,C)=>{r.set({...r.get(),[v]:{type:"prepared",menu:C}})},setContents:(v,C,O,A)=>{l.set(v),n.set(O),r.set(C),u.set(A);const R=((F,$)=>{const G={};rs(F,(Y,ne)=>{$t(Y,ie=>{G[ie]=ne})});const J=$,ae=Bn($,(Y,ne)=>({k:Y,v:ne})),X=Zn(ae,(Y,ne)=>[ne].concat(k4(G,J,ae,ne)));return Zn(G,Y=>St(X,Y).getOr([Y]))})(A,O);i.set(R)},expand:v=>St(n.get(),v).map(C=>{const O=St(i.get(),v).getOr([]);return[C].concat(O)}),refresh:v=>St(i.get(),v),collapse:v=>St(i.get(),v).bind(C=>C.length>1?D.some(C.slice(1)):D.none()),lookupMenu:p,lookupItem:y,otherMenus:v=>{const C=u.get();return mn(tn(C),v)},getPrimary:()=>l.get().bind(f),getMenus:()=>r.get(),clear:()=>{n.set({}),r.set({}),i.set({}),l.clear()},isClear:()=>l.get().isNone(),getTriggeringPath:(v,C)=>{const O=cn(y(v).toArray(),A=>f(A).isSome());return St(i.get(),v).bind(A=>{const R=Wi(O.concat(A));return(F=>{const $=[];for(let G=0;G((G,J,ae)=>f(G).bind(X=>(Y=>yn(n.get(),(ne,ie)=>ne===Y))(G).bind(Y=>J(Y).map(ne=>({triggeredMenu:X,triggeringItem:ne,triggeringPath:ae})))))(F,C,R.slice(0,$+1)).fold(()=>Kr(l.get(),F)?[]:[D.none()],G=>[D.some(G)])))})}}},CM=C4,ud=Xt("tiered-menu-item-highlight"),SM=Xt("tiered-menu-item-dehighlight");var ji;(function(n){n[n.HighlightMenuAndItem=0]="HighlightMenuAndItem",n[n.HighlightJustMenu=1]="HighlightJustMenu",n[n.HighlightNone=2]="HighlightNone"})(ji||(ji={}));const ob=ue("collapse-item"),Op=ld({name:"TieredMenu",configFields:[ui("onExecute"),ui("onEscape"),Pd("onOpenMenu"),Pd("onOpenSubmenu"),Dn("onRepositionMenu"),Dn("onCollapseMenu"),Ne("highlightOnOpen",ji.HighlightMenuAndItem),Tl("data",[nt("primary"),nt("menus"),nt("expansions")]),Ne("fakeFocus",!1),Dn("onHighlightItem"),Dn("onDehighlightItem"),Dn("onHover"),up(),nt("dom"),Ne("navigateOnHover",!0),Ne("stayInDom",!1),Jt("tmenuBehaviours",[po,ss,In,So]),Ne("eventOrder",{})],apis:{collapseMenu:(n,r)=>{n.collapseMenu(r)},highlightPrimary:(n,r)=>{n.highlightPrimary(r)},repositionMenus:(n,r)=>{n.repositionMenus(r)}},factory:(n,r)=>{const i=Nn(),l=kM(),u=Y=>Le.getValue(Y).value,f=Y=>Zn(n.data.menus,(ne,ie)=>Sn(ne.items,de=>de.type==="separator"?[]:[de.data.value])),p=ss.highlight,y=(Y,ne)=>{p(Y,ne),ss.getHighlighted(ne).orThunk(()=>ss.getFirst(ne)).each(ie=>{n.fakeFocus?ss.highlight(ne,ie):Hs(Y,ie.element,Gf())})},v=(Y,ne)=>bi(pt(ne,ie=>Y.lookupMenu(ie).bind(de=>de.type==="prepared"?D.some(de.menu):D.none()))),C=(Y,ne,ie)=>{const de=v(ne,ne.otherMenus(ie));$t(de,we=>{Qn(we.element,[n.markers.backgroundMenu]),n.stayInDom||So.remove(Y,we)})},O=(Y,ne)=>{const ie=(de=>i.get().getOrThunk(()=>{const we={},ze=fa(de.element,`.${n.markers.item}`),tt=cn(ze,Je=>yr(Je,"aria-haspopup")==="true");return $t(tt,Je=>{de.getSystem().getByDom(Je).each(Ze=>{const kt=u(Ze);we[kt]=Ze})}),i.set(we),we}))(Y);rs(ie,(de,we)=>{const ze=Ge(ne,we);wo(de.element,"aria-expanded",ze)})},A=(Y,ne,ie)=>D.from(ie[0]).bind(de=>ne.lookupMenu(de).bind(we=>{if(we.type==="notbuilt")return D.none();{const ze=we.menu,tt=v(ne,ie.slice(1));return $t(tt,Je=>{At(Je.element,n.markers.backgroundMenu)}),Vr(ze.element)||So.append(Y,Fi(ze)),Qn(ze.element,[n.markers.backgroundMenu]),y(Y,ze),C(Y,ne,ie),D.some(ze)}}));let R;(function(Y){Y[Y.HighlightSubmenu=0]="HighlightSubmenu",Y[Y.HighlightParent=1]="HighlightParent"})(R||(R={}));const F=(Y,ne,ie=R.HighlightSubmenu)=>{if(ne.hasConfigured(Fo)&&Fo.isDisabled(ne))return D.some(ne);{const de=u(ne);return l.expand(de).bind(we=>(O(Y,we),D.from(we[0]).bind(ze=>l.lookupMenu(ze).bind(tt=>{const Je=((Ze,kt,Wt)=>{if(Wt.type==="notbuilt"){const ro=Ze.getSystem().build(Wt.nbMenu());return l.setMenuBuilt(kt,ro),ro}return Wt.menu})(Y,ze,tt);return Vr(Je.element)||So.append(Y,Fi(Je)),n.onOpenSubmenu(Y,ne,Je,Wi(we)),ie===R.HighlightSubmenu?(ss.highlightFirst(Je),A(Y,l,we)):(ss.dehighlightAll(Je),D.some(ne))}))))}},$=(Y,ne)=>{const ie=u(ne);return l.collapse(ie).bind(de=>(O(Y,de),A(Y,l,de).map(we=>(n.onCollapseMenu(Y,ne,we),we))))},G=Y=>(ne,ie)=>Id(ie.getSource(),`.${n.markers.item}`).bind(de=>ne.getSystem().getByDom(de).toOptional().bind(we=>Y(ne,we).map(Gt))),J=$o([Xe(w4(),(Y,ne)=>{const ie=ne.event.item;l.lookupItem(u(ie)).each(()=>{const de=ne.event.menu;ss.highlight(Y,de);const we=u(ne.event.item);l.refresh(we).each(ze=>C(Y,l,ze))})}),Ml((Y,ne)=>{const ie=ne.event.target;Y.getSystem().getByDom(ie).each(de=>{u(de).indexOf("collapse-item")===0&&$(Y,de),F(Y,de,R.HighlightSubmenu).fold(()=>{n.onExecute(Y,de)},Ke)})}),Ss((Y,ne)=>{(ie=>{const de=((ze,tt,Je)=>Zn(Je,(Ze,kt)=>{const Wt=()=>tb.sketch({...Ze,value:kt,markers:n.markers,fakeFocus:n.fakeFocus,onHighlight:(ro,yo)=>{lo(ro,ud,{menuComp:ro,itemComp:yo})},onDehighlight:(ro,yo)=>{lo(ro,SM,{menuComp:ro,itemComp:yo})},focusManager:n.fakeFocus?rM():c2()});return kt===tt?{type:"prepared",menu:ze.getSystem().build(Wt())}:{type:"notbuilt",nbMenu:Wt}}))(ie,n.data.primary,n.data.menus),we=f();return l.setContents(n.data.primary,de,n.data.expansions,we),l.getPrimary()})(Y).each(ie=>{So.append(Y,Fi(ie)),n.onOpenMenu(Y,ie),n.highlightOnOpen===ji.HighlightMenuAndItem?y(Y,ie):n.highlightOnOpen===ji.HighlightJustMenu&&p(Y,ie)})}),Xe(ud,(Y,ne)=>{n.onHighlightItem(Y,ne.event.menuComp,ne.event.itemComp)}),Xe(SM,(Y,ne)=>{n.onDehighlightItem(Y,ne.event.menuComp,ne.event.itemComp)}),...n.navigateOnHover?[Xe(T2(),(Y,ne)=>{const ie=ne.event.item;((de,we)=>{const ze=u(we);l.refresh(ze).bind(tt=>(O(de,tt),A(de,l,tt)))})(Y,ie),F(Y,ie,R.HighlightParent),n.onHover(Y,ie)})]:[]]),ae=Y=>ss.getHighlighted(Y).bind(ss.getHighlighted),X={collapseMenu:Y=>{ae(Y).each(ne=>{$(Y,ne)})},highlightPrimary:Y=>{l.getPrimary().each(ne=>{y(Y,ne)})},repositionMenus:Y=>{l.getPrimary().bind(ie=>ae(Y).bind(de=>{const we=u(de),ze=ra(l.getMenus()),tt=bi(pt(ze,CM));return l.getTriggeringPath(we,Je=>((Ze,kt,Wt)=>ko(kt,ro=>{if(!ro.getSystem().isConnected())return D.none();const yo=ss.getCandidates(ro);return j(yo,Ho=>u(Ho)===Wt)}))(0,tt,Je))}).map(de=>({primary:ie,triggeringPath:de}))).fold(()=>{(ie=>D.from(ie.components()[0]).filter(de=>yr(de.element,"role")==="menu"))(Y).each(ie=>{n.onRepositionMenu(Y,ie,[])})},({primary:ie,triggeringPath:de})=>{n.onRepositionMenu(Y,ie,de)})}};return{uid:n.uid,dom:n.dom,markers:n.markers,behaviours:Xo(n.tmenuBehaviours,[po.config({mode:"special",onRight:G((Y,ne)=>Ay(ne.element)?D.none():F(Y,ne,R.HighlightSubmenu)),onLeft:G((Y,ne)=>Ay(ne.element)?D.none():$(Y,ne)),onEscape:G((Y,ne)=>$(Y,ne).orThunk(()=>n.onEscape(Y,ne).map(()=>Y))),focusIn:(Y,ne)=>{l.getPrimary().each(ie=>{Hs(Y,ie.element,Gf())})}}),ss.config({highlightClass:n.markers.selectedMenu,itemClass:n.markers.menu}),In.config({find:Y=>ss.getHighlighted(Y)}),So.config({})]),eventOrder:n.eventOrder,apis:X,events:J}},extraApis:{tieredData:(n,r,i)=>({primary:n,menus:r,expansions:i}),singleData:(n,r)=>({primary:n,menus:ci(n,r),expansions:{}}),collapseItem:n=>({value:Xt(ob()),meta:{text:n}})}}),or=ld({name:"InlineView",configFields:[nt("lazySink"),Dn("onShow"),Dn("onHide"),Xl("onEscape"),Jt("inlineBehaviours",[x,Le,tl]),Zs("fireDismissalEventInstead",[Ne("event",Ju())]),Zs("fireRepositionEventInstead",[Ne("event",Rd())]),Ne("getRelated",D.none),Ne("isExtraPart",Fe),Ne("eventOrder",D.none)],factory:(n,r)=>{const i=(p,y,v,C)=>{const O=n.lazySink(p).getOrDie();x.openWhileCloaked(p,y,()=>Xa.positionWithinBounds(O,p,v,C())),Le.setValue(p,D.some({mode:"position",config:v,getBounds:C}))},l=(p,y,v,C)=>{const O=((A,R,F,$,G)=>{const J=()=>A.lazySink(R),ae=$.type==="horizontal"?{layouts:{onLtr:()=>cy(),onRtl:()=>dy()}}:{},X=Y=>(ne=>ne.length===2)(Y)?ae:{};return Op.sketch({dom:{tag:"div"},data:$.data,markers:$.menu.markers,highlightOnOpen:$.menu.highlightOnOpen,fakeFocus:$.menu.fakeFocus,onEscape:()=>(x.close(R),A.onEscape.map(Y=>Y(R)),D.some(!0)),onExecute:()=>D.some(!0),onOpenMenu:(Y,ne)=>{Xa.positionWithinBounds(J().getOrDie(),ne,F,G())},onOpenSubmenu:(Y,ne,ie,de)=>{const we=J().getOrDie();Xa.position(we,ie,{anchor:{type:"submenu",item:ne,...X(de)}})},onRepositionMenu:(Y,ne,ie)=>{const de=J().getOrDie();Xa.positionWithinBounds(de,ne,F,G()),$t(ie,we=>{const ze=X(we.triggeringPath);Xa.position(de,we.triggeredMenu,{anchor:{type:"submenu",item:we.triggeringItem,...ze}})})}})})(n,p,y,v,C);x.open(p,O),Le.setValue(p,D.some({mode:"menu",menu:O}))},u=p=>{x.isOpen(p)&&Le.getValue(p).each(y=>{switch(y.mode){case"menu":x.getState(p).each(Op.repositionMenus);break;case"position":const v=n.lazySink(p).getOrDie();Xa.positionWithinBounds(v,p,y.config,y.getBounds())}})},f={setContent:(p,y)=>{x.setContent(p,y)},showAt:(p,y,v)=>{const C=D.none;i(p,y,v,C)},showWithinBounds:i,showMenuAt:(p,y,v)=>{l(p,y,v,D.none)},showMenuWithinBounds:l,hide:p=>{x.isOpen(p)&&(Le.setValue(p,D.none()),x.close(p))},getContent:p=>x.getState(p),reposition:u,isOpen:x.isOpen};return{uid:n.uid,dom:n.dom,behaviours:Xo(n.inlineBehaviours,[x.config({isPartOf:(p,y,v)=>el(y,v)||((C,O)=>n.getRelated(C).exists(A=>el(A,O)))(p,v),getAttachPoint:p=>n.lazySink(p).getOrDie(),onOpen:p=>{n.onShow(p)},onClose:p=>{n.onHide(p)}}),Le.config({store:{mode:"memory",initialValue:D.none()}}),tl.config({channels:{...K({isExtraPart:r.isExtraPart,...n.fireDismissalEventInstead.map(p=>({fireEventInstead:{event:p.event}})).getOr({})}),...he({...n.fireRepositionEventInstead.map(p=>({fireEventInstead:{event:p.event}})).getOr({}),doReposition:u})}})]),eventOrder:n.eventOrder,apis:f}},apis:{showAt:(n,r,i,l)=>{n.showAt(r,i,l)},showWithinBounds:(n,r,i,l,u)=>{n.showWithinBounds(r,i,l,u)},showMenuAt:(n,r,i,l)=>{n.showMenuAt(r,i,l)},showMenuWithinBounds:(n,r,i,l,u)=>{n.showMenuWithinBounds(r,i,l,u)},hide:(n,r)=>{n.hide(r)},isOpen:(n,r)=>n.isOpen(r),getContent:(n,r)=>n.getContent(r),setContent:(n,r,i)=>{n.setContent(r,i)},reposition:(n,r)=>{n.reposition(r)}}});var Vd,z0,tx=tinymce.util.Tools.resolve("tinymce.util.Delay"),My=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),S4=tinymce.util.Tools.resolve("tinymce.EditorManager"),xf=tinymce.util.Tools.resolve("tinymce.Env");(function(n){n.default="wrap",n.floating="floating",n.sliding="sliding",n.scrolling="scrolling"})(Vd||(Vd={})),function(n){n.auto="auto",n.top="top",n.bottom="bottom"}(z0||(z0={}));const fs=n=>r=>r.options.get(n),N0=n=>r=>D.from(n(r)),E4=n=>{const r=xf.deviceType.isPhone(),i=xf.deviceType.isTablet()||r,l=n.options.register,u=p=>te(p)||p===!1,f=p=>te(p)||Lt(p);l("skin",{processor:p=>te(p)||p===!1,default:"oxide"}),l("skin_url",{processor:"string"}),l("height",{processor:f,default:Math.max(n.getElement().offsetHeight,400)}),l("width",{processor:f,default:My.DOM.getStyle(n.getElement(),"width")}),l("min_height",{processor:"number",default:100}),l("min_width",{processor:"number"}),l("max_height",{processor:"number"}),l("max_width",{processor:"number"}),l("style_formats",{processor:"object[]"}),l("style_formats_merge",{processor:"boolean",default:!1}),l("style_formats_autohide",{processor:"boolean",default:!1}),l("line_height_formats",{processor:"string",default:"1 1.1 1.2 1.3 1.4 1.5 2"}),l("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"}),l("font_size_formats",{processor:"string",default:"8pt 10pt 12pt 14pt 18pt 24pt 36pt"}),l("font_size_input_default_unit",{processor:"string",default:"pt"}),l("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"}),l("content_langs",{processor:"object[]"}),l("removed_menuitems",{processor:"string",default:""}),l("menubar",{processor:p=>te(p)||Me(p),default:!r}),l("menu",{processor:"object",default:{}}),l("toolbar",{processor:p=>Me(p)||te(p)||He(p)?{value:p,valid:!0}:{valid:!1,message:"Must be a boolean, string or array."},default:!0}),Cr(9,p=>{l("toolbar"+(p+1),{processor:"string"})}),l("toolbar_mode",{processor:"string",default:i?"scrolling":"floating"}),l("toolbar_groups",{processor:"object",default:{}}),l("toolbar_location",{processor:"string",default:z0.auto}),l("toolbar_persist",{processor:"boolean",default:!1}),l("toolbar_sticky",{processor:"boolean",default:n.inline}),l("toolbar_sticky_offset",{processor:"number",default:0}),l("fixed_toolbar_container",{processor:"string",default:""}),l("fixed_toolbar_container_target",{processor:"object"}),l("ui_mode",{processor:"string",default:"combined"}),l("file_picker_callback",{processor:"function"}),l("file_picker_validator_handler",{processor:"function"}),l("file_picker_types",{processor:"string"}),l("typeahead_urls",{processor:"boolean",default:!0}),l("anchor_top",{processor:u,default:"#top"}),l("anchor_bottom",{processor:u,default:"#bottom"}),l("draggable_modal",{processor:"boolean",default:!1}),l("statusbar",{processor:"boolean",default:!0}),l("elementpath",{processor:"boolean",default:!0}),l("branding",{processor:"boolean",default:!0}),l("promotion",{processor:"boolean",default:!0}),l("resize",{processor:p=>p==="both"||Me(p),default:!xf.deviceType.isTouch()}),l("sidebar_show",{processor:"string"}),l("help_accessibility",{processor:"boolean",default:n.hasPlugin("help")}),l("default_font_stack",{processor:"string[]",default:[]})},D2=fs("readonly"),D0=fs("height"),R0=fs("width"),M0=N0(fs("min_width")),Ly=N0(fs("min_height")),By=N0(fs("max_width")),ox=N0(fs("max_height")),Py=N0(fs("style_formats")),nx=fs("style_formats_merge"),A4=fs("style_formats_autohide"),R2=fs("content_langs"),T4=fs("removed_menuitems"),nb=fs("toolbar_mode"),sx=fs("toolbar_groups"),Sg=fs("toolbar_location"),M2=fs("fixed_toolbar_container"),EM=fs("fixed_toolbar_container_target"),O4=fs("toolbar_persist"),L2=fs("toolbar_sticky_offset"),zp=fs("menubar"),Iy=fs("toolbar"),rx=fs("file_picker_callback"),L0=fs("file_picker_validator_handler"),B2=fs("font_size_input_default_unit"),B0=fs("file_picker_types"),ax=fs("typeahead_urls"),z4=fs("anchor_top"),N4=fs("anchor_bottom"),wf=fs("draggable_modal"),D4=fs("statusbar"),R4=fs("elementpath"),Fc=fs("branding"),Ja=fs("resize"),M4=fs("paste_as_text"),ix=fs("sidebar_show"),L4=fs("promotion"),P2=fs("help_accessibility"),lx=fs("default_font_stack"),Eg=n=>n.options.get("skin")===!1,P0=n=>n.options.get("menubar")!==!1,cx=n=>{const r=n.options.get("skin_url");if(Eg(n))return r;if(r)return n.documentBaseURI.toAbsolute(r);{const i=n.options.get("skin");return S4.baseURL+"/skins/ui/"+i}},dx=n=>D.from(n.options.get("skin_url")),B4=n=>n.options.get("line_height_formats").split(" "),I0=n=>{const r=Iy(n),i=te(r),l=He(r)&&r.length>0;return!F0(n)&&(l||i||r===!0)},ux=n=>{const r=Cr(9,l=>n.options.get("toolbar"+(l+1))),i=cn(r,te);return nn(i.length>0,i)},F0=n=>ux(n).fold(()=>{const r=Iy(n);return Rt(r,te)&&r.length>0},Gt),I2=n=>Sg(n)===z0.bottom,F2=n=>{var r;if(!n.inline)return D.none();const i=(r=M2(n))!==null&&r!==void 0?r:"";if(i.length>0)return Ys(za(),i);const l=EM(n);return st(l)?D.some(Vt(l)):D.none()},sb=n=>n.inline&&F2(n).isSome(),fx=n=>F2(n).getOrThunk(()=>Pn(Vs(Vt(n.getElement())))),mx=n=>n.inline&&!P0(n)&&!I0(n)&&!F0(n),Np=n=>(n.options.get("toolbar_sticky")||n.inline)&&!sb(n)&&!mx(n),Dp=n=>!sb(n)&&n.options.get("ui_mode")==="split",Ag=n=>{const r=n.options.get("menu");return Zn(r,i=>({...i,items:i.items}))};var H0=Object.freeze({__proto__:null,get ToolbarMode(){return Vd},get ToolbarLocation(){return z0},register:E4,getSkinUrl:cx,getSkinUrlOption:dx,isReadOnly:D2,isSkinDisabled:Eg,getHeightOption:D0,getWidthOption:R0,getMinWidthOption:M0,getMinHeightOption:Ly,getMaxWidthOption:By,getMaxHeightOption:ox,getUserStyleFormats:Py,shouldMergeStyleFormats:nx,shouldAutoHideStyleFormats:A4,getLineHeightFormats:B4,getContentLanguages:R2,getRemovedMenuItems:T4,isMenubarEnabled:P0,isMultipleToolbars:F0,isToolbarEnabled:I0,isToolbarPersist:O4,getMultipleToolbarsOption:ux,getUiContainer:fx,useFixedContainer:sb,isSplitUiMode:Dp,getToolbarMode:nb,isDraggableModal:wf,isDistractionFree:mx,isStickyToolbar:Np,getStickyToolbarOffset:L2,getToolbarLocation:Sg,isToolbarLocationBottom:I2,getToolbarGroups:sx,getMenus:Ag,getMenubar:zp,getToolbar:Iy,getFilePickerCallback:rx,getFilePickerTypes:B0,useTypeaheadUrls:ax,getAnchorTop:z4,getAnchorBottom:N4,getFilePickerValidatorHandler:L0,getFontSizeInputDefaultUnit:B2,useStatusBar:D4,useElementPath:R4,promotionEnabled:L4,useBranding:Fc,getResize:Ja,getPasteAsText:M4,getSidebarShow:ix,useHelpAccessibility:P2,getDefaultFontStack:lx});const AM=["visible","hidden","clip"],P4=n=>Mi(n).length>0&&!Ge(AM,n),I4=n=>{if(vi(n)){const r=Ns(n,"overflow-x"),i=Ns(n,"overflow-y");return P4(r)||P4(i)}return!1},Tg=(n,r)=>Dp(n)?((i,l)=>{const u=bg(l,I4),f=u.length===0?wi(l).map(Oa).map(p=>bg(p,I4)).getOr([]):u;return yt(f).map(p=>({element:p,others:f.slice(1),isFullscreen:()=>(y=>y.plugins.fullscreen&&y.plugins.fullscreen.isFullscreen())(i)}))})(n,r):D.none(),Og=n=>{const r=[...pt(n.others,vr),jr()];return n.isFullscreen()?jr():((i,l)=>zo(l,(u,f)=>Wl(u,f),i))(vr(n.element),r)},Oi=ld({name:"Button",factory:n=>{const r=Ry(n.action),i=n.dom.tag,l=u=>St(n.dom,"attributes").bind(f=>St(f,u));return{uid:n.uid,dom:n.dom,components:n.components,events:r,behaviours:Oo(n.buttonBehaviours,[Po.config({}),po.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:i==="button"?{type:l("type").getOr("button"),...l("role").map(u=>({role:u})).getOr({})}:{role:n.role.getOr(l("role").getOr("button"))}},eventOrder:n.eventOrder}},configFields:[Ne("uid",void 0),nt("dom"),Ne("components",[]),Io("buttonBehaviours",[Po,po]),vn("action"),vn("role"),Ne("eventOrder",{})]}),km=n=>{const r=Ha(n),i=Yn(r),l=(p=>{const y=p.dom.attributes!==void 0?p.dom.attributes:[];return zo(y,(v,C)=>C.name==="class"?v:{...v,[C.name]:C.value},{})})(r),u=(p=>Array.prototype.slice.call(p.dom.classList,0))(r),f=i.length===0?{}:{innerHtml:wu(r)};return{tag:ni(r),classes:u,attributes:l,...f}},ns=n=>{const r=(i=>i.uid!==void 0)(n)&&an(n,"uid")?n.uid:Dc("memento");return{get:i=>i.getSystem().getByUid(r).getOrDie(),getOpt:i=>i.getSystem().getByUid(r).toOptional(),asSpec:()=>({...n,uid:r})}};var TM=Object.freeze({__proto__:null,exhibit:(n,r)=>ar({attributes:Xi([{key:r.tabAttr,value:"true"}])})}),F4=[Ne("tabAttr","data-alloy-tabstop")];const ws=Qr({fields:F4,name:"tabstopping",active:TM}),H2=Xt("tooltip.exclusive"),$0=Xt("tooltip.show"),V0=Xt("tooltip.hide"),j0=Xt("tooltip.immediateHide"),U0=Xt("tooltip.immediateShow"),H4=(n,r,i)=>{n.getSystem().broadcastOn([H2],{})};var OM=Object.freeze({__proto__:null,hideAllExclusive:H4,immediateOpenClose:(n,r,i,l)=>Qo(n,l?U0:j0),isEnabled:(n,r,i)=>i.isEnabled(),setComponents:(n,r,i,l)=>{i.getTooltip().each(u=>{u.getSystem().isConnected()&&So.set(u,l)})},setEnabled:(n,r,i,l)=>i.setEnabled(l)}),zM=Object.freeze({__proto__:null,events:(n,r)=>{const i=f=>{r.getTooltip().each(p=>{p.getSystem().isConnected()&&($i(p),n.onHide(f,p),r.clearTooltip())}),r.clearTimer()},l=f=>{if(!r.isShowing()&&r.isEnabled()){H4(f);const p=n.lazySink(f).getOrDie(),y=f.getSystem().build({dom:n.tooltipDom,components:n.tooltipComponents,events:$o(n.mode==="normal"?[Xe(io(),v=>{Qo(f,$0)}),Xe(Uo(),v=>{Qo(f,V0)})]:[]),behaviours:xt([So.config({})])});r.setTooltip(y),hf(p,y),n.onShow(f,y),Xa.position(p,y,{anchor:n.anchor(f)})}},u=f=>{r.getTooltip().each(p=>{const y=n.lazySink(f).getOrDie();Xa.position(y,p,{anchor:n.anchor(f)})})};return $o(Cs([[lg(f=>{n.onSetup(f)}),Xe($0,f=>{r.resetTimer(()=>{l(f)},n.delayForShow())}),Xe(V0,f=>{r.resetTimer(()=>{i(f)},n.delayForHide())}),Xe(U0,f=>{r.resetTimer(()=>{l(f)},0)}),Xe(j0,f=>{r.resetTimer(()=>{i(f)},0)}),Xe(Ii(),(f,p)=>{const y=p;y.universal||Ge(y.channels,H2)&&i(f)}),Tc(f=>{i(f)})],(()=>{switch(n.mode){case"normal":return[Xe(Wn(),f=>{Qo(f,U0)}),Xe(qf(),f=>{Qo(f,j0)}),Xe(io(),f=>{Qo(f,$0)}),Xe(Uo(),f=>{Qo(f,V0)})];case"follow-highlight":return[Xe(ag(),(f,p)=>{Qo(f,$0)}),Xe(Md(),f=>{Qo(f,V0)})];case"children-normal":return[Xe(Wn(),(f,p)=>{Tr(f.element).each(y=>{_i(p.event.target,"[data-mce-tooltip]")&&r.getTooltip().fold(()=>{Qo(f,U0)},v=>{r.isShowing()&&(n.onShow(f,v),u(f))})})}),Xe(qf(),f=>{Tr(f.element).fold(()=>{Qo(f,j0)},Ke)}),Xe(io(),f=>{Ys(f.element,"[data-mce-tooltip]:hover").each(p=>{r.getTooltip().fold(()=>{Qo(f,$0)},y=>{r.isShowing()&&(n.onShow(f,y),u(f))})})}),Xe(Uo(),f=>{Ys(f.element,"[data-mce-tooltip]:hover").fold(()=>{Qo(f,V0)},Ke)})];default:return[Xe(Wn(),(f,p)=>{Tr(f.element).each(y=>{_i(p.event.target,"[data-mce-tooltip]")&&r.getTooltip().fold(()=>{Qo(f,U0)},v=>{r.isShowing()&&(n.onShow(f,v),u(f))})})}),Xe(qf(),f=>{Tr(f.element).fold(()=>{Qo(f,j0)},Ke)})]}})()]))}}),NM=[nt("lazySink"),nt("tooltipDom"),Ne("exclusive",!0),Ne("tooltipComponents",[]),xs("delayForShow",ue(300)),xs("delayForHide",ue(300)),xs("onSetup",Ke),Ol("mode","normal",["normal","follow-highlight","children-keyboard-focus","children-normal"]),Ne("anchor",n=>({type:"hotspot",hotspot:n,layouts:{onLtr:ue([Ar,ir,mr,Lr,pr,us]),onRtl:ue([Ar,ir,mr,Lr,pr,us])},bubble:nc(0,-2,{})})),Dn("onHide"),Dn("onShow")],DM=Object.freeze({__proto__:null,init:()=>{const n=so(!0),r=Nn(),i=Nn(),l=()=>{r.on(clearTimeout)},u=ue("not-implemented");return Jr({getTooltip:i.get,isShowing:i.isSet,setTooltip:i.set,clearTooltip:i.clear,clearTimer:l,resetTimer:(f,p)=>{l(),r.set(setTimeout(f,p))},readState:u,isEnabled:()=>n.get(),setEnabled:f=>n.set(f)})}});const Pr=Qr({fields:NM,name:"tooltipping",active:zM,state:DM,apis:OM}),{entries:$4,setPrototypeOf:$2,isFrozen:V4,getPrototypeOf:j4,getOwnPropertyDescriptor:RM}=Object;let{freeze:rc,seal:kf,create:U4}=Object,{apply:V2,construct:j2}=typeof Reflect<"u"&&Reflect;V2||(V2=function(n,r,i){return n.apply(r,i)}),rc||(rc=function(n){return n}),kf||(kf=function(n){return n}),j2||(j2=function(n,r){return new n(...r)});const U2=Du(Array.prototype.forEach),MM=Du(Array.prototype.pop),Z0=Du(Array.prototype.push),px=Du(String.prototype.toLowerCase),gx=Du(String.prototype.toString),LM=Du(String.prototype.match),Zt=Du(String.prototype.replace),rb=Du(String.prototype.indexOf),BM=Du(String.prototype.trim),fd=Du(RegExp.prototype.test),zg=(hx=TypeError,function(){for(var n=arguments.length,r=new Array(n),i=0;i1?i-1:0),u=1;u/gm),q2=kf(/\${[\w\W]*}/gm),$M=kf(/^data-[\-\w.\u00B7-\uFFFF]/),VM=kf(/^aria-[\-\w]+$/),K4=kf(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jM=kf(/^(?:\w+script|data):/i),UM=kf(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Cm=kf(/^html$/i);var q0=Object.freeze({__proto__:null,MUSTACHE_EXPR:FM,ERB_EXPR:HM,TMPLIT_EXPR:q2,DATA_ATTR:$M,ARIA_ATTR:VM,IS_ALLOWED_URI:K4,IS_SCRIPT_OR_DATA:jM,ATTR_WHITESPACE:UM,DOCTYPE_NAME:Cm});const ZM=()=>typeof window>"u"?null:window;var WM=function n(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ZM();const i=Ie=>n(Ie);if(i.version="3.0.5",i.removed=[],!r||!r.document||r.document.nodeType!==9)return i.isSupported=!1,i;const l=r.document,u=l.currentScript;let{document:f}=r;const{DocumentFragment:p,HTMLTemplateElement:y,Node:v,Element:C,NodeFilter:O,NamedNodeMap:A=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:R,DOMParser:F,trustedTypes:$}=r,G=C.prototype,J=bx(G,"cloneNode"),ae=bx(G,"nextSibling"),X=bx(G,"childNodes"),Y=bx(G,"parentNode");if(typeof y=="function"){const Ie=f.createElement("template");Ie.content&&Ie.content.ownerDocument&&(f=Ie.content.ownerDocument)}let ne,ie="";const{implementation:de,createNodeIterator:we,createDocumentFragment:ze,getElementsByTagName:tt}=f,{importNode:Je}=l;let Ze={};i.isSupported=typeof $4=="function"&&typeof Y=="function"&&de&&de.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:kt,ERB_EXPR:Wt,TMPLIT_EXPR:ro,DATA_ATTR:yo,ARIA_ATTR:Ho,IS_SCRIPT_OR_DATA:xn,ATTR_WHITESPACE:Bs}=q0;let{IS_ALLOWED_URI:Xs}=q0,on=null;const Rn=ps({},[...Z2,...W0,...ab,...W2,...W4]);let Co=null;const Js=ps({},[...IM,...yx,...q4,...vx]);let ms=Object.seal(Object.create(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}})),zi=null,Ni=null,Ia=!0,Ea=!0,Zp=!1,h1=!0,Jg=!1,Wp=!1,e_=!1,Qg=!1,Fm=!1,Mb=!1,Lb=!1,b1=!0,sk=!1,t_=!0,eh=!1,Hm={},qp=null;const o_=ps({},["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 n_=null;const Kn=ps({},["audio","video","img","source","image","track"]);let $m=null;const Hu=ps({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Bb="http://www.w3.org/1998/Math/MathML",rk="http://www.w3.org/2000/svg",Kp="http://www.w3.org/1999/xhtml";let y1=Kp,HA=!1,ak=null;const JP=ps({},[Bb,rk,Kp],gx);let v1;const QP=["application/xhtml+xml","text/html"];let al,Pb=null;const eI=f.createElement("form"),xR=function(Ie){return Ie instanceof RegExp||Ie instanceof Function},ik=function(Ie){if(!Pb||Pb!==Ie){if(Ie&&typeof Ie=="object"||(Ie={}),Ie=Fy(Ie),v1=v1=QP.indexOf(Ie.PARSER_MEDIA_TYPE)===-1?"text/html":Ie.PARSER_MEDIA_TYPE,al=v1==="application/xhtml+xml"?gx:px,on="ALLOWED_TAGS"in Ie?ps({},Ie.ALLOWED_TAGS,al):Rn,Co="ALLOWED_ATTR"in Ie?ps({},Ie.ALLOWED_ATTR,al):Js,ak="ALLOWED_NAMESPACES"in Ie?ps({},Ie.ALLOWED_NAMESPACES,gx):JP,$m="ADD_URI_SAFE_ATTR"in Ie?ps(Fy(Hu),Ie.ADD_URI_SAFE_ATTR,al):Hu,n_="ADD_DATA_URI_TAGS"in Ie?ps(Fy(Kn),Ie.ADD_DATA_URI_TAGS,al):Kn,qp="FORBID_CONTENTS"in Ie?ps({},Ie.FORBID_CONTENTS,al):o_,zi="FORBID_TAGS"in Ie?ps({},Ie.FORBID_TAGS,al):{},Ni="FORBID_ATTR"in Ie?ps({},Ie.FORBID_ATTR,al):{},Hm="USE_PROFILES"in Ie&&Ie.USE_PROFILES,Ia=Ie.ALLOW_ARIA_ATTR!==!1,Ea=Ie.ALLOW_DATA_ATTR!==!1,Zp=Ie.ALLOW_UNKNOWN_PROTOCOLS||!1,h1=Ie.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Jg=Ie.SAFE_FOR_TEMPLATES||!1,Wp=Ie.WHOLE_DOCUMENT||!1,Fm=Ie.RETURN_DOM||!1,Mb=Ie.RETURN_DOM_FRAGMENT||!1,Lb=Ie.RETURN_TRUSTED_TYPE||!1,Qg=Ie.FORCE_BODY||!1,b1=Ie.SANITIZE_DOM!==!1,sk=Ie.SANITIZE_NAMED_PROPS||!1,t_=Ie.KEEP_CONTENT!==!1,eh=Ie.IN_PLACE||!1,Xs=Ie.ALLOWED_URI_REGEXP||K4,y1=Ie.NAMESPACE||Kp,ms=Ie.CUSTOM_ELEMENT_HANDLING||{},Ie.CUSTOM_ELEMENT_HANDLING&&xR(Ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ms.tagNameCheck=Ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ie.CUSTOM_ELEMENT_HANDLING&&xR(Ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ms.attributeNameCheck=Ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ie.CUSTOM_ELEMENT_HANDLING&&typeof Ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ms.allowCustomizedBuiltInElements=Ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Jg&&(Ea=!1),Mb&&(Fm=!0),Hm&&(on=ps({},[...W4]),Co=[],Hm.html===!0&&(ps(on,Z2),ps(Co,IM)),Hm.svg===!0&&(ps(on,W0),ps(Co,yx),ps(Co,vx)),Hm.svgFilters===!0&&(ps(on,ab),ps(Co,yx),ps(Co,vx)),Hm.mathMl===!0&&(ps(on,W2),ps(Co,q4),ps(Co,vx))),Ie.ADD_TAGS&&(on===Rn&&(on=Fy(on)),ps(on,Ie.ADD_TAGS,al)),Ie.ADD_ATTR&&(Co===Js&&(Co=Fy(Co)),ps(Co,Ie.ADD_ATTR,al)),Ie.ADD_URI_SAFE_ATTR&&ps($m,Ie.ADD_URI_SAFE_ATTR,al),Ie.FORBID_CONTENTS&&(qp===o_&&(qp=Fy(qp)),ps(qp,Ie.FORBID_CONTENTS,al)),t_&&(on["#text"]=!0),Wp&&ps(on,["html","head","body"]),on.table&&(ps(on,["tbody"]),delete zi.tbody),Ie.TRUSTED_TYPES_POLICY){if(typeof Ie.TRUSTED_TYPES_POLICY.createHTML!="function")throw zg('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ie.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw zg('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=Ie.TRUSTED_TYPES_POLICY,ie=ne.createHTML("")}else ne===void 0&&(ne=function(vo,Zo){if(typeof vo!="object"||typeof vo.createPolicy!="function")return null;let Ps=null;const Or="data-tt-policy-suffix";Zo&&Zo.hasAttribute(Or)&&(Ps=Zo.getAttribute(Or));const Wr="dompurify"+(Ps?"#"+Ps:"");try{return vo.createPolicy(Wr,{createHTML:Ir=>Ir,createScriptURL:Ir=>Ir})}catch{return console.warn("TrustedTypes policy "+Wr+" could not be created."),null}}($,u)),ne!==null&&typeof ie=="string"&&(ie=ne.createHTML(""));rc&&rc(Ie),Pb=Ie}},wR=ps({},["mi","mo","mn","ms","mtext"]),kR=ps({},["foreignobject","desc","title","annotation-xml"]),jo=ps({},["title","style","font","a","script"]),th=ps({},W0);ps(th,ab),ps(th,Z4);const lk=ps({},W2);ps(lk,PM);const oh=function(Ie){Z0(i.removed,{element:Ie});try{Ie.parentNode.removeChild(Ie)}catch{Ie.remove()}},_1=function(Ie,vo){try{Z0(i.removed,{attribute:vo.getAttributeNode(Ie),from:vo})}catch{Z0(i.removed,{attribute:null,from:vo})}if(vo.removeAttribute(Ie),Ie==="is"&&!Co[Ie])if(Fm||Mb)try{oh(vo)}catch{}else try{vo.setAttribute(Ie,"")}catch{}},$A=function(Ie){let vo,Zo;if(Qg)Ie=""+Ie;else{const Wr=LM(Ie,/^[\r\n\t ]+/);Zo=Wr&&Wr[0]}v1==="application/xhtml+xml"&&y1===Kp&&(Ie=''+Ie+"");const Ps=ne?ne.createHTML(Ie):Ie;if(y1===Kp)try{vo=new F().parseFromString(Ps,v1)}catch{}if(!vo||!vo.documentElement){vo=de.createDocument(y1,"template",null);try{vo.documentElement.innerHTML=HA?ie:Ps}catch{}}const Or=vo.body||vo.documentElement;return Ie&&Zo&&Or.insertBefore(f.createTextNode(Zo),Or.childNodes[0]||null),y1===Kp?tt.call(vo,Wp?"html":"body")[0]:Wp?vo.documentElement:Or},VA=function(Ie){return we.call(Ie.ownerDocument||Ie,Ie,O.SHOW_ELEMENT|O.SHOW_COMMENT|O.SHOW_TEXT,null,!1)},jA=function(Ie){return typeof v=="object"?Ie instanceof v:Ie&&typeof Ie=="object"&&typeof Ie.nodeType=="number"&&typeof Ie.nodeName=="string"},eu=function(Ie,vo,Zo){Ze[Ie]&&U2(Ze[Ie],Ps=>{Ps.call(i,vo,Zo,Pb)})},CR=function(Ie){let vo;if(eu("beforeSanitizeElements",Ie,null),(Zo=Ie)instanceof R&&(typeof Zo.nodeName!="string"||typeof Zo.textContent!="string"||typeof Zo.removeChild!="function"||!(Zo.attributes instanceof A)||typeof Zo.removeAttribute!="function"||typeof Zo.setAttribute!="function"||typeof Zo.namespaceURI!="string"||typeof Zo.insertBefore!="function"||typeof Zo.hasChildNodes!="function"))return oh(Ie),!0;var Zo;const Ps=al(Ie.nodeName);if(eu("uponSanitizeElement",Ie,{tagName:Ps,allowedTags:on}),Ie.hasChildNodes()&&!jA(Ie.firstElementChild)&&(!jA(Ie.content)||!jA(Ie.content.firstElementChild))&&fd(/<[/\w]/g,Ie.innerHTML)&&fd(/<[/\w]/g,Ie.textContent))return oh(Ie),!0;if(!on[Ps]||zi[Ps]){if(!zi[Ps]&&SR(Ps)&&(ms.tagNameCheck instanceof RegExp&&fd(ms.tagNameCheck,Ps)||ms.tagNameCheck instanceof Function&&ms.tagNameCheck(Ps)))return!1;if(t_&&!qp[Ps]){const Or=Y(Ie)||Ie.parentNode,Wr=X(Ie)||Ie.childNodes;if(Wr&&Or)for(let Ir=Wr.length-1;Ir>=0;--Ir)Or.insertBefore(J(Wr[Ir],!0),ae(Ie))}return oh(Ie),!0}return Ie instanceof C&&!function(Or){let Wr=Y(Or);Wr&&Wr.tagName||(Wr={namespaceURI:y1,tagName:"template"});const Ir=px(Or.tagName),ma=px(Wr.tagName);return!!ak[Or.namespaceURI]&&(Or.namespaceURI===rk?Wr.namespaceURI===Kp?Ir==="svg":Wr.namespaceURI===Bb?Ir==="svg"&&(ma==="annotation-xml"||wR[ma]):!!th[Ir]:Or.namespaceURI===Bb?Wr.namespaceURI===Kp?Ir==="math":Wr.namespaceURI===rk?Ir==="math"&&kR[ma]:!!lk[Ir]:Or.namespaceURI===Kp?!(Wr.namespaceURI===rk&&!kR[ma])&&!(Wr.namespaceURI===Bb&&!wR[ma])&&!lk[Ir]&&(jo[Ir]||!th[Ir]):!(v1!=="application/xhtml+xml"||!ak[Or.namespaceURI]))}(Ie)?(oh(Ie),!0):Ps!=="noscript"&&Ps!=="noembed"&&Ps!=="noframes"||!fd(/<\/no(script|embed|frames)/i,Ie.innerHTML)?(Jg&&Ie.nodeType===3&&(vo=Ie.textContent,vo=Zt(vo,kt," "),vo=Zt(vo,Wt," "),vo=Zt(vo,ro," "),Ie.textContent!==vo&&(Z0(i.removed,{element:Ie.cloneNode()}),Ie.textContent=vo)),eu("afterSanitizeElements",Ie,null),!1):(oh(Ie),!0)},UA=function(Ie,vo,Zo){if(b1&&(vo==="id"||vo==="name")&&(Zo in f||Zo in eI))return!1;if(!(Ea&&!Ni[vo]&&fd(yo,vo))){if(!(Ia&&fd(Ho,vo))){if(!Co[vo]||Ni[vo]){if(!(SR(Ie)&&(ms.tagNameCheck instanceof RegExp&&fd(ms.tagNameCheck,Ie)||ms.tagNameCheck instanceof Function&&ms.tagNameCheck(Ie))&&(ms.attributeNameCheck instanceof RegExp&&fd(ms.attributeNameCheck,vo)||ms.attributeNameCheck instanceof Function&&ms.attributeNameCheck(vo))||vo==="is"&&ms.allowCustomizedBuiltInElements&&(ms.tagNameCheck instanceof RegExp&&fd(ms.tagNameCheck,Zo)||ms.tagNameCheck instanceof Function&&ms.tagNameCheck(Zo))))return!1}else if(!$m[vo]){if(!fd(Xs,Zt(Zo,Bs,""))){if((vo!=="src"&&vo!=="xlink:href"&&vo!=="href"||Ie==="script"||rb(Zo,"data:")!==0||!n_[Ie])&&!(Zp&&!fd(xn,Zt(Zo,Bs,"")))){if(Zo)return!1}}}}}return!0},SR=function(Ie){return Ie.indexOf("-")>0},ER=function(Ie){let vo,Zo,Ps,Or;eu("beforeSanitizeAttributes",Ie,null);const{attributes:Wr}=Ie;if(!Wr)return;const Ir={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Co};for(Or=Wr.length;Or--;){vo=Wr[Or];const{name:ma,namespaceURI:x1}=vo;Zo=ma==="value"?vo.value:BM(vo.value);const oI=Zo;if(Ps=al(ma),Ir.attrName=Ps,Ir.attrValue=Zo,Ir.keepAttr=!0,Ir.forceKeepAttr=void 0,eu("uponSanitizeAttribute",Ie,Ir),Zo=Ir.attrValue,Ir.forceKeepAttr)continue;if(!Ir.keepAttr){_1(ma,Ie);continue}if(!h1&&fd(/\/>/i,Zo)){_1(ma,Ie);continue}Jg&&(Zo=Zt(Zo,kt," "),Zo=Zt(Zo,Wt," "),Zo=Zt(Zo,ro," "));const AR=al(Ie.nodeName);if(UA(AR,Ps,Zo)){if(!sk||Ps!=="id"&&Ps!=="name"||(_1(ma,Ie),Zo="user-content-"+Zo),ne&&typeof $=="object"&&typeof $.getAttributeType=="function"&&!x1)switch($.getAttributeType(AR,Ps)){case"TrustedHTML":Zo=ne.createHTML(Zo);break;case"TrustedScriptURL":Zo=ne.createScriptURL(Zo)}if(Zo!==oI)try{x1?Ie.setAttributeNS(x1,ma,Zo):Ie.setAttribute(ma,Zo)}catch{_1(ma,Ie)}}else _1(ma,Ie)}eu("afterSanitizeAttributes",Ie,null)},tI=function Ie(vo){let Zo;const Ps=VA(vo);for(eu("beforeSanitizeShadowDOM",vo,null);Zo=Ps.nextNode();)eu("uponSanitizeShadowNode",Zo,null),CR(Zo)||(Zo.content instanceof p&&Ie(Zo.content),ER(Zo));eu("afterSanitizeShadowDOM",vo,null)};return i.sanitize=function(Ie){let vo,Zo,Ps,Or,Wr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(HA=!Ie,HA&&(Ie=""),typeof Ie!="string"&&!jA(Ie)){if(typeof Ie.toString!="function")throw zg("toString is not a function");if(typeof(Ie=Ie.toString())!="string")throw zg("dirty is not a string, aborting")}if(!i.isSupported)return Ie;if(e_||ik(Wr),i.removed=[],typeof Ie=="string"&&(eh=!1),eh){if(Ie.nodeName){const x1=al(Ie.nodeName);if(!on[x1]||zi[x1])throw zg("root node is forbidden and cannot be sanitized in-place")}}else if(Ie instanceof v)vo=$A(""),Zo=vo.ownerDocument.importNode(Ie,!0),Zo.nodeType===1&&Zo.nodeName==="BODY"||Zo.nodeName==="HTML"?vo=Zo:vo.appendChild(Zo);else{if(!Fm&&!Jg&&!Wp&&Ie.indexOf("<")===-1)return ne&&Lb?ne.createHTML(Ie):Ie;if(vo=$A(Ie),!vo)return Fm?null:Lb?ie:""}vo&&Qg&&oh(vo.firstChild);const Ir=VA(eh?Ie:vo);for(;Ps=Ir.nextNode();)CR(Ps)||(Ps.content instanceof p&&tI(Ps.content),ER(Ps));if(eh)return Ie;if(Fm){if(Mb)for(Or=ze.call(vo.ownerDocument);vo.firstChild;)Or.appendChild(vo.firstChild);else Or=vo;return(Co.shadowroot||Co.shadowrootmode)&&(Or=Je.call(l,Or,!0)),Or}let ma=Wp?vo.outerHTML:vo.innerHTML;return Wp&&on["!doctype"]&&vo.ownerDocument&&vo.ownerDocument.doctype&&vo.ownerDocument.doctype.name&&fd(Cm,vo.ownerDocument.doctype.name)&&(ma=" +`+ma),Jg&&(ma=Zt(ma,kt," "),ma=Zt(ma,Wt," "),ma=Zt(ma,ro," ")),ne&&Lb?ne.createHTML(ma):ma},i.setConfig=function(Ie){ik(Ie),e_=!0},i.clearConfig=function(){Pb=null,e_=!1},i.isValidAttribute=function(Ie,vo,Zo){Pb||ik({});const Ps=al(Ie),Or=al(vo);return UA(Ps,Or,Zo)},i.addHook=function(Ie,vo){typeof vo=="function"&&(Ze[Ie]=Ze[Ie]||[],Z0(Ze[Ie],vo))},i.removeHook=function(Ie){if(Ze[Ie])return MM(Ze[Ie])},i.removeHooks=function(Ie){Ze[Ie]&&(Ze[Ie]=[])},i.removeAllHooks=function(){Ze={}},i}();const G4=n=>WM().sanitize(n);var jd=tinymce.util.Tools.resolve("tinymce.util.I18n");const qM={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},Y4="temporary-placeholder",K2=n=>()=>St(n,Y4).getOr("!not found!"),Ng=(n,r)=>{const i=n.toLowerCase();if(jd.isRtl()){const l=((u,f)=>ll(u,f)?u:((p,y)=>p+y)(u,f))(i,"-rtl");return Vo(r,l)?l:i}return i},K0=(n,r)=>St(r,Ng(n,r)),X4=(n,r)=>{const i=r();return K0(n,i).getOrThunk(K2(i))},_x=()=>en("add-focusable",[Ss(n=>{ay(n.element,"svg").each(r=>wo(r,"focusable","false"))})]),J4=(n,r,i,l)=>{var u,f;const p=(v=>!!jd.isRtl()&&Vo(qM,v))(r)?["tox-icon--flip"]:[],y=St(i,Ng(r,i)).or(l).getOrThunk(K2(i));return{dom:{tag:n.tag,attributes:(u=n.attributes)!==null&&u!==void 0?u:{},classes:n.classes.concat(p),innerHtml:y},behaviours:xt([...(f=n.behaviours)!==null&&f!==void 0?f:[],_x()])}},Hc=(n,r,i,l=D.none())=>J4(r,n,i(),l),KM={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},G2=ld({name:"Notification",factory:n=>{const r=Xt("notification-text"),i=ns({dom:km(`

    ${G4(n.backstageProvider.translate(n.text))}

    `),behaviours:xt([So.config({})])}),l=A=>({dom:{tag:"div",classes:["tox-bar"],styles:{width:`${A}%`}}}),u=A=>({dom:{tag:"div",classes:["tox-text"],innerHtml:`${A}%`}}),f=ns({dom:{tag:"div",classes:n.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[l(0)]},u(0)],behaviours:xt([So.config({})])}),p={updateProgress:(A,R)=>{A.getSystem().isConnected()&&f.getOpt(A).each(F=>{So.set(F,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[l(R)]},u(R)])})},updateText:(A,R)=>{if(A.getSystem().isConnected()){const F=i.get(A);So.set(F,[wr(R)])}}},y=Cs([n.icon.toArray(),n.level.toArray(),n.level.bind(A=>D.from(KM[A])).toArray()]),v=ns(Oi.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":n.backstageProvider.translate("Close")}},components:[Hc("close",{tag:"span",classes:["tox-icon"]},n.iconProvider)],buttonBehaviours:xt([ws.config({}),Pr.config({...n.backstageProvider.tooltips.getConfig({tooltipText:n.backstageProvider.translate("Close")})})]),action:A=>{n.onAction(A)}})),C=((A,R,F)=>{const $=F(),G=j(A,J=>Vo($,Ng(J,$)));return J4({tag:"div",classes:["tox-notification__icon"]},G.getOr(Y4),$,D.none())})(y,0,n.iconProvider),O=[C,{dom:{tag:"div",classes:["tox-notification__body"]},components:[i.asSpec()],behaviours:xt([So.config({})])}];return{uid:n.uid,dom:{tag:"div",attributes:{role:"alert","aria-labelledby":r},classes:n.level.map(A=>["tox-notification","tox-notification--in",`tox-notification--${A}`]).getOr(["tox-notification","tox-notification--in"])},behaviours:xt([ws.config({}),Po.config({}),po.config({mode:"special",onEscape:A=>(n.onAction(A),D.some(!0))})]),components:O.concat(n.progress?[f.asSpec()]:[]).concat([v.asSpec()]),apis:p}},configFields:[vn("level"),nt("progress"),vn("icon"),nt("onAction"),nt("text"),nt("iconProvider"),nt("backstageProvider")],apis:{updateProgress:(n,r,i)=>{n.updateProgress(r,i)},updateText:(n,r,i)=>{n.updateText(r,i)}}});var Q4=(n,r,i,l)=>{const u=r.backstage.shared,f=()=>Vt(n.queryCommandValue("ToggleView")===""?n.getContentAreaContainer():n.getContainer()),p=()=>{const v=vr(f());return D.some(v)},y=v=>{p().each(C=>{$t(v,O=>{Vn(O.element,"width"),Go(O.element)>C.width&&Mo(O.element,"width",C.width+"px")})})};return{open:(v,C,O)=>{const A=()=>{l.on($=>{C();const G=O();(J=>{So.remove(J,R),F()})($),((J,ae)=>{Yn(J.element).length===0?((X,Y)=>{or.hide(X),l.clear(),Y&&n.focus()})(J,ae):((X,Y)=>{Y&&po.focusIn(X)})(J,ae)})($,G)})},R=La(G2.sketch({text:v.text,level:Ge(["success","error","warning","warn","info"],v.type)?v.type:void 0,progress:v.progressBar===!0,icon:v.icon,onAction:A,iconProvider:u.providers.icons,backstageProvider:u.providers}));if(l.isSet()){const $=Fi(R);l.on(G=>{So.append(G,$),or.reposition(G),Gs.refresh(G),y(G.components())})}else{const $=La(or.sketch({dom:{tag:"div",classes:["tox-notifications-container"],attributes:{"aria-label":"Notifications",role:"region"}},lazySink:u.getSink,fireDismissalEventInstead:{},...u.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}},inlineBehaviours:xt([po.config({mode:"cyclic",selector:".tox-notification, .tox-notification a, .tox-notification button"}),So.config({}),...Np(n)&&!u.header.isPositionedAtTop()?[]:[Gs.config({contextual:{lazyContext:()=>D.some(vr(f())),fadeInClass:"tox-notification-container-dock-fadein",fadeOutClass:"tox-notification-container-dock-fadeout",transitionClass:"tox-notification-container-dock-transition"},modes:["top"],lazyViewport:X=>Tg(n,X.element).map(Y=>({bounds:Og(Y),optScrollEnv:D.some({currentScrollTop:Y.element.dom.scrollTop,scrollElmTop:Ye(Y.element).top})})).getOrThunk(()=>({bounds:jr(),optScrollEnv:D.none()}))})]])})),G=Fi(R),J={maxHeightFunction:wp()},ae={...u.anchors.banner(),overrides:J};l.set($),i.add($),or.showWithinBounds($,G,{anchor:ae},p)}Lt(v.timeout)&&v.timeout>0&&tx.setEditorTimeout(n,()=>{A()},v.timeout);const F=()=>{l.on($=>{or.reposition($),Gs.refresh($),y($.components())})};return{close:A,reposition:F,text:$=>{G2.updateText(R,$)},settings:v,getEl:()=>R.element.dom,progressBar:{value:$=>{G2.updateProgress(R,$)}}}},close:v=>{v.close()},getArgs:v=>v.settings}},G0;(function(n){n[n.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",n[n.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"})(G0||(G0={}));var Cf=G0;const xx="tox-menu-nav__js",wx="tox-collection__item",e3="tox-swatch",t3={normal:xx,color:e3},o3="tox-collection__item--enabled",n3="tox-collection__item-icon",Y0="tox-collection__item-label",Y2="tox-collection__item-caret",Sm="tox-collection__item--active",X0="tox-collection__item-container",J0="tox-collection__item-container--row",Dg=n=>St(t3,n).getOr(xx),s8=n=>n==="color"?"tox-swatches":"tox-menu",X2=n=>({backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:s8(n),tieredMenu:"tox-tiered-menu"}),ib=n=>{const r=X2(n);return{backgroundMenu:r.backgroundMenu,selectedMenu:r.selectedMenu,menu:r.menu,selectedItem:r.selectedItem,item:Dg(n)}},s3=(n,r,i)=>{const l=X2(i);return{tag:"div",classes:Cs([[l.menu,`tox-menu-${r}-column`],n?[l.hasIcons]:[]])}},r3=[tb.parts.items({})],kx=(n,r,i)=>{const l=X2(i);return{dom:{tag:"div",classes:Cs([[l.tieredMenu]])},markers:ib(i)}},GM=ue([vn("data"),Ne("inputAttributes",{}),Ne("inputStyles",{}),Ne("tag","input"),Ne("inputClasses",[]),Dn("onSetValue"),Ne("styles",{}),Ne("eventOrder",{}),Jt("inputBehaviours",[Le,Po]),Ne("selectOnFocus",!0)]),YM=n=>xt([Po.config({onFocus:n.selectOnFocus?r=>{const i=r.element,l=sf(i);i.dom.setSelectionRange(0,l.length)}:Ke})]),XM=n=>({...YM(n),...Xo(n.inputBehaviours,[Le.config({store:{mode:"manual",...n.data.map(r=>({initialValue:r})).getOr({}),getValue:r=>sf(r.element),setValue:(r,i)=>{sf(r.element)!==i&&am(r.element,i)}},onSetValue:n.onSetValue})])}),a3=n=>({tag:n.tag,attributes:{type:"text",...n.inputAttributes},styles:n.inputStyles,classes:n.inputClasses}),Rp=ld({name:"Input",configFields:GM(),factory:(n,r)=>({uid:n.uid,dom:a3(n),components:[],behaviours:XM(n),eventOrder:n.eventOrder})}),i3=Xt("refetch-trigger-event"),l3=Xt("redirect-menu-item-interaction"),c3="tox-menu__searcher",Q0=n=>Ys(n.element,`.${c3}`).bind(r=>n.getSystem().getByDom(r).toOptional()),d3=Q0,u3=n=>({fetchPattern:Le.getValue(n),selectionStart:n.element.dom.selectionStart,selectionEnd:n.element.dom.selectionEnd}),f3=n=>{const r=(u,f)=>(f.cut(),D.none()),i=(u,f)=>{const p={interactionEvent:f.event,eventType:f.event.raw.type};return lo(u,l3,p),D.some(!0)},l="searcher-events";return{dom:{tag:"div",classes:[wx]},components:[Rp.sketch({inputClasses:[c3,"tox-textfield"],inputAttributes:{...n.placeholder.map(u=>({placeholder:n.i18n(u)})).getOr({}),type:"search","aria-autocomplete":"list"},inputBehaviours:xt([en(l,[Xe(gu(),u=>{Qo(u,i3)}),Xe(Ws(),(u,f)=>{f.event.raw.key==="Escape"&&f.stop()})]),po.config({mode:"special",onLeft:r,onRight:r,onSpace:r,onEnter:i,onEscape:i,onUp:i,onDown:i})]),eventOrder:{keydown:[l,po.name()]}})]}},ev="tox-collection--results__js",m3=n=>{var r;return n.dom?{...n,dom:{...n.dom,attributes:{...(r=n.dom.attributes)!==null&&r!==void 0?r:{},id:Xt("aria-item-search-result-id"),"aria-selected":"false"}}}:n},Cx=(n,r)=>i=>{const l=Ht(i,r);return pt(l,u=>({dom:n,components:u}))},p3=(n,r)=>{const i=[];let l=[];return $t(n,(u,f)=>{r(u,f)?(l.length>0&&i.push(l),l=[],(Vo(u.dom,"innerHtml")||u.components&&u.components.length>0)&&l.push(u)):l.push(u)}),l.length>0&&i.push(l),pt(i,u=>({dom:{tag:"div",classes:["tox-collection__group"]},components:u}))},tv=(n,r,i)=>tb.parts.items({preprocess:l=>{const u=pt(l,i);return n!=="auto"&&n>1?Cx({tag:"div",classes:["tox-collection__group"]},n)(u):p3(u,(f,p)=>r[p].type==="separator")}}),J2=(n,r,i=!0)=>({dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(n===1?["tox-collection--list"]:["tox-collection--grid"])},components:[tv(n,r,Ct)]}),ov=n=>Ao(n,r=>"icon"in r&&r.icon!==void 0),Em=n=>(console.error(ii(n)),console.log(n),D.none()),JM=(n,r,i,l,u)=>{const f=(p=i,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[tb.parts.items({preprocess:y=>p3(y,(v,C)=>p[C].type==="separator")})]});var p;return{value:n,dom:f.dom,components:f.components,items:i}},Q2=(n,r,i,l,u)=>{if(u.menuType==="color"){const f=(p=>({dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[tb.parts.items({preprocess:p!=="auto"?Cx({tag:"div",classes:["tox-swatches__row"]},p):Ct})]}]}))(l);return{value:n,dom:f.dom,components:f.components,items:i}}if(u.menuType==="normal"&&l==="auto"){const f=J2(l,i);return{value:n,dom:f.dom,components:f.components,items:i}}if(u.menuType==="normal"||u.menuType==="searchable"){const f=u.menuType!=="searchable"?J2(l,i):u.searchMode.searchMode==="search-with-field"?((p,y,v)=>{const C=Xt("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(p===1?["tox-collection--list"]:["tox-collection--grid"])},components:[f3({i18n:jd.translate,placeholder:v.placeholder}),{dom:{tag:"div",classes:[...p===1?["tox-collection--list"]:["tox-collection--grid"],ev],attributes:{id:C}},components:[tv(p,y,m3)]}]}})(l,i,u.searchMode):((p,y,v=!0)=>{const C=Xt("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection",ev].concat(p===1?["tox-collection--list"]:["tox-collection--grid"]),attributes:{id:C}},components:[tv(p,y,m3)]}})(l,i);return{value:n,dom:f.dom,components:f.components,items:i}}if(u.menuType==="listpreview"&&l!=="auto"){const f=(p=>({dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[tb.parts.items({preprocess:Cx({tag:"div",classes:["tox-collection__group"]},p)})]}))(l);return{value:n,dom:f.dom,components:f.components,items:i}}return{value:n,dom:s3(r,l,u.menuType),components:r3,items:i}},oa=js("type"),eC=js("name"),tC=js("label"),Ud=js("text"),oC=js("title"),nC=js("icon"),lb=js("value"),QM=Za("fetch"),g3=Za("getSubmenuItems"),Hy=Za("onAction"),h3=Za("onItemAction"),Rg=xs("onSetup",()=>Ke),e6=Us("name"),Mg=Us("text"),t6=Us("role"),Zd=Us("icon"),nv=Us("tooltip"),sC=Us("label"),$y=Us("shortcut"),rC=Xl("select"),Sx=xr("active",!1),r8=xr("borderless",!1),Wd=xr("enabled",!0),Ex=xr("primary",!1),b3=n=>Ne("columns",n),$c=Ne("meta",{}),aC=xs("onAction",Ke),cb=n=>Ci("type",n),iC=n=>dr("name","name",Ku(()=>Xt(`${n}-name`)),Zr),y3=ho([oa,Mg]),o6=ho([cb("autocompleteitem"),Sx,Wd,$c,lb,Mg,Zd]),Am=[Wd,nv,Zd,Mg,Rg],lC=ho([oa,Hy,$y].concat(Am)),v3=n=>Ms("toolbarbutton",lC,n),sv=[Sx].concat(Am),Ax=ho(sv.concat([oa,Hy,$y])),Tx=n=>Ms("ToggleButton",Ax,n),_3=[xs("predicate",Fe),Ol("scope","node",["node","editor"]),Ol("position","selection",["node","selection","line"])],n6=Am.concat([cb("contextformbutton"),Ex,Hy,ca("original",Ct)]),s6=sv.concat([cb("contextformbutton"),Ex,Hy,ca("original",Ct)]),r6=Am.concat([cb("contextformbutton")]),a6=sv.concat([cb("contextformtogglebutton")]),i6=_r("type",{contextformbutton:n6,contextformtogglebutton:s6}),l6=ho([cb("contextform"),xs("initValue",ue("")),sC,li("commands",i6),ur("launch",_r("type",{contextformbutton:r6,contextformtogglebutton:a6}))].concat(_3)),x3=ho([cb("contexttoolbar"),js("items")].concat(_3)),Ox=[oa,js("src"),Us("alt"),Jn("classes",[],Zr)],c6=ho(Ox),d6=[oa,Ud,e6,Jn("classes",["tox-collection__item-label"],Zr)],u6=ho(d6),w3=Gu(()=>kc("type",{cardimage:c6,cardtext:u6,cardcontainer:Vy})),Vy=ho([oa,Ci("direction","horizontal"),Ci("align","left"),Ci("valign","middle"),li("items",w3)]),db=[Wd,Mg,t6,$y,dr("value","value",Ku(()=>Xt("menuitem-value")),Pi()),$c],f6=ho([oa,sC,li("items",w3),Rg,aC].concat(db)),cC=ho([oa,Sx,Zd].concat(db)),k3=[oa,js("fancytype"),aC],C3=[Ne("initData",{})].concat(k3),S3=[Xl("select"),wa("initData",{},[xr("allowCustomColors",!0),Ci("storageKey","default"),op("colors",Pi())])].concat(k3),E3=_r("fancytype",{inserttable:C3,colorswatch:S3}),A3=ho([oa,Rg,aC,Zd].concat(db)),T3=ho([oa,g3,Rg,Zd].concat(db)),m6=ho([oa,Zd,Sx,Rg,Hy].concat(db)),dC=(n,r,i)=>{const l=fa(n.element,"."+i);if(l.length>0){const u=Fr(l,f=>{const p=f.dom.getBoundingClientRect().top,y=l[0].dom.getBoundingClientRect().top;return Math.abs(p-y)>r}).getOr(l.length);return D.some({numColumns:u,numRows:Math.ceil(l.length/u)})}return D.none()},rv=n=>((r,i)=>xt([en(r,i)]))(Xt("unnamed-events"),n),zx="silver.readonly",p6=ho([Xr("readonly",fl)]),ub=(n,r)=>{const i=n.mainUi.outerContainer.element,l=[n.mainUi.mothership,...n.uiMotherships];r&&$t(l,u=>{u.broadcastOn([T()],{target:i})}),$t(l,u=>{u.broadcastOn([zx],{readonly:r})})},O3=(n,r)=>{n.on("init",()=>{n.mode.isReadOnly()&&ub(r,!0)}),n.on("SwitchMode",()=>ub(r,n.mode.isReadOnly())),D2(n)&&n.mode.set("readonly")},Ca=()=>tl.config({channels:{[zx]:{schema:p6,onReceive:(n,r)=>{Fo.set(n,r.readonly)}}}}),pi=n=>Fo.config({disabled:n}),z3=n=>Fo.config({disabled:n,disableClass:"tox-tbtn--disabled"}),Nx=n=>Fo.config({disabled:n,disableClass:"tox-tbtn--disabled",useNative:!1}),av=(n,r)=>{const i=n.getApi(r);return l=>{l(i)}},Lg=(n,r)=>Ss(i=>{av(n,i)(l=>{const u=n.onSetup(l);ut(u)&&r.set(u)})}),Mp=(n,r)=>Tc(i=>av(n,i)(r.get())),N3=(n,r)=>Ml((i,l)=>{av(n,i)(n.onAction),n.triggersSubmenu||r!==Cf.CLOSE_ON_EXECUTE||(i.getSystem().isConnected()&&Qo(i,sp()),l.stop())}),g6={[di()]:["disabling","alloy.base.behaviour","toggling","item-events"]},jy=bi,Uy=(n,r,i,l)=>{const u=so(Ke);return{type:"item",dom:r.dom,components:jy(r.optComponents),data:n.data,eventOrder:g6,hasSubmenu:n.triggersSubmenu,itemBehaviours:xt([en("item-events",[N3(n,i),Lg(n,u),Mp(n,u)]),(f=()=>!n.enabled||l.isDisabled(),Fo.config({disabled:f,disableClass:"tox-collection__item--state-disabled"})),Ca(),So.config({})].concat(n.itemBehaviours))};var f},Zy=n=>({value:n.value,meta:{text:n.text.getOr(""),...n.meta}}),Dx=n=>{const r=xf.os.isMacOS()||xf.os.isiOS(),i=r?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"},l=n.split("+"),u=pt(l,f=>{const p=f.toLowerCase().trim();return Vo(i,p)?i[p]:f});return r?u.join(""):u.join("+")},uC=(n,r,i=[n3])=>Hc(n,{tag:"div",classes:i},r),D3=n=>({dom:{tag:"div",classes:[Y0]},components:[wr(jd.translate(n))]}),fC=(n,r)=>({dom:{tag:"div",classes:r,innerHtml:n}}),R3=(n,r)=>({dom:{tag:"div",classes:[Y0]},components:[{dom:{tag:n.tag,styles:n.styles},components:[wr(jd.translate(r))]}]}),M3=n=>({dom:{tag:"div",classes:["tox-collection__item-accessory"]},components:[wr(Dx(n))]}),L3=n=>uC("checkmark",n,["tox-collection__item-checkmark"]),B3=n=>{const r=n.map(i=>({attributes:{id:Xt("menu-item"),"aria-label":jd.translate(i)}})).getOr({});return{tag:"div",classes:[xx,wx],...r}},iv=(n,r,i,l=D.none())=>n.presets==="color"?((u,f,p)=>{const y=u.value,v=u.iconContent.map(O=>((A,R,F)=>{const $=R();return K0(A,$).or(F).getOrThunk(K2($))})(O,f.icons,p)),C=u.ariaLabel.map(O=>({"aria-label":f.translate(O),"data-mce-name":O})).getOr({});return{dom:(()=>{const O=e3,A=v.getOr(""),R={tag:"div",attributes:C,classes:[O]};return y==="custom"?{...R,tag:"button",classes:[...R.classes,"tox-swatches__picker-btn"],innerHtml:A}:y==="remove"?{...R,classes:[...R.classes,"tox-swatch--remove"],innerHtml:A}:st(y)?{...R,attributes:{...R.attributes,"data-mce-color":y},styles:{"background-color":y},innerHtml:A}:R})(),optComponents:[]}})(n,r,l):((u,f,p,y)=>{const v={tag:"div",classes:[n3]},C=p?u.iconContent.map(F=>Hc(F,v,f.icons,y)).orThunk(()=>D.some({dom:v})):D.none(),O=u.checkMark,A=D.from(u.meta).fold(()=>D3,F=>Vo(F,"style")?ot(R3,F.style):D3),R=u.htmlContent.fold(()=>u.textContent.map(A),F=>D.some(fC(F,[Y0])));return{dom:B3(u.ariaLabel),optComponents:[C,R,u.shortcutContent.map(M3),O,u.caret]}})(n,r,i,l),P3=(n,r,i)=>St(n,"tooltipWorker").map(l=>[Pr.config({lazySink:r.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:u=>({type:"submenu",item:u,overrides:{maxHeightFunction:wp}}),mode:"follow-highlight",onShow:(u,f)=>{l(p=>{Pr.setComponents(u,[rf({element:Vt(p)})])})}})]).getOrThunk(()=>i.map(l=>[Pr.config({...r.providers.tooltips.getConfig({tooltipText:l}),mode:"follow-highlight"})]).getOr([])),mC=(n,r)=>{const i=(l=>My.DOM.encode(l))(jd.translate(n));if(r.length>0){const l=new RegExp((u=>u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(r),"gi");return i.replace(l,u=>`${u}`)}return i},pC=(n,r)=>pt(n,i=>{switch(i.type){case"cardcontainer":return((f,p)=>{const y=f.direction==="vertical"?"tox-collection__item-container--column":J0,v=f.align==="left"?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right";return{dom:{tag:"div",classes:[X0,y,v,(()=>{switch(f.valign){case"top":return"tox-collection__item-container--valign-top";case"middle":return"tox-collection__item-container--valign-middle";case"bottom":return"tox-collection__item-container--valign-bottom"}})()]},components:p}})(i,pC(i.items,r));case"cardimage":return((f,p,y)=>({dom:{tag:"img",classes:p,attributes:{src:f,alt:y.getOr("")}}}))(i.src,i.classes,i.alt);case"cardtext":const l=i.name.exists(f=>Ge(r.cardText.highlightOn,f)),u=l?D.from(r.cardText.matchText).getOr(""):"";return fC(mC(i.text,u),i.classes)}}),Lp=Vi(O2(),z2()),gC=n=>({value:fb(n)}),hC=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,bC=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,I3=n=>hC.test(n)||bC.test(n),fb=n=>as(n,"#").toUpperCase(),yC=n=>{const r=n.toString(16);return(r.length===1?"0"+r:r).toUpperCase()},lv=n=>{const r=yC(n.red)+yC(n.green)+yC(n.blue);return gC(r)},vC=Math.min,F3=Math.max,Rx=Math.round,h6=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,H3=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,Bp=(n,r,i,l)=>({red:n,green:r,blue:i,alpha:l}),cv=n=>{const r=parseInt(n,10);return r.toString()===n&&r>=0&&r<=255},$3=n=>{let r,i,l;const u=(n.hue||0)%360;let f=n.saturation/100,p=n.value/100;if(f=F3(0,vC(f,1)),p=F3(0,vC(p,1)),f===0)return r=i=l=Rx(255*p),Bp(r,i,l,1);const y=u/60,v=p*f,C=v*(1-Math.abs(y%2-1)),O=p-v;switch(Math.floor(y)){case 0:r=v,i=C,l=0;break;case 1:r=C,i=v,l=0;break;case 2:r=0,i=v,l=C;break;case 3:r=0,i=C,l=v;break;case 4:r=C,i=0,l=v;break;case 5:r=v,i=0,l=C;break;default:r=i=l=0}return r=Rx(255*(r+O)),i=Rx(255*(i+O)),l=Rx(255*(l+O)),Bp(r,i,l,1)},Ru=n=>{const r=(f=>{const p=(v=>({value:v.value.replace(hC,(O,A,R,F)=>A+A+R+R+F+F)}))(f),y=bC.exec(p.value);return y===null?["FFFFFF","FF","FF","FF"]:y})(n),i=parseInt(r[1],16),l=parseInt(r[2],16),u=parseInt(r[3],16);return Bp(i,l,u,1)},_C=(n,r,i,l)=>{const u=parseInt(n,10),f=parseInt(r,10),p=parseInt(i,10),y=parseFloat(l);return Bp(u,f,p,y)},Mx=n=>{const r=h6.exec(n);if(r!==null)return D.some(_C(r[1],r[2],r[3],"1"));const i=H3.exec(n);return i!==null?D.some(_C(i[1],i[2],i[3],i[4])):D.none()},V3=n=>`rgba(${n.red},${n.green},${n.blue},${n.alpha})`,j3=Bp(255,0,0,1),mb=(n,r)=>{n.dispatch("ResizeContent",r)},Wy=(n,r)=>{n.dispatch("TextColorChange",r)},U3=(n,r)=>n.dispatch("ResolveName",{name:r.nodeName.toLowerCase(),target:r}),qy=(n,r)=>()=>{n(),r()},Sa=n=>pb(n,"NodeChange",r=>{r.setEnabled(n.selection.isEditable())}),Sf=(n,r)=>i=>{const l=Sa(n)(i),u=((f,p)=>y=>{const v=Cl(),C=()=>{y.setActive(f.formatter.match(p));const O=f.formatter.formatChanged(p,y.setActive);v.set(O)};return f.initialized?C():f.once("init",C),()=>{f.off("init",C),v.clear()}})(n,r)(i);return()=>{l(),u()}},pb=(n,r,i)=>l=>{const u=()=>i(l),f=()=>{i(l),n.on(r,u)};return n.initialized?f():n.once("init",f),()=>{n.off("init",f),n.off(r,u)}},Z3=n=>r=>()=>{n.undoManager.transact(()=>{n.focus(),n.execCommand("mceToggleFormat",!1,r.format)})},ac=(n,r)=>()=>n.execCommand(r);var Vc=tinymce.util.Tools.resolve("tinymce.util.LocalStorage");const Lx={},W3=n=>St(Lx,n).getOrThunk(()=>{const r=`tinymce-custom-colors-${n}`,i=Vc.getItem(r);if(mo(i)){const u=Vc.getItem("tinymce-custom-colors");Vc.setItem(r,st(u)?u:"[]")}const l=((u,f=10)=>{const p=Vc.getItem(u),y=te(p)?JSON.parse(p):[],v=f-(C=y).length<0?C.slice(0,f):C;var C;const O=A=>{v.splice(A,1)};return{add:A=>{((R,F)=>{const $=qo(R,F);return $===-1?D.none():D.some($)})(v,A).each(O),v.unshift(A),v.length>f&&v.pop(),Vc.setItem(u,JSON.stringify(v))},state:()=>v.slice(0)}})(r,10);return Lx[n]=l,l}),xC=(n,r)=>{W3(n).add(r)},Ky=(n,r,i)=>({hue:n,saturation:r,value:i}),Bx=n=>{let r=0,i=0,l=0;const u=n.red/255,f=n.green/255,p=n.blue/255,y=Math.min(u,Math.min(f,p)),v=Math.max(u,Math.max(f,p));return y===v?(l=y,Ky(0,0,100*l)):(r=u===y?3:p===y?1:5,r=60*(r-(u===y?f-p:p===y?u-f:p-u)/(v-y)),i=(v-y)/v,l=v,Ky(Math.round(r),Math.round(100*i),Math.round(100*l)))},Px=n=>lv($3(n)),q3=n=>{return(r=n,I3(r)?D.some({value:fb(r)}):D.none()).orThunk(()=>Mx(n).map(lv)).getOrThunk(()=>{const i=document.createElement("canvas");i.height=1,i.width=1;const l=i.getContext("2d");l.clearRect(0,0,i.width,i.height),l.fillStyle="#FFFFFF",l.fillStyle=n,l.fillRect(0,0,1,1);const u=l.getImageData(0,0,1,1).data,f=u[0],p=u[1],y=u[2],v=u[3];return lv(Bp(f,p,y,v))});var r},wC="forecolor",kC="hilitecolor",b6=n=>{const r=[];for(let i=0;ir=>r.options.get(n),dv="#000000",gb=(n,r)=>r===wC&&n.options.isSet("color_map_foreground")?qd("color_map_foreground")(n):r===kC&&n.options.isSet("color_map_background")?qd("color_map_background")(n):qd("color_map")(n),Ix=(n,r="default")=>Math.max(5,Math.ceil(Math.sqrt(gb(n,r).length))),K3=(n,r)=>{const i=qd("color_cols")(n),l=Ix(n,r);return i===Ix(n)?l:i},CC=(n,r="default")=>Math.round(r===wC?qd("color_cols_foreground")(n):r===kC?qd("color_cols_background")(n):qd("color_cols")(n)),SC=qd("custom_colors"),G3=qd("color_default_foreground"),Y3=qd("color_default_background"),X3=(n,r)=>{const i=Vt(n.selection.getStart()),l=r==="hilitecolor"?Xc(i,u=>{if(ys(u)){const f=Ns(u,"background-color");return nn(Mx(f).exists(p=>p.alpha!==0),f)}return D.none()}).getOr("rgba(0, 0, 0, 0)"):Ns(i,"color");return Mx(l).map(u=>"#"+lv(u).value)},Fx=n=>{const r="choiceitem",i={type:r,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return n?[i,{type:r,text:"Custom color",icon:"color-picker",value:"custom"}]:[i]},EC=(n,r,i,l)=>{i==="custom"?eO(n)(u=>{u.each(f=>{xC(r,f),n.execCommand("mceApplyTextcolor",r,f),l(f)})},X3(n,r).getOr(dv)):i==="remove"?(l(""),n.execCommand("mceRemoveTextcolor",r)):(l(i),n.execCommand("mceApplyTextcolor",r,i))},AC=(n,r,i)=>n.concat((l=>pt(W3(l).state(),u=>({type:"choiceitem",text:u,icon:"checkmark",value:u})))(r).concat(Fx(i))),J3=(n,r,i)=>l=>{l(AC(n,r,i))},TC=(n,r,i)=>{const l=r==="forecolor"?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";n.setIconFill(l,i)},OC=(n,r)=>{n.setTooltip(r)},Q3=(n,r)=>i=>{const l=X3(n,r);return Kr(l,i.toUpperCase())},zC=(n,r,i)=>{if(yl(i))return r==="forecolor"?"Text color":"Background color";const l=r==="forecolor"?"Text color {0}":"Background color {0}",u=AC(gb(n,r),r,!1),f=j(u,p=>p.value===i).getOr({text:""}).text;return n.translate([l,n.translate(f)])},NC=(n,r,i,l)=>{n.ui.registry.addSplitButton(r,{tooltip:zC(n,i,l.get()),presets:"color",icon:r==="forecolor"?"text-color":"highlight-bg-color",select:Q3(n,i),columns:CC(n,i),fetch:J3(gb(n,i),i,SC(n)),onAction:u=>{EC(n,i,l.get(),Ke)},onItemAction:(u,f)=>{EC(n,i,f,p=>{l.set(p),Wy(n,{name:r,color:p})})},onSetup:u=>{TC(u,r,l.get());const f=p=>{p.name===r&&(TC(u,p.name,p.color),OC(u,zC(n,i,p.color)))};return n.on("TextColorChange",f),qy(Sa(n)(u),()=>{n.off("TextColorChange",f)})}})},Gy=(n,r,i,l,u)=>{n.ui.registry.addNestedMenuItem(r,{text:l,icon:r==="forecolor"?"text-color":"highlight-bg-color",onSetup:f=>(OC(f,zC(n,i,u.get())),TC(f,r,u.get()),Sa(n)(f)),getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"colorswatch",select:Q3(n,i),initData:{storageKey:i},onAction:f=>{EC(n,i,f.value,p=>{u.set(p),Wy(n,{name:r,color:p})})}}]})},eO=n=>(r,i)=>{let l=!1;const u={colorpicker:i};n.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:u,onAction:(f,p)=>{p.name==="hex-valid"&&(l=p.value)},onSubmit:f=>{const p=f.getData().colorpicker;l?(r(D.from(p)),f.close()):n.windowManager.alert(n.translate(["Invalid hex color code: {0}",p]))},onClose:Ke,onCancel:()=>{r(D.none())}})},hb=(n,r,i,l,u,f,p,y)=>{const v=ov(r),C=DC(r,i,l,u!=="color"?"normal":"color",f,p,y);return Q2(n,v,C,l,{menuType:u})},DC=(n,r,i,l,u,f,p)=>bi(pt(n,y=>{return y.type==="choiceitem"?(v=y,Ms("choicemenuitem",cC,v)).fold(Em,C=>D.some(((O,A,R,F,$,G,J,ae=!0)=>{const X=iv({presets:R,textContent:A?O.text:D.none(),htmlContent:D.none(),ariaLabel:O.text,iconContent:O.icon,shortcutContent:A?O.shortcut:D.none(),checkMark:A?D.some(L3(J.icons)):D.none(),caret:D.none(),value:O.value},J,ae),Y=O.text.filter(ue(!A)).map(ne=>Pr.config(J.tooltips.getConfig({tooltipText:J.translate(ne)})));return ls(Uy({data:Zy(O),enabled:O.enabled,getApi:ne=>({setActive:ie=>{No.set(ne,ie)},isActive:()=>No.isOn(ne),isEnabled:()=>!Fo.isDisabled(ne),setEnabled:ie=>Fo.set(ne,!ie)}),onAction:ne=>F(O.value),onSetup:ne=>(ne.setActive($),Ke),triggersSubmenu:!1,itemBehaviours:[...Y.toArray()]},X,G,J),{toggling:{toggleClass:o3,toggleOnExecute:!1,selected:O.active,exclusive:!0}})})(C,i===1,l,r,f(C.value),u,p,ov(n)))):D.none();var v})),uv=(n,r)=>{const i=ib(r);return n===1?{mode:"menu",moveOnTab:!0}:n==="auto"?{mode:"grid",selector:"."+i.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+(r==="color"?"tox-swatches__row":"tox-collection__group"),previousSelector:l=>r==="color"?Ys(l.element,"[aria-checked=true]"):D.none()}},RC=Xt("cell-over"),tO=Xt("cell-execute"),y6=(n,r,i)=>{const l=f=>lo(f,tO,{row:n,col:r}),u=(f,p)=>{p.stop(),l(f)};return La({dom:{tag:"div",attributes:{role:"button","aria-label":i}},behaviours:xt([en("insert-table-picker-cell",[Xe(io(),Po.focus),Xe(di(),l),Xe(Mr(),u),Xe(Ac(),u)]),No.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),Po.config({onFocus:f=>lo(f,RC,{row:n,col:r})})])})},oO=n=>Sn(n,r=>pt(r,Fi)),nO=(n,r)=>wr(`${r}x${n}`),sO={inserttable:(n,r)=>{const i=(p=>(y,v)=>p.shared.providers.translate(["{0} columns, {1} rows",v,y]))(r),l=((p,y,v)=>{const C=[];for(let O=0;O<10;O++){const A=[];for(let R=0;R<10;R++){const F=p(O+1,R+1);A.push(y6(O,R,F))}C.push(A)}return C})(i),u=nO(0,0),f=ns({dom:{tag:"span",classes:["tox-insert-table-picker__label"]},components:[u],behaviours:xt([So.config({})])});return{type:"widget",data:{value:Xt("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Lp.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:oO(l).concat(f.asSpec()),behaviours:xt([en("insert-table-picker",[Ss(p=>{So.set(f.get(p),[u])}),ef(RC,(p,y,v)=>{const{row:C,col:O}=v.event;((A,R,F,$,G)=>{for(let J=0;J<10;J++)for(let ae=0;ae<10;ae++)No.set(A[J][ae],J<=R&&ae<=F)})(l,C,O),So.set(f.get(p),[nO(C+1,O+1)])}),ef(tO,(p,y,v)=>{const{row:C,col:O}=v.event;Qo(p,sp()),n.onAction({numRows:C+1,numColumns:O+1})})]),po.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:(n,r)=>{const i=((p,y)=>{const v=p.initData.allowCustomColors&&y.colorinput.hasCustomColors();return p.initData.colors.fold(()=>AC(y.colorinput.getColors(p.initData.storageKey),p.initData.storageKey,v),C=>C.concat(Fx(v)))})(n,r),l=r.colorinput.getColorCols(n.initData.storageKey),u="color",f={...hb(Xt("menu-value"),i,p=>{n.onAction({value:p})},l,u,Cf.CLOSE_ON_EXECUTE,n.select.getOr(Fe),r.shared.providers),markers:ib(u),movement:uv(l,u),showMenuRole:!1};return{type:"widget",data:{value:Xt("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Lp.widget(tb.sketch(f))]}}},rO=n=>({type:"separator",dom:{tag:"div",classes:[wx,"tox-collection__group-heading"]},components:n.text.map(wr).toArray()});var v6=Object.freeze({__proto__:null,getCoupled:(n,r,i,l)=>i.getOrCreate(n,r,l),getExistingCoupled:(n,r,i,l)=>i.getExisting(n,r,l)}),aO=[Xr("others",Yu(un.value,Pi()))],Hx=Object.freeze({__proto__:null,init:()=>{const n={},r=(l,u)=>{if(tn(l.others).length===0)throw new Error("Cannot find any known coupled components");return St(n,u)},i=ue({});return Jr({readState:i,getExisting:(l,u,f)=>r(u,f).orThunk(()=>(St(u.others,f).getOrDie("No information found for coupled component: "+f),D.none())),getOrCreate:(l,u,f)=>r(u,f).getOrThunk(()=>{const p=St(u.others,f).getOrDie("No information found for coupled component: "+f)(l),y=l.getSystem().build(p);return n[f]=y,y})})}});const kr=Qr({fields:aO,name:"coupling",apis:v6,state:Hx}),fv=n=>{let r=D.none(),i=[];const l=p=>{u()?f(p):i.push(p)},u=()=>r.isSome(),f=p=>{r.each(y=>{setTimeout(()=>{p(y)},0)})};return n(p=>{u()||(r=D.some(p),$t(i,f),i=[])}),{get:l,map:p=>fv(y=>{l(v=>{y(p(v))})}),isReady:u}},_6={nu:fv,pure:n=>fv(r=>{r(n)})},x6=n=>{setTimeout(()=>{throw n},0)},Yy=n=>{const r=i=>{n().then(i,x6)};return{map:i=>Yy(()=>n().then(i)),bind:i=>Yy(()=>n().then(l=>i(l).toPromise())),anonBind:i=>Yy(()=>n().then(()=>i.toPromise())),toLazy:()=>_6.nu(r),toCached:()=>{let i=null;return Yy(()=>(i===null&&(i=n()),i))},toPromise:n,get:r}},Bg=n=>Yy(()=>new Promise(n)),Tm=n=>Yy(()=>Promise.resolve(n)),MC=ue("sink"),iO=ue(id({name:MC(),overrides:ue({dom:{tag:"div"},behaviours:xt([Xa.config({useFixed:Gt})]),events:$o([hu(Ws()),hu(at()),hu(Mr())])})})),lO=(n,r)=>{const i=n.getHotspot(r).getOr(r),l="hotspot",u=n.getAnchorOverrides();return n.layouts.fold(()=>({type:l,hotspot:i,overrides:u}),f=>({type:l,hotspot:i,overrides:u,layouts:f}))},$x=(n,r,i,l,u,f,p)=>((v,C,O,A,R,F,$)=>{const G=((ae,X,Y)=>(0,ae.fetch)(Y).map(X))(v,C,A),J=cO(A,v);return G.map(ae=>ae.bind(X=>{const Y=X.menus[X.primary];return D.from(Y).each(ne=>{v.listRole.each(ie=>{ne.role=ie})}),D.from(Op.sketch({...F.menu(),uid:Dc(""),data:X,highlightOnOpen:$,onOpenMenu:(ne,ie)=>{const de=J().getOrDie();Xa.position(de,ie,{anchor:O}),x.decloak(R)},onOpenSubmenu:(ne,ie,de)=>{const we=J().getOrDie();Xa.position(we,de,{anchor:{type:"submenu",item:ie}}),x.decloak(R)},onRepositionMenu:(ne,ie,de)=>{const we=J().getOrDie();Xa.position(we,ie,{anchor:O}),$t(de,ze=>{Xa.position(we,ze.triggeredMenu,{anchor:{type:"submenu",item:ze.triggeringItem}})})},onEscape:()=>(Po.focus(A),x.close(R),D.some(!0))}))}))})(n,r,lO(n,i),i,l,u,p).map(v=>(v.fold(()=>{x.isOpen(l)&&x.close(l)},C=>{x.cloak(l),x.open(l,C),f(l)}),l)),w6=(n,r,i,l,u,f,p)=>(x.close(l),Tm(l)),LC=(n,r,i,l,u,f)=>{const p=kr.getCoupled(i,"sandbox");return(x.isOpen(p)?w6:$x)(n,r,i,p,l,u,f)},cO=(n,r)=>n.getSystem().getByUid(r.uid+"-"+MC()).map(i=>()=>un.value(i)).getOrThunk(()=>r.lazySink.fold(()=>()=>un.error(new Error("No internal sink is specified, nor could an external sink be found")),i=>()=>i(n))),BC=n=>{x.getState(n).each(r=>{Op.repositionMenus(r)})},PC=(n,r,i)=>{const l=hp(),u=cO(r,n);return{dom:{tag:"div",classes:n.sandboxClasses,attributes:{id:l.id}},behaviours:Oo(n.sandboxBehaviours,[Le.config({store:{mode:"memory",initialValue:r}}),x.config({onOpen:(f,p)=>{const y=lO(n,r);l.link(r.element),n.matchWidth&&((v,C,O)=>{const A=In.getCurrent(C).getOr(C),R=Go(v.element);O?Mo(A.element,"min-width",R+"px"):((F,$)=>{oo.set(F,$)})(A.element,R)})(y.hotspot,p,n.useMinWidth),n.onOpen(y,f,p),i!==void 0&&i.onOpen!==void 0&&i.onOpen(f,p)},onClose:(f,p)=>{l.unlink(r.element),u().getOr(p).element.dom.dispatchEvent(new window.FocusEvent("focusout")),i!==void 0&&i.onClose!==void 0&&i.onClose(f,p)},isPartOf:(f,p,y)=>el(p,y)||el(r,y),getAttachPoint:()=>u().getOrDie()}),In.config({find:f=>x.getState(f).bind(p=>In.getCurrent(p))}),tl.config({channels:{...K({isExtraPart:Fe}),...he({doReposition:BC})}})])}},dO=n=>{const r=kr.getCoupled(n,"sandbox");BC(r)},IC=()=>[Ne("sandboxClasses",[]),Io("sandboxBehaviours",[In,tl,x,Le])],k6=ue([nt("dom"),nt("fetch"),Dn("onOpen"),Qi("onExecute"),Ne("getHotspot",D.some),Ne("getAnchorOverrides",ue({})),lf(),Jt("dropdownBehaviours",[No,kr,po,Po]),nt("toggleClass"),Ne("eventOrder",{}),vn("lazySink"),Ne("matchWidth",!1),Ne("useMinWidth",!1),vn("role"),vn("listRole")].concat(IC())),C6=ue([zu({schema:[up(),Ne("fakeFocus",!1)],name:"menu",defaults:n=>({onExecute:n.onExecute})}),iO()]),sl=pl({name:"Dropdown",configFields:k6(),partFields:C6(),factory:(n,r,i,l)=>{const u=v=>{x.getState(v).each(C=>{Op.highlightPrimary(C)})},f=(v,C,O)=>LC(n,Ct,v,l,C,O),p={expand:v=>{No.isOn(v)||f(v,Ke,ji.HighlightNone).get(Ke)},open:v=>{No.isOn(v)||f(v,Ke,ji.HighlightMenuAndItem).get(Ke)},refetch:v=>kr.getExistingCoupled(v,"sandbox").fold(()=>f(v,Ke,ji.HighlightMenuAndItem).map(Ke),C=>$x(n,Ct,v,C,l,Ke,ji.HighlightMenuAndItem).map(Ke)),isOpen:No.isOn,close:v=>{No.isOn(v)&&f(v,Ke,ji.HighlightMenuAndItem).get(Ke)},repositionMenus:v=>{No.isOn(v)&&dO(v)}},y=(v,C)=>(Ld(v),D.some(!0));return{uid:n.uid,dom:n.dom,components:r,behaviours:Xo(n.dropdownBehaviours,[No.config({toggleClass:n.toggleClass,aria:{mode:"expanded"}}),kr.config({others:{sandbox:v=>PC(n,v,{onOpen:()=>No.on(v),onClose:()=>No.off(v)})}}),po.config({mode:"special",onSpace:y,onEnter:y,onDown:(v,C)=>{if(sl.isOpen(v)){const O=kr.getCoupled(v,"sandbox");u(O)}else sl.open(v);return D.some(!0)},onEscape:(v,C)=>sl.isOpen(v)?(sl.close(v),D.some(!0)):D.none()}),Po.config({})]),events:Ry(D.some(v=>{f(v,u,ji.HighlightMenuAndItem).get(Ke)})),eventOrder:{...n.eventOrder,[di()]:["disabling","toggling","alloy.base.behaviour"]},apis:p,domModification:{attributes:{"aria-haspopup":n.listRole.getOr("true"),...n.role.fold(()=>({}),v=>({role:v})),...n.dom.tag==="button"?{type:St(n.dom,"attributes").bind(v=>St(v,"type")).getOr("button")}:{}}}}},apis:{open:(n,r)=>n.open(r),refetch:(n,r)=>n.refetch(r),expand:(n,r)=>n.expand(r),close:(n,r)=>n.close(r),isOpen:(n,r)=>n.isOpen(r),repositionMenus:(n,r)=>n.repositionMenus(r)}}),uO=(n,r,i)=>{d3(n).each(l=>{var u;((f,p)=>{Fs(p.element,"id").each(y=>wo(f.element,"aria-activedescendant",y))})(l,i),(_n((u=r).element,ev)?D.some(u.element):Ys(u.element,"."+ev)).each(f=>{Fs(f,"id").each(p=>wo(l.element,"aria-controls",p))})}),wo(i.element,"aria-selected","true")},S6=(n,r,i)=>{wo(i.element,"aria-selected","false")},bb=n=>kr.getExistingCoupled(n,"sandbox").bind(Q0).map(u3).map(r=>r.fetchPattern).getOr("");var mv;(function(n){n[n.ContentFocus=0]="ContentFocus",n[n.UiFocus=1]="UiFocus"})(mv||(mv={}));const E6=(n,r,i,l,u)=>{const f=i.shared.providers,p=v=>u?{...v,shortcut:D.none(),icon:v.text.isSome()?D.none():v.icon}:v;switch(n.type){case"menuitem":return(y=n,Ms("menuitem",A3,y)).fold(Em,v=>D.some(((C,O,A,R=!0)=>{const F=iv({presets:"normal",iconContent:C.icon,textContent:C.text,htmlContent:D.none(),ariaLabel:C.text,caret:D.none(),checkMark:D.none(),shortcutContent:C.shortcut},A,R);return Uy({data:Zy(C),getApi:$=>({isEnabled:()=>!Fo.isDisabled($),setEnabled:G=>Fo.set($,!G)}),enabled:C.enabled,onAction:C.onAction,onSetup:C.onSetup,triggersSubmenu:!1,itemBehaviours:[]},F,O,A)})(p(v),r,f,l)));case"nestedmenuitem":return(v=>Ms("nestedmenuitem",T3,v))(n).fold(Em,v=>D.some(((C,O,A,R=!0,F=!1)=>{const $=F?(G=A.icons,uC("chevron-down",G,[Y2])):(ae=>uC("chevron-right",ae,[Y2]))(A.icons);var G;const J=iv({presets:"normal",iconContent:C.icon,textContent:C.text,htmlContent:D.none(),ariaLabel:C.text,caret:D.some($),checkMark:D.none(),shortcutContent:C.shortcut},A,R);return Uy({data:Zy(C),getApi:ae=>({isEnabled:()=>!Fo.isDisabled(ae),setEnabled:X=>Fo.set(ae,!X),setIconFill:(X,Y)=>{Ys(ae.element,`svg path[class="${X}"], rect[class="${X}"]`).each(ne=>{wo(ne,"fill",Y)})},setTooltip:X=>{const Y=A.translate(X);wo(ae.element,"aria-label",Y)}}),enabled:C.enabled,onAction:Ke,onSetup:C.onSetup,triggersSubmenu:!0,itemBehaviours:[]},J,O,A)})(p(v),r,f,l,u)));case"togglemenuitem":return(v=>Ms("togglemenuitem",m6,v))(n).fold(Em,v=>D.some(((C,O,A,R=!0)=>{const F=iv({iconContent:C.icon,textContent:C.text,htmlContent:D.none(),ariaLabel:C.text,checkMark:D.some(L3(A.icons)),caret:D.none(),shortcutContent:C.shortcut,presets:"normal",meta:C.meta},A,R);return ls(Uy({data:Zy(C),enabled:C.enabled,getApi:$=>({setActive:G=>{No.set($,G)},isActive:()=>No.isOn($),isEnabled:()=>!Fo.isDisabled($),setEnabled:G=>Fo.set($,!G)}),onAction:C.onAction,onSetup:C.onSetup,triggersSubmenu:!1,itemBehaviours:[]},F,O,A),{toggling:{toggleClass:o3,toggleOnExecute:!1,selected:C.active},role:C.role.getOrUndefined()})})(p(v),r,f,l)));case"separator":return(v=>Ms("separatormenuitem",y3,v))(n).fold(Em,v=>D.some(rO(v)));case"fancymenuitem":return(v=>Ms("fancymenuitem",E3,v))(n).fold(Em,v=>((C,O)=>St(sO,C.fancytype).map(A=>A(C,O)))(v,i));default:return console.error("Unknown item in general menu",n),D.none()}var y},Pg=(n,r,i,l,u,f,p)=>{const y=l===1,v=!y||ov(n);return bi(pt(n,C=>{switch(C.type){case"separator":return(O=C,Ms("Autocompleter.Separator",y3,O)).fold(Em,A=>D.some(rO(A)));case"cardmenuitem":return(A=>Ms("cardmenuitem",f6,A))(C).fold(Em,A=>D.some(((R,F,$,G)=>{const J={dom:B3(R.label),optComponents:[D.some({dom:{tag:"div",classes:[X0,J0]},components:pC(R.items,G)})]};return Uy({data:Zy({text:D.none(),...R}),enabled:R.enabled,getApi:ae=>({isEnabled:()=>!Fo.isDisabled(ae),setEnabled:X=>{Fo.set(ae,!X),$t(fa(ae.element,"*"),Y=>{ae.getSystem().getByDom(Y).each(ne=>{ne.hasConfigured(Fo)&&Fo.set(ne,!X)})})}}),onAction:R.onAction,onSetup:R.onSetup,triggersSubmenu:!1,itemBehaviours:D.from(G.itemBehaviours).getOr([])},J,F,$.providers)})({...A,onAction:R=>{A.onAction(R),i(A.value,A.meta)}},u,f,{itemBehaviours:P3(A.meta,f,D.none()),cardText:{matchText:r,highlightOn:p}})));default:return(A=>Ms("Autocompleter.Item",o6,A))(C).fold(Em,A=>D.some(((R,F,$,G,J,ae,X,Y=!0)=>{const ne=iv({presets:G,textContent:D.none(),htmlContent:$?R.text.map(de=>mC(de,F)):D.none(),ariaLabel:R.text,iconContent:R.icon,shortcutContent:D.none(),checkMark:D.none(),caret:D.none(),value:R.value},X.providers,Y,R.icon),ie=R.text.filter(de=>!$&&de!=="");return Uy({data:Zy(R),enabled:R.enabled,getApi:ue({}),onAction:de=>J(R.value,R.meta),onSetup:ue(Ke),triggersSubmenu:!1,itemBehaviours:P3(R,X,ie)},ne,ae,X.providers)})(A,r,y,"normal",i,u,f,v)))}var O}))},fO=(n,r,i,l,u,f)=>{const p=ov(r),y=bi(pt(r,C=>{const O=A=>E6(A,i,l,(R=>u?!Vo(R,"text"):p)(A),u);return C.type==="nestedmenuitem"&&C.getSubmenuItems().length<=0?O({...C,enabled:!1}):O(C)})),v=(C=>C.searchMode==="no-search"?{menuType:"normal"}:{menuType:"searchable",searchMode:C})(f);return(u?JM:Q2)(n,p,y,1,v)},FC=n=>Op.singleData(n.value,n),Kd=n=>cf(Vt(n.startContainer),n.startOffset,Vt(n.endContainer),n.endOffset),mO=(n,r)=>{const i=Xt("autocompleter"),l=so(!1),u=so(!1),f=Nn(),p=La(or.sketch({dom:{tag:"div",classes:["tox-autocompleter"],attributes:{id:i}},components:[],fireDismissalEventInstead:{},inlineBehaviours:xt([en("dismissAutocompleter",[Xe(Ju(),()=>A()),Xe(ag(),($,G)=>{Fs(G.event.target,"id").each(J=>wo(Vt(n.getBody()),"aria-activedescendant",J))})])]),lazySink:r.getSink})),y=()=>or.isOpen(p),v=u.get,C=()=>{if(y()){or.hide(p),n.dom.remove(i,!1);const $=Vt(n.getBody());Fs($,"aria-owns").filter(G=>G===i).each(()=>{pn($,"aria-owns"),pn($,"aria-activedescendant")})}},O=()=>or.getContent(p).bind($=>Bt($.components(),0)),A=()=>n.execCommand("mceAutocompleterClose"),R=$=>{const G=(J=>{const ae=ko(J,X=>D.from(X.columns)).getOr(1);return Sn(J,X=>{const Y=X.items;return Pg(Y,X.matchText,(ne,ie)=>{const de={hide:()=>A(),reload:we=>{C(),n.execCommand("mceAutocompleterReload",!1,{fetchOptions:we})}};n.execCommand("mceAutocompleterRefreshActiveRange"),f.get().each(we=>{l.set(!0),X.onAction(de,we,ne,ie),l.set(!1)})},ae,Cf.BUBBLE_TO_SANDBOX,r,X.highlightOn)})})($);G.length>0?(((J,ae)=>{const X=ko(J,Y=>D.from(Y.columns)).getOr(1);or.showMenuAt(p,{anchor:{type:"selection",getSelection:()=>f.get().map(Kd),root:Vt(n.getBody())}},((Y,ne,ie,de)=>{const we=uv(ne,de),ze=ib(de);return{data:FC({...Y,movement:we,menuBehaviours:rv(ne!=="auto"?[]:[Ss((tt,Je)=>{dC(tt,4,ze.item).each(({numColumns:Ze,numRows:kt})=>{po.setGridSize(tt,kt,Ze)})})])}),menu:{markers:ib(de),fakeFocus:ie===mv.ContentFocus}}})(Q2("autocompleter-value",!0,ae,X,{menuType:"normal"}),X,mv.ContentFocus,"normal")),O().each(ss.highlightFirst)})($,G),wo(Vt(n.getBody()),"aria-owns",i),n.inline||F()):C()},F=()=>{n.dom.get(i)&&n.dom.remove(i,!1);const $=n.getDoc().documentElement,G=n.selection.getNode(),J=(ae=>cp(ae,!0))(p.element);Li(J,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",top:`${G.offsetTop}px`,left:`${G.offsetLeft}px`}),n.dom.add($,J.dom),Ys(J,'[role="menu"]').each(ae=>{Vn(ae,"position"),Vn(ae,"max-height")})};n.on("AutocompleterStart",({lookupData:$})=>{u.set(!0),l.set(!1),R($)}),n.on("AutocompleterUpdate",({lookupData:$})=>R($)),n.on("AutocompleterUpdateActiveRange",({range:$})=>f.set($)),n.on("AutocompleterEnd",()=>{C(),u.set(!1),l.set(!1),f.clear()}),(($,G)=>{const J=(X,Y)=>{lo(X,Ws(),{raw:Y})},ae=()=>$.getMenu().bind(ss.getHighlighted);G.on("keydown",X=>{const Y=X.which;$.isActive()&&($.isMenuOpen()?Y===13?(ae().each(Ld),X.preventDefault()):Y===40?(ae().fold(()=>{$.getMenu().each(ss.highlightFirst)},ne=>{J(ne,X)}),X.preventDefault(),X.stopImmediatePropagation()):Y!==37&&Y!==38&&Y!==39||ae().each(ne=>{J(ne,X),X.preventDefault(),X.stopImmediatePropagation()}):Y!==13&&Y!==38&&Y!==40||$.cancelIfNecessary())}),G.on("NodeChange",()=>{!$.isActive()||$.isProcessingAction()||G.queryCommandState("mceAutoCompleterInRange")||$.cancelIfNecessary()})})({cancelIfNecessary:A,isMenuOpen:y,isActive:v,isProcessingAction:l.get,getMenu:O},n)},Xy=(n,r,i)=>Id(n,r,i).isSome(),HC=(n,r)=>{let i=null;return{cancel:()=>{i!==null&&(clearTimeout(i),i=null)},schedule:(...l)=>{i=setTimeout(()=>{n.apply(null,l),i=null},r)}}},pO=n=>{const r=n.raw;return r.touches===void 0||r.touches.length!==1?D.none():D.some(r.touches[0])},Vx=(n,r)=>{const i={stopBackspace:!0,...r},l=(A=>{const R=Nn(),F=so(!1),$=HC(J=>{A.triggerEvent(R1(),J),F.set(!0)},400),G=Xi([{key:P(),value:J=>(pO(J).each(ae=>{$.cancel();const X={x:ae.clientX,y:ae.clientY,target:J.target};$.schedule(J),F.set(!1),R.set(X)}),D.none())},{key:q(),value:J=>($.cancel(),pO(J).each(ae=>{R.on(X=>{((Y,ne)=>{const ie=Math.abs(Y.clientX-ne.x),de=Math.abs(Y.clientY-ne.y);return ie>5||de>5})(ae,X)&&R.clear()})}),D.none())},{key:ge(),value:J=>($.cancel(),R.get().filter(ae=>$n(ae.target,J.target)).map(ae=>F.get()?(J.prevent(),!1):A.triggerEvent(Ac(),J)))}]);return{fireIfReady:(J,ae)=>St(G,ae).bind(X=>X(J))}})(i),u=pt(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),A=>Ai(n,A,R=>{l.fireIfReady(R,A).each(F=>{F&&R.kill()}),i.triggerEvent(A,R)&&R.kill()})),f=Nn(),p=Ai(n,"paste",A=>{l.fireIfReady(A,"paste").each(R=>{R&&A.kill()}),i.triggerEvent("paste",A)&&A.kill(),f.set(setTimeout(()=>{i.triggerEvent(Kf(),A)},0))}),y=Ai(n,"keydown",A=>{i.triggerEvent("keydown",A)?A.kill():i.stopBackspace&&(R=>R.raw.which===BT[0]&&!Ge(["input","textarea"],ni(R.target))&&!Xy(R.target,'[contenteditable="true"]'))(A)&&A.prevent()}),v=Ai(n,"focusin",A=>{i.triggerEvent("focusin",A)&&A.kill()}),C=Nn(),O=Ai(n,"focusout",A=>{i.triggerEvent("focusout",A)&&A.kill(),C.set(setTimeout(()=>{i.triggerEvent(qf(),A)},0))});return{unbind:()=>{$t(u,A=>{A.unbind()}),y.unbind(),v.unbind(),O.unbind(),p.unbind(),f.on(clearTimeout),C.on(clearTimeout)}}},$C=(n,r)=>{const i=St(n,"target").getOr(r);return so(i)},pv=Si([{stopped:[]},{resume:["element"]},{complete:[]}]),gO=(n,r,i,l,u,f)=>{const p=n(r,l),y=((v,C)=>{const O=so(!1),A=so(!1);return{stop:()=>{O.set(!0)},cut:()=>{A.set(!0)},isStopped:O.get,isCut:A.get,event:v,setSource:C.set,getSource:C.get}})(i,u);return p.fold(()=>(f.logEventNoHandlers(r,l),pv.complete()),v=>{const C=v.descHandler;return j1(C)(y),y.isStopped()?(f.logEventStopped(r,v.element,C.purpose),pv.stopped()):y.isCut()?(f.logEventCut(r,v.element,C.purpose),pv.complete()):$r(v.element).fold(()=>(f.logNoParent(r,v.element,C.purpose),pv.complete()),O=>(f.logEventResponse(r,v.element,C.purpose),pv.resume(O)))})},gv=(n,r,i,l,u,f)=>gO(n,r,i,l,u,f).fold(Gt,p=>gv(n,r,i,p,u,f),Fe),jx=(n,r,i,l,u)=>{const f=$C(i,l);return gv(n,r,i,l,f,u)},hO=()=>{const n=(()=>{const l={};return{registerId:(u,f,p)=>{rs(p,(y,v)=>{const C=l[v]!==void 0?l[v]:{};C[f]=((O,A)=>({cHandler:ot.apply(void 0,[O.handler].concat(A)),purpose:O.purpose}))(y,u),l[v]=C})},unregisterId:u=>{rs(l,(f,p)=>{Vo(f,u)&&delete f[u]})},filterByType:u=>St(l,u).map(f=>Is(f,(p,y)=>((v,C)=>({id:v,descHandler:C}))(y,p))).getOr([]),find:(u,f,p)=>St(l,f).bind(y=>Xc(p,v=>((C,O)=>mp(O).bind(A=>St(C,A)).map(A=>((R,F)=>({element:R,descHandler:F}))(O,A)))(y,v),u))}})(),r={},i=l=>{mp(l.element).each(u=>{delete r[u],n.unregisterId(u)})};return{find:(l,u,f)=>n.find(l,u,f),filter:l=>n.filterByType(l),register:l=>{const u=(p=>{const y=p.element;return mp(y).getOrThunk(()=>((v,C)=>{const O=Xt(Xb+"uid-");return Jb(C,O),O})(0,p.element))})(l);an(r,u)&&((p,y)=>{const v=r[y];if(v!==p)throw new Error('The tagId "'+y+'" is already used by: '+ku(v.element)+` +Cannot use it for: `+ku(p.element)+` +The conflicting element is`+(Vr(v.element)?" ":" not ")+"already in the DOM");i(p)})(l,u);const f=[l];n.registerId(f,u,l.events),r[u]=l},unregister:i,getById:l=>St(r,l)}},Mu=ld({name:"Container",factory:n=>{const{attributes:r,...i}=n.dom;return{uid:n.uid,dom:{tag:"div",attributes:{role:"presentation",...r},...i},components:n.components,behaviours:To(n.containerBehaviours),events:n.events,domModification:n.domModification,eventOrder:n.eventOrder}},configFields:[Ne("components",[]),Jt("containerBehaviours",[]),Ne("events",{}),Ne("domModification",{}),Ne("eventOrder",{})]}),Ux=n=>{const r=J=>$r(n.element).fold(Gt,ae=>$n(J,ae)),i=hO(),l=(J,ae)=>i.find(r,J,ae),u=Vx(n.element,{triggerEvent:(J,ae)=>yh(J,ae.target,X=>((Y,ne,ie,de)=>jx(Y,ne,ie,ie.target,de))(l,J,ae,X))}),f={debugInfo:ue("real"),triggerEvent:(J,ae,X)=>{yh(J,ae,Y=>jx(l,J,X,ae,Y))},triggerFocus:(J,ae)=>{mp(J).fold(()=>{Ei(J)},X=>{yh(Jc(),J,Y=>(((ne,ie,de,we,ze)=>{const tt=$C(de,we);gO(ne,ie,de,we,tt,ze)})(l,Jc(),{originator:ae,kill:Ke,prevent:Ke,target:J},J,Y),!1))})},triggerEscape:(J,ae)=>{f.triggerEvent("keydown",J.element,ae.event)},getByUid:J=>$(J),getByDom:J=>G(J),build:La,buildOrPatch:sy,addToGui:J=>{v(J)},removeFromGui:J=>{C(J)},addToWorld:J=>{p(J)},removeFromWorld:J=>{y(J)},broadcast:J=>{A(J)},broadcastOn:(J,ae)=>{R(J,ae)},broadcastEvent:(J,ae)=>{F(J,ae)},isConnected:Gt},p=J=>{J.connect(f),ga(J.element)||(i.register(J),$t(J.components(),p),f.triggerEvent(Nd(),J.element,{target:J.element}))},y=J=>{ga(J.element)||($t(J.components(),y),i.unregister(J)),J.disconnect()},v=J=>{hf(n,J)},C=J=>{$i(J)},O=J=>{const ae=i.filter(Ii());$t(ae,X=>{const Y=X.descHandler;j1(Y)(J)})},A=J=>{O({universal:!0,data:J})},R=(J,ae)=>{O({universal:!1,channels:J,data:ae})},F=(J,ae)=>((X,Y,ne)=>{const ie=(de=>{const we=so(!1);return{stop:()=>{we.set(!0)},cut:Ke,isStopped:we.get,isCut:Fe,event:de,setSource:ln("Cannot set source of a broadcasted event"),getSource:ln("Cannot get source of a broadcasted event")}})(Y);return $t(X,de=>{const we=de.descHandler;j1(we)(ie)}),ie.isStopped()})(i.filter(J),ae),$=J=>i.getById(J).fold(()=>un.error(new Error('Could not find component with uid: "'+J+'" in system.')),un.value),G=J=>{const ae=mp(J).getOr("not found");return $(ae)};return p(n),{root:n,element:n.element,destroy:()=>{u.unbind(),aa(n.element)},add:v,remove:C,getByUid:$,getByDom:G,addToWorld:p,removeFromWorld:y,broadcast:A,broadcastOn:R,broadcastEvent:F}},A6=ue([Ne("prefix","form-field"),Jt("fieldBehaviours",[In,Le])]),VC=ue([id({schema:[nt("dom")],name:"label"}),id({factory:{sketch:n=>({uid:n.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:n.text}})},schema:[nt("text")],name:"aria-descriptor"}),nl({factory:{sketch:n=>{const r=((i,l)=>{const u={};return rs(i,(f,p)=>{Ge(l,p)||(u[p]=f)}),u})(n,["factory"]);return n.factory.sketch(r)}},schema:[nt("factory")],name:"field"})]),cs=pl({name:"FormField",configFields:A6(),partFields:VC(),factory:(n,r,i,l)=>{const u=Xo(n.fieldBehaviours,[In.config({find:y=>Ts(y,n,"field")}),Le.config({store:{mode:"manual",getValue:y=>In.getCurrent(y).bind(Le.getValue),setValue:(y,v)=>{In.getCurrent(y).each(C=>{Le.setValue(C,v)})}}})]),f=$o([Ss((y,v)=>{const C=xT(y,n,["label","field","aria-descriptor"]);C.field().each(O=>{const A=Xt(n.prefix);C.label().each(R=>{wo(R.element,"for",A),wo(O.element,"id",A)}),C["aria-descriptor"]().each(R=>{const F=Xt(n.prefix);wo(R.element,"id",F),wo(O.element,"aria-describedby",F)})})})]),p={getField:y=>Ts(y,n,"field"),getLabel:y=>Ts(y,n,"label")};return{uid:n.uid,dom:n.dom,components:r,behaviours:u,events:f,apis:p}},apis:{getField:(n,r)=>n.getField(r),getLabel:(n,r)=>n.getLabel(r)}});var T6=tinymce.util.Tools.resolve("tinymce.html.Entities");const hv=(n,r,i,l)=>{const u=O6(n,r,i,l);return cs.sketch(u)},O6=(n,r,i,l)=>({dom:Zx(i),components:n.toArray().concat([r]),fieldBehaviours:xt(l)}),Zx=n=>({tag:"div",classes:["tox-form__group"].concat(n)}),Ig=(n,r)=>cs.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[wr(r.translate(n))]}),Ui=Xt("form-component-change"),Fg=Xt("form-close"),Pp=Xt("form-cancel"),Ef=Xt("form-action"),bv=Xt("form-submit"),jC=Xt("form-block"),UC=Xt("form-unblock"),bO=Xt("form-tabchange"),Wx=Xt("form-resize"),yO=(n,r,i)=>{const l=n.label.map(A=>Ig(A,r)),u=r.icons(),f=A=>(R,F)=>{Id(F.event.target,"[data-collection-item-value]").each($=>{A(R,F,$,yr($,"data-collection-item-value"))})},p=f((A,R,F,$)=>{R.stop(),r.isDisabled()||lo(A,Ef,{name:n.name,value:$})}),y=[Xe(io(),f((A,R,F)=>{Ei(F)})),Xe(Mr(),p),Xe(Ac(),p),Xe(Wn(),f((A,R,F)=>{Ys(A.element,"."+Sm).each($=>{co($,Sm)}),At(F,Sm)})),Xe(sr(),f(A=>{Ys(A.element,"."+Sm).each(R=>{co(R,Sm),Eh(R)})})),Ml(f((A,R,F,$)=>{lo(A,Ef,{name:n.name,value:$})}))],v=(A,R)=>pt(fa(A.element,".tox-collection__item"),R),C=cs.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(n.columns!==1?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:Ct},behaviours:xt([Fo.config({disabled:r.isDisabled,onDisabled:A=>{v(A,R=>{At(R,"tox-collection__item--state-disabled"),wo(R,"aria-disabled",!0)})},onEnabled:A=>{v(A,R=>{co(R,"tox-collection__item--state-disabled"),pn(R,"aria-disabled")})}}),Ca(),So.config({}),Pr.config({...r.tooltips.getConfig({tooltipText:"",onShow:A=>{Ys(A.element,"."+Sm+"[data-mce-tooltip]").each(R=>{Fs(R,"data-mce-tooltip").each(F=>{Pr.setComponents(A,r.tooltips.getComponents({tooltipText:F}))})})}}),mode:"children-keyboard-focus",anchor:A=>({type:"node",node:Ys(A.element,"."+Sm).orThunk(()=>Zc(".tox-collection__item")),root:A.element,layouts:{onLtr:ue([Ar,ir,mr,Lr,pr,us]),onRtl:ue([Ar,ir,mr,Lr,pr,us])},bubble:nc(0,-2,{})})}),Le.config({store:{mode:"memory",initialValue:i.getOr([])},onSetValue:(A,R)=>{((F,$)=>{const G=pt($,X=>{const Y=jd.translate(X.text),ne=n.columns===1?`
    ${Y}
    `:"",ie=`
    ${(ze=>{var tt;return(tt=u[ze])!==null&&tt!==void 0?tt:ze})(X.icon)}
    `,de={_:" "," - ":" ","-":" "},we=Y.replace(/\_| \- |\-/g,ze=>de[ze]);return`
    ${ie}${ne}
    `}),J=n.columns!=="auto"&&n.columns>1?Ht(G,n.columns):[G],ae=pt(J,X=>`
    ${X.join("")}
    `);lp(F.element,ae.join(""))})(A,R),n.columns==="auto"&&dC(A,5,"tox-collection__item").each(({numRows:F,numColumns:$})=>{po.setGridSize(A,F,$)}),Qo(A,Wx)}}),ws.config({}),po.config((O=n.columns,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:".tox-collection__group",cell:`.${wx}`}})),en("collection-events",y)]),eventOrder:{[di()]:["disabling","alloy.base.behaviour","collection-events"],[Wn()]:["collection-events","tooltipping"]}});var O;return hv(l,C,["tox-form__group--collection"],[])},vO=["input","textarea"],qx=n=>{const r=ni(n);return Ge(vO,r)},_O=(n,r)=>{const i=r.getRoot(n).getOr(n.element);co(i,r.invalidClass),r.notify.each(l=>{qx(n.element)&&wo(n.element,"aria-invalid",!1),l.getContainer(n).each(u=>{lp(u,l.validHtml)}),l.onValid(n)})},ZC=(n,r,i,l)=>{const u=r.getRoot(n).getOr(n.element);At(u,r.invalidClass),r.notify.each(f=>{qx(n.element)&&wo(n.element,"aria-invalid",!0),f.getContainer(n).each(p=>{lp(p,l)}),f.onInvalid(n,l)})},xO=(n,r,i)=>r.validator.fold(()=>Tm(un.value(!0)),l=>l.validate(n)),WC=(n,r,i)=>(r.notify.each(l=>{l.onValidate(n)}),xO(n,r).map(l=>n.getSystem().isConnected()?l.fold(u=>(ZC(n,r,0,u),un.error(u)),u=>(_O(n,r),un.value(u))):un.error("No longer in system")));var z6=Object.freeze({__proto__:null,markValid:_O,markInvalid:ZC,query:xO,run:WC,isInvalid:(n,r)=>{const i=r.getRoot(n).getOr(n.element);return _n(i,r.invalidClass)}}),wO=Object.freeze({__proto__:null,events:(n,r)=>n.validator.map(i=>$o([Xe(i.onEvent,l=>{WC(l,n).get(Ct)})].concat(i.validateOnLoad?[Ss(l=>{WC(l,n).get(Ke)})]:[]))).getOr({})}),N6=[nt("invalidClass"),Ne("getRoot",D.none),Zs("notify",[Ne("aria","alert"),Ne("getContainer",D.none),Ne("validHtml",""),Dn("onValid"),Dn("onInvalid"),Dn("onValidate")]),Zs("validator",[nt("validate"),Ne("onEvent","input"),Ne("validateOnLoad",!0)])];const Om=Qr({fields:N6,name:"invalidating",active:wO,apis:z6,extra:{validation:n=>r=>{const i=Le.getValue(r);return Tm(n(i))}}}),yb=Qr({fields:[],name:"unselecting",active:Object.freeze({__proto__:null,events:()=>$o([Qu(Ma(),Gt)]),exhibit:()=>ar({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})})}),qC=Xt("color-input-change"),KC=Xt("color-swatch-change"),kO=Xt("color-picker-cancel"),GC=id({schema:[nt("dom")],name:"label"}),Hg=n=>id({name:n+"-edge",overrides:r=>r.model.manager.edgeActions[n].fold(()=>({}),i=>({events:$o([ig(P(),(l,u,f)=>i(l,f),[r]),ig(at(),(l,u,f)=>i(l,f),[r]),ig(xo(),(l,u,f)=>{f.mouseIsDown.get()&&i(l,f)},[r])])}))}),D6=Hg("top-left"),R6=Hg("top"),M6=Hg("top-right"),L6=Hg("right"),CO=Hg("bottom-right"),YC=Hg("bottom"),B6=Hg("bottom-left"),Kx=Hg("left"),P6=nl({name:"thumb",defaults:ue({dom:{styles:{position:"absolute"}}}),overrides:n=>({events:$o([em(P(),n,"spectrum"),em(q(),n,"spectrum"),em(ge(),n,"spectrum"),em(at(),n,"spectrum"),em(xo(),n,"spectrum"),em(Lo(),n,"spectrum")])})}),Gx=n=>_m(n.event);var I6=[GC,Kx,L6,R6,YC,D6,M6,B6,CO,P6,nl({schema:[ca("mouseIsDown",()=>so(!1))],name:"spectrum",overrides:n=>{const r=n.model.manager,i=(l,u)=>r.getValueFromEvent(u).map(f=>r.setValueFrom(l,n,f));return{behaviours:xt([po.config({mode:"special",onLeft:(l,u)=>r.onLeft(l,n,Gx(u)),onRight:(l,u)=>r.onRight(l,n,Gx(u)),onUp:(l,u)=>r.onUp(l,n,Gx(u)),onDown:(l,u)=>r.onDown(l,n,Gx(u))}),ws.config({}),Po.config({})]),events:$o([Xe(P(),i),Xe(q(),i),Xe(at(),i),Xe(xo(),(l,u)=>{n.mouseIsDown.get()&&i(l,u)})])}}})];const yv=ue("slider.change.value"),XC=n=>{const r=n.event.raw;if((i=>i.type.indexOf("touch")!==-1)(r)){const i=r;return i.touches!==void 0&&i.touches.length===1?D.some(i.touches[0]).map(l=>pe(l.clientX,l.clientY)):D.none()}{const i=r;return i.clientX!==void 0?D.some(i).map(l=>pe(l.clientX,l.clientY)):D.none()}},vb=n=>n.model.minX,$g=n=>n.model.minY,Yx=n=>n.model.minX-1,Xx=n=>n.model.minY-1,Ip=n=>n.model.maxX,Gd=n=>n.model.maxY,Jx=n=>n.model.maxX+1,Qx=n=>n.model.maxY+1,ew=(n,r,i)=>r(n)-i(n),tw=n=>ew(n,Ip,vb),JC=n=>ew(n,Gd,$g),SO=n=>tw(n)/2,QC=n=>JC(n)/2,Jy=(n,r)=>r?n.stepSize*n.speedMultiplier:n.stepSize,eS=n=>n.snapToGrid,tS=n=>n.snapStart,ow=n=>n.rounded,nw=(n,r)=>n[r+"-edge"]!==void 0,oS=n=>nw(n,"left"),EO=n=>nw(n,"right"),Qy=n=>nw(n,"top"),AO=n=>nw(n,"bottom"),Fp=n=>n.model.value.get(),zm=(n,r)=>({x:n,y:r}),md=(n,r)=>{lo(n,yv(),{value:r})},nS=(n,r,i,l)=>ni?i:n===r?r-1:Math.max(r,n-l),vv=(n,r,i,l)=>n>i?n:nMath.max(r,Math.min(i,n)),OO=n=>{const{min:r,max:i,range:l,value:u,step:f,snap:p,snapStart:y,rounded:v,hasMinEdge:C,hasMaxEdge:O,minBound:A,maxBound:R,screenRange:F}=n,$=C?r-1:r,G=O?i+1:i;if(uR)return G;{const J=((X,Y,ne)=>Math.min(ne,Math.max(X,Y))-Y)(u,A,R),ae=TO(J/F*l+r,$,G);return p&&ae>=r&&ae<=i?((X,Y,ne,ie,de)=>de.fold(()=>{const we=X-Y,ze=Math.round(we/ie)*ie;return TO(Y+ze,Y-1,ne+1)},we=>{const ze=(X-we)%ie,tt=Math.round(ze/ie),Je=Math.floor((X-we)/ie),Ze=Math.floor((ne-we)/ie),kt=we+Math.min(Ze,Je+tt)*ie;return Math.max(we,kt)}))(ae,r,i,f,y):v?Math.round(ae):ae}},sw=n=>{const{min:r,max:i,range:l,value:u,hasMinEdge:f,hasMaxEdge:p,maxBound:y,maxOffset:v,centerMinEdge:C,centerMaxEdge:O}=n;return ui?p?y:O:(u-r)/l*v},sS="top",zO="right",NO="bottom",rS="left",Nm=n=>n.element.dom.getBoundingClientRect(),Lu=(n,r)=>n[r],rw=n=>{const r=Nm(n);return Lu(r,rS)},DO=n=>{const r=Nm(n);return Lu(r,zO)},aw=n=>{const r=Nm(n);return Lu(r,sS)},RO=n=>{const r=Nm(n);return Lu(r,NO)},MO=n=>{const r=Nm(n);return Lu(r,"width")},LO=n=>{const r=Nm(n);return Lu(r,"height")},iw=(n,r,i)=>(n+r)/2-i,BO=(n,r)=>{const i=Nm(n),l=Nm(r),u=Lu(i,rS),f=Lu(i,zO),p=Lu(l,rS);return iw(u,f,p)},PO=(n,r)=>{const i=Nm(n),l=Nm(r),u=Lu(i,sS),f=Lu(i,NO),p=Lu(l,sS);return iw(u,f,p)},lw=(n,r)=>{lo(n,yv(),{value:r})},cw=(n,r,i)=>{const l={min:vb(r),max:Ip(r),range:tw(r),value:i,step:Jy(r),snap:eS(r),snapStart:tS(r),rounded:ow(r),hasMinEdge:oS(r),hasMaxEdge:EO(r),minBound:rw(n),maxBound:DO(n),screenRange:MO(n)};return OO(l)},IO=n=>(r,i,l)=>((u,f,p,y)=>{const v=(u>0?vv:nS)(Fp(p),vb(p),Ip(p),Jy(p,y));return lw(f,v),D.some(v)})(n,r,i,l).map(Gt),aS=(n,r,i,l,u,f)=>{const p=((y,v,C,O,A)=>{const R=MO(y),F=O.bind(J=>D.some(BO(J,y))).getOr(0),$=A.bind(J=>D.some(BO(J,y))).getOr(R),G={min:vb(v),max:Ip(v),range:tw(v),value:C,hasMinEdge:oS(v),hasMaxEdge:EO(v),minBound:rw(y),minOffset:0,maxBound:DO(y),maxOffset:R,centerMinEdge:F,centerMaxEdge:$};return sw(G)})(r,f,i,l,u);return rw(r)-rw(n)+p},F6=IO(-1),H6=IO(1),$6=D.none,V6=D.none,iS={"top-left":D.none(),top:D.none(),"top-right":D.none(),right:D.some((n,r)=>{md(n,Jx(r))}),"bottom-right":D.none(),bottom:D.none(),"bottom-left":D.none(),left:D.some((n,r)=>{md(n,Yx(r))})};var j6=Object.freeze({__proto__:null,setValueFrom:(n,r,i)=>{const l=cw(n,r,i);return lw(n,l),l},setToMin:(n,r)=>{const i=vb(r);lw(n,i)},setToMax:(n,r)=>{const i=Ip(r);lw(n,i)},findValueOfOffset:cw,getValueFromEvent:n=>XC(n).map(r=>r.left),findPositionOfValue:aS,setPositionFromValue:(n,r,i,l)=>{const u=Fp(i),f=aS(n,l.getSpectrum(n),u,l.getLeftEdge(n),l.getRightEdge(n),i),p=Go(r.element)/2;Mo(r.element,"left",f-p+"px")},onLeft:F6,onRight:H6,onUp:$6,onDown:V6,edgeActions:iS});const dw=(n,r)=>{lo(n,yv(),{value:r})},lS=(n,r,i)=>{const l={min:$g(r),max:Gd(r),range:JC(r),value:i,step:Jy(r),snap:eS(r),snapStart:tS(r),rounded:ow(r),hasMinEdge:Qy(r),hasMaxEdge:AO(r),minBound:aw(n),maxBound:RO(n),screenRange:LO(n)};return OO(l)},FO=n=>(r,i,l)=>((u,f,p,y)=>{const v=(u>0?vv:nS)(Fp(p),$g(p),Gd(p),Jy(p,y));return dw(f,v),D.some(v)})(n,r,i,l).map(Gt),cS=(n,r,i,l,u,f)=>{const p=((y,v,C,O,A)=>{const R=LO(y),F=O.bind(J=>D.some(PO(J,y))).getOr(0),$=A.bind(J=>D.some(PO(J,y))).getOr(R),G={min:$g(v),max:Gd(v),range:JC(v),value:C,hasMinEdge:Qy(v),hasMaxEdge:AO(v),minBound:aw(y),minOffset:0,maxBound:RO(y),maxOffset:R,centerMinEdge:F,centerMaxEdge:$};return sw(G)})(r,f,i,l,u);return aw(r)-aw(n)+p},U6=D.none,Z6=D.none,W6=FO(-1),q6=FO(1),K6={"top-left":D.none(),top:D.some((n,r)=>{md(n,Xx(r))}),"top-right":D.none(),right:D.none(),"bottom-right":D.none(),bottom:D.some((n,r)=>{md(n,Qx(r))}),"bottom-left":D.none(),left:D.none()};var G6=Object.freeze({__proto__:null,setValueFrom:(n,r,i)=>{const l=lS(n,r,i);return dw(n,l),l},setToMin:(n,r)=>{const i=$g(r);dw(n,i)},setToMax:(n,r)=>{const i=Gd(r);dw(n,i)},findValueOfOffset:lS,getValueFromEvent:n=>XC(n).map(r=>r.top),findPositionOfValue:cS,setPositionFromValue:(n,r,i,l)=>{const u=Fp(i),f=cS(n,l.getSpectrum(n),u,l.getTopEdge(n),l.getBottomEdge(n),i),p=Ds(r.element)/2;Mo(r.element,"top",f-p+"px")},onLeft:U6,onRight:Z6,onUp:W6,onDown:q6,edgeActions:K6});const uw=(n,r)=>{lo(n,yv(),{value:r})},fw=(n,r)=>({x:n,y:r}),_b=(n,r)=>(i,l,u)=>((f,p,y,v,C)=>{const O=f>0?vv:nS,A=p?Fp(v).x:O(Fp(v).x,vb(v),Ip(v),Jy(v,C)),R=p?O(Fp(v).y,$g(v),Gd(v),Jy(v,C)):Fp(v).y;return uw(y,fw(A,R)),D.some(A)})(n,r,i,l,u).map(Gt),Y6=_b(-1,!1),dS=_b(1,!1),X6=_b(-1,!0),J6=_b(1,!0),Q6={"top-left":D.some((n,r)=>{md(n,zm(Yx(r),Xx(r)))}),top:D.some((n,r)=>{md(n,zm(SO(r),Xx(r)))}),"top-right":D.some((n,r)=>{md(n,zm(Jx(r),Xx(r)))}),right:D.some((n,r)=>{md(n,zm(Jx(r),QC(r)))}),"bottom-right":D.some((n,r)=>{md(n,zm(Jx(r),Qx(r)))}),bottom:D.some((n,r)=>{md(n,zm(SO(r),Qx(r)))}),"bottom-left":D.some((n,r)=>{md(n,zm(Yx(r),Qx(r)))}),left:D.some((n,r)=>{md(n,zm(Yx(r),QC(r)))})};var HO=Object.freeze({__proto__:null,setValueFrom:(n,r,i)=>{const l=cw(n,r,i.left),u=lS(n,r,i.top),f=fw(l,u);return uw(n,f),f},setToMin:(n,r)=>{const i=vb(r),l=$g(r);uw(n,fw(i,l))},setToMax:(n,r)=>{const i=Ip(r),l=Gd(r);uw(n,fw(i,l))},getValueFromEvent:n=>XC(n),setPositionFromValue:(n,r,i,l)=>{const u=Fp(i),f=aS(n,l.getSpectrum(n),u.x,l.getLeftEdge(n),l.getRightEdge(n),i),p=cS(n,l.getSpectrum(n),u.y,l.getTopEdge(n),l.getBottomEdge(n),i),y=Go(r.element)/2,v=Ds(r.element)/2;Mo(r.element,"left",f-y+"px"),Mo(r.element,"top",p-v+"px")},onLeft:Y6,onRight:dS,onUp:X6,onDown:J6,edgeActions:Q6});const Bu=pl({name:"Slider",configFields:[Ne("stepSize",1),Ne("speedMultiplier",10),Ne("onChange",Ke),Ne("onChoose",Ke),Ne("onInit",Ke),Ne("onDragStart",Ke),Ne("onDragEnd",Ke),Ne("snapToGrid",!1),Ne("rounded",!0),vn("snapStart"),Xr("model",_r("mode",{x:[Ne("minX",0),Ne("maxX",100),ca("value",n=>so(n.mode.minX)),nt("getInitialValue"),Es("manager",j6)],y:[Ne("minY",0),Ne("maxY",100),ca("value",n=>so(n.mode.minY)),nt("getInitialValue"),Es("manager",G6)],xy:[Ne("minX",0),Ne("maxX",100),Ne("minY",0),Ne("maxY",100),ca("value",n=>so({x:n.mode.minX,y:n.mode.minY})),nt("getInitialValue"),Es("manager",HO)]})),Jt("sliderBehaviours",[po,Le]),ca("mouseIsDown",()=>so(!1))],partFields:I6,factory:(n,r,i,l)=>{const u=X=>Tp(X,n,"thumb"),f=X=>Tp(X,n,"spectrum"),p=X=>Ts(X,n,"left-edge"),y=X=>Ts(X,n,"right-edge"),v=X=>Ts(X,n,"top-edge"),C=X=>Ts(X,n,"bottom-edge"),O=n.model,A=O.manager,R=(X,Y)=>{A.setPositionFromValue(X,Y,n,{getLeftEdge:p,getRightEdge:y,getTopEdge:v,getBottomEdge:C,getSpectrum:f})},F=(X,Y)=>{O.value.set(Y);const ne=u(X);R(X,ne)},$=X=>{const Y=n.mouseIsDown.get();n.mouseIsDown.set(!1),Y&&Ts(X,n,"thumb").each(ne=>{const ie=O.value.get();n.onChoose(X,ne,ie)})},G=(X,Y)=>{Y.stop(),n.mouseIsDown.set(!0),n.onDragStart(X,u(X))},J=(X,Y)=>{Y.stop(),n.onDragEnd(X,u(X)),$(X)},ae=X=>{Ts(X,n,"spectrum").map(po.focusIn)};return{uid:n.uid,dom:n.dom,components:r,behaviours:Xo(n.sliderBehaviours,[po.config({mode:"special",focusIn:ae}),Le.config({store:{mode:"manual",getValue:X=>O.value.get(),setValue:F}}),tl.config({channels:{[B()]:{onReceive:$}}})]),events:$o([Xe(yv(),(X,Y)=>{((ne,ie)=>{F(ne,ie);const de=u(ne);n.onChange(ne,de,ie)})(X,Y.event.value)}),Ss((X,Y)=>{const ne=O.getInitialValue();O.value.set(ne);const ie=u(X);R(X,ie);const de=f(X);n.onInit(X,ie,de,O.value.get())}),Xe(P(),G),Xe(ge(),J),Xe(at(),(X,Y)=>{ae(X),G(X,Y)}),Xe(Lo(),J)]),apis:{resetToMin:X=>{A.setToMin(X,n)},resetToMax:X=>{A.setToMax(X,n)},setValue:F,refresh:R},domModification:{styles:{position:"relative"}}}},apis:{setValue:(n,r,i)=>{n.setValue(r,i)},resetToMin:(n,r)=>{n.resetToMin(r)},resetToMax:(n,r)=>{n.resetToMax(r)},refresh:(n,r)=>{n.refresh(r)}}}),_v=Xt("rgb-hex-update"),mw=Xt("slider-update"),uS=Xt("palette-update"),pw="form",gw=[Jt("formBehaviours",[Le])],fS=n=>"",Dm=(n,r)=>({uid:n.uid,dom:n.dom,components:r,behaviours:Xo(n.formBehaviours,[Le.config({store:{mode:"manual",getValue:i=>{const l=o2(i,n);return Zn(l,(u,f)=>u().bind(p=>{return y=In.getCurrent(p),v=new Error(`Cannot find a current component to extract the value from for form part '${f}': `+ku(p.element)),y.fold(()=>un.error(v),un.value);var y,v}).map(Le.getValue))},setValue:(i,l)=>{rs(l,(u,f)=>{Ts(i,n,f).each(p=>{In.getCurrent(p).each(y=>{Le.setValue(y,u)})})})}}})]),apis:{getField:(i,l)=>Ts(i,n,l).bind(In.getCurrent)}}),Vg={getField:ty((n,r,i)=>n.getField(r,i)),sketch:n=>{const r=(()=>{const f=[];return{field:(p,y)=>(f.push(p),Qk(pw,fS(p),y)),record:ue(f)}})(),i=n(r),l=r.record(),u=pt(l,f=>nl({name:f,pname:fS(f)}));return h0(pw,gw,u,Dm,i)}},$O=Xt("valid-input"),VO=Xt("invalid-input"),jO=Xt("validating-input"),mS="colorcustom.rgb.",xv={isEnabled:Gt,setEnabled:Ke,immediatelyShow:Ke,immediatelyHide:Ke},eL=(n,r,i,l,u,f)=>{const p=(F,$)=>{const G=$.get();F!==G.isEnabled()&&(G.setEnabled(F),F?G.immediatelyShow():G.immediatelyHide())},y=(F,$,G)=>Om.config({invalidClass:r("invalid"),notify:{onValidate:J=>{lo(J,jO,{type:F})},onValid:J=>{p(!1,G),lo(J,$O,{type:F,value:Le.getValue(J)})},onInvalid:J=>{p(!0,G),lo(J,VO,{type:F,value:Le.getValue(J)})}},validator:{validate:J=>{const ae=Le.getValue(J),X=$(ae)?un.value(!0):un.error(n("aria.input.invalid"));return Tm(X)},validateOnLoad:!1}}),v=(F,$,G,J,ae)=>{const X=so(xv),Y=n(mS+"range"),ne=cs.parts.label({dom:{tag:"label",attributes:{"aria-label":J}},components:[wr(G)]}),ie=cs.parts.field({data:ae,factory:Rp,inputAttributes:{type:"text",...$==="hex"?{"aria-live":"polite"}:{}},inputClasses:[r("textfield")],inputBehaviours:xt([y($,F,X),ws.config({}),Pr.config({...u({tooltipText:"",onSetup:Ze=>{X.set({isEnabled:()=>Pr.isEnabled(Ze),setEnabled:kt=>Pr.setEnabled(Ze,kt),immediatelyShow:()=>Pr.immediateOpenClose(Ze,!0),immediatelyHide:()=>Pr.immediateOpenClose(Ze,!1)}),Pr.setEnabled(Ze,!1)},onShow:(Ze,kt)=>{Pr.setComponents(Ze,[{dom:{tag:"p",classes:[r("rgb-warning-note")]},components:[wr(n($==="hex"?"colorcustom.rgb.invalidHex":"colorcustom.rgb.invalid"))]}])}})})]),onSetValue:Ze=>{Om.isInvalid(Ze)&&Om.run(Ze).get(Ke)}}),de=Xt("aria-invalid"),we=ns(f("invalid",D.some(de),"warning")),ze=[ne,ie,ns({dom:{tag:"div",classes:[r("invalid-icon")]},components:[we.asSpec()]}).asSpec()],tt=$!=="hex"?[cs.parts["aria-descriptor"]({text:Y})]:[],Je=ze.concat(tt);return{dom:{tag:"div",attributes:{role:"presentation"},classes:[r("rgb-container")]},components:Je}},C=(F,$)=>{const G=$.red,J=$.green,ae=$.blue;Le.setValue(F,{red:G,green:J,blue:ae})},O=ns({dom:{tag:"div",classes:[r("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),A=(F,$)=>{O.getOpt(F).each(G=>{Mo(G.element,"background-color","#"+$.value)})};return ld({factory:()=>{const F={red:so(D.some(255)),green:so(D.some(255)),blue:so(D.some(255)),hex:so(D.some("ffffff"))},$=ze=>F[ze].get(),G=(ze,tt)=>{F[ze].set(tt)},J=ze=>{const tt=ze.red,Je=ze.green,Ze=ze.blue;G("red",D.some(tt)),G("green",D.some(Je)),G("blue",D.some(Ze))},ae=(ze,tt)=>{const Je=tt.event;Je.type!=="hex"?G(Je.type,D.none()):l(ze)},X=(ze,tt)=>{const Je=tt.event;(Ze=>Ze.type==="hex")(Je)?((Ze,kt)=>{i(Ze);const Wt=gC(kt);G("hex",D.some(Wt.value));const ro=Ru(Wt);C(Ze,ro),J(ro),lo(Ze,_v,{hex:Wt}),A(Ze,Wt)})(ze,Je.value):((Ze,kt,Wt)=>{const ro=parseInt(Wt,10);G(kt,D.some(ro)),$("red").bind(yo=>$("green").bind(Ho=>$("blue").map(xn=>Bp(yo,Ho,xn,1)))).each(yo=>{const Ho=((xn,Bs)=>{const Xs=lv(Bs);return Vg.getField(xn,"hex").each(on=>{Po.isFocused(on)||Le.setValue(xn,{hex:Xs.value})}),Xs})(Ze,yo);lo(Ze,_v,{hex:Ho}),A(Ze,Ho)})})(ze,Je.type,Je.value)},Y=ze=>({label:n(mS+ze+".label"),description:n(mS+ze+".description")}),ne=Y("red"),ie=Y("green"),de=Y("blue"),we=Y("hex");return ls(Vg.sketch(ze=>({dom:{tag:"form",classes:[r("rgb-form")],attributes:{"aria-label":n("aria.color.picker")}},components:[ze.field("red",cs.sketch(v(cv,"red",ne.label,ne.description,255))),ze.field("green",cs.sketch(v(cv,"green",ie.label,ie.description,255))),ze.field("blue",cs.sketch(v(cv,"blue",de.label,de.description,255))),ze.field("hex",cs.sketch(v(I3,"hex",we.label,we.description,"ffffff"))),O.asSpec()],formBehaviours:xt([Om.config({invalidClass:r("form-invalid")}),en("rgb-form-events",[Xe($O,X),Xe(VO,ae),Xe(jO,ae)])])})),{apis:{updateHex:(ze,tt)=>{Le.setValue(ze,{hex:tt.value}),((Je,Ze)=>{const kt=Ru(Ze);C(Je,kt),J(kt)})(ze,tt),A(ze,tt)}}})},name:"RgbForm",configFields:[],apis:{updateHex:(F,$,G)=>{F.updateHex($,G)}},extraApis:{}})},UO=(n,r,i,l)=>ld({name:"ColourPicker",configFields:[nt("dom"),Ne("onValidHex",Ke),Ne("onInvalidHex",Ke)],factory:f=>{const p=eL(n,r,f.onValidHex,f.onInvalidHex,i,l),y=((ae,X)=>{const Y=Bu.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[X("sv-palette-spectrum")]}}),ne=Bu.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[X("sv-palette-thumb")],innerHtml:``}}),ie=(de,we)=>{const{width:ze,height:tt}=de,Je=de.getContext("2d");if(Je===null)return;Je.fillStyle=we,Je.fillRect(0,0,ze,tt);const Ze=Je.createLinearGradient(0,0,ze,0);Ze.addColorStop(0,"rgba(255,255,255,1)"),Ze.addColorStop(1,"rgba(255,255,255,0)"),Je.fillStyle=Ze,Je.fillRect(0,0,ze,tt);const kt=Je.createLinearGradient(0,0,0,tt);kt.addColorStop(0,"rgba(0,0,0,0)"),kt.addColorStop(1,"rgba(0,0,0,1)"),Je.fillStyle=kt,Je.fillRect(0,0,ze,tt)};return ld({factory:de=>{const we=ue({x:0,y:0}),ze=xt([In.config({find:D.some}),Po.config({})]);return Bu.sketch({dom:{tag:"div",attributes:{role:"slider","aria-valuetext":ae(["Saturation {0}%, Brightness {1}%",0,0])},classes:[X("sv-palette")]},model:{mode:"xy",getInitialValue:we},rounded:!1,components:[Y,ne],onChange:(tt,Je,Ze)=>{Lt(Ze)||wo(tt.element,"aria-valuetext",ae(["Saturation {0}%, Brightness {1}%",Math.floor(Ze.x),Math.floor(100-Ze.y)])),lo(tt,uS,{value:Ze})},onInit:(tt,Je,Ze,kt)=>{ie(Ze.element.dom,V3(j3))},sliderBehaviours:ze})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:(de,we,ze)=>{((tt,Je)=>{const Ze=tt.components()[0].element.dom,kt=Ky(Je,100,100),Wt=$3(kt);ie(Ze,V3(Wt))})(we,ze)},setThumb:(de,we,ze)=>{((tt,Je)=>{const Ze=Bx(Ru(Je));Bu.setValue(tt,{x:Ze.saturation,y:100-Ze.value}),wo(tt.element,"aria-valuetext",ae(["Saturation {0}%, Brightness {1}%",Ze.saturation,Ze.value]))})(we,ze)}},extraApis:{}})})(n,r),v={paletteRgba:so(j3),paletteHue:so(0)},C=ns(((ae,X)=>{const Y=Bu.parts.spectrum({dom:{tag:"div",classes:[X("hue-slider-spectrum")],attributes:{role:"presentation"}}}),ne=Bu.parts.thumb({dom:{tag:"div",classes:[X("hue-slider-thumb")],attributes:{role:"presentation"}}});return Bu.sketch({dom:{tag:"div",classes:[X("hue-slider")],attributes:{role:"slider","aria-valuemin":0,"aria-valuemax":360,"aria-valuenow":120}},rounded:!1,model:{mode:"y",getInitialValue:ue(0)},components:[Y,ne],sliderBehaviours:xt([Po.config({})]),onChange:(ie,de,we)=>{wo(ie.element,"aria-valuenow",Math.floor(360-3.6*we)),lo(ie,mw,{value:we})}})})(0,r)),O=ns(y.sketch({})),A=ns(p.sketch({})),R=(ae,X,Y)=>{O.getOpt(ae).each(ne=>{y.setHue(ne,Y)})},F=(ae,X)=>{A.getOpt(ae).each(Y=>{p.updateHex(Y,X)})},$=(ae,X,Y)=>{C.getOpt(ae).each(ne=>{Bu.setValue(ne,(ie=>100-ie/360*100)(Y))})},G=(ae,X)=>{O.getOpt(ae).each(Y=>{y.setThumb(Y,X)})},J=(ae,X,Y,ne)=>{((ie,de)=>{const we=Ru(ie);v.paletteRgba.set(we),v.paletteHue.set(de)})(X,Y),$t(ne,ie=>{ie(ae,X,Y)})};return{uid:f.uid,dom:f.dom,components:[O.asSpec(),C.asSpec(),A.asSpec()],behaviours:xt([en("colour-picker-events",[Xe(_v,(()=>{const ae=[R,$,G];return(X,Y)=>{const ne=Y.event.hex,ie=(de=>Bx(Ru(de)))(ne);J(X,ne,ie.hue,ae)}})()),Xe(uS,(()=>{const ae=[F];return(X,Y)=>{const ne=Y.event.value,ie=v.paletteHue.get(),de=Ky(ie,ne.x,100-ne.y),we=Px(de);J(X,we,ie,ae)}})()),Xe(mw,(()=>{const ae=[R,F];return(X,Y)=>{const ne=(tt=>(100-tt)/100*360)(Y.event.value),ie=v.paletteRgba.get(),de=Bx(ie),we=Ky(ne,de.saturation,de.value),ze=Px(we);J(X,ze,ne,ae)}})())]),In.config({find:ae=>A.getOpt(ae)}),po.config({mode:"acyclic"})])}}}),Rm=()=>In.config({find:D.some}),pS=n=>In.config({find:r=>vs(r.element,n).bind(i=>r.getSystem().getByDom(i).toOptional())}),gS=ho([Ne("preprocess",Ct),Ne("postprocess",Ct)]),hS=(n,r)=>{const i=la("RepresentingConfigs.memento processors",gS,r);return Le.config({store:{mode:"manual",getValue:l=>{const u=n.get(l),f=Le.getValue(u);return i.postprocess(f)},setValue:(l,u)=>{const f=i.preprocess(u),p=n.get(l);Le.setValue(p,f)}}})},xb=(n,r,i)=>Le.config({store:{mode:"manual",...n.map(l=>({initialValue:l})).getOr({}),getValue:r,setValue:i}}),bS=(n,r,i)=>xb(n,l=>r(l.element),(l,u)=>i(l.element,u)),wv=n=>Le.config({store:{mode:"memory",initialValue:n}}),tL={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","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"};var ZO=tinymce.util.Tools.resolve("tinymce.Resource");const yS=n=>Vo(n,"init");var Hp=tinymce.util.Tools.resolve("tinymce.util.Tools");const vS=(n,r)=>{let i=null;const l=()=>{We(i)||(clearTimeout(i),i=null)};return{cancel:l,throttle:(...u)=>{l(),i=setTimeout(()=>{i=null,n.apply(null,u)},r)}}},_S=Xt("alloy-fake-before-tabstop"),xS=Xt("alloy-fake-after-tabstop"),WO=n=>({dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:n},behaviours:xt([Po.config({ignore:!0}),ws.config({})])}),wS=(n,r)=>({dom:{tag:"div",classes:["tox-navobj",...n.getOr([])]},components:[WO([_S]),r,WO([xS])],behaviours:xt([pS(1)])}),kS=(n,r)=>{lo(n,Ws(),{raw:{which:9,shiftKey:r}})},oL=(n,r)=>{const i=r.element;_n(i,_S)?kS(n,!0):_n(i,xS)&&kS(n,!1)},e1=n=>Xy(n,["."+_S,"."+xS].join(","),Fe),jg=Xt("update-dialog"),CS=Xt("update-title"),qO=Xt("update-body"),KO=Xt("update-footer"),SS=Xt("body-send-message"),hw=Xt("dialog-focus-shifted"),ES=Yr().browser,t1=ES.isSafari(),GO=ES.isFirefox(),AS=t1||GO,YO=ES.isChromium(),nL=({scrollTop:n,scrollHeight:r,clientHeight:i})=>Math.ceil(n)+i>=r,XO=(n,r)=>n.scrollTo(0,r==="bottom"?99999999:r),TS=(n,r,i)=>{const l=n.dom;D.from(l.contentDocument).fold(i,u=>{let f=0;const p=((v,C)=>{const O=v.body;return D.from(!/^1))?O:v.documentElement)})(u,r).map(v=>(f=v.scrollTop,v)).forall(nL),y=()=>{const v=l.contentWindow;st(v)&&(p?XO(v,"bottom"):!p&&AS&&f!==0&&XO(v,f))};t1&&l.addEventListener("load",y,{once:!0}),u.open(),u.write(r),u.close(),t1||y()})},OS=nn(AS,t1?500:200).map(n=>((r,i)=>{let l=null,u=null;return{cancel:()=>{We(l)||(clearTimeout(l),l=null,u=null)},throttle:(...f)=>{u=f,We(l)&&(l=setTimeout(()=>{const p=u;l=null,u=null,r.apply(null,p)},i))}}})(TS,n)),bw=Xt("toolbar.button.execute"),Ug=Xt("common-button-display-events"),zS={[di()]:["disabling","alloy.base.behaviour","toggling","toolbar-button-events","tooltipping"],[ka()]:["toolbar-button-events",Ug],[Nl()]:["toolbar-button-events","dropdown-events","tooltipping"],[at()]:["focusing","alloy.base.behaviour",Ug]},yw=n=>Mo(n.element,"width",Ns(n.element,"width")),JO=(n,r,i)=>Hc(n,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:i},r),kv=(n,r)=>JO(n,r,[]),Zg=(n,r)=>JO(n,r,[So.config({})]),NS=(n,r,i)=>({dom:{tag:"span",classes:[`${r}__select-label`]},components:[wr(i.translate(n))],behaviours:xt([So.config({})])}),pd=Xt("update-menu-text"),Yd=Xt("update-menu-icon"),DS=(n,r,i,l)=>{const u=so(Ke),f=n.text.map(G=>ns(NS(G,r,i.providers))),p=n.icon.map(G=>ns(Zg(G,i.providers.icons))),y=(G,J)=>{const ae=Le.getValue(G);return Po.focus(ae),lo(ae,"keydown",{raw:J.event.raw}),sl.close(ae),D.some(!0)},v=n.role.fold(()=>({}),G=>({role:G})),C=D.from(n.listRole).map(G=>({listRole:G})).getOr({}),O=n.ariaLabel.fold(()=>({}),G=>({"aria-label":i.providers.translate(G)})),A=Hc("chevron-down",{tag:"div",classes:[`${r}__select-chevron`]},i.providers.icons),R=Xt("common-button-display-events"),F="dropdown-events";return ns(sl.sketch({...n.uid?{uid:n.uid}:{},...v,...C,dom:{tag:"button",classes:[r,`${r}--select`].concat(pt(n.classes,G=>`${r}--${G}`)),attributes:{...O,...st(l)?{"data-mce-name":l}:{}}},components:jy([p.map(G=>G.asSpec()),f.map(G=>G.asSpec()),D.some(A)]),matchWidth:!0,useMinWidth:!0,onOpen:(G,J,ae)=>{n.searchable&&(X=>{d3(X).each(Y=>Po.focus(Y))})(ae)},dropdownBehaviours:xt([...n.dropdownBehaviours,pi(()=>n.disabled||i.providers.isDisabled()),Ca(),yb.config({}),So.config({}),...n.tooltip.map(G=>Pr.config(i.providers.tooltips.getConfig({tooltipText:i.providers.translate(G)}))).toArray(),en(F,[Lg(n,u),Mp(n,u)]),en(R,[Ss((G,J)=>n.listRole==="listbox"?Ke:yw(G))]),en("menubutton-update-display-text",[Xe(pd,(G,J)=>{f.bind(ae=>ae.getOpt(G)).each(ae=>{So.set(ae,[wr(i.providers.translate(J.event.text))])})}),Xe(Yd,(G,J)=>{p.bind(ae=>ae.getOpt(G)).each(ae=>{So.set(ae,[Zg(J.event.icon,i.providers.icons)])})})])]),eventOrder:ls(zS,{[at()]:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"],[ka()]:["toolbar-button-events",Pr.name(),F,R]}),sandboxBehaviours:xt([po.config({mode:"special",onLeft:y,onRight:y}),en("dropdown-sandbox-events",[Xe(i3,(G,J)=>{(ae=>{const X=Le.getValue(ae),Y=Q0(ae).map(u3);sl.refetch(X).get(()=>{const ne=kr.getCoupled(X,"sandbox");Y.each(ie=>Q0(ne).each(de=>((we,ze)=>{Le.setValue(we,ze.fetchPattern),we.element.dom.selectionStart=ze.selectionStart,we.element.dom.selectionEnd=ze.selectionEnd})(de,ie)))})})(G),J.stop()}),Xe(l3,(G,J)=>{((ae,X)=>{(Y=>x.getState(Y).bind(ss.getHighlighted).bind(ss.getHighlighted))(ae).each(Y=>{((ne,ie,de,we)=>{const ze={...we,target:ie};ne.getSystem().triggerEvent(de,ie,ze)})(ae,Y.element,X.event.eventType,X.event.interactionEvent)})})(G,J),J.stop()})])]),lazySink:i.getSink,toggleClass:`${r}--active`,parts:{menu:{...kx(0,n.columns,n.presets),fakeFocus:n.searchable,...n.listRole==="listbox"?{}:{onHighlightItem:uO,onCollapseMenu:(G,J,ae)=>{ss.getHighlighted(ae).each(X=>{uO(G,ae,X)})},onDehighlightItem:S6}}},getAnchorOverrides:()=>({maxHeightFunction:(G,J)=>{mm()(G,J-10)}}),fetch:G=>Bg(ot(n.fetch,G))})).asSpec()},vw=n=>n.type==="separator",_w={type:"separator"},QO=(n,r)=>{const i=((l,u)=>{const f=zo(l,(p,y)=>(v=>te(v))(y)?y===""?p:y==="|"?p.length>0&&!vw(p[p.length-1])?p.concat([_w]):p:Vo(u,y.toLowerCase())?p.concat([u[y.toLowerCase()]]):p:p.concat([y]),[]);return f.length>0&&vw(f[f.length-1])&&f.pop(),f})(te(n)?n.split(" "):n,r);return fn(i,(l,u)=>{if((f=>Vo(f,"getSubmenuItems"))(u)){const f=(y=>{const v=St(y,"value").getOrThunk(()=>Xt("generated-menu-item"));return ls({value:v},y)})(u),p=((y,v)=>{const C=y.getSubmenuItems(),O=QO(C,v);return{item:y,menus:ls(O.menus,{[y.value]:O.items}),expansions:ls(O.expansions,{[y.value]:y.value})}})(f,r);return{menus:ls(l.menus,p.menus),items:[p.item,...l.items],expansions:ls(l.expansions,p.expansions)}}return{...l,items:[u,...l.items]}},{menus:{},expansions:{},items:[]})},wb=(n,r,i,l)=>{const u=Xt("primary-menu"),f=QO(n,i.shared.providers.menuItems());if(f.items.length===0)return D.none();const p=(A=>A.search.fold(()=>({searchMode:"no-search"}),R=>({searchMode:"search-with-field",placeholder:R.placeholder})))(l),y=fO(u,f.items,r,i,l.isHorizontalMenu,p),v=(A=>A.search.fold(()=>({searchMode:"no-search"}),R=>({searchMode:"search-with-results"})))(l),C=Zn(f.menus,(A,R)=>fO(R,A,r,i,!1,v)),O=ls(C,ci(u,y));return D.from(Op.tieredData(u,O,f.expansions))},Cv=n=>!Vo(n,"items"),RS="data-value",xw=(n,r,i,l,u)=>pt(i,f=>Cv(f)?{type:"togglemenuitem",...u?{}:{role:"option"},text:f.text,value:f.value,active:f.value===l,onAction:()=>{Le.setValue(n,f.value),lo(n,Ui,{name:r}),Po.focus(n)}}:{type:"nestedmenuitem",text:f.text,getSubmenuItems:()=>xw(n,r,f.items,l,u)}),ww=(n,r)=>ko(n,i=>Cv(i)?nn(i.value===r,i):ww(i.items,r)),sL=ld({name:"HtmlSelect",configFields:[nt("options"),Jt("selectBehaviours",[Po,Le]),Ne("selectClasses",[]),Ne("selectAttributes",{}),vn("data")],factory:(n,r)=>{const i=pt(n.options,u=>({dom:{tag:"option",value:u.value,innerHtml:u.text}})),l=n.data.map(u=>ci("initialValue",u)).getOr({});return{uid:n.uid,dom:{tag:"select",classes:n.selectClasses,attributes:n.selectAttributes},components:i,behaviours:Xo(n.selectBehaviours,[Po.config({}),Le.config({store:{mode:"manual",getValue:u=>sf(u.element),setValue:(u,f)=>{const p=yt(n.options);j(n.options,y=>y.value===f).isSome()?am(u.element,f):u.element.dom.selectedIndex===-1&&f===""&&p.each(y=>am(u.element,y.value))},...l}})])}}}),ez=ue([Ne("field1Name","field1"),Ne("field2Name","field2"),Pd("onLockedChange"),fp(["lockClass"]),Ne("locked",!1),Io("coupledFieldBehaviours",[In,Le])]),MS=(n,r)=>nl({factory:cs,name:n,overrides:i=>({fieldBehaviours:xt([en("coupled-input-behaviour",[Xe(gu(),l=>{((u,f,p)=>Ts(u,f,p).bind(In.getCurrent))(l,i,r).each(u=>{Ts(l,i,"lock").each(f=>{No.isOn(f)&&i.onLockedChange(l,u,f)})})})])])})}),tz=ue([MS("field1","field2"),MS("field2","field1"),nl({factory:Oi,schema:[nt("dom")],name:"lock",overrides:n=>({buttonBehaviours:xt([No.config({selected:n.locked,toggleClass:n.markers.lockClass,aria:{mode:"pressed"}})])})})]),jc=pl({name:"FormCoupledInputs",configFields:ez(),partFields:tz(),factory:(n,r,i,l)=>({uid:n.uid,dom:n.dom,components:r,behaviours:Oo(n.coupledFieldBehaviours,[In.config({find:D.some}),Le.config({store:{mode:"manual",getValue:u=>{const f=n2(u,n,["field1","field2"]);return{[n.field1Name]:Le.getValue(f.field1()),[n.field2Name]:Le.getValue(f.field2())}},setValue:(u,f)=>{const p=n2(u,n,["field1","field2"]);an(f,n.field1Name)&&Le.setValue(p.field1(),f[n.field1Name]),an(f,n.field2Name)&&Le.setValue(p.field2(),f[n.field2Name])}}})]),apis:{getField1:u=>Ts(u,n,"field1"),getField2:u=>Ts(u,n,"field2"),getLock:u=>Ts(u,n,"lock")}}),apis:{getField1:(n,r)=>n.getField1(r),getField2:(n,r)=>n.getField2(r),getLock:(n,r)=>n.getLock(r)}}),LS=n=>{const r=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(n);if(r!==null){const i=parseFloat(r[1]),l=r[2];return un.value({value:i,unit:l})}return un.error(n)},BS=(n,r)=>{const i={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},l=u=>Vo(i,u);return n.unit===r?D.some(n.value):l(n.unit)&&l(r)?i[n.unit]===i[r]?D.some(n.value):D.some(n.value/i[n.unit]*i[r]):D.none()},PS=n=>D.none(),oz=(n,r)=>{const i=n.label.map(O=>Ig(O,r)),l=[Fo.config({disabled:()=>n.disabled||r.isDisabled()}),Ca(),po.config({mode:"execution",useEnter:n.multiline!==!0,useControlEnter:n.multiline===!0,execute:O=>(Qo(O,bv),D.some(!0))}),en("textfield-change",[Xe(gu(),(O,A)=>{lo(O,Ui,{name:n.name})}),Xe(Kf(),(O,A)=>{lo(O,Ui,{name:n.name})})]),ws.config({})],u=n.validation.map(O=>Om.config({getRoot:A=>ba(A.element),invalidClass:"tox-invalid",validator:{validate:A=>{const R=Le.getValue(A),F=O.validator(R);return Tm(F===!0?un.value(R):un.error(F))},validateOnLoad:O.validateOnLoad}})).toArray(),f={...n.placeholder.fold(ue({}),O=>({placeholder:r.translate(O)})),...n.inputMode.fold(ue({}),O=>({inputmode:O})),"data-mce-name":n.name},p=cs.parts.field({tag:n.multiline===!0?"textarea":"input",...n.data.map(O=>({data:O})).getOr({}),inputAttributes:f,inputClasses:[n.classname],inputBehaviours:xt(Cs([l,u])),selectOnFocus:!1,factory:Rp}),y=n.multiline?{dom:{tag:"div",classes:["tox-textarea-wrap"]},components:[p]}:p,v=(n.flex?["tox-form__group--stretched"]:[]).concat(n.maximized?["tox-form-group--maximize"]:[]),C=[Fo.config({disabled:()=>n.disabled||r.isDisabled(),onDisabled:O=>{cs.getField(O).each(Fo.disable)},onEnabled:O=>{cs.getField(O).each(Fo.enable)}}),Ca()];return hv(i,y,v,C)},Sv=(n,r)=>r.getAnimationRoot.fold(()=>n.element,i=>i(n)),$p=n=>n.dimension.property,Wg=(n,r)=>n.dimension.getDimension(r),qg=(n,r)=>{const i=Sv(n,r);Qn(i,[r.shrinkingClass,r.growingClass])},kw=(n,r)=>{co(n.element,r.openClass),At(n.element,r.closedClass),Mo(n.element,$p(r),"0px"),xl(n.element)},IS=(n,r)=>{co(n.element,r.closedClass),At(n.element,r.openClass),Vn(n.element,$p(r))},nz=(n,r,i,l)=>{i.setCollapsed(),Mo(n.element,$p(r),Wg(r,n.element)),qg(n,r),kw(n,r),r.onStartShrink(n),r.onShrunk(n)},rL=(n,r,i,l)=>{const u=l.getOrThunk(()=>Wg(r,n.element));i.setCollapsed(),Mo(n.element,$p(r),u),xl(n.element);const f=Sv(n,r);co(f,r.growingClass),At(f,r.shrinkingClass),kw(n,r),r.onStartShrink(n)},sz=(n,r,i)=>{const l=Wg(r,n.element);(l==="0px"?nz:rL)(n,r,i,D.some(l))},rz=(n,r,i)=>{const l=Sv(n,r),u=_n(l,r.shrinkingClass),f=Wg(r,n.element);IS(n,r);const p=Wg(r,n.element);(u?()=>{Mo(n.element,$p(r),f),xl(n.element)}:()=>{kw(n,r)})(),co(l,r.shrinkingClass),At(l,r.growingClass),IS(n,r),Mo(n.element,$p(r),p),i.setExpanded(),r.onStartGrow(n)},Ev=(n,r,i)=>{const l=Sv(n,r);return _n(l,r.growingClass)===!0},az=(n,r,i)=>{const l=Sv(n,r);return _n(l,r.shrinkingClass)===!0};var iz=Object.freeze({__proto__:null,refresh:(n,r,i)=>{if(i.isExpanded()){Vn(n.element,$p(r));const l=Wg(r,n.element);Mo(n.element,$p(r),l)}},grow:(n,r,i)=>{i.isExpanded()||rz(n,r,i)},shrink:(n,r,i)=>{i.isExpanded()&&sz(n,r,i)},immediateShrink:(n,r,i)=>{i.isExpanded()&&nz(n,r,i)},hasGrown:(n,r,i)=>i.isExpanded(),hasShrunk:(n,r,i)=>i.isCollapsed(),isGrowing:Ev,isShrinking:az,isTransitioning:(n,r,i)=>Ev(n,r)||az(n,r),toggleGrow:(n,r,i)=>{(i.isExpanded()?sz:rz)(n,r,i)},disableTransitions:qg,immediateGrow:(n,r,i)=>{i.isExpanded()||(IS(n,r),Mo(n.element,$p(r),Wg(r,n.element)),qg(n,r),i.setExpanded(),r.onStartGrow(n),r.onGrown(n))}}),aL=Object.freeze({__proto__:null,exhibit:(n,r,i)=>{const l=r.expanded;return ar(l?{classes:[r.openClass],styles:{}}:{classes:[r.closedClass],styles:ci(r.dimension.property,"0px")})},events:(n,r)=>$o([Bd(np(),(i,l)=>{l.event.raw.propertyName===n.dimension.property&&(qg(i,n),r.isExpanded()&&Vn(i.element,n.dimension.property),(r.isExpanded()?n.onGrown:n.onShrunk)(i))})])}),lz=[nt("closedClass"),nt("openClass"),nt("shrinkingClass"),nt("growingClass"),vn("getAnimationRoot"),Dn("onShrunk"),Dn("onStartShrink"),Dn("onGrown"),Dn("onStartGrow"),Ne("expanded",!1),Xr("dimension",_r("property",{width:[Es("property","width"),Es("getDimension",n=>Go(n)+"px")],height:[Es("property","height"),Es("getDimension",n=>Ds(n)+"px")]}))];const Il=Qr({fields:lz,name:"sliding",active:aL,apis:iz,state:Object.freeze({__proto__:null,init:n=>{const r=so(n.expanded);return Jr({isExpanded:()=>r.get()===!0,isCollapsed:()=>r.get()===!1,setCollapsed:ot(r.set,!1),setExpanded:ot(r.set,!0),readState:()=>"expanded: "+r.get()})}})}),cz=n=>({isEnabled:()=>!Fo.isDisabled(n),setEnabled:r=>Fo.set(n,!r),setActive:r=>{const i=n.element;r?(At(i,"tox-tbtn--enabled"),wo(i,"aria-pressed",!0)):(co(i,"tox-tbtn--enabled"),pn(i,"aria-pressed"))},isActive:()=>_n(n.element,"tox-tbtn--enabled"),setText:r=>{lo(n,pd,{text:r})},setIcon:r=>lo(n,Yd,{icon:r})}),o1=(n,r,i,l,u=!0,f)=>DS({text:n.text,icon:n.icon,tooltip:n.tooltip,ariaLabel:n.tooltip,searchable:n.search.isSome(),role:l,fetch:(p,y)=>{const v={pattern:n.search.isSome()?bb(p):""};n.fetch(C=>{y(wb(C,Cf.CLOSE_ON_EXECUTE,i,{isHorizontalMenu:!1,search:n.search}))},v,cz(p))},onSetup:n.onSetup,getApi:cz,columns:1,presets:"normal",classes:[],dropdownBehaviours:[...u?[ws.config({})]:[]]},r,i.shared,f),dz=(n,r,i)=>{const l=f=>p=>{const y=!p.isActive();p.setActive(y),f.storage.set(y),i.shared.getSink().each(v=>{r().getOpt(v).each(C=>{Ei(C.element),lo(C,Ef,{name:f.name,value:f.storage.get()})})})},u=f=>p=>{p.setActive(f.storage.get())};return f=>{f(pt(n,p=>{const y=p.text.fold(()=>({}),v=>({text:v}));return{type:p.type,active:!1,...y,onAction:l(p),onSetup:u(p)}}))}},FS=n=>({dom:{tag:"span",classes:["tox-tree__label"],attributes:{"aria-label":n}},components:[wr(n)]}),HS=Xt("leaf-label-event-id"),$S=({leaf:n,onLeafAction:r,visible:i,treeId:l,selectedId:u,backstage:f})=>{const p=n.menu.map(v=>o1(v,"tox-mbtn",f,D.none(),i)),y=[FS(n.title)];return p.each(v=>y.push(v)),Oi.sketch({dom:{tag:"div",classes:["tox-tree--leaf__label","tox-trbtn"].concat(i?["tox-tree--leaf__label--visible"]:[])},components:y,role:"treeitem",action:v=>{r(n.id),v.getSystem().broadcastOn([`update-active-item-${l}`],{value:n.id})},eventOrder:{[Ws()]:[HS,"keying"]},buttonBehaviours:xt([...i?[ws.config({})]:[],No.config({toggleClass:"tox-trbtn--enabled",toggleOnExecute:!1,aria:{mode:"selected"}}),tl.config({channels:{[`update-active-item-${l}`]:{onReceive:(v,C)=>{(C.value===n.id?No.on:No.off)(v)}}}}),en(HS,[Ss((v,C)=>{u.each(O=>{(O===n.id?No.on:No.off)(v)})}),Xe(Ws(),(v,C)=>{const O=C.event.raw.code==="ArrowLeft",A=C.event.raw.code==="ArrowRight";O?(lm(v.element,".tox-tree--directory").each(R=>{v.getSystem().getByDom(R).each(F=>{ay(R,".tox-tree--directory__label").each($=>{F.getSystem().getByDom($).each(Po.focus)})})}),C.stop()):A&&C.stop()})])])})},uz=Xt("directory-label-event-id"),iL=({directory:n,visible:r,noChildren:i,backstage:l})=>{const u=n.menu.map(C=>o1(C,"tox-mbtn",l,D.none())),f=[{dom:{tag:"div",classes:["tox-chevron"]},components:[(p="chevron-right",y=l.shared.providers.icons,((C,O,A)=>Hc(C,{tag:"span",classes:["tox-tree__icon-wrap","tox-icon"],behaviours:[]},O))(p,y))]},FS(n.title)];var p,y;u.each(C=>{f.push(C)});const v=C=>{lm(C.element,".tox-tree--directory").each(O=>{C.getSystem().getByDom(O).each(A=>{const R=!No.isOn(A);No.toggle(A),lo(C,"expand-tree-node",{expanded:R,node:n.id})})})};return Oi.sketch({dom:{tag:"div",classes:["tox-tree--directory__label","tox-trbtn"].concat(r?["tox-tree--directory__label--visible"]:[])},components:f,action:v,eventOrder:{[Ws()]:[uz,"keying"]},buttonBehaviours:xt([...r?[ws.config({})]:[],en(uz,[Xe(Ws(),(C,O)=>{const A=O.event.raw.code==="ArrowRight",R=O.event.raw.code==="ArrowLeft";A&&i&&O.stop(),(A||R)&&lm(C.element,".tox-tree--directory").each(F=>{C.getSystem().getByDom(F).each($=>{!No.isOn($)&&A||No.isOn($)&&R?(v(C),O.stop()):R&&!No.isOn($)&&(lm($.element,".tox-tree--directory").each(G=>{ay(G,".tox-tree--directory__label").each(J=>{$.getSystem().getByDom(J).each(Po.focus)})}),O.stop())})})})])])})},lL=({children:n,onLeafAction:r,visible:i,treeId:l,expandedIds:u,selectedId:f,backstage:p})=>({dom:{tag:"div",classes:["tox-tree--directory__children"]},components:n.map(y=>y.type==="leaf"?$S({leaf:y,selectedId:f,onLeafAction:r,visible:i,treeId:l,backstage:p}):Cw({directory:y,expandedIds:u,selectedId:f,onLeafAction:r,labelTabstopping:i,treeId:l,backstage:p})),behaviours:xt([Il.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:i}),So.config({})])}),fz=Xt("directory-event-id"),Cw=({directory:n,onLeafAction:r,labelTabstopping:i,treeId:l,backstage:u,expandedIds:f,selectedId:p})=>{const{children:y}=n,v=so(f),C=f.includes(n.id);return{dom:{tag:"div",classes:["tox-tree--directory"],attributes:{role:"treeitem"}},components:[iL({directory:n,visible:i,noChildren:n.children.length===0,backstage:u}),lL({children:y,expandedIds:f,selectedId:p,onLeafAction:r,visible:C,treeId:l,backstage:u})],behaviours:xt([en(fz,[Ss((O,A)=>{No.set(O,C)}),Xe("expand-tree-node",(O,A)=>{const{expanded:R,node:F}=A.event;v.set(R?[...v.get(),F]:v.get().filter($=>$!==F))})]),No.config({...n.children.length>0?{aria:{mode:"expanded"}}:{},toggleClass:"tox-tree--directory--expanded",onToggled:(O,A)=>{const R=O.components()[1],F=($=A,y.map(G=>G.type==="leaf"?$S({leaf:G,selectedId:p,onLeafAction:r,visible:$,treeId:l,backstage:u}):Cw({directory:G,expandedIds:v.get(),selectedId:p,onLeafAction:r,labelTabstopping:$,treeId:l,backstage:u})));var $;A?Il.grow(R):Il.shrink(R),So.set(R,F)}})])}},cL=Xt("tree-event-id");var dL=Object.freeze({__proto__:null,events:(n,r)=>{const i=n.stream.streams.setup(n,r);return $o([Xe(n.event,i),Tc(()=>r.cancel())].concat(n.cancelEvent.map(l=>[Xe(l,()=>r.cancel())]).getOr([])))}});const mz=n=>{const r=so(null);return Jr({readState:()=>({timer:r.get()!==null?"set":"unset"}),setTimer:i=>{r.set(i)},cancel:()=>{const i=r.get();i!==null&&i.cancel()}})};var uL=Object.freeze({__proto__:null,throttle:mz,init:n=>n.stream.streams.state(n)}),fL=[Xr("stream",_r("mode",{throttle:[nt("delay"),Ne("stopEvent",!0),Es("streams",{setup:(n,r)=>{const i=n.stream,l=vS(n.onStream,i.delay);return r.setTimer(l),(u,f)=>{l.throttle(u,f),i.stopEvent&&f.stop()}},state:mz})]})),Ne("event","input"),vn("cancelEvent"),Pd("onStream")];const VS=Qr({fields:fL,name:"streaming",active:dL,state:uL}),Sw=(n,r,i)=>{const l=Le.getValue(i);Le.setValue(r,l),jS(r)},Ew=(n,r)=>{const i=n.element,l=sf(i),u=i.dom;yr(i,"type")!=="number"&&r(u,l)},jS=n=>{Ew(n,(r,i)=>r.setSelectionRange(i.length,i.length))},US=ue("alloy.typeahead.itemexecute"),mL=ue([vn("lazySink"),nt("fetch"),Ne("minChars",5),Ne("responseTime",1e3),Dn("onOpen"),Ne("getHotspot",D.some),Ne("getAnchorOverrides",ue({})),Ne("layouts",D.none()),Ne("eventOrder",{}),wa("model",{},[Ne("getDisplayText",n=>n.meta!==void 0&&n.meta.text!==void 0?n.meta.text:n.value),Ne("selectsOver",!0),Ne("populateFromBrowse",!0)]),Dn("onSetValue"),Qi("onExecute"),Dn("onItemExecute"),Ne("inputClasses",[]),Ne("inputAttributes",{}),Ne("inputStyles",{}),Ne("matchWidth",!0),Ne("useMinWidth",!1),Ne("dismissOnBlur",!0),fp(["openClass"]),vn("initialData"),vn("listRole"),Jt("typeaheadBehaviours",[Po,Le,VS,po,No,kr]),ca("lazyTypeaheadComp",()=>so(D.none)),ca("previewing",()=>so(!0))].concat(GM()).concat(IC())),pz=ue([zu({schema:[up()],name:"menu",overrides:n=>({fakeFocus:!0,onHighlightItem:(r,i,l)=>{n.previewing.get()?n.lazyTypeaheadComp.get().each(u=>{((f,p,y)=>{if(f.selectsOver){const v=Le.getValue(p),C=f.getDisplayText(v),O=Le.getValue(y);return f.getDisplayText(O).indexOf(C)===0?D.some(()=>{Sw(0,p,y),((A,R)=>{Ew(A,(F,$)=>F.setSelectionRange(R,$.length))})(p,C.length)}):D.none()}return D.none()})(n.model,u,l).fold(()=>{n.model.selectsOver?(ss.dehighlight(i,l),n.previewing.set(!0)):n.previewing.set(!1)},f=>{f(),n.previewing.set(!1)})}):n.lazyTypeaheadComp.get().each(u=>{n.model.populateFromBrowse&&Sw(n.model,u,l),Fs(l.element,"id").each(f=>wo(u.element,"aria-activedescendant",f))})},onExecute:(r,i)=>n.lazyTypeaheadComp.get().map(l=>(lo(l,US(),{item:i}),!0)),onHover:(r,i)=>{n.previewing.set(!1),n.lazyTypeaheadComp.get().each(l=>{n.model.populateFromBrowse&&Sw(n.model,l,i)})}})})]),pL=pl({name:"Typeahead",configFields:mL(),partFields:pz(),factory:(n,r,i,l)=>{const u=(A,R,F)=>{n.previewing.set(!1);const $=kr.getCoupled(A,"sandbox");if(x.isOpen($))In.getCurrent($).each(G=>{ss.getHighlighted(G).fold(()=>{F(G)},()=>{Rl($,G.element,"keydown",R)})});else{const G=J=>{In.getCurrent(J).each(F)};$x(n,p(A),A,$,l,G,ji.HighlightMenuAndItem).get(Ke)}},f=YM(n),p=A=>R=>R.map(F=>{const $=ra(F.menus),G=Sn($,J=>cn(J.items,ae=>ae.type==="item"));return Le.getState(A).update(pt(G,J=>J.data)),F}),y=A=>In.getCurrent(A),v="typeaheadevents",C=[Po.config({}),Le.config({onSetValue:n.onSetValue,store:{mode:"dataset",getDataKey:A=>sf(A.element),getFallbackEntry:A=>({value:A,meta:{}}),setValue:(A,R)=>{am(A.element,n.model.getDisplayText(R))},...n.initialData.map(A=>ci("initialValue",A)).getOr({})}}),VS.config({stream:{mode:"throttle",delay:n.responseTime,stopEvent:!1},onStream:(A,R)=>{const F=kr.getCoupled(A,"sandbox");if(Po.isFocused(A)&&sf(A.element).length>=n.minChars){const $=y(F).bind(J=>ss.getHighlighted(J).map(Le.getValue));n.previewing.set(!0);const G=J=>{y(F).each(ae=>{$.fold(()=>{n.model.selectsOver&&ss.highlightFirst(ae)},X=>{ss.highlightBy(ae,Y=>Le.getValue(Y).value===X.value),ss.getHighlighted(ae).orThunk(()=>(ss.highlightFirst(ae),D.none()))})})};$x(n,p(A),A,F,l,G,ji.HighlightJustMenu).get(Ke)}},cancelEvent:Qc()}),po.config({mode:"special",onDown:(A,R)=>(u(A,R,ss.highlightFirst),D.some(!0)),onEscape:A=>{const R=kr.getCoupled(A,"sandbox");return x.isOpen(R)?(x.close(R),D.some(!0)):D.none()},onUp:(A,R)=>(u(A,R,ss.highlightLast),D.some(!0)),onEnter:A=>{const R=kr.getCoupled(A,"sandbox"),F=x.isOpen(R);if(F&&!n.previewing.get())return y(R).bind($=>ss.getHighlighted($)).map($=>(lo(A,US(),{item:$}),!0));{const $=Le.getValue(A);return Qo(A,Qc()),n.onExecute(R,A,$),F&&x.close(R),D.some(!0)}}}),No.config({toggleClass:n.markers.openClass,aria:{mode:"expanded"}}),kr.config({others:{sandbox:A=>PC(n,A,{onOpen:()=>No.on(A),onClose:()=>{n.lazyTypeaheadComp.get().each(R=>pn(R.element,"aria-activedescendant")),No.off(A)}})}}),en(v,[Ss(A=>{n.lazyTypeaheadComp.set(D.some(A))}),Tc(A=>{n.lazyTypeaheadComp.set(D.none())}),Ml(A=>{const R=Ke;LC(n,p(A),A,l,R,ji.HighlightMenuAndItem).get(Ke)}),Xe(US(),(A,R)=>{const F=kr.getCoupled(A,"sandbox");Sw(n.model,A,R.event.item),Qo(A,Qc()),n.onItemExecute(A,F,R.event.item,Le.getValue(A)),x.close(F),jS(A)})].concat(n.dismissOnBlur?[Xe(qf(),A=>{const R=kr.getCoupled(A,"sandbox");Tr(R.element).isNone()&&x.close(R)})]:[]))],O={[Nl()]:[Le.name(),VS.name(),v],...n.eventOrder};return{uid:n.uid,dom:a3(ls(n,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:{...f,...Xo(n.typeaheadBehaviours,C)},eventOrder:O}}}),kb=n=>({...n,toCached:()=>kb(n.toCached()),bindFuture:r=>kb(n.bind(i=>i.fold(l=>Tm(un.error(l)),l=>r(l)))),bindResult:r=>kb(n.map(i=>i.bind(r))),mapResult:r=>kb(n.map(i=>i.map(r))),mapError:r=>kb(n.map(i=>i.mapError(r))),foldResult:(r,i)=>n.map(l=>l.fold(r,i)),withTimeout:(r,i)=>kb(Bg(l=>{let u=!1;const f=setTimeout(()=>{u=!0,l(un.error(i()))},r);n.get(p=>{u||(clearTimeout(f),l(p))})}))}),gz=n=>kb(Bg(n)),Av=(n,r,i=[],l,u,f,p)=>{const y=r.fold(()=>({}),O=>({action:O})),v={buttonBehaviours:xt([pi(()=>!n.enabled||p.isDisabled()),Ca(),ws.config({}),...f.map(O=>Pr.config(p.tooltips.getConfig({tooltipText:p.translate(O)}))).toArray(),en("button press",[Wb("click")])].concat(i)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]},...y},C=ls(v,{dom:l});return ls(C,{components:u})},hz=(n,r,i,l=[],u)=>{const f={tag:"button",classes:["tox-tbtn"],attributes:{...n.tooltip.map(v=>({"aria-label":i.translate(v)})).getOr({}),"data-mce-name":u}},p=n.icon.map(v=>kv(v,i.icons)),y=jy([p]);return Av(n,r,l,f,y,n.tooltip,i)},ZS=n=>{switch(n){case"primary":return["tox-button"];case"toolbar":return["tox-tbtn"];default:return["tox-button","tox-button--secondary"]}},bz=(n,r,i,l=[],u=[])=>{const f=i.translate(n.text),p=n.icon.map(A=>kv(A,i.icons)),y=[p.getOrThunk(()=>wr(f))],v=n.buttonType.getOr(n.primary||n.borderless?"primary":"secondary"),C={tag:"button",classes:[...ZS(v),...p.isSome()?["tox-button--icon"]:[],...n.borderless?["tox-button--naked"]:[],...u],attributes:{"aria-label":f,"data-mce-name":n.text}},O=n.icon.map(ue(f));return Av(n,r,l,C,y,O,i)},yz=(n,r,i,l=[],u=[])=>{const f=bz(n,D.some(r),i,l,u);return Oi.sketch(f)},WS=(n,r)=>i=>{r==="custom"?lo(i,Ef,{name:n,value:{}}):r==="submit"?Qo(i,bv):r==="cancel"?Qo(i,Pp):console.error("Unknown button type: ",r)},n1=(n,r,i)=>{if(((l,u)=>u==="menu")(0,r)){const l=()=>p,u=n,f={...n,type:"menubutton",search:D.none(),onSetup:y=>(y.setEnabled(n.enabled),Ke),fetch:dz(u.items,l,i)},p=ns(o1(f,"tox-tbtn",i,D.none(),!0,n.text.or(n.tooltip).getOrUndefined()));return p.asSpec()}if(((l,u)=>u==="custom"||u==="cancel"||u==="submit")(0,r)){const l=WS(n.name,r),u={...n,borderless:!1};return yz(u,l,i.shared.providers,[])}if(((l,u)=>u==="togglebutton")(0,r))return((l,u,f)=>{var p,y;const v=l.icon.map(Y=>Zg(Y,u.icons)).map(ns),C=l.buttonType.getOr(l.primary?"primary":"secondary"),O={...l,name:(p=l.name)!==null&&p!==void 0?p:"",primary:C==="primary",tooltip:l.tooltip,enabled:(y=l.enabled)!==null&&y!==void 0&&y,borderless:!1},A=O.tooltip.or(l.text).map(Y=>({"aria-label":u.translate(Y)})).getOr({}),R=ZS(C??"secondary"),F=l.icon.isSome()&&l.text.isSome(),$={tag:"button",classes:[...R.concat(l.icon.isSome()?["tox-button--icon"]:[]),...l.active?["tox-button--enabled"]:[],...F?["tox-button--icon-and-text"]:[]],attributes:{...A,...st(f)?{"data-mce-name":f}:{}}},G=u.translate(l.text.getOr("")),J=wr(G),ae=[...jy([v.map(Y=>Y.asSpec())]),...l.text.isSome()?[J]:[]],X=Av(O,D.some(Y=>{lo(Y,Ef,{name:l.name,value:{setIcon:ne=>{v.map(ie=>ie.getOpt(Y).each(de=>{So.set(de,[Zg(ne,u.icons)])}))}}})}),[],$,ae,l.tooltip,u);return Oi.sketch(X)})(n,i.shared.providers,n.text.or(n.tooltip).getOrUndefined());throw console.error("Unknown footer button type: ",r),new Error("Unknown footer button type")},gL={type:"separator"},hL=n=>({type:"menuitem",value:n.url,text:n.title,meta:{attach:n.attach},onAction:Ke}),qS=(n,r)=>({type:"menuitem",value:r,text:n,meta:{attach:void 0},onAction:Ke}),vz=(n,r)=>(i=>pt(i,hL))(((i,l)=>cn(l,u=>u.type===i))(n,r)),bL=n=>vz("header",n.targets),yL=n=>vz("anchor",n.targets),_z=n=>D.from(n.anchorTop).map(r=>qS("",r)).toArray(),xz=n=>D.from(n.anchorBottom).map(r=>qS("",r)).toArray(),KS=(n,r)=>{const i=n.toLowerCase();return cn(r,l=>{var u;const f=l.meta!==void 0&&l.meta.text!==void 0?l.meta.text:l.text,p=(u=l.value)!==null&&u!==void 0?u:"";return hr(f.toLowerCase(),i)||hr(p.toLowerCase(),i)})},wz=Xt("aria-invalid"),vL=(n,r)=>{n.dom.checked=r},Uc=n=>n.dom.checked,nr=n=>(r,i,l,u,f)=>St(i,"name").fold(()=>n(i,u,D.none(),f),p=>r.field(p,n(i,u,St(l,p),f))),_L={bar:nr((n,r)=>((i,l)=>({dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:pt(i.items,l.interpreter)}))(n,r.shared)),collection:nr((n,r,i)=>yO(n,r.shared.providers,i)),alertbanner:nr((n,r)=>((i,l)=>{const u=X4(i.icon,l.icons);return Mu.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in",`tox-notification--${i.level}`]},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:i.url?void 0:u},components:i.url?[Oi.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:u,attributes:{title:l.translate(i.iconTooltip)}},action:f=>lo(f,Ef,{name:"alert-banner",value:i.url}),buttonBehaviours:xt([_x()])})]:void 0},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:l.translate(i.text)}}]})})(n,r.shared.providers)),input:nr((n,r,i)=>((l,u,f)=>oz({name:l.name,multiline:!1,label:l.label,inputMode:l.inputMode,placeholder:l.placeholder,flex:!1,disabled:!l.enabled,classname:"tox-textfield",validation:D.none(),maximized:l.maximized,data:f},u))(n,r.shared.providers,i)),textarea:nr((n,r,i)=>((l,u,f)=>oz({name:l.name,multiline:!0,label:l.label,inputMode:D.none(),placeholder:l.placeholder,flex:!0,disabled:!l.enabled,classname:"tox-textarea",validation:D.none(),maximized:l.maximized,data:f},u))(n,r.shared.providers,i)),label:nr((n,r,i,l)=>((u,f,p)=>{const y="tox-label",v=u.align==="center"?[`${y}--center`]:[],C=u.align==="end"?[`${y}--end`]:[],O=ns({dom:{tag:"label",classes:[y,...v,...C]},components:[wr(f.providers.translate(u.label))]}),A=pt(u.items,f.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[O.asSpec(),...A],behaviours:xt([Rm(),So.config({}),(R=D.none(),bS(R,wu,lp)),po.config({mode:"acyclic"}),en("label",[Ss(F=>{u.for.each($=>{p($).each(G=>{O.getOpt(F).each(J=>{var ae;const X=(ae=yr(G.element,"id"))!==null&&ae!==void 0?ae:Xt("form-field");wo(G.element,"id",X),wo(J.element,"for",X)})})})})])])};var R})(n,r.shared,l)),iframe:(gE=(n,r,i)=>((l,u,f)=>{const p="tox-dialog__iframe",y=l.transparent?[]:[`${p}--opaque`],v=l.border?["tox-navobj-bordered"]:[],C={...l.label.map(F=>({title:F})).getOr({}),...f.map(F=>({srcdoc:F})).getOr({}),...l.sandboxed?{sandbox:"allow-scripts allow-same-origin"}:{}},O=((F,$)=>{const G=so(F.getOr(""));return{getValue:J=>G.get(),setValue:(J,ae)=>{if(G.get()!==ae){const X=J.element,Y=()=>wo(X,"srcdoc",ae);$?OS.fold(ue(TS),ne=>ne.throttle)(X,ae,Y):Y()}G.set(ae)}}})(f,l.streamContent),A=l.label.map(F=>Ig(F,u)),R=cs.parts.field({factory:{sketch:F=>wS(D.from(v),{uid:F.uid,dom:{tag:"iframe",attributes:C,classes:[p,...y]},behaviours:xt([ws.config({}),Po.config({}),xb(f,O.getValue,O.setValue),tl.config({channels:{[hw]:{onReceive:($,G)=>{G.newFocus.each(J=>{ba($.element).each(ae=>{($n($.element,J)?At:co)(ae,"tox-navobj-bordered-focus")})})}}}})])})}});return hv(A,R,["tox-form__group--stretched"],[])})(n,r.shared.providers,i),(n,r,i,l,u)=>{const f=ls(r,{source:"dynamic"});return nr(gE)(n,f,i,l,u)}),button:nr((n,r)=>((i,l)=>{const u=WS(i.name,"custom");return f=D.none(),p=cs.parts.field({factory:Oi,...bz(i,D.some(u),l,[wv(""),Rm()])}),hv(f,p,[],[]);var f,p})(n,r.shared.providers)),checkbox:nr((n,r,i)=>((l,u,f)=>{const p=A=>(A.element.dom.click(),D.some(!0)),y=cs.parts.field({factory:{sketch:Ct},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:xt([Rm(),Fo.config({disabled:()=>!l.enabled||u.isDisabled(),onDisabled:A=>{ba(A.element).each(R=>At(R,"tox-checkbox--disabled"))},onEnabled:A=>{ba(A.element).each(R=>co(R,"tox-checkbox--disabled"))}}),ws.config({}),Po.config({}),bS(f,Uc,vL),po.config({mode:"special",onEnter:p,onSpace:p,stopSpaceKeyup:!0}),en("checkbox-events",[Xe(zd(),(A,R)=>{lo(A,Ui,{name:l.name})})])])}),v=cs.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"]},components:[wr(u.translate(l.label))],behaviours:xt([yb.config({})])}),C=A=>Hc(A==="checked"?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+A]},u.icons),O=ns({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[C("checked"),C("unchecked")]});return cs.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[y,O.asSpec(),v],fieldBehaviours:xt([Fo.config({disabled:()=>!l.enabled||u.isDisabled()}),Ca()])})})(n,r.shared.providers,i)),colorinput:nr((n,r,i)=>((l,u,f,p)=>{const y=cs.parts.field({factory:Rp,inputClasses:["tox-textfield"],data:p,onSetValue:A=>Om.run(A).get(Ke),inputBehaviours:xt([Fo.config({disabled:u.providers.isDisabled}),Ca(),ws.config({}),Om.config({invalidClass:"tox-textbox-field-invalid",getRoot:A=>ba(A.element),notify:{onValid:A=>{const R=Le.getValue(A);lo(A,qC,{color:R})}},validator:{validateOnLoad:!1,validate:A=>{const R=Le.getValue(A);if(R.length===0)return Tm(un.value(!0));{const F=Hr("span");Mo(F,"background-color",R);const $=er(F,"background-color").fold(()=>un.error("blah"),G=>un.value(R));return Tm($)}}}})]),selectOnFocus:!1}),v=l.label.map(A=>Ig(A,u.providers)),C=(A,R)=>{lo(A,KC,{value:R})},O=ns(((A,R)=>sl.sketch({dom:A.dom,components:A.components,toggleClass:"mce-active",dropdownBehaviours:xt([pi(R.providers.isDisabled),Ca(),yb.config({}),ws.config({})]),layouts:A.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:R.getSink,fetch:F=>Bg($=>A.fetch($)).map($=>D.from(FC(ls(hb(Xt("menu-value"),$,G=>{A.onItemAction(F,G)},A.columns,A.presets,Cf.CLOSE_ON_EXECUTE,Fe,R.providers),{movement:uv(A.columns,A.presets)})))),parts:{menu:kx(0,0,A.presets)}}))({dom:{tag:"span",attributes:{"aria-label":u.providers.translate("Color swatch")}},layouts:{onRtl:()=>[pr,mr,Ar],onLtr:()=>[mr,pr,Ar]},components:[],fetch:J3(f.getColors(l.storageKey),l.storageKey,f.hasCustomColors()),columns:f.getColorCols(l.storageKey),presets:"color",onItemAction:(A,R)=>{O.getOpt(A).each(F=>{R==="custom"?f.colorPicker($=>{$.fold(()=>Qo(F,kO),G=>{C(F,G),xC(l.storageKey,G)})},"#ffffff"):C(F,R==="remove"?"":R)})}},u));return cs.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:v.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[y,O.asSpec()]}]),fieldBehaviours:xt([en("form-field-events",[Xe(qC,(A,R)=>{O.getOpt(A).each(F=>{Mo(F.element,"background-color",R.event.color)}),lo(A,Ui,{name:l.name})}),Xe(KC,(A,R)=>{cs.getField(A).each(F=>{Le.setValue(F,R.event.value),In.getCurrent(A).each(Po.focus)})}),Xe(kO,(A,R)=>{cs.getField(A).each(F=>{In.getCurrent(A).each(Po.focus)})})])])})})(n,r.shared,r.colorinput,i)),colorpicker:nr((n,r,i)=>((l,u,f)=>{const p=C=>"tox-"+C,y=UO((C=>O=>te(O)?C.translate(tL[O]):C.translate(O))(u),p,u.tooltips.getConfig,(C,O,A=C,R=C)=>Hc(A,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+C],attributes:{title:u.translate(R),"aria-live":"polite",...O.fold(()=>({}),F=>({id:F}))}},u.icons)),v=ns(y.sketch({dom:{tag:"div",classes:[p("color-picker-container")],attributes:{role:"presentation"}},onValidHex:C=>{lo(C,Ef,{name:"hex-valid",value:!0})},onInvalidHex:C=>{lo(C,Ef,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[v.asSpec()],behaviours:xt([xb(f,C=>{const O=v.get(C);return In.getCurrent(O).bind(A=>Le.getValue(A).hex).map(A=>"#"+as(A,"#")).getOr("")},(C,O)=>{const A=D.from(/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(O)).bind(F=>Bt(F,1)),R=v.get(C);In.getCurrent(R).fold(()=>{console.log("Can not find form")},F=>{Le.setValue(F,{hex:A.getOr("")}),Vg.getField(F,"hex").each($=>{Qo($,gu())})})}),Rm()])}})(0,r.shared.providers,i)),dropzone:nr((n,r,i)=>((l,u,f)=>{const p=($,G)=>{G.stop()},y=$=>(G,J)=>{$t($,ae=>{ae(G,J)})},v=($,G)=>{var J;if(!Fo.isDisabled($)){const ae=G.event.raw;O($,(J=ae.dataTransfer)===null||J===void 0?void 0:J.files)}},C=($,G)=>{const J=G.event.raw.target;O($,J.files)},O=($,G)=>{G&&(Le.setValue($,((J,ae)=>{const X=Hp.explode(ae.getOption("images_file_types"));return cn(ao(J),Y=>Ao(X,ne=>ll(Y.name.toLowerCase(),`.${ne.toLowerCase()}`)))})(G,u)),lo($,Ui,{name:l.name}))},A=ns({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:xt([en("input-file-events",[hu(Mr()),hu(Ac())])])}),R=l.label.map($=>Ig($,u)),F=cs.parts.field({factory:{sketch:$=>({uid:$.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:xt([wv(f.getOr([])),Rm(),Fo.config({}),No.config({toggleClass:"dragenter",toggleOnExecute:!1}),en("dropzone-events",[Xe("dragenter",y([p,No.toggle])),Xe("dragleave",y([p,No.toggle])),Xe("dragover",p),Xe("drop",y([p,v])),Xe(zd(),C)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p"},components:[wr(u.translate("Drop an image here"))]},Oi.sketch({dom:{tag:"button",styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[wr(u.translate("Browse for an image")),A.asSpec()],action:G=>{A.get(G).element.dom.click()},buttonBehaviours:xt([ws.config({}),pi(u.isDisabled),Ca()])})]}]})}});return hv(R,F,["tox-form__group--stretched"],[])})(n,r.shared.providers,i)),grid:nr((n,r)=>((i,l)=>({dom:{tag:"div",classes:["tox-form__grid",`tox-form__grid--${i.columns}col`]},components:pt(i.items,l.interpreter)}))(n,r.shared)),listbox:nr((n,r,i)=>((l,u,f)=>{const p=Ao(l.items,R=>!Cv(R)),y=u.shared.providers,v=f.bind(R=>ww(l.items,R)).orThunk(()=>yt(l.items).filter(Cv)),C=l.label.map(R=>Ig(R,y)),O=cs.parts.field({dom:{},factory:{sketch:R=>DS({uid:R.uid,text:v.map(F=>F.text),icon:D.none(),tooltip:D.none(),role:nn(!p,"combobox"),...p?{}:{listRole:"listbox"},ariaLabel:l.label,fetch:(F,$)=>{const G=xw(F,l.name,l.items,Le.getValue(F),p);$(wb(G,Cf.CLOSE_ON_EXECUTE,u,{isHorizontalMenu:!1,search:D.none()}))},onSetup:ue(Ke),getApi:ue({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[ws.config({}),xb(v.map(F=>F.value),F=>yr(F.element,RS),(F,$)=>{ww(l.items,$).each(G=>{wo(F.element,RS,G.value),lo(F,pd,{text:G.text})})})]},"tox-listbox",u.shared)}}),A={dom:{tag:"div",classes:["tox-listboxfield"]},components:[O]};return cs.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:Cs([C.toArray(),[A]]),fieldBehaviours:xt([Fo.config({disabled:ue(!l.enabled),onDisabled:R=>{cs.getField(R).each(Fo.disable)},onEnabled:R=>{cs.getField(R).each(Fo.enable)}})])})})(n,r,i)),selectbox:nr((n,r,i)=>((l,u,f)=>{const p=pt(l.items,A=>({text:u.translate(A.text),value:A.value})),y=l.label.map(A=>Ig(A,u)),v=cs.parts.field({dom:{},...f.map(A=>({data:A})).getOr({}),selectAttributes:{size:l.size},options:p,factory:sL,selectBehaviours:xt([Fo.config({disabled:()=>!l.enabled||u.isDisabled()}),ws.config({}),en("selectbox-change",[Xe(zd(),(A,R)=>{lo(A,Ui,{name:l.name})})])])}),C=l.size>1?D.none():D.some(Hc("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},u.icons)),O={dom:{tag:"div",classes:["tox-selectfield"]},components:Cs([[v],C.toArray()])};return cs.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:Cs([y.toArray(),[O]]),fieldBehaviours:xt([Fo.config({disabled:()=>!l.enabled||u.isDisabled(),onDisabled:A=>{cs.getField(A).each(Fo.disable)},onEnabled:A=>{cs.getField(A).each(Fo.enable)}}),Ca()])})})(n,r.shared.providers,i)),sizeinput:nr((n,r)=>((i,l)=>{let u=PS;const f=Xt("ratio-event"),p=G=>Hc(G,{tag:"span",classes:["tox-icon","tox-lock-icon__"+G]},l.icons),y=i.label.getOr("Constrain proportions"),v=l.translate(y),C=jc.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{"aria-label":v,"data-mce-name":y}},components:[p("lock"),p("unlock")],buttonBehaviours:xt([Fo.config({disabled:()=>!i.enabled||l.isDisabled()}),Ca(),ws.config({}),Pr.config(l.tooltips.getConfig({tooltipText:v}))])}),O=G=>({dom:{tag:"div",classes:["tox-form__group"]},components:G}),A=G=>cs.parts.field({factory:Rp,inputClasses:["tox-textfield"],inputBehaviours:xt([Fo.config({disabled:()=>!i.enabled||l.isDisabled()}),Ca(),ws.config({}),en("size-input-events",[Xe(Wn(),(J,ae)=>{lo(J,f,{isField1:G})}),Xe(zd(),(J,ae)=>{lo(J,Ui,{name:i.name})})])]),selectOnFocus:!1}),R=G=>({dom:{tag:"label",classes:["tox-label"]},components:[wr(l.translate(G))]}),F=jc.parts.field1(O([cs.parts.label(R("Width")),A(!0)])),$=jc.parts.field2(O([cs.parts.label(R("Height")),A(!1)]));return jc.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[F,$,O([R(" "),C])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:(G,J,ae)=>{LS(Le.getValue(G)).each(X=>{u(X).each(Y=>{Le.setValue(J,(ne=>{const ie={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4};let de=ne.value.toFixed((we=ne.unit)in ie?ie[we]:1);var we;return de.indexOf(".")!==-1&&(de=de.replace(/\.?0*$/,"")),de+ne.unit})(Y))})})},coupledFieldBehaviours:xt([Fo.config({disabled:()=>!i.enabled||l.isDisabled(),onDisabled:G=>{jc.getField1(G).bind(cs.getField).each(Fo.disable),jc.getField2(G).bind(cs.getField).each(Fo.disable),jc.getLock(G).each(Fo.disable)},onEnabled:G=>{jc.getField1(G).bind(cs.getField).each(Fo.enable),jc.getField2(G).bind(cs.getField).each(Fo.enable),jc.getLock(G).each(Fo.enable)}}),Ca(),en("size-input-events2",[Xe(f,(G,J)=>{const ae=J.event.isField1,X=ae?jc.getField1(G):jc.getField2(G),Y=ae?jc.getField2(G):jc.getField1(G),ne=X.map(Le.getValue).getOr(""),ie=Y.map(Le.getValue).getOr("");u=((de,we)=>{const ze=LS(de).toOptional(),tt=LS(we).toOptional();return vt(ze,tt,(Je,Ze)=>BS(Je,Ze.unit).map(kt=>Ze.value/kt).map(kt=>{return Wt=kt,ro=Ze.unit,yo=>BS(yo,ro).map(Ho=>({value:Ho*Wt,unit:ro}));var Wt,ro}).getOr(PS)).getOr(PS)})(ne,ie)})])])})})(n,r.shared.providers)),slider:nr((n,r,i)=>((l,u,f)=>{const p=Bu.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[wr(u.translate(l.label))]}),y=Bu.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),v=Bu.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return Bu.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:l.min,maxX:l.max,getInitialValue:ue(f.getOrThunk(()=>(Math.abs(l.max)-Math.abs(l.min))/2))},components:[p,y,v],sliderBehaviours:xt([Rm(),Po.config({})]),onChoose:(C,O,A)=>{lo(C,Ui,{name:l.name,value:A})},onChange:(C,O,A)=>{lo(C,Ui,{name:l.name,value:A})}})})(n,r.shared.providers,i)),urlinput:nr((n,r,i)=>((l,u,f,p)=>{const y=u.shared.providers,v=X=>{const Y=Le.getValue(X);f.addToHistory(Y.value,l.filetype)},C={...p.map(X=>({initialData:X})).getOr({}),dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":wz,type:"url"},minChars:0,responseTime:0,fetch:X=>{const Y=((ie,de,we)=>{var ze,tt;const Je=Le.getValue(de),Ze=(tt=(ze=Je==null?void 0:Je.meta)===null||ze===void 0?void 0:ze.text)!==null&&tt!==void 0?tt:Je.value;return we.getLinkInformation().fold(()=>[],kt=>{const Wt=KS(Ze,(yo=>pt(yo,Ho=>qS(Ho,Ho)))(we.getHistory(ie)));return ie==="file"?(ro=[Wt,KS(Ze,bL(kt)),KS(Ze,Cs([_z(kt),yL(kt),xz(kt)]))],zo(ro,(yo,Ho)=>yo.length===0||Ho.length===0?yo.concat(Ho):yo.concat(gL,Ho),[])):Wt;var ro})})(l.filetype,X,f),ne=wb(Y,Cf.BUBBLE_TO_SANDBOX,u,{isHorizontalMenu:!1,search:D.none()});return Tm(ne)},getHotspot:X=>J.getOpt(X),onSetValue:(X,Y)=>{X.hasConfigured(Om)&&Om.run(X).get(Ke)},typeaheadBehaviours:xt([...f.getValidationHandler().map(X=>Om.config({getRoot:Y=>ba(Y.element),invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:(Y,ne)=>{R.getOpt(Y).each(ie=>{wo(ie.element,"title",y.translate(ne))})}},validator:{validate:Y=>{const ne=Le.getValue(Y);return gz(ie=>{X({type:l.filetype,url:ne.value},de=>{if(de.status==="invalid"){const we=un.error(de.message);ie(we)}else{const we=un.value(de.message);ie(we)}})})},validateOnLoad:!1}})).toArray(),Fo.config({disabled:()=>!l.enabled||y.isDisabled()}),ws.config({}),en("urlinput-events",[Xe(gu(),X=>{const Y=sf(X.element),ne=Y.trim();ne!==Y&&am(X.element,ne),l.filetype==="file"&&lo(X,Ui,{name:l.name})}),Xe(zd(),X=>{lo(X,Ui,{name:l.name}),v(X)}),Xe(Kf(),X=>{lo(X,Ui,{name:l.name}),v(X)})])]),eventOrder:{[gu()]:["streaming","urlinput-events","invalidating"]},model:{getDisplayText:X=>X.value,selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:u.shared.getSink,parts:{menu:kx(0,0,"normal")},onExecute:(X,Y,ne)=>{lo(Y,bv,{})},onItemExecute:(X,Y,ne,ie)=>{v(X),lo(X,Ui,{name:l.name})}},O=cs.parts.field({...C,factory:pL}),A=l.label.map(X=>Ig(X,y)),R=ns(((X,Y,ne=X,ie=X)=>Hc(ne,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+X],attributes:{title:y.translate(ie),"aria-live":"polite",...Y.fold(()=>({}),de=>({id:de}))}},y.icons))("invalid",D.some(wz),"warning")),F=ns({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[R.asSpec()]}),$=f.getUrlPicker(l.filetype),G=Xt("browser.url.event"),J=ns({dom:{tag:"div",classes:["tox-control-wrap"]},components:[O,F.asSpec()],behaviours:xt([Fo.config({disabled:()=>!l.enabled||y.isDisabled()})])}),ae=ns(yz({name:l.name,icon:D.some("browse"),text:l.picker_text.or(l.label).getOr(""),enabled:l.enabled,primary:!1,buttonType:D.none(),borderless:!0},X=>Qo(X,G),y,[],["tox-browse-url"]));return cs.sketch({dom:Zx([]),components:A.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:Cs([[J.asSpec()],$.map(()=>ae.asSpec()).toArray()])}]),fieldBehaviours:xt([Fo.config({disabled:()=>!l.enabled||y.isDisabled(),onDisabled:X=>{cs.getField(X).each(Fo.disable),ae.getOpt(X).each(Fo.disable)},onEnabled:X=>{cs.getField(X).each(Fo.enable),ae.getOpt(X).each(Fo.enable)}}),Ca(),en("url-input-events",[Xe(G,X=>{In.getCurrent(X).each(Y=>{const ne=Le.getValue(Y),ie={fieldname:l.name,...ne};$.each(de=>{de(ie).get(we=>{Le.setValue(Y,we),lo(X,Ui,{name:l.name})})})})})])])})})(n,r,r.urlinput,i)),customeditor:nr(n=>{const r=Nn(),i=ns({dom:{tag:n.tag}}),l=Nn(),u=!yS(n)&&n.onFocus.isSome()?[Po.config({onFocus:f=>{n.onFocus.each(p=>{p(f.element.dom)})}}),ws.config({})]:[];return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:xt([en("custom-editor-events",[Ss(f=>{i.getOpt(f).each(p=>{(yS(n)?n.init(p.element.dom):ZO.load(n.scriptId,n.scriptUrl).then(y=>y(p.element.dom,n.settings))).then(y=>{l.on(v=>{y.setValue(v)}),l.clear(),r.set(y)})})})]),xb(D.none(),()=>r.get().fold(()=>l.get().getOr(""),f=>f.getValue()),(f,p)=>{r.get().fold(()=>l.set(p),y=>y.setValue(p))}),Rm()].concat(u)),components:[i.asSpec()]}}),htmlpanel:nr((n,r)=>((i,l)=>{const u=["tox-form__group",...i.stretched?["tox-form__group--stretched"]:[]],f=en("htmlpanel",[Ss(p=>{i.onInit(p.element.dom)})]);return i.presets==="presentation"?Mu.sketch({dom:{tag:"div",classes:u,innerHtml:i.html},containerBehaviours:xt([Pr.config({...l.tooltips.getConfig({tooltipText:"",onShow:p=>{Ys(p.element,"[data-mce-tooltip]:hover").orThunk(()=>Tr(p.element)).each(y=>{Fs(y,"data-mce-tooltip").each(v=>{Pr.setComponents(p,l.tooltips.getComponents({tooltipText:v}))})})}}),mode:"children-normal",anchor:p=>({type:"node",node:Ys(p.element,"[data-mce-tooltip]:hover").orThunk(()=>Tr(p.element).filter(y=>Fs(y,"data-mce-tooltip").isSome())),root:p.element,layouts:{onLtr:ue([Ar,ir,mr,Lr,pr,us]),onRtl:ue([Ar,ir,mr,Lr,pr,us])},bubble:nc(0,-2,{})})}),f])}):Mu.sketch({dom:{tag:"div",classes:u,innerHtml:i.html,attributes:{role:"document"}},containerBehaviours:xt([ws.config({}),Po.config({}),f])})})(n,r.shared.providers)),imagepreview:nr((n,r,i)=>((l,u)=>{const f=so(u.getOr({url:""})),p=ns({dom:{tag:"img",classes:["tox-imagepreview__image"],attributes:u.map(O=>({src:O.url})).getOr({})}}),y=ns({dom:{tag:"div",classes:["tox-imagepreview__container"],attributes:{role:"presentation"}},components:[p.asSpec()]}),v={};l.height.each(O=>v.height=O);const C=u.map(O=>({url:O.url,zoom:D.from(O.zoom),cachedWidth:D.from(O.cachedWidth),cachedHeight:D.from(O.cachedHeight)}));return{dom:{tag:"div",classes:["tox-imagepreview"],styles:v,attributes:{role:"presentation"}},components:[y.asSpec()],behaviours:xt([Rm(),xb(C,()=>f.get(),(O,A)=>{const R={url:A.url};A.zoom.each($=>R.zoom=$),A.cachedWidth.each($=>R.cachedWidth=$),A.cachedHeight.each($=>R.cachedHeight=$),f.set(R);const F=()=>{const{cachedWidth:$,cachedHeight:G,zoom:J}=R;if(!Ot($)&&!Ot(G)){if(Ot(J)){const X=((Y,ne,ie)=>{const de=Go(Y),we=Ds(Y);return Math.min(de/ne,we/ie,1)})(O.element,$,G);R.zoom=X}const ae=((X,Y,ne,ie,de)=>{const we=ne*de,ze=ie*de,tt=Math.max(0,X/2-we/2),Je=Math.max(0,Y/2-ze/2);return{left:tt.toString()+"px",top:Je.toString()+"px",width:we.toString()+"px",height:ze.toString()+"px"}})(Go(O.element),Ds(O.element),$,G,R.zoom);y.getOpt(O).each(X=>{Li(X.element,ae)})}};p.getOpt(O).each($=>{const G=$.element;var J;A.url!==yr(G,"src")&&(wo(G,"src",A.url),co(O.element,"tox-imagepreview__loaded")),F(),(J=G,new Promise((ae,X)=>{const Y=()=>{ie(),ae(J)},ne=[Ai(J,"load",Y),Ai(J,"error",()=>{ie(),X("Unable to load data from image: "+J.dom.src)})],ie=()=>$t(ne,de=>de.unbind());J.dom.complete&&Y()})).then(ae=>{O.getSystem().isConnected()&&(At(O.element,"tox-imagepreview__loaded"),R.cachedWidth=ae.dom.naturalWidth,R.cachedHeight=ae.dom.naturalHeight,F())})})})])}})(n,i)),table:nr((n,r)=>((i,l)=>{const u=y=>({dom:{tag:"td",innerHtml:l.translate(y)}});return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(p=i.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:pt(p,y=>({dom:{tag:"th",innerHtml:l.translate(y)}}))}]}),(f=i.cells,{dom:{tag:"tbody"},components:pt(f,y=>({dom:{tag:"tr"},components:pt(y,u)}))})],behaviours:xt([ws.config({}),Po.config({})])};var f,p})(n,r.shared.providers)),tree:nr((n,r)=>((i,l)=>{const u=i.onLeafAction.getOr(Ke),f=i.onToggleExpand.getOr(Ke),p=i.defaultExpandedIds,y=so(p),v=so(i.defaultSelectedId),C=Xt("tree-id"),O=(A,R)=>i.items.map(F=>F.type==="leaf"?$S({leaf:F,selectedId:A,onLeafAction:u,visible:!0,treeId:C,backstage:l}):Cw({directory:F,selectedId:A,onLeafAction:u,expandedIds:R,labelTabstopping:!0,treeId:C,backstage:l}));return{dom:{tag:"div",classes:["tox-tree"],attributes:{role:"tree"}},components:O(v.get(),y.get()),behaviours:xt([po.config({mode:"flow",selector:".tox-tree--leaf__label--visible, .tox-tree--directory__label--visible",cycles:!1}),en(cL,[Xe("expand-tree-node",(A,R)=>{const{expanded:F,node:$}=R.event;y.set(F?[...y.get(),$]:y.get().filter(G=>G!==$)),f(y.get(),{expanded:F,node:$})})]),tl.config({channels:{[`update-active-item-${C}`]:{onReceive:(A,R)=>{v.set(D.some(R.value)),So.set(A,O(D.some(R.value),y.get()))}}}}),So.config({})])}})(n,r)),panel:nr((n,r)=>((i,l)=>({dom:{tag:"div",classes:i.classes},components:pt(i.items,l.shared.interpreter)}))(n,r))},GS={field:(n,r)=>r,record:ue([])},Aw=(n,r,i,l,u)=>{const f=ls(l,{shared:{interpreter:p=>YS(n,p,i,f,u)}});return YS(n,r,i,f,u)},YS=(n,r,i,l,u)=>St(_L,r.type).fold(()=>(console.error(`Unknown factory type "${r.type}", defaulting to container: `,r),r),f=>f(n,r,i,l,u)),kz=(n,r,i,l)=>YS(GS,n,r,i,l),Pu="layout-inset",s1=n=>n.x,Tw=(n,r)=>n.x+n.width/2-r.width/2,XS=(n,r)=>n.x+n.width-r.width,Xd=n=>n.y,JS=(n,r)=>n.y+n.height-r.height,Cz=(n,r)=>n.y+n.height/2-r.height/2,ic=(n,r,i)=>Ga(XS(n,r),JS(n,r),i.insetSouthwest(),yp(),"southwest",Ya(n,{right:0,bottom:3}),Pu),Kg=(n,r,i)=>Ga(s1(n),JS(n,r),i.insetSoutheast(),kh(),"southeast",Ya(n,{left:1,bottom:3}),Pu),lc=(n,r,i)=>Ga(XS(n,r),Xd(n),i.insetNorthwest(),bp(),"northwest",Ya(n,{right:0,top:2}),Pu),Tv=(n,r,i)=>Ga(s1(n),Xd(n),i.insetNortheast(),wh(),"northeast",Ya(n,{left:1,top:2}),Pu),Fn=(n,r,i)=>Ga(Tw(n,r),Xd(n),i.insetNorth(),E_(),"north",Ya(n,{top:2}),Pu),Mm=(n,r,i)=>Ga(Tw(n,r),JS(n,r),i.insetSouth(),K1(),"south",Ya(n,{bottom:3}),Pu),Ov=(n,r,i)=>Ga(XS(n,r),Cz(n,r),i.insetEast(),A_(),"east",Ya(n,{right:0}),Pu),QS=(n,r,i)=>Ga(s1(n),Cz(n,r),i.insetWest(),G1(),"west",Ya(n,{left:1}),Pu),eE=n=>{switch(n){case"north":return Fn;case"northeast":return Tv;case"northwest":return lc;case"south":return Mm;case"southeast":return Kg;case"southwest":return ic;case"east":return Ov;case"west":return QS}},Ow=(n,r,i,l,u)=>zh(l).map(eE).getOr(Fn)(n,r,i,l,u),xL=n=>{switch(n){case"north":return Mm;case"northeast":return Kg;case"northwest":return ic;case"south":return Fn;case"southeast":return Tv;case"southwest":return lc;case"east":return QS;case"west":return Ov}},tE=(n,r,i,l,u)=>zh(l).map(xL).getOr(Fn)(n,r,i,l,u),zv={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},Sz=(n,r,i)=>{const l={maxHeightFunction:wp()};return()=>i()?{type:"node",root:Pn(Vs(n())),node:D.from(n()),bubble:nc(12,12,zv),layouts:{onRtl:()=>[Tv],onLtr:()=>[lc]},overrides:l}:{type:"hotspot",hotspot:r(),bubble:nc(-12,12,zv),layouts:{onRtl:()=>[mr,pr,Ar],onLtr:()=>[pr,mr,Ar]},overrides:l}},Ez=(n,r,i,l)=>{const u={maxHeightFunction:wp()};return()=>l()?{type:"node",root:Pn(Vs(r())),node:D.from(r()),bubble:nc(12,12,zv),layouts:{onRtl:()=>[Fn],onLtr:()=>[Fn]},overrides:u}:n?{type:"node",root:Pn(Vs(r())),node:D.from(r()),bubble:nc(0,-Na(r()),zv),layouts:{onRtl:()=>[ir],onLtr:()=>[ir]},overrides:u}:{type:"hotspot",hotspot:i(),bubble:nc(0,0,zv),layouts:{onRtl:()=>[ir],onLtr:()=>[ir]},overrides:u}},oE=(n,r,i)=>()=>i()?{type:"node",root:Pn(Vs(n())),node:D.from(n()),layouts:{onRtl:()=>[Fn],onLtr:()=>[Fn]}}:{type:"hotspot",hotspot:r(),layouts:{onRtl:()=>[Ar],onLtr:()=>[Ar]}},Az=(n,r)=>()=>({type:"selection",root:r(),getSelection:()=>{const i=n.selection.getRng(),l=n.model.table.getSelectedCells();if(l.length>1){const u=l[0],f=l[l.length-1],p={firstCell:Vt(u),lastCell:Vt(f)};return D.some(p)}return D.some(ff.range(Vt(i.startContainer),i.startOffset,Vt(i.endContainer),i.endOffset))}}),zw=n=>r=>({type:"node",root:n(),node:r}),wL=(n,r,i,l)=>{const u=sb(n),f=()=>Vt(n.getBody()),p=()=>Vt(n.getContentAreaContainer()),y=()=>u||!l();return{inlineDialog:Sz(p,r,y),inlineBottomDialog:Ez(n.inline,p,i,y),banner:oE(p,r,y),cursor:Az(n,f),node:zw(f)}},kL=n=>(r,i)=>{eO(n)(r,i)},CL=n=>()=>SC(n),SL=n=>r=>gb(n,r),EL=n=>r=>CC(n,r),Tz=n=>()=>wf(n),Oz=n=>an(n,"items"),zz=n=>an(n,"format"),nE=[{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"}]}],sE=n=>zo(n,(r,i)=>{if(Vo(i,"items")){const l=sE(i.items);return{customFormats:r.customFormats.concat(l.customFormats),formats:r.formats.concat([{title:i.title,items:l.formats}])}}if(Vo(i,"inline")||(l=>Vo(l,"block"))(i)||(l=>Vo(l,"selector"))(i)){const l=`custom-${te(i.name)?i.name:i.title.toLowerCase()}`;return{customFormats:r.customFormats.concat([{name:l,format:i}]),formats:r.formats.concat([{title:i.title,format:l,icon:i.icon}])}}return{...r,formats:r.formats.concat(i)}},{customFormats:[],formats:[]}),Nz=n=>Py(n).map(r=>{const i=((l,u)=>{const f=sE(u),p=y=>{$t(y,v=>{l.formatter.has(v.name)||l.formatter.register(v.name,v.format)})};return l.formatter?p(f.customFormats):l.on("init",()=>{p(f.customFormats)}),f.formats})(n,r);return nx(n)?nE.concat(i):i}).getOr(nE),Dz=(n,r,i)=>({...n,type:"formatter",isSelected:r(n.format),getStylePreview:i(n.format)}),rE=(n,r,i,l)=>{const u=f=>pt(f,p=>Oz(p)?(y=>{const v=u(y.items);return{...y,type:"submenu",getStyleItems:ue(v)}})(p):zz(p)?(y=>Dz(y,i,l))(p):(y=>{const v=tn(y);return v.length===1&&Ge(v,"title")})(p)?{...p,type:"separator"}:(y=>{const v=te(y.name)?y.name:Xt(y.title),C=`custom-${v}`,O={...y,type:"formatter",format:C,isSelected:i(C),getStylePreview:l(C)};return n.formatter.register(v,O),O})(p));return u(r)},aE=n=>{let r=0;const i=l=>[{dom:{tag:"div",classes:["tox-tooltip__body"]},components:[wr(l.tooltipText)]}];return{getConfig:l=>({delayForShow:()=>r>0?60:300,delayForHide:ue(300),exclusive:!0,lazySink:n,tooltipDom:{tag:"div",classes:["tox-tooltip","tox-tooltip--up"]},tooltipComponents:i(l),onShow:(u,f)=>{r++,l.onShow&&l.onShow(u,f)},onHide:(u,f)=>{r--,l.onHide&&l.onHide(u,f)},onSetup:l.onSetup}),getComponents:i}},Rz=Hp.trim,Mz=n=>r=>!!((i=>st(i)&&i.nodeType===1)(r)&&(r.contentEditable===n||r.getAttribute("data-mce-contenteditable")===n)),AL=Mz("true"),TL=Mz("false"),Lz=(n,r,i,l,u)=>({type:n,title:r,url:i,level:l,attach:u}),Bz=n=>n.innerText||n.textContent,OL=n=>(r=>r&&r.nodeName==="A"&&(r.id||r.name)!==void 0)(n)&&Jd(n),iE=n=>n&&/^(H[1-6])$/.test(n.nodeName),Jd=n=>(r=>{let i=r;for(;i=i.parentNode;){const l=i.contentEditable;if(l&&l!=="inherit")return AL(i)}return!1})(n)&&!TL(n),zL=n=>iE(n)&&Jd(n),lE=n=>{var r;const i=(l=>l.id?l.id:Xt("h"))(n);return Lz("header",(r=Bz(n))!==null&&r!==void 0?r:"","#"+i,(l=>iE(l)?parseInt(l.nodeName.substr(1),10):0)(n),()=>{n.id=i})},Pz=n=>{const r=n.id||n.name,i=Bz(n);return Lz("anchor",i||"#"+r,"#"+r,0,Ke)},Iz=n=>Rz(n.title).length>0,NL=n=>{const r=(i=>pt(fa(Vt(i),"h1,h2,h3,h4,h5,h6,a:not([href])"),u=>u.dom))(n);return cn((i=>pt(cn(i,zL),lE))(r).concat((i=>pt(cn(i,OL),Pz))(r)),Iz)},Nv="tinymce-url-history",cE=n=>te(n)&&/^https?/.test(n),dE=n=>ce(n)&&yn(n,r=>{return!(He(i=r)&&i.length<=5&&hi(i,cE));var i}).isNone(),Fz=()=>{const n=Vc.getItem(Nv);if(n===null)return{};let r;try{r=JSON.parse(n)}catch(i){if(i instanceof SyntaxError)return console.log("Local storage "+Nv+" was not valid JSON",i),{};throw i}return dE(r)?r:(console.log("Local storage "+Nv+" was not valid format",r),{})},DL=n=>{const r=Fz();return St(r,n).getOr([])},RL=(n,r)=>{if(!cE(n))return;const i=Fz(),l=St(i,r).getOr([]),u=cn(l,f=>f!==n);i[r]=[n].concat(u).slice(0,5),(f=>{if(!dE(f))throw new Error(`Bad format for history: +`+JSON.stringify(f));Vc.setItem(Nv,JSON.stringify(f))})(i)},Hz=n=>!!n,ML=n=>Zn(Hp.makeMap(n,/[, ]/),Hz),Nw=n=>D.from(rx(n)),uE=n=>D.from(n).filter(te).getOrUndefined(),$z=n=>({getHistory:DL,addToHistory:RL,getLinkInformation:()=>(r=>ax(r)?D.some({targets:NL(r.getBody()),anchorTop:uE(z4(r)),anchorBottom:uE(N4(r))}):D.none())(n),getValidationHandler:()=>(r=>D.from(L0(r)))(n),getUrlPicker:r=>((i,l)=>((u,f)=>{const p=(y=>{const v=D.from(B0(y)).filter(Hz).map(ML);return Nw(y).fold(Fe,C=>v.fold(Gt,O=>tn(O).length>0&&O))})(u);return Me(p)?p?Nw(u):D.none():p[f]?Nw(u):D.none()})(i,l).map(u=>f=>Bg(p=>{const y={filetype:l,fieldname:f.fieldname,...D.from(f.meta).getOr({})};u.call(i,(v,C)=>{if(!te(v))throw new Error("Expected value to be string");if(C!==void 0&&!ce(C))throw new Error("Expected meta to be a object");p({value:v,meta:C})},f.value,y)})))(n,r)}),Qa=Z5,Lm=yT,LL=ue([Ne("shell",!1),nt("makeItem"),Ne("setupItem",Ke),Io("listBehaviours",[So])]),r1=id({name:"items",overrides:()=>({behaviours:xt([So.config({})])})}),BL=ue([r1]),fE=pl({name:ue("CustomList")(),configFields:LL(),partFields:BL(),factory:(n,r,i,l)=>{const u=n.shell?{behaviours:[So.config({})],components:[]}:{behaviours:[],components:r};return{uid:n.uid,dom:n.dom,components:u.components,behaviours:Xo(n.listBehaviours,u.behaviours),apis:{setItems:(f,p)=>{var y;(y=f,n.shell?D.some(y):Ts(y,n,"items")).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")},v=>{const C=So.contents(v),O=p.length,A=O-C.length,R=A>0?Cr(A,()=>n.makeItem()):[],F=C.slice(O);$t(F,G=>So.remove(v,G)),$t(R,G=>So.append(v,G));const $=So.contents(v);$t($,(G,J)=>{n.setupItem(f,G,p[J],J)})})}}}},apis:{setItems:(n,r,i)=>{n.setItems(r,i)}}}),Cb=ue([nt("dom"),Ne("shell",!0),Jt("toolbarBehaviours",[So])]),Vz=ue([id({name:"groups",overrides:()=>({behaviours:xt([So.config({})])})})]),Iu=pl({name:"Toolbar",configFields:Cb(),partFields:Vz(),factory:(n,r,i,l)=>{const u=n.shell?{behaviours:[So.config({})],components:[]}:{behaviours:[],components:r};return{uid:n.uid,dom:n.dom,components:u.components,behaviours:Xo(n.toolbarBehaviours,u.behaviours),apis:{setGroups:(f,p)=>{var y;(y=f,n.shell?D.some(y):Ts(y,n,"groups")).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")},v=>{So.set(v,p)})},refresh:Ke},domModification:{attributes:{role:"group"}}}},apis:{setGroups:(n,r,i)=>{n.setGroups(r,i)}}}),mE=Ke,pE=Fe,Dw=ue([]);var gE,PL=Object.freeze({__proto__:null,setup:mE,isDocked:pE,getBehaviours:Dw});const Rw=ue(Xt("toolbar-height-change")),Bm={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},jz="tox-tinymce--toolbar-sticky-on",Uz="tox-tinymce--toolbar-sticky-off",Dv=(n,r)=>Ge(Gs.getModes(n),r),Mw=n=>{const r=n.element;ba(r).each(i=>{const l="padding-"+Gs.getModes(n)[0];if(Gs.isDocked(n)){const u=Go(i);Mo(r,"width",u+"px"),Mo(i,l,(f=>Na(f)+(parseInt(Ns(f,"margin-top"),10)||0)+(parseInt(Ns(f,"margin-bottom"),10)||0))(r)+"px")}else Vn(r,"width"),Vn(i,l)})},hE=(n,r)=>{r?(co(n,Bm.fadeOutClass),Ko(n,[Bm.transitionClass,Bm.fadeInClass])):(co(n,Bm.fadeInClass),Ko(n,[Bm.fadeOutClass,Bm.transitionClass]))},Zz=(n,r)=>{const i=Vt(n.getContainer());r?(At(i,jz),co(i,Uz)):(At(i,Uz),co(i,jz))},Wz=(n,r)=>{const i=Nn(),l=r.getSink,u=y=>{l().each(v=>y(v.element))},f=y=>{n.inline||Mw(y),Zz(n,Gs.isDocked(y)),y.getSystem().broadcastOn([M()],{}),l().each(v=>v.getSystem().broadcastOn([M()],{}))},p=n.inline?[]:[tl.config({channels:{[Rw()]:{onReceive:Mw}}})];return[Po.config({}),Gs.config({contextual:{lazyContext:y=>{const v=Na(y.element),C=n.inline?n.getContentAreaContainer():n.getContainer();return D.from(C).map(O=>{const A=vr(Vt(O));return Tg(n,y.element).fold(()=>{const R=A.height-v,F=A.y+(Dv(y,"top")?0:v);return rn(A.x,F,A.width,R)},R=>{const F=Wl(A,Og(R)),$=Dv(y,"top")?F.y:F.y+v;return rn(F.x,$,F.width,F.height-v)})})},onShow:()=>{u(y=>hE(y,!0))},onShown:y=>{u(v=>Qn(v,[Bm.transitionClass,Bm.fadeInClass])),i.get().each(v=>{((C,O)=>{const A=ha(O);nd(A).filter(R=>!$n(O,R)).filter(R=>$n(R,Vt(A.dom.body))||lr(C,R)).each(()=>Ei(O))})(y.element,v),i.clear()})},onHide:y=>{((v,C)=>Tr(v).orThunk(()=>C().toOptional().bind(O=>Tr(O.element))))(y.element,l).fold(i.clear,i.set),u(v=>hE(v,!1))},onHidden:()=>{u(y=>Qn(y,[Bm.transitionClass]))},...Bm},lazyViewport:y=>Tg(n,y.element).fold(()=>{const v=jr(),C=L2(n),O=v.y+(Dv(y,"top")?C:0),A=v.height-(Dv(y,"bottom")?C:0);return{bounds:rn(v.x,O,v.width,A),optScrollEnv:D.none()}},v=>({bounds:Og(v),optScrollEnv:D.some({currentScrollTop:v.element.dom.scrollTop,scrollElmTop:Ye(v.element).top})})),modes:[r.header.getDockingMode()],onDocked:f,onUndocked:f}),...p]};var IL=Object.freeze({__proto__:null,setup:(n,r,i)=>{n.inline||(r.header.isPositionedAtTop()||n.on("ResizeEditor",()=>{i().each(Gs.reset)}),n.on("ResizeWindow ResizeEditor",()=>{i().each(Mw)}),n.on("SkinLoaded",()=>{i().each(l=>{Gs.isDocked(l)?Gs.reset(l):Gs.refresh(l)})}),n.on("FullscreenStateChanged",()=>{i().each(Gs.reset)})),n.on("AfterScrollIntoView",l=>{i().each(u=>{Gs.refresh(u);const f=u.element;ZT(f)&&((p,y)=>{const v=ha(y),C=yd(y).dom.innerHeight,O=_s(v),A=Vt(p.elm),R=Va(A),F=Ds(A),$=R.y,G=$+F,J=Ye(y),ae=Ds(y),X=J.top,Y=X+ae,ne=Math.abs(X-O.top)<2,ie=Math.abs(Y-(O.top+C))<2;if(ne&&$X){const de=$-C+F+ae;Sd(O.left,de,v)}})(l,f)})}),n.on("PostRender",()=>{Zz(n,!1)})},isDocked:n=>n().map(Gs.isDocked).getOr(!1),getBehaviours:Wz});const FL=ho([oa,Xr("items",uu([xc([eC,li("items",Zr)]),Zr]))].concat(Am)),HL=[Us("text"),Us("tooltip"),Us("icon"),Wa("search",!1,uu([fl,ho([Us("placeholder")])],n=>Me(n)?n?D.some({placeholder:D.none()}):D.none():D.some(n))),Za("fetch"),xs("onSetup",()=>Ke)],qz=ho([oa,...HL]),Kz=n=>Ms("menubutton",qz,n),$L=ho([oa,nv,Zd,Mg,rC,QM,Rg,Ol("presets","normal",["normal","color","listpreview"]),b3(1),Hy,h3]);var bE=ld({factory:(n,r)=>{const i={focus:po.focusIn,setMenus:(l,u)=>{const f=pt(u,p=>{const y={type:"menubutton",text:p.text,fetch:C=>{C(p.getItems())}},v=Kz(y).mapError(C=>ii(C)).getOrDie();return o1(v,"tox-mbtn",r.backstage,D.some("menuitem"))});So.set(l,f)}};return{uid:n.uid,dom:n.dom,components:[],behaviours:xt([So.config({}),en("menubar-events",[Ss(l=>{n.onSetup(l)}),Xe(io(),(l,u)=>{Ys(l.element,".tox-mbtn--active").each(f=>{Id(u.event.target,".tox-mbtn").each(p=>{$n(f,p)||l.getSystem().getByDom(f).each(y=>{l.getSystem().getByDom(p).each(v=>{sl.expand(v),sl.close(y),Po.focus(v)})})})})}),Xe(rg(),(l,u)=>{u.event.prevFocus.bind(f=>l.getSystem().getByDom(f).toOptional()).each(f=>{u.event.newFocus.bind(p=>l.getSystem().getByDom(p).toOptional()).each(p=>{sl.isOpen(f)&&(sl.expand(p),sl.close(f))})})})]),po.config({mode:"flow",selector:".tox-mbtn",onEscape:l=>(n.onEscape(l),D.some(!0))}),ws.config({})]),apis:i,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[nt("dom"),nt("uid"),nt("onEscape"),nt("backstage"),Ne("onSetup",Ke)],apis:{focus:(n,r)=>{n.focus(r)},setMenus:(n,r,i)=>{n.setMenus(r,i)}}});const Gz="container",VL=[Jt("slotBehaviours",[])],yE=n=>"",jL=(n,r)=>{const i=O=>wT(n),l=(O,A)=>(R,F)=>Ts(R,n,F).map($=>O($,F)).getOr(A),u=(O,A)=>yr(O.element,"aria-hidden")!=="true",f=l(u,!1),p=l((O,A)=>{if(u(O)){const R=O.element;Mo(R,"display","none"),wo(R,"aria-hidden","true"),lo(O,ec(),{name:A,visible:!1})}}),y=(O=>(A,R)=>{$t(R,F=>O(A,F))})(p),v=l((O,A)=>{if(!u(O)){const R=O.element;Vn(R,"display"),pn(R,"aria-hidden"),lo(O,ec(),{name:A,visible:!0})}}),C={getSlotNames:i,getSlot:(O,A)=>Ts(O,n,A),isShowing:f,hideSlot:p,hideAllSlots:O=>y(O,i()),showSlot:v};return{uid:n.uid,dom:n.dom,components:r,behaviours:To(n.slotBehaviours),apis:C}},UL=Zn({getSlotNames:(n,r)=>n.getSlotNames(r),getSlot:(n,r,i)=>n.getSlot(r,i),isShowing:(n,r,i)=>n.isShowing(r,i),hideSlot:(n,r,i)=>n.hideSlot(r,i),hideAllSlots:(n,r)=>n.hideAllSlots(r),showSlot:(n,r,i)=>n.showSlot(r,i)},n=>ty(n)),rl={...UL,sketch:n=>{const r=(()=>{const f=[];return{slot:(p,y)=>(f.push(p),Qk(Gz,yE(p),y)),record:ue(f)}})(),i=n(r),l=r.record(),u=pt(l,f=>nl({name:f,pname:yE(f)}));return h0(Gz,VL,u,jL,i)}},ZL=ho([Zd,nv,xs("onShow",Ke),xs("onHide",Ke),Rg]),WL=n=>({element:()=>n.element.dom}),Lw=(n,r)=>{const i=pt(tn(r),l=>{const u=r[l],f=Ua((p=>Ms("sidebar",ZL,p))(u));return{name:l,getApi:WL,onSetup:f.onSetup,onShow:f.onShow,onHide:f.onHide}});return pt(i,l=>{const u=so(Ke);return n.slot(l.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:rv([Lg(l,u),Mp(l,u),Xe(ec(),(f,p)=>{const y=p.event;j(i,C=>C.name===y.name).each(C=>{(y.visible?C.onShow:C.onHide)(C.getApi(f))})})])})})},Yz=n=>rl.sketch(r=>({dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:Lw(r,n),slotBehaviours:rv([Ss(i=>rl.hideAllSlots(i))])})),Bw=(n,r)=>{wo(n,"role",r)},qL=n=>In.getCurrent(n).bind(r=>Il.isGrowing(r)||Il.hasGrown(r)?In.getCurrent(r).bind(i=>j(rl.getSlotNames(i),l=>rl.isShowing(i,l))):D.none()),vE=Xt("FixSizeEvent"),_E=Xt("AutoSizeEvent");var KL=Object.freeze({__proto__:null,block:(n,r,i,l)=>{wo(n.element,"aria-busy",!0);const u=r.getRoot(n).getOr(n),f=xt([po.config({mode:"special",onTab:()=>D.some(!0),onShiftTab:()=>D.some(!0)}),Po.config({})]),p=l(u,f),y=u.getSystem().build(p);So.append(u,Fi(y)),y.hasConfigured(po)&&r.focus&&po.focusIn(y),i.isBlocked()||r.onBlock(n),i.blockWith(()=>So.remove(u,y))},unblock:(n,r,i)=>{pn(n.element,"aria-busy"),i.isBlocked()&&r.onUnblock(n),i.clear()},isBlocked:(n,r,i)=>i.isBlocked()}),GL=[xs("getRoot",D.none),xr("focus",!0),Dn("onBlock"),Dn("onUnblock")];const Qd=Qr({fields:GL,name:"blocking",apis:KL,state:Object.freeze({__proto__:null,init:()=>{const n=kl(r=>r.destroy());return Jr({readState:n.isSet,blockWith:r=>{n.set({destroy:r})},clear:n.clear,isBlocked:n.isSet})}})}),xE=n=>In.getCurrent(n).each(r=>Ei(r.element,!0)),Xz=(n,r,i)=>{const l=so(!1),u=Nn(),f=y=>{var v;l.get()&&(!(C=>C.type==="focusin")(v=y)||!(v.composed?yt(v.composedPath()):D.from(v.target)).map(Vt).filter(ys).exists(C=>_n(C,"mce-pastebin")))&&(y.preventDefault(),xE(r()),n.editorManager.setActive(n))};n.inline||n.on("PreInit",()=>{n.dom.bind(n.getWin(),"focusin",f),n.on("BeforeExecCommand",y=>{y.command.toLowerCase()==="mcefocus"&&y.value!==!0&&f(y)})});const p=y=>{y!==l.get()&&(l.set(y),((v,C,O,A)=>{const R=C.element;if(((F,$)=>{const G="tabindex",J=`data-mce-${G}`;D.from(F.iframeElement).map(Vt).each(ae=>{$?(Fs(ae,G).each(X=>wo(ae,J,X)),wo(ae,G,-1)):(pn(ae,G),Fs(ae,J).each(X=>{wo(ae,G,X),pn(ae,J)}))})})(v,O),O)Qd.block(C,(F=>($,G)=>({dom:{tag:"div",attributes:{"aria-label":F.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:km('
    ')}]}))(A)),Vn(R,"display"),pn(R,"aria-hidden"),v.hasFocus()&&xE(C);else{const F=In.getCurrent(C).exists($=>xp($.element));Qd.unblock(C),Mo(R,"display","none"),wo(R,"aria-hidden","true"),F&&v.focus()}})(n,r(),y,i.providers),((v,C)=>{v.dispatch("AfterProgressState",{state:C})})(n,y))};n.on("ProgressState",y=>{if(u.on(clearTimeout),Lt(y.time)){const v=tx.setEditorTimeout(n,()=>p(y.state),y.time);u.set(v)}else p(y.state),u.clear()})},wE=(n,r,i)=>({within:n,extra:r,withinWidth:i}),kE=(n,r,i)=>{const l=zo(n,(p,y)=>((v,C)=>{const O=i(v);return D.some({element:v,start:C,finish:C+O,width:O})})(y,p.len).fold(ue(p),v=>({len:v.finish,list:p.list.concat([v])})),{len:0,list:[]}).list,u=cn(l,p=>p.finish<=r),f=fn(u,(p,y)=>p+y.width,0);return{within:u,extra:l.slice(u.length),withinWidth:f}},Pw=n=>pt(n,r=>r.element),Jz=(n,r)=>{const i=pt(r,l=>Fi(l));Iu.setGroups(n,i)},Qz=(n,r,i)=>{const l=r.builtGroups.get();if(l.length===0)return;const u=Tp(n,r,"primary"),f=kr.getCoupled(n,"overflowGroup");Mo(u.element,"visibility","hidden");const p=l.concat([f]),y=ko(p,C=>Tr(C.element).bind(O=>C.getSystem().getByDom(O).toOptional()));i([]),Jz(u,p);const v=((C,O,A,R)=>{const F=((ae,X,Y)=>{const ne=kE(X,ae,Y);return ne.extra.length===0?D.some(ne):D.none()})(C,O,A).getOrThunk(()=>kE(O,C-A(R),A)),$=F.within,G=F.extra,J=F.withinWidth;return G.length===1&&G[0].width<=A(R)?((ae,X,Y)=>{const ne=Pw(ae.concat(X));return wE(ne,[],Y)})($,G,J):G.length>=1?((ae,X,Y,ne)=>{const ie=Pw(ae).concat([Y]);return wE(ie,Pw(X),ne)})($,G,R,J):((ae,X,Y)=>wE(Pw(ae),[],Y))($,0,J)})(Go(u.element),r.builtGroups.get(),C=>Math.ceil(C.element.dom.getBoundingClientRect().width),f);v.extra.length===0?(So.remove(u,f),i([])):(Jz(u,v.within),i(v.extra)),Vn(u.element,"visibility"),xl(u.element),y.each(Po.focus)},eN=ue([Jt("splitToolbarBehaviours",[kr]),ca("builtGroups",()=>so([]))]),YL=ue([fp(["overflowToggledClass"]),Xl("getOverflowBounds"),nt("lazySink"),ca("overflowGroups",()=>so([])),Dn("onOpened"),Dn("onClosed")].concat(eN())),XL=ue([nl({factory:Iu,schema:Cb(),name:"primary"}),zu({schema:Cb(),name:"overflow"}),zu({name:"overflow-button"}),zu({name:"overflow-group"})]),CE=ue((n,r)=>{((i,l)=>{const u=oo.max(i,l,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]);Mo(i,"max-width",u+"px")})(n,Math.floor(r))}),JL=ue([fp(["toggledClass"]),nt("lazySink"),Za("fetch"),Xl("getBounds"),Zs("fireDismissalEventInstead",[Ne("event",Ju())]),lf(),Dn("onToggled")]),QL=ue([zu({name:"button",overrides:n=>({dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:xt([No.config({toggleClass:n.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1,onToggled:n.onToggled})])})}),zu({factory:Iu,schema:Cb(),name:"toolbar",overrides:n=>({toolbarBehaviours:xt([po.config({mode:"cyclic",onEscape:r=>(Ts(r,n,"button").each(Po.focus),D.none())})])})})]),Iw=Nn(),a1=(n,r)=>{const i=kr.getCoupled(n,"toolbarSandbox");x.isOpen(i)?x.close(i):x.open(i,r.toolbar())},Rv=(n,r,i,l)=>{const u=i.getBounds.map(p=>p()),f=i.lazySink(n).getOrDie();Xa.positionWithinBounds(f,r,{anchor:{type:"hotspot",hotspot:n,layouts:l,overrides:{maxWidthFunction:CE()}}},u)},Fw=(n,r,i,l,u)=>{Iu.setGroups(r,u),Rv(n,r,i,l),No.on(n)},Vp=pl({name:"FloatingToolbarButton",factory:(n,r,i,l)=>({...Oi.sketch({...l.button(),action:u=>{a1(u,l)},buttonBehaviours:Oo({dump:l.button().buttonBehaviours},[kr.config({others:{toolbarSandbox:u=>((f,p,y)=>{const v=hp();return{dom:{tag:"div",attributes:{id:v.id}},behaviours:xt([po.config({mode:"special",onEscape:C=>(x.close(C),D.some(!0))}),x.config({onOpen:(C,O)=>{const A=Iw.get().getOr(!1);y.fetch().get(R=>{Fw(f,O,y,p.layouts,R),v.link(f.element),A||po.focusIn(O)})},onClose:()=>{No.off(f),Iw.get().getOr(!1)||Po.focus(f),v.unlink(f.element)},isPartOf:(C,O,A)=>el(O,A)||el(f,A),getAttachPoint:()=>y.lazySink(f).getOrDie()}),tl.config({channels:{...K({isExtraPart:Fe,...y.fireDismissalEventInstead.map(C=>({fireEventInstead:{event:C.event}})).getOr({})}),...he({doReposition:()=>{x.getState(kr.getCoupled(f,"toolbarSandbox")).each(C=>{Rv(f,C,y,p.layouts)})}})}})])}})(u,i,n)}})])}),apis:{setGroups:(u,f)=>{x.getState(kr.getCoupled(u,"toolbarSandbox")).each(p=>{Fw(u,p,n,i.layouts,f)})},reposition:u=>{x.getState(kr.getCoupled(u,"toolbarSandbox")).each(f=>{Rv(u,f,n,i.layouts)})},toggle:u=>{a1(u,l)},toggleWithoutFocusing:u=>{((f,p)=>{Iw.set(!0),a1(f,p),Iw.clear()})(u,l)},getToolbar:u=>x.getState(kr.getCoupled(u,"toolbarSandbox")),isOpen:u=>x.isOpen(kr.getCoupled(u,"toolbarSandbox"))}}),configFields:JL(),partFields:QL(),apis:{setGroups:(n,r,i)=>{n.setGroups(r,i)},reposition:(n,r)=>{n.reposition(r)},toggle:(n,r)=>{n.toggle(r)},toggleWithoutFocusing:(n,r)=>{n.toggleWithoutFocusing(r)},getToolbar:(n,r)=>n.getToolbar(r),isOpen:(n,r)=>n.isOpen(r)}}),eB=ue([nt("items"),fp(["itemSelector"]),Jt("tgroupBehaviours",[po])]),tB=ue([H_({name:"items",unit:"item"})]),i1=pl({name:"ToolbarGroup",configFields:eB(),partFields:tB(),factory:(n,r,i,l)=>({uid:n.uid,dom:n.dom,components:r,behaviours:Xo(n.tgroupBehaviours,[po.config({mode:"flow",selector:n.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}})}),Hw=n=>pt(n,r=>Fi(r)),Mv=(n,r,i)=>{Qz(n,i,l=>{i.overflowGroups.set(l),r.getOpt(n).each(u=>{Vp.setGroups(u,Hw(l))})})},SE=pl({name:"SplitFloatingToolbar",configFields:YL(),partFields:XL(),factory:(n,r,i,l)=>{const u=ns(Vp.sketch({fetch:()=>Bg(f=>{f(Hw(n.overflowGroups.get()))}),layouts:{onLtr:()=>[pr,mr],onRtl:()=>[mr,pr],onBottomLtr:()=>[us,Lr],onBottomRtl:()=>[Lr,us]},getBounds:i.getOverflowBounds,lazySink:n.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:n.markers.overflowToggledClass},parts:{button:l["overflow-button"](),toolbar:l.overflow()},onToggled:(f,p)=>n[p?"onOpened":"onClosed"](f)}));return{uid:n.uid,dom:n.dom,components:r,behaviours:Xo(n.splitToolbarBehaviours,[kr.config({others:{overflowGroup:()=>i1.sketch({...l["overflow-group"](),items:[u.asSpec()]})}})]),apis:{setGroups:(f,p)=>{n.builtGroups.set(pt(p,f.getSystem().build)),Mv(f,u,n)},refresh:f=>Mv(f,u,n),toggle:f=>{u.getOpt(f).each(p=>{Vp.toggle(p)})},toggleWithoutFocusing:f=>{u.getOpt(f).each(Vp.toggleWithoutFocusing)},isOpen:f=>u.getOpt(f).map(Vp.isOpen).getOr(!1),reposition:f=>{u.getOpt(f).each(p=>{Vp.reposition(p)})},getOverflow:f=>u.getOpt(f).bind(Vp.getToolbar)},domModification:{attributes:{role:"group"}}}},apis:{setGroups:(n,r,i)=>{n.setGroups(r,i)},refresh:(n,r)=>{n.refresh(r)},reposition:(n,r)=>{n.reposition(r)},toggle:(n,r)=>{n.toggle(r)},toggleWithoutFocusing:(n,r)=>{n.toggle(r)},isOpen:(n,r)=>n.isOpen(r),getOverflow:(n,r)=>n.getOverflow(r)}}),oB=ue([fp(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),Dn("onOpened"),Dn("onClosed")].concat(eN())),nB=ue([nl({factory:Iu,schema:Cb(),name:"primary"}),nl({factory:Iu,schema:Cb(),name:"overflow",overrides:n=>({toolbarBehaviours:xt([Il.config({dimension:{property:"height"},closedClass:n.markers.closedClass,openClass:n.markers.openClass,shrinkingClass:n.markers.shrinkingClass,growingClass:n.markers.growingClass,onShrunk:r=>{Ts(r,n,"overflow-button").each(i=>{No.off(i)}),n.onClosed(r)},onGrown:r=>{n.onOpened(r)},onStartGrow:r=>{Ts(r,n,"overflow-button").each(No.on)}}),po.config({mode:"acyclic",onEscape:r=>(Ts(r,n,"overflow-button").each(Po.focus),D.some(!0))})])})}),zu({name:"overflow-button",overrides:n=>({buttonBehaviours:xt([No.config({toggleClass:n.markers.overflowToggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])})}),zu({name:"overflow-group"})]),EE=(n,r,i)=>{Ts(n,r,"overflow-button").each(l=>{Ts(n,r,"overflow").each(u=>{if(AE(n,r),Il.hasShrunk(u)){const f=r.onOpened;r.onOpened=p=>{i||po.focusIn(u),f(p),r.onOpened=f}}else{const f=r.onClosed;r.onClosed=p=>{i||Po.focus(l),f(p),r.onClosed=f}}Il.toggleGrow(u)})})},AE=(n,r)=>{Ts(n,r,"overflow").each(i=>{Qz(n,r,l=>{const u=pt(l,f=>Fi(f));Iu.setGroups(i,u)}),Ts(n,r,"overflow-button").each(l=>{Il.hasGrown(i)&&No.on(l)}),Il.refresh(i)})},TE=pl({name:"SplitSlidingToolbar",configFields:oB(),partFields:nB(),factory:(n,r,i,l)=>{const u="alloy.toolbar.toggle";return{uid:n.uid,dom:n.dom,components:r,behaviours:Xo(n.splitToolbarBehaviours,[kr.config({others:{overflowGroup:f=>i1.sketch({...l["overflow-group"](),items:[Oi.sketch({...l["overflow-button"](),action:p=>{Qo(f,u)}})]})}}),en("toolbar-toggle-events",[Xe(u,f=>{EE(f,n,!1)})])]),apis:{setGroups:(f,p)=>{((y,v)=>{const C=pt(v,y.getSystem().build);n.builtGroups.set(C)})(f,p),AE(f,n)},refresh:f=>AE(f,n),toggle:f=>{EE(f,n,!1)},toggleWithoutFocusing:f=>{EE(f,n,!0)},isOpen:f=>((p,y)=>Ts(p,y,"overflow").map(Il.hasGrown).getOr(!1))(f,n)},domModification:{attributes:{role:"group"}}}},apis:{setGroups:(n,r,i)=>{n.setGroups(r,i)},refresh:(n,r)=>{n.refresh(r)},toggle:(n,r)=>{n.toggle(r)},isOpen:(n,r)=>n.isOpen(r)}}),tN=n=>{const r=n.title.fold(()=>({}),i=>({attributes:{title:i}}));return{dom:{tag:"div",classes:["tox-toolbar__group"],...r},components:[i1.parts.items({})],items:n.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled]), .tox-number-input:not([disabled])"},tgroupBehaviours:xt([ws.config({}),Po.config({})])}},$w=n=>i1.sketch(tN(n)),oN=(n,r)=>{const i=Ss(l=>{const u=pt(n.initGroups,$w);Iu.setGroups(l,u)});return xt([Nx(n.providers.isDisabled),Ca(),po.config({mode:r,onEscape:n.onEscape,selector:".tox-toolbar__group"}),en("toolbar-events",[i])])},nN=n=>{const r=n.cyclicKeying?"cyclic":"acyclic";return{uid:n.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":tN({title:D.none(),items:[]}),"overflow-button":hz({name:"more",icon:D.some("more-drawer"),enabled:!0,tooltip:D.some("Reveal or hide additional toolbar items"),primary:!1,buttonType:D.none(),borderless:!1},D.none(),n.providers,[],"overflow-button")},splitToolbarBehaviours:oN(n,r)}},sB=n=>{const r=nN(n),i=SE.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return SE.sketch({...r,lazySink:n.getSink,getOverflowBounds:()=>{const l=n.moreDrawerData.lazyHeader().element,u=Va(l),f=Ki(l),p=Va(f),y=Math.max(f.dom.scrollHeight,p.height);return rn(u.x+4,p.y,u.width-8,y)},parts:{...r.parts,overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:n.attributes}}},components:[i],markers:{overflowToggledClass:"tox-tbtn--enabled"},onOpened:l=>n.onToggled(l,!0),onClosed:l=>n.onToggled(l,!1)})},rB=n=>{const r=TE.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),i=TE.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),l=nN(n);return TE.sketch({...l,components:[r,i],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:u=>{u.getSystem().broadcastOn([Rw()],{type:"opened"}),n.onToggled(u,!0)},onClosed:u=>{u.getSystem().broadcastOn([Rw()],{type:"closed"}),n.onToggled(u,!1)}})},OE=n=>{const r=n.cyclicKeying?"cyclic":"acyclic";return Iu.sketch({uid:n.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(n.type===Vd.scrolling?["tox-toolbar--scrolling"]:[])},components:[Iu.parts.groups({})],toolbarBehaviours:oN(n,r)})},sN=[Mg,Zd,Us("tooltip"),Ol("buttonType","secondary",["primary","secondary"]),xr("borderless",!1),Za("onAction")],zE={button:[...sN,Ud,Al("type",["button"])],togglebutton:[...sN,xr("active",!1),Al("type",["togglebutton"])]},aB=[Al("type",["group"]),Jn("buttons",[],_r("type",zE))],iB=_r("type",{...zE,group:aB}),Pm=ho([Jn("buttons",[],iB),Za("onShow"),Za("onHide")]),rN=(n,r)=>((i,l)=>{var u,f;const p=i.type==="togglebutton",y=i.icon.map(X=>Zg(X,l.icons)).map(ns),v={...i,name:p?i.text.getOr(i.icon.getOr("")):(u=i.text)!==null&&u!==void 0?u:i.icon.getOr(""),primary:i.buttonType==="primary",buttonType:D.from(i.buttonType),tooltip:i.tooltip,icon:i.icon,enabled:!0,borderless:i.borderless},C=ZS((f=i.buttonType)!==null&&f!==void 0?f:"secondary"),O=p?i.text.map(l.translate):D.some(l.translate(i.text)),A=O.map(wr),R=v.tooltip.or(O).map(X=>({"aria-label":l.translate(X)})).getOr({}),F=y.map(X=>X.asSpec()),$=jy([F,A]),G=i.icon.isSome()&&A.isSome(),J={tag:"button",classes:C.concat(...i.icon.isSome()&&!G?["tox-button--icon"]:[]).concat(...G?["tox-button--icon-and-text"]:[]).concat(...i.borderless?["tox-button--naked"]:[]).concat(...i.type==="togglebutton"&&i.active?["tox-button--enabled"]:[]),attributes:R},ae=Av(v,D.some(X=>{const Y=ne=>{y.map(ie=>ie.getOpt(X).each(de=>{So.set(de,[Zg(ne,l.icons)])}))};return p?i.onAction({setIcon:Y,setActive:ne=>{const ie=X.element;ne?(At(ie,"tox-button--enabled"),wo(ie,"aria-pressed",!0)):(co(ie,"tox-button--enabled"),pn(ie,"aria-pressed"))},isActive:()=>_n(X.element,"tox-button--enabled")}):i.type==="button"?i.onAction({setIcon:Y}):void 0}),[],J,$,i.tooltip,l);return Oi.sketch(ae)})(n,r),aN=Yr().deviceType,NE=aN.isPhone(),ei=aN.isTablet();var l1=pl({name:"silver.View",configFields:[nt("viewConfig")],partFields:[id({factory:{sketch:n=>{let r=!1;const i=pt(n.buttons,l=>l.type==="group"?(r=!0,((u,f)=>({dom:{tag:"div",classes:["tox-view__toolbar__group"]},components:pt(u.buttons,p=>rN(p,f))}))(l,n.providers)):rN(l,n.providers));return{uid:n.uid,dom:{tag:"div",classes:[r?"tox-view__toolbar":"tox-view__header",...NE||ei?["tox-view--mobile","tox-view--scrolling"]:[]]},behaviours:xt([Po.config({}),po.config({mode:"flow",selector:"button, .tox-button",focusInside:Kh.OnEnterOrSpaceMode})]),components:r?i:[Mu.sketch({dom:{tag:"div",classes:["tox-view__header-start"]},components:[]}),Mu.sketch({dom:{tag:"div",classes:["tox-view__header-end"]},components:i})]}}},schema:[nt("buttons"),nt("providers")],name:"header"}),id({factory:{sketch:n=>({uid:n.uid,behaviours:xt([Po.config({}),ws.config({})]),dom:{tag:"div",classes:["tox-view__pane"]}})},schema:[],name:"pane"})],factory:(n,r,i,l)=>{const u={getPane:f=>Qa.getPart(f,n,"pane"),getOnShow:f=>n.viewConfig.onShow,getOnHide:f=>n.viewConfig.onHide};return{uid:n.uid,dom:n.dom,components:r,behaviours:xt([Po.config({}),po.config({mode:"cyclic",focusInside:Kh.OnEnterOrSpaceMode})]),apis:u}},apis:{getPane:(n,r)=>n.getPane(r),getOnShow:(n,r)=>n.getOnShow(r),getOnHide:(n,r)=>n.getOnHide(r)}});const lB=(n,r,i)=>Is(r,(l,u)=>{const f=Ua(Ms("view",Pm,l));return n.slot(u,l1.sketch({dom:{tag:"div",classes:["tox-view"]},viewConfig:f,components:[...f.buttons.length>0?[l1.parts.header({buttons:f.buttons,providers:i})]:[],l1.parts.pane({})]}))}),cB=(n,r)=>rl.sketch(i=>({dom:{tag:"div",classes:["tox-view-wrap__slot-container"]},components:lB(i,n,r),slotBehaviours:rv([Ss(l=>rl.hideAllSlots(l))])})),iN=n=>j(rl.getSlotNames(n),r=>rl.isShowing(n,r)),lN=(n,r,i)=>{rl.getSlot(n,r).each(l=>{l1.getPane(l).each(u=>{var f;i(l)((f=u.element.dom,{getContainer:ue(f)}))})})};var Vw=ld({factory:(n,r)=>{const i={setViews:(l,u)=>{So.set(l,[cB(u,r.backstage.shared.providers)])},whichView:l=>In.getCurrent(l).bind(iN),toggleView:(l,u,f,p)=>In.getCurrent(l).exists(y=>{const v=iN(y),C=v.exists(A=>p===A),O=rl.getSlot(y,p).isSome();return O&&(rl.hideAllSlots(y),C?((A=>{const R=A.element;Mo(R,"display","none"),wo(R,"aria-hidden","true")})(l),u()):(f(),(A=>{const R=A.element;Vn(R,"display"),pn(R,"aria-hidden")})(l),rl.showSlot(y,p),((A,R)=>{lN(A,R,l1.getOnShow)})(y,p)),v.each(A=>((R,F)=>lN(R,F,l1.getOnHide))(y,A))),O})};return{uid:n.uid,dom:{tag:"div",classes:["tox-view-wrap"],attributes:{"aria-hidden":"true"},styles:{display:"none"}},components:[],behaviours:xt([So.config({}),In.config({find:l=>{const u=So.contents(l);return yt(u)}})]),apis:i}},name:"silver.ViewWrapper",configFields:[nt("backstage")],apis:{setViews:(n,r,i)=>n.setViews(r,i),toggleView:(n,r,i,l,u)=>n.toggleView(r,i,l,u),whichView:(n,r)=>n.whichView(r)}});const dB=Lm.optional({factory:bE,name:"menubar",schema:[nt("backstage")]}),uB=Lm.optional({factory:{sketch:n=>fE.sketch({uid:n.uid,dom:n.dom,listBehaviours:xt([po.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:()=>OE({type:n.type,uid:Xt("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:n.providers,onEscape:()=>(n.onEscape(),D.some(!0))}),setupItem:(r,i,l,u)=>{Iu.setGroups(i,l)},shell:!0})},name:"multiple-toolbar",schema:[nt("dom"),nt("onEscape")]}),fB=Lm.optional({factory:{sketch:n=>(i=>i.type===Vd.sliding?rB:i.type===Vd.floating?sB:OE)(n)({type:n.type,uid:n.uid,onEscape:()=>(n.onEscape(),D.some(!0)),onToggled:(i,l)=>n.onToolbarToggled(l),cyclicKeying:!1,initGroups:[],getSink:n.getSink,providers:n.providers,moreDrawerData:{lazyToolbar:n.lazyToolbar,lazyMoreButton:n.lazyMoreButton,lazyHeader:n.lazyHeader},attributes:n.attributes})},name:"toolbar",schema:[nt("dom"),nt("onEscape"),nt("getSink")]}),mB=Lm.optional({factory:{sketch:n=>{const r=n.editor,i=n.sticky?Wz:Dw;return{uid:n.uid,dom:n.dom,components:n.components,behaviours:xt(i(r,n.sharedBackstage))}}},name:"header",schema:[nt("dom")]}),pB=Lm.optional({factory:{sketch:n=>({uid:n.uid,dom:n.dom,components:[{dom:{tag:"a",attributes:{href:"https://www.tiny.cloud/tinymce-self-hosted-premium-features/?utm_campaign=self_hosted_upgrade_promo&utm_source=tiny&utm_medium=referral",rel:"noopener",target:"_blank","aria-hidden":"true"},classes:["tox-promotion-link"],innerHtml:"⚡️Upgrade"}}]})},name:"promotion",schema:[nt("dom")]}),gB=Lm.optional({name:"socket",schema:[nt("dom")]}),hB=Lm.optional({factory:{sketch:n=>({uid:n.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"presentation"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:xt([ws.config({}),Po.config({}),Il.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:r=>{In.getCurrent(r).each(rl.hideAllSlots),Qo(r,_E)},onGrown:r=>{Qo(r,_E)},onStartGrow:r=>{lo(r,vE,{width:er(r.element,"width").getOr("")})},onStartShrink:r=>{lo(r,vE,{width:Go(r.element)+"px"})}}),So.config({}),In.config({find:r=>{const i=So.contents(r);return yt(i)}})])}],behaviours:xt([pS(0),en("sidebar-sliding-events",[Xe(vE,(r,i)=>{Mo(r.element,"width",i.event.width)}),Xe(_E,(r,i)=>{Vn(r.element,"width")})])])})},name:"sidebar",schema:[nt("dom")]}),bB=Lm.optional({factory:{sketch:n=>({uid:n.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:xt([So.config({}),Qd.config({focus:!1}),In.config({find:r=>yt(r.components())})]),components:[]})},name:"throbber",schema:[nt("dom")]}),yB=Lm.optional({factory:Vw,name:"viewWrapper",schema:[nt("backstage")]}),vB=Lm.optional({factory:{sketch:n=>({uid:n.uid,dom:{tag:"div",classes:["tox-editor-container"]},components:n.components})},name:"editorContainer",schema:[]});var Ls=pl({name:"OuterContainer",factory:(n,r,i)=>{let l=!1;const u=p=>{As(p,".tox-statusbar").each(y=>{Ns(y,"display")==="none"&&yr(y,"aria-hidden")==="true"?(Vn(y,"display"),pn(y,"aria-hidden")):(Mo(y,"display","none"),wo(y,"aria-hidden","true"))})},f={getSocket:p=>Qa.getPart(p,n,"socket"),setSidebar:(p,y,v)=>{Qa.getPart(p,n,"sidebar").each(C=>((O,A,R)=>{In.getCurrent(O).each(F=>{So.set(F,[Yz(A)]);const $=R==null?void 0:R.toLowerCase();te($)&&Vo(A,$)&&In.getCurrent(F).each(G=>{rl.showSlot(G,$),Il.immediateGrow(F),Vn(F.element,"width"),Bw(O.element,"region")})})})(C,y,v))},toggleSidebar:(p,y)=>{Qa.getPart(p,n,"sidebar").each(v=>((C,O)=>{In.getCurrent(C).each(A=>{In.getCurrent(A).each(R=>{Il.hasGrown(A)?rl.isShowing(R,O)?(Il.shrink(A),Bw(C.element,"presentation")):(rl.hideAllSlots(R),rl.showSlot(R,O),Bw(C.element,"region")):(rl.hideAllSlots(R),rl.showSlot(R,O),Il.grow(A),Bw(C.element,"region"))})})})(v,y))},whichSidebar:p=>Qa.getPart(p,n,"sidebar").bind(qL).getOrNull(),getHeader:p=>Qa.getPart(p,n,"header"),getToolbar:p=>Qa.getPart(p,n,"toolbar"),setToolbar:(p,y)=>{Qa.getPart(p,n,"toolbar").each(v=>{const C=pt(y,$w);v.getApis().setGroups(v,C)})},setToolbars:(p,y)=>{Qa.getPart(p,n,"multiple-toolbar").each(v=>{const C=pt(y,O=>pt(O,$w));fE.setItems(v,C)})},refreshToolbar:p=>{Qa.getPart(p,n,"toolbar").each(y=>y.getApis().refresh(y))},toggleToolbarDrawer:p=>{Qa.getPart(p,n,"toolbar").each(y=>{oi(y.getApis().toggle,v=>v(y))})},toggleToolbarDrawerWithoutFocusing:p=>{Qa.getPart(p,n,"toolbar").each(y=>{oi(y.getApis().toggleWithoutFocusing,v=>v(y))})},isToolbarDrawerToggled:p=>Qa.getPart(p,n,"toolbar").bind(y=>D.from(y.getApis().isOpen).map(v=>v(y))).getOr(!1),getThrobber:p=>Qa.getPart(p,n,"throbber"),focusToolbar:p=>{Qa.getPart(p,n,"toolbar").orThunk(()=>Qa.getPart(p,n,"multiple-toolbar")).each(y=>{po.focusIn(y)})},setMenubar:(p,y)=>{Qa.getPart(p,n,"menubar").each(v=>{bE.setMenus(v,y)})},focusMenubar:p=>{Qa.getPart(p,n,"menubar").each(y=>{bE.focus(y)})},setViews:(p,y)=>{Qa.getPart(p,n,"viewWrapper").each(v=>{Vw.setViews(v,y)})},toggleView:(p,y)=>Qa.getPart(p,n,"viewWrapper").exists(v=>Vw.toggleView(v,()=>f.showMainView(p),()=>f.hideMainView(p),y)),whichView:p=>Qa.getPart(p,n,"viewWrapper").bind(Vw.whichView).getOrNull(),hideMainView:p=>{l=f.isToolbarDrawerToggled(p),l&&f.toggleToolbarDrawer(p),Qa.getPart(p,n,"editorContainer").each(y=>{const v=y.element;u(v),Mo(v,"display","none"),wo(v,"aria-hidden","true")})},showMainView:p=>{l&&f.toggleToolbarDrawer(p),Qa.getPart(p,n,"editorContainer").each(y=>{const v=y.element;u(v),Vn(v,"display"),pn(v,"aria-hidden")})}};return{uid:n.uid,dom:n.dom,components:r,apis:f,behaviours:n.behaviours}},configFields:[nt("dom"),nt("behaviours")],partFields:[mB,dB,fB,uB,gB,hB,pB,bB,yB,vB],apis:{getSocket:(n,r)=>n.getSocket(r),setSidebar:(n,r,i,l)=>{n.setSidebar(r,i,l)},toggleSidebar:(n,r,i)=>{n.toggleSidebar(r,i)},whichSidebar:(n,r)=>n.whichSidebar(r),getHeader:(n,r)=>n.getHeader(r),getToolbar:(n,r)=>n.getToolbar(r),setToolbar:(n,r,i)=>{n.setToolbar(r,i)},setToolbars:(n,r,i)=>{n.setToolbars(r,i)},refreshToolbar:(n,r)=>n.refreshToolbar(r),toggleToolbarDrawer:(n,r)=>{n.toggleToolbarDrawer(r)},toggleToolbarDrawerWithoutFocusing:(n,r)=>{n.toggleToolbarDrawerWithoutFocusing(r)},isToolbarDrawerToggled:(n,r)=>n.isToolbarDrawerToggled(r),getThrobber:(n,r)=>n.getThrobber(r),setMenubar:(n,r,i)=>{n.setMenubar(r,i)},focusMenubar:(n,r)=>{n.focusMenubar(r)},focusToolbar:(n,r)=>{n.focusToolbar(r)},setViews:(n,r,i)=>{n.setViews(r,i)},toggleView:(n,r,i)=>n.toggleView(r,i),whichView:(n,r)=>n.whichView(r)}});const cN={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"}},DE=n=>n.split(" "),dN=(n,r)=>{const i={...cN,...r.menus},l=tn(r.menus).length>0,u=r.menubar===void 0||r.menubar===!0?DE("file edit view insert format tools table help"):DE(r.menubar===!1?"":r.menubar),f=cn(u,y=>{const v=Vo(cN,y);return l?v||St(r.menus,y).exists(C=>Vo(C,"items")):v}),p=pt(f,y=>{const v=i[y];return((C,O,A)=>{const R=T4(A).split(/[ ,]/);return{text:C.title,getItems:()=>Sn(C.items,F=>{const $=F.toLowerCase();return $.trim().length===0||Ao(R,G=>G===$)?[]:$==="separator"||$==="|"?[{type:"separator"}]:O.menuItems[$]?[O.menuItems[$]]:[]})}})({title:v.title,items:DE(v.items)},r,n)});return cn(p,y=>y.getItems().length>0&&Ao(y.getItems(),v=>te(v)||v.type!=="separator"))},uN=(n,r,i)=>(n.on("remove",()=>i.unload(r)),i.load(r)),RE=(n,r,i,l)=>(n.on("remove",()=>l.unloadRawCss(r)),l.loadRawCss(r,i)),_B=async(n,r)=>{const i="ui/"+dx(n).getOr("default")+"/skin.css",l=tinymce.Resource.get(i);if(!te(l)){const u=n.editorManager.suffix;return uN(n,r+`/skin${u}.css`,n.ui.styleSheetLoader)}RE(n,i,l,n.ui.styleSheetLoader)},xB=async(n,r)=>{var i;if(i=Vt(n.getElement()),wi(i).isSome()){const l="ui/"+dx(n).getOr("default")+"/skin.shadowdom.css",u=tinymce.Resource.get(l);if(!te(u)){const f=n.editorManager.suffix;return uN(n,r+`/skin.shadowdom${f}.css`,My.DOM.styleSheetLoader)}RE(n,l,u,My.DOM.styleSheetLoader)}},fN=(n,r)=>(async(i,l)=>{const u=()=>{const p=cx(l),y=l.editorManager.suffix;p&&l.contentCSS.push(p+(i?"/content.inline":"/content")+`${y}.css`)};dx(l).fold(u,p=>{const y="ui/"+p+(i?"/content.inline":"/content")+".css",v=tinymce.Resource.get(y);te(v)?RE(l,y,v,l.ui.styleSheetLoader):u()});const f=cx(l);if(!Eg(l)&&te(f))return Promise.all([_B(l,f),xB(l,f)]).then()})(n,r).then((i=>{const l=()=>{i._skinLoaded=!0,(u=>{u.dispatch("SkinLoaded")})(i)};return()=>{i.initialized?l():i.on("init",l)}})(r),((i,l)=>()=>((u,f)=>{u.dispatch("SkinLoadError",f)})(i,{message:"Skin could not be loaded"}))(r)),mN=ot(fN,!1),wB=ot(fN,!0),Sb=(n,r,i)=>yl(i)?n.translate(r):n.translate([r,n.translate(i)]),kB=(n,r)=>{const i=(f,p,y,v)=>{const C=n.shared.providers.translate(f.title);if(f.type==="separator")return D.some({type:"separator",text:C});if(f.type==="submenu"){const O=Sn(f.getStyleItems(),A=>l(A,p,v));return p===0&&O.length<=0?D.none():D.some({type:"nestedmenuitem",text:C,enabled:O.length>0,getSubmenuItems:()=>Sn(f.getStyleItems(),A=>l(A,p,v))})}return D.some({type:"togglemenuitem",text:C,icon:f.icon,active:f.isSelected(v),enabled:!y,onAction:r.onAction(f),...f.getStylePreview().fold(()=>({}),O=>({meta:{style:O}}))})},l=(f,p,y)=>{const v=f.type==="formatter"&&r.isInvalid(f);return p===0?v?[]:i(f,p,!1,y).toArray():i(f,p,v,y).toArray()},u=f=>{const p=r.getCurrentValue(),y=r.shouldHide?0:1;return Sn(f,v=>l(v,y,p))};return{validateItems:u,getFetch:(f,p)=>(y,v)=>{const C=p(),O=u(C);v(wb(O,Cf.CLOSE_ON_EXECUTE,f,{isHorizontalMenu:!1,search:D.none()}))}}},c1=(n,r)=>{const i=r.dataset,l=i.type==="basic"?()=>pt(i.data,u=>Dz(u,r.isSelectedFor,r.getPreviewFor)):i.getData;return{items:kB(n,r),getStyleItems:l}},Lv=(n,r,i,l,u,f)=>{const{items:p,getStyleItems:y}=c1(r,i),v=so(i.tooltip);return DS({text:i.icon.isSome()?D.none():i.text,icon:i.icon,ariaLabel:D.some(i.tooltip),tooltip:D.none(),role:D.none(),fetch:p.getFetch(r,y),onSetup:C=>{const O=A=>C.setTooltip(Sb(n,l(A.value),A.value));return n.on(u,O),qy(pb(n,"NodeChange",A=>{const R=A.getComponent();i.updateText(R),Fo.set(A.getComponent(),!n.selection.isEditable())})(C),()=>n.off(u,O))},getApi:C=>({getComponent:ue(C),setTooltip:O=>{const A=r.shared.providers.translate(O);wo(C.element,"aria-label",A),v.set(O)}}),columns:1,presets:"normal",classes:i.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[Pr.config({...r.shared.providers.tooltips.getConfig({tooltipText:r.shared.providers.translate(i.tooltip),onShow:C=>{if(i.tooltip!==v.get()){const O=r.shared.providers.translate(v.get());Pr.setComponents(C,r.shared.providers.tooltips.getComponents({tooltipText:O}))}}})})]},"tox-tbtn",r.shared,f)};var Eb;(function(n){n[n.SemiColon=0]="SemiColon",n[n.Space=1]="Space"})(Eb||(Eb={}));const ME=(n,r,i)=>{const l=(u=((f,p)=>p===Eb.SemiColon?f.replace(/;$/,"").split(";"):f.split(" "))(n.options.get(r),i),pt(u,f=>{let p=f,y=f;const v=f.split("=");return v.length>1&&(p=v[0],y=v[1]),{title:p,format:y}}));var u;return{type:"basic",data:l}},pN=ue("Alignment {0}"),gN="left",LE=[{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"}],BE=n=>{const r={type:"basic",data:LE};return{tooltip:Sb(n,pN(),gN),text:D.none(),icon:D.some("align-left"),isSelectedFor:i=>()=>n.formatter.match(i),getCurrentValue:D.none,getPreviewFor:i=>D.none,onAction:i=>()=>j(LE,l=>l.format===i.format).each(l=>n.execCommand(l.command)),updateText:i=>{const l=j(LE,u=>n.formatter.match(u.format)).fold(ue(gN),u=>u.title.toLowerCase());lo(i,Yd,{icon:`align-${l}`}),((u,f)=>{u.dispatch("AlignTextUpdate",f)})(n,{value:l})},dataset:r,shouldHide:!1,isInvalid:i=>!n.formatter.canApply(i.format)}},hN=(n,r)=>{const i=r(),l=pt(i,u=>u.format);return D.from(n.formatter.closest(l)).bind(u=>j(i,f=>f.format===u))},PE=ue("Block {0}"),IE="Paragraph",FE=n=>{const r=ME(n,"block_formats",Eb.SemiColon);return{tooltip:Sb(n,PE(),IE),text:D.some(IE),icon:D.none(),isSelectedFor:i=>()=>n.formatter.match(i),getCurrentValue:D.none,getPreviewFor:i=>()=>{const l=n.formatter.get(i);return l?D.some({tag:l.length>0&&(l[0].inline||l[0].block)||"div",styles:n.dom.parseStyle(n.formatter.getCssText(i))}):D.none()},onAction:Z3(n),updateText:i=>{const l=hN(n,()=>r.data).fold(ue(IE),u=>u.title);lo(i,pd,{text:l}),((u,f)=>{u.dispatch("BlocksTextUpdate",f)})(n,{value:l})},dataset:r,shouldHide:!1,isInvalid:i=>!n.formatter.canApply(i.format)}},bN=ue("Font {0}"),HE="System Font",CB=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],yN=n=>{const r=n.split(/\s*,\s*/);return pt(r,i=>i.replace(/^['"]+|['"]+$/g,""))},vN=(n,r)=>r.length>0&&hi(r,i=>n.indexOf(i.toLowerCase())>-1),_N=n=>{const r=()=>{const l=C=>C?yN(C)[0]:"",u=n.queryCommandValue("FontName"),f=i.data,p=u?u.toLowerCase():"",y=lx(n);return{matchOpt:j(f,C=>{const O=C.format;return O.toLowerCase()===p||l(O).toLowerCase()===l(p).toLowerCase()}).orThunk(()=>nn(((C,O)=>{if(C.indexOf("-apple-system")===0||O.length>0){const A=yN(C.toLowerCase());return vN(A,CB)||vN(A,O)}return!1})(p,y),{title:HE,format:p})),font:u}},i=ME(n,"font_family_formats",Eb.SemiColon);return{tooltip:Sb(n,bN(),HE),text:D.some(HE),icon:D.none(),isSelectedFor:l=>u=>u.exists(f=>f.format===l),getCurrentValue:()=>{const{matchOpt:l}=r();return l},getPreviewFor:l=>()=>D.some({tag:"div",styles:l.indexOf("dings")===-1?{"font-family":l}:{}}),onAction:l=>()=>{n.undoManager.transact(()=>{n.focus(),n.execCommand("FontName",!1,l.format)})},updateText:l=>{const{matchOpt:u,font:f}=r(),p=u.fold(ue(f),y=>y.title);lo(l,pd,{text:p}),((y,v)=>{y.dispatch("FontFamilyTextUpdate",v)})(n,{value:p})},dataset:i,shouldHide:!1,isInvalid:Fe}},SB={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:[""]},EB=(()=>{const n="[0-9]+",r="[eE][+-]?"+n,i=u=>`(?:${u})?`,l=["Infinity",n+"\\."+i(n)+i(r),"\\."+n+i(r),n+i(r)].join("|");return new RegExp(`^([+-]?(?:${l}))(.*)$`)})(),jw=(n,r)=>D.from(EB.exec(n)).bind(i=>{const l=Number(i[1]),u=i[2];return((f,p)=>Ao(p,y=>Ao(SB[y],v=>f===v)))(u,r)?D.some({value:l,unit:u}):D.none()}),xN={tab:ue(9),escape:ue(27),enter:ue(13),backspace:ue(8),delete:ue(46),left:ue(37),up:ue(38),right:ue(39),down:ue(40),space:ue(32),home:ue(36),end:ue(35),pageUp:ue(33),pageDown:ue(34)},wN=ue("Font size {0}"),kN="12pt",AB={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},CN={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},TB=(n,r)=>/[0-9.]+px$/.test(n)?((i,l)=>{const u=Math.pow(10,l);return Math.round(i*u)/u})(72*parseInt(n,10)/96,r||0)+"pt":St(CN,n).getOr(n),OB=n=>St(AB,n).getOr(""),SN=n=>{const r=()=>{let u=D.none();const f=l.data,p=n.queryCommandValue("FontSize");if(p)for(let y=3;u.isNone()&&y>=0;y--){const v=TB(p,y),C=OB(v);u=j(f,O=>O.format===p||O.format===v||O.format===C)}return{matchOpt:u,size:p}},i=ue(D.none),l=ME(n,"font_size_formats",Eb.Space);return{tooltip:Sb(n,wN(),kN),text:D.some(kN),icon:D.none(),isSelectedFor:u=>f=>f.exists(p=>p.format===u),getPreviewFor:i,getCurrentValue:()=>{const{matchOpt:u}=r();return u},onAction:u=>()=>{n.undoManager.transact(()=>{n.focus(),n.execCommand("FontSize",!1,u.format)})},updateText:u=>{const{matchOpt:f,size:p}=r(),y=f.fold(ue(p),v=>v.title);lo(u,pd,{text:y}),((v,C)=>{v.dispatch("FontSizeTextUpdate",C)})(n,{value:y})},dataset:l,shouldHide:!1,isInvalid:Fe}},EN=n=>yl(n)?"Formats":"Format {0}",AN=(n,r)=>{const i="Formats";return{tooltip:Sb(n,EN(""),""),text:D.some(i),icon:D.none(),isSelectedFor:l=>()=>n.formatter.match(l),getCurrentValue:D.none,getPreviewFor:l=>()=>{const u=n.formatter.get(l);return u!==void 0?D.some({tag:u.length>0&&(u[0].inline||u[0].block)||"div",styles:n.dom.parseStyle(n.formatter.getCssText(l))}):D.none()},onAction:Z3(n),updateText:l=>{const u=y=>Oz(y)?Sn(y.items,u):zz(y)?[{title:y.title,format:y.format}]:[],f=Sn(Nz(n),u),p=hN(n,ue(f)).fold(ue({title:i,tooltipLabel:""}),y=>({title:y.title,tooltipLabel:y.title}));lo(l,pd,{text:p.title}),((y,v)=>{y.dispatch("StylesTextUpdate",v)})(n,{value:p.tooltipLabel})},shouldHide:A4(n),isInvalid:l=>!n.formatter.canApply(l.format),dataset:r}},$E=ue([nt("toggleClass"),nt("fetch"),Pd("onExecute"),Ne("getHotspot",D.some),Ne("getAnchorOverrides",ue({})),lf(),Pd("onItemExecute"),vn("lazySink"),nt("dom"),Dn("onOpen"),Jt("splitDropdownBehaviours",[kr,po,Po]),Ne("matchWidth",!1),Ne("useMinWidth",!1),Ne("eventOrder",{}),vn("role"),vn("listRole")].concat(IC())),zB=nl({factory:Oi,schema:[nt("dom")],name:"arrow",defaults:()=>({buttonBehaviours:xt([Po.revoke()])}),overrides:n=>({dom:{tag:"span",attributes:{role:"presentation"}},action:r=>{r.getSystem().getByUid(n.uid).each(Ld)},buttonBehaviours:xt([No.config({toggleOnExecute:!1,toggleClass:n.toggleClass})])})}),NB=nl({factory:Oi,schema:[nt("dom")],name:"button",defaults:()=>({buttonBehaviours:xt([Po.revoke()])}),overrides:n=>({dom:{tag:"span",attributes:{role:"presentation"}},action:r=>{r.getSystem().getByUid(n.uid).each(i=>{n.onExecute(i,r)})}})}),DB=ue([zB,NB,id({factory:{sketch:n=>({uid:n.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:n.text}})},schema:[nt("text")],name:"aria-descriptor"}),zu({schema:[up()],name:"menu",defaults:n=>({onExecute:(r,i)=>{r.getSystem().getByUid(n.uid).each(l=>{n.onItemExecute(l,r,i)})}})}),iO()]),Bv=pl({name:"SplitDropdown",configFields:$E(),partFields:DB(),factory:(n,r,i,l)=>{const u=C=>{In.getCurrent(C).each(O=>{ss.highlightFirst(O),po.focusIn(O)})},f=C=>{LC(n,Ct,C,l,u,ji.HighlightMenuAndItem).get(Ke)},p=C=>{const O=Tp(C,n,"button");return Ld(O),D.some(!0)},y={...$o([Ss((C,O)=>{Ts(C,n,"aria-descriptor").each(A=>{const R=Xt("aria");wo(A.element,"id",R),wo(C.element,"aria-describedby",R)})})]),...Ry(D.some(f))},v={repositionMenus:C=>{No.isOn(C)&&dO(C)}};return{uid:n.uid,dom:n.dom,components:r,apis:v,eventOrder:{...n.eventOrder,[di()]:["disabling","toggling","alloy.base.behaviour"]},events:y,behaviours:Xo(n.splitDropdownBehaviours,[kr.config({others:{sandbox:C=>{const O=Tp(C,n,"arrow");return PC(n,C,{onOpen:()=>{No.on(O),No.on(C)},onClose:()=>{No.off(O),No.off(C)}})}}}),po.config({mode:"special",onSpace:p,onEnter:p,onDown:C=>(f(C),D.some(!0))}),Po.config({}),No.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:n.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:(n,r)=>n.repositionMenus(r)}}),VE=n=>({isEnabled:()=>!Fo.isDisabled(n),setEnabled:r=>Fo.set(n,!r),setText:r=>lo(n,pd,{text:r}),setIcon:r=>lo(n,Yd,{icon:r})}),RB=n=>({setActive:r=>{No.set(n,r)},isActive:()=>No.isOn(n),isEnabled:()=>!Fo.isDisabled(n),setEnabled:r=>Fo.set(n,!r),setText:r=>lo(n,pd,{text:r}),setIcon:r=>lo(n,Yd,{icon:r})}),TN=(n,r)=>n.map(i=>({"aria-label":r.translate(i)})).getOr({}),jE=Xt("focus-button"),UE=(n,r,i,l,u,f)=>{const p=r.map(v=>ns(NS(v,"tox-tbtn",u))),y=n.map(v=>ns(Zg(v,u.icons)));return{dom:{tag:"button",classes:["tox-tbtn"].concat(r.isSome()?["tox-tbtn--select"]:[]),attributes:{...TN(i,u),...st(f)?{"data-mce-name":f}:{}}},components:jy([y.map(v=>v.asSpec()),p.map(v=>v.asSpec())]),eventOrder:{[at()]:["focusing","alloy.base.behaviour",Ug],[ka()]:[Ug,"toolbar-group-button-events"]},buttonBehaviours:xt([Nx(u.isDisabled),Ca(),en(Ug,[Ss((v,C)=>yw(v)),Xe(pd,(v,C)=>{p.bind(O=>O.getOpt(v)).each(O=>{So.set(O,[wr(u.translate(C.event.text))])})}),Xe(Yd,(v,C)=>{y.bind(O=>O.getOpt(v)).each(O=>{So.set(O,[Zg(C.event.icon,u.icons)])})}),Xe(at(),(v,C)=>{C.event.prevent(),Qo(v,jE)})])].concat(l.getOr([])))}},ON=(n,r,i,l)=>{var u;const f=so(Ke),p=UE(n.icon,n.text,n.tooltip,D.none(),i,l);return Oi.sketch({dom:p.dom,components:p.components,eventOrder:zS,buttonBehaviours:{...xt([en("toolbar-button-events",[(y={onAction:n.onAction,getApi:r.getApi},Ml((v,C)=>{av(y,v)(O=>{lo(v,bw,{buttonApi:O}),y.onAction(O)})})),Lg(r,f),Mp(r,f)]),...n.tooltip.map(v=>Pr.config(i.tooltips.getConfig({tooltipText:i.translate(v)+n.shortcut.map(C=>` (${Dx(C)})`).getOr("")}))).toArray(),Nx(()=>!n.enabled||i.isDisabled()),Ca()].concat(r.toolbarButtonBehaviours)),[Ug]:(u=p.buttonBehaviours)===null||u===void 0?void 0:u[Ug]}});var y},zN=(n,r,i,l)=>ON(n,{toolbarButtonBehaviours:i.length>0?[en("toolbarButtonWith",i)]:[],getApi:VE,onSetup:n.onSetup},r,l),NN=(n,r,i,l)=>ON(n,{toolbarButtonBehaviours:[So.config({}),No.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(i.length>0?[en("toolbarToggleButtonWith",i)]:[]),getApi:RB,onSetup:n.onSetup},r,l),MB=(n,r,i)=>l=>Bg(u=>r.fetch(u)).map(u=>D.from(FC(ls(hb(Xt("menu-value"),u,f=>{r.onItemAction(n(l),f)},r.columns,r.presets,Cf.CLOSE_ON_EXECUTE,r.select.getOr(Fe),i),{movement:uv(r.columns,r.presets),menuBehaviours:rv(r.columns!=="auto"?[]:[Ss((f,p)=>{dC(f,4,Dg(r.presets)).each(({numRows:y,numColumns:v})=>{po.setGridSize(f,y,v)})})])})))),LB=[{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"]}],Gg=(n,r)=>(i,l,u,f)=>{const p=n(i).mapError(y=>ii(y)).getOrDie();return r(p,l,u,f)},BB={button:Gg(v3,(n,r,i,l)=>((u,f,p)=>zN(u,f,[],p))(n,r.shared.providers,l)),togglebutton:Gg(Tx,(n,r,i,l)=>((u,f,p)=>NN(u,f,[],p))(n,r.shared.providers,l)),menubutton:Gg(Kz,(n,r,i,l)=>o1(n,"tox-tbtn",r,D.none(),!1,l)),splitbutton:Gg(n=>Ms("SplitButton",$L,n),(n,r,i,l)=>((u,f,p)=>{const y=so(u.tooltip.getOr("")),v=A=>({isEnabled:()=>!Fo.isDisabled(A),setEnabled:R=>Fo.set(A,!R),setIconFill:(R,F)=>{Ys(A.element,`svg path[class="${R}"], rect[class="${R}"]`).each($=>{wo($,"fill",F)})},setActive:R=>{wo(A.element,"aria-pressed",R),Ys(A.element,"span").each(F=>{A.getSystem().getByDom(F).each($=>No.set($,R))})},isActive:()=>Ys(A.element,"span").exists(R=>A.getSystem().getByDom(R).exists(No.isOn)),setText:R=>Ys(A.element,"span").each(F=>A.getSystem().getByDom(F).each($=>lo($,pd,{text:R}))),setIcon:R=>Ys(A.element,"span").each(F=>A.getSystem().getByDom(F).each($=>lo($,Yd,{icon:R}))),setTooltip:R=>{const F=f.providers.translate(R);wo(A.element,"aria-label",F),y.set(R)}}),C=so(Ke),O={getApi:v,onSetup:u.onSetup};return Bv.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:{"aria-pressed":!1,...TN(u.tooltip,f.providers),...st(p)?{"data-mce-name":p}:{}}},onExecute:A=>{const R=v(A);R.isEnabled()&&u.onAction(R)},onItemExecute:(A,R,F)=>{},splitDropdownBehaviours:xt([z3(f.providers.isDisabled),Ca(),en("split-dropdown-events",[Ss((A,R)=>yw(A)),Xe(jE,Po.focus),Lg(O,C),Mp(O,C)]),yb.config({}),...u.tooltip.map(A=>Pr.config({...f.providers.tooltips.getConfig({tooltipText:f.providers.translate(A),onShow:R=>{if(y.get()!==A){const F=f.providers.translate(y.get());Pr.setComponents(R,f.providers.tooltips.getComponents({tooltipText:F}))}}})})).toArray()]),eventOrder:{[ka()]:["alloy.base.behaviour","split-dropdown-events","tooltipping"],[Nl()]:["split-dropdown-events","tooltipping"]},toggleClass:"tox-tbtn--enabled",lazySink:f.getSink,fetch:MB(v,u,f.providers),parts:{menu:kx(0,u.columns,u.presets)},components:[Bv.parts.button(UE(u.icon,u.text,D.none(),D.some([No.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),f.providers)),Bv.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:X4("chevron-down",f.providers.icons)},buttonBehaviours:xt([z3(f.providers.isDisabled),Ca(),_x()])}),Bv.parts["aria-descriptor"]({text:f.providers.translate("To open the popup, press Shift+Enter")})]})})(n,r.shared,l)),grouptoolbarbutton:Gg(n=>Ms("GroupToolbarButton",FL,n),(n,r,i,l)=>{const u=i.ui.registry.getAll().buttons,f={[ol]:r.shared.header.isPositionedAtTop()?Bc.TopToBottom:Bc.BottomToTop};if(nb(i)===Vd.floating)return((p,y,v,C,O)=>{const A=y.shared,R=so(Ke),F={toolbarButtonBehaviours:[],getApi:VE,onSetup:p.onSetup},$=[en("toolbar-group-button-events",[Lg(F,R),Mp(F,R)])];return Vp.sketch({lazySink:A.getSink,fetch:()=>Bg(G=>{G(pt(v(p.items),$w))}),markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:UE(p.icon,p.text,p.tooltip,D.some($),A.providers,O),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:C}}}})})(n,r,p=>Uw(i,{buttons:u,toolbar:p,allowToolbarGroups:!1},r,D.none()),f,l);throw new Error("Toolbar groups are only supported when using floating toolbar mode")})},Pv={styles:(n,r)=>{const i={type:"advanced",...r.styles};return Lv(n,r,AN(n,i),EN,"StylesTextUpdate","styles")},fontsize:(n,r)=>Lv(n,r,SN(n),wN,"FontSizeTextUpdate","fontsize"),fontsizeinput:(n,r)=>((i,l,u,f)=>{let p=D.none();const y=pb(i,"NodeChange SwitchMode",ne=>{const ie=ne.getComponent();p=D.some(ie),u.updateInputValue(ie),Fo.set(ie,!i.selection.isEditable())}),v=ne=>({getComponent:ue(ne)}),C=so(Ke),O=Xt("custom-number-input-events"),A=(ne,ie,de)=>{const we=p.map(kt=>Le.getValue(kt)).getOr(""),ze=u.getNewValue(we,ne),tt=we.length-`${ze}`.length,Je=p.map(kt=>kt.element.dom.selectionStart-tt),Ze=p.map(kt=>kt.element.dom.selectionEnd-tt);u.onAction(ze,de),p.each(kt=>{Le.setValue(kt,ze),ie&&(Je.each(Wt=>kt.element.dom.selectionStart=Wt),Ze.each(Wt=>kt.element.dom.selectionEnd=Wt))})},R=(ne,ie)=>A((de,we)=>de-we,ne,ie),F=(ne,ie)=>A((de,we)=>de+we,ne,ie),$=ne=>ba(ne.element).fold(D.none,ie=>(Ei(ie),D.some(!0))),G=ne=>xp(ne.element)?(Gi(ne.element).each(ie=>Ei(ie)),D.some(!0)):D.none(),J=(ne,ie,de,we)=>{const ze=so(Ke),tt=l.shared.providers.translate(de),Je=Xt("altExecuting"),Ze=pb(i,"NodeChange SwitchMode",Wt=>{Fo.set(Wt.getComponent(),!i.selection.isEditable())}),kt=Wt=>{Fo.isDisabled(Wt)||ne(!0)};return Oi.sketch({dom:{tag:"button",attributes:{"aria-label":tt,"data-mce-name":ie},classes:we.concat(ie)},components:[kv(ie,l.shared.providers.icons)],buttonBehaviours:xt([Fo.config({}),Pr.config(l.shared.providers.tooltips.getConfig({tooltipText:tt})),en(Je,[Lg({onSetup:Ze,getApi:v},ze),Mp({getApi:v},ze),Xe(Ws(),(Wt,ro)=>{ro.event.raw.keyCode!==xN.space()&&ro.event.raw.keyCode!==xN.enter()||Fo.isDisabled(Wt)||ne(!1)}),Xe(Mr(),kt),Xe(ge(),kt)])]),eventOrder:{[Ws()]:[Je,"keying"],[Mr()]:[Je,"alloy.base.behaviour"],[ge()]:[Je,"alloy.base.behaviour"],[ka()]:["alloy.base.behaviour",Je,"tooltipping"],[Nl()]:[Je,"tooltipping"]}})},ae=ns(J(ne=>R(!1,ne),"minus","Decrease font size",[])),X=ns(J(ne=>F(!1,ne),"plus","Increase font size",[])),Y=ns({dom:{tag:"div",classes:["tox-input-wrapper"]},components:[Rp.sketch({inputBehaviours:xt([Fo.config({}),en(O,[Lg({onSetup:y,getApi:v},C),Mp({getApi:v},C)]),en("input-update-display-text",[Xe(pd,(ne,ie)=>{Le.setValue(ne,ie.event.text)}),Xe(sr(),ne=>{u.onAction(Le.getValue(ne))}),Xe(zd(),ne=>{u.onAction(Le.getValue(ne))})]),po.config({mode:"special",onEnter:ne=>(A(Ct,!0,!0),D.some(!0)),onEscape:$,onUp:ne=>(F(!0,!1),D.some(!0)),onDown:ne=>(R(!0,!1),D.some(!0)),onLeft:(ne,ie)=>(ie.cut(),D.none()),onRight:(ne,ie)=>(ie.cut(),D.none())})])})],behaviours:xt([Po.config({}),po.config({mode:"special",onEnter:G,onSpace:G,onEscape:$}),en("input-wrapper-events",[Xe(io(),ne=>{$t([ae,X],ie=>{const de=Vt(ie.get(ne).element.dom);xp(de)&&Eh(de)})})])])});return{dom:{tag:"div",classes:["tox-number-input"],attributes:{...st(f)?{"data-mce-name":f}:{}}},components:[ae.asSpec(),Y.asSpec(),X.asSpec()],behaviours:xt([Po.config({}),po.config({mode:"flow",focusInside:Kh.OnEnterOrSpaceMode,cycles:!1,selector:"button, .tox-input-wrapper",onEscape:ne=>xp(ne.element)?D.none():(Ei(ne.element),D.some(!0))})])}})(n,r,(i=>{const l=()=>i.queryCommandValue("FontSize");return{updateInputValue:u=>lo(u,pd,{text:l()}),onAction:(u,f)=>i.execCommand("FontSize",!1,u,{skip_focus:!f}),getNewValue:(u,f)=>{jw(u,["unsupportedLength","empty"]);const p=l(),y=jw(u,["unsupportedLength","empty"]).or(jw(p,["unsupportedLength","empty"])),v=y.map(F=>F.value).getOr(16),C=B2(i),O=y.map(F=>F.unit).filter(F=>F!=="").getOr(C),A=f(v,(F=>{var $;return($={em:{step:.1},cm:{step:.1},in:{step:.1},pc:{step:.1},ch:{step:.1},rem:{step:.1}}[F])!==null&&$!==void 0?$:{step:1}})(O).step),R=`${(F=>F>=0)(A)?A:v}${O}`;return R!==p&&((F,$)=>{F.dispatch("FontSizeInputTextUpdate",$)})(i,{value:R}),R}}})(n),"fontsizeinput"),fontfamily:(n,r)=>Lv(n,r,_N(n),bN,"FontFamilyTextUpdate","fontfamily"),blocks:(n,r)=>Lv(n,r,FE(n),PE,"BlocksTextUpdate","blocks"),align:(n,r)=>Lv(n,r,BE(n),pN,"AlignTextUpdate","align")},Uw=(n,r,i,l)=>{const u=(p=>{const y=p.toolbar,v=p.buttons;return y===!1?[]:y===void 0||y===!0?(C=>{const O=pt(LB,A=>{const R=cn(A.items,F=>Vo(C,F)||Vo(Pv,F));return{name:A.name,items:R}});return cn(O,A=>A.items.length>0)})(v):te(y)?(C=>{const O=C.split("|");return pt(O,A=>({items:A.trim().split(" ")}))})(y):(C=>Rt(C,O=>Vo(O,"name")&&Vo(O,"items")))(y)?y:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])})(r),f=pt(u,p=>{const y=Sn(p.items,v=>v.trim().length===0?[]:((C,O,A,R,F,$)=>St(O,A.toLowerCase()).orThunk(()=>$.bind(G=>ko(G,J=>St(O,J+A.toLowerCase())))).fold(()=>St(Pv,A.toLowerCase()).map(G=>G(C,F)),G=>G.type!=="grouptoolbarbutton"||R?((J,ae,X,Y)=>St(BB,J.type).fold(()=>(console.error("skipping button defined by",J),D.none()),ne=>D.some(ne(J,ae,X,Y))))(G,F,C,A.toLowerCase()):(console.warn(`Ignoring the '${A}' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.`),D.none())))(n,r.buttons,v,r.allowToolbarGroups,i,l).toArray());return{title:D.from(n.translate(p.name)),items:y}});return cn(f,p=>p.items.length>0)},DN=(n,r,i,l)=>{const u=r.mainUi.outerContainer,f=i.toolbar,p=i.buttons;if(Rt(f,te)){const y=f.map(v=>{const C={toolbar:v,buttons:p,allowToolbarGroups:i.allowToolbarGroups};return Uw(n,C,l,D.none())});Ls.setToolbars(u,y)}else Ls.setToolbar(u,Uw(n,i,l,D.none()))},RN=Yr(),PB=RN.os.isiOS()&&RN.os.version.major<=12;var a8=Object.freeze({__proto__:null,render:(n,r,i,l,u)=>{const{mainUi:f,uiMotherships:p}=r,y=so(0),v=f.outerContainer;mN(n);const C=Vt(u.targetNode),O=Pn(Vs(C));Ue(C,f.mothership),(($,G,J)=>{Dp($)&&Ue(J.mainUi.mothership.element,J.popupUi.mothership),u0(G,J.dialogUi.mothership)})(n,O,r),n.on("SkinLoaded",()=>{Ls.setSidebar(v,i.sidebar,ix(n)),DN(n,r,i,l),y.set(n.getWin().innerWidth),Ls.setMenubar(v,dN(n,i)),Ls.setViews(v,i.views),(($,G)=>{const{uiMotherships:J}=G,ae=$.dom;let X=$.getWin();const Y=$.getDoc().documentElement,ne=so(pe(X.innerWidth,X.innerHeight)),ie=so(pe(Y.offsetWidth,Y.offsetHeight)),de=()=>{const Je=ne.get();Je.left===X.innerWidth&&Je.top===X.innerHeight||(ne.set(pe(X.innerWidth,X.innerHeight)),mb($))},we=()=>{const Je=$.getDoc().documentElement,Ze=ie.get();Ze.left===Je.offsetWidth&&Ze.top===Je.offsetHeight||(ie.set(pe(Je.offsetWidth,Je.offsetHeight)),mb($))},ze=Je=>{((Ze,kt)=>{Ze.dispatch("ScrollContent",kt)})($,Je)};ae.bind(X,"resize",de),ae.bind(X,"scroll",ze);const tt=o0(Vt($.getBody()),"load",we);$.on("hide",()=>{$t(J,Je=>{Mo(Je.element,"display","none")})}),$.on("show",()=>{$t(J,Je=>{Vn(Je.element,"display")})}),$.on("NodeChange",we),$.on("remove",()=>{tt.unbind(),ae.unbind(X,"resize",de),ae.unbind(X,"scroll",ze),X=null})})(n,r)});const A=Ls.getSocket(v).getOrDie("Could not find expected socket element");if(PB){Li(A.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});const $=((J,ae)=>{let X=null;return{cancel:()=>{We(X)||(clearTimeout(X),X=null)},throttle:(...Y)=>{We(X)&&(X=setTimeout(()=>{X=null,J.apply(null,Y)},20))}}})(()=>{n.dispatch("ScrollContent")}),G=Ai(A.element,"scroll",$.throttle);n.on("remove",G.unbind)}O3(n,r),n.addCommand("ToggleSidebar",($,G)=>{Ls.toggleSidebar(v,G),(J=>{J.dispatch("ToggleSidebar")})(n)}),n.addQueryValueHandler("ToggleSidebar",()=>{var $;return($=Ls.whichSidebar(v))!==null&&$!==void 0?$:""}),n.addCommand("ToggleView",($,G)=>{if(Ls.toggleView(v,G)){const J=v.element;f.mothership.broadcastOn([T()],{target:J}),$t(p,ae=>{ae.broadcastOn([T()],{target:J})}),We(Ls.whichView(v))&&(n.focus(),n.nodeChanged(),Ls.refreshToolbar(v)),(ae=>{ae.dispatch("ToggleView")})(n)}}),n.addQueryValueHandler("ToggleView",()=>{var $;return($=Ls.whichView(v))!==null&&$!==void 0?$:""});const R=nb(n);R!==Vd.sliding&&R!==Vd.floating||n.on("ResizeWindow ResizeEditor ResizeContent",()=>{const $=n.getWin().innerWidth;$!==y.get()&&(Ls.refreshToolbar(r.mainUi.outerContainer),y.set($))});const F={setEnabled:$=>{ub(r,!$)},isEnabled:()=>!Fo.isDisabled(v)};return{iframeContainer:A.element.dom,editorContainer:v.element.dom,api:F}}});const Iv=n=>/^[0-9\.]+(|px)$/i.test(""+n)?D.some(parseInt(""+n,10)):D.none(),Yg=n=>Lt(n)?n+"px":n,Fv=(n,r,i)=>{const l=r.filter(f=>nn>f);return l.or(u).getOr(n)},ZE=n=>{const r=R0(n),i=M0(n),l=By(n);return Iv(r).map(u=>Fv(u,i,l))},{ToolbarLocation:WE,ToolbarMode:MN}=H0,IB=(n,r,i,l,u)=>{const{mainUi:f,uiMotherships:p}=i,y=My.DOM,v=sb(n),C=Np(n),O=By(n).or(ZE(n)),A=l.shared.header,R=A.isPositionedAtTop,F=nb(n),$=F===MN.sliding||F===MN.floating,G=so(!1),J=()=>G.get()&&!n.removed,ae=ie=>$?ie.fold(ue(0),de=>de.components().length>1?Ds(de.components()[1].element):0):0,X=()=>{$t(p,ie=>{ie.broadcastOn([M()],{})})},Y=ie=>{if(!J())return;v||u.on(ze=>{const tt=O.getOrThunk(()=>Rr().width-_t(r).left-10);Mo(ze.element,"max-width",tt+"px")});const de=_s(),we=!(v||v||!(Ye(f.outerContainer.element).left+Xn(f.outerContainer.element)>=window.innerWidth-40||er(f.outerContainer.element,"width").isSome())||(Mo(f.outerContainer.element,"position","absolute"),Mo(f.outerContainer.element,"left","0px"),Vn(f.outerContainer.element,"width"),0));if($&&Ls.refreshToolbar(f.outerContainer),!v){const ze=_s(),tt=nn(de.left!==ze.left,de);((Je,Ze)=>{u.on(kt=>{const Wt=Ls.getToolbar(f.outerContainer),ro=ae(Wt),yo=vr(r),Ho=((on,Rn)=>Dp(on)?oc(Rn):D.none())(n,f.outerContainer.element),xn=Ho.fold(()=>yo.x,on=>{const Rn=vr(on);return $n(on,za())?yo.x:yo.x-Rn.x}),Bs=nn(Je,Math.ceil(f.outerContainer.element.dom.getBoundingClientRect().width)).filter(on=>on>150).map(on=>{const Rn=Ze.getOr(_s()),Co=window.innerWidth-(xn-Rn.left),Js=Math.max(Math.min(on,Co),150);return CoR()?Math.max(yo.y-Ds(kt.element)+ro,0):yo.bottom,on=>{var Rn;const Co=vr(on),Js=(Rn=on.dom.scrollTop)!==null&&Rn!==void 0?Rn:0,ms=$n(on,za())?Math.max(yo.y-Ds(kt.element)+ro,0):yo.y-Co.y+Js-Ds(kt.element)+ro;return R()?ms:yo.bottom})+"px"};Li(f.outerContainer.element,{...Xs,...Bs})})})(we,tt),tt.each(Je=>{Sd(Je.left,ze.top)})}C&&u.on(ie),X()},ne=()=>!(v||!C||!J())&&u.get().exists(ie=>{const de=A.getDockingMode(),we=(tt=>{switch(Sg(n)){case WE.auto:const Je=Ls.getToolbar(f.outerContainer),Ze=ae(Je),kt=Ds(tt.element)-Ze,Wt=vr(r);if(Wt.y>kt)return"top";{const ro=Ki(r),yo=Math.max(ro.dom.scrollHeight,Ds(ro));return Wt.bottom{Gs.setModes(tt,[ze]),A.setDockingMode(ze);const Je=R()?Bc.TopToBottom:Bc.BottomToTop;wo(tt.element,ol,Je)}),!0);var ze});return{isVisible:J,isPositionedAtTop:R,show:()=>{G.set(!0),Mo(f.outerContainer.element,"display","flex"),y.addClass(n.getBody(),"mce-edit-focus"),$t(p,ie=>{Vn(ie.element,"display")}),ne(),Dp(n)?Y(ie=>Gs.isDocked(ie)?Gs.reset(ie):Gs.refresh(ie)):Y(Gs.refresh)},hide:()=>{G.set(!1),Mo(f.outerContainer.element,"display","none"),y.removeClass(n.getBody(),"mce-edit-focus"),$t(p,ie=>{Mo(ie.element,"display","none")})},update:Y,updateMode:()=>{ne()&&Y(Gs.reset)},repositionPopups:X}},LN=(n,r)=>{const i=vr(n);return{pos:r?i.y:i.bottom,bounds:i}};var FB=Object.freeze({__proto__:null,render:(n,r,i,l,u)=>{const{mainUi:f}=r,p=Nn(),y=Vt(u.targetNode),v=IB(n,y,r,l,p),C=O4(n);wB(n);const O=()=>{if(p.isSet())return void v.show();p.set(Ls.getHeader(f.outerContainer).getOrDie());const R=fx(n);Dp(n)?(Ue(y,f.mothership),Ue(y,r.popupUi.mothership)):u0(R,f.mothership),u0(R,r.dialogUi.mothership);const F=()=>{DN(n,r,i,l),Ls.setMenubar(f.outerContainer,dN(n,i)),v.show(),(($,G,J,ae)=>{const X=so(LN(G,J.isPositionedAtTop())),Y=we=>{const{pos:ze,bounds:tt}=LN(G,J.isPositionedAtTop()),{pos:Je,bounds:Ze}=X.get(),kt=tt.height!==Ze.height||tt.width!==Ze.width;X.set({pos:ze,bounds:tt}),kt&&mb($,we),J.isVisible()&&(Je!==ze?J.update(Gs.reset):kt&&(J.updateMode(),J.repositionPopups()))};ae||($.on("activate",J.show),$.on("deactivate",J.hide)),$.on("SkinLoaded ResizeWindow",()=>J.update(Gs.reset)),$.on("NodeChange keydown",we=>{requestAnimationFrame(()=>Y(we))});let ne=0;const ie=vS(()=>J.update(Gs.refresh),33);$.on("ScrollWindow",()=>{const we=_s().left;we!==ne&&(ne=we,ie.throttle()),J.updateMode()}),Dp($)&&$.on("ElementScroll",we=>{J.update(Gs.refresh)});const de=Cl();de.set(o0(Vt($.getBody()),"load",we=>Y(we.raw))),$.on("remove",()=>{de.clear()})})(n,y,v,C),n.nodeChanged()};C?n.once("SkinLoaded",F):F()};n.on("show",O),n.on("hide",v.hide),C||(n.on("focus",O),n.on("blur",v.hide)),n.on("init",()=>{(n.hasFocus()||C)&&O()}),O3(n,r);const A={show:O,hide:v.hide,setEnabled:R=>{ub(r,!R)},isEnabled:()=>!Fo.isDisabled(f.outerContainer)};return{editorContainer:f.outerContainer.element.dom,api:A}}});const BN="contexttoolbar-hide",PN=(n,r)=>Xe(bw,(i,l)=>{const u=(f=>({hide:()=>Qo(f,sp()),getValue:()=>Le.getValue(f)}))(n.get(i));r.onAction(u,l.event.buttonApi)}),HB=(n,r)=>{const i=n.label.fold(()=>({}),f=>({"aria-label":f})),l=ns(Rp.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:n.initValue(),inputAttributes:i,selectOnFocus:!0,inputBehaviours:xt([po.config({mode:"special",onEnter:f=>u.findPrimary(f).map(p=>(Ld(p),!0)),onLeft:(f,p)=>(p.cut(),D.none()),onRight:(f,p)=>(p.cut(),D.none())})])})),u=((f,p,y)=>{const v=pt(p,C=>ns(((O,A,R)=>(F=>F.type==="contextformtogglebutton")(A)?((F,$,G)=>{const{primary:J,...ae}=$.original,X=Ua(Tx({...ae,type:"togglebutton",onAction:Ke}));return NN(X,G,[PN(F,$)])})(O,A,R):((F,$,G)=>{const{primary:J,...ae}=$.original,X=Ua(v3({...ae,type:"button",onAction:Ke}));return zN(X,G,[PN(F,$)])})(O,A,R))(f,C,y)));return{asSpecs:()=>pt(v,C=>C.asSpec()),findPrimary:C=>ko(p,(O,A)=>O.primary?D.from(v[A]).bind(R=>R.getOpt(C)).filter(bn(Fo.isDisabled)):D.none())}})(l,n.commands,r);return[{title:D.none(),items:[l.asSpec()]},{title:D.none(),items:u.asSpecs()}]},IN=(n,r,i)=>r.bottom-n.y>=i&&n.bottom-r.y>=i,qE=n=>{const r=(i=>{const l=i.getBoundingClientRect();if(l.height<=0&&l.width<=0){const u=br(Vt(i.startContainer),i.startOffset).element;return(ga(u)?$r(u):D.some(u)).filter(ys).map(f=>f.dom.getBoundingClientRect()).getOr(l)}return l})(n.selection.getRng());if(n.inline){const i=_s();return rn(i.left+r.left,i.top+r.top,r.width,r.height)}{const i=Va(Vt(n.getBody()));return rn(i.x+r.left,i.y+r.top,r.width,r.height)}},FN=(n,r,i,l=0)=>{const u=Rr(window),f=vr(Vt(n.getContentAreaContainer())),p=P0(n)||I0(n)||F0(n),{x:y,width:v}=((C,O,A)=>{const R=Math.max(C.x+A,O.x);return{x:R,width:Math.min(C.right-A,O.right)-R}})(f,u,l);if(n.inline&&!p)return rn(y,u.y,v,u.height);{const C=r.header.isPositionedAtTop(),{y:O,bottom:A}=((R,F,$,G,J,ae)=>{const X=Vt(R.getContainer()),Y=Ys(X,".tox-editor-header").getOr(X),ne=vr(Y),ie=ne.y>=F.bottom,de=G&&!ie;if(R.inline&&de)return{y:Math.max(ne.bottom+ae,$.y),bottom:$.bottom};if(R.inline&&!de)return{y:$.y,bottom:Math.min(ne.y-ae,$.bottom)};const we=J==="line"?vr(X):F;return de?{y:Math.max(ne.bottom+ae,$.y),bottom:Math.min(we.bottom-ae,$.bottom)}:{y:Math.max(we.y+ae,$.y),bottom:Math.min(ne.y-ae,$.bottom)}})(n,f,u,C,i,l);return rn(y,O,v,A-O)}},KE={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"]},Ab={maxHeightFunction:wp(),maxWidthFunction:CE()},Xg=n=>n==="node",$B=(n,r,i,l,u)=>{const f=qE(n),p=l.lastElement().exists(y=>$n(i,y));return((y,v)=>{const C=y.selection.getRng(),O=br(Vt(C.startContainer),C.startOffset);return C.startContainer===C.endContainer&&C.startOffset===C.endOffset-1&&$n(O.element,v)})(n,i)?p?Ow:Fn:p?((y,v,C)=>{const O=er(y,"position");Mo(y,"position",v);const A=IN(f,vr(r),-20)&&!l.isReposition()?tE:Ow;return O.each(R=>Mo(y,"position",R)),A})(r,l.getMode()):(l.getMode()==="fixed"?u.y+_s().top:u.y)+(Ds(r)+12)<=f.y?Fn:Mm},HN=(n,r,i,l)=>{const u=p=>(y,v,C,O,A)=>({...$B(n,O,p,i,A)({...y,y:A.y,height:A.height},v,C,O,A),alwaysFit:!0}),f=p=>Xg(l)?[u(p)]:[];return r?{onLtr:p=>[Ar,mr,pr,Lr,us,ir].concat(f(p)),onRtl:p=>[Ar,pr,mr,us,Lr,ir].concat(f(p))}:{onLtr:p=>[ir,Ar,Lr,mr,us,pr].concat(f(p)),onRtl:p=>[ir,Ar,us,pr,Lr,mr].concat(f(p))}},Zw=(n,r)=>{const i=cn(r,f=>f.predicate(n.dom)),{pass:l,fail:u}=ks(i,f=>f.type==="contexttoolbar");return{contextToolbars:l,contextForms:u}},Ww=(n,r)=>{const i={},l=[],u=[],f={},p={},y=tn(n);return $t(y,v=>{const C=n[v];C.type==="contextform"?((O,A)=>{const R=Ua(Ms("ContextForm",l6,A));i[O]=R,R.launch.map(F=>{f["form:"+O]={...A.launch,type:F.type==="contextformtogglebutton"?"togglebutton":"button",onAction:()=>{r(R)}}}),R.scope==="editor"?u.push(R):l.push(R),p[O]=R})(v,C):C.type==="contexttoolbar"&&((O,A)=>{var R;(R=A,Ms("ContextToolbar",x3,R)).each(F=>{A.scope==="editor"?u.push(F):l.push(F),p[O]=F})})(v,C)}),{forms:i,inNodeScope:l,inEditorScope:u,lookupTable:p,formNavigators:f}},$N=Xt("forward-slide"),d1=Xt("backward-slide"),Tb=Xt("change-slide-event"),GE="tox-pop--resizing",YE="tox-pop--transition",VB=(n,r,i,l)=>{const u=l.backstage,f=u.shared,p=Yr().deviceType.isTouch,y=Nn(),v=Nn(),C=Nn(),O=La((de=>{const we=so([]);return or.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:ze=>{we.set([]),or.getContent(ze).each(tt=>{Vn(tt.element,"visibility")}),co(ze.element,GE),Vn(ze.element,"width")},inlineBehaviours:xt([en("context-toolbar-events",[Bd(np(),(ze,tt)=>{tt.event.raw.propertyName==="width"&&(co(ze.element,GE),Vn(ze.element,"width"))}),Xe(Tb,(ze,tt)=>{const Je=ze.element;Vn(Je,"width");const Ze=Go(Je);or.setContent(ze,tt.event.contents),At(Je,GE);const kt=Go(Je);Mo(Je,"width",Ze+"px"),or.getContent(ze).each(Wt=>{tt.event.focus.bind(ro=>(Ei(ro),Tr(Je))).orThunk(()=>(po.focusIn(Wt),nd(Vs(Je))))}),setTimeout(()=>{Mo(ze.element,"width",kt+"px")},0)}),Xe($N,(ze,tt)=>{or.getContent(ze).each(Je=>{we.set(we.get().concat([{bar:Je,focus:nd(Vs(ze.element))}]))}),lo(ze,Tb,{contents:tt.event.forwardContents,focus:D.none()})}),Xe(d1,(ze,tt)=>{rt(we.get()).each(Je=>{we.set(we.get().slice(0,we.get().length-1)),lo(ze,Tb,{contents:Fi(Je.bar),focus:Je.focus})})})]),po.config({mode:"special",onEscape:ze=>rt(we.get()).fold(()=>de.onEscape(),tt=>(Qo(ze,d1),D.some(!0)))})]),lazySink:()=>un.value(de.sink)})})({sink:i,onEscape:()=>(n.focus(),D.some(!0))})),A=()=>{const de=C.get().getOr("node"),we=Xg(de)?1:0;return FN(n,f,de,we)},R=()=>!(n.removed||p()&&u.isContextMenuOpen()),F=()=>{if(R()){const de=A(),we=Kr(C.get(),"node")?((ze,tt)=>tt.filter(Je=>Vr(Je)&&vi(Je)).map(Va).getOrThunk(()=>qE(ze)))(n,y.get()):qE(n);return de.height<=0||!IN(we,de,.01)}return!0},$=()=>{y.clear(),v.clear(),C.clear(),or.hide(O)},G=()=>{if(or.isOpen(O)){const de=O.element;Vn(de,"display"),F()?Mo(de,"display","none"):(v.set(0),or.reposition(O))}},J=de=>({dom:{tag:"div",classes:["tox-pop__dialog"]},components:[de],behaviours:xt([po.config({mode:"acyclic"}),en("pop-dialog-wrap-events",[Ss(we=>{n.shortcuts.add("ctrl+F9","focus statusbar",()=>po.focusIn(we))}),Tc(we=>{n.shortcuts.remove("ctrl+F9")})])])}),ae=sn(()=>Ww(r,de=>{const we=X([de]);lo(O,$N,{forwardContents:J(we)})})),X=de=>{const{buttons:we}=n.ui.registry.getAll(),ze={...we,...ae().formNavigators},tt=nb(n)===Vd.scrolling?Vd.scrolling:Vd.default,Je=Cs(pt(de,Ze=>Ze.type==="contexttoolbar"?((kt,Wt)=>Uw(n,{buttons:kt,toolbar:Wt.items,allowToolbarGroups:!1},l.backstage,D.some(["form:"])))(ze,Ze):((kt,Wt)=>HB(kt,Wt))(Ze,f.providers)));return OE({type:tt,uid:Xt("context-toolbar"),initGroups:Je,onEscape:D.none,cyclicKeying:!0,providers:f.providers})},Y=(de,we)=>{if(ie.cancel(),!R())return;const ze=X(de),tt=de[0].position,Je=((kt,Wt)=>{const ro=kt==="node"?f.anchors.node(Wt):f.anchors.cursor(),yo=((Ho,xn,Bs,Xs)=>xn==="line"?{bubble:nc(12,0,KE),layouts:{onLtr:()=>[iy],onRtl:()=>[ly]},overrides:Ab}:{bubble:nc(0,12,KE,1/12),layouts:HN(Ho,Bs,Xs,xn),overrides:Ab})(n,kt,p(),{lastElement:y.get,isReposition:()=>Kr(v.get(),0),getMode:()=>Xa.getMode(i)});return ls(ro,yo)})(tt,we);C.set(tt),v.set(1);const Ze=O.element;Vn(Ze,"display"),(kt=>Kr(vt(kt,y.get(),$n),!0))(we)||(co(Ze,YE),Xa.reset(i,O)),or.showWithinBounds(O,J(ze),{anchor:Je,transition:{classes:[YE],mode:"placement"}},()=>D.some(A())),we.fold(y.clear,y.set),F()&&Mo(Ze,"display","none")};let ne=!1;const ie=vS(()=>{!n.hasFocus()||n.removed||ne||(_n(O.element,YE)?ie.throttle():((de,we)=>{const ze=Vt(we.getBody()),tt=Ze=>$n(Ze,ze),Je=Vt(we.selection.getNode());return(Ze=>!tt(Ze)&&!lr(ze,Ze))(Je)?D.none():((Ze,kt,Wt)=>{const ro=Zw(Ze,kt);if(ro.contextForms.length>0)return D.some({elem:Ze,toolbars:[ro.contextForms[0]]});{const yo=Zw(Ze,Wt);if(yo.contextForms.length>0)return D.some({elem:Ze,toolbars:[yo.contextForms[0]]});if(ro.contextToolbars.length>0||yo.contextToolbars.length>0){const Ho=(xn=>{if(xn.length<=1)return xn;{const Bs=Co=>Ao(xn,Js=>Js.position===Co),Xs=Co=>cn(xn,Js=>Js.position===Co),on=Bs("selection"),Rn=Bs("node");if(on||Rn){if(Rn&&on){const Co=Xs("node"),Js=pt(Xs("selection"),ms=>({...ms,position:"node"}));return Co.concat(Js)}return Xs(on?"selection":"node")}return Xs("line")}})(ro.contextToolbars.concat(yo.contextToolbars));return D.some({elem:Ze,toolbars:Ho})}return D.none()}})(Je,de.inNodeScope,de.inEditorScope).orThunk(()=>((Ze,kt,Wt)=>Ze(kt)?D.none():Sc(kt,ro=>{if(ys(ro)){const{contextToolbars:yo,contextForms:Ho}=Zw(ro,Wt.inNodeScope),xn=Ho.length>0?Ho:(Bs=>{if(Bs.length<=1)return Bs;{const Xs=on=>j(Bs,Rn=>Rn.position===on);return Xs("selection").orThunk(()=>Xs("node")).orThunk(()=>Xs("line")).map(on=>on.position).fold(()=>[],on=>cn(Bs,Rn=>Rn.position===on))}})(yo);return xn.length>0?D.some({elem:ro,toolbars:xn}):D.none()}return D.none()},Ze))(tt,Je,de))})(ae(),n).fold($,de=>{Y(de.toolbars,D.some(de.elem))}))},17);n.on("init",()=>{n.on("remove",$),n.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",G),n.on("click keyup focus SetContent",ie.throttle),n.on(BN,$),n.on("contexttoolbar-show",de=>{const we=ae();St(we.lookupTable,de.toolbarKey).each(ze=>{Y([ze],nn(de.target!==n,de.target)),or.getContent(O).each(po.focusIn)})}),n.on("focusout",de=>{tx.setEditorTimeout(n,()=>{Tr(i.element).isNone()&&Tr(O.element).isNone()&&$()},0)}),n.on("SwitchMode",()=>{n.mode.isReadOnly()&&$()}),n.on("ExecCommand",({command:de})=>{de.toLowerCase()==="toggleview"&&$()}),n.on("AfterProgressState",de=>{de.state?$():n.hasFocus()&&ie.throttle()}),n.on("dragstart",()=>{ne=!0}),n.on("dragend drop",()=>{ne=!1}),n.on("NodeChange",de=>{Tr(O.element).fold(ie.throttle,Ke)})})},VN=(n,r)=>{const i=()=>{const l=r.getOptions(n),u=r.getCurrent(n).map(r.hash),f=Nn();return pt(l,p=>({type:"togglemenuitem",text:r.display(p),onSetup:y=>{const v=O=>{O&&(f.on(A=>A.setActive(!1)),f.set(y)),y.setActive(O)};v(Kr(u,r.hash(p)));const C=r.watcher(n,p,v);return()=>{f.clear(),C()}},onAction:()=>r.setCurrent(n,p)}))};n.ui.registry.addMenuButton(r.name,{tooltip:r.text,icon:r.icon,fetch:l=>l(i()),onSetup:r.onToolbarSetup}),n.ui.registry.addNestedMenuItem(r.name,{type:"nestedmenuitem",text:r.text,getSubmenuItems:i,onSetup:r.onMenuSetup})},jB=n=>{VN(n,(r=>({name:"lineheight",text:"Line height",icon:"line-height",getOptions:B4,hash:i=>((l,u)=>jw(l,["fixed","relative","empty"]).map(({value:f,unit:p})=>f+p))(i).getOr(i),display:Ct,watcher:(i,l,u)=>i.formatter.formatChanged("lineheight",u,!1,{value:l}).unbind,getCurrent:i=>D.from(i.queryCommandValue("LineHeight")),setCurrent:(i,l)=>i.execCommand("LineHeight",!1,l),onToolbarSetup:Sa(r),onMenuSetup:Sa(r)}))(n)),(r=>D.from(R2(r)).map(i=>({name:"language",text:"Language",icon:"language",getOptions:ue(i),hash:l=>Ot(l.customCode)?l.code:`${l.code}/${l.customCode}`,display:l=>l.title,watcher:(l,u,f)=>{var p;return l.formatter.formatChanged("lang",f,!1,{value:u.code,customValue:(p=u.customCode)!==null&&p!==void 0?p:null}).unbind},getCurrent:l=>{const u=Vt(l.selection.getNode());return Xc(u,f=>D.some(f).filter(ys).bind(p=>Fs(p,"lang").map(y=>({code:y,customCode:Fs(p,"data-mce-lang").getOrUndefined(),title:""}))))},setCurrent:(l,u)=>l.execCommand("Lang",!1,u),onToolbarSetup:l=>{const u=Cl();return l.setActive(r.formatter.match("lang",{},void 0,!0)),u.set(r.formatter.formatChanged("lang",l.setActive,!0)),qy(u.clear,Sa(r)(l))},onMenuSetup:Sa(r)})))(n).each(r=>VN(n,r))},UB=n=>pb(n,"NodeChange",r=>{r.setEnabled(n.queryCommandState("outdent")&&n.selection.isEditable())}),Hv=(n,r)=>i=>{i.setActive(r.get());const l=u=>{r.set(u.state),i.setActive(u.state)};return n.on("PastePlainTextToggle",l),qy(()=>n.off("PastePlainTextToggle",l),Sa(n)(i))},XE=(n,r)=>()=>{n.execCommand("mceToggleFormat",!1,r)},JE=n=>{(r=>{(i=>{Hp.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"}],(l,u)=>{i.ui.registry.addToggleButton(l.name,{tooltip:l.text,icon:l.icon,onSetup:Sf(i,l.name),onAction:XE(i,l.name),shortcut:l.shortcut})});for(let l=1;l<=6;l++){const u="h"+l,f=`Access+${l}`;i.ui.registry.addToggleButton(u,{text:u.toUpperCase(),tooltip:"Heading "+l,onSetup:Sf(i,u),onAction:XE(i,u),shortcut:f})}})(r),(i=>{Hp.each([{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"help",text:"Help",action:"mceHelp",icon:"help",shortcut:"Alt+0"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"print",text:"Print",action:"mcePrint",icon:"print",shortcut:"Meta+P"}],l=>{i.ui.registry.addButton(l.name,{tooltip:l.text,icon:l.icon,onAction:ac(i,l.action),shortcut:l.shortcut})}),Hp.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"}],l=>{i.ui.registry.addButton(l.name,{tooltip:l.text,icon:l.icon,onSetup:Sa(i),onAction:ac(i,l.action)})})})(r),(i=>{Hp.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],l=>{i.ui.registry.addToggleButton(l.name,{tooltip:l.text,icon:l.icon,onAction:ac(i,l.action),onSetup:Sf(i,l.name)})})})(r)})(n),(r=>{Hp.each([{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"},{name:"print",text:"Print...",action:"mcePrint",icon:"print",shortcut:"Meta+P"}],i=>{r.ui.registry.addMenuItem(i.name,{text:i.text,icon:i.icon,shortcut:i.shortcut,onAction:ac(r,i.action)})}),Hp.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"}],i=>{r.ui.registry.addMenuItem(i.name,{text:i.text,icon:i.icon,shortcut:i.shortcut,onSetup:Sa(r),onAction:ac(r,i.action)})}),r.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onSetup:Sa(r),onAction:XE(r,"code")})})(n)},qw=(n,r)=>pb(n,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",i=>{i.setEnabled(!n.mode.isReadOnly()&&n.undoManager[r]())}),ZB=n=>pb(n,"VisualAid",r=>{r.setActive(n.hasVisual)}),WB=(n,r)=>{(i=>{$t([{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"}],l=>{i.ui.registry.addToggleButton(l.name,{tooltip:l.text,icon:l.icon,onAction:ac(i,l.cmd),onSetup:Sf(i,l.name)})}),i.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onSetup:Sa(i),onAction:ac(i,"JustifyNone")})})(n),JE(n),((i,l)=>{((u,f)=>{const p=c1(f,BE(u));u.ui.registry.addNestedMenuItem("align",{text:f.shared.providers.translate("Align"),onSetup:Sa(u),getSubmenuItems:()=>p.items.validateItems(p.getStyleItems())})})(i,l),((u,f)=>{const p=c1(f,_N(u));u.ui.registry.addNestedMenuItem("fontfamily",{text:f.shared.providers.translate("Fonts"),onSetup:Sa(u),getSubmenuItems:()=>p.items.validateItems(p.getStyleItems())})})(i,l),((u,f)=>{const p={type:"advanced",...f.styles},y=c1(f,AN(u,p));u.ui.registry.addNestedMenuItem("styles",{text:"Formats",onSetup:Sa(u),getSubmenuItems:()=>y.items.validateItems(y.getStyleItems())})})(i,l),((u,f)=>{const p=c1(f,FE(u));u.ui.registry.addNestedMenuItem("blocks",{text:"Blocks",onSetup:Sa(u),getSubmenuItems:()=>p.items.validateItems(p.getStyleItems())})})(i,l),((u,f)=>{const p=c1(f,SN(u));u.ui.registry.addNestedMenuItem("fontsize",{text:"Font sizes",onSetup:Sa(u),getSubmenuItems:()=>p.items.validateItems(p.getStyleItems())})})(i,l)})(n,r),(i=>{(l=>{l.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:qw(l,"hasUndo"),onAction:ac(l,"undo")}),l.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:qw(l,"hasRedo"),onAction:ac(l,"redo")})})(i),(l=>{l.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",enabled:!1,onSetup:qw(l,"hasUndo"),onAction:ac(l,"undo"),shortcut:"Meta+Z"}),l.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",enabled:!1,onSetup:qw(l,"hasRedo"),onAction:ac(l,"redo"),shortcut:"Meta+Y"})})(i)})(n),(i=>{(y=>{y.addCommand("mceApplyTextcolor",(v,C)=>{((O,A,R)=>{O.undoManager.transact(()=>{O.focus(),O.formatter.apply(A,{value:R}),O.nodeChanged()})})(y,v,C)}),y.addCommand("mceRemoveTextcolor",v=>{((C,O)=>{C.undoManager.transact(()=>{C.focus(),C.formatter.remove(O,{value:null},void 0,!0),C.nodeChanged()})})(y,v)})})(i);const l=G3(i),u=Y3(i),f=so(l),p=so(u);NC(i,"forecolor","forecolor",f),NC(i,"backcolor","hilitecolor",p),Gy(i,"forecolor","forecolor","Text color",f),Gy(i,"backcolor","hilitecolor","Background color",p)})(n),(i=>{(l=>{l.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:ac(l,"mceToggleVisualAid")})})(i),(l=>{l.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:ZB(l),onAction:ac(l,"mceToggleVisualAid")})})(i)})(n),(i=>{(l=>{l.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:UB(l),onAction:ac(l,"outdent")}),l.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onSetup:Sa(l),onAction:ac(l,"indent")})})(i)})(n),jB(n),(i=>{const l=so(M4(i)),u=()=>i.execCommand("mceTogglePlainTextPaste");i.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:u,onSetup:Hv(i,l)}),i.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:u,onSetup:Hv(i,l)})})(n)},jN=n=>te(n)?n.split(/[ ,]/):n,UN=n=>r=>r.options.get(n),ZN=UN("contextmenu_never_use_native"),qB=UN("contextmenu_avoid_overlap"),QE=n=>{const r=n.ui.registry.getAll().contextMenus,i=n.options.get("contextmenu");return n.options.isSet("contextmenu")?i:cn(i,l=>Vo(r,l))},$v=(n,r)=>({type:"makeshift",x:n,y:r}),WN=n=>n.type==="longpress"||n.type.indexOf("touch")===0,KB=(n,r)=>r.type==="contextmenu"||r.type==="longpress"?n.inline?(i=>{if(WN(i)){const l=i.touches[0];return $v(l.pageX,l.pageY)}return $v(i.pageX,i.pageY)})(r):((i,l)=>{const u=My.DOM.getPos(i);return((f,p,y)=>$v(f.x+p,f.y+y))(l,u.x,u.y)})(n.getContentAreaContainer(),(i=>{if(WN(i)){const l=i.touches[0];return $v(l.clientX,l.clientY)}return $v(i.clientX,i.clientY)})(r)):qN(n),qN=n=>({type:"selection",root:Vt(n.selection.getNode())}),KN=(n,r,i)=>{switch(i){case"node":return(l=>({type:"node",node:D.some(Vt(l.selection.getNode())),root:Vt(l.getBody())}))(n);case"point":return KB(n,r);case"selection":return qN(n)}},GN=(n,r,i,l,u,f)=>{const p=i(),y=KN(n,r,f);wb(p,Cf.CLOSE_ON_EXECUTE,l,{isHorizontalMenu:!1,search:D.none()}).map(v=>{r.preventDefault(),or.showMenuAt(u,{anchor:y},{menu:{markers:ib("normal")},data:v})})},YN={onLtr:()=>[Ar,mr,pr,Lr,us,ir,Fn,Mm,Tv,Kg,lc,ic],onRtl:()=>[Ar,pr,mr,us,Lr,ir,Fn,Mm,lc,ic,Tv,Kg]},GB={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"]},YB=(n,r,i,l,u,f)=>{const p=Yr(),y=p.os.isiOS(),v=p.os.isMacOS(),C=p.os.isAndroid(),O=p.deviceType.isTouch(),A=()=>{const R=i();((F,$,G,J,ae,X,Y)=>{const ne=((ie,de,we)=>{const ze=KN(ie,de,we);return{bubble:nc(0,we==="point"?12:0,GB),layouts:YN,overrides:{maxWidthFunction:CE(),maxHeightFunction:wp()},...ze}})(F,$,X);wb(G,Cf.CLOSE_ON_EXECUTE,J,{isHorizontalMenu:!0,search:D.none()}).map(ie=>{$.preventDefault();const de=Y?ji.HighlightMenuAndItem:ji.HighlightNone;or.showMenuWithinBounds(ae,{anchor:ne},{menu:{markers:ib("normal"),highlightOnOpen:de},data:ie,type:"horizontal"},()=>D.some(FN(F,J.shared,X==="node"?"node":"selection"))),F.dispatch(BN)})})(n,r,R,l,u,f,!(C||y||v&&O))};if((v||y)&&f!=="node"){const R=()=>{(F=>{const $=F.selection.getRng(),G=()=>{tx.setEditorTimeout(F,()=>{F.selection.setRng($)},10),X()};F.once("touchend",G);const J=Y=>{Y.preventDefault(),Y.stopImmediatePropagation()};F.on("mousedown",J,!0);const ae=()=>X();F.once("longpresscancel",ae);const X=()=>{F.off("touchend",G),F.off("longpresscancel",ae),F.off("mousedown",J)}})(n),A()};((F,$)=>{const G=F.selection;if(G.isCollapsed()||$.touches.length<1)return!1;{const J=$.touches[0],ae=G.getRng();return a0(F.getWin(),ff.domRange(ae)).exists(X=>X.left<=J.clientX&&X.right>=J.clientX&&X.top<=J.clientY&&X.bottom>=J.clientY)}})(n,r)?R():(n.once("selectionchange",R),n.once("touchend",()=>n.off("selectionchange",R)))}else A()},XN=n=>te(n)?n==="|":n.type==="separator",eA={type:"separator"},JN=n=>{const r=i=>({text:i.text,icon:i.icon,enabled:i.enabled,shortcut:i.shortcut});if(te(n))return n;switch(n.type){case"separator":return eA;case"submenu":return{type:"nestedmenuitem",...r(n),getSubmenuItems:()=>{const l=n.getSubmenuItems();return te(l)?l:pt(l,JN)}};default:const i=n;return{type:"menuitem",...r(i),onAction:Ut(i.onAction)}}},tA=(n,r)=>{if(r.length===0)return n;const i=rt(n).filter(l=>!XN(l)).fold(()=>[],l=>[eA]);return n.concat(i).concat(r).concat([eA])},Ob=(n,r)=>!(i=>i.type==="longpress"||Vo(i,"touches"))(r)&&(r.button!==2||r.target===n.getBody()&&r.pointerType===""),QN=(n,r)=>Ob(n,r)?n.selection.getStart(!0):r.target,XB=(n,r,i)=>{const l=Yr().deviceType.isTouch,u=La(or.sketch({dom:{tag:"div"},lazySink:r,onEscape:()=>n.focus(),onShow:()=>i.setContextMenuState(!0),onHide:()=>i.setContextMenuState(!1),fireDismissalEventInstead:{},inlineBehaviours:xt([en("dismissContextMenu",[Xe(Ju(),(y,v)=>{x.close(y),n.focus()})])])})),f=()=>or.hide(u),p=y=>{if(ZN(n)&&y.preventDefault(),((C,O)=>O.ctrlKey&&!ZN(C))(n,y)||(C=>QE(C).length===0)(n))return;const v=((C,O)=>{const A=qB(C),R=Ob(C,O)?"selection":"point";if(yi(A)){const F=QN(C,O);return Xy(Vt(F),A)?"node":R}return R})(n,y);(l()?YB:GN)(n,y,()=>{const C=QN(n,y),O=n.ui.registry.getAll(),A=QE(n);return((R,F,$)=>{const G=zo(F,(J,ae)=>St(R,ae.toLowerCase()).map(X=>{const Y=X.update($);if(te(Y)&&yi(Mi(Y)))return tA(J,Y.split(" "));if(He(Y)&&Y.length>0){const ne=pt(Y,JN);return tA(J,ne)}return J}).getOrThunk(()=>J.concat([ae])),[]);return G.length>0&&XN(G[G.length-1])&&G.pop(),G})(O.contextMenus,A,C)},i,u,v)};n.on("init",()=>{const y="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(l()?"":" ResizeWindow");n.on(y,f),n.on("longpress contextmenu",p)})},oA=Si([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),zb=n=>r=>r.translate(-n.left,-n.top),cc=n=>r=>r.translate(n.left,n.top),Af=n=>(r,i)=>zo(n,(l,u)=>u(l),pe(r,i)),Vv=(n,r,i)=>n.fold(Af([cc(i),zb(r)]),Af([zb(r)]),Af([])),u1=(n,r,i)=>n.fold(Af([cc(i)]),Af([]),Af([cc(r)])),eD=(n,r,i)=>n.fold(Af([]),Af([zb(i)]),Af([cc(r),zb(i)])),tD=(n,r,i)=>{const l=n.fold((u,f)=>({position:D.some("absolute"),left:D.some(u+"px"),top:D.some(f+"px")}),(u,f)=>({position:D.some("absolute"),left:D.some(u-i.left+"px"),top:D.some(f-i.top+"px")}),(u,f)=>({position:D.some("fixed"),left:D.some(u+"px"),top:D.some(f+"px")}));return{right:D.none(),bottom:D.none(),...l}},nA=(n,r,i,l)=>{const u=(f,p)=>(y,v)=>{const C=f(r,i,l);return p(y.getOr(C.left),v.getOr(C.top))};return n.fold(u(eD,jv),u(u1,jp),u(Vv,Nb))},jv=oA.offset,jp=oA.absolute,Nb=oA.fixed,oD=(n,r)=>{const i=yr(n,r);return Ot(i)?NaN:parseInt(i,10)},nD=(n,r,i,l,u,f)=>{const p=((C,O,A,R)=>((F,$)=>{const G=F.element,J=oD(G,$.leftAttr),ae=oD(G,$.topAttr);return isNaN(J)||isNaN(ae)?D.none():D.some(pe(J,ae))})(C,O).fold(()=>A,F=>Nb(F.left+R.left,F.top+R.top)))(n,r,i,l),y=r.mustSnap?rD(n,r,p,u,f):aD(n,r,p,u,f),v=Vv(p,u,f);return((C,O,A)=>{const R=C.element;wo(R,O.leftAttr,A.left+"px"),wo(R,O.topAttr,A.top+"px")})(n,r,v),y.fold(()=>({coord:Nb(v.left,v.top),extra:D.none()}),C=>({coord:C.output,extra:C.extra}))},sD=(n,r,i,l)=>ko(n,u=>{const f=u.sensor;return((y,v,C,O,A,R)=>{const F=u1(y,A,R),$=u1(v,A,R);return Math.abs(F.left-$.left)<=C&&Math.abs(F.top-$.top)<=O})(r,f,u.range.left,u.range.top,i,l)?D.some({output:nA(u.output,r,i,l),extra:u.extra}):D.none()}),rD=(n,r,i,l,u)=>{const f=r.getSnapPoints(n);return sD(f,i,l,u).orThunk(()=>zo(f,(y,v)=>{const C=v.sensor,O=((A,R,F,$,G,J)=>{const ae=u1(A,G,J),X=u1(R,G,J),Y=Math.abs(ae.left-X.left),ne=Math.abs(ae.top-X.top);return pe(Y,ne)})(i,C,v.range.left,v.range.top,l,u);return y.deltas.fold(()=>({deltas:D.some(O),snap:D.some(v)}),A=>(O.left+O.top)/2<=(A.left+A.top)/2?{deltas:D.some(O),snap:D.some(v)}:y)},{deltas:D.none(),snap:D.none()}).snap.map(y=>({output:nA(y.output,i,l,u),extra:y.extra})))},aD=(n,r,i,l,u)=>{const f=r.getSnapPoints(n);return sD(f,i,l,u)};var iD=Object.freeze({__proto__:null,snapTo:(n,r,i,l)=>{const u=r.getTarget(n.element);if(r.repositionTarget){const f=ha(n.element),p=_s(f),y=Oc(u),v=((O,A,R)=>({coord:nA(O.output,O.output,A,R),extra:O.extra}))(l,p,y),C=tD(v.coord,0,y);ri(u,C)}}});const sA="data-initial-z-index",lD=(n,r)=>{n.getSystem().addToGui(r),(i=>{$r(i.element).filter(ys).each(l=>{er(l,"z-index").each(u=>{wo(l,sA,u)}),Mo(l,"z-index",Ns(i.element,"z-index"))})})(r)},JB=n=>{(r=>{$r(r.element).filter(ys).each(i=>{Fs(i,sA).fold(()=>Vn(i,"z-index"),l=>Mo(i,"z-index",l)),pn(i,sA)})})(n),n.getSystem().removeFromGui(n)},cD=(n,r,i)=>n.getSystem().build(Mu.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[r]},events:i}));var QB=Zs("snaps",[nt("getSnapPoints"),Dn("onSensor"),nt("leftAttr"),nt("topAttr"),Ne("lazyViewport",jr),Ne("mustSnap",!1)]);const rA=[Ne("useFixed",Fe),nt("blockerClass"),Ne("getTarget",Ct),Ne("onDrag",Ke),Ne("repositionTarget",!0),Ne("onDrop",Ke),xs("getBounds",jr),QB],aA=n=>{return(r=er(n,"left"),i=er(n,"top"),l=er(n,"position"),r.isSome()&&i.isSome()&&l.isSome()?D.some(((u,f,p)=>(p==="fixed"?Nb:jv)(parseInt(u,10),parseInt(f,10)))(r.getOrDie(),i.getOrDie(),l.getOrDie())):D.none()).getOrThunk(()=>{const u=Ye(n);return jp(u.left,u.top)});var r,i,l},dD=(n,r)=>({bounds:n.getBounds(),height:Na(r.element),width:Xn(r.element)}),iA=(n,r,i,l,u)=>{const f=i.update(l,u),p=i.getStartData().getOrThunk(()=>dD(r,n));f.each(y=>{((v,C,O,A)=>{const R=C.getTarget(v.element);if(C.repositionTarget){const F=ha(v.element),$=_s(F),G=Oc(R),J=aA(R),ae=((Y,ne,ie,de,we,ze,tt)=>((Je,Ze,kt,Wt,ro)=>{const yo=ro.bounds,Ho=u1(Ze,kt,Wt),xn=Nc(Ho.left,yo.x,yo.x+yo.width-ro.width),Bs=Nc(Ho.top,yo.y,yo.y+yo.height-ro.height),Xs=jp(xn,Bs);return Ze.fold(()=>{const on=eD(Xs,kt,Wt);return jv(on.left,on.top)},ue(Xs),()=>{const on=Vv(Xs,kt,Wt);return Nb(on.left,on.top)})})(0,ne.fold(()=>{const Je=(Ze=ie,kt=ze.left,Wt=ze.top,Ze.fold((yo,Ho)=>jv(yo+kt,Ho+Wt),(yo,Ho)=>jp(yo+kt,Ho+Wt),(yo,Ho)=>Nb(yo+kt,Ho+Wt)));var Ze,kt,Wt;const ro=Vv(Je,de,we);return Nb(ro.left,ro.top)},Je=>{const Ze=nD(Y,Je,ie,ze,de,we);return Ze.extra.each(kt=>{Je.onSensor(Y,kt)}),Ze.coord}),de,we,tt))(v,C.snaps,J,$,G,A,O),X=tD(ae,0,G);ri(R,X)}C.onDrag(v,R,A)})(n,r,p,y)})},lA=(n,r,i,l)=>{r.each(JB),i.snaps.each(f=>{((p,y)=>{((v,C)=>{const O=v.element;pn(O,C.leftAttr),pn(O,C.topAttr)})(p,y)})(n,f)});const u=i.getTarget(n.element);l.reset(),i.onDrop(n,u)},cA=n=>(r,i)=>{const l=u=>{i.setStartData(dD(r,u))};return $o([Xe(Yf(),u=>{i.getStartData().each(()=>l(u))}),...n(r,i,l)])};var eP=Object.freeze({__proto__:null,getData:n=>D.from(pe(n.x,n.y)),getDelta:(n,r)=>pe(r.left-n.left,r.top-n.top)});const uD=(n,r,i)=>[Xe(at(),(l,u)=>{if(u.event.raw.button!==0)return;u.stop();const f=()=>lA(l,D.some(v),n,r),p=HC(f,200),y={drop:f,delayDrop:p.schedule,forceDrop:f,move:C=>{p.cancel(),iA(l,n,r,eP,C)}},v=cD(l,n.blockerClass,(C=>$o([Xe(at(),C.forceDrop),Xe(Lo(),C.drop),Xe(xo(),(O,A)=>{C.move(A.event)}),Xe(Uo(),C.delayDrop)]))(y));i(l),lD(l,v)})],tP=[...rA,Es("dragger",{handlers:cA(uD)})];var fD=Object.freeze({__proto__:null,getData:n=>{const r=n.raw.touches;return r.length===1?(i=>{const l=i[0];return D.some(pe(l.clientX,l.clientY))})(r):D.none()},getDelta:(n,r)=>pe(r.left-n.left,r.top-n.top)});const mD=(n,r,i)=>{const l=Nn(),u=f=>{lA(f,l.get(),n,r),l.clear()};return[Xe(P(),(f,p)=>{p.stop();const y=()=>u(f),v={drop:y,delayDrop:Ke,forceDrop:y,move:O=>{iA(f,n,r,fD,O)}},C=cD(f,n.blockerClass,(O=>$o([Xe(P(),O.forceDrop),Xe(ge(),O.drop),Xe(xe(),O.drop),Xe(q(),(A,R)=>{O.move(R.event)})]))(v));l.set(C),i(f),lD(f,C)}),Xe(q(),(f,p)=>{p.stop(),iA(f,n,r,fD,p.event)}),Xe(ge(),(f,p)=>{p.stop(),u(f)}),Xe(xe(),u)]},oP=tP,pD=[...rA,Es("dragger",{handlers:cA(mD)})],gD=[...rA,Es("dragger",{handlers:cA((n,r,i)=>[...uD(n,r,i),...mD(n,r,i)])})];var nP=Object.freeze({__proto__:null,mouse:oP,touch:pD,mouseOrTouch:gD}),sP=Object.freeze({__proto__:null,init:()=>{let n=D.none(),r=D.none();const i=ue({});return Jr({readState:i,reset:()=>{n=D.none(),r=D.none()},update:(l,u)=>l.getData(u).bind(f=>((p,y)=>{const v=n.map(C=>p.getDelta(C,y));return n=D.some(y),v})(l,f)),getStartData:()=>r,setStartData:l=>{r=D.some(l)}})}});const Db=k({branchKey:"mode",branches:nP,name:"dragging",active:{events:(n,r)=>n.dragger.handlers(n,r)},extra:{snap:n=>({sensor:n.sensor,range:n.range,output:n.output,extra:D.from(n.extra)})},state:sP,apis:iD}),hD=(n,r,i,l,u,f)=>n.fold(()=>Db.snap({sensor:jp(i-20,l-20),range:pe(u,f),output:jp(D.some(i),D.some(l)),extra:{td:r}}),p=>{const y=i-20,v=l-20,C=p.element.dom.getBoundingClientRect();return Db.snap({sensor:jp(y,v),range:pe(40,40),output:jp(D.some(i-C.width/2),D.some(l-C.height/2)),extra:{td:r}})}),bD=(n,r,i)=>({getSnapPoints:n,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:(l,u)=>{const f=u.td;((p,y)=>p.exists(v=>$n(v,y)))(r.get(),f)||(r.set(f),i(f))},mustSnap:!0}),yD=n=>ns(Oi.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:xt([Db.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:n}),yb.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}})),vD=(n,r)=>{const i=so([]),l=so([]),u=so(!1),f=Nn(),p=Nn(),y=X=>{const Y=Va(X);return hD(A.getOpt(r),X,Y.x,Y.y,Y.width,Y.height)},v=X=>{const Y=Va(X);return hD(R.getOpt(r),X,Y.right,Y.bottom,Y.width,Y.height)},C=bD(()=>pt(i.get(),X=>y(X)),f,X=>{p.get().each(Y=>{n.dispatch("TableSelectorChange",{start:X,finish:Y})})}),O=bD(()=>pt(l.get(),X=>v(X)),p,X=>{f.get().each(Y=>{n.dispatch("TableSelectorChange",{start:Y,finish:X})})}),A=yD(C),R=yD(O),F=La(A.asSpec()),$=La(R.asSpec()),G=(X,Y,ne,ie)=>{const de=ne(Y);Db.snapTo(X,de),((we,ze,tt,Je)=>{const Ze=ze.dom.getBoundingClientRect();Vn(we.element,"display");const kt=yd(Vt(n.getBody())).dom.innerHeight,Wt=Ze[ie]<0,ro=((yo,Ho)=>yo[ie]>Ho)(Ze,kt);(Wt||ro)&&Mo(we.element,"display","none")})(X,Y)},J=X=>G(F,X,y,"top"),ae=X=>G($,X,v,"bottom");if(Yr().deviceType.isTouch()){const X=Y=>pt(Y,Vt);n.on("TableSelectionChange",Y=>{u.get()||(hf(r,F),hf(r,$),u.set(!0));const ne=Vt(Y.start),ie=Vt(Y.finish);f.set(ne),p.set(ie),D.from(Y.otherCells).each(de=>{i.set(X(de.upOrLeftCells)),l.set(X(de.downOrRightCells)),J(ne),ae(ie)})}),n.on("ResizeEditor ResizeWindow ScrollContent",()=>{f.get().each(J),p.get().each(ae)}),n.on("TableSelectionClear",()=>{u.get()&&($i(F),$i($),u.set(!1)),f.clear(),p.clear()})}},_D=(n,r,i)=>{var l;const u=(l=r.delimiter)!==null&&l!==void 0?l:"›";return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:xt([po.config({mode:"flow",selector:"div[role=button]"}),Fo.config({disabled:i.isDisabled}),Ca(),ws.config({}),So.config({}),en("elementPathEvents",[Ss((f,p)=>{n.shortcuts.add("alt+F11","focus statusbar elementpath",()=>po.focusIn(f)),n.on("NodeChange",y=>{const v=(O=>{const A=[];let R=O.length;for(;R-- >0;){const $=O[R];if($.nodeType===1&&(F=$).nodeName!=="BR"&&!F.getAttribute("data-mce-bogus")&&F.getAttribute("data-mce-type")!=="bookmark"){const G=U3(n,$);if(G.isDefaultPrevented()||A.push({name:G.name,element:$}),G.isPropagationStopped())break}}var F;return A})(y.parents),C=v.length>0?zo(v,(O,A,R)=>{const F=(($,G,J)=>Oi.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{"data-index":J}},components:[wr($)],action:ae=>{n.focus(),n.selection.select(G),n.nodeChanged()},buttonBehaviours:xt([Pr.config({...i.tooltips.getConfig({tooltipText:i.translate(["Select the {0} element",G.nodeName.toLowerCase()]),onShow:(ae,X)=>{((Y,ne)=>{const ie=D.from(yr(Y,"id")).getOrThunk(()=>{const de=Xt("aria");return wo(ne,"id",de),de});wo(Y,"aria-describedby",ie)})(ae.element,X.element)},onHide:ae=>{var X;X=ae.element,pn(X,"aria-describedby")}})}),pi(i.isDisabled),Ca()])}))(A.name,A.element,R);return R===0?O.concat([F]):O.concat([{dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0}},components:[wr(` ${u} `)]},F])},[]):[];So.set(f,C)})})])]),components:[]}};var Up;(function(n){n[n.None=0]="None",n[n.Both=1]="Both",n[n.Vertical=2]="Vertical"})(Up||(Up={}));const Kw=(n,r,i)=>{const l=Vt(n.getContainer()),u=((f,p,y,v,C)=>{const O={height:Fv(v+p.top,Ly(f),ox(f))};return y===Up.Both&&(O.width=Fv(C+p.left,M0(f),By(f))),O})(n,r,i,Ds(l),Go(l));rs(u,(f,p)=>{Lt(f)&&Mo(l,p,Yg(f))}),(f=>{f.dispatch("ResizeEditor")})(n)},Gw=(n,r,i,l)=>{const u=pe(20*i,20*l);return Kw(n,u,r),D.some(!0)},xD=(n,r)=>{const i=()=>{const l=[],u=P2(n),f=R4(n),p=Fc(n)||n.hasPlugin("wordcount");return f&&l.push(_D(n,{},r)),u&&l.push((()=>{const y=Dx("Alt+0");return{dom:{tag:"div",classes:["tox-statusbar__help-text"]},components:[wr(jd.translate(["Press {0} for help",y]))]}})()),p&&l.push((()=>{const y=[];return n.hasPlugin("wordcount")&&y.push(((v,C)=>{const O=(A,R,F)=>So.set(A,[wr(C.translate(["{0} "+F,R[F]]))]);return Oi.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:xt([pi(C.isDisabled),Ca(),ws.config({}),So.config({}),Le.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),en("wordcount-events",[Ml(A=>{const R=Le.getValue(A),F=R.mode==="words"?"characters":"words";Le.setValue(A,{mode:F,count:R.count}),O(A,R.count,F)}),Ss(A=>{v.on("wordCountUpdate",R=>{const{mode:F}=Le.getValue(A);Le.setValue(A,{mode:F,count:R.wordCount}),O(A,R.wordCount,F)})})])]),eventOrder:{[di()]:["disabling","alloy.base.behaviour","wordcount-events"]}})})(n,r)),Fc(n)&&y.push({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":n.translate(["Build with {0}","TinyMCE"])},innerHtml:n.translate(["Build with {0}",` +`.trim()])},behaviours:xt([Po.config({})])}]}),{dom:{tag:"div",classes:["tox-statusbar__right-container"]},components:y}})()),l.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container",...(()=>{const y="tox-statusbar__text-container--flex-start",v="tox-statusbar__text-container--flex-end";if(u){const C="tox-statusbar__text-container-3-cols";return p||f?p&&!f?[C,v]:[C,y]:[C,"tox-statusbar__text-container--space-around"]}return[p&&!f?v:y]})()]},components:l}]:[]};return{dom:{tag:"div",classes:["tox-statusbar"]},components:(()=>{const l=i(),u=((f,p)=>{const y=(C=>{const O=Ja(C);return O===!1?Up.None:O==="both"?Up.Both:Up.Vertical})(f);if(y===Up.None)return D.none();const v=y===Up.Both?"Press the arrow keys to resize the editor.":"Press the Up and Down arrow keys to resize the editor.";return D.some(Hc("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{"aria-label":p.translate(v),"data-mce-name":"resize-handle"},behaviours:[Db.config({mode:"mouse",repositionTarget:!1,onDrag:(C,O,A)=>Kw(f,A,y),blockerClass:"tox-blocker"}),po.config({mode:"special",onLeft:()=>Gw(f,y,-1,0),onRight:()=>Gw(f,y,1,0),onUp:()=>Gw(f,y,0,-1),onDown:()=>Gw(f,y,0,1)}),ws.config({}),Po.config({}),Pr.config(p.tooltips.getConfig({tooltipText:p.translate("Resize")}))]},p.icons))})(n,r);return l.concat(u.toArray())})()}},wD=(n,r)=>r.get().getOrDie(`UI for ${n} has not been rendered`),rP=(n,r)=>{const i=n.inline,l=i?FB:a8,u=Np(n)?IL:PL,f=(()=>{const de=Nn(),we=Nn(),ze=Nn();return{dialogUi:de,popupUi:we,mainUi:ze,getUiMotherships:()=>{const tt=de.get().map(Ze=>Ze.mothership),Je=we.get().map(Ze=>Ze.mothership);return tt.fold(()=>Je.toArray(),Ze=>Je.fold(()=>[Ze],kt=>$n(Ze.element,kt.element)?[Ze]:[Ze,kt]))},lazyGetInOuterOrDie:(tt,Je)=>()=>ze.get().bind(Ze=>Je(Ze.outerContainer)).getOrDie(`Could not find ${tt} element in OuterContainer`)}})(),p=Nn(),y=Nn(),v=Nn(),C=Yr().deviceType.isTouch()?["tox-platform-touch"]:[],O=I2(n),A=nb(n),R=ns({dom:{tag:"div",classes:["tox-anchorbar"]}}),F=ns({dom:{tag:"div",classes:["tox-bottom-anchorbar"]}}),$=()=>f.mainUi.get().map(de=>de.outerContainer).bind(Ls.getHeader),G=f.lazyGetInOuterOrDie("anchor bar",R.getOpt),J=f.lazyGetInOuterOrDie("bottom anchor bar",F.getOpt),ae=f.lazyGetInOuterOrDie("toolbar",Ls.getToolbar),X=f.lazyGetInOuterOrDie("throbber",Ls.getThrobber),Y=((de,we,ze,tt)=>{const Je=so(!1),Ze=(Rn=>{const Co=so(I2(Rn)?"bottom":"top");return{isPositionedAtTop:()=>Co.get()==="top",getDockingMode:Co.get,setDockingMode:Co.set}})(we),kt={icons:()=>we.ui.registry.getAll().icons,menuItems:()=>we.ui.registry.getAll().menuItems,translate:jd.translate,isDisabled:()=>we.mode.isReadOnly()||!we.ui.isEnabled(),getOption:we.options.get,tooltips:aE(de.dialog)},Wt=$z(we),ro=(Rn=>{const Co=Ia=>()=>Rn.formatter.match(Ia),Js=Ia=>()=>{const Ea=Rn.formatter.get(Ia);return Ea!==void 0?D.some({tag:Ea.length>0&&(Ea[0].inline||Ea[0].block)||"div",styles:Rn.dom.parseStyle(Rn.formatter.getCssText(Ia))}):D.none()},ms=so([]),zi=so([]),Ni=so(!1);return Rn.on("PreInit",Ia=>{const Ea=Nz(Rn),Zp=rE(Rn,Ea,Co,Js);ms.set(Zp)}),Rn.on("addStyleModifications",Ia=>{const Ea=rE(Rn,Ia.items,Co,Js);zi.set(Ea),Ni.set(Ia.replace)}),{getData:()=>{const Ia=Ni.get()?[]:ms.get(),Ea=zi.get();return Ia.concat(Ea)}}})(we),yo=(Rn=>({colorPicker:kL(Rn),hasCustomColors:CL(Rn),getColors:SL(Rn),getColorCols:EL(Rn)}))(we),Ho=(Rn=>({isDraggableModal:Tz(Rn)}))(we),xn={shared:{providers:kt,anchors:wL(we,ze,tt,Ze.isPositionedAtTop),header:Ze},urlinput:Wt,styles:ro,colorinput:yo,dialog:Ho,isContextMenuOpen:()=>Je.get(),setContextMenuState:Rn=>Je.set(Rn)},Bs=Rn=>D.none(),Xs={...xn,shared:{...xn.shared,interpreter:Rn=>kz(Rn,{},Xs,Bs),getSink:de.popup}},on={...xn,shared:{...xn.shared,interpreter:Rn=>kz(Rn,{},on,Bs),getSink:de.dialog}};return{popup:Xs,dialog:on}})({popup:()=>un.fromOption(f.popupUi.get().map(de=>de.sink),"(popup) UI has not been rendered"),dialog:()=>un.fromOption(f.dialogUi.get().map(de=>de.sink),"UI has not been rendered")},n,G,J),ne=()=>{const de=(()=>{const xn={attributes:{[ol]:O?Bc.BottomToTop:Bc.TopToBottom}},Bs=Ls.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:Y.popup,onEscape:()=>{n.focus()}}),Xs=Ls.parts.toolbar({dom:{tag:"div",classes:["tox-toolbar"]},getSink:Y.popup.shared.getSink,providers:Y.popup.shared.providers,onEscape:()=>{n.focus()},onToolbarToggled:Ea=>{((Zp,h1)=>{Zp.dispatch("ToggleToolbarDrawer",{state:h1})})(n,Ea)},type:A,lazyToolbar:ae,lazyHeader:()=>$().getOrDie("Could not find header element"),...xn}),on=Ls.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:Y.popup.shared.providers,onEscape:()=>{n.focus()},type:A}),Rn=F0(n),Co=I0(n),Js=P0(n),ms=L4(n),zi=Ls.parts.promotion({dom:{tag:"div",classes:["tox-promotion"]}}),Ni=Rn||Co||Js,Ia=ms?[zi,Bs]:[Bs];return Ls.parts.header({dom:{tag:"div",classes:["tox-editor-header"].concat(Ni?[]:["tox-editor-header--empty"]),...xn},components:Cs([Js?Ia:[],Rn?[on]:Co?[Xs]:[],sb(n)?[]:[R.asSpec()]]),sticky:Np(n),editor:n,sharedBackstage:Y.popup.shared})})(),we={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[Ls.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),Ls.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}})]},ze=Ls.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:Y.popup}),tt=Ls.parts.viewWrapper({backstage:Y.popup}),Je=D4(n)&&!i?D.some(xD(n,Y.popup.shared.providers)):D.none(),Ze=Cs([O?[]:[de],i?[]:[we],O?[de]:[]]),kt=Ls.parts.editorContainer({components:Cs([Ze,i?[]:[F.asSpec()]])}),Wt=mx(n),ro={role:"application",...jd.isRtl()?{dir:"rtl"}:{},...Wt?{"aria-hidden":"true"}:{}},yo=La(Ls.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(i?["tox-tinymce-inline"]:[]).concat(O?["tox-tinymce--toolbar-bottom"]:[]).concat(C),styles:{visibility:"hidden",...Wt?{opacity:"0",border:"0"}:{}},attributes:ro},components:[kt,...i?[]:[tt,...Je.toArray()],ze],behaviours:xt([Ca(),Fo.config({disableClass:"tox-tinymce--disabled"}),po.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"})])})),Ho=Ux(yo);return p.set(Ho),{mothership:Ho,outerContainer:yo}},ie=de=>{const we=Yg((tt=>(Ze=>{const kt=D0(Ze),Wt=Ly(Ze),ro=ox(Ze);return Iv(kt).map(yo=>Fv(yo,Wt,ro))})(tt).getOr(D0(tt)))(n)),ze=Yg((tt=>ZE(tt).getOr(R0(tt)))(n));return n.inline||(Gr("div","width",ze)&&Mo(de.element,"width",ze),Gr("div","height",we)?Mo(de.element,"height",we):Mo(de.element,"height","400px")),we};return{popups:{backstage:Y.popup,getMothership:()=>wD("popups",v)},dialogs:{backstage:Y.dialog,getMothership:()=>wD("dialogs",y)},renderUI:()=>{const de=ne(),we=(()=>{const tt=fx(n),Je=$n(za(),tt)&&Ns(tt,"display")==="grid",Ze={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(C),attributes:{...jd.isRtl()?{dir:"rtl"}:{}}},behaviours:xt([Xa.config({useFixed:()=>u.isDocked($)})])},kt={dom:{styles:{width:document.body.clientWidth+"px"}},events:$o([Xe(Dd(),yo=>{Mo(yo.element,"width",document.body.clientWidth+"px")})])},Wt=La(ls(Ze,Je?kt:{})),ro=Ux(Wt);return y.set(ro),{sink:Wt,mothership:ro}})(),ze=Dp(n)?(()=>{const tt={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-silver-popup-sink","tox-tinymce-aux"].concat(C),attributes:{...jd.isRtl()?{dir:"rtl"}:{}}},behaviours:xt([Xa.config({useFixed:()=>u.isDocked($),getBounds:()=>r.getPopupSinkBounds()})])},Je=La(tt),Ze=Ux(Je);return v.set(Ze),{sink:Je,mothership:Ze}})():(tt=>(v.set(tt.mothership),tt))(we);return f.dialogUi.set(we),f.popupUi.set(ze),f.mainUi.set(de),(tt=>{const{mainUi:Je,popupUi:Ze,uiMotherships:kt}=tt;Zn(sx(n),(Co,Js)=>{n.ui.registry.addGroupToolbarButton(Js,Co)});const{buttons:Wt,menuItems:ro,contextToolbars:yo,sidebars:Ho,views:xn}=n.ui.registry.getAll(),Bs=ux(n),Xs={menuItems:ro,menus:Ag(n),menubar:zp(n),toolbar:Bs.getOrThunk(()=>Iy(n)),allowToolbarGroups:A===Vd.floating,buttons:Wt,sidebar:Ho,views:xn};var on;on=Je.outerContainer,n.addShortcut("alt+F9","focus menubar",()=>{Ls.focusMenubar(on)}),n.addShortcut("alt+F10","focus toolbar",()=>{Ls.focusToolbar(on)}),n.addCommand("ToggleToolbarDrawer",(Co,Js)=>{Js!=null&&Js.skipFocus?Ls.toggleToolbarDrawerWithoutFocusing(on):Ls.toggleToolbarDrawer(on)}),n.addQueryStateHandler("ToggleToolbarDrawer",()=>Ls.isToolbarDrawerToggled(on)),((Co,Js,ms)=>{const zi=(Kn,$m)=>{$t([Js,...ms],Hu=>{Hu.broadcastEvent(Kn,$m)})},Ni=(Kn,$m)=>{$t([Js,...ms],Hu=>{Hu.broadcastOn([Kn],$m)})},Ia=Kn=>Ni(T(),{target:Kn.target}),Ea=$a(),Zp=Ai(Ea,"touchstart",Ia),h1=Ai(Ea,"touchmove",Kn=>zi(no(),Kn)),Jg=Ai(Ea,"touchend",Kn=>zi(Ql(),Kn)),Wp=Ai(Ea,"mousedown",Ia),e_=Ai(Ea,"mouseup",Kn=>{Kn.raw.button===0&&Ni(B(),{target:Kn.target})}),Qg=Kn=>Ni(T(),{target:Vt(Kn.target)}),Fm=Kn=>{Kn.button===0&&Ni(B(),{target:Vt(Kn.target)})},Mb=()=>{$t(Co.editorManager.get(),Kn=>{Co!==Kn&&Kn.dispatch("DismissPopups",{relatedTarget:Co})})},Lb=Kn=>zi(Yf(),Eu(Kn)),b1=Kn=>{Ni(M(),{}),zi(Dd(),Eu(Kn))},sk=Vs(Vt(Co.getElement())),t_=o0(sk,"scroll",Kn=>{requestAnimationFrame(()=>{if(Co.getContainer()!=null){const $m=Tg(Co,Js.element).map(Hu=>[Hu.element,...Hu.others]).getOr([]);Ao($m,Hu=>$n(Hu,Kn.target))&&(Co.dispatch("ElementScroll",{target:Kn.target.dom}),zi(Xf(),Kn))}})}),eh=()=>Ni(M(),{}),Hm=Kn=>{Kn.state&&Ni(T(),{target:Vt(Co.getContainer())})},qp=Kn=>{Ni(T(),{target:Vt(Kn.relatedTarget.getContainer())})},o_=Kn=>Co.dispatch("focusin",Kn),n_=Kn=>Co.dispatch("focusout",Kn);Co.on("PostRender",()=>{Co.on("click",Qg),Co.on("tap",Qg),Co.on("mouseup",Fm),Co.on("mousedown",Mb),Co.on("ScrollWindow",Lb),Co.on("ResizeWindow",b1),Co.on("ResizeEditor",eh),Co.on("AfterProgressState",Hm),Co.on("DismissPopups",qp),$t([Js,...ms],Kn=>{Kn.element.dom.addEventListener("focusin",o_),Kn.element.dom.addEventListener("focusout",n_)})}),Co.on("remove",()=>{Co.off("click",Qg),Co.off("tap",Qg),Co.off("mouseup",Fm),Co.off("mousedown",Mb),Co.off("ScrollWindow",Lb),Co.off("ResizeWindow",b1),Co.off("ResizeEditor",eh),Co.off("AfterProgressState",Hm),Co.off("DismissPopups",qp),$t([Js,...ms],Kn=>{Kn.element.dom.removeEventListener("focusin",o_),Kn.element.dom.removeEventListener("focusout",n_)}),Wp.unbind(),Zp.unbind(),h1.unbind(),Jg.unbind(),e_.unbind(),t_.unbind()}),Co.on("detach",()=>{$t([Js,...ms],Kk),$t([Js,...ms],Kn=>Kn.destroy())})})(n,Je.mothership,kt),u.setup(n,Y.popup.shared,$),WB(n,Y.popup),XB(n,Y.popup.shared.getSink,Y.popup),(Co=>{const{sidebars:Js}=Co.ui.registry.getAll();$t(tn(Js),ms=>{const zi=Js[ms],Ni=()=>Kr(D.from(Co.queryCommandValue("ToggleSidebar")),ms);Co.ui.registry.addToggleButton(ms,{icon:zi.icon,tooltip:zi.tooltip,onAction:Ia=>{Co.execCommand("ToggleSidebar",!1,ms),Ia.setActive(Ni())},onSetup:Ia=>{Ia.setActive(Ni());const Ea=()=>Ia.setActive(Ni());return Co.on("ToggleSidebar",Ea),()=>{Co.off("ToggleSidebar",Ea)}}})})})(n),Xz(n,X,Y.popup.shared),VB(n,yo,Ze.sink,{backstage:Y.popup}),vD(n,Ze.sink);const Rn={targetNode:n.getElement(),height:ie(Je.outerContainer)};return l.render(n,tt,Xs,Y.popup,Rn)})({popupUi:ze,dialogUi:we,mainUi:de,uiMotherships:f.getUiMotherships()})}}},aP=ue([nt("lazySink"),vn("dragBlockClass"),xs("getBounds",jr),Ne("useTabstopAt",Gt),Ne("firstTabstop",0),Ne("eventOrder",{}),Jt("modalBehaviours",[po]),Qi("onExecute"),ui("onEscape")]),dA={sketch:Ct},uA=ue([id({name:"draghandle",overrides:(n,r)=>({behaviours:xt([Db.config({mode:"mouse",getTarget:i=>lm(i,'[role="dialog"]').getOr(i),blockerClass:n.dragBlockClass.getOrDie(new Error(`The drag blocker class was not specified for a dialog with a drag handle: +`+JSON.stringify(r,null,2)).message),getBounds:n.getDragBounds})])})}),nl({schema:[nt("dom")],name:"title"}),nl({factory:dA,schema:[nt("dom")],name:"close"}),nl({factory:dA,schema:[nt("dom")],name:"body"}),id({factory:dA,schema:[nt("dom")],name:"footer"}),zu({factory:{sketch:(n,r)=>({...n,dom:r.dom,components:r.components})},schema:[Ne("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Ne("components",[])],name:"blocker"})]),gr=pl({name:"ModalDialog",configFields:aP(),partFields:uA(),factory:(n,r,i,l)=>{const u=Nn(),f=Xt("modal-events"),p={...n.eventOrder,[ka()]:[f].concat(n.eventOrder["alloy.system.attached"]||[])},y=Yr();return{uid:n.uid,dom:n.dom,components:r,apis:{show:v=>{u.set(v);const C=n.lazySink(v).getOrDie(),O=l.blocker(),A=C.getSystem().build({...O,components:O.components.concat([Fi(v)]),behaviours:xt([Po.config({}),en("dialog-blocker-events",[Bd(Wn(),()=>{Qd.isBlocked(v)||po.focusIn(v)})])])});hf(C,A),po.focusIn(v)},hide:v=>{u.clear(),$r(v.element).each(C=>{v.getSystem().getByDom(C).each(O=>{$i(O)})})},getBody:v=>Tp(v,n,"body"),getFooter:v=>Ts(v,n,"footer"),setIdle:v=>{Qd.unblock(v)},setBusy:(v,C)=>{Qd.block(v,C)}},eventOrder:p,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Xo(n.modalBehaviours,[So.config({}),po.config({mode:"cyclic",onEnter:n.onExecute,onEscape:n.onEscape,useTabstopAt:n.useTabstopAt,firstTabstop:n.firstTabstop}),Qd.config({getRoot:u.get}),en(f,[Ss(v=>{const C=Tp(v,n,"title").element,O=(A=>A.dom.textContent)(C);y.os.isMacOS()&&st(O)?wo(v.element,"aria-label",O):((A,R)=>{const F=Fs(A,"id").fold(()=>{const $=Xt("dialog-label");return wo(R,"id",$),$},Ct);wo(A,"aria-labelledby",F)})(v.element,C)})])])}},apis:{show:(n,r)=>{n.show(r)},hide:(n,r)=>{n.hide(r)},getBody:(n,r)=>n.getBody(r),getFooter:(n,r)=>n.getFooter(r),setBusy:(n,r,i)=>{n.setBusy(r,i)},setIdle:(n,r)=>{n.setIdle(r)}}}),iP=ho([oa,eC].concat(db)),Uv=fl,fA=[iC("button"),Zd,Ol("align","end",["start","end"]),Ex,Wd,Xu("buttonType",["primary","secondary"])],Yw=[...fA,Ud],mA=[Al("type",["submit","cancel","custom"]),...Yw],lP=[Al("type",["menu"]),Mg,nv,Zd,li("items",iP),...fA],cP=[...fA,Al("type",["togglebutton"]),nv,Zd,Mg,xr("active",!1)],kD=_r("type",{submit:mA,cancel:mA,custom:mA,menu:lP,togglebutton:cP}),dP=[oa,Ud,Al("level",["info","warn","error","success"]),nC,Ne("url","")],pA=ho(dP),gA=[oa,Ud,Wd,iC("button"),Zd,r8,Xu("buttonType",["primary","secondary","toolbar"]),Ex],hA=ho(gA),f1=[oa,eC],Pa=f1.concat([sC]),uP=f1.concat([tC,Wd]),fP=ho(uP),CD=fl,SD=Pa.concat([b3("auto")]),mP=ho(SD),pP=xc([lb,Ud,nC]),gP=Pa.concat([Ci("storageKey","default")]),hP=ho(gP),bP=Zr,yP=ho(Pa),vP=Zr,ED=f1.concat([Ci("tag","textarea"),js("scriptId"),js("scriptUrl"),Xl("onFocus"),Wa("settings",void 0,ng)]),_P=f1.concat([Ci("tag","textarea"),Za("init")]),xP=Od(n=>Ms("customeditor.old",Ur(_P),n).orThunk(()=>Ms("customeditor.new",Ur(ED),n))),wP=Zr,AD=ho(Pa),bA=_c(vc),TD=n=>[oa,mu("columns"),n],OD=[oa,js("html"),Ol("presets","presentation",["presentation","document"]),xs("onInit",Ke),xr("stretched",!1)],zD=ho(OD),ND=Pa.concat([xr("border",!1),xr("sandboxed",!0),xr("streamContent",!1),xr("transparent",!0)]),yA=ho(ND),kP=Zr,vA=ho(f1.concat([Us("height")])),m1=ho([js("url"),Cc("zoom"),Cc("cachedWidth"),Cc("cachedHeight")]),DD=Pa.concat([Us("inputMode"),Us("placeholder"),xr("maximized",!1),Wd]),RD=ho(DD),MD=Zr,CP=n=>[oa,tC,n,Ol("align","start",["start","center","end"]),Us("for")],SP=[Ud,lb],Xw=[Ud,li("items",Uf(0,()=>LD))],LD=uu([ho(SP),ho(Xw)]),EP=Pa.concat([li("items",LD),Wd]),BD=ho(EP),PD=Zr,_A=Pa.concat([pu("items",[Ud,lb]),fr("size",1),Wd]),ID=ho(_A),Fl=Zr,FD=Pa.concat([xr("constrain",!0),Wd]),AP=ho(FD),HD=ho([js("width"),js("height")]),$D=f1.concat([tC,fr("min",0),fr("max",0)]),TP=ho($D),OP=Yc,zP=[oa,li("header",Zr),li("cells",_c(Zr))],VD=ho(zP),Im=Pa.concat([Us("placeholder"),xr("maximized",!1),Wd]),xA=ho(Im),jD=Zr,Zv=[Al("type",["directory","leaf"]),oC,js("id"),ur("menu",qz)],Jw=ho(Zv),NP=Zv.concat([li("children",Uf(0,()=>kc("type",{directory:UD,leaf:Jw})))]),UD=ho(NP),DP=kc("type",{directory:UD,leaf:Jw}),RP=[oa,li("items",DP),Xl("onLeafAction"),Xl("onToggleExpand"),Jn("defaultExpandedIds",[],Zr),Us("defaultSelectedId")],MP=ho(RP),LP=Pa.concat([Ol("filetype","file",["image","media","file"]),Wd,Us("picker_text")]),BP=ho(LP),ZD=ho([lb,$c]),wA=n=>dr("items","items",{tag:"required",process:{}},_c(Od(r=>Ms(`Checking item of ${n}`,Fu,r).fold(i=>un.error(ii(i)),i=>un.value(i))))),Fu=Gu(()=>{return kc("type",{alertbanner:pA,bar:ho((n=wA("bar"),[oa,n])),button:hA,checkbox:fP,colorinput:hP,colorpicker:yP,dropzone:AD,grid:ho(TD(wA("grid"))),iframe:yA,input:RD,listbox:BD,selectbox:ID,sizeinput:AP,slider:TP,textarea:xA,urlinput:BP,customeditor:xP,htmlpanel:zD,imagepreview:vA,collection:mP,label:ho(CP(wA("label"))),table:VD,tree:MP,panel:WD});var n}),Qw=[oa,Ne("classes",[]),li("items",Fu)],WD=ho(Qw),PP=[iC("tab"),oC,li("items",Fu)],qD=[oa,pu("tabs",PP)],KD=ho(qD),kA=Yw,ek=kD,Wv=ho([js("title"),Xr("body",kc("type",{panel:WD,tabpanel:KD})),Ci("size","normal"),Jn("buttons",[],ek),Ne("initialData",{}),xs("onAction",Ke),xs("onChange",Ke),xs("onSubmit",Ke),xs("onClose",Ke),xs("onCancel",Ke),xs("onTabChange",Ke)]),qv=ho([Al("type",["cancel","custom"]),...kA]),GD=ho([js("title"),js("url"),Cc("height"),Cc("width"),op("buttons",qv),xs("onAction",Ke),xs("onCancel",Ke),xs("onClose",Ke),xs("onMessage",Ke)]),tk=n=>ce(n)?[n].concat(Sn(ra(n),tk)):He(n)?Sn(n,tk):[],YD=n=>te(n.type)&&te(n.name),XD={checkbox:CD,colorinput:bP,colorpicker:vP,dropzone:bA,input:MD,iframe:kP,imagepreview:m1,selectbox:Fl,sizeinput:HD,slider:OP,listbox:PD,size:HD,textarea:jD,urlinput:ZD,customeditor:wP,collection:pP,togglemenuitem:Uv},IP=n=>{const r=(l=>cn(tk(l),YD))(n),i=Sn(r,l=>(u=>D.from(XD[u.type]))(l).fold(()=>[],u=>[Xr(l.name,u)]));return ho(i)},JD=n=>{var r;return{internalDialog:Ua(Ms("dialog",Wv,n)),dataValidator:IP(n),initialData:(r=n.initialData)!==null&&r!==void 0?r:{}}},Rb={open:(n,r)=>{const i=JD(r);return n(i.internalDialog,i.initialData,i.dataValidator)},openUrl:(n,r)=>n(Ua(Ms("dialog",GD,r))),redial:n=>JD(n)};var FP=Object.freeze({__proto__:null,events:(n,r)=>{const i=(l,u)=>{n.updateState.each(f=>{const p=f(l,u);r.set(p)}),n.renderComponents.each(f=>{const p=f(u,r.get());(n.reuseDom?S2:Qh)(l,p)})};return $o([Xe(Ii(),(l,u)=>{const f=u;if(!f.universal){const p=n.channel;Ge(f.channels,p)&&i(l,f.data)}}),Ss((l,u)=>{n.initialData.each(f=>{i(l,f)})})])}}),HP=Object.freeze({__proto__:null,getState:(n,r,i)=>i}),QD=[nt("channel"),vn("renderComponents"),vn("updateState"),vn("initialData"),xr("reuseDom",!0)];const dc=Qr({fields:QD,name:"reflecting",active:FP,apis:HP,state:Object.freeze({__proto__:null,init:()=>{const n=so(D.none());return{readState:()=>n.get().getOr("none"),get:n.get,set:n.set,clear:()=>n.set(D.none())}}})}),eR=n=>{const r=[],i={};return rs(n,(l,u)=>{l.fold(()=>{r.push(u)},f=>{i[u]=f})}),r.length>0?un.error(r):un.value(i)},tR=(n,r,i,l)=>{const u=ns(Vg.sketch(p=>({dom:{tag:"div",classes:["tox-form"].concat(n.classes)},components:pt(n.items,y=>Aw(p,y,r,i,l))})));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[u.asSpec()]}],behaviours:xt([po.config({mode:"acyclic",useTabstopAt:bn(e1)}),(f=u,In.config({find:f.getOpt})),hS(u,{postprocess:p=>eR(p).fold(y=>(console.error(y),{}),Ct)}),en("dialog-body-panel",[Xe(Wn(),(p,y)=>{p.getSystem().broadcastOn([hw],{newFocus:D.some(y.event.target)})})])])};var f},$P=ld({name:"TabButton",configFields:[Ne("uid",void 0),nt("value"),dr("dom","dom",kn(()=>({attributes:{role:"tab",id:Xt("aria"),"aria-selected":"false"}})),Pi()),vn("action"),Ne("domModification",{}),Jt("tabButtonBehaviours",[Po,po,Le]),nt("view")],factory:(n,r)=>({uid:n.uid,dom:n.dom,components:n.components,events:Ry(n.action),behaviours:Xo(n.tabButtonBehaviours,[Po.config({}),po.config({mode:"execution",useSpace:!0,useEnter:!0}),Le.config({store:{mode:"memory",initialValue:n.value}})]),domModification:n.domModification})}),oR=ue([nt("tabs"),nt("dom"),Ne("clickToDismiss",!1),Jt("tabbarBehaviours",[ss,po]),fp(["tabClass","selectedClass"])]),Kv=H_({factory:$P,name:"tabs",unit:"tab",overrides:n=>{const r=(l,u)=>{ss.dehighlight(l,u),lo(l,wt(),{tabbar:l,button:u})},i=(l,u)=>{ss.highlight(l,u),lo(l,Jf(),{tabbar:l,button:u})};return{action:l=>{const u=l.getSystem().getByUid(n.uid).getOrDie(),f=ss.isHighlighted(u,l);(f&&n.clickToDismiss?r:f?Ke:i)(u,l)},domModification:{classes:[n.markers.tabClass]}}}}),VP=ue([Kv]),CA=pl({name:"Tabbar",configFields:oR(),partFields:VP(),factory:(n,r,i,l)=>({uid:n.uid,dom:n.dom,components:r,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Xo(n.tabbarBehaviours,[ss.config({highlightClass:n.markers.selectedClass,itemClass:n.markers.tabClass,onHighlight:(u,f)=>{wo(f.element,"aria-selected","true")},onDehighlight:(u,f)=>{wo(f.element,"aria-selected","false")}}),po.config({mode:"flow",getInitial:u=>ss.getHighlighted(u).map(f=>f.element),selector:"."+n.markers.tabClass,executeOnMove:!0})])})}),jP=ld({name:"Tabview",configFields:[Jt("tabviewBehaviours",[So])],factory:(n,r)=>({uid:n.uid,dom:n.dom,behaviours:Xo(n.tabviewBehaviours,[So.config({})]),domModification:{attributes:{role:"tabpanel"}}})}),UP=ue([Ne("selectFirst",!0),Dn("onChangeTab"),Dn("onDismissTab"),Ne("tabs",[]),Jt("tabSectionBehaviours",[])]),ZP=nl({factory:CA,schema:[nt("dom"),Tl("markers",[nt("tabClass"),nt("selectedClass")])],name:"tabbar",defaults:n=>({tabs:n.tabs})}),WP=nl({factory:jP,name:"tabview"}),nR=ue([ZP,WP]),p1=pl({name:"TabSection",configFields:UP(),partFields:nR(),factory:(n,r,i,l)=>{const u=(f,p)=>{Ts(f,n,"tabbar").each(y=>{p(y).each(Ld)})};return{uid:n.uid,dom:n.dom,components:r,behaviours:To(n.tabSectionBehaviours),events:$o(Cs([n.selectFirst?[Ss((f,p)=>{u(f,ss.getFirst)})]:[],[Xe(Jf(),(f,p)=>{(y=>{const v=Le.getValue(y);Ts(y,n,"tabview").each(C=>{j(n.tabs,O=>O.value===v).each(O=>{const A=O.view();Fs(y.element,"id").each(R=>{wo(C.element,"aria-labelledby",R)}),So.set(C,A),n.onChangeTab(C,y,A)})})})(p.event.button)}),Xe(wt(),(f,p)=>{const y=p.event.button;n.onDismissTab(f,y)})]])),apis:{getViewItems:f=>Ts(f,n,"tabview").map(p=>So.contents(p)).getOr([]),showTab:(f,p)=>{u(f,y=>{const v=ss.getCandidates(y);return j(v,C=>Le.getValue(C)===p).filter(C=>!ss.isHighlighted(y,C))})}}}},apis:{getViewItems:(n,r)=>n.getViewItems(r),showTab:(n,r,i)=>{n.showTab(r,i)}}}),SA=(n,r)=>{Mo(n,"height",r+"px"),Mo(n,"flex-basis",r+"px")},g1=(n,r,i)=>{lm(n,'[role="dialog"]').each(l=>{Ys(l,'[role="tablist"]').each(u=>{i.get().map(f=>(Mo(r,"height","0"),Mo(r,"flex-basis","0"),Math.min(f,((p,y,v)=>{const C=Ki(p).dom,O=lm(p,".tox-dialog-wrap").getOr(p);let A;A=Ns(O,"position")==="fixed"?Math.max(C.clientHeight,window.innerHeight):Math.max(C.offsetHeight,C.scrollHeight);const R=Ds(y),F=y.dom.offsetLeft>=v.dom.offsetLeft+Go(v)?Math.max(Ds(v),R):R,$=parseInt(Ns(p,"margin-top"),10)||0,G=parseInt(Ns(p,"margin-bottom"),10)||0;return A-(Ds(p)+$+G-F)})(l,r,u)))).each(f=>{SA(r,f)})})})},Tf=n=>Ys(n,'[role="tabpanel"]'),ok="send-data-to-section",EA="send-data-to-view",sR=(n,r,i,l)=>{const u=so({}),f=O=>{const A=Le.getValue(O),R=eR(A).getOr({}),F=u.get(),$=ls(F,R);u.set($)},p=O=>{const A=u.get();Le.setValue(O,A)},y=so(null),v=pt(n.tabs,O=>({value:O.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"]},components:[wr(i.shared.providers.translate(O.title))],view:()=>[Vg.sketch(A=>({dom:{tag:"div",classes:["tox-form"]},components:pt(O.items,R=>Aw(A,R,r,i,l)),formBehaviours:xt([po.config({mode:"acyclic",useTabstopAt:bn(e1)}),en("TabView.form.events",[Ss(p),Tc(f)]),tl.config({channels:Xi([{key:ok,value:{onReceive:f}},{key:EA,value:{onReceive:p}}])})])}))]})),C=(O=>{const A=Nn();return{extraEvents:[Ss(F=>{const $=F.element;Tf($).each(G=>{Mo(G,"visibility","hidden"),F.getSystem().getByDom(G).toOptional().each(J=>{const ae=((Y,ne,ie)=>pt(Y,(de,we)=>{So.set(ie,Y[we].view());const ze=ne.dom.getBoundingClientRect();return So.set(ie,[]),ze.height}))(O,G,J);(Y=>yt(Be(Y,(ne,ie)=>ne>ie?-1:ne{yt(J).each(X=>p1.showTab(ae,X.value))})(O,F),requestAnimationFrame(()=>{g1($,G,A)})})}),Xe(Dd(),F=>{const $=F.element;Tf($).each(G=>{g1($,G,A)})}),Xe(Wx,(F,$)=>{const G=F.element;Tf(G).each(J=>{const ae=nd(Vs(J));Mo(J,"visibility","hidden");const X=er(J,"height").map(ne=>parseInt(ne,10));Vn(J,"height"),Vn(J,"flex-basis");const Y=J.dom.getBoundingClientRect().height;X.forall(ne=>Y>ne)?(A.set(Y),g1(G,J,A)):X.each(ne=>{SA(J,ne)}),Vn(J,"visibility"),ae.each(Ei)})})],selectFirst:!1}})(v);return p1.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:(O,A,R)=>{const F=Le.getValue(A);lo(O,bO,{name:F,oldName:y.get()}),y.set(F)},tabs:v,components:[p1.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[CA.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:xt([ws.config({})])}),p1.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:C.selectFirst,tabSectionBehaviours:xt([en("tabpanel",C.extraEvents),po.config({mode:"acyclic"}),In.config({find:O=>yt(p1.getViewItems(O))}),xb(D.none(),O=>(O.getSystem().broadcastOn([ok],{}),u.get()),(O,A)=>{u.set(A),O.getSystem().broadcastOn([EA],{})})])})},nk=(n,r,i,l,u,f)=>({dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:{...i.map(p=>({id:p})).getOr({}),...u?{"aria-live":"polite"}:{}}},components:[],behaviours:xt([pS(0),dc.config({channel:`${qO}-${r}`,updateState:(p,y)=>D.some({isTabPanel:()=>y.body.type==="tabpanel"}),renderComponents:p=>{const y=p.body;return y.type==="tabpanel"?[sR(y,p.initialData,l,f)]:[tR(y,p.initialData,l,f)]},initialData:n})])}),rR=xf.deviceType.isTouch(),Gv=(n,r)=>({dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[n,r]}),AA=(n,r)=>gr.parts.close(Oi.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":r.translate("Close")}},action:n,buttonBehaviours:xt([ws.config({})])})),TA=()=>gr.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}}),aR=(n,r)=>gr.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:km(`

    ${G4(r.translate(n))}

    `)}]}]}),iR=n=>gr.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:n}),lR=(n,r)=>[Mu.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:n}),Mu.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:r})],OA=n=>{const r="tox-dialog",i=r+"-wrap",l=i+"__backdrop",u=r+"__disable-scroll";return gr.sketch({lazySink:n.lazySink,onEscape:f=>(n.onEscape(f),D.some(!0)),useTabstopAt:f=>!e1(f),firstTabstop:n.firstTabstop,dom:{tag:"div",classes:[r].concat(n.extraClasses),styles:{position:"relative",...n.extraStyles}},components:[n.header,n.body,...n.footer.toArray()],parts:{blocker:{dom:km(`
    `),components:[{dom:{tag:"div",classes:rR?[l,l+"--opaque"]:[l]}}]}},dragBlockClass:i,modalBehaviours:xt([Po.config({}),en("dialog-events",n.dialogEvents.concat([Bd(Wn(),(f,p)=>{Qd.isBlocked(f)||po.focusIn(f)}),Xe(rg(),(f,p)=>{f.getSystem().broadcastOn([hw],{newFocus:p.event.newFocus})})])),en("scroll-lock",[Ss(()=>{At(za(),u)}),Tc(()=>{co(za(),u)})]),...n.extraBehaviours]),eventOrder:{[di()]:["dialog-events"],[ka()]:["scroll-lock","dialog-events","alloy.base.behaviour"],[Nl()]:["alloy.base.behaviour","dialog-events","scroll-lock"],...n.eventOrder}})},cR=n=>Oi.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":n.translate("Close"),"data-mce-name":"close"}},buttonBehaviours:xt([ws.config({}),Pr.config(n.tooltips.getConfig({tooltipText:n.translate("Close")}))]),components:[Hc("close",{tag:"span",classes:["tox-icon"]},n.icons)],action:r=>{Qo(r,Pp)}}),zA=(n,r,i,l)=>({dom:{tag:"h1",classes:["tox-dialog__title"],attributes:{...i.map(u=>({id:u})).getOr({})}},components:[],behaviours:xt([dc.config({channel:`${CS}-${r}`,initialData:n,renderComponents:u=>[wr(l.translate(u.title))]})])}),NA=()=>({dom:km('
    ')}),dR=(n,r,i)=>((l,u,f)=>{const p=gr.parts.title(zA(l,u,D.none(),f)),y=gr.parts.draghandle(NA()),v=gr.parts.close(cR(f)),C=[p].concat(l.draggable?[y]:[]).concat([v]);return Mu.sketch({dom:km('
    '),components:C})})({title:i.shared.providers.translate(n),draggable:i.dialog.isDraggableModal()},r,i.shared.providers),uR=(n,r,i,l)=>({dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":i.translate(n)},styles:{left:"0px",right:"0px",bottom:"0px",top:`${l.getOr(0)}px`,position:"absolute"}},behaviours:r,components:[{dom:km('
    ')}]}),fR=(n,r,i)=>({onClose:()=>i.closeWindow(),onBlock:l=>{const u=Ys(n().element,".tox-dialog__header").map(f=>Ds(f));gr.setBusy(n(),(f,p)=>uR(l.message,p,r,u))},onUnblock:()=>{gr.setIdle(n())}}),Yv="tox-dialog--fullscreen",DA="tox-dialog--width-lg",RA="tox-dialog--width-md",Xv=n=>{switch(n){case"large":return D.some(DA);case"medium":return D.some(RA);default:return D.none()}},MA=(n,r)=>{const i=Vt(r.element.dom);_n(i,Yv)||(Qn(i,[DA,RA]),Xv(n).each(l=>At(i,l)))},mR=(n,r)=>{const i=Vt(n.element.dom),l=ea(i),u=j(l,f=>f===DA||f===RA).or(Xv(r));((f,p)=>{$t(p,y=>{((v,C)=>{se(v)?v.dom.classList.toggle(C):((O,A)=>Ge(Ce(O),A)?Et(O,A):et(O,A))(v,C),Bo(v)})(f,y)})})(i,[Yv,...u.toArray()])},pR=(n,r,i)=>La(OA({...n,firstTabstop:1,lazySink:i.shared.getSink,extraBehaviours:[wv({}),...n.extraBehaviours],onEscape:l=>{Qo(l,Pp)},dialogEvents:r,eventOrder:{[Ii()]:[dc.name(),tl.name()],[ka()]:["scroll-lock",dc.name(),"messages","dialog-events","alloy.base.behaviour"],[Nl()]:["alloy.base.behaviour","dialog-events","messages",dc.name(),"scroll-lock"]}})),Jv=(n,r={})=>pt(n,i=>i.type==="menu"?(l=>{const u=pt(l.items,f=>{const p=St(r,f.name).getOr(so(!1));return{...f,storage:p}});return{...l,items:u}})(i):i),gR=n=>zo(n,(r,i)=>i.type==="menu"?zo(i.items,(l,u)=>(l[u.name]=u.storage,l),r):r,{}),LA=(n,r)=>[ef(Wn(),oL),n(Fg,(i,l,u,f)=>{nd(Vs(f.element)).fold(Ke,Eh),r.onClose(),l.onClose()}),n(Pp,(i,l,u,f)=>{l.onCancel(i),Qo(f,Fg)}),Xe(UC,(i,l)=>r.onUnblock()),Xe(jC,(i,l)=>r.onBlock(l.event))],hR=(n,r,i)=>{const l=(f,p)=>Xe(f,(y,v)=>{u(y,(C,O)=>{p(n(),C,v.event,y)})}),u=(f,p)=>{dc.getState(f).get().each(y=>{p(y.internalDialog,f)})};return[...LA(l,r),l(bv,(f,p)=>p.onSubmit(f)),l(Ui,(f,p,y)=>{p.onChange(f,{name:y.name})}),l(Ef,(f,p,y,v)=>{const C=()=>v.getSystem().isConnected()?po.focusIn(v):void 0,O=F=>Wc(F,"disabled")||Fs(F,"aria-disabled").exists($=>$==="true"),A=Vs(v.element),R=nd(A);p.onAction(f,{name:y.name,value:y.value}),nd(A).fold(C,F=>{O(F)||R.exists($=>lr(F,$)&&O($))?C():i().toOptional().filter($=>!lr($.element,F)).each(C)})}),l(bO,(f,p,y)=>{p.onTabChange(f,{newTabName:y.name,oldTabName:y.oldName})}),Tc(f=>{const p=n();Le.setValue(f,p.getData())})]},qP=(n,r)=>{const i=r.map(f=>f.footerButtons).getOr([]),l=ks(i,f=>f.align==="start"),u=(f,p)=>Mu.sketch({dom:{tag:"div",classes:[`tox-dialog__footer-${f}`]},components:pt(p,y=>y.memento.asSpec())});return[u("start",l.pass),u("end",l.fail)]},bR=(n,r,i)=>({dom:km(''),components:[],behaviours:xt([dc.config({channel:`${KO}-${r}`,initialData:n,updateState:(l,u)=>{const f=pt(u.buttons,p=>{const y=ns(((v,C)=>n1(v,v.type,C))(p,i));return{name:p.name,align:p.align,memento:y}});return D.some({lookupByName:p=>((y,v,C)=>j(v,O=>O.name===C).bind(O=>O.memento.getOpt(y)))(l,f,p),footerButtons:f})},renderComponents:qP})])}),BA=(n,r,i)=>gr.parts.footer(bR(n,r,i)),Qv=(n,r)=>{if(n.getRoot().getSystem().isConnected()){const i=In.getCurrent(n.getFormWrapper()).getOr(n.getFormWrapper());return Vg.getField(i,r).orThunk(()=>n.getFooter().bind(u=>dc.getState(u).get()).bind(u=>u.lookupByName(r)))}return D.none()},yR=(n,r,i)=>{const l=f=>{const p=n.getRoot();p.getSystem().isConnected()&&f(p)},u={getData:()=>{const f=n.getRoot(),p=f.getSystem().isConnected()?n.getFormWrapper():f;return{...Le.getValue(p),...Zn(i,y=>y.get())}},setData:f=>{l(p=>{const y=u.getData(),v=ls(y,f),C=((A,R)=>{const F=A.getRoot();return dc.getState(F).get().map($=>Ua(Ms("data",$.dataValidator,R))).getOr(R)})(n,v),O=n.getFormWrapper();Le.setValue(O,C),rs(i,(A,R)=>{Vo(v,R)&&A.set(v[R])})})},setEnabled:(f,p)=>{Qv(n,f).each(p?Fo.enable:Fo.disable)},focus:f=>{Qv(n,f).each(Po.focus)},block:f=>{if(!te(f))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");l(p=>{lo(p,jC,{message:f})})},unblock:()=>{l(f=>{Qo(f,UC)})},showTab:f=>{l(p=>{const y=n.getBody();dc.getState(y).get().exists(v=>v.isTabPanel())&&In.getCurrent(y).each(v=>{p1.showTab(v,f)})})},redial:f=>{l(p=>{const y=n.getId(),v=r(f),C=Jv(v.internalDialog.buttons,i);p.getSystem().broadcastOn([`${jg}-${y}`],v),p.getSystem().broadcastOn([`${CS}-${y}`],v.internalDialog),p.getSystem().broadcastOn([`${qO}-${y}`],v.internalDialog),p.getSystem().broadcastOn([`${KO}-${y}`],{...v.internalDialog,buttons:C}),u.setData(v.initialData)})},close:()=>{l(f=>{Qo(f,Fg)})},toggleFullscreen:n.toggleFullscreen};return u},vR=(n,r,i,l=!1,u)=>{const f=Xt("dialog"),p=Xt("dialog-label"),y=Xt("dialog-content"),v=n.internalDialog,C=so(v.size),O=Xv(C.get()).toArray(),A=ns(((ie,de,we,ze)=>Mu.sketch({dom:km('
    '),components:[zA(ie,de,D.some(we),ze),NA(),cR(ze)],containerBehaviours:xt([Db.config({mode:"mouse",blockerClass:"blocker",getTarget:tt=>Id(tt,'[role="dialog"]').getOrDie(),snaps:{getSnapPoints:()=>[],leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))({title:v.title,draggable:!0},f,p,i.shared.providers)),R=ns(((ie,de,we,ze,tt,Je)=>nk(ie,de,D.some(we),ze,tt,Je))({body:v.body,initialData:v.initialData},f,y,i,l,ie=>Qv(Y,ie))),F=Jv(v.buttons),$=gR(F),G=nn(F.length!==0,ns(((ie,de,we)=>bR(ie,de,we))({buttons:F},f,i))),J=hR(()=>ne,{onBlock:ie=>{Qd.block(X,(de,we)=>{const ze=A.getOpt(X).map(tt=>Ds(tt.element));return uR(ie.message,we,i.shared.providers,ze)})},onUnblock:()=>{Qd.unblock(X)},onClose:()=>r.closeWindow()},i.shared.getSink),ae=Yr().os,X=La({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline",...O],attributes:{role:"dialog",...ae.isMacOS()?{"aria-label":v.title}:{"aria-labelledby":p}}},eventOrder:{[Ii()]:[dc.name(),tl.name()],[di()]:["execute-on-form"],[ka()]:["reflecting","execute-on-form"]},behaviours:xt([po.config({mode:"cyclic",onEscape:ie=>(Qo(ie,Fg),D.some(!0)),useTabstopAt:ie=>!e1(ie)&&(ni(ie)!=="button"||yr(ie,"disabled")!=="disabled"),firstTabstop:1}),dc.config({channel:`${jg}-${f}`,updateState:(ie,de)=>(C.set(de.internalDialog.size),MA(de.internalDialog.size,ie),u(),D.some(de)),initialData:n}),Po.config({}),en("execute-on-form",J.concat([Bd(Wn(),(ie,de)=>{po.focusIn(ie)}),Xe(rg(),(ie,de)=>{ie.getSystem().broadcastOn([hw],{newFocus:de.event.newFocus})})])),Qd.config({getRoot:()=>D.some(X)}),So.config({}),wv({})]),components:[A.asSpec(),R.asSpec(),...G.map(ie=>ie.asSpec()).toArray()]}),Y={getId:ue(f),getRoot:ue(X),getFooter:()=>G.map(ie=>ie.get(X)),getBody:()=>R.get(X),getFormWrapper:()=>{const ie=R.get(X);return In.getCurrent(ie).getOr(ie)},toggleFullscreen:()=>{mR(X,C.get())}},ne=yR(Y,r.redial,$);return{dialog:X,instanceApi:ne}};var PA=tinymce.util.Tools.resolve("tinymce.util.URI");const KP=["insertContent","setContent","execCommand","close","block","unblock"],IA=n=>ce(n)&&KP.indexOf(n.mceAction)!==-1,GP=(n,r,i,l)=>{const u=Xt("dialog"),f=dR(n.title,u,l),p=(ae=>{const X={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[wS(D.none(),{dom:{tag:"iframe",attributes:{src:ae.url}},behaviours:xt([ws.config({}),Po.config({})])})]}],behaviours:xt([po.config({mode:"acyclic",useTabstopAt:bn(e1)})])};return gr.parts.body(X)})(n),y=n.buttons.bind(ae=>ae.length===0?D.none():D.some(BA({buttons:ae},u,l))),v=((ae,X)=>{const Y=(ie,de)=>Xe(ie,(we,ze)=>{ne(we,(tt,Je)=>{de(J,tt,ze.event,we)})}),ne=(ie,de)=>{dc.getState(ie).get().each(we=>{de(we,ie)})};return[...LA(Y,X),Y(Ef,(ie,de,we)=>{de.onAction(ie,{name:we.name})})]})(0,fR(()=>G,l.shared.providers,r)),C={...n.height.fold(()=>({}),ae=>({height:ae+"px","max-height":ae+"px"})),...n.width.fold(()=>({}),ae=>({width:ae+"px","max-width":ae+"px"}))},O=n.width.isNone()&&n.height.isNone()?["tox-dialog--width-lg"]:[],A=new PA(n.url,{base_uri:new PA(window.location.href)}),R=`${A.protocol}://${A.host}${A.port?":"+A.port:""}`,F=Cl(),$=[dc.config({channel:`${jg}-${u}`,updateState:(ae,X)=>D.some(X),initialData:n}),en("messages",[Ss(()=>{const ae=Ai(Vt(window),"message",X=>{if(A.isSameOrigin(new PA(X.raw.origin))){const Y=X.raw.data;IA(Y)?((ne,ie,de)=>{switch(de.mceAction){case"insertContent":ne.insertContent(de.content);break;case"setContent":ne.setContent(de.content);break;case"execCommand":const we=!!Me(de.ui)&&de.ui;ne.execCommand(de.cmd,we,de.value);break;case"close":ie.close();break;case"block":ie.block(de.message);break;case"unblock":ie.unblock()}})(i,J,Y):(ne=>!IA(ne)&&ce(ne)&&Vo(ne,"mceAction"))(Y)&&n.onMessage(J,Y)}});F.set(ae)}),Tc(F.clear)]),tl.config({channels:{[SS]:{onReceive:(ae,X)=>{Ys(ae.element,"iframe").each(Y=>{const ne=Y.dom.contentWindow;st(ne)&&ne.postMessage(X,R)})}}}})],G=pR({id:u,header:f,body:p,footer:y,extraClasses:O,extraBehaviours:$,extraStyles:C},v,l),J=(ae=>{const X=Y=>{ae.getSystem().isConnected()&&Y(ae)};return{block:Y=>{if(!te(Y))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");X(ne=>{lo(ne,jC,{message:Y})})},unblock:()=>{X(Y=>{Qo(Y,UC)})},close:()=>{X(Y=>{Qo(Y,Fg)})},sendMessage:Y=>{X(ne=>{ne.getSystem().broadcastOn([SS],Y)})}}})(G);return{dialog:G,instanceApi:J}},FA=(n,r)=>Ua(Ms("data",r,n)),_R=n=>Xy(n,".tox-alert-dialog")||Xy(n,".tox-confirm-dialog"),YP=(n,r,i)=>r&&i?[]:[Gs.config({contextual:{lazyContext:()=>D.some(vr(Vt(n.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"],lazyViewport:l=>Tg(n,l.element).map(u=>({bounds:Og(u),optScrollEnv:D.some({currentScrollTop:u.element.dom.scrollTop,scrollElmTop:Ye(u.element).top})})).getOrThunk(()=>({bounds:jr(),optScrollEnv:D.none()}))})],XP=n=>{const r=n.editor,i=Np(r),l=(v=>{const C=v.shared;return{open:(O,A)=>{const R=()=>{gr.hide(J),A()},F=ns(n1({name:"close-alert",text:"OK",primary:!0,buttonType:D.some("primary"),align:"end",enabled:!0,icon:D.none()},"cancel",v)),$=TA(),G=AA(R,C.providers),J=La(OA({lazySink:()=>C.getSink(),header:Gv($,G),body:aR(O,C.providers),footer:D.some(iR(lR([],[F.asSpec()]))),onEscape:R,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Xe(Pp,R)],eventOrder:{}}));gr.show(J);const ae=F.get(J);Po.focus(ae)}}})(n.backstages.dialog),u=(v=>{const C=v.shared;return{open:(O,A)=>{const R=Y=>{gr.hide(ae),A(Y)},F=ns(n1({name:"yes",text:"Yes",primary:!0,buttonType:D.some("primary"),align:"end",enabled:!0,icon:D.none()},"submit",v)),$=n1({name:"no",text:"No",primary:!1,buttonType:D.some("secondary"),align:"end",enabled:!0,icon:D.none()},"cancel",v),G=TA(),J=AA(()=>R(!1),C.providers),ae=La(OA({lazySink:()=>C.getSink(),header:Gv(G,J),body:aR(O,C.providers),footer:D.some(iR(lR([],[$,F.asSpec()]))),onEscape:()=>R(!1),extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Xe(Pp,()=>R(!1)),Xe(bv,()=>R(!0))],eventOrder:{}}));gr.show(ae);const X=F.get(ae);Po.focus(X)}}})(n.backstages.dialog),f=(v,C)=>Rb.open((O,A,R)=>{const F=A,$=((G,J,ae)=>{const X=Xt("dialog"),Y=G.internalDialog,ne=dR(Y.title,X,ae),ie=so(Y.size),de=Xv(ie.get()).toArray(),we=((Ho,xn,Bs,Xs)=>{const on=nk(Ho,xn,D.none(),Bs,!1,Xs);return gr.parts.body(on)})({body:Y.body,initialData:Y.initialData},X,ae,Ho=>Qv(ro,Ho)),ze=Jv(Y.buttons),tt=gR(ze),Je=nn(ze.length!==0,BA({buttons:ze},X,ae)),Ze=hR(()=>yo,fR(()=>Wt,ae.shared.providers,J),ae.shared.getSink),kt={id:X,header:ne,body:we,footer:Je,extraClasses:de,extraBehaviours:[dc.config({channel:`${jg}-${X}`,updateState:(Ho,xn)=>(ie.set(xn.internalDialog.size),MA(xn.internalDialog.size,Ho),D.some(xn)),initialData:G})],extraStyles:{}},Wt=pR(kt,Ze,ae),ro={getId:ue(X),getRoot:ue(Wt),getBody:()=>gr.getBody(Wt),getFooter:()=>gr.getFooter(Wt),getFormWrapper:()=>{const Ho=gr.getBody(Wt);return In.getCurrent(Ho).getOr(Ho)},toggleFullscreen:()=>{mR(Wt,ie.get())}},yo=yR(ro,J.redial,tt);return{dialog:Wt,instanceApi:yo}})({dataValidator:R,initialData:F,internalDialog:O},{redial:Rb.redial,closeWindow:()=>{gr.hide($.dialog),C($.instanceApi)}},n.backstages.dialog);return gr.show($.dialog),$.instanceApi.setData(F),$.instanceApi},v),p=(v,C,O,A)=>Rb.open((R,F,$)=>{const G=FA(F,$),J=Nn(),ae=n.backstages.popup.shared.header.isPositionedAtTop(),X=()=>J.on(ie=>{or.reposition(ie),i&&ae||Gs.refresh(ie)}),Y=vR({dataValidator:$,initialData:G,internalDialog:R},{redial:Rb.redial,closeWindow:()=>{J.on(or.hide),r.off("ResizeEditor",X),J.clear(),O(Y.instanceApi)}},n.backstages.popup,A.ariaAttrs,X),ne=La(or.sketch({lazySink:n.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:A.persistent?{event:"doNotDismissYet"}:{},...ae?{}:{fireRepositionEventInstead:{}},inlineBehaviours:xt([en("window-manager-inline-events",[Xe(Ju(),(ie,de)=>{Qo(Y.dialog,Pp)})]),...YP(r,i,ae)]),isExtraPart:(ie,de)=>_R(de)}));return J.set(ne),or.showWithinBounds(ne,Fi(Y.dialog),{anchor:C},()=>{const ie=r.inline?za():Vt(r.getContainer()),de=vr(ie);return D.some(de)}),i&&ae||(Gs.refresh(ne),r.on("ResizeEditor",X)),Y.instanceApi.setData(G),po.focusIn(Y.dialog),Y.instanceApi},v),y=(v,C,O,A)=>Rb.open((R,F,$)=>{const G=FA(F,$),J=Nn(),ae=n.backstages.popup.shared.header.isPositionedAtTop(),X=()=>J.on(ie=>{or.reposition(ie),Gs.refresh(ie)}),Y=vR({dataValidator:$,initialData:G,internalDialog:R},{redial:Rb.redial,closeWindow:()=>{J.on(or.hide),r.off("ResizeEditor ScrollWindow ElementScroll",X),J.clear(),O(Y.instanceApi)}},n.backstages.popup,A.ariaAttrs,X),ne=La(or.sketch({lazySink:n.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:A.persistent?{event:"doNotDismissYet"}:{},...ae?{}:{fireRepositionEventInstead:{}},inlineBehaviours:xt([en("window-manager-inline-events",[Xe(Ju(),(ie,de)=>{Qo(Y.dialog,Pp)})]),Gs.config({contextual:{lazyContext:()=>D.some(vr(Vt(r.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top","bottom"],lazyViewport:ie=>Tg(r,ie.element).map(de=>({bounds:Og(de),optScrollEnv:D.some({currentScrollTop:de.element.dom.scrollTop,scrollElmTop:Ye(de.element).top})})).getOrThunk(()=>({bounds:jr(),optScrollEnv:D.none()}))})]),isExtraPart:(ie,de)=>_R(de)}));return J.set(ne),or.showWithinBounds(ne,Fi(Y.dialog),{anchor:C},()=>n.backstages.popup.shared.getSink().toOptional().bind(ie=>{const de=Tg(r,ie.element).map(tt=>Og(tt)).getOr(jr()),we=vr(Vt(r.getContentAreaContainer())),ze=Wl(we,de);return D.some(rn(ze.x,ze.y,ze.width,ze.height-15))})),Gs.refresh(ne),r.on("ResizeEditor ScrollWindow ElementScroll ResizeWindow",X),Y.instanceApi.setData(G),po.focusIn(Y.dialog),Y.instanceApi},v);return{open:(v,C,O)=>{if(!Ot(C)){if(C.inline==="toolbar")return p(v,n.backstages.popup.shared.anchors.inlineDialog(),O,C);if(C.inline==="bottom")return y(v,n.backstages.popup.shared.anchors.inlineBottomDialog(),O,C);if(C.inline==="cursor")return p(v,n.backstages.popup.shared.anchors.cursor(),O,C)}return f(v,O)},openUrl:(v,C)=>((O,A)=>Rb.openUrl(R=>{const F=GP(R,{closeWindow:()=>{gr.hide(F.dialog),A(F.instanceApi)}},r,n.backstages.dialog);return gr.show(F.dialog),F.instanceApi},O))(v,C),alert:(v,C)=>{l.open(v,C)},close:v=>{v.close()},confirm:(v,C)=>{u.open(v,C)}}};cu.add("silver",n=>{(y=>{E4(y),(v=>{const C=v.options.register,O=R=>Rt(R,te)?{value:b6(R),valid:!0}:{valid:!1,message:"Must be an array of strings."},A=R=>Lt(R)&&R>0?{value:R,valid:!0}:{valid:!1,message:"Must be a positive number."};C("color_map",{processor:O,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"]}),C("color_map_background",{processor:O}),C("color_map_foreground",{processor:O}),C("color_cols",{processor:A,default:Ix(v)}),C("color_cols_foreground",{processor:A,default:K3(v,wC)}),C("color_cols_background",{processor:A,default:K3(v,kC)}),C("custom_colors",{processor:"boolean",default:!0}),C("color_default_foreground",{processor:"string",default:dv}),C("color_default_background",{processor:"string",default:dv})})(y),(v=>{const C=v.options.register;C("contextmenu_avoid_overlap",{processor:"string",default:""}),C("contextmenu_never_use_native",{processor:"boolean",default:!1}),C("contextmenu",{processor:O=>O===!1?{value:[],valid:!0}:te(O)||Rt(O,te)?{value:jN(O),valid:!0}:{valid:!1,message:"Must be false or a string."},default:"link linkchecker image editimage table spellchecker configurepermanentpen"})})(y)})(n);let r=()=>jr();const{dialogs:i,popups:l,renderUI:u}=rP(n,{getPopupSinkBounds:()=>r()});mO(n,l.backstage.shared);const f=XP({editor:n,backstages:{popup:l.backstage,dialog:i.backstage}}),p=Nn();return{renderUI:()=>{const y=u();return Tg(n,l.getMothership().element).each(v=>{r=()=>Og(v)}),y},getWindowManagerImpl:ue(f),getNotificationManagerImpl:()=>Q4(n,{backstage:l.backstage},l.getMothership(),p)}})})();(function(){var w=tinymce.util.Tools.resolve("tinymce.ModelManager");const g=m=>b=>(x=>{const T=typeof x;return x===null?"null":T==="object"&&Array.isArray(x)?"array":T==="object"&&(M=B=x,(U=String).prototype.isPrototypeOf(M)||((K=B.constructor)===null||K===void 0?void 0:K.name)===U.name)?"string":T;var M,B,U,K})(b)===m,S=m=>b=>typeof b===m,L=m=>b=>m===b,W=g("string"),te=g("object"),ce=g("array"),Ee=L(null),He=S("boolean"),We=L(void 0),Me=m=>!(b=>b==null)(m),Ot=S("function"),mo=S("number"),st=()=>{},ut=m=>()=>m,Lt=m=>m,Rt=(m,b)=>m===b;function Ke(m,...b){return(...x)=>{const T=b.concat(x);return m.apply(null,T)}}const Ut=m=>b=>!m(b),ft=m=>m(),ue=ut(!1),Ct=ut(!0);class ve{constructor(b,x){this.tag=b,this.value=x}static some(b){return new ve(!0,b)}static none(){return ve.singletonNone}fold(b,x){return this.tag?x(this.value):b()}isSome(){return this.tag}isNone(){return!this.tag}map(b){return this.tag?ve.some(b(this.value)):ve.none()}bind(b){return this.tag?b(this.value):ve.none()}exists(b){return this.tag&&b(this.value)}forall(b){return!this.tag||b(this.value)}filter(b){return!this.tag||b(this.value)?this:ve.none()}getOr(b){return this.tag?this.value:b}or(b){return this.tag?this:b}getOrThunk(b){return this.tag?this.value:b()}orThunk(b){return this.tag?this:b()}getOrDie(b){if(this.tag)return this.value;throw new Error(b??"Called getOrDie on None")}static from(b){return Me(b)?ve.some(b):ve.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(b){this.tag&&b(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}ve.singletonNone=new ve(!1);const ot=Array.prototype.slice,bn=Array.prototype.indexOf,ln=Array.prototype.push,uo=(m,b)=>{return x=m,T=b,bn.call(x,T)>-1;var x,T},Fe=(m,b)=>{for(let x=0,T=m.length;x{const x=[];for(let T=0;T{const x=m.length,T=new Array(x);for(let M=0;M{for(let x=0,T=m.length;x{const x=[],T=[];for(let M=0,B=m.length;M{const x=[];for(let T=0,M=m.length;T(((T,M)=>{for(let B=T.length-1;B>=0;B--)M(T[B],B)})(m,(T,M)=>{x=b(x,T,M)}),x),Ge=(m,b,x)=>(bt(m,(T,M)=>{x=b(x,T,M)}),x),Ao=(m,b)=>((x,T,M)=>{for(let B=0,U=x.length;B{for(let x=0,T=m.length;x{const b=[];for(let x=0,T=m.length;xHt(D(m,b)),$t=(m,b)=>{for(let x=0,T=m.length;x{const x={};for(let T=0,M=m.length;Tb>=0&&bcn(m,0),zo=m=>cn(m,m.length-1),j=(m,b)=>{for(let x=0;x{const x=Fr(m);for(let T=0,M=x.length;TWi(m,(x,T)=>({k:T,v:b(x,T)})),Wi=(m,b)=>{const x={};return Sn(m,(T,M)=>{const B=b(T,M);x[B.k]=B.v}),x},mn=(m,b)=>{const x=[];return Sn(m,(T,M)=>{x.push(b(T,M))}),x},Ln=m=>mn(m,Lt),dn=(m,b)=>Cs.call(m,b),Be=typeof window<"u"?window:Function("return this;")(),Bt=(m,b)=>((x,T)=>{let M=T??Be;for(let B=0;B{const b=Bt("ownerDocument.defaultView",m);return te(m)&&((x=>((T,M)=>{const B=((U,K)=>Bt(U,K))(T,M);if(B==null)throw new Error(T+" not available on this browser");return B})("HTMLElement",x))(b).prototype.isPrototypeOf(m)||/^HTML\w*Element$/.test(yt(m).constructor.name))},ao=m=>m.dom.nodeName.toLowerCase(),ko=m=>m.dom.nodeType,tn=m=>b=>ko(b)===m,On=m=>ko(m)===8||ao(m)==="#comment",rs=m=>Zn(m)&&rt(m.dom),Zn=tn(1),Bn=tn(3),$s=tn(9),sa=tn(11),os=m=>b=>Zn(b)&&ao(b)===m,Is=(m,b,x)=>{if(!(W(x)||He(x)||mo(x)))throw console.error("Invalid call to Attribute.set. Key ",b,":: Value ",x,":: Element ",m),new Error("Attribute value was not simple");m.setAttribute(b,x+"")},yn=(m,b,x)=>{Is(m.dom,b,x)},ra=(m,b)=>{const x=m.dom;Sn(b,(T,M)=>{Is(x,M,T)})},St=(m,b)=>{const x=m.dom.getAttribute(b);return x===null?void 0:x},Vo=(m,b)=>ve.from(St(m,b)),an=(m,b)=>{m.dom.removeAttribute(b)},Kr=m=>Ge(m.dom.attributes,(b,x)=>(b[x.name]=x.value,b),{}),bi=m=>{if(m==null)throw new Error("Node cannot be null or undefined");return{dom:m}},vt={fromHtml:(m,b)=>{const x=(b||document).createElement("div");if(x.innerHTML=m,!x.hasChildNodes()||x.childNodes.length>1){const T="HTML does not have a single root node";throw console.error(T,m),new Error(T)}return bi(x.childNodes[0])},fromTag:(m,b)=>{const x=(b||document).createElement(m);return bi(x)},fromText:(m,b)=>{const x=(b||document).createTextNode(m);return bi(x)},fromDom:bi,fromPoint:(m,b,x)=>ve.from(m.dom.elementFromPoint(b,x)).map(bi)},oi=(m,b)=>{const x=m.dom;if(x.nodeType!==1)return!1;{const T=x;if(T.matches!==void 0)return T.matches(b);if(T.msMatchesSelector!==void 0)return T.msMatchesSelector(b);if(T.webkitMatchesSelector!==void 0)return T.webkitMatchesSelector(b);if(T.mozMatchesSelector!==void 0)return T.mozMatchesSelector(b);throw new Error("Browser lacks native selectors")}},nn=m=>m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11||m.childElementCount===0,Ri=(m,b)=>{const x=b===void 0?document:b.dom;return nn(x)?ve.none():ve.from(x.querySelector(m)).map(vt.fromDom)},as=(m,b)=>m.dom===b.dom,hr=(m,b)=>{const x=m.dom,T=b.dom;return x!==T&&x.contains(T)},bl=oi,ll=m=>vt.fromDom(m.dom.ownerDocument),Mi=m=>$s(m)?m:ll(m),yi=m=>ve.from(m.dom.parentNode).map(vt.fromDom),yl=m=>ve.from(m.dom.parentElement).map(vt.fromDom),Gn=(m,b)=>{const x=Ot(b)?b:ue;let T=m.dom;const M=[];for(;T.parentNode!==null&&T.parentNode!==void 0;){const B=T.parentNode,U=vt.fromDom(B);if(M.push(U),x(U)===!0)break;T=B}return M},Ro=m=>ve.from(m.dom.previousSibling).map(vt.fromDom),Ha=m=>ve.from(m.dom.nextSibling).map(vt.fromDom),Hr=m=>D(m.dom.childNodes,vt.fromDom),hd=(m,b)=>{const x=m.dom.childNodes;return ve.from(x[b]).map(vt.fromDom)},Vt=(m,b)=>{yi(m).each(x=>{x.dom.insertBefore(b.dom,m.dom)})},Dr=(m,b)=>{Ha(m).fold(()=>{yi(m).each(x=>{zs(x,b)})},x=>{Vt(x,b)})},ru=(m,b)=>{(T=>hd(T,0))(m).fold(()=>{zs(m,b)},T=>{m.dom.insertBefore(b.dom,T.dom)})},zs=(m,b)=>{m.dom.appendChild(b.dom)},bd=(m,b)=>{Vt(m,b),zs(b,m)},ni=(m,b)=>{bt(b,(x,T)=>{const M=T===0?m:b[T-1];Dr(M,x)})},qi=(m,b)=>{bt(b,x=>{zs(m,x)})},vi=m=>{m.dom.textContent="",bt(Hr(m),b=>{ys(b)})},ys=m=>{const b=m.dom;b.parentNode!==null&&b.parentNode.removeChild(b)},ga=m=>{const b=Hr(m);b.length>0&&ni(m,b),ys(m)},si=(m,b)=>vt.fromDom(m.dom.cloneNode(b)),au=m=>si(m,!1),pc=m=>si(m,!0),_i=(m,b)=>{const x=vt.fromTag(b),T=Kr(m);return ra(x,T),x},iu=["tfoot","thead","tbody","colgroup"],Zc=(m,b,x)=>({element:m,rowspan:b,colspan:x}),$n=(m,b,x)=>({element:m,cells:b,section:x}),lr=(m,b,x)=>({element:m,isNew:b,isLocked:x}),ha=(m,b,x,T)=>({element:m,cells:b,section:x,isNew:T}),Uu=m=>vt.fromDom(m.dom.host),Ki=m=>{const b=Bn(m)?m.dom.parentNode:m.dom;if(b==null||b.ownerDocument===null)return!1;const x=b.ownerDocument;return(B=>{const U=(re=>vt.fromDom(re.dom.getRootNode()))(B);return sa(K=U)&&Me(K.dom.host)?ve.some(U):ve.none();var K})(vt.fromDom(b)).fold(()=>x.body.contains(b),(T=Ki,M=Uu,B=>T(M(B))));var T,M},yd=m=>{const b=m.dom.body;if(b==null)throw new Error("Body is not available yet");return vt.fromDom(b)},$r=(m,b)=>{let x=[];return bt(Hr(m),T=>{b(T)&&(x=x.concat([T])),x=x.concat($r(T,b))}),x},ba=(m,b,x)=>((T,M,B)=>Kt(Gn(T,B),U=>oi(U,b)))(m,0,x),xi=(m,b)=>((x,T)=>Kt(Hr(x),M=>oi(M,b)))(m),Yn=(m,b)=>((x,T)=>{const M=T===void 0?document:T.dom;return nn(M)?[]:D(M.querySelectorAll(x),vt.fromDom)})(b,m);var vs=(m,b,x,T,M)=>m(x,T)?ve.some(x):Ot(M)&&M(x)?ve.none():b(x,T,M);const Gi=(m,b,x)=>{let T=m.dom;const M=Ot(x)?x:ue;for(;T.parentNode;){T=T.parentNode;const B=vt.fromDom(T);if(b(B))return ve.some(B);if(M(B))break}return ve.none()},gc=(m,b,x)=>vs((T,M)=>M(T),Gi,m,b,x),br=(m,b,x)=>Gi(m,T=>oi(T,b),x),vl=(m,b)=>((x,T)=>Ao(x.dom.childNodes,M=>{return B=vt.fromDom(M),oi(B,b);var B}).map(vt.fromDom))(m),Vs=(m,b)=>Ri(b,m),Pn=(m,b,x)=>vs((T,M)=>oi(T,M),br,m,b,x),wi=(m,b,x=Rt)=>m.exists(T=>x(T,b)),Oa=m=>{const b=[],x=T=>{b.push(T)};for(let T=0;Tm?ve.some(b):ve.none(),za=(m,b,x)=>b===""||m.length>=b.length&&m.substr(x,x+b.length)===b,Qs=(m,b,x=0,T)=>{const M=m.indexOf(b,x);return M!==-1&&(!!We(T)||M+b.length<=T)},vd=(m,b)=>za(m,b,0),wo=(m,b)=>za(m,b,m.length-b.length),_l=(m=>b=>b.replace(m,""))(/^\s+|\s+$/g),yr=m=>m.length>0,Fs=m=>m.style!==void 0&&Ot(m.style.getPropertyValue),Wc=(m,b,x)=>{if(!W(x))throw console.error("Invalid call to CSS.set. Property ",b,":: Value ",x,":: Element ",m),new Error("CSS value must be a string: "+x);Fs(m)&&m.style.setProperty(b,x)},pn=(m,b,x)=>{const T=m.dom;Wc(T,b,x)},$l=(m,b)=>{const x=m.dom;Sn(b,(T,M)=>{Wc(x,M,T)})},ya=(m,b)=>{const x=m.dom,T=window.getComputedStyle(x).getPropertyValue(b);return T!==""||Ki(m)?T:Mo(x,b)},Mo=(m,b)=>Fs(m)?m.style.getPropertyValue(b):"",Li=(m,b)=>{const x=m.dom,T=Mo(x,b);return ve.from(T).filter(M=>M.length>0)},ri=(m,b)=>{((x,T)=>{Fs(x)&&x.style.removeProperty(T)})(m.dom,b),wi(Vo(m,"style").map(_l),"")&&an(m,"style")},Ns=(m,b,x=0)=>Vo(m,b).map(T=>parseInt(T,10)).getOr(x),Vl=(m,b)=>Ns(m,b,1),er=m=>os("col")(m)?Ns(m,"span",1)>1:Vl(m,"colspan")>1,hc=(m,b)=>parseInt(ya(m,b),10),Gr=ut(10),Vn=ut(10),xl=(m,b)=>qc(m,b,Ct),qc=(m,b,x)=>pt(Hr(m),T=>oi(T,b)?x(T)?[T]:[]:qc(T,b,x)),_d=(m,b)=>((x,T,M=ue)=>M(T)?ve.none():uo(x,ao(T))?ve.some(T):br(T,x.join(","),B=>oi(B,"table")||M(B)))(["td","th"],m,b),Ds=m=>xl(m,"th,td"),Na=m=>oi(m,"colgroup")?xi(m,"col"):pt(Te(m),b=>xi(b,"col")),Q=(m,b)=>Pn(m,"table",b),pe=m=>xl(m,"tr"),Te=m=>Q(m).fold(ut([]),b=>xi(b,"colgroup")),Ye=(m,b)=>D(m,x=>{if(ao(x)==="colgroup"){const T=D(Na(x),M=>{const B=Ns(M,"span",1);return Zc(M,1,B)});return $n(x,T,"colgroup")}{const T=D(Ds(x),M=>{const B=Ns(M,"rowspan",1),U=Ns(M,"colspan",1);return Zc(M,B,U)});return $n(x,T,b(x))}}),_t=m=>yi(m).map(b=>{const x=ao(b);return(T=>uo(iu,T))(x)?x:"tbody"}).getOr("tbody"),oo=m=>{const b=pe(m),x=[...Te(m),...b];return Ye(x,_t)},Go=m=>{let b,x=!1;return(...T)=>(x||(x=!0,b=m.apply(null,T)),b)},Xn=()=>sn(0,0),sn=(m,b)=>({major:m,minor:b}),is={nu:sn,detect:(m,b)=>{const x=String(b).toLowerCase();return m.length===0?Xn():((T,M)=>{const B=((K,re)=>{for(let he=0;heNumber(M.replace(B,"$"+K));return sn(U(1),U(2))})(m,x)},unknown:Xn},tr=(m,b)=>{const x=String(b).toLowerCase();return Ao(m,T=>T.search(x))},Jo=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,cl=m=>b=>Qs(b,m),jl=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:m=>Qs(m,"edge/")&&Qs(m,"chrome")&&Qs(m,"safari")&&Qs(m,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Jo],search:m=>Qs(m,"chrome")&&!Qs(m,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:m=>Qs(m,"msie")||Qs(m,"trident")},{name:"Opera",versionRegexes:[Jo,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:cl("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:cl("firefox")},{name:"Safari",versionRegexes:[Jo,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:m=>(Qs(m,"safari")||Qs(m,"mobile/"))&&Qs(m,"applewebkit")}],bc=[{name:"Windows",search:cl("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:m=>Qs(m,"iphone")||Qs(m,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:cl("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:cl("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:cl("linux"),versionRegexes:[]},{name:"Solaris",search:cl("sunos"),versionRegexes:[]},{name:"FreeBSD",search:cl("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:cl("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Jm={browsers:ut(jl),oses:ut(bc)},ih="Edge",Bi="Chromium",Qm="Opera",lh="Firefox",Ff="Safari",eg=m=>{const b=m.current,x=m.version,T=M=>()=>b===M;return{current:b,version:x,isEdge:T(ih),isChromium:T(Bi),isIE:T("IE"),isOpera:T(Qm),isFirefox:T(lh),isSafari:T(Ff)}},zt=()=>eg({current:void 0,version:is.unknown()}),xd=eg,wd="Windows",Hf="Android",va="Linux",kd="macOS",lu="Solaris",ch="FreeBSD",tg="ChromeOS",og=m=>{const b=m.current,x=m.version,T=M=>()=>b===M;return{current:b,version:x,isWindows:T(wd),isiOS:T("iOS"),isAndroid:T(Hf),isMacOS:T(kd),isLinux:T(va),isSolaris:T(lu),isFreeBSD:T(ch),isChromeOS:T(tg)}},Ub=()=>og({current:void 0,version:is.unknown()}),dh=og,Zb=m=>window.matchMedia(m).matches;let $f=Go(()=>((m,b,x)=>{const T=Jm.browsers(),M=Jm.oses(),B=b.bind(re=>((he,Se)=>j(Se.brands,me=>{const be=me.brand.toLowerCase();return Ao(he,_e=>{var De;return be===((De=_e.brand)===null||De===void 0?void 0:De.toLowerCase())}).map(_e=>({current:_e.name,version:is.nu(parseInt(me.version,10),0)}))}))(T,re)).orThunk(()=>((re,he)=>tr(re,he).map(Se=>{const me=is.detect(Se.versionRegexes,he);return{current:Se.name,version:me}}))(T,m)).fold(zt,xd),U=((re,he)=>tr(re,he).map(Se=>{const me=is.detect(Se.versionRegexes,he);return{current:Se.name,version:me}}))(M,m).fold(Ub,dh),K=((re,he,Se,me)=>{const be=re.isiOS()&&/ipad/i.test(Se)===!0,_e=re.isiOS()&&!be,De=re.isiOS()||re.isAndroid(),Re=De||me("(pointer:coarse)"),lt=be||!_e&&De&&me("(min-device-width:768px)"),ct=_e||De&&!lt,it=he.isSafari()&&re.isiOS()&&/safari/i.test(Se)===!1,gt=!ct&&!lt&&!it;return{isiPad:ut(be),isiPhone:ut(_e),isTablet:ut(lt),isPhone:ut(ct),isTouch:ut(Re),isAndroid:re.isAndroid,isiOS:re.isiOS,isWebView:ut(it),isDesktop:ut(gt)}})(U,B,m,x);return{browser:B,os:U,deviceType:K}})(window.navigator.userAgent,ve.from(window.navigator.userAgentData),Zb));const Ul=()=>$f(),Kc=(m,b)=>{const x=M=>{const B=b(M);if(B<=0||B===null){const U=ya(M,m);return parseFloat(U)||0}return B},T=(M,B)=>Ge(B,(U,K)=>{const re=ya(M,K),he=re===void 0?0:parseInt(re,10);return isNaN(he)?U:U+he},0);return{set:(M,B)=>{if(!mo(B)&&!B.match(/^[0-9]+$/))throw new Error(m+".set accepts only positive integer values. Value was "+B);const U=M.dom;Fs(U)&&(U.style[m]=B+"px")},get:x,getOuter:x,aggregate:T,max:(M,B,U)=>{const K=T(M,U);return B>K?B-K:0}}},Zl=(m,b,x)=>((T,M)=>(B=>{const U=parseFloat(B);return isNaN(U)?ve.none():ve.some(U)})(T).getOr(M))(ya(m,b),x),Yr=Kc("width",m=>m.dom.offsetWidth),ki=m=>Yr.get(m),Cd=m=>Yr.getOuter(m),En=m=>((b,x)=>{const T=b.dom,M=T.getBoundingClientRect().width||T.offsetWidth;return x==="border-box"?M:((B,U,K,re)=>U-Zl(B,`padding-${K}`,0)-Zl(B,`padding-${re}`,0)-Zl(B,`border-${K}-width`,0)-Zl(B,`border-${re}-width`,0))(b,M,"left","right")})(m,"content-box"),wl=(m,b,x)=>{const T=m.cells,M=T.slice(0,b),B=T.slice(b),U=M.concat(x).concat(B);return ai(m,U)},Zu=(m,b,x)=>wl(m,b,[x]),Wu=(m,b,x)=>{m.cells[b]=x},ai=(m,b)=>ha(m.element,b,m.section,m.isNew),cr=(m,b)=>m.cells[b],Rs=(m,b)=>cr(m,b).element,aa=m=>m.cells.length,_s=m=>{const b=dt(m,x=>x.section==="colgroup");return{rows:b.fail,cols:b.pass}},Sd=(m,b,x)=>{const T=D(m.cells,x);return ha(b(m.element),T,m.section,!0)},Ed="data-snooker-locked-cols",Rr=m=>Vo(m,Ed).bind(b=>ve.from(b.match(/\d+/g))).map(b=>ks(b,Ct)),$a=m=>{const b=Ge(_s(m).rows,(T,M)=>(bt(M.cells,(B,U)=>{B.isLocked&&(T[U]=!0)}),T),{}),x=mn(b,(T,M)=>parseInt(M,10));return((T,M)=>{const B=ot.call(T,0);return B.sort(void 0),B})(x)},Da=(m,b)=>m+","+b,Sr=(m,b)=>{const x=pt(m.all,T=>T.cells);return Kt(x,b)},Gc=m=>{const b={},x=[],T=fn(m).map(be=>be.element).bind(Q).bind(Rr).getOr({});let M=0,B=0,U=0;const{pass:K,fail:re}=dt(m,be=>be.section==="colgroup");bt(re,be=>{const _e=[];bt(be.cells,De=>{let Re=0;for(;b[Da(U,Re)]!==void 0;)Re++;const lt=((it,gt)=>dn(it,gt)&&it[gt]!==void 0&&it[gt]!==null)(T,Re.toString()),ct=((it,gt,Nt,Pt,Le,Jt)=>({element:it,rowspan:gt,colspan:Nt,row:Pt,column:Le,isLocked:Jt}))(De.element,De.rowspan,De.colspan,U,Re,lt);for(let it=0;it{const _e=(Re=>{const lt={};let ct=0;return bt(Re.cells,it=>{const gt=it.colspan;Gt(gt,Nt=>{const Pt=ct+Nt;lt[Pt]=((Le,Jt,To)=>({element:Le,colspan:Jt,column:To}))(it.element,gt,Pt)}),ct+=gt}),lt})(be);return{colgroups:[((Re,lt)=>({element:Re,columns:lt}))(be.element,Ln(_e))],columns:_e}}).getOrThunk(()=>({colgroups:[],columns:{}}));return{grid:((be,_e)=>({rows:be,columns:_e}))(M,B),access:b,all:x,columns:he,colgroups:Se}},rn=m=>{const b=oo(m);return Gc(b)},vr=Gc,Va=(m,b,x)=>ve.from(m.access[Da(b,x)]),Wl=(m,b,x)=>{const T=Sr(m,M=>x(b,M.element));return T.length>0?ve.some(T[0]):ve.none()},jr=Sr,so=m=>pt(m.all,b=>b.cells),kl=m=>Ln(m.columns),Cl=m=>Fr(m.columns).length>0,Nn=(m,b)=>ve.from(m.columns[b]),cu=(m,b=Ct)=>{const x=m.grid,T=Gt(x.columns,Lt),M=Gt(x.rows,Lt);return D(T,B=>ep(()=>pt(M,U=>Va(m,U,B).filter(K=>K.column===B).toArray()),U=>U.colspan===1&&b(U.element),()=>Va(m,0,B)))},ep=(m,b,x)=>{const T=m();return Ao(T,b).orThunk(()=>ve.from(T[0]).orThunk(x)).map(M=>M.element)},ql=m=>{const b=m.grid,x=Gt(b.rows,Lt),T=Gt(b.columns,Lt);return D(x,M=>ep(()=>pt(T,B=>Va(m,M,B).filter(U=>U.row===M).fold(ut([]),U=>[U])),B=>B.rowspan===1,()=>Va(m,M,0)))},un=(m,b)=>x=>Ra(x)==="rtl"?b:m,Ra=m=>ya(m,"direction")==="rtl"?"rtl":"ltr",qu=Kc("height",m=>{const b=m.dom;return Ki(m)?b.getBoundingClientRect().height:b.offsetHeight}),yc=m=>qu.get(m),Vf=m=>qu.getOuter(m),Sl=(m,b)=>({left:m,top:b,translate:(x,T)=>Sl(m+x,b+T)}),ja=Sl,Kl=(m,b)=>m!==void 0?m:b!==void 0?b:0,Ad=m=>{const b=m.dom.ownerDocument,x=b.body,T=b.defaultView,M=b.documentElement;if(x===m.dom)return ja(x.offsetLeft,x.offsetTop);const B=Kl(T==null?void 0:T.pageYOffset,M.scrollTop),U=Kl(T==null?void 0:T.pageXOffset,M.scrollLeft),K=Kl(M.clientTop,x.clientTop),re=Kl(M.clientLeft,x.clientLeft);return ye(m).translate(U-re,B-K)},ye=m=>{const b=m.dom,x=b.ownerDocument.body;return x===b?ja(x.offsetLeft,x.offsetTop):Ki(m)?(T=>{const M=T.getBoundingClientRect();return ja(M.left,M.top)})(b):ja(0,0)},du=(m,b)=>({row:m,y:b}),ls=(m,b)=>({col:m,x:b}),tp=m=>Ad(m).left+Cd(m),Ku=m=>Ad(m).left,dl=(m,b)=>ls(m,Ku(b)),kn=(m,b)=>ls(m,tp(b)),_a=m=>Ad(m).top,Yi=(m,b)=>du(m,_a(b)),ul=(m,b)=>du(m,_a(b)+Vf(b)),Gl=(m,b,x)=>{if(x.length===0)return[];const T=D(x.slice(1),(B,U)=>B.map(K=>m(U,K))),M=x[x.length-1].map(B=>b(x.length-1,B));return T.concat([M])},vc={delta:Lt,positions:m=>Gl(Yi,ul,m),edge:_a},ia=un({delta:Lt,edge:Ku,positions:m=>Gl(dl,kn,m)},{delta:m=>-m,edge:tp,positions:m=>Gl(kn,dl,m)}),Td={delta:(m,b)=>ia(b).delta(m,b),positions:(m,b)=>ia(b).positions(m,b),edge:m=>ia(m).edge(m)},Gu={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:[""]},jf=(()=>{const m="[0-9]+",b="[eE][+-]?"+m,x=M=>`(?:${M})?`,T=["Infinity",m+"\\."+x(m)+x(b),"\\."+m+x(b),m+x(b)].join("|");return new RegExp(`^([+-]?(?:${T}))(.*)$`)})(),Ur=/(\d+(\.\d+)?)%/,ho=/(\d+(\.\d+)?)px|em/,_c=os("col"),uu=os("tr"),xa=(m,b,x)=>{const T=yl(m).getOrThunk(()=>yd(ll(m)));return b(m)/x(T)*100},xc=(m,b)=>{pn(m,"width",b+"px")},Pi=(m,b)=>{pn(m,"width",b+"%")},wc=(m,b)=>{pn(m,"height",b+"px")},Yc=m=>{const b=(x=>{return Zl(T=x,"height",T.dom.offsetHeight)+"px";var T})(m);return b?((x,T,M,B)=>{const U=parseFloat(x);return wo(x,"%")&&ao(T)!=="table"?((K,re,he,Se)=>{const me=Q(K).map(be=>{const _e=he(be);return Math.floor(re/100*_e)}).getOr(re);return Se(K,me),me})(T,U,M,B):U})(b,m,yc,wc):yc(m)},Zr=(m,b)=>Li(m,b).orThunk(()=>Vo(m,b).map(x=>x+"px")),fl=m=>Zr(m,"width"),Yl=m=>xa(m,ki,En),fu=m=>{return _c(m)?ki(m):Zl(b=m,"width",b.dom.offsetWidth);var b},ng=m=>uu(m)?yc(m):((b,x,T)=>T(b)/Vl(b,"rowspan"))(m,0,Yc),kc=(m,b,x)=>{pn(m,"width",b+x)},Od=m=>xa(m,ki,En)+"%",Yu=ut(Ur),Ms=os("col"),Ua=m=>fl(m).getOrThunk(()=>fu(m)+"px"),la=m=>{return(b=m,Zr(b,"height")).getOrThunk(()=>ng(m)+"px");var b},ii=(m,b,x,T,M,B)=>m.filter(T).fold(()=>B(((U,K)=>{if(K<0||K>=U.length-1)return ve.none();const re=U[K].fold(()=>{const Se=(me=>{const be=ot.call(me,0);return be.reverse(),be})(U.slice(0,K));return j(Se,(me,be)=>me.map(_e=>({value:_e,delta:be+1})))},Se=>ve.some({value:Se,delta:0})),he=U[K+1].fold(()=>{const Se=U.slice(K+1);return j(Se,(me,be)=>me.map(_e=>({value:_e,delta:be+1})))},Se=>ve.some({value:Se,delta:1}));return re.bind(Se=>he.map(me=>{const be=me.delta+Se.delta;return Math.abs(me.value-Se.value)/be}))})(x,b)),U=>M(U)),_r=(m,b,x,T)=>{const M=cu(m),B=Cl(m)?(re=>D(kl(re),he=>ve.from(he.element)))(m):M,U=[ve.some(Td.edge(b))].concat(D(Td.positions(M,b),re=>re.map(he=>he.x))),K=Ut(er);return D(B,(re,he)=>ii(re,he,U,K,Se=>{if((be=>{const _e=Ul().browser,De=_e.isChromium()||_e.isFirefox();return!Ms(be)||De})(Se))return x(Se);{const be=(me=M[he])!=null?Lt(me):ve.none();return ii(be,he,U,K,_e=>T(ve.some(ki(_e))),T)}var me},T))},Uf=m=>m.map(b=>b+"px").getOr(""),dr=(m,b,x)=>_r(m,b,fu,T=>T.getOrThunk(x.minCellWidth)),ca=(m,b,x,T)=>{const M=ql(m),B=D(m.all,K=>ve.some(K.element)),U=[ve.some(vc.edge(b))].concat(D(vc.positions(M,b),K=>K.map(re=>re.y)));return D(B,(K,re)=>ii(K,re,U,Ct,x,T))},El=(m,b)=>()=>Ki(m)?b(m):parseFloat(Li(m,"width").getOr("0")),nt=m=>{const b=El(m,T=>parseFloat(Od(T))),x=El(m,ki);return{width:b,pixelWidth:x,getWidths:(T,M)=>((B,U,K)=>_r(B,U,Yl,re=>re.fold(()=>K.minCellWidth(),he=>he/K.pixelWidth()*100)))(T,m,M),getCellDelta:T=>T/x()*100,singleColumnWidth:(T,M)=>[100-T],minCellWidth:()=>Gr()/x()*100,setElementWidth:Pi,adjustTableWidth:T=>{const M=b();Pi(m,M+T/100*M)},isRelative:!0,label:"percent"}},Xr=m=>{const b=El(m,ki);return{width:b,pixelWidth:b,getWidths:(x,T)=>dr(x,m,T),getCellDelta:Lt,singleColumnWidth:(x,T)=>[Math.max(Gr(),x+T)-x],minCellWidth:Gr,setElementWidth:xc,adjustTableWidth:x=>{const T=b()+x;xc(m,T)},isRelative:!1,label:"pixel"}},mu=m=>fl(m).fold(()=>(b=>{const x=El(b,ki),T=ut(0);return{width:x,pixelWidth:x,getWidths:(M,B)=>dr(M,b,B),getCellDelta:T,singleColumnWidth:ut([0]),minCellWidth:T,setElementWidth:st,adjustTableWidth:st,isRelative:!0,label:"none"}})(m),b=>((x,T)=>Yu().exec(T)!==null?nt(x):Xr(x))(m,b)),js=Xr,Al=nt,Za=(m,b,x)=>{const T=m[x].element,M=vt.fromTag("td");zs(M,vt.fromTag("br")),(b?zs:ru)(T,M)},Tl=((m,b)=>{const x=T=>m(T)?ve.from(T.dom.nodeValue):ve.none();return{get:T=>{if(!m(T))throw new Error("Can only get text value of a text node");return x(T).getOr("")},getOption:x,set:(T,M)=>{if(!m(T))throw new Error("Can only set raw text value of a text node");T.dom.nodeValue=M}}})(Bn),pu=m=>Tl.get(m),li=m=>Tl.getOption(m),vn=(m,b)=>Tl.set(m,b),ur=m=>ao(m)==="img"?1:li(m).fold(()=>Hr(m).length,b=>b.length),Cc=["img","br"],Us=m=>li(m).filter(b=>b.trim().length!==0||b.indexOf(" ")>-1).isSome()||uo(Cc,ao(m))||(b=>rs(b)&&St(b,"contenteditable")==="false")(m),Xu=m=>((b,x)=>{const T=M=>{for(let B=0;Bop(m,Us),op=(m,b)=>{const x=T=>{const M=Hr(T);for(let B=M.length-1;B>=0;B--){const U=M[B];if(b(U))return ve.some(U);const K=x(U);if(K.isSome())return K}return ve.none()};return x(m)},Zs={scope:["row","col"]},Ne=m=>()=>{const b=vt.fromTag("td",m.dom);return zs(b,vt.fromTag("br",m.dom)),b},Wa=m=>()=>vt.fromTag("col",m.dom),fr=m=>()=>vt.fromTag("colgroup",m.dom),Ci=m=>()=>vt.fromTag("tr",m.dom),Ol=(m,b,x)=>{const T=((M,B)=>{const U=_i(M,B),K=Hr(pc(M));return qi(U,K),U})(m,b);return Sn(x,(M,B)=>{M===null?an(T,B):yn(T,B,M)}),T},xr=m=>m,xs=(m,b,x)=>{const T=(M,B)=>{((U,K)=>{const re=U.dom,he=K.dom;Fs(re)&&Fs(he)&&(he.style.cssText=re.style.cssText)})(M.element,B),ri(B,"height"),M.colspan!==1&&ri(B,"width")};return{col:M=>{const B=vt.fromTag(ao(M.element),b.dom);return T(M,B),m(M.element,B),B},colgroup:fr(b),row:Ci(b),cell:M=>{const B=vt.fromTag(ao(M.element),b.dom),U=x.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),K=U.length>0?((re,he,Se)=>Xu(re).map(me=>{const be=Se.join(","),_e=ba(me,be,De=>as(De,re));return qo(_e,(De,Re)=>{const lt=au(Re);return zs(De,lt),lt},he)}).getOr(he))(M.element,B,U):B;return zs(K,vt.fromTag("br")),T(M,B),((re,he)=>{Sn(Zs,(Se,me)=>Vo(re,me).filter(be=>uo(Se,be)).each(be=>yn(he,me,be)))})(M.element,B),m(M.element,B),B},replace:Ol,colGap:Wa(b),gap:Ne(b)}},Jn=m=>({col:Wa(m),colgroup:fr(m),row:Ci(m),cell:Ne(m),replace:xr,colGap:Wa(m),gap:Ne(m)}),wa=m=>b=>b.options.get(m),Si="100%",ci=m=>{var b;const x=m.dom,T=(b=x.getParent(m.selection.getStart(),x.isBlock))!==null&&b!==void 0?b:m.getBody();return En(vt.fromDom(T))+"px"},Xi=m=>ve.from(m.options.get("table_clone_elements")),Jl=wa("table_header_type"),Sc=wa("table_column_resizing"),Xc=m=>Sc(m)==="preservetable",Zf=m=>Sc(m)==="resizetable",Wf=wa("table_sizing_mode"),Ec=m=>Wf(m)==="relative",E=m=>Wf(m)==="fixed",P=m=>Wf(m)==="responsive",q=wa("table_resize_bars"),ge=wa("table_style_by_css"),xe=wa("table_merge_content_on_paste"),at=m=>{const b=m.options,x=b.get("table_default_attributes");return b.isSet("table_default_attributes")?x:((T,M)=>P(T)||ge(T)?M:E(T)?{...M,width:ci(T)}:{...M,width:Si})(m,x)},xo=wa("table_use_colgroups"),Uo=m=>Pn(m,"[contenteditable]"),Lo=(m,b=!1)=>Ki(m)?m.dom.isContentEditable:Uo(m).fold(ut(b),x=>io(x)==="true"),io=m=>m.dom.contentEditable,Wn=m=>vt.fromDom(m.getBody()),sr=m=>b=>as(b,Wn(m)),Ws=m=>{an(m,"data-mce-style");const b=x=>an(x,"data-mce-style");bt(Ds(m),b),bt(Na(m),b),bt(pe(m),b)},zl=m=>vt.fromDom(m.selection.getStart()),gu=m=>m.getBoundingClientRect().width,zd=m=>m.getBoundingClientRect().height,Mr=m=>(b,x)=>{const T=b.dom.getStyle(x,m)||b.dom.getAttrib(x,m);return ve.from(T).filter(yr)},uh=Mr("width"),np=Mr("height"),sg=m=>gc(m,os("table")).exists(Lo),Ma=(m,b)=>{const x=b.column,T=b.column+b.colspan-1,M=b.row,B=b.row+b.rowspan-1;return x<=m.finishCol&&T>=m.startCol&&M<=m.finishRow&&B>=m.startRow},rr=(m,b)=>b.column>=m.startCol&&b.column+b.colspan-1<=m.finishCol&&b.row>=m.startRow&&b.row+b.rowspan-1<=m.finishRow,da=(m,b,x)=>{const T=Wl(m,b,as),M=Wl(m,x,as);return T.bind(B=>M.map(U=>{return K=B,re=U,{startRow:Math.min(K.row,re.row),startCol:Math.min(K.column,re.column),finishRow:Math.max(K.row+K.rowspan-1,re.row+re.rowspan-1),finishCol:Math.max(K.column+K.colspan-1,re.column+re.colspan-1)};var K,re}))},Jc=(m,b,x)=>da(m,b,x).map(T=>{const M=jr(m,Ke(Ma,T));return D(M,B=>B.element)}),qf=(m,b)=>Wl(m,b,(x,T)=>hr(T,x)).map(x=>x.element),Kf=(m,b,x)=>{const T=di(m);return Jc(T,b,x)},Ii=(m,b,x,T,M)=>{const B=di(m),U=as(m,x)?ve.some(b):qf(B,b),K=as(m,M)?ve.some(T):qf(B,T);return U.bind(re=>K.bind(he=>Jc(B,re,he)))},di=rn;var Gf=["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"],Ac=()=>({up:ut({selector:br,closest:Pn,predicate:Gi,all:Gn}),down:ut({selector:Yn,predicate:$r}),styles:ut({get:ya,getRaw:Li,set:pn,remove:ri}),attrs:ut({get:St,set:yn,remove:an,copyTo:(m,b)=>{const x=Kr(m);ra(b,x)}}),insert:ut({before:Vt,after:Dr,afterAll:ni,append:zs,appendAll:qi,prepend:ru,wrap:bd}),remove:ut({unwrap:ga,remove:ys}),create:ut({nu:vt.fromTag,clone:m=>vt.fromDom(m.dom.cloneNode(!1)),text:vt.fromText}),query:ut({comparePosition:(m,b)=>m.dom.compareDocumentPosition(b.dom),prevSibling:Ro,nextSibling:Ha}),property:ut({children:Hr,name:ao,parent:yi,document:m=>Mi(m).dom,isText:Bn,isComment:On,isElement:Zn,isSpecial:m=>{const b=ao(m);return uo(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],b)},getLanguage:m=>Zn(m)?Vo(m,"lang"):ve.none(),getText:pu,setText:vn,isBoundary:m=>!!Zn(m)&&(ao(m)==="body"||uo(Gf,ao(m))),isEmptyTag:m=>!!Zn(m)&&uo(["br","img","hr","input"],ao(m)),isNonEditable:m=>Zn(m)&&St(m,"contenteditable")==="false"}),eq:as,is:bl});const R1=(m,b,x,T)=>{const M=b(m,x);return qo(T,(B,U)=>{const K=b(m,U);return sp(m,B,K)},M)},sp=(m,b,x)=>b.bind(T=>x.filter(Ke(m.eq,T))),Qc=Ac(),Nd=(m,b)=>((x,T,M)=>M.length>0?((B,U,K,re)=>re(B,U,K[0],K.slice(1)))(x,T,M,R1):ve.none())(Qc,(x,T)=>m(T),b),no=m=>br(m,"table"),Ql=(m,b,x)=>{const T=M=>B=>x!==void 0&&x(B)||as(B,M);return as(m,b)?ve.some({boxes:ve.some([m]),start:m,finish:b}):no(m).bind(M=>no(b).bind(B=>{if(as(M,B))return ve.some({boxes:Kf(M,m,b),start:m,finish:b});if(hr(M,B)){const U=ba(b,"td,th",T(M)),K=U.length>0?U[U.length-1]:b;return ve.some({boxes:Ii(M,m,M,b,B),start:m,finish:K})}if(hr(B,M)){const U=ba(m,"td,th",T(B)),K=U.length>0?U[U.length-1]:m;return ve.some({boxes:Ii(B,m,M,b,B),start:m,finish:K})}return((U,K,re)=>((he,Se,me,be=ue)=>{const _e=[Se].concat(he.up().all(Se)),De=[me].concat(he.up().all(me)),Re=gt=>Cr(gt,be).fold(()=>gt,Nt=>gt.slice(0,Nt+1)),lt=Re(_e),ct=Re(De),it=Ao(lt,gt=>Fe(ct,((Nt,Pt)=>Ke(Nt.eq,Pt))(he,gt)));return{firstpath:lt,secondpath:ct,shared:it}})(Qc,U,K,void 0))(m,b).shared.bind(U=>Pn(U,"table",x).bind(K=>{const re=ba(b,"td,th",T(K)),he=re.length>0?re[re.length-1]:b,Se=ba(m,"td,th",T(K)),me=Se.length>0?Se[Se.length-1]:m;return ve.some({boxes:Ii(K,m,M,b,B),start:me,finish:he})}))}))},Yf=(m,b)=>{const x=Yn(m,b);return x.length>0?ve.some(x):ve.none()},Dd=(m,b,x)=>Vs(m,b).bind(T=>Vs(m,x).bind(M=>Nd(no,[T,M]).map(B=>({first:T,last:M,table:B})))),ka=(m,b,x,T,M)=>((B,U)=>Ao(B,K=>oi(K,U)))(m,M).bind(B=>((U,K,re)=>Q(U).bind(he=>((Se,me,be,_e)=>Wl(Se,me,as).bind(De=>{const Re=be>0?De.row+De.rowspan-1:De.row,lt=_e>0?De.column+De.colspan-1:De.column;return Va(Se,Re+be,lt+_e).map(ct=>ct.element)}))(di(he),U,K,re)))(B,b,x).bind(U=>((K,re)=>br(K,"table").bind(he=>Vs(he,re).bind(Se=>Ql(Se,K).bind(me=>me.boxes.map(be=>({boxes:be,start:me.start,finish:me.finish}))))))(U,T))),Nl=(m,b)=>Yf(m,b),Ju=(m,b,x)=>Dd(m,b,x).bind(T=>{const M=re=>as(m,re),B="thead,tfoot,tbody,table",U=br(T.first,B,M),K=br(T.last,B,M);return U.bind(re=>K.bind(he=>as(re,he)?((Se,me,be)=>((_e,De,Re)=>da(_e,De,Re).bind(lt=>((ct,it)=>{let gt=!0;const Nt=Ke(rr,it);for(let Pt=it.startRow;Pt<=it.finishRow;Pt++)for(let Le=it.startCol;Le<=it.finishCol;Le++)gt=gt&&Va(ct,Pt,Le).exists(Nt);return gt?ve.some(it):ve.none()})(_e,lt)))(di(Se),me,be))(T.table,T.first,T.last):ve.none()))}),Rd=Lt,rg=m=>{const b=(x,T)=>Vo(x,T).exists(M=>parseInt(M,10)>1);return m.length>0&&$t(m,x=>b(x,"rowspan")||b(x,"colspan"))?ve.some(m):ve.none()},ec=(m,b,x)=>b.length<=1?ve.none():Ju(m,x.firstSelectedSelector,x.lastSelectedSelector).map(T=>({bounds:T,cells:b})),Xf="data-mce-selected",Jf="data-mce-first-selected",wt="data-mce-last-selected",ag="["+Xf+"]",Md={selected:Xf,selectedSelector:"td["+Xf+"],th["+Xf+"]",firstSelected:Jf,firstSelectedSelector:"td["+Jf+"],th["+Jf+"]",lastSelected:wt,lastSelectedSelector:"td["+wt+"],th["+wt+"]"},Qo=(m,b,x)=>({element:x,mergable:ec(b,m,Md),unmergable:rg(m),selection:Rd(m)}),lo=m=>(b,x)=>{const T=ao(b),M=T==="col"||T==="colgroup"?Q(B=b).bind(U=>Nl(U,Md.firstSelectedSelector)).fold(ut(B),U=>U[0]):b;var B;return Pn(M,m,x)},Ld=lo("th,td,caption"),Hs=lo("th,td"),Dl=m=>{return b=m.model.table.getSelectedCells(),D(b,vt.fromDom);var b},Rl=(m,b)=>{m.on("BeforeGetContent",x=>{const T=M=>{x.preventDefault(),(B=>Q(B[0]).map(U=>{const K=((re,he)=>{const Se=gt=>oi(gt.element,he),me=pc(re),be=oo(me),_e=mu(re),De=vr(be),Re=((gt,Nt)=>{const Pt=gt.grid.columns;let Le=gt.grid.rows,Jt=Pt,To=0,Xo=0;const Io=[],Oo=[];return Sn(gt.access,Yo=>{if(Io.push(Yo),Nt(Yo)){Oo.push(Yo);const zn=Yo.row,Br=zn+Yo.rowspan-1,fi=Yo.column,Ba=fi+Yo.colspan-1;znTo&&(To=Br),fiXo&&(Xo=Ba)}}),((Yo,zn,Br,fi,Ba,sc)=>({minRow:Yo,minCol:zn,maxRow:Br,maxCol:fi,allCells:Ba,selectedCells:sc}))(Le,Jt,To,Xo,Io,Oo)})(De,Se),lt="th:not("+he+"),td:not("+he+")",ct=qc(me,"th,td",gt=>oi(gt,lt));bt(ct,ys),((gt,Nt,Pt,Le)=>{const Jt=Kt(gt,Io=>Io.section!=="colgroup"),To=Nt.grid.columns,Xo=Nt.grid.rows;for(let Io=0;IoPt.maxRow||YoPt.maxCol||(Va(Nt,Io,Yo).filter(Le).isNone()?Za(Jt,Oo,Io):Oo=!0)}})(be,De,Re,Se);const it=((gt,Nt,Pt,Le)=>{if(Le.minCol===0&&Nt.grid.columns===Le.maxCol+1)return 0;const Jt=dr(Nt,gt,Pt),To=Ge(Jt,(Oo,Yo)=>Oo+Yo,0),Xo=Ge(Jt.slice(Le.minCol,Le.maxCol+1),(Oo,Yo)=>Oo+Yo,0),Io=Xo/To*Pt.pixelWidth()-Pt.pixelWidth();return Pt.getCellDelta(Io)})(re,rn(re),_e,Re);return((gt,Nt,Pt,Le)=>{Sn(Pt.columns,To=>{(To.columnNt.maxCol)&&ys(To.element)});const Jt=Kt(xl(gt,"tr"),To=>To.dom.childElementCount===0);bt(Jt,ys),Nt.minCol!==Nt.maxCol&&Nt.minRow!==Nt.maxRow||bt(xl(gt,"th,td"),To=>{an(To,"rowspan"),an(To,"colspan")}),an(gt,Ed),an(gt,"data-snooker-col-series"),mu(gt).adjustTableWidth(Le)})(me,Re,De,it),me})(U,ag);return Ws(K),[K]}))(M).each(B=>{x.content=x.format==="text"?(U=>D(U,K=>K.dom.innerText).join(""))(B):((U,K)=>D(K,re=>U.selection.serializer.serialize(re.dom,{})).join(""))(m,B)})};if(x.selection===!0){const M=(B=>Kt(Dl(B),U=>oi(U,Md.selectedSelector)))(m);M.length>=1&&T(M)}}),m.on("BeforeSetContent",x=>{if(x.selection===!0&&x.paste===!0){const T=Dl(m);fn(T).each(M=>{Q(M).each(B=>{const U=Kt(((re,he)=>{const Se=document.createElement("div");return Se.innerHTML=re,Hr(vt.fromDom(Se))})(x.content),re=>ao(re)!=="meta"),K=os("table");if(xe(m)&&U.length===1&&K(U[0])){x.preventDefault();const re=vt.fromDom(m.getDoc()),he=Jn(re),Se=((me,be,_e)=>({element:me,clipboard:be,generators:_e}))(M,U[0],he);b.pasteCells(B,Se).each(()=>{m.focus()})}})})}})},$o=(m,b)=>({element:m,offset:b}),Qu=(m,b,x)=>m.property().isText(b)&&m.property().getText(b).trim().length===0||m.property().isComment(b)?x(b).bind(T=>Qu(m,T,x).orThunk(()=>ve.some(T))):ve.none(),Wb=(m,b)=>m.property().isText(b)?m.property().getText(b).length:m.property().children(b).length,Xe=(m,b)=>{const x=Qu(m,b,m.query().prevSibling).getOr(b);if(m.property().isText(x))return $o(x,Wb(m,x));const T=m.property().children(x);return T.length>0?Xe(m,T[T.length-1]):$o(x,Wb(m,x))},ig=Xe,Qf=Ac(),em=(m,b)=>{er(m)||(T=>fl(T).bind(M=>{return B=M,U=["fixed","relative","empty"],ve.from(jf.exec(B)).bind(K=>{const re=Number(K[1]),he=K[2];return((Se,me)=>Fe(me,be=>Fe(Gu[be],_e=>Se===_e)))(he,U)?ve.some({value:re,unit:he}):ve.none()});var B,U}))(m).each(T=>{const M=T.value/2;kc(m,M,T.unit),kc(b,M,T.unit)})},ef=m=>D(m,ut(0)),hu=(m,b,x,T,M)=>M(m.slice(0,b)).concat(T).concat(M(m.slice(x))),qb=m=>(b,x,T,M)=>{if(m(T)){const B=Math.max(M,b[x]-Math.abs(T)),U=Math.abs(B-b[x]);return T>=0?U:-U}return T},Bd=qb(m=>m<0),Ss=qb(Ct),Tc=()=>{const m=(x,T,M,B)=>{const U=(100+M)/100,K=Math.max(B,(x[T]+M)/U);return D(x,(re,he)=>(he===T?K:re/U)-re)},b=(x,T,M,B,U,K)=>K?m(x,T,B,U):((re,he,Se,me,be)=>{const _e=Bd(re,he,me,be);return hu(re,he,Se+1,[_e,0],ef)})(x,T,M,B,U);return{resizeTable:(x,T)=>x(T),clampTableDelta:Bd,calcLeftEdgeDeltas:b,calcMiddleDeltas:(x,T,M,B,U,K,re)=>b(x,M,B,U,K,re),calcRightEdgeDeltas:(x,T,M,B,U,K)=>{if(K)return m(x,M,B,U);{const re=Bd(x,M,B,U);return ef(x.slice(0,M)).concat([re])}},calcRedestributedWidths:(x,T,M,B)=>{if(B){const U=(T+M)/T,K=D(x,re=>re/U);return{delta:100*U-100,newSizes:K}}return{delta:M,newSizes:x}}}},lg=()=>{const m=(b,x,T,M,B)=>{const U=Ss(b,M>=0?T:x,M,B);return hu(b,x,T+1,[U,-U],ef)};return{resizeTable:(b,x,T)=>{T&&b(x)},clampTableDelta:(b,x,T,M,B)=>{if(B){if(T>=0)return T;{const U=Ge(b,(K,re)=>K+re-M,0);return Math.max(-U,T)}}return Bd(b,x,T,M)},calcLeftEdgeDeltas:m,calcMiddleDeltas:(b,x,T,M,B,U)=>m(b,T,M,B,U),calcRightEdgeDeltas:(b,x,T,M,B,U)=>{if(U)return ef(b);{const K=M/b.length;return D(b,ut(K))}},calcRedestributedWidths:(b,x,T,M)=>({delta:0,newSizes:b})}},Ml=m=>rn(m).grid,bu=os("th"),ml=m=>$t(m,b=>bu(b.element)),ar=(m,b)=>m&&b?"sectionCells":m?"section":"cells",yu=m=>{const b=m.section==="thead",x=wi(Er(m.cells),"th");return m.section==="tfoot"?{type:"footer"}:b||x?{type:"header",subType:ar(b,x)}:{type:"body"}},Er=m=>{const b=Kt(m,x=>bu(x.element));return b.length===0?ve.some("td"):b.length===m.length?ve.some("th"):ve.none()},rp=(m,b,x)=>lr(x(m.element,b),!0,m.isLocked),Ll=(m,b)=>m.section!==b?ha(m.element,m.cells,b,m.isNew):m,Jr=()=>({transformRow:Ll,transformCell:(m,b,x)=>{const T=x(m.element,b),M=ao(T)!=="td"?((B,U)=>{const K=_i(B,"td");Dr(B,K);const re=Hr(B);return qi(K,re),ys(B),K})(T):T;return lr(M,m.isNew,m.isLocked)}}),xt=()=>({transformRow:Ll,transformCell:rp}),vu=()=>({transformRow:(m,b)=>Ll(m,b==="thead"?"tbody":b),transformCell:rp}),Qr=Jr,Kb=xt,k=vu,N=()=>({transformRow:Lt,transformCell:rp}),Z=(m,b,x,T)=>{x===T?an(m,b):yn(m,b,x)},se=(m,b,x)=>{zo(xi(m,b)).fold(()=>ru(m,x),T=>Dr(T,x))},Ce=(m,b)=>{const x=[],T=[],M=be=>D(be,_e=>{_e.isNew&&x.push(_e.element);const De=_e.element;return vi(De),bt(_e.cells,Re=>{Re.isNew&&T.push(Re.element),Z(Re.element,"colspan",Re.colspan,1),Z(Re.element,"rowspan",Re.rowspan,1),zs(De,Re.element)}),De}),B=be=>pt(be,_e=>D(_e.cells,De=>(Z(De.element,"span",De.colspan,1),De.element))),U=(be,_e)=>{const De=((lt,ct)=>{const it=vl(lt,ct).getOrThunk(()=>{const gt=vt.fromTag(ct,ll(lt).dom);return ct==="thead"?se(lt,"caption,colgroup",gt):ct==="colgroup"?se(lt,"caption",gt):zs(lt,gt),gt});return vi(it),it})(m,_e),Re=(_e==="colgroup"?B:M)(be);qi(De,Re)},K=(be,_e)=>{be.length>0?U(be,_e):(De=>{vl(m,De).each(ys)})(_e)},re=[],he=[],Se=[],me=[];return bt(b,be=>{switch(be.section){case"thead":re.push(be);break;case"tbody":he.push(be);break;case"tfoot":Se.push(be);break;case"colgroup":me.push(be)}}),K(me,"colgroup"),K(re,"thead"),K(he,"tbody"),K(Se,"tfoot"),{newRows:x,newCells:T}},et=(m,b)=>{if(m.length===0)return 0;const x=m[0];return Cr(m,T=>!b(x.element,T.element)).getOr(m.length)},Et=(m,b)=>{const x=D(m,T=>D(T.cells,ue));return D(m,(T,M)=>{const B=pt(T.cells,(U,K)=>{if(x[M][K]===!1){const be=((_e,De,Re,lt)=>{const ct=((Pt,Le)=>Pt[Le])(_e,De),it=ct.section==="colgroup",gt=et(ct.cells.slice(Re),lt),Nt=it?1:et(((Pt,Le)=>D(Pt,Jt=>cr(Jt,Le)))(_e.slice(De),Re),lt);return{colspan:gt,rowspan:Nt}})(m,M,K,b);return((_e,De,Re,lt)=>{for(let ct=_e;ct<_e+Re;ct++)for(let it=De;it({element:U,cells:K,section:re,isNew:he}))(T.element,B,T.section,T.isNew)})},At=(m,b,x)=>{const T=[];bt(m.colgroups,M=>{const B=[];for(let U=0;Ulr(re.element,x,!1)).getOrThunk(()=>lr(b.colGap(),!0,!1));B.push(K)}T.push(ha(M.element,B,"colgroup",x))});for(let M=0;Mlr(Se.element,x,Se.isLocked)).getOrThunk(()=>lr(b.gap(),!0,!1));B.push(he)}const U=m.all[M],K=ha(U.element,B,U.section,x);T.push(K)}return T},Bo=m=>Et(m,as),co=(m,b)=>j(m.all,x=>Ao(x.cells,T=>as(b,T.element))),_n=(m,b,x)=>{const T=D(b.selection,B=>_d(B).bind(U=>co(m,U)).filter(x)),M=Oa(T);return Vr(M.length>0,M)},Ko=(m,b,x,T,M)=>(B,U,K,re)=>{const he=rn(B),Se=ve.from(re==null?void 0:re.section).getOrThunk(N);return b(he,U).map(me=>{const be=((Re,lt)=>At(Re,lt,!1))(he,K),_e=m(be,me,as,M(K),Se),De=$a(_e.grid);return{info:me,grid:Bo(_e.grid),cursor:_e.cursor,lockedColumns:De}}).bind(me=>{const be=Ce(B,me.grid),_e=ve.from(re==null?void 0:re.sizing).getOrThunk(()=>mu(B)),De=ve.from(re==null?void 0:re.resize).getOrThunk(lg);return x(B,me.grid,me.info,{sizing:_e,resize:De,section:Se}),T(B),an(B,Ed),me.lockedColumns.length>0&&yn(B,Ed,me.lockedColumns.join(",")),ve.some({cursor:me.cursor,newRows:be.newRows,newCells:be.newCells})})},Qn=(m,b)=>_n(m,b,Ct).map(x=>({cells:x,generators:b.generators,clipboard:b.clipboard})),ea=(m,b)=>_n(m,b,Ct),qs=(m,b)=>_n(m,b,x=>!x.isLocked),tc=(m,b)=>$t(b,x=>((T,M)=>co(T,M).exists(B=>!B.isLocked))(m,x)),oc=(m,b,x,T)=>{const M=_s(m).rows;let B=!0;for(let U=0;U{const b=B=>B(m),x=ut(m),T=()=>M,M={tag:!0,inner:m,fold:(B,U)=>U(m),isValue:Ct,isError:ue,map:B=>ed.value(B(m)),mapError:T,bind:b,exists:b,forall:b,getOr:x,or:T,getOrThunk:x,orThunk:T,getOrDie:x,each:B=>{B(m)},toOptional:()=>ve.some(m)};return M},ap=m=>{const b=()=>x,x={tag:!1,inner:m,fold:(M,B)=>M(m),isValue:ue,isError:Ct,map:b,mapError:M=>ed.error(M(m)),bind:b,exists:ue,forall:Ct,getOr:Lt,or:Lt,getOrThunk:ft,orThunk:ft,getOrDie:(T=String(m),()=>{throw new Error(T)}),each:st,toOptional:ve.none};var T;return x},ed={value:Oc,error:ap,fromOption:(m,b)=>m.fold(()=>ap(b),Oc)},tf=(m,b)=>({rowDelta:0,colDelta:aa(m[0])-aa(b[0])}),tm=(m,b)=>({rowDelta:m.length-b.length,colDelta:0}),_u=(m,b,x,T)=>{const M=b.section==="colgroup"?x.col:x.cell;return Gt(m,B=>lr(M(),!0,T(B)))},of=(m,b,x,T)=>{const M=m[m.length-1];return m.concat(Gt(b,()=>{const B=M.section==="colgroup"?x.colgroup:x.row,U=Sd(M,B,Lt),K=_u(U.cells.length,U,x,re=>dn(T,re.toString()));return ai(U,K)}))},fh=(m,b,x,T)=>D(m,M=>{const B=_u(b,M,x,ue);return wl(M,T,B)}),xu=(m,b,x)=>{const T=b.colDelta<0?fh:Lt,M=b.rowDelta<0?of:Lt,B=$a(m),U=aa(m[0]),K=Fe(B,Se=>Se===U-1),re=T(m,Math.abs(b.colDelta),x,K?U-1:U),he=$a(re);return M(re,Math.abs(b.rowDelta),x,ks(he,Ct))},es=(m,b,x,T)=>{const M=Ke(T,cr(m[b],x).element),B=m[b];return m.length>1&&aa(B)>1&&(x>0&&M(Rs(B,x-1))||x0&&M(Rs(m[b-1],x))||bKt(x,T=>T>=m.column&&T<=aa(b[0])+m.column),qa=(m,b,x,T,M)=>{((he,Se,me,be)=>{Se>0&&Se{const De=_e.cells[Se-1];let Re=0;const lt=be();for(;_e.cells.length>Se+Re&&me(De.element,_e.cells[Se+Re].element);)Wu(_e,Se+Re,lr(lt,!0,_e.cells[Se+Re].isLocked)),Re++})})(b,m,M,T.cell);const B=tm(x,b),U=xu(x,B,T),K=tm(b,U),re=xu(b,K,T);return D(re,(he,Se)=>wl(he,m,U[Se].cells))},Ji=(m,b,x,T,M)=>{((it,gt,Nt,Pt)=>{const Le=_s(it).rows;if(gt>0&>Ge(To,(Io,Oo)=>Fe(Io,Yo=>Xo(Yo.element,Oo.element))?Io:Io.concat([Oo]),[]))(Le[gt-1].cells,Nt);bt(Jt,To=>{let Xo=ve.none();for(let Io=gt;Io{Wu(Yo,Oo,lr(Br,!0,zn.isLocked))}))}})}})(b,m,M,T.cell);const B=$a(b),U=tf(b,x),K={...U,colDelta:U.colDelta-B.length},re=xu(b,K,T),{cols:he,rows:Se}=_s(re),me=$a(re),be=tf(x,b),_e={...be,colDelta:be.colDelta+me.length},De=(lt=T,ct=me,D(x,it=>Ge(ct,(gt,Nt)=>{const Pt=_u(1,it,lt,Ct)[0];return Zu(gt,Nt,Pt)},it))),Re=xu(De,_e,T);var lt,ct;return[...he,...Se.slice(0,m),...Re,...Se.slice(m,Se.length)]},mh=(m,b,x,T,M)=>{const{rows:B,cols:U}=_s(m),K=B.slice(0,b),re=B.slice(b);return[...U,...K,((he,Se,me,be)=>Sd(he,_e=>be(_e,me),Se))(B[x],(he,Se)=>b>0&&bD(m,B=>{const U=b>0&&b{if(Se!=="colgroup"&&me)return cr(re,he);{const Re=cr(re,be);return lr(De(Re.element,_e),!0,!1)}})(B,b,B.section,U,x,T,M);return Zu(B,b,K)}),om=(m,b,x,T)=>((M,B,U,K)=>Rs(M[B],U)!==void 0&&B>0&&K(Rs(M[B-1],U),Rs(M[B],U)))(m,b,x,T)||((M,B,U)=>B>0&&U(Rs(M,B-1),Rs(M,B)))(m[b],x,T),nm=(m,b,x,T)=>{const M=B=>(U=>U==="row"?(K=>Vl(K,"rowspan")>1)(b):er(b))(B)?`${B}group`:B;return m?bu(b)?M(x):null:T&&bu(b)?M(x==="row"?"col":"row"):null},ph=(m,b,x)=>lr(x(m.element,b),!0,m.isLocked),cg=(m,b,x,T,M,B,U)=>D(m,(K,re)=>((he,Se)=>{const me=he.cells,be=D(me,(_e,De)=>{if((Re=>Fe(b,lt=>x(Re.element,lt.element)))(_e)){const Re=U(_e,re,De)?M(_e,x,T):_e;return B(Re,re,De).each(lt=>{var ct,it;ct=Re.element,it={scope:ve.from(lt)},Sn(it,(gt,Nt)=>{gt.fold(()=>{an(ct,Nt)},Pt=>{Is(ct.dom,Nt,Pt)})})}),Re}return _e});return ha(he.element,be,he.section,he.isNew)})(K)),M1=(m,b,x)=>pt(m,(T,M)=>om(m,M,b,x)?[]:[cr(T,b)]),gh=(m,b,x,T,M)=>{const B=_s(m).rows,U=pt(b,Se=>M1(B,Se,T)),K=D(B,Se=>ml(Se.cells)),re=((Se,me)=>$t(me,Lt)&&ml(Se)?Ct:(be,_e,De)=>!(ao(be.element)==="th"&&me[_e]))(U,K);return cg(m,U,T,M,ph,((Se,me)=>(be,_e)=>ve.some(nm(Se,be.element,"row",me[_e])))(x,K),re)},hh=(m,b,x,T)=>{const M=_s(m).rows,B=D(b,U=>cr(M[U.row],U.column));return cg(m,B,x,T,ph,ve.none,Ct)},sm=m=>{if(!ce(m))throw new Error("cases must be an array");if(m.length===0)throw new Error("there must be at least one case");const b=[],x={};return bt(m,(T,M)=>{const B=Fr(T);if(B.length!==1)throw new Error("one and only one name per case");const U=B[0],K=T[U];if(x[U]!==void 0)throw new Error("duplicate key detected:"+U);if(U==="cata")throw new Error("cannot have a case named cata (sorry)");if(!ce(K))throw new Error("case arguments must be an array");b.push(U),x[U]=(...re)=>{const he=re.length;if(he!==K.length)throw new Error("Wrong number of arguments to case "+U+". Expected "+K.length+" ("+K+"), got "+he);return{fold:(...Se)=>{if(Se.length!==m.length)throw new Error("Wrong number of arguments to fold. Expected "+m.length+", got "+Se.length);return Se[M].apply(null,re)},match:Se=>{const me=Fr(Se);if(b.length!==me.length)throw new Error("Wrong number of arguments to match. Expected: "+b.join(",")+` +Actual: `+me.join(","));if(!$t(b,be=>uo(me,be)))throw new Error("Not all branches were specified when using match. Specified: "+me.join(", ")+` +Required: `+b.join(", "));return Se[U].apply(null,re)},log:Se=>{console.log(Se,{constructors:b,constructor:U,params:re})}}}}),x},dg={...sm([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}])},L1=(m,b,x)=>{const T=((M,B)=>Cl(M)?((U,K)=>{const re=kl(U);return D(re,(he,Se)=>({element:he.element,width:K[Se],colspan:he.colspan}))})(M,B):((U,K)=>{const re=so(U);return D(re,he=>{const Se=((me,be,_e)=>{let De=0;for(let Re=me;Re{x.setElementWidth(M.element,M.width)})},wu=(m,b,x,T,M)=>{const B=rn(m),U=M.getCellDelta(b),K=M.getWidths(B,M),re=x===B.grid.columns-1,he=T.clampTableDelta(K,x,U,M.minCellWidth(),re),Se=((be,_e,De,Re,lt)=>{const ct=be.slice(0),it=((Nt,Pt)=>Nt.length===0?dg.none():Nt.length===1?dg.only(0):Pt===0?dg.left(0,1):Pt===Nt.length-1?dg.right(Pt-1,Pt):Pt>0&&PtRe.singleColumnWidth(ct[Nt],De),(Nt,Pt)=>lt.calcLeftEdgeDeltas(ct,Nt,Pt,De,Re.minCellWidth(),Re.isRelative),(Nt,Pt,Le)=>lt.calcMiddleDeltas(ct,Nt,Pt,Le,De,Re.minCellWidth(),Re.isRelative),(Nt,Pt)=>lt.calcRightEdgeDeltas(ct,Nt,Pt,De,Re.minCellWidth(),Re.isRelative))})(K,x,he,M,T),me=D(Se,(be,_e)=>be+K[_e]);L1(B,me,M),T.resizeTable(M.adjustTableWidth,he,re)},lp=(m,b,x)=>{const T=rn(m),M=((re,he)=>ca(re,he,ng,Se=>Se.getOrThunk(Vn)))(T,m),B=D(M,(re,he)=>x===he?Math.max(b+re,Vn()):re),U=((re,he)=>D(re.all,(Se,me)=>({element:Se.element,height:he[me]})))(T,B);bt(U,re=>{wc(re.element,re.height)}),bt(so(T),re=>{(he=>{ri(he,"height")})(re.element)});const K=qo(B,(re,he)=>re+he,0);wc(m,K)},cp=m=>Ge(m,(b,x)=>Fe(b,T=>T.column===x.column)?b:b.concat([x]),[]).sort((b,x)=>b.column-x.column),ku=os("col"),nf=os("colgroup"),bh=m=>ao(m)==="tr"||nf(m),Ik=m=>({element:m,colspan:Ns(m,"colspan",1),rowspan:Ns(m,"rowspan",1)}),yh=m=>Vo(m,"scope").map(b=>b.substr(0,3)),zc=(m,b=Ik)=>{const x=M=>{if(bh(M))return nf((B={element:M}).element)?m.colgroup(B):m.row(B);{const U=M,K=(re=>ku(re.element)?m.col(re):m.cell(re))(b(U));return T=ve.some({item:U,replacement:K}),K}var B};let T=ve.none();return{getOrInit:(M,B)=>T.fold(()=>x(M),U=>B(M,U.item)?U.replacement:x(M))}},x_=m=>b=>{const x=[],T=M=>{const B=m==="td"?{scope:null}:{},U=b.replace(M,m,B);return x.push({item:M,sub:U}),U};return{replaceOrInit:(M,B)=>{if(bh(M)||ku(M))return M;{const U=M;return((K,re)=>Ao(x,he=>re(he.item,K)))(U,B).fold(()=>T(U),K=>B(M,K.item)?K.sub:T(U))}}}},B1=m=>({unmerge:b=>{const x=yh(b);return x.each(T=>yn(b,"scope",T)),()=>{const T=m.cell({element:b,colspan:1,rowspan:1});return ri(T,"width"),ri(b,"width"),x.each(M=>yn(T,"scope",M)),T}},merge:b=>(ri(b[0],"width"),(()=>{const x=Oa(D(b,yh));if(x.length===0)return ve.none();{const T=x[0],M=["row","col"];return Fe(x,B=>B!==T&&uo(M,B))?ve.none():ve.from(T)}})().fold(()=>an(b[0],"scope"),x=>yn(b[0],"scope",x+"group")),ut(b[0]))}),dp=["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"],Ka=Ac(),up=m=>((b,x)=>{const T=b.property().name(x);return uo(dp,T)})(Ka,m),fp=m=>((b,x)=>{const T=b.property().name(x);return uo(["ol","ul"],T)})(Ka,m),Gb=m=>{const b=os("br"),x=M=>Xl(M).bind(B=>{const U=Ha(B).map(K=>!!up(K)||!!((re,he)=>uo(["br","img","hr","input"],re.property().name(he)))(Ka,K)&&ao(K)!=="img").getOr(!1);return yi(B).map(K=>{return U===!0||ao(re=K)==="li"||Gi(re,fp).isSome()||b(B)||up(K)&&!as(M,K)?[]:[vt.fromTag("br")];var re})}).getOr([]),T=(()=>{const M=pt(m,B=>{const U=Hr(B);return(K=>$t(K,re=>b(re)||Bn(re)&&pu(re).trim().length===0))(U)?[]:U.concat(x(B))});return M.length===0?[vt.fromTag("br")]:M})();vi(m[0]),qi(m[0],T)},Dn=m=>Lo(m,!0),Qi=m=>{Ds(m).length===0&&ys(m)},Pd=(m,b)=>({grid:m,cursor:b}),ui=(m,b,x)=>{const T=((M,B,U)=>{var K,re;const he=_s(M).rows;return ve.from((re=(K=he[B])===null||K===void 0?void 0:K.cells[U])===null||re===void 0?void 0:re.element).filter(Dn).orThunk(()=>(Se=>j(Se,me=>j(me.cells,be=>{const _e=be.element;return Vr(Dn(_e),_e)})))(he))})(m,b,x);return Pd(m,T)},Es=m=>Ge(m,(b,x)=>Fe(b,T=>T.row===x.row)?b:b.concat([x]),[]).sort((b,x)=>b.row-x.row),vh=(m,b)=>(x,T,M,B,U)=>{const K=Es(T),re=D(K,Se=>Se.row),he=((Se,me,be,_e,De,Re,lt)=>{const{cols:ct,rows:it}=_s(Se),gt=it[me[0]],Nt=pt(me,Io=>((Oo,Yo,zn)=>{const Br=Oo[Yo];return pt(Br.cells,(fi,Ba)=>om(Oo,Yo,Ba,zn)?[]:[fi])})(it,Io,De)),Pt=D(gt.cells,(Io,Oo)=>ml(M1(it,Oo,De))),Le=[...it];bt(me,Io=>{Le[Io]=lt.transformRow(it[Io],be)});const Jt=[...ct,...Le],To=((Io,Oo)=>$t(Oo,Lt)&&ml(Io.cells)?Ct:(Yo,zn,Br)=>!(ao(Yo.element)==="th"&&Oo[Br]))(gt,Pt),Xo=((Io,Oo)=>(Yo,zn,Br)=>ve.some(nm(Io,Yo.element,"col",Oo[Br])))(_e,Pt);return cg(Jt,Nt,De,Re,lt.transformCell,Xo,To)})(x,re,m,b,M,B.replaceOrInit,U);return ui(he,T[0].row,T[0].column)},w_=vh("thead",!0),Fk=vh("tbody",!1),Gs=vh("tfoot",!1),Yb=(m,b,x)=>{const T=((B,U)=>Ye(B,()=>U))(m,x.section),M=vr(T);return At(M,b,!0)},P1=(m,b,x,T)=>((M,B,U,K)=>{const re=vr(B),he=K.getWidths(re,K);L1(re,he,K)})(0,b,0,T.sizing),rm=(m,b,x,T)=>((M,B,U,K,re)=>{const he=vr(B),Se=K.getWidths(he,K),me=K.pixelWidth(),{newSizes:be,delta:_e}=re.calcRedestributedWidths(Se,me,U.pixelDelta,K.isRelative);L1(he,be,K),K.adjustTableWidth(_e)})(0,b,x,T.sizing,T.resize),Nc=(m,b)=>Fe(b,x=>x.column===0&&x.isLocked),ug=(m,b)=>Fe(b,x=>x.column+x.colspan>=m.grid.columns&&x.isLocked),Xt=(m,b)=>{const x=cu(m),T=cp(b);return Ge(T,(M,B)=>M+x[B.column].map(Cd).getOr(0),0)},td=m=>(b,x)=>ea(b,x).filter(T=>!(m?Nc:ug)(b,T)).map(T=>({details:T,pixelDelta:Xt(b,T)})),I1=m=>(b,x)=>Qn(b,x).filter(T=>!(m?Nc:ug)(b,T.cells)),Xb=x_("th"),fg=x_("td"),Jb=Ko((m,b,x,T)=>{const M=b[0].row,B=Es(b),U=qo(B,(K,re)=>({grid:mh(K.grid,M,re.row+K.delta,x,T.getOrInit),delta:K.delta+1}),{grid:m,delta:0}).grid;return ui(U,M,b[0].column)},ea,st,st,zc),mp=Ko((m,b,x,T)=>{const M=Es(b),B=M[M.length-1],U=B.row+B.rowspan,K=qo(M,(re,he)=>mh(re,U,he.row,x,T.getOrInit),m);return ui(K,U,b[0].column)},ea,st,st,zc),Dc=Ko((m,b,x,T)=>{const M=b.details,B=cp(M),U=B[0].column,K=qo(B,(re,he)=>({grid:ip(re.grid,U,he.column+re.delta,x,T.getOrInit),delta:re.delta+1}),{grid:m,delta:0}).grid;return ui(K,M[0].row,U)},td(!0),rm,st,zc),Hk=Ko((m,b,x,T)=>{const M=b.details,B=M[M.length-1],U=B.column+B.colspan,K=cp(M),re=qo(K,(he,Se)=>ip(he,U,Se.column,x,T.getOrInit),m);return ui(re,M[0].row,U)},td(!1),rm,st,zc),Qb=Ko((m,b,x,T)=>{const M=cp(b.details),B=((K,re)=>pt(K,he=>{const Se=he.cells,me=qo(re,(be,_e)=>_e>=0&&_e0?[ha(he.element,me,he.section,he.isNew)]:[]}))(m,D(M,K=>K.column)),U=B.length>0?B[0].cells.length-1:0;return ui(B,M[0].row,Math.min(M[0].column,U))},(m,b)=>qs(m,b).map(x=>({details:x,pixelDelta:-Xt(m,x)})),rm,Qi,zc),F1=Ko((m,b,x,T)=>{const M=Es(b),B=((K,re,he)=>{const{rows:Se,cols:me}=_s(K);return[...me,...Se.slice(0,re),...Se.slice(he+1)]})(m,M[0].row,M[M.length-1].row),U=Math.max(_s(B).rows.length-1,0);return ui(B,Math.min(b[0].row,U),b[0].column)},ea,st,Qi,zc),ey=Ko((m,b,x,T)=>{const M=cp(b),B=D(M,K=>K.column),U=gh(m,B,!0,x,T.replaceOrInit);return ui(U,b[0].row,b[0].column)},qs,st,st,Xb),H1=Ko((m,b,x,T)=>{const M=cp(b),B=D(M,K=>K.column),U=gh(m,B,!1,x,T.replaceOrInit);return ui(U,b[0].row,b[0].column)},qs,st,st,fg),$1=Ko(w_,qs,st,st,Xb),ty=Ko(Fk,qs,st,st,fg),V1=Ko(Gs,qs,st,st,fg),j1=Ko((m,b,x,T)=>{const M=hh(m,b,x,T.replaceOrInit);return ui(M,b[0].row,b[0].column)},qs,st,st,Xb),k_=Ko((m,b,x,T)=>{const M=hh(m,b,x,T.replaceOrInit);return ui(M,b[0].row,b[0].column)},qs,st,st,fg),$k=Ko((m,b,x,T)=>{const M=b.cells;Gb(M);const B=((U,K,re,he)=>{const Se=_s(U).rows;if(Se.length===0)return U;for(let me=K.startRow;me<=K.finishRow;me++)for(let be=K.startCol;be<=K.finishCol;be++){const _e=Se[me],De=cr(_e,be).isLocked;Wu(_e,be,lr(he(),!1,De))}return U})(m,b.bounds,0,T.merge(M));return Pd(B,ve.from(M[0]))},(m,b)=>((x,T)=>T.mergable)(0,b).filter(x=>tc(m,x.cells)),P1,st,B1),_h=Ko((m,b,x,T)=>{const M=qo(b,(B,U)=>oc(B,U,x,T.unmerge(U)),m);return Pd(M,ve.from(b[0]))},(m,b)=>((x,T)=>T.unmergable)(0,b).filter(x=>tc(m,x)),P1,st,B1),U1=Ko((m,b,x,T)=>{const M=((K,re)=>{const he=rn(K);return At(he,re,!0)})(b.clipboard,b.generators);var B,U;return((K,re,he,Se,me)=>{const be=$a(re),_e=((ct,it,gt)=>{const Nt=aa(it[0]),Pt=_s(it).cols.length+ct.row,Le=Gt(Nt-ct.column,Jt=>Jt+ct.column);return{row:Pt,column:Ao(Le,Jt=>$t(gt,To=>To!==Jt)).getOr(Nt-1)}})(K,re,be),De=_s(he).rows,Re=Ks(_e,De,be);return((ct,it,gt)=>{if(ct.row>=it.length||ct.column>aa(it[0]))return ed.error("invalid start address out of table bounds, row: "+ct.row+", column: "+ct.column);const Nt=it.slice(ct.row),Pt=Nt[0].cells.slice(ct.column),Le=aa(gt[0]),Jt=gt.length;return ed.value({rowDelta:Nt.length-Jt,colDelta:Pt.length-Le})})(_e,re,De).map(ct=>{const it={...ct,colDelta:ct.colDelta-Re.length},gt=xu(re,it,Se),Nt=$a(gt),Pt=Ks(_e,De,Nt);return((Le,Jt,To,Xo,Io,Oo)=>{const Yo=Le.row,zn=Le.column,Br=Yo+To.length,fi=zn+aa(To[0])+Oo.length,Ba=ks(Oo,Ct);for(let sc=Yo;scPd(m,ve.some(b.element)),K=>ui(K,b.row,b.column))},(m,b)=>_d(b.element).bind(x=>co(m,x).map(T=>({...T,generators:b.generators,clipboard:b.clipboard}))),P1,st,zc),pp=Ko((m,b,x,T)=>{const M=_s(m).rows,B=b.cells[0].column,U=M[b.cells[0].row],K=Yb(b.clipboard,b.generators,U),re=qa(B,m,K,b.generators,x);return ui(re,b.cells[0].row,b.cells[0].column)},I1(!0),st,st,zc),Vk=Ko((m,b,x,T)=>{const M=_s(m).rows,B=b.cells[b.cells.length-1].column+b.cells[b.cells.length-1].colspan,U=M[b.cells[0].row],K=Yb(b.clipboard,b.generators,U),re=qa(B,m,K,b.generators,x);return ui(re,b.cells[0].row,B)},I1(!1),st,st,zc),jk=Ko((m,b,x,T)=>{const M=_s(m).rows,B=b.cells[0].row,U=M[B],K=Yb(b.clipboard,b.generators,U),re=Ji(B,m,K,b.generators,x);return ui(re,b.cells[0].row,b.cells[0].column)},Qn,st,st,zc),sf=Ko((m,b,x,T)=>{const M=_s(m).rows,B=b.cells[b.cells.length-1].row+b.cells[b.cells.length-1].rowspan,U=M[b.cells[0].row],K=Yb(b.clipboard,b.generators,U),re=Ji(B,m,K,b.generators,x);return ui(re,B,b.cells[0].column)},Qn,st,st,zc),am=(m,b)=>{const x=rn(m);return ea(x,b).bind(T=>{const M=T[T.length-1],B=T[0].column,U=M.column+M.colspan,K=Ht(D(x.all,re=>Kt(re.cells,he=>he.column>=B&&he.column{const x=rn(m);return ea(x,b).bind(Er).getOr("")},C_=(m,b)=>{const x=rn(m);return ea(x,b).bind(T=>{const M=T[T.length-1],B=T[0].row,U=M.row+M.rowspan;return(K=>{const re=D(K,me=>yu(me).type),he=uo(re,"header"),Se=uo(re,"footer");if(he||Se){const me=uo(re,"body");return!he||me||Se?he||me||!Se?ve.none():ve.some("footer"):ve.some("header")}return ve.some("body")})(x.all.slice(B,U))}).getOr("")},Z1=(m,b)=>m.dispatch("NewRow",{node:b}),xh=(m,b)=>m.dispatch("NewCell",{node:b}),Cu=(m,b,x)=>{m.dispatch("TableModified",{...x,table:b})},ny={structure:!1,style:!0},ta={structure:!0,style:!1},wr={structure:!0,style:!0},rf=(m,b)=>Ec(m)?Al(b):E(m)?js(b):mu(b),W1=(m,b,x)=>{const T=Se=>ao(Wn(Se))==="table",M=Xi(m),B=Zf(m)?st:em,U=Se=>{switch(Jl(m)){case"section":return Qr();case"sectionCells":return Kb();case"cells":return k();default:return((me,be)=>{var _e;switch((_e=rn(me),j(_e.all,De=>{const Re=yu(De);return Re.type==="header"?ve.from(Re.subType):ve.none()})).getOr(be)){case"section":return Jr();case"sectionCells":return xt();case"cells":return vu()}})(Se,"section")}},K=(Se,me,be,_e)=>(De,Re,lt=!1)=>{Ws(De);const ct=vt.fromDom(m.getDoc()),it=xs(be,ct,M),gt={sizing:rf(m,De),resize:Zf(m)?Tc():lg(),section:U(De)};return me(De)?Se(De,Re,it,gt).bind(Nt=>{b.refresh(De.dom),bt(Nt.newRows,Le=>{Z1(m,Le.dom)}),bt(Nt.newCells,Le=>{xh(m,Le.dom)});const Pt=((Le,Jt)=>Jt.cursor.fold(()=>{const To=Ds(Le);return fn(To).filter(Ki).map(Xo=>{x.clearSelectedCells(Le.dom);const Io=m.dom.createRng();return Io.selectNode(Xo.dom),m.selection.setRng(Io),yn(Xo,"data-mce-selected","1"),Io})},To=>{const Xo=ig(Qf,To),Io=m.dom.createRng();return Io.setStart(Xo.element.dom,Xo.offset),Io.setEnd(Xo.element.dom,Xo.offset),m.selection.setRng(Io),x.clearSelectedCells(Le.dom),ve.some(Io)}))(De,Nt);return Ki(De)&&(Ws(De),lt||Cu(m,De.dom,_e)),Pt.map(Le=>({rng:Le,effect:_e}))}):ve.none()},re=K(F1,Se=>!T(m)||Ml(Se).rows>1,st,ta),he=K(Qb,Se=>!T(m)||Ml(Se).columns>1,st,ta);return{deleteRow:re,deleteColumn:he,insertRowsBefore:K(Jb,Ct,st,ta),insertRowsAfter:K(mp,Ct,st,ta),insertColumnsBefore:K(Dc,Ct,B,ta),insertColumnsAfter:K(Hk,Ct,B,ta),mergeCells:K($k,Ct,st,ta),unmergeCells:K(_h,Ct,st,ta),pasteColsBefore:K(pp,Ct,st,ta),pasteColsAfter:K(Vk,Ct,st,ta),pasteRowsBefore:K(jk,Ct,st,ta),pasteRowsAfter:K(sf,Ct,st,ta),pasteCells:K(U1,Ct,st,wr),makeCellsHeader:K(j1,Ct,st,ta),unmakeCellsHeader:K(k_,Ct,st,ta),makeColumnsHeader:K(ey,Ct,st,ta),unmakeColumnsHeader:K(H1,Ct,st,ta),makeRowsHeader:K($1,Ct,st,ta),makeRowsBody:K(ty,Ct,st,ta),makeRowsFooter:K(V1,Ct,st,ta),getTableRowType:C_,getTableCellType:oy,getTableColType:am}},sy=(m,b,x)=>{const T=Ns(m,b,1);x===1||T<=1?an(m,b):yn(m,b,Math.min(x,T))},La=(m,b)=>x=>{const T=x.column+x.colspan-1,M=x.column;return T>=m&&M{const T=x.substring(0,x.length-m.length),M=parseFloat(T);return T===M.toString()?b(M):Fi.invalid(x)},af={...Fi,from:m=>wo(m,"%")?gp("%",Fi.percent,m):wo(m,"px")?gp("px",Fi.pixels,m):Fi.invalid(m)},im=(m,b,x)=>{const T=af.from(x),M=$t(m,B=>B==="0px")?((B,U)=>{const K=B.fold(()=>ut(""),re=>ut(re/U+"px"),()=>ut(100/U+"%"));return Gt(U,K)})(T,m.length):((B,U,K)=>B.fold(()=>U,re=>((he,Se,me)=>{const be=me/Se;return D(he,_e=>af.from(_e).fold(()=>_e,De=>De*be+"px",De=>De/100*me+"px"))})(U,K,re),re=>((he,Se)=>D(he,me=>af.from(me).fold(()=>me,be=>be/Se*100+"%",be=>be+"%")))(U,K)))(T,m,b);return q1(M)},ry=(m,b)=>m.length===0?b:qo(m,(x,T)=>af.from(T).fold(ut(0),Lt,Lt)+x,0),S_=(m,b)=>af.from(m).fold(ut(m),x=>x+b+"px",x=>x+b+"%"),q1=m=>{if(m.length===0)return m;const b=qo(m,(T,M)=>{const B=af.from(M).fold(()=>({value:M,remainder:0}),U=>((K,re)=>{const he=Math.floor(K);return{value:he+"px",remainder:K-he}})(U),U=>({value:U+"%",remainder:0}));return{output:[B.value].concat(T.output),remainder:T.remainder+B.remainder}},{output:[],remainder:0}),x=b.output;return x.slice(0,x.length-1).concat([S_(x[x.length-1],Math.round(b.remainder))])},lm=af.from,As=(m,b,x)=>{const T=rn(m),M=T.all,B=so(T),U=kl(T);b.each(K=>{const re=lm(K).fold(ut("px"),ut("px"),ut("%")),he=ki(m),Se=((be,_e)=>_r(be,_e,Ua,Uf))(T,m),me=im(Se,he,K);Cl(T)?((be,_e,De)=>{bt(_e,(Re,lt)=>{const ct=ry([be[lt]],Gr());pn(Re.element,"width",ct+De)})})(me,U,re):((be,_e,De)=>{bt(_e,Re=>{const lt=be.slice(Re.column,Re.colspan+Re.column),ct=ry(lt,Gr());pn(Re.element,"width",ct+De)})})(me,B,re),pn(m,"width",K)}),x.each(K=>{const re=yc(m),he=((Se,me)=>ca(Se,me,la,Uf))(T,m);((Se,me,be)=>{bt(be,_e=>{ri(_e.element,"height")}),bt(me,(_e,De)=>{pn(_e.element,"height",Se[De])})})(im(he,re,K),M,B),pn(m,"height",K)})},ay=m=>fl(m).exists(b=>Ur.test(b)),Ys=m=>fl(m).exists(b=>ho.test(b)),Id=m=>fl(m).isNone(),od=m=>{an(m,"width"),an(m,"height")},hp=m=>{const b=Od(m);As(m,ve.some(b),ve.none()),od(m)},el=m=>{const b=(x=>ki(x)+"px")(m);As(m,ve.some(b),ve.none()),od(m)},Ga=m=>{ri(m,"width");const b=Na(m),x=b.length>0?b:Ds(m);bt(x,T=>{ri(T,"width"),od(T)}),od(m)},cm={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},wh=(m,b,x,T)=>Gt(m,M=>((B,U,K,re)=>{const he=vt.fromTag("tr");for(let Se=0;Se{m.selection.select(b.dom,!0),m.selection.collapse(!0)},kh=(m,b,x,T,M)=>{const B=(K=>{const re=K.options,he=re.get("table_default_styles");return re.isSet("table_default_styles")?he:((Se,me)=>P(Se)||!ge(Se)?me:E(Se)?{...me,width:ci(Se)}:{...me,width:Si})(K,he)})(m),U={styles:B,attributes:at(m),colGroups:xo(m)};return m.undoManager.ignore(()=>{const K=((he,Se,me,be,_e,De=cm)=>{const Re=vt.fromTag("table"),lt=_e!=="cells";$l(Re,De.styles),ra(Re,De.attributes),De.colGroups&&zs(Re,(Nt=>{const Pt=vt.fromTag("colgroup");return Gt(Nt,()=>zs(Pt,vt.fromTag("col"))),Pt})(Se));const ct=Math.min(he,me);if(lt&&me>0){const Nt=vt.fromTag("thead");zs(Re,Nt);const Pt=wh(me,Se,_e==="sectionCells"?ct:0,be);qi(Nt,Pt)}const it=vt.fromTag("tbody");zs(Re,it);const gt=wh(lt?he-ct:he,Se,lt?0:me,be);return qi(it,gt),Re})(x,b,M,T,Jl(m),U);yn(K,"data-mce-id","__mce");const re=(he=>{const Se=vt.fromTag("div"),me=vt.fromDom(he.dom.cloneNode(!0));return zs(Se,me),(be=>be.dom.innerHTML)(Se)})(K);m.insertContent(re),m.addVisual()}),Vs(Wn(m),'table[data-mce-id="__mce"]').map(K=>(E(m)?el(K):P(m)?Ga(K):(Ec(m)||(re=>W(re)&&re.indexOf("%")!==-1)(B.width))&&hp(K),Ws(K),an(K,"data-mce-id"),((re,he)=>{bt(Yn(he,"tr"),Se=>{Z1(re,Se.dom),bt(Yn(Se,"th,td"),me=>{xh(re,me.dom)})})})(m,K),((re,he)=>{Vs(he,"td,th").each(Ke(bp,re))})(m,K),K.dom)).getOrNull()};var yp=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const E_="x-tinymce/dom-table-",K1=E_+"rows",G1=E_+"columns",A_=m=>{const b=yp.FakeClipboardItem(m);yp.write([b])},Ya=m=>{var b;const x=(b=yp.read())!==null&&b!==void 0?b:[];return j(x,T=>ve.from(T.getType(m)))},dm=m=>{Ya(m).isSome()&&yp.clear()},T_=m=>{m.fold(Hi,b=>A_({[K1]:b}))},Rc=()=>Ya(K1),Hi=()=>dm(K1),vp=m=>{m.fold(O_,b=>A_({[G1]:b}))},mg=()=>Ya(G1),O_=()=>dm(G1),mr=m=>Ld(zl(m),sr(m)).filter(sg),pr=(m,b)=>{const x=sr(m),T=me=>Q(me,x),M=me=>(be=>Hs(zl(be),sr(be)).filter(sg))(m).bind(be=>T(be).map(_e=>me(_e,be))),B=me=>{m.focus()},U=(me,be=!1)=>M((_e,De)=>{const Re=Qo(Dl(m),_e,De);me(_e,Re,be).each(B)}),K=()=>M((me,be)=>((_e,De,Re)=>{const lt=rn(_e);return ea(lt,De).bind(ct=>{const it=At(lt,Re,!1),gt=_s(it).rows.slice(ct[0].row,ct[ct.length-1].row+ct[ct.length-1].rowspan),Nt=pt(gt,Le=>{const Jt=Kt(Le.cells,To=>!To.isLocked);return Jt.length>0?[{...Le,cells:Jt}]:[]}),Pt=Bo(Nt);return Vr(Pt.length>0,Pt)}).map(ct=>D(ct,it=>{const gt=au(it.element);return bt(it.cells,Nt=>{const Pt=pc(Nt.element);Z(Pt,"colspan",Nt.colspan,1),Z(Pt,"rowspan",Nt.rowspan,1),zs(gt,Pt)}),gt}))})(me,Qo(Dl(m),me,be),xs(st,vt.fromDom(m.getDoc()),ve.none()))),re=()=>M((me,be)=>((_e,De)=>{const Re=rn(_e);return qs(Re,De).map(lt=>{const ct=lt[lt.length-1],it=lt[0].column,gt=ct.column+ct.colspan,Nt=((Le,Jt,To)=>{if(Cl(Le)){const Xo=Kt(kl(Le),La(Jt,To)),Io=D(Xo,Yo=>{const zn=pc(Yo.element);return sy(zn,"span",To-Jt),zn}),Oo=vt.fromTag("colgroup");return qi(Oo,Io),[Oo]}return[]})(Re,it,gt),Pt=((Le,Jt,To)=>D(Le.all,Xo=>{const Io=Kt(Xo.cells,La(Jt,To)),Oo=D(Io,zn=>{const Br=pc(zn.element);return sy(Br,"colspan",To-Jt),Br}),Yo=vt.fromTag("tr");return qi(Yo,Oo),Yo}))(Re,it,gt);return[...Nt,...Pt]})})(me,Qo(Dl(m),me,be))),he=(me,be)=>be().each(_e=>{const De=D(_e,Re=>pc(Re));M((Re,lt)=>{const ct=Jn(vt.fromDom(m.getDoc())),it=((gt,Nt,Pt,Le)=>({selection:Rd(gt),clipboard:Pt,generators:Le}))(Dl(m),0,De,ct);me(Re,it).each(B)})}),Se=me=>(be,_e)=>((De,Re)=>dn(De,Re)?ve.from(De[Re]):ve.none())(_e,"type").each(De=>{U(me(De),_e.no_events)});Sn({mceTableSplitCells:()=>U(b.unmergeCells),mceTableMergeCells:()=>U(b.mergeCells),mceTableInsertRowBefore:()=>U(b.insertRowsBefore),mceTableInsertRowAfter:()=>U(b.insertRowsAfter),mceTableInsertColBefore:()=>U(b.insertColumnsBefore),mceTableInsertColAfter:()=>U(b.insertColumnsAfter),mceTableDeleteCol:()=>U(b.deleteColumn),mceTableDeleteRow:()=>U(b.deleteRow),mceTableCutCol:()=>re().each(me=>{vp(me),U(b.deleteColumn)}),mceTableCutRow:()=>K().each(me=>{T_(me),U(b.deleteRow)}),mceTableCopyCol:()=>re().each(me=>vp(me)),mceTableCopyRow:()=>K().each(me=>T_(me)),mceTablePasteColBefore:()=>he(b.pasteColsBefore,mg),mceTablePasteColAfter:()=>he(b.pasteColsAfter,mg),mceTablePasteRowBefore:()=>he(b.pasteRowsBefore,Rc),mceTablePasteRowAfter:()=>he(b.pasteRowsAfter,Rc),mceTableDelete:()=>mr(m).each(me=>{Q(me,x).filter(Ut(x)).each(be=>{const _e=vt.fromText("");if(Dr(be,_e),ys(be),m.dom.isEmpty(m.getBody()))m.setContent(""),m.selection.setCursorLocation();else{const De=m.dom.createRng();De.setStart(_e.dom,0),De.setEnd(_e.dom,0),m.selection.setRng(De),m.nodeChanged()}})}),mceTableCellToggleClass:(me,be)=>{M(_e=>{const De=Dl(m),Re=$t(De,ct=>m.formatter.match("tablecellclass",{value:be},ct.dom)),lt=Re?m.formatter.remove:m.formatter.apply;bt(De,ct=>lt("tablecellclass",{value:be},ct.dom)),Cu(m,_e.dom,ny)})},mceTableToggleClass:(me,be)=>{M(_e=>{m.formatter.toggle("tableclass",{value:be},_e.dom),Cu(m,_e.dom,ny)})},mceTableToggleCaption:()=>{mr(m).each(me=>{Q(me,x).each(be=>{vl(be,"caption").fold(()=>{const _e=vt.fromTag("caption");zs(_e,vt.fromText("Caption")),((De,Re,lt)=>{hd(De,0).fold(()=>{zs(De,Re)},ct=>{Vt(ct,Re)})})(be,_e),m.selection.setCursorLocation(_e.dom,0)},_e=>{os("caption")(me)&&Ri("td",be).each(De=>m.selection.setCursorLocation(De.dom,0)),ys(_e)}),Cu(m,be.dom,ta)})})},mceTableSizingMode:(me,be)=>(_e=>mr(m).each(De=>{P(m)||E(m)||Ec(m)||Q(De,x).each(Re=>{_e!=="relative"||ay(Re)?_e!=="fixed"||Ys(Re)?_e!=="responsive"||Id(Re)||Ga(Re):el(Re):hp(Re),Ws(Re),Cu(m,Re.dom,ta)})}))(be),mceTableCellType:Se(me=>me==="th"?b.makeCellsHeader:b.unmakeCellsHeader),mceTableColType:Se(me=>me==="th"?b.makeColumnsHeader:b.unmakeColumnsHeader),mceTableRowType:Se(me=>{switch(me){case"header":return b.makeRowsHeader;case"footer":return b.makeRowsFooter;default:return b.makeRowsBody}})},(me,be)=>m.addCommand(be,me)),m.addCommand("mceInsertTable",(me,be)=>{((_e,De,Re,lt={})=>{const ct=it=>mo(it)&&it>0;if(ct(De)&&ct(Re)){const it=lt.headerRows||0,gt=lt.headerColumns||0;return kh(_e,Re,De,gt,it)}console.error("Invalid values for mceInsertTable - rows and columns values are required to insert a table.")})(m,be.rows,be.columns,be.options)}),m.addCommand("mceTableApplyCellStyle",(me,be)=>{const _e=lt=>"tablecell"+lt.toLowerCase().replace("-","");if(!te(be))return;const De=Kt(Dl(m),sg);if(De.length===0)return;const Re=((lt,ct)=>{const it={};return((gt,Nt,Pt,Le)=>{Sn(gt,(Jt,To)=>{(Nt(Jt,To)?Pt:Le)(Jt,To)})})(lt,ct,(gt=>(Nt,Pt)=>{gt[Pt]=Nt})(it),st),it})(be,(lt,ct)=>m.formatter.has(_e(ct))&&W(lt));(lt=>{for(const ct in lt)if(Cs.call(lt,ct))return!1;return!0})(Re)||(Sn(Re,(lt,ct)=>{const it=_e(ct);bt(De,gt=>{lt===""?m.formatter.remove(it,{value:null},gt.dom,!0):m.formatter.apply(it,{value:lt},gt.dom)})}),T(De[0]).each(lt=>Cu(m,lt.dom,ny)))})},Lr=sm([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),us={before:Lr.before,on:Lr.on,after:Lr.after,cata:(m,b,x,T)=>m.fold(b,x,T),getStart:m=>m.fold(Lt,Lt,Lt)},ir=(m,b)=>({selection:m,kill:b}),Ar=(m,b)=>{const x=m.document.createRange();return x.selectNode(b.dom),x},iy=(m,b)=>{const x=m.document.createRange();return ly(x,b),x},ly=(m,b)=>m.selectNodeContents(b.dom),Y1=(m,b,x)=>{const T=m.document.createRange();var M;return M=T,b.fold(B=>{M.setStartBefore(B.dom)},(B,U)=>{M.setStart(B.dom,U)},B=>{M.setStartAfter(B.dom)}),((B,U)=>{U.fold(K=>{B.setEndBefore(K.dom)},(K,re)=>{B.setEnd(K.dom,re)},K=>{B.setEndAfter(K.dom)})})(T,x),T},Ch=(m,b,x,T,M)=>{const B=m.document.createRange();return B.setStart(b.dom,x),B.setEnd(T.dom,M),B},X1=m=>({left:m.left,top:m.top,right:m.right,bottom:m.bottom,width:m.width,height:m.height}),_p=sm([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),cy=(m,b,x)=>b(vt.fromDom(x.startContainer),x.startOffset,vt.fromDom(x.endContainer),x.endOffset),dy=(m,b)=>{const x=((T,M)=>M.match({domRange:B=>({ltr:ut(B),rtl:ve.none}),relative:(B,U)=>({ltr:Go(()=>Y1(T,B,U)),rtl:Go(()=>ve.some(Y1(T,U,B)))}),exact:(B,U,K,re)=>({ltr:Go(()=>Ch(T,B,U,K,re)),rtl:Go(()=>ve.some(Ch(T,K,re,B,U)))})}))(m,b);return((T,M)=>{const B=M.ltr();return B.collapsed?M.rtl().filter(U=>U.collapsed===!1).map(U=>_p.rtl(vt.fromDom(U.endContainer),U.endOffset,vt.fromDom(U.startContainer),U.startOffset)).getOrThunk(()=>cy(0,_p.ltr,B)):cy(0,_p.ltr,B)})(0,x)},J1=(m,b)=>dy(m,b).match({ltr:(x,T,M,B)=>{const U=m.document.createRange();return U.setStart(x.dom,T),U.setEnd(M.dom,B),U},rtl:(x,T,M,B)=>{const U=m.document.createRange();return U.setStart(M.dom,B),U.setEnd(x.dom,T),U}});_p.ltr,_p.rtl;const Sh=(m,b,x,T)=>({start:m,soffset:b,finish:x,foffset:T}),tl=(m,b,x,T)=>({start:us.on(m,b),finish:us.on(x,T)}),Q1=(m,b)=>{const x=J1(m,b);return Sh(vt.fromDom(x.startContainer),x.startOffset,vt.fromDom(x.endContainer),x.endOffset)},Ei=tl,Eh=(m,b,x,T,M)=>as(x,T)?ve.none():Ql(x,T,b).bind(B=>{const U=B.boxes.getOr([]);return U.length>1?(M(m,U,B.start,B.finish),ve.some(ir(ve.some(Ei(x,0,x,ur(x))),!0))):ve.none()}),xp=(m,b)=>({item:m,mode:b}),nd=(m,b,x,T=Tr)=>m.property().parent(b).map(M=>xp(M,T)),Tr=(m,b,x,T=um)=>x.sibling(m,b).map(M=>xp(M,T)),um=(m,b,x,T=um)=>{const M=m.property().children(b);return x.first(M).map(B=>xp(B,T))},e0=[{current:nd,next:Tr,fallback:ve.none()},{current:Tr,next:um,fallback:ve.some(nd)},{current:um,next:um,fallback:ve.some(Tr)}],t0=(m,b,x,T,M=e0)=>Ao(M,B=>B.current===x).bind(B=>B.current(m,b,T,B.next).orThunk(()=>B.fallback.bind(U=>t0(m,b,U,T)))),Ah=(m,b,x,T,M,B)=>t0(m,b,T,M).bind(U=>B(U.item)?ve.none():x(U.item)?ve.some(U.item):Ah(m,U.item,x,U.mode,M,B)),Su=m=>b=>m.property().children(b).length===0,Uk=(m,b,x,T)=>Ah(m,b,x,Tr,{sibling:(M,B)=>M.query().prevSibling(B),first:M=>M.length>0?ve.some(M[M.length-1]):ve.none()},T),Th=(m,b,x,T)=>Ah(m,b,x,Tr,{sibling:(M,B)=>M.query().nextSibling(B),first:M=>M.length>0?ve.some(M[0]):ve.none()},T),fm=Ac(),z_=(m,b)=>((x,T,M)=>Uk(x,T,Su(x),M))(fm,m,b),Oh=(m,b)=>((x,T,M)=>Th(x,T,Su(x),M))(fm,m,b),zh=sm([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),uy=m=>Pn(m,"tr"),pg={...zh,verify:(m,b,x,T,M,B,U)=>Pn(T,"td,th",U).bind(K=>Pn(b,"td,th",U).map(re=>as(K,re)?as(T,K)&&ur(K)===M?B(re):zh.none("in same cell"):Nd(uy,[K,re]).fold(()=>((he,Se,me)=>{const be=he.getRect(Se),_e=he.getRect(me);return _e.right>be.left&&_e.leftB(re)))).getOr(zh.none("default")),cata:(m,b,x,T,M)=>m.fold(b,x,T,M)},fy=os("br"),Ai=(m,b,x)=>b(m,x).bind(T=>Bn(T)&&pu(T).trim().length===0?Ai(T,b,x):ve.some(T)),o0=(m,b,x,T)=>((M,B)=>hd(M,B).filter(fy).orThunk(()=>hd(M,B-1).filter(fy)))(b,x).bind(M=>T.traverse(M).fold(()=>Ai(M,T.gather,m).map(T.relative),B=>(U=>yi(U).bind(K=>{const re=Hr(K);return((he,Se)=>Cr(he,Ke(as,Se)))(re,U).map(he=>((Se,me,be,_e)=>({parent:Se,children:me,element:be,index:_e}))(K,re,U,he))}))(B).map(U=>us.on(U.parent,U.index)))),Eu=(m,b)=>({left:m.left,top:m.top+b,right:m.right,bottom:m.bottom+b}),Nh=(m,b)=>({left:m.left,top:m.top-b,right:m.right,bottom:m.bottom-b}),Fd=(m,b,x)=>({left:m.left+b,top:m.top+x,right:m.right+b,bottom:m.bottom+x}),Dh=m=>({left:m.left,top:m.top,right:m.right,bottom:m.bottom}),Rh=(m,b)=>ve.some(m.getRect(b)),mm=(m,b,x)=>Zn(b)?Rh(m,b).map(Dh):Bn(b)?((T,M,B)=>B>=0&&B0?T.getRangedRect(M,B-1,M,B):ve.none())(m,b,x).map(Dh):ve.none(),wp=(m,b)=>Zn(b)?Rh(m,b).map(Dh):Bn(b)?m.getRangedRect(b,0,b,ur(b)).map(Dh):ve.none(),Mc=sm([{none:[]},{retry:["caret"]}]),Mh=(m,b,x)=>gc(b,up).fold(ue,T=>wp(m,T).exists(M=>((B,U)=>B.leftU.right)(x,M))),Zk={point:m=>m.bottom,adjuster:(m,b,x,T,M)=>{const B=Eu(M,5);return Math.abs(x.bottom-T.bottom)<1||x.top>M.bottom?Mc.retry(B):x.top===M.bottom?Mc.retry(Eu(M,1)):Mh(m,b,M)?Mc.retry(Fd(B,5,0)):Mc.none()},move:Eu,gather:Oh},nc=(m,b,x,T,M)=>M===0?ve.some(T):((B,U,K)=>B.elementFromPoint(U,K).filter(re=>ao(re)==="table").isSome())(m,T.left,b.point(T))?((B,U,K,re,he)=>nc(B,U,K,U.move(re,5),he))(m,b,x,T,M-1):m.situsFromPoint(T.left,b.point(T)).bind(B=>B.start.fold(ve.none,U=>wp(m,U).bind(K=>b.adjuster(m,U,K,x,T).fold(ve.none,re=>nc(m,b,x,re,M-1))).orThunk(()=>ve.some(T)),ve.none)),Au=(m,b,x)=>{const T=m.move(x,5),M=nc(b,m,x,T,100).getOr(T);return((B,U,K)=>B.point(U)>K.getInnerHeight()?ve.some(B.point(U)-K.getInnerHeight()):B.point(U)<0?ve.some(-B.point(U)):ve.none())(m,M,b).fold(()=>b.situsFromPoint(M.left,m.point(M)),B=>(b.scrollBy(0,B),b.situsFromPoint(M.left,m.point(M)-B)))},Lc={tryUp:Ke(Au,{point:m=>m.top,adjuster:(m,b,x,T,M)=>{const B=Nh(M,5);return Math.abs(x.top-T.top)<1||x.bottomm.getSelection().bind(T=>((M,B,U,K)=>(fy(B)?((he,Se,me)=>me.traverse(Se).orThunk(()=>Ai(Se,me.gather,he)).map(me.relative))(M,B,K):o0(M,B,U,K)).map(he=>({start:he,finish:he})))(b,T.finish,T.foffset,x).fold(()=>ve.some($o(T.finish,T.foffset)),M=>{const B=m.fromSitus(M);return U=pg.verify(m,T.finish,T.foffset,B.finish,B.foffset,x.failure,b),pg.cata(U,K=>ve.none(),()=>ve.none(),K=>ve.some($o(K,0)),K=>ve.some($o(K,ur(K))));var U})),ua=(m,b,x,T,M,B)=>B===0?ve.none():Wk(m,b,x,T,M).bind(U=>{const K=m.fromSitus(U),re=pg.verify(m,x,T,K.finish,K.foffset,M.failure,b);return pg.cata(re,()=>ve.none(),()=>ve.some(U),he=>as(x,he)&&T===0?Bc(m,x,T,Nh,M):ua(m,b,he,0,M,B-1),he=>as(x,he)&&T===ur(he)?Bc(m,x,T,Eu,M):ua(m,b,he,ur(he),M,B-1))}),Bc=(m,b,x,T,M)=>mm(m,b,x).bind(B=>ol(m,M,T(B,Lc.getJumpSize()))),ol=(m,b,x)=>{const T=Ul().browser;return T.isChromium()||T.isSafari()||T.isFirefox()?b.retry(m,x):ve.none()},Wk=(m,b,x,T,M)=>mm(m,x,T).bind(B=>ol(m,M,B)),lf=(m,b,x,T,M)=>Pn(T,"td,th",b).bind(B=>Pn(B,"table",b).bind(U=>((K,re)=>Gi(K,he=>yi(he).exists(Se=>as(Se,re)),void 0).isSome())(M,U)?((K,re,he)=>n0(K,re,he).bind(Se=>ua(K,re,Se.element,Se.offset,he,20).map(K.fromSitus)))(m,b,x).bind(K=>Pn(K.finish,"td,th",b).map(re=>({start:B,finish:re,range:K}))):ve.none())),Tu=(m,b,x,T,M,B)=>B(T,b).orThunk(()=>lf(m,b,x,T,M).map(U=>{const K=U.range;return ir(ve.some(Ei(K.start,K.soffset,K.finish,K.foffset)),!0)})),gg=(m,b)=>Pn(m,"tr",b).bind(x=>Pn(x,"table",b).bind(T=>{const M=Yn(T,"tr");return as(x,M[0])?((B,U,K)=>Uk(fm,B,re=>Xl(re).isSome(),K))(T,0,b).map(B=>{const U=ur(B);return ir(ve.some(Ei(B,U,B,U)),!0)}):ve.none()})),pm=(m,b)=>Pn(m,"tr",b).bind(x=>Pn(x,"table",b).bind(T=>{const M=Yn(T,"tr");return as(x,M[M.length-1])?((B,U,K)=>Th(fm,B,re=>Xu(re).isSome(),K))(T,0,b).map(B=>ir(ve.some(Ei(B,0,B,0)),!0)):ve.none()})),Bl=(m,b,x,T,M,B,U)=>lf(m,x,T,M,B).bind(K=>Eh(b,x,K.start,K.finish,U)),my=m=>{let b=m;return{get:()=>b,set:x=>{b=x}}},py=()=>{const m=(b=>{const x=my(ve.none()),T=()=>x.get().each(b);return{clear:()=>{T(),x.set(ve.none())},isSet:()=>x.get().isSome(),get:()=>x.get(),set:M=>{T(),x.set(ve.some(M))}}})(st);return{...m,on:b=>m.get().each(b)}},Lh=(m,b)=>Pn(m,"td,th",b),gy=m=>yl(m).exists(Lo),N_={traverse:Ha,gather:Oh,relative:us.before,retry:Lc.tryDown,failure:pg.failedDown},Bh={traverse:Ro,gather:z_,relative:us.before,retry:Lc.tryUp,failure:pg.failedUp},Ou=m=>b=>b===m,Ph=Ou(38),kp=Ou(40),Cp=m=>m>=37&&m<=40,cf={isBackward:Ou(37),isForward:Ou(39)},df={isBackward:Ou(39),isForward:Ou(37)},Ih=sm([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),uf={domRange:Ih.domRange,relative:Ih.relative,exact:Ih.exact,exactFromRange:m=>Ih.exact(m.start,m.soffset,m.finish,m.foffset),getWin:m=>{const b=(x=>x.match({domRange:T=>vt.fromDom(T.startContainer),relative:(T,M)=>us.getStart(T),exact:(T,M,B,U)=>T}))(m);return vt.fromDom(Mi(b).dom.defaultView)},range:Sh},ff=(m,b)=>{const x=ao(m);return x==="input"?us.after(m):uo(["br","img"],x)?b===0?us.before(m):us.after(m):us.on(m,b)},mf=m=>ve.from(m.getSelection()),Sp=(m,b)=>{mf(m).each(x=>{x.removeAllRanges(),x.addRange(b)})},hy=(m,b,x,T,M)=>{const B=Ch(m,b,x,T,M);Sp(m,B)},hg=(m,b)=>dy(m,b).match({ltr:(x,T,M,B)=>{hy(m,x,T,M,B)},rtl:(x,T,M,B)=>{mf(m).each(U=>{if(U.setBaseAndExtent)U.setBaseAndExtent(x.dom,T,M.dom,B);else if(U.extend)try{((K,re,he,Se,me,be)=>{re.collapse(he.dom,Se),re.extend(me.dom,be)})(0,U,x,T,M,B)}catch{hy(m,M,B,x,T)}else hy(m,M,B,x,T)})}}),by=(m,b,x,T,M)=>{const B=((U,K,re,he)=>{const Se=ff(U,K),me=ff(re,he);return uf.relative(Se,me)})(b,x,T,M);hg(m,B)},s0=(m,b,x)=>{const T=((M,B)=>{const U=M.fold(us.before,ff,us.after),K=B.fold(us.before,ff,us.after);return uf.relative(U,K)})(b,x);hg(m,T)},bg=m=>{if(m.rangeCount>0){const b=m.getRangeAt(0),x=m.getRangeAt(m.rangeCount-1);return ve.some(Sh(vt.fromDom(b.startContainer),b.startOffset,vt.fromDom(x.endContainer),x.endOffset))}return ve.none()},fa=m=>{if(m.anchorNode===null||m.focusNode===null)return bg(m);{const b=vt.fromDom(m.anchorNode),x=vt.fromDom(m.focusNode);return((T,M,B,U)=>{const K=((he,Se,me,be)=>{const _e=ll(he).dom.createRange();return _e.setStart(he.dom,Se),_e.setEnd(me.dom,be),_e})(T,M,B,U),re=as(T,B)&&M===U;return K.collapsed&&!re})(b,m.anchorOffset,x,m.focusOffset)?ve.some(Sh(b,m.anchorOffset,x,m.focusOffset)):bg(m)}},r0=(m,b,x=!0)=>{const T=(x?iy:Ar)(m,b);Sp(m,T)},D_=m=>(b=>mf(b).filter(x=>x.rangeCount>0).bind(fa))(m).map(b=>uf.exact(b.start,b.soffset,b.finish,b.foffset)),a0=(m,b,x)=>((T,M,B)=>((U,K,re)=>U.caretPositionFromPoint?((he,Se,me)=>{var be;return ve.from((be=he.caretPositionFromPoint)===null||be===void 0?void 0:be.call(he,Se,me)).bind(_e=>{if(_e.offsetNode===null)return ve.none();const De=he.createRange();return De.setStart(_e.offsetNode,_e.offset),De.collapse(),ve.some(De)})})(U,K,re):U.caretRangeFromPoint?((he,Se,me)=>{var be;return ve.from((be=he.caretRangeFromPoint)===null||be===void 0?void 0:be.call(he,Se,me))})(U,K,re):ve.none())(T.document,M,B).map(U=>Sh(vt.fromDom(U.startContainer),U.startOffset,vt.fromDom(U.endContainer),U.endOffset)))(m,b,x),i0=m=>({elementFromPoint:(b,x)=>vt.fromPoint(vt.fromDom(m.document),b,x),getRect:b=>b.dom.getBoundingClientRect(),getRangedRect:(b,x,T,M)=>{const B=uf.exact(b,x,T,M);return((U,K)=>(re=>{const he=re.getClientRects(),Se=he.length>0?he[0]:re.getBoundingClientRect();return Se.width>0||Se.height>0?ve.some(Se).map(X1):ve.none()})(J1(U,K)))(m,B)},getSelection:()=>D_(m).map(b=>Q1(m,b)),fromSitus:b=>{const x=uf.relative(b.start,b.finish);return Q1(m,x)},situsFromPoint:(b,x)=>a0(m,b,x).map(T=>tl(T.start,T.soffset,T.finish,T.foffset)),clearSelection:()=>{(b=>{mf(b).each(x=>x.removeAllRanges())})(m)},collapseSelection:(b=!1)=>{D_(m).each(x=>x.fold(T=>T.collapse(b),(T,M)=>{const B=b?T:M;s0(m,B,B)},(T,M,B,U)=>{const K=b?T:B,re=b?M:U;by(m,K,re,K,re)}))},setSelection:b=>{by(m,b.start,b.soffset,b.finish,b.foffset)},setRelativeSelection:(b,x)=>{s0(m,b,x)},selectNode:b=>{r0(m,b,!1)},selectContents:b=>{r0(m,b)},getInnerHeight:()=>m.innerHeight,getScrollY:()=>(b=>{const x=b!==void 0?b.dom:document,T=x.body.scrollLeft||x.documentElement.scrollLeft,M=x.body.scrollTop||x.documentElement.scrollTop;return ja(T,M)})(vt.fromDom(m.document)).top,scrollBy:(b,x)=>{((T,M,B)=>{const U=(B!==void 0?B.dom:document).defaultView;U&&U.scrollBy(T,M)})(b,x,vt.fromDom(m.document))}}),pf=(m,b)=>({rows:m,cols:b}),yy=m=>gc(m,rs).exists(Lo),Fh=(m,b)=>yy(m)||yy(b),l0=m=>m.dom.classList!==void 0,qk=(m,b)=>((x,T,M)=>{const B=((U,K)=>{const re=St(U,K);return re===void 0||re===""?[]:re.split(" ")})(x,T).concat([M]);return yn(x,T,B.join(" ")),!0})(m,"class",b),gf=(m,b)=>{l0(m)?m.dom.classList.add(b):qk(m,b)},Hh=(m,b)=>l0(m)&&m.dom.classList.contains(b),R_=()=>({tag:"none"}),M_=m=>({tag:"multiple",elements:m}),sd=m=>({tag:"single",element:m}),c0=m=>{const b=vt.fromDom((K=>{if(Me(K.target)){const re=vt.fromDom(K.target);if(Zn(re)&&Me(re.dom.shadowRoot)&&K.composed&&K.composedPath){const he=K.composedPath();if(he)return fn(he)}}return ve.from(K.target)})(m).getOr(m.target)),x=()=>m.stopPropagation(),T=()=>m.preventDefault(),M=(B=T,U=x,(...K)=>B(U.apply(null,K)));var B,U;return((K,re,he,Se,me,be,_e)=>({target:K,x:re,y:he,stop:Se,prevent:me,kill:be,raw:_e}))(b,m.clientX,m.clientY,x,T,M,m)},vy=(m,b,x,T)=>{m.dom.removeEventListener(b,x,T)},L_=Ct,Ep=(m,b,x)=>((T,M,B,U)=>((K,re,he,Se,me)=>{const be=((_e,De)=>Re=>{_e(Re)&&De(c0(Re))})(he,Se);return K.dom.addEventListener(re,be,me),{unbind:Ke(vy,K,re,be,me)}})(T,M,B,U,!1))(m,b,L_,x),yg=c0,$h=m=>!Hh(vt.fromDom(m.target),"ephox-snooker-resizer-bar"),B_=(m,b)=>{const x=(M=Md.selectedSelector,{get:()=>Nl(vt.fromDom(m.getBody()),M).fold(()=>Hs(zl(m),sr(m)).fold(R_,sd),M_)}),T=((B,U,K)=>{const re=be=>{an(be,B.selected),an(be,B.firstSelected),an(be,B.lastSelected)},he=be=>{yn(be,B.selected,"1")},Se=be=>{me(be),K()},me=be=>{const _e=Yn(be,`${B.selectedSelector},${B.firstSelectedSelector},${B.lastSelectedSelector}`);bt(_e,re)};return{clearBeforeUpdate:me,clear:Se,selectRange:(be,_e,De,Re)=>{Se(be),bt(_e,he),yn(De,B.firstSelected,"1"),yn(Re,B.lastSelected,"1"),U(_e,De,Re)},selectedSelector:B.selectedSelector,firstSelectedSelector:B.firstSelectedSelector,lastSelectedSelector:B.lastSelectedSelector}})(Md,(B,U,K)=>{Q(U).each(re=>{const he=D(B,_e=>_e.dom),Se=Xi(m),me=xs(st,vt.fromDom(m.getDoc()),Se),be=((_e,De,Re)=>{const lt=rn(_e);return ea(lt,De).map(ct=>{const it=At(lt,Re,!1),{rows:gt}=_s(it),Nt=((Le,Jt)=>{const To=Le.slice(0,Jt[Jt.length-1].row+1),Xo=Bo(To);return pt(Xo,Io=>{const Oo=Io.cells.slice(0,Jt[Jt.length-1].column+1);return D(Oo,Yo=>Yo.element)})})(gt,ct),Pt=((Le,Jt)=>{const To=Le.slice(Jt[0].row+Jt[0].rowspan-1,Le.length),Xo=Bo(To);return pt(Xo,Io=>{const Oo=Io.cells.slice(Jt[0].column+Jt[0].colspan-1,Io.cells.length);return D(Oo,Yo=>Yo.element)})})(gt,ct);return{upOrLeftCells:Nt,downOrRightCells:Pt}})})(re,{selection:Dl(m)},me).map(_e=>hi(_e,De=>D(De,Re=>Re.dom))).getOrUndefined();((_e,De,Re,lt,ct)=>{_e.dispatch("TableSelectionChange",{cells:De,start:Re,finish:lt,otherCells:ct})})(m,he,U.dom,K.dom,be)})},()=>(B=>{B.dispatch("TableSelectionClear")})(m));var M;return m.on("init",B=>{const U=m.getWin(),K=Wn(m),re=sr(m),he=((Re,lt,ct,it)=>{const gt=((Nt,Pt,Le,Jt)=>{const To=py(),Xo=To.clear,Io=Oo=>{To.on(Yo=>{Jt.clearBeforeUpdate(Pt),Lh(Oo.target,Le).each(zn=>{Ql(Yo,zn,Le).each(Br=>{const fi=Br.boxes.getOr([]);if(fi.length===1){const Ba=fi[0],sc=io(Ba)==="false",ym=wi(Uo(Oo.target),Ba,as);sc&&ym&&Jt.selectRange(Pt,fi,Ba,Ba)}else fi.length>1&&(Jt.selectRange(Pt,fi,Br.start,Br.finish),Nt.selectContents(zn))})})})};return{clearstate:Xo,mousedown:Oo=>{Jt.clear(Pt),Lh(Oo.target,Le).filter(gy).each(To.set)},mouseover:Oo=>{Io(Oo)},mouseup:Oo=>{Io(Oo),Xo()}}})(i0(Re),lt,ct,it);return{clearstate:gt.clearstate,mousedown:gt.mousedown,mouseover:gt.mouseover,mouseup:gt.mouseup}})(U,K,re,T),Se=((Re,lt,ct,it)=>{const gt=i0(Re),Nt=()=>(it.clear(lt),ve.none());return{keydown:(Pt,Le,Jt,To,Xo,Io)=>{const Oo=Pt.raw,Yo=Oo.which,zn=Oo.shiftKey===!0;return Yf(lt,it.selectedSelector).fold(()=>(Cp(Yo)&&!zn&&it.clearBeforeUpdate(lt),Cp(Yo)&&zn&&!Fh(Le,To)?ve.none:kp(Yo)&&zn?Ke(Bl,gt,lt,ct,N_,To,Le,it.selectRange):Ph(Yo)&&zn?Ke(Bl,gt,lt,ct,Bh,To,Le,it.selectRange):kp(Yo)?Ke(Tu,gt,ct,N_,To,Le,pm):Ph(Yo)?Ke(Tu,gt,ct,Bh,To,Le,gg):ve.none),fi=>{const Ba=sc=>()=>j(sc,mi=>((Hd,_g,yf,xg,Ey)=>ka(xg,Hd,_g,Ey.firstSelectedSelector,Ey.lastSelectedSelector).map(vf=>(Ey.clearBeforeUpdate(yf),Ey.selectRange(yf,vf.boxes,vf.start,vf.finish),vf.boxes)))(mi.rows,mi.cols,lt,fi,it)).fold(()=>Dd(lt,it.firstSelectedSelector,it.lastSelectedSelector).map(mi=>{const Hd=kp(Yo)||Io.isForward(Yo)?us.after:us.before;return gt.setRelativeSelection(us.on(mi.first,0),Hd(mi.table)),it.clear(lt),ir(ve.none(),!0)}),mi=>ve.some(ir(ve.none(),!0)));return Cp(Yo)&&zn&&!Fh(Le,To)?ve.none:kp(Yo)&&zn?Ba([pf(1,0)]):Ph(Yo)&&zn?Ba([pf(-1,0)]):Io.isBackward(Yo)&&zn?Ba([pf(0,-1),pf(-1,0)]):Io.isForward(Yo)&&zn?Ba([pf(0,1),pf(1,0)]):Cp(Yo)&&!zn?Nt:ve.none})()},keyup:(Pt,Le,Jt,To,Xo)=>Yf(lt,it.selectedSelector).fold(()=>{const Io=Pt.raw,Oo=Io.which;return Io.shiftKey===!0&&Cp(Oo)&&Fh(Le,To)?((Yo,zn,Br,fi,Ba,sc,ym)=>as(Br,Ba)&&fi===sc?ve.none():Pn(Br,"td,th",zn).bind(mi=>Pn(Ba,"td,th",zn).bind(Hd=>Eh(Yo,zn,mi,Hd,ym))))(lt,ct,Le,Jt,To,Xo,it.selectRange):ve.none()},ve.none)}})(U,K,re,T),me=((Re,lt,ct,it)=>{const gt=i0(Re);return(Nt,Pt)=>{it.clearBeforeUpdate(lt),Ql(Nt,Pt,ct).each(Le=>{const Jt=Le.boxes.getOr([]);it.selectRange(lt,Jt,Le.start,Le.finish),gt.selectContents(Pt),gt.collapseSelection()})}})(U,K,re,T);m.on("TableSelectorChange",Re=>me(Re.start,Re.finish));const be=(Re,lt)=>{(ct=>ct.raw.shiftKey===!0)(Re)&&(lt.kill&&Re.kill(),lt.selection.each(ct=>{const it=uf.relative(ct.start,ct.finish),gt=J1(U,it);m.selection.setRng(gt)}))},_e=Re=>Re.button===0,De=(()=>{const Re=my(vt.fromDom(K)),lt=my(0);return{touchEnd:ct=>{const it=vt.fromDom(ct.target);if(os("td")(it)||os("th")(it)){const gt=Re.get(),Nt=lt.get();as(gt,it)&&ct.timeStamp-Nt<300&&(ct.preventDefault(),me(it,it))}Re.set(it),lt.set(ct.timeStamp)}}})();m.on("dragstart",Re=>{he.clearstate()}),m.on("mousedown",Re=>{_e(Re)&&$h(Re)&&he.mousedown(yg(Re))}),m.on("mouseover",Re=>{var lt;(lt=Re).buttons!==void 0&&!(1<.buttons)||!$h(Re)||he.mouseover(yg(Re))}),m.on("mouseup",Re=>{_e(Re)&&$h(Re)&&he.mouseup(yg(Re))}),m.on("touchend",De.touchEnd),m.on("keyup",Re=>{const lt=yg(Re);if(lt.raw.shiftKey&&Cp(lt.raw.which)){const ct=m.selection.getRng(),it=vt.fromDom(ct.startContainer),gt=vt.fromDom(ct.endContainer);Se.keyup(lt,it,ct.startOffset,gt,ct.endOffset).each(Nt=>{be(lt,Nt)})}}),m.on("keydown",Re=>{const lt=yg(Re);b.hide();const ct=m.selection.getRng(),it=vt.fromDom(ct.startContainer),gt=vt.fromDom(ct.endContainer),Nt=un(cf,df)(vt.fromDom(m.selection.getStart()));Se.keydown(lt,it,ct.startOffset,gt,ct.endOffset,Nt).each(Pt=>{be(lt,Pt)}),b.show()}),m.on("NodeChange",()=>{const Re=m.selection,lt=vt.fromDom(Re.getStart()),ct=vt.fromDom(Re.getEnd());Nd(Q,[lt,ct]).fold(()=>T.clear(K),st)})}),m.on("PreInit",()=>{m.serializer.addTempAttr(Md.firstSelected),m.serializer.addTempAttr(Md.lastSelected)}),{getSelectedCells:()=>((B,U,K,re)=>{switch(B.tag){case"none":return U();case"single":return(he=>[he.dom])(B.element);case"multiple":return(he=>D(he,Se=>Se.dom))(B.elements)}})(x.get(),ut([])),clearSelectedCells:B=>T.clear(vt.fromDom(B))}},rd=m=>{let b=[];return{bind:x=>{if(x===void 0)throw new Error("Event bind error: undefined handler");b.push(x)},unbind:x=>{b=Kt(b,T=>T!==x)},trigger:(...x)=>{const T={};bt(m,(M,B)=>{T[M]=x[B]}),bt(b,M=>{M(T)})}}},gm=m=>({registry:hi(m,b=>({bind:b.bind,unbind:b.unbind})),trigger:hi(m,b=>b.trigger)}),Vh=m=>m.slice(0).sort(),jh=(m,b)=>{const x=Kt(b,T=>!uo(m,T));x.length>0&&(T=>{throw new Error("Unsupported keys for object: "+Vh(T).join(", "))})(x)},_y=m=>((b,x)=>((T,M,B)=>{if(M.length===0)throw new Error("You must specify at least one required field.");return((U,K)=>{if(!ce(K))throw new Error("The "+U+" fields must be an array. Was: "+K+".");bt(K,re=>{if(!W(re))throw new Error("The value "+re+" in the "+U+" fields was not a string.")})})("required",M),(U=>{const K=Vh(U);Ao(K,(re,he)=>he{throw new Error("The field: "+re+" occurs more than once in the combined fields: ["+K.join(", ")+"].")})})(M),U=>{const K=Fr(U);$t(M,he=>uo(K,he))||((he,Se)=>{throw new Error("All required keys ("+Vh(he).join(", ")+") were not specified. Specified keys were: "+Vh(Se).join(", ")+".")})(M,K),T(M,K);const re=Kt(M,he=>!B.validate(U[he],he));return re.length>0&&((he,Se)=>{throw new Error("All values need to be of type: "+Se+". Keys ("+Vh(he).join(", ")+") were not.")})(re,B.label),U}})(b,x,{validate:Ot,label:"function"}))(jh,m),Uh=_y(["compare","extract","mutate","sink"]),Xa=_y(["element","start","stop","destroy"]),xy=_y(["forceDrop","drop","move","delayDrop"]),hm=()=>{const m=(()=>{const T=gm({move:rd(["info"])});return{onEvent:st,reset:st,events:T.registry}})(),b=(()=>{let T=ve.none();const M=gm({move:rd(["info"])});return{onEvent:(B,U)=>{U.extract(B).each(K=>{((he,Se)=>{const me=T.map(be=>he.compare(be,Se));return T=ve.some(Se),me})(U,K).each(he=>{M.trigger.move(he)})})},reset:()=>{T=ve.none()},events:M.registry}})();let x=m;return{on:()=>{x.reset(),x=b},off:()=>{x.reset(),x=m},isOn:()=>x===b,onEvent:(T,M)=>{x.onEvent(T,M)},events:b.events}},bm=m=>{const b=m.replace(/\./g,"-");return{resolve:x=>b+"-"+x}},Zh=bm("ephox-dragster").resolve;var wy=Uh({compare:(m,b)=>ja(b.left-m.left,b.top-m.top),extract:m=>ve.some(ja(m.x,m.y)),sink:(m,b)=>{const x=(K=>{const re={layerClass:Zh("blocker"),...K},he=vt.fromTag("div");return yn(he,"role","presentation"),$l(he,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),gf(he,Zh("blocker")),gf(he,re.layerClass),{element:ut(he),destroy:()=>{ys(he)}}})(b),T=Ep(x.element(),"mousedown",m.forceDrop),M=Ep(x.element(),"mouseup",m.drop),B=Ep(x.element(),"mousemove",m.move),U=Ep(x.element(),"mouseout",m.delayDrop);return Xa({element:x.element,start:K=>{zs(K,x.element())},stop:()=>{ys(x.element())},destroy:()=>{x.destroy(),M.unbind(),B.unbind(),U.unbind(),T.unbind()}})},mutate:(m,b)=>{m.mutate(b.left,b.top)}});const Ap=bm("ephox-snooker").resolve,hf=Ap("resizer-bar"),d0=Ap("resizer-rows"),ky=Ap("resizer-cols"),$i=m=>{const b=Yn(m.parent(),"."+hf);bt(b,ys)},bf=(m,b,x)=>{const T=m.origin();bt(b,M=>{M.each(B=>{const U=x(T,B);gf(U,hf),zs(m.parent(),U)})})},u0=(m,b,x,T,M)=>{const B=Ad(x),U=b.isResizable,K=T.length>0?vc.positions(T,x):[],re=K.length>0?((me,be)=>pt(me.all,(_e,De)=>be(_e.element)?[De]:[]))(m,U):[];((me,be,_e,De)=>{bf(me,be,(Re,lt)=>{const ct=((it,gt,Nt,Pt,Le)=>{const Jt=vt.fromTag("div");return $l(Jt,{position:"absolute",left:gt+"px",top:Nt-3.5+"px",height:"7px",width:Pt+"px"}),ra(Jt,{"data-row":it,role:"presentation"}),Jt})(lt.row,_e.left-Re.left,lt.y-Re.top,De);return gf(ct,d0),ct})})(b,Kt(K,(me,be)=>Fe(re,_e=>be===_e)),B,Cd(x));const he=M.length>0?Td.positions(M,x):[],Se=he.length>0?((me,be)=>{const _e=[];return Gt(me.grid.columns,De=>{Nn(me,De).map(Re=>Re.element).forall(be)&&_e.push(De)}),Kt(_e,De=>{const Re=jr(me,lt=>lt.column===De);return $t(Re,lt=>be(lt.element))})})(m,U):[];((me,be,_e,De)=>{bf(me,be,(Re,lt)=>{const ct=((it,gt,Nt,Pt,Le)=>{const Jt=vt.fromTag("div");return $l(Jt,{position:"absolute",left:gt-3.5+"px",top:Nt+"px",height:Le+"px",width:"7px"}),ra(Jt,{"data-column":it,role:"presentation"}),Jt})(lt.col,lt.x-Re.left,_e.top-Re.top,0,De);return gf(ct,ky),ct})})(b,Kt(he,(me,be)=>Fe(Se,_e=>be===_e)),B,Vf(x))},Ue=(m,b)=>{if($i(m),m.isResizable(b)){const x=rn(b),T=ql(x),M=cu(x);u0(x,m,b,T,M)}},vg=(m,b)=>{const x=Yn(m.parent(),"."+hf);bt(x,b)},Kk=m=>{vg(m,b=>{pn(b,"display","none")})},P_=m=>{vg(m,b=>{pn(b,"display","block")})},Cy=Ap("resizer-bar-dragging"),ad=m=>{const b=(()=>{const me=gm({drag:rd(["xDelta","yDelta","target"])});let be=ve.none();const _e=(()=>{const De=gm({drag:rd(["xDelta","yDelta"])});return{mutate:(Re,lt)=>{De.trigger.drag(Re,lt)},events:De.registry}})();return _e.events.drag.bind(De=>{be.each(Re=>{me.trigger.drag(De.xDelta,De.yDelta,Re)})}),{assign:De=>{be=ve.some(De)},get:()=>be,mutate:_e.mutate,events:me.registry}})(),x=((me,be={})=>{var _e;return((De,Re,lt)=>{let ct=!1;const it=gm({start:rd([]),stop:rd([])}),gt=hm(),Nt=()=>{Jt.stop(),gt.isOn()&&(gt.off(),it.trigger.stop())},Pt=((To,Xo)=>{let Io=null;const Oo=()=>{Ee(Io)||(clearTimeout(Io),Io=null)};return{cancel:Oo,throttle:(...Yo)=>{Oo(),Io=setTimeout(()=>{Io=null,To.apply(null,Yo)},200)}}})(Nt);gt.events.move.bind(To=>{Re.mutate(De,To.info)});const Le=To=>(...Xo)=>{ct&&To.apply(null,Xo)},Jt=Re.sink(xy({forceDrop:Nt,drop:Le(Nt),move:Le(To=>{Pt.cancel(),gt.onEvent(To,Re)}),delayDrop:Le(Pt.throttle)}),lt);return{element:Jt.element,go:To=>{Jt.start(To),gt.on(),it.trigger.start()},on:()=>{ct=!0},off:()=>{ct=!1},isActive:()=>ct,destroy:()=>{Jt.destroy()},events:it.registry}})(me,(_e=be.mode)!==null&&_e!==void 0?_e:wy,be)})(b,{});let T=ve.none();const M=(me,be)=>ve.from(St(me,be));b.events.drag.bind(me=>{M(me.target,"data-row").each(be=>{const _e=hc(me.target,"top");pn(me.target,"top",_e+me.yDelta+"px")}),M(me.target,"data-column").each(be=>{const _e=hc(me.target,"left");pn(me.target,"left",_e+me.xDelta+"px")})});const B=(me,be)=>hc(me,be)-Ns(me,"data-initial-"+be,0);x.events.stop.bind(()=>{b.get().each(me=>{T.each(be=>{M(me,"data-row").each(_e=>{const De=B(me,"top");an(me,"data-initial-top"),Se.trigger.adjustHeight(be,De,parseInt(_e,10))}),M(me,"data-column").each(_e=>{const De=B(me,"left");an(me,"data-initial-left"),Se.trigger.adjustWidth(be,De,parseInt(_e,10))}),Ue(m,be)})})});const U=(me,be)=>{Se.trigger.startAdjust(),b.assign(me),yn(me,"data-initial-"+be,hc(me,be)),gf(me,Cy),pn(me,"opacity","0.2"),x.go(m.parent())},K=Ep(m.parent(),"mousedown",me=>{var be;be=me.target,Hh(be,d0)&&U(me.target,"top"),(_e=>Hh(_e,ky))(me.target)&&U(me.target,"left")}),re=me=>as(me,m.view()),he=Ep(m.view(),"mouseover",me=>{var be;(be=me.target,Pn(be,"table",re).filter(Lo)).fold(()=>{Ki(me.target)&&$i(m)},_e=>{x.isActive()&&(T=ve.some(_e),Ue(m,_e))})}),Se=gm({adjustHeight:rd(["table","delta","row"]),adjustWidth:rd(["table","delta","column"]),startAdjust:rd([])});return{destroy:()=>{K.unbind(),he.unbind(),x.destroy(),$i(m)},refresh:me=>{Ue(m,me)},on:x.on,off:x.off,hideBars:Ke(Kk,m),showBars:Ke(P_,m),events:Se.registry}},Sy=m=>Me(m)&&m.nodeName==="TABLE",Wh="bar-",f0=m=>St(m,"data-mce-resize")!=="false",m0=m=>{const b=py(),x=py(),T=py();let M,B,U,K;const re=me=>rf(m,me),he=()=>Xc(m)?lg():Tc(),Se=(me,be,_e,De)=>{const Re=(it=>{return vd(gt=it,"corner-")?((Nt,Pt)=>Nt.substring(7))(gt):gt;var gt})(be),lt=wo(Re,"e"),ct=vd(Re,"n");if(B===""&&hp(me),K===""&&(it=>{const gt=(Nt=>yc(Nt)+"px")(it);As(it,ve.none(),ve.some(gt)),od(it)})(me),_e!==M&&B!==""){pn(me,"width",B);const it=he(),gt=re(me),Nt=Xc(m)||lt?(Pt=>Ml(Pt).columns)(me)-1:0;wu(me,_e-M,Nt,it,gt)}else if((it=>/^(\d+(\.\d+)?)%$/.test(it))(B)){const it=parseFloat(B.replace("%",""));pn(me,"width",_e*it/M+"%")}if((it=>/^(\d+(\.\d+)?)px$/.test(it))(B)&&(it=>{const gt=rn(it);Cl(gt)||bt(Ds(it),Nt=>{const Pt=ya(Nt,"width");pn(Nt,"width",Pt),an(Nt,"width")})})(me),De!==U&&K!==""){pn(me,"height",K);const it=ct?0:(gt=>Ml(gt).rows)(me)-1;lp(me,De-U,it)}};return m.on("init",()=>{const me=((be,_e)=>be.inline?((De,Re,lt)=>({parent:ut(Re),view:ut(De),origin:ut(ja(0,0)),isResizable:lt}))(vt.fromDom(be.getBody()),(()=>{const De=vt.fromTag("div");return $l(De,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),zs(yd(vt.fromDom(document)),De),De})(),_e):((De,Re)=>{const lt=$s(De)?(ct=>vt.fromDom(Mi(ct).dom.documentElement))(De):De;return{parent:ut(lt),view:ut(De),origin:ut(ja(0,0)),isResizable:Re}})(vt.fromDom(be.getDoc()),_e))(m,f0);if(T.set(me),(be=>{const _e=be.options.get("object_resizing");return uo(_e.split(","),"table")})(m)&&q(m)){const be=((_e,De,Re)=>{const lt=vc,ct=Td,it=ad(_e),gt=gm({beforeResize:rd(["table","type"]),afterResize:rd(["table","type"]),startDrag:rd([])});return it.events.adjustHeight.bind(Nt=>{const Pt=Nt.table;gt.trigger.beforeResize(Pt,"row");const Le=lt.delta(Nt.delta,Pt);lp(Pt,Le,Nt.row),gt.trigger.afterResize(Pt,"row")}),it.events.startAdjust.bind(Nt=>{gt.trigger.startDrag()}),it.events.adjustWidth.bind(Nt=>{const Pt=Nt.table;gt.trigger.beforeResize(Pt,"col");const Le=ct.delta(Nt.delta,Pt),Jt=Re(Pt);wu(Pt,Le,Nt.column,De,Jt),gt.trigger.afterResize(Pt,"col")}),{on:it.on,off:it.off,refreshBars:it.refresh,hideBars:it.hideBars,showBars:it.showBars,destroy:it.destroy,events:gt.registry}})(me,he(),re);be.on(),be.events.startDrag.bind(_e=>{b.set(m.selection.getRng())}),be.events.beforeResize.bind(_e=>{const De=_e.table.dom;((Re,lt,ct,it,gt)=>{Re.dispatch("ObjectResizeStart",{target:lt,width:ct,height:it,origin:gt})})(m,De,gu(De),zd(De),Wh+_e.type)}),be.events.afterResize.bind(_e=>{const De=_e.table,Re=De.dom;Ws(De),b.on(lt=>{m.selection.setRng(lt),m.focus()}),((lt,ct,it,gt,Nt)=>{lt.dispatch("ObjectResized",{target:ct,width:it,height:gt,origin:Nt})})(m,Re,gu(Re),zd(Re),Wh+_e.type),m.undoManager.add()}),x.set(be)}}),m.on("ObjectResizeStart",me=>{const be=me.target;if(Sy(be)){const _e=vt.fromDom(be);bt(m.dom.select(".mce-clonedresizable"),De=>{m.dom.addClass(De,"mce-"+Sc(m)+"-columns")}),!Ys(_e)&&E(m)?el(_e):!ay(_e)&&Ec(m)&&hp(_e),Id(_e)&&vd(me.origin,Wh)&&hp(_e),M=me.width,B=P(m)?"":uh(m,be).getOr(""),U=me.height,K=np(m,be).getOr("")}}),m.on("ObjectResized",me=>{const be=me.target;if(Sy(be)){const _e=vt.fromDom(be),De=me.origin;(Re=>vd(Re,"corner-"))(De)&&Se(_e,De,me.width,me.height),Ws(_e),Cu(m,_e.dom,ny)}}),m.on("SwitchMode",()=>{x.on(me=>{m.mode.isReadOnly()?me.hideBars():me.showBars()})}),m.on("dragstart dragend",me=>{x.on(be=>{me.type==="dragstart"?(be.hideBars(),be.off()):(be.on(),be.showBars())})}),m.on("remove",()=>{x.on(me=>{me.destroy()}),T.on(me=>{((be,_e)=>{be.inline&&ys(_e.parent())})(m,me)})}),{refresh:me=>{x.on(be=>be.refreshBars(vt.fromDom(me)))},hide:()=>{x.on(me=>me.hideBars())},show:()=>{x.on(me=>me.showBars())}}},Gk=m=>{(M=>{const B=M.options.register;B("table_clone_elements",{processor:"string[]"}),B("table_use_colgroups",{processor:"boolean",default:!0}),B("table_header_type",{processor:U=>{const K=uo(["section","cells","sectionCells","auto"],U);return K?{value:U,valid:K}:{valid:!1,message:"Must be one of: section, cells, sectionCells or auto."}},default:"section"}),B("table_sizing_mode",{processor:"string",default:"auto"}),B("table_default_attributes",{processor:"object",default:{border:"1"}}),B("table_default_styles",{processor:"object",default:{"border-collapse":"collapse"}}),B("table_column_resizing",{processor:U=>{const K=uo(["preservetable","resizetable"],U);return K?{value:U,valid:K}:{valid:!1,message:"Must be preservetable, or resizetable."}},default:"preservetable"}),B("table_resize_bars",{processor:"boolean",default:!0}),B("table_style_by_css",{processor:"boolean",default:!0}),B("table_merge_content_on_paste",{processor:"boolean",default:!0})})(m);const b=m0(m),x=B_(m,b),T=W1(m,b,x);return pr(m,T),((M,B)=>{const U=sr(M),K=re=>Hs(zl(M)).bind(he=>Q(he,U).map(Se=>{const me=Qo(Dl(M),Se,he);return re(Se,me)})).getOr("");Sn({mceTableRowType:()=>K(B.getTableRowType),mceTableCellType:()=>K(B.getTableCellType),mceTableColType:()=>K(B.getTableColType)},(re,he)=>M.addQueryValueHandler(he,re))})(m,T),Rl(m,T),{getSelectedCells:x.getSelectedCells,clearSelectedCells:x.clearSelectedCells}};w.add("dom",m=>({table:Gk(m)}))})();tinymce.Resource.add("ui/default/skin.css",`.tox{box-shadow:none;box-sizing:content-box;color:#222f3e;cursor:auto;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-style:normal;font-weight:400;line-height:normal;-webkit-tap-highlight-color:transparent;-webkit-text-decoration:none;text-decoration:none;text-shadow:none;text-transform:none;vertical-align:initial;white-space:normal}.tox :not(svg):not(rect){box-sizing:inherit;color:inherit;cursor:inherit;direction:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;-webkit-tap-highlight-color:inherit;text-align:inherit;text-decoration:inherit;text-shadow:inherit;text-transform:inherit;vertical-align:inherit;white-space:inherit}.tox :not(svg):not(rect){background:0 0;border:0;box-shadow:none;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.tox:not([dir=rtl]){direction:ltr;text-align:left}.tox[dir=rtl]{direction:rtl;text-align:right}.tox-tinymce{border:2px solid #eee;border-radius:10px;box-shadow:none;box-sizing:border-box;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;overflow:hidden;position:relative;visibility:inherit!important}.tox.tox-tinymce-inline{border:none;box-shadow:none;overflow:initial}.tox.tox-tinymce-inline .tox-editor-container{overflow:initial}.tox.tox-tinymce-inline .tox-editor-header{background-color:#fff;border:2px solid #eee;border-radius:10px;box-shadow:none;overflow:hidden}.tox-tinymce-aux{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;z-index:1300}.tox-tinymce :focus,.tox-tinymce-aux :focus{outline:0}button::-moz-focus-inner{border:0}.tox[dir=rtl] .tox-icon--flip svg{transform:rotateY(180deg)}.tox .accessibility-issue__header{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description{align-items:stretch;border-radius:6px;display:flex;justify-content:space-between}.tox .accessibility-issue__description>div{padding-bottom:4px}.tox .accessibility-issue__description>div>div{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description>div>div .tox-icon svg{display:block}.tox .accessibility-issue__repair{margin-top:16px}.tox .tox-dialog__body-content .accessibility-issue--info .accessibility-issue__description{background-color:rgba(0,101,216,.1);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--info .tox-form__group h2{color:#006ce7}.tox .tox-dialog__body-content .accessibility-issue--info .tox-icon svg{fill:#006ce7}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon{background-color:#006ce7;color:#fff}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:hover{background-color:#0060ce}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:active{background-color:#0054b4}.tox .tox-dialog__body-content .accessibility-issue--warn .accessibility-issue__description{background-color:rgba(255,165,0,.08);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-form__group h2{color:#8f5d00}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-icon svg{fill:#8f5d00}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon{background-color:#ffe89d;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:hover{background-color:#f2d574;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:active{background-color:#e8c657;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error .accessibility-issue__description{background-color:rgba(204,0,0,.1);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error .tox-form__group h2{color:#c00}.tox .tox-dialog__body-content .accessibility-issue--error .tox-icon svg{fill:#c00}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon{background-color:#f2bfbf;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:hover{background-color:#e9a4a4;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:active{background-color:#ee9494;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description{background-color:rgba(120,171,70,.1);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description>:last-child{display:none}.tox .tox-dialog__body-content .accessibility-issue--success .tox-form__group h2{color:#527530}.tox .tox-dialog__body-content .accessibility-issue--success .tox-icon svg{fill:#527530}.tox .tox-dialog__body-content .accessibility-issue__header .tox-form__group h1,.tox .tox-dialog__body-content .tox-form__group .accessibility-issue__description h2{font-size:14px;margin-top:0}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-left:4px}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-left:auto}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__description{padding:4px 4px 4px 8px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-right:4px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-right:auto}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__description{padding:4px 8px 4px 4px}.tox .mce-codemirror{background:#fff;bottom:0;font-size:13px;left:0;position:absolute;right:0;top:0;z-index:1}.tox .mce-codemirror.tox-inline-codemirror{margin:8px;position:absolute}.tox .tox-advtemplate .tox-form__grid{flex:1}.tox .tox-advtemplate .tox-form__grid>div:first-child{display:flex;flex-direction:column;width:30%}.tox .tox-advtemplate .tox-form__grid>div:first-child>div:nth-child(2){flex-basis:0;flex-grow:1;overflow:auto}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-advtemplate .tox-form__grid>div:first-child{width:100%}}.tox .tox-advtemplate iframe{border-color:#eee;border-radius:10px;border-style:solid;border-width:1px;margin:0 10px}.tox .tox-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bottom-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bar{display:flex;flex:0 0 auto}.tox .tox-button{background-color:#006ce7;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#006ce7;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#fff;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;font-style:normal;font-weight:700;letter-spacing:normal;line-height:24px;margin:0;outline:0;padding:4px 16px;position:relative;text-align:center;-webkit-text-decoration:none;text-decoration:none;text-transform:none;white-space:nowrap}.tox .tox-button::before{border-radius:6px;bottom:-1px;box-shadow:inset 0 0 0 1px #fff,0 0 0 2px #006ce7;content:'';left:-1px;opacity:0;pointer-events:none;position:absolute;right:-1px;top:-1px}.tox .tox-button[disabled]{background-color:#006ce7;background-image:none;border-color:#006ce7;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-button:focus:not(:disabled){background-color:#0060ce;background-image:none;border-color:#0060ce;box-shadow:none;color:#fff}.tox .tox-button:focus:not(:disabled)::before{opacity:1}.tox .tox-button:hover:not(:disabled){background-color:#0060ce;background-image:none;border-color:#0060ce;box-shadow:none;color:#fff}.tox .tox-button:active:not(:disabled){background-color:#0054b4;background-image:none;border-color:#0054b4;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled{background-color:#0054b4;background-image:none;border-color:#0054b4;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled[disabled]{background-color:#0054b4;background-image:none;border-color:#0054b4;box-shadow:none;color:rgba(255,255,255,.5);cursor:not-allowed}.tox .tox-button.tox-button--enabled:focus:not(:disabled){background-color:#00489b;background-image:none;border-color:#00489b;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled:hover:not(:disabled){background-color:#00489b;background-image:none;border-color:#00489b;box-shadow:none;color:#fff}.tox .tox-button.tox-button--enabled:active:not(:disabled){background-color:#003c81;background-image:none;border-color:#003c81;box-shadow:none;color:#fff}.tox .tox-button--icon-and-text,.tox .tox-button.tox-button--icon-and-text,.tox .tox-button.tox-button--secondary.tox-button--icon-and-text{display:flex;padding:5px 4px}.tox .tox-button--icon-and-text .tox-icon svg,.tox .tox-button.tox-button--icon-and-text .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon-and-text .tox-icon svg{display:block;fill:currentColor}.tox .tox-button--secondary{background-color:#f0f0f0;background-image:none;background-position:0 0;background-repeat:repeat;border-color:#f0f0f0;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;color:#222f3e;font-size:14px;font-style:normal;font-weight:700;letter-spacing:normal;outline:0;padding:4px 16px;-webkit-text-decoration:none;text-decoration:none;text-transform:none}.tox .tox-button--secondary[disabled]{background-color:#f0f0f0;background-image:none;border-color:#f0f0f0;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-button--secondary:focus:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--secondary:hover:not(:disabled){background-color:#e3e3e3;background-image:none;border-color:#e3e3e3;box-shadow:none;color:#222f3e}.tox .tox-button--secondary:active:not(:disabled){background-color:#d6d6d6;background-image:none;border-color:#d6d6d6;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled{background-color:#a8c8ed;background-image:none;border-color:#a8c8ed;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled[disabled]{background-color:#a8c8ed;background-image:none;border-color:#a8c8ed;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-button--secondary.tox-button--enabled:focus:not(:disabled){background-color:#93bbe9;background-image:none;border-color:#93bbe9;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled:hover:not(:disabled){background-color:#93bbe9;background-image:none;border-color:#93bbe9;box-shadow:none;color:#222f3e}.tox .tox-button--secondary.tox-button--enabled:active:not(:disabled){background-color:#7daee4;background-image:none;border-color:#7daee4;box-shadow:none;color:#222f3e}.tox .tox-button--icon,.tox .tox-button.tox-button--icon,.tox .tox-button.tox-button--secondary.tox-button--icon{padding:4px}.tox .tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--icon .tox-icon svg,.tox .tox-button.tox-button--secondary.tox-button--icon .tox-icon svg{display:block;fill:currentColor}.tox .tox-button-link{background:0;border:none;box-sizing:border-box;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;white-space:nowrap}.tox .tox-button-link--sm{font-size:14px}.tox .tox-button--naked{background-color:transparent;border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked[disabled]{background-color:rgba(34,47,62,.12);border-color:transparent;box-shadow:unset;color:rgba(34,47,62,.5)}.tox .tox-button--naked:hover:not(:disabled){background-color:rgba(34,47,62,.12);border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked:focus:not(:disabled){background-color:rgba(34,47,62,.12);border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked:active:not(:disabled){background-color:rgba(34,47,62,.18);border-color:transparent;box-shadow:unset;color:#222f3e}.tox .tox-button--naked .tox-icon svg{fill:currentColor}.tox .tox-button--naked.tox-button--icon:hover:not(:disabled){color:#222f3e}.tox .tox-checkbox{align-items:center;border-radius:6px;cursor:pointer;display:flex;height:36px;min-width:36px}.tox .tox-checkbox__input{height:1px;overflow:hidden;position:absolute;top:auto;width:1px}.tox .tox-checkbox__icons{align-items:center;border-radius:6px;box-shadow:0 0 0 2px transparent;box-sizing:content-box;display:flex;height:24px;justify-content:center;padding:calc(4px - 1px);width:24px}.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:block;fill:rgba(34,47,62,0.3)}@media (forced-colors:active){.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:currentColor!important}}.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:none;fill:#006ce7}.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg{display:none;fill:#006ce7}.tox .tox-checkbox--disabled{color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__checked svg{fill:rgba(34,47,62,0.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:rgba(34,47,62,0.5)}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{fill:rgba(34,47,62,0.5)}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__checked svg{display:block}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:block}.tox input.tox-checkbox__input:focus+.tox-checkbox__icons{border-radius:6px;box-shadow:inset 0 0 0 1px #006ce7;padding:calc(4px - 1px)}.tox:not([dir=rtl]) .tox-checkbox__label{margin-left:4px}.tox:not([dir=rtl]) .tox-checkbox__input{left:-10000px}.tox:not([dir=rtl]) .tox-bar .tox-checkbox{margin-left:4px}.tox[dir=rtl] .tox-checkbox__label{margin-right:4px}.tox[dir=rtl] .tox-checkbox__input{right:-10000px}.tox[dir=rtl] .tox-bar .tox-checkbox{margin-right:4px}.tox .tox-collection--toolbar .tox-collection__group{display:flex;padding:0}.tox .tox-collection--grid .tox-collection__group{display:flex;flex-wrap:wrap;max-height:208px;overflow-x:hidden;overflow-y:auto;padding:0}.tox .tox-collection--list .tox-collection__group{border-bottom-width:0;border-color:#e3e3e3;border-left-width:0;border-right-width:0;border-style:solid;border-top-width:1px;padding:4px 0}.tox .tox-collection--list .tox-collection__group:first-child{border-top-width:0}.tox .tox-collection__group-heading{background-color:#fcfcfc;color:rgba(34,47,62,.7);cursor:default;font-size:12px;font-style:normal;font-weight:400;margin-bottom:4px;margin-top:-4px;padding:4px 8px;text-transform:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.tox .tox-collection__item{align-items:center;border-radius:3px;color:#222f3e;display:flex;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.tox .tox-collection--list .tox-collection__item{padding:4px 8px}.tox .tox-collection--toolbar .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--grid .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--list .tox-collection__item--enabled{background-color:#fff;color:#222f3e}.tox .tox-collection--list .tox-collection__item--active{background-color:#006ce7}.tox .tox-collection--toolbar .tox-collection__item--enabled,.tox .tox-collection--toolbar .tox-collection__item--enabled.tox-collection__item--active,.tox .tox-collection--toolbar .tox-collection__item--enabled.tox-collection__item--active:hover{background-color:#a6ccf7;color:#222f3e}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--enabled,.tox .tox-collection--toolbar .tox-collection__item--enabled.tox-collection__item--active,.tox .tox-collection--toolbar .tox-collection__item--enabled.tox-collection__item--active:hover{border-radius:3px;outline:solid 1px}}.tox .tox-collection--toolbar .tox-collection__item--active{background-color:#fff;position:relative}.tox .tox-collection--toolbar .tox-collection__item--active:hover{background-color:#f0f0f0;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active:focus{background-color:#f0f0f0;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--active:focus::after{border:2px solid highlight}}.tox .tox-collection--grid .tox-collection__item--enabled{background-color:#a6ccf7;color:#222f3e}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#f0f0f0;color:#222f3e;position:relative;z-index:1}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 inset;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border:2px solid highlight}}.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#fff}@media (forced-colors:active){.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){border:solid 1px}}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#222f3e}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):hover{border-radius:3px;outline:solid 1px}}.tox .tox-collection__item-checkmark,.tox .tox-collection__item-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.tox .tox-collection__item-checkmark svg,.tox .tox-collection__item-icon svg{fill:currentColor}.tox .tox-collection--toolbar-lg .tox-collection__item-icon{height:48px;width:48px}.tox .tox-collection__item-label{color:currentColor;display:inline-block;flex:1;font-size:14px;font-style:normal;font-weight:400;line-height:24px;max-width:100%;text-transform:none;word-break:break-all}.tox .tox-collection__item-accessory{color:currentColor;display:inline-block;font-size:14px;height:24px;line-height:24px;text-transform:none}.tox .tox-collection__item-caret{align-items:center;display:flex;min-height:24px}.tox .tox-collection__item-caret::after{content:'';font-size:0;min-height:inherit}.tox .tox-collection__item-caret svg{fill:currentColor}.tox .tox-collection__item--state-disabled{background-color:transparent;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-collection__item--state-disabled .tox-collection__item-caret svg{fill:rgba(34,47,62,0.5)}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg{display:none}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-accessory+.tox-collection__item-checkmark{display:none}.tox .tox-collection--horizontal{background-color:#fff;border:1px solid #e3e3e3;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:nowrap;margin-bottom:0;overflow-x:auto;padding:0}.tox .tox-collection--horizontal .tox-collection__group{align-items:center;display:flex;flex-wrap:nowrap;margin:0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item{height:28px;margin:6px 1px 5px 0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item-label{white-space:nowrap}.tox .tox-collection--horizontal .tox-collection__item-caret{margin-left:4px}.tox .tox-collection__item-container{display:flex}.tox .tox-collection__item-container--row{align-items:center;flex:1 1 auto;flex-direction:row}.tox .tox-collection__item-container--row.tox-collection__item-container--align-left{margin-right:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--align-right{justify-content:flex-end;margin-left:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-top{align-items:flex-start;margin-bottom:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-middle{align-items:center}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-bottom{align-items:flex-end;margin-top:auto}.tox .tox-collection__item-container--column{align-self:center;flex:1 1 auto;flex-direction:column}.tox .tox-collection__item-container--column.tox-collection__item-container--align-left{align-items:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--align-right{align-items:flex-end}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-top{align-self:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-middle{align-self:center}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-bottom{align-self:flex-end}.tox:not([dir=rtl]) .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-right:1px solid transparent}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>:not(:first-child){margin-left:8px}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-left:4px}.tox:not([dir=rtl]) .tox-collection__item-accessory{margin-left:16px;text-align:right}.tox:not([dir=rtl]) .tox-collection .tox-collection__item-caret{margin-left:16px}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-left:1px solid transparent}.tox[dir=rtl] .tox-collection--list .tox-collection__item>:not(:first-child){margin-right:8px}.tox[dir=rtl] .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-right:4px}.tox[dir=rtl] .tox-collection__item-accessory{margin-right:16px;text-align:left}.tox[dir=rtl] .tox-collection .tox-collection__item-caret{margin-right:16px;transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__item-caret{margin-right:4px}@media (forced-colors:active){.tox .tox-hue-slider,.tox .tox-rgb-form .tox-rgba-preview{background-color:currentColor!important;border:1px solid highlight!important;forced-color-adjust:none}}.tox .tox-color-picker-container{display:flex;flex-direction:row;height:225px;margin:0}.tox .tox-sv-palette{box-sizing:border-box;display:flex;height:100%}.tox .tox-sv-palette-spectrum{height:100%}.tox .tox-sv-palette,.tox .tox-sv-palette-spectrum{width:225px}.tox .tox-sv-palette-thumb{background:0 0;border:1px solid #000;border-radius:50%;box-sizing:content-box;height:12px;position:absolute;width:12px}.tox .tox-sv-palette-inner-thumb{border:1px solid #fff;border-radius:50%;height:10px;position:absolute;width:10px}.tox .tox-hue-slider{box-sizing:border-box;height:100%;width:25px}.tox .tox-hue-slider-spectrum{background:linear-gradient(to bottom,red,#ff0080,#f0f,#8000ff,#00f,#0080ff,#0ff,#00ff80,#0f0,#80ff00,#ff0,#ff8000,red);height:100%;width:100%}.tox .tox-hue-slider,.tox .tox-hue-slider-spectrum{width:20px}.tox .tox-hue-slider-spectrum:focus,.tox .tox-sv-palette-spectrum:focus{outline:#08f solid}.tox .tox-hue-slider-thumb{background:#fff;border:1px solid #000;box-sizing:content-box;height:4px;width:100%}.tox .tox-rgb-form{display:flex;flex-direction:column;justify-content:space-between}.tox .tox-rgb-form div{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px;width:inherit}.tox .tox-rgb-form input{min-width:6em}.tox .tox-rgb-form input.tox-invalid{border:1px solid red!important;box-shadow:0 0 0 1px red}.tox .tox-rgb-container{position:relative}.tox .tox-rgb-form .tox-invalid-icon{align-content:center;align-items:center;display:none;height:100%;position:absolute;right:0;top:0}.tox .tox-rgb-form .tox-invalid-icon .tox-control-wrap__status-icon-invalid{margin:0}.tox .tox-rgb-warning-note{background-color:#f5cccc;border:1px solid #f0b3b3;border-radius:3px;color:#77181f;padding:3px}.tox input.tox-invalid+.tox-invalid-icon{display:flex}.tox .tox-rgb-form .tox-rgba-preview{border:1px solid #000;flex-grow:2;margin-bottom:0}.tox:not([dir=rtl]) .tox-sv-palette{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider-thumb{margin-left:-1px}.tox:not([dir=rtl]) .tox-rgb-form label{margin-right:.5em}.tox[dir=rtl] .tox-sv-palette{margin-left:15px}.tox[dir=rtl] .tox-hue-slider{margin-left:15px}.tox[dir=rtl] .tox-hue-slider-thumb{margin-right:-1px}.tox[dir=rtl] .tox-rgb-form label{margin-left:.5em}.tox .tox-toolbar .tox-swatches,.tox .tox-toolbar__overflow .tox-swatches,.tox .tox-toolbar__primary .tox-swatches{margin:5px 0 6px 11px}.tox .tox-collection--list .tox-collection__group .tox-swatches-menu{border:0;margin:-4px -4px}.tox .tox-swatches__row{display:flex}@media (forced-colors:active){.tox .tox-swatches__row{forced-color-adjust:none}}.tox .tox-swatch{height:30px;transition:transform .15s,box-shadow .15s;width:30px}.tox .tox-swatch:focus,.tox .tox-swatch:hover{box-shadow:0 0 0 1px rgba(127,127,127,.3) inset;transform:scale(.8)}.tox .tox-swatch--remove{align-items:center;display:flex;justify-content:center}.tox .tox-swatch--remove svg path{stroke:#e74c3c}.tox .tox-swatches__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-swatches__picker-btn svg{fill:#222f3e;height:24px;width:24px}.tox .tox-swatches__picker-btn:hover{background:#f0f0f0}.tox div.tox-swatch:not(.tox-swatch--remove) svg{display:none;fill:#222f3e;height:24px;margin:calc((30px - 24px)/ 2) calc((30px - 24px)/ 2);width:24px}.tox div.tox-swatch:not(.tox-swatch--remove) svg path{fill:#fff;paint-order:stroke;stroke:#222f3e;stroke-width:2px}.tox div.tox-swatch:not(.tox-swatch--remove).tox-collection__item--enabled svg{display:block}.tox:not([dir=rtl]) .tox-swatches__picker-btn{margin-left:auto}.tox[dir=rtl] .tox-swatches__picker-btn{margin-right:auto}.tox .tox-comment-thread{background:#fff;position:relative}.tox .tox-comment-thread>:not(:first-child){margin-top:8px}.tox .tox-comment{background:#fff;border:1px solid #eee;border-radius:6px;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);padding:8px 8px 16px 8px;position:relative}.tox .tox-comment__header{align-items:center;color:#222f3e;display:flex;justify-content:space-between}.tox .tox-comment__date{color:#222f3e;font-size:12px;line-height:18px}.tox .tox-comment__body{color:#222f3e;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;margin-top:8px;position:relative;text-transform:initial}.tox .tox-comment__body textarea{resize:none;white-space:normal;width:100%}.tox .tox-comment__expander{padding-top:8px}.tox .tox-comment__expander p{color:rgba(34,47,62,.7);font-size:14px;font-style:normal}.tox .tox-comment__body p{margin:0}.tox .tox-comment__buttonspacing{padding-top:16px;text-align:center}.tox .tox-comment-thread__overlay::after{background:#fff;bottom:0;content:"";display:flex;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:5}.tox .tox-comment__reply{display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}.tox .tox-comment__reply>:first-child{margin-bottom:8px;width:100%}.tox .tox-comment__edit{display:flex;flex-wrap:wrap;justify-content:flex-end;margin-top:16px}.tox .tox-comment__gradient::after{background:linear-gradient(rgba(255,255,255,0),#fff);bottom:0;content:"";display:block;height:5em;margin-top:-40px;position:absolute;width:100%}.tox .tox-comment__overlay{background:#fff;bottom:0;display:flex;flex-direction:column;flex-grow:1;left:0;opacity:.9;position:absolute;right:0;text-align:center;top:0;z-index:5}.tox .tox-comment__loading-text{align-items:center;color:#222f3e;display:flex;flex-direction:column;position:relative}.tox .tox-comment__loading-text>div{padding-bottom:16px}.tox .tox-comment__overlaytext{bottom:0;flex-direction:column;font-size:14px;left:0;padding:1em;position:absolute;right:0;top:0;z-index:10}.tox .tox-comment__overlaytext p{background-color:#fff;box-shadow:0 0 8px 8px #fff;color:#222f3e;text-align:center}.tox .tox-comment__overlaytext div:nth-of-type(2){font-size:.8em}.tox .tox-comment__busy-spinner{align-items:center;background-color:#fff;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:20}.tox .tox-comment__scroll{display:flex;flex-direction:column;flex-shrink:1;overflow:auto}.tox .tox-conversations{margin:8px}.tox:not([dir=rtl]) .tox-comment__edit{margin-left:8px}.tox:not([dir=rtl]) .tox-comment__buttonspacing>:last-child,.tox:not([dir=rtl]) .tox-comment__edit>:last-child,.tox:not([dir=rtl]) .tox-comment__reply>:last-child{margin-left:8px}.tox[dir=rtl] .tox-comment__edit{margin-right:8px}.tox[dir=rtl] .tox-comment__buttonspacing>:last-child,.tox[dir=rtl] .tox-comment__edit>:last-child,.tox[dir=rtl] .tox-comment__reply>:last-child{margin-right:8px}.tox .tox-user{align-items:center;display:flex}.tox .tox-user__avatar svg{fill:rgba(34,47,62,0.7)}.tox .tox-user__avatar img{border-radius:50%;height:36px;object-fit:cover;vertical-align:middle;width:36px}.tox .tox-user__name{color:#222f3e;font-size:14px;font-style:normal;font-weight:700;line-height:18px;text-transform:none}.tox:not([dir=rtl]) .tox-user__avatar img,.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right:8px}.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left:8px}.tox[dir=rtl] .tox-user__avatar img,.tox[dir=rtl] .tox-user__avatar svg{margin-left:8px}.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right:8px}.tox .tox-dialog-wrap{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:1100}.tox .tox-dialog-wrap__backdrop{background-color:rgba(255,255,255,.75);bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}.tox .tox-dialog-wrap__backdrop--opaque{background-color:#fff}.tox .tox-dialog{background-color:#fff;border-color:#eee;border-radius:10px;border-style:solid;border-width:0;box-shadow:0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);display:flex;flex-direction:column;max-height:100%;max-width:480px;overflow:hidden;position:relative;width:95vw;z-index:2}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog{align-self:flex-start;margin:8px auto;max-height:calc(100vh - 8px * 2);width:calc(100vw - 16px)}}.tox .tox-dialog-inline{z-index:1100}.tox .tox-dialog__header{align-items:center;background-color:#fff;border-bottom:none;color:#222f3e;display:flex;font-size:16px;justify-content:space-between;padding:8px 16px 0 16px;position:relative}.tox .tox-dialog__header .tox-button{z-index:1}.tox .tox-dialog__draghandle{cursor:grab;height:100%;left:0;position:absolute;top:0;width:100%}.tox .tox-dialog__draghandle:active{cursor:grabbing}.tox .tox-dialog__dismiss{margin-left:auto}.tox .tox-dialog__title{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:20px;font-style:normal;font-weight:400;line-height:1.3;margin:0;text-transform:none}.tox .tox-dialog__body{color:#222f3e;display:flex;flex:1;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;min-width:0;text-align:left;text-transform:none}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body{flex-direction:column}}.tox .tox-dialog__body-nav{align-items:flex-start;display:flex;flex-direction:column;flex-shrink:0;padding:16px 16px}@media only screen and (min-width:768px){.tox .tox-dialog__body-nav{max-width:11em}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body-nav{flex-direction:row;-webkit-overflow-scrolling:touch;overflow-x:auto;padding-bottom:0}}.tox .tox-dialog__body-nav-item{border-bottom:2px solid transparent;color:rgba(34,47,62,.7);display:inline-block;flex-shrink:0;font-size:14px;line-height:1.3;margin-bottom:8px;max-width:13em;-webkit-text-decoration:none;text-decoration:none}.tox .tox-dialog__body-nav-item:focus{background-color:rgba(0,108,231,.1)}.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid #006ce7;color:#006ce7}@media (forced-colors:active){.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid highlight;color:highlight}}.tox .tox-dialog__body-content{box-sizing:border-box;display:flex;flex:1;flex-direction:column;max-height:min(650px,calc(100vh - 110px));overflow:auto;-webkit-overflow-scrolling:touch;padding:16px 16px}.tox .tox-dialog__body-content>*{margin-bottom:0;margin-top:16px}.tox .tox-dialog__body-content>:first-child{margin-top:0}.tox .tox-dialog__body-content>:last-child{margin-bottom:0}.tox .tox-dialog__body-content>:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content a{color:#006ce7;cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content a:focus,.tox .tox-dialog__body-content a:hover{color:#003c81;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content a:focus-visible{border-radius:1px;outline:2px solid #006ce7;outline-offset:2px}.tox .tox-dialog__body-content a:active{color:#00244e;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content svg{fill:#222f3e}.tox .tox-dialog__body-content strong{font-weight:700}.tox .tox-dialog__body-content ul{list-style-type:disc}.tox .tox-dialog__body-content dd,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{padding-inline-start:2.5rem}.tox .tox-dialog__body-content dl,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{margin-bottom:16px}.tox .tox-dialog__body-content dd,.tox .tox-dialog__body-content dl,.tox .tox-dialog__body-content dt,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{display:block;margin-inline-end:0;margin-inline-start:0}.tox .tox-dialog__body-content .tox-form__group h1{color:#222f3e;font-size:20px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group h2{color:#222f3e;font-size:16px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group p{margin-bottom:16px}.tox .tox-dialog__body-content .tox-form__group h1:first-child,.tox .tox-dialog__body-content .tox-form__group h2:first-child,.tox .tox-dialog__body-content .tox-form__group p:first-child{margin-top:0}.tox .tox-dialog__body-content .tox-form__group h1:last-child,.tox .tox-dialog__body-content .tox-form__group h2:last-child,.tox .tox-dialog__body-content .tox-form__group p:last-child{margin-bottom:0}.tox .tox-dialog__body-content .tox-form__group h1:only-child,.tox .tox-dialog__body-content .tox-form__group h2:only-child,.tox .tox-dialog__body-content .tox-form__group p:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--center{text-align:center}.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--end{text-align:end}.tox .tox-dialog--width-lg{height:650px;max-width:1200px}.tox .tox-dialog--fullscreen{height:100%;max-width:100%}.tox .tox-dialog--fullscreen .tox-dialog__body-content{max-height:100%}.tox .tox-dialog--width-md{max-width:800px}.tox .tox-dialog--width-md .tox-dialog__body-content{overflow:auto}.tox .tox-dialog__body-content--centered{text-align:center}.tox .tox-dialog__footer{align-items:center;background-color:#fff;border-top:none;display:flex;justify-content:space-between;padding:8px 16px}.tox .tox-dialog__footer-end,.tox .tox-dialog__footer-start{display:flex}.tox .tox-dialog__busy-spinner{align-items:center;background-color:rgba(255,255,255,.75);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:3}.tox .tox-dialog__table{border-collapse:collapse;width:100%}.tox .tox-dialog__table thead th{font-weight:700;padding-bottom:8px}.tox .tox-dialog__table thead th:first-child{padding-right:8px}.tox .tox-dialog__table tbody tr{border-bottom:1px solid #626262}.tox .tox-dialog__table tbody tr:last-child{border-bottom:none}.tox .tox-dialog__table td{padding-bottom:8px;padding-top:8px}.tox .tox-dialog__table td:first-child{padding-right:8px}.tox .tox-dialog__iframe{min-height:200px}.tox .tox-dialog__iframe.tox-dialog__iframe--opaque{background:#fff}.tox .tox-navobj-bordered{position:relative}.tox .tox-navobj-bordered::before{border:1px solid #eee;border-radius:6px;content:'';inset:0;opacity:1;pointer-events:none;position:absolute;z-index:1}.tox .tox-navobj-bordered iframe{border-radius:6px}.tox .tox-navobj-bordered-focus.tox-navobj-bordered::before{border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-dialog__popups{position:absolute;width:100%;z-index:1100}.tox .tox-dialog__body-iframe{display:flex;flex:1;flex-direction:column}.tox .tox-dialog__body-iframe .tox-navobj{display:flex;flex:1}.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2){flex:1;height:100%}.tox .tox-dialog-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-dialog-dock-fadein{opacity:1;visibility:visible}.tox .tox-dialog-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein{transition-delay:0s}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav{margin-right:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child){margin-left:8px}}.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end>*,.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start>*{margin-left:8px}.tox[dir=rtl] .tox-dialog__body{text-align:right}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav{margin-left:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child){margin-right:8px}}.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end>*,.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start>*{margin-right:8px}body.tox-dialog__disable-scroll{overflow:hidden}.tox .tox-dropzone-container{display:flex;flex:1}.tox .tox-dropzone{align-items:center;background:#fff;border:2px dashed #eee;box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;min-height:100px;padding:10px}.tox .tox-dropzone p{color:rgba(34,47,62,.7);margin:0 0 16px 0}.tox .tox-edit-area{display:flex;flex:1;overflow:hidden;position:relative}.tox .tox-edit-area::before{border:2px solid #006ce7;border-radius:4px;content:'';inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .15s;z-index:1}@media (forced-colors:active){.tox .tox-edit-area::before{border:2px solid highlight}}.tox .tox-edit-area__iframe{background-color:#fff;border:0;box-sizing:border-box;flex:1;height:100%;position:absolute;width:100%}.tox.tox-edit-focus .tox-edit-area::before{opacity:1}.tox.tox-inline-edit-area{border:1px dotted #eee}.tox .tox-editor-container{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-editor-header{display:grid;grid-template-columns:1fr min-content;z-index:2}.tox:not(.tox-tinymce-inline) .tox-editor-header{background-color:#fff;border-bottom:none;box-shadow:0 2px 2px -2px rgba(34,47,62,.1),0 8px 8px -4px rgba(34,47,62,.07);padding:4px 0}.tox:not(.tox-tinymce-inline) .tox-editor-header:not(.tox-editor-dock-transition){transition:box-shadow .5s}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-bottom .tox-editor-header{border-top:1px solid #e3e3e3;box-shadow:none}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on .tox-editor-header{background-color:#fff;box-shadow:0 2px 2px -2px rgba(34,47,62,.2),0 8px 8px -4px rgba(34,47,62,.15);padding:4px 0}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on.tox-tinymce--toolbar-bottom .tox-editor-header{box-shadow:0 2px 2px -2px rgba(34,47,62,.2),0 8px 8px -4px rgba(34,47,62,.15)}.tox.tox:not(.tox-tinymce-inline) .tox-editor-header.tox-editor-header--empty{background:0 0;border:none;box-shadow:none;padding:0}.tox-editor-dock-fadeout{opacity:0;visibility:hidden}.tox-editor-dock-fadein{opacity:1;visibility:visible}.tox-editor-dock-transition{transition:visibility 0s linear .25s,opacity .25s ease}.tox-editor-dock-transition.tox-editor-dock-fadein{transition-delay:0s}.tox .tox-control-wrap{flex:1;position:relative}.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid{display:none}.tox .tox-control-wrap svg{display:block}.tox .tox-control-wrap__status-icon-wrap{position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-control-wrap__status-icon-invalid svg{fill:#c00}.tox .tox-control-wrap__status-icon-unknown svg{fill:orange}.tox .tox-control-wrap__status-icon-valid svg{fill:green}.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield{padding-right:32px}.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap{right:4px}.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield{padding-left:32px}.tox[dir=rtl] .tox-control-wrap__status-icon-wrap{left:4px}.tox .tox-custom-preview{border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;flex:1;padding:8px}.tox .tox-autocompleter{max-width:25em}.tox .tox-autocompleter .tox-menu{box-sizing:border-box;max-width:25em}.tox .tox-autocompleter .tox-autocompleter-highlight{font-weight:700}.tox .tox-color-input{display:flex;position:relative;z-index:1}.tox .tox-color-input .tox-textfield{z-index:-1}.tox .tox-color-input span{border-color:rgba(34 47 3.1%);border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;height:24px;position:absolute;top:6px;width:24px}@media (forced-colors:active){.tox .tox-color-input span{border-color:currentColor;border-width:2px!important;forced-color-adjust:none}}.tox .tox-color-input span:focus:not([aria-disabled=true]),.tox .tox-color-input span:hover:not([aria-disabled=true]){border-color:#006ce7;cursor:pointer}.tox .tox-color-input span::before{background-image:linear-gradient(45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(-45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.25) 75%),linear-gradient(-45deg,transparent 75%,rgba(0,0,0,.25) 75%);background-position:0 0,0 6px,6px -6px,-6px 0;background-size:12px 12px;border:1px solid #fff;border-radius:6px;box-sizing:border-box;content:'';height:24px;left:-1px;position:absolute;top:-1px;width:24px;z-index:-1}@media (forced-colors:active){.tox .tox-color-input span::before{border:none}}.tox .tox-color-input span[aria-disabled=true]{cursor:not-allowed}.tox:not([dir=rtl]) .tox-color-input .tox-textfield{padding-left:36px}.tox:not([dir=rtl]) .tox-color-input span{left:6px}.tox[dir=rtl] .tox-color-input .tox-textfield{padding-right:36px}.tox[dir=rtl] .tox-color-input span{right:6px}.tox .tox-label,.tox .tox-toolbar-label{color:rgba(34,47,62,.7);display:block;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;padding:0 8px 0 0;text-transform:none;white-space:nowrap}.tox .tox-toolbar-label{padding:0 8px}.tox[dir=rtl] .tox-label{padding:0 0 0 8px}.tox .tox-form{display:flex;flex:1;flex-direction:column}.tox .tox-form__group{box-sizing:border-box;margin-bottom:4px}.tox .tox-form-group--maximize{flex:1}.tox .tox-form__group--error{color:#c00}.tox .tox-form__group--collection{display:flex}.tox .tox-form__grid{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}.tox .tox-form__grid--2col>.tox-form__group{width:calc(50% - (8px / 2))}.tox .tox-form__grid--3col>.tox-form__group{width:calc(100% / 3 - (8px / 2))}.tox .tox-form__grid--4col>.tox-form__group{width:calc(25% - (8px / 2))}.tox .tox-form__controls-h-stack{align-items:center;display:flex}.tox .tox-form__group--inline{align-items:center;display:flex}.tox .tox-form__group--stretched{display:flex;flex:1;flex-direction:column}.tox .tox-form__group--stretched .tox-textarea{flex:1}.tox .tox-form__group--stretched .tox-navobj{display:flex;flex:1}.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex:1;height:100%}.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-form__controls-h-stack>:not(:first-child){margin-right:4px}.tox .tox-lock.tox-locked .tox-lock-icon__unlock,.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock{display:none}.tox .tox-listboxfield .tox-listbox--select,.tox .tox-textarea,.tox .tox-textarea-wrap .tox-textarea:focus,.tox .tox-textfield,.tox .tox-toolbar-textfield{appearance:none;background-color:#fff;border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 5.5px;resize:none;width:100%}.tox .tox-textarea[disabled],.tox .tox-textfield[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-custom-editor:focus-within,.tox .tox-listboxfield .tox-listbox--select:focus,.tox .tox-textarea-wrap:focus-within,.tox .tox-textarea:focus,.tox .tox-textfield:focus{background-color:#fff;border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-toolbar-textfield{border-width:0;margin-bottom:3px;margin-top:2px;max-width:250px}.tox .tox-naked-btn{background-color:transparent;border:0;border-color:transparent;box-shadow:unset;color:#006ce7;cursor:pointer;display:block;margin:0;padding:0}.tox .tox-naked-btn svg{display:block;fill:#222f3e}.tox:not([dir=rtl]) .tox-toolbar-textfield+*{margin-left:4px}.tox[dir=rtl] .tox-toolbar-textfield+*{margin-right:4px}.tox .tox-listboxfield{cursor:pointer;position:relative}.tox .tox-listboxfield .tox-listbox--select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-listbox__select-label{cursor:default;flex:1;margin:0 4px}.tox .tox-listbox__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-listbox__select-chevron svg{fill:#222f3e}@media (forced-colors:active){.tox .tox-listbox__select-chevron svg{fill:currentColor!important}}.tox .tox-listboxfield .tox-listbox--select{align-items:center;display:flex}.tox:not([dir=rtl]) .tox-listboxfield svg{right:8px}.tox[dir=rtl] .tox-listboxfield svg{left:8px}.tox .tox-selectfield{cursor:pointer;position:relative}.tox .tox-selectfield select{appearance:none;background-color:#fff;border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 5.5px;resize:none;width:100%}.tox .tox-selectfield select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-selectfield select::-ms-expand{display:none}.tox .tox-selectfield select:focus{background-color:#fff;border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-selectfield svg{pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}.tox:not([dir=rtl]) .tox-selectfield select[size="0"],.tox:not([dir=rtl]) .tox-selectfield select[size="1"]{padding-right:24px}.tox:not([dir=rtl]) .tox-selectfield svg{right:8px}.tox[dir=rtl] .tox-selectfield select[size="0"],.tox[dir=rtl] .tox-selectfield select[size="1"]{padding-left:24px}.tox[dir=rtl] .tox-selectfield svg{left:8px}.tox .tox-textarea-wrap{border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;display:flex;flex:1;overflow:hidden}.tox .tox-textarea{appearance:textarea;white-space:pre-wrap}.tox .tox-textarea-wrap .tox-textarea{border:none}.tox .tox-textarea-wrap .tox-textarea:focus{border:none}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201}.tox .tox-help__more-link{list-style:none;margin-top:1em}.tox .tox-imagepreview{background-color:#666;height:380px;overflow:hidden;position:relative;width:100%}.tox .tox-imagepreview.tox-imagepreview__loaded{overflow:auto}.tox .tox-imagepreview__container{display:flex;left:100vw;position:absolute;top:100vw}.tox .tox-imagepreview__image{background:url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==)}.tox .tox-image-tools .tox-spacer{flex:1}.tox .tox-image-tools .tox-bar{align-items:center;display:flex;height:60px;justify-content:center}.tox .tox-image-tools .tox-imagepreview,.tox .tox-image-tools .tox-imagepreview+.tox-bar{margin-top:8px}.tox .tox-image-tools .tox-croprect-block{background:#000;opacity:.5;position:absolute;zoom:1}.tox .tox-image-tools .tox-croprect-handle{border:2px solid #fff;height:20px;left:0;position:absolute;top:0;width:20px}.tox .tox-image-tools .tox-croprect-handle-move{border:0;cursor:move;position:absolute}.tox .tox-image-tools .tox-croprect-handle-nw{border-width:2px 0 0 2px;cursor:nw-resize;left:100px;margin:-2px 0 0 -2px;top:100px}.tox .tox-image-tools .tox-croprect-handle-ne{border-width:2px 2px 0 0;cursor:ne-resize;left:200px;margin:-2px 0 0 -20px;top:100px}.tox .tox-image-tools .tox-croprect-handle-sw{border-width:0 0 2px 2px;cursor:sw-resize;left:100px;margin:-20px 2px 0 -2px;top:200px}.tox .tox-image-tools .tox-croprect-handle-se{border-width:0 2px 2px 0;cursor:se-resize;left:200px;margin:-20px 0 0 -20px;top:200px}.tox .tox-insert-table-picker{background-color:#fff;display:flex;flex-wrap:wrap;width:170px}.tox .tox-insert-table-picker>div{border-color:#eee;border-style:solid;border-width:0 1px 1px 0;box-sizing:border-box;height:17px;width:17px}.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin:-4px -4px}.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color:#006ce7;border-color:#eee}@media (forced-colors:active){.tox .tox-insert-table-picker .tox-insert-table-picker__selected{border-color:Highlight;filter:contrast(50%)}}.tox .tox-insert-table-picker__label{color:rgba(34,47,62,.7);display:block;font-size:14px;padding:4px;text-align:center;width:100%}.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right:0}.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right:0}.tox .tox-menu{background-color:#fff;border:1px solid transparent;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);display:inline-block;overflow:hidden;vertical-align:top;z-index:1150}.tox .tox-menu.tox-collection.tox-collection--list{padding:0 4px}.tox .tox-menu.tox-collection.tox-collection--toolbar{padding:8px}.tox .tox-menu.tox-collection.tox-collection--grid{padding:8px}@media only screen and (min-width:768px){.tox .tox-menu .tox-collection__item-label{overflow-wrap:break-word;word-break:normal}.tox .tox-dialog__popups .tox-menu .tox-collection__item-label{word-break:break-all}}.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin:0}.tox .tox-menubar{background:repeating-linear-gradient(transparent 0 1px,transparent 1px 39px) center top 39px/100% calc(100% - 39px) no-repeat;background-color:#fff;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;grid-column:1/-1;grid-row:1;padding:0 11px 0 12px}.tox .tox-promotion+.tox-menubar{grid-column:1}.tox .tox-promotion{background:repeating-linear-gradient(transparent 0 1px,transparent 1px 39px) center top 39px/100% calc(100% - 39px) no-repeat;background-color:#fff;grid-column:2;grid-row:1;padding-inline-end:8px;padding-inline-start:4px;padding-top:5px}.tox .tox-promotion-link{align-items:unsafe center;background-color:#e8f1f8;border-radius:5px;color:#086be6;cursor:pointer;display:flex;font-size:14px;height:26.6px;padding:4px 8px;white-space:nowrap}.tox .tox-promotion-link:hover{background-color:#b4d7ff}.tox .tox-promotion-link:focus{background-color:#d9edf7}.tox .tox-mbtn{align-items:center;background:#fff;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;justify-content:center;margin:5px 1px 6px 0;outline:0;padding:0 4px;text-transform:none;width:auto}.tox .tox-mbtn[disabled]{background-color:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-mbtn:focus:not(:disabled){background:#fff;border:0;box-shadow:none;color:#222f3e;position:relative;z-index:1}.tox .tox-mbtn:focus:not(:disabled)::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-mbtn:focus:not(:disabled)::after{border:2px solid highlight}}.tox .tox-mbtn--active,.tox .tox-mbtn:not(:disabled).tox-mbtn--active:focus{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active){background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-mbtn[disabled] .tox-mbtn__select-label{cursor:not-allowed}.tox .tox-mbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px;display:none}.tox .tox-notification{border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;display:grid;font-size:14px;font-weight:400;grid-template-columns:minmax(40px,1fr) auto minmax(40px,1fr);margin-left:auto;margin-right:auto;margin-top:4px;opacity:0;padding:4px;transition:transform .1s ease-in,opacity 150ms ease-in;width:max-content}.tox .tox-notification a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification p{font-size:14px;font-weight:400}.tox .tox-notification:focus{border-color:#006ce7;box-shadow:0 0 0 1px #006ce7}.tox .tox-notification--in{opacity:1}.tox .tox-notification--success{background-color:#e4eeda;border-color:#d7e6c8;color:#222f3e}.tox .tox-notification--success p{color:#222f3e}.tox .tox-notification--success a{color:#517342}.tox .tox-notification--success a:focus,.tox .tox-notification--success a:hover{color:#24321d;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--success a:focus-visible{border-radius:1px;outline:2px solid #517342;outline-offset:2px}.tox .tox-notification--success a:active{color:#0d120a;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--success svg{fill:#222f3e}.tox .tox-notification--error{background-color:#f5cccc;border-color:#f0b3b3;color:#222f3e}.tox .tox-notification--error p{color:#222f3e}.tox .tox-notification--error a{color:#77181f}.tox .tox-notification--error a:focus,.tox .tox-notification--error a:hover{color:#220709;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--error a:focus-visible{border-radius:1px;outline:2px solid #77181f;outline-offset:2px}.tox .tox-notification--error a:active{color:#000;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--error svg{fill:#222f3e}.tox .tox-notification--warn,.tox .tox-notification--warning{background-color:#fff5cc;border-color:#fff0b3;color:#222f3e}.tox .tox-notification--warn p,.tox .tox-notification--warning p{color:#222f3e}.tox .tox-notification--warn a,.tox .tox-notification--warning a{color:#7a6e25}.tox .tox-notification--warn a:focus,.tox .tox-notification--warn a:hover,.tox .tox-notification--warning a:focus,.tox .tox-notification--warning a:hover{color:#2c280d;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--warn a:focus-visible,.tox .tox-notification--warning a:focus-visible{border-radius:1px;outline:2px solid #7a6e25;outline-offset:2px}.tox .tox-notification--warn a:active,.tox .tox-notification--warning a:active{color:#050502;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--warn svg,.tox .tox-notification--warning svg{fill:#222f3e}.tox .tox-notification--info{background-color:#d6e7fb;border-color:#c1dbf9;color:#222f3e}.tox .tox-notification--info p{color:#222f3e}.tox .tox-notification--info a{color:#2a64a6}.tox .tox-notification--info a:focus,.tox .tox-notification--info a:hover{color:#163355;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--info a:focus-visible{border-radius:1px;outline:2px solid #2a64a6;outline-offset:2px}.tox .tox-notification--info a:active{color:#0b1a2c;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--info svg{fill:#222f3e}.tox .tox-notification__body{align-self:center;color:#222f3e;font-size:14px;grid-column-end:3;grid-column-start:2;grid-row-end:2;grid-row-start:1;text-align:center;white-space:normal;word-break:break-all;word-break:break-word}.tox .tox-notification__body>*{margin:0}.tox .tox-notification__body>*+*{margin-top:1rem}.tox .tox-notification__icon{align-self:center;grid-column-end:2;grid-column-start:1;grid-row-end:2;grid-row-start:1;justify-self:end}.tox .tox-notification__icon svg{display:block}.tox .tox-notification__dismiss{align-self:start;grid-column-end:4;grid-column-start:3;grid-row-end:2;grid-row-start:1;justify-self:end}.tox .tox-notification .tox-progress-bar{grid-column-end:4;grid-column-start:1;grid-row-end:3;grid-row-start:2;justify-self:center}.tox .tox-notification-container-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-notification-container-dock-fadein{opacity:1;visibility:visible}.tox .tox-notification-container-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-notification-container-dock-transition.tox-notification-container-dock-fadein{transition-delay:0s}.tox .tox-pop{display:inline-block;position:relative}.tox .tox-pop--resizing{transition:width .1s ease}.tox .tox-pop--resizing .tox-toolbar,.tox .tox-pop--resizing .tox-toolbar__group{flex-wrap:nowrap}.tox .tox-pop--transition{transition:.15s ease;transition-property:left,right,top,bottom}.tox .tox-pop--transition::after,.tox .tox-pop--transition::before{transition:all .15s,visibility 0s,opacity 75ms ease 75ms}.tox .tox-pop__dialog{background-color:#fff;border:1px solid #eee;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);min-width:0;overflow:hidden}.tox .tox-pop__dialog>:not(.tox-toolbar){margin:4px 4px 4px 8px}.tox .tox-pop__dialog .tox-toolbar{background-color:transparent;margin-bottom:-1px}.tox .tox-pop::after,.tox .tox-pop::before{border-style:solid;content:'';display:block;height:0;opacity:1;position:absolute;width:0}@media (forced-colors:active){.tox .tox-pop::after,.tox .tox-pop::before{content:none}}.tox .tox-pop.tox-pop--inset::after,.tox .tox-pop.tox-pop--inset::before{opacity:0;transition:all 0s .15s,visibility 0s,opacity 75ms ease}.tox .tox-pop.tox-pop--bottom::after,.tox .tox-pop.tox-pop--bottom::before{left:50%;top:100%}.tox .tox-pop.tox-pop--bottom::after{border-color:#fff transparent transparent transparent;border-width:8px;margin-left:-8px;margin-top:-1px}.tox .tox-pop.tox-pop--bottom::before{border-color:#eee transparent transparent transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--top::after,.tox .tox-pop.tox-pop--top::before{left:50%;top:0;transform:translateY(-100%)}.tox .tox-pop.tox-pop--top::after{border-color:transparent transparent #fff transparent;border-width:8px;margin-left:-8px;margin-top:1px}.tox .tox-pop.tox-pop--top::before{border-color:transparent transparent #eee transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--left::after,.tox .tox-pop.tox-pop--left::before{left:0;top:calc(50% - 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--left::after{border-color:transparent #fff transparent transparent;border-width:8px;margin-left:-15px}.tox .tox-pop.tox-pop--left::before{border-color:transparent #eee transparent transparent;border-width:10px;margin-left:-19px}.tox .tox-pop.tox-pop--right::after,.tox .tox-pop.tox-pop--right::before{left:100%;top:calc(50% + 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--right::after{border-color:transparent transparent transparent #fff;border-width:8px;margin-left:-1px}.tox .tox-pop.tox-pop--right::before{border-color:transparent transparent transparent #eee;border-width:10px;margin-left:-1px}.tox .tox-pop.tox-pop--align-left::after,.tox .tox-pop.tox-pop--align-left::before{left:20px}.tox .tox-pop.tox-pop--align-right::after,.tox .tox-pop.tox-pop--align-right::before{left:calc(100% - 20px)}.tox .tox-sidebar-wrap{display:flex;flex-direction:row;flex-grow:1;min-height:0}.tox .tox-sidebar{background-color:#fff;display:flex;flex-direction:row;justify-content:flex-end}.tox .tox-sidebar__slider{display:flex;overflow:hidden}.tox .tox-sidebar__pane-container{display:flex}.tox .tox-sidebar__pane{display:flex}.tox .tox-sidebar--sliding-closed{opacity:0}.tox .tox-sidebar--sliding-open{opacity:1}.tox .tox-sidebar--sliding-growing,.tox .tox-sidebar--sliding-shrinking{transition:width .5s ease,opacity .5s ease}.tox .tox-selector{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;display:inline-block;height:10px;position:absolute;width:10px}.tox.tox-platform-touch .tox-selector{height:12px;width:12px}.tox .tox-slider{align-items:center;display:flex;flex:1;height:24px;justify-content:center;position:relative}.tox .tox-slider__rail{background-color:transparent;border:1px solid #eee;border-radius:6px;height:10px;min-width:120px;width:100%}.tox .tox-slider__handle{background-color:#006ce7;border:2px solid #0054b4;border-radius:6px;box-shadow:none;height:24px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:14px}.tox .tox-form__controls-h-stack>.tox-slider:not(:first-of-type){margin-inline-start:8px}.tox .tox-form__controls-h-stack>.tox-form__group+.tox-slider{margin-inline-start:32px}.tox .tox-form__controls-h-stack>.tox-slider+.tox-form__group{margin-inline-start:32px}.tox .tox-source-code{overflow:auto}.tox .tox-spinner{display:flex}.tox .tox-spinner>div{animation:tam-bouncing-dots 1.5s ease-in-out 0s infinite both;background-color:rgba(34,47,62,.7);border-radius:100%;height:8px;width:8px}.tox .tox-spinner>div:first-child{animation-delay:-.32s}.tox .tox-spinner>div:nth-child(2){animation-delay:-.16s}@keyframes tam-bouncing-dots{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.tox:not([dir=rtl]) .tox-spinner>div:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-spinner>div:not(:first-child){margin-right:4px}.tox .tox-statusbar{align-items:center;background-color:#fff;border-top:1px solid #e3e3e3;color:rgba(34,47,62,.7);display:flex;flex:0 0 auto;font-size:14px;font-weight:400;height:25px;overflow:hidden;padding:0 8px;position:relative;text-transform:none}.tox .tox-statusbar__path{display:flex;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap}.tox .tox-statusbar__right-container{display:flex;justify-content:flex-end;white-space:nowrap}.tox .tox-statusbar__help-text{text-align:center}.tox .tox-statusbar__text-container{align-items:flex-start;display:flex;flex:1 1 auto;height:16px;justify-content:space-between;overflow:hidden}@media only screen and (min-width:768px){.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__help-text,.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__path,.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__right-container{flex:0 0 calc(100% / 3)}}.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-end{justify-content:flex-end}.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-start{justify-content:flex-start}.tox .tox-statusbar__text-container.tox-statusbar__text-container--space-around{justify-content:space-around}.tox .tox-statusbar__path>*{display:inline;white-space:nowrap}.tox .tox-statusbar__wordcount{flex:0 0 auto;margin-left:1ch}@media only screen and (max-width:767px){.tox .tox-statusbar__text-container .tox-statusbar__help-text{display:none}.tox .tox-statusbar__text-container .tox-statusbar__help-text:only-child{display:block}}.tox .tox-statusbar a,.tox .tox-statusbar__path-item,.tox .tox-statusbar__wordcount{color:rgba(34,47,62,.7);position:relative;-webkit-text-decoration:none;text-decoration:none}.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled=true]){color:#222f3e;cursor:pointer}.tox .tox-statusbar a:focus-visible::after,.tox .tox-statusbar__path-item:focus-visible::after,.tox .tox-statusbar__wordcount:focus-visible::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-statusbar a:focus-visible::after,.tox .tox-statusbar__path-item:focus-visible::after,.tox .tox-statusbar__wordcount:focus-visible::after{border:2px solid highlight}}.tox .tox-statusbar__branding svg{fill:rgba(34,47,62,0.8);height:1em;margin-left:.3em;width:auto}@media (forced-colors:active){.tox .tox-statusbar__branding svg{fill:currentColor}}.tox .tox-statusbar__branding a{align-items:center;display:inline-flex}.tox .tox-statusbar__branding a:focus:not(:disabled):not([aria-disabled=true]) svg,.tox .tox-statusbar__branding a:hover:not(:disabled):not([aria-disabled=true]) svg{fill:#222f3e}.tox .tox-statusbar__resize-handle{align-items:flex-end;align-self:stretch;cursor:nwse-resize;display:flex;flex:0 0 auto;justify-content:flex-end;margin-bottom:3px;margin-left:4px;margin-right:calc(3px - 8px);margin-top:3px;padding-bottom:0;padding-left:0;padding-right:0;position:relative}.tox .tox-statusbar__resize-handle svg{display:block;fill:rgba(34,47,62,0.5)}.tox .tox-statusbar__resize-handle:focus svg,.tox .tox-statusbar__resize-handle:hover svg{fill:#222f3e}.tox .tox-statusbar__resize-handle:focus-visible{background-color:transparent;border-radius:1px 1px 5px 1px;box-shadow:0 0 0 2px transparent}.tox .tox-statusbar__resize-handle:focus-visible::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-statusbar__resize-handle:focus-visible::after{border:2px solid highlight}}.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right:4px}.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left:2ch}.tox[dir=rtl] .tox-statusbar{flex-direction:row-reverse}.tox[dir=rtl] .tox-statusbar__path>*{margin-left:4px}.tox[dir=rtl] .tox-statusbar__branding svg{margin-left:0;margin-right:.3em}.tox .tox-throbber{z-index:1299}.tox .tox-throbber__busy-spinner{align-items:center;background-color:rgba(255,255,255,.6);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.tox .tox-tbtn{align-items:center;background:#fff;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;justify-content:center;margin:6px 1px 5px 0;outline:0;padding:0;text-transform:none;width:34px}@media (forced-colors:active){.tox .tox-tbtn.tox-tbtn:hover,.tox .tox-tbtn:hover{outline:1px dashed currentColor}.tox .tox-tbtn.tox-tbtn--active,.tox .tox-tbtn.tox-tbtn--enabled,.tox .tox-tbtn.tox-tbtn--enabled:focus,.tox .tox-tbtn.tox-tbtn--enabled:hover,.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){outline:1px solid currentColor;position:relative}}.tox .tox-tbtn svg{display:block;fill:#222f3e}@media (forced-colors:active){.tox .tox-tbtn svg{fill:currentColor!important}.tox .tox-tbtn svg.tox-tbtn--enabled,.tox .tox-tbtn svg:focus:not(.tox-tbtn--disabled){fill:currentColor!important}.tox .tox-tbtn svg .tox-tbtn:disabled,.tox .tox-tbtn svg .tox-tbtn:disabled:hover,.tox .tox-tbtn svg.tox-tbtn--disabled,.tox .tox-tbtn svg.tox-tbtn--disabled:hover{filter:contrast(0%)}}.tox .tox-tbtn.tox-tbtn-more{padding-left:5px;padding-right:5px;width:inherit}.tox .tox-tbtn:focus{background:#fff;border:0;box-shadow:none;position:relative;z-index:1}.tox .tox-tbtn:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-tbtn:focus::after{border:2px solid highlight}}.tox .tox-tbtn:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:hover svg{fill:#222f3e}.tox .tox-tbtn:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:active svg{fill:#222f3e}.tox .tox-tbtn--disabled .tox-tbtn--enabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--active,.tox .tox-tbtn--enabled,.tox .tox-tbtn--enabled:focus,.tox .tox-tbtn--enabled:hover{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e;position:relative}.tox .tox-tbtn--active>*,.tox .tox-tbtn--enabled:focus>*,.tox .tox-tbtn--enabled:hover>*,.tox .tox-tbtn--enabled>*{transform:none}.tox .tox-tbtn--active svg,.tox .tox-tbtn--enabled svg,.tox .tox-tbtn--enabled:focus svg,.tox .tox-tbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tbtn--active.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled:focus.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled:hover.tox-tbtn--disabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--enabled:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-tbtn--enabled:focus::after{border:2px solid highlight}}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){color:#222f3e}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg{fill:#222f3e}.tox .tox-tbtn:active>*{transform:none}.tox .tox-tbtn--md{height:42px;width:51px}.tox .tox-tbtn--lg{flex-direction:column;height:56px;width:68px}.tox .tox-tbtn--return{align-self:stretch;height:unset;width:16px}.tox .tox-tbtn--labeled{padding:0 4px;width:unset}.tox .tox-tbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-number-input{background:#f7f7f7;border-radius:3px;display:flex;margin:6px 1px 5px 0;position:relative;width:auto}.tox .tox-number-input:focus{background:#f7f7f7}.tox .tox-number-input:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input:focus::after{border:2px solid highlight}}.tox .tox-number-input .tox-input-wrapper{display:flex;pointer-events:none;position:relative;text-align:center}.tox .tox-number-input .tox-input-wrapper:focus{background-color:#f7f7f7;z-index:1}.tox .tox-number-input .tox-input-wrapper:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input .tox-input-wrapper:focus::after{border:2px solid highlight}}.tox .tox-number-input .tox-input-wrapper:has(input:focus)::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input .tox-input-wrapper:has(input:focus)::after{border:2px solid highlight}}.tox .tox-number-input input{border-radius:3px;color:#222f3e;font-size:14px;margin:2px 0;pointer-events:all;position:relative;width:60px}.tox .tox-number-input input:hover{background:#f0f0f0;color:#222f3e}.tox .tox-number-input input:focus{background-color:#f7f7f7}.tox .tox-number-input input:disabled{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-number-input button{color:#222f3e;height:28px;position:relative;text-align:center;width:24px}@media (forced-colors:active){.tox .tox-number-input button:active,.tox .tox-number-input button:focus,.tox .tox-number-input button:hover{outline:1px solid currentColor!important}}.tox .tox-number-input button svg{display:block;fill:#222f3e;margin:0 auto;transform:scale(.67)}@media (forced-colors:active){.tox .tox-number-input button svg,.tox .tox-number-input button svg:active,.tox .tox-number-input button svg:hover{fill:currentColor!important}.tox .tox-number-input button svg:disabled{filter:contrast(0)}}.tox .tox-number-input button:focus{background:#f7f7f7;z-index:1}.tox .tox-number-input button:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input button:focus::after{border:2px solid highlight}}.tox .tox-number-input button:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-number-input button:hover svg{fill:#222f3e}.tox .tox-number-input button:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-number-input button:active svg{fill:#222f3e}.tox .tox-number-input button:disabled{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-number-input button:disabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-number-input button.minus{border-radius:3px 0 0 3px}.tox .tox-number-input button.plus{border-radius:0 3px 3px 0}.tox .tox-number-input:focus:not(:active)>.tox-input-wrapper,.tox .tox-number-input:focus:not(:active)>button{background:#f7f7f7}.tox .tox-tbtn--select{margin:6px 1px 5px 0;padding:0 4px;width:auto}.tox .tox-tbtn__select-label{cursor:default;font-weight:400;height:initial;margin:0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-tbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-tbtn__select-chevron svg{fill:rgba(34,47,62,0.5)}@media (forced-colors:active){.tox .tox-tbtn__select-chevron svg{fill:currentColor}}.tox .tox-tbtn--bespoke{background:#f7f7f7}.tox .tox-tbtn--bespoke:focus{background:#f7f7f7}.tox .tox-tbtn--bespoke+.tox-tbtn--bespoke{margin-inline-start:4px}.tox .tox-tbtn--bespoke .tox-tbtn__select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:7em}.tox .tox-tbtn--disabled .tox-tbtn__select-label,.tox .tox-tbtn--select:disabled .tox-tbtn__select-label{cursor:not-allowed}.tox .tox-split-button{border:0;border-radius:3px;box-sizing:border-box;display:flex;margin:6px 1px 5px 0}.tox .tox-split-button:hover{box-shadow:0 0 0 1px #f0f0f0 inset}.tox .tox-split-button:focus{background:#fff;box-shadow:none;color:#222f3e;position:relative;z-index:1}.tox .tox-split-button:focus::after{pointer-events:none;border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-split-button:focus::after{border:2px solid highlight}}.tox .tox-split-button>*{border-radius:0}.tox .tox-split-button>:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}.tox .tox-split-button>:nth-child(2){border-bottom-right-radius:3px;border-top-right-radius:3px}.tox .tox-split-button__chevron{width:16px}.tox .tox-split-button__chevron svg{fill:rgba(34,47,62,0.5)}@media (forced-colors:active){.tox .tox-split-button__chevron svg{fill:currentColor}}.tox .tox-split-button .tox-tbtn{margin:0}.tox .tox-split-button:focus .tox-tbtn{background-color:transparent}.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:focus,.tox .tox-split-button.tox-tbtn--disabled .tox-tbtn:hover,.tox .tox-split-button.tox-tbtn--disabled:focus,.tox .tox-split-button.tox-tbtn--disabled:hover{background:#fff;box-shadow:none;color:rgba(34,47,62,.5)}.tox.tox-platform-touch .tox-split-button .tox-tbtn--select{padding:0 0}.tox.tox-platform-touch .tox-split-button .tox-tbtn:not(.tox-tbtn--select):first-child{width:30px}.tox.tox-platform-touch .tox-split-button__chevron{width:20px}.tox .tox-split-button.tox-tbtn--disabled svg #tox-icon-highlight-bg-color__color,.tox .tox-split-button.tox-tbtn--disabled svg #tox-icon-text-color__color{opacity:.6}.tox .tox-toolbar-overlord{background-color:#fff}.tox .tox-toolbar,.tox .tox-toolbar__overflow,.tox .tox-toolbar__primary{background-attachment:local;background-color:#fff;background-image:repeating-linear-gradient(#e3e3e3 0 1px,transparent 1px 39px);background-position:center top 40px;background-repeat:no-repeat;background-size:calc(100% - 11px * 2) calc(100% - 41px);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 0;transform:perspective(1px)}.tox .tox-toolbar-overlord>.tox-toolbar,.tox .tox-toolbar-overlord>.tox-toolbar__overflow,.tox .tox-toolbar-overlord>.tox-toolbar__primary{background-position:center top 0;background-size:calc(100% - 11px * 2) calc(100% - 0)}.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed{height:0;opacity:0;padding-bottom:0;padding-top:0;visibility:hidden}.tox .tox-toolbar__overflow--growing{transition:height .3s ease,opacity .2s linear .1s}.tox .tox-toolbar__overflow--shrinking{transition:opacity .3s ease,height .2s linear .1s,visibility 0s linear .3s}.tox .tox-anchorbar,.tox .tox-toolbar-overlord{grid-column:1/-1}.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord{border-top:1px solid transparent;margin-top:-1px;padding-bottom:1px;padding-top:1px}@media (forced-colors:active){.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord{outline:1px solid currentColor}}.tox .tox-toolbar--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-pop .tox-toolbar{border-width:0}.tox .tox-toolbar--no-divider{background-image:none}.tox .tox-toolbar-overlord .tox-toolbar:not(.tox-toolbar--scrolling):first-child,.tox .tox-toolbar-overlord .tox-toolbar__primary{background-position:center top 39px}.tox .tox-editor-header>.tox-toolbar--scrolling,.tox .tox-toolbar-overlord .tox-toolbar--scrolling:first-child{background-image:none}.tox.tox-tinymce-aux .tox-toolbar__overflow{background-color:#fff;background-position:center top 43px;background-size:calc(100% - 8px * 2) calc(100% - 51px);border:none;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);overscroll-behavior:none;padding:4px 0}@media (forced-colors:active){.tox.tox-tinymce-aux .tox-toolbar__overflow{border:solid}}.tox-pop .tox-pop__dialog .tox-toolbar{background-position:center top 43px;background-size:calc(100% - 11px * 2) calc(100% - 51px);padding:4px 0}.tox .tox-toolbar__group{align-items:center;display:flex;flex-wrap:wrap;margin:0 0;padding:0 11px 0 12px}.tox .tox-toolbar__group--pull-right{margin-left:auto}.tox .tox-toolbar--scrolling .tox-toolbar__group{flex-shrink:0;flex-wrap:nowrap}.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right:1px solid transparent}.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left:1px solid transparent}.tox .tox-tooltip{display:inline-block;max-width:15em;padding:8px;pointer-events:none;position:relative;width:max-content;z-index:1150}.tox .tox-tooltip__body{background-color:#222f3e;border-radius:6px;box-shadow:none;color:#fff;font-size:12px;font-style:normal;font-weight:600;overflow-wrap:break-word;padding:4px 6px;text-transform:none}@media (forced-colors:active){.tox .tox-tooltip__body{outline:outset 1px}}.tox .tox-tooltip__arrow{position:absolute}.tox .tox-tooltip--down .tox-tooltip__arrow{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #222f3e;bottom:0;left:50%;position:absolute;transform:translateX(-50%)}.tox .tox-tooltip--up .tox-tooltip__arrow{border-bottom:8px solid #222f3e;border-left:8px solid transparent;border-right:8px solid transparent;left:50%;position:absolute;top:0;transform:translateX(-50%)}.tox .tox-tooltip--right .tox-tooltip__arrow{border-bottom:8px solid transparent;border-left:8px solid #222f3e;border-top:8px solid transparent;position:absolute;right:0;top:50%;transform:translateY(-50%)}.tox .tox-tooltip--left .tox-tooltip__arrow{border-bottom:8px solid transparent;border-right:8px solid #222f3e;border-top:8px solid transparent;left:0;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-tree{display:flex;flex-direction:column}.tox .tox-tree .tox-trbtn{align-items:center;background:0 0;border:0;border-radius:4px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;margin-bottom:4px;margin-top:4px;outline:0;overflow:hidden;padding:0;padding-left:8px;text-transform:none}.tox .tox-tree .tox-trbtn .tox-tree__label{cursor:default;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-tree .tox-trbtn svg{display:block;fill:#222f3e}.tox .tox-tree .tox-trbtn:focus{background:#f0f0f0;border:0;box-shadow:none}.tox .tox-tree .tox-trbtn:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn:hover svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn:active svg{fill:#222f3e}.tox .tox-tree .tox-trbtn--disabled,.tox .tox-tree .tox-trbtn--disabled:hover,.tox .tox-tree .tox-trbtn:disabled,.tox .tox-tree .tox-trbtn:disabled:hover{background:0 0;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tree .tox-trbtn--disabled svg,.tox .tox-tree .tox-trbtn--disabled:hover svg,.tox .tox-tree .tox-trbtn:disabled svg,.tox .tox-tree .tox-trbtn:disabled:hover svg{fill:rgba(34,47,62,0.5)}.tox .tox-tree .tox-trbtn--enabled,.tox .tox-tree .tox-trbtn--enabled:hover{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn--enabled:hover>*,.tox .tox-tree .tox-trbtn--enabled>*{transform:none}.tox .tox-tree .tox-trbtn--enabled svg,.tox .tox-tree .tox-trbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled){color:#222f3e}.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled) svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:active>*{transform:none}.tox .tox-tree .tox-trbtn--return{align-self:stretch;height:unset;width:16px}.tox .tox-tree .tox-trbtn--labeled{padding:0 4px;width:unset}.tox .tox-tree .tox-trbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-tree .tox-tree--directory{display:flex;flex-direction:column}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label{font-weight:700}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn{margin-left:auto}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn svg{fill:transparent}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn.tox-mbtn--active svg,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn:focus svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:focus .tox-mbtn svg,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover .tox-mbtn svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover:has(.tox-mbtn:hover){background-color:transparent;color:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover:has(.tox-mbtn:hover) .tox-chevron svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-chevron{margin-right:6px}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--growing) .tox-chevron,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--shrinking) .tox-chevron{transition:transform .5s ease-in-out}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--growing) .tox-chevron,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--open) .tox-chevron{transform:rotate(90deg)}.tox .tox-tree .tox-tree--leaf__label{font-weight:400}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn{margin-left:auto}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn svg{fill:transparent}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn.tox-mbtn--active svg,.tox .tox-tree .tox-tree--leaf__label .tox-mbtn:focus svg{fill:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover .tox-mbtn svg{fill:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover:has(.tox-mbtn:hover){background-color:transparent;color:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover:has(.tox-mbtn:hover) .tox-chevron svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory__children{overflow:hidden;padding-left:16px}.tox .tox-tree .tox-tree--directory__children.tox-tree--directory__children--growing,.tox .tox-tree .tox-tree--directory__children.tox-tree--directory__children--shrinking{transition:height .5s ease-in-out}.tox .tox-tree .tox-trbtn.tox-tree--leaf__label{display:flex;justify-content:space-between}.tox .tox-revisionhistory__pane{padding:0!important}.tox .tox-revisionhistory__container{display:flex;flex-direction:column;height:100%}.tox .tox-revisionhistory{background-color:#fff;border-top:1px solid #f0f0f0;display:flex;flex:1;height:100%;margin-top:8px;overflow-x:auto;overflow-y:hidden;position:relative;width:100%}.tox .tox-revisionhistory--align-right{margin-left:auto}.tox .tox-revisionhistory__iframe{flex:1}.tox .tox-revisionhistory__sidebar{display:flex;flex-direction:column;height:100%;min-width:248px;width:316px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__sidebar-title{background-color:#fff;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);color:#222f3e;font-size:20px;font-weight:400;line-height:28px;padding:12px;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions{background-color:#f0f0f0;display:flex;flex:1;flex-direction:column;gap:12px;overflow-y:auto;padding:10px 12px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus{height:100%;position:relative;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0;border-radius:6px;bottom:1px;left:1px;right:1px;top:1px}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card{background-color:#fff;border:1px solid #f0f0f0;border-radius:6px;color:#222f3e;cursor:pointer;display:flex;flex-direction:column;font-size:14px;gap:12px;padding:12px;width:100%}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:hover{box-shadow:0 4px 8px 0 rgba(34,47,62,.1)}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus{position:relative;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 #006ce7;content:'';left:0;position:absolute;right:0;top:0;border-radius:6px;box-shadow:0 0 0 2px #006ce7;box-shadow:0 0 0 2px #006ce7!important}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected{background-color:#fff5cc;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);position:relative}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 #e3b82a;content:'';left:0;position:absolute;right:0;top:0;border-radius:6px;box-shadow:0 0 0 2px #e3b82a}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-date{display:flex;gap:12px;justify-content:space-between}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-date-label{font-size:16px;line-height:24px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-label{font-size:12px;font-weight:600;line-height:24px;padding:0}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-author{align-items:center;display:flex;flex:1 0 0;gap:8px;height:36px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-author-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:700;line-height:18px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__avatar{border-radius:50%;height:36px;object-fit:cover;vertical-align:middle;width:36px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__norevision{color:rgba(34,47,62,.7);font-size:16px;line-height:24px;padding:5px 5.5px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-check-icon{color:#222f3e;height:24px}.tox .tox-view-wrap,.tox .tox-view-wrap__slot-container{background-color:#fff;display:flex;flex:1;flex-direction:column;height:100%}.tox .tox-view{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-view__header{align-items:center;display:flex;font-size:16px;justify-content:space-between;padding:10px 10px 2px 10px;position:relative}.tox .tox-view__label{color:#222f3e;font-weight:700;line-height:24px;padding:4px 16px;text-align:center;white-space:nowrap}.tox .tox-view__label--normal{font-size:16px}.tox .tox-view__label--large{font-size:20px}.tox .tox-view--mobile.tox-view__header,.tox .tox-view--mobile.tox-view__toolbar{padding:8px}.tox .tox-view--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-view__toolbar{display:flex;flex-direction:row;gap:8px;justify-content:space-between;overflow-x:auto;padding:10px 10px 2px 10px}.tox .tox-view__toolbar__group{display:flex;flex-direction:row;gap:12px}.tox .tox-view__header-end,.tox .tox-view__header-start{display:flex}.tox .tox-view__pane{height:100%;padding:8px;position:relative;width:100%}.tox .tox-view__pane_panel{border:1px solid #eee;border-radius:6px}.tox:not([dir=rtl]) .tox-view__header .tox-view__header-end>*,.tox:not([dir=rtl]) .tox-view__header .tox-view__header-start>*{margin-left:8px}.tox[dir=rtl] .tox-view__header .tox-view__header-end>*,.tox[dir=rtl] .tox-view__header .tox-view__header-start>*{margin-right:8px}.tox .tox-well{border:1px solid #eee;border-radius:6px;padding:8px;width:100%}.tox .tox-well>:first-child{margin-top:0}.tox .tox-well>:last-child{margin-bottom:0}.tox .tox-well>:only-child{margin:0}.tox .tox-custom-editor{border:1px solid #eee;border-radius:6px;display:flex;flex:1;overflow:hidden;position:relative}.tox .tox-dialog-loading::before{background-color:rgba(0,0,0,.5);content:"";height:100%;position:absolute;width:100%;z-index:1000}.tox .tox-tab{cursor:pointer}.tox .tox-dialog__content-js{display:flex;flex:1}.tox .tox-dialog__body-content .tox-collection{display:flex;flex:1}`);(function(){var w=tinymce.util.Tools.resolve("tinymce.PluginManager");const g=(bt,dt,Kt)=>{const qo=dt==="UL"?"InsertUnorderedList":"InsertOrderedList";bt.execCommand(qo,!1,Kt===!1?null:{"list-style-type":Kt})},S=bt=>{bt.addCommand("ApplyUnorderedListStyle",(dt,Kt)=>{g(bt,"UL",Kt["list-style-type"])}),bt.addCommand("ApplyOrderedListStyle",(dt,Kt)=>{g(bt,"OL",Kt["list-style-type"])})},L=bt=>dt=>dt.options.get(bt),W=bt=>{const dt=bt.options.register;dt("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),dt("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})},te=L("advlist_number_styles"),ce=L("advlist_bullet_styles"),Ee=bt=>bt==null,He=bt=>!Ee(bt);var We=tinymce.util.Tools.resolve("tinymce.util.Tools");class Me{constructor(dt,Kt){this.tag=dt,this.value=Kt}static some(dt){return new Me(!0,dt)}static none(){return Me.singletonNone}fold(dt,Kt){return this.tag?Kt(this.value):dt()}isSome(){return this.tag}isNone(){return!this.tag}map(dt){return this.tag?Me.some(dt(this.value)):Me.none()}bind(dt){return this.tag?dt(this.value):Me.none()}exists(dt){return this.tag&&dt(this.value)}forall(dt){return!this.tag||dt(this.value)}filter(dt){return!this.tag||dt(this.value)?this:Me.none()}getOr(dt){return this.tag?this.value:dt}or(dt){return this.tag?this:dt}getOrThunk(dt){return this.tag?this.value:dt()}orThunk(dt){return this.tag?this:dt()}getOrDie(dt){if(this.tag)return this.value;throw new Error(dt??"Called getOrDie on None")}static from(dt){return He(dt)?Me.some(dt):Me.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(dt){this.tag&&dt(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}Me.singletonNone=new Me(!1);const Ot=(bt,dt,Kt)=>{for(let qo=0,Ge=bt.length;qo/\btox\-/.test(bt.className),st=(bt,dt)=>bt.dom.isChildOf(dt,bt.getBody()),ut=bt=>dt=>He(dt)&&bt.test(dt.nodeName),Lt=ut(/^(OL|UL|DL)$/),Rt=ut(/^(TH|TD)$/),Ke=(bt,dt,Kt)=>Ot(dt,qo=>Lt(qo)&&!mo(qo),Rt).exists(qo=>qo.nodeName===Kt&&st(bt,qo)),Ut=bt=>{const dt=bt.dom.getParent(bt.selection.getNode(),"ol,ul"),Kt=bt.dom.getStyle(dt,"listStyleType");return Me.from(Kt)},ft=(bt,dt)=>dt!==null&&!bt.dom.isEditable(dt),ue=(bt,dt)=>{const Kt=bt.dom.getParent(dt,"ol,ul,dl");return ft(bt,Kt)&&bt.selection.isEditable()},Ct=(bt,dt)=>{const Kt=bt.selection.getNode();return dt({parents:bt.dom.getParents(Kt),element:Kt}),bt.on("NodeChange",dt),()=>bt.off("NodeChange",dt)},ve=bt=>bt.replace(/\-/g," ").replace(/\b\w/g,dt=>dt.toUpperCase()),ot=bt=>Ee(bt)||bt==="default"?"":bt,bn=(bt,dt)=>Kt=>{const qo=(Ao,Cr)=>{const Ht=Ao.selection.getStart(!0);Kt.setActive(Ke(Ao,Cr,dt)),Kt.setEnabled(!ue(Ao,Ht)&&Ao.selection.isEditable())};return Ct(bt,Ao=>qo(bt,Ao.parents))},ln=(bt,dt,Kt,qo,Ge,Ao)=>{bt.ui.registry.addSplitButton(dt,{tooltip:Kt,icon:Ge==="OL"?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:Cr=>{const Ht=We.map(Ao,pt=>{const $t=Ge==="OL"?"num":"bull",ks=pt==="disc"||pt==="decimal"?"default":pt,cn=ot(pt),fn=ve(pt);return{type:"choiceitem",value:cn,icon:"list-"+$t+"-"+ks,text:fn}});Cr(Ht)},onAction:()=>bt.execCommand(qo),onItemAction:(Cr,Ht)=>{g(bt,Ge,Ht)},select:Cr=>Ut(bt).map(pt=>Cr===pt).getOr(!1),onSetup:bn(bt,Ge)})},uo=(bt,dt,Kt,qo,Ge,Ao)=>{bt.ui.registry.addToggleButton(dt,{active:!1,tooltip:Kt,icon:Ge==="OL"?"ordered-list":"unordered-list",onSetup:bn(bt,Ge),onAction:()=>bt.queryCommandState(qo)||Ao===""?bt.execCommand(qo):g(bt,Ge,Ao)})},Fe=(bt,dt,Kt,qo,Ge,Ao)=>{Ao.length>1?ln(bt,dt,Kt,qo,Ge,Ao):uo(bt,dt,Kt,qo,Ge,ot(Ao[0]))},Gt=bt=>{Fe(bt,"numlist","Numbered list","InsertOrderedList","OL",te(bt)),Fe(bt,"bullist","Bullet list","InsertUnorderedList","UL",ce(bt))};var D=()=>{w.add("advlist",bt=>{bt.hasPlugin("lists")?(W(bt),Gt(bt),S(bt)):console.error("Please use the Lists plugin together with the List Styles plugin.")})};D()})();(function(){var w=tinymce.util.Tools.resolve("tinymce.PluginManager");const g=(Ee,He)=>{Ee.focus(),Ee.undoManager.transact(()=>{Ee.setContent(He)}),Ee.selection.setCursorLocation(),Ee.nodeChanged()},S=Ee=>Ee.getContent({source_view:!0}),L=Ee=>{const He=S(Ee);Ee.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:He},onSubmit:We=>{g(Ee,We.getData().code),We.close()}})},W=Ee=>{Ee.addCommand("mceCodeEditor",()=>{L(Ee)})},te=Ee=>{const He=()=>Ee.execCommand("mceCodeEditor");Ee.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:He}),Ee.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:He})};var ce=()=>{w.add("code",Ee=>(W(Ee),te(Ee),{}))};ce()})();(function(){var w=tinymce.util.Tools.resolve("tinymce.PluginManager");const g=Bt=>yt=>Bt===yt,S=g(null),L=g(void 0),W=Bt=>Bt==null,te=Bt=>!W(Bt),ce=()=>{},He=(Bt=>()=>Bt)(!1);class We{constructor(yt,rt){this.tag=yt,this.value=rt}static some(yt){return new We(!0,yt)}static none(){return We.singletonNone}fold(yt,rt){return this.tag?rt(this.value):yt()}isSome(){return this.tag}isNone(){return!this.tag}map(yt){return this.tag?We.some(yt(this.value)):We.none()}bind(yt){return this.tag?yt(this.value):We.none()}exists(yt){return this.tag&&yt(this.value)}forall(yt){return!this.tag||yt(this.value)}filter(yt){return!this.tag||yt(this.value)?this:We.none()}getOr(yt){return this.tag?this.value:yt}or(yt){return this.tag?this:yt}getOrThunk(yt){return this.tag?this.value:yt()}orThunk(yt){return this.tag?this:yt()}getOrDie(yt){if(this.tag)return this.value;throw new Error(yt??"Called getOrDie on None")}static from(yt){return te(yt)?We.some(yt):We.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(yt){this.tag&&yt(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}We.singletonNone=new We(!1);const Me=(Bt,yt)=>{for(let rt=0,ao=Bt.length;rt{const rt=Bt.length,ao=new Array(rt);for(let ko=0;ko{for(let rt=0,ao=Bt.length;rt{let yt=Bt;return{get:()=>yt,set:ko=>{yt=ko}}},ut=(Bt,yt)=>{let rt=null;const ao=()=>{S(rt)||(clearTimeout(rt),rt=null)};return{cancel:ao,throttle:(...tn)=>{ao(),rt=setTimeout(()=>{rt=null,Bt.apply(null,tn)},yt)}}},Lt=(Bt,yt)=>{Bt.insertContent(yt)},Rt=Object.keys,Ke=Object.hasOwnProperty,Ut=(Bt,yt)=>{const rt=Rt(Bt);for(let ao=0,ko=rt.length;aoue(Bt,(rt,ao)=>({k:ao,v:yt(rt,ao)})),ue=(Bt,yt)=>{const rt={};return Ut(Bt,(ao,ko)=>{const tn=yt(ao,ko);rt[tn.k]=tn.v}),rt},Ct=(Bt,yt)=>Ke.call(Bt,yt),bn=(Bt=>(...yt)=>{if(yt.length===0)throw new Error("Can't merge zero objects");const rt={};for(let ao=0;aoyt),ln=Bt=>{const yt=st(We.none()),rt=()=>yt.get().each(Bt);return{clear:()=>{rt(),yt.set(We.none())},isSet:()=>yt.get().isSome(),get:()=>yt.get(),set:rs=>{rt(),yt.set(We.some(rs))}}},uo=()=>{const Bt=ln(ce);return{...Bt,on:rt=>Bt.get().each(rt)}},Fe=(Bt,yt,rt)=>yt===""||Bt.length>=yt.length&&Bt.substr(rt,rt+yt.length)===yt,Gt=(Bt,yt,rt=0,ao)=>{const ko=Bt.indexOf(yt,rt);return ko!==-1?L(ao)?!0:ko+yt.length<=ao:!1},D=(Bt,yt)=>Fe(Bt,yt,0);var bt=tinymce.util.Tools.resolve("tinymce.Resource");const dt="tinymce.plugins.emoticons",Kt=Bt=>yt=>yt.options.get(Bt),qo=(Bt,yt)=>{const rt=Bt.options.register;rt("emoticons_database",{processor:"string",default:"emojis"}),rt("emoticons_database_url",{processor:"string",default:`${yt}/js/${Ge(Bt)}${Bt.suffix}.js`}),rt("emoticons_database_id",{processor:"string",default:dt}),rt("emoticons_append",{processor:"object",default:{}}),rt("emoticons_images_url",{processor:"string",default:"https://cdnjs.cloudflare.com/ajax/libs/twemoji/15.1.0/72x72/"})},Ge=Kt("emoticons_database"),Ao=Kt("emoticons_database_url"),Cr=Kt("emoticons_database_id"),Ht=Kt("emoticons_append"),pt=Kt("emoticons_images_url"),$t="All",ks={symbols:"Symbols",people:"People",animals_and_nature:"Animals and Nature",food_and_drink:"Food and Drink",activity:"Activity",travel_and_places:"Travel and Places",objects:"Objects",flags:"Flags",user:"User Defined"},cn=(Bt,yt)=>Ct(Bt,yt)?Bt[yt]:yt,fn=Bt=>{const yt=Ht(Bt);return ft(yt,rt=>({keywords:[],category:"user",...rt}))},zo=(Bt,yt,rt)=>{const ao=uo(),ko=uo(),tn=pt(Bt),On=Is=>D(Is.char,"`src="${tn}${ra}"`):Is.char,rs=Is=>{const yn={},ra=[];Ut(Is,(St,Vo)=>{const an={title:Vo,keywords:St.keywords,char:On(St),category:cn(ks,St.category)},Kr=yn[an.category]!==void 0?yn[an.category]:[];yn[an.category]=Kr.concat([an]),ra.push(an)}),ao.set(yn),ko.set(ra)};Bt.on("init",()=>{bt.load(rt,yt).then(Is=>{const yn=fn(Bt);rs(bn(Is,yn))},Is=>{console.log(`Failed to load emojis: ${Is}`),ao.set({}),ko.set([])})});const Zn=Is=>Is===$t?Bn():ao.get().bind(yn=>We.from(yn[Is])).getOr([]),Bn=()=>ko.get().getOr([]),$s=()=>[$t].concat(Rt(ao.get().getOr({}))),sa=()=>os()?Promise.resolve(!0):new Promise((Is,yn)=>{let ra=15;const St=setInterval(()=>{os()?(clearInterval(St),Is(!0)):(ra--,ra<0&&(console.log("Could not load emojis from url: "+yt),clearInterval(St),yn(!1)))},100)}),os=()=>ao.isSet()&&ko.isSet();return{listCategories:$s,hasLoaded:os,waitForLoad:sa,listAll:Bn,listCategory:Zn}},j=(Bt,yt)=>Gt(Bt.title.toLowerCase(),yt)||Me(Bt.keywords,rt=>Gt(rt.toLowerCase(),yt)),Fr=(Bt,yt,rt)=>{const ao=[],ko=yt.toLowerCase(),tn=rt.fold(()=>He,On=>rs=>rs>=On);for(let On=0;On{const rt={pattern:"",results:Fr(yt.listAll(),"",We.some(300))},ao=st($t),ko=$s=>{const sa=$s.getData(),os=ao.get(),Is=yt.listCategory(os),yn=Fr(Is,sa[Cs],os===$t?We.some(300):We.none());$s.setData({results:yn})},tn=ut($s=>{ko($s)},200),On={label:"Search",type:"input",name:Cs},rs={type:"collection",name:"results"},Zn=()=>({title:"Emojis",size:"normal",body:{type:"tabpanel",tabs:Ot(yt.listCategories(),sa=>({title:sa,name:sa,items:[On,rs]}))},initialData:rt,onTabChange:(sa,os)=>{ao.set(os.newTabName),tn.throttle(sa)},onChange:tn.throttle,onAction:(sa,os)=>{os.name==="results"&&(Lt(Bt,os.value),sa.close())},buttons:[{type:"cancel",text:"Close",primary:!0}]}),Bn=Bt.windowManager.open(Zn());Bn.focus(Cs),yt.hasLoaded()||(Bn.block("Loading emojis..."),yt.waitForLoad().then(()=>{Bn.redial(Zn()),tn.throttle(Bn),Bn.focus(Cs),Bn.unblock()}).catch($s=>{Bn.redial({title:"Emojis",body:{type:"panel",items:[{type:"alertbanner",level:"error",icon:"warning",text:"Could not load emojis"}]},buttons:[{type:"cancel",text:"Close",primary:!0}],initialData:{pattern:"",results:[]}}),Bn.focus(Cs),Bn.unblock()}))},hi=(Bt,yt)=>{Bt.addCommand("mceEmoticons",()=>Sn(Bt,yt))},Wi=Bt=>{Bt.on("PreInit",()=>{Bt.parser.addAttributeFilter("data-emoticon",yt=>{mo(yt,rt=>{rt.attr("data-mce-resize","false"),rt.attr("data-mce-placeholder","1")})})})},mn=(Bt,yt)=>{Bt.ui.registry.addAutocompleter("emoticons",{trigger:":",columns:"auto",minChars:2,fetch:(rt,ao)=>yt.waitForLoad().then(()=>{const ko=yt.listAll();return Fr(ko,rt,We.some(ao))}),onAction:(rt,ao,ko)=>{Bt.selection.setRng(ao),Bt.insertContent(ko),rt.hide()}})},Ln=Bt=>yt=>{const rt=()=>{yt.setEnabled(Bt.selection.isEditable())};return Bt.on("NodeChange",rt),rt(),()=>{Bt.off("NodeChange",rt)}},dn=Bt=>{const yt=()=>Bt.execCommand("mceEmoticons");Bt.ui.registry.addButton("emoticons",{tooltip:"Emojis",icon:"emoji",onAction:yt,onSetup:Ln(Bt)}),Bt.ui.registry.addMenuItem("emoticons",{text:"Emojis...",icon:"emoji",onAction:yt,onSetup:Ln(Bt)})};var Be=()=>{w.add("emoticons",(Bt,yt)=>{qo(Bt,yt);const rt=Ao(Bt),ao=Cr(Bt),ko=zo(Bt,rt,ao);return hi(Bt,ko),dn(Bt),mn(Bt,ko),Wi(Bt),{getAllEmojis:()=>ko.waitForLoad().then(()=>ko.listAll())}})};Be()})();window.tinymce.Resource.add("tinymce.plugins.emoticons",{grinning:{keywords:["face","smile","happy","joy",":D","grin"],char:"😀",fitzpatrick_scale:!1,category:"people"},grimacing:{keywords:["face","grimace","teeth"],char:"😬",fitzpatrick_scale:!1,category:"people"},grin:{keywords:["face","happy","smile","joy","kawaii"],char:"😁",fitzpatrick_scale:!1,category:"people"},joy:{keywords:["face","cry","tears","weep","happy","happytears","haha"],char:"😂",fitzpatrick_scale:!1,category:"people"},rofl:{keywords:["face","rolling","floor","laughing","lol","haha"],char:"🤣",fitzpatrick_scale:!1,category:"people"},partying:{keywords:["face","celebration","woohoo"],char:"🥳",fitzpatrick_scale:!1,category:"people"},smiley:{keywords:["face","happy","joy","haha",":D",":)","smile","funny"],char:"😃",fitzpatrick_scale:!1,category:"people"},smile:{keywords:["face","happy","joy","funny","haha","laugh","like",":D",":)"],char:"😄",fitzpatrick_scale:!1,category:"people"},sweat_smile:{keywords:["face","hot","happy","laugh","sweat","smile","relief"],char:"😅",fitzpatrick_scale:!1,category:"people"},laughing:{keywords:["happy","joy","lol","satisfied","haha","face","glad","XD","laugh"],char:"😆",fitzpatrick_scale:!1,category:"people"},innocent:{keywords:["face","angel","heaven","halo"],char:"😇",fitzpatrick_scale:!1,category:"people"},wink:{keywords:["face","happy","mischievous","secret",";)","smile","eye"],char:"😉",fitzpatrick_scale:!1,category:"people"},blush:{keywords:["face","smile","happy","flushed","crush","embarrassed","shy","joy"],char:"😊",fitzpatrick_scale:!1,category:"people"},slightly_smiling_face:{keywords:["face","smile"],char:"🙂",fitzpatrick_scale:!1,category:"people"},upside_down_face:{keywords:["face","flipped","silly","smile"],char:"🙃",fitzpatrick_scale:!1,category:"people"},relaxed:{keywords:["face","blush","massage","happiness"],char:"☺️",fitzpatrick_scale:!1,category:"people"},yum:{keywords:["happy","joy","tongue","smile","face","silly","yummy","nom","delicious","savouring"],char:"😋",fitzpatrick_scale:!1,category:"people"},relieved:{keywords:["face","relaxed","phew","massage","happiness"],char:"😌",fitzpatrick_scale:!1,category:"people"},heart_eyes:{keywords:["face","love","like","affection","valentines","infatuation","crush","heart"],char:"😍",fitzpatrick_scale:!1,category:"people"},smiling_face_with_three_hearts:{keywords:["face","love","like","affection","valentines","infatuation","crush","hearts","adore"],char:"🥰",fitzpatrick_scale:!1,category:"people"},kissing_heart:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:"😘",fitzpatrick_scale:!1,category:"people"},kissing:{keywords:["love","like","face","3","valentines","infatuation","kiss"],char:"😗",fitzpatrick_scale:!1,category:"people"},kissing_smiling_eyes:{keywords:["face","affection","valentines","infatuation","kiss"],char:"😙",fitzpatrick_scale:!1,category:"people"},kissing_closed_eyes:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:"😚",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_winking_eye:{keywords:["face","prank","childish","playful","mischievous","smile","wink","tongue"],char:"😜",fitzpatrick_scale:!1,category:"people"},zany:{keywords:["face","goofy","crazy"],char:"🤪",fitzpatrick_scale:!1,category:"people"},raised_eyebrow:{keywords:["face","distrust","scepticism","disapproval","disbelief","surprise"],char:"🤨",fitzpatrick_scale:!1,category:"people"},monocle:{keywords:["face","stuffy","wealthy"],char:"🧐",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_closed_eyes:{keywords:["face","prank","playful","mischievous","smile","tongue"],char:"😝",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue:{keywords:["face","prank","childish","playful","mischievous","smile","tongue"],char:"😛",fitzpatrick_scale:!1,category:"people"},money_mouth_face:{keywords:["face","rich","dollar","money"],char:"🤑",fitzpatrick_scale:!1,category:"people"},nerd_face:{keywords:["face","nerdy","geek","dork"],char:"🤓",fitzpatrick_scale:!1,category:"people"},sunglasses:{keywords:["face","cool","smile","summer","beach","sunglass"],char:"😎",fitzpatrick_scale:!1,category:"people"},star_struck:{keywords:["face","smile","starry","eyes","grinning"],char:"🤩",fitzpatrick_scale:!1,category:"people"},clown_face:{keywords:["face"],char:"🤡",fitzpatrick_scale:!1,category:"people"},cowboy_hat_face:{keywords:["face","cowgirl","hat"],char:"🤠",fitzpatrick_scale:!1,category:"people"},hugs:{keywords:["face","smile","hug"],char:"🤗",fitzpatrick_scale:!1,category:"people"},smirk:{keywords:["face","smile","mean","prank","smug","sarcasm"],char:"😏",fitzpatrick_scale:!1,category:"people"},no_mouth:{keywords:["face","hellokitty"],char:"😶",fitzpatrick_scale:!1,category:"people"},neutral_face:{keywords:["indifference","meh",":|","neutral"],char:"😐",fitzpatrick_scale:!1,category:"people"},expressionless:{keywords:["face","indifferent","-_-","meh","deadpan"],char:"😑",fitzpatrick_scale:!1,category:"people"},unamused:{keywords:["indifference","bored","straight face","serious","sarcasm","unimpressed","skeptical","dubious","side_eye"],char:"😒",fitzpatrick_scale:!1,category:"people"},roll_eyes:{keywords:["face","eyeroll","frustrated"],char:"🙄",fitzpatrick_scale:!1,category:"people"},thinking:{keywords:["face","hmmm","think","consider"],char:"🤔",fitzpatrick_scale:!1,category:"people"},lying_face:{keywords:["face","lie","pinocchio"],char:"🤥",fitzpatrick_scale:!1,category:"people"},hand_over_mouth:{keywords:["face","whoops","shock","surprise"],char:"🤭",fitzpatrick_scale:!1,category:"people"},shushing:{keywords:["face","quiet","shhh"],char:"🤫",fitzpatrick_scale:!1,category:"people"},symbols_over_mouth:{keywords:["face","swearing","cursing","cussing","profanity","expletive"],char:"🤬",fitzpatrick_scale:!1,category:"people"},exploding_head:{keywords:["face","shocked","mind","blown"],char:"🤯",fitzpatrick_scale:!1,category:"people"},flushed:{keywords:["face","blush","shy","flattered"],char:"😳",fitzpatrick_scale:!1,category:"people"},disappointed:{keywords:["face","sad","upset","depressed",":("],char:"😞",fitzpatrick_scale:!1,category:"people"},worried:{keywords:["face","concern","nervous",":("],char:"😟",fitzpatrick_scale:!1,category:"people"},angry:{keywords:["mad","face","annoyed","frustrated"],char:"😠",fitzpatrick_scale:!1,category:"people"},rage:{keywords:["angry","mad","hate","despise"],char:"😡",fitzpatrick_scale:!1,category:"people"},pensive:{keywords:["face","sad","depressed","upset"],char:"😔",fitzpatrick_scale:!1,category:"people"},confused:{keywords:["face","indifference","huh","weird","hmmm",":/"],char:"😕",fitzpatrick_scale:!1,category:"people"},slightly_frowning_face:{keywords:["face","frowning","disappointed","sad","upset"],char:"🙁",fitzpatrick_scale:!1,category:"people"},frowning_face:{keywords:["face","sad","upset","frown"],char:"☹",fitzpatrick_scale:!1,category:"people"},persevere:{keywords:["face","sick","no","upset","oops"],char:"😣",fitzpatrick_scale:!1,category:"people"},confounded:{keywords:["face","confused","sick","unwell","oops",":S"],char:"😖",fitzpatrick_scale:!1,category:"people"},tired_face:{keywords:["sick","whine","upset","frustrated"],char:"😫",fitzpatrick_scale:!1,category:"people"},weary:{keywords:["face","tired","sleepy","sad","frustrated","upset"],char:"😩",fitzpatrick_scale:!1,category:"people"},pleading:{keywords:["face","begging","mercy"],char:"🥺",fitzpatrick_scale:!1,category:"people"},triumph:{keywords:["face","gas","phew","proud","pride"],char:"😤",fitzpatrick_scale:!1,category:"people"},open_mouth:{keywords:["face","surprise","impressed","wow","whoa",":O"],char:"😮",fitzpatrick_scale:!1,category:"people"},scream:{keywords:["face","munch","scared","omg"],char:"😱",fitzpatrick_scale:!1,category:"people"},fearful:{keywords:["face","scared","terrified","nervous","oops","huh"],char:"😨",fitzpatrick_scale:!1,category:"people"},cold_sweat:{keywords:["face","nervous","sweat"],char:"😰",fitzpatrick_scale:!1,category:"people"},hushed:{keywords:["face","woo","shh"],char:"😯",fitzpatrick_scale:!1,category:"people"},frowning:{keywords:["face","aw","what"],char:"😦",fitzpatrick_scale:!1,category:"people"},anguished:{keywords:["face","stunned","nervous"],char:"😧",fitzpatrick_scale:!1,category:"people"},cry:{keywords:["face","tears","sad","depressed","upset",":'("],char:"😢",fitzpatrick_scale:!1,category:"people"},disappointed_relieved:{keywords:["face","phew","sweat","nervous"],char:"😥",fitzpatrick_scale:!1,category:"people"},drooling_face:{keywords:["face"],char:"🤤",fitzpatrick_scale:!1,category:"people"},sleepy:{keywords:["face","tired","rest","nap"],char:"😪",fitzpatrick_scale:!1,category:"people"},sweat:{keywords:["face","hot","sad","tired","exercise"],char:"😓",fitzpatrick_scale:!1,category:"people"},hot:{keywords:["face","feverish","heat","red","sweating"],char:"🥵",fitzpatrick_scale:!1,category:"people"},cold:{keywords:["face","blue","freezing","frozen","frostbite","icicles"],char:"🥶",fitzpatrick_scale:!1,category:"people"},sob:{keywords:["face","cry","tears","sad","upset","depressed"],char:"😭",fitzpatrick_scale:!1,category:"people"},dizzy_face:{keywords:["spent","unconscious","xox","dizzy"],char:"😵",fitzpatrick_scale:!1,category:"people"},astonished:{keywords:["face","xox","surprised","poisoned"],char:"😲",fitzpatrick_scale:!1,category:"people"},zipper_mouth_face:{keywords:["face","sealed","zipper","secret"],char:"🤐",fitzpatrick_scale:!1,category:"people"},nauseated_face:{keywords:["face","vomit","gross","green","sick","throw up","ill"],char:"🤢",fitzpatrick_scale:!1,category:"people"},sneezing_face:{keywords:["face","gesundheit","sneeze","sick","allergy"],char:"🤧",fitzpatrick_scale:!1,category:"people"},vomiting:{keywords:["face","sick"],char:"🤮",fitzpatrick_scale:!1,category:"people"},mask:{keywords:["face","sick","ill","disease"],char:"😷",fitzpatrick_scale:!1,category:"people"},face_with_thermometer:{keywords:["sick","temperature","thermometer","cold","fever"],char:"🤒",fitzpatrick_scale:!1,category:"people"},face_with_head_bandage:{keywords:["injured","clumsy","bandage","hurt"],char:"🤕",fitzpatrick_scale:!1,category:"people"},woozy:{keywords:["face","dizzy","intoxicated","tipsy","wavy"],char:"🥴",fitzpatrick_scale:!1,category:"people"},sleeping:{keywords:["face","tired","sleepy","night","zzz"],char:"😴",fitzpatrick_scale:!1,category:"people"},zzz:{keywords:["sleepy","tired","dream"],char:"💤",fitzpatrick_scale:!1,category:"people"},poop:{keywords:["hankey","shitface","fail","turd","shit"],char:"💩",fitzpatrick_scale:!1,category:"people"},smiling_imp:{keywords:["devil","horns"],char:"😈",fitzpatrick_scale:!1,category:"people"},imp:{keywords:["devil","angry","horns"],char:"👿",fitzpatrick_scale:!1,category:"people"},japanese_ogre:{keywords:["monster","red","mask","halloween","scary","creepy","devil","demon","japanese","ogre"],char:"👹",fitzpatrick_scale:!1,category:"people"},japanese_goblin:{keywords:["red","evil","mask","monster","scary","creepy","japanese","goblin"],char:"👺",fitzpatrick_scale:!1,category:"people"},skull:{keywords:["dead","skeleton","creepy","death"],char:"💀",fitzpatrick_scale:!1,category:"people"},ghost:{keywords:["halloween","spooky","scary"],char:"👻",fitzpatrick_scale:!1,category:"people"},alien:{keywords:["UFO","paul","weird","outer_space"],char:"👽",fitzpatrick_scale:!1,category:"people"},robot:{keywords:["computer","machine","bot"],char:"🤖",fitzpatrick_scale:!1,category:"people"},smiley_cat:{keywords:["animal","cats","happy","smile"],char:"😺",fitzpatrick_scale:!1,category:"people"},smile_cat:{keywords:["animal","cats","smile"],char:"😸",fitzpatrick_scale:!1,category:"people"},joy_cat:{keywords:["animal","cats","haha","happy","tears"],char:"😹",fitzpatrick_scale:!1,category:"people"},heart_eyes_cat:{keywords:["animal","love","like","affection","cats","valentines","heart"],char:"😻",fitzpatrick_scale:!1,category:"people"},smirk_cat:{keywords:["animal","cats","smirk"],char:"😼",fitzpatrick_scale:!1,category:"people"},kissing_cat:{keywords:["animal","cats","kiss"],char:"😽",fitzpatrick_scale:!1,category:"people"},scream_cat:{keywords:["animal","cats","munch","scared","scream"],char:"🙀",fitzpatrick_scale:!1,category:"people"},crying_cat_face:{keywords:["animal","tears","weep","sad","cats","upset","cry"],char:"😿",fitzpatrick_scale:!1,category:"people"},pouting_cat:{keywords:["animal","cats"],char:"😾",fitzpatrick_scale:!1,category:"people"},palms_up:{keywords:["hands","gesture","cupped","prayer"],char:"🤲",fitzpatrick_scale:!0,category:"people"},raised_hands:{keywords:["gesture","hooray","yea","celebration","hands"],char:"🙌",fitzpatrick_scale:!0,category:"people"},clap:{keywords:["hands","praise","applause","congrats","yay"],char:"👏",fitzpatrick_scale:!0,category:"people"},wave:{keywords:["hands","gesture","goodbye","solong","farewell","hello","hi","palm"],char:"👋",fitzpatrick_scale:!0,category:"people"},call_me_hand:{keywords:["hands","gesture"],char:"🤙",fitzpatrick_scale:!0,category:"people"},"+1":{keywords:["thumbsup","yes","awesome","good","agree","accept","cool","hand","like"],char:"👍",fitzpatrick_scale:!0,category:"people"},"-1":{keywords:["thumbsdown","no","dislike","hand"],char:"👎",fitzpatrick_scale:!0,category:"people"},facepunch:{keywords:["angry","violence","fist","hit","attack","hand"],char:"👊",fitzpatrick_scale:!0,category:"people"},fist:{keywords:["fingers","hand","grasp"],char:"✊",fitzpatrick_scale:!0,category:"people"},fist_left:{keywords:["hand","fistbump"],char:"🤛",fitzpatrick_scale:!0,category:"people"},fist_right:{keywords:["hand","fistbump"],char:"🤜",fitzpatrick_scale:!0,category:"people"},v:{keywords:["fingers","ohyeah","hand","peace","victory","two"],char:"✌",fitzpatrick_scale:!0,category:"people"},ok_hand:{keywords:["fingers","limbs","perfect","ok","okay"],char:"👌",fitzpatrick_scale:!0,category:"people"},raised_hand:{keywords:["fingers","stop","highfive","palm","ban"],char:"✋",fitzpatrick_scale:!0,category:"people"},raised_back_of_hand:{keywords:["fingers","raised","backhand"],char:"🤚",fitzpatrick_scale:!0,category:"people"},open_hands:{keywords:["fingers","butterfly","hands","open"],char:"👐",fitzpatrick_scale:!0,category:"people"},muscle:{keywords:["arm","flex","hand","summer","strong","biceps"],char:"💪",fitzpatrick_scale:!0,category:"people"},pray:{keywords:["please","hope","wish","namaste","highfive"],char:"🙏",fitzpatrick_scale:!0,category:"people"},foot:{keywords:["kick","stomp"],char:"🦶",fitzpatrick_scale:!0,category:"people"},leg:{keywords:["kick","limb"],char:"🦵",fitzpatrick_scale:!0,category:"people"},handshake:{keywords:["agreement","shake"],char:"🤝",fitzpatrick_scale:!1,category:"people"},point_up:{keywords:["hand","fingers","direction","up"],char:"☝",fitzpatrick_scale:!0,category:"people"},point_up_2:{keywords:["fingers","hand","direction","up"],char:"👆",fitzpatrick_scale:!0,category:"people"},point_down:{keywords:["fingers","hand","direction","down"],char:"👇",fitzpatrick_scale:!0,category:"people"},point_left:{keywords:["direction","fingers","hand","left"],char:"👈",fitzpatrick_scale:!0,category:"people"},point_right:{keywords:["fingers","hand","direction","right"],char:"👉",fitzpatrick_scale:!0,category:"people"},fu:{keywords:["hand","fingers","rude","middle","flipping"],char:"🖕",fitzpatrick_scale:!0,category:"people"},raised_hand_with_fingers_splayed:{keywords:["hand","fingers","palm"],char:"🖐",fitzpatrick_scale:!0,category:"people"},love_you:{keywords:["hand","fingers","gesture"],char:"🤟",fitzpatrick_scale:!0,category:"people"},metal:{keywords:["hand","fingers","evil_eye","sign_of_horns","rock_on"],char:"🤘",fitzpatrick_scale:!0,category:"people"},crossed_fingers:{keywords:["good","lucky"],char:"🤞",fitzpatrick_scale:!0,category:"people"},vulcan_salute:{keywords:["hand","fingers","spock","star trek"],char:"🖖",fitzpatrick_scale:!0,category:"people"},writing_hand:{keywords:["lower_left_ballpoint_pen","stationery","write","compose"],char:"✍",fitzpatrick_scale:!0,category:"people"},selfie:{keywords:["camera","phone"],char:"🤳",fitzpatrick_scale:!0,category:"people"},nail_care:{keywords:["beauty","manicure","finger","fashion","nail"],char:"💅",fitzpatrick_scale:!0,category:"people"},lips:{keywords:["mouth","kiss"],char:"👄",fitzpatrick_scale:!1,category:"people"},tooth:{keywords:["teeth","dentist"],char:"🦷",fitzpatrick_scale:!1,category:"people"},tongue:{keywords:["mouth","playful"],char:"👅",fitzpatrick_scale:!1,category:"people"},ear:{keywords:["face","hear","sound","listen"],char:"👂",fitzpatrick_scale:!0,category:"people"},nose:{keywords:["smell","sniff"],char:"👃",fitzpatrick_scale:!0,category:"people"},eye:{keywords:["face","look","see","watch","stare"],char:"👁",fitzpatrick_scale:!1,category:"people"},eyes:{keywords:["look","watch","stalk","peek","see"],char:"👀",fitzpatrick_scale:!1,category:"people"},brain:{keywords:["smart","intelligent"],char:"🧠",fitzpatrick_scale:!1,category:"people"},bust_in_silhouette:{keywords:["user","person","human"],char:"👤",fitzpatrick_scale:!1,category:"people"},busts_in_silhouette:{keywords:["user","person","human","group","team"],char:"👥",fitzpatrick_scale:!1,category:"people"},speaking_head:{keywords:["user","person","human","sing","say","talk"],char:"🗣",fitzpatrick_scale:!1,category:"people"},baby:{keywords:["child","boy","girl","toddler"],char:"👶",fitzpatrick_scale:!0,category:"people"},child:{keywords:["gender-neutral","young"],char:"🧒",fitzpatrick_scale:!0,category:"people"},boy:{keywords:["man","male","guy","teenager"],char:"👦",fitzpatrick_scale:!0,category:"people"},girl:{keywords:["female","woman","teenager"],char:"👧",fitzpatrick_scale:!0,category:"people"},adult:{keywords:["gender-neutral","person"],char:"🧑",fitzpatrick_scale:!0,category:"people"},man:{keywords:["mustache","father","dad","guy","classy","sir","moustache"],char:"👨",fitzpatrick_scale:!0,category:"people"},woman:{keywords:["female","girls","lady"],char:"👩",fitzpatrick_scale:!0,category:"people"},blonde_woman:{keywords:["woman","female","girl","blonde","person"],char:"👱‍♀️",fitzpatrick_scale:!0,category:"people"},blonde_man:{keywords:["man","male","boy","blonde","guy","person"],char:"👱",fitzpatrick_scale:!0,category:"people"},bearded_person:{keywords:["person","bewhiskered"],char:"🧔",fitzpatrick_scale:!0,category:"people"},older_adult:{keywords:["human","elder","senior","gender-neutral"],char:"🧓",fitzpatrick_scale:!0,category:"people"},older_man:{keywords:["human","male","men","old","elder","senior"],char:"👴",fitzpatrick_scale:!0,category:"people"},older_woman:{keywords:["human","female","women","lady","old","elder","senior"],char:"👵",fitzpatrick_scale:!0,category:"people"},man_with_gua_pi_mao:{keywords:["male","boy","chinese"],char:"👲",fitzpatrick_scale:!0,category:"people"},woman_with_headscarf:{keywords:["female","hijab","mantilla","tichel"],char:"🧕",fitzpatrick_scale:!0,category:"people"},woman_with_turban:{keywords:["female","indian","hinduism","arabs","woman"],char:"👳‍♀️",fitzpatrick_scale:!0,category:"people"},man_with_turban:{keywords:["male","indian","hinduism","arabs"],char:"👳",fitzpatrick_scale:!0,category:"people"},policewoman:{keywords:["woman","police","law","legal","enforcement","arrest","911","female"],char:"👮‍♀️",fitzpatrick_scale:!0,category:"people"},policeman:{keywords:["man","police","law","legal","enforcement","arrest","911"],char:"👮",fitzpatrick_scale:!0,category:"people"},construction_worker_woman:{keywords:["female","human","wip","build","construction","worker","labor","woman"],char:"👷‍♀️",fitzpatrick_scale:!0,category:"people"},construction_worker_man:{keywords:["male","human","wip","guy","build","construction","worker","labor"],char:"👷",fitzpatrick_scale:!0,category:"people"},guardswoman:{keywords:["uk","gb","british","female","royal","woman"],char:"💂‍♀️",fitzpatrick_scale:!0,category:"people"},guardsman:{keywords:["uk","gb","british","male","guy","royal"],char:"💂",fitzpatrick_scale:!0,category:"people"},female_detective:{keywords:["human","spy","detective","female","woman"],char:"🕵️‍♀️",fitzpatrick_scale:!0,category:"people"},male_detective:{keywords:["human","spy","detective"],char:"🕵",fitzpatrick_scale:!0,category:"people"},woman_health_worker:{keywords:["doctor","nurse","therapist","healthcare","woman","human"],char:"👩‍⚕️",fitzpatrick_scale:!0,category:"people"},man_health_worker:{keywords:["doctor","nurse","therapist","healthcare","man","human"],char:"👨‍⚕️",fitzpatrick_scale:!0,category:"people"},woman_farmer:{keywords:["rancher","gardener","woman","human"],char:"👩‍🌾",fitzpatrick_scale:!0,category:"people"},man_farmer:{keywords:["rancher","gardener","man","human"],char:"👨‍🌾",fitzpatrick_scale:!0,category:"people"},woman_cook:{keywords:["chef","woman","human"],char:"👩‍🍳",fitzpatrick_scale:!0,category:"people"},man_cook:{keywords:["chef","man","human"],char:"👨‍🍳",fitzpatrick_scale:!0,category:"people"},woman_student:{keywords:["graduate","woman","human"],char:"👩‍🎓",fitzpatrick_scale:!0,category:"people"},man_student:{keywords:["graduate","man","human"],char:"👨‍🎓",fitzpatrick_scale:!0,category:"people"},woman_singer:{keywords:["rockstar","entertainer","woman","human"],char:"👩‍🎤",fitzpatrick_scale:!0,category:"people"},man_singer:{keywords:["rockstar","entertainer","man","human"],char:"👨‍🎤",fitzpatrick_scale:!0,category:"people"},woman_teacher:{keywords:["instructor","professor","woman","human"],char:"👩‍🏫",fitzpatrick_scale:!0,category:"people"},man_teacher:{keywords:["instructor","professor","man","human"],char:"👨‍🏫",fitzpatrick_scale:!0,category:"people"},woman_factory_worker:{keywords:["assembly","industrial","woman","human"],char:"👩‍🏭",fitzpatrick_scale:!0,category:"people"},man_factory_worker:{keywords:["assembly","industrial","man","human"],char:"👨‍🏭",fitzpatrick_scale:!0,category:"people"},woman_technologist:{keywords:["coder","developer","engineer","programmer","software","woman","human","laptop","computer"],char:"👩‍💻",fitzpatrick_scale:!0,category:"people"},man_technologist:{keywords:["coder","developer","engineer","programmer","software","man","human","laptop","computer"],char:"👨‍💻",fitzpatrick_scale:!0,category:"people"},woman_office_worker:{keywords:["business","manager","woman","human"],char:"👩‍💼",fitzpatrick_scale:!0,category:"people"},man_office_worker:{keywords:["business","manager","man","human"],char:"👨‍💼",fitzpatrick_scale:!0,category:"people"},woman_mechanic:{keywords:["plumber","woman","human","wrench"],char:"👩‍🔧",fitzpatrick_scale:!0,category:"people"},man_mechanic:{keywords:["plumber","man","human","wrench"],char:"👨‍🔧",fitzpatrick_scale:!0,category:"people"},woman_scientist:{keywords:["biologist","chemist","engineer","physicist","woman","human"],char:"👩‍🔬",fitzpatrick_scale:!0,category:"people"},man_scientist:{keywords:["biologist","chemist","engineer","physicist","man","human"],char:"👨‍🔬",fitzpatrick_scale:!0,category:"people"},woman_artist:{keywords:["painter","woman","human"],char:"👩‍🎨",fitzpatrick_scale:!0,category:"people"},man_artist:{keywords:["painter","man","human"],char:"👨‍🎨",fitzpatrick_scale:!0,category:"people"},woman_firefighter:{keywords:["fireman","woman","human"],char:"👩‍🚒",fitzpatrick_scale:!0,category:"people"},man_firefighter:{keywords:["fireman","man","human"],char:"👨‍🚒",fitzpatrick_scale:!0,category:"people"},woman_pilot:{keywords:["aviator","plane","woman","human"],char:"👩‍✈️",fitzpatrick_scale:!0,category:"people"},man_pilot:{keywords:["aviator","plane","man","human"],char:"👨‍✈️",fitzpatrick_scale:!0,category:"people"},woman_astronaut:{keywords:["space","rocket","woman","human"],char:"👩‍🚀",fitzpatrick_scale:!0,category:"people"},man_astronaut:{keywords:["space","rocket","man","human"],char:"👨‍🚀",fitzpatrick_scale:!0,category:"people"},woman_judge:{keywords:["justice","court","woman","human"],char:"👩‍⚖️",fitzpatrick_scale:!0,category:"people"},man_judge:{keywords:["justice","court","man","human"],char:"👨‍⚖️",fitzpatrick_scale:!0,category:"people"},woman_superhero:{keywords:["woman","female","good","heroine","superpowers"],char:"🦸‍♀️",fitzpatrick_scale:!0,category:"people"},man_superhero:{keywords:["man","male","good","hero","superpowers"],char:"🦸‍♂️",fitzpatrick_scale:!0,category:"people"},woman_supervillain:{keywords:["woman","female","evil","bad","criminal","heroine","superpowers"],char:"🦹‍♀️",fitzpatrick_scale:!0,category:"people"},man_supervillain:{keywords:["man","male","evil","bad","criminal","hero","superpowers"],char:"🦹‍♂️",fitzpatrick_scale:!0,category:"people"},mrs_claus:{keywords:["woman","female","xmas","mother christmas"],char:"🤶",fitzpatrick_scale:!0,category:"people"},santa:{keywords:["festival","man","male","xmas","father christmas"],char:"🎅",fitzpatrick_scale:!0,category:"people"},sorceress:{keywords:["woman","female","mage","witch"],char:"🧙‍♀️",fitzpatrick_scale:!0,category:"people"},wizard:{keywords:["man","male","mage","sorcerer"],char:"🧙‍♂️",fitzpatrick_scale:!0,category:"people"},woman_elf:{keywords:["woman","female"],char:"🧝‍♀️",fitzpatrick_scale:!0,category:"people"},man_elf:{keywords:["man","male"],char:"🧝‍♂️",fitzpatrick_scale:!0,category:"people"},woman_vampire:{keywords:["woman","female"],char:"🧛‍♀️",fitzpatrick_scale:!0,category:"people"},man_vampire:{keywords:["man","male","dracula"],char:"🧛‍♂️",fitzpatrick_scale:!0,category:"people"},woman_zombie:{keywords:["woman","female","undead","walking dead"],char:"🧟‍♀️",fitzpatrick_scale:!1,category:"people"},man_zombie:{keywords:["man","male","dracula","undead","walking dead"],char:"🧟‍♂️",fitzpatrick_scale:!1,category:"people"},woman_genie:{keywords:["woman","female"],char:"🧞‍♀️",fitzpatrick_scale:!1,category:"people"},man_genie:{keywords:["man","male"],char:"🧞‍♂️",fitzpatrick_scale:!1,category:"people"},mermaid:{keywords:["woman","female","merwoman","ariel"],char:"🧜‍♀️",fitzpatrick_scale:!0,category:"people"},merman:{keywords:["man","male","triton"],char:"🧜‍♂️",fitzpatrick_scale:!0,category:"people"},woman_fairy:{keywords:["woman","female"],char:"🧚‍♀️",fitzpatrick_scale:!0,category:"people"},man_fairy:{keywords:["man","male"],char:"🧚‍♂️",fitzpatrick_scale:!0,category:"people"},angel:{keywords:["heaven","wings","halo"],char:"👼",fitzpatrick_scale:!0,category:"people"},pregnant_woman:{keywords:["baby"],char:"🤰",fitzpatrick_scale:!0,category:"people"},breastfeeding:{keywords:["nursing","baby"],char:"🤱",fitzpatrick_scale:!0,category:"people"},princess:{keywords:["girl","woman","female","blond","crown","royal","queen"],char:"👸",fitzpatrick_scale:!0,category:"people"},prince:{keywords:["boy","man","male","crown","royal","king"],char:"🤴",fitzpatrick_scale:!0,category:"people"},bride_with_veil:{keywords:["couple","marriage","wedding","woman","bride"],char:"👰",fitzpatrick_scale:!0,category:"people"},man_in_tuxedo:{keywords:["couple","marriage","wedding","groom"],char:"🤵",fitzpatrick_scale:!0,category:"people"},running_woman:{keywords:["woman","walking","exercise","race","running","female"],char:"🏃‍♀️",fitzpatrick_scale:!0,category:"people"},running_man:{keywords:["man","walking","exercise","race","running"],char:"🏃",fitzpatrick_scale:!0,category:"people"},walking_woman:{keywords:["human","feet","steps","woman","female"],char:"🚶‍♀️",fitzpatrick_scale:!0,category:"people"},walking_man:{keywords:["human","feet","steps"],char:"🚶",fitzpatrick_scale:!0,category:"people"},dancer:{keywords:["female","girl","woman","fun"],char:"💃",fitzpatrick_scale:!0,category:"people"},man_dancing:{keywords:["male","boy","fun","dancer"],char:"🕺",fitzpatrick_scale:!0,category:"people"},dancing_women:{keywords:["female","bunny","women","girls"],char:"👯",fitzpatrick_scale:!1,category:"people"},dancing_men:{keywords:["male","bunny","men","boys"],char:"👯‍♂️",fitzpatrick_scale:!1,category:"people"},couple:{keywords:["pair","people","human","love","date","dating","like","affection","valentines","marriage"],char:"👫",fitzpatrick_scale:!1,category:"people"},two_men_holding_hands:{keywords:["pair","couple","love","like","bromance","friendship","people","human"],char:"👬",fitzpatrick_scale:!1,category:"people"},two_women_holding_hands:{keywords:["pair","friendship","couple","love","like","female","people","human"],char:"👭",fitzpatrick_scale:!1,category:"people"},bowing_woman:{keywords:["woman","female","girl"],char:"🙇‍♀️",fitzpatrick_scale:!0,category:"people"},bowing_man:{keywords:["man","male","boy"],char:"🙇",fitzpatrick_scale:!0,category:"people"},man_facepalming:{keywords:["man","male","boy","disbelief"],char:"🤦‍♂️",fitzpatrick_scale:!0,category:"people"},woman_facepalming:{keywords:["woman","female","girl","disbelief"],char:"🤦‍♀️",fitzpatrick_scale:!0,category:"people"},woman_shrugging:{keywords:["woman","female","girl","confused","indifferent","doubt"],char:"🤷",fitzpatrick_scale:!0,category:"people"},man_shrugging:{keywords:["man","male","boy","confused","indifferent","doubt"],char:"🤷‍♂️",fitzpatrick_scale:!0,category:"people"},tipping_hand_woman:{keywords:["female","girl","woman","human","information"],char:"💁",fitzpatrick_scale:!0,category:"people"},tipping_hand_man:{keywords:["male","boy","man","human","information"],char:"💁‍♂️",fitzpatrick_scale:!0,category:"people"},no_good_woman:{keywords:["female","girl","woman","nope"],char:"🙅",fitzpatrick_scale:!0,category:"people"},no_good_man:{keywords:["male","boy","man","nope"],char:"🙅‍♂️",fitzpatrick_scale:!0,category:"people"},ok_woman:{keywords:["women","girl","female","pink","human","woman"],char:"🙆",fitzpatrick_scale:!0,category:"people"},ok_man:{keywords:["men","boy","male","blue","human","man"],char:"🙆‍♂️",fitzpatrick_scale:!0,category:"people"},raising_hand_woman:{keywords:["female","girl","woman"],char:"🙋",fitzpatrick_scale:!0,category:"people"},raising_hand_man:{keywords:["male","boy","man"],char:"🙋‍♂️",fitzpatrick_scale:!0,category:"people"},pouting_woman:{keywords:["female","girl","woman"],char:"🙎",fitzpatrick_scale:!0,category:"people"},pouting_man:{keywords:["male","boy","man"],char:"🙎‍♂️",fitzpatrick_scale:!0,category:"people"},frowning_woman:{keywords:["female","girl","woman","sad","depressed","discouraged","unhappy"],char:"🙍",fitzpatrick_scale:!0,category:"people"},frowning_man:{keywords:["male","boy","man","sad","depressed","discouraged","unhappy"],char:"🙍‍♂️",fitzpatrick_scale:!0,category:"people"},haircut_woman:{keywords:["female","girl","woman"],char:"💇",fitzpatrick_scale:!0,category:"people"},haircut_man:{keywords:["male","boy","man"],char:"💇‍♂️",fitzpatrick_scale:!0,category:"people"},massage_woman:{keywords:["female","girl","woman","head"],char:"💆",fitzpatrick_scale:!0,category:"people"},massage_man:{keywords:["male","boy","man","head"],char:"💆‍♂️",fitzpatrick_scale:!0,category:"people"},woman_in_steamy_room:{keywords:["female","woman","spa","steamroom","sauna"],char:"🧖‍♀️",fitzpatrick_scale:!0,category:"people"},man_in_steamy_room:{keywords:["male","man","spa","steamroom","sauna"],char:"🧖‍♂️",fitzpatrick_scale:!0,category:"people"},couple_with_heart_woman_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"💑",fitzpatrick_scale:!1,category:"people"},couple_with_heart_woman_woman:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"👩‍❤️‍👩",fitzpatrick_scale:!1,category:"people"},couple_with_heart_man_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"👨‍❤️‍👨",fitzpatrick_scale:!1,category:"people"},couplekiss_man_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:"💏",fitzpatrick_scale:!1,category:"people"},couplekiss_woman_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:"👩‍❤️‍💋‍👩",fitzpatrick_scale:!1,category:"people"},couplekiss_man_man:{keywords:["pair","valentines","love","like","dating","marriage"],char:"👨‍❤️‍💋‍👨",fitzpatrick_scale:!1,category:"people"},family_man_woman_boy:{keywords:["home","parents","child","mom","dad","father","mother","people","human"],char:"👪",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl:{keywords:["home","parents","people","human","child"],char:"👨‍👩‍👧",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👩‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_man_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👩‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:"👨‍👩‍👧‍👧",fitzpatrick_scale:!1,category:"people"},family_woman_woman_boy:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👧",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:"👩‍👩‍👧‍👧",fitzpatrick_scale:!1,category:"people"},family_man_man_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👦",fitzpatrick_scale:!1,category:"people"},family_man_man_girl:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👧",fitzpatrick_scale:!1,category:"people"},family_man_man_girl_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_man_man_boy_boy:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_man_man_girl_girl:{keywords:["home","parents","people","human","children"],char:"👨‍👨‍👧‍👧",fitzpatrick_scale:!1,category:"people"},family_woman_boy:{keywords:["home","parent","people","human","child"],char:"👩‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_girl:{keywords:["home","parent","people","human","child"],char:"👩‍👧",fitzpatrick_scale:!1,category:"people"},family_woman_girl_boy:{keywords:["home","parent","people","human","children"],char:"👩‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_boy_boy:{keywords:["home","parent","people","human","children"],char:"👩‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_woman_girl_girl:{keywords:["home","parent","people","human","children"],char:"👩‍👧‍👧",fitzpatrick_scale:!1,category:"people"},family_man_boy:{keywords:["home","parent","people","human","child"],char:"👨‍👦",fitzpatrick_scale:!1,category:"people"},family_man_girl:{keywords:["home","parent","people","human","child"],char:"👨‍👧",fitzpatrick_scale:!1,category:"people"},family_man_girl_boy:{keywords:["home","parent","people","human","children"],char:"👨‍👧‍👦",fitzpatrick_scale:!1,category:"people"},family_man_boy_boy:{keywords:["home","parent","people","human","children"],char:"👨‍👦‍👦",fitzpatrick_scale:!1,category:"people"},family_man_girl_girl:{keywords:["home","parent","people","human","children"],char:"👨‍👧‍👧",fitzpatrick_scale:!1,category:"people"},yarn:{keywords:["ball","crochet","knit"],char:"🧶",fitzpatrick_scale:!1,category:"people"},thread:{keywords:["needle","sewing","spool","string"],char:"🧵",fitzpatrick_scale:!1,category:"people"},coat:{keywords:["jacket"],char:"🧥",fitzpatrick_scale:!1,category:"people"},labcoat:{keywords:["doctor","experiment","scientist","chemist"],char:"🥼",fitzpatrick_scale:!1,category:"people"},womans_clothes:{keywords:["fashion","shopping_bags","female"],char:"👚",fitzpatrick_scale:!1,category:"people"},tshirt:{keywords:["fashion","cloth","casual","shirt","tee"],char:"👕",fitzpatrick_scale:!1,category:"people"},jeans:{keywords:["fashion","shopping"],char:"👖",fitzpatrick_scale:!1,category:"people"},necktie:{keywords:["shirt","suitup","formal","fashion","cloth","business"],char:"👔",fitzpatrick_scale:!1,category:"people"},dress:{keywords:["clothes","fashion","shopping"],char:"👗",fitzpatrick_scale:!1,category:"people"},bikini:{keywords:["swimming","female","woman","girl","fashion","beach","summer"],char:"👙",fitzpatrick_scale:!1,category:"people"},kimono:{keywords:["dress","fashion","women","female","japanese"],char:"👘",fitzpatrick_scale:!1,category:"people"},lipstick:{keywords:["female","girl","fashion","woman"],char:"💄",fitzpatrick_scale:!1,category:"people"},kiss:{keywords:["face","lips","love","like","affection","valentines"],char:"💋",fitzpatrick_scale:!1,category:"people"},footprints:{keywords:["feet","tracking","walking","beach"],char:"👣",fitzpatrick_scale:!1,category:"people"},flat_shoe:{keywords:["ballet","slip-on","slipper"],char:"🥿",fitzpatrick_scale:!1,category:"people"},high_heel:{keywords:["fashion","shoes","female","pumps","stiletto"],char:"👠",fitzpatrick_scale:!1,category:"people"},sandal:{keywords:["shoes","fashion","flip flops"],char:"👡",fitzpatrick_scale:!1,category:"people"},boot:{keywords:["shoes","fashion"],char:"👢",fitzpatrick_scale:!1,category:"people"},mans_shoe:{keywords:["fashion","male"],char:"👞",fitzpatrick_scale:!1,category:"people"},athletic_shoe:{keywords:["shoes","sports","sneakers"],char:"👟",fitzpatrick_scale:!1,category:"people"},hiking_boot:{keywords:["backpacking","camping","hiking"],char:"🥾",fitzpatrick_scale:!1,category:"people"},socks:{keywords:["stockings","clothes"],char:"🧦",fitzpatrick_scale:!1,category:"people"},gloves:{keywords:["hands","winter","clothes"],char:"🧤",fitzpatrick_scale:!1,category:"people"},scarf:{keywords:["neck","winter","clothes"],char:"🧣",fitzpatrick_scale:!1,category:"people"},womans_hat:{keywords:["fashion","accessories","female","lady","spring"],char:"👒",fitzpatrick_scale:!1,category:"people"},tophat:{keywords:["magic","gentleman","classy","circus"],char:"🎩",fitzpatrick_scale:!1,category:"people"},billed_hat:{keywords:["cap","baseball"],char:"🧢",fitzpatrick_scale:!1,category:"people"},rescue_worker_helmet:{keywords:["construction","build"],char:"⛑",fitzpatrick_scale:!1,category:"people"},mortar_board:{keywords:["school","college","degree","university","graduation","cap","hat","legal","learn","education"],char:"🎓",fitzpatrick_scale:!1,category:"people"},crown:{keywords:["king","kod","leader","royalty","lord"],char:"👑",fitzpatrick_scale:!1,category:"people"},school_satchel:{keywords:["student","education","bag","backpack"],char:"🎒",fitzpatrick_scale:!1,category:"people"},luggage:{keywords:["packing","travel"],char:"🧳",fitzpatrick_scale:!1,category:"people"},pouch:{keywords:["bag","accessories","shopping"],char:"👝",fitzpatrick_scale:!1,category:"people"},purse:{keywords:["fashion","accessories","money","sales","shopping"],char:"👛",fitzpatrick_scale:!1,category:"people"},handbag:{keywords:["fashion","accessory","accessories","shopping"],char:"👜",fitzpatrick_scale:!1,category:"people"},briefcase:{keywords:["business","documents","work","law","legal","job","career"],char:"💼",fitzpatrick_scale:!1,category:"people"},eyeglasses:{keywords:["fashion","accessories","eyesight","nerdy","dork","geek"],char:"👓",fitzpatrick_scale:!1,category:"people"},dark_sunglasses:{keywords:["face","cool","accessories"],char:"🕶",fitzpatrick_scale:!1,category:"people"},goggles:{keywords:["eyes","protection","safety"],char:"🥽",fitzpatrick_scale:!1,category:"people"},ring:{keywords:["wedding","propose","marriage","valentines","diamond","fashion","jewelry","gem","engagement"],char:"💍",fitzpatrick_scale:!1,category:"people"},closed_umbrella:{keywords:["weather","rain","drizzle"],char:"🌂",fitzpatrick_scale:!1,category:"people"},dog:{keywords:["animal","friend","nature","woof","puppy","pet","faithful"],char:"🐶",fitzpatrick_scale:!1,category:"animals_and_nature"},cat:{keywords:["animal","meow","nature","pet","kitten"],char:"🐱",fitzpatrick_scale:!1,category:"animals_and_nature"},mouse:{keywords:["animal","nature","cheese_wedge","rodent"],char:"🐭",fitzpatrick_scale:!1,category:"animals_and_nature"},hamster:{keywords:["animal","nature"],char:"🐹",fitzpatrick_scale:!1,category:"animals_and_nature"},rabbit:{keywords:["animal","nature","pet","spring","magic","bunny"],char:"🐰",fitzpatrick_scale:!1,category:"animals_and_nature"},fox_face:{keywords:["animal","nature","face"],char:"🦊",fitzpatrick_scale:!1,category:"animals_and_nature"},bear:{keywords:["animal","nature","wild"],char:"🐻",fitzpatrick_scale:!1,category:"animals_and_nature"},panda_face:{keywords:["animal","nature","panda"],char:"🐼",fitzpatrick_scale:!1,category:"animals_and_nature"},koala:{keywords:["animal","nature"],char:"🐨",fitzpatrick_scale:!1,category:"animals_and_nature"},tiger:{keywords:["animal","cat","danger","wild","nature","roar"],char:"🐯",fitzpatrick_scale:!1,category:"animals_and_nature"},lion:{keywords:["animal","nature"],char:"🦁",fitzpatrick_scale:!1,category:"animals_and_nature"},cow:{keywords:["beef","ox","animal","nature","moo","milk"],char:"🐮",fitzpatrick_scale:!1,category:"animals_and_nature"},pig:{keywords:["animal","oink","nature"],char:"🐷",fitzpatrick_scale:!1,category:"animals_and_nature"},pig_nose:{keywords:["animal","oink"],char:"🐽",fitzpatrick_scale:!1,category:"animals_and_nature"},frog:{keywords:["animal","nature","croak","toad"],char:"🐸",fitzpatrick_scale:!1,category:"animals_and_nature"},squid:{keywords:["animal","nature","ocean","sea"],char:"🦑",fitzpatrick_scale:!1,category:"animals_and_nature"},octopus:{keywords:["animal","creature","ocean","sea","nature","beach"],char:"🐙",fitzpatrick_scale:!1,category:"animals_and_nature"},shrimp:{keywords:["animal","ocean","nature","seafood"],char:"🦐",fitzpatrick_scale:!1,category:"animals_and_nature"},monkey_face:{keywords:["animal","nature","circus"],char:"🐵",fitzpatrick_scale:!1,category:"animals_and_nature"},gorilla:{keywords:["animal","nature","circus"],char:"🦍",fitzpatrick_scale:!1,category:"animals_and_nature"},see_no_evil:{keywords:["monkey","animal","nature","haha"],char:"🙈",fitzpatrick_scale:!1,category:"animals_and_nature"},hear_no_evil:{keywords:["animal","monkey","nature"],char:"🙉",fitzpatrick_scale:!1,category:"animals_and_nature"},speak_no_evil:{keywords:["monkey","animal","nature","omg"],char:"🙊",fitzpatrick_scale:!1,category:"animals_and_nature"},monkey:{keywords:["animal","nature","banana","circus"],char:"🐒",fitzpatrick_scale:!1,category:"animals_and_nature"},chicken:{keywords:["animal","cluck","nature","bird"],char:"🐔",fitzpatrick_scale:!1,category:"animals_and_nature"},penguin:{keywords:["animal","nature"],char:"🐧",fitzpatrick_scale:!1,category:"animals_and_nature"},bird:{keywords:["animal","nature","fly","tweet","spring"],char:"🐦",fitzpatrick_scale:!1,category:"animals_and_nature"},baby_chick:{keywords:["animal","chicken","bird"],char:"🐤",fitzpatrick_scale:!1,category:"animals_and_nature"},hatching_chick:{keywords:["animal","chicken","egg","born","baby","bird"],char:"🐣",fitzpatrick_scale:!1,category:"animals_and_nature"},hatched_chick:{keywords:["animal","chicken","baby","bird"],char:"🐥",fitzpatrick_scale:!1,category:"animals_and_nature"},duck:{keywords:["animal","nature","bird","mallard"],char:"🦆",fitzpatrick_scale:!1,category:"animals_and_nature"},eagle:{keywords:["animal","nature","bird"],char:"🦅",fitzpatrick_scale:!1,category:"animals_and_nature"},owl:{keywords:["animal","nature","bird","hoot"],char:"🦉",fitzpatrick_scale:!1,category:"animals_and_nature"},bat:{keywords:["animal","nature","blind","vampire"],char:"🦇",fitzpatrick_scale:!1,category:"animals_and_nature"},wolf:{keywords:["animal","nature","wild"],char:"🐺",fitzpatrick_scale:!1,category:"animals_and_nature"},boar:{keywords:["animal","nature"],char:"🐗",fitzpatrick_scale:!1,category:"animals_and_nature"},horse:{keywords:["animal","brown","nature"],char:"🐴",fitzpatrick_scale:!1,category:"animals_and_nature"},unicorn:{keywords:["animal","nature","mystical"],char:"🦄",fitzpatrick_scale:!1,category:"animals_and_nature"},honeybee:{keywords:["animal","insect","nature","bug","spring","honey"],char:"🐝",fitzpatrick_scale:!1,category:"animals_and_nature"},bug:{keywords:["animal","insect","nature","worm"],char:"🐛",fitzpatrick_scale:!1,category:"animals_and_nature"},butterfly:{keywords:["animal","insect","nature","caterpillar"],char:"🦋",fitzpatrick_scale:!1,category:"animals_and_nature"},snail:{keywords:["slow","animal","shell"],char:"🐌",fitzpatrick_scale:!1,category:"animals_and_nature"},beetle:{keywords:["animal","insect","nature","ladybug"],char:"🐞",fitzpatrick_scale:!1,category:"animals_and_nature"},ant:{keywords:["animal","insect","nature","bug"],char:"🐜",fitzpatrick_scale:!1,category:"animals_and_nature"},grasshopper:{keywords:["animal","cricket","chirp"],char:"🦗",fitzpatrick_scale:!1,category:"animals_and_nature"},spider:{keywords:["animal","arachnid"],char:"🕷",fitzpatrick_scale:!1,category:"animals_and_nature"},scorpion:{keywords:["animal","arachnid"],char:"🦂",fitzpatrick_scale:!1,category:"animals_and_nature"},crab:{keywords:["animal","crustacean"],char:"🦀",fitzpatrick_scale:!1,category:"animals_and_nature"},snake:{keywords:["animal","evil","nature","hiss","python"],char:"🐍",fitzpatrick_scale:!1,category:"animals_and_nature"},lizard:{keywords:["animal","nature","reptile"],char:"🦎",fitzpatrick_scale:!1,category:"animals_and_nature"},"t-rex":{keywords:["animal","nature","dinosaur","tyrannosaurus","extinct"],char:"🦖",fitzpatrick_scale:!1,category:"animals_and_nature"},sauropod:{keywords:["animal","nature","dinosaur","brachiosaurus","brontosaurus","diplodocus","extinct"],char:"🦕",fitzpatrick_scale:!1,category:"animals_and_nature"},turtle:{keywords:["animal","slow","nature","tortoise"],char:"🐢",fitzpatrick_scale:!1,category:"animals_and_nature"},tropical_fish:{keywords:["animal","swim","ocean","beach","nemo"],char:"🐠",fitzpatrick_scale:!1,category:"animals_and_nature"},fish:{keywords:["animal","food","nature"],char:"🐟",fitzpatrick_scale:!1,category:"animals_and_nature"},blowfish:{keywords:["animal","nature","food","sea","ocean"],char:"🐡",fitzpatrick_scale:!1,category:"animals_and_nature"},dolphin:{keywords:["animal","nature","fish","sea","ocean","flipper","fins","beach"],char:"🐬",fitzpatrick_scale:!1,category:"animals_and_nature"},shark:{keywords:["animal","nature","fish","sea","ocean","jaws","fins","beach"],char:"🦈",fitzpatrick_scale:!1,category:"animals_and_nature"},whale:{keywords:["animal","nature","sea","ocean"],char:"🐳",fitzpatrick_scale:!1,category:"animals_and_nature"},whale2:{keywords:["animal","nature","sea","ocean"],char:"🐋",fitzpatrick_scale:!1,category:"animals_and_nature"},crocodile:{keywords:["animal","nature","reptile","lizard","alligator"],char:"🐊",fitzpatrick_scale:!1,category:"animals_and_nature"},leopard:{keywords:["animal","nature"],char:"🐆",fitzpatrick_scale:!1,category:"animals_and_nature"},zebra:{keywords:["animal","nature","stripes","safari"],char:"🦓",fitzpatrick_scale:!1,category:"animals_and_nature"},tiger2:{keywords:["animal","nature","roar"],char:"🐅",fitzpatrick_scale:!1,category:"animals_and_nature"},water_buffalo:{keywords:["animal","nature","ox","cow"],char:"🐃",fitzpatrick_scale:!1,category:"animals_and_nature"},ox:{keywords:["animal","cow","beef"],char:"🐂",fitzpatrick_scale:!1,category:"animals_and_nature"},cow2:{keywords:["beef","ox","animal","nature","moo","milk"],char:"🐄",fitzpatrick_scale:!1,category:"animals_and_nature"},deer:{keywords:["animal","nature","horns","venison"],char:"🦌",fitzpatrick_scale:!1,category:"animals_and_nature"},dromedary_camel:{keywords:["animal","hot","desert","hump"],char:"🐪",fitzpatrick_scale:!1,category:"animals_and_nature"},camel:{keywords:["animal","nature","hot","desert","hump"],char:"🐫",fitzpatrick_scale:!1,category:"animals_and_nature"},giraffe:{keywords:["animal","nature","spots","safari"],char:"🦒",fitzpatrick_scale:!1,category:"animals_and_nature"},elephant:{keywords:["animal","nature","nose","th","circus"],char:"🐘",fitzpatrick_scale:!1,category:"animals_and_nature"},rhinoceros:{keywords:["animal","nature","horn"],char:"🦏",fitzpatrick_scale:!1,category:"animals_and_nature"},goat:{keywords:["animal","nature"],char:"🐐",fitzpatrick_scale:!1,category:"animals_and_nature"},ram:{keywords:["animal","sheep","nature"],char:"🐏",fitzpatrick_scale:!1,category:"animals_and_nature"},sheep:{keywords:["animal","nature","wool","shipit"],char:"🐑",fitzpatrick_scale:!1,category:"animals_and_nature"},racehorse:{keywords:["animal","gamble","luck"],char:"🐎",fitzpatrick_scale:!1,category:"animals_and_nature"},pig2:{keywords:["animal","nature"],char:"🐖",fitzpatrick_scale:!1,category:"animals_and_nature"},rat:{keywords:["animal","mouse","rodent"],char:"🐀",fitzpatrick_scale:!1,category:"animals_and_nature"},mouse2:{keywords:["animal","nature","rodent"],char:"🐁",fitzpatrick_scale:!1,category:"animals_and_nature"},rooster:{keywords:["animal","nature","chicken"],char:"🐓",fitzpatrick_scale:!1,category:"animals_and_nature"},turkey:{keywords:["animal","bird"],char:"🦃",fitzpatrick_scale:!1,category:"animals_and_nature"},dove:{keywords:["animal","bird"],char:"🕊",fitzpatrick_scale:!1,category:"animals_and_nature"},dog2:{keywords:["animal","nature","friend","doge","pet","faithful"],char:"🐕",fitzpatrick_scale:!1,category:"animals_and_nature"},poodle:{keywords:["dog","animal","101","nature","pet"],char:"🐩",fitzpatrick_scale:!1,category:"animals_and_nature"},cat2:{keywords:["animal","meow","pet","cats"],char:"🐈",fitzpatrick_scale:!1,category:"animals_and_nature"},rabbit2:{keywords:["animal","nature","pet","magic","spring"],char:"🐇",fitzpatrick_scale:!1,category:"animals_and_nature"},chipmunk:{keywords:["animal","nature","rodent","squirrel"],char:"🐿",fitzpatrick_scale:!1,category:"animals_and_nature"},hedgehog:{keywords:["animal","nature","spiny"],char:"🦔",fitzpatrick_scale:!1,category:"animals_and_nature"},raccoon:{keywords:["animal","nature"],char:"🦝",fitzpatrick_scale:!1,category:"animals_and_nature"},llama:{keywords:["animal","nature","alpaca"],char:"🦙",fitzpatrick_scale:!1,category:"animals_and_nature"},hippopotamus:{keywords:["animal","nature"],char:"🦛",fitzpatrick_scale:!1,category:"animals_and_nature"},kangaroo:{keywords:["animal","nature","australia","joey","hop","marsupial"],char:"🦘",fitzpatrick_scale:!1,category:"animals_and_nature"},badger:{keywords:["animal","nature","honey"],char:"🦡",fitzpatrick_scale:!1,category:"animals_and_nature"},swan:{keywords:["animal","nature","bird"],char:"🦢",fitzpatrick_scale:!1,category:"animals_and_nature"},peacock:{keywords:["animal","nature","peahen","bird"],char:"🦚",fitzpatrick_scale:!1,category:"animals_and_nature"},parrot:{keywords:["animal","nature","bird","pirate","talk"],char:"🦜",fitzpatrick_scale:!1,category:"animals_and_nature"},lobster:{keywords:["animal","nature","bisque","claws","seafood"],char:"🦞",fitzpatrick_scale:!1,category:"animals_and_nature"},mosquito:{keywords:["animal","nature","insect","malaria"],char:"🦟",fitzpatrick_scale:!1,category:"animals_and_nature"},paw_prints:{keywords:["animal","tracking","footprints","dog","cat","pet","feet"],char:"🐾",fitzpatrick_scale:!1,category:"animals_and_nature"},dragon:{keywords:["animal","myth","nature","chinese","green"],char:"🐉",fitzpatrick_scale:!1,category:"animals_and_nature"},dragon_face:{keywords:["animal","myth","nature","chinese","green"],char:"🐲",fitzpatrick_scale:!1,category:"animals_and_nature"},cactus:{keywords:["vegetable","plant","nature"],char:"🌵",fitzpatrick_scale:!1,category:"animals_and_nature"},christmas_tree:{keywords:["festival","vacation","december","xmas","celebration"],char:"🎄",fitzpatrick_scale:!1,category:"animals_and_nature"},evergreen_tree:{keywords:["plant","nature"],char:"🌲",fitzpatrick_scale:!1,category:"animals_and_nature"},deciduous_tree:{keywords:["plant","nature"],char:"🌳",fitzpatrick_scale:!1,category:"animals_and_nature"},palm_tree:{keywords:["plant","vegetable","nature","summer","beach","mojito","tropical"],char:"🌴",fitzpatrick_scale:!1,category:"animals_and_nature"},seedling:{keywords:["plant","nature","grass","lawn","spring"],char:"🌱",fitzpatrick_scale:!1,category:"animals_and_nature"},herb:{keywords:["vegetable","plant","medicine","weed","grass","lawn"],char:"🌿",fitzpatrick_scale:!1,category:"animals_and_nature"},shamrock:{keywords:["vegetable","plant","nature","irish","clover"],char:"☘",fitzpatrick_scale:!1,category:"animals_and_nature"},four_leaf_clover:{keywords:["vegetable","plant","nature","lucky","irish"],char:"🍀",fitzpatrick_scale:!1,category:"animals_and_nature"},bamboo:{keywords:["plant","nature","vegetable","panda","pine_decoration"],char:"🎍",fitzpatrick_scale:!1,category:"animals_and_nature"},tanabata_tree:{keywords:["plant","nature","branch","summer"],char:"🎋",fitzpatrick_scale:!1,category:"animals_and_nature"},leaves:{keywords:["nature","plant","tree","vegetable","grass","lawn","spring"],char:"🍃",fitzpatrick_scale:!1,category:"animals_and_nature"},fallen_leaf:{keywords:["nature","plant","vegetable","leaves"],char:"🍂",fitzpatrick_scale:!1,category:"animals_and_nature"},maple_leaf:{keywords:["nature","plant","vegetable","ca","fall"],char:"🍁",fitzpatrick_scale:!1,category:"animals_and_nature"},ear_of_rice:{keywords:["nature","plant"],char:"🌾",fitzpatrick_scale:!1,category:"animals_and_nature"},hibiscus:{keywords:["plant","vegetable","flowers","beach"],char:"🌺",fitzpatrick_scale:!1,category:"animals_and_nature"},sunflower:{keywords:["nature","plant","fall"],char:"🌻",fitzpatrick_scale:!1,category:"animals_and_nature"},rose:{keywords:["flowers","valentines","love","spring"],char:"🌹",fitzpatrick_scale:!1,category:"animals_and_nature"},wilted_flower:{keywords:["plant","nature","flower"],char:"🥀",fitzpatrick_scale:!1,category:"animals_and_nature"},tulip:{keywords:["flowers","plant","nature","summer","spring"],char:"🌷",fitzpatrick_scale:!1,category:"animals_and_nature"},blossom:{keywords:["nature","flowers","yellow"],char:"🌼",fitzpatrick_scale:!1,category:"animals_and_nature"},cherry_blossom:{keywords:["nature","plant","spring","flower"],char:"🌸",fitzpatrick_scale:!1,category:"animals_and_nature"},bouquet:{keywords:["flowers","nature","spring"],char:"💐",fitzpatrick_scale:!1,category:"animals_and_nature"},mushroom:{keywords:["plant","vegetable"],char:"🍄",fitzpatrick_scale:!1,category:"animals_and_nature"},chestnut:{keywords:["food","squirrel"],char:"🌰",fitzpatrick_scale:!1,category:"animals_and_nature"},jack_o_lantern:{keywords:["halloween","light","pumpkin","creepy","fall"],char:"🎃",fitzpatrick_scale:!1,category:"animals_and_nature"},shell:{keywords:["nature","sea","beach"],char:"🐚",fitzpatrick_scale:!1,category:"animals_and_nature"},spider_web:{keywords:["animal","insect","arachnid","silk"],char:"🕸",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_americas:{keywords:["globe","world","USA","international"],char:"🌎",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_africa:{keywords:["globe","world","international"],char:"🌍",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_asia:{keywords:["globe","world","east","international"],char:"🌏",fitzpatrick_scale:!1,category:"animals_and_nature"},full_moon:{keywords:["nature","yellow","twilight","planet","space","night","evening","sleep"],char:"🌕",fitzpatrick_scale:!1,category:"animals_and_nature"},waning_gibbous_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep","waxing_gibbous_moon"],char:"🌖",fitzpatrick_scale:!1,category:"animals_and_nature"},last_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌗",fitzpatrick_scale:!1,category:"animals_and_nature"},waning_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌘",fitzpatrick_scale:!1,category:"animals_and_nature"},new_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌑",fitzpatrick_scale:!1,category:"animals_and_nature"},waxing_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌒",fitzpatrick_scale:!1,category:"animals_and_nature"},first_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌓",fitzpatrick_scale:!1,category:"animals_and_nature"},waxing_gibbous_moon:{keywords:["nature","night","sky","gray","twilight","planet","space","evening","sleep"],char:"🌔",fitzpatrick_scale:!1,category:"animals_and_nature"},new_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌚",fitzpatrick_scale:!1,category:"animals_and_nature"},full_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌝",fitzpatrick_scale:!1,category:"animals_and_nature"},first_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌛",fitzpatrick_scale:!1,category:"animals_and_nature"},last_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌜",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_with_face:{keywords:["nature","morning","sky"],char:"🌞",fitzpatrick_scale:!1,category:"animals_and_nature"},crescent_moon:{keywords:["night","sleep","sky","evening","magic"],char:"🌙",fitzpatrick_scale:!1,category:"animals_and_nature"},star:{keywords:["night","yellow"],char:"⭐",fitzpatrick_scale:!1,category:"animals_and_nature"},star2:{keywords:["night","sparkle","awesome","good","magic"],char:"🌟",fitzpatrick_scale:!1,category:"animals_and_nature"},dizzy:{keywords:["star","sparkle","shoot","magic"],char:"💫",fitzpatrick_scale:!1,category:"animals_and_nature"},sparkles:{keywords:["stars","shine","shiny","cool","awesome","good","magic"],char:"✨",fitzpatrick_scale:!1,category:"animals_and_nature"},comet:{keywords:["space"],char:"☄",fitzpatrick_scale:!1,category:"animals_and_nature"},sunny:{keywords:["weather","nature","brightness","summer","beach","spring"],char:"☀️",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_small_cloud:{keywords:["weather"],char:"🌤",fitzpatrick_scale:!1,category:"animals_and_nature"},partly_sunny:{keywords:["weather","nature","cloudy","morning","fall","spring"],char:"⛅",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_large_cloud:{keywords:["weather"],char:"🌥",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_rain_cloud:{keywords:["weather"],char:"🌦",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud:{keywords:["weather","sky"],char:"☁️",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_rain:{keywords:["weather"],char:"🌧",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_lightning_and_rain:{keywords:["weather","lightning"],char:"⛈",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_lightning:{keywords:["weather","thunder"],char:"🌩",fitzpatrick_scale:!1,category:"animals_and_nature"},zap:{keywords:["thunder","weather","lightning bolt","fast"],char:"⚡",fitzpatrick_scale:!1,category:"animals_and_nature"},fire:{keywords:["hot","cook","flame"],char:"🔥",fitzpatrick_scale:!1,category:"animals_and_nature"},boom:{keywords:["bomb","explode","explosion","collision","blown"],char:"💥",fitzpatrick_scale:!1,category:"animals_and_nature"},snowflake:{keywords:["winter","season","cold","weather","christmas","xmas"],char:"❄️",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_snow:{keywords:["weather"],char:"🌨",fitzpatrick_scale:!1,category:"animals_and_nature"},snowman:{keywords:["winter","season","cold","weather","christmas","xmas","frozen","without_snow"],char:"⛄",fitzpatrick_scale:!1,category:"animals_and_nature"},snowman_with_snow:{keywords:["winter","season","cold","weather","christmas","xmas","frozen"],char:"☃",fitzpatrick_scale:!1,category:"animals_and_nature"},wind_face:{keywords:["gust","air"],char:"🌬",fitzpatrick_scale:!1,category:"animals_and_nature"},dash:{keywords:["wind","air","fast","shoo","fart","smoke","puff"],char:"💨",fitzpatrick_scale:!1,category:"animals_and_nature"},tornado:{keywords:["weather","cyclone","twister"],char:"🌪",fitzpatrick_scale:!1,category:"animals_and_nature"},fog:{keywords:["weather"],char:"🌫",fitzpatrick_scale:!1,category:"animals_and_nature"},open_umbrella:{keywords:["weather","spring"],char:"☂",fitzpatrick_scale:!1,category:"animals_and_nature"},umbrella:{keywords:["rainy","weather","spring"],char:"☔",fitzpatrick_scale:!1,category:"animals_and_nature"},droplet:{keywords:["water","drip","faucet","spring"],char:"💧",fitzpatrick_scale:!1,category:"animals_and_nature"},sweat_drops:{keywords:["water","drip","oops"],char:"💦",fitzpatrick_scale:!1,category:"animals_and_nature"},ocean:{keywords:["sea","water","wave","nature","tsunami","disaster"],char:"🌊",fitzpatrick_scale:!1,category:"animals_and_nature"},green_apple:{keywords:["fruit","nature"],char:"🍏",fitzpatrick_scale:!1,category:"food_and_drink"},apple:{keywords:["fruit","mac","school"],char:"🍎",fitzpatrick_scale:!1,category:"food_and_drink"},pear:{keywords:["fruit","nature","food"],char:"🍐",fitzpatrick_scale:!1,category:"food_and_drink"},tangerine:{keywords:["food","fruit","nature","orange"],char:"🍊",fitzpatrick_scale:!1,category:"food_and_drink"},lemon:{keywords:["fruit","nature"],char:"🍋",fitzpatrick_scale:!1,category:"food_and_drink"},banana:{keywords:["fruit","food","monkey"],char:"🍌",fitzpatrick_scale:!1,category:"food_and_drink"},watermelon:{keywords:["fruit","food","picnic","summer"],char:"🍉",fitzpatrick_scale:!1,category:"food_and_drink"},grapes:{keywords:["fruit","food","wine"],char:"🍇",fitzpatrick_scale:!1,category:"food_and_drink"},strawberry:{keywords:["fruit","food","nature"],char:"🍓",fitzpatrick_scale:!1,category:"food_and_drink"},melon:{keywords:["fruit","nature","food"],char:"🍈",fitzpatrick_scale:!1,category:"food_and_drink"},cherries:{keywords:["food","fruit"],char:"🍒",fitzpatrick_scale:!1,category:"food_and_drink"},peach:{keywords:["fruit","nature","food"],char:"🍑",fitzpatrick_scale:!1,category:"food_and_drink"},pineapple:{keywords:["fruit","nature","food"],char:"🍍",fitzpatrick_scale:!1,category:"food_and_drink"},coconut:{keywords:["fruit","nature","food","palm"],char:"🥥",fitzpatrick_scale:!1,category:"food_and_drink"},kiwi_fruit:{keywords:["fruit","food"],char:"🥝",fitzpatrick_scale:!1,category:"food_and_drink"},mango:{keywords:["fruit","food","tropical"],char:"🥭",fitzpatrick_scale:!1,category:"food_and_drink"},avocado:{keywords:["fruit","food"],char:"🥑",fitzpatrick_scale:!1,category:"food_and_drink"},broccoli:{keywords:["fruit","food","vegetable"],char:"🥦",fitzpatrick_scale:!1,category:"food_and_drink"},tomato:{keywords:["fruit","vegetable","nature","food"],char:"🍅",fitzpatrick_scale:!1,category:"food_and_drink"},eggplant:{keywords:["vegetable","nature","food","aubergine"],char:"🍆",fitzpatrick_scale:!1,category:"food_and_drink"},cucumber:{keywords:["fruit","food","pickle"],char:"🥒",fitzpatrick_scale:!1,category:"food_and_drink"},carrot:{keywords:["vegetable","food","orange"],char:"🥕",fitzpatrick_scale:!1,category:"food_and_drink"},hot_pepper:{keywords:["food","spicy","chilli","chili"],char:"🌶",fitzpatrick_scale:!1,category:"food_and_drink"},potato:{keywords:["food","tuber","vegatable","starch"],char:"🥔",fitzpatrick_scale:!1,category:"food_and_drink"},corn:{keywords:["food","vegetable","plant"],char:"🌽",fitzpatrick_scale:!1,category:"food_and_drink"},leafy_greens:{keywords:["food","vegetable","plant","bok choy","cabbage","kale","lettuce"],char:"🥬",fitzpatrick_scale:!1,category:"food_and_drink"},sweet_potato:{keywords:["food","nature"],char:"🍠",fitzpatrick_scale:!1,category:"food_and_drink"},peanuts:{keywords:["food","nut"],char:"🥜",fitzpatrick_scale:!1,category:"food_and_drink"},honey_pot:{keywords:["bees","sweet","kitchen"],char:"🍯",fitzpatrick_scale:!1,category:"food_and_drink"},croissant:{keywords:["food","bread","french"],char:"🥐",fitzpatrick_scale:!1,category:"food_and_drink"},bread:{keywords:["food","wheat","breakfast","toast"],char:"🍞",fitzpatrick_scale:!1,category:"food_and_drink"},baguette_bread:{keywords:["food","bread","french"],char:"🥖",fitzpatrick_scale:!1,category:"food_and_drink"},bagel:{keywords:["food","bread","bakery","schmear"],char:"🥯",fitzpatrick_scale:!1,category:"food_and_drink"},pretzel:{keywords:["food","bread","twisted"],char:"🥨",fitzpatrick_scale:!1,category:"food_and_drink"},cheese:{keywords:["food","chadder"],char:"🧀",fitzpatrick_scale:!1,category:"food_and_drink"},egg:{keywords:["food","chicken","breakfast"],char:"🥚",fitzpatrick_scale:!1,category:"food_and_drink"},bacon:{keywords:["food","breakfast","pork","pig","meat"],char:"🥓",fitzpatrick_scale:!1,category:"food_and_drink"},steak:{keywords:["food","cow","meat","cut","chop","lambchop","porkchop"],char:"🥩",fitzpatrick_scale:!1,category:"food_and_drink"},pancakes:{keywords:["food","breakfast","flapjacks","hotcakes"],char:"🥞",fitzpatrick_scale:!1,category:"food_and_drink"},poultry_leg:{keywords:["food","meat","drumstick","bird","chicken","turkey"],char:"🍗",fitzpatrick_scale:!1,category:"food_and_drink"},meat_on_bone:{keywords:["good","food","drumstick"],char:"🍖",fitzpatrick_scale:!1,category:"food_and_drink"},bone:{keywords:["skeleton"],char:"🦴",fitzpatrick_scale:!1,category:"food_and_drink"},fried_shrimp:{keywords:["food","animal","appetizer","summer"],char:"🍤",fitzpatrick_scale:!1,category:"food_and_drink"},fried_egg:{keywords:["food","breakfast","kitchen","egg"],char:"🍳",fitzpatrick_scale:!1,category:"food_and_drink"},hamburger:{keywords:["meat","fast food","beef","cheeseburger","mcdonalds","burger king"],char:"🍔",fitzpatrick_scale:!1,category:"food_and_drink"},fries:{keywords:["chips","snack","fast food"],char:"🍟",fitzpatrick_scale:!1,category:"food_and_drink"},stuffed_flatbread:{keywords:["food","flatbread","stuffed","gyro"],char:"🥙",fitzpatrick_scale:!1,category:"food_and_drink"},hotdog:{keywords:["food","frankfurter"],char:"🌭",fitzpatrick_scale:!1,category:"food_and_drink"},pizza:{keywords:["food","party"],char:"🍕",fitzpatrick_scale:!1,category:"food_and_drink"},sandwich:{keywords:["food","lunch","bread"],char:"🥪",fitzpatrick_scale:!1,category:"food_and_drink"},canned_food:{keywords:["food","soup"],char:"🥫",fitzpatrick_scale:!1,category:"food_and_drink"},spaghetti:{keywords:["food","italian","noodle"],char:"🍝",fitzpatrick_scale:!1,category:"food_and_drink"},taco:{keywords:["food","mexican"],char:"🌮",fitzpatrick_scale:!1,category:"food_and_drink"},burrito:{keywords:["food","mexican"],char:"🌯",fitzpatrick_scale:!1,category:"food_and_drink"},green_salad:{keywords:["food","healthy","lettuce"],char:"🥗",fitzpatrick_scale:!1,category:"food_and_drink"},shallow_pan_of_food:{keywords:["food","cooking","casserole","paella"],char:"🥘",fitzpatrick_scale:!1,category:"food_and_drink"},ramen:{keywords:["food","japanese","noodle","chopsticks"],char:"🍜",fitzpatrick_scale:!1,category:"food_and_drink"},stew:{keywords:["food","meat","soup"],char:"🍲",fitzpatrick_scale:!1,category:"food_and_drink"},fish_cake:{keywords:["food","japan","sea","beach","narutomaki","pink","swirl","kamaboko","surimi","ramen"],char:"🍥",fitzpatrick_scale:!1,category:"food_and_drink"},fortune_cookie:{keywords:["food","prophecy"],char:"🥠",fitzpatrick_scale:!1,category:"food_and_drink"},sushi:{keywords:["food","fish","japanese","rice"],char:"🍣",fitzpatrick_scale:!1,category:"food_and_drink"},bento:{keywords:["food","japanese","box"],char:"🍱",fitzpatrick_scale:!1,category:"food_and_drink"},curry:{keywords:["food","spicy","hot","indian"],char:"🍛",fitzpatrick_scale:!1,category:"food_and_drink"},rice_ball:{keywords:["food","japanese"],char:"🍙",fitzpatrick_scale:!1,category:"food_and_drink"},rice:{keywords:["food","china","asian"],char:"🍚",fitzpatrick_scale:!1,category:"food_and_drink"},rice_cracker:{keywords:["food","japanese"],char:"🍘",fitzpatrick_scale:!1,category:"food_and_drink"},oden:{keywords:["food","japanese"],char:"🍢",fitzpatrick_scale:!1,category:"food_and_drink"},dango:{keywords:["food","dessert","sweet","japanese","barbecue","meat"],char:"🍡",fitzpatrick_scale:!1,category:"food_and_drink"},shaved_ice:{keywords:["hot","dessert","summer"],char:"🍧",fitzpatrick_scale:!1,category:"food_and_drink"},ice_cream:{keywords:["food","hot","dessert"],char:"🍨",fitzpatrick_scale:!1,category:"food_and_drink"},icecream:{keywords:["food","hot","dessert","summer"],char:"🍦",fitzpatrick_scale:!1,category:"food_and_drink"},pie:{keywords:["food","dessert","pastry"],char:"🥧",fitzpatrick_scale:!1,category:"food_and_drink"},cake:{keywords:["food","dessert"],char:"🍰",fitzpatrick_scale:!1,category:"food_and_drink"},cupcake:{keywords:["food","dessert","bakery","sweet"],char:"🧁",fitzpatrick_scale:!1,category:"food_and_drink"},moon_cake:{keywords:["food","autumn"],char:"🥮",fitzpatrick_scale:!1,category:"food_and_drink"},birthday:{keywords:["food","dessert","cake"],char:"🎂",fitzpatrick_scale:!1,category:"food_and_drink"},custard:{keywords:["dessert","food"],char:"🍮",fitzpatrick_scale:!1,category:"food_and_drink"},candy:{keywords:["snack","dessert","sweet","lolly"],char:"🍬",fitzpatrick_scale:!1,category:"food_and_drink"},lollipop:{keywords:["food","snack","candy","sweet"],char:"🍭",fitzpatrick_scale:!1,category:"food_and_drink"},chocolate_bar:{keywords:["food","snack","dessert","sweet"],char:"🍫",fitzpatrick_scale:!1,category:"food_and_drink"},popcorn:{keywords:["food","movie theater","films","snack"],char:"🍿",fitzpatrick_scale:!1,category:"food_and_drink"},dumpling:{keywords:["food","empanada","pierogi","potsticker"],char:"🥟",fitzpatrick_scale:!1,category:"food_and_drink"},doughnut:{keywords:["food","dessert","snack","sweet","donut"],char:"🍩",fitzpatrick_scale:!1,category:"food_and_drink"},cookie:{keywords:["food","snack","oreo","chocolate","sweet","dessert"],char:"🍪",fitzpatrick_scale:!1,category:"food_and_drink"},milk_glass:{keywords:["beverage","drink","cow"],char:"🥛",fitzpatrick_scale:!1,category:"food_and_drink"},beer:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:"🍺",fitzpatrick_scale:!1,category:"food_and_drink"},beers:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:"🍻",fitzpatrick_scale:!1,category:"food_and_drink"},clinking_glasses:{keywords:["beverage","drink","party","alcohol","celebrate","cheers","wine","champagne","toast"],char:"🥂",fitzpatrick_scale:!1,category:"food_and_drink"},wine_glass:{keywords:["drink","beverage","drunk","alcohol","booze"],char:"🍷",fitzpatrick_scale:!1,category:"food_and_drink"},tumbler_glass:{keywords:["drink","beverage","drunk","alcohol","liquor","booze","bourbon","scotch","whisky","glass","shot"],char:"🥃",fitzpatrick_scale:!1,category:"food_and_drink"},cocktail:{keywords:["drink","drunk","alcohol","beverage","booze","mojito"],char:"🍸",fitzpatrick_scale:!1,category:"food_and_drink"},tropical_drink:{keywords:["beverage","cocktail","summer","beach","alcohol","booze","mojito"],char:"🍹",fitzpatrick_scale:!1,category:"food_and_drink"},champagne:{keywords:["drink","wine","bottle","celebration"],char:"🍾",fitzpatrick_scale:!1,category:"food_and_drink"},sake:{keywords:["wine","drink","drunk","beverage","japanese","alcohol","booze"],char:"🍶",fitzpatrick_scale:!1,category:"food_and_drink"},tea:{keywords:["drink","bowl","breakfast","green","british"],char:"🍵",fitzpatrick_scale:!1,category:"food_and_drink"},cup_with_straw:{keywords:["drink","soda"],char:"🥤",fitzpatrick_scale:!1,category:"food_and_drink"},coffee:{keywords:["beverage","caffeine","latte","espresso"],char:"☕",fitzpatrick_scale:!1,category:"food_and_drink"},baby_bottle:{keywords:["food","container","milk"],char:"🍼",fitzpatrick_scale:!1,category:"food_and_drink"},salt:{keywords:["condiment","shaker"],char:"🧂",fitzpatrick_scale:!1,category:"food_and_drink"},spoon:{keywords:["cutlery","kitchen","tableware"],char:"🥄",fitzpatrick_scale:!1,category:"food_and_drink"},fork_and_knife:{keywords:["cutlery","kitchen"],char:"🍴",fitzpatrick_scale:!1,category:"food_and_drink"},plate_with_cutlery:{keywords:["food","eat","meal","lunch","dinner","restaurant"],char:"🍽",fitzpatrick_scale:!1,category:"food_and_drink"},bowl_with_spoon:{keywords:["food","breakfast","cereal","oatmeal","porridge"],char:"🥣",fitzpatrick_scale:!1,category:"food_and_drink"},takeout_box:{keywords:["food","leftovers"],char:"🥡",fitzpatrick_scale:!1,category:"food_and_drink"},chopsticks:{keywords:["food"],char:"🥢",fitzpatrick_scale:!1,category:"food_and_drink"},soccer:{keywords:["sports","football"],char:"⚽",fitzpatrick_scale:!1,category:"activity"},basketball:{keywords:["sports","balls","NBA"],char:"🏀",fitzpatrick_scale:!1,category:"activity"},football:{keywords:["sports","balls","NFL"],char:"🏈",fitzpatrick_scale:!1,category:"activity"},baseball:{keywords:["sports","balls"],char:"⚾",fitzpatrick_scale:!1,category:"activity"},softball:{keywords:["sports","balls"],char:"🥎",fitzpatrick_scale:!1,category:"activity"},tennis:{keywords:["sports","balls","green"],char:"🎾",fitzpatrick_scale:!1,category:"activity"},volleyball:{keywords:["sports","balls"],char:"🏐",fitzpatrick_scale:!1,category:"activity"},rugby_football:{keywords:["sports","team"],char:"🏉",fitzpatrick_scale:!1,category:"activity"},flying_disc:{keywords:["sports","frisbee","ultimate"],char:"🥏",fitzpatrick_scale:!1,category:"activity"},"8ball":{keywords:["pool","hobby","game","luck","magic"],char:"🎱",fitzpatrick_scale:!1,category:"activity"},golf:{keywords:["sports","business","flag","hole","summer"],char:"⛳",fitzpatrick_scale:!1,category:"activity"},golfing_woman:{keywords:["sports","business","woman","female"],char:"🏌️‍♀️",fitzpatrick_scale:!1,category:"activity"},golfing_man:{keywords:["sports","business"],char:"🏌",fitzpatrick_scale:!0,category:"activity"},ping_pong:{keywords:["sports","pingpong"],char:"🏓",fitzpatrick_scale:!1,category:"activity"},badminton:{keywords:["sports"],char:"🏸",fitzpatrick_scale:!1,category:"activity"},goal_net:{keywords:["sports"],char:"🥅",fitzpatrick_scale:!1,category:"activity"},ice_hockey:{keywords:["sports"],char:"🏒",fitzpatrick_scale:!1,category:"activity"},field_hockey:{keywords:["sports"],char:"🏑",fitzpatrick_scale:!1,category:"activity"},lacrosse:{keywords:["sports","ball","stick"],char:"🥍",fitzpatrick_scale:!1,category:"activity"},cricket:{keywords:["sports"],char:"🏏",fitzpatrick_scale:!1,category:"activity"},ski:{keywords:["sports","winter","cold","snow"],char:"🎿",fitzpatrick_scale:!1,category:"activity"},skier:{keywords:["sports","winter","snow"],char:"⛷",fitzpatrick_scale:!1,category:"activity"},snowboarder:{keywords:["sports","winter"],char:"🏂",fitzpatrick_scale:!0,category:"activity"},person_fencing:{keywords:["sports","fencing","sword"],char:"🤺",fitzpatrick_scale:!1,category:"activity"},women_wrestling:{keywords:["sports","wrestlers"],char:"🤼‍♀️",fitzpatrick_scale:!1,category:"activity"},men_wrestling:{keywords:["sports","wrestlers"],char:"🤼‍♂️",fitzpatrick_scale:!1,category:"activity"},woman_cartwheeling:{keywords:["gymnastics"],char:"🤸‍♀️",fitzpatrick_scale:!0,category:"activity"},man_cartwheeling:{keywords:["gymnastics"],char:"🤸‍♂️",fitzpatrick_scale:!0,category:"activity"},woman_playing_handball:{keywords:["sports"],char:"🤾‍♀️",fitzpatrick_scale:!0,category:"activity"},man_playing_handball:{keywords:["sports"],char:"🤾‍♂️",fitzpatrick_scale:!0,category:"activity"},ice_skate:{keywords:["sports"],char:"⛸",fitzpatrick_scale:!1,category:"activity"},curling_stone:{keywords:["sports"],char:"🥌",fitzpatrick_scale:!1,category:"activity"},skateboard:{keywords:["board"],char:"🛹",fitzpatrick_scale:!1,category:"activity"},sled:{keywords:["sleigh","luge","toboggan"],char:"🛷",fitzpatrick_scale:!1,category:"activity"},bow_and_arrow:{keywords:["sports"],char:"🏹",fitzpatrick_scale:!1,category:"activity"},fishing_pole_and_fish:{keywords:["food","hobby","summer"],char:"🎣",fitzpatrick_scale:!1,category:"activity"},boxing_glove:{keywords:["sports","fighting"],char:"🥊",fitzpatrick_scale:!1,category:"activity"},martial_arts_uniform:{keywords:["judo","karate","taekwondo"],char:"🥋",fitzpatrick_scale:!1,category:"activity"},rowing_woman:{keywords:["sports","hobby","water","ship","woman","female"],char:"🚣‍♀️",fitzpatrick_scale:!0,category:"activity"},rowing_man:{keywords:["sports","hobby","water","ship"],char:"🚣",fitzpatrick_scale:!0,category:"activity"},climbing_woman:{keywords:["sports","hobby","woman","female","rock"],char:"🧗‍♀️",fitzpatrick_scale:!0,category:"activity"},climbing_man:{keywords:["sports","hobby","man","male","rock"],char:"🧗‍♂️",fitzpatrick_scale:!0,category:"activity"},swimming_woman:{keywords:["sports","exercise","human","athlete","water","summer","woman","female"],char:"🏊‍♀️",fitzpatrick_scale:!0,category:"activity"},swimming_man:{keywords:["sports","exercise","human","athlete","water","summer"],char:"🏊",fitzpatrick_scale:!0,category:"activity"},woman_playing_water_polo:{keywords:["sports","pool"],char:"🤽‍♀️",fitzpatrick_scale:!0,category:"activity"},man_playing_water_polo:{keywords:["sports","pool"],char:"🤽‍♂️",fitzpatrick_scale:!0,category:"activity"},woman_in_lotus_position:{keywords:["woman","female","meditation","yoga","serenity","zen","mindfulness"],char:"🧘‍♀️",fitzpatrick_scale:!0,category:"activity"},man_in_lotus_position:{keywords:["man","male","meditation","yoga","serenity","zen","mindfulness"],char:"🧘‍♂️",fitzpatrick_scale:!0,category:"activity"},surfing_woman:{keywords:["sports","ocean","sea","summer","beach","woman","female"],char:"🏄‍♀️",fitzpatrick_scale:!0,category:"activity"},surfing_man:{keywords:["sports","ocean","sea","summer","beach"],char:"🏄",fitzpatrick_scale:!0,category:"activity"},bath:{keywords:["clean","shower","bathroom"],char:"🛀",fitzpatrick_scale:!0,category:"activity"},basketball_woman:{keywords:["sports","human","woman","female"],char:"⛹️‍♀️",fitzpatrick_scale:!0,category:"activity"},basketball_man:{keywords:["sports","human"],char:"⛹",fitzpatrick_scale:!0,category:"activity"},weight_lifting_woman:{keywords:["sports","training","exercise","woman","female"],char:"🏋️‍♀️",fitzpatrick_scale:!0,category:"activity"},weight_lifting_man:{keywords:["sports","training","exercise"],char:"🏋",fitzpatrick_scale:!0,category:"activity"},biking_woman:{keywords:["sports","bike","exercise","hipster","woman","female"],char:"🚴‍♀️",fitzpatrick_scale:!0,category:"activity"},biking_man:{keywords:["sports","bike","exercise","hipster"],char:"🚴",fitzpatrick_scale:!0,category:"activity"},mountain_biking_woman:{keywords:["transportation","sports","human","race","bike","woman","female"],char:"🚵‍♀️",fitzpatrick_scale:!0,category:"activity"},mountain_biking_man:{keywords:["transportation","sports","human","race","bike"],char:"🚵",fitzpatrick_scale:!0,category:"activity"},horse_racing:{keywords:["animal","betting","competition","gambling","luck"],char:"🏇",fitzpatrick_scale:!0,category:"activity"},business_suit_levitating:{keywords:["suit","business","levitate","hover","jump"],char:"🕴",fitzpatrick_scale:!0,category:"activity"},trophy:{keywords:["win","award","contest","place","ftw","ceremony"],char:"🏆",fitzpatrick_scale:!1,category:"activity"},running_shirt_with_sash:{keywords:["play","pageant"],char:"🎽",fitzpatrick_scale:!1,category:"activity"},medal_sports:{keywords:["award","winning"],char:"🏅",fitzpatrick_scale:!1,category:"activity"},medal_military:{keywords:["award","winning","army"],char:"🎖",fitzpatrick_scale:!1,category:"activity"},"1st_place_medal":{keywords:["award","winning","first"],char:"🥇",fitzpatrick_scale:!1,category:"activity"},"2nd_place_medal":{keywords:["award","second"],char:"🥈",fitzpatrick_scale:!1,category:"activity"},"3rd_place_medal":{keywords:["award","third"],char:"🥉",fitzpatrick_scale:!1,category:"activity"},reminder_ribbon:{keywords:["sports","cause","support","awareness"],char:"🎗",fitzpatrick_scale:!1,category:"activity"},rosette:{keywords:["flower","decoration","military"],char:"🏵",fitzpatrick_scale:!1,category:"activity"},ticket:{keywords:["event","concert","pass"],char:"🎫",fitzpatrick_scale:!1,category:"activity"},tickets:{keywords:["sports","concert","entrance"],char:"🎟",fitzpatrick_scale:!1,category:"activity"},performing_arts:{keywords:["acting","theater","drama"],char:"🎭",fitzpatrick_scale:!1,category:"activity"},art:{keywords:["design","paint","draw","colors"],char:"🎨",fitzpatrick_scale:!1,category:"activity"},circus_tent:{keywords:["festival","carnival","party"],char:"🎪",fitzpatrick_scale:!1,category:"activity"},woman_juggling:{keywords:["juggle","balance","skill","multitask"],char:"🤹‍♀️",fitzpatrick_scale:!0,category:"activity"},man_juggling:{keywords:["juggle","balance","skill","multitask"],char:"🤹‍♂️",fitzpatrick_scale:!0,category:"activity"},microphone:{keywords:["sound","music","PA","sing","talkshow"],char:"🎤",fitzpatrick_scale:!1,category:"activity"},headphones:{keywords:["music","score","gadgets"],char:"🎧",fitzpatrick_scale:!1,category:"activity"},musical_score:{keywords:["treble","clef","compose"],char:"🎼",fitzpatrick_scale:!1,category:"activity"},musical_keyboard:{keywords:["piano","instrument","compose"],char:"🎹",fitzpatrick_scale:!1,category:"activity"},drum:{keywords:["music","instrument","drumsticks","snare"],char:"🥁",fitzpatrick_scale:!1,category:"activity"},saxophone:{keywords:["music","instrument","jazz","blues"],char:"🎷",fitzpatrick_scale:!1,category:"activity"},trumpet:{keywords:["music","brass"],char:"🎺",fitzpatrick_scale:!1,category:"activity"},guitar:{keywords:["music","instrument"],char:"🎸",fitzpatrick_scale:!1,category:"activity"},violin:{keywords:["music","instrument","orchestra","symphony"],char:"🎻",fitzpatrick_scale:!1,category:"activity"},clapper:{keywords:["movie","film","record"],char:"🎬",fitzpatrick_scale:!1,category:"activity"},video_game:{keywords:["play","console","PS4","controller"],char:"🎮",fitzpatrick_scale:!1,category:"activity"},space_invader:{keywords:["game","arcade","play"],char:"👾",fitzpatrick_scale:!1,category:"activity"},dart:{keywords:["game","play","bar","target","bullseye"],char:"🎯",fitzpatrick_scale:!1,category:"activity"},game_die:{keywords:["dice","random","tabletop","play","luck"],char:"🎲",fitzpatrick_scale:!1,category:"activity"},chess_pawn:{keywords:["expendable"],char:"♟",fitzpatrick_scale:!1,category:"activity"},slot_machine:{keywords:["bet","gamble","vegas","fruit machine","luck","casino"],char:"🎰",fitzpatrick_scale:!1,category:"activity"},jigsaw:{keywords:["interlocking","puzzle","piece"],char:"🧩",fitzpatrick_scale:!1,category:"activity"},bowling:{keywords:["sports","fun","play"],char:"🎳",fitzpatrick_scale:!1,category:"activity"},red_car:{keywords:["red","transportation","vehicle"],char:"🚗",fitzpatrick_scale:!1,category:"travel_and_places"},taxi:{keywords:["uber","vehicle","cars","transportation"],char:"🚕",fitzpatrick_scale:!1,category:"travel_and_places"},blue_car:{keywords:["transportation","vehicle"],char:"🚙",fitzpatrick_scale:!1,category:"travel_and_places"},bus:{keywords:["car","vehicle","transportation"],char:"🚌",fitzpatrick_scale:!1,category:"travel_and_places"},trolleybus:{keywords:["bart","transportation","vehicle"],char:"🚎",fitzpatrick_scale:!1,category:"travel_and_places"},racing_car:{keywords:["sports","race","fast","formula","f1"],char:"🏎",fitzpatrick_scale:!1,category:"travel_and_places"},police_car:{keywords:["vehicle","cars","transportation","law","legal","enforcement"],char:"🚓",fitzpatrick_scale:!1,category:"travel_and_places"},ambulance:{keywords:["health","911","hospital"],char:"🚑",fitzpatrick_scale:!1,category:"travel_and_places"},fire_engine:{keywords:["transportation","cars","vehicle"],char:"🚒",fitzpatrick_scale:!1,category:"travel_and_places"},minibus:{keywords:["vehicle","car","transportation"],char:"🚐",fitzpatrick_scale:!1,category:"travel_and_places"},truck:{keywords:["cars","transportation"],char:"🚚",fitzpatrick_scale:!1,category:"travel_and_places"},articulated_lorry:{keywords:["vehicle","cars","transportation","express"],char:"🚛",fitzpatrick_scale:!1,category:"travel_and_places"},tractor:{keywords:["vehicle","car","farming","agriculture"],char:"🚜",fitzpatrick_scale:!1,category:"travel_and_places"},kick_scooter:{keywords:["vehicle","kick","razor"],char:"🛴",fitzpatrick_scale:!1,category:"travel_and_places"},motorcycle:{keywords:["race","sports","fast"],char:"🏍",fitzpatrick_scale:!1,category:"travel_and_places"},bike:{keywords:["sports","bicycle","exercise","hipster"],char:"🚲",fitzpatrick_scale:!1,category:"travel_and_places"},motor_scooter:{keywords:["vehicle","vespa","sasha"],char:"🛵",fitzpatrick_scale:!1,category:"travel_and_places"},rotating_light:{keywords:["police","ambulance","911","emergency","alert","error","pinged","law","legal"],char:"🚨",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_police_car:{keywords:["vehicle","law","legal","enforcement","911"],char:"🚔",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_bus:{keywords:["vehicle","transportation"],char:"🚍",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_automobile:{keywords:["car","vehicle","transportation"],char:"🚘",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_taxi:{keywords:["vehicle","cars","uber"],char:"🚖",fitzpatrick_scale:!1,category:"travel_and_places"},aerial_tramway:{keywords:["transportation","vehicle","ski"],char:"🚡",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_cableway:{keywords:["transportation","vehicle","ski"],char:"🚠",fitzpatrick_scale:!1,category:"travel_and_places"},suspension_railway:{keywords:["vehicle","transportation"],char:"🚟",fitzpatrick_scale:!1,category:"travel_and_places"},railway_car:{keywords:["transportation","vehicle"],char:"🚃",fitzpatrick_scale:!1,category:"travel_and_places"},train:{keywords:["transportation","vehicle","carriage","public","travel"],char:"🚋",fitzpatrick_scale:!1,category:"travel_and_places"},monorail:{keywords:["transportation","vehicle"],char:"🚝",fitzpatrick_scale:!1,category:"travel_and_places"},bullettrain_side:{keywords:["transportation","vehicle"],char:"🚄",fitzpatrick_scale:!1,category:"travel_and_places"},bullettrain_front:{keywords:["transportation","vehicle","speed","fast","public","travel"],char:"🚅",fitzpatrick_scale:!1,category:"travel_and_places"},light_rail:{keywords:["transportation","vehicle"],char:"🚈",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_railway:{keywords:["transportation","vehicle"],char:"🚞",fitzpatrick_scale:!1,category:"travel_and_places"},steam_locomotive:{keywords:["transportation","vehicle","train"],char:"🚂",fitzpatrick_scale:!1,category:"travel_and_places"},train2:{keywords:["transportation","vehicle"],char:"🚆",fitzpatrick_scale:!1,category:"travel_and_places"},metro:{keywords:["transportation","blue-square","mrt","underground","tube"],char:"🚇",fitzpatrick_scale:!1,category:"travel_and_places"},tram:{keywords:["transportation","vehicle"],char:"🚊",fitzpatrick_scale:!1,category:"travel_and_places"},station:{keywords:["transportation","vehicle","public"],char:"🚉",fitzpatrick_scale:!1,category:"travel_and_places"},flying_saucer:{keywords:["transportation","vehicle","ufo"],char:"🛸",fitzpatrick_scale:!1,category:"travel_and_places"},helicopter:{keywords:["transportation","vehicle","fly"],char:"🚁",fitzpatrick_scale:!1,category:"travel_and_places"},small_airplane:{keywords:["flight","transportation","fly","vehicle"],char:"🛩",fitzpatrick_scale:!1,category:"travel_and_places"},airplane:{keywords:["vehicle","transportation","flight","fly"],char:"✈️",fitzpatrick_scale:!1,category:"travel_and_places"},flight_departure:{keywords:["airport","flight","landing"],char:"🛫",fitzpatrick_scale:!1,category:"travel_and_places"},flight_arrival:{keywords:["airport","flight","boarding"],char:"🛬",fitzpatrick_scale:!1,category:"travel_and_places"},sailboat:{keywords:["ship","summer","transportation","water","sailing"],char:"⛵",fitzpatrick_scale:!1,category:"travel_and_places"},motor_boat:{keywords:["ship"],char:"🛥",fitzpatrick_scale:!1,category:"travel_and_places"},speedboat:{keywords:["ship","transportation","vehicle","summer"],char:"🚤",fitzpatrick_scale:!1,category:"travel_and_places"},ferry:{keywords:["boat","ship","yacht"],char:"⛴",fitzpatrick_scale:!1,category:"travel_and_places"},passenger_ship:{keywords:["yacht","cruise","ferry"],char:"🛳",fitzpatrick_scale:!1,category:"travel_and_places"},rocket:{keywords:["launch","ship","staffmode","NASA","outer space","outer_space","fly"],char:"🚀",fitzpatrick_scale:!1,category:"travel_and_places"},artificial_satellite:{keywords:["communication","gps","orbit","spaceflight","NASA","ISS"],char:"🛰",fitzpatrick_scale:!1,category:"travel_and_places"},seat:{keywords:["sit","airplane","transport","bus","flight","fly"],char:"💺",fitzpatrick_scale:!1,category:"travel_and_places"},canoe:{keywords:["boat","paddle","water","ship"],char:"🛶",fitzpatrick_scale:!1,category:"travel_and_places"},anchor:{keywords:["ship","ferry","sea","boat"],char:"⚓",fitzpatrick_scale:!1,category:"travel_and_places"},construction:{keywords:["wip","progress","caution","warning"],char:"🚧",fitzpatrick_scale:!1,category:"travel_and_places"},fuelpump:{keywords:["gas station","petroleum"],char:"⛽",fitzpatrick_scale:!1,category:"travel_and_places"},busstop:{keywords:["transportation","wait"],char:"🚏",fitzpatrick_scale:!1,category:"travel_and_places"},vertical_traffic_light:{keywords:["transportation","driving"],char:"🚦",fitzpatrick_scale:!1,category:"travel_and_places"},traffic_light:{keywords:["transportation","signal"],char:"🚥",fitzpatrick_scale:!1,category:"travel_and_places"},checkered_flag:{keywords:["contest","finishline","race","gokart"],char:"🏁",fitzpatrick_scale:!1,category:"travel_and_places"},ship:{keywords:["transportation","titanic","deploy"],char:"🚢",fitzpatrick_scale:!1,category:"travel_and_places"},ferris_wheel:{keywords:["photo","carnival","londoneye"],char:"🎡",fitzpatrick_scale:!1,category:"travel_and_places"},roller_coaster:{keywords:["carnival","playground","photo","fun"],char:"🎢",fitzpatrick_scale:!1,category:"travel_and_places"},carousel_horse:{keywords:["photo","carnival"],char:"🎠",fitzpatrick_scale:!1,category:"travel_and_places"},building_construction:{keywords:["wip","working","progress"],char:"🏗",fitzpatrick_scale:!1,category:"travel_and_places"},foggy:{keywords:["photo","mountain"],char:"🌁",fitzpatrick_scale:!1,category:"travel_and_places"},tokyo_tower:{keywords:["photo","japanese"],char:"🗼",fitzpatrick_scale:!1,category:"travel_and_places"},factory:{keywords:["building","industry","pollution","smoke"],char:"🏭",fitzpatrick_scale:!1,category:"travel_and_places"},fountain:{keywords:["photo","summer","water","fresh"],char:"⛲",fitzpatrick_scale:!1,category:"travel_and_places"},rice_scene:{keywords:["photo","japan","asia","tsukimi"],char:"🎑",fitzpatrick_scale:!1,category:"travel_and_places"},mountain:{keywords:["photo","nature","environment"],char:"⛰",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_snow:{keywords:["photo","nature","environment","winter","cold"],char:"🏔",fitzpatrick_scale:!1,category:"travel_and_places"},mount_fuji:{keywords:["photo","mountain","nature","japanese"],char:"🗻",fitzpatrick_scale:!1,category:"travel_and_places"},volcano:{keywords:["photo","nature","disaster"],char:"🌋",fitzpatrick_scale:!1,category:"travel_and_places"},japan:{keywords:["nation","country","japanese","asia"],char:"🗾",fitzpatrick_scale:!1,category:"travel_and_places"},camping:{keywords:["photo","outdoors","tent"],char:"🏕",fitzpatrick_scale:!1,category:"travel_and_places"},tent:{keywords:["photo","camping","outdoors"],char:"⛺",fitzpatrick_scale:!1,category:"travel_and_places"},national_park:{keywords:["photo","environment","nature"],char:"🏞",fitzpatrick_scale:!1,category:"travel_and_places"},motorway:{keywords:["road","cupertino","interstate","highway"],char:"🛣",fitzpatrick_scale:!1,category:"travel_and_places"},railway_track:{keywords:["train","transportation"],char:"🛤",fitzpatrick_scale:!1,category:"travel_and_places"},sunrise:{keywords:["morning","view","vacation","photo"],char:"🌅",fitzpatrick_scale:!1,category:"travel_and_places"},sunrise_over_mountains:{keywords:["view","vacation","photo"],char:"🌄",fitzpatrick_scale:!1,category:"travel_and_places"},desert:{keywords:["photo","warm","saharah"],char:"🏜",fitzpatrick_scale:!1,category:"travel_and_places"},beach_umbrella:{keywords:["weather","summer","sunny","sand","mojito"],char:"🏖",fitzpatrick_scale:!1,category:"travel_and_places"},desert_island:{keywords:["photo","tropical","mojito"],char:"🏝",fitzpatrick_scale:!1,category:"travel_and_places"},city_sunrise:{keywords:["photo","good morning","dawn"],char:"🌇",fitzpatrick_scale:!1,category:"travel_and_places"},city_sunset:{keywords:["photo","evening","sky","buildings"],char:"🌆",fitzpatrick_scale:!1,category:"travel_and_places"},cityscape:{keywords:["photo","night life","urban"],char:"🏙",fitzpatrick_scale:!1,category:"travel_and_places"},night_with_stars:{keywords:["evening","city","downtown"],char:"🌃",fitzpatrick_scale:!1,category:"travel_and_places"},bridge_at_night:{keywords:["photo","sanfrancisco"],char:"🌉",fitzpatrick_scale:!1,category:"travel_and_places"},milky_way:{keywords:["photo","space","stars"],char:"🌌",fitzpatrick_scale:!1,category:"travel_and_places"},stars:{keywords:["night","photo"],char:"🌠",fitzpatrick_scale:!1,category:"travel_and_places"},sparkler:{keywords:["stars","night","shine"],char:"🎇",fitzpatrick_scale:!1,category:"travel_and_places"},fireworks:{keywords:["photo","festival","carnival","congratulations"],char:"🎆",fitzpatrick_scale:!1,category:"travel_and_places"},rainbow:{keywords:["nature","happy","unicorn_face","photo","sky","spring"],char:"🌈",fitzpatrick_scale:!1,category:"travel_and_places"},houses:{keywords:["buildings","photo"],char:"🏘",fitzpatrick_scale:!1,category:"travel_and_places"},european_castle:{keywords:["building","royalty","history"],char:"🏰",fitzpatrick_scale:!1,category:"travel_and_places"},japanese_castle:{keywords:["photo","building"],char:"🏯",fitzpatrick_scale:!1,category:"travel_and_places"},stadium:{keywords:["photo","place","sports","concert","venue"],char:"🏟",fitzpatrick_scale:!1,category:"travel_and_places"},statue_of_liberty:{keywords:["american","newyork"],char:"🗽",fitzpatrick_scale:!1,category:"travel_and_places"},house:{keywords:["building","home"],char:"🏠",fitzpatrick_scale:!1,category:"travel_and_places"},house_with_garden:{keywords:["home","plant","nature"],char:"🏡",fitzpatrick_scale:!1,category:"travel_and_places"},derelict_house:{keywords:["abandon","evict","broken","building"],char:"🏚",fitzpatrick_scale:!1,category:"travel_and_places"},office:{keywords:["building","bureau","work"],char:"🏢",fitzpatrick_scale:!1,category:"travel_and_places"},department_store:{keywords:["building","shopping","mall"],char:"🏬",fitzpatrick_scale:!1,category:"travel_and_places"},post_office:{keywords:["building","envelope","communication"],char:"🏣",fitzpatrick_scale:!1,category:"travel_and_places"},european_post_office:{keywords:["building","email"],char:"🏤",fitzpatrick_scale:!1,category:"travel_and_places"},hospital:{keywords:["building","health","surgery","doctor"],char:"🏥",fitzpatrick_scale:!1,category:"travel_and_places"},bank:{keywords:["building","money","sales","cash","business","enterprise"],char:"🏦",fitzpatrick_scale:!1,category:"travel_and_places"},hotel:{keywords:["building","accomodation","checkin"],char:"🏨",fitzpatrick_scale:!1,category:"travel_and_places"},convenience_store:{keywords:["building","shopping","groceries"],char:"🏪",fitzpatrick_scale:!1,category:"travel_and_places"},school:{keywords:["building","student","education","learn","teach"],char:"🏫",fitzpatrick_scale:!1,category:"travel_and_places"},love_hotel:{keywords:["like","affection","dating"],char:"🏩",fitzpatrick_scale:!1,category:"travel_and_places"},wedding:{keywords:["love","like","affection","couple","marriage","bride","groom"],char:"💒",fitzpatrick_scale:!1,category:"travel_and_places"},classical_building:{keywords:["art","culture","history"],char:"🏛",fitzpatrick_scale:!1,category:"travel_and_places"},church:{keywords:["building","religion","christ"],char:"⛪",fitzpatrick_scale:!1,category:"travel_and_places"},mosque:{keywords:["islam","worship","minaret"],char:"🕌",fitzpatrick_scale:!1,category:"travel_and_places"},synagogue:{keywords:["judaism","worship","temple","jewish"],char:"🕍",fitzpatrick_scale:!1,category:"travel_and_places"},kaaba:{keywords:["mecca","mosque","islam"],char:"🕋",fitzpatrick_scale:!1,category:"travel_and_places"},shinto_shrine:{keywords:["temple","japan","kyoto"],char:"⛩",fitzpatrick_scale:!1,category:"travel_and_places"},watch:{keywords:["time","accessories"],char:"⌚",fitzpatrick_scale:!1,category:"objects"},iphone:{keywords:["technology","apple","gadgets","dial"],char:"📱",fitzpatrick_scale:!1,category:"objects"},calling:{keywords:["iphone","incoming"],char:"📲",fitzpatrick_scale:!1,category:"objects"},computer:{keywords:["technology","laptop","screen","display","monitor"],char:"💻",fitzpatrick_scale:!1,category:"objects"},keyboard:{keywords:["technology","computer","type","input","text"],char:"⌨",fitzpatrick_scale:!1,category:"objects"},desktop_computer:{keywords:["technology","computing","screen"],char:"🖥",fitzpatrick_scale:!1,category:"objects"},printer:{keywords:["paper","ink"],char:"🖨",fitzpatrick_scale:!1,category:"objects"},computer_mouse:{keywords:["click"],char:"🖱",fitzpatrick_scale:!1,category:"objects"},trackball:{keywords:["technology","trackpad"],char:"🖲",fitzpatrick_scale:!1,category:"objects"},joystick:{keywords:["game","play"],char:"🕹",fitzpatrick_scale:!1,category:"objects"},clamp:{keywords:["tool"],char:"🗜",fitzpatrick_scale:!1,category:"objects"},minidisc:{keywords:["technology","record","data","disk","90s"],char:"💽",fitzpatrick_scale:!1,category:"objects"},floppy_disk:{keywords:["oldschool","technology","save","90s","80s"],char:"💾",fitzpatrick_scale:!1,category:"objects"},cd:{keywords:["technology","dvd","disk","disc","90s"],char:"💿",fitzpatrick_scale:!1,category:"objects"},dvd:{keywords:["cd","disk","disc"],char:"📀",fitzpatrick_scale:!1,category:"objects"},vhs:{keywords:["record","video","oldschool","90s","80s"],char:"📼",fitzpatrick_scale:!1,category:"objects"},camera:{keywords:["gadgets","photography"],char:"📷",fitzpatrick_scale:!1,category:"objects"},camera_flash:{keywords:["photography","gadgets"],char:"📸",fitzpatrick_scale:!1,category:"objects"},video_camera:{keywords:["film","record"],char:"📹",fitzpatrick_scale:!1,category:"objects"},movie_camera:{keywords:["film","record"],char:"🎥",fitzpatrick_scale:!1,category:"objects"},film_projector:{keywords:["video","tape","record","movie"],char:"📽",fitzpatrick_scale:!1,category:"objects"},film_strip:{keywords:["movie"],char:"🎞",fitzpatrick_scale:!1,category:"objects"},telephone_receiver:{keywords:["technology","communication","dial"],char:"📞",fitzpatrick_scale:!1,category:"objects"},phone:{keywords:["technology","communication","dial","telephone"],char:"☎️",fitzpatrick_scale:!1,category:"objects"},pager:{keywords:["bbcall","oldschool","90s"],char:"📟",fitzpatrick_scale:!1,category:"objects"},fax:{keywords:["communication","technology"],char:"📠",fitzpatrick_scale:!1,category:"objects"},tv:{keywords:["technology","program","oldschool","show","television"],char:"📺",fitzpatrick_scale:!1,category:"objects"},radio:{keywords:["communication","music","podcast","program"],char:"📻",fitzpatrick_scale:!1,category:"objects"},studio_microphone:{keywords:["sing","recording","artist","talkshow"],char:"🎙",fitzpatrick_scale:!1,category:"objects"},level_slider:{keywords:["scale"],char:"🎚",fitzpatrick_scale:!1,category:"objects"},control_knobs:{keywords:["dial"],char:"🎛",fitzpatrick_scale:!1,category:"objects"},compass:{keywords:["magnetic","navigation","orienteering"],char:"🧭",fitzpatrick_scale:!1,category:"objects"},stopwatch:{keywords:["time","deadline"],char:"⏱",fitzpatrick_scale:!1,category:"objects"},timer_clock:{keywords:["alarm"],char:"⏲",fitzpatrick_scale:!1,category:"objects"},alarm_clock:{keywords:["time","wake"],char:"⏰",fitzpatrick_scale:!1,category:"objects"},mantelpiece_clock:{keywords:["time"],char:"🕰",fitzpatrick_scale:!1,category:"objects"},hourglass_flowing_sand:{keywords:["oldschool","time","countdown"],char:"⏳",fitzpatrick_scale:!1,category:"objects"},hourglass:{keywords:["time","clock","oldschool","limit","exam","quiz","test"],char:"⌛",fitzpatrick_scale:!1,category:"objects"},satellite:{keywords:["communication","future","radio","space"],char:"📡",fitzpatrick_scale:!1,category:"objects"},battery:{keywords:["power","energy","sustain"],char:"🔋",fitzpatrick_scale:!1,category:"objects"},electric_plug:{keywords:["charger","power"],char:"🔌",fitzpatrick_scale:!1,category:"objects"},bulb:{keywords:["light","electricity","idea"],char:"💡",fitzpatrick_scale:!1,category:"objects"},flashlight:{keywords:["dark","camping","sight","night"],char:"🔦",fitzpatrick_scale:!1,category:"objects"},candle:{keywords:["fire","wax"],char:"🕯",fitzpatrick_scale:!1,category:"objects"},fire_extinguisher:{keywords:["quench"],char:"🧯",fitzpatrick_scale:!1,category:"objects"},wastebasket:{keywords:["bin","trash","rubbish","garbage","toss"],char:"🗑",fitzpatrick_scale:!1,category:"objects"},oil_drum:{keywords:["barrell"],char:"🛢",fitzpatrick_scale:!1,category:"objects"},money_with_wings:{keywords:["dollar","bills","payment","sale"],char:"💸",fitzpatrick_scale:!1,category:"objects"},dollar:{keywords:["money","sales","bill","currency"],char:"💵",fitzpatrick_scale:!1,category:"objects"},yen:{keywords:["money","sales","japanese","dollar","currency"],char:"💴",fitzpatrick_scale:!1,category:"objects"},euro:{keywords:["money","sales","dollar","currency"],char:"💶",fitzpatrick_scale:!1,category:"objects"},pound:{keywords:["british","sterling","money","sales","bills","uk","england","currency"],char:"💷",fitzpatrick_scale:!1,category:"objects"},moneybag:{keywords:["dollar","payment","coins","sale"],char:"💰",fitzpatrick_scale:!1,category:"objects"},credit_card:{keywords:["money","sales","dollar","bill","payment","shopping"],char:"💳",fitzpatrick_scale:!1,category:"objects"},gem:{keywords:["blue","ruby","diamond","jewelry"],char:"💎",fitzpatrick_scale:!1,category:"objects"},balance_scale:{keywords:["law","fairness","weight"],char:"⚖",fitzpatrick_scale:!1,category:"objects"},toolbox:{keywords:["tools","diy","fix","maintainer","mechanic"],char:"🧰",fitzpatrick_scale:!1,category:"objects"},wrench:{keywords:["tools","diy","ikea","fix","maintainer"],char:"🔧",fitzpatrick_scale:!1,category:"objects"},hammer:{keywords:["tools","build","create"],char:"🔨",fitzpatrick_scale:!1,category:"objects"},hammer_and_pick:{keywords:["tools","build","create"],char:"⚒",fitzpatrick_scale:!1,category:"objects"},hammer_and_wrench:{keywords:["tools","build","create"],char:"🛠",fitzpatrick_scale:!1,category:"objects"},pick:{keywords:["tools","dig"],char:"⛏",fitzpatrick_scale:!1,category:"objects"},nut_and_bolt:{keywords:["handy","tools","fix"],char:"🔩",fitzpatrick_scale:!1,category:"objects"},gear:{keywords:["cog"],char:"⚙",fitzpatrick_scale:!1,category:"objects"},brick:{keywords:["bricks"],char:"🧱",fitzpatrick_scale:!1,category:"objects"},chains:{keywords:["lock","arrest"],char:"⛓",fitzpatrick_scale:!1,category:"objects"},magnet:{keywords:["attraction","magnetic"],char:"🧲",fitzpatrick_scale:!1,category:"objects"},gun:{keywords:["violence","weapon","pistol","revolver"],char:"🔫",fitzpatrick_scale:!1,category:"objects"},bomb:{keywords:["boom","explode","explosion","terrorism"],char:"💣",fitzpatrick_scale:!1,category:"objects"},firecracker:{keywords:["dynamite","boom","explode","explosion","explosive"],char:"🧨",fitzpatrick_scale:!1,category:"objects"},hocho:{keywords:["knife","blade","cutlery","kitchen","weapon"],char:"🔪",fitzpatrick_scale:!1,category:"objects"},dagger:{keywords:["weapon"],char:"🗡",fitzpatrick_scale:!1,category:"objects"},crossed_swords:{keywords:["weapon"],char:"⚔",fitzpatrick_scale:!1,category:"objects"},shield:{keywords:["protection","security"],char:"🛡",fitzpatrick_scale:!1,category:"objects"},smoking:{keywords:["kills","tobacco","cigarette","joint","smoke"],char:"🚬",fitzpatrick_scale:!1,category:"objects"},skull_and_crossbones:{keywords:["poison","danger","deadly","scary","death","pirate","evil"],char:"☠",fitzpatrick_scale:!1,category:"objects"},coffin:{keywords:["vampire","dead","die","death","rip","graveyard","cemetery","casket","funeral","box"],char:"⚰",fitzpatrick_scale:!1,category:"objects"},funeral_urn:{keywords:["dead","die","death","rip","ashes"],char:"⚱",fitzpatrick_scale:!1,category:"objects"},amphora:{keywords:["vase","jar"],char:"🏺",fitzpatrick_scale:!1,category:"objects"},crystal_ball:{keywords:["disco","party","magic","circus","fortune_teller"],char:"🔮",fitzpatrick_scale:!1,category:"objects"},prayer_beads:{keywords:["dhikr","religious"],char:"📿",fitzpatrick_scale:!1,category:"objects"},nazar_amulet:{keywords:["bead","charm"],char:"🧿",fitzpatrick_scale:!1,category:"objects"},barber:{keywords:["hair","salon","style"],char:"💈",fitzpatrick_scale:!1,category:"objects"},alembic:{keywords:["distilling","science","experiment","chemistry"],char:"⚗",fitzpatrick_scale:!1,category:"objects"},telescope:{keywords:["stars","space","zoom","science","astronomy"],char:"🔭",fitzpatrick_scale:!1,category:"objects"},microscope:{keywords:["laboratory","experiment","zoomin","science","study"],char:"🔬",fitzpatrick_scale:!1,category:"objects"},hole:{keywords:["embarrassing"],char:"🕳",fitzpatrick_scale:!1,category:"objects"},pill:{keywords:["health","medicine","doctor","pharmacy","drug"],char:"💊",fitzpatrick_scale:!1,category:"objects"},syringe:{keywords:["health","hospital","drugs","blood","medicine","needle","doctor","nurse"],char:"💉",fitzpatrick_scale:!1,category:"objects"},dna:{keywords:["biologist","genetics","life"],char:"🧬",fitzpatrick_scale:!1,category:"objects"},microbe:{keywords:["amoeba","bacteria","germs"],char:"🦠",fitzpatrick_scale:!1,category:"objects"},petri_dish:{keywords:["bacteria","biology","culture","lab"],char:"🧫",fitzpatrick_scale:!1,category:"objects"},test_tube:{keywords:["chemistry","experiment","lab","science"],char:"🧪",fitzpatrick_scale:!1,category:"objects"},thermometer:{keywords:["weather","temperature","hot","cold"],char:"🌡",fitzpatrick_scale:!1,category:"objects"},broom:{keywords:["cleaning","sweeping","witch"],char:"🧹",fitzpatrick_scale:!1,category:"objects"},basket:{keywords:["laundry"],char:"🧺",fitzpatrick_scale:!1,category:"objects"},toilet_paper:{keywords:["roll"],char:"🧻",fitzpatrick_scale:!1,category:"objects"},label:{keywords:["sale","tag"],char:"🏷",fitzpatrick_scale:!1,category:"objects"},bookmark:{keywords:["favorite","label","save"],char:"🔖",fitzpatrick_scale:!1,category:"objects"},toilet:{keywords:["restroom","wc","washroom","bathroom","potty"],char:"🚽",fitzpatrick_scale:!1,category:"objects"},shower:{keywords:["clean","water","bathroom"],char:"🚿",fitzpatrick_scale:!1,category:"objects"},bathtub:{keywords:["clean","shower","bathroom"],char:"🛁",fitzpatrick_scale:!1,category:"objects"},soap:{keywords:["bar","bathing","cleaning","lather"],char:"🧼",fitzpatrick_scale:!1,category:"objects"},sponge:{keywords:["absorbing","cleaning","porous"],char:"🧽",fitzpatrick_scale:!1,category:"objects"},lotion_bottle:{keywords:["moisturizer","sunscreen"],char:"🧴",fitzpatrick_scale:!1,category:"objects"},key:{keywords:["lock","door","password"],char:"🔑",fitzpatrick_scale:!1,category:"objects"},old_key:{keywords:["lock","door","password"],char:"🗝",fitzpatrick_scale:!1,category:"objects"},couch_and_lamp:{keywords:["read","chill"],char:"🛋",fitzpatrick_scale:!1,category:"objects"},sleeping_bed:{keywords:["bed","rest"],char:"🛌",fitzpatrick_scale:!0,category:"objects"},bed:{keywords:["sleep","rest"],char:"🛏",fitzpatrick_scale:!1,category:"objects"},door:{keywords:["house","entry","exit"],char:"🚪",fitzpatrick_scale:!1,category:"objects"},bellhop_bell:{keywords:["service"],char:"🛎",fitzpatrick_scale:!1,category:"objects"},teddy_bear:{keywords:["plush","stuffed"],char:"🧸",fitzpatrick_scale:!1,category:"objects"},framed_picture:{keywords:["photography"],char:"🖼",fitzpatrick_scale:!1,category:"objects"},world_map:{keywords:["location","direction"],char:"🗺",fitzpatrick_scale:!1,category:"objects"},parasol_on_ground:{keywords:["weather","summer"],char:"⛱",fitzpatrick_scale:!1,category:"objects"},moyai:{keywords:["rock","easter island","moai"],char:"🗿",fitzpatrick_scale:!1,category:"objects"},shopping:{keywords:["mall","buy","purchase"],char:"🛍",fitzpatrick_scale:!1,category:"objects"},shopping_cart:{keywords:["trolley"],char:"🛒",fitzpatrick_scale:!1,category:"objects"},balloon:{keywords:["party","celebration","birthday","circus"],char:"🎈",fitzpatrick_scale:!1,category:"objects"},flags:{keywords:["fish","japanese","koinobori","carp","banner"],char:"🎏",fitzpatrick_scale:!1,category:"objects"},ribbon:{keywords:["decoration","pink","girl","bowtie"],char:"🎀",fitzpatrick_scale:!1,category:"objects"},gift:{keywords:["present","birthday","christmas","xmas"],char:"🎁",fitzpatrick_scale:!1,category:"objects"},confetti_ball:{keywords:["festival","party","birthday","circus"],char:"🎊",fitzpatrick_scale:!1,category:"objects"},tada:{keywords:["party","congratulations","birthday","magic","circus","celebration"],char:"🎉",fitzpatrick_scale:!1,category:"objects"},dolls:{keywords:["japanese","toy","kimono"],char:"🎎",fitzpatrick_scale:!1,category:"objects"},wind_chime:{keywords:["nature","ding","spring","bell"],char:"🎐",fitzpatrick_scale:!1,category:"objects"},crossed_flags:{keywords:["japanese","nation","country","border"],char:"🎌",fitzpatrick_scale:!1,category:"objects"},izakaya_lantern:{keywords:["light","paper","halloween","spooky"],char:"🏮",fitzpatrick_scale:!1,category:"objects"},red_envelope:{keywords:["gift"],char:"🧧",fitzpatrick_scale:!1,category:"objects"},email:{keywords:["letter","postal","inbox","communication"],char:"✉️",fitzpatrick_scale:!1,category:"objects"},envelope_with_arrow:{keywords:["email","communication"],char:"📩",fitzpatrick_scale:!1,category:"objects"},incoming_envelope:{keywords:["email","inbox"],char:"📨",fitzpatrick_scale:!1,category:"objects"},"e-mail":{keywords:["communication","inbox"],char:"📧",fitzpatrick_scale:!1,category:"objects"},love_letter:{keywords:["email","like","affection","envelope","valentines"],char:"💌",fitzpatrick_scale:!1,category:"objects"},postbox:{keywords:["email","letter","envelope"],char:"📮",fitzpatrick_scale:!1,category:"objects"},mailbox_closed:{keywords:["email","communication","inbox"],char:"📪",fitzpatrick_scale:!1,category:"objects"},mailbox:{keywords:["email","inbox","communication"],char:"📫",fitzpatrick_scale:!1,category:"objects"},mailbox_with_mail:{keywords:["email","inbox","communication"],char:"📬",fitzpatrick_scale:!1,category:"objects"},mailbox_with_no_mail:{keywords:["email","inbox"],char:"📭",fitzpatrick_scale:!1,category:"objects"},package:{keywords:["mail","gift","cardboard","box","moving"],char:"📦",fitzpatrick_scale:!1,category:"objects"},postal_horn:{keywords:["instrument","music"],char:"📯",fitzpatrick_scale:!1,category:"objects"},inbox_tray:{keywords:["email","documents"],char:"📥",fitzpatrick_scale:!1,category:"objects"},outbox_tray:{keywords:["inbox","email"],char:"📤",fitzpatrick_scale:!1,category:"objects"},scroll:{keywords:["documents","ancient","history","paper"],char:"📜",fitzpatrick_scale:!1,category:"objects"},page_with_curl:{keywords:["documents","office","paper"],char:"📃",fitzpatrick_scale:!1,category:"objects"},bookmark_tabs:{keywords:["favorite","save","order","tidy"],char:"📑",fitzpatrick_scale:!1,category:"objects"},receipt:{keywords:["accounting","expenses"],char:"🧾",fitzpatrick_scale:!1,category:"objects"},bar_chart:{keywords:["graph","presentation","stats"],char:"📊",fitzpatrick_scale:!1,category:"objects"},chart_with_upwards_trend:{keywords:["graph","presentation","stats","recovery","business","economics","money","sales","good","success"],char:"📈",fitzpatrick_scale:!1,category:"objects"},chart_with_downwards_trend:{keywords:["graph","presentation","stats","recession","business","economics","money","sales","bad","failure"],char:"📉",fitzpatrick_scale:!1,category:"objects"},page_facing_up:{keywords:["documents","office","paper","information"],char:"📄",fitzpatrick_scale:!1,category:"objects"},date:{keywords:["calendar","schedule"],char:"📅",fitzpatrick_scale:!1,category:"objects"},calendar:{keywords:["schedule","date","planning"],char:"📆",fitzpatrick_scale:!1,category:"objects"},spiral_calendar:{keywords:["date","schedule","planning"],char:"🗓",fitzpatrick_scale:!1,category:"objects"},card_index:{keywords:["business","stationery"],char:"📇",fitzpatrick_scale:!1,category:"objects"},card_file_box:{keywords:["business","stationery"],char:"🗃",fitzpatrick_scale:!1,category:"objects"},ballot_box:{keywords:["election","vote"],char:"🗳",fitzpatrick_scale:!1,category:"objects"},file_cabinet:{keywords:["filing","organizing"],char:"🗄",fitzpatrick_scale:!1,category:"objects"},clipboard:{keywords:["stationery","documents"],char:"📋",fitzpatrick_scale:!1,category:"objects"},spiral_notepad:{keywords:["memo","stationery"],char:"🗒",fitzpatrick_scale:!1,category:"objects"},file_folder:{keywords:["documents","business","office"],char:"📁",fitzpatrick_scale:!1,category:"objects"},open_file_folder:{keywords:["documents","load"],char:"📂",fitzpatrick_scale:!1,category:"objects"},card_index_dividers:{keywords:["organizing","business","stationery"],char:"🗂",fitzpatrick_scale:!1,category:"objects"},newspaper_roll:{keywords:["press","headline"],char:"🗞",fitzpatrick_scale:!1,category:"objects"},newspaper:{keywords:["press","headline"],char:"📰",fitzpatrick_scale:!1,category:"objects"},notebook:{keywords:["stationery","record","notes","paper","study"],char:"📓",fitzpatrick_scale:!1,category:"objects"},closed_book:{keywords:["read","library","knowledge","textbook","learn"],char:"📕",fitzpatrick_scale:!1,category:"objects"},green_book:{keywords:["read","library","knowledge","study"],char:"📗",fitzpatrick_scale:!1,category:"objects"},blue_book:{keywords:["read","library","knowledge","learn","study"],char:"📘",fitzpatrick_scale:!1,category:"objects"},orange_book:{keywords:["read","library","knowledge","textbook","study"],char:"📙",fitzpatrick_scale:!1,category:"objects"},notebook_with_decorative_cover:{keywords:["classroom","notes","record","paper","study"],char:"📔",fitzpatrick_scale:!1,category:"objects"},ledger:{keywords:["notes","paper"],char:"📒",fitzpatrick_scale:!1,category:"objects"},books:{keywords:["literature","library","study"],char:"📚",fitzpatrick_scale:!1,category:"objects"},open_book:{keywords:["book","read","library","knowledge","literature","learn","study"],char:"📖",fitzpatrick_scale:!1,category:"objects"},safety_pin:{keywords:["diaper"],char:"🧷",fitzpatrick_scale:!1,category:"objects"},link:{keywords:["rings","url"],char:"🔗",fitzpatrick_scale:!1,category:"objects"},paperclip:{keywords:["documents","stationery"],char:"📎",fitzpatrick_scale:!1,category:"objects"},paperclips:{keywords:["documents","stationery"],char:"🖇",fitzpatrick_scale:!1,category:"objects"},scissors:{keywords:["stationery","cut"],char:"✂️",fitzpatrick_scale:!1,category:"objects"},triangular_ruler:{keywords:["stationery","math","architect","sketch"],char:"📐",fitzpatrick_scale:!1,category:"objects"},straight_ruler:{keywords:["stationery","calculate","length","math","school","drawing","architect","sketch"],char:"📏",fitzpatrick_scale:!1,category:"objects"},abacus:{keywords:["calculation"],char:"🧮",fitzpatrick_scale:!1,category:"objects"},pushpin:{keywords:["stationery","mark","here"],char:"📌",fitzpatrick_scale:!1,category:"objects"},round_pushpin:{keywords:["stationery","location","map","here"],char:"📍",fitzpatrick_scale:!1,category:"objects"},triangular_flag_on_post:{keywords:["mark","milestone","place"],char:"🚩",fitzpatrick_scale:!1,category:"objects"},white_flag:{keywords:["losing","loser","lost","surrender","give up","fail"],char:"🏳",fitzpatrick_scale:!1,category:"objects"},black_flag:{keywords:["pirate"],char:"🏴",fitzpatrick_scale:!1,category:"objects"},rainbow_flag:{keywords:["flag","rainbow","pride","gay","lgbt","glbt","queer","homosexual","lesbian","bisexual","transgender"],char:"🏳️‍🌈",fitzpatrick_scale:!1,category:"objects"},closed_lock_with_key:{keywords:["security","privacy"],char:"🔐",fitzpatrick_scale:!1,category:"objects"},lock:{keywords:["security","password","padlock"],char:"🔒",fitzpatrick_scale:!1,category:"objects"},unlock:{keywords:["privacy","security"],char:"🔓",fitzpatrick_scale:!1,category:"objects"},lock_with_ink_pen:{keywords:["security","secret"],char:"🔏",fitzpatrick_scale:!1,category:"objects"},pen:{keywords:["stationery","writing","write"],char:"🖊",fitzpatrick_scale:!1,category:"objects"},fountain_pen:{keywords:["stationery","writing","write"],char:"🖋",fitzpatrick_scale:!1,category:"objects"},black_nib:{keywords:["pen","stationery","writing","write"],char:"✒️",fitzpatrick_scale:!1,category:"objects"},memo:{keywords:["write","documents","stationery","pencil","paper","writing","legal","exam","quiz","test","study","compose"],char:"📝",fitzpatrick_scale:!1,category:"objects"},pencil2:{keywords:["stationery","write","paper","writing","school","study"],char:"✏️",fitzpatrick_scale:!1,category:"objects"},crayon:{keywords:["drawing","creativity"],char:"🖍",fitzpatrick_scale:!1,category:"objects"},paintbrush:{keywords:["drawing","creativity","art"],char:"🖌",fitzpatrick_scale:!1,category:"objects"},mag:{keywords:["search","zoom","find","detective"],char:"🔍",fitzpatrick_scale:!1,category:"objects"},mag_right:{keywords:["search","zoom","find","detective"],char:"🔎",fitzpatrick_scale:!1,category:"objects"},heart:{keywords:["love","like","valentines"],char:"❤️",fitzpatrick_scale:!1,category:"symbols"},orange_heart:{keywords:["love","like","affection","valentines"],char:"🧡",fitzpatrick_scale:!1,category:"symbols"},yellow_heart:{keywords:["love","like","affection","valentines"],char:"💛",fitzpatrick_scale:!1,category:"symbols"},green_heart:{keywords:["love","like","affection","valentines"],char:"💚",fitzpatrick_scale:!1,category:"symbols"},blue_heart:{keywords:["love","like","affection","valentines"],char:"💙",fitzpatrick_scale:!1,category:"symbols"},purple_heart:{keywords:["love","like","affection","valentines"],char:"💜",fitzpatrick_scale:!1,category:"symbols"},black_heart:{keywords:["evil"],char:"🖤",fitzpatrick_scale:!1,category:"symbols"},broken_heart:{keywords:["sad","sorry","break","heart","heartbreak"],char:"💔",fitzpatrick_scale:!1,category:"symbols"},heavy_heart_exclamation:{keywords:["decoration","love"],char:"❣",fitzpatrick_scale:!1,category:"symbols"},two_hearts:{keywords:["love","like","affection","valentines","heart"],char:"💕",fitzpatrick_scale:!1,category:"symbols"},revolving_hearts:{keywords:["love","like","affection","valentines"],char:"💞",fitzpatrick_scale:!1,category:"symbols"},heartbeat:{keywords:["love","like","affection","valentines","pink","heart"],char:"💓",fitzpatrick_scale:!1,category:"symbols"},heartpulse:{keywords:["like","love","affection","valentines","pink"],char:"💗",fitzpatrick_scale:!1,category:"symbols"},sparkling_heart:{keywords:["love","like","affection","valentines"],char:"💖",fitzpatrick_scale:!1,category:"symbols"},cupid:{keywords:["love","like","heart","affection","valentines"],char:"💘",fitzpatrick_scale:!1,category:"symbols"},gift_heart:{keywords:["love","valentines"],char:"💝",fitzpatrick_scale:!1,category:"symbols"},heart_decoration:{keywords:["purple-square","love","like"],char:"💟",fitzpatrick_scale:!1,category:"symbols"},peace_symbol:{keywords:["hippie"],char:"☮",fitzpatrick_scale:!1,category:"symbols"},latin_cross:{keywords:["christianity"],char:"✝",fitzpatrick_scale:!1,category:"symbols"},star_and_crescent:{keywords:["islam"],char:"☪",fitzpatrick_scale:!1,category:"symbols"},om:{keywords:["hinduism","buddhism","sikhism","jainism"],char:"🕉",fitzpatrick_scale:!1,category:"symbols"},wheel_of_dharma:{keywords:["hinduism","buddhism","sikhism","jainism"],char:"☸",fitzpatrick_scale:!1,category:"symbols"},star_of_david:{keywords:["judaism"],char:"✡",fitzpatrick_scale:!1,category:"symbols"},six_pointed_star:{keywords:["purple-square","religion","jewish","hexagram"],char:"🔯",fitzpatrick_scale:!1,category:"symbols"},menorah:{keywords:["hanukkah","candles","jewish"],char:"🕎",fitzpatrick_scale:!1,category:"symbols"},yin_yang:{keywords:["balance"],char:"☯",fitzpatrick_scale:!1,category:"symbols"},orthodox_cross:{keywords:["suppedaneum","religion"],char:"☦",fitzpatrick_scale:!1,category:"symbols"},place_of_worship:{keywords:["religion","church","temple","prayer"],char:"🛐",fitzpatrick_scale:!1,category:"symbols"},ophiuchus:{keywords:["sign","purple-square","constellation","astrology"],char:"⛎",fitzpatrick_scale:!1,category:"symbols"},aries:{keywords:["sign","purple-square","zodiac","astrology"],char:"♈",fitzpatrick_scale:!1,category:"symbols"},taurus:{keywords:["purple-square","sign","zodiac","astrology"],char:"♉",fitzpatrick_scale:!1,category:"symbols"},gemini:{keywords:["sign","zodiac","purple-square","astrology"],char:"♊",fitzpatrick_scale:!1,category:"symbols"},cancer:{keywords:["sign","zodiac","purple-square","astrology"],char:"♋",fitzpatrick_scale:!1,category:"symbols"},leo:{keywords:["sign","purple-square","zodiac","astrology"],char:"♌",fitzpatrick_scale:!1,category:"symbols"},virgo:{keywords:["sign","zodiac","purple-square","astrology"],char:"♍",fitzpatrick_scale:!1,category:"symbols"},libra:{keywords:["sign","purple-square","zodiac","astrology"],char:"♎",fitzpatrick_scale:!1,category:"symbols"},scorpius:{keywords:["sign","zodiac","purple-square","astrology","scorpio"],char:"♏",fitzpatrick_scale:!1,category:"symbols"},sagittarius:{keywords:["sign","zodiac","purple-square","astrology"],char:"♐",fitzpatrick_scale:!1,category:"symbols"},capricorn:{keywords:["sign","zodiac","purple-square","astrology"],char:"♑",fitzpatrick_scale:!1,category:"symbols"},aquarius:{keywords:["sign","purple-square","zodiac","astrology"],char:"♒",fitzpatrick_scale:!1,category:"symbols"},pisces:{keywords:["purple-square","sign","zodiac","astrology"],char:"♓",fitzpatrick_scale:!1,category:"symbols"},id:{keywords:["purple-square","words"],char:"🆔",fitzpatrick_scale:!1,category:"symbols"},atom_symbol:{keywords:["science","physics","chemistry"],char:"⚛",fitzpatrick_scale:!1,category:"symbols"},u7a7a:{keywords:["kanji","japanese","chinese","empty","sky","blue-square"],char:"🈳",fitzpatrick_scale:!1,category:"symbols"},u5272:{keywords:["cut","divide","chinese","kanji","pink-square"],char:"🈹",fitzpatrick_scale:!1,category:"symbols"},radioactive:{keywords:["nuclear","danger"],char:"☢",fitzpatrick_scale:!1,category:"symbols"},biohazard:{keywords:["danger"],char:"☣",fitzpatrick_scale:!1,category:"symbols"},mobile_phone_off:{keywords:["mute","orange-square","silence","quiet"],char:"📴",fitzpatrick_scale:!1,category:"symbols"},vibration_mode:{keywords:["orange-square","phone"],char:"📳",fitzpatrick_scale:!1,category:"symbols"},u6709:{keywords:["orange-square","chinese","have","kanji"],char:"🈶",fitzpatrick_scale:!1,category:"symbols"},u7121:{keywords:["nothing","chinese","kanji","japanese","orange-square"],char:"🈚",fitzpatrick_scale:!1,category:"symbols"},u7533:{keywords:["chinese","japanese","kanji","orange-square"],char:"🈸",fitzpatrick_scale:!1,category:"symbols"},u55b6:{keywords:["japanese","opening hours","orange-square"],char:"🈺",fitzpatrick_scale:!1,category:"symbols"},u6708:{keywords:["chinese","month","moon","japanese","orange-square","kanji"],char:"🈷️",fitzpatrick_scale:!1,category:"symbols"},eight_pointed_black_star:{keywords:["orange-square","shape","polygon"],char:"✴️",fitzpatrick_scale:!1,category:"symbols"},vs:{keywords:["words","orange-square"],char:"🆚",fitzpatrick_scale:!1,category:"symbols"},accept:{keywords:["ok","good","chinese","kanji","agree","yes","orange-circle"],char:"🉑",fitzpatrick_scale:!1,category:"symbols"},white_flower:{keywords:["japanese","spring"],char:"💮",fitzpatrick_scale:!1,category:"symbols"},ideograph_advantage:{keywords:["chinese","kanji","obtain","get","circle"],char:"🉐",fitzpatrick_scale:!1,category:"symbols"},secret:{keywords:["privacy","chinese","sshh","kanji","red-circle"],char:"㊙️",fitzpatrick_scale:!1,category:"symbols"},congratulations:{keywords:["chinese","kanji","japanese","red-circle"],char:"㊗️",fitzpatrick_scale:!1,category:"symbols"},u5408:{keywords:["japanese","chinese","join","kanji","red-square"],char:"🈴",fitzpatrick_scale:!1,category:"symbols"},u6e80:{keywords:["full","chinese","japanese","red-square","kanji"],char:"🈵",fitzpatrick_scale:!1,category:"symbols"},u7981:{keywords:["kanji","japanese","chinese","forbidden","limit","restricted","red-square"],char:"🈲",fitzpatrick_scale:!1,category:"symbols"},a:{keywords:["red-square","alphabet","letter"],char:"🅰️",fitzpatrick_scale:!1,category:"symbols"},b:{keywords:["red-square","alphabet","letter"],char:"🅱️",fitzpatrick_scale:!1,category:"symbols"},ab:{keywords:["red-square","alphabet"],char:"🆎",fitzpatrick_scale:!1,category:"symbols"},cl:{keywords:["alphabet","words","red-square"],char:"🆑",fitzpatrick_scale:!1,category:"symbols"},o2:{keywords:["alphabet","red-square","letter"],char:"🅾️",fitzpatrick_scale:!1,category:"symbols"},sos:{keywords:["help","red-square","words","emergency","911"],char:"🆘",fitzpatrick_scale:!1,category:"symbols"},no_entry:{keywords:["limit","security","privacy","bad","denied","stop","circle"],char:"⛔",fitzpatrick_scale:!1,category:"symbols"},name_badge:{keywords:["fire","forbid"],char:"📛",fitzpatrick_scale:!1,category:"symbols"},no_entry_sign:{keywords:["forbid","stop","limit","denied","disallow","circle"],char:"🚫",fitzpatrick_scale:!1,category:"symbols"},x:{keywords:["no","delete","remove","cancel","red"],char:"❌",fitzpatrick_scale:!1,category:"symbols"},o:{keywords:["circle","round"],char:"⭕",fitzpatrick_scale:!1,category:"symbols"},stop_sign:{keywords:["stop"],char:"🛑",fitzpatrick_scale:!1,category:"symbols"},anger:{keywords:["angry","mad"],char:"💢",fitzpatrick_scale:!1,category:"symbols"},hotsprings:{keywords:["bath","warm","relax"],char:"♨️",fitzpatrick_scale:!1,category:"symbols"},no_pedestrians:{keywords:["rules","crossing","walking","circle"],char:"🚷",fitzpatrick_scale:!1,category:"symbols"},do_not_litter:{keywords:["trash","bin","garbage","circle"],char:"🚯",fitzpatrick_scale:!1,category:"symbols"},no_bicycles:{keywords:["cyclist","prohibited","circle"],char:"🚳",fitzpatrick_scale:!1,category:"symbols"},"non-potable_water":{keywords:["drink","faucet","tap","circle"],char:"🚱",fitzpatrick_scale:!1,category:"symbols"},underage:{keywords:["18","drink","pub","night","minor","circle"],char:"🔞",fitzpatrick_scale:!1,category:"symbols"},no_mobile_phones:{keywords:["iphone","mute","circle"],char:"📵",fitzpatrick_scale:!1,category:"symbols"},exclamation:{keywords:["heavy_exclamation_mark","danger","surprise","punctuation","wow","warning"],char:"❗",fitzpatrick_scale:!1,category:"symbols"},grey_exclamation:{keywords:["surprise","punctuation","gray","wow","warning"],char:"❕",fitzpatrick_scale:!1,category:"symbols"},question:{keywords:["doubt","confused"],char:"❓",fitzpatrick_scale:!1,category:"symbols"},grey_question:{keywords:["doubts","gray","huh","confused"],char:"❔",fitzpatrick_scale:!1,category:"symbols"},bangbang:{keywords:["exclamation","surprise"],char:"‼️",fitzpatrick_scale:!1,category:"symbols"},interrobang:{keywords:["wat","punctuation","surprise"],char:"⁉️",fitzpatrick_scale:!1,category:"symbols"},100:{keywords:["score","perfect","numbers","century","exam","quiz","test","pass","hundred"],char:"💯",fitzpatrick_scale:!1,category:"symbols"},low_brightness:{keywords:["sun","afternoon","warm","summer"],char:"🔅",fitzpatrick_scale:!1,category:"symbols"},high_brightness:{keywords:["sun","light"],char:"🔆",fitzpatrick_scale:!1,category:"symbols"},trident:{keywords:["weapon","spear"],char:"🔱",fitzpatrick_scale:!1,category:"symbols"},fleur_de_lis:{keywords:["decorative","scout"],char:"⚜",fitzpatrick_scale:!1,category:"symbols"},part_alternation_mark:{keywords:["graph","presentation","stats","business","economics","bad"],char:"〽️",fitzpatrick_scale:!1,category:"symbols"},warning:{keywords:["exclamation","wip","alert","error","problem","issue"],char:"⚠️",fitzpatrick_scale:!1,category:"symbols"},children_crossing:{keywords:["school","warning","danger","sign","driving","yellow-diamond"],char:"🚸",fitzpatrick_scale:!1,category:"symbols"},beginner:{keywords:["badge","shield"],char:"🔰",fitzpatrick_scale:!1,category:"symbols"},recycle:{keywords:["arrow","environment","garbage","trash"],char:"♻️",fitzpatrick_scale:!1,category:"symbols"},u6307:{keywords:["chinese","point","green-square","kanji"],char:"🈯",fitzpatrick_scale:!1,category:"symbols"},chart:{keywords:["green-square","graph","presentation","stats"],char:"💹",fitzpatrick_scale:!1,category:"symbols"},sparkle:{keywords:["stars","green-square","awesome","good","fireworks"],char:"❇️",fitzpatrick_scale:!1,category:"symbols"},eight_spoked_asterisk:{keywords:["star","sparkle","green-square"],char:"✳️",fitzpatrick_scale:!1,category:"symbols"},negative_squared_cross_mark:{keywords:["x","green-square","no","deny"],char:"❎",fitzpatrick_scale:!1,category:"symbols"},white_check_mark:{keywords:["green-square","ok","agree","vote","election","answer","tick"],char:"✅",fitzpatrick_scale:!1,category:"symbols"},diamond_shape_with_a_dot_inside:{keywords:["jewel","blue","gem","crystal","fancy"],char:"💠",fitzpatrick_scale:!1,category:"symbols"},cyclone:{keywords:["weather","swirl","blue","cloud","vortex","spiral","whirlpool","spin","tornado","hurricane","typhoon"],char:"🌀",fitzpatrick_scale:!1,category:"symbols"},loop:{keywords:["tape","cassette"],char:"➿",fitzpatrick_scale:!1,category:"symbols"},globe_with_meridians:{keywords:["earth","international","world","internet","interweb","i18n"],char:"🌐",fitzpatrick_scale:!1,category:"symbols"},m:{keywords:["alphabet","blue-circle","letter"],char:"Ⓜ️",fitzpatrick_scale:!1,category:"symbols"},atm:{keywords:["money","sales","cash","blue-square","payment","bank"],char:"🏧",fitzpatrick_scale:!1,category:"symbols"},sa:{keywords:["japanese","blue-square","katakana"],char:"🈂️",fitzpatrick_scale:!1,category:"symbols"},passport_control:{keywords:["custom","blue-square"],char:"🛂",fitzpatrick_scale:!1,category:"symbols"},customs:{keywords:["passport","border","blue-square"],char:"🛃",fitzpatrick_scale:!1,category:"symbols"},baggage_claim:{keywords:["blue-square","airport","transport"],char:"🛄",fitzpatrick_scale:!1,category:"symbols"},left_luggage:{keywords:["blue-square","travel"],char:"🛅",fitzpatrick_scale:!1,category:"symbols"},wheelchair:{keywords:["blue-square","disabled","a11y","accessibility"],char:"♿",fitzpatrick_scale:!1,category:"symbols"},no_smoking:{keywords:["cigarette","blue-square","smell","smoke"],char:"🚭",fitzpatrick_scale:!1,category:"symbols"},wc:{keywords:["toilet","restroom","blue-square"],char:"🚾",fitzpatrick_scale:!1,category:"symbols"},parking:{keywords:["cars","blue-square","alphabet","letter"],char:"🅿️",fitzpatrick_scale:!1,category:"symbols"},potable_water:{keywords:["blue-square","liquid","restroom","cleaning","faucet"],char:"🚰",fitzpatrick_scale:!1,category:"symbols"},mens:{keywords:["toilet","restroom","wc","blue-square","gender","male"],char:"🚹",fitzpatrick_scale:!1,category:"symbols"},womens:{keywords:["purple-square","woman","female","toilet","loo","restroom","gender"],char:"🚺",fitzpatrick_scale:!1,category:"symbols"},baby_symbol:{keywords:["orange-square","child"],char:"🚼",fitzpatrick_scale:!1,category:"symbols"},restroom:{keywords:["blue-square","toilet","refresh","wc","gender"],char:"🚻",fitzpatrick_scale:!1,category:"symbols"},put_litter_in_its_place:{keywords:["blue-square","sign","human","info"],char:"🚮",fitzpatrick_scale:!1,category:"symbols"},cinema:{keywords:["blue-square","record","film","movie","curtain","stage","theater"],char:"🎦",fitzpatrick_scale:!1,category:"symbols"},signal_strength:{keywords:["blue-square","reception","phone","internet","connection","wifi","bluetooth","bars"],char:"📶",fitzpatrick_scale:!1,category:"symbols"},koko:{keywords:["blue-square","here","katakana","japanese","destination"],char:"🈁",fitzpatrick_scale:!1,category:"symbols"},ng:{keywords:["blue-square","words","shape","icon"],char:"🆖",fitzpatrick_scale:!1,category:"symbols"},ok:{keywords:["good","agree","yes","blue-square"],char:"🆗",fitzpatrick_scale:!1,category:"symbols"},up:{keywords:["blue-square","above","high"],char:"🆙",fitzpatrick_scale:!1,category:"symbols"},cool:{keywords:["words","blue-square"],char:"🆒",fitzpatrick_scale:!1,category:"symbols"},new:{keywords:["blue-square","words","start"],char:"🆕",fitzpatrick_scale:!1,category:"symbols"},free:{keywords:["blue-square","words"],char:"🆓",fitzpatrick_scale:!1,category:"symbols"},zero:{keywords:["0","numbers","blue-square","null"],char:"0️⃣",fitzpatrick_scale:!1,category:"symbols"},one:{keywords:["blue-square","numbers","1"],char:"1️⃣",fitzpatrick_scale:!1,category:"symbols"},two:{keywords:["numbers","2","prime","blue-square"],char:"2️⃣",fitzpatrick_scale:!1,category:"symbols"},three:{keywords:["3","numbers","prime","blue-square"],char:"3️⃣",fitzpatrick_scale:!1,category:"symbols"},four:{keywords:["4","numbers","blue-square"],char:"4️⃣",fitzpatrick_scale:!1,category:"symbols"},five:{keywords:["5","numbers","blue-square","prime"],char:"5️⃣",fitzpatrick_scale:!1,category:"symbols"},six:{keywords:["6","numbers","blue-square"],char:"6️⃣",fitzpatrick_scale:!1,category:"symbols"},seven:{keywords:["7","numbers","blue-square","prime"],char:"7️⃣",fitzpatrick_scale:!1,category:"symbols"},eight:{keywords:["8","blue-square","numbers"],char:"8️⃣",fitzpatrick_scale:!1,category:"symbols"},nine:{keywords:["blue-square","numbers","9"],char:"9️⃣",fitzpatrick_scale:!1,category:"symbols"},keycap_ten:{keywords:["numbers","10","blue-square"],char:"🔟",fitzpatrick_scale:!1,category:"symbols"},asterisk:{keywords:["star","keycap"],char:"*⃣",fitzpatrick_scale:!1,category:"symbols"},1234:{keywords:["numbers","blue-square"],char:"🔢",fitzpatrick_scale:!1,category:"symbols"},eject_button:{keywords:["blue-square"],char:"⏏️",fitzpatrick_scale:!1,category:"symbols"},arrow_forward:{keywords:["blue-square","right","direction","play"],char:"▶️",fitzpatrick_scale:!1,category:"symbols"},pause_button:{keywords:["pause","blue-square"],char:"⏸",fitzpatrick_scale:!1,category:"symbols"},next_track_button:{keywords:["forward","next","blue-square"],char:"⏭",fitzpatrick_scale:!1,category:"symbols"},stop_button:{keywords:["blue-square"],char:"⏹",fitzpatrick_scale:!1,category:"symbols"},record_button:{keywords:["blue-square"],char:"⏺",fitzpatrick_scale:!1,category:"symbols"},play_or_pause_button:{keywords:["blue-square","play","pause"],char:"⏯",fitzpatrick_scale:!1,category:"symbols"},previous_track_button:{keywords:["backward"],char:"⏮",fitzpatrick_scale:!1,category:"symbols"},fast_forward:{keywords:["blue-square","play","speed","continue"],char:"⏩",fitzpatrick_scale:!1,category:"symbols"},rewind:{keywords:["play","blue-square"],char:"⏪",fitzpatrick_scale:!1,category:"symbols"},twisted_rightwards_arrows:{keywords:["blue-square","shuffle","music","random"],char:"🔀",fitzpatrick_scale:!1,category:"symbols"},repeat:{keywords:["loop","record"],char:"🔁",fitzpatrick_scale:!1,category:"symbols"},repeat_one:{keywords:["blue-square","loop"],char:"🔂",fitzpatrick_scale:!1,category:"symbols"},arrow_backward:{keywords:["blue-square","left","direction"],char:"◀️",fitzpatrick_scale:!1,category:"symbols"},arrow_up_small:{keywords:["blue-square","triangle","direction","point","forward","top"],char:"🔼",fitzpatrick_scale:!1,category:"symbols"},arrow_down_small:{keywords:["blue-square","direction","bottom"],char:"🔽",fitzpatrick_scale:!1,category:"symbols"},arrow_double_up:{keywords:["blue-square","direction","top"],char:"⏫",fitzpatrick_scale:!1,category:"symbols"},arrow_double_down:{keywords:["blue-square","direction","bottom"],char:"⏬",fitzpatrick_scale:!1,category:"symbols"},arrow_right:{keywords:["blue-square","next"],char:"➡️",fitzpatrick_scale:!1,category:"symbols"},arrow_left:{keywords:["blue-square","previous","back"],char:"⬅️",fitzpatrick_scale:!1,category:"symbols"},arrow_up:{keywords:["blue-square","continue","top","direction"],char:"⬆️",fitzpatrick_scale:!1,category:"symbols"},arrow_down:{keywords:["blue-square","direction","bottom"],char:"⬇️",fitzpatrick_scale:!1,category:"symbols"},arrow_upper_right:{keywords:["blue-square","point","direction","diagonal","northeast"],char:"↗️",fitzpatrick_scale:!1,category:"symbols"},arrow_lower_right:{keywords:["blue-square","direction","diagonal","southeast"],char:"↘️",fitzpatrick_scale:!1,category:"symbols"},arrow_lower_left:{keywords:["blue-square","direction","diagonal","southwest"],char:"↙️",fitzpatrick_scale:!1,category:"symbols"},arrow_upper_left:{keywords:["blue-square","point","direction","diagonal","northwest"],char:"↖️",fitzpatrick_scale:!1,category:"symbols"},arrow_up_down:{keywords:["blue-square","direction","way","vertical"],char:"↕️",fitzpatrick_scale:!1,category:"symbols"},left_right_arrow:{keywords:["shape","direction","horizontal","sideways"],char:"↔️",fitzpatrick_scale:!1,category:"symbols"},arrows_counterclockwise:{keywords:["blue-square","sync","cycle"],char:"🔄",fitzpatrick_scale:!1,category:"symbols"},arrow_right_hook:{keywords:["blue-square","return","rotate","direction"],char:"↪️",fitzpatrick_scale:!1,category:"symbols"},leftwards_arrow_with_hook:{keywords:["back","return","blue-square","undo","enter"],char:"↩️",fitzpatrick_scale:!1,category:"symbols"},arrow_heading_up:{keywords:["blue-square","direction","top"],char:"⤴️",fitzpatrick_scale:!1,category:"symbols"},arrow_heading_down:{keywords:["blue-square","direction","bottom"],char:"⤵️",fitzpatrick_scale:!1,category:"symbols"},hash:{keywords:["symbol","blue-square","twitter"],char:"#️⃣",fitzpatrick_scale:!1,category:"symbols"},information_source:{keywords:["blue-square","alphabet","letter"],char:"ℹ️",fitzpatrick_scale:!1,category:"symbols"},abc:{keywords:["blue-square","alphabet"],char:"🔤",fitzpatrick_scale:!1,category:"symbols"},abcd:{keywords:["blue-square","alphabet"],char:"🔡",fitzpatrick_scale:!1,category:"symbols"},capital_abcd:{keywords:["alphabet","words","blue-square"],char:"🔠",fitzpatrick_scale:!1,category:"symbols"},symbols:{keywords:["blue-square","music","note","ampersand","percent","glyphs","characters"],char:"🔣",fitzpatrick_scale:!1,category:"symbols"},musical_note:{keywords:["score","tone","sound"],char:"🎵",fitzpatrick_scale:!1,category:"symbols"},notes:{keywords:["music","score"],char:"🎶",fitzpatrick_scale:!1,category:"symbols"},wavy_dash:{keywords:["draw","line","moustache","mustache","squiggle","scribble"],char:"〰️",fitzpatrick_scale:!1,category:"symbols"},curly_loop:{keywords:["scribble","draw","shape","squiggle"],char:"➰",fitzpatrick_scale:!1,category:"symbols"},heavy_check_mark:{keywords:["ok","nike","answer","yes","tick"],char:"✔️",fitzpatrick_scale:!1,category:"symbols"},arrows_clockwise:{keywords:["sync","cycle","round","repeat"],char:"🔃",fitzpatrick_scale:!1,category:"symbols"},heavy_plus_sign:{keywords:["math","calculation","addition","more","increase"],char:"➕",fitzpatrick_scale:!1,category:"symbols"},heavy_minus_sign:{keywords:["math","calculation","subtract","less"],char:"➖",fitzpatrick_scale:!1,category:"symbols"},heavy_division_sign:{keywords:["divide","math","calculation"],char:"➗",fitzpatrick_scale:!1,category:"symbols"},heavy_multiplication_x:{keywords:["math","calculation"],char:"✖️",fitzpatrick_scale:!1,category:"symbols"},infinity:{keywords:["forever"],char:"♾",fitzpatrick_scale:!1,category:"symbols"},heavy_dollar_sign:{keywords:["money","sales","payment","currency","buck"],char:"💲",fitzpatrick_scale:!1,category:"symbols"},currency_exchange:{keywords:["money","sales","dollar","travel"],char:"💱",fitzpatrick_scale:!1,category:"symbols"},copyright:{keywords:["ip","license","circle","law","legal"],char:"©️",fitzpatrick_scale:!1,category:"symbols"},registered:{keywords:["alphabet","circle"],char:"®️",fitzpatrick_scale:!1,category:"symbols"},tm:{keywords:["trademark","brand","law","legal"],char:"™️",fitzpatrick_scale:!1,category:"symbols"},end:{keywords:["words","arrow"],char:"🔚",fitzpatrick_scale:!1,category:"symbols"},back:{keywords:["arrow","words","return"],char:"🔙",fitzpatrick_scale:!1,category:"symbols"},on:{keywords:["arrow","words"],char:"🔛",fitzpatrick_scale:!1,category:"symbols"},top:{keywords:["words","blue-square"],char:"🔝",fitzpatrick_scale:!1,category:"symbols"},soon:{keywords:["arrow","words"],char:"🔜",fitzpatrick_scale:!1,category:"symbols"},ballot_box_with_check:{keywords:["ok","agree","confirm","black-square","vote","election","yes","tick"],char:"☑️",fitzpatrick_scale:!1,category:"symbols"},radio_button:{keywords:["input","old","music","circle"],char:"🔘",fitzpatrick_scale:!1,category:"symbols"},white_circle:{keywords:["shape","round"],char:"⚪",fitzpatrick_scale:!1,category:"symbols"},black_circle:{keywords:["shape","button","round"],char:"⚫",fitzpatrick_scale:!1,category:"symbols"},red_circle:{keywords:["shape","error","danger"],char:"🔴",fitzpatrick_scale:!1,category:"symbols"},large_blue_circle:{keywords:["shape","icon","button"],char:"🔵",fitzpatrick_scale:!1,category:"symbols"},small_orange_diamond:{keywords:["shape","jewel","gem"],char:"🔸",fitzpatrick_scale:!1,category:"symbols"},small_blue_diamond:{keywords:["shape","jewel","gem"],char:"🔹",fitzpatrick_scale:!1,category:"symbols"},large_orange_diamond:{keywords:["shape","jewel","gem"],char:"🔶",fitzpatrick_scale:!1,category:"symbols"},large_blue_diamond:{keywords:["shape","jewel","gem"],char:"🔷",fitzpatrick_scale:!1,category:"symbols"},small_red_triangle:{keywords:["shape","direction","up","top"],char:"🔺",fitzpatrick_scale:!1,category:"symbols"},black_small_square:{keywords:["shape","icon"],char:"▪️",fitzpatrick_scale:!1,category:"symbols"},white_small_square:{keywords:["shape","icon"],char:"▫️",fitzpatrick_scale:!1,category:"symbols"},black_large_square:{keywords:["shape","icon","button"],char:"⬛",fitzpatrick_scale:!1,category:"symbols"},white_large_square:{keywords:["shape","icon","stone","button"],char:"⬜",fitzpatrick_scale:!1,category:"symbols"},small_red_triangle_down:{keywords:["shape","direction","bottom"],char:"🔻",fitzpatrick_scale:!1,category:"symbols"},black_medium_square:{keywords:["shape","button","icon"],char:"◼️",fitzpatrick_scale:!1,category:"symbols"},white_medium_square:{keywords:["shape","stone","icon"],char:"◻️",fitzpatrick_scale:!1,category:"symbols"},black_medium_small_square:{keywords:["icon","shape","button"],char:"◾",fitzpatrick_scale:!1,category:"symbols"},white_medium_small_square:{keywords:["shape","stone","icon","button"],char:"◽",fitzpatrick_scale:!1,category:"symbols"},black_square_button:{keywords:["shape","input","frame"],char:"🔲",fitzpatrick_scale:!1,category:"symbols"},white_square_button:{keywords:["shape","input"],char:"🔳",fitzpatrick_scale:!1,category:"symbols"},speaker:{keywords:["sound","volume","silence","broadcast"],char:"🔈",fitzpatrick_scale:!1,category:"symbols"},sound:{keywords:["volume","speaker","broadcast"],char:"🔉",fitzpatrick_scale:!1,category:"symbols"},loud_sound:{keywords:["volume","noise","noisy","speaker","broadcast"],char:"🔊",fitzpatrick_scale:!1,category:"symbols"},mute:{keywords:["sound","volume","silence","quiet"],char:"🔇",fitzpatrick_scale:!1,category:"symbols"},mega:{keywords:["sound","speaker","volume"],char:"📣",fitzpatrick_scale:!1,category:"symbols"},loudspeaker:{keywords:["volume","sound"],char:"📢",fitzpatrick_scale:!1,category:"symbols"},bell:{keywords:["sound","notification","christmas","xmas","chime"],char:"🔔",fitzpatrick_scale:!1,category:"symbols"},no_bell:{keywords:["sound","volume","mute","quiet","silent"],char:"🔕",fitzpatrick_scale:!1,category:"symbols"},black_joker:{keywords:["poker","cards","game","play","magic"],char:"🃏",fitzpatrick_scale:!1,category:"symbols"},mahjong:{keywords:["game","play","chinese","kanji"],char:"🀄",fitzpatrick_scale:!1,category:"symbols"},spades:{keywords:["poker","cards","suits","magic"],char:"♠️",fitzpatrick_scale:!1,category:"symbols"},clubs:{keywords:["poker","cards","magic","suits"],char:"♣️",fitzpatrick_scale:!1,category:"symbols"},hearts:{keywords:["poker","cards","magic","suits"],char:"♥️",fitzpatrick_scale:!1,category:"symbols"},diamonds:{keywords:["poker","cards","magic","suits"],char:"♦️",fitzpatrick_scale:!1,category:"symbols"},flower_playing_cards:{keywords:["game","sunset","red"],char:"🎴",fitzpatrick_scale:!1,category:"symbols"},thought_balloon:{keywords:["bubble","cloud","speech","thinking","dream"],char:"💭",fitzpatrick_scale:!1,category:"symbols"},right_anger_bubble:{keywords:["caption","speech","thinking","mad"],char:"🗯",fitzpatrick_scale:!1,category:"symbols"},speech_balloon:{keywords:["bubble","words","message","talk","chatting"],char:"💬",fitzpatrick_scale:!1,category:"symbols"},left_speech_bubble:{keywords:["words","message","talk","chatting"],char:"🗨",fitzpatrick_scale:!1,category:"symbols"},clock1:{keywords:["time","late","early","schedule"],char:"🕐",fitzpatrick_scale:!1,category:"symbols"},clock2:{keywords:["time","late","early","schedule"],char:"🕑",fitzpatrick_scale:!1,category:"symbols"},clock3:{keywords:["time","late","early","schedule"],char:"🕒",fitzpatrick_scale:!1,category:"symbols"},clock4:{keywords:["time","late","early","schedule"],char:"🕓",fitzpatrick_scale:!1,category:"symbols"},clock5:{keywords:["time","late","early","schedule"],char:"🕔",fitzpatrick_scale:!1,category:"symbols"},clock6:{keywords:["time","late","early","schedule","dawn","dusk"],char:"🕕",fitzpatrick_scale:!1,category:"symbols"},clock7:{keywords:["time","late","early","schedule"],char:"🕖",fitzpatrick_scale:!1,category:"symbols"},clock8:{keywords:["time","late","early","schedule"],char:"🕗",fitzpatrick_scale:!1,category:"symbols"},clock9:{keywords:["time","late","early","schedule"],char:"🕘",fitzpatrick_scale:!1,category:"symbols"},clock10:{keywords:["time","late","early","schedule"],char:"🕙",fitzpatrick_scale:!1,category:"symbols"},clock11:{keywords:["time","late","early","schedule"],char:"🕚",fitzpatrick_scale:!1,category:"symbols"},clock12:{keywords:["time","noon","midnight","midday","late","early","schedule"],char:"🕛",fitzpatrick_scale:!1,category:"symbols"},clock130:{keywords:["time","late","early","schedule"],char:"🕜",fitzpatrick_scale:!1,category:"symbols"},clock230:{keywords:["time","late","early","schedule"],char:"🕝",fitzpatrick_scale:!1,category:"symbols"},clock330:{keywords:["time","late","early","schedule"],char:"🕞",fitzpatrick_scale:!1,category:"symbols"},clock430:{keywords:["time","late","early","schedule"],char:"🕟",fitzpatrick_scale:!1,category:"symbols"},clock530:{keywords:["time","late","early","schedule"],char:"🕠",fitzpatrick_scale:!1,category:"symbols"},clock630:{keywords:["time","late","early","schedule"],char:"🕡",fitzpatrick_scale:!1,category:"symbols"},clock730:{keywords:["time","late","early","schedule"],char:"🕢",fitzpatrick_scale:!1,category:"symbols"},clock830:{keywords:["time","late","early","schedule"],char:"🕣",fitzpatrick_scale:!1,category:"symbols"},clock930:{keywords:["time","late","early","schedule"],char:"🕤",fitzpatrick_scale:!1,category:"symbols"},clock1030:{keywords:["time","late","early","schedule"],char:"🕥",fitzpatrick_scale:!1,category:"symbols"},clock1130:{keywords:["time","late","early","schedule"],char:"🕦",fitzpatrick_scale:!1,category:"symbols"},clock1230:{keywords:["time","late","early","schedule"],char:"🕧",fitzpatrick_scale:!1,category:"symbols"},afghanistan:{keywords:["af","flag","nation","country","banner"],char:"🇦🇫",fitzpatrick_scale:!1,category:"flags"},aland_islands:{keywords:["Åland","islands","flag","nation","country","banner"],char:"🇦🇽",fitzpatrick_scale:!1,category:"flags"},albania:{keywords:["al","flag","nation","country","banner"],char:"🇦🇱",fitzpatrick_scale:!1,category:"flags"},algeria:{keywords:["dz","flag","nation","country","banner"],char:"🇩🇿",fitzpatrick_scale:!1,category:"flags"},american_samoa:{keywords:["american","ws","flag","nation","country","banner"],char:"🇦🇸",fitzpatrick_scale:!1,category:"flags"},andorra:{keywords:["ad","flag","nation","country","banner"],char:"🇦🇩",fitzpatrick_scale:!1,category:"flags"},angola:{keywords:["ao","flag","nation","country","banner"],char:"🇦🇴",fitzpatrick_scale:!1,category:"flags"},anguilla:{keywords:["ai","flag","nation","country","banner"],char:"🇦🇮",fitzpatrick_scale:!1,category:"flags"},antarctica:{keywords:["aq","flag","nation","country","banner"],char:"🇦🇶",fitzpatrick_scale:!1,category:"flags"},antigua_barbuda:{keywords:["antigua","barbuda","flag","nation","country","banner"],char:"🇦🇬",fitzpatrick_scale:!1,category:"flags"},argentina:{keywords:["ar","flag","nation","country","banner"],char:"🇦🇷",fitzpatrick_scale:!1,category:"flags"},armenia:{keywords:["am","flag","nation","country","banner"],char:"🇦🇲",fitzpatrick_scale:!1,category:"flags"},aruba:{keywords:["aw","flag","nation","country","banner"],char:"🇦🇼",fitzpatrick_scale:!1,category:"flags"},australia:{keywords:["au","flag","nation","country","banner"],char:"🇦🇺",fitzpatrick_scale:!1,category:"flags"},austria:{keywords:["at","flag","nation","country","banner"],char:"🇦🇹",fitzpatrick_scale:!1,category:"flags"},azerbaijan:{keywords:["az","flag","nation","country","banner"],char:"🇦🇿",fitzpatrick_scale:!1,category:"flags"},bahamas:{keywords:["bs","flag","nation","country","banner"],char:"🇧🇸",fitzpatrick_scale:!1,category:"flags"},bahrain:{keywords:["bh","flag","nation","country","banner"],char:"🇧🇭",fitzpatrick_scale:!1,category:"flags"},bangladesh:{keywords:["bd","flag","nation","country","banner"],char:"🇧🇩",fitzpatrick_scale:!1,category:"flags"},barbados:{keywords:["bb","flag","nation","country","banner"],char:"🇧🇧",fitzpatrick_scale:!1,category:"flags"},belarus:{keywords:["by","flag","nation","country","banner"],char:"🇧🇾",fitzpatrick_scale:!1,category:"flags"},belgium:{keywords:["be","flag","nation","country","banner"],char:"🇧🇪",fitzpatrick_scale:!1,category:"flags"},belize:{keywords:["bz","flag","nation","country","banner"],char:"🇧🇿",fitzpatrick_scale:!1,category:"flags"},benin:{keywords:["bj","flag","nation","country","banner"],char:"🇧🇯",fitzpatrick_scale:!1,category:"flags"},bermuda:{keywords:["bm","flag","nation","country","banner"],char:"🇧🇲",fitzpatrick_scale:!1,category:"flags"},bhutan:{keywords:["bt","flag","nation","country","banner"],char:"🇧🇹",fitzpatrick_scale:!1,category:"flags"},bolivia:{keywords:["bo","flag","nation","country","banner"],char:"🇧🇴",fitzpatrick_scale:!1,category:"flags"},caribbean_netherlands:{keywords:["bonaire","flag","nation","country","banner"],char:"🇧🇶",fitzpatrick_scale:!1,category:"flags"},bosnia_herzegovina:{keywords:["bosnia","herzegovina","flag","nation","country","banner"],char:"🇧🇦",fitzpatrick_scale:!1,category:"flags"},botswana:{keywords:["bw","flag","nation","country","banner"],char:"🇧🇼",fitzpatrick_scale:!1,category:"flags"},brazil:{keywords:["br","flag","nation","country","banner"],char:"🇧🇷",fitzpatrick_scale:!1,category:"flags"},british_indian_ocean_territory:{keywords:["british","indian","ocean","territory","flag","nation","country","banner"],char:"🇮🇴",fitzpatrick_scale:!1,category:"flags"},british_virgin_islands:{keywords:["british","virgin","islands","bvi","flag","nation","country","banner"],char:"🇻🇬",fitzpatrick_scale:!1,category:"flags"},brunei:{keywords:["bn","darussalam","flag","nation","country","banner"],char:"🇧🇳",fitzpatrick_scale:!1,category:"flags"},bulgaria:{keywords:["bg","flag","nation","country","banner"],char:"🇧🇬",fitzpatrick_scale:!1,category:"flags"},burkina_faso:{keywords:["burkina","faso","flag","nation","country","banner"],char:"🇧🇫",fitzpatrick_scale:!1,category:"flags"},burundi:{keywords:["bi","flag","nation","country","banner"],char:"🇧🇮",fitzpatrick_scale:!1,category:"flags"},cape_verde:{keywords:["cabo","verde","flag","nation","country","banner"],char:"🇨🇻",fitzpatrick_scale:!1,category:"flags"},cambodia:{keywords:["kh","flag","nation","country","banner"],char:"🇰🇭",fitzpatrick_scale:!1,category:"flags"},cameroon:{keywords:["cm","flag","nation","country","banner"],char:"🇨🇲",fitzpatrick_scale:!1,category:"flags"},canada:{keywords:["ca","flag","nation","country","banner"],char:"🇨🇦",fitzpatrick_scale:!1,category:"flags"},canary_islands:{keywords:["canary","islands","flag","nation","country","banner"],char:"🇮🇨",fitzpatrick_scale:!1,category:"flags"},cayman_islands:{keywords:["cayman","islands","flag","nation","country","banner"],char:"🇰🇾",fitzpatrick_scale:!1,category:"flags"},central_african_republic:{keywords:["central","african","republic","flag","nation","country","banner"],char:"🇨🇫",fitzpatrick_scale:!1,category:"flags"},chad:{keywords:["td","flag","nation","country","banner"],char:"🇹🇩",fitzpatrick_scale:!1,category:"flags"},chile:{keywords:["flag","nation","country","banner"],char:"🇨🇱",fitzpatrick_scale:!1,category:"flags"},cn:{keywords:["china","chinese","prc","flag","country","nation","banner"],char:"🇨🇳",fitzpatrick_scale:!1,category:"flags"},christmas_island:{keywords:["christmas","island","flag","nation","country","banner"],char:"🇨🇽",fitzpatrick_scale:!1,category:"flags"},cocos_islands:{keywords:["cocos","keeling","islands","flag","nation","country","banner"],char:"🇨🇨",fitzpatrick_scale:!1,category:"flags"},colombia:{keywords:["co","flag","nation","country","banner"],char:"🇨🇴",fitzpatrick_scale:!1,category:"flags"},comoros:{keywords:["km","flag","nation","country","banner"],char:"🇰🇲",fitzpatrick_scale:!1,category:"flags"},congo_brazzaville:{keywords:["congo","flag","nation","country","banner"],char:"🇨🇬",fitzpatrick_scale:!1,category:"flags"},congo_kinshasa:{keywords:["congo","democratic","republic","flag","nation","country","banner"],char:"🇨🇩",fitzpatrick_scale:!1,category:"flags"},cook_islands:{keywords:["cook","islands","flag","nation","country","banner"],char:"🇨🇰",fitzpatrick_scale:!1,category:"flags"},costa_rica:{keywords:["costa","rica","flag","nation","country","banner"],char:"🇨🇷",fitzpatrick_scale:!1,category:"flags"},croatia:{keywords:["hr","flag","nation","country","banner"],char:"🇭🇷",fitzpatrick_scale:!1,category:"flags"},cuba:{keywords:["cu","flag","nation","country","banner"],char:"🇨🇺",fitzpatrick_scale:!1,category:"flags"},curacao:{keywords:["curaçao","flag","nation","country","banner"],char:"🇨🇼",fitzpatrick_scale:!1,category:"flags"},cyprus:{keywords:["cy","flag","nation","country","banner"],char:"🇨🇾",fitzpatrick_scale:!1,category:"flags"},czech_republic:{keywords:["cz","flag","nation","country","banner"],char:"🇨🇿",fitzpatrick_scale:!1,category:"flags"},denmark:{keywords:["dk","flag","nation","country","banner"],char:"🇩🇰",fitzpatrick_scale:!1,category:"flags"},djibouti:{keywords:["dj","flag","nation","country","banner"],char:"🇩🇯",fitzpatrick_scale:!1,category:"flags"},dominica:{keywords:["dm","flag","nation","country","banner"],char:"🇩🇲",fitzpatrick_scale:!1,category:"flags"},dominican_republic:{keywords:["dominican","republic","flag","nation","country","banner"],char:"🇩🇴",fitzpatrick_scale:!1,category:"flags"},ecuador:{keywords:["ec","flag","nation","country","banner"],char:"🇪🇨",fitzpatrick_scale:!1,category:"flags"},egypt:{keywords:["eg","flag","nation","country","banner"],char:"🇪🇬",fitzpatrick_scale:!1,category:"flags"},el_salvador:{keywords:["el","salvador","flag","nation","country","banner"],char:"🇸🇻",fitzpatrick_scale:!1,category:"flags"},equatorial_guinea:{keywords:["equatorial","gn","flag","nation","country","banner"],char:"🇬🇶",fitzpatrick_scale:!1,category:"flags"},eritrea:{keywords:["er","flag","nation","country","banner"],char:"🇪🇷",fitzpatrick_scale:!1,category:"flags"},estonia:{keywords:["ee","flag","nation","country","banner"],char:"🇪🇪",fitzpatrick_scale:!1,category:"flags"},ethiopia:{keywords:["et","flag","nation","country","banner"],char:"🇪🇹",fitzpatrick_scale:!1,category:"flags"},eu:{keywords:["european","union","flag","banner"],char:"🇪🇺",fitzpatrick_scale:!1,category:"flags"},falkland_islands:{keywords:["falkland","islands","malvinas","flag","nation","country","banner"],char:"🇫🇰",fitzpatrick_scale:!1,category:"flags"},faroe_islands:{keywords:["faroe","islands","flag","nation","country","banner"],char:"🇫🇴",fitzpatrick_scale:!1,category:"flags"},fiji:{keywords:["fj","flag","nation","country","banner"],char:"🇫🇯",fitzpatrick_scale:!1,category:"flags"},finland:{keywords:["fi","flag","nation","country","banner"],char:"🇫🇮",fitzpatrick_scale:!1,category:"flags"},fr:{keywords:["banner","flag","nation","france","french","country"],char:"🇫🇷",fitzpatrick_scale:!1,category:"flags"},french_guiana:{keywords:["french","guiana","flag","nation","country","banner"],char:"🇬🇫",fitzpatrick_scale:!1,category:"flags"},french_polynesia:{keywords:["french","polynesia","flag","nation","country","banner"],char:"🇵🇫",fitzpatrick_scale:!1,category:"flags"},french_southern_territories:{keywords:["french","southern","territories","flag","nation","country","banner"],char:"🇹🇫",fitzpatrick_scale:!1,category:"flags"},gabon:{keywords:["ga","flag","nation","country","banner"],char:"🇬🇦",fitzpatrick_scale:!1,category:"flags"},gambia:{keywords:["gm","flag","nation","country","banner"],char:"🇬🇲",fitzpatrick_scale:!1,category:"flags"},georgia:{keywords:["ge","flag","nation","country","banner"],char:"🇬🇪",fitzpatrick_scale:!1,category:"flags"},de:{keywords:["german","nation","flag","country","banner"],char:"🇩🇪",fitzpatrick_scale:!1,category:"flags"},ghana:{keywords:["gh","flag","nation","country","banner"],char:"🇬🇭",fitzpatrick_scale:!1,category:"flags"},gibraltar:{keywords:["gi","flag","nation","country","banner"],char:"🇬🇮",fitzpatrick_scale:!1,category:"flags"},greece:{keywords:["gr","flag","nation","country","banner"],char:"🇬🇷",fitzpatrick_scale:!1,category:"flags"},greenland:{keywords:["gl","flag","nation","country","banner"],char:"🇬🇱",fitzpatrick_scale:!1,category:"flags"},grenada:{keywords:["gd","flag","nation","country","banner"],char:"🇬🇩",fitzpatrick_scale:!1,category:"flags"},guadeloupe:{keywords:["gp","flag","nation","country","banner"],char:"🇬🇵",fitzpatrick_scale:!1,category:"flags"},guam:{keywords:["gu","flag","nation","country","banner"],char:"🇬🇺",fitzpatrick_scale:!1,category:"flags"},guatemala:{keywords:["gt","flag","nation","country","banner"],char:"🇬🇹",fitzpatrick_scale:!1,category:"flags"},guernsey:{keywords:["gg","flag","nation","country","banner"],char:"🇬🇬",fitzpatrick_scale:!1,category:"flags"},guinea:{keywords:["gn","flag","nation","country","banner"],char:"🇬🇳",fitzpatrick_scale:!1,category:"flags"},guinea_bissau:{keywords:["gw","bissau","flag","nation","country","banner"],char:"🇬🇼",fitzpatrick_scale:!1,category:"flags"},guyana:{keywords:["gy","flag","nation","country","banner"],char:"🇬🇾",fitzpatrick_scale:!1,category:"flags"},haiti:{keywords:["ht","flag","nation","country","banner"],char:"🇭🇹",fitzpatrick_scale:!1,category:"flags"},honduras:{keywords:["hn","flag","nation","country","banner"],char:"🇭🇳",fitzpatrick_scale:!1,category:"flags"},hong_kong:{keywords:["hong","kong","flag","nation","country","banner"],char:"🇭🇰",fitzpatrick_scale:!1,category:"flags"},hungary:{keywords:["hu","flag","nation","country","banner"],char:"🇭🇺",fitzpatrick_scale:!1,category:"flags"},iceland:{keywords:["is","flag","nation","country","banner"],char:"🇮🇸",fitzpatrick_scale:!1,category:"flags"},india:{keywords:["in","flag","nation","country","banner"],char:"🇮🇳",fitzpatrick_scale:!1,category:"flags"},indonesia:{keywords:["flag","nation","country","banner"],char:"🇮🇩",fitzpatrick_scale:!1,category:"flags"},iran:{keywords:["iran,","islamic","republic","flag","nation","country","banner"],char:"🇮🇷",fitzpatrick_scale:!1,category:"flags"},iraq:{keywords:["iq","flag","nation","country","banner"],char:"🇮🇶",fitzpatrick_scale:!1,category:"flags"},ireland:{keywords:["ie","flag","nation","country","banner"],char:"🇮🇪",fitzpatrick_scale:!1,category:"flags"},isle_of_man:{keywords:["isle","man","flag","nation","country","banner"],char:"🇮🇲",fitzpatrick_scale:!1,category:"flags"},israel:{keywords:["il","flag","nation","country","banner"],char:"🇮🇱",fitzpatrick_scale:!1,category:"flags"},it:{keywords:["italy","flag","nation","country","banner"],char:"🇮🇹",fitzpatrick_scale:!1,category:"flags"},cote_divoire:{keywords:["ivory","coast","flag","nation","country","banner"],char:"🇨🇮",fitzpatrick_scale:!1,category:"flags"},jamaica:{keywords:["jm","flag","nation","country","banner"],char:"🇯🇲",fitzpatrick_scale:!1,category:"flags"},jp:{keywords:["japanese","nation","flag","country","banner"],char:"🇯🇵",fitzpatrick_scale:!1,category:"flags"},jersey:{keywords:["je","flag","nation","country","banner"],char:"🇯🇪",fitzpatrick_scale:!1,category:"flags"},jordan:{keywords:["jo","flag","nation","country","banner"],char:"🇯🇴",fitzpatrick_scale:!1,category:"flags"},kazakhstan:{keywords:["kz","flag","nation","country","banner"],char:"🇰🇿",fitzpatrick_scale:!1,category:"flags"},kenya:{keywords:["ke","flag","nation","country","banner"],char:"🇰🇪",fitzpatrick_scale:!1,category:"flags"},kiribati:{keywords:["ki","flag","nation","country","banner"],char:"🇰🇮",fitzpatrick_scale:!1,category:"flags"},kosovo:{keywords:["xk","flag","nation","country","banner"],char:"🇽🇰",fitzpatrick_scale:!1,category:"flags"},kuwait:{keywords:["kw","flag","nation","country","banner"],char:"🇰🇼",fitzpatrick_scale:!1,category:"flags"},kyrgyzstan:{keywords:["kg","flag","nation","country","banner"],char:"🇰🇬",fitzpatrick_scale:!1,category:"flags"},laos:{keywords:["lao","democratic","republic","flag","nation","country","banner"],char:"🇱🇦",fitzpatrick_scale:!1,category:"flags"},latvia:{keywords:["lv","flag","nation","country","banner"],char:"🇱🇻",fitzpatrick_scale:!1,category:"flags"},lebanon:{keywords:["lb","flag","nation","country","banner"],char:"🇱🇧",fitzpatrick_scale:!1,category:"flags"},lesotho:{keywords:["ls","flag","nation","country","banner"],char:"🇱🇸",fitzpatrick_scale:!1,category:"flags"},liberia:{keywords:["lr","flag","nation","country","banner"],char:"🇱🇷",fitzpatrick_scale:!1,category:"flags"},libya:{keywords:["ly","flag","nation","country","banner"],char:"🇱🇾",fitzpatrick_scale:!1,category:"flags"},liechtenstein:{keywords:["li","flag","nation","country","banner"],char:"🇱🇮",fitzpatrick_scale:!1,category:"flags"},lithuania:{keywords:["lt","flag","nation","country","banner"],char:"🇱🇹",fitzpatrick_scale:!1,category:"flags"},luxembourg:{keywords:["lu","flag","nation","country","banner"],char:"🇱🇺",fitzpatrick_scale:!1,category:"flags"},macau:{keywords:["macao","flag","nation","country","banner"],char:"🇲🇴",fitzpatrick_scale:!1,category:"flags"},macedonia:{keywords:["macedonia,","flag","nation","country","banner"],char:"🇲🇰",fitzpatrick_scale:!1,category:"flags"},madagascar:{keywords:["mg","flag","nation","country","banner"],char:"🇲🇬",fitzpatrick_scale:!1,category:"flags"},malawi:{keywords:["mw","flag","nation","country","banner"],char:"🇲🇼",fitzpatrick_scale:!1,category:"flags"},malaysia:{keywords:["my","flag","nation","country","banner"],char:"🇲🇾",fitzpatrick_scale:!1,category:"flags"},maldives:{keywords:["mv","flag","nation","country","banner"],char:"🇲🇻",fitzpatrick_scale:!1,category:"flags"},mali:{keywords:["ml","flag","nation","country","banner"],char:"🇲🇱",fitzpatrick_scale:!1,category:"flags"},malta:{keywords:["mt","flag","nation","country","banner"],char:"🇲🇹",fitzpatrick_scale:!1,category:"flags"},marshall_islands:{keywords:["marshall","islands","flag","nation","country","banner"],char:"🇲🇭",fitzpatrick_scale:!1,category:"flags"},martinique:{keywords:["mq","flag","nation","country","banner"],char:"🇲🇶",fitzpatrick_scale:!1,category:"flags"},mauritania:{keywords:["mr","flag","nation","country","banner"],char:"🇲🇷",fitzpatrick_scale:!1,category:"flags"},mauritius:{keywords:["mu","flag","nation","country","banner"],char:"🇲🇺",fitzpatrick_scale:!1,category:"flags"},mayotte:{keywords:["yt","flag","nation","country","banner"],char:"🇾🇹",fitzpatrick_scale:!1,category:"flags"},mexico:{keywords:["mx","flag","nation","country","banner"],char:"🇲🇽",fitzpatrick_scale:!1,category:"flags"},micronesia:{keywords:["micronesia,","federated","states","flag","nation","country","banner"],char:"🇫🇲",fitzpatrick_scale:!1,category:"flags"},moldova:{keywords:["moldova,","republic","flag","nation","country","banner"],char:"🇲🇩",fitzpatrick_scale:!1,category:"flags"},monaco:{keywords:["mc","flag","nation","country","banner"],char:"🇲🇨",fitzpatrick_scale:!1,category:"flags"},mongolia:{keywords:["mn","flag","nation","country","banner"],char:"🇲🇳",fitzpatrick_scale:!1,category:"flags"},montenegro:{keywords:["me","flag","nation","country","banner"],char:"🇲🇪",fitzpatrick_scale:!1,category:"flags"},montserrat:{keywords:["ms","flag","nation","country","banner"],char:"🇲🇸",fitzpatrick_scale:!1,category:"flags"},morocco:{keywords:["ma","flag","nation","country","banner"],char:"🇲🇦",fitzpatrick_scale:!1,category:"flags"},mozambique:{keywords:["mz","flag","nation","country","banner"],char:"🇲🇿",fitzpatrick_scale:!1,category:"flags"},myanmar:{keywords:["mm","flag","nation","country","banner"],char:"🇲🇲",fitzpatrick_scale:!1,category:"flags"},namibia:{keywords:["na","flag","nation","country","banner"],char:"🇳🇦",fitzpatrick_scale:!1,category:"flags"},nauru:{keywords:["nr","flag","nation","country","banner"],char:"🇳🇷",fitzpatrick_scale:!1,category:"flags"},nepal:{keywords:["np","flag","nation","country","banner"],char:"🇳🇵",fitzpatrick_scale:!1,category:"flags"},netherlands:{keywords:["nl","flag","nation","country","banner"],char:"🇳🇱",fitzpatrick_scale:!1,category:"flags"},new_caledonia:{keywords:["new","caledonia","flag","nation","country","banner"],char:"🇳🇨",fitzpatrick_scale:!1,category:"flags"},new_zealand:{keywords:["new","zealand","flag","nation","country","banner"],char:"🇳🇿",fitzpatrick_scale:!1,category:"flags"},nicaragua:{keywords:["ni","flag","nation","country","banner"],char:"🇳🇮",fitzpatrick_scale:!1,category:"flags"},niger:{keywords:["ne","flag","nation","country","banner"],char:"🇳🇪",fitzpatrick_scale:!1,category:"flags"},nigeria:{keywords:["flag","nation","country","banner"],char:"🇳🇬",fitzpatrick_scale:!1,category:"flags"},niue:{keywords:["nu","flag","nation","country","banner"],char:"🇳🇺",fitzpatrick_scale:!1,category:"flags"},norfolk_island:{keywords:["norfolk","island","flag","nation","country","banner"],char:"🇳🇫",fitzpatrick_scale:!1,category:"flags"},northern_mariana_islands:{keywords:["northern","mariana","islands","flag","nation","country","banner"],char:"🇲🇵",fitzpatrick_scale:!1,category:"flags"},north_korea:{keywords:["north","korea","nation","flag","country","banner"],char:"🇰🇵",fitzpatrick_scale:!1,category:"flags"},norway:{keywords:["no","flag","nation","country","banner"],char:"🇳🇴",fitzpatrick_scale:!1,category:"flags"},oman:{keywords:["om_symbol","flag","nation","country","banner"],char:"🇴🇲",fitzpatrick_scale:!1,category:"flags"},pakistan:{keywords:["pk","flag","nation","country","banner"],char:"🇵🇰",fitzpatrick_scale:!1,category:"flags"},palau:{keywords:["pw","flag","nation","country","banner"],char:"🇵🇼",fitzpatrick_scale:!1,category:"flags"},palestinian_territories:{keywords:["palestine","palestinian","territories","flag","nation","country","banner"],char:"🇵🇸",fitzpatrick_scale:!1,category:"flags"},panama:{keywords:["pa","flag","nation","country","banner"],char:"🇵🇦",fitzpatrick_scale:!1,category:"flags"},papua_new_guinea:{keywords:["papua","new","guinea","flag","nation","country","banner"],char:"🇵🇬",fitzpatrick_scale:!1,category:"flags"},paraguay:{keywords:["py","flag","nation","country","banner"],char:"🇵🇾",fitzpatrick_scale:!1,category:"flags"},peru:{keywords:["pe","flag","nation","country","banner"],char:"🇵🇪",fitzpatrick_scale:!1,category:"flags"},philippines:{keywords:["ph","flag","nation","country","banner"],char:"🇵🇭",fitzpatrick_scale:!1,category:"flags"},pitcairn_islands:{keywords:["pitcairn","flag","nation","country","banner"],char:"🇵🇳",fitzpatrick_scale:!1,category:"flags"},poland:{keywords:["pl","flag","nation","country","banner"],char:"🇵🇱",fitzpatrick_scale:!1,category:"flags"},portugal:{keywords:["pt","flag","nation","country","banner"],char:"🇵🇹",fitzpatrick_scale:!1,category:"flags"},puerto_rico:{keywords:["puerto","rico","flag","nation","country","banner"],char:"🇵🇷",fitzpatrick_scale:!1,category:"flags"},qatar:{keywords:["qa","flag","nation","country","banner"],char:"🇶🇦",fitzpatrick_scale:!1,category:"flags"},reunion:{keywords:["réunion","flag","nation","country","banner"],char:"🇷🇪",fitzpatrick_scale:!1,category:"flags"},romania:{keywords:["ro","flag","nation","country","banner"],char:"🇷🇴",fitzpatrick_scale:!1,category:"flags"},ru:{keywords:["russian","federation","flag","nation","country","banner"],char:"🇷🇺",fitzpatrick_scale:!1,category:"flags"},rwanda:{keywords:["rw","flag","nation","country","banner"],char:"🇷🇼",fitzpatrick_scale:!1,category:"flags"},st_barthelemy:{keywords:["saint","barthélemy","flag","nation","country","banner"],char:"🇧🇱",fitzpatrick_scale:!1,category:"flags"},st_helena:{keywords:["saint","helena","ascension","tristan","cunha","flag","nation","country","banner"],char:"🇸🇭",fitzpatrick_scale:!1,category:"flags"},st_kitts_nevis:{keywords:["saint","kitts","nevis","flag","nation","country","banner"],char:"🇰🇳",fitzpatrick_scale:!1,category:"flags"},st_lucia:{keywords:["saint","lucia","flag","nation","country","banner"],char:"🇱🇨",fitzpatrick_scale:!1,category:"flags"},st_pierre_miquelon:{keywords:["saint","pierre","miquelon","flag","nation","country","banner"],char:"🇵🇲",fitzpatrick_scale:!1,category:"flags"},st_vincent_grenadines:{keywords:["saint","vincent","grenadines","flag","nation","country","banner"],char:"🇻🇨",fitzpatrick_scale:!1,category:"flags"},samoa:{keywords:["ws","flag","nation","country","banner"],char:"🇼🇸",fitzpatrick_scale:!1,category:"flags"},san_marino:{keywords:["san","marino","flag","nation","country","banner"],char:"🇸🇲",fitzpatrick_scale:!1,category:"flags"},sao_tome_principe:{keywords:["sao","tome","principe","flag","nation","country","banner"],char:"🇸🇹",fitzpatrick_scale:!1,category:"flags"},saudi_arabia:{keywords:["flag","nation","country","banner"],char:"🇸🇦",fitzpatrick_scale:!1,category:"flags"},senegal:{keywords:["sn","flag","nation","country","banner"],char:"🇸🇳",fitzpatrick_scale:!1,category:"flags"},serbia:{keywords:["rs","flag","nation","country","banner"],char:"🇷🇸",fitzpatrick_scale:!1,category:"flags"},seychelles:{keywords:["sc","flag","nation","country","banner"],char:"🇸🇨",fitzpatrick_scale:!1,category:"flags"},sierra_leone:{keywords:["sierra","leone","flag","nation","country","banner"],char:"🇸🇱",fitzpatrick_scale:!1,category:"flags"},singapore:{keywords:["sg","flag","nation","country","banner"],char:"🇸🇬",fitzpatrick_scale:!1,category:"flags"},sint_maarten:{keywords:["sint","maarten","dutch","flag","nation","country","banner"],char:"🇸🇽",fitzpatrick_scale:!1,category:"flags"},slovakia:{keywords:["sk","flag","nation","country","banner"],char:"🇸🇰",fitzpatrick_scale:!1,category:"flags"},slovenia:{keywords:["si","flag","nation","country","banner"],char:"🇸🇮",fitzpatrick_scale:!1,category:"flags"},solomon_islands:{keywords:["solomon","islands","flag","nation","country","banner"],char:"🇸🇧",fitzpatrick_scale:!1,category:"flags"},somalia:{keywords:["so","flag","nation","country","banner"],char:"🇸🇴",fitzpatrick_scale:!1,category:"flags"},south_africa:{keywords:["south","africa","flag","nation","country","banner"],char:"🇿🇦",fitzpatrick_scale:!1,category:"flags"},south_georgia_south_sandwich_islands:{keywords:["south","georgia","sandwich","islands","flag","nation","country","banner"],char:"🇬🇸",fitzpatrick_scale:!1,category:"flags"},kr:{keywords:["south","korea","nation","flag","country","banner"],char:"🇰🇷",fitzpatrick_scale:!1,category:"flags"},south_sudan:{keywords:["south","sd","flag","nation","country","banner"],char:"🇸🇸",fitzpatrick_scale:!1,category:"flags"},es:{keywords:["spain","flag","nation","country","banner"],char:"🇪🇸",fitzpatrick_scale:!1,category:"flags"},sri_lanka:{keywords:["sri","lanka","flag","nation","country","banner"],char:"🇱🇰",fitzpatrick_scale:!1,category:"flags"},sudan:{keywords:["sd","flag","nation","country","banner"],char:"🇸🇩",fitzpatrick_scale:!1,category:"flags"},suriname:{keywords:["sr","flag","nation","country","banner"],char:"🇸🇷",fitzpatrick_scale:!1,category:"flags"},swaziland:{keywords:["sz","flag","nation","country","banner"],char:"🇸🇿",fitzpatrick_scale:!1,category:"flags"},sweden:{keywords:["se","flag","nation","country","banner"],char:"🇸🇪",fitzpatrick_scale:!1,category:"flags"},switzerland:{keywords:["ch","flag","nation","country","banner"],char:"🇨🇭",fitzpatrick_scale:!1,category:"flags"},syria:{keywords:["syrian","arab","republic","flag","nation","country","banner"],char:"🇸🇾",fitzpatrick_scale:!1,category:"flags"},taiwan:{keywords:["tw","flag","nation","country","banner"],char:"🇹🇼",fitzpatrick_scale:!1,category:"flags"},tajikistan:{keywords:["tj","flag","nation","country","banner"],char:"🇹🇯",fitzpatrick_scale:!1,category:"flags"},tanzania:{keywords:["tanzania,","united","republic","flag","nation","country","banner"],char:"🇹🇿",fitzpatrick_scale:!1,category:"flags"},thailand:{keywords:["th","flag","nation","country","banner"],char:"🇹🇭",fitzpatrick_scale:!1,category:"flags"},timor_leste:{keywords:["timor","leste","flag","nation","country","banner"],char:"🇹🇱",fitzpatrick_scale:!1,category:"flags"},togo:{keywords:["tg","flag","nation","country","banner"],char:"🇹🇬",fitzpatrick_scale:!1,category:"flags"},tokelau:{keywords:["tk","flag","nation","country","banner"],char:"🇹🇰",fitzpatrick_scale:!1,category:"flags"},tonga:{keywords:["to","flag","nation","country","banner"],char:"🇹🇴",fitzpatrick_scale:!1,category:"flags"},trinidad_tobago:{keywords:["trinidad","tobago","flag","nation","country","banner"],char:"🇹🇹",fitzpatrick_scale:!1,category:"flags"},tunisia:{keywords:["tn","flag","nation","country","banner"],char:"🇹🇳",fitzpatrick_scale:!1,category:"flags"},tr:{keywords:["turkey","flag","nation","country","banner"],char:"🇹🇷",fitzpatrick_scale:!1,category:"flags"},turkmenistan:{keywords:["flag","nation","country","banner"],char:"🇹🇲",fitzpatrick_scale:!1,category:"flags"},turks_caicos_islands:{keywords:["turks","caicos","islands","flag","nation","country","banner"],char:"🇹🇨",fitzpatrick_scale:!1,category:"flags"},tuvalu:{keywords:["flag","nation","country","banner"],char:"🇹🇻",fitzpatrick_scale:!1,category:"flags"},uganda:{keywords:["ug","flag","nation","country","banner"],char:"🇺🇬",fitzpatrick_scale:!1,category:"flags"},ukraine:{keywords:["ua","flag","nation","country","banner"],char:"🇺🇦",fitzpatrick_scale:!1,category:"flags"},united_arab_emirates:{keywords:["united","arab","emirates","flag","nation","country","banner"],char:"🇦🇪",fitzpatrick_scale:!1,category:"flags"},uk:{keywords:["united","kingdom","great","britain","northern","ireland","flag","nation","country","banner","british","UK","english","england","union jack"],char:"🇬🇧",fitzpatrick_scale:!1,category:"flags"},england:{keywords:["flag","english"],char:"🏴󠁧󠁢󠁥󠁮󠁧󠁿",fitzpatrick_scale:!1,category:"flags"},scotland:{keywords:["flag","scottish"],char:"🏴󠁧󠁢󠁳󠁣󠁴󠁿",fitzpatrick_scale:!1,category:"flags"},wales:{keywords:["flag","welsh"],char:"🏴󠁧󠁢󠁷󠁬󠁳󠁿",fitzpatrick_scale:!1,category:"flags"},us:{keywords:["united","states","america","flag","nation","country","banner"],char:"🇺🇸",fitzpatrick_scale:!1,category:"flags"},us_virgin_islands:{keywords:["virgin","islands","us","flag","nation","country","banner"],char:"🇻🇮",fitzpatrick_scale:!1,category:"flags"},uruguay:{keywords:["uy","flag","nation","country","banner"],char:"🇺🇾",fitzpatrick_scale:!1,category:"flags"},uzbekistan:{keywords:["uz","flag","nation","country","banner"],char:"🇺🇿",fitzpatrick_scale:!1,category:"flags"},vanuatu:{keywords:["vu","flag","nation","country","banner"],char:"🇻🇺",fitzpatrick_scale:!1,category:"flags"},vatican_city:{keywords:["vatican","city","flag","nation","country","banner"],char:"🇻🇦",fitzpatrick_scale:!1,category:"flags"},venezuela:{keywords:["ve","bolivarian","republic","flag","nation","country","banner"],char:"🇻🇪",fitzpatrick_scale:!1,category:"flags"},vietnam:{keywords:["viet","nam","flag","nation","country","banner"],char:"🇻🇳",fitzpatrick_scale:!1,category:"flags"},wallis_futuna:{keywords:["wallis","futuna","flag","nation","country","banner"],char:"🇼🇫",fitzpatrick_scale:!1,category:"flags"},western_sahara:{keywords:["western","sahara","flag","nation","country","banner"],char:"🇪🇭",fitzpatrick_scale:!1,category:"flags"},yemen:{keywords:["ye","flag","nation","country","banner"],char:"🇾🇪",fitzpatrick_scale:!1,category:"flags"},zambia:{keywords:["zm","flag","nation","country","banner"],char:"🇿🇲",fitzpatrick_scale:!1,category:"flags"},zimbabwe:{keywords:["zw","flag","nation","country","banner"],char:"🇿🇼",fitzpatrick_scale:!1,category:"flags"},united_nations:{keywords:["un","flag","banner"],char:"🇺🇳",fitzpatrick_scale:!1,category:"flags"},pirate_flag:{keywords:["skull","crossbones","flag","banner"],char:"🏴‍☠️",fitzpatrick_scale:!1,category:"flags"}});(function(){var w=tinymce.util.Tools.resolve("tinymce.PluginManager");const g=(Q,pe,Te)=>{var Ye;return Te(Q,pe.prototype)?!0:((Ye=Q.constructor)===null||Ye===void 0?void 0:Ye.name)===pe.name},S=Q=>{const pe=typeof Q;return Q===null?"null":pe==="object"&&Array.isArray(Q)?"array":pe==="object"&&g(Q,String,(Te,Ye)=>Ye.isPrototypeOf(Te))?"string":pe},L=Q=>pe=>S(pe)===Q,W=Q=>pe=>typeof pe===Q,te=Q=>pe=>Q===pe,ce=L("string"),Ee=L("object"),He=L("array"),We=te(null),Me=W("boolean"),Ot=Q=>Q==null,mo=Q=>!Ot(Q),st=W("function"),ut=(Q,pe)=>{if(He(Q)){for(let Te=0,Ye=Q.length;Te{},Rt=Q=>()=>Q,Ke=(Q,pe)=>Q===pe;class Ut{constructor(pe,Te){this.tag=pe,this.value=Te}static some(pe){return new Ut(!0,pe)}static none(){return Ut.singletonNone}fold(pe,Te){return this.tag?Te(this.value):pe()}isSome(){return this.tag}isNone(){return!this.tag}map(pe){return this.tag?Ut.some(pe(this.value)):Ut.none()}bind(pe){return this.tag?pe(this.value):Ut.none()}exists(pe){return this.tag&&pe(this.value)}forall(pe){return!this.tag||pe(this.value)}filter(pe){return!this.tag||pe(this.value)?this:Ut.none()}getOr(pe){return this.tag?this.value:pe}or(pe){return this.tag?this:pe}getOrThunk(pe){return this.tag?this.value:pe()}orThunk(pe){return this.tag?this:pe()}getOrDie(pe){if(this.tag)return this.value;throw new Error(pe??"Called getOrDie on None")}static from(pe){return mo(pe)?Ut.some(pe):Ut.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(pe){this.tag&&pe(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}Ut.singletonNone=new Ut(!1);const ft=Array.prototype.indexOf,ue=Array.prototype.push,Ct=(Q,pe)=>ft.call(Q,pe),ve=(Q,pe)=>Ct(Q,pe)>-1,ot=(Q,pe)=>{const Te=Q.length,Ye=new Array(Te);for(let _t=0;_t{for(let Te=0,Ye=Q.length;Te(bn(Q,(Ye,_t)=>{Te=pe(Te,Ye,_t)}),Te),uo=Q=>{const pe=[];for(let Te=0,Ye=Q.length;Teuo(ot(Q,pe)),Gt=(Q,pe)=>{for(let Te=0;TeQ.exists(Ye=>Te(Ye,pe)),bt=Q=>{const pe=[],Te=Ye=>{pe.push(Ye)};for(let Ye=0;YeQ?Ut.some(pe):Ut.none(),Kt=Q=>pe=>pe.options.get(Q),qo=Q=>{const pe=Q.options.register;pe("link_assume_external_targets",{processor:Te=>{const Ye=ce(Te)||Me(Te);return Ye?Te===!0?{value:1,valid:Ye}:Te==="http"||Te==="https"?{value:Te,valid:Ye}:{value:0,valid:Ye}:{valid:!1,message:"Must be a string or a boolean."}},default:!1}),pe("link_context_toolbar",{processor:"boolean",default:!1}),pe("link_list",{processor:Te=>ce(Te)||st(Te)||ut(Te,Ee)}),pe("link_default_target",{processor:"string"}),pe("link_default_protocol",{processor:"string",default:"https"}),pe("link_target_list",{processor:Te=>Me(Te)||ut(Te,Ee),default:!0}),pe("link_rel_list",{processor:"object[]",default:[]}),pe("link_class_list",{processor:"object[]",default:[]}),pe("link_title",{processor:"boolean",default:!0}),pe("allow_unsafe_link_target",{processor:"boolean",default:!1}),pe("link_quicklink",{processor:"boolean",default:!1})},Ge=Kt("link_assume_external_targets"),Ao=Kt("link_context_toolbar"),Cr=Kt("link_list"),Ht=Kt("link_default_target"),pt=Kt("link_default_protocol"),$t=Kt("link_target_list"),ks=Kt("link_rel_list"),cn=Kt("link_class_list"),fn=Kt("link_title"),zo=Kt("allow_unsafe_link_target"),j=Kt("link_quicklink"),Fr=Object.keys,Cs=Object.hasOwnProperty,Sn=(Q,pe)=>{const Te=Fr(Q);for(let Ye=0,_t=Te.length;Ye<_t;Ye++){const oo=Te[Ye],Go=Q[oo];pe(Go,oo)}},hi=Q=>(pe,Te)=>{Q[Te]=pe},Wi=(Q,pe,Te,Ye)=>{Sn(Q,(_t,oo)=>{(pe(_t,oo)?Te:Ye)(_t,oo)})},mn=(Q,pe)=>{const Te={};return Wi(Q,pe,hi(Te),Lt),Te},Ln=(Q,pe)=>Cs.call(Q,pe),dn=(Q,pe)=>Ln(Q,pe)&&Q[pe]!==void 0&&Q[pe]!==null;var Be=tinymce.util.Tools.resolve("tinymce.util.URI"),Bt=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),yt=tinymce.util.Tools.resolve("tinymce.util.Tools");const rt=Q=>mo(Q)&&Q.nodeName.toLowerCase()==="a",ao=Q=>rt(Q)&&!!On(Q),ko=(Q,pe)=>{if(Q.collapsed)return[];{const Te=Q.cloneContents(),Ye=Te.firstChild,_t=new Bt(Ye,Te),oo=[];let Go=Ye;do pe(Go)&&oo.push(Go);while(Go=_t.next());return oo}},tn=Q=>/^\w+:/i.test(Q),On=Q=>{var pe,Te;return(Te=(pe=Q.getAttribute("data-mce-href"))!==null&&pe!==void 0?pe:Q.getAttribute("href"))!==null&&Te!==void 0?Te:""},rs=(Q,pe)=>{const Te=["noopener"],Ye=Q?Q.split(/\s+/):[],_t=sn=>yt.trim(sn.sort().join(" ")),oo=sn=>(sn=Go(sn),sn.length>0?sn.concat(Te):Te),Go=sn=>sn.filter(is=>yt.inArray(Te,is)===-1),Xn=pe?oo(Ye):Go(Ye);return Xn.length>0?_t(Xn):""},Zn=Q=>Q.replace(/\uFEFF/g,""),Bn=(Q,pe)=>(pe=pe||os(Q.selection.getRng())[0]||Q.selection.getNode(),Vo(pe)?Ut.from(Q.dom.select("a[href]",pe)[0]):Ut.from(Q.dom.getParent(pe,"a[href]"))),$s=(Q,pe)=>Bn(Q,pe).isSome(),sa=(Q,pe)=>{const Te=pe.fold(()=>Q.getContent({format:"text"}),Ye=>Ye.innerText||Ye.textContent||"");return Zn(Te)},os=Q=>ko(Q,ao),Is=Q=>yt.grep(Q,ao),yn=Q=>Is(Q).length>0,ra=Q=>os(Q).length>0,St=Q=>{const pe=Q.schema.getTextInlineElements(),Te=oo=>oo.nodeType===1&&!rt(oo)&&!Ln(pe,oo.nodeName.toLowerCase());if(Bn(Q).exists(oo=>oo.hasAttribute("data-mce-block")))return!1;const _t=Q.selection.getRng();return _t.collapsed?!0:ko(_t,Te).length===0},Vo=Q=>mo(Q)&&Q.nodeName==="FIGURE"&&/\bimage\b/i.test(Q.className),an=Q=>ln(["title","rel","class","target"],(Te,Ye)=>(Q[Ye].each(_t=>{Te[Ye]=_t.length>0?_t:null}),Te),{href:Q.href}),Kr=(Q,pe)=>(pe==="http"||pe==="https")&&!tn(Q)?pe+"://"+Q:Q,bi=(Q,pe)=>{const Te={...pe};if(ks(Q).length===0&&!zo(Q)){const Ye=rs(Te.rel,Te.target==="_blank");Te.rel=Ye||null}return Ut.from(Te.target).isNone()&&$t(Q)===!1&&(Te.target=Ht(Q)),Te.href=Kr(Te.href,Ge(Q)),Te},vt=(Q,pe,Te,Ye)=>{Te.each(_t=>{Ln(pe,"innerText")?pe.innerText=_t:pe.textContent=_t}),Q.dom.setAttribs(pe,Ye),Q.selection.select(pe)},oi=(Q,pe,Te,Ye)=>{const _t=Q.dom;Vo(pe)?yl(_t,pe,Ye):Te.fold(()=>{Q.execCommand("mceInsertLink",!1,Ye)},oo=>{Q.insertContent(_t.createHTML("a",Ye,_t.encode(oo)))})},nn=(Q,pe,Te)=>{const Ye=Q.selection.getNode(),_t=Bn(Q,Ye),oo=bi(Q,an(Te));Q.undoManager.transact(()=>{Te.href===pe.href&&pe.attach(),_t.fold(()=>{oi(Q,Ye,Te.text,oo)},Go=>{Q.focus(),vt(Q,Go,Te.text,oo)})})},Ri=Q=>{const pe=Q.dom,Te=Q.selection,Ye=Te.getBookmark(),_t=Te.getRng().cloneRange(),oo=pe.getParent(_t.startContainer,"a[href]",Q.getBody()),Go=pe.getParent(_t.endContainer,"a[href]",Q.getBody());oo&&_t.setStartBefore(oo),Go&&_t.setEndAfter(Go),Te.setRng(_t),Q.execCommand("unlink"),Te.moveToBookmark(Ye)},as=Q=>{Q.undoManager.transact(()=>{const pe=Q.selection.getNode();Vo(pe)?yi(Q,pe):Ri(Q),Q.focus()})},hr=Q=>{const{class:pe,href:Te,rel:Ye,target:_t,text:oo,title:Go}=Q;return mn({class:pe.getOrNull(),href:Te,rel:Ye.getOrNull(),target:_t.getOrNull(),text:oo.getOrNull(),title:Go.getOrNull()},(Xn,sn)=>We(Xn)===!1)},bl=(Q,pe)=>{const Te=Q.options.get,Ye={allow_html_data_urls:Te("allow_html_data_urls"),allow_script_urls:Te("allow_script_urls"),allow_svg_data_urls:Te("allow_svg_data_urls")},_t=pe.href;return{...pe,href:Be.isDomSafe(_t,"a",Ye)?_t:""}},ll=(Q,pe,Te)=>{const Ye=bl(Q,Te);Q.hasPlugin("rtc",!0)?Q.execCommand("createlink",!1,hr(Ye)):nn(Q,pe,Ye)},Mi=Q=>{Q.hasPlugin("rtc",!0)?Q.execCommand("unlink"):as(Q)},yi=(Q,pe)=>{var Te;const Ye=Q.dom.select("img",pe)[0];if(Ye){const _t=Q.dom.getParents(Ye,"a[href]",pe)[0];_t&&((Te=_t.parentNode)===null||Te===void 0||Te.insertBefore(Ye,_t),Q.dom.remove(_t))}},yl=(Q,pe,Te)=>{var Ye;const _t=Q.select("img",pe)[0];if(_t){const oo=Q.create("a",Te);(Ye=_t.parentNode)===null||Ye===void 0||Ye.insertBefore(oo,_t),oo.appendChild(_t)}},Gn=Q=>ce(Q.value)?Q.value:"",Ro=Q=>ce(Q.text)?Q.text:ce(Q.title)?Q.title:"",Ha=(Q,pe)=>{const Te=[];return yt.each(Q,Ye=>{const _t=Ro(Ye);if(Ye.menu!==void 0){const oo=Ha(Ye.menu,pe);Te.push({text:_t,items:oo})}else{const oo=pe(Ye);Te.push({text:_t,value:oo})}}),Te},Hr=(Q=Gn)=>pe=>Ut.from(pe).map(Te=>Ha(Te,Q)),Dr={sanitize:Q=>Hr(Gn)(Q),sanitizeWith:Hr,createUi:(Q,pe)=>Te=>({name:Q,type:"listbox",label:pe,items:Te}),getValue:Gn},ru=Q=>dn(Q,"items"),zs=(Q,pe)=>Gt(pe,Te=>ru(Te)?zs(Q,Te.items):dt(Te.value===Q,Te)),bd=(Q,pe,Te,Ye)=>{const _t=Ye[pe],oo=Q.length>0;return _t!==void 0?zs(_t,Te).map(Go=>({url:{value:Go.value,meta:{text:oo?Q:Go.text,attach:Lt}},text:oo?Q:Go.text})):Ut.none()},ni=(Q,pe)=>pe==="link"?Q.link:pe==="anchor"?Q.anchor:Ut.none(),vi={init:(Q,pe)=>{const Te={text:Q.text,title:Q.title},Ye=sn=>{var is;return dt(Te.title.length<=0,Ut.from((is=sn.meta)===null||is===void 0?void 0:is.title).getOr(""))},_t=sn=>{var is;return dt(Te.text.length<=0,Ut.from((is=sn.meta)===null||is===void 0?void 0:is.text).getOr(sn.value))},oo=sn=>{const is=_t(sn.url),tr=Ye(sn.url);return is.isSome()||tr.isSome()?Ut.some({...is.map(Jo=>({text:Jo})).getOr({}),...tr.map(Jo=>({title:Jo})).getOr({})}):Ut.none()},Go=(sn,is)=>{const tr=ni(pe,is).getOr([]);return bd(Te.text,is,tr,sn)};return{onChange:(sn,is)=>{const tr=is.name;return tr==="url"?oo(sn()):ve(["anchor","link"],tr)?Go(sn(),tr):((tr==="text"||tr==="title")&&(Te[tr]=sn()[tr]),Ut.none())}}},getDelta:bd};var ys=tinymce.util.Tools.resolve("tinymce.util.Delay");const ga=(Q,pe,Te)=>{const Ye=Q.selection.getRng();ys.setEditorTimeout(Q,()=>{Q.windowManager.confirm(pe,_t=>{Q.selection.setRng(Ye),Te(_t)})})},si=Q=>{const pe=Q.href;return pe.indexOf("@")>0&&pe.indexOf("/")===-1&&pe.indexOf("mailto:")===-1?Ut.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:Ye=>({...Ye,href:"mailto:"+pe})}):Ut.none()},au=(Q,pe)=>Te=>{const Ye=Te.href;return Q===1&&!tn(Ye)||Q===0&&/^\s*www(\.|\d\.)/i.test(Ye)?Ut.some({message:`The URL you entered seems to be an external link. Do you want to add the required ${pe}:// prefix?`,preprocess:oo=>({...oo,href:pe+"://"+Ye})}):Ut.none()},_i={preprocess:(Q,pe)=>Gt([si,au(Ge(Q),pt(Q))],Te=>Te(pe)).fold(()=>Promise.resolve(pe),Te=>new Promise(Ye=>{ga(Q,Te.message,_t=>{Ye(_t?Te.preprocess(pe):pe)})}))},Zc={getAnchors:Q=>{const pe=Q.dom.select("a:not([href])"),Te=Fe(pe,Ye=>{const _t=Ye.name||Ye.id;return _t?[{text:_t,value:"#"+_t}]:[]});return Te.length>0?Ut.some([{text:"None",value:""}].concat(Te)):Ut.none()}},lr={getClasses:Q=>{const pe=cn(Q);return pe.length>0?Dr.sanitize(pe):Ut.none()}},ha=Q=>{try{return Ut.some(JSON.parse(Q))}catch{return Ut.none()}},Ki={getLinks:Q=>{const pe=Ye=>Q.convertURL(Ye.value||Ye.url||"","href"),Te=Cr(Q);return new Promise(Ye=>{ce(Te)?fetch(Te).then(_t=>_t.ok?_t.text().then(ha):Promise.reject()).then(Ye,()=>Ye(Ut.none())):st(Te)?Te(_t=>Ye(Ut.some(_t))):Ye(Ut.from(Te))}).then(Ye=>Ye.bind(Dr.sanitizeWith(pe)).map(_t=>_t.length>0?[{text:"None",value:""}].concat(_t):_t))}},$r={getRels:(Q,pe)=>{const Te=ks(Q);if(Te.length>0){const Ye=D(pe,"_blank"),_t=zo(Q)===!1,oo=Xn=>rs(Dr.getValue(Xn),Ye);return(_t?Dr.sanitizeWith(oo):Dr.sanitize)(Te)}return Ut.none()}},ba=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],Yn={getTargets:Q=>{const pe=$t(Q);return He(pe)?Dr.sanitize(pe).orThunk(()=>Ut.some(ba)):pe===!1?Ut.none():Ut.some(ba)}},vs=(Q,pe,Te)=>{const Ye=Q.getAttrib(pe,Te);return Ye!==null&&Ye.length>0?Ut.some(Ye):Ut.none()},Gi=(Q,pe)=>{const Te=Q.dom,_t=St(Q)?Ut.some(sa(Q.selection,pe)):Ut.none(),oo=pe.bind(tr=>Ut.from(Te.getAttrib(tr,"href"))),Go=pe.bind(tr=>Ut.from(Te.getAttrib(tr,"target"))),Xn=pe.bind(tr=>vs(Te,tr,"rel")),sn=pe.bind(tr=>vs(Te,tr,"class")),is=pe.bind(tr=>vs(Te,tr,"title"));return{url:oo,text:_t,title:is,target:Go,rel:Xn,linkClass:sn}},br={collect:(Q,pe)=>Ki.getLinks(Q).then(Te=>{const Ye=Gi(Q,pe);return{anchor:Ye,catalogs:{targets:Yn.getTargets(Q),rels:$r.getRels(Q,Ye.target),classes:lr.getClasses(Q),anchor:Zc.getAnchors(Q),link:Te},optNode:pe,flags:{titleEnabled:fn(Q)}}})},vl=(Q,pe)=>Te=>{const Ye=Te.getData();if(!Ye.url.value){Mi(Q),Te.close();return}const _t=Xn=>Ut.from(Ye[Xn]).filter(sn=>!D(pe.anchor[Xn],sn)),oo={href:Ye.url.value,text:_t("text"),target:_t("target"),rel:_t("rel"),class:_t("linkClass"),title:_t("title")},Go={href:Ye.url.value,attach:Ye.url.meta!==void 0&&Ye.url.meta.attach?Ye.url.meta.attach:Lt};_i.preprocess(Q,oo).then(Xn=>{ll(Q,Go,Xn)}),Te.close()},Vs=Q=>{const pe=Bn(Q);return br.collect(Q,pe)},Pn=(Q,pe)=>{const Te=Q.anchor,Ye=Te.url.getOr("");return{url:{value:Ye,meta:{original:{value:Ye}}},text:Te.text.getOr(""),title:Te.title.getOr(""),anchor:Ye,link:Ye,rel:Te.rel.getOr(""),target:Te.target.or(pe).getOr(""),linkClass:Te.linkClass.getOr("")}},wi=(Q,pe,Te)=>{const Ye=[{name:"url",type:"urlinput",filetype:"file",label:"URL",picker_text:"Browse links"}],_t=Q.anchor.text.map(()=>({name:"text",type:"input",label:"Text to display"})).toArray(),oo=Q.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],Go=Ut.from(Ht(Te)),Xn=Pn(Q,Go),sn=Q.catalogs,is=vi.init(Xn,sn);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:uo([Ye,_t,oo,bt([sn.anchor.map(Dr.createUi("anchor","Anchors")),sn.rels.map(Dr.createUi("rel","Rel")),sn.targets.map(Dr.createUi("target","Open link in...")),sn.link.map(Dr.createUi("link","Link list")),sn.classes.map(Dr.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Xn,onChange:(Jo,{name:cl})=>{is.onChange(Jo.getData,{name:cl}).each(jl=>{Jo.setData(jl)})},onSubmit:pe}},Oa=Q=>{Vs(Q).then(Te=>{const Ye=vl(Q,Te);return wi(Te,Ye,Q)}).then(Te=>{Q.windowManager.open(Te)})},Vr=Q=>{Q.addCommand("mceLink",(pe,Te)=>{(Te==null?void 0:Te.dialog)===!0||!j(Q)?Oa(Q):Q.dispatch("contexttoolbar-show",{toolbarKey:"quicklink"})})},za=Q=>{Q.addShortcut("Meta+K","",()=>{Q.execCommand("mceLink")})},Qs=Q=>{let pe=Q;return{get:()=>pe,set:_t=>{pe=_t}}},vd=Q=>{const pe=Qs(Ut.none()),Te=()=>pe.get().each(Q);return{clear:()=>{Te(),pe.set(Ut.none())},isSet:()=>pe.get().isSome(),get:()=>pe.get(),set:Xn=>{Te(),pe.set(Ut.some(Xn))}}},wo=()=>{const Q=vd(Lt);return{...Q,on:Te=>Q.get().each(Te)}};var _l=tinymce.util.Tools.resolve("tinymce.util.VK");const yr=(Q,pe)=>{document.body.appendChild(Q),Q.dispatchEvent(pe),document.body.removeChild(Q)},Fs=Q=>{const pe=document.createElement("a");pe.target="_blank",pe.href=Q,pe.rel="noreferrer noopener";const Te=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});document.dispatchEvent(Te),yr(pe,Te)},Wc=Q=>Q.altKey===!0&&Q.shiftKey===!1&&Q.ctrlKey===!1&&Q.metaKey===!1,pn=(Q,pe)=>{if(pe){const Te=On(pe);if(/^#/.test(Te)){const Ye=Q.dom.select(Te);Ye.length&&Q.selection.scrollIntoView(Ye[0],!0)}else Fs(pe.href)}},$l=Q=>{const pe=Q.selection.getRng(),Te=pe.startContainer;return ao(Te)&&pe.startContainer===pe.endContainer&&Q.dom.select("img",Te).length===1},ya=(Q,pe)=>{const Te=Is(Q.dom.getParents(pe));return dt(Te.length===1,Te[0])},Mo=Q=>{const pe=os(Q.selection.getRng());return dt(pe.length>0,pe[0]).or(ya(Q,Q.selection.getNode()))},Li=Q=>Q.selection.isCollapsed()||$l(Q)?ya(Q,Q.selection.getStart()):Mo(Q),ri=Q=>{const pe=wo(),Te=()=>pe.get().or(Li(Q)),Ye=()=>Te().each(_t=>pn(Q,_t));return Q.on("contextmenu",_t=>{ya(Q,_t.target).each(pe.set)}),Q.on("SelectionChange",()=>{pe.isSet()||Li(Q).each(pe.set)}),Q.on("click",_t=>{pe.clear();const oo=Is(Q.dom.getParents(_t.target));oo.length===1&&_l.metaKeyPressed(_t)&&(_t.preventDefault(),pn(Q,oo[0]))}),Q.on("keydown",_t=>{pe.clear(),!_t.isDefaultPrevented()&&_t.keyCode===13&&Wc(_t)&&Te().each(oo=>{_t.preventDefault(),pn(Q,oo)})}),{gotoSelectedLink:Ye}},Ns=Q=>()=>{Q.execCommand("mceLink",!1,{dialog:!0})},Vl=(Q,pe)=>(Q.on("NodeChange",pe),()=>Q.off("NodeChange",pe)),er=Q=>pe=>{const Te=()=>{pe.setActive(!Q.mode.isReadOnly()&&$s(Q,Q.selection.getNode())),pe.setEnabled(Q.selection.isEditable())};return Te(),Vl(Q,Te)},hc=Q=>pe=>{const Te=()=>{pe.setEnabled(Q.selection.isEditable())};return Te(),Vl(Q,Te)},Gr=Q=>pe=>{const Te=oo=>yn(oo)||ra(Q.selection.getRng()),Ye=Q.dom.getParents(Q.selection.getStart()),_t=oo=>{pe.setEnabled(Te(oo)&&Q.selection.isEditable())};return _t(Ye),Vl(Q,oo=>_t(oo.parents))},Vn=(Q,pe)=>{Q.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onAction:Ns(Q),onSetup:er(Q)}),Q.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:pe.gotoSelectedLink,onSetup:Gr(Q)}),Q.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:()=>Mi(Q),onSetup:Gr(Q)})},xl=(Q,pe)=>{Q.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:pe.gotoSelectedLink,onSetup:Gr(Q)}),Q.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Ns(Q),onSetup:hc(Q)}),Q.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:()=>Mi(Q),onSetup:Gr(Q)})},qc=Q=>{const pe="link unlink openlink",Te="link";Q.ui.registry.addContextMenu("link",{update:Ye=>Q.dom.isEditable(Ye)?yn(Q.dom.getParents(Ye,"a"))?pe:Te:""})},_d=(Q,pe)=>{const Te=oo=>{oo.selection.collapse(!1)},Ye=oo=>{const Go=Q.selection.getNode();return oo.setEnabled($s(Q,Go)),Lt},_t=oo=>{const Go=Bn(Q),Xn=St(Q);if(Go.isNone()&&Xn){const sn=sa(Q.selection,Go);return dt(sn.length===0,oo)}else return Ut.none()};Q.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:er(Q)},label:"Link",predicate:oo=>Ao(Q)&&$s(Q,oo),initValue:()=>Bn(Q).fold(Rt(""),On),commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:oo=>{const Go=Q.selection.getNode();return oo.setActive($s(Q,Go)),er(Q)(oo)},onAction:oo=>{const Go=oo.getValue(),Xn=_t(Go);ll(Q,{href:Go,attach:Lt},{href:Go,text:Xn,title:Ut.none(),rel:Ut.none(),target:Ut.from(Ht(Q)),class:Ut.none()}),Te(Q),oo.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:Ye,onAction:oo=>{Mi(Q),oo.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:Ye,onAction:oo=>{pe.gotoSelectedLink(),oo.hide()}}]})},Ds=Q=>{const pe=ri(Q);Vn(Q,pe),xl(Q,pe),qc(Q),_d(Q,pe)};var Na=()=>{w.add("link",Q=>{qo(Q),Vr(Q),Ds(Q),za(Q)})};Na()})();(function(){var w=tinymce.util.Tools.resolve("tinymce.PluginManager");const g=(E,P,q)=>{var ge;return q(E,P.prototype)?!0:((ge=E.constructor)===null||ge===void 0?void 0:ge.name)===P.name},S=E=>{const P=typeof E;return E===null?"null":P==="object"&&Array.isArray(E)?"array":P==="object"&&g(E,String,(q,ge)=>ge.isPrototypeOf(q))?"string":P},L=E=>P=>S(P)===E,W=E=>P=>typeof P===E,te=L("string"),ce=L("object"),Ee=L("array"),He=W("boolean"),We=E=>E==null,Me=E=>!We(E),Ot=W("function"),mo=W("number"),st=()=>{},ut=(E,P)=>q=>E(P(q)),Lt=E=>()=>E,Rt=(E,P)=>E===P;function Ke(E,...P){return(...q)=>{const ge=P.concat(q);return E.apply(null,ge)}}const Ut=E=>P=>!E(P),ft=Lt(!1);class ue{constructor(P,q){this.tag=P,this.value=q}static some(P){return new ue(!0,P)}static none(){return ue.singletonNone}fold(P,q){return this.tag?q(this.value):P()}isSome(){return this.tag}isNone(){return!this.tag}map(P){return this.tag?ue.some(P(this.value)):ue.none()}bind(P){return this.tag?P(this.value):ue.none()}exists(P){return this.tag&&P(this.value)}forall(P){return!this.tag||P(this.value)}filter(P){return!this.tag||P(this.value)?this:ue.none()}getOr(P){return this.tag?this.value:P}or(P){return this.tag?this:P}getOrThunk(P){return this.tag?this.value:P()}orThunk(P){return this.tag?this:P()}getOrDie(P){if(this.tag)return this.value;throw new Error(P??"Called getOrDie on None")}static from(P){return Me(P)?ue.some(P):ue.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(P){this.tag&&P(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}ue.singletonNone=new ue(!1);const Ct=Array.prototype.slice,ve=Array.prototype.indexOf,ot=Array.prototype.push,bn=(E,P)=>ve.call(E,P),ln=(E,P)=>bn(E,P)>-1,uo=(E,P)=>{for(let q=0,ge=E.length;q{const q=E.length,ge=new Array(q);for(let xe=0;xe{for(let q=0,ge=E.length;q{const q=[];for(let ge=0,xe=E.length;ge{if(E.length===0)return[];{let q=P(E[0]);const ge=[];let xe=[];for(let at=0,xo=E.length;at(Gt(E,(ge,xe)=>{q=P(q,ge,xe)}),q),Kt=(E,P,q)=>{for(let ge=0,xe=E.length;geKt(E,P,ft),Ge=E=>{const P=[];for(let q=0,ge=E.length;qGe(Fe(E,P)),Cr=E=>{const P=Ct.call(E,0);return P.reverse(),P},Ht=(E,P)=>P>=0&&PHt(E,0),$t=E=>Ht(E,E.length-1),ks=(E,P)=>{const q=[],ge=Ot(P)?xe=>uo(q,at=>P(at,xe)):xe=>ln(q,xe);for(let xe=0,at=E.length;xeE.exists(ge=>q(ge,P)),fn=(E,P,q=Rt)=>zo(E,P,q).getOr(E.isNone()&&P.isNone()),zo=(E,P,q)=>E.isSome()&&P.isSome()?ue.some(q(E.getOrDie(),P.getOrDie())):ue.none(),j=8,Fr=11,Cs=1,Sn=3,hi=(E,P)=>{const ge=(P||document).createElement("div");if(ge.innerHTML=E,!ge.hasChildNodes()||ge.childNodes.length>1){const xe="HTML does not have a single root node";throw console.error(xe,E),new Error(xe)}return Ln(ge.childNodes[0])},Wi=(E,P)=>{const ge=(P||document).createElement(E);return Ln(ge)},mn=(E,P)=>{const ge=(P||document).createTextNode(E);return Ln(ge)},Ln=E=>{if(E==null)throw new Error("Node cannot be null or undefined");return{dom:E}},Be={fromHtml:hi,fromTag:Wi,fromText:mn,fromDom:Ln,fromPoint:(E,P,q)=>ue.from(E.dom.elementFromPoint(P,q)).map(Ln)},Bt=(E,P)=>{const q=E.dom;if(q.nodeType!==Cs)return!1;{const ge=q;if(ge.matches!==void 0)return ge.matches(P);if(ge.msMatchesSelector!==void 0)return ge.msMatchesSelector(P);if(ge.webkitMatchesSelector!==void 0)return ge.webkitMatchesSelector(P);if(ge.mozMatchesSelector!==void 0)return ge.mozMatchesSelector(P);throw new Error("Browser lacks native selectors")}},yt=(E,P)=>E.dom===P.dom,rt=(E,P)=>{const q=E.dom,ge=P.dom;return q===ge?!1:q.contains(ge)},ao=Bt,ko=typeof window<"u"?window:Function("return this;")(),tn=(E,P)=>{let q=P??ko;for(let ge=0;ge{const q=E.split(".");return tn(q,P)},rs=(E,P)=>On(E,P),Zn=(E,P)=>{const q=rs(E,P);if(q==null)throw new Error(E+" not available on this browser");return q},Bn=Object.getPrototypeOf,$s=E=>Zn("HTMLElement",E),sa=E=>{const P=On("ownerDocument.defaultView",E);return ce(E)&&($s(P).prototype.isPrototypeOf(E)||/^HTML\w*Element$/.test(Bn(E).constructor.name))},os=E=>E.dom.nodeName.toLowerCase(),Is=E=>E.dom.nodeType,yn=E=>P=>Is(P)===E,ra=E=>Is(E)===j||os(E)==="#comment",St=E=>Vo(E)&&sa(E.dom),Vo=yn(Cs),an=yn(Sn),Kr=yn(Fr),bi=E=>P=>Vo(P)&&os(P)===E,vt=E=>ue.from(E.dom.parentNode).map(Be.fromDom),oi=E=>ue.from(E.dom.parentElement).map(Be.fromDom),nn=E=>ue.from(E.dom.nextSibling).map(Be.fromDom),Ri=E=>Fe(E.dom.childNodes,Be.fromDom),as=(E,P)=>{const q=E.dom.childNodes;return ue.from(q[P]).map(Be.fromDom)},hr=E=>as(E,0),bl=E=>as(E,E.dom.childNodes.length-1),ll=E=>Kr(E)&&Me(E.dom.host),Mi=E=>Be.fromDom(E.dom.getRootNode()),yi=E=>{const P=Mi(E);return ll(P)?ue.some(P):ue.none()},yl=E=>Be.fromDom(E.dom.host),Gn=E=>{const P=an(E)?E.dom.parentNode:E.dom;if(P==null||P.ownerDocument===null)return!1;const q=P.ownerDocument;return yi(Be.fromDom(P)).fold(()=>q.body.contains(P),ut(Gn,yl))};var Ro=(E,P,q,ge,xe)=>E(q,ge)?ue.some(q):Ot(xe)&&xe(q)?ue.none():P(q,ge,xe);const Ha=(E,P,q)=>{let ge=E.dom;const xe=Ot(q)?q:ft;for(;ge.parentNode;){ge=ge.parentNode;const at=Be.fromDom(ge);if(P(at))return ue.some(at);if(xe(at))break}return ue.none()},Hr=(E,P,q)=>Ro((xe,at)=>at(xe),Ha,E,P,q),hd=(E,P,q)=>Ha(E,ge=>Bt(ge,P),q),Vt=(E,P,q)=>Ro((xe,at)=>Bt(xe,at),hd,E,P,q),Dr=E=>Vt(E,"[contenteditable]"),ru=(E,P=!1)=>Gn(E)?E.dom.isContentEditable:Dr(E).fold(Lt(P),q=>zs(q)==="true"),zs=E=>E.dom.contentEditable,bd=(E,P)=>{vt(E).each(ge=>{ge.dom.insertBefore(P.dom,E.dom)})},ni=(E,P)=>{nn(E).fold(()=>{vt(E).each(xe=>{vi(xe,P)})},ge=>{bd(ge,P)})},qi=(E,P)=>{hr(E).fold(()=>{vi(E,P)},ge=>{E.dom.insertBefore(P.dom,ge.dom)})},vi=(E,P)=>{E.dom.appendChild(P.dom)},ys=(E,P)=>{Gt(P,q=>{bd(E,q)})},ga=(E,P)=>{Gt(P,q=>{vi(E,q)})},si=E=>{E.dom.textContent="",Gt(Ri(E),P=>{au(P)})},au=E=>{const P=E.dom;P.parentNode!==null&&P.parentNode.removeChild(P)};var pc=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),_i=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),iu=tinymce.util.Tools.resolve("tinymce.util.VK");const Zc=E=>Fe(E,Be.fromDom),$n=Object.keys,lr=(E,P)=>{const q=$n(E);for(let ge=0,xe=q.length;ge(P,q)=>{E[q]=P},Uu=(E,P,q,ge)=>{lr(E,(xe,at)=>{(P(xe,at)?q:ge)(xe,at)})},Ki=(E,P)=>{const q={};return Uu(E,P,ha(q),st),q},yd=(E,P,q)=>{if(te(q)||He(q)||mo(q))E.setAttribute(P,q+"");else throw console.error("Invalid call to Attribute.set. Key ",P,":: Value ",q,":: Element ",E),new Error("Attribute value was not simple")},$r=(E,P)=>{const q=E.dom;lr(P,(ge,xe)=>{yd(q,xe,ge)})},ba=E=>dt(E.dom.attributes,(P,q)=>(P[q.name]=q.value,P),{}),xi=(E,P)=>Be.fromDom(E.dom.cloneNode(P)),Yn=E=>xi(E,!0),vs=(E,P)=>{const q=Be.fromTag(P),ge=ba(E);return $r(q,ge),q},Gi=(E,P)=>{const q=vs(E,P);ni(E,q);const ge=Ri(E);return ga(q,ge),au(E),q};var gc=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),br=tinymce.util.Tools.resolve("tinymce.util.Tools");const vl=E=>P=>Me(P)&&P.nodeName.toLowerCase()===E,Vs=E=>P=>Me(P)&&E.test(P.nodeName),Pn=E=>Me(E)&&E.nodeType===3,wi=E=>Me(E)&&E.nodeType===1,Oa=Vs(/^(OL|UL|DL)$/),Vr=Vs(/^(OL|UL)$/),za=vl("ol"),Qs=Vs(/^(LI|DT|DD)$/),vd=Vs(/^(DT|DD)$/),wo=Vs(/^(TH|TD)$/),_l=vl("br"),yr=E=>{var P;return((P=E.parentNode)===null||P===void 0?void 0:P.firstChild)===E},Fs=(E,P)=>Me(P)&&P.nodeName in E.schema.getTextBlockElements(),Wc=(E,P)=>Me(E)&&E.nodeName in P,pn=(E,P)=>Me(P)&&P.nodeName in E.schema.getVoidElements(),$l=(E,P)=>_l(P)?E.isBlock(P.nextSibling)&&!_l(P.previousSibling):!1,ya=(E,P,q)=>{const ge=E.isEmpty(P);return q&&E.select("span[data-mce-type=bookmark]",P).length>0?!1:ge},Mo=(E,P)=>E.isChildOf(P,E.getRoot()),Li=E=>P=>P.options.get(E),ri=E=>{const P=E.options.register;P("lists_indent_on_tab",{processor:"boolean",default:!0})},Ns=Li("lists_indent_on_tab"),Vl=Li("forced_root_block"),er=Li("forced_root_block_attrs"),hc=(E,P,q={})=>{const ge=E.dom,xe=E.schema.getBlockElements(),at=ge.createFragment(),xo=Vl(E),Uo=er(E);let Lo,io,Wn=!1;for(io=ge.create(xo,{...Uo,...q.style?{style:q.style}:{}}),Wc(P.firstChild,xe)||at.appendChild(io);Lo=P.firstChild;){const sr=Lo.nodeName;!Wn&&(sr!=="SPAN"||Lo.getAttribute("data-mce-type")!=="bookmark")&&(Wn=!0),Wc(Lo,xe)?(at.appendChild(Lo),io=null):(io||(io=ge.create(xo,Uo),at.appendChild(io)),io.appendChild(Lo))}return!Wn&&io&&io.appendChild(ge.create("br",{"data-mce-bogus":"1"})),at},Gr=gc.DOM,Vn=(E,P,q)=>{const ge=io=>{const Wn=io.parentNode;Wn&&br.each(xe,sr=>{Wn.insertBefore(sr,q.parentNode)}),Gr.remove(io)},xe=Gr.select('span[data-mce-type="bookmark"]',P),at=hc(E,q),xo=Gr.createRng();xo.setStartAfter(q),xo.setEndAfter(P);const Uo=xo.extractContents();for(let io=Uo.firstChild;io;io=io.firstChild)if(io.nodeName==="LI"&&E.dom.isEmpty(io)){Gr.remove(io);break}E.dom.isEmpty(Uo)||Gr.insertAfter(Uo,P),Gr.insertAfter(at,P);const Lo=q.parentElement;Lo&&ya(E.dom,Lo)&&ge(Lo),Gr.remove(q),ya(E.dom,P)&&Gr.remove(P)},xl=bi("dd"),qc=bi("dt"),_d=(E,P)=>{xl(P)?Gi(P,"dt"):qc(P)&&oi(P).each(q=>Vn(E,q.dom,P.dom))},Ds=E=>{qc(E)&&Gi(E,"dd")},Na=(E,P,q)=>{P==="Indent"?Gt(q,Ds):Gt(q,ge=>_d(E,ge))},Q=(E,P)=>{if(Pn(E))return{container:E,offset:P};const q=pc.getNode(E,P);return Pn(q)?{container:q,offset:P>=E.childNodes.length?q.data.length:0}:q.previousSibling&&Pn(q.previousSibling)?{container:q.previousSibling,offset:q.previousSibling.data.length}:q.nextSibling&&Pn(q.nextSibling)?{container:q.nextSibling,offset:0}:{container:E,offset:P}},pe=E=>{const P=E.cloneRange(),q=Q(E.startContainer,E.startOffset);P.setStart(q.container,q.offset);const ge=Q(E.endContainer,E.endOffset);return P.setEnd(ge.container,ge.offset),P},Te=["OL","UL","DL"],Ye=Te.join(","),_t=(E,P)=>{const q=P||E.selection.getStart(!0);return E.dom.getParent(q,Ye,jl(E,q))},oo=(E,P)=>Me(E)&&P.length===1&&P[0]===E,Go=E=>D(E.querySelectorAll(Ye),Oa),Xn=E=>{const P=_t(E),q=E.selection.getSelectedBlocks();return oo(P,q)?Go(P):D(q,ge=>Oa(ge)&&P!==ge)},sn=(E,P)=>{const q=br.map(P,ge=>{const xe=E.dom.getParent(ge,"li,dd,dt",jl(E,ge));return xe||ge});return ks(q)},is=E=>{const P=E.selection.getSelectedBlocks();return D(sn(E,P),Qs)},tr=E=>D(is(E),vd),Jo=(E,P)=>{const q=E.dom.getParents(P,"TD,TH");return q.length>0?q[0]:E.getBody()},cl=(E,P)=>!Oa(P)&&!Qs(P)&&uo(Te,q=>E.isValidChild(P.nodeName,q)),jl=(E,P)=>{const q=E.dom.getParents(P,E.dom.isBlock),ge=at=>at.nodeName.toLowerCase()!==Vl(E);return qo(q,at=>ge(at)&&cl(E.schema,at)).getOr(E.getBody())},bc=E=>vt(E).exists(P=>Qs(P.dom)&&hr(P).exists(q=>!Oa(q.dom))&&bl(P).exists(q=>!Oa(q.dom))),Jm=(E,P)=>{const q=E.dom.getParents(P,"ol,ul",jl(E,P));return $t(q)},ih=E=>{const P=Jm(E,E.selection.getStart()),q=D(E.selection.getSelectedBlocks(),Vr);return P.toArray().concat(q)},Bi=E=>{const P=E.selection.getStart();return E.dom.getParents(P,"ol,ul",jl(E,P))},Qm=E=>{const P=ih(E),q=Bi(E);return qo(q,ge=>bc(Be.fromDom(ge))).fold(()=>lh(E,P),ge=>[ge])},lh=(E,P)=>{const q=Fe(P,ge=>Jm(E,ge).getOr(ge));return ks(q)},Ff=E=>/\btox\-/.test(E.className),eg=(E,P)=>Kt(E,Oa,wo).exists(q=>q.nodeName===P&&!Ff(q)),zt=(E,P)=>P!==null&&!E.dom.isEditable(P),xd=E=>{const P=_t(E);return zt(E,P)},wd=(E,P)=>{const q=E.dom.getParent(P,"ol,ul,dl");return zt(E,q)},Hf=(E,P)=>{const q=E.selection.getNode();return P({parents:E.dom.getParents(q),element:q}),E.on("NodeChange",P),()=>E.off("NodeChange",P)},va=(E,P)=>{const ge=document.createDocumentFragment();return Gt(E,xe=>{ge.appendChild(xe.dom)}),Be.fromDom(ge)},kd=(E,P,q)=>E.dispatch("ListMutation",{action:P,element:q}),ch=(E=>P=>P.replace(E,""))(/^\s+|\s+$/g),tg=E=>E.length>0,og=E=>!tg(E),Ub=E=>E.style!==void 0&&Ot(E.style.getPropertyValue),dh=(E,P,q)=>{if(!te(q))throw console.error("Invalid call to CSS.set. Property ",P,":: Value ",q,":: Element ",E),new Error("CSS value must be a string: "+q);Ub(E)&&E.style.setProperty(P,q)},Zb=(E,P,q)=>{const ge=E.dom;dh(ge,P,q)},$f=E=>ao(E,"OL,UL"),Ul=E=>ao(E,"LI"),Kc=E=>hr(E).exists($f),Zl=E=>bl(E).exists($f),Yr=E=>"listAttributes"in E,ki=E=>"isComment"in E,Cd=E=>"isFragment"in E,En=E=>E.depth>0,wl=E=>E.isSelected,Zu=E=>{const P=Ri(E),q=Zl(E)?P.slice(0,-1):P;return Fe(q,Yn)},Wu=(E,P,q)=>vt(E).filter(Vo).map(ge=>({depth:P,dirty:!1,isSelected:q,content:Zu(E),itemAttributes:ba(E),listAttributes:ba(ge),listType:os(ge),isInPreviousLi:!1})),ai=(E,P)=>{vi(E.item,P.list)},cr=E=>{for(let P=1;P{zo($t(E),pt(P),ai)},aa=(E,P)=>{const q={list:Be.fromTag(P,E),item:Be.fromTag("li",E)};return vi(q.list,q.item),q},_s=(E,P,q)=>{const ge=[];for(let xe=0;xe{for(let q=0;q{Yr(P)&&($r(q.list,P.listAttributes),$r(q.item,P.itemAttributes)),ga(q.item,P.content)})},Ed=(E,P)=>{os(E.list)!==P.listType&&(E.list=Gi(E.list,P.listType)),$r(E.list,P.listAttributes)},Rr=(E,P,q)=>{const ge=Be.fromTag("li",E);return $r(ge,P),ga(ge,q),ge},$a=(E,P)=>{vi(E.list,P),E.item=P},Da=(E,P,q)=>{const ge=P.slice(0,q.depth);return $t(ge).each(xe=>{if(Yr(q)){const at=Rr(E,q.itemAttributes,q.content);$a(xe,at),Ed(xe,q)}else if(Cd(q))ga(xe.item,q.content);else{const at=Be.fromHtml(``);vi(xe.list,at)}}),ge},Sr=(E,P,q)=>{const ge=_s(E,q,q.depth-P.length);return cr(ge),Sd(ge,q),Rs(P,ge),P.concat(ge)},Gc=(E,P)=>{let q=ue.none();const ge=dt(P,(xe,at,xo)=>ki(at)?xo===0?(q=ue.some(at),xe):Da(E,xe,at):at.depth>xe.length?Sr(E,xe,at):Da(E,xe,at),[]);return q.each(xe=>{const at=Be.fromHtml(``);pt(ge).each(xo=>{qi(xo.list,at)})}),pt(ge).map(xe=>xe.list)},rn=(E,P)=>{switch(E){case"Indent":P.depth++;break;case"Outdent":P.depth--;break;case"Flatten":P.depth=0}P.dirty=!0},vr=(E,P)=>{Yr(E)&&Yr(P)&&(E.listType=P.listType,E.listAttributes={...P.listAttributes})},Va=E=>{E.listAttributes=Ki(E.listAttributes,(P,q)=>q!=="start")},Wl=(E,P)=>{const q=E[P].depth,ge=at=>at.depth===q&&!at.dirty,xe=at=>at.depthKt(E.slice(P+1),ge,xe))},jr=E=>(Gt(E,(P,q)=>{Wl(E,q).fold(()=>{P.dirty&&Yr(P)&&Va(P)},ge=>vr(P,ge))}),E),so=E=>{let P=E;return{get:()=>P,set:xe=>{P=xe}}},kl=(E,P,q,ge)=>{var xe;if(ra(ge))return[{depth:E+1,content:(xe=ge.dom.nodeValue)!==null&&xe!==void 0?xe:"",dirty:!1,isSelected:!1,isComment:!0}];P.each(Uo=>{yt(Uo.start,ge)&&q.set(!0)});const at=Wu(ge,E,q.get());P.each(Uo=>{yt(Uo.end,ge)&&q.set(!1)});const xo=bl(ge).filter($f).map(Uo=>Nn(E,P,q,Uo)).getOr([]);return at.toArray().concat(xo)},Cl=(E,P,q,ge)=>hr(ge).filter($f).fold(()=>kl(E,P,q,ge),xe=>{const at=dt(Ri(ge),(xo,Uo,Lo)=>{if(Lo===0)return xo;if(Ul(Uo))return xo.concat(kl(E,P,q,Uo));{const io={isFragment:!0,depth:E,content:[Uo],isSelected:!1,dirty:!1,parentListType:os(xe)};return xo.concat(io)}},[]);return Nn(E,P,q,xe).concat(at)}),Nn=(E,P,q,ge)=>Ao(Ri(ge),xe=>{const at=$f(xe)?Nn:Cl,xo=E+1;return at(xo,P,q,xe)}),cu=(E,P)=>{const q=so(!1),ge=0;return Fe(E,xe=>({sourceList:xe,entries:Nn(ge,P,q,xe)}))},ep=(E,P)=>{const q=jr(P);return Fe(q,ge=>{const xe=ki(ge)?va([Be.fromHtml(``)]):va(ge.content),at=Yr(ge)?ge.itemAttributes:{};return Be.fromDom(hc(E,xe.dom,at))})},ql=(E,P)=>{const q=jr(P);return Gc(E.contentDocument,q).toArray()},un=(E,P)=>Ao(bt(P,En),q=>pt(q).exists(En)?ql(E,q):ep(E,q)),Ra=(E,P)=>{Gt(D(E,wl),q=>rn(P,q))},qu=E=>{const P=Fe(is(E),Be.fromDom);return zo(qo(P,Ut(Kc)),qo(Cr(P),Ut(Kc)),(q,ge)=>({start:q,end:ge}))},yc=(E,P,q)=>{const ge=cu(P,qu(E));Gt(ge,xe=>{Ra(xe.entries,q);const at=un(E,xe.entries);Gt(at,xo=>{kd(E,q==="Indent"?"IndentList":"OutdentList",xo.dom)}),ys(xe.sourceList,at),au(xe.sourceList)})},Vf=(E,P)=>{const q=Zc(Qm(E)),ge=Zc(tr(E));let xe=!1;if(q.length||ge.length){const at=E.selection.getBookmark();yc(E,q,P),Na(E,P,ge),E.selection.moveToBookmark(at),E.selection.setRng(pe(E.selection.getRng())),E.nodeChanged(),xe=!0}return xe},Sl=(E,P)=>!xd(E)&&Vf(E,P),ja=E=>Sl(E,"Indent"),Kl=E=>Sl(E,"Outdent"),Ad=E=>Sl(E,"Flatten"),ye="\uFEFF",du=E=>E===ye,ls=(E,P,q)=>Ha(E,P,q).isSome(),tp=(E,P)=>ls(E,Ke(yt,P));var Ku=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager");const dl=gc.DOM,kn=E=>{const P={},q=ge=>{let xe=E[ge?"startContainer":"endContainer"],at=E[ge?"startOffset":"endOffset"];if(wi(xe)){const xo=dl.create("span",{"data-mce-type":"bookmark"});xe.hasChildNodes()?(at=Math.min(at,xe.childNodes.length-1),ge?xe.insertBefore(xo,xe.childNodes[at]):dl.insertAfter(xo,xe.childNodes[at])):xe.appendChild(xo),xe=xo,at=0}P[ge?"startContainer":"endContainer"]=xe,P[ge?"startOffset":"endOffset"]=at};return q(!0),E.collapsed||q(),P},_a=E=>{const P=ge=>{const xe=Uo=>{var Lo;let io=(Lo=Uo.parentNode)===null||Lo===void 0?void 0:Lo.firstChild,Wn=0;for(;io;){if(io===Uo)return Wn;(!wi(io)||io.getAttribute("data-mce-type")!=="bookmark")&&Wn++,io=io.nextSibling}return-1};let at=E[ge?"startContainer":"endContainer"],xo=E[ge?"startOffset":"endOffset"];if(at){if(wi(at)&&at.parentNode){const Uo=at;xo=xe(at),at=at.parentNode,dl.remove(Uo),!at.hasChildNodes()&&dl.isBlock(at)&&at.appendChild(dl.create("br"))}E[ge?"startContainer":"endContainer"]=at,E[ge?"startOffset":"endOffset"]=xo}};P(!0),P();const q=dl.createRng();return q.setStart(E.startContainer,E.startOffset),E.endContainer&&q.setEnd(E.endContainer,E.endOffset),pe(q)},Yi=E=>{switch(E){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},ul=(E,P,q)=>{const ge=q["list-style-type"]?q["list-style-type"]:null;E.setStyle(P,"list-style-type",ge)},Gl=(E,P)=>{br.each(P,(q,ge)=>{E.setAttribute(ge,q)})},vc=(E,P,q)=>{Gl(P,q["list-attributes"]),br.each(E.select("li",P),ge=>{Gl(ge,q["list-item-attributes"])})},ia=(E,P,q)=>{ul(E,P,q),vc(E,P,q)},Td=(E,P,q)=>{br.each(q,ge=>E.setStyle(P,ge,""))},Gu=(E,P)=>Me(P)&&!Wc(P,E.schema.getBlockElements()),jf=(E,P,q,ge)=>{let xe=P[q?"startContainer":"endContainer"];const at=P[q?"startOffset":"endOffset"];wi(xe)&&(xe=xe.childNodes[Math.min(at,xe.childNodes.length-1)]||xe),!q&&_l(xe.nextSibling)&&(xe=xe.nextSibling);const xo=Lo=>{for(;!E.dom.isBlock(Lo)&&Lo.parentNode&&ge!==Lo;)Lo=Lo.parentNode;return Lo},Uo=(Lo,io)=>{var Wn;const sr=new _i(Lo,xo(Lo)),Ws=io?"next":"prev";let zl;for(;zl=sr[Ws]();)if(!(pn(E,zl)||du(zl.textContent)||((Wn=zl.textContent)===null||Wn===void 0?void 0:Wn.length)===0))return ue.some(zl);return ue.none()};if(q&&Pn(xe))if(du(xe.textContent))xe=Uo(xe,!1).getOr(xe);else for(xe.parentNode!==null&&Gu(E,xe.parentNode)&&(xe=xe.parentNode);xe.previousSibling!==null&&(Gu(E,xe.previousSibling)||Pn(xe.previousSibling));)xe=xe.previousSibling;if(!q&&Pn(xe))if(du(xe.textContent))xe=Uo(xe,!0).getOr(xe);else for(xe.parentNode!==null&&Gu(E,xe.parentNode)&&(xe=xe.parentNode);xe.nextSibling!==null&&(Gu(E,xe.nextSibling)||Pn(xe.nextSibling));)xe=xe.nextSibling;for(;xe.parentNode!==ge;){const Lo=xe.parentNode;if(Fs(E,xe)||/^(TD|TH)$/.test(Lo.nodeName))return xe;xe=Lo}return xe},Ur=(E,P,q)=>{const ge=[],xe=E.dom,at=jf(E,P,!0,q),xo=jf(E,P,!1,q);let Uo;const Lo=[];for(let io=at;io&&(Lo.push(io),io!==xo);io=io.nextSibling);return br.each(Lo,io=>{var Wn;if(Fs(E,io)){ge.push(io),Uo=null;return}if(xe.isBlock(io)||_l(io)){_l(io)&&xe.remove(io),Uo=null;return}const sr=io.nextSibling;if(Ku.isBookmarkNode(io)&&(Oa(sr)||Fs(E,sr)||!sr&&io.parentNode===q)){Uo=null;return}Uo||(Uo=xe.create("p"),(Wn=io.parentNode)===null||Wn===void 0||Wn.insertBefore(Uo,io),ge.push(Uo)),Uo.appendChild(io)}),ge},ho=(E,P,q)=>{const ge=E.getStyle(P,"list-style-type");let xe=q?q["list-style-type"]:"";return xe=xe===null?"":xe,ge===xe},_c=(E,P)=>{const q=E.selection.getStart(!0),ge=jf(E,P,!0,E.getBody());return tp(Be.fromDom(ge),Be.fromDom(P.commonAncestorContainer))?P.commonAncestorContainer:q},uu=(E,P,q)=>{const ge=E.selection.getRng();let xe="LI";const at=jl(E,_c(E,ge)),xo=E.dom;if(xo.getContentEditable(E.selection.getNode())==="false")return;P=P.toUpperCase(),P==="DL"&&(xe="DT");const Uo=kn(ge),Lo=D(Ur(E,ge,at),E.dom.isEditable);br.each(Lo,io=>{let Wn;const sr=io.previousSibling,Ws=io.parentNode;Qs(Ws)||(sr&&Oa(sr)&&sr.nodeName===P&&ho(xo,sr,q)?(Wn=sr,io=xo.rename(io,xe),sr.appendChild(io)):(Wn=xo.create(P),Ws.insertBefore(Wn,io),Wn.appendChild(io),io=xo.rename(io,xe)),Td(xo,io,["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"]),ia(xo,Wn,q),Yc(E.dom,Wn))}),E.selection.setRng(_a(Uo))},xa=(E,P)=>Oa(E)&&E.nodeName===(P==null?void 0:P.nodeName),xc=(E,P,q)=>{const ge=E.getStyle(P,"list-style-type",!0),xe=E.getStyle(q,"list-style-type",!0);return ge===xe},Pi=(E,P)=>E.className===P.className,wc=(E,P,q)=>xa(P,q)&&xc(E,P,q)&&Pi(P,q),Yc=(E,P)=>{let q,ge=P.nextSibling;if(wc(E,P,ge)){const xe=ge;for(;q=xe.firstChild;)P.appendChild(q);E.remove(xe)}if(ge=P.previousSibling,wc(E,P,ge)){const xe=ge;for(;q=xe.lastChild;)P.insertBefore(q,P.firstChild);E.remove(xe)}},Zr=(E,P,q,ge)=>{if(P.nodeName!==q){const xe=E.dom.rename(P,q);ia(E.dom,xe,ge),kd(E,Yi(q),xe)}else ia(E.dom,P,ge),kd(E,Yi(q),P)},fl=(E,P,q,ge)=>{if(P.classList.forEach((xe,at,xo)=>{xe.startsWith("tox-")&&(xo.remove(xe),xo.length===0&&P.removeAttribute("class"))}),P.nodeName!==q){const xe=E.dom.rename(P,q);ia(E.dom,xe,ge),kd(E,Yi(q),xe)}else ia(E.dom,P,ge),kd(E,Yi(q),P)},Yl=(E,P,q,ge,xe)=>{const at=Oa(P);if(at&&P.nodeName===ge&&!fu(xe)&&!Ff(P))Ad(E);else{uu(E,ge,xe);const xo=kn(E.selection.getRng()),Uo=at?[P,...q]:q,Lo=at&&Ff(P)?fl:Zr;br.each(Uo,io=>{Lo(E,io,ge,xe)}),E.selection.setRng(_a(xo))}},fu=E=>"list-style-type"in E,ng=(E,P,q,ge)=>{if(P!==E.getBody())if(P)if(P.nodeName===q&&!fu(ge)&&!Ff(P))Ad(E);else{const xe=kn(E.selection.getRng());Ff(P)&&P.classList.forEach((xo,Uo,Lo)=>{xo.startsWith("tox-")&&(Lo.remove(xo),Lo.length===0&&P.removeAttribute("class"))}),ia(E.dom,P,ge);const at=E.dom.rename(P,q);Yc(E.dom,at),E.selection.setRng(_a(xe)),uu(E,q,ge),kd(E,Yi(q),at)}else uu(E,q,ge),kd(E,Yi(q),P)},kc=(E,P,q)=>{const ge=_t(E);if(wd(E,ge))return;const xe=Xn(E),at=ce(q)?q:{};xe.length>0?Yl(E,ge,xe,P,at):ng(E,ge,P,at)},Od=gc.DOM,Yu=(E,P)=>{const q=P.parentElement;if(q&&q.nodeName==="LI"&&q.firstChild===P){const ge=q.previousSibling;ge&&ge.nodeName==="LI"?(ge.appendChild(P),ya(E,q)&&Od.remove(q)):Od.setStyle(q,"listStyleType","none")}if(Oa(q)){const ge=q.previousSibling;ge&&ge.nodeName==="LI"&&ge.appendChild(P)}},Ms=(E,P)=>{const q=br.grep(E.select("ol,ul",P));br.each(q,ge=>{Yu(E,ge)})},Ua=(E,P,q,ge)=>{let xe=P.startContainer;const at=P.startOffset;if(Pn(xe)&&(q?at0))return xe;const xo=E.schema.getNonEmptyElements();wi(xe)&&(xe=pc.getNode(xe,at));const Uo=new _i(xe,ge);q&&$l(E.dom,xe)&&Uo.next();const Lo=q?Uo.next.bind(Uo):Uo.prev2.bind(Uo);for(;xe=Lo();)if(xe.nodeName==="LI"&&!xe.hasChildNodes()||xo[xe.nodeName]||Pn(xe)&&xe.data.length>0)return xe;return null},la=(E,P)=>{const q=P.childNodes;return q.length===1&&!Oa(q[0])&&E.isBlock(q[0])},ii=E=>ue.from(E).map(Be.fromDom).filter(St).exists(P=>ru(P)&&!ln(["details"],os(P))),_r=(E,P)=>{la(E,P)&&ii(P.firstChild)&&E.remove(P.firstChild,!0)},Uf=(E,P,q)=>{let ge;const xe=la(E,q)?q.firstChild:q;if(_r(E,P),!ya(E,P,!0))for(;ge=P.firstChild;)xe.appendChild(ge)},dr=(E,P,q)=>{let ge;const xe=P.parentNode;if(!Mo(E,P)||!Mo(E,q))return;Oa(q.lastChild)&&(ge=q.lastChild),xe===q.lastChild&&_l(xe.previousSibling)&&E.remove(xe.previousSibling);const at=q.lastChild;at&&_l(at)&&P.hasChildNodes()&&E.remove(at),ya(E,q,!0)&&si(Be.fromDom(q)),Uf(E,P,q),ge&&q.appendChild(ge);const Uo=rt(Be.fromDom(q),Be.fromDom(P))?E.getParents(P,Oa,q):[];E.remove(P),Gt(Uo,Lo=>{ya(E,Lo)&&Lo!==E.getRoot()&&E.remove(Lo)})},ca=(E,P,q)=>{si(Be.fromDom(q)),dr(E.dom,P,q),E.selection.setCursorLocation(q,0)},El=(E,P,q,ge)=>{const xe=E.dom;if(xe.isEmpty(ge))ca(E,q,ge);else{const at=kn(P);dr(xe,q,ge),E.selection.setRng(_a(at))}},nt=(E,P,q,ge)=>{const xe=kn(P);dr(E.dom,q,ge);const at=_a(xe);E.selection.setRng(at)},Xr=(E,P)=>{const q=E.dom,ge=E.selection,xe=ge.getStart(),at=Jo(E,xe),xo=q.getParent(ge.getStart(),"LI",at);if(xo){const Uo=xo.parentElement;if(Uo===E.getBody()&&ya(q,Uo))return!0;const Lo=pe(ge.getRng()),io=q.getParent(Ua(E,Lo,P,at),"LI",at),Wn=io&&(P?q.isChildOf(xo,io):q.isChildOf(io,xo));if(io&&io!==xo&&!Wn)return E.undoManager.transact(()=>{P?El(E,Lo,io,xo):yr(xo)?Kl(E):nt(E,Lo,xo,io)}),!0;if(Wn&&!P&&io!==xo)return E.undoManager.transact(()=>{if(Lo.commonAncestorContainer.parentElement){const sr=kn(Lo),Ws=Lo.commonAncestorContainer.parentElement;Uf(q,Lo.commonAncestorContainer.parentElement,io),Ws.remove();const zl=_a(sr);E.selection.setRng(zl)}}),!0;if(!io&&!P&&Lo.startOffset===0&&Lo.endOffset===0)return E.undoManager.transact(()=>{Ad(E)}),!0}return!1},mu=(E,P,q)=>{const ge=E.getParent(P.parentNode,E.isBlock,q);E.remove(P),ge&&E.isEmpty(ge)&&E.remove(ge)},js=(E,P)=>{const q=E.dom,ge=E.selection.getStart(),xe=Jo(E,ge),at=q.getParent(ge,q.isBlock,xe);if(at&&q.isEmpty(at,void 0,{checkRootAsContent:!0})){const xo=pe(E.selection.getRng()),Uo=q.getParent(Ua(E,xo,P,xe),"LI",xe);if(Uo){const Lo=Ws=>ln(["td","th","caption"],os(Ws)),io=Ws=>Ws.dom===xe,Wn=Hr(Be.fromDom(Uo),Lo,io),sr=Hr(Be.fromDom(xo.startContainer),Lo,io);return fn(Wn,sr,yt)?(E.undoManager.transact(()=>{const Ws=Uo.parentNode;mu(q,at,xe),Yc(q,Ws),E.selection.select(Uo,!0),E.selection.collapse(P)}),!0):!1}}return!1},Al=(E,P)=>Xr(E,P)||js(E,P),Za=E=>{const P=E.selection.getStart(),q=Jo(E,P);return E.dom.getParent(P,"LI,DT,DD",q)||is(E).length>0},Tl=E=>Za(E)?(E.undoManager.transact(()=>{E.execCommand("Delete"),Ms(E.dom,E.getBody())}),!0):!1,pu=(E,P)=>{const q=E.selection;return!wd(E,q.getNode())&&(q.isCollapsed()?Al(E,P):Tl(E))},li=E=>{E.on("ExecCommand",P=>{const q=P.command.toLowerCase();(q==="delete"||q==="forwarddelete")&&Za(E)&&Ms(E.dom,E.getBody())}),E.on("keydown",P=>{P.keyCode===iu.BACKSPACE?pu(E,!1)&&P.preventDefault():P.keyCode===iu.DELETE&&pu(E,!0)&&P.preventDefault()})},vn=E=>({backspaceDelete:P=>{pu(E,P)}}),ur=(E,P)=>{const q=_t(E);q===null||wd(E,q)||E.undoManager.transact(()=>{ce(P.styles)&&E.dom.setStyles(q,P.styles),ce(P.attrs)&&lr(P.attrs,(ge,xe)=>E.dom.setAttrib(q,xe,ge))})},Cc=E=>{const P=Cr(ch(E).split("")),q=Fe(P,(ge,xe)=>{const at=ge.toUpperCase().charCodeAt(0)-65+1;return Math.pow(26,xe)*at});return dt(q,(ge,xe)=>ge+xe,0)},Us=E=>{if(E--,E<0)return"";{const P=E%26,q=Math.floor(E/26),ge=Us(q),xe=String.fromCharCode(65+P);return ge+xe}},Xu=E=>/^[A-Z]+$/.test(E),Xl=E=>/^[a-z]+$/.test(E),op=E=>/^[0-9]+$/.test(E),Zs=E=>op(E)?2:Xu(E)?0:Xl(E)?1:og(E)?3:4,Ne=E=>{switch(Zs(E)){case 2:return ue.some({listStyleType:ue.none(),start:E});case 0:return ue.some({listStyleType:ue.some("upper-alpha"),start:Cc(E).toString()});case 1:return ue.some({listStyleType:ue.some("lower-alpha"),start:Cc(E).toString()});case 3:return ue.some({listStyleType:ue.none(),start:""});case 4:return ue.none()}},Wa=E=>{const P=parseInt(E.start,10);return cn(E.listStyleType,"upper-alpha")?Us(P):cn(E.listStyleType,"lower-alpha")?Us(P).toLowerCase():E.start},fr=E=>{const P=_t(E);!za(P)||wd(E,P)||E.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:Wa({start:E.dom.getAttrib(P,"start","1"),listStyleType:ue.from(E.dom.getStyle(P,"list-style-type"))})},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:q=>{const ge=q.getData();Ne(ge.start).each(xe=>{E.execCommand("mceListUpdate",!1,{attrs:{start:xe.start==="1"?"":xe.start},styles:{"list-style-type":xe.listStyleType.getOr("")}})}),q.close()}})},Ci=(E,P)=>()=>{const q=_t(E);return Me(q)&&q.nodeName===P},Ol=E=>{E.addCommand("mceListProps",()=>{fr(E)})},xr=E=>{E.on("BeforeExecCommand",P=>{const q=P.command.toLowerCase();q==="indent"?ja(E):q==="outdent"&&Kl(E)}),E.addCommand("InsertUnorderedList",(P,q)=>{kc(E,"UL",q)}),E.addCommand("InsertOrderedList",(P,q)=>{kc(E,"OL",q)}),E.addCommand("InsertDefinitionList",(P,q)=>{kc(E,"DL",q)}),E.addCommand("RemoveList",()=>{Ad(E)}),Ol(E),E.addCommand("mceListUpdate",(P,q)=>{ce(q)&&ur(E,q)}),E.addQueryStateHandler("InsertUnorderedList",Ci(E,"UL")),E.addQueryStateHandler("InsertOrderedList",Ci(E,"OL")),E.addQueryStateHandler("InsertDefinitionList",Ci(E,"DL"))};var xs=tinymce.util.Tools.resolve("tinymce.html.Node");const Jn=E=>E.type===3,wa=E=>E.length===0,Si=E=>{const P=(xe,at)=>{const xo=xs.create("li");Gt(xe,Uo=>xo.append(Uo)),at?E.insert(xo,at,!0):E.append(xo)},q=(xe,at)=>Jn(at)?[...xe,at]:!wa(xe)&&!Jn(at)?(P(xe,at),[]):xe,ge=dt(E.children(),q,[]);wa(ge)||P(ge)},ci=E=>{E.on("PreInit",()=>{const{parser:P}=E;P.addNodeFilter("ul,ol",q=>Gt(q,Si))})},Xi=E=>{E.on("keydown",P=>{P.keyCode!==iu.TAB||iu.metaKeyPressed(P)||E.undoManager.transact(()=>{(P.shiftKey?Kl(E):ja(E))&&P.preventDefault()})})},Jl=E=>{Ns(E)&&Xi(E),li(E)},Sc=(E,P)=>q=>{const ge=xe=>{q.setActive(eg(xe.parents,P)),q.setEnabled(!wd(E,xe.element)&&E.selection.isEditable())};return q.setEnabled(E.selection.isEditable()),Hf(E,ge)},Xc=E=>{const P=q=>()=>E.execCommand(q);E.hasPlugin("advlist")||(E.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:P("InsertOrderedList"),onSetup:Sc(E,"OL")}),E.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:P("InsertUnorderedList"),onSetup:Sc(E,"UL")}))},Zf=(E,P)=>q=>Hf(E,xe=>q.setEnabled(eg(xe.parents,P)&&!wd(E,xe.element))),Wf=E=>{const P={text:"List properties...",icon:"ordered-list",onAction:()=>E.execCommand("mceListProps"),onSetup:Zf(E,"OL")};E.ui.registry.addMenuItem("listprops",P),E.ui.registry.addContextMenu("lists",{update:q=>{const ge=_t(E,q);return za(ge)?["listprops"]:[]}})};var Ec=()=>{w.add("lists",E=>(ri(E),ci(E),E.hasPlugin("rtc",!0)?Ol(E):(Jl(E),xr(E)),Xc(E),Wf(E),vn(E)))};Ec()})();(function(){var w=tinymce.util.Tools.resolve("tinymce.PluginManager");const g=(k,N,Z)=>{var se;return Z(k,N.prototype)?!0:((se=k.constructor)===null||se===void 0?void 0:se.name)===N.name},S=k=>{const N=typeof k;return k===null?"null":N==="object"&&Array.isArray(k)?"array":N==="object"&&g(k,String,(Z,se)=>se.isPrototypeOf(Z))?"string":N},L=k=>N=>S(N)===k,W=k=>N=>typeof N===k,te=k=>N=>k===N,ce=L("string"),Ee=L("array"),He=W("boolean"),We=te(void 0),Me=k=>k==null,Ot=k=>!Me(k),mo=W("function"),st=W("number"),ut=()=>{},Lt=(k,N)=>Z=>k(N(Z)),Rt=k=>()=>k,Ke=k=>k,Ut=(k,N)=>k===N;function ft(k,...N){return(...Z)=>{const se=N.concat(Z);return k.apply(null,se)}}const ue=k=>{k()},Ct=Rt(!1),ve=Rt(!0);class ot{constructor(N,Z){this.tag=N,this.value=Z}static some(N){return new ot(!0,N)}static none(){return ot.singletonNone}fold(N,Z){return this.tag?Z(this.value):N()}isSome(){return this.tag}isNone(){return!this.tag}map(N){return this.tag?ot.some(N(this.value)):ot.none()}bind(N){return this.tag?N(this.value):ot.none()}exists(N){return this.tag&&N(this.value)}forall(N){return!this.tag||N(this.value)}filter(N){return!this.tag||N(this.value)?this:ot.none()}getOr(N){return this.tag?this.value:N}or(N){return this.tag?this:N}getOrThunk(N){return this.tag?this.value:N()}orThunk(N){return this.tag?this:N()}getOrDie(N){if(this.tag)return this.value;throw new Error(N??"Called getOrDie on None")}static from(N){return Ot(N)?ot.some(N):ot.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(N){this.tag&&N(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}ot.singletonNone=new ot(!1);const bn=Object.keys,ln=Object.hasOwnProperty,uo=(k,N)=>{const Z=bn(k);for(let se=0,Ce=Z.length;se(N,Z)=>{k[Z]=N},Gt=(k,N,Z,se)=>{uo(k,(Ce,et)=>{(N(Ce,et)?Z:se)(Ce,et)})},D=(k,N)=>{const Z={};return Gt(k,N,Fe(Z),ut),Z},bt=(k,N)=>{const Z=[];return uo(k,(se,Ce)=>{Z.push(N(se,Ce))}),Z},dt=k=>bt(k,Ke),Kt=k=>bn(k).length,qo=(k,N)=>Ge(k,N)?ot.from(k[N]):ot.none(),Ge=(k,N)=>ln.call(k,N),Ao=(k,N)=>Ge(k,N)&&k[N]!==void 0&&k[N]!==null,Cr=k=>{for(const N in k)if(ln.call(k,N))return!1;return!0},Ht=Array.prototype.indexOf,pt=Array.prototype.push,$t=(k,N)=>Ht.call(k,N),ks=(k,N)=>$t(k,N)>-1,cn=(k,N)=>{for(let Z=0,se=k.length;Z{const Z=[];for(let se=0;se{const Z=k.length,se=new Array(Z);for(let Ce=0;Ce{for(let Z=0,se=k.length;Z{for(let Z=k.length-1;Z>=0;Z--){const se=k[Z];N(se,Z)}},Cs=(k,N)=>{const Z=[],se=[];for(let Ce=0,et=k.length;Ce{const Z=[];for(let se=0,Ce=k.length;se(Fr(k,(se,Ce)=>{Z=N(Z,se,Ce)}),Z),Wi=(k,N,Z)=>(j(k,(se,Ce)=>{Z=N(Z,se,Ce)}),Z),mn=(k,N,Z)=>{for(let se=0,Ce=k.length;semn(k,N,Ct),dn=k=>{const N=[];for(let Z=0,se=k.length;Zdn(zo(k,N)),Bt=(k,N)=>{for(let Z=0,se=k.length;Z{const Z={};for(let se=0,Ce=k.length;seN>=0&&Nrt(k,0),ko=k=>rt(k,k.length-1),tn=(k,N)=>{for(let Z=0;Z{const se=(N||document).createElement("div");if(se.innerHTML=k,!se.hasChildNodes()||se.childNodes.length>1){const Ce="HTML does not have a single root node";throw console.error(Ce,k),new Error(Ce)}return yn(se.childNodes[0])},os=(k,N)=>{const se=(N||document).createElement(k);return yn(se)},Is=(k,N)=>{const se=(N||document).createTextNode(k);return yn(se)},yn=k=>{if(k==null)throw new Error("Node cannot be null or undefined");return{dom:k}},St={fromHtml:sa,fromTag:os,fromText:Is,fromDom:yn,fromPoint:(k,N,Z)=>ot.from(k.dom.elementFromPoint(N,Z)).map(yn)},Vo=(k,N)=>{const Z=k.dom;if(Z.nodeType!==Bn)return!1;{const se=Z;if(se.matches!==void 0)return se.matches(N);if(se.msMatchesSelector!==void 0)return se.msMatchesSelector(N);if(se.webkitMatchesSelector!==void 0)return se.webkitMatchesSelector(N);if(se.mozMatchesSelector!==void 0)return se.mozMatchesSelector(N);throw new Error("Browser lacks native selectors")}},an=k=>k.nodeType!==Bn&&k.nodeType!==rs&&k.nodeType!==Zn||k.childElementCount===0,Kr=(k,N)=>{const Z=N===void 0?document:N.dom;return an(Z)?[]:zo(Z.querySelectorAll(k),St.fromDom)},bi=(k,N)=>{const Z=N===void 0?document:N.dom;return an(Z)?ot.none():ot.from(Z.querySelector(k)).map(St.fromDom)},vt=(k,N)=>k.dom===N.dom,oi=Vo;typeof window<"u"||Function("return this;")();const nn=k=>k.dom.nodeName.toLowerCase(),Ri=k=>k.dom.nodeType,as=k=>N=>Ri(N)===k,hr=k=>Ri(k)===On||nn(k)==="#comment",bl=as(Bn),ll=as($s),Mi=as(rs),yi=as(Zn),yl=k=>N=>bl(N)&&nn(N)===k,Gn=k=>St.fromDom(k.dom.ownerDocument),Ro=k=>Mi(k)?k:Gn(k),Ha=k=>ot.from(k.dom.parentNode).map(St.fromDom),Hr=(k,N)=>{const Z=mo(N)?N:Ct;let se=k.dom;const Ce=[];for(;se.parentNode!==null&&se.parentNode!==void 0;){const et=se.parentNode,Et=St.fromDom(et);if(Ce.push(Et),Z(Et)===!0)break;se=et}return Ce},hd=k=>ot.from(k.dom.previousSibling).map(St.fromDom),Vt=k=>ot.from(k.dom.nextSibling).map(St.fromDom),Dr=k=>zo(k.dom.childNodes,St.fromDom),ru=(k,N)=>{const Z=k.dom.childNodes;return ot.from(Z[N]).map(St.fromDom)},zs=k=>ru(k,0),bd=k=>yi(k)&&Ot(k.dom.host),ni=k=>St.fromDom(k.dom.getRootNode()),qi=k=>{const N=ni(k);return bd(N)?ot.some(N):ot.none()},vi=k=>St.fromDom(k.dom.host),ys=k=>{const N=ll(k)?k.dom.parentNode:k.dom;if(N==null||N.ownerDocument===null)return!1;const Z=N.ownerDocument;return qi(St.fromDom(N)).fold(()=>Z.body.contains(N),Lt(ys,vi))};var ga=(k,N,Z,se,Ce)=>k(Z,se)?ot.some(Z):mo(Ce)&&Ce(Z)?ot.none():N(Z,se,Ce);const si=(k,N,Z)=>{let se=k.dom;const Ce=mo(Z)?Z:Ct;for(;se.parentNode;){se=se.parentNode;const et=St.fromDom(se);if(N(et))return ot.some(et);if(Ce(et))break}return ot.none()},au=(k,N,Z)=>ga((Ce,et)=>et(Ce),si,k,N,Z),pc=(k,N)=>{const Z=Ce=>N(St.fromDom(Ce));return Ln(k.dom.childNodes,Z).map(St.fromDom)},_i=(k,N,Z)=>si(k,se=>Vo(se,N),Z),iu=(k,N)=>pc(k,Z=>Vo(Z,N)),Zc=(k,N)=>bi(N,k),$n=(k,N,Z)=>ga((Ce,et)=>Vo(Ce,et),_i,k,N,Z),lr=k=>$n(k,"[contenteditable]"),ha=(k,N=!1)=>ys(k)?k.dom.isContentEditable:lr(k).fold(Rt(N),Z=>Uu(Z)==="true"),Uu=k=>k.dom.contentEditable,Ki=k=>k.nodeName.toLowerCase(),yd=k=>St.fromDom(k.getBody()),$r=k=>N=>vt(N,yd(k)),ba=k=>k?k.replace(/px$/,""):"",xi=k=>/^\d+(\.\d+)?$/.test(k)?k+"px":k,Yn=k=>St.fromDom(k.selection.getStart()),vs=k=>St.fromDom(k.selection.getEnd()),Gi=k=>au(k,yl("table")).forall(ha),gc=(k,N)=>Sn(Dr(k),N),br=(k,N)=>{let Z=[];return j(Dr(k),se=>{N(se)&&(Z=Z.concat([se])),Z=Z.concat(br(se,N))}),Z},vl=(k,N)=>gc(k,Z=>Vo(Z,N)),Vs=(k,N)=>Kr(N,k),Pn=(k,N,Z)=>{if(ce(Z)||He(Z)||st(Z))k.setAttribute(N,Z+"");else throw console.error("Invalid call to Attribute.set. Key ",N,":: Value ",Z,":: Element ",k),new Error("Attribute value was not simple")},wi=(k,N,Z)=>{Pn(k.dom,N,Z)},Oa=(k,N)=>{const Z=k.dom;uo(N,(se,Ce)=>{Pn(Z,Ce,se)})},Vr=(k,N)=>{const Z=k.dom.getAttribute(N);return Z===null?void 0:Z},za=(k,N)=>ot.from(Vr(k,N)),Qs=(k,N)=>{k.dom.removeAttribute(N)},vd=k=>Wi(k.dom.attributes,(N,Z)=>(N[Z.name]=Z.value,N),{}),wo=(k,N,Z=Ut)=>k.exists(se=>Z(se,N)),_l=k=>{const N=[],Z=se=>{N.push(se)};for(let se=0;sek.isSome()&&N.isSome()?ot.some(Z(k.getOrDie(),N.getOrDie())):ot.none(),Fs=k=>k.bind(Ke),Wc=(k,N)=>k?ot.some(N):ot.none(),pn=(k,N)=>k.substring(N),$l=(k,N,Z)=>N===""||k.length>=N.length&&k.substr(Z,Z+N.length)===N,ya=(k,N)=>Mo(k,N)?pn(k,N.length):k,Mo=(k,N)=>$l(k,N,0),ri=(k=>N=>N.replace(k,""))(/^\s+|\s+$/g),Ns=k=>k.length>0,Vl=k=>!Ns(k),er=(k,N=10)=>{const Z=parseInt(k,N);return isNaN(Z)?ot.none():ot.some(Z)},hc=k=>{const N=parseFloat(k);return isNaN(N)?ot.none():ot.some(N)},Gr=k=>k.style!==void 0&&mo(k.style.getPropertyValue),Vn=(k,N,Z)=>{if(!ce(Z))throw console.error("Invalid call to CSS.set. Property ",N,":: Value ",Z,":: Element ",k),new Error("CSS value must be a string: "+Z);Gr(k)&&k.style.setProperty(N,Z)},xl=(k,N)=>{Gr(k)&&k.style.removeProperty(N)},qc=(k,N,Z)=>{const se=k.dom;Vn(se,N,Z)},_d=(k,N)=>{const Z=k.dom,Ce=window.getComputedStyle(Z).getPropertyValue(N);return Ce===""&&!ys(k)?Ds(Z,N):Ce},Ds=(k,N)=>Gr(k)?k.style.getPropertyValue(N):"",Na=(k,N)=>{const Z=k.dom,se=Ds(Z,N);return ot.from(se).filter(Ce=>Ce.length>0)},Q=(k,N)=>{const Z=k.dom;xl(Z,N),wo(za(k,"style").map(ri),"")&&Qs(k,"style")},pe=(k,N,Z=0)=>za(k,N).map(se=>parseInt(se,10)).getOr(Z),Te=(k,N)=>Ye(k,N,ve),Ye=(k,N,Z)=>Be(Dr(k),se=>Vo(se,N)?Z(se)?[se]:[]:Ye(se,N,Z)),_t=["tfoot","thead","tbody","colgroup"],oo=k=>ks(_t,k),Go=(k,N)=>({rows:k,columns:N}),Xn=(k,N,Z)=>({element:k,rowspan:N,colspan:Z}),sn=(k,N,Z,se,Ce,et)=>({element:k,rowspan:N,colspan:Z,row:se,column:Ce,isLocked:et}),is=(k,N,Z)=>({element:k,cells:N,section:Z}),tr=(k,N,Z,se)=>({startRow:k,startCol:N,finishRow:Z,finishCol:se}),Jo=(k,N,Z)=>({element:k,colspan:N,column:Z}),cl=(k,N)=>({element:k,columns:N}),jl=(k,N,Z=Ct)=>{if(Z(N))return ot.none();if(ks(k,nn(N)))return ot.some(N);const se=Ce=>Vo(Ce,"table")||Z(Ce);return _i(N,k.join(","),se)},bc=(k,N)=>jl(["td","th"],k,N),Jm=k=>Te(k,"th,td"),ih=k=>Vo(k,"colgroup")?vl(k,"col"):Be(lh(k),N=>vl(N,"col")),Bi=(k,N)=>$n(k,"table",N),Qm=k=>Te(k,"tr"),lh=k=>Bi(k).fold(Rt([]),N=>vl(N,"colgroup")),Ff=(k,N)=>zo(k,Z=>{if(nn(Z)==="colgroup"){const se=zo(ih(Z),Ce=>{const et=pe(Ce,"span",1);return Xn(Ce,1,et)});return is(Z,se,"colgroup")}else{const se=zo(Jm(Z),Ce=>{const et=pe(Ce,"rowspan",1),Et=pe(Ce,"colspan",1);return Xn(Ce,et,Et)});return is(Z,se,N(Z))}}),eg=k=>Ha(k).map(N=>{const Z=nn(N);return oo(Z)?Z:"tbody"}).getOr("tbody"),zt=k=>{const N=Qm(k),se=[...lh(k),...N];return Ff(se,eg)},xd="data-snooker-locked-cols",wd=k=>za(k,xd).bind(N=>ot.from(N.match(/\d+/g))).map(N=>yt(N,ve)),Hf=(k,N)=>k+","+N,va=(k,N,Z)=>ot.from(k.access[Hf(N,Z)]),kd=(k,N,Z)=>{const se=lu(k,Ce=>Z(N,Ce.element));return se.length>0?ot.some(se[0]):ot.none()},lu=(k,N)=>{const Z=Be(k.all,se=>se.cells);return Sn(Z,N)},ch=k=>{const N={};let Z=0;return j(k.cells,se=>{const Ce=se.colspan;fn(Ce,et=>{const Et=Z+et;N[Et]=Jo(se.element,Ce,Et)}),Z+=Ce}),N},tg=k=>{const N={},Z=[],Ce=ao(k).map(ea=>ea.element).bind(Bi).bind(wd).getOr({});let et=0,Et=0,At=0;const{pass:Bo,fail:co}=Cs(k,ea=>ea.section==="colgroup");j(co,ea=>{const qs=[];j(ea.cells,tc=>{let oc=0;for(;N[Hf(At,oc)]!==void 0;)oc++;const Oc=Ao(Ce,oc.toString()),ap=sn(tc.element,tc.rowspan,tc.colspan,At,oc,Oc);for(let ed=0;ed{const qs=ch(ea);return{colgroups:[cl(ea.element,dt(qs))],columns:qs}}).getOrThunk(()=>({colgroups:[],columns:{}}));return{grid:Go(et,Et),access:N,all:Z,columns:_n,colgroups:Ko}},Ul={fromTable:k=>{const N=zt(k);return tg(N)},generate:tg,getAt:va,findItem:kd,filterItems:lu,justCells:k=>Be(k.all,N=>N.cells),justColumns:k=>dt(k.columns),hasColumns:k=>bn(k.columns).length>0,getColumnAt:(k,N)=>ot.from(k.columns[N])};var Kc=tinymce.util.Tools.resolve("tinymce.util.Tools");const Zl=(k,N,Z)=>{const se=k.select("td,th",N);let Ce;for(let et=0;et{Kc.each("left center right".split(" "),se=>{se!==Z&&k.formatter.remove("align"+se,{},N)}),Z&&k.formatter.apply("align"+Z,{},N)},ki=(k,N,Z)=>{Kc.each("top middle bottom".split(" "),se=>{se!==Z&&k.formatter.remove("valign"+se,{},N)}),Z&&k.formatter.apply("valign"+Z,{},N)},Cd=(k,N,Z)=>{k.dispatch("TableModified",{...Z,table:N})},En=(k,N)=>hc(k).getOr(N),wl=(k,N,Z)=>En(_d(k,N),Z),Zu=(k,N,Z,se)=>{const Ce=wl(k,`padding-${Z}`,0),et=wl(k,`padding-${se}`,0),Et=wl(k,`border-${Z}-width`,0),At=wl(k,`border-${se}-width`,0);return N-Ce-et-Et-At},Wu=(k,N)=>{const Z=k.dom,se=Z.getBoundingClientRect().width||Z.offsetWidth;return N==="border-box"?se:Zu(k,se,"left","right")},cr=k=>Wu(k,"content-box");var Rs=tinymce.util.Tools.resolve("tinymce.Env");const aa="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol",_s=fn(5,k=>{const N=`${k+1}px`;return{title:N,value:N}}),Sd=zo(["Solid","Dotted","Dashed","Double","Groove","Ridge","Inset","Outset","None","Hidden"],k=>({title:k,value:k.toLowerCase()})),Ed="100%",Rr=k=>{var N;const Z=k.dom,se=(N=Z.getParent(k.selection.getStart(),Z.isBlock))!==null&&N!==void 0?N:k.getBody();return cr(St.fromDom(se))+"px"},$a=(k,N)=>Vf(k)||!Nn(k)?N:yc(k)?{...N,width:Rr(k)}:{...N,width:Ed},Da=(k,N)=>Vf(k)||Nn(k)?N:yc(k)?{...N,width:Rr(k)}:{...N,width:Ed},Sr=k=>N=>N.options.get(k),Gc=k=>{const N=k.options.register;N("table_border_widths",{processor:"object[]",default:_s}),N("table_border_styles",{processor:"object[]",default:Sd}),N("table_cell_advtab",{processor:"boolean",default:!0}),N("table_row_advtab",{processor:"boolean",default:!0}),N("table_advtab",{processor:"boolean",default:!0}),N("table_appearance_options",{processor:"boolean",default:!0}),N("table_grid",{processor:"boolean",default:!Rs.deviceType.isTouch()}),N("table_cell_class_list",{processor:"object[]",default:[]}),N("table_row_class_list",{processor:"object[]",default:[]}),N("table_class_list",{processor:"object[]",default:[]}),N("table_toolbar",{processor:"string",default:aa}),N("table_background_color_map",{processor:"object[]",default:[]}),N("table_border_color_map",{processor:"object[]",default:[]})},rn=Sr("table_sizing_mode"),vr=Sr("table_border_widths"),Va=Sr("table_border_styles"),Wl=Sr("table_cell_advtab"),jr=Sr("table_row_advtab"),so=Sr("table_advtab"),kl=Sr("table_appearance_options"),Cl=Sr("table_grid"),Nn=Sr("table_style_by_css"),cu=Sr("table_cell_class_list"),ep=Sr("table_row_class_list"),ql=Sr("table_class_list"),un=Sr("table_toolbar"),Ra=Sr("table_background_color_map"),qu=Sr("table_border_color_map"),yc=k=>rn(k)==="fixed",Vf=k=>rn(k)==="responsive",Sl=k=>{const N=k.options,Z=N.get("table_default_styles");return N.isSet("table_default_styles")?Z:$a(k,Z)},ja=k=>{const N=k.options,Z=N.get("table_default_attributes");return N.isSet("table_default_attributes")?Z:Da(k,Z)},Kl=(k,N)=>N.column>=k.startCol&&N.column+N.colspan-1<=k.finishCol&&N.row>=k.startRow&&N.row+N.rowspan-1<=k.finishRow,Ad=(k,N)=>{let Z=!0;const se=ft(Kl,N);for(let Ce=N.startRow;Ce<=N.finishRow;Ce++)for(let et=N.startCol;et<=N.finishCol;et++)Z=Z&&Ul.getAt(k,Ce,et).exists(se);return Z?ot.some(N):ot.none()},ye=(k,N)=>tr(Math.min(k.row,N.row),Math.min(k.column,N.column),Math.max(k.row+k.rowspan-1,N.row+N.rowspan-1),Math.max(k.column+k.colspan-1,N.column+N.colspan-1)),du=(k,N,Z)=>{const se=Ul.findItem(k,N,vt),Ce=Ul.findItem(k,Z,vt);return se.bind(et=>Ce.map(Et=>ye(et,Et)))},ls=(k,N,Z)=>du(k,N,Z).bind(se=>Ad(k,se)),tp=(k,N,Z)=>{const se=Ku(k);return ls(se,N,Z)},Ku=Ul.fromTable,dl=(k,N)=>{Ha(k).each(se=>{se.dom.insertBefore(N.dom,k.dom)})},kn=(k,N)=>{Vt(k).fold(()=>{Ha(k).each(Ce=>{Yi(Ce,N)})},se=>{dl(se,N)})},_a=(k,N)=>{zs(k).fold(()=>{Yi(k,N)},se=>{k.dom.insertBefore(N.dom,se.dom)})},Yi=(k,N)=>{k.dom.appendChild(N.dom)},ul=(k,N)=>{dl(k,N),Yi(N,k)},Gl=(k,N)=>{j(N,(Z,se)=>{const Ce=se===0?k:N[se-1];kn(Ce,Z)})},vc=(k,N)=>{j(N,Z=>{Yi(k,Z)})},ia=k=>{const N=k.dom;N.parentNode!==null&&N.parentNode.removeChild(N)},Td=k=>{const N=Dr(k);N.length>0&&Gl(k,N),ia(k)},jf=((k,N)=>{const Z=et=>{if(!k(et))throw new Error("Can only get "+N+" value of a "+N+" node");return se(et).getOr("")},se=et=>k(et)?ot.from(et.dom.nodeValue):ot.none();return{get:Z,getOption:se,set:(et,Et)=>{if(!k(et))throw new Error("Can only set raw "+N+" value of a "+N+" node");et.dom.nodeValue=Et}}})(ll,"text"),Ur=k=>jf.get(k),ho=(k,N)=>jf.set(k,N);var _c=["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"],uu=()=>{const k=co=>St.fromDom(co.dom.cloneNode(!1)),N=co=>Ro(co).dom,Z=co=>bl(co)?nn(co)==="body"?!0:ks(_c,nn(co)):!1,se=co=>bl(co)?ks(["br","img","hr","input"],nn(co)):!1,Ce=co=>bl(co)&&Vr(co,"contenteditable")==="false",et=(co,_n)=>co.dom.compareDocumentPosition(_n.dom),Et=(co,_n)=>{const Ko=vd(co);Oa(_n,Ko)},At=co=>{const _n=nn(co);return ks(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],_n)},Bo=co=>bl(co)?za(co,"lang"):ot.none();return{up:Rt({selector:_i,closest:$n,predicate:si,all:Hr}),down:Rt({selector:Vs,predicate:br}),styles:Rt({get:_d,getRaw:Na,set:qc,remove:Q}),attrs:Rt({get:Vr,set:wi,remove:Qs,copyTo:Et}),insert:Rt({before:dl,after:kn,afterAll:Gl,append:Yi,appendAll:vc,prepend:_a,wrap:ul}),remove:Rt({unwrap:Td,remove:ia}),create:Rt({nu:St.fromTag,clone:k,text:St.fromText}),query:Rt({comparePosition:et,prevSibling:hd,nextSibling:Vt}),property:Rt({children:Dr,name:nn,parent:Ha,document:N,isText:ll,isComment:hr,isElement:bl,isSpecial:At,getLanguage:Bo,getText:Ur,setText:ho,isBoundary:Z,isEmptyTag:se,isNonEditable:Ce}),eq:vt,is:oi}};const xa=(k,N,Z,se)=>{const Ce=Z[0],et=Z.slice(1);return se(k,N,Ce,et)},xc=(k,N,Z)=>Z.length>0?xa(k,N,Z,Pi):ot.none(),Pi=(k,N,Z,se)=>{const Ce=N(k,Z);return hi(se,(et,Et)=>{const At=N(k,Et);return wc(k,et,At)},Ce)},wc=(k,N,Z)=>N.bind(se=>Z.filter(ft(k.eq,se))),Yc=xc,Zr=uu(),fl=(k,N)=>Yc(Zr,(Z,se)=>k(se),N),Yl=k=>_i(k,"table"),fu=(k,N)=>{const Z=Vs(k,N);return Z.length>0?ot.some(Z):ot.none()},ng=(k,N,Z)=>Zc(k,N).bind(se=>Zc(k,Z).bind(Ce=>fl(Yl,[se,Ce]).map(et=>({first:se,last:Ce,table:et})))),kc=(k,N)=>fu(k,N),Od=(k,N,Z)=>ng(k,N,Z).bind(se=>{const Ce=Bo=>vt(k,Bo),et="thead,tfoot,tbody,table",Et=_i(se.first,et,Ce),At=_i(se.last,et,Ce);return Et.bind(Bo=>At.bind(co=>vt(Bo,co)?tp(se.table,se.first,se.last):ot.none()))}),Yu=k=>zo(k,St.fromDom),Ms="data-mce-selected",Ua="td["+Ms+"],th["+Ms+"]",la="data-mce-first-selected",ii="td["+la+"],th["+la+"]",_r="data-mce-last-selected",Uf="td["+_r+"],th["+_r+"]",dr={selected:Ms,selectedSelector:Ua,firstSelected:la,firstSelectedSelector:ii,lastSelected:_r,lastSelectedSelector:Uf},ca=k=>Bi(k).bind(N=>kc(N,dr.firstSelectedSelector)).fold(Rt(k),N=>N[0]),El=k=>(N,Z)=>{const se=nn(N),Ce=se==="col"||se==="colgroup"?ca(N):N;return $n(Ce,k,Z)},nt=El("th,td,caption"),Xr=El("th,td"),mu=k=>Yu(k.model.table.getSelectedCells()),js=(k,N)=>{const Z=Xr(k),se=Z.bind(Ce=>Bi(Ce)).map(Ce=>Qm(Ce));return yr(Z,se,(Ce,et)=>Sn(et,Et=>cn(Yu(Et.dom.cells),At=>Vr(At,N)==="1"||vt(At,Ce)))).getOr([])},Al=[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}],Za=k=>({value:vn(k)}),Tl=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,pu=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,li=k=>Tl.test(k)||pu.test(k),vn=k=>ya(k,"#").toUpperCase(),ur=k=>li(k)?ot.some({value:vn(k)}):ot.none(),Cc=k=>{const N=k.toString(16);return(N.length===1?"0"+N:N).toUpperCase()},Us=k=>{const N=Cc(k.red)+Cc(k.green)+Cc(k.blue);return Za(N)},Xu=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,Xl=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,op=(k,N,Z,se)=>({red:k,green:N,blue:Z,alpha:se}),Zs=(k,N,Z,se)=>{const Ce=parseInt(k,10),et=parseInt(N,10),Et=parseInt(Z,10),At=parseFloat(se);return op(Ce,et,Et,At)},Ne=k=>{const N=Xu.exec(k);if(N!==null)return ot.some(Zs(N[1],N[2],N[3],"1"));const Z=Xl.exec(k);return Z!==null?ot.some(Zs(Z[1],Z[2],Z[3],Z[4])):ot.none()},Wa=k=>ur(k).orThunk(()=>Ne(k).map(Us)).getOrThunk(()=>{const N=document.createElement("canvas");N.height=1,N.width=1;const Z=N.getContext("2d");Z.clearRect(0,0,N.width,N.height),Z.fillStyle="#FFFFFF",Z.fillStyle=k,Z.fillRect(0,0,1,1);const se=Z.getImageData(0,0,1,1).data,Ce=se[0],et=se[1],Et=se[2],At=se[3];return Us(op(Ce,et,Et,At))}),fr=k=>Ne(k).map(Us).map(N=>"#"+N.value).getOr(k),Ci=k=>{let N=k;return{get:()=>N,set:Ce=>{N=Ce}}},Ol=k=>{const N=Ci(ot.none()),Z=()=>N.get().each(k);return{clear:()=>{Z(),N.set(ot.none())},isSet:()=>N.get().isSome(),get:()=>N.get(),set:At=>{Z(),N.set(ot.some(At))}}},xr=()=>Ol(k=>k.unbind()),xs=(k,N,Z)=>se=>{const Ce=xr(),et=Vl(Z),Et=()=>{const At=mu(k),Bo=co=>k.formatter.match(N,{value:Z},co.dom,et);et?(se.setActive(!cn(At,Bo)),Ce.set(k.formatter.formatChanged(N,co=>se.setActive(!co),!0))):(se.setActive(Bt(At,Bo)),Ce.set(k.formatter.formatChanged(N,se.setActive,!1,{value:Z})))};return k.initialized?Et():k.on("init",Et),Ce.clear},Jn=k=>Ao(k,"menu"),wa=k=>zo(k,N=>{const Z=N.text||N.title||"";return Jn(N)?{text:Z,items:wa(N.menu)}:{text:Z,value:N.value}}),Si=k=>k.length?ot.some(wa([{text:"Select...",value:"mce-no-match"},...k])):ot.none(),ci=(k,N,Z,se)=>zo(N,Ce=>{const et=Ce.text||Ce.title;return Jn(Ce)?{type:"nestedmenuitem",text:et,getSubmenuItems:()=>ci(k,Ce.menu,Z,se)}:{text:et,type:"togglemenuitem",onAction:()=>se(Ce.value),onSetup:xs(k,Z,Ce.value)}}),Xi=(k,N)=>Z=>{k.execCommand("mceTableApplyCellStyle",!1,{[N]:Z})},Jl=k=>Be(k,N=>Jn(N)?[{...N,menu:Jl(N.menu)}]:Ns(N.value)?[N]:[]),Sc=(k,N,Z,se)=>Ce=>Ce(ci(k,N,Z,se)),Xc=(k,N,Z)=>{const se=zo(N,Ce=>({text:Ce.title,value:"#"+Wa(Ce.value).value,type:"choiceitem"}));return[{type:"fancymenuitem",fancytype:"colorswatch",initData:{colors:se.length>0?se:void 0,allowCustomColors:!1},onAction:Ce=>{const et=Ce.value==="remove"?"":Ce.value;k.execCommand("mceTableApplyCellStyle",!1,{[Z]:et})}}]},Zf=k=>()=>{const Z=k.queryCommandValue("mceTableRowType")==="header"?"body":"header";k.execCommand("mceTableRowType",!1,{type:Z})},Wf=k=>()=>{const Z=k.queryCommandValue("mceTableColType")==="th"?"td":"th";k.execCommand("mceTableColType",!1,{type:Z})},Ec=k=>Si(cu(k)).map(N=>({name:"class",type:"listbox",label:"Class",items:N})),E=[{name:"width",type:"input",label:"Width"},{name:"celltype",type:"listbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"listbox",label:"Scope",items:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{name:"halign",type:"listbox",label:"Horizontal align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"listbox",label:"Vertical align",items:Al}],P=k=>E.concat(Ec(k).toArray()),q=(k,N)=>{const se=[{name:"borderstyle",type:"listbox",label:"Border style",items:[{text:"Select...",value:""}].concat(wa(Va(k)))},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}];return{title:"Advanced",name:"advanced",items:N==="cell"?[{name:"borderwidth",type:"input",label:"Border width"}].concat(se):se}},xe={normal:(k,N)=>{const Z=k.dom;return{setAttrib:(Et,At)=>{Z.setAttrib(N,Et,At)},setStyle:(Et,At)=>{Z.setStyle(N,Et,At)},setFormat:(Et,At)=>{At===""?k.formatter.remove(Et,{value:null},N,!0):k.formatter.apply(Et,{value:At},N)}}}},at=yl("th"),xo=(k,N)=>k&&N?"sectionCells":k?"section":"cells",Uo=k=>{const N=k.section==="thead",Z=wo(Lo(k.cells),"th");return k.section==="tfoot"?{type:"footer"}:N||Z?{type:"header",subType:xo(N,Z)}:{type:"body"}},Lo=k=>{const N=Sn(k,Z=>at(Z.element));return N.length===0?ot.some("td"):N.length===k.length?ot.some("th"):ot.none()},io=k=>{const N=zo(k,Ce=>Uo(Ce).type),Z=ks(N,"header"),se=ks(N,"footer");if(!Z&&!se)return ot.some("body");{const Ce=ks(N,"body");return Z&&!Ce&&!se?ot.some("header"):!Z&&!Ce&&se?ot.some("footer"):ot.none()}},Wn=k=>{let N=!1,Z;return(...se)=>(N||(N=!0,Z=k.apply(null,se)),Z)},sr=(k,N)=>tn(k.all,Z=>Ln(Z.cells,se=>vt(N,se.element))),Ws=(k,N,Z)=>{const se=zo(N.selection,et=>bc(et).bind(Et=>sr(k,Et)).filter(Z)),Ce=_l(se);return Wc(Ce.length>0,Ce)},zl=(k,N)=>N.mergable,gu=(k,N)=>N.unmergable,zd=(k,N)=>Ws(k,N,ve),Mr=(k,N)=>sr(k,N).exists(Z=>!Z.isLocked),uh=(k,N)=>Bt(N,Z=>Mr(k,Z)),np=(k,N)=>zl(k,N).filter(Z=>uh(k,Z.cells)),sg=(k,N)=>gu(k,N).filter(Z=>uh(k,Z));({...{generate:k=>{if(!Ee(k))throw new Error("cases must be an array");if(k.length===0)throw new Error("there must be at least one case");const N=[],Z={};return j(k,(se,Ce)=>{const et=bn(se);if(et.length!==1)throw new Error("one and only one name per case");const Et=et[0],At=se[Et];if(Z[Et]!==void 0)throw new Error("duplicate key detected:"+Et);if(Et==="cata")throw new Error("cannot have a case named cata (sorry)");if(!Ee(At))throw new Error("case arguments must be an array");N.push(Et),Z[Et]=(...Bo)=>{const co=Bo.length;if(co!==At.length)throw new Error("Wrong number of arguments to case "+Et+". Expected "+At.length+" ("+At+"), got "+co);return{fold:(...Ko)=>{if(Ko.length!==k.length)throw new Error("Wrong number of arguments to fold. Expected "+k.length+", got "+Ko.length);return Ko[Ce].apply(null,Bo)},match:Ko=>{const Qn=bn(Ko);if(N.length!==Qn.length)throw new Error("Wrong number of arguments to match. Expected: "+N.join(",")+` +Actual: `+Qn.join(","));if(!Bt(N,qs=>ks(Qn,qs)))throw new Error("Not all branches were specified when using match. Specified: "+Qn.join(", ")+` +Required: `+N.join(", "));return Ko[Et].apply(null,Bo)},log:Ko=>{console.log(Ko,{constructors:N,constructor:Et,params:Bo})}}}}),Z}}.generate([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}])});const qf=(k,N)=>{const Z=Ul.fromTable(k);return zd(Z,N).bind(Ce=>{const et=Ce[Ce.length-1],Et=Ce[0].row,At=et.row+et.rowspan,Bo=Z.all.slice(Et,At);return io(Bo)}).getOr("")},Kf=k=>Mo(k,"rgb")?fr(k):k,Ii=k=>{const N=St.fromDom(k);return{borderwidth:Na(N,"border-width").getOr(""),borderstyle:Na(N,"border-style").getOr(""),bordercolor:Na(N,"border-color").map(Kf).getOr(""),backgroundcolor:Na(N,"background-color").map(Kf).getOr("")}},di=k=>{const N=k[0],Z=k.slice(1);return j(Z,se=>{j(bn(N),Ce=>{uo(se,(et,Et)=>{const At=N[Ce];At!==""&&Ce===Et&&At!==et&&(N[Ce]=Ce==="class"?"mce-no-match":"")})})}),N},Gf=(k,N,Z,se)=>Ln(k,Ce=>!We(Z.formatter.matchNode(se,N+Ce))).getOr(""),Ac=ft(Gf,["left","center","right"],"align"),R1=ft(Gf,["top","middle","bottom"],"valign"),sp=(k,N)=>{const Z=Sl(k),se=ja(k),Ce=()=>({borderstyle:qo(Z,"border-style").getOr(""),bordercolor:Kf(qo(Z,"border-color").getOr("")),backgroundcolor:Kf(qo(Z,"background-color").getOr(""))}),et={height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,class:"",align:"",border:""},Et=()=>{const _n=Z["border-width"];return Nn(k)&&_n?{border:_n}:qo(se,"border").fold(()=>({}),Ko=>({border:Ko}))},At=N?Ce():{},Bo=()=>{const _n=qo(Z,"border-spacing").or(qo(se,"cellspacing")).fold(()=>({}),Qn=>({cellspacing:Qn})),Ko=qo(Z,"border-padding").or(qo(se,"cellpadding")).fold(()=>({}),Qn=>({cellpadding:Qn}));return{..._n,...Ko}};return{...et,...Z,...se,...At,...Et(),...Bo()}},Qc=k=>Bi(St.fromDom(k)).map(N=>{const Z={selection:Yu(k.cells)};return qf(N,Z)}).getOr(""),Nd=(k,N,Z)=>{const se=(At,Bo)=>{const co=Na(St.fromDom(Bo),"border-width");return Nn(k)&&co.isSome()?co.getOr(""):At.getAttrib(Bo,"border")||Zl(k.dom,Bo,"border-width")||Zl(k.dom,Bo,"border")||""},Ce=k.dom,et=Nn(k)?Ce.getStyle(N,"border-spacing")||Ce.getAttrib(N,"cellspacing"):Ce.getAttrib(N,"cellspacing")||Ce.getStyle(N,"border-spacing"),Et=Nn(k)?Zl(Ce,N,"padding")||Ce.getAttrib(N,"cellpadding"):Ce.getAttrib(N,"cellpadding")||Zl(Ce,N,"padding");return{width:Ce.getStyle(N,"width")||Ce.getAttrib(N,"width"),height:Ce.getStyle(N,"height")||Ce.getAttrib(N,"height"),cellspacing:et??"",cellpadding:Et??"",border:se(Ce,N),caption:!!Ce.select("caption",N)[0],class:Ce.getAttrib(N,"class",""),align:Ac(k,N),...Z?Ii(N):{}}},no=(k,N,Z)=>{const se=k.dom;return{height:se.getStyle(N,"height")||se.getAttrib(N,"height"),class:se.getAttrib(N,"class",""),type:Qc(N),align:Ac(k,N),...Z?Ii(N):{}}},Ql=(k,N,Z,se)=>{const Ce=k.dom,et=se.getOr(N);return{width:((At,Bo)=>Ce.getStyle(At,Bo)||Ce.getAttrib(At,Bo))(et,"width"),scope:Ce.getAttrib(N,"scope"),celltype:Ki(N),class:Ce.getAttrib(N,"class",""),halign:Ac(k,N),valign:R1(k,N),...Z?Ii(N):{}}},Yf=(k,N)=>{const Z=Ul.fromTable(k),se=Ul.justCells(Z),Ce=Sn(se,et=>cn(N,Et=>vt(et.element,Et)));return zo(Ce,et=>({element:et.element.dom,column:Ul.getColumnAt(Z,et.column).map(Et=>Et.element.dom)}))},Dd=(k,N,Z,se)=>{se("scope")&&k.setAttrib("scope",Z.scope),se("class")&&Z.class!=="mce-no-match"&&k.setAttrib("class",Z.class),se("width")&&N.setStyle("width",xi(Z.width))},ka=(k,N,Z)=>{Z("backgroundcolor")&&k.setFormat("tablecellbackgroundcolor",N.backgroundcolor),Z("bordercolor")&&k.setFormat("tablecellbordercolor",N.bordercolor),Z("borderstyle")&&k.setFormat("tablecellborderstyle",N.borderstyle),Z("borderwidth")&&k.setFormat("tablecellborderwidth",xi(N.borderwidth))},Nl=(k,N,Z,se)=>{const Ce=N.length===1;j(N,et=>{const Et=et.element,At=Ce?ve:se,Bo=xe.normal(k,Et),co=et.column.map(_n=>xe.normal(k,_n)).getOr(Bo);Dd(Bo,co,Z,At),Wl(k)&&ka(Bo,Z,At),se("halign")&&Yr(k,Et,Z.halign),se("valign")&&ki(k,Et,Z.valign)})},Ju=(k,N)=>{k.execCommand("mceTableCellType",!1,{type:N.celltype,no_events:!0})},Rd=(k,N,Z,se)=>{const Ce=D(se,(et,Et)=>Z[Et]!==et);Kt(Ce)>0&&N.length>=1&&Bi(N[0]).each(et=>{const Et=Yf(et,N),At=Kt(D(Ce,(co,_n)=>_n!=="scope"&&_n!=="celltype"))>0,Bo=Ge(Ce,"celltype");(At||Ge(Ce,"scope"))&&Nl(k,Et,se,ft(Ge,Ce)),Bo&&Ju(k,se),Cd(k,et.dom,{structure:Bo,style:At})})},rg=(k,N,Z,se)=>{const Ce=se.getData();se.close(),k.undoManager.transact(()=>{Rd(k,N,Z,Ce),k.focus()})},ec=(k,N)=>{const Z=Bi(N[0]).map(se=>zo(Yf(se,N),Ce=>Ql(k,Ce.element,Wl(k),Ce.column)));return di(Z.getOrDie())},Xf=k=>{const N=mu(k);if(N.length===0)return;const Z=ec(k,N),se={type:"tabpanel",tabs:[{title:"General",name:"general",items:P(k)},q(k,"cell")]},Ce={type:"panel",items:[{type:"grid",columns:2,items:P(k)}]};k.windowManager.open({title:"Cell Properties",size:"normal",body:Wl(k)?se:Ce,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Z,onSubmit:ft(rg,k,N,Z)})},Jf=k=>Si(ep(k)).map(N=>({name:"class",type:"listbox",label:"Class",items:N})),wt=[{type:"listbox",name:"type",label:"Row type",items:[{text:"Header",value:"header"},{text:"Body",value:"body"},{text:"Footer",value:"footer"}]},{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height",type:"input"}],ag=k=>wt.concat(Jf(k).toArray()),Md=(k,N,Z)=>{Z("class")&&N.class!=="mce-no-match"&&k.setAttrib("class",N.class),Z("height")&&k.setStyle("height",xi(N.height))},Qo=(k,N,Z)=>{Z("backgroundcolor")&&k.setStyle("background-color",N.backgroundcolor),Z("bordercolor")&&k.setStyle("border-color",N.bordercolor),Z("borderstyle")&&k.setStyle("border-style",N.borderstyle)},lo=(k,N,Z,se)=>{const et=N.length===1?ve:se;j(N,Et=>{const At=vl(St.fromDom(Et),"td,th"),Bo=xe.normal(k,Et);Md(Bo,Z,et),jr(k)&&Qo(Bo,Z,et),se("height")&&j(At,co=>{k.dom.setStyle(co.dom,"height",null)}),se("align")&&Yr(k,Et,Z.align)})},Ld=(k,N)=>{k.execCommand("mceTableRowType",!1,{type:N.type,no_events:!0})},Hs=(k,N,Z,se)=>{const Ce=D(se,(et,Et)=>Z[Et]!==et);if(Kt(Ce)>0){const et=Ge(Ce,"type"),Et=et?Kt(Ce)>1:!0;Et&&lo(k,N,se,ft(Ge,Ce)),et&&Ld(k,se),Bi(St.fromDom(N[0])).each(At=>Cd(k,At.dom,{structure:et,style:Et}))}},Dl=(k,N,Z,se)=>{const Ce=se.getData();se.close(),k.undoManager.transact(()=>{Hs(k,N,Z,Ce),k.focus()})},Rl=k=>{const N=js(Yn(k),dr.selected);if(N.length===0)return;const Z=zo(N,Et=>no(k,Et.dom,jr(k))),se=di(Z),Ce={type:"tabpanel",tabs:[{title:"General",name:"general",items:ag(k)},q(k,"row")]},et={type:"panel",items:[{type:"grid",columns:2,items:ag(k)}]};k.windowManager.open({title:"Row Properties",size:"normal",body:jr(k)?Ce:et,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:se,onSubmit:ft(Dl,k,zo(N,Et=>Et.dom),se)})},$o=(k,N,Z)=>{const se=Z?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],Ce=[{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}],et=kl(k)?[{type:"input",name:"cellspacing",label:"Cell spacing",inputMode:"numeric"},{type:"input",name:"cellpadding",label:"Cell padding",inputMode:"numeric"},{type:"input",name:"border",label:"Border width"},{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[],Et=[{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}],At=N.length>0?[{name:"class",type:"listbox",label:"Class",items:N}]:[];return se.concat(Ce).concat(et).concat(Et).concat(At)},Qu=(k,N,Z,se)=>{if(N.tagName==="TD"||N.tagName==="TH")ce(Z)&&Ot(se)?k.setStyle(N,Z,se):k.setStyles(N,Z);else if(N.children)for(let Ce=0;Ce{const Ce=k.dom,et={},Et={},At=Nn(k),Bo=so(k),co=parseFloat(Z.border)===0;if(!We(Z.class)&&Z.class!=="mce-no-match"&&(et.class=Z.class),Et.height=xi(Z.height),At?Et.width=xi(Z.width):Ce.getAttrib(N,"width")&&(et.width=ba(Z.width)),At?(co?(et.border=0,Et["border-width"]=""):(Et["border-width"]=xi(Z.border),et.border=1),Et["border-spacing"]=xi(Z.cellspacing)):(et.border=co?0:Z.border,et.cellpadding=Z.cellpadding,et.cellspacing=Z.cellspacing),At&&N.children){const _n={};if(co?_n["border-width"]="":se.border&&(_n["border-width"]=xi(Z.border)),se.cellpadding&&(_n.padding=xi(Z.cellpadding)),Bo&&se.bordercolor&&(_n["border-color"]=Z.bordercolor),!Cr(_n))for(let Ko=0;Ko{const Ce=k.dom,et=se.getData(),Et=D(et,(At,Bo)=>Z[Bo]!==At);se.close(),k.undoManager.transact(()=>{if(!N){const At=er(et.cols).getOr(1),Bo=er(et.rows).getOr(1);k.execCommand("mceInsertTable",!1,{rows:Bo,columns:At}),N=Xr(Yn(k),$r(k)).bind(co=>Bi(co,$r(k))).map(co=>co.dom).getOrDie()}if(Kt(Et)>0){const At={border:Ge(Et,"border"),bordercolor:Ge(Et,"bordercolor"),cellpadding:Ge(Et,"cellpadding")};Wb(k,N,et,At);const Bo=Ce.select("caption",N)[0];(Bo&&!et.caption||!Bo&&et.caption)&&k.execCommand("mceTableToggleCaption"),Yr(k,N,et.align)}if(k.focus(),k.addVisual(),Kt(Et)>0){const At=Ge(Et,"caption"),Bo=At?Kt(Et)>1:!0;Cd(k,N,{structure:At,style:Bo})}})},ig=(k,N)=>{const Z=k.dom;let se,Ce=sp(k,so(k));N?(Ce.cols="1",Ce.rows="1",so(k)&&(Ce.borderstyle="",Ce.bordercolor="",Ce.backgroundcolor="")):(se=Z.getParent(k.selection.getStart(),"table",k.getBody()),se?Ce=Nd(k,se,so(k)):so(k)&&(Ce.borderstyle="",Ce.bordercolor="",Ce.backgroundcolor=""));const et=Si(ql(k));et.isSome()&&Ce.class&&(Ce.class=Ce.class.replace(/\s*mce\-item\-table\s*/g,""));const Et={type:"grid",columns:2,items:$o(k,et.getOr([]),N)},At=()=>({type:"panel",items:[Et]}),Bo=()=>({type:"tabpanel",tabs:[{title:"General",name:"general",items:[Et]},q(k,"table")]}),co=so(k)?Bo():At();k.windowManager.open({title:"Table Properties",size:"normal",body:co,onSubmit:ft(Xe,k,se,Ce),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Ce})},Qf=k=>{const N=Z=>{Gi(Yn(k))&&Z()};uo({mceTableProps:ft(ig,k,!1),mceTableRowProps:ft(Rl,k),mceTableCellProps:ft(Xf,k),mceInsertTableDialog:ft(ig,k,!0)},(Z,se)=>k.addCommand(se,()=>N(Z)))},em=(k,N)=>iu(k,N).isSome(),ef=Ke,hu=k=>{const N=(se,Ce)=>za(se,Ce).exists(et=>parseInt(et,10)>1),Z=se=>N(se,"rowspan")||N(se,"colspan");return k.length>0&&Bt(k,Z)?ot.some(k):ot.none()},qb=(k,N,Z)=>N.length<=1?ot.none():Od(k,Z.firstSelectedSelector,Z.lastSelectedSelector).map(se=>({bounds:se,cells:N})),Bd=k=>({element:k,mergable:ot.none(),unmergable:ot.none(),selection:[k]}),Ss=(k,N,Z)=>({element:Z,mergable:qb(N,k,dr),unmergable:hu(k),selection:ef(k)}),Tc=k=>{const N=Ci(ot.none()),Z=Ci([]);let se=ot.none();const Ce=yl("caption"),et=es=>se.forall(Ks=>!Ks[es]),Et=()=>nt(Yn(k),$r(k)),At=()=>nt(vs(k),$r(k)),Bo=()=>Et().bind(es=>Fs(yr(Bi(es),At().bind(Bi),(Ks,qa)=>vt(Ks,qa)?Ce(es)?ot.some(Bd(es)):ot.some(Ss(mu(k),Ks,es)):ot.none()))),co=es=>Bi(es.element).map(qa=>{const Ji=Ul.fromTable(qa),mh=zd(Ji,es).getOr([]),ip=Wi(mh,(om,nm)=>(nm.isLocked&&(om.onAny=!0,nm.column===0?om.onFirst=!0:nm.column+nm.colspan>=Ji.grid.columns&&(om.onLast=!0)),om),{onAny:!1,onFirst:!1,onLast:!1});return{mergeable:np(Ji,es).isSome(),unmergeable:sg(Ji,es).isSome(),locked:ip}}),_n=()=>{N.set(Wn(Bo)()),se=N.get().bind(co),j(Z.get(),ue)},Ko=es=>(es(),Z.set(Z.get().concat([es])),()=>{Z.set(Sn(Z.get(),Ks=>Ks!==es))}),Qn=(es,Ks)=>Ko(()=>N.get().fold(()=>{es.setEnabled(!1)},qa=>{es.setEnabled(!Ks(qa)&&k.selection.isEditable())})),ea=(es,Ks,qa)=>Ko(()=>N.get().fold(()=>{es.setEnabled(!1),es.setActive(!1)},Ji=>{es.setEnabled(!Ks(Ji)&&k.selection.isEditable()),es.setActive(qa(Ji))})),qs=es=>se.exists(Ks=>Ks.locked[es]),tc=es=>Qn(es,Ks=>!1),oc=es=>Qn(es,Ks=>Ce(Ks.element)),Oc=es=>Ks=>Qn(Ks,qa=>Ce(qa.element)||qs(es)),ap=es=>Ks=>Qn(Ks,qa=>Ce(qa.element)||es().isNone()),ed=(es,Ks)=>qa=>Qn(qa,Ji=>Ce(Ji.element)||es().isNone()||qs(Ks)),tf=es=>Qn(es,Ks=>et("mergeable")),tm=es=>Qn(es,Ks=>et("unmergeable")),_u=es=>ea(es,Ct,Ks=>Bi(Ks.element,$r(k)).exists(Ji=>em(Ji,"caption"))),of=(es,Ks)=>qa=>ea(qa,Ji=>Ce(Ji.element),()=>k.queryCommandValue(es)===Ks),fh=of("mceTableRowType","header"),xu=of("mceTableColType","th");return k.on("NodeChange ExecCommand TableSelectorChange",_n),{onSetupTable:tc,onSetupCellOrRow:oc,onSetupColumn:Oc,onSetupPasteable:ap,onSetupPasteableColumn:ed,onSetupMergeable:tf,onSetupUnmergeable:tm,resetTargets:_n,onSetupTableWithCaption:_u,onSetupTableRowHeaders:fh,onSetupTableColumnHeaders:xu,targets:N.get}};var lg=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const Ml="x-tinymce/dom-table-",bu=Ml+"rows",ml=Ml+"columns",ar=k=>{var N;const Z=(N=lg.read())!==null&&N!==void 0?N:[];return tn(Z,se=>ot.from(se.getType(k)))},yu=()=>ar(bu),Er=()=>ar(ml),rp=k=>N=>{const Z=()=>{N.setEnabled(k.selection.isEditable())};return k.on("NodeChange",Z),Z(),()=>{k.off("NodeChange",Z)}},Ll=(k,N)=>{k.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",onSetup:rp(k),fetch:At=>At("inserttable | cell row column | advtablesort | tableprops deletetable")});const Z=At=>()=>k.execCommand(At),se=(At,Bo)=>{k.queryCommandSupported(Bo.command)&&k.ui.registry.addButton(At,{...Bo,onAction:mo(Bo.onAction)?Bo.onAction:Z(Bo.command)})},Ce=(At,Bo)=>{k.queryCommandSupported(Bo.command)&&k.ui.registry.addToggleButton(At,{...Bo,onAction:mo(Bo.onAction)?Bo.onAction:Z(Bo.command)})};se("tableprops",{tooltip:"Table properties",command:"mceTableProps",icon:"table",onSetup:N.onSetupTable}),se("tabledelete",{tooltip:"Delete table",command:"mceTableDelete",icon:"table-delete-table",onSetup:N.onSetupTable}),se("tablecellprops",{tooltip:"Cell properties",command:"mceTableCellProps",icon:"table-cell-properties",onSetup:N.onSetupCellOrRow}),se("tablemergecells",{tooltip:"Merge cells",command:"mceTableMergeCells",icon:"table-merge-cells",onSetup:N.onSetupMergeable}),se("tablesplitcells",{tooltip:"Split cell",command:"mceTableSplitCells",icon:"table-split-cells",onSetup:N.onSetupUnmergeable}),se("tableinsertrowbefore",{tooltip:"Insert row before",command:"mceTableInsertRowBefore",icon:"table-insert-row-above",onSetup:N.onSetupCellOrRow}),se("tableinsertrowafter",{tooltip:"Insert row after",command:"mceTableInsertRowAfter",icon:"table-insert-row-after",onSetup:N.onSetupCellOrRow}),se("tabledeleterow",{tooltip:"Delete row",command:"mceTableDeleteRow",icon:"table-delete-row",onSetup:N.onSetupCellOrRow}),se("tablerowprops",{tooltip:"Row properties",command:"mceTableRowProps",icon:"table-row-properties",onSetup:N.onSetupCellOrRow}),se("tableinsertcolbefore",{tooltip:"Insert column before",command:"mceTableInsertColBefore",icon:"table-insert-column-before",onSetup:N.onSetupColumn("onFirst")}),se("tableinsertcolafter",{tooltip:"Insert column after",command:"mceTableInsertColAfter",icon:"table-insert-column-after",onSetup:N.onSetupColumn("onLast")}),se("tabledeletecol",{tooltip:"Delete column",command:"mceTableDeleteCol",icon:"table-delete-column",onSetup:N.onSetupColumn("onAny")}),se("tablecutrow",{tooltip:"Cut row",command:"mceTableCutRow",icon:"cut-row",onSetup:N.onSetupCellOrRow}),se("tablecopyrow",{tooltip:"Copy row",command:"mceTableCopyRow",icon:"duplicate-row",onSetup:N.onSetupCellOrRow}),se("tablepasterowbefore",{tooltip:"Paste row before",command:"mceTablePasteRowBefore",icon:"paste-row-before",onSetup:N.onSetupPasteable(yu)}),se("tablepasterowafter",{tooltip:"Paste row after",command:"mceTablePasteRowAfter",icon:"paste-row-after",onSetup:N.onSetupPasteable(yu)}),se("tablecutcol",{tooltip:"Cut column",command:"mceTableCutCol",icon:"cut-column",onSetup:N.onSetupColumn("onAny")}),se("tablecopycol",{tooltip:"Copy column",command:"mceTableCopyCol",icon:"duplicate-column",onSetup:N.onSetupColumn("onAny")}),se("tablepastecolbefore",{tooltip:"Paste column before",command:"mceTablePasteColBefore",icon:"paste-column-before",onSetup:N.onSetupPasteableColumn(Er,"onFirst")}),se("tablepastecolafter",{tooltip:"Paste column after",command:"mceTablePasteColAfter",icon:"paste-column-after",onSetup:N.onSetupPasteableColumn(Er,"onLast")}),se("tableinsertdialog",{tooltip:"Insert table",command:"mceInsertTableDialog",icon:"table",onSetup:rp(k)});const et=Jl(ql(k));et.length!==0&&k.queryCommandSupported("mceTableToggleClass")&&k.ui.registry.addMenuButton("tableclass",{icon:"table-classes",tooltip:"Table styles",fetch:Sc(k,et,"tableclass",At=>k.execCommand("mceTableToggleClass",!1,At)),onSetup:N.onSetupTable});const Et=Jl(cu(k));Et.length!==0&&k.queryCommandSupported("mceTableCellToggleClass")&&k.ui.registry.addMenuButton("tablecellclass",{icon:"table-cell-classes",tooltip:"Cell styles",fetch:Sc(k,Et,"tablecellclass",At=>k.execCommand("mceTableCellToggleClass",!1,At)),onSetup:N.onSetupCellOrRow}),k.queryCommandSupported("mceTableApplyCellStyle")&&(k.ui.registry.addMenuButton("tablecellvalign",{icon:"vertical-align",tooltip:"Vertical align",fetch:Sc(k,Al,"tablecellverticalalign",Xi(k,"vertical-align")),onSetup:N.onSetupCellOrRow}),k.ui.registry.addMenuButton("tablecellborderwidth",{icon:"border-width",tooltip:"Border width",fetch:Sc(k,vr(k),"tablecellborderwidth",Xi(k,"border-width")),onSetup:N.onSetupCellOrRow}),k.ui.registry.addMenuButton("tablecellborderstyle",{icon:"border-style",tooltip:"Border style",fetch:Sc(k,Va(k),"tablecellborderstyle",Xi(k,"border-style")),onSetup:N.onSetupCellOrRow}),k.ui.registry.addMenuButton("tablecellbackgroundcolor",{icon:"cell-background-color",tooltip:"Background color",fetch:At=>At(Xc(k,Ra(k),"background-color")),onSetup:N.onSetupCellOrRow}),k.ui.registry.addMenuButton("tablecellbordercolor",{icon:"cell-border-color",tooltip:"Border color",fetch:At=>At(Xc(k,qu(k),"border-color")),onSetup:N.onSetupCellOrRow})),Ce("tablecaption",{tooltip:"Table caption",icon:"table-caption",command:"mceTableToggleCaption",onSetup:N.onSetupTableWithCaption}),Ce("tablerowheader",{tooltip:"Row header",icon:"table-top-header",command:"mceTableRowType",onAction:Zf(k),onSetup:N.onSetupTableRowHeaders}),Ce("tablecolheader",{tooltip:"Column header",icon:"table-left-header",command:"mceTableColType",onAction:Wf(k),onSetup:N.onSetupTableColumnHeaders})},Jr=k=>{const N=se=>k.dom.is(se,"table")&&k.getBody().contains(se)&&k.dom.isEditable(se.parentNode),Z=un(k);Z.length>0&&k.ui.registry.addContextToolbar("table",{predicate:N,items:Z,scope:"node",position:"node"})},xt=k=>N=>{const Z=()=>{N.setEnabled(k.selection.isEditable())};return k.on("NodeChange",Z),Z(),()=>{k.off("NodeChange",Z)}},vu=(k,N)=>{const Z=Ko=>()=>k.execCommand(Ko),se=(Ko,Qn)=>k.queryCommandSupported(Qn.command)?(k.ui.registry.addMenuItem(Ko,{...Qn,onAction:mo(Qn.onAction)?Qn.onAction:Z(Qn.command)}),!0):!1,Ce=(Ko,Qn)=>{k.queryCommandSupported(Qn.command)&&k.ui.registry.addToggleMenuItem(Ko,{...Qn,onAction:mo(Qn.onAction)?Qn.onAction:Z(Qn.command)})},et=Ko=>{k.execCommand("mceInsertTable",!1,{rows:Ko.numRows,columns:Ko.numColumns})},Et=[se("tableinsertrowbefore",{text:"Insert row before",icon:"table-insert-row-above",command:"mceTableInsertRowBefore",onSetup:N.onSetupCellOrRow}),se("tableinsertrowafter",{text:"Insert row after",icon:"table-insert-row-after",command:"mceTableInsertRowAfter",onSetup:N.onSetupCellOrRow}),se("tabledeleterow",{text:"Delete row",icon:"table-delete-row",command:"mceTableDeleteRow",onSetup:N.onSetupCellOrRow}),se("tablerowprops",{text:"Row properties",icon:"table-row-properties",command:"mceTableRowProps",onSetup:N.onSetupCellOrRow}),se("tablecutrow",{text:"Cut row",icon:"cut-row",command:"mceTableCutRow",onSetup:N.onSetupCellOrRow}),se("tablecopyrow",{text:"Copy row",icon:"duplicate-row",command:"mceTableCopyRow",onSetup:N.onSetupCellOrRow}),se("tablepasterowbefore",{text:"Paste row before",icon:"paste-row-before",command:"mceTablePasteRowBefore",onSetup:N.onSetupPasteable(yu)}),se("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",command:"mceTablePasteRowAfter",onSetup:N.onSetupPasteable(yu)})],At=[se("tableinsertcolumnbefore",{text:"Insert column before",icon:"table-insert-column-before",command:"mceTableInsertColBefore",onSetup:N.onSetupColumn("onFirst")}),se("tableinsertcolumnafter",{text:"Insert column after",icon:"table-insert-column-after",command:"mceTableInsertColAfter",onSetup:N.onSetupColumn("onLast")}),se("tabledeletecolumn",{text:"Delete column",icon:"table-delete-column",command:"mceTableDeleteCol",onSetup:N.onSetupColumn("onAny")}),se("tablecutcolumn",{text:"Cut column",icon:"cut-column",command:"mceTableCutCol",onSetup:N.onSetupColumn("onAny")}),se("tablecopycolumn",{text:"Copy column",icon:"duplicate-column",command:"mceTableCopyCol",onSetup:N.onSetupColumn("onAny")}),se("tablepastecolumnbefore",{text:"Paste column before",icon:"paste-column-before",command:"mceTablePasteColBefore",onSetup:N.onSetupPasteableColumn(Er,"onFirst")}),se("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",command:"mceTablePasteColAfter",onSetup:N.onSetupPasteableColumn(Er,"onLast")})],Bo=[se("tablecellprops",{text:"Cell properties",icon:"table-cell-properties",command:"mceTableCellProps",onSetup:N.onSetupCellOrRow}),se("tablemergecells",{text:"Merge cells",icon:"table-merge-cells",command:"mceTableMergeCells",onSetup:N.onSetupMergeable}),se("tablesplitcells",{text:"Split cell",icon:"table-split-cells",command:"mceTableSplitCells",onSetup:N.onSetupUnmergeable})];Cl(k)?k.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"inserttable",onAction:et}],onSetup:xt(k)}):k.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:Z("mceInsertTableDialog"),onSetup:xt(k)}),k.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:Z("mceInsertTableDialog"),onSetup:xt(k)}),se("tableprops",{text:"Table properties",onSetup:N.onSetupTable,command:"mceTableProps"}),se("deletetable",{text:"Delete table",icon:"table-delete-table",onSetup:N.onSetupTable,command:"mceTableDelete"}),ks(Et,!0)&&k.ui.registry.addNestedMenuItem("row",{type:"nestedmenuitem",text:"Row",getSubmenuItems:Rt("tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter")}),ks(At,!0)&&k.ui.registry.addNestedMenuItem("column",{type:"nestedmenuitem",text:"Column",getSubmenuItems:Rt("tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter")}),ks(Bo,!0)&&k.ui.registry.addNestedMenuItem("cell",{type:"nestedmenuitem",text:"Cell",getSubmenuItems:Rt("tablecellprops tablemergecells tablesplitcells")}),k.ui.registry.addContextMenu("table",{update:()=>(N.resetTargets(),N.targets().fold(Rt(""),Ko=>nn(Ko.element)==="caption"?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable"))});const co=Jl(ql(k));co.length!==0&&k.queryCommandSupported("mceTableToggleClass")&&k.ui.registry.addNestedMenuItem("tableclass",{icon:"table-classes",text:"Table styles",getSubmenuItems:()=>ci(k,co,"tableclass",Ko=>k.execCommand("mceTableToggleClass",!1,Ko)),onSetup:N.onSetupTable});const _n=Jl(cu(k));_n.length!==0&&k.queryCommandSupported("mceTableCellToggleClass")&&k.ui.registry.addNestedMenuItem("tablecellclass",{icon:"table-cell-classes",text:"Cell styles",getSubmenuItems:()=>ci(k,_n,"tablecellclass",Ko=>k.execCommand("mceTableCellToggleClass",!1,Ko)),onSetup:N.onSetupCellOrRow}),k.queryCommandSupported("mceTableApplyCellStyle")&&(k.ui.registry.addNestedMenuItem("tablecellvalign",{icon:"vertical-align",text:"Vertical align",getSubmenuItems:()=>ci(k,Al,"tablecellverticalalign",Xi(k,"vertical-align")),onSetup:N.onSetupCellOrRow}),k.ui.registry.addNestedMenuItem("tablecellborderwidth",{icon:"border-width",text:"Border width",getSubmenuItems:()=>ci(k,vr(k),"tablecellborderwidth",Xi(k,"border-width")),onSetup:N.onSetupCellOrRow}),k.ui.registry.addNestedMenuItem("tablecellborderstyle",{icon:"border-style",text:"Border style",getSubmenuItems:()=>ci(k,Va(k),"tablecellborderstyle",Xi(k,"border-style")),onSetup:N.onSetupCellOrRow}),k.ui.registry.addNestedMenuItem("tablecellbackgroundcolor",{icon:"cell-background-color",text:"Background color",getSubmenuItems:()=>Xc(k,Ra(k),"background-color"),onSetup:N.onSetupCellOrRow}),k.ui.registry.addNestedMenuItem("tablecellbordercolor",{icon:"cell-border-color",text:"Border color",getSubmenuItems:()=>Xc(k,qu(k),"border-color"),onSetup:N.onSetupCellOrRow})),Ce("tablecaption",{icon:"table-caption",text:"Table caption",command:"mceTableToggleCaption",onSetup:N.onSetupTableWithCaption}),Ce("tablerowheader",{text:"Row header",icon:"table-top-header",command:"mceTableRowType",onAction:Zf(k),onSetup:N.onSetupTableRowHeaders}),Ce("tablecolheader",{text:"Column header",icon:"table-left-header",command:"mceTableColType",onAction:Wf(k),onSetup:N.onSetupTableRowHeaders})},Qr=k=>{const N=Tc(k);Gc(k),Qf(k),vu(k,N),Ll(k,N),Jr(k)};var Kb=()=>{w.add("table",Qr)};Kb()})();tinymce.Resource.add("ui/default/content.css",`.mce-content-body .mce-item-anchor{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A") no-repeat center}.mce-content-body .mce-item-anchor:empty{cursor:default;display:inline-block;height:12px!important;padding:0 2px;-webkit-user-modify:read-only;-moz-user-modify:read-only;-webkit-user-select:all;user-select:all;width:8px!important}.mce-content-body .mce-item-anchor:not(:empty){background-position-x:2px;display:inline-block;padding-left:12px}.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset:1px}.tox-comments-visible .tox-comment[contenteditable=false]:not([data-mce-selected]),.tox-comments-visible span.tox-comment img:not([data-mce-selected]),.tox-comments-visible span.tox-comment span.mce-preview-object:not([data-mce-selected]),.tox-comments-visible span.tox-comment>audio:not([data-mce-selected]),.tox-comments-visible span.tox-comment>video:not([data-mce-selected]){outline:3px solid #ffe89d}.tox-comments-visible .tox-comment[contenteditable=false][data-mce-annotation-active=true]:not([data-mce-selected]){outline:3px solid #fed635}.tox-comments-visible span.tox-comment[data-mce-annotation-active=true] img:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-annotation-active=true] span.mce-preview-object:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-annotation-active=true]>audio:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-annotation-active=true]>video:not([data-mce-selected]){outline:3px solid #fed635}.tox-comments-visible span.tox-comment:not([data-mce-selected]){background-color:#ffe89d;outline:0}.tox-comments-visible span.tox-comment[data-mce-annotation-active=true]:not([data-mce-selected=inline-boundary]){background-color:#fed635}.tox-checklist>li:not(.tox-checklist--hidden){list-style:none;margin:.25em 0}.tox-checklist>li:not(.tox-checklist--hidden)::before{content:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A");cursor:pointer;height:1em;margin-left:-1.5em;margin-top:.125em;position:absolute;width:1em}.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{content:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A")}[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-left:0;margin-right:-1.5em}code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;tab-size:4;-webkit-hyphens:none;hyphens:none}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.mce-content-body{overflow-wrap:break-word;word-wrap:break-word}.mce-content-body .mce-visual-caret{background-color:#000;background-color:currentColor;position:absolute}.mce-content-body .mce-visual-caret-hidden{display:none}.mce-content-body [data-mce-caret]{left:-1000px;margin:0;padding:0;position:absolute;right:auto;top:0}.mce-content-body .mce-offscreen-selection{left:-2000000px;max-width:1000000px;position:absolute}.mce-content-body [contentEditable=false]{cursor:default}.mce-content-body [contentEditable=true]{cursor:text}.tox-cursor-format-painter{cursor:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"),default}div.mce-footnotes hr{margin-inline:0 auto;width:25%}div.mce-footnotes li>a.mce-footnotes-backlink{-webkit-text-decoration:none;text-decoration:none}@media print{sup.mce-footnote a{color:#000;-webkit-text-decoration:none;text-decoration:none}div.mce-footnotes{page-break-inside:avoid;break-inside:avoid;width:100%}div.mce-footnotes li>a.mce-footnotes-backlink{display:none}}tiny-math-block{display:flex;justify-content:center;margin:16px 0 16px 0}tiny-math-inline{display:inline-block}.mce-content-body figure.align-left{float:left}.mce-content-body figure.align-right{float:right}.mce-content-body figure.image.align-center{display:table;margin-left:auto;margin-right:auto}.mce-preview-object{border:1px solid gray;display:inline-block;line-height:0;margin:0 2px;position:relative}.mce-preview-object .mce-shim{background:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");height:100%;left:0;position:absolute;top:0;width:100%}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-content-body .mce-mergetag{cursor:default!important;-webkit-user-select:none;user-select:none}.mce-content-body .mce-mergetag:hover{background-color:rgba(0,108,231,.1)}.mce-content-body .mce-mergetag-affix{background-color:rgba(0,108,231,.1);color:#006ce7}.mce-object{background:transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;border:1px dashed #aaa}.mce-pagebreak{border:1px dashed #aaa;cursor:default;display:block;height:5px;margin-top:15px;page-break-before:always;width:100%}@media print{.mce-pagebreak{border:0}}.tiny-pageembed .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.tiny-pageembed[data-mce-selected="2"] .mce-shim{display:none}.tiny-pageembed{display:inline-block;position:relative}.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{display:block;overflow:hidden;padding:0;position:relative;width:100%}.tiny-pageembed--21by9{padding-top:42.857143%}.tiny-pageembed--16by9{padding-top:56.25%}.tiny-pageembed--4by3{padding-top:75%}.tiny-pageembed--1by1{padding-top:100%}.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.mce-content-body[data-mce-placeholder]{position:relative}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before{color:rgba(34,47,62,.7);content:attr(data-mce-placeholder);position:absolute}@media (forced-colors:active){.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before{color:highlight;filter:brightness(30%);z-index:-1}}.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before{left:1px}.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before{right:1px}.mce-content-body div.mce-resizehandle{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;height:10px;position:absolute;width:10px;z-index:1298}.mce-content-body div.mce-resizehandle:hover{background-color:#4099ff}.mce-content-body div.mce-resizehandle:first-of-type{cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor:nesw-resize}.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor:nesw-resize}.mce-content-body .mce-resize-backdrop{z-index:10000}.mce-content-body .mce-clonedresizable{cursor:default;opacity:.5;outline:1px dashed black;position:absolute;z-index:10001}.mce-content-body .mce-clonedresizable.mce-resizetable-columns td,.mce-content-body .mce-clonedresizable.mce-resizetable-columns th{border:0}.mce-content-body .mce-resize-helper{background:#555;background:rgba(0 0 0%);border:1px;border-radius:3px;color:#fff;display:none;font-family:sans-serif;font-size:12px;line-height:14px;margin:5px 10px;padding:5px;position:absolute;white-space:nowrap;z-index:10002}.tox-rtc-user-selection{position:relative}.tox-rtc-user-cursor{bottom:0;cursor:default;position:absolute;top:0;width:2px}.tox-rtc-user-cursor::before{background-color:inherit;border-radius:50%;content:'';display:block;height:8px;position:absolute;right:-3px;top:-3px;width:8px}.tox-rtc-user-cursor:hover::after{background-color:inherit;border-radius:100px;box-sizing:border-box;color:#fff;content:attr(data-user);display:block;font-size:12px;font-weight:700;left:-5px;min-height:8px;min-width:8px;padding:0 12px;position:absolute;top:-11px;white-space:nowrap;z-index:1000}.tox-rtc-user-selection--1 .tox-rtc-user-cursor{background-color:#2dc26b}.tox-rtc-user-selection--2 .tox-rtc-user-cursor{background-color:#e03e2d}.tox-rtc-user-selection--3 .tox-rtc-user-cursor{background-color:#f1c40f}.tox-rtc-user-selection--4 .tox-rtc-user-cursor{background-color:#3598db}.tox-rtc-user-selection--5 .tox-rtc-user-cursor{background-color:#b96ad9}.tox-rtc-user-selection--6 .tox-rtc-user-cursor{background-color:#e67e23}.tox-rtc-user-selection--7 .tox-rtc-user-cursor{background-color:#aaa69d}.tox-rtc-user-selection--8 .tox-rtc-user-cursor{background-color:#f368e0}.tox-rtc-remote-image{background:#eaeaea url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A") no-repeat center center;border:1px solid #ccc;min-height:240px;min-width:320px}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-match-marker-selected::selection{background:#39f;color:#fff}.mce-content-body audio[data-mce-selected],.mce-content-body details[data-mce-selected],.mce-content-body embed[data-mce-selected],.mce-content-body img[data-mce-selected],.mce-content-body object[data-mce-selected],.mce-content-body table[data-mce-selected],.mce-content-body video[data-mce-selected]{outline:3px solid #b4d7ff}.mce-content-body hr[data-mce-selected]{outline:3px solid #b4d7ff;outline-offset:1px}.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false][data-mce-selected]{cursor:not-allowed;outline:3px solid #b4d7ff}.mce-content-body.mce-content-readonly [contentEditable=true]:focus,.mce-content-body.mce-content-readonly [contentEditable=true]:hover{outline:0}.mce-content-body [data-mce-selected=inline-boundary]{background-color:#b4d7ff}.mce-content-body .mce-edit-focus{outline:3px solid #b4d7ff}.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{position:relative}.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background:0 0}.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{outline:0;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mce-content-body td[data-mce-selected]::after,.mce-content-body th[data-mce-selected]::after{background-color:rgba(180,215,255,.7);border:1px solid rgba(180,215,255,.7);bottom:-1px;content:'';left:-1px;mix-blend-mode:multiply;position:absolute;right:-1px;top:-1px}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){.mce-content-body td[data-mce-selected]::after,.mce-content-body th[data-mce-selected]::after{border-color:rgba(0,84,180,.7)}}.mce-content-body img[data-mce-selected]::selection{background:0 0}.ephox-snooker-resizer-bar{background-color:#b4d7ff;opacity:0;-webkit-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:1}.mce-spellchecker-word{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default;height:2rem}.mce-spellchecker-grammar{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc ul>li{list-style-type:none}[data-mce-block]{display:block}.mce-item-table:not([border]),.mce-item-table:not([border]) caption,.mce-item-table:not([border]) td,.mce-item-table:not([border]) th,.mce-item-table[border="0"],.mce-item-table[border="0"] caption,.mce-item-table[border="0"] td,.mce-item-table[border="0"] th,table[style*="border-width: 0px"],table[style*="border-width: 0px"] caption,table[style*="border-width: 0px"] td,table[style*="border-width: 0px"] th{border:1px dashed #bbb}.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{background-repeat:no-repeat;border:1px dashed #bbb;margin-left:3px;padding-top:10px}.mce-visualblocks p{background-image:url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)}.mce-visualblocks h1{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)}.mce-visualblocks h2{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)}.mce-visualblocks h3{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)}.mce-visualblocks h4{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)}.mce-visualblocks h5{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)}.mce-visualblocks h6{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)}.mce-visualblocks div:not([data-mce-bogus]){background-image:url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)}.mce-visualblocks section{background-image:url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)}.mce-visualblocks article{background-image:url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)}.mce-visualblocks blockquote{background-image:url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)}.mce-visualblocks address{background-image:url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=)}.mce-visualblocks pre{background-image:url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)}.mce-visualblocks figure{background-image:url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7)}.mce-visualblocks figcaption{border:1px dashed #bbb}.mce-visualblocks hgroup{background-image:url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)}.mce-visualblocks aside{background-image:url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)}.mce-visualblocks ul{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)}.mce-visualblocks ol{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==)}.mce-visualblocks dl{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==)}.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left:3px}.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x:right;margin-right:3px}.mce-nbsp,.mce-shy{background:#aaa}.mce-shy::after{content:'-'}body{font-family:sans-serif}table{border-collapse:collapse}`);tinymce.Resource.add("content/default/content.css",`body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border="0"]):not([style*=border-width]) td,table[border]:not([border="0"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border="0"]):not([style*=border-style]) td,table[border]:not([border="0"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border="0"]):not([style*=border-color]) td,table[border]:not([border="0"]):not([style*=border-color]) th{border-color:#ccc}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}`);t9.init({selector:"textarea.wysiwyg",menubar:!1,license_key:"gpl",statusbar:!1,browser_spellcheck:!0,toolbar1:"undo redo | styleselect | bold italic | link bullist numlist outdent indent | forecolor backcolor | paste",plugins:["lists","link"],contextmenu:[],paste_data_images:!1,paste_webkit_styles:"color",paste_merge_formats:!0,setup:function(w){w.on("blur",function(g){var S=t9.activeEditor.getContent();S.includes("'; */ /* content UI CSS is required */ -tinymce/skins/ui/oxide/content.js; +import 'tinymce/skins/ui/oxide/content.js'; /* The default content CSS can be changed or replaced with appropriate CSS for the editor content. */ import contentCss from 'tinymce/skins/content/default/content.js';