Files
lucent-laravel/front/dist/assets/main.f303cf88.js
T

189 lines
2.3 MiB
JavaScript
Raw Normal View History

2023-11-20 13:56:20 +02:00
var NN=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function s2e(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var tpe={exports:{}},Gse={exports:{}},npe=function(e,t){return function(){for(var a=new Array(arguments.length),l=0;l<a.length;l++)a[l]=arguments[l];return e.apply(t,a)}},r2e=npe,FC=Object.prototype.toString;function Kse(o){return Array.isArray(o)}function Doe(o){return typeof o>"u"}function i2e(o){return o!==null&&!Doe(o)&&o.constructor!==null&&!Doe(o.constructor)&&typeof o.constructor.isBuffer=="function"&&o.constructor.isBuffer(o)}function ope(o){return FC.call(o)==="[object ArrayBuffer]"}function a2e(o){return FC.call(o)==="[object FormData]"}function l2e(o){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(o):e=o&&o.buffer&&ope(o.buffer),e}function c2e(o){return typeof o=="string"}function u2e(o){return typeof o=="number"}function spe(o){return o!==null&&typeof o=="object"}function wH(o){if(FC.call(o)!=="[object Object]")return!1;var e=Object.getPrototypeOf(o);return e===null||e===Object.prototype}function f2e(o){return FC.call(o)==="[object Date]"}function d2e(o){return FC.call(o)==="[object File]"}function h2e(o){return FC.call(o)==="[object Blob]"}function rpe(o){return FC.call(o)==="[object Function]"}function m2e(o){return spe(o)&&rpe(o.pipe)}function g2e(o){return FC.call(o)==="[object URLSearchParams]"}function p2e(o){return o.trim?o.trim():o.replace(/^\s+|\s+$/g,"")}function b2e(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Jse(o,e){if(!(o===null||typeof o>"u"))if(typeof o!="object"&&(o=[o]),Kse(o))for(var t=0,s=o.length;t<s;t++)e.call(null,o[t],t,o);else for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&e.call(null,o[a],a,o)}function Poe(){var o={};function e(a,l){wH(o[l])&&wH(a)?o[l]=Poe(o[l],a):wH(a)?o[l]=Poe({},a):Kse(a)?o[l]=a.slice():o[l]=a}for(var t=0,s=arguments.length;t<s;t++)Jse(arguments[t],e);return o}function v2e(o,e,t){return Jse(e,function(a,l){t&&typeof a=="function"?o[l]=r2e(a,t):o[l]=a}),o}function O2e(o){return o.charCodeAt(0)===65279&&(o=o.slice(1)),o}var Hp={isArray:Kse,isArrayBuffer:ope,isBuffer:i2e,isFormData:a2e,isArrayBufferView:l2e,isString:c2e,isNumber:u2e,isObject:spe,isPlainObject:wH,isUndefined:Doe,isDate:f2e,isFile:d2e,isBlob:h2e,isFunction:rpe,isStream:m2e,isURLSearchParams:g2e,isStandardBrowserEnv:b2e,forEach:Jse,merge:Poe,extend:v2e,trim:p2e,stripBOM:O2e},q4=Hp;function Uae(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var ipe=function(e,t,s){if(!t)return e;var a;if(s)a=s(t);else if(q4.isURLSearchParams(t))a=t.toString();else{var l=[];q4.forEach(t,function(h,b){h===null||typeof h>"u"||(q4.isArray(h)?b=b+"[]":h=[h],q4.forEach(h,function(C){q4.isDate(C)?C=C.toISOString():q4.isObject(C)&&(C=JSON.stringify(C)),l.push(Uae(b)+"="+Uae(C))}))}),a=l.join("&")}if(a){var u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e},y2e=Hp;function Yz(){this.handlers=[]}Yz.prototype.use=function(e,t,s){return this.handlers.push({fulfilled:e,rejected:t,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1};Yz.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Yz.prototype.forEach=function(e){y2e.forEach(this.handlers,function(s){s!==null&&e(s)})};var w2e=Yz,_2e=Hp,S2e=function(e,t){_2e.forEach(e,function(a,l){l!==t&&l.toUpperCase()===t.toUpperCase()&&(e[t]=a,delete e[l])})},ape=function(e,t,s,a,l){return e.config=t,s&&(e.code=s),e.request=a,e.response=l,e.isAxiosError=!0,e.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:this.config,code:this.code,status:this.response&
`),function(b){if(d=b.indexOf(":"),l=o.trim(b.substr(0,d)).toLowerCase(),u=o.trim(b.substr(d+1)),l){if(a[l]&&e.indexOf(l)>=0)return;l==="set-cookie"?a[l]=(a[l]?a[l]:[]).concat([u]):a[l]=a[l]?a[l]+", "+u:u}}),a},tne}var nne,ele;function D2e(){if(ele)return nne;ele=1;var o=Hp;return nne=o.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),s=document.createElement("a"),a;function l(u){var d=u;return t&&(s.setAttribute("href",d),d=s.href),s.setAttribute("href",d),{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 a=l(window.location.href),function(d){var h=o.isString(d)?l(d):d;return h.protocol===a.protocol&&h.host===a.host}}():function(){return function(){return!0}}(),nne}var one,tle;function Xz(){if(tle)return one;tle=1;function o(e){this.message=e}return o.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},o.prototype.__CANCEL__=!0,one=o,one}var sne,nle;function ole(){if(nle)return sne;nle=1;var o=Hp,e=C2e(),t=k2e(),s=ipe,a=E2e(),l=A2e(),u=D2e(),d=lpe(),h=jz(),b=Xz();return sne=function(C){return new Promise(function(R,$){var Q=C.data,F=C.headers,U=C.responseType,K;function L(){C.cancelToken&&C.cancelToken.unsubscribe(K),C.signal&&C.signal.removeEventListener("abort",K)}o.isFormData(Q)&&delete F["Content-Type"];var te=new XMLHttpRequest;if(C.auth){var ne=C.auth.username||"",oe=C.auth.password?unescape(encodeURIComponent(C.auth.password)):"";F.Authorization="Basic "+btoa(ne+":"+oe)}var G=a(C.baseURL,C.url);te.open(C.method.toUpperCase(),s(G,C.params,C.paramsSerializer),!0),te.timeout=C.timeout;function we(){if(!!te){var Re="getAllResponseHeaders"in te?l(te.getAllResponseHeaders()):null,Oe=!U||U==="text"||U==="json"?te.responseText:te.response,ce={data:Oe,status:te.status,statusText:te.statusText,headers:Re,config:C,request:te};e(function(tt){R(tt),L()},function(tt){$(tt),L()},ce),te=null}}if("onloadend"in te?te.onloadend=we:te.onreadystatechange=function(){!te||te.readyState!==4||te.status===0&&!(te.responseURL&&te.responseURL.indexOf("file:")===0)||setTimeout(we)},te.onabort=function(){!te||($(d("Request aborted",C,"ECONNABORTED",te)),te=null)},te.onerror=function(){$(d("Network Error",C,null,te)),te=null},te.ontimeout=function(){var Oe=C.timeout?"timeout of "+C.timeout+"ms exceeded":"timeout exceeded",ce=C.transitional||h.transitional;C.timeoutErrorMessage&&(Oe=C.timeoutErrorMessage),$(d(Oe,C,ce.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",te)),te=null},o.isStandardBrowserEnv()){var ve=(C.withCredentials||u(G))&&C.xsrfCookieName?t.read(C.xsrfCookieName):void 0;ve&&(F[C.xsrfHeaderName]=ve)}"setRequestHeader"in te&&o.forEach(F,function(Oe,ce){typeof Q>"u"&&ce.toLowerCase()==="content-type"?delete F[ce]:te.setRequestHeader(ce,Oe)}),o.isUndefined(C.withCredentials)||(te.withCredentials=!!C.withCredentials),U&&U!=="json"&&(te.responseType=C.responseType),typeof C.onDownloadProgress=="function"&&te.addEventListener("progress",C.onDownloadProgress),typeof C.onUploadProgress=="function"&&te.upload&&te.upload.addEventListener("progress",C.onUploadProgress),(C.cancelToken||C.signal)&&(K=function(Re){!te||($(!Re||Re&&Re.type?new b("canceled"):Re),te.abort(),te=null)},C.cancelToken&&C.cancelToken.subscribe(K),C.signal&&(C.signal.aborted?K():C.signal.addEventListener("abort",K))),Q||(Q=null),te.send(Q)})},sne}var rne,sle;function jz(){if(sle)return rne;sle=1;var o=Hp,e=S2e,t=ape,s={"Content-Type":"application/x-www-form-urlencoded"};function a(h,b){!o.isUndefined(h)&&o.isUndefined(h["Content-Type"])&&(h["Content-Type"]=b)}function l(){var h;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(h=ole()),h}function u(h,b,y){if(o.isString(h))try{return(b||JSON.parse)(h),o.trim(h)}catch(C){if(C.name!=="SyntaxError")throw C}return(y||JSON.stringify)(h)}var d={transitional:{silentJSONParsing:!0,forcedJS
2023-11-17 21:22:26 +02:00
`;for(let F=0;F<=1;F+=h){const U=e+(t-e)*l(F);b+=F*100+`%{${u(U,1-U)}}
`}const y=b+`100% {${u(t,1-t)}}
2023-11-20 13:56:20 +02:00
}`,C=`__svelte_${nwe(y)}_${d}`,E=Spe(o),{stylesheet:R,rules:$}=KH.get(E)||owe(E,o);$[C]||($[C]=!0,R.insertRule(`@keyframes ${C} ${y}`,R.cssRules.length));const Q=o.style.animation||"";return o.style.animation=`${Q?`${Q}, `:""}${C} ${s}ms linear ${a}ms 1 both`,JH+=1,C}function xpe(o,e){const t=(o.style.animation||"").split(", "),s=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),a=t.length-s.length;a&&(o.style.animation=s.join(", "),JH-=a,JH||swe())}function swe(){tre(()=>{JH||(KH.forEach(o=>{const{ownerNode:e}=o.stylesheet;e&&ke(e)}),KH.clear())})}function Tpe(o,e,t,s){if(!e)return fn;const a=o.getBoundingClientRect();if(e.left===a.left&&e.right===a.right&&e.top===a.top&&e.bottom===a.bottom)return fn;const{delay:l=0,duration:u=300,easing:d=ppe,start:h=ype()+l,end:b=h+u,tick:y=fn,css:C}=t(o,{from:e,to:a},s);let E=!0,R=!1,$;function Q(){C&&($=Moe(o,0,1,u,l,d,C)),l||(R=!0)}function F(){C&&xpe(o,$),E=!1}return _pe(U=>{if(!R&&U>=h&&(R=!0),R&&U>=b&&(y(1,0),F()),!E)return!1;if(R){const K=U-h,L=0+1*d(K/u);y(L,1-L)}return!0}),Q(),y(0,1),F}function Epe(o){const e=getComputedStyle(o);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:s}=e,a=o.getBoundingClientRect();o.style.position="absolute",o.style.width=t,o.style.height=s,rwe(o,a)}}function rwe(o,e){const t=o.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const s=getComputedStyle(o),a=s.transform==="none"?"":s.transform;o.style.transform=`${a} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let y6;function r6(o){y6=o}function YD(){if(!y6)throw new Error("Function called outside component initialization");return y6}function W1(o){YD().$$.on_mount.push(o)}function Ape(o){YD().$$.after_update.push(o)}function ore(o){YD().$$.on_destroy.push(o)}function Fg(){const o=YD();return(e,t,{cancelable:s=!1}={})=>{const a=o.$$.callbacks[e];if(a){const l=kpe(e,t,{cancelable:s});return a.slice().forEach(u=>{u.call(o,l)}),!l.defaultPrevented}return!0}}function dD(o,e){return YD().$$.context.set(o,e),e}function Ur(o){return YD().$$.context.get(o)}function SH(o,e){const t=o.$$.callbacks[e.type];t&&t.slice().forEach(s=>s.call(this,e))}const rD=[],Ro=[];let vD=[];const Roe=[],iwe=Promise.resolve();let $oe=!1;function awe(){$oe||($oe=!0,iwe.then(Dpe))}function AC(o){vD.push(o)}function lr(o){Roe.push(o)}const hne=new Set;let K4=0;function Dpe(){if(K4!==0)return;const o=y6;do{try{for(;K4<rD.length;){const e=rD[K4];K4++,r6(e),lwe(e.$$)}}catch(e){throw rD.length=0,K4=0,e}for(r6(null),rD.length=0,K4=0;Ro.length;)Ro.pop()();for(let e=0;e<vD.length;e+=1){const t=vD[e];hne.has(t)||(hne.add(t),t())}vD.length=0}while(rD.length);for(;Roe.length;)Roe.pop()();$oe=!1,hne.clear(),r6(o)}function lwe(o){if(o.fragment!==null){o.update(),vi(o.before_update);const e=o.dirty;o.dirty=[-1],o.fragment&&o.fragment.p(o.ctx,e),o.after_update.forEach(AC)}}function cwe(o){const e=[],t=[];vD.forEach(s=>o.indexOf(s)===-1?e.push(s):t.push(s)),t.forEach(s=>s()),vD=e}let IN;function uwe(){return IN||(IN=Promise.resolve(),IN.then(()=>{IN=null})),IN}function mne(o,e,t){o.dispatchEvent(kpe(`${e?"intro":"outro"}${t}`))}const CH=new Set;let Lw;function mo(){Lw={r:0,c:[],p:Lw}}function go(){Lw.r||vi(Lw.c),Lw=Lw.p}function xe(o,e){o&&o.i&&(CH.delete(o),o.i(e))}function Be(o,e,t,s){if(o&&o.o){if(CH.has(o))return;CH.add(o),Lw.c.push(()=>{CH.delete(o),s&&(t&&o.d(1),s())}),o.o(e)}else s&&s()}const fwe={duration:0};function ez(o,e,t,s){const a={direction:"both"};let l=e(o,t,a),u=s?0:1,d=null,h=null,b=null;function y(){b&&xpe(o,b)}function C(R,$){const Q=R.b-u;return $*=Math.abs(Q),{a:u,b:R.b,d:Q,duration:$,start:R.start,end:R.start+$,group:R.group}}function E(R){const{delay:$=0,duration:Q=300,easing:F=ppe,tick:U=fn,css:K}=l||fwe,L={start:ype()+$,b:R};R||(L.group=Lw,Lw.r+=1),d||h?h=L:(K&&(y(),b=Moe(o,u,R,Q,$,F,K)),R&&U(0,1),d=C(L,Q),AC(()=>mne(o,R,"start")),_pe(te=>{if(h&&te>h.start&&(d=C(h,Q),h=null,mne(o,d.b,"start"),K&&(y(),b=Moe(o,u,d.b,d.duration,0,F,l.css))),d){if(te>=d.end)U(u=d.b,1-u),mne(o,d.b,"end"),h||(d.b?y():--d.group.r||vi(d.group.c)),d=null;else if(te>=d.start){const ne=te-d.start;u=d
transform: ${b} translate(${(1-Q)*C}${E}, ${(1-Q)*R}${$});
opacity: ${h-y*F}`}}function yle(o){let e,t,s,a;return{c(){e=re("div"),t=Ht(o[1]),Z(e,"class","lx-alert text-white bg-success border-1 border rounded px-3 py-0 text-center svelte-190ow44"),Z(e,"role","alert")},m(l,u){Te(l,e,u),X(e,t),a=!0},p(l,u){(!a||u&2)&&Qn(t,l[1])},i(l){a||(AC(()=>{!a||(s||(s=ez(e,tz,{duration:500},!0)),s.run(1))}),a=!0)},o(l){s||(s=ez(e,tz,{duration:500},!1)),s.run(0),a=!1},d(l){l&&ke(e),l&&s&&s.end()}}}function kwe(o){let e,t,s=o[0]&&yle(o);return{c(){s&&s.c(),e=Rs()},m(a,l){s&&s.m(a,l),Te(a,e,l),t=!0},p(a,[l]){a[0]?s?(s.p(a,l),l&1&&xe(s,1)):(s=yle(a),s.c(),xe(s,1),s.m(e.parentNode,e)):s&&(mo(),Be(s,1,1,()=>{s=null}),go())},i(a){t||(xe(s),t=!0)},o(a){Be(s),t=!1},d(a){s&&s.d(a),a&&ke(e)}}}function xwe(o,e,t){let s,a;function l(u="Saved"){t(1,s=u),t(0,a=!0),setTimeout(function(){t(0,a=!1)},2e3)}return t(1,s="Saved"),t(0,a=!1),[a,s,l]}class sre extends uo{constructor(e){super(),co(this,e,xwe,kwe,lo,{show:2})}get show(){return this.$$.ctx[2]}}function Twe(o){let e,t,s,a,l,u,d,h,b,y,C,E,R,$,Q={};return e=new sre({props:Q}),o[4](e),C=new AD({props:{label:"Enter"}}),{c(){en(e.$$.fragment),t=Ze(),s=re("div"),a=re("form"),l=re("div"),u=re("h3"),d=Ht("Login as "),h=Ht(o[0]),b=Ze(),y=re("div"),en(C.$$.fragment),Z(l,"class","mb-3 text-center"),Z(y,"class","text-center mt-5 d-block"),Z(s,"class","wrapper-tiny")},m(F,U){Kt(e,F,U),Te(F,t,U),Te(F,s,U),X(s,a),X(a,l),X(l,u),X(u,d),X(u,h),X(a,b),X(a,y),Kt(C,y,null),E=!0,R||($=mn(a,"submit",o[2]),R=!0)},p(F,[U]){const K={};e.$set(K),(!E||U&1)&&Qn(h,F[0])},i(F){E||(xe(e.$$.fragment,F),xe(C.$$.fragment,F),E=!0)},o(F){Be(e.$$.fragment,F),Be(C.$$.fragment,F),E=!1},d(F){o[4](null),Jt(e,F),F&&ke(t),F&&ke(s),Jt(C),R=!1,$()}}}function Ewe(o,e,t){const s=Ur("channel");let{email:a}=e,{token:l}=e,u;function d(b){b.preventDefault(),axios.post(s.lucentUrl+"/verify",{email:a,token:l}).then(y=>{window.location=s.lucentUrl}).catch(y=>{})}function h(b){Ro[b?"unshift":"push"](()=>{u=b,t(1,u)})}return o.$$set=b=>{"email"in b&&t(0,a=b.email),"token"in b&&t(3,l=b.token)},[a,u,d,l,h]}class Awe extends uo{constructor(e){super(),co(this,e,Ewe,Twe,lo,{email:0,token:3})}}function Dwe(o){let e,t,s;return{c(){e=re("div"),t=re("div"),s=Ht(o[2]),Z(t,"class","avatar__letters"),Z(e,"class","avatar"),Z(e,"title",o[0]),rs(e,"background-color",o[3][o[4]]),rs(e,"height",o[1]+"px"),rs(e,"width",o[1]+"px"),rs(e,"font-size",o[1]/2+"px")},m(a,l){Te(a,e,l),X(e,t),X(t,s)},p(a,[l]){l&4&&Qn(s,a[2]),l&1&&Z(e,"title",a[0]),l&2&&rs(e,"height",a[1]+"px"),l&2&&rs(e,"width",a[1]+"px"),l&2&&rs(e,"font-size",a[1]/2+"px")},i:fn,o:fn,d(a){a&&ke(e)}}}function Pwe(o,e,t){let{name:s}=e,{side:a=48}=e;const l=["#00AA55","#009FD4","#B381B3","#939393","#E3BC00","#D47500","#DC2A2A","#3ede91","#377dd4","#0256b0","#053d82","#3d026e","#b378e3","#c4065c","#543208","#d97811","#0c6b40"];let u="";s.split(" ").length>1?u=s.split(" ")[0].charAt(0).toUpperCase()+s.split(" ")[1].charAt(0).toUpperCase():u=s.split(" ")[0].charAt(0).toUpperCase()+s.split(" ")[0].charAt(1).toUpperCase();let h=(s.charCodeAt(1)+s.length)%19;return o.$$set=b=>{"name"in b&&t(0,s=b.name),"side"in b&&t(1,a=b.side)},[s,a,u,l,h]}class vy extends uo{constructor(e){super(),co(this,e,Pwe,Dwe,lo,{name:0,side:1})}}function Mwe(o){let e,t,s,a,l,u,d,h,b,y,C,E,R,$,Q,F,U,K,L,te,ne,oe,G,we,ve,Re;t=new X6({props:{message:o[2]}});let Oe={};return a=new sre({props:Oe}),o[8](a),d=new vy({props:{name:o[4].name}}),R=new AD({props:{label:"Update"}}),L=new AD({props:{label:"Update"}}),{c(){e=re("div"),en(t.$$.fragment),s=Ze(),en(a.$$.fragment),l=Ze(),u=re("h3"),en(d.$$.fragment),h=Ze(),b=re("form"),y=re("div"),C=re("input"),E=Ze(),en(R.$$.fragment),$=Ze(),Q=re("form"),F=re("div"),U=re("input"),K=Ze(),en(L.$$.fragment),te=Ze(),ne=re("div"),oe=re("a"),G=Ht(`Logout from this
device`),Z(u,"class","header-small mb-5"),Z(C,"type","text"),Z(C,"class","form-control"),Z(C,"placeholder","Name"),C.required=!0,Z(y,"class","input-group mb-3"),Z(U,"type","email"),Z(U,"class","form-control"),Z(U,"placeholder","Email"),U.required=!0,Z(F,"class","input-group mb-3"),Z(oe,"class","list-group-item list-group-item-action"),Z(oe,"href",o[5].lucentUrl+"/logout"),Z(ne,"class","list-group"),Z(e,"class","wrapper-tiny")},m(ce,Xe){Te(ce,e,Xe),Kt(t,e,null),X(e,s),Kt(a,e,null),X(e,l),X(e,u),Kt(d,u,null),X(e,h),X(e,b),X(b,y),X(y,C),ar(C,o[0]),X(y,E),Kt(R,y,null),X(e,$),X(e,Q),X(Q,F),X(F,U),ar(U,o[1]),X(F,K),Kt(L,F,null),X(e,te),X(e,ne),X(ne,oe),X(oe,G),we=!0,ve||(Re=[mn(C,"input",o[9]),mn(b,"submit",o[6]),mn(U,"input",o[10]),mn(Q,"submit",o[7])],ve=!0)},p(ce,[Xe]){const tt={};Xe&4&&(tt.message=ce[2]),t.$set(tt);const ot={};a.$set(ot),Xe&1&&C.value!==ce[0]&&ar(C,ce[0]),Xe&2&&U.value!==ce[1]&&ar(U,ce[1])},i(ce){we||(xe(t.$$.fragment,ce),xe(a.$$.fragment,ce),xe(d.$$.fragment,ce),xe(R.$$.fragment,ce),xe(L.$$.fragment,ce),we=!0)},o(ce){Be(t.$$.fragment,ce),Be(a.$$.fragment,ce),Be(d.$$.fragment,ce),Be(R.$$.fragment,ce),Be(L.$$.fragment,ce),we=!1},d(ce){ce&&ke(e),Jt(t),o[8](null),Jt(a),Jt(d),Jt(R),Jt(L),ve=!1,vi(Re)}}}function Rwe(o,e,t){const s=Ur("user"),a=Ur("channel");let l=s.name,u=s.email,d="",h;function b($){$.preventDefault(),t(2,d=""),axios.post(a.lucentUrl+"/account/update-name",{name:l}).then(Q=>{h.show()}).catch(Q=>{var F;t(2,d=(F=Q.response)==null?void 0:F.data.error),console.log({errorMessage:d})})}function y($){$.preventDefault(),t(2,d=""),axios.post(a.lucentUrl+"/account/update-email",{email:u}).then(Q=>{h.show()}).catch(Q=>{var F;t(2,d=(F=Q.response)==null?void 0:F.data.error),console.log({errorMessage:d})})}function C($){Ro[$?"unshift":"push"](()=>{h=$,t(3,h)})}function E(){l=this.value,t(0,l)}function R(){u=this.value,t(1,u)}return[l,u,d,h,s,a,b,y,C,E,R]}class $we extends uo{constructor(e){super(),co(this,e,Rwe,Mwe,lo,{})}}function Nwe(o){let e,t,s,a=o[3].name+"",l,u,d,h,b,y;const C=[{title:o[0]},o[2]];var E=o[4][o[1]];function R($){let Q={};for(let F=0;F<C.length;F+=1)Q=Y6(Q,C[F]);return{props:Q}}return E&&(b=EC(E,R())),{c(){e=re("div"),t=re("h1"),s=re("a"),l=Ht(a),d=Ze(),h=re("div"),b&&en(b.$$.fragment),Z(s,"class","text-decoration-none"),Z(s,"href",u=o[3].lucentUrl),Z(e,"class","text-center")},m($,Q){Te($,e,Q),X(e,t),X(t,s),X(s,l),Te($,d,Q),Te($,h,Q),b&&Kt(b,h,null),y=!0},p($,[Q]){(!y||Q&8)&&a!==(a=$[3].name+"")&&Qn(l,a),(!y||Q&8&&u!==(u=$[3].lucentUrl))&&Z(s,"href",u);const F=Q&5?Gz(C,[Q&1&&{title:$[0]},Q&4&&Kz($[2])]):{};if(Q&2&&E!==(E=$[4][$[1]])){if(b){mo();const U=b;Be(U.$$.fragment,1,0,()=>{Jt(U,1)}),go()}E?(b=EC(E,R()),en(b.$$.fragment),xe(b.$$.fragment,1),Kt(b,h,null)):b=null}else E&&b.$set(F)},i($){y||(b&&xe(b.$$.fragment,$),y=!0)},o($){b&&Be(b.$$.fragment,$),y=!1},d($){$&&ke(e),$&&ke(d),$&&ke(h),b&&Jt(b)}}}function Iwe(o,e,t){const s={register:Owe,login:Cwe,verify:Awe,profile:$we};let{title:a}=e,{view:l}=e,{user:u}=e,{data:d}=e,{channel:h}=e;return dD("channel",h),dD("user",u),o.$$set=b=>{"title"in b&&t(0,a=b.title),"view"in b&&t(1,l=b.view),"user"in b&&t(5,u=b.user),"data"in b&&t(2,d=b.data),"channel"in b&&t(3,h=b.channel)},[a,l,d,h,s,u]}class Bwe extends uo{constructor(e){super(),co(this,e,Iwe,Nwe,lo,{title:0,view:1,user:5,data:2,channel:3})}}var Lc={exports:{}};/**
2023-11-17 20:21:45 +02:00
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2023-11-20 13:56:20 +02:00
*/(function(o,e){(function(){var t,s="4.17.21",a=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",d="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",b=500,y="__lodash_placeholder__",C=1,E=2,R=4,$=1,Q=2,F=1,U=2,K=4,L=8,te=16,ne=32,oe=64,G=128,we=256,ve=512,Re=30,Oe="...",ce=800,Xe=16,tt=1,ot=2,V=3,ut=1/0,Qe=9007199254740991,Bt=17976931348623157e292,Ct=0/0,He=4294967295,st=He-1,rn=He>>>1,Et=[["ary",G],["bind",F],["bindKey",U],["curry",L],["curryRight",te],["flip",ve],["partial",ne],["partialRight",oe],["rearg",we]],Cn="[object Arguments]",je="[object Array]",mt="[object AsyncFunction]",he="[object Boolean]",Zo="[object Date]",Kn="[object DOMException]",so="[object Error]",Yo="[object Function]",as="[object GeneratorFunction]",kt="[object Map]",jt="[object Number]",pt="[object Null]",Ne="[object Object]",Gt="[object Promise]",bn="[object Proxy]",At="[object RegExp]",An="[object Set]",zn="[object String]",ps="[object Symbol]",oo="[object Undefined]",Ss="[object WeakMap]",Mr="[object WeakSet]",$s="[object ArrayBuffer]",tr="[object DataView]",Xs="[object Float32Array]",wa="[object Float64Array]",dr="[object Int8Array]",Ns="[object Int16Array]",qr="[object Int32Array]",$o="[object Uint8Array]",Po="[object Uint8ClampedArray]",Rr="[object Uint16Array]",Ls="[object Uint32Array]",aa=/\b__p \+= '';/g,bs=/\b(__p \+=) '' \+/g,_a=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ln=/&(?:amp|lt|gt|quot|#39);/g,vs=/[&<>"']/g,Qi=RegExp(ln.source),ze=RegExp(vs.source),et=/<%-([\s\S]+?)%>/g,Tt=/<%([\s\S]+?)%>/g,Wt=/<%=([\s\S]+?)%>/g,Yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,po=/^\w*$/,wo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,un=/[\\^$.*+?()[\]{}|]/g,os=RegExp(un.source),xo=/^\s+/,fs=/\s/,kr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Lr=/\{\n\/\* \[wrapped with (.+)\] \*/,Vs=/,? & /,Yr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Zi=/[()=,{}\[\]\/\s]/,Qa=/\\(\\)?/g,Oi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ge=/\w*$/,qe=/^[-+]0x[0-9a-f]+$/i,Nt=/^0b[01]+$/i,Ut=/^\[object .+?Constructor\]$/,bo=/^0o[0-7]+$/i,Lo=/^(?:0|[1-9]\d*)$/,Go=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ei=/($^)/,lt=/['\n\r\u2028\u2029\\]/g,Xo="\\ud800-\\udfff",Ni="\\u0300-\\u036f",la="\\ufe20-\\ufe2f",ma="\\u20d0-\\u20ff",gr=Ni+la+ma,Fc="\\u2700-\\u27bf",Cc="a-z\\xdf-\\xf6\\xf8-\\xff",nl="\\xac\\xb1\\xd7\\xf7",ga="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",nr="\\u2000-\\u206f",Ar=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ki="A-Z\\xc0-\\xd6\\xd8-\\xde",gl="\\ufe0e\\ufe0f",kc=nl+ga+nr+Ar,nu="['\u2019]",xu="["+Xo+"]",yr="["+kc+"]",ol="["+gr+"]",Tu="\\d+",ou="["+Fc+"]",Yl="["+Cc+"]",Aa="[^"+Xo+kc+Tu+Fc+Cc+Ki+"]",Dr="\\ud83c[\\udffb-\\udfff]",Qm="(?:"+ol+"|"+Dr+")",xf="[^"+Xo+"]",xr="(?:\\ud83c[\\udde6-\\uddff]){2}",Za="[\\ud800-\\udbff][\\udc00-\\udfff]",ca="["+Ki+"]",Ji="\\u200d",Eu="(?:"+Yl+"|"+Aa+")",Qc="(?:"+ca+"|"+Aa+")",Ha="(?:"+nu+"(?:d|ll|m|re|s|t|ve))?",Zc="(?:"+nu+"(?:D|LL|M|RE|S|T|VE))?",xc=Qm+"?",Cd="["+gl+"]?",Yf="(?:"+Ji+"(?:"+[xf,xr,Za].join("|")+")"+Cd+xc+")*",Au="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Xl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Hc=Cd+xc+Yf,Tf="(?:"+[ou,xr,Za].join("|")+")"+Hc,su="(?:"+[xf+ol+"?",ol,xr,Za,xu].join("|")+")",kd=RegExp(nu,"g"),De=RegExp(ol,"g"),nt=RegExp(Dr+"(?="+Dr+")|"+su+Hc,"g"),bt=RegExp([ca+"?"+Yl+"+"+Ha+"(?="+[yr,ca,"$"].join("|")+")",Qc+"+"+Zc+"(?="+[yr,ca+Eu,"$"].join("|")+")",ca+"?"+Eu+"+"+Ha,ca+"+"+Zc,Xl,Au,Tu,Tf].join("|"),"g"),$t=RegExp("["+Ji+Xo+gr+gl+"]"),On=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Mo=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeou
2023-11-17 20:21:45 +02:00
/* [wrapped with `+A+`] */
2023-11-20 13:56:20 +02:00
`)}function My(S){return Sr(S)||dm(S)||!!(Ed&&S&&S[Ed])}function lm(S,A){var H=typeof S;return A=A==null?Qe:A,!!A&&(H=="number"||H!="symbol"&&Lo.test(S))&&S>-1&&S%1==0&&S<A}function lf(S,A,H){if(!Ol(H))return!1;var le=typeof A;return(le=="number"?bu(H)&&lm(A,H.length):le=="string"&&A in H)?Zr(H[A],S):!1}function Oh(S,A){if(Sr(S))return!1;var H=typeof S;return H=="number"||H=="symbol"||H=="boolean"||S==null||al(S)?!0:po.test(S)||!Yn.test(S)||A!=null&&S in wi(A)}function rp(S){var A=typeof S;return A=="string"||A=="number"||A=="symbol"||A=="boolean"?S!=="__proto__":S===null}function yh(S){var A=Fd(S),H=Ae[A];if(typeof H!="function"||!(A in hi.prototype))return!1;if(S===H)return!0;var le=Ld(H);return!!le&&S===le[0]}function g0(S){return!!dc&&dc in S}var Lf=Da?hm:gm;function ip(S){var A=S&&S.constructor,H=typeof A=="function"&&A.prototype||il;return S===H}function Ry(S){return S===S&&!Ol(S)}function qp(S,A){return function(H){return H==null?!1:H[S]===A&&(A!==t||S in wi(H))}}function rd(S){var A=A0(S,function(le){return H.size===b&&H.clear(),le}),H=A.cache;return A}function $y(S,A){var H=S[1],le=A[1],Ce=H|le,We=Ce<(F|U|G),ht=le==G&&H==L||le==G&&H==we&&S[7].length<=A[8]||le==(G|we)&&A[7].length<=A[8]&&H==L;if(!(We||ht))return S;le&F&&(S[2]=A[2],Ce|=H&F?0:K);var St=A[3];if(St){var zt=S[3];S[3]=zt?ep(zt,St,A[4]):St,S[4]=zt?zc(S[3],y):A[4]}return St=A[5],St&&(zt=S[5],S[5]=zt?og(zt,St,A[6]):St,S[6]=zt?zc(S[5],y):A[6]),St=A[7],St&&(S[7]=St),le&G&&(S[8]=S[8]==null?A[8]:Tr(S[8],A[8])),S[9]==null&&(S[9]=A[9]),S[0]=A[0],S[1]=Ce,S}function wh(S){var A=[];if(S!=null)for(var H in wi(S))A.push(H);return A}function Qv(S){return Jh.call(S)}function n_(S,A,H){return A=vo(A===t?S.length-1:A,0),function(){for(var le=arguments,Ce=-1,We=vo(le.length-A,0),ht=an(We);++Ce<We;)ht[Ce]=le[A+Ce];Ce=-1;for(var St=an(A+1);++Ce<A;)St[Ce]=le[Ce];return St[A]=H(ht),ri(S,this,St)}}function Ny(S,A){return A.length<2?S:Hl(S,Ps(A,0,-1))}function ap(S,A){for(var H=S.length,le=Tr(A.length,H),Ce=du(S);le--;){var We=A[le];S[le]=lm(We,H)?Ce[We]:t}return S}function Ff(S,A){if(!(A==="constructor"&&typeof S[A]=="function")&&A!="__proto__")return S[A]}var mu=p0(uu),lp=ue||function(S,A){return me.setTimeout(S,A)},Iy=p0(Xp);function o_(S,A,H){var le=A+"";return Iy(S,XC(le,cm(sp(le),H)))}function p0(S){var A=0,H=0;return function(){var le=Gl(),Ce=Xe-(le-H);if(H=le,Ce>0){if(++A>=ce)return arguments[0]}else A=0;return S.apply(t,arguments)}}function Yc(S,A){var H=-1,le=S.length,Ce=le-1;for(A=A===t?le:A;++H<A;){var We=Nf(H,Ce),ht=S[We];S[We]=S[H],S[H]=ht}return S.length=A,S}var b0=rd(function(S){var A=[];return S.charCodeAt(0)===46&&A.push(""),S.replace(wo,function(H,le,Ce,We){A.push(Ce?We.replace(Qa,"$1"):le||H)}),A});function cf(S){if(typeof S=="string"||al(S))return S;var A=S+"";return A=="0"&&1/S==-ut?"-0":A}function cp(S){if(S!=null){try{return tf.call(S)}catch{}try{return S+""}catch{}}return""}function cm(S,A){return ks(Et,function(H){var le="_."+H[0];A&H[1]&&!Ii(S,le)&&S.push(le)}),S.sort()}function Zv(S){if(S instanceof hi)return S.clone();var A=new $u(S.__wrapped__,S.__chain__);return A.__actions__=du(S.__actions__),A.__index__=S.__index__,A.__values__=S.__values__,A}function s_(S,A,H){(H?lf(S,A,H):A===t)?A=1:A=vo(jr(A),0);var le=S==null?0:S.length;if(!le||A<1)return[];for(var Ce=0,We=0,ht=an(Se(le/A));Ce<le;)ht[We++]=Ps(S,Ce,Ce+=A);return ht}function Gp(S){for(var A=-1,H=S==null?0:S.length,le=0,Ce=[];++A<H;){var We=S[A];We&&(Ce[le++]=We)}return Ce}function By(){var S=arguments.length;if(!S)return[];for(var A=an(S-1),H=arguments[0],le=S;le--;)A[le-1]=arguments[le];return jf(Sr(H)?du(H):[H],Ua(A,1))}var up=hr(function(S,A){return Dl(S)?Wa(S,Ua(A,1,Dl,!0)):[]}),v0=hr(function(S,A){var H=_h(A);return Dl(H)&&(H=t),Dl(S)?Wa(S,Ua(A,1,Dl,!0),Qs(H,2)):[]}),sb=hr(function(S,A){var H=_h(A);return Dl(H)&&(H=t),Dl(S)?Wa(S,Ua(A,1,Dl,!0),t,H):[]});function Ly(S,A,H){var le=S==null?0:S.length;return le?(A=H||A===t?1:jr(A),Ps(S,A<0?0:A,le)):[]}function Fy(S,A,H){var le=S==null?0:S.length;return le?(A=H||A===t?1:jr(A),A=le-A,Ps(S,0,A<0?0:A)):[]}function r_(S,A){return S&&S.length?om(S
2023-11-17 20:21:45 +02:00
`;S.replace(Fo,function(Zs,gi,ki,Ou,Zu,Zf){return ki||(ki=Ou),Vn+=S.slice(vn,Zf).replace(lt,Ql),gi&&(St=!0,Vn+=`' +
__e(`+gi+`) +
2023-11-20 13:52:33 +02:00
'`),Zu&&(zt=!0,Vn+=`';
2023-11-17 20:21:45 +02:00
`+Zu+`;
__p += '`),ki&&(Vn+=`' +
((__t = (`+ki+`)) == null ? '' : __t) +
'`),vn=Zf+Zs.length,Zs}),Vn+=`';
`;var Is=ii.call(A,"variable")&&A.variable;if(!Is)Vn=`with (obj) {
`+Vn+`
}
2023-11-20 13:52:33 +02:00
`;else if(Zi.test(Is))throw new or(d);Vn=(zt?Vn.replace(aa,""):Vn).replace(bs,"$1").replace(_a,"$1;"),Vn="function("+(Is||"obj")+`) {
2023-11-17 20:21:45 +02:00
`+(Is?"":`obj || (obj = {});
2023-11-20 13:52:33 +02:00
`)+"var __t, __p = ''"+(St?", __e = _.escape":"")+(zt?`, __j = Array.prototype.join;
2023-11-17 20:21:45 +02:00
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Vn+`return __p
2023-11-20 13:56:20 +02:00
}`;var Hr=b2(function(){return Xr(We,ms+"return "+Vn).apply(t,ht)});if(Hr.source=Vn,r2(Hr))throw Hr;return Hr}function g2(S){return fa(S).toLowerCase()}function p2(S){return fa(S).toUpperCase()}function Sk(S,A,H){if(S=fa(S),S&&(H||A===t))return Fl(S);if(!S||!(A=Gi(A)))return S;var le=jl(S),Ce=jl(A),We=fc(le,Ce),ht=Kf(le,Ce)+1;return mh(le,We,ht).join("")}function Ck(S,A,H){if(S=fa(S),S&&(H||A===t))return S.slice(0,zg(S)+1);if(!S||!(A=Gi(A)))return S;var le=jl(S),Ce=Kf(le,jl(A))+1;return mh(le,0,Ce).join("")}function lO(S,A,H){if(S=fa(S),S&&(H||A===t))return S.replace(xo,"");if(!S||!(A=Gi(A)))return S;var le=jl(S),Ce=fc(le,jl(A));return mh(le,Ce).join("")}function z_(S,A){var H=Re,le=Oe;if(Ol(A)){var Ce="separator"in A?A.separator:Ce;H="length"in A?jr(A.length):H,le="omission"in A?Gi(A.omission):le}S=fa(S);var We=S.length;if(rl(S)){var ht=jl(S);We=ht.length}if(H>=We)return S;var St=H-Jf(le);if(St<1)return le;var zt=ht?mh(ht,0,St).join(""):S.slice(0,St);if(Ce===t)return zt+le;if(ht&&(St+=zt.length-St),gf(Ce)){if(S.slice(St).search(Ce)){var vn,Zn=zt;for(Ce.global||(Ce=oh(Ce.source,fa(Ge.exec(Ce))+"g")),Ce.lastIndex=0;vn=Ce.exec(Zn);)var Vn=vn.index;zt=zt.slice(0,Vn===t?St:Vn)}}else if(S.indexOf(Gi(Ce),St)!=St){var Fo=zt.lastIndexOf(Ce);Fo>-1&&(zt=zt.slice(0,Fo))}return zt+le}function cO(S){return S=fa(S),S&&Qi.test(S)?S.replace(ln,Ke):S}var N0=ph(function(S,A,H){return S+(H?" ":"")+A.toUpperCase()}),bb=$v("toUpperCase");function uO(S,A,H){return S=fa(S),A=H?t:A,A===t?Df(S)?Vg(S):eh(S):S.match(A)||[]}var b2=hr(function(S,A){try{return ri(S,t,A)}catch(H){return r2(H)?H:new or(H)}}),V_=Bd(function(S,A){return ks(A,function(H){H=cf(H),mi(S,H,Jy(S[H],S))}),S});function v2(S){var A=S==null?0:S.length,H=Qs();return S=A?pa(S,function(le){if(typeof le[1]!="function")throw new Sa(u);return[H(le[0]),le[1]]}):[],hr(function(le){for(var Ce=-1;++Ce<A;){var We=S[Ce];if(ri(We[0],this,le))return ri(We[1],this,le)}})}function kk(S){return Rd(Es(S,C))}function fO(S){return function(){return S}}function I0(S,A){return S==null||S!==S?A:S}var xk=Iv(),dO=Iv(!0);function bf(S){return S}function hO(S){return z(typeof S=="function"?S:Es(S,C))}function W_(S){return Ft(Es(S,C))}function mO(S,A){return Sn(S,Es(A,C))}var Tk=hr(function(S,A){return function(H){return hc(H,S,A)}}),B0=hr(function(S,A){return function(H){return hc(S,H,A)}});function O2(S,A,H){var le=oc(A),Ce=Yp(A,le);H==null&&!(Ol(A)&&(Ce.length||!le.length))&&(H=A,A=S,S=this,Ce=Yp(A,oc(A)));var We=!(Ol(H)&&"chain"in H)||!!H.chain,ht=hm(S);return ks(Ce,function(St){var zt=A[St];S[St]=zt,ht&&(S.prototype[St]=function(){var vn=this.__chain__;if(We||vn){var Zn=S(this.__wrapped__),Vn=Zn.__actions__=du(this.__actions__);return Vn.push({func:zt,args:arguments,thisArg:S}),Zn.__chain__=vn,Zn}return zt.apply(S,jf([this.value()],arguments))})}),S}function Ek(){return me._===this&&(me._=sh),this}function gO(){}function yl(S){return S=jr(S),hr(function(A){return ts(A,S)})}var Ak=nb(pa),vb=nb(Pi),Dk=nb(Ku);function Ob(S){return Oh(S)?sl(cf(S)):Uc(S)}function y2(S){return function(A){return S==null?t:Hl(S,A)}}var Pk=Bv(),Mk=Bv(!0);function L0(){return[]}function gm(){return!1}function yb(){return{}}function vu(){return""}function a1(){return!0}function U_(S,A){if(S=jr(S),S<1||S>Qe)return[];var H=He,le=Tr(S,He);A=Qs(A),S-=He;for(var Ce=Pr(le,A);++H<S;)A(H);return Ce}function Y_(S){return Sr(S)?pa(S,cf):al(S)?[S]:du(b0(fa(S)))}function w2(S){var A=++Mu;return fa(S)+A}var _2=bh(function(S,A){return S+A},0),S2=ob("ceil"),Rk=bh(function(S,A){return S/A},1),F0=ob("floor");function pO(S){return S&&S.length?Kr(S,bf,fh):t}function bp(S,A){return S&&S.length?Kr(S,Qs(A,2),fh):t}function Q0(S){return kl(S,bf)}function Ah(S,A){return kl(S,Qs(A,2))}function $k(S){return S&&S.length?Kr(S,bf,Pe):t}function pm(S,A){return S&&S.length?Kr(S,Qs(A,2),Pe):t}var Hd=bh(function(S,A){return S*A},1),wb=ob("round"),C2=bh(function(S,A){return S-A},0);function _b(S){return S&&S.length?Af(S,bf):0}function Og(S,A){return S&&S.length?Af(S,Qs(A,2)):0}return Ae.after=fm,Ae.ary=Vt,Ae.assign=ak,Ae.assignIn=eO,Ae.assignInWith=tO,Ae.assignW
2023-11-17 20:21:45 +02:00
* mustache.js - Logic-less {{mustache}} templates with JavaScript
* http://github.com/janl/mustache.js
2023-11-20 13:56:20 +02:00
*/var Kwe=Object.prototype.toString,jD=Array.isArray||function(e){return Kwe.call(e)==="[object Array]"};function rre(o){return typeof o=="function"}function Jwe(o){return jD(o)?"array":typeof o}function gne(o){return o.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Rle(o,e){return o!=null&&typeof o=="object"&&e in o}function e_e(o,e){return o!=null&&typeof o!="object"&&o.hasOwnProperty&&o.hasOwnProperty(e)}var t_e=RegExp.prototype.test;function n_e(o,e){return t_e.call(o,e)}var o_e=/\S/;function s_e(o){return!n_e(o_e,o)}var r_e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function i_e(o){return String(o).replace(/[&<>"'`=\/]/g,function(t){return r_e[t]})}var a_e=/\s*/,l_e=/\s+/,$le=/\s*=/,c_e=/\s*\}/,u_e=/#|\^|\/|>|\{|&|=|!/;function f_e(o,e){if(!o)return[];var t=!1,s=[],a=[],l=[],u=!1,d=!1,h="",b=0;function y(){if(u&&!d)for(;l.length;)delete a[l.pop()];else l=[];u=!1,d=!1}var C,E,R;function $(we){if(typeof we=="string"&&(we=we.split(l_e,2)),!jD(we)||we.length!==2)throw new Error("Invalid tags: "+we);C=new RegExp(gne(we[0])+"\\s*"),E=new RegExp("\\s*"+gne(we[1])),R=new RegExp("\\s*"+gne("}"+we[1]))}$(e||Zp.tags);for(var Q=new j6(o),F,U,K,L,te,ne;!Q.eos();){if(F=Q.pos,K=Q.scanUntil(C),K)for(var oe=0,G=K.length;oe<G;++oe)L=K.charAt(oe),s_e(L)?(l.push(a.length),h+=L):(d=!0,t=!0,h+=" "),a.push(["text",L,F,F+1]),F+=1,L===`
`&&(y(),h="",b=0,t=!1);if(!Q.scan(C))break;if(u=!0,U=Q.scan(u_e)||"name",Q.scan(a_e),U==="="?(K=Q.scanUntil($le),Q.scan($le),Q.scanUntil(E)):U==="{"?(K=Q.scanUntil(R),Q.scan(c_e),Q.scanUntil(E),U="&"):K=Q.scanUntil(E),!Q.scan(E))throw new Error("Unclosed tag at "+Q.pos);if(U==">"?te=[U,K,F,Q.pos,h,b,t]:te=[U,K,F,Q.pos],b++,a.push(te),U==="#"||U==="^")s.push(te);else if(U==="/"){if(ne=s.pop(),!ne)throw new Error('Unopened section "'+K+'" at '+F);if(ne[1]!==K)throw new Error('Unclosed section "'+ne[1]+'" at '+F)}else U==="name"||U==="{"||U==="&"?d=!0:U==="="&&$(K)}if(y(),ne=s.pop(),ne)throw new Error('Unclosed section "'+ne[1]+'" at '+Q.pos);return h_e(d_e(a))}function d_e(o){for(var e=[],t,s,a=0,l=o.length;a<l;++a)t=o[a],t&&(t[0]==="text"&&s&&s[0]==="text"?(s[1]+=t[1],s[3]=t[3]):(e.push(t),s=t));return e}function h_e(o){for(var e=[],t=e,s=[],a,l,u=0,d=o.length;u<d;++u)switch(a=o[u],a[0]){case"#":case"^":t.push(a),s.push(a),t=a[4]=[];break;case"/":l=s.pop(),l[5]=a[2],t=s.length>0?s[s.length-1][4]:e;break;default:t.push(a)}return e}function j6(o){this.string=o,this.tail=o,this.pos=0}j6.prototype.eos=function(){return this.tail===""};j6.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var s=t[0];return this.tail=this.tail.substring(s.length),this.pos+=s.length,s};j6.prototype.scanUntil=function(e){var t=this.tail.search(e),s;switch(t){case-1:s=this.tail,this.tail="";break;case 0:s="";break;default:s=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=s.length,s};function DD(o,e){this.view=o,this.cache={".":this.view},this.parent=e}DD.prototype.push=function(e){return new DD(e,this)};DD.prototype.lookup=function(e){var t=this.cache,s;if(t.hasOwnProperty(e))s=t[e];else{for(var a=this,l,u,d,h=!1;a;){if(e.indexOf(".")>0)for(l=a.view,u=e.split("."),d=0;l!=null&&d<u.length;)d===u.length-1&&(h=Rle(l,u[d])||e_e(l,u[d])),l=l[u[d++]];else l=a.view[e],h=Rle(a.view,e);if(h){s=l;break}a=a.parent}t[e]=s}return rre(s)&&(s=s.call(this.view)),s};function Qg(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Qg.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};Qg.prototype.parse=function(e,t){var s=this.templateCache,a=e+":"+(t||Zp.tags).join(":"),l=typeof s<"u",u=l?s.get(a):void 0;return u==null&&(u=f_e(e,t),l&&s.set(a,u)),u};Qg.prototype.render=function(e,t,s,a){var l=this.getConfigTags(a),u=this.parse(e,l),d=t instanceof DD?t:new DD(t,void 0);return this.renderTokens(u,d,s,e,a)};Qg.prototype.renderTokens=function(e,t,s,a,l){for(var u="",d,h,b,y=0,C=e.length;y<C;++y)b=void 0,d=e[y],h=d[0],h==="#"?b=this.renderSection(d,t,s,a,l):h==="^"?b=this.renderInverted(d,t,s,a,l):h===">"?b=this.renderPartial(d,t,s,l):h==="&"?b=this.unescapedValue(d,t):h==="name"?b=this.escapedValue(d,t,l):h==="text"&&(b=this.rawValue(d)),b!==void 0&&(u+=b);return u};Qg.prototype.renderSection=function(e,t,s,a,l){var u=this,d="",h=t.lookup(e[1]);function b(E){return u.render(E,t,s,l)}if(!!h){if(jD(h))for(var y=0,C=h.length;y<C;++y)d+=this.renderTokens(e[4],t.push(h[y]),s,a,l);else if(typeof h=="object"||typeof h=="string"||typeof h=="number")d+=this.renderTokens(e[4],t.push(h),s,a,l);else if(rre(h)){if(typeof a!="string")throw new Error("Cannot use higher-order sections without the original template");h=h.call(t.view,a.slice(e[3],e[5]),b),h!=null&&(d+=h)}else d+=this.renderTokens(e[4],t,s,a,l);return d}};Qg.prototype.renderInverted=function(e,t,s,a,l){var u=t.lookup(e[1]);if(!u||jD(u)&&u.length===0)return this.renderTokens(e[4],t,s,a,l)};Qg.prototype.indentPartial=function(e,t,s){for(var a=t.replace(/[^ \t]/g,""),l=e.split(`
2023-11-17 20:21:45 +02:00
`),u=0;u<l.length;u++)l[u].length&&(u>0||!s)&&(l[u]=a+l[u]);return l.join(`
2023-11-20 13:56:20 +02:00
`)};Qg.prototype.renderPartial=function(e,t,s,a){if(!!s){var l=this.getConfigTags(a),u=rre(s)?s(e[1]):s[e[1]];if(u!=null){var d=e[6],h=e[5],b=e[4],y=u;h==0&&b&&(y=this.indentPartial(u,b,d));var C=this.parse(y,l);return this.renderTokens(C,t,s,y,a)}}};Qg.prototype.unescapedValue=function(e,t){var s=t.lookup(e[1]);if(s!=null)return s};Qg.prototype.escapedValue=function(e,t,s){var a=this.getConfigEscape(s)||Zp.escape,l=t.lookup(e[1]);if(l!=null)return typeof l=="number"&&a===Zp.escape?String(l):a(l)};Qg.prototype.rawValue=function(e){return e[1]};Qg.prototype.getConfigTags=function(e){return jD(e)?e:e&&typeof e=="object"?e.tags:void 0};Qg.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!jD(e))return e.escape};var Zp={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(o){w6.templateCache=o},get templateCache(){return w6.templateCache}},w6=new Qg;Zp.clearCache=function(){return w6.clearCache()};Zp.parse=function(e,t){return w6.parse(e,t)};Zp.render=function(e,t,s,a){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+Jwe(e)+'" was given as the first argument for mustache#render(template, view, partials)');return w6.render(e,t,s,a)};Zp.escape=i_e;Zp.Scanner=j6;Zp.Context=DD;Zp.Writer=Qg;function nz(o){return nz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nz(o)}function hE(o){if(o===null||o===!0||o===!1)return NaN;var e=Number(o);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Sc(o,e){if(e.length<o)throw new TypeError(o+" argument"+(o>1?"s":"")+" required, but only "+e.length+" present")}function cc(o){Sc(1,arguments);var e=Object.prototype.toString.call(o);return o instanceof Date||nz(o)==="object"&&e==="[object Date]"?new Date(o.getTime()):typeof o=="number"||e==="[object Number]"?new Date(o):((typeof o=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function m_e(o,e){Sc(2,arguments);var t=cc(o).getTime(),s=hE(e);return new Date(t+s)}var g_e={};function q6(){return g_e}function Noe(o){var e=new Date(Date.UTC(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()));return e.setUTCFullYear(o.getFullYear()),o.getTime()-e.getTime()}function kH(o,e){Sc(2,arguments);var t=cc(o),s=cc(e),a=t.getTime()-s.getTime();return a<0?-1:a>0?1:a}function p_e(o){return Sc(1,arguments),o instanceof Date||nz(o)==="object"&&Object.prototype.toString.call(o)==="[object Date]"}function b_e(o){if(Sc(1,arguments),!p_e(o)&&typeof o!="number")return!1;var e=cc(o);return!isNaN(Number(e))}function v_e(o,e){Sc(2,arguments);var t=cc(o),s=cc(e),a=t.getFullYear()-s.getFullYear(),l=t.getMonth()-s.getMonth();return a*12+l}function O_e(o,e){return Sc(2,arguments),cc(o).getTime()-cc(e).getTime()}var Nle={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},y_e="trunc";function w_e(o){return o?Nle[o]:Nle[y_e]}function __e(o){Sc(1,arguments);var e=cc(o);return e.setHours(23,59,59,999),e}function S_e(o){Sc(1,arguments);var e=cc(o),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e}function C_e(o){Sc(1,arguments);var e=cc(o);return __e(e).getTime()===S_e(e).getTime()}function k_e(o,e){Sc(2,arguments);var t=cc(o),s=cc(e),a=kH(t,s),l=Math.abs(v_e(t,s)),u;if(l<1)u=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-a*l);var d=kH(t,s)===-a;C_e(cc(o))&&l===1&&kH(o,s)===1&&(d=!1),u=a*(l-Number(d))}return u===0?0:u}function x_e(o,e,t){Sc(2,arguments);var s=O_e(o,e)/1e3;return w_e(t==null?v
2023-11-20 13:52:33 +02:00
Save`),Z(t,"class","spinner-border spinner-border-sm"),Z(t,"role","status"),Z(t,"aria-hidden","true"),e.disabled=a=!o[6],Z(e,"class","ms-2 btn btn-primary btn-spinner")},m(d,h){Te(d,e,h),X(e,t),X(e,s),l||(u=mn(e,"click",o[11]),l=!0)},p(d,h){h&64&&a!==(a=!d[6])&&(e.disabled=a)},d(d){d&&ke(e),l=!1,u()}}}function RCe(o){let e,t,s;return{c(){e=re("button"),e.innerHTML=`<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
2023-11-20 13:56:20 +02:00
Add`,Z(e,"class","ms-2 btn btn-primary btn-spinner")},m(a,l){Te(a,e,l),t||(s=mn(e,"click",o[11]),t=!0)},p:fn,d(a){a&&ke(e),t=!1,s()}}}function $Ce(o){let e,t,s,a,l,u,d,h,b,y=[],C=new Map,E,R,$,Q,F,U,K,L,te;t=new X6({props:{message:o[7]}});function ne(Xe){o[12](Xe)}let oe={schema:o[2],isCreateMode:o[3],record:o[0]};o[5]!==void 0&&(oe.active=o[5]),l=new Upe({props:oe}),Ro.push(()=>er(l,"active",ne)),h=new Wpe({props:{record:o[0],schema:o[2]}});let G=o[8];const we=Xe=>Xe[23].name;for(let Xe=0;Xe<G.length;Xe+=1){let tt=Cce(o,G,Xe),ot=we(tt);C.set(ot,y[Xe]=xce(ot,tt))}let ve=o[2].hasDrafts&&Tce(o);function Re(Xe,tt){return Xe[3]?RCe:MCe}let Oe=Re(o),ce=Oe(o);return{c(){e=re("div"),en(t.$$.fragment),s=Ze(),a=re("div"),en(l.$$.fragment),d=Ze(),en(h.$$.fragment),b=Ze();for(let Xe=0;Xe<y.length;Xe+=1)y[Xe].c();E=Ze(),R=re("div"),$=re("div"),ve&&ve.c(),Q=Ze(),ce.c(),F=Ze(),U=re("button"),U.textContent="cancel",Z(a,"class","mt-1"),Z(U,"class","ms-2 btn btn-link"),Z($,"class","d-flex mt-3 align-items-center justify-content-center"),Z(e,"class","inline-edit my-4 svelte-sl11hx")},m(Xe,tt){Te(Xe,e,tt),Kt(t,e,null),X(e,s),X(e,a),Kt(l,a,null),X(a,d),Kt(h,a,null),X(a,b);for(let ot=0;ot<y.length;ot+=1)y[ot]&&y[ot].m(a,null);X(e,E),X(e,R),X(R,$),ve&&ve.m($,null),X($,Q),ce.m($,null),X($,F),X($,U),K=!0,L||(te=[mn(window,"beforeunload",o[9]),mn(U,"click",o[10])],L=!0)},p(Xe,[tt]){const ot={};tt&128&&(ot.message=Xe[7]),t.$set(ot);const V={};tt&4&&(V.schema=Xe[2]),tt&8&&(V.isCreateMode=Xe[3]),tt&1&&(V.record=Xe[0]),!u&&tt&32&&(u=!0,V.active=Xe[5],lr(()=>u=!1)),l.$set(V);const ut={};tt&1&&(ut.record=Xe[0]),tt&4&&(ut.schema=Xe[2]),h.$set(ut),tt&319&&(G=Xe[8],mo(),y=Jd(y,tt,we,1,Xe,G,C,a,xv,xce,null,Cce),go()),Xe[2].hasDrafts?ve?(ve.p(Xe,tt),tt&4&&xe(ve,1)):(ve=Tce(Xe),ve.c(),xe(ve,1),ve.m($,Q)):ve&&(mo(),Be(ve,1,1,()=>{ve=null}),go()),Oe===(Oe=Re(Xe))&&ce?ce.p(Xe,tt):(ce.d(1),ce=Oe(Xe),ce&&(ce.c(),ce.m($,F)))},i(Xe){if(!K){xe(t.$$.fragment,Xe),xe(l.$$.fragment,Xe),xe(h.$$.fragment,Xe);for(let tt=0;tt<G.length;tt+=1)xe(y[tt]);xe(ve),K=!0}},o(Xe){Be(t.$$.fragment,Xe),Be(l.$$.fragment,Xe),Be(h.$$.fragment,Xe);for(let tt=0;tt<y.length;tt+=1)Be(y[tt]);Be(ve),K=!1},d(Xe){Xe&&ke(e),Jt(t),Jt(l),Jt(h);for(let tt=0;tt<y.length;tt+=1)y[tt].d();ve&&ve.d(),ce.d(),L=!1,vi(te)}}}function NCe(o,e,t){let s,a;const l=Ur("channel"),u=Fg();let{schema:d}=e,{record:h}=e,{graph:b={records:[],edges:[]}}=e,{isCreateMode:y}=e,C,E="",R=!1,$=d.fields.filter(ve=>ve.name!=="id"),Q="_default";d.fields.reduce((ve,Re)=>{var Oe;return Re.ui==="tab"?(Q=Re.name,ve):(ve[Q]=[...(Oe=ve[Q])!=null?Oe:[],Re.name],ve)},[]),W1(()=>{F()});function F(){C={data:JSON.parse(JSON.stringify(h.data)),schema:h.schema,status:h.status,_sys:JSON.parse(JSON.stringify(h._sys)),_file:JSON.parse(JSON.stringify(h._file)),edges:JSON.parse(JSON.stringify(b.edges))}}Ape(()=>{t(6,R=K())});function U(ve){return R?ve.returnValue="You have unsaved changes. Are you sure you want to exit?":(delete ve.returnValue,"...")}function K(){return y?!1:!Lc.exports.isEqual(C,{data:h.data,schema:h.schema,status:h.status,_sys:h._sys,_file:h._file,edges:b.edges})}function L(ve){ve.preventDefault(),u("cancel")}function te(ve){return ve.preventDefault(),console.log("SAVE: Attempt"),t(4,s=null),t(7,a=""),new Promise(function(Re,Oe){var ce,Xe;if(!R&&!y){Re(null);return}if(!h){Re(null);return}t(1,b.edges=(Xe=(ce=b.edges)==null?void 0:ce.filter(tt=>!tt._isTrashed&&tt.source===h.id))!=null?Xe:[],b),axios.post(l.lucentUrl+"/records",{record:h,edges:b.edges,isCreateMode:y}).then(function(tt){console.log("SAVE: SAVED INLINE"),t(0,h=tt.data.records[0]),t(1,b=tt.data),y||F(),u("inlinesaved",{records:[h]}),Re(null)}).catch(function(tt){tt.response&&(typeof tt.response.data.error=="string"?t(7,a=tt.response.data.error):t(4,s=tt.response.data.error)),Re(null)})})}function ne(ve){E=ve,t(5,E)}function oe(ve){o.$$.not_equal(h.data,ve)&&(h.data=ve,t(0,h))}function G(ve){b=ve,t(1,b)}function we(ve){o.$$.not_equal(h.status,ve)&&(h.status=ve,t(0,h))}return o.$$set=ve=>{"schema"in ve&&t(2,d=ve.schema),"record"in ve&&t(0,h=ve.recor
`),a=re("span"),a.innerHTML='<span class="visually-hidden">Loading...</span>',l=Ze(),u=re("input"),Z(a,"class","spinner-border spinner-border-sm"),Z(a,"role","status"),Z(a,"aria-hidden","true"),Z(u,"class","form-control"),Z(u,"type","file"),Z(u,"id","formFile"),u.multiple=!0,Z(u,"accept",KCe),u.disabled=o[0],u.hidden=!0,Z(t,"class","btn btn-primary btn-sm btn-spinner "),e.disabled=o[0]},m(b,y){Te(b,e,y),X(e,t),X(t,s),X(t,a),X(t,l),X(t,u),d||(h=mn(u,"input",o[1]),d=!0)},p(b,[y]){y&1&&(u.disabled=b[0]),y&1&&(e.disabled=b[0])},i:fn,o:fn,d(b){b&&ke(e),d=!1,h()}}}let KCe="";function JCe(o,e,t){const s=Fg(),a=Ur("channel");let{schema:l}=e,u=[],d=!1;function h(b){t(0,d=!0),u=b.target.files?[...b.target.files]:[];let y=new FormData;y.append("schema",l.name),Array.from(u).forEach(function(C){y.append("files[]",C)}),s("beforeUpload",u),axios.post(a.lucentUrl+"/files/upload",y,{headers:{"Content-Type":"multipart/form-data"}}).then(C=>{C.data.error?s("uploadError",C.data.error):s("uploadComplete",C.data),t(0,d=!1)}).catch(C=>{t(0,d=!1),console.log(C.response.data)})}return o.$$set=b=>{"schema"in b&&t(2,l=b.schema)},[d,h,l]}class eke extends uo{constructor(e){super(),co(this,e,JCe,GCe,lo,{schema:2})}}function Bce(o,e,t){const s=o.slice();return s[18]=e[t],s}function Lce(o,e,t){const s=o.slice();return s[18]=e[t],s}function tke(o){let e,t;return e=new Fa({props:{icon:"arrow-up-short-wide"}}),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function nke(o){let e,t;return e=new Fa({props:{icon:"arrow-down-wide-short"}}),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function Fce(o){let e,t,s,a,l,u,d,h,b,y,C,E=o[18].label+"",R,$,Q,F,U;a=new Fa({props:{icon:"arrow-up-short-wide"}});function K(...ne){return o[10](o[18],...ne)}h=new Fa({props:{icon:"arrow-down-wide-short"}});function L(...ne){return o[11](o[18],...ne)}function te(...ne){return o[12](o[18],...ne)}return{c(){e=re("div"),t=re("div"),s=re("button"),en(a.$$.fragment),u=Ze(),d=re("button"),en(h.$$.fragment),y=Ze(),C=re("button"),R=Ht(E),$=Ze(),Z(s,"title","Sort Ascending"),Z(s,"class",l="btn btn-sm "+(o[18].name==o[1].name&&!o[0].startsWith("-")?"btn-primary":"btn-outline-primary")),Z(d,"title","Sort Descending"),Z(d,"class",b="btn btn-sm "+(o[18].name==o[1].name&&o[0].startsWith("-")?"btn-primary":"btn-outline-primary")),Z(C,"title","Sort Ascending"),Z(C,"class","btn btn-sm btn-outline-primary w-100 text-nowrap"),rs(C,"overflow","hidden"),Z(t,"class","btn-group w-100"),Z(e,"class","col-4 px-3 py-1 d-flex align-items-center")},m(ne,oe){Te(ne,e,oe),X(e,t),X(t,s),Kt(a,s,null),X(t,u),X(t,d),Kt(h,d,null),X(t,y),X(t,C),X(C,R),X(e,$),Q=!0,F||(U=[mn(s,"click",K),mn(d,"click",L),mn(C,"click",te)],F=!0)},p(ne,oe){o=ne,(!Q||oe&11&&l!==(l="btn btn-sm "+(o[18].name==o[1].name&&!o[0].startsWith("-")?"btn-primary":"btn-outline-primary")))&&Z(s,"class",l),(!Q||oe&11&&b!==(b="btn btn-sm "+(o[18].name==o[1].name&&o[0].startsWith("-")?"btn-primary":"btn-outline-primary")))&&Z(d,"class",b),(!Q||oe&8)&&E!==(E=o[18].label+"")&&Qn(R,E)},i(ne){Q||(xe(a.$$.fragment,ne),xe(h.$$.fragment,ne),Q=!0)},o(ne){Be(a.$$.fragment,ne),Be(h.$$.fragment,ne),Q=!1},d(ne){ne&&ke(e),Jt(a),Jt(h),F=!1,vi(U)}}}function Qce(o){let e,t,s,a,l,u,d,h,b,y,C,E=o[18].label+"",R,$,Q,F,U;a=new Fa({props:{icon:"arrow-up-short-wide"}});function K(...ne){return o[13](o[18],...ne)}h=new Fa({props:{icon:"arrow-down-wide-short"}});function L(...ne){return o[14](o[18],...ne)}function te(...ne){return o[15](o[18],...ne)}return{c(){e=re("div"),t=re("div"),s=re("button"),en(a.$$.fragment),u=Ze(),d=re("button"),en(h.$$.fragment),y=Ze(),C=re("button"),R=Ht(E),$=Ze(),Z(s,"title","Sort Ascending"),Z(s,"class",l="btn btn-sm "+(o[18].name==o[0]?"btn-primary":"btn-outline-primary")),Z(d,"title","Sort Descending"),Z(d,"class",b="btn btn-sm "+("-"+o[18].name==o[0]?"btn-primary":"btn-outline-primary")),Z(C,"title","Sort Ascending"),Z(C,"class","btn btn-sm btn-outline-primary w-100 text
2023-11-20 13:52:33 +02:00
`),u=re("span"),h=Ht(d),b=Ht(`
2023-11-17 20:21:45 +02:00
to
2023-11-20 13:56:20 +02:00
`),y=re("span"),E=Ht(C),R=Ht(`
2023-11-17 20:21:45 +02:00
of
2023-11-20 13:52:33 +02:00
`),$=re("span"),Q=Ht(o[4]),F=Ht(`
2023-11-20 13:56:20 +02:00
total`),Z(t,"class","pagination justify-content-center"),Z(u,"class","font-medium"),Z(y,"class","font-medium"),Z($,"class","font-medium"),Z(a,"class","text-muted text-center")},m(L,te){Te(L,e,te),X(e,t),K&&K.m(t,null),Te(L,s,te),Te(L,a,te),X(a,l),X(a,u),X(u,h),X(a,b),X(a,y),X(y,E),X(a,R),X(a,$),X($,Q),X(a,F),U=!0},p(L,[te]){L[5]>1?K?(K.p(L,te),te&32&&xe(K,1)):(K=jce(L),K.c(),xe(K,1),K.m(t,null)):K&&(mo(),Be(K,1,1,()=>{K=null}),go()),(!U||te&8)&&d!==(d=+L[3]+1+"")&&Qn(h,d),(!U||te&28)&&C!==(C=(+L[3]+L[2]>L[4]?L[4]:+L[3]+L[2])+"")&&Qn(E,C),(!U||te&16)&&Qn(Q,L[4])},i(L){U||(xe(K),U=!0)},o(L){Be(K),U=!1},d(L){L&&ke(e),K&&K.d(),L&&ke(s),L&&ke(a)}}}function xke(o,e,t){let s,a,l;const u=Fg();let{inModal:d}=e,{modalUrl:h}=e,{limit:b}=e,{skip:y}=e,{total:C}=e;function E(F){F.preventDefault(),$(s)}function R(F){F.preventDefault(),$(1)}function $(F){const U=new URL(h!=null?h:window.location.href);let K=F*b-b;U.searchParams.set("skip",K),d?u("refresh",U):window.location=U}function Q(F){SH.call(this,o,F)}return o.$$set=F=>{"inModal"in F&&t(0,d=F.inModal),"modalUrl"in F&&t(1,h=F.modalUrl),"limit"in F&&t(2,b=F.limit),"skip"in F&&t(3,y=F.skip),"total"in F&&t(4,C=F.total)},o.$$.update=()=>{o.$$.dirty&20&&t(5,s=Math.ceil(C/b)),o.$$.dirty&12&&t(6,a=Math.ceil((y-1)/b)+1),o.$$.dirty&96&&t(7,l=Lc.exports.range(a-3,a+4).filter(F=>F>0&&F<=s))},[d,h,b,y,C,s,a,l,E,R,Q]}class Tke extends uo{constructor(e){super(),co(this,e,xke,kke,lo,{inModal:0,modalUrl:1,limit:2,skip:3,total:4})}}function Eke(o){let e,t,s;return{c(){e=re("button"),e.textContent="Move to trash",Z(e,"type","button"),Z(e,"class","btn btn-sm btn-outline-primary")},m(a,l){Te(a,e,l),t||(s=mn(e,"click",ku(o[9])),t=!0)},p:fn,d(a){a&&ke(e),t=!1,s()}}}function Ake(o){let e,t,s,a,l,u,d=o[1].hasDrafts&&qce(o);return{c(){e=re("button"),e.textContent="Publish",t=Ze(),d&&d.c(),s=Ze(),a=re("button"),a.textContent="Delete forever",Z(e,"type","button"),Z(e,"class","btn btn-sm btn-outline-primary"),Z(a,"type","button"),Z(a,"class","btn btn-sm btn-outline-primary")},m(h,b){Te(h,e,b),Te(h,t,b),d&&d.m(h,b),Te(h,s,b),Te(h,a,b),l||(u=[mn(e,"click",ku(o[7])),mn(a,"click",ku(o[3]))],l=!0)},p(h,b){h[1].hasDrafts?d?d.p(h,b):(d=qce(h),d.c(),d.m(s.parentNode,s)):d&&(d.d(1),d=null)},d(h){h&&ke(e),h&&ke(t),d&&d.d(h),h&&ke(s),h&&ke(a),l=!1,vi(u)}}}function qce(o){let e,t,s;return{c(){e=re("button"),e.textContent="Make Draft",Z(e,"type","button"),Z(e,"class","btn btn-sm btn-outline-primary")},m(a,l){Te(a,e,l),t||(s=mn(e,"click",ku(o[8])),t=!0)},p:fn,d(a){a&&ke(e),t=!1,s()}}}function Dke(o){let e,t,s=o[0].length+"",a,l,u,d,h,b,y,C,E,R;function $(U,K){return U[2].status_in==="trashed"?Ake:Eke}let Q=$(o),F=Q(o);return{c(){e=re("div"),t=re("span"),a=Ht(s),l=Ht(" records selected"),u=Ze(),d=re("div"),h=re("button"),h.textContent="Publish",b=Ze(),y=re("button"),y.textContent="Make Draft",C=Ze(),F.c(),Z(t,"class","me-2"),Z(h,"type","button"),Z(h,"class","btn btn-sm btn-outline-primary"),Z(y,"type","button"),Z(y,"class","btn btn-sm btn-outline-primary"),Z(d,"class","btn-group "),Z(d,"role","group"),Z(d,"aria-label","Basic example"),Z(e,"class","d-flex align-items-center mb-3")},m(U,K){Te(U,e,K),X(e,t),X(t,a),X(t,l),X(e,u),X(e,d),X(d,h),X(d,b),X(d,y),X(d,C),F.m(d,null),E||(R=[mn(h,"click",ku(o[5])),mn(y,"click",ku(o[6]))],E=!0)},p(U,[K]){K&1&&s!==(s=U[0].length+"")&&Qn(a,s),Q===(Q=$(U))&&F?F.p(U,K):(F.d(1),F=Q(U),F&&(F.c(),F.m(d,null)))},i:fn,o:fn,d(U){U&&ke(e),F.d(),E=!1,vi(R)}}}function Pke(o,e,t){const s=Ur("channel");let{selected:a}=e,{schema:l}=e,{filter:u}=e;function d($){$.preventDefault(),axios.post(s.lucentUrl+"/records/delete",{ids:a.map(Q=>Q.id)}).then(Q=>{window.location.reload()}).catch(Q=>{console.log(Q)})}function h($,Q){axios.post(s.lucentUrl+"/records/status/"+Q,{schemaName:l.name,records:a}).then(F=>{window.location.reload()}).catch(F=>{console.log(F)})}const b=$=>h($,"published"),y=$=>h($,"draft"),C=$=>h($,"published"),E=$=>h($,"draft"),R=$=>h($,"trashed");return o.$$set=$=>{"selected"in $&&t(0,a=$.selected),"schema"in $&&t(1,l=$.schema),"filter"in $&&t(2,u=$.filter)},[a,l,u,d,h,b,y,C,E,R]}class Mk
2023-11-17 20:21:45 +02:00
* Sortable 1.15.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
2023-11-20 13:56:20 +02:00
*/function Tue(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(o);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),t.push.apply(t,s)}return t}function Oy(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Tue(Object(t),!0).forEach(function(s){Axe(o,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):Tue(Object(t)).forEach(function(s){Object.defineProperty(o,s,Object.getOwnPropertyDescriptor(t,s))})}return o}function xH(o){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xH=function(e){return typeof e}:xH=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xH(o)}function Axe(o,e,t){return e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function zw(){return zw=Object.assign||function(o){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(o[s]=t[s])}return o},zw.apply(this,arguments)}function Dxe(o,e){if(o==null)return{};var t={},s=Object.keys(o),a,l;for(l=0;l<s.length;l++)a=s[l],!(e.indexOf(a)>=0)&&(t[a]=o[a]);return t}function Pxe(o,e){if(o==null)return{};var t=Dxe(o,e),s,a;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(o);for(a=0;a<l.length;a++)s=l[a],!(e.indexOf(s)>=0)&&(!Object.prototype.propertyIsEnumerable.call(o,s)||(t[s]=o[s]))}return t}var Mxe="1.15.0";function Fw(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var jw=Fw(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),tI=Fw(/Edge/i),Eue=Fw(/firefox/i),i6=Fw(/safari/i)&&!Fw(/chrome/i)&&!Fw(/android/i),t1e=Fw(/iP(ad|od|hone)/i),n1e=Fw(/chrome/i)&&Fw(/android/i),o1e={capture:!1,passive:!1};function hl(o,e,t){o.addEventListener(e,t,!jw&&o1e)}function La(o,e,t){o.removeEventListener(e,t,!jw&&o1e)}function rz(o,e){if(!!e){if(e[0]===">"&&(e=e.substring(1)),o)try{if(o.matches)return o.matches(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e)}catch{return!1}return!1}}function Rxe(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function iy(o,e,t,s){if(o){t=t||document;do{if(e!=null&&(e[0]===">"?o.parentNode===t&&rz(o,e):rz(o,e))||s&&o===t)return o;if(o===t)break}while(o=Rxe(o))}return null}var Aue=/\s+/g;function $1(o,e,t){if(o&&e)if(o.classList)o.classList[t?"add":"remove"](e);else{var s=(" "+o.className+" ").replace(Aue," ").replace(" "+e+" "," ");o.className=(s+(t?" "+e:"")).replace(Aue," ")}}function Vr(o,e,t){var s=o&&o.style;if(s){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(t=o.currentStyle),e===void 0?t:t[e];!(e in s)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),s[e]=t+(typeof t=="string"?"":"px")}}function OD(o,e){var t="";if(typeof o=="string")t=o;else do{var s=Vr(o,"transform");s&&s!=="none"&&(t=s+" "+t)}while(!e&&(o=o.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(t)}function s1e(o,e,t){if(o){var s=o.getElementsByTagName(e),a=0,l=s.length;if(t)for(;a<l;a++)t(s[a],a);return s}return[]}function hy(){var o=document.scrollingElement;return o||document.documentElement}function yd(o,e,t,s,a){if(!(!o.getBoundingClientRect&&o!==window)){var l,u,d,h,b,y,C;if(o!==window&&o.parentNode&&o!==hy()?(l=o.getBoundingClientRect(),u=l.top,d=l.left,h=l.bottom,b=l.right,y=l.height,C=l.width):(u=0,d=0,h=window.innerHeight,b=window.innerWidth,y=window.innerHeight,C=window.innerWidth),(e||t)&&o!==window&&(a=a||o.parentNode,!jw))do if(a&&a.getBoundingClientRect&&(Vr(a,"transform")!=="none"||t&&Vr(a,"position")!=="static")){var E=a.getBoundingClientRect();u-=E.top+parseInt(Vr(a,"border-top-width")),d-=E.left+parseInt(Vr(a,"border-left-width")),h=u+l.height,b=d+l.width;break}while(a=a.parentNode);if(s&&o!==window){var R=OD(a||o),
`||n==="\r",Ra=(n,i)=>i<n.length&&i>=0?rm(n[i]):!1,mh=(n,i=4,c=!0,m=!0)=>{const p=Tu(" ",i),w=n.replace(/\t/g,p);return zn(w,(M,B)=>u0(B)||B===Kr?M.pcIsSpace||M.str===""&&c||M.str.length===w.length-1&&m||Ra(w,M.str.length+1)?{pcIsSpace:!1,str:M.str+Kr}:{pcIsSpace:!0,str:M.str+" "}:{pcIsSpace:rm(B),str:M.str+B},{pcIsSpace:!1,str:""}).str},$d=(n,i)=>{const c=Ke.fromDom(i),m=Ke.fromDom(n);return Ty(m,"pre,code",He(vt,c))},tg=(n,i)=>_n(n)&&eg(n.data)&&!$d(n,i),ng=n=>Jn(n)&&n.nodeName==="A"&&!n.hasAttribute("href")&&(n.hasAttribute("name")||n.hasAttribute("id")),im=(n,i)=>Tl(n)&&!tg(n,i)||ng(n)||af(n),af=Vc("data-mce-bookmark"),f0=Vc("data-mce-bogus"),tb=qg("data-mce-bogus","all"),e_=(n,i)=>{let c=0;if(im(n,n))return!1;{let m=n.firstChild;if(!m)return!0;const p=new _i(m,n);do{if(i){if(tb(m)){m=p.next(!0);continue}if(f0(m)){m=p.next();continue}}if(mi(m)){c++,m=p.next();continue}if(im(m,n))return!1;m=p.next()}while(m);return c<=1}},$a=(n,i=!0)=>e_(n.dom,i),ep="data-mce-block",og=n=>At(bs(n),i=>!/[A-Z]/.test(i)),du=n=>og(n).join(","),Bf=(n,i)=>Oe(i.querySelector(n))?(i.setAttribute(ep,"true"),i.getAttribute("data-mce-selected")==="inline-boundary"&&i.removeAttribute("data-mce-selected"),!0):(i.removeAttribute(ep),!1),sg=(n,i)=>{const c=du(n.getTransparentElements()),m=du(n.getBlockElements());return At(i.querySelectorAll(c),p=>Bf(m,p))},gh=(n,i)=>{var c;const m=i?"lastChild":"firstChild";for(let p=n[m];p;p=p[m])if($a(Ke.fromDom(p))){(c=p.parentNode)===null||c===void 0||c.removeChild(p);return}},Lu=(n,i)=>{const c=document.createRange(),m=n.parentNode;if(m){c.setStartBefore(n),c.setEndBefore(i);const p=c.extractContents();gh(p,!0),c.setStartAfter(i),c.setEndAfter(n);const w=c.extractContents();gh(w,!1),$a(Ke.fromDom(p))||m.insertBefore(p,n),$a(Ke.fromDom(i))||m.insertBefore(i,n),$a(Ke.fromDom(w))||m.insertBefore(w,n),m.removeChild(n)}},Nd=(n,i,c)=>{const m=n.getBlockElements(),p=Ke.fromDom(i),w=M=>ti(M)in m,x=M=>vt(M,p);Ne(lh(c),M=>{di(M,w,x).each(B=>{const q=r0(M,ae=>w(ae)&&!n.isValidChild(ti(B),ti(ae)));if(q.length>0){const ae=wi(B);Ne(q,fe=>{di(fe,w,x).each(be=>{Lu(be.dom,fe.dom)})}),ae.each(fe=>sg(n,fe.dom))}})})},rg=(n,i,c)=>{Ne([...c,...ig(n,i)?[i]:[]],m=>Ne(pl(Ke.fromDom(m),m.nodeName.toLowerCase()),p=>{Iv(n,p.dom)&&Kl(p)}))},d0=(n,i)=>{const c=sg(n,i);Nd(n,i,c),rg(n,i,c)},Rv=(n,i)=>{if(Nv(n,i)){const c=du(n.getBlockElements());Bf(c,i)}},$v=(n,i,c)=>{const m=w=>vt(w,Ke.fromDom(i)),p=oh(Ke.fromDom(c),m);qr(p,p.length-2).filter(kl).fold(()=>d0(n,i),w=>d0(n,w.dom))},ph=n=>n.hasAttribute(ep),tp=(n,i)=>un(n.getTransparentElements(),i),Nv=(n,i)=>Jn(i)&&tp(n,i.nodeName),ig=(n,i)=>Nv(n,i)&&ph(i),Iv=(n,i)=>Nv(n,i)&&!ph(i),rr=(n,i)=>i.type===1&&tp(n,i.name)&&L(i.attr(ep)),Ao=ys().browser,bh=n=>oo(n,kl),nb=n=>Ao.isFirefox()&&ti(n)==="table"?bh(Da(n)).filter(i=>ti(i)==="caption").bind(i=>bh(il(i)).map(c=>{const m=c.dom.offsetTop,p=i.dom.offsetTop,w=i.dom.offsetHeight;return m<=p?-w:0})).getOr(0):0,np=(n,i)=>n.children&&kt(n.children,i),WC=(n,i,c)=>{let m=0,p=0;const w=n.ownerDocument;if(c=c||n,i){if(c===n&&i.getBoundingClientRect&&Bi(Ke.fromDom(n),"position")==="static"){const M=i.getBoundingClientRect();return m=M.left+(w.documentElement.scrollLeft||n.scrollLeft)-w.documentElement.clientLeft,p=M.top+(w.documentElement.scrollTop||n.scrollTop)-w.documentElement.clientTop,{x:m,y:p}}let x=i;for(;x&&x!==c&&x.nodeType&&!np(x,c);){const M=x;m+=M.offsetLeft||0,p+=M.offsetTop||0,x=M.offsetParent}for(x=i.parentNode;x&&x!==c&&x.nodeType&&!np(x,c);)m-=x.scrollLeft||0,p-=x.scrollTop||0,x=x.parentNode;p+=nb(Ke.fromDom(i))}return{x:m,y:p}},Bv=(n,i={})=>{let c=0;const m={},p=Ke.fromDom(n),w=Eo(p),x=Me=>{i.referrerPolicy=Me},M=Me=>{i.contentCssCors=Me},B=Me=>{na(em(p),Me)},q=Me=>{const Ve=em(p);Je(Ve,"#"+Me).each(wr)},ae=Me=>wo(m,Me).getOrThunk(()=>({id:"mce-u"+c++,passed:[],failed:[],count:0})),fe=Me=>new Promise((Ve,gt)=>{let Ot;const wt=gn._addCacheSuffix(Me),Pt=ae(wt);m[wt]=Pt,Pt.count++;const hn=(Zt,yn)=>{Ne(Zt,Cn),Pt.status=yn,Pt.passed=[],Pt.failed=[],Ot&&(Ot.onload=null,Ot.onerror=null,Ot=null)},Hn=()=>hn(Pt.passed,2),$n=()=>hn(Pt.failed,3);
2023-11-17 23:02:39 +02:00
Actual: `+be.join(","));if(!tr(i,Ye=>kt(be,Ye)))throw new Error("Not all branches were specified when using match. Specified: "+be.join(", ")+`
2023-11-20 13:52:33 +02:00
Required: `+i.join(", "));return fe[x].apply(null,B)},log:fe=>{console.log(fe,{constructors:i,constructor:x,params:B})}}}}),c}};pg.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const ok=n=>{const i=[],c=[];return Ne(n,m=>{m.fold(p=>{i.push(p)},p=>{c.push(p)})}),{errors:i,values:c}},sk=n=>n.type==="inline-command"||n.type==="inline-format",r2=n=>n.type==="block-command"||n.type==="block-format",i2=n=>{const i=m=>bc.error({message:m,pattern:n}),c=(m,p,w)=>{if(n.format!==void 0){let x;if(oe(n.format)){if(!tr(n.format,L))return i(m+" pattern has non-string items in the `format` array");x=n.format}else if(L(n.format))x=[n.format];else return i(m+" pattern has non-string `format` parameter");return bc.value(p(x))}else return n.cmd!==void 0?L(n.cmd)?bc.value(w(n.cmd,n.value)):i(m+" pattern has non-string `cmd` parameter"):i(m+" pattern is missing both `format` and `cmd` parameters")};if(!te(n))return i("Raw pattern is not an object");if(!L(n.start))return i("Raw pattern is missing `start` parameter");if(n.end!==void 0){if(!L(n.end))return i("Inline pattern has non-string `end` parameter");if(n.start.length===0&&n.end.length===0)return i("Inline pattern has empty `start` and `end` parameters");let m=n.start,p=n.end;return p.length===0&&(p=m,m=""),c("Inline",w=>({type:"inline-format",start:m,end:p,format:w}),(w,x)=>({type:"inline-command",start:m,end:p,cmd:w,value:x}))}else return n.replacement!==void 0?L(n.replacement)?n.start.length===0?i("Replacement pattern has empty `start` parameter"):bc.value({type:"inline-command",start:"",end:n.start,cmd:"mceInsertContent",value:n.replacement}):i("Replacement pattern has non-string `replacement` parameter"):n.start.length===0?i("Block pattern has empty `start` parameter"):c("Block",m=>({type:"block-format",start:n.start,format:m[0]}),(m,p)=>({type:"block-command",start:n.start,cmd:m,value:p}))},hm=n=>At(n,r2),a2=n=>At(n,sk),r1=(n,i)=>({inlinePatterns:a2(n),blockPatterns:hm(n),dynamicPatternsLookup:i}),Ol=n=>{const i=ok(pt(n,i2));return Ne(i.errors,c=>console.error(c.message,c.pattern)),i.values},Pl=n=>i=>{const c=n(i);return Ol(c)},Tn=ys().deviceType,rk=Tn.isTouch(),nc=Qr.DOM,ik=n=>{const i=n.indexOf("=")>0?n.split(/[;,](?![^=;,]*(?:[;,]|$))/):n.split(",");return zn(i,(c,m)=>{const p=m.split("="),w=p[0],x=p.length>1?p[1]:w;return c[kc(w)]=kc(x),c},{})},l2=n=>K(n,RegExp),no=n=>i=>i.options.get(n),Pc=n=>L(n)||te(n),c2=(n,i="")=>c=>{const m=L(c);if(m)if(c.indexOf("=")!==-1){const p=ik(c);return{value:wo(p,n.id).getOr(i),valid:m}}else return{value:c,valid:m};else return{valid:!1,message:"Must be a string."}},fb=n=>{const i=n.options.register;i("id",{processor:"string",default:n.id}),i("selector",{processor:"string"}),i("target",{processor:"object"}),i("suffix",{processor:"string"}),i("cache_suffix",{processor:"string"}),i("base_url",{processor:"string"}),i("referrer_policy",{processor:"string",default:""}),i("language_load",{processor:"boolean",default:!0}),i("inline",{processor:"boolean",default:!1}),i("iframe_attrs",{processor:"object",default:{}}),i("doctype",{processor:"string",default:"<!DOCTYPE html>"}),i("document_base_url",{processor:"string",default:n.documentBaseUrl}),i("body_id",{processor:c2(n,"tinymce"),default:"tinymce"}),i("body_class",{processor:c2(n),default:""}),i("content_security_policy",{processor:"string",default:""}),i("br_in_pre",{processor:"boolean",default:!0}),i("forced_root_block",{processor:c=>{const m=L(c)&&yr(c);return m?{value:c,valid:m}:{valid:!1,message:"Must be a non-empty string."}},default:"p"}),i("forced_root_block_attrs",{processor:"object",default:{}}),i("newline_behavior",{processor:c=>{const m=kt(["block","linebreak","invert","default"],c);return m?{value:c,valid:m}:{valid:!1,message:"Must be one of: block, linebreak, invert or default."}},default:"default"}),i("br_newline_selector",{processor:"string",default:".mce-toc h2,figcaption,caption"}),i("no_newline_selector",{processor:"string",default:""}),i("keep_styles",{processor:"boolean",default:!0}),i(
2023-11-20 13:56:20 +02:00
\r \v`.indexOf(n)!==-1,kb=n=>!Dh(n)&&!Gs(n)&&!a0(n),Hk=n=>({value:IE(n)}),IE=n=>ga(n,"#").toUpperCase(),OO=n=>{const i=n.toString(16);return(i.length===1?"0"+i:i).toUpperCase()},cP=n=>{const i=OO(n.red)+OO(n.green)+OO(n.blue);return Hk(i)},zk=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i,q_=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i,E2=(n,i,c,m)=>({red:n,green:i,blue:c,alpha:m}),uP=(n,i,c,m)=>{const p=parseInt(n,10),w=parseInt(i,10),x=parseInt(c,10),M=parseFloat(m);return E2(p,w,x,M)},Vk=n=>{if(n==="transparent")return he.some(E2(0,0,0,0));const i=zk.exec(n);if(i!==null)return he.some(uP(i[1],i[2],i[3],"1"));const c=q_.exec(n);return c!==null?he.some(uP(c[1],c[2],c[3],c[4])):he.none()},G_=n=>Vk(n).map(cP).map(i=>"#"+i.value).getOr(n),Wk=n=>{const i=[];if(n)for(let c=0;c<n.rangeCount;c++)i.push(n.getRangeAt(c));return i},vI=n=>$s(n,i=>{const c=lb(i);return c?[Ke.fromDom(c)]:[]}),BE=n=>Wk(n).length>1,Uk=n=>At(vI(n),qm),yO=n=>pl(n,"td[data-mce-selected],th[data-mce-selected]"),A2=(n,i)=>{const c=yO(i);return c.length>0?c:Uk(n)},xb=n=>A2(Wk(n.selection.getSel()),Ke.fromDom(n.getBody())),vp=(n,i)=>Se(n,"table",i),LE=n=>{const i=n.startContainer,c=n.startOffset;return _n(i)?c===0?he.some(Ke.fromDom(i)):he.none():he.from(i.childNodes[c]).map(Ke.fromDom)},fP=n=>{const i=n.endContainer,c=n.endOffset;return _n(i)?c===i.data.length?he.some(Ke.fromDom(i)):he.none():he.from(i.childNodes[c-1]).map(Ke.fromDom)},FE=n=>ii(n).fold(Qe([n]),i=>[n].concat(FE(i))),Yk=n=>Mu(n).fold(Qe([n]),i=>ti(i)==="br"?Sa(i).map(c=>[n].concat(Yk(c))).getOr([]):[n].concat(Yk(i))),wO=(n,i)=>ri(LE(i),fP(i),(c,m)=>{const p=oo(FE(n),He(vt,c)),w=oo(Yk(n),He(vt,m));return p.isSome()&&w.isSome()}).getOr(!1),Xk=(n,i,c,m)=>{const p=c,w=new _i(c,p),x=Wt(n.schema.getMoveCaretBeforeOnEnterElements(),(B,q)=>!kt(["td","th","table"],q.toLowerCase()));let M=c;do{if(_n(M)&&gn.trim(M.data).length!==0){m?i.setStart(M,0):i.setEnd(M,M.data.length);return}if(x[M.nodeName]){m?i.setStartBefore(M):M.nodeName==="BR"?i.setEndBefore(M):i.setEndAfter(M);return}}while(M=m?w.next():w.prev());p.nodeName==="BODY"&&(m?i.setStart(p,0):i.setEnd(p,p.childNodes.length))},K_=n=>{const i=n.selection.getSel();return Oe(i)&&i.rangeCount>0},jk=(n,i)=>{const c=xb(n);c.length>0?Ne(c,m=>{const p=m.dom,w=n.dom.createRng();w.setStartBefore(p),w.setEndAfter(p),i(w,!0)}):i(n.selection.getRng(),!1)},QE=(n,i,c)=>{const m=Sr(n,i);c(m),n.moveToBookmark(m)},D2=n=>Xe(n==null?void 0:n.nodeType),qk=n=>Jn(n)&&!Wd(n)&&!qc(n)&&!Pd(n),dP=(n,i)=>{if(qk(i)&&!/^(TD|TH)$/.test(i.nodeName)){const c=n.getAttrib(i,"data-mce-selected"),m=parseInt(c,10);return!isNaN(m)&&m>0}else return!1},vm=n=>n.isContentEditable===!0,ZE=(n,i,c)=>{const{selection:m,dom:p}=n,w=m.getNode(),x=Es(w);QE(m,!0,()=>{i()}),x&&Es(w)&&p.isChildOf(w,n.getBody())?n.selection.select(w):c(m.getStart())&&hP(p,m)},hP=(n,i)=>{var c,m;const p=i.getRng(),{startContainer:w,startOffset:x}=p,M=i.getNode();if(!dP(n,M)&&Jn(w)){const B=w.childNodes,q=n.getRoot();let ae;if(x<B.length){const fe=B[x];ae=new _i(fe,(c=n.getParent(fe,n.isBlock))!==null&&c!==void 0?c:q)}else{const fe=B[B.length-1];ae=new _i(fe,(m=n.getParent(fe,n.isBlock))!==null&&m!==void 0?m:q),ae.next(!0)}for(let fe=ae.current();fe;fe=ae.next()){if(n.getContentEditable(fe)==="false")return;if(_n(fe)&&!sc(fe)){p.setStart(fe,0),i.setRng(p);return}}}},Gn=(n,i,c)=>{if(n){const m=i?"nextSibling":"previousSibling";for(n=c?n:n[m];n;n=n[m])if(Jn(n)||!sc(n))return n}},Wl=(n,i)=>!!n.getTextBlockElements()[i.nodeName.toLowerCase()]||ig(n,i),Om=(n,i,c)=>n.schema.isValidChild(i,c),sc=(n,i=!1)=>{if(Oe(n)&&_n(n)){const c=i?n.data.replace(/ /g,"\xA0"):n.data;return eg(c)}else return!1},ym=n=>Oe(n)&&_n(n)&&n.length===0,HE=(n,i)=>{const c="[data-mce-cef-wrappable]",m=M0(n),p=ol(m)?c:`${c},${m}`;return Pu(Ke.fromDom(i),p)},P2=(n,i)=>{const c=n.dom;return qk(i)&&c.getContentEditable(i)==="false"&&HE(n,i)&&c.select('[contenteditable="true"]',i).length===0},Ph=(n,i)=>ce(n)?n(i):(Oe(i)&&(n=n.replace(/%(\w+)/g,(c,m)=>i[m]||c)),n),J_=(n,i)=>(n=n||"",i=i||"",n=""+(n.nodeName||n),i=""
2023-11-17 20:21:45 +02:00
]*|<br \\/>[\r
2023-11-17 21:22:26 +02:00
]*)$`);return i.replace(m,"")},tW=(n,i)=>{const c=n.getDoc(),m=ql(Ke.fromDom(n.getBody())),p=Ke.fromTag("div",c);Pr(p,"data-mce-bogus","all"),ua(p,{position:"fixed",left:"-9999999px",top:"0"}),Mf(p,i.innerHTML),p3(p),HI(p);const w=X1(m);na(w,p);const x=In(p.dom.innerText);return wr(p),x},nW=(n,i,c)=>{let m;return i.format==="raw"?m=gn.trim(JV(n.serializer,c.innerHTML)):i.format==="text"?m=tW(n,c):i.format==="tree"?m=n.serializer.serialize(c,i):m=eW(n,n.serializer.serialize(c,i)),i.format!=="text"&&!lu(Ke.fromDom(c))&&L(m)?gn.trim(m):m},oW=(n,i)=>he.from(n.getBody()).fold(Qe(i.format==="tree"?new Xd("body",11):""),c=>nW(n,i,c)),bx=gn.makeMap,jP=n=>{const i=[];n=n||{};const c=n.indent,m=bx(n.indent_before||""),p=bx(n.indent_after||""),w=sp.getEncodeFunc(n.entity_encoding||"raw",n.entities),x=n.element_format!=="xhtml";return{start:(M,B,q)=>{if(c&&m[M]&&i.length>0){const ae=i[i.length-1];ae.length>0&&ae!==`
2023-11-17 20:21:45 +02:00
`&&i.push(`
2023-11-17 23:02:39 +02:00
`)}if(i.push("<",M),B)for(let ae=0,fe=B.length;ae<fe;ae++){const be=B[ae];i.push(" ",be.name,'="',w(be.value,!0),'"')}if(!q||x?i[i.length]=">":i[i.length]=" />",q&&c&&p[M]&&i.length>0){const ae=i[i.length-1];ae.length>0&&ae!==`
2023-11-17 20:21:45 +02:00
`&&i.push(`
`)}},end:M=>{let B;i.push("</",M,">"),c&&p[M]&&i.length>0&&(B=i[i.length-1],B.length>0&&B!==`
`&&i.push(`
`))},text:(M,B)=>{M.length>0&&(i[i.length]=B?M:w(M))},cdata:M=>{i.push("<![CDATA[",M,"]]>")},comment:M=>{i.push("<!--",M,"-->")},pi:(M,B)=>{B?i.push("<?",M," ",w(B),"?>"):i.push("<?",M,"?>"),c&&i.push(`
`)},doctype:M=>{i.push("<!DOCTYPE",M,">",c?`
2023-11-17 23:02:39 +02:00
`:"")},reset:()=>{i.length=0},getContent:()=>i.join("").replace(/\n$/,"")}},Y2=(n={},i=wh())=>{const c=jP(n);return n.validate="validate"in n?n.validate:!0,{serialize:p=>{const w=n.validate,x={3:B=>{var q;c.text((q=B.value)!==null&&q!==void 0?q:"",B.raw)},8:B=>{var q;c.comment((q=B.value)!==null&&q!==void 0?q:"")},7:B=>{c.pi(B.name,B.value)},10:B=>{var q;c.doctype((q=B.value)!==null&&q!==void 0?q:"")},4:B=>{var q;c.cdata((q=B.value)!==null&&q!==void 0?q:"")},11:B=>{let q=B;if(q=q.firstChild)do M(q);while(q=q.next)}};c.reset();const M=B=>{var q;const ae=x[B.type];if(ae)ae(B);else{const fe=B.name,be=fe in i.getVoidElements();let Le=B.attributes;if(w&&Le&&Le.length>1){const Ye=[];Ye.map={};const Me=i.getElementRule(B.name);if(Me){for(let Ve=0,gt=Me.attributesOrder.length;Ve<gt;Ve++){const Ot=Me.attributesOrder[Ve];if(Ot in Le.map){const wt=Le.map[Ot];Ye.map[Ot]=wt,Ye.push({name:Ot,value:wt})}}for(let Ve=0,gt=Le.length;Ve<gt;Ve++){const Ot=Le[Ve].name;if(!(Ot in Ye.map)){const wt=Le.map[Ot];Ye.map[Ot]=wt,Ye.push({name:Ot,value:wt})}}Le=Ye}}if(c.start(fe,Le,be),!be){let Ye=B.firstChild;if(Ye){(fe==="pre"||fe==="textarea")&&Ye.type===3&&((q=Ye.value)===null||q===void 0?void 0:q[0])===`
2023-11-17 20:21:45 +02:00
`&&c.text(`
2023-11-20 13:52:33 +02:00
`,!0);do M(Ye);while(Ye=Ye.next)}c.end(fe)}}};return p.type===1&&!n.inner?M(p):p.type===3?x[3](p):x[11](p),c.getContent()}}},zI=new Set;Ne(["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"],i=>{zI.add(i)});const gs=["font","text-decoration","text-emphasis"],qP=(n,i)=>bs(n.parseStyle(n.getAttrib(i,"style"))),xs=n=>zI.has(n),VI=(n,i)=>tr(qP(n,i),c=>!xs(c)),yie=n=>At(n,i=>jt(gs,c=>Ar(i,c))),wie=(n,i,c)=>{const m=qP(n,i),p=qP(n,c),w=x=>{var M,B;const q=(M=n.getStyle(i,x))!==null&&M!==void 0?M:"",ae=(B=n.getStyle(c,x))!==null&&B!==void 0?B:"";return yr(q)&&yr(ae)&&q!==ae};return jt(m,x=>{const M=B=>jt(B,q=>q===x);if(!M(p)&&M(gs)){const B=yie(p);return jt(B,w)}else return w(x)})},WI=(n,i,c)=>he.from(c.container()).filter(_n).exists(m=>{const p=n?0:-1;return i(m.data.charAt(c.offset()+p))}),UI=He(WI,!0,Dh),YI=He(WI,!1,Dh),sW=n=>{const i=n.container();return _n(i)&&(i.data.length===0||Sn(i.data)&&_O.isBookmarkNode(i.parentNode))},EO=(n,i)=>c=>wb(n?0:-1,c).filter(i).isSome(),ns=n=>Ui(n)&&Bi(Ke.fromDom(n),"display")==="block",XI=n=>Es(n)&&!bl(n),rW=EO(!0,ns),iW=EO(!1,ns),j0=EO(!0,sf),vS=EO(!1,sf),jI=EO(!0,Iu),qI=EO(!1,Iu),AO=EO(!0,XI),q0=EO(!1,XI),aW=n=>n.slice(0,-1),_ie=(n,i,c)=>cn(i,n)?aW(oh(n,m=>c(m)||vt(m,i))):[],lW=(n,i)=>_ie(n,i,je),G0=(n,i)=>[n].concat(lW(n,i)),GP=(n,i,c)=>Nk(n,i,c,sW),GI=(n,i)=>oo(G0(Ke.fromDom(i.container()),n),hc),KI=(n,i,c)=>GP(n,i.dom,c).forall(m=>GI(i,c).fold(()=>!Hd(m,c,i.dom),p=>!Hd(m,c,i.dom)&&cn(p,Ke.fromDom(m.container())))),KP=(n,i,c)=>GI(i,c).fold(()=>GP(n,i.dom,c).forall(m=>!Hd(m,c,i.dom)),m=>GP(n,m.dom,c).isNone()),JP=He(KP,!1),Ms=He(KP,!0),JI=He(KI,!1),b3=He(KI,!0),eB=n=>We(n).exists(au),vx=(n,i,c)=>{const m=At(G0(Ke.fromDom(c.container()),i),hc),p=$o(m).getOr(i);return zd(n,p.dom,c).filter(eB)},v3=(n,i)=>We(i).exists(au)||vx(!0,n,i).isSome(),O3=(n,i)=>ht(i).exists(au)||vx(!1,n,i).isSome(),tB=He(vx,!1),cW=He(vx,!0),e5=n=>Vt.isTextPosition(n)&&!n.isAtStart()&&!n.isAtEnd(),nB=(n,i)=>{const c=At(G0(Ke.fromDom(i.container()),n),hc);return $o(c).getOr(n)},oB=(n,i)=>e5(i)?YI(i):YI(i)||Hu(nB(n,i).dom,i).exists(YI),sB=(n,i)=>e5(i)?UI(i):UI(i)||Hf(nB(n,i).dom,i).exists(UI),uW=n=>kt(["pre","pre-wrap"],n),t5=n=>We(n).bind(i=>Zl(i,kl)).exists(i=>uW(Bi(i,"white-space"))),fW=(n,i)=>Hu(n.dom,i).isNone(),dW=(n,i)=>Hf(n.dom,i).isNone(),hW=(n,i)=>fW(n,i)||dW(n,i)||JP(n,i)||Ms(n,i)||O3(n,i)||v3(n,i),n5=n=>Oe(n)&&Es(n)&&Y_(n),y3=(n,i)=>c=>n5(new _i(c,n)[i]()),mW=(n,i)=>{const c=Hf(n.dom,i).getOr(i),m=y3(n.dom,"next");return i.isAtEnd()&&(m(i.container())||m(c.container()))},gW=(n,i)=>{const c=Hu(n.dom,i).getOr(i),m=y3(n.dom,"prev");return i.isAtStart()&&(m(i.container())||m(c.container()))},rB=(n,i)=>t5(i)?!1:hW(n,i)||oB(n,i)||sB(n,i),Ox=(n,i)=>t5(i)?!1:JP(n,i)||JI(n,i)||O3(n,i)||oB(n,i)||gW(n,i),pW=n=>{const i=n.container(),c=n.offset();return _n(i)&&c<i.data.length?Vt(i,c+1):n},yx=(n,i)=>t5(i)?!1:Ms(n,i)||b3(n,i)||v3(n,i)||sB(n,i)||mW(n,i),o5=(n,i)=>Ox(n,i)||yx(n,pW(i)),iB=(n,i)=>Gs(n.charAt(i)),s5=(n,i)=>Dh(n.charAt(i)),bW=n=>{const i=n.container();return _n(i)&&nr(i.data,Kr)},vW=n=>{const i=n.split("");return pt(i,(c,m)=>Gs(c)&&m>0&&m<i.length-1&&kb(i[m-1])&&kb(i[m+1])?" ":c).join("")},DO=(n,i,c)=>{const m=i.data,p=Vt(i,0);return!c&&iB(m,0)&&!o5(n,p)?(i.data=" "+m.slice(1),!0):c&&s5(m,0)&&Ox(n,p)?(i.data=Kr+m.slice(1),!0):!1},OW=n=>{const i=n.data,c=vW(i);return c!==i?(n.data=c,!0):!1},r5=(n,i,c)=>{const m=i.data,p=Vt(i,m.length-1);return!c&&iB(m,m.length-1)&&!o5(n,p)?(i.data=m.
2023-11-20 13:56:20 +02:00
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var E8=Object.hasOwnProperty,Zx=Object.setPrototypeOf,$U=Object.isFrozen,NU=Object.getPrototypeOf,NO=Object.getOwnPropertyDescriptor,gd=Object.freeze,p1=Object.seal,Hx=Object.create,rM=typeof Reflect<"u"&&Reflect,RS=rM.apply,X3=rM.construct;RS||(RS=function(i,c,m){return i.apply(c,m)}),gd||(gd=function(i){return i}),p1||(p1=function(i){return i}),X3||(X3=function(i,c){return Qx(i,g1(c))});var A8=Tg(Array.prototype.forEach),IU=Tg(Array.prototype.pop),zx=Tg(Array.prototype.push),j3=Tg(String.prototype.toLowerCase),iM=Tg(String.prototype.match),IO=Tg(String.prototype.replace),D8=Tg(String.prototype.indexOf),BU=Tg(String.prototype.trim),Nh=Tg(RegExp.prototype.test),aM=zf(TypeError);function Tg(n){return function(i){for(var c=arguments.length,m=new Array(c>1?c-1:0),p=1;p<c;p++)m[p-1]=arguments[p];return RS(n,i,m)}}function zf(n){return function(){for(var i=arguments.length,c=new Array(i),m=0;m<i;m++)c[m]=arguments[m];return X3(n,c)}}function Fi(n,i){Zx&&Zx(n,null);for(var c=i.length;c--;){var m=i[c];if(typeof m=="string"){var p=j3(m);p!==m&&($U(i)||(i[c]=p),m=p)}n[m]=!0}return n}function Ab(n){var i=Hx(null),c;for(c in n)RS(E8,n,[c])&&(i[c]=n[c]);return i}function Db(n,i){for(;n!==null;){var c=NO(n,i);if(c){if(c.get)return Tg(c.get);if(typeof c.value=="function")return Tg(c.value)}n=NU(n)}function m(p){return console.warn("fallback value for",p),null}return m}var lM=gd(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),pd=gd(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),sv=gd(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),P8=gd(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),cM=gd(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),M8=gd(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R8=gd(["#text"]),uM=gd(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","
2023-11-17 23:02:39 +02:00
`+vd),Us&&(vd=IO(vd,Ws," "),vd=IO(vd,Ir," ")),Pt&&qd?Pt.createHTML(vd):vd},i.setConfig=function(Hs){UT(Hs),Ja=!0},i.clearConfig=function(){Ov=null,Ja=!1},i.isValidAttribute=function(Hs,Xt,So){Ov||UT({});var ws=Ib(Hs),Sl=Ib(Xt);return YT(ws,Sl,So)},i.addHook=function(Hs,Xt){typeof Xt=="function"&&(Cs[Hs]=Cs[Hs]||[],zx(Cs[Hs],Xt))},i.removeHook=function(Hs){if(Cs[Hs])return IU(Cs[Hs])},i.removeHooks=function(Hs){Cs[Hs]&&(Cs[Hs]=[])},i.removeAllHooks=function(){Cs={}},i}var N8=K3();const gM=gn.each,I8=gn.trim,HU=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],zU={ftp:21,http:80,https:443,mailto:25},VU=["img","video"],WU=(n,i)=>Oe(n)?!n:Oe(i)?!kt(VU,i):!0,UU=n=>{try{return decodeURIComponent(n)}catch{return unescape(n)}},pM=(n,i,c)=>{const m=UU(i).replace(/\s/g,"");return n.allow_script_urls?!1:/((java|vb)script|mhtml):/i.test(m)?!0:n.allow_html_data_urls?!1:/^data:image\//i.test(m)?WU(n.allow_svg_data_urls,c)&&/^data:image\/svg\+xml/i.test(m):/^data:/i.test(m)};class b1{static parseDataUri(i){let c;const m=decodeURIComponent(i).split(","),p=/data:([^;]+)/.exec(m[0]);return p&&(c=p[1]),{type:c,data:m[1]}}static isDomSafe(i,c,m={}){if(m.allow_script_urls)return!0;{const p=sp.decode(i).replace(/[\s\u0000-\u001F]+/g,"");return!pM(m,p,c)}}static getDocumentBaseUrl(i){var c;let m;return i.protocol.indexOf("http")!==0&&i.protocol!=="file:"?m=(c=i.href)!==null&&c!==void 0?c:"":m=i.protocol+"//"+i.host+i.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(m)&&(m=m.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(m)||(m+="/")),m}constructor(i,c={}){this.path="",this.directory="",i=I8(i),this.settings=c;const m=c.base_uri,p=this;if(/^([\w\-]+):([^\/]{2})/i.test(i)||/^\s*#/.test(i)){p.source=i;return}const w=i.indexOf("//")===0;if(i.indexOf("/")===0&&!w&&(i=(m&&m.protocol||"http")+"://mce_host"+i),!/^[\w\-]*:?\/\//.test(i)){const M=m?m.path:new b1(document.location.href).directory;if((m==null?void 0:m.protocol)==="")i="//mce_host"+p.toAbsPath(M,i);else{const B=/([^#?]*)([#?]?.*)/.exec(i);B&&(i=(m&&m.protocol||"http")+"://mce_host"+p.toAbsPath(M,B[1])+B[2])}}i=i.replace(/@@/g,"(mce_at)");const x=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(i);x&&gM(HU,(M,B)=>{let q=x[B];q&&(q=q.replace(/\(mce_at\)/g,"@@")),p[M]=q}),m&&(p.protocol||(p.protocol=m.protocol),p.userInfo||(p.userInfo=m.userInfo),!p.port&&p.host==="mce_host"&&(p.port=m.port),(!p.host||p.host==="mce_host")&&(p.host=m.host),p.source=""),w&&(p.protocol="")}setPath(i){const c=/^(.*?)\/?(\w+)?$/.exec(i);c&&(this.path=c[0],this.directory=c[1],this.file=c[2]),this.source="",this.getURI()}toRelative(i){if(i==="./")return i;const c=new b1(i,{base_uri:this});if(c.host!=="mce_host"&&this.host!==c.host&&c.host||this.port!==c.port||this.protocol!==c.protocol&&c.protocol!=="")return c.getURI();const m=this.getURI(),p=c.getURI();if(m===p||m.charAt(m.length-1)==="/"&&m.substr(0,m.length-1)===p)return m;let w=this.toRelPath(this.path,c.path);return c.query&&(w+="?"+c.query),c.anchor&&(w+="#"+c.anchor),w}toAbsolute(i,c){const m=new b1(i,{base_uri:this});return m.getURI(c&&this.isSameOrigin(m))}isSameOrigin(i){if(this.host==i.host&&this.protocol==i.protocol){if(this.port==i.port)return!0;const c=this.protocol?zU[this.protocol]:null;if(c&&(this.port||c)==(i.port||c))return!0}return!1}toRelPath(i,c){let m=0,p="",w,x;const M=i.substring(0,i.lastIndexOf("/")).split("/"),B=c.split("/");if(M.length>=B.length){for(w=0,x=M.length;w<x;w++)if(w>=B.length||M[w]!==B[w]){m=w+1;break}}if(M.length<B.length){for(w=0,x=B.length;w<x;w++)if(w>=M.length||M[w]!==B[w]){m=w+1;break}}if(m===1)return c;for(w=0,x=M.length-(m-1);w<x;w++)p+="../";for(w=m-1,x=B.length;w<x;w++)w!==m-1?p+="/"+B[w]:p+=B[w];return p}toAbsPath(i,c){let m=0;const p=/\/$/.test(c)?"/":"",w=i.split("/"),x=c.split("/"),M=[];gM(w,fe=>{fe&&M.push(fe)});const B=[];for(let fe=x.length-1;fe>=0;fe-
2023-11-17 21:22:26 +02:00
`).replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"");let M=m.length;for(;M--;){const B=m[M],q=B.firstChild,ae=(w=q==null?void 0:q.value)!==null&&w!==void 0?w:"";if(p==="script"){const fe=B.attr("type");fe&&B.attr("type",fe==="mce-no/type"?null:fe.replace(/^mce\-/,"")),i.element_format==="xhtml"&&q&&ae.length>0&&(q.value=`// <![CDATA[
`+x(ae)+`
// ]]>`)}else i.element_format==="xhtml"&&q&&ae.length>0&&(q.value=`<!--
`+x(ae)+`
2023-11-17 23:02:39 +02:00
-->`)}}),n.addNodeFilter("#comment",m=>{let p=m.length;for(;p--;){const w=m[p],x=w.value;i.preserve_cdata&&(x==null?void 0:x.indexOf("[CDATA["))===0?(w.name="#cdata",w.type=4,w.value=c.decode(x.replace(/^\[CDATA\[|\]\]$/g,""))):(x==null?void 0:x.indexOf("mce:protected "))===0&&(w.name="#text",w.type=3,w.raw=!0,w.value=unescape(x).substr(14))}}),n.addNodeFilter("xml:namespace,input",(m,p)=>{let w=m.length;for(;w--;){const x=m[w];x.type===7?x.remove():x.type===1&&p==="input"&&!x.attr("type")&&x.attr("type","text")}}),n.addAttributeFilter("data-mce-type",m=>{Ne(m,p=>{p.attr("data-mce-type")==="format-caret"&&(p.isEmpty(n.schema.getNonEmptyElements())?p.remove():p.unwrap())})}),n.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",(m,p)=>{let w=m.length;for(;w--;)m[w].attr(p,null)}),i.remove_trailing_brs&&tM(i,n,n.schema)},ZY=n=>{const i=m=>(m==null?void 0:m.name)==="br",c=n.lastChild;if(i(c)){const m=c.prev;i(m)&&(c.remove(),m.remove())}},SL=(n,i,c)=>{let m;const p=n.dom;let w=i.cloneNode(!0);const x=document.implementation;if(x.createHTMLDocument){const M=x.createHTMLDocument("");gn.each(w.nodeName==="BODY"?w.childNodes:[w],B=>{M.body.appendChild(M.importNode(B,!0))}),w.nodeName!=="BODY"?w=M.body.firstChild:w=M.body,m=p.doc,p.doc=M}return XE(n,{...c,node:w}),m&&(p.doc=m),w},CL=(n,i)=>Oe(n)&&n.hasEventListeners("PreProcess")&&!i.no_events,kL=(n,i,c)=>CL(n,c)?SL(n,i,c):i,xL=(n,i,c)=>{gn.inArray(i,c)===-1&&(n.addAttributeFilter(c,(m,p)=>{let w=m.length;for(;w--;)m[w].attr(p,null)}),i.push(c))},QM=(n,i,c)=>!i.no_events&&n?rx(n,{...i,content:c}).content:c,Bie=(n,i,c)=>{const m=In(c.getInner?i.innerHTML:n.getOuterHTML(i));return c.selection||lu(Ke.fromDom(i))?m:gn.trim(m)},HY=(n,i,c)=>{const m=c.selection?{forced_root_block:!1,...c}:c,p=n.parse(i,m);return ZY(p),p},Lie=(n,i,c)=>Y2(n,i).serialize(c),zY=(n,i,c,m,p)=>{const w=Lie(i,c,m);return QM(n,p,w)},VY=(n,i)=>{const c=["data-mce-selected"],m={entity_encoding:"named",remove_trailing_brs:!0,pad_empty_with_br:!1,...n},p=i&&i.dom?i.dom:Qr.DOM,w=i&&i.schema?i.schema:wh(m),x=$S(m,w);QY(x,m,p);const M=(B,q={})=>{const ae={format:"html",...q},fe=kL(i,B,ae),be=Bie(p,fe,ae),Le=HY(x,be,ae);return ae.format==="tree"?Le:zY(i,m,w,Le,ae)};return{schema:w,addNodeFilter:x.addNodeFilter,addAttributeFilter:x.addAttributeFilter,serialize:M,addRules:w.addValidElements,setRules:w.setValidElements,addTempAttr:He(xL,x,c),getTempAttrs:Qe(c),getNodeFilters:x.getNodeFilters,getAttributeFilters:x.getAttributeFilters,removeNodeFilter:x.removeNodeFilter,removeAttributeFilter:x.removeAttributeFilter}},O1=(n,i)=>{const c=VY(n,i);return{schema:c.schema,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,serialize:c.serialize,addRules:c.addRules,setRules:c.setRules,addTempAttr:c.addTempAttr,getTempAttrs:c.getTempAttrs,getNodeFilters:c.getNodeFilters,getAttributeFilters:c.getAttributeFilters,removeNodeFilter:c.removeNodeFilter,removeAttributeFilter:c.removeAttributeFilter}},Fie="html",Qie=(n,i)=>({...n,format:i,get:!0,getInner:!0}),WY=(n,i={})=>{const c=i.format?i.format:Fie,m=Qie(i,c);return V8(n,m).fold(Bt,p=>{const w=$Y(n,p);return W8(n,w,p)})},Xx="html",UY=(n,i)=>({format:Xx,...n,set:!0,content:i}),rA=(n,i,c={})=>{const m=UY(c,i);return _M(n,m).map(p=>{const w=NY(n,p.content,p);return SM(n,w.html,p),w.content}).getOr(i)},TL="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
2023-11-17 20:21:45 +02:00
- `,B=x?`
Themes:${M}mobile`:"",q=p?`
2023-11-17 21:22:26 +02:00
Plugins:${M}${m.join(M)}`:"",ae=w?`
2023-11-17 20:21:45 +02:00
2023-11-17 21:22:26 +02:00
Options:${M}${c.join(M)}`:"";console.warn("The following deprecated features are currently enabled and have been removed in TinyMCE 6.0. These features will no longer work and should be removed from the TinyMCE configuration. See https://www.tiny.cloud/docs/tinymce/6/migration-from-5x/ for more information."+B+q+ae)}},JY=n=>oo(AL,i=>i.name===n).fold(()=>n,i=>i.replacedWith?`${n}, replaced by ${i.replacedWith}`:n),eX=(n,i)=>{const c=jY(n),m=GY(i),p=m.length>0,w=c.length>0;if(p||w){const x=`
2023-11-17 20:21:45 +02:00
- `,M=p?`
Plugins:${x}${m.map(JY).join(x)}`:"",B=w?`
2023-11-20 13:52:33 +02:00
Options:${x}${c.join(x)}`:"";console.warn("The following deprecated features are currently enabled but will be removed soon."+M+B)}},tX=(n,i)=>{KY(n,i),eX(n,i)},iA=Qr.DOM,nX=n=>{iA.setStyle(n.id,"display",n.orgDisplay)},ZM=n=>he.from(n).each(i=>i.destroy()),jx=n=>{const i=n;i.contentAreaContainer=i.formElement=i.container=i.editorContainer=null,i.bodyElement=i.contentDocument=i.contentWindow=null,i.iframeElement=i.targetElm=null;const c=n.selection;if(c){const m=c.dom;i.selection=c.win=c.dom=m.doc=null}},oX=n=>{const i=n.formElement;i&&(i._mceOldSubmit&&(i.submit=i._mceOldSubmit,delete i._mceOldSubmit),iA.unbind(i,"submit reset",n.formEventDelegate))},HM=n=>{if(!n.removed){const{_selectionOverrides:i,editorUpload:c}=n,m=n.getBody(),p=n.getElement();m&&n.save({is_removing:!0}),n.removed=!0,n.unbindAllNativeEvents(),n.hasHiddenInput&&Oe(p==null?void 0:p.nextSibling)&&iA.remove(p.nextSibling),jE(n),n.editorManager.remove(n),!n.inline&&m&&nX(n),sS(n),iA.remove(n.getContainer()),ZM(i),ZM(c),n.destroy()}},sX=(n,i)=>{const{selection:c,dom:m}=n;if(!n.destroyed){if(!i&&!n.removed){n.remove();return}i||(n.editorManager.off("beforeunload",n._beforeUnload),n.theme&&n.theme.destroy&&n.theme.destroy(),ZM(c),ZM(m)),oX(n),jx(n),n.destroyed=!0}},aA=(()=>{const n={};return{add:(p,w)=>{n[p]=w},get:p=>n[p]?n[p]:{icons:{}},has:p=>un(n,p)}})(),LS=Ia.ModelManager,LO=(n,i)=>i.dom[n],FO=(n,i)=>parseInt(Bi(i,n),10),lA=He(LO,"clientWidth"),cA=He(LO,"clientHeight"),cw=He(FO,"margin-top"),uw=He(FO,"margin-left"),uA=n=>n.dom.getBoundingClientRect(),fA=(n,i,c)=>{const m=lA(n),p=cA(n);return i>=0&&c>=0&&i<=m&&c<=p},PL=(n,i,c,m)=>{const p=uA(i),w=n?p.left+i.dom.clientLeft+uw(i):0,x=n?p.top+i.dom.clientTop+cw(i):0,M=c-w,B=m-x;return{x:M,y:B}},zM=(n,i,c)=>{const m=Ke.fromDom(n.getBody()),p=n.inline?m:or(m),w=PL(n.inline,p,i,c);return fA(p,w.x,w.y)},VM=n=>he.from(n).map(Ke.fromDom),ML=n=>{const i=n.inline?n.getBody():n.getContentAreaContainer();return VM(i).map(Ed).getOr(!1)};var RL=()=>{const n=()=>{throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:n,close:n,getArgs:n}};const fw=n=>{const i=[],c=()=>{const be=n.theme;return be&&be.getNotificationManagerImpl?be.getNotificationManagerImpl():RL()},m=()=>he.from(i[0]),p=(be,Le)=>be.type===Le.type&&be.text===Le.text&&!be.progressBar&&!be.timeout&&!Le.progressBar&&!Le.timeout,w=()=>{Ne(i,be=>{be.reposition()})},x=be=>{i.push(be)},M=be=>{Ss(i,Le=>Le===be).each(Le=>{i.splice(Le,1)})},B=(be,Le=!0)=>n.removed||!ML(n)?{}:(Le&&n.dispatch("BeforeOpenNotification",{notification:be}),oo(i,Ye=>p(c().getArgs(Ye),be)).getOrThunk(()=>{n.editorManager.setActive(n);const Ye=c().open(be,()=>{M(Ye),w(),m().fold(()=>n.focus(),Me=>X0(Ke.fromDom(Me.getEl())))});return x(Ye),w(),n.dispatch("OpenNotification",{notification:{...Ye}}),Ye})),q=()=>{m().each(be=>{c().close(be),M(be),w()})},ae=Qe(i);return(be=>{be.on("SkinLoaded",()=>{const Le=A_(be);Le&&B({text:Le,type:"warning",timeout:0},!1),w()}),be.on("show ResizeEditor ResizeWindow NodeChange",()=>{requestAnimationFrame(w)}),be.on("remove",()=>{Ne(i.slice(),Le=>{c().close(Le)})})})(n),{open:B,close:q,getNotifications:ae}},dw=Ia.PluginManager,QO=Ia.ThemeManager;var $L=()=>{const n=()=>{throw new Error("Theme did not provide a WindowManager implementation.")};return{open:n,openUrl:n,alert:n,confirm:n,close:n}};const qx=n=>{let i=[];const c=()=>{const Me=n.theme;return Me&&Me.getWindowManagerImpl?Me.getWindowManagerImpl():$L()},m=(Me,Ve)=>(...gt)=>Ve?Ve.apply(Me,gt):void 0,p=Me=>{n.dispatch("OpenWindow",{dialog:Me})},w=Me=>{n.dispatch("CloseWindow",{dialog:Me})},x=Me=>{i.push(Me),p(Me)},M=Me=>{w(Me),i=At(i,Ve=>Ve!==Me),i.length===0&&n.focus()},B=()=>he.from(i[i.length-1]),q=Me=>{n.editorManager.setActive(n),zP(n),n.ui.show();const Ve=Me();return x(Ve),Ve},ae=(Me,Ve)=>q(()=>c().open(Me,Ve,M)),fe=Me=>q(()=>c().openUrl(Me,M)),be=(Me,Ve,gt)=>{const Ot=c();Ot.alert(Me,m(gt||Ot,Ve))},Le=(Me,Ve,gt)=>{const Ot=c();Ot.confirm(Me,m(gt||Ot,Ve))},Ye=()=>{B().each(Me=>{c().close(Me),M(Me)})};return n.on("remove",()=>{Ne(i,Me=>{c().close(Me)})}),{open:ae,o
2023-11-17 23:02:39 +02:00
\r \v`.indexOf(n)!==-1,qR=(n,i)=>n.substring(i.length),vq=(n,i,c)=>{let m;const p=c.charAt(0);for(m=i-1;m>=0;m--){const w=n.charAt(m);if(wF(w))return he.none();if(p===w&&nr(n,c,m,i))break}return he.some(m)},_F=(n,i,c,m=0)=>{if(!bq(i))return he.none();const p={text:"",offset:0},w=(M,B,q)=>(p.text=q+p.text,p.offset+=B,vq(p.text,p.offset,c).getOr(B)),x=n.getParent(i.startContainer,n.isBlock)||n.getRoot();return XR(n,i.startContainer,i.startOffset,w,x).bind(M=>{const B=i.cloneRange();if(B.setStart(M.container,M.offset),B.setEnd(i.endContainer,i.endOffset),B.collapsed)return he.none();const q=jR(B);return q.lastIndexOf(c)!==0||qR(q,c).length<m?he.none():he.some({text:qR(q,c),range:B,trigger:c})})},GR=(n,i,c,m=0)=>XV(Ke.fromDom(i.startContainer)).fold(()=>_F(n,i,c,m),p=>{const w=n.createRng();w.selectNode(p.dom);const x=jR(w);return he.some({range:w,text:qR(x,c),trigger:c})}),Oq=n=>n.nodeType===eh,yq=n=>n.nodeType===qf,SF=n=>{if(Oq(n))return Dp(n,n.data.length);{const i=n.childNodes;return i.length>0?SF(i[i.length-1]):Dp(n,i.length)}},CF=(n,i)=>{const c=n.childNodes;return c.length>0&&i<c.length?CF(c[i],0):c.length>0&&yq(n)&&c.length===i?SF(c[c.length-1]):Dp(n,i)},wq=(n,i)=>{var c;const m=(c=n.getParent(i.container,n.isBlock))!==null&&c!==void 0?c:n.getRoot();return XR(n,i.container,i.offset,(p,w)=>w===0?-1:w,m).filter(p=>{const w=p.container.data.charAt(p.offset-1);return!wF(w)}).isSome()},_q=n=>i=>{const c=CF(i.startContainer,i.startOffset);return!wq(n,c)},Sq=(n,i,c)=>Ls(c.triggers,m=>GR(n,i,m)),Cq=(n,i)=>{const c=i(),m=n.selection.getRng();return Sq(n.dom,m,c).bind(p=>kq(n,i,p))},kq=(n,i,c,m={})=>{var p;const w=i(),M=(p=n.selection.getRng().startContainer.nodeValue)!==null&&p!==void 0?p:"",B=At(w.lookupByTrigger(c.trigger),ae=>c.text.length>=ae.minChars&&ae.matches.getOrThunk(()=>_q(n.dom))(c.range,M,c.text));if(B.length===0)return he.none();const q=Promise.all(pt(B,ae=>ae.fetch(c.text,ae.maxResults,m).then(be=>({matchText:c.text,items:be,columns:ae.columns,onAction:ae.onAction,highlightOn:ae.highlightOn}))));return he.some({lookupData:q,context:c})};var _1;(function(n){n[n.Error=0]="Error",n[n.Value=1]="Value"})(_1||(_1={}));const YS=(n,i,c)=>n.stype===_1.Error?i(n.serror):c(n.svalue),kF=n=>{const i=[],c=[];return Ne(n,m=>{YS(m,p=>c.push(p),p=>i.push(p))}),{values:i,errors:c}},xF=(n,i)=>n.stype===_1.Error?{stype:_1.Error,serror:i(n.serror)}:n,xq=(n,i)=>n.stype===_1.Value?{stype:_1.Value,svalue:i(n.svalue)}:n,TF=(n,i)=>n.stype===_1.Value?i(n.svalue):n,EF=(n,i)=>n.stype===_1.Error?i(n.serror):n,AF=n=>({stype:_1.Value,svalue:n}),DF=n=>({stype:_1.Error,serror:n}),Xu={fromResult:n=>n.fold(DF,AF),toResult:n=>YS(n,bc.error,bc.value),svalue:AF,partition:kF,serror:DF,bind:TF,bindError:EF,map:xq,mapError:xF,fold:YS},pT=n=>te(n)&&bs(n).length>100?" removed due to size":JSON.stringify(n,null,2),Eq=n=>{const i=n.length>10?n.slice(0,10).concat([{path:[],getErrorInfo:Qe("... (only showing first ten failures)")}]):n;return pt(i,c=>"Failed path: ("+c.path.join(" > ")+`)
2023-11-17 21:22:26 +02:00
`+c.getErrorInfo())},GA=(n,i)=>Xu.serror([{path:n,getErrorInfo:i}]),Aq=(n,i,c)=>GA(n,()=>'Could not find valid *required* value for "'+i+'" in '+pT(c)),PF=(n,i)=>GA(n,()=>'Choice schema did not contain choice key: "'+i+'"'),Dq=(n,i,c)=>GA(n,()=>'The chosen schema: "'+c+'" did not exist in branches: '+pT(i)),Pq=(n,i)=>GA(n,Qe(i)),Mq=(n,i,c,m)=>wo(c,m).fold(()=>Dq(n,c,m),w=>w.extract(n.concat(["branch: "+m]),i)),Rq=(n,i)=>({extract:(p,w)=>wo(w,n).fold(()=>PF(p,n),M=>Mq(p,w,i,M)),toString:()=>"chooseOn("+n+"). Possible values: "+bs(i)}),$q=(n,i)=>i,Rc=(n,i)=>ne(n)&&ne(i)?KA(n,i):i,S1=n=>(...i)=>{if(i.length===0)throw new Error("Can't merge zero objects");const c={};for(let m=0;m<i.length;m++){const p=i[m];for(const w in p)un(p,w)&&(c[w]=n(c[w],p[w]))}return c},KA=S1(Rc),tae=S1($q),MF=()=>({tag:"required",process:{}}),Nq=n=>({tag:"defaultedThunk",process:n}),RF=n=>Nq(Qe(n)),Iq=()=>({tag:"option",process:{}}),$F=(n,i)=>n.length>0?Xu.svalue(KA(i,tae.apply(void 0,n))):Xu.svalue(i),gw=n=>V(Xu.serror,Mr)(n),Bq={consolidateObj:(n,i)=>{const c=Xu.partition(n);return c.errors.length>0?gw(c.errors):$F(c.values,i)},consolidateArr:n=>{const i=Xu.partition(n);return i.errors.length>0?gw(i.errors):Xu.svalue(i.values)}},C1=(n,i,c,m)=>({tag:"field",key:n,newKey:i,presence:c,prop:m}),Lq=(n,i)=>({tag:"custom",newKey:n,instantiator:i}),NF=(n,i,c)=>{switch(n.tag){case"field":return i(n.key,n.newKey,n.presence,n.prop);case"custom":return c(n.newKey,n.instantiator)}},JA=n=>{const i=(m,p)=>Xu.bindError(n(p),w=>Pq(m,w)),c=Qe("val");return{extract:i,toString:c}},Fq=JA(Xu.svalue),KR=(n,i,c,m)=>wo(i,c).fold(()=>Aq(n,c,i),m),JR=(n,i,c,m)=>{const p=wo(n,i).getOrThunk(()=>c(n));return m(p)},Qq=(n,i,c)=>c(wo(n,i)),Zq=(n,i,c,m)=>{const p=wo(n,i).map(w=>w===!0?c(n):w);return m(p)},Hq=(n,i,c,m,p)=>{const w=M=>p.extract(i.concat([m]),M),x=M=>M.fold(()=>Xu.svalue(he.none()),B=>{const q=p.extract(i.concat([m]),B);return Xu.map(q,he.some)});switch(n.tag){case"required":return KR(i,c,m,w);case"defaultedThunk":return JR(c,m,n.process,w);case"option":return Qq(c,m,x);case"defaultedOptionThunk":return Zq(c,m,n.process,x);case"mergeWithThunk":return JR(c,m,Qe({}),M=>{const B=KA(n.process(c),M);return w(B)})}},IF=(n,i,c)=>{const m={},p=[];for(const w of c)NF(w,(x,M,B,q)=>{const ae=Hq(B,n,i,x,q);Xu.fold(ae,fe=>{p.push(...fe)},fe=>{m[M]=fe})},(x,M)=>{m[x]=M(i)});return p.length>0?Xu.serror(p):Xu.svalue(m)},e4=n=>({extract:(m,p)=>IF(m,p,n),toString:()=>`obj{
2023-11-17 20:21:45 +02:00
`+pt(n,p=>NF(p,(w,x,M,B)=>w+" -> "+B.toString(),(w,x)=>"state("+w+")")).join(`
2023-11-17 21:22:26 +02:00
`)+"}"}),t4=n=>({extract:(m,p)=>{const w=pt(p,(x,M)=>n.extract(m.concat(["["+M+"]"]),x));return Bq.consolidateArr(w)},toString:()=>"array("+n.toString()+")"}),e$=n=>JA(i=>n(i).fold(Xu.serror,Xu.svalue)),t$=(n,i,c)=>{const m=i.extract([n],c);return Xu.mapError(m,p=>({input:c,errors:p}))},zq=(n,i,c)=>Xu.toResult(t$(n,i,c)),Vq=n=>`Errors:
2023-11-17 20:21:45 +02:00
`+Eq(n.errors).join(`
`)+`
2023-11-17 23:02:39 +02:00
Input object: `+pT(n.input),BF=(n,i)=>Rq(n,vs(i,e4)),Wq=Qe(Fq),XS=(n,i)=>JA(c=>{const m=typeof c;return n(c)?Xu.svalue(c):Xu.serror(`Expected type: ${i} but got: ${m}`)}),LF=XS(Xe,"number"),n4=XS(L,"string"),FF=XS(we,"boolean"),n$=XS(ce,"function"),pw=C1,QF=Lq,Uq=n=>e$(i=>kt(n,i)?bc.value(i):bc.error(`Unsupported value: "${i}", choose one of "${n.join(", ")}".`)),ZF=(n,i)=>pw(n,n,MF(),i),HF=n=>ZF(n,n4),zF=n=>ZF(n,n$),VF=(n,i)=>pw(n,n,MF(),t4(i)),bT=(n,i)=>pw(n,n,Iq(),i),vT=n=>bT(n,n4),WF=n=>bT(n,n$),Yq=(n,i)=>pw(n,n,RF(i),Wq()),jS=(n,i,c)=>pw(n,n,RF(i),c),UF=(n,i)=>jS(n,i,LF),o4=(n,i)=>jS(n,i,n4),o$=(n,i,c)=>jS(n,i,Uq(c)),s4=(n,i)=>jS(n,i,FF),s$=(n,i)=>jS(n,i,n$),Xq=(n,i,c)=>jS(n,i,t4(c)),oae=HF("type"),sae=zF("fetch"),YF=zF("onAction"),jq=s$("onSetup",()=>ot),rae=vT("text"),qq=vT("icon"),Gq=vT("tooltip"),iae=vT("label"),Kq=s4("active",!1),_l=s4("enabled",!0),r4=s4("primary",!1),$b=n=>Yq("columns",n),qS=n=>o4("type",n),XF=e4([oae,HF("trigger"),UF("minChars",1),$b(1),UF("maxResults",10),WF("matches"),sae,YF,Xq("highlightOn",[],n4)]),Jq=n=>zq("Autocompleter",XF,{trigger:n.ch,...n}),GS=[_l,Gq,qq,rae,jq],i4=[Kq].concat(GS),jF=[s$("predicate",je),o$("scope","node",["node","editor"]),o$("position","selection",["node","selection","line"])],qF=GS.concat([qS("contextformbutton"),r4,YF,QF("original",Bt)]),eG=i4.concat([qS("contextformbutton"),r4,YF,QF("original",Bt)]),tG=GS.concat([qS("contextformbutton")]),nG=i4.concat([qS("contextformtogglebutton")]),oG=BF("type",{contextformbutton:qF,contextformtogglebutton:eG});e4([qS("contextform"),s$("initValue",Qe("")),iae,VF("commands",oG),bT("launch",BF("type",{contextformbutton:tG,contextformtogglebutton:nG}))].concat(jF));const sG=n=>{const i=n.ui.registry.getAll().popups,c=vs(i,x=>Jq(x).fold(M=>{throw new Error(Vq(M))},Bt)),m=fs(Yn(c,x=>x.trigger)),p=po(c);return{dataset:c,triggers:m,lookupByTrigger:x=>At(p,M=>M.trigger===x)}},GF=(n,i)=>{const c=zv(i.load,50);n.on("keypress compositionend",m=>{m.which!==27&&c.throttle()}),n.on("keydown",m=>{const p=m.which;p===8?c.throttle():p===27&&i.cancelIfNecessary()}),n.on("remove",c.cancel)},rG=n=>{const i=Sh(),c=Ga(!1),m=i.isSet,p=()=>{m()&&(BY(n),cr(n),c.set(!1),i.clear())},w=q=>{m()||(Ka(n,q.range),i.set({trigger:q.trigger,matchLength:q.text.length}))},x=Ut(()=>sG(n)),M=q=>i.get().map(ae=>GR(n.dom,n.selection.getRng(),ae.trigger).bind(fe=>kq(n,x,fe,q))).getOrThunk(()=>Cq(n,x)),B=q=>{M(q).fold(p,ae=>{w(ae.context),ae.lookupData.then(fe=>{i.get().map(be=>{const Le=ae.context;be.trigger===Le.trigger&&(Le.text.length-be.matchLength>=10?p():(i.set({...be,matchLength:Le.text.length}),c.get()?CP(n,{lookupData:fe}):(c.set(!0),SP(n,{lookupData:fe}))))})})})};n.addCommand("mceAutocompleterReload",(q,ae)=>{const fe=te(ae)?ae.fetchOptions:{};B(fe)}),n.addCommand("mceAutocompleterClose",p),GF(n,{cancelIfNecessary:p,load:B})},iG=ys().browser.isSafari(),KF=n=>Pe(Ke.fromDom(n)),JF=(n,i)=>{var c;return n.startOffset===0&&n.endOffset===((c=i.textContent)===null||c===void 0?void 0:c.length)},OT=(n,i)=>he.from(n.getParent(i.container(),"details")),r$=(n,i)=>OT(n,i).isSome(),aG=(n,i)=>{const c=he.from(n.getParent(i.startContainer,"details")),m=he.from(n.getParent(i.endContainer,"details"));if(c.isSome()||m.isSome()){const p=c.bind(w=>he.from(n.select("summary",w)[0]));return he.some({startSummary:p,startDetails:c,endDetails:m})}else return he.none()},lG=(n,i)=>cl(i).exists(c=>c.isEqual(n)),lae=(n,i)=>Vd(i).exists(c=>mi(c.getNode())&&Hu(i,c).exists(m=>m.isEqual(n))||c.isEqual(n)),i$=(n,i)=>i.startSummary.exists(c=>lG(n,c)),cG=(n,i)=>i.startSummary.exists(c=>lae(n,c)),uG=(n,i)=>i.startDetails.exists(c=>Hu(c,n).forall(m=>i.startSummary.exists(p=>!p.contains(n.container())&&p.contains(m.container())))),fG=(n,i,c)=>c.startDetails.exists(m=>Hf(n,i).forall(p=>!m.contains(p.container()))),a$=(n,i)=>{const c=i.getNode();ve(c)||n.selection.setCursorLocation(c,i.offset())},e9=(n,i,c)=>{const m=n.dom.getParent(i.container(),"details");if(m&&!m.open){const p=n.dom.select("summary",m)[0];p&&(c?cl(p):Vd(p)).each(x=>a$(n,x))}else a$(n,i)},t9=(n,i)=>{const c=B=>B.contains(n.start
2023-11-17 21:22:26 +02:00
`;return}if(q!=="wbr"){if(p[q]&&(m+=" "),w[q]){m+=" ";return}if(B.type===3&&(m+=B.value),!(B.name in i.getVoidElements())){let fe=B.firstChild;if(fe)do M(fe);while(fe=fe.next)}x[q]&&ae.next&&(m+=`
2023-11-17 20:21:45 +02:00
`,q==="p"&&(m+=`
2023-11-17 21:22:26 +02:00
`))}};return n=kT(n,[/<!\[[^\]]+\]>/g]),M(c.parse(n)),m},E$=n=>(n=kT(n,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/ig,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,(c,m,p)=>!m&&!p?" ":Kr],/<br class="Apple-interchange-newline">/g,/<br>$/i]),n),wK=n=>{let i=0;return()=>n+i++},_K=n=>{const i=n.toLowerCase(),c={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"};return gn.hasOwn(c,i)?"image/"+c[i]:"image/"+i},SK=(n,i)=>{const c=$S({sanitize:cO(n)},n.schema);c.addNodeFilter("meta",p=>{gn.each(p,w=>{w.remove()})});const m=c.parse(i,{forced_root_block:!1,isRootContent:!0});return Y2({validate:!0},n.schema).serialize(m)},Y9=(n,i)=>({content:n,cancelled:i}),CK=(n,i,c)=>{const m=n.dom.create("div",{style:"display:none"},i),p=KE(n,m,c);return Y9(p.node.innerHTML,p.isDefaultPrevented())},kK=(n,i,c)=>{const m=kP(n,i,c),p=SK(n,m.content);return n.hasEventListeners("PastePostProcess")&&!m.isDefaultPrevented()?CK(n,p,c):Y9(p,m.isDefaultPrevented())},X9=(n,i,c)=>kK(n,i,c),A$=(n,i)=>(n.insertContent(i,{merge:Q_(n),paste:!0}),!0),D$=n=>/^https?:\/\/[\w\-\/+=.,!;:&%@^~(){}?#]+$/i.test(n),xK=(n,i)=>D$(i)&&jt(v2(n),c=>Ki(i.toLowerCase(),`.${c.toLowerCase()}`)),TK=(n,i,c)=>(n.undoManager.extra(()=>{c(n,i)},()=>{n.insertContent('<img src="'+i+'">')}),!0),EK=(n,i,c)=>(n.undoManager.extra(()=>{c(n,i)},()=>{n.execCommand("mceInsertLink",!1,i)}),!0),AK=(n,i,c)=>!n.selection.isCollapsed()&&D$(i)?EK(n,i,c):!1,DK=(n,i,c)=>xK(n,i)?TK(n,i,c):!1,j9=(n,i)=>{gn.each([AK,DK,A$],c=>!c(n,i,A$))},PK=(n,i,c)=>{c||!Z_(n)?A$(n,i):j9(n,i)},MK=wK("mceclip"),RK=n=>{const i=S$();return O4(i,n),_$(i),i},q9=(n,i,c,m,p)=>{const w=X9(n,i,c);if(!w.cancelled){const x=w.content,M=()=>PK(n,x,m);p?a4(n,"insertFromPaste",{dataTransfer:RK(x)}).isDefaultPrevented()||(M(),yT(n,"insertFromPaste")):M()}},w4=(n,i,c,m)=>{const p=c||k$(i);q9(n,V9(i),p,!1,m)},P$=(n,i,c)=>{const m=n.dom.encode(i).replace(/\r\n/g,`
2023-11-20 13:56:20 +02:00
`),p=mh(m,wk(n)),w=gK(p,jc(n),db(n));q9(n,w,!1,!0,c)},G9=n=>{const i={};if(n&&n.types)for(let c=0;c<n.types.length;c++){const m=n.types[c];try{i[m]=n.getData(m)}catch{i[m]=""}}return i},k1=(n,i)=>i in n&&n[i].length>0,M$=n=>k1(n,"text/html")||k1(n,"text/plain"),$K=(n,i)=>{const c=i.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return Oe(c)?n.dom.encode(c[1]):void 0},K9=(n,i,c,m)=>{const p=MK(),w=ud(n)&&Oe(c.name),x=w?$K(n,c.name):p,M=w?c.name:void 0,B=i.create(p,c,m,x,M);return i.add(B),B},J9=(n,i)=>{nM(i.uri).each(({data:c,type:m,base64Encoded:p})=>{const w=p?c:btoa(c),x=i.file,M=n.editorUpload.blobCache,B=M.getByData(w,m),q=B!=null?B:K9(n,M,x,w);w4(n,`<img src="${q.blobUri()}">`,!1,!0)})},R$=n=>n.type==="paste",NK=n=>Promise.all(pt(n,i=>O8(i).then(c=>({file:i,uri:c})))),eQ=n=>{const i=v2(n);return c=>Ar(c.type,"image/")&&jt(i,m=>_K(m)===c.type)},IK=(n,i)=>{const c=i.items?$s(Rr(i.items),p=>p.kind==="file"?[p.getAsFile()]:[]):[],m=i.files?Rr(i.files):[];return At(c.length>0?c:m,eQ(n))},$$=(n,i,c)=>{const m=R$(i)?i.clipboardData:i.dataTransfer;if(aO(n)&&m){const p=IK(n,m);if(p.length>0)return i.preventDefault(),NK(p).then(w=>{c&&n.selection.setRng(c),Ne(w,x=>{J9(n,x)})}),!0}return!1},BK=n=>{var i,c;return qn.os.isAndroid()&&((c=(i=n.clipboardData)===null||i===void 0?void 0:i.items)===null||c===void 0?void 0:c.length)===0},tQ=n=>to.metaKeyPressed(n)&&n.keyCode===86||n.shiftKey&&n.keyCode===45,N$=(n,i,c,m,p)=>{let w=E$(c);const x=k1(i,CT())||k$(c),M=!x&&hK(w),B=D$(w);(U9(w)||!w.length||M&&!B)&&(m=!0),(m||B)&&(k1(i,"text/plain")&&M?w=i["text/plain"]:w=yK(w)),!U9(w)&&(m?P$(n,w,p):w4(n,w,x,p))},LK=(n,i,c)=>{let m;const p=()=>i.getLastRng()||n.selection.getRng();n.on("keydown",w=>{tQ(w)&&!w.isDefaultPrevented()&&(m=w.shiftKey&&w.keyCode===86)}),n.on("paste",w=>{if(w.isDefaultPrevented()||BK(w))return;const x=c.get()==="text"||m;m=!1;const M=G9(w.clipboardData);!M$(M)&&$$(n,w,p())||(k1(M,"text/html")?(w.preventDefault(),N$(n,M,M["text/html"],x,!0)):k1(M,"text/plain")&&k1(M,"text/uri-list")?(w.preventDefault(),N$(n,M,M["text/plain"],x,!0)):(i.create(),_g.setEditorTimeout(n,()=>{const B=i.getHtml();i.remove(),N$(n,M,B,x,!1)},0)))})},FK=n=>{const i=p=>Ar(p,"webkit-fake-url"),c=p=>Ar(p,"data:"),m=p=>{var w;return((w=p.data)===null||w===void 0?void 0:w.paste)===!0};n.parser.addNodeFilter("img",(p,w,x)=>{if(!aO(n)&&m(x))for(const M of p){const B=M.attr("src");L(B)&&!M.attr("data-mce-object")&&B!==qn.transparentSrc&&(i(B)||!_k(n)&&c(B))&&M.remove()}})},xT=(n,i,c)=>{LK(n,i,c),FK(n)},QK=(n,i)=>{i.get()==="text"?(i.set("html"),iS(n,!1)):(i.set("text"),iS(n,!0)),n.focus()},ZK=(n,i)=>{n.addCommand("mceTogglePlainTextPaste",()=>{QK(n,i)}),n.addCommand("mceInsertClipboardContent",(c,m)=>{m.html&&w4(n,m.html,m.internal,!1),m.text&&P$(n,m.text,!1)})},nQ=(n,i,c)=>{if(n)try{return n.clearData(),n.setData("text/html",i),n.setData("text/plain",c),n.setData(CT(),i),!0}catch{return!1}else return!1},oQ=(n,i,c,m)=>{nQ(n.clipboardData,i.html,i.text)?(n.preventDefault(),m()):c(i.html,m)},sQ=n=>(i,c)=>{const{dom:m,selection:p}=n,w=m.create("div",{contenteditable:"false","data-mce-bogus":"all"}),x=m.create("div",{contenteditable:"true"},i);m.setStyles(w,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),w.appendChild(x),m.add(n.getBody(),w);const M=p.getRng();x.focus();const B=m.createRng();B.selectNodeContents(x),p.setRng(B),_g.setEditorTimeout(n,()=>{p.setRng(M),m.remove(w),c()},0)},rQ=n=>({html:dK(n.selection.getContent({contextual:!0})),text:n.selection.getContent({format:"text"})}),HK=n=>!!n.dom.getParent(n.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",n.getBody()),iQ=n=>!n.selection.isCollapsed()||HK(n),_4=n=>i=>{!i.isDefaultPrevented()&&iQ(n)&&oQ(i,rQ(n),sQ(n),()=>{if(qn.browser.isChromium()||qn.browser.isFirefox()){const c=n.selection.getRng();_g.setEditorTimeout(n,()=>{n.selection.setRng(c),n.execCommand("Delete")},0)}else n.execCommand("Delete")})},aQ=n=>i=>{!i.isDefaultPrevented()&&iQ(n)&&oQ(i,rQ(n),sQ(n),ot)},lQ=n=>{n.on("cut",_4(n)),n.on("copy",aQ(n))},cQ=(n,i)=>{var c,m;return O.getCaretRangeFromPoint((
`}),n.dom.addStyle(B)}const x=Promise.all(YJ(n,m,c)).then(w).catch(w),M=nO(n);return M&&VJ(n,M),x},XJ=n=>{const i=n.getDoc(),c=n.getBody();wP(n),pp(n)||(i.body.spellcheck=!1,iN.setAttrib(c,"spellcheck","false")),n.quirks=HQ(n),ix(n);const m=mb(n);m!==void 0&&(c.dir=m);const p=m2(n);p&&n.on("BeforeSetContent",w=>{gn.each(p,x=>{w.content=w.content.replace(x,M=>"<!--mce:protected "+escape(M)+"-->")})}),n.on("SetContent",()=>{n.addVisual(n.getBody())}),n.on("compositionstart compositionend",w=>{n.composing=w.type==="compositionstart"})},YQ=n=>{Mb(n)||n.load({initial:!0,format:"html"}),n.startContent=n.getContent({format:"raw"})},lN=n=>{n.removed!==!0&&(YQ(n),UJ(n))},jJ=n=>{let i=!1;const c=setTimeout(()=>{i||n.setProgressState(!0)},500);return()=>{clearTimeout(c),i=!0,n.setProgressState(!1)}},XQ=n=>{const i=n.getElement();let c=n.getDoc();n.inline&&(iN.addClass(i,"mce-content-body"),n.contentDocument=c=document,n.contentWindow=window,n.bodyElement=i,n.contentAreaContainer=i);const m=n.getBody();m.disabled=!0,n.readonly=bg(n),n._editableRoot=R_(n),!n.readonly&&n.hasEditableRoot()&&(n.inline&&iN.getStyle(m,"position",!0)==="static"&&(m.style.position="relative"),m.contentEditable="true"),m.disabled=!1,n.editorUpload=bX(n),n.schema=wh(RT(n)),n.dom=Qr(c,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,update_styles:!0,root_element:n.inline?n.getBody():null,collect:n.inline,schema:n.schema,contentCssCors:lk(n),referrerPolicy:hb(n),onSetAttrib:x=>{n.dispatch("SetAttrib",x)}}),n.parser=_w(n),n.serializer=O1(XO(n),n),n.selection=FM(n.dom,n.getWin(),n.serializer,n),n.annotator=u1(n),n.formatter=VL(n),n.undoManager=GM(n),n._nodeChangeDispatcher=new nK(n),n._selectionOverrides=PJ(n),MR(n),dQ(n),Bj(n),Mb(n)||(nJ(n),sC(n));const p=tK(n);LA(n,p),Gie(n),kX(n),fQ(n);const w=wY(n);XJ(n),w.fold(()=>{const x=jJ(n);UQ(n).then(()=>{lN(n),x()})},x=>{n.setProgressState(!0),UQ(n).then(()=>{x().then(M=>{n.setProgressState(!1),lN(n),OL(n)},M=>{n.notificationManager.open({type:"error",text:String(M)}),lN(n),OL(n)})})})},gae=mt,qJ=(n,i,c)=>t0(n,i,gae,c),$T=Qr.DOM,GJ=(n,i,c,m)=>{const p=Ke.fromTag("iframe");return m.each(w=>Pr(p,"tabindex",w)),Ju(p,c),Ju(p,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:i}),ef(p,"tox-edit-area__iframe"),p},KJ=n=>{let i=Kv(n)+"<html><head>";i1(n)!==n.documentBaseUrl&&(i+='<base href="'+n.documentBaseURI.getURI()+'" />'),i+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';const c=Qf(n),m=al(n),p=n.translate(N_(n));return Qd(n)&&(i+='<meta http-equiv="Content-Security-Policy" content="'+Qd(n)+'" />'),i+=`</head><body id="${c}" class="mce-content-body ${m}" data-id="${n.id}" aria-label="${p}"><br></body></html>`,i},jQ=(n,i)=>{const c=n.translate("Rich Text Area"),m=Va(Ke.fromDom(n.getElement()),"tabindex").bind(ou),p=GJ(n.id,c,gf(n),m).dom;p.onload=()=>{p.onload=null,n.dispatch("load")},n.contentAreaContainer=i.iframeContainer,n.iframeElement=p,n.iframeHTML=KJ(n),$T.add(i.iframeContainer,p)},JJ=n=>{const i=n.iframeElement,c=()=>{n.contentDocument=i.contentDocument,XQ(n)};if(N0(n)||qn.browser.isFirefox()){const m=n.getDoc();m.open(),m.write(n.iframeHTML),m.close(),c()}else{const m=qJ(Ke.fromDom(i),"load",()=>{m.unbind(),c()});i.srcdoc=n.iframeHTML}},qQ=(n,i)=>{jQ(n,i),i.editorContainer&&(i.editorContainer.style.display=n.orgDisplay,n.hidden=$T.isHidden(i.editorContainer)),n.getElement().style.display="none",$T.setAttrib(n.id,"aria-hidden","true"),n.getElement().style.visibility=n.orgVisibility,JJ(n)},GQ=Qr.DOM,cN=(n,i,c)=>{const m=dw.get(c),p=dw.urls[c]||n.documentBaseUrl.replace(/\/$/,"");if(c=gn.trim(c),m&&gn.inArray(i,c)===-1){if(n.plugins[c])return;try{const w=m(n,p)||{};n.plugins[c]=w,ce(w.init)&&(w.init(n,p),i.push(c))}catch(w){lX(n,c,w)}}},eee=n=>n.replace(/^\-/,""),tee=n=>{const i=[];Ne(sO(n),c=>{cN(n,i,eee(c))})},nee=n=>{const i=gn.trim(C_(n)),c=n.ui.registry.getAll().icons,m={...aA.get("default").icons,...aA.get(i).icons};ln(m,(p,w)=>{un(c,w)||n.ui.registry.addIcon(w,p)})},oee=n=>{const i=mm(n);if(L(i)){const c=QO.get(i);n.theme=c(n,QO.urls[i])||{},ce(n.theme.init
Actual: `+Xn.join(","));if(!Yo(k,sn=>ut(Xn,sn)))throw new Error("Not all branches were specified when using match. Specified: "+Xn.join(", ")+`
Required: `+k.join(", "));return dn[pe].apply(null,Fe)},log:dn=>{console.log(dn,{constructors:k,constructor:pe,params:Fe})}}}}),D}},hf={...dg.generate([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}])},cb=(O,k)=>O.length===0?hf.none():O.length===1?hf.only(0):k===0?hf.left(0,1):k===O.length-1?hf.right(k-1,k):k>0&&k<O.length-1?hf.middle(k-1,k,k+1):hf.none(),qs=(O,k,D,N,Y)=>{const se=O.slice(0),pe=cb(O,k),Ee=L(Ct(se,L(0))),Fe=Xn=>N.singleColumnWidth(se[Xn],D),rt=(Xn,Wn)=>Y.calcLeftEdgeDeltas(se,Xn,Wn,D,N.minCellWidth(),N.isRelative),_t=(Xn,Wn,sn)=>Y.calcMiddleDeltas(se,Xn,Wn,sn,D,N.minCellWidth(),N.isRelative),dn=(Xn,Wn)=>Y.calcRightEdgeDeltas(se,Xn,Wn,D,N.minCellWidth(),N.isRelative);return pe.fold(Ee,Fe,rt,_t,dn)},pu=(O,k,D)=>{let N=0;for(let Y=O;Y<k;Y++)N+=D[Y]!==void 0?D[Y]:0;return N},hg=(O,k)=>{const D=Ae.justCells(O);return Ct(D,N=>{const Y=pu(N.column,N.column+N.colspan,k);return{element:N.element,width:Y,colspan:N.colspan}})},Gy=(O,k)=>{const D=Ae.justColumns(O);return Ct(D,(N,Y)=>({element:N.element,width:k[Y],colspan:N.colspan}))},Yi=(O,k)=>{const D=Ae.justCells(O);return Ct(D,N=>{const Y=pu(N.row,N.row+N.rowspan,k);return{element:N.element,height:Y,rowspan:N.rowspan}})},Ky=(O,k)=>Ct(O.all,(D,N)=>({element:D.element,height:k[N]})),mg=O=>Cn(O,(k,D)=>k+D,0),Oa=(O,k)=>Ae.hasColumns(O)?Gy(O,k):hg(O,k),fm=(O,k,D)=>{const N=Oa(O,k);He(N,Y=>{D.setElementWidth(Y.element,Y.width)})},Vt=(O,k,D,N,Y)=>{const se=Ae.fromTable(O),pe=Y.getCellDelta(k),Ee=Y.getWidths(se,Y),Fe=D===se.grid.columns-1,rt=N.clampTableDelta(Ee,D,pe,Y.minCellWidth(),Fe),_t=qs(Ee,D,rt,Y,N),dn=Ct(_t,(Xn,Wn)=>Xn+Ee[Wn]);fm(se,dn,Y),N.resizeTable(Y.adjustTableWidth,rt,Fe)},T0=(O,k,D,N)=>{const Y=Ae.fromTable(O),se=xt(Y,O,N),pe=Ct(se,(_t,dn)=>D===dn?Math.max(k+_t,fc()):_t),Ee=Yi(Y,pe),Fe=Ky(Y,pe);He(Fe,_t=>{of(_t.element,_t.height)}),He(Ee,_t=>{of(_t.element,_t.height)});const rt=mg(pe);of(O,rt)},Jy=(O,k,D,N,Y)=>{const se=Ae.generate(k),pe=N.getWidths(se,N),Ee=N.pixelWidth(),{newSizes:Fe,delta:rt}=Y.calcRedestributedWidths(pe,Ee,D.pixelDelta,N.isRelative);fm(se,Fe,N),N.adjustTableWidth(rt)},E0=(O,k,D,N)=>{const Y=Ae.generate(k),se=N.getWidths(Y,N);fm(Y,se,N)},Ch=O=>je(O,(D,N)=>Qe(D,se=>se.column===N.column)?D:D.concat([N]),[]).sort((D,N)=>D.column-N.column),mf=Lr("col"),ub=Lr("colgroup"),Xv=O=>Wt(O)==="tr"||ub(O),e2=O=>{const k=Pr(O,"colspan",1),D=Pr(O,"rowspan",1);return{element:O,colspan:k,rowspan:D}},jv=(O,k=e2)=>{const D=Ee=>mf(Ee.element)?O.col(Ee):O.cell(Ee),N=Ee=>ub(Ee.element)?O.colgroup(Ee):O.row(Ee),Y=Ee=>{if(Xv(Ee))return N({element:Ee});{const Fe=Ee,rt=D(k(Fe));return se=ce.some({item:Fe,replacement:rt}),rt}};let se=ce.none();return{getOrInit:(Ee,Fe)=>se.fold(()=>Y(Ee),rt=>Fe(Ee,rt.item)?rt.replacement:Y(Ee))}},A0=O=>k=>{const D=[],N=(pe,Ee)=>he(D,Fe=>Ee(Fe.item,pe)),Y=pe=>{const Ee=O==="td"?{scope:null}:{},Fe=k.replace(pe,O,Ee);return D.push({item:pe,sub:Fe}),Fe};return{replaceOrInit:(pe,Ee)=>{if(Xv(pe)||mf(pe))return pe;{const Fe=pe;return N(Fe,Ee).fold(()=>Y(Fe),rt=>Ee(pe,rt.item)?rt.sub:Y(Fe))}}}},kh=O=>Ge(O,"scope").map(k=>k.substr(0,3)),Fu={modification:jv,transform:A0,merging:O=>({unmerge:N=>{const Y=kh(N);return Y.each(se=>Yr(N,"scope",se)),()=>{const se=O.cell({element:N,colspan:1,rowspan:1});return Ec(se,"width"),Ec(N,"width"),Y.each(pe=>Yr(se,"scope",pe)),se}},merge:N=>{const Y=()=>{const se=Ii(Ct(N,kh));if(se.length===0)return ce.none();{const pe=se[0],Ee=["row","col"];return Qe(se,rt=>rt!==pe&&ut(Ee,rt))?ce.none():ce.from(pe)}};return Ec(N[0],"width"),Y().fold(()=>qe(N[0],"scope"),se=>Yr(N[0],"scope",se+"group")),L(N[0])}})},zl=["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"],t2=(O,k)=>{const D=O.property().name(k);return ut(["ol","ul"],D)},hp=(O,k)=>{const D=O.property().name(k);return ut(zl,D)},O_=(O,k)=>ut(["br","img","hr","input"],O.property().name(k)),D0=on(),s1=O=>hp(D0,O),n2=O=>t2(D0,O),qv=O=>O_(D0
2023-11-17 23:02:39 +02:00
`+g.getErrorInfo())},Ym=(r,f)=>Wi.serror([{path:r,getErrorInfo:f}]),jg=(r,f,g)=>Ym(r,()=>'Could not find valid *required* value for "'+f+'" in '+t0(g)),Mv=(r,f)=>Ym(r,()=>'Choice schema did not contain choice key: "'+f+'"'),Rf=(r,f,g)=>Ym(r,()=>'The chosen schema: "'+g+'" did not exist in branches: '+t0(f)),xy=(r,f)=>Ym(r,()=>"There are unsupported fields: ["+f.join(", ")+"] specified"),Nu=(r,f)=>Ym(r,G(f)),nf=r=>{const f=(v,_)=>Wi.bindError(r(_),T=>Nu(v,T)),g=G("val");return{extract:f,toString:g}},n0=nf(Wi.svalue),o0=(r,f,g,v)=>ln(f,g).fold(()=>jg(r,g,f),v),s0=(r,f,g,v)=>{const _=ln(r,f).getOrThunk(()=>g(r));return v(_)},q1=(r,f,g)=>g(ln(r,f)),nd=(r,f,g,v)=>{const _=ln(r,f).map(T=>T===!0?g(r):T);return v(_)},r0=(r,f,g,v,_)=>{const T=I=>_.extract(f.concat([v]),I),P=I=>I.fold(()=>Wi.svalue(V.none()),W=>{const J=_.extract(f.concat([v]),W);return Wi.map(J,V.some)});switch(r.tag){case"required":return o0(f,g,v,T);case"defaultedThunk":return s0(g,v,r.process,T);case"option":return q1(g,v,P);case"defaultedOptionThunk":return nd(g,v,r.process,P);case"mergeWithThunk":return s0(g,v,G({}),I=>{const W=ni(r.process(g),I);return T(W)})}},i0=(r,f,g)=>{const v={},_=[];for(const T of g)ah(T,(P,I,W,J)=>{const ie=r0(W,r,f,P,J);Wi.fold(ie,de=>{_.push(...de)},de=>{v[I]=de})},(P,I)=>{v[P]=I(f)});return _.length>0?Wi.serror(_):Wi.svalue(v)},pl=r=>({extract:(v,_)=>r().extract(v,_),toString:()=>r().toString()}),Ty=r=>Xs(Ls(r,Q)),_i=r=>{const f=fo(r),g=so(r,(_,T)=>ah(T,P=>ni(_,{[P]:!0}),G(_)),{});return{extract:(_,T)=>{const P=E(T)?[]:Ty(T),I=Kn(P,W=>!Qi(g,W));return I.length===0?f.extract(_,T):xy(_,I)},toString:f.toString}},fo=r=>({extract:(v,_)=>i0(v,_,r),toString:()=>`obj{
2023-11-17 20:21:45 +02:00
`+je(r,_=>ah(_,(T,P,I,W)=>T+" -> "+W.toString(),(T,P)=>"state("+T+")")).join(`
2023-11-20 13:52:33 +02:00
`)+"}"}),Dd=r=>({extract:(v,_)=>{const T=je(_,(P,I)=>r.extract(v.concat(["["+I+"]"]),P));return j1.consolidateArr(T)},toString:()=>"array("+r.toString()+")"}),Jn=(r,f)=>{const g=f!==void 0?f:we;return{extract:(T,P)=>{const I=[];for(const W of r){const J=W.extract(T,P);if(J.stype===Ko.Value)return{stype:Ko.Value,svalue:g(J.svalue)};I.push(J)}return j1.consolidateArr(I)},toString:()=>"oneOf("+je(r,T=>T.toString()).join(", ")+")"}},Ac=(r,f)=>{const g=(T,P)=>Dd(nf(r)).extract(T,P);return{extract:(T,P)=>{const I=Xs(P),W=g(T,I);return Wi.bind(W,J=>{const ie=je(J,de=>Ca(de,de,wr(),f));return fo(ie).extract(T,P)})},toString:()=>"setOf("+f.toString()+")"}},$f=(r,f)=>{const g=Mi(f);return{extract:(T,P)=>g().extract(T,P),toString:()=>g().toString()}},ch=ne(Dd,fo),Vc=G(n0),qg=(r,f)=>nf(g=>{const v=typeof g;return r(g)?Wi.svalue(g):Wi.serror(`Expected type: ${f} but got: ${v}`)}),Pd=qg(U,"number"),bl=qg(d,"string"),Iu=qg(E,"boolean"),Wp=qg(F,"function"),G1=r=>{if(Object(r)!==r)return!0;switch({}.toString.call(r).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(r).every(f=>G1(r[f]));default:return!1}},_n=nf(r=>G1(r)?Wi.svalue(r):Wi.serror("Expected value to be acceptable for sending via postMessage")),Xm=(r,f,g,v)=>ln(g,v).fold(()=>Rf(r,g,v),T=>T.extract(r.concat(["branch: "+v]),f)),Md=(r,f)=>({extract:(_,T)=>ln(T,r).fold(()=>Mv(_,r),I=>Xm(_,T,f,I)),toString:()=>"chooseOn("+r+"). Possible values: "+Xs(f)}),uh=()=>Dd(n0),of=r=>nf(f=>r(f).fold(Wi.serror,Wi.svalue)),K1=(r,f)=>Ac(g=>Wi.fromResult(r(g)),f),mi=(r,f,g)=>{const v=f.extract([r],g);return Wi.mapError(v,_=>({input:g,errors:_}))},Ui=(r,f,g)=>Wi.toResult(mi(r,f,g)),ba=r=>r.fold(f=>{throw new Error(Rd(f))},we),Es=(r,f,g)=>ba(Ui(r,f,g)),Rd=r=>`Errors:
2023-11-17 20:21:45 +02:00
`+td(r.errors).join(`
`)+`
2023-11-20 13:52:33 +02:00
Input object: `+t0(r.input),xl=(r,f)=>Md(r,Ns(f,fo)),sf=(r,f)=>$f(r,f),Wa=Ca,ka=iu,Up=r=>of(f=>st(r,f)?wn.value(f):wn.error(`Unsupported value: "${f}", choose one of "${r.join(", ")}".`)),nn=r=>Wa(r,r,wr(),Vc()),Kr=(r,f)=>Wa(r,r,wr(),f),a0=r=>Kr(r,Pd),xa=r=>Kr(r,bl),Ua=(r,f)=>Wa(r,r,wr(),Up(f)),Gg=r=>Kr(r,Iu),Wc=r=>Kr(r,Wp),od=(r,f)=>Wa(r,r,lh(),nf(g=>Wi.serror("The field: "+r+" is forbidden. "+f))),sd=(r,f)=>Wa(r,r,wr(),fo(f)),Yp=(r,f)=>Wa(r,r,wr(),ch(f)),Hl=(r,f)=>Wa(r,r,wr(),Dd(f)),Er=r=>Wa(r,r,lh(),Vc()),Ya=(r,f)=>Wa(r,r,lh(),f),fh=r=>Ya(r,Pd),Jl=r=>Ya(r,bl),l0=(r,f)=>Ya(r,Up(f)),jm=r=>Ya(r,Wp),J1=(r,f)=>Ya(r,Dd(f)),Xa=(r,f)=>Ya(r,fo(f)),hc=(r,f)=>Ya(r,_i(f)),xt=(r,f)=>Wa(r,r,ed(f),Vc()),Dc=(r,f,g)=>Wa(r,r,ed(f),g),au=(r,f)=>Dc(r,f,Pd),mc=(r,f)=>Dc(r,f,bl),Bu=(r,f,g)=>Dc(r,f,Up(g)),ja=(r,f)=>Dc(r,f,Iu),qa=(r,f)=>Dc(r,f,Wp),qm=(r,f)=>Dc(r,f,_n),lu=(r,f,g)=>Dc(r,f,Dd(g)),c0=(r,f,g)=>Dc(r,f,fo(g)),Ho=r=>{let f=r;return{get:()=>f,set:_=>{f=_}}},j={generate:r=>{if(!y(r))throw new Error("cases must be an array");if(r.length===0)throw new Error("there must be at least one case");const f=[],g={};return mt(r,(v,_)=>{const T=Xs(v);if(T.length!==1)throw new Error("one and only one name per case");const P=T[0],I=v[P];if(g[P]!==void 0)throw new Error("duplicate key detected:"+P);if(P==="cata")throw new Error("cannot have a case named cata (sorry)");if(!y(I))throw new Error("case arguments must be an array");f.push(P),g[P]=(...W)=>{const J=W.length;if(J!==I.length)throw new Error("Wrong number of arguments to case "+P+". Expected "+I.length+" ("+I+"), got "+J);return{fold:(...de)=>{if(de.length!==r.length)throw new Error("Wrong number of arguments to fold. Expected "+r.length+", got "+de.length);return de[_].apply(null,W)},match:de=>{const ge=Xs(de);if(f.length!==ge.length)throw new Error("Wrong number of arguments to match. Expected: "+f.join(",")+`
2023-11-17 23:02:39 +02:00
Actual: `+ge.join(","));if(!Gt(f,Ie=>st(ge,Ie)))throw new Error("Not all branches were specified when using match. Specified: "+ge.join(", ")+`
2023-11-20 13:56:20 +02:00
Required: `+f.join(", "));return de[P].apply(null,W)},log:de=>{console.log(de,{constructors:f,constructor:P,params:W})}}}}),g}};j.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const ye=r=>{const f=[],g=[];return mt(r,v=>{v.fold(_=>{f.push(_)},_=>{g.push(_)})}),{errors:f,values:g}},Pe=(r,f)=>{const g={};return dr(r,(v,_)=>{st(f,_)||(g[_]=v)}),g},ct=(r,f)=>({[r]:f}),Ft=r=>{const f={};return mt(r,g=>{f[g.key]=g.value}),f},Sn=(r,f)=>Pe(r,f),In=(r,f)=>ct(r,f),Uo=r=>Ft(r),ts=(r,f)=>r.length===0?wn.value(f):wn.value(ni(f,Ad.apply(void 0,r))),Si=r=>wn.error(pt(r)),sr=(r,f)=>{const g=ye(r);return g.errors.length>0?Si(g.errors):ts(g.values,f)},_r=r=>F(r)?r:tt,Uc=(r,f,g)=>{let v=r.dom;const _=_r(g);for(;v.parentNode;){v=v.parentNode;const T=lt.fromDom(v),P=f(T);if(P.isSome())return P;if(_(T))break}return V.none()},cu=(r,f,g)=>{const v=f(r),_=_r(g);return v.orThunk(()=>_(r)?V.none():Uc(r,f,_))},rf=(r,f)=>xr(r.element,f.event.target),Nf={can:ot,abort:tt,run:L},dh=r=>{if(!Qi(r,"can")&&!Qi(r,"abort")&&!Qi(r,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(r,null,2)+" does not have can, abort, or run!");return{...Nf,...r}},hh=(r,f)=>(...g)=>Yo(r,(v,_)=>v&&f(_).apply(void 0,g),!0),hr=(r,f)=>(...g)=>Yo(r,(v,_)=>v||f(_).apply(void 0,g),!1),Gm=r=>F(r)?{can:ot,abort:tt,run:r}:r,Km=r=>{const f=hh(r,_=>_.can),g=hr(r,_=>_.abort);return{can:f,abort:g,run:(..._)=>{mt(r,T=>{T.run.apply(void 0,_)})}}},oa=G,uu=oa("touchstart"),Xp=oa("touchmove"),Jm=oa("touchend"),Ps=oa("touchcancel"),Fr=oa("mousedown"),Ma=oa("mousemove"),gc=oa("mouseout"),eb=oa("mouseup"),Tl=oa("mouseover"),Gi=oa("focusin"),fu=oa("focusout"),If=oa("keydown"),Jw=oa("keyup"),om=oa("input"),Kg=oa("change"),sm=oa("click"),eg=oa("transitioncancel"),Jg=oa("transitionend"),u0=oa("transitionstart"),rm=oa("selectstart"),Ra=r=>G("alloy."+r),mh={tap:Ra("tap")},$d=Ra("focus"),tg=Ra("blur.post"),ng=Ra("paste.post"),im=Ra("receive"),af=Ra("execute"),f0=Ra("focus.item"),tb=mh.tap,e_=Ra("longpress"),$a=Ra("sandbox.close"),ep=Ra("typeahead.cancel"),og=Ra("system.init"),du=Ra("system.touchmove"),Bf=Ra("system.touchend"),sg=Ra("system.scroll"),gh=Ra("system.resize"),Lu=Ra("system.attached"),Nd=Ra("system.detached"),rg=Ra("system.dismissRequested"),d0=Ra("system.repositionRequested"),Rv=Ra("focusmanager.shifted"),$v=Ra("slotcontainer.visibility"),ph=Ra("system.external.element.scroll"),tp=Ra("change.tab"),Nv=Ra("dismiss.tab"),ig=Ra("highlight"),Iv=Ra("dehighlight"),rr=(r,f)=>{np(r,r.element,f,{})},Ao=(r,f,g)=>{np(r,r.element,f,g)},bh=r=>{rr(r,af())},nb=(r,f,g)=>{np(r,f,g,{})},np=(r,f,g,v)=>{const _={target:f,...v};r.getSystem().triggerEvent(g,f,_)},WC=(r,f,g,v)=>{const _={...v,target:f};r.getSystem().triggerEvent(g,f,_)},Bv=(r,f,g,v)=>{r.getSystem().triggerEvent(g,f,v.event)},li=r=>Uo(r),Lv=(r,f)=>({key:r,value:dh({abort:f})}),ob=(r,f)=>({key:r,value:dh({can:f})}),Ey=r=>({key:r,value:dh({run:(f,g)=>{g.event.prevent()}})}),on=(r,f)=>({key:r,value:dh({run:f})}),Id=(r,f,g)=>({key:r,value:dh({run:(v,_)=>{f.apply(void 0,[v,_].concat(g))}})}),t_=r=>f=>on(r,f),h0=r=>f=>({key:r,value:dh({run:(g,v)=>{rf(g,v)&&f(g,v)}})}),UC=(r,f)=>on(r,(g,v)=>{g.getSystem().getByUid(f).each(_=>{Bv(_,_.element,r,v)})}),ag=(r,f,g)=>{const v=f.partUids[g];return UC(r,v)},Ay=(r,f)=>on(r,(g,v)=>{const _=v.event,T=g.getSystem().getByDom(_.target).getOrThunk(()=>cu(_.target,I=>g.getSystem().getByDom(I).toOptional(),tt).getOr(g));f(g,T,v)}),am=r=>on(r,(f,g)=>{g.cut()}),Bd=r=>on(r,(f,g)=>{g.stop()}),lg=(r,f)=>h0(r)(f),Ci=h0(Lu()),Ld=h0(Nd()),Fd=h0(og()),hu=t_(af()),Qs=(r,f)=>{const v=(f||document).createElement("div");return v.innerHTML=r,Xl(lt.fromDom(v))},jp=r=>r.dom.innerHTML,vh=(r,f)=>{const v=ca(r).dom,_=lt.fromDom(v.createDocumentFragment()),T=Qs(f,v);tf(_,T),ii(r),il(r,_)},op=r=>{const f=lt.fromTag("div"),g=lt.fromDom(r.dom.cloneNode(!0));return il(f,g),jp(f)},YC=(r,f)=>lt.fromDom(r.dom.cloneNode(f)),m0=r=>YC(r,!1),Fv=r=>{if(De(r))return"#shadow-root";{const f=m0(r);return op(f)}},El=r=>Fv(r),TE=(r,f,g)=>xr(f,r.ele
2023-11-17 20:21:45 +02:00
Originator: `+El(v)+`
Target: `+El(_)+`
Check the `+$d()+" event handlers"),!1):!0})]);var Al=Object.freeze({__proto__:null,events:sp});let Dy=0;const io=r=>{const g=new Date().getTime(),v=Math.floor(Math.random()*1e9);return Dy++,r+"_"+v+Dy+String(g)},Py=G("alloy-id-"),XC=G("data-alloy-id"),My=Py(),lm=XC(),lf=(r,f)=>{const g=io(My+r);return Oh(f,g),g},Oh=(r,f)=>{Object.defineProperty(r.dom,lm,{value:f,writable:!0})},rp=r=>{const f=yr(r)?r.dom[lm]:null;return V.from(f)},yh=r=>io(r),g0=we,Lf=r=>{const f=_=>`The component must be in a context to execute: ${_}`+(r?`
2023-11-17 21:22:26 +02:00
`+El(r().element)+" is not in context.":""),g=_=>()=>{throw new Error(f(_))},v=_=>()=>{console.warn(f(_))};return{debugInfo:G("fake"),triggerEvent:v("triggerEvent"),triggerFocus:v("triggerFocus"),triggerEscape:v("triggerEscape"),broadcast:v("broadcast"),broadcastOn:v("broadcastOn"),broadcastEvent:v("broadcastEvent"),build:g("build"),buildOrPatch:g("buildOrPatch"),addToWorld:g("addToWorld"),removeFromWorld:g("removeFromWorld"),addToGui:g("addToGui"),removeFromGui:g("removeFromGui"),getByUid:g("getByUid"),getByDom:g("getByDom"),isConnected:tt}},ip=Lf(),Ry=(r,f,g)=>{const v=g.toString(),_=v.indexOf(")")+1,T=v.indexOf("("),P=v.substring(T+1,_-1).split(/,\s*/);return r.toFunctionAnnotation=()=>({name:f,parameters:qp(P.slice(0,1).concat(P.slice(3)))}),r},qp=r=>je(r,f=>Zi(f,"/*")?f.substring(0,f.length-2):f),rd=(r,f)=>{const g=r.toString(),v=g.indexOf(")")+1,_=g.indexOf("("),T=g.substring(_+1,v-1).split(/,\s*/);return r.toFunctionAnnotation=()=>({name:f,parameters:qp(T)}),r},$y=(r,f)=>{const g=f.toString(),v=g.indexOf(")")+1,_=g.indexOf("("),T=g.substring(_+1,v-1).split(/,\s*/);return r.toFunctionAnnotation=()=>({name:"OVERRIDE",parameters:qp(T.slice(1))}),r},wh=io("alloy-premade"),Qv=r=>(Object.defineProperty(r.element.dom,wh,{value:r.uid,writable:!0}),In(wh,r)),n_=r=>vs(r.dom,wh),Ny=r=>ln(r,wh),ap=r=>$y((f,...g)=>r(f.getApis(),f,...g),r),Ff={init:()=>mu({readState:G("No State required")})},mu=r=>r,lp=(r,f)=>{const g=je(f,_=>Xa(_.name(),[nn("config"),xt("state",Ff)])),v=Ui("component.behaviours",fo(g),r.behaviours).fold(_=>{throw new Error(Rd(_)+`
2023-11-17 20:21:45 +02:00
Complete spec:
2023-11-17 23:02:39 +02:00
`+JSON.stringify(r,null,2))},we);return{list:f,data:Ns(v,_=>{const T=_.map(P=>({config:P.config,state:P.state.init(P.config)}));return G(T)})}},Iy=r=>r.list,o_=r=>r.data,p0=(r,f)=>{const g={};return dr(r,(v,_)=>{dr(v,(T,P)=>{const I=ln(g,P).getOr([]);g[P]=I.concat([f(_,T)])})}),g},Yc=r=>({classes:R(r.classes)?[]:r.classes,attributes:R(r.attributes)?{}:r.attributes,styles:R(r.styles)?{}:r.styles}),b0=(r,f)=>({...r,attributes:{...r.attributes,...f.attributes},styles:{...r.styles,...f.styles},classes:r.classes.concat(f.classes)}),cf=(r,f,g,v)=>{const _={...f};mt(g,ie=>{_[ie.name()]=ie.exhibit(r,v)});const T=p0(_,(ie,de)=>({name:ie,modification:de})),P=ie=>so(ie,(de,ge)=>({...ge.modification,...de}),{}),I=so(T.classes,(ie,de)=>de.modification.concat(ie),[]),W=P(T.attributes),J=P(T.styles);return Yc({classes:I,attributes:W,styles:J})},cp=(r,f,g,v)=>{try{const _=ps(g,(T,P)=>{const I=T[f],W=P[f],J=v.indexOf(I),ie=v.indexOf(W);if(J===-1)throw new Error("The ordering for "+r+" does not have an entry for "+I+`.
2023-11-17 20:21:45 +02:00
Order specified: `+JSON.stringify(v,null,2));if(ie===-1)throw new Error("The ordering for "+r+" does not have an entry for "+W+`.
2023-11-17 23:02:39 +02:00
Order specified: `+JSON.stringify(v,null,2));return J<ie?-1:ie<J?1:0});return wn.value(_)}catch(_){return wn.error([_])}},cm=(r,f)=>({handler:r,purpose:f}),Zv=(r,f)=>({cHandler:r,purpose:f}),s_=(r,f)=>Zv(Re.apply(void 0,[r.handler].concat(f)),r.purpose),Gp=r=>r.cHandler,By=(r,f)=>({name:r,handler:f}),up=(r,f)=>{const g={};return mt(r,v=>{g[v.name()]=v.handlers(f)}),g},v0=(r,f,g)=>{const v={...g,...up(f,r)};return p0(v,By)},sb=(r,f,g,v)=>{const _=v0(r,g,v);return jC(_,f)},Ly=r=>{const f=Gm(r);return(g,v,..._)=>{const T=[g,v].concat(_);f.abort.apply(void 0,T)?v.stop():f.can.apply(void 0,T)&&f.run.apply(void 0,T)}},Fy=(r,f)=>wn.error(["The event ("+r+`) has more than one behaviour that listens to it.
2023-11-17 20:21:45 +02:00
When this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).
2023-11-17 23:02:39 +02:00
The behaviours that can trigger it are: `+JSON.stringify(je(f,g=>g.name),null,2)]),r_=(r,f,g)=>{const v=f[g];return v?cp("Event: "+g,"name",r,v).map(_=>{const T=je(_,P=>P.handler);return Km(T)}):Fy(g,r)},jC=(r,f)=>{const g=aa(r,(v,_)=>(v.length===1?wn.value(v[0].handler):r_(v,f,_)).map(P=>{const I=Ly(P),W=v.length>1?Kn(f[_],J=>rn(v,ie=>ie.name===J)).join(" > "):v[0].name;return In(_,cm(I,W))}));return sr(g,{})},Qr="alloy.base.behaviour",Hv=fo([Wa("dom","dom",wr(),fo([nn("tag"),xt("styles",{}),xt("classes",[]),xt("attributes",{}),Er("value"),Er("innerHtml")])),nn("components"),nn("uid"),xt("events",{}),xt("apis",{}),Wa("eventOrder","eventOrder",Mf({[af()]:["disabling",Qr,"toggling","typeaheadevents"],[$d()]:[Qr,"focusing","keying"],[og()]:[Qr,"disabling","toggling","representing"],[om()]:[Qr,"representing","streaming","invalidating"],[Nd()]:[Qr,"representing","item-events","tooltipping"],[Fr()]:["focusing",Qr,"item-type-events"],[uu()]:["focusing",Qr,"item-type-events"],[Tl()]:["item-type-events","tooltipping"],[im()]:["receiving","reflecting","tooltipping"]}),Vc()),Er("domModification")]),Qy=r=>Ui("custom.definition",Hv,r),Zy=r=>({...r.dom,uid:r.uid,domChildren:je(r.components,f=>f.element)}),O0=r=>r.domModification.fold(()=>Yc({}),Yc),qC=r=>r.events,um=(r,f)=>{const g=zi(r,f);return g===void 0||g===""?[]:g.split(" ")},Ga=(r,f,g)=>{const _=um(r,f).concat([g]);return qn(r,f,_.join(" ")),!0},y0=(r,f,g)=>{const v=Kn(um(r,f),_=>_!==g);return v.length>0?qn(r,f,v.join(" ")):Ue(r,f),!1},rb=r=>r.dom.classList!==void 0,i_=r=>um(r,"class"),w0=(r,f)=>Ga(r,"class",f),Hy=(r,f)=>y0(r,"class",f),Na=(r,f)=>{rb(r)?r.dom.classList.add(f):w0(r,f)},_h=r=>{(rb(r)?r.dom.classList:i_(r)).length===0&&Ue(r,"class")},va=(r,f)=>{rb(r)?r.dom.classList.remove(f):Hy(r,f),_h(r)},uf=(r,f)=>rb(r)&&r.dom.classList.contains(f),cg=(r,f)=>{mt(f,g=>{Na(r,g)})},Xc=(r,f)=>{mt(f,g=>{va(r,g)})},GC=(r,f)=>Gt(f,g=>uf(r,g)),zy=r=>{const f=r.dom.classList,g=new Array(f.length);for(let v=0;v<f.length;v++){const _=f.item(v);_!==null&&(g[v]=_)}return g},id=r=>rb(r)?zy(r):i_(r),Ia=r=>r.dom.value,Ta=(r,f)=>{if(f===void 0)throw new Error("Value.set was undefined");r.dom.value=f},KC=(r,f,g)=>Hc(r,f).map(_=>{if(g.exists(P=>!xr(P,_))){const P=g.map(gl).getOr("span"),I=lt.fromTag(P);return Sa(_,I),I}else return _}),Sh=(r,f,g)=>{g.fold(()=>il(r,f),v=>{xr(v,f)||(Sa(v,f),Mu(v))})},_0=(r,f,g)=>{const v=je(f,g),_=Xl(r);return mt(_.slice(v.length),Mu),v},zv=(r,f,g,v)=>{const _=Hc(r,f),T=v(g,_),P=KC(r,f,_);return Sh(r,T.element,P),T},ad=(r,f,g)=>_0(r,f,(v,_)=>zv(r,_,v,g)),ff=(r,f)=>_0(r,f,(g,v)=>{const _=Hc(r,v);return Sh(r,g,_),g}),Kp=(r,f)=>{const g=Xs(r),v=Xs(f),_=At(v,g),T=Rr(r,(P,I)=>!vs(f,I)||P!==f[I]).t;return{toRemove:_,toSet:T}},ib=(r,f)=>{const{class:g,style:v,..._}=It(f),{toSet:T,toRemove:P}=Kp(r.attributes,_),I=()=>{mt(P,Yt=>Ue(f,Yt)),Zm(f,T)},W=ri(f),{toSet:J,toRemove:ie}=Kp(r.styles,W),de=()=>{mt(ie,Yt=>ks(f,Yt)),yi(f,J)},ge=id(f),_e=At(ge,r.classes),Ie=At(r.classes,ge),it=()=>{cg(f,Ie),Xc(f,_e)},Qt=Yt=>{vh(f,Yt)},dt=()=>{const Yt=r.domChildren;ff(f,Yt)},ft=()=>{const Yt=f,Dt=r.value.getOrUndefined();Dt!==Ia(Yt)&&Ta(Yt,Dt!=null?Dt:"")};return I(),it(),de(),r.innerHtml.fold(dt,Qt),ft(),f},S0=r=>{const f=lt.fromTag(r.tag);Zm(f,r.attributes),cg(f,r.classes),yi(f,r.styles),r.innerHtml.each(v=>vh(f,v));const g=r.domChildren;return tf(f,g),r.value.each(v=>{Ta(f,v)}),f},C0=(r,f)=>{try{const g=ib(r,f);return V.some(g)}catch{return V.none()}},a_=r=>r.innerHtml.isSome()&&r.domChildren.length>0,Vy=(r,f)=>{const g=_=>gl(_)===r.tag&&!a_(r)&&!n_(_),v=f.filter(g).bind(_=>C0(r,_)).getOrThunk(()=>S0(r));return Oh(v,r.uid),v},JC=r=>{const f=ln(r,"behaviours").getOr({});return Ne(Xs(f),g=>{const v=f[g];return Q(v)?[v.me]:[]})},l_=(r,f)=>lp(r,f),c_=r=>{const f=JC(r);return l_(r,f)},Wy=(r,f,g)=>{const v=Zy(r),_=O0(r),T={"alloy.base.modification":_},P=f.length>0?cf(g,T,f,v):_;return b0(v,P)},u_=(r,f,g)=>{const v={"alloy.base.behaviour":qC(r)};return sb(g,r.eventOrder,f,v).getOrDie()},EE=(r,f)=>{const g=()=>Yt,v=Ho(ip),_=ba(Qy(r)),T=c_(r),P=Iy(T),I=o_(T),W=Wy(_,P,I),J=Vy(W,f),ie=u_(_,P,I),d
2023-11-20 13:52:33 +02:00
`);return kt(f,g=>g.indexOf("alloy")>0&&!rn(nk,v=>g.indexOf(v)>-1)).getOr(lb)}else return lb},k0={logEventCut:L,logEventStopped:L,logNoParent:L,logEventNoHandlers:L,logEventResponse:L,write:L},x0=(r,f,g)=>g_(r,f,g),b_=G(k0),qy=G([nn("menu"),nn("selectedMenu")]),n1=G([nn("item"),nn("selectedItem")]);G(fo(n1().concat(qy())));const v_=G(fo(n1())),o1=sd("initSize",[nn("numColumns"),nn("numRows")]),dg=()=>Kr("markers",v_()),Yv=()=>sd("markers",[nn("backgroundMenu")].concat(qy()).concat(n1())),hf=r=>sd("markers",je(r,nn)),cb=(r,f,g)=>(p_(),Wa(f,f,g,of(v=>wn.value((..._)=>v.apply(void 0,_))))),qs=r=>cb("onHandler",r,ed(L)),pu=r=>cb("onKeyboardHandler",r,ed(V.none)),hg=r=>cb("onHandler",r,wr()),Gy=r=>cb("onKeyboardHandler",r,wr()),Yi=(r,f)=>ka(r,G(f)),Ky=r=>ka(r,we),mg=G(o1),Oa=(r,f,g,v,_,T,P,I=!1)=>({x:r,y:f,bubble:g,direction:v,placement:_,restriction:T,label:`${P}-${_}`,alwaysFit:I}),fm=j.generate([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Vt=(r,f,g,v,_,T,P,I,W)=>r.fold(f,g,v,_,T,P,I,W),T0=(r,f,g,v)=>r.fold(f,f,v,v,f,v,g,g),Jy=(r,f,g,v)=>r.fold(f,v,f,v,g,g,f,v),E0=fm.southeast,Ch=fm.southwest,mf=fm.northeast,ub=fm.northwest,Xv=fm.south,e2=fm.north,jv=fm.east,A0=fm.west,kh=(r,f,g,v)=>{const _=r+f;return _>v?g:_<g?v:_},cd=(r,f,g)=>Math.min(Math.max(r,f),g),Fu=(r,f)=>{switch(f){case 1:return r.x;case 0:return r.x+r.width;case 2:return r.y;case 3:return r.y+r.height}},zl=(r,f)=>An(["left","right","top","bottom"],g=>ln(f,g).map(v=>Fu(r,v))),t2=(r,f,g)=>{const v=(W,J)=>f[W].map(ie=>{const de=W==="top"||W==="bottom",ge=de?g.top:g.left,Ie=(W==="left"||W==="top"?Math.max:Math.min)(ie,J)+ge;return de?cd(Ie,r.y,r.bottom):cd(Ie,r.x,r.right)}).getOr(J),_=v("left",r.x),T=v("top",r.y),P=v("right",r.right),I=v("bottom",r.bottom);return ai(_,T,P-_,I-T)},hp="layout",O_=r=>r.x,D0=(r,f)=>r.x+r.width/2-f.width/2,s1=(r,f)=>r.x+r.width-f.width,n2=(r,f)=>r.y-f.height,qv=r=>r.y+r.height,y_=(r,f)=>r.y+r.height/2-f.height/2,Gv=r=>r.x+r.width,o2=(r,f)=>r.x-f.width,vl=(r,f,g)=>Oa(O_(r),qv(r),g.southeast(),E0(),"southeast",zl(r,{left:1,top:3}),hp),ec=(r,f,g)=>Oa(s1(r,f),qv(r),g.southwest(),Ch(),"southwest",zl(r,{right:0,top:3}),hp),Qu=(r,f,g)=>Oa(O_(r),n2(r,f),g.northeast(),mf(),"northeast",zl(r,{left:1,bottom:2}),hp),Zr=(r,f,g)=>Oa(s1(r,f),n2(r,f),g.northwest(),ub(),"northwest",zl(r,{right:0,bottom:2}),hp),tc=(r,f,g)=>Oa(D0(r,f),n2(r,f),g.north(),e2(),"north",zl(r,{bottom:2}),hp),Vl=(r,f,g)=>Oa(D0(r,f),qv(r),g.south(),Xv(),"south",zl(r,{top:3}),hp),dm=(r,f,g)=>Oa(Gv(r),y_(r,f),g.east(),jv(),"east",zl(r,{left:0}),hp),Sr=(r,f,g)=>Oa(o2(r,f),y_(r,f),g.west(),A0(),"west",zl(r,{right:1}),hp),w_=()=>[vl,ec,Qu,Zr,Vl,tc,dm,Sr],bu=()=>[ec,vl,Zr,Qu,Vl,tc,dm,Sr],Dl=()=>[Qu,Zr,vl,ec,tc,Vl],s2=()=>[Zr,Qu,ec,vl,tc,Vl],gg=()=>[vl,ec,Qu,Zr,Vl,tc],bc=()=>[ec,vl,Zr,Qu,Vl,tc],AE=(r,f)=>f.universal?r:Kn(r,g=>st(f.channels,g));var ok=Object.freeze({__proto__:null,events:r=>li([on(im(),(f,g)=>{const v=r.channels,_=Xs(v),T=g,P=AE(_,T);mt(P,I=>{const W=v[I],J=W.schema,ie=Es("channel["+I+`] data
2023-11-20 13:56:20 +02:00
Receiver: `+El(f.element),J,T.data);W.onReceive(f,ie)})})])}),sk=[Kr("channels",K1(wn.value,_i([hg("onReceive"),xt("schema",Vc())])))];const r2=(r,f,g)=>hu(v=>{g(v,r,f)}),i2=(r,f,g)=>Fd((v,_)=>{g(v,r,f)}),hm=(r,f,g,v,_,T)=>{const P=_i(r),I=Xa(f,[hc("config",r)]);return Pl(P,I,f,g,v,_,T)},a2=(r,f,g,v,_,T)=>{const P=r,I=Xa(f,[Ya("config",r)]);return Pl(P,I,f,g,v,_,T)},r1=(r,f,g)=>Ry((_,...T)=>{const P=[_].concat(T);return _.config({name:G(r)}).fold(()=>{throw new Error("We could not find any behaviour configuration for: "+r+". Using API: "+g)},I=>{const W=Array.prototype.slice.call(P,1);return f.apply(void 0,[_,I.config,I.state].concat(W))})},g,f),Ol=r=>({key:r,value:void 0}),Pl=(r,f,g,v,_,T,P)=>{const I=de=>Qi(de,g)?de[g]():V.none(),W=Ns(_,(de,ge)=>r1(g,de,ge)),ie={...Ns(T,(de,ge)=>rd(de,ge)),...W,revoke:Re(Ol,g),config:de=>{const ge=Es(g+"-config",r,de);return{key:g,value:{config:ge,me:ie,configAsRaw:Mi(()=>Es(g+"-config",r,de)),initialConfig:de,state:P}}},schema:G(f),exhibit:(de,ge)=>Yn(I(de),ln(v,"exhibit"),(_e,Ie)=>Ie(ge,_e.config,_e.state)).getOrThunk(()=>Yc({})),name:G(g),handlers:de=>I(de).map(ge=>ln(v,"events").getOr(()=>({}))(ge.config,ge.state)).getOr({})};return ie},Tn=r=>Uo(r),rk=_i([nn("fields"),nn("name"),xt("active",{}),xt("apis",{}),xt("state",Ff),xt("extra",{})]),nc=r=>{const f=Es("Creating behaviour: "+r.name,rk,r);return hm(f.fields,f.name,f.active,f.apis,f.extra,f.state)},ik=_i([nn("branchKey"),nn("branches"),nn("name"),xt("active",{}),xt("apis",{}),xt("state",Ff),xt("extra",{})]),l2=r=>{const f=Es("Creating behaviour: "+r.name,ik,r);return a2(xl(f.branchKey,f.branches),f.name,f.active,f.apis,f.extra,f.state)},no=G(void 0),Pc=nc({fields:sk,name:"receiving",active:ok});var fb=Object.freeze({__proto__:null,exhibit:(r,f)=>Yc({classes:[],styles:f.useFixed()?{}:{position:"relative"}})});const gf=r=>r.dom.focus(),Kv=r=>r.dom.blur(),i1=r=>{const f=$t(r).dom;return r.dom===f.activeElement},Qf=(r=rh())=>V.from(r.dom.activeElement).map(lt.fromDom),al=r=>Qf($t(r)).filter(f=>r.dom.contains(f.dom)),Qd=(r,f)=>{const g=$t(f),v=Qf(g).bind(T=>{const P=I=>xr(T,I);return P(f)?V.some(f):Jp(f,P)}),_=r(f);return v.each(T=>{Qf(g).filter(P=>xr(P,T)).fold(()=>{gf(T)},L)}),_},Zd=(r,f,g,v,_)=>{const T=P=>P+"px";return{position:r,left:f.map(T),top:g.map(T),right:v.map(T),bottom:_.map(T)}},jc=r=>({...r,position:V.some(r.position)}),db=(r,f)=>{gn(r,jc(f))},u2=j.generate([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),__=(r,f,g,v,_,T)=>{const P=f.rect,I=P.x-g,W=P.y-v,J=P.width,ie=P.height,de=_-(I+J),ge=T-(W+ie),_e=V.some(I),Ie=V.some(W),it=V.some(de),Qt=V.some(ge),dt=V.none();return Vt(f.direction,()=>Zd(r,_e,Ie,dt,dt),()=>Zd(r,dt,Ie,it,dt),()=>Zd(r,_e,dt,dt,Qt),()=>Zd(r,dt,dt,it,Qt),()=>Zd(r,_e,Ie,dt,dt),()=>Zd(r,_e,dt,dt,Qt),()=>Zd(r,_e,Ie,dt,dt),()=>Zd(r,dt,Ie,it,dt))},f2=(r,f)=>r.fold(()=>{const g=f.rect;return Zd("absolute",V.some(g.x),V.some(g.y),V.none(),V.none())},(g,v,_,T)=>__("absolute",f,g,v,_,T),(g,v,_,T)=>__("fixed",f,g,v,_,T)),xh=(r,f)=>{const g=Re(tm,f),v=r.fold(g,g,()=>{const P=dc();return tm(f).translate(-P.left,-P.top)}),_=za(f),T=Xf(f);return ai(v.left,v.top,_,T)},jr=(r,f)=>f.fold(()=>r.fold(ue,ue,ai),g=>r.fold(G(g),G(g),()=>{const v=Jv(r,g.x,g.y);return ai(v.left,v.top,g.width,g.height)})),Jv=(r,f,g)=>{const v=pr(f,g),_=()=>{const T=dc();return v.translate(-T.left,-T.top)};return r.fold(G(v),G(v),_)},ud=(r,f,g,v)=>r.fold(f,g,v);u2.none;const S_=u2.relative,C_=u2.fixed,fa=(r,f)=>({anchorBox:r,origin:f}),ak=(r,f)=>fa(r,f),eO="data-alloy-placement",tO=(r,f)=>{qn(r,eO,f)},k_=r=>me(r,eO),lk=r=>Ue(r,eO),hb=j.generate([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),x_=(r,f)=>{const{x:g,y:v,right:_,bottom:T}=f,{x:P,y:I,right:W,bottom:J,width:ie,height:de}=r,ge=P>=g&&P<=_,_e=I>=v&&I<=T,Ie=ge&&_e,it=W<=_&&W>=g,Qt=J<=T&&J>=v,dt=it&&Qt,ft=Math.min(ie,P>=g?_-P:W-g),Yt=Math.min(de,I>=v?T-I:J-v);return{originInBounds:Ie,sizeInBounds:dt,visibleW:ft,visibleH:Yt}},ck=(r,f)=>{const{x:g,y:v,right:_,bottom:T}=f,{x:P,y:I,width:W,height:J}=r,ie=Math.max(g,_-W),de=M
2023-11-17 20:21:45 +02:00
Known: [`+Xs(v)+`]
Namespace: `+r.getOr("none")+`
2023-11-17 23:02:39 +02:00
Spec: `+JSON.stringify(g,null,2))},_=>_.replace()),M2=(r,f,g,v)=>Ph(g)&&g.uiType===HE?J_(r,f,g,v):P2.single(!1,G(g)),R2=(r,f,g,v)=>M2(r,f,g,v).fold((T,P)=>{const I=Ph(g)?P(f,g.config,g.validated):P(f),W=ln(I,"components").getOr([]),J=Ne(W,ie=>R2(r,f,ie,v));return[{...I,components:J}]},(T,P)=>{if(Ph(g)){const I=P(f,g.config,g.validated);return g.validated.preprocess.getOr(we)(I)}else return P(f)}),Gk=(r,f,g,v)=>Ne(g,_=>R2(r,f,_,v)),$2=(r,f)=>{let g=!1;const v=()=>g,_=()=>{if(g)throw new Error("Trying to use the same placeholder more than once: "+r);return g=!0,f},T=()=>f.fold((P,I)=>P,(P,I)=>P);return{name:G(r),required:T,used:v,replace:_}},eS=(r,f,g,v)=>{const _=Ns(v,(P,I)=>$2(I,P)),T=Gk(r,f,g,_);return dr(_,P=>{if(P.used()===!1&&P.required())throw new Error("Placeholder: "+P.name()+` was not found in components list
2023-11-17 20:21:45 +02:00
Namespace: `+r.getOr("none")+`
2023-11-20 13:56:20 +02:00
Components: `+JSON.stringify(f.components,null,2))}),T},Kk=P2.single,mP=P2.multiple,wm=G(HE),tS=j.generate([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),N2=xt("factory",{sketch:we}),dd=xt("schema",[]),Ml=nn("name"),Jk=Wa("pname","pname",Kl(r=>"<alloy."+io(r.name)+">"),Vc()),I2=ka("schema",()=>[Er("preprocess")]),Ud=xt("defaults",G({})),B2=xt("overrides",G({})),ex=fo([N2,dd,Ml,Jk,Ud,B2]),tx=fo([N2,dd,Ml,Ud,B2]),gP=fo([N2,dd,Ml,Jk,Ud,B2]),zE=fo([N2,I2,Ml,nn("unit"),Jk,Ud,B2]),L2=r=>r.fold(V.some,V.none,V.some,V.some),VE=r=>{const f=g=>g.name;return r.fold(f,f,f,f)},pP=r=>r.fold(we,we,we,we),Tb=(r,f)=>g=>{const v=Es("Converting part type",f,g);return r(v)},Gc=Tb(tS.required,ex),Mh=Tb(tS.external,tx),Yd=Tb(tS.optional,gP),hd=Tb(tS.group,zE),nS=G("entirety");var z0=Object.freeze({__proto__:null,required:Gc,external:Mh,optional:Yd,group:hd,asNamedPart:L2,name:VE,asCommon:pP,original:nS});const c1=(r,f,g,v)=>ni(f.defaults(r,g,v),g,{uid:r.partUids[f.name]},f.overrides(r,g,v)),bP=(r,f,g)=>{const v={},_={};return mt(g,T=>{T.fold(P=>{v[P.pname]=Kk(!0,(I,W,J)=>P.factory.sketch(c1(I,P,W,J)))},P=>{const I=f.parts[P.name];_[P.name]=G(P.factory.sketch(c1(f,P,I[nS()]),I))},P=>{v[P.pname]=Kk(!1,(I,W,J)=>P.factory.sketch(c1(I,P,W,J)))},P=>{v[P.pname]=mP(!0,(I,W,J)=>{const ie=I[P.name];return je(ie,de=>P.factory.sketch(ni(P.defaults(I,de,J),de,P.overrides(I,de))))})})}),{internals:G(v),externals:G(_)}},nx=(r,f)=>{const g={};return mt(f,v=>{L2(v).each(_=>{const T=vP(r,_.pname);g[_.name]=P=>{const I=Es("Part: "+_.name+" in "+r,fo(_.schema),P);return{...T,config:P,validated:I}}})}),g},vP=(r,f)=>({uiType:wm(),owner:r,name:f}),WE=(r,f,g)=>({uiType:wm(),owner:r,name:f,config:g,validated:{}}),UE=r=>Ne(r,f=>f.fold(V.none,V.some,V.none,V.none).map(g=>sd(g.name,g.schema.concat([Ky(nS())]))).toArray()),YE=r=>je(r,VE),oS=(r,f,g)=>bP(r,f,g),ox=(r,f,g)=>eS(V.some(r),f,f.components,g),Ri=(r,f,g)=>{const v=f.partUids[g];return r.getSystem().getByUid(v).toOptional()},u1=(r,f,g)=>Ri(r,f,g).getOrDie("Could not find part: "+g),_O=(r,f,g)=>{const v={},_=f.partUids,T=r.getSystem();return mt(g,P=>{v[P]=G(T.getByUid(_[P]))}),v},sx=(r,f)=>{const g=r.getSystem();return Ns(f.partUids,(v,_)=>G(g.getByUid(v)))},XE=r=>Xs(r.partUids),rx=(r,f,g)=>{const v={},_=f.partUids,T=r.getSystem();return mt(g,P=>{v[P]=G(T.getByUid(_[P]).getOrDie())}),v},jE=(r,f)=>{const g=YE(f);return Uo(je(g,v=>({key:v,value:r+"-"+v})))},sS=r=>Wa("partUids","partUids",Ae(f=>jE(f.uid,r)),Vc());var OP=Object.freeze({__proto__:null,generate:nx,generateOne:WE,schemas:UE,names:YE,substitutes:oS,components:ox,defaultUids:jE,defaultUidsSchema:sS,getAllParts:sx,getAllPartNames:XE,getPart:Ri,getPartOrDie:u1,getParts:_O,getPartsOrDie:rx});const yP=(r,f)=>(r.length>0?[sd("parts",r)]:[]).concat([nn("uid"),xt("dom",{}),xt("components",[]),Ky("originalSpec"),xt("debug.sketcher",{})]).concat(f),qE=(r,f,g,v,_)=>{const T=yP(v,_);return Es(r+" [SpecSchema]",_i(T.concat(f)),g)},wP=(r,f,g,v)=>{const _=CO(v),T=qE(r,f,_,[],[]);return g(T,_)},ix=(r,f,g,v,_)=>{const T=CO(_),P=UE(g),I=sS(g),W=qE(r,f,T,P,[I]),J=oS(r,W,g),ie=ox(r,W,J.internals());return v(W,ie,T,J.externals())},SO=r=>vs(r,"uid"),CO=r=>SO(r)?r:{...r,uid:yh("uid")},rS=r=>r.uid!==void 0,GE=_i([nn("name"),nn("factory"),nn("configFields"),xt("apis",{}),xt("extraApis",{})]),Rh=_i([nn("name"),nn("factory"),nn("configFields"),nn("partFields"),xt("apis",{}),xt("extraApis",{})]),Kc=r=>{const f=Es("Sketcher for "+r.name,GE,r),g=T=>wP(f.name,f.configFields,f.factory,T),v=Ns(f.apis,ap),_=Ns(f.extraApis,(T,P)=>rd(T,P));return{name:f.name,configFields:f.configFields,sketch:g,...v,..._}},wu=r=>{const f=Es("Sketcher for "+r.name,Rh,r),g=P=>ix(f.name,f.configFields,f.partFields,f.factory,P),v=nx(f.name,f.partFields),_=Ns(f.apis,ap),T=Ns(f.extraApis,(P,I)=>rd(P,I));return{name:f.name,partFields:f.partFields,configFields:f.configFields,sketch:g,parts:v,..._,...T}},Op=r=>Yl("input")(r)&&zi(r,"type")!=="radio"||Yl("textarea")(r);var SP=Object.freeze({__proto__:null,getCurrent:(r,f,g)=>f.find(r)});const CP=[nn("find")],cr=nc({fields:CP,name:"comp
2023-11-17 23:02:39 +02:00
Cannot use it for: `+El(J.element)+`
2023-11-20 13:56:20 +02:00
The conflicting element is`+(js(de.element)?" ":" not ")+"already in the DOM")},_=J=>{const ie=g(J);Qi(f,ie)&&v(J,ie);const de=[J];r.registerId(de,ie,J.events),f[ie]=J},T=J=>{rp(J.element).each(ie=>{delete f[ie],r.unregisterId(ie)})};return{find:(J,ie,de)=>r.find(J,ie,de),filter:J=>r.filterByType(J),register:_,unregister:T,getById:J=>ln(f,J)}},v1=Kc({name:"Container",factory:r=>{const{attributes:f,...g}=r.dom;return{uid:r.uid,dom:{tag:"div",attributes:{role:"presentation",...f},...g},components:r.components,behaviours:Om(r.containerBehaviours),events:r.events,domModification:r.domModification,eventOrder:r.eventOrder}},configFields:[xt("components",[]),Wl("containerBehaviours",[]),xt("events",{}),xt("domModification",{}),xt("eventOrder",{})]}),BM=r=>{const f=dt=>Ha(r.element).fold(ot,ft=>xr(dt,ft)),g=PY(),v=(dt,ft)=>g.find(f,dt,ft),_=_Y(r.element,{triggerEvent:(dt,ft)=>x0(dt,ft.target,Yt=>TY(v,dt,ft,Yt))}),T={debugInfo:G("real"),triggerEvent:(dt,ft,Yt)=>{x0(dt,ft,Dt=>vL(v,dt,Yt,ft,Dt))},triggerFocus:(dt,ft)=>{rp(dt).fold(()=>{gf(dt)},Yt=>{x0($d(),dt,Dt=>(kY(v,$d(),{originator:ft,kill:L,prevent:L,target:dt},dt,Dt),!1))})},triggerEscape:(dt,ft)=>{T.triggerEvent("keydown",dt.element,ft.event)},getByUid:dt=>it(dt),getByDom:dt=>Qt(dt),build:pc,buildOrPatch:ug,addToGui:dt=>{W(dt)},removeFromGui:dt=>{J(dt)},addToWorld:dt=>{P(dt)},removeFromWorld:dt=>{I(dt)},broadcast:dt=>{ge(dt)},broadcastOn:(dt,ft)=>{_e(dt,ft)},broadcastEvent:(dt,ft)=>{Ie(dt,ft)},isConnected:ot},P=dt=>{dt.connect(T),ol(dt.element)||(g.register(dt),mt(dt.components(),P),T.triggerEvent(og(),dt.element,{target:dt.element}))},I=dt=>{ol(dt.element)||(mt(dt.components(),I),g.unregister(dt)),dt.disconnect()},W=dt=>{cl(r,dt)},J=dt=>{qc(dt)},ie=()=>{_.unbind(),Mu(r.element)},de=dt=>{const ft=g.filter(im());mt(ft,Yt=>{const Dt=Yt.descHandler;Gp(Dt)(dt)})},ge=dt=>{de({universal:!0,data:dt})},_e=(dt,ft)=>{de({universal:!1,channels:dt,data:ft})},Ie=(dt,ft)=>{const Yt=g.filter(dt);return xY(Yt,ft)},it=dt=>g.getById(dt).fold(()=>wn.error(new Error('Could not find component with uid: "'+dt+'" in system.')),wn.value),Qt=dt=>{const ft=rp(dt).getOr("not found");return it(ft)};return P(r),{root:r,element:r.element,destroy:ie,add:W,remove:J,getByUid:it,getByDom:Qt,addToWorld:P,removeFromWorld:I,broadcast:ge,broadcastOn:_e,broadcastEvent:Ie}},MY=(r,f)=>({dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:je(r.items,f.interpreter)}),RY=G([xt("prefix","form-field"),Wl("fieldBehaviours",[cr,Gn])]),$Y=G([Yd({schema:[nn("dom")],name:"label"}),Yd({factory:{sketch:r=>({uid:r.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:r.text}})},schema:[nn("text")],name:"aria-descriptor"}),Gc({factory:{sketch:r=>{const f=Sn(r,["factory"]);return r.factory.sketch(f)}},schema:[nn("factory")],name:"field"})]),NY=(r,f,g,v)=>{const _=sc(r.fieldBehaviours,[cr.config({find:I=>Ri(I,r,"field")}),Gn.config({store:{mode:"manual",getValue:I=>cr.getCurrent(I).bind(Gn.getValue),setValue:(I,W)=>{cr.getCurrent(I).each(J=>{Gn.setValue(J,W)})}}})]),T=li([Ci((I,W)=>{const J=_O(I,r,["label","field","aria-descriptor"]);J.field().each(ie=>{const de=io(r.prefix);J.label().each(ge=>{qn(ge.element,"for",de),qn(ie.element,"id",de)}),J["aria-descriptor"]().each(ge=>{const _e=io(r.prefix);qn(ge.element,"id",_e),qn(ie.element,"aria-describedby",_e)})})})]),P={getField:I=>Ri(I,r,"field"),getLabel:I=>Ri(I,r,"label")};return{uid:r.uid,dom:r.dom,components:f,behaviours:_,events:T,apis:P}},si=wu({name:"FormField",configFields:RY(),partFields:$Y(),factory:NY,apis:{getField:(r,f)=>r.getField(f),getLabel:(r,f)=>r.getLabel(f)}});var IY=Object.freeze({__proto__:null,exhibit:(r,f)=>Yc({attributes:Uo([{key:f.tabAttr,value:"true"}])})}),OL=[xt("tabAttr","data-alloy-tabstop")];const Ka=nc({fields:OL,name:"tabstopping",active:IY});var BY=tinymce.util.Tools.resolve("tinymce.html.Entities");const Ux=(r,f,g,v)=>{const _=LY(r,f,g,v);return si.sketch(_)},yL=(r,f)=>Ux(r,f,[],[]),LY=(r,f,g,v)=>({dom:wL(g),components:r.toArray().concat([f]),fieldBehaviours:Tn(v)}),FY=()=>wL([]),wL=r=>({ta
`+JSON.stringify(r));sv.setItem(YS,JSON.stringify(r))},DF=r=>{const f=EF();return ln(f,r).getOr([])},eae=(r,f)=>{if(!xF(r))return;const g=EF(),v=ln(g,f).getOr([]),_=Kn(v,T=>T!==r);g[f]=[r].concat(_).slice(0,kF),AF(g)},Tq=r=>!!r,Xu=r=>Ns(fv.makeMap(r,/[, ]/),Tq),pT=r=>V.from(vB(r)),Eq=r=>{const f=V.from(y5(r)).filter(Tq).map(Xu);return pT(r).fold(tt,g=>f.fold(ot,v=>Xs(v).length>0?v:!1))},GA=(r,f)=>{const g=Eq(r);return E(g)?g?pT(r):V.none():g[f]?pT(r):V.none()},Aq=(r,f)=>GA(r,f).map(g=>v=>Yu.nu(_=>{const T=(I,W)=>{if(!d(I))throw new Error("Expected value to be string");if(W!==void 0&&!h(W))throw new Error("Expected meta to be a object");_({value:I,meta:W})},P={filetype:f,fieldname:v.fieldname,...V.from(v.meta).getOr({})};g.call(r,T,v.value,P)})),PF=r=>V.from(r).filter(d).getOrUndefined(),Dq=r=>wB(r)?V.some({targets:_1.find(r.getBody()),anchorTop:PF(_B(r)),anchorBottom:PF(T3(r))}):V.none(),Pq=r=>V.from(OB(r)),Mq=r=>({getHistory:DF,addToHistory:eae,getLinkInformation:()=>Dq(r),getValidationHandler:()=>Pq(r),getUrlPicker:f=>Aq(r,f)}),Rq=(r,f,g,v)=>{const _=Ho(!1),T=fq(f),P={icons:()=>f.ui.registry.getAll().icons,menuItems:()=>f.ui.registry.getAll().menuItems,translate:Cm.translate,isDisabled:()=>f.mode.isReadOnly()||!f.ui.isEnabled(),getOption:f.options.get},I=Mq(f),W=XA(f),J=cq(f),ie=pF(f),de=()=>_.get(),ge=Qt=>_.set(Qt),_e={shared:{providers:P,anchors:gF(f,g,v,T.isPositionedAtTop),header:T},urlinput:I,styles:W,colorinput:J,dialog:ie,isContextMenuOpen:de,setContextMenuState:ge},Ie={..._e,shared:{..._e.shared,interpreter:Qt=>US(Qt,{},Ie),getSink:r.popup}},it={..._e,shared:{..._e.shared,interpreter:Qt=>US(Qt,{},it),getSink:r.dialog}};return{popup:Ie,dialog:it}},$q=(r,f,g)=>{const v=(pn,Nn)=>{mt([f,...g],jn=>{jn.broadcastEvent(pn,Nn)})},_=(pn,Nn)=>{mt([f,...g],jn=>{jn.broadcastOn([pn],Nn)})},T=pn=>_(Dh(),{target:pn.target}),P=rh(),I=Mc(P,"touchstart",T),W=Mc(P,"touchmove",pn=>v(du(),pn)),J=Mc(P,"touchend",pn=>v(Bf(),pn)),ie=Mc(P,"mousedown",T),de=Mc(P,"mouseup",pn=>{pn.raw.button===0&&_(Hk(),{target:pn.target})}),ge=pn=>_(Dh(),{target:lt.fromDom(pn.target)}),_e=pn=>{pn.button===0&&_(Hk(),{target:lt.fromDom(pn.target)})},Ie=()=>{mt(r.editorManager.get(),pn=>{r!==pn&&pn.dispatch("DismissPopups",{relatedTarget:r})})},it=pn=>v(sg(),ll(pn)),Qt=pn=>{_(kb(),{}),v(gh(),ll(pn))},dt=$t(lt.fromDom(r.getElement())),ft=gb(dt,"scroll",pn=>{requestAnimationFrame(()=>{const Nn=r.getContainer();if(Nn!=null){const Ys=lw(r,f.element).map(ko=>[ko.element,...ko.others]).getOr([]);rn(Ys,ko=>xr(ko,pn.target))&&(r.dispatch("ElementScroll",{target:pn.target.dom}),v(ph(),pn))}})}),Yt=()=>_(kb(),{}),Dt=pn=>{pn.state&&_(Dh(),{target:lt.fromDom(r.getContainer())})},kn=pn=>{_(Dh(),{target:lt.fromDom(pn.relatedTarget.getContainer())})};r.on("PostRender",()=>{r.on("click",ge),r.on("tap",ge),r.on("mouseup",_e),r.on("mousedown",Ie),r.on("ScrollWindow",it),r.on("ResizeWindow",Qt),r.on("ResizeEditor",Yt),r.on("AfterProgressState",Dt),r.on("DismissPopups",kn)}),r.on("remove",()=>{r.off("click",ge),r.off("tap",ge),r.off("mouseup",_e),r.off("mousedown",Ie),r.off("ScrollWindow",it),r.off("ResizeWindow",Qt),r.off("ResizeEditor",Yt),r.off("AfterProgressState",Dt),r.off("DismissPopups",kn),ie.unbind(),I.unbind(),W.unbind(),J.unbind(),de.unbind(),ft.unbind()}),r.on("detach",()=>{mt([f,...g],Bk),mt([f,...g],pn=>pn.destroy())})},Rc=OP,S1=z0,KA=G([xt("shell",!1),nn("makeItem"),xt("setupItem",L),ym.field("listBehaviours",[gs])]),MF=Yd({name:"items",overrides:()=>({behaviours:Tn([gs.config({})])})}),Nq=G([MF]),RF=G("CustomList"),Iq=(r,f,g,v)=>{const _=(I,W)=>{P(I).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")},J=>{const ie=gs.contents(J),de=W.length,ge=de-ie.length,_e=ge>0?Et(ge,()=>r.makeItem()):[],Ie=ie.slice(de);mt(Ie,Qt=>gs.remove(J,Qt)),mt(_e,Qt=>gs.append(J,Qt));const it=gs.contents(J);mt(it,(Qt,dt)=>{r.setupItem(I,Qt,W[dt],dt)})})},T=r.shell?{behaviours:[gs.config({})],components:[]}:
2023-11-17 20:21:45 +02:00
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.143 0c2.608.015 5.186 2.178 5.186 5.331 0 0 .077 3.812-.084 4.87-.361 2.41-2.164 4.074-4.65 4.496-1.453.284-2.523.49-3.212.623-.373.071-.634.122-.785.152-.184.038-.997.145-1.35.145-2.732 0-5.21-2.04-5.248-5.33 0 0 0-3.514.03-4.442.093-2.4 1.758-4.342 4.926-4.963 0 0 3.875-.752 4.036-.782.368-.07.775-.1 1.15-.1Zm1.826 2.8L5.83 3.989v2.393l-2.455.475v5.968l6.137-1.189V9.243l2.456-.476V2.8ZM5.83 6.382l3.682-.713v3.574l-3.682.713V6.382Zm27.173-1.64-.084-1.066h-2.226v9.132h2.456V7.743c-.008-1.151.998-2.064 2.149-2.072 1.15-.008 1.987.92 1.995 2.072v5.065h2.455V7.359c-.015-2.18-1.657-3.929-3.837-3.913a3.993 3.993 0 0 0-2.908 1.296Zm-6.3-4.266L29.16 0v2.387l-2.456.475V.476Zm0 3.2v9.132h2.456V3.676h-2.456Zm18.179 11.787L49.11 3.676H46.58l-1.612 4.527-.46 1.382-.384-1.382-1.611-4.527H39.98l3.3 9.132L42.15 16l2.732-.537ZM22.867 9.738c0 .752.568 1.075.921 1.075.353 0 .668-.047.998-.154l.537 1.765c-.23.154-.92.537-2.225.537-1.305 0-2.655-.997-2.686-2.686a136.877 136.877 0 0 1 0-4.374H18.8V3.676h1.612v-1.98l2.455-.476v2.456h2.302V5.9h-2.302v3.837Z"/>
</svg>
2023-11-20 13:56:20 +02:00
`;const mee=r=>r.nodeName==="BR"||!!r.getAttribute("data-mce-bogus")||r.getAttribute("data-mce-type")==="bookmark",gee=(r,f,g)=>{var v;const _=(v=f.delimiter)!==null&&v!==void 0?v:"\u203A",T=(J,ie,de)=>Jc.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{"data-index":de,"aria-level":de+1}},components:[Li(J)],action:ge=>{r.focus(),r.selection.select(ie),r.nodeChanged()},buttonBehaviours:Tn([xg.button(g.isDisabled),rc()])}),P=()=>({dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0}},components:[Li(` ${_} `)]}),I=J=>Yo(J,(ie,de,ge)=>{const _e=T(de.name,de.element,ge);return ge===0?ie.concat([_e]):ie.concat([P(),_e])},[]),W=J=>{const ie=[];let de=J.length;for(;de-- >0;){const ge=J[de];if(ge.nodeType===1&&!mee(ge)){const _e=Nh(r,ge);if(_e.isDefaultPrevented()||ie.push({name:_e.name,element:ge}),_e.isPropagationStopped())break}}return ie};return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:Tn([No.config({mode:"flow",selector:"div[role=button]"}),Jo.config({disabled:g.isDisabled}),rc(),Ka.config({}),gs.config({}),xs("elementPathEvents",[Ci((J,ie)=>{r.shortcuts.add("alt+F11","focus statusbar elementpath",()=>No.focusIn(J)),r.on("NodeChange",de=>{const ge=W(de.parents),_e=ge.length>0?I(ge):[];gs.set(J,_e)})})])]),components:[]}};var jO;(function(r){r[r.None=0]="None",r[r.Both=1]="Both",r[r.Vertical=2]="Vertical"})(jO||(jO={}));const pee=(r,f,g,v,_)=>{const T={height:S4(v+f.top,h5(r),m5(r))};return g===jO.Both&&(T.width=S4(_+f.left,Cx(r),yS(r))),T},rZ=(r,f,g)=>{const v=lt.fromDom(r.getContainer()),_=pee(r,f,g,Ii(v),ta(v));dr(_,(T,P)=>{U(T)&&ro(v,P,B$(T))}),j3(r)},bee=r=>{const f=CB(r);return f===!1?jO.None:f==="both"?jO.Both:jO.Vertical},R4=(r,f,g,v)=>{const T=pr(g*20,v*20);return rZ(r,T,f),V.some(!0)},vee=(r,f)=>{const g=bee(r);if(g===jO.None)return V.none();const v=g===jO.Both?"Press the arrow keys to resize the editor.":"Press the Up and Down arrow keys to resize the editor.";return V.some(Sp("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:f.translate("Resize"),"aria-label":f.translate(v)},behaviours:[Cw.config({mode:"mouse",repositionTarget:!1,onDrag:(_,T,P)=>rZ(r,P,g),blockerClass:"tox-blocker"}),No.config({mode:"special",onLeft:()=>R4(r,g,-1,0),onRight:()=>R4(r,g,1,0),onUp:()=>R4(r,g,0,-1),onDown:()=>R4(r,g,0,1)}),Ka.config({}),ns.config({})]},f.icons))},Oee=(r,f)=>{const g=(v,_,T)=>gs.set(v,[Li(f.translate(["{0} "+T,_[T]]))]);return Jc.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:Tn([xg.button(f.isDisabled),rc(),Ka.config({}),gs.config({}),Gn.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),xs("wordcount-events",[hu(v=>{const _=Gn.getValue(v),T=_.mode==="words"?"characters":"words";Gn.setValue(v,{mode:T,count:_.count}),g(v,_.count,T)}),Ci(v=>{r.on("wordCountUpdate",_=>{const{mode:T}=Gn.getValue(v);Gn.setValue(v,{mode:T,count:_.wordCount}),g(v,_.wordCount,T)})})])]),eventOrder:{[af()]:["disabling","alloy.base.behaviour","wordcount-events"]}})},yee=(r,f)=>{const g=()=>({dom:{tag:"span",classes:["tox-statusbar__branding"]},components:[{dom:{tag:"a",attributes:{href:"https://www.tiny.cloud/powered-by-tiny?utm_campaign=editor_referral&utm_medium=poweredby&utm_source=tinymce&utm_content=v6",rel:"noopener",target:"_blank","aria-label":Cm.translate(["Powered by {0}","Tiny"])},innerHtml:dN.trim()},behaviours:Tn([ns.config({})])}]}),v=()=>{const I=J5("Alt+0"),W="Press {0} for help";return{dom:{tag:"div",classes:["tox-statusbar__help-text"]},components:[Li(Cm.translate([W,I]))]}},_=()=>{const I=[];return r.hasPlugin("wordcount")&&I.push(Oee(r,f)),Tx(r)&&I.push(g()),{dom:{tag:"div",classes:["tox-statusbar__right-container"]},components:I}},T=()=>{const I=[],W=EB(r),J=SB(r),ie=Tx(r)||r.hasPlugin("wordcount"),de=()=>{const ge="tox-statusbar__text-container--flex-start",_e="tox-statusbar__text-container--flex-end",Ie="tox-statusbar__text-container--space-around";if(W){const it="tox-statusbar__text-container-3-col
`+JSON.stringify(f,null,2)).message),getBounds:r.getDragBounds})])})}),Gc({schema:[nn("dom")],name:"title"}),Gc({factory:hN,schema:[nn("dom")],name:"close"}),Gc({factory:hN,schema:[nn("dom")],name:"body"}),Yd({factory:hN,schema:[nn("dom")],name:"footer"}),Mh({factory:{sketch:(r,f)=>({...r,dom:f.dom,components:f.components})},schema:[xt("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),xt("components",[])],name:"blocker"})]),kee=(r,f,g,v)=>{const _=Xi(),T=_e=>{_.set(_e);const Ie=r.lazySink(_e).getOrDie(),it=v.blocker(),Qt=Ie.getSystem().build({...it,components:it.components.concat([gu(_e)]),behaviours:Tn([ns.config({}),xs("dialog-blocker-events",[lg(Gi(),()=>{Lh.isBlocked(_e)?L():No.focusIn(_e)})])])});cl(Ie,Qt),No.focusIn(_e)},P=_e=>{_.clear(),Ha(_e.element).each(Ie=>{_e.getSystem().getByDom(Ie).each(it=>{qc(it)})})},I=_e=>u1(_e,r,"body"),W=_e=>Ri(_e,r,"footer"),J=(_e,Ie)=>{Lh.block(_e,Ie)},ie=_e=>{Lh.unblock(_e)},de=io("modal-events"),ge={...r.eventOrder,[Lu()]:[de].concat(r.eventOrder["alloy.system.attached"]||[])};return{uid:r.uid,dom:r.dom,components:f,apis:{show:T,hide:P,getBody:I,getFooter:W,setIdle:ie,setBusy:J},eventOrder:ge,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:sc(r.modalBehaviours,[gs.config({}),No.config({mode:"cyclic",onEnter:r.onExecute,onEscape:r.onEscape,useTabstopAt:r.useTabstopAt,firstTabstop:r.firstTabstop}),Lh.config({getRoot:_.get}),xs(de,[Ci(_e=>{_ee(_e.element,u1(_e,r,"title").element)})])])}},Nl=wu({name:"ModalDialog",configFields:See(),partFields:Cee(),factory:kee,apis:{show:(r,f)=>{r.show(f)},hide:(r,f)=>{r.hide(f)},getBody:(r,f)=>r.getBody(f),getFooter:(r,f)=>r.getFooter(f),setBusy:(r,f,g)=>{r.setBusy(f,g)},setIdle:(r,f)=>{r.setIdle(f)}}}),xee=fo([$l,Q3].concat(tw)),Tee=Iu,mN=[Q5("button"),kg,Bu("align","end",["start","end"]),TS,kp,l0("buttonType",["primary","secondary"])],aZ=[...mN,m1],gN=[Ua("type",["submit","cancel","custom"]),...aZ],Eee=[Ua("type",["menu"]),MO,tv,kg,Hl("items",xee),...mN],lZ=[...mN,Ua("type",["togglebutton"]),xa("tooltip"),kg,MO,ja("active",!1)],Aee=xl("type",{submit:gN,cancel:gN,custom:gN,menu:Eee,togglebutton:lZ}),Dee=[$l,m1,Ua("level",["info","warn","error","success"]),N5,xt("url","")],Pee=fo(Dee),Mee=r=>[$l,r],Ree=[$l,m1,kp,Q5("button"),kg,L5,l0("buttonType",["primary","secondary","toolbar"]),TS],pN=fo(Ree),kw=[$l,Q3],x1=kw.concat([B5]),$ee=kw.concat([$5,kp]),Nee=fo($ee),Iee=Iu,Bee=x1.concat([z3("auto")]),Lee=fo(Bee),Fee=ch([J2,m1,N5]),Qee=x1.concat([mc("storageKey","default")]),Zee=fo(Qee),Hee=bl,zee=fo(x1),Vee=bl,Wee=kw.concat([mc("tag","textarea"),xa("scriptId"),xa("scriptUrl"),qm("settings",void 0)]),Uee=kw.concat([mc("tag","textarea"),Wc("init")]),Yee=of(r=>Ui("customeditor.old",_i(Uee),r).orThunk(()=>Ui("customeditor.new",_i(Wee),r))),Xee=bl,qee=fo(x1),Gee=uh(),Kee=r=>[$l,a0("columns"),r],Jee=[$l,xa("html"),Bu("presets","presentation",["presentation","document"])],ete=fo(Jee),tte=x1.concat([ja("border",!1),ja("sandboxed",!0),ja("streamContent",!1),ja("transparent",!0)]),nte=fo(tte),ote=bl,cZ=fo(kw.concat([Jl("height")])),uZ=fo([xa("url"),fh("zoom"),fh("cachedWidth"),fh("cachedHeight")]),xw=x1.concat([Jl("inputMode"),Jl("placeholder"),ja("maximized",!1),kp]),ste=fo(xw),bN=bl,$4=r=>[$l,$5,r,Bu("align","start",["start","center","end"])],rte=[m1,J2],ite=[m1,Hl("items",sf("items",()=>fZ))],fZ=Jn([fo(rte),fo(ite)]),ate=x1.concat([Hl("items",fZ),kp]),lte=fo(ate),Tw=bl,dZ=x1.concat([Yp("items",[m1,J2]),au("size",1),kp]),cte=fo(dZ),ute=bl,fte=x1.concat([ja("constrain",!0),kp]),dte=fo(fte),hZ=fo([xa("width"),xa("height")]),hte=kw.concat([$5,au("min",0),au("max",0)]),mte=fo(hte),gte=Pd,vN=[$l,Hl("header",bl),Hl("cells",Dd(bl))],IT=fo(vN),ON=x1.concat([Jl("placeholder"),ja("maximized",!1),kp]),N4=fo(ON),Ew=bl,BT=[Ua("type",["directory","leaf"]),Z3,xa("id"),Ya("menu",OT)],yN=fo(BT),mZ=BT.concat([Hl("children",sf("children",()=>Md("type",{directory:wN,leaf:yN})))]),wN=fo(mZ),pte=Md("type",{directory:wN,leaf:yN}),bte=[$l,Hl("items",pte),jm("onLeafAction"),jm("onToggleExpand"),lu("defaultExpandedIds",[
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ot=Object.hasOwnProperty,wt=Object.setPrototypeOf,Pt=Object.isFrozen,hn=Object.getPrototypeOf,Hn=Object.getOwnPropertyDescriptor,$n=Object.freeze,Lt=Object.seal,Zt=Object.create,yn=typeof Reflect<"u"&&Reflect,yo=yn.apply,Do=yn.construct;yo||(yo=function(f,g,v){return f.apply(g,v)}),$n||($n=function(f){return f}),Lt||(Lt=function(f){return f}),Do||(Do=function(f,g){return fe(f,be(g))});var Cs=Bs(Array.prototype.forEach),Ws=Bs(Array.prototype.pop),Ir=Bs(Array.prototype.push),pi=Bs(String.prototype.toLowerCase),fl=Bs(String.prototype.match),Il=Bs(String.prototype.replace),Oc=Bs(String.prototype.indexOf),Pn=Bs(String.prototype.trim),eo=Bs(RegExp.prototype.test),Cr=Co(TypeError);function Bs(r){return function(f){for(var g=arguments.length,v=new Array(g>1?g-1:0),_=1;_<g;_++)v[_-1]=arguments[_];return yo(r,f,v)}}function Co(r){return function(){for(var f=arguments.length,g=new Array(f),v=0;v<f;v++)g[v]=arguments[v];return Do(r,g)}}function Mn(r,f){wt&&wt(r,null);for(var g=f.length;g--;){var v=f[g];if(typeof v=="string"){var _=pi(v);_!==v&&(Pt(f)||(f[g]=_),v=_)}r[v]=!0}return r}function En(r){var f=Zt(null),g;for(g in r)yo(Ot,r,[g])&&(f[g]=r[g]);return f}function jo(r,f){for(;r!==null;){var g=Hn(r,f);if(g){if(g.get)return Bs(g.get);if(typeof g.value=="function")return Bs(g.value)}r=hn(r)}function v(_){return console.warn("fallback value for",_),null}return v}var Ks=$n(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Jr=$n(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ho=$n(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Us=$n(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ci=$n(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Ja=$n(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ei=$n(["#text"]),$c=$n(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","
`+Hh),ty&&(Hh=Il(Hh,Qo," "),Hh=Il(Hh,fr," ")),Dt&&AZ?Dt.createHTML(Hh):Hh},f.setConfig=function(ir){Yte(ir),PN=!0},f.clearConfig=function(){j4=null,PN=!1},f.isValidAttribute=function(ir,qt,To){j4||Yte({});var Ts=jT(ir),Ul=jT(qt);return Hae(Ts,Ul,To)},f.addHook=function(ir,qt){typeof qt=="function"&&(vr[ir]=vr[ir]||[],Ir(vr[ir],qt))},f.removeHook=function(ir){if(vr[ir])return Ws(vr[ir])},f.removeHooks=function(ir){vr[ir]&&(vr[ir]=[])},f.removeAllHooks=function(){vr={}},f}var T1=cC();const uC=r=>T1().sanitize(r),Mw=OS.deviceType.isTouch(),vv=(r,f)=>({dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[r,f]}),HT=(r,f)=>Nl.parts.close(Jc.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":f.translate("Close")}},action:r,buttonBehaviours:Tn([Ka.config({})])})),zT=()=>Nl.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}}),Ib=(r,f)=>Nl.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:UO(`<p>${uC(f.translate(r))}</p>`)}]}]}),Ov=r=>Nl.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:r}),VT=(r,f)=>[v1.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:r}),v1.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:f})],WT=r=>{const f="tox-dialog",g=f+"-wrap",v=g+"__backdrop",_=f+"__disable-scroll";return Nl.sketch({lazySink:r.lazySink,onEscape:T=>(r.onEscape(T),V.some(!0)),useTabstopAt:T=>!nT(T),firstTabstop:r.firstTabstop,dom:{tag:"div",classes:[f].concat(r.extraClasses),styles:{position:"relative",...r.extraStyles}},components:[r.header,r.body,...r.footer.toArray()],parts:{blocker:{dom:UO(`<div class="${g}"></div>`),components:[{dom:{tag:"div",classes:Mw?[v,v+"--opaque"]:[v]}}]}},dragBlockClass:g,modalBehaviours:Tn([ns.config({}),xs("dialog-events",r.dialogEvents.concat([lg(Gi(),(T,P)=>{Lh.isBlocked(T)?L():No.focusIn(T)}),on(Rv(),(T,P)=>{T.getSystem().broadcastOn([ZS],{newFocus:P.event.newFocus})})])),xs("scroll-lock",[Ci(()=>{Na(Hi(),_)}),Ld(()=>{va(Hi(),_)})]),...r.extraBehaviours]),eventOrder:{[af()]:["dialog-events"],[Lu()]:["scroll-lock","dialog-events","alloy.base.behaviour"],[Nd()]:["alloy.base.behaviour","dialog-events","scroll-lock"],...r.eventOrder}})},UT=r=>Jc.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":r.translate("Close"),title:r.translate("Close")}},buttonBehaviours:Tn([Ka.config({})]),components:[Sp("close",{tag:"span",classes:["tox-icon"]},r.icons)],action:f=>{rr(f,BO)}}),V4=(r,f,g,v)=>{const _=T=>[Li(v.translate(T.title))];return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:{...g.map(T=>({id:T})).getOr({})}},components:[],behaviours:Tn([Am.config({channel:`${w1}-${f}`,initialData:r,renderComponents:_})])}},W4=()=>({dom:UO('<div class="tox-dialog__draghandle"></div>')}),kZ=(r,f,g,v)=>v1.sketch({dom:UO('<div class="tox-dialog__header"></div>'),components:[V4(r,f,V.some(g),v),W4(),UT(v)],containerBehaviours:Tn([Cw.config({mode:"mouse",blockerClass:"blocker",getTarget:_=>df(_,'[role="dialog"]').getOrDie(),snaps:{getSnapPoints:()=>[],leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}),E1=(r,f,g)=>{const v=Nl.parts.title(V4(r,f,V.none(),g)),_=Nl.parts.draghandle(W4()),T=Nl.parts.close(UT(g)),P=[v].concat(r.draggable?[_]:[]).concat([T]);return v1.sketch({dom:UO('<div class="tox-dialog__header"></div>'),components:P})},Rw=(r,f,g)=>E1({title:g.shared.providers.translate(r),draggable:g.dialog.isDraggableModal()},f,g.shared.providers),Mt=(r,f,g,v)=>({dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":g.translate(r)},styles:{left:"0px",right:"0px",bottom:"0px",top:`${v.getOr(0)}px`,position:"absolute"}},behaviours:f,components:[{dom:UO('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}),Rt=(r,f,g)=>({onClose:()=>g.closeWindow(),onBlock:v=>{const _=sa(r().element,".tox-dialog__header").m
`;(function(){var o=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(De,nt,bt)=>{var $t;return bt(De,nt.prototype)?!0:(($t=De.constructor)===null||$t===void 0?void 0:$t.name)===nt.name},t=De=>{const nt=typeof De;return De===null?"null":nt==="object"&&Array.isArray(De)?"array":nt==="object"&&e(De,String,(bt,$t)=>$t.isPrototypeOf(bt))?"string":nt},s=De=>nt=>t(nt)===De,a=De=>nt=>typeof nt===De,l=De=>nt=>De===nt,u=s("string"),d=s("object"),h=s("array"),b=l(null),y=a("boolean"),C=De=>De==null,E=De=>!C(De),R=a("function"),$=(De,nt)=>{if(h(De)){for(let bt=0,$t=De.length;bt<$t;++bt)if(!nt(De[bt]))return!1;return!0}return!1},Q=()=>{},F=De=>()=>De,U=(De,nt)=>De===nt;class K{constructor(nt,bt){this.tag=nt,this.value=bt}static some(nt){return new K(!0,nt)}static none(){return K.singletonNone}fold(nt,bt){return this.tag?bt(this.value):nt()}isSome(){return this.tag}isNone(){return!this.tag}map(nt){return this.tag?K.some(nt(this.value)):K.none()}bind(nt){return this.tag?nt(this.value):K.none()}exists(nt){return this.tag&&nt(this.value)}forall(nt){return!this.tag||nt(this.value)}filter(nt){return!this.tag||nt(this.value)?this:K.none()}getOr(nt){return this.tag?this.value:nt}or(nt){return this.tag?this:nt}getOrThunk(nt){return this.tag?this.value:nt()}orThunk(nt){return this.tag?this:nt()}getOrDie(nt){if(this.tag)return this.value;throw new Error(nt!=null?nt:"Called getOrDie on None")}static from(nt){return E(nt)?K.some(nt):K.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(nt){this.tag&&nt(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}K.singletonNone=new K(!1);const L=Array.prototype.indexOf,te=Array.prototype.push,ne=(De,nt)=>L.call(De,nt),oe=(De,nt)=>ne(De,nt)>-1,G=(De,nt)=>{const bt=De.length,$t=new Array(bt);for(let On=0;On<bt;On++){const Mo=De[On];$t[On]=nt(Mo,On)}return $t},we=(De,nt)=>{for(let bt=0,$t=De.length;bt<$t;bt++){const On=De[bt];nt(On,bt)}},ve=(De,nt,bt)=>(we(De,($t,On)=>{bt=nt(bt,$t,On)}),bt),Re=De=>{const nt=[];for(let bt=0,$t=De.length;bt<$t;++bt){if(!h(De[bt]))throw new Error("Arr.flatten item "+bt+" was not an array, input: "+De);te.apply(nt,De[bt])}return nt},Oe=(De,nt)=>Re(G(De,nt)),ce=(De,nt)=>{for(let bt=0;bt<De.length;bt++){const $t=nt(De[bt],bt);if($t.isSome())return $t}return K.none()},Xe=(De,nt,bt=U)=>De.exists($t=>bt($t,nt)),tt=De=>{const nt=[],bt=$t=>{nt.push($t)};for(let $t=0;$t<De.length;$t++)De[$t].each(bt);return nt},ot=(De,nt)=>De?K.some(nt):K.none(),V=De=>nt=>nt.options.get(De),ut=De=>{const nt=De.options.register;nt("link_assume_external_targets",{processor:bt=>{const $t=u(bt)||y(bt);return $t?bt===!0?{value:1,valid:$t}:bt==="http"||bt==="https"?{value:bt,valid:$t}:{value:0,valid:$t}:{valid:!1,message:"Must be a string or a boolean."}},default:!1}),nt("link_context_toolbar",{processor:"boolean",default:!1}),nt("link_list",{processor:bt=>u(bt)||R(bt)||$(bt,d)}),nt("link_default_target",{processor:"string"}),nt("link_default_protocol",{processor:"string",default:"https"}),nt("link_target_list",{processor:bt=>y(bt)||$(bt,d),default:!0}),nt("link_rel_list",{processor:"object[]",default:[]}),nt("link_class_list",{processor:"object[]",default:[]}),nt("link_title",{processor:"boolean",default:!0}),nt("allow_unsafe_link_target",{processor:"boolean",default:!1}),nt("link_quicklink",{processor:"boolean",default:!1})},Qe=V("link_assume_external_targets"),Bt=V("link_context_toolbar"),Ct=V("link_list"),He=V("link_default_target"),st=V("link_default_protocol"),rn=V("link_target_list"),Et=V("link_rel_list"),Cn=V("link_class_list"),je=V("link_title"),mt=V("allow_unsafe_link_target"),he=V("link_quicklink");var Zo=tinymce.util.Tools.resolve("tinymce.util.Tools");const Kn=De=>u(De.value)?De.value:"",so=De=>u(De.text)?De.text:u(De.title)?De.title:"",Yo=(De,nt)=>{const bt=[];return Zo.each(De,$t=>{const On=so($t);if($t.menu!==void 0){const Mo=Yo($t.menu,nt);bt.push({text:On,items:Mo})}else{const Mo=nt($t);bt.push({text:On,value:Mo})}}),bt},as=(De=Kn)=>nt=>K.from(nt).map(bt=>Yo(bt,De)),pt={sanitize:D
2023-11-20 13:52:33 +02:00
Actual: `+_r.join(","));if(!Gt(j,cu=>Et(_r,cu)))throw new Error("Not all branches were specified when using match. Specified: "+_r.join(", ")+`
2023-11-20 13:56:20 +02:00
Required: `+j.join(", "));return sr[Sn].apply(null,Uo)},log:sr=>{console.log(sr,{constructors:j,constructor:Sn,params:Uo})}}}}),ye}}.generate([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}])});const Jn=(z,j)=>{const ye=Gu.fromTable(z);return q1(ye,j).bind(ct=>{const Ft=ct[ct.length-1],Sn=ct[0].row,In=Ft.row+Ft.rowspan,Uo=ye.all.slice(Sn,In);return xy(Uo)}).getOr("")},Ac=z=>Zc(z,"rgb")?iu(z):z,$f=z=>{const j=$o.fromDom(z);return{borderwidth:$t(j,"border-width").getOr(""),borderstyle:$t(j,"border-style").getOr(""),bordercolor:$t(j,"border-color").map(Ac).getOr(""),backgroundcolor:$t(j,"background-color").map(Ac).getOr("")}},ch=z=>{const j=z[0],ye=z.slice(1);return he(ye,Pe=>{he(we(j),ct=>{Re(Pe,(Ft,Sn)=>{const In=j[ct];In!==""&&ct===Sn&&In!==Ft&&(j[ct]="")})})}),j},Vc=(z,j,ye,Pe)=>jt(z,ct=>!b(ye.formatter.matchNode(Pe,j+ct))).getOr(""),qg=L(Vc,["left","center","right"],"align"),Pd=L(Vc,["top","middle","bottom"],"valign"),bl=(z,j)=>{const ye=Jf(z),Pe=jl(z),ct=()=>({borderstyle:ut(ye,"border-style").getOr(""),bordercolor:Ac(ut(ye,"border-color").getOr("")),backgroundcolor:Ac(ut(ye,"background-color").getOr(""))}),Ft={height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,class:"",align:"",border:""},Sn=()=>{const Si=ye["border-width"];return Df(z)&&Si?{border:Si}:ut(Pe,"border").fold(()=>({}),sr=>({border:sr}))},In=j?ct():{},Uo=()=>{const Si=ut(ye,"border-spacing").or(ut(Pe,"cellspacing")).fold(()=>({}),_r=>({cellspacing:_r})),sr=ut(ye,"border-padding").or(ut(Pe,"cellpadding")).fold(()=>({}),_r=>({cellpadding:_r}));return{...Si,...sr}};return{...Ft,...ye,...Pe,...In,...Sn(),...Uo()}},Iu=z=>Bn($o.fromDom(z)).map(j=>{const ye={selection:Wm(z.cells)};return Jn(j,ye)}).getOr(""),Wp=(z,j,ye)=>{const Pe=(In,Uo)=>{const ts=$t($o.fromDom(Uo),"border-width");return Df(z)&&ts.isSome()?ts.getOr(""):In.getAttrib(Uo,"border")||Tc(z.dom,Uo,"border-width")||Tc(z.dom,Uo,"border")||""},ct=z.dom,Ft=Df(z)?ct.getStyle(j,"border-spacing")||ct.getAttrib(j,"cellspacing"):ct.getAttrib(j,"cellspacing")||ct.getStyle(j,"border-spacing"),Sn=Df(z)?Tc(ct,j,"padding")||ct.getAttrib(j,"cellpadding"):ct.getAttrib(j,"cellpadding")||Tc(ct,j,"padding");return{width:ct.getStyle(j,"width")||ct.getAttrib(j,"width"),height:ct.getStyle(j,"height")||ct.getAttrib(j,"height"),cellspacing:Ft!=null?Ft:"",cellpadding:Sn!=null?Sn:"",border:Pe(ct,j),caption:!!ct.select("caption",j)[0],class:ct.getAttrib(j,"class",""),align:qg(z,j),...ye?$f(j):{}}},G1=(z,j,ye)=>{const Pe=z.dom;return{height:Pe.getStyle(j,"height")||Pe.getAttrib(j,"height"),class:Pe.getAttrib(j,"class",""),type:Iu(j),align:qg(z,j),...ye?$f(j):{}}},_n=(z,j,ye,Pe)=>{const ct=z.dom,Ft=Pe.getOr(j),Sn=(In,Uo)=>ct.getStyle(In,Uo)||ct.getAttrib(In,Uo);return{width:Sn(Ft,"width"),height:Sn(j,"height"),scope:ct.getAttrib(j,"scope"),celltype:Fc(j),class:ct.getAttrib(j,"class",""),halign:qg(z,j),valign:Pd(z,j),...ye?$f(j):{}}},Xm=(z,j)=>{const ye=Gu.fromTable(z),Pe=Gu.justCells(ye),ct=so(Pe,Ft=>Cn(j,Sn=>bs(Ft.element,Sn)));return mt(ct,Ft=>({element:Ft.element.dom,column:Gu.getColumnAt(ye,Ft.column).map(Sn=>Sn.element.dom)}))},Md=(z,j,ye,Pe)=>{Pe("scope")&&z.setAttrib("scope",ye.scope),Pe("class")&&z.setAttrib("class",ye.class),Pe("height")&&z.setStyle("height",nr(ye.height)),Pe("width")&&j.setStyle("width",nr(ye.width))},uh=(z,j,ye)=>{ye("backgroundcolor")&&z.setFormat("tablecellbackgroundcolor",j.backgroundcolor),ye("bordercolor")&&z.setFormat("tablecellbordercolor",j.bordercolor),ye("borderstyle")&&z.setFormat("tablecellborderstyle",j.borderstyle),ye("borderwidth")&&z.setFormat("tablecellborderwidth",nr(j.borderwidth))},of=(z,j,ye,Pe)=>{const ct=j.length===1;he(j,Ft=>{const Sn=Ft.element,In=ct?oe:Pe,Uo=td.normal(z,Sn),ts=Ft.column.map(Si=>td.normal(z,Si)).getOr(Uo);Md(Uo,ts,ye,In),Hg(z)&&uh(Uo,ye,In),Pe("halign")&&qf(z,Sn,ye.halign),Pe("valign")&&eh(z,Sn,ye.valign)})},K1=(z,j)=>{z.execCommand("mceTableCellType",!1,{type:j.celltype,no_events:!0})},mi=(z,j,ye,Pe)=>{const ct=Xe(Pe,(Ft,Sn)=>ye[Sn]!==Ft);V(ct)>0&&j.length>=1&&Bn(j[0]).each(Ft=>{cons
`),He)}),Bt.innerHTML=ut.encode((Ct=Bt.textContent)!==null&&Ct!==void 0?Ct:""),Q(V).highlightElement(Bt),ut.setAttrib(Bt,"data-mce-highlighted",!0),Bt.className=ve(Bt.className)})})}),V.on("PreInit",()=>{V.parser.addNodeFilter("pre",ut=>{var Qe;for(let Bt=0,Ct=ut.length;Bt<Ct;Bt++){const He=ut[Bt];((Qe=He.attr("class"))!==null&&Qe!==void 0?Qe:"").indexOf("language-")!==-1&&(He.attr("contenteditable","false"),He.attr("data-mce-highlighted","false"))}})})},ce=(V,ut=s)=>Qe=>{const Bt=()=>{Qe.setEnabled(V.selection.isEditable()),ut(Qe)};return V.on("NodeChange",Bt),Bt(),()=>{V.off("NodeChange",Bt)}},Xe=V=>{const ut=V.selection.getStart();return V.dom.is(ut,'pre[class*="language-"]')},tt=V=>{const ut=()=>V.execCommand("codesample");V.ui.registry.addToggleButton("codesample",{icon:"code-sample",tooltip:"Insert/edit code sample",onAction:ut,onSetup:ce(V,Qe=>{Qe.setActive(Xe(V))})}),V.ui.registry.addMenuItem("codesample",{text:"Code sample...",icon:"code-sample",onAction:ut,onSetup:ce(V)})};var ot=()=>{o.add("codesample",V=>{E(V),Oe(V),tt(V),G(V),V.on("dblclick",ut=>{F(ut.target)&&oe(V)})})};ot()})();(function(){var o=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(Ge,qe,Nt)=>{var Ut;return Nt(Ge,qe.prototype)?!0:((Ut=Ge.constructor)===null||Ut===void 0?void 0:Ut.name)===qe.name},t=Ge=>{const qe=typeof Ge;return Ge===null?"null":qe==="object"&&Array.isArray(Ge)?"array":qe==="object"&&e(Ge,String,(Nt,Ut)=>Ut.isPrototypeOf(Nt))?"string":qe},s=Ge=>qe=>t(qe)===Ge,a=s("string"),l=s("object"),u=s("array"),d=Ge=>Ge==null,h=Ge=>!d(Ge);class b{constructor(qe,Nt){this.tag=qe,this.value=Nt}static some(qe){return new b(!0,qe)}static none(){return b.singletonNone}fold(qe,Nt){return this.tag?Nt(this.value):qe()}isSome(){return this.tag}isNone(){return!this.tag}map(qe){return this.tag?b.some(qe(this.value)):b.none()}bind(qe){return this.tag?qe(this.value):b.none()}exists(qe){return this.tag&&qe(this.value)}forall(qe){return!this.tag||qe(this.value)}filter(qe){return!this.tag||qe(this.value)?this:b.none()}getOr(qe){return this.tag?this.value:qe}or(qe){return this.tag?this:qe}getOrThunk(qe){return this.tag?this.value:qe()}orThunk(qe){return this.tag?this:qe()}getOrDie(qe){if(this.tag)return this.value;throw new Error(qe!=null?qe:"Called getOrDie on None")}static from(qe){return h(qe)?b.some(qe):b.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(qe){this.tag&&qe(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}b.singletonNone=new b(!1);const y=Array.prototype.push,C=(Ge,qe)=>{for(let Nt=0,Ut=Ge.length;Nt<Ut;Nt++){const bo=Ge[Nt];qe(bo,Nt)}},E=Ge=>{const qe=[];for(let Nt=0,Ut=Ge.length;Nt<Ut;++Nt){if(!u(Ge[Nt]))throw new Error("Arr.flatten item "+Nt+" was not an array, input: "+Ge);y.apply(qe,Ge[Nt])}return qe},R=Ge=>{let qe=Ge;return{get:()=>qe,set:bo=>{qe=bo}}},$=Object.keys,Q=Object.hasOwnProperty,F=(Ge,qe)=>{const Nt=$(Ge);for(let Ut=0,bo=Nt.length;Ut<bo;Ut++){const Lo=Nt[Ut],Go=Ge[Lo];qe(Go,Lo)}},U=(Ge,qe)=>K(Ge,qe)?b.from(Ge[qe]):b.none(),K=(Ge,qe)=>Q.call(Ge,qe),L=Ge=>qe=>qe.options.get(Ge),te=Ge=>{const qe=Ge.options.register;qe("audio_template_callback",{processor:"function"}),qe("video_template_callback",{processor:"function"}),qe("iframe_template_callback",{processor:"function"}),qe("media_live_embeds",{processor:"boolean",default:!0}),qe("media_filter_html",{processor:"boolean",default:!0}),qe("media_url_resolver",{processor:"function"}),qe("media_alt_source",{processor:"boolean",default:!0}),qe("media_poster",{processor:"boolean",default:!0}),qe("media_dimensions",{processor:"boolean",default:!0})},ne=L("audio_template_callback"),oe=L("video_template_callback"),G=L("iframe_template_callback"),we=L("media_live_embeds"),ve=L("media_filter_html"),Re=L("media_url_resolver"),Oe=L("media_alt_source"),ce=L("media_poster"),Xe=L("media_dimensions");var tt=tinymce.util.Tools.resolve("tinymce.util.Tools"),ot=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),V=tinymce.util.Tools.resolve("tinymce.html.DomParser");const ut=ot.DOM
2023-11-17 20:21:45 +02:00
<source src="`+Ge.altsource+'"'+(Ge.altsourcemime?' type="'+Ge.altsourcemime+'"':"")+` />
`:"")+"</audio>",Ne=(Ge,qe)=>qe?qe(Ge):'<video width="'+Ge.width+'" height="'+Ge.height+'"'+(Ge.poster?' poster="'+Ge.poster+'"':"")+` controls="controls">
<source src="`+Ge.source+'"'+(Ge.sourcemime?' type="'+Ge.sourcemime+'"':"")+` />
`+(Ge.altsource?'<source src="'+Ge.altsource+'"'+(Ge.altsourcemime?' type="'+Ge.altsourcemime+'"':"")+` />
2023-11-20 13:56:20 +02:00
`:"")+"</video>",Gt=(Ge,qe)=>{var Nt;const Ut=tt.extend({},qe);if(!Ut.source&&(tt.extend(Ut,Ct((Nt=Ut.embed)!==null&&Nt!==void 0?Nt:"",Ge.schema)),!Ut.source))return"";Ut.altsource||(Ut.altsource=""),Ut.poster||(Ut.poster=""),Ut.source=Ge.convertURL(Ut.source,"source"),Ut.altsource=Ge.convertURL(Ut.altsource,"source"),Ut.sourcemime=He(Ut.source),Ut.altsourcemime=He(Ut.altsource),Ut.poster=Ge.convertURL(Ut.poster,"poster");const bo=as(Ut.source);if(bo&&(Ut.source=bo.url,Ut.type=bo.type,Ut.allowfullscreen=bo.allowFullscreen,Ut.width=Ut.width||String(bo.w),Ut.height=Ut.height||String(bo.h)),Ut.embed)return Zo(Ut.embed,Ut,!0,Ge.schema);{const Lo=ne(Ge),Go=oe(Ge),ei=G(Ge);return Ut.width=Ut.width||"300",Ut.height=Ut.height||"150",tt.each(Ut,(lt,Xo)=>{Ut[Xo]=Ge.dom.encode(""+lt)}),Ut.type==="iframe"?kt(Ut,ei):Ut.sourcemime==="application/x-shockwave-flash"?jt(Ut):Ut.sourcemime.indexOf("audio")!==-1?pt(Ut,Lo):Ne(Ut,Go)}},bn=Ge=>Ge.hasAttribute("data-mce-object")||Ge.hasAttribute("data-ephox-embed-iri"),At=Ge=>{Ge.on("click keyup touchend",()=>{const qe=Ge.selection.getNode();qe&&Ge.dom.hasClass(qe,"mce-preview-object")&&Ge.dom.getAttrib(qe,"data-mce-selected")&&qe.setAttribute("data-mce-selected","2")}),Ge.on("ObjectResized",qe=>{const Nt=qe.target;if(Nt.getAttribute("data-mce-object")){let Ut=Nt.getAttribute("data-mce-html");Ut&&(Ut=unescape(Ut),Nt.setAttribute("data-mce-html",escape(Zo(Ut,{width:String(qe.width),height:String(qe.height)},!1,Ge.schema))))}})},An={},zn=(Ge,qe,Nt)=>new Promise((Ut,bo)=>{const Lo=Go=>(Go.html&&(An[Ge.source]=Go),Ut({url:Ge.source,html:Go.html?Go.html:qe(Ge)}));An[Ge.source]?Lo(An[Ge.source]):Nt({url:Ge.source},Lo,bo)}),ps=(Ge,qe)=>Promise.resolve({html:qe(Ge),url:Ge.source}),oo=Ge=>qe=>Gt(Ge,qe),Ss=(Ge,qe)=>{const Nt=Re(Ge);return Nt?zn(qe,oo(Ge),Nt):ps(qe,oo(Ge))},Mr=Ge=>K(An,Ge),$s=(Ge,qe)=>U(qe,Ge).bind(Nt=>U(Nt,"meta")),tr=(Ge,qe,Nt)=>Ut=>{const bo=()=>U(Ge,Ut),Lo=()=>U(qe,Ut),Go=Xo=>U(Xo,"value").bind(Ni=>Ni.length>0?b.some(Ni):b.none()),ei=()=>bo().bind(Xo=>l(Xo)?Go(Xo).orThunk(Lo):Lo().orThunk(()=>b.from(Xo))),lt=()=>Lo().orThunk(()=>bo().bind(Xo=>l(Xo)?Go(Xo):b.from(Xo)));return{[Ut]:(Ut===Nt?ei():lt()).getOr("")}},Xs=(Ge,qe)=>{const Nt={};return U(Ge,"dimensions").each(Ut=>{C(["width","height"],bo=>{U(qe,bo).orThunk(()=>U(Ut,bo)).each(Lo=>Nt[bo]=Lo)})}),Nt},wa=(Ge,qe)=>{const Nt=qe&&qe!=="dimensions"?$s(qe,Ge).getOr({}):{},Ut=tr(Ge,Nt,qe);return{...Ut("source"),...Ut("altsource"),...Ut("poster"),...Ut("embed"),...Xs(Ge,Nt)}},dr=Ge=>{const qe={...Ge,source:{value:U(Ge,"source").getOr("")},altsource:{value:U(Ge,"altsource").getOr("")},poster:{value:U(Ge,"poster").getOr("")}};return C(["width","height"],Nt=>{U(Ge,Nt).each(Ut=>{const bo=qe.dimensions||{};bo[Nt]=Ut,qe.dimensions=bo})}),qe},Ns=Ge=>qe=>{const Nt=qe&&qe.msg?"Media embed handler error: "+qe.msg:"Media embed handler threw unknown error.";Ge.notificationManager.open({type:"error",text:Nt})},qr=Ge=>{const qe=Ge.selection.getNode(),Nt=bn(qe)?Ge.serializer.serialize(qe,{selection:!0}):"",Ut=Ct(Nt,Ge.schema),Lo=(()=>{if(Ls(Ut.source,Ut.type)){const Go=Ge.dom.getRect(qe);return{width:Go.w.toString().replace(/px$/,""),height:Go.h.toString().replace(/px$/,"")}}else return{}})();return{embed:Nt,...Ut,...Lo}},$o=(Ge,qe)=>Nt=>{if(a(Nt.url)&&Nt.url.trim().length>0){const Ut=Nt.html,Lo={...Ct(Ut,qe.schema),source:Nt.url,embed:Ut};Ge.setData(dr(Lo))}},Po=(Ge,qe)=>{const Nt=Ge.dom.select("*[data-mce-object]");for(let Ut=0;Ut<qe.length;Ut++)for(let bo=Nt.length-1;bo>=0;bo--)qe[Ut]===Nt[bo]&&Nt.splice(bo,1);Ge.selection.select(Nt[0])},Rr=(Ge,qe)=>{const Nt=Ge.dom.select("*[data-mce-object]");Ge.insertContent(qe),Po(Ge,Nt),Ge.nodeChanged()},Ls=(Ge,qe)=>h(qe)&&qe==="ephox-embed-iri"&&h(as(Ge)),aa=(Ge,qe)=>((Ut,bo)=>Ut.width!==bo.width||Ut.height!==bo.height)(Ge,qe)&&Ls(qe.source,Ge.type),bs=(Ge,qe,Nt)=>{var Ut;qe.embed=aa(Ge,qe)&&Xe(Nt)?Gt(Nt,{...qe,embed:""}):Zo((Ut=qe.embed)!==null&&Ut!==void 0?Ut:"",qe,!1,Nt.schema),qe.embed&&(Ge.source===qe.source||Mr(qe.source))?Rr(Nt,qe.embed):Ss(Nt,qe).then(bo=>{Rr(Nt,bo.html)}).catch(Ns(Nt))},_a=Ge=>{const
`));return ce(pt.split(""),s).length},Bt=(kt,jt)=>{const pt=ot(kt,jt).join("");return ut(pt)},Ct=(kt,jt)=>{const pt=ot(kt,jt).join("").replace(/\s/g,"");return ut(pt)},He=(kt,jt)=>()=>jt(kt.getBody(),kt.schema),st=(kt,jt)=>()=>jt(kt.selection.getRng().cloneContents(),kt.schema),rn=kt=>He(kt,Qe),Et=kt=>({body:{getWordCount:rn(kt),getCharacterCount:He(kt,Bt),getCharacterCountWithoutSpaces:He(kt,Ct)},selection:{getWordCount:st(kt,Qe),getCharacterCount:st(kt,Bt),getCharacterCountWithoutSpaces:st(kt,Ct)},getCount:rn(kt)}),Cn=(kt,jt)=>{kt.windowManager.open({title:"Word Count",body:{type:"panel",items:[{type:"table",header:["Count","Document","Selection"],cells:[["Words",String(jt.body.getWordCount()),String(jt.selection.getWordCount())],["Characters (no spaces)",String(jt.body.getCharacterCountWithoutSpaces()),String(jt.selection.getCharacterCountWithoutSpaces())],["Characters",String(jt.body.getCharacterCount()),String(jt.selection.getCharacterCount())]]}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}]})},je=(kt,jt)=>{kt.addCommand("mceWordCount",()=>Cn(kt,jt))},mt=(kt,jt)=>{let pt=null;return{cancel:()=>{t(pt)||(clearTimeout(pt),pt=null)},throttle:(...bn)=>{t(pt)&&(pt=setTimeout(()=>{pt=null,kt.apply(null,bn)},jt))}}};var he=tinymce.util.Tools.resolve("tinymce.util.Delay");const Zo=(kt,jt)=>{kt.dispatch("wordCountUpdate",{wordCount:{words:jt.body.getWordCount(),characters:jt.body.getCharacterCount(),charactersWithoutSpaces:jt.body.getCharacterCountWithoutSpaces()}})},Kn=(kt,jt)=>{Zo(kt,jt)},so=(kt,jt,pt)=>{const Ne=mt(()=>Kn(kt,jt),pt);kt.on("init",()=>{Kn(kt,jt),he.setEditorTimeout(kt,()=>{kt.on("SetContent BeforeAddUndo Undo Redo ViewUpdate keyup",Ne.throttle)},0),kt.on("remove",Ne.cancel)})},Yo=kt=>{const jt=()=>kt.execCommand("mceWordCount");kt.ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:jt}),kt.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:jt})};var as=(kt=300)=>{o.add("wordcount",jt=>{const pt=Et(jt);return je(jt,pt),Yo(jt),so(jt,pt,kt),pt})};as()})();function NTe(o){let e,t;return{c(){e=re("div"),t=re("div"),Z(t,"class","form-control"),Z(e,"class","tox-wrapper")},m(s,a){Te(s,e,a),X(e,t),t.innerHTML=o[0],o[4](t),o[5](e)},p(s,[a]){a&1&&(t.innerHTML=s[0])},i:fn,o:fn,d(s){s&&ke(e),o[4](null),o[5](null)}}}const ITe="bold italic underline strikethrough removeformat | link | subscript superscript bullist numlist media image codesample table code wordcount blockquote indent outdent blocks";function BTe(o,e,t){let{value:s=""}=e,{additionalConfig:a={}}=e,l="",u,d,h;const b=["autoresize","code","image","table","codesample","link","lists","media","wordcount"];ore(()=>{d&&d.destroy()}),W1(()=>{const E={target:u,toolbar_mode:"sliding",toolbar_sticky:!0,skin:!1,content_css:!1,content_style:$Te.toString(),branding:!1,inline:!1,plugins:b,contextmenu:!1,menubar:!1,statusbar:!1,entity_encoding:"raw",convert_urls:!1,toolbar:ITe,image_caption:!0,relative_urls:!1,browser_spellcheck:!0,max_height:600,content_style:"img {max-width: 100%;height: auto;",setup(R){d=R,R.on("init",function($){R.setContent(s!=null?s:"")}),R.on("change input undo redo",function($){l=R.getContent(),l!==s&&t(0,s=l)})}};RTe.init({...E,...a})});function y(E){Ro[E?"unshift":"push"](()=>{u=E,t(1,u)})}function C(E){Ro[E?"unshift":"push"](()=>{h=E,t(2,h)})}return o.$$set=E=>{"value"in E&&t(0,s=E.value),"additionalConfig"in E&&t(3,a=E.additionalConfig)},[s,u,h,a,y,C]}class v1e extends uo{constructor(e){super(),co(this,e,BTe,NTe,lo,{value:0,additionalConfig:3})}}function LTe(o){let e,t,s,a;function l(d){o[2](d)}let u={additionalConfig:o[1]};return o[0].value!==void 0&&(u.value=o[0].value),t=new v1e({props:u}),Ro.push(()=>er(t,"value",l)),{c(){e=re("div"),en(t.$$.fragment),Z(e,"class","mb-0")},m(d,h){Te(d,e,h),Kt(t,e,null),a=!0},p(d,[h]){const b={};!s&&h&1&&(s=!0,b.value=d[0].value,lr(()=>s=!1)),t.$set(b)},i(d){a||(xe(t.$$.fragment,d),a=!0)},o(d){Be(t.$$.fragment,d),a=!1},d(d){d&&ke(e),Jt(t)}}}function FTe(o,e,t){let{block:s}=e,a={};function l(u){o.$$.not_equal(s.value,u
2023-11-17 20:21:45 +02:00
`){let a="";for(let l=0,u=0;l<=t&&u<this.text.length;u++){let d=this.text[u],h=l+d.length;l>e&&u&&(a+=s),e<h&&t>l&&(a+=d.slice(Math.max(0,e-l),t-l)),l=h+1}return a}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let s=[],a=-1;for(let l of e)s.push(l),a+=l.length+1,s.length==32&&(t.push(new Sf(s,a)),s=[],a=-1);return a>-1&&t.push(new Sf(s,a)),t}}class ay extends el{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let s of e)this.lines+=s.lines}lineInner(e,t,s,a){for(let l=0;;l++){let u=this.children[l],d=a+u.length,h=s+u.lines-1;if((t?h:d)>=e)return u.lineInner(e,t,s,a);a=d+1,s=h+1}}decompose(e,t,s,a){for(let l=0,u=0;u<=t&&l<this.children.length;l++){let d=this.children[l],h=u+d.length;if(e<=h&&t>=u){let b=a&((u<=e?1:0)|(h>=t?2:0));u>=e&&h<=t&&!b?s.push(d):d.decompose(e-u,t-u,s,b)}u=h+1}}replace(e,t,s){if(s.lines<this.lines)for(let a=0,l=0;a<this.children.length;a++){let u=this.children[a],d=l+u.length;if(e>=l&&t<=d){let h=u.replace(e-l,t-l,s),b=this.lines-u.lines+h.lines;if(h.lines<b>>5-1&&h.lines>b>>5+1){let y=this.children.slice();return y[a]=h,new ay(y,this.length-(t-e)+s.length)}return super.replace(l,d,h)}l=d+1}return super.replace(e,t,s)}sliceString(e,t=this.length,s=`
2023-11-20 13:56:20 +02:00
`){let a="";for(let l=0,u=0;l<this.children.length&&u<=t;l++){let d=this.children[l],h=u+d.length;u>e&&l&&(a+=s),e<h&&t>u&&(a+=d.sliceString(e-u,t-u,s)),u=h+1}return a}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ay))return 0;let s=0,[a,l,u,d]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;a+=t,l+=t){if(a==u||l==d)return s;let h=this.children[a],b=e.children[l];if(h!=b)return s+h.scanIdentical(b,t);s+=h.length+1}}static from(e,t=e.reduce((s,a)=>s+a.length+1,-1)){let s=0;for(let R of e)s+=R.lines;if(s<32){let R=[];for(let $ of e)$.flatten(R);return new Sf(R,t)}let a=Math.max(32,s>>5),l=a<<1,u=a>>1,d=[],h=0,b=-1,y=[];function C(R){let $;if(R.lines>l&&R instanceof ay)for(let Q of R.children)C(Q);else R.lines>u&&(h>u||!h)?(E(),d.push(R)):R instanceof Sf&&h&&($=y[y.length-1])instanceof Sf&&R.lines+$.lines<=32?(h+=R.lines,b+=R.length+1,y[y.length-1]=new Sf($.text.concat(R.text),$.length+1+R.length)):(h+R.lines>a&&E(),h+=R.lines,b+=R.length+1,y.push(R))}function E(){h!=0&&(d.push(y.length==1?y[0]:ay.from(y,b)),b=-1,h=y.length=0)}for(let R of e)C(R);return E(),d.length==1?d[0]:new ay(d,t)}}el.empty=new Sf([""],0);function ZTe(o){let e=-1;for(let t of o)e+=t.length+1;return e}function PH(o,e,t=0,s=1e9){for(let a=0,l=0,u=!0;l<o.length&&a<=s;l++){let d=o[l],h=a+d.length;h>=t&&(h>s&&(d=d.slice(0,s-a)),a<t&&(d=d.slice(t-a)),u?(e[e.length-1]+=d,u=!1):e.push(d)),a=h+1}return e}function Kue(o,e,t){return PH(o,[""],e,t)}class f6{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Sf?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let s=this.nodes.length-1,a=this.nodes[s],l=this.offsets[s],u=l>>1,d=a instanceof Sf?a.text.length:a.children.length;if(u==(t>0?d:0)){if(s==0)return this.done=!0,this.value="",this;t>0&&this.offsets[s-1]++,this.nodes.pop(),this.offsets.pop()}else if((l&1)==(t>0?0:1)){if(this.offsets[s]+=t,e==0)return this.lineBreak=!0,this.value=`
`,this;e--}else if(a instanceof Sf){let h=a.text[u+(t<0?-1:0)];if(this.offsets[s]+=t,h.length>Math.max(0,e))return this.value=e==0?h:t>0?h.slice(e):h.slice(0,h.length-e),this;e-=h.length}else{let h=a.children[u+(t<0?-1:0)];e>h.length?(e-=h.length,this.offsets[s]+=t):(t<0&&this.offsets[s]--,this.nodes.push(h),this.offsets.push(t>0?1:(h instanceof Sf?h.text.length:h.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class O1e{constructor(e,t,s){this.value="",this.done=!1,this.cursor=new f6(e,t>s?-1:1),this.pos=t>s?e.length:0,this.from=Math.min(t,s),this.to=Math.max(t,s)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let s=t<0?this.pos-this.from:this.to-this.pos;e>s&&(e=s),s-=e;let{value:a}=this.cursor.next(e);return this.pos+=(a.length+e)*t,this.value=a.length<=s?a:t<0?a.slice(a.length-s):a.slice(0,s),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class y1e{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:s,value:a}=this.inner.next(e);return t?(this.done=!0,this.value=""):s?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=a,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(el.prototype[Symbol.iterator]=function(){return this.iter()},f6.prototype[Symbol.iterator]=O1e.prototype[Symbol.iterator]=y1e.prototype[Symbol.iterator]=function(){return this});class HTe{constructor(e,t,s,a){this.from=e,this.to=t,this.number=s,this.text=a}get length(){return this.to-this.from}}let yD="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(o=>o?parseInt(o,36):1);for(let o=1;o<yD.length;o++)yD[o]+=yD[o-1];function zTe(o){for(let e=1;e<yD.length;e+=2)if(yD[e]>o)return yD[e-1]<=o;return!1}function Jue(o){return o>=127462&&o<=127487}const efe=8205;function Bm(o,e,t=!0,s=!0){return(t?w1e:VTe)(o,e,s)}function w1e(o,e,t){if(e==o.length)return e;e&&_1e(o.charCodeAt(e))&&S1e(o.charCodeAt(e-1))&&e--;let s=Uh(o,e);for(e+=Fb(s);e<o.length;){let a=Uh(o,e);if(s==efe||a==efe||t&&zTe(a))e+=Fb(a),s=a;else if(Jue(a)){let l=0,u=e-2;for(;u>=0&&Jue(Uh(o,u));)l++,u-=2;if(l%2==0)break;e+=2}else break}return e}function VTe(o,e,t){for(;e>0;){let s=w1e(o,e-2,t);if(s<e)return s;e--}return 0}function _1e(o){return o>=56320&&o<57344}function S1e(o){return o>=55296&&o<56320}function Uh(o,e){let t=o.charCodeAt(e);if(!S1e(t)||e+1==o.length)return t;let s=o.charCodeAt(e+1);return _1e(s)?(t-55296<<10)+(s-56320)+65536:t}function fre(o){return o<=65535?String.fromCh
`}get readOnly(){return this.facet(R1e)}phrase(e,...t){for(let s of this.facet(ra.phrases))if(Object.prototype.hasOwnProperty.call(s,e)){e=s[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(s,a)=>{if(a=="$")return"$";let l=+(a||1);return!l||l>t.length?s:t[l-1]})),e}languageDataAt(e,t,s=-1){let a=[];for(let l of this.facet(T1e))for(let u of l(this,t,s))Object.prototype.hasOwnProperty.call(u,e)&&a.push(u[e]);return a}charCategorizer(e){return tEe(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:s,length:a}=this.doc.lineAt(e),l=this.charCategorizer(e),u=e-s,d=e-s;for(;u>0;){let h=Bm(t,u,!1);if(l(t.slice(h,u))!=tu.Word)break;u=h}for(;d<a;){let h=Bm(t,d);if(l(t.slice(d,h))!=tu.Word)break;d=h}return u==d?null:Ln.range(u+s,d+s)}}ra.allowMultipleSelections=E1e;ra.tabSize=As.define({combine:o=>o.length?o[0]:4});ra.lineSeparator=A1e;ra.readOnly=R1e;ra.phrases=As.define({compare(o,e){let t=Object.keys(o),s=Object.keys(e);return t.length==s.length&&t.every(a=>o[a]==e[a])}});ra.languageData=T1e;ra.changeFilter=D1e;ra.transactionFilter=P1e;ra.transactionExtender=M1e;DC.reconfigure=bi.define();function Tv(o,e,t={}){let s={};for(let a of o)for(let l of Object.keys(a)){let u=a[l],d=s[l];if(d===void 0)s[l]=u;else if(!(d===u||u===void 0))if(Object.hasOwnProperty.call(t,l))s[l]=t[l](d,u);else throw new Error("Config merge conflict for field "+l)}for(let a in e)s[a]===void 0&&(s[a]=e[a]);return s}class mE{eq(e){return this==e}range(e,t=e){return S6.create(e,t,this)}}mE.prototype.startSide=mE.prototype.endSide=0;mE.prototype.point=!1;mE.prototype.mapMode=Xh.TrackDel;class S6{constructor(e,t,s){this.from=e,this.to=t,this.value=s}static create(e,t,s){return new S6(e,t,s)}}function Xoe(o,e){return o.from-e.from||o.value.startSide-e.value.startSide}class mre{constructor(e,t,s,a){this.from=e,this.to=t,this.value=s,this.maxPoint=a}get length(){return this.to[this.to.length-1]}findIndex(e,t,s,a=0){let l=s?this.to:this.from;for(let u=a,d=l.length;;){if(u==d)return u;let h=u+d>>1,b=l[h]-e||(s?this.value[h].endSide:this.value[h].startSide)-t;if(h==u)return b>=0?u:d;b>=0?d=h:u=h+1}}between(e,t,s,a){for(let l=this.findIndex(t,-1e9,!0),u=this.findIndex(s,1e9,!1,l);l<u;l++)if(a(this.from[l]+e,this.to[l]+e,this.value[l])===!1)return!1}map(e,t){let s=[],a=[],l=[],u=-1,d=-1;for(let h=0;h<this.value.length;h++){let b=this.value[h],y=this.from[h]+e,C=this.to[h]+e,E,R;if(y==C){let $=t.mapPos(y,b.startSide,b.mapMode);if($==null||(E=R=$,b.startSide!=b.endSide&&(R=t.mapPos(y,b.endSide),R<E)))continue}else if(E=t.mapPos(y,b.startSide),R=t.mapPos(C,b.endSide),E>R||E==R&&b.startSide>0&&b.endSide<=0)continue;(R-E||b.endSide-b.startSide)<0||(u<0&&(u=E),b.point&&(d=Math.max(d,R-E)),s.push(b),a.push(E-u),l.push(R-u))}return{mapped:s.length?new mre(a,l,s,d):null,pos:u}}}class tl{constructor(e,t,s,a){this.chunkPos=e,this.chunk=t,this.nextLayer=s,this.maxPoint=a}static create(e,t,s,a){return new tl(e,t,s,a)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:s=!1,filterFrom:a=0,filterTo:l=this.length}=e,u=e.filter;if(t.length==0&&!u)return this;if(s&&(t=t.slice().sort(Xoe)),this.isEmpty)return t.length?tl.of(t):this;let d=new I1e(this,null,-1).goto(0),h=0,b=[],y=new PC;for(;d.value||h<t.length;)if(h<t.length&&(d.from-t[h].from||d.startSide-t[h].value.startSide)>=0){let C=t[h++];y.addInner(C.from,C.to,C.value)||b.push(C)}else d.rangeIndex==1&&d.chunkIndex<this.chunk.length&&(h==t.length||this.chunkEnd(d.chunkIndex)<t[h].from)&&(!u||a>this.chunkEnd(d.chunkIndex)||l<this.chunkPos[d.chunkIndex])&&y.addChunk(this.chunkPos[d.chunkIndex],this.chunk[d.chunkIndex])?d.nextChunk():((!u||a>d.to||l<d.from||u(d.from,d.to,d.value))&&(y.addInner(d.from,d.to,d.value)||b.push(S6.create(d.from,d.to,d.value))),d.next());return y.finishInner(this.nextLayer.isEmpty&&!b.length?tl.empty:this.nextLayer.update({add:b,filter:u,filt
2023-11-17 23:02:39 +02:00
`)}static newName(){let e=afe[ife]||1;return afe[ife]=e+1,Goe+e.toString(36)}static mount(e,t,s){let a=e[Koe],l=s&&s.nonce;a?l&&a.setNonce(l):a=new oEe(e,l),a.mount(Array.isArray(t)?t:[t])}}let lfe=new Map;class oEe{constructor(e,t){let s=e.ownerDocument||e,a=s.defaultView;if(!e.head&&e.adoptedStyleSheets&&a.CSSStyleSheet){let l=lfe.get(s);if(l)return e.adoptedStyleSheets=[l.sheet,...e.adoptedStyleSheets],e[Koe]=l;this.sheet=new a.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],lfe.set(s,this)}else{this.styleTag=s.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);let l=e.head||e;l.insertBefore(this.styleTag,l.firstChild)}this.modules=[],e[Koe]=this}mount(e){let t=this.sheet,s=0,a=0;for(let l=0;l<e.length;l++){let u=e[l],d=this.modules.indexOf(u);if(d<a&&d>-1&&(this.modules.splice(d,1),a--,d=-1),d==-1){if(this.modules.splice(a++,0,u),t)for(let h=0;h<u.rules.length;h++)t.insertRule(u.rules[h],s++)}else{for(;a<d;)s+=this.modules[a++].rules.length;s+=u.rules.length,a++}}if(!t){let l="";for(let u=0;u<this.modules.length;u++)l+=this.modules[u].getRules()+`
2023-11-20 13:56:20 +02:00
`;this.styleTag.textContent=l}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var RC={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},k6={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},sEe=typeof navigator<"u"&&/Mac/.test(navigator.platform),rEe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Yh=0;Yh<10;Yh++)RC[48+Yh]=RC[96+Yh]=String(Yh);for(var Yh=1;Yh<=24;Yh++)RC[Yh+111]="F"+Yh;for(var Yh=65;Yh<=90;Yh++)RC[Yh]=String.fromCharCode(Yh+32),k6[Yh]=String.fromCharCode(Yh);for(var Ane in RC)k6.hasOwnProperty(Ane)||(k6[Ane]=RC[Ane]);function iEe(o){var e=sEe&&o.metaKey&&o.shiftKey&&!o.ctrlKey&&!o.altKey||rEe&&o.shiftKey&&o.key&&o.key.length==1||o.key=="Unidentified",t=!e&&o.key||(o.shiftKey?k6:RC)[o.keyCode]||o.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function dz(o){let e;return o.nodeType==11?e=o.getSelection?o:o.ownerDocument:e=o,e.getSelection()}function Joe(o,e){return e?o==e||o.contains(e.nodeType!=1?e.parentNode:e):!1}function aEe(o){let e=o.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function RH(o,e){if(!e.anchorNode)return!1;try{return Joe(o,e.anchorNode)}catch{return!1}}function x6(o){return o.nodeType==3?gE(o,0,o.nodeValue.length).getClientRects():o.nodeType==1?o.getClientRects():[]}function hz(o,e,t,s){return t?cfe(o,e,t,s,-1)||cfe(o,e,t,s,1):!1}function T6(o){for(var e=0;;e++)if(o=o.previousSibling,!o)return e}function cfe(o,e,t,s,a){for(;;){if(o==t&&e==s)return!0;if(e==(a<0?0:Vw(o))){if(o.nodeName=="DIV")return!1;let l=o.parentNode;if(!l||l.nodeType!=1)return!1;e=T6(o)+(a<0?0:1),o=l}else if(o.nodeType==1){if(o=o.childNodes[e+(a<0?-1:0)],o.nodeType==1&&o.contentEditable=="false")return!1;e=a<0?Vw(o):0}else return!1}}function Vw(o){return o.nodeType==3?o.nodeValue.length:o.childNodes.length}function gre(o,e){let t=e?o.left:o.right;return{left:t,right:t,top:o.top,bottom:o.bottom}}function lEe(o){return{left:0,right:o.innerWidth,top:0,bottom:o.innerHeight}}function cEe(o,e,t,s,a,l,u,d){let h=o.ownerDocument,b=h.defaultView||window;for(let y=o,C=!1;y&&!C;)if(y.nodeType==1){let E,R=y==h.body,$=1,Q=1;if(R)E=lEe(b);else{if(/^(fixed|sticky)$/.test(getComputedStyle(y).position)&&(C=!0),y.scrollHeight<=y.clientHeight&&y.scrollWidth<=y.clientWidth){y=y.assignedSlot||y.parentNode;continue}let K=y.getBoundingClientRect();$=K.width/y.offsetWidth,Q=K.height/y.offsetHeight,E={left:K.left,right:K.left+y.clientWidth*$,top:K.top,bottom:K.top+y.clientHeight*Q}}let F=0,U=0;if(a=="nearest")e.top<E.top?(U=-(E.top-e.top+u),t>0&&e.bottom>E.bottom+U&&(U=e.bottom-E.bottom+U+u)):e.bottom>E.bottom&&(U=e.bottom-E.bottom+u,t<0&&e.top-U<E.top&&(U=-(E.top+U-e.top+u)));else{let K=e.bottom-e.top,L=E.bottom-E.top;U=(a=="center"&&K<=L?e.top+K/2-L/2:a=="start"||a=="center"&&t<0?e.top-u:e.bottom-L+u)-E.top}if(s=="nearest"?e.left<E.left?(F=-(E.left-e.left+l),t>0&&e.right>E.right+F&&(F=e.right-E.right+F+l)):e.right>E.right&&(F=e.right-E.right+l,t<0&&e.left<E.left+F&&(F=-(E.left+F-e.left+l))):F=(s=="center"?e.left+(e.right-e.left)/2-(E.right-E.left)/2:s=="start"==d?e.left-l:e.right-(E.right-E.left)+l)-E.left,F||U)if(R)b.scrollBy(F,U);else{let K=0,L=0;if(U){let te=y.scrollTop;y.scrollTop+=U/Q,L=(y.scrollTop-te)*Q}if(F){let te=y.scrollLeft;y.scrollLef
`,a=o.state.doc.line(a.number+(t?1:-1)),l=o.bidiSpans(a),b=Ln.cursor(t?a.from:a.to)}if(h){if(!h(y))return d}else{if(!s)return b;h=s(y)}d=b}}function HEe(o,e,t){let s=o.state.charCategorizer(e),a=s(t);return l=>{let u=s(l);return a==tu.Space&&(a=u),a==u}}function zEe(o,e,t,s){let a=e.head,l=t?1:-1;if(a==(t?o.state.doc.length:0))return Ln.cursor(a,e.assoc);let u=e.goalColumn,d,h=o.contentDOM.getBoundingClientRect(),b=o.coordsAtPos(a,e.assoc||-1),y=o.documentTop;if(b)u==null&&(u=b.left-h.left),d=l<0?b.top:b.bottom;else{let R=o.viewState.lineBlockAt(a);u==null&&(u=Math.min(h.right-h.left,o.defaultCharacterWidth*(a-R.from))),d=(l<0?R.top:R.bottom)+y}let C=h.left+u,E=s!=null?s:o.viewState.heightOracle.textHeight>>1;for(let R=0;;R+=10){let $=d+(E+R)*l,Q=mbe(o,{x:C,y:$},!1,l);if($<h.top||$>h.bottom||(l<0?Q<a:Q>a)){let F=o.docView.coordsForChar(Q),U=!F||$<F.top?-1:1;return Ln.cursor(Q,U,void 0,u)}}}function $H(o,e,t){for(;;){let s=0;for(let a of o)a.between(e-1,e+1,(l,u,d)=>{if(e>l&&e<u){let h=s||t||(e-l<u-e?-1:1);e=h<0?l:u,s=h}});if(!s)return e}}function Rne(o,e,t){let s=$H(o.state.facet(Ore).map(a=>a(o)),t.from,e.head>t.from?-1:1);return s==t.from?t:Ln.cursor(s,s<t.from?1:-1)}class VEe{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.handleEvent=this.handleEvent.bind(this),e.scrollDOM.addEventListener("mousedown",t=>{if(t.target==e.scrollDOM&&t.clientY>e.contentDOM.getBoundingClientRect().bottom&&(this.runHandlers("mousedown",t),!t.defaultPrevented&&t.button==2)){let s=e.contentDOM.style.minHeight;e.contentDOM.style.minHeight="100%",setTimeout(()=>e.contentDOM.style.minHeight=s,200)}}),e.scrollDOM.addEventListener("drop",t=>{t.target==e.scrollDOM&&t.clientY>e.contentDOM.getBoundingClientRect().bottom&&this.runHandlers("drop",t)}),this.notifiedFocused=e.hasFocus,Fs.safari&&e.contentDOM.addEventListener("input",()=>null),Fs.gecko&&i3e(e.contentDOM.ownerDocument)}handleEvent(e){!KEe(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let s=this.handlers[e];if(s){for(let a of s.observers)a(this.view,t);for(let a of s.handlers){if(t.defaultPrevented)break;if(a(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=WEe(e),s=this.handlers,a=this.view.contentDOM;for(let l in t)if(l!="scroll"){let u=!t[l].handlers.length,d=s[l];d&&u!=!d.handlers.length&&(a.removeEventListener(l,this.handleEvent),d=null),d||a.addEventListener(l,this.handleEvent,{passive:u})}for(let l in s)l!="scroll"&&!t[l]&&a.removeEventListener(l,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(e.keyCode!=27&&pbe.indexOf(e.keyCode)<0&&(this.view.inputState.lastEscPress=0),Fs.android&&Fs.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Fs.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=gbe.find(s=>s.keyCode==e.keyCode))&&!e.ctrlKey||UEe.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(){let e=this.pendingIOSKey;return e?(this.pendingIOSKey=void 0,_D(this.view.contentDOM,e.key,e.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:Fs.safari&&!Fs.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection
`&&o.lineWrapping&&(s&&(s=Ln.single(s.main.anchor-1,s.main.head-1)),t={from:a.from,to:a.to,insert:el.of([" "])}),t){if(Fs.ios&&o.inputState.flushIOSKey()||Fs.android&&(t.from==a.from&&t.to==a.to&&t.insert.length==1&&t.insert.lines==2&&_D(o.contentDOM,"Enter",13)||(t.from==a.from-1&&t.to==a.to&&t.insert.length==0||l==8&&t.insert.length<t.to-t.from&&t.to>a.head)&&_D(o.contentDOM,"Backspace",8)||t.from==a.from&&t.to==a.to+1&&t.insert.length==0&&_D(o.contentDOM,"Delete",46)))return!0;let u=t.insert.toString();o.inputState.composing>=0&&o.inputState.composing++;let d,h=()=>d||(d=S3e(o,t,s));return o.state.facet(J1e).some(b=>b(o,t.from,t.to,u,h))||o.dispatch(h()),!0}else if(s&&!s.main.eq(a)){let u=!1,d="select";return o.inputState.lastSelectionTime>Date.now()-50&&(o.inputState.lastSelectionOrigin=="select"&&(u=!0),d=o.inputState.lastSelectionOrigin),o.dispatch({selection:s,scrollIntoView:u,userEvent:d}),!0}else return!1}function S3e(o,e,t){let s,a=o.state,l=a.selection.main;if(e.from>=l.from&&e.to<=l.to&&e.to-e.from>=(l.to-l.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&o.inputState.composing<0){let d=l.from<e.from?a.sliceDoc(l.from,e.from):"",h=l.to>e.to?a.sliceDoc(e.to,l.to):"";s=a.replaceSelection(o.state.toText(d+e.insert.sliceString(0,void 0,o.state.lineBreak)+h))}else{let d=a.changes(e),h=t&&t.main.to<=d.newLength?t.main:void 0;if(a.selection.ranges.length>1&&o.inputState.composing>=0&&e.to<=l.to&&e.to>=l.to-10){let b=o.state.sliceDoc(e.from,e.to),y,C=t&&dbe(o,t.main.head);if(C){let $=e.insert.length-(e.to-e.from);y={from:C.from,to:C.to-$}}else y=o.state.doc.lineAt(l.head);let E=l.to-e.to,R=l.to-l.from;s=a.changeByRange($=>{if($.from==l.from&&$.to==l.to)return{changes:d,range:h||$.map(d)};let Q=$.to-E,F=Q-b.length;if($.to-$.from!=R||o.state.sliceDoc(F,Q)!=b||$.to>=y.from&&$.from<=y.to)return{range:$};let U=a.changes({from:F,to:Q,insert:e.insert}),K=$.to-l.to;return{changes:U,range:h?Ln.range(Math.max(0,h.anchor+K),Math.max(0,h.head+K)):$.map(U)}})}else s={changes:d,selection:h&&a.selection.replaceRange(h)}}let u="input.type";return(o.composing||o.inputState.compositionPendingChange&&o.inputState.compositionEndedAt>Date.now()-50)&&(o.inputState.compositionPendingChange=!1,u+=".compose",o.inputState.compositionFirstChange&&(u+=".start",o.inputState.compositionFirstChange=!1)),a.update(s,{userEvent:u,scrollIntoView:!0})}function C3e(o,e,t,s){let a=Math.min(o.length,e.length),l=0;for(;l<a&&o.charCodeAt(l)==e.charCodeAt(l);)l++;if(l==a&&o.length==e.length)return null;let u=o.length,d=e.length;for(;u>0&&d>0&&o.charCodeAt(u-1)==e.charCodeAt(d-1);)u--,d--;if(s=="end"){let h=Math.max(0,l-Math.min(u,d));t-=u+h-l}if(u<l&&o.length<e.length){let h=t<=l&&t>=u?l-t:0;l-=h,d=l+(d-u),u=l}else if(d<l){let h=t<=l&&t>=d?l-t:0;l-=h,u=l+(u-d),d=l}return{from:l,toA:u,toB:d}}function k3e(o){let e=[];if(o.root.activeElement!=o.contentDOM)return e;let{anchorNode:t,anchorOffset:s,focusNode:a,focusOffset:l}=o.observer.selectionRange;return t&&(e.push(new Qfe(t,s)),(a!=t||l!=s)&&e.push(new Qfe(a,l))),e}function x3e(o,e){if(o.length==0)return null;let t=o[0].pos,s=o.length==2?o[1].pos:t;return t>-1&&s>-1?Ln.single(t+e,s+e):null}const T3e={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Nne=Fs.ie&&Fs.ie_version<=11;class E3e{constructor(e){this.view=e,this.active=!1,this.selectionRange=new fEe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let s of t)this.queue.push(s);(Fs.ie&&Fs.ie_version<=11||Fs.ios&&e.composing)&&t.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():this.flush()}),Nne&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.
-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,pse),j3e={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Ine=null;function q3e(){var o;if(Ine==null&&typeof document<"u"&&document.body){let e=document.body.style;Ine=((o=e.tabSize)!==null&&o!==void 0?o:e.MozTabSize)!=null}return Ine||!1}const BH=As.define({combine(o){let e=Tv(o,{render:null,specialChars:X3e,addSpecialChars:null});return(e.replaceTabs=!q3e())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,pse)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,pse)),e}});function G3e(o={}){return[BH.of(o),K3e()]}let Xfe=null;function K3e(){return Xfe||(Xfe=kf.fromClass(class{constructor(o){this.view=o,this.decorations=Br.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(o.state.facet(BH)),this.decorations=this.decorator.createDeco(o)}makeDecorator(o){return new Y3e({regexp:o.specialChars,decoration:(e,t,s)=>{let{doc:a}=t.state,l=Uh(e[0],0);if(l==9){let u=a.lineAt(s),d=t.state.tabSize,h=Cv(u.text,d,s-u.from);return Br.replace({widget:new nAe((d-h%d)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[l]||(this.decorationCache[l]=Br.replace({widget:new tAe(o,l)}))},boundary:o.replaceTabs?void 0:/[^]/})}update(o){let e=o.state.facet(BH);o.startState.facet(BH)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(o.view)):this.decorations=this.decorator.updateDeco(o,this.decorations)}},{decorations:o=>o.decorations}))}const J3e="\u2022";function eAe(o){return o>=32?J3e:o==10?"\u2424":String.fromCharCode(9216+o)}class tAe extends Gw{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=eAe(this.code),s=e.state.phrase("Control character")+" "+(j3e[this.code]||"0x"+this.code.toString(16)),a=this.options.render&&this.options.render(this.code,s,t);if(a)return a;let l=document.createElement("span");return l.textContent=t,l.title=s,l.setAttribute("aria-label",s),l.className="cm-specialChar",l}ignoreEvent(){return!1}}class nAe extends Gw{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function oAe(){return rAe}const sAe=Br.line({class:"cm-activeLine"}),rAe=kf.fromClass(class{constructor(o){this.decorations=this.getDeco(o)}update(o){(o.docChanged||o.selectionSet)&&(this.decorations=this.getDeco(o.view))}getDeco(o){let e=-1,t=[];for(let s of o.state.selection.ranges){let a=o.lineBlockAt(s.head);a.from>e&&(t.push(sAe.range(a.from)),e=a.from)}return Br.set(t)}},{decorations:o=>o.decorations}),bse=2e3;function iAe(o,e,t){let s=Math.min(e.line,t.line),a=Math.max(e.line,t.line),l=[];if(e.off>bse||t.off>bse||e.col<0||t.col<0){let u=Math.min(e.off,t.off),d=Math.max(e.off,t.off);for(let h=s;h<=a;h++){let b=o.doc.line(h);b.length<=d&&l.push(Ln.range(b.from+u,b.to+d))}}else{let u=Math.min(e.col,t.col),d=Math.max(e.col,t.col);for(let h=s;h<=a;h++){let b=o.doc.line(h),y=qoe(b.text,u,o.tabSize,!0);if(y<0)l.push(Ln.cursor(b.to));else{let C=qoe(b.text,d,o.tabSize);l.push(Ln.range(b.from+y,b.from+C))}}}return l}function aAe(o,e){let t=o.coordsAtPos(o.viewport.from);return t?Math.round(Math.abs((t.left-e)/o.defaultCharacterWidth)):-1}function jfe(o,e){let t=o.posAtCoords({x:e.clientX,y:e.clientY},!1),s=o.state.doc.lineAt(t),a=t-s.from,l=a>bse?-1:a==s.length?aAe(o,e.clientX):Cv(s.text,o.state.tabSize,t-s.from);return{line:s.number,col:l,off:a}}function lAe(o,e){let t=
`:s=="r"?"\r":s=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new fPe(this):new cPe(this)}getCursor(e,t=0,s){let a=e.doc?e:ra.create({doc:e});return s==null&&(s=a.doc.length),this.regexp?lD(this,a,t,s):aD(this,a,t,s)}}class J0e{constructor(e){this.spec=e}}function aD(o,e,t,s){return new ND(e.doc,o.unquoted,t,s,o.caseSensitive?void 0:a=>a.toLowerCase(),o.wholeWord?lPe(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function lPe(o,e){return(t,s,a,l)=>((l>t||l+a.length<s)&&(l=Math.max(0,t-2),a=o.sliceString(l,Math.min(o.length,s+2))),(e(Ez(a,t-l))!=tu.Word||e(Az(a,t-l))!=tu.Word)&&(e(Az(a,s-l))!=tu.Word||e(Ez(a,s-l))!=tu.Word))}class cPe extends J0e{constructor(e){super(e)}nextMatch(e,t,s){let a=aD(this.spec,e,s,e.doc.length).nextOverlapping();return a.done&&(a=aD(this.spec,e,0,t).nextOverlapping()),a.done?null:a.value}prevMatchInRange(e,t,s){for(let a=s;;){let l=Math.max(t,a-1e4-this.spec.unquoted.length),u=aD(this.spec,e,l,a),d=null;for(;!u.nextOverlapping().done;)d=u.value;if(d)return d;if(l==t)return null;a-=1e4}}prevMatch(e,t,s){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,s,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let s=aD(this.spec,e,0,e.doc.length),a=[];for(;!s.next().done;){if(a.length>=t)return null;a.push(s.value)}return a}highlight(e,t,s,a){let l=aD(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(s+this.spec.unquoted.length,e.doc.length));for(;!l.next().done;)a(l.value.from,l.value.to)}}function lD(o,e,t,s){return new j0e(e.doc,o.search,{ignoreCase:!o.caseSensitive,test:o.wholeWord?uPe(e.charCategorizer(e.selection.main.head)):void 0},t,s)}function Ez(o,e){return o.slice(Bm(o,e,!1),e)}function Az(o,e){return o.slice(e,Bm(o,e))}function uPe(o){return(e,t,s)=>!s[0].length||(o(Ez(s.input,s.index))!=tu.Word||o(Az(s.input,s.index))!=tu.Word)&&(o(Az(s.input,s.index+s[0].length))!=tu.Word||o(Ez(s.input,s.index+s[0].length))!=tu.Word)}class fPe extends J0e{nextMatch(e,t,s){let a=lD(this.spec,e,s,e.doc.length).next();return a.done&&(a=lD(this.spec,e,0,t).next()),a.done?null:a.value}prevMatchInRange(e,t,s){for(let a=1;;a++){let l=Math.max(t,s-a*1e4),u=lD(this.spec,e,l,s),d=null;for(;!u.next().done;)d=u.value;if(d&&(l==t||d.from>l+10))return d;if(l==t)return null}}prevMatch(e,t,s){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,s,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(t,s)=>s=="$"?"$":s=="&"?e.match[0]:s!="0"&&+s<e.match.length?e.match[s]:t))}matchAll(e,t){let s=lD(this.spec,e,0,e.doc.length),a=[];for(;!s.next().done;){if(a.length>=t)return null;a.push(s.value)}return a}highlight(e,t,s,a){let l=lD(this.spec,e,Math.max(0,t-250),Math.min(s+250,e.doc.length));for(;!l.next().done;)a(l.value.from,l.value.to)}}const B6=bi.define(),Ire=bi.define(),xC=Uf.define({create(o){return new Xne(Pse(o).create(),null)},update(o,e){for(let t of e.effects)t.is(B6)?o=new Xne(t.value.create(),o.panel):t.is(Ire)&&(o=new Xne(o.query,t.value?Bre:null));return o},provide:o=>M6.from(o,e=>e.panel)});class Xne{constructor(e,t){this.query=e,this.panel=t}}const dPe=Br.mark({class:"cm-searchMatch"}),hPe=Br.mark({class:"cm-searchMatch cm-searchMatch-selected"}),mPe=kf.fromClass(class{constructor(o){this.view=o,this.decorations=this.highlight(o.state.field(xC))}update(o){let e=o.state.field(xC);(e!=o.startState.field(xC)||o.docChanged||o.selectionSet||o.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:o,panel:e}){if(!e||!o.spec.valid)return Br.none;let{view:t}=this,s=new PC;for(let a=0,l=t.visibleRanges,u=l.length;a<u;a++){let{from:d,to:h}=l[a];for(;a<u-1&&h>l[a+1].from-2*250;)h=l[++a].to;o.highlight(t.state,d,h,(b,y)=>{let C=t.state.selection.ranges.some(E=>E.from==b&&E.to==y);s.add(b,y,C?hPe:dPe)})}return s.finish()}},{decorations:o=>o.decorations});function uI(o){return e=>{let t=e.state.field(xC,!1);return t&&t.query.spec.valid?o
2023-11-17 23:02:39 +02:00
`+t.scrub(),l=this.advance(a);return l>-1&&l<a.length?this.complete(e,s,l):!1}finish(e,t){return(this.stage==2||this.stage==3)&&g6(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,s){return e.addLeafElement(t,ml(Bo.LinkReference,this.start,this.start+s,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(Vve(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(ml(Bo.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(Hve(e,g6(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=g6(e,this.pos),s=0;if(t>this.pos){let a=zve(e,t,this.start);if(a){let l=qne(e,a.to-this.start);l>0&&(this.nextStage(a),s=l)}}return s||(s=qne(e,this.pos)),s>0&&s<e.length?s:-1}else return qne(e,this.pos)}}}function qne(o,e){for(;e<o.length;e++){let t=o.charCodeAt(e);if(t==10)break;if(!qb(t))return-1}return e}class R5e{nextLine(e,t,s){let a=t.depth<e.stack.length?-1:Mve(t),l=t.next;if(a<0)return!1;let u=ml(Bo.HeaderMark,e.lineStart+t.pos,e.lineStart+a);return e.nextLine(),e.addLeafElement(s,ml(l==61?Bo.SetextHeading1:Bo.SetextHeading2,s.start,e.prevLineEnd(),[...e.parser.parseInline(s.content,s.start),u])),!0}finish(){return!1}}const $5e={LinkReference(o,e){return e.content.charCodeAt(0)==91?new M5e(e):null},SetextHeading(){return new R5e}},N5e=[(o,e)=>Pve(e)>=0,(o,e)=>Eve(e)>=0,(o,e)=>Ave(e)>=0,(o,e)=>jre(e,o,!0)>=0,(o,e)=>qre(e,o,!0)>=0,(o,e)=>Xre(e,o,!0)>=0,(o,e)=>Nve(e,o,!0)>=0],I5e={text:"",end:0};class B5e{constructor(e,t,s,a){this.parser=e,this.input=t,this.ranges=a,this.line=new P5e,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=a[a.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=a[0].from,this.block=$z.create(Bo.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=s.length?new Z5e(s,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(;e.depth<this.stack.length;)this.finishContext();for(let s of e.markers)this.addNode(s.type,s.from,s.to);if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let s of this.parser.blockParsers)if(s){let a=s(this,e);if(a!=!1){if(a==!0)return null;e.forward();continue e}}break}let t=new D5e(this.lineStart+e.pos,e.text.slice(e.pos));for(let s of this.parser.leafBlockParsers)if(s){let a=s(this,t);a&&t.parsers.push(a)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let s of this.parser.endLeafBlock)if(s(this,e,t))break e}for(let s of t.parsers)if(s.nextLine(this,e,t))return null;t.content+=`
`+e.scrub();for(let s of e.markers)t.marks.push(s)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=Wve(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=I5e;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let s=this.absoluteLineStart,a=this.rangeI;for(;this.ranges[a].to<t.end;){a++;let l=this.ranges[a].from,u=this.lineChunkAt(l);t.end=l+u.length,t.text=t.text.slice(0,this.ranges[a-1].to-s)+u,s=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:s}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=s,e.reset(t);e.depth<this.stack.length;e.depth++){let a=this.stack[e.depth],l=this.parser.skipContextMarkup[a.type];if(!l)throw new Error("Unhandled block context "+Bo[a.type]);if(!l(a,this,e))break;e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),s;if(this.input.lineChunks)s=t==`
2023-11-17 20:21:45 +02:00
`?"":t;else{let a=t.indexOf(`
2023-11-20 13:56:20 +02:00
`);s=a<0?t:t.slice(0,a)}return e+s.length>this.to?s.slice(0,this.to-e):s}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,s=0){this.block=$z.create(e,s,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,s=0){this.startContext(this.parser.getNodeType(e),t,s)}addNode(e,t,s){typeof e=="number"&&(e=new Cl(this.parser.nodeSet.types[e],BD,BD,(s!=null?s:this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(Ise(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?Ive(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let s of e.parsers)if(s.finish(this,e))return;let t=Ise(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(Bo.Paragraph,e.content.length),e.start)}elt(e,t,s,a){return typeof e=="string"?ml(this.parser.getNodeType(e),t,s,a):new Fve(e,t)}get buffer(){return new Lve(this.parser.nodeSet)}}function Ive(o,e,t,s,a){let l=o[e].to,u=[],d=[],h=t.from+s;function b(y,C){for(;C?y>=l:y>l;){let E=o[e+1].from-l;s+=E,y+=E,e++,l=o[e].to}}for(let y=t.firstChild;y;y=y.nextSibling){b(y.from+s,!0);let C=y.from+s,E,R=a.get(y.tree);R?E=R:y.to+s>l?(E=Ive(o,e,y,s,a),b(y.to+s,!1)):E=y.toTree(),u.push(E),d.push(C-h)}return b(t.to+s,!1),new Cl(t.type,u,d,t.to+s-h,t.tree?t.tree.propValues:void 0)}class bV extends kre{constructor(e,t,s,a,l,u,d,h,b){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=s,this.blockNames=a,this.endLeafBlock=l,this.skipContextMarkup=u,this.inlineParsers=d,this.inlineNames=h,this.wrappers=b,this.nodeTypes=Object.create(null);for(let y of e.types)this.nodeTypes[y.name]=y.id}createParse(e,t,s){let a=new B5e(this,e,t,s);for(let l of this.wrappers)a=l(a,e,t,s);return a}configure(e){let t=Nse(e);if(!t)return this;let{nodeSet:s,skipContextMarkup:a}=this,l=this.blockParsers.slice(),u=this.leafBlockParsers.slice(),d=this.blockNames.slice(),h=this.inlineParsers.slice(),b=this.inlineNames.slice(),y=this.endLeafBlock.slice(),C=this.wrappers;if(VN(t.defineNodes)){a=Object.assign({},a);let E=s.types.slice(),R;for(let $ of t.defineNodes){let{name:Q,block:F,composite:U,style:K}=typeof $=="string"?{name:$}:$;if(E.some(ne=>ne.name==Q))continue;U&&(a[E.length]=(ne,oe,G)=>U(oe,G,ne.value));let L=E.length,te=U?["Block","BlockContext"]:F?L>=Bo.ATXHeading1&&L<=Bo.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;E.push(Sd.define({id:L,name:Q,props:te&&[[ui.group,te]]})),K&&(R||(R={}),Array.isArray(K)||K instanceof _v?R[Q]=K:Object.assign(R,K))}s=new aI(E),R&&(s=s.extend(SE(R)))}if(VN(t.props)&&(s=s.extend(...t.props)),VN(t.remove))for(let E of t.remove){let R=this.blockNames.indexOf(E),$=this.inlineNames.indexOf(E);R>-1&&(l[R]=u[R]=void 0),$>-1&&(h[$]=void 0)}if(VN(t.parseBlock))for(let E of t.parseBlock){let R=d.indexOf(E.name);if(R>-1)l[R]=E.parse,u[R]=E.leaf;else{let $=E.before?lH(d,E.before):E.after?lH(d,E.after)+1:d.length-1;l.splice($,0,E.parse),u.splice($,0,E.leaf),d.splice($,0,E.name)}E.endLeaf&&y.push(E.endLeaf)}if(VN(t.parseInline))for(let E of t.parseInline){let R=b.indexOf(E.name);if(R>-1)h[R]=E.parse;else{let $=E.before?lH(b,E.before):E.after?lH(b,E.after)+1:b.length-1;h.splice($,0,E.parse),b.splice($,0,E.name)}}return t.wrap&&(C=C.concat(t.wrap)),new bV(s,l,u,d,y,a,h,b,C)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let s=new F5e(this,e,t);e:for(let a=t;a<s.end;){let l=s.char(a);for(let u of this.inlineParsers)if(u){let d=u(s,l,a);if(d>=0){a=d;co
`;)l--;this.fragmentEnd=l?l-1:0}let s=this.cursor;s||(s=this.cursor=this.fragment.tree.cursor(),s.firstChild());let a=e+this.fragment.offset;for(;s.to<=a;)if(!s.parent())return!1;for(;;){if(s.from>=a)return this.fragment.from<=t;if(!s.childAfter(a))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(ui.contextHash)==e}takeNodes(e){let t=this.cursor,s=this.fragment.offset,a=this.fragmentEnd-(this.fragment.openEnd?1:0),l=e.absoluteLineStart,u=l,d=e.block.children.length,h=u,b=d;for(;;){if(t.to-s>a){if(t.type.isAnonymous&&t.firstChild())continue;break}let y=Wve(t.from-s,e.ranges);if(t.to-s<=e.ranges[e.rangeI].to)e.addNode(t.tree,y);else{let C=new Cl(e.parser.nodeSet.types[Bo.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(C,t.tree),e.addNode(C,y)}if(t.type.is("Block")&&(Q5e.indexOf(t.type.id)<0?(u=t.to-s,d=e.block.children.length):(u=h,d=b,h=t.to-s,b=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>d;)e.block.children.pop(),e.block.positions.pop();return u-l}}function Wve(o,e){let t=o;for(let s=1;s<e.length;s++){let a=e[s-1].to,l=e[s].from;a<o&&(t-=l-a)}return t}const H5e=SE({"Blockquote/...":yt.quote,HorizontalRule:yt.contentSeparator,"ATXHeading1/... SetextHeading1/...":yt.heading1,"ATXHeading2/... SetextHeading2/...":yt.heading2,"ATXHeading3/...":yt.heading3,"ATXHeading4/...":yt.heading4,"ATXHeading5/...":yt.heading5,"ATXHeading6/...":yt.heading6,"Comment CommentBlock":yt.comment,Escape:yt.escape,Entity:yt.character,"Emphasis/...":yt.emphasis,"StrongEmphasis/...":yt.strong,"Link/... Image/...":yt.link,"OrderedList/... BulletList/...":yt.list,"BlockQuote/...":yt.quote,"InlineCode CodeText":yt.monospace,URL:yt.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":yt.processingInstruction,"CodeInfo LinkLabel":yt.labelName,LinkTitle:yt.string,Paragraph:yt.content}),z5e=new bV(new aI(Bve).extend(H5e),Object.keys(aH).map(o=>aH[o]),Object.keys(aH).map(o=>$5e[o]),Object.keys(aH),N5e,Tve,Object.keys(Gne).map(o=>Gne[o]),Object.keys(Gne),[]);function V5e(o,e,t){let s=[];for(let a=o.firstChild,l=e;;a=a.nextSibling){let u=a?a.from:t;if(u>l&&s.push({from:l,to:u}),!a)break;l=a.to}return s}function W5e(o){let{codeParser:e,htmlParser:t}=o;return{wrap:jbe((a,l)=>{let u=a.type.id;if(e&&(u==Bo.CodeBlock||u==Bo.FencedCode)){let d="";if(u==Bo.FencedCode){let b=a.node.getChild(Bo.CodeInfo);b&&(d=l.read(b.from,b.to))}let h=e(d);if(h)return{parser:h,overlay:b=>b.type.id==Bo.CodeText}}else if(t&&(u==Bo.HTMLBlock||u==Bo.HTMLTag))return{parser:t,overlay:V5e(a.node,a.from,a.to)};return null})}}const U5e={resolve:"Strikethrough",mark:"StrikethroughMark"},Y5e={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":yt.strikethrough}},{name:"StrikethroughMark",style:yt.processingInstruction}],parseInline:[{name:"Strikethrough",parse(o,e,t){if(e!=126||o.char(t+1)!=126||o.char(t+2)==126)return-1;let s=o.slice(t-1,t),a=o.slice(t+2,t+3),l=/\s|^$/.test(s),u=/\s|^$/.test(a),d=H6.test(s),h=H6.test(a);return o.addDelimiter(U5e,t,t+2,!u&&(!h||l||d),!l&&(!d||u||h))},after:"Emphasis"}]};function p6(o,e,t=0,s,a=0){let l=0,u=!0,d=-1,h=-1,b=!1,y=()=>{s.push(o.elt("TableCell",a+d,a+h,o.parser.parseInline(e.slice(d,h),a+d)))};for(let C=t;C<e.length;C++){let E=e.charCodeAt(C);E==124&&!b?((!u||d>-1)&&l++,u=!1,s&&(d>-1&&y(),s.push(o.elt("TableDelimiter",C+a,C+a+1))),d=h=-1):(b||E!=32&&E!=9)&&(d<0&&(d=C),h=C+1),b=!b&&E==92}return d>-1&&(l++,s&&y()),l}function Xde(o,e){for(let t=e;t<o.length;t++){let s=o.charCodeAt(t);if(s==124)return!0;s==92&&t++}return!1}const Uve=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class jde{constructor(){this.rows=null}nextLine(e,t,s){if(this.rows==null){this.rows=!1;let a;if((t.next==45||t.next==58||t.next==124)&&Uve.test(a=t.text.slice(t.pos))){let l=[];p6(e,s.content,0,l,s.start)==p6(e,a,t.pos)&&(this.rows=[e.elt("TableHeader",s.start,s.start+s.content.length,l),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let a=[];p6(e,t.text,t.pos,a,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length
2023-11-17 20:21:45 +02:00
\${}
} catch (\${error}) {
\${}
}`,{label:"try",detail:"/ catch block",type:"keyword"}),$p("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),$p(`if (\${}) {
\${}
} else {
\${}
}`,{label:"if",detail:"/ else block",type:"keyword"}),$p(`class \${name} {
constructor(\${params}) {
\${}
}
2023-11-20 13:56:20 +02:00
}`,{label:"class",detail:"definition",type:"keyword"}),$p('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),$p('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],ZRe=fOe.concat([$p("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),$p("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),$p("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),She=new Xbe,dOe=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function UN(o){return(e,t)=>{let s=e.node.getChild("VariableDefinition");return s&&t(s,o),!0}}const HRe=["FunctionDeclaration"],zRe={FunctionDeclaration:UN("function"),ClassDeclaration:UN("class"),ClassExpression:()=>!0,EnumDeclaration:UN("constant"),TypeAliasDeclaration:UN("type"),NamespaceDeclaration:UN("namespace"),VariableDefinition(o,e){o.matchContext(HRe)||e(o,"variable")},TypeDefinition(o,e){e(o,"type")},__proto__:null};function hOe(o,e){let t=She.get(e);if(t)return t;let s=[],a=!0;function l(u,d){let h=o.sliceString(u.from,u.to);s.push({label:h,type:d})}return e.cursor(wc.IncludeAnonymous).iterate(u=>{if(a)a=!1;else if(u.name){let d=zRe[u.name];if(d&&d(u,l)||dOe.has(u.name))return!1}else if(u.to-u.from>8192){for(let d of hOe(o,u.node))s.push(d);return!1}}),She.set(e,s),s}const Che=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,mOe=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function VRe(o){let e=_c(o.state).resolveInner(o.pos,-1);if(mOe.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&Che.test(o.state.sliceDoc(e.from,e.to));if(!t&&!o.explicit)return null;let s=[];for(let a=e;a;a=a.parent)dOe.has(a.name)&&(s=s.concat(hOe(o.state.doc,a)));return{options:s,from:t?e.from:o.pos,validFor:Che}}const gy=pE.define({name:"javascript",parser:QRe.configure({props:[GD.add({IfStatement:SD({except:/^\s*({|else\b)/}),TryStatement:SD({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:l4e,SwitchBody:o=>{let e=o.textAfter,t=/^\s*\}/.test(e),s=/^\s*(case|default)\b/.test(e);return o.baseIndent+(t?0:s?1:2)*o.unit},Block:a4e({closing:"}"}),ArrowFunction:o=>o.baseIndent+o.unit,"TemplateString BlockComment":()=>null,"Statement Property":SD({except:/^{/}),JSXElement(o){let e=/^\s*<\//.test(o.textAfter);return o.lineIndent(o.node.from)+(e?0:o.unit)},JSXEscape(o){let e=/\s*\}/.test(o.textAfter);return o.lineIndent(o.node.from)+(e?0:o.unit)},"JSXOpenTag JSXSelfClosingTag"(o){return o.column(o.node.from)+o.unit}}),KD.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Dre,BlockComment(o){return{from:o.from+2,to:o.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),gOe={test:o=>/^JSX/.test(o.name),facet:xre({commentTokens:{block:{open:"{/*",close:"*/}"}}})},pOe=gy.configure({dialect:"ts"},"typescript"),bOe=gy.configure({dialect:"jsx",props:[Tre.add(o=>o.isTop?[gOe]:void 0)]}),vOe=gy.configure({dialect:"jsx ts",props:[Tre.add(o=>o.isTop?[gOe]:void 0)]},"typescript");let OOe=o=>({label:o,type:"keyword"});const yOe="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(OOe),WRe=yOe.concat(["declare","implements","private","protected","public"].map(OOe));function URe(o={}){let e=o.jsx?o.typescript?vOe:bOe:o.typescript?pOe:gy,t=o.typescript?ZRe.concat(WRe):fOe.concat(yOe);return new $D(e,[gy.data.of({autocomplete:SPe(mOe,sve(t))}),gy.data.of({autocomplete:VRe}),o.jsx?jRe:[]])}function YRe(o){for(;;){if(o.name=="JSXOpenTag"||o.name=="JSXSelfClosingTag"||o.name=="JSXFragmentTag")return o;if(o.name=="JSXEscape"||!o.parent)return null;o=o.par
Block name: `),U=re("input"),L=Ze(),te=re("div"),te.innerHTML='<hr class="dropdown-divider"/>',ne=Ze(),oe=re("h6"),oe.textContent="Actions",G=Ze(),we=re("button"),we.textContent="Move up",ve=Ze(),Re=re("button"),Re.textContent="Move down",Oe=Ze(),ce=re("button"),ce.textContent="Delete",Xe=Ze(),tt=re("h6"),tt.textContent="Insert after",ot=Ze();for(let mt=0;mt<rn.length;mt+=1)rn[mt].c();V=Ze(),Qe&&Qe.c(),Z(s,"class","text-muted d-block fs-6 mb-1"),Z(h,"class","btn btn-link btn-sm"),Z(h,"type","button"),Z(h,"data-bs-toggle","dropdown"),Z(h,"aria-expanded","false"),Z($,"class","form-control-plaintext"),$.readOnly=!0,$.value=Q=o[1].id,Z(U,"class","form-control-plaintext"),U.readOnly=!0,U.value=K=o[1].meta.name,Z(E,"class","dropdown-header"),Z(oe,"class","dropdown-header"),Z(we,"class","dropdown-item"),Vo(we,"d-none",o[9](o[1].id)),Z(Re,"class","dropdown-item"),Vo(Re,"d-none",o[10](o[1].id)),Z(ce,"class","dropdown-item text-danger"),Z(tt,"class","dropdown-header"),Z(C,"class","dropdown-menu"),Z(d,"class","dropdown d-inline-block"),Z(t,"class","d-flex justify-content-between"),Z(e,"class","card block-editor-field d-flex svelte-1tnln3c")},m(mt,he){Te(mt,e,he),X(e,t),X(t,s),X(s,l),X(t,u),X(t,d),X(d,h),Kt(b,h,null),X(d,y),X(d,C),X(C,E),X(E,R),X(E,$),X(E,F),X(E,U),X(C,L),X(C,te),X(C,ne),X(C,oe),X(C,G),X(C,we),X(C,ve),X(C,Re),X(C,Oe),X(C,ce),X(C,Xe),X(C,tt),X(C,ot);for(let Zo=0;Zo<rn.length;Zo+=1)rn[Zo]&&rn[Zo].m(C,null);X(e,V),~ut&&Cn[ut].m(e,null),Bt=!0,Ct||(He=[mn(we,"click",o[12]),mn(Re,"click",o[13]),mn(ce,"click",o[14])],Ct=!0)},p(mt,[he]){if((!Bt||he&2)&&a!==(a=mt[1].meta.label+"")&&Qn(l,a),(!Bt||he&2&&Q!==(Q=mt[1].id)&&$.value!==Q)&&($.value=Q),(!Bt||he&2&&K!==(K=mt[1].meta.name)&&U.value!==K)&&(U.value=K),(!Bt||he&514)&&Vo(we,"d-none",mt[9](mt[1].id)),(!Bt||he&1026)&&Vo(Re,"d-none",mt[10](mt[1].id)),he&50){st=mt[4].fields;let Kn;for(Kn=0;Kn<st.length;Kn+=1){const so=Fhe(mt,st,Kn);rn[Kn]?rn[Kn].p(so,he):(rn[Kn]=Qhe(so),rn[Kn].c(),rn[Kn].m(C,null))}for(;Kn<rn.length;Kn+=1)rn[Kn].d(1);rn.length=st.length}let Zo=ut;ut=je(mt),ut===Zo?~ut&&Cn[ut].p(mt,he):(Qe&&(mo(),Be(Cn[Zo],1,1,()=>{Cn[Zo]=null}),go()),~ut?(Qe=Cn[ut],Qe?Qe.p(mt,he):(Qe=Cn[ut]=Et[ut](mt),Qe.c()),xe(Qe,1),Qe.m(e,null)):Qe=null)},i(mt){Bt||(xe(b.$$.fragment,mt),xe(Qe),Bt=!0)},o(mt){Be(b.$$.fragment,mt),Be(Qe),Bt=!1},d(mt){mt&&ke(e),Jt(b),ia(rn,mt),~ut&&Cn[ut].d(),Ct=!1,vi(He)}}}function L$e(o,e,t){const s=Ur("channel");let{record:a}=e,{blockData:l}=e,{field:u}=e,{graph:d}=e,{block:h}=e,b=s.schemas.find(ce=>ce.name===u.schema);function y(ce,Xe,tt){ce.preventDefault(),t(11,l=g1e(l,Xe,tt))}function C(ce,Xe){ce.preventDefault(),t(11,l=l.filter(tt=>tt.id!==Xe))}function E(ce,Xe){ce.preventDefault();let tt=Lc.exports.findIndex(l,V=>V.id===Xe),ot=l[tt];t(11,l[tt]=l[tt-1],l),t(11,l[tt-1]=ot,l)}function R(ce,Xe){ce.preventDefault();let tt=Lc.exports.findIndex(l,V=>V.id===Xe),ot=l[tt];t(11,l[tt]=l[tt+1],l),t(11,l[tt+1]=ot,l)}function $(ce){return Lc.exports.findIndex(l,Xe=>Xe.id===ce)===0}function Q(ce){return Lc.exports.findIndex(l,Xe=>Xe.id===ce)===l.length-1}const F=ce=>E(ce,h.id),U=ce=>R(ce,h.id),K=ce=>C(ce,h.id),L=(ce,Xe)=>y(Xe,ce,h.id);function te(ce){h=ce,t(1,h)}function ne(ce){h=ce,t(1,h)}function oe(ce){h=ce,t(1,h)}function G(ce){h=ce,t(1,h)}function we(ce){d=ce,t(0,d)}function ve(ce){h=ce,t(1,h)}function Re(ce){d=ce,t(0,d)}function Oe(ce){h=ce,t(1,h)}return o.$$set=ce=>{"record"in ce&&t(2,a=ce.record),"blockData"in ce&&t(11,l=ce.blockData),"field"in ce&&t(3,u=ce.field),"graph"in ce&&t(0,d=ce.graph),"block"in ce&&t(1,h=ce.block)},[d,h,a,u,b,y,C,E,R,$,Q,l,F,U,K,L,te,ne,oe,G,we,ve,Re,Oe]}class F$e extends uo{constructor(e){super(),co(this,e,L$e,B$e,lo,{record:2,blockData:11,field:3,graph:0,block:1})}}function Zhe(o,e,t){const s=o.slice();return s[10]=e[t],s[11]=e,s[12]=t,s}function Hhe(o,e){let t,s,a,l,u,d,h,b=fn,y;function C(Q){e[6](Q,e[10],e[11],e[12])}function E(Q){e[7](Q)}function R(Q){e[8](Q)}let $={record:e[2],field:e[3]};return e[10]!==void 0&&($.block=e[10]),e[0]!==void 0&&($.blockData=e[0]),e[1]!==void 0&&($.graph=e[1]),s=new F$e({props:
2023-11-17 20:21:45 +02:00
<span class='flatpickr-weekday'>
2023-11-17 21:22:26 +02:00
`+et.join("</span><span class='flatpickr-weekday'>")+`
2023-11-17 20:21:45 +02:00
</span>
2023-11-20 13:56:20 +02:00
`}}function Ct(){t.calendarContainer.classList.add("hasWeeks");var ze=dl("div","flatpickr-weekwrapper");ze.appendChild(dl("span","flatpickr-weekday",t.l10n.weekAbbreviation));var et=dl("div","flatpickr-weeks");return ze.appendChild(et),{weekWrapper:ze,weekNumbers:et}}function He(ze,et){et===void 0&&(et=!0);var Tt=et?ze:ze-t.currentMonth;Tt<0&&t._hidePrevMonthArrow===!0||Tt>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=Tt,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Po("onYearChange"),Xe()),ce(),Po("onMonthChange"),bs())}function st(ze,et){if(ze===void 0&&(ze=!0),et===void 0&&(et=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,et===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var Tt=hoe(t.config),Wt=Tt.hours,Yn=Tt.minutes,po=Tt.seconds;R(Wt,Yn,po)}t.redraw(),ze&&Po("onChange")}function rn(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Po("onClose")}function Et(){t.config!==void 0&&Po("onDestroy");for(var ze=t._handlers.length;ze--;)t._handlers[ze].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var et=t.calendarContainer.parentNode;if(et.lastChild&&et.removeChild(et.lastChild),et.parentNode){for(;et.firstChild;)et.parentNode.insertBefore(et.firstChild,et);et.parentNode.removeChild(et)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(Tt){try{delete t[Tt]}catch{}})}function Cn(ze){return t.calendarContainer.contains(ze)}function je(ze){if(t.isOpen&&!t.config.inline){var et=R1(ze),Tt=Cn(et),Wt=et===t.input||et===t.altInput||t.element.contains(et)||ze.path&&ze.path.indexOf&&(~ze.path.indexOf(t.input)||~ze.path.indexOf(t.altInput)),Yn=!Wt&&!Tt&&!Cn(ze.relatedTarget),po=!t.config.ignoredFocusElements.some(function(wo){return wo.contains(et)});Yn&&po&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&h(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function mt(ze){if(!(!ze||t.config.minDate&&ze<t.config.minDate.getFullYear()||t.config.maxDate&&ze>t.config.maxDate.getFullYear())){var et=ze,Tt=t.currentYear!==et;t.currentYear=et||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),Tt&&(t.redraw(),Po("onYearChange"),Xe())}}function he(ze,et){var Tt;et===void 0&&(et=!0);var Wt=t.parseDate(ze,void 0,et);if(t.config.minDate&&Wt&&N1(Wt,t.config.minDate,et!==void 0?et:!t.minDateHasTime)<0||t.config.maxDate&&Wt&&N1(Wt,t.config.maxDate,et!==void 0?et:!t.maxDat
versions`),Cn=Ze(),je=re("div"),he.c(),Zo=Ze(),Kn=re("div"),jt&&jt.c(),Z(l,"class","label text-end text-muted svelte-4o2asb"),Z(E,"class","label text-end text-muted svelte-4o2asb"),Z(K,"class","label text-end text-muted svelte-4o2asb"),Z(Re,"class","label text-end text-muted svelte-4o2asb"),Z(s,"class","col-8"),Z(Qe,"class","label d-block text-muted svelte-4o2asb"),Z(ut,"class","col-4"),Z(t,"class","row"),Z(e,"class","lx-card "),Z(je,"class","lx-card mt-4")},m(pt,Ne){Te(pt,e,Ne),X(e,t),X(t,s),X(s,a),X(a,l),X(a,u),X(a,d),X(d,b),X(s,y),X(s,C),X(C,E),X(C,R),X(C,Q),X(s,F),X(s,U),X(U,K),X(U,L),Kt(te,U,null),X(U,ne),X(U,G),X(s,we),X(s,ve),X(ve,Re),X(ve,Oe),Kt(ce,ve,null),X(ve,Xe),X(ve,ot),X(t,V),X(t,ut),X(ut,Qe),X(ut,Bt),X(ut,Ct),X(Ct,He),X(Ct,rn),X(Ct,Et),Te(pt,Cn,Ne),Te(pt,je,Ne),as[mt].m(je,null),Te(pt,Zo,Ne),Te(pt,Kn,Ne),jt&&jt.m(Kn,null),o[13](Kn),so=!0},p(pt,[Ne]){(!so||Ne&1)&&h!==(h=pt[0].id+"")&&Qn(b,h),(!so||Ne&1)&&$!==($=pt[0]._sys.version+"")&&Qn(Q,$);const Gt={};Ne&3&&(Gt.name=Lp(pt[1],pt[0]._sys.createdBy)),te.$set(Gt),(!so||Ne&1)&&oe!==(oe=cy(pt[0]._sys.createdAt)+"")&&Qn(G,oe);const bn={};Ne&3&&(bn.name=Lp(pt[1],pt[0]._sys.updatedBy)),ce.$set(bn),(!so||Ne&1)&&tt!==(tt=cy(pt[0]._sys.updatedAt)+"")&&Qn(ot,tt),(!so||Ne&4)&&st!==(st=pt[2].revisions+"")&&Qn(rn,st);let At=mt;mt=kt(pt),mt===At?as[mt].p(pt,Ne):(mo(),Be(as[At],1,1,()=>{as[At]=null}),go(),he=as[mt],he?he.p(pt,Ne):(he=as[mt]=Yo[mt](pt),he.c()),xe(he,1),he.m(je,null)),pt[5]?jt?(jt.p(pt,Ne),Ne&32&&xe(jt,1)):(jt=ege(pt),jt.c(),xe(jt,1),jt.m(Kn,null)):jt&&(mo(),Be(jt,1,1,()=>{jt=null}),go())},i(pt){so||(xe(te.$$.fragment,pt),xe(ce.$$.fragment,pt),xe(he),xe(jt),so=!0)},o(pt){Be(te.$$.fragment,pt),Be(ce.$$.fragment,pt),Be(he),Be(jt),so=!1},d(pt){pt&&ke(e),Jt(te),Jt(ce),pt&&ke(Cn),pt&&ke(je),as[mt].d(),pt&&ke(Zo),pt&&ke(Kn),jt&&jt.d(),o[13](null)}}}function U6e(o,e,t){let s,a,l,u;const d=Ur("channel");let{record:h}=e,{graph:b}=e,{users:y}=e,{schema:C}=e,E,R="";axios.get(`${d.lucentUrl}/records/${h.id}/revisions`).then(L=>{t(8,s=L.data)}).catch(L=>{console.log(L)});function $(L,te){t(7,u=b.edges.filter(ne=>ne.depth===1).reduce((ne,oe)=>(ne[oe.field]||(ne[oe.field]={record:[],revision:[]}),ne[oe.field].record.push(oe),ne),{})),t(7,u=te._edges.reduce((ne,oe)=>(ne[oe.field]||(ne[oe.field]={record:[],revision:[]}),ne[oe.field].revision.push(oe),ne),u))}function Q(L,te){L.preventDefault(),t(5,l=te),t(6,a=C.fields.filter(ne=>!Lc.exports.isEqual(l.data[ne.name],h.data[ne.name]))),$(a,te),E.scrollIntoView()}function F(L){L.preventDefault(),t(4,R=""),axios.post(`${d.lucentUrl}/records/${h.id}/rollback/${l._sys.version}`).then(te=>{window.location.reload()}).catch(te=>{const ne=te.response.data.error;t(4,R=ne.fieldLabel+": "+ne.message)})}const U=(L,te)=>Q(te,L);function K(L){Ro[L?"unshift":"push"](()=>{E=L,t(3,E)})}return o.$$set=L=>{"record"in L&&t(0,h=L.record),"graph"in L&&t(11,b=L.graph),"users"in L&&t(1,y=L.users),"schema"in L&&t(2,C=L.schema)},t(8,s=[]),t(6,a=[]),t(5,l=null),t(7,u={}),[h,y,C,E,R,l,a,u,s,Q,F,b,U,K]}class Y6e extends uo{constructor(e){super(),co(this,e,U6e,W6e,lo,{record:0,graph:11,users:1,schema:2})}}const{window:X6e}=G2e;function lge(o,e,t){const s=o.slice();return s[23]=e[t],s}function cge(o){let e,t,s,a,l,u;function d(E){o[15](E)}let h={record:o[0],schema:o[2]};o[0].status!==void 0&&(h.status=o[0].status),s=new Vpe({props:h}),Ro.push(()=>er(s,"status",d));function b(E,R){if(E[4])return q6e;if(E[10])return j6e}let y=b(o),C=y&&y(o);return{c(){e=re("div"),t=re("div"),en(s.$$.fragment),l=Ze(),C&&C.c(),Z(t,"class","d-flex mt-3 mb-3 align-items-center justify-content-center"),Z(e,"class","shadow-lg "),rs(e,"position","fixed"),rs(e,"bottom","0"),rs(e,"left","0px"),rs(e,"width","100%"),rs(e,"background","rgb(206, 223, 210)"),rs(e,"z-index","1050")},m(E,R){Te(E,e,R),X(e,t),Kt(s,t,null),X(t,l),C&&C.m(t,null),u=!0},p(E,R){const $={};R&1&&($.record=E[0]),R&4&&($.schema=E[2]),!a&&R&1&&(a=!0,$.status=E[0].status,lr(()=>a=!1)),s.$set($),y===(y=b(E))&&C?C.p(E,R):(C&&C.d(1),C=y&&y(E),C&&(C.c(),C.m(t,null)))},i(E){u||(xe(s.$$.fragment,E),u=!0)},o(E
2023-11-20 13:52:33 +02:00
Save`,Z(e,"type","button"),Z(e,"class","ms-2 btn btn-primary btn-spinner")},m(a,l){Te(a,e,l),t||(s=mn(e,"click",o[13]),t=!0)},p:fn,d(a){a&&ke(e),t=!1,s()}}}function q6e(o){let e,t,s;return{c(){e=re("button"),e.innerHTML=`<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
2023-11-20 13:56:20 +02:00
Create`,Z(e,"class","ms-2 btn btn-primary btn-spinner")},m(a,l){Te(a,e,l),t||(s=mn(e,"click",o[13]),t=!0)},p:fn,d(a){a&&ke(e),t=!1,s()}}}function G6e(o){let e,t;return e=new Y6e({props:{record:o[0],graph:o[1],users:o[6],schema:o[2]}}),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},p(s,a){const l={};a&1&&(l.record=s[0]),a&2&&(l.graph=s[1]),a&64&&(l.users=s[6]),a&4&&(l.schema=s[2]),e.$set(l)},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function K6e(o){let e,t;return e=new D6e({props:{graph:o[1],record:o[0]}}),{c(){en(e.$$.fragment)},m(s,a){Kt(e,s,a),t=!0},p(s,a){const l={};a&2&&(l.graph=s[1]),a&1&&(l.record=s[0]),e.$set(l)},i(s){t||(xe(e.$$.fragment,s),t=!0)},o(s){Be(e.$$.fragment,s),t=!1},d(s){Jt(e,s)}}}function J6e(o){let e,t,s=[],a=new Map,l,u;e=new Wpe({props:{record:o[0],schema:o[2]}});let d=o[11];const h=b=>b[23].name;for(let b=0;b<d.length;b+=1){let y=lge(o,d,b),C=h(y);a.set(C,s[b]=fge(C,y))}return{c(){en(e.$$.fragment),t=Ze();for(let b=0;b<s.length;b+=1)s[b].c();l=Rs()},m(b,y){Kt(e,b,y),Te(b,t,y);for(let C=0;C<s.length;C+=1)s[C]&&s[C].m(b,y);Te(b,l,y),u=!0},p(b,y){const C={};y&1&&(C.record=b[0]),y&4&&(C.schema=b[2]),e.$set(C),y&2455&&(d=b[11],mo(),s=Jd(s,y,h,1,b,d,a,l.parentNode,xv,fge,l,lge),go())},i(b){if(!u){xe(e.$$.fragment,b);for(let y=0;y<d.length;y+=1)xe(s[y]);u=!0}},o(b){Be(e.$$.fragment,b);for(let y=0;y<s.length;y+=1)Be(s[y]);u=!1},d(b){Jt(e,b),b&&ke(t);for(let y=0;y<s.length;y+=1)s[y].d(b);b&&ke(l)}}}function uge(o){let e,t,s,a;function l(h){o[17](h)}function u(h){o[18](h)}let d={field:o[23],schema:o[2],record:o[0],validationErrors:o[7],isCreateMode:o[4]};return o[0].data!==void 0&&(d.data=o[0].data),o[1]!==void 0&&(d.graph=o[1]),e=new FOe({props:d}),Ro.push(()=>er(e,"data",l)),Ro.push(()=>er(e,"graph",u)),{c(){en(e.$$.fragment)},m(h,b){Kt(e,h,b),a=!0},p(h,b){const y={};b&4&&(y.schema=h[2]),b&1&&(y.record=h[0]),b&128&&(y.validationErrors=h[7]),b&16&&(y.isCreateMode=h[4]),!t&&b&1&&(t=!0,y.data=h[0].data,lr(()=>t=!1)),!s&&b&2&&(s=!0,y.graph=h[1],lr(()=>s=!1)),e.$set(y)},i(h){a||(xe(e.$$.fragment,h),a=!0)},o(h){Be(e.$$.fragment,h),a=!1},d(h){Jt(e,h)}}}function fge(o,e){let t,s,a,l=e[8]===e[23].group&&uge(e);return{key:o,first:null,c(){t=Rs(),l&&l.c(),s=Rs(),this.first=t},m(u,d){Te(u,t,d),l&&l.m(u,d),Te(u,s,d),a=!0},p(u,d){e=u,e[8]===e[23].group?l?(l.p(e,d),d&256&&xe(l,1)):(l=uge(e),l.c(),xe(l,1),l.m(s.parentNode,s)):l&&(mo(),Be(l,1,1,()=>{l=null}),go())},i(u){a||(xe(l),a=!0)},o(u){Be(l),a=!1},d(u){u&&ke(t),l&&l.d(u),u&&ke(s)}}}function eIe(o){let e,t,s,a,l,u,d=!["_graph","_info"].includes(o[8])&&o[5],h,b,y,C,E,R,$,Q,F,U,K,L,te;t=new WSe({props:{managerRecords:o[3],graph:o[1]}});function ne(Xe){o[14](Xe)}let oe={schema:o[2],record:o[0],isCreateMode:o[4],graph:o[1]};o[8]!==void 0&&(oe.activeContentTab=o[8]),a=new qSe({props:oe}),Ro.push(()=>er(a,"activeContentTab",ne));let G=d&&cge(o);b=new X6({props:{message:o[9]}});function we(Xe){o[16](Xe)}let ve={schema:o[2],isCreateMode:o[4]};o[8]!==void 0&&(ve.active=o[8]),E=new Upe({props:ve}),Ro.push(()=>er(E,"active",we));const Re=[J6e,K6e,G6e],Oe=[];function ce(Xe,tt){return tt&256&&(Q=null),Q==null&&(Q=!["_graph","_info"].includes(Xe[8])),Q?0:Xe[8]==="_graph"?1:Xe[8]==="_info"?2:-1}return~(F=ce(o,-1))&&(U=Oe[F]=Re[F](o)),{c(){e=re("div"),en(t.$$.fragment),s=Ze(),en(a.$$.fragment),u=Ze(),G&&G.c(),h=Ze(),en(b.$$.fragment),y=Ze(),C=re("div"),en(E.$$.fragment),$=Ze(),U&&U.c(),Z(C,"class","mt-4"),rs(C,"margin-bottom","150px"),Z(e,"class","wrapper-normal transparent")},m(Xe,tt){Te(Xe,e,tt),Kt(t,e,null),X(e,s),Kt(a,e,null),X(e,u),G&&G.m(e,null),X(e,h),Kt(b,e,null),X(e,y),X(e,C),Kt(E,C,null),X(C,$),~F&&Oe[F].m(C,null),K=!0,L||(te=mn(X6e,"beforeunload",o[12]),L=!0)},p(Xe,[tt]){const ot={};tt&8&&(ot.managerRecords=Xe[3]),tt&2&&(ot.graph=Xe[1]),t.$set(ot);const V={};tt&4&&(V.schema=Xe[2]),tt&1&&(V.record=Xe[0]),tt&16&&(V.isCreateMode=Xe[4]),tt&2&&(V.graph=Xe[1]),!l&&tt&256&&(l=!0,V.activeContentTab=Xe[8],lr(()=>l=!1)),a.$set(V),tt&288&&(d=!["_graph","_info"].includes(Xe[8])&&Xe[5]),d?G?(G.p(Xe,tt),tt&288&&xe(G,1)):
2023-11-17 20:21:45 +02:00
* Bootstrap v5.3.2 (https://getbootstrap.com/)
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2023-11-20 13:56:20 +02:00
*/const pC=new Map,goe={set(o,e,t){pC.has(o)||pC.set(o,new Map);const s=pC.get(o);if(!s.has(e)&&s.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`);return}s.set(e,t)},get(o,e){return pC.has(o)&&pC.get(o).get(e)||null},remove(o,e){if(!pC.has(o))return;const t=pC.get(o);t.delete(e),t.size===0&&pC.delete(o)}},dBe=1e6,hBe=1e3,Yse="transitionend",dye=o=>(o&&window.CSS&&window.CSS.escape&&(o=o.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),o),mBe=o=>o==null?`${o}`:Object.prototype.toString.call(o).match(/\s([a-z]+)/i)[1].toLowerCase(),gBe=o=>{do o+=Math.floor(Math.random()*dBe);while(document.getElementById(o));return o},pBe=o=>{if(!o)return 0;let{transitionDuration:e,transitionDelay:t}=window.getComputedStyle(o);const s=Number.parseFloat(e),a=Number.parseFloat(t);return!s&&!a?0:(e=e.split(",")[0],t=t.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(t))*hBe)},hye=o=>{o.dispatchEvent(new Event(Yse))},Zw=o=>!o||typeof o!="object"?!1:(typeof o.jquery<"u"&&(o=o[0]),typeof o.nodeType<"u"),IC=o=>Zw(o)?o.jquery?o[0]:o:typeof o=="string"&&o.length>0?document.querySelector(dye(o)):null,oP=o=>{if(!Zw(o)||o.getClientRects().length===0)return!1;const e=getComputedStyle(o).getPropertyValue("visibility")==="visible",t=o.closest("details:not([open])");if(!t)return e;if(t!==o){const s=o.closest("summary");if(s&&s.parentNode!==t||s===null)return!1}return e},BC=o=>!o||o.nodeType!==Node.ELEMENT_NODE||o.classList.contains("disabled")?!0:typeof o.disabled<"u"?o.disabled:o.hasAttribute("disabled")&&o.getAttribute("disabled")!=="false",mye=o=>{if(!document.documentElement.attachShadow)return null;if(typeof o.getRootNode=="function"){const e=o.getRootNode();return e instanceof ShadowRoot?e:null}return o instanceof ShadowRoot?o:o.parentNode?mye(o.parentNode):null},Vz=()=>{},hI=o=>{o.offsetHeight},gye=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,poe=[],bBe=o=>{document.readyState==="loading"?(poe.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of poe)e()}),poe.push(o)):o()},Yb=()=>document.documentElement.dir==="rtl",Gb=o=>{bBe(()=>{const e=gye();if(e){const t=o.NAME,s=e.fn[t];e.fn[t]=o.jQueryInterface,e.fn[t].Constructor=o,e.fn[t].noConflict=()=>(e.fn[t]=s,o.jQueryInterface)}})},Bp=(o,e=[],t=o)=>typeof o=="function"?o(...e):t,pye=(o,e,t=!0)=>{if(!t){Bp(o);return}const s=5,a=pBe(e)+s;let l=!1;const u=({target:d})=>{d===e&&(l=!0,e.removeEventListener(Yse,u),Bp(o))};e.addEventListener(Yse,u),setTimeout(()=>{l||hye(e)},a)},gie=(o,e,t,s)=>{const a=o.length;let l=o.indexOf(e);return l===-1?!t&&s?o[a-1]:o[0]:(l+=t?1:-1,s&&(l=(l+a)%a),o[Math.max(0,Math.min(l,a-1))])},vBe=/[^.]*(?=\..*)\.|.*/,OBe=/\..*/,yBe=/::\d+$/,boe={};let Tge=1;const bye={mouseenter:"mouseover",mouseleave:"mouseout"},wBe=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 vye(o,e){return e&&`${e}::${Tge++}`||o.uidEvent||Tge++}function Oye(o){const e=vye(o);return o.uidEvent=e,boe[e]=boe[e]||{},boe[e]}function _Be(o,e){return function t(s){return pie(s,{delegateTarget:o}),t.oneOff&&ao.off(o,s.type,e),e.apply(o,[s])}}function SBe(o,e,t){return function s(a){const l=o.querySelectorAll(e);for(let{target:u}=a;u&&u!==this;u=u.parentNode)for(const d of l)if(d===u)return pie(a,{delegateTarget:u}),s.oneOff&&ao.off(o,a.type,e,t),t.apply(u,[a])}}function yye(o,e,t=null){return Object.values(o).find(s=>s.callable===e&&s.delegationSelector===t)}function wye(o,e,t){const s=typeof e=="string",a=s?t:e||t;let l=_ye(o);return wBe.has(l)||(l=o),[s,a,l]