PageSourceSearch

https://www.multemusic.com/assets/index-D9ZdjH3x.js

js multemusic.com collected 2026-10-03 00:56:32 UTC 2,796,966 bytes, 507 lines download raw bytes

1function Dte(i,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const r in n)if(r!=="default"&&!(r in i)){const s=Object.getOwnPropertyDescriptor(n,r);s&&Object.defineProperty(i,r,s.get?s:{enumerable:!0,get:()=>n[r]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();var Io=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kx(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function oz(i){if(Object.prototype.hasOwnProperty.call(i,"__esModule"))return i;var e=i.default;if(typeof e=="function"){var t=function n(){var r=!1;try{r=this instanceof n}catch{}return r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}
vendor: 10,359 bytes, line 1
1),Object.keys(i).forEach(function(n){var r=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return i[n]}})}),t}var pD={exports:{}},Zm={};var mR;function Ete(){if(mR)return Zm;mR=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,r,s){var o=null;if(s!==void 0&&(o=""+s),r.key!==void 0&&(o=""+r.key),"key"in r){s={};for(var a in r)a!=="key"&&(s[a]=r[a])}else s=r;return r=s.ref,{$$typeof:i,type:n,key:o,ref:r!==void 0?r:null,props:s}}return Zm.Fragment=e,Zm.jsx=t,Zm.jsxs=t,Zm}var pR;function Tte(){return pR||(pR=1,pD.exports=Ete()),pD.exports}var w=Tte(),gD={exports:{}},Et={};var gR;function Ate(){if(gR)return Et;gR=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),m=Symbol.iterator;function p(V){return V===null||typeof V!="object"?null:(V=m&&V[m]||V["@@iterator"],typeof V=="function"?V:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,v={};function x(V,q,$){this.props=V,this.context=q,this.refs=v,this.updater=$||g}x.prototype.isReactComponent={},x.prototype.setState=function(V,q){if(typeof V!="object"&&typeof V!="function"&&V!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,V,q,"setState")},x.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function C(){}C.prototype=x.prototype;function D(V,q,$){this.props=V,this.context=q,this.refs=v,this.updater=$||g}var E=D.prototype=new C;E.constructor=D,y(E,x.prototype),E.isPureReactComponent=!0;var T=Array.isArray;function S(){}var A={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function R(V,q,$){var J=$.ref;return{$$typeof:i,type:V,key:q,ref:J!==void 0?J:null,props:$}}function O(V,q){return R(V.type,q,V.props)}function j(V){return typeof V=="object"&&V!==null&&V.$$typeof===i}function B(V){var q={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function($){return q[$]})}var U=/\/+/g;function F(V,q){return typeof V=="object"&&V!==null&&V.key!=null?B(""+V.key):q.toString(36)}function H(V){switch(V.status){case"fulfilled":return V.value;case"rejected":throw V.reason;default:switch(typeof V.status=="string"?V.then(S,S):(V.status="pending",V.then(function(q){V.status==="pending"&&(V.status="fulfilled",V.value=q)},function(q){V.status==="pending"&&(V.status="rejected",V.reason=q)})),V.status){case"fulfilled":return V.value;case"rejected":throw V.reason}}throw V}function L(V,q,$,J,ce){var se=typeof V;(se==="undefined"||se==="boolean")&&(V=null);var ge=!1;if(V===null)ge=!0;else switch(se){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(V.$$typeof){case i:case e:ge=!0;break;case d:return ge=V._init,L(ge(V._payload),q,$,J,ce)}}if(ge)return ce=ce(V),ge=J===""?"."+F(V,0):J,T(ce)?($="",ge!=null&&($=ge.replace(U,"$&/")+"/"),L(ce,q,$,"",function(Ve){return Ve})):ce!=null&&(j(ce)&&(ce=O(ce,$+(ce.key==null||V&&V.key===ce.key?"":(""+ce.key).replace(U,"$&/")+"/")+ge)),q.push(ce)),1;ge=0;var ye=J===""?".":J+":";if(T(V))for(var Pe=0;Pe<V.length;Pe++)J=V[Pe],se=ye+F(J,Pe),ge+=L(J,q,$,se,ce);else if(Pe=p(V),typeof Pe=="function")for(V=Pe.call(V),Pe=0;!(J=V.next()).done;)J=J.value,se=ye+F(J,Pe++),ge+=L(J,q,$,se,ce);else if(se==="object"){if(typeof V.then=="function")return L(H(V),q,$,J,ce);throw q=String(V),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ge}function W(V,q,$){if(V==null)return V;var J=[],ce=0;return L(V,J,"","",function(se){return q.call($,se,ce++)}),J}function G(V){if(V._status===-1){var q=V._result;q=q(),q.then(function($){(V._status===0||V._status===-1)&&(V._status=1,V._result=$)},function($){(V._status===0||V._status===-1)&&(V._status=2,V._result=$)}),V._status===-1&&(V._status=0,V._result=q)}if(V._status===1)return V._result.default;throw V._result}var Y=typeof reportError=="function"?reportError:function(V){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof V=="object"&&V!==null&&typeof V.message=="string"?String(V.message):String(V),error:V});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",V);return}console.error(V)},ie={map:W,forEach:function(V,q,$){W(V,function(){q.apply(this,arguments)},$)},count:function(V){var q=0;return W(V,function(){q++}),q},toArray:function(V){return W(V,function(q){return q})||[]},only:function(V){if(!j(V))throw Error("React.Children.only expected to receive a single React element child.");return V}};return Et.Activity=f,Et.Children=ie,Et.Component=x,Et.Fragment=t,Et.Profiler=r,Et.PureComponent=D,Et.StrictMode=n,Et.Suspense=l,Et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,Et.__COMPILER_RUNTIME={__proto__:null,c:function(V){return A.H.useMemoCache(V)}},Et.cache=function(V){return function(){return V.apply(null,arguments)}},Et.cacheSignal=function(){return null},Et.cloneElement=function(V,q,$){if(V==null)throw Error("The argument must be a React element, but you passed "+V+".");var J=y({},V.props),ce=V.key;if(q!=null)for(se in q.key!==void 0&&(ce=""+q.key),q)!I.call(q,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&q.ref===void 0||(J[se]=q[se]);var se=arguments.length-2;if(se===1)J.children=$;else if(1<se){for(var ge=Array(se),ye=0;ye<se;ye++)ge[ye]=arguments[ye+2];J.children=ge}return R(V.type,ce,J)},Et.createContext=function(V){return V={$$typeof:o,_currentValue:V,_currentValue2:V,_threadCount:0,Provider:null,Consumer:null},V.Provider=V,V.Consumer={$$typeof:s,_context:V},V},Et.createElement=function(V,q,$){var J,ce={},se=null;if(q!=null)for(J in q.key!==void 0&&(se=""+q.key),q)I.call(q,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ce[J]=q[J]);var ge=arguments.length-2;if(ge===1)ce.children=$;else if(1<ge){for(var ye=Array(ge),Pe=0;Pe<ge;Pe++)ye[Pe]=arguments[Pe+2];ce.children=ye}if(V&&V.defaultProps)for(J in ge=V.defaultProps,ge)ce[J]===void 0&&(ce[J]=ge[J]);return R(V,se,ce)},Et.createRef=function(){return{current:null}},Et.forwardRef=function(V){return{$$typeof:a,render:V}},Et.isValidElement=j,Et.lazy=function(V){return{$$typeof:d,_payload:{_status:-1,_result:V},_init:G}},Et.memo=function(V,q){return{$$typeof:c,type:V,compare:q===void 0?null:q}},Et.startTransition=function(V){var q=A.T,$={};A.T=$;try{var J=V(),ce=A.S;ce!==null&&ce($,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(S,Y)}catch(se){Y(se)}finally{q!==null&&$.types!==null&&(q.types=$.types),A.T=q}},Et.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},Et.use=function(V){return A.H.use(V)},Et.useActionState=function(V,q,$){return A.H.useActionState(V,q,$)},Et.useCallback=function(V,q){return A.H.useCallback(V,q)},Et.useContext=function(V){return A.H.useContext(V)},Et.useDebugValue=function(){},Et.useDeferredValue=function(V,q){return A.H.useDeferredValue(V,q)},Et.useEffect=function(V,q){return A.H.useEffect(V,q)},Et.useEffectEvent=function(V){return A.H.useEffectEvent(V)},Et.useId=function(){return A.H.useId()},Et.useImperativeHandle=function(V,q,$){return A.H.useImperativeHandle(V,q,$)},Et.useInsertionEffect=function(V,q){return A.H.useInsertionEffect(V,q)},Et.useLayoutEffect=function(V,q){return A.H.useLayoutEffect(V,q)},Et.useMemo=function(V,q){return A.H.useMemo(V,q)},Et.useOptimistic=function(V,q){return A.H.useOptimistic(V,q)},Et.useReducer=function(V,q,$){return A.H.useReducer(V,q,$)},Et.useRef=function(V){return A.H.useRef(V)},Et.useState=function(V){return A.H.useState(V)},Et.useSyncExternalStore=function(V,q,$){return A.H.useSyncExternalStore(V,q,$)},Et.useTransition=function(){return A.H.useTransition()},Et.version="19.2.3",Et}var bR;function Sx(){return bR||(bR=1,gD.exports=Ate()),gD.exports}var M=Sx();const Ee=kx(M),nw=Dte({__proto__:null,default:Ee},[M]);var bD={exports:{}},Jm={},yD={exports:{}},vD={};var yR;function kte(){return yR||(yR=1,(function(i){function e(L,W){var G=L.length;L.push(W);e:for(;0<G;){var Y=G-1>>>1,ie=L[Y];if(0<r(ie,W))L[Y]=W,L[G]=ie,G=Y;else break e}}function t(L){return L.length===0?null:L[0]}function n(L){if(L.length===0)return null;var W=L[0],G=L.pop();if(G!==W){L[0]=G;e:for(var Y=0,ie=L.length,V=ie>>>1;Y<V;){var q=2*(Y+1)-1,$=L[q],J=q+1,ce=L[J];if(0>r($,G))J<ie&&0>r(ce,$)?(L[Y]=ce,L[J]=G,Y=J):(L[Y]=$,L[q]=G,Y=q);else if(J<ie&&0>r(ce,G))L[Y]=ce,L[J]=G,Y=J;else break e}}return W}function r(L,W){var G=L.sortIndex-W.sortIndex;return G!==0?G:L.id-W.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;i.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();i.unstable_now=function(){return o.now()-a}}var l=[],c=[],d=1,f=null,m=3,p=!1,g=!1,y=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function E(L){for(var W=t(c);W!==null;){if(W.callback===null)n(c);else if(W.startTime<=L)n(c),W.sortIndex=W.expirationTime,e(l,W);else break;W=t(c)}}function T(L){if(y=!1,E(L),!g)if(t(l)!==null)g=!0,S||(S=!0,B());else{var W=t(c);W!==null&&H(T,W.startTime-L)}}var S=!1,A=-1,I=5,R=-1;function O(){return v?!0:!(i.unstable_now()-R<I)}function j(){if(v=!1,S){var L=i.unstable_now();R=L;var W=!0;try{e:{g=!1,y&&(y=!1,C(A),A=-1),p=!0;var G=m;try{t:{for(E(L),f=t(l);f!==null&&!(f.expirationTime>L&&O());){var Y=f.callback;if(typeof Y=="function"){f.callback=null,m=f.priorityLevel;var ie=Y(f.expirationTime<=L);if(L=i.unstable_now(),typeof ie=="function"){f.callback=ie,E(L),W=!0;break t}f===t(l)&&n(l),E(L)}else n(l);f=t(l)}if(f!==null)W=!0;else{var V=t(c);V!==null&&H(T,V.startTime-L),W=!1}}break e}finally{f=null,m=G,p=!1}W=void 0}}finally{W?B():S=!1}
vendor: 8,827 bytes, line 1
1}}var B;if(typeof D=="function")B=function(){D(j)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,F=U.port2;U.port1.onmessage=j,B=function(){F.postMessage(null)}}else B=function(){x(j,0)};function H(L,W){A=x(function(){L(i.unstable_now())},W)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(L){L.callback=null},i.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<L?Math.floor(1e3/L):5},i.unstable_getCurrentPriorityLevel=function(){return m},i.unstable_next=function(L){switch(m){case 1:case 2:case 3:var W=3;break;default:W=m}var G=m;m=W;try{return L()}finally{m=G}},i.unstable_requestPaint=function(){v=!0},i.unstable_runWithPriority=function(L,W){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var G=m;m=L;try{return W()}finally{m=G}},i.unstable_scheduleCallback=function(L,W,G){var Y=i.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?Y+G:Y):G=Y,L){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=G+ie,L={id:d++,callback:W,priorityLevel:L,startTime:G,expirationTime:ie,sortIndex:-1},G>Y?(L.sortIndex=G,e(c,L),t(l)===null&&L===t(c)&&(y?(C(A),A=-1):y=!0,H(T,G-Y))):(L.sortIndex=ie,e(l,L),g||p||(g=!0,S||(S=!0,B()))),L},i.unstable_shouldYield=O,i.unstable_wrapCallback=function(L){var W=m;return function(){var G=m;m=W;try{return L.apply(this,arguments)}finally{m=G}}}})(vD)),vD}var vR;function Ste(){return vR||(vR=1,yD.exports=kte()),yD.exports}var wD={exports:{}},ar={};var wR;function Pte(){if(wR)return ar;wR=1;var i=Sx();function e(l){var c="https://react.dev/errors/"+l;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)c+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var n={d:{f:t,r:function(){throw Error(e(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},r=Symbol.for("react.portal");function s(l,c,d){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:f==null?null:""+f,children:l,containerInfo:c,implementation:d}}var o=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(l,c){if(l==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return ar.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,ar.createPortal=function(l,c){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(e(299));return s(l,c,null,d)},ar.flushSync=function(l){var c=o.T,d=n.p;try{if(o.T=null,n.p=2,l)return l()}finally{o.T=c,n.p=d,n.d.f()}},ar.preconnect=function(l,c){typeof l=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,n.d.C(l,c))},ar.prefetchDNS=function(l){typeof l=="string"&&n.d.D(l)},ar.preinit=function(l,c){if(typeof l=="string"&&c&&typeof c.as=="string"){var d=c.as,f=a(d,c.crossOrigin),m=typeof c.integrity=="string"?c.integrity:void 0,p=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;d==="style"?n.d.S(l,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:f,integrity:m,fetchPriority:p}):d==="script"&&n.d.X(l,{crossOrigin:f,integrity:m,fetchPriority:p,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},ar.preinitModule=function(l,c){if(typeof l=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var d=a(c.as,c.crossOrigin);n.d.M(l,{crossOrigin:d,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&n.d.M(l)},ar.preload=function(l,c){if(typeof l=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var d=c.as,f=a(d,c.crossOrigin);n.d.L(l,d,{crossOrigin:f,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},ar.preloadModule=function(l,c){if(typeof l=="string")if(c){var d=a(c.as,c.crossOrigin);n.d.m(l,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:d,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else n.d.m(l)},ar.requestFormReset=function(l){n.d.r(l)},ar.unstable_batchedUpdates=function(l,c){return l(c)},ar.useFormState=function(l,c,d){return o.H.useFormState(l,c,d)},ar.useFormStatus=function(){return o.H.useHostTransitionStatus()},ar.version="19.2.3",ar}var xR;function az(){if(xR)return wD.exports;xR=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),wD.exports=Pte(),wD.exports}var _R;function Ite(){if(_R)return Jm;_R=1;var i=Ste(),e=Sx(),t=az();function n(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+u+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)}function s(u){var h=u,b=u;if(u.alternate)for(;h.return;)h=h.return;else{u=h;do h=u,(h.flags&4098)!==0&&(b=h.return),u=h.return;while(u)}return h.tag===3?b:null}function o(u){if(u.tag===13){var h=u.memoizedState;if(h===null&&(u=u.alternate,u!==null&&(h=u.memoizedState)),h!==null)return h.dehydrated}return null}function a(u){if(u.tag===31){var h=u.memoizedState;if(h===null&&(u=u.alternate,u!==null&&(h=u.memoizedState)),h!==null)return h.dehydrated}return null}function l(u){if(s(u)!==u)throw Error(n(188))}function c(u){var h=u.alternate;if(!h){if(h=s(u),h===null)throw Error(n(188));return h!==u?null:u}for(var b=u,_=h;;){var k=b.return;if(k===null)break;var P=k.alternate;if(P===null){if(_=k.return,_!==null){b=_;continue}break}if(k.child===P.child){for(P=k.child;P;){if(P===b)return l(k),u;if(P===_)return l(k),h;P=P.sibling}throw Error(n(188))}if(b.return!==_.return)b=k,_=P;else{for(var z=!1,X=k.child;X;){if(X===b){z=!0,b=k,_=P;break}if(X===_){z=!0,_=k,b=P;break}X=X.sibling}if(!z){for(X=P.child;X;){if(X===b){z=!0,b=P,_=k;break}if(X===_){z=!0,_=P,b=k;break}X=X.sibling}if(!z)throw Error(n(189))}}if(b.alternate!==_)throw Error(n(190))}if(b.tag!==3)throw Error(n(188));return b.stateNode.current===b?u:h}function d(u){var h=u.tag;if(h===5||h===26||h===27||h===6)return u;for(u=u.child;u!==null;){if(h=d(u),h!==null)return h;u=u.sibling}return null}var f=Object.assign,m=Symbol.for("react.element"),p=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),D=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function B(u){return u===null||typeof u!="object"?null:(u=j&&u[j]||u["@@iterator"],typeof u=="function"?u:null)}var U=Symbol.for("react.client.reference");function F(u){if(u==null)return null;if(typeof u=="function")return u.$$typeof===U?null:u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case y:return"Fragment";case x:return"Profiler";case v:return"StrictMode";case T:return"Suspense";case S:return"SuspenseList";case R:return"Activity"}if(typeof u=="object")switch(u.$$typeof){case g:return"Portal";case D:return u.displayName||"Context";case C:return(u._context.displayName||"Context")+".Consumer";case E:var h=u.render;return u=u.displayName,u||(u=h.displayName||h.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case A:return h=u.displayName||null,h!==null?h:F(u.type)||"Memo";case I:h=u._payload,u=u._init;try{return F(u(h))}catch{}}return null}var H=Array.isArray,L=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pen
vendor: 4,230 bytes, lines 1-8
1ding:!1,data:null,method:null,action:null},Y=[],ie=-1;function V(u){return{current:u}}function q(u){0>ie||(u.current=Y[ie],Y[ie]=null,ie--)}function $(u,h){ie++,Y[ie]=u.current,u.current=h}var J=V(null),ce=V(null),se=V(null),ge=V(null);function ye(u,h){switch($(se,h),$(ce,u),$(J,null),h.nodeType){case 9:case 11:u=(u=h.documentElement)&&(u=u.namespaceURI)?M6(u):0;break;default:if(u=h.tagName,h=h.namespaceURI)h=M6(h),u=L6(h,u);else switch(u){case"svg":u=1;break;case"math":u=2;break;default:u=0}}q(J),$(J,u)}function Pe(){q(J),q(ce),q(se)}function Ve(u){u.memoizedState!==null&&$(ge,u);var h=J.current,b=L6(h,u.type);h!==b&&($(ce,u),$(J,b))}function Ze(u){ce.current===u&&(q(J),q(ce)),ge.current===u&&(q(ge),Ym._currentValue=G)}var dt,Re;function N(u){if(dt===void 0)try{throw Error()}catch(b){var h=b.stack.trim().match(/\n( *(at )?)/);dt=h&&h[1]||"",Re=-1<b.stack.indexOf(`
2    at`)?" (<anonymous>)":-1<b.stack.indexOf("@")?"@unknown:0:0":""}return`
3`+dt+u+Re}var te=!1;function ne(u,h){if(!u||te)return"";te=!0;var b=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var _={DetermineComponentFrameRoot:function(){try{if(h){var Me=function(){throw Error()};if(Object.defineProperty(Me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Me,[])}catch(Se){var Te=Se}Reflect.construct(u,[],Me)}else{try{Me.call()}catch(Se){Te=Se}u.call(Me.prototype)}}else{try{throw Error()}catch(Se){Te=Se}(Me=u())&&typeof Me.catch=="function"&&Me.catch(function(){})}}catch(Se){if(Se&&Te&&typeof Se.stack=="string")return[Se.stack,Te.stack]}return[null,null]}};_.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var k=Object.getOwnPropertyDescriptor(_.DetermineComponentFrameRoot,"name");k&&k.configurable&&Object.defineProperty(_.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var P=_.DetermineComponentFrameRoot(),z=P[0],X=P[1];if(z&&X){var de=z.split(`
4`),Ce=X.split(`
5`);for(k=_=0;_<de.length&&!de[_].includes("DetermineComponentFrameRoot");)_++;for(;k<Ce.length&&!Ce[k].includes("DetermineComponentFrameRoot");)k++;if(_===de.length||k===Ce.length)for(_=de.length-1,k=Ce.length-1;1<=_&&0<=k&&de[_]!==Ce[k];)k--;for(;1<=_&&0<=k;_--,k--)if(de[_]!==Ce[k]){if(_!==1||k!==1)do if(_--,k--,0>k||de[_]!==Ce[k]){var Oe=`
6`+de[_].replace(" at new "," at ");return u.displayName&&Oe.includes("<anonymous>")&&(Oe=Oe.replace("<anonymous>",u.displayName)),Oe}while(1<=_&&0<=k);break}}}finally{te=!1,Error.prepareStackTrace=b}return(b=u?u.displayName||u.name:"")?N(b):""}function Z(u,h){switch(u.tag){case 26:case 27:case 5:return N(u.type);case 16:return N("Lazy");case 13:return u.child!==h&&h!==null?N("Suspense Fallback"):N("Suspense");case 19:return N("SuspenseList");case 0:case 15:return ne(u.type,!1);case 11:return ne(u.type.render,!1);case 1:return ne(u.type,!0);case 31:return N("Activity");default:return""}}function Q(u){try{var h="",b=null;do h+=Z(u,b),b=u,u=u.return;while(u);return h}catch(_){return`
7Error generating stack: `+_.message+`
8`+_.stack}}var le=Object.prototype.hasOwnProperty,we=i.unstable_scheduleCallback,xe=i.unstable_cancelCallback,fe=i.unstable_shouldYield,re=i.unstable_requestPaint,ae=i.unstable_now,me=i.unstable_getCurrentPriorityLevel,De=i.unstable_ImmediatePriority,je=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,bt=i.unstable_LowPriority,it=i.unstable_IdlePriority,ht=i.log,kt=i.unstable_setDisableYieldValue,pe=null,Fe=null;function qe(u){if(typeof ht=="function"&&kt(u),Fe&&typeof Fe.setStrictMode=="function")try{Fe.setStrictMode(pe,u)}catch{}}var Xe=Math.clz32?Math.clz32:dn,Dt=Math.log,Nt=Math.LN2;function dn(u){return u>>>=0,u===0?32:31-(Dt(u)/Nt|0)|0}var Cn=256,$n=262144,vi=4194304;function $i(u){var h=u&42;if(h!==0)return h;switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return u&261888;case 262144:case 524288:case 1048576:case 2097152:return u&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return u&62914560;case 67108864:return 67108864;
vendor: 9,675 bytes, line 8
8case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return u}}function Ba(u,h,b){var _=u.pendingLanes;if(_===0)return 0;var k=0,P=u.suspendedLanes,z=u.pingedLanes;u=u.warmLanes;var X=_&134217727;return X!==0?(_=X&~P,_!==0?k=$i(_):(z&=X,z!==0?k=$i(z):b||(b=X&~u,b!==0&&(k=$i(b))))):(X=_&~P,X!==0?k=$i(X):z!==0?k=$i(z):b||(b=_&~u,b!==0&&(k=$i(b)))),k===0?0:h!==0&&h!==k&&(h&P)===0&&(P=k&-k,b=h&-h,P>=b||P===32&&(b&4194048)!==0)?h:k}function K(u,h){return(u.pendingLanes&~(u.suspendedLanes&~u.pingedLanes)&h)===0}function ee(u,h){switch(u){case 1:case 2:case 4:case 8:case 64:return h+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ue(){var u=vi;return vi<<=1,(vi&62914560)===0&&(vi=4194304),u}function Ie(u){for(var h=[],b=0;31>b;b++)h.push(u);return h}function ze(u,h){u.pendingLanes|=h,h!==268435456&&(u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0)}function at(u,h,b,_,k,P){var z=u.pendingLanes;u.pendingLanes=b,u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0,u.expiredLanes&=b,u.entangledLanes&=b,u.errorRecoveryDisabledLanes&=b,u.shellSuspendCounter=0;var X=u.entanglements,de=u.expirationTimes,Ce=u.hiddenUpdates;for(b=z&~b;0<b;){var Oe=31-Xe(b),Me=1<<Oe;X[Oe]=0,de[Oe]=-1;var Te=Ce[Oe];if(Te!==null)for(Ce[Oe]=null,Oe=0;Oe<Te.length;Oe++){var Se=Te[Oe];Se!==null&&(Se.lane&=-536870913)}b&=~Me}_!==0&&We(u,_,0),P!==0&&k===0&&u.tag!==0&&(u.suspendedLanes|=P&~(z&~h))}function We(u,h,b){u.pendingLanes|=h,u.suspendedLanes&=~h;var _=31-Xe(h);u.entangledLanes|=h,u.entanglements[_]=u.entanglements[_]|1073741824|b&261930}function Ft(u,h){var b=u.entangledLanes|=h;for(u=u.entanglements;b;){var _=31-Xe(b),k=1<<_;k&h|u[_]&h&&(u[_]|=h),b&=~k}}function bn(u,h){var b=h&-h;return b=(b&42)!==0?1:Gn(b),(b&(u.suspendedLanes|h))!==0?0:b}function Gn(u){switch(u){case 2:u=1;break;case 8:u=4;break;case 32:u=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:u=128;break;case 268435456:u=134217728;break;default:u=0}return u}function _r(u){return u&=-u,2<u?8<u?(u&134217727)!==0?32:268435456:8:2}function iu(){var u=W.p;return u!==0?u:(u=window.event,u===void 0?32:aR(u.type))}function go(u,h){var b=W.p;try{return W.p=u,h()}finally{W.p=b}}var Gi=Math.random().toString(36).slice(2),ei="__reactFiber$"+Gi,Ri="__reactProps$"+Gi,Ur="__reactContainer$"+Gi,bo="__reactEvents$"+Gi,Yo="__reactListeners$"+Gi,Ma="__reactHandles$"+Gi,Vr="__reactResources$"+Gi,La="__reactMarker$"+Gi;function Ua(u){delete u[ei],delete u[Ri],delete u[bo],delete u[Yo],delete u[Ma]}function zs(u){var h=u[ei];if(h)return h;for(var b=u.parentNode;b;){if(h=b[Ur]||b[ei]){if(b=h.alternate,h.child!==null||b!==null&&b.child!==null)for(u=q6(u);u!==null;){if(b=u[ei])return b;u=q6(u)}return h}u=b,b=u.parentNode}return null}function Ko(u){if(u=u[ei]||u[Ur]){var h=u.tag;if(h===5||h===6||h===13||h===31||h===26||h===27||h===3)return u}return null}function ms(u){var h=u.tag;if(h===5||h===26||h===27||h===6)return u.stateNode;throw Error(n(33))}function Va(u){var h=u[Vr];return h||(h=u[Vr]={hoistableStyles:new Map,hoistableScripts:new Map}),h}function Mn(u){u[La]=!0}var um=new Set,TP={};function ru(u,h){Ld(u,h),Ld(u+"Capture",h)}function Ld(u,h){for(TP[u]=h,u=0;u<h.length;u++)um.add(h[u])}var pJ=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),AP={},kP={};function gJ(u){return le.call(kP,u)?!0:le.call(AP,u)?!1:pJ.test(u)?kP[u]=!0:(AP[u]=!0,!1)}function V0(u,h,b){if(gJ(h))if(b===null)u.removeAttribute(h);else{switch(typeof b){case"undefined":case"function":case"symbol":u.removeAttribute(h);return;case"boolean":var _=h.toLowerCase().slice(0,5);if(_!=="data-"&&_!=="aria-"){u.removeAttribute(h);return}}u.setAttribute(h,""+b)}}function j0(u,h,b){if(b===null)u.removeAttribute(h);else{switch(typeof b){case"undefined":case"function":case"symbol":case"boolean":u.removeAttribute(h);return}u.setAttribute(h,""+b)}}function ja(u,h,b,_){if(_===null)u.removeAttribute(b);else{switch(typeof _){case"undefined":case"function":case"symbol":case"boolean":u.removeAttribute(b);return}u.setAttributeNS(h,b,""+_)}}function Ws(u){switch(typeof u){case"bigint":case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function SP(u){var h=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(h==="checkbox"||h==="radio")}function bJ(u,h,b){var _=Object.getOwnPropertyDescriptor(u.constructor.prototype,h);if(!u.hasOwnProperty(h)&&typeof _<"u"&&typeof _.get=="function"&&typeof _.set=="function"){var k=_.get,P=_.set;return Object.defineProperty(u,h,{configurable:!0,get:function(){return k.call(this)},set:function(z){b=""+z,P.call(this,z)}}),Object.defineProperty(u,h,{enumerable:_.enumerable}),{getValue:function(){return b},setValue:function(z){b=""+z},stopTracking:function(){u._valueTracker=null,delete u[h]}}}}function l2(u){if(!u._valueTracker){var h=SP(u)?"checked":"value";u._valueTracker=bJ(u,h,""+u[h])}}function PP(u){if(!u)return!1;var h=u._valueTracker;if(!h)return!0;var b=h.getValue(),_="";return u&&(_=SP(u)?u.checked?"true":"false":u.value),u=_,u!==b?(h.setValue(u),!0):!1}function z0(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch{return u.body}}var yJ=/[\n"\\]/g;function Hs(u){return u.replace(yJ,function(h){return"\\"+h.charCodeAt(0).toString(16)+" "})}function c2(u,h,b,_,k,P,z,X){u.name="",z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?u.type=z:u.removeAttribute("type"),h!=null?z==="number"?(h===0&&u.value===""||u.value!=h)&&(u.value=""+Ws(h)):u.value!==""+Ws(h)&&(u.value=""+Ws(h)):z!=="submit"&&z!=="reset"||u.removeAttribute("value"),h!=null?u2(u,z,Ws(h)):b!=null?u2(u,z,Ws(b)):_!=null&&u.removeAttribute("value"),k==null&&P!=null&&(u.defaultChecked=!!P),k!=null&&(u.checked=k&&typeof k!="function"&&typeof k!="symbol"),X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?u.name=""+Ws(X):u.removeAttribute("name")}function IP(u,h,b,_,k,P,z,X){if(P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(u.type=P),h!=null||b!=null){if(!(P!=="submit"&&P!=="reset"||h!=null)){l2(u);return}b=b!=null?""+Ws(b):"",h=h!=null?""+Ws(h):b,X||h===u.value||(u.value=h),u.defaultValue=h}_=_??k,_=typeof _!="function"&&typeof _!="symbol"&&!!_,u.checked=X?u.checked:!!_,u.defaultChecked=!!_,z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"&&(u.name=z),l2(u)}function u2(u,h,b){h==="number"&&z0(u.ownerDocument)===u||u.defaultValue===""+b||(u.defaultValue=""+b)}function Ud(u,h,b,_){if(u=u.options,h){h={};for(var k=0;k<b.length;k++)h["$"+b[k]]=!0;for(b=0;b<u.length;b++)k=h.hasOwnProperty("$"+u[b].value),u[b].selected!==k&&(u[b].selected=k),k&&_&&(u[b].defaultSelected=!0)}else{for(b=""+Ws(b),h=null,k=0;k<u.length;k++){if(u[k].value===b){u[k].selected=!0,_&&(u[k].defaultSelected=!0);return}h!==null||u[k].disabled||(h=u[k])}h!==null&&(h.selected=!0)}}function RP(u,h,b){if(h!=null&&(h=""+Ws(h),h!==u.value&&(u.value=h),b==null)){u.defaultValue!==h&&(u.defaultValue=h);return}u.defaultValue=b!=null?""+Ws(b):""}function FP(u,h,b,_){if(h==null){if(_!=null){if(b!=null)throw Error(n(92));if(H(_)){if(1<_.length)throw Error(n(93));_=_[0]}b=_}b==null&&(b=""),h=b}b=Ws(h),u.defaultValue=b,_=u.textContent,_===b&&_!==""&&_!==null&&(u.value=_),l2(u)}function Vd(u,h){if(h){var b=u.firstChild;if(b&&b===u.lastChild&&b.nodeType===3){b.nodeValue=h;return}}u.textContent=h}var vJ=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function OP(u,h,b){var _=h.indexOf("--")===0;b==null||typeof b=="boolean"||b===""?_?u.setProperty(h,""):h==="float"?u.cssFloat="":u[h]="":_?u.setProperty(h,b):typeof b!="number"||b===0||vJ.has(h)?h==="float"?u.cssFloat=b:u[h]=(""+b).trim():u[h]=b+"px"}function NP(u,h,b){if(h!=null&&typeof h!="object")throw Error(n(62));if(u=u.style,b!=null){for(var _ in b)!b.hasOwnProperty(_)||h!=null&&h.hasOwnProperty(_)||(_.indexOf("--")===0?u.setProperty(_,""):_
vendor: 5,380 bytes, line 8
8==="float"?u.cssFloat="":u[_]="");for(var k in h)_=h[k],h.hasOwnProperty(k)&&b[k]!==_&&OP(u,k,_)}else for(var P in h)h.hasOwnProperty(P)&&OP(u,P,h[P])}function d2(u){if(u.indexOf("-")===-1)return!1;switch(u){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wJ=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),xJ=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function W0(u){return xJ.test(""+u)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":u}function za(){}var f2=null;function h2(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var jd=null,zd=null;function BP(u){var h=Ko(u);if(h&&(u=h.stateNode)){var b=u[Ri]||null;e:switch(u=h.stateNode,h.type){case"input":if(c2(u,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name),h=b.name,b.type==="radio"&&h!=null){for(b=u;b.parentNode;)b=b.parentNode;for(b=b.querySelectorAll('input[name="'+Hs(""+h)+'"][type="radio"]'),h=0;h<b.length;h++){var _=b[h];if(_!==u&&_.form===u.form){var k=_[Ri]||null;if(!k)throw Error(n(90));c2(_,k.value,k.defaultValue,k.defaultValue,k.checked,k.defaultChecked,k.type,k.name)}}for(h=0;h<b.length;h++)_=b[h],_.form===u.form&&PP(_)}break e;case"textarea":RP(u,b.value,b.defaultValue);break e;case"select":h=b.value,h!=null&&Ud(u,!!b.multiple,h,!1)}}}var m2=!1;function MP(u,h,b){if(m2)return u(h,b);m2=!0;try{var _=u(h);return _}finally{if(m2=!1,(jd!==null||zd!==null)&&(Pb(),jd&&(h=jd,u=zd,zd=jd=null,BP(h),u)))for(h=0;h<u.length;h++)BP(u[h])}}function dm(u,h){var b=u.stateNode;if(b===null)return null;var _=b[Ri]||null;if(_===null)return null;b=_[h];e:switch(h){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(_=!_.disabled)||(u=u.type,_=!(u==="button"||u==="input"||u==="select"||u==="textarea")),u=!_;break e;default:u=!1}if(u)return null;if(b&&typeof b!="function")throw Error(n(231,h,typeof b));return b}var Wa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p2=!1;if(Wa)try{var fm={};Object.defineProperty(fm,"passive",{get:function(){p2=!0}}),window.addEventListener("test",fm,fm),window.removeEventListener("test",fm,fm)}catch{p2=!1}var Gl=null,g2=null,H0=null;function LP(){if(H0)return H0;var u,h=g2,b=h.length,_,k="value"in Gl?Gl.value:Gl.textContent,P=k.length;for(u=0;
vendor: 1,652 bytes, line 8
8u<b&&h[u]===k[u];u++);var z=b-u;for(_=1;_<=z&&h[b-_]===k[P-_];_++);return H0=k.slice(u,1<_?1-_:void 0)}function q0(u){var h=u.keyCode;return"charCode"in u?(u=u.charCode,u===0&&h===13&&(u=13)):u=h,u===10&&(u=13),32<=u||u===13?u:0}function $0(){return!0}function UP(){return!1}function jr(u){function h(b,_,k,P,z){this._reactName=b,this._targetInst=k,this.type=_,this.nativeEvent=P,this.target=z,this.currentTarget=null;for(var X in u)u.hasOwnProperty(X)&&(b=u[X],this[X]=b?b(P):P[X]);return this.isDefaultPrevented=(P.defaultPrevented!=null?P.defaultPrevented:P.returnValue===!1)?$0:UP,this.isPropagationStopped=UP,this}return f(h.prototype,{preventDefault:function(){this.defaultPrevented=!0;var b=this.nativeEvent;b&&(b.preventDefault?b.preventDefault():typeof b.returnValue!="unknown"&&(b.returnValue=!1),this.isDefaultPrevented=$0)},stopPropagation:function(){var b=this.nativeEvent;b&&(b.stopPropagation?b.stopPropagation():typeof b.cancelBubble!="unknown"&&(b.cancelBubble=!0),this.isPropagationStopped=$0)},persist:function(){},isPersistent:$0}),h}var su={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},G0=jr(su),hm=f({},su,{view:0,detail:0}),_J=jr(hm),b2,y2,mm,Y0=f({},hm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:w2,button:0,buttons:0,relatedTarget:function(u){return u.relatedTarget===void 0?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){return"movementX"in u?u.movementX:(u!==mm&&(mm&&u.type==="mousemove"?(b2=u.screenX-mm.screenX,y2=u.screenY-mm.
vendor: 4,850 bytes, line 8
8screenY):y2=b2=0,mm=u),b2)},movementY:function(u){return"movementY"in u?u.movementY:y2}}),VP=jr(Y0),CJ=f({},Y0,{dataTransfer:0}),DJ=jr(CJ),EJ=f({},hm,{relatedTarget:0}),v2=jr(EJ),TJ=f({},su,{animationName:0,elapsedTime:0,pseudoElement:0}),AJ=jr(TJ),kJ=f({},su,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),SJ=jr(kJ),PJ=f({},su,{data:0}),jP=jr(PJ),IJ={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},RJ={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},FJ={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function OJ(u){var h=this.nativeEvent;return h.getModifierState?h.getModifierState(u):(u=FJ[u])?!!h[u]:!1}function w2(){return OJ}var NJ=f({},hm,{key:function(u){if(u.key){var h=IJ[u.key]||u.key;if(h!=="Unidentified")return h}return u.type==="keypress"?(u=q0(u),u===13?"Enter":String.fromCharCode(u)):u.type==="keydown"||u.type==="keyup"?RJ[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:w2,charCode:function(u){return u.type==="keypress"?q0(u):0},keyCode:function(u){return u.type==="keydown"||u.type==="keyup"?u.keyCode:0},which:function(u){return u.type==="keypress"?q0(u):u.type==="keydown"||u.type==="keyup"?u.keyCode:0}}),BJ=jr(NJ),MJ=f({},Y0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zP=jr(MJ),LJ=f({},hm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:w2}),UJ=jr(LJ),VJ=f({},su,{propertyName:0,elapsedTime:0,pseudoElement:0}),jJ=jr(VJ),zJ=f({},Y0,{deltaX:function(u){return"deltaX"in u?u.deltaX:"wheelDeltaX"in u?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:"wheelDeltaY"in u?-u.wheelDeltaY:"wheelDelta"in u?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),WJ=jr(zJ),HJ=f({},su,{newState:0,oldState:0}),qJ=jr(HJ),$J=[9,13,27,32],x2=Wa&&"CompositionEvent"in window,pm=null;Wa&&"documentMode"in document&&(pm=document.documentMode);var GJ=Wa&&"TextEvent"in window&&!pm,WP=Wa&&(!x2||pm&&8<pm&&11>=pm),HP=" ",qP=!1;function $P(u,h){switch(u){case"keyup":return $J.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function GP(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var Wd=!1;function YJ(u,h){switch(u){case"compositionend":return GP(h);case"keypress":return h.which!==32?null:(qP=!0,HP);case"textInput":return u=h.data,u===HP&&qP?null:u;default:return null}}function KJ(u,h){if(Wd)return u==="compositionend"||!x2&&$P(u,h)?(u=LP(),H0=g2=Gl=null,Wd=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1<h.char.length)return h.char;if(h.which)return String.fromCharCode(h.which)}return null;case"compositionend":return WP&&h.locale!=="ko"?null:h.data;default:return null}}var XJ={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function YP(u){var h=u&&u.nodeName&&u.nodeName.toLowerCase();return h==="input"?!!XJ[u.type]:h==="textarea"}function KP(u,h,b,_){jd?zd?zd.push(_):zd=[_]:jd=_,h=Mb(h,"onChange"),0<h.length&&(b=new G0("onChange","change",null,b,_),u.push({event:b,listeners:h}))}var gm=null,bm=null;function QJ(u){I6(u,0)}function K0(u){var h=ms(u);if(PP(h))return u}function XP(u,h){if(u==="change")return h}var QP=!1;if(Wa){var _2;if(Wa){var C2="oninput"in document;if(!C2){var ZP=document.createElement("div");ZP.setAttribute("oninput","return;"),C2=typeof ZP.oninput=="function"}_2=C2}else _2=!1;QP=_2&&(!document.documentMode||9<document.documentMode)}function JP(){gm&&(gm.detachEvent("onpropertychange",e8),bm=gm=null)}function e8(u){if(u.propertyName==="value"&&K0(bm)){var h=[];KP(h,bm,u,h2(u)),MP(QJ,h)}}function ZJ(u,h,b){u==="focusin"?(JP(),gm=h,bm=b,gm.attachEvent("onpropertychange",e8)):u==="focusout"&&JP()}function JJ(u){if(u==="selectionchange"||u==="keyup"||u==="keydown")return K0(bm)}function eee(u,h){if(u==="click")return K0(h)}function tee(u,h){if(u==="input"||u==="change")return K0(h)}function nee(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var ps=typeof Object.is=="function"?Object.is:nee;function ym(u,h){if(ps(u,h))return!0;
vendor: 16,987 bytes, line 8
8if(typeof u!="object"||u===null||typeof h!="object"||h===null)return!1;var b=Object.keys(u),_=Object.keys(h);if(b.length!==_.length)return!1;for(_=0;_<b.length;_++){var k=b[_];if(!le.call(h,k)||!ps(u[k],h[k]))return!1}return!0}function t8(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function n8(u,h){var b=t8(u);u=0;for(var _;b;){if(b.nodeType===3){if(_=u+b.textContent.length,u<=h&&_>=h)return{node:b,offset:h-u};u=_}e:{for(;b;){if(b.nextSibling){b=b.nextSibling;break e}b=b.parentNode}b=void 0}b=t8(b)}}function i8(u,h){return u&&h?u===h?!0:u&&u.nodeType===3?!1:h&&h.nodeType===3?i8(u,h.parentNode):"contains"in u?u.contains(h):u.compareDocumentPosition?!!(u.compareDocumentPosition(h)&16):!1:!1}function r8(u){u=u!=null&&u.ownerDocument!=null&&u.ownerDocument.defaultView!=null?u.ownerDocument.defaultView:window;for(var h=z0(u.document);h instanceof u.HTMLIFrameElement;){try{var b=typeof h.contentWindow.location.href=="string"}catch{b=!1}if(b)u=h.contentWindow;else break;h=z0(u.document)}return h}function D2(u){var h=u&&u.nodeName&&u.nodeName.toLowerCase();return h&&(h==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||h==="textarea"||u.contentEditable==="true")}var iee=Wa&&"documentMode"in document&&11>=document.documentMode,Hd=null,E2=null,vm=null,T2=!1;function s8(u,h,b){var _=b.window===b?b.document:b.nodeType===9?b:b.ownerDocument;T2||Hd==null||Hd!==z0(_)||(_=Hd,"selectionStart"in _&&D2(_)?_={start:_.selectionStart,end:_.selectionEnd}:(_=(_.ownerDocument&&_.ownerDocument.defaultView||window).getSelection(),_={anchorNode:_.anchorNode,anchorOffset:_.anchorOffset,focusNode:_.focusNode,focusOffset:_.focusOffset}),vm&&ym(vm,_)||(vm=_,_=Mb(E2,"onSelect"),0<_.length&&(h=new G0("onSelect","select",null,h,b),u.push({event:h,listeners:_}),h.target=Hd)))}function ou(u,h){var b={};return b[u.toLowerCase()]=h.toLowerCase(),b["Webkit"+u]="webkit"+h,b["Moz"+u]="moz"+h,b}var qd={animationend:ou("Animation","AnimationEnd"),animationiteration:ou("Animation","AnimationIteration"),animationstart:ou("Animation","AnimationStart"),transitionrun:ou("Transition","TransitionRun"),transitionstart:ou("Transition","TransitionStart"),transitioncancel:ou("Transition","TransitionCancel"),transitionend:ou("Transition","TransitionEnd")},A2={},o8={};Wa&&(o8=document.createElement("div").style,"AnimationEvent"in window||(delete qd.animationend.animation,delete qd.animationiteration.animation,delete qd.animationstart.animation),"TransitionEvent"in window||delete qd.transitionend.transition);function au(u){if(A2[u])return A2[u];if(!qd[u])return u;var h=qd[u],b;for(b in h)if(h.hasOwnProperty(b)&&b in o8)return A2[u]=h[b];return u}var a8=au("animationend"),l8=au("animationiteration"),c8=au("animationstart"),ree=au("transitionrun"),see=au("transitionstart"),oee=au("transitioncancel"),u8=au("transitionend"),d8=new Map,k2="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");k2.push("scrollEnd");function yo(u,h){d8.set(u,h),ru(h,[u])}var X0=typeof reportError=="function"?reportError:function(u){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var h=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof u=="object"&&u!==null&&typeof u.message=="string"?String(u.message):String(u),error:u});if(!window.dispatchEvent(h))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",u);return}console.error(u)},qs=[],$d=0,S2=0;function Q0(){for(var u=$d,h=S2=$d=0;h<u;){var b=qs[h];qs[h++]=null;var _=qs[h];qs[h++]=null;var k=qs[h];qs[h++]=null;var P=qs[h];if(qs[h++]=null,_!==null&&k!==null){var z=_.pending;z===null?k.next=k:(k.next=z.next,z.next=k),_.pending=k}P!==0&&f8(b,k,P)}}function Z0(u,h,b,_){qs[$d++]=u,qs[$d++]=h,qs[$d++]=b,qs[$d++]=_,S2|=_,u.lanes|=_,u=u.alternate,u!==null&&(u.lanes|=_)}function P2(u,h,b,_){return Z0(u,h,b,_),J0(u)}function lu(u,h){return Z0(u,null,null,h),J0(u)}function f8(u,h,b){u.lanes|=b;var _=u.alternate;_!==null&&(_.lanes|=b);for(var k=!1,P=u.return;P!==null;)P.childLanes|=b,_=P.alternate,_!==null&&(_.childLanes|=b),P.tag===22&&(u=P.stateNode,u===null||u._visibility&1||(k=!0)),u=P,P=P.return;return u.tag===3?(P=u.stateNode,k&&h!==null&&(k=31-Xe(b),u=P.hiddenUpdates,_=u[k],_===null?u[k]=[h]:_.push(h),h.lane=b|536870912),P):null}function J0(u){if(50<jm)throw jm=0,UC=null,Error(n(185));for(var h=u.return;h!==null;)u=h,h=u.return;return u.tag===3?u.stateNode:null}var Gd={};function aee(u,h,b,_){this.tag=u,this.key=b,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gs(u,h,b,_){return new aee(u,h,b,_)}function I2(u){return u=u.prototype,!(!u||!u.isReactComponent)}function Ha(u,h){var b=u.alternate;return b===null?(b=gs(u.tag,h,u.key,u.mode),b.elementType=u.elementType,b.type=u.type,b.stateNode=u.stateNode,b.alternate=u,u.alternate=b):(b.pendingProps=h,b.type=u.type,b.flags=0,b.subtreeFlags=0,b.deletions=null),b.flags=u.flags&65011712,b.childLanes=u.childLanes,b.lanes=u.lanes,b.child=u.child,b.memoizedProps=u.memoizedProps,b.memoizedState=u.memoizedState,b.updateQueue=u.updateQueue,h=u.dependencies,b.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},b.sibling=u.sibling,b.index=u.index,b.ref=u.ref,b.refCleanup=u.refCleanup,b}function h8(u,h){u.flags&=65011714;var b=u.alternate;return b===null?(u.childLanes=0,u.lanes=h,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=b.childLanes,u.lanes=b.lanes,u.child=b.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=b.memoizedProps,u.memoizedState=b.memoizedState,u.updateQueue=b.updateQueue,u.type=b.type,h=b.dependencies,u.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext}),u}function eb(u,h,b,_,k,P){var z=0;if(_=u,typeof u=="function")I2(u)&&(z=1);else if(typeof u=="string")z=fte(u,b,J.current)?26:u==="html"||u==="head"||u==="body"?27:5;else e:switch(u){case R:return u=gs(31,b,h,k),u.elementType=R,u.lanes=P,u;case y:return cu(b.children,k,P,h);case v:z=8,k|=24;break;case x:return u=gs(12,b,h,k|2),u.elementType=x,u.lanes=P,u;case T:return u=gs(13,b,h,k),u.elementType=T,u.lanes=P,u;case S:return u=gs(19,b,h,k),u.elementType=S,u.lanes=P,u;default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case D:z=10;break e;case C:z=9;break e;case E:z=11;break e;case A:z=14;break e;case I:z=16,_=null;break e}z=29,b=Error(n(130,u===null?"null":typeof u,"")),_=null}return h=gs(z,b,h,k),h.elementType=u,h.type=_,h.lanes=P,h}function cu(u,h,b,_){return u=gs(7,u,_,h),u.lanes=b,u}function R2(u,h,b){return u=gs(6,u,null,h),u.lanes=b,u}function m8(u){var h=gs(18,null,null,0);return h.stateNode=u,h}function F2(u,h,b){return h=gs(4,u.children!==null?u.children:[],u.key,h),h.lanes=b,h.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},h}var p8=new WeakMap;function $s(u,h){if(typeof u=="object"&&u!==null){var b=p8.get(u);return b!==void 0?b:(h={value:u,source:h,stack:Q(h)},p8.set(u,h),h)}return{value:u,source:h,stack:Q(h)}}var Yd=[],Kd=0,tb=null,wm=0,Gs=[],Ys=0,Yl=null,Xo=1,Qo="";function qa(u,h){Yd[Kd++]=wm,Yd[Kd++]=tb,tb=u,wm=h}function g8(u,h,b){Gs[Ys++]=Xo,Gs[Ys++]=Qo,Gs[Ys++]=Yl,Yl=u;var _=Xo;u=Qo;var k=32-Xe(_)-1;_&=~(1<<k),b+=1;var P=32-Xe(h)+k;if(30<P){var z=k-k%5;P=(_&(1<<z)-1).toString(32),_>>=z,k-=z,Xo=1<<32-Xe(h)+k|b<<k|_,Qo=P+u}else Xo=1<<P|b<<k|_,Qo=u}function O2(u){u.return!==null&&(qa(u,1),g8(u,1,0))}function N2(u){for(;u===tb;)tb=Yd[--Kd],Yd[Kd]=null,wm=Yd[--Kd],Yd[Kd]=null;for(;u===Yl;)Yl=Gs[--Ys],Gs[Ys]=null,Qo=Gs[--Ys],Gs[Ys]=null,Xo=Gs[--Ys],Gs[Ys]=null}function b8(u,h){Gs[Ys++]=Xo,Gs[Ys++]=Qo,Gs[Ys++]=Yl,Xo=h.id,Qo=h.overflow,Yl=u}var Yi=null,Ln=null,Gt=!1,Kl=null,Ks=!1,B2=Error(n(519));function Xl(u){var h=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xm($s(h,u)),B2}function y8(u){var h=u.stateNode,b=u.type,_=u.memoizedProps;switch(h[ei]=u,h[Ri]=_,b){case"dialog":Ut("cancel",h),Ut("close",h);break;case"iframe":case"object":case"embed":Ut("load",h);break;case"video":case"audio":for(b=0;b<Wm.length;b++)Ut(Wm[b],h);break;case"source":Ut("error",h);break;case"img":case"image":case"link":Ut("error",h),Ut("load",h);break;case"details":Ut("toggle",h);break;case"input":Ut("invalid",h),IP(h,_.value,_.defaultValue,_.checked,_.defaultChecked,_.type,_.name,!0);break;case"select":Ut("invalid",h);break;case"textarea":Ut("invalid",h),FP(h,_.value,_.defaultValue,_.children)}b=_.children,typeof b!="string"&&typeof b!="number"&&typeof b!="bigint"||h.textContent===""+b||_.suppressHydrationWarning===!0||N6(h.textContent,b)?(_.popover!=null&&(Ut("beforetoggle",h),Ut("toggle",h)),_.onScroll!=null&&Ut("scroll",h),_.onScrollEnd!=null&&Ut("scrollend",h),_.onClick!=null&&(h.onclick=za),h=!0):h=!1,h||Xl(u,!0)}function v8(u){for(Yi=u.return;Yi;)switch(Yi.tag){case 5:case 31:case 13:Ks=!1;return;case 27:case 3:Ks=!0;return;default:Yi=Yi.return}}function Xd(u){if(u!==Yi)return!1;if(!Gt)return v8(u),Gt=!0,!1;var h=u.tag,b;if((b=h!==3&&h!==27)&&((b=h===5)&&(b=u.type,b=!(b!=="form"&&b!=="button")||eD(u.type,u.memoizedProps)),b=!b),b&&Ln&&Xl(u),v8(u),h===13){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(n(317));Ln=H6(u)}else if(h===31){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(n(317));Ln=H6(u)}else h===27?(h=Ln,uc(u.type)?(u=sD,sD=null,Ln=u):Ln=h):Ln=Yi?Qs(u.stateNode.nextSibling):null;return!0}function uu(){Ln=Yi=null,Gt=!1}function M2(){var u=Kl;return u!==null&&(qr===null?qr=u:qr.push.apply(qr,u),Kl=null),u}function xm(u){Kl===null?Kl=[u]:Kl.push(u)}var L2=V(null),du=null,$a=null;function Ql(u,h,b){$(L2,h._currentValue),h._currentValue=b}function Ga(u){u._currentValue=L2.current,q(L2)}function U2(u,h,b){for(;u!==null;){var _=u.alternate;if((u.childLanes&h)!==h?(u.childLanes|=h,_!==null&&(_.childLanes|=h)):_!==null&&(_.childLanes&h)!==h&&(_.childLanes|=h),u===b)break;u=u.return}}function V2(u,h,b,_){var k=u.child;for(k!==null&&(k.return=u);k!==null;){var P=k.dependencies;if(P!==null){var z=k.child;P=P.firstContext;e:for(;P!==null;){var X=P;P=k;for(var de=0;de<h.length;de++)if(X.context===h[de]){P.lanes|=b,X=P.alternate,X!==null&&(X.lanes|=b),U2(P.return,b,u),_||(z=null);break e}P=X.next}}else if(k.tag===18){if(z=k.return,z===null)throw Error(n(341));z.lanes|=b,P=z.alternate,P!==null&&(P.lanes|=b),U2(z,b,u),z=null}else z=k.child;if(z!==null)z.return=k;else for(z=k;z!==null;){if(z===u){z=null;break}if(k=z.sibling,k!==null){k.return=z.return,z=k;break}z=z.return}k=z}}function Qd(u,h,b,_){u=null;for(var k=h,P=!1;k!==null;){if(!P){if((k.flags&524288)!==0)P=!0;else if((k.flags&262144)!==0)break}if(k.tag===10){var z=k.alternate;if(z===null)throw Error(n(387));if(z=z.memoizedProps,z!==null){var X=k.type;ps(k.pendingProps.value,z.value)||(u!==null?u.push(X):u=[X])}}else if(k===ge.current){if(z=k.alternate,z===null)throw Error(n(387));z.memoizedState.memoizedState!==k.memoizedState.memoizedState&&(u!==null?u.push(Ym):u=[Ym])}k=k.return}u!==null&&V2(h,u,b,_),h.flags|=262144}function nb(u){for(u=u.firstContext;u!==null;){if(!ps(u.context._currentValue,u.memoizedValue))return!0;u=u.next}return!1}function fu(u){du=u,$a=null,u=u.dependencies,u!==null&&(u.firstContext=null)}function Ki(u){return w8(du,u)}function ib(u,h){return du===null&&fu(u),w8(u,h)}function w8(u,h){var b=h._currentValue;if(h={context:h,memoizedValue:b,next:null},$a===null){if(u===null)throw Error(n(308));$a=h,u.dependencies={lanes:0,firstContext:h},u.flags|=524288}else $a=$a.next=h;return b}var lee=typeof AbortController<"u"?AbortController:function(){var u=[],h=this.signal={aborted:!1,addEventListener:function(b,_){u.push(_)}};this.abort=function(){h.aborted=!0,u.forEach(function(b){return b()})}},cee=i.unstable_scheduleCallback,uee=i.unstable_NormalPriority,wi={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function j2(){return{controller:new lee,data:new Map,refCount:0}}function _m(u){u.refCount--,u.refCount===0&&cee(uee,function(){u.controller.abort()})}var Cm=null,z2=0,Zd=0,Jd=null;function dee(u,h){if(Cm===null){var b=Cm=[];z2=0,Zd=qC(),Jd={status:"pending",value:void 0,then:function(_){b.push(_)}}}return z2++,h.then(x8,x8),h}function x8(){if(--z2===0&&Cm!==null){Jd!==null&&(Jd.status="fulfilled");var u=Cm;Cm=null,Zd=0,Jd=null;for(var h=0;h<u.length;h++)(0,u[h])()}}function fee(u,h){var b=[],_={status:"pending",value:null,reason:null,then:function(k){b.push(k)}};return u.then(function(){_.status="fulfilled",_.value=h;for(var k=0;k<b.length;k++)(0,b[k])(h)},function(k){for(_.status="rejected",_.reason=k,k=0;k<b.length;k++)(0,b[k])(void 0)}),_}var _8=L.S;L.S=function(u,h){s6=ae(),typeof h=="object"&&h!==null&&typeof h.then=="function"&&dee(u,h),_8!==null&&_8(u,h)};var hu=V(null);function W2(){var u=hu.current;return u!==null?u:Pn.pooledCache}function rb(u,h){h===null?$(hu,hu.current):$(hu,h.pool)}function C8(){var u=W2();return u===null?null:{parent:wi._currentValue,pool:u}}var ef=Error(n(460)),H2=Error(n(474)),sb=Error(n(542)),ob={then:function(){}};function D8(u){return u=u.status,u==="fulfilled"||u==="rejected"}function E8(u,h,b){switch(b=u[b],b===void 0?u.push(h):b!==h&&(h.then(za,za),h=b),h.status){case"fulfilled":return h.value;case"rejected":throw u=h.reason,A8(u),u;default:if(typeof h.status=="string")h.then(za,za);else{if(u=Pn,u!==null&&100<u.shellSuspendCounter)throw Error(n(482));u=h,u.status="pending",u.then(function(_){if(h.status==="pending"){var k=h;k.status="fulfilled",k.value=_}},function(_){if(h.status==="pending"){var k=h;k.status="rejected",k.reason=_}})}switch(h.status){case"fulfilled":return h.value;case"rejected":throw u=h.reason,A8(u),u}throw pu=h,ef}}function mu(u){try{var h=u._init;return h(u._payload)}catch(b){throw b!==null&&typeof b=="object"&&typeof b.then=="function"?(pu=b,ef):b}}var pu=null;function T8(){if(pu===null)throw Error(n(459));var u=pu;return pu=null,u}function A8(u){if(u===ef||u===sb)throw Error(n(483))}var tf=null,Dm=0;function ab(u){var h=Dm;return Dm+=1,tf===null&&(tf=[]),E8(tf,u,h)}function Em(u,h){h=h.props.ref,u.ref=h!==void 0?h:null}function lb(u,h){throw h.$$typeof===m?Error(n(525)):(u=Object.prototype.toString.call(h),Error(n(31,u==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":u)))}function k8(u){function h(ve,he){if(u){var _e=ve.deletions;_e===null?(ve.deletions=[he],ve.flags|=16):_e.push(he)}}function b(ve,he){if(!u)return null;for(;he!==null;)h(ve,he),he=he.sibling;return null}function _(ve){for(var he=new Map;ve!==null;)ve.key!==null?he.set(ve.key,ve):he.set(ve.index,ve),ve=ve.sibling;return he}function k(ve,he){return ve=Ha(ve,he),ve.index=0,ve.sibling=null,ve}function P(ve,he,_e){return ve.index=_e,u?(_e=ve.alternate,_e!==null?(_e=_e.index,_e<he?(ve.flags|=67108866,he):_e):(ve.flags|=67108866,he)):(ve.flags|=1048576,he)}function z(ve){return u&&ve.alternate===null&&(ve.flags|=67108866),ve}function X(ve,he,_e,Be){return he===null||he.tag!==6?(he=R2(_e,ve.mode,Be),he.return=ve,he):(he=k(he,_e),he.return=ve,he)}function de(ve,he,_e,Be){var mt=_e.type;return mt===y?Oe(ve,he,_e.props.children,Be,_e.key):he!==null&&(he.elementType===mt||typeof mt=="object"&&mt!==null&&mt.$$typeof===I&&mu(mt)===he.type)?(he=k(he,_e.props),Em(he,_e),he.return=ve,he):(he=eb(_e.type,_e.key,_e.props,null,ve.mode,Be),Em(he,_e),he.return=ve,he)}function Ce(ve,he,_e,Be){return he===null||he.tag!==4||he.stateNode.containerInfo!==_e.containerInfo||he.stateNode.implementation!==_e.implementation?(he=F2(_e,ve.mode,Be),he.return=ve,he):(he=k(he,_e.children||[]),he.return=ve,he)}function Oe(ve,he,_e,Be,mt){return he===null||he.tag!==7?(he=cu(_e,ve.mode,Be,mt),he.return=ve,he):(he=k(he,_e),he.return=ve,he)}function Me(ve,he,_e){if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return he=R2(""+he,ve.mode,_e),he.return=ve,he;if(typeof he=="object"&&he!==null){switch(he.$$typeof){case p:return _e=eb(he.type,he.key,he.props,null,ve.mode,_e),Em(_e,he),_e.return=ve,_e;case g:return he=F2(he,ve.mode,_e),he.return=ve,he;case I:return he=mu(he),Me(ve,he,_e)}
vendor: 5,645 bytes, line 8
8if(H(he)||B(he))return he=cu(he,ve.mode,_e,null),he.return=ve,he;if(typeof he.then=="function")return Me(ve,ab(he),_e);if(he.$$typeof===D)return Me(ve,ib(ve,he),_e);lb(ve,he)}return null}function Te(ve,he,_e,Be){var mt=he!==null?he.key:null;if(typeof _e=="string"&&_e!==""||typeof _e=="number"||typeof _e=="bigint")return mt!==null?null:X(ve,he,""+_e,Be);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case p:return _e.key===mt?de(ve,he,_e,Be):null;case g:return _e.key===mt?Ce(ve,he,_e,Be):null;case I:return _e=mu(_e),Te(ve,he,_e,Be)}if(H(_e)||B(_e))return mt!==null?null:Oe(ve,he,_e,Be,null);if(typeof _e.then=="function")return Te(ve,he,ab(_e),Be);if(_e.$$typeof===D)return Te(ve,he,ib(ve,_e),Be);lb(ve,_e)}return null}function Se(ve,he,_e,Be,mt){if(typeof Be=="string"&&Be!==""||typeof Be=="number"||typeof Be=="bigint")return ve=ve.get(_e)||null,X(he,ve,""+Be,mt);if(typeof Be=="object"&&Be!==null){switch(Be.$$typeof){case p:return ve=ve.get(Be.key===null?_e:Be.key)||null,de(he,ve,Be,mt);case g:return ve=ve.get(Be.key===null?_e:Be.key)||null,Ce(he,ve,Be,mt);case I:return Be=mu(Be),Se(ve,he,_e,Be,mt)}if(H(Be)||B(Be))return ve=ve.get(_e)||null,Oe(he,ve,Be,mt,null);if(typeof Be.then=="function")return Se(ve,he,_e,ab(Be),mt);if(Be.$$typeof===D)return Se(ve,he,_e,ib(he,Be),mt);lb(he,Be)}return null}function rt(ve,he,_e,Be){for(var mt=null,tn=null,lt=he,Ot=he=0,Wt=null;lt!==null&&Ot<_e.length;Ot++){lt.index>Ot?(Wt=lt,lt=null):Wt=lt.sibling;var nn=Te(ve,lt,_e[Ot],Be);if(nn===null){lt===null&&(lt=Wt);break}u&&lt&&nn.alternate===null&&h(ve,lt),he=P(nn,he,Ot),tn===null?mt=nn:tn.sibling=nn,tn=nn,lt=Wt}if(Ot===_e.length)return b(ve,lt),Gt&&qa(ve,Ot),mt;if(lt===null){for(;Ot<_e.length;Ot++)lt=Me(ve,_e[Ot],Be),lt!==null&&(he=P(lt,he,Ot),tn===null?mt=lt:tn.sibling=lt,tn=lt);return Gt&&qa(ve,Ot),mt}for(lt=_(lt);Ot<_e.length;Ot++)Wt=Se(lt,ve,Ot,_e[Ot],Be),Wt!==null&&(u&&Wt.alternate!==null&&lt.delete(Wt.key===null?Ot:Wt.key),he=P(Wt,he,Ot),tn===null?mt=Wt:tn.sibling=Wt,tn=Wt);return u&&lt.forEach(function(pc){return h(ve,pc)}),Gt&&qa(ve,Ot),mt}function yt(ve,he,_e,Be){if(_e==null)throw Error(n(151));for(var mt=null,tn=null,lt=he,Ot=he=0,Wt=null,nn=_e.next();lt!==null&&!nn.done;Ot++,nn=_e.next()){lt.index>Ot?(Wt=lt,lt=null):Wt=lt.sibling;var pc=Te(ve,lt,nn.value,Be);if(pc===null){lt===null&&(lt=Wt);break}u&&lt&&pc.alternate===null&&h(ve,lt),he=P(pc,he,Ot),tn===null?mt=pc:tn.sibling=pc,tn=pc,lt=Wt}if(nn.done)return b(ve,lt),Gt&&qa(ve,Ot),mt;if(lt===null){for(;!nn.done;Ot++,nn=_e.next())nn=Me(ve,nn.value,Be),nn!==null&&(he=P(nn,he,Ot),tn===null?mt=nn:tn.sibling=nn,tn=nn);return Gt&&qa(ve,Ot),mt}for(lt=_(lt);!nn.done;Ot++,nn=_e.next())nn=Se(lt,ve,Ot,nn.value,Be),nn!==null&&(u&&nn.alternate!==null&&lt.delete(nn.key===null?Ot:nn.key),he=P(nn,he,Ot),tn===null?mt=nn:tn.sibling=nn,tn=nn);return u&&lt.forEach(function(Cte){return h(ve,Cte)}),Gt&&qa(ve,Ot),mt}function Tn(ve,he,_e,Be){if(typeof _e=="object"&&_e!==null&&_e.type===y&&_e.key===null&&(_e=_e.props.children),typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case p:e:{for(var mt=_e.key;he!==null;){if(he.key===mt){if(mt=_e.type,mt===y){if(he.tag===7){b(ve,he.sibling),Be=k(he,_e.props.children),Be.return=ve,ve=Be;break e}}else if(he.elementType===mt||typeof mt=="object"&&mt!==null&&mt.$$typeof===I&&mu(mt)===he.type){b(ve,he.sibling),Be=k(he,_e.props),Em(Be,_e),Be.return=ve,ve=Be;break e}b(ve,he);break}else h(ve,he);he=he.sibling}_e.type===y?(Be=cu(_e.props.children,ve.mode,Be,_e.key),Be.return=ve,ve=Be):(Be=eb(_e.type,_e.key,_e.props,null,ve.mode,Be),Em(Be,_e),Be.return=ve,ve=Be)}return z(ve);case g:e:{for(mt=_e.key;he!==null;){if(he.key===mt)if(he.tag===4&&he.stateNode.containerInfo===_e.containerInfo&&he.stateNode.implementation===_e.implementation){b(ve,he.sibling),Be=k(he,_e.children||[]),Be.return=ve,ve=Be;break e}else{b(ve,he);break}else h(ve,he);he=he.sibling}Be=F2(_e,ve.mode,Be),Be.return=ve,ve=Be}return z(ve);case I:return _e=mu(_e),Tn(ve,he,_e,Be)}if(H(_e))return rt(ve,he,_e,Be);if(B(_e)){if(mt=B(_e),typeof mt!="function")throw Error(n(150));return _e=mt.call(_e),yt(ve,he,_e,Be)}if(typeof _e.then=="function")return Tn(ve,he,ab(_e),Be);if(_e.$$typeof===D)return Tn(ve,he,ib(ve,_e),Be);lb(ve,_e)}return typeof _e=="string"&&_e!==""||typeof _e=="number"||typeof _e=="bigint"?(_e=""+_e,he!==null&&he.tag===6?(b(ve,he.sibling),Be=k(he,_e),Be.return=ve,ve=Be):(b(ve,he),Be=R2(_e,ve.mode,Be),Be.return=ve,ve=Be),z(ve)):b(ve,he)}return function(ve,he,_e,Be){try{Dm=0;var mt=Tn(ve,he,_e,Be);return tf=null,mt}catch(lt){if(lt===ef||lt===sb)throw lt;var tn=gs(29,lt,null,ve.mode);return tn.lanes=Be,tn.return=ve,tn}}}var gu=k8(!0),S8=k8(!1),Zl=!1;function q2(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $2(u,h){u=u.updateQueue,h.updateQueue===u&&(h.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,callbacks:null})}function Jl(u){return{lane:u,tag:0,payload:null,callback:null,next:null}}function ec(u,h,b){var _=u.updateQueue;if(_===null)return null;if(_=_.shared,(on&2)!==0){var k=_.pending;return k===null?h.next=h:(h.next=k.next,k.next=h),_.pending=h,h=J0(u),f8(u,null,b),h}return Z0(u,_,h,b),J0(u)}function Tm(u,h,b){if(h=h.updateQueue,h!==null&&(h=h.shared,(b&4194048)!==0)){var _=h.lanes;_&=u.pendingLanes,b|=_,h.lanes=b,Ft(u,b)}}function G2(u,h){var b=u.updateQueue,_=u.alternate;if(_!==null&&(_=_.updateQueue,b===_)){var k=null,P=null;if(b=b.firstBaseUpdate,b!==null){do{var z={lane:b.lane,tag:b.tag,payload:b.payload,callback:null,next:null};
vendor: 8,142 bytes, line 8
8P===null?k=P=z:P=P.next=z,b=b.next}while(b!==null);P===null?k=P=h:P=P.next=h}else k=P=h;b={baseState:_.baseState,firstBaseUpdate:k,lastBaseUpdate:P,shared:_.shared,callbacks:_.callbacks},u.updateQueue=b;return}u=b.lastBaseUpdate,u===null?b.firstBaseUpdate=h:u.next=h,b.lastBaseUpdate=h}var Y2=!1;function Am(){if(Y2){var u=Jd;if(u!==null)throw u}}function km(u,h,b,_){Y2=!1;var k=u.updateQueue;Zl=!1;var P=k.firstBaseUpdate,z=k.lastBaseUpdate,X=k.shared.pending;if(X!==null){k.shared.pending=null;var de=X,Ce=de.next;de.next=null,z===null?P=Ce:z.next=Ce,z=de;var Oe=u.alternate;Oe!==null&&(Oe=Oe.updateQueue,X=Oe.lastBaseUpdate,X!==z&&(X===null?Oe.firstBaseUpdate=Ce:X.next=Ce,Oe.lastBaseUpdate=de))}if(P!==null){var Me=k.baseState;z=0,Oe=Ce=de=null,X=P;do{var Te=X.lane&-536870913,Se=Te!==X.lane;if(Se?(zt&Te)===Te:(_&Te)===Te){Te!==0&&Te===Zd&&(Y2=!0),Oe!==null&&(Oe=Oe.next={lane:0,tag:X.tag,payload:X.payload,callback:null,next:null});e:{var rt=u,yt=X;Te=h;var Tn=b;switch(yt.tag){case 1:if(rt=yt.payload,typeof rt=="function"){Me=rt.call(Tn,Me,Te);break e}Me=rt;break e;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=yt.payload,Te=typeof rt=="function"?rt.call(Tn,Me,Te):rt,Te==null)break e;Me=f({},Me,Te);break e;case 2:Zl=!0}}Te=X.callback,Te!==null&&(u.flags|=64,Se&&(u.flags|=8192),Se=k.callbacks,Se===null?k.callbacks=[Te]:Se.push(Te))}else Se={lane:Te,tag:X.tag,payload:X.payload,callback:X.callback,next:null},Oe===null?(Ce=Oe=Se,de=Me):Oe=Oe.next=Se,z|=Te;if(X=X.next,X===null){if(X=k.shared.pending,X===null)break;Se=X,X=Se.next,Se.next=null,k.lastBaseUpdate=Se,k.shared.pending=null}}while(!0);Oe===null&&(de=Me),k.baseState=de,k.firstBaseUpdate=Ce,k.lastBaseUpdate=Oe,P===null&&(k.shared.lanes=0),sc|=z,u.lanes=z,u.memoizedState=Me}}function P8(u,h){if(typeof u!="function")throw Error(n(191,u));u.call(h)}function I8(u,h){var b=u.callbacks;if(b!==null)for(u.callbacks=null,u=0;u<b.length;u++)P8(b[u],h)}var nf=V(null),cb=V(0);function R8(u,h){u=nl,$(cb,u),$(nf,h),nl=u|h.baseLanes}function K2(){$(cb,nl),$(nf,nf.current)}function X2(){nl=cb.current,q(nf),q(cb)}var bs=V(null),Xs=null;function tc(u){var h=u.alternate;$(li,li.current&1),$(bs,u),Xs===null&&(h===null||nf.current!==null||h.memoizedState!==null)&&(Xs=u)}function Q2(u){$(li,li.current),$(bs,u),Xs===null&&(Xs=u)}function F8(u){u.tag===22?($(li,li.current),$(bs,u),Xs===null&&(Xs=u)):nc()}function nc(){$(li,li.current),$(bs,bs.current)}function ys(u){q(bs),Xs===u&&(Xs=null),q(li)}var li=V(0);function ub(u){for(var h=u;h!==null;){if(h.tag===13){var b=h.memoizedState;if(b!==null&&(b=b.dehydrated,b===null||iD(b)||rD(b)))return h}else if(h.tag===19&&(h.memoizedProps.revealOrder==="forwards"||h.memoizedProps.revealOrder==="backwards"||h.memoizedProps.revealOrder==="unstable_legacy-backwards"||h.memoizedProps.revealOrder==="together")){if((h.flags&128)!==0)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===u)break;for(;h.sibling===null;){if(h.return===null||h.return===u)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var Ya=0,St=null,Dn=null,xi=null,db=!1,rf=!1,bu=!1,fb=0,Sm=0,sf=null,hee=0;function ti(){throw Error(n(321))}function Z2(u,h){if(h===null)return!1;for(var b=0;b<h.length&&b<u.length;b++)if(!ps(u[b],h[b]))return!1;return!0}function J2(u,h,b,_,k,P){return Ya=P,St=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,L.H=u===null||u.memoizedState===null?gI:mC,bu=!1,P=b(_,k),bu=!1,rf&&(P=N8(h,b,_,k)),O8(u),P}function O8(u){L.H=Rm;var h=Dn!==null&&Dn.next!==null;if(Ya=0,xi=Dn=St=null,db=!1,Sm=0,sf=null,h)throw Error(n(300));u===null||_i||(u=u.dependencies,u!==null&&nb(u)&&(_i=!0))}function N8(u,h,b,_){St=u;var k=0;do{if(rf&&(sf=null),Sm=0,rf=!1,25<=k)throw Error(n(301));if(k+=1,xi=Dn=null,u.updateQueue!=null){var P=u.updateQueue;P.lastEffect=null,P.events=null,P.stores=null,P.memoCache!=null&&(P.memoCache.index=0)}L.H=bI,P=h(b,_)}while(rf);return P}function mee(){var u=L.H,h=u.useState()[0];return h=typeof h.then=="function"?Pm(h):h,u=u.useState()[0],(Dn!==null?Dn.memoizedState:null)!==u&&(St.flags|=1024),h}function eC(){var u=fb!==0;return fb=0,u}function tC(u,h,b){h.updateQueue=u.updateQueue,h.flags&=-2053,u.lanes&=~b}function nC(u){if(db){for(u=u.memoizedState;u!==null;){var h=u.queue;h!==null&&(h.pending=null),u=u.next}db=!1}Ya=0,xi=Dn=St=null,rf=!1,Sm=fb=0,sf=null}function Cr(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xi===null?St.memoizedState=xi=u:xi=xi.next=u,xi}function ci(){if(Dn===null){var u=St.alternate;u=u!==null?u.memoizedState:null}else u=Dn.next;var h=xi===null?St.memoizedState:xi.next;if(h!==null)xi=h,Dn=u;else{if(u===null)throw St.alternate===null?Error(n(467)):Error(n(310));Dn=u,u={memoizedState:Dn.memoizedState,baseState:Dn.baseState,baseQueue:Dn.baseQueue,queue:Dn.queue,next:null},xi===null?St.memoizedState=xi=u:xi=xi.next=u}return xi}function hb(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pm(u){var h=Sm;return Sm+=1,sf===null&&(sf=[]),u=E8(sf,u,h),h=St,(xi===null?h.memoizedState:xi.next)===null&&(h=h.alternate,L.H=h===null||h.memoizedState===null?gI:mC),u}function mb(u){if(u!==null&&typeof u=="object"){if(typeof u.then=="function")return Pm(u);if(u.$$typeof===D)return Ki(u)}throw Error(n(438,String(u)))}function iC(u){var h=null,b=St.updateQueue;if(b!==null&&(h=b.memoCache),h==null){var _=St.alternate;_!==null&&(_=_.updateQueue,_!==null&&(_=_.memoCache,_!=null&&(h={data:_.data.map(function(k){return k.slice()}),index:0})))}if(h==null&&(h={data:[],index:0}),b===null&&(b=hb(),St.updateQueue=b),b.memoCache=h,b=h.data[h.index],b===void 0)for(b=h.data[h.index]=Array(u),_=0;_<u;_++)b[_]=O;return h.index++,b}function Ka(u,h){return typeof h=="function"?h(u):h}function pb(u){var h=ci();return rC(h,Dn,u)}function rC(u,h,b){var _=u.queue;if(_===null)throw Error(n(311));_.lastRenderedReducer=b;var k=u.baseQueue,P=_.pending;if(P!==null){if(k!==null){var z=k.next;k.next=P.next,P.next=z}h.baseQueue=k=P,_.pending=null}if(P=u.baseState,k===null)u.memoizedState=P;else{h=k.next;var X=z=null,de=null,Ce=h,Oe=!1;do{var Me=Ce.lane&-536870913;if(Me!==Ce.lane?(zt&Me)===Me:(Ya&Me)===Me){var Te=Ce.revertLane;if(Te===0)de!==null&&(de=de.next={lane:0,revertLane:0,gesture:null,action:Ce.action,hasEagerState:Ce.hasEagerState,eagerState:Ce.eagerState,next:null}),Me===Zd&&(Oe=!0);else if((Ya&Te)===Te){Ce=Ce.next,Te===Zd&&(Oe=!0);continue}else Me={lane:0,revertLane:Ce.revertLane,gesture:null,action:Ce.action,hasEagerState:Ce.hasEagerState,eagerState:Ce.eagerState,next:null},de===null?(X=de=Me,z=P):de=de.next=Me,St.lanes|=Te,sc|=Te;Me=Ce.action,bu&&b(P,Me),P=Ce.hasEagerState?Ce.eagerState:b(P,Me)}else Te={lane:Me,revertLane:Ce.revertLane,gesture:Ce.gesture,action:Ce.action,hasEagerState:Ce.hasEagerState,eagerState:Ce.eagerState,next:null},de===null?(X=de=Te,z=P):de=de.next=Te,St.lanes|=Me,sc|=Me;Ce=Ce.next}while(Ce!==null&&Ce!==h);if(de===null?z=P:de.next=X,!ps(P,u.memoizedState)&&(_i=!0,Oe&&(b=Jd,b!==null)))throw b;u.memoizedState=P,u.baseState=z,u.baseQueue=de,_.lastRenderedState=P}return k===null&&(_.lanes=0),[u.memoizedState,_.dispatch]}function sC(u){var h=ci(),b=h.queue;if(b===null)throw Error(n(311));b.lastRenderedReducer=u;var _=b.dispatch,k=b.pending,P=h.memoizedState;if(k!==null){b.pending=null;var z=k=k.next;do P=u(P,z.action),z=z.next;while(z!==k);ps(P,h.memoizedState)||(_i=!0),h.memoizedState=P,h.baseQueue===null&&(h.baseState=P),b.lastRenderedState=P}return[P,_]}function B8(u,h,b){var _=St,k=ci(),P=Gt;if(P){if(b===void 0)throw Error(n(407));b=b()}else b=h();var z=!ps((Dn||k).memoizedState,b);if(z&&(k.memoizedState=b,_i=!0),k=k.queue,lC(U8.bind(null,_,k,u),[u]),k.getSnapshot!==h||z||xi!==null&&xi.memoizedState.tag&1){if(_.flags|=2048,of(9,{destroy:void 0},L8.bind(null,_,k,b,h),null),Pn===null)throw Error(n(349));P||(Ya&127)!==0||M8(_,h,b)}return b}function M8(u,h,b){u.flags|=16384,u={getSnapshot:h,value:b},h=St.updateQueue,h===null?(h=hb(),St.updateQueue=h,h.stores=[u]):(b=h.stores,b===null?h.stores=[u]:b.push(u))}function L8(u,h,b,_){h.value=b,h.getSnapshot=_,V8(h)&&j8(u)}function U8(u,h,b){return b(function(){V8(h)&&j8(u)}
vendor: 2,676 bytes, line 8
8)}function V8(u){var h=u.getSnapshot;u=u.value;try{var b=h();return!ps(u,b)}catch{return!0}}function j8(u){var h=lu(u,2);h!==null&&$r(h,u,2)}function oC(u){var h=Cr();if(typeof u=="function"){var b=u;if(u=b(),bu){qe(!0);try{b()}finally{qe(!1)}}}return h.memoizedState=h.baseState=u,h.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:u},h}function z8(u,h,b,_){return u.baseState=b,rC(u,Dn,typeof _=="function"?_:Ka)}function pee(u,h,b,_,k){if(yb(u))throw Error(n(485));if(u=h.action,u!==null){var P={payload:k,action:u,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(z){P.listeners.push(z)}};L.T!==null?b(!0):P.isTransition=!1,_(P),b=h.pending,b===null?(P.next=h.pending=P,W8(h,P)):(P.next=b.next,h.pending=b.next=P)}}function W8(u,h){var b=h.action,_=h.payload,k=u.state;if(h.isTransition){var P=L.T,z={};L.T=z;try{var X=b(k,_),de=L.S;de!==null&&de(z,X),H8(u,h,X)}catch(Ce){aC(u,h,Ce)}finally{P!==null&&z.types!==null&&(P.types=z.types),L.T=P}}else try{P=b(k,_),H8(u,h,P)}catch(Ce){aC(u,h,Ce)}}function H8(u,h,b){b!==null&&typeof b=="object"&&typeof b.then=="function"?b.then(function(_){q8(u,h,_)},function(_){return aC(u,h,_)}):q8(u,h,b)}function q8(u,h,b){h.status="fulfilled",h.value=b,$8(h),u.state=b,h=u.pending,h!==null&&(b=h.next,b===h?u.pending=null:(b=b.next,h.next=b,W8(u,b)))}function aC(u,h,b){var _=u.pending;if(u.pending=null,_!==null){_=_.next;do h.status="rejected",h.reason=b,$8(h),h=h.next;while(h!==_)}u.action=null}function $8(u){u=u.listeners;for(var h=0;h<u.length;h++)(0,u[h])()}function G8(u,h){return h}function Y8(u,h){if(Gt){var b=Pn.formState;if(b!==null){e:{var _=St;if(Gt){if(Ln){t:{for(var k=Ln,P=Ks;k.nodeType!==8;){if(!P){k=null;break t}if(k=Qs(k.nextSibling),k===null){k=null;break t}}P=k.data,k=P==="F!"||P==="F"?k:null}if(k){Ln=Qs(k.nextSibling),_=k.data==="F!";break e}}Xl(_)}_=!1}_&&(h=b[0])}}return b=Cr(),b.memoizedState=b.baseState=h,_={pending:null,lanes:0,dispatch:null,lastRenderedReducer:G8,lastRenderedState:h},b.queue=_,b=hI.bind(null,St,_),_.dispatch=b,_=oC(!1),P=hC.bind(null,St,!1,_.queue),_=Cr(),k={state:h,dispatch:null,action:u,pending:null},_.queue=k,b=pee.bind(null,St,k,P,b),k.dispatch=b,_.memoizedState=u,[h,b,!1]}function K8(u){var h=ci();return X8(h,Dn,u)}function X8(u,h,b){if(h=rC(u,h,G8)[0],u=pb(Ka)[0],typeof h=="object"&&h!==null&&typeof h.then=="function")try{var _=Pm(h)}catch(z){throw z===ef?sb:z}else _=h;h=ci();var k=h.queue,P=k.dispatch;return b!==h.memoizedState&&(St.flags|=2048,of(9,{destroy:void 0},gee.bind(null,k,b),null)),[_,P,u]}function gee(u,h){u.action=h}function Q8(u){var h=ci(),b=Dn;if(b!==null)return X8(h,b,u);
vendor: 4,610 bytes, line 8
8ci(),h=h.memoizedState,b=ci();var _=b.queue.dispatch;return b.memoizedState=u,[h,_,!1]}function of(u,h,b,_){return u={tag:u,create:b,deps:_,inst:h,next:null},h=St.updateQueue,h===null&&(h=hb(),St.updateQueue=h),b=h.lastEffect,b===null?h.lastEffect=u.next=u:(_=b.next,b.next=u,u.next=_,h.lastEffect=u),u}function Z8(){return ci().memoizedState}function gb(u,h,b,_){var k=Cr();St.flags|=u,k.memoizedState=of(1|h,{destroy:void 0},b,_===void 0?null:_)}function bb(u,h,b,_){var k=ci();_=_===void 0?null:_;var P=k.memoizedState.inst;Dn!==null&&_!==null&&Z2(_,Dn.memoizedState.deps)?k.memoizedState=of(h,P,b,_):(St.flags|=u,k.memoizedState=of(1|h,P,b,_))}function J8(u,h){gb(8390656,8,u,h)}function lC(u,h){bb(2048,8,u,h)}function bee(u){St.flags|=4;var h=St.updateQueue;if(h===null)h=hb(),St.updateQueue=h,h.events=[u];else{var b=h.events;b===null?h.events=[u]:b.push(u)}}function eI(u){var h=ci().memoizedState;return bee({ref:h,nextImpl:u}),function(){if((on&2)!==0)throw Error(n(440));return h.impl.apply(void 0,arguments)}}function tI(u,h){return bb(4,2,u,h)}function nI(u,h){return bb(4,4,u,h)}function iI(u,h){if(typeof h=="function"){u=u();var b=h(u);return function(){typeof b=="function"?b():h(null)}}if(h!=null)return u=u(),h.current=u,function(){h.current=null}}function rI(u,h,b){b=b!=null?b.concat([u]):null,bb(4,4,iI.bind(null,h,u),b)}function cC(){}function sI(u,h){var b=ci();h=h===void 0?null:h;var _=b.memoizedState;return h!==null&&Z2(h,_[1])?_[0]:(b.memoizedState=[u,h],u)}function oI(u,h){var b=ci();h=h===void 0?null:h;var _=b.memoizedState;if(h!==null&&Z2(h,_[1]))return _[0];if(_=u(),bu){qe(!0);try{u()}finally{qe(!1)}}return b.memoizedState=[_,h],_}function uC(u,h,b){return b===void 0||(Ya&1073741824)!==0&&(zt&261930)===0?u.memoizedState=h:(u.memoizedState=b,u=a6(),St.lanes|=u,sc|=u,b)}function aI(u,h,b,_){return ps(b,h)?b:nf.current!==null?(u=uC(u,b,_),ps(u,h)||(_i=!0),u):(Ya&42)===0||(Ya&1073741824)!==0&&(zt&261930)===0?(_i=!0,u.memoizedState=b):(u=a6(),St.lanes|=u,sc|=u,h)}function lI(u,h,b,_,k){var P=W.p;W.p=P!==0&&8>P?P:8;var z=L.T,X={};L.T=X,hC(u,!1,h,b);try{var de=k(),Ce=L.S;if(Ce!==null&&Ce(X,de),de!==null&&typeof de=="object"&&typeof de.then=="function"){var Oe=fee(de,_);Im(u,h,Oe,xs(u))}else Im(u,h,_,xs(u))}catch(Me){Im(u,h,{then:function(){},status:"rejected",reason:Me},xs())}finally{W.p=P,z!==null&&X.types!==null&&(z.types=X.types),L.T=z}}function yee(){}function dC(u,h,b,_){if(u.tag!==5)throw Error(n(476));var k=cI(u).queue;lI(u,k,h,G,b===null?yee:function(){return uI(u),b(_)})}function cI(u){var h=u.memoizedState;if(h!==null)return h;h={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:G},next:null};var b={};return h.next={memoizedState:b,baseState:b,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:b},next:null},u.memoizedState=h,u=u.alternate,u!==null&&(u.memoizedState=h),h}function uI(u){var h=cI(u);h.next===null&&(h=u.alternate.memoizedState),Im(u,h.next.queue,{},xs())}function fC(){return Ki(Ym)}function dI(){return ci().memoizedState}function fI(){return ci().memoizedState}function vee(u){for(var h=u.return;h!==null;){switch(h.tag){case 24:case 3:var b=xs();u=Jl(b);var _=ec(h,u,b);_!==null&&($r(_,h,b),Tm(_,h,b)),h={cache:j2()},u.payload=h;return}h=h.return}}function wee(u,h,b){var _=xs();b={lane:_,revertLane:0,gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null},yb(u)?mI(h,b):(b=P2(u,h,b,_),b!==null&&($r(b,u,_),pI(b,h,_)))}function hI(u,h,b){var _=xs();Im(u,h,b,_)}function Im(u,h,b,_){var k={lane:_,revertLane:0,gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null};if(yb(u))mI(h,k);else{var P=u.alternate;if(u.lanes===0&&(P===null||P.lanes===0)&&(P=h.lastRenderedReducer,P!==null))try{var z=h.lastRenderedState,X=P(z,b);if(k.hasEagerState=!0,k.eagerState=X,ps(X,z))return Z0(u,h,k,0),Pn===null&&Q0(),!1}catch{}if(b=P2(u,h,k,_),b!==null)return $r(b,u,_),pI(b,h,_),!0}return!1}function hC(u,h,b,_){if(_={lane:2,revertLane:qC(),gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null},yb(u)){if(h)throw Error(n(479))}else h=P2(u,b,_,2),h!==null&&$r(h,u,2)}function yb(u){var h=u.alternate;return u===St||h!==null&&h===St}function mI(u,h){rf=db=!0;var b=u.pending;b===null?h.next=h:(h.next=b.next,b.next=h),u.pending=h}function pI(u,h,b){if((b&4194048)!==0){var _=h.lanes;_&=u.pendingLanes,b|=_,h.lanes=b,Ft(u,b)}}var Rm={readContext:Ki,use:mb,useCallback:ti,useContext:ti,useEffect:ti,useImperativeHandle:ti,useLayoutEffect:ti,useInsertionEffect:ti,useMemo:ti,useReducer:ti,useRef
vendor: 7,964 bytes, line 8
8:ti,useState:ti,useDebugValue:ti,useDeferredValue:ti,useTransition:ti,useSyncExternalStore:ti,useId:ti,useHostTransitionStatus:ti,useFormState:ti,useActionState:ti,useOptimistic:ti,useMemoCache:ti,useCacheRefresh:ti};Rm.useEffectEvent=ti;var gI={readContext:Ki,use:mb,useCallback:function(u,h){return Cr().memoizedState=[u,h===void 0?null:h],u},useContext:Ki,useEffect:J8,useImperativeHandle:function(u,h,b){b=b!=null?b.concat([u]):null,gb(4194308,4,iI.bind(null,h,u),b)},useLayoutEffect:function(u,h){return gb(4194308,4,u,h)},useInsertionEffect:function(u,h){gb(4,2,u,h)},useMemo:function(u,h){var b=Cr();h=h===void 0?null:h;var _=u();if(bu){qe(!0);try{u()}finally{qe(!1)}}return b.memoizedState=[_,h],_},useReducer:function(u,h,b){var _=Cr();if(b!==void 0){var k=b(h);if(bu){qe(!0);try{b(h)}finally{qe(!1)}}}else k=h;return _.memoizedState=_.baseState=k,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:k},_.queue=u,u=u.dispatch=wee.bind(null,St,u),[_.memoizedState,u]},useRef:function(u){var h=Cr();return u={current:u},h.memoizedState=u},useState:function(u){u=oC(u);var h=u.queue,b=hI.bind(null,St,h);return h.dispatch=b,[u.memoizedState,b]},useDebugValue:cC,useDeferredValue:function(u,h){var b=Cr();return uC(b,u,h)},useTransition:function(){var u=oC(!1);return u=lI.bind(null,St,u.queue,!0,!1),Cr().memoizedState=u,[!1,u]},useSyncExternalStore:function(u,h,b){var _=St,k=Cr();if(Gt){if(b===void 0)throw Error(n(407));b=b()}else{if(b=h(),Pn===null)throw Error(n(349));(zt&127)!==0||M8(_,h,b)}k.memoizedState=b;var P={value:b,getSnapshot:h};return k.queue=P,J8(U8.bind(null,_,P,u),[u]),_.flags|=2048,of(9,{destroy:void 0},L8.bind(null,_,P,b,h),null),b},useId:function(){var u=Cr(),h=Pn.identifierPrefix;if(Gt){var b=Qo,_=Xo;b=(_&~(1<<32-Xe(_)-1)).toString(32)+b,h="_"+h+"R_"+b,b=fb++,0<b&&(h+="H"+b.toString(32)),h+="_"}else b=hee++,h="_"+h+"r_"+b.toString(32)+"_";return u.memoizedState=h},useHostTransitionStatus:fC,useFormState:Y8,useActionState:Y8,useOptimistic:function(u){var h=Cr();h.memoizedState=h.baseState=u;var b={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return h.queue=b,h=hC.bind(null,St,!0,b),b.dispatch=h,[u,h]},useMemoCache:iC,useCacheRefresh:function(){return Cr().memoizedState=vee.bind(null,St)},useEffectEvent:function(u){var h=Cr(),b={impl:u};return h.memoizedState=b,function(){if((on&2)!==0)throw Error(n(440));return b.impl.apply(void 0,arguments)}}},mC={readContext:Ki,use:mb,useCallback:sI,useContext:Ki,useEffect:lC,useImperativeHandle:rI,useInsertionEffect:tI,useLayoutEffect:nI,useMemo:oI,useReducer:pb,useRef:Z8,useState:function(){return pb(Ka)},useDebugValue:cC,useDeferredValue:function(u,h){var b=ci();return aI(b,Dn.memoizedState,u,h)},useTransition:function(){var u=pb(Ka)[0],h=ci().memoizedState;return[typeof u=="boolean"?u:Pm(u),h]},useSyncExternalStore:B8,useId:dI,useHostTransitionStatus:fC,useFormState:K8,useActionState:K8,useOptimistic:function(u,h){var b=ci();return z8(b,Dn,u,h)},useMemoCache:iC,useCacheRefresh:fI};mC.useEffectEvent=eI;var bI={readContext:Ki,use:mb,useCallback:sI,useContext:Ki,useEffect:lC,useImperativeHandle:rI,useInsertionEffect:tI,useLayoutEffect:nI,useMemo:oI,useReducer:sC,useRef:Z8,useState:function(){return sC(Ka)},useDebugValue:cC,useDeferredValue:function(u,h){var b=ci();return Dn===null?uC(b,u,h):aI(b,Dn.memoizedState,u,h)},useTransition:function(){var u=sC(Ka)[0],h=ci().memoizedState;return[typeof u=="boolean"?u:Pm(u),h]},useSyncExternalStore:B8,useId:dI,useHostTransitionStatus:fC,useFormState:Q8,useActionState:Q8,useOptimistic:function(u,h){var b=ci();return Dn!==null?z8(b,Dn,u,h):(b.baseState=u,[u,b.queue.dispatch])},useMemoCache:iC,useCacheRefresh:fI};bI.useEffectEvent=eI;function pC(u,h,b,_){h=u.memoizedState,b=b(_,h),b=b==null?h:f({},h,b),u.memoizedState=b,u.lanes===0&&(u.updateQueue.baseState=b)}var gC={enqueueSetState:function(u,h,b){u=u._reactInternals;var _=xs(),k=Jl(_);k.payload=h,b!=null&&(k.callback=b),h=ec(u,k,_),h!==null&&($r(h,u,_),Tm(h,u,_))},enqueueReplaceState:function(u,h,b){u=u._reactInternals;var _=xs(),k=Jl(_);k.tag=1,k.payload=h,b!=null&&(k.callback=b),h=ec(u,k,_),h!==null&&($r(h,u,_),Tm(h,u,_))},enqueueForceUpdate:function(u,h){u=u._reactInternals;var b=xs(),_=Jl(b);_.tag=2,h!=null&&(_.callback=h),h=ec(u,_,b),h!==null&&($r(h,u,b),Tm(h,u,b))}};function yI(u,h,b,_,k,P,z){return u=u.stateNode,typeof u.shouldComponentUpdate=="function"?u.shouldComponentUpdate(_,P,z):h.prototype&&h.prototype.isPureReactComponent?!ym(b,_)||!ym(k,P):!0}function vI(u,h,b,_){u=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(b,_),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(b,_),h.state!==u&&gC.enqueueReplaceState(h,h.state,null)}function yu(u,h){var b=h;if("ref"in h){b={};for(var _ in h)_!=="ref"&&(b[_]=h[_])}if(u=u.defaultProps){b===h&&(b=f({},b));for(var k in u)b[k]===void 0&&(b[k]=u[k])}return b}function wI(u){X0(u)}function xI(u){console.error(u)}function _I(u){X0(u)}function vb(u,h){try{var b=u.onUncaughtError;b(h.value,{componentStack:h.stack})}catch(_){setTimeout(function(){throw _})}}function CI(u,h,b){try{var _=u.onCaughtError;_(b.value,{componentStack:b.stack,errorBoundary:h.tag===1?h.stateNode:null})}catch(k){setTimeout(function(){throw k})}}function bC(u,h,b){return b=Jl(b),b.tag=3,b.payload={element:null},b.callback=function(){vb(u,h)},b}function DI(u){return u=Jl(u),u.tag=3,u}function EI(u,h,b,_){var k=b.type.getDerivedStateFromError;if(typeof k=="function"){var P=_.value;u.payload=function(){return k(P)},u.callback=function(){CI(h,b,_)}}var z=b.stateNode;z!==null&&typeof z.componentDidCatch=="function"&&(u.callback=function(){CI(h,b,_),typeof k!="function"&&(oc===null?oc=new Set([this]):oc.add(this));var X=_.stack;this.componentDidCatch(_.value,{componentStack:X!==null?X:""})})}function xee(u,h,b,_,k){if(b.flags|=32768,_!==null&&typeof _=="object"&&typeof _.then=="function"){if(h=b.alternate,h!==null&&Qd(h,b,k,!0),b=bs.current,b!==null){switch(b.tag){case 31:case 13:return Xs===null?Ib():b.alternate===null&&ni===0&&(ni=3),b.flags&=-257,b.flags|=65536,b.lanes=k,_===ob?b.flags|=16384:(h=b.updateQueue,h===null?b.updateQueue=new Set([_]):h.add(_),zC(u,_,k)),!1;case 22:return b.flags|=65536,_===ob?b.flags|=16384:(h=b.updateQueue,h===null?(h={transitions:null,markerInstances:null,retryQueue:new Set([_])},b.updateQueue=h):(b=h.retryQueue,b===null?h.retryQueue=new Set([_]):b.add(_)),zC(u,_,k)),!1}throw Error(n(435,b.tag))}return zC(u,_,k),Ib(),!1}if(Gt)return h=bs.current,h!==null?((h.flags&65536)===0&&(h.flags|=256),h.flags|=65536,h.lanes=k,_!==B2&&(u=Error(n(422),{cause:_}),xm($s(u,b)))):(_!==B2&&(h=Error(n(423),{cause:_}),xm($s(h,b))),u=u.current.alternate,u.flags|=65536,k&=-k,u.lanes|=k,_=$s(_,b),k=bC(u.stateNode,_,k),G2(u,k),ni!==4&&(ni=2)),!1;var P=Error(n(520),{cause:_});if(P=$s(P,b),Vm===null?Vm=[P]:Vm.push(P),ni!==4&&(ni=2),h===null)return!0;_=$s(_,b),b=h;do{switch(b.tag){case 3:return b.flags|=65536,u=k&-k,b.lanes|=u,u=bC(b.stateNode,_,u),G2(b,u),!1;case 1:if(h=b.type,P=b.stateNode,(b.flags&128)===0&&(typeof h.getDerivedStateFromError=="function"||P!==null&&typeof P.componentDidCatch=="function"&&(oc===null||!oc.has(P))))return b.flags|=65536,k&=-k,b.lanes|=k,k=DI(k),EI(k,u,b,_),G2(b,k),!1}b=b.return}while(b!==null);return!1}var yC=Error(n(461)),_i=!1;function Xi(u,h,b,_){h.child=u===null?S8(h,null,b,_):gu(h,u.child,b,_)}function TI(u,h,b,_,k){b=b.render;var P=h.ref;if("ref"in _){var z={};for(var X in _)X!=="ref"&&(z[X]=_[X])}else z=_;return fu(h),_=J2(u,h,b,z,P,k),X=eC(),u!==null&&!_i?(tC(u,h,k),Xa(u,h,k)):(Gt&&X&&O2(h),h.flags|=1,Xi(u,h,_,k),h.child)}function AI(u,h,b,_,k){if(u===null){var P=b.type;return typeof P=="function"&&!I2(P)&&P.defaultProps===void 0&&b.compare===null?(h.tag=15,h.type=P,kI(u,h,P,_,k)):(u=eb(b.type,null,_,h,h.mode,k),u.ref=h.ref,u.return=h,h.child=u)}if(P=u.child,!TC(u,k)){var z=P.memoizedProps;
vendor: 10,381 bytes, line 8
8if(b=b.compare,b=b!==null?b:ym,b(z,_)&&u.ref===h.ref)return Xa(u,h,k)}return h.flags|=1,u=Ha(P,_),u.ref=h.ref,u.return=h,h.child=u}function kI(u,h,b,_,k){if(u!==null){var P=u.memoizedProps;if(ym(P,_)&&u.ref===h.ref)if(_i=!1,h.pendingProps=_=P,TC(u,k))(u.flags&131072)!==0&&(_i=!0);else return h.lanes=u.lanes,Xa(u,h,k)}return vC(u,h,b,_,k)}function SI(u,h,b,_){var k=_.children,P=u!==null?u.memoizedState:null;if(u===null&&h.stateNode===null&&(h.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),_.mode==="hidden"){if((h.flags&128)!==0){if(P=P!==null?P.baseLanes|b:b,u!==null){for(_=h.child=u.child,k=0;_!==null;)k=k|_.lanes|_.childLanes,_=_.sibling;_=k&~P}else _=0,h.child=null;return PI(u,h,P,b,_)}if((b&536870912)!==0)h.memoizedState={baseLanes:0,cachePool:null},u!==null&&rb(h,P!==null?P.cachePool:null),P!==null?R8(h,P):K2(),F8(h);else return _=h.lanes=536870912,PI(u,h,P!==null?P.baseLanes|b:b,b,_)}else P!==null?(rb(h,P.cachePool),R8(h,P),nc(),h.memoizedState=null):(u!==null&&rb(h,null),K2(),nc());return Xi(u,h,k,b),h.child}function Fm(u,h){return u!==null&&u.tag===22||h.stateNode!==null||(h.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.sibling}function PI(u,h,b,_,k){var P=W2();return P=P===null?null:{parent:wi._currentValue,pool:P},h.memoizedState={baseLanes:b,cachePool:P},u!==null&&rb(h,null),K2(),F8(h),u!==null&&Qd(u,h,_,!0),h.childLanes=k,null}function wb(u,h){return h=_b({mode:h.mode,children:h.children},u.mode),h.ref=u.ref,u.child=h,h.return=u,h}function II(u,h,b){return gu(h,u.child,null,b),u=wb(h,h.pendingProps),u.flags|=2,ys(h),h.memoizedState=null,u}function _ee(u,h,b){var _=h.pendingProps,k=(h.flags&128)!==0;if(h.flags&=-129,u===null){if(Gt){if(_.mode==="hidden")return u=wb(h,_),h.lanes=536870912,Fm(null,u);if(Q2(h),(u=Ln)?(u=W6(u,Ks),u=u!==null&&u.data==="&"?u:null,u!==null&&(h.memoizedState={dehydrated:u,treeContext:Yl!==null?{id:Xo,overflow:Qo}:null,retryLane:536870912,hydrationErrors:null},b=m8(u),b.return=h,h.child=b,Yi=h,Ln=null)):u=null,u===null)throw Xl(h);return h.lanes=536870912,null}return wb(h,_)}var P=u.memoizedState;if(P!==null){var z=P.dehydrated;if(Q2(h),k)if(h.flags&256)h.flags&=-257,h=II(u,h,b);else if(h.memoizedState!==null)h.child=u.child,h.flags|=128,h=null;else throw Error(n(558));else if(_i||Qd(u,h,b,!1),k=(b&u.childLanes)!==0,_i||k){if(_=Pn,_!==null&&(z=bn(_,b),z!==0&&z!==P.retryLane))throw P.retryLane=z,lu(u,z),$r(_,u,z),yC;Ib(),h=II(u,h,b)}else u=P.treeContext,Ln=Qs(z.nextSibling),Yi=h,Gt=!0,Kl=null,Ks=!1,u!==null&&b8(h,u),h=wb(h,_),h.flags|=4096;return h}return u=Ha(u.child,{mode:_.mode,children:_.children}),u.ref=h.ref,h.child=u,u.return=h,u}function xb(u,h){var b=h.ref;if(b===null)u!==null&&u.ref!==null&&(h.flags|=4194816);else{if(typeof b!="function"&&typeof b!="object")throw Error(n(284));(u===null||u.ref!==b)&&(h.flags|=4194816)}}function vC(u,h,b,_,k){return fu(h),b=J2(u,h,b,_,void 0,k),_=eC(),u!==null&&!_i?(tC(u,h,k),Xa(u,h,k)):(Gt&&_&&O2(h),h.flags|=1,Xi(u,h,b,k),h.child)}function RI(u,h,b,_,k,P){return fu(h),h.updateQueue=null,b=N8(h,_,b,k),O8(u),_=eC(),u!==null&&!_i?(tC(u,h,P),Xa(u,h,P)):(Gt&&_&&O2(h),h.flags|=1,Xi(u,h,b,P),h.child)}function FI(u,h,b,_,k){if(fu(h),h.stateNode===null){var P=Gd,z=b.contextType;typeof z=="object"&&z!==null&&(P=Ki(z)),P=new b(_,P),h.memoizedState=P.state!==null&&P.state!==void 0?P.state:null,P.updater=gC,h.stateNode=P,P._reactInternals=h,P=h.stateNode,P.props=_,P.state=h.memoizedState,P.refs={},q2(h),z=b.contextType,P.context=typeof z=="object"&&z!==null?Ki(z):Gd,P.state=h.memoizedState,z=b.getDerivedStateFromProps,typeof z=="function"&&(pC(h,b,z,_),P.state=h.memoizedState),typeof b.getDerivedStateFromProps=="function"||typeof P.getSnapshotBeforeUpdate=="function"||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(z=P.state,typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount(),z!==P.state&&gC.enqueueReplaceState(P,P.state,null),km(h,_,P,k),Am(),P.state=h.memoizedState),typeof P.componentDidMount=="function"&&(h.flags|=4194308),_=!0}else if(u===null){P=h.stateNode;var X=h.memoizedProps,de=yu(b,X);P.props=de;var Ce=P.context,Oe=b.contextType;z=Gd,typeof Oe=="object"&&Oe!==null&&(z=Ki(Oe));var Me=b.getDerivedStateFromProps;Oe=typeof Me=="function"||typeof P.getSnapshotBeforeUpdate=="function",X=h.pendingProps!==X,Oe||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(X||Ce!==z)&&vI(h,P,_,z),Zl=!1;var Te=h.memoizedState;P.state=Te,km(h,_,P,k),Am(),Ce=h.memoizedState,X||Te!==Ce||Zl?(typeof Me=="function"&&(pC(h,b,Me,_),Ce=h.memoizedState),(de=Zl||yI(h,b,de,_,Te,Ce,z))?(Oe||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount()),typeof P.componentDidMount=="function"&&(h.flags|=4194308)):(typeof P.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=_,h.memoizedState=Ce),P.props=_,P.state=Ce,P.context=z,_=de):(typeof P.componentDidMount=="function"&&(h.flags|=4194308),_=!1)}else{P=h.stateNode,$2(u,h),z=h.memoizedProps,Oe=yu(b,z),P.props=Oe,Me=h.pendingProps,Te=P.context,Ce=b.contextType,de=Gd,typeof Ce=="object"&&Ce!==null&&(de=Ki(Ce)),X=b.getDerivedStateFromProps,(Ce=typeof X=="function"||typeof P.getSnapshotBeforeUpdate=="function")||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(z!==Me||Te!==de)&&vI(h,P,_,de),Zl=!1,Te=h.memoizedState,P.state=Te,km(h,_,P,k),Am();var Se=h.memoizedState;z!==Me||Te!==Se||Zl||u!==null&&u.dependencies!==null&&nb(u.dependencies)?(typeof X=="function"&&(pC(h,b,X,_),Se=h.memoizedState),(Oe=Zl||yI(h,b,Oe,_,Te,Se,de)||u!==null&&u.dependencies!==null&&nb(u.dependencies))?(Ce||typeof P.UNSAFE_componentWillUpdate!="function"&&typeof P.componentWillUpdate!="function"||(typeof P.componentWillUpdate=="function"&&P.componentWillUpdate(_,Se,de),typeof P.UNSAFE_componentWillUpdate=="function"&&P.UNSAFE_componentWillUpdate(_,Se,de)),typeof P.componentDidUpdate=="function"&&(h.flags|=4),typeof P.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof P.componentDidUpdate!="function"||z===u.memoizedProps&&Te===u.memoizedState||(h.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||z===u.memoizedProps&&Te===u.memoizedState||(h.flags|=1024),h.memoizedProps=_,h.memoizedState=Se),P.props=_,P.state=Se,P.context=de,_=Oe):(typeof P.componentDidUpdate!="function"||z===u.memoizedProps&&Te===u.memoizedState||(h.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||z===u.memoizedProps&&Te===u.memoizedState||(h.flags|=1024),_=!1)}return P=_,xb(u,h),_=(h.flags&128)!==0,P||_?(P=h.stateNode,b=_&&typeof b.getDerivedStateFromError!="function"?null:P.render(),h.flags|=1,u!==null&&_?(h.child=gu(h,u.child,null,k),h.child=gu(h,null,b,k)):Xi(u,h,b,k),h.memoizedState=P.state,u=h.child):u=Xa(u,h,k),u}function OI(u,h,b,_){return uu(),h.flags|=256,Xi(u,h,b,_),h.child}var wC={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xC(u){return{baseLanes:u,cachePool:C8()}}function _C(u,h,b){return u=u!==null?u.childLanes&~b:0,h&&(u|=ws),u}function NI(u,h,b){var _=h.pendingProps,k=!1,P=(h.flags&128)!==0,z;if((z=P)||(z=u!==null&&u.memoizedState===null?!1:(li.current&2)!==0),z&&(k=!0,h.flags&=-129),z=(h.flags&32)!==0,h.flags&=-33,u===null){if(Gt){if(k?tc(h):nc(),(u=Ln)?(u=W6(u,Ks),u=u!==null&&u.data!=="&"?u:null,u!==null&&(h.memoizedState={dehydrated:u,treeContext:Yl!==null?{id:Xo,overflow:Qo}:null,retryLane:536870912,hydrationErrors:null},b=m8(u),b.return=h,h.child=b,Yi=h,Ln=null)):u=null,u===null)throw Xl(h);return rD(u)?h.lanes=32:h.lanes=536870912,null}var X=_.children;return _=_.fallback,k?(nc(),k=h.mode,X=_b({mode:"hidden",children:X},k),_=cu(_,k,b,null),X.return=h,_.return=h,X.sibling=_,h.child=X,_=h.child,_.memoizedState=xC(b),_.childLanes=_C(u,z,b),h.memoizedState=wC,Fm(null,_)):(tc(h),CC(h,X))}var de=u.memoizedState;if(de!==null&&(X=de.dehydrated,X!==null)){if(P)h.flags&256?(tc(h),h.flags&=-257,h=DC(u,h,b)):h.memoizedState!==null?(nc(),h.child=u.child,h.flags|=128,h=null):(nc(),X=_.fallback,k=h.mode,_=_b({mode:"visible",children:_.children},k),X=cu(X,k,b,null),X.flags|=2,_.return=h,X.return=h,_.sibling=X,h.child=_,gu(h,u.child,null,b),_=h.child,_.memoizedState=xC(b),_.childLanes=_C(u,z,b),h.memoizedState=wC,h=Fm(null,_));else if(tc(h),rD(X)){if(z=X.nextSibling&&X.nextSibling.dataset,z)var Ce=z.dgst;z=Ce,_=Error(n(419)),_.stack="",_.digest=z,xm({value:_,source:null,stack:null}),h=DC(u,h,b)}else if(_i||Qd(u,h,b,!1),z=(b&u.childLanes)!==0,_i||z){if(z=Pn,z!==null&&(_=bn(z,b),_!==0&&_!==de.retryLane))throw de.retryLane=_,lu(u,_),$r(z,u,_),yC;iD(X)||Ib(),h=DC(u,h,b)}else iD(X)?(h.flags|=192,h.child=u.child,h=null):(u=de.treeContext,Ln=Qs(X.nextSibling),Yi=h,Gt=!0,Kl=null,Ks=!1,u!==null&&b8(h,u),h=CC(h,_.children),h.flags|=4096);return h}return k?(nc(),X=_.fallback,k=h.mode,de=u.child,Ce=de.sibling,_=Ha(de,{mode:"hidden",children:_.children}),_.subtreeFlags=de.subtreeFlags&65011712,Ce!==null?X=Ha(Ce,X):(X=cu(X,k,b,null),X.flags|=2),X.return=h,_.return=h,_.sibling=X,h.child=_,Fm(null,_),_=h.child,X=u.child.memoizedState,X===null?X=xC(b):(k=X.cachePool,k!==null?(de=wi._currentValue,k=k.parent!==de?{parent:de,pool:de}:k):k=C8(),X={baseLanes:X.baseLanes|b,cachePool:k}),_.memoizedState=X,_.childLanes=_C(u,z,b),h.memoizedState=wC,Fm(u.child,_)):(tc(h),b=u.child,u=b.sibling,b=Ha(b,{mode:"visible",children:_.children}),b.return=h,b.sibling=null,u!==null&&(z=h.deletions,z===null?(h.deletions=[u],h.flags|=16):z.push(u)),h.child=b,h.memoizedState=null,b)}function CC(u,h){return h=_b({mode:"visible",children:h},u.mode),h.return=u,u.child=h}function _b(u,h){return u=gs(22,u,null,h),u.lanes=0,u}function DC(u,h,b){return gu(h,u.child,null,b),u=CC(h,h.pendingProps.children),u.flags|=2,h.memoizedState=null,u}function BI(u,h,b){u.lanes|=h;var _=u.alternate;_!==null&&(_.lanes|=h),U2(u.return,h,b)}function EC(u,h,b,_,k,P){var z=u.memoizedState;z===null?u.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:_,tail:b,tailMode:k,treeForkCount:P}:(z.isBackwards=h,z.rendering=null,z.renderingStartTime=0,z.last=_,z.tail
vendor: 5,151 bytes, line 8
8=b,z.tailMode=k,z.treeForkCount=P)}function MI(u,h,b){var _=h.pendingProps,k=_.revealOrder,P=_.tail;_=_.children;var z=li.current,X=(z&2)!==0;if(X?(z=z&1|2,h.flags|=128):z&=1,$(li,z),Xi(u,h,_,b),_=Gt?wm:0,!X&&u!==null&&(u.flags&128)!==0)e:for(u=h.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&BI(u,b,h);else if(u.tag===19)BI(u,b,h);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===h)break e;for(;u.sibling===null;){if(u.return===null||u.return===h)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}switch(k){case"forwards":for(b=h.child,k=null;b!==null;)u=b.alternate,u!==null&&ub(u)===null&&(k=b),b=b.sibling;b=k,b===null?(k=h.child,h.child=null):(k=b.sibling,b.sibling=null),EC(h,!1,k,b,P,_);break;case"backwards":case"unstable_legacy-backwards":for(b=null,k=h.child,h.child=null;k!==null;){if(u=k.alternate,u!==null&&ub(u)===null){h.child=k;break}u=k.sibling,k.sibling=b,b=k,k=u}EC(h,!0,b,null,P,_);break;case"together":EC(h,!1,null,null,void 0,_);break;default:h.memoizedState=null}return h.child}function Xa(u,h,b){if(u!==null&&(h.dependencies=u.dependencies),sc|=h.lanes,(b&h.childLanes)===0)if(u!==null){if(Qd(u,h,b,!1),(b&h.childLanes)===0)return null}else return null;if(u!==null&&h.child!==u.child)throw Error(n(153));if(h.child!==null){for(u=h.child,b=Ha(u,u.pendingProps),h.child=b,b.return=h;u.sibling!==null;)u=u.sibling,b=b.sibling=Ha(u,u.pendingProps),b.return=h;b.sibling=null}return h.child}function TC(u,h){return(u.lanes&h)!==0?!0:(u=u.dependencies,!!(u!==null&&nb(u)))}function Cee(u,h,b){switch(h.tag){case 3:ye(h,h.stateNode.containerInfo),Ql(h,wi,u.memoizedState.cache),uu();break;case 27:case 5:Ve(h);break;case 4:ye(h,h.stateNode.containerInfo);break;case 10:Ql(h,h.type,h.memoizedProps.value);break;case 31:if(h.memoizedState!==null)return h.flags|=128,Q2(h),null;break;case 13:var _=h.memoizedState;if(_!==null)return _.dehydrated!==null?(tc(h),h.flags|=128,null):(b&h.child.childLanes)!==0?NI(u,h,b):(tc(h),u=Xa(u,h,b),u!==null?u.sibling:null);tc(h);break;case 19:var k=(u.flags&128)!==0;if(_=(b&h.childLanes)!==0,_||(Qd(u,h,b,!1),_=(b&h.childLanes)!==0),k){if(_)return MI(u,h,b);h.flags|=128}if(k=h.memoizedState,k!==null&&(k.rendering=null,k.tail=null,k.lastEffect=null),$(li,li.current),_)break;return null;case 22:return h.lanes=0,SI(u,h,b,h.pendingProps);case 24:Ql(h,wi,u.memoizedState.cache)}return Xa(u,h,b)}function LI(u,h,b){if(u!==null)if(u.memoizedProps!==h.pendingProps)_i=!0;else{if(!TC(u,b)&&(h.flags&128)===0)return _i=!1,Cee(u,h,b);_i=(u.flags&131072)!==0}else _i=!1,Gt&&(h.flags&1048576)!==0&&g8(h,wm,h.index);switch(h.lanes=0,h.tag){case 16:e:{var _=h.pendingProps;if(u=mu(h.elementType),h.type=u,typeof u=="function")I2(u)?(_=yu(u,_),h.tag=1,h=FI(null,h,u,_,b)):(h.tag=0,h=vC(null,h,u,_,b));else{if(u!=null){var k=u.$$typeof;if(k===E){h.tag=11,h=TI(null,h,u,_,b);break e}else if(k===A){h.tag=14,h=AI(null,h,u,_,b);break e}}throw h=F(u)||u,Error(n(306,h,""))}}return h;case 0:return vC(u,h,h.type,h.pendingProps,b);case 1:return _=h.type,k=yu(_,h.pendingProps),FI(u,h,_,k,b);case 3:e:{if(ye(h,h.stateNode.containerInfo),u===null)throw Error(n(387));_=h.pendingProps;var P=h.memoizedState;k=P.element,$2(u,h),km(h,_,null,b);var z=h.memoizedState;if(_=z.cache,Ql(h,wi,_),_!==P.cache&&V2(h,[wi],b,!0),Am(),_=z.element,P.isDehydrated)if(P={element:_,isDehydrated:!1,cache:z.cache},h.updateQueue.baseState=P,h.memoizedState=P,h.flags&256){h=OI(u,h,_,b);break e}else if(_!==k){k=$s(Error(n(424)),h),xm(k),h=OI(u,h,_,b);break e}else for(u=h.stateNode.containerInfo,u.nodeType===9?u=u.body:u=u.nodeName==="HTML"?u.ownerDocument.body:u,Ln=Qs(u.firstChild),Yi=h,Gt=!0,Kl=null,Ks=!0,b=S8(h,null,_,b),h.child=b;b;)b.flags=b.flags&-3|4096,b=b.sibling;else{if(uu(),_===k){h=Xa(u,h,b);break e}Xi(u,h,_,b)}h=h.child}return h;case 26:return xb(u,h),u===null?(b=K6(h.type,null,h.pendingProps,null))?h.memoizedState=b:Gt||(b=h.type,u=h.pendingProps,_=Lb(se.current).createElement(b),_[ei]=h,_[Ri]=u,Qi(_,b,u),Mn(_),h.stateNode=_):h.memoizedState=K6(h.type,u.memoizedProps,h.pendingProps,u.memoizedState),null;case 27:return Ve(h),u===null&&Gt&&(_=h.stateNode=$6(h.type,h.pendingProps,se.current),Yi=h,Ks=!0,k=Ln,uc(h.type)?(sD=k,Ln=Qs(_.firstChild)):Ln=k),Xi(u,h,h.pendingProps.children,b),xb(u,h),u===null&&(h.flags|=4194304),h.child;case 5:return u===null&&Gt&&((k=_=Ln)&&(_=Jee(_,h.type,h.pendingProps,Ks),_!==null?(h.stateNode=_,Yi=h,Ln=Qs(_.firstChild),Ks=!1,k=!0):k=!1),k||Xl(h)),Ve(h),k=h.type,P=h.pendingProps,z=u!==null?u.memoizedProps:null,_=P.children,eD(k,P)?_=null:z!==null&&eD(k,z)&&(h.flags|=32),h.memoizedState!==null&&(k=J2(u,h,mee,null,null,b),Ym._currentValue=k),xb(u,h),Xi(u,h,_,b),h.child;case 6:return u===null&&Gt&&((u=b=Ln)&&(b=ete(b,h.pendingProps,Ks),b!==null?(h.stateNode=b,Yi=h,Ln=null,u=!0):u=!1),u||Xl(h)),null;case 13:return NI(u,h,b);case 4:return ye(h,h.stateNode.containerInfo),_=h.pendingProps,u===null?h.child=gu(h,null,_,b):Xi(u,h,_,b),h.child;case 11:return TI(u,h,h.type,h.pendingProps,b);case 7:return Xi(u,h,h.pendingProps,b),h.child;case 8:return Xi(u,h,h.pendingProps.children,b),h.child;case 12:return Xi(u,h,h.pendingProps.children,b),h.child;
vendor: 5,111 bytes, line 8
8case 10:return _=h.pendingProps,Ql(h,h.type,_.value),Xi(u,h,_.children,b),h.child;case 9:return k=h.type._context,_=h.pendingProps.children,fu(h),k=Ki(k),_=_(k),h.flags|=1,Xi(u,h,_,b),h.child;case 14:return AI(u,h,h.type,h.pendingProps,b);case 15:return kI(u,h,h.type,h.pendingProps,b);case 19:return MI(u,h,b);case 31:return _ee(u,h,b);case 22:return SI(u,h,b,h.pendingProps);case 24:return fu(h),_=Ki(wi),u===null?(k=W2(),k===null&&(k=Pn,P=j2(),k.pooledCache=P,P.refCount++,P!==null&&(k.pooledCacheLanes|=b),k=P),h.memoizedState={parent:_,cache:k},q2(h),Ql(h,wi,k)):((u.lanes&b)!==0&&($2(u,h),km(h,null,null,b),Am()),k=u.memoizedState,P=h.memoizedState,k.parent!==_?(k={parent:_,cache:_},h.memoizedState=k,h.lanes===0&&(h.memoizedState=h.updateQueue.baseState=k),Ql(h,wi,_)):(_=P.cache,Ql(h,wi,_),_!==k.cache&&V2(h,[wi],b,!0))),Xi(u,h,h.pendingProps.children,b),h.child;case 29:throw h.pendingProps}throw Error(n(156,h.tag))}function Qa(u){u.flags|=4}function AC(u,h,b,_,k){if((h=(u.mode&32)!==0)&&(h=!1),h){if(u.flags|=16777216,(k&335544128)===k)if(u.stateNode.complete)u.flags|=8192;else if(d6())u.flags|=8192;else throw pu=ob,H2}else u.flags&=-16777217}function UI(u,h){if(h.type!=="stylesheet"||(h.state.loading&4)!==0)u.flags&=-16777217;else if(u.flags|=16777216,!eR(h))if(d6())u.flags|=8192;else throw pu=ob,H2}function Cb(u,h){h!==null&&(u.flags|=4),u.flags&16384&&(h=u.tag!==22?ue():536870912,u.lanes|=h,uf|=h)}function Om(u,h){if(!Gt)switch(u.tailMode){case"hidden":h=u.tail;for(var b=null;h!==null;)h.alternate!==null&&(b=h),h=h.sibling;b===null?u.tail=null:b.sibling=null;break;case"collapsed":b=u.tail;for(var _=null;b!==null;)b.alternate!==null&&(_=b),b=b.sibling;_===null?h||u.tail===null?u.tail=null:u.tail.sibling=null:_.sibling=null}}function Un(u){var h=u.alternate!==null&&u.alternate.child===u.child,b=0,_=0;if(h)for(var k=u.child;k!==null;)b|=k.lanes|k.childLanes,_|=k.subtreeFlags&65011712,_|=k.flags&65011712,k.return=u,k=k.sibling;else for(k=u.child;k!==null;)b|=k.lanes|k.childLanes,_|=k.subtreeFlags,_|=k.flags,k.return=u,k=k.sibling;return u.subtreeFlags|=_,u.childLanes=b,h}function Dee(u,h,b){var _=h.pendingProps;switch(N2(h),h.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Un(h),null;case 1:return Un(h),null;case 3:return b=h.stateNode,_=null,u!==null&&(_=u.memoizedState.cache),h.memoizedState.cache!==_&&(h.flags|=2048),Ga(wi),Pe(),b.pendingContext&&(b.context=b.pendingContext,b.pendingContext=null),(u===null||u.child===null)&&(Xd(h)?Qa(h):u===null||u.memoizedState.isDehydrated&&(h.flags&256)===0||(h.flags|=1024,M2())),Un(h),null;case 26:var k=h.type,P=h.memoizedState;return u===null?(Qa(h),P!==null?(Un(h),UI(h,P)):(Un(h),AC(h,k,null,_,b))):P?P!==u.memoizedState?(Qa(h),Un(h),UI(h,P)):(Un(h),h.flags&=-16777217):(u=u.memoizedProps,u!==_&&Qa(h),Un(h),AC(h,k,u,_,b)),null;case 27:if(Ze(h),b=se.current,k=h.type,u!==null&&h.stateNode!=null)u.memoizedProps!==_&&Qa(h);else{if(!_){if(h.stateNode===null)throw Error(n(166));return Un(h),null}u=J.current,Xd(h)?y8(h):(u=$6(k,_,b),h.stateNode=u,Qa(h))}return Un(h),null;case 5:if(Ze(h),k=h.type,u!==null&&h.stateNode!=null)u.memoizedProps!==_&&Qa(h);else{if(!_){if(h.stateNode===null)throw Error(n(166));return Un(h),null}if(P=J.current,Xd(h))y8(h);else{var z=Lb(se.current);switch(P){case 1:P=z.createElementNS("http://www.w3.org/2000/svg",k);break;case 2:P=z.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;default:switch(k){case"svg":P=z.createElementNS("http://www.w3.org/2000/svg",k);break;case"math":P=z.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;case"script":P=z.createElement("div"),P.innerHTML="<script><\/script>",P=P.removeChild(P.firstChild);break;case"select":P=typeof _.is=="string"?z.createElement("select",{is:_.is}):z.createElement("select"),_.multiple?P.multiple=!0:_.size&&(P.size=_.size);break;default:P=typeof _.is=="string"?z.createElement(k,{is:_.is}):z.createElement(k)}}P[ei]=h,P[Ri]=_;e:for(z=h.child;z!==null;){if(z.tag===5||z.tag===6)P.appendChild(z.stateNode);else if(z.tag!==4&&z.tag!==27&&z.child!==null){z.child.return=z,z=z.child;continue}if(z===h)break e;for(;z.sibling===null;){if(z.return===null||z.return===h)break e;z=z.return}z.sibling.return=z.return,z=z.sibling}h.stateNode=P;e:switch(Qi(P,k,_),k){case"button":case"input":case"select":case"textarea":_=!!_.autoFocus;break e;case"img":_=!0;break e;default:_=!1}_&&Qa(h)}}return Un(h),AC(h,h.type,u===null?null:u.memoizedProps,h.pendingProps,b),null;case 6:if(u&&h.stateNode!=null)u.memoizedProps!==_&&Qa(h);else{if(typeof _!="string"&&h.stateNode===null)throw Error(n(166));if(u=se.current,Xd(h)){if(u=h.stateNode,b=h.memoizedProps,_=null,k=Yi,k!==null)switch(k.tag){case 27:case 5:_=k.memoizedProps}u[ei]=h,u=!!(u.nodeValue===b||_!==null&&_.suppressHydrationWarning===!0||N6(u.nodeValue,b)),u||Xl(h,!0)}else u=Lb(u).createTextNode(_),u[ei]=h,h.stateNode=u}return Un(h),null;case 31:if(b=h.memoizedState,u===null||u.memoizedState!==null){if(_=Xd(h),b!==null){if(u===null){if(!_)throw Error(n(318));if(u=h.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(n(557)
vendor: 25,754 bytes, line 8
8);u[ei]=h}else uu(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;Un(h),u=!1}else b=M2(),u!==null&&u.memoizedState!==null&&(u.memoizedState.hydrationErrors=b),u=!0;if(!u)return h.flags&256?(ys(h),h):(ys(h),null);if((h.flags&128)!==0)throw Error(n(558))}return Un(h),null;case 13:if(_=h.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(k=Xd(h),_!==null&&_.dehydrated!==null){if(u===null){if(!k)throw Error(n(318));if(k=h.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(n(317));k[ei]=h}else uu(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;Un(h),k=!1}else k=M2(),u!==null&&u.memoizedState!==null&&(u.memoizedState.hydrationErrors=k),k=!0;if(!k)return h.flags&256?(ys(h),h):(ys(h),null)}return ys(h),(h.flags&128)!==0?(h.lanes=b,h):(b=_!==null,u=u!==null&&u.memoizedState!==null,b&&(_=h.child,k=null,_.alternate!==null&&_.alternate.memoizedState!==null&&_.alternate.memoizedState.cachePool!==null&&(k=_.alternate.memoizedState.cachePool.pool),P=null,_.memoizedState!==null&&_.memoizedState.cachePool!==null&&(P=_.memoizedState.cachePool.pool),P!==k&&(_.flags|=2048)),b!==u&&b&&(h.child.flags|=8192),Cb(h,h.updateQueue),Un(h),null);case 4:return Pe(),u===null&&KC(h.stateNode.containerInfo),Un(h),null;case 10:return Ga(h.type),Un(h),null;case 19:if(q(li),_=h.memoizedState,_===null)return Un(h),null;if(k=(h.flags&128)!==0,P=_.rendering,P===null)if(k)Om(_,!1);else{if(ni!==0||u!==null&&(u.flags&128)!==0)for(u=h.child;u!==null;){if(P=ub(u),P!==null){for(h.flags|=128,Om(_,!1),u=P.updateQueue,h.updateQueue=u,Cb(h,u),h.subtreeFlags=0,u=b,b=h.child;b!==null;)h8(b,u),b=b.sibling;return $(li,li.current&1|2),Gt&&qa(h,_.treeForkCount),h.child}u=u.sibling}_.tail!==null&&ae()>kb&&(h.flags|=128,k=!0,Om(_,!1),h.lanes=4194304)}else{if(!k)if(u=ub(P),u!==null){if(h.flags|=128,k=!0,u=u.updateQueue,h.updateQueue=u,Cb(h,u),Om(_,!0),_.tail===null&&_.tailMode==="hidden"&&!P.alternate&&!Gt)return Un(h),null}else 2*ae()-_.renderingStartTime>kb&&b!==536870912&&(h.flags|=128,k=!0,Om(_,!1),h.lanes=4194304);_.isBackwards?(P.sibling=h.child,h.child=P):(u=_.last,u!==null?u.sibling=P:h.child=P,_.last=P)}return _.tail!==null?(u=_.tail,_.rendering=u,_.tail=u.sibling,_.renderingStartTime=ae(),u.sibling=null,b=li.current,$(li,k?b&1|2:b&1),Gt&&qa(h,_.treeForkCount),u):(Un(h),null);case 22:case 23:return ys(h),X2(),_=h.memoizedState!==null,u!==null?u.memoizedState!==null!==_&&(h.flags|=8192):_&&(h.flags|=8192),_?(b&536870912)!==0&&(h.flags&128)===0&&(Un(h),h.subtreeFlags&6&&(h.flags|=8192)):Un(h),b=h.updateQueue,b!==null&&Cb(h,b.retryQueue),b=null,u!==null&&u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),_=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(_=h.memoizedState.cachePool.pool),_!==b&&(h.flags|=2048),u!==null&&q(hu),null;case 24:return b=null,u!==null&&(b=u.memoizedState.cache),h.memoizedState.cache!==b&&(h.flags|=2048),Ga(wi),Un(h),null;case 25:return null;case 30:return null}throw Error(n(156,h.tag))}function Eee(u,h){switch(N2(h),h.tag){case 1:return u=h.flags,u&65536?(h.flags=u&-65537|128,h):null;case 3:return Ga(wi),Pe(),u=h.flags,(u&65536)!==0&&(u&128)===0?(h.flags=u&-65537|128,h):null;case 26:case 27:case 5:return Ze(h),null;case 31:if(h.memoizedState!==null){if(ys(h),h.alternate===null)throw Error(n(340));uu()}return u=h.flags,u&65536?(h.flags=u&-65537|128,h):null;case 13:if(ys(h),u=h.memoizedState,u!==null&&u.dehydrated!==null){if(h.alternate===null)throw Error(n(340));uu()}return u=h.flags,u&65536?(h.flags=u&-65537|128,h):null;case 19:return q(li),null;case 4:return Pe(),null;case 10:return Ga(h.type),null;case 22:case 23:return ys(h),X2(),u!==null&&q(hu),u=h.flags,u&65536?(h.flags=u&-65537|128,h):null;case 24:return Ga(wi),null;case 25:return null;default:return null}}function VI(u,h){switch(N2(h),h.tag){case 3:Ga(wi),Pe();break;case 26:case 27:case 5:Ze(h);break;case 4:Pe();break;case 31:h.memoizedState!==null&&ys(h);break;case 13:ys(h);break;case 19:q(li);break;case 10:Ga(h.type);break;case 22:case 23:ys(h),X2(),u!==null&&q(hu);break;case 24:Ga(wi)}}function Nm(u,h){try{var b=h.updateQueue,_=b!==null?b.lastEffect:null;if(_!==null){var k=_.next;b=k;do{if((b.tag&u)===u){_=void 0;var P=b.create,z=b.inst;_=P(),z.destroy=_}b=b.next}while(b!==k)}}catch(X){vn(h,h.return,X)}}function ic(u,h,b){try{var _=h.updateQueue,k=_!==null?_.lastEffect:null;if(k!==null){var P=k.next;_=P;do{if((_.tag&u)===u){var z=_.inst,X=z.destroy;if(X!==void 0){z.destroy=void 0,k=h;var de=b,Ce=X;try{Ce()}catch(Oe){vn(k,de,Oe)}}}_=_.next}while(_!==P)}}catch(Oe){vn(h,h.return,Oe)}}function jI(u){var h=u.updateQueue;if(h!==null){var b=u.stateNode;try{I8(h,b)}catch(_){vn(u,u.return,_)}}}function zI(u,h,b){b.props=yu(u.type,u.memoizedProps),b.state=u.memoizedState;try{b.componentWillUnmount()}catch(_){vn(u,h,_)}}function Bm(u,h){try{var b=u.ref;if(b!==null){switch(u.tag){case 26:case 27:case 5:var _=u.stateNode;break;case 30:_=u.stateNode;break;default:_=u.stateNode}typeof b=="function"?u.refCleanup=b(_):b.current=_}}catch(k){vn(u,h,k)}}function Zo(u,h){var b=u.ref,_=u.refCleanup;if(b!==null)if(typeof _=="function")try{_()}catch(k){vn(u,h,k)}finally{u.refCleanup=null,u=u.alternate,u!=null&&(u.refCleanup=null)}else if(typeof b=="function")try{b(null)}catch(k){vn(u,h,k)}else b.current=null}function WI(u){var h=u.type,b=u.memoizedProps,_=u.stateNode;try{e:switch(h){case"button":case"input":case"select":case"textarea":b.autoFocus&&_.focus();break e;case"img":b.src?_.src=b.src:b.srcSet&&(_.srcset=b.srcSet)}}catch(k){vn(u,u.return,k)}}function kC(u,h,b){try{var _=u.stateNode;Gee(_,u.type,b,h),_[Ri]=h}catch(k){vn(u,u.return,k)}}function HI(u){return u.tag===5||u.tag===3||u.tag===26||u.tag===27&&uc(u.type)||u.tag===4}function SC(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||HI(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.tag===27&&uc(u.type)||u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function PC(u,h,b){var _=u.tag;if(_===5||_===6)u=u.stateNode,h?(b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b).insertBefore(u,h):(h=b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b,h.appendChild(u),b=b._reactRootContainer,b!=null||h.onclick!==null||(h.onclick=za));else if(_!==4&&(_===27&&uc(u.type)&&(b=u.stateNode,h=null),u=u.child,u!==null))for(PC(u,h,b),u=u.sibling;u!==null;)PC(u,h,b),u=u.sibling}function Db(u,h,b){var _=u.tag;if(_===5||_===6)u=u.stateNode,h?b.insertBefore(u,h):b.appendChild(u);else if(_!==4&&(_===27&&uc(u.type)&&(b=u.stateNode),u=u.child,u!==null))for(Db(u,h,b),u=u.sibling;u!==null;)Db(u,h,b),u=u.sibling}function qI(u){var h=u.stateNode,b=u.memoizedProps;try{for(var _=u.type,k=h.attributes;k.length;)h.removeAttributeNode(k[0]);Qi(h,_,b),h[ei]=u,h[Ri]=b}catch(P){vn(u,u.return,P)}}var Za=!1,Ci=!1,IC=!1,$I=typeof WeakSet=="function"?WeakSet:Set,Li=null;function Tee(u,h){if(u=u.containerInfo,ZC=qb,u=r8(u),D2(u)){if("selectionStart"in u)var b={start:u.selectionStart,end:u.selectionEnd};else e:{b=(b=u.ownerDocument)&&b.defaultView||window;var _=b.getSelection&&b.getSelection();if(_&&_.rangeCount!==0){b=_.anchorNode;var k=_.anchorOffset,P=_.focusNode;_=_.focusOffset;try{b.nodeType,P.nodeType}catch{b=null;break e}var z=0,X=-1,de=-1,Ce=0,Oe=0,Me=u,Te=null;t:for(;;){for(var Se;Me!==b||k!==0&&Me.nodeType!==3||(X=z+k),Me!==P||_!==0&&Me.nodeType!==3||(de=z+_),Me.nodeType===3&&(z+=Me.nodeValue.length),(Se=Me.firstChild)!==null;)Te=Me,Me=Se;for(;;){if(Me===u)break t;if(Te===b&&++Ce===k&&(X=z),Te===P&&++Oe===_&&(de=z),(Se=Me.nextSibling)!==null)break;Me=Te,Te=Me.parentNode}Me=Se}b=X===-1||de===-1?null:{start:X,end:de}}else b=null}b=b||{start:0,end:0}}else b=null;for(JC={focusedElem:u,selectionRange:b},qb=!1,Li=h;Li!==null;)if(h=Li,u=h.child,(h.subtreeFlags&1028)!==0&&u!==null)u.return=h,Li=u;else for(;Li!==null;){switch(h=Li,P=h.alternate,u=h.flags,h.tag){case 0:if((u&4)!==0&&(u=h.updateQueue,u=u!==null?u.events:null,u!==null))for(b=0;b<u.length;b++)k=u[b],k.ref.impl=k.nextImpl;break;case 11:case 15:break;case 1:if((u&1024)!==0&&P!==null){u=void 0,b=h,k=P.memoizedProps,P=P.memoizedState,_=b.stateNode;try{var rt=yu(b.type,k);u=_.getSnapshotBeforeUpdate(rt,P),_.__reactInternalSnapshotBeforeUpdate=u}catch(yt){vn(b,b.return,yt)}}break;case 3:if((u&1024)!==0){if(u=h.stateNode.containerInfo,b=u.nodeType,b===9)nD(u);else if(b===1)switch(u.nodeName){case"HEAD":case"HTML":case"BODY":nD(u);break;default:u.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((u&1024)!==0)throw Error(n(163))}if(u=h.sibling,u!==null){u.return=h.return,Li=u;break}Li=h.return}}function GI(u,h,b){var _=b.flags;switch(b.tag){case 0:case 11:case 15:el(u,b),_&4&&Nm(5,b);break;case 1:if(el(u,b),_&4)if(u=b.stateNode,h===null)try{u.componentDidMount()}catch(z){vn(b,b.return,z)}else{var k=yu(b.type,h.memoizedProps);h=h.memoizedState;try{u.componentDidUpdate(k,h,u.__reactInternalSnapshotBeforeUpdate)}catch(z){vn(b,b.return,z)}}_&64&&jI(b),_&512&&Bm(b,b.return);break;case 3:if(el(u,b),_&64&&(u=b.updateQueue,u!==null)){if(h=null,b.child!==null)switch(b.child.tag){case 27:case 5:h=b.child.stateNode;break;case 1:h=b.child.stateNode}try{I8(u,h)}catch(z){vn(b,b.return,z)}}break;case 27:h===null&&_&4&&qI(b);case 26:case 5:el(u,b),h===null&&_&4&&WI(b),_&512&&Bm(b,b.return);break;case 12:el(u,b);break;case 31:el(u,b),_&4&&XI(u,b);break;case 13:el(u,b),_&4&&QI(u,b),_&64&&(u=b.memoizedState,u!==null&&(u=u.dehydrated,u!==null&&(b=Nee.bind(null,b),tte(u,b))));break;case 22:if(_=b.memoizedState!==null||Za,!_){h=h!==null&&h.memoizedState!==null||Ci,k=Za;var P=Ci;Za=_,(Ci=h)&&!P?tl(u,b,(b.subtreeFlags&8772)!==0):el(u,b),Za=k,Ci=P}break;case 30:break;default:el(u,b)}}function YI(u){var h=u.alternate;h!==null&&(u.alternate=null,YI(h)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(h=u.stateNode,h!==null&&Ua(h)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}var jn=null,zr=!1;function Ja(u,h,b){for(b=b.child;b!==null;)KI(u,h,b),b=b.sibling}function KI(u,h,b){if(Fe&&typeof Fe.onCommitFiberUnmount=="function")try{Fe.onCommitFiberUnmount(pe,b)}catch{}switch(b.tag){case 26:Ci||Zo(b,h),Ja(u,h,b),b.memoizedState?b.memoizedState.count--:b.stateNode&&(b=b.stateNode,b.parentNode.removeChild(b));break;case 27:Ci||Zo(b,h);var _=jn,k=zr;uc(b.type)&&(jn=b.stateNode,zr=!1),Ja(u,h,b),qm(b.stateNode),jn=_,zr=k;break;case 5:Ci||Zo(b,h);case 6:if(_=jn,k=zr,jn=null,Ja(u,h,b),jn=_,zr=k,jn!==null)if(zr)try{(jn.nodeType===9?jn.body:jn.nodeName==="HTML"?jn.ownerDocument.body:jn).removeChild(b.stateNode)}catch(P){vn(b,h,P)}else try{jn.removeChild(b.stateNode)}catch(P){vn(b,h,P)}break;case 18:jn!==null&&(zr?(u=jn,j6(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,b.stateNode),yf(u)):j6(jn,b.stateNode));break;case 4:_=jn,k=zr,jn=b.stateNode.containerInfo,zr=!0,Ja(u,h,b),jn=_,zr=k;break;case 0:case 11:case 14:case 15:ic(2,b,h),Ci||ic(4,b,h),Ja(u,h,b);break;case 1:Ci||(Zo(b,h),_=b.stateNode,typeof _.componentWillUnmount=="function"&&zI(b,h,_)),Ja(u,h,b);break;case 21:Ja(u,h,b);break;case 22:Ci=(_=Ci)||b.memoizedState!==null,Ja(u,h,b),Ci=_;break;default:Ja(u,h,b)}}function XI(u,h){if(h.memoizedState===null&&(u=h.alternate,u!==null&&(u=u.memoizedState,u!==null))){u=u.dehydrated;try{yf(u)}catch(b){vn(h,h.return,b)}}}function QI(u,h){if(h.memoizedState===null&&(u=h.alternate,u!==null&&(u=u.memoizedState,u!==null&&(u=u.dehydrated,u!==null))))try{yf(u)}catch(b){vn(h,h.return,b)}}function Aee(u){switch(u.tag){case 31:case 13:case 19:var h=u.stateNode;return h===null&&(h=u.stateNode=new $I),h;case 22:return u=u.stateNode,h=u._retryCache,h===null&&(h=u._retryCache=new $I),h;default:throw Error(n(435,u.tag))}}function Eb(u,h){var b=Aee(u);h.forEach(function(_){if(!b.has(_)){b.add(_);var k=Bee.bind(null,u,_);_.then(k,k)}})}function Wr(u,h){var b=h.deletions;if(b!==null)for(var _=0;_<b.length;_++){var k=b[_],P=u,z=h,X=z;e:for(;X!==null;){switch(X.tag){case 27:if(uc(X.type)){jn=X.stateNode,zr=!1;break e}break;case 5:jn=X.stateNode,zr=!1;break e;case 3:case 4:jn=X.stateNode.containerInfo,zr=!0;break e}X=X.return}if(jn===null)throw Error(n(160));KI(P,z,k),jn=null,zr=!1,P=k.alternate,P!==null&&(P.return=null),k.return=null}if(h.subtreeFlags&13886)for(h=h.child;h!==null;)ZI(h,u),h=h.sibling}var vo=null;function ZI(u,h){var b=u.alternate,_=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:Wr(h,u),Hr(u),_&4&&(ic(3,u,u.return),Nm(3,u),ic(5,u,u.return));break;case 1:Wr(h,u),Hr(u),_&512&&(Ci||b===null||Zo(b,b.return)),_&64&&Za&&(u=u.updateQueue,u!==null&&(_=u.callbacks,_!==null&&(b=u.shared.hiddenCallbacks,u.shared.hiddenCallbacks=b===null?_:b.concat(_))));break;case 26:var k=vo;if(Wr(h,u),Hr(u),_&512&&(Ci||b===null||Zo(b,b.return)),_&4){var P=b!==null?b.memoizedState:null;if(_=u.memoizedState,b===null)if(_===null)if(u.stateNode===null){e:{_=u.type,b=u.memoizedProps,k=k.ownerDocument||k;t:switch(_){case"title":P=k.getElementsByTagName("title")[0],(!P||P[La]||P[ei]||P.namespaceURI==="http://www.w3.org/2000/svg"||P.hasAttribute("itemprop"))&&(P=k.createElement(_),k.head.insertBefore(P,k.querySelector("head > title"))),Qi(P,_,b),P[ei]=u,Mn(P),_=P;break e;case"link":var z=Z6("link","href",k).get(_+(b.href||""));if(z){for(var X=0;X<z.length;X++)if(P=z[X],P.getAttribute("href")===(b.href==null||b.href===""?null:b.href)&&P.getAttribute("rel")===(b.rel==null?null:b.rel)&&P.getAttribute("title")===(b.title==null?null:b.title)&&P.getAttribute("crossorigin")===(b.crossOrigin==null?null:b.crossOrigin)){z.splice(X,1);break t}}P=k.createElement(_),Qi(P,_,b),k.head.appendChild(P);break;case"meta":if(z=Z6("meta","content",k).get(_+(b.content||""))){for(X=0;X<z.length;X++)if(P=z[X],P.getAttribute("content")===(b.content==null?null:""+b.content)&&P.getAttribute("name")===(b.name==null?null:b.name)&&P.getAttribute("property")===(b.property==null?null:b.property)&&P.getAttribute("http-equiv")===(b.httpEquiv==null?null:b.httpEquiv)&&P.getAttribute("charset")===(b.charSet==null?null:b.charSet)){z.splice(X,1);break t}}P=k.createElement(_),Qi(P,_,b),k.head.appendChild(P);break;default:throw Error(n(468,_))}P[ei]=u,Mn(P),_=P}u.stateNode=_}else J6(k,u.type,u.stateNode);else u.stateNode=Q6(k,_,u.memoizedProps);else P!==_?(P===null?b.stateNode!==null&&(b=b.stateNode,b.parentNode.removeChild(b)):P.count--,_===null?J6(k,u.type,u.stateNode):Q6(k,_,u.memoizedProps)):_===null&&u.stateNode!==null&&kC(u,u.memoizedProps,b.memoizedProps)}break;case 27:Wr(h,u),Hr(u),_&512&&(Ci||b===null||Zo(b,b.return)),b!==null&&_&4&&kC(u,u.memoizedProps,b.memoizedProps);break;case 5:if(Wr(h,u),Hr(u),_&512&&(Ci||b===null||Zo(b,b.return)),u.flags&32){k=u.stateNode;try{Vd(k,"")}catch(rt){vn(u,u.return,rt)}}_&4&&u.stateNode!=null&&(k=u.memoizedProps,kC(u,k,b!==null?b.memoizedProps:k)),_&1024&&(IC=!0);break;case 6:if(Wr(h,u),Hr(u),_&4){if(u.stateNode===null)throw Error(n(162));_=u.memoizedProps,b=u.stateNode;try{b.nodeValue=_}catch(rt){vn(u,u.return,rt)}}break;case 3:if(jb=null,k=vo,vo=Ub(h.containerInfo),Wr(h,u),vo=k,Hr(u),_&4&&b!==null&&b.memoizedState.isDehydrated)try{yf(h.containerInfo)}catch(rt){vn(u,u.return,rt)}IC&&(IC=!1,JI(u));break;case 4:_=vo,vo=Ub(u.stateNode.containerInfo),Wr(h,u),Hr(u),vo=_;break;case 12:Wr(h,u),Hr(u);break;case 31:Wr(h,u),Hr(u),_&4&&(_=u.updateQueue,_!==null&&(u.updateQueue=null,Eb(u,_)));break;case 13:Wr(h,u),Hr(u),u.child.flags&8192&&u.memoizedState!==null!=(b!==null&&b.memoizedState!==null)&&(Ab=ae()),_&4&&(_=u.updateQueue,_!==null&&(u.updateQueue=null,Eb(u,_)));break;case 22:k=u.memoizedState!==null;var de=b!==null&&b.memoizedState!==null,Ce=Za,Oe=Ci;if(Za=Ce||k,Ci=Oe||de,Wr(h,u),Ci=Oe,Za=Ce,Hr(u),_&8192)e:for(h=u.stateNode,h._visibility=k?h._visibility&-2:h._visibility|1,k&&(b===null||de||Za||Ci||vu(u)),b=null,h=u;;){if(h.tag===5||h.tag===26){if(b===null){de=b=h;try{if(P=de.stateNode,k)z=P.style,typeof z.setProperty=="function"?z.setProperty("display","none","important"):z.display="none";else{X=de.stateNode;var Me=de.memoizedProps.style,Te=Me!=null&&Me.hasOwnProperty("display")?Me.display:null;X.style.display=Te==null||typeof Te=="boolean"?"":(""+Te).trim()}}catch(rt){vn(de,de.return,rt)}}}else if(h.tag===6){if(b===null){de=h;try{de.stateNode.nodeValue=k?"":de.memoizedProps}catch(rt){vn(de,de.return,rt)}}}else if(h.tag===18){if(b===null){de=h;try{var Se=de.stateNode;k?z6(Se,!0):z6(de.stateNode,!1)}catch(rt){vn(de,de.return,rt)}}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===u)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===u)break e;for(;h.sibling===null;){if(h.return===null||h.return===u)break e;b===h&&(b=null),h=h.return}b===h&&(b=null),h.sibling.return=h.return,h=h.sibling}_&4&&(_=u.updateQueue,_!==null&&(b=_.retryQueue,b!==null&&(_.retryQueue=null,Eb(u,b))));break;case 19:Wr(h,u),Hr(u),_&4&&(_=u.updateQueue,_!==null&&(u.updateQueue=null,Eb(u,_)));break;case 30:break;case 21:break;default:Wr(h,u),Hr(u)}}function Hr(u){var h=u.flags;if(h&2){try{for(var b,_=u.return;_!==null;){if(HI(_)){b=_;break}_=_.return}if(b==null)throw Error(n(160));switch(b.tag){case 27:var k=b.stateNode,P=SC(u);Db(u,P,k);break;case 5:var z=b.stateNode;b.flags&32&&(Vd(z,""),b.flags&=-33);var X=SC(u);Db(u,X,z);break;case 3:case 4:var de=b.stateNode.containerInfo,Ce=SC(u);PC(u,Ce,de);break;default:throw Error(n(161))}}catch(Oe){vn(u,u.return,Oe)}u.flags&=-3}h&4096&&(u.flags&=-4097)}function JI(u){if(u.subtreeFlags&1024)for(u=u.child;u!==null;){var h=u;JI(h),h.tag===5&&h.flags&1024&&h.stateNode.reset(),u=u.sibling}}function el(u,h){if(h.subtreeFlags&8772)for(h=h.child;h!==null;)GI(u,h.alternate,h),h=h.sibling}function vu(u){for(u=u.child;u!==null;){var h=u;switch(h.tag){case 0:case 11:case 14:case 15:ic(4,h,h.return),vu(h);break;case 1:Zo(h,h.return);var b=h.stateNode;typeof b.componentWillUnmount=="function"&&zI(h,h.return,b),vu(h);break;case 27:qm(h.stateNode);case 26:case 5:Zo(h,h.return),vu(h);break;case 22:h.memoizedState===null&&vu(h);break;case 30:vu(h);break;default:vu(h)}u=u.sibling}}function tl(u,h,b){for(b=b&&(h.subtreeFlags&8772)!==0,h=h.child;h!==null;){var _=h.alternate,k=u,P=h,z=P.flags;switch(P.tag){case 0:case 11:case 15:tl(k,P,b),Nm(4,P);break;case 1:if(tl(k,P,b),_=P,k=_.stateNode,typeof k.componentDidMount=="function")try{k.componentDidMount()}catch(Ce){vn(_,_.return,Ce)}if(_=P,k=_.updateQueue,k!==null){var X=_.stateNode;try{var de=k.shared.hiddenCallbacks;if(de!==null)for(k.shared.hiddenCallbacks=null,k=0;k<de.length;k++)P8(de[k],X)}catch(Ce){vn(_,_.return,Ce)}}b&&z&64&&jI(P),Bm(P,P.return);break;case 27:qI(P);case 26:case 5:tl(k,P,b),b&&_===null&&z&4&&WI(P),Bm(P,P.return);break;case 12:tl(k,P,b);break;case 31:tl(k,P,b),b&&z&4&&XI(k,P);break;case 13:tl(k,P,b),b&&z&4&&QI(k,P);break;case 22:P.memoizedState===null&&tl(k,P,b),Bm(P,P.return);break;case 30:break;default:tl(k,P,b)}h=h.sibling}}function RC(u,h){var b=null;u!==null&&u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),u=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(u=h.memoizedState.cachePool.pool),u!==b&&(u!=null&&u.refCount++,b!=null&&_m(b))}function FC(u,h){u=null,h.alternate!==null&&(u=h.alternate.memoizedState.cache),h=h.memoizedState.cache,h!==u&&(h.refCount++,u!=null&&_m(u))}function wo(u,h,b,_){if(h.subtreeFlags&10256)for(h=h.child;h!==null;)e6(u,h,b,_),h=h.sibling}function e6(u,h,b,_){var k=h.flags;switch(h.tag){case 0:case 11:case 15:wo(u,h,b,_),k&2048&&Nm(9,h);break;case 1:wo(u,h,b,_);break;case 3:wo(u,h,b,_),k&2048&&(u=null,h.alternate!==null&&(u=h.alternate.memoizedState.cache),h=h.memoizedState.cache,h!==u&&(h.refCount++,u!=null&&_m(u)));break;case 12:if(k&2048){wo(u,h,b,_),u=h.stateNode;try{var P=h.memoizedProps,z=P.id,X=P.onPostCommit;typeof X=="function"&&X(z,h.alternate===null?"mount":"update",u.passiveEffectDuration,-0)}catch(de){vn(h,h.return,de)}}else wo(u,h,b,_);break;case 31:wo(u,h,b,_);break;case 13:wo(u,h,b,_);break;case 23:break;case 22:P=h.stateNode,z=h.alternate,h.memoizedState!==null?P._visibility&2?wo(u,h,b,_):Mm(u,h):P._visibility&2?wo(u,h,b,_):(P._visibility|=2,af(u,h,b,_,(h.subtreeFlags&10256)!==0||!1)),k&2048&&RC(z,h);break;case 24:wo(u,h,b,_),k&2048&&FC(h.alternate,h);break;default:wo(u,h,b,_)}}function af(u,h,b,_,k){for(k=k&&((h.subtreeFlags&10256)!==0||!1),h=h.child;h!==null;){var P=u,z=h,X=b,de=_,Ce=z.flags;switch(z.tag){case 0:case 11:case 15:af(P,z,X,de,k),Nm(8,z);break;case 23:break;case 22:var Oe=z.stateNode;z.memoizedState!==null?Oe._visibility&2?af(P,z,X,de,k):Mm(P,z):(Oe._visibility|=2,af(P,z,X,de,k)),k&&Ce&2048&&RC(z.alternate,z);break;case 24:af(P,z,X,de,k),k&&Ce&2048&&FC(z.alternate,z);break;default:af(P,z,X,de,k)}h=h.sibling}}function Mm(u,h){if(h.subtreeFlags&10256)for(h=h.child;h!==null;){var b=u,_=h,k=_.flags;switch(_.tag){case 22:Mm(b,_),k&2048&&RC(_.alternate,_);break;case 24:Mm(b,_),k&2048&&FC(_.alternate,_);break;default:Mm(b,_)}h=h.sibling}}var Lm=8192;function lf(u,h,b){if(u.subtreeFlags&Lm)for(u=u.child;u!==null;)t6(u,h,b),u=u.sibling}function t6(u,h,b){switch(u.tag){case 26:lf(u,h,b),u.flags&Lm&&u.memoizedState!==null&&hte(b,vo,u.memoizedState,u.memoizedProps);break;case 5:lf(u,h,b);break;case 3:case 4:var _=vo;vo=Ub(u.stateNode.containerInfo),lf(u,h,b),vo=_;break;case 22:u.memoizedState===null&&(_=u.alternate,_!==null&&_.memoizedState!==null?(_=Lm,Lm=16777216,lf(u,h,b),Lm=_):lf(u,h,b));break;default:lf(u,h,b)}}function n6(u){var h=u.alternate;if(h!==null&&(u=h.child,u!==null)){h.child=null;do h=u.sibling,u.sibling=null,u=h;while(u!==null)}}function Um(u){var h=u.deletions;if((u.flags&16)!==0){if(h!==null)for(var b=0;b<h.length;b++){var _=h[b];Li=_,r6(_,u)}n6(u)}if(u.subtreeFlags&10256)for(u=u.child;u!==null;)i6(u),u=u.sibling}function i6(u){switch(u.tag){case 0:case 11:case 15:Um(u),u.flags&2048&&ic(9,u,u.return);break;case 3:Um(u);break;case 12:Um(u);break;case 22:var h=u.stateNode;u.memoizedState!==null&&h._visibility&2&&(u.return===null||u.return.tag!==13)?(h._visibility&=-3,Tb(u)):Um(u);break;default:Um(u)}}function Tb(u){var h=u.deletions;if((u.flags&16)!==0){if(h!==null)for(var b=0;b<h.length;b++){var _=h[b];Li=_,r6(_,u)}n6(u)}for(u=u.child;u!==null;){switch(h=u,h.tag){case 0:case 11:case 15:ic(8,h,h.return),Tb(h);break;case 22:b=h.stateNode,b._visibility&2&&(b._visibility&=-3,Tb(h));break;default:Tb(h)}u=u.sibling}}function r6(u,h){for(;Li!==null;){var b=Li;switch(b.tag){case 0:case 11:case 15:ic(8,b,h);break;case 23:case 22:if(b.memoizedState!==null&&b.memoizedState.cachePool!==null){var _=b.memoizedState.cachePool.pool;_!=null&&_.refCount++}break;case 24:_m(b.memoizedState.cache)}if(_=b.child,_!==null)_.return=b,Li=_;else e:for(b=u;Li!==null;){_=Li;var k=_.sibling,P=_.return;if(YI(_),_===b){Li=null;break e}if(k!==null){k.return=P,Li=k;break e}Li=P}}}var kee={getCacheForType:function(u){var h=Ki(wi),b=h.data.get(u);return b===void 0&&(b=u(),h.data.set(u,b)),b},cacheSignal:function(){return Ki(wi).controller.signal}},See=typeof WeakMap=="function"?WeakMap:Map,on=0,Pn=null,Lt=null,zt=0,yn=0,vs=null,rc=!1,cf=!1,OC=!1,nl=0,ni=0,sc=0,wu=0,NC=0,ws=0,uf=0,Vm=null,qr=null,BC=!1,Ab=0,s6=0,kb=1/0,Sb=null,oc=null,Fi=0,ac=null,df=null,il=0,MC=0,LC=null,o6=null,jm=0,UC=null;function xs(){return(on&2)!==0&&zt!==0?zt&-zt:L.T!==null?qC():iu()}function a6(){if(ws===0)if((zt&536870912)===0||Gt){var u=$n;$n<<=1,($n&3932160)===0&&($n=262144),ws=u}else ws=536870912;return u=bs.current,u!==null&&(u.flags|=32),ws}function $r(u,h,b){(u===Pn&&(yn===2||yn===9)||u.cancelPendingCommit!==null)&&(ff(u,0),lc(u,zt,ws,!1)),ze(u,b),((on&2)===0||u!==Pn)&&(u===Pn&&((on&2)===0&&(wu|=b),ni===4&&lc(u,zt,ws,!1)),Jo(u))}function l6(u,h,b){if((on&6)!==0)throw Error(n(327));var _=!b&&(h&127)===0&&(h&u.expiredLanes)===0||K(u,h),k=_?Ree(u,h):jC(u,h,!0),P=_;do{if(k===0){cf&&!_&&lc(u,h,0,!1);break}else{if(b=u.current.alternate,P&&!Pee(b)){k=jC(u,h,!1),P=!1;continue}if(k===2){if(P=h,u.errorRecoveryDisabledLanes&P)var z=0;else z=u.pendingLanes&-536870913,z=z!==0?z:z&536870912?536870912:0;if(z!==0){h=z;e:{var X=u;k=Vm;var de=X.current.memoizedState.isDehydrated;if(de&&(ff(X,z).flags|=256),z=jC(X,z,!1),z!==2){if(OC&&!de){X.errorRecoveryDisabledLanes|=P,wu|=P,k=4;break e}P=qr,qr=k,P!==null&&(qr===null?qr=P:qr.push.apply(qr,P))}k=z}if(P=!1,k!==2)continue}}if(k===1){ff(u,0),lc(u,h,0,!0);break}e:{switch(_=u,P=k,P){case 0:case 1:throw Error(n(345));case 4:if((h&4194048)!==h)break;case 6:lc(_,h,ws,!rc);break e;case 2:qr=null;break;case 3:case 5:break;default:throw Error(n(329))}if((h&62914560)===h&&(k=Ab+300-ae(),10<k)){if(lc(_,h,ws,!rc),Ba(_,0,!0)!==0)break e;il=h,_.timeoutHandle=U6(c6.bind(null,_,b,qr,Sb,BC,h,ws,wu,uf,rc,P,"Throttled",-0,0),k);break e}c6(_,b,qr,Sb,BC,h,ws,wu,uf,rc,P,null,-0,0)}}break}while(!0);Jo(u)}function c6(u,h,b,_,k,P,z,X,de,Ce,Oe,Me,Te,Se){if(u.timeoutHandle=-1,Me=h.subtreeFlags,Me&8192||(Me&16785408)===16785408){Me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:za},t6(h,P,Me);var rt=(P&62914560)===P?Ab-ae():(P&4194048)===P?s6-ae():0;if(rt=mte(Me,rt),rt!==null){il=P,u.cancelPendingCommit=rt(b6.bind(null,u,h,P,b,_,k,z,X,de,Oe,Me,null,Te,Se)),lc(u,P,z,!Ce);return}}b6(u,h,P,b,_,k,z,X,de)}function Pee(u){for(var h=u;;){var b=h.tag;if((b===0||b===11||b===15)&&h.flags&16384&&(b=h.updateQueue,b!==null&&(b=b.stores,b!==null)))for(var _=0;_<b.length;_++){var k=b[_],P=k.getSnapshot;k=k.value;try{if(!ps(P(),k))return!1}catch{return!1}}if(b=h.child,h.subtreeFlags&16384&&b!==null)b.return=h,h=b;else{if(h===u)break;for(;h.sibling===null;){if(h.return===null||h.return===u)return!0;h=h.return}
vendor: 12,328 bytes, line 8
8h.sibling.return=h.return,h=h.sibling}}return!0}function lc(u,h,b,_){h&=~NC,h&=~wu,u.suspendedLanes|=h,u.pingedLanes&=~h,_&&(u.warmLanes|=h),_=u.expirationTimes;for(var k=h;0<k;){var P=31-Xe(k),z=1<<P;_[P]=-1,k&=~z}b!==0&&We(u,b,h)}function Pb(){return(on&6)===0?(zm(0),!1):!0}function VC(){if(Lt!==null){if(yn===0)var u=Lt.return;else u=Lt,$a=du=null,nC(u),tf=null,Dm=0,u=Lt;for(;u!==null;)VI(u.alternate,u),u=u.return;Lt=null}}function ff(u,h){var b=u.timeoutHandle;b!==-1&&(u.timeoutHandle=-1,Xee(b)),b=u.cancelPendingCommit,b!==null&&(u.cancelPendingCommit=null,b()),il=0,VC(),Pn=u,Lt=b=Ha(u.current,null),zt=h,yn=0,vs=null,rc=!1,cf=K(u,h),OC=!1,uf=ws=NC=wu=sc=ni=0,qr=Vm=null,BC=!1,(h&8)!==0&&(h|=h&32);var _=u.entangledLanes;if(_!==0)for(u=u.entanglements,_&=h;0<_;){var k=31-Xe(_),P=1<<k;h|=u[k],_&=~P}return nl=h,Q0(),b}function u6(u,h){St=null,L.H=Rm,h===ef||h===sb?(h=T8(),yn=3):h===H2?(h=T8(),yn=4):yn=h===yC?8:h!==null&&typeof h=="object"&&typeof h.then=="function"?6:1,vs=h,Lt===null&&(ni=1,vb(u,$s(h,u.current)))}function d6(){var u=bs.current;return u===null?!0:(zt&4194048)===zt?Xs===null:(zt&62914560)===zt||(zt&536870912)!==0?u===Xs:!1}function f6(){var u=L.H;return L.H=Rm,u===null?Rm:u}function h6(){var u=L.A;return L.A=kee,u}function Ib(){ni=4,rc||(zt&4194048)!==zt&&bs.current!==null||(cf=!0),(sc&134217727)===0&&(wu&134217727)===0||Pn===null||lc(Pn,zt,ws,!1)}function jC(u,h,b){var _=on;on|=2;var k=f6(),P=h6();(Pn!==u||zt!==h)&&(Sb=null,ff(u,h)),h=!1;var z=ni;e:do try{if(yn!==0&&Lt!==null){var X=Lt,de=vs;switch(yn){case 8:VC(),z=6;break e;case 3:case 2:case 9:case 6:bs.current===null&&(h=!0);var Ce=yn;if(yn=0,vs=null,hf(u,X,de,Ce),b&&cf){z=0;break e}break;default:Ce=yn,yn=0,vs=null,hf(u,X,de,Ce)}}Iee(),z=ni;break}catch(Oe){u6(u,Oe)}while(!0);return h&&u.shellSuspendCounter++,$a=du=null,on=_,L.H=k,L.A=P,Lt===null&&(Pn=null,zt=0,Q0()),z}function Iee(){for(;Lt!==null;)m6(Lt)}function Ree(u,h){var b=on;on|=2;var _=f6(),k=h6();Pn!==u||zt!==h?(Sb=null,kb=ae()+500,ff(u,h)):cf=K(u,h);e:do try{if(yn!==0&&Lt!==null){h=Lt;var P=vs;t:switch(yn){case 1:yn=0,vs=null,hf(u,h,P,1);break;case 2:case 9:if(D8(P)){yn=0,vs=null,p6(h);break}h=function(){yn!==2&&yn!==9||Pn!==u||(yn=7),Jo(u)},P.then(h,h);break e;case 3:yn=7;break e;case 4:yn=5;break e;case 7:D8(P)?(yn=0,vs=null,p6(h)):(yn=0,vs=null,hf(u,h,P,7));break;case 5:var z=null;switch(Lt.tag){case 26:z=Lt.memoizedState;case 5:case 27:var X=Lt;if(z?eR(z):X.stateNode.complete){yn=0,vs=null;var de=X.sibling;if(de!==null)Lt=de;else{var Ce=X.return;Ce!==null?(Lt=Ce,Rb(Ce)):Lt=null}break t}}yn=0,vs=null,hf(u,h,P,5);break;case 6:yn=0,vs=null,hf(u,h,P,6);break;case 8:VC(),ni=6;break e;default:throw Error(n(462))}}Fee();break}catch(Oe){u6(u,Oe)}while(!0);return $a=du=null,L.H=_,L.A=k,on=b,Lt!==null?0:(Pn=null,zt=0,Q0(),ni)}function Fee(){for(;Lt!==null&&!fe();)m6(Lt)}function m6(u){var h=LI(u.alternate,u,nl);u.memoizedProps=u.pendingProps,h===null?Rb(u):Lt=h}function p6(u){var h=u,b=h.alternate;switch(h.tag){case 15:case 0:h=RI(b,h,h.pendingProps,h.type,void 0,zt);break;case 11:h=RI(b,h,h.pendingProps,h.type.render,h.ref,zt);break;case 5:nC(h);default:VI(b,h),h=Lt=h8(h,nl),h=LI(b,h,nl)}u.memoizedProps=u.pendingProps,h===null?Rb(u):Lt=h}function hf(u,h,b,_){$a=du=null,nC(h),tf=null,Dm=0;var k=h.return;try{if(xee(u,k,h,b,zt)){ni=1,vb(u,$s(b,u.current)),Lt=null;return}}catch(P){if(k!==null)throw Lt=k,P;ni=1,vb(u,$s(b,u.current)),Lt=null;return}h.flags&32768?(Gt||_===1?u=!0:cf||(zt&536870912)!==0?u=!1:(rc=u=!0,(_===2||_===9||_===3||_===6)&&(_=bs.current,_!==null&&_.tag===13&&(_.flags|=16384))),g6(h,u)):Rb(h)}function Rb(u){var h=u;do{if((h.flags&32768)!==0){g6(h,rc);return}u=h.return;var b=Dee(h.alternate,h,nl);if(b!==null){Lt=b;return}if(h=h.sibling,h!==null){Lt=h;return}Lt=h=u}while(h!==null);ni===0&&(ni=5)}function g6(u,h){do{var b=Eee(u.alternate,u);if(b!==null){b.flags&=32767,Lt=b;return}if(b=u.return,b!==null&&(b.flags|=32768,b.subtreeFlags=0,b.deletions=null),!h&&(u=u.sibling,u!==null)){Lt=u;return}Lt=u=b}while(u!==null);ni=6,Lt=null}function b6(u,h,b,_,k,P,z,X,de){u.cancelPendingCommit=null;do Fb();while(Fi!==0);if((on&6)!==0)throw Error(n(327));if(h!==null){if(h===u.current)throw Error(n(177));if(P=h.lanes|h.childLanes,P|=S2,at(u,b,P,z,X,de),u===Pn&&(Lt=Pn=null,zt=0),df=h,ac=u,il=b,MC=P,LC=k,o6=_,(h.subtreeFlags&10256)!==0||(h.flags&10256)!==0?(u.callbackNode=null,u.callbackPriority=0,Mee(tt,function(){return _6(),null})):(u.callbackNode=null,u.callbackPriority=0),_=(h.flags&13878)!==0,(h.subtreeFlags&13878)!==0||_){_=L.T,L.T=null,k=W.p,W.p=2,z=on,on|=4;try{Tee(u,h,b)}finally{on=z,W.p=k,L.T=_}}Fi=1,y6(),v6(),w6()}}function y6(){if(Fi===1){Fi=0;var u=ac,h=df,b=(h.flags&13878)!==0;if((h.subtreeFlags&13878)!==0||b){b=L.T,L.T=null;var _=W.p;W.p=2;var k=on;on|=4;try{ZI(h,u);var P=JC,z=r8(u.containerInfo),X=P.focusedElem,de=P.selectionRange;if(z!==X&&X&&X.ownerDocument&&i8(X.ownerDocument.documentElement,X)){if(de!==null&&D2(X)){var Ce=de.start,Oe=de.end;if(Oe===void 0&&(Oe=Ce),"selectionStart"in X)X.selectionStart=Ce,X.selectionEnd=Math.min(Oe,X.value.length);else{var Me=X.ownerDocument||document,Te=Me&&Me.defaultView||window;if(Te.getSelection){var Se=Te.getSelection(),rt=X.textContent.length,yt=Math.min(de.start,rt),Tn=de.end===void 0?yt:Math.min(de.end,rt);!Se.extend&&yt>Tn&&(z=Tn,Tn=yt,yt=z);var ve=n8(X,yt),he=n8(X,Tn);if(ve&&he&&(Se.rangeCount!==1||Se.anchorNode!==ve.node||Se.anchorOffset!==ve.offset||Se.focusNode!==he.node||Se.focusOffset!==he.offset)){var _e=Me.createRange();_e.setStart(ve.node,ve.offset),Se.removeAllRanges(),yt>Tn?(Se.addRange(_e),Se.extend(he.node,he.offset)):(_e.setEnd(he.node,he.offset),Se.addRange(_e))}}}}for(Me=[],Se=X;Se=Se.parentNode;)Se.nodeType===1&&Me.push({element:Se,left:Se.scrollLeft,top:Se.scrollTop});for(typeof X.focus=="function"&&X.focus(),X=0;X<Me.length;X++){var Be=Me[X];Be.element.scrollLeft=Be.left,Be.element.scrollTop=Be.top}}qb=!!ZC,JC=ZC=null}finally{on=k,W.p=_,L.T=b}}u.current=h,Fi=2}}function v6(){if(Fi===2){Fi=0;var u=ac,h=df,b=(h.flags&8772)!==0;if((h.subtreeFlags&8772)!==0||b){b=L.T,L.T=null;var _=W.p;W.p=2;var k=on;on|=4;try{GI(u,h.alternate,h)}finally{on=k,W.p=_,L.T=b}}Fi=3}}function w6(){if(Fi===4||Fi===3){Fi=0,re();var u=ac,h=df,b=il,_=o6;(h.subtreeFlags&10256)!==0||(h.flags&10256)!==0?Fi=5:(Fi=0,df=ac=null,x6(u,u.pendingLanes));var k=u.pendingLanes;if(k===0&&(oc=null),_r(b),h=h.stateNode,Fe&&typeof Fe.onCommitFiberRoot=="function")try{Fe.onCommitFiberRoot(pe,h,void 0,(h.current.flags&128)===128)}catch{}if(_!==null){h=L.T,k=W.p,W.p=2,L.T=null;try{for(var P=u.onRecoverableError,z=0;z<_.length;z++){var X=_[z];P(X.value,{componentStack:X.stack})}}finally{L.T=h,W.p=k}}(il&3)!==0&&Fb(),Jo(u),k=u.pendingLanes,(b&261930)!==0&&(k&42)!==0?u===UC?jm++:(jm=0,UC=u):jm=0,zm(0)}}function x6(u,h){(u.pooledCacheLanes&=h)===0&&(h=u.pooledCache,h!=null&&(u.pooledCache=null,_m(h)))}function Fb(){return y6(),v6(),w6(),_6()}function _6(){if(Fi!==5)return!1;var u=ac,h=MC;MC=0;var b=_r(il),_=L.T,k=W.p;try{W.p=32>b?32:b,L.T=null,b=LC,LC=null;var P=ac,z=il;if(Fi=0,df=ac=null,il=0,(on&6)!==0)throw Error(n(331));var X=on;if(on|=4,i6(P.current),e6(P,P.current,z,b),on=X,zm(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot=="function")try{Fe.onPostCommitFiberRoot(pe,P)}catch{}return!0}finally{W.p=k,L.T=_,x6(u,h)}}function C6(u,h,b){h=$s(b,h),h=bC(u.stateNode,h,2),u=ec(u,h,2),u!==null&&(ze(u,2),Jo(u))}function vn(u,h,b){if(u.tag===3)C6(u,u,b);else for(;h!==null;){if(h.tag===3){C6(h,u,b);break}else if(h.tag===1){var _=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof _.componentDidCatch=="function"&&(oc===null||!oc.has(_))){u=$s(b,u),b=DI(2),_=ec(h,b,2),_!==null&&(EI(b,_,h,u),ze(_,2),Jo(_));break}}h=h.return}}function zC(u,h,b){var _=u.pingCache;if(_===null){_=u.pingCache=new See;var k=new Set;_.set(h,k)}else k=_.get(h),k===void 0&&(k=new Set,_.set(h,k));k.has(b)||(OC=!0,k.add(b),u=Oee.bind(null,u,h,b),h.then(u,u))}function Oee(u,h,b){var _=u.pingCache;_!==null&&_.delete(h),u.pingedLanes|=u.suspendedLanes&b,u.warmLanes&=~b,Pn===u&&(zt&b)===b&&(ni===4||ni===3&&(zt&62914560)===zt&&300>ae()-Ab?(on&2)===0&&ff(u,0):NC|=b,uf===zt&&(uf=0)),Jo(u)}function D6(u,h){h===0&&(h=ue()),u=lu(u,h),u!==null&&(ze(u,h),Jo(u))}function Nee(u){var h=u.memoizedState,b=0;h!==null&&(b=h.retryLane),D6(u,b)}function Bee(u,h){var b=0;switch(u.tag){case 31:case 13:var _=u.stateNode,k=u.memoizedState;k!==null&&(b=k.retryLane);break;case 19:_=u.stateNode;break;case 22:_=u.stateNode._retryCache;break;default:throw Error(n(314))}_!==null&&_.delete(h),D6(u,b)}function Mee(u,h){return we(u,h)}var Ob=null,mf=null,WC=!1,Nb=!1,HC=!1,cc=0;function Jo(u){u!==mf&&u.next===null&&(mf===null?Ob=mf=u:mf=mf.next=u),Nb=!0,WC||(WC=!0,Uee())}function zm(u,h){if(!HC&&Nb){HC=!0;do for(var b=!1,_=Ob;_!==null;){if(u!==0){var k=_.pendingLanes;if(k===0)var P=0;else{var z=_.suspendedLanes,X=_.pingedLanes;P=(1<<31-Xe(42|u)+1)-1,P&=k&~(z&~X),P=P&201326741?P&201326741|1:P?P|2:0}P!==0&&(b=!0,k6(_,P))}else P=zt,P=Ba(_,_===Pn?P:0,_.cancelPendingCommit!==null||_.timeoutHandle!==-1),(P&3)===0||K(_,P)||(b=!0,k6(_,P));_=_.next}while(b);HC=!1}}function Lee(){E6()}function E6(){Nb=WC=!1;var u=0;cc!==0&&Kee()&&(u=cc);for(var h=ae(),b=null,_=Ob;_!==null;){var k=_.next,P=T6(_,h);P===0?(_.next=null,b===null?Ob=k:b.next=k,k===null&&(mf=b)):(b=_,(u!==0||(P&3)!==0)&&(Nb=!0)),_=k}Fi!==0&&Fi!==5||zm(u),cc!==0&&(cc=0)}function T6(u,h){for(var b=u.suspendedLanes,_=u.pingedLanes,k=u.expirationTimes,P=u.pendingLanes&-62914561;0<P;){var z=31-Xe(P),X=1<<z,de=k[z];de===-1?((X&b)===0||(X&_)!==0)&&(k[z]=ee(X,h)):de<=h&&(u.expiredLanes|=X),P&=~X}if(h=Pn,b=zt,b=Ba(u,u===h?b:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),_=u.callbackNode,b===0||u===h&&(yn===2||yn===9)||u.cancelPendingCommit!==null)return _!==null&&_!==null&&xe(_),u.callbackNode=null,u.callbackPriority=0;if((b&3)===0||K(u,b)){if(h=b&-b,h===u.callbackPriority)return h;switch(_!==null&&xe(_),_r(b)){case 2:case 8:b=je;break;case 32:b=tt;break;case 268435456:b=it;break;default:b=tt}return _=A6.bind(null,u),b=we(b,_),u.callbackPriority=h,u.callbackNode=b,h}return _!==null&&_!==null&&xe(_),u.callbackPriority=2,u.callbackNode=null,2}function A6(u,h){if(Fi!==0&&Fi!==5)return u.callbackNode=null,u.callbackPriority=0,null;var b=u.callbackNode;if(Fb()&&u.callbackNode!==b)return null;var _=zt;return _=Ba(u,u===Pn?_:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),_===0?null:(l6(u,_,h),T6(u,ae()),u.callbackNode!=null&&u.callbackNode===b?A6.bind(null,u):null)}function k6(u,h){if(Fb())return null;l6(u,h,!0)}function Uee(){Qee(function(){(on&6)!==0?we(De,Lee):E6()})}function qC(){if(cc===0){var u=Zd;u===0&&(u=Cn,Cn<<=1,(Cn&261888)===0&&(Cn=256)),cc=u}return cc}function S6(u){return u==null||typeof u=="symbol"||typeof u=="boolean"?null:typeof u=="function"?u:W0(""+u)}function P6(u,h){var b=h.ownerDocument.createElement("input");return b.name=h.name,b.value=h.value,u.id&&b.setAttribute("form",u.id),h.parentNode.insertBefore(b,h),u=new FormData(u),b.parentNode.removeChild(b),u}function Vee(u,h,b,_,k){if(h==="submit"&&b&&b.stateNode===k){var P=S6((k[Ri]||null).action),z=_.submitter;z&&(h=(h=z[Ri]||null)?S6(h.formAction):z.getAttribute("formAction"),h!==null&&(P=h,z=null));var X=new G0("action","action",null,_,k);u.push({event:X,listeners:[{instance:null,listener:function(){if(_.defaultPrevented){if(cc!==0){var de=z?P6(k,z):new FormData(k);dC(b,{pending:!0,data:de,method:k.method,action:P},null,de)}}else typeof P=="function"&&(X.preventDefault(),de=z?P6(k,z):new FormData(k),dC(b,{pending:!0,data:de,method:k.method,action:P},P,de))},currentTarget:k}]})}}for(var $C=0;$C<k2.length;$C++){var GC=k2[$C],jee=GC.toLowerCase(),zee=GC[0].toUpperCase()+GC.slice(1);yo(jee,"on"+zee)}yo(a8,"onAnimationEnd"),yo(l8,"onAnimationIteration"),yo(c8,"onAnimationStart"),yo("dblclick","onDoubleClick"),yo("focusin","onFocus"),yo("focusout","onBlur"),yo(ree,"onTransitionRun"),yo(see,"onTransitionStart"),yo(oee,"onTransitionCancel"),yo(u8,"onTransitionEnd"),Ld("onMouseEnter",["mouseout","mouseover"]),Ld("onMouseLeave",["mouseout","mouseover"]),Ld("onPointerEnter",["pointerout","pointerover"]),Ld("onPointerLeave",["pointerout","pointerover"]),ru("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ru("onSelect","focusout contextmenu dragend focu
8sin keydown keyup mousedown mouseup selectionchange".split(" ")),ru("onBeforeInput",["compositionend","keypress","textInput","paste"]),ru("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ru("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ru("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wm="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Wee=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wm));function I6(u,h){h=(h&4)!==0;for(var b=0;b<u.length;b++){var _=u[b],k=_.event;_=_.listeners;e:{var P=void 0;if(h)for(var z=_.length-1;0<=z;z--){var X=_[z],de=X.instance,Ce=X.currentTarget;if(X=X.listener,de!==P&&k.isPropagationStopped())break e;P=X,k.currentTarget=Ce;try{P(k)}catch(Oe){X0(Oe)}k.currentTarget=null,P=de}else for(z=0;z<_.length;z++){if(X=_[z],de=X.instance,Ce=X.currentTarget,X=X.listener,de!==P&&k.isPropagationStopped())break e;P=X,k.currentTarget=Ce;try{P(k)}catch(Oe){X0(Oe)}k.currentTarget=null,P=de}}}}function Ut(u,h){var b=h[bo];b===void 0&&(b=h[bo]=new Set);var _=u+"__bubble";b.has(_)||(R6(h,u,2,!1),b.add(_))}function YC(u,h,b){var _=0;h&&(_|=4),R6(b,u,_,h)}var Bb="_reactListening"+Math.random().toString(36).slice(2);function KC(u){if(!u[Bb]){u[Bb]=!0,um.forEach(function(b){b!=="selectionchange"&&(Wee.has(b)||YC(b,!1,u),YC(b,!0,u))});var h=u.nodeType===9?u:u.ownerDocument;h===null||h[Bb]||(h[Bb]=!0,YC("selectionchange",!1,h))}}function R6(u,h,b,_){switch(aR(h)){case 2:var k=bte;break;case 8:k=yte;break;default:k=uD}b=k.bind(null,h,b,u),k=void 0,!p2||h!=="touchstart"&&h!=="touchmove"&&h!=="wheel"||(k=!0),_?k!==void 0?u.addEventListener(h,b,{capture:!0,passive:k}):u.addEventListener(h,b,!0):k!==void 0?u.addEventListener(h,b,{passive:k}):u.addEventListener(h,b,!1)}function XC(u,h,b,_,k){var P=_;if((h&1)===0&&(h&2)===0&&_!==null)e:for(;;){if(_===null)return;var z=_.tag;if(z===3||z===4){var X=_.stateNode.containerInfo;if(X===k)break;if(z===4)for(z=_.return;z!==null;){var de=z.tag;if((de===3||de===4)&&z.stateNode.containerInfo===k)return;z=z.return}for(;X!==null;){if(z=zs(X),z===null)return;if(de=z.tag,de===5||de===6||de===26||de===27){_=P=z;continue e}X=X.parentNode}}_=_.return}MP(function(){var Ce=P,Oe=h2(b),Me=[];e:{var Te=d8.get(u);if(Te!==void 0){var Se=G0,rt=u;switch(u){case"keypress":if(q0(b)===0)break e;case"keydown":case"keyup":Se=BJ;break;case"focusin":rt="focus",Se=v2;break;case"focusout":rt="blur",Se=v2;break;case"beforeblur":case"afterblur":Se=v2;break;case"click":if(b.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Se=VP;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Se=DJ;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Se=UJ;break;case a8:case l8:case c8:Se=AJ;break;case u8:Se=jJ;break;case"scroll":case"scrollend":Se=_J;break;case"wheel":Se=WJ;break;case"copy":case"cut":case"paste":Se=SJ;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Se=zP;break;case"toggle":case"beforetoggle":Se=qJ}var yt=(h&4)!==0,Tn=!yt&&(u==="scroll"||u==="scrollend"),ve=yt?Te!==null?Te+"Capture":null:Te;yt=[];for(var he=Ce,_e;he!==null;){var Be=he;if(_e=Be.stateNode,Be=Be.tag,Be!==5&&Be!==26&&Be!==27||_e===null||ve===null||(Be=dm(he,ve),Be!=null&&yt.push(Hm(he,Be,_e))),Tn)break;he=he.return}0<yt.length&&(Te=new Se(Te,rt,null,b,Oe),Me.push({event:Te,listeners:yt}))}}if((h&7)===0){e:{if(Te=u==="mouseover"||u==="pointerover",Se=u==="mouseout"||u==="pointerout",Te&&b!==f2&&(rt=b.relatedTarget||b.fromElement)&&(zs(rt)||rt[Ur]))break e;if((Se||Te)&&(Te=Oe.window===Oe?Oe:(Te=Oe.ownerDocument)?Te.defaultView||Te.parentWindow:window,Se?(rt=b.relatedTarget||b.toElement,Se=Ce,rt=rt?zs(rt):null,rt!==null&&(Tn=s(rt),yt=rt.tag,rt!==Tn||yt!==5&&yt!==27&&yt!==6)&&(rt=null)):(Se=null,rt=Ce),Se!==rt)){if(yt=VP,Be="onMouseLeave",ve="onMouseEnter",he="mouse",(u==="pointerout"||u==="pointerover")&&(yt=zP,Be="onPointerLeave",ve="onPointerEnter",he="pointer"),Tn=Se==null?Te:ms(Se),_e=rt==null?Te:ms(rt),Te=new yt(Be,he+"leave",Se,b,Oe),Te.target=Tn,Te.relatedTarget=_e,Be=null,zs(Oe)===Ce&&(yt=new yt(ve,he+"enter",rt,b,Oe),yt.target=_e,yt.relatedTarget=Tn,Be=yt),Tn=Be,Se&&rt)t:{for(yt=Hee,ve=Se,he=rt,_e=0,Be=ve;Be;Be=yt(Be))_e++;Be=0;for(var mt=he;mt;mt=yt(mt))Be++;for(;0<_e-Be;)ve=yt(ve),_e--;for(;0<Be-_e;)he=yt(he),Be--;for(;_e--;){if(ve===he||he!==null&&ve===he.alternate){yt=ve;break t}ve=yt(ve),he=yt(he)}yt=null}else yt=null;Se!==null&&F6(Me,Te,Se,yt,!1),rt!==null&&Tn!==null&&F6(Me,Tn,rt,yt,!0)}}
vendor: 5,259 bytes, lines 8-9
8e:{if(Te=Ce?ms(Ce):window,Se=Te.nodeName&&Te.nodeName.toLowerCase(),Se==="select"||Se==="input"&&Te.type==="file")var tn=XP;else if(YP(Te))if(QP)tn=tee;else{tn=JJ;var lt=ZJ}else Se=Te.nodeName,!Se||Se.toLowerCase()!=="input"||Te.type!=="checkbox"&&Te.type!=="radio"?Ce&&d2(Ce.elementType)&&(tn=XP):tn=eee;if(tn&&(tn=tn(u,Ce))){KP(Me,tn,b,Oe);break e}lt&&lt(u,Te,Ce),u==="focusout"&&Ce&&Te.type==="number"&&Ce.memoizedProps.value!=null&&u2(Te,"number",Te.value)}switch(lt=Ce?ms(Ce):window,u){case"focusin":(YP(lt)||lt.contentEditable==="true")&&(Hd=lt,E2=Ce,vm=null);break;case"focusout":vm=E2=Hd=null;break;case"mousedown":T2=!0;break;case"contextmenu":case"mouseup":case"dragend":T2=!1,s8(Me,b,Oe);break;case"selectionchange":if(iee)break;case"keydown":case"keyup":s8(Me,b,Oe)}var Ot;if(x2)e:{switch(u){case"compositionstart":var Wt="onCompositionStart";break e;case"compositionend":Wt="onCompositionEnd";break e;case"compositionupdate":Wt="onCompositionUpdate";break e}Wt=void 0}else Wd?$P(u,b)&&(Wt="onCompositionEnd"):u==="keydown"&&b.keyCode===229&&(Wt="onCompositionStart");Wt&&(WP&&b.locale!=="ko"&&(Wd||Wt!=="onCompositionStart"?Wt==="onCompositionEnd"&&Wd&&(Ot=LP()):(Gl=Oe,g2="value"in Gl?Gl.value:Gl.textContent,Wd=!0)),lt=Mb(Ce,Wt),0<lt.length&&(Wt=new jP(Wt,u,null,b,Oe),Me.push({event:Wt,listeners:lt}),Ot?Wt.data=Ot:(Ot=GP(b),Ot!==null&&(Wt.data=Ot)))),(Ot=GJ?YJ(u,b):KJ(u,b))&&(Wt=Mb(Ce,"onBeforeInput"),0<Wt.length&&(lt=new jP("onBeforeInput","beforeinput",null,b,Oe),Me.push({event:lt,listeners:Wt}),lt.data=Ot)),Vee(Me,u,Ce,b,Oe)}I6(Me,h)})}function Hm(u,h,b){return{instance:u,listener:h,currentTarget:b}}function Mb(u,h){for(var b=h+"Capture",_=[];u!==null;){var k=u,P=k.stateNode;if(k=k.tag,k!==5&&k!==26&&k!==27||P===null||(k=dm(u,b),k!=null&&_.unshift(Hm(u,k,P)),k=dm(u,h),k!=null&&_.push(Hm(u,k,P))),u.tag===3)return _;u=u.return}return[]}function Hee(u){if(u===null)return null;do u=u.return;while(u&&u.tag!==5&&u.tag!==27);return u||null}function F6(u,h,b,_,k){for(var P=h._reactName,z=[];b!==null&&b!==_;){var X=b,de=X.alternate,Ce=X.stateNode;if(X=X.tag,de!==null&&de===_)break;X!==5&&X!==26&&X!==27||Ce===null||(de=Ce,k?(Ce=dm(b,P),Ce!=null&&z.unshift(Hm(b,Ce,de))):k||(Ce=dm(b,P),Ce!=null&&z.push(Hm(b,Ce,de)))),b=b.return}z.length!==0&&u.push({event:h,listeners:z})}var qee=/\r\n?/g,$ee=/\u0000|\uFFFD/g;function O6(u){return(typeof u=="string"?u:""+u).replace(qee,`
9`).replace($ee,"")}function N6(u,h){return h=O6(h),O6(u)===h}function En(u,h,b,_,k,P){switch(b){case"children":typeof _=="string"?h==="body"||h==="textarea"&&_===""||Vd(u,_):(typeof _=="number"||typeof _=="bigint")&&h!=="body"&&Vd(u,""+_);break;case"className":j0(u,"class",_);break;case"tabIndex":j0(u,"tabindex",_);break;case"dir":case"role":case"viewBox":case"width":case"height":j0(u,b,_);break;case"style":NP(u,_,P);break;case"data":if(h!=="object"){j0(u,"data",_);break}case"src":case"href":if(_===""&&(h!=="a"||b!=="href")){u.removeAttribute(b);break}if(_==null||typeof _=="function"||typeof _=="symbol"||typeof _=="boolean"){u.removeAttribute(b);break}_=W0(""+_),u.setAttribute(b,_);break;case"action":case"formAction":if(typeof _=="function"){u.setAttribute(b,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof P=="function"&&(b==="formAction"?(h!=="input"&&En(u,h,"name",k.name,k,null),En(u,h,"formEncType",k.formEncType,k,null),En(u,h,"formMethod",k.formMethod,k,null),En(u,h,"formTarget",k.formTarget,k,null)):(En(u,h,"encType",k.encType,k,null),En(u,h,"method",k.method,k,null),En(u,h,"target",k.target,k,null)));if(_==null||typeof _=="symbol"||typeof _=="boolean"){u.removeAttribute(b);break}_=W0(""+_),u.setAttribute(b,_);break;case"onClick":_!=null&&(u.onclick=za);break;case"onScroll":_!=null&&Ut("scroll",u);break;case"onScrollEnd":_!=null&&Ut("scrollend",u);break;case"dangerouslySetInnerHTML":if(_!=null){if(typeof _!="object"||!("__html"in _))throw Error(n(61));if(b=_.__html,b!=null){if(k.children!=null)throw Error(n(60));u.innerHTML=b}}break;case"multiple":u.multiple=_&&typeof _!="function"&&typeof _!="symbol";break;case"muted":u.muted=_&&typeof _!="function"&&typeof _!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(_==null||typeof _=="function"||typeof _=="boolean"||typeof _=="symbol"){u.removeAttribute("xlink:href");break}b=W0(""+_),u.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",b);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":_!=null&&typeof _!="function"&&typeof _!="symbol"?u.setAttribute(b,""+_):u.removeAttribute(b);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
9ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":_&&typeof _!="function"&&typeof _!="symbol"?u.setAttribute(b,""):u.removeAttribute(b);break;case"capture":case"download":_===!0?u.setAttribute(b,""):_!==!1&&_!=null&&typeof _!="function"&&typeof _!="symbol"?u.setAttribute(b,_):u.removeAttribute(b);break;case"cols":case"rows":case"size":case"span":_!=null&&typeof _!="function"&&typeof _!="symbol"&&!isNaN(_)&&1<=_?u.setAttribute(b,_):u.removeAttribute(b);break;case"rowSpan":case"start":_==null||typeof _=="function"||typeof _=="symbol"||isNaN(_)?u.removeAttribute(b):u.setAttribute(b,_);break;case"popover":Ut("beforetoggle",u),Ut("toggle",u),V0(u,"popover",_);break;case"xlinkActuate":ja(u,"http://www.w3.org/1999/xlink","xlink:actuate",_);break;case"xlinkArcrole":ja(u,"http://www.w3.org/1999/xlink","xlink:arcrole",_);break;case"xlinkRole":ja(u,"http://www.w3.org/1999/xlink","xlink:role",_);break;case"xlinkShow":ja(u,"http://www.w3.org/1999/xlink","xlink:show",_);break;case"xlinkTitle":ja(u,"http://www.w3.org/1999/xlink","xlink:title",_);break;case"xlinkType":ja(u,"http://www.w3.org/1999/xlink","xlink:type",_);break;case"xmlBase":ja(u,"http://www.w3.org/XML/1998/namespace","xml:base",_);break;case"xmlLang":ja(u,"http://www.w3.org/XML/1998/namespace","xml:lang",_);break;case"xmlSpace":ja(u,"http://www.w3.org/XML/1998/namespace","xml:space",_);break;case"is":V0(u,"is",_);break;case"innerText":case"textContent":break;default:(!(2<b.length)||b[0]!=="o"&&b[0]!=="O"||b[1]!=="n"&&b[1]!=="N")&&(b=wJ.get(b)||b,V0(u,b,_))}}function QC(u,h,b,_,k,P){switch(b){case"style":NP(u,_,P);break;case"dangerouslySetInnerHTML":if(_!=null){if(typeof _!="object"||!("__html"in _))throw Error(n(61));if(b=_.__html,b!=null){if(k.children!=null)throw Error(n(60));u.innerHTML=b}}break;case"children":typeof _=="string"?Vd(u,_):(typeof _=="number"||typeof _=="bigint")&&Vd(u,""+_);break;case"onScroll":_!=null&&Ut("scroll",u);break;case"onScrollEnd":_!=null&&Ut("scrollend",u);break;case"onClick":_!=null&&(u.onclick=za);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!TP.hasOwnProperty(b))e:{if(b[0]==="o"&&b[1]==="n"&&(k=b.endsWith("Capture"),h=b.slice(2,k?b.length-7:void 0),P=u[Ri]||null,P=P!=null?P[b]:null,typeof P=="function"&&u.removeEventListener(h,P,k),typeof _=="function")){typeof P!="function"&&P!==null&&(b in u?u[b]=null:u.hasAttribute(b)&&u.removeAttribute(b)),u.addEventListener(h,_,k);break e}b in u?u[b]=_:_===!0?u.setAttribute(b,""):V0(u,b,_)}}}function Qi(u,h,b){switch(h){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ut("error",u),Ut("load",u);var _=!1,k=!1,P;for(P in b)if(b.hasOwnProperty(P)){var z=b[P];if(z!=null)switch(P){case"src":_=!0;break;case"srcSet":k=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,h));default:En(u,h,P,z,b,null)}}k&&En(u,h,"srcSet",b.srcSet,b,null),_&&En(u,h,"src",b.src,b,null);return;case"input":Ut("invalid",u);var X=P=z=k=null,de=null,Ce=null;for(_ in b)if(b.hasOwnProperty(_)){var Oe=b[_];if(Oe!=null)switch(_){case"name":k=Oe;break;case"type":z=Oe;break;case"checked":de=Oe;break;case"defaultChecked":Ce=Oe;break;case"value":P=Oe;break;case"defaultValue":X=Oe;break;case"children":case"dangerouslySetInnerHTML":if(Oe!=null)throw Error(n(137,h));break;default:En(u,h,_,Oe,b,null)}}IP(u,P,X,de,Ce,z,k,!1);return;case"select":Ut("invalid",u),_=z=P=null;for(k in b)if(b.hasOwnProperty(k)&&(X=b[k],X!=null))switch(k){case"value":P=X;break;case"defaultValue":z=X;break;case"multiple":_=X;default:En(u,h,k,X,b,null)}h=P,b=z,u.multiple=!!_,h!=null?Ud(u,!!_,h,!1):b!=null&&Ud(u,!!_,b,!0);return;case"textarea":Ut("invalid",u),P=k=_=null;for(z in b)if(b.hasOwnProperty(z)&&(X=b[z],X!=null))switch(z){case"value":_=X;break;case"defaultValue":k=X;break;case"children":P=X;break;case"dangerouslySetInnerHTML":if(X!=null)throw Error(n(91));break;default:En(u,h,z,X,b,null)}FP(u,_,k,P);return;case"option":for(de in b)b.hasOwnProperty(de)&&(_=b[de],_!=null)&&(de==="selected"?u.selected=_&&typeof _!="function"&&typeof _!="symbol":En(u,h,de,_,b,null));return;case"dialog":Ut("beforetoggle",u),Ut("toggle",u),Ut("cancel",u),Ut("close",u);break;case"iframe":case"object":Ut("load",u);break;case"video":case"audio":for(_=0;_<Wm.length;_++)Ut(Wm[_],u);break;case"image":Ut("error",u),Ut("load",u);break;case"details":Ut("toggle",u);break;case"embed":case"source":case"link":Ut("error",u),Ut("load",u);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ce in b)if(b.hasOwnProperty(Ce)&&(_=b[Ce],_!=null))switch(Ce){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,h));default:En(u,h,Ce,_,b,null)}return;default:if(d2(h)){for(Oe in b)b.hasOwnProperty(Oe)&&(_=b[Oe],_!==void 0&&QC(u,h,Oe,_,b,void 0));return}}for(X in b)b.hasOwnProperty(X)&&(_=b[X],_!=null&&En(u,h,X,_,b,null))}function Gee(u,h,b,_){switch(h){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var k=null,P=null,z=null,X=null,de=null,Ce=null,Oe=null;for(Se in b){var Me=b[Se];if(b.hasOwnProperty(Se)&&Me!=null)switch(Se){case"checked":break;case"value":break;case"defaultValue":de=Me;default:_.hasOwnProperty(Se)||En(u,h,Se,null,_,Me)}}for(var Te in _){var Se=_[Te];if(Me=b[Te],_.hasOwnProperty(Te)&&(Se!=null||Me!=null))switch(Te){case"type":P=Se;break;case"name":k=Se;break;case"checked":Ce=Se;break;case"defaultChecked":Oe=Se;break;case"value":z=Se;break;case"defaultValue":X=Se;break;case"children":case"dangerouslySetInnerHTML":if(Se!=null)throw Error(n(137,h));break;default:Se!==Me&&En(u,h,Te,Se,_,Me)}}c2(u,z,X,de,Ce,Oe,P,k);return;case"select":Se=z=X=Te=null;for(P in b)if(de=b[P],b.hasOwnProperty(P)&&de!=null)switch(P){case"value":break;case"multiple":Se=de;default:_.hasOwnProperty(P)||En(u,h,P,null,_,de)}for(k in _)if(P=_[k],de=b[k],_.hasOwnProperty(k)&&(P!=null||de!=null))switch(k){case"value":Te=P;break;case"defaultValue":X=P;break;case"multiple":z=P;default:P!==de&&En(u,h,k,P,_,de)}h=X,b=z,_=Se,Te!=null?Ud(u,!!b,Te,!1):!!_!=!!b&&(h!=null?Ud(u,!!b,h,!0):Ud(u,!!b,b?[]:"",!1));return;case"textarea":Se=Te=null;for(X in b)if(k=b[X],b.hasOwnProperty(X)&&k!=null&&!_.hasOwnProperty(X))switch(X){case"value":break;case"children":break;default:En(u,h,X,null,_,k)}for(z in _)if(k=_[z],P=b[z],_.hasOwnProperty(z)&&(k!=null||P!=null))switch(z){case"value":Te=k;break;case"defaultValue":Se=k;break;case"children":break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(n(91));break;default:k!==P&&En(u,h,z,k,_,P)}RP(u,Te,Se);return;case"option":for(var rt in b)Te=b[rt],b.hasOwnProperty(rt)&&Te!=null&&!_.hasOwnProperty(rt)&&(rt==="selected"?u.selected=!1:En(u,h,rt,null,_,Te));for(de in _)Te=_[de],Se=b[de],_.hasOwnProperty(de)&&Te!==Se&&(Te!=null||Se!=null)&&(de==="selected"?u.selected=Te&&typeof Te!="function"&&typeof Te!="symbol":En(u,h,de,Te,_,Se));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var yt in b)Te=b[yt],b.hasOwnProperty(yt)&&Te!=null&&!_.hasOwnProperty(yt)&&En(u,h,yt,null,_,Te);for(Ce in _)if(Te=_[Ce],Se=b[Ce],_.hasOwnProperty(Ce)&&Te!==Se&&(Te!=null||Se!=null))switch(Ce){case"children":case"dangerouslySetInnerHTML":if(Te!=null)throw Error(n(137,h));break;default:En(u,h,Ce,Te,_,Se)}return;default:if(d2(h)){for(var Tn in b)Te=b[Tn],b.hasOwnProperty(Tn)&&Te!==void 0&&!_.hasOwnProperty(Tn)&&QC(u,h,Tn,void 0,_,Te);for(Oe in _)Te=_[Oe],Se=b[Oe],!_.hasOwnProperty(Oe)||Te===Se||Te===void 0&&Se===void 0||QC(u,h,Oe,Te,_,Se);return}}for(var ve in b)Te=b[ve],b.hasOwnProperty(ve)&&Te!=null&&!_.hasOwnProperty(ve)&&En(u,h,ve,null,_,Te);for(Me in _)Te=_[Me],Se=b[Me],!_.hasOwnProperty(Me)||Te===Se||Te==null&&Se==null||En(u,h,Me,Te,_,Se)}function B6(u){switch(u){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Yee(){if(typeof performance.getEntriesByType=="function"){for(var u=0,h=0,b=performance.getEntriesByType("resource"),_=0;_<b.length;_++){var k=b[_],P=k.transferSize,z=k.initiatorType,X=k.duration;if(P&&X&&B6(z)){for(z=0,X=k.responseEnd,_+=1;_<b.length;_++){var de=b[_],Ce=de.startTime;if(Ce>X)break;var Oe=de.transferSize,Me=de.initiatorType;Oe&&B6(Me)&&(de=de.responseEnd,z+=Oe*(de<X?1:(X-Ce)/(de-Ce)))}if(--_,h+=8*(P+z)/(k.duration/1e3),u++,10<u)break}}if(0<u)return h/u/1e6}return navigator.connection&&(u=navigator.connection.downlink,typeof u=="number")?u:5}var ZC=null,JC=null;
vendor: 9,450 bytes, line 9
9function Lb(u){return u.nodeType===9?u:u.ownerDocument}function M6(u){switch(u){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function L6(u,h){if(u===0)switch(h){case"svg":return 1;case"math":return 2;default:return 0}return u===1&&h==="foreignObject"?0:u}function eD(u,h){return u==="textarea"||u==="noscript"||typeof h.children=="string"||typeof h.children=="number"||typeof h.children=="bigint"||typeof h.dangerouslySetInnerHTML=="object"&&h.dangerouslySetInnerHTML!==null&&h.dangerouslySetInnerHTML.__html!=null}var tD=null;function Kee(){var u=window.event;return u&&u.type==="popstate"?u===tD?!1:(tD=u,!0):(tD=null,!1)}var U6=typeof setTimeout=="function"?setTimeout:void 0,Xee=typeof clearTimeout=="function"?clearTimeout:void 0,V6=typeof Promise=="function"?Promise:void 0,Qee=typeof queueMicrotask=="function"?queueMicrotask:typeof V6<"u"?function(u){return V6.resolve(null).then(u).catch(Zee)}:U6;function Zee(u){setTimeout(function(){throw u})}function uc(u){return u==="head"}function j6(u,h){var b=h,_=0;do{var k=b.nextSibling;if(u.removeChild(b),k&&k.nodeType===8)if(b=k.data,b==="/$"||b==="/&"){if(_===0){u.removeChild(k),yf(h);return}_--}else if(b==="$"||b==="$?"||b==="$~"||b==="$!"||b==="&")_++;else if(b==="html")qm(u.ownerDocument.documentElement);else if(b==="head"){b=u.ownerDocument.head,qm(b);for(var P=b.firstChild;P;){var z=P.nextSibling,X=P.nodeName;P[La]||X==="SCRIPT"||X==="STYLE"||X==="LINK"&&P.rel.toLowerCase()==="stylesheet"||b.removeChild(P),P=z}}else b==="body"&&qm(u.ownerDocument.body);b=k}while(b);yf(h)}function z6(u,h){var b=u;u=0;do{var _=b.nextSibling;if(b.nodeType===1?h?(b._stashedDisplay=b.style.display,b.style.display="none"):(b.style.display=b._stashedDisplay||"",b.getAttribute("style")===""&&b.removeAttribute("style")):b.nodeType===3&&(h?(b._stashedText=b.nodeValue,b.nodeValue=""):b.nodeValue=b._stashedText||""),_&&_.nodeType===8)if(b=_.data,b==="/$"){if(u===0)break;u--}else b!=="$"&&b!=="$?"&&b!=="$~"&&b!=="$!"||u++;b=_}while(b)}function nD(u){var h=u.firstChild;for(h&&h.nodeType===10&&(h=h.nextSibling);h;){var b=h;switch(h=h.nextSibling,b.nodeName){case"HTML":case"HEAD":case"BODY":nD(b),Ua(b);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(b.rel.toLowerCase()==="stylesheet")continue}u.removeChild(b)}}function Jee(u,h,b,_){for(;u.nodeType===1;){var k=b;if(u.nodeName.toLowerCase()!==h.toLowerCase()){if(!_&&(u.nodeName!=="INPUT"||u.type!=="hidden"))break}else if(_){if(!u[La])switch(h){case"meta":if(!u.hasAttribute("itemprop"))break;return u;case"link":if(P=u.getAttribute("rel"),P==="stylesheet"&&u.hasAttribute("data-precedence"))break;if(P!==k.rel||u.getAttribute("href")!==(k.href==null||k.href===""?null:k.href)||u.getAttribute("crossorigin")!==(k.crossOrigin==null?null:k.crossOrigin)||u.getAttribute("title")!==(k.title==null?null:k.title))break;return u;case"style":if(u.hasAttribute("data-precedence"))break;return u;case"script":if(P=u.getAttribute("src"),(P!==(k.src==null?null:k.src)||u.getAttribute("type")!==(k.type==null?null:k.type)||u.getAttribute("crossorigin")!==(k.crossOrigin==null?null:k.crossOrigin))&&P&&u.hasAttribute("async")&&!u.hasAttribute("itemprop"))break;return u;default:return u}}else if(h==="input"&&u.type==="hidden"){var P=k.name==null?null:""+k.name;if(k.type==="hidden"&&u.getAttribute("name")===P)return u}else return u;if(u=Qs(u.nextSibling),u===null)break}return null}function ete(u,h,b){if(h==="")return null;for(;u.nodeType!==3;)if((u.nodeType!==1||u.nodeName!=="INPUT"||u.type!=="hidden")&&!b||(u=Qs(u.nextSibling),u===null))return null;return u}function W6(u,h){for(;u.nodeType!==8;)if((u.nodeType!==1||u.nodeName!=="INPUT"||u.type!=="hidden")&&!h||(u=Qs(u.nextSibling),u===null))return null;return u}function iD(u){return u.data==="$?"||u.data==="$~"}function rD(u){return u.data==="$!"||u.data==="$?"&&u.ownerDocument.readyState!=="loading"}function tte(u,h){var b=u.ownerDocument;if(u.data==="$~")u._reactRetry=h;else if(u.data!=="$?"||b.readyState!=="loading")h();else{var _=function(){h(),b.removeEventListener("DOMContentLoaded",_)};b.addEventListener("DOMContentLoaded",_),u._reactRetry=_}}function Qs(u){for(;u!=null;u=u.nextSibling){var h=u.nodeType;if(h===1||h===3)break;if(h===8){if(h=u.data,h==="$"||h==="$!"||h==="$?"||h==="$~"||h==="&"||h==="F!"||h==="F")break;if(h==="/$"||h==="/&")return null}}return u}var sD=null;function H6(u){u=u.nextSibling;for(var h=0;u;){if(u.nodeType===8){var b=u.data;if(b==="/$"||b==="/&"){if(h===0)return Qs(u.nextSibling);h--}else b!=="$"&&b!=="$!"&&b!=="$?"&&b!=="$~"&&b!=="&"||h++}u=u.nextSibling}return null}function q6(u){u=u.previousSibling;for(var h=0;u;){if(u.nodeType===8){var b=u.data;if(b==="$"||b==="$!"||b==="$?"||b==="$~"||b==="&"){if(h===0)return u;h--}else b!=="/$"&&b!=="/&"||h++}u=u.previousSibling}return null}function $6(u,h,b){switch(h=Lb(b),u){case"html":if(u=h.documentElement,!u)throw Error(n(452));return u;case"head":if(u=h.head,!u)throw Error(n(453));return u;case"body":if(u=h.body,!u)throw Error(n(454));return u;default:throw Error(n(451))}}function qm(u){for(var h=u.attributes;h.length;)u.removeAttributeNode(h[0]);Ua(u)}var Zs=new Map,G6=new Set;function Ub(u){return typeof u.getRootNode=="function"?u.getRootNode():u.nodeType===9?u:u.ownerDocument}var rl=W.d;W.d={f:nte,r:ite,D:rte,C:ste,L:ote,m:ate,X:cte,S:lte,M:ute};function nte(){var u=rl.f(),h=Pb();return u||h}function ite(u){var h=Ko(u);h!==null&&h.tag===5&&h.type==="form"?uI(h):rl.r(u)}var pf=typeof document>"u"?null:document;function Y6(u,h,b){var _=pf;if(_&&typeof h=="string"&&h){var k=Hs(h);k='link[rel="'+u+'"][href="'+k+'"]',typeof b=="string"&&(k+='[crossorigin="'+b+'"]'),G6.has(k)||(G6.add(k),u={rel:u,crossOrigin:b,href:h},_.querySelector(k)===null&&(h=_.createElement("link"),Qi(h,"link",u),Mn(h),_.head.appendChild(h)))}}function rte(u){rl.D(u),Y6("dns-prefetch",u,null)}function ste(u,h){rl.C(u,h),Y6("preconnect",u,h)}function ote(u,h,b){rl.L(u,h,b);var _=pf;if(_&&u&&h){var k='link[rel="preload"][as="'+Hs(h)+'"]';h==="image"&&b&&b.imageSrcSet?(k+='[imagesrcset="'+Hs(b.imageSrcSet)+'"]',typeof b.imageSizes=="string"&&(k+='[imagesizes="'+Hs(b.imageSizes)+'"]')):k+='[href="'+Hs(u)+'"]';var P=k;switch(h){case"style":P=gf(u);break;case"script":P=bf(u)}Zs.has(P)||(u=f({rel:"preload",href:h==="image"&&b&&b.imageSrcSet?void 0:u,as:h},b),Zs.set(P,u),_.querySelector(k)!==null||h==="style"&&_.querySelector($m(P))||h==="script"&&_.querySelector(Gm(P))||(h=_.createElement("link"),Qi(h,"link",u),Mn(h),_.head.appendChild(h)))}}function ate(u,h){rl.m(u,h);var b=pf;if(b&&u){var _=h&&typeof h.as=="string"?h.as:"script",k='link[rel="modulepreload"][as="'+Hs(_)+'"][href="'+Hs(u)+'"]',P=k;switch(_){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":P=bf(u)}if(!Zs.has(P)&&(u=f({rel:"modulepreload",href:u},h),Zs.set(P,u),b.querySelector(k)===null)){switch(_){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(b.querySelector(Gm(P)))return}_=b.createElement("link"),Qi(_,"link",u),Mn(_),b.head.appendChild(_)}}}function lte(u,h,b){rl.S(u,h,b);var _=pf;if(_&&u){var k=Va(_).hoistableStyles,P=gf(u);h=h||"default";var z=k.get(P);if(!z){var X={loading:0,preload:null};if(z=_.querySelector($m(P)))X.loading=5;else{u=f({rel:"stylesheet",href:u,"data-precedence":h},b),(b=Zs.get(P))&&oD(u,b);var de=z=_.createElement("link");Mn(de),Qi(de,"link",u),de._p=new Promise(function(Ce,Oe){de.onload=Ce,de.onerror=Oe}),de.addEventListener("load",function(){X.loading|=1}),de.addEventListener("error",function(){X.loading|=2}),X.loading|=4,Vb(z,h,_)}z={type:"stylesheet",instance:z,count:1,state:X},k.set(P,z)}}}function cte(u,h){rl.X(u,h);var b=pf;if(b&&u){var _=Va(b).hoistableScripts,k=bf(u),P=_.get(k);P||(P=b.querySelector(Gm(k)),P||(u=f({src:u,async:!0},h),(h=Zs.get(k))&&aD(u,h),P=b.createElement("script"),Mn(P),Qi(P,"link",u),b.head.appendChild(P)),P={type:"script",instance:P,count:1,state:null},_.set(k,P))}}function ute(u,h){rl.M(u,h);var b=pf;if(b&&u){var _=Va(b).hoistableScripts,k=bf(u),P=_.get(k);P||(P=b.querySelector(Gm(k)),P||(u=f({src:u,async:!0,type:"module"},h),(h=Zs.get(k))&&aD(u,h),P=b.createElement("script"),Mn(P),Qi(P,"link",u),b.head.appendChild(P)),P={type:"script",instance:P,count:1,state:null},_.set(k,P))}}function K6(u,h,b,_){var k=(k=se.current)?Ub(k):null;if(!k)throw Error(n(446));switch(u){case"meta":case"title":return null;case"style":return typeof b.precedence=="string"&&typeof b.href=="string"?(h=gf(b.href),b=Va(k).hoistableStyles,_=b.get(h),_||(_={type:"style",instance:null,count:0,state:null},b.set(h,_)),_):{type:"void",instance:null,count:0,state:null};case"link":if(b.rel==="stylesheet"&&typeof b.href=="string"&&typeof b.precedence=="string"){u=gf(b.href);var P=Va(k).hoistableStyles,z=P.get(u);if(z||(k=k.ownerDocument||k,z={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},P.set(u,z),(P=k.querySelector($m(u)))&&!P._p&&(z.instance=P,z.state.loading=5),Zs.has(u)||(b={rel:"preload",as:"style",href:b.href,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy},Zs.set(u,b),P||dte(k,u,b,z.state))),h&&_===null)throw Error(n(528,""));return z}if(h&&_!==null)throw Error(n(529,""));return null;case"script":return h=b.async,b=b.src,typeof b=="string"&&h&&typeof h!="function"&&typeof h!="symbol"?
vendor: 6,719 bytes, line 9
9(h=bf(b),b=Va(k).hoistableScripts,_=b.get(h),_||(_={type:"script",instance:null,count:0,state:null},b.set(h,_)),_):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,u))}}function gf(u){return'href="'+Hs(u)+'"'}function $m(u){return'link[rel="stylesheet"]['+u+"]"}function X6(u){return f({},u,{"data-precedence":u.precedence,precedence:null})}function dte(u,h,b,_){u.querySelector('link[rel="preload"][as="style"]['+h+"]")?_.loading=1:(h=u.createElement("link"),_.preload=h,h.addEventListener("load",function(){return _.loading|=1}),h.addEventListener("error",function(){return _.loading|=2}),Qi(h,"link",b),Mn(h),u.head.appendChild(h))}function bf(u){return'[src="'+Hs(u)+'"]'}function Gm(u){return"script[async]"+u}function Q6(u,h,b){if(h.count++,h.instance===null)switch(h.type){case"style":var _=u.querySelector('style[data-href~="'+Hs(b.href)+'"]');if(_)return h.instance=_,Mn(_),_;var k=f({},b,{"data-href":b.href,"data-precedence":b.precedence,href:null,precedence:null});return _=(u.ownerDocument||u).createElement("style"),Mn(_),Qi(_,"style",k),Vb(_,b.precedence,u),h.instance=_;case"stylesheet":k=gf(b.href);var P=u.querySelector($m(k));if(P)return h.state.loading|=4,h.instance=P,Mn(P),P;_=X6(b),(k=Zs.get(k))&&oD(_,k),P=(u.ownerDocument||u).createElement("link"),Mn(P);var z=P;return z._p=new Promise(function(X,de){z.onload=X,z.onerror=de}),Qi(P,"link",_),h.state.loading|=4,Vb(P,b.precedence,u),h.instance=P;case"script":return P=bf(b.src),(k=u.querySelector(Gm(P)))?(h.instance=k,Mn(k),k):(_=b,(k=Zs.get(P))&&(_=f({},b),aD(_,k)),u=u.ownerDocument||u,k=u.createElement("script"),Mn(k),Qi(k,"link",_),u.head.appendChild(k),h.instance=k);case"void":return null;default:throw Error(n(443,h.type))}else h.type==="stylesheet"&&(h.state.loading&4)===0&&(_=h.instance,h.state.loading|=4,Vb(_,b.precedence,u));return h.instance}function Vb(u,h,b){for(var _=b.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),k=_.length?_[_.length-1]:null,P=k,z=0;z<_.length;z++){var X=_[z];if(X.dataset.precedence===h)P=X;else if(P!==k)break}P?P.parentNode.insertBefore(u,P.nextSibling):(h=b.nodeType===9?b.head:b,h.insertBefore(u,h.firstChild))}function oD(u,h){u.crossOrigin==null&&(u.crossOrigin=h.crossOrigin),u.referrerPolicy==null&&(u.referrerPolicy=h.referrerPolicy),u.title==null&&(u.title=h.title)}function aD(u,h){u.crossOrigin==null&&(u.crossOrigin=h.crossOrigin),u.referrerPolicy==null&&(u.referrerPolicy=h.referrerPolicy),u.integrity==null&&(u.integrity=h.integrity)}var jb=null;function Z6(u,h,b){if(jb===null){var _=new Map,k=jb=new Map;k.set(b,_)}else k=jb,_=k.get(b),_||(_=new Map,k.set(b,_));if(_.has(u))return _;for(_.set(u,null),b=b.getElementsByTagName(u),k=0;k<b.length;k++){var P=b[k];if(!(P[La]||P[ei]||u==="link"&&P.getAttribute("rel")==="stylesheet")&&P.namespaceURI!=="http://www.w3.org/2000/svg"){var z=P.getAttribute(h)||"";z=u+z;var X=_.get(z);X?X.push(P):_.set(z,[P])}}return _}function J6(u,h,b){u=u.ownerDocument||u,u.head.insertBefore(b,h==="title"?u.querySelector("head > title"):null)}function fte(u,h,b){if(b===1||h.itemProp!=null)return!1;switch(u){case"meta":case"title":return!0;case"style":if(typeof h.precedence!="string"||typeof h.href!="string"||h.href==="")break;return!0;case"link":if(typeof h.rel!="string"||typeof h.href!="string"||h.href===""||h.onLoad||h.onError)break;return h.rel==="stylesheet"?(u=h.disabled,typeof h.precedence=="string"&&u==null):!0;case"script":if(h.async&&typeof h.async!="function"&&typeof h.async!="symbol"&&!h.onLoad&&!h.onError&&h.src&&typeof h.src=="string")return!0}return!1}function eR(u){return!(u.type==="stylesheet"&&(u.state.loading&3)===0)}function hte(u,h,b,_){if(b.type==="stylesheet"&&(typeof _.media!="string"||matchMedia(_.media).matches!==!1)&&(b.state.loading&4)===0){if(b.instance===null){var k=gf(_.href),P=h.querySelector($m(k));if(P){h=P._p,h!==null&&typeof h=="object"&&typeof h.then=="function"&&(u.count++,u=zb.bind(u),h.then(u,u)),b.state.loading|=4,b.instance=P,Mn(P);return}P=h.ownerDocument||h,_=X6(_),(k=Zs.get(k))&&oD(_,k),P=P.createElement("link"),Mn(P);var z=P;z._p=new Promise(function(X,de){z.onload=X,z.onerror=de}),Qi(P,"link",_),b.instance=P}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(b,h),(h=b.state.preload)&&(b.state.loading&3)===0&&(u.count++,b=zb.bind(u),h.addEventListener("load",b),h.addEventListener("error",b))}}var lD=0;function mte(u,h){return u.stylesheets&&u.count===0&&Hb(u,u.stylesheets),0<u.count||0<u.imgCount?function(b){var _=setTimeout(function(){if(u.stylesheets&&Hb(u,u.stylesheets),u.unsuspend){var P=u.unsuspend;u.unsuspend=null,P()}},6e4+h);0<u.imgBytes&&lD===0&&(lD=62500*Yee());var k=setTimeout(function(){if(u.waitingForImages=!1,u.count===0&&(u.stylesheets&&Hb(u,u.stylesheets),u.unsuspend)){var P=u.unsuspend;u.unsuspend=null,P()}},(u.imgBytes>lD?50:800)+h);return u.unsuspend=b,function(){u.unsuspend=null,clearTimeout(_),clearTimeout(k)}}:null}function zb(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hb(this,this.stylesheets);else if(this.unsuspend){var u=this.unsuspend;this.unsuspend=null,u()}}}var Wb=null;function Hb(u,h){u.stylesheets=null,u.unsuspend!==null&&(u.count++,Wb=new Map,h.forEach(pte,u),Wb=null,zb.call(u))}function pte(u,h){if(!(h.state.loading&4)){var b=Wb.get(u);if(b)var _=b.get(null);else{b=new Map,Wb.set(u,b);for(var k=u.querySelectorAll("link[data-precedence],style[data-precedence]"),P=0;P<k.length;P++){var z=k[P];(z.nodeName==="LINK"||z.getAttribute("media")!=="not all")&&(b.set(z.dataset.precedence,z),_=z)}_&&b.set(null,_)}k=h.instance,z=k.getAttribute("data-precedence"),P=b.get(z)||_,P===_&&b.set(null,k),b.set(z,k),this.count++,_=zb.bind(this),k.addEventListener("load",_),k.addEventListener("error",_),P?P.parentNode.insertBefore(k,P.nextSibling):(u=u.nodeType===9?u.head:u,u.insertBefore(k,u.firstChild)),h.state.loading|=4}}var Ym={$$typeof:D,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function gte(u,h,b,_,k,P,z,X,de){this.tag=1,this.containerInfo=u,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ie(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ie(0),this.hiddenUpdates=Ie(null),this.identifierPrefix=_,this.onUncaughtError=k,this.onCaughtError=P,this.onRecoverableError=z,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=de,this.incompleteTransitions=new Map}
vendor: 6,897 bytes, line 9
9function tR(u,h,b,_,k,P,z,X,de,Ce,Oe,Me){return u=new gte(u,h,b,z,de,Ce,Oe,Me,X),h=1,P===!0&&(h|=24),P=gs(3,null,null,h),u.current=P,P.stateNode=u,h=j2(),h.refCount++,u.pooledCache=h,h.refCount++,P.memoizedState={element:_,isDehydrated:b,cache:h},q2(P),u}function nR(u){return u?(u=Gd,u):Gd}function iR(u,h,b,_,k,P){k=nR(k),_.context===null?_.context=k:_.pendingContext=k,_=Jl(h),_.payload={element:b},P=P===void 0?null:P,P!==null&&(_.callback=P),b=ec(u,_,h),b!==null&&($r(b,u,h),Tm(b,u,h))}function rR(u,h){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var b=u.retryLane;u.retryLane=b!==0&&b<h?b:h}}function cD(u,h){rR(u,h),(u=u.alternate)&&rR(u,h)}function sR(u){if(u.tag===13||u.tag===31){var h=lu(u,67108864);h!==null&&$r(h,u,67108864),cD(u,67108864)}}function oR(u){if(u.tag===13||u.tag===31){var h=xs();h=Gn(h);var b=lu(u,h);b!==null&&$r(b,u,h),cD(u,h)}}var qb=!0;function bte(u,h,b,_){var k=L.T;L.T=null;var P=W.p;try{W.p=2,uD(u,h,b,_)}finally{W.p=P,L.T=k}}function yte(u,h,b,_){var k=L.T;L.T=null;var P=W.p;try{W.p=8,uD(u,h,b,_)}finally{W.p=P,L.T=k}}function uD(u,h,b,_){if(qb){var k=dD(_);if(k===null)XC(u,h,_,$b,b),lR(u,_);else if(wte(k,u,h,b,_))_.stopPropagation();else if(lR(u,_),h&4&&-1<vte.indexOf(u)){for(;k!==null;){var P=Ko(k);if(P!==null)switch(P.tag){case 3:if(P=P.stateNode,P.current.memoizedState.isDehydrated){var z=$i(P.pendingLanes);if(z!==0){var X=P;for(X.pendingLanes|=2,X.entangledLanes|=2;z;){var de=1<<31-Xe(z);X.entanglements[1]|=de,z&=~de}Jo(P),(on&6)===0&&(kb=ae()+500,zm(0))}}break;case 31:case 13:X=lu(P,2),X!==null&&$r(X,P,2),Pb(),cD(P,2)}if(P=dD(_),P===null&&XC(u,h,_,$b,b),P===k)break;k=P}k!==null&&_.stopPropagation()}else XC(u,h,_,null,b)}}function dD(u){return u=h2(u),fD(u)}var $b=null;function fD(u){if($b=null,u=zs(u),u!==null){var h=s(u);if(h===null)u=null;else{var b=h.tag;if(b===13){if(u=o(h),u!==null)return u;u=null}else if(b===31){if(u=a(h),u!==null)return u;u=null}else if(b===3){if(h.stateNode.current.memoizedState.isDehydrated)return h.tag===3?h.stateNode.containerInfo:null;u=null}else h!==u&&(u=null)}}return $b=u,null}function aR(u){switch(u){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(me()){case De:return 2;case je:return 8;case tt:case bt:return 32;case it:return 268435456;default:return 32}default:return 32}}var hD=!1,dc=null,fc=null,hc=null,Km=new Map,Xm=new Map,mc=[],vte="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function lR(u,h){switch(u){case"focusin":case"focusout":dc=null;break;case"dragenter":case"dragleave":fc=null;break;case"mouseover":case"mouseout":hc=null;break;case"pointerover":case"pointerout":Km.delete(h.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xm.delete(h.pointerId)}}function Qm(u,h,b,_,k,P){return u===null||u.nativeEvent!==P?(u={blockedOn:h,domEventName:b,eventSystemFlags:_,nativeEvent:P,targetContainers:[k]},h!==null&&(h=Ko(h),h!==null&&sR(h)),u):(u.eventSystemFlags|=_,h=u.targetContainers,k!==null&&h.indexOf(k)===-1&&h.push(k),u)}function wte(u,h,b,_,k){switch(h){case"focusin":return dc=Qm(dc,u,h,b,_,k),!0;case"dragenter":return fc=Qm(fc,u,h,b,_,k),!0;case"mouseover":return hc=Qm(hc,u,h,b,_,k),!0;case"pointerover":var P=k.pointerId;return Km.set(P,Qm(Km.get(P)||null,u,h,b,_,k)),!0;case"gotpointercapture":return P=k.pointerId,Xm.set(P,Qm(Xm.get(P)||null,u,h,b,_,k)),!0}return!1}function cR(u){var h=zs(u.target);if(h!==null){var b=s(h);if(b!==null){if(h=b.tag,h===13){if(h=o(b),h!==null){u.blockedOn=h,go(u.priority,function(){oR(b)});return}}else if(h===31){if(h=a(b),h!==null){u.blockedOn=h,go(u.priority,function(){oR(b)});return}}else if(h===3&&b.stateNode.current.memoizedState.isDehydrated){u.blockedOn=b.tag===3?b.stateNode.containerInfo:null;return}}}u.blockedOn=null}function Gb(u){if(u.blockedOn!==null)return!1;for(var h=u.targetContainers;0<h.length;){var b=dD(u.nativeEvent);if(b===null){b=u.nativeEvent;var _=new b.constructor(b.type,b);f2=_,b.target.dispatchEvent(_),f2=null}else return h=Ko(b),h!==null&&sR(h),u.blockedOn=b,!1;h.shift()}return!0}function uR(u,h,b){Gb(u)&&b.delete(h)}function xte(){hD=!1,dc!==null&&Gb(dc)&&(dc=null),fc!==null&&Gb(fc)&&(fc=null),hc!==null&&Gb(hc)&&(hc=null),Km.forEach(uR),Xm.forEach(uR)}function Yb(u,h){u.blockedOn===h&&(u.blockedOn=null,hD||(hD=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,xte)))}var Kb=null;function dR(u){Kb!==u&&(Kb=u,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Kb===u&&(Kb=null);for(var h=0;h<u.length;h+=3){var b=u[h],_=u[h+1],k=u[h+2];if(typeof _!="function"){if(fD(_||b)===null)continue;break}var P=Ko(b);P!==null&&(u.splice(h,3),h-=3,dC(P,{pending:!0,data:k,method:b.method,action:_},_,k))}}))}function yf(u){function h(de){return Yb(de,u)}dc!==null&&Yb(dc,u),fc!==null&&Yb(fc,u),hc!==null&&Yb(hc,u),Km.forEach(h),Xm.forEach(h);for(var b=0;b<mc.length;b++){var _=mc[b];_.blockedOn===u&&(_.blockedOn=null)}for(;0<mc.length&&(b=mc[0],b.blockedOn===null);)cR(b),b.blockedOn===null&&mc.shift();if(b=(u.ownerDocument||u).$$reactFormReplay,b!=null)for(_=0;_<b.length;_+=3){var k=b[_],P=b[_+1],z=k[Ri]||null;if(typeof P=="function")z||dR(b);else if(z){var X=null;if(P&&P.hasAttribute("formAction")){if(k=P,z=P[Ri]||null)X=z.formAction;else if(fD(k)!==null)continue}else X=z.action;typeof X=="function"?b[_+1]=X:(b.splice(_,3),_-=3),dR(b)}}}function fR(){function u(P){P.canIntercept&&P.info==="react-transition"&&P.intercept({handler:function(){return new Promise(function(z){return k=z})},focusReset:"manual",scroll:"manual"})}function h(){k!==null&&(k(),k=null),_||setTimeout(b,20)}function b(){if(!_&&!navigation.transition){var P=navigation.currentEntry;
9P&&P.url!=null&&navigation.navigate(P.url,{state:P.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var _=!1,k=null;return navigation.addEventListener("navigate",u),navigation.addEventListener("navigatesuccess",h),navigation.addEventListener("navigateerror",h),setTimeout(b,100),function(){_=!0,navigation.removeEventListener("navigate",u),navigation.removeEventListener("navigatesuccess",h),navigation.removeEventListener("navigateerror",h),k!==null&&(k(),k=null)}}}function mD(u){this._internalRoot=u}Xb.prototype.render=mD.prototype.render=function(u){var h=this._internalRoot;if(h===null)throw Error(n(409));var b=h.current,_=xs();iR(b,_,u,h,null,null)},Xb.prototype.unmount=mD.prototype.unmount=function(){var u=this._internalRoot;if(u!==null){this._internalRoot=null;var h=u.containerInfo;iR(u.current,2,null,u,null,null),Pb(),h[Ur]=null}};function Xb(u){this._internalRoot=u}Xb.prototype.unstable_scheduleHydration=function(u){if(u){var h=iu();u={blockedOn:null,target:u,priority:h};for(var b=0;b<mc.length&&h!==0&&h<mc[b].priority;b++);mc.splice(b,0,u),b===0&&cR(u)}};var hR=e.version;if(hR!=="19.2.3")throw Error(n(527,hR,"19.2.3"));W.findDOMNode=function(u){var h=u._reactInternals;if(h===void 0)throw typeof u.render=="function"?Error(n(188)):(u=Object.keys(u).join(","),Error(n(268,u)));return u=c(h),u=u!==null?d(u):null,u=u===null?null:u.stateNode,u};var _te={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qb=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qb.isDisabled&&Qb.supportsFiber)try{pe=Qb.inject(_te),Fe=Qb}catch{}}return Jm.createRoot=function(u,h){if(!r(u))throw Error(n(299));var b=!1,_="",k=wI,P=xI,z=_I;return h!=null&&(h.unstable_strictMode===!0&&(b=!0),h.identifierPrefix!==void 0&&(_=h.identifierPrefix),h.onUncaughtError!==void 0&&(k=h.onUncaughtError),h.onCaughtError!==void 0&&(P=h.onCaughtError),h.onRecoverableError!==void 0&&(z=h.onRecoverableError)),h=tR(u,1,!1,null,null,b,_,null,k,P,z,fR),u[Ur]=h.current,KC(u),new mD(h)},Jm.hydrateRoot=function(u,h,b){if(!r(u))throw Error(n(299));var _=!1,k="",P=wI,z=xI,X=_I,de=null;return b!=null&&(b.unstable_strictMode===!0&&(_=!0),b.identifierPrefix!==void 0&&(k=b.identifierPrefix),b.onUncaughtError!==void 0&&(P=b.onUncaughtError),b.onCaughtError!==void 0&&(z=b.onCaughtError),b.onRecoverableError!==void 0&&(X=b.onRecoverableError),b.formState!==void 0&&(de=b.formState)),h=tR(u,1,!0,h,b??null,_,k,de,P,z,X,fR),h.context=nR(null),b=h.current,_=xs(),_=Gn(_),k=Jl(_),k.callback=null,ec(b,k,_),b=_,h.current.lanes=b,ze(h,b),Jo(h),u[Ur]=h.current,KC(u),new Xb(h)},Jm.version="19.2.3",Jm}var CR;function Rte(){if(CR)return bD.exports;CR=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),bD.exports=Ite(),bD.exports}var Fte=Rte();var DR="popstate";function Ote(i={}){function e(n,r){let{pathname:s,search:o,hash:a}=n.location;return nk("",{pathname:s,search:o,hash:a},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function t(n,r){return typeof r=="string"?r:pg(r)}return Bte(e,t,null,i)}function Pi(i,e){if(i===!1||i===null||typeof i>"u")throw new Error(e)}function Ns(i,e){if(!i){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Nte(){return Math.random().toString(36).substring(2,10)}function ER(i,e){return{usr:i.state,key:i.key,idx:e}}function nk(i,e,t=null,n){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof e=="string"?s0(e):e,state:t,key:e&&e.key||n||Nte()}}function pg({pathname:i="/",search:e="",hash:t=""}){return e&&e!=="?"&&(i+=e.charAt(0)==="?"?e:"?"+e),t&&t!=="#"&&(i+=t.charAt(0)==="#"?t:"#"+t),i}function s0(i){let e={};if(i){let t=i.indexOf("#");t>=0&&(e.hash=i.substring(t),i=i.substring(0,t));let n=i.indexOf("?");n>=0&&(e.search=i.substring(n),i=i.substring(0,n)),i&&(e.pathname=i)}return e}function Bte(i,e,t,n={}){let{window:r=document.defaultView,v5Compat:s=!1}=n,o=r.history,a="POP",l=null,c=d();c==null&&(c=0,o.replaceState({...o.state,idx:c},""));function d(){return(o.state||{idx:null}).idx}function f(){a="POP";let v=d(),x=v==null?null:v-c;c=v,l&&l({action:a,location:y.location,delta:x})}function m(v,x){a="PUSH";let C=nk(y.location,v,x);c=d()+1;let D=ER(C,c),E=y.createHref(C);try{o.pushState(D,"",E)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;r.location.assign(E)}s&&l&&l({action:a,location:y.location,delta:1})}function p(v,x){a="REPLACE";let C=nk(y.location,v,x);c=d();let D=ER(C,c),E=y.createHref(C);o.replaceState(D,"",E),s&&l&&l({action:a,location:y.location,delta:0})}function g(v){return Mte(v)}let y={get action(){return a},get location(){return i(r,o)},listen(v){if(l)throw new Error("A history only accepts one active listener");
9return r.addEventListener(DR,f),l=v,()=>{r.removeEventListener(DR,f),l=null}},createHref(v){return e(r,v)},createURL:g,encodeLocation(v){let x=g(v);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:m,replace:p,go(v){return o.go(v)}};return y}function Mte(i,e=!1){let t="http://localhost";typeof window<"u"&&(t=window.location.origin!=="null"?window.location.origin:window.location.href),Pi(t,"No window.location.(origin|href) available to create URL");let n=typeof i=="string"?i:pg(i);return n=n.replace(/ $/,"%20"),!e&&n.startsWith("//")&&(n=t+n),new URL(n,t)}function lz(i,e,t="/"){return Lte(i,e,t,!1)}function Lte(i,e,t,n){let r=typeof e=="string"?s0(e):e,s=Al(r.pathname||"/",t);if(s==null)return null;let o=cz(i);Ute(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=Xte(s);a=Yte(o[l],c,n)}return a}function cz(i,e=[],t=[],n="",r=!1){let s=(o,a,l=r,c)=>{let d={relativePath:c===void 0?o.path||"":c,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(n)&&l)return;Pi(d.relativePath.startsWith(n),`Absolute route path "${d.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(n.length)}let f=yl([n,d.relativePath]),m=t.concat(d);o.children&&o.children.length>0&&(Pi(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),cz(o.children,e,m,f,l)),!(o.path==null&&!o.index)&&e.push({path:f,score:$te(f,o.index),routesMeta:m})};return i.forEach((o,a)=>{if(o.path===""||!o.path?.includes("?"))s(o,a);else for(let l of uz(o.path))s(o,a,!0,l)}),e}function uz(i){let e=i.split("/");if(e.length===0)return[];let[t,...n]=e,r=t.endsWith("?"),s=t.replace(/\?$/,"");if(n.length===0)return r?[s,""]:[s];let o=uz(n.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),r&&a.push(...o),a.map(l=>i.startsWith("/")&&l===""?"/":l)}function Ute(i){i.sort((e,t)=>e.score!==t.score?t.score-e.score:Gte(e.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}var Vte=/^:[\w-]+$/,jte=3,zte=2,Wte=1,Hte=10,qte=-2,TR=i=>i==="*";function $te(i,e){let t=i.split("/"),n=t.length;return t.some(TR)&&(n+=qte),e&&(n+=zte),t.filter(r=>!TR(r)).reduce((r,s)=>r+(Vte.test(s)?jte:s===""?Wte:Hte),n)}function Gte(i,e){return i.length===e.length&&i.slice(0,-1).every((n,r)=>n===e[r])?i[i.length-1]-e[e.length-1]:0}function Yte(i,e,t=!1){let{routesMeta:n}=i,r={},s="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,d=s==="/"?e:e.slice(s.length)||"/",f=iw({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),m=l.route;if(!f&&c&&t&&!n[n.length-1].route.index&&(f=iw({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;
9Object.assign(r,f.params),o.push({params:r,pathname:yl([s,f.pathname]),pathnameBase:ene(yl([s,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(s=yl([s,f.pathnameBase]))}return o}function iw(i,e){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[t,n]=Kte(i.path,i.caseSensitive,i.end),r=e.match(t);if(!r)return null;let s=r[0],o=s.replace(/(.)\/+$/,"$1"),a=r.slice(1);return{params:n.reduce((c,{paramName:d,isOptional:f},m)=>{if(d==="*"){let g=a[m]||"";o=s.slice(0,s.length-g.length).replace(/(.)\/+$/,"$1")}const p=a[m];return f&&!p?c[d]=void 0:c[d]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:i}}function Kte(i,e=!1,t=!0){Ns(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let n=[],r="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(n.push({paramName:"*"}),r+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?r+="\\/*$":i!==""&&i!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),n]}function Xte(i){try{return i.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Ns(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),i}}function Al(i,e){if(e==="/")return i;if(!i.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,n=i.charAt(t);return n&&n!=="/"?null:i.slice(t)||"/"}var dz=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Qte=i=>dz.test(i);function Zte(i,e="/"){let{pathname:t,search:n="",hash:r=""}=typeof i=="string"?s0(i):i,s;if(t)if(Qte(t))s=t;else{if(t.includes("//")){let o=t;t=t.replace(/\/\/+/g,"/"),Ns(!1,`Pathnames cannot have embedded double slashes - normalizing ${o} -> ${t}`)}t.startsWith("/")?s=AR(t.substring(1),"/"):s=AR(t,e)}else s=e;return{pathname:s,search:tne(n),hash:nne(r)}}function AR(i,e){let t=e.replace(/\/+$/,"").split("/");return i.split("/").forEach(r=>{r===".."?t.length>1&&t.pop():r!=="."&&t.push(r)}),t.length>1?t.join("/"):"/"}function xD(i,e,t,n){return`Cannot include a '${i}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Jte(i){return i.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function t5(i){let e=Jte(i);return e.map((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)}function n5(i,e,t,n=!1){let r;typeof i=="string"?r=s0(i):(r={...i},Pi(!r.pathname||!r.pathname.includes("?"),xD("?","pathname","search",r)),Pi(!r.pathname||!r.pathname.includes("#"),xD("#","pathname","hash",r)),Pi(!r.search||!r.search.includes("#"),xD("#","search","hash",r)));let s=i===""||r.pathname==="",o=s?"/":r.pathname,a;if(o==null)a=t;else{let f=e.length-1;if(!n&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),f-=1;r.pathname=m.join("/")}a=f>=0?e[f]:"/"}let l=Zte(r,a),c=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}var yl=i=>i.join("/").replace(/\/\/+/g,"/"),ene=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),tne=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,nne=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,ine=class{constructor(i,e,t,n=!1){this.status=i,this.statusText=e||"",this.internal=n,t instanceof Error?(this.data=t.toString(),this.error=t):this.data=t}};function rne(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function sne(i){return i.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var fz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function hz(i,e){let t=i;if(typeof t!="string"||!dz.test(t))return{absoluteURL:void 0,isExternal:!1,to:t};let n=t,r=!1;if(fz)try{let s=new URL(window.location.href),o=t.startsWith("//")?new URL(s.protocol+t):new URL(t),a=Al(o.pathname,e);o.origin===s.origin&&a!=null?t=a+o.search+o.hash:r=!0}catch{Ns(!1,`<Link to="${t}">
9 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:r,to:t}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var mz=["POST","PUT","PATCH","DELETE"];new Set(mz);var one=["GET",...mz];new Set(one);var $h=M.createContext(null);$h.displayName="DataRouter";var Px=M.createContext(null);Px.displayName="DataRouterState";var ane=M.createContext(!1),pz=M.createContext({isTransitioning:!1});pz.displayName="ViewTransition";var lne=M.createContext(new Map);lne.displayName="Fetchers";var cne=M.createContext(null);cne.displayName="Await";var Vs=M.createContext(null);Vs.displayName="Navigation";var Ix=M.createContext(null);Ix.displayName="Location";var Ho=M.createContext({outlet:null,matches:[],isDataRoute:!1});Ho.displayName="Route";var i5=M.createContext(null);i5.displayName="RouteError";var gz="REACT_ROUTER_ERROR",une="REDIRECT",dne="ROUTE_ERROR_RESPONSE";function fne(i){if(i.startsWith(`${gz}:${une}:{`))try{let e=JSON.parse(i.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function hne(i){if(i.startsWith(`${gz}:${dne}:{`))try{let e=JSON.parse(i.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new ine(e.status,e.statusText,e.data)}catch{}}function mne(i,{relative:e}={}){Pi(Gh(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:n}=M.useContext(Vs),{hash:r,pathname:s,search:o}=o0(i,{relative:e}),a=s;return t!=="/"&&(a=s==="/"?t:yl([t,s])),n.createHref({pathname:a,search:o,hash:r})}function Gh(){return M.useContext(Ix)!=null}function wr(){return Pi(Gh(),"useLocation() may be used only in the context of a <Router> component."),M.useContext(Ix).location}var bz="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function yz(i){M.useContext(Vs).static||M.useLayoutEffect(i)}function Mt(){let{isDataRoute:i}=M.useContext(Ho);return i?Sne():pne()}function pne(){Pi(Gh(),"useNavigate() may be used only in the context of a <Router> component.");let i=M.useContext($h),{basename:e,navigator:t}=M.useContext(Vs),{matches:n}=M.useContext(Ho),{pathname:r}=wr(),s=JSON.stringify(t5(n)),o=M.useRef(!1);return yz(()=>{o.current=!0}),M.useCallback((l,c={})=>{if(Ns(o.current,bz),!o.current)return;if(typeof l=="number"){t.go(l);return}let d=n5(l,JSON.parse(s),r,c.relative==="path");i==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:yl([e,d.pathname])),(c.replace?t.replace:t.push)(d,c.state,c)},[e,t,s,r,i])}var gne=M.createContext(null);function bne(i){let e=M.useContext(Ho).outlet;return M.useMemo(()=>e&&M.createElement(gne.Provider,{value:i},e),[e,i])}function o0(i,{relative:e}={}){let{matches:t}=M.useContext(Ho),{pathname:n}=wr(),r=JSON.stringify(t5(t));return M.useMemo(()=>n5(i,JSON.parse(r),n,e==="path"),[i,r,n,e])}function yne(i,e){return vz(i)}function vz(i,e,t,n,r){Pi(Gh(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=M.useContext(Vs),{matches:o}=M.useContext(Ho),a=o[o.length-1],l=a?a.params:{},c=a?a.pathname:"/",d=a?a.pathnameBase:"/",f=a&&a.route;{let C=f&&f.path||"";xz(c,!f||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
11Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let m=wr(),p;p=m;let g=p.pathname||"/",y=g;if(d!=="/"){let C=d.replace(/^\//,"").split("/");y="/"+g.replace(/^\//,"").split("/").slice(C.length).join("/")}let v=lz(i,{pathname:y});return Ns(f||v!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),Ns(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Cne(v&&v.map(C=>Object.assign({},C,{params:Object.assign({},l,C.params),pathname:yl([d,s.encodeLocation?s.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?d:yl([d,s.encodeLocation?s.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),o,t,n,r)}function vne(){let i=kne(),e=rne(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),t=i instanceof Error?i.stack:null,n="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",i),o=M.createElement(M.Fragment,null,M.createElement("p",null,"💿 Hey developer 👋"),M.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",M.createElement("code",{style:s},"ErrorBoundary")," or"," ",M.createElement("code",{style:s},"errorElement")," prop on your route.")),M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application 
11Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},e),t?M.createElement("pre",{style:r},t):null,o)}var wne=M.createElement(vne,null),wz=class extends M.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,e){return e.location!==i.location||e.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:e.error,location:e.location,revalidation:i.revalidation||e.revalidation}}componentDidCatch(i,e){this.props.onError?this.props.onError(i,e):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const t=hne(i.digest);t&&(i=t)}let e=i!==void 0?M.createElement(Ho.Provider,{value:this.props.routeContext},M.createElement(i5.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?M.createElement(xne,{error:i},e):e}};wz.contextType=ane;var _D=new WeakMap;function xne({children:i,error:e}){let{basename:t}=M.useContext(Vs);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let n=fne(e.digest);if(n){let r=_D.get(e);if(r)throw r;let s=hz(n.location,t);if(fz&&!_D.get(e))if(s.isExternal||n.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:n.replace}));throw _D.set(e,o),o}return M.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return i}function _ne({routeContext:i,match:e,children:t}){let n=M.useContext($h);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),M.createElement(Ho.Provider,{value:i},t)}function Cne(i,e=[],t=null,n=null,r=null){if(i==null){if(!t)return null;if(t.errors)i=t.matches;else if(e.length===0&&!t.initialized&&t.matches.length>0)i=t.matches;else return null}let s=i,o=t?.errors;if(o!=null){let d=s.findIndex(f=>f.route.id&&o?.[f.route.id]!==void 0);Pi(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,d+1))}let a=!1,l=-1;if(t)for(let d=0;d<s.length;d++){let f=s[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(l=d),f.route.id){let{loaderData:m,errors:p}=t,g=f.route.loader&&!m.hasOwnProperty(f.route.id)&&(!p||p[f.route.id]===void 0);if(f.route.lazy||g){a=!0,l>=0?s=s.slice(0,l+1):s=[s[0]];break}}}let c=t&&n?(d,f)=>{n(d,{location:t.location,params:t.matches?.[0]?.params??{},unstable_pattern:sne(t.matches),errorInfo:f})}:void 0;return s.reduceRight((d,f,m)=>{let p,g=!1,y=null,v=null;t&&(p=o&&f.route.id?o[f.route.id]:void 0,y=f.route.errorElement||wne,a&&(l<0&&m===0?(xz("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,v=null):l===m&&(g=!0,v=f.route.hydrateFallbackElement||null)));let x=e.concat(s.slice(0,m+1)),C=()=>{let D;return p?D=y:g?D=v:f.route.Component?D=M.createElement(f.route.Component,null):f.route.element?D=f.route.element:D=d,M.createElement(_ne,{match:f,routeContext:{outlet:d,matches:x,isDataRoute:t!=null},children:D})};return t&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?M.createElement(wz,{location:t.location,revalidation:t.revalidation,component:y,error:p,children:C(),routeContext:{outlet:null,matches:x,isDataRoute:!0},onError:c}):C()},null)}function r5(i){return`${i} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Dne(i){let e=M.useContext($h);return Pi(e,r5(i)),e}function Ene(i){let e=M.useContext(Px);return Pi(e,r5(i)),e}function Tne(i){let e=M.useContext(Ho);return Pi(e,r5(i)),e}function s5(i){let e=Tne(i),t=e.matches[e.matches.length-1];return Pi(t.route.id,`${i} can only be used on routes that contain a unique "id"`),t.route.id}function Ane(){return s5("useRouteId")}function kne(){let i=M.useContext(i5),e=Ene("useRouteError"),t=s5("useRouteError");return i!==void 0?i:e.errors?.[t]}function Sne(){let{router:i}=Dne("useNavigate"),e=s5("useNavigate"),t=M.useRef(!1);return yz(()=>{t.current=!0}),M.useCallback(async(r,s={})=>{Ns(t.current,bz),t.current&&(typeof r=="number"?await i.navigate(r):await i.navigate(r,{fromRouteId:e,...s}))},[i,e])}var kR={};function xz(i,e,t){!e&&!kR[i]&&(kR[i]=!0,Ns(!1,t))}M.memo(Pne);function Pne({routes:i,future:e,state:t,onError:n}){return vz(i,void 0,t,n,e)}function SR({to:i,replace:e,state:t,relative:n}){Pi(Gh(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=M.useContext(Vs);Ns(!r,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=M.useContext(Ho),{pathname:o}=wr(),a=Mt(),l=n5(i,t5(s),o,n==="path"),c=JSON.stringify(l);return M.useEffect(()=>{a(JSON.parse(c),{replace:e,state:t,relative:n})},[a,c,n,e,t]),null}function Ine(i){return bne(i.context)}function Rne({basename:i="/",children:e=null,location:t,navigationType:n="POP",navigator:r,static:s=!1,unstable_useTransitions:o}){Pi(!Gh(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=i.replace(/^\/*/,"/"),l=M.useMemo(()=>({basename:a,navigator:r,static:s,unstable_useTransitions:o,future:{}}),[a,r,s,o]);typeof t=="string"&&(t=s0(t));let{pathname:c="/",search:d="",hash:f="",state:m=null,key:p="default"}=t,g=M.useMemo(()=>{let y=Al(c,a);return y==null?null:{location:{pathname:y,search:d,hash:f,state:m,ke
11y:p},navigationType:n}},[a,c,d,f,m,p,n]);return Ns(g!=null,`<Router basename="${a}"> is not able to match the URL "${c}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:M.createElement(Vs.Provider,{value:l},M.createElement(Ix.Provider,{children:e,value:g}))}var hv="get",mv="application/x-www-form-urlencoded";function Rx(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function Fne(i){return Rx(i)&&i.tagName.toLowerCase()==="button"}function One(i){return Rx(i)&&i.tagName.toLowerCase()==="form"}function Nne(i){return Rx(i)&&i.tagName.toLowerCase()==="input"}function Bne(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function Mne(i,e){return i.button===0&&(!e||e==="_self")&&!Bne(i)}function ik(i=""){return new URLSearchParams(typeof i=="string"||Array.isArray(i)||i instanceof URLSearchParams?i:Object.keys(i).reduce((e,t)=>{let n=i[t];return e.concat(Array.isArray(n)?n.map(r=>[t,r]):[[t,n]])},[]))}function Lne(i,e){let t=ik(i);return e&&e.forEach((n,r)=>{t.has(r)||e.getAll(r).forEach(s=>{t.append(r,s)})}),t}var Zb=null;function Une(){if(Zb===null)try{new FormData(document.createElement("form"),0),Zb=!1}catch{Zb=!0}return Zb}var Vne=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function CD(i){return i!=null&&!Vne.has(i)?(Ns(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${mv}"`),null):i}function jne(i,e){let t,n,r,s,o;if(One(i)){let a=i.getAttribute("action");n=a?Al(a,e):null,t=i.getAttribute("method")||hv,r=CD(i.getAttribute("enctype"))||mv,s=new FormData(i)}else if(Fne(i)||Nne(i)&&(i.type==="submit"||i.type==="image")){let a=i.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=i.getAttribute("formaction")||a.getAttribute("action");if(n=l?Al(l,e):null,t=i.getAttribute("formmethod")||a.getAttribute("method")||hv,r=CD(i.getAttribute("formenctype"))||CD(a.getAttribute("enctype"))||mv,s=new FormData(a,i),!Une()){let{name:c,type:d,value:f}=i;if(d==="image"){let m=c?`${c}.`:"";s.append(`${m}x`,"0"),s.append(`${m}y`,"0")}else c&&s.append(c,f)}}else{if(Rx(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=hv,n=null,r=mv,o=i}return s&&r==="text/plain"&&(o=s,s=void 0),{action:n,method:t.toLowerCase(),encType:r,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function o5(i,e){if(i===!1||i===null||typeof i>"u")throw new Error(e)}function zne(i,e,t){let n=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return n.pathname==="/"?n.pathname=`_root.${t}`:e&&Al(n.pathname,e)==="/"?n.pathname=`${e.replace(/\/$/,"")}/_root.${t}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${t}`,n}async function Wne(i,e){if(i.id in e)return e[i.id];try{let t=await import(i.module);return e[i.id]=t,t}catch(t){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Hne(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function qne(i,e,t){let n=await Promise.all(i.map(async r=>{let s=e.routes[r.route.id];if(s){let o=await Wne(s,t);return o.links?o.links():[]}return[]}));return Kne(n.flat(1).filter(Hne).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function PR(i,e,t,n,r,s){let o=(l,c)=>t[c]?l.route.id!==t[c].route.id:!0,a=(l,c)=>t[c].pathname!==l.pathname||t[c].route.path?.endsWith("*")&&t[c].params["*"]!==l.params["*"];return s==="assets"?e.filter((l,c)=>o(l,c)||a(l,c)):s==="data"?e.filter((l,c)=>{let d=n.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(o(l,c)||a(l,c))return!0;if(l.route.shouldRevalidate){let f=l.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParam
11s:t[0]?.params||{},nextUrl:new URL(i,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function $ne(i,e,{includeHydrateFallback:t}={}){return Gne(i.map(n=>{let r=e.routes[n.route.id];if(!r)return[];let s=[r.module];return r.clientActionModule&&(s=s.concat(r.clientActionModule)),r.clientLoaderModule&&(s=s.concat(r.clientLoaderModule)),t&&r.hydrateFallbackModule&&(s=s.concat(r.hydrateFallbackModule)),r.imports&&(s=s.concat(r.imports)),s}).flat(1))}function Gne(i){return[...new Set(i)]}function Yne(i){let e={},t=Object.keys(i).sort();for(let n of t)e[n]=i[n];return e}function Kne(i,e){let t=new Set;return new Set(e),i.reduce((n,r)=>{let s=JSON.stringify(Yne(r));return t.has(s)||(t.add(s),n.push({key:s,link:r})),n},[])}function _z(){let i=M.useContext($h);return o5(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function Xne(){let i=M.useContext(Px);return o5(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var a5=M.createContext(void 0);a5.displayName="FrameworkContext";function Cz(){let i=M.useContext(a5);return o5(i,"You must render this element inside a <HydratedRouter> element"),i}function Qne(i,e){let t=M.useContext(a5),[n,r]=M.useState(!1),[s,o]=M.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:c,onMouseLeave:d,onTouchStart:f}=e,m=M.useRef(null);M.useEffect(()=>{if(i==="render"&&o(!0),i==="viewport"){let y=x=>{x.forEach(C=>{o(C.isIntersecting)})},v=new IntersectionObserver(y,{threshold:.5});return m.current&&v.observe(m.current),()=>{v.disconnect()}}},[i]),M.useEffect(()=>{if(n){let y=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(y)}}},[n]);let p=()=>{r(!0)},g=()=>{r(!1),o(!1)};return t?i!=="intent"?[s,m,{}]:[s,m,{onFocus:ep(a,p),onBlur:ep(l,g),onMouseEnter:ep(c,p),onMouseLeave:ep(d,g),onTouchStart:ep(f,p)}]:[!1,m,{}]}function ep(i,e){return t=>{i&&i(t),t.defaultPrevented||e(t)}}function Zne({page:i,...e}){let{router:t}=_z(),n=M.useMemo(()=>lz(t.routes,i,t.basename),[t.routes,i,t.basename]);return n?M.createElement(eie,{page:i,matches:n,...e}):null}function Jne(i){let{manifest:e,routeModules:t}=Cz(),[n,r]=M.useState([]);return M.useEffect(()=>{let s=!1;return qne(i,e,t).then(o=>{s||r(o)}),()=>{s=!0}},[i,e,t]),n}function eie({page:i,matches:e,...t}){let n=wr(),{manifest:r,routeModules:s}=Cz(),{basename:o}=_z(),{loaderData:a,matches:l}=Xne(),c=M.useMemo(()=>PR(i,e,l,r,n,"data"),[i,e,l,r,n]),d=M.useMemo(()=>PR(i,e,l,r,n,"assets"),[i,e,l,r,n]),f=M.useMemo(()=>{if(i===n.pathname+n.search+n.hash)return[];let g=new Set,y=!1;if(e.forEach(x=>{let C=r.routes[x.route.id];!C||!C.hasLoader||(!c.some(D=>D.route.id===x.route.id)&&x.route.id in a&&s[x.route.id]?.shouldRevalidate||C.hasClientLoader?y=!0:g.add(x.route.id))}),g.size===0)return[];let v=zne(i,o,"data");return y&&g.size>0&&v.searchParams.set("_routes",e.filter(x=>g.has(x.route.id)).map(x=>x.route.id).join(",")),[v.pathname+v.search]},[o,a,n,r,c,e,i,s]),m=M.useMemo(()=>$ne(d,r),[d,r]),p=Jne(d);return M.createElement(M.Fragment,null,f.map(g=>M.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...t})),m.map(g=>M.createElement("link",{key:g,rel:"modulepreload",href:g,...t})),p.map(({key:g,link:y})=>M.createElement("link",{key:g,nonce:t.nonce,...y})))}function tie(...i){return e=>{i.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var nie=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{nie&&(window.__reactRouterVersion="7.11.0")}catch{}function iie({basename:i,children:e,unstable_useTransitions:t,window:n}){let r=M.useRef();r.current==null&&(r.current=Ote({window:n,v5Compat:!0}));let s=r.current,[o,a]=M.useState({action:s.action,location:s.location}),l=M.useCallback(c=>{t===!1?a(c):M.startTransition(()=>a(c))},[t]);return M.useLayoutEffect(()=>s.listen(l),[s,l]),M.createElement(Rne,{basename:i,children:e,location:o.location,navigationType:o.action,navigator:s,unstable_useTransitions:t})}var Dz=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,In=M.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:m,...p},g){let{basename:y,unstable_useTransitions:v}=M.useContext(Vs),x=typeof c=="string"&&Dz.test(c),C=hz(c,y);c=C.to;let D=mne(c,{relative:r}),[E,T,S]=Qne(n,p),A=aie(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:r,viewTransition:f,unstable_defaultShouldRevalidate:m,unstable_useTransitions:v});function I(O){e&&e(O),O.defaultPrevented||A(O)}let R=M.createElement("a",{...p,...S,href:C.absoluteURL||D,onClick:C.isExternal||s?e:I,ref:tie(g,T),target:l,"data-discover":!x&&t==="render"?"true":void 0});return E&&!x?M.createElement(M.Fragment,null,R,M.createElement(Zne,{page:D})):R});In.displayName="Link";var rie=M.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:s,to:o,viewTransition:a,children:l,...c},d){let f=o0(o,{relative:c.relative}),m=wr(),p=M.useContext(Px),{navigator:g,basename:y}=M.useContext(Vs),v=p!=null&&fie(f)&&a===!0,x=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,C=m.pathname,D=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(C=C.toLowerCase(),D=D?D.toLowerCase():null,x=x.toLowerCase()),D&&y&&(D=Al(D,y)||D);const E=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let T=C===x||!r&&C.startsWith(x)&&C.charAt(E)==="/",S=D!=null&&(D===x||!r&&D.startsWith(x)&&D.charAt(x.length)==="/"),A={isActive:T,isPending:S,isTransitioning:v},I=T?e:void 0,R;typeof n=="function"?R=n(A):R=[n,T?"active":null,S?"pending":null,v?"transitioning":null].filter(
11Boolean).join(" ");let O=typeof s=="function"?s(A):s;return M.createElement(In,{...c,"aria-current":I,className:R,ref:d,style:O,to:o,viewTransition:a},typeof l=="function"?l(A):l)});rie.displayName="NavLink";var sie=M.forwardRef(({discover:i="render",fetcherKey:e,navigate:t,reloadDocument:n,replace:r,state:s,method:o=hv,action:a,onSubmit:l,relative:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:m,...p},g)=>{let{unstable_useTransitions:y}=M.useContext(Vs),v=uie(),x=die(a,{relative:c}),C=o.toLowerCase()==="get"?"get":"post",D=typeof a=="string"&&Dz.test(a),E=T=>{if(l&&l(T),T.defaultPrevented)return;T.preventDefault();let S=T.nativeEvent.submitter,A=S?.getAttribute("formmethod")||o,I=()=>v(S||T.currentTarget,{fetcherKey:e,method:A,navigate:t,replace:r,state:s,relative:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:m});y&&t!==!1?M.startTransition(()=>I()):I()};return M.createElement("form",{ref:g,method:C,action:x,onSubmit:n?l:E,...p,"data-discover":!D&&i==="render"?"true":void 0})});sie.displayName="Form";function oie(i){return`${i} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ez(i){let e=M.useContext($h);return Pi(e,oie(i)),e}function aie(i,{target:e,replace:t,state:n,preventScrollReset:r,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:a,unstable_useTransitions:l}={}){let c=Mt(),d=wr(),f=o0(i,{relative:s});return M.useCallback(m=>{if(Mne(m,e)){m.preventDefault();let p=t!==void 0?t:pg(d)===pg(f),g=()=>c(i,{replace:p,state:n,preventScrollReset:r,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:a});l?M.startTransition(()=>g()):g()}},[d,c,f,t,n,e,i,r,s,o,a,l])}function $t(i){Ns(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let e=M.useRef(ik(i)),t=M.useRef(!1),n=wr(),r=M.useMemo(()=>Lne(n.search,t.current?null:e.current),[n.search]),s=Mt(),o=M.useCallback((a,l)=>{const c=ik(typeof a=="function"?a(new URLSearchParams(r)):a);t.current=!0,s("?"+c,l)},[s,r]);return[r,o]}var lie=0,cie=()=>`__${String(++lie)}__`;function uie(){let{router:i}=Ez("useSubmit"),{basename:e}=M.useContext(Vs),t=Ane(),n=i.fetch,r=i.navigate;return M.useCallback(async(s,o={})=>{let{action:a,method:l,encType:c,formData:d,body:f}=jne(s,e);if(o.navigate===!1){let m=o.fetcherKey||cie();await n(m,t,o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:d,body:f,formMethod:o.method||l,formEncType:o.encType||c,flushSync:o.flushSync})}else await r(o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:d,body:f,formMethod:o.method||l,formEncType:o.encType||c,replace:o.replace,state:o.state,fromRouteId:t,flushSync:o.flushSync,viewTransition:o.viewTransition})},[n,r,e,t])}function die(i,{relative:e}={}){let{basename:t}=M.useContext(Vs),n=M.useContext(Ho);Pi(n,"useFormAction must be used inside a RouteContext");let[r]=n.matches.slice(-1),s={...o0(i||".",{relative:e})},o=wr();if(i==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(d=>d==="")){a.delete("index"),l.filter(f=>f).forEach(f=>a.append("index",f));let d=a.toString();s.search=d?`?${d}`:""}}return(!i||i===".")&&r.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(s.pathname=s.pathname==="/"?t:yl([t,s.pathname])),pg(s)}function fie(i,{relative:e}={}){let t=M.useContext(pz);Pi(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Ez("useViewTransitionState"),r=o0(i,{relative:e});if(!t.isTransitioning)return!1;let s=Al(t.currentLocation.pathname,n)||t.currentLocation.pathname,o=Al(t.nextLocation.pathname,n)||t.nextLocation.pathname;return iw(r.pathname,o)!=null||iw(r.pathname,s)!=null}var l5=az();const hie=kx(l5);function Ji(i){return`Minified Redux error #${i}; visit https://redux.js.org/Errors?code=${i} for the full message or use the non-minified dev environment for full errors. `}var mie=typeof Symbol=="function"&&Symbol.observable||"@@observable",IR=mie,DD=()=>Math.random().toString(36).substring(7).split("").join("."),pie={INIT:`@@redux/INIT${DD()}`,REPLACE:`@@redux/REPLACE${DD()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${DD()}`},rw=pie;function c5(i){if(typeof i!="object"||i===null)return!1;let e=i;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(i)===e||Object.getPrototypeOf(i)===null}function Tz(i,e,t){if(typeof i!="function")throw new Error(Ji(2));if(typeof e=="function"&&typeof t=="function"||typeof t=="function"&&typeof arguments[3]=="function")throw new Error(Ji(0));if(typeof e=="function"&&typeof t>"u"&&(t=e,e=void 0),typeof t<"u"){if(typeof t!="function")throw new Error(Ji(1));return t(Tz)(i,e)}let n=i,r=e,s=new Map,o=s,a=0,l=!1;
11function c(){o===s&&(o=new Map,s.forEach((v,x)=>{o.set(x,v)}))}function d(){if(l)throw new Error(Ji(3));return r}function f(v){if(typeof v!="function")throw new Error(Ji(4));if(l)throw new Error(Ji(5));let x=!0;c();const C=a++;return o.set(C,v),function(){if(x){if(l)throw new Error(Ji(6));x=!1,c(),o.delete(C),s=null}}}function m(v){if(!c5(v))throw new Error(Ji(7));if(typeof v.type>"u")throw new Error(Ji(8));if(typeof v.type!="string")throw new Error(Ji(17));if(l)throw new Error(Ji(9));try{l=!0,r=n(r,v)}finally{l=!1}return(s=o).forEach(C=>{C()}),v}function p(v){if(typeof v!="function")throw new Error(Ji(10));n=v,m({type:rw.REPLACE})}function g(){const v=f;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(Ji(11));function C(){const E=x;E.next&&E.next(d())}return C(),{unsubscribe:v(C)}},[IR](){return this}}}return m({type:rw.INIT}),{dispatch:m,subscribe:f,getState:d,replaceReducer:p,[IR]:g}}function gie(i){Object.keys(i).forEach(e=>{const t=i[e];if(typeof t(void 0,{type:rw.INIT})>"u")throw new Error(Ji(12));if(typeof t(void 0,{type:rw.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ji(13))})}function bie(i){const e=Object.keys(i),t={};for(let s=0;s<e.length;s++){const o=e[s];typeof i[o]=="function"&&(t[o]=i[o])}const n=Object.keys(t);let r;try{gie(t)}catch(s){r=s}return function(o={},a){if(r)throw r;let l=!1;const c={};for(let d=0;d<n.length;d++){const f=n[d],m=t[f],p=o[f],g=m(p,a);if(typeof g>"u")throw a&&a.type,new Error(Ji(14));c[f]=g,l=l||g!==p}return l=l||n.length!==Object.keys(o).length,l?c:o}}function sw(...i){return i.length===0?e=>e:i.length===1?i[0]:i.reduce((e,t)=>(...n)=>e(t(...n)))}function yie(...i){return e=>(t,n)=>{const r=e(t,n);let s=()=>{throw new Error(Ji(15))};const o={getState:r.getState,dispatch:(l,...c)=>s(l,...c)},a=i.map(l=>l(o));return s=sw(...a)(r.dispatch),{...r,dispatch:s}}}function vie(i){return c5(i)&&"type"in i&&typeof i.type=="string"}var Az=Symbol.for("immer-nothing"),RR=Symbol.for("immer-draftable"),Or=Symbol.for("immer-state");function So(i,...e){throw new Error(`[Immer] minified error nr: ${i}. Full error at: https://bit.ly/3cXEKWf`)}var Ss=Object,vh=Ss.getPrototypeOf,ow="constructor",Fx="prototype",rk="configurable",aw="enumerable",pv="writable",gg="value",kl=i=>!!i&&!!i[Or];function Uo(i){return i?kz(i)||Nx(i)||!!i[RR]||!!i[ow]?.[RR]||Bx(i)||Mx(i):!1}var wie=Ss[Fx][ow].toString(),FR=new WeakMap;function kz(i){if(!i||!u5(i))return!1;const e=vh(i);if(e===null||e===Ss[Fx])return!0;const t=Ss.hasOwnProperty.call(e,ow)&&e[ow];if(t===Object)return!0;if(!Lf(t))return!1;let n=FR.get(t);return n===void 0&&(n=Function.toString.call(t),FR.set(t,n)),n===wie}function Ox(i,e,t=!0){a0(i)===0?(t?Reflect.ownKeys(i):Ss.keys(i)).forEach(r=>{e(r,i[r],i)}):i.forEach((n,r)=>e(r,n,i))}function a0(i){const e=i[Or];return e?e.type_:Nx(i)?1:Bx(i)?2:Mx(i)?3:0}var OR=(i,e,t=a0(i))=>t===2?i.has(e):Ss[Fx].hasOwnProperty.call(i,e),sk=(i,e,t=a0(i))=>t===2?i.get(e):i[e],lw=(i,e,t,n=a0(i))=>{n===2?i.set(e,t):n===3?i.add(t):i[e]=t};function xie(i,e){return i===e?i!==0||1/i===1/e:i!==i&&e!==e}var Nx=Array.isArray,Bx=i=>i instanceof Map,Mx=i=>i instanceof Set,u5=i=>typeof i=="object",Lf=i=>typeof i=="function",ED=i=>typeof i=="boolean";function _ie(i){const e=+i;return Number.isInteger(e)&&String(e)===i}var fl=i=>i.copy_||i.base_,d5=i=>i.modified_?i.copy_:i.base_;function ok(i,e){if(Bx(i))return new Map(i);if(Mx(i))return new Set(i);if(Nx(i))return Array[Fx].slice.call(i);const t=kz(i);if(e===!0||e==="class_only"&&!t){const n=Ss.getOwnPropertyDescriptors(i);delete n[Or];let r=Reflect.ownKeys(n);for(let s=0;s<r.length;s++){const o=r[s],a=n[o];a[pv]===!1&&(a[pv]=!0,a[rk]=!0),(a.get||a.set)&&(n[o]={[rk]:!0,[pv]:!0,[aw]:a[aw],[gg]:i[o]})}return Ss.create(vh(i),n)}else{const n=vh(i);if(n!==null&&t)return{...i};const r=Ss.create(n);return Ss.assign(r,i)}}function f5(i,e=!1){return Lx(i)||kl(i)||!Uo(i)||(a0(i)>1&&Ss.defineProperties(i,{set:Jb,add:Jb,clear:Jb,delete:Jb}),Ss.freeze(i),e&&Ox(i,(t,n)=>{f5(n,!0)},!1)),i}function Cie(){So(2)}var Jb={[gg]:Cie};function Lx(i){return i===null||!u5(i)?!0:Ss.isFrozen(i)}var cw="MapSet",ak="Patches",NR="ArrayMethods",Sz={};function id(i){const e=Sz[i];return e||So(0,i),e}var BR=i=>!!Sz[i],bg,Pz=()=>bg,Die=(i,e)=>({drafts_:[],parent_:i,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:BR(cw)?id(cw):void 0,arrayMethodsPlugin_:BR(NR)?id(NR):void 0});function MR(i,e){e&&(i.patchPlugin_=id(ak),i.patches_=[],i.inversePatches_=[],i.patchListener_=e)}function lk(i){ck(i),i.drafts_.forEach(Eie),i.drafts_=null}function ck(i){i===bg&&(bg=i.parent_)}var LR=i=>bg=Die(bg,i);function Eie(i){const e=i[Or];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function UR(i,e){e.unfinalizedDrafts_=e.drafts_.length;const t=e.drafts_[0];if(i!==void 0&&i!==t){t[Or].modified_&&(lk(e),So(4)),Uo(i)&&(i=VR(e,i));const{patchPlugin_:r}=e;r&&r.generateReplacementPatches_(t[Or].base_,i,e)}else i=VR(e,t);return Tie(e,i,!0),lk(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),i!==Az?i:void 0}function VR(i,e){if(Lx(e))return e;const t=e[Or];if(!t)return uw(e,i.handledSet_,i);if(!Ux(t,i))return e;if(!t.modified_)return t.base_;if(!t.finalized_){const{callbacks_:n}=t;if(n)for(;n.length>0;)n.pop()(i);Fz(t,i)}return t.copy_}function Tie(i,e,t=!1){!i.parent_&&i.immer_.autoFreeze_&&i.canAutoFreeze_&&f5(e,t)}function Iz(i){i.finalized_=!0,i.scope_.unfinalizedDrafts_--}var Ux=(i,e)=>i.scope_===e,Aie=[];function Rz(i,e,t,n){const r=fl(i),s=i.type_;if(n!==void 0&&sk(r,n,s)===e){lw(r,n,t,s);return}if(!i.draftLocations_){const a=i.draftLocations_=new Map;Ox(r,(l,c)=>{if(kl(c)){const d=a.get(c)||[];d.push(l),a.set(c,d)}})}const o=i.draftLocations_.get(e)??Aie;for(const a of o)lw(r,a,t,s)}function kie(i,e,t){i.callbacks_.push(function(r){const s=e;if(!s||!Ux(s,r))return;r.mapSetPlugin_?.fixSetContents(s);const o=d5(s);Rz(i,s.draft_??s,o,t),Fz(s,r)})}function Fz(i,e){if(i.modified_&&!i.finalized_&&(i.type_===3||i.type_===1&&i.allIndicesReassigned_||(i.assigned_?.size??0)>0)){const{patchPlugin_:n}=e;if(n){const r=n.getPath(i);r&&n.generatePatches_(i,r,e)}Iz(i)}}function Sie(i,e,t){const{scope_:n}=i;if(kl(t)){const r=t[Or];
11Ux(r,n)&&r.callbacks_.push(function(){gv(i);const o=d5(r);Rz(i,t,o,e)})}else Uo(t)&&i.callbacks_.push(function(){const s=fl(i);i.type_===3?s.has(t)&&uw(t,n.handledSet_,n):sk(s,e,i.type_)===t&&n.drafts_.length>1&&(i.assigned_.get(e)??!1)===!0&&i.copy_&&uw(sk(i.copy_,e,i.type_),n.handledSet_,n)})}function uw(i,e,t){return!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1||kl(i)||e.has(i)||!Uo(i)||Lx(i)||(e.add(i),Ox(i,(n,r)=>{if(kl(r)){const s=r[Or];if(Ux(s,t)){const o=d5(s);lw(i,n,o,i.type_),Iz(s)}}else Uo(r)&&uw(r,e,t)})),i}function Pie(i,e){const t=Nx(i),n={type_:t?1:0,scope_:e?e.scope_:Pz(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:i,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let r=n,s=dw;t&&(r=[n],s=yg);const{revoke:o,proxy:a}=Proxy.revocable(r,s);return n.draft_=a,n.revoke_=o,[a,n]}var dw={get(i,e){if(e===Or)return i;let t=i.scope_.arrayMethodsPlugin_;const n=i.type_===1&&typeof e=="string";if(n&&t?.isArrayOperationMethod(e))return t.createMethodInterceptor(i,e);const r=fl(i);if(!OR(r,e,i.type_))return Iie(i,r,e);const s=r[e];if(i.finalized_||!Uo(s)||n&&i.operationMethod&&t?.isMutatingArrayMethod(i.operationMethod)&&_ie(e))return s;if(s===TD(i.base_,e)){gv(i);const o=i.type_===1?+e:e,a=dk(i.scope_,s,i,o);return i.copy_[o]=a}return s},has(i,e){return e in fl(i)},ownKeys(i){return Reflect.ownKeys(fl(i))},set(i,e,t){const n=Oz(fl(i),e);if(n?.set)return n.set.call(i.draft_,t),!0;if(!i.modified_){const r=TD(fl(i),e),s=r?.[Or];if(s&&s.base_===t)return i.copy_[e]=t,i.assigned_.set(e,!1),!0;if(xie(t,r)&&(t!==void 0||OR(i.base_,e,i.type_)))return!0;gv(i),uk(i)}return i.copy_[e]===t&&(t!==void 0||e in i.copy_)||Number.isNaN(t)&&Number.isNaN(i.copy_[e])||(i.copy_[e]=t,i.assigned_.set(e,!0),Sie(i,e,t)),!0},deleteProperty(i,e){return gv(i),TD(i.base_,e)!==void 0||e in i.base_?(i.assigned_.set(e,!1),uk(i)):i.assigned_.delete(e),i.copy_&&delete i.copy_[e],!0},getOwnPropertyDescriptor(i,e){const t=fl(i),n=Reflect.getOwnPropertyDescriptor(t,e);return n&&{[pv]:!0,[rk]:i.type_!==1||e!=="length",[aw]:n[aw],[gg]:t[e]}},defineProperty(){So(11)},getPrototypeOf(i){return vh(i.base_)},setPrototypeOf(){So(12)}},yg={};for(let i in dw){let e=dw[i];yg[i]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}yg.deleteProperty=function(i,e){return yg.set.call(this,i,e,void 0)};yg.set=function(i,e,t){return dw.set.call(this,i[0],e,t,i[0])};function TD(i,e){const t=i[Or];return(t?fl(t):i)[e]}function Iie(i,e,t){const n=Oz(e,t);return n?gg in n?n[gg]:n.get?.call(i.draft_):void 0}function Oz(i,e){if(!(e in i))return;let t=vh(i);for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(n)return n;t=vh(t)}}function uk(i){i.modified_||(i.modified_=!0,i.parent_&&uk(i.parent_))}function gv(i){i.copy_||(i.assigned_=new Map,i.copy_=ok(i.base_,i.scope_.immer_.useStrictShallowCopy_))}var Rie=class{constructor(i){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Lf(e)&&!Lf(t)){const s=t;t=e;const o=this;return function(l=s,...c){return o.produce(l,d=>t.call(this,d,...c))}}Lf(t)||So(6),n!==void 0&&!Lf(n)&&So(7);let r;if(Uo(e)){const s=LR(this),o=dk(s,e,void 0);let a=!0;try{r=t(o),a=!1}finally{a?lk(s):ck(s)}return MR(s,n),UR(r,s)}else if(!e||!u5(e)){if(r=t(e),r===void 0&&(r=e),r===Az&&(r=void 0),this.autoFreeze_&&f5(r,!0),n){const s=[],o=[];id(ak).generateReplacementPatches_(e,r,{patches_:s,inversePatches_:o}),n(s,o)}return r}else So(1,e)},this.produceWithPatches=(e,t)=>{if(Lf(e))return(o,...a)=>this.produceWithPatches(o,l=>e(l,...a));let n,r;return[this.produce(e,t,(o,a)=>{n=o,r=a}),n,r]},ED(i?.autoFreeze)&&this.setAutoFreeze(i.autoFreeze),ED(i?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(i.useStrictShallowCopy),ED(i?.useStrictIteration)&&this.setUseStrictIteration(i.useStrictIteration)}createDraft(i){Uo(i)||So(8),kl(i)&&(i=Fie(i));const e=LR(this),t=dk(e,i,void 0);return t[Or].isManual_=!0,ck(e),t}finishDraft(i,e){const t=i&&i[Or];(!t||!t.isManual_)&&So(9);const{scope_:n}=t;return MR(n,e),UR(void 0,n)}setAutoFreeze(i){this.autoFreeze_=i}setUseStrictShallowCopy(i){this.useStrictShallowCopy_=i}setUseStrictIteration(i){this.useStrictIteration_=i}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(i,e){let t;for(t=e.length-1;t>=0;t--){const r=e[t];if(r.path.length===0&&r.op==="replace"){i=r.value;break}}t>-1&&(e=e.slice(t+1));const n=id(ak).applyPatches_;return kl(i)?n(i,e):this.produce(i,r=>n(r,e))}};function dk(i,e,t,n){const[r,s]=Bx(e)?id(cw).proxyMap_(e,t):Mx(e)?id(cw).proxySet_(e,t):Pie(e,t);return(t?.scope_??Pz()).drafts_.push(r),s.callbacks_=t?.callbacks_??[],s.key_=n,t&&n!==void 0?kie(t,s,n):s.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(s);const{patchPlugin_:c}=l;s.modified_&&c&&c.generatePatches_(s,[],l)}),r}function Fie(i){return kl(i)||So(10,i),Nz(i)}function Nz(i){if(!Uo(i)||Lx(i))return i;const e=i[Or];let t,n=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,t=ok(i,e.scope_.immer_.useStrictShallowCopy_),n=e.scope_.immer_.shouldUseStrictIteration()}else t=ok(i,!0);return Ox(t,(r,s)=>{lw(t,r,Nz(s))},n),e&&(e.finalized_=!1),t}var Oie=new Rie,Bz=Oie.produce;function Mz(i){return({dispatch:t,getState:n})=>r=>s=>typeof s=="function"?s(t,n,i):r(s)}var Nie=Mz(),Bie=Mz,Mie=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?sw:sw.apply(null,arguments)};function jR(i,e){function t(...n){if(e){let r=e(...n);if(!r)throw new Error(vl(0));return{type:i,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:i,payload:n[0]}}return t.toString=()=>`${i}`,t.type=i,t.match=n=>vie(n)&&n.type===i,t}var Lz=class Op extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Op.prototype)}static get[Symbol.species](){return Op}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Op(...e[0].concat(this)):new Op(...e.concat(this))}};function zR(i){return Uo(i)?Bz(i,()=>{}):i}function ey(i,e,t){return i.has(e)?i.get(e):i.set(e,t(e)).get(e)}function Lie(i){return typeof i=="boolean"}var Uie=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:s=!0}=e??{};let o=new Lz;return t&&(Lie(t)?o.push(Nie):o.push(Bie(t.extraArgument))),o},Vie="RTK_autoBatch",WR=i=>
11e=>{setTimeout(e,i)},jie=(i={type:"raf"})=>e=>(...t)=>{const n=e(...t);let r=!0,s=!1,o=!1;const a=new Set,l=i.type==="tick"?queueMicrotask:i.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:WR(10):i.type==="callback"?i.queueNotification:WR(i.timeout),c=()=>{o=!1,s&&(s=!1,a.forEach(d=>d()))};return Object.assign({},n,{subscribe(d){const f=()=>r&&d(),m=n.subscribe(f);return a.add(d),()=>{m(),a.delete(d)}},dispatch(d){try{return r=!d?.meta?.[Vie],s=!r,s&&(o||(o=!0,l(c))),n.dispatch(d)}finally{r=!0}}})},zie=i=>function(t){const{autoBatch:n=!0}=t??{};let r=new Lz(i);return n&&r.push(jie(typeof n=="object"?n:void 0)),r};function Wie(i){const e=Uie(),{reducer:t=void 0,middleware:n,devTools:r=!0,preloadedState:s=void 0,enhancers:o=void 0}=i||{};let a;if(typeof t=="function")a=t;else if(c5(t))a=bie(t);else throw new Error(vl(1));let l;typeof n=="function"?l=n(e):l=e();let c=sw;r&&(c=Mie({trace:!1,...typeof r=="object"&&r}));const d=yie(...l),f=zie(d);let m=typeof o=="function"?o(f):f();const p=c(...m);return Tz(a,s,p)}function Uz(i){const e={},t=[];let n;const r={addCase(s,o){const a=typeof s=="string"?s:s.type;if(!a)throw new Error(vl(28));if(a in e)throw new Error(vl(29));return e[a]=o,r},addAsyncThunk(s,o){return o.pending&&(e[s.pending.type]=o.pending),o.rejected&&(e[s.rejected.type]=o.rejected),o.fulfilled&&(e[s.fulfilled.type]=o.fulfilled),o.settled&&t.push({matcher:s.settled,reducer:o.settled}),r},addMatcher(s,o){return t.push({matcher:s,reducer:o}),r},addDefaultCase(s){return n=s,r}};return i(r),[e,t,n]}function Hie(i){return typeof i=="function"}function qie(i,e){let[t,n,r]=Uz(e),s;if(Hie(i))s=()=>zR(i());else{const a=zR(i);s=()=>a}function o(a=s(),l){let c=[t[l.type],...n.filter(({matcher:d})=>d(l)).map(({reducer:d})=>d)];return c.filter(d=>!!d).length===0&&(c=[r]),c.reduce((d,f)=>{if(f)if(kl(d)){const p=f(d,l);return p===void 0?d:p}else{if(Uo(d))return Bz(d,m=>f(m,l));{const m=f(d,l);if(m===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return d},a)}return o.getInitialState=s,o}var $ie=Symbol.for("rtk-slice-createasyncthunk");function Gie(i,e){return`${i}/${e}`}function Yie({creators:i}={}){const e=i?.asyncThunk?.[$ie];return function(n){const{name:r,reducerPath:s=r}=n;if(!r)throw new Error(vl(11));const o=(typeof n.reducers=="function"?n.reducers(Xie()):n.reducers)||{},a=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]}
11,c={addCase(D,E){const T=typeof D=="string"?D:D.type;if(!T)throw new Error(vl(12));if(T in l.sliceCaseReducersByType)throw new Error(vl(13));return l.sliceCaseReducersByType[T]=E,c},addMatcher(D,E){return l.sliceMatchers.push({matcher:D,reducer:E}),c},exposeAction(D,E){return l.actionCreators[D]=E,c},exposeCaseReducer(D,E){return l.sliceCaseReducersByName[D]=E,c}};a.forEach(D=>{const E=o[D],T={reducerName:D,type:Gie(r,D),createNotation:typeof n.reducers=="function"};Zie(E)?ere(T,E,c,e):Qie(T,E,c)});function d(){const[D={},E=[],T=void 0]=typeof n.extraReducers=="function"?Uz(n.extraReducers):[n.extraReducers],S={...D,...l.sliceCaseReducersByType};return qie(n.initialState,A=>{for(let I in S)A.addCase(I,S[I]);for(let I of l.sliceMatchers)A.addMatcher(I.matcher,I.reducer);for(let I of E)A.addMatcher(I.matcher,I.reducer);T&&A.addDefaultCase(T)})}const f=D=>D,m=new Map,p=new WeakMap;let g;function y(D,E){return g||(g=d()),g(D,E)}function v(){return g||(g=d()),g.getInitialState()}function x(D,E=!1){function T(A){let I=A[D];return typeof I>"u"&&E&&(I=ey(p,T,v)),I}function S(A=f){const I=ey(m,E,()=>new WeakMap);return ey(I,A,()=>{const R={};for(const[O,j]of Object.entries(n.selectors??{}))R[O]=Kie(j,A,()=>ey(p,A,v),E);return R})}return{reducerPath:D,getSelectors:S,get selectors(){return S(T)},selectSlice:T}}const C={name:r,reducer:y,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:v,...x(s),injectInto(D,{reducerPath:E,...T}={}){const S=E??s;return D.inject({reducerPath:S,reducer:y},T),{...C,...x(S,!0)}}};return C}}function Kie(i,e,t,n){function r(s,...o){let a=e(s);return typeof a>"u"&&n&&(a=t()),i(a,...o)}return r.unwrapped=i,r}var Vl=Yie();function Xie(){function i(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return i.withTypes=()=>i,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,t){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}},asyncThunk:i}}function Qie({type:i,reducerName:e,createNotation:t},n,r){let s,o;if("reducer"in n){if(t&&!Jie(n))throw new Error(vl(17));s=n.reducer,o=n.prepare}else s=n;r.addCase(i,s).exposeCaseReducer(e,s).exposeAction(e,o?jR(i,o):jR(i))}function Zie(i){return i._reducerDefinitionType==="asyncThunk"}function Jie(i){return i._reducerDefinitionType==="reducerWithPrepare"}function ere({type:i,reducerName:e},t,n,r){if(!r)throw new Error(vl(18));const{payloadCreator:s,fulfilled:o,pending:a,rejected:l,settled:c,options:d}=t,f=r(i,s,d);n.exposeAction(e,f),o&&n.addCase(f.fulfilled,o),a&&n.addCase(f.pen
11ding,a),l&&n.addCase(f.rejected,l),c&&n.addMatcher(f.settled,c),n.exposeCaseReducer(e,{fulfilled:o||ty,pending:a||ty,rejected:l||ty,settled:c||ty})}function ty(){}function vl(i){return`Minified Redux Toolkit error #${i}; visit https://redux-toolkit.js.org/Errors?code=${i} for the full message or use the non-minified dev environment for full errors. `}var bv={exports:{}};function Np(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var yv={exports:{}};const tre={},nre=Object.freeze(Object.defineProperty({__proto__:null,default:tre},Symbol.toStringTag,{value:"Module"})),ire=oz(nre);var rre=yv.exports,HR;function Qt(){return HR||(HR=1,(function(i,e){(function(t,n){i.exports=n()})(rre,function(){var t=t||(function(n,r){var s;if(typeof window<"u"&&window.crypto&&(s=window.crypto),typeof self<"u"&&self.crypto&&(s=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window<"u"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof Io<"u"&&Io.crypto&&(s=Io.crypto),!s&&typeof Np=="function")try{s=ire}catch{}var o=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||(function(){function C(){}return function(D){var E;return C.prototype=D,E=new C,C.prototype=null,E}})(),l={},c=l.lib={},d=c.Base=(function(){return{extend:function(C){var D=a(this);return C&&D.mixIn(C),(!D.hasOwnProperty("init")||this.init===D.init)&&(D.init=function(){D.$super.init.apply(this,arguments)}),D.init.prototype=D,D.$super=this,D},create:function(){var C=this.extend();return C.init.apply(C,arguments),C},init:function(){},mixIn:function(C){for(var D in C)C.hasOwnProperty(D)&&(this[D]=C[D]);C.hasOwnProperty("toString")&&(this.toString=C.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),f=c.WordArray=d.extend({init:function(C,D){C=this.words=C||[],D!=r?this.sigBytes=D:this.sigBytes=C.length*4},toString:function(C){return(C||p).stringify(this)},concat:function(C){var D=this.words,E=C.words,T=this.sigBytes,S=C.sigBytes;if(this.clamp(),T%4)for(var A=0;A<S;A++){var I=E[A>>>2]>>>24-A%4*8&255;D[T+A>>>2]|=I<<24-(T+A)%4*8}else for(var R=0;R<S;R+=4)D[T+R>>>2]=E[R>>>2];return this.sigBytes+=S,this},clamp:function(){var C=this.words,D=this.sigBytes;C[D>>>2]&=4294967295<<32-D%4*8,C.length=n.ceil(D/4)},clone:function(){var C=d.clone.call(this);return C.words=this.words.slice(0),C},random:function(C){for(var D=[],E=0;E<C;E+=4)D.push(o());return new f.init(D,C)}}),m=l.enc={},p=m.Hex={stringify:function(C){for(var D=C.words,E=C.sigBytes,T=[],S=0;S<E;S++){var A=D[S>>>2]>>>24-S%4*8&255;T.push((A>>>4).toString(16)),T.push((A&15).toString(16))}return T.join("")},parse:function(C){for(var D=C.length,E=[],T=0;T<D;T+=2)E[T>>>3]|=parseInt(C.substr(T,2),16)<<24-T%8*4;return new f.init(E,D/2)}},g=m.Latin1={stringify:function(C){for(var D=C.words,E=C.sigBytes,T=[],S=0;S<E;S++){var A=D[S>>>2]>>>24-S%4*8&255;T.push(String.fromCharCode(A))}return T.join("")},parse:function(C){for(var D=C.length,E=[],T=0;T<D;T++)E[T>>>2]|=(C.charCodeAt(T)&255)<<24-T%4*8;return new f.init(E,D)}},y=m.Utf8={stringify:function(C){try{return decodeURIComponent(escape(g.stringify(C)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(C){return g.parse(unescape(encodeURIComponent(C)))}},v=c.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(C){typeof C=="string"&&(C=y.parse(C)),this._data.concat(C),this._nDataBytes+=C.sigBytes},_process:function(C){var D,E=this._data,T=E.words,S=E.sigBytes,A=this.blockSize,I=A*4,R=S/I;C?R=n.ceil(R):R=n.max((R|0)-this._minBufferSize,0);var O=R*A,j=n.min(O*4,S);if(O){for(var B=0;B<O;B+=A)this._doProcessBlock(T,B);D=T.splice(0,O),E.sigBytes-=j}return new f.init(D,j)},clone:function(){var C=d.clone.call(this);return C._data=this._data.clone(),C},_minBufferSize:0});c.Hasher=v.extend({cfg:d.extend(),init:function(C){this.cfg=this.cfg.extend(C),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(C){return this._append(C),this._process(),this},finalize:function(C){C&&this._append(C);var D=this._doFinalize();return D},blockSize:16,_createHelper:function(C){return function(D,E){return new C.init(E).finalize(D)}},_createHmacHelper:function(C){return function(D,E){return new x.HMAC.init(C,E).finalize(D)}}});var x=l.algo={};return l})(Math);return t})})(yv)),yv.exports}var vv={exports:{}},sre=vv.exports,qR;function Vx(){return qR||(qR=1,(function(i,e){(function(t,n){i.exports=n(Qt())})(sre,function(t){return(function(n){var r=t,s=r.lib,o=s.Base,a=s.WordArray,l=r.x64={};l.Word=o.extend({init:function(c,d){this.high=c,this.low=d}}),l.WordArray=o.extend({init:function(c,d){c=this.words=c||[],d!=n?this.sigBytes=d:this.sigBytes=c.length*8},toX32:function(){for(var c=this.words,d=c.length,f=[],m=0;m<d;m++){var p=c[m];f.push(p.high),f.push(p.low)}return a.create(f,this.sigBytes)},clone:function(){for(var c=o.clone.call(this),d=c.words=this.words.slice(0),f=d.length,m=0;m<f;m++)d[m]=d[m].clone();return c}})})(),t})})(vv)),vv.exports}var wv={exports:{}},ore=wv.exports,$R;function are(){return $R||($R=1,(function(i,e){(function(t,n){i.exports=n(Qt())})(ore,function(t){return(function(){if(typeof ArrayBuffer=="function"){var n=t,r=n.lib,s=r.WordArray,o=s.init,a=s.init=function(l){if(l instanceof ArrayBuffer&&(l=new Uint8Array(l)),(l instanceof Int8Array||typeof Uint8ClampedArray<"u"&&l instanceof Uint8ClampedArray||l instanceof Int16Array||l instanceof Uint16Array||l instanceof Int32Array||l instanceof Uint32Array||l instanceof Float32Array||l instanceof Float64Array)&&(l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength)),l instanceof Uint8Array){for(var c=l.byteLength,d=[],f=0;f<c;f++)d[f>>>2]|=l[f]<<24-f%4*8;o.call(this,d,c)}else o.apply(this,arguments)};a.prototype=s}})(),t.lib.WordArray})}
vendor: 20,711 bytes, line 11
11)(wv)),wv.exports}var xv={exports:{}},lre=xv.exports,GR;function cre(){return GR||(GR=1,(function(i,e){(function(t,n){i.exports=n(Qt())})(lre,function(t){return(function(){var n=t,r=n.lib,s=r.WordArray,o=n.enc;o.Utf16=o.Utf16BE={stringify:function(l){for(var c=l.words,d=l.sigBytes,f=[],m=0;m<d;m+=2){var p=c[m>>>2]>>>16-m%4*8&65535;f.push(String.fromCharCode(p))}return f.join("")},parse:function(l){for(var c=l.length,d=[],f=0;f<c;f++)d[f>>>1]|=l.charCodeAt(f)<<16-f%2*16;return s.create(d,c*2)}},o.Utf16LE={stringify:function(l){for(var c=l.words,d=l.sigBytes,f=[],m=0;m<d;m+=2){var p=a(c[m>>>2]>>>16-m%4*8&65535);f.push(String.fromCharCode(p))}return f.join("")},parse:function(l){for(var c=l.length,d=[],f=0;f<c;f++)d[f>>>1]|=a(l.charCodeAt(f)<<16-f%2*16);return s.create(d,c*2)}};function a(l){return l<<8&4278255360|l>>>8&16711935}})(),t.enc.Utf16})})(xv)),xv.exports}var _v={exports:{}},ure=_v.exports,YR;function fd(){return YR||(YR=1,(function(i,e){(function(t,n){i.exports=n(Qt())})(ure,function(t){return(function(){var n=t,r=n.lib,s=r.WordArray,o=n.enc;o.Base64={stringify:function(l){var c=l.words,d=l.sigBytes,f=this._map;l.clamp();for(var m=[],p=0;p<d;p+=3)for(var g=c[p>>>2]>>>24-p%4*8&255,y=c[p+1>>>2]>>>24-(p+1)%4*8&255,v=c[p+2>>>2]>>>24-(p+2)%4*8&255,x=g<<16|y<<8|v,C=0;C<4&&p+C*.75<d;C++)m.push(f.charAt(x>>>6*(3-C)&63));var D=f.charAt(64);if(D)for(;m.length%4;)m.push(D);return m.join("")},parse:function(l){var c=l.length,d=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var m=0;m<d.length;m++)f[d.charCodeAt(m)]=m}var p=d.charAt(64);if(p){var g=l.indexOf(p);g!==-1&&(c=g)}return a(l,c,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(l,c,d){for(var f=[],m=0,p=0;p<c;p++)if(p%4){var g=d[l.charCodeAt(p-1)]<<p%4*2,y=d[l.charCodeAt(p)]>>>6-p%4*2,v=g|y;f[m>>>2]|=v<<24-m%4*8,m++}return s.create(f,m)}})(),t.enc.Base64})})(_v)),_v.exports}var Cv={exports:{}},dre=Cv.exports,KR;function fre(){return KR||(KR=1,(function(i,e){(function(t,n){i.exports=n(Qt())})(dre,function(t){return(function(){var n=t,r=n.lib,s=r.WordArray,o=n.enc;o.Base64url={stringify:function(l,c){c===void 0&&(c=!0);var d=l.words,f=l.sigBytes,m=c?this._safe_map:this._map;l.clamp();for(var p=[],g=0;g<f;g+=3)for(var y=d[g>>>2]>>>24-g%4*8&255,v=d[g+1>>>2]>>>24-(g+1)%4*8&255,x=d[g+2>>>2]>>>24-(g+2)%4*8&255,C=y<<16|v<<8|x,D=0;D<4&&g+D*.75<f;D++)p.push(m.charAt(C>>>6*(3-D)&63));var E=m.charAt(64);if(E)for(;p.length%4;)p.push(E);return p.join("")},parse:function(l,c){c===void 0&&(c=!0);var d=l.length,f=c?this._safe_map:this._map,m=this._reverseMap;if(!m){m=this._reverseMap=[];for(var p=0;p<f.length;p++)m[f.charCodeAt(p)]=p}var g=f.charAt(64);if(g){var y=l.indexOf(g);y!==-1&&(d=y)}return a(l,d,m)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function a(l,c,d){for(var f=[],m=0,p=0;p<c;p++)if(p%4){var g=d[l.charCodeAt(p-1)]<<p%4*2,y=d[l.charCodeAt(p)]>>>6-p%4*2,v=g|y;f[m>>>2]|=v<<24-m%4*8,m++}return s.create(f,m)}})(),t.enc.Base64url})})(Cv)),Cv.exports}var Dv={exports:{}},hre=Dv.exports,XR;function hd(){return XR||(XR=1,(function(i,e){(function(t,n){i.exports=n(Qt())})(hre,function(t){return(function(n){var r=t,s=r.lib,o=s.WordArray,a=s.Hasher,l=r.algo,c=[];(function(){for(var y=0;y<64;y++)c[y]=n.abs(n.sin(y+1))*4294967296|0})();var d=l.MD5=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(y,v){for(var x=0;x<16;x++){var C=v+x,D=y[C];y[C]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}var E=this._hash.words,T=y[v+0],S=y[v+1],A=y[v+2],I=y[v+3],R=y[v+4],O=y[v+5],j=y[v+6],B=y[v+7],U=y[v+8],F=y[v+9],H=y[v+10],L=y[v+11],W=y[v+12],G=y[v+13],Y=y[v+14],ie=y[v+15],V=E[0],q=E[1],$=E[2],J=E[3];V=f(V,q,$,J,T,7,c[0]),J=f(J,V,q,$,S,12,c[1]),$=f($,J,V,q,A,17,c[2]),q=f(q,$,J,V,I,22,c[3]),V=f(V,q,$,J,R,7,c[4]),J=f(J,V,q,$,O,12,c[5]),$=f($,J,V,q,j,17,c[6]),q=f(q,$,J,V,B,22,c[7]),V=f(V,q,$,J,U,7,c[8]),J=f(J,V,q,$,F,12,c[9]),$=f($,J,V,q,H,17,c[10]),q=f(q,$,J,V,L,22,c[11]),V=f(V,q,$,J,W,7,c[12]),J=f(J,V,q,$,G,12,c[13]),$=f($,J,V,q,Y,17,c[14]),q=f(q,$,J,V,ie,22,c[15]),V=m(V,q,$,J,S,5,c[16]),J=m(J,V,q,$,j,9,c[17]),$=m($,J,V,q,L,14,c[18]),q=m(q,$,J,V,T,20,c[19]),V=m(V,q,$,J,O,5,c[20]),J=m(J,V,q,$,H,9,c[21]),$=m($,J,V,q,ie,14,c[22]),q=m(q,$,J,V,R,20,c[23]),V=m(V,q,$,J,F,5,c[24]),J=m(J,V,q,$,Y,9,c[25]),$=m($,J,V,q,I,14,c[26]),q=m(q,$,J,V,U,20,c[27]),V=m(V,q,$,J,G,5,c[28]),J=m(J,V,q,$,A,9,c[29]),$=m($,J,V,q,B,14,c[30]),q=m(q,$,J,V,W,20,c[31]),V=p(V,q,$,J,O,4,c[32]),J=p(J,V,q,$,U,11,c[33]),$=p($,J,V,q,L,16,c[34]),q=p(q,$,J,V,Y,23,c[35]),V=p(V,q,$,J,S,4,c[36]),J=p(J,V,q,$,R,11,c[37]),$=p($,J,V,q,B,16,c[38]),q=p(q,$,J,V,H,23,c[39]),V=p(V,q,$,J,G,4,c[40]),J=p(J,V,q,$,T,11,c[41]),$=p($,J,V,q,I,16,c[42]),q=p(q,$,J,V,j,23,c[43]),V=p(V,q,$,J,F,4,c[44]),J=p(J,V,q,$,W,11,c[45]),$=p($,J,V,q,ie,16,c[46]),q=p(q,$,J,V,A,23,c[47]),V=g(V,q,$,J,T,6,c[48]),J=g(J,V,q,$,B,10,c[49]),$=g($,J,V,q,Y,15,c[50]),q=g(q,$,J,V,O,21,c[51]),V=g(V,q,$,J,W,6,c[52]),J=g(J,V,q,$,I,10,c[53]),$=g($,J,V,q,H,15,c[54]),q=g(q,$,J,V,S,21,c[55]),V=g(V,q,$,J,U,6,c[56]),J=g(J,V,q,$,ie,10,c[57]),$=g($,J,V,q,j,15,c[58]),q=g(q,$,J,V,G,21,c[59]),V=g(V,q,$,J,R,6,c[60]),J=g(J,V,q,$,L,10,c[61]),$=g($,J,V,q,A,15,c[62]),q=g(q,$,J,V,F,21,c[63]),E[0]=E[0]+V|0,E[1]=E[1]+q|0,E[2]=E[2]+$|0,E[3]=E[3]+J|0},_doFinalize:function(){var y=this._data,v=y.words,x=this._nDataBytes*8,C=y.sigBytes*8;v[C>>>5]|=128<<24-C%32;var D=n.floor(x/4294967296),E=x;v[(C+64>>>9<<4)+15]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,v[(C+64>>>9<<4)+14]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,y.sigBytes=(v.length+1)*4,this._process();for(var T=this._hash,S=T.words,A=0;A<4;A++){var I=S[A];S[A]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}return T},clone:function(){var y=a.clone.call(this);return y._hash=this._hash.clone(),y}});function f(y,v,x,C,D,E,T){var S=y+(v&x|~v&C)+D+T;return(S<<E|S>>>32-E)+v}function m(y,v,x,C,D,E,T){var S=y+(v&C|x&~C)+D+T;return(S<<E|S>>>32-E)+v}function p(y,v,x,C,D,E,T){var S=y+(v^x^C)+D+T;return(S<<E|S>>>32-E)+v}function g(y,v,x,C,D,E,T){var S=y+(x^(v|~C))+D+T;return(S<<E|S>>>32-E)+v}r.MD5=a._createHelper(d),r.HmacMD5=a._createHmacHelper(d)})(Math),t.MD5})})(Dv)),Dv.exports}var Ev={exports:{}},mre=Ev.exports,QR;function Vz(){return QR||(QR=1,(function(i,e){(function(t,n){i.exports=n(Qt())})(mre,function(t){return(function(){var n=t,r=n.lib,s=r.WordArray,o=r.Hasher,a=n.algo,l=[],c=a.SHA1=o.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,f){for(var m=this._hash.words,p=m[0],g=m[1],y=m[2],v=m[3],x=m[4],C=0;C<80;C++){if(C<16)l[C]=d[f+C]|0;else{var D=l[C-3]^l[C-8]^l[C-14]^l[C-16];l[C]=D<<1|D>>>31}var E=(p<<5|p>>>27)+x+l[C];C<20?E+=(g&y|~g&v)+1518500249:C<40?E+=(g^y^v)+1859775393:C<60?E+=(g&y|g&v|y&v)-1894007588:E+=(g^y^v)-899497514,x=v,v=y,y=g<<30|g>>>2,g=p,p=E}m[0]=m[0]+p|0,m[1]=m[1]+g|0,m[2]=m[2]+y|0,m[3]=m[3]+v|0,m[4]=m[4]+x|0},_doFinalize:function(){var d=this._data,f=d.words,m=this._nDataBytes*8,p=d.sigBytes*8;return f[p>>>5]|=128<<24-p%32,f[(p+64>>>9<<4)+14]=Math.floor(m/4294967296),f[(p+64>>>9<<4)+15]=m,d.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var d=o.clone.call(this);return d._hash=this._hash.clone(),d}});n.SHA1=o._createHelper(c),n.HmacSHA1=o._createHmacHelper(c)})(),t.SHA1})})(Ev)),Ev.exports}var Tv={exports:{}},pre=Tv.exports,ZR;function h5(){return ZR||(ZR=1,(function(i,e){(function(t,n){i.exports=n(Qt())})(pre,function(t){return(function(n){var r=t,s=r.lib,o=s.WordArray,a=s.Hasher,l=r.algo,c=[],d=[];(function(){function p(x){for(var C=n.sqrt(x),D=2;D<=C;D++)if(!(x%D))return!1;return!0}function g(x){return(x-(x|0))*4294967296|0}for(var y=2,v=0;v<64;)p(y)&&(v<8&&(c[v]=g(n.pow(y,1/2))),d[v]=g(n.pow(y,1/3)),v++),y++})();var f=[],m=l.SHA256=a.extend({_doReset:function(){this._hash=new o.init(c.slice(0))},_doProcessBlock:function(p,g){for(var y=this._hash.words,v=y[0],x=y[1],C=y[2],D=y[3],E=y[4],T=y[5],S=y[6],A=y[7],I=0;I<64;I++){if(I<16)f[I]=p[g+I]|0;else{var R=f[I-15],O=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,j=f[I-2],B=(j<<15|j>>>17)^(j<<13|j>>>19)^j>>>10;f[I]=O+f[I-7]+B+f[I-16]}var U=E&T^~E&S,F=v&x^v&C^x&C,H=(v<<30|v>>>2)^(v<<19|v>>>13)^(v<<10|v>>>22),L=(E<<26|E>>>6)^(E<<21|E>>>11)^(E<<7|E>>>25),W=A+L+U+d[I]+f[I],G=H+F;A=S,S=T,T=E,E=D+W|0,D=C,C=x,x=v,v=W+G|0}y[0]=y[0]+v|0,y[1]=y[1]+x|0,y[2]=y[2]+C|0,y[3]=y[3]+D|0,y[4]=y[4]+E|0,y[5]=y[5]+T|0,y[6]=y[6]+S|0,y[7]=y[7]+A|0},_doFinalize:function(){var p=this._data,g=p.words,y=this._nDataBytes*8,v=p.sigBytes*8;return g[v>>>5]|=128<<24-v%32,g[(v+64>>>9<<4)+14]=n.floor(y/4294967296),g[(v+64>>>9<<4)+15]=y,p.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var p=a.clone.call(this);return p._hash=this._hash.clone(),p}});r.SHA256=a._createHelper(m),r.HmacSHA256=a._createHmacHelper(m)})(Math),t.SHA256})})(Tv)),Tv.exports}var Av={exports:{}},gre=Av.exports,JR;function bre(){return JR||(JR=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),h5())})(gre,function(t){return(function(){var n=t,r=n.lib,s=r.WordArray,o=n.algo,a=o.SHA256,l=o.SHA224=a.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=a._doFinalize.call(this);return c.sigBytes-=4,c}});n.SHA224=a._createHelper(l),n.HmacSHA224=a._createHmacHelper(l)})(),t.SHA224})})(Av)),Av.exports}var kv={exports:{}},yre=kv.exports,eF;function jz(){return eF||(eF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Vx())})(yre,function(t){return(function(){var n=t,r=n.lib,s=r.Hasher,o=n.x64,a=o.Word,l=o.WordArray,c=n.algo;function d(){return a.create.apply(a,arguments)}var f=[d(1116352408,3609767458),d(1899447441,602891725),d(3049323471,3964484399),d(3921009573,2173295548),d(961987163,4081628472),d(1508970993,3053834265),d(2453635748,2937671579),d(2870763221,3664609560),d(3624381080,2734883394),d(310598401,1164996542),d(607225278,1323610764),d(1426881987,3590304994),d(1925078388,4068182383),d(2162078206,991336113),d(2614888103,633803317),d(3248222580,3479774868),d(3835390401,2666613458),d(4022224774,944711139),d(264347078,2341262773),d(604807628,2007800933),d(770255983,1495990901),d(1249150122,1856431235),d(1555081692,3175218132),d(1996064986,2198950837),d(2554220882,3999719339),d(2821834349,766784016),d(2952996808,2566594879),d(3210313671,3203337956),d(3336571891,1034457026),d(3584528711,2466948901),d(113926993,3758326383),d(338241895,168717936),d(666307205,1188179964),d(773529912,1546045734),d(1294757372,1522805485),d(1396182291,2643833823),d(1695183700,2343527390),d(1986661051,1014477480),d(2177026350,1206759142),d(2456956037,344077627),d(2730485921,1290863460),d(2820302411,3158454273),d(3259730800,3505952657),d(3345764771,106217008),d(3516065817,3606008344),d(3600352804,1432725776),d(4094571909,1467031594),d(275423344,851169720),d(430227734,3100823752),d(506948616,1363258195),d(659060556,3750685593),d(883997877,3785050280),d(958139571,3318307427),d(1322822218,3812723403),d(1537002063,2003034995),d(1747873779,3602036899),d(1955562222,1575990012),d(2024104815,1125592928),d(2227730452,2716904306),d(2361852424,442776044),d(2428436474,593698344),d(2756734187,3733110249),d(3204031479,2999351573),d(3329325298,3815920427),d(3391569614,3928383900),d(3515267271,566280711),d(3940187606,3454069534),d(4118630271,4000239992),d(116418474,1914138554),d(174292421,2731055270),d(289380356,3203993006),d(460393269,320620315),d(685471733,587496836),d(852142971,1086792851),d(1017036298,365543100),d(1126000580,2618297676),d(1288033470,3409855158),d(1501505948,4234509866),d(1607167915,987167468),d(1816402316,1246189591)],m=[];(function(){for(var g=0;g<80;g++)m[g]=d()})();var p=c.SHA512=s.extend({_doReset:function(){this._hash=new l.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(g,y){for(var v=this._hash.words,x=v[0],C=v[1],D=v[2],E=v[3],T=v[4],S=v[5],A=v[6],I=v[7],R=x.high,O=x.low,j=C.high,B=C.low,U=D.high,F=D.low,H=E.high,L=E.low,W=T.high,G=T.low,Y=S.high,ie=S.low,V=A.high,q=A.low,$=I.high,J=I.low,ce=R,se=O,ge=j,ye=B,Pe=U,Ve=F,Ze=H,dt=L,Re=W,N=G,te=Y,ne=ie,Z=V,Q=q,le=$,we=J,xe=0;xe<80;xe++){var fe,re,ae=m[xe];if(xe<16)re=ae.high=g[y+xe*2]|0,fe=ae.low=g[y+xe*2+1]|0;else{var me=m[xe-15],De=me.high,je=me.low,tt=(De>>>1|je<<31)^(De>>>8|je<<24)^De>>>7,bt=(je>>>1|De<<31)^(je>>>8|De<<24)^(je>>>7|De<<25),it=m[xe-2],ht=it.high,kt=it.low,pe=(ht>>>19|kt<<13)^(ht<<3|kt>>>29)^ht>>>6,Fe=(kt>>>19|ht<<13)^(kt<<3|ht>>>29)^(kt>>>6|ht<<26),qe=m[xe-7],Xe=qe.high,Dt=qe.low,Nt=m[xe-16],dn=Nt.high,Cn=Nt.low;fe=bt+Dt,re=tt+Xe+(fe>>>0<bt>>>0?1:0),fe=fe+Fe,re=re+pe+(fe>>>0<Fe>>>0?1:0),fe=fe+Cn,re=re+dn+(fe>>>0<Cn>>>0?1:0),ae.high=re,ae.low=fe}var $n=Re&te^~Re&Z,vi=N&ne^~N&Q,$i=ce&ge^ce&Pe^ge&Pe,Ba=se&ye^se&Ve^ye&Ve,K=(ce>>>28|se<<4)^(ce<<30|se>>>2)^(ce<<25|se>>>7),ee=(se>>>28|ce<<4)^(se<<30|ce>>>2)^(se<<25|ce>>>7),ue=(Re>>>14|N<<18)^(Re>>>18|N<<14)^(Re<<23|N>>>9),Ie=(N>>>14|Re<<18)^(N>>>18|Re<<14)^(N<<23|Re>>>9),ze=f[xe],at=ze.high,We=ze.low,Ft=we+Ie,bn=le+ue+(Ft>>>0<we>>>0?1:0),Ft=Ft+vi,bn=bn+$n+(Ft>>>0<vi>>>0?1:0),Ft=Ft+We,bn=bn+at+(Ft>>>0<We>>>0?1:0),Ft=Ft+fe,bn=bn+re+(Ft>>>0<fe>>>0?1:0),Gn=ee+Ba,_r=K+$i+(Gn>>>0<ee>>>0?1:0);le=Z,we=Q,Z=te,Q=ne,te=Re,ne=N,N=dt+Ft|0,Re=Ze+bn+(N>>>0<dt>>>0?1:0)|0,Ze=Pe,dt=Ve,Pe=ge,Ve=ye,ge=ce,ye=se,se=Ft+Gn|0,ce=bn+_r+(se>>>0<Ft>>>0?1:0)|0}O=x.low=O+se,x.high=R+ce+(O>>>0<se>>>0?1:0),B=C.low=B+ye,C.high=j+ge+(B>>>0<ye>>>0?1:0),F=D.low=F+Ve,D.high=U+Pe+(F>>>0<Ve>>>0?1:0),L=E.low=L+dt,E.high=H+Ze+(L>>>0<dt>>>0?1:0),G=T.low=G+N,T.high=W+Re+(G>>>0<N>>>0?1:0),ie=S.low=ie+ne,S.high=Y+te+(ie>>>0<ne>>>0?1:0),q=A.low=q+Q,A.high=V+Z+(q>>>0<Q>>>0?1:0),J=I.low=J+we,I.high=$+le+(J>>>0<we>>>0?1:0)},_doFinalize:function(){var g=this._data,y=g.words,v=this._nDataBytes*8,x=g.sigBytes*8;y[x>>>5]|=128<<24-x%32,y[(x+128>>>10<<5)+30]=Math.floor(v/4294967296),y[(x+128>>>10<<5)+31]=v,g.sigBytes=y.length*4,this._process();var C=this._hash.toX32();return C},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g},blockSize:1024/32});n.SHA512=s._createHelper(p),n.HmacSHA512=s._createHmacHelper(p)})(),t.SHA512})})(kv)),kv.exports}var Sv={exports:{}},vre=Sv.exports,tF;function wre(){return tF||(tF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Vx(),jz())})(vre,function(t){return(function(){var n=t,r=n.x64,s=r.Word,o=r.WordArray,a=n.algo,l=a.SHA512,c=a.SHA384=l.extend({_doReset:function(){this._hash=new o.init([new s.init(3418070365,3238371032),new s.init(1654270250,914150663),new s.init(2438529370,812702999),new s.init(355462360,4144912697),new s.init(1731405415,4290775857),new s.init(2394180231,1750603025),new s.init(3675008525,1694076839),new s.init(1203062813,3204075428)])},_doFinalize:function(){var d=l._doFinalize.call(this);return d.sigBytes-=16,d}});n.SHA384=l._createHelper(c),n.HmacSHA384=l._createHmacHelper(c)})(),t.SHA384})})(Sv)),Sv.exports}var Pv={exports:{}},xre=Pv.exports,nF;function _re(){return nF||(nF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Vx())})(xre,function(t){return(function(n){var r=t,s=r.lib,o=s.WordArray,a=s.Hasher,l=r.x64,c=l.Word,d=r.algo,f=[],m=[],p=[];(function(){for(var v=1,x=0,C=0;C<24;C++){f[v+5*x]=(C+1)*(C+2)/2%64;var D=x%5,E=(2*v+3*x)%5;v=D,x=E}for(var v=0;v<5;v++)for(var x=0;x<5;x++)m[v+5*x]=x+(2*v+3*x)%5*5;for(var T=1,S=0;S<24;S++){for(var A=0,I=0,R=0;R<7;R++){if(T&1){var O=(1<<R)-1;O<32?I^=1<<O:A^=1<<O-32}T&128?T=T<<1^113:T<<=1}p[S]=c.create(A,I)}})();var g=[];(function(){for(var v=0;v<25;v++)g[v]=c.create()})();var y=d.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var v=this._state=[],x=0;x<25;x++)v[x]=new c.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(v,x){for(var C=this._state,D=this.blockSize/2,E=0;E<D;E++){var T=v[x+2*E],S=v[x+2*E+1];T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var A=C[E];A.high^=S,A.low^=T}for(var I=0;I<24;I++){for(var R=0;R<5;R++){for(var O=0,j=0,B=0;B<5;B++){var A=C[R+5*B];O^=A.high,j^=A.low}var U=g[R];U.high=O,U.low=j}for(var R=0;R<5;R++)for(var F=g[(R+4)%5],H=g[(R+1)%5],L=H.high,W=H.low,O=F.high^(L<<1|W>>>31),j=F.low^(W<<1|L>>>31),B=0;B<5;B++){var A=C[R+5*B];A.high^=O,A.low^=j}for(var G=1;G<25;G++){var O,j,A=C[G],Y=A.high,ie=A.low,V=f[G];V<32?(O=Y<<V|ie>>>32-V,j=ie<<V|Y>>>32-V):(O=ie<<V-32|Y>>>64-V,j=Y<<V-32|ie>>>64-V);var q=g[m[G]];q.high=O,q.low=j}var $=g[0],J=C[0];$.high=J.high,$.low=J.low;for(var R=0;R<5;R++)for(var B=0;B<5;B++){var G=R+5*B,A=C[G],ce=g[G],se=g[(R+1)%5+5*B],ge=g[(R+2)%5+5*B];A.high=ce.high^~se.high&ge.high,A.low=ce.low^~se.low&ge.low}var A=C[0],ye=p[I];A.high^=ye.high,A.low^=ye.low}},_doFinalize:function(){var v=this._data,x=v.words;this._nDataBytes*8;var C=v.sigBytes*8,D=this.blockSize*32;x[C>>>5]|=1<<24-C%32,x[(n.ceil((C+1)/D)*D>>>5)-1]|=128,v.sigBytes=x.length*4,this._process();for(var E=this._state,T=this.cfg.outputLength/8,S=T/8,A=[],I=0;I<S;I++){var R=E[I],O=R.high,j=R.low;O=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,j=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360,A.push(j),A.push(O)}return new o.init(A,T)},clone:function(){for(var v=a.clone.call(this),x=v._state=this._state.slice(0),C=0;C<25;C++)x[C]=x[C].clone();return v}});r.SHA3=a._createHelper(y),r.HmacSHA3=a._createHmacHelper(y)})(Math),t.SHA3})})(Pv)),Pv.exports}var Iv={exports:{}},Cre=Iv.exports,iF;function Dre(){return iF||(iF=1,(function(i,e){(function(t,n){i.exports=n(Qt())})(Cre,function(t){return(function(n){var r=t,s=r.lib,o=s.WordArray,a=s.Hasher,l=r.algo,c=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),d=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),f=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),m=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),p=o.create([0,1518500249,1859775393,2400959708,2840853838]),g=o.create([1352829926,1548603684,1836072691,2053994217,0]),y=l.RIPEMD160=a.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(S,A){for(var I=0;I<16;I++){var R=A+I,O=S[R];S[R]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var j=this._hash.words,B=p.words,U=g.words,F=c.words,H=d.words,L=f.words,W=m.words,G,Y,ie,V,q,$,J,ce,se,ge;$=G=j[0],J=Y=j[1],ce=ie=j[2],se=V=j[3],ge=q=j[4];for(var ye,I=0;I<80;I+=1)ye=G+S[A+F[I]]|0,I<16?ye+=v(Y,ie,V)+B[0]:I<32?ye+=x(Y,ie,V)+B[1]:I<48?ye+=C(Y,ie,V)+B[2]:I<64?ye+=D(Y,ie,V)+B[3]:ye+=E(Y,ie,V)+B[4],ye=ye|0,ye=T(ye,L[I]),ye=ye+q|0,G=q,q=V,V=T(ie,10),ie=Y,Y=ye,ye=$+S[A+H[I]]|0,I<16?ye+=E(J,ce,se)+U[0]:I<32?ye+=D(J,ce,se)+U[1]:I<48?ye+=C(J,ce,se)+U[2]:I<64?ye+=x(J,ce,se)+U[3]:ye+=v(J,ce,se)+U[4],ye=ye|0,ye=T(ye,W[I]),ye=ye+ge|0,$=ge,ge=se,se=T(ce,10),ce=J,J=ye;ye=j[1]+ie+se|0,j[1]=j[2]+V+ge|0,j[2]=j[3]+q+$|0,j[3]=j[4]+G+J|0,j[4]=j[0]+Y+ce|0,j[0]=ye},_doFinalize:function(){var S=this._data,A=S.words,I=this._nDataBytes*8,R=S.sigBytes*8;A[R>>>5]|=128<<24-R%32,A[(R+64>>>9<<4)+14]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,S.sigBytes=(A.length+1)*4,this._process();for(var O=this._hash,j=O.words,B=0;B<5;B++){var U=j[B];j[B]=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360}return O},clone:function(){var S=a.clone.call(this);return S._hash=this._hash.clone(),S}});function v(S,A,I){return S^A^I}function x(S,A,I){return S&A|~S&I}function C(S,A,I){return(S|~A)^I}function D(S,A,I){return S&I|A&~I}function E(S,A,I){return S^(A|~I)}function T(S,A){return S<<A|S>>>32-A}r.RIPEMD160=a._createHelper(y),r.HmacRIPEMD160=a._createHmacHelper(y)})(),t.RIPEMD160})})(Iv)),Iv.exports}var Rv={exports:{}},Ere=Rv.exports,rF;function m5(){return rF||(rF=1,(function(i,e){(function(t,n){i.exports=n(Qt())})(Ere,function(t){(function(){var n=t,r=n.lib,s=r.Base,o=n.enc,a=o.Utf8,l=n.algo;l.HMAC=s.extend({init:function(c,d){c=this._hasher=new c.init,typeof d=="str
11ing"&&(d=a.parse(d));var f=c.blockSize,m=f*4;d.sigBytes>m&&(d=c.finalize(d)),d.clamp();for(var p=this._oKey=d.clone(),g=this._iKey=d.clone(),y=p.words,v=g.words,x=0;x<f;x++)y[x]^=1549556828,v[x]^=909522486;p.sigBytes=g.sigBytes=m,this.reset()},reset:function(){var c=this._hasher;c.reset(),c.update(this._iKey)},update:function(c){return this._hasher.update(c),this},finalize:function(c){var d=this._hasher,f=d.finalize(c);d.reset();var m=d.finalize(this._oKey.clone().concat(f));return m}})})()})})(Rv)),Rv.exports}var Fv={exports:{}},Tre=Fv.exports,sF;function Are(){return sF||(sF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),h5(),m5())})(Tre,function(t){return(function(){var n=t,r=n.lib,s=r.Base,o=r.WordArray,a=n.algo,l=a.SHA256,c=a.HMAC,d=a.PBKDF2=s.extend({cfg:s.extend({keySize:128/32,hasher:l,iterations:25e4}),init:function(f){this.cfg=this.cfg.extend(f)},compute:function(f,m){for(var p=this.cfg,g=c.create(p.hasher,f),y=o.create(),v=o.create([1]),x=y.words,C=v.words,D=p.keySize,E=p.iterations;x.length<D;){var T=g.update(m).finalize(v);g.reset();for(var S=T.words,A=S.length,I=T,R=1;R<E;R++){I=g.finalize(I),g.reset();for(var O=I.words,j=0;j<A;j++)S[j]^=O[j]}y.concat(T),C[0]++}return y.sigBytes=D*4,y}});n.PBKDF2=function(f,m,p){return d.create(p).compute(f,m)}})(),t.PBKDF2})})(Fv)),Fv.exports}var Ov={exports:{}},kre=Ov.exports,oF;function qc(){return oF||(oF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Vz(),m5())})(kre,function(t){return(function(){var n=t,r=n.lib,s=r.Base,o=r.WordArray,a=n.algo,l=a.MD5,c=a.EvpKDF=s.extend({cfg:s.extend({keySize:128/32,hasher:l,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,f){for(var m,p=this.cfg,g=p.hasher.create(),y=o.create(),v=y.words,x=p.keySize,C=p.iterations;v.length<x;){m&&g.update(m),m=g.update(d).finalize(f),g.reset();for(var D=1;D<C;D++)m=g.finalize(m),g.reset();y.concat(m)}return y.sigBytes=x*4,y}});n.EvpKDF=function(d,f,m){return c.create(m).compute(d,f)}})(),t.EvpKDF})})(Ov)),Ov.exports}var Nv={exports:{}},Sre=Nv.exports,aF;function Hi(){return aF||(aF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),qc())})(Sre,function(t){t.lib.Cipher||(function(n){var r=t,s=r.lib,o=s.Base,a=s.WordArray,l=s.BufferedBlockAlgorithm,c=r.enc;c.Utf8;var d=c.Base64,f=r.algo,m=f.EvpKDF,p=s.Cipher=l.extend({cfg:o.extend(),createEncryptor:function(O,j){return this.create(this._ENC_XFORM_MODE,O,j)},createDecryptor:function(O,j){return this.create(this._DEC_XFORM_MODE,O,j)},init:function(O,j,B){this.cfg=this.cfg.extend(B),this._xformMode=O,this._key=j,this.reset()},reset:function(){l.reset.call(this),this._doReset()},process:function(O){return this._append(O),this._process()},finalize:function(O){O&&this._append(O);var j=this._doFinalize();return j},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function O(j){return typeof j=="string"?R:S}return function(j){return{encrypt:function(B,U,F){return O(U).encrypt(j,B,U,F)},decrypt:function(B,U,F){return O(U).decrypt(j,B,U,F)}}}})()});s.StreamCipher=p.extend({_doFinalize:function(){var O=this._process(!0);return O},blockSize:1});var g=r.mode={},y=s.BlockCipherMode=o.extend({createEncryptor:function(O,j){return this.Encryptor.create(O,j)},createDecryptor:function(O,j){return this.Decryptor.create(O,j)},init:function(O,j){this._cipher=O,this._iv=j}}),v=g.CBC=(function(){var O=y.extend();O.Encryptor=O.extend({processBlock:function(B,U){var F=this._cipher,H=F.blockSize;j.call(this,B,U,H),F.encryptBlock(B,U),this._prevBlock=B.slice(U,U+H)}}),O.Decryptor=O.extend({processBlock:function(B,U){var F=this._cipher,H=F.blockSize,L=B.slice(U,U+H);F.decryptBlock(B,U),j.call(this,B,U,H),this._prevBlock=L}});function j(B,U,F){var H,L=this._iv;L?(H=L,this._iv=n):H=this._prevBlock;for(var W=0;W<F;W++)B[U+W]^=H[W]}return O})(),x=r.pad={},C=x.Pkcs7={pad:function(O,j){for(var B=j*4,U=B-O.sigBytes%B,F=U<<24|U<<16|U<<8|U,H=[],L=0;L<U;L+=4)H.push(F);var W=a.create(H,U);O.concat(W)},unpad:function(O){var j=O.words[O.sigBytes-1>>>2]&255;O.sigBytes-=j}};s.BlockCipher=p.extend({cfg:p.cfg.extend({mode:v,padding:C}),reset:function(){var O;p.reset.call(this);var j=this.cfg,B=j.iv,U=j.mode;this._xformMode==this._ENC_XFORM_MODE?O=U.createEncryptor:(O=U.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==O?this._mode.init(this,B&&B.words):(this._mode=O.call(U,this,B&&B.words),this._mode.__creator=O)},_doProcessBlock:function(O,j){this._mode.processBlock(O,j)},_doFinalize:function(){var O,j=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(j.pad(this._data,this.blockSize),O=this._process(!0)):(O=this._process(!0),j.unpad(O)),O},blockSize:128/32});var D=s.CipherParams=o.extend({init:function(O){this.mixIn(O)},toString:function(O){return(O||this.formatter).stringify(this)}}),E=r.format={},T=E.OpenSSL={stringify:function(O){var j,B=O.ciphertext,U=O.salt;return U?j=a.create([1398893684,1701076831]).concat(U).concat(B):j=B,j.toString(d)},parse:function(O){var j,B=d.parse(O),U=B.words;return U[0]==1398893684&&U[1]==1701076831&&(j=a.create(U.slice(2,4)),U.splice(0,4),B.sigBytes-=16),D.create({ciphertext:B,salt:j})}},S=s.SerializableCipher=o.extend({cfg:o.extend({format:T}),encrypt:function(O,j,B,U){U=this.cfg.extend(U);var F=O.createEncryptor(B,U),H=F.finalize(j),L=F.cfg;
vendor: 8,978 bytes, line 11
11return D.create({ciphertext:H,key:B,iv:L.iv,algorithm:O,mode:L.mode,padding:L.padding,blockSize:O.blockSize,formatter:U.format})},decrypt:function(O,j,B,U){U=this.cfg.extend(U),j=this._parse(j,U.format);var F=O.createDecryptor(B,U).finalize(j.ciphertext);return F},_parse:function(O,j){return typeof O=="string"?j.parse(O,this):O}}),A=r.kdf={},I=A.OpenSSL={execute:function(O,j,B,U,F){if(U||(U=a.random(64/8)),F)var H=m.create({keySize:j+B,hasher:F}).compute(O,U);else var H=m.create({keySize:j+B}).compute(O,U);var L=a.create(H.words.slice(j),B*4);return H.sigBytes=j*4,D.create({key:H,iv:L,salt:U})}},R=s.PasswordBasedCipher=S.extend({cfg:S.cfg.extend({kdf:I}),encrypt:function(O,j,B,U){U=this.cfg.extend(U);var F=U.kdf.execute(B,O.keySize,O.ivSize,U.salt,U.hasher);U.iv=F.iv;var H=S.encrypt.call(this,O,j,F.key,U);return H.mixIn(F),H},decrypt:function(O,j,B,U){U=this.cfg.extend(U),j=this._parse(j,U.format);var F=U.kdf.execute(B,O.keySize,O.ivSize,j.salt,U.hasher);U.iv=F.iv;var H=S.decrypt.call(this,O,j,F.key,U);return H}})})()})})(Nv)),Nv.exports}var Bv={exports:{}},Pre=Bv.exports,lF;function Ire(){return lF||(lF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Hi())})(Pre,function(t){return t.mode.CFB=(function(){var n=t.lib.BlockCipherMode.extend();n.Encryptor=n.extend({processBlock:function(s,o){var a=this._cipher,l=a.blockSize;r.call(this,s,o,l,a),this._prevBlock=s.slice(o,o+l)}}),n.Decryptor=n.extend({processBlock:function(s,o){var a=this._cipher,l=a.blockSize,c=s.slice(o,o+l);r.call(this,s,o,l,a),this._prevBlock=c}});function r(s,o,a,l){var c,d=this._iv;d?(c=d.slice(0),this._iv=void 0):c=this._prevBlock,l.encryptBlock(c,0);for(var f=0;f<a;f++)s[o+f]^=c[f]}return n})(),t.mode.CFB})})(Bv)),Bv.exports}var Mv={exports:{}},Rre=Mv.exports,cF;function Fre(){return cF||(cF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Hi())})(Rre,function(t){return t.mode.CTR=(function(){var n=t.lib.BlockCipherMode.extend(),r=n.Encryptor=n.extend({processBlock:function(s,o){var a=this._cipher,l=a.blockSize,c=this._iv,d=this._counter;c&&(d=this._counter=c.slice(0),this._iv=void 0);var f=d.slice(0);a.encryptBlock(f,0),d[l-1]=d[l-1]+1|0;for(var m=0;m<l;m++)s[o+m]^=f[m]}});return n.Decryptor=r,n})(),t.mode.CTR})})(Mv)),Mv.exports}var Lv={exports:{}},Ore=Lv.exports,uF;function Nre(){return uF||(uF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Hi())})(Ore,function(t){return t.mode.CTRGladman=(function(){var n=t.lib.BlockCipherMode.extend();function r(a){if((a>>24&255)===255){var l=a>>16&255,c=a>>8&255,d=a&255;l===255?(l=0,c===255?(c=0,d===255?d=0:++d):++c):++l,a=0,a+=l<<16,a+=c<<8,a+=d}else a+=1<<24;return a}function s(a){return(a[0]=r(a[0]))===0&&(a[1]=r(a[1])),a}var o=n.Encryptor=n.extend({processBlock:function(a,l){var c=this._cipher,d=c.blockSize,f=this._iv,m=this._counter;f&&(m=this._counter=f.slice(0),this._iv=void 0),s(m);var p=m.slice(0);c.encryptBlock(p,0);for(var g=0;g<d;g++)a[l+g]^=p[g]}});return n.Decryptor=o,n})(),t.mode.CTRGladman})})(Lv)),Lv.exports}var Uv={exports:{}},Bre=Uv.exports,dF;function Mre(){return dF||(dF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Hi())})(Bre,function(t){return t.mode.OFB=(function(){var n=t.lib.BlockCipherMode.extend(),r=n.Encryptor=n.extend({processBlock:function(s,o){var a=this._cipher,l=a.blockSize,c=this._iv,d=this._keystream;c&&(d=this._keystream=c.slice(0),this._iv=void 0),a.encryptBlock(d,0);for(var f=0;f<l;f++)s[o+f]^=d[f]}});return n.Decryptor=r,n})(),t.mode.OFB})})(Uv)),Uv.exports}var Vv={exports:{}},Lre=Vv.exports,fF;function Ure(){return fF||(fF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Hi())})(Lre,function(t){return t.mode.ECB=(function(){var n=t.lib.BlockCipherMode.extend();return n.Encryptor=n.extend({processBlock:function(r,s){this._cipher.encryptBlock(r,s)}}),n.Decryptor=n.extend({processBlock:function(r,s){this._cipher.decryptBlock(r,s)}}),n})(),t.mode.ECB})})(Vv)),Vv.exports}var jv={exports:{}},Vre=jv.exports,hF;function jre(){return hF||(hF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Hi())})(Vre,function(t){return t.pad.AnsiX923={pad:function(n,r){var s=n.sigBytes,o=r*4,a=o-s%o,l=s+a-1;n.clamp(),n.words[l>>>2]|=a<<24-l%4*8,n.sigBytes+=a},unpad:function(n){var r=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=r}},t.pad.Ansix923})})(jv)),jv.exports}var zv={exports:{}},zre=zv.exports,mF;function Wre(){return mF||(mF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Hi())})(zre,function(t){return t.pad.Iso10126={pad:function(n,r){var s=r*4,o=s-n.sigBytes%s;n.concat(t.lib.WordArray.random(o-1)).concat(t.lib.WordArray.create([o<<24],1))},unpad:function(n){var r=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=r}},t.pad.Iso10126})})(zv)),zv.exports}var Wv={exports:{}},Hre=Wv.exports,pF;function qre(){return pF||(pF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Hi())})(Hre,function(t){return t.pad.Iso97971={pad:function(n,r){n.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(n,r)},unpad:function(n){t.pad.ZeroPadding.unpad(n),n.sigBytes--}},t.pad.Iso97971})})(Wv)),Wv.exports}var Hv={exports:{}},$re=Hv.exports,gF;function Gre(){return gF||(gF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Hi())})($re,function(t){return t.pad.ZeroPadding={pad:function(n,r){var s=r*4;n.clamp(),n.sigBytes+=s-(n.sigBytes%s||s)},unpad:function(n){for(var r=n.words,s=n.sigBytes-1,s=n.sigBytes-1;s>=0;s--)if(r[s>>>2]>>>24-s%4*8&255){n.sigBytes=s+1;break}}},t.pad.ZeroPadding})})(Hv)),Hv.exports}var qv={exports:{}},Yre=qv.exports,bF;function Kre(){return bF||(bF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Hi())})(Yre,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})})(qv)),qv.exports}var $v={exports:{}},Xre=$v.exports,yF;function Qre(){return yF||(yF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Hi())})(Xre,function(t){return(function(n){var r=t,s=r.lib,o=s.CipherParams,a=r.enc,l=a.Hex,c=r.format;c.Hex={stringify:function(d){return d.ciphertext.toString(l)},parse:function(d){var f=l.parse(d);return o.create({ciphertext:f})}}})(),t.format.Hex})})($v)),$v.exports}var Gv={exports:{}},Zre=Gv.exports,vF;function Jre(){return vF||(vF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),fd(),hd(),qc(),Hi())})(Zre,function(t){return(function(){var n=t,r=n.lib,s=r.BlockCipher,o=n.algo,a=[],l=[],c=[],d=[],f=[],m=[],p=[],g=[],y=[],v=[];(function(){for(var D=[],E=0;E<256;E++)E<128?D[E]=E<<1:D[E]=E<<1^283;for(var T=0,S=0,E=0;E<256;E++){var A=S^S<<1^S<<2^S<<3^S<<4;A=A>>>8^A&255^99,a[T]=A,l[A]=T;var I=D[T],R=D[I],O=D[R],j=D[A]*257^A*16843008;c[T]=j<<24|j>>>8,d[T]=j<<16|j>>>16,f[T]=j<<8|j>>>24,m[T]=j;var j=O*16843009^R*65537^I*257^T*16843008;p[A]=j<<24|j>>>8,g[A]=j<<16|j>>>16,y[A]=j<<8|j>>>24,v[A]=j,T?(T=I^D[D[D[O^I]]],S^=D[D[S]]):T=S=1}})();var x=[0,1,2,4,8,16,32,64,128,27,54],C=o.AES=s.extend({_doReset:function(){var D;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var E=this._keyPriorReset=this._key,T=E.words,S=E.sigBytes/4,A=this._nRounds=S+6,I=(A+1)*4,R=this._keySchedule=[],O=0;O<I;O++)O<S?R[O]=T[O]:(D=R[O-1],O%S?S>6&&O%S==4&&(D=a[D>>>24]<<24|a[D>>>16&255]<<16|a[D>>>8&255]<<8|a[D&255]):(D=D<<8|D>>>24,D=a[D>>>24]<<24|a[D>>>16&255]<<16|a[D>>>8&255]<<8|a[D&255],D^=x[O/S|0]<<24),R[O]=R[O-S]^D);for(var j=this._invKeySchedule=[],B=0;B<I;B++){var O=I-B;if(B%4)var D=R[O];else var D=R[O-4];B<4||O<=4?j[B]=D:j[B]=p[a[D>>>24]]^g[a[D>>>16&255]]^y[a[D>>>8&255]]^v[a[D&255]]}}},encryptBlock:function(D,E){this._doCryptBlock(D,E,this._keySchedule,c,d,f,m,a)},decryptBlock:function(D,E){var T=D[E+1];D[E+1]=D[E+3],D[E+3]=T,this._doCryptBlock(D,E,this._invKeySchedule,p,g,y,v,l);var T=D[E+1];D[E+1]=D[E+3],D[E+3]=T},_doCryptBlock:function(D,E,T,S,A,I,R,O){for(var j=this._nRounds,B=D[E]^T[0],U=D[E+1]^T[1],F=D[E+2]^T[2],H=D[E+3]^T[3],L=4,W=1;W<j;W++){var G=S[B>>>24]^A[U>>>16&255]^I[F>>>8&255]^R[H&255]^T[L++],Y=S[U>>>24]^A[F>>>16&255]^I[H>>>8&255]^R[B&255]^T[L++],ie=S[F>>>24]^A[H>>>16&255]^I[B>>>8&255]^R[U&255]^T[L++],V=S[H>>>24]^A[B>>>16&255]^I[U>>>8&255]^R[F&255]^T[L++];B=G,U=Y,F=ie,H=V}var G=(O[B>>>24]<<24|O[U>>>16&255]<<16|O[F>>>8&255]<<8|O[H&255])^T[L++],Y=(O[U>>>24]<<24|O[F>>>16&255]<<16|O[H>>>8&255]<<8|O[B&255])^T[L++],ie=(O[F>>>24]<<24|O[H>>>16&255]<<16|O[B>>>8&255]<<8|O[U&255])^T[L++],V=(O[H>>>24]<<24|O[B>>>16&255]<<16|O[U>>>8&255]<<8|O[F&255])^T[L++];D[E]=G,D[E+1]=Y,D[E+2]=ie,D[E+3]=V},keySize:256/32});n.AES=s._createHelper(C)})(),t.AES})})(Gv)),Gv.exports}var Yv={exports:{}},ese=Yv.exports,wF;function tse(){return wF||(wF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),fd(),hd(),qc(),Hi())})(ese,function(t){return(function(){var n=t,r=n.lib,s=r.WordArray,o=r.BlockCipher,a=n.algo,l=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],d=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f
vendor: 7,629 bytes, line 11
11=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],
vendor: 2,554 bytes, line 11
11m=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],p=a.DES=o.extend({_doReset:function(){for(var x=this._key,C=x.words,D=[],E=0;E<56;E++){var T=l[E]-1;D[E]=C[T>>>5]>>>31-T%32&1}for(var S=this._subKeys=[],A=0;A<16;A++){for(var I=S[A]=[],R=d[A],E=0;E<24;E++)I[E/6|0]|=D[(c[E]-1+R)%28]<<31-E%6,I[4+(E/6|0)]|=D[28+(c[E+24]-1+R)%28]<<31-E%6;I[0]=I[0]<<1|I[0]>>>31;for(var E=1;E<7;E++)I[E]=I[E]>>>(E-1)*4+3;I[7]=I[7]<<5|I[7]>>>27}for(var O=this._invSubKeys=[],E=0;E<16;E++)O[E]=S[15-E]},encryptBlock:function(x,C){this._doCryptBlock(x,C,this._subKeys)},decryptBlock:function(x,C){this._doCryptBlock(x,C,this._invSubKeys)},_doCryptBlock:function(x,C,D){this._lBlock=x[C],this._rBlock=x[C+1],g.call(this,4,252645135),g.call(this,16,65535),y.call(this,2,858993459),y.call(this,8,16711935),g.call(this,1,1431655765);for(var E=0;E<16;E++){for(var T=D[E],S=this._lBlock,A=this._rBlock,I=0,R=0;R<8;R++)I|=f[R][((A^T[R])&m[R])>>>0];this._lBlock=A,this._rBlock=S^I}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,g.call(this,1,1431655765),y.call(this,8,16711935),y.call(this,2,858993459),g.call(this,16,65535),g.call(this,4,252645135),x[C]=this._lBlock,x[C+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function g(x,C){var D=(this._lBlock>>>x^this._rBlock)&C;this._rBlock^=D,this._lBlock^=D<<x}function y(x,C){var D=(this._rBlock>>>x^this._lBlock)&C;this._lBlock^=D,this._rBlock^=D<<x}n.DES=o._createHelper(p);var v=a.TripleDES=o.extend({_doReset:function(){var x=this._key,C=x.words;if(C.length!==2&&C.length!==4&&C.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var D=C.slice(0,2),E=C.length<4?C.slice(0,2):C.slice(2,4),T=C.length<6?C.slice(0,2):C.slice(4,6);this._des1=p.createEncryptor(s.create(D)),this._des2=p.createEncryptor(s.create(E)),this._des3=p.createEncryptor(s.create(T))},encryptBlock:function(x,C){this._des1.encryptBlock(x,C),this._des2.decryptBlock(x,C),this._des3.encryptBlock(x,C)},decryptBlock:function(x,C){this._des3.decryptBlock(x,C),this._des2.encryptBlock(x,C),this._des1.decryptBlock(x,C)},keySize:192/32,ivSize:64/32,blockSize:64/32});n.TripleDES=o._createHelper(v)})(),t.TripleDES})})(Yv)),Yv.exports}var Kv={exports:{}},nse=Kv.exports,xF;function ise(){return xF||(xF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),fd(),hd(),qc(),Hi())})(nse,function(t){return(function(){var n=t,r=n.lib,s=r.StreamCipher,o=n.algo,a=o.RC4=s.extend({_doReset:function(){for(var d=this._key,f=d.words,m=d.sigBytes,p=this._S=[],g=0;g<256;g++)p[g]=g;
vendor: 5,690 bytes, line 11
11for(var g=0,y=0;g<256;g++){var v=g%m,x=f[v>>>2]>>>24-v%4*8&255;y=(y+p[g]+x)%256;var C=p[g];p[g]=p[y],p[y]=C}this._i=this._j=0},_doProcessBlock:function(d,f){d[f]^=l.call(this)},keySize:256/32,ivSize:0});function l(){for(var d=this._S,f=this._i,m=this._j,p=0,g=0;g<4;g++){f=(f+1)%256,m=(m+d[f])%256;var y=d[f];d[f]=d[m],d[m]=y,p|=d[(d[f]+d[m])%256]<<24-g*8}return this._i=f,this._j=m,p}n.RC4=s._createHelper(a);var c=o.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var d=this.cfg.drop;d>0;d--)l.call(this)}});n.RC4Drop=s._createHelper(c)})(),t.RC4})})(Kv)),Kv.exports}var Xv={exports:{}},rse=Xv.exports,_F;function sse(){return _F||(_F=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),fd(),hd(),qc(),Hi())})(rse,function(t){return(function(){var n=t,r=n.lib,s=r.StreamCipher,o=n.algo,a=[],l=[],c=[],d=o.Rabbit=s.extend({_doReset:function(){for(var m=this._key.words,p=this.cfg.iv,g=0;g<4;g++)m[g]=(m[g]<<8|m[g]>>>24)&16711935|(m[g]<<24|m[g]>>>8)&4278255360;var y=this._X=[m[0],m[3]<<16|m[2]>>>16,m[1],m[0]<<16|m[3]>>>16,m[2],m[1]<<16|m[0]>>>16,m[3],m[2]<<16|m[1]>>>16],v=this._C=[m[2]<<16|m[2]>>>16,m[0]&4294901760|m[1]&65535,m[3]<<16|m[3]>>>16,m[1]&4294901760|m[2]&65535,m[0]<<16|m[0]>>>16,m[2]&4294901760|m[3]&65535,m[1]<<16|m[1]>>>16,m[3]&4294901760|m[0]&65535];this._b=0;for(var g=0;g<4;g++)f.call(this);for(var g=0;g<8;g++)v[g]^=y[g+4&7];if(p){var x=p.words,C=x[0],D=x[1],E=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,T=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,S=E>>>16|T&4294901760,A=T<<16|E&65535;v[0]^=E,v[1]^=S,v[2]^=T,v[3]^=A,v[4]^=E,v[5]^=S,v[6]^=T,v[7]^=A;for(var g=0;g<4;g++)f.call(this)}},_doProcessBlock:function(m,p){var g=this._X;f.call(this),a[0]=g[0]^g[5]>>>16^g[3]<<16,a[1]=g[2]^g[7]>>>16^g[5]<<16,a[2]=g[4]^g[1]>>>16^g[7]<<16,a[3]=g[6]^g[3]>>>16^g[1]<<16;for(var y=0;y<4;y++)a[y]=(a[y]<<8|a[y]>>>24)&16711935|(a[y]<<24|a[y]>>>8)&4278255360,m[p+y]^=a[y]},blockSize:128/32,ivSize:64/32});function f(){for(var m=this._X,p=this._C,g=0;g<8;g++)l[g]=p[g];p[0]=p[0]+1295307597+this._b|0,p[1]=p[1]+3545052371+(p[0]>>>0<l[0]>>>0?1:0)|0,p[2]=p[2]+886263092+(p[1]>>>0<l[1]>>>0?1:0)|0,p[3]=p[3]+1295307597+(p[2]>>>0<l[2]>>>0?1:0)|0,p[4]=p[4]+3545052371+(p[3]>>>0<l[3]>>>0?1:0)|0,p[5]=p[5]+886263092+(p[4]>>>0<l[4]>>>0?1:0)|0,p[6]=p[6]+1295307597+(p[5]>>>0<l[5]>>>0?1:0)|0,p[7]=p[7]+3545052371+(p[6]>>>0<l[6]>>>0?1:0)|0,this._b=p[7]>>>0<l[7]>>>0?1:0;for(var g=0;g<8;g++){var y=m[g]+p[g],v=y&65535,x=y>>>16,C=((v*v>>>17)+v*x>>>15)+x*x,D=((y&4294901760)*y|0)+((y&65535)*y|0);c[g]=C^D}m[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,m[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,m[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,m[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,m[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,m[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,m[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,m[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}n.Rabbit=s._createHelper(d)})(),t.Rabbit})})(Xv)),Xv.exports}var Qv={exports:{}},ose=Qv.exports,CF;function ase(){return CF||(CF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),fd(),hd(),qc(),Hi())})(ose,function(t){return(function(){var n=t,r=n.lib,s=r.StreamCipher,o=n.algo,a=[],l=[],c=[],d=o.RabbitLegacy=s.extend({_doReset:function(){var m=this._key.words,p=this.cfg.iv,g=this._X=[m[0],m[3]<<16|m[2]>>>16,m[1],m[0]<<16|m[3]>>>16,m[2],m[1]<<16|m[0]>>>16,m[3],m[2]<<16|m[1]>>>16],y=this._C=[m[2]<<16|m[2]>>>16,m[0]&4294901760|m[1]&65535,m[3]<<16|m[3]>>>16,m[1]&4294901760|m[2]&65535,m[0]<<16|m[0]>>>16,m[2]&4294901760|m[3]&65535,m[1]<<16|m[1]>>>16,m[3]&4294901760|m[0]&65535];this._b=0;for(var v=0;v<4;v++)f.call(this);for(var v=0;v<8;v++)y[v]^=g[v+4&7];if(p){var x=p.words,C=x[0],D=x[1],E=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,T=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,S=E>>>16|T&4294901760,A=T<<16|E&65535;y[0]^=E,y[1]^=S,y[2]^=T,y[3]^=A,y[4]^=E,y[5]^=S,y[6]^=T,y[7]^=A;for(var v=0;v<4;v++)f.call(this)}},_doProcessBlock:function(m,p){var g=this._X;f.call(this),a[0]=g[0]^g[5]>>>16^g[3]<<16,a[1]=g[2]^g[7]>>>16^g[5]<<16,a[2]=g[4]^g[1]>>>16^g[7]<<16,a[3]=g[6]^g[3]>>>16^g[1]<<16;for(var y=0;y<4;y++)a[y]=(a[y]<<8|a[y]>>>24)&16711935|(a[y]<<24|a[y]>>>8)&4278255360,m[p+y]^=a[y]},blockSize:128/32,ivSize:64/32});function f(){for(var m=this._X,p=this._C,g=0;g<8;g++)l[g]=p[g];p[0]=p[0]+1295307597+this._b|0,p[1]=p[1]+3545052371+(p[0]>>>0<l[0]>>>0?1:0)|0,p[2]=p[2]+886263092+(p[1]>>>0<l[1]>>>0?1:0)|0,p[3]=p[3]+1295307597+(p[2]>>>0<l[2]>>>0?1:0)|0,p[4]=p[4]+3545052371+(p[3]>>>0<l[3]>>>0?1:0)|0,p[5]=p[5]+886263092+(p[4]>>>0<l[4]>>>0?1:0)|0,p[6]=p[6]+1295307597+(p[5]>>>0<l[5]>>>0?1:0)|0,p[7]=p[7]+3545052371+(p[6]>>>0<l[6]>>>0?1:0)|0,this._b=p[7]>>>0<l[7]>>>0?1:0;for(var g=0;g<8;g++){var y=m[g]+p[g],v=y&65535,x=y>>>16,C=((v*v>>>17)+v*x>>>15)+x*x,D=((y&4294901760)*y|0)+((y&65535)*y|0);c[g]=C^D}m[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,m[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,m[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,m[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,m[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,m[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,m[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,m[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}n.RabbitLegacy=s._createHelper(d)})(),t.RabbitLegacy})})(Qv)),Qv.exports}var Zv={exports:{}},lse=Zv.exports,DF;function cse(){return DF||(DF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),fd(),hd(),qc(),Hi())})(lse,function(t){return(function(){var n=t,r=n.lib,s=r.BlockCipher,o=n.algo;const a=16,l=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],c
vendor: 11,038 bytes, line 11
11=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var 
11d={pbox:[],sbox:[]};function f(v,x){let C=x>>24&255,D=x>>16&255,E=x>>8&255,T=x&255,S=v.sbox[0][C]+v.sbox[1][D];return S=S^v.sbox[2][E],S=S+v.sbox[3][T],S}function m(v,x,C){let D=x,E=C,T;for(let S=0;S<a;++S)D=D^v.pbox[S],E=f(v,D)^E,T=D,D=E,E=T;return T=D,D=E,E=T,E=E^v.pbox[a],D=D^v.pbox[a+1],{left:D,right:E}}function p(v,x,C){let D=x,E=C,T;for(let S=a+1;S>1;--S)D=D^v.pbox[S],E=f(v,D)^E,T=D,D=E,E=T;return T=D,D=E,E=T,E=E^v.pbox[1],D=D^v.pbox[0],{left:D,right:E}}function g(v,x,C){for(let A=0;A<4;A++){v.sbox[A]=[];for(let I=0;I<256;I++)v.sbox[A][I]=c[A][I]}let D=0;for(let A=0;A<a+2;A++)v.pbox[A]=l[A]^x[D],D++,D>=C&&(D=0);let E=0,T=0,S=0;for(let A=0;A<a+2;A+=2)S=m(v,E,T),E=S.left,T=S.right,v.pbox[A]=E,v.pbox[A+1]=T;for(let A=0;A<4;A++)for(let I=0;I<256;I+=2)S=m(v,E,T),E=S.left,T=S.right,v.sbox[A][I]=E,v.sbox[A][I+1]=T;return!0}var y=o.Blowfish=s.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var v=this._keyPriorReset=this._key,x=v.words,C=v.sigBytes/4;g(d,x,C)}},encryptBlock:function(v,x){var C=m(d,v[x],v[x+1]);v[x]=C.left,v[x+1]=C.right},decryptBlock:function(v,x){var C=p(d,v[x],v[x+1]);v[x]=C.left,v[x+1]=C.right},blockSize:64/32,keySize:128/32,ivSize:64/32});n.Blowfish=s._createHelper(y)})(),t.Blowfish})})(Zv)),Zv.exports}var use=bv.exports,EF;function dse(){return EF||(EF=1,(function(i,e){(function(t,n,r){i.exports=n(Qt(),Vx(),are(),cre(),fd(),fre(),hd(),Vz(),h5(),bre(),jz(),wre(),_re(),Dre(),m5(),Are(),qc(),Hi(),Ire(),Fre(),Nre(),Mre(),Ure(),jre(),Wre(),qre(),Gre(),Kre(),Qre(),Jre(),tse(),ise(),sse(),ase(),cse())})(use,function(t){return t})})(bv)),bv.exports}var fk=dse();const p5="RX-BYCABS-ADMIN",zz="kjdsdf124fs435",AD=i=>
11fk.AES.encrypt(JSON.stringify(i),zz).toString(),Gf=i=>{if(i)try{const e=fk.AES.decrypt(i,zz);return JSON.parse(e.toString(fk.enc.Utf8))}catch(e){return console.error("Error decrypting state:",e),""}return""},Wz=()=>{try{const i=localStorage.getItem(p5);return i===null?"":i}catch(i){return console.error("Error loading state from localStorage:",i),""}},kD=i=>{try{localStorage.setItem(p5,i)}catch(e){console.error("Error saving state to localStorage:",e)}},Yf=()=>"MX",fse=(i,e)=>{const n=`${Yf()}${e}`,r=i.mxCoreReducer.data;return Gf(r)?.[n]||""},hse=i=>{const e=Yf(),t=i.mxCoreReducer.data,n=Gf(t),r={};return n&&Object.keys(n).forEach(s=>{s.startsWith(e)&&(r[s]=n[s])}),r},mse={data:Wz(),tempData:""},Hz=Vl({name:"mxCore",initialState:mse,reducers:{loadState:i=>{i.data=Wz()},updateState:(i,e)=>{const{key:t,value:n}=e.payload,r=Gf(i.data),s=Yf(),o=AD({...r,[`${s}${t}`]:n});kD(o),i.data=o},removeStateItem:(i,e)=>{const t=e.payload,n=Gf(i.data),s=`${Yf()}${t}`;if(n?.[s]){const o={...n};delete o[s];const a=AD(o);kD(a),i.data=a}},deleteState:i=>{const e=Gf(i.data),t=Yf(),n={...e};Object.keys(n).forEach(s=>{s.startsWith(t)&&delete n[s]});const r=AD(n);kD(r),i.data=r},clearAllState:i=>{localStorage.removeItem(p5),i.data=""},setTempStateData:(i,e)=>{const t=e.payload,n=Gf(i.data),s=`${Yf()}${t}`;i.tempData=n?.[s]}}}),{loadState:pse,updateState:gse,removeStateItem:bse,deleteState:yse,clearAllState:vse,setTempStateData:MLe}=Hz.actions,wse=Hz.reducer;var SD={exports:{}},PD={};var TF;function xse(){if(TF)return PD;TF=1;var i=Sx();function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var t=typeof Object.is=="function"?Object.is:e,n=i.useSyncExternalStore,r=i.useRef,s=i.useEffect,o=i.useMemo,a=i.useDebugValue;return PD.useSyncExternalStoreWithSelector=function(l,c,d,f,m){var p=r(null);if(p.current===null){var g={hasValue:!1,value:null};p.current=g}else g=p.current;p=o(function(){function v(T){if(!x){if(x=!0,C=T,T=f(T),m!==void 0&&g.hasValue){var S=g.value;if(m(S,T))return D=S}return D=T}if(S=D,t(C,T))return S;var A=f(T);return m!==void 0&&m(S,A)?(C=T,S):(C=T,D=A)}var x=!1,C,D,E=d===void 0?null:d;return[function(){return v(c())},E===null?void 0:function(){return v(E())}]},[c,d,f,m]);var y=n(l,p[0],p[1]);return s(function(){g.hasValue=!0,g.value=y},[y]),a(y),y},PD}var AF;function _se(){return AF||(AF=1,SD.exports=xse()),SD.exports}var Cse=_se();function Dse(i){i()}function Ese(){let i=null,e=null;return{clear(){i=null,e=null},notify(){Dse(()=>{let t=i;for(;t;)t.callback(),t=t.next})},get(){const t=[];let n=i;for(;n;)t.push(n),n=n.next;return t},subscribe(t){let n=!0;const r=e={callback:t,next:null,prev:e};return r.prev?r.prev.next=r:i=r,function(){!n||i===null||(n=!1,r.next?r.next.prev=r.prev:e=r.prev,r.prev?r.prev.next=r.next:i=r.next)}}}}var kF={notify(){},get:()=>[]};function Tse(i,e){let t,n=kF,r=0,s=!1;function o(y){d();const v=n.subscribe(y);let x=!1;return()=>{x||(x=!0,v(),f())}}function a(){n.notify()}function l(){g.onStateChange&&g.onStateChange()}function c(){return s}function d(){r++,t||(t=i.subscribe(l),n=Ese())}function f(){r--,t&&r===0&&(t(),t=void 0,n.clear(),n=kF)}function m(){s||(s=!0,d())}function p(){s&&(s=!1,f())}const g={addNestedSub:o,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:m,tryUnsubscribe:p,getListeners:()=>n};return g}var Ase=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",kse=Ase(),Sse=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Pse=Sse(),Ise=()=>kse||Pse?M.useLayoutEffect:M.useEffect,Rse=Ise(),Fse=Symbol.for("react-redux-context"),Ose=typeof globalThis<"u"?globalThis:{};function Nse(){if(!M.createContext)return{};const i=Ose[Fse]??=new Map;let e=i.get(M.createContext);return e||(e=M.createContext(null),i.set(M.createContext,e)),e}var Oc=Nse();function Bse(i){const{children:e,context:t,serverState:n,store:r}=i,s=M.useMemo(()=>{const l=Tse(r);return{store:r,subscription:l,getServerState:n?()=>n:void 0}},[r,n]),o=M.useMemo(()=>r.getState(),[r]);Rse(()=>{const{subscription:l}=s;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),o!==r.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[s,o]);const a=t||Oc;return M.createElement(a.Provider,{value:s},e)}var Mse=Bse;function g5(i=Oc){return function(){return M.useContext(i)}}var qz=g5();function $z(i=Oc){const e=i===Oc?qz:g5(i),t=()=>{const{store:n}=e();return n};return Object.assign(t,{withTypes:()=>t}),t}var Lse=$z();function Use(i=Oc){const e=i===Oc?Lse:$z(i),t=()=>e().dispatch;return Object.assign(t,{withTypes:()=>t}),t}var Vse=Use(),jse=(i,e)=>i===e;function zse(i=Oc){const e=i===Oc?qz:g5(i),t=(n,r={})=>{const{equalityFn:s=jse}=typeof r=="function"?{equalityFn:r}:r,o=e(),{store:a,subscription:l,getServerState:c}=o;M.useRef(!0);const d=M.useCallback({[n.name](m){return n(m)}}[n.name],[n]),f=Cse.useSyncExternalStoreWithSelector(l.addNestedSub,a.getState,c||a.getState,d,s);return M.useDebugValue(f),f};return Object.assign(t,{withTypes:()=>t}),t}var Gz=zse();const jl=()=>Vse(),$c=Gz,Yh=()=>{const i=jl(),e=$c(t=>t);return M.useEffect(()=>{i(pse())},[i]),{updateState:(t,n)=>i(gse({key:t,value:n})),getStateValue:t=>fse(e,t),removeStateItem:t=>i(bse(t)),clearState:()=>i(yse()),clearAllState:()=>i(vse()),getSpecificStateData:()=>hse(e)}},Wse={isLoading:!1,message:""},Yz=Vl({name:"loader",initialState:Wse,reducers:{showLoader:(i,e)=>{i.isLoading=!0,i.message=e.payload||""},hideLoaderImmediately:i=>{i.isLoading=!1,i.message=""}}}
11),{showLoader:Kz,hideLoaderImmediately:Hse}=Yz.actions,qse=Yz.reducer,$se=(i=2e3,e)=>t=>{t(Kz(e)),setTimeout(()=>{t(Hse())},i)},Gse={isOpen:!1},Xz=Vl({name:"searchBarToggle",initialState:Gse,reducers:{openSearchBar:i=>{i.isOpen=!0},closeSearchBar:i=>{i.isOpen=!1},toggleSearchBar:i=>{i.isOpen=!i.isOpen}}}),{openSearchBar:Yse,closeSearchBar:hk,toggleSearchBar:Qz}=Xz.actions,Kse=Xz.reducer,Xse={isOpen:!1},Zz=Vl({name:"coreMenuToggle",initialState:Xse,reducers:{openCoreMenu:i=>{i.isOpen=!0},closeCoreMenu:i=>{i.isOpen=!1},toggleCoreMenu:i=>{i.isOpen=!i.isOpen}}}),{openCoreMenu:LLe,closeCoreMenu:Qse,toggleCoreMenu:Zse}=Zz.actions,Jse=Zz.reducer,eoe={isOpen:!1},Jz=Vl({name:"sideBarToggle",initialState:eoe,reducers:{openSideBar:i=>{i.isOpen=!0},closeSideBar:i=>{i.isOpen=!1},toggleSideBar:i=>{i.isOpen=!i.isOpen}}}),{openSideBar:ULe,closeSideBar:VLe,toggleSideBar:toe}=Jz.actions,noe=Jz.reducer,ioe={mode:"compact",type:"light"},eW=Vl({name:"theme",initialState:ioe,reducers:{setTheme:(i,e)=>{const{mode:t,type:n}=e.payload;i.mode=t,i.type=n,localStorage.setItem("theme",JSON.stringify(e.payload))},initializeTheme:i=>{const e=localStorage.getItem("theme");if(e){const t=JSON.parse(e);i.mode=t.mode,i.type=t.type}}}}),{setTheme:jLe,initializeTheme:zLe}=eW.actions,roe=eW.reducer,soe={count:0,dataLength:0,isTrashRestore:!1,isDelete:!1},tW=Vl({name:"pagination",initialState:soe,reducers:{setPaginationData:(i,e)=>{const{count:t,dataLength:n}=e.payload;return{...i,count:t,dataLength:n}},setIsTrashRestore:(i,e)=>{const{isTrashRestore:t}=e.payload;i.isTrashRestore=t},setIsDelete:(i,e)=>{const{isDelete:t}=e.payload;i.isDelete=t}}}),{setPaginationData:ooe,setIsTrashRestore:nW,setIsDelete:iW}=tW.actions,aoe=tW.reducer,loe={isOpen:!1,type:null,title:"",message:"",content:"",onConfirm:void 0,onCancel:void 0,onClose:void 0},rW=Vl({name:"modal",initialState:loe,reducers:{showModal:(i,e)=>{i.isOpen=!0,i.type=e.payload.type,i.title=e.payload.title||(e.payload.type==="alert"?"Alert":e.payload.type==="confirm"?"Confirm":"Popup"),i.message=e.payload.message||"",i.content=e.payload.content||"",i.onConfirm=e.payload.onConfirm,i.onClose=e.payload.onClose,i.onCancel=e.payload.onCancel},hideModal:i=>{i.isOpen=!1,i.type=null,i.title="",i.message="",i.content="",i.onConfirm=void 0,i.onClose=void 0,i.onCancel=void 0}}}),{showModal:fw,hideModal:Ac}=rW.actions,coe=rW.reducer,uoe={isLoading:!1},sW=Vl({name:"progress",initialState:uoe,reducers:{showProgressFn:i=>{i.isLoading=!0},hideProgressFn:i=>{i.isLoading=!1}}}),{showProgressFn:WLe,hideProgressFn:HLe}=sW.actions,doe=sW.reducer,oW=Wie({reducer:{searchBarToggleReducer:Kse,coreMenuToggleReducer:Jse,sideBarToggleReducer:noe,themeReducer:roe,paginationReducer:aoe,mxCoreReducer:wse,modal:coe,loader:qse,progress:doe},middleware:i=>i({serializableCheck:!1})});function aW(i,e){return function(){return i.apply(e,arguments)}}const{toString:foe}=Object.prototype,{getPrototypeOf:b5}=Object,{iterator:jx,toStringTag:lW}=Symbol,zx=(i=>e=>{const t=foe.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),qo=i=>(i=i.toLowerCase(),e=>zx(e)===i),Wx=i=>e=>typeof e===i,{isArray:Kh}=Array,wh=Wx("undefined");function l0(i){return i!==null&&!wh(i)&&i.constructor!==null&&!wh(i.constructor)&&rs(i.constructor.isBuffer)&&i.constructor.isBuffer(i)}const cW=qo("ArrayBuffer");function hoe(i){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(i):e=i&&i.buffer&&cW(i.buffer),e}const moe=Wx("string"),rs=Wx("function"),uW=Wx("number"),c0=i=>i!==null&&typeof i=="object",poe=i=>i===!0||i===!1,Jv=i=>{if(zx(i)!=="object")return!1;const e=b5(i);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(lW in i)&&!(jx in i)},goe=i=>{if(!c0(i)||l0(i))return!1;try{return Object.keys(i).length===0&&Object.getPrototypeOf(i)===Object.prototype}catch{return!1}},boe=qo("Date"),yoe=qo("File"),voe=qo("Blob"),woe=qo("FileList"),xoe=i=>c0(i)&&rs(i.pipe),_oe=i=>{let e;return i&&(typeof FormData=="function"&&i instanceof FormData||rs(i.append)&&((e=zx(i))==="formdata"||e==="object"&&rs(i.toString)&&i.toString()==="[object FormData]"))},Coe=qo("URLSearchParams"),[Doe,Eoe,Toe,Aoe]=["ReadableStream","Request","Response","Headers"].map(qo),koe=i=>i.trim?i.trim():i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function u0(i,e,{allOwnKeys:t=!1}={}){if(i===null||typeof i>"u")return;let n,r;if(typeof i!="object"&&(i=[i]),Kh(i))for(n=0,r=i.length;n<r;n++)e.call(null,i[n],n,i);else{if(l0(i))return;const s=t?Object.getOwnPropertyNames(i):Object.keys(i),o=s.length;let a;for(n=0;n<o;n++)a=s[n],e.call(null,i[a],a,i)}}function dW(i,e){if(l0(i))return null;e=e.toLowerCase();const t=Object.keys(i);let n=t.length,r;for(;n-- >0;)if(r=t[n],e===r.toLowerCase())return r;return null}const zu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,fW=i=>!wh(i)&&i!==zu;function mk(){const{caseless:i,skipUndefined:e}=fW(this)&&this||{},t={},n=(r,s)=>{const o=i&&dW(t,s)||s;Jv(t[o])&&Jv(r)?t[o]=mk(t[o],r):Jv(r)?t[o]=mk({},r):Kh(r)?t[o]=r.slice():(!e||!wh(r))&&(t[o]=r)}
vendor: 4,320 bytes, line 11
11;for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&u0(arguments[r],n);return t}const Soe=(i,e,t,{allOwnKeys:n}={})=>(u0(e,(r,s)=>{t&&rs(r)?i[s]=aW(r,t):i[s]=r},{allOwnKeys:n}),i),Poe=i=>(i.charCodeAt(0)===65279&&(i=i.slice(1)),i),Ioe=(i,e,t,n)=>{i.prototype=Object.create(e.prototype,n),i.prototype.constructor=i,Object.defineProperty(i,"super",{value:e.prototype}),t&&Object.assign(i.prototype,t)},Roe=(i,e,t,n)=>{let r,s,o;const a={};if(e=e||{},i==null)return e;do{for(r=Object.getOwnPropertyNames(i),s=r.length;s-- >0;)o=r[s],(!n||n(o,i,e))&&!a[o]&&(e[o]=i[o],a[o]=!0);i=t!==!1&&b5(i)}while(i&&(!t||t(i,e))&&i!==Object.prototype);return e},Foe=(i,e,t)=>{i=String(i),(t===void 0||t>i.length)&&(t=i.length),t-=e.length;const n=i.indexOf(e,t);return n!==-1&&n===t},Ooe=i=>{if(!i)return null;if(Kh(i))return i;let e=i.length;if(!uW(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=i[e];return t},Noe=(i=>e=>i&&e instanceof i)(typeof Uint8Array<"u"&&b5(Uint8Array)),Boe=(i,e)=>{const n=(i&&i[jx]).call(i);let r;for(;(r=n.next())&&!r.done;){const s=r.value;e.call(i,s[0],s[1])}},Moe=(i,e)=>{let t;const n=[];for(;(t=i.exec(e))!==null;)n.push(t);return n},Loe=qo("HTMLFormElement"),Uoe=i=>i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,r){return n.toUpperCase()+r}),SF=(({hasOwnProperty:i})=>(e,t)=>i.call(e,t))(Object.prototype),Voe=qo("RegExp"),hW=(i,e)=>{const t=Object.getOwnPropertyDescriptors(i),n={};u0(t,(r,s)=>{let o;(o=e(r,s,i))!==!1&&(n[s]=o||r)}),Object.defineProperties(i,n)},joe=i=>{hW(i,(e,t)=>{if(rs(i)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=i[t];if(rs(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},zoe=(i,e)=>{const t={},n=r=>{r.forEach(s=>{t[s]=!0})};return Kh(i)?n(i):n(String(i).split(e)),t},Woe=()=>{},Hoe=(i,e)=>i!=null&&Number.isFinite(i=+i)?i:e;function qoe(i){return!!(i&&rs(i.append)&&i[lW]==="FormData"&&i[jx])}const $oe=i=>{const e=new Array(10),t=(n,r)=>{if(c0(n)){if(e.indexOf(n)>=0)return;if(l0(n))return n;if(!("toJSON"in n)){e[r]=n;const s=Kh(n)?[]:{};return u0(n,(o,a)=>{const l=t(o,r+1);!wh(l)&&(s[a]=l)}),e[r]=void 0,s}}return n};return t(i,0)},Goe=qo("AsyncFunction"),Yoe=i=>i&&(c0(i)||rs(i))&&rs(i.then)&&rs(i.catch),mW=((i,e)=>i?setImmediate:e?((t,n)=>(zu.addEventListener("message",({source:r,data:s})=>{r===zu&&s===t&&n.length&&n.shift()()},!1),r=>{n.push(r),zu.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",rs(zu.postMessage)),Koe=typeof queueMicrotask<"u"?queueMicrotask.bind(zu):typeof process<"u"&&process.nextTick||mW,Xoe=i=>i!=null&&rs(i[jx]),ke={isArray:Kh,isArrayBuffer:cW,isBuffer:l0,isFormData:_oe,isArrayBufferView:hoe,isString:moe,isNumber:uW,isBoolean:poe,isObject:c0,isPlainObject:Jv,isEmptyObject:goe,isReadableStream:Doe,isRequest:Eoe,isResponse:Toe,isHeaders:Aoe,isUndefined:wh,isDate:boe,isFile:yoe,isBlob:voe,isRegExp:Voe,isFunction:rs,isStream:xoe,isURLSearchParams:Coe,isTypedArray:Noe,isFileList:woe,forEach:u0,merge:mk,extend:Soe,trim:koe,stripBOM:Poe,inherits:Ioe,toFlatObject:Roe,kindOf:zx,kindOfTest:qo,endsWith:Foe,toArray:Ooe,forEachEntry:Boe,matchAll:Moe,isHTMLForm:Loe,hasOwnProperty:SF,hasOwnProp:SF,reduceDescriptors:hW,freezeMethods:joe,toObjectSet:zoe,toCamelCase:Uoe,noop:Woe,toFiniteNumber:Hoe,findKey:dW,global:zu,isContextDefined:fW,isSpecCompliantForm:qoe,toJSONObject:$oe,isAsyncFn:Goe,isThenable:Yoe,setImmediate:mW,asap:Koe,isIterable:Xoe};function Pt(i,e,t,n,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=i,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),r&&(this.response=r,this.status=r.status?r.status:null)}ke.inherits(Pt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ke.toJSONObject(this.config),code:this.code,status:this.status}}});const pW=Pt.prototype,gW={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","E
11RR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(i=>{gW[i]={value:i}});Object.defineProperties(Pt,gW);Object.defineProperty(pW,"isAxiosError",{value:!0});Pt.from=(i,e,t,n,r,s)=>{const o=Object.create(pW);ke.toFlatObject(i,o,function(d){return d!==Error.prototype},c=>c!=="isAxiosError");const a=i&&i.message?i.message:"Error",l=e==null&&i?i.code:e;return Pt.call(o,a,l,t,n,r),i&&o.cause==null&&Object.defineProperty(o,"cause",{value:i,configurable:!0}),o.name=i&&i.name||"Error",s&&Object.assign(o,s),o};const Qoe=null;function pk(i){return ke.isPlainObject(i)||ke.isArray(i)}function bW(i){return ke.endsWith(i,"[]")?i.slice(0,-2):i}function PF(i,e,t){return i?i.concat(e).map(function(r,s){return r=bW(r),!t&&s?"["+r+"]":r}).join(t?".":""):e}function Zoe(i){return ke.isArray(i)&&!i.some(pk)}const Joe=ke.toFlatObject(ke,{},null,function(e){return/^is[A-Z]/.test(e)});function Hx(i,e,t){if(!ke.isObject(i))throw new TypeError("target must be an object");e=e||new FormData,t=ke.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,v){return!ke.isUndefined(v[y])});const n=t.metaTokens,r=t.visitor||d,s=t.dots,o=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&ke.isSpecCompliantForm(e);if(!ke.isFunction(r))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(ke.isDate(g))return g.toISOString();if(ke.isBoolean(g))return g.toString();if(!l&&ke.isBlob(g))throw new Pt("Blob is not supported. Use a Buffer instead.");return ke.isArrayBuffer(g)||ke.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,y,v){let x=g;if(g&&!v&&typeof g=="object"){if(ke.endsWith(y,"{}"))y=n?y:y.slice(0,-2),g=JSON.stringify(g);else if(ke.isArray(g)&&Zoe(g)||(ke.isFileList(g)||ke.endsWith(y,"[]"))&&(x=ke.toArray(g)))return y=bW(y),x.forEach(function(D,E){!(ke.isUndefined(D)||D===null)&&e.append(o===!0?PF([y],E,s):o===null?y:y+"[]",c(D))}),!1}return pk(g)?!0:(e.append(PF(v,y,s),c(g)),!1)}const f=[],m=Object.assign(Joe,{defaultVisitor:d,convertValue:c,isVisitable:pk});function p(g,y){if(!ke.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(g),ke.forEach(g,function(x,C){(!(ke.isUndefined(x)||x===null)&&r.call(e,x,ke.isString(C)?C.trim():C,y,m))===!0&&p(x,y?y.concat(C):[C])}),f.pop()}}if(!ke.isObject(i))throw new TypeError("data must be an object");return p(i),e}
vendor: 5,437 bytes, lines 11-12
11function IF(i){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(i).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function y5(i,e){this._pairs=[],i&&Hx(i,this,e)}const yW=y5.prototype;yW.append=function(e,t){this._pairs.push([e,t])};yW.toString=function(e){const t=e?function(n){return e.call(this,n,IF)}:IF;return this._pairs.map(function(r){return t(r[0])+"="+t(r[1])},"").join("&")};function eae(i){return encodeURIComponent(i).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function vW(i,e,t){if(!e)return i;const n=t&&t.encode||eae;ke.isFunction(t)&&(t={serialize:t});const r=t&&t.serialize;let s;if(r?s=r(e,t):s=ke.isURLSearchParams(e)?e.toString():new y5(e,t).toString(n),s){const o=i.indexOf("#");o!==-1&&(i=i.slice(0,o)),i+=(i.indexOf("?")===-1?"?":"&")+s}return i}class RF{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ke.forEach(this.handlers,function(n){n!==null&&e(n)})}}const wW={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},tae=typeof URLSearchParams<"u"?URLSearchParams:y5,nae=typeof FormData<"u"?FormData:null,iae=typeof Blob<"u"?Blob:null,rae={isBrowser:!0,classes:{URLSearchParams:tae,FormData:nae,Blob:iae},protocols:["http","https","file","blob","url","data"]},v5=typeof window<"u"&&typeof document<"u",gk=typeof navigator=="object"&&navigator||void 0,sae=v5&&(!gk||["ReactNative","NativeScript","NS"].indexOf(gk.product)<0),oae=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",aae=v5&&window.location.href||"http://localhost",lae=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:v5,hasStandardBrowserEnv:sae,hasStandardBrowserWebWorkerEnv:oae,navigator:gk,origin:aae},Symbol.toStringTag,{value:"Module"})),pr={...lae,...rae};function cae(i,e){return Hx(i,new pr.classes.URLSearchParams,{visitor:function(t,n,r,s){return pr.isNode&&ke.isBuffer(t)?(this.append(n,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function uae(i){return ke.matchAll(/\w+|\[(\w*)]/g,i).map(e=>e[0]==="[]"?"":e[1]||e[0])}function dae(i){const e={},t=Object.keys(i);let n;const r=t.length;let s;for(n=0;n<r;n++)s=t[n],e[s]=i[s];return e}function xW(i){function e(t,n,r,s){let o=t[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=t.length;return o=!o&&ke.isArray(r)?r.length:o,l?(ke.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a):((!r[o]||!ke.isObject(r[o]))&&(r[o]=[]),e(t,n,r[o],s)&&ke.isArray(r[o])&&(r[o]=dae(r[o])),!a)}if(ke.isFormData(i)&&ke.isFunction(i.entries)){const t={};return ke.forEachEntry(i,(n,r)=>{e(uae(n),r,t,0)}),t}return null}function fae(i,e,t){if(ke.isString(i))try{return(e||JSON.parse)(i),ke.trim(i)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(i)}const d0={transitional:wW,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=ke.isObject(e);if(s&&ke.isHTMLForm(e)&&(e=new FormData(e)),ke.isFormData(e))return r?JSON.stringify(xW(e)):e;if(ke.isArrayBuffer(e)||ke.isBuffer(e)||ke.isStream(e)||ke.isFile(e)||ke.isBlob(e)||ke.isReadableStream(e))return e;if(ke.isArrayBufferView(e))return e.buffer;if(ke.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return cae(e,this.formSerializer).toString();if((a=ke.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Hx(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),fae(e)):e}],transformResponse:[function(e){const t=this.transitional||d0.transitional,n=t&&t.forcedJSONParsing,r=this.responseType==="json";if(ke.isResponse(e)||ke.isReadableStream(e))return e;if(e&&ke.isString(e)&&(n&&!this.responseType||r)){const o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?Pt.from(a,Pt.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pr.classes.FormData,Blob:pr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ke.forEach(["delete","get","head","post","put","patch"],i=>{d0.headers[i]={}});const hae=ke.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mae=i=>{const e={};let t,n,r;return i&&i.split(`
12`).forEach(function(o){r=o.indexOf(":"),t=o.substring(0,r).trim().toLowerCase(),n=o.substring(r+1).trim(),!(!t||e[t]&&hae[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},FF=Symbol("internals");function tp(i){return i&&String(i).trim().toLowerCase()}function e1(i){return i===!1||i==null?i:ke.isArray(i)?i.map(e1):String(i)}function pae(i){const e=Object.create(null),t=/([^\s,;
12=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(i);)e[n[1]]=n[2];return e}const gae=i=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim());function ID(i,e,t,n,r){if(ke.isFunction(n))return n.call(this,e,t);if(r&&(e=t),!!ke.isString(e)){if(ke.isString(n))return e.indexOf(n)!==-1;if(ke.isRegExp(n))return n.test(e)}}function bae(i){return i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function yae(i,e){const t=ke.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(i,n+t,{value:function(r,s,o){return this[n].call(this,e,r,s,o)},configurable:!0})})}let ss=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(a,l,c){const d=tp(l);if(!d)throw new Error("header name must be a non-empty string");const f=ke.findKey(r,d);(!f||r[f]===void 0||c===!0||c===void 0&&r[f]!==!1)&&(r[f||l]=e1(a))}const o=(a,l)=>ke.forEach(a,(c,d)=>s(c,d,l));if(ke.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(ke.isString(e)&&(e=e.trim())&&!gae(e))o(mae(e),t);else if(ke.isObject(e)&&ke.isIterable(e)){let a={},l,c;for(const d of e){if(!ke.isArray(d))throw TypeError("Object iterator must return a key-value pair");a[c=d[0]]=(l=a[c])?ke.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}o(a,t)}else e!=null&&s(t,e,n);return this}get(e,t){if(e=tp(e),e){const n=ke.findKey(this,e);if(n){const r=this[n];if(!t)return r;if(t===!0)return pae(r);if(ke.isFunction(t))return t.call(this,r,n);if(ke.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=tp(e),e){const n=ke.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||ID(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let r=!1;function s(o){if(o=tp(o),o){const a=ke.findKey(n,o);a&&(!t||ID(n,n[a],a,t))&&(delete n[a],r=!0)}}return ke.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];(!e||ID(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return ke.forEach(this,(r,s)=>{const o=ke.findKey(n,s);if(o){t[o]=e1(r),delete t[s];return}const a=e?bae(s):String(s).trim();a!==s&&delete t[s],t[a]=e1(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ke.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&ke.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
13`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(r=>n.set(r)),n}static accessor(e){const n=(this[FF]=this[FF]={accessors:{}}).accessors,r=this.prototype;function s(o){const a=tp(o);n[a]||(yae(r,o),n[a]=!0)}return ke.isArray(e)?e.forEach(s):s(e),this}};ss.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ke.reduceDescriptors(ss.prototype,({value:i},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>i,set(n){this[t]=n}}});ke.freezeMethods(ss);function RD(i,e){const t=this||d0,n=e||t,r=ss.from(n.headers);let s=n.data;return ke.forEach(i,function(a){s=a.call(t,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function _W(i){return!!(i&&i.__CANCEL__)}function Xh(i,e,t){Pt.call(this,i??"canceled",Pt.ERR_CANCELED,e,t),this.name="CanceledError"}ke.inherits(Xh,Pt,{__CANCEL__:!0});function CW(i,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?i(t):e(new Pt("Request failed with status code "+t.status,[Pt.ERR_BAD_REQUEST,Pt.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function vae(i){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(i);return e&&e[1]||""}function wae(i,e){i=i||10;const t=new Array(i),n=new Array(i);let r=0,s=0,o;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),d=n[s];o||(o=c),t[r]=l,n[r]=c;let f=s,m=0;for(;f!==r;)m+=t[f++],f=f%i;if(r=(r+1)%i,r===s&&(s=(s+1)%i),c-o<e)return;const p=d&&c-d;return p?Math.round(m*1e3/p):void 0}}function xae(i,e){let t=0,n=1e3/e,r,s;const o=(c,d=Date.now())=>
vendor: 4,596 bytes, line 13
13{t=d,r=null,s&&(clearTimeout(s),s=null),i(...c)};return[(...c)=>{const d=Date.now(),f=d-t;f>=n?o(c,d):(r=c,s||(s=setTimeout(()=>{s=null,o(r)},n-f)))},()=>r&&o(r)]}const hw=(i,e,t=3)=>{let n=0;const r=wae(50,250);return xae(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-n,c=r(l),d=o<=a;n=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&d?(a-o)/c:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};i(f)},t)},OF=(i,e)=>{const t=i!=null;return[n=>e[0]({lengthComputable:t,total:i,loaded:n}),e[1]]},NF=i=>(...e)=>ke.asap(()=>i(...e)),_ae=pr.hasStandardBrowserEnv?((i,e)=>t=>(t=new URL(t,pr.origin),i.protocol===t.protocol&&i.host===t.host&&(e||i.port===t.port)))(new URL(pr.origin),pr.navigator&&/(msie|trident)/i.test(pr.navigator.userAgent)):()=>!0,Cae=pr.hasStandardBrowserEnv?{write(i,e,t,n,r,s,o){if(typeof document>"u")return;const a=[`${i}=${encodeURIComponent(e)}`];ke.isNumber(t)&&a.push(`expires=${new Date(t).toUTCString()}`),ke.isString(n)&&a.push(`path=${n}`),ke.isString(r)&&a.push(`domain=${r}`),s===!0&&a.push("secure"),ke.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(i){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+i+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(i){this.write(i,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Dae(i){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i)}function Eae(i,e){return e?i.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):i}function DW(i,e,t){let n=!Dae(e);return i&&(n||t==!1)?Eae(i,e):e}const BF=i=>i instanceof ss?{...i}:i;function rd(i,e){e=e||{};const t={};function n(c,d,f,m){return ke.isPlainObject(c)&&ke.isPlainObject(d)?ke.merge.call({caseless:m},c,d):ke.isPlainObject(d)?ke.merge({},d):ke.isArray(d)?d.slice():d}function r(c,d,f,m){if(ke.isUndefined(d)){if(!ke.isUndefined(c))return n(void 0,c,f,m)}else return n(c,d,f,m)}function s(c,d){if(!ke.isUndefined(d))return n(void 0,d)}function o(c,d){if(ke.isUndefined(d)){if(!ke.isUndefined(c))return n(void 0,c)}else return n(void 0,d)}function a(c,d,f){if(f in e)return n(c,d);if(f in i)return n(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,d,f)=>r(BF(c),BF(d),f,!0)};return ke.forEach(Object.keys({...i,...e}),function(d){const f=l[d]||r,m=f(i[d],e[d],d);ke.isUndefined(m)&&f!==a||(t[d]=m)}),t}const EW=i=>{const e=rd({},i);let{data:t,withXSRFToken:n,xsrfHeaderName:r,xsrfCookieName:s,headers:o,auth:a}=e;if(e.headers=o=ss.from(o),e.url=vW(DW(e.baseURL,e.url,e.allowAbsoluteUrls),i.params,i.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),ke.isFormData(t)){if(pr.hasStandardBrowserEnv||pr.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(ke.isFunction(t.getHeaders)){const l=t.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([d,f])=>{c.includes(d.toLowerCase())&&o.set(d,f)})}}if(pr.hasStandardBrowserEnv&&(n&&ke.isFunction(n)&&(n=n(e)),n||n!==!1&&_ae(e.url))){const l=r&&s&&Cae.read(s);l&&o.set(r,l)}return e},Tae=typeof XMLHttpRequest<"u",Aae=Tae&&function(i){return new Promise(function(t,n){const r=EW(i);let s=r.data;const o=ss.from(r.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=r,d,f,m,p,g;function y(){p&&p(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function x(){if(!v)return;const D=ss.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:D,config:i,request:v};CW(function(A){t(A),y()},function(A){n(A),y()},T),v=null}"onloadend"in v?v.onloadend=x:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(x)},v.onabort=function(){v&&(n(new Pt("Request aborted",Pt.ECONNABORTED,i,v)),v=null)},v.onerror=function(E){const T=E&&E.message?E.message:"Network Error",S=new Pt(T,Pt.ERR_NETWORK,i,v);
vendor: 6,118 bytes, lines 13-15
13S.event=E||null,n(S),v=null},v.ontimeout=function(){let E=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||wW;r.timeoutErrorMessage&&(E=r.timeoutErrorMessage),n(new Pt(E,T.clarifyTimeoutError?Pt.ETIMEDOUT:Pt.ECONNABORTED,i,v)),v=null},s===void 0&&o.setContentType(null),"setRequestHeader"in v&&ke.forEach(o.toJSON(),function(E,T){v.setRequestHeader(T,E)}),ke.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),a&&a!=="json"&&(v.responseType=r.responseType),c&&([m,g]=hw(c,!0),v.addEventListener("progress",m)),l&&v.upload&&([f,p]=hw(l),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",p)),(r.cancelToken||r.signal)&&(d=D=>{v&&(n(!D||D.type?new Xh(null,i,v):D),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const C=vae(r.url);if(C&&pr.protocols.indexOf(C)===-1){n(new Pt("Unsupported protocol "+C+":",Pt.ERR_BAD_REQUEST,i));return}v.send(s||null)})},kae=(i,e)=>{const{length:t}=i=i?i.filter(Boolean):[];if(e||t){let n=new AbortController,r;const s=function(c){if(!r){r=!0,a();const d=c instanceof Error?c:this.reason;n.abort(d instanceof Pt?d:new Xh(d instanceof Error?d.message:d))}};let o=e&&setTimeout(()=>{o=null,s(new Pt(`timeout ${e} of ms exceeded`,Pt.ETIMEDOUT))},e);const a=()=>{i&&(o&&clearTimeout(o),o=null,i.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),i=null)};i.forEach(c=>c.addEventListener("abort",s));const{signal:l}=n;return l.unsubscribe=()=>ke.asap(a),l}},Sae=function*(i,e){let t=i.byteLength;if(t<e){yield i;return}let n=0,r;for(;n<t;)r=n+e,yield i.slice(n,r),n=r},Pae=async function*(i,e){for await(const t of Iae(i))yield*Sae(t,e)},Iae=async function*(i){if(i[Symbol.asyncIterator]){yield*i;return}const e=i.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},MF=(i,e,t,n)=>{const r=Pae(i,e);let s=0,o,a=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:d}=await r.next();if(c){a(),l.close();return}let f=d.byteLength;if(t){let m=s+=f;t(m)}l.enqueue(new Uint8Array(d))}catch(c){throw a(c),c}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},LF=64*1024,{isFunction:ny}=ke,Rae=(({Request:i,Response:e})=>({Request:i,Response:e}))(ke.global),{ReadableStream:UF,TextEncoder:VF}=ke.global,jF=(i,...e)=>{try{return!!i(...e)}catch{return!1}},Fae=i=>{i=ke.merge.call({skipUndefined:!0},Rae,i);const{fetch:e,Request:t,Response:n}=i,r=e?ny(e):typeof fetch=="function",s=ny(t),o=ny(n);if(!r)return!1;const a=r&&ny(UF),l=r&&(typeof VF=="function"?(g=>y=>g.encode(y))(new VF):async g=>new Uint8Array(await new t(g).arrayBuffer())),c=s&&a&&jF(()=>{let g=!1;const y=new t(pr.origin,{body:new UF,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!y}),d=o&&a&&jF(()=>ke.isReadableStream(new n("").body)),f={stream:d&&(g=>g.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!f[g]&&(f[g]=(y,v)=>{let x=y&&y[g];if(x)return x.call(y);throw new Pt(`Response type '${g}' is not supported`,Pt.ERR_NOT_SUPPORT,v)})});const m=async g=>{if(g==null)return 0;if(ke.isBlob(g))return g.size;if(ke.isSpecCompliantForm(g))return(await new t(pr.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(ke.isArrayBufferView(g)||ke.isArrayBuffer(g))return g.byteLength;if(ke.isURLSearchParams(g)&&(g=g+""),ke.isString(g))return(await l(g)).byteLength},p=async(g,y)=>{const v=ke.toFiniteNumber(g.getContentLength());return v??m(y)};return async g=>{let{url:y,method:v,data:x,signal:C,cancelToken:D,timeout:E,onDownloadProgress:T,onUploadProgress:S,responseType:A,headers:I,withCredentials:R="same-origin",fetchOptions:O}=EW(g),j=e||fetch;A=A?(A+"").toLowerCase():"text";let B=kae([C,D&&D.toAbortSignal()],E),U=null;const F=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let H;try{if(S&&c&&v!=="get"&&v!=="head"&&(H=await p(I,x))!==0){let V=new t(y,{method:"POST",body:x,duplex:"half"}),q;if(ke.isFormData(x)&&(q=V.headers.get("content-type"))&&I.setContentType(q),V.body){const[$,J]=OF(H,hw(NF(S)));x=MF(V.body,LF,$,J)}}ke.isString(R)||(R=R?"include":"omit");const L=s&&"credentials"in t.prototype,W={...O,signal:B,method:v.toUpperCase(),headers:I.normalize().toJSON(),body:x,duplex:"half",credentials:L?R:void 0};U=s&&new t(y,W);let G=await(s?j(U,O):j(y,W));const Y=d&&(A==="stream"||A==="response");if(d&&(T||Y&&F)){const V={};["status","statusText","headers"].forEach(ce=>{V[ce]=G[ce]});const q=ke.toFiniteNumber(G.headers.get("content-length")),[$,J]=T&&OF(q,hw(NF(T),!0))||[];G=new n(MF(G.body,LF,$,()=>{J&&J(),F&&F()}),V)}A=A||"text";let ie=await f[ke.findKey(f,A)||"text"](G,g);return!Y&&F&&F(),await new Promise((V,q)=>{CW(V,q,{data:ie,headers:ss.from(G.headers),status:G.status,statusText:G.statusText,config:g,request:U})})}catch(L){throw F&&F(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new Pt("Network Error",Pt.ERR_NETWORK,g,U),{cause:L.cause||L}):Pt.from(L,L&&L.code,g,U)}}},Oae=new Map,TW=i=>{let e=i&&i.env||{};const{fetch:t,Request:n,Response:r}=e,s=[n,r,t];let o=s.length,a=o,l,c,d=Oae;for(;a--;)l=s[a],c=d.get(l),c===void 0&&d.set(l,c=a?new Map:Fae(e)),d=c;return c};TW();const w5={http:Qoe,xhr:Aae,fetch:{get:TW}};ke.forEach(w5,(i,e)=>{if(i){try{Object.defineProperty(i,"name",{value:e})}catch{}Object.defineProperty(i,"adapterName",{value:e})}});const zF=i=>`- ${i}`,Nae=i=>ke.isFunction(i)||i===null||i===!1;function Bae(i,e){i=ke.isArray(i)?i:[i];const{length:t}=i;let n,r;const s={};for(let o=0;o<t;o++){n=i[o];let a;if(r=n,!Nae(n)&&(r=w5[(a=String(n)).toLowerCase()],r===void 0))throw new Pt(`Unknown adapter '${a}'`);if(r&&(ke.isFunction(r)||(r=r.get(e))))break;s[a||"#"+o]=r}if(!r){const o=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since :
14`+o.map(zF).join(`
15`):" "+zF(o[0]):"as no adapter specified";throw new Pt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r}
vendor: 4,735 bytes, lines 15-16
15const AW={getAdapter:Bae,adapters:w5};function FD(i){if(i.cancelToken&&i.cancelToken.throwIfRequested(),i.signal&&i.signal.aborted)throw new Xh(null,i)}function WF(i){return FD(i),i.headers=ss.from(i.headers),i.data=RD.call(i,i.transformRequest),["post","put","patch"].indexOf(i.method)!==-1&&i.headers.setContentType("application/x-www-form-urlencoded",!1),AW.getAdapter(i.adapter||d0.adapter,i)(i).then(function(n){return FD(i),n.data=RD.call(i,i.transformResponse,n),n.headers=ss.from(n.headers),n},function(n){return _W(n)||(FD(i),n&&n.response&&(n.response.data=RD.call(i,i.transformResponse,n.response),n.response.headers=ss.from(n.response.headers))),Promise.reject(n)})}const kW="1.13.2",qx={};["object","boolean","number","function","string","symbol"].forEach((i,e)=>{qx[i]=function(n){return typeof n===i||"a"+(e<1?"n ":" ")+i}});const HF={};qx.transitional=function(e,t,n){function r(s,o){return"[Axios v"+kW+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,a)=>{if(e===!1)throw new Pt(r(o," has been removed"+(t?" in "+t:"")),Pt.ERR_DEPRECATED);return t&&!HF[o]&&(HF[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,o,a):!0}};qx.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Mae(i,e,t){if(typeof i!="object")throw new Pt("options must be an object",Pt.ERR_BAD_OPTION_VALUE);const n=Object.keys(i);let r=n.length;for(;r-- >0;){const s=n[r],o=e[s];if(o){const a=i[s],l=a===void 0||o(a,s,i);if(l!==!0)throw new Pt("option "+s+" must be "+l,Pt.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Pt("Unknown option "+s,Pt.ERR_BAD_OPTION)}}const t1={assertOptions:Mae,validators:qx},ea=t1.validators;let Xu=class{constructor(e){this.defaults=e||{},this.interceptors={request:new RF,response:new RF}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
16`+s):n.stack=s}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=rd(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;n!==void 0&&t1.assertOptions(n,{silentJSONParsing:ea.transitional(ea.boolean),forcedJSONParsing:ea.transitional(ea.boolean),clarifyTimeoutError:ea.transitional(ea.boolean)},!1),r!=null&&(ke.isFunction(r)?t.paramsSerializer={serialize:r}:t1.assertOptions(r,{encode:ea.function,serialize:ea.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),t1.assertOptions(t,{baseUrl:ea.spelling("baseURL"),withXsrfToken:ea.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&ke.merge(s.common,s[t.method]);s&&ke.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),t.headers=ss.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(t)===!1||(l=l&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let d,f=0,m;if(!l){const g=[WF.bind(this),void 0];for(g.unshift(...a),g.push(...c),m=g.length,d=Promise.resolve(t);f<m;)d=d.then(g[f++],g[f++]);return d}m=a.length;let p=t;for(;f<m;){const g=a[f++],y=a[f++];try{p=g(p)}catch(v){y.call(this,v);break}}try{d=WF.call(this,p)}catch(g){return Promise.reject(g)}for(f=0,m=c.length;f<m;)d=d.then(c[f++],c[f++]);return d}getUri(e){e=rd(this.defaults,e);const t=DW(e.baseURL,e.url,e.allowAbsoluteUrls);return vW(t,e.params,e.paramsSerializer)}};ke.forEach(["delete","get","head","options"],function(e){Xu.prototype[e]=function(t,n){return this.request(rd(n||{},{method:e,url:t,data:(n||{}).data}))}});ke.forEach(["post","put","patch"],function(e){function t(n){return function(s,o,a){return this.request(rd(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Xu.prototype[e]=t(),Xu.prototype[e+"Form"]=t(!0)});let Lae=class SW{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(s){t=s});const n=this;this.promise.then(r=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](r);n._listeners=null}),this.promise.then=r=>{let s;const o=new Promise(a=>{n.subscribe(a),s=a}).then(r);return o.cancel=function(){n.unsubscribe(s)},o},e(function(s,o,a){n.reason||(n.reason=new Xh(s,o,a),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
16subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=n=>{e.abort(n)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new SW(function(r){e=r}),cancel:e}}};function Uae(i){return function(t){return i.apply(null,t)}}function Vae(i){return ke.isObject(i)&&i.isAxiosError===!0}const bk={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(bk).forEach(([i,e])=>{bk[e]=i});function PW(i){const e=new Xu(i),t=aW(Xu.prototype.request,e);return ke.extend(t,Xu.prototype,e,{allOwnKeys:!0}),ke.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return PW(rd(i,r))},t}const bi=PW(d0);bi.Axios=Xu;bi.CanceledError=Xh;bi.CancelToken=Lae;bi.isCancel=_W;bi.VERSION=kW;bi.toFormData=Hx;bi.AxiosError=Pt;bi.Cancel=bi.CanceledError;bi.all=function(e){return Promise.all(e)};bi.spread=Uae;bi.isAxiosError=Vae;bi.mergeConfig=rd;bi.AxiosHeaders=ss;bi.formToJSON=i=>xW(ke.isHTMLForm(i)?new FormData(i):i);bi.getAdapter=AW.getAdapter;bi.HttpStatusCode=bk;bi.default=bi;const{Axios:GLe,AxiosError:YLe,CanceledError:KLe,isCancel:XLe,CancelToken:QLe,VERSION:ZLe,all:JLe,Cancel:e9e,isAxiosError:t9e,spread:n9e,toFormData:i9e,AxiosHeaders:r9e,HttpStatusCode:s9e,formToJSON:o9e,getAdapter:a9e,mergeConfig:l9e}=bi,jae={VITE_API_BASE_URL:"https://api.bycabs.com/admin"},{VITE_API_BASE_URL:zae}=jae,Ne=async i=>{const e=oW.dispatch;let t="Something went wrong.";const{method:n,url:r,data:s,params:o,headers:a,formData:l,showLoading:c=!1}=i;try{c&&e(Kz());const d={method:n,url:`${zae}${r}`,data:s,params:o,headers:{"Content-Type":"application/json",...a}};l&&(d.headers={});const f=await bi(d);return t=f?.data?.msg,f.data}catch(d){return t=d?.response?.data?.msg||d?.message,d.response?.data||d.message}finally{c&&e($se(1e3,t))}};async function Wae(i){try{return await Ne({url:"/admin-user/logout",method:"POST",data:i,showLoading:!0}),!0}catch{return!1}}const x5=()=>{const{getStateValue:i,clearAllState:e}=Yh(),t=Mt();return{isAuthenticated:()=>!!i("token"),logout:async()=>{try{const s=i("mxuser")?.MXID;await Wae({MXID:s,token:"sdf"})}catch(s){console.error(s)}finally{e(),t("/",{replace:!0})}}}},Hae=["dark","moderate","light"],qae=["normal","compact"],$ae={VITE_APP_BASE_PATH:""},{VITE_APP_BASE_PATH:Gae}=$ae,Yae=()=>{const{getStateValue:i,updateState:e}=Yh(),t=wr(),{logout:n}=x5(),[r,s]=M.useState([]),o=i("thememode"),a=i("mxuser"),l=i("themetype"),c=jl(),d=$c(g=>g.coreMenuToggleReducer.isOpen),f=g=>{g?.preventDefault(),c(Zse())};M.useEffect(()=>{c(Qse())},[t.pathname,c]);const m=g=>{g?.preventDefault(),c(toe())},p=(g,y)=>{e("thememode",y),e("themetype",g)};return M.useEffect(()=>{const g=i("mxcoremenu")||[];s(g)},[]),w.jsxs("div",{className:"header",children:[w.jsx(In,{className:"fa-th fa",to:"#",onClick:f}),w.jsx("label",{children:a?.MXNAME??"ByCabs Super Admin"}),w.jsx("span",{className:"mxcon _live"}),w.jsx("label",{className:"profile-pic",children:w.jsx("img",{alt:"Profile",src:`${Gae}/bycabs-logo.png`})}),w.jsx("ul",{className:"thememode",children:Hae?.map((g,y)=>w.jsx("li",{className:`${g} ${g==o?"active":""}`,title:g,onClick:v=>{v?.preventDefault(),p(l,g)}},y))}),w.jsxs("div",{className:"logo-wrap active",children:[w.jsxs(In,{to:"#",onClick:m,className:"hamburger",children:[w.jsx("span",{}),w.jsx("span",{}),w.jsx("span",{})]}),w.jsx(In,{className:"logo",to:"/dashboard-list/",title:"List Dashboard"})]}),w.jsxs("div",{className:`core-nav ${d?"active":""}`,children:[w.jsx(In,{className:"del",to:"#",onClick:f}),w.jsxs("ul",{children:[w.jsx("li",{children:w.jsx(In,{className:"fa-lock",to:"#",onClick:g=>{g?.preventDefault(),n()},children:"Logout"})}),r?.map((g,y)=>w.jsx("li",{children:w.jsx(In,{className:g?.class,to:`/${g?.dUri}`,title:g?.menuTitle,children:g?.menuTitle})},`${g?.dUri}-${y}`)),w.jsx("li",{className:"themetype",children:qae?.map((g,y)=>w.jsx(In,{className:`${g} ${g==l?"active":""}`,onClick:v=>{v?.preventDefault(),p(g,o)},to:"#",title:g,children:g},y))})]})]})]})};function _t(){const i=wr();let e=i.search,t=Object.fromEntries(new URLSearchParams(e));const n=`${window.location.protocol}//${window.location.host}${i.pathname}${i.search}`,r=new URL(n),s={},o=n.split("?");s.url=n,s.queryParam=o[1]||null,s.modBaseUrl=o[0]||null;const a=s.modBaseUrl.split("/");s.baseAdminPath=a[a.length-2];const l=s.modBaseUrl.lastIndexOf("-");s.modStartUrl=s.modBaseUrl.slice(0,l);const c=s.modBaseUrl.slice(l+1).split("?")[0].replace("/",""),d=s.modStartUrl.slice(s.modStartUrl.lastIndexOf("/")+1),f=Kae(c)+" "+d.replaceAll("-"," "),m=r.search,p={...t,status:c==="trash"?0:1};return{origin,modeName:d,modeType:c,modeTitle:f,queryParam:m,params:p}}function Kae(i){return i.charAt(0).toUpperCase()+i.slice(1)}function Xae(){const[i,e]=M.useState([]),[t,n]=M.useState({}),{modeName:r}=_t(),s=wr(),{getStateValue:o}=Yh(),a=jl(),l=M.useRef(s.pathname);M.useEffect(()=>{l.current!==s.pathname&&a(hk())},[s.pathname]);const c=$c(g=>g.searchBarToggleReducer.isOpen);M.useEffect(()=>{const g=o("mxaccess")||{};n(g)},[]),M.useEffect(()=>{d()},[]),M.useEffect(()=>{m()},[s?.pathname]);const d=async()=>{try{const g=await Ne({url:"/admin-menu/sidebar-menu",method:"get"});g?.status==!0&&(e(g?.data),m())}catch(g){console.error("Error fetching menu list:",g)}},f=g=>
16g?.childs?.some(y=>t?.[y?.seoUri]&&t?.[y?.seoUri]?.length),m=()=>{e(g=>g?.length?g.map(y=>{const v=f(y);let x=!1;y?.seoUri===r&&(x=!0);const C=y.childs?.map(D=>{const E=D?.seoUri===r;return E&&(x=!0),{...D,masterNav:E}});return{...y,hasForceAccess:v,masterNav:x,childs:C}}):g)},p=g=>{const y=i.map(v=>v===g?{...v,masterNav:!v.masterNav}:v);e(y)};return w.jsx("div",{className:`wrap-left ${c?"active":""}`,children:w.jsx("ul",{className:"main-nav",children:i.map(g=>w.jsx(Ee.Fragment,{children:g?.hideMenu!==1&&t?.hasOwnProperty(g?.seoUri)||g?.hasForceAccess?w.jsxs("li",{className:g?.masterNav?"active":"",children:[g.childs.length===0&&w.jsxs(w.Fragment,{children:[t.hasOwnProperty(g.seoUri)&&t[g.seoUri].includes("add")&&(g.forceNav==null||g.forceNav==="")?w.jsx(In,{to:`/${g.seoUri}-add${g?.params?`?${g.params}`:""}`,onClick:()=>{m()},className:g.childs.length?"down-arrow active":"add"}):null,w.jsx(In,{to:`/${g.seoUri}-${g.forceNav?g.forceNav:"list"}${g?.params?`?${g.params}`:""}`,onClick:()=>{m()},children:g.menuTitle})]}),g.childs.length>0&&w.jsxs(w.Fragment,{children:[t?.hasOwnProperty(g?.seoUri)&&t[g?.seoUri]?.includes("view")||g?.hasForceAccess?w.jsx("a",{href:"#",className:g.childs.length?"down-arrow active":"add",onClick:y=>{y?.preventDefault(),p(g)}}):null,t?.hasOwnProperty(g?.seoUri)&&t[g?.seoUri]?.includes("view")||g?.hasForceAccess?w.jsx(In,{to:`/${g?.seoUri}-list`,children:g.menuTitle}):null,g.childs.length>0&&w.jsx("ul",{style:{display:g?.masterNav?"block":"none"},children:g.childs.map(y=>w.jsx("li",{className:y.masterNav?"active":"",children:y?.hideMenu!==1&&t?.hasOwnProperty(y?.seoUri)?w.jsxs(w.Fragment,{children:[t?.hasOwnProperty(y?.seoUri)&&t?.[y?.seoUri]?.includes("add")&&(y.forceNav==null||y.forceNav==="")?w.jsx(In,{to:`/${y.seoUri}-add${y?.params?`?${y.params}`:""}`,className:"add",onClick:()=>{m()},title:`Add New ${y.menuTitle}`}):null,t.hasOwnProperty(y.seoUri)&&t[y.seoUri].includes("view")?w.jsx(In,{to:`/${y.seoUri}-${y.forceNav?y.forceNav:"list/"}${y?.params?`?${y.params}`:""}`,onClick:()=>{m()},className:r===y.seoUri?"router-link-active":"",children:y.menuTitle}):null]}):null},y.adminMenuID))})]})]}):null},g.adminMenuID))})})}const _5=M.createContext({});function C5(i){const e=M.useRef(null);return e.current===null&&(e.current=i()),e.current}const Qae=typeof window<"u",IW=Qae?M.useLayoutEffect:M.useEffect,$x=M.createContext(null);function D5(i,e){i.indexOf(e)===-1&&i.push(e)}function mw(i,e){const t=i.indexOf(e);t>-1&&i.splice(t,1)}const Ea=(i,e,t)=>t>e?e:t<i?i:t;let E5=()=>{};const Sl={},RW=i=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(i);function FW(i){return typeof i=="object"&&i!==null}const OW=i=>/^0[^.\s]+$/u.test(i);function NW(i){let e;return()=>(e===void 0&&(e=i()),e)}const ao=i=>i,Zae=(i,e)=>t=>e(i(t)),f0=(...i)=>i.reduce(Zae),vg=(i,e,t)=>{const n=e-i;return n===0?1:(t-i)/n};class T5{constructor(){this.subscriptions=[]}add(e){return D5(this.subscriptions,e),()=>mw(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let s=0;s<r;s++){const o=this.subscriptions[s];o&&o(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Rs=i=>i*1e3,so=i=>i/1e3;function BW(i,e){return e?i*(1e3/e):0}const MW=(i,e,t)=>(((1-3*t+3*e)*i+(3*t-6*e))*i+3*e)*i,Jae=1e-7,ele=12;function tle(i,e,t,n,r){let s,o,a=0;do o=e+(t-e)/2,s=MW(o,n,r)-i,s>0?t=o:e=o;while(Math.abs(s)>Jae&&++a<ele);return o}function h0(i,e,t,n){if(i===e&&t===n)return ao;const r=s=>tle(s,0,1,i,t);return s=>s===0||s===1?s:MW(r(s),e,n)}const LW=i=>e=>e<=.5?i(2*e)/2:(2-i(2*(1-e)))/2,UW=i=>e=>1-i(1-e),VW=h0(.33,1.53,.69,.99),A5=UW(VW),jW=LW(A5),zW=i=>(i*=2)<1?.5*A5(i):.5*(2-Math.pow(2,-10*(i-1))),k5=i=>1-Math.sin(Math.acos(i)),WW=UW(k5),HW=LW(k5),nle=h0(.42,0,1,1),ile=h0(0,0,.58,1),qW=h0(.42,0,.58,1),rle=i=>Array.isArray(i)&&typeof i[0]!="number",$W=i=>Array.isArray(i)&&typeof i[0]=="number",sle={linear:ao,easeIn:nle,easeInOut:qW,easeOut:ile,circIn:k5,circInOut:HW,circOut:WW,backIn:A5,backInOut:jW,backOut:VW,anticipate:zW},ole=i=>typeof i=="string",qF=i=>{if($W(i)){E5(i.length===4);const[e,t,n,r]=i;return h0(e,t,n,r)}else if(ole(i))return sle[i];return i},iy=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];
vendor: 4,999 bytes, line 16
16function ale(i,e){let t=new Set,n=new Set,r=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(d){o.has(d)&&(c.schedule(d),i()),d(a)}const c={schedule:(d,f=!1,m=!1)=>{const g=m&&r?t:n;return f&&o.add(d),g.has(d)||g.add(d),d},cancel:d=>{n.delete(d),o.delete(d)},process:d=>{if(a=d,r){s=!0;return}r=!0,[t,n]=[n,t],t.forEach(l),t.clear(),r=!1,s&&(s=!1,c.process(d))}};return c}const lle=40;function GW(i,e){let t=!1,n=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>t=!0,o=iy.reduce((D,E)=>(D[E]=ale(s),D),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:d,update:f,preRender:m,render:p,postRender:g}=o,y=()=>{const D=Sl.useManualTiming?r.timestamp:performance.now();t=!1,Sl.useManualTiming||(r.delta=n?1e3/60:Math.max(Math.min(D-r.timestamp,lle),1)),r.timestamp=D,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),d.process(r),f.process(r),m.process(r),p.process(r),g.process(r),r.isProcessing=!1,t&&e&&(n=!1,i(y))},v=()=>{t=!0,n=!0,r.isProcessing||i(y)};return{schedule:iy.reduce((D,E)=>{const T=o[E];return D[E]=(S,A=!1,I=!1)=>(t||v(),T.schedule(S,A,I)),D},{}),cancel:D=>{for(let E=0;E<iy.length;E++)o[iy[E]].cancel(D)},state:r,steps:o}}const{schedule:Nn,cancel:Nc,state:er,steps:OD}=GW(typeof requestAnimationFrame<"u"?requestAnimationFrame:ao,!0);let n1;function cle(){n1=void 0}const Sr={now:()=>(n1===void 0&&Sr.set(er.isProcessing||Sl.useManualTiming?er.timestamp:performance.now()),n1),set:i=>{n1=i,queueMicrotask(cle)}},YW=i=>e=>typeof e=="string"&&e.startsWith(i),KW=YW("--"),ule=YW("var(--"),S5=i=>ule(i)?dle.test(i.split("/*")[0].trim()):!1,dle=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function $F(i){return typeof i!="string"?!1:i.split("/*")[0].includes("var(--")}const Qh={test:i=>typeof i=="number",parse:parseFloat,transform:i=>i},wg={...Qh,transform:i=>Ea(0,1,i)},ry={...Qh,default:1},Gp=i=>Math.round(i*1e5)/1e5,P5=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function fle(i){return i==null}const hle=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,I5=(i,e)=>t=>!!(typeof t=="string"&&hle.test(t)&&t.startsWith(i)||e&&!fle(t)&&Object.prototype.hasOwnProperty.call(t,e)),XW=(i,e,t)=>n=>{if(typeof n!="string")return n;const[r,s,o,a]=n.match(P5);return{[i]:parseFloat(r),[e]:parseFloat(s),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},mle=i=>Ea(0,255,i),ND={...Qh,transform:i=>Math.round(mle(i))},Wu={test:I5("rgb","red"),parse:XW("red","green","blue"),transform:({red:i,green:e,blue:t,alpha:n=1})=>"rgba("+ND.transform(i)+", "+ND.transform(e)+", "+ND.transform(t)+", "+Gp(wg.transform(n))+")"};function ple(i){let e="",t="",n="",r="";return i.length>5?(e=i.substring(1,3),t=i.substring(3,5),n=i.substring(5,7),r=i.substring(7,9)):(e=i.substring(1,2),t=i.substring(2,3),n=i.substring(3,4),r=i.substring(4,5),e+=e,t+=t,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:r?parseInt(r,16)/255:1}}const yk={test:I5("#"),parse:ple,transform:Wu.transform},m0=i=>({test:e=>typeof e=="string"&&e.endsWith(i)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${i}`}),Cc=m0("deg"),ba=m0("%"),st=m0("px"),gle=m0("vh"),ble=m0("vw"),GF={...ba,parse:i=>ba.parse(i)/100,transform:i=>ba.transform(i*100)},Kf={test:I5("hsl","hue"),parse:XW("hue","saturation","lightness"),transform:({hue:i,saturation:e,lightness:t,alpha:n=1})=>"hsla("+Math.round(i)+", "+ba.transform(Gp(e))+", "+ba.transform(Gp(t))+", "+Gp(wg.transform(n))+")"},Ei={test:i=>Wu.test(i)||yk.test(i)||Kf.test(i),parse:i=>Wu.test(i)?Wu.parse(i):Kf.test(i)?Kf.parse(i):yk.parse(i),transform:i=>typeof i=="string"?i:i.hasOwnProperty("red")?Wu.transform(i):Kf.transform(i),getAnimatableNone:i=>{const e=Ei.parse(i);return e.alpha=0,Ei.transform(e)}},yle=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vle(i){return isNaN(i)&&typeof i=="string"&&(i.match(P5)?.length||0)+(i.match(yle)?.length||0)>0}const QW="number",ZW="color",wle="var",xle="var(",YF="${}",_le=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function xh(i){const e=i.toString(),t=[],n={color:[],number:[],var:[]},r=[];let s=0;const a=e.replace(_le,l=>(Ei.test(l)?(n.color.push(s),r.push(ZW),t.push(Ei.parse(l))):l.startsWith(xle)?(n.var.push(s),r.push(wle),t.push(l)):(n.number.push(s),r.push(QW),t.push(parseFloat(l))),++s,YF)).split(YF);return{values:t,split:a,indexes:n,types:r}}function Cle(i){return xh(i).values}function JW({split:i,types:e}){const t=i.length;return n=>{let r="";for(let s=0;s<t;s++)if(r+=i[s],n[s]!==void 0){const o=e[s];o===QW?r+=Gp(n[s]):o===ZW?r+=Ei.transform(n[s]):r+=n[s]}return r}}function Dle(i){return JW(xh(i))}const Ele=i=>typeof i=="number"?0:Ei.test(i)?Ei.getAnimatableNone(i):i,Tle=(i,e)=>
vendor: 21,959 bytes, line 16
16typeof i=="number"?e?.trim().endsWith("/")?i:0:Ele(i);function Ale(i){const e=xh(i);return JW(e)(e.values.map((n,r)=>Tle(n,e.split[r])))}const Fo={test:vle,parse:Cle,createTransformer:Dle,getAnimatableNone:Ale};function BD(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*(2/3-t)*6:i}function kle({hue:i,saturation:e,lightness:t,alpha:n}){i/=360,e/=100,t/=100;let r=0,s=0,o=0;if(!e)r=s=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;r=BD(l,a,i+1/3),s=BD(l,a,i),o=BD(l,a,i-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}function pw(i,e){return t=>t>0?e:i}const Xn=(i,e,t)=>i+(e-i)*t,MD=(i,e,t)=>{const n=i*i,r=t*(e*e-n)+n;return r<0?0:Math.sqrt(r)},Sle=[yk,Wu,Kf],Ple=i=>Sle.find(e=>e.test(i));function KF(i){const e=Ple(i);if(!e)return!1;let t=e.parse(i);return e===Kf&&(t=kle(t)),t}const XF=(i,e)=>{const t=KF(i),n=KF(e);if(!t||!n)return pw(i,e);const r={...t};return s=>(r.red=MD(t.red,n.red,s),r.green=MD(t.green,n.green,s),r.blue=MD(t.blue,n.blue,s),r.alpha=Xn(t.alpha,n.alpha,s),Wu.transform(r))},vk=new Set(["none","hidden"]);function Ile(i,e){return vk.has(i)?t=>t<=0?i:e:t=>t>=1?e:i}function Rle(i,e){return t=>Xn(i,e,t)}function R5(i){return typeof i=="number"?Rle:typeof i=="string"?S5(i)?pw:Ei.test(i)?XF:Nle:Array.isArray(i)?eH:typeof i=="object"?Ei.test(i)?XF:Fle:pw}function eH(i,e){const t=[...i],n=t.length,r=i.map((s,o)=>R5(s)(s,e[o]));return s=>{for(let o=0;o<n;o++)t[o]=r[o](s);return t}}function Fle(i,e){const t={...i,...e},n={};for(const r in t)i[r]!==void 0&&e[r]!==void 0&&(n[r]=R5(i[r])(i[r],e[r]));return r=>{for(const s in n)t[s]=n[s](r);return t}}function Ole(i,e){const t=[],n={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const s=e.types[r],o=i.indexes[s][n[s]],a=i.values[o]??0;t[r]=a,n[s]++}return t}const Nle=(i,e)=>{const t=Fo.createTransformer(e),n=xh(i),r=xh(e);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?vk.has(i)&&!r.values.length||vk.has(e)&&!n.values.length?Ile(i,e):f0(eH(Ole(n,r),r.values),t):pw(i,e)};function tH(i,e,t){return typeof i=="number"&&typeof e=="number"&&typeof t=="number"?Xn(i,e,t):R5(i)(i,e)}const Ble=i=>{const e=({timestamp:t})=>i(t);return{start:(t=!0)=>Nn.update(e,t),stop:()=>Nc(e),now:()=>er.isProcessing?er.timestamp:Sr.now()}},nH=(i,e,t=10)=>{let n="";const r=Math.max(Math.round(e/t),2);for(let s=0;s<r;s++)n+=Math.round(i(s/(r-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},gw=2e4;function F5(i){let e=0;const t=50;let n=i.next(e);for(;!n.done&&e<gw;)e+=t,n=i.next(e);return e>=gw?1/0:e}function Mle(i,e=100,t){const n=t({...i,keyframes:[0,e]}),r=Math.min(F5(n),gw);return{type:"keyframes",ease:s=>n.next(r*s).value/e,duration:so(r)}}const ri={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function wk(i,e){return i*Math.sqrt(1-e*e)}const Lle=12;function Ule(i,e,t){let n=t;for(let r=1;r<Lle;r++)n=n-i(n)/e(n);return n}const LD=.001;function Vle({duration:i=ri.duration,bounce:e=ri.bounce,velocity:t=ri.velocity,mass:n=ri.mass}){let r,s,o=1-e;o=Ea(ri.minDamping,ri.maxDamping,o),i=Ea(ri.minDuration,ri.maxDuration,so(i)),o<1?(r=c=>{const d=c*o,f=d*i,m=d-t,p=wk(c,o),g=Math.exp(-f);return LD-m/p*g},s=c=>{const f=c*o*i,m=f*t+t,p=Math.pow(o,2)*Math.pow(c,2)*i,g=Math.exp(-f),y=wk(Math.pow(c,2),o);return(-r(c)+LD>0?-1:1)*((m-p)*g)/y}):(r=c=>{const d=Math.exp(-c*i),f=(c-t)*i+1;return-LD+d*f},s=c=>{const d=Math.exp(-c*i),f=(t-c)*(i*i);return d*f});const a=5/i,l=Ule(r,s,a);if(i=Rs(i),isNaN(l))return{stiffness:ri.stiffness,damping:ri.damping,duration:i};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:i}}}const jle=["duration","bounce"],zle=["stiffness","damping","mass"];function QF(i,e){return e.some(t=>i[t]!==void 0)}function Wle(i){let e={velocity:ri.velocity,stiffness:ri.stiffness,damping:ri.damping,mass:ri.mass,isResolvedFromDuration:!1,...i};if(!QF(i,zle)&&QF(i,jle))if(e.velocity=0,i.visualDuration){const t=i.visualDuration,n=2*Math.PI/(t*1.2),r=n*n,s=2*Ea(.05,1,1-(i.bounce||0))*Math.sqrt(r);e={...e,mass:ri.mass,stiffness:r,damping:s}}else{const t=Vle({...i,velocity:0});e={...e,...t,mass:ri.mass},e.isResolvedFromDuration=!0}return e}function bw(i=ri.visualDuration,e=ri.bounce){const t=typeof i!="object"?{visualDuration:i,keyframes:[0,1],bounce:e}:i;let{restSpeed:n,restDelta:r}=t;const s=t.keyframes[0],o=t.keyframes[t.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:d,duration:f,velocity:m,isResolvedFromDuration:p}=Wle({...t,velocity:-so(t.velocity||0)}),g=m||0,y=c/(2*Math.sqrt(l*d)),v=o-s,x=so(Math.sqrt(l/d)),C=Math.abs(v)<5;n||(n=C?ri.restSpeed.granular:ri.restSpeed.default),r||(r=C?ri.restDelta.granular:ri.restDelta.default);let D,E,T,S,A,I;if(y<1)T=wk(x,y),S=(g+y*x*v)/T,D=O=>{const j=Math.exp(-y*x*O);return o-j*(S*Math.sin(T*O)+v*Math.cos(T*O))},A=y*x*S+v*T,I=y*x*v-S*T,E=O=>Math.exp(-y*x*O)*(A*Math.sin(T*O)+I*Math.cos(T*O));else if(y===1){D=j=>o-Math.exp(-x*j)*(v+(g+x*v)*j);const O=g+x*v;E=j=>Math.exp(-x*j)*(x*O*j-g)}else{const O=x*Math.sqrt(y*y-1);D=F=>{const H=Math.exp(-y*x*F),L=Math.min(O*F,300);return o-H*((g+y*x*v)*Math.sinh(L)+O*v*Math.cosh(L))/O};const j=(g+y*x*v)/O,B=y*x*j-v*O,U=y*x*v-j*O;E=F=>{const H=Math.exp(-y*x*F),L=Math.min(O*F,300);return H*(B*Math.sinh(L)+U*Math.cosh(L))}}const R={calculatedDuration:p&&f||null,velocity:O=>Rs(E(O)),next:O=>{if(!p&&y<1){const B=Math.exp(-y*x*O),U=Math.sin(T*O),F=Math.cos(T*O),H=o-B*(S*U+v*F),L=Rs(B*(A*U+I*F));return a.done=Math.abs(L)<=n&&Math.abs(o-H)<=r,a.value=a.done?o:H,a}const j=D(O);if(p)a.done=O>=f;else{const B=Rs(E(O));a.done=Math.abs(B)<=n&&Math.abs(o-j)<=r}return a.value=a.done?o:j,a},toString:()=>{const O=Math.min(F5(R),gw),j=nH(B=>R.next(O*B).value,O,30);return O+"ms "+j},toTransition:()=>{}};return R}bw.applyToOptions=i=>{const e=Mle(i,100,bw);return i.ease=e.ease,i.duration=Rs(e.duration),i.type="keyframes",i};const Hle=5;function iH(i,e,t){const n=Math.max(e-Hle,0);return BW(t-i(n),e-n)}function xk({keyframes:i,velocity:e=0,power:t=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const f=i[0],m={done:!1,value:f},p=I=>a!==void 0&&I<a||l!==void 0&&I>l,g=I=>a===void 0?l:l===void 0||Math.abs(a-I)<Math.abs(l-I)?a:l;let y=t*e;const v=f+y,x=o===void 0?v:o(v);x!==v&&(y=x-f);const C=I=>-y*Math.exp(-I/n),D=I=>x+C(I),E=I=>{const R=C(I),O=D(I);m.done=Math.abs(R)<=c,m.value=m.done?x:O};let T,S;const A=I=>{p(m.value)&&(T=I,S=bw({keyframes:[m.value,g(m.value)],velocity:iH(D,I,m.value),damping:r,stiffness:s,restDelta:c,restSpeed:d}))};return A(0),{calculatedDuration:null,next:I=>{let R=!1;return!S&&T===void 0&&(R=!0,E(I),A(I)),T!==void 0&&I>=T?S.next(I-T):(!R&&E(I),m)}}}function qle(i,e,t){const n=[],r=t||Sl.mix||tH,s=i.length-1;for(let o=0;o<s;o++){let a=r(i[o],i[o+1]);if(e){const l=Array.isArray(e)?e[o]||ao:e;a=f0(l,a)}n.push(a)}return n}function $le(i,e,{clamp:t=!0,ease:n,mixer:r}={}){const s=i.length;if(E5(s===e.length),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const o=i[0]===i[1];i[0]>i[s-1]&&(i=[...i].reverse(),e=[...e].reverse());const a=qle(e,n,r),l=a.length,c=d=>{if(o&&d<i[0])return e[0];let f=0;if(l>1)for(;f<i.length-2&&!(d<i[f+1]);f++);const m=vg(i[f],i[f+1],d);return a[f](m)};return t?d=>c(Ea(i[0],i[s-1],d)):c}function Gle(i,e){const t=i[i.length-1];for(let n=1;n<=e;n++){const r=vg(0,e,n);i.push(Xn(t,1,r))}}function Yle(i){const e=[0];return Gle(e,i.length-1),e}function Kle(i,e){return i.map(t=>t*e)}function Xle(i,e){return i.map(()=>e||qW).splice(0,i.length-1)}function Yp({duration:i=300,keyframes:e,times:t,ease:n="easeInOut"}){const r=rle(n)?n.map(qF):qF(n),s={done:!1,value:e[0]},o=Kle(t&&t.length===e.length?t:Yle(e),i),a=$le(o,e,{ease:Array.isArray(r)?r:Xle(e,r)});return{calculatedDuration:i,next:l=>(s.value=a(l),s.done=l>=i,s)}}const Qle=i=>i!==null;function O5(i,{repeat:e,repeatType:t="loop"},n,r=1){const s=i.filter(Qle),a=r<0||e&&t!=="loop"&&e%2===1?0:s.length-1;return!a||n===void 0?s[a]:n}const Zle={decay:xk,inertia:xk,tween:Yp,keyframes:Yp,spring:bw};function rH(i){typeof i.type=="string"&&(i.type=Zle[i.type])}class N5{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Jle=i=>i/100;class B5 extends N5{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==Sr.now()&&this.tick(Sr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;rH(e);const{type:t=Yp,repeat:n=0,repeatDelay:r=0,repeatType:s,velocity:o=0}=e;let{keyframes:a}=e;const l=t||Yp;l!==Yp&&typeof a[0]!="number"&&(this.mixKeyframes=f0(Jle,tH(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=F5(c));const{calculatedDuration:d}=c;this.calculatedDuration=d,this.resolvedDuration=d+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);const{delay:c=0,keyframes:d,repeat:f,repeatType:m,repeatDelay:p,type:g,onUpdate:y,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const x=this.currentTime-c*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?x<0:x>r;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let D=this.currentTime,E=n;if(f){const I=Math.min(this.currentTime,r)/a;let R=Math.floor(I),O=I%1;!O&&I>=1&&(O=1),O===1&&R--,R=Math.min(R,f+1),R%2&&(m==="reverse"?(O=1-O,p&&(O-=p/a)):m==="mirror"&&(E=o)),D=Ea(0,1,O)*a}const T=C?{done:!1,value:d[0]}:E.next(D);s&&!C&&(T.value=s(T.value));let{done:S}=T;!C&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return A&&g!==xk&&(T.value=O5(d,this.options,v,this.speed)),y&&y(T.value),A&&this.finish(),T}then(e,t){return this.finished.then(e,t)}get duration(){return so(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+so(e)}get time(){return so(this.currentTime)}set time(e){e=Rs(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const t=this.generator.next(e).value;return iH(n=>this.generator.next(n).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Sr.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=so(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Ble,startTime:t}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Sr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function ece(i){for(let e=1;e<i.length;e++)i[e]??(i[e]=i[e-1])}const Hu=i=>i*180/Math.PI,_k=i=>{const e=Hu(Math.atan2(i[1],i[0]));return Ck(e)},tce={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:i=>(Math.abs(i[0])+Math.abs(i[3]))/2,rotate:_k,rotateZ:_k,skewX:i=>Hu(Math.atan(i[1])),skewY:i=>Hu(Math.atan(i[2])),skew:i=>(Math.abs(i[1])+Math.abs(i[2]))/2},Ck=i=>(i=i%360,i<0&&(i+=360),i),ZF=_k,JF=i=>Math.sqrt(i[0]*i[0]+i[1]*i[1]),eO=i=>Math.sqrt(i[4]*i[4]+i[5]*i[5]),nce={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:JF,scaleY:eO,scale:i=>(JF(i)+eO(i))/2,rotateX:i=>Ck(Hu(Math.atan2(i[6],i[5]))),rotateY:i=>Ck(Hu(Math.atan2(-i[2],i[0]))),rotateZ:ZF,rotate:ZF,skewX:i=>Hu(Math.atan(i[4])),skewY:i=>Hu(Math.atan(i[1])),skew:i=>(Math.abs(i[1])+Math.abs(i[4]))/2};function Dk(i){return i.includes("scale")?1:0}function Ek(i,e){if(!i||i==="none")return Dk(e);const t=i.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,r;if(t)n=nce,r=t;else{const a=i.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=tce,r=a}if(!r)return Dk(e);const s=n[e],o=r[1].split(",").map(rce);return typeof s=="function"?s(o):o[s]}const ice=(i,e)=>{const{transform:t="none"}=getComputedStyle(i);return Ek(t,e)};function rce(i){return parseFloat(i.trim())}const Zh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Jh=new Set(Zh),tO=i=>i===Qh||i===st,sce=new Set(["x","y","z"]),oce=Zh.filter(i=>!sce.has(i));function ace(i){const e=[];return oce.forEach(t=>{const n=i.getValue(t);n!==void 0&&(e.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),e}const kc={width:({x:i},{paddingLeft:e="0",paddingRight:t="0"})=>i.max-i.min-parseFloat(e)-parseFloat(t),height:({y:i},{paddingTop:e="0",paddingBottom:t="0"})=>i.max-i.min-parseFloat(e)-parseFloat(t),top:(i,{top:e})=>parseFloat(e),left:(i,{left:e})=>parseFloat(e),bottom:({y:i},{top:e})=>parseFloat(e)+(i.max-i.min),right:({x:i},{left:e})=>parseFloat(e)+(i.max-i.min),x:(i,{transform:e})=>Ek(e,"x"),y:(i,{transform:e})=>Ek(e,"y")};kc.translateX=kc.x;kc.translateY=kc.y;const Qu=new Set;let Tk=!1,Ak=!1,kk=!1;function sH(){if(Ak){const i=Array.from(Qu).filter(n=>n.needsMeasurement),e=new Set(i.map(n=>n.element)),t=new Map;e.forEach(n=>{const r=ace(n);r.length&&(t.set(n,r),n.render())}),i.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();const r=t.get(n);r&&r.forEach(([s,o])=>{n.getValue(s)?.set(o)})}),i.forEach(n=>n.measureEndState()),i.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Ak=!1,Tk=!1,Qu.forEach(i=>i.complete(kk)),Qu.clear()}function oH(){Qu.forEach(i=>{i.readKeyframes(),i.needsMeasurement&&(Ak=!0)})}function lce(){kk=!0,oH(),sH(),kk=!1}class M5{constructor(e,t,n,r,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Qu.add(this),Tk||(Tk=!0,Nn.read(oH),Nn.resolveKeyframes(sH))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){const s=r?.get(),o=e[e.length-1];if(s!==void 0)e[0]=s;else if(n&&t){const a=n.readValue(t,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),r&&s===void 0&&r.set(e[0])}ece(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Qu.delete(this)}cancel(){this.state==="scheduled"&&(Qu.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const cce=i=>i.startsWith("--");function aH(i,e,t){cce(e)?i.style.setProperty(e,t):i.style[e]=t}const uce={};function lH(i,e){const t=NW(i);return()=>uce[e]??t()}const dce=lH(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),cH=lH(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Bp=([i,e,t,n])=>`cubic-bezier(${i}, ${e}, ${t}, ${n})`,nO={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Bp([0,.65,.55,1]),circOut:Bp([.55,0,1,.45]),backIn:Bp([.31,.01,.66,-.59]),backOut:Bp([.33,1.53,.69,.99])};function uH(i,e){if(i)return typeof i=="function"?cH()?nH(i,e):"ease-out":$W(i)?Bp(i):Array.isArray(i)?i.map(t=>uH(t,e)||nO.easeOut):nO[i]}function fce(i,e,t,{delay:n=0,duration:r=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const d={[e]:t};l&&(d.offset=l);const f=uH(a,r);Array.isArray(f)&&(d.easing=f);const m={delay:n,duration:r,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return c&&(m.pseudoElement=c),i.animate(d,m)}function dH(i){return typeof i=="function"&&"applyToOptions"in i}function hce({type:i,...e}){return dH(i)&&cH()?i.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class fH extends N5{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=e,E5(typeof e.type!="string");const c=hce(e);this.animation=fce(t,n,r,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const d=O5(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(d),aH(t,n,d),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return so(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+so(e)}get time(){return so(Number(this.animation.currentTime)||0)}set time(e){const t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Rs(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&dce()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),ao):r(this)}}const hH={anticipate:zW,backInOut:jW,circInOut:HW};function mce(i){return i in hH}function pce(i){typeof i.ease=="string"&&mce(i.ease)&&(i.ease=hH[i.ease])}const UD=10;class gce extends fH{constructor(e){pce(e),rH(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:s,...o}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}const a=new B5({...o,autoplay:!1}),l=Math.max(UD,Sr.now()-this.startTime),c=Ea(0,UD,l-UD),d=a.sample(l).value,{name:f}=this.options;s&&f&&aH(s,f,d),t.setWithVelocity(a.sample(Math.max(0,l-c)).value,d,c),a.stop()}}const iO=(i,e)=>e==="zIndex"?!1:!!(typeof i=="number"||Array.isArray(i)||typeof i=="string"&&(Fo.test(i)||i==="0")&&!i.startsWith("url("));function bce(i){const e=i[0];if(i.length===1)return!0;for(let t=0;t<i.length;t++)if(i[t]!==e)return!0}function yce(i,e,t,n){const r=i[0];if(r===null)return!1;if(e==="display"||e==="visibility")return!0;const s=i[i.length-1],o=iO(r,e),a=iO(s,e);return!o||!a?!1:bce(i)||(t==="spring"||dH(t))&&n}function Sk(i){i.duration=0,i.type="keyframes"}const vce=new Set(["opacity","clipPath","filter","transform"]),wce=NW(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function xce(i){const{motionValue:e,name:t,repeatDelay:n,repeatType:r,damping:s,type:o}=i;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return wce()&&t&&vce.has(t)&&(t!=="transform"||!c)&&!l&&!n&&r!=="mirror"&&s!==0&&o!=="inertia"}const _ce=40;class Cce extends N5{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:
vendor: 4,223 bytes, line 16
16o="loop",keyframes:a,name:l,motionValue:c,element:d,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Sr.now();const m={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:s,repeatType:o,name:l,motionValue:c,element:d,...f},p=d?.KeyframeResolver||M5;this.keyframeResolver=new p(a,(g,y,v)=>this.onKeyframesResolved(g,y,m,!v),l,c,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:d}=n;this.resolvedAt=Sr.now(),yce(e,s,o,a)||((Sl.instantAnimations||!l)&&d?.(O5(e,n,t)),e[0]=e[e.length-1],Sk(n),n.repeat=0);const m={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>_ce?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},p=!c&&xce(m),g=m.motionValue?.owner?.current,y=p?new gce({...m,element:g}):new B5(m);y.finished.then(()=>{this.notifyFinished()}).catch(ao),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),lce()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function mH(i,e,t,n=0,r=1){const s=Array.from(i).sort((c,d)=>c.sortNodePosition(d)).indexOf(e),o=i.size,a=(o-1)*n;return typeof t=="function"?t(s,o):r===1?s*n:a-s*n}const Dce=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ece(i){const e=Dce.exec(i);if(!e)return[,];const[,t,n,r]=e;return[`--${t??n}`,r]}function pH(i,e,t=1){const[n,r]=Ece(i);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);if(s){const o=s.trim();return RW(o)?parseFloat(o):o}return S5(r)?pH(r,e,t+1):r}const Tce={type:"spring",stiffness:500,damping:25,restSpeed:10},Ace=i=>({type:"spring",stiffness:550,damping:i===0?2*Math.sqrt(550):30,restSpeed:10}),kce={type:"keyframes",duration:.8},Sce={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Pce=(i,{keyframes:e})=>e.length>2?kce:Jh.has(i)?i.startsWith("scale")?Ace(e[1]):Tce:Sce,Ice=i=>i!==null;function Rce(i,{repeat:e,repeatType:t="loop"},n){const r=i.filter(Ice),s=e&&t!=="loop"&&e%2===1?0:r.length-1;return r[s]}function gH(i,e){if(i?.inherit&&e){const{inherit:t,...n}=i;return{...e,...n}}return i}function L5(i,e){const t=i?.[e]??i?.default??i;return t!==i?gH(t,i):t}function Fce({when:i,delay:e,delayChildren:t,staggerChildren:n,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const U5=(i,e,t,n={},r,s)=>o=>{const a=L5(n,i)||{},l=a.delay||n.delay||0;let{elapsed:c=0}=n;c=c-Rs(l);const d={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:m=>{e.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:i,motionValue:e,element:s?void 0:r};Fce(a)||Object.assign(d,Pce(i,d)),d.duration&&(d.duration=Rs(d.duration)),d.repeatDelay&&(d.repeatDelay=Rs(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Sk(d),d.delay===0&&(f=!0)),(Sl.instantAnimations||Sl.skipAnimations||r?.shouldSkipAnimations)&&(f=!0,Sk(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,f&&!s&&e.get()!==void 0){const m=Rce(d.keyframes,a);if(m!==void 0){Nn.update(()=>{d.onUpdate(m),d.onComplete()});return}}return a.isSync?new B5(d):new Cce(d)};function rO(i){const e=[{},{}];
vendor: 7,943 bytes, line 16
16return i?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function V5(i,e,t,n){if(typeof e=="function"){const[r,s]=rO(n);e=e(t!==void 0?t:i.custom,r,s)}if(typeof e=="string"&&(e=i.variants&&i.variants[e]),typeof e=="function"){const[r,s]=rO(n);e=e(t!==void 0?t:i.custom,r,s)}return e}function oh(i,e,t){const n=i.getProps();return V5(n,e,t!==void 0?t:n.custom,i)}const bH=new Set(["width","height","top","left","right","bottom",...Zh]),sO=30,Oce=i=>!isNaN(parseFloat(i));class Nce{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const r=Sr.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Sr.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Oce(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new T5);const n=this.events[e].add(t);return e==="change"?()=>{n(),Nn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Sr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>sO)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,sO);return BW(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function _h(i,e){return new Nce(i,e)}const Pk=i=>Array.isArray(i);function Bce(i,e,t){i.hasValue(e)?i.getValue(e).set(t):i.addValue(e,_h(t))}function Mce(i){return Pk(i)?i[i.length-1]||0:i}function Lce(i,e){const t=oh(i,e);let{transitionEnd:n={},transition:r={},...s}=t||{};s={...s,...n};for(const o in s){const a=Mce(s[o]);Bce(i,o,a)}}const gr=i=>!!(i&&i.getVelocity);function Uce(i){return!!(gr(i)&&i.add)}function Ik(i,e){const t=i.getValue("willChange");if(Uce(t))return t.add(e);if(!t&&Sl.WillChange){const n=new Sl.WillChange("auto");i.addValue("willChange",n),n.add(e)}}function j5(i){return i.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Vce="framerAppearId",yH="data-"+j5(Vce);function vH(i){return i.props[yH]}function jce({protectedKeys:i,needsAnimating:e},t){const n=i.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,n}function wH(i,e,{delay:t=0,transitionOverride:n,type:r}={}){let{transition:s,transitionEnd:o,...a}=e;const l=i.getDefaultTransition();s=s?gH(s,l):l;const c=s?.reduceMotion;n&&(s=n);const d=[],f=r&&i.animationState&&i.animationState.getState()[r];for(const m in a){const p=i.getValue(m,i.latestValues[m]??null),g=a[m];if(g===void 0||f&&jce(f,m))continue;const y={delay:t,...L5(s||{},m)},v=p.get();if(v!==void 0&&!p.isAnimating&&!Array.isArray(g)&&g===v&&!y.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const E=vH(i);if(E){const T=window.MotionHandoffAnimation(E,m,Nn);T!==null&&(y.startTime=T,x=!0)}}Ik(i,m);const C=c??i.shouldReduceMotion;p.start(U5(m,p,g,C&&bH.has(m)?{type:!1}:y,i,x));const D=p.animation;D&&d.push(D)}if(o){const m=()=>Nn.update(()=>{o&&Lce(i,o)});d.length?Promise.all(d).then(m):m()}return d}function Rk(i,e,t={}){const n=oh(i,e,t.type==="exit"?i.presenceContext?.custom:void 0);let{transition:r=i.getDefaultTransition()||{}}=n||{};t.transitionOverride&&(r=t.transitionOverride);const s=n?()=>Promise.all(wH(i,n,t)):()=>Promise.resolve(),o=i.variantChildren&&i.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=r;return zce(i,e,l,c,d,f,t)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,c]=a==="beforeChildren"?[s,o]:[o,s];return l().then(()=>c())}else return Promise.all([s(),o(t.delay)])}function zce(i,e,t=0,n=0,r=0,s=1,o){const a=[];for(const l of i.variantChildren)l.notify("AnimationStart",e),a.push(Rk(l,e,{...o,delay:t+(typeof n=="function"?0:n)+mH(i.variantChildren,l,n,r,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Wce(i,e,t={}){i.notify("AnimationStart",e);let n;if(Array.isArray(e)){const r=e.map(s=>Rk(i,s,t));n=Promise.all(r)}else if(typeof e=="string")n=Rk(i,e,t);else{const r=typeof e=="function"?oh(i,e,t.custom):e;n=Promise.all(wH(i,r,t))}return n.then(()=>{i.notify("AnimationComplete",e)})}const Hce={test:i=>i==="auto",parse:i=>i},xH=i=>e=>e.test(i),_H=[Qh,st,ba,Cc,ble,gle,Hce],oO=i=>_H.find(xH(i));function qce(i){return typeof i=="number"?i===0:i!==null?i==="none"||i==="0"||OW(i):!0}const $ce=new Set(["brightness","contrast","saturate","opacity"]);function Gce(i){const[e,t]=i.slice(0,-1).split("(");if(e==="drop-shadow")return i;const[n]=t.match(P5)||[];if(!n)return i;const r=t.replace(n,"");let s=$ce.has(e)?1:0;return n!==t&&(s*=100),e+"("+s+r+")"}const Yce=/\b([a-z-]*)\(.*?\)/gu,Fk={...Fo,getAnimatableNone:i=>{const e=i.match(Yce);return e?e.map(Gce).join(" "):i}},Ok={...Fo,getAnimatableNone:i=>{const e=Fo.parse(i);return Fo.createTransformer(i)(e.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}},aO={...Qh,transform:Math.round},Kce={rotate:Cc,rotateX:Cc,rotateY:Cc,rotateZ:Cc,scale:ry,scaleX:ry,scaleY:ry,scaleZ:ry,skew:Cc,skewX:Cc,skewY:Cc,distance:st,translateX:st,translateY:st,translateZ:st,x:st,y:st,z:st,perspective:st,transformPerspective:st,opacity:wg,originX:GF,originY:GF,originZ:st},z5={borderWidth:st,borderTopWidth:st,borderRightWidth:st,borderBottomWidth:st,borderLeftWidth:st,borderRadius:st,borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomRightRadius:st,borderBottomLeftRadius:st,width:st,maxWidth:st,height:st,maxHeight:st,top:st,right:st,bottom:st,left:st,inset:st,insetBlock:st,insetBlockStart:st,insetBlockEnd:st,insetInline:st,insetInlineStart:st,insetInlineEnd:st,padding:st,paddingTop:st,paddingRight:st,paddingBottom:st,paddingLeft:st,paddingBlock:st,paddingBlockStart:st,paddingBlockEnd:st,paddingInline:st,paddingInlineStart:st,paddingInlineEnd:st,margin:st,marginTop:st,marginRight:st,marginBottom:st,marginLeft:st,marginBlock:st,marginBlockStart:st,marginBlockEnd:st,marginInline:st,marginInlineStart:st,marginInlineEnd:st,fontSize:st,backgroundPositionX:st,backgroundPositionY:st,...Kce,zIndex:aO,fillOpacity:wg,strokeOpacity:wg,numOctaves:aO},Xce={...z5,color:Ei,backgroundColor:Ei,outlineColor:Ei,fill:Ei,stroke:Ei,borderColor:Ei,borderTopColor:Ei,borderRightColor:Ei,borderBottomColor:Ei,borderLeftColor:Ei,filter:Fk,WebkitFilter:Fk,mask:Ok,WebkitMask:Ok},CH=i=>Xce[i],Qce=new Set([Fk,Ok]);function DH(i,e){let t=CH(i);return Qce.has(t)||(t=Fo),t.getAnimatableNone?t.getAnimatableNone(e):void 0}
vendor: 1,705 bytes, line 16
16const Zce=new Set(["auto","none","0"]);function Jce(i,e,t){let n=0,r;for(;n<i.length&&!r;){const s=i[n];typeof s=="string"&&!Zce.has(s)&&xh(s).values.length&&(r=i[n]),n++}if(r&&t)for(const s of e)i[s]=DH(t,r)}class eue extends M5{constructor(e,t,n,r,s){super(e,t,n,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let d=0;d<e.length;d++){let f=e[d];if(typeof f=="string"&&(f=f.trim(),S5(f))){const m=pH(f,t.current);m!==void 0&&(e[d]=m),d===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!bH.has(n)||e.length!==2)return;const[r,s]=e,o=oO(r),a=oO(s),l=$F(r),c=$F(s);if(l!==c&&kc[n]){this.needsMeasurement=!0;return}if(o!==a)if(tO(o)&&tO(a))for(let d=0;d<e.length;d++){const f=e[d];typeof f=="string"&&(e[d]=parseFloat(f))}else kc[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(e[r]===null||qce(e[r]))&&n.push(r);n.length&&Jce(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=kc[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const s=n.length-1,o=n[s];n[s]=kc[t](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEac
vendor: 10,824 bytes, line 16
16h(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}const tue=new Set(["opacity","clipPath","filter","transform"]);function EH(i,e,t){if(i==null)return[];if(i instanceof EventTarget)return[i];if(typeof i=="string"){let n=document;const r=t?.[i]??n.querySelectorAll(i);return r?Array.from(r):[]}return Array.from(i).filter(n=>n!=null)}const TH=(i,e)=>e&&typeof i=="number"?e.transform(i):i;function i1(i){return FW(i)&&"offsetHeight"in i}const{schedule:W5}=GW(queueMicrotask,!1),Eo={x:!1,y:!1};function AH(){return Eo.x||Eo.y}function nue(i){return i==="x"||i==="y"?Eo[i]?null:(Eo[i]=!0,()=>{Eo[i]=!1}):Eo.x||Eo.y?null:(Eo.x=Eo.y=!0,()=>{Eo.x=Eo.y=!1})}function kH(i,e){const t=EH(i),n=new AbortController,r={passive:!0,...e,signal:n.signal};return[t,r,()=>n.abort()]}function iue(i){return!(i.pointerType==="touch"||AH())}function rue(i,e,t={}){const[n,r,s]=kH(i,t);return n.forEach(o=>{let a=!1,l=!1,c;const d=()=>{o.removeEventListener("pointerleave",g)},f=v=>{c&&(c(v),c=void 0),d()},m=v=>{a=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),l&&(l=!1,f(v))},p=()=>{a=!0,window.addEventListener("pointerup",m,r),window.addEventListener("pointercancel",m,r)},g=v=>{if(v.pointerType!=="touch"){if(a){l=!0;return}f(v)}},y=v=>{if(!iue(v))return;l=!1;const x=e(o,v);typeof x=="function"&&(c=x,o.addEventListener("pointerleave",g,r))};o.addEventListener("pointerenter",y,r),o.addEventListener("pointerdown",p,r)}),s}const SH=(i,e)=>e?i===e?!0:SH(i,e.parentElement):!1,H5=i=>i.pointerType==="mouse"?typeof i.button!="number"||i.button<=0:i.isPrimary!==!1,sue=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function oue(i){return sue.has(i.tagName)||i.isContentEditable===!0}const aue=new Set(["INPUT","SELECT","TEXTAREA"]);function lue(i){return aue.has(i.tagName)||i.isContentEditable===!0}const r1=new WeakSet;function lO(i){return e=>{e.key==="Enter"&&i(e)}}function VD(i,e){i.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const cue=(i,e)=>{const t=i.currentTarget;if(!t)return;const n=lO(()=>{if(r1.has(t))return;VD(t,"down");const r=lO(()=>{VD(t,"up")}),s=()=>VD(t,"cancel");t.addEventListener("keyup",r,e),t.addEventListener("blur",s,e)});t.addEventListener("keydown",n,e),t.addEventListener("blur",()=>t.removeEventListener("keydown",n),e)};function cO(i){return H5(i)&&!AH()}const uO=new WeakSet;function uue(i,e,t={}){const[n,r,s]=kH(i,t),o=a=>{const l=a.currentTarget;if(!cO(a)||uO.has(a))return;r1.add(l),t.stopPropagation&&uO.add(a);const c=e(l,a),d=(p,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),r1.has(l)&&r1.delete(l),cO(p)&&typeof c=="function"&&c(p,{success:g})},f=p=>{d(p,l===window||l===document||t.useGlobalTarget||SH(l,p.target))},m=p=>{d(p,!1)};window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",m,r)};return n.forEach(a=>{(t.useGlobalTarget?window:a).addEventListener("pointerdown",o,r),i1(a)&&(a.addEventListener("focus",c=>cue(c,r)),!oue(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function q5(i){return FW(i)&&"ownerSVGElement"in i}const s1=new WeakMap;let o1;const PH=(i,e,t)=>(n,r)=>r&&r[0]?r[0][i+"Size"]:q5(n)&&"getBBox"in n?n.getBBox()[e]:n[t],due=PH("inline","width","offsetWidth"),fue=PH("block","height","offsetHeight");function hue({target:i,borderBoxSize:e}){s1.get(i)?.forEach(t=>{t(i,{get width(){return due(i,e)},get height(){return fue(i,e)}})})}function mue(i){i.forEach(hue)}function pue(){typeof ResizeObserver>"u"||(o1=new ResizeObserver(mue))}function gue(i,e){o1||pue();const t=EH(i);return t.forEach(n=>{let r=s1.get(n);r||(r=new Set,s1.set(n,r)),r.add(e),o1?.observe(n)}),()=>{t.forEach(n=>{const r=s1.get(n);r?.delete(e),r?.size||o1?.unobserve(n)})}}const a1=new Set;let Xf;function bue(){Xf=()=>{const i={get width(){return window.innerWidth},get height(){return window.innerHeight}};a1.forEach(e=>e(i))},window.addEventListener("resize",Xf)}function yue(i){return a1.add(i),Xf||bue(),()=>{a1.delete(i),!a1.size&&typeof Xf=="function"&&(window.removeEventListener("resize",Xf),Xf=void 0)}}function dO(i,e){return typeof i=="function"?yue(i):gue(i,e)}function vue(i){return q5(i)&&i.tagName==="svg"}const wue=[..._H,Ei,Fo],xue=i=>wue.find(xH(i)),fO=()=>({translate:0,scale:1,origin:0,originPoint:0}),Qf=()=>({x:fO(),y:fO()}),hO=()=>({min:0,max:0}),Oi=()=>({x:hO(),y:hO()}),_ue=new WeakMap;function Gx(i){return i!==null&&typeof i=="object"&&typeof i.start=="function"}function xg(i){return typeof i=="string"||Array.isArray(i)}const $5=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],G5=["initial",...$5];function Yx(i){return Gx(i.animate)||G5.some(e=>xg(i[e]))}function IH(i){return!!(Yx(i)||i.variants)}function Cue(i,e,t){for(const n in e){const r=e[n],s=t[n];if(gr(r))i.addValue(n,r);else if(gr(s))i.addValue(n,_h(r,{owner:i}));else if(s!==r)if(i.hasValue(n)){const o=i.getValue(n);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{const o=i.getStaticValue(n);i.addValue(n,_h(o!==void 0?o:r,{owner:i}))}}for(const n in t)e[n]===void 0&&i.removeValue(n);return e}const Nk={current:null},RH={current:!1},Due=typeof window<"u";function Eue(){if(RH.current=!0,!!Due)if(window.matchMedia){const i=window.matchMedia("(prefers-reduced-motion)"),e=()=>Nk.current=i.matches;i.addEventListener("change",e),e()}else Nk.current=!1}const mO=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let yw={};function FH(i){yw=i}function Tue(){return yw}class Aue{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:s,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=M5,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Sr.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Nn.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=d,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Yx(t),this.isVariantNode=IH(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...m}=this.scrapeMotionValuesFromProps(t,{},this);for(const p in m){const g=m[p];c[p]!==void 0&&gr(g)&&g.set(c[p])}}mount(e){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=e,_ue.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,n)=>this.bindToMotionValue(n,t)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(RH.current||Eue(),this.shouldReduceMotion=Nk.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Nc(this.notifyUpdate),Nc(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&tue.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:d}=t.accelerate,f=new fH({element:this.current,name:e,keyframes:a,times:l,ease:c,duration:Rs(d)}),m=o(f);this.valueSubscriptions.set(e,()=>{m(),f.cancel()});return}const n=Jh.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Nn.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),s&&s(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in yw){const t=yw[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Oi()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<mO.length;n++){const r=mO[n];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,o=e[s];o&&(this.propEventSubscriptions[r]=this.on(r,o))}this.prevMotionValues=Cue(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}
vendor: 8,655 bytes, line 16
16addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=_h(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n=="string"&&(RW(n)||OW(n))?n=parseFloat(n):!xue(n)&&Fo.test(t)&&(n=DH(e,t)),this.setBaseTarget(e,gr(n)?n.get():n)),gr(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if(typeof t=="string"||typeof t=="object"){const s=V5(this.props,t,this.presenceContext?.custom);s&&(n=s[e])}if(t&&n!==void 0)return n;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!gr(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new T5),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){W5.render(this.render)}}class OH extends Aue{constructor(){super(...arguments),this.KeyframeResolver=eue}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;gr(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class Gc{constructor(e){this.isMounted=!1,this.node=e}update(){}}function NH({top:i,left:e,right:t,bottom:n}){return{x:{min:e,max:t},y:{min:i,max:n}}}function kue({x:i,y:e}){return{top:e.min,right:i.max,bottom:e.max,left:i.min}}function Sue(i,e){if(!e)return i;const t=e({x:i.left,y:i.top}),n=e({x:i.right,y:i.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}function jD(i){return i===void 0||i===1}function Bk({scale:i,scaleX:e,scaleY:t}){return!jD(i)||!jD(e)||!jD(t)}function Nu(i){return Bk(i)||BH(i)||i.z||i.rotate||i.rotateX||i.rotateY||i.skewX||i.skewY}function BH(i){return pO(i.x)||pO(i.y)}function pO(i){return i&&i!=="0%"}function vw(i,e,t){const n=i-t,r=e*n;return t+r}function gO(i,e,t,n,r){return r!==void 0&&(i=vw(i,r,n)),vw(i,t,n)+e}function Mk(i,e=0,t=1,n,r){i.min=gO(i.min,e,t,n,r),i.max=gO(i.max,e,t,n,r)}function MH(i,{x:e,y:t}){Mk(i.x,e.translate,e.scale,e.originPoint),Mk(i.y,t.translate,t.scale,t.originPoint)}const bO=.999999999999,yO=1.0000000000001;function Pue(i,e,t,n=!1){const r=t.length;if(!r)return;e.x=e.y=1;let s,o;for(let a=0;a<r;a++){s=t[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Jf(i,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,MH(i,o)),n&&Nu(s.latestValues)&&Jf(i,s.latestValues,s.layout?.layoutBox))}e.x<yO&&e.x>bO&&(e.x=1),e.y<yO&&e.y>bO&&(e.y=1)}function Zf(i,e){i.min=i.min+e,i.max=i.max+e}function vO(i,e,t,n,r=.5){const s=Xn(i.min,i.max,r);Mk(i,e,t,s,n)}function wO(i,e){return typeof i=="string"?parseFloat(i)/100*(e.max-e.min):i}function Jf(i,e,t){const n=t??i;vO(i.x,wO(e.x,n.x),e.scaleX,e.scale,e.originX),vO(i.y,wO(e.y,n.y),e.scaleY,e.scale,e.originY)}function LH(i,e){return NH(Sue(i.getBoundingClientRect(),e))}function Iue(i,e,t){const n=LH(i,t),{scroll:r}=e;return r&&(Zf(n.x,r.offset.x),Zf(n.y,r.offset.y)),n}const Rue={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Fue=Zh.length;function Oue(i,e,t){let n="",r=!0;for(let s=0;s<Fue;s++){const o=Zh[s],a=i[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const c=parseFloat(a);l=o.startsWith("scale")?c===1:c===0}if(!l||t){const c=TH(a,z5[o]);if(!l){r=!1;const d=Rue[o]||o;n+=`${d}(${c}) `}t&&(e[o]=c)}}return n=n.trim(),t?n=t(e,r?"":n):r&&(n="none"),n}function Y5(i,e,t){const{style:n,vars:r,transformOrigin:s}=i;let o=!1,a=!1;for(const l in e){const c=e[l];if(Jh.has(l)){o=!0;continue}else if(KW(l)){r[l]=c;continue}else{const d=TH(c,z5[l]);l.startsWith("origin")?(a=!0,s[l]=d):n[l]=d}}if(e.transform||(o||t?n.transform=Oue(e,i.transform,t):n.transform&&(n.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:d=0}=s;n.transformOrigin=`${l} ${c} ${d}`}}function UH(i,{style:e,vars:t},n,r){const s=i.style;let o;for(o in e)s[o]=e[o];r?.applyProjectionStyles(s,n);for(o in t)s.setProperty(o,t[o])}function xO(i,e){return e.max===e.min?0:i/(e.max-e.min)*100}const np={correct:(i,e)=>{if(!e.target)return i;if(typeof i=="string")if(st.test(i))i=parseFloat(i);else return i;const t=xO(i,e.target.x),n=xO(i,e.target.y);return`${t}% ${n}%`}},Nue={correct:(i,{treeScale:e,projectionDelta:t})=>{const n=i,r=Fo.parse(i);if(r.length>5)return n;const s=Fo.createTransformer(i),o=typeof r[0]!="number"?1:0,a=t.x.scale*e.x,l=t.y.scale*e.y;r[0+o]/=a,r[1+o]/=l;const c=Xn(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=c),typeof r[3+o]=="number"&&(r[3+o]/=c),s(r)}},Lk={borderRadius:{...np,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:np,borderTopRightRadius:np,borderBottomLeftRadius:np,borderBottomRightRadius:np,boxShadow:Nue};function VH(i,{layout:e,layoutId:t}){return Jh.has(i)||i.startsWith("origin")||(e||t!==void 0)&&(!!Lk[i]||i==="opacity")}function K5(i,e,t){const n=i.style,r=e?.style,s={};if(!n)return s;for(const o in n)(gr(n[o])||r&&gr(r[o])||VH(o,i)||t?.getValue(o)?.liveStyle!==void 0)&&(s[o]=n[o]);return s}function Bue(i){return window.getComputedStyle(i)}class Mue extends OH{constructor(){super(...arguments),this.type="html",this.renderInstance=UH}readValueFromInstance(e,t){if(Jh.has(t))return this.projection?.isProjecting?Dk(t):ice(e,t);{const n=Bue(e),r=(KW(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return LH(e,t)}build(e,t,n){Y5(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return K5(e,t,n)}}const Lue={offset:"stroke-dashoffset",array:"stroke-dasharray"},Uue={offset:"strokeDashoffset",array:"strokeDasharray"};function Vue(i,e,t=1,n=0,r=!0){i.pathLength=1;const s=r?Lue:Uue;i[s.offset]=`${-n}`,i[s.array]=`${e} ${t}`}const jue=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function jH(i,{attrX:e,attrY:t,attrScale:n,pathLength:r,pathSpacing:s=1,pathOffset:o=0,...a},l,c,d){if(Y5(i,a,c),l){i.style.viewBox&&(i.attrs.viewBox=i.style.viewBox);return}i.attrs=i.style,i.style={};const{attrs:f,style:m}=i;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=d?.transformBox??"fill-box",delete f.transformBox);for(const p of jue)f[p]!==void 0&&(m[p]=f[p],delete f[p]);e!==void 0&&(f.x=e),t!==void 0&&(f.y=t),n!==void 0&&(f.scale=n),r!==void 0&&Vue(f,r,s,o,!1)}const zH=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),WH=i=>typeof i=="string"&&i.toLowerCase()==="svg";function zue(i,e,t,n){UH(i,e,void 0,n);for(const r in e.attrs)i.setAttribute(zH.has(r)?r:j5(r),e.attrs[r])}function HH(i,e,t){const n=K5(i,e,t);for(const r in i)if(gr(i[r])||gr(e[r])){const s=Zh.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[s]=i[r]}return n}class Wue extends OH{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Oi}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Jh.has(t)){const n=CH(t);return n&&n.default||0}return t=zH.has(t)?t:j5(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return HH(e,t,n)}
vendor: 25,186 bytes, line 16
16build(e,t,n){jH(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){zue(e,t,n,r)}mount(e){this.isSVGTag=WH(e.tagName),super.mount(e)}}const Hue=G5.length;function qH(i){if(!i)return;if(!i.isControllingVariants){const t=i.parent?qH(i.parent)||{}:{};return i.props.initial!==void 0&&(t.initial=i.props.initial),t}const e={};for(let t=0;t<Hue;t++){const n=G5[t],r=i.props[n];(xg(r)||r===!1)&&(e[n]=r)}return e}function $H(i,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==i.length)return!1;for(let n=0;n<t;n++)if(e[n]!==i[n])return!1;return!0}const que=[...$5].reverse(),$ue=$5.length;function Gue(i){return e=>Promise.all(e.map(({animation:t,options:n})=>Wce(i,t,n)))}function Yue(i){let e=Gue(i),t=_O(),n=!0,r=!1;const s=c=>(d,f)=>{const m=oh(i,f,c==="exit"?i.presenceContext?.custom:void 0);if(m){const{transition:p,transitionEnd:g,...y}=m;d={...d,...y,...g}}return d};function o(c){e=c(i)}function a(c){const{props:d}=i,f=qH(i.parent)||{},m=[],p=new Set;let g={},y=1/0;for(let x=0;x<$ue;x++){const C=que[x],D=t[C],E=d[C]!==void 0?d[C]:f[C],T=xg(E),S=C===c?D.isActive:null;S===!1&&(y=x);let A=E===f[C]&&E!==d[C]&&T;if(A&&(n||r)&&i.manuallyAnimateOnMount&&(A=!1),D.protectedKeys={...g},!D.isActive&&S===null||!E&&!D.prevProp||Gx(E)||typeof E=="boolean")continue;if(C==="exit"&&D.isActive&&S!==!0){D.prevResolvedValues&&(g={...g,...D.prevResolvedValues});continue}const I=Kue(D.prevProp,E);let R=I||C===c&&D.isActive&&!A&&T||x>y&&T,O=!1;const j=Array.isArray(E)?E:[E];let B=j.reduce(s(C),{});S===!1&&(B={});const{prevResolvedValues:U={}}=D,F={...U,...B},H=G=>{R=!0,p.has(G)&&(O=!0,p.delete(G)),D.needsAnimating[G]=!0;const Y=i.getValue(G);Y&&(Y.liveStyle=!1)};for(const G in F){const Y=B[G],ie=U[G];if(g.hasOwnProperty(G))continue;let V=!1;Pk(Y)&&Pk(ie)?V=!$H(Y,ie):V=Y!==ie,V?Y!=null?H(G):p.add(G):Y!==void 0&&p.has(G)?H(G):D.protectedKeys[G]=!0}D.prevProp=E,D.prevResolvedValues=B,D.isActive&&(g={...g,...B}),(n||r)&&i.blockInitialAnimation&&(R=!1);const L=A&&I;R&&(!L||O)&&m.push(...j.map(G=>{const Y={type:C};if(typeof G=="string"&&(n||r)&&!L&&i.manuallyAnimateOnMount&&i.parent){const{parent:ie}=i,V=oh(ie,G);if(ie.enteringChildren&&V){const{delayChildren:q}=V.transition||{};Y.delay=mH(ie.enteringChildren,i,q)}}return{animation:G,options:Y}}))}if(p.size){const x={};if(typeof d.initial!="boolean"){const C=oh(i,Array.isArray(d.initial)?d.initial[0]:d.initial);C&&C.transition&&(x.transition=C.transition)}p.forEach(C=>{const D=i.getBaseTarget(C),E=i.getValue(C);E&&(E.liveStyle=!0),x[C]=D??null}),m.push({animation:x})}let v=!!m.length;return n&&(d.initial===!1||d.initial===d.animate)&&!i.manuallyAnimateOnMount&&(v=!1),n=!1,r=!1,v?e(m):Promise.resolve()}function l(c,d){if(t[c].isActive===d)return Promise.resolve();i.variantChildren?.forEach(m=>m.animationState?.setActive(c,d)),t[c].isActive=d;const f=a(c);for(const m in t)t[m].protectedKeys={};return f}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>t,reset:()=>{t=_O(),r=!0}}}function Kue(i,e){return typeof e=="string"?e!==i:Array.isArray(e)?!$H(e,i):!1}function xu(i=!1){return{isActive:i,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _O(){return{animate:xu(!0),whileInView:xu(),whileHover:xu(),whileTap:xu(),whileDrag:xu(),whileFocus:xu(),exit:xu()}}function CO(i,e){i.min=e.min,i.max=e.max}function xo(i,e){CO(i.x,e.x),CO(i.y,e.y)}function DO(i,e){i.translate=e.translate,i.scale=e.scale,i.originPoint=e.originPoint,i.origin=e.origin}const GH=1e-4,Xue=1-GH,Que=1+GH,YH=.01,Zue=0-YH,Jue=0+YH;function Pr(i){return i.max-i.min}function ede(i,e,t){return Math.abs(i-e)<=t}function EO(i,e,t,n=.5){i.origin=n,i.originPoint=Xn(e.min,e.max,i.origin),i.scale=Pr(t)/Pr(e),i.translate=Xn(t.min,t.max,i.origin)-i.originPoint,(i.scale>=Xue&&i.scale<=Que||isNaN(i.scale))&&(i.scale=1),(i.translate>=Zue&&i.translate<=Jue||isNaN(i.translate))&&(i.translate=0)}function Kp(i,e,t,n){EO(i.x,e.x,t.x,n?n.originX:void 0),EO(i.y,e.y,t.y,n?n.originY:void 0)}function TO(i,e,t){i.min=t.min+e.min,i.max=i.min+Pr(e)}function tde(i,e,t){TO(i.x,e.x,t.x),TO(i.y,e.y,t.y)}function AO(i,e,t){i.min=e.min-t.min,i.max=i.min+Pr(e)}function ww(i,e,t){AO(i.x,e.x,t.x),AO(i.y,e.y,t.y)}function kO(i,e,t,n,r){return i-=e,i=vw(i,1/t,n),r!==void 0&&(i=vw(i,1/r,n)),i}function nde(i,e=0,t=1,n=.5,r,s=i,o=i){if(ba.test(e)&&(e=parseFloat(e),e=Xn(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Xn(s.min,s.max,n);i===s&&(a-=e),i.min=kO(i.min,e,t,a,r),i.max=kO(i.max,e,t,a,r)}function SO(i,e,[t,n,r],s,o){nde(i,e[t],e[n],e[r],e.scale,s,o)}const ide=["x","scaleX","originX"],rde=["y","scaleY","originY"];function PO(i,e,t,n){SO(i.x,e,ide,t?t.x:void 0,n?n.x:void 0),SO(i.y,e,rde,t?t.y:void 0,n?n.y:void 0)}function IO(i){return i.translate===0&&i.scale===1}function KH(i){return IO(i.x)&&IO(i.y)}function RO(i,e){return i.min===e.min&&i.max===e.max}function sde(i,e){return RO(i.x,e.x)&&RO(i.y,e.y)}function FO(i,e){return Math.round(i.min)===Math.round(e.min)&&Math.round(i.max)===Math.round(e.max)}function XH(i,e){return FO(i.x,e.x)&&FO(i.y,e.y)}function OO(i){return Pr(i.x)/Pr(i.y)}function NO(i,e){return i.translate===e.translate&&i.scale===e.scale&&i.originPoint===e.originPoint}function oa(i){return[i("x"),i("y")]}function ode(i,e,t){let n="";const r=i.x.translate/e.x,s=i.y.translate/e.y,o=t?.z||0;if((r||s||o)&&(n=`translate3d(${r}px, ${s}px, ${o}px) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),t){const{transformPerspective:c,rotate:d,rotateX:f,rotateY:m,skewX:p,skewY:g}=t;c&&(n=`perspective(${c}px) ${n}`),d&&(n+=`rotate(${d}deg) `),f&&(n+=`rotateX(${f}deg) `),m&&(n+=`rotateY(${m}deg) `),p&&(n+=`skewX(${p}deg) `),g&&(n+=`skewY(${g}deg) `)}const a=i.x.scale*e.x,l=i.y.scale*e.y;return(a!==1||l!==1)&&(n+=`scale(${a}, ${l})`),n||"none"}const QH=["TopLeft","TopRight","BottomLeft","BottomRight"],ade=QH.length,BO=i=>typeof i=="string"?parseFloat(i):i,MO=i=>typeof i=="number"||st.test(i);function lde(i,e,t,n,r,s){r?(i.opacity=Xn(0,t.opacity??1,cde(n)),i.opacityExit=Xn(e.opacity??1,0,ude(n))):s&&(i.opacity=Xn(e.opacity??1,t.opacity??1,n));for(let o=0;o<ade;o++){const a=`border${QH[o]}Radius`;let l=LO(e,a),c=LO(t,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||MO(l)===MO(c)?(i[a]=Math.max(Xn(BO(l),BO(c),n),0),(ba.test(c)||ba.test(l))&&(i[a]+="%")):i[a]=c}(e.rotate||t.rotate)&&(i.rotate=Xn(e.rotate||0,t.rotate||0,n))}function LO(i,e){return i[e]!==void 0?i[e]:i.borderRadius}const cde=ZH(0,.5,WW),ude=ZH(.5,.95,ao);function ZH(i,e,t){return n=>n<i?0:n>e?1:t(vg(i,e,n))}function dde(i,e,t){const n=gr(i)?i:_h(i);return n.start(U5("",n,e,t)),n.animation}function _g(i,e,t,n={passive:!0}){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t)}const fde=(i,e)=>i.depth-e.depth;class hde{constructor(){this.children=[],this.isDirty=!1}add(e){D5(this.children,e),this.isDirty=!0}remove(e){mw(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(fde),this.isDirty=!1,this.children.forEach(e)}}function mde(i,e){const t=Sr.now(),n=({timestamp:r})=>{const s=r-t;s>=e&&(Nc(n),i(s-e))};return Nn.setup(n,!0),()=>Nc(n)}function l1(i){return gr(i)?i.get():i}class pde{constructor(){this.members=[]}add(e){D5(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(mw(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(mw(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){const n=this.members[t];if(n.isPresent!==!1&&n.instance?.isConnected!==!1)return this.promote(n),!0}return!1}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=n.options,{layoutDependency:s}=e.options;(r===void 0||r!==s)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const c1={hasAnimatedSinceResize:!0,hasEverUpdated:!1},zD=["","X","Y","Z"],gde=1e3;let bde=0;function WD(i,e,t,n){const{latestValues:r}=e;r[i]&&(t[i]=r[i],e.setStaticValue(i,0),n&&(n[i]=0))}function JH(i){if(i.hasCheckedOptimisedAppear=!0,i.root===i)return;const{visualElement:e}=i.options;if(!e)return;const t=vH(e);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:r,layoutId:s}=i.options;window.MotionCancelOptimisedAnimation(t,"transform",Nn,!(r||s))}const{parent:n}=i;n&&!n.hasCheckedOptimisedAppear&&JH(n)}function eq({attachResizeListener:i,defaultParent:e,measureScroll:t,checkIsScrollRoot:n,resetTransform:r}){return class{constructor(o={},a=e?.()){this.id=bde++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(wde),this.nodes.forEach(Dde),this.nodes.forEach(Ede),this.nodes.forEach(xde)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new hde)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new T5),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=q5(o)&&!vue(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),i){let d,f=0;const m=()=>this.root.updateBlockedByResize=!1;Nn.read(()=>{f=window.innerWidth}),i(o,()=>{const p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,d&&d(),d=mde(m,250),c1.hasAnimatedSinceResize&&(c1.hasAnimatedSinceResize=!1,this.nodes.forEach(jO)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||Pde,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=c.getProps(),x=!this.targetLayout||!XH(this.targetLayout,p),C=!f&&m;if(this.options.layoutRoot||this.resumeFrom||C||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const D={...L5(g,"layout"),onPlay:y,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(D.delay=0,D.type=!1),this.startAnimation(D),this.setAnimationOrigin(d,C)}else f||jO(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Nc(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Tde),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&JH(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(UO);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(VO);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Cde),this.nodes.forEach(yde),this.nodes.forEach(vde)):this.nodes.forEach(VO),this.clearAllSnapshots();const a=Sr.now();er.delta=Ea(0,1e3/60,a-er.timestamp),er.timestamp=a,er.isProcessing=!0,OD.update.process(er),OD.preRender.process(er),OD.render.process(er),er.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,W5.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(_de),this.sharedNodes.forEach(Ade)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Nn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Nn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Pr(this.snapshot.measuredBox.x)&&!Pr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Oi(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!KH(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||Nu(this.latestValues)||d)&&(r(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Ide(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return Oi();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Rde))){const{scroll:c}=this.root;c&&(Zf(a.x,c.offset.x),Zf(a.y,c.offset.y))}return a}removeElementScroll(o){const a=Oi();if(xo(a,o),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&xo(a,o),Zf(a.x,d.offset.x),Zf(a.y,d.offset.y))}return a}applyTransform(o,a=!1){const l=Oi();xo(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Jf(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Nu(d.latestValues)&&Jf(l,d.latestValues,d.layout?.layoutBox)}return Nu(this.latestValues)&&Jf(l,this.latestValues,this.layout?.layoutBox),l}removeTransform(o){const a=Oi();xo(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!Nu(c.latestValues))continue;let d;c.instance&&(Bk(c.latestValues)&&c.updateSnapshot(),d=Oi(),xo(d,c.measurePageBox())),PO(a,c.latestValues,c.snapshot?.layoutBox,d)}return Nu(this.latestValues)&&PO(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==er.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!this.layout||!(d||f))return;this.resolvedRelativeTargetAt=er.timestamp;const m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Oi(),this.targetWithTransforms=Oi()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),tde(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):xo(this.target,this.layout.layoutBox),MH(this.target,this.targetDelta)):xo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Bk(this.parent.latestValues)||BH(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Oi(),this.relativeTargetOrigin=Oi(),ww(this.relativeTargetOrigin,a,l),xo(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===er.timestamp&&(l=!1),l)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;xo(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;Pue(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Oi());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(DO(this.prevProjectionDelta.x,this.projectionDelta.x),DO(this.prevProjectionDelta.y,this.projectionDelta.y)),Kp(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!NO(this.projectionDelta.x,this.prevProjectionDelta.x)||!NO(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Qf(),this.projectionDelta=Qf(),this.projectionDeltaWithTransform=Qf()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},f=Qf();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=Oi(),p=l?l.source:void 0,g=this.layout?this.layout.source:void 0,y=p!==g,v=this.getStack(),x=!v||v.members.length<=1,C=!!(y&&!x&&this.options.crossfade===!0&&!this.path.some(Sde));this.animationProgress=0;let D;this.mixTargetDelta=E=>{const T=E/1e3;zO(f.x,o.x,T),zO(f.y,o.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ww(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kde(this.relativeTarget,this.relativeTargetOrigin,m,T),D&&sde(this.relativeTarget,D)&&(this.isProjectionDirty=!1),D||(D=Oi()),xo(D,this.relativeTarget)),y&&(this.animationValues=d,lde(d,c,this.latestValues,T,C,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Nc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Nn.update(()=>{c1.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=_h(0)),this.motionValue.jump(0,!1),this.currentAnimation=dde(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(gde),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:d}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&tq(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Oi();const f=Pr(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const m=Pr(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+m}xo(a,l),Jf(a,d),Kp(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new pde),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;
vendor: 13,215 bytes, lines 16-24
16return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&WD("z",o,c,this.animationValues);for(let d=0;d<zD.length;d++)WD(`rotate${zD[d]}`,o,c,this.animationValues),WD(`skew${zD[d]}`,o,c,this.animationValues);o.render();for(const d in c)o.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=l1(a?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=l1(a?.pointerEvents)||""),this.hasProjected&&!Nu(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=ode(this.projectionDeltaWithTransform,this.treeScale,d);l&&(f=l(d,f)),o.transform=f;const{x:m,y:p}=this.projectionDelta;o.transformOrigin=`${m.origin*100}% ${p.origin*100}% 0`,c.animationValues?o.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in Lk){if(d[g]===void 0)continue;const{correct:y,applyTo:v,isCSSVariable:x}=Lk[g],C=f==="none"?d[g]:y(d[g],c);if(v){const D=v.length;for(let E=0;E<D;E++)o[v[E]]=C}else x?this.options.visualElement.renderState.vars[g]=C:o[g]=C}this.options.layoutId&&(o.pointerEvents=c===this?l1(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(UO),this.root.sharedNodes.clear()}}}function yde(i){i.updateLayout()}function vde(i){const e=i.resumeFrom?.snapshot||i.snapshot;if(i.isLead()&&i.layout&&e&&i.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=i.layout,{animationType:r}=i.options,s=e.source!==i.layout.source;r==="size"?oa(d=>{const f=s?e.measuredBox[d]:e.layoutBox[d],m=Pr(f);f.min=t[d].min,f.max=f.min+m}):tq(r,e.layoutBox,t)&&oa(d=>{const f=s?e.measuredBox[d]:e.layoutBox[d],m=Pr(t[d]);f.max=f.min+m,i.relativeTarget&&!i.currentAnimation&&(i.isProjectionDirty=!0,i.relativeTarget[d].max=i.relativeTarget[d].min+m)});const o=Qf();Kp(o,t,e.layoutBox);const a=Qf();s?Kp(a,i.applyTransform(n,!0),e.measuredBox):Kp(a,t,e.layoutBox);const l=!KH(o);let c=!1;if(!i.resumeFrom){const d=i.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:m}=d;if(f&&m){const p=Oi();ww(p,e.layoutBox,f.layoutBox);const g=Oi();ww(g,t,m.layoutBox),XH(p,g)||(c=!0),d.options.layoutRoot&&(i.relativeTarget=g,i.relativeTargetOrigin=p,i.relativeParent=d)}}}i.notifyListeners("didUpdate",{layout:t,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(i.isLead()){const{onExitComplete:t}=i.options;t&&t()}i.options.transition=void 0}function wde(i){i.parent&&(i.isProjecting()||(i.isProjectionDirty=i.parent.isProjectionDirty),i.isSharedProjectionDirty||(i.isSharedProjectionDirty=!!(i.isProjectionDirty||i.parent.isProjectionDirty||i.parent.isSharedProjectionDirty)),i.isTransformDirty||(i.isTransformDirty=i.parent.isTransformDirty))}function xde(i){i.isProjectionDirty=i.isSharedProjectionDirty=i.isTransformDirty=!1}function _de(i){i.clearSnapshot()}function UO(i){i.clearMeasurements()}function VO(i){i.isLayoutDirty=!1}function Cde(i){const{visualElement:e}=i.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),i.resetTransform()}function jO(i){i.finishAnimation(),i.targetDelta=i.relativeTarget=i.target=void 0,i.isProjectionDirty=!0}function Dde(i){i.resolveTargetDelta()}function Ede(i){i.calcProjection()}function Tde(i){i.resetSkewAndRotation()}function Ade(i){i.removeLeadSnapshot()}function zO(i,e,t){i.translate=Xn(e.translate,0,t),i.scale=Xn(e.scale,1,t),i.origin=e.origin,i.originPoint=e.originPoint}function WO(i,e,t,n){i.min=Xn(e.min,t.min,n),i.max=Xn(e.max,t.max,n)}function kde(i,e,t,n){WO(i.x,e.x,t.x,n),WO(i.y,e.y,t.y,n)}function Sde(i){return i.animationValues&&i.animationValues.opacityExit!==void 0}const Pde={duration:.45,ease:[.4,0,.1,1]},HO=i=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(i),qO=HO("applewebkit/")&&!HO("chrome/")?Math.round:ao;function $O(i){i.min=qO(i.min),i.max=qO(i.max)}function Ide(i){$O(i.x),$O(i.y)}function tq(i,e,t){return i==="position"||i==="preserve-aspect"&&!ede(OO(e),OO(t),.2)}function Rde(i){return i!==i.root&&i.scroll?.wasRoot}const Fde=eq({attachResizeListener:(i,e)=>_g(i,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),HD={current:void 0},nq=eq({measureScroll:i=>({x:i.scrollLeft,y:i.scrollTop}),defaultParent:()=>{if(!HD.current){const i=new Fde({});i.mount(window),i.setOptions({layoutScroll:!0}),HD.current=i}return HD.current},resetTransform:(i,e)=>{i.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:i=>window.getComputedStyle(i).position==="fixed"}),X5=M.createContext({transformPagePoint:i=>i,isStatic:!1,reducedMotion:"never"});function GO(i,e){if(typeof i=="function")return i(e);i!=null&&(i.current=e)}function Ode(...i){return e=>{let t=!1;const n=i.map(r=>{const s=GO(r,e);return!t&&typeof s=="function"&&(t=!0),s});if(t)return()=>{for(let r=0;r<n.length;r++){const s=n[r];typeof s=="function"?s():GO(i[r],null)}}}}function Nde(...i){return M.useCallback(Ode(...i),i)}class Bde extends M.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(i1(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const n=t.offsetParent,r=i1(n)&&n.offsetWidth||0,s=i1(n)&&n.offsetHeight||0,o=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=r-a.width-a.left,a.bottom=s-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Mde({children:i,isPresent:e,anchorX:t,anchorY:n,root:r,pop:s}){const o=M.useId(),a=M.useRef(null),l=M.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=M.useContext(X5),d=i.props?.ref??i?.ref,f=Nde(a,d);return M.useInsertionEffect(()=>{const{width:m,height:p,top:g,left:y,right:v,bottom:x}=l.current;if(e||s===!1||!a.current||!m||!p)return;const C=t==="left"?`left: ${y}`:`right: ${v}`,D=n==="bottom"?`bottom: ${x}`:`top: ${g}`;a.current.dataset.motionPopId=o;const E=document.createElement("style");c&&(E.nonce=c);const T=r??document.head;return T.appendChild(E),E.sheet&&E.sheet.insertRule(`
17          [data-motion-pop-id="${o}"] {
18            position: absolute !important;
19            width: ${m}px !important;
20            height: ${p}px !important;
21            ${C}px !important;
22            ${D}px !important;
23          }
24        `),()=>{T.contains(E)&&T.removeChild(E)}},[e]),w.jsx(Bde,{isPresent:e,childRef:a,sizeRef:l,pop:s,children:s===!1?i:M.cloneElement(i,{ref:f})})}const Lde=({children:i,initial:e,isPresent:t,onExitComplete:n,custom:r,presenceAffectsLayout:s,mode:o,anchorX:a,anchorY:l,root:c})=>{const d=C5(Ude),f=M.useId();let m=!0,p=M.useMemo(()=>(m=!1,{id:f,initial:e,isPresent:t,custom:r,onExitComplete:g=>{d.set(g,!0);for(const y of d.values())if(!y)return;n&&n()},register:g=>(d.set(g,!1),()=>d.delete(g))}),[t,d,n]);return s&&m&&(p={...p}),M.useMemo(()=>{d.forEach((g,y)=>d.set(y,!1))},[t]),M.useEffect(()=>{!t&&!d.size&&n&&n()},[t]),i=w.jsx(Mde,{pop:o==="popLayout",isPresent:t,anchorX:a,anchorY:l,root:c,children:i}),w.jsx($x.Provider,{value:p,children:i})};function Ude(){return new Map}function iq(i=!0){const e=M.useContext($x);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,s=M.useId();M.useEffect(()=>{if(i)return r(s)},[i]);const o=M.useCallback(()=>i&&n&&n(s),[s,n,i]);return!t&&n?[!1,o]:[!0]}const sy=i=>i.key||"";function YO(i){const e=[];return M.Children.forEach(i,t=>{M.isValidElement(t)&&e.push(t)}),e}const Vde=({children:i,custom:e,initial:t=!0,onExitComplete:n,presenceAffectsLayout:r=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[d,f]=iq(o),m=M.useMemo(()=>YO(i),[i]),p=o&&!d?[]:m.map(sy),g=M.useRef(!0),y=M.useRef(m),v=C5(()=>new Map),x=M.useRef(new Set),[C,D]=M.useState(m),[E,T]=M.useState(m);IW(()=>{g.current=!1,y.current=m;for(let I=0;I<E.length;I++){const R=sy(E[I]);p.includes(R)?(v.delete(R),x.current.delete(R)):v.get(R)!==!0&&v.set(R,!1)}},[E,p.length,p.join("-")]);const S=[];if(m!==C){let I=[...m];for(let R=0;R<E.length;R++){const O=E[R],j=sy(O);p.includes(j)||(I.splice(R,0,O),S.push(O))}return s==="wait"&&S.length&&(I=S),T(YO(I)),D(m),null}const{forceRender:A}=M.useContext(_5);return w.jsx(w.Fragment,{children:E.map(I=>{const R=sy(I),O=o&&!d?!1:m===E||p.includes(R),j=()=>{if(x.current.has(R))return;if(x.current.add(R),v.has(R))v.set(R,!0);else return;let B=!0;v.forEach(U=>{U||(B=!1)}),B&&(A?.(),T(y.current),o&&f?.(),n&&n())};return w.jsx(Lde,{isPresent:O,initial:!g.current||t?void 0:!1,custom:e,presenceAffectsLayout:r,mode:s,root:c,onExitComplete:O?void 0:j,anchorX:a,anchorY:l,children:I},R)})})},rq=M.createContext({strict:!1}),KO={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let XO=!1;function jde(){if(XO)return;const i={};for(const e in KO)i[e]={isEnabled:t=>KO[e].some(n=>!!t[n])};FH(i),XO=!0}function sq(){return jde(),Tue()}function zde(i){const e=sq();for(const t in i)e[t]={...e[t],...i[t]};FH(e)}const Wde=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function xw(i){return i.startsWith("while")||i.startsWith("drag")&&i!=="draggable"||i.startsWith("layout")||i.startsWith("onTap")||i.startsWith("onPan")||i.startsWith("onLayout")||Wde.has(i)}let oq=i=>!xw(i);function Hde(i){typeof i=="function"&&(oq=e=>e.startsWith("on")?!xw(e):i(e))}try{Hde(require("@emotion/is-prop-valid").default)}catch{}function qde(i,e,t){const n={};for(const r in i)r==="values"&&typeof i.values=="object"||(oq(r)||t===!0&&xw(r)||!e&&!xw(r)||i.draggable&&r.startsWith("onDrag"))&&(n[r]=i[r]);return n}const Kx=M.createContext({});function $de(i,e){if(Yx(i)){const{initial:t,animate:n}=i;return{initial:t===!1||xg(t)?t:void 0,animate:xg(n)?n:void 0}}return i.inherit!==!1?e:{}}function Gde(i){const{initial:e,animate:t}=$de(i,M.useContext(Kx));return M.useMemo(()=>({initial:e,animate:t}),[QO(e),QO(t)])}function QO(i){return Array.isArray(i)?i.join(" "):i}const Q5=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function aq(i,e,t){for(const n in e)!gr(e[n])&&!VH(n,t)&&(i[n]=e[n])}function Yde({transformTemplate:i},e){return M.useMemo(()=>{const t=Q5();return Y5(t,e,i),Object.assign({},t.vars,t.style)},[e])}function Kde(i,e){const t=i.style||{},n={};return aq(n,t,i),Object.assign(n,Yde(i,e)),n}function Xde(i,e){const t={},n=Kde(i,e);return i.drag&&i.dragListener!==!1&&(t.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=i.drag===!0?"none":`pan-${i.drag==="x"?"y":"x"}`),i.tabIndex===void 0&&(i.onTap||i.onTapStart||i.whileTap)&&(t.tabIndex=0),t.style=n,t}const lq=()=>({...Q5(),attrs:{}});function Qde(i,e,t,n){const r=M.useMemo(()=>{const s=lq();return jH(s,e,WH(n),i.transformTemplate,i.style),{...s.attrs,style:{...s.style}}},[e]);if(i.style){const s={};aq(s,i.style,i),r.style={...s,...r.style}}return r}const Zde=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];
vendor: 4,339 bytes, line 24
24function Z5(i){return typeof i!="string"||i.includes("-")?!1:!!(Zde.indexOf(i)>-1||/[A-Z]/u.test(i))}function Jde(i,e,t,{latestValues:n},r,s=!1,o){const l=(o??Z5(i)?Qde:Xde)(e,n,r,i),c=qde(e,typeof i=="string",s),d=i!==M.Fragment?{...c,...l,ref:t}:{},{children:f}=e,m=M.useMemo(()=>gr(f)?f.get():f,[f]);return M.createElement(i,{...d,children:m})}function efe({scrapeMotionValuesFromProps:i,createRenderState:e},t,n,r){return{latestValues:tfe(t,n,r,i),renderState:e()}}function tfe(i,e,t,n){const r={},s=n(i,{});for(const m in s)r[m]=l1(s[m]);let{initial:o,animate:a}=i;const l=Yx(i),c=IH(i);e&&c&&!l&&i.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let d=t?t.initial===!1:!1;d=d||o===!1;const f=d?a:o;if(f&&typeof f!="boolean"&&!Gx(f)){const m=Array.isArray(f)?f:[f];for(let p=0;p<m.length;p++){const g=V5(i,m[p]);if(g){const{transitionEnd:y,transition:v,...x}=g;for(const C in x){let D=x[C];if(Array.isArray(D)){const E=d?D.length-1:0;D=D[E]}D!==null&&(r[C]=D)}for(const C in y)r[C]=y[C]}}}return r}const cq=i=>(e,t)=>{const n=M.useContext(Kx),r=M.useContext($x),s=()=>efe(i,e,n,r);return t?s():C5(s)},nfe=cq({scrapeMotionValuesFromProps:K5,createRenderState:Q5}),ife=cq({scrapeMotionValuesFromProps:HH,createRenderState:lq}),rfe=Symbol.for("motionComponentSymbol");function sfe(i,e,t){const n=M.useRef(t);M.useInsertionEffect(()=>{n.current=t});const r=M.useRef(null);return M.useCallback(s=>{s&&i.onMount?.(s);const o=n.current;if(typeof o=="function")if(s){const a=o(s);typeof a=="function"&&(r.current=a)}else r.current?(r.current(),r.current=null):o(s);else o&&(o.current=s);e&&(s?e.mount(s):e.unmount())},[e])}const uq=M.createContext({});function Uf(i){return i&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,"current")}function ofe(i,e,t,n,r,s){const{visualElement:o}=M.useContext(Kx),a=M.useContext(rq),l=M.useContext($x),c=M.useContext(X5),d=c.reducedMotion,f=c.skipAnimations,m=M.useRef(null),p=M.useRef(!1);n=n||a.renderer,!m.current&&n&&(m.current=n(i,{visualState:e,parent:o,props:t,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:s}),p.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const g=m.current,y=M.useContext(uq);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&afe(m.current,t,r,y);const v=M.useRef(!1);M.useInsertionEffect(()=>{g&&v.current&&g.update(t,l)});const x=t[yH],C=M.useRef(!!x&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(x)&&window.MotionHasOptimisedAnimation?.(x));return IW(()=>{p.current=!0,g&&(v.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),C.current&&g.animationState&&g.animationState.animateChanges())}),M.useEffect(()=>{g&&(!C.current&&g.animationState&&g.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(x)}),C.current=!1),g.enteringChildren=void 0)}),g}function afe(i,e,t,n){const{layoutId:r,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=e;i.projection=new t(i.latestValues,e["data-framer-portal-id"]?void 0:dq(i.parent)),i.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!o||a&&Uf(a),visualElement:i,animationType:typeof s=="string"?s:"both",initialPromotionConfig:n,crossfade:d,layoutScroll:l,layoutRoot:c})}function dq(i){if(i)return i.options.allowProjection!==!1?i.projection:dq(i.parent)}function qD(i,{forwardMotionProps:e=!1,type:t}={},n,r){n&&zde(n);const s=t?t==="svg":Z5(i),o=s?ife:nfe;function a(c,d){let f;const m={...M.useContext(X5),...c,layoutId:lfe(c)},{isStatic:p}=m,g=Gde(c),y=o(c,p);if(!p&&typeof window<"u"){cfe();const v=ufe(m);f=v.MeasureLayout,g.visualElement=ofe(i,y,m,r,v.ProjectionNode,s)}return w.jsxs(Kx.Provider,{value:g,children:[f&&g.visualElement?w.jsx(f,{visualElement:g.visualElement,...m}):null,Jde(i,c,sfe(y,g.visualElement,d),y,p,e,s)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const l=M.forwardRef(a);return l[rfe]=i,l}function lfe({layoutId:i}){const e=M.useContext(_5).id;return e&&i!==void 0?e+"-"+i:i}function cfe(i,e){M.useContext(rq).strict}function ufe(i){const e=sq(),{drag:t,layout:n}=e;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(i)||n?.isEnabled(i)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}
vendor: 2,472 bytes, line 24
24function dfe(i,e){if(typeof Proxy>"u")return qD;const t=new Map,n=(s,o)=>qD(s,o,i,e),r=(s,o)=>n(s,o);return new Proxy(r,{get:(s,o)=>o==="create"?n:(t.has(o)||t.set(o,qD(o,void 0,i,e)),t.get(o))})}const ffe=(i,e)=>e.isSVG??Z5(i)?new Wue(e):new Mue(e,{allowProjection:i!==M.Fragment});class hfe extends Gc{constructor(e){super(e),e.animationState||(e.animationState=Yue(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Gx(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let mfe=0;class pfe extends Gc{constructor(){super(...arguments),this.id=mfe++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const gfe={animation:{Feature:hfe},exit:{Feature:pfe}};function p0(i){return{point:{x:i.pageX,y:i.pageY}}}const bfe=i=>e=>H5(e)&&i(e,p0(e));function Xp(i,e,t,n){return _g(i,e,bfe(t),n)}const fq=({current:i})=>i?i.ownerDocument.defaultView:null,ZO=(i,e)=>Math.abs(i-e);function yfe(i,e){const t=ZO(i.x,e.x),n=ZO(i.y,e.y);return Math.sqrt(t**2+n**2)}const JO=new Set(["auto","scroll"]);class hq{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=oy(this.lastRawMoveEventInfo,this.transformPagePoint));const p=$D(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=yfe(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:v}=p,{timestamp:x}=er;this.history.push({...v,timestamp:x});
vendor: 15,077 bytes, line 24
24const{onStart:C,onMove:D}=this.handlers;g||(C&&C(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),D&&D(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=oy(g,this.transformPagePoint),Nn.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:y,onSessionEnd:v,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=$D(p.type==="pointercancel"?this.lastMoveEventInfo:oy(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,C),v&&v(p,C)},!H5(e))return;this.dragSnapToOrigin=s,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const l=p0(e),c=oy(l,this.transformPagePoint),{point:d}=c,{timestamp:f}=er;this.history=[{...d,timestamp:f}];const{onSessionStart:m}=t;m&&m(e,$D(c,this.history)),this.removeListeners=f0(Xp(this.contextWindow,"pointermove",this.handlePointerMove),Xp(this.contextWindow,"pointerup",this.handlePointerUp),Xp(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let t=e.parentElement;for(;t;){const n=getComputedStyle(t);(JO.has(n.overflowX)||JO.has(n.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},s={x:r.x-t.x,y:r.y-t.y};s.x===0&&s.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(e,r),Nn.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Nc(this.updatePoint)}}function oy(i,e){return e?{point:e(i.point)}:i}function eN(i,e){return{x:i.x-e.x,y:i.y-e.y}}function $D({point:i},e){return{point:i,delta:eN(i,mq(e)),offset:eN(i,vfe(e)),velocity:wfe(e,.1)}}function vfe(i){return i[0]}function mq(i){return i[i.length-1]}function wfe(i,e){if(i.length<2)return{x:0,y:0};let t=i.length-1,n=null;const r=mq(i);for(;t>=0&&(n=i[t],!(r.timestamp-n.timestamp>Rs(e)));)t--;if(!n)return{x:0,y:0};n===i[0]&&i.length>2&&r.timestamp-n.timestamp>Rs(e)*2&&(n=i[1]);const s=so(r.timestamp-n.timestamp);if(s===0)return{x:0,y:0};const o={x:(r.x-n.x)/s,y:(r.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function xfe(i,{min:e,max:t},n){return e!==void 0&&i<e?i=n?Xn(e,i,n.min):Math.max(i,e):t!==void 0&&i>t&&(i=n?Xn(t,i,n.max):Math.min(i,t)),i}function tN(i,e,t){return{min:e!==void 0?i.min+e:void 0,max:t!==void 0?i.max+t-(i.max-i.min):void 0}}function _fe(i,{top:e,left:t,bottom:n,right:r}){return{x:tN(i.x,t,r),y:tN(i.y,e,n)}}function nN(i,e){let t=e.min-i.min,n=e.max-i.max;return e.max-e.min<i.max-i.min&&([t,n]=[n,t]),{min:t,max:n}}function Cfe(i,e){return{x:nN(i.x,e.x),y:nN(i.y,e.y)}}function Dfe(i,e){let t=.5;const n=Pr(i),r=Pr(e);return r>n?t=vg(e.min,e.max-n,i.min):n>r&&(t=vg(i.min,i.max-r,e.min)),Ea(0,1,t)}function Efe(i,e){const t={};return e.min!==void 0&&(t.min=e.min-i.min),e.max!==void 0&&(t.max=e.max-i.min),t}const Uk=.35;function Tfe(i=Uk){return i===!1?i=0:i===!0&&(i=Uk),{x:iN(i,"left","right"),y:iN(i,"top","bottom")}}function iN(i,e,t){return{min:rN(i,e),max:rN(i,t)}}function rN(i,e){return typeof i=="number"?i:i[e]||0}const Afe=new WeakMap;class kfe{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Oi(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=f=>{t&&this.snapToCursor(p0(f).point),this.stopAnimation()},o=(f,m)=>{const{drag:p,dragPropagation:g,onDragStart:y}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=nue(p),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),oa(x=>{let C=this.getAxisMotionValue(x).get()||0;if(ba.test(C)){const{projection:D}=this.visualElement;if(D&&D.layout){const E=D.layout.layoutBox[x];E&&(C=Pr(E)*(parseFloat(C)/100))}}this.originPoint[x]=C}),y&&Nn.update(()=>y(f,m),!1,!0),Ik(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:y,onDrag:v}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:x}=m;if(g&&this.currentDirection===null){this.currentDirection=Pfe(x),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",m.point,x),this.updateAxis("y",m.point,x),this.visualElement.render(),v&&Nn.update(()=>v(f,m),!1,!0)},l=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new hq(e,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:n,contextWindow:fq(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!r||!n)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&Nn.postRender(()=>a(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!ay(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=xfe(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Uf(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=_fe(n.layoutBox,e):this.constraints=!1,this.elastic=Tfe(t),r!==this.constraints&&!Uf(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&oa(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=Efe(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Uf(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=Iue(n,r.root,this.visualElement.getTransformPagePoint());let o=Cfe(r.layout.layoutBox,s);if(t){const a=t(kue(o));this.hasMutatedConstraints=!!a,a&&(o=NH(a))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=oa(d=>{if(!ay(d,t,this.currentDirection))return;let f=l&&l[d]||{};o&&(f={min:0,max:0});const m=r?200:1e6,p=r?40:1e7,g={type:"inertia",velocity:n?e[d]:0,bounceStiffness:m,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(c).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return Ik(this.visualElement,e),n.start(U5(e,n,0,t,this.visualElement,!1))}stopAnimation(){oa(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){oa(t=>{const{drag:n}=this.getProps();if(!ay(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(t);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[t],l=s.get()||0;s.set(e[t]-Xn(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Uf(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};oa(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();r[o]=Dfe({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),oa(o=>{if(!ay(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(Xn(l,c,r[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Afe.set(this.visualElement,this);const e=this.visualElement.current,t=Xp(e,"pointerdown",c=>{const{drag:d,dragListener:f=!0}=this.getProps(),m=c.target,p=m!==e&&lue(m);d&&f&&!p&&this.start(c)});let n;const r=()=>{const{dragConstraints:c}=this.getProps();Uf(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),n||(n=Sfe(e,c.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Nn.read(r);const a=_g(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(oa(f=>{const m=this.getAxisMotionValue(f);m&&(this.originPoint[f]+=c[f].translate,m.set(m.get()+c[f].translate))}),this.visualElement.render())}));return()=>{a(),t(),o(),l&&l(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=Uk,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function sN(i){let e=!0;return()=>{if(e){e=!1;return}i()}}function Sfe(i,e,t){const n=dO(i,sN(t)),r=dO(e,sN(t));return()=>{n(),r()}}function ay(i,e,t){return(e===!0||e===i)&&(t===null||t===i)}function Pfe(i,e=10){let t=null;return Math.abs(i.y)>e?t="y":Math.abs(i.x)>e&&(t="x"),t}class Ife extends Gc{constructor(e){super(e),this.removeGroupControls=ao,this.removeListeners=ao,this.controls=new kfe(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ao}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const GD=i=>(e,t)=>{i&&Nn.update(()=>i(e,t),!1,!0)};class Rfe extends Gc{constructor(){super(...arguments),this.removePointerDownListener=ao}onPointerDown(e){this.session=new hq(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:fq(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:GD(e),onStart:GD(t),onMove:GD(n),onEnd:(s,o)=>{delete this.session,r&&Nn.postRender(()=>r(s,o))}}}mount(){this.removePointerDownListener=Xp(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let YD=!1;class Ffe extends M.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:s}=e;s&&(t.group&&t.group.add(s),n&&n.register&&r&&n.register(s),YD&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),c1.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:s}=this.props,{projection:o}=n;return o&&(o.isPresent=s,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),YD=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==s?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||Nn.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),W5.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;YD=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function pq(i){const[e,t]=iq(),n=M.useContext(_5);return w.jsx(Ffe,{...i,layoutGroup:n,switchLayoutGroup:M.useContext(uq),isPresent:e,safeToRemove:t})}const Ofe={pan:{Feature:Rfe},drag:{Feature:Ife,ProjectionNode:nq,MeasureLayout:pq}};function oN(i,e,t){const{props:n}=i;i.animationState&&n.whileHover&&i.animationState.setActive("whileHover",t==="Start");const r="onHover"+t,s=n[r];s&&Nn.postRender(()=>s(e,p0(e)))}class Nfe extends Gc{mount(){const{current:e}=this.node;e&&(this.unmount=rue(e,(t,n)=>(oN(this.node,n,"Start"),r=>oN(this.node,r,"End"))))}unmount(){}}class Bfe extends Gc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=f0(_g(this.node.current,"focus",()=>this.onFocus()),_g(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function aN(i,e,t){const{props:n}=i;
24if(i.current instanceof HTMLButtonElement&&i.current.disabled)return;i.animationState&&n.whileTap&&i.animationState.setActive("whileTap",t==="Start");const r="onTap"+(t==="End"?"":t),s=n[r];s&&Nn.postRender(()=>s(e,p0(e)))}class Mfe extends Gc{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=uue(e,(r,s)=>(aN(this.node,s,"Start"),(o,{success:a})=>aN(this.node,o,a?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}}const Vk=new WeakMap,KD=new WeakMap,Lfe=i=>{const e=Vk.get(i.target);e&&e(i)},Ufe=i=>{i.forEach(Lfe)};function Vfe({root:i,...e}){const t=i||document;KD.has(t)||KD.set(t,{});const n=KD.get(t),r=JSON.stringify(e);return n[r]||(n[r]=new IntersectionObserver(Ufe,{root:i,...e})),n[r]}function jfe(i,e,t){const n=Vfe(e);return Vk.set(i,t),n.observe(i),()=>{Vk.delete(i),n.unobserve(i)}}const zfe={some:0,all:1};class Wfe extends Gc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:s}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:typeof r=="number"?r:zfe[r]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),m=c?d:f;m&&m(l)};return jfe(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(Hfe(e,t))&&this.startObserver()}unmount(){}}function Hfe({viewport:i={}},{viewport:e={}}={}){return t=>i[t]!==e[t]}const qfe={inView:{Feature:Wfe},tap:{Feature:Mfe},focus:{Feature:Bfe},hover:{Feature:Nfe}},$fe={layout:{ProjectionNode:nq,MeasureLayout:pq}},Gfe={...gfe,...qfe,...Ofe,...$fe},Yfe=dfe(Gfe,ffe),Kfe=()=>{const{isLoading:i,message:e}=Gz(t=>t.loader);return w.jsx(Vde,{children:i&&w.jsxs(Yfe.div,{id:"mxloader",initial:{opacity:0}
24,animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:[e&&w.jsx("div",{id:"mxmsg",style:{display:"block"},children:e}),w.jsx("div",{className:"progress",children:w.jsx("span",{})}),w.jsxs("div",{className:"spinner",children:[w.jsx("div",{className:"f1",children:"100"}),w.jsx("div",{className:"f2",children:"100"}),w.jsx("div",{className:"f3",children:"100"}),w.jsx("div",{className:"f4",children:"100"}),w.jsx("div",{className:"f5",children:"100"}),w.jsx("div",{className:"f6",children:"100"})]})]})})};function gq({field:i,formStateData:e,handleChange:t,formError:n,titleShow:r=!0,rowIndex:s=null}){const{modeType:o}=_t(),[a,l]=M.useState(!1),c=i?.type==="password",d=c?a?"text":"password":i?.type;return w.jsxs(w.Fragment,{children:[o!=="list"&&o!=="trash"&&r?w.jsxs("label",{children:[i?.title,i?.validate?.includes("required")&&w.jsx("em",{children:" *"}),i?.info&&w.jsx("span",{className:"info",children:i?.info})]}):null,w.jsxs("div",{style:{position:"relative"},children:[w.jsx("input",{type:d,name:i?.name,className:`${i?.attr?.class||""}`,style:i?.attr?.style,id:i?.attr?.id,title:i?.title,placeholder:i?.title,value:e?.[i?.name]??"",onChange:f=>{const m=f.target.value;(m.trim()!==""||m==="")&&(t(f,i),i?.cb&&i?.cb(f,s))},readOnly:i?.attrp?.readOnly||!1}),i?.ifShowPassword&&c&&w.jsx("button",{type:"button",onClick:()=>l(f=>!f),style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",background:"none",border:"none",cursor:"pointer",fontSize:"0.9rem",color:"#007BFF"},children:a?"Hide":"Show"})]}),n?.[i?.name]&&w.jsx("p",{className:"e",children:n?.[i?.name]})]})}function bq({field:i,formStateData:e,handleChange:t,formError:n,titleShow:r=!0,rowIndex:s=null}){const{modeType:o}=_t();return w.jsxs(w.Fragment,{children:[o!=="list"&&o!=="trash"&&r?w.jsxs("label",{children:[i?.title,i?.validate?.includes("required")&&w.jsx("em",{children:" *"}),i?.info&&w.jsx("span",{className:"info",children:i?.info})]}):w.jsx(w.Fragment,{}),w.jsx("ul",{title:i?.title,className:"mx-list",children:i?.options?.map((a,l)=>w.jsx("li",{children:w.jsxs("i",{className:"rdo",children:[a?.value,w.jsx("input",{type:i?.type,className:`${i?.attr?.class||""}`,style:i?.attr?.style?i?.attr?.style:void 0,id:i?.attr?.id?i?.attr?.id:void 0,name:s!==null?`${i.name}-${s}`:i.name,value:a?.id,checked:e[i?.name]==a?.id,onChange:c=>t(c,i)},l),w.jsx("em",{})]},l)},l))}),n?.[i?.name]&&w.jsx("p",{className:"e",children:n?.[i?.name]})]})}function yq({field:i,formStateData:e,handleChange:t,formError:n,titleShow:r=!0,rowIndex:s=null}){const{modeType:o}=_t();return w.jsxs(w.Fragment,{children:[o!=="list"&&o!=="trash"&&r?w.jsxs("label",{children:[i?.title,i?.validate?.includes("required")&&w.jsx("em",{children:" *"}),i?.info&&w.jsx("span",{className:"info",children:i?.info})]}):w.jsx(w.Fragment,{}),w.jsxs("ul",{className:"mx-list",title:i?.title,children:[!i?.options&&w.jsxs("li",{children:[w.jsxs("i",{className:"chk",children:[i?.title,w.jsx("input",{type:"checkbox",name:i?.name,className:`${i?.attr?.class||""} ${s!==null?`row_${i?.name}_${s}`:"s"}`,style:i?.attr?.style?i?.attr?.style:void 0,id:i?.attr?.id?i?.attr?.id:void 0,checked:e?.[i?.name]||!1,value:e?.[i?.name]||!1,onChange:a=>{t(a,i),i?.cb&&i?.cb(a,s)},disabled:!!i?.disabled}),w.jsx("em",{})]}),i?.htmlTitle&&w.jsx("span",{dangerouslySetInnerHTML:{__html:i?.htmlTitle}})]}),i?.options&&i?.options?.length&&i?.options?.map((a,l)=>w.jsx("li",{children:w.jsxs("i",{className:"rdo",children:[a?.value,w.jsx("input",{type:"checkbox",name:i?.name,className:`${i?.attr?.class||""}`,style:i?.attr?.style?i?.attr?.style:void 0,id:i?.attr?.id?i?.attr?.id:void 0,value:a?.id,checked:e?.[i?.name]?.includes(a?.id)||!1,onChange:c=>t(c,i)}),w.jsx("em",{})]},l)},l))]}),n?.[i?.name]&&w.jsx("p",{className:"e",children:n?.[i?.name]})]})}function vq({field:i,formStateData:e,handleChange:t,formError:n,titleShow:r=!0,rowIndex:s=null}){const{modeType:o}=_t(),a=i?.getRowOptions?i?.getRowOptions(s):i?.options||[];return w.jsxs(w.Fragment,{children:[o!=="list"&&o!=="trash"&&r?w.jsxs("label",{children:[i?.title,i?.validate?.includes("required")&&w.jsx("em",{children:" *"}),i?.info&&w.jsx("span",{className:"info",children:i?.info})]}):w.jsx(w.Fragment,{}),w.jsx("div",{className:"select-box",children:w.jsxs("select",{name:i?.name,value:e?.[i?.name]||"",onChange:l=>{t(l,i),i?.cb&&i?.cb(l,s)},style:i?.attr?.style?i?.attr?.style:void 0,className:`${i?.attr?.class||""}`,disabled:!!(i?.disabled||i?.attrp?.readOnly),children:[w.jsxs("option",{value:"",children:[" -- ",i?.title," -- "]}),a?.map((l,c)=>w.jsx("option",{value:l?.id,children:l?.value},c))]})}),n?.[i?.name]&&w.jsx("p",{className:"e",children:n?.[i?.name]})]})}function wq({field:i,formStateData:e,handleChange:t,formError:n,titleShow:r=!0}){const{modeType:s}=_t();return w.jsxs(w.Fragment,{children:[s!=="list"&&s!=="trash"&&r?w.jsxs("label",{children:[i?.title,i?.validate?.includes("required")&&w.jsx("em",{children:" *"}),i?.info&&w.jsx("span",{className:"info",children:i?.info})]}):w.jsx(w.Fragment,{}),w.jsx("textarea",{name:i?.name,title:i?.title,className:`${i?.attr?.class||""}`,style:i?.attr?.style?i?.attr?.style:void 0,id:i?.attr?.id?i?.attr?.id:void 0,placeholder:i?.title,value:e[i?.name]||"",onChange:o=>t(o,i),readOnly:i?.attrp?.readOnly||!1}),n?.[i?.name]&&w.jsx("p",{className:"e",children:n?.[i?.name]})]})}const Xfe={required:"fieldName is mandatory",requiredtrue:"fieldName is mandatory",domain:"fieldName is not a valid domain",email:"fieldName is not a valid email",digit:"fieldName is not a valid digit",maxlength:"fieldName - Maximum Length Must Be error",minNum:"fieldName - value must be greater than error",maxNum:"fieldName - Maximum Number Must Be error",minlength:"fieldName - Minimum Length Must Be error",mincheckedbox:"fieldName select must be at min error",maxcheckedbox:"fieldName select must be at max error",minfile:"fieldName select must be at minfile error",maxfile:"fieldName select must be at maxfile error",ext:"Not an accepted file type, should be error",maxsize:"fieldName select must be at file maxsize error",minsize:"fieldName select must be at file minsize error",password:"fieldName must contain at least one lowercase letter, one uppercase letter, one number, and one special character",equalTo:"fieldName not match to error",alpha:"fieldName should be alphabetic characters only",number:"fieldName should be number [0-9]",alphanum:"should be alphanumeric characters only.",url:"fieldName is not a valid url.",containtag:"fieldName is not a valid."},Qfe=i=>{const e=/^(?!:\/\/)([a-zA-Z0-9-_]+\.)+[a-zA-Z]{2,}$/;if(!i||i==="")return null;if(!e.test(i))return!0},Zfe=(i,e)=>{if(e?.type==="file")return i?.length?void 0:!0;if(!(e?.type==="checkbox"&&(e?.options?.length&&Array.isArray(i)&&i.length||!e?.options&&i))&&!(i!=null&&i!==""))return!0},Jfe=(i,e)=>{if(!(parseFloat(i?.toString()?.length)>=parseFloat(e)))return!0},ehe=(i,e)=>{if(!i||i=="")return null;if(!(parseFloat(i.toString().length)<=parseFloat(e)&&parseFloat(i.toString().length)>0))return!0},the=i=>{if(!i||i=="")return null;let e=!0;return/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(i)&&(e=!1),e?{email:!0}:null},nhe=i=>{const e=/[a-z]/,t=/[A-Z]/,n=/[0-9]/,r=/[!@#$%^&*()_+{}\[\]:;<>,.?~\\\-=/|]/;if(!(e.test(i)&&t.test(i)&&n.test(i)&&r.test(i)))return!0},ihe=i=>{if(!i||i=="")return null;if(!/^[a-z ._\-]+$/i.test(i))return!0},rhe=i=>{if(!i||i=="")return null;if(!/^\d+$/.test(i))return!0},she=(i,e)=>{if(!(i?.length>=e))return!0},ohe=(i,e)=>{if(i?.length>e)return!0},ahe=(i,e,t)=>{if(!(!t[e]||t[e]=="")&&i!==t[e])return!0},lhe=i=>{if(!i||i=="")return null;if(!/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(i))return!0};function che(i,e){let t;if(!i||i==""||!e||e=="")return;let n=e?.split("|");for(let r=0;r<i.length;r++)if(n?.includes(i[r]?.ext))t=void 0;else{t=!0;break}return t}const uhe=(i,e,t)=>{let n=e.validate.split(",");for(let r=0;r<n.length;r++){const[s,o]=n[r]?.split(":");switch(s){case"required":if(Zfe(i,e))return{validationType:s,fieldName:e?.title};break;case"alpha":if(ihe(i))return{validationType:s,fieldName:e?.title};break;case"digit":if(rhe(i))return{validationType:s,fieldName:e?.title};break;case"password":if(nhe(i))return{validationType:s,fieldName:e?.title};break;case"email":if(the(i))return{validationType:s,fieldName:e?.title,arg:o};break;case"minlength":if(Jfe(i,o))return{validationType:s,fieldName:e?.title,arg:o};break;case"maxlength":if(ehe(i,o))return{validationType:s,fieldName:e?.title,arg:o};break;case"mincheckedbox":if(she(i,o))return{validationType:s,fieldName:e?.title,arg:o};break;case"maxcheckedbox":if(ohe(i,o))return{validationType:s,fieldName:e?.title,arg:o};break;case"equalTo":if(ahe(i,o,t))return{validationType:s,fieldName:e?.title,arg:o};break;case"domainregex":if(Qfe(i))return{validationType:s,fieldName:e?.title,arg:o};break;case"number":if(lhe(i))return{validationType:s,fieldName:e?.title};break;case"ext":if(che(i,o))return{validationType:s,fieldName:e?.title,arg:o};break}}};function Xt(i,e,t,n){let r=!0;
24return Object.keys(i).forEach(s=>{const o=i[s];Array.isArray(o)&&o.forEach(a=>{if(a.type==="add-row-table"){const l=a.frmGroup;(e[l]||[]).forEach((d,f)=>{a.fields.forEach(m=>{const p=d[m.name],g=`${l}[${f}].${m.name}`;_w(p,m,t,n,e,g)||(r=!1)})})}else{const l=e[a.name];_w(l,a,t,n,e,a.name)||(r=!1)}})}),r}function _w(i,e,t,n,r,s){let o=!0;if(e&&e.validate){const a=uhe(i,e,r);let l;if(a){let c={fieldName:a?.fieldName,error:a?.arg};l=e?.msg?e?.msg:Xfe?.[a?.validationType],l=l?.replace(/\b\w+\b/g,d=>c?.[d]||d),o=!1}n(c=>{const d={...c};return l===void 0?delete d[s]:d[s]=l,d})}return o}function vt(){return vt=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},vt.apply(null,arguments)}function sd(i){"@babel/helpers - typeof";return sd=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},sd(i)}function dhe(i,e){if(sd(i)!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var n=t.call(i,e);if(sd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function xq(i){var e=dhe(i,"string");return sd(e)=="symbol"?e:e+""}function eh(i,e,t){return(e=xq(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function lN(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function ft(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?lN(Object(t),!0).forEach(function(n){eh(i,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):lN(Object(t)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(t,n))})}return i}function fhe(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function cN(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,xq(n.key),n)}}function hhe(i,e,t){return e&&cN(i.prototype,e),t&&cN(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}function jk(i,e){return jk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},jk(i,e)}function mhe(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),e&&jk(i,e)}function Cw(i){return Cw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Cw(i)}function _q(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_q=function(){return!!i})()}function phe(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function ghe(i,e){if(e&&(sd(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return phe(i)}function bhe(i){var e=_q();return function(){var t,n=Cw(i);if(e){var r=Cw(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return ghe(this,t)}}function zk(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,n=Array(e);t<e;t++)n[t]=i[t];return n}function yhe(i){if(Array.isArray(i))return zk(i)}function vhe(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function Cq(i,e){if(i){if(typeof i=="string")return zk(i,e);var t={}.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?zk(i,e):void 0}}function whe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
25In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J5(i){return yhe(i)||vhe(i)||Cq(i)||whe()}function xhe(i){if(i.sheet)return i.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===i)return document.styleSheets[e]}function _he(i){var e=document.createElement("style");return e.setAttribute("data-emotion",i.key),i.nonce!==void 0&&e.setAttribute("nonce",i.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var Che=(function(){function i(t){var n=this;this._insertTag=function(r){var s;n.tags.length===0?n.insertionPoint?s=n.insertionPoint.nextSibling:n.prepend?s=n.container.firstChild:s=n.before:s=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(r,
vendor: 4,286 bytes, line 25
25s),n.tags.push(r)},this.isSpeedy=t.speedy===void 0?!0:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=i.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(_he(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var s=xhe(r);try{s.insertRule(n,s.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){var r;return(r=n.parentNode)==null?void 0:r.removeChild(n)}),this.tags=[],this.ctr=0},i})(),dr="-ms-",Dw="-moz-",ln="-webkit-",Dq="comm",e3="rule",t3="decl",Dhe="@import",Eq="@keyframes",Ehe="@layer",The=Math.abs,Xx=String.fromCharCode,Ahe=Object.assign;function khe(i,e){return tr(i,0)^45?(((e<<2^tr(i,0))<<2^tr(i,1))<<2^tr(i,2))<<2^tr(i,3):0}function Tq(i){return i.trim()}function She(i,e){return(i=e.exec(i))?i[0]:i}function cn(i,e,t){return i.replace(e,t)}function Wk(i,e){return i.indexOf(e)}function tr(i,e){return i.charCodeAt(e)|0}function Cg(i,e,t){return i.slice(e,t)}function ua(i){return i.length}function n3(i){return i.length}function ly(i,e){return e.push(i),i}function Phe(i,e){return i.map(e).join("")}var Qx=1,Ch=1,Aq=0,cs=0,ki=0,em="";function Zx(i,e,t,n,r,s,o){return{value:i,root:e,parent:t,type:n,props:r,children:s,line:Qx,column:Ch,length:o,return:""}}function ip(i,e){return Ahe(Zx("",null,null,"",null,null,0),i,{length:-i.length},e)}function Ihe(){return ki}function Rhe(){return ki=cs>0?tr(em,--cs):0,Ch--,ki===10&&(Ch=1,Qx--),ki}function Fs(){return ki=cs<Aq?tr(em,cs++):0,Ch++,ki===10&&(Ch=1,Qx++),ki}function ya(){return tr(em,cs)}function u1(){return cs}function g0(i,e){return Cg(em,i,e)}function Dg(i){switch(i){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function kq(i){return Qx=Ch=1,Aq=ua(em=i),cs=0,[]}function Sq(i){return em="",i}function d1(i){return Tq(g0(cs-1,Hk(i===91?i+2:i===40?i+1:i)))}function Fhe(i){for(;(ki=ya())&&ki<33;)Fs();return Dg(i)>2||Dg(ki)>3?"":" "}function Ohe(i,e){for(;--e&&Fs()&&!(ki<48||ki>102||ki>57&&ki<65||ki>70&&ki<97););return g0(i,u1()+(e<6&&ya()==32&&Fs()==32))}function Hk(i){for(;Fs();)switch(ki){case i:return cs;case 34:case 39:i!==34&&i!==39&&Hk(ki);break;case 40:i===41&&Hk(i);break;case 92:Fs();break}return cs}function Nhe(i,e){for(;Fs()&&i+ki!==57;)if(i+ki===84&&ya()===47)break;return"/*"+g0(e,cs-1)+"*"+Xx(i===47?i:Fs())}function Bhe(i){for(;!Dg(ya());)Fs();return g0(i,cs)}function Mhe(i){return Sq(f1("",null,null,null,[""],i=kq(i),0,[0],i))}function f1(i,e,t,n,r,s,o,a,l){for(var c=0,d=0,f=o,m=0,p=0,g=0,y=1,v=1,x=1,C=0,D="",E=r,T=s,S=n,A=D;v;)switch(g=C,C=Fs()){case 40:if(g!=108&&tr(A,f-1)==58){Wk(A+=cn(d1(C),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:A+=d1(C);break;case 9:case 10:case 13:case 32:A+=Fhe(g);break;case 92:A+=Ohe(u1()-1,7);continue;case 47:switch(ya()){case 42:case 47:ly(Lhe(Nhe(Fs(),u1()),e,t),l);break;default:A+="/"}break;case 123*y:a[c++]=ua(A)*x;case 125*y:case 59:case 0:switch(C){case 0:case 125:v=0;case 59+d:x==-1&&(A=cn(A,/\f/g,"")),p>0&&ua(A)-f&&ly(p>32?dN(A+";",n,t,f-1):dN(cn(A," ","")+";",n,t,f-2),l);break;case 59:A+=";";default:if(ly(S=uN(A,e,t,c,d,r,a,D,E=[],T=[],f),s),C===123)if(d===0)f1(A,e,S,S,E,s,f,a,T);else switch(m===99&&tr(A,3)===110?100:m){case 100:case 108:case 109:case 115:f1(i,S,S,n&&ly(uN(i,S,S,0,0,r,a,D,r,E=[],f),T),r,T,f,a,n?E:T);break;default:f1(A,S,S,S,[""],T,0,a,T)}}c=d=p=0,y=x=1,D=A="",f=o;break;case 58:f=1+ua(A),p=g;default:if(y<1){if(C==123)--y;else if(C==125&&y++==0&&Rhe()==125)continue}switch(A+=Xx(C),C*y){case 38:x=d>0?1:(A+="\f",-1);break;case 44:a[c++]=(ua(A)-1)*x,x=1;break;case 64:ya()===45&&(A+=d1(Fs())),m=ya(),d=f=ua(D=A+=Bhe(u1())),C++;break;case 45:g===45&&ua(A)==2&&(y=0)}}return s}function uN(i,e,t,n,r,s,o,a,l,c,d){for(var f=r-1,m=r===0?s:[""],p=n3(m),g=0,y=0,v=0;g<n;++g)for(var x=0,C=Cg(i,f+1,f=The(y=o[g])),D=i;x<p;++x)(D=Tq(y>0?m[x]+" "+C:cn(C,/&\f/g,m[x])))&&(l[v++]=D);return Zx(i,e,t,r===0?e3:a,l,c,d)}
vendor: 6,657 bytes, line 25
25function Lhe(i,e,t){return Zx(i,e,t,Dq,Xx(Ihe()),Cg(i,2,-2),0)}function dN(i,e,t,n){return Zx(i,e,t,t3,Cg(i,0,n),Cg(i,n+1,-1),n)}function ah(i,e){for(var t="",n=n3(i),r=0;r<n;r++)t+=e(i[r],r,i,e)||"";return t}function Uhe(i,e,t,n){switch(i.type){case Ehe:if(i.children.length)break;case Dhe:case t3:return i.return=i.return||i.value;case Dq:return"";case Eq:return i.return=i.value+"{"+ah(i.children,n)+"}";case e3:i.value=i.props.join(",")}return ua(t=ah(i.children,n))?i.return=i.value+"{"+t+"}":""}function Vhe(i){var e=n3(i);return function(t,n,r,s){for(var o="",a=0;a<e;a++)o+=i[a](t,n,r,s)||"";return o}}function jhe(i){return function(e){e.root||(e=e.return)&&i(e)}}function zhe(i){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=i(t)),e[t]}}var Whe=function(e,t,n){for(var r=0,s=0;r=s,s=ya(),r===38&&s===12&&(t[n]=1),!Dg(s);)Fs();return g0(e,cs)},Hhe=function(e,t){var n=-1,r=44;do switch(Dg(r)){case 0:r===38&&ya()===12&&(t[n]=1),e[n]+=Whe(cs-1,t,n);break;case 2:e[n]+=d1(r);break;case 4:if(r===44){e[++n]=ya()===58?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Xx(r)}while(r=Fs());return e},qhe=function(e,t){return Sq(Hhe(kq(e),t))},fN=new WeakMap,$he=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!fN.get(n))&&!r){fN.set(e,!0);for(var s=[],o=qhe(t,s),a=n.props,l=0,c=0;l<o.length;l++)for(var d=0;d<a.length;d++,c++)e.props[c]=s[l]?o[l].replace(/&\f/g,a[d]):a[d]+" "+o[l]}}},Ghe=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};function Pq(i,e){switch(khe(i,e)){case 5103:return ln+"print-"+i+i;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ln+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return ln+i+Dw+i+dr+i+i;case 6828:case 4268:return ln+i+dr+i+i;case 6165:return ln+i+dr+"flex-"+i+i;case 5187:return ln+i+cn(i,/(\w+).+(:[^]+)/,ln+"box-$1$2"+dr+"flex-$1$2")+i;case 5443:return ln+i+dr+"flex-item-"+cn(i,/flex-|-self/,"")+i;case 4675:return ln+i+dr+"flex-line-pack"+cn(i,/align-content|flex-|-self/,"")+i;case 5548:return ln+i+dr+cn(i,"shrink","negative")+i;case 5292:return ln+i+dr+cn(i,"basis","preferred-size")+i;case 6060:return ln+"box-"+cn(i,"-grow","")+ln+i+dr+cn(i,"grow","positive")+i;case 4554:return ln+cn(i,/([^-])(transform)/g,"$1"+ln+"$2")+i;case 6187:return cn(cn(cn(i,/(zoom-|grab)/,ln+"$1"),/(image-set)/,ln+"$1"),i,"")+i;case 5495:case 3959:return cn(i,/(image-set\([^]*)/,ln+"$1$`$1");case 4968:return cn(cn(i,/(.+:)(flex-)?(.*)/,ln+"box-pack:$3"+dr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ln+i+i;case 4095:case 3583:case 4068:case 2532:return cn(i,/(.+)-inline(.+)/,ln+"$1$2")+i;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ua(i)-1-e>6)switch(tr(i,e+1)){case 109:if(tr(i,e+4)!==45)break;case 102:return cn(i,/(.+:)(.+)-([^]+)/,"$1"+ln+"$2-$3$1"+Dw+(tr(i,e+3)==108?"$3":"$2-$3"))+i;case 115:return~Wk(i,"stretch")?Pq(cn(i,"stretch","fill-available"),e)+i:i}break;case 4949:if(tr(i,e+1)!==115)break;case 6444:switch(tr(i,ua(i)-3-(~Wk(i,"!important")&&10))){case 107:return cn(i,":",":"+ln)+i;case 101:return cn(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ln+(tr(i,14)===45?"inline-":"")+"box$3$1"+ln+"$2$3$1"+dr+"$2box$3")+i}break;case 5936:switch(tr(i,e+11)){case 114:return ln+i+dr+cn(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return ln+i+dr+cn(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return ln+i+dr+cn(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return ln+i+dr+i+i}return i}var Yhe=function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case t3:e.return=Pq(e.value,e.length);break;case Eq:return ah([ip(e,{value:cn(e.value,"@","@"+ln)})],r);case e3:if(e.length)return Phe(e.props,function(s){switch(She(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ah([ip(e,{props:[cn(s,/:(read-\w+)/,":"+Dw+"$1")]})],r);case"::placeholder":return ah([ip(e,{props:[cn(s,/:(plac\w+)/,":"+ln+"input-$1")]}),ip(e,{props:[cn(s,/:(plac\w+)/,":"+Dw+"$1")]}),ip(e,{props:[cn(s,/:(plac\w+)/,dr+"input-$1")]})],r)}return""})}},Khe=[Yhe],Xhe=function(e){var t=e.key;if(t==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(y){var v=y.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var r=e.stylisPlugins||Khe,s={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(y){for(var v=y.getAttribute("data-emotion").split(" "),x=1;x<v.length;x++)s[v[x]]=!0;a.push(y)});var l,c=[$he,Ghe];{var d,f=[Uhe,jhe(function(y){d.insert(y)})],m=Vhe(c.concat(r,f)),p=function(v){return ah(Mhe(v),m)};l=function(v,x,C,D){d=C,p(v?v+"{"+x.styles+"}":x.styles),D&&(g.inserted[x.name]=!0)}}var g={key:t,sheet:new Che({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:l};return g.sheet.hydrate(a),g},XD={exports:{}},fn={};var hN;function Qhe(){if(hN)return fn;hN=1;var i=typeof Symbol=="function"&&Symbol.for,e=i?Symbol.for("react.element"):60103,t=i?Symbol.for("react.portal"):60106,n=i?Symbol.for("react.fragment"):60107,r=i?Symbol.for("react.strict_mode"):60108,s=i?Symbol.for("react.profiler"):60114,o=i?Symbol.for("react.provider"):60109,a=i?Symbol.for("react.context"):60110,l=i?Symbol.for("react.async_mode"):60111,c=i?Symbol.for("react.concurrent_mode"):60111,d=i?Symbol.for("react.forward_ref"):60112,f=i?Symbol.for("react.suspense"):60113,m=i?Symbol.for("react.suspense_list"):60120,p=i?Symbol.for("react.memo"):60115,g=i?Symbol.for("react.lazy"):60116,y=i?Symbol.for("react.block"):60121,v=i?Symbol.for("react.fundamental"):60117,x=i?Symbol.for("react.responder"):60118,C=i?Symbol.for("react.scope"):60119;function D(T){if(typeof T=="object"&&T!==null){var S=T.$$typeof;switch(S){case e:switch(T=T.type,T){case l:case c:case n:case s:case r:case f:return T;default:switch(T=T&&T.$$typeof,T){case a:case d:case g:case p:case o:return T;default:return S}}case t:return S}}}function E(T){return D(T)===c}return fn.AsyncMode=l,fn.ConcurrentMode=c,fn.ContextConsumer=a,fn.ContextProvider=o,fn.Element=e,fn.ForwardRef=d,fn.Fragment=n,fn.Lazy=g,fn.Memo=p,fn.Portal=t,fn.Profiler=s,fn.StrictMode=r,f
25n.Suspense=f,fn.isAsyncMode=function(T){return E(T)||D(T)===l},fn.isConcurrentMode=E,fn.isContextConsumer=function(T){return D(T)===a},fn.isContextProvider=function(T){return D(T)===o},fn.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===e},fn.isForwardRef=function(T){return D(T)===d},fn.isFragment=function(T){return D(T)===n},fn.isLazy=function(T){return D(T)===g},fn.isMemo=function(T){return D(T)===p},fn.isPortal=function(T){return D(T)===t},fn.isProfiler=function(T){return D(T)===s},fn.isStrictMode=function(T){return D(T)===r},fn.isSuspense=function(T){return D(T)===f},fn.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===n||T===c||T===s||T===r||T===f||T===m||typeof T=="object"&&T!==null&&(T.$$typeof===g||T.$$typeof===p||T.$$typeof===o||T.$$typeof===a||T.$$typeof===d||T.$$typeof===v||T.$$typeof===x||T.$$typeof===C||T.$$typeof===y)},fn.typeOf=D,fn}var mN;function Zhe(){return mN||(mN=1,XD.exports=Qhe()),XD.exports}var QD,pN;function Jhe(){if(pN)return QD;pN=1;var i=Zhe(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},t={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[i.ForwardRef]=n,s[i.Memo]=r;function o(g){return i.isMemo(g)?r:s[g.$$typeof]||e}var a=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;function p(g,y,v){if(typeof y!="string"){if(m){var x=f(y);x&&x!==m&&p(g,x,v)}var C=l(y);c&&(C=C.concat(c(y)));for(var D=o(g),E=o(y),T=0;T<C.length;++T){var S=C[T];if(!t[S]&&!(v&&v[S])&&!(E&&E[S])&&!(D&&D[S])){var A=d(y,S);try{a(g,S,A)}catch{}}}}return g}return QD=p,QD}Jhe();var eme=!0;function tme(i,e,t){var n="";return t.split(" ").forEach(function(r){i[r]!==void 0?e.push(i[r]+";"):r&&(n+=r+" ")}),n}var Iq=function(e,t,n){var r=e.key+"-"+t.name;(n===!1||eme===!1)&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},nme=function(e,t,n){Iq(e,t,n);var r=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var s=t;do e.insert(t===s?"."+r:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function ime(i){for(var e=0,t,n=0,r=i.length;r>=4;++n,r-=4)t=i.charCodeAt(n)&255|(i.charCodeAt(++n)&255)<<8|(i.charCodeAt(++n)&255)<<16|(i.charCodeAt(++n)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,e=(t&65535)*1540483477+((t>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(i.charCodeAt(n+2)&255)<<16;case 2:e^=(i.charCodeAt(n+1)&255)<<8;case 1:e^=i.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var rme={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},sme=/[A-Z]|^ms/g,ome=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Rq=function(e){return e.charCodeAt(1)===45},gN=function(e){return e!=null&&typeof e!="boolean"},ZD=zhe(function(i){return Rq(i)?i:i.replace(sme,"-$&").toLowerCase()}),bN=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(ome,function(n,r,s){return da={name:r,styles:s,next:da},r})}return rme[e]!==1&&!Rq(e)&&typeof t=="number"&&t!==0?t+"px":t};function Eg(i,e,t){if(t==null)return"";var n=t;if(n.__emotion_styles!==void 0)return n;switch(typeof t){case"boolean":return"";case"object":{var r=t;if(r.anim===1)return da={name:r.name,styles:r.styles,next:da},r.name;var s=t;if(s.styles!==void 0){var o=s.next;if(o!==void 0)for(;o!==void 0;)da={name:o.name,styles:o.styles,next:da},o=o.next;var a=s.styles+";";return a}return ame(i,e,t)}case"function":{if(i!==void 0){var l=da,c=t(i);return da=l,Eg(i,e,c)}break}}var d=t;return d}function ame(i,e,t){var n="";if(Array.isArray(t))for(var r=0;r<t.length;r++)n+=Eg(i,e,t[r])+";";else for(var s in t){var o=t[s];if(typeof o!="object"){var a=o;gN(a)&&(n+=ZD(s)+":"+bN(s,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&e==null)for(var l=0;l<o.length;l++)gN(o[l])&&(n+=ZD(s)+":"+bN(s,o[l])+";");else{var c=Eg(i,e,o);switch(s){case"animation":case"animationName":{n+=ZD(s)+":"+c+";";break}default:n+=s+"{"+c+"}"}}}return n}var yN=/label:\s*([^\s;{]+)\s*(;|$)/g,da;function Fq(i,e,t){if(i.length===1&&typeof i[0]=="object"&&i[0]!==null&&i[0].styles!==void 0)return i[0];var n=!0,r="";da=void 0;var s=i[0];if(s==null||s.raw===void 0)n=!1,r+=Eg(t,e,s);else{var o=s;r+=o[0]}for(var a=1;a<i.length;a++)if(r+=Eg(t,e,i[a]),n){var l=s;r+=l[a]}yN.lastIndex=0;for(var c="",d;(d=yN.exec(r))!==null;)c+="-"+d[1];var f=ime(r)+c;return{name:f,styles:r,next:da}}var lme=function(e){return e()},cme=nw.useInsertionEffect?nw.useInsertionEffect:!1,ume=cme||lme,Oq=M.createContext(typeof HTMLElement<"u"?Xhe({key:"css"}):null);Oq.Provider;var dme=function(e){return M.forwardRef(function(t,n){var r=M.useContext(Oq);return e(t,r,n)})},fme=M.createContext({}),i3={}.hasOwnProperty,qk="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",hme=function(e,t){var n={};for(var r in t)i3.call(t,r)&&(n[r]=t[r]);return n[qk]=e,n},mme=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Iq(t,n,r),ume(function(){return nme(t,n,r)}),null},pme=dme(function(i,e,t){var n=i.css;typeof n=="string"&&e.registered[n]!==void 0&&(n=e.registered[n]);var r=i[qk],s=[n],o="";typeof i.className=="string"?o=tme(e.registered,s,i.className):i.className!=null&&(o=i.className+" ");var a=Fq(s,void 0,M.useContext(fme));o+=e.key+"-"+a.name;var l={};for(var c in i)i3.call(i,c)&&c!=="css"&&c!==qk&&(l[c]=i[c]);return l.className=o,t&&(l.ref=t),M.createElement(M.Fragment,null,M.createElement(mme,{cache:e,serialized:a,isStringTag:typeof r=="string"}),M.createElement(r,l))}),gme=pme,pt=function(e,t){var n=arguments;if(t==null||!i3.call(t,"css"))return M.createElement.apply(void 0,n);var r=n.length,s=new Array(r);s[0]=gme,s[1]=hme(e,t);for(var o=2;o<r;o++)s[o]=n[o];return M.createElement.apply(null,s)};(function(i){var e;e||(e=i.JSX||(i.JSX={}))})(pt||(pt={}));function r3(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return Fq(e)}function bme(){var i=r3.apply(void 0,arguments),e="animation-"+i.name;return{name:e,styles:"@keyframes "+e+"{"+i.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function yme(i){if(Array.isArray(i))return i}function vme(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var n,r,s,o,a=[],l=!0,c=!1;try{if(s=(t=t.call(i)).next,e===0){if(Object(t)!==t)return;l=!1}else for(;!(l=(n=s.call(t)).done)&&(a.push(n.value),a.length!==e);l=!0);}
vendor: 16,576 bytes, lines 25-26
25catch(d){c=!0,r=d}finally{try{if(!l&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}function wme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
26In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vi(i,e){return yme(i)||vme(i,e)||Cq(i,e)||wme()}function xme(i,e){if(i==null)return{};var t={};for(var n in i)if({}.hasOwnProperty.call(i,n)){if(e.indexOf(n)!==-1)continue;t[n]=i[n]}return t}function Ra(i,e){if(i==null)return{};var t,n,r=xme(i,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);for(n=0;n<s.length;n++)t=s[n],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(i,t)&&(r[t]=i[t])}return r}function _me(i,e){return e||(e=i.slice(0)),Object.freeze(Object.defineProperties(i,{raw:{value:Object.freeze(e)}}))}const Dh=Math.min,Zu=Math.max,Ew=Math.round,cy=Math.floor,va=i=>({x:i,y:i}),Cme={left:"right",right:"left",bottom:"top",top:"bottom"},Dme={start:"end",end:"start"};function Eme(i,e,t){return Zu(i,Dh(e,t))}function Jx(i,e){return typeof i=="function"?i(e):i}function Eh(i){return i.split("-")[0]}function b0(i){return i.split("-")[1]}function Tme(i){return i==="x"?"y":"x"}function s3(i){return i==="y"?"height":"width"}const Ame=new Set(["top","bottom"]);function qu(i){return Ame.has(Eh(i))?"y":"x"}function o3(i){return Tme(qu(i))}function kme(i,e,t){t===void 0&&(t=!1);const n=b0(i),r=o3(i),s=s3(r);let o=r==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Tw(o)),[o,Tw(o)]}function Sme(i){const e=Tw(i);return[$k(i),e,$k(e)]}function $k(i){return i.replace(/start|end/g,e=>Dme[e])}const vN=["left","right"],wN=["right","left"],Pme=["top","bottom"],Ime=["bottom","top"];function Rme(i,e,t){switch(i){case"top":case"bottom":return t?e?wN:vN:e?vN:wN;case"left":case"right":return e?Pme:Ime;default:return[]}}function Fme(i,e,t,n){const r=b0(i);let s=Rme(Eh(i),t==="start",n);return r&&(s=s.map(o=>o+"-"+r),e&&(s=s.concat(s.map($k)))),s}function Tw(i){return i.replace(/left|right|bottom|top/g,e=>Cme[e])}function Ome(i){return{top:0,right:0,bottom:0,left:0,...i}}function Nq(i){return typeof i!="number"?Ome(i):{top:i,right:i,bottom:i,left:i}}function Aw(i){const{x:e,y:t,width:n,height:r}=i;return{width:n,height:r,top:t,left:e,right:e+n,bottom:t+r,x:e,y:t}}function xN(i,e,t){let{reference:n,floating:r}=i;const s=qu(e),o=o3(e),a=s3(o),l=Eh(e),c=s==="y",d=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2,m=n[a]/2-r[a]/2;let p;switch(l){case"top":p={x:d,y:n.y-r.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-r.width,y:f};break;default:p={x:n.x,y:n.y}}switch(b0(e)){case"start":p[o]-=m*(t&&c?-1:1);break;case"end":p[o]+=m*(t&&c?-1:1);break}return p}const Nme=async(i,e,t)=>{const{placement:n="bottom",strategy:r="absolute",middleware:s=[],platform:o}=t,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:i,floating:e,strategy:r}),{x:d,y:f}=xN(c,n,l),m=n,p={},g=0;for(let y=0;y<a.length;y++){const{name:v,fn:x}=a[y],{x:C,y:D,data:E,reset:T}=await x({x:d,y:f,initialPlacement:n,placement:m,strategy:r,middlewareData:p,rects:c,platform:o,elements:{reference:i,floating:e}});d=C??d,f=D??f,p={...p,[v]:{...p[v],...E}},T&&g<=50&&(g++,typeof T=="object"&&(T.placement&&(m=T.placement),T.rects&&(c=T.rects===!0?await o.getElementRects({reference:i,floating:e,strategy:r}):T.rects),{x:d,y:f}=xN(c,m,l)),y=-1)}return{x:d,y:f,placement:m,strategy:r,middlewareData:p}};async function Bme(i,e){var t;e===void 0&&(e={});const{x:n,y:r,platform:s,rects:o,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=Jx(e,i),g=Nq(p),v=a[m?f==="floating"?"reference":"floating":f],x=Aw(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(v)))==null||t?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),C=f==="floating"?{x:n,y:r,width:o.floating.width,height:o.floating.height}:o.reference,D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(D))?await(s.getScale==null?void 0:s.getScale(D))||{x:1,y:1}:{x:1,y:1},T=Aw(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:D,strategy:l}):C);return{top:(x.top-T.top+g.top)/E.y,bottom:(T.bottom-x.bottom+g.bottom)/E.y,left:(x.left-T.left+g.left)/E.x,right:(T.right-x.right+g.right)/E.x}}const Mme=i=>({name:"arrow",options:i,async fn(e){const{x:t,y:n,placement:r,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:d=0}=Jx(i,e)||{};if(c==null)return{};const f=Nq(d),m={x:t,y:n},p=o3(r),g=s3(p),y=await o.getDimensions(c),v=p==="y",x=v?"top":"left",C=v?"bottom":"right",D=v?"clientHeight":"clientWidth",E=s.reference[g]+s.reference[p]-m[p]-s.floating[g],T=m[p]-s.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let A=S?S[D]:0;(!A||!await(o.isElement==null?void 0:o.isElement(S)))&&(A=a.floating[D]||s.floating[g]);const I=E/2-T/2,R=A/2-y[g]/2-1,O=Dh(f[x],R),j=Dh(f[C],R),B=O,U=A-y[g]-j,F=A/2-y[g]/2+I,H=Eme(B,F,U),L=!l.arrow&&b0(r)!=null&&F!==H&&s.reference[g]/2-(F<B?O:j)-y[g]/2<0,W=L?F<B?F-B:F-U:0;return{[p]:m[p]+W,data:{[p]:H,centerOffset:F-H-W,...L&&{alignmentOffset:W}},reset:L}}}),Lme=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(e){var t,n;const{placement:r,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...v}=Jx(i,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const x=Eh(r),C=qu(a),D=Eh(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=m||(D||!y?[Tw(a)]:Sme(a)),S=g!=="none";!m&&S&&T.push(...Fme(a,y,g,E));const A=[a,...T],I=await Bme(e,v),R=[];let O=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&R.push(I[x]),f){const F=kme(r,o,E);R.push(I[F[0]],I[F[1]])}if(O=[...O,{placement:r,overflows:R}],!R.every(F=>F<=0)){var j,B;const F=(((j=s.flip)==null?void 0:j.index)||0)+1,H=A[F];if(H&&(!(f==="alignment"?C!==qu(H):!1)||O.every(G=>qu(G.placement)===C?G.overflows[0]>0:!0)))return{data:{index:F,overflows:O},reset:{placement:H}};let L=(B=O.filter(W=>W.overflows[0]<=0).sort((W,G)=>W.overflows[1]-G.overflows[1])[0])==null?void 0:B.placement;if(!L)switch(p){case"bestFit":{var U;const W=(U=O.filter(G=>{if(S){const Y=qu(G.placement);return Y===C||Y==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(Y=>Y>0).reduce((Y,ie)=>Y+ie,0)]).sort((G,Y)=>G[1]-Y[1])[0])==null?void 0:U[0];W&&(L=W);break}case"initialPlacement":L=a;break}if(r!==L)return{reset:{placement:L}}}return{}}}},Ume=new Set(["left","top"]);async function Vme(i,e){const{placement:t,platform:n,elements:r}=i,s=await(n.isRTL==null?void 0:n.isRTL(r.floating)),o=Eh(t),a=b0(t),l=qu(t)==="y",c=Ume.has(o)?-1:1,d=s&&l?-1:1,f=Jx(e,i);let{mainAxis:m,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),l?{x:p*d,y:m*c}:{x:m*c,y:p*d}}const jme=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(e){var t,n;const{x:r,y:s,placement:o,middlewareData:a}=e,l=await Vme(e,i);return o===((t=a.offset)==null?void 0:t.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:o}}}}};function e_(){return typeof window<"u"}function tm(i){return Bq(i)?(i.nodeName||"").toLowerCase():"#document"}function Os(i){var e;return(i==null||(e=i.ownerDocument)==null?void 0:e.defaultView)||window}function Fa(i){var e;return(e=(Bq(i)?i.ownerDocument:i.document)||window.document)==null?void 0:e.documentElement}function Bq(i){return e_()?i instanceof Node||i instanceof Os(i).Node:!1}function Ir(i){return e_()?i instanceof Element||i instanceof Os(i).Element:!1}function Ta(i){return e_()?i instanceof HTMLElement||i instanceof Os(i).HTMLElement:!1}function _N(i){return!e_()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof Os(i).ShadowRoot}const zme=new Set(["inline","contents"]);function y0(i){const{overflow:e,overflowX:t,overflowY:n,display:r}=uo(i);return/auto|scroll|overlay|hidden|clip/.test(e+n+t)&&!zme.has(r)}const Wme=new Set(["table","td","th"]);function Hme(i){return Wme.has(tm(i))}const qme=[":popover-open",":modal"];function t_(i){return qme.some(e=>{try{return i.matches(e)}catch{return!1}})}const $me=["transform","translate","scale","rotate","perspective"],Gme=["transform","translate","scale","rotate","perspective","filter"],Yme=["paint","layout","strict","content"];function a3(i){const e=l3(),t=Ir(i)?uo(i):i;return $me.some(n=>t[n]?t[n]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||Gme.some(n=>(t.willChange||"").includes(n))||Yme.some(n=>(t.contain||"").includes(n))}function Kme(i){let e=Bc(i);for(;Ta(e)&&!Th(e);){if(a3(e))return e;if(t_(e))return null;e=Bc(e)}return null}function l3(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Xme=new Set(["html","body","#document"]);function Th(i){return Xme.has(tm(i))}function uo(i){return Os(i).getComputedStyle(i)}function n_(i){return Ir(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function Bc(i){if(tm(i)==="html")return i;const e=i.assignedSlot||i.parentNode||_N(i)&&i.host||Fa(i);return _N(e)?e.host:e}function Mq(i){const e=Bc(i);return Th(e)?i.ownerDocument?i.ownerDocument.body:i.body:Ta(e)&&y0(e)?e:Mq(e)}function Tg(i,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=Mq(i),s=r===((n=i.ownerDocument)==null?void 0:n.body),o=Os(r);if(s){const a=Gk(o);return e.concat(o,o.visualViewport||[],y0(r)?r:[],a&&t?Tg(a):[])}return e.concat(r,Tg(r,[],t))}function Gk(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function Lq(i){const e=uo(i);let t=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const r=Ta(i),s=r?i.offsetWidth:t,o=r?i.offsetHeight:n,a=Ew(t)!==s||Ew(n)!==o;return a&&(t=s,n=o),{width:t,height:n,$:a}}function c3(i){return Ir(i)?i:i.contextElement}function lh(i){const e=c3(i);if(!Ta(e))return va(1);const t=e.getBoundingClientRect(),{width:n,height:r,$:s}=Lq(e);let o=(s?Ew(t.width):t.width)/n,a=(s?Ew(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Qme=va(0);function Uq(i){const e=Os(i);return!l3()||!e.visualViewport?Qme:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Zme(i,e,t){return e===void 0&&(e=!1),!t||e&&t!==Os(i)?!1:e}function od(i,e,t,n){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=i.getBoundingClientRect(),s=c3(i);let o=va(1);e&&(n?Ir(n)&&(o=lh(n)):o=lh(i));const a=Zme(s,t,n)?Uq(s):va(0);let l=(r.left+a.x)/o.x,c=(r.top+a.y)/o.y,d=r.width/o.x,f=r.height/o.y;if(s){const m=Os(s),p=n&&Ir(n)?Os(n):n;let g=m,y=Gk(g);for(;y&&n&&p!==g;){const v=lh(y),x=y.getBoundingClientRect(),C=uo(y),D=x.left+(y.clientLeft+parseFloat(C.paddingLeft))*v.x,E=x.top+(y.clientTop+parseFloat(C.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,f*=v.y,l+=D,c+=E,g=Os(y),y=Gk(g)}}return Aw({width:d,height:f,x:l,y:c})}function i_(i,e){const t=n_(i).scrollLeft;return e?e.left+t:od(Fa(i)).left+t}function Vq(i,e){const t=i.getBoundingClientRect(),n=t.left+e.scrollLeft-i_(i,t),r=t.top+e.scrollTop;return{x:n,y:r}}function Jme(i){let{elements:e,rect:t,offsetParent:n,strategy:r}=i;const s=r==="fixed",o=Fa(n),a=e?t_(e.floating):!1;if(n===o||a&&s)return t;let l={scrollLeft:0,scrollTop:0},c=va(1);const d=va(0),f=Ta(n);if((f||!f&&!s)&&((tm(n)!=="body"||y0(o))&&(l=n_(n)),Ta(n))){const p=od(n);c=lh(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}const m=o&&!f&&!s?Vq(o,l):va(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:t.y*c.y-l.scrollTop*c.y+d.y+m.y}}function epe(i){return Array.from(i.getClientRects())}function tpe(i){const e=Fa(i),t=n_(i),n=i.ownerDocument.body,r=Zu(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Zu(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-t.scrollLeft+i_(i);const a=-t.scrollTop;return uo(n).direction==="rtl"&&(o+=Zu(e.clientWidth,n.clientWidth)-r),{width:r,height:s,x:o,y:a}}const CN=25;function npe(i,e){const t=Os(i),n=Fa(i),r=t.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;const d=l3();(!d||d&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}const c=i_(n);if(c<=0){const d=n.ownerDocument,f=d.body,m=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(n.clientWidth-f.clientWidth-p);g<=CN&&(s-=g)}else c<=CN&&(s+=c);return{width:s,height:o,x:a,y:l}}const ipe=new Set(["absolute","fixed"]);function rpe(i,e){const t=od(i,!0,e==="fixed"),n=t.top+i.clientTop,r=t.left+i.clientLeft,s=Ta(i)?lh(i):va(1),o=i.clientWidth*s.x,a=i.clientHeight*s.y,l=r*s.x,c=n*s.y;return{width:o,height:a,x:l,y:c}}function DN(i,e,t){let n;if(e==="viewport")n=npe(i,t);else if(e==="document")n=tpe(Fa(i));else if(Ir(e))n=rpe(e,t);else{const r=Uq(i);n={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Aw(n)}function jq(i,e){const t=Bc(i);return t===e||!Ir(t)||Th(t)?!1:uo(t).position==="fixed"||jq(t,e)}function spe(i,e){const t=e.get(i);if(t)return t;let n=Tg(i,[],!1).filter(a=>Ir(a)&&tm(a)!=="body"),r=null;const s=uo(i).position==="fixed";let o=s?Bc(i):i;for(;Ir(o)&&!Th(o);){const a=uo(o),l=a3(o);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&ipe.has(r.position)||y0(o)&&!l&&jq(i,o))?n=n.filter(d=>d!==o):r=a,o=Bc(o)}return e.set(i,n),n}function ope(i){let{element:e,boundary:t,rootBoundary:n,strategy:r}=i;const o=[...t==="clippingAncestors"?t_(e)?[]:spe(e,this._c):[].concat(t),n],a=o[0],l=o.reduce((c,d)=>{const f=DN(e,d,r);return c.top=Zu(f.top,c.top),c.right=Dh(f.right,c.right),c.bottom=Dh(f.bottom,c.bottom),c.left=Zu(f.left,c.left),c},DN(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ape(i){const{width:e,height:t}=Lq(i);return{width:e,height:t}}function lpe(i,e,t){const n=Ta(e),r=Fa(e),s=t==="fixed",o=od(i,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=va(0);function c(){l.x=i_(r)}if(n||!n&&!s)if((tm(e)!=="body"||y0(r))&&(a=n_(e)),n){const p=od(e,!0,s,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else r&&c();s&&!n&&r&&c();const d=r&&!n&&!s?Vq(r,a):va(0),f=o.left+a.scrollLeft-l.x-d.x,m=o.top+a.scrollTop-l.y-d.y;return{x:f,y:m,width:o.width,height:o.height}}function JD(i){return uo(i).position==="static"}function EN(i,e){if(!Ta(i)||uo(i).position==="fixed")return null;if(e)return e(i);let t=i.offsetParent;return Fa(i)===t&&(t=t.ownerDocument.body),t}function zq(i,e){const t=Os(i);if(t_(i))return t;if(!Ta(i)){let r=Bc(i);for(;r&&!Th(r);){if(Ir(r)&&!JD(r))return r;r=Bc(r)}return t}let n=EN(i,e);for(;n&&Hme(n)&&JD(n);)n=EN(n,e);return n&&Th(n)&&JD(n)&&!a3(n)?t:n||Kme(i)||t}const cpe=async function(i){const e=this.getOffsetParent||zq,t=this.getDimensions,n=await t(i.floating);return{reference:lpe(i.reference,await e(i.floating),i.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function upe(i){return uo(i).direction==="rtl"}const dpe={convertOffsetParentRelativeRectToViewportRelativeRect:Jme,getDocumentElement:Fa,getClippingRect:ope,getOffsetParent:zq,getElementRects:cpe,getClientRects:epe,getDimensions:ape,getScale:lh,isElement:Ir,isRTL:upe};function Wq(i,e){return i.x===e.x&&i.y===e.y&&i.width===e.width&&i.height===e.height}function fpe(i,e){let t=null,n;const r=Fa(i);function s(){var a;clearTimeout(n),(a=t)==null||a.disconnect(),t=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=i.getBoundingClientRect(),{left:d,top:f,width:m,height:p}=c;if(a||e(),!m||!p)return;const g=cy(f),y=cy(r.clientWidth-(d+m)),v=cy(r.clientHeight-(f+p)),x=cy(d),D={rootMargin:-g+"px "+-y+"px "+-v+"px "+-x+"px",threshold:Zu(0,Dh(1,l))||1};let E=!0;function T(S){const A=S[0].intersectionRatio;if(A!==l){if(!E)return o();A?o(!1,A):n=setTimeout(()=>{o(!1,1e-7)},1e3)}A===1&&!Wq(c,i.getBoundingClientRect())&&o(),E=!1}try{t=new IntersectionObserver(T,{...D,root:r.ownerDocument})}catch{t=new IntersectionObserver(T,D)}t.observe(i)}return o(!0),s}
26function Hq(i,e,t,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=c3(i),d=r||s?[...c?Tg(c):[],...Tg(e)]:[];d.forEach(x=>{r&&x.addEventListener("scroll",t,{passive:!0}),s&&x.addEventListener("resize",t)});const f=c&&a?fpe(c,t):null;let m=-1,p=null;o&&(p=new ResizeObserver(x=>{let[C]=x;C&&C.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var D;(D=p)==null||D.observe(e)})),t()}),c&&!l&&p.observe(c),p.observe(e));let g,y=l?od(i):null;l&&v();function v(){const x=od(i);y&&!Wq(y,x)&&t(),y=x,g=requestAnimationFrame(v)}return t(),()=>{var x;d.forEach(C=>{r&&C.removeEventListener("scroll",t),s&&C.removeEventListener("resize",t)}),f?.(),(x=p)==null||x.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const hpe=jme,mpe=Lme,TN=Mme,ppe=(i,e,t)=>{const n=new Map,r={platform:dpe,...t},s={...r.platform,_c:n};return Nme(i,e,{...r,platform:s})};var Yk=M.useLayoutEffect,gpe=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],kw=function(){};function bpe(i,e){return e?e[0]==="-"?i+e:i+"__"+e:i}function ype(i,e){for(var t=arguments.length,n=new Array(t>2?t-2:0),r=2;r<t;r++)n[r-2]=arguments[r];var s=[].concat(n);if(e&&i)for(var o in e)e.hasOwnProperty(o)&&e[o]&&s.push("".concat(bpe(i,o)));return s.filter(function(a){return a}).map(function(a){return String(a).trim()}).join(" ")}var AN=function(e){return kpe(e)?e.filter(Boolean):sd(e)==="object"&&e!==null?[e]:[]},qq=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var t=Ra(e,gpe);return ft({},t)},oi=function(e,t,n){var r=e.cx,s=e.getStyles,o=e.getClassNames,a=e.className;return{css:s(t,e),className:r(n??{},o(t,e),a)}};function vpe(i,e,t){if(t){var n=t(i,e);if(typeof n=="string")return n}return i}function r_(i){return[document.documentElement,document.body,window].indexOf(i)>-1}function wpe(i){return r_(i)?window.innerHeight:i.clientHeight}function $q(i){return r_(i)?window.pageYOffset:i.scrollTop}function Sw(i,e){if(r_(i)){window.scrollTo(0,e);return}i.scrollTop=e}function xpe(i){var e=getComputedStyle(i),t=e.position==="absolute",n=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var r=i;r=r.parentElement;)if(e=getComputedStyle(r),!(t&&e.position==="static")&&n.test(e.overflow+e.overflowY+e.overflowX))return r;return document.documentElement}function _pe(i,e,t,n){return t*((i=i/n-1)*i*i+1)+e}function uy(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:kw,r=$q(i),s=e-r,o=10,a=0;function l(){a+=o;var c=_pe(a,r,s,t);Sw(i,c),a<t?window.requestAnimationFrame(l):n(i)}l()}function kN(i,e){var t=i.getBoundingClientRect(),n=e.getBoundingClientRect(),r=e.offsetHeight/3;n.bottom+r>t.bottom?Sw(i,Math.min(e.offsetTop+e.clientHeight-i.offsetHeight+r,i.scrollHeight)):n.top-r<t.top&&Sw(i,Math.max(e.offsetTop-r,0))}function Cpe(i){var e=i.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}function SN(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function Dpe(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Gq=!1,Epe={get passive(){return Gq=!0}},dy=typeof window<"u"?window:{};dy.addEventListener&&dy.removeEventListener&&(dy.addEventListener("p",kw,Epe),dy.removeEventListener("p",kw,!1));var Tpe=Gq;function Ape(i){return i!=null}function kpe(i){return Array.isArray(i)}function fy(i,e,t){return i?e:t}var Spe=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var s=Object.entries(e).filter(function(o){var a=Vi(o,1),l=a[0];return!n.includes(l)});return s.reduce(function(o,a){var l=Vi(a,2),c=l[0],d=l[1];return o[c]=d,o},{})},Ppe=["children","innerProps"],Ipe=["children","innerProps"];function Rpe(i){var e=i.maxHeight,t=i.menuEl,n=i.minHeight,r=i.placement,s=i.shouldScroll,o=i.isFixedPosition,a=i.controlHeight,l=xpe(t),c={placement:"bottom",maxHeight:e};if(!t||!t.offsetParent)return c;var d=l.getBoundingClientRect(),f=d.height,m=t.getBoundingClientRect(),p=m.bottom,g=m.height,y=m.top,v=t.offsetParent.getBoundingClientRect(),x=v.top,C=o?window.innerHeight:wpe(l),D=$q(l),E=parseInt(getComputedStyle(t).marginBottom,10),T=parseInt(getComputedStyle(t).marginTop,10),S=x-T,A=C-y,I=S+D,R=f-D-y,O=p-C+D+E,j=D+y-T,B=160;switch(r){case"auto":case"bottom":if(A>=g)return{placement:"bottom",maxHeight:e};if(R>=g&&!o)return s&&uy(l,O,B),{placement:"bottom",maxHeight:e};if(!o&&R>=n||o&&A>=n){s&&uy(l,O,B);var U=o?A-E:R-E;return{placement:"bottom",maxHeight:U}}if(r==="auto"||o){var F=e,H=o?S:I;return H>=n&&(F=Math.min(H-E-a,e)),{placement:"top",maxHeight:F}}if(r==="bottom")return s&&Sw(l,O),{placement:"bottom",maxHeight:e};break;case"top":if(S>=g)return{placement:"top",maxHeight:e};if(I>=g&&!o)return s&&uy(l,j,B),{placement:"top",maxHeight:e};if(!o&&I>=n||o&&S>=n){var L=e;return(!o&&I>=n||o&&S>=n)&&(L=o?S-T:I-T),s&&uy(l,j,B),{placement:"top",maxHeight:L}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return c}function Fpe(i){var e={bottom:"top",top:"bottom"};return i?e[i]:"bottom"}var Yq=function(e){return e==="auto"?"bottom":e},Ope=function(e,t){var n,r=e.placement,s=e.theme,o=s.borderRadius,a=s.spacing,l=s.colors;return ft((n={label:"menu"},eh(n,Fpe(r),"100%"),eh(n,"position","absolute"),eh(n,"width","100%"),eh(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},Kq=M.createContext(null),Npe=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,s=e.menuPlacement,o=e.menuPosition,a=e.menuShouldScrollIntoView,l=e.theme,c=M.useContext(Kq)||{},d=c.setPortalPlacement,f=M.useRef(null),m=M.useState(r),p=Vi(m,2),g=p[0],y=p[1],v=M.useState(null),x=Vi(v,2),C=x[0],D=x[1],E=l.spacing.controlHeight;return Yk(function(){var T=f.current;if(T){var S=o==="fixed",A=a&&!S,I=Rpe({maxHeight:r,menuEl:T,minHeight:n,placement:s,shouldScroll:A,isFixedPosition:S,controlHeight:E});y(I.maxHeight),D(I.placement),d?.(I.placement)}},[r,s,o,a,n,d,E]),t({ref:f,placerProps:ft(ft({},e),{},{placement:C||Yq(s),maxHeight:g})})},Bpe=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return pt("div",vt({},oi(e,"menu",{menu:!0}),{ref:n},r),t)},Mpe=Bpe,Lpe=function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return ft({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},Upe=function(e){var t=e.children,n=e.innerProps,r=e.innerRef,s=e.isMulti;return pt("div",vt({},oi(e,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:r},n),t)},Xq=function(e,t){var n=e.theme,r=n.spacing.baseUnit,s=n.colors;return ft({textAlign:"center"},t?{}:{color:s.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},Vpe=Xq,jpe=Xq,zpe=function(e){var t=e.children,n=t===void 0?"No options":t,r=e.innerProps,s=Ra(e,Ppe);return pt("div",vt({},oi(ft(ft({},s),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},Wpe=function(e){var t=e.children,n=t===void 0?"Loading...":t,r=e.innerProps,s=Ra(e,Ipe);return pt("div",vt({},oi(ft(ft({},s),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},Hpe=function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},qpe=function(e){var t=e.appendTo,n=e.children,r=e.controlElement,s=e.innerProps,o=e.menuPlacement,a=e.menuPosition,l=M.useRef(null),c=M.useRef(null),d=M.use
26State(Yq(o)),f=Vi(d,2),m=f[0],p=f[1],g=M.useMemo(function(){return{setPortalPlacement:p}},[]),y=M.useState(null),v=Vi(y,2),x=v[0],C=v[1],D=M.useCallback(function(){if(r){var A=Cpe(r),I=a==="fixed"?0:window.pageYOffset,R=A[m]+I;(R!==x?.offset||A.left!==x?.rect.left||A.width!==x?.rect.width)&&C({offset:R,rect:A})}},[r,a,m,x?.offset,x?.rect.left,x?.rect.width]);Yk(function(){D()},[D]);var E=M.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),r&&l.current&&(c.current=Hq(r,l.current,D,{elementResize:"ResizeObserver"in window}))},[r,D]);Yk(function(){E()},[E]);var T=M.useCallback(function(A){l.current=A,E()},[E]);if(!t&&a!=="fixed"||!x)return null;var S=pt("div",vt({ref:T},oi(ft(ft({},e),{},{offset:x.offset,position:a,rect:x.rect}),"menuPortal",{"menu-portal":!0}),s),n);return pt(Kq.Provider,{value:g},t?l5.createPortal(S,t):S)},$pe=function(e){var t=e.isDisabled,n=e.isRtl;return{label:"container",direction:n?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},Gpe=function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,s=e.isRtl;return pt("div",vt({},oi(e,"container",{"--is-disabled":r,"--is-rtl":s}),n),t)},Ype=function(e,t){var n=e.theme.spacing,r=e.isMulti,s=e.hasValue,o=e.selectProps.controlShouldRenderValue;return ft({alignItems:"center",display:r&&s&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(n.baseUnit*2,"px")})},Kpe=function(e){var t=e.children,n=e.innerProps,r=e.isMulti,s=e.hasValue;return pt("div",vt({},oi(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":s}),n),t)},Xpe=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Qpe=function(e){var t=e.children,n=e.innerProps;return pt("div",vt({},oi(e,"indicatorsContainer",{indicators:!0}),n),t)},PN,Zpe=["size"],Jpe=["innerProps","isRtl","size"],ege={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Qq=function(e){var t=e.size,n=Ra(e,Zpe);return pt("svg",vt({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ege},n))},u3=function(e){return pt(Qq,vt({size:20},e),pt("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Zq=function(e){return pt(Qq,vt({size:20},e),pt("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Jq=function(e,t){var n=e.isFocused,r=e.theme,s=r.spacing.baseUnit,o=r.colors;return ft({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?o.neutral60:o.neutral20,padding:s*2,":hover":{color:n?o.neutral80:o.neutral40}})},tge=Jq,nge=function(e){var t=e.children,n=e.innerProps;return pt("div",vt({},oi(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||pt(Zq,null))},ige=Jq,rge=function(e){var t=e.children,n=e.innerProps;return pt("div",vt({},oi(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||pt(u3,null))},sge=function(e,t){var n=e.isDisabled,r=e.theme,s=r.spacing.baseUnit,o=r.colors;return ft({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?o.neutral10:o.neutral20,marginBottom:s*2,marginTop:s*2})},oge=function(e){var t=e.innerProps;return pt("span",vt({},t,oi(e,"indicatorSeparator",{"indicator-separator":!0})))},age=bme(PN||(PN=_me([`
27  0%, 80%, 100% { opacity: 0; }
28  40% { opacity: 1; }
29`]))),lge=function(e,t){var n=e.isFocused,r=e.size,s=e.theme,o=s.colors,a=s.spacing.baseUnit;return ft({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?o.neutral60:o.neutral20,padding:a*2})},eE=function(e){var t=e.delay,n=e.offset;return pt("span",{css:r3({animation:"".concat(age," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},cge=function(e){var t=e.innerProps,n=e.isRtl,r=e.size,s=r===void 0?4:r,o=Ra(e,Jpe);return pt("div",vt({},oi(ft(ft({},o),{},{innerProps:t,isRtl:n,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),pt(eE,{delay:0,offset:n}),pt(eE,{delay:160,offset:!0}),pt(eE,{delay:320,offset:!n}))},uge=function(e,t){var n=e.isDisabled,r=e.isFocused,s=e.theme,o=s.colors,a=s.borderRadius,l=s.spacing;return ft({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?o.neutral5:o.neutral0,borderColor:n?o.neutral10:r?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:r?o.primary:o.neutral30}})},dge=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,s=e.innerRef,o=e.innerProps,a=e.menuIsOpen;return pt("div",vt({ref:s}
29,oi(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),o,{"aria-disabled":n||void 0}),t)},fge=dge,hge=["data"],mge=function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},pge=function(e){var t=e.children,n=e.cx,r=e.getStyles,s=e.getClassNames,o=e.Heading,a=e.headingProps,l=e.innerProps,c=e.label,d=e.theme,f=e.selectProps;return pt("div",vt({},oi(e,"group",{group:!0}),l),pt(o,vt({},a,{selectProps:f,theme:d,getStyles:r,getClassNames:s,cx:n}),c),pt("div",null,t))},gge=function(e,t){var n=e.theme,r=n.colors,s=n.spacing;return ft({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},bge=function(e){var t=qq(e);t.data;var n=Ra(t,hge);return pt("div",vt({},oi(e,"groupHeading",{"group-heading":!0}),n))},yge=pge,vge=["innerRef","isDisabled","isHidden","inputClassName"],wge=function(e,t){var n=e.isDisabled,r=e.value,s=e.theme,o=s.spacing,a=s.colors;return ft(ft({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},xge),t?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:a.neutral80})},e$={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},xge={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ft({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},e$)},_ge=function(e){return ft({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},e$)},Cge=function(e){var t=e.cx,n=e.value,r=qq(e),s=r.innerRef,o=r.isDisabled,a=r.isHidden,l=r.inputClassName,c=Ra(r,vge);return pt("div",vt({},oi(e,"input",{"input-container":!0}),{"data-value":n||""}),pt("input",vt({className:t({input:!0},l),ref:s,style:_ge(a),disabled:o},c)))},Dge=Cge,Ege=function(e,t){var n=e.theme,r=n.spacing,s=n.borderRadius,o=n.colors;return ft({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:o.neutral10,borderRadius:s/2,margin:r.baseUnit/2})},Tge=function(e,t){var n=e.theme,r=n.borderRadius,s=n.colors,o=e.cropWithEllipsis;return ft({overflow:"hidden",textOverflow:o||o===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},Age=function(e,t){var n=e.theme,r=n.spacing,s=n.borderRadius,o=n.colors,a=e.isFocused;return ft({alignItems:"center",display:"flex"},t?{}:{borderRadius:s/2,backgroundColor:a?o.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},t$=function(e){var t=e.children,n=e.innerProps;return pt("div",n,t)},kge=t$,Sge=t$;function Pge(i){var e=i.children,t=i.innerProps;return pt("div",vt({role:"button"},t),e||pt(u3,{size:14}))}var Ige=function(e){var t=e.children,n=e.components,r=e.data,s=e.innerProps,o=e.isDisabled,a=e.removeProps,l=e.selectProps,c=n.Container,d=n.Label,f=n.Remove;return pt(c,{data:r,innerProps:ft(ft({},oi(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),s),selectProps:l},pt(d,{data:r,innerProps:ft({},oi(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),pt(f,{data:r,innerProps:ft(ft({},oi(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:l}))},Rge=Ige,Fge=function(e,t){var n=e.isDisabled,r=e.isFocused,s=e.isSelected,o=e.theme,a=o.spacing,l=o.colors;return ft({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:s?l.primary:r?l.primary25:"transparent",color:n?l.neutral20:s?l.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:n?void 0:s?l.primary:l.primary50}})},Oge=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,s=e.isSelected,o=e.innerRef,a=e.innerProps;return pt("div",vt({},oi(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":s}),{ref:o,"aria-disabled":n},a),t)},Nge=Oge,Bge=function(e,t){var n=e.theme,r=n.spacing,s=n.colors;return ft({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:s.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},Mge=function(e){var t=e.children,n=e.innerProps;return pt("div",vt({},oi(e,"placeholder",{placeholder:!0}),n),t)},Lge=Mge,Uge=function(e,t){var n=e.isDisabled,r=e.theme,s=r.spacing,o=r.colors;return ft({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?o.neutral40:o.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},Vge=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return pt("div",vt({},oi(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},jge=Vge,zge={ClearIndicator:rge,Control:fge,DropdownIndicator:nge,DownChevron:Zq,CrossIcon:u3,Group:yge,GroupHeading:bge,IndicatorsContainer:Qpe,IndicatorSeparator:oge,Input:Dge,Loa
29dingIndicator:cge,Menu:Mpe,MenuList:Upe,MenuPortal:qpe,LoadingMessage:Wpe,NoOptionsMessage:zpe,MultiValue:Rge,MultiValueContainer:kge,MultiValueLabel:Sge,MultiValueRemove:Pge,Option:Nge,Placeholder:Lge,SelectContainer:Gpe,SingleValue:jge,ValueContainer:Kpe},Wge=function(e){return ft(ft({},zge),e.components)},IN=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function Hge(i,e){return!!(i===e||IN(i)&&IN(e))}function qge(i,e){if(i.length!==e.length)return!1;for(var t=0;t<i.length;t++)if(!Hge(i[t],e[t]))return!1;return!0}function $ge(i,e){e===void 0&&(e=qge);var t=null;function n(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];if(t&&t.lastThis===this&&e(r,t.lastArgs))return t.lastResult;var o=i.apply(this,r);return t={lastResult:o,lastArgs:r,lastThis:this},o}return n.clear=function(){t=null},n}var Gge={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Yge=function(e){return pt("span",vt({css:Gge},e))},RN=Yge,Kge={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,s=e.context,o=e.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=n===void 0?"":n,s=e.labels,o=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return o?"option ".concat(r," is disabled. Select another option."):"option ".concat(r,", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,s=e.label,o=s===void 0?"":s,a=e.selectValue,l=e.isDisabled,c=e.isSelected,d=e.isAppleDevice,f=function(y,v){return y&&y.length?"".concat(y.indexOf(v)+1," of ").concat(y.length):""};if(t==="value"&&a)return"value ".concat(o," focused, ").concat(f(a,n),".");if(t==="menu"&&d){var m=l?" disabled":"",p="".concat(c?" selected":"").concat(m);return"".concat(o).concat(p,", ").concat(f(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Xge=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,s=e.focusableOptions,o=e.isFocused,a=e.selectValue,l=e.selectProps,c=e.id,d=e.isAppleDevice,f=l.ariaLiveMessages,m=l.getOptionLabel,p=l.inputValue,g=l.isMulti,y=l.isOptionDisabled,v=l.isSearchable,x=l.menuIsOpen,C=l.options,D=l.screenReaderStatus,E=l.tabSelectsValue,T=l.isLoading,S=l["aria-label"],A=l["aria-live"],I=M.useMemo(function(){return ft(ft({},Kge),f||{})},[f]),R=M.useMemo(function(){var H="";if(t&&I.onChange){var L=t.option,W=t.options,G=t.removedValue,Y=t.removedValues,ie=t.value,V=function(ye){return Array.isArray(ye)?null:ye},q=G||L||V(ie),$=q?m(q):"",J=W||Y||void 0,ce=J?J.map(m):[],se=ft({isDisabled:q&&y(q,a),label:$,labels:ce},t);H=I.onChange(se)}return H},[t,I,y,a,m]),O=M.useMemo(function(){var H="",L=n||r,W=!!(n&&a&&a.includes(n));if(L&&I.onFocus){var G={focused:L,label:m(L),isDisabled:y(L,a),isSelected:W,options:s,context:L===n?"menu":"value",selectValue:a,isAppleDevice:d};H=I.onFocus(G)}return H},[n,r,m,y,I,s,a,d]),j=M.useMemo(function(){var H="";if(x&&C.length&&!T&&I.onFilter){var L=D({count:s.length});H=I.onFilter({inputValue:p,resultsMessage:L})}return H},[s,p,x,I,C,D,T]),B=t?.action==="initial-input-focus",U=M.useMemo(function(){var H="";if(I.guidance){var L=r?"value":x?"menu":"input";H=I.guidance({"aria-label":S,context:L,isDisabled:n&&y(n,a),isMulti:g,isSearchable:v,tabSelectsValue:E,isInitialFocus:B})}return H},[S,n,r,g,y,v,x,I,a,E,B]),F=pt(M.Fragment,null,pt("span",{id:"aria-selection"},R),pt("span",{id:"aria-focused"},O),pt("span",{id:"aria-results"},j),pt("span",{id:"aria-guidance"},U));return pt(M.Fragment,null,pt(RN,{id:c},B&&F),pt(RN,{"aria-live":A,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!B&&F))},Qge=Xge,Kk=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"}
29,{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Zge=new RegExp("["+Kk.map(function(i){return i.letters}).join("")+"]","g"),n$={};for(var tE=0;tE<Kk.length;tE++)for(var nE=Kk[tE],iE=0;iE<nE.letters.length;iE++)n$[nE.letters[iE]]=nE.base;var i$=function(e){return e.replace(Zge,function(t){return n$[t]})},Jge=$ge(i$),FN=function(e){return e.replace(/^\s+|\s+$/g,"")},e0e=function(e){return"".concat(e.label," ").concat(e.value)},t0e=function(e){return function(t,n){if(t.data.__isNew__)return!0;var r=ft({ignoreCase:!0,ignoreAccents:!0,stringify:e0e,trim:!0,matchFrom:"any"},e),s=r.ignoreCase,o=r.ignoreAccents,a=r.stringify,l=r.trim,c=r.matchFrom,d=l?FN(n):n,f=l?FN(a(t)):a(t);return s&&(d=d.toLowerCase(),f=f.toLowerCase()),o&&(d=Jge(d),f=i$(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},n0e=["innerRef"];function i0e(i){var e=i.innerRef,t=Ra(i,n0e),n=Spe(t,"onExited","in","enter","exit","appear");return pt("input",vt({ref:e},n,{css:r3({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var r0e=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function s0e(i){var e=i.isEnabled,t=i.onBottomArrive,n=i.onBottomLeave,r=i.onTopArrive,s=i.onTopLeave,o=M.useRef(!1),a=M.useRef(!1),l=M.useRef(0),c=M.useRef(null),d=M.useCallback(function(v,x){if(c.current!==null){var C=c.current,D=C.scrollTop,E=C.scrollHeight,T=C.clientHeight,S=c.current,A=x>0,I=E-T-D,R=!1;I>x&&o.current&&(n&&n(v),o.current=!1),A&&a.current&&(s&&s(v),a.current=!1),A&&x>I?(t&&!o.current&&t(v),S.scrollTop=E,R=!0,o.current=!0):!A&&-x>D&&(r&&!a.current&&r(v),S.scrollTop=0,R=!0,a.current=!0),R&&r0e(v)}},[t,n,r,s]),f=M.useCallback(function(v){d(v,v.deltaY)},[d]),m=M.useCallback(function(v){l.current=v.changedTouches[0].clientY},[]),p=M.useCallback(function(v){var x=l.current-v.changedTouches[0].clientY;d(v,x)},[d]),g=M.useCallback(function(v){if(v){var x=Tpe?{passive:!1}:!1;v.addEventListener("wheel",f,x),v.addEventListener("touchstart",m,x),v.addEventListener("touchmove",p,x)}},[p,m,f]),y=M.useCallback(function(v){v&&(v.removeEventListener("wheel",f,!1),v.removeEventListener("touchstart",m,!1),v.removeEventListener("touchmove",p,!1))},[p,m,f]);return M.useEffect(function(){if(e){var v=c.current;return g(v),function(){y(v)}}},[e,g,y]),function(v){c.current=v}}var ON=["boxSizing","height","overflow","paddingRight","position"],NN={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function BN(i){i.cancelable&&i.preventDefault()}function MN(i){i.stopPropagation()}function LN(){var i=this.scrollTop,e=this.scrollHeight,t=i+this.offsetHeight;i===0?this.scrollTop=1:t===e&&(this.scrollTop=i-1)}function UN(){return"ontouchstart"in window||navigator.maxTouchPoints}var VN=!!(typeof window<"u"&&window.document&&window.document.createElement),rp=0,vf={capture:!1,passive:!1};function o0e(i){var e=i.isEnabled,t=i.accountForScrollbars,n=t===void 0?!0:t,r=M.useRef({}),s=M.useRef(null),o=M.useCallback(function(l){if(VN){var c=document.body,d=c&&c.style;
29if(n&&ON.forEach(function(g){var y=d&&d[g];r.current[g]=y}),n&&rp<1){var f=parseInt(r.current.paddingRight,10)||0,m=document.body?document.body.clientWidth:0,p=window.innerWidth-m+f||0;Object.keys(NN).forEach(function(g){var y=NN[g];d&&(d[g]=y)}),d&&(d.paddingRight="".concat(p,"px"))}c&&UN()&&(c.addEventListener("touchmove",BN,vf),l&&(l.addEventListener("touchstart",LN,vf),l.addEventListener("touchmove",MN,vf))),rp+=1}},[n]),a=M.useCallback(function(l){if(VN){var c=document.body,d=c&&c.style;rp=Math.max(rp-1,0),n&&rp<1&&ON.forEach(function(f){var m=r.current[f];d&&(d[f]=m)}),c&&UN()&&(c.removeEventListener("touchmove",BN,vf),l&&(l.removeEventListener("touchstart",LN,vf),l.removeEventListener("touchmove",MN,vf)))}},[n]);return M.useEffect(function(){if(e){var l=s.current;return o(l),function(){a(l)}}},[e,o,a]),function(l){s.current=l}}var a0e=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},l0e={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function c0e(i){var e=i.children,t=i.lockEnabled,n=i.captureEnabled,r=n===void 0?!0:n,s=i.onBottomArrive,o=i.onBottomLeave,a=i.onTopArrive,l=i.onTopLeave,c=s0e({isEnabled:r,onBottomArrive:s,onBottomLeave:o,onTopArrive:a,onTopLeave:l}),d=o0e({isEnabled:t}),f=function(p){c(p),d(p)};return pt(M.Fragment,null,t&&pt("div",{onClick:a0e,css:l0e}),e(f))}var u0e={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},d0e=function(e){var t=e.name,n=e.onFocus;return pt("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:u0e,value:"",onChange:function(){}})},f0e=d0e;function d3(i){var e;return typeof window<"u"&&window.navigator!=null?i.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function h0e(){return d3(/^iPhone/i)}function r$(){return d3(/^Mac/i)}function m0e(){return d3(/^iPad/i)||r$()&&navigator.maxTouchPoints>1}function p0e(){return h0e()||m0e()}function g0e(){return r$()||p0e()}var b0e=function(e){return e.label},y0e=function(e){return e.label},v0e=function(e){return e.value},w0e=function(e){return!!e.isDisabled},x0e={clearIndicator:ige,container:$pe,control:uge,dropdownIndicator:tge,group:mge,groupHeading:gge,indicatorsContainer:Xpe,indicatorSeparator:sge,input:wge,loadingIndicator:lge,loadingMessage:jpe,menu:Ope,menuList:Lpe,menuPortal:Hpe,multiValue:Ege,multiValueLabel:Tge,multiValueRemove:Age,noOptionsMessage:Vpe,option:Fge,placeholder:Bge,singleValue:Uge,valueContainer:Ype},_0e={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},C0e=4,s$=4,D0e=38,E0e=s$*2,T0e={baseUnit:s$,controlHeight:D0e,menuGutter:E0e},rE={borderRadius:C0e,colors:_0e,spacing:T0e},A0e={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:SN(),captureMenuScroll:!SN(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:t0e(),formatGroupLabel:b0e,getOptionLabel:y0e,getOptionValue:v0e,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:w0e,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!Dpe(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(t!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function jN(i,e,t,n){var r=l$(i,e,t),s=c$(i,e,t),o=a$(i,e),a=Pw(i,e);return{type:"option",data:e,isDisabled:r,isSelected:s,label:o,value:a,index:n}}function h1(i,e){return i.options.map(function(t,n){if("options"in t){var r=t.options.map(function(o,a){return jN(i,o,e,a)}).filter(function(o){return WN(i,o)});return r.length>0?{type:"group",data:t,options:r,index:n}:void 0}var s=jN(i,t,e,n);return WN(i,s)?s:void 0}).filter(Ape)}function o$(i){return i.reduce(function(e,t){return t.type==="group"?e.push.apply(e,J5(t.options.map(function(n){return n.data}))):e.push(t.data),e},[])}function zN(i,e){return i.reduce(function(t,n){return n.type==="group"?t.push.apply(t,J5(n.options.map(function(r){return{data:r.data,id:"".concat(e,"-").concat(n.index,"-").concat(r.index)}}))):t.push({data:n.data,id:"".concat(e,"-").concat(n.index)}),t},[])}function k0e(i,e){return o$(h1(i,e))}function WN(i,e){var t=i.inputValue,n=t===void 0?"":t,r=e.data,s=e.isSelected,o=e.label,a=e.value;return(!d$(i)||!s)&&u$(i,{label:o,value:a,data:r},n)}function S0e(i,e){var t=i.focusedValue,n=i.selectValue,r=n.indexOf(t);if(r>-1){var s=e.indexOf(t);if(s>-1)return t;if(r<e.length)return e[r]}return null}function P0e(i,e){var t=i.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]}var sE=function(e,t){var n,r=(n=e.find(function(s){return s.data===t}))===null||n===void 0?void 0:n.id;return r||null},a$=function(e,t){return e.getOptionLabel(t)}
29,Pw=function(e,t){return e.getOptionValue(t)};function l$(i,e,t){return typeof i.isOptionDisabled=="function"?i.isOptionDisabled(e,t):!1}function c$(i,e,t){if(t.indexOf(e)>-1)return!0;if(typeof i.isOptionSelected=="function")return i.isOptionSelected(e,t);var n=Pw(i,e);return t.some(function(r){return Pw(i,r)===n})}function u$(i,e,t){return i.filterOption?i.filterOption(e,t):!0}var d$=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return t===void 0?n:t},I0e=1,f$=(function(i){mhe(t,i);var e=bhe(t);function t(n){var r;if(fhe(this,t),r=e.call(this,n),r.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(l){r.controlRef=l},r.focusedOptionRef=null,r.getFocusedOptionRef=function(l){r.focusedOptionRef=l},r.menuListRef=null,r.getMenuListRef=function(l){r.menuListRef=l},r.inputRef=null,r.getInputRef=function(l){r.inputRef=l},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(l,c){var d=r.props,f=d.onChange,m=d.name;c.name=m,r.ariaOnChange(l,c),f(l,c)},r.setValue=function(l,c,d){var f=r.props,m=f.closeMenuOnSelect,p=f.isMulti,g=f.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:g}),m&&(r.setState({inputIsHiddenAfterUpdate:!p}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(l,{action:c,option:d})},r.selectOption=function(l){var c=r.props,d=c.blurInputOnSelect,f=c.isMulti,m=c.name,p=r.state.selectValue,g=f&&r.isOptionSelected(l,p),y=r.isOptionDisabled(l,p);if(g){var v=r.getOptionValue(l);r.setValue(p.filter(function(x){return r.getOptionValue(x)!==v}),"deselect-option",l)}else if(!y)f?r.setValue([].concat(J5(p),[l]),"select-option",l):r.setValue(l,"select-option");else{r.ariaOnChange(l,{action:"select-option",option:l,name:m});return}d&&r.blurInput()},r.removeValue=function(l){var c=r.props.isMulti,d=r.state.selectValue,f=r.getOptionValue(l),m=d.filter(function(g){return r.getOptionValue(g)!==f}),p=fy(c,m,m[0]||null);r.onChange(p,{action:"remove-value",removedValue:l}),r.focusInput()},r.clearValue=function(){var l=r.state.selectValue;r.onChange(fy(r.props.isMulti,[],null),{action:"clear",removedValues:l})},r.popValue=function(){var l=r.props.isMulti,c=r.state.selectValue,d=c[c.length-1],f=c.slice(0,c.length-1),m=fy(l,f,f[0]||null);d&&r.onChange(m,{action:"pop-value",removedValue:d})},r.getFocusedOptionId=function(l){return sE(r.state.focusableOptionsWithIds,l)},r.getFocusableOptionsWithIds=function(){return zN(h1(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];return ype.apply(void 0,[r.props.classNamePrefix].concat(c))},r.getOptionLabel=function(l){return a$(r.props,l)},r.getOptionValue=function(l){return Pw(r.props,l)},r.getStyles=function(l,c){var d=r.props.unstyled,f=x0e[l](c,d);f.boxSizing="border-box";var m=r.props.styles[l];return m?m(f,c):f},r.getClassNames=function(l,c){var d,f;return(d=(f=r.props.classNames)[l])===null||d===void 0?void 0:d.call(f,c)},r.getElementId=function(l){return"".concat(r.state.instancePrefix,"-").concat(l)},r.getComponents=function(){return Wge(r.props)},r.buildCategorizedOptions=function(){return h1(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return o$(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(l,c){r.setState({ariaSelection:ft({value:l},c)})},r.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(l){r.blockOptionHover=!1},r.onControlMouseDown=function(l){if(!l.defaultPrevented){var c=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&r.onMenuClose():c&&r.openMenu("first"):(c&&(r.openAfterFocus=!0),r.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},r.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!r.props.isDisabled){var c=r.props,d=c.isMulti,f=c.menuIsOpen;
29r.focusInput(),f?(r.setState({inputIsHiddenAfterUpdate:!d}),r.onMenuClose()):r.openMenu("first"),l.preventDefault()}},r.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(r.clearValue(),l.preventDefault(),r.openAfterFocus=!1,l.type==="touchend"?r.focusInput():setTimeout(function(){return r.focusInput()}))},r.onScroll=function(l){typeof r.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&r_(l.target)&&r.props.onMenuClose():typeof r.props.closeMenuOnScroll=="function"&&r.props.closeMenuOnScroll(l)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(l){var c=l.touches,d=c&&c.item(0);d&&(r.initialTouchX=d.clientX,r.initialTouchY=d.clientY,r.userIsDragging=!1)},r.onTouchMove=function(l){var c=l.touches,d=c&&c.item(0);if(d){var f=Math.abs(d.clientX-r.initialTouchX),m=Math.abs(d.clientY-r.initialTouchY),p=5;r.userIsDragging=f>p||m>p}},r.onTouchEnd=function(l){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(l.target)&&r.menuListRef&&!r.menuListRef.contains(l.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(l){r.userIsDragging||r.onControlMouseDown(l)},r.onClearIndicatorTouchEnd=function(l){r.userIsDragging||r.onClearIndicatorMouseDown(l)},r.onDropdownIndicatorTouchEnd=function(l){r.userIsDragging||r.onDropdownIndicatorMouseDown(l)},r.handleInputChange=function(l){var c=r.props.inputValue,d=l.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(d,{action:"input-change",prevInputValue:c}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(l){r.props.onFocus&&r.props.onFocus(l),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(l){var c=r.props.inputValue;if(r.menuListRef&&r.menuListRef.contains(document.activeElement)){r.inputRef.focus();return}r.props.onBlur&&r.props.onBlur(l),r.onInputChange("",{action:"input-blur",prevInputValue:c}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1})},r.onOptionHover=function(l){if(!(r.blockOptionHover||r.state.focusedOption===l)){var c=r.getFocusableOptions(),d=c.indexOf(l);r.setState({focusedOption:l,focusedOptionId:d>-1?r.getFocusedOptionId(l):null})}},r.shouldHideSelectedOptions=function(){return d$(r.props)},r.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),r.focus()},r.onKeyDown=function(l){var c=r.props,d=c.isMulti,f=c.backspaceRemovesValue,m=c.escapeClearsValue,p=c.inputValue,g=c.isClearable,y=c.isDisabled,v=c.menuIsOpen,x=c.onKeyDown,C=c.tabSelectsValue,D=c.openMenuOnFocus,E=r.state,T=E.focusedOption,S=E.focusedValue,A=E.selectValue;if(!y&&!(typeof x=="function"&&(x(l),l.defaultPrevented))){switch(r.blockOptionHover=!0,l.key){case"ArrowLeft":if(!d||p)return;r.focusValue("previous");break;case"ArrowRight":if(!d||p)return;r.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(S)r.removeValue(S);else{if(!f)return;d?r.popValue():g&&r.clearValue()}break;case"Tab":if(r.isComposing||l.shiftKey||!v||!C||!T||D&&r.isOptionSelected(T,A))return;r.selectOption(T);break;case"Enter":if(l.keyCode===229)break;if(v){if(!T||r.isComposing)return;r.selectOption(T);break}return;case"Escape":v?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:p}),r.onMenuClose()):g&&m&&r.clearValue();break;case" ":if(p)return;if(!v){r.openMenu("first");break}if(!T)return;r.selectOption(T);break;case"ArrowUp":v?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":v?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!v)return;r.focusOption("pageup");break;case"PageDown":if(!v)return;r.focusOption("pagedown");break;case"Home":if(!v)return;r.focusOption("first");break;case"End":if(!v)return;r.focusOption("last");break;default:return}l.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++I0e),r.state.selectValue=AN(n.value),n.menuIsOpen&&r.state.selectValue.length){var s=r.getFocusableOptionsWithIds(),o=r.buildFocusableOptions(),a=o.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=s,r.state.focusedOption=o[a],r.state.focusedOptionId=sE(s,o[a])}return r}
29return hhe(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&kN(this.menuListRef,this.focusedOptionRef),g0e()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(r){var s=this.props,o=s.isDisabled,a=s.menuIsOpen,l=this.state.isFocused;(l&&!o&&r.isDisabled||l&&a&&!r.menuIsOpen)&&this.focusInput(),l&&o&&!r.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!o&&r.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(kN(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(r,s){this.props.onInputChange(r,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(r){var s=this,o=this.state,a=o.selectValue,l=o.isFocused,c=this.buildFocusableOptions(),d=r==="first"?0:c.length-1;if(!this.props.isMulti){var f=c.indexOf(a[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[d],focusedOptionId:this.getFocusedOptionId(c[d])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(r){var s=this.state,o=s.selectValue,a=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=o.indexOf(a);a||(l=-1);var c=o.length-1,d=-1;if(o.length){switch(r){case"previous":l===0?d=0:l===-1?d=c:d=l-1;break;case"next":l>-1&&l<c&&(d=l+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:o[d]})}}}},{key:"focusOption",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,o=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var l=0,c=a.indexOf(o);o||(c=-1),r==="up"?l=c>0?c-1:a.length-1:r==="down"?l=(c+1)%a.length:r==="pageup"?(l=c-s,l<0&&(l=0)):r==="pagedown"?(l=c+s,l>a.length-1&&(l=a.length-1)):r==="last"&&(l=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[l])})}}},{key:"getTheme",value:(function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(rE):ft(ft({},rE),this.props.theme):rE})},{key:"getCommonProps",value:function(){var r=this.clearValue,s=this.cx,o=this.getStyles,a=this.getClassNames,l=this.getValue,c=this.selectOption,d=this.setValue,f=this.props,m=f.isMulti,p=f.isRtl,g=f.options,y=this.hasValue();return{clearValue:r,cx:s,getStyles:o,getClassNames:a,getValue:l,hasValue:y,isMulti:m,isRtl:p,options:g,selectOption:c,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var r=this.state.selectValue;return r.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var r=this.props,s=r.isClearable,o=r.isMulti;return s===void 0?o:s}},{key:"isOptionDisabled",value:function(r,s){return l$(this.props,r,s)}},{key:"isOptionSelected",value:function(r,s){return c$(this.props,r,s)}},{key:"filterOption",value:function(r,s){return u$(this.props,r,s)}},{key:"formatOptionLabel",value:function(r,s){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(r,{context:s,inputValue:o,selectValue:a})}else return this.getOptionLabel(r)}},{key:"formatGroupLabel",value:function(r){return this.props.formatGroupLabel(r)}},{key:"startListeningComposition",value:(function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))})},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:(function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))})},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:(function(){var r=this.props,s=r.isDisabled,o=r.isSearchable,a=r.inputId,l=r.inputValue,c=r.tabIndex,d=r.form,f=r.menuIsOpen,m=r.required,p=this.getComponents(),g=p.Input,y=this.state,v=y.inputIsHidden,x=y.ariaSelection,C=this.commonProps,D=a||this.getElementId("input"),E=ft(ft(ft({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":m,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?x?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?M.createElement(g,vt({},C,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:D,innerRef:this.getInputRef,isDisabled:s,isHidden:v,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:d,type:"text",value:l},E)):M.createElement(i0e,vt({id:D,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:kw,onFocus:this.onInputFocus,disabled:s,tabIndex:c,inputMode:"none",form:d,value:""},E))})},{key:"renderPlaceholderOrValue",value:function(){var r=this,s=this.getComponents(),o=s.MultiValue,a=s.MultiValueContainer,l=s.MultiValueLabel,c=s.MultiValueRemove,d=s.SingleValue,f=s.Placeholder,m=this.commonProps,p=this.props,g=p.c
29ontrolShouldRenderValue,y=p.isDisabled,v=p.isMulti,x=p.inputValue,C=p.placeholder,D=this.state,E=D.selectValue,T=D.focusedValue,S=D.isFocused;if(!this.hasValue()||!g)return x?null:M.createElement(f,vt({},m,{key:"placeholder",isDisabled:y,isFocused:S,innerProps:{id:this.getElementId("placeholder")}}),C);if(v)return E.map(function(I,R){var O=I===T,j="".concat(r.getOptionLabel(I),"-").concat(r.getOptionValue(I));return M.createElement(o,vt({},m,{components:{Container:a,Label:l,Remove:c},isFocused:O,isDisabled:y,key:j,index:R,removeProps:{onClick:function(){return r.removeValue(I)},onTouchEnd:function(){return r.removeValue(I)},onMouseDown:function(U){U.preventDefault()}},data:I}),r.formatOptionLabel(I,"value"))});if(x)return null;var A=E[0];return M.createElement(d,vt({},m,{data:A,isDisabled:y}),this.formatOptionLabel(A,"value"))}},{key:"renderClearIndicator",value:function(){var r=this.getComponents(),s=r.ClearIndicator,o=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,d=this.state.isFocused;if(!this.isClearable()||!s||l||!this.hasValue()||c)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return M.createElement(s,vt({},o,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var r=this.getComponents(),s=r.LoadingIndicator,o=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,d=this.state.isFocused;if(!s||!c)return null;var f={"aria-hidden":"true"};return M.createElement(s,vt({},o,{innerProps:f,isDisabled:l,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var r=this.getComponents(),s=r.DropdownIndicator,o=r.IndicatorSeparator;if(!s||!o)return null;var a=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused;return M.createElement(o,vt({},a,{isDisabled:l,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var r=this.getComponents(),s=r.DropdownIndicator;if(!s)return null;var o=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return M.createElement(s,vt({},o,{innerProps:c,isDisabled:a,isFocused:l}))}},{key:"renderMenu",value:function(){var r=this,s=this.getComponents(),o=s.Group,a=s.GroupHeading,l=s.Menu,c=s.MenuList,d=s.MenuPortal,f=s.LoadingMessage,m=s.NoOptionsMessage,p=s.Option,g=this.commonProps,y=this.state.focusedOption,v=this.props,x=v.captureMenuScroll,C=v.inputValue,D=v.isLoading,E=v.loadingMessage,T=v.minMenuHeight,S=v.maxMenuHeight,A=v.menuIsOpen,I=v.menuPlacement,R=v.menuPosition,O=v.menuPortalTarget,j=v.menuShouldBlockScroll,B=v.menuShouldScrollIntoView,U=v.noOptionsMessage,F=v.onMenuScrollToTop,H=v.onMenuScrollToBottom;if(!A)return null;var L=function($,J){var ce=$.type,se=$.data,ge=$.isDisabled,ye=$.isSelected,Pe=$.label,Ve=$.value,Ze=y===se,dt=ge?void 0:function(){return r.onOptionHover(se)},Re=ge?void 0:function(){return r.selectOption(se)},N="".concat(r.getElementId("option"),"-").concat(J),te={id:N,onClick:Re,onMouseMove:dt,onMouseOver:dt,tabIndex:-1,role:"option","aria-selected":r.state.isAppleDevice?void 0:ye};return M.createElement(p,vt({},g,{innerProps:te,data:se,isDisabled:ge,isSelected:ye,key:N,label:Pe,type:ce,value:Ve,isFocused:Ze,innerRef:Ze?r.getFocusedOptionRef:void 0}),r.formatOptionLabel($.data,"menu"))},W;if(this.hasOptions())W=this.getCategorizedOptions().map(function(q){if(q.type==="group"){var $=q.data,J=q.options,ce=q.index,se="".concat(r.getElementId("group"),"-").concat(ce),ge="".concat(se,"-heading");return M.createElement(o,vt({},g,{key:se,data:$,options:J,Heading:a,headingProps:{id:ge,data:q.data},label:r.formatGroupLabel(q.data)}),q.options.map(function(ye){return L(ye,"".concat(ce,"-").concat(ye.index))}))}else if(q.type==="option")return L(q,"".concat(q.index))});else if(D){var G=E({inputValue:C});if(G===null)return null;W=M.createElement(f,g,G)}else{var Y=U({inputValue:C});if(Y===null)return null;W=M.createElement(m,g,Y)}var ie={minMenuHeight:T,maxMenuHeight:S,menuPlacement:I,menuPosition:R,menuShouldScrollIntoView:B},V=M.createElement(Npe,vt({},g,ie),function(q){var $=q.ref,J=q.placerProps,ce=J.placement,se=J.maxHeight;return M.createElement(l,vt({},g,ie,{innerRef:$,innerProps:{onMouseDown:r.onMenuMouseDown,onMouseMove:r.onMenuMouseMove},isLoading:D,placement:ce}),M.createElement(c0e,{captureEnabled:x,onTopArrive:F,onBottomArrive:H,lockEnabled:j},function(ge){return M.createElement(c,vt({},g,{innerRef:function(Pe){r.getMenuListRef(Pe),ge(Pe)},innerProps:{role:"listbox","aria-multiselectable":g.isMulti,id:r.getElementId("listbox")},isLoading:D,maxHeight:se,focusedOption:y}),W)}))});return O||R==="fixed"?M.createElement(d,vt({},g,{appendTo:O,controlElement:this.controlRef,menuPlacement:I,menuPosition:R}),V):V}},{key:"renderFormField",value:function(){var r=this,s=this.props,o=s.delimiter,a=s.isDisabled,l=s.isMulti,c=s.name,d=s.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!a)return M.createElement(f0e,{name:c,onFocus:this.onValueInputFocus});if(!(!c||a))if(l)if(o){var m=f.map(function(y){return r.getOptionValue(y)}).join(o);return M.createElement("input",{name:c,type:"hidden",value:m})}else{var p=f.length>0?f.map(function(y,v){return M.createElement("input",{key:"i-".concat(v),name:c,type:"hidden",value:r.getOptionValue(y)})}):M.createElement("input",{name:c,type:"hidden",value:""});return M.createElement("div",null,p)}else{var g=f[0]?this.getOptionValue(f[0]):"";return M.createElement("input",{name:c,type:"hidden",value:g})}}},{key:"renderLiveRegion",value:function(){var r=this.commonProps,s=this.state,o=s.ariaSelection,a=s.focusedOption,l=s.focusedValue,c=s.isFocused,d=s.selectValue,f=this.getFocusableOptions();return M.createElement(Qge,vt({},r,{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:a,focusedValue:l,isFocused:c,selectValue:d,focusableOptions:f,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var r=this.getComponents(),s=r.Control,o=r.IndicatorsContainer,a=r.SelectContainer,l=r.ValueContainer,c=this.props,d=c.className,f=c.id,m=c.isDisabled,p=c.menuIsOpen,g=this.state.isFocused,y=this.commonProps=this.getCommonProps();return M.createElement(a,vt({},y,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:m,isFocused:g}),this.renderLiveRegion(),M.createElement(s,vt({},y,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:m,isFocused:g,menuIsOpen:p}),M.createElement(l,vt({},y,{isDisabled:m}),this.renderPlaceholderOrValue(),this.renderInput()),M.createElement(o,vt({},y,{isDisabled:m}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(r,s){var o=s.prevProps,a=s.clearFocusValueOnUpdate,l=s.inputIsHiddenAfterUpdate,c=s.ariaSelection,d=s.isFocused,f=s.prevWasFocused,m=s.instancePrefix,p=r.options,g=r.value,y=r.menuIsOpen,v=r.inputValue,x=r.isMulti,C=AN(g),D={};if(o&&(g!==o.value||p!==o.options||y!==o.menuIsOpen||v!==o.inputValue)){var E=y?k0e(r,C):[],T=y?zN(h1(r,C),"".concat(m,"-option")):[],S=a?S0e(s,C):null,A=P0e(s,E),I=sE(T,A);D={selectValue:C,focusedOption:A,focusedOptionId:I,focusableOptionsWithIds:T,focusedValue:S,clearFocusValueOnUpdate:!1}}var R=l!=null&&r!==o?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},O=c,j=d&&f;return d&&!j&&(O={value:fy(x,C,C[0]||null),options:C,action:"initial-input-focus"},j=!f),c?.action==="initial-input-focus"&&(O=null),ft(ft(ft({},D),R),{},{prevProps:r,ariaSelection:O,prevWasFocused:j})}}]),t})(M.Component);f$.defaultProps=A0e;var R0e=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function F0e(i){var e=i.defaultInputValue,t=e===void 0?"":e,n=i.defaultMenuIsOpen,r=n===void 0?!1:n,s=i.defaultValue,o=s===void 0?null:s,a=i.inputValue,l=i.menuIsOpen,c=i.onChange,d=i.onInputChange,f=i.onMenuClose,m=i.onMenuOpen,p=i.value,g=Ra(i,R0e),y=M.useState(a!==void 0?a:t),v=Vi(y,2),x=v[0],C=v[1],D=M.use
29State(l!==void 0?l:r),E=Vi(D,2),T=E[0],S=E[1],A=M.useState(p!==void 0?p:o),I=Vi(A,2),R=I[0],O=I[1],j=M.useCallback(function(G,Y){typeof c=="function"&&c(G,Y),O(G)},[c]),B=M.useCallback(function(G,Y){var ie;typeof d=="function"&&(ie=d(G,Y)),C(ie!==void 0?ie:G)},[d]),U=M.useCallback(function(){typeof m=="function"&&m(),S(!0)},[m]),F=M.useCallback(function(){typeof f=="function"&&f(),S(!1)},[f]),H=a!==void 0?a:x,L=l!==void 0?l:T,W=p!==void 0?p:R;return ft(ft({},g),{},{inputValue:H,menuIsOpen:L,onChange:j,onInputChange:B,onMenuClose:F,onMenuOpen:U,value:W})}var O0e=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function N0e(i){var e=i.defaultOptions,t=e===void 0?!1:e,n=i.cacheOptions,r=n===void 0?!1:n,s=i.loadOptions;i.options;var o=i.isLoading,a=o===void 0?!1:o,l=i.onInputChange,c=i.filterOption,d=c===void 0?null:c,f=Ra(i,O0e),m=f.inputValue,p=M.useRef(void 0),g=M.useRef(!1),y=M.useState(Array.isArray(t)?t:void 0),v=Vi(y,2),x=v[0],C=v[1],D=M.useState(typeof m<"u"?m:""),E=Vi(D,2),T=E[0],S=E[1],A=M.useState(t===!0),I=Vi(A,2),R=I[0],O=I[1],j=M.useState(void 0),B=Vi(j,2),U=B[0],F=B[1],H=M.useState([]),L=Vi(H,2),W=L[0],G=L[1],Y=M.useState(!1),ie=Vi(Y,2),V=ie[0],q=ie[1],$=M.useState({}),J=Vi($,2),ce=J[0],se=J[1],ge=M.useState(void 0),ye=Vi(ge,2),Pe=ye[0],Ve=ye[1],Ze=M.useState(void 0),dt=Vi(Ze,2),Re=dt[0],N=dt[1];r!==Re&&(se({}),N(r)),t!==Pe&&(C(Array.isArray(t)?t:void 0),Ve(t)),M.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]);var te=M.useCallback(function(Q,le){if(!s)return le();var we=s(Q,le);we&&typeof we.then=="function"&&we.then(le,function(){return le()})},[s]);M.useEffect(function(){t===!0&&te(T,function(Q){g.current&&(C(Q||[]),O(!!p.current))})},[]);var ne=M.useCallback(function(Q,le){var we=vpe(Q,le,l);if(!we){p.current=void 0,S(""),F(""),G([]),O(!1),q(!1);return}if(r&&ce[we])S(we),F(we),G(ce[we]),O(!1),q(!1);else{var xe=p.current={};S(we),O(!0),q(!U),te(we,function(fe){g&&xe===p.current&&(p.current=void 0,O(!1),F(we),G(fe||[]),q(!1),se(fe?ft(ft({},ce),{},eh({},we,fe)):ce))})}},[r,te,U,ce,l]),Z=V?[]:T&&U?W:x||[];return ft(ft({},f),{},{options:Z,isLoading:R||a,onInputChange:ne,filterOption:d})}var B0e=M.forwardRef(function(i,e){var t=N0e(i),n=F0e(t);return M.createElement(f$,vt({ref:e},n))}),M0e=B0e;function h$({field:i,formStateData:e,handleChange:t,formError:n,titleShow:r=!0,rowIndex:s=null}){const{modeType:o}=_t(),a=async l=>i?.loadOptions?(await i.loadOptions(l,s)).map(d=>({value:d.id,label:d.value})):[];return w.jsxs(w.Fragment,{children:[o!=="list"&&o!=="trash"&&r&&w.jsxs("label",{children:[i?.title,i?.validate?.includes("required")&&w.jsx("em",{children:" *"}),i?.info&&w.jsx("span",{className:"info",children:i?.info})]}),w.jsx(M0e,{loadOptions:a,value:e?.[i?.name]||null,onChange:l=>{t(l,i),i?.cb&&i.cb(l,s)},isDisabled:i?.disabled,styles:{container:l=>({...l,...i?.attr?.style}),menuPortal:l=>({...l,zIndex:9999})},classNamePrefix:"autocomplete",menuPlacement:"auto",menuPosition:"fixed",maxMenuHeight:200,className:i?.attr?.class||"",classNames:{control:()=>n?.[i?.name]?"autocomplete-error":""}}),n?.[i?.name]&&w.jsx("p",{className:"e",children:n?.[i?.name]})]})}const L0e=({control:i,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r,frmGroupName:s})=>{const o=()=>{const m={};return i?.fields?.forEach(p=>{p.name&&(p.type==="checkbox"&&p.options?m[p.name]=[]:p.type==="checkbox"&&!p.options?m[p.name]=!1:p.type==="file"?m[p.name]=[]:p.type==="fileBase64"?m[p.name]=[]:m[p.name]=p.value??"")}),m};M.useEffect(()=>{(!e[i?.frmGroup]||!Array.isArray(e[i.frmGroup]))&&t(m=>({...m,[i.frmGroup]:[o()]}))},[i]);const a=()=>{const m=o();t(p=>({...p,[i.frmGroup]:[...p[i.frmGroup]||[],m]}))},l=m=>{m===0&&e[i.frmGroup].length===1?t(p=>({...p,[i.frmGroup]:[o()]})):t(p=>({...p,[i.frmGroup]:p[i.frmGroup].filter((g,y)=>y!==m)}))},c=(m,p,g)=>{let y;if(p.type==="file")if(m.target.files)if(p?.params?.multiple){const v=m.target.files,x=v?Array.from(v)?.map(D=>({file:D,type:"new",name:D.name,ext:D.name?.split(".")?.pop()||""})):[];y=(e[i.frmGroup][g][p.name]||[]).concat(x)}else{const v=m.target.files&&m.target.files[0]?{file:m.target.files[0],type:"new",name:m.target.files[0].name,ext:m.target.files[0].name?.split(".")?.pop()||""}:null;y=v?[v]:[]}else y=m.target.value;else if(p.type==="checkbox"&&!p.options)y=m.target.checked;else if(p.type==="checkbox"&&p.options){let v=e[i.frmGroup][g][p.name]||[];m.target.checked?v.push(Number(m.target.value)):v=v.filter(x=>x!==Number(m.target.value)),y=v}else["date","time","datetime","editor"].includes(p.type)||p?.type=="async-select"?y=m:y=m.target.value;if(t(v=>{const x=[...v[i.frmGroup]];return x[g]={...x[g],[p.name]:y},{...v,[i.frmGroup]:x}}),p.validate){const v={[p.name]:y},x=`${i?.frmGroup}[${g}].${p.name}`;_w(y,p,n,r,v,x)}},d=(m,p)=>{const g=e?.[i?.frmGroup]?.[p]?.[m.name],y={[m.name]:g},v={field:m,frmGroupName:s,formStateData:y,setFormStateData:x=>{const C=x({[m.name]:g})[m.name];c({target:{value:C}},m,p)},handleChange:x=>c(x,m,p),formError:{[`${m.name}`]:n[`${i?.frmGroup}[${p}].${m?.name}`]},titleShow:!1,rowIndex:p};switch(m.type){case"text":case"password":return w.jsx(gq,{...v});case"select":return w.jsx(vq,{...v});case"async-select":return w.jsx(h$,{...v});case"radio":return w.jsx(bq,{...v});case"checkbox":return w.jsx(yq,{...v});case"textarea":return w.jsx(wq,{...v});default:return null}},f=e[i.frmGroup]||[];return w.jsxs("table",{className:`grp-wrap tbl-list ${i?.attrp?.class}`,cellSpacing:"0",cellPadding:"8",width:"100%",style:i?.attrp?.style?i?.attrp?.style:{},children:[w.jsx("thead",{children:w.jsxs("tr",{children:[i.fields.map((m,p)=>m.type!=="ac-hidden"&&m.type!=="hidden"?w.jsx("th",{className:m.attrp?.class,style:m.attrp?.style,align:m.attrp?.align,children:m.title},p):null),w.jsx("th",{align:"center",className:"add-grp",children:w.jsx("a",{href:"#",className:"add add-set",onClick:m=>{m.preventDefault(),a()}})})]})}),w.jsx("tbody",{children:f.map((m,p)=>w.jsxs("tr",{className:"grp-set",children:[i.fields.map((g,y)=>g.type!=="ac-hidden"&&g.type!=="hidden"?w.jsx("td",{className:`${g.attrp?.class||""} ${n?.[`${i.frmGroup}[${p}].${g.name}`]?"err":""}`,style:g.attrp?.style,width:g.attrp?.width,align:g.attrp?.align,colSpan:g.attrp?.colspan,children:d(g,p)},y):null),w.jsx("td",{align:"center",width:"1%",className:"del-grp",children:w.jsx("a",{href:"#",className:"del row",onClick:g=>{g.preventDefault(),l(p)}})})]},p))})]})},U0e=i=>w.jsx(In,{...i});function V0e({field:i,formStateData:e,setFormStateData:t,formError:n,titleShow:r=!0}){const{modeType:s}=_t();M.useEffect(()=>{},[e]);const o=M.useRef(null),a=()=>{o.current?.click()},l=g=>new Promise((y,v)=>{const x=new FileReader;x.readAsDataURL(g),x.onload=()=>{const C=x.result;y(C)},x.onerror=C=>v(C)}),c=async g=>{const y=g.target.files;if(y)try{if(i?.params?.multiple){const v=[];for(let D=0;D<y.length;D++){const E=y[D],T=await l(E);v.push({file:T,type:"new",name:E.name,size:E.size,ext:E.name?.split(".")?.pop()||"",originalFile:E})}const C=(e[i.name]||[]).concat(v);t(D=>({...D,[i.name]:C}))}else{const v=y[0],C={file:await l(v),type:"new",name:v.name,size:v.size,ext:v.name?.split(".")?.pop()||"",originalFile:v};t(D=>({...D,[i.name]:[C]}))}}catch(v){console.error("Error converting file to base64:",v)}},d=g=>{i?.params?.multiple?t(y=>({...y,[i.name]:y[i.name].filter((v,x)=>x!==g)})):t(y=>({...y,[i.name]:null}))},f=async(g,y)=>{g?.preventDefault(),y!==void 0&&d(y)},m=g=>
29{if(g?.type==="new"&&g.originalFile)return URL.createObjectURL(g.originalFile);if(g?.type==="old"&&g.file)return g.file;if(g.file)try{const y=atob(g.file),v=new Array(y.length);for(let D=0;D<y.length;D++)v[D]=y.charCodeAt(D);const x=new Uint8Array(v),C=new Blob([x]);return URL.createObjectURL(C)}catch(y){return console.error("Error creating preview URL:",y),""}return""},p=g=>{if(g===0)return"0 Bytes";const y=1024,v=["Bytes","KB","MB","GB"],x=Math.floor(Math.log(g)/Math.log(y));return parseFloat((g/Math.pow(y,x)).toFixed(2))+" "+v[x]};return w.jsxs(w.Fragment,{children:[s!=="list"&&s!=="trash"&&r?w.jsxs("label",{children:[i?.title,i?.validate?.includes("required")&&w.jsx("em",{children:" *"}),i?.info&&w.jsx("span",{className:"info",dangerouslySetInnerHTML:{__html:i?.info||""}})]}):w.jsx(w.Fragment,{}),w.jsxs("div",{className:"mx-file-upload mx-file-base64",children:[w.jsxs("div",{className:"drop",children:[w.jsxs("a",{onClick:a,children:["Browse",w.jsx("br",{})," OR ",w.jsx("br",{})," Drop Here"]}),w.jsx("input",{ref:o,type:"file",name:i?.name,className:`${i?.attr?.class||""}`,style:i?.attr?.style?i?.attr?.style:void 0,id:i?.attr?.id?i?.attr?.id:void 0,title:i?.title,placeholder:i?.title,onChange:c,...i?.params?.multiple?{multiple:!0}:{},...i?.params?.accept?{accept:i?.params?.accept}:{}})]}),w.jsx("ul",{children:e[i?.name]&&Array.isArray(e[i.name])?e[i?.name].map((g,y)=>w.jsxs("li",{title:`${g?.size?p(g.size):"Unknown size"} : ${g?.name}`,children:[w.jsx(In,{to:"#",className:"del rs",onClick:v=>f(v,y)}),w.jsx(U0e,{to:m(g),target:"_blank",ext:g?.ext||"file",children:w.jsx("img",{src:m(g),alt:g?.name,onError:v=>{const x=v.target;x.style.display="none",x.parentElement.innerHTML+=`<div class="file-icon">${g?.ext?.toUpperCase()||"FILE"}</div>`}})})]},y)):null})]}),n?.[i?.name]&&w.jsx("p",{className:"e",children:n?.[i?.name]})]})}function j0e({field:i,rowIndex:e=null}){return w.jsx(w.Fragment,{children:w.jsx("div",{title:i?.title,className:"mx-button-wrapper",children:w.jsx("button",{type:i?.attr?.type||"button",className:`${i?.attr?.class||""}`,style:i?.attr?.style||void 0,id:i?.attr?.id||void 0,name:e!==null?`${i.name}-${e}`:i.name,onClick:i?.cb?t=>i.cb(t):void 0,children:i?.label||"Submit"})})})}const z0e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},W0e=(i,e,t)=>{let n;const r=z0e[i];return typeof r=="string"?n=r:e===1?n=r.one:n=r.other.replace("{{count}}",e.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function oE(i){return(e={})=>{const t=e.width?String(e.width):i.defaultWidth;return i.formats[t]||i.formats[i.defaultWidth]}}const H0e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},q0e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$0e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},G0e={date:oE({formats:H0e,defaultWidth:"full"}),time:oE({formats:q0e,defaultWidth:"full"}),dateTime:oE({formats:$0e,defaultWidth:"full"})},Y0e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},K0e=(i,e,t,n)=>Y0e[i];function sp(i){return(e,t)=>{const n=t?.context?String(t.context):"standalone";let r;if(n==="formatting"&&i.formattingValues){const o=i.defaultFormattingWidth||i.defaultWidth,a=t?.width?String(t.width):o;r=i.formattingValues[a]||i.formattingValues[o]}else{const o=i.defaultWidth,a=t?.width?String(t.width):i.defaultWidth;r=i.values[a]||i.values[o]}const s=i.argumentCallback?i.argumentCallback(e):e;return r[s]}}const X0e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Q0e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Z0e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},J0e={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
29ay","Saturday"]},ebe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},tbe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},nbe=(i,e)=>{const t=Number(i),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},ibe={ordinalNumber:nbe,era:sp({values:X0e,defaultWidth:"wide"}),quarter:sp({values:Q0e,defaultWidth:"wide",argumentCallback:i=>i-1}),month:sp({values:Z0e,defaultWidth:"wide"}),day:sp({values:J0e,defaultWidth:"wide"}),dayPeriod:sp({values:ebe,defaultWidth:"wide",formattingValues:tbe,defaultFormattingWidth:"wide"})};function op(i){return(e,t={})=>{const n=t.width,r=n&&i.matchPatterns[n]||i.matchPatterns[i.defaultMatchWidth],s=e.match(r);if(!s)return null;const o=s[0],a=n&&i.parsePatterns[n]||i.parsePatterns[i.defaultParseWidth],l=Array.isArray(a)?sbe(a,f=>f.test(o)):rbe(a,f=>f.test(o));let c;c=i.valueCallback?i.valueCallback(l):l,c=t.valueCallback?t.valueCallback(c):c;const d=e.slice(o.length);return{value:c,rest:d}}}function rbe(i,e){for(const t in i)if(Object.prototype.hasOwnProperty.call(i,t)&&e(i[t]))return t}function sbe(i,e){for(let t=0;t<i.length;t++)if(e(i[t]))return t}function obe(i){return(e,t={})=>{const n=e.match(i.matchPattern);if(!n)return null;const r=n[0],s=e.match(i.parsePattern);if(!s)return null;let o=i.valueCallback?i.valueCallback(s[0]):s[0];o=t.valueCallback?t.valueCallback(o):o;const a=e.slice(r.length);return{value:o,rest:a}}}const abe=/^(\d+)(th|st|nd|rd)?/i,lbe=/\d+/i,cbe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ube={any:[/^b/i,/^(a|c)/i]},dbe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fbe={any:[/1/i,/2/i,/3/i,/4/i]},hbe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},mbe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},pbe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},gbe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},bbe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ybe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},vbe={ordinalNumber:obe({matchPattern:abe,parsePattern:lbe,valueCallback:i=>parseInt(i,10)}),era:op({matchPatterns:cbe,defaultMatchWidth:"wide",parsePatterns:ube,defaultParseWidth:"any"}),quarter:op({matchPatterns:dbe,defaultMatchWidth:"wide",parsePatterns:fbe,defaultParseWidth:"any",valueCallback:i=>i+1}),month:op({matchPatterns:hbe,defaultMatchWidth:"wide",parsePatterns:mbe,defaultParseWidth:"any"}),day:op({matchPatterns:pbe,defaultMatchWidth:"wide",parsePatterns:gbe,defaultParseWidth:"any"}),dayPeriod:op({matchPatterns:bbe,defaultMatchWidth:"any",parsePatterns:ybe,defaultParseWidth:"any"})},m$={code:"en-US",formatDistance:W0e,formatLong:G0e,formatRelative:K0e,localize:ibe,match:vbe,options:{weekStartsOn:0,firstWeekContainsDate:1}};let wbe={};function md(){return wbe}const p$=6048e5,xbe=864e5,s_=6e4,o_=36e5,_be=1e3,HN=Symbol.for("constructDateFrom");function _n(i,e){return typeof i=="function"?i(e):i&&typeof i=="object"&&HN in i?i[HN](e):i instanceof Date?new i.constructor(e):new Date(e)}function ct(i,e){return _n(e||i,i)}function Iw(i){const e=ct(i),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+i-+t}function zl(i,...e){const t=_n.bind(null,e.find(n=>typeof n=="object"));return e.map(t)}function ad(i,e){const t=ct(i,e?.in);return t.setHours(0,0,0,0),t}function Ah(i,e,t){const[n,r]=zl(t?.in,i,e),s=ad(n),o=ad(r),a=+s-Iw(s),l=+o-Iw(o);
vendor: 7,024 bytes, line 29
29return Math.round((a-l)/xbe)}function a_(i,e){const t=ct(i,e?.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Cbe(i,e){const t=ct(i,e?.in);return Ah(t,a_(t))+1}function Pl(i,e){const t=md(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,r=ct(i,e?.in),s=r.getDay(),o=(s<n?7:0)+s-n;return r.setDate(r.getDate()-o),r.setHours(0,0,0,0),r}function kh(i,e){return Pl(i,{...e,weekStartsOn:1})}function g$(i,e){const t=ct(i,e?.in),n=t.getFullYear(),r=_n(t,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=kh(r),o=_n(t,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const a=kh(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Dbe(i,e){const t=g$(i,e),n=_n(i,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),kh(n)}function f3(i,e){const t=ct(i,e?.in),n=+kh(t)-+Dbe(t);return Math.round(n/p$)+1}function h3(i,e){const t=ct(i,e?.in),n=t.getFullYear(),r=md(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=_n(e?.in||i,0);o.setFullYear(n+1,0,s),o.setHours(0,0,0,0);const a=Pl(o,e),l=_n(e?.in||i,0);l.setFullYear(n,0,s),l.setHours(0,0,0,0);const c=Pl(l,e);return+t>=+a?n+1:+t>=+c?n:n-1}function Ebe(i,e){const t=md(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,r=h3(i,e),s=_n(e?.in||i,0);return s.setFullYear(r,0,n),s.setHours(0,0,0,0),Pl(s,e)}function b$(i,e){const t=ct(i,e?.in),n=+Pl(t,e)-+Ebe(t,e);return Math.round(n/p$)+1}function wn(i,e){const t=i<0?"-":"",n=Math.abs(i).toString().padStart(e,"0");return t+n}const gc={y(i,e){const t=i.getFullYear(),n=t>0?t:1-t;return wn(e==="yy"?n%100:n,e.length)},M(i,e){const t=i.getMonth();return e==="M"?String(t+1):wn(t+1,2)},d(i,e){return wn(i.getDate(),e.length)},a(i,e){const t=i.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];default:return t==="am"?"a.m.":"p.m."}},h(i,e){return wn(i.getHours()%12||12,e.length)},H(i,e){return wn(i.getHours(),e.length)},m(i,e){return wn(i.getMinutes(),e.length)},s(i,e){return wn(i.getSeconds(),e.length)},S(i,e){const t=e.length,n=i.getMilliseconds(),r=Math.trunc(n*Math.pow(10,t-3));return wn(r,e.length)}},wf={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},qN={G:function(i,e,t){const n=i.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});default:return t.era(n,{width:"wide"})}},y:function(i,e,t){if(e==="yo"){const n=i.getFullYear(),r=n>0?n:1-n;return t.ordinalNumber(r,{unit:"year"})}return gc.y(i,e)},Y:function(i,e,t,n){const r=h3(i,n),s=r>0?r:1-r;if(e==="YY"){const o=s%100;return wn(o,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):wn(s,e.length)},R:function(i,e){const t=g$(i);return wn(t,e.length)},u:function(i,e){const t=i.getFullYear();return wn(t,e.length)},Q:function(i,e,t){const n=Math.ceil((i.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return wn(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(i,e,t){const n=Math.ceil((i.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return wn(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(i,e,t){const n=i.getMonth();switch(e){case"M":case"MM":return gc.M(i,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(i,e,t){const n=i.getMonth();switch(e){case"L":return String(n+1);case"LL":return wn(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(i,e,t,n){const r=b$(i,n);return e==="wo"?t.ordinalNumber(r,{unit:"week"}):wn(r,e.length)},I:function(i,e,t){const n=f3(i);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):wn(n,e.length)},d:function(i,e,t){return e==="do"?t.ordinalNumber(i.getDate(),{unit:"date"}):gc.d(i,e)},D:function(i,e,t){const n=Cbe(i);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):wn(n,e.length)},E:function(i,e,t){const n=i.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(i,e,t,n){const r=i.getDay(),s=(r-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return wn(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(r,{width:"short",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})}},c:function(i,e,t,n){const r=i.getDay(),s=(r-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return wn(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(r,{width:"narrow",context:"standalone"});case"cccccc":return t.day(r,{width:"short",context:"standalone"});default:return t.day(r,{width:"wide",context:"standalone"})}},i:function(i,e,t){const n=i.getDay(),r=n===0?7:n;switch(e){case"i":return String(r);case"ii":return wn(r,e.length);case"io":return t.ordinalNumber(r,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(i,e,t){const r=i.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(i,e,t){const n=i.getHours();let r;switch(n===12?r=wf.noon:n===0?r=wf.midnight:r=n/12>
vendor: 4,502 bytes, line 29
29=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(r,{width:"narrow",context:"formatting"});default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(i,e,t){const n=i.getHours();let r;switch(n>=17?r=wf.evening:n>=12?r=wf.afternoon:n>=4?r=wf.morning:r=wf.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(r,{width:"narrow",context:"formatting"});default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(i,e,t){if(e==="ho"){let n=i.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return gc.h(i,e)},H:function(i,e,t){return e==="Ho"?t.ordinalNumber(i.getHours(),{unit:"hour"}):gc.H(i,e)},K:function(i,e,t){const n=i.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):wn(n,e.length)},k:function(i,e,t){let n=i.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):wn(n,e.length)},m:function(i,e,t){return e==="mo"?t.ordinalNumber(i.getMinutes(),{unit:"minute"}):gc.m(i,e)},s:function(i,e,t){return e==="so"?t.ordinalNumber(i.getSeconds(),{unit:"second"}):gc.s(i,e)},S:function(i,e){return gc.S(i,e)},X:function(i,e,t){const n=i.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return GN(n);case"XXXX":case"XX":return Bu(n);default:return Bu(n,":")}},x:function(i,e,t){const n=i.getTimezoneOffset();switch(e){case"x":return GN(n);case"xxxx":case"xx":return Bu(n);default:return Bu(n,":")}},O:function(i,e,t){const n=i.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+$N(n,":");default:return"GMT"+Bu(n,":")}},z:function(i,e,t){const n=i.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+$N(n,":");default:return"GMT"+Bu(n,":")}},t:function(i,e,t){const n=Math.trunc(+i/1e3);return wn(n,e.length)},T:function(i,e,t){return wn(+i,e.length)}};function $N(i,e=""){const t=i>0?"-":"+",n=Math.abs(i),r=Math.trunc(n/60),s=n%60;return s===0?t+String(r):t+String(r)+e+wn(s,2)}function GN(i,e){return i%60===0?(i>0?"-":"+")+wn(Math.abs(i)/60,2):Bu(i,e)}function Bu(i,e=""){const t=i>0?"-":"+",n=Math.abs(i),r=wn(Math.trunc(n/60),2),s=wn(n%60,2);return t+r+e+s}const YN=(i,e)=>{switch(i){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},y$=(i,e)=>{switch(i){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Tbe=(i,e)=>{const t=i.match(/(P+)(p+)?/)||[],n=t[1],r=t[2];if(!r)return YN(i,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",YN(n,e)).replace("{{time}}",y$(r,e))},Xk={p:y$,P:Tbe},Abe=/^D+$/,kbe=/^Y+$/,Sbe=["D","DD","YY","YYYY"];function Pbe(i){return Abe.test(i)}function Ibe(i){return kbe.test(i)}function Rbe(i,e,t){const n=Fbe(i,e,t);if(console.warn(n),Sbe.includes(i))throw new RangeError(n)}function Fbe(i,e,t){const n=i[0]==="Y"?"years":"days of the month";return`Use \`${i.toLowerCase()}\` instead of \`${i}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function wa(i){return i instanceof Date||typeof i=="object"&&Object.prototype.toString.call(i)==="[object Date]"}function Sh(i){return!(!wa(i)&&typeof i!="number"||isNaN(+ct(i)))}const Obe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Nbe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bbe=/^'([^]*?)'?$/,Mbe=/''/g,Lbe=/[a-zA-Z]/;function Rw(i,e,t){const n=md(),r=t?.locale??n.locale??m$,s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=ct(i,t?.in);if(!Sh(a))throw new RangeError("Invalid time value");let l=e.match(Nbe).map(d=>{const f=d[0];if(f==="p"||f==="P"){const m=Xk[f];return m(d,r.formatLong)}return d}).join("").match(Obe).map(d=>{if(d==="''")return{isToken:!1,value:"'"};const f=d[0];if(f==="'")return{isToken:!1,value:Ube(d)};if(qN[f])return{isToken:!0,value:d};
29if(f.match(Lbe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});r.localize.preprocessor&&(l=r.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:o,locale:r};return l.map(d=>{if(!d.isToken)return d.value;const f=d.value;(!t?.useAdditionalWeekYearTokens&&Ibe(f)||!t?.useAdditionalDayOfYearTokens&&Pbe(f))&&Rbe(f,e,String(i));const m=qN[f[0]];return m(a,f,r.localize,c)}).join("")}function Ube(i){const e=i.match(Bbe);return e?e[1].replace(Mbe,"'"):i}function Oo(i,e,t){const n=ct(i,t?.in);return isNaN(e)?_n(t?.in||i,NaN):(e&&n.setDate(n.getDate()+e),n)}function Vo(i,e,t){const n=ct(i,t?.in);if(isNaN(e))return _n(i,NaN);if(!e)return n;const r=n.getDate(),s=_n(i,n.getTime());s.setMonth(n.getMonth()+e+1,0);const o=s.getDate();return r>=o?s:(n.setFullYear(s.getFullYear(),s.getMonth(),r),n)}function v$(i,e,t){return _n(i,+ct(i)+e)}function Vbe(i,e,t){return v$(i,e*o_)}function Ag(i,e,t){const n=ct(i,t?.in);return n.setTime(n.getTime()+e*s_),n}function m3(i,e,t){return Vo(i,e*3,t)}function jbe(i,e,t){return v$(i,e*1e3)}function Fw(i,e,t){return Oo(i,e*7,t)}function No(i,e,t){return Vo(i,e*12,t)}function KN(i,e){let t,n=e?.in;return i.forEach(r=>{!n&&typeof r=="object"&&(n=_n.bind(null,r));const s=ct(r,n);(!t||t<s||isNaN(+s))&&(t=s)}),_n(n,t||NaN)}function XN(i,e){let t,n=e?.in;return i.forEach(r=>{!n&&typeof r=="object"&&(n=_n.bind(null,r));const s=ct(r,n);(!t||t>s||isNaN(+s))&&(t=s)}),_n(n,t||NaN)}function zbe(i,e,t){const[n,r]=zl(t?.in,i,e);return+ad(n)==+ad(r)}function Ow(i,e,t){const[n,r]=zl(t?.in,i,e),s=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return s*12+o}function Sc(i,e){const t=ct(i,e?.in);return Math.trunc(t.getMonth()/3)+1}function Nw(i,e,t){const[n,r]=zl(t?.in,i,e),s=n.getFullYear()-r.getFullYear(),o=Sc(n)-Sc(r);return s*4+o}function Bw(i,e,t){const[n,r]=zl(t?.in,i,e);return n.getFullYear()-r.getFullYear()}function Wbe(i,e,t){const[n,r]=zl(t?.in,i,e),s=QN(n,r),o=Math.abs(Ah(n,r));n.setDate(n.getDate()-s*o);const a=+(QN(n,r)===-s),l=s*(o-a);return l===0?0:l}function QN(i,e){const t=i.getFullYear()-e.getFullYear()||i.getMonth()-e.getMonth()||i.getDate()-e.getDate()||i.getHours()-e.getHours()||i.getMinutes()-e.getMinutes()||i.getSeconds()-e.getSeconds()||i.getMilliseconds()-e.getMilliseconds();return t<0?-1:t>0?1:t}function w$(i,e){const t=ct(i,e?.in);return t.setHours(23,59,59,999),t}function x$(i,e){const t=ct(i,e?.in),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Qk(i,e){const t=ct(i,e?.in),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function _$(i,e){const t=ct(i,e?.in);return t.setDate(1),t.setHours(0,0,0,0),t}function C$(i,e){const t=ct(i,e?.in),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function Hbe(i,e){const t=md(),n=t.weekStartsOn??t.locale?.options?.weekStartsOn??0,r=ct(i,e?.in),s=r.getDay(),o=(s<n?-7:0)+6-(s-n);return r.setDate(r.getDate()+o),r.setHours(23,59,59,999),r}function ZN(i,e){return ct(i,e?.in).getDate()}function qbe(i,e){return ct(i,e?.in).getDay()}function $be(i,e){const t=ct(i,e?.in),n=t.getFullYear(),r=t.getMonth(),s=_n(t,0);return s.setFullYear(n,r+1,0),s.setHours(0,0,0,0),s.getDate()}function Gbe(){return Object.assign({},md())}function fr(i,e){return ct(i,e?.in).getHours()}function Ybe(i,e){const t=ct(i,e?.in).getDay();return t===0?7:t}function hr(i,e){return ct(i,e?.in).getMinutes()}function es(i,e){return ct(i,e?.in).getMonth()}function Ic(i){return ct(i).getSeconds()}function Zk(i){return+ct(i)}function jt(i,e){return ct(i,e?.in).getFullYear()}function wl(i,e){return+ct(i)>+ct(e)}function pa(i,e){return+ct(i)<+ct(e)}function Kbe(i,e){return+ct(i)==+ct(e)}function Xbe(i,e){const t=Qbe(e)?new e(0):_n(e,0);return t.setFullYear(i.getFullYear(),i.getMonth(),i.getDate()),t.setHours(i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()),t}function Qbe(i){return typeof i=="function"&&i.prototype?.constructor===i}const Zbe=10;class D${subPriority=0;validate(e,t){return!0}}
29class Jbe extends D${constructor(e,t,n,r,s){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,s&&(this.subPriority=s)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class eye extends D${priority=Zbe;subPriority=-1;constructor(e,t){super(),this.context=e||(n=>_n(t,n))}set(e,t){return t.timestampIsSet?e:_n(e,Xbe(e,this.context))}}class un{run(e,t,n,r){const s=this.parse(e,t,n,r);return s?{setter:new Jbe(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(e,t,n){return!0}}class tye extends un{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const mi={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ha={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function pi(i,e){return i&&{value:e(i.value),rest:i.rest}}function Qn(i,e){const t=e.match(i);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function ma(i,e){const t=e.match(i);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};const n=t[1]==="+"?1:-1,r=t[2]?parseInt(t[2],10):0,s=t[3]?parseInt(t[3],10):0,o=t[5]?parseInt(t[5],10):0;return{value:n*(r*o_+s*s_+o*_be),rest:e.slice(t[0].length)}}function E$(i){return Qn(mi.anyDigitsSigned,i)}function ai(i,e){switch(i){case 1:return Qn(mi.singleDigit,e);case 2:return Qn(mi.twoDigits,e);case 3:return Qn(mi.threeDigits,e);case 4:return Qn(mi.fourDigits,e);default:return Qn(new RegExp("^\\d{1,"+i+"}"),e)}}function Mw(i,e){switch(i){case 1:return Qn(mi.singleDigitSigned,e);case 2:return Qn(mi.twoDigitsSigned,e);case 3:return Qn(mi.threeDigitsSigned,e);case 4:return Qn(mi.fourDigitsSigned,e);default:return Qn(new RegExp("^-?\\d{1,"+i+"}"),e)}}function p3(i){switch(i){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function T$(i,e){const t=e>0,n=t?e:1-e;let r;if(n<=50)r=i||100;else{const s=n+50,o=Math.trunc(s/100)*100,a=i>=s%100;r=i+o-(a?100:0)}return t?r:1-r}function A$(i){return i%400===0||i%4===0&&i%100!==0}class nye extends un{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const r=s=>({year:s,isTwoDigitYear:t==="yy"});switch(t){case"y":return pi(ai(4,e),r);case"yo":return pi(n.ordinalNumber(e,{unit:"year"}),r);default:return pi(ai(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const o=T$(n.year,r);return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}const s=!("era"in t)||t.era===1?n.year:1-n.year;return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}}class iye extends un{priority=130;parse(e,t,n){const r=s=>({year:s,isTwoDigitYear:t==="YY"});switch(t){case"Y":return pi(ai(4,e),r);case"Yo":return pi(n.ordinalNumber(e,{unit:"year"}),r);default:return pi(ai(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const s=h3(e,r);if(n.isTwoDigitYear){const a=T$(n.year,s);return e.setFullYear(a,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Pl(e,r)}const o=!("era"in t)||t.era===1?n.year:1-n.year;return e.setFullYear(o,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Pl(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class rye extends un{priority=130;parse(e,t){return Mw(t==="R"?4:t.length,e)}set(e,t,n){const r=_n(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),kh(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class sye extends un{priority=130;parse(e,t){return Mw(t==="u"?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class oye extends un{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return ai(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class aye extends un{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return ai(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class lye extends un{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const r=s=>s-1;switch(t){case"M":return pi(Qn(mi.month,e),r);case"MM":return pi(ai(2,e),r);case"Mo":return pi(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}}class cye extends un{priority=110;parse(e,t,n){const r=s=>s-1;switch(t){case"L":return pi(Qn(mi.month,e),r);case"LL":return pi(ai(2,e),r);case"Lo":return pi(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function uye(i,e,t){const n=ct(i,t?.in),r=b$(n,t)-e;return n.setDate(n.getDate()-r*7),ct(n,t?.in)}class dye extends un{priority=100;parse(e,t,n){switch(t){case"w":return Qn(mi.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return ai(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return Pl(uye(e,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function fye(i,e,t){const n=ct(i,t?.in),r=f3(n,t)-e;return n.setDate(n.getDate()-r*7),n}class hye extends un{priority=100;parse(e,t,n){switch(t){case"I":return Qn(mi.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return ai(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return kh(fye(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const mye=[31,28,31,30,31,30,31,31,30,31,30,31],pye=[31,29,31,30,31,30,31,31,30,31,30,31];class gye extends un{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return Qn(mi.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return ai(t.length,e)}}validate(e,t){const n=e.getFullYear(),r=A$(n),s=e.getMonth();return r?t>=1&&t<=pye[s]:t>=1&&t<=mye[s]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class bye extends un{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return Qn(mi.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return ai(t.length,e)}}validate(e,t){const n=e.getFullYear();return A$(n)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function g3(i,e,t){const n=md(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=ct(i,t?.in),o=s.getDay(),l=(e%7+7)%7,c=7-r,d=e<0||e>6?e-(o+c)%7:(l+c)%7-(o+c)%7;return Oo(s,d,t)}class yye extends un{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=g3(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class vye extends un{priority=90;parse(e,t,n,r){const s=o=>{const a=Math.floor((o-1)/7)*7;return(o+r.weekStartsOn+6)%7+a};switch(t){case"e":case"ee":return pi(ai(t.length,e),s);case"eo":return pi(n.ordinalNumber(e,{unit:"day"}),s);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=g3(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class wye extends un{priority=90;parse(e,t,n,r){const s=o=>{const a=Math.floor((o-1)/7)*7;return(o+r.weekStartsOn+6)%7+a};switch(t){case"c":case"cc":return pi(ai(t.length,e),s);case"co":return pi(n.ordinalNumber(e,{unit:"day"}),s);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return e=g3(e,n,r),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function xye(i,e,t){const n=ct(i,t?.in),r=Ybe(n,t),s=e-r;return Oo(n,s,t)}class _ye extends un{priority=90;parse(e,t,n){const r=s=>s===0?7:s;switch(t){case"i":case"ii":return ai(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return pi(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return pi(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return pi(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return pi(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return e=xye(e,n),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class Cye extends un{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(p3(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class Dye extends un{priority=80;
29parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(p3(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class Eye extends un{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(p3(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class Tye extends un{priority=70;parse(e,t,n){switch(t){case"h":return Qn(mi.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return ai(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):!r&&n===12?e.setHours(0,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class Aye extends un{priority=70;parse(e,t,n){switch(t){case"H":return Qn(mi.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return ai(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class kye extends un{priority=70;parse(e,t,n){switch(t){case"K":return Qn(mi.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return ai(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class Sye extends un{priority=70;parse(e,t,n){switch(t){case"k":return Qn(mi.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return ai(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class Pye extends un{priority=60;parse(e,t,n){switch(t){case"m":return Qn(mi.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return ai(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]}class Iye extends un{priority=50;parse(e,t,n){switch(t){case"s":return Qn(mi.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return ai(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]}class Rye extends un{priority=30;parse(e,t){const n=r=>Math.trunc(r*Math.pow(10,-t.length+3));return pi(ai(t.length,e),n)}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]}class Fye extends un{priority=10;parse(e,t){switch(t){case"X":return ma(ha.basicOptionalMinutes,e);case"XX":return ma(ha.basic,e);case"XXXX":return ma(ha.basicOptionalSeconds,e);case"XXXXX":return ma(ha.extendedOptionalSeconds,e);default:return ma(ha.extended,e)}}set(e,t,n){return t.timestampIsSet?e:_n(e,e.getTime()-Iw(e)-n)}incompatibleTokens=["t","T","x"]}class Oye extends un{priority=10;parse(e,t){switch(t){case"x":return ma(ha.basicOptionalMinutes,e);case"xx":return ma(ha.basic,e);case"xxxx":return ma(ha.basicOptionalSeconds,e);case"xxxxx":return ma(ha.extendedOptionalSeconds,e);default:return ma(ha.extended,e)}}set(e,t,n){return t.timestampIsSet?e:_n(e,e.getTime()-Iw(e)-n)}incompatibleTokens=["t","T","X"]}class Nye extends un{priority=40;parse(e){return E$(e)}set(e,t,n){return[_n(e,n*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Bye extends un{priority=20;parse(e){return E$(e)}set(e,t,n){return[_n(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}
29const Mye={G:new tye,y:new nye,Y:new iye,R:new rye,u:new sye,Q:new oye,q:new aye,M:new lye,L:new cye,w:new dye,I:new hye,d:new gye,D:new bye,E:new yye,e:new vye,c:new wye,i:new _ye,a:new Cye,b:new Dye,B:new Eye,h:new Tye,H:new Aye,K:new kye,k:new Sye,m:new Pye,s:new Iye,S:new Rye,X:new Fye,x:new Oye,t:new Nye,T:new Bye},Lye=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Uye=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vye=/^'([^]*?)'?$/,jye=/''/g,zye=/\S/,Wye=/[a-zA-Z]/;function Hye(i,e,t,n){const r=()=>_n(n?.in||t,NaN),s=Gbe(),o=n?.locale??s.locale??m$,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,l=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0;if(!e)return i?r():ct(t,n?.in);const c={firstWeekContainsDate:a,weekStartsOn:l,locale:o},d=[new eye(n?.in,t)],f=e.match(Uye).map(v=>{const x=v[0];if(x in Xk){const C=Xk[x];return C(v,o.formatLong)}return v}).join("").match(Lye),m=[];for(let v of f){const x=v[0],C=Mye[x];if(C){const{incompatibleTokens:D}=C;if(Array.isArray(D)){const T=m.find(S=>D.includes(S.token)||S.token===x);if(T)throw new RangeError(`The format string mustn't contain \`${T.fullToken}\` and \`${v}\` at the same time`)}else if(C.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${v}\` and any other token at the same time`);m.push({token:x,fullToken:v});const E=C.run(i,v,o.match,c);if(!E)return r();d.push(E.setter),i=E.rest}else{if(x.match(Wye))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");if(v==="''"?v="'":x==="'"&&(v=qye(v)),i.indexOf(v)===0)i=i.slice(v.length);else return r()}}if(i.length>0&&zye.test(i))return r();const p=d.map(v=>v.priority).sort((v,x)=>x-v).filter((v,x,C)=>C.indexOf(v)===x).map(v=>d.filter(x=>x.priority===v).sort((x,C)=>C.subPriority-x.subPriority)).map(v=>v[0]);let g=ct(t,n?.in);if(isNaN(+g))return r();const y={};for(const v of p){if(!v.validate(g,c))return r();const x=v.set(g,y,c);Array.isArray(x)?(g=x[0],Object.assign(y,x[1])):g=x}return g}function qye(i){return i.match(Vye)[1].replace(jye,"'")}function $ye(i,e,t){const[n,r]=zl(t?.in,i,e);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Gye(i,e,t){const[n,r]=zl(t?.in,i,e);return+Qk(n)==+Qk(r)}function Yye(i,e,t){const[n,r]=zl(t?.in,i,e);return n.getFullYear()===r.getFullYear()}function kg(i,e,t){const n=+ct(i,t?.in),[r,s]=[+ct(e.start,t?.in),+ct(e.end,t?.in)].sort((o,a)=>o-a);return n>=r&&n<=s}function Kye(i,e,t){return Oo(i,-1,t)}function Xye(i,e){const t=()=>_n(e?.in,NaN),r=eve(i);let s;if(r.date){const c=tve(r.date,2);s=nve(c.restDateString,c.year)}if(!s||isNaN(+s))return t();const o=+s;let a=0,l;if(r.time&&(a=ive(r.time),isNaN(a)))return t();if(r.timezone){if(l=rve(r.timezone),isNaN(l))return t()}else{const c=new Date(o+a),d=ct(0,e?.in);return d.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),d.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),d}return ct(o+a+l,e?.in)}const hy={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Qye=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Zye=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Jye=/^([+-])(\d{2})(?::?(\d{2}))?$/;function eve(i){const e={},t=i.split(hy.dateTimeDelimiter);let n;if(t.length>2)return e;if(/:/.test(t[0])?n=t[0]:(e.date=t[0],n=t[1],hy.timeZoneDelimiter.test(e.date)&&(e.date=i.split(hy.timeZoneDelimiter)[0],n=i.substr(e.date.length,i.length))),n){const r=hy.timezone.exec(n);r?(e.time=n.replace(r[1],""),e.timezone=r[1]):e.time=n}return e}function tve(i,e){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=i.match(t);if(!n)return{year:NaN,restDateString:""};const r=n[1]?parseInt(n[1]):null,s=n[2]?parseInt(n[2]):null;return{year:s===null?r:s*100,restDateString:i.slice((n[1]||n[2]).length)}}function nve(i,e){if(e===null)return new Date(NaN);const t=i.match(Qye);if(!t)return new Date(NaN);const n=!!t[4],r=ap(t[1]),s=ap(t[2])-1,o=ap(t[3]),a=ap(t[4]),l=ap(t[5])-1;if(n)return cve(e,a,l)?sve(e,a,l):new Date(NaN);{const c=new Date(0);return!ave(e,s,o)||!lve(e,r)?new Date(NaN):(c.setUTCFullYear(e,s,Math.max(r,o)),c)}}function ap(i){return i?parseInt(i):1}function ive(i){const e=i.match(Zye);if(!e)return NaN;const t=aE(e[1]),n=aE(e[2]),r=aE(e[3]);return uve(t,n,r)?t*o_+n*s_+r*1e3:NaN}function aE(i){return i&&parseFloat(i.replace(",","."))||0}function rve(i){if(i==="Z")return 0;const e=i.match(Jye);if(!e)return 0;const t=e[1]==="+"?-1:1,n=parseInt(e[2]),r=e[3]&&parseInt(e[3])||0;return dve(n,r)?t*(n*o_+r*s_):NaN}function sve(i,e,t){const n=new Date(0);n.setUTCFullYear(i,0,4);const r=n.getUTCDay()||7,s=(e-1)*7+t+1-r;return n.setUTCDate(n.getUTCDate()+s),n}const ove=[31,null,31,30,31,30,31,31,30,31,30,31];function k$(i){return i%400===0||i%4===0&&i%100!==0}function ave(i,e,t){return e>=0&&e<=11&&t>=1&&t<=(ove[e]||(k$(i)?29:28))}function lve(i,e){return e>=1&&e<=(k$(i)?366:365)}function cve(i,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function uve(i,e,t){return i===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&i>=0&&i<25}function dve(i,e){return e>=0&&e<=59}function Es(i,e,t){const n=ct(i,t?.in),r=n.getFullYear(),s=n.getDate(),o=_n(i,0);o.setFullYear(r,e,15),o.setHours(0,0,0,0);const a=$be(o);return n.setMonth(e,Math.min(s,a)),n}function m1(i,e,t){const n=ct(i,t?.in);return n.setHours(e),n}function p1(i,e,t){const n=ct(i,t?.in);return n.setMinutes(e),n}function Vf(i,e,t){const n=ct(i,t?.in),r=Math.trunc(n.getMonth()/3)+1,s=e-r;return Es(n,n.getMonth()+s*3)}function g1(i,e,t){const n=ct(i,t?.in);return n.setSeconds(e),n}function aa(i,e,t){const n=ct(i,t?.in);return isNaN(+n)?_n(i,NaN):(n.setFullYear(e),n)}function Ju(i,e,t){return Vo(i,-e,t)}function S$(i,e,t){return m3(i,-1,t)}function JN(i,e,t){return Fw(i,-1,t)}function Mc(i,e,t){return No(i,-e,t)}function fve(i,e){const t=bve(e);return"formatToParts"in t?mve(t,i):pve(t,i)}const hve={year:0,month:1,day:2,hour:3,minute:4,second:5};function mve(i,e){try{const t=i.formatToParts(e),n=[];for(let r=0;r<t.length;r++){const s=hve[t[r].type];s!==void 0&&(n[s]=parseInt(t[r].value,10))}return n}catch(t){if(t instanceof RangeError)return[NaN];throw t}}function pve(i,e){const t=i.format(e),n=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(t);return[parseInt(n[3],10),parseInt(n[1],10),parseInt(n[2],10),parseInt(n[4],10),parseInt(n[5],10),parseInt(n[6],10)]}const lE={},eB=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/Ne
29w_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),gve=eB==="06/25/2014, 00:00:00"||eB==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function bve(i){return lE[i]||(lE[i]=gve?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:i,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:i,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),lE[i]}function P$(i,e,t,n,r,s,o){const a=new Date(0);return a.setUTCFullYear(i,e,t),a.setUTCHours(n,r,s,o),a}const tB=36e5,yve=6e4,cE={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function I$(i,e,t){if(!i)return 0;let n=cE.timezoneZ.exec(i);if(n)return 0;let r,s;if(n=cE.timezoneHH.exec(i),n)return r=parseInt(n[1],10),nB(r)?-(r*tB):NaN;if(n=cE.timezoneHHMM.exec(i),n){r=parseInt(n[2],10);const o=parseInt(n[3],10);return nB(r,o)?(s=Math.abs(r)*tB+o*yve,n[1]==="+"?-s:s):NaN}if(xve(i)){e=new Date(e||Date.now());const o=t?e:vve(e),a=Jk(o,i);return-(t?a:wve(e,a,i))}return NaN}function vve(i){return P$(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds())}function Jk(i,e){const t=fve(i,e),n=P$(t[0],t[1]-1,t[2],t[3]%24,t[4],t[5],0).getTime();let r=i.getTime();const s=r%1e3;return r-=s>=0?s:1e3+s,n-r}function wve(i,e,t){let r=i.getTime()-e;const s=Jk(new Date(r),t);if(e===s)return e;r-=s-e;const o=Jk(new Date(r),t);return s===o?s:Math.max(s,o)}function nB(i,e){return-23<=i&&i<=23&&(e==null||0<=e&&e<=59)}const iB={};function xve(i){if(iB[i])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:i}),iB[i]=!0,!0}catch{return!1}}function rB(i){const e=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return e.setUTCFullYear(i.getFullYear()),+i-+e}const _ve=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,uE=36e5,sB=6e4,Cve=2,kr={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:_ve};function Dve(i,e={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(i===null)return new Date(NaN);const t=e.additionalDigits==null?Cve:Number(e.additionalDigits);if(t!==2&&t!==1&&t!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(i instanceof Date||typeof i=="object"&&Object.prototype.toString.call(i)==="[object Date]")return new Date(i.getTime());if(typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]")return new Date(i);if(Object.prototype.toString.call(i)!=="[object String]")return new Date(NaN);const n=Eve(i),{year:r,restDateString:s}=Tve(n.date,t),o=Ave(s,r);if(o===null||isNaN(o.getTime()))return new Date(NaN);if(o){const a=o.getTime();let l=0,c;if(n.time&&(l=kve(n.time),l===null||isNaN(l)))return new Date(NaN);if(n.timeZone||e.timeZone){if(c=I$(n.timeZone||e.timeZone,new Date(a+l)),isNaN(c))return new Date(NaN)}else c=rB(new Date(a+l)),c=rB(new Date(a+l+c));return new Date(a+l+c)}else return new Date(NaN)}function Eve(i){const e={};let t=kr.dateTimePattern.exec(i),n;if(t?(e.date=t[1],n=t[3]):(t=kr.datePattern.exec(i),t?(e.date=t[1],n=t[2]):(e.date=null,n=i)),n){const r=kr.timeZone.exec(n);r?(e.time=n.replace(r[1],""),e.timeZone=r[1].trim()):e.time=n}return e}function Tve(i,e){if(i){const t=kr.YYY[e],n=kr.YYYYY[e];let r=kr.YYYY.exec(i)||n.exec(i);if(r){const s=r[1];return{year:parseInt(s,10),restDateString:i.slice(s.length)}}if(r=kr.YY.exec(i)||t.exec(i),r){const s=r[1];return{year:parseInt(s,10)*100,restDateString:i.slice(s.length)}}}return{year:null}}function Ave(i,e){if(e===null)return null;let t,n,r;if(!i||!i.length)return t=new Date(0),t.setUTCFullYear(e),t;let s=kr.MM.exec(i);
29if(s)return t=new Date(0),n=parseInt(s[1],10)-1,aB(e,n)?(t.setUTCFullYear(e,n),t):new Date(NaN);if(s=kr.DDD.exec(i),s){t=new Date(0);const o=parseInt(s[1],10);return Ive(e,o)?(t.setUTCFullYear(e,0,o),t):new Date(NaN)}if(s=kr.MMDD.exec(i),s){t=new Date(0),n=parseInt(s[1],10)-1;const o=parseInt(s[2],10);return aB(e,n,o)?(t.setUTCFullYear(e,n,o),t):new Date(NaN)}if(s=kr.Www.exec(i),s)return r=parseInt(s[1],10)-1,lB(r)?oB(e,r):new Date(NaN);if(s=kr.WwwD.exec(i),s){r=parseInt(s[1],10)-1;const o=parseInt(s[2],10)-1;return lB(r,o)?oB(e,r,o):new Date(NaN)}return null}function kve(i){let e,t,n=kr.HH.exec(i);if(n)return e=parseFloat(n[1].replace(",",".")),dE(e)?e%24*uE:NaN;if(n=kr.HHMM.exec(i),n)return e=parseInt(n[1],10),t=parseFloat(n[2].replace(",",".")),dE(e,t)?e%24*uE+t*sB:NaN;if(n=kr.HHMMSS.exec(i),n){e=parseInt(n[1],10),t=parseInt(n[2],10);const r=parseFloat(n[3].replace(",","."));return dE(e,t,r)?e%24*uE+t*sB+r*1e3:NaN}return null}function oB(i,e,t){e=e||0,t=t||0;const n=new Date(0);n.setUTCFullYear(i,0,4);const r=n.getUTCDay()||7,s=e*7+t+1-r;return n.setUTCDate(n.getUTCDate()+s),n}const Sve=[31,28,31,30,31,30,31,31,30,31,30,31],Pve=[31,29,31,30,31,30,31,31,30,31,30,31];function R$(i){return i%400===0||i%4===0&&i%100!==0}function aB(i,e,t){if(e<0||e>11)return!1;if(t!=null){if(t<1)return!1;const n=R$(i);if(n&&t>Pve[e]||!n&&t>Sve[e])return!1}return!0}function Ive(i,e){if(e<1)return!1;const t=R$(i);return!(t&&e>366||!t&&e>365)}function lB(i,e){return!(i<0||i>52||e!=null&&(e<0||e>6))}function dE(i,e,t){return!(i<0||i>=25||e!=null&&(e<0||e>=60)||t!=null&&(t<0||t>=60))}function F$(i,e,t){i=Dve(i,t);const n=I$(e,i,!0),r=new Date(i.getTime()-n),s=new Date(0);return s.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),s.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),s}const Rve="Asia/Kolkata";function O$(i,e="yyyy-MM-dd HH:mm:ss"){const t=typeof i=="string"?new Date(i):i;if(isNaN(t.getTime()))return"";const n=F$(t,Rve);return Rw(n,e)}function N$(i){var e,t,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i)){var r=i.length;for(e=0;e<r;e++)i[e]&&(t=N$(i[e]))&&(n&&(n+=" "),n+=t)}else for(t in i)i[t]&&(n&&(n+=" "),n+=t);return n}function Ni(){for(var i,e,t=0,n="",r=arguments.length;t<r;t++)(i=arguments[t])&&(e=N$(i))&&(n&&(n+=" "),n+=e);return n}var Fve=typeof document<"u",Ove=function(){},Lw=Fve?M.useLayoutEffect:Ove;const Nve={...nw},Bve=Nve.useInsertionEffect,Mve=Bve||(i=>i());function Lve(i){const e=M.useRef(()=>{});return Mve(()=>{e.current=i}),M.useCallback(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.current==null?void 0:e.current(...n)},[])}var Uve=typeof document<"u",Vve=function(){},b1=Uve?M.useLayoutEffect:Vve;function Uw(i,e){if(i===e)return!0;if(typeof i!=typeof e)return!1;if(typeof i=="function"&&i.toString()===e.toString())return!0;let t,n,r;if(i&&e&&typeof i=="object"){if(Array.isArray(i)){if(t=i.length,t!==e.length)return!1;for(n=t;n--!==0;)if(!Uw(i[n],e[n]))return!1;return!0}if(r=Object.keys(i),t=r.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(e,r[n]))return!1;for(n=t;n--!==0;){const s=r[n];if(!(s==="_owner"&&i.$$typeof)&&!Uw(i[s],e[s]))return!1}return!0}return i!==i&&e!==e}function B$(i){return typeof window>"u"?1:(i.ownerDocument.defaultView||window).devicePixelRatio||1}function cB(i,e){const t=B$(i);return Math.round(e*t)/t}function fE(i){const e=M.useRef(i);return b1(()=>{e.current=i}),e}function jve(i){i===void 0&&(i={});const{placement:e="bottom",strategy:t="absolute",middleware:n=[],platform:r,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=i,[d,f]=M.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[m,p]=M.useState(n);Uw(m,n)||p(n);const[g,y]=M.useState(null),[v,x]=M.useState(null),C=M.useCallback(G=>{G!==S.current&&(S.current=G,y(G))},[]),D=M.useCallback(G=>{G!==A.current&&(A.current=G,x(G))},[]),E=s||g,T=o||v,S=M.useRef(null),A=M.useRef(null),I=M.useRef(d),R=l!=null,O=fE(l),j=fE(r),B=fE(c),U=M.useCallback(()=>
29{if(!S.current||!A.current)return;const G={placement:e,strategy:t,middleware:m};j.current&&(G.platform=j.current),ppe(S.current,A.current,G).then(Y=>{const ie={...Y,isPositioned:B.current!==!1};F.current&&!Uw(I.current,ie)&&(I.current=ie,l5.flushSync(()=>{f(ie)}))})},[m,e,t,j,B]);b1(()=>{c===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(G=>({...G,isPositioned:!1})))},[c]);const F=M.useRef(!1);b1(()=>(F.current=!0,()=>{F.current=!1}),[]),b1(()=>{if(E&&(S.current=E),T&&(A.current=T),E&&T){if(O.current)return O.current(E,T,U);U()}},[E,T,U,O,R]);const H=M.useMemo(()=>({reference:S,floating:A,setReference:C,setFloating:D}),[C,D]),L=M.useMemo(()=>({reference:E,floating:T}),[E,T]),W=M.useMemo(()=>{const G={position:t,left:0,top:0};if(!L.floating)return G;const Y=cB(L.floating,d.x),ie=cB(L.floating,d.y);return a?{...G,transform:"translate("+Y+"px, "+ie+"px)",...B$(L.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:Y,top:ie}},[t,a,L.floating,d.x,d.y]);return M.useMemo(()=>({...d,update:U,refs:H,elements:L,floatingStyles:W}),[d,U,H,L,W])}const zve=i=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:i,fn(t){const{element:n,padding:r}=typeof i=="function"?i(t):i;return n&&e(n)?n.current!=null?TN({element:n.current,padding:r}).fn(t):{}:n?TN({element:n,padding:r}).fn(t):{}}}},Wve=(i,e)=>({...hpe(i),options:[i,e]}),Hve=(i,e)=>({...mpe(i),options:[i,e]}),qve=(i,e)=>({...zve(i),options:[i,e]}),$ve={...nw};let uB=!1,Gve=0;const dB=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Gve++;function Yve(){const[i,e]=M.useState(()=>uB?dB():void 0);return Lw(()=>{i==null&&e(dB())},[]),M.useEffect(()=>{uB=!0},[]),i}const Kve=$ve.useId,M$=Kve||Yve,Xve=M.forwardRef(function(e,t){const{context:{placement:n,elements:{floating:r},middlewareData:{arrow:s,shift:o}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:d=0,staticOffset:f,stroke:m,d:p,style:{transform:g,...y}={},...v}=e,x=M$(),[C,D]=M.useState(!1);if(Lw(()=>{if(!r)return;uo(r).direction==="rtl"&&D(!0)},[r]),!r)return null;const[E,T]=n.split("-"),S=E==="top"||E==="bottom";let A=f;(S&&o!=null&&o.x||!S&&o!=null&&o.y)&&(A=null);const I=d*2,R=I/2,O=a/2*(c/-8+1),j=l/2*c/4,B=!!p,U=A&&T==="end"?"bottom":"top";let F=A&&T==="end"?"right":"left";A&&C&&(F=T==="end"?"left":"right");const H=s?.x!=null?A||s.x:"",L=s?.y!=null?A||s.y:"",W=p||"M0,0"+(" H"+a)+(" L"+(a-O)+","+(l-j))+(" Q"+a/2+","+l+" "+O+","+(l-j))+" Z",G={top:B?"rotate(180deg)":"",left:B?"rotate(90deg)":"rotate(-90deg)",bottom:B?"":"rotate(180deg)",right:B?"rotate(-90deg)":"rotate(90deg)"}[E];return w.jsxs("svg",{...v,"aria-hidden":!0,ref:t,width:B?a:a+I,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[F]:H,[U]:L,[E]:S||B?"100%":"calc(100% - "+I/2+"px)",transform:[G,g].filter(Y=>!!Y).join(" "),...y},children:[I>0&&w.jsx("path",{clipPath:"url(#"+x+")",fill:"none",stroke:m,strokeWidth:I+(p?0:1),d:W}),w.jsx("path",{stroke:I&&!p?v.fill:"none",d:W}),w.jsx("clipPath",{id:x,children:w.jsx("rect",{x:-R,y:R*(B?-1:1),width:a+I,height:a})})]})});function Qve(){const i=new Map;return{emit(e,t){var n;(n=i.get(e))==null||n.forEach(r=>r(t))},on(e,t){i.has(e)||i.set(e,new Set),i.get(e).add(t)},off(e,t){var n;(n=i.get(e))==null||n.delete(t)}}}const Zve=M.createContext(null),Jve=M.createContext(null),e1e=()=>{var i;return((i=M.useContext(Zve))==null?void 0:i.id)||null},t1e=()=>M.useContext(Jve);function n1e(i){const{open:e=!1,onOpenChange:t,elements:n}=i,r=M$(),s=M.useRef({}),[o]=M.useState(()=>Qve()),a=e1e()!=null,[l,c]=M.useState(n.reference),d=Lve((p,g,y)=>{s.current.openEvent=p?g:void 0,o.emit("openchange",{open:p,event:g,reason:y,nested:a}),t?.(p,g,y)}),f=M.useMemo(()=>({setPositionReference:c}),[]),m=M.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return M.useMemo(()=>({dataRef:s,open:e,onOpenChange:d,elements:m,events:o,floatingId:r,refs:f}),[e,d,m,o,r,f])}function i1e(i){i===void 0&&(i={});const{nodeId:e}=i,t=n1e({...i,elements:{reference:null,floating:null,...i.elements}}),n=i.rootContext||t,r=n.elements,[s,o]=M.useState(null),[a,l]=M.useState(null),d=r?.domReference||s,f=M.useRef(null),m=t1e();Lw(()=>{d&&(f.current=d)},[d]);const p=jve({...i,elements:{...r,...a&&{reference:a}}}),g=M.useCallback(D=>{const E=Ir(D)?{getBoundingClientRect:()=>D.getBoundingClientRect(),getClientRects:()=>D.getClientRects(),contextElement:D}:D;l(E),p.refs.setReference(E)},[p.refs]),y=M.useCallback(D=>{(Ir(D)||D===null)&&(f.current=D,o(D)),(Ir(p.refs.reference.current)||p.refs.reference.current===null||D!==null&&!Ir(D
29))&&p.refs.setReference(D)},[p.refs]),v=M.useMemo(()=>({...p.refs,setReference:y,setPositionReference:g,domReference:f}),[p.refs,y,g]),x=M.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),C=M.useMemo(()=>({...p,...n,refs:v,elements:x,nodeId:e}),[p,v,x,e,n]);return Lw(()=>{n.dataRef.current.floatingContext=C;const D=m?.nodesRef.current.find(E=>E.id===e);D&&(D.context=C)}),M.useMemo(()=>({...p,context:C,refs:v,elements:x}),[p,v,x,C])}var eS=function(e,t){return eS=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])},eS(e,t)};function sr(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");eS(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Bt=function(){return Bt=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Bt.apply(this,arguments)};function ga(i,e,t){if(t||arguments.length===2)for(var n=0,r=e.length,s;n<r;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return i.concat(s||Array.prototype.slice.call(e))}var r1e=function(i){var e=i.showTimeSelectOnly,t=e===void 0?!1:e,n=i.showTime,r=n===void 0?!1:n,s=i.className,o=i.children,a=i.inline,l=t?"Choose Time":"Choose Date".concat(r?" and Time":"");return Ee.createElement("div",{className:s,"aria-label":l,role:a?void 0:"dialog","aria-modal":a?void 0:"true",translate:"no"},o)},s1e=function(i,e){var t=M.useRef(null),n=M.useRef(i);M.useEffect(function(){n.current=i},[i]);var r=M.useCallback(function(s){var o,a=s.composed&&s.composedPath&&s.composedPath().find(function(l){return l instanceof Node})||s.target;t.current&&!t.current.contains(a)&&(e&&a instanceof HTMLElement&&a.classList.contains(e)||(o=n.current)===null||o===void 0||o.call(n,s))},[e]);return M.useEffect(function(){return document.addEventListener("mousedown",r),function(){document.removeEventListener("mousedown",r)}},[r]),t},l_=function(i){var e=i.children,t=i.onClickOutside,n=i.className,r=i.containerRef,s=i.style,o=i.ignoreClass,a=s1e(t,o);return Ee.createElement("div",{className:n,style:s,ref:function(l){a.current=l,r&&(r.current=l)}},e)},my=null,fB=!1;function L$(){if(fB)return my;fB=!0;try{var i="date-fns-tz";my=require(i)}catch{my=null}return my}function hB(i,e){if(!e)return i;var t=L$();return t?t.toZonedTime(i,e):i}function sl(i,e){if(!e)return i;var t=L$();return t?t.fromZonedTime(i,e):i}var Qe;(function(i){i.ArrowUp="ArrowUp",i.ArrowDown="ArrowDown",i.ArrowLeft="ArrowLeft",i.ArrowRight="ArrowRight",i.PageUp="PageUp",i.PageDown="PageDown",i.Home="Home",i.End="End",i.Enter="Enter",i.Space=" ",i.Tab="Tab",i.Escape="Escape",i.Backspace="Backspace",i.X="x"})(Qe||(Qe={}));function U$(){var i=typeof window<"u"?window:globalThis;return i}var v0=12;function en(i){if(i==null)return new Date;var e=typeof i=="string"?Xye(i):ct(i);return Qr(e)?e:new Date}function _u(i,e,t,n,r){r===void 0&&(r=en());for(var s=Ph(t)||Ph(b3()),o=Array.isArray(e)?e:[e],a=0,l=o;a<l.length;a++){var c=l[a],d=Hye(i,c,r,{locale:s});if(Qr(d)&&(!n||i===Vn(d,c,t)))return d}if(!n&&i&&i.length>=8){var f=new Date(i);if(Sh(f))return f}return null}function o1e(i,e){if(e===void 0&&(e=en()),!i)return null;var t=i.match(/\b(1\d{3}|2\d{3})\b/);if(!t||!t[1])return null;var n=parseInt(t[1],10),r=i.match(/(?:^|[/\-\s])?(0?[1-9]|1[0-2])(?:[/\-\s]|$)/),s=r&&r[1]?parseInt(r[1],10)-1:e.getMonth();return new Date(n,s,1)}function Qr(i){return Sh(i)}function $u(i){return i==null?null:wa(i)&&Sh(i)?i:null}function Vn(i,e,t){if(t==="en")return Rw(i,e,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var n=t?Ph(t):void 0;return t&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(t,'"].')),n=n||Ph(b3()),Rw(i,e,{locale:n,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function Yr(i,e){var t=e.dateFormat,n=e.locale,r=Array.isArray(t)&&t.length>0?t[0]:t;return i&&Vn(i,r,n)||""}var V$=" - ";function a1e(i,e,t){if(!i&&!e)return"";var n=i?Yr(i,t):"",r=e?Yr(e,t):"",s=t.rangeSeparator||V$;return"".concat(n).concat(s).concat(r)}function l1e(i,e){if(!i?.length)return"";var t=i[0]?Yr(i[0],e):"";if(i.length===1)return t;if(i.length===2&&i[1]){var n=Yr(i[1],e);return"".concat(t,", ").concat(n)}
29var r=i.length-1;return"".concat(t," (+").concat(r,")")}function ol(i,e){var t=e.hour,n=t===void 0?0:t,r=e.minute,s=r===void 0?0:r,o=e.second,a=o===void 0?0:o;return m1(p1(g1(i,a),s),n)}function c1e(i){return f3(i)}function u1e(i,e){return Vn(i,"ddd",e)}function Mp(i){return ad(i)}function Rc(i,e,t){var n=Ph(e||b3());return Pl(i,{locale:n,weekStartsOn:t})}function xl(i){return _$(i)}function Lp(i){return a_(i)}function mB(i){return Qk(i)}function pB(){return ad(en())}function gB(i){return w$(i)}function d1e(i){return Hbe(i)}function f1e(i){return x$(i)}function fa(i,e){return i&&e?Yye(i,e):!i&&!e}function Tr(i,e){return i&&e?$ye(i,e):!i&&!e}function Vw(i,e){return i&&e?Gye(i,e):!i&&!e}function qt(i,e){return i&&e?zbe(i,e):!i&&!e}function Gu(i,e){return i&&e?Kbe(i,e):!i&&!e}function Mu(i,e,t){var n,r=ad(e),s=w$(t);try{n=kg(i,{start:r,end:s})}catch{n=!1}return n}function b3(){var i=U$();return i.__localeId__}function Ph(i){if(typeof i=="string"){var e=U$();return e.__localeData__?e.__localeData__[i]:void 0}else return i}function h1e(i,e,t){return e(Vn(i,"EEEE",t))}function m1e(i,e){return Vn(i,"EEEEEE",e)}function p1e(i,e){return Vn(i,"EEE",e)}function y3(i,e){return Vn(Es(en(),i),"LLLL",e)}function j$(i,e){return Vn(Es(en(),i),"LLL",e)}function g1e(i,e){return Vn(Vf(en(),i),"QQQ",e)}function ro(i,e){var t=e===void 0?{}:e,n=t.minDate,r=t.maxDate,s=t.excludeDates,o=t.excludeDateIntervals,a=t.includeDates,l=t.includeDateIntervals,c=t.filterDate,d=t.disabled;return d?!0:w0(i,{minDate:n,maxDate:r})||s&&s.some(function(f){return f instanceof Date?qt(i,f):qt(i,f.date)})||o&&o.some(function(f){var m=f.start,p=f.end;return kg(i,{start:m,end:p})})||a&&!a.some(function(f){return qt(i,f)})||l&&!l.some(function(f){var m=f.start,p=f.end;return kg(i,{start:m,end:p})})||c&&!c(en(i))||!1}function v3(i,e){var t=e===void 0?{}:e,n=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(s){var o=s.start,a=s.end;return kg(i,{start:o,end:a})}):n&&n.some(function(s){var o;return s instanceof Date?qt(i,s):qt(i,(o=s.date)!==null&&o!==void 0?o:new Date)})||!1}function z$(i,e){var t=e===void 0?{}:e,n=t.minDate,r=t.maxDate,s=t.excludeDates,o=t.includeDates,a=t.filterDate;return w0(i,{minDate:n?_$(n):void 0,maxDate:r?x$(r):void 0})||s?.some(function(l){return Tr(i,l instanceof Date?l:l.date)})||o&&!o.some(function(l){return Tr(i,l)})||a&&!a(en(i))||!1}function py(i,e,t,n){var r=jt(i),s=es(i),o=jt(e),a=es(e),l=jt(n);return r===o&&r===l?s<=t&&t<=a:r<o?l===r&&s<=t||l===o&&a>=t||l<o&&l>r:!1}function b1e(i,e){var t=e===void 0?{}:e,n=t.minDate,r=t.maxDate,s=t.excludeDates,o=t.includeDates;return w0(i,{minDate:n,maxDate:r})||s&&s.some(function(a){return Tr(a instanceof Date?a:a.date,i)})||o&&!o.some(function(a){return Tr(a,i)})||!1}function gy(i,e){var t=e===void 0?{}:e,n=t.minDate,r=t.maxDate,s=t.excludeDates,o=t.includeDates,a=t.filterDate,l=t.disabled;return l?!0:w0(i,{minDate:n,maxDate:r})||s?.some(function(c){return Vw(i,c instanceof Date?c:c.date)})||o&&!o.some(function(c){return Vw(i,c)})||a&&!a(en(i))||!1}function by(i,e,t){if(!e||!t||!Sh(e)||!Sh(t))return!1;var n=jt(e),r=jt(t);return n<=i&&r>=i}function y1(i,e){var t=e===void 0?{}:e,n=t.minDate,r=t.maxDate,s=t.excludeDates,o=t.includeDates,a=t.filterDate,l=t.disabled;if(l)return!0;var c=new Date(i,0,1);return w0(c,{minDate:n?a_(n):void 0,maxDate:r?C$(r):void 0})||s?.some(function(d){return fa(c,d instanceof Date?d:d.date)})||o&&!o.some(function(d){return fa(c,d)})||a&&!a(en(c))||!1}function yy(i,e,t,n){var r=jt(i),s=Sc(i),o=jt(e),a=Sc(e),l=jt(n);return r===o&&r===l?s<=t&&t<=a:r<o?l===r&&s<=t||l===o&&a>=t||l<o&&l>r:!1}function w0(i,e){var t,n=e===void 0?{}:e,r=n.minDate,s=n.maxDate;return(t=r&&Ah(i,r)<0||s&&Ah(i,s)>0)!==null&&t!==void 0?t:!1}function bB(i,e){return e.some(function(t){return fr(t)===fr(i)&&hr(t)===hr(i)&&Ic(t)===Ic(i)})}function yB(i,e){var t=e===void 0?{}:e,n=t.excludeTimes,r=t.includeTimes,s=t.filterTime;return n&&bB(i,n)||r&&!bB(i,r)||s&&!s(i)||!1}function vB(i,e){var t=e.minTime,n=e.maxTime;if(!t||!n)throw new Error("Both minTime and maxTime props required");var r=en();
29r=m1(r,fr(i)),r=p1(r,hr(i)),r=g1(r,Ic(i));var s=en();s=m1(s,fr(t)),s=p1(s,hr(t)),s=g1(s,Ic(t));var o=en();o=m1(o,fr(n)),o=p1(o,hr(n)),o=g1(o,Ic(n));var a;try{a=!kg(r,{start:s,end:o})}catch{a=!1}return a}function wB(i,e){var t=e===void 0?{}:e,n=t.minDate,r=t.includeDates,s=Ju(i,1);return n&&Ow(n,s)>0||r&&r.every(function(o){return Ow(o,s)>0})||!1}function xB(i,e){var t=e===void 0?{}:e,n=t.maxDate,r=t.includeDates,s=Vo(i,1);return n&&Ow(s,n)>0||r&&r.every(function(o){return Ow(s,o)>0})||!1}function y1e(i,e){var t=e===void 0?{}:e,n=t.minDate,r=t.includeDates,s=a_(i),o=S$(s);return n&&Nw(n,o)>0||r&&r.every(function(a){return Nw(a,o)>0})||!1}function v1e(i,e){var t=e===void 0?{}:e,n=t.maxDate,r=t.includeDates,s=C$(i),o=m3(s,1);return n&&Nw(o,n)>0||r&&r.every(function(a){return Nw(o,a)>0})||!1}function _B(i,e){var t=e===void 0?{}:e,n=t.minDate,r=t.includeDates,s=Mc(i,1);return n&&Bw(n,s)>0||r&&r.every(function(o){return Bw(o,s)>0})||!1}function w1e(i,e){var t=e===void 0?{}:e,n=t.minDate,r=t.yearItemNumber,s=r===void 0?v0:r,o=Lp(Mc(i,s)),a=gl(o,s).endPeriod,l=n&&jt(n);return l&&l>a||!1}function CB(i,e){var t=e===void 0?{}:e,n=t.maxDate,r=t.includeDates,s=No(i,1);return n&&Bw(s,n)>0||r&&r.every(function(o){return Bw(s,o)>0})||!1}function x1e(i,e){var t=e===void 0?{}:e,n=t.maxDate,r=t.yearItemNumber,s=r===void 0?v0:r,o=No(i,s),a=gl(o,s).startPeriod,l=n&&jt(n);return l&&l<a||!1}function W$(i){var e=i.minDate,t=i.includeDates;if(t&&e){var n=t.filter(function(r){return Ah(r,e)>=0});return XN(n)}else return t?XN(t):e}function H$(i){var e=i.maxDate,t=i.includeDates;if(t&&e){var n=t.filter(function(r){return Ah(r,e)<=0});return KN(n)}else return t?KN(t):e}function DB(i,e){var t;i===void 0&&(i=[]),e===void 0&&(e="react-datepicker__day--highlighted");for(var n=new Map,r=0,s=i.length;r<s;r++){var o=i[r];if(wa(o)){var a=Vn(o,"MM.dd.yyyy"),l=n.get(a)||[];l.includes(e)||(l.push(e),n.set(a,l))}else if(typeof o=="object"){var c=Object.keys(o),d=(t=c[0])!==null&&t!==void 0?t:"",f=o[d];if(typeof d=="string"&&Array.isArray(f))for(var m=0,p=f.length;m<p;m++){var g=f[m];if(g){var a=Vn(g,"MM.dd.yyyy"),l=n.get(a)||[];l.includes(d)||(l.push(d),n.set(a,l))}}}}return n}function _1e(i,e){return i.length!==e.length?!1:i.every(function(t,n){return t===e[n]})}function C1e(i,e){i===void 0&&(i=[]),e===void 0&&(e="react-datepicker__day--holidays");var t=new Map;return i.forEach(function(n){var r=n.date,s=n.holidayName;if(wa(r)){var o=Vn(r,"MM.dd.yyyy"),a=t.get(o)||{className:"",holidayNames:[]};if(!("className"in a&&a.className===e&&_1e(a.holidayNames,[s]))){a.className=e;var l=a.holidayNames;a.holidayNames=l?ga(ga([],l,!0),[s],!1):[s],t.set(o,a)}}}),t}function D1e(i,e,t,n,r){for(var s=r.length,o=[],a=0;a<s;a++){var l=i,c=r[a];c&&(l=Vbe(l,fr(c)),l=Ag(l,hr(c)),l=jbe(l,Ic(c)));var d=Ag(i,(t+1)*n);wl(l,e)&&pa(l,d)&&c!=null&&o.push(c)}return o}function xf(i){return i<10?"0".concat(i):"".concat(i)}function gl(i,e){e===void 0&&(e=v0);var t=Math.ceil(jt(i)/e)*e,n=t-(e-1);return{startPeriod:n,endPeriod:t}}function E1e(i){var e=new Date(i.getFullYear(),i.getMonth(),i.getDate()),t=new Date(i.getFullYear(),i.getMonth(),i.getDate(),24);return Math.round((+t-+e)/36e5)}function EB(i){var e=i.getSeconds(),t=i.getMilliseconds();return ct(i.getTime()-e*1e3-t)}function q$(i,e){return EB(i).getTime()===EB(e).getTime()}function TB(i){if(!wa(i))throw new Error("Invalid date");var e=new Date(i);return e.setHours(0,0,0,0),e}function hE(i,e){if(!wa(i)||!wa(e))throw new Error("Invalid date received");var t=TB(i),n=TB(e);return pa(t,n)}function $$(i){return i.key===Qe.Space}var mE=(function(i){sr(e,i);function e(t){var n=i.call(this,t)||this;return n.inputRef=Ee.createRef(),n.onTimeChange=function(r){var s,o;n.setState({time:r});var a=n.props.date,l=a instanceof Date&&!isNaN(+a),c=l?a:new Date;if(r?.includes(":")){var d=r.split(":"),f=d[0],m=d[1];c.setHours(Number(f)),c.setMinutes(Number(m))}(o=(s=n.props).onChange)===null||o===void 0||o.call(s,c)},n.renderTimeInput=function(){var r=n.state.time,s=n.props,o=s.date,a=s.timeString,l=s.customTimeInput;return l?M.cloneElement(l,{date:o,value:r,onChange:n.onTimeChange}):Ee.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:n.inputRef,onClick:function(){var c;(c=n.inputRef.current)===null||c===void 0||c.focus()},required:!0,value:r,onChange:function(c){n.onTimeChange(c.target.value||a)}})}
29,n.state={time:n.props.timeString},n}return e.getDerivedStateFromProps=function(t,n){return t.timeString!==n.time?{time:t.timeString}:null},e.prototype.render=function(){return Ee.createElement("div",{className:"react-datepicker__input-time-container"},Ee.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),Ee.createElement("div",{className:"react-datepicker-time__input-container"},Ee.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},e})(M.Component),T1e=(function(i){sr(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.dayEl=M.createRef(),t.handleClick=function(n){!t.isDisabled()&&t.props.onClick&&t.props.onClick(n)},t.handleMouseEnter=function(n){!t.isDisabled()&&t.props.onMouseEnter&&t.props.onMouseEnter(n)},t.handleOnKeyDown=function(n){var r,s,o=n.key;o===Qe.Space&&(n.preventDefault(),n.key=Qe.Enter),(s=(r=t.props).handleOnKeyDown)===null||s===void 0||s.call(r,n)},t.isSameDay=function(n){return qt(t.props.day,n)},t.isKeyboardSelected=function(){var n;if(t.props.disabledKeyboardNavigation)return!1;var r=t.props.selectsMultiple?(n=t.props.selectedDates)===null||n===void 0?void 0:n.some(function(o){return t.isSameDayOrWeek(o)}):t.isSameDayOrWeek(t.props.selected),s=t.props.preSelection&&t.isDisabled(t.props.preSelection);return!r&&t.isSameDayOrWeek(t.props.preSelection)&&!s},t.isDisabled=function(n){return n===void 0&&(n=t.props.day),ro(n,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate,disabled:t.props.disabled})},t.isExcluded=function(){return v3(t.props.day,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.isStartOfWeek=function(){return qt(t.props.day,Rc(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameWeek=function(n){return t.props.showWeekPicker&&qt(n,Rc(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameDayOrWeek=function(n){return t.isSameDay(n)||t.isSameWeek(n)},t.getHighLightedClass=function(){var n=t.props,r=n.day,s=n.highlightDates;if(!s)return!1;var o=Vn(r,"MM.dd.yyyy");return s.get(o)},t.getHolidaysClass=function(){var n,r=t.props,s=r.day,o=r.holidays;if(!o)return[void 0];var a=Vn(s,"MM.dd.yyyy");return o.has(a)?[(n=o.get(a))===null||n===void 0?void 0:n.className]:[void 0]},t.isInRange=function(){var n=t.props,r=n.day,s=n.startDate,o=n.endDate;return!s||!o?!1:Mu(r,s,o)},t.isInSelectingRange=function(){var n,r=t.props,s=r.day,o=r.selectsStart,a=r.selectsEnd,l=r.selectsRange,c=r.selectsDisabledDaysInRange,d=r.startDate,f=r.swapRange,m=r.endDate,p=(n=t.props.selectingDate)!==null&&n!==void 0?n:t.props.preSelection;if(t.isAfterMonth()||t.isBeforeMonth()||!(o||a||l)||!p||!c&&t.isDisabled())return!1;if(o&&m&&(pa(p,m)||Gu(p,m)))return Mu(s,p,m);if(a&&d&&(wl(p,d)||Gu(p,d)))return Mu(s,d,p);if(l&&d&&!m){if(Gu(p,d)||wl(p,d))return Mu(s,d,p);if(f&&pa(p,d))return Mu(s,p,d)}return!1},t.isSelectingRangeStart=function(){var n;if(!t.isInSelectingRange())return!1;var r=t.props,s=r.day,o=r.startDate,a=r.selectsStart,l=r.swapRange,c=r.selectsRange,d=(n=t.props.selectingDate)!==null&&n!==void 0?n:t.props.preSelection;return a?qt(s,d):c&&l&&o&&d?qt(s,pa(d,o)?d:o):qt(s,o)},t.isSelectingRangeEnd=function(){var n;if(!t.isInSelectingRange())return!1;var r=t.props,s=r.day,o=r.endDate,a=r.selectsEnd,l=r.selectsRange,c=r.swapRange,d=r.startDate,f=(n=t.props.selectingDate)!==null&&n!==void 0?n:t.props.preSelection;return a?qt(s,f):l&&c&&d&&f?qt(s,pa(f,d)?d:f):l?qt(s,f):qt(s,o)},t.isRangeStart=function(){var n=t.props,r=n.day,s=n.startDate,o=n.endDate;return!s||!o?!1:qt(s,r)},t.isRangeEnd=function(){var n=t.props,r=n.day,s=n.startDate,o=n.endDate;return!s||!o?!1:qt(o,r)},t.isWeekend=function(){var n=qbe(t.props.day);return n===0||n===6},t.isAfterMonth=function(){return t.props.month!==void 0&&(t.props.month+1)%12===es(t.props.day)},t.isBeforeMonth=function(){return t.props.month!==void 0&&(es(t.props.day)+1)%12===t.props.month},t.isCurrentDay=function(){return t.isSameDay(en())},t.isSelected=function(){var n;return t.props.selectsMultiple?(n=t.props.selectedDates)===null||n===void 0?void 0:n.some(function(r){return t.isSameDayOrWeek(r)}):t.isSameDayOrWeek(t.props.selected)},t.getClassNames=function(n){var r=t.props.dayClassName?t.props.dayClassName(n):void 0;return Ni("react-datepicker__day",r,"react-datepicker__day--"+u1e(t.props.day),{"react-datepicker__day--disabled":t.isDisabled(),"react-datepicker__day--excluded":t.isExcluded(),"react-datepicker__day--selected":t.isSelected(),"react-datepicker__day--keyboard-selected":t.isKeyboardSelected(),"react-datepicker__day--range-start":t.isRangeStart(),"react-datepicker__day--range-end":t.isRangeEnd(),"react-datepicker__day--in-range":t.isInRange(),"react-datepicker__day--in-selecting-range":t.isInSelectingRange(),"react-datepicker__day--selecting-range-start":t.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":t.isSelectingRangeEnd(),"react-datepicker__day--today":t.isCurrentDay(),"react-datepicker__day--weekend":t.isWeekend(),"react-datepicker__day--outside-month":t.isAfterMonth()||t.isBeforeMonth()},t.getHighLightedClass(),t.getHolidaysClass())},t.getAriaLabel=function(){var n=t.props,r=n.day,s=n.ariaLabelPrefixWhenEnabled,o=s===void 0?"Choose":s,a=n.ariaLabelPrefixWhenDisabled,l=a===void 0?"Not available":a,c=t.isDisabled()||t.isExcluded()?l:o;return"".concat(c," ").concat(Vn(r,"PPPP",t.props.locale))},t.getTitle=function(){var n=t.props,r=n.day,s=n.holidays,o=s===void 0?new Map:s,a=n.excludeDates,l=Vn(r,"MM.dd.yyyy"),c=[];return o.has(l)&&c.push.apply(c,o.get(l).holidayNames),t.isExcluded()&&c.push(a?.filter(function(d){return d instanceof Date?qt(d,r):qt(d?.date,r)}
29).map(function(d){if(!(d instanceof Date))return d?.message})),c.join(", ")},t.getTabIndex=function(){var n=t.props.selected,r=t.props.preSelection,s=!(t.props.showWeekPicker&&(t.props.showWeekNumber||!t.isStartOfWeek()))&&(t.isKeyboardSelected()||t.isSameDay(n)&&qt(r,n))?0:-1;return s},t.handleFocusDay=function(){var n;t.shouldFocusDay()&&((n=t.dayEl.current)===null||n===void 0||n.focus({preventScroll:!0}))},t.renderDayContents=function(){return t.props.monthShowsDuplicateDaysEnd&&t.isAfterMonth()||t.props.monthShowsDuplicateDaysStart&&t.isBeforeMonth()?null:t.props.renderDayContents?t.props.renderDayContents(ZN(t.props.day),t.props.day):ZN(t.props.day)},t.render=function(){return Ee.createElement("div",{ref:t.dayEl,className:t.getClassNames(t.props.day),onKeyDown:t.handleOnKeyDown,onClick:t.handleClick,onMouseEnter:t.props.usePointerEvent?void 0:t.handleMouseEnter,onPointerEnter:t.props.usePointerEvent?t.handleMouseEnter:void 0,tabIndex:t.getTabIndex(),"aria-label":t.getAriaLabel(),role:"gridcell",title:t.getTitle(),"aria-disabled":t.isDisabled(),"aria-current":t.isCurrentDay()?"date":void 0,"aria-selected":t.isSelected()||t.isInRange()},t.renderDayContents(),t.getTitle()!==""&&Ee.createElement("span",{className:"overlay"},t.getTitle()))},t}return e.prototype.componentDidMount=function(){this.handleFocusDay()},e.prototype.componentDidUpdate=function(){this.handleFocusDay()},e.prototype.shouldFocusDay=function(){var t=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(t=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(t=!1),this.isDayActiveElement()&&(t=!0),this.isDuplicateDay()&&(t=!1)),t},e.prototype.isDayActiveElement=function(){var t,n,r;return((n=(t=this.props.containerRef)===null||t===void 0?void 0:t.current)===null||n===void 0?void 0:n.contains(document.activeElement))&&((r=document.activeElement)===null||r===void 0?void 0:r.classList.contains("react-datepicker__day"))},e.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},e})(M.Component),A1e=(function(i){sr(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.weekNumberEl=M.createRef(),t.handleClick=function(n){t.props.onClick&&t.props.onClick(n)},t.handleOnKeyDown=function(n){var r,s,o=n.key;o===Qe.Space&&(n.preventDefault(),n.key=Qe.Enter),(s=(r=t.props).handleOnKeyDown)===null||s===void 0||s.call(r,n)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!qt(t.props.date,t.props.selected)&&qt(t.props.date,t.props.preSelection)},t.getTabIndex=function(){return t.props.showWeekPicker&&t.props.showWeekNumber&&(t.isKeyboardSelected()||qt(t.props.date,t.props.selected)&&qt(t.props.preSelection,t.props.selected))?0:-1},t.handleFocusWeekNumber=function(n){var r=!1;t.getTabIndex()===0&&!n?.isInputFocused&&qt(t.props.date,t.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(r=!0),t.props.inline&&!t.props.shouldFocusDayInline&&(r=!1),t.props.containerRef&&t.props.containerRef.current&&t.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(r=!0)),r&&t.weekNumberEl.current&&t.weekNumberEl.current.focus({preventScroll:!0})},t}return Object.defineProperty(e,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),e.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},e.prototype.componentDidUpdate=function(t){this.handleFocusWeekNumber(t)},e.prototype.render=function(){var t=this.props,n=t.weekNumber,r=t.isWeekDisabled,s=t.ariaLabelPrefix,o=s===void 0?e.defaultProps.ariaLabelPrefix:s,a=t.onClick,l={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!a&&!r,"react-datepicker__week-number--selected":!!a&&qt(this.props.date,this.props.selected)};return Ee.createElement("div",{ref:this.weekNumberEl,className:Ni(l),"aria-label":"".concat(o," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},n)},e})(M.Component),k1e=(function(i){sr(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.isDisabled=function(n){return ro(n,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})}
29,t.handleDayClick=function(n,r){t.props.onDayClick&&t.props.onDayClick(n,r)},t.handleDayMouseEnter=function(n){t.props.onDayMouseEnter&&t.props.onDayMouseEnter(n)},t.handleWeekClick=function(n,r,s){for(var o,a,l,c=new Date(n),d=0;d<7;d++){var f=new Date(n);f.setDate(f.getDate()+d);var m=!t.isDisabled(f);if(m){c=f;break}}typeof t.props.onWeekSelect=="function"&&t.props.onWeekSelect(c,r,s),t.props.showWeekPicker&&t.handleDayClick(c,s),((o=t.props.shouldCloseOnSelect)!==null&&o!==void 0?o:e.defaultProps.shouldCloseOnSelect)&&((l=(a=t.props).setOpen)===null||l===void 0||l.call(a,!1))},t.formatWeekNumber=function(n){return t.props.formatWeekNumber?t.props.formatWeekNumber(n):c1e(n)},t.isWeekDisabled=function(){for(var n=t.startOfWeek(),r=Oo(n,6),s=new Date(n);s<=r;){if(!t.isDisabled(s))return!1;s=Oo(s,1)}return!0},t.renderDays=function(){var n=t.startOfWeek(),r=[],s=t.formatWeekNumber(n);if(t.props.showWeekNumber){var o=t.props.onWeekSelect||t.props.showWeekPicker?t.handleWeekClick.bind(t,n,s):void 0;r.push(Ee.createElement(A1e,Bt({key:"W"},e.defaultProps,t.props,{weekNumber:s,isWeekDisabled:t.isWeekDisabled(),date:n,onClick:o})))}return r.concat([0,1,2,3,4,5,6].map(function(a){var l=Oo(n,a);return Ee.createElement(T1e,Bt({},e.defaultProps,t.props,{ariaLabelPrefixWhenEnabled:t.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:t.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:t.handleDayClick.bind(t,l),onMouseEnter:t.handleDayMouseEnter.bind(t,l)}))}))},t.startOfWeek=function(){return Rc(t.props.day,t.props.locale,t.props.calendarStartDay)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!qt(t.startOfWeek(),t.props.selected)&&qt(t.startOfWeek(),t.props.preSelection)},t}return Object.defineProperty(e,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),e.prototype.render=function(){var t={"react-datepicker__week":!0,"react-datepicker__week--selected":qt(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},n=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return Ee.createElement("div",{className:Ni(t,n),role:"row"},this.renderDays())},e})(M.Component),lp,S1e=6,ch={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},pE=(lp={},lp[ch.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},lp[ch.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},lp[ch.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},lp),vy=1;function AB(i,e){return i?ch.FOUR_COLUMNS:e?ch.TWO_COLUMNS:ch.THREE_COLUMNS}var P1e=(function(i){sr(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.MONTH_REFS=ga([],Array(12),!0).map(function(){return M.createRef()}),t.QUARTER_REFS=ga([],Array(4),!0).map(function(){return M.createRef()}),t.isDisabled=function(n){return ro(n,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate,disabled:t.props.disabled})},t.isExcluded=function(n){return v3(n,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.handleDayClick=function(n,r){var s,o;
29(o=(s=t.props).onDayClick)===null||o===void 0||o.call(s,n,r,t.props.orderInDisplay)},t.handleDayMouseEnter=function(n){var r,s;(s=(r=t.props).onDayMouseEnter)===null||s===void 0||s.call(r,n)},t.handleMouseLeave=function(){var n,r;(r=(n=t.props).onMouseLeave)===null||r===void 0||r.call(n)},t.isRangeStartMonth=function(n){var r=t.props,s=r.day,o=r.startDate,a=r.endDate;return!o||!a?!1:Tr(Es(s,n),o)},t.isRangeStartQuarter=function(n){var r=t.props,s=r.day,o=r.startDate,a=r.endDate;return!o||!a?!1:Vw(Vf(s,n),o)},t.isRangeEndMonth=function(n){var r=t.props,s=r.day,o=r.startDate,a=r.endDate;return!o||!a?!1:Tr(Es(s,n),a)},t.isRangeEndQuarter=function(n){var r=t.props,s=r.day,o=r.startDate,a=r.endDate;return!o||!a?!1:Vw(Vf(s,n),a)},t.isInSelectingRangeMonth=function(n){var r,s=t.props,o=s.day,a=s.selectsStart,l=s.selectsEnd,c=s.selectsRange,d=s.startDate,f=s.endDate,m=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return!(a||l||c)||!m?!1:a&&f?py(m,f,n,o):l&&d||c&&d&&!f?py(d,m,n,o):!1},t.isSelectingMonthRangeStart=function(n){var r;if(!t.isInSelectingRangeMonth(n))return!1;var s=t.props,o=s.day,a=s.startDate,l=s.selectsStart,c=Es(o,n),d=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return l?Tr(c,d):Tr(c,a)},t.isSelectingMonthRangeEnd=function(n){var r;if(!t.isInSelectingRangeMonth(n))return!1;var s=t.props,o=s.day,a=s.endDate,l=s.selectsEnd,c=s.selectsRange,d=Es(o,n),f=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return l||c?Tr(d,f):Tr(d,a)},t.isInSelectingRangeQuarter=function(n){var r,s=t.props,o=s.day,a=s.selectsStart,l=s.selectsEnd,c=s.selectsRange,d=s.startDate,f=s.endDate,m=(r=t.props.selectingDate)!==null&&r!==void 0?r:t.props.preSelection;return!(a||l||c)||!m?!1:a&&f?yy(m,f,n,o):l&&d||c&&d&&!f?yy(d,m,n,o):!1},t.isWeekInMonth=function(n){var r=t.props.day,s=Oo(n,6);return Tr(n,r)||Tr(s,r)},t.isCurrentMonth=function(n,r){return jt(n)===jt(en())&&r===es(en())},t.isCurrentQuarter=function(n,r){return jt(n)===jt(en())&&r===Sc(en())},t.isSelectedMonth=function(n,r,s){return es(s)===r&&jt(n)===jt(s)},t.isSelectMonthInList=function(n,r,s){return s.some(function(o){return t.isSelectedMonth(n,r,o)})},t.isSelectedQuarter=function(n,r,s){return Sc(s)===r&&jt(n)===jt(s)},t.isSelectQuarterInList=function(n,r,s){return s.some(function(o){return t.isSelectedQuarter(n,r,o)})},t.isMonthSelected=function(){var n=t.props,r=n.day,s=n.selected,o=n.selectedDates,a=n.selectsMultiple,l=es(r);return a?o?.some(function(c){return t.isSelectedMonth(r,l,c)}):!!s&&t.isSelectedMonth(r,l,s)},t.isQuarterSelected=function(){var n=t.props,r=n.day,s=n.selected,o=n.selectedDates,a=n.selectsMultiple,l=Sc(r);return a?o?.some(function(c){return t.isSelectedQuarter(r,l,c)}):!!s&&t.isSelectedQuarter(r,l,s)},t.renderWeeks=function(){if(!Qr(t.props.day))return[];for(var n=[],r=t.props.fixedHeight,s=0,o=!1,a=Rc(xl(t.props.day),t.props.locale,t.props.calendarStartDay),l=function(g){return t.props.showWeekPicker?Rc(g,t.props.locale,t.props.calendarStartDay):t.props.preSelection},c=function(g){return t.props.showWeekPicker?Rc(g,t.props.locale,t.props.calendarStartDay):t.props.selected},d=t.props.selected?c(t.props.selected):void 0,f=t.props.preSelection?l(t.props.preSelection):void 0;n.push(Ee.createElement(k1e,Bt({},t.props,{ariaLabelPrefix:t.props.weekAriaLabelPrefix,key:s,day:a,month:es(t.props.day),onDayClick:t.handleDayClick,onDayMouseEnter:t.handleDayMouseEnter,selected:d,preSelection:f,showWeekNumber:t.props.showWeekNumbers}))),!o;){s++,a=Fw(a,1);var m=r&&s>=S1e,p=!r&&!t.isWeekInMonth(a);if(m||p)if(t.props.peekNextMonth)o=!0;else break}return n},t.onMonthClick=function(n,r){var s=t.isMonthDisabledForLabelDate(r),o=s.isDisabled,a=s.labelDate;o||t.handleDayClick(xl(a),n)},t.onMonthMouseEnter=function(n){var r=t.isMonthDisabledForLabelDate(n),s=r.isDisabled,o=r.labelDate;s||t.handleDayMouseEnter(xl(o))},t.handleMonthNavigation=function(n,r){var s,o,a,l;(o=(s=t.props).setPreSelection)===null||o===void 0||o.call(s,r),(l=(a=t.MONTH_REFS[n])===null||a===void 0?void 0:a.current)===null||l===void 0||l.focus()},t.handleKeyboardNavigation=function(n,r,s){var o,a=t.props,l=a.selected,c=a.preSelection,d=a.setPreSelection,f=a.minDate,m=a.maxDate,p=a.showFourColumnMonthYearPicker,g=a.showTwoColumnMonthYearPicker;if(c){var y=AB(p,g),v=t.getVerticalOffset(y),x=(o=pE[y])===null||o===void 0?void 0:o.grid,C=function(A,I,R){var O,j,B=I,U=R;switch(A){case Qe.ArrowRight:B=Vo(I,vy),U=R===11?0:R+vy;break;case Qe.ArrowLeft:B=Ju(I,vy),U=R===0?11:R-vy;break;case Qe.ArrowUp:B=Ju(I,v),U=!((O=x?.[0])===null||O===void 0)&&O.includes(R)?R+12-v:R-v;break;case Qe.ArrowDown:B=Vo(I,v),U=!((j=x?.[x.length-1])===null||j===void 0)&&j.includes(R)?R-12+v:R+v;break}return{newCalculatedDate:B,newCalculatedMonth:U}},D=function(A,I,R){for(var O=40,j=A,B=!1,U=0,F=C(j,I,R),H=F.newCalculatedDate,L=F.newCalculatedMonth;!B;){if(U>=O){H=I,L=R;break}if(f&&H<f){j=Qe.ArrowRight;var W=C(j,H,L);H=W.newCalculatedDate,L=W.newCalculatedMonth}if(m&&H>m){j=Qe.ArrowLeft;var W=C(j,H,L);H=W.newCalculatedDate,L=W.newCalculatedMonth}if(b1e(H,t.props)){var W=C(j,H,L);H=W.newCalculatedDate,L=W.newCalculatedMonth}else B=!0;U++}return{newCalculatedDate:H,newCalculatedMonth:L}};if(r===Qe.Enter){t.isMonthDisabled(s)||(t.onMonthClick(n,s),d?.(l));return}var E=D(r,c,s),T=E.newCalculatedDate,S=E.newCalculatedMonth;switch(r){case Qe.ArrowRight:case Qe.ArrowLeft:case Qe.ArrowUp:case Qe.ArrowDown:t.handleMonthNavigation(S,T);break}}},t.getVerticalOffset=function(n){var r,s;return(s=(r=pE[n])===null||r===void 0?void 0:r.verticalNavigationOffset)!==null&&s!==void 0?s:0},t.onMonthKeyDown=function(n,r){var s=t.props,o=s.disabledKeyboardNavigation,a=s.handleOnMonthKeyDown,l=n.key;l!==Qe.Tab&&n.preventDefault(),o||t.handleKeyboardNavigation(n,l,r),a&&a(n)},t.onQuarterClick=function(n,r){var s=Vf(t.props.day,r);gy(s,t.props)||t.handleDayClick(mB(s),n)},t.onQuarterMouseEnter=function(n){var r=Vf(t.props.day,n);gy(r,t.props)||t.handleDayMouseEnter(mB(r))},t.handleQuarterNavigation=function(n,r){var s,o,a,l;t.isDisabled(r)||t.isExcluded(r)||((o=(s=t.props).setPreSelection)===null||o===void 0||o.call(s,r),(l=(a=t.QUARTER_REFS[n-1])===null||a===void 0?void 0:a.current)===null||l===void 0||l.focus())},t.onQuarterKeyDown=function(n,r){var s,o,a=n.key;if(!t.props.disabledKeyboardNavigation)switch(a){case Qe.Enter:t.onQuarterClick(n,r),(o=(s=t.props).setPreSelection)===null||o===void 0||o.call(s,t.props.selected);break;case Qe.ArrowRight:if(!t.props.preSelection)break;t.handleQuarterNavigation(r===4?1:r+1,m3(t.props.preSelection,1));break;case Qe.ArrowLeft:if(!t.props.preSelection)break;t.handleQuarterNavigation(r===1?4:r-1,S$(t.props.preSelection));break}},t.isMonthDisabledForLabelDate=function(n){var r,s=t.props,o=s.day,a=s.disabled,l=s.minDate,c=s.maxDate,d=s.excludeDates,f=s.includeDates,m=Es(o,n);return a?{isDisabled:!0,labelDate:Es(o,n)}:{isDisabled:(r=(l||c||d||f)&&z$(m,t.props))!==null&&r!==void 0?r:!1,labelDate:m}},t.isMonthDisabled=function(n){var r=t.isMonthDisabledForLabelDate(n).isDisabled;return r},t.getMonthClassNames=function(n){var r=t.props,s=r.day,o=r.startDate,a=r.endD
29ate,l=r.preSelection,c=r.monthClassName,d=c?c(Es(s,n)):void 0,f=t.getSelection();return Ni("react-datepicker__month-text","react-datepicker__month-".concat(n),d,{"react-datepicker__month-text--disabled":t.isMonthDisabled(n),"react-datepicker__month-text--selected":f?t.isSelectMonthInList(s,n,f):void 0,"react-datepicker__month-text--keyboard-selected":!t.props.disabledKeyboardNavigation&&l&&t.isSelectedMonth(s,n,l)&&!t.isMonthSelected()&&!t.isMonthDisabled(n),"react-datepicker__month-text--in-selecting-range":t.isInSelectingRangeMonth(n),"react-datepicker__month-text--in-range":o&&a?py(o,a,n,s):void 0,"react-datepicker__month-text--range-start":t.isRangeStartMonth(n),"react-datepicker__month-text--range-end":t.isRangeEndMonth(n),"react-datepicker__month-text--selecting-range-start":t.isSelectingMonthRangeStart(n),"react-datepicker__month-text--selecting-range-end":t.isSelectingMonthRangeEnd(n),"react-datepicker__month-text--today":t.isCurrentMonth(s,n)})},t.getTabIndex=function(n){if(t.props.preSelection==null)return"-1";var r=es(t.props.preSelection),s=t.isMonthDisabledForLabelDate(r).isDisabled,o=n===r&&!(s||t.props.disabledKeyboardNavigation)?"0":"-1";return o},t.getQuarterTabIndex=function(n){if(t.props.preSelection==null)return"-1";var r=Sc(t.props.preSelection),s=gy(t.props.day,t.props),o=n===r&&!(s||t.props.disabledKeyboardNavigation)?"0":"-1";return o},t.getAriaLabel=function(n){var r=t.props,s=r.chooseDayAriaLabelPrefix,o=s===void 0?"Choose":s,a=r.disabledDayAriaLabelPrefix,l=a===void 0?"Not available":a,c=r.day,d=r.locale,f=Es(c,n),m=t.isDisabled(f)||t.isExcluded(f)?l:o;return"".concat(m," ").concat(Vn(f,"MMMM yyyy",d))},t.getQuarterClassNames=function(n){var r=t.props,s=r.day,o=r.startDate,a=r.endDate,l=r.minDate,c=r.maxDate,d=r.excludeDates,f=r.includeDates,m=r.filterDate,p=r.preSelection,g=r.disabledKeyboardNavigation,y=r.disabled,v=(l||c||d||f||m||y)&&gy(Vf(s,n),t.props),x=t.getSelection();return Ni("react-datepicker__quarter-text","react-datepicker__quarter-".concat(n),{"react-datepicker__quarter-text--disabled":v,"react-datepicker__quarter-text--selected":x?t.isSelectQuarterInList(s,n,x):void 0,"react-datepicker__quarter-text--keyboard-selected":!g&&p&&t.isSelectedQuarter(s,n,p)&&!t.isQuarterSelected()&&!v,"react-datepicker__quarter-text--in-selecting-range":t.isInSelectingRangeQuarter(n),"react-datepicker__quarter-text--in-range":o&&a?yy(o,a,n,s):void 0,"react-datepicker__quarter-text--range-start":t.isRangeStartQuarter(n),"react-datepicker__quarter-text--range-end":t.isRangeEndQuarter(n),"react-datepicker__quarter-text--today":t.isCurrentQuarter(s,n)})},t.getMonthContent=function(n){var r=t.props,s=r.showFullMonthYearPicker,o=r.renderMonthContent,a=r.locale,l=r.day,c=j$(n,a),d=y3(n,a);return o?o(n,c,d,l):s?d:c},t.getQuarterContent=function(n){var r,s=t.props,o=s.renderQuarterContent,a=s.locale,l=g1e(n,a);return(r=o?.(n,l))!==null&&r!==void 0?r:l},t.renderMonths=function(){var n,r=t.props,s=r.showTwoColumnMonthYearPicker,o=r.showFourColumnMonthYearPicker,a=r.day,l=r.selected,c=(n=pE[AB(o,s)])===null||n===void 0?void 0:n.grid;return c?.map(function(d,f){return Ee.createElement("div",{className:"react-datepicker__month-wrapper",key:f},d.map(function(m,p){return Ee.createElement("div",{ref:t.MONTH_REFS[m],key:p,onClick:function(g){t.onMonthClick(g,m)},onKeyDown:function(g){$$(g)&&(g.preventDefault(),g.key=Qe.Enter),t.onMonthKeyDown(g,m)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onMonthMouseEnter(m)},onPointerEnter:t.props.usePointerEvent?function(){return t.onMonthMouseEnter(m)}:void 0,tabIndex:Number(t.getTabIndex(m)),className:t.getMonthClassNames(m),"aria-disabled":t.isMonthDisabled(m),role:"option","aria-label":t.getAriaLabel(m),"aria-current":t.isCurrentMonth(a,m)?"date":void 0,"aria-selected":l?t.isSelectedMonth(a,m,l):void 0},t.getMonthContent(m))}))})},t.renderQuarters=function(){var n=t.props,r=n.day,s=n.selected,o=[1,2,3,4];return Ee.createElement("div",{className:"react-datepicker__quarter-wrapper"},o.map(function(a,l){return Ee.createElement("div",{key:l,ref:t.QUARTER_REFS[l],role:"option",onClick:function(c){t.onQuarterClick(c,a)},onKeyDown:function(c){t.onQuarterKeyDown(c,a)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onQuarterMouseEnter(a)},onPointerEnter:t.props.usePointerEvent?function(){return t.onQuarterMouseEnter(a)}:void 0,className:t.getQuarterClassNames(a),"aria-selected":s?t.isSelectedQuarter(r,a,s):void 0,tabIndex:Number(t.getQuarterTabIndex(a)),"aria-current":t.isCurrentQuarter(r,a)?"date":void 0},t.getQuarterContent(a))}))},t.getClassNames=function(){var n=t.props,r=n.selectingDate,s=n.selectsStart,o=n.selectsEnd,a=n.showMonthYearPicker,l=n.showQuarterYearPicker,c=n.showWeekPicker;return Ni("react-datepicker__month",{"react-datepicker__month--selecting-range":r&&(s||o)},{"react-datepicker__monthPicker":a},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":c})},t}return e.prototype.getSelection=function(){var t=this.props,n=t.selected,r=t.selectedDates,s=t.selectsMultiple;if(s)return r;if(n)return[n]},e.prototype.render=function(){var t=this.props,n=t.showMonthYearPicker,r=t.showQuarterYearPicker,s=t.day,o=t.ariaLabelPrefix,a=o===void 0?"Month "
29:o,l=a?a.trim()+" ":"",c=Qr(s)?"".concat(l).concat(Vn(s,"MMMM, yyyy",this.props.locale)):"",d=n||r;return d?Ee.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":c,role:"listbox"},n?this.renderMonths():this.renderQuarters()):Ee.createElement("div",{role:"table"},this.props.dayNamesHeader&&Ee.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),this.props.monthHeader&&Ee.createElement("div",{role:"rowgroup"},this.props.monthHeader),Ee.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":c,role:"rowgroup"},this.renderWeeks()),this.props.monthFooter&&Ee.createElement("div",{role:"rowgroup"},this.props.monthFooter))},e})(M.Component),I1e=(function(i){sr(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.monthOptionButtonsRef={},t.isSelectedMonth=function(n){return t.props.month===n},t.handleOptionKeyDown=function(n,r){var s;switch(r.key){case"Enter":r.preventDefault(),t.onChange(n);break;case"Escape":r.preventDefault(),t.props.onCancel();break;case"ArrowUp":case"ArrowDown":{r.preventDefault();var o=(n+(r.key==="ArrowUp"?-1:1)+t.props.monthNames.length)%t.props.monthNames.length;(s=t.monthOptionButtonsRef[o])===null||s===void 0||s.focus();break}}},t.renderOptions=function(){return t.monthOptionButtonsRef={},t.props.monthNames.map(function(n,r){return Ee.createElement("div",{ref:function(s){t.monthOptionButtonsRef[r]=s,t.isSelectedMonth(r)&&s?.focus()},role:"button",tabIndex:0,className:t.isSelectedMonth(r)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:n,onClick:t.onChange.bind(t,r),onKeyDown:t.handleOptionKeyDown.bind(t,r),"aria-selected":t.isSelectedMonth(r)?"true":void 0},t.isSelectedMonth(r)?Ee.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",n)})},t.onChange=function(n){return t.props.onChange(n)},t.handleClickOutside=function(){return t.props.onCancel()},t}return e.prototype.render=function(){return Ee.createElement(l_,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},e})(M.Component),R1e=(function(i){sr(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(n){return n.map(function(r,s){return Ee.createElement("option",{key:r,value:s},r)})},t.renderSelectMode=function(n){return Ee.createElement("select",{value:t.props.month,className:"react-datepicker__month-select",onChange:function(r){return t.onChange(parseInt(r.target.value))}},t.renderSelectOptions(n))},t.renderReadView=function(n,r){return Ee.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:t.toggleDropdown},Ee.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),Ee.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},r[t.props.month]))},t.renderDropdown=function(n){return Ee.createElement(I1e,Bt({key:"dropdown"},t.props,{monthNames:n,onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(n){var r=t.state.dropdownVisible,s=[t.renderReadView(!r,n)];return r&&s.unshift(t.renderDropdown(n)),s},t.onChange=function(n){t.toggleDropdown(),n!==t.props.month&&t.props.onChange(n)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return e.prototype.render=function(){var t=this,n=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(s){return j$(s,t.props.locale)}:function(s){return y3(s,t.props.locale)}),r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode(n);break;case"select":r=this.renderSelectMode(n);break}return Ee.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},r)},e})(M.Component),kB=5;function F1e(i,e,t){for(var n=[],r=i??Mc(t,kB),s=e??No(t,kB),o=xl(r),a=xl(s);!wl(o,a);)n.push(en(o)),o=Vo(o,1);return n}var O1e=(function(i){sr(e,i);function e(t){var n=i.call(this,t)||this;return n.renderOptions=function(){return n.state.monthYearsList.map(function(r){var s=Zk(r),o=fa(n.props.date,r)&&Tr(n.props.date,r);return Ee.createElement("div",{className:o?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:s,onClick:n.onChange.bind(n,s),"aria-selected":o?"true":void 0},o?Ee.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",Vn(r,n.props.dateFormat,n.props.locale))})},n.onChange=function(r){return n.props.onChange(r)},n.handleClickOutside=function(){n.props.onCancel()},n.state={monthYearsList:F1e(n.props.minDate,n.props.maxDate,n.props.date)},n}return e.prototype.render=function(){var t=Ni({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return Ee.createElement(l_,{className:t,onClickOutside:this.handleClickOutside},this.renderOptions())},e})(M.Component),SB=5,N1e=(function(i){sr(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var n,r,s=(n=t.props.minDate)!==null&&n!==void 0?n:Mc(t.props.date,SB),o=(r=t.props.maxDate)!==null&&r!==void 0?r:No(t.props.date,SB),a=xl(s),l=xl(o),c=[];!wl(a,l);){var d=Zk(a);c.push(Ee.createElement("option",{key:d,value:d},Vn(a,t.props.dateFormat,t.props.locale))),a=Vo(a,1)}return c}
29,t.onSelectChange=function(n){t.onChange(parseInt(n.target.value))},t.renderSelectMode=function(){return Ee.createElement("select",{value:Zk(xl(t.props.date)),className:"react-datepicker__month-year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(n){var r=Vn(t.props.date,t.props.dateFormat,t.props.locale);return Ee.createElement("div",{key:"read",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:t.toggleDropdown},Ee.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),Ee.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},r))},t.renderDropdown=function(){return Ee.createElement(O1e,Bt({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var n=t.state.dropdownVisible,r=[t.renderReadView(!n)];return n&&r.unshift(t.renderDropdown()),r},t.onChange=function(n){t.toggleDropdown();var r=en(n);fa(t.props.date,r)&&Tr(t.props.date,r)||t.props.onChange(r)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return e.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return Ee.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},t)},e})(M.Component),B1e=(function(i){sr(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.state={height:null},t.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var n,r,s;t.list&&(t.list.scrollTop=(s=t.centerLi&&e.calcCenterPosition(t.props.monthRef?t.props.monthRef.clientHeight-((r=(n=t.header)===null||n===void 0?void 0:n.clientHeight)!==null&&r!==void 0?r:0):t.list.clientHeight,t.centerLi))!==null&&s!==void 0?s:0)})},t.handleClick=function(n){var r,s;(t.props.minTime||t.props.maxTime)&&vB(n,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&yB(n,t.props)||(s=(r=t.props).onChange)===null||s===void 0||s.call(r,n)},t.isSelectedTime=function(n){var r=$u(t.props.selected);return r&&q$(r,n)},t.isDisabledTime=function(n){return(t.props.minTime||t.props.maxTime)&&vB(n,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&yB(n,t.props)},t.liClasses=function(n){var r,s=["react-datepicker__time-list-item",t.props.timeClassName?t.props.timeClassName(n):void 0];return t.isSelectedTime(n)&&s.push("react-datepicker__time-list-item--selected"),t.isDisabledTime(n)&&s.push("react-datepicker__time-list-item--disabled"),t.props.injectTimes&&(fr(n)*3600+hr(n)*60+Ic(n))%(((r=t.props.intervals)!==null&&r!==void 0?r:e.defaultProps.intervals)*60)!==0&&s.push("react-datepicker__time-list-item--injected"),s.join(" ")},t.handleOnKeyDown=function(n,r){var s,o;n.key===Qe.Space&&(n.preventDefault(),n.key=Qe.Enter),(n.key===Qe.ArrowUp||n.key===Qe.ArrowLeft)&&n.target instanceof HTMLElement&&n.target.previousSibling&&(n.preventDefault(),n.target.previousSibling instanceof HTMLElement&&n.target.previousSibling.focus()),(n.key===Qe.ArrowDown||n.key===Qe.ArrowRight)&&n.target instanceof HTMLElement&&n.target.nextSibling&&(n.preventDefault(),n.target.nextSibling instanceof HTMLElement&&n.target.nextSibling.focus()),n.key===Qe.Enter&&t.handleClick(r),(o=(s=t.props).handleOnKeyDown)===null||o===void 0||o.call(s,n)},t.renderTimes=function(){for(var n,r=[],s=typeof t.props.format=="string"?t.props.format:"p",o=(n=t.props.intervals)!==null&&n!==void 0?n:e.defaultProps.intervals,a=$u(t.props.selected)||$u(t.props.openToDate)||en(),l=Mp(a),c=t.props.injectTimes&&t.props.injectTimes.sort(function(v,x){return v.getTime()-x.getTime()}),d=60*E1e(a),f=d/o,m=0;m<f;m++){var p=Ag(l,m*o);if(r.push(p),c){var g=D1e(l,p,m,o,c);r=r.concat(g)}}var y=r.reduce(function(v,x){return x.getTime()<=a.getTime()?x:v},r[0]);return r.map(function(v){return Ee.createElement("li",{key:v.valueOf(),onClick:t.handleClick.bind(t,v),className:t.liClasses(v),ref:function(x){v===y&&(t.centerLi=x)},onKeyDown:function(x){t.handleOnKeyDown(x,v)},tabIndex:v===y?0:-1,role:"option","aria-selected":t.isSelectedTime(v)?"true":void 0,"aria-disabled":t.isDisabledTime(v)?"true":void 0},Vn(v,s,t.props.locale))})},t.renderTimeCaption=function(){return t.props.showTimeCaption===!1?Ee.createElement(Ee.Fragment,null):Ee.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(t.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(n){t.header=n}},Ee.createElement("div",{className:"react-datepicker-time__header"},t.props.timeCaption))},t}return Object.defineProperty(e,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}
29},enumerable:!1,configurable:!0}),e.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},e.prototype.componentWillUnmount=function(){var t;(t=this.resizeObserver)===null||t===void 0||t.disconnect()},e.prototype.observeDatePickerHeightChanges=function(){var t=this,n=this.props.monthRef;this.updateContainerHeight(),n&&(this.resizeObserver=new ResizeObserver(function(){t.updateContainerHeight()}),this.resizeObserver.observe(n))},e.prototype.updateContainerHeight=function(){if(this.props.monthRef&&this.header){var t=this.props.monthRef.clientHeight-this.header.clientHeight;this.state.height!==t&&this.setState({height:t})}},e.prototype.render=function(){var t=this,n,r=this.state.height;return Ee.createElement("div",{className:"react-datepicker__time-container ".concat(((n=this.props.todayButton)!==null&&n!==void 0?n:e.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),Ee.createElement("div",{className:"react-datepicker__time"},Ee.createElement("div",{className:"react-datepicker__time-box"},Ee.createElement("ul",{className:"react-datepicker__time-list",ref:function(s){t.list=s},style:r?{height:r}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},e.calcCenterPosition=function(t,n){return n.offsetTop-(t/2-n.clientHeight/2)},e})(M.Component),PB=3,M1e=(function(i){sr(e,i);function e(t){var n=i.call(this,t)||this;return n.YEAR_REFS=ga([],Array(n.props.yearItemNumber),!0).map(function(){return M.createRef()}),n.isDisabled=function(r){return ro(r,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.isExcluded=function(r){return v3(r,{excludeDates:n.props.excludeDates})},n.selectingDate=function(){var r;return(r=n.props.selectingDate)!==null&&r!==void 0?r:n.props.preSelection},n.updateFocusOnPaginate=function(r){var s=function(){var o,a;(a=(o=n.YEAR_REFS[r])===null||o===void 0?void 0:o.current)===null||a===void 0||a.focus()};window.requestAnimationFrame(s)},n.handleYearClick=function(r,s){n.props.onDayClick&&n.props.onDayClick(r,s)},n.handleYearNavigation=function(r,s){var o,a,l,c,d=n.props,f=d.date,m=d.yearItemNumber;if(!(f===void 0||m===void 0)){var p=gl(f,m).startPeriod;n.isDisabled(s)||n.isExcluded(s)||((a=(o=n.props).setPreSelection)===null||a===void 0||a.call(o,s),r-p<0?n.updateFocusOnPaginate(m-(p-r)):r-p>=m?n.updateFocusOnPaginate(Math.abs(m-(r-p))):(c=(l=n.YEAR_REFS[r-p])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus())}},n.isSameDay=function(r,s){return qt(r,s)},n.isCurrentYear=function(r){return r===jt(en())},n.isRangeStart=function(r){return n.props.startDate&&n.props.endDate&&fa(aa(en(),r),n.props.startDate)},n.isRangeEnd=function(r){return n.props.startDate&&n.props.endDate&&fa(aa(en(),r),n.props.endDate)},n.isInRange=function(r){return by(r,n.props.startDate,n.props.endDate)},n.isInSelectingRange=function(r){var s=n.props,o=s.selectsStart,a=s.selectsEnd,l=s.selectsRange,c=s.startDate,d=s.endDate;return!(o||a||l)||!n.selectingDate()?!1:o&&d?by(r,n.selectingDate(),d):a&&c||l&&c&&!d?by(r,c,n.selectingDate()):!1},n.isSelectingRangeStart=function(r){var s;if(!n.isInSelectingRange(r))return!1;var o=n.props,a=o.startDate,l=o.selectsStart,c=aa(en(),r);return l?fa(c,(s=n.selectingDate())!==null&&s!==void 0?s:null):fa(c,a??null)},n.isSelectingRangeEnd=function(r){var s;if(!n.isInSelectingRange(r))return!1;var o=n.props,a=o.endDate,l=o.selectsEnd,c=o.selectsRange,d=aa(en(),r);return l||c?fa(d,(s=n.selectingDate())!==null&&s!==void 0?s:null):fa(d,a??null)},n.isKeyboardSelected=function(r){if(!(n.props.disabledKeyboardNavigation||n.props.date===void 0||n.props.preSelection==null)){var s=n.props,o=s.minDate,a=s.maxDate,l=s.excludeDates,c=s.includeDates,d=s.filterDate,f=s.selected,m=Lp(aa(n.props.date,r)),p=(o||a||l||c||d)&&y1(r,n.props),g=!!f&&qt(m,Lp(f)),y=qt(m,Lp(n.props.preSelection));return!n.props.inline&&!g&&y&&!p}},n.isSelectedYear=function(r){var s=n.props,o=s.selectsMultiple,a=s.selected,l=s.selectedDates;return o?l?.some(function(c){return r===jt(c)}):!!a&&r===jt(a)},n.onYearClick=function(r,s){var o=n.props.date;o!==void 0&&n.handleYearClick(Lp(aa(o,s)),r)},n.onYearKeyDown=function(r,s){var o,a,l=r.key,c=n.props,d=c.date,f=c.yearItemNumber,m=c.handleOnKeyDown;if(l!==Qe.Tab&&r.preventDefault(),!n.props.disabledKeyboardNavigation)switch(l){case Qe.Enter:if(n.props.selected==null)break;n.onYearClick(r,s),(a=(o=n.props).setPreSelection)===null||a===void 0||a.call(o,n.props.selected);break;case Qe.ArrowRight:if(n.props.preSelection==null)break;n.handleYearNavigation(s+1,No(n.props.preSelection,1));break;case Qe.ArrowLeft:if(n.props.preSelection==null)break;n.handleYearNavigation(s-1,Mc(n.props.preSelection,1));break;case Qe.ArrowUp:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var p=gl(d,f).startPeriod,g=PB,y=s-g;if(y<p){var v=f%g;s>=p&&s<p+v?g=v:g+=v,y=s-g}n.handleYearNavigation(y,Mc(n.props.preSelection,g));break}case Qe.ArrowDown:{if(d===void 0||f===void 0||n.props.preSelection==null)break;var x=gl(d,f).endPeriod,g=PB,y=s+g;if(y>x){var v=f%g;s<=x&&s>x-v?g=v:g+=v,y=s+g}n.handleYearNavigation(y,No(n.props.preSelection,g));break}}m&&m(r)},n.getYearClassNames=function(r){var s=n.props,o=s.date,a=s.disabled,l=s.minDate,c=s.maxDate,d=s.excludeDates,f=s.includeDates,m=s.filterDate,p=s.yearClassName;return Ni("react-datepicker__year-text","react-datepicker__year-".concat(r),o?p?.(aa(o,r)):void 0,{"react-datepicker__year-text--selected":n.isSelectedYear(r),"react-datepicker__year-text--disabled":(l||c||d||f||m||a)&&y1(r,n.props),"react-datepicker__year-text--keyboard-selected":n.isKeyboardSelected(r),"react-datepicker__year-text--range-start":n.isRangeStart(r),"react-datepicker__year-text--range-end":n.isRangeEnd(r),"react-datepicker__year-text--in-range":n.isInRange(r),"react-datepicker__year-text--in-selecting-range":n.isInSelectingRange(r),"react-datepicker__year-text--selecting-range-start":n.isSelectingRangeStart(r),"react-datepicker__year-text--selecting-range-end":n.isSelectingRangeEnd(r),"react-datepicker__year-text--today":n.isCurrentYear(r)})},n.getYearTabIndex=function(r){if(n.props.disabledKeyboardNavigation||n.props.preSelection==null)return"-1";var s=jt(n.props.preSelection),o=y1(r,n.props);return r===s&&!o?"0":"-1"},n.getYearContent=function(r){return n.props.renderYearContent?n.props.renderYearContent(r):r},n}return e.prototype.render=function(){var t=this,n=[],r=this.props,s=r.date,o=r.yearItemNumber,a=r.onYearMouseEnter,l=r.onYearMouseLeave;if(s===void 0)return null;for(var c=gl(s,o),d=c.startPeriod,f=c.endPeriod,m=function(y){n.push(Ee.createElement("div",{ref:p.YEAR_REFS[y-d],onClick:function(v){t.onYearClick(v,y)},onKeyDown:function(v){$$(v)&&(v.preventDefault(),v.key=Qe.Enter),t.onYearKeyDown(v,y)},tabIndex:Number(p.getYearTabIndex(y)),className:p.getYearClassNames(y),onMouseEnter:p.props.usePointerEvent?void 0:function(v){return a(v,y)},onPointerEnter:p.props.usePointerEvent?function(v){return a(v,y)}:void 0,onMouseLeave:p.props.usePointerEvent?void 0:function(v){return l(v,y)},onPointerLeave:p.props.usePointerEvent?function(v){return l(v,y)}:void 0,key:y,"aria-current":p.isCurrentYear(y)?"date":void 0},p.getYearContent(y)))},p=this,g=d;g<=f;g++)m(g);return Ee.createElement("div",{className:"react-datepicker__year"},Ee.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},n))},e})(M.Component);function L1e(i,e,t,n){for(var r=[],s=0;s<2*e+1;s++){var o=i+e-s,a=!0;t&&(a=jt(t)<=o),n&&a&&(a=jt(n)>=o),a&&r.push(o)}return r}var U1e=(function(i){sr(e,i);function e(t){var n=i.call(this,t)||this;n.yearOptionButtonsRef={},n.handleOptionKeyDown=function(a,l){var c;switch(l.key){case"Enter":l.preventDefault(),n.onChange(a);break;case"Escape":l.preventDefault(),n.props.onCancel();break;case"ArrowUp":case"ArrowDown":{l.preventDefault();var d=a+(l.key==="ArrowUp"?1:-1);n.yearOptionButtonsRef[d]&&((c=n.yearOptionButtonsRef[d])===null||c===void 0||c.focus());break}}},n.renderOptions=function(){n.yearOptionButtonsRef={};var a=n.props.year,l=n.state.yearsList.map(function(f){return Ee.createElement("div",{ref:function(m){n.yearOptionButtonsRef[f]=m,f===a&&m?.focus()},role:"button",tabIndex:0,className:a===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:n.onChange.bind(n,f),onKeyDown:n.handleOptionKeyDown.bind(n,f),"aria-selected":a===f?"true":void 0},a===f?Ee.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}
29),c=n.props.minDate?jt(n.props.minDate):null,d=n.props.maxDate?jt(n.props.maxDate):null;return(!d||!n.state.yearsList.find(function(f){return f===d}))&&l.unshift(Ee.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:n.incrementYears},Ee.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!c||!n.state.yearsList.find(function(f){return f===c}))&&l.push(Ee.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:n.decrementYears},Ee.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},n.onChange=function(a){n.props.onChange(a)},n.handleClickOutside=function(){n.props.onCancel()},n.shiftYears=function(a){var l=n.state.yearsList.map(function(c){return c+a});n.setState({yearsList:l})},n.incrementYears=function(){return n.shiftYears(1)},n.decrementYears=function(){return n.shiftYears(-1)};var r=t.yearDropdownItemNumber,s=t.scrollableYearDropdown,o=r||(s?10:5);return n.state={yearsList:L1e(n.props.year,o,n.props.minDate,n.props.maxDate)},n.dropdownRef=M.createRef(),n}return e.prototype.componentDidMount=function(){var t=this.dropdownRef.current;if(t){var n=t.children?Array.from(t.children):null,r=n?n.find(function(s){return s.ariaSelected}):null;t.scrollTop=r&&r instanceof HTMLElement?r.offsetTop+(r.clientHeight-t.clientHeight)/2:(t.scrollHeight-t.clientHeight)/2}},e.prototype.render=function(){var t=Ni({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return Ee.createElement(l_,{className:t,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},e})(M.Component),V1e=(function(i){sr(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var n=t.props.minDate?jt(t.props.minDate):1900,r=t.props.maxDate?jt(t.props.maxDate):2100,s=[],o=n;o<=r;o++)s.push(Ee.createElement("option",{key:o,value:o},o));return s},t.onSelectChange=function(n){t.onChange(parseInt(n.target.value))},t.renderSelectMode=function(){return Ee.createElement("select",{value:t.props.year,className:"react-datepicker__year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(n){return Ee.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:t.toggleDropdown},Ee.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),Ee.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},t.props.year))},t.renderDropdown=function(){return Ee.createElement(U1e,Bt({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var n=t.state.dropdownVisible,r=[t.renderReadView(!n)];return n&&r.unshift(t.renderDropdown()),r},t.onChange=function(n){t.toggleDropdown(),n!==t.props.year&&t.props.onChange(n)},t.toggleDropdown=function(n){t.setState({dropdownVisible:!t.state.dropdownVisible},function(){t.props.adjustDateOnChange&&t.handleYearChange(t.props.date,n)})},t.handleYearChange=function(n,r){var s;(s=t.onSelect)===null||s===void 0||s.call(t,n,r),t.setOpen()},t.onSelect=function(n,r){var s,o;(o=(s=t.props).onSelect)===null||o===void 0||o.call(s,n,r)},t.setOpen=function(){var n,r;(r=(n=t.props).setOpen)===null||r===void 0||r.call(n,!0)},t}return e.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return Ee.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},t)},e})(M.Component),j1e=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],G$="react-datepicker-ignore-onclickoutside",z1e=function(i){var e=(i.className||"").split(/\s+/);
29return j1e.some(function(t){return e.indexOf(t)>=0})},W1e=(function(i){sr(e,i);function e(t){var n=i.call(this,t)||this;return n.monthContainer=void 0,n.handleClickOutside=function(r){n.props.onClickOutside(r)},n.setClickOutsideRef=function(){return n.containerRef.current},n.handleDropdownFocus=function(r){var s,o;z1e(r.target)&&((o=(s=n.props).onDropdownFocus)===null||o===void 0||o.call(s,r))},n.getDateInView=function(){var r=n.props,s=r.preSelection,o=r.selected,a=r.openToDate,l=W$(n.props),c=H$(n.props),d=en(),f=a||o||s;return f||(l&&pa(d,l)?l:c&&wl(d,c)?c:d)},n.increaseMonth=function(){n.setState(function(r){var s=r.date;return{date:Vo(s,1)}},function(){return n.handleMonthChange(n.state.date)})},n.decreaseMonth=function(){n.setState(function(r){var s=r.date;return{date:Ju(s,1)}},function(){return n.handleMonthChange(n.state.date)})},n.handleDayClick=function(r,s,o){n.props.onSelect(r,s,o),n.props.setPreSelection&&n.props.setPreSelection(r)},n.handleDayMouseEnter=function(r){n.setState({selectingDate:r}),n.props.onDayMouseEnter&&n.props.onDayMouseEnter(r)},n.handleMonthMouseLeave=function(){n.setState({selectingDate:void 0}),n.props.onMonthMouseLeave&&n.props.onMonthMouseLeave()},n.handleYearMouseEnter=function(r,s){n.setState({selectingDate:aa(en(),s)}),n.props.onYearMouseEnter&&n.props.onYearMouseEnter(r,s)},n.handleYearMouseLeave=function(r,s){n.props.onYearMouseLeave&&n.props.onYearMouseLeave(r,s)},n.handleYearChange=function(r){var s,o,a,l;(o=(s=n.props).onYearChange)===null||o===void 0||o.call(s,r),n.setState({isRenderAriaLiveMessage:!0}),n.props.adjustDateOnChange&&(n.props.onSelect(r),(l=(a=n.props).setOpen)===null||l===void 0||l.call(a,!0)),n.props.setPreSelection&&n.props.setPreSelection(r)},n.getEnabledPreSelectionDateForMonth=function(r){if(!ro(r,n.props))return r;for(var s=xl(r),o=f1e(r),a=Wbe(o,s),l=null,c=0;c<=a;c++){var d=Oo(s,c);if(!ro(d,n.props)){l=d;break}}return l},n.handleMonthChange=function(r){var s,o,a,l=(s=n.getEnabledPreSelectionDateForMonth(r))!==null&&s!==void 0?s:r;n.handleCustomMonthChange(l),n.props.adjustDateOnChange&&(n.props.onSelect(l),(a=(o=n.props).setOpen)===null||a===void 0||a.call(o,!0)),n.props.setPreSelection&&n.props.setPreSelection(l)},n.handleCustomMonthChange=function(r){var s,o;(o=(s=n.props).onMonthChange)===null||o===void 0||o.call(s,r),n.setState({isRenderAriaLiveMessage:!0})},n.handleMonthYearChange=function(r){n.handleYearChange(r),n.handleMonthChange(r)},n.changeYear=function(r){n.setState(function(s){var o=s.date;return{date:aa(o,Number(r))}},function(){return n.handleYearChange(n.state.date)})},n.changeMonth=function(r){n.setState(function(s){var o=s.date;return{date:Es(o,Number(r))}},function(){var s,o;n.handleMonthChange(n.state.date),(o=(s=n.props).onMonthSelectedInChange)===null||o===void 0||o.call(s,0)})},n.changeMonthYear=function(r){n.setState(function(s){var o=s.date;return{date:aa(Es(o,es(r)),jt(r))}},function(){return n.handleMonthYearChange(n.state.date)})},n.header=function(r,s){if(r===void 0&&(r=n.state.date),s===void 0&&(s=0),!Qr(r))return[];var o=n.props.disabled,a=Rc(r,n.props.locale,n.props.calendarStartDay),l=[];return n.props.showWeekNumbers&&l.push(Ee.createElement("div",{key:"W",className:"react-datepicker__day-name ".concat(o?"react-datepicker__day-name--disabled":""),role:"columnheader"},Ee.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),Ee.createElement("span",{"aria-hidden":"true"},n.props.weekLabel||"#"))),l.concat([0,1,2,3,4,5,6].map(function(c){var d=Oo(a,c),f=n.formatWeekday(d,n.props.locale),m=Vn(d,"EEEE",n.props.locale),p=n.props.weekDayClassName?n.props.weekDayClassName(d):void 0;if(n.props.renderCustomDayName){var g=n.props.renderCustomDayName({day:d,shortName:f,fullName:m,locale:n.props.locale,customDayNameCount:s});return Ee.createElement("div",{key:c,role:"columnheader",className:Ni("react-datepicker__day-name",p,o?"react-datepicker__day-name--disabled":"")},g)}return Ee.createElement("div",{key:c,role:"columnheader",className:Ni("react-datepicker__day-name",p,o?"react-datepicker__day-name--disabled":"")},Ee.createElement("span",{className:"react-datepicker__sr-only"},m),Ee.createElement("span",{"aria-hidden":"true"},f))}))},n.formatWeekday=function(r,s){return n.props.formatWeekDay?h1e(r,n.props.formatWeekDay,s):n.props.useWeekdaysShort?p1e(r,s):m1e(r,s)},n.decreaseYear=function(){n.setState(function(r){var s,o=r.date;return{date:Mc(o,n.props.showYearPicker?(s=n.props.yearItemNumber)!==null&&s!==void 0?s:e.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.clearSelectingDate=function(){n.setState({selectingDate:void 0})},n.renderPreviousButton=function(){var r,s,o;if(!n.props.renderCustomHeader){var a=(r=n.props.monthsShown)!==null&&r!==void 0?r:e.defaultProps.monthsShown,l=n.props.showPreviousMonths?a-1:0,c=(s=n.props.monthSelectedIn)!==null&&s!==void 0?s:l,d=Ju(n.state.date,c),f;switch(!0){case n.props.disabled:f=!0;break;case n.props.showMonthYearPicker:f=_B(n.state.date,n.props);break;case n.props.showYearPicker:f=w1e(n.state.date,n.props);break;case n.props.showQuarterYearPicker:f=y1e(n.state.date,n.props);break;default:f=wB(d,n.props);break}if(!(!((o=n.props.forceShowMonthNavigation)!==null&&o!==void 0?o:e.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&f||n.props.showTimeSelectOnly)){var m=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],p=["react-datepicker__navigation","react-datepicker__navigation--previous"],g=n.decreaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(g=n.decreaseYear),f&&n.props.showDisabledMonthNavigation&&(p.push("react-datepicker__navigation--previous--disabled"),g=void 0);var y=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,v=n.props,x=v.previousMonthButtonLabel,C=x===void 0?e.defaultProps.previousMonthButtonLabel:x,D=v.previousYearButtonLabel,E=D===void 0?e.defaultProps.previousYearButtonLabel:D,T=n.props,S=T.previousMonthAriaLabel,A=S===void 0?typeof C=="string"?C:"Previous Month":S,I=T.previousYearAriaLabel,R=I===void 0?typeof E=="string"?E:"Previous Year":I;return Ee.createElement("button",{type:"button",className:p.join(" "),onClick:g,onKeyDown:n.props.handleOnKeyDown,"aria-label":y?R:A},Ee.createElement("span",{className:m.join(" ")},y?E:C))}}},n.increaseYear=function(){n.setState(function(r){var s,o=r.date;return{date:No(o,n.props.showYearPicker?(s=n.props.yearItemNumber)!==null&&s!==void 0?s:e.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.renderNextButton=function(){var r;if(!n.props.renderCustomHeader){var s;switch(!0){case n.props.disabled:s=!0;break;case n.props.showMonthYearPicker:s=CB(n.state.date,n.props);break;case n.props.showYearPicker:s=x1e(n.state.date,n.props);break;case n.props.showQuarterYearPicker:s=v1e(n.state.date,n.props);break;default:s=xB(n.state.date,n.props);break}if(!(!((r=n.props.forceShowMonthNavigation)!==null&&r!==void 0?r:e.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&s||n.props.showTimeSelectOnly)){var o=["react-datepicker__navigation","react-datepicker__navigation--next"],a=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];n.props.showTimeSelect&&o.push("react-datepicker__navigation--next--with-time"),n.props.todayButton&&o.push("react-datepicker__navigation--next--with-today-button");var l=n.increaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(l=n.increaseYear),s&&n.props.showDisabledMonthNavigation&&(o.push("react-datepicker__navigation--next--disabled"),l=void 0);var c=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,d=n.props,f=d.nextMonthButtonLabel,m=f===void 0?e.defaultProps.nextMonthButtonLabel:f,p=d.nextYearButtonLabel,g=p===void 0?e.defaultProps.nextYearButtonLabel:p,y=n.props,v=y.nextMonthAriaLabel,x=v===void 0?typeof m=="string"?m:"Next Month":v,C=y.nextYearAriaLabel,D=C===void 0?typeof g=="string"?g:"Next Year":C;return Ee.createElement("button",{type:"button",className:o.join(" "),onClick:l,onKeyDown:n.props.handleOnKeyDown,"aria-label":c?D:x},Ee.createElement("span",{className:a.join(" ")},c?g:m))}}},n.renderCurrentMonth=function(r){r===void 0&&(r=n.state.date);var s=["react-datepicker__current-month"];return n.props.showYearDropdown&&s.push("react-datepicker__current-month--hasYearDropdown"),n.props.showMonthDropdown&&s.push("react-datepicker__current-month--hasMonthDropdown"),n.props.showMonthYearDropdown&&s.push("react-datepicker__current-month--hasMonthYearDropdown"),Ee.createElement("h2",{className:s.join(" ")},Qr(r)?Vn(r,n.props.dateFormat,n.props.locale):"")},n.renderYearDropdown=function(r){if(r===void 0&&(r=!1),!(!n.props.showYearDropdown||r))return Ee.createElement(V1e,Bt({},e.defaultProps,n.props,{date:n.state.date,onChange:n.changeYear,year:jt(n.state.date)}))},n.renderMonthDropdown=function(r){if(r===void 0&&(r=!1),!(!n.props.showMonthDropdown||r))return Ee.createElement(R1e,Bt({},e.defaultProps,n.props,{month:es(n.state.date),onChange:n.changeMonth}))},n.renderMonthYearDropdown=function(r){if(r===void 0&&(r=!1),!(!n.props.showMonthYearDropdown||r))return Ee.createElement(N1e,Bt({},e.defaultProps,n.props,{date:n.state.date,onChange:n.changeMonthYear}))},n.handleTodayButtonClick=function(r){n.props.onSelect(pB(),r),n.props.setPreSelection&&n.props.setPreSelection(pB())},n.renderTodayButton=function(){if(!(!n.props.todayButton||n.props.showTimeSelectOnly))return Ee.createElement("div",{className:"react-datepicker__today-button",onClick:n.handleTodayButtonClick},n.props.todayButton)},n.renderDayNamesHeader=function(r,s){return s===void 0&&(s=0),Ee.createElement("div",{className:"react-datepicker__day-names",role:"row"},n.header(r,s))},n.renderDefaultHeader=function(r){var s=r.monthDate,o=r.i,a=Ee.createElement("div",{className:Ni("react-datepicker__header",{"react-datepicker__header--has-time-select":n.props.showTimeSelect,"react-datepicker__header--middle":n.props.monthHeaderPosition==="middle","react-datepicker__header--bottom":n.props.monthHeaderPosition==="bottom"})},n.renderCurrentMonth(s),Ee.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(n.props.dropdownMode),onFocus:n.handleDropdownFocus},n.renderMonthDropdown(o!==0),n.renderMonthYearDropdown(o!==0),n.renderYearDropdown(o!==0)));return n.props.monthHeaderPosition==="top"?a:Ee.createElement("div",{className:"react-datepicker__header-wrapper"},n.renderPreviousButton()||null,n.renderNextButton()||null,a)},n.renderCustomHeader=function(r){var s,o,a=r.monthDate,l=r.i;if(n.props.showTimeSelect&&!n.state.monthContainer||n.props.showTimeSelectOnly)return null;var c=n.props,d=c.showYearPicker,f=c.yearItemNumber,m;if(d){var p=gl(a,f),g=p.startPeriod,y=p.endPeriod;m={startYear:g,endYear:y}}var v=wB(n.state.date,n.props),x=xB(n.state.date,n.props),C=_B(n.state.date,n.props),D=CB(n.state.date,n.props);return Ee.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:n.props.onDropdownFocus},(o=(s=n.props).renderCustomHeader)===null||o===void 0?void 0:o.call(s,Bt(Bt(Bt({},n.state),d&&{visibleYearsRange:m}),{customHeaderCount:l,monthDate:a,changeMonth:n.changeMonth,changeYear:n.changeYear,decreaseMonth:n.decreaseMonth,increaseMonth:n.increaseMonth,decreaseYear:n.decreaseYear,increaseYear:n.increaseYear,prevMonthButtonDisabled:v,nextMonthButtonDisabled:x,prevYearButtonDisabled:C,nextYearButtonDisabled:D})))},n.renderYearHeader=function(r){var s=r.monthDate,o=n.props,a=o.showYearPicker,l=o.yearItemNumber,c=l===void 0?e.defaultProps.yearItemNumber:l,d=gl(s,c),f=d.startPeriod,m=d.endPeriod;return Ee.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a?"".concat(f," - ").concat(m):jt(s))},n.renderHeader=function(r){var s=r.monthDate,o=r.i,a=o===void 0?0:o,l={monthDate:s,i:a};switch(!0){case n.props.renderCustomHeader!==void 0:return n.renderCustomHeader(l);case(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker):return n.renderYearHeader(l);default:return n.renderDefaultHeader(l)}},n.renderMonths=function(){var r,s;if(!(n.props.showTimeSelectOnly||n.props.showYearPicker)){for(var o=[],a=(r=n.props.monthsShown)!==null&&r!==void 0?r:e.defaultProps.monthsShown,l=n.props.showPreviousMonths?a-1:0,c=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?No(n.state.date,l):Ju(n.state.date,l),d=(s=n.props.monthSelectedIn)!==null&&s!==void 0?s:l,f=0;f<a;++f){var m=f-d+l,p=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?No(c,m):Vo(c,m),g="month-".concat(f),y=f<a-1,v=f>0;o.push(Ee.createElement("div",{key:g,ref:function(x){n.monthContainer=x??void 0},className:"react-datepicker__month-container"},n.props.monthHeaderPosition==="top"&&n.renderHeader({monthDate:p,i:f}),Ee.createElement(P1e,Bt({},e.defaultProps,n.props,{containerRef:n.containerRef,ariaLabelPrefix:n.props.monthAriaLabelPrefix,day:p,onDayCl
29ick:n.handleDayClick,handleOnKeyDown:n.props.handleOnDayKeyDown,handleOnMonthKeyDown:n.props.handleOnKeyDown,onDayMouseEnter:n.handleDayMouseEnter,onMouseLeave:n.handleMonthMouseLeave,orderInDisplay:f,selectingDate:n.state.selectingDate,monthShowsDuplicateDaysEnd:y,monthShowsDuplicateDaysStart:v,dayNamesHeader:n.renderDayNamesHeader(p,f),monthHeader:n.props.monthHeaderPosition==="middle"?n.renderHeader({monthDate:p,i:f}):void 0,monthFooter:n.props.monthHeaderPosition==="bottom"?n.renderHeader({monthDate:p,i:f}):void 0}))))}return o}},n.renderYears=function(){if(!n.props.showTimeSelectOnly&&n.props.showYearPicker)return Ee.createElement("div",{className:"react-datepicker__year--container"},n.renderHeader({monthDate:n.state.date}),Ee.createElement(M1e,Bt({},e.defaultProps,n.props,{selectingDate:n.state.selectingDate,date:n.state.date,onDayClick:n.handleDayClick,clearSelectingDate:n.clearSelectingDate,onYearMouseEnter:n.handleYearMouseEnter,onYearMouseLeave:n.handleYearMouseLeave})))},n.renderTimeSection=function(){if(n.props.showTimeSelect&&(n.state.monthContainer||n.props.showTimeSelectOnly))return Ee.createElement(B1e,Bt({},e.defaultProps,n.props,{onChange:n.props.onTimeChange,format:n.props.timeFormat,intervals:n.props.timeIntervals,monthRef:n.state.monthContainer}))},n.renderInputTimeSection=function(){var r,s;if(n.props.showTimeInput){if(n.props.selectsRange){var o=n.props,a=o.startDate,l=o.endDate,c=a?new Date(a):void 0,d=c&&Qr(c)&&!!a,f=d?"".concat(xf(c.getHours()),":").concat(xf(c.getMinutes())):"",m=l?new Date(l):void 0,p=m&&Qr(m)&&!!l,g=p?"".concat(xf(m.getHours()),":").concat(xf(m.getMinutes())):"";return Ee.createElement(Ee.Fragment,null,Ee.createElement(mE,Bt({},e.defaultProps,n.props,{date:c,timeString:f,onChange:function(C){var D,E;(E=(D=n.props).onTimeChange)===null||E===void 0||E.call(D,C,"start")},timeInputLabel:((r=n.props.timeInputLabel)!==null&&r!==void 0?r:"Time")+" (Start)"})),Ee.createElement(mE,Bt({},e.defaultProps,n.props,{date:m,timeString:g,onChange:function(C){var D,E;(E=(D=n.props).onTimeChange)===null||E===void 0||E.call(D,C,"end")},timeInputLabel:((s=n.props.timeInputLabel)!==null&&s!==void 0?s:"Time")+" (End)"})))}var y=n.props.selected?new Date(n.props.selected):void 0,v=y&&Qr(y)&&!!n.props.selected,x=v?"".concat(xf(y.getHours()),":").concat(xf(y.getMinutes())):"";return Ee.createElement(mE,Bt({},e.defaultProps,n.props,{date:y,timeString:x,onChange:function(C){var D,E;(E=(D=n.props).onTimeChange)===null||E===void 0||E.call(D,C)}}))}},n.renderAriaLiveRegion=function(){var r;if(!Qr(n.state.date))return Ee.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"});var s=gl(n.state.date,(r=n.props.yearItemNumber)!==null&&r!==void 0?r:e.defaultProps.yearItemNumber),o=s.startPeriod,a=s.endPeriod,l;return n.props.showYearPicker?l="".concat(o," - ").concat(a):n.props.showMonthYearPicker||n.props.showQuarterYearPicker?l=jt(n.state.date):l="".concat(y3(es(n.state.date),n.props.locale)," ").concat(jt(n.state.date)),Ee.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},n.state.isRenderAriaLiveMessage&&l)},n.renderChildren=function(){if(n.props.children)return Ee.createElement("div",{className:"react-datepicker__children-container"},n.props.children)},n.containerRef=M.createRef(),n.state={date:n.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},n}return Object.defineProperty(e,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,outsideClickIgnoreClass:G$,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:v0,monthHeaderPosition:"top"}},enumerable:!1,configurable:!0}),e.prototype.componentDidMount=function(){var t=this;this.props.showTimeSelect&&(this.assignMonthContainer=(function(){t.setState({monthContainer:t.monthContainer})})())},e.prototype.componentDidUpdate=function(t){var n=this;if(this.props.preSelection&&Qr(this.props.preSelection)&&(!qt(this.props.preSelection,t.preSelection)||this.props.monthSelectedIn!==t.monthSelectedIn)){var r=!Tr(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return r&&n.handleCustomMonthChange(n.state.date)})}else this.props.openToDate&&!qt(this.props.openToDate,t.openToDate)&&this.setState({date:this.props.openToDate})},e.prototype.render=function(){var t=this.props.container||r1e;return Ee.createElement(l_,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},Ee.createElement("div",{style:{display:"contents"},ref:this.containerRef},Ee.createElement(t,{className:Ni("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly,inline:this.props.inline},this.renderAriaLiveRegion(),this.props.monthHeaderPosition==="top"&&this.renderPreviousButton(),this.props.monthHeaderPosition==="top"&&this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},e})(M.Component),H1e=function(i){var e=i.icon,t=i.className,n=t===void 0?"":t,r=i.onClick,s="react-datepicker__calendar-icon";if(typeof e=="string")return Ee.createElement("i",{className:"".concat(s," ").concat(e," ").concat(n),"aria-hidden":"true",onClick:r});if(Ee.isValidElement(e)){var o=e;return Ee.cloneElement(o,{className:"".concat(o.props.className||""," ").concat(s," ").concat(n),onClick:function(a){typeof o.props.onClick=="function"&&o.props.onClick(a),typeof r=="function"&&r(a)}})}return Ee.createElement("svg",{className:"".concat(s," ").concat(n),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:r},Ee.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 9
296 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},Y$=(function(i){sr(e,i);function e(t){var n=i.call(this,t)||this;return n.portalRoot=null,n.el=document.createElement("div"),n}return e.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},e.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},e.prototype.render=function(){return hie.createPortal(this.props.children,this.el)},e})(M.Component),q1e="[tabindex], a, button, input, select, textarea",$1e=function(i){return(i instanceof HTMLAnchorElement||!i.disabled)&&i.tabIndex!==-1},K$=(function(i){sr(e,i);function e(t){var n=i.call(this,t)||this;return n.getTabChildren=function(){var r;return Array.prototype.slice.call((r=n.tabLoopRef.current)===null||r===void 0?void 0:r.querySelectorAll(q1e),1,-1).filter($1e)},n.handleFocusStart=function(){var r=n.getTabChildren();r&&r.length>1&&r[r.length-1].focus()},n.handleFocusEnd=function(){var r=n.getTabChildren();r&&r.length>1&&r[0].focus()},n.tabLoopRef=M.createRef(),n}return e.prototype.render=function(){var t;return((t=this.props.enableTabLoop)!==null&&t!==void 0?t:e.defaultProps.enableTabLoop)?Ee.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},Ee.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,Ee.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},e.defaultProps={enableTabLoop:!0},e})(M.Component);function G1e(i){function e(t){var n,r=typeof t.hidePopper=="boolean"?t.hidePopper:!0,s=M.useRef(null),o=i1e(Bt({open:!r,whileElementsMounted:Hq,placement:t.popperPlacement,middleware:ga([Hve({padding:15}),Wve(10),qve({element:s})],(n=t.popperModifiers)!==null&&n!==void 0?n:[],!0)},t.popperProps)),a=Bt(Bt({},t),{hidePopper:r,popperProps:Bt(Bt({},o),{arrowRef:s})});return Ee.createElement(i,Bt({},a))}return e.displayName="withFloating(".concat(i.displayName||i.name||"Component",")"),e}var Y1e=function(i){var e=i.className,t=i.wrapperClassName,n=i.hidePopper,r=n===void 0?!0:n,s=i.popperComponent,o=i.targetComponent,a=i.enableTabLoop,l=i.popperOnKeyDown,c=i.portalId,d=i.portalHost,f=i.popperProps,m=i.showArrow,p=i.popperTargetRef,g=i.monthHeaderPosition;M.useEffect(function(){p?.current&&f.refs.setPositionReference(p.current)},[p,f.refs]);var y=void 0;if(!r){var v=Ni("react-datepicker-popper",!m&&"react-datepicker-popper-offset",g==="middle"&&"react-datepicker-popper--header-middle",g==="bottom"&&"react-datepicker-popper--header-bottom",e);y=Ee.createElement(K$,{enableTabLoop:a},Ee.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:v,"data-placement":f.placement,onKeyDown:l},s,m&&Ee.createElement(Xve,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}i.popperContainer&&(y=M.createElement(i.popperContainer,{},y)),c&&!r&&(y=Ee.createElement(Y$,{portalId:c,portalHost:d},y));var x=Ni("react-datepicker-wrapper",t);return Ee.createElement(Ee.Fragment,null,Ee.createElement("div",{ref:f.refs.setReference,className:x},o),y)},K1e=G1e(Y1e);function IB(i,e){return i&&e?es(i)!==es(e)||jt(i)!==jt(e):i!==e}var gE="Date input not valid.",Sg=(function(i){sr(e,i);function e(t){var n=i.call(this,t)||this;return n.calendar=null,n.input=null,n.getPreSelection=function(){var r=n.props.timeZone,s=n.props.openToDate?n.props.openToDate:n.props.selectsEnd&&n.props.startDate?n.props.startDate:n.props.selectsStart&&n.props.endDate?n.props.endDate:en();return r?hB(s,r):s},n.modifyHolidays=function(){var r;return(r=n.props.holidays)===null||r===void 0?void 0:r.reduce(function(s,o){var a=_u(o.date,"yyyy-MM-dd",void 0,!1);return a?ga(ga([],s,!0),[Bt(Bt({},o),{date:a})],!1):s},[])},n.calcInitialState=function(){var r=n.props.timeZone,s=n.getPreSelection(),o=W$(n.props),a=H$(n.props),l=o&&pa(s,Mp(o))?o:a&&wl(s,gB(a))?a:s,c=n.props.selectsRange?n.props.startDate:n.props.selected;return c&&r&&(c=hB(c,r)),{open:n.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:c??l,highlightDates:DB(n.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},n.getInputValue=function(){var r,s=n.props,o=s.locale,a=s.startDate,l=s.endDate,c=s.rangeSeparator,d=s.selected,f=s.selectedDates,m=s.selectsMultiple,p=s.selectsRange,g=s.formatMultipleDates,y=s.value,v=(r=n.props.dateFormat)!==null&&r!==void 0?r:e.defaultProps.dateFormat,x=n.state.inputValue;if(typeof y=="string")return y;
29if(typeof x=="string")return x;if(p)return a1e(a,l,{dateFormat:v,locale:o,rangeSeparator:c});if(m){if(g){var C=function(D){return Yr(D,{dateFormat:v,locale:o})};return g(f??[],C)}return l1e(f??[],{dateFormat:v,locale:o})}return Yr(d,{dateFormat:v,locale:o})},n.resetHiddenStatus=function(){n.setState(Bt(Bt({},n.state),{wasHidden:!1}))},n.setHiddenStatus=function(){n.setState(Bt(Bt({},n.state),{wasHidden:!0}))},n.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&n.setHiddenStatus()},n.clearPreventFocusTimeout=function(){n.preventFocusTimeout&&clearTimeout(n.preventFocusTimeout)},n.setFocus=function(){var r,s;(s=(r=n.input)===null||r===void 0?void 0:r.focus)===null||s===void 0||s.call(r,{preventScroll:!0})},n.setBlur=function(){var r,s;(s=(r=n.input)===null||r===void 0?void 0:r.blur)===null||s===void 0||s.call(r),n.cancelFocusInput()},n.deferBlur=function(){requestAnimationFrame(function(){n.setBlur()})},n.setOpen=function(r,s){s===void 0&&(s=!1),n.setState({open:r,preSelection:r&&n.state.open?n.state.preSelection:n.calcInitialState().preSelection,lastPreSelectChange:bE},function(){r||n.setState(function(o){return{focused:s?o.focused:!1}},function(){!s&&n.deferBlur(),n.setState({inputValue:null})})})},n.inputOk=function(){return wa(n.state.preSelection)},n.isCalendarOpen=function(){return n.props.open===void 0?n.state.open&&!n.props.disabled&&!n.props.readOnly:n.props.open},n.handleFocus=function(r){var s,o,a=n.state.wasHidden,l=a?n.state.open:!0;a&&n.resetHiddenStatus(),n.state.preventFocus||((o=(s=n.props).onFocus)===null||o===void 0||o.call(s,r),l&&!n.props.preventOpenOnFocus&&!n.props.readOnly&&n.setOpen(!0)),n.setState({focused:!0})},n.sendFocusBackToInput=function(){n.preventFocusTimeout&&n.clearPreventFocusTimeout(),n.setState({preventFocus:!0},function(){n.preventFocusTimeout=setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})})}
29,n.cancelFocusInput=function(){clearTimeout(n.inputFocusTimeout),n.inputFocusTimeout=void 0},n.deferFocusInput=function(){n.cancelFocusInput(),n.inputFocusTimeout=setTimeout(function(){return n.setFocus()},1)},n.handleDropdownFocus=function(){n.cancelFocusInput()},n.resetInputValue=function(){n.setState(Bt(Bt({},n.state),{inputValue:null}))},n.handleBlur=function(r){var s,o;(!n.state.open||n.props.withPortal||n.props.showTimeInput)&&((o=(s=n.props).onBlur)===null||o===void 0||o.call(s,r));var a=n.state.inputValue;if(typeof a=="string"&&a.length>0){var l=/[a-zA-Z0-9]/.test(a);!l&&n.props.selected&&n.setSelected(null,void 0,!0)}n.resetInputValue(),n.state.open&&n.props.open===!1&&n.setOpen(!1),n.setState({focused:!1})},n.handleCalendarClickOutside=function(r){var s,o;(o=(s=n.props).onClickOutside)===null||o===void 0||o.call(s,r),!n.props.inline&&!r.defaultPrevented&&n.setOpen(!1),n.props.withPortal&&r.preventDefault()},n.handleChange=function(){for(var r,s,o,a,l,c,d,f,m=[],p=0;p<arguments.length;p++)m[p]=arguments[p];var g=m[0];if(!(n.props.onChangeRaw&&(n.props.onChangeRaw.apply(n,m),!g||typeof g.isDefaultPrevented!="function"||g.isDefaultPrevented()))){n.setState({inputValue:g?.target instanceof HTMLInputElement?g.target.value:null,lastPreSelectChange:X1e});var y=n.props,v=y.selectsRange,x=y.startDate,C=y.endDate,D=(r=n.props.dateFormat)!==null&&r!==void 0?r:e.defaultProps.dateFormat,E=(s=n.props.strictParsing)!==null&&s!==void 0?s:e.defaultProps.strictParsing,T=g?.target instanceof HTMLInputElement?g.target.value:"";if(v){var S=n.props.rangeSeparator,A=S.trim(),I=T.split(D.includes(A)?S:A,2).map(function(W){return W.trim()}),R=I[0],O=I[1],j=_u(R??"",D,n.props.locale,E),B=j?_u(O??"",D,n.props.locale,E):null,U=((o=$u(x))===null||o===void 0?void 0:o.getTime())!==j?.getTime(),F=((a=$u(C))===null||a===void 0?void 0:a.getTime())!==B?.getTime();if(!U&&!F||j&&ro(j,n.props)||B&&ro(B,n.props))return;j&&n.setState({preSelection:j}),(c=(l=n.props).onChange)===null||c===void 0||c.call(l,[j,B],g)}else{var H=_u(T,D,n.props.locale,E,(d=n.props.selected)!==null&&d!==void 0?d:void 0);if(H||!T)n.setSelected(H,g,!0);else if(!n.props.inline){var L=o1e(T,(f=n.state.preSelection)!==null&&f!==void 0?f:void 0);L&&(!n.props.minDate||!pa(L,n.props.minDate))&&(!n.props.maxDate||!wl(L,n.props.maxDate))&&n.setState({preSelection:L})}}}},n.handleSelect=function(r,s,o){var a;if(!n.props.readOnly){var l=n.props,c=l.selectsRange,d=l.startDate,f=l.endDate,m=l.locale,p=l.swapRange,g=(a=n.props.dateFormat)!==null&&a!==void 0?a:e.defaultProps.dateFormat,y=!c||d&&!f&&(p||!hE(r,d));if(n.props.shouldCloseOnSelect&&!n.props.showTimeSelect&&y&&n.sendFocusBackToInput(),n.props.onChangeRaw){var v=Yr(r,{dateFormat:g,locale:m});n.props.onChangeRaw(s,{date:r,formattedDate:v})}n.setSelected(r,s,!1,o),n.props.showDateSelect&&n.setState({isRenderAriaLiveMessage:!0}),!n.props.shouldCloseOnSelect||n.props.showTimeSelect?n.setPreSelection(r):y&&n.setOpen(!1)}},n.setSelected=function(r,s,o,a){var l,c,d=n.props.timeZone,f=r;if(f&&d&&(f=sl(f,d)),n.props.showYearPicker){if(f!==null&&y1(jt(f),n.props))return}else if(n.props.showMonthYearPicker){if(f!==null&&z$(f,n.props))return}else if(f!==null&&ro(f,n.props))return;var m=n.props,p=m.onChange,g=m.selectsRange,y=m.startDate,v=m.endDate,x=m.selectsMultiple,C=m.selectedDates,D=m.minTime,E=m.swapRange;if(!Gu(n.props.selected,f)||n.props.allowSameDay||g||x)if(f!==null&&(n.props.selected&&(!o||!n.props.showTimeSelect&&!n.props.showTimeSelectOnly&&!n.props.showTimeInput)&&(f=ol(f,{hour:fr(n.props.selected),minute:hr(n.props.selected),second:Ic(n.props.selected)})),!o&&(n.props.showTimeSelect||n.props.showTimeSelectOnly)&&D&&(f=ol(f,{hour:D.getHours(),minute:D.getMinutes(),second:D.getSeconds()})),n.props.inline||n.setState({preSelection:f}),n.props.focusSelectedMonth||n.setState({monthSelectedIn:a})),g){var T=p,S=!y&&!v,A=y&&!v,I=!y&&!!v,R=y&&v;S?T?.([f,null],s):A?f===null?T?.([null,null],s):hE(f,y)?T?.(E?[f,y]:[f,null],s):T?.([y,f],s):I&&(f&&hE(f,v)?T?.([f,v],s):T?.([f,null],s)),R&&T?.([f,null],s)}else if(x){var O=p;if(f!==null)if(!C?.length)O?.([f],s);else{var j=C.some(function(U){return qt(U,f)});if(j){var B=C.filter(function(U){return!qt(U,f)});O?.(B,s)}else O?.(ga(ga([],C,!0),[f],!1),s)}}else p?.(f,s);
29o||((c=(l=n.props).onSelect)===null||c===void 0||c.call(l,f,s),n.setState({inputValue:null}))},n.setPreSelection=function(r){if(!n.props.readOnly){var s=wa(n.props.minDate),o=wa(n.props.maxDate),a=!0;if(r){var l=Mp(r);if(s&&o)a=Mu(r,n.props.minDate,n.props.maxDate);else if(s){var c=Mp(n.props.minDate);a=wl(r,c)||Gu(l,c)}else if(o){var d=gB(n.props.maxDate);a=pa(r,d)||Gu(l,d)}}a&&n.setState({preSelection:r})}},n.toggleCalendar=function(){n.setOpen(!n.state.open)},n.handleTimeChange=function(r,s){var o,a;if(!n.props.selectsMultiple){var l=n.props,c=l.selectsRange,d=l.startDate,f=l.endDate,m=l.onChange,p=l.timeZone;if(c){var g=m;if(s==="start"){if(d){var y=ol(d,{hour:fr(r),minute:hr(r)});n.setState({preSelection:y}),p&&(y=sl(y,p)),g?.([y,f?p?sl(f,p):f:null],void 0)}}else if(s==="end"){if(f){var v=ol(f,{hour:fr(r),minute:hr(r)});n.setState({preSelection:v}),p&&(v=sl(v,p)),g?.([d?p?sl(d,p):d:null,v],void 0)}}else{var x=d&&!f;if(x){var y=ol(d,{hour:fr(r),minute:hr(r)});n.setState({preSelection:y}),p&&(y=sl(y,p)),g?.([y,null],void 0)}else if(d&&f){var v=ol(f,{hour:fr(r),minute:hr(r)});n.setState({preSelection:v}),p&&(v=sl(v,p)),g?.([p?sl(d,p):d,v],void 0)}else{var C=ol(n.getPreSelection(),{hour:fr(r),minute:hr(r)});n.setState({preSelection:C})}}}else{var D=n.props.selected?n.props.selected:n.getPreSelection(),C=n.props.selected?r:ol(D,{hour:fr(r),minute:hr(r)});n.setState({preSelection:C}),C&&p&&(C=sl(C,p)),(a=(o=n.props).onChange)===null||a===void 0||a.call(o,C)}n.props.shouldCloseOnSelect&&!n.props.showTimeInput&&(n.sendFocusBackToInput(),n.setOpen(!1)),n.props.showTimeInput&&n.setOpen(!0),(n.props.showTimeSelectOnly||n.props.showTimeSelect)&&n.setState({isRenderAriaLiveMessage:!0}),n.setState({inputValue:null})}},n.onInputClick=function(){var r,s;!n.props.disabled&&!n.props.readOnly&&n.setOpen(!0),(s=(r=n.props).onInputClick)===null||s===void 0||s.call(r)},n.handleTimeOnlyArrowKey=function(r){var s,o,a,l,c=$u(n.props.selected)||n.state.preSelection||en(),d=(s=n.props.timeIntervals)!==null&&s!==void 0?s:30,f=(o=n.props.dateFormat)!==null&&o!==void 0?o:e.defaultProps.dateFormat,m=Array.isArray(f)?f[0]:f,p=Mp(c),g=fr(c)*60+hr(c),y=1440-d,v;if(r===Qe.ArrowUp){var x=Math.max(0,g-d);v=Ag(p,x)}else{var x=Math.min(y,g+d);v=Ag(p,x)}var C=Vn(v,m||e.defaultProps.dateFormat,n.props.locale);if(n.setState({preSelection:v,inputValue:C}),!(n.props.selectsRange||n.props.selectsMultiple)){var D=n.props.selected?n.props.selected:n.getPreSelection(),E=n.props.selected?v:ol(D,{hour:fr(v),minute:hr(v)});(l=(a=n.props).onChange)===null||l===void 0||l.call(a,E),(n.props.showTimeSelectOnly||n.props.showTimeSelect)&&n.setState({isRenderAriaLiveMessage:!0}),requestAnimationFrame(function(){n.scrollToTimeOption(v)})}},n.handleTimeOnlyEnterKey=function(r){var s,o,a,l,c=r.target,d=c.value,f=(s=n.props.dateFormat)!==null&&s!==void 0?s:e.defaultProps.dateFormat,m=n.props.timeFormat||"p",p=n.state.preSelection||$u(n.props.selected)||en(),g=_u(d,f,n.props.locale,(o=n.props.strictParsing)!==null&&o!==void 0?o:!1,p),y=p;if(g&&Qr(g))y=g;else{var v=((a=n.calendar)===null||a===void 0?void 0:a.containerRef.current)instanceof Element&&n.calendar.containerRef.current.querySelector(".react-datepicker__time-list-item[tabindex='0']");if(v instanceof HTMLElement){var x=(l=v.textContent)===null||l===void 0?void 0:l.trim();if(x){var C=_u(x,m,n.props.locale,!1,p);C&&Qr(C)&&(y=C)}}}n.handleTimeChange(y),n.setOpen(!1),n.sendFocusBackToInput()},n.scrollToTimeOption=function(r){var s,o;if(!((s=n.calendar)===null||s===void 0)&&s.containerRef.current){for(var a=n.calendar.containerRef.current,l=Array.from(a.querySelectorAll(".react-datepicker__time-list-item")),c=null,d=1/0,f=n.props.timeFormat||"p",m=0,p=l;m<p.length;m++){var g=p[m],y=(o=g.textContent)===null||o===void 0?void 0:o.trim();if(y){var v=_u(y,f,n.props.locale,!1,r);if(v&&Qr(v)){if(q$(v,r)){c=g;break}var x=Math.abs(v.getTime()-r.getTime());x<d&&(d=x,c=g)}}}c&&(l.forEach(function(C){C.setAttribute("tabindex","-1")}),c.setAttribute("tabindex","0"),c.scrollIntoView({behavior:"smooth",block:"center"}))}},n.onInputKeyDown=function(r){var s,o,a,l,c,d;(o=(s=n.props).onKeyDown)===null||o===void 0||o.call(s,r);var f=r.key;if(!n.state.open&&!n.props.inline&&!n.props.preventOpenOnFocus){(f===Qe.ArrowDown||f===Qe.ArrowUp||f===Qe.Enter)&&((a=n.onInputClick)===null||a===void 0||a.call(n));return}if(n.state.open&&n.props.showTimeSelectOnly){if(f===Qe.ArrowDown||f===Qe.ArrowUp){r.preventDefault(),n.handleTimeOnlyArrowKey(f);return}if(f===Qe.Enter){r.preventDefault(),n.handleTimeOnlyEnterKey(r);return}}if(n.state.open){if(f===Qe.ArrowDown||f===Qe.ArrowUp){r.preventDefault();var m=n.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":n.props.showWeekPicker&&n.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':n.props.showFullMonthYearPicker||n.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',p=((l=n.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&n.calendar.containerRef.current.querySelector(m);p instanceof HTMLElement&&p.focus({preventScroll:!0});return}var g=en(n.state.preSelection);f===Qe.Enter?(r.preventDefault(),r.target.blur(),n.inputOk()&&n.state.lastPreSelectChange===bE?(n.handleSelect(g,r),!n.props.shouldCloseOnSelect&&n.setPreSelection(g)):n.setOpen(!1)):f===Qe.Escape?(r.preventDefault(),r.target.blur(),n.sendFocusBackToInput(),n.setOpen(!1)):f===Qe.Tab&&n.setOpen(!1),n.inputOk()||(d=(c=n.props).onInputError)===null||d===void 0||d.call(c,{code:1,msg:gE})}}
29,n.onPortalKeyDown=function(r){var s=r.key;s===Qe.Escape&&(r.preventDefault(),n.setState({preventFocus:!0},function(){n.setOpen(!1),setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})}))},n.onDayKeyDown=function(r){var s,o,a,l,c,d,f=n.props,m=f.minDate,p=f.maxDate,g=f.disabledKeyboardNavigation,y=f.showWeekPicker,v=f.shouldCloseOnSelect,x=f.locale,C=f.calendarStartDay,D=f.adjustDateOnChange,E=f.inline;if((o=(s=n.props).onKeyDown)===null||o===void 0||o.call(s,r),!g){var T=r.key,S=r.shiftKey,A=en(n.state.preSelection),I=function(j,B){var U=B;switch(j){case Qe.ArrowRight:U=y?Fw(B,1):Oo(B,1);break;case Qe.ArrowLeft:U=y?JN(B):Kye(B);break;case Qe.ArrowUp:U=JN(B);break;case Qe.ArrowDown:U=Fw(B,1);break;case Qe.PageUp:U=S?Mc(B,1):Ju(B,1);break;case Qe.PageDown:U=S?No(B,1):Vo(B,1);break;case Qe.Home:U=Rc(B,x,C);break;case Qe.End:U=d1e(B);break}return U},R=function(j,B){for(var U=40,F=j,H=!1,L=0,W=I(j,B);!H;){if(L>=U){W=B;break}m&&W<m&&(F=Qe.ArrowRight,W=ro(m,n.props)?I(F,W):m),p&&W>p&&(F=Qe.ArrowLeft,W=ro(p,n.props)?I(F,W):p),ro(W,n.props)?((F===Qe.PageUp||F===Qe.Home)&&(F=Qe.ArrowRight),(F===Qe.PageDown||F===Qe.End)&&(F=Qe.ArrowLeft),W=I(F,W)):H=!0,L++}return W};if(T===Qe.Enter){r.preventDefault(),n.handleSelect(A,r),!v&&n.setPreSelection(A);return}else if(T===Qe.Escape){r.preventDefault(),n.setOpen(!1),n.inputOk()||(l=(a=n.props).onInputError)===null||l===void 0||l.call(a,{code:1,msg:gE});return}var O=null;switch(T){case Qe.ArrowLeft:case Qe.ArrowRight:case Qe.ArrowUp:case Qe.ArrowDown:case Qe.PageUp:case Qe.PageDown:case Qe.Home:case Qe.End:O=R(T,A);break}if(!O){(d=(c=n.props).onInputError)===null||d===void 0||d.call(c,{code:1,msg:gE});return}r.preventDefault(),n.setState({lastPreSelectChange:bE}),D&&n.setSelected(O),n.setPreSelection(O),E&&n.setState({shouldFocusDayInline:!0})}},n.onPopperKeyDown=function(r){var s=r.key;s===Qe.Escape&&(r.preventDefault(),n.sendFocusBackToInput(),n.setOpen(!1))},n.onClearClick=function(r){r&&r.preventDefault&&r.preventDefault(),n.sendFocusBackToInput();var s=n.props,o=s.selectsRange,a=s.onChange;a?.(o?[null,null]:null,r),n.setState({inputValue:null})},n.clear=function(){n.onClearClick()},n.onScroll=function(r){typeof n.props.closeOnScroll=="boolean"&&n.props.closeOnScroll?(r.target===document||r.target===document.documentElement||r.target===document.body)&&n.setOpen(!1):typeof n.props.closeOnScroll=="function"&&n.props.closeOnScroll(r)&&n.setOpen(!1)},n.handleMonthSelectedInChange=function(r){n.setState({monthSelectedIn:r})},n.renderCalendar=function(){var r,s;return!n.props.inline&&!n.isCalendarOpen()?null:Ee.createElement(W1e,Bt({showMonthYearDropdown:void 0,ref:function(o){n.calendar=o}},n.props,n.state,{setOpen:n.setOpen,dateFormat:(r=n.props.dateFormatCalendar)!==null&&r!==void 0?r:e.defaultProps.dateFormatCalendar,onSelect:n.handleSelect,onClickOutside:n.handleCalendarClickOutside,holidays:C1e(n.modifyHolidays()),outsideClickIgnoreClass:n.props.outsideClickIgnoreClass,onDropdownFocus:n.handleDropdownFocus,onTimeChange:n.handleTimeChange,className:n.props.calendarClassName,container:n.props.calendarContainer,handleOnKeyDown:n.props.onKeyDown,handleOnDayKeyDown:n.onDayKeyDown,setPreSelection:n.setPreSelection,dropdownMode:(s=n.props.dropdownMode)!==null&&s!==void 0?s:e.defaultProps.dropdownMode,onMonthSelectedInChange:n.handleMonthSelectedInChange}),n.props.children)},n.renderAriaLiveRegion=function(){var r,s=n.props.locale,o=(r=n.props.dateFormat)!==null&&r!==void 0?r:e.defaultProps.dateFormat,a=n.props.showTimeInput||n.props.showTimeSelect,l=a?"PPPPp":"PPPP",c;return n.props.selectsRange?c="Selected start date: ".concat(Yr(n.props.startDate,{dateFormat:l,locale:s}),". ").concat(n.props.endDate?"End date: "+Yr(n.props.endDate,{dateFormat:l,locale:s}):""):n.props.showTimeSelectOnly?c="Selected time: ".concat(Yr(n.props.selected,{dateFormat:o,locale:s})):n.props.showYearPicker?c="Selected year: ".concat(Yr(n.props.selected,{dateFormat:"yyyy",locale:s})):n.props.showMonthYearPicker?c="Selected month: ".concat(Yr(n.props.selected,{dateFormat:"MMMM yyyy",locale:s})):n.props.showQuarterYearPicker?c="Selected quarter: ".concat(Yr(n.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):c="Selected date: ".concat(Yr(n.props.selected,{dateFormat:l,locale:s})),Ee.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-l
29ive"},c)},n.renderDateInput=function(){var r,s,o,a,l,c,d,f=Ni(n.props.className,(r={},r[n.props.outsideClickIgnoreClass||e.defaultProps.outsideClickIgnoreClass]=n.state.open,r)),m=n.props.customInput||Ee.createElement("input",{type:"text"}),p=n.props.customInputRef||"ref",g={},y=(o=n.props["aria-describedby"])!==null&&o!==void 0?o:n.props.ariaDescribedBy,v=(a=n.props["aria-invalid"])!==null&&a!==void 0?a:n.props.ariaInvalid,x=(l=n.props["aria-label"])!==null&&l!==void 0?l:n.props.ariaLabel,C=(c=n.props["aria-labelledby"])!==null&&c!==void 0?c:n.props.ariaLabelledBy,D=(d=n.props["aria-required"])!==null&&d!==void 0?d:n.props.ariaRequired;return y!=null&&(g["aria-describedby"]=y),v!=null&&(g["aria-invalid"]=v),x!=null&&(g["aria-label"]=x),C!=null&&(g["aria-labelledby"]=C),D!=null&&(g["aria-required"]=D),M.cloneElement(m,Bt((s={},s[p]=function(E){n.input=E},s.value=n.getInputValue(),s.onBlur=n.handleBlur,s.onChange=n.handleChange,s.onClick=n.onInputClick,s.onFocus=n.handleFocus,s.onKeyDown=n.onInputKeyDown,s.id=n.props.id,s.name=n.props.name,s.form=n.props.form,s.autoFocus=n.props.autoFocus,s.placeholder=n.props.placeholderText,s.disabled=n.props.disabled,s.autoComplete=n.props.autoComplete,s.className=Ni(m.props.className,f),s.title=n.props.title,s.readOnly=n.props.readOnly,s.required=n.props.required,s.tabIndex=n.props.tabIndex,s),g))},n.renderClearButton=function(){var r=n.props,s=r.isClearable,o=r.disabled,a=r.selected,l=r.startDate,c=r.endDate,d=r.clearButtonTitle,f=r.clearButtonClassName,m=f===void 0?"":f,p=r.ariaLabelClose,g=p===void 0?"Close":p,y=r.selectedDates,v=r.readOnly;return s&&!v&&(a!=null||l!=null||c!=null||y?.length)?Ee.createElement("button",{type:"button",className:Ni("react-datepicker__close-icon",m,{"react-datepicker__close-icon--disabled":o}),disabled:o,"aria-label":g,onClick:n.onClearClick,title:d,tabIndex:-1}):null},n.state=n.calcInitialState(),n.preventFocusTimeout=void 0,n}return Object.defineProperty(e,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,outsideClickIgnoreClass:G$,readOnly:!1,rangeSeparator:V$,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:v0,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),e.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},e.prototype.componentDidUpdate=function(t,n){var r,s,o,a;this.props.selectsRange&&IB(t.startDate,this.props.startDate)?this.setPreSelection(this.props.startDate):IB(t.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&t.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),this.props.selectsRange&&n.open===!1&&this.state.open===!0&&this.state.monthSelectedIn!==0&&this.setState({monthSelectedIn:0}),t.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:DB(this.props.highlightDates)}),!n.focused&&!Gu(t.selected,this.props.selected)&&this.setState({inputValue:null}),n.open!==this.state.open&&(n.open===!1&&this.state.open===!0&&((s=(r=this.props).onCalendarOpen)===null||s===void 0||s.call(r)),n.open===!0&&this.state.open===!1&&((a=(o=this.props).onCalendarClose)===null||a===void 0||a.call(o)))},e.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},e.prototype.renderInputContainer=function(){var t=this.props,n=t.showIcon,r=t.icon,s=t.calendarIconClassname,o=t.calendarIconClassName,a=t.toggleCalendarOnIconClick,l=this.state.open;return s&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),Ee.createElement("div",{className:"react-datepicker__input-container".concat(n?" react-datepicker__view-calendar-icon":"")},n&&Ee.createElement(H1e,Bt({icon:r,className:Ni(o,!o&&s,l&&"react-datepicker-ignore-onclickoutside")},a?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())}
29,e.prototype.render=function(){var t=this.renderCalendar();if(this.props.inline)return t;if(this.props.withPortal){var n=this.state.open?Ee.createElement(K$,{enableTabLoop:this.props.enableTabLoop},Ee.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},t)):null;return this.state.open&&this.props.portalId&&(n=Ee.createElement(Y$,Bt({portalId:this.props.portalId},this.props),n)),Ee.createElement(Ee.Fragment,null,this.renderInputContainer(),n)}return Ee.createElement(K1e,Bt({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:t,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow,monthHeaderPosition:this.props.monthHeaderPosition}))},e})(M.Component),X1e="input",bE="navigate";function Q1e({field:i,formStateData:e,handleChange:t,formError:n,titleShow:r=!0,rowIndex:s=null}){const{modeType:o}=_t(),a=l=>{const c=O$(l||"","yyyy-MM-dd HH:mm:ss");t(c,i),i?.cb&&i?.cb(event,s)};return w.jsxs(w.Fragment,{children:[o!=="list"&&o!=="trash"&&r?w.jsxs("label",{children:[i?.title,i?.validate?.includes("required")&&w.jsx("em",{children:" *"}),i?.info&&w.jsx("span",{className:"info",children:i?.info})]}):null,w.jsx("div",{style:{position:"relative"},children:w.jsx(Sg,{selected:e?.[i?.name]?new Date(e[i.name]):null,onChange:a,showTimeSelect:!0,timeFormat:"h:mm aa",timeIntervals:i?.attr?.timeIntervals||15,dateFormat:"yyyy-MM-dd h:mm aa",placeholderText:i?.title||"Select date and time",className:`${i?.attr?.class||""}`,id:i?.attr?.id,readOnly:i?.attrp?.readOnly||!1,showYearDropdown:!0,showMonthDropdown:!0,dropdownMode:"select",autoComplete:"off"})}),n?.[i?.name]&&w.jsx("p",{className:"e",children:n?.[i?.name]})]})}function Z1e({field:i,formStateData:e,handleChange:t,formError:n,titleShow:r=!0,rowIndex:s=null}){const{modeType:o}=_t(),a=c=>{const d=O$(c||"","HH:mm");t(d,i),i?.cb&&i?.cb(event,s)},l=()=>{if(!e?.[i?.name])return null;const c=e[i.name],d=new Date,[f,m,p]=c.split(":");return new Date(d.getFullYear(),d.getMonth(),d.getDate(),parseInt(f)||0,parseInt(m)||0,parseInt(p)||0)};return w.jsxs(w.Fragment,{children:[o!=="list"&&o!=="trash"&&r?w.jsxs("label",{children:[i?.title,i?.validate?.includes("required")&&w.jsx("em",{children:" *"}),i?.info&&w.jsx("span",{className:"info",children:i?.info})]}):null,w.jsx("div",{style:{position:"relative"},children:w.jsx(Sg,{selected:l(),onChange:a,showTimeSelect:!0,showTimeSelectOnly:!0,timeIntervals:i?.attr?.timeIntervals||15,timeCaption:"Time",dateFormat:"h:mm aa",timeFormat:"h:mm aa",placeholderText:i?.title||"Select time",className:`${i?.attr?.class||""}`,id:i?.attr?.id,readOnly:i?.attrp?.readOnly||!1,autoComplete:"off"})}),n?.[i?.name]&&w.jsx("p",{className:"e",children:n?.[i?.name]})]})}const J1e="Asia/Kolkata";function ewe(i){if(!i)return"";const e=typeof i=="string"?new Date(i):i;if(isNaN(e.getTime()))return"";const t=F$(e,J1e);return Rw(t,"yyyy-MM-dd")}function twe({field:i,formStateData:e,handleChange:t,formError:n,titleShow:r=!0,rowIndex:s=null}){const{modeType:o}=_t(),a=l=>{const c=ewe(l||"");t(c,i),i?.cb&&i?.cb(event,s)};return w.jsxs(w.Fragment,{children:[o!=="list"&&o!=="trash"&&r?w.jsxs("label",{children:[i?.title,i?.validate?.includes("required")&&w.jsx("em",{children:" *"}),i?.info&&w.jsx("span",{className:"info",children:i?.info})]}):null,w.jsx("div",{style:{position:"relative"},children:w.jsx(Sg,{selected:e?.[i?.name]??null,onChange:a,dateFormat:"yyyy-MM-dd",placeholderText:i?.title,className:`${i?.attr?.class||""}`,id:i?.attr?.id,readOnly:i?.attrp?.readOnly||!1,showYearDropdown:!0,showMonthDropdown:!0,dropdownMode:"select",autoComplete:"off"})}),n?.[i?.name]&&w.jsx("p",{className:"e",children:n?.[i?.name]})]})}function nwe(){const i={resolve:null,promise:null};return i.promise=new Promise(e=>{i.resolve=e}),i}function iwe(i){let e=null;return(...t)=>(e||(e={current:i(...t)}),e.current)}const lr=new Array(256).fill("").map((i,e)=>("0"+e.toString(16)).slice(-2));function rwe(){const[i,e,t,n]=crypto.getRandomValues(new Uint32Array(4));return"e"+lr[i>>0&255]+lr[i>>8&255]+lr[i>>16&255]+lr[i>>24&255]+lr[e>>0&255]+lr[e>>8&255]+lr[e>>16&255]+lr[e>>24&255]+lr[t>>0&255]+lr[t>>8&255]+lr[t>>16&255]+lr[t>>24&255]+lr[n>>0&255]+lr[n>>8&255]+lr[n>>16&255]+lr[n>>24&255]}function swe(i,e){const t=i.extraPlugins||[];return{...i,extraPlugins:[...t,...e.filter(n=>!t.includes(n))]}}
29function X$(i){return!!i&&/^\d+\.\d+\.\d+/.test(i)}function Q$(i){return i?["nightly","alpha","internal","nightly-","staging"].some(e=>i.includes(e)):!1}function owe(i){return X$(i)||Q$(i)}function awe(i){if(!X$(i))throw new Error(`Invalid semantic version: ${i||"<blank>"}.`);const[e,t,n]=i.split(".");return{major:Number.parseInt(e,10),minor:Number.parseInt(t,10),patch:Number.parseInt(n,10)}}function lwe(i){if(Q$(i))return 3;const{major:e}=awe(i);switch(!0){case e>=44:return 3;case e>=38:return 2;default:return 1}}function cwe(){const{CKEDITOR_VERSION:i,CKEDITOR:e}=window;return owe(i)?{source:e?"cdn":"npm",version:i}:null}function uwe(){const i=cwe();return i?lwe(i.version):null}function Z$(i,e){switch(e||=uwe()||void 0,e){case 1:case 2:return i===void 0;case 3:return i==="GPL";default:return!1}}function dwe(i,e){return function(n){Z$(n.config.get("licenseKey"))||n.on("collectUsageData",(r,{setUsageData:s})=>{s(`integration.${i}`,e)})}}var fwe=Object.defineProperty,hwe=(i,e,t)=>e in i?fwe(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Zr=(i,e,t)=>hwe(i,typeof e!="symbol"?e+"":e,t);const J$=class eG{constructor(e,t){Zr(this,"_lifecycle"),Zr(this,"_element"),Zr(this,"_releaseLock",null),Zr(this,"_value",null),Zr(this,"_afterMountCallbacks",[]),Zr(this,"_state",{destroyedBeforeInitialization:!1,mountingInProgress:null}),Zr(this,"release",iwe(()=>{const{_releaseLock:n,_state:r,_element:s,_lifecycle:o}=this;r.mountingInProgress?r.mountingInProgress.then(()=>o.unmount({element:s,mountResult:this.value})).catch(a=>{console.error("CKEditor unmounting error:",a)}).then(n.resolve).then(()=>{this._value=null}):(r.destroyedBeforeInitialization=!0,n.resolve())})),this._element=e,this._lifecycle=t,this._lock()}get value(){return this._value}discard(){this._value=null,this._releaseLock=null,this._afterMountCallbacks=[],this._state={destroyedBeforeInitialization:!1,mountingInProgress:null}}unsafeSetValue(e){this._value=e,this._afterMountCallbacks.forEach(t=>{this._lifecycle.isValueValid&&!this._lifecycle.isValueValid(e)||t(e)}),this._afterMountCallbacks=[]}runAfterMount(e){const{_value:t,_afterMountCallbacks:n}=this;if(t){if(this._lifecycle.isValueValid&&!this._lifecycle.isValueValid(t))return;e(t)}else n.push(e)}_lock(){const{_semaphores:e}=eG,{_state:t,_element:n,_lifecycle:r}=this,s=e.get(n)||Promise.resolve(null),o=nwe();this._releaseLock=o;const a=s.then(()=>t.destroyedBeforeInitialization?Promise.resolve(void 0):(t.mountingInProgress=r.mount().then(l=>(l&&this.unsafeSetValue(l),l)),t.mountingInProgress)).then(async l=>{l&&r.afterMount&&await r.afterMount({element:n,mountResult:l})}).then(()=>o.promise).catch(l=>{console.error("CKEditor mounting error:",l)}).then(()=>{e.get(n)===a&&e.delete(n)});e.set(n,a)}};Zr(J$,"_semaphores",new Map);let mwe=J$;const pwe="$__CKEditorReactContextMetadata";function gwe(i,e){return{...e,[pwe]:i}}const bwe=Ee.createContext(null),ywe=i=>!!i&&typeof i=="object"&&"status"in i&&["initializing","initialized","error"].includes(i.status),tG=i=>e=>ywe(e)&&e.status===i,RB=tG("initializing"),vwe=i=>tG("initialized")(i)&&i.watchdog.state==="ready";const wwe=dwe("react",{version:"11.0.1",frameworkVersion:Ee.version});function xwe(i){return Z$(i.licenseKey)?i:swe(i,[wwe])}const yE="Lock from React integration (@ckeditor/ckeditor5-react)";class tS extends Ee.Component{constructor(e){super(e),Zr(this,"domContainer",Ee.createRef()),Zr(this,"editorSemaphore",null),this._checkVersion()}_checkVersion(){const{CKEDITOR_VERSION:e}=window;if(!e)return console.warn('Cannot find the "CKEDITOR_VERSION" in the "window" scope.');const[t]=e.split(".").map(Number);t>=42||e.startsWith("0.0.0")||console.warn("The <CKEditor> component requires using CKEditor 5 in version 42+ or nightly build.")}get _semaphoreValue(){const{editorSemaphore:e}=this;return e?e.value:null}get watchdog(){const{_semaphoreValue:e}=this;return e?e.watchdog:null}get editor(){const{_semaphoreValue:e}=this;return e?e.instance:null}shouldComponentUpdate(e){const{props:t,editorSemaphore:n}=this;return e.id!==t.id||e.disableWatchdog!==t.disableWatchdog?!0:(n&&(n.runAfterMount(({instance:r})=>{this._shouldUpdateEditorData(t,e,r)&&r.data.set(e.data)}),"disabled"in e&&n.runAfterMount(({instance:r})=>{e.disabled?r.enableReadOnlyMode(yE):r.disableReadOnlyMode(yE)})),!1)}componentDidMount(){RB(this.context)||this._initLifeCycleSemaphore()}componentDidUpdate(){RB(this.context)||this._initLifeCycleSemaphore()}componentWillUnmount(){this._unlockLifeCycleSemaphore()}_unlockLifeCycleSemaphore(){this.editorSemaphore&&(this.editorSemaphore.release(),this.editorSemaphore=null)}_initLifeCycleSemaphore(){this._unlockLifeCycleSemaphore(),this.editorSemaphore=new mwe(this.domContainer.current,{isValueValid:e=>e&&!!e.instance,mount:async()=>{var e,t;try{return await this._initializeEditor()}catch(n){throw(t=(e=this.props).onError)==null||t.call(e,n,{phase:"initialization",willEditorRestart:!1}),n}},afterMount:({mountResult:e})=>{const{onReady:t}=this.props;t&&this.domContainer.current!==null&&t(e.instance)},unmount:async({element:e,mountResult:t})=>{const{onAfterDestroy:n}=this.props;try{await this._destroyEditor(t),e.innerHTML=""}finally{n&&n(t.instance)}}})}render(){return Ee.createElement("div",{ref:this.domContainer})}async _initializeEditor(){if(this.props.disableWatchdog)return{instance:await this._createEditor(this.domContainer.current,this._getConfig()),watchdog:null};const e=vwe(this.context)?new _we(this.context.watchdog):new this.props.editor.EditorWatchdog(this.props.editor,this.props.watchdogConfig),t={current:0};return e.setCreator(async(n,r)=>{var s;const{editorSemaphore:o}=this,{onAfterDestroy:a}=this.props;t.current>0&&a&&((s=o?.value)!=null&&s.instance)&&a(o.value.instance);const l=await this._createEditor(n,r);return o&&t.current>0&&(o.unsafeSetValue({instance:l,watchdog:e}),setTimeout(()=>{this.props.onReady&&this.props.onReady(e.editor)})),t.current++,l}),e.on("error",(n,{error:r,causesRestart:s})=>{(this.props.onError||console.error)(r,{phase:"runtime",willEditorRestart:s})}),await e.create(this.domContainer.current,this._getConfig()),{watchdog:e,instance:e.editor}}_createEditor(e,t){const{contextItemMetadata:n}=this.props;return n&&(t=gwe(n,t)),this.props.editor.create(e,xwe(t)).then(r=>{if("disabled"in this.props){this.props.disabled&&r.enableReadOnlyMode(yE)}const s=r.model.document,o=r.editing.view.document;return s.on("change:data",a=>{this.props.onChange&&this.props.onChange(a,r)}),o.on("focus",a=>{this.props.onFocus&&this.props.onFocus(a,r)}),o.on("blur",a=>{this.props.onBlur&&this.props.onBlur(a,r)}),r})}async _destroyEditor(e){const{watchdog:t,instance:n}=e;return new Promise((r,s)=>{setTimeout(async()=>{try{if(t)return await t.destroy(),r();if(n)return await n.destroy(),r();r()}catch(o){console.error(o),s(o)}})})}_shouldUpdateEditorData(e,t,n){return!(e.data===t.data||n.data.get()===t.data)}_getConfig(){const e=this.props.config||{};return this.props.data&&e.initialData&&console.warn("Editor data should be provided either using `config.initialData` or `content` property. The config value takes precedence over `content` property and will be used when both are specified."),{...e,initialData:e.initialData||this.props.data||""}}}Zr(tS,"contextType",bwe);class _we{constructor(e){Zr(this,"_contextWatchdog"),Zr(this,"_id"),Zr(this,"_creator"),this._contextWatchdog=e,this._id=rwe()}setCreator(e){this._creator=e}create(e,t){return this._contextWatchdog.add({sourceElementOrData:e,config:t,creator:this._creator,id:this._id,type:"editor"})}on(e,t){this._contextWatchdog.on("itemError",(n,{itemId:r,error:s})=>{r===this._id&&t(null,{error:s,causesRestart:void 0})})}destroy(){return this._contextWatchdog.state==="ready"?this._contextWatchdog.remove(this._id):Promise.resolve()}get editor(){return this._contextWatchdog.getItem(this._id)}}function nG(...i){return e=>
29{i.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}const Cwe=M.memo(M.forwardRef(({id:i,semaphore:e,rootName:t},n)=>{const r=M.useRef(null);return M.useEffect(()=>{let s,o;return e.runAfterMount(({instance:a})=>{if(!r.current)return;o=a;const{ui:l,model:c}=o,d=c.document.getRoot(t);d&&o.ui.getEditableElement(t)&&o.detachEditable(d),s=l.view.createEditable(t,r.current),l.addEditable(s),a.editing.view.forceRender()}),()=>{if(o&&o.state!=="destroyed"&&r.current){const a=o.model.document.getRoot(t);a&&o.detachEditable(a)}}},[e.revision]),Ee.createElement("div",{key:e.revision,id:i,ref:nG(n,r)})}));Cwe.displayName="EditorEditable";const Dwe=M.forwardRef(({editor:i},e)=>{const t=M.useRef(null);return M.useEffect(()=>{const n=t.current;if(!i||!n)return;const r=i.ui.view.toolbar.element;return n.appendChild(r),()=>{n.contains(r)&&n.removeChild(r)}},[i&&i.id]),Ee.createElement("div",{ref:nG(t,e)})});Dwe.displayName="EditorToolbarWrapper";function Ewe(i){return Number.isSafeInteger(i)&&i>=0}function Twe(i){return i!=null&&typeof i!="function"&&Ewe(i.length)}function iG(i){return i}function Pg(i){return i==="__proto__"}function rG(i){switch(typeof i){case"number":case"symbol":return!1;case"string":return i.includes(".")||i.includes("[")||i.includes("]")}}function w3(i){return typeof i=="string"||typeof i=="symbol"?i:Object.is(i?.valueOf?.(),-0)?"-0":String(i)}function x3(i){const e=[],t=i.length;if(t===0)return e;let n=0,r="",s="",o=!1;for(i.charCodeAt(0)===46&&(e.push(""),n++);n<t;){const a=i[n];s?a==="\\"&&n+1<t?(n++,r+=i[n]):a===s?s="":r+=a:o?a==='"'||a==="'"?s=a:a==="]"?(o=!1,e.push(r),r=""):r+=a:a==="["?(o=!0,r&&(e.push(r),r="")):a==="."?r&&(e.push(r),r=""):r+=a,n++}return r&&e.push(r),e}function Lc(i,e,t){if(i==null)return t;switch(typeof e){case"string":{if(Pg(e))return t;const n=i[e];return n===void 0?rG(e)?Lc(i,x3(e),t):t:n}case"number":case"symbol":{typeof e=="number"&&(e=w3(e));const n=i[e];return n===void 0?t:n}default:{if(Array.isArray(e))return Awe(i,e,t);if(Object.is(e?.valueOf(),-0)?e="-0":e=String(e),Pg(e))return t;const n=i[e];return n===void 0?t:n}}}function Awe(i,e,t){if(e.length===0)return t;let n=i;for(let r=0;r<e.length;r++){if(n==null||Pg(e[r]))return t;n=n[e[r]]}return n===void 0?t:n}function kwe(i){return function(e){return Lc(e,i)}}function Nr(i){return i!==null&&(typeof i=="object"||typeof i=="function")}function x0(i){return i==null||typeof i!="object"&&typeof i!="function"}function Ig(i,e){return i===e||Number.isNaN(i)&&Number.isNaN(e)}function Swe(i,e,t){return typeof t!="function"?_3(i,e):nS(i,e,function n(r,s,o,a,l,c){const d=t(r,s,o,a,l,c);return d!==void 0?!!d:nS(r,s,n,c)},new Map)}function nS(i,e,t,n){if(e===i)return!0;switch(typeof e){case"object":return Pwe(i,e,t,n);case"function":return Object.keys(e).length>0?nS(i,{...e},t,n):Ig(i,e);default:return Nr(i)?typeof e=="string"?e==="":!0:Ig(i,e)}}function Pwe(i,e,t,n){if(e==null)return!0;if(Array.isArray(e))return sG(i,e,t,n);if(e instanceof Map)return Iwe(i,e,t,n);if(e instanceof Set)return Rwe(i,e,t,n);const r=Object.keys(e);if(i==null)return r.length===0;if(r.length===0)return!0;if(n&&n.has(e))return n.get(e)===i;n&&n.set(e,i);try{for(let s=0;s<r.length;s++){const o=r[s];if(!x0(i)&&!(o in i)||e[o]===void 0&&i[o]!==void 0||e[o]===null&&i[o]!==null||!t(i[o],e[o],o,i,e,n))return!1}return!0}finally{n&&n.delete(e)}}function Iwe(i,e,t,n){if(e.size===0)return!0;if(!(i instanceof Map))return!1;for(const[r,s]of e.entries()){const o=i.get(r);if(t(o,s,r,i,e,n)===!1)return!1}return!0}function sG(i,e,t,n){if(e.length===0)return!0;if(!Array.isArray(i))return!1;const r=new Set;for(let s=0;s<e.length;s++){const o=e[s];let a=!1;for(let l=0;l<i.length;l++){if(r.has(l))continue;const c=i[l];let d=!1;if(t(c,o,s,i,e,n)&&(d=!0),d){r.add(l),a=!0;break}}if(!a)return!1}return!0}function Rwe(i,e,t,n){return e.size===0?!0:i instanceof Set?sG([...i],[...e],t,n):!1}function _3(i,e){return Swe(i,e,()=>{})}function jw(i){return Object.getOwnPropertySymbols(i).filter(e=>Object.prototype.propertyIsEnumerable.call(i,e))}
29function Ih(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}const c_="[object RegExp]",Rh="[object String]",_0="[object Number]",C0="[object Boolean]",Fh="[object Arguments]",u_="[object Symbol]",d_="[object Date]",f_="[object Map]",h_="[object Set]",C3="[object Array]",Fwe="[object Function]",m_="[object ArrayBuffer]",Qp="[object Object]",Owe="[object Error]",p_="[object DataView]",D3="[object Uint8Array]",E3="[object Uint8ClampedArray]",T3="[object Uint16Array]",A3="[object Uint32Array]",Nwe="[object BigUint64Array]",k3="[object Int8Array]",S3="[object Int16Array]",P3="[object Int32Array]",Bwe="[object BigInt64Array]",I3="[object Float32Array]",R3="[object Float64Array]";function F3(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function Mwe(i,e){return Yu(i,void 0,i,new Map,e)}function Yu(i,e,t,n=new Map,r=void 0){const s=r?.(i,e,t,n);if(s!=null)return s;if(x0(i))return i;if(n.has(i))return n.get(i);if(Array.isArray(i)){const o=new Array(i.length);n.set(i,o);for(let a=0;a<i.length;a++)o[a]=Yu(i[a],a,t,n,r);return Object.hasOwn(i,"index")&&(o.index=i.index),Object.hasOwn(i,"input")&&(o.input=i.input),o}if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp){const o=new RegExp(i.source,i.flags);return o.lastIndex=i.lastIndex,o}if(i instanceof Map){const o=new Map;n.set(i,o);for(const[a,l]of i)o.set(a,Yu(l,a,t,n,r));return o}if(i instanceof Set){const o=new Set;n.set(i,o);for(const a of i)o.add(Yu(a,void 0,t,n,r));return o}if(typeof Buffer<"u"&&Buffer.isBuffer(i))return i.subarray();if(F3(i)){const o=new(Object.getPrototypeOf(i)).constructor(i.length);n.set(i,o);for(let a=0;a<i.length;a++)o[a]=Yu(i[a],a,t,n,r);return o}if(i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);if(i instanceof DataView){const o=new DataView(i.buffer.slice(0),i.byteOffset,i.byteLength);return n.set(i,o),Vu(o,i,t,n,r),o}if(typeof File<"u"&&i instanceof File){const o=new File([i],i.name,{type:i.type});return n.set(i,o),Vu(o,i,t,n,r),o}if(i instanceof Blob){const o=new Blob([i],{type:i.type});return n.set(i,o),Vu(o,i,t,n,r),o}if(i instanceof Error){const o=new i.constructor;return n.set(i,o),o.message=i.message,o.name=i.name,o.stack=i.stack,o.cause=i.cause,Vu(o,i,t,n,r),o}if(typeof i=="object"&&Lwe(i)){const o=Object.create(Object.getPrototypeOf(i));return n.set(i,o),Vu(o,i,t,n,r),o}return i}function Vu(i,e,t=i,n,r){const s=[...Object.keys(e),...jw(e)];for(let o=0;o<s.length;o++){const a=s[o],l=Object.getOwnPropertyDescriptor(i,a);(l==null||l.writable)&&(i[a]=Yu(e[a],a,t,n,r))}}function Lwe(i){switch(Ih(i)){case Fh:case C3:case m_:case p_:case C0:case d_:case I3:case R3:case k3:case S3:case P3:case f_:case _0:case Qp:case c_:case h_:case Rh:case u_:case D3:case E3:case T3:case A3:return!0;default:return!1}}function Uwe(i){return Yu(i,void 0,i,new Map,void 0)}function Vwe(i){return i=Uwe(i),e=>_3(e,i)}function g_(i,e){return Mwe(i,(t,n,r,s)=>{const o=e?.(t,n,r,s);if(o!=null)return o;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case _0:case Rh:case C0:{const a=new i.constructor(i?.valueOf());return Vu(a,i),a}case Fh:{const a={};return Vu(a,i),a.length=i.length,a[Symbol.iterator]=i[Symbol.iterator],a}default:return}})}function Br(i){return g_(i)}const jwe=/^(?:0|[1-9]\d*)$/;function oG(i,e=Number.MAX_SAFE_INTEGER){switch(typeof i){case"number":return Number.isInteger(i)&&i>=0&&i<e;case"symbol":return!1;case"string":return jwe.test(i)}}function iS(i){return i!==null&&typeof i=="object"&&Ih(i)==="[object Arguments]"}function zwe(i,e){let t;if(Array.isArray(e)?t=e:typeof e=="string"&&rG(e)&&i?.[e]==null?t=x3(e):t=[e],t.length===0)return!1;let n=i;for(let r=0;r<t.length;r++){const s=t[r];if((n==null||!Object.hasOwn(n,s))&&!((Array.isArray(n)||iS(n))&&oG(s)&&s<n.length))return!1;n=n[s]}return!0}function Wwe(i,e){switch(typeof i){case"object":{Object.is(i?.valueOf(),-0)&&(i="-0");break}case"number":{i=w3(i);break}}return e=Br(e),function(t){const n=Lc(t,i);return n===void 0?zwe(t,i):e===void 0?n===void 0:_3(n,e)}}function Hwe(i){if(i==null)return iG;switch(typeof i){case"function":return i;case"object":return Array.isArray(i)&&i.length===2?Wwe(i[0],i[1]):Vwe(i);case"string":case"symbol":case"number":return kwe(i)}}function rS(i){return typeof i=="object"&&i!==null}function aG(i){return typeof i=="symbol"||i instanceof Symbol}function qwe(i){return aG(i)?NaN:Number(i)}function $we(i){return i?(i=qwe(i),i===1/0||i===-1/0?(i<0?-1:1)*Number.MAX_VALUE:i===i?i:0):i===0?i:0}function Gwe(i){const e=$we(i),t=e%1;return t?e-t:e}function FB(i){return typeof i=="string"||i instanceof String}const Ywe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kwe=/^\w*$/;function Xwe(i,e){return Array.isArray(i)?!1:typeof i=="number"||typeof i=="boolean"||i==null||aG(i)?!0:typeof i=="string"&&(Kwe.test(i)||!Ywe.test(i))||e!=null&&Object.hasOwn(e,i)}function Qwe(i){return Array.isArray(i)}function cp(i){return i}const Zwe=(i,e,t)=>{const n=i[e];(!(Object.hasOwn(i,e)&&Ig(n,t))||t===void 0&&!(e in i))&&(i[e]=t)};function Jwe(i,e,t,n){if(i==null&&!Nr(i))return i;const r=Xwe(e,i)?[e]:Array.isArray(e)?e:typeof e=="string"?x3(e):[e];let s=i;for(let o=0;o<r.length&&s!=null;
29o++){const a=w3(r[o]);if(Pg(a))continue;let l;if(o===r.length-1)l=t(s[a]);else{const c=s[a],d=n?.(c,a,i);l=d!==void 0?d:Nr(c)?c:oG(r[o+1])?[]:{}}Zwe(s,a,l),s=s[a]}return i}function lG(i,e,t){return Jwe(i,e,()=>t,()=>{})}function exe(i,e,{signal:t,edges:n}={}){let r,s=null;const o=n!=null&&n.includes("leading"),a=n==null||n.includes("trailing"),l=()=>{s!==null&&(i.apply(r,s),r=void 0,s=null)},c=()=>{a&&l(),p()};let d=null;const f=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,c()},e)},m=()=>{d!==null&&(clearTimeout(d),d=null)},p=()=>{m(),r=void 0,s=null},g=()=>{m(),l()},y=function(...v){if(t?.aborted)return;r=this,s=v;const x=d==null;f(),o&&x&&l()};return y.schedule=f,y.cancel=p,y.flush=g,t?.addEventListener("abort",p,{once:!0}),y}function fo(i,e=0,t={}){typeof t!="object"&&(t={});const{leading:n=!1,trailing:r=!0,maxWait:s}=t,o=Array(2);n&&(o[0]="leading"),r&&(o[1]="trailing");let a,l=null;const c=exe(function(...m){a=i.apply(this,m),l=null},e,{edges:o}),d=function(...m){return s!=null&&(l===null&&(l=Date.now()),Date.now()-l>=s)?(a=i.apply(this,m),l=Date.now(),c.cancel(),c.schedule(),a):(c.apply(this,m),a)},f=()=>(c.flush(),a);return d.cancel=c.cancel,d.flush=f,d}function Oh(i,e=0,t={}){typeof t!="object"&&(t={});const{leading:n=!0,trailing:r=!0}=t;return fo(i,e,{leading:n,trailing:r,maxWait:e})}function b_(i){if(i==null)return"";if(typeof i=="string")return i;if(Array.isArray(i))return i.map(b_).join(",");const e=String(i);return e==="0"&&Object.is(Number(i),-0)?"-0":e}function OB(i){if(!i||typeof i!="object")return!1;const e=Object.getPrototypeOf(i);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(i)==="[object Object]":!1}function cG(i,e,t){return Up(i,e,void 0,void 0,void 0,void 0,t)}function Up(i,e,t,n,r,s,o){const a=o(i,e,t,n,r,s);if(a!==void 0)return a;if(typeof i==typeof e)switch(typeof i){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return i===e;case"number":return i===e||Object.is(i,e);case"function":return i===e;case"object":return Zp(i,e,s,o)}return Zp(i,e,s,o)}function Zp(i,e,t,n){if(Object.is(i,e))return!0;let r=Ih(i),s=Ih(e);if(r===Fh&&(r=Qp),s===Fh&&(s=Qp),r!==s)return!1;switch(r){case Rh:return i.toString()===e.toString();case _0:{const l=i.valueOf(),c=e.valueOf();return Ig(l,c)}case C0:case d_:case u_:return Object.is(i.valueOf(),e.valueOf());case c_:return i.source===e.source&&i.flags===e.flags;case Fwe:return i===e}t=t??new Map;const o=t.get(i),a=t.get(e);if(o!=null&&a!=null)return o===e;t.set(i,e),t.set(e,i);try{switch(r){case f_:{if(i.size!==e.size)return!1;for(const[l,c]of i.entries())if(!e.has(l)||!Up(c,e.get(l),l,i,e,t,n))return!1;return!0}case h_:{if(i.size!==e.size)return!1;const l=Array.from(i.values()),c=Array.from(e.values());for(let d=0;d<l.length;d++){const f=l[d],m=c.findIndex(p=>Up(f,p,void 0,i,e,t,n));if(m===-1)return!1;c.splice(m,1)}return!0}case C3:case D3:case E3:case T3:case A3:case Nwe:case k3:case S3:case P3:case Bwe:case I3:case R3:{if(typeof Buffer<"u"&&Buffer.isBuffer(i)!==Buffer.isBuffer(e)||i.length!==e.length)return!1;for(let l=0;l<i.length;l++)if(!Up(i[l],e[l],l,i,e,t,n))return!1;return!0}case m_:return i.byteLength!==e.byteLength?!1:Zp(new Uint8Array(i),new Uint8Array(e),t,n);case p_:return i.byteLength!==e.byteLength||i.byteOffset!==e.byteOffset?!1:Zp(new Uint8Array(i),new Uint8Array(e),t,n);case Owe:return i.name===e.name&&i.message===e.message;case Qp:{if(!(Zp(i.constructor,e.constructor,t,n)||OB(i)&&OB(e)))return!1;const c=[...Object.keys(i),...jw(i)],d=[...Object.keys(e),...jw(e)];if(c.length!==d.length)return!1;for(let f=0;f<c.length;f++){const m=c[f],p=i[m];if(!Object.hasOwn(e,m))return!1;const g=e[m];if(!Up(p,g,m,i,e,t,n))return!1}return!0}default:return!1}}finally{t.delete(i),t.delete(e)}}function uG(){}function Nh(i,e){return cG(i,e,uG)}function txe(i){return typeof Buffer<"u"&&Buffer.isBuffer(i)}function nxe(i){const e=i?.constructor,t=typeof e=="function"?e.prototype:Object.prototype;return i===t}function O3(i){return F3(i)}function ixe(i,e){if(i=Gwe(i),i<1||!Number.isSafeInteger(i))return[];const t=new Array(i);for(let n=0;n<i;n++)t[n]=typeof e=="function"?e(n):n;return t}function rxe(i){if(i==null)return[];switch(typeof i){case"object":case"function":return Twe(i)?oxe(i):nxe(i)?sxe(i):zw(i);default:return zw(Object(i))}}function zw(i){const e=[];for(const t in i)e.push(t);return e}function sxe(i){return zw(i).filter(t=>t!=="constructor")}function oxe(i){const e=ixe(i.length,n=>`${n}`),t=new Set(e);return txe(i)&&(t.add("offset"),t.add("parent")),O3(i)&&(t.add("buffer"),t.add("byteLength"),t.add("byteOffset")),[...e,...zw(i).filter(n=>!t.has(n))]}function dG(i,...e){for(let t=0;t<e.length;t++)axe(i,e[t]);return i}function axe(i,e){const t=rxe(e);for(let n=0;n<t.length;n++){const r=t[n];(!(r in i)||!Ig(i[r],e[r]))&&(i[r]=e[r])}}function lxe(i){if(x0(i))return i;const e=Ih(i);if(!cxe(i))return{};if(Qwe(i)){const n=Array.from(i);return i.length>0&&typeof i[0]=="string"&&Object.hasOwn(i,"index")&&(n.index=i.index,n.input=i.input),n}if(O3(i)){const n=i,r=n.constructor;return new r(n.buffer,n.byteOffset,n.length)}if(e===m_)return new ArrayBuffer(i.byteLength);if(e===p_){const n=i,r=n.buffer,s=n.byteOffset,o=n.byteLength,a=new ArrayBuffer(o),l=new Uint8Array(r,s,o);return new Uint8Array(a).set(l),new DataView(a)}
29if(e===C0||e===_0||e===Rh){const n=i.constructor,r=new n(i.valueOf());return e===Rh?dxe(r,i):vE(r,i),r}if(e===d_)return new Date(Number(i));if(e===c_){const n=i,r=new RegExp(n.source,n.flags);return r.lastIndex=n.lastIndex,r}if(e===u_)return Object(Symbol.prototype.valueOf.call(i));if(e===f_){const n=i,r=new Map;return n.forEach((s,o)=>{r.set(o,s)}),r}if(e===h_){const n=i,r=new Set;return n.forEach(s=>{r.add(s)}),r}if(e===Fh){const n=i,r={};return vE(r,n),r.length=n.length,r[Symbol.iterator]=n[Symbol.iterator],r}const t={};return fxe(t,i),vE(t,i),uxe(t,i),t}function cxe(i){switch(Ih(i)){case Fh:case C3:case m_:case p_:case C0:case d_:case I3:case R3:case k3:case S3:case P3:case f_:case _0:case Qp:case c_:case h_:case Rh:case u_:case D3:case E3:case T3:case A3:return!0;default:return!1}}function vE(i,e){for(const t in e)Object.hasOwn(e,t)&&(i[t]=e[t])}function uxe(i,e){const t=Object.getOwnPropertySymbols(e);for(let n=0;n<t.length;n++){const r=t[n];Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}}function dxe(i,e){const t=e.valueOf().length;for(const n in e)Object.hasOwn(e,n)&&(Number.isNaN(Number(n))||Number(n)>=t)&&(i[n]=e[n])}function fxe(i,e){const t=Object.getPrototypeOf(e);t!==null&&typeof e.constructor=="function"&&Object.setPrototypeOf(i,t)}function Po(i){if(typeof i!="object"||i==null)return!1;if(Object.getPrototypeOf(i)===null)return!0;if(Object.prototype.toString.call(i)!=="[object Object]"){const t=i[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(i,Symbol.toStringTag)?.writable?!1:i.toString()===`[object ${t}]`}let e=i;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(i)===e}function hxe(i,e){const t={},n=Object.keys(i);for(let r=0;r<n.length;r++){const s=n[r],o=i[s];t[s]=e(o,s,i)}return t}function mxe(i,e=iG){return i==null?{}:hxe(i,Hwe(e))}function pxe(i){if(x0(i))return i;if(Array.isArray(i)||F3(i)||i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);const e=Object.getPrototypeOf(i),t=e.constructor;if(i instanceof Date||i instanceof Map||i instanceof Set)return new t(i);if(i instanceof RegExp){const n=new t(i);return n.lastIndex=i.lastIndex,n}if(i instanceof DataView)return new t(i.buffer.slice(0));if(i instanceof Error){const n=new t(i.message);return n.stack=i.stack,n.name=i.name,n.cause=i.cause,n}if(typeof File<"u"&&i instanceof File)return new t([i],i.name,{type:i.type,lastModified:i.lastModified});if(typeof i=="object"){const n=Object.create(e);return Object.assign(n,i)}return i}function fG(i,...e){const t=e.slice(0,-1),n=e[e.length-1];let r=i;for(let s=0;s<t.length;s++){const o=t[s];r=v1(r,o,n,new Map)}return r}function v1(i,e,t,n){if(x0(i)&&(i=Object(i)),e==null||typeof e!="object")return i;if(n.has(e))return pxe(n.get(e));if(n.set(e,i),Array.isArray(e)){e=e.slice();for(let s=0;s<e.length;s++)e[s]=e[s]??void 0}const r=[...Object.keys(e),...jw(e)];for(let s=0;s<r.length;s++){const o=r[s];if(Pg(o))continue;let a=e[o],l=i[o];if(iS(a)&&(a={...a}),iS(l)&&(l={...l}),typeof Buffer<"u"&&Buffer.isBuffer(a)&&(a=Br(a)),Array.isArray(a))if(typeof l=="object"&&l!=null){const d=[],f=Reflect.ownKeys(l);for(let m=0;m<f.length;m++){const p=f[m];d[p]=l[p]}l=d}else l=[];const c=t(l,a,o,i,e,n);c!=null?i[o]=c:Array.isArray(a)||rS(l)&&rS(a)?i[o]=v1(l,a,t,n):l==null&&Po(a)?i[o]=v1({},a,t,n):l==null&&O3(a)?i[o]=Br(a):(l===void 0||a!==void 0)&&(i[o]=a)}return i}function N3(i,...e){return fG(i,...e,uG)}function Ww(i){return typeof i=="function"}function Uc(i){return rS(i)&&i.nodeType===1&&!Po(i)}function NB(i,e){if(!Number.isInteger(i)||i<0)throw new Error("n must be a non-negative integer.");let t=0;return(...n)=>{if(++t>=i)return e(...n)}}function sS(i,e,t){return typeof t!="function"&&(t=()=>{}),cG(i,e,(...n)=>{const r=t(...n);if(r!==void 0)return!!r;if(i instanceof Map&&e instanceof Map||i instanceof Set&&e instanceof Set)return sS(Array.from(i),Array.from(e),NB(2,t))})}const gxe=new RegExp("\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+","gu");function bxe(i){return Array.from(i.match(gxe)??[])}
29function yxe(i){return typeof i!="string"&&(i=b_(i)),i.replace(/['\u2019]/g,"")}function vxe(i){return i.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}function wxe(i){return vxe(b_(i))}function xxe(i){const e=bxe(yxe(i).trim());let t="";for(let n=0;n<e.length;n++){const r=e[n];t&&(t+=" "),r===r.toUpperCase()?t+=r:t+=r[0].toUpperCase()+r.slice(1).toLowerCase()}return t}function _xe(i){return i.substring(0,1).toUpperCase()+i.substring(1)}function Cxe(i){return _xe(b_(i))}let $e;try{$e={window,document}}catch{$e={window:{},document:{}}}function Dxe(){try{return navigator.userAgent.toLowerCase()}catch{return""}}const Cu=Dxe(),ot={isMac:hG(Cu),isWindows:Exe(Cu),isGecko:Txe(Cu),isSafari:Axe(Cu),isiOS:kxe(Cu),isAndroid:Sxe(Cu),isBlink:Pxe(Cu),get isMediaForcedColors(){return Rxe()},features:{isRegExpUnicodePropertySupported:Ixe()}};function hG(i){return i.indexOf("macintosh")>-1}function Exe(i){return i.indexOf("windows")>-1}function Txe(i){return!!i.match(/gecko\/\d+/)}function Axe(i){return i.indexOf(" applewebkit/")>-1&&i.indexOf("chrome")===-1}function kxe(i){return!!i.match(/iphone|ipad/i)||hG(i)&&navigator.maxTouchPoints>0}function Sxe(i){return i.indexOf("android")>-1}function Pxe(i){return i.indexOf("chrome/")>-1&&i.indexOf("edge/")<0}function Ixe(){let i=!1;try{i="ć".search(new RegExp("[\\p{L}]","u"))===0}catch{}return i}function Rxe(){return $e.window.matchMedia?$e.window.matchMedia("(forced-colors: active)").matches:!1}function mG(i,e,t,n){t=t||function(l,c){return l===c};const r=Array.isArray(i)?i:Array.prototype.slice.call(i),s=Array.isArray(e)?e:Array.prototype.slice.call(e),o=Fxe(r,s,t);return n?Nxe(o,s.length):Oxe(s,o)}function Fxe(i,e,t){const n=BB(i,e,t);if(n===-1)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const r=MB(i,n),s=MB(e,n),o=BB(r,s,t),a=i.length-o,l=e.length-o;return{firstIndex:n,lastIndexOld:a,lastIndexNew:l}}function BB(i,e,t){for(let n=0;n<Math.max(i.length,e.length);n++)if(i[n]===void 0||e[n]===void 0||!t(i[n],e[n]))return n;return-1}function MB(i,e){return i.slice(e).reverse()}function Oxe(i,e){const t=[],{firstIndex:n,lastIndexOld:r,lastIndexNew:s}=e;return s-n>0&&t.push({index:n,type:"insert",values:i.slice(n,s)}),r-n>0&&t.push({index:n+(s-n),type:"delete",howMany:r-n}),t}function Nxe(i,e){const{firstIndex:t,lastIndexOld:n,lastIndexNew:r}=i;if(t===-1)return Array(e).fill("equal");let s=[];return t>0&&(s=s.concat(Array(t).fill("equal"))),r-t>0&&(s=s.concat(Array(r-t).fill("insert"))),n-t>0&&(s=s.concat(Array(n-t).fill("delete"))),r<e&&(s=s.concat(Array(e-r).fill("equal"))),s}function uh(i,e,t){t=t||function(y,v){return y===v};const n=i.length,r=e.length;if(n>200||r>200||n+r>300)return uh.fastDiff(i,e,t,!0);let s,o;if(r<n){const y=i;i=e,e=y,s="delete",o="insert"}else s="insert",o="delete";const a=i.length,l=e.length,c=l-a,d={},f={};function m(y){const v=(f[y-1]!==void 0?f[y-1]:-1)+1,x=f[y+1]!==void 0?f[y+1]:-1,C=v>x?-1:1;d[y+C]&&(d[y]=d[y+C].slice(0)),d[y]||(d[y]=[]),d[y].push(v>x?s:o);let D=Math.max(v,x),E=D-y;for(;E<a&&D<l&&t(i[E],e[D]);)E++,D++,d[y].push("equal");return D}let p=0,g;do{for(g=-p;g<c;g++)f[g]=m(g);for(g=c+p;g>c;g--)f[g]=m(g);f[c]=m(c),p++}while(f[c]!==l);return d[c].slice(1)}uh.fastDiff=mG;function LB(){return function i(){i.called=!0}}class Il{source;name;path;stop;off;return;constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=LB(),this.off=LB()}}const cr=new Array(256).fill("").map((i,e)=>("0"+e.toString(16)).slice(-2));function rr(){const[i,e,t,n]=crypto.getRandomValues(new Uint32Array(4));return"e"+cr[i>>0&255]+cr[i>>8&255]+cr[i>>16&255]+cr[i>>24&255]+cr[e>>0&255]+cr[e>>8&255]+cr[e>>16&255]+cr[e>>24&255]+cr[t>>0&255]+cr[t>>8&255]+cr[t>>16&255]+cr[t>>24&255]+cr[n>>0&255]+cr[n>>8&255]+cr[n>>16&255]+cr[n>>24&255]}const ns={get(i="normal"){return typeof i!="number"?this[i]||this.normal:i},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function pG(i,e){const t=ns.get(e.priority);let n=0,r=i.length;for(;n<r;){const s=n+r>>1;ns.get(i[s].priority)<t?r=s:n=s+1}i.splice(n,0,e)}const Bxe="https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html";
29class oe extends Error{context;data;constructor(e,t,n,r){super(Lxe(e,n,r)),this.name="CKEditorError",this.context=t,this.data=n,r&&(this.stack=r.stack)}is(e){return e==="CKEditorError"}static rethrowUnexpectedError(e,t){throw e.is&&e.is("CKEditorError")?e:new oe("unexpected-error",t,void 0,e)}}function Kt(i,e){console.warn(...bG(i,e))}function Mxe(i,e){console.error(...bG(i,e))}function gG(i){return`
30Read more: ${Bxe}#error-${i}`}function Lxe(i,e,t){const n=new WeakSet,s=e?` ${JSON.stringify(e,(l,c)=>{if(typeof c=="object"&&c!==null){if(n.has(c))return`[object ${c.constructor.name}]`;n.add(c)}return c})}`:"",o=gG(i),a=t?`
31Original error: ${t.name}: ${t.message}`:"";return i+s+o+a}function bG(i,e){const t=gG(i);return e?[i,e,t]:[i,t]}const Uxe="47.5.0",Vxe=new Date(2026,1,11);if(globalThis.CKEDITOR_VERSION)throw new oe("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=Uxe;const jf=Symbol("listeningTo"),oS=Symbol("emitterId"),al=Symbol("delegations"),jxe=Sn(Object);function Sn(i){if(!i)return jxe;class e extends i{on(n,r,s){this.listenTo(this,n,r,s)}once(n,r,s){let o=!1;const a=(l,...c)=>{o||(o=!0,l.off(),r.call(this,l,...c))};this.listenTo(this,n,a,s)}off(n,r){this.stopListening(this,n,r)}listenTo(n,r,s,o={}){let a,l;this[jf]||(this[jf]={});const c=this[jf];wE(n)||yG(n);const d=wE(n);(a=c[d])||(a=c[d]={emitter:n,callbacks:{}}),(l=a.callbacks[r])||(l=a.callbacks[r]=[]),l.push(s),$xe(this,n,r,s,o)}stopListening(n,r,s){const o=this[jf];let a=n&&wE(n);const l=o&&a?o[a]:void 0,c=l&&r?l.callbacks[r]:void 0;if(!(!o||n&&!l||r&&!c))if(s)xE(this,n,r,s),c.indexOf(s)!==-1&&(c.length===1?delete l.callbacks[r]:xE(this,n,r,s));else if(c){for(;s=c.pop();)xE(this,n,r,s);delete l.callbacks[r]}else if(l){for(r in l.callbacks)this.stopListening(n,r);delete o[a]}else{for(a in o)this.stopListening(o[a].emitter);delete this[jf]}}fire(n,...r){try{const s=n instanceof Il?n:new Il(this,n),o=s.name;let a=qxe(this,o);if(s.path.push(this),a){a=a.slice();for(let c=0;c<a.length;c++){const d=a[c].callback;if(d.call(this,s,...r),s.off.called&&(delete s.off.called,this._removeEventListener(o,d)),s.stop.called)break}}const l=this[al];if(l){const c=l.get(o),d=l.get("*");c&&UB(c,s,r),d&&UB(d,s,r)}return s.return}catch(s){oe.rethrowUnexpectedError(s,this)}}delegate(...n){return{to:(r,s)=>{this[al]||(this[al]=new Map),n.forEach(o=>{const a=this[al].get(o);a?a.set(r,s):this[al].set(o,new Map([[r,s]]))})}}}stopDelegating(n,r){if(this[al])if(!n)this[al].clear();else if(!r)this[al].delete(n);else{const s=this[al].get(n);s&&s.delete(r)}}_addEventListener(n,r,s){Hxe(this,n);const o=aS(this,n),a=ns.get(s.priority),l={callback:r,priority:a};for(const c of o)pG(c,l)}_removeEventListener(n,r){const s=aS(this,n);for(const o of s)for(let a=0;a<o.length;a++)o[a].callback==r&&(o.splice(a,1),a--)}}return e}function zxe(i,e){const t=i[jf];return t&&t[e]?t[e].emitter:null}function yG(i,e){i[oS]||(i[oS]=e||rr())}function wE(i){return i[oS]}function vG(i){return i._events||Object.defineProperty(i,"_events",{value:{}}),i._events}function Wxe(){return{callbacks:[],childEvents:[]}}function Hxe(i,e){const t=vG(i);if(t[e])return;let n=e,r=null;const s=[];for(;n!==""&&!t[n];)t[n]=Wxe(),s.push(t[n]),r&&t[n].childEvents.push(r),r=n,n=n.substr(0,n.lastIndexOf(":"));if(n!==""){for(const o of s)o.callbacks=t[n].callbacks.slice();t[n].childEvents.push(r)}}function aS(i,e){const t=vG(i)[e];if(!t)return[];let n=[t.callbacks];for(let r=0;r<t.childEvents.length;r++){const s=aS(i,t.childEvents[r]);n=n.concat(s)}return n}function qxe(i,e){if(!i._events)return null;let t=e;do{const n=i._events[t];if(n&&n.callbacks&&n.callbacks.length)return n.callbacks;const r=t.lastIndexOf(":");t=r>-1?t.substring(0,r):""}while(t);return null}function UB(i,e,t){for(let[n,r]of i){r?typeof r=="function"&&(r=r(e.name)):r=e.name;const s=new Il(e.source,r);s.path=[...e.path],n.fire(s,...t)}}function $xe(i,e,t,n,r){e._addEventListener?e._addEventListener(t,n,r):i._addEventListener.call(e,t,n,r)}function xE(i,e,t,n){e._removeEventListener?e._removeEventListener(t,n):i._removeEventListener.call(e,t,n)}const Jp=Symbol("observableProperties"),Rg=Symbol("boundObservables"),eg=Symbol("boundProperties"),Du=Symbol("decoratedMethods"),VB=Symbol("decoratedOriginal"),Gxe=hn(Sn());function hn(i){if(!i)return Gxe;
31class e extends i{set(n,r){if(Nr(n)){Object.keys(n).forEach(o=>{this.set(o,n[o])},this);return}_E(this);const s=this[Jp];if(n in this&&!s.has(n))throw new oe("observable-set-cannot-override",this);Object.defineProperty(this,n,{enumerable:!0,configurable:!0,get(){return s.get(n)},set(o){const a=s.get(n);let l=this.fire(`set:${n}`,n,o,a);l===void 0&&(l=o),(a!==l||!s.has(n))&&(s.set(n,l),this.fire(`change:${n}`,n,l,a))}}),this[n]=r}bind(...n){if(!n.length||!jB(n))throw new oe("observable-bind-wrong-properties",this);if(new Set(n).size!==n.length)throw new oe("observable-bind-duplicate-properties",this);_E(this);const r=this[eg];n.forEach(o=>{if(r.has(o))throw new oe("observable-bind-rebind",this)});const s=new Map;return n.forEach(o=>{const a={property:o,to:[]};r.set(o,a),s.set(o,a)}),{to:Yxe,toMany:Kxe,_observable:this,_bindProperties:n,_to:[],_bindings:s}}unbind(...n){if(!this[Jp])return;const r=this[eg],s=this[Rg];if(n.length){if(!jB(n))throw new oe("observable-unbind-wrong-properties",this);n.forEach(o=>{const a=r.get(o);a&&(a.to.forEach(([l,c])=>{const d=s.get(l),f=d[c];f.delete(a),f.size||delete d[c],Object.keys(d).length||(s.delete(l),this.stopListening(l,"change"))}),r.delete(o))})}else s.forEach((o,a)=>{this.stopListening(a,"change")}),s.clear(),r.clear()}decorate(n){_E(this);const r=this[n];if(!r)throw new oe("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:n});this.on(n,(s,o)=>{s.return=r.apply(this,o)}),this[n]=function(...s){return this.fire(n,s)},this[n][VB]=r,this[Du]||(this[Du]=[]),this[Du].push(n)}stopListening(n,r,s){if(!n&&this[Du]){for(const o of this[Du])this[o]=this[o][VB];delete this[Du]}super.stopListening(n,r,s)}[Jp];[Du];[eg];[Rg]}return e}function _E(i){i[Jp]||(Object.defineProperty(i,Jp,{value:new Map}),Object.defineProperty(i,Rg,{value:new Map}),Object.defineProperty(i,eg,{value:new Map}))}function Yxe(...i){const e=Qxe(...i),t=Array.from(this._bindings.keys()),n=t.length;if(!e.callback&&e.to.length>1)throw new oe("observable-bind-to-no-callback",this);if(n>1&&e.callback)throw new oe("observable-bind-to-extra-callback",this);e.to.forEach(r=>{if(r.properties.length&&r.properties.length!==n)throw new oe("observable-bind-to-properties-length",this);r.properties.length||(r.properties=this._bindProperties)}),this._to=e.to,e.callback&&(this._bindings.get(t[0]).callback=e.callback),e_e(this._observable,this._to),Jxe(this),this._bindProperties.forEach(r=>{wG(this._observable,r)})}function Kxe(i,e,t){if(this._bindings.size>1)throw new oe("observable-bind-to-many-not-one-binding",this);this.to(...Xxe(i,e),t)}function Xxe(i,e){const t=i.map(n=>[n,e]);return Array.prototype.concat.apply([],t)}function jB(i){return i.every(e=>typeof e=="string")}function Qxe(...i){if(!i.length)throw new oe("observable-bind-to-parse-error",null);const e={to:[]};let t;return typeof i[i.length-1]=="function"&&(e.callback=i.pop()),i.forEac
31h(n=>{if(typeof n=="string")t.properties.push(n);else if(typeof n=="object")t={observable:n,properties:[]},e.to.push(t);else throw new oe("observable-bind-to-parse-error",null)}),e}function Zxe(i,e,t,n){const r=i[Rg],s=r.get(t),o=s||{};o[n]||(o[n]=new Set),o[n].add(e),s||r.set(t,o)}function Jxe(i){let e;i._bindings.forEach((t,n)=>{i._to.forEach(r=>{e=r.properties[t.callback?0:i._bindProperties.indexOf(n)],t.to.push([r.observable,e]),Zxe(i._observable,t,r.observable,e)})})}function wG(i,e){const n=i[eg].get(e);let r;n.callback?r=n.callback.apply(i,n.to.map(s=>s[0][s[1]])):(r=n.to[0],r=r[0][r[1]]),Object.prototype.hasOwnProperty.call(i,e)?i[e]=r:i.set(e,r)}function e_e(i,e){e.forEach(t=>{const n=i[Rg];let r;n.get(t.observable)||i.listenTo(t.observable,"change",(s,o)=>{r=n.get(t.observable)[o],r&&r.forEach(a=>{wG(i,a.property)})})})}class xG{_replacedElements;constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach(({element:e,newElement:t})=>{e.style.display="",t&&t.remove()}),this._replacedElements=[]}}function lS(i){let e=0;for(const t of i)e++;return e}function ji(i,e){const t=Math.min(i.length,e.length);for(let n=0;n<t;n++)if(i[n]!=e[n])return n;return i.length==e.length?"same":i.length<e.length?"prefix":"extension"}function Bs(i){return!!(i&&i[Symbol.iterator])}function Ts(i,e,t={},n=[]){const r=t&&t.xmlns,s=r?i.createElementNS(r,e):i.createElement(e);for(const o in t)s.setAttribute(o,t[o]);(FB(n)||!Bs(n))&&(n=[n]);for(let o of n)FB(o)&&(o=i.createTextNode(o)),s.appendChild(o);return s}class _G{_config;constructor(e,t){this._config=Object.create(null),t&&this.define(zB(t)),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}*names(){for(const e of Object.keys(this._config))yield e}_setToTarget(e,t,n,r=!1){if(Po(t)){this._setObjectToTarget(e,t,r);return}const s=t.split(".");t=s.pop();for(const o of s)Po(e[o])||(e[o]=Object.create(null)),e=e[o];if(Po(n)){Po(e[t])||(e[t]=Object.create(null)),e=e[t],this._setObjectToTarget(e,n,r);return}r&&typeof e[t]<"u"||(e[t]=n)}_getFromSource(e,t){const n=t.split(".");t=n.pop();for(const r of n){if(!Po(e[r])){e=null;break}e=e[r]}return e?zB(e[t]):void 0}_setObjectToTarget(e,t,n){Object.keys(t).forEach(r=>{this._setToTarget(e,r,t[r],n)})}}function zB(i){return g_(i,t_e)}function t_e(i){return Uc(i)||typeof i=="function"?i:void 0}function Vc(i){if(i){if(i.defaultView)return i instanceof i.defaultView.Document;if(i.ownerDocument&&i.ownerDocument.defaultView)return i instanceof i.ownerDocument.defaultView.Node}return!1}function Hw(i){const e=Object.prototype.toString.apply(i);return e=="[object Window]"||e=="[object global]"}const n_e=ds(Sn());function ds(i){if(!i)return n_e;class e extends i{listenTo(n,r,s,o={}){if(Vc(n)||Hw(n)||n instanceof $e.window.EventTarget){const a={capture:!!o.useCapture,passive:!!o.usePassive},l=this._getProxyEmitter(n,a)||new i_e(n,a);this.listenTo(l,r,s,o)}else super.listenTo(n,r,s,o)}stopListening(n,r,s){if(Vc(n)||Hw(n)||n instanceof $e.window.EventTarget){const o=this._getAllProxyEmitters(n);for(const a of o)this.stopListening(a,r,s)}else super.stopListening(n,r,s)}_getProxyEmitter(n,r){return zxe(this,CG(n,r))}_getAllProxyEmitters(n){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map(r=>this._getProxyEmitter(n,r)).filter(r=>!!r)}}return e}class i_e extends Sn(){_domNode;_options;constructor(e,t){super(),yG(this,CG(e,t)),this._domNode=e,this._options=t}_domListeners;attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;this._domListeners[e]&&(!(t=this._events[e])||!t.callbacks.length)&&this._domListeners[e].removeListener()}_addEventListener(e,t,n){this.attach(e),Sn().prototype._addEventListener.call(this,e,t,n)}_removeEventListener(e,t){Sn().prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){const t=n=>{this.fire(e,n)};return t.removeListener=()=>
31{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}}function r_e(i){return i["data-ck-expando"]||(i["data-ck-expando"]=rr())}function CG(i,e){let t=r_e(i);for(const n of Object.keys(e).sort())e[n]&&(t+="-"+n);return t}function s_e(i){const e=[];let t=i;for(;t&&t.nodeType!=Node.DOCUMENT_NODE;)e.unshift(t),t=t.parentNode;return e}function o_e(i){return i instanceof HTMLTextAreaElement?i.value:i.innerHTML}function DG(i){const e=i.ownerDocument.defaultView.getComputedStyle(i);return{top:parseInt(e.borderTopWidth,10),right:parseInt(e.borderRightWidth,10),bottom:parseInt(e.borderBottomWidth,10),left:parseInt(e.borderLeftWidth,10)}}function EG(i){if(!i.target)return null;const e=i.target.ownerDocument,t=i.clientX,n=i.clientY;let r=null;return e.caretRangeFromPoint&&e.caretRangeFromPoint(t,n)?r=e.caretRangeFromPoint(t,n):i.rangeParent&&(r=e.createRange(),r.setStart(i.rangeParent,i.rangeOffset),r.collapse(!0)),r}function TG(i){return!i||!i.parentNode||i.offsetParent===$e.document.body?null:i.offsetParent}function Hn(i){return Object.prototype.toString.call(i)=="[object Text]"}function y_(i){return Object.prototype.toString.apply(i)=="[object Range]"}const AG=["top","right","bottom","left","width","height"],a_e=new Set(["relative","absolute","fixed","sticky"]);class gt{top;right;bottom;left;width;height;_source;constructor(e){const t=y_(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),cS(e)||t)if(t){const n=gt.getDomRangeRects(e);wy(this,gt.getBoundingRect(n))}else wy(this,e.getBoundingClientRect());else if(Hw(e)){const{innerWidth:n,innerHeight:r}=e;wy(this,{top:0,right:n,bottom:r,left:0,width:n,height:r})}else wy(this,e)}clone(){return new gt(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};if(t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0)return null;{const n=new gt(t);return n._source=this._source,n}}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(WB(e))return t;let n=e,r=e.parentNode||e.commonAncestorContainer,s;for(;r&&!WB(r);){const o=l_e(r)==="visible";if(HB(n)&&(s=n),o||s&&kG(s)==="absolute"&&!HB(r)){n=r,r=r.parentNode;continue}const a=new gt(r),l=t.getIntersection(a);if(l)l.getArea()<t.getArea()&&(t=l);else return null;n=r,r=r.parentNode}return t}isEqual(e){for(const t of AG)if(this[t]!==e[t])return!1;return!0}contains(e){const t=this.getIntersection(e);return!!(t&&t.isEqual(e))}toAbsoluteRect(){const{scrollX:e,scrollY:t}=$e.window,n=this.clone().moveBy(e,t);if(cS(n._source)){const r=TG(n._source);r&&c_e(n,r)}return n}excludeScrollbarsAndBorders(){const e=this._source;let t,n,r;if(Hw(e))t=e.innerWidth-e.document.documentElement.clientWidth,n=e.innerHeight-e.document.documentElement.clientHeight,r=e.getComputedStyle(e.document.documentElement).direction;else{const s=DG(e);t=e.offsetWidth-e.clientWidth-s.left-s.right,n=e.offsetHeight-e.clientHeight-s.top-s.bottom,r=e.ownerDocument.defaultView.getComputedStyle(e).direction,this.left+=s.left,this.top+=s.top,this.right-=s.right,this.bottom-=s.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=t,r==="ltr"?this.right-=t:this.left+=t,this.height-=n,this.bottom-=n,this}static getDomRangeRects(e){const t=[],n=Array.from(e.getClientRects());if(n.length)for(const r of n){const s=new gt(r);s._source=e,t.push(s)}else{let r=e.startContainer;Hn(r)&&(r=r.parentNode);const s=new gt(r.getBoundingClientRect());s.right=s.left,s.width=0,t.push(s)}return t}static getBoundingRect(e){const t={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let n=0;for(const r of e)n++,t.left=Math.min(t.left,r.left),t.top=Math.min(t.top,r.top),t.right=Math.max(t.right,r.right),t.bottom=Math.max(t.bottom,r.bottom);return n==0?null:(t.width=t.right-t.left,t.height=t.bottom-t.top,new gt(t))}}function wy(i,e){for(const t of AG)i[t]=e[t]}function WB(i){return cS(i)?i===i.ownerDocument.body:!1}function cS(i){return i!==null&&typeof i=="object"&&i.nodeType===1&&typeof i.getBoundingClientRect=="function"}function kG(i){return i.ownerDocument.defaultView.getComputedStyle(i).position}function l_e(i){return i instanceof HTMLElement?i.ownerDocument.defaultView.getComputedStyle(i).overflow:"visible"}function HB(i){return i instanceof HTMLElement&&a_e.has(kG(i))}function c_e(i,e){const t=new gt(e),n=DG(e);let r=0,s=0;r-=t.left,s-=t.top,r+=e.scrollLeft,s+=e.scrollTop,r-=n.left,s-=n.top,i.moveBy(r,s)}let B3=class ui{_element;_callback;static _observerInstance=null;static _elementCallbacks=null;constructor(e,t){ui._observerInstance||ui._createObserver(),this._element=e,this._callback=t,ui._addElementCallback(e,t),ui._observerInstance.observe(e)}
31get element(){return this._element}destroy(){ui._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){ui._elementCallbacks||(ui._elementCallbacks=new Map);let n=ui._elementCallbacks.get(e);n||(n=new Set,ui._elementCallbacks.set(e,n)),n.add(t)}static _deleteElementCallback(e,t){const n=ui._getElementCallbacks(e);n&&(n.delete(t),n.size||(ui._elementCallbacks.delete(e),ui._observerInstance.unobserve(e))),ui._elementCallbacks&&!ui._elementCallbacks.size&&(ui._observerInstance=null,ui._elementCallbacks=null)}static _getElementCallbacks(e){return ui._elementCallbacks?ui._elementCallbacks.get(e):null}static _createObserver(){ui._observerInstance=new $e.window.ResizeObserver(e=>{for(const t of e){const n=ui._getElementCallbacks(t.target);if(n)for(const r of n)r(t)}})}};function qB(i,e){i instanceof HTMLTextAreaElement&&(i.value=e),i.innerHTML=e}function nm(i){return e=>e+i}function th(i){let e=0;for(;i.previousSibling;)i=i.previousSibling,e++;return e}function SG(i,e,t){i.insertBefore(t,i.childNodes[e]||null)}function tg(i){return i&&i.nodeType===Node.COMMENT_NODE}function PG(i){try{$e.document.createAttribute(i)}catch{return!1}return!0}function Aa(i){return i?Hn(i)?Aa(i.parentElement):i.getClientRects?!!i.getClientRects().length:!1:!1}function M3({element:i,target:e,positions:t,limiter:n,fitInViewport:r,viewportOffsetConfig:s}){Ww(e)&&(e=e()),Ww(n)&&(n=n());const o=TG(i),a=IG(s),l=new gt(i),c=$B(e,a);let d;if(!c||!a.getIntersection(c))return null;const f={targetRect:c,elementRect:l,positionedElementAncestor:o,viewportRect:a};if(!n&&!r)d=new RG(t[0],f);else{if(n){const m=$B(n,a);m&&(f.limiterRect=m)}d=u_e(t,f)}return d}function $B(i,e){const t=new gt(i).getVisible();return t?t.getIntersection(e):null}function IG(i){i=Object.assign({top:0,bottom:0,left:0,right:0},i);const e=new gt($e.window);return e.top+=i.top,e.height-=i.top,e.bottom-=i.bottom,e.height-=i.bottom,e.left+=i.left,e.right-=i.right,e.width-=i.left+i.right,e}function u_e(i,e){const{elementRect:t}=e,n=t.getArea(),r=i.map(a=>new RG(a,e)).filter(a=>!!a.name);let s=0,o=null;for(const a of r){const{limiterIntersectionArea:l,viewportIntersectionArea:c}=a;if(l===n)return a;const d=c**2+l**2;d>s&&(s=d,o=a)}return o}class RG{name;config;_positioningFunctionCoordinates;_options;_cachedRect;_cachedAbsoluteRect;constructor(e,t){const n=e(t.targetRect,t.elementRect,t.viewportRect,t.limiterRect);if(!n)return;const{left:r,top:s,name:o,config:a}=n;this.name=o,this.config=a,this._positioningFunctionCoordinates={left:r,top:s},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;return e?e.getIntersectionArea(this._rect):0}get viewportIntersectionArea(){return this._options.viewportRect.getIntersectionArea(this._rect)}get _rect(){return this._cachedRect?this._cachedRect:(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left,this._positioningFunctionCoordinates.top),this._cachedRect)}get _absoluteRect(){return this._cachedAbsoluteRect?this._cachedAbsoluteRect:(this._cachedAbsoluteRect=this._rect.toAbsoluteRect(),this._cachedAbsoluteRect)}}function GB(i){const e=i.parentNode;e&&e.removeChild(i)}function w1(){const i=$e.window.visualViewport;if(!i||!(ot.isiOS||ot.isSafari))return{left:0,top:0};const e=Math.max(Math.round(i.offsetLeft),0),t=Math.max(Math.round(i.offsetTop),0);return{left:e,top:t}}function FG({target:i,viewportOffset:e=0,ancestorOffset:t=0,alignToTop:n,forceScroll:r}){const s=L3(i);let o=s,a=null;for(e=h_e(e);o;){let l;o==s?l=YB(i):l=YB(a),f_e({parent:l,getRect:()=>CE(i,o),alignToTop:n,ancestorOffset:t,forceScroll:r});let c=CE(i,o);const d=CE(l,o);if(c.height>d.height){const f=c.getIntersection(d);f&&(c=f)}if(d_e({window:o,rect:c,viewportOffset:e,alignToTop:n,forceScroll:r}),o.parent!=o){if(a=o.frameElement,o=o.parent,!a)return}else o=null}}function d_e({window:i,rect:e,alignToTop:t,forceScroll:n,viewportOffset:r}){const s=e.clone().moveBy(0,r.bottom),o=e.clone().moveBy(0,-r.top),a=new gt(i).excludeScrollbarsAndBorders(),l=[o,s],c=t&&n,d=l.every(y=>a.contains(y));let{scrollX:f,scrollY:m}=i;const p=f,g=m;c?m-=a.top-e.top+r.top:d||(NG(o,a)?m-=a.top-e.top+r.top:OG(s,a)&&(t?m+=e.top-a.top-r.top:m+=e.bottom-a.bottom+r.bottom)),d||(BG(e,a)?f-=a.left-e.left+r.left:MG(e,a)&&(f+=e.right-a.right+r.right)),(f!=p||m!==g)&&i.scrollTo(f,m)}
31function f_e({parent:i,getRect:e,alignToTop:t,forceScroll:n,ancestorOffset:r=0,limiterElement:s}){const o=L3(i),a=t&&n;let l,c,d;const f=s||o.document.body;for(;i!=f;)c=e(),l=new gt(i).excludeScrollbarsAndBorders(),d=l.contains(c),a?i.scrollTop-=l.top-c.top+r:d||(NG(c,l)?i.scrollTop-=l.top-c.top+r:OG(c,l)&&(t?i.scrollTop+=c.top-l.top-r:i.scrollTop+=c.bottom-l.bottom+r)),d||(BG(c,l)?i.scrollLeft-=l.left-c.left+r:MG(c,l)&&(i.scrollLeft+=c.right-l.right+r)),i=i.parentNode}function OG(i,e){return i.bottom>e.bottom}function NG(i,e){return i.top<e.top}function BG(i,e){return i.left<e.left}function MG(i,e){return i.right>e.right}function L3(i){return y_(i)?i.startContainer.ownerDocument.defaultView:i.ownerDocument.defaultView}function YB(i){if(y_(i)){let e=i.commonAncestorContainer;return Hn(e)&&(e=e.parentNode),e}else return i.parentNode}function CE(i,e){const t=L3(i),n=new gt(i);if(t===e)return n;{let r=t;for(;r!=e;){const s=r.frameElement,o=new gt(s).excludeScrollbarsAndBorders();n.moveBy(o.left,o.top),r=r.parent}}return n}function h_e(i){return typeof i=="number"?{top:i,bottom:i,left:i,right:i}:i}const m_e={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},p_e={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},KB={37:"←",38:"↑",39:"→",40:"↓",9:"⇥",33:"Page Up",34:"Page Down"},At=w_e(),g_e=Object.fromEntries(Object.entries(At).map(([i,e])=>{let t;return e in KB?t=KB[e]:t=i.charAt(0).toUpperCase()+i.slice(1),[e,t]}));function ld(i){let e;if(typeof i=="string"){if(e=At[i.toLowerCase()],!e)throw new oe("keyboard-unknown-key",null,{key:i})}
31else e=i.keyCode+(i.altKey?At.alt:0)+(i.ctrlKey?At.ctrl:0)+(i.shiftKey?At.shift:0)+(i.metaKey?At.cmd:0);return e}function v_(i){return typeof i=="string"&&(i=x_e(i)),i.map(e=>typeof e=="string"?y_e(e):e).reduce((e,t)=>t+e,0)}function qw(i,e){let t=v_(i);const n=ot.isMac||ot.isiOS;return Object.entries(n?m_e:p_e).reduce((o,[a,l])=>((t&At[a])!=0&&(t&=~At[a],o+=l),o),"")+(t?g_e[t]:"")}function b_e(i){return i==At.arrowright||i==At.arrowleft||i==At.arrowup||i==At.arrowdown}function w_(i,e){const t=e==="ltr";switch(i){case At.arrowleft:return t?"left":"right";case At.arrowright:return t?"right":"left";case At.arrowup:return"up";case At.arrowdown:return"down"}}function y_e(i){if(i.endsWith("!"))return ld(i.slice(0,-1));const e=ld(i);return(ot.isMac||ot.isiOS)&&e==At.ctrl?At.cmd:e}function v_e(i,e){const t=w_(i,e);return t==="down"||t==="right"}function w_e(){const i={pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let e=65;e<=90;e++){const t=String.fromCharCode(e);i[t.toLowerCase()]=e}for(let e=48;e<=57;e++)i[e-48]=e;for(let e=112;e<=123;e++)i["f"+(e-111)]=e;return Object.assign(i,{"'":222,",":108,"-":109,".":110,"/":111,";":186,"=":187,"[":219,"\\":220,"]":221,"`":223}),i}function x_e(i){return i.split("+").map(e=>e.trim())}const __e=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig","ur","urd"];function XB(i){return __e.includes(i)?"rtl":"ltr"}function mn(i){return Array.isArray(i)?i:[i]}$e.window.CKEDITOR_TRANSLATIONS||($e.window.CKEDITOR_TRANSLATIONS={});function C_e(i,e,t=1,n){if(typeof t!="number")throw new oe("translation-service-quantity-not-a-number",null,{quantity:t});const r=n||$e.window.CKEDITOR_TRANSLATIONS,s=T_e(r);s===1&&(i=Object.keys(r)[0]);const o=e.id||e.string;if(s===0||!E_e(i,o,r))return t!==1?e.plural:e.string;const a=r[i].dictionary,l=r[i].getPluralForm||(f=>f===1?0:1),c=a[o];if(typeof c=="string")return c;const d=Number(l(t));return c[d]}function D_e(i){return Array.isArray(i)?i.reduce((e,t)=>N3(e,t)):i}function E_e(i,e,t){return!!t[i]&&!!t[i].dictionary[e]}function T_e(i){return Object.keys(i).length}class A_e{uiLanguage;uiLanguageDirection;contentLanguage;contentLanguageDirection;t;translations;constructor({uiLanguage:e="en",contentLanguage:t,translations:n}={}){this.uiLanguage=e,this.contentLanguage=t||this.uiLanguage,this.uiLanguageDirection=XB(this.uiLanguage),this.contentLanguageDirection=XB(this.contentLanguage),this.translations=D_e(n),this.t=(r,s)=>this._t(r,s)}_t(e,t=[]){t=mn(t),typeof e=="string"&&(e={string:e});const r=!!e.plural?t[0]:1,s=C_e(this.uiLanguage,e,r,this.translations);return k_e(s,t)}}function k_e(i,e){return i.replace(/%(\d+)/g,(t,n)=>n<e.length?e[n]:t)}class Jn extends Sn(){_items;_itemMap;_idProperty;_bindToCollection;_bindToExternalToInternalMap;_bindToInternalToExternalMap;_skippedIndexesFromExternal;constructor(e={},t={}){super();const n=Bs(e);if(n||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],n)for(const r of e)this._items.push(r),this._itemMap.set(this._getItemIdBeforeAdding(r),r)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(t===void 0)t=this._items.length;else if(t>this._items.length||t<0)throw new oe("collection-add-item-invalid-index",this);let n=0;for(const r of e){const s=this._getItemIdBeforeAdding(r),o=t+n;this._items.splice(o,0,r),this._itemMap.set(s,r),this.fire("add",r,o),n++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if(typeof e=="string")t=this._itemMap.get(e);else if(typeof e=="number")t=this._items[e];else throw new oe("collection-get-invalid-arg",this);return t||null}has(e){if(typeof e=="string")return this._itemMap.has(e);{const t=this._idProperty,n=e[t];return n&&this._itemMap.has(n)}}getIndex(e){let t;return typeof e=="string"?t=this._itemMap.get(e):t=e,t?this._items.indexOf(t):-1}remove(e){const[t,n]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:n}),t}map(e,t){return this._items.map(e,t)}
31forEach(e,t){this._items.forEach(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new oe("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:t=>{this._setUpBindToBinding(n=>new t(n))},using:t=>{typeof t=="function"?this._setUpBindToBinding(t):this._setUpBindToBinding(n=>n[t])}}}_setUpBindToBinding(e){const t=this._bindToCollection,n=(r,s,o)=>{const a=t._bindToCollection==this,l=t._bindToInternalToExternalMap.get(s);if(a&&l)this._bindToExternalToInternalMap.set(s,l),this._bindToInternalToExternalMap.set(l,s);else{const c=e(s);if(!c){this._skippedIndexesFromExternal.push(o);return}let d=o;for(const f of this._skippedIndexesFromExternal)o>f&&d--;for(const f of t._skippedIndexesFromExternal)d>=f&&d++;this._bindToExternalToInternalMap.set(s,c),this._bindToInternalToExternalMap.set(c,s),this.add(c,d);for(let f=0;f<t._skippedIndexesFromExternal.length;f++)d<=t._skippedIndexesFromExternal[f]&&t._skippedIndexesFromExternal[f]++}};for(const r of t)n(null,r,t.getIndex(r));this.listenTo(t,"add",n),this.listenTo(t,"remove",(r,s,o)=>{const a=this._bindToExternalToInternalMap.get(s);a&&this.remove(a),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((l,c)=>(o<c&&l.push(c-1),o>c&&l.push(c),l),[])})}_getItemIdBeforeAdding(e){const t=this._idProperty;let n;if(t in e){if(n=e[t],typeof n!="string")throw new oe("collection-add-invalid-id",this);if(this.get(n))throw new oe("collection-add-item-already-exists",this)}else e[t]=n=rr();return n}_remove(e){let t,n,r,s=!1;const o=this._idProperty;if(typeof e=="string"?(n=e,r=this._itemMap.get(n),s=!r,r&&(t=this._items.indexOf(r))):typeof e=="number"?(t=e,r=this._items[t],s=!r,r&&(n=r[o])):(r=e,n=r[o],t=this._items.indexOf(r),s=t==-1||!this._itemMap.get(n)),s)throw new oe("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(n);const a=this._bindToInternalToExternalMap.get(r);return this._bindToInternalToExternalMap.delete(r),this._bindToExternalToInternalMap.delete(a),this.fire("remove",r,t),[r,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function Rn(i){const e=i.next();return e.done?null:e.value}class Fn extends ds(hn()){_elements=new Set;_externalViews=new Set;_blurTimeout=null;constructor(){super(),this.set("isFocused",!1),this.set("focusedElement",null)}get elements(){return Array.from(this._elements.values())}get externalViews(){return Array.from(this._externalViews.values())}add(e){if(ZB(e))this._addElement(e);else if(QB(e))this._addView(e);else{if(!e.element)throw new oe("focustracker-add-view-missing-element",{focusTracker:this,view:e});this._addElement(e.element)}}remove(e){ZB(e)?this._removeElement(e):QB(e)?this._removeView(e):this._removeElement(e.element)}_addElement(e){if(this._elements.has(e))throw new oe("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",()=>{const t=this.externalViews.find(n=>S_e(e,n));t?this._focus(t.element):this._focus(e)},{useCapture:!0}),this.listenTo(e,"blur",()=>{this._blur()},{useCapture:!0}),this._elements.add(e)}_removeElement(e){this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e)),e===this.focusedElement&&this._blur()}_addView(e){e.element&&this._addElement(e.element),this.listenTo(e.focusTracker,"change:focusedElement",()=>{e.focusTracker.focusedElement?e.element&&this._focus(e.element):this._blur()}),this._externalViews.add(e)}_removeView(e){e.element&&this._removeElement(e.element),this.stopListening(e.focusTracker),this._externalViews.delete(e)}destroy(){this.stopListening(),this._elements.clear(),this._externalViews.clear(),this.isFocused=!1,this.focusedElement=null}_focus(e){this._clearBlurTimeout(),this.focusedElement=e,this.isFocused=!0}_blur(){this.elements.find(n=>n.contains(document.activeElement))||this.externalViews.find(n=>n.focusTracker.isFocused&&!n.focusTracker._blurTimeout)||(this._clearBlurTimeout(),this._blurTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0))}_clearBlurTimeout(){clearTimeout(this._blurTimeout),this._blurTimeout=null}}function QB(i){return"focusTracker"in i&&i.focusTracker instanceof Fn}function ZB(i){return Uc(i)}function S_e(i,e){return JB(i,e)?!0:!!e.focusTracker.externalViews.find(t=>JB(i,t))}function JB(i,e){return!!e.element&&e.element.contains(document.activeElement)&&i.contains(e.element)}class qn{_listener;constructor(){this._listener=new(ds())}listenTo(e){this._listener.listenTo(e,"keydown",(t,n)=>{this._listener.fire("_keydown:"+ld(n),n)})}set(e,t,n={}){const r=v_(e),s=n.priority;this._listener.listenTo(this._listener,"_keydown:"+r,(o,a)=>{n.filter&&!n.filter(a)||(t(a,()=>{a.preventDefault(),a.stopPropagation(),o.stop()}),o.return=!0)},{priority:s})}press(e){return!!this._listener.fire("_keydown:"+ld(e),e)}stopListening(e){this._listener.stopListening(e)}destroy(){this.stopListening()}}function P_e(i){const e=new Map;for(const t in i)e.set(t,i[t]);return e}function ka(i){return Bs(i)?new Map(i):P_e(i)}function eM(i,e,t){const n=i.length,r=e.length;for(let s=n-1;s>=t;s--)i[s+r]=i[s];for(let s=0;s<r;s++)i[t+s]=e[s]}function U3(i,e){let t;function n(...r){n.cancel(),t=setTimeout(()=>i(...r),e)}return n.cancel=()=>{clearTimeout(t)},n}function V3(i){try{if(!i.startsWith("ey"))return null;const e=atob(i.replace(/-/g,"+").replace(/_/g,"/"));return JSON.parse(e)}catch{return null}}function I_e(){const i=[];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t&1?t=3988292384^t>>>1:t=t>>>1;i[e]=t}return i}
31function R_e(i){const e=Array.isArray(i)?i:[i],t=I_e();let n=-1;const r=e.map(s=>Array.isArray(s)?s.join(""):String(s)).join("");for(let s=0;s<r.length;s++){const o=r.charCodeAt(s);n=n>>>8^t[(n^o)&255]}return n=(n^-1)>>>0,n.toString(16).padStart(8,"0")}function F_e(i){const e=[{name:"address",isVoid:!1},{name:"article",isVoid:!1},{name:"aside",isVoid:!1},{name:"blockquote",isVoid:!1},{name:"details",isVoid:!1},{name:"dialog",isVoid:!1},{name:"dd",isVoid:!1},{name:"div",isVoid:!1},{name:"dl",isVoid:!1},{name:"dt",isVoid:!1},{name:"fieldset",isVoid:!1},{name:"figcaption",isVoid:!1},{name:"figure",isVoid:!1},{name:"footer",isVoid:!1},{name:"form",isVoid:!1},{name:"h1",isVoid:!1},{name:"h2",isVoid:!1},{name:"h3",isVoid:!1},{name:"h4",isVoid:!1},{name:"h5",isVoid:!1},{name:"h6",isVoid:!1},{name:"header",isVoid:!1},{name:"hgroup",isVoid:!1},{name:"hr",isVoid:!0},{name:"li",isVoid:!1},{name:"main",isVoid:!1},{name:"nav",isVoid:!1},{name:"ol",isVoid:!1},{name:"p",isVoid:!1},{name:"section",isVoid:!1},{name:"table",isVoid:!1},{name:"tbody",isVoid:!1},{name:"td",isVoid:!1},{name:"th",isVoid:!1},{name:"thead",isVoid:!1},{name:"tr",isVoid:!1},{name:"ul",isVoid:!1}],t=e.map(o=>o.name).join("|"),n=i.replace(new RegExp(`</?(${t})( .*?)?>`,"g"),`
32$&
33`).replace(/<br[^>]*>/g,`$&
34`).split(`
35`);let r=0,s=!1;return n.map(o=>(s=B_e(o,s),!o.length&&!s?"":O_e(o,e)?xy(o,r++):N_e(o,e)?xy(o,--r):s==="middle"||s==="last"?xy(o,0):xy(o,r))).join("").trimEnd()}function O_e(i,e){return e.some(t=>!(t.isVoid||!new RegExp(`<${t.name}( .*?)?>`).test(i)))}function N_e(i,e){return e.some(t=>new RegExp(`</${t.name}>`).test(i))}function xy(i,e,t="    "){return`${t.repeat(Math.max(0,e))}${i}
36`}function B_e(i,e){const t=/<pre( .*?)?>/.test(i),n=/<\/pre>/.test(i);return t&&n?!1:t?"first":n?"last":e==="first"||e==="middle"?"middle":!1}function M_e(i){return!!i&&i.length==1&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(i)}function L_e(i){return!!i&&i.length==1&&/[\ud800-\udbff]/.test(i)}function U_e(i){return!!i&&i.length==1&&/[\udc00-\udfff]/.test(i)}function j3(i,e){return L_e(i.charAt(e-1))&&U_e(i.charAt(e))}function z3(i,e){return M_e(i.charAt(e))}const V_e=j_e();function LG(i,e){const t=String(i).matchAll(V_e);return Array.from(t).some(n=>n.index<e&&e<n.index+n[0].length)}function j_e(){const i=[new RegExp("\\p{Emoji}[\\u{E0020}-\\u{E007E}]+\\u{E007F}","u"),new RegExp("\\p{Emoji}\\u{FE0F}?\\u{20E3}","u"),new RegExp("\\p{Emoji}\\u{FE0F}","u"),new RegExp("(?=\\p{General_Category=Other_Symbol})\\p{Emoji}\\p{Emoji_Modifier}*","u")],e=new RegExp("\\p{Regional_Indicator}{2}","u").source,t="(?:"+i.map(r=>r.source).join("|")+")",n=`${e}|${t}(?:‍${t})*`;return new RegExp(n,"ug")}function tM(i){if(!i)return null;const e=z_e(i);return e?V3(e):null}function z_e(i){const e=i.split(".");return e.length!=3?null:e[1]}function W_e(i,e){return(i.removeFeatures||[]).includes(e)}const up=new WeakMap;let nM=!1;function W3({view:i,element:e,text:t,isDirectHost:n=!0,keepOnFocus:r=!1}){const s=i.document;up.has(s)||(up.set(s,new Map),s.registerPostFixer(a=>DE(up.get(s),a)),s.on("change:isComposing",()=>{i.change(a=>DE(up.get(s),a))},{priority:"high"})),e.is("editableElement")&&e.on("change:placeholder",(a,l,c)=>o(c)),e.placeholder?o(e.placeholder):t&&o(t),t&&Y_e();function o(a){const l={text:a,isDirectHost:n,keepOnFocus:r,hostElement:n?e:null};up.get(s).set(e,l),i.change(c=>DE([[e,l]],c))}}function H_e(i,e){return e.hasClass("ck-placeholder")?!1:(i.addClass("ck-placeholder",e),!0)}function UG(i,e){return e.hasClass("ck-placeholder")?(i.removeClass("ck-placeholder",e),!0):!1}function q_e(i,e){if(!i.isAttached()||$_e(i))return!1;const t=i.document,r=t.selection.anchor;return t.isComposing&&r&&r.parent===i?!1:e||!t.isFocused?!0:!!r&&r.parent!==i}function $_e(i){for(const e of i.getChildren())if(!e.is("uiElement"))return!0;return!1}function DE(i,e){const t=[];let n=!1;for(const[r,s]of i)s.isDirectHost&&(t.push(r),iM(e,r,s)&&(n=!0));for(const[r,s]of i){if(s.isDirectHost)continue;const o=G_e(r);o!==s.hostElement&&s.hostElement&&(e.removeAttribute("data-placeholder",s.hostElement),UG(e,s.hostElement),s.hostElement=null,n=!0),o&&(t.includes(o)||(s.hostElement=o,iM(e,r,s)&&(n=!0)))}return n}function iM(i,e,t){const{text:n,isDirectHost:r,hostElement:s}=t;let o=!1;return s.getAttribute("data-placeholder")!==n&&(i.setAttribute("data-placeholder",n,s),o=!0),(r||e.childCount==1)&&q_e(s,t.keepOnFocus)?H_e(i,s)&&(o=!0):UG(i,s)&&(o=!0),o}function G_e(i){if(i.childCount){const e=i.getChild(0);if(e.is("element")&&!e.is("uiElement")&&!e.is("attributeElement"))return e}return null}function Y_e(){nM||Kt("enableViewPlaceholder-deprecated-text-option"),nM=!0}class pd{is(){throw new Error("is() method is abstract")}}class gd extends Sn(pd){document;parent;constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if((e=this.parent.getChildIndex(this))==-1)throw new oe("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return e!==null&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return e!==null&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),r=e.getAncestors(t);let s=0;for(;n[s]==r[s]&&n[s];)s++;return s===0?null:n[s-1]}isBefore(e){if(this==e||this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),r=ji(t,n);switch(r){case"prefix":return!0;case"extension":return!1;default:return t[r]<n[r]}}isAfter(e){return this==e||this.root!==e.root?!1:!this.isBefore(e)}_remove(){this.parent._removeChildren(this.index)}
36_fireChange(e,t,n){this.fire(`change:${e}`,t,n),this.parent&&this.parent._fireChange(e,t,n)}toJSON(){const e={path:this.getPath(),type:"Node"};return this!==this.root&&this.root.is("rootElement")&&(e.root=this.root.toJSON()),e}}gd.prototype.is=function(i){return i==="node"||i==="view:node"};class Ii extends gd{_textData;constructor(e,t){super(e),this._textData=t}get data(){return this._textData}get _data(){return this.data}set _data(e){this._fireChange("text",this),this._textData=e}isSimilar(e){return e instanceof Ii?this===e||this.data===e.data:!1}toJSON(){const e=super.toJSON();return e.type="Text",e.data=this.data,e}_clone(){return new Ii(this.document,this.data)}}Ii.prototype.is=function(i){return i==="$text"||i==="view:$text"||i==="text"||i==="view:text"||i==="node"||i==="view:node"};class hl extends pd{textNode;data;offsetInText;constructor(e,t,n){if(super(),this.textNode=e,t<0||t>e.data.length)throw new oe("view-textproxy-wrong-offsetintext",this);if(n<0||t+n>e.data.length)throw new oe("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+n),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let n=e.includeSelf?this.textNode:this.parent;for(;n!==null;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}}hl.prototype.is=function(i){return i==="$textProxy"||i==="view:$textProxy"||i==="textProxy"||i==="view:textProxy"};class $w{_consumables=new Map;add(e,t){let n;if(e.is("$text")||e.is("documentFragment")){this._consumables.set(e,!0);return}this._consumables.has(e)?n=this._consumables.get(e):(n=new K_e(e),this._consumables.set(e,n)),n.add(t?Vp(t):e._getConsumables())}test(e,t){const n=this._consumables.get(e);return n===void 0?null:e.is("$text")||e.is("documentFragment")?n:n.test(Vp(t))}consume(e,t){if(e.is("$text")||e.is("documentFragment"))return this.test(e,t)?(this._consumables.set(e,!1),!0):!1;const n=this._consumables.get(e);return n===void 0?!1:n.consume(Vp(t))}revert(e,t){const n=this._consumables.get(e);n!==void 0&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):n.revert(Vp(t)))}static createFrom(e,t){if(t||(t=new $w),e.is("$text"))t.add(e);else if(e.is("element")||e.is("documentFragment")){t.add(e);for(const n of e.getChildren())$w.createFrom(n,t)}return t}}class K_e{element;_canConsumeName=null;_attributes=new Map;constructor(e){this.element=e}add(e){e.name&&(this._canConsumeName=!0);for(const[t,n]of e.attributes)if(n){let r=this._attributes.get(t);(!r||typeof r=="boolean")&&(r=new Map,this._attributes.set(t,r)),r.set(n,!0)}else{if(t=="style"||t=="class")throw new oe("viewconsumable-invalid-attribute",this);this._attributes.set(t,!0)}}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const[t,n]of e.attributes){const r=this._attributes.get(t);if(r===void 0)return null;if(r===!1)return!1;if(r!==!0){if(n){const s=r.get(n);if(s===void 0)return null;if(!s)return!1}else for(const s of r.values())if(!s)return!1}}return!0}consume(e){if(!this.test(e))return!1;e.name&&(this._canConsumeName=!1);for(const[t,n]of e.attributes){const r=this._attributes.get(t);if(typeof r=="boolean")for(const[s]of this.element._getConsumables(t,n).attributes)this._attributes.set(s,!1);else if(n)for(const[,s]of this.element._getConsumables(t,n).attributes)r.set(s,!1);else for(const s of r.keys())r.set(s,!1)}return!0}revert(e){e.name&&(this._canConsumeName=!0);for(const[t,n]of e.attributes){const r=this._attributes.get(t);if(r===!1){this._attributes.set(t,!0);continue}if(!(r===void 0||r===!0))if(n)r.get(n)===!1&&r.set(n,!0);else for(const s of r.keys())r.set(s,!0)}}}function Vp(i){const e=[];return"attributes"in i&&i.attributes&&EE(e,i.attributes),"classes"in i&&i.classes&&EE(e,i.classes,"class"),"styles"in i&&i.styles&&EE(e,i.styles,"style"),{name:i.name||!1,attributes:e}}function EE(i,e,t){if(typeof e=="string"){i.push(t?[t,e]:[e]);return}for(const n of e)Array.isArray(n)?i.push(n):i.push(t?[t,n]:[n])}class Rl{_patterns=[];constructor(...e){this.add(...e)}add(...e){for(let t of e)(typeof t=="string"||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const n of this._patterns){const r=this._isElementMatching(t,n);if(r)return{element:t,pattern:n,match:r}}return null}matchAll(...e){const t=[];for(const n of e)for(const r of this._patterns){const s=this._isElementMatching(n,r);
36s&&t.push({element:n,pattern:r,match:s})}return t.length>0?t:null}getElementName(){if(this._patterns.length!==1)return null;const e=this._patterns[0],t=e.name;return typeof e!="function"&&t&&!(t instanceof RegExp)?t:null}_isElementMatching(e,t){if(typeof t=="function"){const s=t(e);return!s||typeof s!="object"?s:Vp(s)}const n={};if(t.name&&(n.name=X_e(t.name,e.name),!n.name))return null;const r=[];return t.attributes&&!Q_e(t.attributes,e,r)||t.classes&&!Z_e(t.classes,e,r)||t.styles&&!J_e(t.styles,e,r)?null:(r.length&&(n.attributes=r),n)}}function Gw(i,e){return i===!0||i===e||i instanceof RegExp&&!!String(e).match(i)}function X_e(i,e){return i instanceof RegExp?!!e.match(i):i===e}function H3(i,e){if(Array.isArray(i))return i.map(n=>typeof n!="object"||n instanceof RegExp?e?[e,n,!0]:[n,!0]:((n.key===void 0||n.value===void 0)&&Kt("matcher-pattern-missing-key-or-value",n),e?[e,n.key,n.value]:[n.key,n.value]));if(typeof i!="object"||i instanceof RegExp)return[e?[e,i,!0]:[i,!0]];const t=[];for(const n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.push(e?[e,n,i[n]]:[n,i[n]]);return t}function Q_e(i,e,t){let n;return typeof i=="object"&&!(i instanceof RegExp)&&!Array.isArray(i)?(i.style!==void 0&&Kt("matcher-pattern-deprecated-attributes-style-key",i),i.class!==void 0&&Kt("matcher-pattern-deprecated-attributes-class-key",i)):n=["class","style"],e._collectAttributesMatch(H3(i),t,n)}function Z_e(i,e,t){return e._collectAttributesMatch(H3(i,"class"),t)}function J_e(i,e,t){return e._collectAttributesMatch(H3(i,"style"),t)}class dh{_styles;_cachedStyleNames=null;_cachedExpandedStyleNames=null;_styleProcessor;constructor(e){this._styles={},this._styleProcessor=e}get isEmpty(){return!Object.entries(this._styles).length}get size(){return this.isEmpty?0:this.getStyleNames().length}setTo(e){this.clear();const t=t2e(e);for(const[n,r]of t)this._styleProcessor.toNormalizedForm(n,r,this._styles);return this}has(e){if(this.isEmpty)return!1;const n=this._styleProcessor.getReducedForm(e,this._styles).find(([r])=>r===e);return Array.isArray(n)}set(e,t){if(this._cachedStyleNames=null,this._cachedExpandedStyleNames=null,Nr(e))for(const[n,r]of Object.entries(e))this._styleProcessor.toNormalizedForm(n,r,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t={};for(const n of mn(e)){const r=uS(n),s=Lc(this._styles,r);if(s)x1(t,r,s);else{const o=this.getAsString(n);o!==void 0&&this._styleProcessor.toNormalizedForm(n,o,t)}}Object.keys(t).length&&(VG(this._styles,t),this._cachedStyleNames=null,this._cachedExpandedStyleNames=null)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this.getStylesEntries().map(e=>e.join(":")).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!Nr(this._styles[e]))return this._styles[e];const n=this._styleProcessor.getReducedForm(e,this._styles).find(([r])=>r===e);if(Array.isArray(n))return n[1]}getStyleNames(e=!1){return this.isEmpty?[]:e?(this._cachedExpandedStyleNames||=this._styleProcessor.getStyleNames(this._styles),this._cachedExpandedStyleNames):(this._cachedStyleNames||=this.getStylesEntries().map(([t])=>t),this._cachedStyleNames)}keys(){return this.getStyleNames()}clear(){this._styles={},this._cachedStyleNames=null,this._cachedExpandedStyleNames=null}isSimilar(e){if(this.size!==e.size)return!1;for(const t of this.getStyleNames())if(!e.has(t)||e.getAsString(t)!==this.getAsString(t))return!1;return!0}getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const n of t)e.push(...this._styleProcessor.getReducedForm(n,this._styles));return e}_clone(){const e=new this.constructor(this._styleProcessor);return e.set(this.getNormalized()),e}_getTokensMatch(e,t){const n=[];for(const r of this.getStyleNames(!0))if(Gw(e,r)){if(t===!0){n.push(r);continue}const s=this.getAsString(r);Gw(t,s)&&n.push(r)}return n.length?n:void 0}_getConsumables(e){const t=[];if(e){t.push(e);for(const n of this._styleProcessor.getRelatedStyles(e))t.push(n)}
36else for(const n of this.getStyleNames()){for(const r of this._styleProcessor.getRelatedStyles(n))t.push(r);t.push(n)}return t}_canMergeFrom(e){for(const t of e.getStyleNames())if(this.has(t)&&this.getAsString(t)!==e.getAsString(t))return!1;return!0}_mergeFrom(e){for(const t of e.getStyleNames())this.has(t)||this.set(t,e.getAsString(t))}_isMatching(e){for(const t of e.getStyleNames())if(!this.has(t)||this.getAsString(t)!==e.getAsString(t))return!1;return!0}}class e2e{_normalizers;_extractors;_reducers;_consumables;constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,n){if(Nr(t)){x1(n,uS(e),t);return}if(this._normalizers.has(e)){const r=this._normalizers.get(e),{path:s,value:o}=r(t);x1(n,s,o)}else x1(n,e,t)}getNormalized(e,t){if(!e)return N3({},t);if(t[e]!==void 0)return t[e];if(this._extractors.has(e)){const n=this._extractors.get(e);if(typeof n=="string")return Lc(t,n);const r=n(e,t);if(r)return r}return Lc(t,uS(e))}getReducedForm(e,t){const n=this.getNormalized(e,t);return n===void 0?[]:this._reducers.has(e)?this._reducers.get(e)(n):[[e,n]]}getStyleNames(e){const t=new Set;for(const n of this._consumables.keys()){const r=this.getNormalized(n,e);r&&(typeof r!="object"||Object.keys(r).length)&&t.add(n)}for(const n of Object.keys(e))t.add(n);return Array.from(t)}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const n of t)this._mapStyleNames(n,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function t2e(i){let e=null,t=0,n=0,r=null;const s=new Map;if(i==="")return s;i.charAt(i.length-1)!=";"&&(i=i+";");for(let o=0;o<i.length;o++){const a=i.charAt(o);if(e===null)switch(a){case":":r||(r=i.substr(t,o-t),n=o+1);break;case'"':case"'":e=a;break;case";":{const l=i.substr(n,o-n);r&&s.set(r.trim(),l.trim()),r=null,t=o+1;break}}else a===e&&(e=null)}return s}function uS(i){return i.replace("-",".")}function x1(i,e,t){let n=t;Nr(t)&&(n=N3({},Lc(i,e),t)),lG(i,e,n)}function VG(i,e){for(const t of Object.keys(e))i[t]!==null&&!Array.isArray(i[t])&&typeof i[t]=="object"&&typeof e[t]=="object"?(VG(i[t],e[t]),Object.keys(i[t]).length||delete i[t]):delete i[t]}class TE{_set=new Set;get isEmpty(){return this._set.size==0}get size(){return this._set.size}has(e){return this._set.has(e)}keys(){return Array.from(this._set.keys())}setTo(e){this.clear();for(const t of e.split(/\s+/))t&&this._set.add(t);return this}set(e){for(const t of mn(e))t&&this._set.add(t)}remove(e){for(const t of mn(e))this._set.delete(t)}clear(){this._set.clear()}toString(){return Array.from(this._set).join(" ")}isSimilar(e){if(this.size!==e.size)return!1;for(const t of this.keys())if(!e.has(t))return!1;return!0}_clone(){const e=new this.constructor;return e._set=new Set(this._set),e}_getTokensMatch(e){const t=[];if(e===!0){for(const n of this._set.keys())t.push(n);return t}if(typeof e=="string"){for(const n of e.split(/\s+/))if(this._set.has(n))t.push(n);else return;return t}for(const n of this._set.keys())n.match(e)&&t.push(n);return t.length?t:void 0}_getConsumables(e){return e?[e]:this.keys()}_canMergeFrom(){return!0}_mergeFrom(e){for(const t of e._set.keys())this._set.has(t)||this._set.add(t)}_isMatching(e){for(const t of e._set.keys())if(!this._set.has(t))return!1;return!0}}class jo extends gd{name;_unsafeAttributesToRender=[];_attrs;_children;_customProperties=new Map;get _classes(){return this._attrs.get("class")}get _styles(){return this._attrs.get("style")}constructor(e,t,n,r){super(e),this.name=t,this._attrs=this._parseAttributes(n),this._children=[],r&&this._insertChild(0,r)}get childCount(){return this._children.length}get isEmpty(){return this._children.length===0}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes&&(yield"class"),this._styles&&(yield"style");for(const e of this._attrs.keys())e!="class"&&e!="style"&&(yield e)}*getAttributes(){for(const[e,t]of this._attrs.entries())yield[e,String(t)]}getAttribute(e){return this._attrs.has(e)?String(this._attrs.get(e)):void 0}hasAttribute(e,t){return this._attrs.has(e)?t!==void 0?_f(this.name,e)||dp(this.name,e)?this._attrs.get(e).has(t):this._attrs.get(e)===t:!0:!1}isSimilar(e){if(!(e instanceof jo))return!1;if(this===e)return!0;
36if(this.name!=e.name||this._attrs.size!==e._attrs.size)return!1;for(const[t,n]of this._attrs){const r=e._attrs.get(t);if(r===void 0)return!1;if(typeof n=="string"||typeof r=="string"){if(r!==n)return!1}else if(!n.isSimilar(r))return!1}return!0}hasClass(...e){for(const t of e)if(!this._classes||!this._classes.has(t))return!1;return!0}getClassNames(){const e=this._classes?this._classes.keys():[],t=e[Symbol.iterator]();return Object.assign(e,{next:t.next.bind(t)})}getStyle(e){return this._styles&&this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles&&this._styles.getNormalized(e)}getStyleNames(e){return this._styles?this._styles.getStyleNames(e):[]}hasStyle(...e){for(const t of e)if(!this._styles||!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new Rl(...e);let n=this.parent;for(;n&&!n.is("documentFragment");){if(t.match(n))return n;n=n.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=this._classes?this._classes.keys().sort().join(","):"",t=this._styles&&String(this._styles),n=Array.from(this._attrs).filter(([r])=>r!="style"&&r!="class").map(r=>`${r[0]}="${r[1]}"`).sort().join(" ");return this.name+(e==""?"":` class="${e}"`)+(t?` style="${t}"`:"")+(n==""?"":` ${n}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}toJSON(){const e=super.toJSON();if(e.name=this.name,e.type="Element",this._attrs.size&&(e.attributes=Object.fromEntries(this.getAttributes())),this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=[];if(e)for(const r of this.getChildren())t.push(r._clone(e));const n=new this.constructor(this.document,this.name,this._attrs,t);return n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n._unsafeAttributesToRender=this._unsafeAttributesToRender,n}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this,{index:e});let n=0;const r=n2e(this.document,t);for(const s of r)s.parent!==null&&s._remove(),s.parent=this,s.document=this.document,this._children.splice(e,0,s),e++,n++;return n}_removeChildren(e,t=1){this._fireChange("children",this,{index:e});for(let n=e;n<e+t;n++)this._children[n].parent=null;return this._children.splice(e,t)}_setAttribute(e,t,n=!0){if(this._fireChange("attributes",this),_f(this.name,e)||dp(this.name,e)){let r=this._attrs.get(e);r||(r=_f(this.name,e)?new dh(this.document.stylesProcessor):new TE,this._attrs.set(e,r)),n?r.setTo(String(t)):_f(this.name,e)?Array.isArray(t)?r.set(t[0],t[1]):r.set(t):r.set(typeof t=="string"?t.split(/\s+/):t)}else this._attrs.set(e,String(t))}_removeAttribute(e,t){if(this._fireChange("attributes",this),t!==void 0&&(_f(this.name,e)||dp(this.name,e))){const n=this._attrs.get(e);return n?(dp(this.name,e)&&typeof t=="string"&&(t=t.split(/\s+/)),n.remove(t),n.isEmpty?this._attrs.delete(e):!1):!1}return this._attrs.delete(e)}_addClass(e){this._setAttribute("class",e,!1)}_removeClass(e){this._removeAttribute("class",e)}_setStyle(e,t){typeof e!="string"?this._setAttribute("style",e,!1):this._setAttribute("style",[e,t],!1)}_removeStyle(e){this._removeAttribute("style",e)}_collectAttributesMatch(e,t,n){for(const[r,s,o]of e){let a=!1,l=!1;for(const[c,d]of this._attrs)if(!(n&&n.includes(c)||!Gw(r,c)))if(a=!0,typeof d=="string"){if(Gw(s,d))t.push([c]),l=!0;else if(!(r instanceof RegExp))return!1}else{const f=d._getTokensMatch(s,o||!0);if(f){l=!0;for(const m of f)t.push([c,m])}else if(!(r instanceof RegExp))return!1}if(!a||!l)return!1}return!0}_getConsumables(e,t){const n=[];if(e){const r=this._attrs.get(e);if(r!==void 0)if(typeof r=="string")n.push([e]);else for(const s of r._getConsumables(t))n.push([e,s])}else for(const[r,s]of this._attrs)if(typeof s=="string")n.push([r]);else for(const o of s._getConsumables())n.push([r,o]);return{name:!e,attributes:n}}_canMergeAttributesFrom(e){if(this.name!=e.name)return!1;for(const[t,n]of e._attrs){const r=this._attrs.get(t);if(r!==void 0){if(typeof r=="string"||typeof n=="string"){if(r!==n)return!1}else if(!r._canMergeFrom(n))return!1}}return!0}_mergeAttributesFrom(e){this._fireChange("attributes",this);for(const[t,n]of e._attrs){const r=this._attrs.get(t);r===void 0||typeof r=="string"||typeof n=="string"?this._setAttribute(t,n):r._mergeFrom(n)}}_canSubtractAttributesOf(e){if(this.name!=e.name)return!1;for(const[t,n]of e._attrs){const r=this._attrs.get(t);if(r===void 0)return!1;if(typeof r=="string"||typeof n=="string"){if(r!==n)return!1}else if(!r._isMatching(n))return!1}return!0}_subtractAttributesOf(e){this._fireChange("attributes",this);for(const[t,n]of e._attrs){const r=this._attrs.get(t);typeof r=="string"||typeof n=="string"?this._attrs.delete(t):(r.remove(n.keys()),r.isEmpty&&this._attrs.delete(t))}}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}_parseAttributes(e){const t=ka(e);for(const[n,r]of t)if(r===null)t.delete(n);else if(_f(this.name,n)){const s=r instanceof dh?r._clone():new dh(this.document.stylesProcessor).setTo(String(r));t.set(n,s)}
36else if(dp(this.name,n)){const s=r instanceof TE?r._clone():new TE().setTo(String(r));t.set(n,s)}else typeof r!="string"&&t.set(n,String(r));return t}}jo.prototype.is=function(i,e){return e?e===this.name&&(i==="element"||i==="view:element"):i==="element"||i==="view:element"||i==="node"||i==="view:node"};function n2e(i,e){if(typeof e=="string")return[new Ii(i,e)];Bs(e)||(e=[e]);const t=[];for(const n of e)typeof n=="string"?t.push(new Ii(i,n)):n instanceof hl?t.push(new Ii(i,n.data)):t.push(n);return t}function dp(i,e){return e=="class"||i=="a"&&e=="rel"}function _f(i,e){return e=="style"}class Fg extends jo{constructor(e,t,n,r){super(e,t,n,r),this.getFillerOffset=i2e}toJSON(){const e=super.toJSON();return e.type="ContainerElement",e}}Fg.prototype.is=function(i,e){return e?e===this.name&&(i==="containerElement"||i==="view:containerElement"||i==="element"||i==="view:element"):i==="containerElement"||i==="view:containerElement"||i==="element"||i==="view:element"||i==="node"||i==="view:node"};function i2e(){const i=[...this.getChildren()],e=i[this.childCount-1];if(e&&e.is("element","br"))return this.childCount;for(const t of i)if(!t.is("uiElement"))return null;return this.childCount}class x_ extends hn(Fg){constructor(e,t,n,r){super(e,t,n,r),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("placeholder",void 0),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",s=>s&&e.selection.editableElement==this),this.listenTo(e.selection,"change",()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}destroy(){this.stopListening()}toJSON(){const e=super.toJSON();return e.type="EditableElement",e.isReadOnly=this.isReadOnly,e.isFocused=this.isFocused,e}}x_.prototype.is=function(i,e){return e?e===this.name&&(i==="editableElement"||i==="view:editableElement"||i==="containerElement"||i==="view:containerElement"||i==="element"||i==="view:element"):i==="editableElement"||i==="view:editableElement"||i==="containerElement"||i==="view:containerElement"||i==="element"||i==="view:element"||i==="node"||i==="view:node"};const rM=Symbol("rootName");class jG extends x_{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(rM)}set rootName(e){this._setCustomProperty(rM,e)}toJSON(){return this.rootName}set _name(e){this.name=e}}jG.prototype.is=function(i,e){return e?e===this.name&&(i==="rootElement"||i==="view:rootElement"||i==="editableElement"||i==="view:editableElement"||i==="containerElement"||i==="view:containerElement"||i==="element"||i==="view:element"):i==="rootElement"||i==="view:rootElement"||i==="editableElement"||i==="view:editableElement"||i==="containerElement"||i==="view:containerElement"||i==="element"||i==="view:element"||i==="node"||i==="view:node"};class Ku{direction;boundaries;singleCharacters;shallow;ignoreElementEnd;_position;_boundaryStartParent;_boundaryEndParent;constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new oe("view-tree-walker-no-start-position",null);if(e.direction&&e.direction!="forward"&&e.direction!="backward")throw new oe("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=He._createAt(e.startPosition):this._position=He._createAt(e.boundaries[e.direction=="backward"?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,n;do n=this.position,t=this.next();while(!t.done&&e(t.value));t.done||(this._position=n)}jumpTo(e){this._boundaryStartParent&&e.isBefore(this.boundaries.start)?e=this.boundaries.start:this._boundaryEndParent&&e.isAfter(this.boundaries.end)&&(e=this.boundaries.end),this._position=e.clone()}next(){return this.direction=="forward"?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,n=e.parent;if(n.parent===null&&e.offset===n.childCount)return{done:!0,value:void 0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let r;if(n&&n.is("view:$text")){if(e.isAtEnd)return this._position=He._createAfter(n),this._next();r=n.data[e.offset]}else r=n.getChild(e.offset);if(typeof r=="string"){let s;this.singleCharacters?s=1:s=(n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length)-e.offset;const o=new hl(n,e.offset,s);return e.offset+=s,this._position=e,this._formatReturnValue("text",o,t,e,s)}if(r&&r.is("view:element")){if(!this.shallow)e=new He(r,0);else{if(this.boundaries&&this.boundaries.end.isBefore(e))return{done:!0,value:void 0};e.offset++}return this._position=e,this._formatReturnValue("elementStart",r,t,e,1)}if(r&&r.is("view:$text")){if(this.singleCharacters)return e=new He(r,0),this._position=e,this._next();let s=r.data.length,o;return r==this._boundaryEndParent?(s=this.boundaries.end.offset,o=new hl(r,0,s),e=He._createAfter(o)):(o=new hl(r,0,r.data.length),e.offset++),this._position=e,this._formatReturnValue("text",o,t,e,s)}return e=He._createAfter(n),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",n,t,e)}_previous(){let e=this.position.clone();const t=this.position,n=e.parent;if(n.parent===null&&e.offset===0)return{done:!0,value:void 0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let r;if(n.is("view:$text")){if(e.isAtStart)return this._position=He._createBefore(n),this._previous();r=n.data[e.offset-1]}else r=n.getChild(e.offset-1);if(typeof r=="string"){let s;if(this.singleCharacters)s=1;else{const a=n===this._boundaryStartParent?this.boundaries.start.offset:0;s=e.offset-a}e.offset-=s;const o=new hl(n,e.offset,s);return this._position=e,this._formatReturnValue("text",o,t,e,s)}if(r&&r.is("view:element"))return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",r,t,e,1)):(e=new He(r,r.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",r,t,e));if(r&&r.is("view:$text")){if(this.singleCharacters)return e=new He(r,r.data.length),this._position=e,this._previous();let s=r.data.length,o;if(r==this._boundaryStartParent){const a=this.boundaries.start.offset;o=new hl(r,a,r.data.length-a),s=o.data.length,e=He._createBefore(o)}else o=new hl(r,0,r.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",o,t,e,s)}return e=He._createBefore(n),this._position=e,this._formatReturnValue("elementStart",n,t,e,1)}
36_formatReturnValue(e,t,n,r,s){return t.is("view:$textProxy")&&(t.offsetInText+t.data.length==t.textNode.data.length&&(this.direction=="forward"&&!(this.boundaries&&this.boundaries.end.isEqual(this.position))?(r=He._createAfter(t.textNode),this._position=r):n=He._createAfter(t.textNode)),t.offsetInText===0&&(this.direction=="backward"&&!(this.boundaries&&this.boundaries.start.isEqual(this.position))?(r=He._createBefore(t.textNode),this._position=r):n=He._createBefore(t.textNode))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:r,length:s}}}}class He extends pd{parent;offset;constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return this.offset===0}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof x_);)if(e.parent)e=e.parent;else return null;return e}getShiftedBy(e){const t=He._createAt(this),n=t.offset+e;return t.offset=n<0?0:n,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new Ku(t);return n.skip(e),n.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let r=0;for(;t[r]==n[r]&&t[r];)r++;return r===0?null:t[r-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return this.compareWith(e)=="before"}isAfter(e){return this.compareWith(e)=="after"}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],n=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),n.push(e.offset);const r=ji(t,n);switch(r){case"prefix":return"before";case"extension":return"after";default:return t[r]<n[r]?"before":"after"}}getWalker(e={}){return e.startPosition=this,new Ku(e)}clone(){return new He(this.parent,this.offset)}toJSON(){return{parent:this.parent.toJSON(),offset:this.offset}}static _createAt(e,t){if(e instanceof He)return new this(e.parent,e.offset);{const n=e;if(t=="end")t=n.is("$text")?n.data.length:n.childCount;else{if(t=="before")return this._createBefore(n);if(t=="after")return this._createAfter(n);if(t!==0&&!t)throw new oe("view-createpositionat-offset-required",n)}return new He(n,t)}}static _createAfter(e){if(e.is("$textProxy"))return new He(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new oe("view-position-after-root",e,{root:e});return new He(e.parent,e.index+1)}static _createBefore(e){if(e.is("$textProxy"))return new He(e.textNode,e.offsetInText);if(!e.parent)throw new oe("view-position-before-root",e,{root:e});return new He(e.parent,e.index)}}He.prototype.is=function(i){return i==="position"||i==="view:position"};class xt extends pd{start;end;constructor(e,t=null){super(),this.start=e.clone(),this.end=t?t.clone():e.clone()}*[Symbol.iterator](){yield*new Ku({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(_y,{direction:"backward"}),t=this.end.getLastMatchingPosition(_y);return e.parent.is("$text")&&e.isAtStart&&(e=He._createBefore(e.parent)),t.parent.is("$text")&&t.isAtEnd&&(t=He._createAfter(t.parent)),new xt(e,t)}getTrimmed(){let e=this.start.getLastMatchingPosition(_y);if(e.isAfter(this.end)||e.isEqual(this.end))return new xt(e,e);let t=this.end.getLastMatchingPosition(_y,{direction:"backward"});const n=e.nodeAfter,r=t.nodeBefore;return n&&n.is("$text")&&(e=new He(n,0)),r&&r.is("$text")&&(t=new He(r,r.data.length)),new xt(e,t)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),r=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&r}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new xt(this.start,e.start)),this.containsPosition(e.end)&&t.pu
36sh(new xt(e.end,this.end))):t.push(this.clone()),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,n=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(n=e.end),new xt(t,n)}return null}getWalker(e={}){return e.boundaries=this,new Ku(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let e=this.start.nodeAfter,t=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(e=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(t=this.end.parent.previousSibling),e&&e.is("element")&&e===t?e:null}clone(){return new xt(this.start,this.end)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Ku(e);for(const n of t)yield n.item}*getPositions(e={}){e.boundaries=this;const t=new Ku(e);yield t.position;for(const n of t)yield n.nextPosition}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}static _createFromParentsAndOffsets(e,t,n,r){return new this(new He(e,t),new He(n,r))}static _createFromPositionAndShift(e,t){const n=e,r=e.getShiftedBy(t);return t>0?new this(n,r):new this(r,n)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(He._createBefore(e),t)}}xt.prototype.is=function(i){return i==="range"||i==="view:range"};function _y(i){return!!(i.item.is("attributeElement")||i.item.is("uiElement"))}class Bo extends Sn(pd){_ranges;_lastRangeBackward;_isFake;_fakeSelectionLabel;constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return this.rangeCount===1&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)(!e||t.start.isBefore(e.start))&&(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)(!e||t.end.isAfter(e.end))&&(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake||this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel||this.rangeCount!=e.rangeCount)return!1;if(this.rangeCount===0)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let n=!1;for(const r of e._ranges)if(t.isEqual(r)){n=!0;break}if(!n)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=lS(this.getRanges()),n=lS(e.getRanges());if(t!=n)return!1;if(t==0)return!0;for(let r of this.getRanges()){r=r.getTrimmed();let s=!1;for(let o of e.getRanges())if(o=o.getTrimmed(),r.start.isEqual(o.start)&&r.end.isEqual(o.end)){s=!0;break}if(!s)return!1}return!0}getSelectedElement(){return this.rangeCount!==1?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,n,r]=e;if(typeof n=="object"&&(r=n,n=void 0),t===null)this._setRanges([]),this._setFakeOptions(r);else if(t instanceof Bo||t instanceof q3)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof xt)this._setRanges([t],r&&r.backward),this._setFakeOptions(r);else if(t instanceof He)this._setRanges([new xt(t)]),this._setFakeOptions(r);else if(t instanceof gd){const s=!!r&&!!r.backward;let o;if(n===void 0)throw new oe("view-selection-setto-required-second-parameter",this);n=="in"?o=xt._createIn(t):n=="on"?o=xt._createOn(t):o=new xt(He._createAt(t,n)),this._setRanges([o],s),this._setFakeOptions(r)}else if(Bs(t))this._setRanges(t,r&&r.backward),this._setFakeOptions(r);else throw new oe("view-selection-setto-not-selectable",this);this.fire("change")}setFocus(e,t){if(this.anchor===null)throw new oe("view-selection-setfocus-no-ranges",this);const n=He._createAt(e,t);if(n.compareWith(this.focus)=="same")return;const r=this.anchor;this._ranges.pop(),n.compareWith(r)=="before"?this._addRange(new xt(n,r),!0):this._addRange(new xt(r,n)),this.fire("change")}toJSON(){const e={ranges:Array.from(this.getRanges()).map(t=>t.toJSON())};return this.isBackward&&(e.isBackward=!0),this.isFake&&(e.isFake=!0),e}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const n of e)this._addRange(n);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof xt))throw new oe("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new oe("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new xt(e.start,e.end))}}Bo.prototype.is=function(i){return i==="selection"||i==="view:selection"};class q3 extends Sn(pd){_selection;constructor(...e){super(),this._selection=new Bo,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}toJSON(){return this._selection.toJSON()}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}q3.prototype.is=function(i){return i==="selection"||i=="documentSelection"||i=="view:selection"||i=="view:documentSelection"};class bd extends Il{startRange;_eventPhase;_currentTarget;constructor(e,t,n){super(e,t),this.startRange=n,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const AE=Symbol("bubblingEmitter"),kE=Symbol("bubblingCallbacks"),SE=Symbol("bubblingContexts");function r2e(i){class e extends i{fire(n,...r){try{const s=n instanceof Il?n:new Il(this,n),o=PE(this),a=oM(this);if(fp(s,"capturing",this),Cy(o,"$capture",s,...r))return s.return;const l=s.startRange||this.selection.getFirstRange(),c=l?l.getContainedElement():null,d=c?o2e(a,c):!1;let f=c||a2e(l);if(fp(s,"atTarget",f),!d){if(Cy(o,"$text",s,...r))return s.return;fp(s,"bubbling",f)}for(;f;){if(f.is("element")&&Cy(o,f,s,...r))return s.return;f=f.parent,fp(s,"bubbling",f)}return fp(s,"bubbling",this),Cy(o,"$document",s,...r),s.return}catch(s){oe.rethrowUnexpectedError(s,this)}}_addEventListener(n,r,s){const o=mn(s.context||"$document"),a=PE(this),l=sM(this);for(const d of o)typeof d=="function"&&oM(this).add(d);const c=s2e(this,o,r);l.set(r,c),this.listenTo(a,n,c,s)}_removeEventListener(n,r){const s=PE(this),o=sM(this),a=o.get(r);a&&(o.delete(r),this.stopListening(s,n,a))}}return e}function fp(i,e,t){i instanceof bd&&(i._eventPhase=e,i._currentTarget=t)}function Cy(i,e,t,...n){return i.fire(t,{currentTarget:e,eventArgs:n}),!!t.stop.called}function s2e(i,e,t){return function(n,r){const{currentTarget:s,eventArgs:o}=r;if(typeof s=="string"){e.includes(s)&&t.call(i,n,...o);return}if(s.is("rootElement")&&e.includes("$root")){t.call(i,n,...o);return}if(e.includes(s.name)){t.call(i,n,...o);return}for(const a of e)if(typeof a=="function"&&a(s)){t.call(i,n,...o);return}}}function PE(i){return i[AE]||(i[AE]=new(Sn())),i[AE]}function sM(i){return i[kE]||(i[kE]=new Map),i[kE]}function oM(i){return i[SE]||(i[SE]=new Set),i[SE]}function o2e(i,e){for(const t of i)if(t(e))return!0;return!1}function a2e(i){if(!i)return null;const e=i.start.parent,t=i.end.parent,n=e.getPath(),r=t.getPath();return n.length>r.length?e:t}class zG extends r2e(hn()){selection;roots;stylesProcessor;_postFixers=new Set;constructor(e){super(),this.selection=new q3,this.roots=new Jn({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}
36destroy(){this.roots.forEach(e=>e.destroy()),this.stopListening()}_callPostFixers(e){let t=!1;do for(const n of this._postFixers)if(t=n(e),t)break;while(t)}}const aM=10;class fh extends jo{static DEFAULT_PRIORITY=aM;_priority=aM;_id=null;_clonesGroup=null;constructor(e,t,n,r){super(e,t,n,r),this.getFillerOffset=l2e}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(this.id===null)throw new oe("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return this.id!==null||e.id!==null?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}toJSON(){const e=super.toJSON();return e.type="AttributeElement",e}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}_canMergeAttributesFrom(e){return this.id!==null||e.id!==null||this.priority!==e.priority?!1:super._canMergeAttributesFrom(e)}_canSubtractAttributesOf(e){return this.id!==null||e.id!==null||this.priority!==e.priority?!1:super._canSubtractAttributesOf(e)}}fh.prototype.is=function(i,e){return e?e===this.name&&(i==="attributeElement"||i==="view:attributeElement"||i==="element"||i==="view:element"):i==="attributeElement"||i==="view:attributeElement"||i==="element"||i==="view:element"||i==="node"||i==="view:node"};function l2e(){if(IE(this))return null;let i=this.parent;for(;i&&i.is("attributeElement");){if(IE(i)>1)return null;i=i.parent}return!i||IE(i)>1?null:this.childCount}function IE(i){return Array.from(i.getChildren()).filter(e=>!e.is("uiElement")).length}class $3 extends jo{constructor(e,t,n,r){super(e,t,n,r),this.getFillerOffset=c2e}toJSON(){const e=super.toJSON();return e.type="EmptyElement",e}_insertChild(e,t){if(t&&(t instanceof gd||Array.from(t).length>0))throw new oe("view-emptyelement-cannot-add",[this,t]);return 0}}$3.prototype.is=function(i,e){return e?e===this.name&&(i==="emptyElement"||i==="view:emptyElement"||i==="element"||i==="view:element"):i==="emptyElement"||i==="view:emptyElement"||i==="element"||i==="view:element"||i==="node"||i==="view:node"};function c2e(){return null}class __ extends jo{constructor(e,t,n,r){super(e,t,n,r),this.getFillerOffset=d2e}_insertChild(e,t){if(t&&(t instanceof gd||Array.from(t).length>0))throw new oe("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const n of this.getAttributeKeys())t.setAttribute(n,this.getAttribute(n));return t}toJSON(){const e=super.toJSON();return e.type="UIElement",e}}__.prototype.is=function(i,e){return e?e===this.name&&(i==="uiElement"||i==="view:uiElement"||i==="element"||i==="view:element"):i==="uiElement"||i==="view:uiElement"||i==="element"||i==="view:element"||i==="node"||i==="view:node"};function u2e(i){i.document.on("arrowKey",(e,t)=>f2e(e,t,i.domConverter),{priority:"low"})}function d2e(){return null}function f2e(i,e,t){if(e.keyCode==At.arrowright){const n=e.domTarget.ownerDocument.defaultView.getSelection(),r=n.rangeCount==1&&n.getRangeAt(0).collapsed;if(r||e.shiftKey){const s=n.focusNode,o=n.focusOffset,a=t.domPositionToView(s,o);if(a===null)return;let l=!1;const c=a.getLastMatchingPosition(d=>(d.item.is("uiElement")&&(l=!0),!!(d.item.is("uiElement")||d.item.is("attributeElement"))));if(l){const d=t.viewPositionToDom(c);r?n.collapse(d.parent,d.offset):n.extend(d.parent,d.offset)}}}}class G3 extends jo{constructor(e,t,n,r){super(e,t,n,r),this.getFillerOffset=h2e}toJSON(){const e=super.toJSON();return e.type="RawElement",e}_insertChild(e,t){if(t&&(t instanceof gd||Array.from(t).length>0))throw new oe("view-rawelement-cannot-add",[this,t]);return 0}render(e,t){}}G3.prototype.is=function(i,e){return e?e===this.name&&(i==="rawElement"||i==="view:rawElement"||i==="element"||i==="view:element"):i==="rawElement"||i==="view:rawElement"||i===this.name||i==="view:"+this.name||i==="element"||i==="view:element"||i==="node"||i==="view:node"};function h2e(){return null}class ed extends Sn(pd){document;_children=[];_customProperties=new Map;constructor(e,t){super(),this.document=e,t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return this.childCount===0}get root(){return this}get parent(){return null}get name(){}get getFillerOffset(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this,{index:e});let n=0;const r=m2e(this.document,t);for(const s of r)s.parent!==null&&s._remove(),s.parent=this,this._children.splice(e,0,s),e++,n++;return n}_removeChildren(e,t=1){this._fireChange("children",this,{index:e});for(let n=e;n<e+t;n++)this._children[n].parent=null;return this._children.splice(e,t)}_fireChange(e,t,n){this.fire(`change:${e}`,t,n)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}ed.prototype.is=function(i){return i==="documentFragment"||i==="view:documentFragment"};function m2e(i,e){return typeof e=="string"?[new Ii(i,e)]:(Bs(e)||(e=[e]),Array.from(e).map(t=>typeof t=="string"?new Ii(i,t):t instanceof hl?new Ii(i,t.data):t))}class WG{document;_cloneGroups=new Map;_slotFactory=null;constructor(e){this.document=e}setSelection(...e){this.document.selection._setTo(...e)}setSelectionFocus(e,t){this.document.selection._setFocus(e,t)}createDocumentFragment(e){return new ed(this.document,e)}createText(e){return new Ii(this.document,e)}createAttributeElement(e,t,n={}){const r=new fh(this.document,e,t);return typeof n.priority=="number"&&(r._priority=n.priority),n.id&&(r._id=n.id),n.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),r}createContainerElement(e,t,n={},r={}){let s;y2e(n)?r=n:s=n;const o=new Fg(this.document,e,t,s);return r.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...r.renderUnsafeAttributes),o}createEditableElement(e,t,n={}){const r=new x_(this.document,e,t);return n.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),r}createEmptyElement(e,t,n={}){const r=new $3(this.document,e,t);return n.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...n.renderUnsafeAttributes),r}createUIElement(e,t,n){const r=new __(this.document,e,t);return n&&(r.render=n),r}createRawElement(e,t,n,r={}){const s=new G3(this.document,e,t);return n&&(s.render=n),r.renderUnsafeAttributes&&s._unsafeAttributesToRender.push(...r.renderUnsafeAttributes),s}setAttribute(e,t,n,r){r!==void 0?r._setAttribute(e,t,n):n._setAttribute(e,t)}removeAttribute(e,t,n){n!==void 0?n._removeAttribute(e,t):t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,n){Po(e)&&n===void 0?t._setStyle(e):n._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,n){n._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof He?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new oe("view-writer-break-non-container-element",this.document);if(!t.parent)throw new oe("view-writer-break-root",this.document);if(e.isAtStart)return He._createBefore(t);if(!e.isAtEnd){const n=t._clone(!1);this.insert(He._createAfter(t),n);const r=new xt(e,He._createAt(t,"end")),s=new He(n,0);this.move(r,s)}return He._createAfter(t)}mergeAttributes(e){const t=e.offset,n=e.parent;if(n.is("$text"))return e;if(n.is("attributeElement")&&n.childCount===0){const o=n.parent,a=n.index;return n._remove(),this._removeFromClonedElementsGroup(n),this.mergeAttributes(new He(o,a))}const r=n.getChild(t-1),s=n.getChild(t);if(!r||!s)return e;if(r.is("$text")&&s.is("$text"))return cM(r,s);if(r.is("attributeElement")&&s.is("attributeElement")&&r.isSimilar(s)){const o=r.childCount;return r._appendChild(s.getChildren()),s._remove(),this._removeFromClonedElementsGroup(s),this.mergeAttributes(new He(r,o))}return e}mergeContainers(e){const t=e.nodeBefore,n=e.nodeAfter;if(!t||!n||!t.is("containerElement")||!n.is("containerElement"))throw new oe("view-writer-merge-containers-invalid-position",this.document);const r=t.getChild(t.childCount-1),s=r instanceof Ii?He._createAt(r,"end"):He._createAt(t,"end");return this.move(xt._createIn(n),He._createAt(t,"end")),this.remove(xt._createOn(n)),s}insert(e,t){t=Bs(t)?[...t]:[t],HG(t,this.document);const n=t.reduce((o,a)=>{const l=o[o.length-1],c=!a.is("uiElement");return!l||l.breakAttributes!=c?o.push({breakAttributes:c,nodes:[a]}):l.nodes.push(a),o},[]);let r=null,s=e;for(const{nodes:o,breakAttributes:a}of n){const l=this._insertNodes(s,o,a);r||(r=l.start),s=l.end}
36return r?new xt(r,s):new xt(e)}remove(e){const t=e instanceof xt?e:xt._createOn(e);if(hp(t,this.document),t.isCollapsed)return new ed(this.document);const{start:n,end:r}=this._breakAttributesRange(t,!0),s=n.parent,o=r.offset-n.offset,a=s._removeChildren(n.offset,o);for(const c of a)this._removeFromClonedElementsGroup(c);const l=this.mergeAttributes(n);return t.start=l,t.end=l.clone(),new ed(this.document,a)}clear(e,t){hp(e,this.document);const n=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const r of n){const s=r.item;let o;if(s.is("element")&&t.isSimilar(s))o=xt._createOn(s);else if(!r.nextPosition.isAfter(e.start)&&s.is("$textProxy")){const a=s.getAncestors().find(l=>l.is("element")&&t.isSimilar(l));a&&(o=xt._createIn(a))}o&&(o.end.isAfter(e.end)&&(o.end=e.end),o.start.isBefore(e.start)&&(o.start=e.start),this.remove(o))}}move(e,t){let n;if(t.isAfter(e.end)){t=this._breakAttributes(t,!0);const r=t.parent,s=r.childCount;e=this._breakAttributesRange(e,!0),n=this.remove(e),t.offset+=r.childCount-s}else n=this.remove(e);return this.insert(t,n)}wrap(e,t){if(!(t instanceof fh))throw new oe("view-writer-wrap-invalid-attribute",this.document);if(hp(e,this.document),e.isCollapsed){let n=e.start;n.parent.is("element")&&!p2e(n.parent)&&(n=n.getLastMatchingPosition(s=>s.item.is("uiElement"))),n=this._wrapPosition(n,t);const r=this.document.selection;return r.isCollapsed&&r.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new xt(n)}else return this._wrapRange(e,t)}unwrap(e,t){if(!(t instanceof fh))throw new oe("view-writer-unwrap-invalid-attribute",this.document);if(hp(e,this.document),e.isCollapsed)return e;const{start:n,end:r}=this._breakAttributesRange(e,!0),s=n.parent,o=this._unwrapChildren(s,n.offset,r.offset,t),a=this.mergeAttributes(o.start);a.isEqual(o.start)||o.end.offset--;const l=this.mergeAttributes(o.end);return new xt(a,l)}rename(e,t){const n=new Fg(this.document,e,t.getAttributes());return this.insert(He._createAfter(t),n),this.move(xt._createIn(t),He._createAt(n,0)),this.remove(xt._createOn(t)),n}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return He._createAt(e,t)}createPositionAfter(e){return He._createAfter(e)}createPositionBefore(e){return He._createBefore(e)}createRange(e,t){return new xt(e,t)}createRangeOn(e){return xt._createOn(e)}createRangeIn(e){return xt._createIn(e)}createSelection(...e){return new Bo(...e)}createSlot(e="children"){if(!this._slotFactory)throw new oe("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,n){let r;if(n?r=dS(e):r=e.parent.is("$text")?e.parent.parent:e.parent,!r)throw new oe("view-writer-invalid-position-container",this.document);let s;n?s=this._breakAttributes(e,!0):s=e.parent.is("$text")?RE(e):e;const o=r._insertChild(s.offset,t);for(const d of t)this._addToClonedElementsGroup(d);const a=s.getShiftedBy(o),l=this.mergeAttributes(s);l.isEqual(s)||a.offset--;const c=this.mergeAttributes(a);return new xt(l,c)}_wrapChildren(e,t,n,r){let s=t;const o=[];for(;s<n;){const l=e.getChild(s),c=l.is("$text"),d=l.is("attributeElement");if(d&&l._canMergeAttributesFrom(r))l._mergeAttributesFrom(r),o.push(new He(e,s));else if(c||!d||g2e(r,l)){const f=r._clone();l._remove(),f._appendChild(l),e._insertChild(s,f),this._addToClonedElementsGroup(f),o.push(new He(e,s))}else this._wrapChildren(l,0,l.childCount,r);s++}let a=0;for(const l of o){if(l.offset-=a,l.offset==t)continue;this.mergeAttributes(l).isEqual(l)||(a++,n--)}return xt._createFromParentsAndOffsets(e,t,e,n)}_unwrapChildren(e,t,n,r){let s=t;const o=[];for(;s<n;){const l=e.getChild(s);if(!l.is("attributeElement")){s++;continue}if(l.isSimilar(r)){const c=l.getChildren(),d=l.childCount;l._remove(),e._insertChild(s,c),this._removeFromClonedElementsGroup(l),o.push(new He(e,s),new He(e,s+d)),s+=d,n+=d-1;continue}if(l._canSubtractAttributesOf(r)){l._subtractAttributesOf(r),o.push(new He(e,s),new He(e,s+1)),s++;continue}this._unwrapChildren(l,0,l.childCount,r),s++}let a=0;for(const l of o){if(l.offset-=a,l.offset==t||l.offset==n)continue;this.mergeAttributes(l).isEqual(l)||(a++,n--)}return xt._createFromParentsAndOffsets(e,t,e,n)}_wrapRange(e,t){const{start:n,end:r}=this._breakAttributesRange(e,!0),s=n.parent,o=this._wrapChildren(s,n.offset,r.offset,t),a=this.mergeAttributes(o.start);a.isEqual(o.start)||o.end.offset--;const l=this.mergeAttributes(o.end);return new xt(a,l)}_wrapPosition(e,t){if(t.isSimilar(e.parent))return lM(e.clone());e.parent.is("$text")&&(e=RE(e));const n=this.createAttributeElement("_wrapPosition-fake-element");
36n._priority=Number.POSITIVE_INFINITY,n.isSimilar=()=>!1,e.parent._insertChild(e.offset,n);const r=new xt(e,e.getShiftedBy(1));this.wrap(r,t);const s=new He(n.parent,n.index);n._remove();const o=s.nodeBefore,a=s.nodeAfter;return o&&o.is("view:$text")&&a&&a.is("view:$text")?cM(o,a):lM(s)}_breakAttributesRange(e,t=!1){const n=e.start,r=e.end;if(hp(e,this.document),e.isCollapsed){const l=this._breakAttributes(e.start,t);return new xt(l,l)}const s=this._breakAttributes(r,t),o=s.parent.childCount,a=this._breakAttributes(n,t);return s.offset+=s.parent.childCount-o,new xt(a,s)}_breakAttributes(e,t=!1){const n=e.offset,r=e.parent;if(e.parent.is("emptyElement"))throw new oe("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new oe("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new oe("view-writer-cannot-break-raw-element",this.document);if(!t&&r.is("$text")&&fS(r.parent)||fS(r))return e.clone();if(r.is("$text"))return this._breakAttributes(RE(e),t);const s=r.childCount;if(n==s){const o=new He(r.parent,r.index+1);return this._breakAttributes(o,t)}else if(n===0){const o=new He(r.parent,r.index);return this._breakAttributes(o,t)}else{const o=r.index+1,a=r._clone();r.parent._insertChild(o,a),this._addToClonedElementsGroup(a);const l=r.childCount-n,c=r._removeChildren(n,l);a._appendChild(c);const d=new He(r.parent,o);return this._breakAttributes(d,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const r of e.getChildren())this._addToClonedElementsGroup(r);const t=e.id;if(!t)return;let n=this._cloneGroups.get(t);n||(n=new Set,this._cloneGroups.set(t,n)),n.add(e),e._clonesGroup=n}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const r of e.getChildren())this._removeFromClonedElementsGroup(r);const t=e.id;if(!t)return;const n=this._cloneGroups.get(t);n&&n.delete(e)}}function p2e(i){return Array.from(i.getChildren()).some(e=>!e.is("uiElement"))}function dS(i){let e=i.parent;for(;!fS(e);){if(!e)return;e=e.parent}return e}function g2e(i,e){return i.priority<e.priority?!0:i.priority>e.priority?!1:i.getIdentity()<e.getIdentity()}function lM(i){const e=i.nodeBefore;if(e&&e.is("$text"))return new He(e,e.data.length);const t=i.nodeAfter;return t&&t.is("$text")?new He(t,0):i}function RE(i){if(i.offset==i.parent.data.length)return new He(i.parent.parent,i.parent.index+1);if(i.offset===0)return new He(i.parent.parent,i.parent.index);const e=i.parent.data.slice(i.offset);return i.parent._data=i.parent.data.slice(0,i.offset),i.parent.parent._insertChild(i.parent.index+1,new Ii(i.root.document,e)),new He(i.parent.parent,i.parent.index+1)}function cM(i,e){const t=i.data.length;return i._data+=e.data,e._remove(),new He(i,t)}const b2e=[Ii,fh,Fg,$3,G3,__];function HG(i,e){for(const t of i){if(!b2e.some(n=>t instanceof n))throw new oe("view-writer-insert-invalid-node-type",e);t.is("$text")||HG(t.getChildren(),e)}}function fS(i){return i&&(i.is("containerElement")||i.is("documentFragment"))}function hp(i,e){const t=dS(i.start),n=dS(i.end);if(!t||!n||t!==n)throw new oe("view-writer-invalid-range-container",e)}function y2e(i){return Po(i)}const qG=i=>i.createTextNode(" "),$G=i=>{const e=i.createElement("span");return e.dataset.ckeFiller="true",e.innerText=" ",e},GG=i=>{const e=i.createElement("br");return e.dataset.ckeFiller="true",e},Ps=7,Og="⁠".repeat(Ps);function Ar(i){return typeof i=="string"?i.substr(0,Ps)===Og:Hn(i)&&i.data.substr(0,Ps)===Og}function nh(i){return i.data.length==Ps&&Ar(i)}function uM(i){const e=typeof i=="string"?i:i.data;return Ar(i)?e.slice(Ps):e}function v2e(i){i.document.on("arrowKey",w2e,{priority:"low"})}function w2e(i,e){if(e.keyCode==At.arrowleft){const t=e.domTarget.ownerDocument.defaultView.getSelection();if(t.rangeCount==1&&t.getRangeAt(0).collapsed){const n=t.getRangeAt(0).startContainer,r=t.getRangeAt(0).startOffset;Ar(n)&&r<=Ps&&t.collapse(n,0)}}}class x2e extends hn(){domDocuments=new Set;domConverter;markedAttributes=new Set;markedChildren=new Set;markedTexts=new Set;selection;_inlineFiller=null;_fakeSelectionContainer=null;constructor(e,t){super(),this.domConverter=e,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1),ot.isBlink&&!ot.isAndroid&&this.on("change:isSelecting",()=>{this.isSelecting||this.render()})}markToSync(e,t){if(e==="text")this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if(e==="attributes")this.markedAttributes.add(t);else if(e==="children")this.markedChildren.add(t);else throw new oe("view-renderer-unknown-type",this)}}
vendor: 4,282 bytes, line 36
36render(){if(this.isComposing&&!ot.isAndroid)return;let e=null;const t=ot.isBlink&&!ot.isAndroid?!this.isSelecting:!0;for(const n of this.markedChildren)this._updateChildrenMappings(n);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=He._createBefore(e.parent)));for(const n of this.markedAttributes)this._updateAttrs(n);for(const n of this.markedChildren)this._updateChildren(n,{inlineFillerPosition:e});for(const n of this.markedTexts)!this.markedChildren.has(n.parent)&&this.domConverter.mapViewToDom(n.parent)&&this._updateText(n,{inlineFillerPosition:e});if(t)if(e){const n=this.domConverter.viewPositionToDom(e),r=n.parent.ownerDocument;Ar(n.parent)?this._inlineFiller=n.parent:this._inlineFiller=dM(r,n.parent,n.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.domConverter._clearTemporaryCustomProperties(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const n=Array.from(t.childNodes),r=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),s=this._diffNodeLists(n,r),o=this._findUpdateActions(s,n,r,C2e);if(o.indexOf("update")!==-1){const a={equal:0,insert:0,delete:0};for(const l of o)if(l==="update"){const c=a.equal+a.insert,d=a.equal+a.delete,f=e.getChild(c);f&&!f.is("uiElement")&&!f.is("rawElement")&&this._updateElementMappings(f,n[d]),GB(r[c]),a.equal++}else a[l]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?He._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(this.selection.rangeCount!=1||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&Hn(t.parent)&&Ar(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!Ar(e))throw new oe("view-renderer-filler-was-lost",this);nh(e)?e.remove():e.data=e.data.substr(Ps),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(this.selection.rangeCount!=1||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,n=e.offset;if(!this.domConverter.mapViewToDom(t.root)||!t.is("element")||!_2e(t))return!1;const r=e.nodeBefore,s=e.nodeAfter;return!(r instanceof Ii||s instanceof Ii||n===t.getFillerOffset()&&(!r||!r.is("element","br"))||ot.isAndroid&&(r||s))}_updateText(e,t){const n=this.domConverter.findCorrespondingDomText(e);let s=this.domConverter.viewToDom(e).data;const o=t.inlineFillerPosition;o&&o.parent==e.parent&&o.offset==e.index&&(s=Og+s),this._updateTextNode(n,s)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(t){for(const n of Array.from(t.attributes)){const r=n.name;e.hasAttribute(r)||this.domConverter.removeDomElementAttribute(t,r)}for(const n of e.getAttributeKeys())this.domConverter.setDomElementAttribute(t,n,e.getAttribute(n),e)}}_updateChildren(e,t){const n=this.domConverter.mapViewToDom(e);if(!n)return;if(ot.isAndroid){let f=null;for(const m of Array.from(n.childNodes)){if(f&&Hn(f)&&Hn(m)){n.normalize();break}f=m}}const r=t.inlineFillerPosition,s=n.childNodes,o=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));r&&r.parent===e&&dM(n.ownerDocument,o,r.offset);const a=this._diffNodeLists(s,o),l=this._findUpdateActions(a,s,o,D2e);let c=0;const d=new Set;for(const f of l)f==="delete"?(d.add(s[c]),GB(s[c])):(f==="equal"||f==="update")&&c++;c=0;for(const f of l)f==="insert"?(SG(n,c,o[c]),c++):f==="update"?(this._updateTextNode(s[c],o[c].data),c++):f==="equal"&&(this._markDescendantTextToSync(this.domConverter.domToView(o[c])),c++);for(const f of d)f.parentNode||this.domConverter.unbindDomElement(f)}_diffNodeLists(e,t){return e=A2e(e,this._fakeSelectionContainer),uh(e,t,E2e.bind(null,this.domConverter))}
36_findUpdateActions(e,t,n,r){if(e.indexOf("insert")===-1||e.indexOf("delete")===-1)return e;let s=[],o=[],a=[];const l={equal:0,insert:0,delete:0};for(const c of e)c==="insert"?a.push(n[l.equal+l.insert]):c==="delete"?o.push(t[l.equal+l.delete]):(s=s.concat(uh(o,a,r).map(d=>d==="equal"?"update":d)),s.push("equal"),o=[],a=[]),l[c]++;return s.concat(uh(o,a,r).map(c=>c==="equal"?"update":c))}_updateTextNode(e,t){const n=e.data;n!=t&&(ot.isAndroid&&this.isComposing&&n.replace(/\u00A0/g," ")==t.replace(/\u00A0/g," ")||this._updateTextNodeInternal(e,t))}_updateTextNodeInternal(e,t){const n=mG(e.data,t);for(const r of n)r.type==="insert"?e.insertData(r.index,r.values.join("")):e.deleteData(r.index,r.howMany)}_markDescendantTextToSync(e){if(e){if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}}_updateSelection(){if(ot.isBlink&&!ot.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(this.selection.rangeCount===0){this._removeDomSelection(),this._removeFakeSelection();return}const e=this.domConverter.mapViewToDom(this.selection.editableElement);if(!this.isFocused||!e){!this.selection.isFake&&this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected&&this._removeFakeSelection();return}this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&ot.isAndroid||this._updateDomSelection(e)}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=k2e(t));const n=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(n,this.selection),!this._fakeSelectionNeedsUpdate(e))return;(!n.parentElement||n.parentElement!=e)&&e.appendChild(n),n.textContent=this.selection.fakeSelectionLabel||" ";const r=t.getSelection(),s=t.createRange();r.removeAllRanges(),s.selectNodeContents(n),r.addRange(s)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const n=this.domConverter.viewPositionToDom(this.selection.anchor),r=this.domConverter.viewPositionToDom(this.selection.focus);t.setBaseAndExtent(n.parent,n.offset,r.parent,r.offset),ot.isGecko&&T2e(r,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return!(t&&this.selection.isEqual(t)||!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,n=e.ownerDocument.getSelection();return!t||t.parentElement!==e||n.anchorNode!==t&&!t.contains(n.anchorNode)?!0:t.textContent!==this.selection.fakeSelectionLabel}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const n=e.activeElement,r=this.domConverter.mapDomToView(n);n&&r&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function _2e(i){if(i.getAttribute("contenteditable")=="false")return!1;const e=i.findAncestor(t=>t.hasAttribute("contenteditable"));return!e||e.getAttribute("contenteditable")=="true"}function dM(i,e,t){const n=e instanceof Array?e:e.childNodes,r=n[t];if(Hn(r))return r.data=Og+r.data,r;{const s=i.createTextNode(Og);return Array.isArray(e)?n.splice(t,0,s):SG(e,t,s),s}}function C2e(i,e){return Vc(i)&&Vc(e)&&!Hn(i)&&!Hn(e)&&!tg(i)&&!tg(e)&&i.tagName.toLowerCase()===e.tagName.toLowerCase()}function D2e(i,e){return Vc(i)&&Vc(e)&&Hn(i)&&Hn(e)}function E2e(i,e,t){return e===t?!0:Hn(e)&&Hn(t)?e.data===t.data:!!(i.isBlockFiller(e)&&i.isBlockFiller(t))}function T2e(i,e){let t=i.parent,n=i.offset;if(Hn(t)&&nh(t)&&(n=th(t)+1,t=t.parentNode),t.nodeType!=Node.ELEMENT_NODE||n!=t.childNodes.length-1)return;const r=t.childNodes[n];r&&r.tagName=="BR"&&e.addRange(e.getRangeAt(0))}function A2e(i,e){const t=Array.from(i);return t.length==0||!e||t[t.length-1]==e&&t.pop(),t}function k2e(i){const e=i.createElement("div");
36return e.className="ck-fake-selection-container",Object.assign(e.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),e.textContent=" ",e}const S2e=GG($e.document),P2e=qG($e.document),I2e=$G($e.document),Dy="data-ck-unsafe-attribute-",fM="data-ck-unsafe-element";class YG{document;renderingMode;blockFillerMode;preElements;blockElements;inlineObjectElements;unsafeElements;_domDocument;_domToViewMapping=new WeakMap;_viewToDomMapping=new WeakMap;_fakeSelectionMapping=new WeakMap;_rawContentElementMatcher=new Rl;_inlineObjectElementMatcher=new Rl;_elementsWithTemporaryCustomProperties=new Set;constructor(e,{blockFillerMode:t,renderingMode:n="editing"}={}){this.document=e,this.renderingMode=n,this.blockFillerMode=t||(n==="editing"?"br":"nbsp"),this.preElements=["pre","textarea"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument=this.renderingMode==="editing"?$e.document:$e.document.implementation.createHTMLDocument("")}get domDocument(){return this._domDocument}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new Bo(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const n of e.children)this.unbindDomElement(n)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,n){return this.renderingMode==="data"?!0:(e=e.toLowerCase(),e.startsWith("on")||e==="srcdoc"&&t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i)?!1:n==="img"&&(e==="src"||e==="srcset")||n==="source"&&e==="srcset"?!0:!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))}setContentOf(e,t){if(this.renderingMode==="data"){e.innerHTML=t;return}const n=new DOMParser().parseFromString(t,"text/html"),r=n.createDocumentFragment(),s=n.body.childNodes;for(;s.length>0;)r.appendChild(s[0]);const o=n.createTreeWalker(r,NodeFilter.SHOW_ELEMENT),a=[];let l;for(;l=o.nextNode();)a.push(l);for(const c of a){for(const f of c.getAttributeNames())this.setDomElementAttribute(c,f,c.getAttribute(f));const d=c.tagName.toLowerCase();this._shouldRenameElement(d)&&(gM(d),c.replaceWith(this._createReplacementDomElement(d,c)))}for(;e.firstChild;)e.firstChild.remove();e.append(r)}viewToDom(e,t={}){if(e.is("$text")){const n=this._processDataFromViewText(e);return this._domDocument.createTextNode(n)}else{const n=e;if(this.mapViewToDom(n))if(n.getCustomProperty("editingPipeline:doNotReuseOnce"))this._elementsWithTemporaryCustomProperties.add(n);else return this.mapViewToDom(n);let r;if(n.is("documentFragment"))r=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(r,n);else{if(n.is("uiElement"))return n.name==="$comment"?r=this._domDocument.createComment(n.getCustomProperty("$rawContent")):r=n.render(this._domDocument,this),t.bind&&this.bindElements(r,n),r;this._shouldRenameElement(n.name)?(gM(n.name),r=this._createReplacementDomElement(n.name)):n.hasAttribute("xmlns")?r=this._domDocument.createElementNS(n.getAttribute("xmlns"),n.name):r=this._domDocument.createElement(n.name),n.is("rawElement")&&n.render(r,this),t.bind&&this.bindElements(r,n);for(const s of n.getAttributeKeys())this.setDomElementAttribute(r,s,n.getAttribute(s),n)}if(t.withChildren!==!1)for(const s of this.viewChildrenToDom(n,t))r instanceof HTMLTemplateElement?r.content.appendChild(s):r.appendChild(s);return r}}setDomElementAttribute(e,t,n,r){const s=this.shouldRenderAttribute(t,n,e.tagName.toLowerCase())||r&&r.shouldRenderUnsafeAttribute(t);if(s||Kt("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:n}),!PG(t)){Kt("domconverter-invalid-attribute-detected",{domElement:e,key:t,value:n});return}e.hasAttribute(t)&&!s?e.removeAttribute(t):e.hasAttribute(Dy+t)&&s&&e.removeAttribute(Dy+t),e.setAttribute(s?t:Dy+t,n)}removeDomElementAttribute(e,t){t!=fM&&(e.removeAttribute(t),e.removeAttribute(Dy+t))}*viewChildrenToDom(e,t={}){const n=e.getFillerOffset&&e.getFillerOffset();let r=0;for(const s of e.getChildren()){n===r&&(yield this._getBlockFiller());const o=s.is("element")&&!!s.getCustomProperty("dataPipeline:transparentRendering")&&!Rn(s.getAttributes());if(o&&this.renderingMode=="data")if(s.is("rawElement")){const a=this._domDocument.createElement(s.name);s.render(a,this),yield*[...a.childNodes]}else yield*this.viewChildrenToDom(s,t);else o&&Kt("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:s}),yield this.viewToDom(s,t);r++}n===r&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),n=this.viewPositionToDom(e.end),r=this._domDocument.createRange();return r.setStart(t.parent,t.offset),r.setEnd(n.parent,n.offset),r}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const n=this.findCorrespondingDomText(t);if(!n)return null;let r=e.offset;return Ar(n)&&(r+=Ps),n.data&&r>n.data.length&&(r=n.data.length),{parent:n,offset:r}}else{let n,r,s;if(e.offset===0){if(n=this.mapViewToDom(t),!n)return null;s=n.childNodes[0]}else{const a=e.nodeBefore;if(r=a.is("$text")?this.findCorrespondingDomText(a):this.mapViewToDom(a),!r)return null;n=r.parentNode,s=r.nextSibling}if(Hn(s)&&Ar(s))return{parent:s,offset:Ps};const o=r?th(r)+1:0;return{parent:n,offset:o}}}domToView(e,t={}){const n=[],r=this._domToView(e,t,n),s=r.next().value;return!s||(r.next(),this._processDomInlineNodes(null,n,t),this.blockFillerMode=="br"&&mM(s))||s.is("$text")&&s.data.length==0?null:s}*domChildrenToView(e,t={},n=[]){let r=[];e instanceof HTMLTemplateElement?r=[...e.content.childNodes]:r=[...e.childNodes];for(let s=0;s<r.length;s++){const o=r[s],a=this._domToView(o,t,n),l=a.next().value;l!==null&&(this._isBlockViewElement(l)&&this._processDomInlineNodes(e,n,t),this.blockFillerMode=="br"&&mM(l)||(yield l),a.next())}this._processDomInlineNodes(e,n,t)}domSelectionToView(e){if(B2e(e))return new Bo([]);if(e.rangeCount===1){let r=e.getRangeAt(0).startContainer;Hn(r)&&(r=r.parentNode);const s=this.fakeSelectionToView(r);if(s)return s}const t=this.isDomSelectionBackward(e),n=[];for(let r=0;r<e.rangeCount;r++){const s=e.getRangeAt(r),o=this.domRangeToView(s);o&&n.push(o)}return new Bo(n,{backward:t})}domRangeToView(e){const t=this.domPositionToView(e.startContainer,e.startOffset),n=this.domPositionToView(e.endContainer,e.endOffset);return t&&n?new xt(t,n):null}domPositionToView(e,t=0){if(this.isBlockFiller(e))return this.domPositionToView(e.parentNode,th(e));const n=this.mapDomToView(e);if(n&&(n.is("uiElement")||n.is("rawElement")))return He._createBefore(n);
36if(Hn(e)){if(nh(e))return this.domPositionToView(e.parentNode,th(e));const r=this.findCorrespondingViewText(e);let s=t;return r?(Ar(e)&&(s-=Ps,s=s<0?0:s),new He(r,s)):null}else{if(t===0){const r=this.mapDomToView(e);if(r)return new He(r,0)}else{const r=e.childNodes[t-1];if(Hn(r)&&nh(r)||r&&this.isBlockFiller(r))return this.domPositionToView(r.parentNode,th(r));const s=Hn(r)?this.findCorrespondingViewText(r):this.mapDomToView(r);if(s&&s.parent)return new He(s.parent,s.index+1)}return null}}mapDomToView(e){return this.getHostViewElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(nh(e))return null;const t=this.getHostViewElement(e);if(t)return t;const n=e.previousSibling;if(n){if(!this.isElement(n))return null;const r=this.mapDomToView(n);if(r){const s=r.nextSibling;return s instanceof Ii?s:null}}else{const r=this.mapDomToView(e.parentNode);if(r){const s=r.getChild(0);return s instanceof Ii?s:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(!t||t.ownerDocument.activeElement===t)return;const{scrollX:n,scrollY:r}=$e.window,s=[];hM(t,o=>{const{scrollLeft:a,scrollTop:l}=o;s.push([a,l])}),t.focus({preventScroll:!0}),hM(t,o=>{const[a,l]=s.shift();o.scrollLeft=a,o.scrollTop=l}),$e.window.scrollTo(n,r)}_clearDomSelection(){const e=this.mapViewToDom(this.document.selection.editableElement);if(!e)return;const t=e.ownerDocument.defaultView.getSelection(),n=this.domSelectionToView(t);n&&n.rangeCount>0&&t.removeAllRanges()}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return this.blockFillerMode=="br"?e.isEqualNode(S2e):pM(e,this.blockElements)?!0:e.isEqualNode(I2e)||F2e(e,this.blockElements)}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch{return!1}const n=t.collapsed;return t.detach(),n}getHostViewElement(e){const t=s_e(e);for(t.pop();t.length;){const n=t.pop(),r=this._domToViewMapping.get(n);if(r&&(r.is("uiElement")||r.is("rawElement")))return r}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}registerInlineObjectMatcher(e){this._inlineObjectElementMatcher.add(e)}_clearTemporaryCustomProperties(){for(const e of this._elementsWithTemporaryCustomProperties)e._removeCustomProperty("editingPipeline:doNotReuseOnce");this._elementsWithTemporaryCustomProperties.clear()}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return qG(this._domDocument);case"markedNbsp":return $G(this._domDocument);case"br":return GG(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if(Hn(e)&&Ar(e)&&t<Ps||this.isElement(e)&&Ar(e.childNodes[t]))return!1;const n=this.mapDomToView(e);return!(n&&(n.is("uiElement")||n.is("rawElement")))}*_domToView(e,t,n){if(this.blockFillerMode!="br"&&pM(e,this.blockElements))return null;const r=this.getHostViewElement(e);if(r)return r;if(tg(e)&&t.skipComments)return null;if(Hn(e)){if(nh(e))return null;{const s=e.data;if(s==="")return null;const o=new Ii(this.document,s);return n.push(o),o}}else{let s=this.mapDomToView(e);if(s)return this._isInlineObjectElement(s)&&n.push(s),s;if(this.isDocumentFragment(e))s=new ed(this.document),t.bind&&this.bindDocumentFragments(e,s);else{s=this._createViewElement(e,t),t.bind&&this.bindElements(e,s);const a=e.attributes;if(a)for(let l=a.length,c=0;c<l;c++)s._setAttribute(a[c].name,a[c].value);if(this._isViewElementWithRawContent(s,t))return s._setCustomProperty("$rawContent",e.innerHTML),this._isBlockViewElement(s)||n.push(s),s;if(tg(e))return s._setCustomProperty("$rawContent",e.data),s}yield s;const o=[];if(t.withChildren!==!1)for(const a of this.domChildrenToView(e,t,o))s._appendChild(a);if(this._isInlineObjectElement(s))n.push(s),this._processDomInlineNodes(null,o,t);else for(const a of o)n.push(a)}}_processDomInlineNodes(e,t,n){if(!t.length||e&&!this.isDocumentFragment(e)&&!this._isBlockDomElement(e))return;let r=!1;for(let s=0;s<t.length;s++){const o=t[s];if(!o.is("$text")){r=!1;continue}let a,l=!1;if(this._isPreFormatted(o))a=uM(o.data);
36else{a=o.data.replace(/[ \n\t\r]{1,}/g," "),l=/[^\S\u00A0]/.test(a.charAt(a.length-1));const c=s>0?t[s-1]:null,d=s+1<t.length?t[s+1]:null,f=!c||c.is("element")&&c.name=="br"||r,m=d?!1:!Ar(o.data);n.withChildren!==!1&&(f&&(a=a.replace(/^ /,"")),m&&(a=a.replace(/ $/,""))),a=uM(a),this.blockFillerMode!="br"&&o.parent&&(N2e(o.parent,a)?(a="",o.parent.parent&&(o.parent.parent._setCustomProperty("$hasBlockFiller",!0),o.parent._remove())):O2e(o.parent,a,this.blockElements)&&(a="",o.parent._setCustomProperty("$hasBlockFiller",!0))),a=a.replace(/ \u00A0/g,"  ");const p=d&&d.is("element")&&d.name!="br",g=d&&d.is("$text")&&d.data.charAt(0)==" ";(/[ \u00A0]\u00A0$/.test(a)||!d||p||g)&&(a=a.replace(/\u00A0$/," ")),(f||c&&c.is("element")&&c.name!="br")&&(a=a.replace(/^\u00A0/," "))}a.length==0&&o.parent?(o._remove(),t.splice(s,1),s--):(o._data=a,r=l)}t.length=0}_processDataFromViewText(e){let t=e.data;if(this._isPreFormatted(e))return t;if(t.charAt(0)==" "){const n=this._getTouchingInlineViewNode(e,!1);(n&&n.is("$textProxy")&&this._nodeEndsWithSpace(n)||!n)&&(t=" "+t.substr(1))}if(t.charAt(t.length-1)==" "){const n=this._getTouchingInlineViewNode(e,!0),r=n&&n.is("$textProxy")&&n.data.charAt(0)==" ";(t.charAt(t.length-2)==" "||!n||r)&&(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(this._isPreFormatted(e))return!1;const t=this._processDataFromViewText(e);return t.charAt(t.length-1)==" "}_isPreFormatted(e){if(R2e(e,this.preElements))return!0;for(const t of e.getAncestors({parentFirst:!0}))if(!(!t.is("element")||!t.hasStyle("white-space")||t.getStyle("white-space")==="inherit"))return["pre","pre-wrap","break-spaces"].includes(t.getStyle("white-space"));return!1}_getTouchingInlineViewNode(e,t){const n=new Ku({startPosition:t?He._createAfter(e):He._createBefore(e),direction:t?"forward":"backward"});for(const{item:r}of n){if(r.is("$textProxy"))return r;if(r.is("element")&&r.getCustomProperty("dataPipeline:transparentRendering"))continue;if(r.is("element","br"))return null;if(this._isInlineObjectElement(r))return r;if(r.is("containerElement")||this._isBlockViewElement(r))return null}return null}_isBlockDomElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isBlockViewElement(e){return e.is("element")&&this.blockElements.includes(e.name)}_isInlineObjectElement(e){return e.is("element")?e.name=="br"||this.inlineObjectElements.includes(e.name)||!!this._inlineObjectElementMatcher.match(e):!1}_createViewElement(e,t){if(tg(e))return new __(this.document,"$comment");const n=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new jo(this.document,n)}_isViewElementWithRawContent(e,t){return t.withChildren!==!1&&e.is("element")&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return this.renderingMode==="editing"&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const n=this._domDocument.createElement("span");if(n.setAttribute(fM,e),t){for(;t.firstChild;)n.appendChild(t.firstChild);for(const r of t.getAttributeNames())n.setAttribute(r,t.getAttribute(r))}return n}}function R2e(i,e){return i.getAncestors().some(t=>t.is("element")&&e.includes(t.name))}function hM(i,e){let t=i;for(;t;)e(t),t=t.parentElement}function F2e(i,e){return i.isEqualNode(P2e)&&KG(i,e)&&i.parentNode.childNodes.length===1}function KG(i,e){const t=i.parentNode;return!!t&&!!t.tagName&&e.includes(t.tagName.toLowerCase())}function O2e(i,e,t){return e==" "&&i&&i.is("element")&&i.childCount==1&&t.includes(i.name)}function N2e(i,e){return e==" "&&i&&i.is("element","span")&&i.childCount==1&&i.hasAttribute("data-cke-filler")}function mM(i){return i.is("element","br")&&i.hasAttribute("data-cke-filler")}function pM(i,e){return i.tagName==="BR"&&KG(i,e)&&i.parentNode.childNodes.length===1}function gM(i){i==="script"&&Kt("domconverter-unsafe-script-element-detected"),i==="style"&&Kt("domconverter-unsafe-style-element-detected")}function B2e(i){if(!ot.isGecko||!i.rangeCount)return!1;const e=i.getRangeAt(0).startContainer;try{Object.prototype.toString.call(e)}catch{return!0}return!1}class Oa extends ds(){view;document;_isEnabled=!1;constructor(e){super(),this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&e.nodeType===3&&(e=e.parentNode),!e||e.nodeType!==1?!1:e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}class cd{view;document;domEvent;domTarget;constructor(e,t,n){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,dG(this,n)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class $o extends Oa{useCapture=!1;usePassive=!1;observe(e){(typeof this.domEventType=="string"?[this.domEventType]:this.domEventType).forEach(n=>{this.listenTo(e,n,(r,s)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(s.target)&&this.onDomEvent(s)},{useCapture:this.useCapture,usePassive:this.usePassive})})}stopObserving(e){this.stopListening(e)}fire(e,t,n){this.isEnabled&&this.document.fire(e,new cd(this.view,t,n))}}class M2e extends $o{domEventType=["keydown","keyup"];onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return ld(this)}};this.fire(e.type,e,t)}}class L2e extends Oa{_fireSelectionChangeDoneDebounced;constructor(e){super(e),this._fireSelectionChangeDoneDebounced=fo(t=>{this.document.fire("selectionChangeDone",t)},200)}observe(){const e=this.document;e.on("arrowKey",(t,n)=>{e.selection.isFake&&this.isEnabled&&n.preventDefault()},{context:"$capture"}),e.on("arrowKey",(t,n)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(n.keyCode)},{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,n=new Bo(t.getRanges(),{backward:t.isBackward,fake:!1});(e==At.arrowleft||e==At.arrowup)&&n.setTo(n.getFirstPosition()),(e==At.arrowright||e==At.arrowdown)&&n.setTo(n.getLastPosition());const r={oldSelection:t,newSelection:n,domSelection:null};this.document.fire("selectionChange",r),this._fireSelectionChangeDoneDebounced(r)}}let XG=class extends Oa{domConverter;_config;_domElements;_mutationObserver;constructor(e){super(e),this._config={childList:!0,characterData:!0,subtree:!0},this.domConverter=e.domConverter,this._domElements=new Set,this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.add(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}stopObserving(e){if(this._domElements.delete(e),this.isEnabled){this._mutationObserver.disconnect();for(const t of this._domElements)this._mutationObserver.observe(t,this._config)}}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(e.length===0)return;const t=this.domConverter,n=new Set,r=new Set;for(const o of e){const a=t.mapDomToView(o.target);a&&(a.is("uiElement")||a.is("rawElement")||o.type==="childList"&&!this._isBogusBrMutation(o)&&r.add(a))}for(const o of e){const a=t.mapDomToView(o.target);if(!(a&&(a.is("uiElement")||a.is("rawElement")))&&o.type==="characterData"){const l=t.findCorrespondingViewText(o.target);l&&!r.has(l.parent)?n.add(l):!l&&Ar(o.target)&&r.add(t.mapDomToView(o.target.parentNode))}}const s=[];for(const o of n)s.push({type:"text",node:o});for(const o of r){const a=t.mapViewToDom(o),l=Array.from(o.getChildren()),c=Array.from(t.domChildrenToView(a,{withChildren:!1}));sS(l,c,U2e)||s.push({type:"children",node:o})}s.length&&this.document.fire("mutations",{mutations:s})}_isBogusBrMutation(e){let t=null;return e.nextSibling===null&&e.removedNodes.length===0&&e.addedNodes.length==1&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}};function U2e(i,e){if(!Array.isArray(i))return i===e?!0:i.is("$text")&&e.is("$text")?i.data===e.data:!1}class Yw extends $o{_renderTimeoutId=null;_isFocusChanging=!1;
36domEventType=["focus","blur"];constructor(e){super(e),this.useCapture=!0;const t=this.document;t.on("focus",()=>this._handleFocus()),t.on("blur",(n,r)=>this._handleBlur(r)),t.on("beforeinput",()=>{t.isFocused||this._handleFocus()},{priority:"highest"})}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._clearTimeout(),super.destroy()}_handleFocus(){this._clearTimeout(),this._isFocusChanging=!0,this._renderTimeoutId=setTimeout(()=>{this._renderTimeoutId=null,this.flush(),this.view.change(()=>{})},50)}_handleBlur(e){const t=this.document.selection.editableElement;(t===null||t===e.target)&&(this.document.isFocused=!1,this._isFocusChanging=!1,this.view.change(()=>{}))}_clearTimeout(){this._renderTimeoutId&&(clearTimeout(this._renderTimeoutId),this._renderTimeoutId=null)}}class V2e extends Oa{mutationObserver;focusObserver;selection;domConverter;_documents=new WeakSet;_fireSelectionChangeDoneDebounced;_clearInfiniteLoopInterval;_documentIsSelectingInactivityTimeoutDebounced;_loopbackCounter=0;_pendingSelectionChange=new Set;constructor(e){super(e),this.mutationObserver=e.getObserver(XG),this.focusObserver=e.getObserver(Yw),this.selection=this.document.selection,this.domConverter=e.domConverter,this._fireSelectionChangeDoneDebounced=fo(t=>{this.document.fire("selectionChangeDone",t)},200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._documentIsSelectingInactivityTimeoutDebounced=fo(()=>this.document.isSelecting=!1,5e3),this.view.document.on("change:isFocused",(t,n,r)=>{if(r&&this._pendingSelectionChange.size){for(const s of Array.from(this._pendingSelectionChange))this._handleSelectionChange(s);this._pendingSelectionChange.clear()}})}observe(e){const t=e.ownerDocument,n=()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()},r=()=>{this.document.isSelecting&&(this._handleSelectionChange(t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",n,{priority:"highest"}),this.listenTo(e,"keydown",r,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",r,{priority:"highest",useCapture:!0}),!this._documents.has(t)&&(this.listenTo(t,"mouseup",r,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",()=>{this.document.isComposing&&!ot.isAndroid||(this._handleSelectionChange(t),this._documentIsSelectingInactivityTimeoutDebounced())}),this.listenTo(this.view.document,"compositionstart",()=>{this._handleSelectionChange(t)},{priority:"lowest"}),this._documents.add(t))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e){if(!this.isEnabled)return;const t=e.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(t.anchorNode))return;this.mutationObserver.flush();const n=this.domConverter.domSelectionToView(t);if(n.rangeCount==0){this.view.hasDomSelection=!1;return}if(this.view.hasDomSelection=!0,this.focusObserver.flush(),!this.view.document.isFocused&&!this.view.document.isReadOnly){this._pendingSelectionChange.add(e);return}if(this._pendingSelectionChange.delete(e),!(this.selection.isEqual(n)&&this.domConverter.isDomSelectionCorrect(t))){if(++this._loopbackCounter>60){this._reportInfiniteLoop();return}if(!j2e(n))this.view.forceRender();else if(this.selection.isSimilar(n))this.view.forceRender();else{const r={oldSelection:this.selection,newSelection:n,domSelection:t};this.document.fire("selectionChange",r),this._fireSelectionChangeDoneDebounced(r)}}}_clearInfiniteLoop(){this._loopbackCounter=0}}function j2e(i){return Array.from(i.getRanges()).flatMap(e=>[e.start.root,e.end.root]).every(e=>e&&e.is("rootElement"))}class z2e extends $o{domEventType=["compositionstart","compositionupdate","compositionend"];constructor(e){super(e);const t=this.document;t.on("compositionstart",()=>{t.isComposing=!0}),t.on("compositionend",()=>{t.isComposing=!1})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class QG{_files;_native;constructor(e,t={}){this._files=t.cacheFiles?bM(e):null,this._native=e}get files(){return this._files||(this._files=bM(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}setDragImage(e,t,n){this._native.setDragImage(e,t,n)}get isCanceled(){return this._native.dropEffect=="none"||!!this._native.mozUserCancelled}}function bM(i){const e=Array.from(i.files||[]),t=Array.from(i.items||[]);return e.length?e:t.filter(n=>n.kind==="file").map(n=>n.getAsFile())}class W2e extends $o{domEventType="beforeinput";onDomEvent(e){const t=e.getTargetRanges(),n=this.view,r=n.document;let s=null,o=null,a=[];if(e.dataTransfer&&(s=new QG(e.dataTransfer)),e.data!==null?o=e.data:s&&(o=s.getData("text/plain")),r.selection.isFake)a=Array.from(r.selection.getRanges()),e.preventDefault();else if(t.length)a=t.map(l=>{let c=n.domConverter.domPositionToView(l.startContainer,l.startOffset);const d=n.domConverter.domPositionToView(l.endContainer,l.endOffset);if(c&&Ar(l.startContainer)&&l.startOffset<Ps){e.preventDefault();let f=Ps-l.startOffset;c=c.getLastMatchingPosition(m=>!!(m.item.is("attributeElement")||m.item.is("uiElement")||m.item.is("$textProxy")&&f--),{direction:"backward",singleCharacters:!0})}if(H2e(l.endContainer,l.endOffset)&&e.preventDefault(),c)return n.createRange(c,d);if(d)return n.createRange(d)}).filter(l=>!!l);else if(ot.isAndroid){const l=e.target.ownerDocument.defaultView.getSelection();a=Array.from(n.domConverter.domSelectionToView(l).getRanges())}if(ot.isAndroid&&e.inputType=="insertCompositionText"&&o&&o.endsWith(`
37`)){this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[n.createRange(a[0].end)]});return}if(["insertText","insertReplacementText"].includes(e.inputType)&&o&&o.includes(`
38`)){const l=o.split(/\n{1,2}/g);let c=a;e.preventDefault();for(let d=0;d<l.length;d++){const f=l[d];f!=""&&(this.fire(e.type,e,{data:f,dataTransfer:s,targetRanges:c,inputType:e.inputType,isComposing:e.isComposing}),c=[r.selection.getFirstRange()]),d+1<l.length&&(this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:c}),c=[r.selection.getFirstRange()])}return}this.fire(e.type,e,{data:o,dataTransfer:s,targetRanges:a,inputType:e.inputType,isComposing:e.isComposing})}}function H2e(i,e){for(;i.parentNode;){if(Hn(i)){if(e!=i.data.length)return!1}else if(e!=i.childNodes.length)return!1;if(e=th(i)+1,i=i.parentNode,e<i.childNodes.length&&Ar(i.childNodes[e]))return!0}return!1}class q2e extends Oa{constructor(e){super(e),this.document.on("key
38down",(t,n)=>{if(this.isEnabled&&b_e(n.keyCode)){const r=new bd(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(r,n),r.stop.called&&t.stop()}})}observe(){}stopObserving(){}}class $2e extends Oa{constructor(e){super(e);const t=this.document;t.on("keydown",(n,r)=>{if(!this.isEnabled||r.keyCode!=At.tab||r.ctrlKey)return;const s=new bd(t,"tab",t.selection.getFirstRange());t.fire(s,r),s.stop.called&&n.stop()})}observe(){}stopObserving(){}}class G2e extends hn(){document;domConverter;domRoots=new Map;_renderer;_initialDomRootAttributes=new WeakMap;_observers=new Map;_writer;_ongoingChange=!1;_postFixersInProgress=!1;_renderingDisabled=!1;_hasChangedSinceTheLastRendering=!1;constructor(e){super(),this.document=new zG(e),this.domConverter=new YG(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new x2e(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new WG(this.document),this.addObserver(XG),this.addObserver(Yw),this.addObserver(V2e),this.addObserver(M2e),this.addObserver(L2e),this.addObserver(z2e),this.addObserver(q2e),this.addObserver(W2e),this.addObserver($2e),v2e(this),u2e(this),this.on("render",()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=!0}),this.listenTo(this.document,"change:isFocused",()=>{this._hasChangedSinceTheLastRendering=!0}),ot.isiOS&&this.listenTo(this.document,"blur",(t,n)=>{this.domConverter.mapDomToView(n.domEvent.relatedTarget)||this.domConverter._clearDomSelection()}),this.listenTo(this.document,"mutations",(t,{mutations:n})=>{n.forEach(r=>this._renderer.markToSync(r.type,r.node))},{priority:"low"}),this.listenTo(this.document,"mutations",()=>{this.forceRender()},{priority:"lowest"})}attachDomRoot(e,t="main"){const n=this.document.getRoot(t);n._name=e.tagName.toLowerCase();const r={};for(const{name:o,value:a}of Array.from(e.attributes))r[o]=a,o==="class"?this._writer.addClass(a.split(" "),n):n.hasAttribute(o)||this._writer.setAttribute(o,a,n);this._initialDomRootAttributes.set(e,r);const s=()=>{this._writer.setAttribute("contenteditable",(!n.isReadOnly).toString(),n),n.isReadOnly?this._writer.addClass("ck-read-only",n):this._writer.removeClass("ck-read-only",n)};s(),this.domRoots.set(t,e),this.domConverter.bindElements(e,n),this._renderer.markToSync("children",n),this._renderer.markToSync("attributes",n),this._renderer.domDocuments.add(e.ownerDocument),n.on("change:children",(o,a)=>this._renderer.markToSync("children",a)),n.on("change:attributes",(o,a)=>this._renderer.markToSync("attributes",a)),n.on("change:text",(o,a)=>this._renderer.markToSync("text",a)),n.on("change:isReadOnly",()=>this.change(s)),n.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const o of this._observers.values())o.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach(({name:r})=>t.removeAttribute(r));const n=this._initialDomRootAttributes.get(t);for(const r in n)t.setAttribute(r,n[r]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t);for(const r of this._observers.values())r.stopObserving(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[n,r]of this.domRoots)t.observe(r,n);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection({alignToTop:e,forceScroll:t,viewportOffset:n=20,ancestorOffset:r=20}={}){const s=this.document.selection.getFirstRange();if(!s)return;const o=Br({alignToTop:e,forceScroll:t,viewportOffset:n,ancestorOffset:r});typeof n=="number"&&(n={top:n,bottom:n,left:n,right:n});const a={target:this.domConverter.viewRangeToDom(s),viewportOffset:n,ancestorOffset:r,alignToTo
38p:e,forceScroll:t};this.fire("scrollToTheSelection",a,o),FG(a)}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new oe("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(t){oe.rethrowUnexpectedError(t,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(Yw).flush(),this.change(()=>{})}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return He._createAt(e,t)}createPositionAfter(e){return He._createAfter(e)}createPositionBefore(e){return He._createBefore(e)}createRange(e,t){return new xt(e,t)}createRangeOn(e){return xt._createOn(e)}createRangeIn(e){return xt._createIn(e)}createSelection(...e){return new Bo(...e)}_disableRendering(e){this._renderingDisabled=e,e==!1&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class Yc{is(){throw new Error("is() method is abstract")}}class Ro extends Yc{textNode;data;offsetInText;constructor(e,t,n){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new oe("model-textproxy-wrong-offsetintext",this);if(n<0||t+n>e.offsetSize)throw new oe("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+n),this.offsetInText=t}get startOffset(){return this.textNode.startOffset!==null?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return this.startOffset!==null?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}Ro.prototype.is=function(i){return i==="$textProxy"||i==="model:$textProxy"||i==="textProxy"||i==="model:textProxy"};class bl{direction;boundaries;singleCharacters;shallow;ignoreElementEnd;_position;_boundaryStartParent;_boundaryEndParent;_visitedParent;constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new oe("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if(t!="forward"&&t!="backward")throw new oe("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=Ue._createAt(this.boundaries[this.direction=="backward"?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,n,r,s;do r=this.position,s=this._visitedParent,{done:t,value:n}=this.next();while(!t&&e(n));t||(this._position=r,this._visitedParent=s)}jumpTo(e){this._boundaryStartParent&&e.isBefore(this.boundaries.start)?e=this.boundaries.start:this._boundaryEndParent&&e.isAfter(this.boundaries.end)&&(e=this.boundaries.end),this._position=e.clone(),this._visitedParent=e.parent}next(){return this.direction=="forward"?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),n=this._visitedParent;if(n.parent===null&&t.offset===n.maxOffset)return{done:!0,value:void 0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const r=ng(t,n),s=r||ZG(t,n,r);if(s&&s.is("model:element")){if(!this.shallow)t.path.push(0),this._visitedParent=s;else{if(this.boundaries&&this.boundaries.end.isBefore(t))return{done:!0,value:void 0};t.offset++}return this._position=t,Eu("elementStart",s,e,t,1)}if(s&&s.is("model:$text")){let o;if(this.singleCharacters)o=1;else{let c=s.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offset<c&&(c=this.boundaries.end.offset),o=c-t.offset}const a=t.offset-s.startOffset,l=new Ro(s,a,o);return t.offset+=o,this._position=t,Eu("text",l,e,t,o)}return t.path.pop(),t.offset++,this._position=t,this._visitedParent=n.parent,this.ignoreElementEnd?this._next():Eu("elementEnd",n,e,t)}_previous(){const e=this.position,t=this.position.clone(),n=this._visitedParent;if(n.parent===null&&t.offset===0)return{done:!0,value:void 0};if(n==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0,value:void 0};const r=t.parent,s=ng(t,r),o=s||JG(t,r,s);if(o&&o.is("model:element"))return t.offset--,this.shallow?(this._position=t,Eu("elementStart",o,e,t,1)):(t.path.push(o.maxOffset),this._position=t,this._visitedParent=o,this.ignoreElementEnd?this._previous():Eu("elementEnd",o,e,t));if(o&&o.is("model:$text")){let a;if(this.singleCharacters)a=1;else{let d=o.startOffset;this._boundaryStartParent==n&&this.boundaries.start.offset>d&&(d=this.boundaries.start.offset),a=t.offset-d}const l=t.offset-o.startOffset,c=new Ro(o,l-a,a);return t.offset-=a,this._position=t,Eu("text",c,e,t,a)}return t.path.pop(),this._position=t,this._visitedParent=n.parent,Eu("elementStart",n,e,t,1)}}function Eu(i,e,t,n,r){return{done:!1,value:{type:i,item:e,previousPosition:t,nextPosition:n,length:r}}}class Ue extends Yc{root;path;stickiness;constructor(e,t,n="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new oe("model-position-root-invalid",e);if(!Array.isArray(t)||t.length===0)throw new oe("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=n}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t<this.path.length-1;t++)if(e=e.getChildAtOffset(this.path[t]),!e)throw new oe("model-position-path-incorrect",this,{position:this});if(e.is("$text"))throw new oe("model-position-path-incorrect",this,{position:this});return e}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){return ng(this,this.parent)}get nodeAfter(){const e=this.parent;return ZG(this,e,ng(this,e))}get nodeBefore(){const e=this.parent;return JG(this,e,ng(this,e))}get isAtStart(){return this.offset===0}get isAtEnd(){return this.offset==this.parent.maxOffset}isValid(){if(this.offset<0)return!1;let e=this.root;for(let t=0;t<this.path.length-1;t++)if(e=e.getChildAtOffset(this.path[t]),!e)return!1;return this.offset<=e.maxOffset}compareWith(e){if(this.root!=e.root)return"different";const t=ji(this.path,e.path);switch(t){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[t]<e.path[t]?"before":"after"}}
38getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new bl(t);return n.skip(e),n.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){const e=this.parent;return e.is("documentFragment")?[e]:e.getAncestors({includeSelf:!0})}findAncestor(e){const t=this.parent;return t.is("element")?t.findAncestor(e,{includeSelf:!0}):null}getCommonPath(e){if(this.root!=e.root)return[];const t=ji(this.path,e.path),n=typeof t=="string"?Math.min(this.path.length,e.path.length):t;return this.path.slice(0,n)}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let r=0;for(;t[r]==n[r]&&t[r];)r++;return r===0?null:t[r-1]}getShiftedBy(e){const t=this.clone(),n=t.offset+e;return t.offset=n<0?0:n,t}isAfter(e){return this.compareWith(e)=="after"}isBefore(e){return this.compareWith(e)=="before"}isEqual(e){return this.compareWith(e)=="same"}isTouching(e){if(this.root!==e.root)return!1;const t=Math.min(this.path.length,e.path.length);for(let n=0;n<t;n++){const r=this.path[n]-e.path[n];if(r<-1||r>1)return!1;if(r===1)return yM(e,this,n);if(r===-1)return yM(this,e,n)}return this.path.length===e.path.length?!0:this.path.length>e.path.length?hS(this.path,t):hS(e.path,t)}hasSameParentAs(e){if(this.root!==e.root)return!1;const t=this.getParentPath(),n=e.getParentPath();return ji(t,n)=="same"}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=Ue._createAt(this);break}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&this.stickiness=="toNext"?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange,n=t.containsPosition(this)||t.start.isEqual(this);let r;return n?(r=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(r=r._getTransformedByDeletion(e.deletionPosition,1))):this.isEqual(e.deletionPosition)?r=Ue._createAt(e.deletionPosition):r=this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),r}_getTransformedByDeletion(e,t){const n=Ue._createAt(this);if(this.root!=e.root)return n;if(ji(e.getParentPath(),this.getParentPath())=="same"){if(e.offset<this.offset){if(e.offset+t>this.offset)return null;n.offset-=t}}else if(ji(e.getParentPath(),this.getParentPath())=="prefix"){const r=e.path.length-1;if(e.offset<=this.path[r]){if(e.offset+t>this.path[r])return null;n.path[r]-=t}}return n}_getTransformedByInsertion(e,t){const n=Ue._createAt(this);if(this.root!=e.root)return n;if(ji(e.getParentPath(),this.getParentPath())=="same")(e.offset<this.offset||e.offset==this.offset&&this.stickiness!="toPrevious")&&(n.offset+=t);else if(ji(e.getParentPath(),this.getParentPath())=="prefix"){const r=e.path.length-1;e.offset<=this.path[r]&&(n.path[r]+=t)}return n}_getTransformedByMove(e,t,n){if(t=t._getTransformedByDeletion(e,n),e.isEqual(t))return Ue._createAt(this);const r=this._getTransformedByDeletion(e,n);return r===null||e.isEqual(this)&&this.stickiness=="toNext"||e.getShiftedBy(n).isEqual(this)&&this.stickiness=="toPrevious"?this._getCombined(e,t):r._getTransformedByInsertion(t,n)}_getCombined(e,t){const n=e.path.length-1,r=Ue._createAt(t);return r.stickiness=this.stickiness,r.offset=r.offset+this.path[n]-e.offset,r.path=[...r.path,...this.path.slice(n+1)],r}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(e,t,n="toNone"){if(e.is("model:position"))return new Ue(e.root,e.path,e.stickiness);{const r=e;if(t=="end")t=r.maxOffset;else{if(t=="before")return this._createBefore(r,n);if(t=="after")return this._createAfter(r,n);if(t!==0&&!t)throw new oe("model-createpositionat-offset-required",[this,e])}if(!r.is("element")&&!r.is("documentFragment"))throw new oe("model-position-parent-incorrect",[this,e]);const s=r.getPath();return s.push(t),new this(r.root,s,n)}}static _createAfter(e,t){if(!e.parent)throw new oe("model-position-after-root",[this,e],{root:e});return this._createAt(e.parent,e.endOffset,t)}static _createBefore(e,t){if(!e.parent)throw new oe("model-position-before-root",e,{root:e});return this._createAt(e.parent,e.startOffset,t)}static fromJSON(e,t){if(e.root==="$graveyard"){const n=new Ue(t.graveyard,e.path);return n.stickiness=e.stickiness,n}if(!t.getRoot(e.root))throw new oe("model-position-fromjson-no-root",t,{rootName:e.root});return new Ue(t.getRoot(e.root),e.path,e.stickiness)}}Ue.prototype.is=function(i){return i==="position"||i==="model:position"};function ng(i,e){const t=e.getChildAtOffset(i.offset);return t&&t.is("$text")&&t.startOffset<i.offset?t:null}function ZG(i,e,t){return t!==null?null:e.getChildAtOffset(i.offset)}function JG(i,e,t){return t!==null?null:e.getChild(e.offsetToIndex(i.offset)-1)}function yM(i,e,t){return!(t+1===i.path.length||!hS(e.path,t+1)||!Y2e(i,t+1))}function hS(i,e){for(;e<i.length;){if(i[e]!==0)return!1;e++}return!0}function Y2e(i,e){let t=i.parent,n=i.path.length-1,r=0;for(;n>=e;){if(i.path[n]+r!==t.maxOffset)return!1;r=1,n--,t=t.parent}return!0}class Ae extends Yc{start;end;constructor(e,t){super(),this.start=Ue._createAt(e),this.end=t?Ue._createAt(t):Ue._createAt(e),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new bl({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){const e=this.start.getParentPath(),t=this.end.getParentPath();return ji(e,t)=="same"}get root(){return this.start.root}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),r=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&r}containsItem(e){const t=Ue._createBefore(e);return this.containsPosition(t)||this.start.isEqual(t)}isEqual(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new Ae(this.start,e.start)),this.containsPosition(e.end)&&t.pu
38sh(new Ae(e.end,this.end))):t.push(new Ae(this.start,this.end)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,n=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(n=e.end),new Ae(t,n)}return null}getJoined(e,t=!1){let n=this.isIntersecting(e);if(n||(this.start.isBefore(e.start)?n=t?this.end.isTouching(e.start):this.end.isEqual(e.start):n=t?e.end.isTouching(this.start):e.end.isEqual(this.start)),!n)return null;let r=this.start,s=this.end;return e.start.isBefore(r)&&(r=e.start),e.end.isAfter(s)&&(s=e.end),new Ae(r,s)}getMinimalFlatRanges(){const e=[],t=this.start.getCommonPath(this.end).length,n=Ue._createAt(this.start);let r=n.parent;for(;n.path.length>t+1;){const s=r.maxOffset-n.offset;s!==0&&e.push(new Ae(n,n.getShiftedBy(s))),n.path=n.path.slice(0,-1),n.offset++,r=r.parent}for(;n.path.length<=this.end.path.length;){const s=this.end.path[n.path.length-1],o=s-n.offset;o!==0&&e.push(new Ae(n,n.getShiftedBy(o))),n.offset=s,n.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new bl(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new bl(e);for(const n of t)yield n.item}*getPositions(e={}){e.boundaries=this;const t=new bl(e);yield t.position;for(const n of t)yield n.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new Ae(this.start,this.end)]}getTransformedByOperations(e){const t=[new Ae(this.start,this.end)];for(const n of e)for(let r=0;r<t.length;r++){const s=t[r].getTransformedByOperation(n);t.splice(r,1,...s),r+=s.length-1}for(let n=0;n<t.length;n++){const r=t[n];for(let s=n+1;s<t.length;s++){const o=t[s];(r.containsRange(o)||o.containsRange(r)||r.isEqual(o))&&t.splice(s,1)}}return t}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;const e=this.start.nodeAfter,t=this.end.nodeBefore;return e&&e.is("element")&&e===t?e:null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(e,t=!1){return this._getTransformedByInsertion(e.position,e.howMany,t)}_getTransformedByMoveOperation(e,t=!1){const n=e.sourcePosition,r=e.howMany,s=e.targetPosition;return this._getTransformedByMove(n,s,r,t)}_getTransformedBySplitOperation(e){const t=this.start._getTransformedBySplitOperation(e);let n=this.end._getTransformedBySplitOperation(e);return this.end.isEqual(e.insertionPosition)&&(n=this.end.getShiftedBy(1)),t.root!=n.root&&(n=this.end.getShiftedBy(-1)),new Ae(t,n)}_getTransformedByMergeOperation(e){if(this.start.isEqual(e.targetPosition)&&this.end.isEqual(e.deletionPosition))return new Ae(this.start);let t=this.start._getTransformedByMergeOperation(e),n=this.end._getTransformedByMergeOperation(e);return t.root!=n.root&&(n=this.end.getShiftedBy(-1)),t.isAfter(n)?(e.sourcePosition.isBefore(e.targetPosition)?(t=Ue._createAt(n),t.offset=0):(e.deletionPosition.isEqual(t)||(n=e.deletionPosition),t=e.targetPosition),new Ae(t,n)):new Ae(t,n)}_getTransformedByInsertion(e,t,n=!1){if(n&&this.containsPosition(e))return[new Ae(this.start,e),new Ae(e.getShiftedBy(t),this.end._getTransformedByInsertion(e,t))];{const r=new Ae(this.start,this.end);return r.start=r.start._getTransformedByInsertion(e,t),r.end=r.end._getTransformedByInsertion(e,t),[r]}}_getTransformedByMove(e,t,n,r=!1){if(this.isCollapsed){const f=this.start._getTransformedByMove(e,t,n);return[new Ae(f)]}const s=Ae._createFromPositionAndShift(e,n),o=t._getTransformedByDeletion(e,n);if(this.containsPosition(t)&&!r&&(s.containsPosition(this.start)||s.containsPosition(this.end))){const f=this.start._getTransformedByMove(e,t,n),m=this.end._getTransformedByMove(e,t,n);return[new Ae(f,m)]}let a;const l=this.getDifference(s);let c=null;const d=this.getIntersection(s);if(l.length==1?c=new Ae(l[0].start._getTransformedByDeletion(e,n),l[0].end._getTransformedByDeletion(e,n)):l.length==2&&(c=new Ae(this.start,this.end._getTransformedByDeletion(e,n))),c?a=c._getTransformedByInsertion(o,n,d!==null||r):a=[],d){const f=new Ae(d.start._getCombined(s.start,o),d.end._getCombined(s.start,o));a.length==2?a.splice(1,0,f):a.push(f)}return a}_getTransformedByDeletion(e,t){let n=this.start._getTransformedByDeletion(e,t),r=this.end._getTransformedByDeletion(e,t);return n==null&&r==null?null:(n==null&&(n=e),r==null&&(r=e),new Ae(n,r))}static _createFromPositionAndShift(e,t){const n=e,r=e.getShiftedBy(t);return t>0?new this(n,r):new this(r,n)}static _createIn(e){return new this(Ue._createAt(e,0),Ue._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(Ue._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(e.length===0)throw new oe("range-create-from-ranges-empty-array",null);if(e.length==1)return e[0].clone();const t=e[0];e.sort((s,o)=>s.start.isAfter(o.start)?1:-1);const n=e.indexOf(t),r=new this(t.start,t.end);for(let s=n-1;s>=0&&e[s].end.isEqual(r.start);s--)r.start=Ue._createAt(e[s].start);for(let s=n+1;s<e.length&&e[s].start.isEqual(r.end);s++)r.end=Ue._createAt(e[s].end);return r}static fromJSON(e,t){return new this(Ue.fromJSON(e.start,t),Ue.fromJSON(e.end,t))}}Ae.prototype.is=function(i){return i==="range"||i==="model:range"};class eY extends Sn(){_modelToViewMapping=new WeakMap;_viewToModelMapping=new WeakMap;_viewToModelLengthCallbacks=new Map;_markerNameToElements=new Map;_elementToMarkerNames=new Map;_deferredBindingRemovals=new Map;_unboundMarkerNames=new Set;_cache=new K2e;constructor(){super(),this.on("modelToViewPosition",(e,t)=>{if(t.viewPosition)return;const n=this._modelToViewMapping.get(t.modelPosition.parent);if(!n)throw new oe("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(n,t.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(e,t)=>{if(t.modelPosition)return;const n=this.findMappedViewAncestor(t.viewPosition),r=this._viewToModelMapping.get(n),s=this._toModelOff
38set(t.viewPosition.parent,t.viewPosition.offset,n);t.modelPosition=Ue._createAt(r,s)},{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const n=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const r of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(r);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e)&&this._cache.stopTracking(e),this._modelToViewMapping.get(n)==e&&this._modelToViewMapping.delete(n))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)&&this._cache.stopTracking(t)}bindElementToMarker(e,t){const n=this._markerNameToElements.get(t)||new Set;n.add(e);const r=this._elementToMarkerNames.get(e)||new Set;r.add(t),this._markerNameToElements.set(t,n),this._elementToMarkerNames.set(e,r)}unbindElementFromMarkerName(e,t){const n=this._markerNameToElements.get(t);n&&(n.delete(e),n.size==0&&this._markerNameToElements.delete(t));const r=this._elementToMarkerNames.get(e);r&&(r.delete(t),r.size==0&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new Ae(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new xt(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const n={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const n=new Set;for(const r of t)if(r.is("attributeElement"))for(const s of r.getElementsWithSameId())n.add(s);else n.add(r);return n}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,n){if(n!=e){const s=this._toModelOffset(e.parent,e.index,n),o=this._toModelOffset(e,t,e);return s+o}if(e.is("$text"))return t;let r=0;for(let s=0;s<t;s++)r+=this.getModelLength(e.getChild(s));return r}getModelLength(e){const t=[e];let n=0;for(;t.length>0;){const r=t.pop(),s=r.name&&this._viewToModelLengthCallbacks.size>0&&this._viewToModelLengthCallbacks.get(r.name);if(s)n+=s(r);else if(this._viewToModelMapping.has(r))n+=1;else if(r.is("$text"))n+=r.data.length;else{if(r.is("uiElement"))continue;for(const o of r.getChildren())t.push(o)}}return n}findPositionIn(e,t){if(t===0)return this._moveViewPositionToTextNode(new He(e,0));if(this._viewToModelLengthCallbacks.size==0&&this._viewToModelMapping.has(e)){const r=this._cache.getClosest(e,t);return this._findPositionStartingFrom(r.viewPosition,r.modelOffset,t,e,!0)}else return this._findPositionStartingFrom(new He(e,0),0,t,e,!1)}_findPositionStartingFrom(e,t,n,r,s){let o=e.parent,a=e.offset;if(o.is("$text"))return new He(o,n-t);let l,c=t,d=0;for(;c<n;){if(l=o.getChild(a),!l){if(o==r)throw new oe("mapping-model-offset-not-found",this,{modelOffset:n,viewContainer:r});a=o.parent.getChildIndex(o)+1,o=o.parent,s&&this._cache.save(o,a,r,c);continue}s?d=this._getModelLengthAndCache(l,r,c):d=this.getModelLength(l),c+=d,a++}let f=new He(o,a);if(s)for(;f.isAtEnd&&f.parent!==r&&f.parent.parent;){const m=f.parent.parent,p=m.getChildIndex(f.parent)+1;this._cache.save(m,p,r,c),f=new He(m,p)}return c==n?this._moveViewPositionToTextNode(f):this._findPositionStartingFrom(new He(l,0),c-d,n,r,s)}
38_getModelLengthAndCache(e,t,n){let r=0;if(this._viewToModelMapping.has(e))r=1;else if(e.is("$text"))r=e.data.length;else if(!e.is("uiElement"))for(const s of e.getChildren())r+=this._getModelLengthAndCache(s,t,n+r);return this._cache.save(e.parent,e.index+1,t,n+r),r}_moveViewPositionToTextNode(e){const t=e.nodeBefore,n=e.nodeAfter;return t&&t.is("view:$text")?new He(t,t.data.length):n&&n.is("view:$text")?new He(n,0):e}}class K2e extends Sn(){_cachedMapping=new WeakMap;_nodeToCacheListIndex=new WeakMap;_invalidateOnChildrenChangeCallback=(e,t,n)=>{this._clearCacheInsideParent(t,n.index)};_invalidateOnTextChangeCallback=(e,t)=>{this._clearCacheAfter(t)};save(e,t,n,r){const s=this._cachedMapping.get(n),o=s.cacheMap.get(r);if(o){const d=e.getChild(t-1),f=o.viewPosition.nodeBefore?this._nodeToCacheListIndex.get(o.viewPosition.nodeBefore):0;this._nodeToCacheListIndex.set(d,f);return}const l={viewPosition:new He(e,t),modelOffset:r};s.maxModelOffset=r>s.maxModelOffset?r:s.maxModelOffset,s.cacheMap.set(r,l);let c=s.cacheList.length-1;for(;c>=0&&s.cacheList[c].modelOffset>r;)c--;if(s.cacheList.splice(c+1,0,l),t>0){const d=e.getChild(t-1);this._nodeToCacheListIndex.set(d,c+1)}}getClosest(e,t){const n=this._cachedMapping.get(e);let r;if(n)if(t>n.maxModelOffset)r=n.cacheList[n.cacheList.length-1];else{const s=n.cacheMap.get(t);s?r=s:r=this._findInCacheList(n.cacheList,t)}else r=this.startTracking(e);return{modelOffset:r.modelOffset,viewPosition:r.viewPosition.clone()}}startTracking(e){const n={viewPosition:new He(e,0),modelOffset:0},r={maxModelOffset:0,cacheList:[n],cacheMap:new Map([[0,n]])};return this._cachedMapping.set(e,r),e.on("change:children",this._invalidateOnChildrenChangeCallback),e.on("change:text",this._invalidateOnTextChangeCallback),n}stopTracking(e){e.off("change:children",this._invalidateOnChildrenChangeCallback),e.off("change:text",this._invalidateOnTextChangeCallback),this._cachedMapping.delete(e)}_clearCacheInsideParent(e,t){if(t==0)this._cachedMapping.has(e)?this._clearCacheAll(e):this._clearCacheInsideParent(e.parent,e.index);else{const n=e.getChild(t-1);this._clearCacheAfter(n)}}_clearCacheAll(e){const t=this._cachedMapping.get(e);t.maxModelOffset>0&&(t.maxModelOffset=0,t.cacheList.length=1,t.cacheMap.clear(),t.cacheMap.set(0,t.cacheList[0]))}_clearCacheAfter(e){const t=this._nodeToCacheListIndex.get(e);if(t===void 0){const r=e.parent;this._cachedMapping.has(r)||this._clearCacheInsideParent(r.parent,r.index);return}let n=e.parent;for(;!this._cachedMapping.has(n);)n=n.parent;this._clearCacheFromCacheIndex(n,t)}_clearCacheFromCacheIndex(e,t){t===0&&(t=1);const n=this._cachedMapping.get(e),r=n.cacheList[t-1];if(!r)return;n.maxModelOffset=r.modelOffset;const s=n.cacheList.splice(t);for(const o of s){n.cacheMap.delete(o.modelOffset);const a=o.viewPosition.nodeBefore;this._nodeToCacheListIndex.delete(a)}}_findInCacheList(e,t){let n=0,r=e.length-1,s=r-n>>1,o=e[s];for(;n<r;)o.modelOffset<t?n=s+1:r=s-1,s=n+(r-n>>1),o=e[s];return o.modelOffset<=t?o:e[s-1]}}class X2e{_consumable=new Map;_textProxyRegistry=new Map;add(e,t){t=Ey(t),e instanceof Ro&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return t=Ey(t),e instanceof Ro&&(e=this._getSymbolForTextProxy(e)),this.test(e,t)?(this._consumable.get(e).set(t,!1),!0):!1}test(e,t){t=Ey(t),e instanceof Ro&&(e=this._getSymbolForTextProxy(e));const n=this._consumable.get(e);if(n===void 0)return null;const r=n.get(t);return r===void 0?null:r}revert(e,t){t=Ey(t),e instanceof Ro&&(e=this._getSymbolForTextProxy(e));const n=this.test(e,t);return n===!1?(this._consumable.get(e).set(t,!0),!0):n===!0?!1:null}verifyAllConsumed(e){const t=[];for(const[n,r]of this._consumable)for(const[s,o]of r){const a=s.split(":")[0];o&&e==a&&t.push({event:s,item:n.name||n.description})}if(t.length)throw new oe("conversion-model-consumable-not-consumed",null,{items:t})}_getSymbolForTextProxy(e){let t=null;const n=this._textProxyRegistry.get(e.startOffset);if(n){const r=n.get(e.endOffset);r&&(t=r.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e)),t}_addSymbolForTextProxy(e){const t=e.startOffset,n=e.endOffset,r=e.parent,s=Symbol("$textProxy:"+e.data);let o,a;return o=this._textProxyRegistry.get(t),o||(o=new Map,this._textProxyRegistry.set(t,o)),a=o.get(n),a||(a=new Map,o.set(n,a)),a.set(r,s),s}}function Ey(i){const e=i.split(":");return e[0]=="insert"?e[0]:e[0]=="addMarker"||e[0]=="removeMarker"?i:e.length>1?e[0]+":"+e[1]:e[0]}class tY extends Sn(){_conversionApi;_firedEventsMap;constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}
38convertChanges(e,t,n){const r=e.getRefreshedItems(),s=this._createConversionApi(n,r);for(const a of e.getMarkersToRemove())this._convertMarkerRemove(a.name,a.range,s);const o=this._reduceChanges(e.getChanges(),r);for(const a of o)a.type==="insert"?this._convertInsert(Ae._createFromPositionAndShift(a.position,a.length),s):a.type==="reinsert"?this._convertReinsert(Ae._createFromPositionAndShift(a.position,a.length),s):a.type==="remove"?this._convertRemove(a.position,a.length,a.name,s):this._convertAttribute(a.range,a.attributeKey,a.attributeOldValue,a.attributeNewValue,s);s.mapper.flushDeferredBindings();for(const a of s.mapper.flushUnboundMarkerNames()){const l=t.get(a).getRange();this._convertMarkerRemove(a,l,s),this._convertMarkerAdd(a,l,s)}for(const a of e.getMarkersToAdd())this._convertMarkerAdd(a.name,a.range,s);s.consumable.verifyAllConsumed("insert")}convert(e,t,n,r={}){const s=this._createConversionApi(n,void 0,r);this._convertInsert(e,s);for(const[o,a]of t)this._convertMarkerAdd(o,a,s);s.consumable.verifyAllConsumed("insert")}convertSelection(e,t,n){const r=this._createConversionApi(n);this.fire("cleanSelection",{selection:e},r);const s=e.getFirstPosition().root;if(!r.mapper.toViewElement(s))return;const o=Array.from(t.getMarkersAtPosition(e.getFirstPosition()));if(this._addConsumablesForSelection(r.consumable,e,o),this.fire("selection",{selection:e},r),!!e.isCollapsed){for(const a of o)if(r.consumable.test(e,"addMarker:"+a.name)){const l=a.getRange();if(!Q2e(e.getFirstPosition(),a,r.mapper))continue;const c={item:e,markerName:a.name,markerRange:l};this.fire(`addMarker:${a.name}`,c,r)}for(const a of e.getAttributeKeys())if(r.consumable.test(e,"attribute:"+a)){const l={item:e,range:e.getFirstRange(),attributeKey:a,attributeOldValue:null,attributeNewValue:e.getAttribute(a)};this.fire(`attribute:${a}:$text`,l,r)}}}_convertInsert(e,t,n={}){n.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,e);for(const r of e.getWalker({shallow:!0}))this._testAndFire("insert",vM(r),t)}_convertRemove(e,t,n,r){this.fire(`remove:${n}`,{position:e,length:t},r)}_convertAttribute(e,t,n,r,s){this._addConsumablesForRange(s.consumable,e,`attribute:${t}`);for(const o of e){const a={item:o.item,range:Ae._createFromPositionAndShift(o.previousPosition,o.length),attributeKey:t,attributeOldValue:n,attributeNewValue:r};this._testAndFire(`attribute:${t}`,a,s)}}_convertReinsert(e,t){const n=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,n);for(const r of n.map(vM))this.fire(`remove:${r.item.is("element")?r.item.name:"$text"}`,{position:r.range.start,length:r.item.offsetSize,reconversion:!0},t),this._testAndFire("insert",{...r,reconversion:!0},t)}
38_convertMarkerAdd(e,t,n){if(t.root.rootName=="$graveyard")return;const r=`addMarker:${e}`;if(n.consumable.add(t,r),this.fire(r,{markerName:e,markerRange:t},n),!!n.consumable.consume(t,r)){this._addConsumablesForRange(n.consumable,t,r);for(const s of t.getItems()){if(!n.consumable.test(s,r))continue;const o={item:s,range:Ae._createOn(s),markerName:e,markerRange:t};this.fire(r,o,n)}}}_convertMarkerRemove(e,t,n){t.root.rootName!="$graveyard"&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},n)}_reduceChanges(e,t){const n={changes:e,refreshedItems:t};return this.fire("reduceChanges",n),n.changes}_addConsumablesForInsert(e,t){for(const n of t){const r=n.item;if(e.test(r,"insert")===null){e.add(r,"insert");for(const s of r.getAttributeKeys())e.add(r,"attribute:"+s)}}return e}_addConsumablesForRange(e,t,n){for(const r of t.getItems())e.add(r,n);return e}_addConsumablesForSelection(e,t,n){e.add(t,"selection");for(const r of n)e.add(t,"addMarker:"+r.name);for(const r of t.getAttributeKeys())e.add(t,"attribute:"+r);return e}_testAndFire(e,t,n){const r=Z2e(e,t),s=t.item.is("$textProxy")?n.consumable._getSymbolForTextProxy(t.item):t.item,o=this._firedEventsMap.get(n),a=o.get(s);if(!a)o.set(s,new Set([r]));else if(!a.has(r))a.add(r);else return;this.fire(r,t,n)}_testAndFireAddAttributes(e,t){const n={item:e,range:Ae._createOn(e)};for(const r of n.item.getAttributeKeys())n.attributeKey=r,n.attributeOldValue=null,n.attributeNewValue=n.item.getAttribute(r),this._testAndFire(`attribute:${r}`,n,t)}_createConversionApi(e,t=new Set,n={}){const r={...this._conversionApi,consumable:new X2e,writer:e,options:n,convertItem:s=>this._convertInsert(Ae._createOn(s),r),convertChildren:s=>this._convertInsert(Ae._createIn(s),r,{doNotAddConsumables:!0}),convertAttributes:s=>this._testAndFireAddAttributes(s,r),canReuseView:s=>!t.has(r.mapper.toModelElement(s))};return this._firedEventsMap.set(r,new Map),r}}function Q2e(i,e,t){const n=e.getRange(),r=Array.from(i.getAncestors());return r.shift(),r.reverse(),!r.some(o=>{if(n.containsItem(o))return!!t.toViewElement(o).getCustomProperty("addHighlight")})}function Z2e(i,e){const t=e.item.is("element")?e.item.name:"$text";return`${i}:${t}`}function vM(i){return{item:i.item,range:Ae._createFromPositionAndShift(i.previousPosition,i.length)}}class yd extends Yc{parent=null;_attrs;_index=null;_startOffset=null;constructor(e){super(),this._attrs=ka(e)}get document(){return null}get index(){return this._index}get startOffset(){return this._startOffset}get offsetSize(){return 1}get endOffset(){return this.startOffset===null?null:this.startOffset+this.offsetSize}get nextSibling(){const e=this.index;return e!==null&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return e!==null&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.parent===null?!1:this.root.isAttached()}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),r=e.getAncestors(t);let s=0;for(;n[s]==r[s]&&n[s];)s++;return s===0?null:n[s-1]}isBefore(e){if(this==e||this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),r=ji(t,n);switch(r){case"prefix":return!0;case"extension":return!1;default:return t[r]<n[r]}}isAfter(e){return this==e||this.root!==e.root?!1:!this.isBefore(e)}hasAttribute(e){return this._attrs.has(e)}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const e={};return this._attrs.size&&(e.attributes=Array.from(this._attrs).reduce((t,n)=>(t[n[0]]=n[1],t),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=ka(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}yd.prototype.is=function(i){return i==="node"||i==="model:node"};class ks extends Sn(Yc){_lastRangeBackward=!1;_attrs=new Map;_ranges=[];constructor(...e){super(),e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}
38get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return this._ranges.length===1?this._ranges[0].isCollapsed:!1}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(this.rangeCount===0)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let n=!1;for(const r of e._ranges)if(t.isEqual(r)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new Ae(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)(!e||t.start.isBefore(e.start))&&(e=t);return e?new Ae(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)(!e||t.end.isAfter(e.end))&&(e=t);return e?new Ae(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,n,r]=e;if(typeof n=="object"&&(r=n,n=void 0),t===null)this._setRanges([]);else if(t instanceof ks)this._setRanges(t.getRanges(),t.isBackward);else if(t&&typeof t.getRanges=="function")this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof Ae)this._setRanges([t],!!r&&!!r.backward);else if(t instanceof Ue)this._setRanges([new Ae(t)]);else if(t instanceof yd){const s=!!r&&!!r.backward;let o;if(n=="in")o=Ae._createIn(t);else if(n=="on")o=Ae._createOn(t);
38else if(n!==void 0)o=new Ae(Ue._createAt(t,n));else throw new oe("model-selection-setto-required-second-parameter",[this,t]);this._setRanges([o],s)}else if(Bs(t))this._setRanges(t,r&&!!r.backward);else throw new oe("model-selection-setto-not-selectable",[this,t])}_setRanges(e,t=!1){const n=Array.from(e),r=n.some(s=>{if(!(s instanceof Ae))throw new oe("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every(o=>!o.isEqual(s))});n.length===this._ranges.length&&!r||(this._replaceAllRanges(n),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(this.anchor===null)throw new oe("model-selection-setfocus-no-ranges",[this,e]);const n=Ue._createAt(e,t);if(n.compareWith(this.focus)=="same")return;const r=this.anchor;this._ranges.length&&this._popRange(),n.compareWith(r)=="before"?(this._pushRange(new Ae(n,r)),this._lastRangeBackward=!0):(this._pushRange(new Ae(r,n)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return this.rangeCount!==1?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const n=wM(t.start,e);eCe(n,t)&&(yield n);const r=t.getWalker();for(const o of r){const a=o.item;o.type=="elementEnd"&&J2e(a,e,t)?yield a:o.type=="elementStart"&&a.is("model:element")&&a.root.document.model.schema.isBlock(a)&&r.jumpTo(Ue._createAt(a,"end"))}const s=wM(t.end,e);tCe(s,t)&&(yield s)}}containsEntireContent(e=this.anchor.root){const t=Ue._createAt(e,0),n=Ue._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}toJSON(){const e={ranges:Array.from(this.getRanges()).map(n=>n.toJSON())},t=Object.fromEntries(this.getAttributes());return Object.keys(t).length&&(e.attributes=t),this.isBackward&&(e.isBackward=!0),e}_pushRange(e){this._checkRange(e),this._ranges.push(new Ae(e.start,e.end))}_checkRange(e){for(let t=0;t<this._ranges.length;t++)if(e.isIntersecting(this._ranges[t]))throw new oe("model-selection-range-intersects",[this,e],{addedRange:e,intersectingRange:this._ranges[t]})}_replaceAllRanges(e){this._removeAllRanges();for(const t of e)this._pushRange(t)}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}ks.prototype.is=function(i){return i==="selection"||i==="model:selection"};function nY(i,e){return e.has(i)?!1:(e.add(i),i.root.document.model.schema.isBlock(i)&&!!i.parent)}function J2e(i,e,t){return nY(i,e)&&Y3(i,t)}function wM(i,e){const n=i.parent.root.document.model.schema,r=i.parent.getAncestors({parentFirst:!0,includeSelf:!0});let s=!1;const o=r.find(a=>s?!1:(s=n.isLimit(a),!s&&nY(a,e)));return r.forEach(a=>e.add(a)),o}function Y3(i,e){const t=nCe(i);return t?!e.containsRange(Ae._createOn(t),!0):!0}function eCe(i,e){return i?e.isCollapsed||i.isEmpty?!0:e.start.isTouching(Ue._createAt(i,i.maxOffset))?!1:Y3(i,e):!1}function tCe(i,e){return i?e.isCollapsed||i.isEmpty?!0:e.end.isTouching(Ue._createAt(i,0))?!1:Y3(i,e):!1}function nCe(i){const e=i.root.document.model.schema;let t=i.parent;for(;t;){if(e.isBlock(t))return t;t=t.parent}}class is extends Sn(Ae){constructor(e,t){super(e,t),iCe.call(this)}detach(){this.stopListening()}toRange(){return new Ae(this.start,this.end)}static fromRange(e){return new is(e.start,e.end)}}is.prototype.is=function(i){return i==="liveRange"||i==="model:liveRange"||i=="range"||i==="model:range"};function iCe(){this.listenTo(this.root.document.model,"applyOperation",(i,e)=>{const t=e[0];t.isDocumentOperation&&rCe.call(this,t)},{priority:"low"})}function rCe(i){const e=this.getTransformedByOperation(i),t=Ae._createFromRanges(e),n=!t.isEqual(this),r=sCe(this,i);let s=null;if(n){t.root.rootName=="$graveyard"&&(i.type=="remove"?s=i.sourcePosition:s=i.deletionPosition);const o=this.toRange();this.start=t.start,this.end=t.end,this.fire("change:range",o,{deletionPosition:s})}else r&&this.fire("change:content",this.toRange(),{deletionPosition:s})}function sCe(i,e){switch(e.type){case"insert":return i.containsPosition(e.position);case"move":case"remove":case"reinsert":case"merge":return i.containsPosition(e.sourcePosition)||i.start.isEqual(e.sourcePosition)||i.containsPosition(e.targetPosition);case"split":return i.containsPosition(e.splitPosition)||i.containsPosition(e.insertionPosition)}return!1}class On extends yd{_data;constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new On(this.data,this.getAttributes())}static fromJSON(e){return new On(e.data,e.attributes)}}On.prototype.is=function(i){return i==="$text"||i==="model:$text"||i==="text"||i==="model:text"||i==="node"||i==="model:node"};const Ng="selection:";class us extends Sn(Yc){_selection;constructor(e){super(),this._selection=new oCe(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}toJSON(){return this._selection.toJSON()}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return Ng+e}static _isStoreAttributeKey(e){return e.startsWith(Ng)}}us.prototype.is=function(i){return i==="selection"||i=="model:selection"||i=="documentSelection"||i=="model:documentSelection"};class oCe extends ks{markers=new Jn({idProperty:"name"});_model;_document;_attributePriority=new Map;_selectionRestorePosition=null;_hasChangedRange=!1;_overriddenGravityRegister=new Set;_observedMarkers=new Set;constructor(e){super(),this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",(t,n)=>{const r=n[0];!r.isDocumentOperation||r.type=="marker"||r.type=="rename"||r.type=="noop"||(this._ranges.length==0&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))},{priority:"lowest"}),this.on("change:range",()=>
38{this._validateSelectionRanges(this.getRanges())}),this.listenTo(this._model.markers,"update",(t,n,r,s)=>{this._updateMarker(n,s)}),this.listenTo(this._document,"change",(t,n)=>{aCe(this._model,n)})}get isCollapsed(){return this._ranges.length===0?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e<this._ranges.length;e++)this._ranges[e].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(...e){super.setTo(...e),this._updateAttributes(!0),this.updateMarkers()}setFocus(e,t){super.setFocus(e,t),this._updateAttributes(!0),this.updateMarkers()}setAttribute(e,t){if(this._setAttribute(e,t)){const n=[e];this.fire("change:attribute",{attributeKeys:n,directChange:!0})}}removeAttribute(e){if(this._removeAttribute(e)){const t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}overrideGravity(){const e=rr();return this._overriddenGravityRegister.add(e),this._overriddenGravityRegister.size===1&&this._updateAttributes(!0),e}restoreGravity(e){if(!this._overriddenGravityRegister.has(e))throw new oe("document-selection-gravity-wrong-restore",this,{uid:e});this._overriddenGravityRegister.delete(e),this.isGravityOverridden||this._updateAttributes(!0)}observeMarkers(e){this._observedMarkers.add(e),this.updateMarkers()}_replaceAllRanges(e){this._validateSelectionRanges(e),super._replaceAllRanges(e)}_popRange(){this._ranges.pop().detach()}_pushRange(e){const t=this._prepareRange(e);t&&this._ranges.push(t)}toJSON(){const e=super.toJSON();return this.markers.length&&(e.markers=this.markers.map(t=>t.toJSON())),e}_validateSelectionRanges(e){for(const t of e)if(!this._document._validateSelectionRange(t))throw new oe("document-selection-wrong-position",this,{range:t})}_prepareRange(e){if(this._checkRange(e),e.root==this._document.graveyard)return;const t=is.fromRange(e);return t.on("change:range",(n,r,s)=>{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=s.deletionPosition;const o=this._ranges.indexOf(t);this._ranges.splice(o,1),t.detach()}}),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const r of this._model.markers){const s=r.name.split(":",1)[0];if(!this._observedMarkers.has(s))continue;const o=r.getRange();for(const a of this.getRanges())o.containsRange(a,!a.isCollapsed)&&e.push(r)}const n=Array.from(this.markers);for(const r of e)this.markers.has(r)||(this.markers.add(r),t=!0);for(const r of Array.from(this.markers))e.includes(r)||(this.markers.remove(r),t=!0);t&&this.fire("change:marker",{oldMarkers:n,directChange:!1})}_updateMarker(e,t){const n=e.name.split(":",1)[0];if(!this._observedMarkers.has(n))return;let r=!1;const s=Array.from(this.markers),o=this.markers.has(e);if(!t)o&&(this.markers.remove(e),r=!0);else{let a=!1;for(const l of this.getRanges())if(t.containsRange(l,!l.isCollapsed)){a=!0;break}a&&!o?(this.markers.add(e),r=!0):!a&&o&&(this.markers.remove(e),r=!0)}r&&this.fire("change:marker",{oldMarkers:s,directChange:!1})}_updateAttributes(e){const t=ka(this._getSurroundingAttributes()),n=ka(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[s,o]of this._attributePriority)o=="low"&&(this._attrs.delete(s),this._attributePriority.delete(s));this._setAttributesTo(t);const r=[];for(const[s,o]of this.getAttributes())(!n.has(s)||n.get(s)!==o)&&r.push(s);for(const[s]of n)this.hasAttribute(s)||r.push(s);r.length>0&&this.fire("change:attribute",{attributeKeys:r,directChange:!1})}_setAttribute(e,t,n=!0){const r=n?"normal":"low";return r=="low"&&this._attributePriority.get(e)=="normal"||super.getAttribute(e)===t?!1:(this._attrs.set(e,t),this._attributePriority.set(e,r),!0)}
38_removeAttribute(e,t=!0){const n=t?"normal":"low";return n=="low"&&this._attributePriority.get(e)=="normal"||(this._attributePriority.set(e,n),!super.hasAttribute(e))?!1:(this._attrs.delete(e),!0)}_setAttributesTo(e){const t=new Set;for(const[n,r]of this.getAttributes())e.get(n)!==r&&this._removeAttribute(n,!1);for(const[n,r]of e)this._setAttribute(n,r,!1)&&t.add(n);return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())t.startsWith(Ng)&&(yield[t.substr(Ng.length),e.getAttribute(t)])}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;if(e.root.rootName=="$graveyard")return null;let n=null;if(this.isCollapsed){const r=e.textNode?e.textNode:e.nodeBefore,s=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(n=mp(r,t)),n||(n=mp(s,t)),!this.isGravityOverridden&&!n){let o=r;for(;o&&!n;)o=o.previousSibling,n=mp(o,t)}if(!n){let o=s;for(;o&&!n;)o=o.nextSibling,n=mp(o,t)}n||(n=this.getStoredAttributes())}else{const r=this.getFirstRange();for(const s of r){if(s.item.is("element")&&t.isObject(s.item)){n=mp(s.item,t);break}if(s.type=="text"){n=s.item.getAttributes();break}}}return n}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function mp(i,e){if(!i)return null;if(i instanceof Ro||i instanceof On)return i.getAttributes();if(!e.isInline(i))return null;if(!e.isObject(i))return[];const t=[];for(const[n,r]of i.getAttributes())e.checkAttribute("$text",n)&&e.getAttributeProperties(n).copyFromObject!==!1&&t.push([n,r]);return t}function aCe(i,e){const t=i.document.differ;for(const n of t.getChanges()){if(n.type!="insert")continue;const r=n.position.parent;n.length===r.maxOffset&&i.enqueueChange(e,o=>{const a=Array.from(r.getAttributeKeys()).filter(l=>l.startsWith(Ng));for(const l of a)o.removeAttribute(l,r)})}}class ig{_nodes=[];_offsetToNode=[];constructor(e){e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._offsetToNode.length}getNode(e){return this._nodes[e]||null}getNodeAtOffset(e){return this._offsetToNode[e]||null}getNodeIndex(e){return e.index}getNodeStartOffset(e){return e.startOffset}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new oe("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){if(e==this._offsetToNode.length)return this._nodes.length;const t=this._offsetToNode[e];if(!t)throw new oe("model-nodelist-offset-out-of-bounds",this,{offset:e,nodeList:this});return this.getNodeIndex(t)}
38_insertNodes(e,t){const n=[];for(const s of t){if(!(s instanceof yd))throw new oe("model-nodelist-insertnodes-not-node",this);n.push(s)}let r=this.indexToOffset(e);eM(this._nodes,n,e),eM(this._offsetToNode,lCe(n),r);for(let s=e;s<this._nodes.length;s++)this._nodes[s]._index=s,this._nodes[s]._startOffset=r,r+=this._nodes[s].offsetSize}_removeNodes(e,t=1){if(t==0)return[];let n=this.indexToOffset(e);const r=this._nodes.splice(e,t),s=r[r.length-1],o=s.startOffset+s.offsetSize-n;this._offsetToNode.splice(n,o);for(const a of r)a._index=null,a._startOffset=null;for(let a=e;a<this._nodes.length;a++)this._nodes[a]._index=a,this._nodes[a]._startOffset=n,n+=this._nodes[a].offsetSize;return r}_removeNodesArray(e){if(e.length==0)return;for(const n of e)n._index=null,n._startOffset=null;this._nodes=this._nodes.filter(n=>n.index!==null),this._offsetToNode=this._offsetToNode.filter(n=>n.index!==null);let t=0;for(let n=0;n<this._nodes.length;n++)this._nodes[n]._index=n,this._nodes[n]._startOffset=t,t+=this._nodes[n].offsetSize}toJSON(){return this._nodes.map(e=>e.toJSON())}}function lCe(i){const e=[];let t=0;for(const n of i)for(let r=0;r<n.offsetSize;r++)e[t++]=n;return e}class An extends yd{name;_children=new ig;constructor(e,t,n){super(t),this.name=e,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return this.childCount===0}getChild(e){return this._children.getNode(e)}getChildAtOffset(e){return this._children.getNodeAtOffset(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const n of e)t=t.getChildAtOffset(n);return t}findAncestor(e,t={}){let n=t.includeSelf?this:this.parent;for(;n;){if(n.name===e)return n;n=n.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?uCe(this._children):void 0;return new An(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=cCe(t);for(const r of n)r.parent!==null&&r._remove(),r.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const r of n)r.parent=null;return n}_removeChildrenArray(e){this._children._removeNodesArray(e);for(const t of e)t.parent=null}static fromJSON(e){let t;if(e.children){t=[];for(const n of e.children)n.name?t.push(An.fromJSON(n)):t.push(On.fromJSON(n))}return new An(e.name,e.attributes,t)}}An.prototype.is=function(i,e){return e?e===this.name&&(i==="element"||i==="model:element"):i==="element"||i==="model:element"||i==="node"||i==="model:node"};function cCe(i){if(typeof i=="string")return[new On(i)];Bs(i)||(i=[i]);const e=[];for(const t of i)typeof t=="string"?e.push(new On(t)):t instanceof Ro?e.push(new On(t.data,t.getAttributes())):e.push(t);return e}function uCe(i){const e=[];for(const t of i)e.push(t._clone(!0));return e}class iY{_dispatchers;constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}class dCe extends iY{elementToElement(e){return this.add(SCe(e))}elementToStructure(e){return this.add(PCe(e))}attributeToElement(e){return this.add(ICe(e))}attributeToAttribute(e){return this.add(RCe(e))}markerToElement(e){return this.add(FCe(e))}markerToHighlight(e){return this.add(NCe(e))}markerToData(e){return this.add(OCe(e))}}function rY(){return(i,e,t)=>{if(!t.consumable.consume(e.item,i.name))return;const n=t.writer,r=t.mapper.toViewPosition(e.range.start),s=n.createText(e.item.data);n.insert(r,s)}}function sY(){return(i,e,t)=>{t.convertAttributes(e.item),!e.reconversion&&e.item.is("element")&&!e.item.isEmpty&&t.convertChildren(e.item)}}function fCe(){return(i,e,t)=>{if(e.reconversion)return;const n=t.mapper.toViewPosition(e.position),r=e.position.getShiftedBy(e.length),s=t.mapper.toViewPosition(r,{isPhantom:!0}),o=t.writer.createRange(n,s);aY(o.getTrimmed(),t)}}function oY(i,e){const t=i.createAttributeElement("span",e.attributes);return e.classes&&t._addClass(e.classes),typeof e.priority=="number"&&(t._priority=e.priority),t._id=e.id,t}function hCe(){return(i,e,t)=>{const n=e.selection;if(n.isCollapsed||!t.consumable.consume(n,"selection"))return;const r=[];for(const s of n.getRanges())r.push(t.mapper.toViewRange(s));t.writer.setSelection(r,{backward:n.isBackward})}}function mCe(){return(i,e,t)=>{const n=e.selection;if(!n.isCollapsed||!t.consumable.consume(n,"selection"))return;const r=t.writer,s=n.getFirstPosition(),o=t.mapper.toViewPosition(s),a=r.breakAttributes(o);r.setSelection(a)}}function pCe(){return(i,e,t)=>{const n=t.writer,r=n.document.selection;for(const s of r.getRanges())s.isCollapsed&&s.end.parent.isAttached()&&t.writer.mergeAttributes(s.start);n.setSelection(null)}}function gCe(i){return(e,t,n)=>{if(!n.consumable.test(t.item,e.name))return;const r=i(t.attributeOldValue,n,t),s=i(t.attributeNewValue,n,t);if(!r&&!s)return;n.consumable.consume(t.item,e.name);const o=n.writer,a=o.document.selection;if(t.item instanceof ks||t.item instanceof us)o.wrap(a.getFirstRange(),s);else{let l=n.mapper.toViewRange(t.range);t.attributeOldValue!==null&&r&&(l=o.unwrap(l,r)),t.attributeNewValue!==null&&s&&o.wrap(l,s)}}}function bCe(i,e=zCe){return(t,n,r)=>{if(!e(n.item,r.consumable,{preflight:!0}))return;const s=i(n.item,r,n);if(!s)return;e(n.item,r.consumable);const o=n.reconversion&&lY(n.item,r)||r.mapper.toViewPosition(n.range.start);r.mapper.bindElements(n.item,s),r.writer.insert(o,s),r.convertAttributes(n.item),hY(s,n.item.getChildren(),r,{reconversion:n.reconversion})}}function yCe(i,e){return(t,n,r)=>{if(!e(n.item,r.consumable,{preflight:!0}))return;const s=new Map;r.writer._registerSlotFactory(LCe(n.item,s,r));const o=i(n.item,r,n);if(r.writer._clearSlotFactory(),!o)return;UCe(n.item,s,r),e(n.item,r.consumable);const a=n.reconversion&&lY(n.item,r)||r.mapper.toViewPosition(n.range.start);r.mapper.bindElements(n.item,o),r.writer.insert(a,o),r.convertAttributes(n.item),VCe(o,s,r,{reconversion:n.reconversion})}}function vCe(i){return(e,t,n)=>{t.isOpening=!0;const r=i(t,n);t.isOpening=!1;const s=i(t,n);if(!r||!s)return;const o=t.markerRange;if(o.isCollapsed&&!n.consumable.consume(o,e.name))return;for(const c of o)if(!n.consumable.consume(c.item,e.name))return;const a=n.mapper,l=n.writer;l.insert(a.toViewPosition(o.start),r),n.mapper.bindElementToMarker(r,t.markerName),o.isCollapsed||(l.insert(a.toViewPosition(o.end),s),n.mapper.bindElementToMarker(s,t.markerName)),e.stop()}}function aY(i,e){const t=e.writer.remove(i);for(const n of e.writer.createRangeIn(t).getItems())e.mapper.unbindViewElement(n,{defer:!0});return i.start}function lY(i,e){const t=e.mapper.toViewElement(i);return t&&aY(e.writer.createRangeOn(t),e)}function wCe(){return(i,e,t)=>{const n=t.mapper.markerNameToElements(e.markerName);if(n){for(const r of n)t.mapper.unbindElementFromMarkerName(r,e.markerName),t.writer.clear(t.writer.createRangeOn(r),r);t.writer.clearClonedElementsGroup(e.markerName),i.stop()}}}function xCe(i){return(e,t,n)=>{const r=i(t.markerName,n);if(!r)return;const s=t.markerRange;n.consumable.consume(s,e.name)&&(xM(s,!1,n,t,r),xM(s,!0,n,t,r),e.stop())}}function xM(i,e,t,n,r){const s=e?i.start:i.end,o=s.nodeAfter&&s.nodeAfter.is("element")?s.nodeAfter:null,a=s.nodeBefore&&s.nodeBefore.is("element")?s.nodeBefore:null;if(o||a){let c,d;e&&o||!e&&!a?(c=o,d=!0):(c=a,d=!1);const f=t.mapper.toViewElement(c);if(f){_Ce(f,e,d,t,n,r);return}}const l=t.mapper.toViewPosition(s);CCe(l,e,t,n,r)}
38function _Ce(i,e,t,n,r,s){const o=`data-${s.group}-${e?"start":"end"}-${t?"before":"after"}`,a=i.hasAttribute(o)?i.getAttribute(o).split(","):[];a.unshift(s.name),n.writer.setAttribute(o,a.join(","),i),n.mapper.bindElementToMarker(i,r.markerName)}function CCe(i,e,t,n,r){const s=`${r.group}-${e?"start":"end"}`,o=r.name?{name:r.name}:null,a=t.writer.createUIElement(s,o);t.writer.insert(i,a),t.mapper.bindElementToMarker(a,n.markerName)}function DCe(i){return(e,t,n)=>{const r=i(t.markerName,n);if(!r)return;const s=n.mapper.markerNameToElements(t.markerName);if(!s)return;for(const a of s)n.mapper.unbindElementFromMarkerName(a,t.markerName),a.is("containerElement")?(o(`data-${r.group}-start-before`,a),o(`data-${r.group}-start-after`,a),o(`data-${r.group}-end-before`,a),o(`data-${r.group}-end-after`,a)):n.writer.clear(n.writer.createRangeOn(a),a);n.writer.clearClonedElementsGroup(t.markerName),e.stop();function o(a,l){if(l.hasAttribute(a)){const c=new Set(l.getAttribute(a).split(","));c.delete(r.name),c.size==0?n.writer.removeAttribute(a,l):n.writer.setAttribute(a,Array.from(c).join(","),l)}}}}function ECe(i){return(e,t,n)=>{if(!n.consumable.test(t.item,e.name))return;const r=i(t.attributeOldValue,n,t),s=i(t.attributeNewValue,n,t);if(!r&&!s)return;n.consumable.consume(t.item,e.name);const o=n.mapper.toViewElement(t.item),a=n.writer;if(!o)throw new oe("conversion-attribute-to-attribute-on-text",n.dispatcher,t);if(t.attributeOldValue!==null&&r){let l=r.value;r.key=="style"&&(typeof r.value=="string"?l=new dh(a.document.stylesProcessor).setTo(r.value).getStylesEntries().map(([c])=>c):l=Object.keys(r.value)),a.removeAttribute(r.key,l,o)}if(t.attributeNewValue!==null&&s){let l=s.value;s.key=="style"&&typeof s.value=="string"&&(l=Object.fromEntries(new dh(a.document.stylesProcessor).setTo(s.value).getStylesEntries())),a.setAttribute(s.key,l,!1,o)}}}function TCe(i){return(e,t,n)=>{if(!t.item||!(t.item instanceof ks||t.item instanceof us)&&!t.item.is("$textProxy"))return;const r=K3(i,t,n);if(!r||!n.consumable.consume(t.item,e.name))return;const s=n.writer,o=oY(s,r),a=s.document.selection;if(t.item instanceof ks||t.item instanceof us)s.wrap(a.getFirstRange(),o);else{const l=n.mapper.toViewRange(t.range),c=s.wrap(l,o);for(const d of c.getItems())if(d.is("attributeElement")&&d.isSimilar(o)){n.mapper.bindElementToMarker(d,t.markerName);break}}}}function ACe(i){return(e,t,n)=>{if(!t.item||!(t.item instanceof An))return;const r=K3(i,t,n);if(!r||!n.consumable.test(t.item,e.name))return;const s=n.mapper.toViewElement(t.item);if(s&&s.getCustomProperty("addHighlight")){n.consumable.consume(t.item,e.name);for(const a of Ae._createIn(t.item))n.consumable.consume(a.item,e.name);s.getCustomProperty("addHighlight")(s,r,n.writer),n.mapper.bindElementToMarker(s,t.markerName)}}}function kCe(i){return(e,t,n)=>{if(t.markerRange.isCollapsed)return;const r=K3(i,t,n);if(!r)return;const s=oY(n.writer,r),o=n.mapper.markerNameToElements(t.markerName);if(o){for(const a of o)n.mapper.unbindElementFromMarkerName(a,t.markerName),a.is("attributeElement")?n.writer.unwrap(n.writer.createRangeOn(a),s):a.getCustomProperty("removeHighlight")(a,r.id,n.writer);n.writer.clearClonedElementsGroup(t.markerName),e.stop()}}}function SCe(i){const e=cY(i.model),t=Bg(i.view,"container");return e.attributes.length&&(e.children=!0),n=>{n.on(`insert:${e.name}`,bCe(t,fY(e)),{priority:i.converterPriority||"normal"}),(e.children||e.attributes.length)&&n.on("reduceChanges",dY(e),{priority:"low"})}}function PCe(i){const e=cY(i.model),t=Bg(i.view,"container");return e.children=!0,n=>{if(n._conversionApi.schema.checkChild(e.name,"$text"))throw new oe("conversion-element-to-structure-disallowed-text",n,{elementName:e.name});n.on(`insert:${e.name}`,yCe(t,fY(e)),{priority:i.converterPriority||"normal"}),n.on("reduceChanges",dY(e),{priority:"low"})}}function ICe(i){i=Br(i);let e=i.model;typeof e=="string"&&(e={key:e});let t=`attribute:${e.key}`;if(e.name&&(t+=":"+e.name),e.values)for(const r of e.values)i.view[r]=Bg(i.view[r],"attribute");else i.view=Bg(i.view,"attribute");const n=uY(i);return r=>{r.on(t,gCe(n),{priority:i.converterPriority||"normal"})}}function RCe(i){i=Br(i);let e=i.model;typeof e=="string"&&(e={key:e});let t=`attribute:${e.key}`;if(e.name&&(t+=":"+e.name),e.values)for(const r of e.values)i.view[r]=_M(i.view[r]);else i.view=_M(i.view);const n=uY(i);return r=>{r.on(t,ECe(n),{priority:i.converterPriority||"normal"})}}function FCe(i){const e=Bg(i.view,"ui");return t=>{t.on(`addMarker:${i.model}`,vCe(e),{priority:i.converterPriority||"normal"}),t.on(`removeMarker:${i.model}`,wCe(),{priority:i.converterPriority||"normal"})}}function OCe(i){i=Br(i);const e=i.model;let t=i.view;return t||(t=n=>({group:e,name:n.substr(i.model.length+1)})),n=>{n.on(`addMarker:${e}`,xCe(t),{priority:i.converterPriority||"normal"}),n.on(`removeMarker:${e}`,DCe(t),{priority:i.converterPriority||"normal"})}}function NCe(i){return e=>{e.on(`addMarker:${i.model}`,TCe(i.view),{priority:i.converterPriority||"normal"}),e.on(`addMarker:${i.model}`,ACe(i.view),{priority:i.converterPriority||"normal"}),e.on(`removeMarker:${i.model}`,kCe(i.view),{priority:i.converterPriority||"normal"})}}function cY(i){return typeof i=="string"&&(i={name:i}),{name:i.name,attributes:i.attributes?mn(i.attributes):[],children:!!i.children}}function Bg(i,e){return typeof i=="function"?i:(t,n)=>BCe(i,n,e)}function BCe(i,e,t){typeof i=="string"&&(i={name:i});let n;const r=e.writer,s=Object.assign({},i.attributes);if(t=="container")n=r.createContainerElement(i.name,s);else if(t=="attribute"){const o={priority:i.priority||fh.DEFAULT_PRIORITY};n=r.createAttributeElement(i.name,s,o)}else n=r.createUIElement(i.name,s);if(i.styles){const o=Object.keys(i.styles);for(const a of o)r.setStyle(a,i.styles[a],n)}if(i.classes){const o=i.classes;
38if(typeof o=="string")r.addClass(o,n);else for(const a of o)r.addClass(a,n)}return n}function uY(i){return i.model.values?(e,t,n)=>{const r=i.view[e];return r?r(e,t,n):null}:i.view}function _M(i){return typeof i=="string"?e=>({key:i,value:e}):typeof i=="object"?i.value?()=>i:e=>({key:i.key,value:e}):i}function K3(i,e,t){const n=typeof i=="function"?i(e,t):{...i};return n?(n.priority||(n.priority=10),n.id||(n.id=e.markerName),n):null}function MCe(i){return(e,t)=>{if(!e.is("element",i.name))return!1;if(t.type=="attribute"){if(i.attributes.includes(t.attributeKey))return!0}else{if(i.children)return!0}return!1}}function dY(i){const e=MCe(i);return(t,n)=>{const r=[];n.reconvertedElements||(n.reconvertedElements=new Set);for(const s of n.changes){const o=s.type=="attribute"?s.range.start.nodeAfter:s.position.parent;if(!o||!e(o,s)||s.type=="reinsert"){r.push(s);continue}if(s.type=="insert"&&s.action=="rename"&&n.refreshedItems.add(s.position.nodeAfter),!n.reconvertedElements.has(o)){n.reconvertedElements.add(o);const a=Ue._createBefore(o);let l=r.length;for(let c=r.length-1;c>=0;c--){const d=r[c],m=(d.type=="attribute"?d.range.start:d.position).compareWith(a);if(m=="before"||d.type=="remove"&&m=="same")break;l=c}r.splice(l,0,{type:"reinsert",name:o.name,position:a,length:1})}}n.changes=r}}function fY(i){return(e,t,n={})=>{const r=["insert"];for(const s of i.attributes)e.hasAttribute(s)&&r.push(`attribute:${s}`);return r.every(s=>t.test(e,s))?(n.preflight||r.forEach(s=>t.consume(e,s)),!0):!1}}function LCe(i,e,t){return(n,r)=>{const s=n.createContainerElement("$slot");let o=null;if(r==="children")o=Array.from(i.getChildren());else if(typeof r=="function")o=Array.from(i.getChildren()).filter(a=>r(a));else throw new oe("conversion-slot-mode-unknown",t.dispatcher,{modeOrFilter:r});return e.set(s,o),s}}function UCe(i,e,t){const n=Array.from(e.values()).flat(),r=new Set(n);if(r.size!=n.length)throw new oe("conversion-slot-filter-overlap",t.dispatcher,{element:i});if(r.size!=i.childCount)throw new oe("conversion-slot-filter-incomplete",t.dispatcher,{element:i})}function VCe(i,e,t,n){t.mapper.on("modelToViewPosition",o,{priority:"highest"});let r=null,s=null;for([r,s]of e)hY(i,s,t,n),t.writer.setCustomProperty("$structureSlotParent",!0,r.parent),t.writer.move(t.writer.createRangeIn(r),t.writer.createPositionBefore(r)),t.writer.remove(r);t.mapper.off("modelToViewPosition",o);function o(a,l){const c=l.modelPosition.nodeAfter,d=s.indexOf(c);d<0||(l.viewPosition=l.mapper.findPositionIn(r,d))}}function hY(i,e,t,n){for(const r of e)jCe(i.root,r,t,n)||t.convertItem(r)}function jCe(i,e,t,n){const{writer:r,mapper:s}=t;if(!n.reconversion)return!1;const o=s.toViewElement(e);return!o||o.root==i||!t.canReuseView(o)?!1:(r.move(r.createRangeOn(o),s.toViewPosition(Ue._createBefore(e))),!0)}function zCe(i,e,{preflight:t}={}){return t?e.test(i,"insert"):e.consume(i,"insert")}function mY(i){const{schema:e,document:t}=i.model;for(const n of t.getRoots())if(n.isEmpty&&!e.checkChild(n,"$text")&&e.checkChild(n,"paragraph"))return i.insertElement("paragraph",n),!0;return!1}function pY(i,e,t){const n=t.createContext(i);return!(!t.checkChild(n,"paragraph")||!t.checkChild(n.push("paragraph"),e))}function gY(i,e){const t=e.createElement("paragraph");return e.insert(t,i),e.createPositionAt(t,0)}class WCe extends iY{elementToElement(e){return this.add(bY(e))}elementToAttribute(e){return this.add($Ce(e))}attributeToAttribute(e){return this.add(GCe(e))}elementToMarker(e){return this.add(YCe(e))}dataToMarker(e){return this.add(KCe(e))}}function CM(){return(i,e,t)=>{if(!e.modelRange&&t.consumable.consume(e.viewItem,{name:!0})){const{modelRange:n,modelCursor:r}=t.convertChildren(e.viewItem,e.modelCursor);e.modelRange=n,e.modelCursor=r}}}function HCe(){return(i,e,{schema:t,consumable:n,writer:r})=>{let s=e.modelCursor;if(!n.test(e.viewItem))return;if(!t.checkChild(s,"$text")){if(!pY(s,"$text",t)||e.viewItem.data.trim().length==0)return;s=gY(s,r)}n.consume(e.viewItem);const o=r.createText(e.viewItem.data);r.insert(o,s),e.modelRange=r.createRange(s,s.getShiftedBy(o.offsetSize)),e.modelCursor=e.modelRange.end}}function qCe(i,e){return(t,n)=>{const r=n.newSelection,s=[];for(const a of r.getRanges())s.push(e.toModelRange(a));const o=i.createSelection(s,{backward:r.isBackward});o.isEqual(i.document.selection)||i.change(a=>{a.setSelection(o)})}}function bY(i){i=Br(i);const e=mS(i),t=X3(i.view),n=t?`element:${t}`:"element";return r=>{r.on(n,e,{priority:i.converterPriority||"normal"})}}function $Ce(i){i=Br(i),yY(i);const e=vY(i,!1),t=X3(i.view),n=t?`element:${t}`:"element";return r=>{r.on(n,e,{priority:i.converterPriority||"low"})}}function GCe(i){i=Br(i);let e=null;(typeof i.view=="string"||i.view.key)&&(e=ZCe(i)),yY(i,e);const t=vY(i,!0);return n=>{n.on("element",t,{priority:i.converterPriority||"low"})}}function YCe(i){const e=tDe(i.model);return bY({...i,model:e})}function KCe(i){i=Br(i),i.model||(i.model=r=>r?i.view+":"+r:i.view);const e={view:i.view,model:i.model},t=mS(DM(e,"start")),n=mS(DM(e,"end"));return r=>{r.on(`element:${i.view}-start`,t,{priority:i.converterPriority||"normal"}),r.on(`element:${i.view}-end`,n,{priority:i.converterPriority||"normal"});const s=ns.low,o=ns.highest,a=ns.get(i.converterPriority)/o;r.on("element",XCe(e),{priority:s+a})}}function XCe(i){return(e,t,n)=>{const r=`data-${i.view}`;if(!n.consumable.test(t.viewItem,{attributes:r+"-end-after"})&&!n.consumable.test(t.viewItem,{attributes:r+"-start-after"})&&!n.consumable.test(t.viewItem,{attributes:r+"-end-before"})&&!n.consumable.test(t.viewItem,{attributes:r+"-start-before"}))return;t.modelRange||Object.assign(t,n.convertChildren(t.viewItem,t.modelCursor)),n.consumable.consume(t.viewItem,{attributes:r+"-end-after"})&&s(t.modelRange.end,t.viewItem.getAttribute(r+"-end-after").split(",")),n.consumable.consume(t.viewItem,{attributes:r+"-start-after"})&&s(t.modelRange.end,t.viewItem.getAttribute(r+"-start-after").split(",")),n.consumable.consume(t.viewItem,{attributes:r+"-end-before"})&&s(t.modelRange.start,t.viewItem.getAttribute(r+"-end-before").split(",")),n.consumable.consume(t.viewItem,{attributes:r+"-start-before"})&&s(t.modelRange.start,t.viewItem.getAttribute(r+"-start-before").split(","));function s(o,a){for(const l of a){const c=i.model(l,n),d=n.writer.createElement("$marker",{"data-name":c});n.writer.insert(d,o),t.modelCursor.isEqual(o)?t.modelCursor=t.modelCursor.getShiftedBy(1):t.modelCursor=t.modelCursor._getTransformedByInsertion(o,1),t.modelRange=t.modelRange._getTransformedByInsertion(o,1)[0]}}}}function X3(i){return typeof i=="string"?i:typeof i=="object"&&typeof i.name=="string"?i.name:null}function mS(i){const e=new Rl(i.view);return(t,n,r)=>{const s=e.match(n.viewItem);if(!s)return;const o=s.match;if(o.name=!0,!r.consumable.test(n.viewItem,o))return;const a=QCe(i.model,n.viewItem,r);a&&r.safeInsert(a,n.modelCursor)&&(r.consumable.consume(n.viewItem,o),r.convertChildren(n.viewItem,a),r.updateConversionResult(a,n))}}function QCe(i,e,t){return i instanceof Function?i(e,t):t.writer.createElement(i)}function ZCe(i){typeof i.view=="string"&&(i.view={key:i.view});const e=i.view.key,t=typeof i.view.value>"u"?/[\s\S]*/:i.view.value;let n;return e=="class"||e=="style"?n={[e=="class"?"classes":"styles"]:t}:n={attributes:{[e]:t}},i.view.name&&(n.name=i.view.name),i.view=n,e}function yY(i,e=null){const t=e===null?!0:s=>s.getAttribute(e),n=typeof i.model!="object"?i.model:i.model.key,r=typeof i.model!="object"||typeof i.model.value>"u"?t:i.model.value;i.model={key:n,value:r}}function vY(i,e){const t=new Rl(i.view);return(n,r,s)=>{if(!r.modelRange&&e)return;const o=t.match(r.viewItem);if(!o||(JCe(i.view,r.viewItem)?o.match.name=!0:delete o.match.name,!s.consumable.test(r.viewItem,o.match)))return;const a=i.model.key,l=typeof i.model.value=="function"?i.model.value(r.viewItem,s,r):i.model.value;if(l==null)return;r.modelRange||Object.assign(r,s.convertChildren(r.viewItem,r.modelCursor)),eDe(r.modelRange,{key:a,value:l}
38,e,s)&&(s.consumable.test(r.viewItem,{name:!0})&&(o.match.name=!0),s.consumable.consume(r.viewItem,o.match))}}function JCe(i,e){const t=typeof i=="function"?i(e):i;return typeof t=="object"&&!X3(t)?!1:!t.classes&&!t.attributes&&!t.styles}function eDe(i,e,t,n){let r=!1;for(const s of Array.from(i.getItems({shallow:t})))n.schema.checkAttribute(s,e.key)&&(r=!0,!s.hasAttribute(e.key)&&n.writer.setAttribute(e.key,e.value,s));return r}function tDe(i){return(e,t)=>{const n=typeof i=="string"?i:i(e,t);return t.writer.createElement("$marker",{"data-name":n})}}function DM(i,e){const t=(n,r)=>{const s=n.getAttribute("name"),o=i.model(s,r);return r.writer.createElement("$marker",{"data-name":o})};return{view:`${i.view}-${e}`,model:t}}class nDe extends hn(){model;view;mapper;downcastDispatcher;constructor(e,t){super(),this.model=e,this.view=new G2e(t),this.mapper=new eY,this.downcastDispatcher=new tY({mapper:this.mapper,schema:e.schema});const n=this.model.document,r=n.selection,s=this.model.markers;this.listenTo(this.model,"_beforeChanges",()=>{this.view._disableRendering(!0)},{priority:"highest"}),this.listenTo(this.model,"_afterChanges",()=>{this.view._disableRendering(!1)},{priority:"lowest"}),this.listenTo(n,"change",()=>{this.view.change(o=>{this.downcastDispatcher.convertChanges(n.differ,s,o),this.downcastDispatcher.convertSelection(r,s,o)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",qCe(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",rY(),{priority:"lowest"}),this.downcastDispatcher.on("insert",sY(),{priority:"lowest"}),this.downcastDispatcher.on("remove",fCe(),{priority:"low"}),this.downcastDispatcher.on("cleanSelection",pCe()),this.downcastDispatcher.on("selection",hCe(),{priority:"low"}),this.downcastDispatcher.on("selection",mCe(),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(o=>{if(o.rootName=="$graveyard")return null;const a=new jG(this.view.document,o.name);return a.rootName=o.rootName,this.mapper.bindElements(o,a),a})}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t=typeof e=="string"?e:e.name,n=this.model.markers.get(t);if(!n)throw new oe("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change(()=>{this.model.markers._refresh(n)})}reconvertItem(e){this.model.change(()=>{this.model.document.differ._refreshItem(e)})}}class iDe extends hn(){_sourceDefinitions={};_attributeProperties=Object.create(null);_customChildChecks=new Map;_customAttributeChecks=new Map;_genericCheckSymbol=Symbol("$generic");_compiledDefinitions;constructor(){super(),this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",(e,t)=>{t[0]=new _l(t[0])},{priority:"highest"}),this.on("checkChild",(e,t)=>{t[0]=new _l(t[0]),t[1]=this.getDefinition(t[1])},{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new oe("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new oe("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return typeof e=="string"?t=e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?t="$text":t=e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!!(t&&t.isBlock)}isLimit(e){const t=this.getDefinition(e);return t?!!(t.isLimit||t.isObject):!1}isObject(e){const t=this.getDefinition(e);return t?!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent):!1}isInline(e){const t=this.getDefinition(e);return!!(t&&t.isInline)}isSelectable(e){const t=this.getDefinition(e);return t?!!(t.isSelectable||t.isObject):!1}isContent(e){const t=this.getDefinition(e);return t?!!(t.isContent||t.isObject):!1}checkChild(e,t){return t?this._checkContextMatch(e,t):!1}checkAttribute(e,t){const n=this.getDefinition(e.last);if(!n)return!1;const r=this._evaluateAttributeChecks(e,t);return r!==void 0?r:n.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof Ue){const n=e.nodeBefore,r=e.nodeAfter;if(!(n instanceof An))throw new oe("schema-check-merge-no-element-before",this);if(!(r instanceof An))throw new oe("schema-check-merge-no-element-after",this);return this.checkMerge(n,r)}if(this.isLimit(e)||this.isLimit(t))return!1;for(const n of t.getChildren())if(!this.checkChild(e,n))return!1;return!0}addChildCheck(e,t){const n=t!==void 0?t:this._genericCheckSymbol,r=this._customChildChecks.get(n)||[];r.push(e),this._customChildChecks.set(n,r)}addAttributeCheck(e,t){const n=t!==void 0?t:this._genericCheckSymbol,r=this._customAttributeChecks.get(n)||[];r.push(e),this._customAttributeChecks.set(n,r)}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||Object.create(null)}getLimitElement(e){let t;for(e instanceof Ue?t=e.parent:t=(e instanceof Ae?[e]:Array.from(e.getRanges())).reduce((r,s)=>{const o=s.getCommonAncestor();return r?r.getCommonAncestor(o,{includeSelf:!0}):o},null);!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const r=[...e.getFirstPosition().getAncestors(),new On("",e.getAttributes())];return this.checkAttribute(r,t)}else{const n=e.getRanges();for(const r of n)for(const s of r)if(this.checkAttribute(s.item,t))return!0}return!1}*getValidRanges(e,t,n={}){e=vDe(e);for(const r of e)yield*this._getValidRangesForRange(r,t,n)}getNearestSelectionRange(e,t="both"){if(e.root.rootName=="$graveyard")return null;if(this.checkChild(e,"$text"))return new Ae(e);let n,r;const s=e.getAncestors().reverse().find(o=>this.isLimit(o))||e.root;(t=="both"||t=="backward")&&(n=new bl({boundaries:Ae._createIn(s),startPosition:e,direction:"backward"})),(t=="both"||t=="forward")&&(r=new bl({boundaries:Ae._createIn(s),startPosition:e}));for(const o of yDe(n,r)){const a=o.walker==n?"elementEnd":"elementStart",l=o.value;if(l.type==a&&this.isObject(l.item))return Ae._createOn(l.item);if(this.checkChild(l.nextPosition,"$text"))return new Ae(l.nextPosition)}return null}findAllowedParent(e,t){let n=e.parent;for(;n;){if(this.checkChild(n,t))return n;if(this.isLimit(n))return null;n=n.parent}return null}
38setAllowedAttributes(e,t,n){const r=n.model;for(const[s,o]of Object.entries(t))r.schema.checkAttribute(e,s)&&n.setAttribute(s,o,e)}removeDisallowedAttributes(e,t){for(const n of e)if(n.is("$text"))EM(this,n,t);else{const s=Ae._createIn(n).getPositions();for(const o of s){const a=o.nodeBefore||o.parent;EM(this,a,t)}}}getAttributesWithProperty(e,t,n){const r={};for(const[s,o]of e.getAttributes()){const a=this.getAttributeProperties(s);a[t]!==void 0&&(n===void 0||n===a[t])&&(r[s]=o)}return r}createContext(e){return new _l(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,n=Object.keys(t);for(const s of n)e[s]=rDe(t[s],s);const r=Object.values(e);for(const s of r)sDe(e,s),oDe(e,s),aDe(e,s),lDe(e,s);for(const s of r)cDe(e,s);for(const s of r)uDe(e,s);for(const s of r)dDe(e,s);for(const s of r)hDe(e,s);for(const s of r)mDe(e,s);this._compiledDefinitions=fDe(e)}_checkContextMatch(e,t){const n=e.last;let r=this._evaluateChildChecks(e,t);if(r=r!==void 0?r:t.allowIn.includes(n.name),!r)return!1;const s=this.getDefinition(n),o=e.trimLast();return s?o.length==0?!0:this._checkContextMatch(o,s):!1}_evaluateChildChecks(e,t){const n=this._customChildChecks.get(this._genericCheckSymbol)||[],r=this._customChildChecks.get(t.name)||[];for(const s of[...n,...r]){const o=s(e,t);if(o!==void 0)return o}}_evaluateAttributeChecks(e,t){const n=this._customAttributeChecks.get(this._genericCheckSymbol)||[],r=this._customAttributeChecks.get(t)||[];for(const s of[...n,...r]){const o=s(e,t);if(o!==void 0)return o}}*_getValidRangesForRange(e,t,n){let r=e.start,s=e.start;for(const o of e.getItems({shallow:!0})){if(o.is("element"))if(n.includeEmptyRanges&&o.isEmpty){const a=this.createContext(o);this.checkChild(a,"$text")&&this.checkAttribute(a.push("$text"),t)&&(yield Ae._createIn(o))}else yield*this._getValidRangesForRange(Ae._createIn(o),t,n);this.checkAttribute(o,t)||(r.isEqual(s)||(yield new Ae(r,s)),r=Ue._createAfter(o)),s=Ue._createAfter(o)}r.isEqual(s)||(yield new Ae(r,s))}findOptimalInsertionRange(e,t){const n=e.getSelectedElement();if(n&&this.isObject(n)&&!this.isInline(n))return t=="before"||t=="after"?new Ae(Ue._createAt(n,t)):Ae._createOn(n);const r=Rn(e.getSelectedBlocks());if(!r)return new Ae(e.focus);if(r.isEmpty)return new Ae(Ue._createAt(r,0));const s=Ue._createAfter(r);return e.focus.isTouching(s)?new Ae(s):new Ae(Ue._createBefore(r))}}class _l{_items;constructor(e){if(e instanceof _l)return e;let t;typeof e=="string"?t=[e]:Array.isArray(e)?t=e:t=e.getAncestors({includeSelf:!0}),this._items=t.map(bDe)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new _l([e]);return t._items=[...this._items,...t._items],t}trimLast(){const e=new _l([]);return e._items=this._items.slice(0,-1),e}getItem(e){return this._items[e]}*getNames(){yield*this._items.map(e=>e.name)}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function rDe(i,e){const t={name:e,allowIn:new Set,allowChildren:new Set,disallowIn:new Set,disallowChildren:new Set,allowContentOf:new Set,allowWhere:new Set,allowAttributes:new Set,disallowAttributes:new Set,allowAttributesOf:new Set,inheritTypesFrom:new Set};return pDe(i,t),ta(i,t,"allowIn"),ta(i,t,"allowChildren"),ta(i,t,"disallowIn"),ta(i,t,"disallowChildren"),ta(i,t,"allowContentOf"),ta(i,t,"allowWhere"),ta(i,t,"allowAttributes"),ta(i,t,"disallowAttributes"),ta(i,t,"allowAttributesOf"),ta(i,t,"inheritTypesFrom"),gDe(i,t),t}function sDe(i,e){for(const t of e.allowIn){const n=i[t];n?n.allowChildren.add(e.name):e.allowIn.delete(t)}}function oDe(i,e){for(const t of e.allowChildren){const n=i[t];n?n.allowIn.add(e.name):e.allowChildren.delete(t)}}function aDe(i,e){for(const t of e.disallowIn){const n=i[t];n?n.disallowChildren.add(e.name):e.disallowIn.delete(t)}}function lDe(i,e){for(const t of e.disallowChildren){const n=i[t];n?n.disallowIn.add(e.name):e.disallowChildren.delete(t)}}function cDe(i,e){for(const t of e.disallowChildren)e.allowChildren.delete(t);for(const t of e.disallowIn)e.allowIn.delete(t);for(const t of e.disallowAttributes)e.allowAttributes.delete(t)}function uDe(i,e){for(const t of e.allowContentOf){const n=i[t];
38n&&(n.disallowChildren.forEach(r=>{e.allowChildren.has(r)||(e.disallowChildren.add(r),i[r].disallowIn.add(e.name))}),n.allowChildren.forEach(r=>{e.disallowChildren.has(r)||(e.allowChildren.add(r),i[r].allowIn.add(e.name))}))}}function dDe(i,e){for(const t of e.allowWhere){const n=i[t];n&&(n.disallowIn.forEach(r=>{e.allowIn.has(r)||(e.disallowIn.add(r),i[r].disallowChildren.add(e.name))}),n.allowIn.forEach(r=>{e.disallowIn.has(r)||(e.allowIn.add(r),i[r].allowChildren.add(e.name))}))}}function fDe(i){const e={};for(const t of Object.values(i))e[t.name]={name:t.name,isBlock:!!t.isBlock,isContent:!!t.isContent,isInline:!!t.isInline,isLimit:!!t.isLimit,isObject:!!t.isObject,isSelectable:!!t.isSelectable,allowIn:Array.from(t.allowIn).filter(n=>!!i[n]),allowChildren:Array.from(t.allowChildren).filter(n=>!!i[n]),allowAttributes:Array.from(t.allowAttributes)};return e}function hDe(i,e){for(const t of e.allowAttributesOf){const n=i[t];if(!n)return;n.allowAttributes.forEach(r=>{e.disallowAttributes.has(r)||e.allowAttributes.add(r)})}}function mDe(i,e){for(const t of e.inheritTypesFrom){const n=i[t];if(n){const r=Object.keys(n).filter(s=>s.startsWith("is"));for(const s of r)s in e||(e[s]=n[s])}}}function pDe(i,e){for(const t of i){const n=Object.keys(t).filter(r=>r.startsWith("is"));for(const r of n)e[r]=!!t[r]}}function ta(i,e,t){for(const n of i){let r=n[t];typeof r=="string"&&(r=[r]),Array.isArray(r)&&r.forEach(s=>e[t].add(s))}}function gDe(i,e){for(const t of i){const n=t.inheritAllFrom;n&&(e.allowContentOf.add(n),e.allowWhere.add(n),e.allowAttributesOf.add(n),e.inheritTypesFrom.add(n))}}function bDe(i){return typeof i=="string"||i.is("documentFragment")?{name:typeof i=="string"?i:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:i.is("element")?i.name:"$text",*getAttributeKeys(){yield*i.getAttributeKeys()},getAttribute(e){return i.getAttribute(e)}}}function*yDe(i,e){let t=!1;for(;!t;){if(t=!0,i){const n=i.next();n.done||(t=!1,yield{walker:i,value:n.value})}if(e){const n=e.next();n.done||(t=!1,yield{walker:e,value:n.value})}}}function*vDe(i){for(const e of i)yield*e.getMinimalFlatRanges()}function EM(i,e,t){for(const n of e.getAttributeKeys())i.checkAttribute(e,n)||t.removeAttribute(n,e)}class wDe extends Sn(){conversionApi;_splitParts=new Map;_cursorParents=new Map;_modelCursor=null;_emptyElementsToKeep=new Set;constructor(e){super(),this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(t,n)=>this._convertItem(t,n),convertChildren:(t,n)=>this._convertChildren(t,n),safeInsert:(t,n)=>this._safeInsert(t,n),updateConversionResult:(t,n)=>this._updateConversionResult(t,n),splitToAllowedParent:(t,n)=>this._splitToAllowedParent(t,n),getSplitParts:t=>this._getSplitParts(t),keepEmptyElement:t=>this._keepEmptyElement(t)}}convert(e,t,n=["$root"]){this.fire("viewCleanup",e),this._modelCursor=_De(n,t),this.conversionApi.writer=t,this.conversionApi.consumable=$w.createFrom(e),this.conversionApi.store={};const{modelRange:r}=this._convertItem(e,this._modelCursor),s=t.createDocumentFragment();if(r){this._removeEmptyElements();const o=this._modelCursor.parent,a=o._removeChildren(0,o.childCount);s._insertChild(0,a),s.markers=xDe(s,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,s}_convertItem(e,t){const n={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,n,this.conversionApi):e.is("$text")?this.fire("text",n,this.conversionApi):this.fire("documentFragment",n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof Ae))throw new oe("view-conversion-dispatcher-incorrect-result",this);return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(e,t){let n=t.is("position")?t:Ue._createAt(t,0);const r=new Ae(n);for(const s of Array.from(e.getChildren())){const o=this._convertItem(s,n);o.modelRange instanceof Ae&&(r.end=o.modelRange.end,n=o.modelCursor)}return{modelRange:r,modelCursor:n}}_safeInsert(e,t){const n=this._splitToAllowedParent(e,t);return n?(this.conversionApi.writer.insert(e,n.position),!0):!1}_updateConversionResult(e,t){const n=this._getSplitParts(e),r=this.conversionApi.writer;t.modelRange||(t.modelRange=r.createRange(r.createPositionBefore(e),r.createPositionAfter(n[n.length-1])));const s=this._cursorParents.get(e);s?t.modelCursor=r.createPositionAt(s,0):t.modelCursor=t.modelRange.end}_splitToAllowedParent(e,t){const{schema:n,writer:r}=this.conversionApi;let s=n.findAllowedParent(t,e);if(s){if(s===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(s)&&(s=null)}if(!s)return pY(t,e,n)?{position:gY(t,r)}:null;const o=this.conversionApi.writer.split(t,s),a=[];for(const c of o.range.getWalker())if(c.type=="elementEnd")a.push(c.item);else{const d=a.pop(),f=c.item;this._registerSplitPair(d,f)}const l=o.range.end.parent;return this._cursorParents.set(e,l),{position:o.position,cursorParent:l}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const n=this._splitParts.get(e);this._splitParts.set(t,n),n.push(t)}_getSplitParts(e){let t;return this._splitParts.has(e)?t=this._splitParts.get(e):t=[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){const e=new Map;
38for(const t of this._splitParts.keys())if(t.isEmpty&&!this._emptyElementsToKeep.has(t)){const n=e.get(t.parent)||[];n.push(t),this._splitParts.delete(t),e.set(t.parent,n)}for(const[t,n]of e)t._removeChildrenArray(n);e.size&&this._removeEmptyElements()}}function xDe(i,e){const t=new Set,n=new Map,r=Ae._createIn(i).getItems();for(const s of r)s.is("element","$marker")&&t.add(s);for(const s of t){const o=s.getAttribute("data-name"),a=e.createPositionBefore(s);n.has(o)?n.get(o).end=a.clone():n.set(o,new Ae(a.clone())),e.remove(s)}return n}function _De(i,e){let t;for(const n of new _l(i)){const r={};for(const o of n.getAttributeKeys())r[o]=n.getAttribute(o);const s=e.createElement(n.name,r);t&&e.insert(s,t),t=Ue._createAt(s,0)}return t}class CDe{getHtml(e){const n=$e.document.implementation.createHTMLDocument("").createElement("div");return n.appendChild(e),n.innerHTML}}class DDe{domParser;domConverter;htmlWriter;skipComments=!0;constructor(e){this.domParser=new DOMParser,this.domConverter=new YG(e,{renderingMode:"data"}),this.htmlWriter=new CDe}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode=e=="marked"?"markedNbsp":"nbsp"}_toDom(e){/<(?:html|body|head|meta)(?:\s[^>]*)?>/i.test(e.trim().slice(0,1e4))||(e=`<body>${e}</body>`);const t=this.domParser.parseFromString(e,"text/html"),n=t.createDocumentFragment(),r=t.body.childNodes;for(;r.length>0;)n.appendChild(r[0]);return n}}class EDe extends Sn(){model;mapper;downcastDispatcher;upcastDispatcher;viewDocument;stylesProcessor;htmlProcessor;processor;_viewWriter;constructor(e,t){super(),this.model=e,this.mapper=new eY,this.downcastDispatcher=new tY({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",rY(),{priority:"lowest"}),this.downcastDispatcher.on("insert",sY(),{priority:"lowest"}),this.upcastDispatcher=new wDe({schema:e.schema}),this.viewDocument=new zG(t),this.stylesProcessor=t,this.htmlProcessor=new DDe(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new WG(this.viewDocument),this.upcastDispatcher.on("text",HCe(),{priority:"lowest"}),this.upcastDispatcher.on("element",CM(),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",CM(),{priority:"lowest"}),hn().prototype.decorate.call(this,"init"),hn().prototype.decorate.call(this,"set"),hn().prototype.decorate.call(this,"get"),hn().prototype.decorate.call(this,"toView"),hn().prototype.decorate.call(this,"toModel"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"}),this.on("ready",()=>{this.model.enqueueChange({isUndoable:!1},mY)},{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:n="empty"}=e;if(!this._checkIfRootsExists([t]))throw new oe("datacontroller-get-non-existent-root",this);const r=this.model.document.getRoot(t);return r.isAttached()||Kt("datacontroller-get-detached-root",this),n==="empty"&&!this.model.hasContent(r,{ignoreWhitespaces:!0})?"":this.stringify(r,e)}stringify(e,t={}){const n=this.toView(e,t);return this.processor.toData(n)}toView(e,t={}){const n=this.viewDocument,r=this._viewWriter;this.mapper.clearBindings();const s=Ae._createIn(e),o=new ed(n);this.mapper.bindElements(e,o);const a=e.is("documentFragment")?e.markers:TDe(e);return this.downcastDispatcher.convert(s,a,r,t),o}init(e){if(this.model.document.version)throw new oe("datacontroller-init-document-not-empty",this);let t={};if(typeof e=="string"?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new oe("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},n=>{for(const r of Object.keys(t)){const s=this.model.document.getRoot(r);n.insert(this.parse(t[r],s),s,0)}}),Promise.resolve()}set(e,t={}){let n={};if(typeof e=="string"?n.main=e:n=e,!this._checkIfRootsExists(Object.keys(n)))throw new oe("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},r=>{r.setSelection(null),r.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const s of Object.keys(n)){const o=this.model.document.getRoot(s);r.remove(r.createRangeIn(o)),r.insert(this.parse(n[s],o),o,0)}})}parse(e,t="$root"){const n=this.processor.toView(e);return this.toModel(n,t)}toModel(e,t="$root"){return this.model.change(n=>this.upcastDispatcher.convert(e,n,t))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRoot(t))return!1;return!0}}function TDe(i){const e=[],t=i.root.document;if(!t)return new Map;const n=Ae._createIn(i);for(const r of t.model.markers){const s=r.getRange(),o=s.isCollapsed,a=s.start.isEqual(n.start)||s.end.isEqual(n.end);if(o&&a)e.push([r.name,s]);else{const l=n.getIntersection(s);l&&e.push([r.name,l])}}return e.sort(([r,s],[o,a])=>{if(s.end.compareWith(a.start)!=="after")return 1;if(s.start.compareWith(a.end)!=="before")return-1;switch(s.start.compareWith(a.start)){case"before":return 1;case"after":return-1;default:switch(s.end.compareWith(a.end)){case"before":return 1;case"after":return-1;default:return o.localeCompare(r)}}}),new Map(e)}class ADe{_helpers=new Map;_downcast;_upcast;constructor(e,t){this._downcast=mn(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=mn(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const n=this._downcast.includes(t);if(!this._upcast.includes(t)&&!n)throw new oe("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:n})}for(e){if(!this._helpers.has(e))throw new oe("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:n}of FE(e))this.for("upcast").elementToElement({model:t,view:n,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:n}of FE(e))this.for("upcast").elementToAttribute({view:n,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:n}of FE(e))this.for("upcast").attributeToAttribute({view:n,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:n}){if(this._helpers.has(e))throw new oe("conversion-group-exists",this);const r=n?new dCe(t):new WCe(t);this._helpers.set(e,r)}}function*FE(i){if(i.model.values)for(const e of i.model.values){const t={key:i.model.key,value:e},n=i.view[e],r=i.upcastAlso?i.upcastAlso[e]:void 0;yield*TM(t,n,r)}else yield*TM(i.model,i.view,i.upcastAlso)}function*TM(i,e,t){if(yield{model:i,view:e},t)for(const n of mn(t))yield{model:i,view:n}}class Ms{baseVersion;isDocumentOperation;batch;constructor(e){this.baseVersion=e,this.isDocumentOperation=this.baseVersion!==null,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}function Q3(i,e){const t=xY(e),n=t.reduce((o,a)=>o+a.offsetSize,0),r=i.parent;Ug(i);const s=i.index;return r._insertChild(s,t),Lg(r,s+t.length),Lg(r,s),new Ae(i,i.getShiftedBy(n))}function wY(i){if(!i.isFlat)throw new oe("operation-utils-remove-range-not-flat",this);const e=i.start.parent;Ug(i.start),Ug(i.end);const t=e._removeChildren(i.start.index,i.end.index-i.start.index);return Lg(e,i.start.index),t}function Mg(i,e){if(!i.isFlat)throw new oe("operation-utils-move-range-not-flat",this);const t=wY(i);return e=e._getTransformedByDeletion(i.start,i.end.offset-i.start.offset),Q3(e,t)}function kDe(i,e,t){Ug(i.start),Ug(i.end);for(const n of i.getItems({shallow:!0})){const r=n.is("$textProxy")?n.textNode:n;t!==null?r._setAttribute(e,t):r._removeAttribute(e),Lg(r.parent,r.index)}Lg(i.end.parent,i.end.index)}function xY(i){const e=[];function t(n){if(typeof n=="string")e.push(new On(n));else if(n instanceof Ro)e.push(new On(n.data,n.getAttributes()));else if(n instanceof yd)e.push(n);else if(Bs(n))for(const r of n)t(r)}t(i);for(let n=1;n<e.length;n++){const r=e[n],s=e[n-1];
38r instanceof On&&s instanceof On&&_Y(r,s)&&(e.splice(n-1,2,new On(s.data+r.data,s.getAttributes())),n--)}return e}function Lg(i,e){const t=i.getChild(e-1),n=i.getChild(e);if(t&&n&&t.is("$text")&&n.is("$text")&&_Y(t,n)){const r=new On(t.data+n.data,t.getAttributes());i._removeChildren(e-1,2),i._insertChild(e-1,r)}}function Ug(i){const e=i.textNode,t=i.parent;if(e){const n=i.offset-e.startOffset,r=e.index;t._removeChildren(r,1);const s=new On(e.data.substr(0,n),e.getAttributes()),o=new On(e.data.substr(n),e.getAttributes());t._insertChild(r,[s,o])}}function _Y(i,e){const t=i.getAttributes(),n=e.getAttributes();for(const r of t){if(r[1]!==e.getAttribute(r[0]))return!1;n.next()}return n.next().done}class rn extends Ms{sourcePosition;howMany;targetPosition;constructor(e,t,n,r){super(r),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toNext",this.howMany=t,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNone"}get type(){return this.targetPosition.root.rootName==this.sourcePosition.root.rootName?"move":this.targetPosition.root.rootName=="$graveyard"?"remove":this.sourcePosition.root.rootName=="$graveyard"?"reinsert":"move"}get affectedSelectable(){return[Ae._createFromPositionAndShift(this.sourcePosition,this.howMany),Ae._createFromPositionAndShift(this.targetPosition,0)]}clone(){return new rn(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new rn(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,n=this.sourcePosition.offset,r=this.targetPosition.offset;if(n+this.howMany>e.maxOffset)throw new oe("move-operation-nodes-do-not-exist",this);if(e===t&&n<r&&r<n+this.howMany)throw new oe("move-operation-range-into-itself",this);if(this.sourcePosition.root==this.targetPosition.root&&ji(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())=="prefix"){const s=this.sourcePosition.path.length-1;if(this.targetPosition.path[s]>=n&&this.targetPosition.path[s]<n+this.howMany)throw new oe("move-operation-node-into-itself",this)}}_execute(){Mg(Ae._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e.targetPosition=this.targetPosition.toJSON(),e}static get className(){return"MoveOperation"}static fromJSON(e,t){const n=Ue.fromJSON(e.sourcePosition,t),r=Ue.fromJSON(e.targetPosition,t);return new this(n,e.howMany,r,e.baseVersion)}}class Wi extends Ms{position;nodes;shouldReceiveAttributes;constructor(e,t,n){super(n),this.position=e.clone(),this.position.stickiness="toNone",this.nodes=new ig(xY(t)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}get affectedSelectable(){return this.position.clone()}clone(){const e=new ig([...this.nodes].map(n=>n._clone(!0))),t=new Wi(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new Ue(e,[0]);return new rn(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffset<this.position.offset)throw new oe("insert-operation-position-invalid",this)}_execute(){const e=this.nodes;this.nodes=new ig([...e].map(t=>t._clone(!0))),Q3(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const n=[];for(const s of e.nodes)s.name?n.push(An.fromJSON(s)):n.push(On.fromJSON(s));const r=new Wi(Ue.fromJSON(e.position,t),n,e.baseVersion);return r.shouldReceiveAttributes=e.shouldReceiveAttributes,r}}class kn extends Ms{splitPosition;howMany;insertionPosition;graveyardPosition;constructor(e,t,n,r,s){super(s),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=n,this.graveyardPosition=r?r.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new Ue(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Ae(this.splitPosition,e)}get affectedSelectable(){const e=[Ae._createFromPositionAndShift(this.splitPosition,0),Ae._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&e.push(Ae._createFromPositionAndShift(this.graveyardPosition,0)),e}clone(){return new kn(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new Ue(e,[0]);return new si(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset<t)throw new oe("split-operation-position-invalid",this);if(e.parent){if(this.howMany!==Number.NEGATIVE_INFINITY&&this.howMany!=e.maxOffset-this.splitPosition.offset)throw new oe("split-operation-how-many-invalid",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new oe("split-operation-graveyard-position-invalid",this)}else throw new oe("split-operation-split-in-root",this);this.howMany=this.splitPosition.parent.maxOffset-this.splitPosition.offset}_execute(){const e=this.splitPosition.parent;if(this.graveyardPosition)Mg(Ae._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const n=e._clone();Q3(this.insertionPosition,n)}const t=new Ae(Ue._createAt(e,this.splitPosition.offset),Ue._createAt(e,e.maxOffset));Mg(t,this.moveTargetPosition)}toJSON(){const e=super.toJSON();return e.splitPosition=this.splitPosition.toJSON(),e.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(e.graveyardPosition=this.graveyardPosition.toJSON()),e}static get className(){return"SplitOperation"}static getInsertionPosition(e){const t=e.path.slice(0,-1);return t[t.length-1]++,new Ue(e.root,t,"toPrevious")}static fromJSON(e,t){const n=Ue.fromJSON(e.splitPosition,t),r=Ue.fromJSON(e.insertionPosition,t),s=e.graveyardPosition?Ue.fromJSON(e.graveyardPosition,t):null;return new this(n,e.howMany,r,s,e.baseVersion)}}class si extends Ms{sourcePosition;howMany;targetPosition;graveyardPosition;
38constructor(e,t,n,r,s){super(s),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=r.clone()}get type(){return"merge"}get deletionPosition(){return new Ue(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Ae(this.sourcePosition,e)}get affectedSelectable(){const e=this.sourcePosition.parent;return[Ae._createOn(e),Ae._createFromPositionAndShift(this.targetPosition,0),Ae._createFromPositionAndShift(this.graveyardPosition,0)]}clone(){return new si(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),n=new Ue(this.sourcePosition.root,t)._getTransformedByMergeOperation(this);return new kn(e,this.howMany,n,this.graveyardPosition,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(e.parent)if(t.parent){if(this.howMany!==Number.NEGATIVE_INFINITY&&this.howMany!=e.maxOffset)throw new oe("merge-operation-how-many-invalid",this)}else throw new oe("merge-operation-target-position-invalid",this);else throw new oe("merge-operation-source-position-invalid",this);this.howMany=this.sourcePosition.parent.maxOffset}_execute(){const e=this.sourcePosition.parent,t=Ae._createIn(e);Mg(t,this.targetPosition),Mg(Ae._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){const n=Ue.fromJSON(e.sourcePosition,t),r=Ue.fromJSON(e.targetPosition,t),s=Ue.fromJSON(e.graveyardPosition,t);return new this(n,e.howMany,r,s,e.baseVersion)}}class Rr extends Ms{name;oldRange;newRange;affectsData;_markers;constructor(e,t,n,r,s,o){super(o),this.name=e,this.oldRange=t?t.clone():null,this.newRange=n?n.clone():null,this.affectsData=s,this._markers=r}get type(){return"marker"}get affectedSelectable(){const e=[];return this.oldRange&&e.push(this.oldRange.clone()),this.newRange&&(this.oldRange?e.push(...this.newRange.getDifference(this.oldRange)):e.push(this.newRange.clone())),e}clone(){return new Rr(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new Rr(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){this.newRange?this._markers._set(this.name,this.newRange,!0,this.affectsData):this._markers._remove(this.name)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new Rr(e.name,e.oldRange?Ae.fromJSON(e.oldRange,t):null,e.newRange?Ae.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}class gi extends Ms{range;key;oldValue;newValue;constructor(e,t,n,r,s){super(s),this.range=e.clone(),this.key=t,this.oldValue=n===void 0?null:n,this.newValue=r===void 0?null:r}get type(){return this.oldValue===null?"addAttribute":this.newValue===null?"removeAttribute":"changeAttribute"}get affectedSelectable(){return this.range.clone()}clone(){return new gi(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new gi(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const e=super.toJSON();return e.range=this.range.toJSON(),e}_validate(){if(!this.range.isFlat)throw new oe("attribute-operation-range-not-flat",this);for(const e of this.range.getItems({shallow:!0})){if(this.oldValue!==null&&!Nh(e.getAttribute(this.key),this.oldValue))throw new oe("attribute-operation-wrong-old-value",this,{item:e,key:this.key,value:this.oldValue});if(this.oldValue===null&&this.newValue!==null&&e.hasAttribute(this.key))throw new oe("attribute-operation-attribute-exists",this,{node:e,ke
38y:this.key})}}_execute(){Nh(this.oldValue,this.newValue)||kDe(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(e,t){return new gi(Ae.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}class Bi extends Ms{get type(){return"noop"}get affectedSelectable(){return null}clone(){return new Bi(this.baseVersion)}getReversed(){return new Bi(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}class os extends Ms{position;oldName;newName;constructor(e,t,n,r){super(r),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=n}get type(){return"rename"}get affectedSelectable(){return this.position.nodeAfter}clone(){return new os(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new os(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(e instanceof An){if(this.oldName!==""&&e.name!==this.oldName)throw new oe("rename-operation-wrong-name",this)}else throw new oe("rename-operation-wrong-position",this);this.oldName=e.name}_execute(){const e=this.position.nodeAfter;e.name=this.newName}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new os(Ue.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class Cl extends Ms{root;key;oldValue;newValue;constructor(e,t,n,r,s){super(s),this.root=e,this.key=t,this.oldValue=n===void 0?null:n,this.newValue=r===void 0?null:r}get type(){return this.oldValue===null?"addRootAttribute":this.newValue===null?"removeRootAttribute":"changeRootAttribute"}get affectedSelectable(){return this.root}clone(){return new Cl(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Cl(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new oe("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(this.oldValue!==null&&this.root.getAttribute(this.key)!==this.oldValue)throw new oe("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(this.oldValue===null&&this.newValue!==null&&this.root.hasAttribute(this.key))throw new oe("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){this.newValue!==null?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new oe("rootattribute-operation-fromjson-no-root",this,{rootName:e.root});return new Cl(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}class xa extends Ms{rootName;elementName;isAdd;_document;constructor(e,t,n,r,s){if(super(s),this.rootName=e,this.elementName=t,this.isAdd=n,this._document=r,!this._document.getRoot(this.rootName)){const o=this._document.createRoot(this.elementName,this.rootName);o._isAttached=!1}}get type(){return this.isAdd?"addRoot":"detachRoot"}get affectedSelectable(){return this._document.getRoot(this.rootName)}clone(){return new xa(this.rootName,this.elementName,this.isAdd,this._document,this.baseVersion)}getReversed(){return new xa(this.rootName,this.elementName,!this.isAdd,this._document,this.baseVersion+1)}_execute(){this._document.getRoot(this.rootName)._isAttached=this.isAdd}toJSON(){const e=super.toJSON();return delete e._document,e}static get className(){return"RootOperation"}static fromJSON(e,t){return new xa(e.rootName,e.elementName,e.isAdd,t,e.baseVersion)}}const po={};po[gi.className]=gi;po[Wi.className]=Wi;po[Rr.className]=Rr;po[rn.className]=rn;po[Bi.className]=Bi;po[Ms.className]=Ms;po[os.className]=os;po[Cl.className]=Cl;po[xa.className]=xa;po[kn.className]=kn;po[si.className]=si;class SDe{static fromJSON(e,t){return po[e.__className].fromJSON(e,t)}}const pS=new Map;function Zt(i,e,t){let n=pS.get(i);n||(n=new Map,pS.set(i,n)),n.set(e,t)}function PDe(i,e){const t=pS.get(i);return t&&t.has(e)?t.get(e):IDe}function IDe(i){return[i]}function AM(i,e,t={}){const n=PDe(i.constructor,e.constructor);try{return i=i.clone(),n(i,e,t)}catch(r){throw r}}function RDe(i,e,t){i=i.slice(),e=e.slice();const n=new FDe(t.document,t.useRelations,t.forceWeakRemove);n.setOriginalOperations(i),n.setOriginalOperations(e);const r=n.originalOperations;if(i.length==0||e.length==0)return{operationsA:i,operationsB:e,originalOperations:r};const s=new WeakMap;for(const l of i)s.set(l,0);const o={nextBaseVersionA:i[i.length-1].baseVersion+1,nextBaseVersionB:e[e.length-1].baseVersion+1,originalOperationsACount:i.length,originalOperationsBCount:e.length};let a=0;for(;a<i.length;){const l=i[a],c=s.get(l);if(c==e.length){a++;continue}const d=e[c],f=AM(l,d,n.getContext(l,d,!0)),m=AM(d,l,n.getContext(d,l,!1));n.updateRelation(l,d),n.setOriginalOperations(f,l),n.setOriginalOperations(m,d);for(const p of f)s.set(p,c+m.length);i.splice(a,1,...f),e.splice(c,1,...m)}return SM(i),SM(e),kM(i,o.nextBaseVersionB),kM(e,o.nextBaseVersionA),{operationsA:i,operationsB:e,originalOperations:r}}class FDe{originalOperations;_history;_useRelations;_forceWeakRemove;_relations;constructor(e,t,n=!1){this.originalOperations=new Map,this._history=e.history,this._useRelations=t,this._forceWeakRemove=!!n,this._relations=new Map}setOriginalOperations(e,t=null){const n=t?this.originalOperations.get(t):null;for(const r of e)this.originalOperations.set(r,n||r)}updateRelation(e,t){if(e instanceof rn)t instanceof si?e.targetPosition.isEqual(t.sourcePosition)||t.movedRange.containsPosition(e.targetPosition)?this._setRelation(e,t,"insertAtSource"):e.targetPosition.isEqual(t.deletionPosition)?this._setRelation(e,t,"insertBetween"):e.targetPosition.isAfter(t.sourcePosition)?this._setRelation(e,t,"moveTargetAfter"):e.howMany>1&&e.sourcePosition.isEqual(t.deletionPosition)?this._setRelation(e,t,"firstToMoveMerged"):e.howMany>1&&e.sourcePosition.getShiftedBy(e.howMany-1).isEqual(t.deletionPosition)&&this._setRelation(e,t,"lastToMoveMerged"):t instanceof rn&&(e.targetPosition.isEqual(t.sourcePosition)||e.targetPosition.isBefore(t.sourcePosition)?this._setRelation(e,t,"insertBefore"):this._setRelation(e,t,"insertAfter"));else if(e instanceof kn){if(t instanceof si)e.splitPosition.isBefore(t.sourcePosition)&&this._setRelation(e,t,"splitBefore");else if(t instanceof rn)if(e.splitPosition.isEqual(t.sourcePosition)||e.splitPosition.isBefore(t.sourcePosition))this._setRelation(e,t,"splitBefore");else{const n=Ae._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.splitPosition)){const r=n.end.offset-e.splitPosition.offset,s=e.splitPosition.offset-n.start.offset;this._setRelation(e,t,{howMany:r,offset:s})}}}else if(e instanceof si)t instanceof si?(e.targetPosition.isEqual(t.sourcePosition)||this._setRelation(e,t,"mergeTargetNotMoved"),e.sourcePosition.isEqual(t.targetPosition)&&this._setRelation(e,t,"mergeSourceNotMoved"),e.sourcePosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeSameElement")):t instanceof kn?e.sourcePosition.isEqual(t.splitPosition)&&this._setRelation(e,t,"splitAtSource"):t instanceof rn&&t.howMany>0&&(e.sourcePosition.isEqual(t.sourcePosition.getShiftedBy(t.howMany))&&this._setRelation(e,t,"mergeSourceAffected"),e.targetPosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeTargetWasBefore"));else if(e instanceof Rr){const n=e.newRange;if(!n)return;if(t instanceof si){const r=n.start.isEqual(t.targetPosition),s=n.start.isEqual(t.deletionPosition),o=n.end.isEqual(t.deletionPosition),a=n.end.isEqual(t.sourcePosition);(r||s||o||a)&&this._setRelation(e,t,{wasInLeftElement:r,wasStartBeforeMergedElement:s,wasEndBeforeMergedElement:o,wasInRightElement:a})}}}getContext(e,t,n){return{aIsStrong:n,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(t),abRelation:this._useRelations?this._getRelation(e,t):null,baRelation:this._useRelations?this._getRelation(t,e):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(e){const t=this.originalOperations.get(e);return t.wasUndone||this._history.isUndoneOperation(t)}_getRelation(e,t){const n=this.originalOperations.get(t),r=this._history.getUndoneOperation(n);if(!r)return null;const s=this.originalOperations.get(e),o=this._relations.get(s);return o&&o.get(r)||null}_setRelation(e,t,n){const r=this.originalOperations.get(e),s=this.originalOperations.get(t);let o=this._relations.get(r);o||(o=new Map,this._relations.set(r,o)),o.set(s,n)}}function kM(i,e){for(const t of i)t.baseVersion=e++}function SM(i){const e=new Map;for(let t=0;t<i.length;t++){const n=i[t];n instanceof Rr&&(n.baseVersion!==-1?e.set(n.name,{op:n,ranges:n.newRange?[n.newRange]:[]}):(n.newRange&&e.get(n.name).ranges.push(n.newRange),i.splice(t,1),t--))}for(const{op:t,ranges:n}of e.values())n.length?t.newRange=Ae._createFromRanges(n):t.newRange=null}Zt(gi,gi,(i,e,t)=>{if(i.key===e.key&&i.range.start.hasSameParentAs(e.range.start)){const n=i.range.getDifference(e.range).map(s=>new gi(s,i.key,i.oldValue,i.newValue,0)),r=i.range.getIntersection(e.range);return r&&t.aIsStrong&&n.push(new gi(r,e.key,e.newValue,i.newValue,0)),n.length==0?[new Bi(0)]:n}else return[i]});Zt(gi,Wi,(i,e)=>{if(i.range.start.hasSameParentAs(e.position)&&i.range.containsPosition(e.position)){const n=i.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes).map(r=>new gi(r,i.key,i.oldValue,i.newValue,i.baseVersion));if(e.shouldReceiveAttributes){const r=CY(e,i.key,i.oldValue);r&&n.unshift(r)}return n}return i.range=i.range._getTransformedByInsertion(e.position,e.howMany,!1)[0],[i]});function CY(i,e,t){const r=i.nodes.getNode(0).getAttribute(e);
38if(r==t)return null;const s=new Ae(i.position,i.position.getShiftedBy(i.howMany));return new gi(s,e,r,t,0)}Zt(gi,si,(i,e)=>{const t=[];i.range.start.hasSameParentAs(e.deletionPosition)&&(i.range.containsPosition(e.deletionPosition)||i.range.start.isEqual(e.deletionPosition))&&t.push(Ae._createFromPositionAndShift(e.graveyardPosition,1));const n=i.range._getTransformedByMergeOperation(e);return n.isCollapsed||t.push(n),t.map(r=>new gi(r,i.key,i.oldValue,i.newValue,i.baseVersion))});Zt(gi,rn,(i,e)=>ODe(i.range,e).map(n=>new gi(n,i.key,i.oldValue,i.newValue,i.baseVersion)));function ODe(i,e){const t=Ae._createFromPositionAndShift(e.sourcePosition,e.howMany);let n=null,r=[];t.containsRange(i,!0)?n=i:i.start.hasSameParentAs(t.start)?(r=i.getDifference(t),n=i.getIntersection(t)):r=[i];const s=[];for(let o of r){o=o._getTransformedByDeletion(e.sourcePosition,e.howMany);const a=e.getMovedRangeStart(),l=o.start.hasSameParentAs(a),c=o._getTransformedByInsertion(a,e.howMany,l);s.push(...c)}return n&&s.push(n._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,!1)[0]),s}Zt(gi,kn,(i,e)=>{if(i.range.end.isEqual(e.insertionPosition))return e.graveyardPosition||i.range.end.offset++,[i];if(i.range.start.hasSameParentAs(e.splitPosition)&&i.range.containsPosition(e.splitPosition)){const t=i.clone();return t.range=new Ae(e.moveTargetPosition.clone(),i.range.end._getCombined(e.splitPosition,e.moveTargetPosition)),i.range.end=e.splitPosition.clone(),i.range.end.stickiness="toPrevious",[i,t]}return i.range=i.range._getTransformedBySplitOperation(e),[i]});Zt(Wi,gi,(i,e)=>{const t=[i];if(i.shouldReceiveAttributes&&i.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(i.position)){const n=CY(i,e.key,e.newValue);
38n&&t.push(n)}return t});Zt(Wi,Wi,(i,e,t)=>i.position.isEqual(e.position)&&t.aIsStrong?[i]:(i.position=i.position._getTransformedByInsertOperation(e),[i]));Zt(Wi,rn,(i,e)=>(i.position=i.position._getTransformedByMoveOperation(e),[i]));Zt(Wi,kn,(i,e)=>(i.position=i.position._getTransformedBySplitOperation(e),[i]));Zt(Wi,si,(i,e)=>(i.position=i.position._getTransformedByMergeOperation(e),[i]));Zt(Rr,Wi,(i,e)=>(i.oldRange&&(i.oldRange=i.oldRange._getTransformedByInsertOperation(e)[0]),i.newRange&&(i.newRange=i.newRange._getTransformedByInsertOperation(e)[0]),[i]));Zt(Rr,Rr,(i,e,t)=>{if(i.name==e.name)if(t.aIsStrong)i.oldRange=e.newRange?e.newRange.clone():null;else return[new Bi(0)];return[i]});Zt(Rr,si,(i,e)=>(i.oldRange&&(i.oldRange=i.oldRange._getTransformedByMergeOperation(e)),i.newRange&&(i.newRange=i.newRange._getTransformedByMergeOperation(e)),[i]));Zt(Rr,rn,(i,e)=>{const t=[i];if(i.oldRange&&(i.oldRange=Ae._createFromRanges(i.oldRange._getTransformedByMoveOperation(e))),i.newRange){const n=i.newRange._getTransformedByMoveOperation(e);i.newRange=n[0];for(let r=1;r<n.length;r++){const s=i.clone();s.oldRange=null,s.newRange=n[r],s.baseVersion=-1,t.push(s)}}return t});Zt(Rr,kn,(i,e,t)=>{if(i.oldRange&&(i.oldRange=i.oldRange._getTransformedBySplitOperation(e)),i.newRange){if(t.abRelation){const n=i.newRange._getTransformedBySplitOperation(e);return i.newRange.start.isEqual(e.splitPosition)?t.abRelation.wasStartBeforeMergedElement?i.newRange.start=Ue._createAt(e.insertionPosition):t.abRelation.wasInLeftElement?i.newRange.start=Ue._createAt(i.newRange.start):i.newRange.start=Ue._createAt(e.moveTargetPosition):i.newRange.start=n.start,i.newRange.end.isEqual(e.splitPosition)?i.newRange.end.isEqual(e.splitPosition)&&t.abRelation.wasEndBeforeMergedElement?i.newRange.end=Ue._createAt(e.insertionPosition):t.abRelation.wasInRightElement?i.newRange.end=Ue._createAt(e.moveTargetPosition):i.newRange.end=Ue._createAt(i.newRange.end):i.newRange.end=n.end,[i]}i.newRange=i.newRange._getTransformedBySplitOperation(e)}return[i]});Zt(si,Wi,(i,e)=>(i.sourcePosition.hasSameParentAs(e.position)&&(i.howMany+=e.howMany),i.sourcePosition=i.sourcePosition._getTransformedByInsertOperation(e),i.targetPosition=i.targetPosition._getTransformedByInsertOperation(e),[i]));Zt(si,si,(i,e,t)=>{if(i.sourcePosition.isEqual(e.sourcePosition)&&i.targetPosition.isEqual(e.targetPosition))if(t.bWasUndone){const n=e.graveyardPosition.path.slice();return n.push(0),i.sourcePosition=new Ue(e.graveyardPosition.root,n),i.howMany=0,[i]}else return[new Bi(0)];if(i.sourcePosition.isEqual(e.sourcePosition)&&!i.targetPosition.isEqual(e.targetPosition)&&!t.bWasUndone&&t.abRelation!="splitAtSource"){const n=i.targetPosition.root.rootName=="$graveyard",r=e.targetPosition.root.rootName=="$graveyard";if(r&&!n||!(n&&!r)&&t.aIsStrong){const l=e.targetPosition._getTransformedByMergeOperation(e),c=i.targetPosition._getTransformedByMergeOperation(e);return[new rn(l,i.howMany,c,0)]}else return[new Bi(0)]}return i.sourcePosition.hasSameParentAs(e.targetPosition)&&(i.howMany+=e.howMany),i.sourcePosition=i.sourcePosition._getTransformedByMergeOperation(e),i.targetPosition=i.targetPosition._getTransformedByMergeOperation(e),(!i.graveyardPosition.isEqual(e.graveyardPosition)||!t.aIsStrong)&&(i.graveyardPosition=i.graveyardPosition._getTransformedByMergeOperation(e)),[i]});Zt(si,rn,(i,e,t)=>{const n=Ae._createFromPositionAndShift(e.sourcePosition,e.howMany);return e.type=="remove"&&!t.bWasUndone&&i.deletionPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(i.sourcePosition)?[new Bi(0)]:(e.sourcePosition.getShiftedBy(e.howMany).isEqual(i.sourcePosition)?i.sourcePosition.stickiness="toNone":e.targetPosition.isEqual(i.sourcePosition)&&t.abRelation=="mergeSourceAffected"?i.sourcePosition.stickiness="toNext":e.sourcePosition.isEqual(i.targetPosition)?(i.targetPosition.stickiness="toNone",i.howMany-=e.howMany):e.targetPosition.isEqual(i.targetPosition)&&t.abRelation=="mergeTargetWasBefore"?(i.targetPosition.stickiness="toPrevious",i.howMany+=e.howMany):(i.sourcePosition.hasSameParentAs(e.targetPosition)&&(i.howMany+=e.howMany),i.sourcePosition.hasSameParentAs(e.sourcePosition)&&(i.howMany-=e.howMany)),i.sourcePosition=i.sourcePosition._getTransformedByMoveOperation(e),i.targetPosition=i.targetPosition._getTransformedByMoveOperation(e),i.sourcePosition.stickiness="toPrevious",i.targetPosition.stickiness="toNext",i.graveyardPosition.isEqual(e.targetPosition)||(i.graveyardPosition=i.graveyardPosition._getTransformedByMoveOperation(e)),[i])});Zt(si,kn,(i,e,t)=>{if(e.graveyardPosition&&(i.graveyardPosition=i.graveyardPosition._getTransformedByDeletion(e.graveyardPosition,1),i.deleti
38onPosition.isEqual(e.graveyardPosition)&&(i.howMany=e.howMany)),i.targetPosition.isEqual(e.splitPosition)&&(e.graveyardPosition&&i.deletionPosition.isEqual(e.graveyardPosition)||t.abRelation=="mergeTargetNotMoved"))return i.sourcePosition=i.sourcePosition._getTransformedBySplitOperation(e),[i];if(i.sourcePosition.isEqual(e.splitPosition)){if(t.abRelation=="mergeSourceNotMoved")return i.howMany=0,i.targetPosition=i.targetPosition._getTransformedBySplitOperation(e),[i];if(t.abRelation=="mergeSameElement"||i.sourcePosition.offset>0)return i.sourcePosition=e.moveTargetPosition.clone(),i.targetPosition=i.targetPosition._getTransformedBySplitOperation(e),[i]}return i.sourcePosition.hasSameParentAs(e.splitPosition)&&(i.howMany=e.splitPosition.offset),i.sourcePosition=i.sourcePosition._getTransformedBySplitOperation(e),i.targetPosition=i.targetPosition._getTransformedBySplitOperation(e),[i]});Zt(rn,Wi,(i,e)=>{const n=Ae._createFromPositionAndShift(i.sourcePosition,i.howMany)._getTransformedByInsertOperation(e,!1)[0];return i.sourcePosition=n.start,i.howMany=n.end.offset-n.start.offset,i.targetPosition.isEqual(e.position)||(i.targetPosition=i.targetPosition._getTransformedByInsertOperation(e)),[i]});Zt(rn,rn,(i,e,t)=>{const n=Ae._createFromPositionAndShift(i.sourcePosition,i.howMany),r=Ae._createFromPositionAndShift(e.sourcePosition,e.howMany);let s=t.aIsStrong,o=!t.aIsStrong;t.abRelation=="insertBefore"||t.baRelation=="insertAfter"?o=!0:(t.abRelation=="insertAfter"||t.baRelation=="insertBefore")&&(o=!1);let a;if(i.targetPosition.isEqual(e.targetPosition)&&o?a=i.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany):a=i.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),PM(i,e)&&PM(e,i))return[e.getReversed()];if(n.containsPosition(e.targetPosition)&&n.containsRange(r,!0))return n.start=n.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),n.end=n.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),ih([n],a);if(r.containsPosition(i.targetPosition)&&r.containsRange(n,!0))return n.start=n.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),n.end=n.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),ih([n],a);const d=ji(i.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if(d=="prefix"||d=="extension")return n.start=n.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),n.end=n.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),ih([n],a);i.type=="remove"&&e.type!="remove"&&!t.aWasUndone&&!t.forceWeakRemove?s=!0:i.type!="remove"&&e.type=="remove"&&!t.bWasUndone&&!t.forceWeakRemove&&(s=!1);const f=[],m=n.getDifference(r);for(const g of m){g.start=g.start._getTransformedByDeletion(e.sourcePosition,e.howMany),g.end=g.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const y=ji(g.start.getParentPath(),e.getMovedRangeStart().getParentPath())=="same",v=g._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,y);f.push(...v)}const p=n.getIntersection(r);return p!==null&&s&&(p.start=p.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),p.end=p.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),f.length===0?f.push(p):f.length==1?r.start.isBefore(n.start)||r.start.isEqual(n.start)?f.unshift(p):f.push(p):f.splice(1,0,p)),f.length===0?[new Bi(i.baseVersion)]:ih(f,a)});Zt(rn,kn,(i,e,t)=>{let n=i.targetPosition.clone();if((!i.targetPosition.isEqual(e.insertionPosition)||!e.graveyardPosition||t.abRelation=="moveTargetAfter")&&(n=i.targetPosition._getTransformedBySplitOperation(e)),i.sourcePosition.isEqual(e.insertionPosition)&&t.abRelation=="firstToMoveMerged")return i.howMany++,i.targetPosition=n,[i];const r=Ae._createFromPositionAndShift(i.sourcePosition,i.howMany);if(r.end.isEqual(e.insertionPosition))return(!e.graveyardPosition||t.abRelation=="lastToMoveMerged")&&i.howMany++,i.targetPosition=n,[i];if(r.start.hasSameParentAs(e.splitPosition)&&r.containsPosition(e.splitPosition)){let a=new Ae(e.splitPosition,r.end);a=a._getTransformedBySplitOperation(e);const l=[new Ae(r.start,e.splitPosition),a];return ih(l,n)}i.targetPosition.isEqual(e.splitPosition)&&t.abRelation=="insertAtSource"&&(n=e.moveTargetPosition),i.targetPosition.isEqual(e.insertionPosition)&&t.abRelation=="insertBetween"&&(n=i.targetPosition);const o=[r._getTransformedBySplitOperation(e)];if(e.graveyardPosition){const a=r.start.isEqual(e.graveyardPosition)||r.containsPosition(e.graveyardPosition);i.howMany>1&&a&&!t.aWasUndone&&o.push(Ae._createFromPositionAndShift(e.insertionPosition,1))}return ih(o,n)});Zt(rn,si,(i,e,t)=>{const n=Ae._createFromPositionAndShift(i.sourcePosition,i.howMany);if(e.deletionPosition.hasSameParentAs(i.sourcePosition)&&n.containsPosition(e.sourcePosition)){if
38(i.type=="remove"&&!t.forceWeakRemove){if(!t.aWasUndone){const o=[];let a=e.graveyardPosition.clone(),l=e.targetPosition._getTransformedByMergeOperation(e);const c=i.targetPosition.getTransformedByOperation(e);i.howMany>1&&(o.push(new rn(i.sourcePosition,i.howMany-1,c,0)),a=a._getTransformedByMove(i.sourcePosition,c,i.howMany-1),l=l._getTransformedByMove(i.sourcePosition,c,i.howMany-1));const d=e.deletionPosition._getCombined(i.sourcePosition,c),f=new rn(a,1,d,0),m=f.getMovedRangeStart().path.slice();m.push(0);const p=new Ue(f.targetPosition.root,m);l=l._getTransformedByMove(a,d,1);const g=new rn(l,e.howMany,p,0);return o.push(f),o.push(g),o}}else if(i.howMany==1)return t.bWasUndone?(i.sourcePosition=e.graveyardPosition.clone(),i.targetPosition=i.targetPosition._getTransformedByMergeOperation(e),[i]):[new Bi(0)]}const s=Ae._createFromPositionAndShift(i.sourcePosition,i.howMany)._getTransformedByMergeOperation(e);return i.sourcePosition=s.start,i.howMany=s.end.offset-s.start.offset,i.targetPosition=i.targetPosition._getTransformedByMergeOperation(e),[i]});Zt(os,Wi,(i,e)=>(i.position=i.position._getTransformedByInsertOperation(e),[i]));Zt(os,si,(i,e)=>i.position.isEqual(e.deletionPosition)?(i.position=e.graveyardPosition.clone(),i.position.stickiness="toNext",[i]):(i.position=i.position._getTransformedByMergeOperation(e),[i]));Zt(os,rn,(i,e)=>(i.position=i.position._getTransformedByMoveOperation(e),[i]));Zt(os,os,(i,e,t)=>{if(i.position.isEqual(e.position))if(t.aIsStrong)i.oldName=e.newName;else return[new Bi(0)];return[i]});Zt(os,kn,(i,e)=>{const t=i.position.path,n=e.splitPosition.getParentPath();if(ji(t,n)=="same"&&!e.graveyardPosition){const r=new os(i.position.getShiftedBy(1),i.oldName,i.newName,0);return[i,r]}return i.position=i.position._getTransformedBySplitOperation(e),[i]});Zt(Cl,Cl,(i,e,t)=>{if(i.root===e.root&&i.key===e.key)if(t.aIsStrong)i.oldValue=e.newValue;else return[new Bi(0)];return[i]});Zt(xa,xa,(i,e)=>i.rootName===e.rootName&&i.isAdd===e.isAdd?[new Bi(0)]:[i]);Zt(kn,Wi,(i,e)=>(i.splitPosition.hasSameParentAs(e.position)&&i.splitPosition.offset<e.position.offset&&(i.howMany+=e.howMany),i.splitPosition=i.splitPosition._getTransformedByInsertOperation(e),i.insertionPosition=i.insertionPosition._getTransformedByInsertOperation(e),[i]));Zt(kn,si,(i,e,t)=>{if(!i.graveyardPosition&&!t.bWasUndone&&i.splitPosition.hasSameParentAs(e.sourcePosition)){const n=e.graveyardPosition.path.slice();n.push(0);const r=new Ue(e.graveyardPosition.root,n),s=kn.getInsertionPosition(new Ue(e.graveyardPosition.root,n)),o=new kn(r,0,s,null,0);return i.splitPosition=i.splitPosition._getTransformedByMergeOperation(e),i.insertionPosition=kn.getInsertionPosition(i.splitPosition),i.graveyardPosition=o.insertionPosition.clone(),i.graveyardPosition.stickiness="toNext",[o,i]}return i.splitPosition.hasSameParentAs(e.deletionPosition)&&!i.splitPosition.isAfter(e.deletionPosition)&&i.howMany--,i.splitPosition.hasSameParentAs(e.targetPosition)&&(i.howMany+=e.howMany),i.splitPosition=i.splitPosition._getTransformedByMergeOperation(e),i.insertionPosition=kn.getInsertionPosition(i.splitPosition),i.graveyardPosition&&(i.graveyardPosition=i.graveyardPosition._getTransformedByMergeOperation(e)),[i]});Zt(kn,rn,(i,e,t)=>{const n=Ae._createFromPositionAndShift(e.sourcePosition,e.howMany);if(i.graveyardPosition){const s=n.start.isEqual(i.graveyardPosition)||n.containsPosition(i.graveyardPosition);if(!t.bWasUndone&&s){const o=i.splitPosition._getTransformedByMoveOperation(e),a=i.graveyardPosition._getTransformedByMoveOperation(e),l=a.path.slice();l.push(0);const c=new Ue(a.root,l);return[new rn(o,i.howMany,c,0)]}i.graveyardPosition=i.graveyardPosition._getTransformedByMoveOperation(e)}const r=i.splitPosition.isEqual(e.targetPosition);if(r&&(t.baRelation=="insertAtSource"||t.abRelation=="splitBefore"))return i.howMany+=e.howMany,i.splitPosition=i.splitPosition._getTransformedByDeletion(e.sourcePosition,e.howMany),i.insertionPosition=kn.getInsertionPosition(i.splitPosition),[i];if(r&&t.abRelation&&t.abRelation.howMany){const{howMany:s,offset:o}=t.abRelation;return i.howMany+=s,i.splitPosition=i.splitPosition.getShiftedBy(o),[i]}if(i.splitPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(i.splitPosition)){const s=e.howMany-(i.splitPosition.offset-e.sourcePosition.offset);return i.howMany-=s,i.splitPosition.hasSameParentAs(e.targetPosition)&&i.splitPosition.offset<e.targetPosition.offset&&(i.howMany+=e.howMany),i.splitPosition=e.sourcePosition.clone(),i.insertionPosition=kn.getInsertionPosition(i.splitPosition),[i]}return e.sourcePosition.isEqual(e.targetPosition)||(i.splitPosition.hasSameParentAs(e.sourcePosition)&&i.splitPosition.offset<=e.sourcePosition.offset&&(i.howMany-=e.howMany),i.splitPosition.hasSameParentAs(e.targetPosition)&&i.splitPosition.offset<e.targetPosition.offset&&(i.howMany+=e.howMany)),i.splitPosition.stickiness="toNone",i.splitPosition=i.splitPosition._getTransformedByMoveOperation(e),i.splitPosition.stickiness="toNext",i.graveyardPosition?i.insertionPosition=i.insertionPosition._getTransformedByMoveOperation(e):i.insertionPosition=kn.getInsertionPosition(i.splitPosition),[i]});Zt(kn,kn,(i,e,t)=>
38{if(i.splitPosition.isEqual(e.splitPosition)){if(!i.graveyardPosition&&!e.graveyardPosition)return[new Bi(0)];if(i.graveyardPosition&&e.graveyardPosition&&i.graveyardPosition.isEqual(e.graveyardPosition))return[new Bi(0)];if(t.abRelation=="splitBefore")return i.howMany=0,i.graveyardPosition=i.graveyardPosition._getTransformedBySplitOperation(e),[i]}if(i.graveyardPosition&&e.graveyardPosition&&i.graveyardPosition.isEqual(e.graveyardPosition)){const n=i.splitPosition.root.rootName=="$graveyard",r=e.splitPosition.root.rootName=="$graveyard";if(r&&!n||!(n&&!r)&&t.aIsStrong){const l=[];return e.howMany&&l.push(new rn(e.moveTargetPosition,e.howMany,e.splitPosition,0)),i.howMany&&l.push(new rn(i.splitPosition,i.howMany,i.moveTargetPosition,0)),l}else return[new Bi(0)]}if(i.graveyardPosition&&(i.graveyardPosition=i.graveyardPosition._getTransformedBySplitOperation(e)),i.splitPosition.isEqual(e.insertionPosition)&&t.abRelation=="splitBefore")return i.howMany++,[i];if(e.splitPosition.isEqual(i.insertionPosition)&&t.baRelation=="splitBefore"){const n=e.insertionPosition.path.slice();n.push(0);const r=new Ue(e.insertionPosition.root,n),s=new rn(i.insertionPosition,1,r,0);return[i,s]}return i.splitPosition.hasSameParentAs(e.splitPosition)&&i.splitPosition.offset<e.splitPosition.offset&&(i.howMany-=e.howMany),i.splitPosition=i.splitPosition._getTransformedBySplitOperation(e),i.insertionPosition=kn.getInsertionPosition(i.splitPosition),[i]});function PM(i,e){return i.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany)===null}function ih(i,e){const t=[];for(let n=0;n<i.length;n++){const r=i[n],s=new rn(r.start,r.end.offset-r.start.offset,e,0);t.push(s);for(let o=n+1;o<i.length;o++)i[o]=i[o]._getTransformedByMove(s.sourcePosition,s.targetPosition,s.howMany)[0];e=e._getTransformedByMove(s.sourcePosition,s.targetPosition,s.howMany)}return t}class di extends Sn(Ue){constructor(e,t,n="toNone"){if(super(e,t,n),!this.root.is("rootElement"))throw new oe("model-liveposition-root-not-rootelement",e);NDe.call(this)}detach(){this.stopListening()}toPosition(){return new Ue(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}di.prototype.is=function(i){return i==="livePosition"||i==="model:livePosition"||i=="position"||i==="model:position"};function NDe(){this.listenTo(this.root.document.model,"applyOperation",(i,e)=>{const t=e[0];t.isDocumentOperation&&BDe.call(this,t)},{priority:"low"})}function BDe(i){const e=this.getTransformedByOperation(i);if(!this.isEqual(e)){const t=this.toPosition();this.path=e.path,this.root=e.root,this.fire("change",t)}}class Cf{operations;isUndoable;isLocal;isUndo;isTyping;constructor(e={}){typeof e=="string"&&(e=e==="transparent"?{isUndoable:!1}:{},Kt("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:n=!0,isUndo:r=!1,isTyping:s=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=n,this.isUndo=r,this.isTyping=s}get baseVersion(){for(const e of this.operations)if(e.baseVersion!==null)return e.baseVersion;return null}addOperation(e){return e.isDocumentOperation&&(e.batch=this,this.operations.push(e)),e}}class Kw{static _statesPriority=[void 0,"refresh","rename","move"];_markerCollection;_changesInElement=new Map;_elementsSnapshots=new Map;_elementChildrenSnapshots=new Map;_elementState=new Map;_changedMarkers=new Map;_changedRoots=new Map;_changeCount=0;_cachedChanges=null;_cachedChangesWithGraveyard=null;_refreshedItems=new Set;constructor(e){this._markerCollection=e}get isEmpty(){return this._changesInElement.size==0&&this._changedMarkers.size==0&&this._changedRoots.size==0}bufferOperation(e){const t=e;switch(t.type){case"insert":{if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break}case"addAttribute":case"removeAttribute":case"changeAttribute":{for(const n of t.range.getItems({shallow:!0}))this._isInInsertedElement(n.parent)||this._markAttribute(n);break}case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const n=this._isInInsertedElement(t.sourcePosition.parent),r=this._isInInsertedElement(t.targetPosition.parent);n||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),r||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);const s=Ae._createFromPositionAndShift(t.sourcePosition,t.howMany);for(const o of s.getItems({shallow:!0}
38))this._setElementState(o,"move");break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const n=Ae._createFromPositionAndShift(t.position,1);for(const r of this._markerCollection.getMarkersIntersectingRange(n)){const s=r.getData();this.bufferMarkerChange(r.name,s,s)}this._setElementState(t.position.nodeAfter,"rename");break}case"split":{const n=t.splitPosition.parent;if(!this._isInInsertedElement(n)){this._markRemove(n,t.splitPosition.offset,t.howMany);const r=Ae._createFromPositionAndShift(t.splitPosition,t.howMany);for(const s of r.getItems({shallow:!0}))this._setElementState(s,"move")}this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&(this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1),this._setElementState(t.graveyardPosition.nodeAfter,"move"));break}case"merge":{const n=t.sourcePosition.parent;this._isInInsertedElement(n.parent)||this._markRemove(n.parent,n.startOffset,1);const r=t.graveyardPosition.parent;this._markInsert(r,t.graveyardPosition.offset,1),this._setElementState(n,"move");const s=t.targetPosition.parent;if(!this._isInInsertedElement(s)){this._markInsert(s,t.targetPosition.offset,n.maxOffset);const o=Ae._createFromPositionAndShift(t.sourcePosition,t.howMany);for(const a of o.getItems({shallow:!0}))this._setElementState(a,"move")}break}case"detachRoot":case"addRoot":{const n=t.affectedSelectable;if(!n._isLoaded||n.isAttached()==t.isAdd)return;this._bufferRootStateChange(t.rootName,t.isAdd);break}case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{if(!t.root._isLoaded)return;const n=t.root.rootName;this._bufferRootAttributeChange(n,t.key,t.oldValue,t.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,t,n){t.range&&t.range.root.is("rootElement")&&!t.range.root._isLoaded&&(t.range=null),n.range&&n.range.root.is("rootElement")&&!n.range.root._isLoaded&&(n.range=null);let r=this._changedMarkers.get(e);r?r.newMarkerData=n:(r={newMarkerData:n,oldMarkerData:t},this._changedMarkers.set(e,r)),r.oldMarkerData.range==null&&n.range==null&&this._changedMarkers.delete(e)}getMarkersToRemove(){const e=[];for(const[t,n]of this._changedMarkers)n.oldMarkerData.range!=null&&e.push({name:t,range:n.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,n]of this._changedMarkers)n.newMarkerData.range!=null&&e.push({name:t,range:n.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map(([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}}))}hasDataChanges(){if(this.getChanges().length||this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const n=e.range&&!t.range,r=!e.range&&t.range,s=e.range&&t.range&&!e.range.isEqual(t.range);if(n||r||s)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const n of this._changesInElement.keys()){const r=this._changesInElement.get(n).sort((d,f)=>d.offset===f.offset?d.type!=f.type?d.type=="remove"?-1:1:0:d.offset<f.offset?-1:1),s=this._elementChildrenSnapshots.get(n),o=RM(n.getChildren()),a=MDe(s.length,r);let l=0,c=0;for(const d of a)if(d==="i"){const f=this._getDiffActionForNode(o[l].node,"insert"),m=this._elementsSnapshots.get(o[l].node),p=this._getInsertDiff(n,l,f,o[l],m);t.push(p),l++}else if(d==="r"){const f=this._getDiffActionForNode(s[c].node,"remove"),m=this._getRemoveDiff(n,l,f,s[c]);t.push(m),c++}else if(d==="a"){const f=s[c].attributes,m=o[l].attributes;let p;if(o[l].name=="$text")p=new Ae(Ue._createAt(n,l),Ue._createAt(n,l+1));else{const y=n.offsetToIndex(l);p=new Ae(Ue._createAt(n,l),Ue._createAt(n.getChild(y),0))}const g=this._getAttributesDiff(p,f,m);t.push(...g),l++,c++}else l++,c++}t.sort((n,r)=>n.position.root!=r.position.root?n.position.root.rootName<r.position.root.rootName?-1:1:n.position.isEqual(r.position)?n.changeCount-r.changeCount:n.position.isBefore(r.position)?-1:1);for(let n=1,r=0;n<t.length;n++){const s=t[r],o=t[n],a=s.type=="remove"&&o.type=="remove"&&s.name=="$text"&&o.name=="$text"&&s.position.isEqual(o.position),l=s.type=="insert"&&o.type=="insert"&&s.name=="$text"&&o.name=="$text"&&s.position.parent==o.position.parent&&s.position.offset+s.length==o.position.offset,c=s.type=="attribute"&&o.type=="attribute"&&s.position.parent==o.position.parent&&s.range.isFlat&&o.range.isFlat&&s.position.offset+s.length==o.position.offset&&s.attributeKey==o.attributeKey&&s.attributeOldValue==o.attributeOldValue&&s.attributeNewValue==o.attributeNewValue;a||l||c?(s.length++,c&&(s.range.end=s.range.end.getShiftedBy(1)),t[n]=null):r=n}t=t.filter(n=>n);for(const n of t)delete n.changeCount,n.type=="attribute"&&(delete n.position,delete n.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(LDe),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}
38getChangedRoots(){return Array.from(this._changedRoots.values()).map(e=>{const t={...e};return t.state!==void 0&&delete t.attributes,t})}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementChildrenSnapshots.clear(),this._elementsSnapshots.clear(),this._elementState.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems.clear(),this._cachedChanges=null}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e),this._setElementState(e,"refresh");const t=Ae._createOn(e);for(const n of this._markerCollection.getMarkersIntersectingRange(t)){const r=n.getData();this.bufferMarkerChange(n.name,r,r)}this._cachedChanges=null}_bufferRootLoad(e){if(e.isAttached()){this._bufferRootStateChange(e.rootName,!0),this._markInsert(e,0,e.maxOffset);for(const t of e.getAttributeKeys())this._bufferRootAttributeChange(e.rootName,t,null,e.getAttribute(t));for(const t of this._markerCollection)if(t.getRange().root==e){const n=t.getData();this.bufferMarkerChange(t.name,{...n,range:null},n)}}}_bufferRootStateChange(e,t){if(!this._changedRoots.has(e)){this._changedRoots.set(e,{name:e,state:t?"attached":"detached"});return}const n=this._changedRoots.get(e);n.state!==void 0?(delete n.state,n.attributes===void 0&&this._changedRoots.delete(e)):n.state=t?"attached":"detached"}_bufferRootAttributeChange(e,t,n,r){const s=this._changedRoots.get(e)||{name:e},o=s.attributes||{};if(o[t]){const a=o[t];r===a.oldValue?delete o[t]:a.newValue=r}else o[t]={oldValue:n,newValue:r};Object.entries(o).length===0?(delete s.attributes,s.state===void 0&&this._changedRoots.delete(e)):(s.attributes=o,this._changedRoots.set(e,s))}_markInsert(e,t,n){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const r={type:"insert",offset:t,howMany:n,count:this._changeCount++};this._markChange(e,r)}_markRemove(e,t,n){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const r={type:"remove",offset:t,howMany:n,count:this._changeCount++};this._markChange(e,r),this._removeAllNestedChanges(e,t,n)}_markAttribute(e){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshots(e);const n=this._getChangesForElement(e);this._handleChange(t,n),n.push(t);for(let r=0;r<n.length;r++)n[r].howMany<1&&(n.splice(r,1),r--)}_setElementState(e,t){if(!e.is("element"))return;const n=Kw._statesPriority.indexOf(this._elementState.get(e));Kw._statesPriority.indexOf(t)>n&&this._elementState.set(e,t)}_getDiffActionForNode(e,t){if(!e.is("element")||!this._elementsSnapshots.has(e))return t;const n=this._elementState.get(e);return!n||n=="move"?t:n}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshots(e){if(this._elementChildrenSnapshots.has(e))return;const t=RM(e.getChildren());this._elementChildrenSnapshots.set(e,t);for(const n of t)this._elementsSnapshots.set(n.node,n)}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const n of t){const r=e.offset+e.howMany,s=n.offset+n.howMany;if(e.type=="insert"&&(n.type=="insert"&&(e.offset<=n.offset?n.offset+=e.howMany:e.offset<s&&(n.howMany+=e.nodesToHandle,e.nodesToHandle=0)),n.type=="remove"&&e.offset<n.offset&&(n.offset+=e.howMany),n.type=="attribute")){if(e.offset<=n.offset)n.offset+=e.howMany;else if(e.offset<s){const o=n.howMany;n.howMany=e.offset-n.offset,t.unshift({type:"attribute",offset:r,howMany:o-n.howMany,count:this._changeCount++})}}if(e.type=="remove"){if(n.type=="insert"){if(r<=n.offset)n.offset-=e.howMany;else if(r<=s)if(e.offset<n.offset){const o=r-n.offset;n.offset=e.offset,n.howMany-=o,e.nodesToHandle-=o}else n.howMany-=e.nodesToHandle,e.nodesToHandle=0;else if(e.offset<=n.offset)e.nodesToHandle-=n.howMany,n.howMany=0;else if(e.offset<s){const o=s-e.offset;n.howMany-=o,e.nodesToHandle-=o}}if(n.type=="remove"&&(r<=n.offset?n.offset-=e.howMany:e.offset<n.offset&&(e.nodesToHandle+=n.howMany,n.howMany=0)),n.type=="attribute"){if(r<=n.offset)n.offset-=e.howMany;else if(e.offset<n.offset){const o=r-n.offset;n.offset=e.offset,n.howMany-=o}else if(e.offset<s)if(r<=s){const o=n.howMany;n.howMany=e.offset-n.offset;
38const a=o-n.howMany-e.nodesToHandle;t.unshift({type:"attribute",offset:e.offset,howMany:a,count:this._changeCount++})}else n.howMany-=s-e.offset}}if(e.type=="attribute"){if(n.type=="insert")if(e.offset<n.offset&&r>n.offset){if(r>s){const o={type:"attribute",offset:s,howMany:r-s,count:this._changeCount++};this._handleChange(o,t),t.push(o)}e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=n.offset&&e.offset<s&&(r>s?(e.nodesToHandle=r-s,e.offset=s):e.nodesToHandle=0);if(n.type=="remove"&&e.offset<n.offset&&r>n.offset){const o={type:"attribute",offset:n.offset,howMany:r-n.offset,count:this._changeCount++};this._handleChange(o,t),t.push(o),e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}n.type=="attribute"&&(e.offset>=n.offset&&r<=s?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=n.offset&&r>=s&&(n.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,n,r,s){const o={type:"insert",position:Ue._createAt(e,t),name:r.name,attributes:new Map(r.attributes),length:1,changeCount:this._changeCount++,action:n};return n!="insert"&&s&&(o.before={name:s.name,attributes:new Map(s.attributes)}),o}_getRemoveDiff(e,t,n,r){return{type:"remove",action:n,position:Ue._createAt(e,t),name:r.name,attributes:new Map(r.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,n){const r=[];n=new Map(n);for(const[s,o]of t){const a=n.has(s)?n.get(s):null;a!==o&&r.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:s,attributeOldValue:o,attributeNewValue:a,changeCount:this._changeCount++}),n.delete(s)}for(const[s,o]of n)r.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:s,attributeOldValue:null,attributeNewValue:o,changeCount:this._changeCount++});return r}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const n=this._changesInElement.get(t),r=e.startOffset;if(n){for(const s of n)if(s.type=="insert"&&r>=s.offset&&r<s.offset+s.howMany)return!0}return this._isInInsertedElement(t)}_removeAllNestedChanges(e,t,n){const r=new Ae(Ue._createAt(e,t),Ue._createAt(e,t+n));for(const s of r.getItems({shallow:!0}))s.is("element")&&(this._changesInElement.delete(s),this._removeAllNestedChanges(s,0,s.maxOffset))}}function IM(i){return{node:i,name:i.is("$text")?"$text":i.name,attributes:new Map(i.getAttributes())}}function RM(i){const e=[];for(const t of i)if(t.is("$text"))for(let n=0;n<t.data.length;++n)e.push(IM(t));else e.push(IM(t));return e}function MDe(i,e){const t=[];let n=0,r=0;for(const s of e){if(s.offset>n){for(let o=0;o<s.offset-n;o++)t.push("e");r+=s.offset-n}if(s.type=="insert"){for(let o=0;o<s.howMany;o++)t.push("i");n=s.offset+s.howMany}else if(s.type=="remove"){for(let o=0;o<s.howMany;o++)t.push("r");n=s.offset,r+=s.howMany}else{if(s.howMany>1500)for(let o=0;o<s.howMany;o++)t.push("a");else t.push(..."a".repeat(s.howMany).split(""));n=s.offset+s.howMany,r+=s.howMany}}if(r<i)for(let s=0;s<i-r-n;s++)t.push("e");return t}function LDe(i){const e="position"in i&&i.position.root.rootName=="$graveyard",t="range"in i&&i.range.root.rootName=="$graveyard";return!e&&!t}class UDe{_operations=[];_undoPairs=new Map;_undoneOperations=new Set;_baseVersionToOperationIndex=new Map;_version=0;_gaps=new Map;get version(){return this._version}set version(e){this._operations.length&&e>this._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new oe("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const n=this._operations[0];e===void 0&&(e=n.baseVersion);let r=t-1;for(const[a,l]of this._gaps)e>a&&e<l&&(e=l),r>a&&r<l&&(r=a-1);if(r<n.baseVersion||e>this.lastOperation.baseVersion)return[];let s=this._baseVersionToOperationIndex.get(e);s===void 0&&(s=0);let o=this._baseVersionToOperationIndex.get(r);return o===void 0&&(o=this._operations.length-1),this._operations.slice(s,o+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(t!==void 0)return this._operations[t]}
38setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class Xw extends An{rootName;_document;_isAttached=!0;_isLoaded=!0;constructor(e,t,n="main"){super(t),this._document=e,this.rootName=n}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}Xw.prototype.is=function(i,e){return e?e===this.name&&(i==="rootElement"||i==="model:rootElement"||i==="element"||i==="model:element"):i==="rootElement"||i==="model:rootElement"||i==="element"||i==="model:element"||i==="node"||i==="model:node"};const FM="$graveyard";class VDe extends Sn(){model;history;selection;roots;differ;isReadOnly;_postFixers;_hasSelectionChangedFromTheLastChangeBlock;constructor(e){super(),this.model=e,this.history=new UDe,this.selection=new us(this),this.roots=new Jn({idProperty:"rootName"}),this.differ=new Kw(e.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",FM),this.listenTo(e,"applyOperation",(t,n)=>{const r=n[0];r.isDocumentOperation&&this.differ.bufferOperation(r)},{priority:"high"}),this.listenTo(e,"applyOperation",(t,n)=>{const r=n[0];r.isDocumentOperation&&this.history.addOperation(r)},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(e.markers,"update",(t,n,r,s,o)=>{const a={...n.getData(),range:s};this.differ.bufferMarkerChange(n.name,o,a),r===null&&n.on("change",(l,c)=>{const d=n.getData();this.differ.bufferMarkerChange(n.name,{...d,range:c},d)})}),this.registerPostFixer(t=>{let n=!1;for(const r of this.roots)!r.isAttached()&&!r.isEmpty&&(t.remove(t.createRangeIn(r)),n=!0);for(const r of this.model.markers)r.getRange().root.isAttached()||(t.removeMarker(r),n=!0);return n})}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(FM)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new oe("model-document-createroot-name-exists",this,{name:t});const n=new Xw(this,e,t);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(e=!1){return this.getRoots(e).map(t=>t.rootName)}getRoots(e=!1){return this.roots.filter(t=>t!=this.graveyard&&(e||t.isAttached())&&t._isLoaded)}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=lxe(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){const e=this.getRoots();return e.length?e[0]:this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,n=t.schema,r=t.createPositionFromPath(e,[0]);return n.getNearestSelectionRange(r)||t.createRange(r)}_validateSelectionRange(e){return e.start.isValid()&&e.end.isValid()&&OM(e.start)&&OM(e.end)}_callPostFixers(e){let t=!1;do for(const n of this._postFixers)if(this.selection.refresh(),t=n(e),t)break;while(t)}}function OM(i){const e=i.textNode;if(e){const t=e.data,n=i.offset-e.startOffset;return!j3(t,n)&&!z3(t,n)}return!0}class jDe extends Sn(){_markers=new Map;[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof zf?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,n=!1,r=!1){const s=e instanceof zf?e.name:e;if(s.includes(","))throw new oe("markercollection-incorrect-marker-name",this);const o=this._markers.get(s);if(o){const c=o.getData(),d=o.getRange();let f=!1;return d.isEqual(t)||(o._attachLiveRange(is.fromRange(t)),f=!0),n!=o.managedUsingOperations&&(o._managedUsingOperations=n,f=!0),typeof r=="boolean"&&r!=o.affectsData&&(o._affectsData=r,f=!0),f&&this.fire(`update:${s}`,o,d,t,c),o}const a=is.fromRange(t),l=new zf(s,a,n,r);return this._markers.set(s,l),this.fire(`update:${s}`,l,null,t,{...l.getData(),range:null}),l}_remove(e){const t=e instanceof zf?e.name:e,n=this._markers.get(t);return n?(this._markers.delete(t),this.fire(`update:${t}`,n,n.getRange(),null,n.getData()),this._destroyMarker(n),!0):!1}_refresh(e){const t=e instanceof zf?e.name:e,n=this._markers.get(t);if(!n)throw new oe("markercollection-refresh-marker-not-exists",this);const r=n.getRange();this.fire(`update:${t}`,n,r,r,n.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)t.getRange().getIntersection(e)!==null&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class zf extends Sn(Yc){name;_managedUsingOperations;_affectsData;_liveRange;constructor(e,t,n,r){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=n,this._affectsData=r}get managedUsingOperations(){if(!this._liveRange)throw new oe("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new oe("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}
38getStart(){if(!this._liveRange)throw new oe("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new oe("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new oe("marker-destroyed",this);return this._liveRange.toRange()}toJSON(){return{name:this.name,range:this._liveRange?.toJSON(),usingOperations:this._managedUsingOperations,affectsData:this._affectsData}}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}zf.prototype.is=function(i){return i==="marker"||i==="model:marker"};class zDe extends Ms{sourcePosition;howMany;constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new oe("detach-operation-on-document-node",this)}_execute(){wY(Ae._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class la extends Yc{markers=new Map;_children=new ig;constructor(e){super(),e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return this.childCount===0}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildAtOffset(e){return this._children.getNodeAtOffset(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const n of e)t=t.getChildAtOffset(n);return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const n of e)n.name?t.push(An.fromJSON(n)):t.push(On.fromJSON(n));return new la(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=WDe(t);for(const r of n)r.parent!==null&&r._remove(),r.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const r of n)r.parent=null;return n}_removeChildrenArray(e){this._children._removeNodesArray(e);for(const t of e)t.parent=null}}la.prototype.is=function(i){return i==="documentFragment"||i==="model:documentFragment"};function WDe(i){return typeof i=="string"?[new On(i)]:(Bs(i)||(i=[i]),Array.from(i).map(e=>typeof e=="string"?new On(e):e instanceof Ro?new On(e.data,e.getAttributes()):e))}class HDe{model;batch;constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new On(e,t)}createElement(e,t){return new An(e,t)}createDocumentFragment(){return new la}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,n=0){if(this._assertWriterUsedCorrectly(),e instanceof On&&e.data=="")return;const r=Ue._createAt(t,n);if(e.parent)if(MM(e.root,r.root)){this.move(Ae._createOn(e),r);return}else{if(e.root.document)throw new oe("model-writer-insert-forbidden-move",this);this.remove(e)}const s=r.root.document?r.root.document.version:null,o=e instanceof la?e._removeChildren(0,e.childCount):e,a=new Wi(r,o,s);if(e instanceof On&&(a.shouldReceiveAttributes=!0),this.batch.addOperation(a),this.model.applyOperation(a),e instanceof la)for(const[l,c]of e.markers){const d=Ue._createAt(c.root,0),m={range:new Ae(c.start._getCombined(d,r),c.end._getCombined(d,r)),usingOperation:!0,affectsData:!0};this.model.markers.has(l)?this.updateMarker(l,m):this.addMarker(l,m)}}insertText(e,t,n,r){t instanceof la||t instanceof An||t instanceof Ue?this.insert(this.createText(e),t,n):this.insert(this.createText(e,t),n,r)}insertElement(e,t,n,r){t instanceof la||t instanceof An||t instanceof Ue?this.insert(this.createElement(e),t,n):this.insert(this.createElement(e,t),n,r)}append(e,t){this.insert(e,t,"end")}appendText(e,t,n){t instanceof la||t instanceof An?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),n,"end")}appendElement(e,t,n){t instanceof la||t instanceof An?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),n,"end")}setAttribute(e,t,n){if(this._assertWriterUsedCorrectly(),n instanceof Ae){const r=n.getMinimalFlatRanges();for(const s of r)NM(this,e,t,s)}else BM(this,e,t,n)}setAttributes(e,t){for(const[n,r]of ka(e))this.setAttribute(n,r,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof Ae){const n=t.getMinimalFlatRanges();for(const r of n)NM(this,e,null,r)}else BM(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=n=>{for(const r of n.getAttributeKeys())this.removeAttribute(r,n)};if(!(e instanceof Ae))t(e);else for(const n of e.getItems())t(n)}move(e,t,n){if(this._assertWriterUsedCorrectly(),!(e instanceof Ae))throw new oe("writer-move-invalid-range",this);if(!e.isFlat)throw new oe("writer-move-range-not-flat",this);const r=Ue._createAt(t,n);if(r.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!MM(e.root,r.root))throw new oe("writer-move-different-document",this);const s=e.root.document?e.root.document.version:null,o=new rn(e.start,e.end.offset-e.start.offset,r,s);this.batch.addOperation(o),this.model.applyOperation(o)}remove(e){this._assertWriterUsedCorrectly();const n=(e instanceof Ae?e:Ae._createOn(e)).getMinimalFlatRanges().reverse();for(const r of n)this._addOperationForAffectedMarkers("move",r),qDe(r.start,r.end.offset-r.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,n=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof An))throw new oe("writer-merge-no-element-before",this);if(!(n instanceof An))throw new oe("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,n){return this.model.createPositionFromPath(e,t,n)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,n=e.nodeAfter;
38this.move(Ae._createIn(n),Ue._createAt(t,"end")),this.remove(n)}_merge(e){const t=Ue._createAt(e.nodeBefore,"end"),n=Ue._createAt(e.nodeAfter,0),r=e.root.document.graveyard,s=new Ue(r,[0]),o=e.root.document.version,a=new si(n,e.nodeAfter.maxOffset,t,s,o);this.batch.addOperation(a),this.model.applyOperation(a)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof An))throw new oe("writer-rename-not-element-instance",this);const n=e.root.document?e.root.document.version:null,r=new os(Ue._createBefore(e),e.name,t,n);this.batch.addOperation(r),this.model.applyOperation(r)}split(e,t){this._assertWriterUsedCorrectly();let n=e.parent;if(!n.parent)throw new oe("writer-split-element-no-parent",this);if(t||(t=n.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new oe("writer-split-invalid-limit-element",this);let r,s;do{const o=n.root.document?n.root.document.version:null,a=n.maxOffset-e.offset,l=kn.getInsertionPosition(e),c=new kn(e,a,l,null,o);this.batch.addOperation(c),this.model.applyOperation(c),!r&&!s&&(r=n,s=e.parent.nextSibling),e=this.createPositionAfter(e.parent),n=e.parent}while(n!==t);return{position:e,range:new Ae(Ue._createAt(r,"end"),Ue._createAt(s,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new oe("writer-wrap-range-not-flat",this);const n=t instanceof An?t:new An(t);if(n.childCount>0)throw new oe("writer-wrap-element-not-empty",this);if(n.parent!==null)throw new oe("writer-wrap-element-attached",this);this.insert(n,e.start);const r=new Ae(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(r,Ue._createAt(n,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),e.parent===null)throw new oe("writer-unwrap-element-no-parent",this);this.move(Ae._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||typeof t.usingOperation!="boolean")throw new oe("writer-addmarker-no-usingoperation",this);const n=t.usingOperation,r=t.range,s=t.affectsData===void 0?!1:t.affectsData;if(this.model.markers.has(e))throw new oe("writer-addmarker-marker-exists",this);if(!r)throw new oe("writer-addmarker-no-range",this);return n?(pp(this,e,null,r,s),this.model.markers.get(e)):this.model.markers._set(e,r,n,s)}updateMarker(e,t){this._assertWriterUsedCorrectly();const n=typeof e=="string"?e:e.name,r=this.model.markers.get(n);if(!r)throw new oe("writer-updatemarker-marker-not-exists",this);if(!t){Kt("writer-updatemarker-reconvert-using-editingcontroller",{markerName:n}),this.model.markers._refresh(r);return}const s=typeof t.usingOperation=="boolean",o=typeof t.affectsData=="boolean",a=o?t.affectsData:r.affectsData;if(!s&&!t.range&&!o)throw new oe("writer-updatemarker-wrong-options",this);const l=r.getRange(),c=t.range?t.range:l;if(s&&t.usingOperation!==r.managedUsingOperations){t.usingOperation?pp(this,n,null,c,a):(pp(this,n,l,null,a),this.model.markers._set(n,c,void 0,a));return}r.managedUsingOperations?pp(this,n,l,c,a):this.model.markers._set(n,c,void 0,a)}removeMarker(e){this._assertWriterUsedCorrectly();const t=typeof e=="string"?e:e.name;if(!this.model.markers.has(t))throw new oe("writer-removemarker-no-marker",this);const n=this.model.markers.get(t);if(!n.managedUsingOperations){this.model.markers._remove(t);return}const r=n.getRange();pp(this,t,r,null,n.affectsData)}addRoot(e,t="$root"){this._assertWriterUsedCorrectly();const n=this.model.document.getRoot(e);if(n&&n.isAttached())throw new oe("writer-addroot-root-exists",this);const r=this.model.document,s=new xa(e,t,!0,r,r.version);return this.batch.addOperation(s),this.model.applyOperation(s),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const t=typeof e=="string"?this.model.document.getRoot(e):e;if(!t||!t.isAttached())throw new oe("writer-detachroot-no-root",this);for(const s of this.model.markers)s.getRange().root===t&&this.removeMarker(s);for(const s of t.getAttributeKeys())this.removeAttribute(s,t);this.remove(this.createRangeIn(t));const n=this.model.document,r=new xa(t.rootName,t.name,!1,n,n.version);this.batch.addOperation(r),this.model.applyOperation(r)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),typeof e=="string")this._setSelectionAttribute(e,t);else for(const[n,r]of ka(e))this._setSelectionAttribute(n,r)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),typeof e=="string")this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const r=us._getStoreAttributeKey(e);this.setAttribute(r,t,n.anchor.parent)}n._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const n=us._getStoreAttributeKey(e);this.removeAttribute(n,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new oe("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const n of this.model.markers){if(!n.managedUsingOperations)continue;const r=n.getRange();let s=!1;if(e==="move"){const o=t;s=o.containsPosition(r.start)||o.start.isEqual(r.start)||o.containsPosition(r.end)||o.end.isEqual(r.end)}else{const o=t,a=o.nodeBefore,l=o.nodeAfter,c=r.start.parent==a&&r.start.isAtEnd,d=r.end.parent==l&&r.end.offset==0,f=r.end.nodeAfter==l,m=r.start.nodeAfter==l;s=c||d||f||m}s&&this.updateMarker(n.name,{range:r})}}}function NM(i,e,t,n){const r=i.model,s=r.document;let o=n.start,a,l,c;for(const f of n.getWalker({shallow:!0}))c=f.item.getAttribute(e),a&&l!=c&&(l!=t&&d(),o=a),a=f.nextPosition,l=c;a instanceof Ue&&a!=o&&l!=t&&d();function d(){const f=new Ae(o,a),m=f.root.document?s.version:null,p=new gi(f,e,l,t,m);i.batch.addOperation(p),r.applyOperation(p)}}function BM(i,e,t,n){const r=i.model,s=r.document,o=n.getAttribute(e);let a,l;if(o!=t){if(n.root===n){const d=n.document?s.version:null;l=new Cl(n,e,o,t,d)}else{a=new Ae(Ue._createBefore(n),i.createPositionAfter(n));const d=a.root.document?s.version:null;l=new gi(a,e,o,t,d)}i.batch.addOperation(l),r.applyOperation(l)}}function pp(i,e,t,n,r){const s=i.model,o=s.document,a=new Rr(e,t,n,s.markers,!!r,o.version);i.batch.addOperation(a),s.applyOperation(a)}function qDe(i,e,t,n){let r;if(i.root.document){const s=n.document,o=new Ue(s.graveyard,[0]);r=new rn(i,e,o,s.version)}else r=new zDe(i,e);t.addOperation(r),n.applyOperation(r)}function MM(i,e){return i===e||i instanceof Xw&&e instanceof Xw}function $De(i){i.document.registerPostFixer(e=>GDe(e,i))}
38function GDe(i,e){const t=e.document.selection,n=e.schema,r=[];let s=!1;for(const o of t.getRanges()){const a=Z3(o,n);a&&!a.isEqual(o)?(r.push(a),s=!0):r.push(o)}return s&&i.setSelection(QDe(r),{backward:t.isBackward}),!1}function Z3(i,e){return i.isCollapsed?YDe(i,e):KDe(i,e)}function YDe(i,e){const t=i.start,n=e.getNearestSelectionRange(t);if(!n){const s=t.getAncestors().reverse().find(o=>e.isObject(o));return s?Ae._createOn(s):null}if(!n.isCollapsed)return n;const r=n.start;return t.isEqual(r)?null:new Ae(r)}function KDe(i,e){const{start:t,end:n}=i,r=e.checkChild(t,"$text"),s=e.checkChild(n,"$text"),o=e.getLimitElement(t),a=e.getLimitElement(n);if(o===a){if(r&&s)return null;if(XDe(t,n,e)){const f=t.nodeAfter&&e.isSelectable(t.nodeAfter)?null:e.getNearestSelectionRange(t,"forward"),p=n.nodeBefore&&e.isSelectable(n.nodeBefore)?null:e.getNearestSelectionRange(n,"backward"),g=f?f.start:t,y=p?p.end:n;return new Ae(g,y)}}const l=o&&!o.is("rootElement"),c=a&&!a.is("rootElement");if(l||c){const d=t.nodeAfter&&n.nodeBefore&&t.nodeAfter.parent===n.nodeBefore.parent,f=l&&(!d||!UM(t.nodeAfter,e)),m=c&&(!d||!UM(n.nodeBefore,e));let p=t,g=n;return f&&(p=Ue._createBefore(LM(o,e))),m&&(g=Ue._createAfter(LM(a,e))),new Ae(p,g)}return null}function LM(i,e){let t=i,n=t;for(;e.isLimit(n)&&n.parent;)t=n,n=n.parent;return t}function XDe(i,e,t){const n=i.nodeAfter&&!t.isLimit(i.nodeAfter)||t.checkChild(i,"$text"),r=e.nodeBefore&&!t.isLimit(e.nodeBefore)||t.checkChild(e,"$text");return n||r}function QDe(i){const e=[...i],t=new Set;let n=1;for(;n<e.length;){const s=e[n],o=e.slice(0,n);for(const[a,l]of o.entries())if(!t.has(a)){if(s.isEqual(l))t.add(a);else if(s.isIntersecting(l)){t.add(a),t.add(n);const c=s.getJoined(l);e.push(c)}}n++}return e.filter((s,o)=>!t.has(o))}function UM(i,e){return i&&e.isSelectable(i)}function ZDe(i,e,t={}){if(e.isCollapsed)return;const n=e.getFirstRange();if(n.root.rootName=="$graveyard")return;const r=i.schema;i.change(s=>{if(!t.doNotResetEntireContent&&aEe(r,e)){oEe(s,e);return}const o={};if(!t.doNotAutoparagraph){const c=e.getSelectedElement();c&&Object.assign(o,r.getAttributesWithProperty(c,"copyOnReplace",!0))}let a,l;t.doNotFixSelection?(a=di.fromPosition(n.start,"toPrevious"),l=di.fromPosition(n.end,"toNext")):[a,l]=JDe(n),a.isTouching(l)||s.remove(s.createRange(a,l)),t.leaveUnmerged||(tEe(s,a,l),r.removeDisallowedAttributes(a.parent.getChildren(),s)),AY(s,e,a),!t.doNotAutoparagraph&&rEe(r,a)&&TY(s,a,e,o),a.detach(),l.detach()})}function JDe(i){const e=i.root.document.model,t=i.start;let n=i.end;if(e.hasContent(i,{ignoreMarkers:!0})){const r=eEe(n);if(r&&n.isTouching(e.createPositionAt(r,0))){const s=e.createSelection(i);e.modifySelection(s,{direction:"backward"});const o=s.getLastPosition(),a=e.createRange(o,n);e.hasContent(a,{ignoreMarkers:!0})||(n=o)}}return[di.fromPosition(t,"toPrevious"),di.fromPosition(n,"toNext")]}function eEe(i){const e=i.parent,t=e.root.document.model.schema,n=e.getAncestors({parentFirst:!0,includeSelf:!0});for(const r of n){if(t.isLimit(r))return null;if(t.isBlock(r))return r}}function tEe(i,e,t){const n=i.model;if(!J3(i.model.schema,e,t))return;const[r,s]=iEe(e,t);!r||!s||(!n.hasContent(r,{ignoreMarkers:!0})&&n.hasContent(s,{ignoreMarkers:!0})?EY(i,e,t,r.parent):DY(i,e,t,r.parent))}function DY(i,e,t,n){const r=e.parent,s=t.parent;if(!(r==n||s==n)){for(e=i.createPositionAfter(r),t=i.createPositionBefore(s),t.isEqual(e)||i.insert(s,e),i.merge(e);t.parent.isEmpty;){const o=t.parent;t=i.createPositionBefore(o),i.remove(o)}J3(i.model.schema,e,t)&&DY(i,e,t,n)}}function EY(i,e,t,n){const r=e.parent,s=t.parent;if(!(r==n||s==n)){for(e=i.createPositionAfter(r),t=i.createPositionBefore(s),t.isEqual(e)||i.insert(r,t);e.parent.isEmpty;){const o=e.parent;e=i.createPositionBefore(o),i.remove(o)}t=i.createPositionBefore(s),nEe(i,t),J3(i.model.schema,e,t)&&EY(i,e,t,n)}}function nEe(i,e){const t=e.nodeBefore,n=e.nodeAfter;t.name!=n.name&&i.rename(t,n.name),i.clearAttributes(t),i.setAttributes(Object.fromEntries(n.getAttributes()),t),i.merge(e)}function J3(i,e,t){const n=e.parent,r=t.parent;return n==r||i.isLimit(n)||i.isLimit(r)?!1:sEe(e,t,i)}function iEe(i,e){const t=i.getAncestors(),n=e.getAncestors();let r=0;for(;t[r]&&t[r]==n[r];)r++;return[t[r],n[r]]}function rEe(i,e){const t=i.checkChild(e,"$text"),n=i.checkChild(e,"paragraph");return!t&&n}function sEe(i,e,t){const n=new Ae(i,e);for(const r of n.getWalker())if(t.isLimit(r.item))return!1;return!0}function TY(i,e,t,n={}){const r=i.createElement("paragraph");i.model.schema.setAllowedAttributes(r,n,i),i.insert(r,e),AY(i,t,i.createPositionAt(r,0))}function oEe(i,e){const t=i.model.schema.getLimitElement(e);i.remove(i.createRangeIn(t)),TY(i,i.createPositionAt(t,0),e)}function aEe(i,e){const t=i.getLimitElement(e);
38if(!e.containsEntireContent(t))return!1;const n=e.getFirstRange();return n.start.parent==n.end.parent?!1:i.checkChild(t,"paragraph")}function AY(i,e,t){e instanceof us?i.setSelection(t):e.setTo(t)}function lEe(i,e){return i.change(t=>{const n=t.createDocumentFragment(),r=e.getFirstRange();if(!r||r.isCollapsed)return n;const s=r.start.root,o=r.start.getCommonPath(r.end),a=s.getNodeByPath(o);let l;r.start.parent==r.end.parent?l=r:l=t.createRange(t.createPositionAt(a,r.start.path[o.length]),t.createPositionAt(a,r.end.path[o.length]+1));const c=l.end.offset-l.start.offset;for(const d of l.getItems({shallow:!0}))d.is("$textProxy")?t.appendText(d.data,d.getAttributes(),n):t.append(t.cloneElement(d,!0),n);if(l!=r){const d=r._getTransformedByMove(l.start,t.createPositionAt(n,0),c)[0],f=t.createRange(t.createPositionAt(n,0),d.start),m=t.createRange(d.end,t.createPositionAt(n,"end"));VM(m,t),VM(f,t)}return n})}function VM(i,e){const t=[];Array.from(i.getItems({direction:"backward"})).map(n=>e.createRangeOn(n)).filter(n=>(n.start.isAfter(i.start)||n.start.isEqual(i.start))&&(n.end.isBefore(i.end)||n.end.isEqual(i.end))).forEach(n=>{t.push(n.start.parent),e.remove(n)}),t.forEach(n=>{let r=n;for(;r.parent&&r.isEmpty;){const s=e.createRangeOn(r);r=r.parent,e.remove(s)}})}function cEe(i,e,t){return i.change(n=>{const r=t||i.document.selection;r.isCollapsed||i.deleteContent(r,{doNotAutoparagraph:!0});const s=new uEe(i,n,r.anchor),o=[];let a;if(e.is("documentFragment")){if(e.markers.size){const d=[];for(const[f,m]of e.markers){const{start:p,end:g}=m,y=p.isEqual(g);d.push({position:p,name:f,isCollapsed:y},{position:g,name:f,isCollapsed:y})}d.sort(({position:f},{position:m})=>f.isBefore(m)?1:-1);for(const{position:f,name:m,isCollapsed:p}of d){let g=null,y=null;const v=f.parent===e&&f.isAtStart,x=f.parent===e&&f.isAtEnd;!v&&!x?(g=n.createElement("$marker"),n.insert(g,f)):p&&(y=v?"start":"end"),o.push({name:m,element:g,collapsed:y})}}a=e.getChildren()}else a=[e];s.handleNodes(a);let l=s.getSelectionRange();if(e.is("documentFragment")&&o.length){const d=l?is.fromRange(l):null,f={};for(let m=o.length-1;m>=0;m--){const{name:p,element:g,collapsed:y}=o[m],v=!f[p];if(v&&(f[p]=[]),g){const x=n.createPositionAt(g,"before");f[p].push(x),n.remove(g)}else{const x=s.getAffectedRange();if(!x){y&&f[p].push(s.position);continue}y?f[p].push(x[y]):f[p].push(v?x.start:x.end)}}for(const[m,[p,g]]of Object.entries(f))p&&g&&p.root===g.root&&p.root.document&&!n.model.markers.has(m)&&n.addMarker(m,{usingOperation:!0,affectsData:!0,range:new Ae(p,g)});d&&(l=d.toRange(),d.detach())}l&&(r instanceof us?n.setSelection(l):r.setTo(l));const c=s.getAffectedRange()||i.createRange(r.anchor);return s.destroy(),c})}class uEe{model;writer;position;canMergeWith;schema;_documentFragment;_documentFragmentPosition;_firstNode=null;_lastNode=null;_lastAutoParagraph=null;_filterAttributesAndChildrenOf=[];_affectedStart=null;_affectedEnd=null;_nodeToSelect=null;constructor(e,t,n){this.model=e,this.writer=t,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const t of Array.from(e))t.offsetSize>0&&this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesAndChildrenOf,this.writer),this.model._config?.get("experimentalFlags.modelInsertContentDeepSchemaVerification")&&this._removeDisallowedChildren(this._filterAttributesAndChildrenOf),this._filterAttributesAndChildrenOf=[]}_removeDisallowedChildren(e){const t=Array.from(e);for(const n of t){if(!n.is("element"))continue;const r=[],s=[],o=this.writer.createRangeIn(n).getWalker({ignoreElementEnd:!0});for(const{item:a}of o){const l=a.parent;this.schema.checkChild(l,a)||(a.is("element")&&!this.schema.isObject(a)?(s.push(a),t.push(l)):r.push(a),o.jumpTo(this.writer.createPositionAfter(a)))}for(const a of s)this.writer.unwrap(a);for(const a of r)this.writer.remove(a)}}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),n=this.writer.createPositionAfter(e);if(n.isAfter(t)){this._lastNode=e;
38if(this.position.parent!=e||!this.position.isAtEnd)throw new oe("insertcontent-invalid-insertion-position",this);this.position=n,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?Ae._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new Ae(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(!this._checkAndSplitToAllowedPosition(e)){this.schema.isObject(e)||this._handleDisallowedNode(e);return}e=this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=di.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleDisallowedNode(e){e.is("element")&&this.handleNodes(e.getChildren())}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new oe("insertcontent-wrong-position",this,{node:e,position:this.position});return this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),e.parent||(e=this._documentFragmentPosition.nodeBefore),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesAndChildrenOf.push(e),e}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=di.fromPosition(e,"toPrevious")),(!this._affectedEnd||this._affectedEnd.isBefore(e))&&(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=di.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof An)||!this._canMergeLeft(e))return;const t=di._createBefore(e);t.stickiness="toNext";const n=di.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=di._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=di._createAt(t.nodeBefore,"end","toNext")),this.position=n.toPosition(),n.detach(),this._filterAttributesAndChildrenOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof An)||!this._canMergeRight(e))return;const t=di._createAfter(e);t.stickiness="toNext";if(!this.position.isEqual(t))throw new oe("insertcontent-invalid-insertion-position",this);this.position=Ue._createAt(t.nodeBefore,"end");const n=di.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=di._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=di._createAt(t.nodeBefore,0,"toPrevious")),this.position=n.toPosition(),n.detach(),this._filterAttributesAndChildrenOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof An&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof An&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_insertAutoParagraph(){this._insertPartialFragment();const e=this.writer.createElement("paragraph");this.writer.insert(e,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=e,this.position=this.writer.createPositionAt(e,0)}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const n=this.position.parent;this.position=this.writer.createPositionBefore(n),n.isEmpty&&n.parent===t&&this.writer.remove(n)}
38else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const n=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=n,this.canMergeWith.add(this.position.nodeAfter)}return this.schema.checkChild(this.position.parent,e)||this._insertAutoParagraph(),!0}_getAllowedIn(e,t){const n=this.schema.createContext(e);return this.schema.checkChild(n,t)||this.schema.checkChild(n,"paragraph")&&this.schema.checkChild(n.push("paragraph"),t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}function dEe(i,e,t,n={}){if(!i.schema.isObject(e))throw new oe("insertobject-element-not-an-object",i,{object:e});const r=t||i.document.selection;let s=r;n.findOptimalPosition&&i.schema.isBlock(e)&&(s=i.createSelection(i.schema.findOptimalInsertionRange(r,n.findOptimalPosition)));const o=Rn(r.getSelectedBlocks()),a={};return o&&Object.assign(a,i.schema.getAttributesWithProperty(o,"copyOnReplace",!0)),i.change(l=>{s.isCollapsed||i.deleteContent(s,{doNotAutoparagraph:!0});let c=e;const d=s.anchor.parent,f=i.schema.createContext(d);!i.schema.checkChild(f,e)&&i.schema.checkChild(f,"paragraph")&&i.schema.checkChild(f.push("paragraph"),e)&&(c=l.createElement("paragraph"),l.insert(e,c)),i.schema.setAllowedAttributes(c,a,l);const m=i.insertContent(c,s);return m.isCollapsed||n.setSelection&&fEe(l,e,n.setSelection,a),m})}function fEe(i,e,t,n){const r=i.model;if(t=="on"){i.setSelection(e,"on");return}if(t!="after")throw new oe("insertobject-invalid-place-parameter-value",r);let s=e.nextSibling;if(r.schema.isInline(e)){i.setSelection(e,"after");return}!(s&&r.schema.checkChild(s,"$text"))&&r.schema.checkChild(e.parent,"paragraph")&&(s=i.createElement("paragraph"),r.schema.setAllowedAttributes(s,n,i),r.insertContent(s,i.createPositionAfter(e))),s&&i.setSelection(s,0)}const hEe=' ,.?!:;"-()';function mEe(i,e,t={}){const n=i.schema,r=t.direction!="backward",s=t.unit?t.unit:"character",o=!!t.treatEmojiAsSingleUnit,a=e.focus,l=new bl({boundaries:yEe(a,r),singleCharacters:!0,direction:r?"forward":"backward"}),c={walker:l,schema:n,isForward:r,unit:s,treatEmojiAsSingleUnit:o};let d;for(;d=l.next();){if(d.done)return;const f=pEe(c,d.value);if(f){e instanceof us?i.change(m=>{m.setSelectionFocus(f)}):e.setFocus(f);return}}}function pEe(i,e){const{isForward:t,walker:n,unit:r,schema:s,treatEmojiAsSingleUnit:o}=i,{type:a,item:l,nextPosition:c}=e;if(a=="text")return i.unit==="word"?bEe(n,t):gEe(n,r,o);if(a==(t?"elementStart":"elementEnd")){if(s.isSelectable(l))return Ue._createAt(l,t?"after":"before");if(s.checkChild(c,"$text"))return c}else{if(s.isLimit(l)){n.skip(()=>!0);return}if(s.checkChild(c,"$text"))return c}}function gEe(i,e,t){const n=i.position.textNode;if(n){const r=n.data;let s=i.position.offset-n.startOffset;for(;j3(r,s)||e=="character"&&z3(r,s)||t&&LG(r,s);)i.next(),s=i.position.offset-n.startOffset}return i.position}function bEe(i,e){let t=i.position.textNode;for(t||(t=e?i.position.nodeAfter:i.position.nodeBefore);t&&t.is("$text");){const n=i.position.offset-t.startOffset;if(wEe(t,n,e))t=e?i.position.nodeAfter:i.position.nodeBefore;else{if(vEe(t.data,n,e))break;i.next()}}return i.position}function yEe(i,e){const t=i.root,n=Ue._createAt(t,e?"end":0);return e?new Ae(i,n):new Ae(n,i)}function vEe(i,e,t){const n=e+(t?0:-1);return hEe.includes(i.charAt(n))}function wEe(i,e,t){return e===(t?i.offsetSize:0)}class xEe extends hn(){markers;document;schema;_config;_pendingChanges;_currentWriter;constructor(e){super(),this.markers=new jDe,this.document=new VDe(this),this.schema=new iDe,this._config=e,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(t=>this.decorate(t)),this.on("applyOperation",(t,n)=>{n[0]._validate()},{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(()=>!0,"$marker"),$De(this),this.document.registerPostFixer(mY),this.on("insertContent",(t,[n,r])=>{t.return=cEe(this,n,r)}),this.on("insertObject",(t,[n,r,s])=>{t.return=dEe(this,n,r,s)}),this.on("canEditAt",t=>{const n=!this.document.isReadOnly;t.return=n,n||t.stop()})}
38change(e){try{return this._pendingChanges.length===0?(this._pendingChanges.push({batch:new Cf,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(t){oe.rethrowUnexpectedError(t,this)}}enqueueChange(e,t){try{e?typeof e=="function"?(t=e,e=new Cf):e instanceof Cf||(e=new Cf(e)):e=new Cf,this._pendingChanges.push({batch:e,callback:t}),this._pendingChanges.length==1&&this._runPendingChanges()}catch(n){oe.rethrowUnexpectedError(n,this)}}applyOperation(e){e._execute()}insertContent(e,t,n,...r){const s=OE(t,n);return this.fire("insertContent",[e,s,n,...r])}insertObject(e,t,n,r,...s){const o=OE(t,n);return this.fire("insertObject",[e,o,r,r,...s])}deleteContent(e,t){ZDe(this,e,t)}modifySelection(e,t){mEe(this,e,t)}getSelectedContent(e){return lEe(this,e)}hasContent(e,t={}){const n=e instanceof Ae?e:Ae._createIn(e);if(n.isCollapsed)return!1;const{ignoreWhitespaces:r=!1,ignoreMarkers:s=!1}=t;if(!s){for(const o of this.markers.getMarkersIntersectingRange(n))if(o.affectsData)return!0}for(const o of n.getItems())if(this.schema.isContent(o))if(o.is("$textProxy"))if(r){if(o.data.search(/\S/)!==-1)return!0}else return!0;else return!0;return!1}canEditAt(e){const t=OE(e);return this.fire("canEditAt",[t])}createPositionFromPath(e,t,n){return new Ue(e,t,n)}createPositionAt(e,t){return Ue._createAt(e,t)}createPositionAfter(e){return Ue._createAfter(e)}createPositionBefore(e){return Ue._createBefore(e)}createRange(e,t){return new Ae(e,t)}createRangeIn(e){return Ae._createIn(e)}createRangeOn(e){return Ae._createOn(e)}createSelection(...e){return new ks(...e)}createBatch(e){return new Cf(e)}createOperationFromJSON(e){return SDe.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new HDe(this,t);const n=this._pendingChanges[0].callback(this._currentWriter);e.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}
38return e}}function OE(i,e){if(i)return i instanceof ks||i instanceof us?i:i instanceof yd?e||e===0?new ks(i,e):i.is("rootElement")?new ks(i,"in"):new ks(i,"on"):new ks(i)}class _Ee extends $o{domEventType="click";onDomEvent(e){this.fire(e.type,e)}}class e4 extends $o{domEventType=["mousedown","mouseup","mouseover","mouseout"];onDomEvent(e){this.fire(e.type,e)}}class CEe extends $o{domEventType=["touchstart","touchend","touchmove"];onDomEvent(e){this.fire(e.type,e)}}class kY extends $o{domEventType=["pointerdown","pointerup","pointermove"];onDomEvent(e){this.fire(e.type,e)}}class D0{document;constructor(e){this.document=e}createDocumentFragment(e){return new ed(this.document,e)}createElement(e,t,n){return new jo(this.document,e,t,n)}createText(e){return new Ii(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,n){return n._insertChild(e,t)}removeChildren(e,t,n){return n._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const n=e.parent;if(n){const r=n.getChildIndex(e);return this.removeChildren(r,1,n),this.insertChild(r,t,n),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const n=t.getChildIndex(e);this.remove(e),this.insertChild(n,e.getChildren(),t)}}rename(e,t){const n=new jo(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,n)?n:null}setAttribute(e,t,n){n._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,n){Po(e)&&n===void 0?t._setStyle(e):n._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,n){n._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return He._createAt(e,t)}createPositionAfter(e){return He._createAfter(e)}createPositionBefore(e){return He._createBefore(e)}createRange(e,t){return new xt(e,t)}createRangeOn(e){return xt._createOn(e)}createRangeIn(e){return xt._createIn(e)}createSelection(...e){return new Bo(...e)}}const DEe=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,EEe=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,TEe=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,AEe=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,kEe=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,SEe=/\w+\((?:[^()]|\([^()]*\))*\)|\S+/gi,PEe=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function SY(i){return i.startsWith("#")?DEe.test(i):i.startsWith("rgb")?EEe.test(i)||TEe.test(i):i.startsWith("hsl")?AEe.test(i)||kEe.test(i):PEe.has(i.toLowerCase())}const IEe=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function REe(i){return IEe.includes(i)}const FEe=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function C_(i){return FEe.test(i)}const OEe=/^[+-]?[0-9]*([.][0-9]+)?%$/;function PY(i){return OEe.test(i)}const NEe=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function BEe(i){return NEe.includes(i)}const MEe=["center","top","bottom","left","right"];function LEe(i){return MEe.includes(i)}const UEe=["fixed","scroll","local"];function VEe(i){return UEe.includes(i)}const jEe=/^url\(/;function zEe(i){return jEe.test(i)}function rg(i=""){if(i==="")return{top:void 0,right:void 0,bottom:void 0,left:void 0};const e=t4(i),t=e[0],n=e[2]||t,r=e[1]||t,s=e[3]||r;return{top:t,bottom:n,right:r,left:s}}function sg(i){return e=>{const{top:t,right:n,bottom:r,left:s}=e,o=[];return[t,n,s,r].every(a=>!!a)?o.push([i,WEe(e)]):(t&&o.push([i+"-top",t]),n&&o.push([i+"-right",n]),r&&o.push([i+"-bottom",r]),s&&o.push([i+"-left",s])),o}}function WEe({top:i,right:e,bottom:t,left:n}){const r=[];return n!==e?r.push(i,e,t,n):t!==i?r.push(i,e,t):e!==i?r.push(i,e):r.push(i),r.join(" ")}function IY(i){return e=>({path:i,value:rg(e)})}function t4(i){const e=i.trim().slice(0,1500).matchAll(SEe);return Array.from(e).map(t=>t[0])}function n4(i){i.setNormalizer("background",HEe()),i.setNormalizer("background-color",qEe()),i.setReducer("background",$Ee()),i.setStyleRelation("background",["background-color"])}function HEe(){return i=>{const e={},t=t4(i);for(const n of t)BEe(n)?(e.repeat=e.repeat||[],e.repeat.push(n)):LEe(n)?(e.position=e.position||[],e.position.push(n)):VEe(n)?e.attachment=n:SY(n)?e.color=n:zEe(n)&&(e.image=n);return{path:"background",value:e}}}function qEe(){return i=>({path:"background.color",value:i})}function $Ee(){return i=>{const e=[];return e.push(["background-color",i.color]),e}}function RY(i){i.setNormalizer("border",GEe()),i.setNormalizer("border-top",Ty("top")),i.setNormalizer("border-right",Ty("right")),i.setNormalizer("border-bottom",Ty("bottom")),i.setNormalizer("border-left",Ty("left")),i.setNormalizer("border-color",NE("c
38olor")),i.setNormalizer("border-width",NE("width")),i.setNormalizer("border-style",NE("style")),i.setNormalizer("border-top-color",Js("color","top")),i.setNormalizer("border-top-style",Js("style","top")),i.setNormalizer("border-top-width",Js("width","top")),i.setNormalizer("border-right-color",Js("color","right")),i.setNormalizer("border-right-style",Js("style","right")),i.setNormalizer("border-right-width",Js("width","right")),i.setNormalizer("border-bottom-color",Js("color","bottom")),i.setNormalizer("border-bottom-style",Js("style","bottom")),i.setNormalizer("border-bottom-width",Js("width","bottom")),i.setNormalizer("border-left-color",Js("color","left")),i.setNormalizer("border-left-style",Js("style","left")),i.setNormalizer("border-left-width",Js("width","left")),i.setExtractor("border-top",Ay("top")),i.setExtractor("border-right",Ay("right")),i.setExtractor("border-bottom",Ay("bottom")),i.setExtractor("border-left",Ay("left")),i.setExtractor("border-top-color","border.color.top"),i.setExtractor("border-right-color","border.color.right"),i.setExtractor("border-bottom-color","border.color.bottom"),i.setExtractor("border-left-color","border.color.left"),i.setExtractor("border-top-width","border.width.top"),i.setExtractor("border-right-width","border.width.right"),i.setExtractor("border-bottom-width","border.width.bottom"),i.setExtractor("border-left-width","border.width.left"),i.setExtractor("border-top-style","border.style.top"),i.setExtractor("border-right-style","border.style.right"),i.setExtractor("border-bottom-style","border.style.bottom"),i.setExtractor("border-left-style","border.style.left"),i.setReducer("border-color",sg("border-color")),i.setReducer("border-style",sg("border-style")),i.setReducer("border-width",sg("border-width")),i.setReducer("border-top",ky("top")),i.setReducer("border-right",ky("right")),i.setReducer("border-bottom",ky("bottom")),i.setReducer("border-left",ky("left")),i.setReducer("border",KEe()),i.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),i.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),i.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),i.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),i.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),i.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),i.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),i.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function GEe(){return i=>{const{color:e,style:t,width:n}=FY(i);return{path:"border",value:{color:rg(e),style:rg(t),width:rg(n)}}}}function Ty(i){return e=>{const{color:t,style:n,width:r}=FY(e),s={};return t!==void 0&&(s.color={[i]:t}),n!==void 0&&(s.style={[i]:n}),r!==void 0&&(s.width={[i]:r}),{path:"border",value:s}}}function NE(i){return e=>({path:"border",value:YEe(e,i)})}function YEe(i,e){return{[e]:rg(i)}}function Js(i,e){return t=>({path:"border",value:{[i]:{[e]:t}}})}function Ay(i){return(e,t)=>{if(t.border)return jp(t.border,i)}}function jp(i,e){const t={};return i.width&&i.width[e]&&(t.width=i.width[e]),i.style&&i.style[e]&&(t.style=i.style[e]),i.color&&i.color[e]&&(t.color=i.color[e]),t}function FY(i){const e={},t=t4(i);for(const n of t)C_(n)||/thin|medium|thick/.test(n)?e.width=n:REe(n)?e.style=n:e.color=n;return e}function KEe(){return e=>{const t=jp(e,"top"),n=jp(e,"right"),r=jp(e,"bottom"),s=jp(e,"left"),o=[t,n,r,s],a={width:i(o,"width"),style:i(o,"style"),color:i(o,"color")},l=Wf(a,"all");return l.length?l:[...Object.entries(a).reduce((d,[f,m])=>(m&&(d.push([`border-${f}`,m]),o.forEach(p=>delete p[f])),d),[]),...Wf(t,"top"),...Wf(n,"right"),...Wf(r,"bottom"),...Wf(s,"left")]};function i(e,t){return e.map(n=>n[t]).reduce((n,r)=>n==r?n:null)}}function ky(i){return e=>Wf(e,i)}function Wf(i,e){const t=[];if(i&&i.width&&t.push("width"),i&&i.style&&t.push("style"),i&&i.color&&t.push("color"),t.length==3){const n=t.map(r=>i[r]).join(" ");return[e=="all"?["border",n]:[`border-${e}`,n]]}return e=="all"?[]:t.map(n=>[`border-${e}-${n}`,i[n]])}function OY(i){i.setNormalizer("margin",IY("margin")),i.setNormalizer("margin-top",e=>({path:"margin.top",value:e})),i.setNormalizer("margin-right",e=>({path:"margin.right",value:e})),i.setNormalizer("margin-bottom",e=>({path:"margin.bottom",value:e})),i.setNormalizer("margin-left",e=>({path:"margin.left",value:e})),i.setReducer("margin",sg("margin")),i.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function XEe(i){i.setNormalizer("padding",IY("padding")),i.setNormalizer("padding-top",e=>({path:"padding.top",value:e})),i.setNormalizer("padding-right",e=>({path:"padding.right",value:e})),i.setNormalizer("padding-bottom",e=>({path:"padding.bottom",value:e})),i.setNormalizer("padding-left",e=>({path:"padding.left",value:e})),i.setReducer("padding",sg("padding")),i.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}class NY{crashes=[];state="initializing";_crashNumberLimit;_now=Date.now;_minimumNonErrorTimePeriod;_boundErrorHandler;_listeners;constructor(e){if(this.crashes=[],this._crashNumberLimit=typeof e.crashNumberLimit=="number"?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod=typeof e.minimumNonErrorTimePeriod=="number"?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=t=>{const n="error"in t?t.error:t.reason;n instanceof Error&&this._handleError(n,t)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter(n=>n!==t)}_fire(e,...t){const n=this._listeners[e]||[];for(const r of n)r.apply(this,[null,...t])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t instanceof ErrorEvent?t.filename:void 0,lineno:t instanceof ErrorEvent?t.lineno:void 0,colno:t instanceof ErrorEvent?t.colno:void 0,date:this._now()});const n=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:n}),n?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&e.context!==void 0&&e.context!==null&&this.state==="ready"&&this._isErrorComingFromThisItem(e)}
38_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;const e=this.crashes[this.crashes.length-1].date,t=this.crashes[this.crashes.length-1-this._crashNumberLimit].date;return(e-t)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function gS(i,e=new Set){const t=[i],n=new Set;let r=0;for(;t.length>r;){const s=t[r++];if(!(n.has(s)||!QEe(s)||e.has(s)))if(n.add(s),Symbol.iterator in s)try{for(const o of s)t.push(o)}catch{}else for(const o in s)o!=="defaultValue"&&t.push(s[o])}return n}function QEe(i){const e=Object.prototype.toString.call(i),t=typeof i;return!(t==="number"||t==="boolean"||t==="string"||t==="symbol"||t==="function"||e==="[object Date]"||e==="[object RegExp]"||e==="[object Module]"||i===void 0||i===null||i._watchdogExcluded||i instanceof EventTarget||i instanceof Event)}function BY(i,e,t=new Set){if(i===e&&ZEe(i))return!0;const n=gS(i,t),r=gS(e,t);for(const s of n)if(r.has(s))return!0;return!1}function ZEe(i){return typeof i=="object"&&i!==null}class MY extends NY{_editor=null;_lifecyclePromise=null;_throttledSave;_data;_lastDocumentVersion;_elementOrData;_initUsingData=!0;_editables={};_config;_excludedProps;constructor(e,t={}){super(t),this._throttledSave=Oh(this._save.bind(this),typeof t.saveInterval=="number"?t.saveInterval:5e3),e&&(this._creator=(n,r)=>e.create(n,r)),this._destructor=n=>n.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then(()=>(this.state="initializing",this._fire("stateChange"),this._destroy())).catch(e=>{console.error("An error happened during the editor destroying.",e)}).then(()=>{const e={},t=[],n=this._config.rootsAttributes||{},r={};for(const[o,a]of Object.entries(this._data.roots))a.isLoaded?(e[o]="",r[o]=n[o]||{}):t.push(o);const s={...this._config,extraPlugins:this._config.extraPlugins||[],lazyRoots:t,rootsAttributes:r,_watchdogInitialData:this._data};return delete s.initialData,s.extraPlugins.push(JEe),this._initUsingData?this.create(e,s,s.context):Uc(this._elementOrData)?this.create(this._elementOrData,s,s.context):this.create(this._editables,s,s.context)}).then(()=>{this._fire("restart")})}create(e=this._elementOrData,t=this._config,n){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then(()=>(super._startErrorHandling(),this._elementOrData=e,this._initUsingData=typeof e=="string"||Object.keys(e).length>0&&typeof Object.values(e)[0]=="string",this._config=this._cloneEditorConfiguration(t)||{},this._config.context=n,this._creator(e,this._config))).then(r=>{this._editor=r,r.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=r.model.document.version,this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this.state="ready",this._fire("stateChange")}).finally(()=>{this._lifecyclePromise=null}),this._lifecyclePromise}destroy(){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())).finally(()=>{this._lifecyclePromise=null}),this._lifecyclePromise}_destroy(){return Promise.resolve().then(()=>{this._stopErrorHandling(),this._throttledSave.cancel();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)})}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this._lastDocumentVersion=e}catch(t){console.error(t,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e=this._editor,t=e.model.document.roots.filter(a=>a.isAttached()&&a.rootName!="$graveyard"),{plugins:n}=e,r=n.has("CommentsRepository")&&n.get("CommentsRepository"),s=n.has("TrackChanges")&&n.get("TrackChanges"),o={roots:{},markers:{},commentThreads:JSON.stringify([]),suggestions:JSON.stringify([])};t.forEach(a=>{o.roots[a.rootName]={content:JSON.stringify(Array.from(a.getChildren())),attributes:JSON.stringify(Array.from(a.getAttributes())),isLoaded:a._isLoaded}});for(const a of e.model.markers)a._affectsData&&(o.markers[a.name]={rangeJSON:a.getRange().toJSON(),usingOperation:a._managedUsingOperations,affectsData:a._affectsData});return r&&(o.commentThreads=JSON.stringify(r.getCommentThreads({toJSON:!0,skipNotAttached:!0}
38))),s&&(o.suggestions=JSON.stringify(s.getSuggestions({toJSON:!0,skipNotAttached:!0}))),o}_getEditables(){const e={};for(const t of this.editor.model.document.getRootNames()){const n=this.editor.ui.getEditableElement(t);n&&(e[t]=n)}return e}_isErrorComingFromThisItem(e){return BY(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return g_(e,(t,n)=>{if(Uc(t)||n==="context")return t})}}class JEe{editor;_data;constructor(e){this.editor=e,this._data=e.config.get("_watchdogInitialData")}init(){this.editor.data.on("init",e=>{e.stop(),this.editor.model.enqueueChange({isUndoable:!1},t=>{this._restoreCollaborationData(),this._restoreEditorData(t)}),this.editor.data.fire("ready")},{priority:999})}_createNode(e,t){if("name"in t){const n=e.createElement(t.name,t.attributes);if(t.children)for(const r of t.children)n._appendChild(this._createNode(e,r));return n}else return e.createText(t.data,t.attributes)}_restoreEditorData(e){const t=this.editor;Object.entries(this._data.roots).forEach(([n,{content:r,attributes:s}])=>{const o=JSON.parse(r),a=JSON.parse(s),l=t.model.document.getRoot(n);for(const[c,d]of a)e.setAttribute(c,d,l);for(const c of o){const d=this._createNode(e,c);e.insert(d,l,"end")}}),Object.entries(this._data.markers).forEach(([n,r])=>{const{document:s}=t.model,{rangeJSON:{start:o,end:a},...l}=r,c=s.getRoot(o.root),d=e.createPositionFromPath(c,o.path,o.stickiness),f=e.createPositionFromPath(c,a.path,a.stickiness),m=e.createRange(d,f);e.addMarker(n,{range:m,...l})})}_restoreCollaborationData(){const e=JSON.parse(this._data.commentThreads),t=JSON.parse(this._data.suggestions);if(this.editor.plugins.has("CommentsRepository")){const n=this.editor.plugins.get("CommentsRepository");for(const r of n.getCommentThreads())n._removeCommentThread({threadId:r.id});e.forEach(r=>{const s=this.editor.config.get("collaboration.channelId");this.editor.plugins.get("CommentsRepository").addCommentThread({channelId:s,...r})})}if(this.editor.plugins.has("TrackChangesEditing")){const n=this.editor.plugins.get("TrackChangesEditing");for(const r of n.getSuggestions())n._removeSuggestion(r);t.forEach(r=>{n.addSuggestionData(r)})}}}const og=Symbol("MainQueueId");class eTe extends NY{_watchdogs=new Map;_watchdogConfig;_context=null;_contextProps=new Set;_actionQueues=new tTe;_contextConfig;_item;constructor(e,t={}){super(t),this._watchdogConfig=t,this._creator=n=>e.create(n),this._destructor=n=>n.destroy(),this._actionQueues.onEmpty(()=>{this.state==="initializing"&&(this.state="ready",this._fire("stateChange"))})}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(e={}){return this._actionQueues.enqueue(og,()=>(this._contextConfig=e,this._create()))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=jM(e);return Promise.all(t.map(n=>this._actionQueues.enqueue(n.id,()=>{if(this.state==="destroyed")throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let r;if(this._watchdogs.has(n.id))throw new Error(`Item with the given id is already added: '${n.id}'.`);if(n.type==="editor")return r=new MY(null,this._watchdogConfig),r.setCreator(n.creator),r._setExcludedProperties(this._contextProps),n.destructor&&r.setDestructor(n.destructor),this._watchdogs.set(n.id,r),r.on("error",(s,{error:o,causesRestart:a})=>{this._fire("itemError",{itemId:n.id,error:o}),a&&this._actionQueues.enqueue(n.id,()=>new Promise(l=>{const c=()=>{r.off("restart",c),this._fire("itemRestart",{itemId:n.id}),l()};r.on("restart",c)}))}),r.create(n.sourceElementOrData,n.config,this._context);throw new Error(`Not supported item type: '${n.type}'.`)})))}remove(e){const t=jM(e);return Promise.all(t.map(n=>this._actionQueues.enqueue(n,()=>{const r=this._getWatchdog(n);return this._watchdogs.delete(n),r.destroy()})))}destroy(){return this._actionQueues.enqueue(og,()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))}_restart(){return this._actionQueues.enqueue(og,()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch(e=>{console.error("An error happened during destroying the context or items.",e)}).then(()=>this._create()).then(()=>this._fire("restart"))))}_create(){return Promise.resolve().then(()=>(this._startErrorHandling(),this._creator(this._contextConfig))).then(e=>(this._context=e,this._contextProps=gS(this._context),Promise.all(Array.from(this._watchdogs.values()).map(t=>(t._setExcludedProperties(this._contextProps),t.create(void 0,void 0,this._context))))))}_destroy(){return Promise.resolve().then(()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map(t=>t.destroy())).then(()=>this._destructor(e))})}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return BY(this._context,e.context)}}class tTe{_onEmptyCallbacks=[];_queues=new Map;_activeActions=0;onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const n=e===og;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const s=(n?Promise.all(this._queues.values()):Promise.all([this._queues.get(og),this._queues.get(e)])).then(t),o=s.catch(()=>{});return this._queues.set(e,o),s.finally(()=>{this._activeActions--,this._queues.get(e)===o&&this._activeActions===0&&this._onEmptyCallbacks.forEach(a=>a())})}}function jM(i){return Array.isArray(i)?i:[i]}class be extends hn(){editor;_disableStack=new Set;constructor(e){super(),this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),this._disableStack.size==1&&(this.on("set:isEnabled",zM,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),this._disableStack.size==0&&(this.off("set:isEnabled",zM),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}static get isOfficialPlugin(){return!1}static get isPremiumPlugin(){return!1}}function zM(i){i.return=!1,i.stop()}class ut extends hn(){editor;_isEnabledBasedOnSelection;_affectsData;_disableStack;static get _throwErrorWhenUsedAsAPlugin(){return!0}constructor(e){super(),this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._isEnabledBasedOnSelection=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.listenTo(e,"change:isReadOnly",()=>{this.refresh()}),this.on("set:isEnabled",t=>{if(!this.affectsData)return;const n=e.model.document.selection,s=!(n.getFirstPosition().root.rootName=="$graveyard")&&e.model.canEditAt(n);(e.isReadOnly||this._isEnabledBasedOnSelection&&!s)&&(t.return=!1,t.stop())},{priority:"highest"}),this.on("execute",t=>{this.isEnabled||t.stop()},{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),this._disableStack.size==1&&(this.on("set:isEnabled",WM,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),this._disableStack.size==0&&(this.off("set:isEnabled",WM),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function WM(i){i.return=!1,i.stop()}class HM extends ut{_childCommandsDefinitions=[];refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return!!t&&t.execute(e)}registerChildCommand(e,t={}){pG(this._childCommandsDefinitions,{command:e,priority:t.priority||"normal"}),e.on("change:isEnabled",()=>this._checkEnabled()),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find(({command:t})=>t.isEnabled);return e&&e.command}}class nTe{_commands;constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const n=this.get(e);if(!n)throw new oe("commandcollection-command-not-found",this,{commandName:e});return n.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class LY extends Sn(){_context;_plugins=new Map;_availablePlugins;_contextPlugins;constructor(e,t=[],n=[]){super(),this._context=e,this._availablePlugins=new Map;for(const r of t)r.pluginName&&this._availablePlugins.set(r.pluginName,r);this._contextPlugins=new Map;for(const[r,s]of n)this._contextPlugins.set(r,s),this._contextPlugins.set(s,r),r.pluginName&&this._availablePlugins.set(r.pluginName,r)}*[Symbol.iterator](){for(const e of this._plugins)typeof e[0]=="function"&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let n=e;throw typeof e=="function"&&(n=e.pluginName||e.name),new oe("plugincollection-
38plugin-not-loaded",this._context,{plugin:n})}return t}has(e){return this._plugins.has(e)}async init(e,t=[],n=[]){const r=this,s=this._context;p(e),y(e);const o=e.filter(A=>!f(A,t)),a=[...g(o)];S(a,n);const l=E(a);return await T(l,"init"),await T(l,"afterInit"),l;function c(A){return typeof A=="function"}function d(A){return c(A)&&!!A.isContextPlugin}function f(A,I){return I.some(R=>R===A||m(A)===R||m(R)===A)}function m(A){return c(A)?A.pluginName||A.name:A}function p(A,I=new Set){A.forEach(R=>{c(R)&&(I.has(R)||(I.add(R),R.pluginName&&!r._availablePlugins.has(R.pluginName)&&r._availablePlugins.set(R.pluginName,R),R.requires&&p(R.requires,I)))})}function g(A,I=new Set){return A.map(R=>c(R)?R:r._availablePlugins.get(R)).reduce((R,O)=>I.has(O)?R:(I.add(O),O.requires&&(y(O.requires,O),g(O.requires,I).forEach(j=>R.add(j))),R.add(O)),new Set)}function y(A,I=null){A.map(R=>c(R)?R:r._availablePlugins.get(R)||R).forEach(R=>{v(R),x(R,I),C(R,I),D(R,I)})}function v(A){if(typeof A=="function"&&A._throwErrorWhenUsedAsAPlugin)throw new oe("plugincollection-plugin-invalid-constructor",s,{name:A.name})}function x(A,I){if(!c(A))throw I?new oe("plugincollection-soft-required",s,{missingPlugin:A,requiredBy:m(I)}):new oe("plugincollection-plugin-not-found",s,{plugin:A})}function C(A,I){if(d(I)&&!d(A))throw new oe("plugincollection-context-required",s,{plugin:m(A),requiredBy:m(I)})}function D(A,I){if(I&&f(A,t))throw new oe("plugincollection-required",s,{plugin:m(A),requiredBy:m(I)})}function E(A){return A.map(I=>{let R=r._contextPlugins.get(I);return R=R||new I(s),r._add(I,R),R})}function T(A,I){return A.reduce((R,O)=>!O[I]||r._contextPlugins.has(O)?R:R.then(O[I].bind(O)),Promise.resolve())}function S(A,I){for(const R of I){if(typeof R!="function")throw new oe("plugincollection-replace-plugin-invalid-type",null,{pluginItem:R});const O=R.pluginName;if(!O)throw new oe("plugincollection-replace-plugin-missing-name",null,{pluginItem:R});if(R.requires&&R.requires.length)throw new oe("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:O});const j=r._availablePlugins.get(O);if(!j)throw new oe("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:O});const B=A.indexOf(j);if(B===-1){if(r._contextPlugins.has(j))return;throw new oe("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:O})}if(j.requires&&j.requires.length)throw new oe("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:O});A.splice(B,1,R),r._availablePlugins.set(O,R)}}}destroy(){const e=[];for(const[,t]of this)typeof t.destroy=="function"&&!this._contextPlugins.has(t)&&e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const n=e.pluginName;if(n){if(this._plugins.has(n))throw new oe("plugincollection-plugin-name-conflict",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:e});this._plugins.set(n,t)}}}class qM{config;plugins;locale;t;editors;static defaultConfig;static builtinPlugins;_contextOwner=null;constructor(e){const{translations:t,...n}=e||{};this.config=new _G(n,this.constructor.defaultConfig);const r=this.constructor.builtinPlugins;this.config.define("plugins",r),this.plugins=new LY(this,r);const s=this.config.get("language")||{};this.locale=new A_e({uiLanguage:typeof s=="string"?s:s.ui,contentLanguage:this.config.get("language.content"),translations:t}),this.t=this.locale.t,this.editors=new Jn}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const n of e.concat(t)){if(typeof n!="function")throw new oe("context-initplugins-constructor-only",null,{Plugin:n});if(n.isContextPlugin!==!0)throw new oe("context-initplugins-invalid-plugin",null,{Plugin:n})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,e=>e.destroy())).then(()=>this.plugins.destroy())}_addEditor(e,t){if(this._contextOwner)throw new oe("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise(t=>{const n=new this(e);t(n.initPlugins().then(()=>n))})}static get _throwErrorWhenUsedAsAPlugin(){return!0}}class UY extends hn(){context;constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}static get isOfficialPlugin(){return!1}static get isPremiumPlugin(){return!1}}class iTe extends qn{editor;constructor(e){super(),this.editor=e}set(e,t,n={}){if(typeof t=="string"){const r=t;t=(s,o)=>{this.editor.execute(r),o()}}super.set(e,t,n)}}const BE="contentEditing",$M="common";class rTe{keystrokeInfos=new Map;_editor;constructor(e){this._editor=e;const t=e.config.get("menuBar.isVisible"),n=e.locale.t;this.addKeystrokeInfoCategory({id:BE,label:n("Content editing keystrokes"),description:n("These keyboard shortcuts allow for quick access to content editing features.")});const r=[{label:n("Close contextual balloons, dropdowns, and dialogs"),keystroke:"Esc"},{label:n("Open the accessibility help dialog"),keystroke:"Alt+0"},{label:n("Move focus between form fields (inputs, buttons, etc.)"),keystroke:[["Tab"],["Shift+Tab"]]},{label:n("Move focus to the toolbar, navigate between toolbars"),keystroke:"Alt+F10",mayRequireFn:!0},{label:n("Navigate through the toolbar or menu bar"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]},{label:n("Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content."),keystroke:[["Enter"],["Space"]]}];t&&r.push({label:n("Move focus to the menu bar, navigate between menu bars"),keystroke:"Alt+F9",mayRequireFn:!0}),this.addKeystrokeInfoCategory({id:"navigation",label:n("User interface and content navigation keystrokes"),description:n("Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface."),groups:[{id:"common",keystrokes:r}]})}addKeystrokeInfoCategory({id:e,label:t,description:n,groups:r}){this.keystrokeInfos.set(e,{id:e,label:t,description:n,groups:new Map}),this.addKeystrokeInfoGroup({categoryId:e,id:$M}),r&&r.forEach(s=>{this.addKeystrokeInfoGroup({categoryId:e,...s})})}addKeystrokeInfoGroup({categoryId:e=BE,id:t,label:n,keystrokes:r}){const s=this.keystrokeInfos.get(e);if(!s)throw new oe("accessibility-unknown-keystroke-info-category",this._editor,{groupId:t,categoryId:e});s.groups.set(t,{id:t,label:n,keystrokes:r||[]})}addKeystrokeInfos({categoryId:e=BE,groupId:t=$M,keystrokes:n}){if(!this.keystrokeInfos.has(e))throw new oe("accessibility-unknown-keystroke-info-category",this._editor,{categoryId:e,keystrokes:n});const r=this.keystrokeInfos.get(e);if(!r.groups.has(t))throw new oe("accessibility-unknown-keystroke-info-group",this._editor,{groupId:t,categoryId:e,keystrokes:n});r.groups.get(t).keystrokes.push(...n)}}function sTe(i){return{sessionId:uTe(),pageSessionId:dTe(),hostname:window.location.hostname,version:globalThis.CKEDITOR_VERSION,type:oTe(i),plugins:aTe(i.plugins),distribution:lTe(),env:cTe(),integration:Object.create(null),menuBar:{isVisible:!!i.config.get("menuBar.isVisible")},language:{ui:i.locale.uiLanguage,content:i.locale.contentLanguage},toolbar:{main:ME(i.config.get("toolbar")),block:ME(i.config.get("blockToolbar")),balloon:ME(i.config.get("balloonToolbar"))}}}function oTe(i){return Object.getPrototypeOf(i).constructor.editorName}function aTe(i){return Array.from(i).filter(([e])=>!!e.pluginName).map(([e])=>{const{pluginName:t,isContextPlugin:n,isOfficialPlugin:r,isPremiumPlugin:s}=e;return{isContext:!!n,isOfficial:!!r,isPremium:!!s,name:t}})}function ME(i){if(!i)return;const e=Array.isArray(i)?{items:i}:i,t=s(e.items||[]);return{isMultiline:t.includes("-"),shouldNotGroupWhenFull:!!e.shouldNotGroupWhenFull,items:r(t)};function r(o){return o.filter(a=>a!=="|"&&a!=="-")}function s(o){return o.flatMap(a=>
38typeof a=="string"?[a]:s(a.items))}}function lTe(){return{channel:window[Symbol.for("cke distribution")]||"sh"}}function cTe(){let i="unknown",e="unknown";return ot.isMac?i="mac":ot.isWindows?i="windows":ot.isiOS?i="ios":ot.isAndroid&&(i="android"),ot.isGecko?e="gecko":ot.isBlink?e="blink":ot.isSafari&&(e="safari"),{os:i,browser:e}}function uTe(){return localStorage.getItem("__ckeditor-session-id")||localStorage.setItem("__ckeditor-session-id",rr()),localStorage.getItem("__ckeditor-session-id")}function dTe(){return $e.window.CKEDITOR_PAGE_SESSION_ID=$e.window.CKEDITOR_PAGE_SESSION_ID||rr(),$e.window.CKEDITOR_PAGE_SESSION_ID}class fTe extends hn(){static get editorName(){return"Editor"}accessibility;commands;config;conversion;data;editing;locale;model;plugins;keystrokes;t;static defaultConfig;static builtinPlugins;_context;_readOnlyLocks;static get _throwErrorWhenUsedAsAPlugin(){return!0}constructor(e={}){if(super(),typeof e!="object"||Array.isArray(e))throw new oe("editor-config-invalid-type");if("sanitizeHtml"in e)throw new oe("editor-config-sanitizehtml-not-supported");const t=this.constructor,{translations:n,...r}=t.defaultConfig||{},{translations:s=n,...o}=e,a=e.language||r.language;this._context=e.context||new qM({language:a,translations:s}),this._context._addEditor(this,!e.context);const l=Array.from(t.builtinPlugins||[]);this.config=new _G(o,r),this.config.define("plugins",l),this.config.define(this._context._getEditorConfig()),d(this.config),this.plugins=new LY(this,l,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new nTe,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.model=new xEe(this.config),this.on("change:isReadOnly",()=>{this.model.document.isReadOnly=this.isReadOnly});const c=new e2e;this.data=new EDe(this.model,c),this.editing=new nDe(this.model,c),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new ADe([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new iTe(this),this.keystrokes.listenTo(this.editing.view.document),this.accessibility=new rTe(this),f(this);function d(m){let p=m.get("licenseKey");if(!p&&window.CKEDITOR_GLOBAL_LICENSE_KEY&&(p=window.CKEDITOR_GLOBAL_LICENSE_KEY,m.set("licenseKey",p)),!p)throw new oe("license-key-missing")}function f(m){const p=m.config.get("licenseKey"),g=window[Symbol.for("cke distribution")]||"sh";function y(A,I){m.enableReadOnlyMode(Symbol("invalidLicense")),m._showLicenseError(A,I)}function v(A){return["exp","jti","vc"].every(R=>R in A)}function x(A){return Object.getOwnPropertyNames(A).sort().filter(O=>O!="vc"&&A[O]!=null).map(O=>A[O])}function C(A){const{hostname:I}=new URL(window.location.href);if(A.includes(I))return!0;const R=I.split(".");return A.filter(O=>O.includes("*")).map(O=>O.split(".")).filter(O=>O.length<=R.length).map(O=>Array(R.length-O.length).fill(O[0]==="*"?"*":"").concat(O)).some(O=>R.every((j,B)=>O[B]===j||O[B]==="*"))}function D(A){const I=A[0].toUpperCase()+A.slice(1),R=A==="evaluation"?"an":"a";console.info(`%cCKEditor 5 ${I} License`,"color: #ffffff; background: #743CCD; font-size: 14px; padding: 4px 8px; border-radius: 4px;"),console.warn(`⚠️ You are using ${R} ${A} license of CKEditor 5${A==="trial"?" which is for evaluation purposes only":""}. For production usage, please obtain a production license at https://portal.ckeditor.com/`)}if(p=="GPL"){g=="cloud"&&y("distributionChannel");return}const E=tM(p);if(!E){y("invalid");return}if(!v(E)){y("invalid");return}if(E.distributionChannel&&!mn(E.distributionChannel).includes(g)){y("distributionChannel");return}if(R_e(x(E))!=E.vc.toLowerCase()){y("invalid");return}if(new Date(E.exp*1e3)<Vxe){y("expired");return}const S=E.licensedHosts;if(S&&S.length>0&&!C(S)){y("domainLimit");return}if(["evaluation","trial"].includes(E.licenseType)&&E.exp*1e3<Date.now()){y("expired");return}if(["development","evaluation","trial"].includes(E.licenseType)){const{licenseType:A}=E;window.CKEDITOR_WARNING_SUPPRESSIONS=window.CKEDITOR_WARNING_SUPPRESSIONS||{},window.CKEDITOR_WARNING_SUPPRESSIONS[A]||(D(A),window.CKEDITOR_WARNING_SUPPRESSIONS[A]=!0)}if(["evaluation","trial"].includes(E.licenseType)){const A=E.licenseType,I=setTimeout(()=>{y(`${A}Limit`)},6e5);m.on("destroy",()=>{clearTimeout(I)})}E.usageEndpoint&&m.once("ready",()=>{const A={requestId:rr(),requestTime:Math.round(Date.now()/1e3),license:p,editor:hTe(m)};m._sendUsageRequest(E.usageEndpoint,A).then(I=>{const{status:R,message:O}=I;O&&console.warn(O),R!="ok"&&y("usageLimit")},()=>{Mxe("license-key-validation-endpoint-not-reachable",{url:E.usageEndpoint})})},{priority:"high"})}}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new oe("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if(typeof e!="string"&&typeof e!="symbol")throw new oe("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),this._readOnlyLocks.size===1&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if(typeof e!="string"&&typeof e!="symbol")throw new oe("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),this._readOnlyLocks.size===0&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}setData(e){this.data.set(e)}getData(e){return this.data.get(e)}initPlugins(){const e=this.config,t=e.get("plugins"),n=e.get("removePlugins")||[],r=e.get("extraPlugins")||[],s=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(r),n,s).then(a=>(o(this),a));function o(a){const l=a.config.get("licenseKey");if(l==="GPL")return;const c=tM(l);if(!c)return;const d=[...a.plugins].map(([f])=>f).find(f=>!f.pluginName||!f.licenseFeatureCode?!1:W_e(c,f.licenseFeatureCode));d&&(a.enableReadOnlyMode(Symbol("invalidLicense")),a._showLicenseError("pluginNotAllowed",d.pluginName))}}destroy(){let e=Promise.resolve();return this.state=="initializing"&&(e=new Promise(t=>this.once("ready",t))),e.then(()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()}).then(()=>this._context._removeEditor(this))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(n){oe.rethrowUnexpectedError(n,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}static Context=qM;static EditorWatchdog=MY;static ContextWatchdog=eTe;_showLicenseError(e,t){setTimeout(()=>{if(e=="invalid")throw new oe("invalid-license-key");if(e=="expired")throw new oe("license-key-expired");
38if(e=="domainLimit")throw new oe("license-key-domain-limit");if(e=="pluginNotAllowed"){const n=t.replace(/(Editing|UI)$/,""),r=this.plugins.has(n);throw new oe("license-key-plugin-not-allowed",null,{pluginName:r?n:t})}if(e=="featureNotAllowed")throw new oe("license-key-feature-not-allowed",null,{featureName:t});if(e=="evaluationLimit")throw new oe("license-key-evaluation-limit");if(e=="trialLimit")throw new oe("license-key-trial-limit");if(e=="developmentLimit")throw new oe("license-key-development-limit");if(e=="usageLimit")throw new oe("license-key-usage-limit");if(e=="distributionChannel")throw new oe("license-key-invalid-distribution-channel")},0),this._showLicenseError=()=>{}}async _sendUsageRequest(e,t){const n=new Headers({"Content-Type":"application/json"}),r=await fetch(new URL(e),{method:"POST",headers:n,body:JSON.stringify(t)});if(!r.ok)throw new Error(`HTTP Response: ${r.status}`);return r.json()}}function hTe(i){const e=sTe(i);function t(n,r){if(Lc(e,n)!==void 0)throw new oe("editor-usage-data-path-already-set",{path:n});lG(e,n,r)}return i.fire("collectUsageData",{setUsageData:t}),e}function mTe(i){if(!Ww(i.updateSourceElement))throw new oe("attachtoform-missing-elementapi-interface",i);const e=i.sourceElement;if(pTe(e)&&e.form){let t;const n=e.form,r=()=>i.updateSourceElement();Ww(n.submit)&&(t=n.submit,n.submit=()=>{r(),t.apply(n)}),n.addEventListener("submit",r),i.on("destroy",()=>{n.removeEventListener("submit",r),t&&(n.submit=t)})}}function pTe(i){return!!i&&i.tagName.toLowerCase()==="textarea"}function gTe(i){class e extends i{sourceElement;updateSourceElement(n){if(!this.sourceElement)throw new oe("editor-missing-sourceelement",this);const r=this.config.get("updateSourceElementOnDestroy"),s=this.sourceElement instanceof HTMLTextAreaElement;if(!r&&!s){qB(this.sourceElement,"");return}const o=typeof n=="string"?n:this.data.get();qB(this.sourceElement,o)}}return e}class Qw extends UY{_actions;static get pluginName(){return"PendingActions"}static get isOfficialPlugin(){return!0}init(){this.set("hasAny",!1),this._actions=new Jn({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if(typeof e!="string")throw new oe("pendingactions-add-invalid-message",this);const t=new(hn());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}let bTe=class extends hn(){total;_reader;_data;constructor(){super();const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=t=>{this.loaded=t.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise((n,r)=>{t.onload=()=>{const s=t.result;this._data=s,n(s)},t.onerror=()=>{r("error")},t.onabort=()=>{r("aborted")},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}};class rh extends be{loaders=new Jn;_loadersMap=new Map;_pendingAction=null;static get pluginName(){return"FileRepository"}static get isOfficialPlugin(){return!0}static get requires(){return[Qw]}init(){this.loaders.on("change",()=>this._updatePendingAction()),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0)}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return Kt("filerepository-no-upload-adapter"),null;const t=new GM(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then(n=>{this._loadersMap.set(n,t)}).catch(()=>{}),t.on("change:uploaded",()=>{let n=0;for(const r of this.loaders)n+=r.uploaded;this.uploaded=n}),t.on("change:uploadTotal",()=>{let n=0;for(const r of this.loaders)r.uploadTotal&&(n+=r.uploadTotal);this.uploadTotal=n}),t}destroyLoader(e){const t=e instanceof GM?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach((n,r)=>{n===t&&this._loadersMap.delete(r)})}_updatePendingAction(){const e=this.editor.plugins.get(Qw);
38if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,n=r=>`${t("Upload in progress")} ${parseInt(r)}%.`;this._pendingAction=e.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else e.remove(this._pendingAction),this._pendingAction=null}}class GM extends hn(){id;_filePromiseWrapper;_adapter;_reader;constructor(e,t){super(),this.id=rr(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new bTe,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(n,r)=>r?n/r*100:0),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then(e=>this._filePromiseWrapper?e:null):Promise.resolve(null)}get data(){return this._reader.data}read(){if(this.status!="idle")throw new oe("filerepository-read-wrong-status",this);return this.status="reading",this.file.then(e=>this._reader.read(e)).then(e=>{if(this.status!=="reading")throw this.status;return this.status="idle",e}).catch(e=>{throw e==="aborted"?(this.status="aborted","aborted"):(this.status="error",this._reader.error?this._reader.error:e)})}upload(){if(this.status!="idle")throw new oe("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then(()=>this._adapter.upload()).then(e=>(this.uploadResponse=e,this.status="idle",e)).catch(e=>{throw this.status==="aborted"?"aborted":(this.status="error",e)})}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?e=="reading"?this._reader.abort():e=="uploading"&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch(()=>{}),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise((n,r)=>{t.rejecter=r,t.isFulfilled=!1,e.then(s=>{t.isFulfilled=!0,n(s)}).catch(s=>{t.isFulfilled=!0,r(s)})}),t}}var YM='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10 6.628a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M8.5 9.125a.3.3 0 0 0-.253-.296L5.11 8.327a.75.75 0 1 1 .388-1.449l4.04.716c.267.072.624.08.893.009l4.066-.724a.75.75 0 1 1 .388 1.45l-3.132.5a.3.3 0 0 0-.253.296v1.357a.3.3 0 0 0 .018.102l1.615 4.438a.75.75 0 0 1-1.41.513l-1.35-3.71a.3.3 0 0 0-.281-.197h-.209a.3.3 0 0 0-.282.198l-1.35 3.711a.75.75 0 0 1-1.41-.513l1.64-4.509a.3.3 0 0 0 .019-.103z"/><path d="M10 18.5a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17m0 1.5c5.523 0 10-4.477 10-10S15.523 0 10 0 0 4.477 0 10s4.477 10 10 10" clip-rule="evenodd"/></svg>',yTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.75.75 0 0 1-.511.187.75.75 0 0 1-.511-.187M4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5z"/></svg>',VY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75m0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75"/></svg>',jY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75"/></svg>',i4='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75"/></svg>',vTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.75 11.875a.75.75 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.75.75 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.75.75 0 0 1-.508.184.75.75 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75"/></svg>',zY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75m0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75m0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75m0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75"/></svg>',wTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.75.75 0 0 1 .511-.187.75.75 0 0 1 .511.187M15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5z"/></svg>',WY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10.187 17H5.773q-.956 0-1.364-.415-.41-.416-.409-1.323V4.738q0-.926.419-1.332.418-.405 1.354-.406h4.68q1.035 0 1.793.124.76.124 1.36.478.512.296.906.75a3.26 3.26 0 0 1 .808 2.162q0 2.102-2.167 3.075 2.846.879 2.847 3.421a3.76 3.76 0 0 1-2.296 3.504 6 6 0 0 1-1.517.377q-.857.11-2 .11zm-.217-6.217H7v4.087h3.069q2.965 0 2.965-2.072 0-1.061-.768-1.537-.768-.478-2.296-.478M7 5.13v3.619h2.606q1.093 0 1.69-.2a1.
386 1.6 0 0 0 .91-.765q.247-.4.247-.897 0-1.06-.778-1.409-.778-.348-2.375-.348z"/></svg>',xTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75m-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75m6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75m-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75"/></svg>',D_='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414z"/></svg>',HY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2"/><path fill-opacity=".6" d="M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492z"/></svg>',E_='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M6.972 16.615a1 1 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a1 1 0 0 1-.745.292"/></svg>',KM='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M12.87 12.61a.75.75 0 0 1-.089.976l-.085.07-3.154 2.254 3.412 2.414a.75.75 0 0 1 .237.95l-.057.095a.75.75 0 0 1-.95.237l-.096-.058-4.272-3.022-.003-1.223 4.01-2.867a.75.75 0 0 1 1.047.174m2.795-.231.095.057 4.011 2.867-.003 1.223-4.272 3.022-.095.058a.75.75 0 0 1-.88-.151l-.07-.086-.058-.095a.75.75 0 0 1 .15-.88l.087-.07 3.412-2.414-3.154-2.253-.085-.071a.75.75 0 0 1 .862-1.207M16 0a2 2 0 0 1 2 2v9.354l-.663-.492-.837-.001V2a.5.5 0 0 0-.5-.5H2a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3.118L7.156 19H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zM5.009 15l.003 1H3v-1zm2.188-2-1.471 1H5v-1zM10 11v.095L8.668 12H7v-1zm4-2v1H7V9zm0-2v1H7V7zm-4-2v1H5V5zM6 3v1H3V3z"/></svg>',_Te='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m12.5 5.7 5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1m-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1"/></svg>',CTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10.209 18.717A8.5 8.5 0 1 1 18.686 9.6h-.008l.002.12a3 3 0 0 1-2.866 2.997h-.268l-.046-.002v.002h-4.791a2 2 0 1 0 0 4 1 1 0 1 1-.128 1.992 9 9 0 0 1-.372.008m-3.918-7.01a1.25 1.25 0 1 0-2.415-.648 1.25 1.25 0 0 0 2.415.647ZM5.723 8.18a1.25 1.25 0 1 0 .647-2.414 1.25 1.25 0 0 0-.647 2.414M9.76 6.155a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415m4.028 1.759a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415"/></svg>',DTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0" class="ck-icon__fill"/><path d="M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z"/></svg>',ETe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7zM0 7h1v2H0zm15 0h1v2h-1zm-8 8h2v1H7z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>',TTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M5 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m-7 6.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/></svg>',T_='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136z"/></svg>',bS='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053z"/><path d="M4 18h5.523v-1H4zm-2 0h1v-1H2z"/></svg>',XM='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m12.87 13.786 1.532-1.286 3.857 4.596a1 1 0 1 1-1.532 1.286z"/><path d="M16.004 8.5a6.5 6.5 0 0 1-9.216 5.905c-1.154-.53-.863-1.415-.663-1.615.194-.194.564-.592 1.635-.141a4.5 4.5 0 0 0 5.89-5.904l-.104-.227 1.332-1.331c.045-.046.196-.041.224.007a6.47 6.47 0 0 1 .902 3.306m-3.4-5.715c.562.305.742 1.106.354 1.494s-.995.414-1.476.178a4.5 4.5 0 0 0-6.086 5.882l.114.236-1.348 1.349c-.038.037-.17.022-.198-.023a6.5 6.5 0 0 1 5.54-9.9 6.5 6.5 0 0 1 3.1.784"/><path d="M4.001 11.93.948 8.877a.2.2 0 0 1 .141-.341h6.106a.2.2 0 0 1 .141.341L4.283 11.93a.2.2 0 0 1-.282 0m11.083-6.789 3.053 3.053a.2.2 0 0 1-.14.342H11.89a.2.2 0 0 1-.14-.342l3.052-3.053a.2.2 0 0 1 .282 0"/></svg>',ATe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M4 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m8.38 9.262H7.62L10 5.506zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453z"/></svg>',kTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M12.4 10.3 10 4.5l-2.4 5.8zm.5 1.2H7.1L5.7 15H4.2l5-12h1.6l5 12h-1.5L13 11.5zm3.1 7H4a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2"/></svg>',QM='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M11.03 3h6.149a.75.75 0 1 1 0 1.5h-5.514zm1.27 3h4.879a.75.75 0 1 1 0 1.5h-4.244zm1.27 3h3.609a.75.75 0 1 1 0 1.5h-2.973zm-2.754 2.5L8.038 4.785 5.261 11.5zm.62 1.5H4.641l-1.666 4.028H1.312l5.789-14h1.875l5.789 14h-1.663z"/></svg>',ZM='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.816 11.5 7.038 4.785 4.261 11.5zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663zm7.55 2.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825q0-.063.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782q.003.065.003.135z"/></svg>',STe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 9h16v2H2z"/></svg>',PTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M6.66 9.118a.693.693 0 0 1 .956.032l3.65 3.411 2.422-2.238a.695.695 0 0 1 .945 0L17.5 13.6V2.5h-15v11.1zM17.8 1c.652 0 1.2.47 1.2 1.1v14.362c0 .64-.532 1.038-1.184 1.038H2.184C1.532 17.5 1 17.103 1 16.462V2.1C1 1.47 1.537 1 2.2 1zm-5.655 6a2.13 2.13 0 0 1 .157-2.364A2.133 2.133 0 1 1 12.145 7"/></svg>',ITe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h9.494a3 3 0 0 1-.414-.287 3 3 0 0 1-1.055-2.03 3 3 0 0 1 .693-2.185l.383-.455-.02.018-3.65-3.41a.695.695 0 0 0-.957-.034L1.5 13.6V2.5h15v5.535a2.97 2.97 0 0 1 1.412.932l.088.105V2.1c0-.63-.547-1.1-1.2-1.1zm11.713 2.803a2.146 2.146 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.644-3.11 2.13 2.13 0 0 0-1.875-.978"/>
38<path d="M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.8.8 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79"/><path d="M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.8.8 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79"/></svg>',RTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M19 4.5 14 0H3v12.673l.868-1.041c.185-.222.4-.402.632-.54V1.5h8v5h5v7.626a2.24 2.24 0 0 1 1.5.822zM14 5V2l3.3 3zm-3.692 12.5q.093.157.213.303L11.52 19H8v-.876a2.24 2.24 0 0 0 1.82-.624zm7.518-.657a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0zm-15.056-.38a.75.75 0 0 1-.096-1.056l2.346-2.815a.95.95 0 0 1 1.46 0l2.346 2.815a.75.75 0 1 1-1.152.96L6.5 14.96V20H5v-5.04l-1.174 1.408a.75.75 0 0 1-1.056.096Z"/></svg>',JM='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75M2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5M1.632 6.95 5.02 9.358a.4.4 0 0 1-.013.661l-3.39 2.207A.4.4 0 0 1 1 11.892V7.275a.4.4 0 0 1 .632-.326z"/></svg>',FTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m9.586 14.633.021.004q-.054.502.393.962.123.125.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15q.711-.106 1.005-.334.235-.182.404-.597l2.416-9.55a1.05 1.05 0 0 0-.281-.823 1.1 1.1 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195q-.564.084-.823.296-.323.263-.623.79z"/></svg>',OTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.8.8 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.7.7 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294zm5.494-5.335a.8.8 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.8.8 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955m-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184"/></svg>',NTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10.798 1.59 3.002 12.875l1.895 1.852 2.521 1.402 6.997-12.194z" class="ck-icon__fill"/><path d="m2.556 16.727.234-.348q-.445-.226-.498-.426-.054-.206.115-.837.14-.375.169-.595a4.5 4.5 0 0 0 0-.725q-.313-.931-.284-1.26.03-.327.475-.862l6.77-9.414q.808-1.365 3.199.18 2.39 1.549 1.784 2.686l-5.877 10.36q-.237.618-.526.782-.29.163-1.232.21-.543.196-.738.318t-.526.47q-.44.397-.632.397-.143 0-.524-.226l-.31.41zm-.279.415 1.575 1.103-.392.515H1.19zm8.1-13.656-4.953 6.9L8.75 12.57l4.247-7.574q.263-.375-1.092-1.192-1.354-.819-1.528-.32zM8.244 18.5 9.59 17h9.406v1.5z"/></svg>',BTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 42"><path d="M47.426 17V3.713L63.102 0v19.389h-.001l.001.272c0 1.595-2.032 3.43-4.538 4.098s-4.538-.083-4.538-1.678 2.032-3.43 4.538-4.098c.914-.244 2.032-.565 2.888-.603V4.516L49.076 7.447v9.556L49 17zM29.5 17h-8.343a7.073 7.073 0 1 0-4.657 4.06v3.781H3.3a2.803 2.803 0 0 1-2.8-2.804V8.63a2.803 2.803 0 0 1 2.8-2.805h4.082L8.58 2.768A1.99 1.99 0 0 1 10.435 1.5h8.985c.773 0 1.477.448 1.805 1.149l1.488 3.177H26.7c1.546 0 2.8 1.256 2.8 2.805zm-11.637 0H17.5a1 1 0 0 0-1 1v.05A4.244 4.244 0 1 1 17.863 17m29.684 2c.97 0 .953-.048.953.889v20.743c0 .953.016.905-.953.905H19.453c-.97 0-.953.048-.953-.905V19.89c0-.937-.016-.889.97-.889h28.077zm-4.701 19.338V22.183H24.154v16.155zM20.6 21.375v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616V37.53zm24.233-16.155v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615V37.53zM29.485 25.283a.4.4 0 0 1 .593-.35l9.05 4.977a.4.4 0 0 1 0 .701l-9.05 4.978a.4.4 0 0 1-.593-.35z"/></svg>',MTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 20"><path d="M1.587 1.5c-.612 0-.601-.029-.601.551v14.84c0 .59-.01.559.591.559h18.846c.602 0 .591.03.591-.56V2.052c0-.58.01-.55-.591-.55H1.587Zm.701.971h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-14.24 1h13.008v12H4.467zm-2.208 1h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003l-.029 1h-.974zm16.448 0h1.003v1h-1.003zm-16.448 2h.974v1h-.974zm16.448 0h1.003v1h-1.003z"/><path d="M8.374 6.648a.4.4 0 0 1 .395-.4.4.4 0 0 1 .2.049l5.148 2.824a.4.4 0 0 1 0 .7l-5.148 2.824a.403.403 0 0 1-.595-.35z"/></svg>',qY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382z"/></svg>',LTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75M3.5 3v5H2V3.7H1v-1h2.5zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001q-.073.607-.333.988-.263.381-1.244 
381.312H4.3v1h-4zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75"/></svg>',Zw='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3h16v1.5H2zm0 12h16v1.5H2z" opacity=".5"/><path d="M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H6.5V12h6.997z"/></svg>',UTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3h16v1.5H2zm0 12h16v1.5H2z" opacity=".5"/><path d="M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1m-1.505.5H3.504V12h12.991z"/></svg>',r4='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z" opacity=".5"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H3.5V12h6.997z"/></svg>',Jw='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z" opacity=".5"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H9.5V12h6.997z"/></svg>',$Y='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z" opacity=".5"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H3.5V12h6.997z"/></svg>',GY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3h16v1.5H2zm0 12h16v1.5H2z" opacity=".5"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H3.5V12h6.997z"/></svg>',YY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3h16v1.5H2zm0 12h16v1.5H2z" opacity=".5"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H9.5V12h6.997z"/></svg>',VTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.95 1.43a.95.95 0 0 0-.95.95v3.1a.95.95 0 0 0 .95.95h.75v6.3H.95a.95.95 0 0 0-.95.95v3.1a.95.95 0 0 0 .95.95h3.1a.95.95 0 0 0 .95-.95v-.65h1.932l1.539-1.5H5v-.95a.95.95 0 0 0-.95-.95H3.2v-6.3h.85A.95.95 0 0 0 5 5.48v-.55h10v.55a.95.95 0 0 0 .95.95h3.1a.95.95 0 0 0 .95-.95v-3.1a.95.95 0 0 0-.95-.95h-3.1a.95.95 0 0 0-.95.95v1.05H5V2.38a.95.95 0 0 0-.95-.95zm.55 3.5v-2h2v2zm0 9.3v2h2v-2zm15-11.3v2h2v-2zM8.139 20.004v-2.388l7.045-7.048 2.391 2.391-7.046 7.046zm11.421-9.101a.6.6 0 0 1-.138.206l-1.165 1.168-2.391-2.391 1.167-1.163a.6.6 0 0 1 .206-.138.6.6 0 0 1 .243-.049.63.63 0 0 1 .449.187l1.491 1.488c.059.059.108.129.138.206s.049.16.049.243a.6.6 0 0 1-.049.243"/></svg>',jTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zM1 15.5v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm0-2v1h-1v-1zm-19 0v1H0v-1zM14.5 2v1h-1V2zm2 0v1h-1V2zm2 0v1h-1V2zm-8 0v1h-1V2zm-2 0v1h-1V2zm-2 0v1h-1V2zm-2 0v1h-1V2zm8 0v1h-1V2zm-10 0v1h-1V2z"/><path d="M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2m0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.49.49 0 0 1-.476-.5V4c0-.276.213-.5.476-.5z"/></svg>',zTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 16.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zM1 15v1H0v-1zm19 0v1h-1v-1zM1 13v1H0v-1zm19 0v1h-1v-1zM1 11v1H0v-1zm19 0v1h-1v-1zM1 9v1H0V9zm19 0v1h-1V9zM1 7v1H0V7zm19 0v1h-1V7zM1 5v1H0V5zm19 0v1h-1V5zm0-2v1h-1V3zM1 3v1H0V3zm13.5-1.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm-8 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm8 0v1h-1v-1zm-10 0v1h-1v-1z"/><path d="M13 5.5H2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2M13 7a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-8A.5.5 0 0 1 2 7z"/></svg>',WTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 16.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zM1 15v1H0v-1zm19 0v1h-1v-1zM1 13v1H0v-1zm19 0v1h-1v-1zM1 11v1H0v-1zm19 0v1h-1v-1zM1 9v1H0V9zm19 0v1h-1V9zM1 7v1H0V7zm19 0v1h-1V7zM1 5v1H0V5zm19 0v1h-1V5zm0-2v1h-1V3zM1 3v1H0V3zm13.5-1.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm-8 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm8 0v1h-1v-1zm-10 0v1h-1v-1z"/><path d="M10 7.5H2a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2M10 9a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-6A.5.5 0 0 1 2 9z"/></svg>',HTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 16.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zM1 15v1H0v-1zm19 0v1h-1v-1zM1 13v1H0v-1zm19 0v1h-1v-1zM1 11v1H0v-1zm19 0v1h-1v-1zM1 9v1H0V9zm19 0v1h-1V9zM1 7v1H0V7zm19 0v1h-1V7zM1 5v1H0V5zm19 0v1h-1V5zm0-2v1h-1V3zM1 3v1H0V3zm13.5-1.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm-8 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm8 0v1h-1v-1zm-10 0v1h-1v-1z"/>
38<path d="M7 9.5H2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2M7 11a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-4A.5.5 0 0 1 2 11z"/></svg>',e7='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75M2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5m1.618-9.55L.98 9.358a.4.4 0 0 0 .013.661l3.39 2.207A.4.4 0 0 0 5 11.892V7.275a.4.4 0 0 0-.632-.326z"/></svg>',qTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M3.598.687h1.5v5h-1.5zm14.5 0h1.5v5h-1.5z"/><path d="M19.598 4.187v1.5h-16v-1.5zm-16 14.569h1.5v-5h-1.5zm14.5 0h1.5v-5h-1.5z"/><path d="M19.598 15.256v-1.5h-16v1.5zM5.081 9h6v2h-6zm8 0h6v2h-6zm-9.483 1L0 12.5v-5z"/></svg>',$Te='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10.5 5.5H7v5h3.5a2.5 2.5 0 1 0 0-5M5 3h6.5v.025a5 5 0 0 1 0 9.95V13H7v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"/></svg>',GTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m7.3 17.37-.061.088a1.52 1.52 0 0 1-.934.535l-4.178.663-.806-4.153a1.5 1.5 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346zM6.07 16.512l-3.276-2.295.53 2.73zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328M8 18.5 9.375 17H19v1.5z"/></svg>',YTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10.126 2.268 2.002 13.874l1.895 1.852 2.521 1.402L14.47 5.481l-1.543-2.568z" class="ck-icon__fill"/><path d="m4.5 18.088-2.645-1.852-.04-2.95-.006-.005.006-.008v-.025l.011.008L8.73 2.97q.249-.348.567-.557l-1.212.308L4.604 7.9l-.83-.558 3.694-5.495 2.708-.69 1.65 1.145.046.018.85-1.216 2.16 1.512-.856 1.222c.828.967 1.144 2.141.432 3.158L7.55 17.286l.006.005zm-.634.166-1.976.516-.026-1.918zM9.968 3.817l-.006-.004-6.123 9.184 3.277 2.294 6.108-9.162.005.003c.317-.452-.16-1.332-1.064-1.966-.891-.624-1.865-.776-2.197-.349M8.245 18.5 9.59 17h9.406v1.5z"/></svg>',KTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4"/></svg>',XTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10 2a1 1 0 0 0-1 1v6H3a1 1 0 1 0 0 2h6v6a1 1 0 1 0 2 0v-6h6a1 1 0 1 0 0-2h-6V3a1 1 0 0 0-1-1"/></svg>',jc='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z"/></svg>',QTe=`<svg xmlns="http://www.w3.org/2000/svg" width="53" height="10" viewBox="0 0 53 10"><path fill="#1C2331" d="M31.724 1.492a15.139 15.139 0 0 0 .045 1.16 2.434 2.434 0 0 0-.687-.34 3.68 3.68 0 0 0-1.103-.166 2.332 2.332 0 0 0-1.14.255 1.549 1.549 0 0 0-.686.87c-.15.41-.225.98-.225 1.712 0 .939.148 1.659.444 2.161.297.503.792.754 1.487.754.452.015.9-.094 1.294-.316.296-.174.557-.4.771-.669l.14.852h1.282V.007h-1.623v1.485ZM31 6.496a1.77 1.77 0 0 1-.494.061.964.964 0 0 1-.521-.127.758.758 0 0 1-.296-.466 3.984 3.984 0 0 1-.093-.992 4.208 4.208 0 0 1 .098-1.052.753.753 0 0 1 .307-.477 1.08 1.08 0 0 1 .55-.122c.233-.004.466.026.69.089l.483.144v2.553c-.11.076-.213.143-.307.2a1.73 1.73 0 0 1-.417.189ZM35.68 0l-.702.004c-.322.002-.482.168-.48.497l.004.581c.002.33.164.493.486.49l.702-.004c.322-.002.481-.167.48-.496L36.165.49c-.002-.33-.164-.493-.486-.491ZM36.145 2.313l-1.612.01.034 5.482 1.613-.01-.035-5.482ZM39.623.79 37.989.8 38 2.306l-.946.056.006 1.009.949-.006.024 2.983c.003.476.143.844.419 1.106.275.26.658.39 1.148.387.132 0 .293-.01.483-.03.19-.02.38-.046.57-.08.163-.028.324-.068.482-.119l-.183-1.095-.702.004a.664.664 0 0 1-.456-.123.553.553 0 0 1-.14-.422l-.016-2.621 1.513-.01-.006-1.064-1.514.01-.01-1.503ZM46.226 2.388c-.41-.184-.956-.274-1.636-.27-.673.004-1.215.101-1.627.29-.402.179-.72.505-.888.91-.18.419-.268.979-.264 1.68.004.688.1 1.24.285 1.655.172.404.495.724.9.894.414.18.957.268 1.63.264.68-.004 1.224-.099 1.632-.284.4-.176.714-.501.878-.905.176-.418.263-.971.258-1.658-.004-.702-.097-1.261-.28-1.677a1.696 1.696 0 0 0-.888-.9Zm-.613 3.607a.77.7
387 0 0 1-.337.501 1.649 1.649 0 0 1-1.317.009.776.776 0 0 1-.343-.497 4.066 4.066 0 0 1-.105-1.02 4.136 4.136 0 0 1 .092-1.03.786.786 0 0 1 .337-.507 1.59 1.59 0 0 1 1.316-.008.79.79 0 0 1 .344.502c.078.337.113.683.105 1.03.012.343-.019.685-.092 1.02ZM52.114 2.07a2.67 2.67 0 0 0-1.128.278c-.39.191-.752.437-1.072.73l-.157-.846-1.273.008.036 5.572 1.623-.01-.024-3.78c.35-.124.646-.22.887-.286.26-.075.53-.114.8-.118l.45-.003.144-1.546-.286.001ZM22.083 7.426l-1.576-2.532a2.137 2.137 0 0 0-.172-.253 1.95 1.95 0 0 0-.304-.29.138.138 0 0 1 .042-.04 1.7 1.7 0 0 0 .328-.374l1.75-2.71c.01-.015.025-.028.024-.048-.01-.01-.021-.007-.031-.007L20.49 1.17a.078.078 0 0 0-.075.045l-.868 1.384c-.23.366-.46.732-.688 1.099a.108.108 0 0 1-.112.06c-.098-.005-.196-.001-.294-.002-.018 0-.038.006-.055-.007.002-.02.002-.039.005-.058a4.6 4.6 0 0 0 .046-.701V1.203c0-.02-.009-.032-.03-.03h-.033L16.93 1.17c-.084 0-.073-.01-.073.076v6.491c-.001.018.006.028.025.027h1.494c.083 0 .072.007.072-.071v-2.19c0-.055-.003-.11-.004-.166a3.366 3.366 0 0 0-.05-.417h.06c.104 0 .209.002.313-.002a.082.082 0 0 1 .084.05c.535.913 1.07 1.824 1.607 2.736a.104.104 0 0 0 .103.062c.554-.003 1.107-.002 1.66-.002l.069-.003-.019-.032-.188-.304ZM27.112 6.555c-.005-.08-.004-.08-.082-.08h-2.414c-.053 0-.106-.003-.159-.011a.279.279 0 0 1-.246-.209.558.558 0 0 1-.022-.15c0-.382 0-.762-.002-1.143 0-.032.007-.049.042-.044h2.504c.029.003.037-.012.034-.038V3.814c0-.089.013-.078-.076-.078h-2.44c-.07 0-.062.003-.062-.06v-.837c0-.047.004-.093.013-.14a.283.283 0 0 1 .241-.246.717.717 0 0 1 .146-.011h2.484c.024.002.035-.009.036-.033l.003-.038.03-.496c.01-.183.024-.365.034-.548.005-.085.003-.087-.082-.094-.218-.018-.437-.038-.655-.05a17.845 17.845 0 0 0-.657-.026 72.994 72.994 0 0 0-1.756-.016 1.7 1.7 0 0 0-.471.064 1.286 1.286 0 0 0-.817.655c-.099.196-.149.413-.145.633v3.875c0 .072.003.144.011.216a1.27 1.27 0 0 0 .711 1.029c.228.113.48.167.734.158.757-.005 1.515.002 2.272-.042.274-.016.548-.034.82-.053.03-.002.043-.008.04-.041-.008-.104-.012-.208-.019-.312a69.964 69.964 0 0 1-.05-.768ZM16.14 7.415l-.127-1.075c-.004-.03-.014-.04-.044-.037a13.125 13.125 0 0 1-.998.073c-.336.01-.672.02-1.008.016-.116-.001-.233-.014-.347-.039a.746.746 0 0 1-.45-.262c-.075-.1-.132-.211-.167-.33a3.324 3.324 0 0 1-.126-.773 9.113 9.113 0 0 1-.015-.749c0-.285.022-.57.065-.852.023-.158.066-.312.127-.46a.728.728 0 0 1 .518-.443 1.64 1.64 0 0 1 .397-.048c.628-.001 1.255.003 1.882.05.022.001.033-.006.036-.026l.003-.031.06-.55c.019-.177.036-.355.057-.532.004-.034-.005-.046-.04-.056a5.595 5.595 0 0 0-1.213-.21 10.783 10.783 0 0 0-.708-.02c-.24-.003-.48.01-.719.041a3.477 3.477 0 0 0-.625.14 1.912 1.912 0 0 0-.807.497c-.185.2-.33.433-.424.688a4.311 4.311 0 0 0-.24 1.096c-.031.286-.045.572-.042.86-.006.43.024.86.091 1.286.04.25.104.497.193.734.098.279.26.53.473.734.214.205.473.358.756.446.344.11.702.17 1.063.177a8.505 8.505 0 0 0 1.578-.083 6.11 6.11 0 0 0 .766-.18c.03-.008.047-.023.037-.057a.157.157 0 0 1-.003-.025Z"/><path fill="#AFE229" d="M6.016 6.69a1.592 1.592 0 0 0-.614.21c-.23.132-.422.32-.56.546-.044.072-.287.539-.287.539l-.836 1.528.009.006c.038.025.08.046.123.063.127.046.26.07.395.073.505.023 1.011-.007 1.517-.003.29.009.58.002.869-.022a.886.886 0 0 0 .395-.116.962.962 0 0 0 .312-.286c.056-.083.114-.163.164-.249.24-.408.48-.816.718-1.226.075-.128.148-.257.222-.386l.112-.192a1.07 1.07 0 0 0 .153-.518l-1.304.023s-1.258-.005-1.388.01Z"/><path fill="#771BFF" d="m2.848 9.044.76-1.39.184-.352c-.124-.067-.245-.14-.367-.21-.346-.204-.706-.384-1.045-.6a.984.984 0 0 1-.244-.207c-.108-.134-.136-.294-.144-.46-.021-.409-.002-.818-.009-1.227-.003-.195 0-.39.003-.585.004-.322.153-.553.427-.713l.833-.488c.22-.13.44-.257.662-.385.05-.029.105-.052.158-.077.272-.128.519-.047.76.085l.044.028c.123.06.242.125.358.196.318.178.635.357.952.537.095.056.187.117.275.184.194.144.254.35.266.578.016.284.007.569.006.853-.001.28.004.558 0 .838.592-.003 1.259 0 1.259 0l.723-.013c-.003-.292-.007-.584-.007-.876 0-.524.015-1.048-.016-1.571-.024-.42-.135-.8-.492-1.067a5.02 5.02 0 0 0-.506-.339A400.52 400.52 0 0 0 5.94.787C5.722.664 5.513.524 5.282.423 5.255.406 5.228.388 5.2.373 4.758.126 4.305-.026 3.807.21c-.097.046-.197.087-.29.14A699.896 699.896 0 0 0 .783 1.948c-.501.294-.773.717-.778 1.31-.004.36-.009.718-.001 1.077.016.754-.017 1.508.024 2.261.016.304.07.6.269.848.127.15.279.28.448.382.622.4 1.283.734 1.92 1.11l.183.109Z"/></svg>
39`,ZTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003z"/></svg>',t7='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.75.75 0 0 0 .21-.284.7
395.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.8.8 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032z"/></svg>',JTe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M8.69 14.915q.08.078.36.093a.366.366 0 0 1 .345.485l-.003.01a.74.74 0 0 1-.697.497h-2.67a.374.374 0 0 1-.353-.496l.013-.038a.68.68 0 0 1 .644-.458q.295-.018.386-.093a.3.3 0 0 0 .072-.11L9.592 4.5H6.269q-.538-.026-.75.09-.213.117-.442.563c-.192.29-.516.464-.864.464H4.17a.43.43 0 0 1-.407-.569L4.46 3h13.08l-.62 2.043a.81.81 0 0 1-.775.574h-.114a.486.486 0 0 1-.486-.486q.002-.426-.167-.54-.168-.114-.766-.091h-3.28l-2.68 10.257q-.009.111.038.158M3 17h8a.5.5 0 1 1 0 1H3a.5.5 0 1 1 0-1m11.299 1.17a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.06-1.06l1.415 1.414 1.414-1.415a.75.75 0 1 1 1.06 1.06l-1.413 1.415 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z"/></svg>',eAe='<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg"><path d="M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038"/></svg>',tAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75m18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75m-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2z"/></svg>',nAe=`<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.734 6.375H1.75a.75.75 0 0 1 0-1.5h1.984a2.626 2.626 0 0 1 5.032 0h9.48a.75.75 0 0 1 0 1.5h-9.48a2.626 2.626 0 0 1-5.032 0Zm1.141-.75a1.375 1.375 0 1 1 2.75 0 1.375 1.375 0 0 1-2.75 0ZM16.263 14.625h1.983a.75.75 0 0 1 0 1.5h-1.983a2.626 2.626 0 0 1-5.033 0H1.75a.75.75 0 0 1 0-1.5h9.48a2.626 2.626 0 0 1 5.033 0Zm-1.142.75a1.375 1.375 0 1 1-2.75 0 1.375 1.375 0 0 1 2.75 0Z"/></svg>
40`,iAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m12.5 0 5 4.5v15.003h-16V0zM3 1.5v3.25l-1.497 1-.003 8 1.5 1v3.254L7.685 18l-.001 1.504H17.5V8.002L16 9.428l-.004-4.22-4.222-3.692z"/><path d="M4.06 6.64a.75.75 0 0 1 .958 1.15l-.085.07L2.29 9.75l2.646 1.89c.302.216.4.62.232.951l-.058.095a.75.75 0 0 1-.951.232l-.095-.058-3.5-2.5V9.14zm4.194 6.22a.75.75 0 0 1-.958-1.149l.085-.07 2.643-1.89-2.646-1.89a.75.75 0 0 1-.232-.952l.058-.095a.75.75 0 0 1 .95-.232l.096.058 3.5 2.5v1.22zm7.644-.836 2.122 2.122-5.825 5.809-2.125-.005.003-2.116zm2.539-1.847 1.414 1.414a.5.5 0 0 1 0 .707l-1.06 1.06-2.122-2.12 1.061-1.061a.5.5 0 0 1 .707 0"/></svg>',rAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10 2.5a7.47 7.47 0 0 1 4.231 1.31 7.27 7.27 0 0 1 2.703 3.454 7.13 7.13 0 0 1 .199 4.353c-.39 1.436-1.475 2.72-2.633 3.677h2.013c0-.226.092-.443.254-.603a.876.876 0 0 1 1.229 0c.163.16.254.377.254.603v.853c0 .209-.078.41-.22.567a.87.87 0 0 1-.547.28l-.101.006h-4.695a.517.517 0 0 1-.516-.518v-1.265c0-.21.128-.398.317-.489a5.6 5.6 0 0 0 2.492-2.371 5.46 5.46 0 0 0 .552-3.693 5.53 5.53 0 0 0-1.955-3.2A5.7 5.7 0 0 0 10 4.206 5.7 5.7 0 0 0 6.419 5.46 5.53 5.53 0 0 0 4.46 8.663a5.46 5.46 0 0 0 .554 3.695 5.6 5.6 0 0 0 2.497 2.37.55.55 0 0 1 .317.49v1.264c0 .286-.23.518-.516.518H2.618a.88.88 0 0 1-.614-.25.85.85 0 0 1-.254-.603v-.853c0-.226.091-.443.254-.603a.876.876 0 0 1 1.228 0c.163.16.255.377.255.603h1.925c-1.158-.958-2.155-2.241-2.545-3.678a7.13 7.13 0 0 1 .199-4.352 7.27 7.27 0 0 1 2.703-3.455A7.5 7.5 0 0 1 10 2.5"/></svg>',sAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.
401 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6M6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z"/><path d="M3 10.5V9h14v1.5z"/></svg>',oAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m7.03 10.349 3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53zm8.147 7.829h2.549q.38 0 .58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393q-.158.162-.48.162h-3.594q-.367 0-.572-.197a.62.62 0 0 1-.205-.463q0-.171.132-.453a1.6 1.6 0 0 1 .288-.444q.65-.654 1.172-1.122t.747-.615q.401-.275.667-.553t.405-.57.139-.57a1.01 1.01 0 0 0-.554-.917 1.2 1.2 0 0 0-.56-.133q-.639 0-1.005.546a2.3 2.3 0 0 0-.164.39 1.6 1.6 0 0 1-.258.488q-.144.17-.423.17a.56.56 0 0 1-.405-.156.57.57 0 0 1-.161-.427q0-.327.151-.683.152-.357.452-.646c.3-.289.454-.349.762-.467a3 3 0 0 1 1.081-.178q.747 0 1.274.228a1.92 1.92 0 0 1 1.004 1.032 1.98 1.98 0 0 1-.156 1.794q-.3.48-.613.754-.312.273-1.048.857-.735.584-1.008.906a3 3 0 0 0-.24.309z"/></svg>',aAe='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="m7.184 10.353 3.818-3.819a.8.8 0 0 1 1.132 1.132l-3.82 3.818 3.82 3.818a.802.8
4002 0 0 1-.873 1.306.8.8 0 0 1-.26-.174l-3.817-3.82-3.818 3.82a.8.8 0 0 1-1.305-.26.8.8 0 0 1 .173-.872l3.82-3.818-3.82-3.818a.8.8 0 0 1 1.132-1.132l3.818 3.82M15.68 6.88h2.549q.38 0 .58.153a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393q-.158.162-.48.162h-3.594q-.367 0-.572-.197A.62.62 0 0 1 14 7.34q0-.171.132-.453a1.6 1.6 0 0 1 .288-.444q.65-.654 1.172-1.122t.747-.615q.401-.275.667-.553.266-.277.405-.57.14-.291.139-.57a1.01 1.01 0 0 0-.554-.917 1.2 1.2 0 0 0-.56-.133q-.639 0-1.005.546a2.3 2.3 0 0 0-.164.39 1.6 1.6 0 0 1-.258.488q-.144.17-.423.17a.56.56 0 0 1-.405-.156.57.57 0 0 1-.161-.427q0-.327.151-.683.152-.357.452-.646t.762-.467A3 3 0 0 1 16.466 1q.747 0 1.274.228c.456.2.816.57 1.004 1.032a1.99 1.99 0 0 1-.156 1.794q-.3.48-.613.754-.312.273-1.048.857-.735.583-1.008.906-.131.146-.24.309z"/></svg>',lAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5zM2 12h5V8H2zm10-4H8v4h4zM2 2v5h5V2zm0 16h5v-5H2zM13 7h5V2h-5zM8 2v5h4V2z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43zM13 6a1 1 0 0 1 1 1v3.172a2 2 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.98 1.98 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm-1 2H8v4h4z"/></svg>',cAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1M2 2v16h16V2z" opacity=".6"/><path d="M18 7v1H2V7zm0 5v1H2v-1z" opacity=".6"/><path d="M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1m-2 1H8v4h4zm0 6H8v4h4zm0 6H8v4h4z"/></svg>',uAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1M2 2v16h16V2z" opacity=".6"/><path d="M7 2h1v16H7zm5 0h1v7h-1zm6 5v1H2V7zM8 12v1H2v-1z" opacity=".6"/><path d="M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1m1 2v9h10V9z"/></svg>',dAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2zm4 6H8v4h4z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2 2 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2z"/></svg>',fAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1M2 2v16h16V2z" opacity=".6"/><path d="M7 2h1v16H7zm5 0h1v16h-1z" opacity=".6"/><path d="M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1m1 2v4h4V8zm6 0v4h4V8zm6 0v4h4V8z"/></svg>',n7='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M3 5.5v3h4v-3zm0 4v3h4v-3zm0 4v3h4v-3zm5 3h4v-3H8zm5 0h4v-3h-4zm4-4v-3h-4v3zm0-4v-3h-4v3zm1.5 8A1.5 1.5 0 0 1 17 18H3a1.5 1.5 0 0 1-1.5-1.5V3c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5zm-6.5-4v-3H8v3zm0-4v-3H8v3z"/></svg>',hAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M3.035 1C2.446 1 2 1.54 2 2.098V10.5h1.5v-8h13v8H18V2.098C18 1.539 17.48 1 16.9 1zm10.453 2.61a1.89 1.89 0 0 0-1.442.736 1.89 1.89 0 0 0 1.011 2.976 1.9 1.9 0 0 0 2.253-1.114 1.887 1.887 0 0 0-1.822-2.598M7.463 8.163a.6.6 0 0 0-.432.154L5.071 10.5h5.119L7.88 8.348a.63.63 0 0 0-.417-.185m6.236 1.059a.62.62 0 0 0-.42.164L12.07 10.5h2.969l-.92-1.113a.62.62 0 0 0-.42-.165M.91 11.5a.91.91 0 0 0-.91.912v6.877c0 .505.405.91.91.91h18.178a.91.91 0 0 0 .912-.91v-6.877a.91.91 0 0 0-.912-.912zM3.668 13h1.947l2.135 5.7H5.898l-.28-.946H3.601l-.278.945H1.516zm4.947 0h1.801v4.3h2.7v1.4h-4.5zm4.5 0h5.4v1.4h-1.798v4.3h-1.701v-4.3h-1.9zm-8.517 1.457-.614 2.059h1.262z"/></svg>',mAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.816 11.5 7.038 4.785 4.261 11.5zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663z"/><path d="m12.09 17-.534-1.292.848-1.971.545 1.319L12.113 17zm1.142-5.187.545 1.319L15.5 9.13l1.858 4.316h-3.45l.398.965h3.467L18.887 17H20l-3.873-9h-1.254z"/></svg>',s4='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><circle cx="9.5" cy="4.5" r="1.5"/><circle cx="9.5" cy="10.5" r="1.5"/><circle cx="9.5" cy="16.5" r="1.5"/></svg>',pAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m2.315 14.705 2.224-2.24a.69.69 0 0 1 .963 0 .664.664 0 0 1 0 .949L2.865 16.07a.7.7 0 0 1-.112.089.65.65 0 0 1-.852-.051L.688 14.886a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0zm5.185.045a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75M2.329 5.745l2.21-2.226a.69.69 0 0 1 .963 0 .664.664 0 0 1 0 .95L2.865 7.125a.7.7 0 0 1-.496.196.64.64 0 0 1-.468-.187L.688 5.912a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.73.736zM7.5 5.75A.75.75 0 0 1 8.25 5h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75"/></svg>',gAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8s3.4
40-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4"/></svg>',i7='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.75.75 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.8.8 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032z"/></svg>',bAe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.8.8 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.7.7 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294zm5.494-5.335a.8.8 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.8.8 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955m-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184m4.919 10.562-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06z"/></svg>';const yS={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87
40],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(const i in yS)Object.freeze(yS[i]);const r7=Object.freeze(yS);var s7={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function o7(i){var e,t=[],n=1,r;if(typeof i=="number")return{space:"rgb",values:[i>>>16,(i&65280)>>>8,i&255],alpha:1};if(typeof i=="number")return{space:"rgb",values:[i>>>16,(i&65280)>>>8,i&255],alpha:1};if(i=String(i).toLowerCase(),r7[i])t=r7[i].slice(),r="rgb";else if(i==="transparent")n=0,r="rgb",t=[0,0,0];else if(i[0]==="#"){var s=i.slice(1),o=s.length,a=o<=4;n=1,a?(t=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],o===4&&(n=parseInt(s[3]+s[3],16)/255)):(t=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],o===8&&(n=parseInt(s[6]+s[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),r="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(i)){var l=e[1];r=l.replace(/a$/,"");var c=r==="cmyk"?4:r==="gray"?1:3;t=e[2].trim().split(/\s*[,\/]\s*|\s+/),r==="color"&&(r=t.shift()),t=t.map(function(d,f){if(d[d.length-1]==="%")return d=parseFloat(d)/100,f===3?d:r==="rgb"?d*255:r[0]==="h"||r[0]==="l"&&!f?d*100:r==="lab"?d*125:r==="lch"?f<2?d*150:d*360:r[0]==="o"&&!f?d:r==="oklab"?d*.4:r==="oklch"?f<2?d*.4:d*360:d;if(r[f]==="h"||f===2&&r[r.length-1]==="h"){if(s7[d]!==void 0)return s7[d];if(d.endsWith("deg"))return parseFloat(d);if(d.endsWith("turn"))return parseFloat(d)*360;if(d.endsWith("grad"))return parseFloat(d)*360/400;if(d.endsWith("rad"))return parseFloat(d)*180/Math.PI}return d==="none"?0:parseFloat(d)}),n=t.length>c?t.pop():1}else/[0-9](?:\s|\/|,)/.test(i)&&(t=i.match(/([0-9]+)/g).map(function(d){return parseFloat(d)}),r=i.match(/([a-z])/ig)?.join("")?.toLowerCase()||"rgb");return{space:r,values:t,alpha:n}}const vS={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],ol
40ive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(const i in vS)Object.freeze(vS[i]);const Vg=Object.freeze(vS),KY={};for(const i of Object.keys(Vg))KY[Vg[i]]=i;const Je={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},Dl=(6/29)**3;function hh(i){const e=i>.0031308?1.055*i**.4166666666666667-.055:i*12.92;return Math.min(Math.max(0,e),1)}function mh(i){return i>.04045?((i+.055)/1.055)**2.4:i/12.92}for(const i of Object.keys(Je)){if(!("channels"in Je[i]))throw new Error("missing channels property: "+i);if(!("labels"in Je[i]))throw new Error("missing channel labels property: "+i);if(Je[i].labels.length!==Je[i].channels)throw new Error("channel and label counts mismatch: "+i);const{channels:e,labels:t}=Je[i];delete Je[i].channels,delete Je[i].labels,Object.defineProperty(Je[i],"channels",{value:e}),Object.defineProperty(Je[i],"labels",{value:t})}Je.rgb.hsl=function(i){const e=i[0]/255,t=i[1]/255,n=i[2]/255,r=Math.min(e,t,n),s=Math.max(e,t,n),o=s-r;let a,l;switch(s){case r:{a=0;break}case e:{a=(t-n)/o;break}case t:{a=2+(n-e)/o;break}case n:{a=4+(e-t)/o;break}}a=Math.min(a*60,360),a<0&&(a+=360);const c=(r+s)/2;return s===r?l=0:c<=.5?l=o/(s+r):l=o/(2-s-r),[a,l*100,c*100]};Je.rgb.hsv=function(i){let e,t,n,r,s;const o=i[0]/255,a=i[1]/255,l=i[2]/255,c=Math.max(o,a,l),d=c-Math.min(o,a,l),f=function(m){return(c-m)/6/d+1/2};if(d===0)r=0,s=0;else{switch(s=d/c,e=f(o),t=f(a),n=f(l),c){case o:{r=n-t;break}case a:{r=1/3+e-n;break}case l:{r=2/3+t-e;break}}r<0?r+=1:r>1&&(r-=1)}return[r*360,s*100,c*100]};Je.rgb.hwb=function(i){const e=i[0],t=i[1];let n=i[2];const r=Je.rgb.hsl(i)[0],s=1/255*Math.min(e,Math.min(t,n));return n=1-1/255*Math.max(e,Math.max(t,n)),[r,s*100,n*100]};Je.rgb.oklab=function(i){const e=mh(i[0]/255),t=mh(i[1]/255),n=mh(i[2]/255),r=Math.cbrt(.4122214708*e+.5363325363*t+.0514459929*n),s=Math.cbrt(.2119034982*e+.6806995451*t+.1073969566*n),o=Math.cbrt(.0883024619*e+.2817188376*t+.6299787005*n),a=.2104542553*r+.793617785*s-.0040720468*o,l=1.9779984951*r-2.428592205*s+.4505937099*o,c=.0259040371*r+.7827717662*s-.808675766*o;return[a*100,l*100,c*100]};Je.rgb.cmyk=function(i){const e=i[0]/255,t=i[1]/255,n=i[2]/255,r=Math.min(1-e,1-t,1-n),s=(1-e-r)/(1-r)||0,o=(1-t-r)/(1-r)||0,a=(1-n-r)/(1-r)||0;return[s*100,o*100,a*100,r*100]};function yAe(i,e){return(i[0]-e[0])**2+(i[1]-e[1])**2+(i[2]-e[2])**2}Je.rgb.keyword=function(i){const e=KY[i];if(e)return e;let t=Number.POSITIVE_INFINITY,n;for(const r of Object.keys(Vg)){const s=Vg[r],o=yAe(i,s);o<t&&(t=o,n=r)}return n};Je.keyword.rgb=function(i){return Vg[i]};Je.rgb.xyz=function(i){const e=mh(i[0]/255),t=mh(i[1]/255),n=mh(i[2]/255),r=e*.4124564+t*.3575761+n*.1804375,s=e*.2126729+t*.7151522+n*.072175,o=e*.0193339+t*.119192+n*.9503041;return[r*100,s*100,o*100]};Je.rgb.lab=function(i){const e=Je.rgb.xyz(i);let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>Dl?t**(1/3):7.787*t+16/116,n=n>Dl?n**(1/3):7.787*n+16/116,r=r>Dl?r**(1/3):7.787*r+16/116;const s=116*n-16,o=500*(t-n),a=200*(n-r);return[s,o,a]};Je.hsl.rgb=function(i){const e=i[0]/360,t=i[1]/100,n=i[2]/100;let r,s;if(t===0)return s=n*255,[s,s,s];const o=n<.5?n*(1+t):n+t-n*t,a=2*n-o,l=[0,0,0];for(let c=0;c<3;c++)r=e+1/3*-(c-1),r<0&&r++,r>
401&&r--,6*r<1?s=a+(o-a)*6*r:2*r<1?s=o:3*r<2?s=a+(o-a)*(2/3-r)*6:s=a,l[c]=s*255;return l};Je.hsl.hsv=function(i){const e=i[0];let t=i[1]/100,n=i[2]/100,r=t;const s=Math.max(n,.01);n*=2,t*=n<=1?n:2-n,r*=s<=1?s:2-s;const o=(n+t)/2,a=n===0?2*r/(s+r):2*t/(n+t);return[e,a*100,o*100]};Je.hsv.rgb=function(i){const e=i[0]/60,t=i[1]/100;let n=i[2]/100;const r=Math.floor(e)%6,s=e-Math.floor(e),o=255*n*(1-t),a=255*n*(1-t*s),l=255*n*(1-t*(1-s));switch(n*=255,r){case 0:return[n,l,o];case 1:return[a,n,o];case 2:return[o,n,l];case 3:return[o,a,n];case 4:return[l,o,n];case 5:return[n,o,a]}};Je.hsv.hsl=function(i){const e=i[0],t=i[1]/100,n=i[2]/100,r=Math.max(n,.01);let s,o;o=(2-t)*n;const a=(2-t)*r;return s=t*r,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};Je.hwb.rgb=function(i){const e=i[0]/360;let t=i[1]/100,n=i[2]/100;const r=t+n;let s;r>1&&(t/=r,n/=r);const o=Math.floor(6*e),a=1-n;s=6*e-o,(o&1)!==0&&(s=1-s);const l=t+s*(a-t);let c,d,f;switch(o){default:case 6:case 0:{c=a,d=l,f=t;break}case 1:{c=l,d=a,f=t;break}case 2:{c=t,d=a,f=l;break}case 3:{c=t,d=l,f=a;break}case 4:{c=l,d=t,f=a;break}case 5:{c=a,d=t,f=l;break}}return[c*255,d*255,f*255]};Je.cmyk.rgb=function(i){const e=i[0]/100,t=i[1]/100,n=i[2]/100,r=i[3]/100,s=1-Math.min(1,e*(1-r)+r),o=1-Math.min(1,t*(1-r)+r),a=1-Math.min(1,n*(1-r)+r);return[s*255,o*255,a*255]};Je.xyz.rgb=function(i){const e=i[0]/100,t=i[1]/100,n=i[2]/100;let r,s,o;return r=e*3.2404542+t*-1.5371385+n*-.4985314,s=e*-.969266+t*1.8760108+n*.041556,o=e*.0556434+t*-.2040259+n*1.0572252,r=hh(r),s=hh(s),o=hh(o),[r*255,s*255,o*255]};Je.xyz.lab=function(i){let e=i[0],t=i[1],n=i[2];e/=95.047,t/=100,n/=108.883,e=e>Dl?e**(1/3):7.787*e+16/116,t=t>Dl?t**(1/3):7.787*t+16/116,n=n>Dl?n**(1/3):7.787*n+16/116;const r=116*t-16,s=500*(e-t),o=200*(t-n);return[r,s,o]};Je.xyz.oklab=function(i){const e=i[0]/100,t=i[1]/100,n=i[2]/100,r=Math.cbrt(.8189330101*e+.3618667424*t-.1288597137*n),s=Math.cbrt(.0329845436*e+.9293118715*t+.0361456387*n),o=Math.cbrt(.0482003018*e+.2643662691*t+.633851707*n),a=.2104542553*r+.793617785*s-.0040720468*o,l=1.9779984951*r-2.428592205*s+.4505937099*o,c=.0259040371*r+.7827717662*s-.808675766*o;return[a*100,l*100,c*100]};Je.oklab.oklch=function(i){return Je.lab.lch(i)};Je.oklab.xyz=function(i){const e=i[0]/100,t=i[1]/100,n=i[2]/100,r=(.999999998*e+.396337792*t+.215803758*n)**3,s=(1.000000008*e-.105561342*t-.063854175*n)**3,o=(1.000000055*e-.089484182*t-1.291485538*n)**3,a=1.227013851*r-.55779998*s+.281256149*o,l=-.040580178*r+1.11225687*s-.071676679*o,c=-.076381285*r-.421481978*s+1.58616322*o;return[a*100,l*100,c*100]};Je.oklab.rgb=function(i){const e=i[0]/100,t=i[1]/100,n=i[2]/100,r=(e+.3963377774*t+.2158037573*n)**3,s=(e-.1055613458*t-.0638541728*n)**3,o=(e-.0894841775*t-1.291485548*n)**3,a=hh(4.0767416621*r-3.3077115913*s+.2309699292*o),l=hh(-1.2684380046*r+2.6097574011*s-.3413193965*o),c=hh(-.0041960863*r-.7034186147*s+1.707614701*o);return[a*255,l*255,c*255]};Je.oklch.oklab=function(i){return Je.lch.lab(i)};Je.lab.xyz=function(i){const e=i[0],t=i[1],n=i[2];let r,s,o;s=(e+16)/116,r=t/500+s,o=s-n/200;const a=s**3,l=r**3,c=o**3;return s=a>Dl?a:(s-16/116)/7.787,r=l>Dl?l:(r-16/116)/7.787,o=c>Dl?c:(o-16/116)/7.787,r*=95.047,s*=100,o*=108.883,[r,s,o]};Je.lab.lch=function(i){const e=i[0],t=i[1],n=i[2];let r;r=Math.atan2(n,t)*360/2/Math.PI,r<0&&(r+=360);const o=Math.sqrt(t*t+n*n);return[e,o,r]};Je.lch.lab=function(i){const e=i[0],t=i[1],r=i[2]/360*2*Math.PI,s=t*Math.cos(r),o=t*Math.sin(r);return[e,s,o]};Je.rgb.ansi16=function(i,e=null){const[t,n,r]=i;let s=e===null?Je.rgb.hsv(i)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return s===2&&(o+=60),o};Je.hsv.ansi16=function(i){return Je.rgb.ansi16(Je.hsv.rgb(i),i[2])};Je.rgb.ansi256=function(i){const e=i[0],t=i[1],n=i[2];return e>>4===t>>4&&t>>4===n>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)};Je.ansi16.rgb=function(i){i=i[0];let e=i%10;if(e===0||e===7)return i>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const t=(Math.trunc(i>
4050)+1)*.5,n=(e&1)*t*255,r=(e>>1&1)*t*255,s=(e>>2&1)*t*255;return[n,r,s]};Je.ansi256.rgb=function(i){if(i=i[0],i>=232){const s=(i-232)*10+8;return[s,s,s]}i-=16;let e;const t=Math.floor(i/36)/5*255,n=Math.floor((e=i%36)/6)/5*255,r=e%6/5*255;return[t,n,r]};Je.rgb.hex=function(i){const t=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".slice(t.length)+t};Je.hex.rgb=function(i){const e=i.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let t=e[0];e[0].length===3&&(t=[...t].map(a=>a+a).join(""));const n=Number.parseInt(t,16),r=n>>16&255,s=n>>8&255,o=n&255;return[r,s,o]};Je.rgb.hcg=function(i){const e=i[0]/255,t=i[1]/255,n=i[2]/255,r=Math.max(Math.max(e,t),n),s=Math.min(Math.min(e,t),n),o=r-s;let a;const l=o<1?s/(1-o):0;return o<=0?a=0:r===e?a=(t-n)/o%6:r===t?a=2+(n-e)/o:a=4+(e-t)/o,a/=6,a%=1,[a*360,o*100,l*100]};Je.hsl.hcg=function(i){const e=i[1]/100,t=i[2]/100,n=t<.5?2*e*t:2*e*(1-t);let r=0;return n<1&&(r=(t-.5*n)/(1-n)),[i[0],n*100,r*100]};Je.hsv.hcg=function(i){const e=i[1]/100,t=i[2]/100,n=e*t;let r=0;return n<1&&(r=(t-n)/(1-n)),[i[0],n*100,r*100]};Je.hcg.rgb=function(i){const e=i[0]/360,t=i[1]/100,n=i[2]/100;if(t===0)return[n*255,n*255,n*255];const r=[0,0,0],s=e%1*6,o=s%1,a=1-o;let l=0;switch(Math.floor(s)){case 0:{r[0]=1,r[1]=o,r[2]=0;break}case 1:{r[0]=a,r[1]=1,r[2]=0;break}case 2:{r[0]=0,r[1]=1,r[2]=o;break}case 3:{r[0]=0,r[1]=a,r[2]=1;break}case 4:{r[0]=o,r[1]=0,r[2]=1;break}default:r[0]=1,r[1]=0,r[2]=a}return l=(1-t)*n,[(t*r[0]+l)*255,(t*r[1]+l)*255,(t*r[2]+l)*255]};Je.hcg.hsv=function(i){const e=i[1]/100,t=i[2]/100,n=e+t*(1-e);let r=0;return n>0&&(r=e/n),[i[0],r*100,n*100]};Je.hcg.hsl=function(i){const e=i[1]/100,n=i[2]/100*(1-e)+.5*e;let r=0;return n>0&&n<.5?r=e/(2*n):n>=.5&&n<1&&(r=e/(2*(1-n))),[i[0],r*100,n*100]};Je.hcg.hwb=function(i){const e=i[1]/100,t=i[2]/100,n=e+t*(1-e);return[i[0],(n-e)*100,(1-n)*100]};Je.hwb.hcg=function(i){const e=i[1]/100,n=1-i[2]/100,r=n-e;let s=0;return r<1&&(s=(n-r)/(1-r)),[i[0],r*100,s*100]};Je.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]};Je.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]};Je.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]};Je.gray.hsl=function(i){return[0,0,i[0]]};Je.gray.hsv=Je.gray.hsl;Je.gray.hwb=function(i){return[0,100,i[0]]};Je.gray.cmyk=function(i){return[0,0,0,i[0]]};Je.gray.lab=function(i){return[i[0],0,0]};Je.gray.hex=function(i){const e=Math.round(i[0]/100*255)&255,n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(n.length)+n};Je.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]};function vAe(){const i={},e=Object.keys(Je);for(let{length:t}=e,n=0;n<t;n++)i[e[n]]={distance:-1,parent:null};return i}function wAe(i){const e=vAe(),t=[i];for(e[i].distance=0;t.length>0;){const n=t.pop(),r=Object.keys(Je[n]);for(let{length:s}=r,o=0;o<s;o++){const a=r[o],l=e[a];l.distance===-1&&(l.distance=e[n].distance+1,l.parent=n,t.unshift(a))}}return e}function xAe(i,e){return function(t){return e(i(t))}}function _Ae(i,e){const t=[e[i].parent,i];let n=Je[e[i].parent][i],r=e[i].parent;for(;e[r].parent;)t.unshift(e[r].parent),n=xAe(Je[e[r].parent][r],n),r=e[r].parent;return n.conversion=t,n}function CAe(i){const e=wAe(i),t={},n=Object.keys(e);for(let{length:r}=n,s=0;s<r;s++){const o=n[s];e[o].parent!==null&&(t[o]=_Ae(o,e))}return t}const ju={},DAe=Object.keys(Je);function EAe(i){const e=function(...t){const n=t[0];return n==null?n:(n.length>1&&(t=n),i(t))};return"conversion"in i&&(e.conversion=i.conversion),e}function TAe(i){const e=function(...t){const n=t[0];if(n==null)return n;n.length>1&&(t=n);const r=i(t);if(typeof r=="object")for(let{length:s}=r,o=0;o<s;o++)r[o]=Math.round(r[o]);return r};return"conversion"in i&&(e.conversion=i.conversion),e}for(const i of DAe){ju[i]={},Object.defineProperty(ju[i],"channels",{value:Je[i].channels}),Object.defineProperty(ju[i],"labels",{value:Je[i].labels});const e=CAe(i),t=Object.keys(e);for(const n of t){const r=e[n];ju[i][n]=TAe(r),ju[i][n].raw=EAe(r)}}const jg=(i,e=0,t=1)=>i>t?t:i<e?e:i,ir=(i,e=0,t=Math.pow(10,e))=>Math.round(t*i)/t,AAe=i=>RAe(wS(i)),wS=i=>(i[0]==="#"&&(i=i.substring(1)),i.length<6?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?ir(parseInt(i[3]+i[3],16)/255,2):1}:{r:parseInt(i.substring(0,2),16),g:parseInt(i.substring(2,4),16),b:parseInt(i.substring(4,6),16),a:i.length===8?ir(parseInt(i.substring(6,8),16)/255,2):1}),kAe=i=>IAe(PAe(i)),SAe=({h:i,s:e,v:t,a:n})=>{const r=(200-e)*t/100;return{h:ir(i),s:ir(r>0&&r<200?e*t/100/(r<=100?r:200-r)*100:0),l:ir(r/2),a:ir(n,2)}},xS=i=>{const{h:e,s:t,l:n}=SAe(i);return`hsl(${e}, ${t}%, ${n}%)`},PAe=({h:i,s:e,v:t,a:n})=>{i=i/360*6,e=e/100,t=t/100;const r=Math.floor(i),s=t*(1-e),o=t*(1-(i-r)*e),a=t*(1-(1-i+r)*e),l=r%6;return{r:ir([t,o,s,s,a,t][l]*255),g:ir([a,t,t,o,s,s][l]*255),b:ir([s,s,a,t,t,o][l]*255),a:ir(n,2)}},Sy=i=>{const e=i.toString(16);return e.length<2?"0"+e:e},IAe=({r:i,g:e,b:t,a:n})=>{const r=n<1?Sy(ir(n*255)):"";return"#"+Sy(i)+Sy(e)+Sy(t)+r},RAe=({r:i,g:e,b:t,a:n})=>{const r=Math.max(i,e,t),s=r-Math.min(i,e,t),o=s?r===i?(e-t)/s:r===e?2+(t-i)/s:4+(i-e)/s:0;
40return{h:ir(60*(o<0?o+6:o)),s:ir(r?s/r*100:0),v:ir(r/255*100),a:n}},XY=(i,e)=>{if(i===e)return!0;for(const t in i)if(i[t]!==e[t])return!1;return!0},FAe=(i,e)=>i.toLowerCase()===e.toLowerCase()?!0:XY(wS(i),wS(e)),a7={},QY=i=>{let e=a7[i];return e||(e=document.createElement("template"),e.innerHTML=i,a7[i]=e),e},o4=(i,e,t)=>{i.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:t}))};let ph=!1;const _S=i=>"touches"in i,OAe=i=>ph&&!_S(i)?!1:(ph||(ph=_S(i)),!0),l7=(i,e)=>{const t=_S(e)?e.touches[0]:e,n=i.el.getBoundingClientRect();o4(i.el,"move",i.getMove({x:jg((t.pageX-(n.left+window.pageXOffset))/n.width),y:jg((t.pageY-(n.top+window.pageYOffset))/n.height)}))},NAe=(i,e)=>{const t=e.keyCode;t>40||i.xy&&t<37||t<33||(e.preventDefault(),o4(i.el,"move",i.getMove({x:t===39?.01:t===37?-.01:t===34?.05:t===33?-.05:t===35?1:t===36?-1:0,y:t===40?.01:t===38?-.01:0},!0)))};class ZY{constructor(e,t,n,r){const s=QY(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);e.appendChild(s.content.cloneNode(!0));const o=e.querySelector(`[part=${t}]`);o.addEventListener("mousedown",this),o.addEventListener("touchstart",this),o.addEventListener("keydown",this),this.el=o,this.xy=r,this.nodes=[o.firstChild,o]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(ph?"touchmove":"mousemove",this),t(ph?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!OAe(e)||!ph&&e.button!=0)return;this.el.focus(),l7(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),l7(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":NAe(this,e);break}}style(e){e.forEach((t,n)=>{for(const r in t)this.nodes[n].style.setProperty(r,t[r])})}}class BAe extends ZY{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:`${e/360*100}%`,color:xS({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${ir(e)}`)}getMove(e,t){return{h:t?jg(this.h+e.x*360,0,360):360*e.x}}}class MAe extends ZY{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:`${100-e.v}%`,left:`${e.s}%`,color:xS(e)},{"background-color":xS({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${ir(e.s)}%, Brightness ${ir(e.v)}%`)}getMove(e,t){return{s:t?jg(this.hsva.s+e.x*100,0,100):e.x*100,v:t?jg(this.hsva.v-e.y*100,0,100):Math.round(100-e.y*100)}}}const LAe=':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',UAe="[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}",VAe="[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}",Py=Symbol("same"),LE=Symbol("color"),c7=Symbol("hsva"),UE=Symbol("update"),u7=Symbol("parts"),d7=Symbol("css"),f7=Symbol("sliders");class jAe extends HTMLElement{static get observedAttributes(){return["color"]}get[d7](){return[LAe,UAe,VAe]}get[f7](){return[MAe,BAe]}get color(){return this[LE]}set color(e){if(!this[Py](e)){const t=this.colorModel.toHsva(e);this[UE](t),this[LE]=e}}constructor(){super();const e=QY(`<style>${this[d7].join("")}</style>`),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[u7]=this[f7].map(n=>new n(t))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,n){const r=this.colorModel.fromAttr(n);this[Py](r)||(this.color=r)}handleEvent(e){const t=this[c7],n={...t,...e.detail};this[UE](n);let r;!XY(n,t)&&!this[Py](r=this.colorModel.fromHsva(n))&&(this[LE]=r,o4(this,"color-changed",{value:r}))}[Py](e){return this.color&&this.colorModel.equal(e,this.color)}
40[UE](e){this[c7]=e,this[u7].forEach(t=>t.update(e))}}const zAe={defaultColor:"#000",toHsva:AAe,fromHsva:({h:i,s:e,v:t})=>kAe({h:i,s:e,v:t,a:1}),equal:FAe,fromAttr:i=>i};class WAe extends jAe{get colorModel(){return zAe}}class qi extends Jn{_parentElement;constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",(t,n,r)=>{this._renderViewIntoCollectionParent(n,r)}),this.on("remove",(t,n)=>{n.element&&this._parentElement&&n.element.remove()}),this._parentElement=null}destroy(){this.map(e=>e.destroy())}setParent(e){this._parentElement=e;for(const t of this)this._renderViewIntoCollectionParent(t)}delegate(...e){if(!e.length||!HAe(e))throw new oe("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const n of this)for(const r of e)n.delegate(r).to(t);this.on("add",(n,r)=>{for(const s of e)r.delegate(s).to(t)}),this.on("remove",(n,r)=>{for(const s of e)r.stopDelegating(s,t)})}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}remove(e){return super.remove(e)}}function HAe(i){return i.every(e=>typeof e=="string")}const qAe="http://www.w3.org/1999/xhtml";class as extends Sn(){ns;tag;text;attributes;children;eventListeners;_isRendered;_revertData;constructor(e){super(),Object.assign(this,m7(h7(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData=b7(),this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new oe("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){function*e(t){if(t.children)for(const n of t.children)ex(n)?yield n:a4(n)&&(yield*e(n))}yield*e(this)}static bind(e,t){return{to(n,r){return new $Ae({eventNameOrFunction:n,attribute:n,observable:e,emitter:t,callback:r})},if(n,r,s){return new JY({observable:e,emitter:t,attribute:n,valueIfTrue:r,callback:s})}}}static extend(e,t){if(e._isRendered)throw new oe("template-extend-render",[this,e]);iK(e,m7(h7(t)))}_renderNode(e){let t;if(e.node?t=this.tag&&this.text:t=this.tag?this.text:!this.text,t)throw new oe("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||qAe,this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),_1(this.text)?this._bindToObservable({schema:this.text,updater:YAe(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,n=e.revertData;for(const r in this.attributes){const s=t.getAttribute(r),o=this.attributes[r];n&&(n.attributes[r]=s);const a=g7(o)?o[0].ns:null;if(_1(o)){const l=g7(o)?o[0].value:o;n&&y7(r)&&l.unshift(s),this._bindToObservable({schema:l,updater:KAe(t,r,a),data:e})}else if(r=="style"&&typeof o[0]!="string")this._renderStyleAttribute(o[0],e);else{n&&s&&y7(r)&&o.unshift(s);const l=o.map(c=>c&&(c.value||c)).reduce((c,d)=>c.concat(d),[]).reduce(nK,"");Bh(l)||t.setAttributeNS(a,r,l)}}}_renderStyleAttribute(e,t){const n=t.node;for(const r in e){const s=e[r];_1(s)?this._bindToObservable({schema:[s],updater:XAe(n,r),data:t}):CS(r)?n.style.setProperty(r,s):n.style[r]=s}}_renderElementChildren(e){const t=e.node,n=e.intoFragment?document.createDocumentFragment():t,r=e.isApplying;let s=0;for(const o of this.children)if(l4(o)){if(!r){o.setParent(t);for(const a of o)n.appendChild(a.element)}}else if(ex(o))r||(o.isRendered||o.render(),n.appendChild(o.element));else if(Vc(o))n.appendChild(o);else if(r){const a=e.revertData,l=b7();a.children.push(l),o._renderNode({intoFragment:!1,node:n.childNodes[s++],isApplying:!0,revertData:l})}else n.appendChild(o.render());e.intoFragment&&t.appendChild(n)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const n=this.eventListeners[t].map(r=>{const[s,o]=t.split("@");return r.activateDomEventListener(s,o,e)});e.revertData&&e.revertData.bindings.push(n)}}_bindToObservable({schema:e,updater:t,data:n}){const r=n.revertData;
40eK(e,t,n);const s=e.filter(o=>!Bh(o)).filter(o=>o.observable).map(o=>o.activateAttributeListener(e,t,n));r&&r.bindings.push(s)}_revertTemplateFromNode(e,t){for(const r of t.bindings)for(const s of r)s();if(t.text){e.textContent=t.text;return}const n=e;for(const r in t.attributes){const s=t.attributes[r];s===null?n.removeAttribute(r):n.setAttribute(r,s)}for(let r=0;r<t.children.length;++r)this._revertTemplateFromNode(n.childNodes[r],t.children[r])}}class E0{attribute;observable;emitter;callback;constructor(e){this.attribute=e.attribute,this.observable=e.observable,this.emitter=e.emitter,this.callback=e.callback}getValue(e){const t=this.observable[this.attribute];return this.callback?this.callback(t,e):t}activateAttributeListener(e,t,n){const r=()=>eK(e,t,n);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,r),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,r)}}}class $Ae extends E0{eventNameOrFunction;constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,n){const r=(s,o)=>{(!t||o.target.matches(t))&&(typeof this.eventNameOrFunction=="function"?this.eventNameOrFunction(o):this.observable.fire(this.eventNameOrFunction,o))};return this.emitter.listenTo(n.node,e,r),()=>{this.emitter.stopListening(n.node,e,r)}}}class JY extends E0{valueIfTrue;constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){const t=super.getValue(e);return Bh(t)?!1:this.valueIfTrue||!0}}function _1(i){return i?(i.value&&(i=i.value),Array.isArray(i)?i.some(_1):i instanceof E0):!1}function CS(i){return/^--[a-zA-Z_-][\w-]*$/.test(i)}function GAe(i,e){return i.map(t=>t instanceof E0?t.getValue(e):t)}function eK(i,e,{node:t}){const n=GAe(i,t);let r;i.length==1&&i[0]instanceof JY?r=n[0]:r=n.reduce(nK,""),Bh(r)?e.remove():e.set(r)}function YAe(i){return{set(e){i.textContent=e},remove(){i.textContent=""}}}function KAe(i,e,t){return{set(n){i.setAttributeNS(t,e,n)},remove(){i.removeAttributeNS(t,e)}}}function XAe(i,e){return{set(t){CS(e)?i.style.setProperty(e,t):i.style[e]=t},remove(){CS(e)?i.style.removeProperty(e):i.style[e]=null}}}function h7(i){return g_(i,t=>{if(t&&(t instanceof E0||a4(t)||ex(t)||l4(t)))return t})}function m7(i){if(typeof i=="string"?i=JAe(i):i.text&&eke(i),i.on&&(i.eventListeners=ZAe(i.on),delete i.on),!i.text){i.attributes&&QAe(i.attributes);const e=[];if(i.children)if(l4(i.children))e.push(i.children);else for(const t of i.children)a4(t)||ex(t)||Vc(t)?e.push(t):e.push(new as(t));i.children=e}return i}function QAe(i){for(const e in i)i[e].value&&(i[e].value=mn(i[e].value)),tK(i,e)}function ZAe(i){for(const e in i)tK(i,e);return i}function JAe(i){return{text:[i]}}function eke(i){i.text=mn(i.text)}function tK(i,e){i[e]=mn(i[e])}function nK(i,e){return Bh(e)?i:Bh(i)?e:`${i} ${e}`}function p7(i,e){for(const t in e)i[t]?i[t].push(...e[t]):i[t]=e[t]}function iK(i,e){if(e.attributes&&(i.attributes||(i.attributes={}),p7(i.attributes,e.attributes)),e.eventListeners&&(i.eventListeners||(i.eventListeners={}),p7(i.eventListeners,e.eventListeners)),e.text&&i.text.push(...e.text),e.children&&e.children.length){if(i.children.length!=e.children.length)throw new oe("ui-template-extend-children-mismatch",i);let t=0;for(const n of e.children)iK(i.children[t++],n)}}function Bh(i){return!i&&i!==0}function ex(i){return i instanceof Ge}function a4(i){return i instanceof as}function l4(i){return i instanceof qi}function g7(i){return Nr(i[0])&&i[0].ns}function b7(){return{children:[],bindings:[],attributes:{}}}function y7(i){return i=="class"||i=="style"}class Ge extends ds(hn()){element;isRendered;locale;t;template;_viewCollections;_unboundChildren;_bindTemplate;constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new Jn,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(t,n)=>{n.locale=e,n.t=e&&e.t}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=as.bind(this,this)}createCollection(e){const t=new qi(e);return this._viewCollections.add(t),t}registerChild(e){Bs(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){Bs(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new as(e)}extendTemplate(e){as.extend(this.template,e)}
40render(){if(this.isRendered)throw new oe("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(e=>e.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}const v7={POLITE:"polite",ASSERTIVE:"assertive"};class tke{editor;view;constructor(e){this.editor=e,e.once("ready",()=>{for(const t of Object.values(v7))this.announce("",t)})}announce(e,t=v7.POLITE){const n=this.editor;if(!n.ui.view)return;this.view||(this.view=new nke(n.locale),n.ui.view.body.add(this.view));const{politeness:r,isUnsafeHTML:s}=typeof t=="string"?{politeness:t}:t;let o=this.view.regionViews.find(a=>a.politeness===r);o||(o=new ike(n,r),this.view.regionViews.add(o)),o.announce({announcement:e,isUnsafeHTML:s})}}class nke extends Ge{regionViews;constructor(e){super(e),this.regionViews=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-aria-live-announcer"]},children:this.regionViews})}}class ike extends Ge{politeness;_domConverter;_pruneAnnouncementsInterval;constructor(e,t){super(e.locale),this.setTemplate({tag:"div",attributes:{"aria-live":t,"aria-relevant":"additions"},children:[{tag:"ul",attributes:{class:["ck","ck-aria-live-region-list"]}}]}),e.on("destroy",()=>{this._pruneAnnouncementsInterval!==null&&(clearInterval(this._pruneAnnouncementsInterval),this._pruneAnnouncementsInterval=null)}),this.politeness=t,this._domConverter=e.data.htmlProcessor.domConverter,this._pruneAnnouncementsInterval=setInterval(()=>{this.element&&this._listElement.firstChild&&this._listElement.firstChild.remove()},5e3)}announce({announcement:e,isUnsafeHTML:t}){if(!e.trim().length)return;const n=document.createElement("li");t?this._domConverter.setContentOf(n,e):n.innerText=e,this._listElement.appendChild(n)}get _listElement(){return this.element.querySelector("ul")}}function Kc({emitter:i,activator:e,callback:t,contextElements:n,listenerOptions:r}){i.listenTo(document,"mousedown",(s,o)=>{if(!e())return;const a=typeof o.composedPath=="function"?o.composedPath():[],l=typeof n=="function"?n():n;for(const c of l)if(c.contains(o.target)||a.includes(c))return;t()},r)}function Mh(i){class e extends i{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...n){super(...n),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.template&&this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}return e}function rke(i){class e extends i{_onDragBound=this._onDrag.bind(this);_onDragEndBound=this._onDragEnd.bind(this);_lastDraggingCoordinates={x:0,y:0};constructor(...n){super(...n),this.on("render",()=>{this._attachListeners()}),this.set("isDragging",!1)}_attachListeners(){this.listenTo(this.element,"mousedown",this._onDragStart.bind(this)),this.listenTo(this.element,"touchstart",this._onDragStart.bind(this))}_attachDragListeners(){this.listenTo($e.document,"mouseup",this._onDragEndBound),this.listenTo($e.document,"touchend",this._onDragEndBound),this.listenTo($e.document,"mousemove",this._onDragBound),this.listenTo($e.document,"touchmove",this._onDragBound)}_detachDragListeners(){this.stopListening($e.document,"mouseup",this._onDragEndBound),this.stopListening($e.document,"touchend",this._onDragEndBound),this.stopListening($e.document,"mousemove",this._onDragBound),this.stopListening($e.document,"touchmove",this._onDragBound)}_onDragStart(n,r){if(!this._isHandleElementPressed(r))return;this._attachDragListeners();let s=0,o=0;r instanceof MouseEvent?(s=r.clientX,o=r.clientY):(s=r.touches[0].clientX,o=r.touches[0].clientY),this._lastDraggingCoordinates={x:s,y:o},this.isDragging=!0}_onDrag(n,r){if(!this.isDragging){this._detachDragListeners();return}let s=0,o=0;r instanceof MouseEvent?(s=r.clientX,o=r.clientY):(s=r.touches[0].clientX,o=r.touches[0].clientY),r.preventDefault(),this.fire("drag",{deltaX:Math.round(s-this._lastDraggingCoordinates.x),deltaY:Math.round(o-this._lastDraggingCoordinates.y)}),this._lastDraggingCoordinates={x:s,y:o}}_onDragEnd(){this._detachDragListeners(),this.isDragging=!1}_isHandleElementPressed(n){return this.dragHandleElement?this.dragHandleElement===n.target||n.target instanceof HTMLElement&&this.dragHandleElement.contains(n.target):!1}}return e}function Xc({view:i}){i.listenTo(i.element,"submit",(e,t)=>{t.preventDefault(),i.fire("submit")},{useCapture:!0})}function c4({keystrokeHandler:i,focusTracker:e,gridItems:t,numberOfColumns:n,uiLanguageDirection:r}){const s=typeof n=="number"?()=>n:n;i.set("arrowright",o((c,d)=>r==="rtl"?l(c,d.length):a(c,d.length))),i.set("arrowleft",o((c,d)=>r==="rtl"?a(c,d.length):l(c,d.length))),i.set("arrowup",o((c,d)=>{let f=c-s();return f<0&&(f=c+s()*Math.floor(d.length/s()),f>d.length-1&&(f-=s())),f})),i.set("arrowdown",o((c,d)=>{let f=c+s();return f>d.length-1&&(f=c%s()),f}));function o(c){return d=>{const f=t.find(g=>g.element===e.focusedElement),m=t.getIndex(f),p=c(m,t);t.get(p).focus(),d.stopPropagation(),d.preventDefault()}}function a(c,d){return c===d-1?0:c+1}function l(c,d){return c===0?d-1:c-1}}class oo extends Ge{id;constructor(e){super(e),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${rr()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}class ske extends Ge{constructor(e,t){super(e);const n=e.t,r=new oo;r.text=n("Help Contents. To close this dialog press ESC."),this.setTemplate({tag:"div",attributes:{class:["ck","ck-accessibility-help-dialog__content"],"aria-labelledby":r.id,role:"document",tabindex:-1},children:[Ts(document,"p",{},n("Below, you can find a list of keyboard shortcuts that can be used in the editor.")),...this._createCategories(Array.from(t.values())
40),r]})}focus(){this.element.focus()}_createCategories(e){return e.map(t=>{const n=[Ts(document,"h3",{},t.label),...Array.from(t.groups.values()).map(r=>this._createGroup(r)).flat()];return t.description&&n.splice(1,0,Ts(document,"p",{},t.description)),Ts(document,"section",{},n)})}_createGroup(e){const t=e.keystrokes.sort((r,s)=>r.label.localeCompare(s.label)).map(r=>this._createGroupRow(r)).flat(),n=[Ts(document,"dl",{},t)];return e.label&&n.unshift(Ts(document,"h4",{},e.label)),n}_createGroupRow(e){const t=this.locale.t,n=Ts(document,"dt"),r=Ts(document,"dd"),s=ake(e.keystroke),o=[];for(const a of s)o.push(a.map(oke).join(""));return n.innerHTML=e.label,r.innerHTML=o.join(", ")+(e.mayRequireFn&&ot.isMac?` ${t("(may require <kbd>Fn</kbd>)")}`:""),[n,r]}}function oke(i){return qw(i).split("+").map(e=>`<kbd>${e}</kbd>`).join("+")}function ake(i){return typeof i=="string"?[[i]]:typeof i[0]=="string"?[i]:i}class Go extends Ge{static presentationalAttributeNames=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"];constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.set("isVisible",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon",e.if("isVisible","ck-hidden",t=>!t),"ck-reset_all-excluded",e.if("isColorInherited","ck-icon_inherit-color")],viewBox:e.to("viewBox"),"aria-hidden":!0}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on("change:fillColor",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const t=new DOMParser().parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg");if(!t)throw new oe("ui-iconview-invalid-svg",this);const n=t.getAttribute("viewBox");n&&(this.viewBox=n);for(const{name:r,value:s}of Array.from(t.attributes))Go.presentationalAttributeNames.includes(r)&&this.element.setAttribute(r,s);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;t.childNodes.length>0;)this.element.appendChild(t.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(e=>{e.style.fill=this.fillColor})}}class rK extends Ge{constructor(){super(),this.set({style:void 0,text:void 0,id:void 0});const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:e.to("style"),id:e.to("id")},children:[{text:e.to("text")}]})}}class nt extends Ge{children;labelView;iconView;keystrokeView;_focusDelayed=null;constructor(e,t=new rK){super(e);const n=this.bindTemplate,r=rr();this.set("_ariaPressed",!1),this.set("_ariaChecked",!1),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${r}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._setupLabelView(t),this.iconView=new Go,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.iconView.bind("content").to(this,"icon"),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const s={tag:"button",attributes:{class:["ck","ck-button",n.to("class"),n.if("isEnabled","ck-disabled",o=>!o),n.if("isVisible","ck-hidden",o=>!o),n.to("isOn",o=>o?"ck-on":"ck-off"),n.if("withText","ck-button_with-text"),n.if("withKeystroke","ck-button_with-keystroke")],role:n.to("role"),type:n.to("type",o=>o||"button"),tabindex:n.to("tabindex"),"aria-checked":n.to("_ariaChecked"),"aria-pressed":n.to("_ariaPressed"),"aria-label":n.to("ariaLabel"),"aria-labelledby":n.to("ariaLabelledBy"),"aria-disabled":n.if("isEnabled",!0,o=>!o),"data-cke-tooltip-text":n.to("_tooltipString"),"data-cke-tooltip-position":n.to("tooltipPosition")},children:this.children,on:{click:n.to(o=>{this.isEnabled?this.fire("execute"):o.preventDefault()})}};this.bind("_ariaPressed").to(this,"isOn",this,"isToggleable",this,"role",(o,a,l)=>!a||w7(l)?!1:String(!!o)),this.bind("_ariaChecked").to(this,"isOn",this,"isToggleable",this,"role",(o,a,l)=>!a||!w7(l)?!1:String(!!o)),ot.isSafari&&(this._focusDelayed||(this._focusDelayed=U3(()=>
40this.focus(),0)),s.on.mousedown=n.to(()=>{this._focusDelayed()}),s.on.mouseup=n.to(()=>{this._focusDelayed.cancel()})),this.setTemplate(s)}render(){super.render(),this.icon&&this.children.add(this.iconView),this.on("change:icon",(e,t,n,r)=>{n&&!r?this.children.add(this.iconView,0):!n&&r&&this.children.remove(this.iconView)}),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_setupLabelView(e){return e.bind("text","style","id").to(this,"label","labelStyle","ariaLabelledBy"),e}_createKeystrokeView(){const e=new Ge;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",t=>qw(t))}]}),e}_getTooltipString(e,t,n){return e?typeof e=="string"?e:(n&&(n=qw(n)),e instanceof Function?e(t,n):`${t}${n?` (${n})`:""}`):""}}function w7(i){switch(i){case"radio":case"checkbox":case"option":case"switch":case"menuitemcheckbox":case"menuitemradio":return!0;default:return!1}}class Wl extends Ge{children;iconView;constructor(e,t={}){super(e);const n=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",n.to("class")]},children:this.children}),t.icon&&(this.iconView=new Go,this.iconView.content=t.icon,this.children.add(this.iconView));const r=new Ge(e);r.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"],role:"presentation"},children:[{text:n.to("label")}]}),this.children.add(r)}}class or extends Sn(){focusables;focusTracker;keystrokeHandler;actions;constructor(e){if(super(),this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const t in e.actions){let n=e.actions[t];typeof n=="string"&&(n=[n]);for(const r of n)e.keystrokeHandler.set(r,(s,o)=>{this[t](),o()},e.keystrokeHandlerOptions)}this.on("forwardCycle",()=>this.focusFirst(),{priority:"low"}),this.on("backwardCycle",()=>this.focusLast(),{priority:"low"})}get first(){return this.focusables.find(VE)||null}get last(){return this.focusables.filter(VE).slice(-1)[0]||null}get next(){return this._getDomFocusableItem(1)}get previous(){return this._getDomFocusableItem(-1)}get current(){let e=null;return this.focusTracker.focusedElement===null?null:(this.focusables.find((t,n)=>{const r=t.element===this.focusTracker.focusedElement;return r&&(e=n),r}),e)}focusFirst(){this._focus(this.first,1)}focusLast(){this._focus(this.last,-1)}focusNext(){const e=this.next;if(e&&this.focusables.getIndex(e)===this.current){this.fire("forwardCycle");return}e===this.first?this.fire("forwardCycle"):this._focus(e,1)}focusPrevious(){const e=this.previous;if(e&&this.focusables.getIndex(e)===this.current){this.fire("backwardCycle");return}e===this.last?this.fire("backwardCycle"):this._focus(e,-1)}chain(e){const t=()=>this.current===null?null:this.focusables.get(this.current);this.listenTo(e,"forwardCycle",n=>{const r=t();this.focusNext(),r!==t()&&n.stop()},{priority:"low"}),this.listenTo(e,"backwardCycle",n=>{const r=t();this.focusPrevious(),r!==t()&&n.stop()},{priority:"low"})}unchain(e){this.stopListening(e)}_focus(e,t){e&&this.focusTracker.focusedElement!==e.element&&e.focus(t)}_getDomFocusableItem(e){const t=this.focusables.length;if(!t)return null;const n=this.current;if(n===null)return this[e===1?"first":"last"];let r=this.focusables.get(n),s=(n+t+e)%t;do{const o=this.focusables.get(s);if(VE(o)){r=o;break}s=(s+t+e)%t}while(s!==n);return r}}function VE(i){return T0(i)&&Aa(i.element)}function T0(i){return"focus"in i&&typeof i.focus=="function"}function lke(i){return T0(i)&&"focusCycler"in i&&i.focusCycler instanceof or}class cke extends Ge{children;keystrokes;focusCycler;_focusTracker;_focusables;constructor(e){super(e),this.children=this.createCollection(),this.keystrokes=new qn,this._focusTracker=new Fn,this._focusables=new qi,this.focusCycler=new or({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__actions"]},children:this.children})}render(){super.render(),this.keystrokes.listenTo(this.element)}setButtons(e){for(const t of e){const n=new nt(this.locale);let r;n.on("execute",()=>t.onExecute()),t.onCreate&&t.onCreate(n);for(r in t)r!="onExecute"&&r!="onCreate"&&n.set(r,t[r]);this.children.add(n)}this._updateFocusCyclableItems()}focus(e){e===-1?this.focusCycler.focusLast():this.focusCycler.focusFirst()}
40_updateFocusCyclableItems(){Array.from(this.children).forEach(e=>{this._focusables.add(e),this._focusTracker.add(e.element)})}}class uke extends Ge{children;constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__content"]},children:this.children})}reset(){for(;this.children.length;)this.children.remove(0)}}const Ds={SCREEN_CENTER:"screen-center",EDITOR_CENTER:"editor-center",EDITOR_TOP_SIDE:"editor-top-side",EDITOR_TOP_CENTER:"editor-top-center",EDITOR_BOTTOM_CENTER:"editor-bottom-center",EDITOR_ABOVE_CENTER:"editor-above-center",EDITOR_BELOW_CENTER:"editor-below-center"},x7=nm("px");class zg extends rke(Ge){parts;headerView;closeButtonView;actionsView;static defaultOffset=15;contentView;keystrokes;focusTracker;wasMoved=!1;_getCurrentDomRoot;_getViewportOffset;_focusables;_focusCycler;constructor(e,{getCurrentDomRoot:t,getViewportOffset:n,keystrokeHandlerOptions:r}){super(e);const s=this.bindTemplate,o=e.t;this.set("className",""),this.set("ariaLabel",o("Editor dialog")),this.set("isModal",!1),this.set("position",Ds.SCREEN_CENTER),this.set("_isVisible",!1),this.set("_isTransparent",!1),this.set("_top",0),this.set("_left",0),this._getCurrentDomRoot=t,this._getViewportOffset=n,this.decorate("moveTo"),this.parts=this.createCollection(),this.keystrokes=new qn,this.focusTracker=new Fn,this._focusables=new qi,this._focusCycler=new or({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"},keystrokeHandlerOptions:r}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog-overlay",s.if("isModal","ck-dialog-overlay__transparent",a=>!a),s.if("_isVisible","ck-hidden",a=>!a)],tabindex:"-1"},children:[{tag:"div",attributes:{tabindex:"-1",class:["ck","ck-dialog",s.if("isModal","ck-dialog_modal"),s.to("className")],role:"dialog","aria-label":s.to("ariaLabel"),style:{top:s.to("_top",a=>x7(a)),left:s.to("_left",a=>x7(a)),visibility:s.if("_isTransparent","hidden")}},children:this.parts}]})}render(){super.render(),this.keystrokes.set("Esc",(e,t)=>{e.defaultPrevented||(this.fire("close",{source:"escKeyPress"}),t())}),this.on("drag",(e,{deltaX:t,deltaY:n})=>{this.wasMoved=!0,this.moveBy(t,n)}),this.listenTo($e.window,"resize",()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()}),this.listenTo($e.document,"scroll",()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()}),this.on("change:_isVisible",(e,t,n)=>{n&&(this._isTransparent=!0,setTimeout(()=>{this.updatePosition(),this._isTransparent=!1,this.focus()},10))}),this.keystrokes.listenTo(this.element)}get dragHandleElement(){return this.headerView&&!this.isModal?this.headerView.element:null}setupParts({icon:e,title:t,hasCloseButton:n=!0,content:r,actionButtons:s}){t&&(this.headerView=new Wl(this.locale,{icon:e}),n&&(this.closeButtonView=this._createCloseButton(),this.headerView.children.add(this.closeButtonView)),this.headerView.label=t,this.ariaLabel=t,this.parts.add(this.headerView,0)),r&&(r instanceof Ge&&(r=[r]),this.contentView=new uke(this.locale),this.contentView.children.addMany(r),this.parts.add(this.contentView)),s&&(this.actionsView=new cke(this.locale),this.actionsView.setButtons(s),this.parts.add(this.actionsView)),this._updateFocusCyclableItems()}focus(){this._focusCycler.focusFirst()}moveTo(e,t){const n=this._getViewportRect(),r=this._getDialogRect();e+r.width>n.right&&(e=n.right-r.width),e<n.left&&(e=n.left),t<n.top&&(t=n.top),this._moveTo(e,t)}_moveTo(e,t){this._left=e,this._top=t}moveBy(e,t){this.moveTo(this._left+e,this._top+t)}_moveOffScreen(){this._moveTo(-9999,-9999)}updatePosition(){if(!this.element||!this.element.parentNode)return;const e=this._getViewportRect();let t=this.position,n;this._getCurrentDomRoot()?n=this._getVisibleDomRootRect(e):t=Ds.SCREEN_CENTER;const r=zg.defaultOffset,s=this._getDialogRect();if(this.position!=null){if(typeof this.position=="function"){const o=this.position(s,n);if(o==null){this._moveOffScreen();return}this._moveTo(o.left,o.top);return}
40switch(t){case Ds.EDITOR_TOP_SIDE:{if(n){const o=this.locale.contentLanguageDirection==="ltr"?n.right-s.width-r:n.left+r;this.moveTo(o,n.top+r)}else this._moveOffScreen();break}case Ds.EDITOR_CENTER:{n?this.moveTo(Math.round(n.left+n.width/2-s.width/2),Math.round(n.top+n.height/2-s.height/2)):this._moveOffScreen();break}case Ds.SCREEN_CENTER:{this.moveTo(Math.round((e.width-s.width)/2),Math.round((e.height-s.height)/2));break}case Ds.EDITOR_TOP_CENTER:{n?this.moveTo(Math.round(n.left+n.width/2-s.width/2),n.top+r):this._moveOffScreen();break}case Ds.EDITOR_BOTTOM_CENTER:{n?this.moveTo(Math.round(n.left+n.width/2-s.width/2),n.bottom-s.height-r):this._moveOffScreen();break}case Ds.EDITOR_ABOVE_CENTER:{n?this.moveTo(Math.round(n.left+n.width/2-s.width/2),n.top-s.height-r):this._moveOffScreen();break}case Ds.EDITOR_BELOW_CENTER:{n?this.moveTo(Math.round(n.left+n.width/2-s.width/2),n.bottom+r):this._moveOffScreen();break}}}}_getVisibleDomRootRect(e){let t=new gt(this._getCurrentDomRoot()).getVisible();if(t){if(t=e.getIntersection(t),!t)return null}else return null;return t}_getDialogRect(){return new gt(this.element.firstElementChild)}_getViewportRect(){const e=new gt($e.window);return this.isModal?e:IG(this._getViewportOffset())}_updateFocusCyclableItems(){const e=[];if(this.contentView)for(const t of this.contentView.children)T0(t)&&e.push(t);this.actionsView&&e.push(this.actionsView),this.closeButtonView&&e.push(this.closeButtonView),e.forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element),lke(t)&&this._focusCycler.chain(t.focusCycler)})}_createCloseButton(){const e=new nt(this.locale),t=this.locale.t;return e.set({label:t("Close"),tooltip:!0,icon:D_}),e.on("execute",()=>this.fire("close",{source:"closeButton"})),e}}class As extends be{view;static _visibleDialogPlugin;_onHide;static get pluginName(){return"Dialog"}static get isOfficialPlugin(){return!0}constructor(e){super(e);const t=e.t;this._initShowHideListeners(),this._initFocusToggler(),this._initMultiRootIntegration(),this.set({id:null,isOpen:!1}),e.accessibility.addKeystrokeInfos({categoryId:"navigation",keystrokes:[{label:t("Move focus in and out of an active dialog window"),keystroke:"Ctrl+F6",mayRequireFn:!0}]})}destroy(){super.destroy(),As._visibleDialogPlugin===this&&this._unlockBodyScroll()}_initShowHideListeners(){this.on("show",(e,t)=>{this._show(t)}),this.on("show",(e,t)=>{t.onShow&&t.onShow(this)},{priority:"low"}),this.on("hide",()=>{As._visibleDialogPlugin&&As._visibleDialogPlugin._hide()}),this.on("hide",()=>{this._onHide&&(this._onHide(this),this._onHide=void 0)},{priority:"low"})}_initFocusToggler(){const e=this.editor;e.keystrokes.set("Ctrl+F6",(t,n)=>{!this.isOpen||this.view.isModal||(this.view.focusTracker.isFocused?e.editing.view.focus():this.view.focus(),n())})}_initMultiRootIntegration(){const e=this.editor.model;e.document.on("change:data",()=>{if(!this.view)return;const t=e.document.differ.getChangedRoots();for(const n of t)n.state&&this.view.updatePosition()})}show(e){this.hide(),this.fire(`show:${e.id}`,e)}_show({id:e,icon:t,title:n,hasCloseButton:r=!0,content:s,actionButtons:o,className:a,isModal:l,position:c,onHide:d,keystrokeHandlerOptions:f}){const m=this.editor;this.view=new zg(m.locale,{getCurrentDomRoot:()=>m.editing.view.getDomRoot(m.model.document.selection.anchor.root.rootName),getViewportOffset:()=>m.ui.viewportOffset,keystrokeHandlerOptions:f});const p=this.view;p.on("close",()=>{this.hide()}),m.ui.view.body.add(p),m.keystrokes.listenTo(p.element),c||(c=l?Ds.SCREEN_CENTER:Ds.EDITOR_CENTER),l&&this._lockBodyScroll(),p.set({position:c,_isVisible:!0,className:a,isModal:l}),p.setupParts({icon:t,title:n,hasCloseButton:r,content:s,actionButtons:o}),this.id=e,d&&(this._onHide=d),this.isOpen=!0,As._visibleDialogPlugin=this}hide(){As._visibleDialogPlugin&&As._visibleDialogPlugin.fire(`hide:${As._visibleDialogPlugin.id}`)}_hide(){if(!this.view)return;const e=this.editor,t=this.view;t.isModal&&this._unlockBodyScroll(),t.contentView&&t.contentView.reset(),e.ui.view.body.remove(t),e.ui.focusTracker.remove(t.element),e.keystrokes.stopListening(t.element),t.destroy(),e.editing.view.focus(),this.id=null,this.isOpen=!1,As._visibleDialogPlugin=null}_lockBodyScroll(){document.documentElement.classList.add("ck-dialog-scroll-locked")}_unlockBodyScroll(){document.documentElement.classList.remove("ck-dialog-scroll-locked")}}class im extends nt{_checkIconHolderView=new dke;
40constructor(e,t=new rK){super(e,t),this.set({hasCheckSpace:!1,_hasCheck:this.isToggleable});const n=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-list-item-button",n.if("isToggleable","ck-list-item-button_toggleable")]}}),this.bind("_hasCheck").to(this,"hasCheckSpace",this,"isToggleable",(r,s)=>r||s)}render(){super.render(),this._hasCheck&&this.children.add(this._checkIconHolderView,0),this._watchCheckIconHolderMount()}_watchCheckIconHolderMount(){this._checkIconHolderView.bind("isOn").to(this,"isOn",e=>this.isToggleable&&e),this.on("change:_hasCheck",(e,t,n)=>{const{children:r,_checkIconHolderView:s}=this;n?r.add(s,0):r.remove(s)})}}class dke extends Ge{children;_checkIconView=this._createCheckIconView();constructor(){super();const e=this.bindTemplate;this.children=this.createCollection(),this.set("isOn",!1),this.setTemplate({tag:"span",children:this.children,attributes:{class:["ck","ck-list-item-button__check-holder",e.to("isOn",t=>t?"ck-on":"ck-off")]}})}render(){super.render(),this.isOn&&this.children.add(this._checkIconView,0),this._watchCheckIconMount()}_watchCheckIconMount(){this.on("change:isOn",(e,t,n)=>{const{children:r,_checkIconView:s}=this;n&&!r.has(s)?r.add(s):!n&&r.has(s)&&r.remove(s)})}_createCheckIconView(){const e=new Go;return e.content=E_,e.extendTemplate({attributes:{class:"ck-list-item-button__check-icon"}}),e}}class gn extends im{constructor(e){super(e),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}class fke extends be{contentView=null;static get requires(){return[As]}static get pluginName(){return"AccessibilityHelp"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t;e.ui.componentFactory.add("accessibilityHelp",()=>{const n=this._createButton(nt);return n.set({tooltip:!0,withText:!1,label:t("Accessibility help")}),n}),e.ui.componentFactory.add("menuBar:accessibilityHelp",()=>{const n=this._createButton(gn);return n.label=t("Accessibility"),n}),e.keystrokes.set("Alt+0",(n,r)=>{this._toggleDialog(),r()}),this._setupRootLabels()}_createButton(e){const t=this.editor,n=t.plugins.get("Dialog"),r=t.locale,s=new e(r);return s.set({keystroke:"Alt+0",icon:YM,isToggleable:!0}),s.on("execute",()=>this._toggleDialog()),s.bind("isOn").to(n,"id",o=>o==="accessibilityHelp"),s}_setupRootLabels(){const e=this.editor,t=e.editing.view,n=e.t;e.ui.on("ready",()=>{t.change(s=>{for(const o of t.document.roots)r(s,o)}),e.on("addRoot",(s,o)=>{const a=e.editing.view.document.getRoot(o.rootName);t.change(l=>r(l,a))},{priority:"low"})});function r(s,o){const l=[o.getAttribute("aria-label"),n("Press %0 for help.",[qw("Alt+0")])].filter(c=>c).join(". ");s.setAttribute("aria-label",l,o)}}_toggleDialog(){const e=this.editor,t=e.plugins.get("Dialog"),n=e.locale.t;this.contentView||(this.contentView=new ske(e.locale,e.accessibility.keystrokeInfos)),t.id==="accessibilityHelp"?t.hide():t.show({id:"accessibilityHelp",className:"ck-accessibility-help-dialog",title:n("Accessibility help"),icon:YM,hasCloseButton:!0,content:this.contentView})}}class To extends qi{locale;_bodyCollectionContainer;static _bodyWrapper;constructor(e,t=[]){super(t),this.locale=e}get bodyCollectionContainer(){return this._bodyCollectionContainer}attachToDom(){this._bodyCollectionContainer=new as({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection,role:"application"},children:this}).render(),(!To._bodyWrapper||!To._bodyWrapper.isConnected)&&(To._bodyWrapper=Ts(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(To._bodyWrapper)),To._bodyWrapper.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove(),To._bodyWrapper&&!To._bodyWrapper.childElementCount&&(To._bodyWrapper.remove(),delete To._bodyWrapper)}}const _7=nm("px"),hke={top:-99999,left:-99999,name:"arrowless",config:{withArrow:!1}};class Ai extends Ge{content;_pinWhenIsVisibleCallback;_resizeObserver;constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this._resizeObserver=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",n=>`ck-balloon-panel_${n}`),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{to
40p:t.to("top",_7),left:t.to("left",_7)}},children:this.content})}destroy(){this.hide(),super.destroy()}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){const t=C1(e.target);if(t&&!Aa(t))return!1;this.show();const n=Ai.defaultPositions,r=Object.assign({},{element:this.element,positions:[n.southArrowNorth,n.southArrowNorthMiddleWest,n.southArrowNorthMiddleEast,n.southArrowNorthWest,n.southArrowNorthEast,n.northArrowSouth,n.northArrowSouthMiddleWest,n.northArrowSouthMiddleEast,n.northArrowSouthWest,n.northArrowSouthEast,n.viewportStickyNorth],limiter:$e.document.body,fitInViewport:!0},e),s=Ai._getOptimalPosition(r)||hke,o=parseInt(s.left),a=parseInt(s.top),l=s.name,c=s.config||{},{withArrow:d=!0}=c;return this.top=a,this.left=o,this.position=l,this.withArrow=d,!0}pin(e){this.unpin(),this._startPinning(e)&&(this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback))}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){if(!this.attachTo(e))return!1;let t=C1(e.target);const n=e.limiter?C1(e.limiter):$e.document.body;if(this.listenTo($e.document,"scroll",(r,s)=>{const o=s.target,a=t&&o.contains(t),l=n&&o.contains(n);(a||l||!t||!n)&&this.attachTo(e)},{useCapture:!0}),this.listenTo($e.window,"resize",()=>{this.attachTo(e)}),!this._resizeObserver&&(t&&Hn(t)&&(t=t.parentElement),t)){const r=()=>{Aa(t)||this.unpin()};this._resizeObserver=new B3(t,r)}return!0}_stopPinning(){this.stopListening($e.document,"scroll"),this.stopListening($e.window,"resize"),this._resizeObserver&&(this._resizeObserver.destroy(),this._resizeObserver=null)}static generatePositions(e={}){const{sideOffset:t=Ai.arrowSideOffset,heightOffset:n=Ai.arrowHeightOffset,stickyVerticalOffset:r=Ai.stickyVerticalOffset,config:s}=e;return{northWestArrowSouthWest:(l,c)=>({top:o(l,c),left:l.left-t,name:"arrow_sw",...s&&{config:s}}),northWestArrowSouthMiddleWest:(l,c)=>({top:o(l,c),left:l.left-c.width*.25-t,name:"arrow_smw",...s&&{config:s}}),northWestArrowSouth:(l,c)=>({top:o(l,c),left:l.left-c.width/2,name:"arrow_s",...s&&{config:s}}),northWestArrowSouthMiddleEast:(l,c)=>({top:o(l,c),left:l.left-c.width*.75+t,name:"arrow_sme",...s&&{config:s}}),northWestArrowSouthEast:(l,c)=>({top:o(l,c),left:l.left-c.width+t,name:"arrow_se",...s&&{config:s}}),northArrowSouthWest:(l,c)=>({top:o(l,c),left:l.left+l.width/2-t,name:"arrow_sw",...s&&{config:s}}),northArrowSouthMiddleWest:(l,c)=>({top:o(l,c),left:l.left+l.width/2-c.width*.25-t,name:"arrow_smw",...s&&{config:s}}),northArrowSouth:(l,c)=>({top:o(l,c),left:l.left+l.width/2-c.width/2,name:"arrow_s",...s&&{config:s}}),northArrowSouthMiddleEast:(l,c)=>({top:o(l,c),left:l.left+l.width/2-c.width*.75+t,name:"arrow_sme",...s&&{config:s}}),northArrowSouthEast:(l,c)=>({top:o(l,c),left:l.left+l.width/2-c.width+t,name:"arrow_se",...s&&{config:s}}),northEastArrowSouthWest:(l,c)=>({top:o(l,c),left:l.right-t,name:"arrow_sw",...s&&{config:s}}),northEastArrowSouthMiddleWest:(l,c)=>({top:o(l,c),left:l.right-c.width*.25-t,name:"arrow_smw",...s&&{config:s}}),northEastArrowSouth:(l,c)=>({top:o(l,c),left:l.right-c.width/2,name:"arrow_s",...s&&{config:s}}),northEastArrowSouthMiddleEast:(l,c)=>({top:o(l,c),left:l.right-c.width*.75+t,name:"arrow_sme",...s&&{config:s}}),northEastArrowSouthEast:(l,c)=>({top:o(l,c),left:l.right-c.width+t,name:"arrow_se",...s&&{config:s}}),southWestArrowNorthWest:l=>({top:a(l),left:l.left-t,name:"arrow_nw",...s&&{config:s}}),southWestArrowNorthMiddleWest:(l,c)=>({top:a(l),left:l.left-c.width*.25-t,name:"arrow_nmw",...s&&{config:s}}),southWestArrowNorth:(l,c)=>({top:a(l),left:l.left-c.width/2,name:"arrow_n",...s&&{config:s}}),southWestArrowNorthMiddleEast:(l,c)=>({top:a(l),left:l.left-c.width*.75+t,name:"arrow_nme",...s&&{config:s}}),southWestArrowNorthEast:(l,c)=>({top:a(l),left:l.left-c.width+t,name:"arrow_ne",...s&&{config:s}}),southArrowNorthWest:l=>({top:a(l),left:l.left+l.width/2-t,name:"arrow_nw",...s&&{config:s}}),southArrowNorthMiddleWest:(l,c)=>({top:a(l),left:l.left+l.width/2-c.width*.25-t,name:"arrow_nmw",...s&&{config:s}}),southArrowNorth:(l,c)=>({top:a(l),left:l.left+l.width/2-c.width/2,name:"arrow_n",...s&&{config:s}}),southArrowNorthMiddleEast:(l,c)=>({top:a(l),left:l.left+l.width/2-c.width*.75+t,name:"arrow_nme",...s&&{config:s}}),southArrowNorthEast:(l,c)=>({top:a(l),left:l.left+l.width/2-c.width+t,name:"arrow_ne",...s&&{config:s}}),southEastArrowNorthWest:l=>({top:a(l),left:l.right-t,name:"arrow_nw",...s&&{config:s}}),southEastArrowNorthMiddleWest:(l,c)=>({top:a(l),left:l.right-c.width*.25-t,name:"arrow_nmw",...s&&{config:s}}),southEastArrowNorth:(l,c)=>({top:a(l),left:l.right-c.width/2,name:"arrow_n",...s&&{config:s}}),southEastArrowNorthMiddleEast:(l,c)=>({top:a(l),left:l.right-c.width*.75+t,name:"arrow_nme",...s&&{config:s}}),southEastArrowNorthEast:(l,c)=>({top:a(l),left:l.right-c.width+t,name:"arrow_ne",...s&&{config:s}}),westArrowEast:(l,c)=>({top:l.top+l.height/2-c.height/2,left:l.left-c.width-n,name:"arrow_e",...s&&{config:s}}),eastArrowWest:(l,c)=>({top:l.top+l.height/2-c.height/2,left:l.right+n,name:"arrow_w",...s&&{config:s}}),viewportStickyNorth:(l,c,d)=>{const f=new gt($e.document.body).getIntersection(d.getVisible());if(!f)return null;const m=f.getVisible();return!l.getIntersection(m)||!(m.top-l.top-r<c.height&&m.bottom-l.bottom<c.height)?null:{top:m.top+r,left:l.left+l.width/2-c.width/2,name:"arrowless",config:{withArrow:!1,...s}}}};function o(l,c){return l.top-c.height-n}function a(l){return l.bottom+n}}static arrowSideOffset=25;static arrowHeightOffset=10;static stickyVerticalOffset=20;static _getOptimalPosition=M3;static defaultPositions=Ai.generatePositions()}function C1(i){return Uc(i)?i:y_(i)?i.commonAncestorContainer:typeof i=="function"?C1(i()):null}const mke=50,pke=350;class sK extends ds(){editor;_balloonView=null;_showBalloonThrottled=Oh(()=>this._showBalloon(),50,{leading:!0});_lastFocusedEditableElement=null;_balloonClass;constructor(e,t={}){super(),this.editor=e,this._balloonClass=t.balloonClass,e.on("ready",()=>this._handleEditorReady())}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;this._isEnabled()&&e.ui.view&&(e.ui.focusTracker.on("change:isFocused",(t,n,r)=>{this._updateLastFocusedEditableElement(),r?this._showBalloon():this._hideBalloon()}),e.ui.focusTracker.on("change:focusedElement",(t,n,r)=>{this._updateLastFocusedEditableElement(),r&&this._showBalloon()}),e.ui.on("update",()=>{this._showBalloonThrottled()}))}_getNormalizedConfig(){return{side:this.editor.locale.contentLanguageDirection==="ltr"?"right":"left",position:"border",verticalOffset:0,horizontalOffset:5}}_showBalloon(){const e=this._getBalloonAttachOptions();e&&(this._balloonView||(this._balloonView=this._createBalloonView()),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_createBalloonView(){const e=this.editor,t=new Ai,n=this._createBadgeContent();return t.content.add(n),this._balloonClass&&(t.class=this._balloonClass),e.ui.view.body.add(t),t}_getBalloonAttachOptions(){if(!this._lastFocusedEditableElement)return null;const e=this._getNormalizedConfig(),t=e.side==="right"?gke(this._lastFocusedEditableElement,e):bke(this._lastFocusedEditableElement,e);return{target:this._lastFocusedEditableElement,positions:[t]}}_updateLastFocusedEditableElement(){const e=this.editor,t=e.ui.focusTracker.isFocused,n=e.ui.focusTracker.focusedElement;if(!t||!n){this._lastFocusedEditableElement=null;return}const r=Array.from(e.ui.getEditableElementsNames()).map(s=>e.ui.getEditableElement(s));r.includes(n)?this._lastFocusedEditableElement=n:this._lastFocusedEditableElement=r[0]}}function gke(i,e){return oK(i,e,(t,n)=>t.left+t.width-n.width-e.horizontalOffset)}function bke(i,e){return oK(i,e,t=>t.left+e.horizontalOffset)}function oK(i,e,t){return(n,r)=>{const s=new gt(i);if(s.width<pke||s.height<mke)return null;let o;e.position==="inside"?o=s.bottom-r.height:o=s.bottom-r.height/2,o-=e.verticalOffset;const a=t(s,r),c=n.clone().moveTo(a,o).getIntersection(r.clone().moveTo(a,o)).getVisible();return!c||c.getArea()<r.getArea()?null:{top:o,left:a,name:`position_${e.position}-side_${e.side}`,config:{withArrow:!1}
40}}}const yke="Powered by";class vke extends sK{constructor(e){super(e,{balloonClass:"ck-powered-by-balloon"})}_isEnabled(){const e=this.editor;if(e.config.get("ui.poweredBy.forceVisible"))return!0;const n=e.config.get("licenseKey");if(n=="GPL")return!0;const r=V3(n.split(".")[1]);return r?!r.whiteLabel:!0}_createBadgeContent(){return new wke(this.editor.locale,this._getNormalizedConfig().label)}_getNormalizedConfig(){const e=super._getNormalizedConfig(),t=this.editor.config.get("ui.poweredBy")||{},n=t.position||e.position,r=n==="inside"?5:e.verticalOffset;return{position:n,side:t.side||e.side,label:t.label===void 0?yke:t.label,verticalOffset:t.verticalOffset!==void 0?t.verticalOffset:r,horizontalOffset:t.horizontalOffset!==void 0?t.horizontalOffset:e.horizontalOffset,forceVisible:!!t.forceVisible}}}class wke extends Ge{constructor(e,t){super(e);const n=new Go,r=this.bindTemplate;n.set({content:QTe,isColorInherited:!1}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/powered-by-ckeditor/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...t?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[t]}]:[],n],on:{dragstart:r.to(s=>s.preventDefault())}}]})}}class Lh extends nt{toggleSwitchView;constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new Ge;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}class C7 extends aK(nt){}class xke extends aK(im){}function aK(i){class e extends i{_fileInputView;constructor(...n){super(...n),this._fileInputView=new _ke(this.locale),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.on("execute",()=>{this._fileInputView.open()}),this.extendTemplate({attributes:{class:"ck-file-dialog-button"}})}render(){super.render(),this.children.add(this._fileInputView)}}return e}class _ke extends Ge{constructor(e){super(e),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to(()=>{this.element?.files?.length&&this.fire("done",this.element.files),this.element.value=""})}})}open(){this.element.click()}}class lK extends Ge{buttonView;children;constructor(e,t){super(e);const n=this.bindTemplate;this.set("isCollapsed",!1),this.set("label",""),this.buttonView=this._createButtonView(),this.children=this.createCollection(),this.set("_collapsibleAriaLabelUid",void 0),t&&this.children.addMany(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-collapsible",n.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:n.if("isCollapsed","hidden"),"aria-labelledby":n.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.id}focus(){this.buttonView.focus()}_createButtonView(){const e=new nt(this.locale),t=e.bindTemplate;return e.set({withText:!0,icon:T_}),e.extendTemplate({attributes:{"aria-expanded":t.to("isOn",n=>String(n))}}),e.bind("label").to(this),e.bind("isOn").to(this,"isCollapsed",n=>!n),e.on("execute",()=>{this.isCollapsed=!this.isCollapsed}),e}}function Wg(i,e){const t=i.t,n={Black:t("Black"),"Dim grey":t("Dim grey"),Grey:t("Grey"),"Light grey":t("Light grey"),White:t("White"),Red:t("Red"),Orange:t("Orange"),Yellow:t("Yellow"),"Light green":t("Light green"),Green:t("Green"),Aquamarine:t("Aquamarine"),Turquoise:t("Turquoise"),"Light blue":t("Light blue"),Blue:t("Blue"),Purple:t("Purple")};return e.map(r=>{const s=n[r.label];return s&&s!=r.label&&(r.label=s),r})}function Hg(i){return i.map(Cke).filter(e=>!!e)}function Cke(i){return typeof i=="string"?{model:i,label:i,hasBorder:!1,view:{name:"span",styles:{color:i}}}:{model:i.color,label:i.label||i.color,hasBorder:i.hasBorder===void 0?!1:i.hasBorder,view:{name:"span",styles:{color:`${i.color}`}}}}class cK extends nt{constructor(e){super(e);const t=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon=DTe,this.extendTemplate({attributes:{style:{backgroundColor:t.to("color",n=>ot.isMediaForcedColors?null:n)},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-selector__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}class D7 extends Ge{columns;items;focusTracker;keystrokes;constructor(e,t){super(e);const n=t&&t.colorDefinitions?t.colorDefinitions:[];this.columns=t?.columns||5;const r={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new Fn,this.keystrokes=new qn,this.items.on("add",(s,o)=>{o.isOn=o.color===this.selectedColor}
40),n.forEach(s=>{const o=new cK;o.set({color:s.color,label:s.label,tooltip:!0,hasBorder:s.options.hasBorder}),o.on("execute",()=>{this.fire("execute",{value:s.color,hasBorder:s.options.hasBorder,label:s.label})}),this.items.add(o)}),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:r}}),this.on("change:selectedColor",(s,o,a)=>{for(const l of this.items)l.isOn=l.color===a})}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element),c4({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns,uiLanguageDirection:this.locale?.uiLanguageDirection})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}function uK(i,e){if(!i)return"";const t=dK(i);if(!t)return"";if(t.space===e)return i;if(!Ake(t))return"";const r=ju[t.space][e];if(!r)return"";const s=r(t.space==="hex"?t.hexValue:t.values);return Tke(s,e)}function Dke(i){if(!i)return"";const e=dK(i);return e?e.space==="hex"?e.hexValue:uK(i,"hex"):"#000"}function Eke(i,e){customElements.get(i)===void 0&&customElements.define(i,e)}function Tke(i,e){switch(e){case"hex":return`#${i}`;case"rgb":return`rgb(${i[0]}, ${i[1]}, ${i[2]})`;case"hsl":return`hsl(${i[0]}, ${i[1]}%, ${i[2]}%)`;case"hwb":return`hwb(${i[0]}, ${i[1]}, ${i[2]})`;case"lab":return`lab(${i[0]}% ${i[1]} ${i[2]})`;case"lch":return`lch(${i[0]}% ${i[1]} ${i[2]})`;default:return""}}function dK(i){if(i.startsWith("#")){const t=o7(i);return{space:"hex",values:t.values,hexValue:i,alpha:t.alpha}}const e=o7(i);return e.space?e:null}function Ake(i){return Object.keys(ju).includes(i.space)}class hi extends Ge{fieldView;labelView;statusView;fieldWrapperChildren;constructor(e,t){super(e);const n=`ck-labeled-field-view-${rr()}`,r=`ck-labeled-field-view-status-${rr()}`;this.fieldView=t(this,n,r),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(n),this.statusView=this._createStatusView(r),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",(o,a)=>o||a);const s=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",s.to("class"),s.if("isEnabled","ck-disabled",o=>!o),s.if("isEmpty","ck-labeled-field-view_empty"),s.if("isFocused","ck-labeled-field-view_focused"),s.if("placeholder","ck-labeled-field-view_placeholder"),s.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const t=new oo(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new Ge(this.locale),n=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",n.if("errorText","ck-labeled-field-view__status_error"),n.if("_statusText","ck-hidden",r=>!r)],id:e,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),t}focus(e){this.fieldView.focus(e)}}class kke extends Ge{focusTracker;constructor(e){super(e),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("tabIndex",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.set("ariaLabel",void 0),this.focusTracker=new Fn,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),tabindex:t.to("tabIndex"),readonly:t.to("isReadOnly"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById"),"aria-label":t.to("ariaLabel")},on:{input:t.to((...n)=>{this.fire("input",...n),this._updateIsEmpty()}),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",(e,t,n)=>{this._setDomElementValue(n),this._updateIsEmpty()})}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}reset(){this.value=this.element.value="",this._updateIsEmpty()}_updateIsEmpty(){this.isEmpty=Ske(this.element)}_setDomElementValue(e){this.element.value=!e&&e!==0?"":e}}function Ske(i){return!i.value}class fK extends kke{constructor(e){super(e),this.set("inputMode","text");const t=this.bindTemplate;this.extendTemplate({attributes:{inputmode:t.to("inputMode")}})}}class hK extends fK{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class Pke extends fK{constructor(e,{min:t,max:n,step:r}={}){super(e);const s=this.bindTemplate;this.set("min",t),this.set("max",n),this.set("step",r),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:s.to("min"),max:s.to("max"),step:s.to("step")}})}}class Ike extends Ge{children;constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",n=>`ck-dropdown__panel_${n}`),t.if("isVisible","ck-dropdown__panel-visible")],tabindex:"-1"},children:this.children,on:{selectstart:t.to(n=>{const r=n.target;r instanceof Element&&r.tagName.toLocaleLowerCase()==="input"||n.preventDefault()})}})}focus(){if(this.children.length){const e=this.children.first;typeof e.focus=="function"?e.focus():Kt("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;typeof e.focusLast=="function"?e.focusLast():e.focus()}}}class qg extends Ge{buttonView;panelView;focusTracker;keystrokes;listView;toolbarView;menuView;constructor(e,t,n){super(e);const r=this.bindTemplate;this.buttonView=t,this.panelView=n,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new qn,this.focusTracker=new Fn,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",r.to("class"),r.if("isEnabled","ck-disabled",s=>!s)],id:r.to("id"),"aria-describedby":r.to("ariaDescribedById")},children:[t,n]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":r.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.on("change:isOpen",(t,n,r)=>{if(r)if(this.panelPosition==="auto"){const s=qg._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=s?s.name:this._defaultPanelPositionName}else this.panelView.position=this.panelPosition}),this.keystrokes.listenTo(this.element);const e=(t,n)=>{this.isOpen&&(this.isOpen=!1,n())};this.keystrokes.set("arrowdown",(t,n)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,n())}),this.keystrokes.set("arrowright",(t,n)=>{this.isOpen&&n()}),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:n,southWest:r,northEast:s,northWest:o,southMiddleEast:a,southMiddleWest:l,northMiddleEast:c,northMiddleWest:d}=qg.defaultPanelPositions;return this.locale.uiLanguageDirection!=="rtl"?[n,r,a,l,e,s,o,c,d,t]:[r,n,l,a,e,o,s,d,c,t]}get _defaultPanelPositionName(){return this.locale.uiLanguageDirection==="rtl"?"sw":"se"}static defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>
40({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)*3/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)*3/4,name:"nmw"})};static _getOptimalPosition=M3}class mK extends nt{arrowView;constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",t=>String(t))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Go;return e.content=T_,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}class ho extends Ge{children;constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",n=>!n)],role:"presentation"},children:this.children})}focus(){this.children.first&&this.children.first.focus()}}class A_ extends Ge{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}class D1 extends Ge{labelView;items;children;constructor(e,t=new oo){super(e);const n=this.bindTemplate,r=new vd(e);this.set({label:"",isVisible:!0}),this.labelView=t,this.labelView.bind("text").to(this,"label"),this.children=this.createCollection(),this.children.addMany([this.labelView,r]),r.set({role:"group",ariaLabelledBy:t.id}),r.focusTracker.destroy(),r.keystrokes.destroy(),this.items=r.items,this.setTemplate({tag:"li",attributes:{role:"presentation",class:["ck","ck-list__group",n.if("isVisible","ck-hidden",s=>!s)]},children:this.children})}focus(){if(this.items){const e=this.items.find(t=>!(t instanceof A_));e&&e.focus()}}}class vd extends Ge{focusables;items;focusTracker;keystrokes;_focusCycler;_listItemGroupToChangeListeners=new WeakMap;constructor(e){super(e);const t=this.bindTemplate;this.focusables=new qi,this.items=this.createCollection(),this.focusTracker=new Fn,this.keystrokes=new qn,this._focusCycler=new or({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:t.to("role"),"aria-label":t.to("ariaLabel"),"aria-labelledby":t.to("ariaLabelledBy")},children:this.items})}render(){super.render();for(const e of this.items)e instanceof D1?this._registerFocusableItemsGroup(e):e instanceof ho&&this._registerFocusableListItem(e);this.items.on("change",(e,t)=>{for(const n of t.removed)n instanceof D1?this._deregisterFocusableItemsGroup(n):n instanceof ho&&this._deregisterFocusableListItem(n);for(const n of Array.from(t.added).reverse())n instanceof D1?this._registerFocusableItemsGroup(n,t.index):this._registerFocusableListItem(n,t.index)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_registerFocusableListItem(e,t){this.focusTracker.add(e.element),this.focusables.add(e,t)}_deregisterFocusableListItem(e){this.focusTracker.remove(e.element),this.focusables.remove(e)}_getOnGroupItemsChangeCallback(e){return(t,n)=>{for(const r of n.removed)this._deregisterFocusableListItem(r);for(const r of Array.from(n.added).reverse())this._registerFocusableListItem(r,this.items.getIndex(e)+n.index)}}_registerFocusableItemsGroup(e,t){Array.from(e.items).forEach((r,s)=>{const o=typeof t<"u"?t+s:void 0;this._registerFocusableListItem(r,o)});const n=this._getOnGroupItemsChangeCallback(e);this._listItemGroupToChangeListeners.set(e,n),e.items.on("change",n)}_deregisterFocusableItemsGroup(e){for(const t of e.items)this._deregisterFocusableListItem(t);e.items.off("change",this._listItemGroupToChangeListeners.get(e)),this._listItemGroupToChangeListeners.delete(e)}}class u4 extends Ge{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class Rke extends Ge{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function Fke(i){return i.bindTemplate.to(e=>{e.target===i.element&&e.preventDefault()})}function pK(i){if(Array.isArray(i))return{items:i,removeItems:[]};const e={items:[],removeItems:[]};return i?{...e,...i}:e}const Oke={alignLeft:i4,bold:WY,importExport:RTe,paragraph:$Te,plus:XTe,text:mAe,threeVerticalDots:s4,pilcrow:KTe,dragIndicator:TTe};class ud extends Ge{options;items;focusTracker;keystrokes;itemsView;children;focusables;_focusCycler;_behavior;constructor(e,t){super(e);const n=this.bindTemplate,r=this.t;this.options=t||{},this.set("ariaLabel",r("Editor toolbar")),this.set("maxWidth","auto"),this.set("role","toolbar"),this.set("isGrouping",!!this.options.shouldGroupWhenFull),this.items=this.createCollection(),this.focusTracker=new Fn,this.keystrokes=new qn,this.set("class",void 0),this.set("isCompact",!1),this.set("isVertical",!1),this.itemsView=new Nke(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const s=e.uiLanguageDirection==="rtl";this._focusCycler=new or({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[s?"arrowright":"arrowleft","arrowup"],focusNext:[s?"arrowleft":"arrowright","arrowdown"]}});const o=["ck","ck-toolbar",n.to("class"),n.if("isCompact","ck-toolbar_compact"),n.if("isGrouping","ck-toolbar_grouping"),n.if("isVertical","ck-toolbar_vertical")];this.options.shouldGroupWhenFull&&this.options.isFloating&&o.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:o,role:n.to("role"),"aria-label":n.to("ariaLabel"),style:{maxWidth:n.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:Fke(this)}}),this._behavior=this.options.shouldGroupWhenFull?new T7(this):new E7(this)}render(){super.render(),this.focusTracker.add(this.element);for(const e of this.items)this.focusTracker.add(e);this.items.on("add",(e,t)=>{this.focusTracker.add(t)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,n){this.items.addMany(this._buildItemsFromConfig(e,t,n))}switchBehavior(e){this._behavior.type!==e&&(this._behavior.destroy(),this.itemsView.children.clear(),this.focusables.clear(),e==="dynamic"?(this._behavior=new T7(this),this._behavior.render(this),this._behavior.refreshItems()):(this._behavior=new E7(this),this._behavior.render(this)))}_buildItemsFromConfig(e,t,n){const r=pK(e),s=n||r.removeItems;return this._cleanItemsConfiguration(r.items,t,s).map(a=>Nr(a)?this._createNestedToolbarDropdown(a,t,s):a==="|"?new u4:a==="-"?new Rke:t.create(a)).filter(a=>!!a)}_cleanItemsConfiguration(e,t,n){const r=e.filter((s,o,a)=>s==="|"?!0:n.indexOf(s)!==-1?!1:s==="-"?this.options.shouldGroupWhenFull?(Kt("toolbarview-line-break-ignored-when-grouping-items",a),!1):!0:!Nr(s)&&!t.has(s)?(Kt("toolbarview-item-unavailable",{item:s}),!1):!0);return this._cleanSeparatorsAndLineBreaks(r)}_cleanSeparatorsAndLineBreaks(e){const t=o=>o!=="-"&&o!=="|",n=e.length,r=e.findIndex(t);if(r===-1)return[];const s=n-e.slice().reverse().findIndex(t);return e.slice(r,s).filter((o,a,l)=>t(o)?!0:!(a>0&&l[a-1]===o))}_createNestedToolbarDropdown(e,t,n){let{label:r,icon:s,items:o,tooltip:a=!0,withText:l=!1}=e;if(o=this._cleanItemsConfiguration(o,t,n),!o.length)return null;const c=this.locale,d=zi(c);return r||Kt("toolbarview-nested-toolbar-dropdown-missing-label",e),d.class="ck-toolbar__nested-toolbar-dropdown",d.buttonView.set({label:r,tooltip:a,withText:!!l}),s!==!1?d.buttonView.icon=Oke[s]||s||s4:d.buttonView.withText=!0,A0(d,()=>d.toolbarView._buildItemsFromConfig(o,t,n)),d}}class Nke extends Ge{children;constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class E7{type="static";constructor(e){e.isGrouping=!1,e.itemsView.children.bindTo(e.items).using(t=>t),e.focusables.bindTo(e.items).using(t=>T0(t)?t:null)}render(){}destroy(){}}class T7{type="dynamic";view;viewChildren;viewFocusables;viewItemsView;viewFocusTracker;viewLocale;ungroupedItems;groupedItems;groupedItemsDropdown;resizeObserver=null;cachedPadding=null;shouldUpdateGroupingOnNextResize=!1;viewElement;constructor(e){this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.view.isGrouping=!0,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),e.itemsView.children.bindTo(this.ungroupedItems).using(t=>t),this.ungroupedItems.on("change",this._updateFocusCyclableItems.bind(this)),e.children.on("change",this._updateFocusCyclableItems.bind(this)),e.items.on("change",(t,n)=>{const r=n.index,s=Array.from(n.added);for(const o of n.removed)r>=this.ungroupedItems.length?this.groupedItems.remove(o):this.ungroupedItems.remove(o);for(let o=r;o<r+s.length;o++){const a=s[o-r];o>this.ungroupedItems.length?this.groupedItems.add(a,o-this.ungroupedItems.length):this.ungroupedItems.add(a,o)}this._updateGrouping()})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.viewChildren.length>1&&(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last)),this.resizeObserver.destroy()}refreshItems(){const e=this.view;if(e.items.length){for(let t=0;t<e.items.length;t++){const n=[...e.items][t];this.ungroupedItems.add(n,t)}this._updateGrouping()}}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!Aa(this.viewElement)){this.shouldUpdateGroupingOnNextResize=!0;return}const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,n=new gt(e.lastChild),r=new gt(e);if(!this.cachedPadding){const s=$e.window.getComputedStyle(e),o=t==="ltr"?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(s[o])}return t==="ltr"?n.right>r.right-this.cachedPadding:n.left<r.left+this.cachedPadding}_enableGroupingOnResize(){let e;this.resizeObserver=new B3(this.viewElement,t=>{(!e||e!==t.contentRect.width||this.shouldUpdateGroupingOnNextResize)&&(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)}),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",()=>{this._updateGrouping()})}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new u4),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,n=zi(e);return n.class="ck-toolbar__grouped-dropdown",n.panelPosition=e.uiLanguageDirection==="ltr"?"sw":"se",A0(n,this.groupedItems),n.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:e.uiLanguageDirection==="rtl"?"se":"sw",icon:s4}),n}_updateFocusCyclableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(e=>{T0(e)&&this.viewFocusables.add(e)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}class rm extends Ge{children;actionView;arrowView;keystrokes;focusTracker;constructor(e,t){super(e);const n=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(t),this.arrowView=this._createArrowView(),this.keystrokes=new qn,this.focusTracker=new Fn,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",n.to("class"),n.if("isVisible","ck-hidden",r=>!r),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())}),this.keystrokes.set("arrowleft",(e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(e){const t=e||new nt;return e||t.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),t.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),t.delegate("execute").to(this),t}_createArrowView(){const e=new nt,t=e.bindTemplate;return e.icon=T_,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",n=>String(n))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}function zi(i,e=mK){const t=typeof e=="function"?new e(i):e,n=new Ike(i),r=new qg(i,t,n);return t.bind("isEnabled").to(r),t instanceof rm?t.arrowView.bind("isOn").to(r,"isOpen"):t.bind("isOn").to(r,"isOpen"),Bke(r),r}function A0(i,e,t={}){i.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),i.isOpen?A7(i,e,t):i.once("change:isOpen",()=>A7(i,e,t),{priority:"highest"}),t.enableActiveItemFocusOnDropdownOpen&&d4(i,()=>i.toolbarView.items.find(n=>n.isOn))}function A7(i,e,t){const n=i.locale,r=n.t,s=i.toolbarView=new ud(n),o=typeof e=="function"?e():e;s.ariaLabel=t.ariaLabel||r("Dropdown toolbar"),t.maxWidth&&(s.maxWidth=t.maxWidth),t.class&&(s.class=t.class),t.isCompact&&(s.isCompact=t.isCompact),t.isVertical&&(s.isVertical=!0),o 
40instanceof qi?s.items.bindTo(o).using(a=>a):s.items.addMany(o),i.panelView.children.add(s),i.focusTracker.add(s),s.items.delegate("execute").to(i)}function Hl(i,e,t={}){i.isOpen?k7(i,e,t):i.once("change:isOpen",()=>k7(i,e,t),{priority:"highest"}),d4(i,()=>i.listView.items.find(n=>n instanceof ho?n.children.first.isOn:!1))}function k7(i,e,t){const n=i.locale,r=i.listView=new vd(n),s=typeof e=="function"?e():e;r.ariaLabel=t.ariaLabel,r.role=t.role,bK(i,r.items,s,n),i.panelView.children.add(r),r.items.delegate("execute").to(i)}function d4(i,e){i.on("change:isOpen",()=>{if(!i.isOpen)return;const t=e();t&&(typeof t.focus=="function"?t.focus():Kt("ui-dropdown-focus-child-on-open-child-missing-focus",{view:t}))},{priority:ns.low-10})}function Bke(i){Mke(i),Lke(i),Uke(i),Vke(i),jke(i),zke(i)}function Mke(i){Kc({emitter:i,activator:()=>i.isRendered&&i.isOpen,callback:()=>{i.isOpen=!1},contextElements:()=>[i.element,...gK(i.focusTracker).filter(e=>!i.element.contains(e))]})}function gK(i){return[...i.elements,...i.externalViews.flatMap(e=>gK(e.focusTracker))]}function Lke(i){i.on("execute",e=>{e.source instanceof Lh||(i.isOpen=!1)})}function Uke(i){i.focusTracker.on("change:isFocused",(e,t,n)=>{n||!i.isOpen||(i.isOpen=!1)})}function Vke(i){i.keystrokes.set("arrowdown",(e,t)=>{i.isOpen&&(i.panelView.focus(),t())}),i.keystrokes.set("arrowup",(e,t)=>{i.isOpen&&(i.panelView.focusLast(),t())})}function jke(i){i.on("change:isOpen",(e,t,n)=>{if(n)return;i.focusTracker.elements.some(s=>s.contains($e.document.activeElement))&&i.buttonView.focus()})}function zke(i){i.on("change:isOpen",(e,t,n)=>{n&&i.panelView.focus()},{priority:"low"})}function bK(i,e,t,n){Wke(e),e.bindTo(t).using(r=>{if(r.type==="separator")return new A_(n);if(r.type==="group"){const s=new D1(n);return s.set({label:r.label}),bK(i,s.items,r.items,n),s.items.delegate("execute").to(i),s}else if(r.type==="button"||r.type==="switchbutton"){const s=r.model.role==="menuitemcheckbox"||r.model.role==="menuitemradio",o=new ho(n);let a;return r.type==="button"?(a=new im(n,r.labelView),a.set({isToggleable:s})):a=new Lh(n),a.bind(...Object.keys(r.model)).to(r.model),a.delegate("execute").to(o),o.children.add(a),o}return null})}function Wke(i){let e=0;const t=s=>!(s instanceof ho)||!(s.children.first instanceof im)?null:s.children.first,n=s=>{const o=t(s);return!o||!o.isToggleable?null:o},r=s=>{for(const o of i){const a=t(o);a&&(a.hasCheckSpace=s)}};i.on("change",(s,o)=>{const a=e>0;for(const c of o.removed)n(c)&&e--;for(const c of o.added){const d=t(c);d&&(d.isToggleable&&e++,d.hasCheckSpace=e>0)}const l=e>0;a!==l&&r(l)})}const Is=(i,e,t)=>{const n=new hK(i.locale);return n.set({id:e,ariaDescribedById:t}),n.bind("isReadOnly").to(i,"isEnabled",r=>!r),n.bind("hasError").to(i,"errorText",r=>!!r),n.on("input",()=>{i.errorText=null}),i.bind("isEmpty","isFocused","placeholder").to(n),n},Hke=(i,e,t)=>{const n=new Pke(i.locale);return n.set({id:e,ariaDescribedById:t,inputMode:"numeric"}),n.bind("isReadOnly").to(i,"isEnabled",r=>!r),n.bind("hasError").to(i,"errorText",r=>!!r),n.on("input",()=>{i.errorText=null}),i.bind("isEmpty","isFocused","placeholder").to(n),n},f4=(i,e,t)=>{const n=zi(i.locale);return n.set({id:e,ariaDescribedById:t}),n.bind("isEnabled").to(i),n},qke=150;class $ke extends Ge{hexInputRow;_debounceColorPickerEvent;_config;constructor(e,t={}){super(e),this.set({color:"",_hexColor:""}),this.hexInputRow=this._createInputRow();const n=this.createCollection();t.hideInput||n.add(this.hexInputRow),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker"],tabindex:-1},children:n}),this._config=t,this._debounceColorPickerEvent=fo(r=>{this.set("color",r),this.fire("colorSelected",{color:this.color})},qke,{leading:!0}),this.on("set:color",(r,s,o)=>{r.return=uK(o,this._config.format||"hsl")}),this.on("change:color",()=>{this._hexColor=jE(this.color)}),this.on("change:_hexColor",()=>{document.activeElement!==this.picker&&this.picker.setAttribute("color",this._hexColor),jE(this.color)!=jE(this._hexColor)&&(this.color=this._hexColor)})}render(){if(super.render(),Eke("hex-color-picker",WAe),this.picker=$e.document.createElement("hex-color-picker"),this.picker.setAttribute("class","hex-color-picker"),this.picker.setAttribute("tabindex","-1"),this._createSlidersView(),this.element){this.hexInputRow.element?this.element.insertBefore(this.picker,this.hexInputRow.element):this.element.appendChild(this.picker);const e=document.createElement("style");e.textContent='[role="slider"]:focus [part$="pointer"] {border: 1px solid #fff;outline: 1px solid var(--ck-color-focus-border);box-shadow: 0 0 0 2px #fff;}',this.picker.shadowRoot.appendChild(e)}this.picker.addEventListener("color-changed",e=>{const t=e.detail.value;this._debounceColorPickerEvent(t)})}focus(){!this._config.hideInput&&(ot.isGecko||ot.isiOS||ot.isSafari||ot.isBlink)&&this.hexInputRow.children.get(1).focus(),this.slidersView.first.focus()}_createSlidersView(){const n=[...this.picker.shadowRoot.children].filter(r=>r.getAttribute("role")==="slider").map(r=>new Gke(r));
40this.slidersView=this.createCollection(),n.forEach(r=>{this.slidersView.add(r)})}_createInputRow(){const e=this._createColorInput();return new Kke(this.locale,e)}_createColorInput(){const e=new hi(this.locale,Is),{t}=this.locale;return e.set({label:t("HEX"),class:"color-picker-hex-input"}),e.fieldView.bind("value").to(this,"_hexColor",n=>e.isFocused?e.fieldView.value:n.startsWith("#")?n.substring(1):n),e.fieldView.on("input",()=>{const n=e.fieldView.element.value;if(n){const r=yK(n);r&&this._debounceColorPickerEvent(r)}}),e}isValid(){const{t:e}=this.locale;return this._config.hideInput?!0:(this.resetValidationStatus(),this.hexInputRow.getParsedColor()?!0:(this.hexInputRow.inputView.errorText=e('Please enter a valid color (e.g. "ff0000").'),!1))}resetValidationStatus(){this.hexInputRow.inputView.errorText=null}}function jE(i){let e=Dke(i);return e||(e="#000"),e.length===4&&(e="#"+[e[1],e[1],e[2],e[2],e[3],e[3]].join("")),e.toLowerCase()}class Gke extends Ge{constructor(e){super(),this.element=e}focus(){this.element.focus()}}class Yke extends Ge{constructor(e){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__hash-view"]},children:"#"})}}class Kke extends Ge{children;inputView;constructor(e,t){super(e),this.inputView=t,this.children=this.createCollection([new Yke,this.inputView]),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__row"]},children:this.children})}getParsedColor(){return yK(this.inputView.fieldView.element.value)}}function yK(i){if(!i)return null;const e=i.trim().replace(/^#/,"");return![3,4,6,8].includes(e.length)||!/^(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/.test(e)?null:`#${e}`}class Xke extends hn(Jn){constructor(e){super(e),this.set("isEmpty",!0),this.on("change",()=>{this.set("isEmpty",this.length===0)})}add(e,t){return this.find(n=>n.color===e.color)?this:super.add(e,t)}hasColor(e){return!!this.find(t=>t.color===e)}}class Qke extends Ge{items;colorDefinitions;focusTracker;columns;documentColors;documentColorsCount;staticColorsGrid;documentColorsGrid;colorPickerButtonView;removeColorButtonView;_focusables;_documentColorsLabel;_removeButtonLabel;_colorPickerLabel;constructor(e,{colors:t,columns:n,removeButtonLabel:r,documentColorsLabel:s,documentColorsCount:o,colorPickerLabel:a,focusTracker:l,focusables:c}){super(e);const d=this.bindTemplate;this.set("isVisible",!0),this.focusTracker=l,this.items=this.createCollection(),this.colorDefinitions=t,this.columns=n,this.documentColors=new Xke,this.documentColorsCount=o,this._focusables=c,this._removeButtonLabel=r,this._colorPickerLabel=a,this._documentColorsLabel=s,this.setTemplate({tag:"div",attributes:{class:["ck-color-grids-fragment",d.if("isVisible","ck-hidden",f=>!f)]},children:this.items}),this.removeColorButtonView=this._createRemoveColorButton(),this.items.add(this.removeColorButtonView)}updateDocumentColors(e,t){const n=e.document,r=this.documentColorsCount;this.documentColors.clear();for(const s of n.getRoots()){const o=e.createRangeIn(s);for(const a of o.getItems())if(a.is("$textProxy")&&a.hasAttribute(t)&&(this._addColorToDocumentColors(a.getAttribute(t)),this.documentColors.length>=r))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,n=this.selectedColor;t.selectedColor=n,e&&(e.selectedColor=n)}render(){if(super.render(),this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount){const e=as.bind(this.documentColors,this.documentColors),t=new Ge(this.locale);t.setTemplate({tag:"span",attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]},children:[{text:this._documentColorsLabel}]}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}this._createColorPickerButton(),this._addColorSelectorElementsToFocusTracker()}focus(){this.removeColorButtonView.focus()}destroy(){super.destroy()}addColorPickerButton(){this.colorPickerButtonView&&(this.items.add(this.colorPickerButtonView),this.focusTracker.add(this.colorPickerButtonView.element),this._focusables.add(this.colorPickerButtonView))}_addColorSelectorElementsToFocusTracker(){this.focusTracker.add(this.removeColorButtonView.element),this._focusables.add(this.removeColorButtonView),this.staticColorsGrid&&(this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid)),this.documentColorsGrid&&(this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid))}_createColorPickerButton(){this.colorPickerButtonView=new nt,this.colorPickerButtonView.set({label:this._colorPickerLabel,withText:!0,icon:CTe,class:"ck-color-selector__color-picker"}),this.colorPickerButtonView.on("execute",()=>{this.fire("colorPicker:show")})}_createRemoveColorButton(){const e=new nt;return e.set({withText:!0,icon:bS,label:this._removeButtonLabel}),e.class="ck-color-selector__remove-color",e.on("execute",()=>{this.fire("execute",{value:null,source:"removeColorButton"})}),e.render(),e}_createStaticColorsGrid(){const e=new D7(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.on("execute",(t,n)=>{this.fire("execute",{value:n.value,source:"staticColorsGrid"})}),e}_createDocumentColorsGrid(){const e=as.bind(this.documentColors,this.documentColors),t=new D7(this.locale,{columns:this.columns});return t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using(n=>{const r=new cK;return r.set({color:n.color,hasBorder:n.options?.hasBorder}),n.label&&r.set({label:n.label,tooltip:!0}),r.on("execute",()=>{this.fire("execute",{value:n.color,source:"documentColorsGrid"})}),r}),this.documentColors.on("change:isEmpty",(n,r,s)=>{s&&(t.selectedColor=null)}),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find(n=>n.color===e);t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}class Zke extends Ge{items;colorPickerView;saveButtonView;cancelButtonView;actionBarView;focusTracker;keystrokes;_focusables;_colorPickerViewConfig;constructor(e,{focusTracker:t,focusables:n,keystrokes:r,colorPickerViewConfig:s}
40){super(e),this.items=this.createCollection(),this.focusTracker=t,this.keystrokes=r,this.set("isVisible",!1),this.set("selectedColor",void 0),this._focusables=n,this._colorPickerViewConfig=s;const o=this.bindTemplate,{saveButtonView:a,cancelButtonView:l}=this._createActionButtons();this.saveButtonView=a,this.cancelButtonView=l,this.actionBarView=this._createActionBarView({saveButtonView:a,cancelButtonView:l}),this.setTemplate({tag:"div",attributes:{class:["ck-color-picker-fragment",o.if("isVisible","ck-hidden",c=>!c)]},children:this.items})}render(){super.render();const e=new $ke(this.locale,{...this._colorPickerViewConfig});this.colorPickerView=e,this.colorPickerView.render(),this.selectedColor&&(e.color=this.selectedColor),this.listenTo(this,"change:selectedColor",(t,n,r)=>{e.color=r}),this.items.add(this.colorPickerView),this.items.add(this.actionBarView),this._addColorPickersElementsToFocusTracker(),this._stopPropagationOnArrowsKeys(),this._executeOnEnterPress(),this._executeUponColorChange()}destroy(){super.destroy()}focus(){this.colorPickerView.focus()}resetValidationStatus(){this.colorPickerView.resetValidationStatus()}_executeOnEnterPress(){this.keystrokes.set("enter",e=>{this.isVisible&&this.focusTracker.focusedElement!==this.cancelButtonView.element&&this.colorPickerView.isValid()&&(this.fire("execute",{value:this.selectedColor}),e.stopPropagation(),e.preventDefault())})}_stopPropagationOnArrowsKeys(){const e=t=>t.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}_addColorPickersElementsToFocusTracker(){for(const t of this.colorPickerView.slidersView)this.focusTracker.add(t.element),this._focusables.add(t);const e=this.colorPickerView.hexInputRow.children.get(1);e.element&&(this.focusTracker.add(e.element),this._focusables.add(e)),this.focusTracker.add(this.saveButtonView.element),this._focusables.add(this.saveButtonView),this.focusTracker.add(this.cancelButtonView.element),this._focusables.add(this.cancelButtonView)}_createActionBarView({saveButtonView:e,cancelButtonView:t}){const n=new Ge,r=this.createCollection();return r.add(e),r.add(t),n.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector_action-bar"]},children:r}),n}_createActionButtons(){const e=this.locale,t=e.t,n=new nt(e),r=new nt(e);return n.set({icon:E_,class:"ck-button-save",type:"button",withText:!1,label:t("Accept")}),r.set({icon:D_,class:"ck-button-cancel",type:"button",withText:!1,label:t("Cancel")}),n.on("execute",()=>{this.colorPickerView.isValid()&&this.fire("execute",{source:"colorPickerSaveButton",value:this.selectedColor})}),r.on("execute",()=>{this.fire("colorPicker:cancel")}),{saveButtonView:n,cancelButtonView:r}}_executeUponColorChange(){this.colorPickerView.on("colorSelected",(e,t)=>{this.fire("execute",{value:t.color,source:"colorPicker"}),this.set("selectedColor",t.color)})}}class h4 extends Ge{focusTracker;keystrokes;items;colorGridsFragmentView;colorPickerFragmentView;_focusCycler;_focusables;_colorPickerViewConfig;constructor(e,{colors:t,columns:n,removeButtonLabel:r,documentColorsLabel:s,documentColorsCount:o,colorPickerLabel:a,colorPickerViewConfig:l}){super(e),this.items=this.createCollection(),this.focusTracker=new Fn,this.keystrokes=new qn,this._focusables=new qi,this._colorPickerViewConfig=l,this._focusCycler=new or({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.colorGridsFragmentView=new Qke(e,{colors:t,columns:n,removeButtonLabel:r,documentColorsLabel:s,documentColorsCount:o,colorPickerLabel:a,focusTracker:this.focusTracker,focusables:this._focusables}),this.colorPickerFragmentView=new Zke(e,{focusables:this._focusables,focusTracker:this.focusTracker,keystrokes:this.keystrokes,colorPickerViewConfig:l}),this.set("_isColorGridsFragmentVisible",!0),this.set("_isColorPickerFragmentVisible",!1),this.set("selectedColor",void 0),this.colorGridsFragmentView.bind("isVisible").to(this,"_isColorGridsFragmentVisible"),this.colorPickerFragmentView.bind("isVisible").to(this,"_isColorPickerFragmentVisible"),this.on("change:selectedColor",(c,d,f)=>{this.colorGridsFragmentView.set("selectedColor",f),this.colorPickerFragmentView.set("selectedColor",f)}),this.colorGridsFragmentView.on("change:selectedColor",(c,d,f)=>{this.set("selectedColor",f)}),this.colorPickerFragmentView.on("change:selectedColor",(c,d,f)=>{this.set("selectedColor",f)}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector"]},children:this.items})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendUI(){this._appendColorGridsFragment(),this._colorPickerViewConfig&&this._appendColorPickerFragment()}showColorPickerFragment(){!this.colorPickerFragmentView.colorPickerView||this._isColorPickerFragmentVisible||(this._isColorPickerFragmentVisible=!0,this.colorPickerFragmentView.focus(),this.colorPickerFragmentView.resetValidationStatus(),this._isColorGridsFragmentVisible=!1)}showColorGridsFragment(){this._isColorGridsFragmentVisible||(this._isColorGridsFragmentVisible=!0,this.colorGridsFragmentView.focus(),this._isColorPickerFragmentVisible=!1)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}updateDocumentColors(e,t){this.colorGridsFragmentView.updateDocumentColors(e,t)}updateSelectedColors(){this.colorGridsFragmentView.updateSelectedColors()}_appendColorGridsFragment(){this.items.length||(this.items.add(this.colorGridsFragmentView),this.colorGridsFragmentView.delegate("execute").to(this),this.colorGridsFragmentView.delegate("colorPicker:show").to(this))}_appendColorPickerFragment(){this.items.length!==2&&(this.items.add(this.colorPickerFragmentView),this.colorGridsFragmentView.colorPickerButtonView&&this.colorGridsFragmentView.colorPickerButtonView.on("execute",()=>{this.showColorPickerFragment()}),this.colorGridsFragmentView.addColorPickerButton(),this.colorPickerFragmentView.delegate("execute").to(this),this.colorPickerFragmentView.delegate("colorPicker:cancel").to(this))}}class Jke{editor;_components=new Map;constructor(e){this.editor=e}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(zE(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new oe("componentfactory-item-missing",this,{name:e});return this._components.get(zE(e)).callback(this.editor.locale)}has(e){return this._components.has(zE(e))}}function zE(i){return String(i).toLowerCase()}const S7="ck-tooltip";class Er extends ds(){tooltipTextView;balloonPanelView;static defaultBalloonPositions=Ai.generatePositions({heightOffset:5,sideOffset:13});_currentElementWithTooltip=null;_currentTooltipPosition=null;_mutationObserver=null;_pinTooltipDebounced;_unpinTooltipDebounced;_watchdogExcluded;static _editors=new Set;static _instance=null;constructor(e){if(super(),Er._editors.add(e),Er._instance)return Er._instance;Er._instance=this,this.tooltipTextView=new Ge(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new Ai(e.locale),this.balloonPanelView.class=S7,this.balloonPanelView.content.add(this.tooltipTextView),this._mutationObserver=eSe(()=>{this._updateTooltipPosition()}),this._pinTooltipDebounced=fo(this._pinTooltip,600),this._unpinTooltipDebounced=fo(this._unpinTooltip,400),this.listenTo($e.document,"keydown",this._onKeyDown.bind(this),{useCapture:!0}),this.listenTo($e.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo($e.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo($e.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo($e.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo($e.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;Er._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),Er._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),Er._instance=null)}static getPositioningFunctions(e){const t=Er.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}
40_onKeyDown(e,t){t.key==="Escape"&&this._currentElementWithTooltip&&(this._unpinTooltip(),t.stopPropagation())}_onEnterOrFocus(e,{target:t}){const n=WE(t);if(!n){e.name==="focus"&&this._unpinTooltip();return}if(n===this._currentElementWithTooltip){this._unpinTooltipDebounced.cancel();return}this._unpinTooltip(),e.name==="focus"&&!n.matches(":hover")||n.matches("[data-cke-tooltip-instant]")?this._pinTooltip(n,HE(n)):this._pinTooltipDebounced(n,HE(n))}_onLeaveOrBlur(e,{target:t,relatedTarget:n}){if(e.name==="mouseleave"){if(!Uc(t))return;const r=this.balloonPanelView.element,s=r&&(r===n||r.contains(n)),o=!s&&t===r;if(s){this._unpinTooltipDebounced.cancel();return}if(!o&&this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const a=WE(t),l=WE(n);(o||a&&a!==l)&&(this._pinTooltipDebounced.cancel(),this._currentElementWithTooltip&&this._currentElementWithTooltip.matches("[data-cke-tooltip-instant]")||a&&a.matches("[data-cke-tooltip-instant]")?this._unpinTooltip():this._unpinTooltipDebounced())}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._pinTooltipDebounced.cancel(),this._unpinTooltipDebounced()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:n,cssClass:r}){this._unpinTooltip();const s=Rn(Er._editors.values()).ui.view.body;s.has(this.balloonPanelView)||s.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.class=[S7,r].filter(o=>o).join(" "),this.balloonPanelView.pin({target:e,positions:Er.getPositioningFunctions(n)}),this._mutationObserver.attach(e);for(const o of Er._editors)this.listenTo(o.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=n}_unpinTooltip(){this._unpinTooltipDebounced.cancel(),this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of Er._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this.tooltipTextView.text="",this._mutationObserver.detach()}_updateTooltipPosition(){if(!this._currentElementWithTooltip)return;const e=HE(this._currentElementWithTooltip);if(!Aa(this._currentElementWithTooltip)||!e.text){this._unpinTooltip();return}this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:Er.getPositioningFunctions(e.position)})}}function WE(i){return Uc(i)?i.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}function HE(i){return{text:i.dataset.ckeTooltipText,position:i.dataset.ckeTooltipPosition||"s",cssClass:i.dataset.ckeTooltipClass||""}}function eSe(i){const e=new MutationObserver(()=>{i()});return{attach(t){e.observe(t,{attributes:!0,attributeFilter:["data-cke-tooltip-text","data-cke-tooltip-position"]})},detach(){e.disconnect()}}}class tSe extends sK{licenseTypeMessage={evaluation:"For evaluation purposes only",trial:"For evaluation purposes only",development:"For development purposes only"};constructor(e){super(e,{balloonClass:"ck-evaluation-badge-balloon"})}_isEnabled(){const t=this.editor.config.get("licenseKey"),n=P7(t);return!!(n&&this.licenseTypeMessage[n])}_createBadgeContent(){const e=this.editor.config.get("licenseKey"),t=P7(e);return new nSe(this.editor.locale,this.licenseTypeMessage[t])}_getNormalizedConfig(){const e=super._getNormalizedConfig(),t=this.editor.config.get("ui.poweredBy")||{},n=t.position||e.position,r=t.side||e.side;return{position:n,side:r==="left"?"right":"left",verticalOffset:e.verticalOffset,horizontalOffset:e.horizontalOffset}}}class nSe extends Ge{constructor(e,t){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-evaluation-badge"],"aria-hidden":!0},children:[{tag:"span",attributes:{class:["ck","ck-evaluation-badge__label"]},children:[t]}]})}}function P7(i){if(i=="GPL")return"GPL";const e=V3(i.split(".")[1]);return e?e.licenseType||"production":null}class Sa extends ho{constructor(e,t){super(e);const n=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item"]},on:{mouseenter:n.to("mouseenter")}}),this.delegate("mouseenter").to(t)}}const Iy=5,Df={toggleMenusAndFocusItemsOnHover(i){i.on("menu:mouseenter",e=>{if(!(!i.isFocusBorderEnabled&&!i.isOpen)){if(i.isOpen)for(const t of i.menus){const n=e.path[0],r=n instanceof Sa&&n.children.first===t;t.isOpen=(e.path.includes(t)||r)&&t.isEnabled}
40e.source.focus()}})},focusCycleMenusOnArrows(i){const e=i.locale.uiLanguageDirection==="rtl";i.on("menu:arrowright",n=>{t(n.source,e?-1:1)}),i.on("menu:arrowleft",n=>{t(n.source,e?1:-1)});function t(n,r){const s=i.children.getIndex(n),o=n.isOpen,a=i.children.length,l=i.children.get((s+a+r)%a);n.isOpen=!1,o&&(l.isOpen=!0),l.buttonView.focus()}},closeMenusWhenTheBarCloses(i){i.on("change:isOpen",()=>{i.isOpen||i.menus.forEach(e=>{e.isOpen=!1})})},closeMenuWhenAnotherOnTheSameLevelOpens(i){i.on("menu:change:isOpen",(e,t,n)=>{n&&i.menus.filter(r=>e.source.parentMenuView===r.parentMenuView&&e.source!==r&&r.isOpen).forEach(r=>{r.isOpen=!1})})},closeOnClickOutside(i){Kc({emitter:i,activator:()=>i.isOpen,callback:()=>i.close(),contextElements:()=>i.children.map(e=>e.element)})},enableFocusHighlightOnInteraction(i){let e=!1;i.on("change:isOpen",(t,n,r)=>{r||(e||(i.isFocusBorderEnabled=!1),e=!1)}),i.listenTo(i.element,"keydown",()=>{e=!0},{useCapture:!0}),i.listenTo(i.element,"keyup",()=>{e=!1},{useCapture:!0}),i.listenTo(i.element,"focus",()=>{e&&(i.isFocusBorderEnabled=!0)},{useCapture:!0})}},bc={openAndFocusPanelOnArrowDownKey(i){i.keystrokes.set("arrowdown",(e,t)=>{i.isEnabled&&i.focusTracker.focusedElement===i.buttonView.element&&(i.isOpen||(i.isOpen=!0),i.panelView.focus(),t())})},openOnArrowRightKey(i){const e=i.locale.uiLanguageDirection==="rtl"?"arrowleft":"arrowright";i.keystrokes.set(e,(t,n)=>{i.focusTracker.focusedElement!==i.buttonView.element||!i.isEnabled||(i.isOpen||(i.isOpen=!0),i.panelView.focus(),n())})},openOnButtonClick(i){i.buttonView.on("execute",()=>{i.isOpen=!0})},toggleOnButtonClick(i){i.buttonView.on("execute",()=>{i.isOpen=!i.isOpen})},openAndFocusOnEnterKeyPress(i){i.keystrokes.set("enter",(e,t)=>{i.focusTracker.focusedElement===i.buttonView.element&&(i.isOpen=!0,i.panelView.focus(),t())})},closeOnArrowLeftKey(i){const e=i.locale.uiLanguageDirection==="rtl"?"arrowright":"arrowleft";i.keystrokes.set(e,(t,n)=>{i.isOpen&&(i.isOpen=!1,i.focus(),n())})},closeOnEscKey(i){i.keystrokes.set("esc",(e,t)=>{i.isOpen&&(i.isOpen=!1,i.focus(),t())})},closeOnParentClose(i){i.parentMenuView.on("change:isOpen",(e,t,n)=>{!n&&e.source===i.parentMenuView&&(i.isOpen=!1)})}},iSe={southEast:i=>({top:i.bottom,left:i.left,name:"se"}),southWest:(i,e)=>({top:i.bottom,left:i.left-e.width+i.width,name:"sw"}),northEast:(i,e)=>({top:i.top-e.height,left:i.left,name:"ne"}),northWest:(i,e)=>({top:i.top-e.height,left:i.left-e.width+i.width,name:"nw"}),eastSouth:i=>({top:i.top,left:i.right-Iy,name:"es"}),eastNorth:(i,e)=>({top:i.top-e.height,left:i.right-Iy,name:"en"}),westSouth:(i,e)=>({top:i.top,left:i.left-e.width+Iy,name:"ws"}),westNorth:(i,e)=>({top:i.top-e.height,left:i.left-e.width+Iy,name:"wn"})},rSe=[{menuId:"file",label:"File",groups:[{groupId:"export",items:["menuBar:exportPdf","menuBar:exportWord"]},{groupId:"import",items:["menuBar:importWord"]},{groupId:"revisionHistory",items:["menuBar:revisionHistory"]}]},{menuId:"edit",label:"Edit",groups:[{groupId:"undo",items:["menuBar:undo","menuBar:redo"]},{groupId:"selectAll",items:["menuBar:selectAll"]},{groupId:"findAndReplace",items:["menuBar:findAndReplace"]}]},{menuId:"view",label:"View",groups:[{groupId:"sourceEditingEnhanced",items:["menuBar:sourceEditingEnhanced"]},{groupId:"sourceEditing",items:["menuBar:sourceEditing"]},{groupId:"showBlocks",items:["menuBar:showBlocks"]},{groupId:"previewMergeFields",items:["menuBar:previewMergeFields"]},{groupId:"fullscreen",items:["menuBar:fullscreen"]},{groupId:"restrictedEditing",items:["menuBar:restrictedEditing"]}]},{menuId:"insert",label:"Insert",groups:[{groupId:"insertMainWidgets",items:["menuBar:insertImage","menuBar:ckbox","menuBar:ckfinder","menuBar:insertTable","menuBar:insertTableLayout"]},{groupId:"insertInline",items:["menuBar:link","menuBar:insertFootnote","menuBar:bookmark","menuBar:comment","menuBar:insertMergeField","menuBar:emoji"]},{groupId:"insertMinorWidgets",items:["menuBar:mediaEmbed","menuBar:insertTemplate","menuBar:specialCharacters","menuBar:blockQuote","menuBar:codeBlock","menuBar:htmlEmbed"]},{groupId:"insertStructureWidgets",items:["menuBar:horizontalLine","menuBar:pageBreak","menuBar:tableOfContents"]}
40,{groupId:"restrictedEditingException",items:["menuBar:restrictedEditingException:inline","menuBar:restrictedEditingException:block"]}]},{menuId:"format",label:"Format",groups:[{groupId:"textAndFont",items:[{menuId:"text",label:"Text",groups:[{groupId:"basicStyles",items:["menuBar:bold","menuBar:italic","menuBar:underline","menuBar:strikethrough","menuBar:superscript","menuBar:subscript","menuBar:code"]},{groupId:"textPartLanguage",items:["menuBar:textPartLanguage"]}]},{menuId:"font",label:"Font",groups:[{groupId:"fontProperties",items:["menuBar:fontSize","menuBar:fontFamily"]},{groupId:"fontColors",items:["menuBar:fontColor","menuBar:fontBackgroundColor"]},{groupId:"highlight",items:["menuBar:highlight"]}]},"menuBar:heading"]},{groupId:"list",items:["menuBar:bulletedList","menuBar:numberedList","menuBar:multiLevelList","menuBar:todoList"]},{groupId:"indent",items:["menuBar:alignment","menuBar:lineHeight","menuBar:indent","menuBar:outdent"]},{groupId:"caseChange",items:["menuBar:caseChange"]},{groupId:"removeFormat",items:["menuBar:removeFormat"]}]},{menuId:"tools",label:"Tools",groups:[{groupId:"aiTools",items:["menuBar:aiAssistant","menuBar:aiCommands","menuBar:toggleAi","menuBar:aiQuickActions"]},{groupId:"tools",items:["menuBar:trackChanges","menuBar:commentsArchive"]}]},{menuId:"help",label:"Help",groups:[{groupId:"help",items:["menuBar:accessibilityHelp"]}]}];function sSe(i){let e;return!("items"in i)||!i.items?e={items:Br(rSe),addItems:[],removeItems:[],isVisible:!0,isUsingDefaultConfig:!0,...i}:e={items:i.items,removeItems:[],addItems:[],isVisible:!0,isUsingDefaultConfig:!1,...i},e}function oSe({normalizedConfig:i,locale:e,componentFactory:t,extraItems:n}){const r=Br(i);return I7(i,r,n),aSe(i,r),I7(i,r,r.addItems),lSe(i,r,t),vK(i,r),cSe(r,e),r}function aSe(i,e){const t=e.removeItems,n=[];e.items=e.items.filter(({menuId:r})=>t.includes(r)?(n.push(r),!1):!0),sm(e.items,r=>{r.groups=r.groups.filter(({groupId:s})=>t.includes(s)?(n.push(s),!1):!0);for(const s of r.groups)s.items=s.items.filter(o=>{const a=wK(o);return t.includes(a)?(n.push(a),!1):!0})});for(const r of t)n.includes(r)||Kt("menu-bar-item-could-not-be-removed",{menuBarConfig:i,itemName:r})}function I7(i,e,t){const n=[];if(t.length!=0){for(const r of t){const s=fSe(r.position),o=hSe(r.position);if(uSe(r))if(!o)s==="start"?(e.items.unshift(r.menu),n.push(r)):s==="end"&&(e.items.push(r.menu),n.push(r));else{const a=e.items.findIndex(l=>l.menuId===o);a!=-1?s==="before"?(e.items.splice(a,0,r.menu),n.push(r)):s==="after"&&(e.items.splice(a+1,0,r.menu),n.push(r)):R7(e,r.menu,o,s)&&n.push(r)}else dSe(r)?sm(e.items,a=>{if(a.menuId===o)s==="start"?(a.groups.unshift(r.group),n.push(r)):s==="end"&&(a.groups.push(r.group),n.push(r));else{const l=a.groups.findIndex(c=>c.groupId===o);l!==-1&&(s==="before"?(a.groups.splice(l,0,r.group),n.push(r)):s==="after"&&(a.groups.splice(l+1,0,r.group),n.push(r)))}}):R7(e,r.item,o,s)&&n.push(r)}for(const r of t)n.includes(r)||Kt("menu-bar-item-could-not-be-added",{menuBarConfig:i,addedItemConfig:r})}}function R7(i,e,t,n){let r=!1;return sm(i.items,s=>{for(const{groupId:o,items:a}of s.groups){if(r)return;if(o===t)n==="start"?(a.unshift(e),r=!0):n==="end"&&(a.push(e),r=!0);else{const l=a.findIndex(c=>wK(c)===t);l!==-1&&(n==="before"?(a.splice(l,0,e),r=!0):n==="after"&&(a.splice(l+1,0,e),r=!0))}}}),r}function lSe(i,e,t){sm(e.items,n=>{for(const r of n.groups)r.items=r.items.filter(s=>{const o=typeof s=="string"&&!t.has(s);return o&&!e.isUsingDefaultConfig&&Kt("menu-bar-item-unavailable",{menuBarConfig:i,parentMenuConfig:Br(n),componentName:s}),!o})})}function vK(i,e){const t=e.isUsingDefaultConfig;let n=!1;if(e.items=e.items.filter(r=>r.groups.length?!0:(qE(i,r,t),!1)),!e.items.length){qE(i,i,t);return}sm(e.items,r=>{r.groups=r.groups.filter(s=>s.items.length?!0:(n=!0,!1));for(const s of r.groups)s.items=s.items.filter(o=>xK(o)&&!o.groups.length?(qE(i,o,t),n=!0,!1):!0)}),n&&vK(i,e)}function qE(i,e,t){t||Kt("menu-bar-menu-empty",{menuBarConfig:i,emptyMenuConfig:e})}function cSe(i,e){const t=e.t,n={File:t({string:"File",id:"MENU_BAR_MENU_FILE"}
40),Edit:t({string:"Edit",id:"MENU_BAR_MENU_EDIT"}),View:t({string:"View",id:"MENU_BAR_MENU_VIEW"}),Insert:t({string:"Insert",id:"MENU_BAR_MENU_INSERT"}),Format:t({string:"Format",id:"MENU_BAR_MENU_FORMAT"}),Tools:t({string:"Tools",id:"MENU_BAR_MENU_TOOLS"}),Help:t({string:"Help",id:"MENU_BAR_MENU_HELP"}),Text:t({string:"Text",id:"MENU_BAR_MENU_TEXT"}),Font:t({string:"Font",id:"MENU_BAR_MENU_FONT"})};sm(i.items,r=>{r.label in n&&(r.label=n[r.label])})}function sm(i,e){if(Array.isArray(i))for(const n of i)t(n);function t(n){e(n);for(const r of n.groups)for(const s of r.items)xK(s)&&t(s)}}function uSe(i){return typeof i=="object"&&"menu"in i}function dSe(i){return typeof i=="object"&&"group"in i}function fSe(i){return i.startsWith("start")?"start":i.startsWith("end")?"end":i.startsWith("after")?"after":"before"}function hSe(i){const e=i.match(/^[^:]+:(.+)/);return e?e[1]:null}function wK(i){return typeof i=="string"?i:i.menuId}function xK(i){return typeof i=="object"&&"menuId"in i}class mSe extends hn(){editor;componentFactory;focusTracker;tooltipManager;poweredBy;evaluationBadge;ariaLiveAnnouncer;isReady=!1;_editableElementsMap=new Map;_focusableToolbarDefinitions=[];_extraMenuBarElements=[];_lastFocusedForeignElement=null;_domEmitter;constructor(e){super();const t=e.editing.view;this.editor=e,this.componentFactory=new Jke(e),this.focusTracker=new Fn,this.tooltipManager=new Er(e),this.poweredBy=new vke(e),this.evaluationBadge=new tSe(e),this.ariaLiveAnnouncer=new tke(e),this._initViewportOffset(this._readViewportOffsetFromConfig()),this.once("ready",()=>{this._bindBodyCollectionWithFocusTracker(),this.isReady=!0}),this.listenTo(t.document,"layoutChanged",this.update.bind(this)),this.listenTo(t,"scrollToTheSelection",this._handleScrollToTheSelection.bind(this)),this._initFocusTracking(),this._initVisualViewportSupport()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy(),this.evaluationBadge.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null,this.editor.keystrokes.stopListening(e);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[],this._domEmitter&&this._domEmitter.stopListening()}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const n=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?n():this.once("ready",n)}removeEditableElement(e){const t=this._editableElementsMap.get(e);t&&(this._editableElementsMap.delete(e),this.editor.keystrokes.stopListening(t),this.focusTracker.remove(t),t.ckeditorInstance=null)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,t={}){e.isRendered?(this.focusTracker.add(e),this.editor.keystrokes.listenTo(e.element)):e.once("render",()=>{this.focusTracker.add(e),this.editor.keystrokes.listenTo(e.element)}),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}extendMenuBar(e){this._extraMenuBarElements.push(e)}initMenuBar(e){const t=e.element;this.focusTracker.add(t),this.editor.keystrokes.listenTo(t);const n=sSe(this.editor.config.get("menuBar")||{});e.fillFromConfig(n,this.componentFactory,this._extraMenuBarElements),this.editor.keystrokes.set("Esc",(r,s)=>{t.contains(this.editor.ui.focusTracker.focusedElement)&&(this._lastFocusedForeignElement?(this._lastFocusedForeignElement.focus(),this._lastFocusedForeignElement=null):this.editor.editing.view.focus(),s())}),this.editor.keystrokes.set("Alt+F9",(r,s)=>{t.contains(this.editor.ui.focusTracker.focusedElement)||(this._saveLastFocusedForeignElement(),e.isFocusBorderEnabled=!0,e.focus(),s())})}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const n=e.config.get("toolbar.viewportTopOffset");return n?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:n}):{top:0}}_initFocusTracking(){const e=this.editor;let t;e.keystrokes.set("Alt+F10",(n,r)=>{this._saveLastFocusedForeignElement();const s=this._getCurrentFocusedToolbarDefinition();(!s||!t)&&(t=this._getFocusableCandidateToolbarDefinitions());for(let o=0;o<t.length;o++){const a=t.shift();
40if(t.push(a),a!==s&&this._focusFocusableCandidateToolbar(a)){s&&s.options.afterBlur&&s.options.afterBlur();break}}r()}),e.keystrokes.set("Esc",(n,r)=>{const s=this._getCurrentFocusedToolbarDefinition();s&&(this._lastFocusedForeignElement?(this._lastFocusedForeignElement.focus(),this._lastFocusedForeignElement=null):e.editing.view.focus(),s.options.afterBlur&&s.options.afterBlur(),r())})}_saveLastFocusedForeignElement(){const e=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(e)&&!Array.from(this.editor.editing.view.domRoots.values()).includes(e)&&(this._lastFocusedForeignElement=e)}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:n,options:r}=t;(Aa(n.element)||r.beforeFocus)&&e.push(t)}return e.sort((t,n)=>F7(t)-F7(n)),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:n}}=e;return n&&n(),Aa(t.element)?(t.focus(),!0):!1}_handleScrollToTheSelection(e,t){const n={top:0,bottom:0,left:0,right:0,...this.viewportOffset};t.viewportOffset.top+=n.top,t.viewportOffset.bottom+=n.bottom,t.viewportOffset.left+=n.left,t.viewportOffset.right+=n.right}_bindBodyCollectionWithFocusTracker(){const e=this.view.body;for(const t of e)this.focusTracker.add(t.element);e.on("add",(t,n)=>{this.focusTracker.add(n.element)}),e.on("remove",(t,n)=>{this.focusTracker.remove(n.element)})}_initViewportOffset(e){this.on("set:viewportOffset",(t,n,r)=>{const s=this._getVisualViewportTopOffset(r);r.visualTop!==s&&(t.return={...r,visualTop:s})}),this.set("viewportOffset",e)}_initVisualViewportSupport(){if(!$e.window.visualViewport)return;const e=()=>{const t=this._getVisualViewportTopOffset(this.viewportOffset);this.viewportOffset.visualTop!==t&&(this.viewportOffset={...this.viewportOffset,visualTop:t})};this._domEmitter=new(ds()),this._domEmitter.listenTo($e.window.visualViewport,"scroll",e),this._domEmitter.listenTo($e.window.visualViewport,"resize",e)}_getVisualViewportTopOffset(e){const t=w1().top,n=e.top||0;return t>n?0:n-t}}function F7(i){const{toolbarView:e,options:t}=i;let n=10;return Aa(e.element)&&n--,t.isContextual&&(n-=2),n}class pSe extends Ge{body;menuBarView;toolbar;constructor(e){super(e),this.body=new To(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class gSe extends pSe{top;main;_voiceLabelView;constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new oo;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class bSe extends Ge{name=null;_editingView;_editableElement;_hasExternalElement;constructor(e,t,n){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=n,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",()=>this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}
40_updateIsFocusedClasses(){const e=this._editingView;e.isRenderingInProgress?n(this):t(this);function t(r){e.change(s=>{const o=e.document.getRoot(r.name);s.addClass(r.isFocused?"ck-focused":"ck-blurred",o),s.removeClass(r.isFocused?"ck-blurred":"ck-focused",o)})}function n(r){e.once("change:isRenderingInProgress",(s,o,a)=>{a?n(r):t(r)})}}}class ySe extends bSe{_options;constructor(e,t,n,r={}){super(e,t,n),this._options=r,this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const e=this._editingView;e.change(t=>{const n=e.document.getRoot(this.name);t.setAttribute("aria-label",this.getEditableAriaLabel(),n)})}getEditableAriaLabel(){const e=this.locale.t,t=this._options.label,n=this._editableElement,r=this.name;if(typeof t=="string")return t;if(typeof t=="object")return t[r];if(typeof t=="function")return t(this);if(n){const s=n.getAttribute("aria-label");if(s)return s}return e("Rich Text Editor. Editing area: %0",r)}}class nr extends Ge{children;constructor(e,t={}){super(e);const n=this.bindTemplate;this.set("class",["ck","ck-form__row",...mn(t.class||[])]),this.children=this.createCollection(),t.children&&t.children.forEach(r=>this.children.add(r)),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:n.to("class",r=>r.join(" ")),role:n.to("_role"),"aria-labelledby":n.to("_ariaLabelledBy")},children:this.children})}}class O7 extends UY{static get pluginName(){return"Notification"}static get isOfficialPlugin(){return!0}init(){this.on("show:warning",(e,t)=>{window.alert(t.message)},{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=e.namespace?`show:${e.type}:${e.namespace}`:`show:${e.type}`;this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}class Fl extends hn(){constructor(e,t){super(),t&&dG(this,t),e&&this.set(e)}}const Ry=nm("px");class zo extends be{positionLimiter;visibleStack;_viewToStack=new Map;_idToStack=new Map;_view=null;_rotatorView=null;_fakePanelsView=null;static get pluginName(){return"ContextualBalloon"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this.positionLimiter=()=>{const t=this.editor.editing.view,r=t.document.selection.editableElement;return r?t.domConverter.mapViewToDom(r.root):null},this.decorate("getPositionOptions"),this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this._view||this._createPanelView(),this.hasView(e.view))throw new oe("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t)){this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,(!this._visibleStack||e.singleViewMode)&&this.showStack(t);return}const n=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),n.set(e.view,e),this._viewToStack.set(e.view,n),n===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new oe("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(t.size===1?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),t.size===1?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this.getPositionOptions()),this._fakePanelsView.updatePosition()}getPositionOptions(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:{...this.editor.ui.viewportOffset,top:this.editor.ui.viewportOffset.visualTop}})),e}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new oe("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}_createPanelView(){this._view=new Ai(this.editor.locale),this.editor.ui.view.body.add(this._view),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find(n=>n[1]===e)[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new vSe(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(n,r)=>!r&&n>1),e.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(n,r)=>{if(r<2)return"";const s=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[s,r])}),e.buttonNextView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),e.buttonPrevView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),e}_createFakePanelsView(){const e=new wSe(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(t,n)=>!n&&t>=2?Math.min(t-1,2):0),e.listenTo(this.view,"change:top",()=>e.updatePosition()),e.listenTo(this.view,"change:left",()=>e.updatePosition()),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:n=!0,singleViewMode:r=!1}){this.view.class=t,this.view.withArrow=n,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this.getPositionOptions()),this._fakePanelsView.updatePosition(),r&&(this._singleViewMode=!0)}}class vSe extends Ge{focusTracker;buttonPrevView;buttonNextView;content;constructor(e){super(e);const t=e.t,n=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new Fn,this.buttonPrevView=this._createButtonView(t("Previous"),jc),this.buttonNextView=this._createButtonView(t("Next"),qY),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",n.to("isNavigationVisible",r=>r?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:n.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const n=new nt(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n}}class wSe extends Ge{content;_balloonPanelView;constructor(e,t){super(e);const n=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",n.to("numberOfPanels",r=>
40r?"":"ck-hidden")],style:{top:n.to("top",Ry),left:n.to("left",Ry),width:n.to("width",Ry),height:n.to("height",Ry)}},children:this.content}),this.on("change:numberOfPanels",(r,s,o,a)=>{o>a?this._addPanels(o-a):this._removePanels(a-o),this.updatePosition()})}_addPanels(e){for(;e--;){const t=new Ge;t.setTemplate({tag:"div"}),this.content.add(t),this.registerChild(t)}}_removePanels(e){for(;e--;){const t=this.content.last;this.content.remove(t),this.deregisterChild(t),t.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:n,height:r}=new gt(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:n,height:r})}}}const Ef=nm("px");class xSe extends Ge{content;contentPanelElement;_contentPanelPlaceholder;constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheBottomOfLimiter",!1),this.set("_stickyTopOffset",null),this.set("_stickyBottomOffset",null),this.content=this.createCollection(),this._contentPanelPlaceholder=new as({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",n=>n?"block":"none"),height:t.to("isSticky",n=>n?Ef(this._contentPanelRect.height):null)}}}).render(),this.contentPanelElement=new as({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheBottomOfLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",n=>n?Ef(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:t.to("_stickyTopOffset",n=>n&&Ef(n)),bottom:t.to("_stickyBottomOffset",n=>n&&Ef(n)),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this.contentPanelElement]})}render(){super.render(),this.checkIfShouldBeSticky(),this.listenTo($e.document,"scroll",()=>{this.checkIfShouldBeSticky()},{useCapture:!0}),this.listenTo(this,"change:isActive",()=>{this.checkIfShouldBeSticky()}),$e.window.visualViewport&&(this.listenTo($e.window.visualViewport,"scroll",()=>{this.checkIfShouldBeSticky()}),this.listenTo($e.window.visualViewport,"resize",()=>{this.checkIfShouldBeSticky()}))}checkIfShouldBeSticky(){if(!this.limiterElement||!this.isActive){this._unstick();return}const e=new gt(this.limiterElement);let t=e.getVisible();if(t){const s=new gt($e.window);s.top+=this.viewportTopOffset,s.height-=this.viewportTopOffset,t=t.getIntersection(s)}const{left:n,top:r}=w1();if(e.moveBy(n,r),t&&t.moveBy(n,r),t&&e.top<t.top)if(this._contentPanelRect.height+this.limiterBottomOffset>t.height){const s=Math.max(e.bottom-t.bottom,0)+this.limiterBottomOffset;this._contentPanelRect.height+s+1<e.height?this._stickToBottomOfLimiter(s):this._unstick()}else this._contentPanelRect.height+this.limiterBottomOffset<e.height?this._stickToTopOfAncestors(t.top):this._unstick();else this._unstick()}_stickToTopOfAncestors(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=e,this._stickyBottomOffset=null,this._marginLeft=Ef(-$e.window.scrollX+w1().left)}_stickToBottomOfLimiter(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!0,this._stickyTopOffset=null,this._stickyBottomOffset=e,this._marginLeft=Ef(-$e.window.scrollX+w1().left)}_unstick(){this.isSticky=!1,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=null,this._stickyBottomOffset=null,this._marginLeft=null}get _contentPanelRect(){return new gt(this.contentPanelElement)}}class _Se extends im{arrowView;constructor(e){super(e);const t=this.bindTemplate;this.set({withText:!0,role:"menuitem"}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__button"],"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",n=>String(n)),"data-cke-tooltip-disabled":t.to("isOn")},on:{mouseenter:t.to("mouseenter")}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Go;return e.content=T_,e.extendTemplate({attributes:{class:"ck-menu-bar__menu__button__arrow"}}),e}}class CSe extends Ge{children;constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-menu-bar__menu__panel",t.to("position",n=>`ck-menu-bar__menu__panel_position_${n}`),t.if("isVisible","ck-hidden",n=>!n)],tabindex:"-1"},children:this.children,on:{selectstart:t.to(n=>{n.target.tagName.toLocaleLowerCase()!=="input"&&n.preventDefault()})}})}focus(e=1){this.children.length&&(e===1?this.children.first.focus():this.children.last.focus())}}class ls extends Ge{buttonView;panelView;focusTracker;keystrokes;constructor(e){super(e);const t=this.bindTemplate;this.buttonView=new _Se(e),this.buttonView.delegate("mouseenter").to(this),this.buttonView.bind("isOn","isEnabled").to(this,"isOpen","isEnabled"),this.panelView=new CSe(e),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new qn,this.focusTracker=new Fn,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("panelPosition","w"),this.set("class",void 0),this.set("parentMenuView",null),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar__menu",t.to("class"),t.if("isEnabled","ck-disabled",n=>!n),t.if("parentMenuView","ck-menu-bar__menu_top-level",n=>!n)]},children:[this.buttonView,this.panelView]})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.keystrokes.listenTo(this.element),bc.closeOnEscKey(this),this._repositionPanelOnOpen()}
40_attachBehaviors(){this.parentMenuView?(bc.openOnButtonClick(this),bc.openOnArrowRightKey(this),bc.closeOnArrowLeftKey(this),bc.openAndFocusOnEnterKeyPress(this),bc.closeOnParentClose(this)):(this._propagateArrowKeystrokeEvents(),bc.openAndFocusPanelOnArrowDownKey(this),bc.toggleOnButtonClick(this))}_propagateArrowKeystrokeEvents(){this.keystrokes.set("arrowright",(e,t)=>{this.fire("arrowright"),t()}),this.keystrokes.set("arrowleft",(e,t)=>{this.fire("arrowleft"),t()})}_repositionPanelOnOpen(){this.on("change:isOpen",(e,t,n)=>{if(!n)return;const r=ls._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=r?r.name:this._defaultMenuPositionName})}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:e,southWest:t,northEast:n,northWest:r,westSouth:s,eastSouth:o,westNorth:a,eastNorth:l}=iSe;return this.locale.uiLanguageDirection==="ltr"?this.parentMenuView?[o,l,s,a]:[e,t,n,r]:this.parentMenuView?[s,a,o,l]:[t,e,r,n]}get _defaultMenuPositionName(){return this.locale.uiLanguageDirection==="ltr"?this.parentMenuView?"es":"se":this.parentMenuView?"ws":"sw"}static _getOptimalPosition=M3}class Ol extends vd{constructor(e){super(e),this.role="menu",this.items.on("change",this._setItemsCheckSpace.bind(this))}_setItemsCheckSpace(){const e=Array.from(this.items).some(t=>{const n=N7(t);return n&&n.isToggleable});this.items.forEach(t=>{const n=N7(t);n&&(n.hasCheckSpace=e)})}}function N7(i){return i instanceof ho?i.children.map(e=>DSe(e)?e.buttonView:e).find(e=>e instanceof im):null}function DSe(i){return typeof i=="object"&&"buttonView"in i&&i.buttonView instanceof nt}class _K extends xke{constructor(e){super(e),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}const B7=["mouseenter","arrowleft","arrowright","change:isOpen"];class ESe extends Ge{children;menus=[];constructor(e){super(e);const t=e.t,n=this.bindTemplate;this.set({isOpen:!1,isFocusBorderEnabled:!1}),this._setupIsOpenUpdater(),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar",n.if("isFocusBorderEnabled","ck-menu-bar_focus-border-enabled")],"aria-label":t("Editor menu bar"),role:"menubar"},children:this.children})}fillFromConfig(e,t,n=[]){const r=this.locale,o=oSe({normalizedConfig:e,locale:r,componentFactory:t,extraItems:n}).items.map(a=>this._createMenu({componentFactory:t,menuDefinition:a}));this.children.addMany(o)}render(){super.render(),Df.toggleMenusAndFocusItemsOnHover(this),Df.closeMenusWhenTheBarCloses(this),Df.closeMenuWhenAnotherOnTheSameLevelOpens(this),Df.focusCycleMenusOnArrows(this),Df.closeOnClickOutside(this),Df.enableFocusHighlightOnInteraction(this)}focus(){this.children.first&&this.children.first.focus()}close(){for(const e of this.children)e.isOpen=!1}disable(){for(const e of this.children)e.isEnabled=!1}enable(){for(const e of this.children)e.isEnabled=!0}registerMenu(e,t=null){t?(e.delegate(...B7).to(t),e.parentMenuView=t):e.delegate(...B7).to(this,n=>"menu:"+n),e._attachBehaviors(),this.menus.push(e)}_createMenu({componentFactory:e,menuDefinition:t,parentMenuView:n}){const r=this.locale,s=new ls(r);return this.registerMenu(s,n),s.buttonView.set({label:t.label}),s.once("change:isOpen",()=>{const o=new Ol(r);o.ariaLabel=t.label,s.panelView.children.add(o),o.items.addMany(this._createMenuItems({menuDefinition:t,parentMenuView:s,componentFactory:e}))}),s}_createMenuItems({menuDefinition:e,parentMenuView:t,componentFactory:n}){const r=this.locale,s=[];for(const o of e.groups){for(const a of o.items){const l=new Sa(r,t);if(Nr(a))l.children.add(this._createMenu({componentFactory:n,menuDefinition:a,parentMenuView:t}));else{const c=this._createMenuItemContentFromFactory({componentName:a,componentFactory:n,parentMenuView:t});if(!c)continue;l.children.add(c)}s.push(l)}o!==e.groups[e.groups.length-1]&&s.push(new A_(r))}return s}_createMenuItemContentFromFactory({componentName:e,parentMenuView:t,componentFactory:n}){const r=n.create(e);return r instanceof ls||r instanceof gn||r instanceof _K?(this._registerMenuTree(r,t),r.on("execute",()=>{this.close()}),r):(Kt("menu-bar-component-unsupported",{componentName:e,componentView:r}),null)}_registerMenuTree(e,t){if(!(e instanceof ls)){e.delegate("mouseenter").to(t);return}this.registerMenu(e,t);const n=e.panelView.children.filter(s=>s instanceof Ol)[0];if(!n){e.delegate("mouseenter").to(t);return}const r=n.items.filter(s=>s instanceof ho);for(const s of r)this._registerMenuTree(s.children.get(0),e)}_setupIsOpenUpdater(){let e;this.on("menu:change:isOpen",(t,n,r)=>{clearTimeout(e),r?this.isOpen=!0:e=setTimeout(()=>{this.isOpen=Array.from(this.children).some(s=>s.isOpen)},0)})}}const m4=["left","right","center","justify"];function CK(i){return m4.includes(i)}function DK(i,e){return e.contentLanguageDirection=="rtl"?i==="right":i==="left"}function EK(i){const e=i.map(n=>{let r;return typeof n=="string"?r={name:n}:r=n,r}).filter(n=>{const r=m4.includes(n.name);return r||Kt("alignment-config-name-not-recognized",{option:n}),r}),t=e.filter(n=>!!n.className).length;if(t&&t<e.length)throw new oe("alignment-config-classnames-are-missing",{configuredOptions:i});return e.forEach((n,r,s)=>{const o=s.slice(r+1);if(o.some(l=>l.name==n.name))throw new oe("alignment-config-name-already-defined",{option:n,configuredOptions:i});if(n.className&&o.some(c=>c.className==n.className))throw new oe("alignment-config-classname-already-defined",{option:n,configuredOptions:i})}),e}const p4="alignment";class TSe extends ut{refresh(){const t=this.editor.locale,n=Rn(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=!!n&&this._canBeAligned(n),this.isEnabled&&n.hasAttribute("alignment")?this.value=n.getAttribute("alignment"):this.value=t.contentLanguageDirection==="rtl"?"right":"left"}execute(e={}){const t=this.editor,n=t.locale,r=t.model,s=r.document,o=e.value;r.change(a=>{const l=Array.from(s.selection.getSelectedBlocks()).filter(f=>this._canBeAligned(f)),c=l[0].getAttribute("alignment");DK(o,n)||c===o||!o?ASe(l,a):kSe(l,a,o)})}_canBeAligned(e){return this.editor.model.schema.checkAttribute(e,p4)}}function ASe(i,e){for(const t of i)e.removeAttribute(p4,t)}function kSe(i,e,t){for(const n of i)e.setAttribute(p4,t,n)}class SSe extends be{static get pluginName(){return"AlignmentEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("alignment",{options:m4.map(t=>({name:t}))})}init(){const e=this.editor,t=e.locale,n=e.model.schema,s=EK(e.config.get("alignment.options")).filter(c=>CK(c.name)&&!DK(c.name,t)),o=s.some(c=>!!c.className);n.extend("$block",{allowAttributes:"alignment"}),e.model.schema.setAttributeProperties("alignment",{isFormatting:!0}),o?e.conversion.attributeToAttribute(FSe(s)):e.conversion.for("downcast").attributeToAttribute(PSe(s));const a=ISe(s);for(const c of a)e.conversion.for("upcast").attributeToAttribute(c);const l=RSe(s);for(const c of l)e.conversion.for("upcast").attributeToAttribute(c);e.commands.add("alignment",new TSe(e))}}function PSe(i){const e={};for(const{name:n}of i)e[n]={key:"style",value:{"text-align":n}};return{model:{key:"alignment",values:i.map(n=>n.name)},view:e}}function ISe(i){const e=[];for(const{name:t}of i)e.push({view:{key:"style",value:{"text-align":t}},model:{key:"alignment",value:t}});return e}function RSe(i){const e=[];for(const{name:t}of i)e.push({view:{key:"align",value:t},model:{key:"alignment",value:t}});return e}function FSe(i){const e={};
40for(const n of i)e[n.name]={key:"class",value:n.className};return{model:{key:"alignment",values:i.map(n=>n.name)},view:e}}const gp=new Map([["left",i4],["right",zY],["center",VY],["justify",jY]]);class OSe extends be{get localizedOptionTitles(){const e=this.editor.t;return{left:e("Align left"),right:e("Align right"),center:e("Align center"),justify:e("Justify")}}static get pluginName(){return"AlignmentUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=EK(e.config.get("alignment.options"));t.map(n=>n.name).filter(CK).forEach(n=>this._addButton(n)),this._addToolbarDropdown(t),this._addMenuBarMenu(t)}_addButton(e){this.editor.ui.componentFactory.add(`alignment:${e}`,n=>this._createButton(n,e))}_createButton(e,t,n={}){const r=this.editor,s=r.commands.get("alignment"),o=new nt(e);return o.set({label:this.localizedOptionTitles[t],icon:gp.get(t),tooltip:!0,isToggleable:!0,...n}),o.bind("isEnabled").to(s),o.bind("isOn").to(s,"value",a=>a===t),this.listenTo(o,"execute",()=>{r.execute("alignment",{value:t}),r.editing.view.focus()}),o}_addToolbarDropdown(e){const t=this.editor;t.ui.componentFactory.add("alignment",r=>{const s=zi(r),o=r.uiLanguageDirection==="rtl"?"w":"e",a=r.t;A0(s,()=>e.map(d=>this._createButton(r,d.name,{tooltipPosition:o})),{enableActiveItemFocusOnDropdownOpen:!0,isVertical:!0,ariaLabel:a("Text alignment toolbar")}),s.buttonView.set({label:a("Text alignment"),tooltip:!0}),s.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const l=r.contentLanguageDirection==="rtl"?gp.get("right"):gp.get("left"),c=t.commands.get("alignment");return s.buttonView.bind("icon").to(c,"value",d=>gp.get(d)||l),s.bind("isEnabled").to(c,"isEnabled"),this.listenTo(s,"execute",()=>{t.editing.view.focus()}),s})}_addMenuBarMenu(e){const t=this.editor;t.ui.componentFactory.add("menuBar:alignment",n=>{const r=t.commands.get("alignment"),s=n.t,o=new ls(n),a=new Ol(n);o.bind("isEnabled").to(r),a.set({ariaLabel:s("Text alignment"),role:"menu"}),o.buttonView.set({label:s("Text alignment")});for(const l of e){const c=new Sa(n,o),d=new gn(n);d.delegate("execute").to(o),d.set({label:this.localizedOptionTitles[l.name],icon:gp.get(l.name),role:"menuitemcheckbox",isToggleable:!0}),d.on("execute",()=>{t.execute("alignment",{value:l.name}),t.editing.view.focus()}),d.bind("isOn").to(r,"value",f=>f===l.name),d.bind("isEnabled").to(r,"isEnabled"),c.children.add(d),a.items.add(c)}return o.panelView.children.add(a),o})}}class NSe extends be{static get requires(){return[SSe,OSe]}static get pluginName(){return"Alignment"}static get isOfficialPlugin(){return!0}}class TK{model;limit;_isLocked;_size;_batch=null;_changeCallback;_selectionChangeCallback;constructor(e,t=20){this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(n,r)=>{r.isLocal&&r.isUndoable&&r!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(e){this._size+=e,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e=!1){(!this.isLocked||e)&&(this._batch=null,this._size=0)}}class BSe extends ut{_buffer;constructor(e,t){super(e),this._buffer=new TK(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,n=t.document,r=e.text||"",s=r.length;let o=n.selection;if(e.selection?o=e.selection:e.range&&(o=t.createSelection(e.range)),!t.canEditAt(o))return;const a=e.resultRange;t.enqueueChange(this._buffer.batch,l=>{this._buffer.lock();const c=Array.from(n.selection.getAttributes());t.deleteContent(o),r&&t.insertContent(l.createText(r,c),o),a?l.setSelection(a):o.is("documentSelection")||l.setSelection(o),this._buffer.unlock(),this._buffer.input(s)})}}const AK=["insertText","insertReplacementText"],MSe=[...AK,"insertCompositionText"];class LSe extends Oa{focusObserver;constructor(e){super(e),this.focusObserver=e.getObserver(Yw);const t=ot.isAndroid?MSe:AK,n=e.document;n.on("beforeinput",(r,s)=>{if(!this.isEnabled)return;const{data:o,targetRanges:a,inputType:l,domEvent:c,isComposing:d}=s;
40if(!t.includes(l))return;this.focusObserver.flush();const f=new Il(n,"insertText");n.fire(f,new cd(e,c,{text:o,selection:e.createSelection(a),isComposing:d})),f.stop.called&&r.stop()}),ot.isAndroid||n.on("compositionend",(r,{data:s,domEvent:o})=>{this.isEnabled&&s&&n.fire("insertText",new cd(e,o,{text:s,isComposing:!0}))},{priority:"low"})}observe(){}stopObserving(){}}class kK extends be{_typingQueue;static get pluginName(){return"Input"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model,n=e.editing.view,r=e.editing.mapper,s=t.document.selection;this._typingQueue=new USe(e),n.addObserver(LSe);const o=new BSe(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",o),e.commands.add("input",o),this.listenTo(n.document,"beforeinput",()=>{this._typingQueue.flush("next beforeinput")},{priority:"high"}),this.listenTo(n.document,"insertText",(a,l)=>{const{text:c,selection:d}=l;if(n.document.selection.isFake&&d&&n.document.selection.isSimilar(d)&&l.preventDefault(),d&&Array.from(d.getRanges()).some(g=>!g.isCollapsed)&&l.preventDefault(),!o.isEnabled){l.preventDefault();return}let f;d&&(f=Array.from(d.getRanges()).filter(g=>g.root.is("rootElement")).map(g=>r.toModelRange(g)).map(g=>Z3(g,t.schema)||g)),(!f||!f.length)&&(f=Array.from(s.getRanges()));let m=c;if(ot.isAndroid){const g=Array.from(f[0].getItems()).reduce((y,v)=>y+(v.is("$textProxy")?v.data:""),"");if(g&&(g.length<=m.length?m.startsWith(g)&&(m=m.substring(g.length),f[0].start=f[0].start.getShiftedBy(g.length)):g.startsWith(m)&&(f[0].start=f[0].start.getShiftedBy(m.length),m="")),m.length==0&&f[0].isCollapsed)return}const p={text:m,selection:t.createSelection(f)};this._typingQueue.push(p,!!l.isComposing),l.domEvent.defaultPrevented&&this._typingQueue.flush("beforeinput default prevented")}),ot.isAndroid?this.listenTo(n.document,"keydown",(a,l)=>{s.isCollapsed||l.keyCode!=229||!n.document.isComposing||M7(t,o)}):this.listenTo(n.document,"compositionstart",()=>{s.isCollapsed||M7(t,o)},{priority:"high"}),this.listenTo(n.document,"mutations",(a,{mutations:l})=>{if(this._typingQueue.hasAffectedElements())for(const{node:c}of l){const d=jSe(c,r),f=r.toModelElement(d);if(this._typingQueue.isElementAffected(f)){this._typingQueue.flush("mutations");return}}}),this.listenTo(n.document,"compositionend",()=>{this._typingQueue.flush("before composition end")},{priority:"high"}),this.listenTo(n.document,"compositionend",()=>{this._typingQueue.flush("after composition end");const a=[];if(this._typingQueue.hasAffectedElements())for(const l of this._typingQueue.flushAffectedElements()){const c=r.toViewElement(l);c&&a.push({type:"children",node:c})}(a.length||!ot.isAndroid)&&n.document.fire("mutations",{mutations:a})},{priority:"lowest"})}destroy(){super.destroy(),this._typingQueue.destroy()}}class USe{editor;flushDebounced=fo(()=>this.flush("timeout"),50);_queue=[];_isComposing=!1;_affectedElements=new Set;constructor(e){this.editor=e}destroy(){for(this.flushDebounced.cancel(),this._affectedElements.clear();this._queue.length;)this.shift()}get length(){return this._queue.length}push(e,t){const n={text:e.text};if(e.selection){n.selectionRanges=[];for(const r of e.selection.getRanges())n.selectionRanges.push(is.fromRange(r)),this._affectedElements.add(r.start.parent)}this._queue.push(n),this._isComposing||=t,this.flushDebounced()}shift(){const e=this._queue.shift(),t={text:e.text};if(e.selectionRanges){const n=e.selectionRanges.map(r=>VSe(r)).filter(r=>!!r);n.length&&(t.selection=this.editor.model.createSelection(n))}return t}flush(e){const t=this.editor,n=t.model,r=t.editing.view;if(this.flushDebounced.cancel(),!this._queue.length)return;const o=t.commands.get("insertText").buffer;n.enqueueChange(o.batch,()=>{for(o.lock();this._queue.length;){const a=this.shift();t.execute("insertText",a)}o.unlock(),this._isComposing||this._affectedElements.clear(),this._isComposing=!1}),r.scrollToTheSelection()}isElementAffected(e){return this._affectedElements.has(e)}hasAffectedElements(){return this._affectedElements.size>0}flushAffectedElements(){const e=Array.from(this._affectedElements);return this._affectedElements.clear(),e}}function M7(i,e){if(!e.isEnabled)return;const t=e.buffer;t.lock(),i.enqueueChange(t.batch,()=>{i.deleteContent(i.document.selection)}),t.unlock()}function VSe(i){const e=i.toRange();return i.detach(),e.root.rootName=="$graveyard"?null:e}function jSe(i,e){let t=i.is("$text")?i.parent:i;for(;!e.toModelElement(t);)t=t.parent;return t}class L7 extends ut{direction;_buffer;constructor(e,t){super(e),this.direction=t,this._buffer=new TK(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,n=t.document;t.enqueueChange(this._buffer.batch,r=>{this._buffer.lock();const s=r.createSelection(e.selection||n.selection);if(!t.canEditAt(s))return;const o=e.sequence||1,a=s.isCollapsed;if(s.isCollapsed&&t.modifySelection(s,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(o)){this._replaceEntireContentWithParagraph(r);return}if(this._shouldReplaceFirstBlockWithParagraph(s,o)){this.editor.execute("paragraph",{selection:s});return}if(s.isCollapsed)return;let l=0;
40s.getFirstRange().getMinimalFlatRanges().forEach(c=>{l+=lS(c.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(s,{doNotResetEntireContent:a,direction:this.direction}),this._buffer.input(l),r.setSelection(s),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,r=t.document.selection,s=t.schema.getLimitElement(r);if(!(r.isCollapsed&&r.containsEntireContent(s))||!t.schema.checkChild(s,"paragraph"))return!1;const a=s.getChild(0);return!(a&&a.is("element","paragraph"))}_replaceEntireContentWithParagraph(e){const t=this.editor.model,r=t.document.selection,s=t.schema.getLimitElement(r),o=e.createElement("paragraph");e.remove(e.createRangeIn(s)),e.insert(o,s),e.setSelection(o,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const n=this.editor.model;if(t>1||this.direction!="backward"||!e.isCollapsed)return!1;const r=e.getFirstPosition(),s=n.schema.getLimitElement(r),o=s.getChild(0);return!(r.parent!=o||!e.containsEntireContent(o)||!n.schema.checkChild(s,"paragraph")||o.name=="paragraph")}}const zSe="character",U7="word",WSe="codePoint",Ec="selection",Hf="backward",zp="forward",SK={deleteContent:{unit:Ec,direction:Hf},deleteContentBackward:{unit:WSe,direction:Hf},deleteWordBackward:{unit:U7,direction:Hf},deleteHardLineBackward:{unit:Ec,direction:Hf},deleteSoftLineBackward:{unit:Ec,direction:Hf},deleteContentForward:{unit:zSe,direction:zp},deleteWordForward:{unit:U7,direction:zp},deleteHardLineForward:{unit:Ec,direction:zp},deleteSoftLineForward:{unit:Ec,direction:zp}};class HSe extends Oa{constructor(e){super(e);const t=e.document;let n=0;t.on("keydown",()=>{n++}),t.on("keyup",()=>{n=0}),t.on("beforeinput",(r,s)=>{if(!this.isEnabled)return;const{targetRanges:o,domEvent:a,inputType:l}=s,c=SK[l];if(!c)return;const d={direction:c.direction,unit:c.unit,sequence:n};d.unit==Ec&&(d.selectionToRemove=e.createSelection(o[0])),l==="deleteContentBackward"&&(ot.isAndroid&&(d.sequence=1),$Se(o)&&(d.unit=Ec,d.selectionToRemove=e.createSelection(o)));const f=new bd(t,"delete",o[0]);t.fire(f,new cd(e,a,d)),f.stop.called&&r.stop()}),ot.isBlink&&qSe(this)}observe(){}stopObserving(){}}function qSe(i){const e=i.view,t=e.document;let n=null,r=!1;t.on("keydown",(a,{keyCode:l})=>{n=l,r=!1}),t.on("keyup",(a,{keyCode:l,domEvent:c})=>{const d=t.selection,f=i.isEnabled&&l==n&&s(l)&&!d.isCollapsed&&!r;if(n=null,f){const m=d.getFirstRange(),p=new bd(t,"delete",m),g={unit:Ec,direction:o(l),selectionToRemove:d};t.fire(p,new cd(e,c,g))}}),t.on("beforeinput",(a,{inputType:l})=>{const c=SK[l];s(n)&&c&&c.direction==o(n)&&(r=!0)},{priority:"high"}),t.on("beforeinput",(a,{inputType:l,data:c})=>{n==At.delete&&l=="insertText"&&c=="�"&&a.stop()},{priority:"high"});function s(a){return a==At.backspace||a==At.delete}function o(a){return a==At.backspace?Hf:zp}}function $Se(i){if(i.length!=1||i[0].isCollapsed)return!1;const e=i[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let t=0;for(const{nextPosition:n,item:r}of e){if(n.parent.is("$text")){const s=n.parent.data,o=n.offset;if(j3(s,o)||z3(s,o)||LG(s,o))continue;t++}else(r.is("containerElement")||r.is("emptyElement"))&&t++;if(t>1)return!0}return!1}class Nl extends be{_undoOnBackspace;static get pluginName(){return"Delete"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,n=t.document,r=e.model.document;t.addObserver(HSe),this._undoOnBackspace=!1;const s=new L7(e,"forward");e.commands.add("deleteForward",s),e.commands.add("forwardDelete",s),e.commands.add("delete",new L7(e,"backward")),this.listenTo(n,"delete",(o,a)=>{n.isComposing||a.preventDefault();const{direction:l,sequence:c,selectionToRemove:d,unit:f}=a,m=l==="forward"?"deleteForward":"delete",p={sequence:c};if(f=="selection"){const g=Array.from(d.getRanges()).map(y=>e.editing.mapper.toModelRange(y)).map(y=>Z3(y,e.model.schema)||y);p.selection=e.model.createSelection(g)}else p.unit=f;e.execute(m,p),t.scrollToTheSelection()},{priority:"low"}),this.listenTo(n,"keydown",(o,a)=>{if(n.isComposing||a.keyCode!=At.backspace||!r.selection.isCollapsed)return;const l=e.model.schema.getLimitElement(r.selection),c=e.model.createPositionAt(l,0);if(c.isTouching(r.selection.getFirstPosition())){a.preventDefault();const d=e.model.schema.getNearestSelectionRange(c,"forward");if(!d)return;const f=t.createSelection(e.editing.mapper.toViewRange(d)),m=f.getFirstRange(),p=new bd(document,"delete",m),g={unit:"selection",direction:"backward",selectionToRemove:f};n.fire(p,new cd(t,a.domEvent,g))}}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",(o,a)=>
40{this._undoOnBackspace&&a.direction=="backward"&&a.sequence==1&&a.unit=="codePoint"&&(this._undoOnBackspace=!1,e.execute("undo"),a.preventDefault(),o.stop())},{context:"$capture"}),this.listenTo(r,"change",()=>{this._undoOnBackspace=!1}))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class PK extends be{static get requires(){return[kK,Nl]}static get pluginName(){return"Typing"}static get isOfficialPlugin(){return!0}}function IK(i,e){let t=i.start;return{text:Array.from(i.getWalker({ignoreElementEnd:!1})).reduce((r,{item:s})=>s.is("$text")||s.is("$textProxy")?r+s.data:(t=e.createPositionAfter(s),""),""),range:e.createRange(t,i.end)}}class RK extends hn(){model;testCallback;_hasMatch;constructor(e,t){super(),this.model=e,this.testCallback=t,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))}),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const t=this.model.document;this.listenTo(t.selection,"change:range",(n,{directChange:r})=>{if(r){if(!t.selection.isCollapsed){this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1);return}this._evaluateTextBeforeSelection("selection")}}),this.listenTo(t,"change:data",(n,r)=>{r.isUndo||!r.isLocal||this._evaluateTextBeforeSelection("data",{batch:r})})}_evaluateTextBeforeSelection(e,t={}){const n=this.model,s=n.document.selection,o=n.createRange(n.createPositionAt(s.focus.parent,0),s.focus),{text:a,range:l}=IK(o,n),c=this.testCallback(a);if(!c&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!c,c){const d=Object.assign(t,{text:a,range:l});typeof c=="object"&&Object.assign(d,c),this.fire(`matched:${e}`,d)}}}class tx extends be{attributes;_overrideUid;_isNextGravityRestorationSkipped=!1;static get pluginName(){return"TwoStepCaretMovement"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,n=e.editing.view,r=e.locale,s=t.document.selection;this.listenTo(n.document,"arrowKey",(o,a)=>{if(!s.isCollapsed||a.shiftKey||a.altKey||a.ctrlKey)return;const l=a.keyCode==At.arrowright,c=a.keyCode==At.arrowleft;if(!l&&!c)return;const d=r.contentLanguageDirection;let f=!1;d==="ltr"&&l||d==="rtl"&&c?f=this._handleForwardMovement(a):f=this._handleBackwardMovement(a),f===!0&&o.stop()},{context:"$text",priority:"highest"}),this.listenTo(s,"change:range",(o,a)=>{if(this._isNextGravityRestorationSkipped){this._isNextGravityRestorationSkipped=!1;return}this._isGravityOverridden&&(!a.directChange&&no(s.getFirstPosition(),this.attributes)||this._restoreGravity())}),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,n=this.editor.model,r=n.document.selection,s=r.getFirstPosition();return this._isGravityOverridden||s.isAtStart&&ll(r,t)?!1:no(s,t)?(e&&yp(e),ll(r,t)&&no(s,t,!0)?bp(n,t):this._overrideGravity(),!0):!1}_handleBackwardMovement(e){const t=this.attributes,n=this.editor.model,r=n.document.selection,s=r.getFirstPosition();return this._isGravityOverridden?(e&&yp(e),this._restoreGravity(),no(s,t,!0)?bp(n,t):Fy(n,t,s),!0):s.isAtStart?ll(r,t)?(e&&yp(e),Fy(n,t,s),!0):!1:!ll(r,t)&&no(s,t,!0)?(e&&yp(e),Fy(n,t,s),!0):V7(s,t)?s.isAtEnd&&!ll(r,t)&&no(s,t)?(e&&yp(e),Fy(n,t,s),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):!1}_enableClickingAfterNode(){const e=this.editor,t=e.model,n=t.document.selection,r=e.editing.view.document;e.editing.view.addObserver(e4),e.editing.view.addObserver(CEe);let s=!1,o=!1;this.listenTo(r,"touchstart",()=>{o=!1,s=!0}),this.listenTo(r,"mousedown",()=>{o=!0}),this.listenTo(r,"selectionChange",()=>{const a=this.attributes;if(!o&&!s||(o=!1,s=!1,!n.isCollapsed)||!ll(n,a))return;const l=n.getFirstPosition();no(l,a)&&(l.isAtStart||no(l,a,!0)?bp(t,a):this._isGravityOverridden||this._overrideGravity())})}_enableInsertContentSelectionAttributesFixer(){const t=this.editor.model,n=t.document.selection,r=this.attributes;this.listenTo(t,"insertContent",()=>{const s=n.getFirstPosition();ll(n,r)&&no(s,r)&&bp(t,r)},{priority:"low"})}_handleDeleteContentAfterNode(){const e=this.editor,t=e.model,n=t.document.selection,r=e.editing.view;let s=!1,o=!1;this.listenTo(r.document,"delete",(a,l)=>{s=l.direction==="backward"},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{if(!s)return;const a=n.getFirstPosition();o=ll(n,this.attributes)&&!V7(a,this.attributes)},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{s&&(s=!1,!o&&e.model.enqueueChange(()=>{const a=n.getFirstPosition();ll(n,this.attributes)&&no(a,this.attributes)&&(a.isAtStart||no(a,this.attributes,!0)?bp(t,this.attributes):this._isGravityOverridden||this._overrideGravity())}))},{priority:"low"})}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change(e=>e.overrideSelectionGravity())}_restoreGravity(){this.editor.model.change(e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}}function ll(i,e){for(const t of e)if(i.hasAttribute(t))return!0;return!1}function Fy(i,e,t){const n=t.nodeBefore;i.change(r=>{if(n){const s=[],o=i.schema.isObject(n)&&i.schema.isInline(n);for(const[a,l]of n.getAttributes())i.schema.checkAttribute("$text",a)&&(!o||i.schema.getAttributeProperties(a).copyFromObject!==!1)&&s.push([a,l]);r.setSelectionAttribute(s)}else r.removeSelectionAttribute(e)})}function bp(i,e){i.change(t=>{t.removeSelectionAttribute(e)})}function yp(i){i.preventDefault()}function V7(i,e){const t=i.getShiftedBy(-1);return no(t,e)}function no(i,e,t=!1){const{nodeBefore:n,nodeAfter:r}=i;for(const s of e){const o=n?n.getAttribute(s):void 0,a=r?r.getAttribute(s):void 0;if(!(t&&(o===void 0||a===void 0))&&a!==o)return!0}return!1}function k_(i,e,t,n){return n.createRange(j7(i,e,t,!0,n),j7(i,e,t,!1,n))}function j7(i,e,t,n,r){let s=i.textNode||(n?i.nodeBefore:i.nodeAfter),o=null;for(;s&&s.getAttribute(e)==t;)o=s,s=n?s.previousSibling:s.nextSibling;return o?r.createPositionAt(o,n?"before":"after"):i}function FK(i,e,t,n){const r=i.editing.view,s=new Set;r.document.registerPostFixer(o=>{const a=i.model.document.selection;let l=!1;if(a.hasAttribute(e)){const c=k_(a.getFirstPosition(),e,a.getAttribute(e),i.model),d=i.editing.mapper.toViewRange(c);for(const f of d.getItems())f.is("element",t)&&!f.hasClass(n)&&(o.addClass(n,f),s.add(f),l=!0)}return l}),i.conversion.for("editingDowncast").add(o=>{o.on("insert",a,{priority:"highest"}),o.on("remove",a,{priority:"highest"}),o.on("attribute",a,{priority:"highest"}),o.on("selection",a,{priority:"highest"});function a(){r.change(l=>{for(const c of s.values())l.removeClass(n,c),s.delete(c)})}})}function yc(i,e,t,n){let r,s=null;typeof n=="function"?r=n:(s=i.commands.get(n),r=()=>{i.execute(n)}),i.model.document.on("change:data",(o,a)=>
40{if(s&&!s.isEnabled||!e.isEnabled)return;const l=Rn(i.model.document.selection.getRanges());if(!l.isCollapsed||a.isUndo||!a.isLocal)return;const c=Array.from(i.model.document.differ.getChanges()),d=c[0];if(c.length!=1||d.type!=="insert"||d.name!="$text"||d.length!=1)return;const f=d.position.parent;if(f.is("element","codeBlock")||f.is("element","listItem")&&typeof n!="function"&&!["numberedList","bulletedList","todoList"].includes(n)||s&&s.value===!0)return;const m=f.getChild(0),p=i.model.createRangeOn(m);if(!p.containsRange(l)&&!l.end.isEqual(p.end))return;const g=t.exec(m.data.substr(0,l.end.offset));g&&i.model.enqueueChange(y=>{const v=i.model.document.selection,x=y.createPositionAt(f,0),C=y.createPositionAt(f,g[0].length),D=new is(x,C);if(r({match:g})!==!1){const T=Array.from(v.getAttributes());y.remove(D);const S=v.getFirstRange(),A=y.createRangeIn(f);f.isEmpty&&!A.isEqual(S)&&!A.containsRange(S,!0)&&y.remove(f),GSe(y,v,T)}D.detach(),i.model.enqueueChange(()=>{i.plugins.get("Delete").requestUndoOnBackspace()})})})}function GSe(i,e,t){const n=i.model.schema,r=e.getFirstPosition();let s=new _l(r);n.checkChild(s,"$text")&&(s=s.push("$text"));for(const[o,a]of t)n.checkAttribute(s,o)&&i.setSelectionAttribute(o,a)}function Tf(i,e,t,n){let r,s;t instanceof RegExp?r=t:s=t,s=s||(o=>{let a;const l=[],c=[];for(;(a=r.exec(o))!==null&&!(a&&a.length<4);){let{index:d,"1":f,"2":m,"3":p}=a;const g=f+m+p;d+=a[0].length-g.length;const y=[d,d+f.length],v=[d+f.length+m.length,d+f.length+m.length+p.length];l.push(y),l.push(v),c.push([d+f.length,d+f.length+m.length])}return{remove:l,format:c}}),i.model.document.on("change:data",(o,a)=>{if(a.isUndo||!a.isLocal||!e.isEnabled)return;const l=i.model,c=l.document.selection;if(!c.isCollapsed)return;const d=Array.from(l.document.differ.getChanges()),f=d[0];if(d.length!=1||f.type!=="insert"||f.name!="$text"||f.length!=1)return;const m=c.focus,p=m.parent,{text:g,range:y}=YSe(l.createRange(l.createPositionAt(p,0),m),l),v=s(g),x=z7(y.start,v.format,l),C=z7(y.start,v.remove,l);x.length&&C.length&&l.enqueueChange(D=>{if(n(D,x)!==!1){for(const T of C.reverse())D.remove(T);l.enqueueChange(()=>{i.plugins.get("Delete").requestUndoOnBackspace()})}})})}function z7(i,e,t){return e.filter(n=>n[0]!==void 0&&n[1]!==void 0).map(n=>t.createRange(i.getShiftedBy(n[0]),i.getShiftedBy(n[1])))}function YSe(i,e){let t=i.start;return{text:Array.from(i.getItems()).reduce((r,s)=>!(s.is("$text")||s.is("$textProxy"))||s.getAttribute("code")?(t=e.createPositionAfter(s),""):r+s.data,""),range:e.createRange(t,i.end)}}class KSe extends be{static get requires(){return[Nl]}static get pluginName(){return"Autoformat"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,t=this.editor.t;this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats(),this._addCodeBlockAutoformats(),this._addHorizontalLineAutoformats(),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Revert autoformatting action"),keystroke:"Backspace"}]})}_addListAutoformats(){const e=this.editor.commands;e.get("bulletedList")&&yc(this.editor,this,/^[*-]\s$/,"bulletedList"),e.get("numberedList")&&yc(this.editor,this,/^1[.|)]\s$/,"numberedList"),e.get("todoList")&&yc(this.editor,this,/^\[\s?\]\s$/,"todoList"),e.get("checkTodoList")&&yc(this.editor,this,/^\[\s?x\s?\]\s$/,()=>{this.editor.execute("todoList"),this.editor.execute("checkTodoList")})}_addBasicStylesAutoformats(){const e=this.editor.commands;if(e.get("bold")){const t=Oy(this.editor,"bold");Tf(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,t),Tf(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,t)}if(e.get("italic")){const t=Oy(this.editor,"italic");Tf(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,t),Tf(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,t)}if(e.get("code")){const t=Oy(this.editor,"code");Tf(this.editor,this,/(`)([^`]+)(`)$/g,t)}if(e.get("strikethrough")){const t=Oy(this.editor,"strikethrough");Tf(this.editor,this,/(~~)([^~]+)(~~)$/g,t)}}_addHeadingAutoformats(){const e=this.editor.commands.get("heading");e&&e.modelElements.filter(t=>
40t.match(/^heading[1-6]$/)).forEach(t=>{const n=t[7],r=new RegExp(`^(#{${n}})\\s$`);yc(this.editor,this,r,()=>{if(!e.isEnabled||e.value===t)return!1;this.editor.execute("heading",{value:t})})})}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&yc(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){const e=this.editor,t=e.model.document.selection;e.commands.get("codeBlock")&&yc(e,this,/^```$/,()=>{if(t.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})})}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&yc(this.editor,this,/^---$/,"horizontalLine")}}function Oy(i,e){return(t,n)=>{if(!i.commands.get(e).isEnabled)return!1;const s=i.model.schema.getValidRanges(n,e);for(const o of s)t.setAttribute(e,!0,o);t.removeSelectionAttribute(e)}}class wd extends ut{attributeKey;constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,r=t.document.selection,s=e.forceValue===void 0?!this.value:e.forceValue;t.change(o=>{if(r.isCollapsed)s?o.setSelectionAttribute(this.attributeKey,!0):o.removeSelectionAttribute(this.attributeKey);else{const a=t.schema.getValidRanges(r.getRanges(),this.attributeKey,{includeEmptyRanges:!0});for(const l of a){let c=l,d=this.attributeKey;l.isCollapsed&&(c=l.start.parent,d=us._getStoreAttributeKey(this.attributeKey)),s?o.setAttribute(d,s,c):o.removeAttribute(d,c)}}})}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,n=e.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const r of n.getRanges())for(const s of r.getItems())if(t.checkAttribute(s,this.attributeKey))return s.hasAttribute(this.attributeKey);return!1}}const Af="bold";class XSe extends be{static get pluginName(){return"BoldEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:Af}),e.model.schema.setAttributeProperties(Af,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Af,view:"strong",upcastAlso:["b",n=>{const r=n.getStyle("font-weight");return r&&(r=="bold"||Number(r)>=600)?{name:!0,styles:["font-weight"]}:null}]}),e.commands.add(Af,new wd(e,Af)),e.keystrokes.set("CTRL+B",Af),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Bold text"),keystroke:"CTRL+B"}]})}}function xd({editor:i,commandName:e,plugin:t,icon:n,label:r,keystroke:s}){return o=>{const a=i.commands.get(e),l=new o(i.locale);return l.set({label:r,icon:n,keystroke:s,isToggleable:!0}),l.bind("isEnabled").to(a,"isEnabled"),l.bind("isOn").to(a,"value"),l instanceof gn?l.set({role:"menuitemcheckbox"}):l.set({tooltip:!0}),t.listenTo(l,"execute",()=>{i.execute(e),i.editing.view.focus()}),l}}const $E="bold";class QSe extends be{static get pluginName(){return"BoldUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,n=xd({editor:e,commandName:$E,plugin:this,icon:WY,label:t("Bold"),keystroke:"CTRL+B"});e.ui.componentFactory.add($E,()=>n(nt)),e.ui.componentFactory.add("menuBar:"+$E,()=>n(gn))}}class ZSe extends be{static get requires(){return[XSe,QSe]}static get pluginName(){return"Bold"}static get isOfficialPlugin(){return!0}}const Tu="code",JSe="ck-code_selected";class e5e extends be{static get pluginName(){return"CodeEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[tx]}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:Tu}),e.model.schema.setAttributeProperties(Tu,{isFormatting:!0,copyOnEnter:!1}),e.conversion.attributeToElement({model:Tu,view:"code"}),e.commands.add(Tu,new wd(e,Tu)),e.plugins.get(tx).registerAttribute(Tu),FK(e,Tu,"code",JSe),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Move out of an inline code style"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}}const GE="code";class t5e extends be{static get pluginName(){return"CodeUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,n=xd({editor:e,commandName:GE,plugin:this,icon:_Te,label:t("Code")});e.ui.componentFactory.add(GE,()=>n(nt)),e.ui.componentFactory.add("menuBar:"+GE,()=>n(gn))}}class n5e extends be{static get requires(){return[e5e,t5e]}static get pluginName(){return"Code"}static get isOfficialPlugin(){return!0}}const kf="italic";class i5e extends be{static get pluginName(){return"ItalicEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:kf}),e.model.schema.setAttributeProperties(kf,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:kf,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(kf,new wd(e,kf)),e.keystrokes.set("CTRL+I",kf),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Italic text"),keystroke:"CTRL+I"}]})}}const YE="italic";class r5e extends be{static get pluginName(){return"ItalicUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,n=xd({editor:e,commandName:YE,plugin:this,icon:FTe,keystroke:"CTRL+I",label:t("Italic")});e.ui.componentFactory.add(YE,()=>n(nt)),e.ui.componentFactory.add("menuBar:"+YE,()=>n(gn))}}class s5e extends be{static get requires(){return[i5e,r5e]}static get pluginName(){return"Italic"}static get isOfficialPlugin(){return!0}}const vp="strikethrough";class o5e extends be{static get pluginName(){return"StrikethroughEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:vp}),e.model.schema.setAttributeProperties(vp,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:vp,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),e.commands.add(vp,new wd(e,vp)),e.keystrokes.set("CTRL+SHIFT+X","strikethrough"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Strikethrough text"),keystroke:"CTRL+SHIFT+X"}]})}}const KE="strikethrough";class a5e extends be{static get pluginName(){return"StrikethroughUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,n=xd({editor:e,commandName:KE,plugin:this,icon:sAe,keystroke:"CTRL+SHIFT+X",label:t("Strikethrough")});e.ui.componentFactory.add(KE,()=>n(nt)),e.ui.componentFactory.add("menuBar:"+KE,()=>n(gn))}}class l5e extends be{static get requires(){return[o5e,a5e]}static get pluginName(){return"Strikethrough"}static get isOfficialPlugin(){return!0}}const wp="subscript";class c5e extends be{static get pluginName(){return"SubscriptEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:wp}),e.model.schema.setAttributeProperties(wp,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:wp,view:"sub",upcastAlso:[{styles:{"vertical-align":"sub"}}]}),e.commands.add(wp,new wd(e,wp))}}const XE="subscript";class u5e extends be{static get pluginName(){return"SubscriptUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,n=xd({editor:e,commandName:XE,plugin:this,icon:oAe,label:t("Subscript")});e.ui.componentFactory.add(XE,()=>n(nt)),e.ui.componentFactory.add("menuBar:"+XE,()=>n(gn))}}class d5e extends be{static get requires(){return[c5e,u5e]}static get pluginName(){return"Subscript"}static get isOfficialPlugin(){return!0}}const xp="superscript";class f5e extends be{static get pluginName(){return"SuperscriptEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:xp}),e.model.schema.setAttributeProperties(xp,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:xp,view:"sup",upcastAlso:[{styles:{"vertical-align":"super"}}]}),e.commands.add(xp,new wd(e,xp))}}const QE="superscript";class h5e extends be{static get pluginName(){return"SuperscriptUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,n=xd({editor:e,commandName:QE,plugin:this,icon:aAe,label:t("Superscript")});e.ui.componentFactory.add(QE,()=>n(nt)),e.ui.componentFactory.add("menuBar:"+QE,()=>n(gn))}}class m5e extends be{static get requires(){return[f5e,h5e]}static get pluginName(){return"Superscript"}static get isOfficialPlugin(){return!0}}const _p="underline";class p5e extends be{static get pluginName(){return"UnderlineEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:_p}),e.model.schema.setAttributeProperties(_p,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:_p,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),e.commands.add(_p,new wd(e,_p)),e.keystrokes.set("CTRL+U","underline"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Underline text"),keystroke:"CTRL+U"}]})}}const ZE="underline";class g5e extends be{static get pluginName(){return"UnderlineUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t,n=xd({editor:e,commandName:ZE,plugin:this,icon:gAe,label:t("Underline"),keystroke:"CTRL+U"});e.ui.componentFactory.add(ZE,()=>n(nt)),e.ui.componentFactory.add("menuBar:"+ZE,()=>n(gn))}}class b5e extends be{static get requires(){return[p5e,g5e]}static get pluginName(){return"Underline"}static get isOfficialPlugin(){return!0}}function*OK(i,e){for(const t of e)t&&i.getAttributeProperties(t[0]).copyOnEnter&&(yield t)}class y5e extends ut{execute(){this.editor.model.change(e=>
40{this.enterBlock(e),this.fire("afterExecute",{writer:e})})}enterBlock(e){const t=this.editor.model,n=t.document.selection,r=t.schema,s=n.isCollapsed,o=n.getFirstRange(),a=o.start.parent,l=o.end.parent;if(r.isLimit(a)||r.isLimit(l))return!s&&a==l&&t.deleteContent(n),!1;if(s){const c=OK(e.model.schema,n.getAttributes());return W7(e,o.start),e.setSelectionAttribute(c),!0}else{const c=!(o.start.isAtStart&&o.end.isAtEnd),d=a==l;if(t.deleteContent(n,{leaveUnmerged:c}),c){if(d)return W7(e,n.focus),!0;e.setSelection(l,0)}}return!1}}function W7(i,e){i.split(e),i.setSelection(e.parent.nextSibling,0)}const v5e={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class NK extends Oa{constructor(e){super(e);const t=this.document;let n=!1;t.on("keydown",(r,s)=>{n=s.shiftKey}),t.on("beforeinput",(r,s)=>{if(!this.isEnabled)return;let o=s.inputType;ot.isSafari&&n&&o=="insertParagraph"&&(o="insertLineBreak");const a=s.domEvent,l=v5e[o];if(!l)return;const c=new bd(t,"enter",s.targetRanges[0]);t.fire(c,new cd(e,a,{isSoft:l.isSoft})),c.stop.called&&r.stop()})}observe(){}stopObserving(){}}class k0 extends be{static get pluginName(){return"Enter"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,n=t.document,r=this.editor.t;t.addObserver(NK),e.commands.add("enter",new y5e(e)),this.listenTo(n,"enter",(s,o)=>{n.isComposing||o.preventDefault(),!o.isSoft&&(e.execute("enter"),t.scrollToTheSelection())},{priority:"low"}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:r("Insert a hard break (a new paragraph)"),keystroke:"Enter"}]})}}class w5e extends ut{execute(){const e=this.editor.model,t=e.document;e.change(n=>{_5e(e,n,t.selection),this.fire("afterExecute",{writer:n})})}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=x5e(e.schema,t.selection)}}function x5e(i,e){if(e.rangeCount>1)return!1;const t=e.anchor;if(!t||!i.checkChild(t,"softBreak"))return!1;const n=e.getFirstRange(),r=n.start.parent,s=n.end.parent;return!((DS(r,i)||DS(s,i))&&r!==s)}function _5e(i,e,t){const n=t.isCollapsed,r=t.getFirstRange(),s=r.start.parent,o=r.end.parent,a=s==o;if(n){const l=OK(i.schema,t.getAttributes());H7(i,e,r.end),e.removeSelectionAttribute(t.getAttributeKeys()),e.setSelectionAttribute(l)}else{const l=!(r.start.isAtStart&&r.end.isAtEnd);i.deleteContent(t,{leaveUnmerged:l}),a?H7(i,e,t.focus):l&&e.setSelection(o,0)}}function H7(i,e,t){const n=e.createElement("softBreak");i.insertContent(n,t),e.setSelection(n,"after")}function DS(i,e){return i.is("rootElement")?!1:e.isLimit(i)||DS(i.parent,e)}class BK extends be{static get pluginName(){return"ShiftEnter"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model.schema,n=e.conversion,r=e.editing.view,s=r.document,o=this.editor.t;t.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(a,{writer:l})=>l.createEmptyElement("br")}),r.addObserver(NK),e.commands.add("shiftEnter",new w5e(e)),this.listenTo(s,"enter",(a,l)=>{s.isComposing||l.preventDefault(),l.isSoft&&(e.execute("shiftEnter"),r.scrollToTheSelection())},{priority:"low"}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert a soft break (a <code>&lt;br&gt;</code> element)"),keystroke:"Shift+Enter"}]})}}class C5e extends ut{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,n=t.schema,r=t.document.selection,s=Array.from(r.getSelectedBlocks()),o=e.forceValue===void 0?!this.value:e.forceValue;t.change(a=>{if(!o)this._removeQuote(a,s.filter(Ny));else{const l=s.filter(c=>Ny(c)||$7(n,c));this._applyQuote(a,l)}})}_getValue(){const e=this.editor.model.document.selection,t=Rn(e.getSelectedBlocks());return!!(t&&Ny(t))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,n=Rn(e.getSelectedBlocks());return n?$7(t,n):!1}_removeQuote(e,t){q7(e,t).reverse().forEach(n=>{if(n.start.isAtStart&&n.end.isAtEnd){e.unwrap(n.start.parent);return}if(n.start.isAtStart){const s=e.createPositionBefore(n.start.parent);e.move(n,s);return}n.end.isAtEnd||e.split(n.end);const r=e.createPositionAfter(n.end.parent);e.move(n,r)})}_applyQuote(e,t){const n=[];
40q7(e,t).reverse().forEach(r=>{let s=Ny(r.start);s||(s=e.createElement("blockQuote"),e.wrap(r,s)),n.push(s)}),n.reverse().reduce((r,s)=>r.nextSibling==s?(e.merge(e.createPositionAfter(r)),r):s)}}function Ny(i){return i.parent.name=="blockQuote"?i.parent:null}function q7(i,e){let t,n=0;const r=[];for(;n<e.length;){const s=e[n],o=e[n+1];t||(t=i.createPositionBefore(s)),(!o||s.nextSibling!=o)&&(r.push(i.createRange(t,i.createPositionAfter(s))),t=null),n++}return r}function $7(i,e){const t=i.checkChild(e.parent,"blockQuote"),n=i.checkChild(["$root","blockQuote"],e);return t&&n}class D5e extends be{static get pluginName(){return"BlockQuoteEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[k0,Nl]}init(){const e=this.editor,t=e.model.schema;e.commands.add("blockQuote",new C5e(e)),t.register("blockQuote",{inheritAllFrom:"$container"}),e.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),e.model.document.registerPostFixer(o=>{const a=e.model.document.differ.getChanges();for(const l of a)if(l.type=="insert"){const c=l.position.nodeAfter;if(!c)continue;if(c.is("element","blockQuote")&&c.isEmpty)return o.remove(c),!0;if(c.is("element","blockQuote")&&!t.checkChild(l.position,c))return o.unwrap(c),!0;if(c.is("element")){const d=o.createRangeIn(c);for(const f of d.getItems())if(f.is("element","blockQuote")&&!t.checkChild(o.createPositionBefore(f),f))return o.unwrap(f),!0}}else if(l.type=="remove"){const c=l.position.parent;if(c.is("element","blockQuote")&&c.isEmpty)return o.remove(c),!0}return!1});const n=this.editor.editing.view.document,r=e.model.document.selection,s=e.commands.get("blockQuote");this.listenTo(n,"enter",(o,a)=>{if(!r.isCollapsed||!s.value)return;r.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),a.preventDefault(),o.stop())},{context:"blockquote"}),this.listenTo(n,"delete",(o,a)=>{if(a.direction!="backward"||!r.isCollapsed||!s.value)return;const l=r.getLastPosition().parent;l.isEmpty&&!l.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),a.preventDefault(),o.stop())},{context:"blockquote"})}}class E5e extends be{static get pluginName(){return"BlockQuoteUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("blockQuote",()=>{const t=this._createButton(nt);return t.set({tooltip:!0}),t}),e.ui.componentFactory.add("menuBar:blockQuote",()=>{const t=this._createButton(gn);return t.set({role:"menuitemcheckbox"}),t})}_createButton(e){const t=this.editor,n=t.locale,r=t.commands.get("blockQuote"),s=new e(t.locale),o=n.t;return s.set({label:o("Block quote"),icon:ZTe,isToggleable:!0}),s.bind("isEnabled").to(r,"isEnabled"),s.bind("isOn").to(r,"value"),this.listenTo(s,"execute",()=>{t.execute("blockQuote"),t.editing.view.focus()}),s}}class T5e extends be{static get requires(){return[D5e,E5e]}static get pluginName(){return"BlockQuote"}static get isOfficialPlugin(){return!0}}class A5e extends Sn(){_stack=[];add(e,t){const n=this._stack,r=n[0];this._insertDescriptor(e);const s=n[0];r!==s&&!JE(r,s)&&this.fire("change:top",{oldDescriptor:r,newDescriptor:s,writer:t})}remove(e,t){const n=this._stack,r=n[0];this._removeDescriptor(e);const s=n[0];r!==s&&!JE(r,s)&&this.fire("change:top",{oldDescriptor:r,newDescriptor:s,writer:t})}_insertDescriptor(e){const t=this._stack,n=t.findIndex(s=>s.id===e.id);if(JE(e,t[n]))return;n>-1&&t.splice(n,1);let r=0;for(;t[r]&&k5e(t[r],e);)r++;t.splice(r,0,e)}_removeDescriptor(e){const t=this._stack,n=t.findIndex(r=>
40r.id===e);n>-1&&t.splice(n,1)}}function JE(i,e){return i&&e&&i.priority==e.priority&&nx(i.classes)==nx(e.classes)}function k5e(i,e){return i.priority>e.priority?!0:i.priority<e.priority?!1:nx(i.classes)>nx(e.classes)}function nx(i){return Array.isArray(i)?i.sort().join(","):i}const S5e="ck-widget",G7="ck-widget_selected";function Wn(i){return i.is("element")?!!i.getCustomProperty("widget"):!1}function _d(i,e,t={}){if(!i.is("containerElement"))throw new oe("widget-to-widget-wrong-element-type",null,{element:i});return e.setAttribute("contenteditable","false",i),e.addClass(S5e,i),e.setCustomProperty("widget",!0,i),i.getFillerOffset=O5e,e.setCustomProperty("widgetLabel",[],i),t.label&&R5e(i,t.label),t.hasSelectionHandle&&N5e(i,e),MK(i,e),i}function P5e(i,e,t){if(e.classes&&t.addClass(mn(e.classes),i),e.attributes)for(const n in e.attributes)t.setAttribute(n,e.attributes[n],i)}function I5e(i,e,t){if(e.classes&&t.removeClass(mn(e.classes),i),e.attributes)for(const n in e.attributes)t.removeAttribute(n,i)}function MK(i,e,t=P5e,n=I5e){const r=new A5e;r.on("change:top",(a,l)=>{l.oldDescriptor&&n(i,l.oldDescriptor,l.writer),l.newDescriptor&&t(i,l.newDescriptor,l.writer)});const s=(a,l,c)=>r.add(l,c),o=(a,l,c)=>r.remove(l,c);e.setCustomProperty("addHighlight",s,i),e.setCustomProperty("removeHighlight",o,i)}function R5e(i,e){i.getCustomProperty("widgetLabel").push(e)}function F5e(i){return i.getCustomProperty("widgetLabel").reduce((t,n)=>typeof n=="function"?t?t+". "+n():n():t?t+". "+n:n,"")}function g4(i,e,t={}){return e.addClass(["ck-editor__editable","ck-editor__nested-editable"],i),t.withAriaRole!==!1&&e.setAttribute("role","textbox",i),i.isReadOnly||e.setAttribute("tabindex","-1",i),t.label&&e.setAttribute("aria-label",t.label,i),e.setAttribute("contenteditable",i.isReadOnly?"false":"true",i),i.on("change:isReadOnly",(n,r,s)=>{e.setAttribute("contenteditable",s?"false":"true",i),s?e.removeAttribute("tabindex",i):e.setAttribute("tabindex","-1",i)}),i.on("change:isFocused",(n,r,s)=>{s?e.addClass("ck-editor__nested-editable_focused",i):e.removeClass("ck-editor__nested-editable_focused",i)}),MK(i,e),i}function S_(i,e){const t=i.getSelectedElement();if(t){const n=dl(i);if(n)return e.createRange(e.createPositionAt(t,n))}return e.schema.findOptimalInsertionRange(i)}function O5e(){return null}function N5e(i,e){const t=e.createUIElement("div",{class:"ck ck-widget__selection-handle"},function(n){const r=this.toDomElement(n),s=new Go;return s.set("content",ETe),s.render(),r.appendChild(s.element),r});e.insert(e.createPositionAt(i,0),t),e.addClass(["ck-widget_with-selection-handle"],i)}function b4(i){const e=a=>{const{width:l,paddingLeft:c,paddingRight:d}=a.ownerDocument.defaultView.getComputedStyle(a);return parseFloat(l)-(parseFloat(c)||0)-(parseFloat(d)||0)},t=i.parentElement;if(!t)return 0;let n=e(t);const r=5;let s=0,o=t;for(;isNaN(n);){if(o=o.parentElement,++s>r)return 0;n=e(o)}return n}function B5e(i,e=new gt(i)){const t=b4(i);return t?e.width/t*100:0}const ul="widget-type-around";function Au(i,e,t){return!!i&&Wn(i)&&!t.isInline(e)}function M5e(i){return i.closest(".ck-widget__type-around__button")}function L5e(i){return i.classList.contains("ck-widget__type-around__button_before")?"before":"after"}function U5e(i,e){const t=i.closest(".ck-widget");return e.mapDomToView(t)}function dl(i){return i.getAttribute(ul)}const LK=["before","after"],V5e=new DOMParser().parseFromString(eAe,"image/svg+xml").firstChild,Y7="ck-widget__type-around_disabled";class j5e extends be{_currentFakeCaretModelElement=null;static get pluginName(){return"WidgetTypeAround"}static get isOfficialPlugin(){return!0}static get requires(){return[k0,Nl]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",(n,r,s)=>{t.change(o=>{for(const a of t.document.roots)s?o.removeClass(Y7,a):o.addClass(Y7,a)}),s||e.model.change(o=>{o.removeSelectionAttribute(ul)})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const n=this.editor,r=n.editing.view,s=n.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);n.execute("insertParagraph",{position:n.model.createPositionAt(e,t),attributes:s}),r.focus(),r.scrollToTheSelection()}_listenToIfEnabled(e,t,n,r){this.listenTo(e,t,(...s)=>{this.isEnabled&&n(...s)},r)}_insertParagraphAccordingToFakeCaretPosition(){const n=this.editor.model.document.selection,r=
40dl(n);if(!r)return!1;const s=n.getSelectedElement();return this._insertParagraph(s,r),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,n=e.locale.t,r={before:n("Insert paragraph before block"),after:n("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",(s,o,a)=>{const l=a.mapper.toViewElement(o.item);l&&Au(l,o.item,t)&&(z5e(a.writer,r,l),l.getCustomProperty("widgetLabel").push(()=>this.isEnabled?n("Press Enter to type after or press Shift + Enter to type before the widget"):""))},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,n=t.document.selection,r=t.schema,s=e.editing.view;this._listenToIfEnabled(s.document,"arrowKey",(a,l)=>{this._handleArrowKeyPress(a,l)},{context:[Wn,"$text"],priority:"high"}),this._listenToIfEnabled(n,"change:range",(a,l)=>{l.directChange&&e.model.change(c=>{c.removeSelectionAttribute(ul)})}),this._listenToIfEnabled(t.document,"change:data",()=>{const a=n.getSelectedElement();if(a){const l=e.editing.mapper.toViewElement(a);if(Au(l,a,r))return}e.model.change(l=>{l.removeSelectionAttribute(ul)})}),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",(a,l,c)=>{const d=c.writer;if(this._currentFakeCaretModelElement){const g=c.mapper.toViewElement(this._currentFakeCaretModelElement);g&&(d.removeClass(LK.map(o),g),this._currentFakeCaretModelElement=null)}const f=l.selection.getSelectedElement();if(!f)return;const m=c.mapper.toViewElement(f);if(!Au(m,f,r))return;const p=dl(l.selection);p&&(d.addClass(o(p),m),this._currentFakeCaretModelElement=f)}),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",(a,l,c)=>{c||e.model.change(d=>{d.removeSelectionAttribute(ul)})});function o(a){return`ck-widget_type-around_show-fake-caret_${a}`}}_handleArrowKeyPress(e,t){const n=this.editor,r=n.model,s=r.document.selection,o=r.schema,a=n.editing.view;if(t.shiftKey)return;const l=t.keyCode,c=v_e(l,n.locale.contentLanguageDirection),d=a.document.selection.getSelectedElement(),f=n.editing.mapper.toModelElement(d);let m;Au(d,f,o)?m=this._handleArrowKeyPressOnSelectedWidget(c):s.isCollapsed?m=this._handleArrowKeyPressWhenSelectionNextToAWidget(c):t.shiftKey||(m=this._handleArrowKeyPressWhenNonCollapsedSelection(c)),m&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const n=this.editor.model,r=n.document.selection,s=dl(r);return n.change(o=>{if(s){if(!(s===(e?"after":"before")))return o.removeSelectionAttribute(ul),!0}else return o.setSelectionAttribute(ul,e?"after":"before"),!0;return!1})}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,n=t.model,r=n.schema,s=t.plugins.get("Widget"),o=s._getObjectElementNextToSelection(e),a=t.editing.mapper.toViewElement(o);return Au(a,o,r)?(n.change(l=>{s._setSelectionOverElement(o),l.setSelectionAttribute(ul,e?"before":"after")}),!0):!1}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,n=t.model,r=n.schema,s=t.editing.mapper,o=n.document.selection,a=e?o.getLastPosition().nodeBefore:o.getFirstPosition().nodeAfter,l=s.toViewElement(a);return Au(l,a,r)?(n.change(c=>{c.setSelection(a,"on"),c.setSelectionAttribute(ul,e?"after":"before")}),!0):!1}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",(n,r)=>{const s=M5e(r.domTarget);if(!s)return;const o=L5e(s),a=U5e(s,t.domConverter),l=e.editing.mapper.toModelElement(a);this._insertParagraph(l,o),r.preventDefault(),n.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,n=e.editing.view;this._listenToIfEnabled(n.document,"enter",(r,s)=>{if(r.eventPhase!="atTarget")return;const o=t.getSelectedElement(),a=e.editing.mapper.toViewElement(o),l=e.model.schema;let c;this._insertParagraphAccordingToFakeCaretPosition()?c=!0:Au(a,o,l)&&(this._insertParagraph(o,s.isSoft?"before":"after"),c=!0),c&&(s.preventDefault(),r.stop())},{context:Wn})}_enableInsertingParagraphsOnTypingKeystroke(){const t=this.editor.editing.view.document;this._listenToIfEnabled(t,"insertText",(n,r)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(r.selection=t.selection)},{priority:"high"}),ot.isAndroid?this._listenToIfEnabled(t,"keydown",(n,r)=>{r.keyCode==229&&this._insertParagraphAccordingToFakeCaretPosition()}):this._listenToIfEnabled(t,"compositionstart",()=>{this._insertParagraphAccordingToFakeCaretPosition()},{priority:"highest"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,n=e.model,r=n.schema;this._listenToIfEnabled(t.document,"delete",(s,o)=>
40{if(s.eventPhase!="atTarget")return;const a=dl(n.document.selection);if(!a)return;const l=o.direction,c=n.document.selection.getSelectedElement(),d=a==="before",f=l=="forward";if(d===f)e.execute("delete",{selection:n.createSelection(c,"on")});else{const p=r.getNearestSelectionRange(n.createPositionAt(c,a),l);if(p)if(!p.isCollapsed)n.change(g=>{g.setSelection(p),e.execute(f?"deleteForward":"delete")});else{const g=n.createSelection(p.start);if(n.modifySelection(g,{direction:l}),!g.focus.isEqual(p.start))n.change(y=>{y.setSelection(p),e.execute(f?"deleteForward":"delete")});else{const y=q5e(r,p.start.parent);n.deleteContent(n.createSelection(y,"on"),{doNotAutoparagraph:!0})}}}o.preventDefault(),s.stop()},{context:Wn})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,n=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",(r,[s,o])=>{if(o&&!o.is("documentSelection"))return;const a=dl(n);if(a)return r.stop(),t.change(l=>{const c=n.getSelectedElement(),d=t.createPositionAt(c,a),f=l.createSelection(d),m=t.insertContent(s,f);return l.setSelection(f),m})},{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,n=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",(r,s)=>{const[,o,a={}]=s;if(o&&!o.is("documentSelection"))return;const l=dl(n);l&&(a.findOptimalPosition=l,s[3]=a)},{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,n=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",(r,[s])=>{if(s&&!s.is("documentSelection"))return;dl(n)&&r.stop()},{priority:"high"})}}function z5e(i,e,t){const n=i.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},function(r){const s=this.toDomElement(r);return W5e(s,e),H5e(s),s});i.insert(i.createPositionAt(t,"end"),n)}function W5e(i,e){for(const t of LK){const n=new as({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${t}`],title:e[t],"aria-hidden":"true"},children:[i.ownerDocument.importNode(V5e,!0)]});i.appendChild(n.render())}}function H5e(i){const e=new as({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});i.appendChild(e.render())}function q5e(i,e){let t=e;for(const n of e.getAncestors({parentFirst:!0})){if(n.childCount>1||i.isLimit(n))break;t=n}return t}function $5e(i){const e=i.model;return(t,n)=>{const r=n.keyCode==At.arrowup,s=n.keyCode==At.arrowdown,o=n.shiftKey,a=e.document.selection;if(!r&&!s)return;const l=s,c=G5e(i,a,l);if(c){if(c.isCollapsed){if(a.isCollapsed)return;if(o)return}(c.isCollapsed||Y5e(i,c,l))&&(e.change(d=>{const f=l?c.end:c.start;if(o){const m=e.createSelection(a.anchor);m.setFocus(f),d.setSelection(m)}else d.setSelection(f)}),t.stop(),n.preventDefault(),n.stopPropagation())}}}function G5e(i,e,t){const n=i.model;if(t){const r=e.focus,s=K7(n,r,"forward");if(!s)return;const o=n.createRange(r,s),a=X7(n.schema,o,"backward");if(a)return n.createRange(r,a)}else{const r=e.focus,s=K7(n,r,"backward");if(!s)return;const o=n.createRange(s,r),a=X7(n.schema,o,"forward");if(a)return n.createRange(a,r)}}function K7(i,e,t){const n=i.schema,r=i.createRangeIn(e.root),s=t=="forward"?"elementStart":"elementEnd";for(const{previousPosition:o,item:a,type:l}of r.getWalker({startPosition:e,direction:t})){if(n.isLimit(a)&&!n.isInline(a))return o;if(l==s&&n.isBlock(a))return null}return null}function X7(i,e,t){const n=t=="backward"?e.end:e.start;if(i.checkChild(n,"$text"))return n;for(const{nextPosition:r}of e.getWalker({direction:t}))if(i.checkChild(r,"$text"))return r}function Y5e(i,e,t){const n=i.model,r=i.view.domConverter;if(t){const c=n.createSelection(e.start);n.modifySelection(c),!c.focus.isAtEnd&&!e.start.isEqual(c.focus)&&(e=n.createRange(c.focus,e.end))}const s=i.mapper.toViewRange(e),o=r.viewRangeToDom(s),a=gt.getDomRangeRects(o);let l;for(const c of a){if(l===void 0){l=Math.round(c.bottom);continue}if(Math.round(c.top)>=l)return!1;l=Math.max(l,Math.round(c.bottom))}return!0}class Qc extends be{_previouslySelected=new Set;static get pluginName(){return"Widget"}static get isOfficialPlugin(){return!0}static get requires(){return[j5e,Nl]}init(){const e=this.editor,t=e.editing.view,n=t.document,r=e.t;this.editor.editing.downcastDispatcher.on("selection",(s,o,a)=>{const l=a.writer,c=o.selection;if(c.isCollapsed)return;const d=c.getSelectedElement();if(!d)return;const f=e.editing.mapper.toViewElement(d);Wn(f)&&a.consumable.consume(c,"selection")&&l.setSelection(l.createRangeOn(f),{fake:!0,label:F5e(f)})}),this.editor.editing.downcastDispatcher.on("selection",(s,o,a)=>{this._clearPreviouslySelectedWidgets(a.writer);const l=a.writer,c=l.document.selection;let d=null;for(const f of c.getRanges())for(const m of f){const p=m.item;Wn(p)&&!J5e(p,d)&&(l.addClass(G7,p),this._previouslySelected.add(p),d=p)}},{priority:"low"}),t.addObserver(e4),t.addObserver(kY),this.listenTo(n,"mousedown",(...s)=>this._onMousedown(...s)),this.listenTo(n,"pointerdown",(...s)=>this._onPointerdown(...s)),this.listenTo(n,"arrowKey",(...s)=>
40{this._handleSelectionChangeOnArrowKeyPress(...s)},{context:[Wn,"$text"]}),this.listenTo(n,"arrowKey",(...s)=>{this._preventDefaultOnArrowKeyPress(...s)},{context:"$root"}),this.listenTo(n,"arrowKey",$5e(this.editor.editing),{context:"$text"}),this.listenTo(n,"delete",(s,o)=>{this._handleDelete(o.direction=="forward")&&(o.preventDefault(),s.stop())},{context:"$root"}),this.listenTo(n,"tab",(s,o)=>{this._selectNextEditable(o.shiftKey?"backward":"forward")&&(t.scrollToTheSelection(),o.preventDefault(),s.stop())},{context:s=>Wn(s)||s.is("editableElement"),priority:"low"}),this.listenTo(n,"keydown",(s,o)=>{o.keystroke==At.esc&&this._selectAncestorWidget()&&(o.preventDefault(),s.stop())},{context:s=>s.is("editableElement"),priority:"low"}),e.accessibility.addKeystrokeInfoGroup({id:"widget",label:r("Keystrokes that can be used when a widget is selected (for example: image, table, etc.)"),keystrokes:[{label:r("Move focus from an editable area back to the parent widget"),keystroke:"Esc"},{label:r("Insert a new paragraph directly after a widget"),keystroke:"Enter"},{label:r("Insert a new paragraph directly before a widget"),keystroke:"Shift+Enter"},{label:r("Move the caret to allow typing directly before a widget"),keystroke:[["arrowup"],["arrowleft"]]},{label:r("Move the caret to allow typing directly after a widget"),keystroke:[["arrowdown"],["arrowright"]]}]})}_onMousedown(e,t){const n=t.target;n&&t.domEvent.detail>=3&&this._selectBlockContent(n)&&t.preventDefault()}_onPointerdown(e,t){if(!t.domEvent.isPrimary)return;const n=this.editor,r=n.editing.view,s=r.document;let o=t.target;if(!o)return;if(!Wn(o)){const l=Q5e(o);if(!l)return;if(Wn(l))o=l;else{const c=Z5e(r,t);if(c&&Wn(c))o=c;else return}}(ot.isAndroid||ot.isiOS)&&t.preventDefault(),s.isFocused||r.focus();const a=n.editing.mapper.toModelElement(o);this._setSelectionOverElement(a)}_selectBlockContent(e){const t=this.editor,n=t.model,r=t.editing.mapper,s=n.schema,o=r.findMappedViewAncestor(this.editor.editing.view.createPositionAt(e,0)),a=e3e(r.toModelElement(o),n.schema);return a?(n.change(l=>{const c=s.isLimit(a)?null:t3e(l.createPositionAfter(a),s),d=l.createPositionAt(a,0),f=c?l.createPositionAt(c,0):l.createPositionAt(a,"end");l.setSelection(l.createRange(d,f))}),!0):!1}_handleSelectionChangeOnArrowKeyPress(e,t){const n=t.keyCode,r=this.editor.model,s=r.schema,o=r.document.selection,a=o.getSelectedElement(),l=w_(n,this.editor.locale.contentLanguageDirection),c=l=="down"||l=="right",d=l=="up"||l=="down";if(!t.shiftKey&&!o.isCollapsed){if(K5e(o,s)){const x=c?o.getLastPosition():o.getFirstPosition(),C=s.getNearestSelectionRange(x,c?"forward":"backward");C&&(r.change(D=>{D.setSelection(C)}),t.preventDefault(),e.stop())}return}const f=X5e(r,c),m=r.createSelection(f);if(r.modifySelection(m,{direction:c?"forward":"backward"}),m.isEqual(f))return;m.focus.isTouching(f.focus)&&r.modifySelection(m,{direction:c?"forward":"backward"});const p=c?f.focus.nodeBefore:f.focus.nodeAfter,g=m.focus.nodeBefore,y=m.focus.nodeAfter,v=c?g:y;if(t.shiftKey)(a&&s.isObject(a)||v&&s.isObject(v)||p&&s.isObject(p))&&(r.change(x=>{x.setSelection(m)}),t.preventDefault(),e.stop());else if(v&&s.isObject(v)){if(s.isInline(v)&&d)return;r.change(x=>{x.setSelection(v,"on")}),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const n=this.editor.model,r=n.schema,s=n.document.selection.getSelectedElement();s&&r.isObject(s)&&(t.preventDefault(),e.stop())}_handleDelete(e){const n=this.editor.model.document.selection;if(!this.editor.model.canEditAt(n)||!n.isCollapsed)return;const r=this._getObjectElementNextToSelection(e);if(r)return this.editor.model.change(s=>{let o=n.anchor.parent;for(;o.isEmpty;){const a=o;o=a.parent,s.remove(a)}this._setSelectionOverElement(r)}),!0}_setSelectionOverElement(e){this.editor.model.change(t=>{t.setSelection(t.createRangeOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,n=t.schema,r=t.document.selection,s=t.createSelection(r);if(t.modifySelection(s,{direction:e?"forward":"backward"}),s.isEqual(r))return null;const o=e?s.focus.nodeBefore:s.focus.nodeAfter;return o&&n.isObject(o)?o:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(G7,t);this._previouslySelected.clear()}_selectNextEditable(e){const t=this.editor.editing,n=t.view,r=this.editor.model,s=n.document.selection,o=r.document.selection;let a;if(o.rangeCount>1){const c=o.isBackward?o.getFirstRange():o.getLastRange();a=t.mapper.toViewPosition(e=="forward"?c.end:c.start)}else a=e=="forward"?s.getFirstPosition():s.getLastPosition();const l=this._findNextFocusRange(a,e);return l?(r.change(c=>{c.setSelection(l)}),!0):!1}_findNextFocusRange(e,t){const n=this.editor.editing,r=n.view,s=this.editor.model,o=r.document.selection,a=o.editableElement,l=a.getPath();let c=o.getSelectedElement();c&&!Wn(c)&&(c=null);const d=t=="forward"?r.createRange(e,r.createPositionAt(e.root,"end")):r.createRange(r.createPositionAt(e.root,0),e);for(const{nextPosition:f}of d.getWalker({direction:t})){const m=f.parent;if(Wn(m)&&m!=c){const p=n.mapper.toModelElement(m);if(!s.schema.isBlock(p))continue;if(ji(l,m.getPath())!="extension")return s.createRangeOn(p)}else if(m.is("editableElement")){if(m==a&&!c)continue;const p=n.mapper.toModelPosition(f),g=s.schema.getNearestSelectionRange(p,t);
40if(!g)continue;return m==a&&c?g:ji(l,m.getPath())!="extension"?s.createRangeIn(s.schema.getLimitElement(g)):g}}return null}_selectAncestorWidget(){const e=this.editor,t=e.editing.mapper,r=e.editing.view.document.selection.getFirstPosition().parent,o=(r.is("$text")?r.parent:r).findAncestor(Wn);if(!o)return!1;const a=t.toModelElement(o);return a?(e.model.change(l=>{l.setSelection(a,"on")}),!0):!1}}function K5e(i,e){const t=i.getFirstPosition(),n=i.getLastPosition(),r=t.nodeAfter,s=n.nodeBefore;return!!r&&e.isObject(r)||!!s&&e.isObject(s)}function X5e(i,e){const t=i.document.selection,n=t.getSelectedElement(),r=dl(t);return n&&r=="before"?i.createSelection(n,"before"):n&&r=="after"?i.createSelection(n,"after"):i.createSelection(t.getRanges(),{backward:n&&i.schema.isObject(n)?!e:t.isBackward})}function Q5e(i){let e=i;for(;e;){if(e.is("editableElement")||Wn(e))return e;e=e.parent}return null}function Z5e(i,e){const t=EG(e.domEvent);let n=null;if(t?n=i.domConverter.domRangeToView(t):n=i.createRange(i.createPositionAt(e.target,0)),!n)return null;const r=n.start;if(!r.parent)return null;let s=r.parent;return r.parent.is("editableElement")&&(r.isAtEnd&&r.nodeBefore?s=r.nodeBefore:r.isAtStart&&r.nodeAfter&&(s=r.nodeAfter)),s.is("$text")?s.parent:s}function J5e(i,e){return e?Array.from(i.getAncestors()).includes(e):!1}function e3e(i,e){for(const t of i.getAncestors({includeSelf:!0,parentFirst:!0})){if(e.checkChild(t,"$text"))return t;if(e.isLimit(t)&&!e.isObject(t))break}return null}function t3e(i,e){const t=new bl({startPosition:i});for(const{item:n}of t){if(e.isLimit(n)||!n.is("element"))return null;if(e.checkChild(n,"$text"))return n}return null}class ix extends be{_toolbarDefinitions=new Map;_balloon;static get requires(){return[zo]}static get pluginName(){return"WidgetToolbarRepository"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",n=>{n3e(e.editing.view.document.selection)&&n.stop()},{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:n,getRelatedElement:r,balloonClassName:s="ck-toolbar-container",positions:o}){if(!n.length){Kt("widget-toolbar-no-items",{toolbarId:e});return}const a=this.editor,l=a.t,c=new ud(a.locale);if(c.ariaLabel=t||l("Widget toolbar"),this._toolbarDefinitions.has(e))throw new oe("widget-toolbar-duplicated",this,{toolbarId:e});const d={view:c,getRelatedElement:r,balloonClassName:s,itemsConfig:n,positions:o,initialized:!1};a.ui.addToolbar(c,{isContextual:!0,beforeFocus:()=>{const f=r(a.editing.view.document.selection);f&&this._showToolbar(d,f)},afterBlur:()=>{this._hideToolbar(d)}}),this._toolbarDefinitions.set(e,d)}_updateToolbarsVisibility(){let e=0,t=null,n=null;for(const r of this._toolbarDefinitions.values()){const s=r.getRelatedElement(this.editor.editing.view.document.selection);if(!this.isEnabled||!s)this._isToolbarInBalloon(r)&&this._hideToolbar(r);else if(!this.editor.ui.focusTracker.isFocused)this._isToolbarVisible(r)&&this._hideToolbar(r);else{const o=s.getAncestors().length;o>e&&(e=o,t=s,n=r)}}n&&this._showToolbar(n,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?Q7(this.editor,t,e.positions):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:UK(this.editor,t,e.positions),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(const n of this._toolbarDefinitions.values())if(this._isToolbarVisible(n)){const r=n.getRelatedElement(this.editor.editing.view.document.selection);Q7(this.editor,r,e.positions)}}))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function Q7(i,e,t){const n=i.plugins.get("ContextualBalloon"),r=UK(i,e,t);n.updatePosition(r)}function UK(i,e,t){const n=i.editing.view,r=Ai.defaultPositions;return{target:n.domConverter.mapViewToDom(e),positions:t||[r.northArrowSouth,r.northArrowSouthWest,r.northArrowSouthEast,r.southArrowNorth,r.southArrowNorthWest,r.southArrowNorthEast,r.viewportStickyNorth]}}function n3e(i){const e=i.getSelectedElement();return!!(e&&Wn(e))}class i3e extends hn(){_referenceCoordinates;_options;_originalWidth;_originalHeight;_originalWidthPercents;_aspectRatio;constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,n){const r=new gt(t);this.activeHandlePosition=o3e(e),this._referenceCoordinates=r3e(t,a3e(this.activeHandlePosition)),this._originalWidth=r.width,this._originalHeight=r.height,this._aspectRatio=r.width/r.height;const s=n.style.width;s&&s.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(s):this._originalWidthPercents=B5e(n,r)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function r3e(i,e){const t=new gt(i),n=e.split("-"),r={x:n[1]=="right"?t.right:t.left,y:n[0]=="bottom"?t.bottom:t.top};return r.x+=i.ownerDocument.defaultView.scrollX,r.y+=i.ownerDocument.defaultView.scrollY,r}function s3e(i){return`ck-widget__resizer__handle-${i}`}function o3e(i){const e=["top-left","top-right","bottom-right","bottom-left"];for(const t of e)if(i.classList.contains(s3e(t)))return t}function a3e(i){const e=i.split("-"),t={top:"bottom",bottom:"top",left:"r
40ight",right:"left"};return`${t[e[0]]}-${t[e[1]]}`}class l3e extends Ge{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",t=>t?`ck-orientation-${t}`:"")],style:{display:e.if("_isVisible","none",t=>!t)}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",(n,r)=>n!==null&&r!==null),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",(n,r,s)=>e.unit==="px"?`${n}×${r}`:`${s}%`),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",(n,r,s)=>r<50||s<50?"above-center":n)}_dismiss(){this.unbind(),this._isVisible=!1}}class Z7 extends hn(){_state;_sizeView;_options;_viewResizerWrapper=null;_initialViewWidth;constructor(e){super(),this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",(t,n)=>t&&n),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",t=>{!this.state.proposedWidth&&!this.state.proposedWidthPercents&&(this._cleanup(),t.stop())},{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change(t=>{t.removeClass("ck-hidden",this._viewResizerWrapper)})}hide(){this._options.editor.editing.view.change(t=>{t.addClass("ck-hidden",this._viewResizerWrapper)})}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change(r=>{const s=r.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},function(o){const a=this.toDomElement(o);return e._appendHandles(a),e._appendSizeUI(a),a});r.insert(r.createPositionAt(t,"end"),s),r.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=s,this.isVisible||this.hide()}),this.on("change:isVisible",()=>{this.isVisible?(this.show(),this.redraw()):this.hide()})}begin(e){this._state=new i3e(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change(c=>{const d=this._options.unit||"%",f=(d==="%"?t.widthPercents:t.width)+d;c.setStyle("width",f,this._options.viewElement)});const r=this._getHandleHost(),s=new gt(r),o=Math.round(s.width),a=Math.round(s.height),l=new gt(r);t.width=Math.round(l.width),t.height=Math.round(l.height),this.redraw(s),this.state.update({...t,handleHostWidth:o,handleHostHeight:a})}commit(){const e=this._options.unit||"%",t=(e==="%"?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change(()=>{this._cleanup(),this._options.onCommit(t)})}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!d3e(t))return;const n=t.parentElement,r=this._getHandleHost(),s=this._viewResizerWrapper,o=[s.getStyle("width"),s.getStyle("height"),s.getStyle("left"),s.getStyle("top")];let a;if(n.isSameNode(r)){const l=e||new gt(r);a=[l.width+"px",l.height+"px",void 0,void 0]}else a=[r.offsetWidth+"px",r.offsetHeight+"px",r.offsetLeft+"px",r.offsetTop+"px"];ji(o,a)!=="same"&&this._options.editor.editing.view.change(l=>{l.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},s)})}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss(),this._options.editor.editing.view.change(t=>{t.setStyle("width",this._initialViewWidth,this._options.viewElement)})}_proposeNewSize(e){const t=this.state,n=u3e(e),r=this._options.isCentered?this._options.isCentered(this):!0,s={x:t._referenceCoordinates.x-(n.x+t.originalWidth),y:n.y-t.originalHeight-t._referenceCoordinates.y};r&&t.activeHandlePosition.endsWith("-right")&&(s.x=n.x-(t._referenceCoordinates.x+t.originalWidth)),r&&(s.x*=2);let o=Math.abs(t.originalWidth+s.x),a=Math.abs(t.originalHeight+s.y);return(o/t.aspectRatio>a?"width":"height")=="width"?a=o/t.aspectRatio:o=a*t.aspectRatio,{width:Math.round(o),height:Math.round(a),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*o*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const n of t)e.appendChild(new as({tag:"div",attributes:{class:`ck-widget__resizer__handle ${c3e(n)}`}}).render())}_appendSizeUI(e){this._sizeView=new l3e,this._sizeView.render(),e.appendChild(this._sizeView.element)}}function c3e(i){return`ck-widget__resizer__handle-${i}`}function u3e(i){return{x:i.pageX,y:i.pageY}}function d3e(i){return i&&i.ownerDocument&&i.ownerDocument.contains(i)}class eT extends be{_resizers=new Map;_observer;_redrawSelectedResizerThrottled;static get pluginName(){return"WidgetResize"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.editing,t=$e.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(e4),this._observer=new(ds()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=Oh(()=>this.redrawSelectedResizer(),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",()=>{for(const[r,s]of this._resizers)r.isAttached()||(this._resizers.delete(r),s.destroy())},{priority:"lowest"}
40),this._observer.listenTo($e.window,"resize",this._redrawSelectedResizerThrottled);const n=this.editor.editing.view.document.selection;n.on("change",()=>{const r=n.getSelectedElement(),s=this.getResizerByViewElement(r)||null;s?this.select(s):this.deselect()})}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new Z7(e),n=this.editor.plugins;if(t.attach(),n.has("WidgetToolbarRepository")){const o=n.get("WidgetToolbarRepository");t.on("begin",()=>{o.forceDisabled("resize")},{priority:"lowest"}),t.on("cancel",()=>{o.clearForceDisabled("resize")},{priority:"highest"}),t.on("commit",()=>{o.clearForceDisabled("resize")},{priority:"highest"})}this._resizers.set(e.viewElement,t);const s=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(s)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const n=t.domTarget;Z7.isResizeHandle(n)&&(this._activeResizer=this._getResizerByHandle(n)||null,this._activeResizer&&(this._activeResizer.begin(n),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}class $g extends $o{domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];constructor(e){super(e);const t=this.document;this.listenTo(t,"paste",n("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",n("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",n("dragging"),{priority:"low"});function n(r){return(s,o)=>{o.preventDefault();const a=o.dropRange?[o.dropRange]:null,l=new Il(t,r);t.fire(l,{dataTransfer:o.dataTransfer,method:s.name,targetRanges:a,target:o.target,domEvent:o.domEvent}),l.stop.called&&o.stopPropagation()}}}onDomEvent(e){const t="clipboardData"in e?e.clipboardData:e.dataTransfer,n=e.type=="drop"||e.type=="paste",r={dataTransfer:new QG(t,{cacheFiles:n})};if(e.type=="drop"||e.type=="dragover"){const s=EG(e);r.dropRange=s&&this.view.domConverter.domRangeToView(s)}this.fire(e.type,e,r)}}function f3e(i){return i=i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/^\s/,"&nbsp;").replace(/\s$/,"&nbsp;").replace(/\s\s/g," &nbsp;"),(i.includes("</p><p>")||i.includes("<br>"))&&(i=`<p>${i}</p>`),i}function h3e(i){return i.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(e,t)=>t.length==1?" ":t).replace(/<!--[\s\S]*?-->/g,"")}const J7=["figcaption","li"],eL=["ol","ul"];function VK(i,e){if(e.is("$text")||e.is("$textProxy"))return e.data;if(e.is("element","img")&&e.hasAttribute("alt"))return e.getAttribute("alt");if(e.is("element","br"))return`
41`;let t="",n=null;for(const r of e.getChildren())t+=m3e(r,n)+VK(i,r),n=r;if(e.is("rawElement")){const s=document.implementation.createHTMLDocument("").createElement("div");e.render(s,i),t+=jK(s)}return t}function jK(i){let e="";if(i.nodeType===Node.TEXT_NODE)return i.textContent;if(i.tagName==="BR")return`
42`;for(const t of i.childNodes)e+=jK(t);return e}function m3e(i,e){return e?i.is("element","li")&&!i.isEmpty&&i.getChild(0).is("containerElement")||eL.includes(i.name)&&eL.includes(e.name)?`
43
44`:!i.is("containerElement")&&!e.is("containerElement")?"":J7.includes(i.name)||J7.includes(e.name)?`
45`:i.is("element")&&i.getCustomProperty("dataPipeline:transparentRendering")||e.is("element")&&e.getCustomProperty("dataPipeline:transparentRendering")?"":`
46
47`:""}class ag extends be{_markersToCopy=new Map;static get pluginName(){return"ClipboardMarkersUtils"}static get isOfficialPlugin(){return!0}_registerMarkerToCopy(e,t){this._markersToCopy.set(e,t)}_copySelectedFragmentWithMarkers(e,t,n=r=>r.model.getSelectedContent(r.model.document.selection)){return this.editor.model.change(r=>{const s=r.model.document.selection;r.setSelection(t);const o=this._insertFakeMarkersIntoSelection(r,r.model.document.selection,e),a=n(r),l=this._removeFakeMarkersInsideElement(r,a);for(const[c,d]of Object.entries(o)){l[c]||=r.createRangeIn(a);for(const f of d)r.remove(f)}a.markers.clear();for(const[c,d]of Object.entries(l))a.markers.set(c,d);return r.setSelection(s),a})}_pasteMarkersIntoTransformedElement(e,t){const n=this._getPasteMarkersFromRangeMap(e);return this.editor.model.change(r=>{const s=this._insertFakeMarkersElements(r,n),o=t(r),a=this._removeFakeMarkersInsideElement(r,o);for(const l of Object.values(s).flat())r.remove(l);for(const[l,c]of Object.entries(a))r.model.markers.has(l)||r.addMarker(l,{usingOperation:!0,affectsData:!0,range:c});return o}
47)}_pasteFragmentWithMarkers(e){const t=this._getPasteMarkersFromRangeMap(e.markers);e.markers.clear();for(const n of t)e.markers.set(n.name,n.range);return this.editor.model.insertContent(e)}_forceMarkersCopy(e,t,n={allowedActions:"all",copyPartiallySelected:!0,duplicateOnPaste:!0}){const r=this._markersToCopy.get(e);this._markersToCopy.set(e,n),t(),r?this._markersToCopy.set(e,r):this._markersToCopy.delete(e)}_isMarkerCopyable(e,t){const n=this._getMarkerClipboardConfig(e);if(!n)return!1;if(!t)return!0;const{allowedActions:r}=n;return r==="all"||r.includes(t)}_hasMarkerConfiguration(e){return!!this._getMarkerClipboardConfig(e)}_getMarkerClipboardConfig(e){const[t]=e.split(":");return this._markersToCopy.get(t)||null}_insertFakeMarkersIntoSelection(e,t,n){const r=this._getCopyableMarkersFromSelection(e,t,n);return this._insertFakeMarkersElements(e,r)}_getCopyableMarkersFromSelection(e,t,n){const r=Array.from(t.getRanges()),s=new Set(r.flatMap(a=>Array.from(e.model.markers.getMarkersIntersectingRange(a)))),o=a=>{if(!this._isMarkerCopyable(a.name,n))return!1;const{copyPartiallySelected:c}=this._getMarkerClipboardConfig(a.name);if(!c){const d=a.getRange();return r.some(f=>f.containsRange(d,!0))}return!0};return Array.from(s).filter(o).map(a=>({name:n==="dragstart"?this._getUniqueMarkerName(a.name):a.name,range:a.getRange()}))}_getPasteMarkersFromRangeMap(e,t=null){const{model:n}=this.editor;return(e instanceof Map?Array.from(e.entries()):Object.entries(e)).flatMap(([s,o])=>{if(!this._hasMarkerConfiguration(s))return[{name:s,range:o}];if(this._isMarkerCopyable(s,t)){const a=this._getMarkerClipboardConfig(s),l=n.markers.has(s)&&n.markers.get(s).getRange().root.rootName==="$graveyard";return(a.duplicateOnPaste||l)&&(s=this._getUniqueMarkerName(s)),[{name:s,range:o}]}return[]})}_insertFakeMarkersElements(e,t){const n={},r=t.flatMap(s=>{const{start:o,end:a}=s.range;return[{position:o,marker:s,type:"start"},{position:a,marker:s,type:"end"}]}).sort(({position:s},{position:o})=>s.isBefore(o)?1:-1);for(const{position:s,marker:o,type:a}of r){const l=e.createElement("$marker",{"data-name":o.name,"data-type":a});n[o.name]||(n[o.name]=[]),n[o.name].push(l),e.insert(l,s)}return n}_removeFakeMarkersInsideElement(e,t){const r=this._getAllFakeMarkersFromElement(e,t).reduce((s,o)=>{const a=o.markerElement&&e.createPositionBefore(o.markerElement);let l=s[o.name],c=!1;return l?.start&&l?.end&&(this._getMarkerClipboardConfig(o.name).duplicateOnPaste?s[this._getUniqueMarkerName(o.name)]=s[o.name]:c=!0,l=null),c||(s[o.name]={...l,[o.type]:a}),o.markerElement&&e.remove(o.markerElement),s},{});return mxe(r,s=>new Ae(s.start||e.createPositionFromPath(t,[0]),s.end||e.createPositionAt(t,"end")))}_getAllFakeMarkersFromElement(e,t){const n=Array.from(e.createRangeIn(t)).flatMap(({item:o})=>{if(!o.is("element","$marker"))return[];const a=o.getAttribute("data-name"),l=o.getAttribute("data-type");return[{markerElement:o,name:a,type:l}]}),r=[],s=[];for(const o of n)o.type==="end"&&(n.some(l=>l.name===o.name&&l.type==="start")||r.push({markerElement:null,name:o.name,type:"start"})),o.type==="start"&&(n.some(l=>l.name===o.name&&l.type==="end")||s.unshift({markerElement:null,name:o.name,type:"end"}));return[...r,...n,...s]}_getUniqueMarkerName(e){const t=e.split(":"),n=rr().substring(1,6);return t.length===3?`${t.slice(0,2).join(":")}:${n}`:`${t.join(":")}:${n}`}}class Ls extends be{static get pluginName(){return"ClipboardPipeline"}static get isOfficialPlugin(){return!0}static get requires(){return[ag]}init(){this.editor.editing.view.addObserver($g),this._setupPasteDrop(),this._setupCopyCut()}_fireOutputTransformationEvent(e,t,n){const r=this.editor.plugins.get("ClipboardMarkersUtils");this.editor.model.enqueueChange({isUndoable:n==="cut"},()=>{const s=r._copySelectedFragmentWithMarkers(n,t);this.fire("outputTransformation",{dataTransfer:e,content:s,method:n})})}_setupPasteDrop(){const e=this.editor,t=e.model,n=e.editing.view,r=n.document,s=this.editor.plugins.get("ClipboardMarkersUtils");this.listenTo(r,"clipboardInput",(o,a)=>{a.method=="paste"&&!e.model.canEditAt(e.model.document.selection)&&o.stop()},{priority:"highest"}),this.listenTo(r,"clipboardInput",(o,a)=>{const l=a.dataTransfer;let c;if(a.content)c=a.content;else{let m="";l.getData("text/html")?m=h3e(l.getData("text/html")):l.getData("text/plain")&&(m=f3e(l.getData("text/plain"))),c=this.editor.data.htmlProcessor.toView(m)}const d=new Il(this,"inputTransformation"),f=l.getData("application/ckeditor5-editor-id")||null;this.fire(d,{content:c,dataTransfer:l,sourceEditorId:f,targetRanges:a.targetRanges,method:a.method}),d.stop.called&&o.stop(),n.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(o,a)=>
47{if(a.content.isEmpty)return;const c=this.editor.data.toModel(a.content,"$clipboardHolder");c.childCount!=0&&(o.stop(),t.change(()=>{this.fire("contentInsertion",{content:c,method:a.method,sourceEditorId:a.sourceEditorId,dataTransfer:a.dataTransfer,targetRanges:a.targetRanges})}))},{priority:"low"}),this.listenTo(this,"contentInsertion",(o,a)=>{a.resultRange=s._pasteFragmentWithMarkers(a.content)},{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,r=e.editing.view.document,s=(o,a)=>{const l=a.dataTransfer;a.preventDefault(),this._fireOutputTransformationEvent(l,t.selection,o.name)};this.listenTo(r,"copy",s,{priority:"low"}),this.listenTo(r,"cut",(o,a)=>{e.model.canEditAt(e.model.document.selection)?s(o,a):a.preventDefault()},{priority:"low"}),this.listenTo(this,"outputTransformation",(o,a)=>{const l=e.data.toView(a.content,{isClipboardPipeline:!0});r.fire("clipboardOutput",{dataTransfer:a.dataTransfer,content:l,method:a.method})},{priority:"low"}),this.listenTo(r,"clipboardOutput",(o,a)=>{a.content.isEmpty||(a.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(a.content)),a.dataTransfer.setData("text/plain",VK(e.data.htmlProcessor.domConverter,a.content)),a.dataTransfer.setData("application/ckeditor5-editor-id",this.editor.id)),a.method=="cut"&&e.model.deleteContent(t.selection)},{priority:"low"})}}const tT=nm("px");class p3e extends Ge{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,left:null,top:null,width:null}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-clipboard-drop-target-line",e.if("isVisible","ck-hidden",t=>!t)],style:{left:e.to("left",t=>tT(t)),top:e.to("top",t=>tT(t)),width:e.to("width",t=>tT(t))}}})}}class By extends be{removeDropMarkerDelayed=U3(()=>this.removeDropMarker(),40);_updateDropMarkerThrottled=Oh(e=>this._updateDropMarker(e),40);_reconvertMarkerThrottled=Oh(()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")},0);_dropTargetLineView=new p3e;_domEmitter=new(ds());_scrollables=new Map;static get pluginName(){return"DragDropTarget"}static get isOfficialPlugin(){return!0}init(){this._setupDropMarker()}destroy(){this._domEmitter.stopListening();for(const{resizeObserver:e}of this._scrollables.values())e.destroy();return this._updateDropMarkerThrottled.cancel(),this.removeDropMarkerDelayed.cancel(),this._reconvertMarkerThrottled.cancel(),super.destroy()}updateDropMarker(e,t,n,r,s,o){this.removeDropMarkerDelayed.cancel();const a=tL(this.editor,e,t,n,r,s,o);return a?o&&o.containsRange(a)?(this.removeDropMarker(),null):a&&!this.editor.model.canEditAt(a)?(this.removeDropMarker(),null):(this._updateDropMarkerThrottled(a),a):null}getFinalDropRange(e,t,n,r,s,o){const a=tL(this.editor,e,t,n,r,s,o);return this.removeDropMarker(),a}removeDropMarker(){const e=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,e.markers.has("drop-target")&&e.change(t=>{t.removeMarker("drop-target")})}_setupDropMarker(){const e=this.editor;e.ui.view.body.add(this._dropTargetLineView),e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:n})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(n);t.markerRange.isCollapsed?this._updateDropTargetLine(t.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(e){const t=this.editor,n=t.model.markers;t.model.change(r=>{n.has("drop-target")?n.get("drop-target").getRange().isEqual(e)||r.updateMarker("drop-target",{range:e}):r.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})})}_createDropTargetPosition(e){return e.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},function(t){const n=this.toDomElement(t);return n.append("⁠",t.createElement("span"),"⁠"),n})}_updateDropTargetLine(e){const t=this.editor.editing,n=e.start.nodeBefore,r=e.start.nodeAfter,s=e.start.parent,o=n?t.mapper.toViewElement(n):null,a=o?t.view.domConverter.mapViewToDom(o):null,l=r?t.mapper.toViewElement(r):null,c=l?t.view.domConverter.mapViewToDom(l):null,d=t.mapper.toViewElement(s);if(!d)return;const f=t.view.domConverter.mapViewToDom(d),m=this._getScrollableRect(d),{scrollX:p,scrollY:g}=$e.window,y=a?new gt(a):null,v=c?new gt(c):null,x=new gt(f).excludeScrollbarsAndBorders(),C=y?y.bottom:x.top,D=v?v.top:x.bottom,E=$e.window.getComputedStyle(f),T=C<=D?(C+D)/2:D;if(m.top<T&&T<m.bottom){const S=x.left+parseFloat(E.paddingLeft),A=x.right-parseFloat(E.paddingRight),I=Math.max(S+p,m.left),R=Math.min(A+p,m.right);this._dropTargetLineView.set({isVisible:!0,left:I,top:T+g,width:R-I})}else this._dropTargetLineView.isVisible=!1}_getScrollableRect(e){const t=e.root.rootName;let n;if(this._scrollables.has(t))n=this._scrollables.get(t).domElement;else{const r=this.editor.editing.view.domConverter.mapViewToDom(e);n=b3e(r),this._domEmitter.listenTo(n,"scroll",this._reconvertMarkerThrottled,{usePassive:!0});const s=new B3(n,this._reconvertMarkerThrottled);this._scrollables.set(t,{domElement:n,resizeObserver:s})}return new gt(n).excludeScrollbarsAndBorders()}}function tL(i,e,t,n,r,s,o){const a=i.model,l=i.editing.mapper;let d=nL(i,e);for(;d;){if(!s){if(a.schema.checkChild(d,"$text")){if(t){const f=t[0].start,m=l.toModelPosition(f);if(!o||Array.from(o.getItems({shallow:!0})).some(g=>a.schema.checkChild(m,g))){if(a.schema.checkChild(m,"$text"))return a.createRange(m);if(f)return My(i,nL(i,f.parent),n,r)}}}else if(a.schema.isInline(d))return My(i,d,n,r)}if(a.schema.isBlock(d))return My(i,d,n,r);if(a.schema.checkChild(d,"$block")){const f=Array.from(d.getChildren()).filter(g=>g.is("element")&&!g3e(i,g));let m=0,p=f.length;if(p==0)return a.createRange(a.createPositionAt(d,"end"));for(;m<p-1;){const g=Math.floor((m+p)/2);zK(i,f[g],n,r)=="before"?p=g:m=g}return My(i,f[m],n,r)}d=d.parent}return null}function g3e(i,e){const t=i.editing.mapper,n=i.editing.view.domConverter,r=t.toViewElement(e);
vendor: 5,019 bytes, line 47
47if(!r)return!0;const s=n.mapViewToDom(r);return $e.window.getComputedStyle(s).float!="none"}function My(i,e,t,n){const r=i.model;return r.createRange(r.createPositionAt(e,zK(i,e,t,n)))}function zK(i,e,t,n){const r=i.editing.mapper,s=i.editing.view.domConverter,o=r.toViewElement(e),a=s.mapViewToDom(o),l=new gt(a);return i.model.schema.isInline(e)?t<(l.left+l.right)/2?"before":"after":n<(l.top+l.bottom)/2?"before":"after"}function nL(i,e){const t=i.editing.mapper,n=i.editing.view,r=t.toModelElement(e);if(r)return r;const s=n.createPositionBefore(e),o=t.findMappedViewAncestor(s);return t.toModelElement(o)}function b3e(i){let e=i;do{e=e.parentElement;const t=$e.window.getComputedStyle(e).overflowY;if(t=="auto"||t=="scroll")break}while(e.tagName!="BODY");return e}class y3e extends be{_isBlockDragging=!1;_domEmitter=new(ds());static get pluginName(){return"DragDropBlockToolbar"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(this.listenTo(e,"change:isReadOnly",(t,n,r)=>{r?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")}),ot.isAndroid&&this.forceDisabled("noAndroidSupport"),e.plugins.has("BlockToolbar")){const n=e.plugins.get("BlockToolbar").buttonView.element;this._domEmitter.listenTo(n,"dragstart",(r,s)=>this._handleBlockDragStart(s)),this._domEmitter.listenTo($e.document,"dragover",(r,s)=>this._handleBlockDragging(s)),this._domEmitter.listenTo($e.document,"drop",(r,s)=>this._handleBlockDragging(s)),this._domEmitter.listenTo($e.document,"dragend",()=>this._handleBlockDragEnd(),{useCapture:!0}),this.isEnabled&&n.setAttribute("draggable","true"),this.on("change:isEnabled",(r,s,o)=>{n.setAttribute("draggable",o?"true":"false")})}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(e){if(!this.isEnabled)return;const t=this.editor.model,n=t.document.selection,r=this.editor.editing.view,s=Array.from(n.getSelectedBlocks()),o=t.createRange(t.createPositionBefore(s[0]),t.createPositionAfter(s[s.length-1]));t.change(a=>a.setSelection(o)),this._isBlockDragging=!0,r.focus(),r.getObserver($g).onDomEvent(e)}_handleBlockDragging(e){if(!this.isEnabled||!this._isBlockDragging)return;const t=e.clientX+(this.editor.locale.contentLanguageDirection=="ltr"?100:-100),n=e.clientY,r=document.elementFromPoint(t,n),s=this.editor.editing.view;!r||!r.closest(".ck-editor__editable")||s.getObserver($g).onDomEvent({...e,type:e.type,dataTransfer:e.dataTransfer,target:r,clientX:t,clientY:n,preventDefault:()=>e.preventDefault(),stopPropagation:()=>e.stopPropagation()})}_handleBlockDragEnd(){this._isBlockDragging=!1}}class v3e extends be{_draggedRange;_draggingUid;_draggableElement;_clearDraggableAttributesDelayed=U3(()=>this._clearDraggableAttributes(),40);_blockMode=!1;_domEmitter=new(ds());_previewContainer;static get pluginName(){return"DragDrop"}static get isOfficialPlugin(){return!0}static get requires(){return[Ls,Qc,By,y3e]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,t.addObserver($g),t.addObserver(kY),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",(n,r,s)=>{s?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}),this.on("change:isEnabled",(n,r,s)=>{s||this._finalizeDragging(!1)}),ot.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._previewContainer&&this._previewContainer.remove(),this._domEmitter.stopListening(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,n=e.editing.view,r=n.document,s=e.plugins.get(By);this.listenTo(r,"dragstart",(o,a)=>{if(a.target?.is("editableElement")){a.preventDefault();return}if(this._prepareDraggedRange(a.target),!this._draggedRange){a.preventDefault();return}this._draggingUid=rr();const l=this.isEnabled&&e.model.canEditAt(this._draggedRange);a.dataTransfer.effectAllowed=l?"copyMove":"copy",a.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const c=t.createSelection(this._draggedRange.toRange());this.editor.plugins.get("ClipboardPipeline")._fireOutputTransformationEvent(a.dataTransfer,c,"dragstart");const{dataTransfer:f,domTarget:m,domEvent:p}=a,{clientX:g}=p;this._updatePreview({dataTransfer:f,domTarget:m,clientX:g}),a.stopPropagation(),l||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")},{priority:"low"}),this.listenTo(r,"dragend",(o,a)=>{this._finalizeDragging(!a.dataTransfer.isCanceled&&a.dataTransfer.dropEffect=="move")},{priority:"low"}),this._domEmitter.listenTo($e.document,"dragend",()=>{this._blockMode=!1},{useCapture:!0}),this.listenTo(r,"dragenter",()=>{this.isEnabled&&n.focus()}),this.listenTo(r,"dragleave",()=>{s.removeDropMarkerDelayed()}),this.listenTo(r,"dragging",(o,a)=>
47{if(!this.isEnabled){a.dataTransfer.dropEffect="none";return}const{clientX:l,clientY:c}=a.domEvent;if(!s.updateDropMarker(a.target,a.targetRanges,l,c,this._blockMode,this._draggedRange)){a.dataTransfer.dropEffect="none";return}this._draggedRange||(a.dataTransfer.dropEffect="copy"),ot.isGecko||(a.dataTransfer.effectAllowed=="copy"?a.dataTransfer.dropEffect="copy":["all","copyMove"].includes(a.dataTransfer.effectAllowed)&&(a.dataTransfer.dropEffect="move")),o.stop()},{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,n=e.editing.view.document,r=e.plugins.get(By);this.listenTo(n,"clipboardInput",(s,o)=>{if(o.method!="drop")return;const{clientX:a,clientY:l}=o.domEvent,c=r.getFinalDropRange(o.target,o.targetRanges,a,l,this._blockMode,this._draggedRange);if(!c){this._finalizeDragging(!1),s.stop();return}if(this._draggedRange&&this._draggingUid!=o.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid=""),iL(o.dataTransfer)=="move"&&this._draggedRange&&this._draggedRange.containsRange(c,!0)){this._finalizeDragging(!1),s.stop();return}o.targetRanges=[e.editing.mapper.toViewRange(c)]},{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(Ls);e.on("contentInsertion",(t,n)=>{if(!this.isEnabled||n.method!=="drop")return;const r=n.targetRanges.map(s=>this.editor.editing.mapper.toModelRange(s));this.editor.model.change(s=>s.setSelection(r))},{priority:"high"}),e.on("contentInsertion",(t,n)=>{if(!this.isEnabled||n.method!=="drop")return;const r=iL(n.dataTransfer)=="move",s=!n.resultRange||!n.resultRange.isCollapsed;this._finalizeDragging(s&&r)},{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,n=t.document;this.listenTo(n,"pointerdown",(r,s)=>{if(ot.isAndroid||!s)return;this._clearDraggableAttributesDelayed.cancel();let o=rL(s.target);if(ot.isBlink&&!e.isReadOnly&&!o&&!n.selection.isCollapsed){const a=n.selection.getSelectedElement();(!a||!Wn(a))&&(o=n.selection.editableElement)}o&&(t.change(a=>{a.setAttribute("draggable","true",o)}),this._draggableElement=e.editing.mapper.toModelElement(o))}),this.listenTo(n,"pointerup",()=>{ot.isAndroid||this._clearDraggableAttributesDelayed()})}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change(t=>{this._draggableElement&&this._draggableElement.root.rootName!="$graveyard"&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null})}_finalizeDragging(e){const t=this.editor,n=t.model;t.plugins.get(By).removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(e&&this.isEnabled&&n.change(s=>{const o=n.createSelection(this._draggedRange);n.deleteContent(o,{doNotAutoparagraph:!0});const a=o.getFirstPosition().parent;a.isEmpty&&!n.schema.checkChild(a,"$text")&&n.schema.checkChild(a,"paragraph")&&s.insertElement("paragraph",a,0)}),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(e){const t=this.editor,n=t.model,r=n.document.selection,s=e?rL(e):null;if(s){const c=t.editing.mapper.toModelElement(s);this._draggedRange=is.fromRange(n.createRangeOn(c)),this._blockMode=n.schema.isBlock(c),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop");return}if(r.isCollapsed&&!r.getFirstPosition().parent.isEmpty)return;const o=Array.from(r.getSelectedBlocks()),a=r.getFirstRange();if(o.length==0){this._draggedRange=is.fromRange(a);return}const l=WK(n,o);if(o.length>1)this._draggedRange=is.fromRange(l),this._blockMode=!0;else if(o.length==1){const c=a.start.isTouching(l.start)&&a.end.isTouching(l.end);this._draggedRange=is.fromRange(c?l:a),this._blockMode=c}n.change(c=>c.setSelection(this._draggedRange.toRange()))}_updatePreview({dataTransfer:e,domTarget:t,clientX:n}){const r=this.editor.editing.view,s=r.document.selection.editableElement,o=r.domConverter.mapViewToDom(s),a=$e.window.getComputedStyle(o);this._previewContainer?this._previewContainer.firstElementChild&&this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=Ts($e.document,"div",{style:"position: fixed; left: -999999px;"}),$e.document.body.appendChild(this._previewContainer));const l=Ts($e.document,"div");
47l.className="ck ck-content ck-clipboard-preview";const c=new gt(o),d=parseFloat(a.paddingLeft),f=parseFloat(a.paddingRight),m=parseFloat(a.width)-d-f;if(o.contains(t))if(ot.isiOS)l.style.maxWidth=`${m}px`,l.style.padding="10px",l.style.minWidth="200px",l.style.minHeight="20px",l.style.boxSizing="border-box",l.style.backgroundColor="var(--ck-color-base-background)";else return;else if(ot.isiOS)l.style.width=`${m}px`,l.style.backgroundColor="var(--ck-color-base-background)";else{const p=c.left-n+d;l.style.width=`${m+p}px`,l.style.paddingLeft=`${p}px`}r.domConverter.setContentOf(l,e.getData("text/html")),e.setDragImage(l,0,0),this._previewContainer.appendChild(l)}}function iL(i){return ot.isGecko?i.dropEffect:["all","copyMove"].includes(i.effectAllowed)?"move":"copy"}function rL(i){if(i.is("editableElement"))return null;if(i.hasClass("ck-widget__selection-handle"))return i.findAncestor(Wn);if(Wn(i))return i;const e=i.findAncestor(t=>Wn(t)||t.is("editableElement"));return Wn(e)?e:null}function WK(i,e){const t=e[0],n=e[e.length-1],r=t.getCommonAncestor(n),s=i.createPositionBefore(t),o=i.createPositionAfter(n);if(r&&r.is("element")&&!i.schema.isLimit(r)){const a=i.createRangeOn(r),l=s.isTouching(a.start),c=o.isTouching(a.end);if(l&&c)return WK(i,[r])}return i.createRange(s,o)}class w3e extends be{static get pluginName(){return"PastePlainText"}static get isOfficialPlugin(){return!0}static get requires(){return[Ls]}init(){const e=this.editor,t=e.model,n=e.editing.view,r=t.document.selection;n.addObserver($g),e.plugins.get(Ls).on("contentInsertion",(s,o)=>{x3e(o.content,t)&&t.change(a=>{const l=Array.from(r.getAttributes()).filter(([d])=>t.schema.getAttributeProperties(d).isFormatting);r.isCollapsed||t.deleteContent(r,{doNotAutoparagraph:!0}),l.push(...r.getAttributes());const c=a.createRangeIn(o.content);for(const d of c.getItems())for(const f of l)t.schema.checkAttribute(d,f[0])&&a.setAttribute(f[0],f[1],d)})})}}function x3e(i,e){let t=e.createRangeIn(i);if(i.childCount==1){const n=i.getChild(0);n.is("element")&&e.schema.isBlock(n)&&!e.schema.isObject(n)&&!e.schema.isLimit(n)&&(t=e.createRangeIn(n))}for(const n of t.getItems())if(!e.schema.isInline(n)||Array.from(n.getAttributeKeys()).find(s=>e.schema.getAttributeProperties(s).isFormatting))return!1;return!0}class HK extends be{static get pluginName(){return"Clipboard"}static get isOfficialPlugin(){return!0}static get requires(){return[ag,Ls,v3e,w3e]}init(){const e=this.editor,t=this.editor.t;e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Copy selected content"),keystroke:"CTRL+C"},{label:t("Paste content"),keystroke:"CTRL+V"},{label:t("Paste content as plain text"),keystroke:"CTRL+SHIFT+V"}]})}}function rx(i){const e=i.t,t=i.config.get("codeBlock.languages");for(const n of t)n.label==="Plain text"&&(n.label=e("Plain text")),n.class===void 0&&(n.class=`language-${n.language}`);return t}function sx(i,e,t){const n={};for(const r of i)if(e==="class"){const s=r[e].split(" ").shift();n[s]=r[t]}else n[r[e]]=r[t];return n}function y4(i){return i.data.match(/^(\s*)/)[0]}function _3e(i,e){const t=i.createDocumentFragment(),n=e.split(`
48`),r=n.reduce((s,o,a)=>(s.push(o),a<n.length-1&&s.push(i.createElement("br")),s),[]);return i.appendChild(r,t),t}function ES(i){const e=i.document.selection,t=[];if(e.isCollapsed)return[e.anchor];const n=e.getFirstRange().getWalker({ignoreElementEnd:!0,direction:"backward"});for(const{item:r}of n){let s=r.is("$textProxy")?r.textNode:r;const o=s.parent;if(!o.is("element","codeBlock")||s.is("element","softBreak"))continue;for(;s.previousSibling&&!s.previousSibling.is("element","softBreak");)s=s.previousSibling;const a=s.is("$text")?s.startOffset+y4(s).length:s.startOffset,l=i.createPositionAt(o,a);t.every(c=>!c.isEqual(l))&&t.push(l)}return t}function qK(i){const e=Rn(i.getSelectedBlocks());return!!e&&e.is("element","codeBlock")}function sL(i,e){return e.is("rootElement")||i.isLimit(e)?!1:i.checkChild(e.parent,"codeBlock")}function oL(i,e,t,n){const r=sx(e,"language","label"),s=t.getAttribute("language");if(s in r){const o=r[s];return i(n==="enter"?"Entering %0 code snippet":"Leaving %0 code snippet",o)}return i(n==="enter"?"Entering code snippet":"Leaving code snippet")}function $K(i,e){for(i.textNode&&(i=e.createPositionBefore(i.textNode));i.nodeBefore&&!i.nodeBefore.is("element","softBreak");)i=e.createPositionBefore(i.nodeBefore);const t=i.nodeAfter;return t&&t.is("$text")?t:null}class C3e extends ut{_lastLanguage;constructor(e){super(e),this._lastLanguage=null}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor,n=t.model,r=n.document.selection,o=rx(t)[0],a=Array.from(r.getSelectedBlocks()),l=e.forceValue==null?!this.value:e.forceValue,c=D3e(e,this._lastLanguage,o.language);n.change(d=>{l?this._applyCodeBlock(d,a,c):this._removeCodeBlock(d,a)})}_getValue(){const e=this.editor.model.document.selection,t=Rn(e.getSelectedBlocks());return!!t?.is("element","codeBlock")?t.getAttribute("language"):!1}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,n=Rn(e.getSelectedBlocks());return n?sL(t,n):!1}_applyCodeBlock(e,t,n){this._lastLanguage=n;const r=this.editor.model.schema,s=t.filter(o=>sL(r,o));for(const o of s)e.rename(o,"codeBlock"),e.setAttribute("language",n,o),r.removeDisallowedAttributes([o],e),Array.from(o.getChildren()).filter(a=>
48!r.checkChild(o,a)).forEach(a=>e.remove(a));s.reverse().forEach((o,a)=>{const l=s[a+1];o.previousSibling===l&&(e.appendElement("softBreak",l),e.merge(e.createPositionBefore(o)))})}_removeCodeBlock(e,t){const n=t.filter(r=>r.is("element","codeBlock"));for(const r of n){const s=e.createRangeOn(r);for(const o of Array.from(s.getItems()).reverse())if(o.is("element","softBreak")&&o.parent.is("element","codeBlock")){const{position:a}=e.split(e.createPositionBefore(o)),l=a.nodeAfter;e.rename(l,"paragraph"),e.removeAttribute("language",l),e.remove(o)}e.rename(r,"paragraph"),e.removeAttribute("language",r)}}}function D3e(i,e,t){return i.language?i.language:i.usePreviousLanguageChoice&&e?e:t}class E3e extends ut{_indentSequence;constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model;t.change(n=>{const r=ES(t);for(const s of r){const o=n.createText(this._indentSequence);t.insertContent(o,s)}})}_checkEnabled(){return this._indentSequence?qK(this.editor.model.document.selection):!1}}class T3e extends ut{_indentSequence;constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model;t.change(()=>{const n=ES(t);for(const r of n){const s=aL(t,r,this._indentSequence);s&&t.deleteContent(t.createSelection(s))}})}_checkEnabled(){if(!this._indentSequence)return!1;const e=this.editor.model;return qK(e.document.selection)?ES(e).some(t=>aL(e,t,this._indentSequence)):!1}}function aL(i,e,t){const n=$K(e,i);if(!n)return null;const r=y4(n),s=r.lastIndexOf(t);if(s+t.length!==r.length||s===-1)return null;const{parent:o,startOffset:a}=n;return i.createRange(i.createPositionAt(o,a+s),i.createPositionAt(o,a+s+t.length))}function lL(i,e,t=!1){const n=sx(e,"language","class"),r=sx(e,"language","label");return(s,o,a)=>{const{writer:l,mapper:c,consumable:d}=a;if(!d.consume(o.item,"insert"))return;const f=o.item.getAttribute("language"),m=c.toViewPosition(i.createPositionBefore(o.item)),p={};t&&(p["data-language"]=r[f],p.spellcheck="false");const g=n[f]?{class:n[f]}:void 0,y=l.createContainerElement("code",g),v=l.createContainerElement("pre",p,y);l.insert(m,v),c.bindElements(o.item,y)}}function A3e(i){return(e,t,n)=>{if(t.item.parent.name!=="codeBlock")return;const{writer:r,mapper:s,consumable:o}=n;if(!o.consume(t.item,"insert"))return;const a=s.toViewPosition(i.createPositionBefore(t.item));r.insert(a,r.createText(`
49`))}}function k3e(i,e){const t=sx(e,"class","language"),n=e[0].language;return(r,s,o)=>{const a=s.viewItem,l=a.parent;if(!l||!l.is("element","pre")||s.modelCursor.findAncestor("codeBlock"))return;const{consumable:c,writer:d}=o;if(!c.test(a,{name:!0}))return;const f=d.createElement("codeBlock"),m=[...a.getClassNames()];m.length||m.push("");for(const p of m){const g=t[p];if(g){c.consume(a,{classes:[p]}),d.setAttribute("language",g,f);break}}f.hasAttribute("language")||d.setAttribute("language",n,f),o.convertChildren(a,f),o.safeInsert(f,s.modelCursor)&&(c.consume(a,{name:!0}),o.updateConversionResult(f,s))}}function S3e(){return(i,e,{consumable:t,writer:n})=>{let r=e.modelCursor;if(!t.test(e.viewItem)||!r.findAncestor("codeBlock"))return;t.consume(e.viewItem);const o=e.viewItem.data.split(`
50`).map(l=>n.createText(l)),a=o[o.length-1];for(const l of o)if(n.insert(l,r),r=r.getShiftedBy(l.offsetSize),l!==a){const c=n.createElement("softBreak");n.insert(c,r),r=n.createPositionAfter(c)}e.modelRange=n.createRange(e.modelCursor,r),e.modelCursor=r}}function P3e(){return(i,e,{consumable:t})=>{const n=e.viewItem;if(n.findAncestor("pre"))return;const r=Array.from(n.getChildren()),s=r.find(o=>o.is("element","code"));if(s)for(const o of r)o===s||!o.is("$text")||t.consume(o,{name:!0})}}const GK="paragraph";class I3e extends be{static get pluginName(){return"CodeBlockEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[BK]}constructor(e){super(e),e.config.define("codeBlock",{languages:[{language:"plaintext",label:"Plain text"},{language:"c",label:"C"},{language:"cs",label:"C#"},{language:"cpp",label:"C++"},{language:"css",label:"CSS"},{language:"diff",label:"Diff"},{language:"go",label:"Go"},{language:"html",label:"HTML"},{language:"java",label:"Java"},{language:"javascript",label:"JavaScript"},{language:"php",label:"PHP"},{language:"python",label:"Python"},{language:"ruby",label:"Ruby"},{language:"typescript",label:"TypeScript"},{language:"xml",label:"XML"}],indentSequence:"	"})}init(){const e=this.editor,t=e.model.schema,n=e.model,r=e.editing.view,s=rx(e);e.commands.add("codeBlock",new C3e(e)),e.commands.add("indentCodeBlock",new E3e(e)),e.commands.add("outde
50ntCodeBlock",new T3e(e)),this.listenTo(r.document,"tab",(o,a)=>{const l=a.shiftKey?"outdentCodeBlock":"indentCodeBlock";e.commands.get(l).isEnabled&&(e.execute(l),a.stopPropagation(),a.preventDefault(),o.stop())},{context:"pre"}),t.register("codeBlock",{allowWhere:"$block",allowChildren:"$text",disallowChildren:"$inlineObject",allowAttributes:["language"],allowAttributesOf:"$listItem",isBlock:!0}),t.addAttributeCheck((o,a)=>{const l=o.getItem(o.length-2);if(t.getAttributeProperties(a).isFormatting&&l&&l.name=="codeBlock")return!1}),e.editing.downcastDispatcher.on("insert:codeBlock",lL(n,s,!0)),e.data.downcastDispatcher.on("insert:codeBlock",lL(n,s)),e.data.downcastDispatcher.on("insert:softBreak",A3e(n),{priority:"high"}),e.data.upcastDispatcher.on("element:code",k3e(r,s)),e.data.upcastDispatcher.on("text",S3e()),e.data.upcastDispatcher.on("element:pre",P3e(),{priority:"high"}),this.listenTo(e.editing.view.document,"clipboardInput",(o,a)=>{let l=n.createRange(n.document.selection.anchor);if(a.targetRanges&&(l=e.editing.mapper.toModelRange(a.targetRanges[0])),!l.start.parent.is("element","codeBlock"))return;const c=a.dataTransfer.getData("text/plain"),d=new D0(e.editing.view.document);a.content=_3e(d,c)}),e.plugins.has("ClipboardPipeline")&&e.plugins.get(Ls).on("contentInsertion",(o,a)=>{const l=e.model,c=l.document.selection;c.anchor.parent.is("element","codeBlock")&&l.change(d=>{const f=d.createRangeIn(a.content);for(const m of[...f.getItems()])m.is("node")&&!t.checkChild(c.anchor,m)&&d.remove(m)})}),this.listenTo(n,"getSelectedContent",(o,[a])=>{const l=a.anchor;a.isCollapsed||!l.parent.is("element","codeBlock")||!l.hasSameParentAs(a.focus)||n.change(c=>{const d=o.return;if(l.parent.is("element")&&(d.childCount>1||a.containsEntireContent(l.parent))){const m=c.createElement("codeBlock",l.parent.getAttributes());c.append(d,m);const p=c.createDocumentFragment();c.append(m,p),o.return=p;return}const f=d.getChild(0);t.checkAttribute(f,"code")&&c.setAttribute("code",!0,f)})})}afterInit(){const e=this.editor,t=e.commands,n=t.get("indent"),r=t.get("outdent");n&&n.registerChildCommand(t.get("indentCodeBlock"),{priority:"highest"}),r&&r.registerChildCommand(t.get("outdentCodeBlock")),this.listenTo(e.editing.view.document,"enter",(s,o)=>{e.model.document.selection.getLastPosition().parent.is("element","codeBlock")&&(!F3e(e,o.isSoft)&&!O3e(e,o.isSoft)&&R3e(e),o.preventDefault(),s.stop())},{context:"pre"}),this._initAriaAnnouncements()}_initAriaAnnouncements(){const{model:e,ui:t,t:n}=this.editor,r=rx(this.editor);let s=null;e.document.selection.on("change:range",()=>{const o=e.document.selection.focus.parent;!t||s===o||!o.is("element")||(s&&s.is("element","codeBlock")&&t.ariaLiveAnnouncer.announce(oL(n,r,s,"leave")),o.is("element","codeBlock")&&t.ariaLiveAnnouncer.announce(oL(n,r,o,"enter")),s=o)})}}function R3e(i){const e=i.model,t=e.document,n=t.selection.getLastPosition();let r;const s=$K(n,e);s&&s.is("$text")&&(r=y4(s)),i.model.change(o=>{i.execute("shiftEnter"),r&&o.insertText(r,t.selection.anchor)})}function F3e(i,e){const n=i.model.document,r=i.editing.view,s=n.selection.getLastPosition(),o=s.nodeAfter;return e||!n.selection.isCollapsed||!s.isAtStart||!Lu(o)?!1:(i.model.change(a=>{i.execute("enter");const l=n.selection.anchor.parent.previousSibling;a.rename(l,GK),a.setSelection(l,"in"),i.model.schema.removeDisallowedAttributes([l],a),a.remove(o)}),r.scrollToTheSelection(),!0)}function O3e(i,e){const t=i.model,n=t.document,r=i.editing.view,s=n.selection.getLastPosition(),o=s.nodeBefore;let a;if(e||!n.selection.isCollapsed||!s.isAtEnd||!o||!o.previousSibling)return!1;if(Lu(o)&&Lu(o.previousSibling))a=t.createRange(t.createPositionBefore(o.previousSibling),t.createPositionAfter(o));else if(nT(o)&&Lu(o.previousSibling)&&Lu(o.previousSibling.previousSibling))a=t.createRange(t.createPositionBefore(o.previousSibling.previousSibling),t.createPositionAfter(o));else if(nT(o)&&Lu(o.previousSibling)&&nT(o.previousSibling.previousSibling)&&o.previousSibling.previousSibling&&Lu(o.previousSibling.previousSibling.previousSibling))a=t.createRange(t.createPositionBefore(o.previousSibling.previousSibling.previousSibling),t.createPositionAfter(o
50));else return!1;return i.model.change(l=>{l.remove(a),i.execute("enter");const c=n.selection.anchor.parent;l.rename(c,GK),i.model.schema.removeDisallowedAttributes([c],l)}),r.scrollToTheSelection(),!0}function nT(i){return i&&i.is("$text")&&!i.data.match(/\S/)}function Lu(i){return i&&i.is("element","softBreak")}class N3e extends be{static get pluginName(){return"CodeBlockUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,n=e.ui.componentFactory,r=rx(e),s=this._getLanguageListItemDefinitions(r),o=e.commands.get("codeBlock");n.add("codeBlock",a=>{const l=zi(a,rm),c=l.buttonView,d=t("Insert code block");return c.set({label:d,tooltip:!0,icon:KM,isToggleable:!0}),c.bind("isOn").to(o,"value",f=>!!f),c.on("execute",()=>{e.execute("codeBlock",{usePreviousLanguageChoice:!0}),e.editing.view.focus()}),l.on("execute",f=>{e.execute("codeBlock",{language:f.source._codeBlockLanguage,forceValue:!0}),e.editing.view.focus()}),l.class="ck-code-block-dropdown",l.bind("isEnabled").to(o),Hl(l,s,{role:"menu",ariaLabel:d}),l}),n.add("menuBar:codeBlock",a=>{const l=new ls(a);l.buttonView.set({role:"menuitem",label:t("Code block"),icon:KM}),l.bind("isEnabled").to(o);const c=new Ol(a);c.set({ariaLabel:t("Insert code block")});for(const d of s){const f=new Sa(a,l),m=new gn(a);m.bind(...Object.keys(d.model)).to(d.model),m.set({isToggleable:!0,role:"menuitemcheckbox"}),m.delegate("execute").to(l),m.on("execute",()=>{e.execute("codeBlock",{language:d.model._codeBlockLanguage,forceValue:o.value!=d.model._codeBlockLanguage}),e.editing.view.focus()}),f.children.add(m),c.items.add(f)}return l.panelView.children.add(c),l})}_getLanguageListItemDefinitions(e){const n=this.editor.commands.get("codeBlock"),r=new Jn;for(const s of e){const o={type:"button",model:new Fl({_codeBlockLanguage:s.language,label:s.label,role:"menuitemradio",withText:!0})};o.model.bind("isOn").to(n,"value",a=>a===o.model._codeBlockLanguage),r.add(o)}return r}}class B3e extends be{static get requires(){return[I3e,N3e]}static get pluginName(){return"CodeBlock"}static get isOfficialPlugin(){return!0}}class M3e extends mSe{view;_toolbarConfig;_elementReplacer;constructor(e,t){super(e),this.view=t,this._toolbarConfig=pK(e.config.get("toolbar")),this._elementReplacer=new xG,this.listenTo(e.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(e){const t=this.editor,n=this.view,r=t.editing.view,s=n.editable,o=r.document.getRoot();s.name=o.rootName,n.render();const a=s.element;this.setEditableElement(s.name,a),n.editable.bind("isFocused").to(this.focusTracker),r.attachDomRoot(a),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),n.menuBarView&&this.initMenuBar(n.menuBarView),this._initDialogPluginIntegration(),this._initContextualBalloonIntegration(),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.getDomRoot(e.editable.name)&&t.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),e.stickyPanel.limiterElement=e.element,e.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",({visualTop:t})=>t||0),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,n=t.document.getRoot(),r=e.sourceElement;let s;const o=e.config.get("placeholder");o&&(s=typeof o=="string"?o:o[this.view.editable.name]),!s&&r&&r.tagName.toLowerCase()==="textarea"&&(s=r.getAttribute("placeholder")),s&&(n.placeholder=s),W3({view:t,element:n,isDirectHost:!1,keepOnFocus:!0})}_initContextualBalloonIntegration(){if(!this.editor.plugins.has("ContextualBalloon"))return;const{stickyPanel:e}=this.view,t=this.editor.plugins.get("ContextualBalloon");t.on("getPositionOptions",r=>{const s=r.return;if(!s||!e.isSticky||!e.element)return;const o=new gt(e.element).height,a=typeof s.target=="function"?s.target():s.target,l=typeof s.limiter=="function"?s.limiter():s.limiter;if(a&&l&&new gt(a).height>=new gt(l).height-o)return;const c={...s.viewportOffsetConfig},d=(c.top||0)+o;r.return={...s,viewportOffsetConfig:{...c,top:d}}},{priority:"low"});const n=()=>{t.visibleView&&t.updatePosition()};this.listenTo(e,"change:isSticky",n),this.listenTo(this.editor.ui,"change:viewportOffset",n)}_handleScrollToTheSelectionWithStickyPanel(e,t,n){const r=this.view.stickyPanel;if(r.isSticky){const s=new gt(r.element).height;t.viewportOffset.top+=s}else{const s=()=>{this.editor.editing.view.scrollToTheSelection(n)};this.listenTo(r,"change:isSticky",s),setTimeout(()=>{this.stopListening(r,"change:isSticky",s)},20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const e=this.view.stickyPanel,t=this.editor.plugins.get("Dialog");t.on("show",()=>{const n=t.view;n.on("moveTo",(r,s)=>{if(!e.isSticky||n.wasMoved||n.isModal)return;const o=new gt(e.contentPanelElement);s[1]<o.bottom+zg.defaultOffset&&(s[1]=o.bottom+zg.defaultOffset)},{priority:"high"})},{priority:"low"})}}class L3e extends gSe{stickyPanel;toolbar;editable;constructor(e,t,n={}
50){super(e),this.stickyPanel=new xSe(e),this.toolbar=new ud(e,{shouldGroupWhenFull:n.shouldToolbarGroupWhenFull}),n.useMenuBar&&(this.menuBarView=new ESe(e)),this.editable=new ySe(e,t,void 0,{label:n.label})}render(){super.render(),this.menuBarView?this.stickyPanel.content.addMany([this.menuBarView,this.toolbar]):this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class cL extends gTe(fTe){static get editorName(){return"ClassicEditor"}ui;constructor(e,t={}){if(!E1(e)&&t.initialData!==void 0)throw new oe("editor-create-initial-data",null);super(t),this.config.define("menuBar.isVisible",!1),this.config.get("initialData")===void 0&&this.config.set("initialData",U3e(e)),E1(e)&&(this.sourceElement=e),this.model.document.createRoot();const n=!this.config.get("toolbar.shouldNotGroupWhenFull"),r=this.config.get("menuBar"),s=new L3e(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:n,useMenuBar:r.isVisible,label:this.config.get("label")});this.ui=new M3e(this,s),mTe(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise(n=>{const r=new this(e,t);n(r.initPlugins().then(()=>r.ui.init(E1(e)?e:null)).then(()=>r.data.init(r.config.get("initialData"))).then(()=>r.fire("ready")).then(()=>r))})}}function U3e(i){return E1(i)?o_e(i):i}function E1(i){return Uc(i)}class V3e extends ut{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let n=e.schema.getLimitElement(t);if(t.containsEntireContent(n)||!uL(e.schema,n))do if(n=n.parent,!n)return;while(!uL(e.schema,n));e.change(r=>{r.setSelection(n,"in")})}}function uL(i,e){return i.isLimit(e)&&(i.checkChild(e,"$text")||i.checkChild(e,"paragraph"))}const j3e=v_("Ctrl+A");class z3e extends be{static get pluginName(){return"SelectAllEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,r=e.editing.view.document;e.commands.add("selectAll",new V3e(e)),this.listenTo(r,"keydown",(s,o)=>{ld(o)===j3e&&(e.execute("selectAll"),o.preventDefault())}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Select all"),keystroke:"CTRL+A"}]})}}class W3e extends be{static get pluginName(){return"SelectAllUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",()=>{const t=this._createButton(nt);return t.set({tooltip:!0}),t}),e.ui.componentFactory.add("menuBar:selectAll",()=>this._createButton(gn))}_createButton(e){const t=this.editor,n=t.locale,r=t.commands.get("selectAll"),s=new e(t.locale),o=n.t;return s.set({label:o("Select all"),icon:tAe,keystroke:"Ctrl+A"}),s.bind("isEnabled").to(r,"isEnabled"),this.listenTo(s,"execute",()=>{t.execute("selectAll"),t.editing.view.focus()}),s}}class H3e extends be{static get requires(){return[z3e,W3e]}static get pluginName(){return"SelectAll"}static get isOfficialPlugin(){return!0}}class YK extends ut{_stack=[];_createdBatches=new WeakSet;constructor(e){super(e),this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(e.data,"set",(t,n)=>{n[1]={...n[1]};const r=n[1];r.batchType||(r.batchType={isUndoable:!1})},{priority:"high"}),this.listenTo(e.data,"set",(t,n)=>{n[1].batchType.isUndoable||this.clearStack()})}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(e){const t=this.editor.model.document.selection,n={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,n){const r=this.editor.model,s=r.document,o=[],a=e.map(c=>c.getTransformedByOperations(n)),l=a.flat();for(const c of a){const d=c.filter(f=>f.root!=s.graveyard).filter(f=>!$3e(f,l));d.length&&(q3e(d),o.push(d[0]))}o.length&&r.change(c=>{c.setSelection(o,{backward:t})})}_undo(e,t){const n=this.editor.model,r=n.document;this._createdBatches.add(t);const s=e.operations.slice().filter(o=>o.isDocumentOperation);s.reverse();for(const o of s){const a=o.baseVersion+1,l=Array.from(r.history.getOperations(a)),d=RDe([o.getReversed()],l,{useRelations:!0,document:this.editor.model.document,forceWeakRemove:!0}).operationsA;for(let f of d){const m=f.affectedSelectable;m&&!n.canEditAt(m)&&(f=new Bi(f.baseVersion)),t.addOperation(f),n.applyOperation(f),r.history.setOperationAsUndone(o,f)}}}}function q3e(i){i.sort((e,t)=>
50e.start.isBefore(t.start)?-1:1);for(let e=1;e<i.length;e++){const n=i[e-1].getJoined(i[e],!0);n&&(e--,i.splice(e,2,n))}}function $3e(i,e){return e.some(t=>t!==i&&t.containsRange(i,!0))}class G3e extends YK{execute(e=null){const t=e?this._stack.findIndex(s=>s.batch==e):this._stack.length-1,n=this._stack.splice(t,1)[0],r=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(r,()=>{this._undo(n.batch,r);const s=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,s)}),this.fire("revert",n.batch,r),this.refresh()}}class Y3e extends YK{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,()=>{const r=e.batch.operations[e.batch.operations.length-1].baseVersion+1,s=this.editor.model.document.history.getOperations(r);this._restoreSelection(e.selection.ranges,e.selection.isBackward,s),this._undo(e.batch,t)}),this.fire("revert",e.batch,t),this.refresh()}}class K3e extends be{_undoCommand;_redoCommand;_batchRegistry=new WeakSet;static get pluginName(){return"UndoEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;this._undoCommand=new G3e(e),this._redoCommand=new Y3e(e),e.commands.add("undo",this._und
50oCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",(n,r)=>{const s=r[0];if(!s.isDocumentOperation)return;const o=s.batch,a=this._redoCommand.createdBatches.has(o),l=this._undoCommand.createdBatches.has(o);this._batchRegistry.has(o)||(this._batchRegistry.add(o),o.isUndoable&&(a?this._undoCommand.addBatch(o):l||(this._undoCommand.addBatch(o),this._redoCommand.clearStack())))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(n,r,s)=>{this._redoCommand.addBatch(s)}),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Undo"),keystroke:"CTRL+Z"},{label:t("Redo"),keystroke:[["CTRL+Y"],["CTRL+SHIFT+Z"]]}]})}}class X3e extends be{static get pluginName(){return"UndoUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale,n=e.t,r=t.uiLanguageDirection=="ltr"?i7:t7,s=t.uiLanguageDirection=="ltr"?t7:i7;this._addButtonsToFactory("undo",n("Undo"),"CTRL+Z",r),this._addButtonsToFactory("redo",n("Redo"),"CTRL+Y",s)}_addButtonsToFactory(e,t,n,r){const s=this.editor;s.ui.componentFactory.add(e,()=>{const o=this._createButton(nt,e,t,n,r);return o.set({tooltip:!0}),o}),s.ui.componentFactory.add("menuBar:"+e,()=>this._createButton(gn,e,t,n,r))}_createButton(e,t,n,r,s){const o=this.editor,a=o.locale,l=o.commands.get(t),c=new e(a);return c.set({label:n,icon:s,keystroke:r}),c.bind("isEnabled").to(l,"isEnabled"),this.listenTo(c,"execute",()=>{o.execute(t),o.editing.view.focus()}),c}}class v4 extends be{static get requires(){return[K3e,X3e]}static get pluginName(){return"Undo"}static get isOfficialPlugin(){return!0}}class Q3e extends be{static get requires(){return[fke,HK,k0,H3e,BK,PK,v4]}static get pluginName(){return"Essentials"}static get isOfficialPlugin(){return!0}}class Z3e extends Ge{children;_findInputView;_replaceInputView;_findButtonView;_findPrevButtonView;_findNextButtonView;_advancedOptionsCollapsibleView;_matchCaseSwitchView;_wholeWordsOnlySwitchView;_replaceButtonView;_replaceAllButtonView;_inputsDivView;_actionButtonsDivView;_focusTracker;_keystrokes;_focusables;focusCycler;constructor(e){super(e);const t=e.t;this.children=this.createCollection(),this.set("matchCount",0),this.set("highlightOffset",0),this.set("isDirty",!1),this.set("_areCommandsEnabled",{}),this.set("_resultsCounterText",""),this.set("_matchCase",!1),this.set("_wholeWordsOnly",!1),this.bind("_searchResultsFound").to(this,"matchCount",this,"isDirty",(n,r)=>n>0&&!r),this._findInputView=this._createInputField(t("Find in text…")),this._findPrevButtonView=this._createButton({label:t("Previous result"),class:"ck-button-prev",icon:jc,keystroke:"Shift+F3",tooltip:!0}),this._findNextButtonView=this._createButton({label:t("Next result"),class:"ck-button-next",icon:jc,keystroke:"F3",tooltip:!0}),this._replaceInputView=this._createInputField(t("Replace with…"),"ck-labeled-field-replace"),this._inputsDivView=this._createInputsDiv(),this._matchCaseSwitchView=this._createMatchCaseSwitch(),this._wholeWordsOnlySwitchView=this._createWholeWordsOnlySwitch(),this._advancedOptionsCollapsibleView=this._createAdvancedOptionsCollapsible(),this._replaceAllButtonView=this._createButton({label:t("Replace all"),class:"ck-button-replaceall",withText:!0}),this._replaceButtonView=this._createButton({label:t("Replace"),class:"ck-button-replace",withText:!0}),this._findButtonView=this._createButton({label:t("Find"),class:"ck-button-find ck-button-action",withText:!0}),this._actionButtonsDivView=this._createActionButtonsDiv(),this._focusTracker=new Fn,this._keystrokes=new qn,this._focusables=new qi,this.focusCycler=new or({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this._keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.addMany([this._inputsDivView,this._advancedOptionsCollapsibleView,this._actionButtonsDivView]),this.setTemplate({tag:"form",attributes:{class:["ck","ck-find-and-replace-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Xc({view:this}),this._initFocusCycling(),this._initKeystrokeHandling()}destroy(){super.destroy(),this._focusTracker.destroy(),this._keystrokes.destroy()}focus(e){e===-1?this.focusCycler.focusLast():this.focusCycler.focusFirst()}
50reset(){this._findInputView.errorText=null,this.isDirty=!0}get _textToFind(){return this._findInputView.fieldView.element.value}get _textToReplace(){return this._replaceInputView.fieldView.element.value}_createInputsDiv(){const e=this.locale,t=e.t,n=new Ge(e);return this._findInputView.fieldView.on("input",()=>{this.isDirty=!0}),this._findPrevButtonView.delegate("execute").to(this,"findPrevious"),this._findNextButtonView.delegate("execute").to(this,"findNext"),this._findPrevButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",({findPrevious:r})=>r),this._findNextButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",({findNext:r})=>r),this._injectFindResultsCounter(),this._replaceInputView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",({replace:r},s)=>r&&s),this._replaceInputView.bind("infoText").to(this._replaceInputView,"isEnabled",this._replaceInputView,"isFocused",(r,s)=>r||!s?"":t("Tip: Find some text first in order to replace it.")),n.setTemplate({tag:"div",attributes:{class:["ck","ck-find-and-replace-form__inputs"]},children:[this._findInputView,this._findPrevButtonView,this._findNextButtonView,this._replaceInputView]}),n}_onFindButtonExecute(){if(!this._textToFind){const e=this.t;this._findInputView.errorText=e("Text to find must not be empty.");return}this.isDirty=!1,this.fire("findNext",{searchText:this._textToFind,matchCase:this._matchCase,wholeWords:this._wholeWordsOnly})}_injectFindResultsCounter(){const e=this.locale,t=e.t,n=this.bindTemplate,r=new Ge(this.locale);this.bind("_resultsCounterText").to(this,"highlightOffset",this,"matchCount",(o,a)=>t("%0 of %1",[o,a])),r.setTemplate({tag:"span",attributes:{class:["ck","ck-results-counter",n.if("isDirty","ck-hidden")]},children:[{text:n.to("_resultsCounterText")}]});const s=()=>{const o=this._findInputView.fieldView.element;if(!o||!Aa(o))return;const a=new gt(r.element).width,l=e.uiLanguageDirection==="ltr"?"paddingRight":"paddingLeft";a?o.style[l]=`calc( 2 * var(--ck-spacing-standard) + ${a}px )`:o.style[l]=""};this.on("change:_resultsCounterText",s,{priority:"low"}),this.on("change:isDirty",s,{priority:"low"}),this._findInputView.template.children[0].children.push(r)}_createAdvancedOptionsCollapsible(){const e=this.locale.t,t=new lK(this.locale,[this._matchCaseSwitchView,this._wholeWordsOnlySwitchView]);return t.set({label:e("Advanced options"),isCollapsed:!0}),t}_createActionButtonsDiv(){const e=new Ge(this.locale);return this._replaceButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",({replace:t},n)=>t&&n),this._replaceAllButtonView.bind("isEnabled").to(this,"_areCommandsEnabled",this,"_searchResultsFound",({replaceAll:t},n)=>t&&n),this._replaceButtonView.on("execute",()=>{this.fire("replace",{searchText:this._textToFind,replaceText:this._textToReplace})}),this._replaceAllButtonView.on("execute",()=>{this.fire("replaceAll",{searchText:this._textToFind,replaceText:this._textToReplace}),this.focus()}),this._findButtonView.on("execute",this._onFindButtonExecute.bind(this)),e.setTemplate({tag:"div",attributes:{class:["ck","ck-find-and-replace-form__actions"]},children:[this._replaceAllButtonView,this._replaceButtonView,this._findButtonView]}),e}_createMatchCaseSwitch(){const e=this.locale.t,t=new Lh(this.locale);return t.set({label:e("Match case"),withText:!0}),t.bind("isOn").to(this,"_matchCase"),t.on("execute",()=>{this._matchCase=!this._matchCase,this.isDirty=!0}),t}_createWholeWordsOnlySwitch(){const e=this.locale.t,t=new Lh(this.locale);return t.set({label:e("Whole words only"),withText:!0}),t.bind("isOn").to(this,"_wholeWordsOnly"),t.on("execute",()=>{this._wholeWordsOnly=!this._wholeWordsOnly,this.isDirty=!0}),t}_initFocusCycling(){[this._findInputView,this._findPrevButtonView,this._findNextButtonView,this._replaceInputView,this._advancedOptionsCollapsibleView.buttonView,this._matchCaseSwitchView,this._wholeWordsOnlySwitchView,this._replaceAllButtonView,this._replaceButtonView,this._findButtonView].forEach(t=>{this._focusables.add(t),this._focusTracker.add(t.element)})}_initKeystrokeHandling(){const e=n=>n.stopPropagation(),t=n=>{n.stopPropagation(),n.preventDefault()};this._keystrokes.listenTo(this.element),this._keystrokes.set("f3",n=>{t(n),this._findNextButtonView.fire("execute")}),this._keystrokes.set("shift+f3",n=>{t(n),this._findPrevButtonView.fire("execute")}),this._keystrokes.set("enter",n=>{const r=n.target;
50r===this._findInputView.fieldView.element?(this._areCommandsEnabled.findNext?this._findNextButtonView.fire("execute"):this._findButtonView.fire("execute"),t(n)):r===this._replaceInputView.fieldView.element&&!this.isDirty&&(this._replaceButtonView.fire("execute"),t(n))}),this._keystrokes.set("shift+enter",n=>{n.target===this._findInputView.fieldView.element&&(this._areCommandsEnabled.findPrevious?this._findPrevButtonView.fire("execute"):this._findButtonView.fire("execute"),t(n))}),this._keystrokes.set("arrowright",e),this._keystrokes.set("arrowleft",e),this._keystrokes.set("arrowup",e),this._keystrokes.set("arrowdown",e)}_createButton(e){const t=new nt(this.locale);return t.set(e),t}_createInputField(e,t){const n=new hi(this.locale,Is);return n.label=e,n.class=t,n}}class J3e extends be{static get requires(){return[As]}static get pluginName(){return"FindAndReplaceUI"}static get isOfficialPlugin(){return!0}formView;constructor(e){super(e),e.config.define("findAndReplace.uiType","dialog"),this.formView=null}init(){const e=this.editor,t=e.config.get("findAndReplace.uiType")==="dropdown",n=e.commands.get("find"),r=this.editor.t;e.ui.componentFactory.add("findAndReplace",()=>{let s;return t?(s=this._createDropdown(),s.bind("isEnabled").to(n)):s=this._createDialogButtonForToolbar(),e.keystrokes.set("Ctrl+F",(o,a)=>{if(n.isEnabled){if(s instanceof qg){const l=s.buttonView;l.isOn||l.fire("execute")}else s.isOn?e.plugins.get("Dialog").view.focus():s.fire("execute");a()}}),s}),t||e.ui.componentFactory.add("menuBar:findAndReplace",()=>this._createDialogButtonForMenuBar()),e.accessibility.addKeystrokeInfos({keystrokes:[{label:r("Find in the document"),keystroke:"CTRL+F"}]})}_createDropdown(){const e=this.editor,t=e.locale.t,n=zi(e.locale);return n.once("change:isOpen",()=>{this.formView=this._createFormView(),this.formView.children.add(new Wl(e.locale,{label:t("Find and replace")}),0),n.panelView.children.add(this.formView)}),n.on("change:isOpen",(r,s,o)=>{o?this._setupFormView():this.fire("searchReseted")},{priority:"low"}),n.buttonView.set({icon:XM,label:t("Find and replace"),keystroke:"CTRL+F",tooltip:!0}),n}_createDialogButtonForToolbar(){const e=this.editor,t=this._createButton(nt),n=e.plugins.get("Dialog");return t.set({tooltip:!0}),t.bind("isOn").to(n,"id",r=>r==="findAndReplace"),t.on("execute",()=>{t.isOn?n.hide():this._showDialog()}),t}_createDialogButtonForMenuBar(){const e=this._createButton(gn),t=this.editor.plugins.get("Dialog"),n=this.editor.plugins.get("Dialog");return e.set({role:"menuitemcheckbox",isToggleable:!0}),e.bind("isOn").to(n,"id",r=>r==="findAndReplace"),e.on("execute",()=>{if(t.id==="findAndReplace"){t.hide();return}this._showDialog()}),e}_createButton(e){const t=this.editor,n=t.commands.get("find"),r=new e(t.locale),s=t.locale.t;return r.bind("isEnabled").to(n),r.set({icon:XM,label:s("Find and replace"),keystroke:"CTRL+F"}),r}_showDialog(){const e=this.editor,t=e.plugins.get("Dialog"),n=e.locale.t;this.formView||(this.formView=this._createFormView()),t.show({id:"findAndReplace",title:n("Find and replace"),content:this.formView,position:Ds.EDITOR_TOP_SIDE,onShow:()=>{this._setupFormView()},onHide:()=>{this.fire("searchReseted")}})}_createFormView(){const e=this.editor,t=new(Mh(Z3e))(e.locale),n=e.commands,s=this.editor.plugins.get("FindAndReplaceEditing").state;t.bind("highlightOffset").to(s,"highlightedOffset"),t.listenTo(s.results,"change",()=>{t.matchCount=s.results.length});const o=n.get("findNext"),a=n.get("findPrevious"),l=n.get("replace"),c=n.get("replaceAll");return t.bind("_areCommandsEnabled").to(o,"isEnabled",a,"isEnabled",l,"isEnabled",c,"isEnabled",(d,f,m,p)=>({findNext:d,findPrevious:f,replace:m,replaceAll:p})),t.delegate("findNext","findPrevious","replace","replaceAll").to(this),t.on("change:isDirty",(d,f,m)=>{m&&this.fire("searchReseted")}),t}_setupFormView(){this.formView.disableCssTransitions(),this.formView.reset(),this.formView._findInputView.fieldView.select(),this.formView.enableCssTransitions()}}class e4e extends ut{_state;constructor(e,t){super(e),this.isEnabled=!0,this.affectsData=!1,this._state=t}execute(e,{matchCase:t,wholeWords:n}={}){const{editor:r}=this,{model:s}=r,o=r.plugins.get("FindAndReplaceUtils");let a,l="";typeof e=="string"?a=(...f)=>({results:o.findByTextCallback(e,{matchCase:t,wholeWords:n})(...f),searchText:e}):a=e;const c=a;a=(...f)=>{const m=c(...f);return m&&"searchText"in m&&(l=m.searchText),m};const d=s.document.getRootNames().reduce((f,m)=>o.updateFindResultFromRange(s.createRangeIn(s.document.getRoot(m)),s,a,f),null);return this._state.clear(s),this._state.results.addMany(d),this._state.highlightedResult=d.get(0),this._state.searchText=l,a&&(this._state.lastSearchCallback=a),this._state.matchCase=!!t,this._state.matchWholeWords=!!n,{results:d,findCallback:a}}}class t4e extends hn(){constructor(e){super(),this.set("results",new Jn),this.set("highlightedResult",null),this.set("highlightedOffset",0),this.set("searchText",""),this.set("replaceText",""),this.set("lastSearchCallback",null),this.set("matchCase",!1),this.set("matchWholeWords",!1),this.results.on("change",(t,{removed:n,index:r})=>{if(Array.from(n).length){let s=!1;if(e.change(o=>{for(const a of n)this.highlightedResult===a&&(s=!0),e.markers.has(a.marker.name)&&o.removeMarker(a.marker)}),s){const o=r>=this.results.length?0:r;this.highlightedResult=this.results.get(o)}}}),this.on("change:highlightedResult",()=>{this.refreshHighlightOffset(e)})}clear(e){this.searchText="",e.change(t=>{if(this.highlightedResult){const n=this.highlightedResult.marker.name.split(":")[1],r=e.markers.get(`findResultHighlighted:${n}`);r&&t.removeMarker(r)}
50[...this.results].forEach(({marker:n})=>{t.removeMarker(n)})}),this.results.clear()}refreshHighlightOffset(e){const{highlightedResult:t,results:n}=this;t?this.highlightedOffset=KK(e,[...n]).indexOf(t)+1:this.highlightedOffset=0}}function KK(i,e){const t={before:-1,same:0,after:1,different:1};return i.document.getRootNames().flatMap(n=>e.filter(r=>r.marker.getStart().root.rootName===n).sort((r,s)=>t[r.marker.getStart().compareWith(s.marker.getStart())]))}class XK extends ut{_state;constructor(e,t){super(e),this.isEnabled=!0,this._state=t,this._isEnabledBasedOnSelection=!1}_replace(e,t){const{model:n}=this.editor,r=t.marker.getRange();n.canEditAt(r)&&n.change(s=>{if(r.root.rootName==="$graveyard"){this._state.results.remove(t);return}let o={};for(const a of r.getItems())if(a.is("$text")||a.is("$textProxy")){o=a.getAttributes();break}n.insertContent(s.createText(e,o),r),this._state.results.has(t)&&this._state.results.remove(t)})}}class n4e extends XK{execute(e,t){const n=Math.max(this._state.highlightedOffset-1,0);if(this._replace(e,t),this._state.results.length){const r=KK(this.editor.model,[...this._state.results]);this._state.highlightedResult=r[n%r.length]}}}class i4e extends XK{execute(e,t){const{editor:n}=this,{model:r}=n,s=n.plugins.get("FindAndReplaceUtils"),o=t instanceof Jn?t:r.document.getRootNames().reduce((a,l)=>s.updateFindResultFromRange(r.createRangeIn(r.document.getRoot(l)),r,s.findByTextCallback(t,this._state),a),null);o.length&&r.change(()=>{[...o].forEach(a=>{this._replace(e,a)})})}}class QK extends ut{_state;constructor(e,t){super(e),this.affectsData=!1,this._state=t,this.isEnabled=!1,this.listenTo(this._state.results,"change",()=>{this.isEnabled=this._state.results.length>1})}refresh(){this.isEnabled=this._state.results.length>1}execute(){const e=this._state.results,t=e.getIndex(this._state.highlightedResult),n=t+1>=e.length?0:t+1;this._state.highlightedResult=this._state.results.get(n)}}class r4e extends QK{execute(){const t=this._state.results.getIndex(this._state.highlightedResult),n=t-1<0?this._state.results.length-1:t-1;this._state.highlightedResult=this._state.results.get(n)}}class s4e extends be{static get pluginName(){return"FindAndReplaceUtils"}static get isOfficialPlugin(){return!0}updateFindResultFromRange(e,t,n,r){const s=r||new Jn,o=a=>s.find(l=>{const{marker:c}=l,d=c.getRange(),f=a.getRange();return d.isEqual(f)});return t.change(a=>{[...e].forEach(({type:l,item:c})=>{if(l==="elementStart"&&t.schema.checkChild(c,"$text")){let d=n({item:c,text:this.rangeToText(t.createRangeIn(c))});if(!d)return;"results"in d&&(d=d.results),d.forEach(f=>{const m=`findResult:${rr()}`,p=a.addMarker(m,{usingOperation:!1,affectsData:!1,range:a.createRange(a.createPositionAt(c,f.start),a.createPositionAt(c,f.end))}),g=o4e(s,p);o(p)||s.add({id:m,label:f.label,marker:p},g)})}})}),s}rangeToText(e){return Array.from(e.getItems({shallow:!0})).reduce((t,n)=>n.is("$text")||n.is("$textProxy")?t+n.data:`${t}
51`,"")}findByTextCallback(e,t){let n="gu";t.matchCase||(n+="i");let r=`(${wxe(e)})`;if(t.wholeWords){const a="[^a-zA-ZÀ-ɏḀ-ỿ]";new RegExp("^"+a).test(e)||(r=`(^|${a}|_)${r}`),new RegExp(a+"$").test(e)||(r=`${r}(?=_|${a}|$)`)}const s=new RegExp(r,n);function o({text:a}){return[...a.matchAll(s)].map(a4e)}return o}}function o4e(i,e){const t=i.find(({marker:n})=>e.getStart().isBefore(n.getStart()));return t?i.getIndex(t):i.length}function a4e(i){const e=i.length-1;let t=i.index;return i.length===3&&(t+=i[1].length),{label:i[e],start:t,end:t+i[e].length}}const l4e="ck-find-result_selected";class c4e extends be{static get requires(){return[s4e]}static get pluginName(){return"FindAndReplaceEditing"}static get licenseFeatureCode(){return"FAR"}static get isPremiumPlugin(){return!0}static get isOfficialPlugin(){return!0}state;init(){this.state=new t4e(this.editor.model),this.set("_isSearchActive",!1),this._defineConverters(),this._defineCommands(),this.listenTo(this.state,"change:highlightedResult",(n,r,s,o)=>{const{model:a}=this.editor;a.change(l=>{if(o){const c=o.marker.name.split(":")[1],d=a.markers.get(`findResultHighlighted:${c}`);d&&l.removeMarker(d)}if(s){const c=s.marker.name.split(":")[1];l.addMarker(`findResultHighlighted:${c}`,{usingOperation:!1,affectsData:!1,range:s.marker.getRange()})}})});const t=fo(((n,r,s)=>{if(s){const o=this.editor.editing.view.domConverter,a=this.editor.editing.mapper.toViewRange(s.marker.getRange());FG({target:o.viewRangeToDom(a),viewportOffset:40})}}).bind(this),32);this.listenTo(this.state,"change:highlightedResult",t,{priority:"low"}),this.listenTo(this.editor,"destroy",t.cancel),this.on("change:_isSearchActive",(n,r,s)=>{s?this.listenTo(this.editor.model.document,"change:data",this._onDocumentChange):this.stopListening(this.editor.model.document,"change:data",this._onDocumentChange)})}find(e,t){return this._isSearchActive=!0,this.editor.execute("find",e,t),this.state.results}stop(){this.state.clear(this.editor.model),this._isSearchActive=!1}_defineCommands(){this.editor.commands.add("find",new e4e(this.editor,this.state)),this.editor.commands.add("findNext",new QK(this.editor,this.state)),this.editor.commands.add("findPrevious",new r4e(this.editor,this.state)),this.editor.commands.add("replace",new n4e(this.editor,this.state)),this.editor.commands.add("replaceAll",new i4e(this.editor,this.state))}_defineConverters(){const{editor:e}=this;e.conversion.for("editingDowncast").markerToHighlight({model:"findResult",view:({markerName:t})=>{const[,n]=t.split(":");return{name:"span",classes:["ck-find-result"],attributes:{"data-find-result":n}}}}),e.conversion.for("editingDowncast").markerToHighlight({model:"findResultHighlighted",view:({markerName:t})=>{const[,n]=t.split(":");return{name:"span",classes:[l4e],attributes:{"data-find-result":n}}}})}_onDocumentChange=()=>{const e=new Set,t=new Set,n=this.editor.model,{results:r}=this.state,s=n.document.differ.getChanges(),o=n.document.differ.getChangedMarkers();
51s.forEach(c=>{c.position&&(c.name==="$text"||c.position.nodeAfter&&n.schema.isInline(c.position.nodeAfter)?(e.add(c.position.parent),[...n.markers.getMarkersAtPosition(c.position)].forEach(d=>{t.add(d.name)})):c.type==="insert"&&c.position.nodeAfter&&e.add(c.position.nodeAfter))}),o.forEach(({name:c,data:{newRange:d}})=>{d&&d.start.root.rootName==="$graveyard"&&t.add(c)}),e.forEach(c=>{[...n.markers.getMarkersIntersectingRange(n.createRangeIn(c))].forEach(f=>t.add(f.name))}),t.forEach(c=>{r.has(c)&&(r.get(c)===this.state.highlightedResult&&(this.state.highlightedResult=null),r.remove(c))});const a=[],l=this.editor.plugins.get("FindAndReplaceUtils");e.forEach(c=>{const d=l.updateFindResultFromRange(n.createRangeOn(c),n,this.state.lastSearchCallback,r);a.push(...d)}),o.forEach(c=>{if(c.data.newRange){const d=l.updateFindResultFromRange(c.data.newRange,n,this.state.lastSearchCallback,r);a.push(...d)}}),!this.state.highlightedResult&&a.length?this.state.highlightedResult=a[0]:this.state.refreshHighlightOffset(n)}}class u4e extends be{static get requires(){return[c4e,J3e]}static get pluginName(){return"FindAndReplace"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.plugins.get("FindAndReplaceUI"),t=this.editor.plugins.get("FindAndReplaceEditing"),n=t.state;e.on("findNext",(r,s)=>{s?(n.searchText=s.searchText,t.find(s.searchText,s)):this.editor.execute("findNext")}),e.on("findPrevious",(r,s)=>{s&&n.searchText!==s.searchText?t.find(s.searchText):this.editor.execute("findPrevious")}),e.on("replace",(r,s)=>{n.searchText!==s.searchText&&t.find(s.searchText);const o=n.highlightedResult;o&&this.editor.execute("replace",s.replaceText,o)}),e.on("replaceAll",(r,s)=>{n.searchText!==s.searchText&&t.find(s.searchText),this.editor.execute("replaceAll",s.replaceText,n.results)}),e.on("searchReseted",()=>{n.clear(this.editor.model),t.stop()})}}class P_ extends ut{attributeKey;constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,r=t.document.selection,s=e.value,o=e.batch,a=l=>{if(r.isCollapsed)s?l.setSelectionAttribute(this.attributeKey,s):l.removeSelectionAttribute(this.attributeKey);else{const c=t.schema.getValidRanges(r.getRanges(),this.attributeKey,{includeEmptyRanges:!0});for(const d of c){let f=d,m=this.attributeKey;d.isCollapsed&&(f=d.start.parent,m=us._getStoreAttributeKey(this.attributeKey)),s?l.setAttribute(m,s,f):l.removeAttribute(m,f)}}};o?t.enqueueChange(o,l=>{a(l)}):t.change(l=>{a(l)})}}const Kr="fontSize",Xr="fontFamily",ca="fontColor",ml="fontBackgroun
51dColor";function ZK(i,e){const t={model:{key:i,values:[]},view:{},upcastAlso:{}};for(const n of e)t.model.values.push(n.model),t.view[n.model]=n.view,n.upcastAlso&&(t.upcastAlso[n.model]=n.upcastAlso);return t}function JK(i){return e=>f4e(e.getStyle(i))}function eX(i){return(e,{writer:t})=>t.createAttributeElement("span",{style:`${i}:${e}`},{priority:7})}function d4e({dropdownView:i,colors:e,columns:t,removeButtonLabel:n,colorPickerLabel:r,documentColorsLabel:s,documentColorsCount:o,colorPickerViewConfig:a}){const l=i.locale,c=new h4(l,{colors:e,columns:t,removeButtonLabel:n,colorPickerLabel:r,documentColorsLabel:s,documentColorsCount:o,colorPickerViewConfig:a});return i.colorSelectorView=c,i.panelView.children.add(c),c}function f4e(i){return i.replace(/\s/g,"")}class h4e extends P_{constructor(e){super(e,Xr)}}function tX(i){return i.map(m4e).filter(e=>e!==void 0)}function TS(i){return i.replace(/["']/g,"").split(",").map(e=>e.trim())}function m4e(i){if(typeof i=="object")return i;if(i==="default")return{title:"Default",model:void 0};if(typeof i=="string")return p4e(i)}function p4e(i){const e=TS(i),t=e[0],n=e.map(g4e).join(", ");return{title:t,model:n,view:{name:"span",styles:{"font-family":n},priority:7}}}function g4e(i){return i=i.trim(),i.indexOf(" ")>0&&(i=`'${i}'`),i}class b4e extends be{static get pluginName(){return"FontFamilyEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(Xr,{options:["default","Arial, Helvetica, sans-serif","Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif","Trebuchet MS, Helvetica, sans-serif","Verdana, Geneva, sans-serif"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Xr}),e.model.schema.setAttributeProperties(Xr,{isFormatting:!0,copyOnEnter:!0});const t=tX(e.config.get("fontFamily.options")).filter(r=>r.model),n=ZK(Xr,t);e.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(n),e.commands.add(Xr,new h4e(e))}_prepareAnyValueConverters(){const e=this.editor;e.conversion.for("downcast").attributeToElement({model:Xr,view:(t,{writer:n})=>n.createAttributeElement("span",{style:"font-family:"+t},{priority:7})}),e.conversion.for("upcast").elementToAttribute({model:{key:Xr,value:t=>t.getStyle("font-family")},view:{name:"span",styles:{"font-family":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{face:/.*/}},model:{key:Xr,value:t=>t.getAttribute("face")}})}}class y4e extends be{static get pluginName(){return"FontFamilyUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,n=this._getLocalizedOptions(),r=e.commands.get(Xr),s=t("Font Family"),o=v4e(n,r);e.ui.componentFactory.add(Xr,a=>{const l=zi(a);return Hl(l,o,{role:"menu",ariaLabel:s}),l.buttonView.set({label:s,icon:QM,tooltip:!0}),l.extendTemplate({attributes:{class:"ck-font-family-dropdown"}}),l.bind("isEnabled").to(r),this.listenTo(l,"execute",c=>{e.execute(c.source.commandName,{value:c.source.commandParam}),e.editing.view.focus()}),l}),e.ui.componentFactory.add(`menuBar:${Xr}`,a=>{const l=new ls(a);l.buttonView.set({label:s,icon:QM}),l.bind("isEnabled").to(r);const c=new Ol(a);for(const d of o){const f=new Sa(a,l),m=new gn(a);m.set({role:"menuitemradio",isToggleable:!0}),m.bind(...Object.keys(d.model)).to(d.model),m.delegate("execute").to(l),m.on("execute",()=>{e.execute(d.model.commandName,{value:d.model.commandParam}),e.editing.view.focus()}),f.children.add(m),c.items.add(f)}return l.panelView.children.add(c),l})}_getLocalizedOptions(){const e=this.editor,t=e.t;return tX(e.config.get(Xr).options).map(r=>(r.title==="Default"&&(r.title=t("Default")),r))}}function v4e(i,e){const t=new Jn;for(const n of i){const r={type:"button",model:new Fl({commandName:Xr,commandParam:n.model,label:n.title,role:"menuitemradio",withText:!0})};r.model.bind("isOn").to(e,"value",s=>{if(s===n.model)return!0;
51if(!s||!n.model)return!1;const o=TS(s)[0].toLowerCase(),a=TS(n.model)[0].toLowerCase();return o===a}),n.view&&typeof n.view!="string"&&n.view.styles&&r.model.set("labelStyle",`font-family: ${n.view.styles["font-family"]}`),t.add(r)}return t}class w4e extends be{static get requires(){return[b4e,y4e]}static get pluginName(){return"FontFamily"}static get isOfficialPlugin(){return!0}}class x4e extends P_{constructor(e){super(e,Kr)}}function Gg(i){return i.map(e=>_4e(e)).filter(e=>e!==void 0)}const dL={get tiny(){return{title:"Tiny",model:"tiny",view:{name:"span",classes:"text-tiny",priority:7}}},get small(){return{title:"Small",model:"small",view:{name:"span",classes:"text-small",priority:7}}},get big(){return{title:"Big",model:"big",view:{name:"span",classes:"text-big",priority:7}}},get huge(){return{title:"Huge",model:"huge",view:{name:"span",classes:"text-huge",priority:7}}}};function _4e(i){if(typeof i=="number"&&(i=String(i)),typeof i=="object"&&E4e(i))return AS(i);const e=D4e(i);if(e)return AS(e);if(i==="default")return{model:void 0,title:"Default"};if(!T4e(i))return C4e(i)}function C4e(i){return typeof i=="string"&&(i={title:i,model:`${parseFloat(i)}px`}),i.view={name:"span",styles:{"font-size":i.model}},AS(i)}function AS(i){return i.view&&typeof i.view!="string"&&!i.view.priority&&(i.view.priority=7),i}function D4e(i){return typeof i=="string"?dL[i]:dL[i.model]}function E4e(i){return i.title&&i.model&&i.view}function T4e(i){let e;if(typeof i=="object")if(i.model)e=parseFloat(i.model);else throw new oe("font-size-invalid-definition",null,i);else e=parseFloat(i);return isNaN(e)}const fL=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class A4e extends be{static get pluginName(){return"FontSizeEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(Kr,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Kr}),e.model.schema.setAttributeProperties(Kr,{isFormatting:!0,copyOnEnter:!0});const t=e.config.get("fontSize.supportAllValues"),n=Gg(this.editor.config.get("fontSize.options")).filter(s=>s.model),r=ZK(Kr,n);t?(this._prepareAnyValueConverters(r),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(r),e.commands.add(Kr,new x4e(e))}_prepareAnyValueConverters(e){const t=this.editor,n=e.model.values.filter(r=>!C_(String(r))&&!PY(String(r)));if(n.length)throw new oe("font-size-invalid-use-of-named-presets",null,{presets:n});t.conversion.for("downcast").attributeToElement({model:Kr,view:(r,{writer:s})=>{if(r)return s.createAttributeElement("span",{style:"font-size:"+r},{priority:7})}}),t.conversion.for("upcast").elementToAttribute({model:{key:Kr,value:r=>r.getStyle("font-size")},view:{name:"span",styles:{"font-size":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{size:/^[+-]?\d{1,3}$/}},model:{key:Kr,value:t=>{const n=t.getAttribute("size"),r=n[0]==="-"||n[0]==="+";let s=parseInt(n,10);r&&(s=3+s);const o=fL.length-1,a=Math.min(Math.max(s,0),o);return fL[a]}}})}}class k4e extends be{static get pluginName(){return"FontSizeUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,n=this._getLocalizedOptions(),r=e.commands.get(Kr),s=t("Font Size"),o=S4e(n,r);e.ui.componentFactory.add(Kr,a=>{const l=zi(a);return Hl(l,o,{role:"menu",ariaLabel:s}),l.buttonView.set({label:s,icon:ZM,tooltip:!0}),l.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),l.bind("isEnabled").to(r),this.listenTo(l,"execute",c=>{e.execute(c.source.commandName,{value:c.source.commandParam}),e.editing.view.focus()}),l}),e.ui.componentFactory.add(`menuBar:${Kr}`,a=>{const l=new ls(a);l.buttonView.set({label:s,icon:ZM}),l.bind("isEnabled").to(r);const c=new Ol(a);for(const d of o){const f=new Sa(a,l),m=new gn(a);m.set({role:"menuitemradio",isToggleable:!0}),m.bind(...Object.keys(d.model)).to(d.model),m.delegate("execute").to(l),m.on("execute",()=>{e.execute(d.model.commandName,{value:d.model.commandParam}),e.editing.view.focus()}),f.children.add(m),c.items.add(f)}return l.panelView.children.add(c),l})}_getLocalizedOptions(){const e=this.editor,t=e.t,n={Default:t("Default"),Tiny:t("Tiny"),Small:t("Small"),Big:t
51("Big"),Huge:t("Huge")};return Gg(e.config.get(Kr).options).map(s=>{const o=n[s.title];return o&&o!=s.title&&(s=Object.assign({},s,{title:o})),s})}}function S4e(i,e){const t=new Jn;for(const n of i){const r={type:"button",model:new Fl({commandName:Kr,commandParam:n.model,label:n.title,class:"ck-fontsize-option",role:"menuitemradio",withText:!0})};n.view&&typeof n.view!="string"&&(n.view.styles&&r.model.set("labelStyle",`font-size:${n.view.styles["font-size"]}`),n.view.classes&&r.model.set("class",`${r.model.class} ${n.view.classes}`)),r.model.bind("isOn").to(e,"value",s=>s===n.model),t.add(r)}return t}class P4e extends be{static get requires(){return[A4e,k4e]}static get pluginName(){return"FontSize"}static get isOfficialPlugin(){return!0}normalizeSizeOptions(e){return Gg(e)}}class I4e extends P_{constructor(e){super(e,ca)}}class R4e extends be{static get pluginName(){return"FontColorEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(ca,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:ca,value:JK("color")}}),e.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:ca,value:t=>t.getAttribute("color")}}),e.conversion.for("downcast").attributeToElement({model:ca,view:eX("color")}),e.commands.add(ca,new I4e(e)),e.model.schema.extend("$text",{allowAttributes:ca}),e.model.schema.setAttributeProperties(ca,{isFormatting:!0,copyOnEnter:!0})}}class nX extends be{commandName;componentName;icon;dropdownLabel;columns;constructor(e,{commandName:t,componentName:n,icon:r,dropdownLabel:s}){super(e),this.commandName=t,this.componentName=n,this.icon=r,this.dropdownLabel=s,this.columns=e.config.get(`${this.componentName}.columns`)}init(){const e=this.editor,t=e.locale,n=t.t,r=e.commands.get(this.commandName),s=e.config.get(this.componentName),o=Hg(s.colors),a=Wg(t,o),l=s.documentColors,c=s.colorPicker!==!1;e.ui.componentFactory.add(this.componentName,d=>{const f=zi(d);let m=!1;const p=d4e({dropdownView:f,colors:a.map(g=>({label:g.label,color:g.model,options:{hasBorder:g.hasBorder}})),columns:this.columns,removeButtonLabel:n("Remove color"),colorPickerLabel:n("Color picker"),documentColorsLabel:l!==0?n("Document colors"):"",documentColorsCount:l===void 0?this.columns:l,colorPickerViewConfig:c?s.colorPicker||{}:!1});return p.bind("selectedColor").to(r,"value"),f.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),f.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),f.bind("isEnabled").to(r),p.on("execute",(g,y)=>{f.isOpen&&e.execute(this.commandName,{value:y.value,batch:this._undoStepBatch}),y.source!=="colorPicker"&&e.editing.view.focus(),y.source==="colorPickerSaveButton"&&(f.isOpen=!1)}),p.on("colorPicker:show",()=>{this._undoStepBatch=e.model.createBatch()}),p.on("colorPicker:cancel",()=>{this._undoStepBatch.operations.length&&(f.isOpen=!1,e.execute("undo",this._und
51oStepBatch)),e.editing.view.focus()}),f.on("change:isOpen",(g,y,v)=>{m||(m=!0,f.colorSelectorView.appendUI()),v&&(l!==0&&p.updateDocumentColors(e.model,this.componentName),p.updateSelectedColors(),p.showColorGridsFragment())}),d4(f,()=>f.colorSelectorView.colorGridsFragmentView.staticColorsGrid.items.find(g=>g.isOn)),f}),e.ui.componentFactory.add(`menuBar:${this.componentName}`,d=>{const f=new ls(d);f.buttonView.set({label:this.dropdownLabel,icon:this.icon}),f.bind("isEnabled").to(r);let m=!1;const p=new h4(d,{colors:a.map(g=>({label:g.label,color:g.model,options:{hasBorder:g.hasBorder}})),columns:this.columns,removeButtonLabel:n("Remove color"),colorPickerLabel:n("Color picker"),documentColorsLabel:l!==0?n("Document colors"):"",documentColorsCount:l===void 0?this.columns:l,colorPickerViewConfig:!1});return p.bind("selectedColor").to(r,"value"),p.delegate("execute").to(f),p.on("execute",(g,y)=>{e.execute(this.commandName,{value:y.value,batch:this._undoStepBatch}),e.editing.view.focus()}),f.on("change:isOpen",(g,y,v)=>{m||(m=!0,p.appendUI()),v&&(l!==0&&p.updateDocumentColors(e.model,this.componentName),p.updateSelectedColors(),p.showColorGridsFragment())}),f.panelView.children.add(p),f})}}class F4e extends nX{constructor(e){const t=e.locale.t;super(e,{commandName:ca,componentName:ca,icon:kTe,dropdownLabel:t("Font Color")})}static get pluginName(){return"FontColorUI"}}class O4e extends be{static get requires(){return[R4e,F4e]}static get pluginName(){return"FontColor"}static get isOfficialPlugin(){return!0}}class N4e extends P_{constructor(e){super(e,ml)}}class B4e extends be{static get pluginName(){return"FontBackgroundColorEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(ml,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.data.addStyleProcessorRules(n4),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:ml,value:JK("background-color")}}),e.conversion.for("downcast").attributeToElement({model:ml,view:eX("background-color")}),e.commands.add(ml,new N4e(e)),e.model.schema.extend("$text",{allowAttributes:ml}),e.model.schema.setAttributeProperties(ml,{isFormatting:!0,copyOnEnter:!0})}}class M4e extends nX{constructor(e){const t=e.locale.t;super(e,{commandName:ml,componentName:ml,icon:ATe,dropdownLabel:t("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}class L4e extends be{static get requires(){return[B4e,M4e]}static get pluginName(){return"FontBackgroundColor"}static get isOfficialPlugin(){return!0}}class U4e extends be{static get requires(){return[w4e,P4e,O4e,L4e]}static get pluginName(){return"Font"}static get isOfficialPlugin(){return!0}}class V4e extends ut{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,t=e.document,n=Rn(t.selection.getSelectedBlocks());this.value=!!n&&n.is("element","paragraph"),this.isEnabled=!!n&&hL(n,e.schema)}execute(e={}){const t=this.editor.model,n=t.document,r=e.selection||n.selection;t.canEditAt(r)&&t.change(s=>{const o=r.getSelectedBlocks();for(const a of o)!a.is("element","paragraph")&&hL(a,t.schema)&&s.rename(a,"paragraph")})}}function hL(i,e){return e.checkChild(i.parent,"paragraph")&&!e.isObject(i)}class j4e extends ut{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}execute(e){const t=this.editor.model,n=e.attributes;let r=e.position;return t.canEditAt(r)?t.change(s=>{if(r=this._findPositionToInsertParagraph(r,s),!r)return null;const o=s.createElement("paragraph");return n&&t.schema.setAllowedAttributes(o,n,s),t.insertContent(o,r),s.setSelection(o,"in"),s.createPositionAt(o,0)}):null}_findPositionToInsertParagraph(e,t){const n=this.editor.model;if(n.schema.checkChild(e,"paragraph"))return e;const r=n.schema.findAllowedParent(e,"paragraph");if(!r)return null;const s=e.parent,o=n.schema.checkChild(s,"$text");return s.isEmpty||o&&e.isAtEnd?n.createPositionAfter(s):!s.isEmpty&&o&&e.isAtStart?n.createPositionBefore(s):t.split(e,r).position}}class I_ extends be{static get pluginName(){return"Paragraph"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new V4e(e)),e.commands.add("insertParagraph",new j4e(e)),t.schema.register("paragraph",{inheritAllFrom
51:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(n,{writer:r})=>!I_.paragraphLikeElements.has(n.name)||n.isEmpty?null:r.createElement("paragraph"),view:/.+/,converterPriority:"low"})}static paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"])}class z4e extends ut{modelElements;constructor(e,t){super(e),this.modelElements=t}refresh(){const e=Rn(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some(t=>mL(e,t,this.editor.model.schema))}execute(e){const t=this.editor.model,n=t.document,r=e.value;t.change(s=>{const o=Array.from(n.selection.getSelectedBlocks()).filter(a=>mL(a,r,t.schema));for(const a of o)a.is("element",r)||s.rename(a,r)})}}function mL(i,e,t){return t.checkChild(i.parent,e)&&!t.isObject(i)}const pL="paragraph";class W4e extends be{static get pluginName(){return"HeadingEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[I_]}init(){const e=this.editor,t=e.config.get("heading.options"),n=[];for(const r of t)r.model!=="paragraph"&&(e.model.schema.register(r.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(r),n.push(r.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new z4e(e,n))}afterInit(){const e=this.editor,t=e.commands.get("enter"),n=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",(r,s)=>{const o=e.model.document.selection.getFirstPosition().parent;n.some(l=>o.is("element",l.model))&&!o.is("element",pL)&&o.childCount===0&&s.writer.rename(o,pL)})}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:ns.low+1})}}function H4e(i){const e=i.t,t={Paragraph:e("Paragraph"),"Heading 1":e("Heading 1"),"Heading 2":e("Heading 2"),"Heading 3":e("Heading 3"),"Heading 4":e("Heading 4"),"Heading 5":e("Heading 5"),"Heading 6":e("Heading 6")};return i.config.get("heading.options").map(n=>{const r=t[n.title];return r&&r!=n.title&&(n.title=r),n})}class q4e extends be{static get pluginName(){return"HeadingUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,n=H4e(e),r=t("Choose heading"),s=t("Heading");e.ui.componentFactory.add("heading",o=>{const a={},l=new Jn,c=e.commands.get("heading"),d=e.commands.get("paragraph"),f=[c];for(const p of n){const g={type:"button",model:new Fl({label:p.title,class:p.class,role:"menuitemradio",withText:!0})};p.model==="paragraph"?(g.model.bind("isOn").to(d,"value"),g.model.set("commandName","paragraph"),f.push(d)):(g.model.bind("isOn").to(c,"value",y=>y===p.model),g.model.set({commandName:"heading",commandValue:p.model})),l.add(g),a[p.model]=p.title}const m=zi(o);return Hl(m,l,{ariaLabel:s,role:"menu"}),m.buttonView.set({ariaLabel:s,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:s}),m.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),m.bind("isEnabled").toMany(f,"isEnabled",(...p)=>p.some(g=>g)),m.buttonView.bind("label").to(c,"value",d,"value",(p,g)=>{const y=g?"paragraph":p;return typeof y=="boolean"||!a[y]?r:a[y]}),m.buttonView.bind("ariaLabel").to(c,"value",d,"value",(p,g)=>{const y=g?"paragraph":p;return typeof y=="boolean"||!a[y]?s:`${a[y]}, ${s}`}),this.listenTo(m,"execute",p=>{const{commandName:g,commandValue:y}=p.source;e.execute(g,y?{value:y}:void 0),e.editing.view.focus()}),m}),e.ui.componentFactory.add("menuBar:heading",o=>{const a=new ls(o),l=e.commands.get("heading"),c=e.commands.get("paragraph"),d=[l],f=new Ol(o);a.set({class:"ck-heading-dropdown"}),f.set({ariaLabel:t("Heading"),role:"menu"}),a.buttonView.set({label:t("Heading")}),a.panelView.children.add(f);for(const m of n){const p=new Sa(o,a),g=new gn(o);p.children.add(g),f.items.add(p),g.set({isToggleable:!0,label:m.title,role:"menuitemradio",class:m.class}),g.delegate("execute").to(a),g.on("execute",()=>{const y=m.model==="paragraph"?"paragraph":"heading";e.execute(y,{value:m.model}),e.editing.view.focus()}),m.model==="paragraph"?(g.bind("isOn").to(c,"value"),d.push(c)):g.bind("isOn").to(l,"value",y=>y===m.model)}
51return a.bind("isEnabled").toMany(d,"isEnabled",(...m)=>m.some(p=>p)),a})}}class $4e extends be{static get requires(){return[W4e,q4e]}static get pluginName(){return"Heading"}static get isOfficialPlugin(){return!0}}class G4e extends ut{refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute("highlight"),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"highlight")}execute(e={}){const t=this.editor.model,r=t.document.selection,s=e.value;t.change(o=>{if(r.isCollapsed){const a=r.getFirstPosition();if(r.hasAttribute("highlight")){const l=m=>m.item.hasAttribute("highlight")&&m.item.getAttribute("highlight")===this.value,c=a.getLastMatchingPosition(l,{direction:"backward"}),d=a.getLastMatchingPosition(l),f=o.createRange(c,d);!s||this.value===s?(a.isEqual(d)||o.removeAttribute("highlight",f),o.removeSelectionAttribute("highlight")):(a.isEqual(d)||o.setAttribute("highlight",s,f),o.setSelectionAttribute("highlight",s))}else s&&o.setSelectionAttribute("highlight",s)}else{const a=t.schema.getValidRanges(r.getRanges(),"highlight",{includeEmptyRanges:!0});for(const l of a){let c=l,d="highlight";l.isCollapsed&&(c=l.start.parent,d=us._getStoreAttributeKey("highlight")),s?o.setAttribute(d,s,c):o.removeAttribute(d,c)}}})}}class Y4e extends be{static get pluginName(){return"HighlightEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("highlight",{options:[{model:"yellowMarker",class:"marker-yellow",title:"Yellow marker",color:"var(--ck-content-highlight-marker-yellow)",type:"marker"},{model:"greenMarker",class:"marker-green",title:"Green marker",color:"var(--ck-content-highlight-marker-green)",type:"marker"},{model:"pinkMarker",class:"marker-pink",title:"Pink marker",color:"var(--ck-content-highlight-marker-pink)",type:"marker"},{model:"blueMarker",class:"marker-blue",title:"Blue marker",color:"var(--ck-content-highlight-marker-blue)",type:"marker"},{model:"redPen",class:"pen-red",title:"Red pen",color:"var(--ck-content-highlight-pen-red)",type:"pen"},{model:"greenPen",class:"pen-green",title:"Green pen",color:"var(--ck-content-highlight-pen-green)",type:"pen"}]})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"highlight"});const t=e.config.get("highlight.options");e.conversion.attributeToElement(K4e(t)),e.commands.add("highlight",new G4e(e))}}function K4e(i){const e={model:{key:"highlight",values:[]},view:{}};for(const t of i)e.model.values.push(t.model),e.view[t.model]={name:"mark",classes:t.class};return e}class X4e extends be{get localizedOptionTitles(){const e=this.editor.t;return{"Yellow marker":e("Yellow marker"),"Green marker":e("Green marker"),"Pink marker":e("Pink marker"),"Blue marker":e("Blue marker"),"Red pen":e("Red pen"),"Green pen":e("Green pen")}}static get pluginName(){return"HighlightUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.config.get("highlight.options");for(const t of e)this._addHighlighterButton(t);this._addRemoveHighlightButton(),this._addDropdown(e),this._addMenuBarButton(e)}_addRemoveHighlightButton(){const e=this.editor.t,t=this.editor.commands.get("highlight");this._addButton("removeHighlight",e("Remove highlight"),bS,null,n=>{n.bind("isEnabled").to(t,"isEnabled")})}_addHighlighterButton(e){const t=this.editor.commands.get("highlight");this._addButton("highlight:"+e.model,e.title,Ly(e.type),e.model,n);function n(r){r.bind("isEnabled").to(t,"isEnabled"),r.bind("isOn").to(t,"value",s=>s===e.model),r.iconView.fillColor=e.color,r.isToggleable=!0}}_addButton(e,t,n,r,s){const o=this.editor;o.ui.componentFactory.add(e,a=>{const l=new nt(a),c=this.localizedOptionTitles[t]?this.localizedOptionTitles[t]:t;return l.set({label:c,icon:n,tooltip:!0}),l.on("execute",()=>{o.execute("highlight",{value:r}),o.editing.view.focus()}),s(l),l})}_addDropdown(e){const t=this.editor,n=t.t,r=t.ui.componentFactory,s=e[0],o=e.reduce((a,l)=>(a[l.model]=l,a),{});r.add("highlight",a=>{const l=t.commands.get("highlight"),c=zi(a,rm),d=c.buttonView;d.set({label:n("Highlight"),tooltip:!0,lastExecuted:s.model,commandValue:s.model,isToggleable:!0}),d.bind("icon").to(l,"value",p=>Ly(m(p,"type"))),d.bind("color").to(l,"value",p=>m(p,"color")),d.bind("commandValue").to(l,"value",p=>m(p,"model")),d.bind("isOn").to(l,"value",p=>!!p),d.delegate("execute").to(c);const f=()=>{const p=e.map(g=>{const y=r.create("highlight:"+g.model);return this.listenTo(y,"execute",()=>{c.buttonView.set({lastExecuted:g.model})}),y});return p.push(new u4),p.push(r.create("removeHighlight")),p};c.bind("isEnabled").to(l,"isEnabled"),A0(c,f,{enableActiveItemFocusOnDropdownOpen:!0,ariaLabel:n("Text highlight toolbar")}),Q4e(c),d.on("execute",()=>{t.execute("highlight",{value:d.commandValue})}),this.listenTo(c,"execute",()=>{t.editing.view.focus()});function m(p,g){const y=!p||p===d.lastExecuted?d.lastExecuted:p;return o[y][g]}return c})}_addMenuBarButton(e){const t=this.editor,n=t.t,r=t.commands.get("highlight");t.ui.componentFactory.add("menuBar:highlight",s=>{const o=new ls(s);o.buttonView.set({label:n("Highlight"),icon:Ly("marker")}),o.bind("isEnabled").to(r),o.buttonView.iconView.fillColor="transparent";const a=new Ol(s);for(const d of e){const f=new Sa(s,o),m=new gn(s);m.set({label:d.title,icon:Ly(d.type),role:"menuitemradio",isToggleable:!0}),m.iconView.fillColor=d.color,m.delegate("execute").to(o),m.bind("isOn").to(r,"value",p=>p===d.model),m.on("execute",()=>{t.execute("highlight",{value:d.model}),t.editing.view.focus()}),f.children.add(m),a.items.add(f)}a.items.add(new A_(s));const l=new Sa(s,o),c=new gn(s);return c.set({label:n("Remove highlight"),icon:bS}),c.delegate("execute").to(o),c.on("execute",()=>{t.execute("highlight",{value:null}),t.editing.view.focus()}),l.children.add(c),a.items.add(l),o.panelView.children.add(a),o})}}function Q4e(i){i.buttonView.actionView.iconView.bind("fillColor").to(i.buttonView,"color")}function Ly(i){return i==="marker"?NTe:YTe}class Z4e extends be{static get requires(){return[Y4e,X4e]}static get pluginName(){return"Highlight"}static get isOfficialPlugin(){return!0}}class J4e extends ut{refresh(){const e=this.editor.model,t=e.schema,n=e.document.selection;this.isEnabled=ePe(n,t,e)}execute(){const e=this.editor.model;e.change(t=>{const n=t.createElement("horizontalLine");
51e.insertObject(n,null,null,{setSelection:"after"})})}}function ePe(i,e,t){const n=tPe(i,t);return e.checkChild(n,"horizontalLine")}function tPe(i,e){const n=S_(i,e).start.parent;return n.isEmpty&&!n.is("element","$root")?n.parent:n}class nPe extends be{static get pluginName(){return"HorizontalLineEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model.schema,n=e.t,r=e.conversion;t.register("horizontalLine",{inheritAllFrom:"$blockObject"}),r.for("dataDowncast").elementToElement({model:"horizontalLine",view:(s,{writer:o})=>o.createEmptyElement("hr")}),r.for("editingDowncast").elementToStructure({model:"horizontalLine",view:(s,{writer:o})=>{const a=n("Horizontal line"),l=o.createContainerElement("div",null,o.createEmptyElement("hr"));return o.addClass("ck-horizontal-line",l),o.setCustomProperty("hr",!0,l),iPe(l,o,a)}}),r.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),e.commands.add("horizontalLine",new J4e(e))}}function iPe(i,e,t){return e.setCustomProperty("horizontalLine",!0,i),_d(i,e,{label:t})}class rPe extends be{static get pluginName(){return"HorizontalLineUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("horizontalLine",()=>{const t=this._createButton(nt);return t.set({tooltip:!0}),t}),e.ui.componentFactory.add("menuBar:horizontalLine",()=>this._createButton(gn))}_createButton(e){const t=this.editor,n=t.locale,r=t.commands.get("horizontalLine"),s=new e(t.locale),o=n.t;return s.set({label:o("Horizontal line"),icon:STe}),s.bind("isEnabled").to(r,"isEnabled"),this.listenTo(s,"execute",()=>{t.execute("horizontalLine"),t.editing.view.focus()}),s}}class sPe extends be{static get requires(){return[nPe,rPe,Qc]}static get pluginName(){return"HorizontalLine"}static get isOfficialPlugin(){return!0}}function _a(i,e,t,n){e&&oPe(i,e,n),t&&Ca(i,t,n)}function Ca(i,e,t){if(e.attributes)for(const[n,r]of Object.entries(e.attributes))i.setAttribute(n,r,t);e.styles&&i.setStyle(e.styles,t),e.classes&&i.addClass(e.classes,t)}function oPe(i,e,t){if(e.attributes)for(const[n]of Object.entries(e.attributes))i.removeAttribute(n,t);if(e.styles)for(const n of Object.keys(e.styles))i.removeStyle(n,t);e.classes&&i.removeClass(e.classes,t)}function aPe(i,e){const t=Br(i);let n="attributes";for(n in e)n=="classes"?t[n]=Array.from(new Set([...i[n]||[],...e[n]])):t[n]={...i[n],...e[n]};return t}function Sf(i,e,t,n,r){const s=e.getAttribute(t),o={};for(const a of["attributes","styles","classes"]){if(a!=n){s&&s[a]&&(o[a]=s[a]);continue}if(n=="classes"){const c=new Set(s&&s.classes||[]);r(c),c.size&&(o[a]=Array.from(c));continue}const l=new Map(Object.entries(s&&s[a]||{}));r(l),l.size&&(o[a]=Object.fromEntries(l))}Object.keys(o).length?e.is("documentSelection")?i.setSelectionAttribute(t,o):i.setAttribute(t,o,e):s&&(e.is("documentSelection")?i.removeSelectionAttribute(t):i.removeAttribute(t,e))}function lPe(i,e,t){for(const n of e.getItems({shallow:!0})){const r=n.getAttribute(i);r&&r.attributes&&Object.keys(r.attributes).length?Object.keys(r).length>1&&t.setAttribute(i,{attributes:r.attributes},n):t.removeAttribute(i,n)}}function cPe(i){return xxe(i).replace(/ /g,"")}function lo(i){return`html${cPe(i)}Attributes`}function w4({model:i}){return(e,t)=>t.writer.createElement(i,{htmlContent:e.getCustomProperty("$rawContent")})}function uPe(i,{view:e,isInline:t}){const n=i.t;
51return(r,{writer:s})=>{const o=n("HTML object"),a=R_(e,r,s),l=r.getAttribute(lo(e));s.addClass("html-object-embed__content",a),l&&Ca(s,l,a);const c=s.createContainerElement(t?"span":"div",{class:"html-object-embed","data-html-object-embed-label":o},a);return _d(c,s,{label:o})}}function R_(i,e,t){return t.createRawElement(i,null,(n,r)=>{r.setContentOf(n,e.getAttribute("htmlContent"))})}function dPe({view:i,model:e,allowEmpty:t},n){return s=>{s.on(`element:${i}`,(o,a,l)=>{let c=n.processViewAttributes(a.viewItem,l);if(!(!c&&!l.consumable.test(a.viewItem,{name:!0}))){if(c=c||{},l.consumable.consume(a.viewItem,{name:!0}),a.modelRange||(a=Object.assign(a,l.convertChildren(a.viewItem,a.modelCursor))),t&&a.modelRange.isCollapsed&&Object.keys(c).length){const d=l.writer.createElement("htmlEmptyElement");if(!l.safeInsert(d,a.modelCursor))return;const f=l.getSplitParts(d);a.modelRange=l.writer.createRange(a.modelRange.start,l.writer.createPositionAfter(f[f.length-1])),l.updateConversionResult(d,a),r(d,c,l);return}for(const d of a.modelRange.getItems())r(d,c,l)}},{priority:"low"})};function r(s,o,a){if(a.schema.checkAttribute(s,e)){const l=s.getAttribute(e),c=aPe(o,l||{});a.writer.setAttribute(e,c,s)}}}function gL({model:i,view:e},t){return(n,{writer:r,consumable:s})=>{if(!n.hasAttribute(i))return null;const o=r.createContainerElement(e),a=n.getAttribute(i);return s.consume(n,`attribute:${i}`),Ca(r,a,o),o.getFillerOffset=()=>null,t?_d(o,r):o}}function fPe({priority:i,view:e}){return(t,n)=>{if(!t)return;const{writer:r}=n,s=r.createAttributeElement(e,null,{priority:i});return Ca(r,t,s),s}}function Uh({view:i},e){return t=>{t.on(`element:${i}`,(n,r,s)=>{if(!r.modelRange||r.modelRange.isCollapsed)return;const o=e.processViewAttributes(r.viewItem,s);o&&s.writer.setAttribute(lo(r.viewItem.name),o,r.modelRange)},{priority:"low"})}}function Yg({view:i,model:e}){return t=>{t.on(`attribute:${lo(i)}:${e}`,(n,r,s)=>{if(!s.consumable.consume(r.item,n.name))return;const{attributeOldValue:o,attributeNewValue:a}=r,l=s.writer,c=s.mapper.toViewElement(r.item);_a(l,o,a,c)})}}const bL={block:[{model:"codeBlock",view:"pre"},{model:"paragraph",view:"p"},{model:"blockQuote",view:"blockquote"},{model:"listItem",view:"li"},{model:"pageBreak",view:"div"},{model:"rawHtml",view:"div"},{model:"table",view:"table"},{model:"tableRow",view:"tr"},{model:"tableCell",view:"td"},{model:"tableCell",view:"th"},{model:"tableColumnGroup",view:"colgroup"},{model:"tableColumn",view:"col"},{model:"caption",view:"caption"},{model:"caption",view:"figcaption"},{model:"imageBlock",view:"img"},{model:"imageInline",view:"img"},{model:"horizontalLine",view:"hr"},{model:"htmlP",view:"p",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlBlockquote",view:"blockquote",modelSchema:{inheritAllFrom:"$container"}},{model:"htmlTable",view:"table",modelSchema:{allowWhere:"$block",isBlock:!0}},{model:"htmlTbody",view:"tbody",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlThead",view:"thead",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlTfoot",view:"tfoot",modelSchema:{allowIn:"htmlTable",isBlock:!1}},{model:"htmlCaption",view:"caption",modelSchema:{allowIn:"htmlTable",allowChildren:"$text",isBlock:!1}},{model:"htmlColgroup",view:"colgroup",modelSchema:{allowIn:"htmlTable",allowChildren:"col",isBlock:!1}},{model:"htmlCol",view:"col",modelSchema:{allowIn:"htmlColgroup",isBlock:!1}},{model:"htmlTr",view:"tr",modelSchema:{allowIn:["htmlTable","htmlThead","htmlTbody"],isLimit:!0}},{model:"htmlTd",view:"td",modelSchema:{allowIn:"htmlTr",allowContentOf:"$container",isLimit:!0,isBlock:!1}},{model:"htmlTh",view:"th",modelSchema:{allowIn:"htmlTr",allowContentOf:"$container",isLimit:!0,isBlock:!1}},{model:"htmlFigure",view:"figure",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlFigcaption",view:"figcaption",modelSchema:{allowIn:"htmlFigure",allowChildren:"$text",isBlock:!1}},{model:"htmlAddress",view:"address",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlAside",view:"aside",modelSchema:{inheritAllFrom:"$container",isBlock:!1}}
51,{model:"htmlMain",view:"main",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlDetails",view:"details",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlSummary",view:"summary",modelSchema:{allowChildren:["htmlH1","htmlH2","htmlH3","htmlH4","htmlH5","htmlH6","$text"],allowIn:"htmlDetails",isBlock:!1}},{model:"htmlDiv",view:"div",paragraphLikeModel:"htmlDivParagraph",modelSchema:{inheritAllFrom:"$container"}},{model:"htmlFieldset",view:"fieldset",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlLegend",view:"legend",modelSchema:{allowIn:"htmlFieldset",allowChildren:"$text"}},{model:"htmlHeader",view:"header",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlFooter",view:"footer",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlForm",view:"form",modelSchema:{inheritAllFrom:"$container",isBlock:!0}},{model:"htmlHgroup",view:"hgroup",modelSchema:{allowIn:["$root","$container"],allowChildren:["paragraph","htmlP","htmlH1","htmlH2","htmlH3","htmlH4","htmlH5","htmlH6"],isBlock:!1}},{model:"htmlH1",view:"h1",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH2",view:"h2",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH3",view:"h3",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH4",view:"h4",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH5",view:"h5",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlH6",view:"h6",modelSchema:{inheritAllFrom:"$block"}},{model:"$htmlList",modelSchema:{allowWhere:"$container",allowChildren:["$htmlList","htmlLi"],isBlock:!1}},{model:"htmlDir",view:"dir",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlMenu",view:"menu",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlUl",view:"ul",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlOl",view:"ol",modelSchema:{inheritAllFrom:"$htmlList"}},{model:"htmlLi",view:"li",modelSchema:{allowIn:"$htmlList",allowChildren:"$text",isBlock:!1}},{model:"htmlPre",view:"pre",modelSchema:{inheritAllFrom:"$block"}},{model:"htmlArticle",view:"article",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlSection",view:"section",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlNav",view:"nav",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlDl",view:"dl",modelSchema:{allowWhere:"$container",allowChildren:["htmlDt","htmlDd","htmlDiv"],isBlock:!1}},{model:"htmlDt",view:"dt",modelSchema:{allowChildren:"$block",allowIn:"htmlDiv",isBlock:!1}},{model:"htmlDd",view:"dd",modelSchema:{allowChildren:"$block",allowIn:"htmlDiv",isBlock:!1}},{model:"htmlCenter",view:"center",modelSchema:{inheritAllFrom:"$container",isBlock:!1}},{model:"htmlHr",view:"hr",isEmpty:!0,modelSchema:{inheritAllFrom:"$blockObject"}}],inline:[{model:"htmlLiAttributes",view:"li",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlOlAttributes",view:"ol",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlUlAttributes",view:"ul",appliesToBlock:!0,coupledAttribute:"listItemId"},{model:"htmlFigureAttributes",view:"figure",appliesToBlock:"table"},{model:"htmlTheadAttributes",view:"thead",appliesToBlock:"table"},{model:"htmlTbodyAttributes",view:"tbody",appliesToBlock:"table"},{model:"htmlFigureAttributes",view:"figure",appliesToBlock:"imageBlock"},{model:"htmlAcronym",view:"acronym",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlTt",view:"tt",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlFont",view:"font",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlTime",view:"time",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlVar",view:"var",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBig",view:"big",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSmall",view:"small",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSamp",view:"samp",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlQ",view:"q",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlOutput",view:"output",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlKbd",view:"kbd",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBdi",view:"bdi",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlBdo",view:"bdo",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlAbbr",view:"abbr",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlA",view:"a",priority:5,coupledAttribute:"linkHref",attributeProperties:{isFormatting:!0}},{model:"htmlStrong",view:"strong",coupledAttribute:"bold",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlB",view:"b",coupledAttribute:"bold",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlI",view:"i",coupledAttribute:"italic",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlEm",view:"em",coupledAttribute:"italic",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlS",view:"s",coupledAttribute:"strikethrough",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlDel",view:"del",coupledAttribute:"strikethrough",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlIns",view:"ins",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlU",view:"u",coupledAttribute:"underline",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSub",view:"sub",coupledAttribute:"subscript",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSup",view:"sup",coupledAttribute:"superscript",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlCode",view:"code",coupledAttribute:"code",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlMark",view:"mark",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlSpan",view:"span",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlCite",view:"cite",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlLabel",view:"label",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlDfn",view:"dfn",attributeProperties:{copyOnEnter:!0,isFormatting:!0}},{model:"htmlObject",view:"object",isObject:!0,modelSchema:{inheritAllFrom
51:"$inlineObject"}},{model:"htmlIframe",view:"iframe",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlInput",view:"input",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlButton",view:"button",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlTextarea",view:"textarea",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlSelect",view:"select",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlVideo",view:"video",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlEmbed",view:"embed",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlOembed",view:"oembed",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlAudio",view:"audio",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlImg",view:"img",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlCanvas",view:"canvas",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlMeter",view:"meter",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlProgress",view:"progress",isObject:!0,modelSchema:{inheritAllFrom:"$inlineObject"}},{model:"htmlScript",view:"script",modelSchema:{allowWhere:["$text","$block"],isInline:!0}},{model:"htmlStyle",view:"style",modelSchema:{allowWhere:["$text","$block"],isInline:!0}},{model:"htmlCustomElement",view:"$customElement",modelSchema:{allowWhere:["$text","$block"],allowAttributesOf:"$inlineObject",isInline:!0}}]};class Vh extends be{_definitions=[];static get pluginName(){return"DataSchema"}static get isOfficialPlugin(){return!0}init(){for(const e of bL.block)this.registerBlockElement(e);for(const e of bL.inline)this.registerInlineElement(e)}registerBlockElement(e){this._definitions.push({...e,isBlock:!0})}registerInlineElement(e){this._definitions.push({...e,isInline:!0})}extendBlockElement(e){this._extendDefinition({...e,isBlock:!0})}extendInlineElement(e){this._extendDefinition({...e,isInline:!0})}getDefinitionsForView(e,t=!1){const n=new Set;for(const r of this._getMatchingViewDefinitions(e)){if(t)for(const s of this._getReferences(r.model))n.add(s);n.add(r)}return n}getDefinitionsForModel(e){return this._definitions.filter(t=>t.model==e)}_getMatchingViewDefinitions(e){return this._definitions.filter(t=>t.view&&hPe(e,t.view))}*_getReferences(e){const t=["inheritAllFrom","inheritTypesFrom","allowWhere","allowContentOf","allowAttributesOf"],n=this._definitions.filter(r=>r.model==e);for(const{modelSchema:r}of n)if(r)for(const s of t)for(const o of mn(r[s]||[])){const a=this._definitions.filter(l=>l.model==o);for(const l of a)o!==e&&(yield*this._getReferences(l.model),yield l)}}_extendDefinition(e){const t=Array.from(this._definitions.entries()).filter(([,n])=>n.model==e.model);if(t.length==0){this._definitions.push(e);return}for(const[n,r]of t)this._definitions[n]=fG({},r,e,(s,o)=>Array.isArray(s)?s.concat(o):void 0)}}function hPe(i,e){return typeof i=="string"?i===e:i instanceof RegExp?i.test(e):!1}class Zn extends be{_dataSchema;_allowedAttributes;_disallowedAttributes;_allowedElements;_disallowedElements;_dataInitialized;_coupledAttributes;constructor(e){super(e),this._dataSchema=e.plugins.get("DataSchema"),this._allowedAttributes=new Rl,this._disallowedAttributes=new Rl,this._allowedElements=new Set,this._disallowedElements=new Set,this._dataInitialized=!1,this._coupledAttributes=null,this._registerElementsAfterInit(),this._registerElementHandlers(),this._registerCoupledAttributesPostFixer(),this._registerAssociatedHtmlAttributesPostFixer()}static get pluginName(){return"DataFilter"}static get isOfficialPlugin(){return!0}static get requires(){return[Vh,Qc]}loadAllowedConfig(e){for(const t of e){const n=t.name||/[\s\S]+/,r=vL(t);this.allowElement(n),r.forEach(s=>this.allowAttributes(s))}}loadDisallowedConfig(e){for(const t of e){const n=t.name||/[\s\S]+/,r=vL(t);r.length==0?this.disallowElement(n):r.forEach(s=>this.disallowAttributes(s))}}loadAllowedEmptyElementsConfig(e){for(const t of e)this.allowEmptyElement(t)}allowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))this._addAllowedElement(t),this._coupledAttributes=null}disallowElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!1))this._disallowedElements.add(t.view)}allowEmptyElement(e){for(const t of this._dataSchema.getDefinitionsForView(e,!0))t.isInline&&this._dataSchema.extendInlineElement({...t,allowEmpty:!0})}allowAttributes(e){this._allowedAttributes.add(e)}disallowAttributes(e){this._disallowedAttributes.add(e)}processViewAttributes(e,t){const{consumable:n}=t;return yL(e,this._disallowedAttributes,n),mPe(e,yL(e,this._allowedAttributes,n))}
51_addAllowedElement(e){if(!this._allowedElements.has(e)){if(this._allowedElements.add(e),"appliesToBlock"in e&&typeof e.appliesToBlock=="string")for(const t of this._dataSchema.getDefinitionsForModel(e.appliesToBlock))t.isBlock&&this._addAllowedElement(t);this._dataInitialized&&this.editor.data.once("set",()=>{this._fireRegisterEvent(e)},{priority:ns.highest+1})}}_registerElementsAfterInit(){this.editor.data.on("init",()=>{this._dataInitialized=!0;for(const e of this._allowedElements)this._fireRegisterEvent(e)},{priority:ns.highest+1})}_registerElementHandlers(){this.on("register",(e,t)=>{const n=this.editor.model.schema;if(t.isObject&&!n.isRegistered(t.model))this._registerObjectElement(t);else if(t.isBlock)this._registerBlockElement(t);else if(t.isInline)this._registerInlineElement(t);else throw new oe("data-filter-invalid-definition",null,t);e.stop()},{priority:"lowest"})}_registerCoupledAttributesPostFixer(){const e=this.editor.model,t=e.document.selection;e.document.registerPostFixer(n=>{const r=e.document.differ.getChanges();let s=!1;const o=this._getCoupledAttributesMap();for(const a of r){if(a.type!="attribute"||a.attributeNewValue!==null)continue;const l=o.get(a.attributeKey);if(l)for(const{item:c}of a.range.getWalker())for(const d of l)c.hasAttribute(d)&&(n.removeAttribute(d,c),s=!0)}return s}),this.listenTo(t,"change:attribute",(n,{attributeKeys:r})=>{const s=new Set,o=this._getCoupledAttributesMap();for(const a of r){if(t.hasAttribute(a))continue;const l=o.get(a);if(l)for(const c of l)t.hasAttribute(c)&&s.add(c)}s.size!=0&&e.change(a=>{for(const l of s)a.removeSelectionAttribute(l)})})}_registerAssociatedHtmlAttributesPostFixer(){const e=this.editor.model;e.document.registerPostFixer(t=>{const n=e.document.differ.getChanges();let r=!1;for(const s of n)if(!(s.type!=="insert"||s.name==="$text"))for(const o of s.attributes.keys())!o.startsWith("html")||!o.endsWith("Attributes")||e.schema.checkAttribute(s.name,o)||(t.removeAttribute(o,s.position.nodeAfter),r=!0);return r})}_getCoupledAttributesMap(){if(this._coupledAttributes)return this._coupledAttributes;this._coupledAttributes=new Map;for(const e of this._allowedElements)if(e.coupledAttribute&&e.model){const t=this._coupledAttributes.get(e.coupledAttribute);t?t.push(e.model):this._coupledAttributes.set(e.coupledAttribute,[e.model])}return this._coupledAttributes}_fireRegisterEvent(e){e.view&&this._disallowedElements.has(e.view)||this.fire(e.view?`register:${e.view}`:"register",e)}_registerObjectElement(e){const t=this.editor,n=t.model.schema,r=t.conversion,{view:s,model:o}=e;n.register(o,e.modelSchema);s&&(n.extend(e.model,{allowAttributes:[lo(s),"htmlContent"]}),t.data.registerRawContentMatcher({name:s}),r.for("upcast").elementToElement({view:s,model:w4(e),converterPriority:ns.low+2}),r.for("upcast").add(Uh(e,this)),r.for("editingDowncast").elementToStructure({model:{name:o,attributes:[lo(s)]},view:uPe(t,e)}),r.for("dataDowncast").elementToElement({model:o,view:(a,{writer:l})=>R_(s,a,l)}),r.for("dataDowncast").add(Yg(e)))}_registerBlockElement(e){const t=this.editor,n=t.model.schema,r=t.conversion,{view:s,model:o}=e;if(!n.isRegistered(e.model)){if(!e.modelSchema||(n.register(e.model,e.modelSchema),!s))return;r.for("upcast").elementToElement({model:o,view:s,converterPriority:ns.low+2}),r.for("downcast").elementToElement({model:o,view:(a,{writer:l})=>e.isEmpty?l.createEmptyElement(s):l.createContainerElement(s)})}s&&(n.extend(e.model,{allowAttributes:lo(s)}),r.for("upcast").add(Uh(e,this)),r.for("downcast").add(Yg(e)))}_registerInlineElement(e){const t=this.editor,n=t.model.schema,r=t.conversion,s=e.model;if(!e.appliesToBlock&&(n.extend("$text",{allowAttributes:s}),e.attributeProperties&&n.setAttributeProperties(s,e.attributeProperties),r.for("upcast").add(dPe(e,this)),r.for("downcast").attributeToElement({model:s,view:fPe(e)}),!!e.allowEmpty)){if(n.setAttributeProperties(s,{copyFromObject:!1}),!n.isRegistered("htmlEmptyElement")){n.register("htmlEmptyElement",{inheritAllFrom:"$inlineObject"});const o=a=>Array.from(a.getAttributeKeys()).some(l=>l.startsWith("html"));t.model.document.registerPostFixer(a=>{const l=t.model.document.differ.getChanges(),c=new Set;for(const d of l)if(d.type!=="remove"){if(d.type==="attribute"&&d.attributeNewValue===null)for(const{item:f}of d.range)f.is("element","htmlEmptyElement")&&!o(f)&&c.add(f);if(d.type==="insert"&&d.position.nodeAfter){const f=d.position.nodeAfter;for(const{item:m}of a.createRangeOn(f))m.is("element","htmlEmptyElement")&&!o(m)&&c.add(m)}}for(const d of c)a.remove(d);return c.size>0})}t.data.htmlProcessor.domConverter.registerInlineObjectMatcher(o=>o.name==e.view&&o.isEmpty&&Array.from(o.getAttributeKeys()).length?{name:!0}:null),r.for("editingDowncast").elementToElement({model:"htmlEmptyElement",view:gL(e,!0)}),r.for("dataDowncast").elementToElement({model:"htmlEmptyElement",view:gL(e)})}}}function yL(i,e,t){const n=e.matchAll(i)||[],r=i.document.stylesProcessor;return n.reduce((s,{match:o})=>{for(const[a,l]of o.attributes||[])if(a=="style"){const c=l,d=r.getRelatedStyles(c).filter(f=>f.split("-").length>c.split("-").length).sort((f,m)=>m.split("-").length-f.split("-").length);for(const f of d)t.consume(i,{styles:[f]})&&s.styles.push(f);t.consume(i,{styles:[c]})&&s.styles.push(c)}else if(a=="class"){const c=l;t.consume(i,{classes:[c]})&&s.classes.push(c)}else t.consume(i,{attributes:[a]})&&s.attributes.push(a);return s},{attributes:[],classes:[],styles:[]})}function mPe(i,{attributes:e,classes:t,styles:n}){return!e.length&&!t.length&&!n.length?null:{...e.length&&{attributes:pPe(i,e)},...n.length&&{styles:gPe(i,n)},...t.length&&{classes:t}}}function pPe(i,e){const t={};for(const n of e){const r=i.getAttribute(n);r!==void 0&&PG(n)&&(t[n]=r)}return t}function gPe(i,e){const t=new dh(i.document.stylesProcessor);for(const n of e){const r=i.getStyle(n);r!==void 0&&t.set(n,r)}return Object.fromEntries(t.getStylesEntries())}function iT(i,e){const{name:t}=i,n=i[e];return Po(n)?Object.entries(n).map(([r,s])=>({name:t,[e]:{[r]:s}})):Array.isArray(n)?n.map(r=>({name:t,[e]:[r]})):[i]}function vL(i){const{name:e,attributes:t,classes:n,styles:r}=i,s=[];return t&&s.push(...iT({name:e,attributes:t},"attributes")),n&&s.push(...iT({name:e,classes:n},"classes")),r&&s.push(...iT({name:e,styles:r},"styles")),s}class bPe extends be{static get requires(){return[Zn]}static get pluginName(){return"CodeBlockElementSupport"}static get isOfficialPlugin(){return!0}
51init(){if(!this.editor.plugins.has("CodeBlockEditing"))return;const e=this.editor.plugins.get(Zn);e.on("register:pre",(t,n)=>{if(n.model!=="codeBlock")return;const r=this.editor,s=r.model.schema,o=r.conversion;s.extend("codeBlock",{allowAttributes:["htmlPreAttributes","htmlContentAttributes"]}),o.for("upcast").add(yPe(e)),o.for("downcast").add(vPe()),t.stop()})}}function yPe(i){return e=>{e.on("element:code",(t,n,r)=>{const s=n.viewItem,o=s.parent;if(!o||!o.is("element","pre"))return;a(o,"htmlPreAttributes"),a(s,"htmlContentAttributes");function a(l,c){const d=i.processViewAttributes(l,r);d&&r.writer.setAttribute(c,d,n.modelRange)}},{priority:"low"})}}function vPe(){return i=>{i.on("attribute:htmlPreAttributes:codeBlock",(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const{attributeOldValue:r,attributeNewValue:s}=t,a=n.mapper.toViewElement(t.item).parent;_a(n.writer,r,s,a)}),i.on("attribute:htmlContentAttributes:codeBlock",(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const{attributeOldValue:r,attributeNewValue:s}=t,o=n.mapper.toViewElement(t.item);_a(n.writer,r,s,o)})}}class wPe extends be{static get requires(){return[Zn]}static get pluginName(){return"DualContentModelElementSupport"}static get isOfficialPlugin(){return!0}init(){this.editor.plugins.get(Zn).on("register",(t,n)=>{const r=n,s=this.editor,o=s.model.schema,a=s.conversion;if(!r.paragraphLikeModel||o.isRegistered(r.model)||o.isRegistered(r.paragraphLikeModel))return;const l={model:r.paragraphLikeModel,view:r.view};o.register(r.model,r.modelSchema),o.register(l.model,{inheritAllFrom:"$block"}),a.for("upcast").elementToElement({view:r.view,model:(c,{writer:d})=>this._hasBlockContent(c)?d.createElement(r.model):d.createElement(l.model),converterPriority:ns.low+.5}),a.for("downcast").elementToElement({view:r.view,model:r.model}),this._addAttributeConversion(r),a.for("downcast").elementToElement({view:l.view,model:l.model}),this._addAttributeConversion(l),t.stop()})}_hasBlockContent(e){const t=this.editor.editing.view,n=t.domConverter.blockElements;for(const r of t.createRangeIn(e).getItems())if(r.is("element")&&n.includes(r.name))return!0;return!1}_addAttributeConversion(e){const t=this.editor,n=t.conversion,r=t.plugins.get(Zn);t.model.schema.extend(e.model,{allowAttributes:lo(e.view)}),n.for("upcast").add(Uh(e,r)),n.for("downcast").add(Yg(e))}}class xPe extends be{static get requires(){return[Vh,k0]}static get pluginName(){return"HeadingElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(!e.plugins.has("HeadingEditing"))return;const t=e.config.get("heading.options");this.registerHeadingElements(e,t)}registerHeadingElements(e,t){const n=e.plugins.get(Vh),r=[];for(const s of t)"model"in s&&"view"in s&&(n.registerBlockElement({view:s.view,model:s.model}),r.push(s.model));n.extendBlockElement({model:"htmlHgroup",modelSchema:{allowChildren:r}}),n.extendBlockElement({model:"htmlSummary",modelSchema:{allowChildren:r}})}}function Kg(i,e,t){const n=i.createRangeOn(e);for(const{item:r}of n.getWalker())if(r.is("element",t))return r}class _Pe extends be{static get requires(){return[Zn]}static get pluginName(){return"ImageElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(!e.plugins.has("ImageInlineEditing")&&!e.plugins.has("ImageBlockEditing"))return;const t=e.model.schema,n=e.conversion,r=e.plugins.get(Zn);r.on("register:figure",()=>{n.for("upcast").add(EPe(r))}),r.on("register:img",(s,o)=>{o.model!=="imageBlock"&&o.model!=="imageInline"||(t.isRegistered("imageBlock")&&t.extend("imageBlock",{allowAttributes:["htmlImgAttributes","htmlFigureAttributes","htmlLinkAttributes"]}),t.isRegistered("imageInline")&&t.extend("imageInline",{allowAttributes:["htmlA","htmlImgAttributes"]}),n.for("upcast").add(CPe(r)),n.for("downcast").add(TPe()),e.plugins.has("LinkImage")&&n.for("upcast").add(DPe(r,e)),s.stop())})}}function CPe(i){return e=>{e.on("element:img",(t,n,r)=>{if(!n.modelRange)return;const s=n.viewItem,o=i.processViewAttributes(s,r);o&&r.writer.setAttribute("htmlImgAttributes",o,n.modelRange)},{priority:"low"})}}function DPe(i,e){const t=e.plugins.get("ImageUtils");return n=>{n.on("element:a",(r,s,o)=>{const a=s.viewItem;if(!t.findViewImgElement(a))return;const c=s.modelCursor.parent;if(!c.is("element","imageBlock"))return;const d=i.processViewAttributes(a,o);d&&o.writer.setAttribute("htmlLinkAttributes",d,c)},{priority:"low"})}}function EPe(i){return e=>{e.on("element:figure",(t,n,r)=>{const s=n.viewItem;if(!n.modelRange||!s.hasClass("image"))return;const o=i.processViewAttributes(s,r);o&&r.writer.setAttribute("htmlFigureAttributes",o,n.modelRange)},{priority:"low"})}}function TPe(){return i=>{e("htmlImgAttributes"),t("img","htmlImgAttributes"),t("figure","htmlFigureAttributes"),t("a","htmlLinkAttributes");function e(n){i.on(`attribute:${n}:imageInline`,(r,s,o)=>
51{if(!o.consumable.consume(s.item,r.name))return;const{attributeOldValue:a,attributeNewValue:l}=s,c=o.mapper.toViewElement(s.item);_a(o.writer,a,l,c)},{priority:"low"})}function t(n,r){i.on(`attribute:${r}:imageBlock`,(s,o,a)=>{if(!a.consumable.test(o.item,s.name))return;const{attributeOldValue:l,attributeNewValue:c}=o,d=a.mapper.toViewElement(o.item),f=Kg(a.writer,d,n);f&&(_a(a.writer,l,c,f),a.consumable.consume(o.item,s.name))},{priority:"low"}),n==="a"&&i.on("attribute:linkHref:imageBlock",(s,o,a)=>{if(!a.consumable.consume(o.item,"attribute:htmlLinkAttributes:imageBlock"))return;const l=a.mapper.toViewElement(o.item),c=Kg(a.writer,l,"a");Ca(a.writer,o.item.getAttribute("htmlLinkAttributes"),c)},{priority:"low"})}}}class APe extends be{static get requires(){return[Zn]}static get pluginName(){return"MediaEmbedElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(!e.plugins.has("MediaEmbed")||e.config.get("mediaEmbed.previewsInData"))return;const t=e.model.schema,n=e.conversion,r=this.editor.plugins.get(Zn),s=this.editor.plugins.get(Vh),o=e.config.get("mediaEmbed.elementName");s.registerBlockElement({model:"media",view:o}),r.on("register:figure",()=>{n.for("upcast").add(SPe(r))}),r.on(`register:${o}`,(a,l)=>{l.model==="media"&&(t.extend("media",{allowAttributes:[lo(o),"htmlFigureAttributes"]}),n.for("upcast").add(kPe(r,o)),n.for("dataDowncast").add(PPe(o)),a.stop())})}}function kPe(i,e){const t=(n,r,s)=>{const o=r.viewItem;a(o,lo(e));function a(l,c){const d=i.processViewAttributes(l,s);d&&s.writer.setAttribute(c,d,r.modelRange)}};return n=>{n.on(`element:${e}`,t,{priority:"low"})}}function SPe(i){return e=>{e.on("element:figure",(t,n,r)=>{const s=n.viewItem;if(!n.modelRange||!s.hasClass("media"))return;const o=i.processViewAttributes(s,r);o&&r.writer.setAttribute("htmlFigureAttributes",o,n.modelRange)},{priority:"low"})}}function PPe(i){return e=>{t(i,lo(i)),t("figure","htmlFigureAttributes");function t(n,r){e.on(`attribute:${r}:media`,(s,o,a)=>{if(!a.consumable.consume(o.item,s.name))return;const{attributeOldValue:l,attributeNewValue:c}=o,d=a.mapper.toViewElement(o.item),f=Kg(a.writer,d,n);_a(a.writer,l,c,f)})}}}class IPe extends be{static get requires(){return[Zn]}static get pluginName(){return"ScriptElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.plugins.get(Zn);e.on("register:script",(t,n)=>{const r=this.editor,s=r.model.schema,o=r.conversion;s.register("htmlScript",n.modelSchema),s.extend("htmlScript",{allowAttributes:["htmlScriptAttributes","htmlContent"],isContent:!0}),r.data.registerRawContentMatcher({name:"script"}),o.for("upcast").elementToElement({view:"script",model:w4(n)}),o.for("upcast").add(Uh(n,e)),o.for("downcast").elementToElement({model:"htmlScript",view:(a,{writer:l})=>R_("script",a,l)}),o.for("downcast").add(Yg(n)),t.stop()})}}const RPe=["width","max-width","min-width","height","min-height","max-height"];class FPe extends be{static get requires(){return[Zn]}static get pluginName(){return"TableElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(!e.plugins.has("TableEditing"))return;const t=e.model.schema,n=e.conversion,r=e.plugins.get(Zn),s=e.plugins.get("TableUtils");r.on("register:figure",()=>{n.for("upcast").add(BPe(r))}),r.on("register:table",(o,a)=>{a.model==="table"&&(t.extend("table",{allowAttributes:["htmlTableAttributes","htmlFigureAttributes","htmlTheadAttributes","htmlTbodyAttributes"]}),n.for("upcast").add(NPe(r)),n.for("downcast").add(MPe()),e.model.document.registerPostFixer(OPe(e.model,s)),o.stop())})}}function OPe(i,e){return t=>{const n=i.document.differ.getChanges();let r=!1;for(const s of n){if(s.type!="attribute"||s.attributeKey!="headingRows")continue;const o=s.range.start.nodeAfter,a=o.getAttribute("htmlTheadAttributes"),l=o.getAttribute("htmlTbodyAttributes");a&&!s.attributeNewValue?(t.removeAttribute("htmlTheadAttributes",o),r=!0):l&&s.attributeNewValue==e.getRows(o)&&(t.removeAttribute("htmlTbodyAttributes",o),r=!0)}return r}}function NPe(i){return e=>{e.on("element:table",(t,n,r)=>{if(!n.modelRange)return;const s=n.viewItem;r.consumable.consume(s,{classes:"table"}),o(s,"htmlTableAttributes");for(const a of s.getChildren())a.is("element","thead")&&o(a,"htmlTheadAttributes"),a.is("element","tbody")&&o(a,"htmlTbodyAttributes");function o(a,l){const c=i.processViewAttributes(a,r);c&&r.writer.setAttribute(l,c,n.modelRange)}},{priority:"low"})}}function BPe(i){return e=>{e.on("element:figure",(t,n,r)=>{const s=n.viewItem;if(!n.modelRange||!s.hasClass("table"))return;const o=i.processViewAttributes(s,r);o&&r.writer.setAttribute("htmlFigureAttributes",o,n.modelRange)},{priority:"low"})}}function MPe(){return i=>{e("table","htmlTableAttributes"),e("figure","htmlFigureAttributes"),e("thead","htmlTheadAttributes"),e("tbody","htmlTbodyAttributes");function e(t,n){i.on(`attribute:${n}:table`,(r,s,o)=>
51{if(!o.consumable.test(s.item,r.name))return;const a=o.mapper.toViewElement(s.item),l=Kg(o.writer,a,t);if(l)if(o.consumable.consume(s.item,r.name),n==="htmlTableAttributes"&&a!==l){const c=wL(s.attributeOldValue),d=wL(s.attributeNewValue);_a(o.writer,c.tableAttributes,d.tableAttributes,l),_a(o.writer,c.figureAttributes,d.figureAttributes,a)}else _a(o.writer,s.attributeOldValue,s.attributeNewValue,l)})}}}function wL(i){const e={},t={...i};if(!i||!("styles"in i))return{figureAttributes:e,tableAttributes:t};t.styles={};for(const[n,r]of Object.entries(i.styles))RPe.includes(n)?e.styles={...e.styles,[n]:r}:t.styles={...t.styles,[n]:r};return{figureAttributes:e,tableAttributes:t}}class LPe extends be{static get requires(){return[Zn]}static get pluginName(){return"StyleElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.plugins.get(Zn);e.on("register:style",(t,n)=>{const r=this.editor,s=r.model.schema,o=r.conversion;s.register("htmlStyle",n.modelSchema),s.extend("htmlStyle",{allowAttributes:["htmlStyleAttributes","htmlContent"],isContent:!0}),r.data.registerRawContentMatcher({name:"style"}),o.for("upcast").elementToElement({view:"style",model:w4(n)}),o.for("upcast").add(Uh(n,e)),o.for("downcast").elementToElement({model:"htmlStyle",view:(a,{writer:l})=>R_("style",a,l)}),o.for("downcast").add(Yg(n)),t.stop()})}}class UPe extends be{static get requires(){return[Zn]}static get pluginName(){return"ListElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(!e.plugins.has("ListEditing"))return;const t=e.model.schema,n=e.conversion,r=e.plugins.get(Zn),s=e.plugins.get("ListEditing"),o=e.plugins.get("ListUtils"),a=["ul","ol","li"];s.registerDowncastStrategy({scope:"item",attributeName:"htmlLiAttributes",setAttributeOnDowncast:Ca}),s.registerDowncastStrategy({scope:"list",attributeName:"htmlUlAttributes",setAttributeOnDowncast:Ca}),s.registerDowncastStrategy({scope:"list",attributeName:"htmlOlAttributes",setAttributeOnDowncast:Ca}),r.on("register",(l,c)=>{if(!a.includes(c.view)||(l.stop(),t.checkAttribute("$block","htmlLiAttributes")))return;const d=a.map(f=>lo(f));t.extend("$listItem",{allowAttributes:d}),n.for("upcast").add(f=>{f.on("element:ul",rT("htmlUlAttributes",r),{priority:"low"}),f.on("element:ol",rT("htmlOlAttributes",r),{priority:"low"}),f.on("element:li",rT("htmlLiAttributes",r),{priority:"low"})})}),s.on("postFixer",(l,{listNodes:c,writer:d})=>{for(const{node:f,previousNodeInList:m}of c)if(m){if(m.getAttribute("listType")==f.getAttribute("listType")){const p=xL(m.getAttribute("listType")),g=m.getAttribute(p);!Nh(f.getAttribute(p),g)&&d.model.schema.checkAttribute(f,p)&&(d.setAttribute(p,g,f),l.return=!0)}if(m.getAttribute("listItemId")==f.getAttribute("listItemId")){const p=m.getAttribute("htmlLiAttributes");!Nh(f.getAttribute("htmlLiAttributes"),p)&&d.model.schema.checkAttribute(f,"htmlLiAttributes")&&(d.setAttribute("htmlLiAttributes",p,f),l.return=!0)}}}),s.on("postFixer",(l,{listNodes:c,writer:d})=>{for(const{node:f}of c){const m=f.getAttribute("listType");!o.isNumberedListType(m)&&f.getAttribute("htmlOlAttributes")&&(d.removeAttribute("htmlOlAttributes",f),l.return=!0),o.isNumberedListType(m)&&f.getAttribute("htmlUlAttributes")&&(d.removeAttribute("htmlUlAttributes",f),l.return=!0)}})}afterInit(){const e=this.editor;if(!e.commands.get("indentList"))return;const t=e.commands.get("indentList");this.listenTo(t,"afterExecute",(n,r)=>{e.model.change(s=>{for(const o of r){const a=xL(o.getAttribute("listType"));e.model.schema.checkAttribute(o,a)&&s.setAttribute(a,{},o)}})})}}function rT(i,e){return(t,n,r)=>{const s=n.viewItem;n.modelRange||Object.assign(n,r.convertChildren(n.viewItem,n.modelCursor));const o=e.processViewAttributes(s,r);for(const a of n.modelRange.getItems({shallow:!0}))a.hasAttribute("listItemId")&&(a.hasAttribute("htmlUlAttributes")||a.hasAttribute("htmlOlAttributes")||r.writer.model.schema.checkAttribute(a,i)&&r.writer.setAttribute(i,o||{},a))}}function xL(i){return i==="numbered"||i=="customNumbered"?"htmlOlAttributes":"htmlUlAttributes"}class VPe extends be{static get requires(){return[Zn]}static get pluginName(){return"HorizontalLineElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(!e.plugins.has("HorizontalLineEditing"))return;const t=e.model.schema,n=e.conversion,r=e.plugins.get(Zn);r.on("register:hr",(s,o)=>{o.model==="horizontalLine"&&(t.extend("horizontalLine",{allowAttributes:["htmlHrAttributes"]}),n.for("upcast").add(Uh(o,r)),n.for("downcast").add(jPe()),s.stop())})}}function jPe(){return i=>{i.on("attribute:htmlHrAttributes:horizontalLine",(e,t,n)=>{if(!n.consumable.test(t.item,e.name))return;const{attributeOldValue:r,attributeNewValue:s}=t,o=n.mapper.toViewElement(t.item),a=Kg(n.writer,o,"hr");a&&(_a(n.writer,r,s,a),n.consumable.consume(t.item,e.name))},{priority:"low"})}}class zPe extends be{static get requires(){return[Zn,Vh]}static get pluginName(){return"CustomElementSupport"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.plugins.get(Zn),t=this.editor.plugins.get(Vh);e.on("register:$customElement",(n,r)=>
51{n.stop();const s=this.editor,o=s.model.schema,a=s.conversion,l=s.editing.view.domConverter.unsafeElements,c=s.data.htmlProcessor.domConverter.preElements;o.register(r.model,r.modelSchema),o.extend(r.model,{allowAttributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"],isContent:!0}),s.data.htmlProcessor.domConverter.registerRawContentMatcher({name:"template"}),a.for("upcast").elementToElement({view:/.*/,model:(d,f)=>{if(d.name=="$comment")return null;if(!WPe(d.name)||t.getDefinitionsForView(d.name).size)return null;l.includes(d.name)||l.push(d.name),c.includes(d.name)||c.push(d.name);const m=f.writer.createElement(r.model,{htmlElementName:d.name}),p=e.processViewAttributes(d,f);p&&f.writer.setAttribute("htmlCustomElementAttributes",p,m);let g;if(d.is("element","template")&&d.getCustomProperty("$rawContent"))g=d.getCustomProperty("$rawContent");else{const v=new D0(d.document).createDocumentFragment(d),x=s.data.htmlProcessor.domConverter.viewToDom(v),C=x.firstChild;for(;C.firstChild;)x.appendChild(C.firstChild);C.remove(),g=s.data.htmlProcessor.htmlWriter.getHtml(x)}f.writer.setAttribute("htmlContent",g,m);for(const{item:y}of s.editing.view.createRangeIn(d))f.consumable.consume(y,{name:!0});return m},converterPriority:"low"}),a.for("editingDowncast").elementToElement({model:{name:r.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(d,{writer:f})=>{const m=d.getAttribute("htmlElementName"),p=f.createRawElement(m);return d.hasAttribute("htmlCustomElementAttributes")&&Ca(f,d.getAttribute("htmlCustomElementAttributes"),p),p}}),a.for("dataDowncast").elementToElement({model:{name:r.model,attributes:["htmlElementName","htmlCustomElementAttributes","htmlContent"]},view:(d,{writer:f})=>{const m=d.getAttribute("htmlElementName"),p=d.getAttribute("htmlContent"),g=f.createRawElement(m,null,(y,v)=>{v.setContentOf(y,p)});return d.hasAttribute("htmlCustomElementAttributes")&&Ca(f,d.getAttribute("htmlCustomElementAttributes"),g),g}})})}}function WPe(i){try{document.createElement(i)}catch{return!1}return!0}class HPe extends be{static get pluginName(){return"GeneralHtmlSupport"}static get isOfficialPlugin(){return!0}static get requires(){return[Zn,bPe,wPe,xPe,_Pe,APe,IPe,FPe,LPe,UPe,VPe,zPe]}init(){const e=this.editor,t=e.plugins.get(Zn);t.loadAllowedEmptyElementsConfig(e.config.get("htmlSupport.allowEmpty")||[]),t.loadAllowedConfig(e.config.get("htmlSupport.allow")||[]),t.loadDisallowedConfig(e.config.get("htmlSupport.disallow")||[])}afterInit(){this.editor.commands.get("removeFormat")?.registerCustomAttribute(t=>t.startsWith("html")&&t.endsWith("Attributes"),lPe)}getGhsAttributeNameForElement(e){const t=this.editor.plugins.get("DataSchema"),n=Array.from(t.getDefinitionsForView(e,!1)),r=n.find(s=>s.isInline&&!n[0].isObject);return r?r.model:lo(e)}addModelHtmlClass(e,t,n){const r=this.editor.model,s=this.getGhsAttributeNameForElement(e);r.change(o=>{for(const a of Pf(r,n,s))Sf(o,a,s,"classes",l=>{for(const c of mn(t))l.add(c)})})}removeModelHtmlClass(e,t,n){const r=this.editor.model,s=this.getGhsAttributeNameForElement(e);r.change(o=>{for(const a of Pf(r,n,s))Sf(o,a,s,"classes",l=>{for(const c of mn(t))l.delete(c)})})}setModelHtmlAttributes(e,t,n){const r=this.editor.model,s=this.getGhsAttributeNameForElement(e);r.change(o=>{for(const a of Pf(r,n,s))Sf(o,a,s,"attributes",l=>{for(const[c,d]of Object.entries(t))l.set(c,d)})})}removeModelHtmlAttributes(e,t,n){const r=this.editor.model,s=this.getGhsAttributeNameForElement(e);r.change(o=>{for(const a of Pf(r,n,s))Sf(o,a,s,"attributes",l=>{for(const c of mn(t))l.delete(c)})})}setModelHtmlStyles(e,t,n){const r=this.editor.model,s=this.getGhsAttributeNameForElement(e);r.change(o=>{for(const a of Pf(r,n,s))Sf(o,a,s,"styles",l=>{for(const[c,d]of Object.entries(t))l.set(c,d)})})}removeModelHtmlStyles(e,t,n){const r=this.editor.model,s=this.getGhsAttributeNameForElement(e);r.change(o=>{for(const a of Pf(r,n,s))Sf(o,a,s,"styles",l=>{for(const c of mn(t))l.delete(c)})})}}function*Pf(i,e,t){if(e)if(!(Symbol.iterator in e)&&e.is("documentSelection")&&e.isCollapsed)i.schema.checkAttributeInSelection(e,t)&&(yield e);else for(const n of qPe(i,e,t))yield*n.getItems({shallow:!0})}function qPe(i,e,t){return!(Symbol.iterator in e)&&(e.is("node")||e.is("$text")||e.is("$textProxy"))?i.schema.checkAttribute(e,t)?[i.createRangeOn(e)]:[]:i.schema.getValidRanges(i.createSelection(e).getRanges(),t)}var sT={},oT={},aT={},_L;function $Pe(){return _L||(_L=1,(function(i){Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});function e(t){if(!t||typeof t!="object")return!1;const n=Object.getPrototypeOf(t);
51return n===null||n===Object.prototype||Object.getPrototypeOf(n)===null?Object.prototype.toString.call(t)==="[object Object]":!1}i.isPlainObject=e})(aT)),aT}var lT={},CL;function GPe(){return CL||(CL=1,(function(i){Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});function e(t){return Object.getOwnPropertySymbols(t).filter(n=>Object.prototype.propertyIsEnumerable.call(t,n))}i.getSymbols=e})(lT)),lT}var cT={},DL;function YPe(){return DL||(DL=1,(function(i){Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});function e(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}i.getTag=e})(cT)),cT}var uT={},EL;function KPe(){return EL||(EL=1,(function(i){Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});const e="[object RegExp]",t="[object String]",n="[object Number]",r="[object Boolean]",s="[object Arguments]",o="[object Symbol]",a="[object Date]",l="[object Map]",c="[object Set]",d="[object Array]",f="[object Function]",m="[object ArrayBuffer]",p="[object Object]",g="[object Error]",y="[object DataView]",v="[object Uint8Array]",x="[object Uint8ClampedArray]",C="[object Uint16Array]",D="[object Uint32Array]",E="[object BigUint64Array]",T="[object Int8Array]",S="[object Int16Array]",A="[object Int32Array]",I="[object BigInt64Array]",R="[object Float32Array]",O="[object Float64Array]";i.argumentsTag=s,i.arrayBufferTag=m,i.arrayTag=d,i.bigInt64ArrayTag=I,i.bigUint64ArrayTag=E,i.booleanTag=r,i.dataViewTag=y,i.dateTag=a,i.errorTag=g,i.float32ArrayTag=R,i.float64ArrayTag=O,i.functionTag=f,i.int16ArrayTag=S,i.int32ArrayTag=A,i.int8ArrayTag=T,i.mapTag=l,i.numberTag=n,i.objectTag=p,i.regexpTag=e,i.setTag=c,i.stringTag=t,i.symbolTag=o,i.uint16ArrayTag=C,i.uint32ArrayTag=D,i.uint8ArrayTag=v,i.uint8ClampedArrayTag=x})(uT)),uT}var dT={},TL;function XPe(){return TL||(TL=1,(function(i){Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});function e(t,n){return t===n||Number.isNaN(t)&&Number.isNaN(n)}i.eq=e})(dT)),dT}var AL;function QPe(){return AL||(AL=1,(function(i){Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});const e=$Pe(),t=GPe(),n=YPe(),r=KPe(),s=XPe();function o(c,d,f){return a(c,d,void 0,void 0,void 0,void 0,f)}function a(c,d,f,m,p,g,y){const v=y(c,d,f,m,p,g);if(v!==void 0)return v;if(typeof c==typeof d)switch(typeof c){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return c===d;case"number":return c===d||Object.is(c,d);case"function":return c===d;case"object":return l(c,d,g,y)}return l(c,d,g,y)}function l(c,d,f,m){if(Object.is(c,d))return!0;let p=n.getTag(c),g=n.getTag(d);if(p===r.argumentsTag&&(p=r.objectTag),g===r.argumentsTag&&(g=r.objectTag),p!==g)return!1;switch(p){case r.stringTag:return c.toString()===d.toString();case r.numberTag:{const x=c.valueOf(),C=d.valueOf();return s.eq(x,C)}case r.booleanTag:case r.dateTag:case r.symbolTag:return Object.is(c.valueOf(),d.valueOf());case r.regexpTag:return c.source===d.source&&c.flags===d.flags;case r.functionTag:return c===d}f=f??new Map;const y=f.get(c),v=f.get(d);if(y!=null&&v!=null)return y===d;f.set(c,d),f.set(d,c);try{switch(p){case r.mapTag:{if(c.size!==d.size)return!1;for(const[x,C]of c.entries())if(!d.has(x)||!a(C,d.get(x),x,c,d,f,m))return!1;return!0}case r.setTag:{if(c.size!==d.size)return!1;const x=Array.from(c.values()),C=Array.from(d.values());for(let D=0;D<x.length;D++){const E=x[D],T=C.findIndex(S=>a(E,S,void 0,c,d,f,m));if(T===-1)return!1;C.splice(T,1)}return!0}case r.arrayTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:case r.bigUint64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.bigInt64ArrayTag:case r.float32ArrayTag:case r.float64ArrayTag:{if(typeof Buffer<"u"&&Buffer.isBuffer(c)!==Buffer.isBuffer(d)||c.length!==d.length)return!1;for(let x=0;x<c.length;x++)if(!a(c[x],d[x],x,c,d,f,m))return!1;return!0}case r.arrayBufferTag:return c.byteLength!==d.byteLength?!1:l(new Uint8Array(c),new Uint8Array(d),f,m);case r.dataViewTag:return c.byteLength!==d.byteLength||c.byteOffset!==d.byteOffset?!1:l(new Uint8Array(c),new Uint8Array(d),f,m);case r.errorTag:return c.name===d.name&&c.message===d.message;
51case r.objectTag:{if(!(l(c.constructor,d.constructor,f,m)||e.isPlainObject(c)&&e.isPlainObject(d)))return!1;const C=[...Object.keys(c),...t.getSymbols(c)],D=[...Object.keys(d),...t.getSymbols(d)];if(C.length!==D.length)return!1;for(let E=0;E<C.length;E++){const T=C[E],S=c[T];if(!Object.hasOwn(d,T))return!1;const A=d[T];if(!a(S,A,T,c,d,f,m))return!1}return!0}default:return!1}}finally{f.delete(c),f.delete(d)}}i.isEqualWith=o})(oT)),oT}var fT={},kL;function ZPe(){return kL||(kL=1,(function(i){Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});function e(){}i.noop=e})(fT)),fT}var SL;function JPe(){return SL||(SL=1,(function(i){Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});const e=QPe(),t=ZPe();function n(r,s){return e.isEqualWith(r,s,t.noop)}i.isEqual=n})(sT)),sT}var hT,PL;function e8e(){return PL||(PL=1,hT=JPe().isEqual),hT}var t8e=e8e();const n8e=kx(t8e);function i8e(i){return i.createContainerElement("span",{class:"image-inline"},i.createEmptyElement("img"))}function IL(i){return i.createContainerElement("figure",{class:"image"},[i.createEmptyElement("img"),i.createSlot("children")])}function iX(i,e){const t=i.plugins.get("ImageUtils"),n=i.plugins.has("ImageInlineEditing")&&i.plugins.has("ImageBlockEditing");return s=>t.isInlineImageView(s)?n&&(s.getStyle("display")=="block"||s.findAnce
51stor(t.isBlockImageView)?"imageBlock":"imageInline")!==e?null:r(s):null;function r(s){const o={name:!0};return s.hasAttribute("src")&&(o.attributes=["src"]),o}}function x4(i,e){const t=Rn(e.getSelectedBlocks());return!t||i.isObject(t)||t.isEmpty&&t.name!="listItem"?"imageBlock":"imageInline"}function ox(i){return i&&i.endsWith("px")?parseInt(i):null}function ax(i){const e=ox(i.getStyle("width")),t=ox(i.getStyle("height"));return!!(e&&t)}const r8e=/^(image|image-inline)$/;class yr extends be{_domEmitter=new(ds());static get pluginName(){return"ImageUtils"}static get isOfficialPlugin(){return!0}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},t=null,n=null,r={}){const s=this.editor,o=s.model,a=o.document.selection,l=rX(s,t||a,n);e={...Object.fromEntries(a.getAttributes()),...e};for(const c in e)o.schema.checkAttribute(l,c)||delete e[c];return o.change(c=>{const{setImageSizes:d=!0}=r,f=c.createElement(l,e);return o.insertObject(f,t,null,{setSelection:"on",findOptimalPosition:!t&&l!="imageInline"?"auto":void 0}),f.parent?(d&&this.setImageNaturalSizeAttributes(f),f):null})}setImageNaturalSizeAttributes(e){const t=e.getAttribute("src");t&&(e.getAttribute("width")||e.getAttribute("height")||this.editor.model.change(n=>{const r=new $e.window.Image;this._domEmitter.listenTo(r,"load",()=>{!e.getAttribute("width")&&!e.getAttribute("height")&&this.editor.model.enqueueChange(n.batch,s=>{s.setAttribute("width",r.naturalWidth,e),s.setAttribute("height",r.naturalHeight,e)}),this._domEmitter.stopListening(r,"load")}),r.src=t}))}getClosestSelectedImageWidget(e){const t=e.getFirstPosition();if(!t)return null;const n=e.getSelectedElement();if(n&&this.isImageWidget(n))return n;let r=t.parent;for(;r;){if(r.is("element")&&this.isImageWidget(r))return r;r=r.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}getImageWidgetFromImageView(e){return e.findAncestor({classes:r8e})}isImageAllowed(){const t=this.editor.model.document.selection;return s8e(this.editor,t)&&o8e(t)}toImageWidget(e,t,n){return t.setCustomProperty("image",!0,e),_d(e,t,{label:()=>{const o=this.findViewImgElement(e).getAttribute("alt");return o?`${o} ${n}`:n}})}isImageWidget(e){return!!e.getCustomProperty("image")&&Wn(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:n}of t.createRangeIn(e))if(this.isInlineImageView(n))return n}destroy(){return this._domEmitter.stopListening(),super.destroy()}}function s8e(i,e){if(rX(i,e,null)=="imageBlock"){const n=a8e(e,i.model);if(i.model.schema.checkChild(n,"imageBlock"))return!0}else if(i.model.schema.checkChild(e.focus,"imageInline"))return!0;return!1}function o8e(i){return[...i.focus.getAncestors()].every(e=>!e.is("element","imageBlock"))}function a8e(i,e){const n=S_(i,e).start.parent;return n.isEmpty&&!n.is("element","$root")?n.parent:n}function rX(i,e,t){const n=i.model.schema,r=i.config.get("image.insert.type");return i.plugins.has("ImageBlockEditing")?i.plugins.has("ImageInlineEditing")?t||(r==="inline"?"imageInline":r!=="auto"?"imageBlock":e.is("selection")?x4(n,e):n.checkChild(e,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}class l8e extends ut{refresh(){const n=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!n,this.isEnabled&&n.hasAttribute("alt")?this.value=n.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,n=t.plugins.get("ImageUtils"),r=t.model,s=n.getClosestSelectedImageElement(r.document.selection);r.change(o=>{o.setAttribute("alt",e.newValue,s)})}}class c8e extends be{static get requires(){return[yr]}static get pluginName(){return"ImageTextAlternativeEditing"}static get isOfficialPlugin(){return!0}init(){this.editor.commands.add("imageTextAlternative",new l8e(this.editor))}}class u8e extends Ge{focusTracker;keystrokes;labeledInput;backButtonView;saveButtonView;children;_focusables;_focusCycler;constructor(e){super(e),this.focusTracker=new Fn,this.keystrokes=new qn,this.backButtonView=this._createBackButton(),this.saveButtonView=this._createSaveButton(),this.labeledInput=this._createLabeledInputVie
vendor: 4,253 bytes, line 51
51w(),this.children=this.createCollection([this._createHeaderView()]),this.children.add(new nr(e,{children:[this.labeledInput,this.saveButtonView],class:["ck-form__row_with-submit","ck-form__row_large-top-padding"]})),this._focusables=new qi,this.keystrokes.set("Esc",(t,n)=>{this.fire("cancel"),n()}),this._focusCycler=new or({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Xc({view:this}),[this.backButtonView,this.labeledInput,this.saveButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createBackButton(){const e=this.locale.t,t=new nt(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:jc,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_createSaveButton(){const e=this.locale.t,t=new nt(this.locale);return t.set({label:e("Save"),withText:!0,type:"submit",class:"ck-button-action ck-button-bold"}),t}_createHeaderView(){const e=this.locale.t,t=new Wl(this.locale,{label:e("Text Alternative")});return t.children.add(this.backButtonView,0),t}_createLabeledInputView(){const e=this.locale.t,t=new hi(this.locale,Is);return t.label=e("Text alternative"),t.class="ck-labeled-field-view_full-width",t}}function d8e(i){const e=i.plugins.get("ContextualBalloon");if(i.plugins.get("ImageUtils").getClosestSelectedImageWidget(i.editing.view.document.selection)){const n=_4(i);e.updatePosition(n)}}function _4(i){const e=i.editing.view,t=Ai.defaultPositions,n=i.plugins.get("ImageUtils");return{target:e.domConverter.mapViewToDom(n.getClosestSelectedImageWidget(e.document.selection)),positions:[t.northArrowSouth,t.northArrowSouthWest,t.northArrowSouthEast,t.southArrowNorth,t.southArrowNorthWest,t.southArrowNorthEast,t.viewportStickyNorth]}}class f8e extends be{_balloon;_form;static get requires(){return[zo]}static get pluginName(){return"ImageTextAlternativeUI"}static get isOfficialPlugin(){return!0}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",n=>{const r=e.commands.get("imageTextAlternative"),s=new nt(n);return s.set({label:t("Change image text alternative"),icon:hAe,tooltip:!0}),s.bind("isEnabled").to(r,"isEnabled"),s.bind("isOn").to(r,"value",o=>!!o),this.listenTo(s,"execute",()=>{this._showForm()}),s})}_createForm(){const e=this.editor,n=e.editing.view.document,r=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(Mh(u8e))(e.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this.listenTo(e.ui,"update",()=>{r.getClosestSelectedImageWidget(n.selection)?this._isVisible&&d8e(e):this._hideForm(!0)}),Kc({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const e=this.editor,t=e.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:_4(e)}),n.fieldView.value=n.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}class sX extends be{static get requires(){return[c8e,f8e]}static get pluginName(){return"ImageTextAlternative"}static get isOfficialPlugin(){return!0}}
51function h8e(i){const e=(t,n,r)=>{if(!r.consumable.test(n.viewItem,{name:!0,classes:"image"}))return;const s=i.findViewImgElement(n.viewItem);if(!s||!r.consumable.test(s,{name:!0}))return;r.consumable.consume(n.viewItem,{name:!0,classes:"image"});const o=r.convertItem(s,n.modelCursor),a=Rn(o.modelRange.getItems());if(!a){r.consumable.revert(n.viewItem,{name:!0,classes:"image"});return}r.convertChildren(n.viewItem,a),r.updateConversionResult(a,n)};return t=>{t.on("element:figure",e)}}function oX(i,e){const t=(n,r,s)=>{if(!s.consumable.consume(r.item,n.name))return;const o=s.writer,a=s.mapper.toViewElement(r.item),l=i.findViewImgElement(a);r.attributeNewValue===null?(o.removeAttribute("srcset",l),o.removeAttribute("sizes",l)):r.attributeNewValue&&(o.setAttribute("srcset",r.attributeNewValue,l),o.setAttribute("sizes","100vw",l))};return n=>{n.on(`attribute:srcset:${e}`,t)}}function lx(i,e,t){const n=(r,s,o)=>{if(!o.consumable.consume(s.item,r.name))return;const a=o.writer,l=o.mapper.toViewElement(s.item),c=i.findViewImgElement(l);a.setAttribute(s.attributeKey,s.attributeNewValue||"",c)};return r=>{r.on(`attribute:${t}:${e}`,n)}}class C4 extends Oa{observe(e){this.listenTo(e,"load",(t,n)=>{const r=n.target;this.checkShouldIgnoreEventFromTarget(r)||r.tagName=="IMG"&&this._fireEvents(n)},{useCapture:!0})}stopObserving(e){this.stopListening(e)}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class m8e extends ut{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||t==="block"&&Kt("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||t==="inline"&&Kt("image-inline-plugin-required")}refresh(){const e=this.editor.plugins.get("ImageUtils");this.isEnabled=e.isImageAllowed()}execute(e){const t=mn(e.source),n=this.editor.model.document.selection,r=this.editor.plugins.get("ImageUtils"),s=Object.fromEntries(n.getAttributes());t.forEach((o,a)=>{const l=n.getSelectedElement();if(typeof o=="string"&&(o={src:o}),a&&l&&r.isImage(l)){const c=this.editor.model.createPositionAfter(l);r.insertImage({...o,...s},c,e.imageType)}else e.breakBlock?r.insertImage({...o,...s},n.getFirstPosition(),e.imageType):r.insertImage({...o,...s},null,e.imageType)})}}class p8e extends ut{constructor(e){super(e),this.decorate("cleanupImage")}refresh(){const t=this.editor.plugins.get("ImageUtils"),n=this.editor.model.document.selection.getSelectedElement();this.isEnabled=t.isImage(n),this.value=this.isEnabled?n.getAttribute("src"):null}execute(e){const t=this.editor.model.document.selection.getSelectedElement(),n=this.editor.plugins.get("ImageUtils");this.editor.model.change(r=>{r.setAttribute("src",e.source,t),this.cleanupImage(r,t),n.setImageNaturalSizeAttributes(t)})}cleanupImage(e,t){e.removeAttribute("srcset",t),e.removeAttribute("sizes",t),e.removeAttribute("sources",t),e.removeAttribute("width",t),e.removeAttribute("height",t),e.removeAttribute("alt",t)}}class aX extends be{static get requires(){return[yr]}static get pluginName(){return"ImageEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(C4),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:"srcset"});const n=new m8e(e),r=new p8e(e);e.commands.add("insertImage",n),e.commands.add("replaceImageSource",r),e.commands.add("imageInsert",n)}}class lX extends be{static get requires(){return[yr]}static get pluginName(){return"ImageSizeAttributes"}static get isOfficialPlugin(){return!0}afterInit(){this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline")}_registerSchema(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["width","height"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["width","height"]})}_registerConverters(e){const t=this.editor,n=t.plugins.get("ImageUtils"),r=e==="imageBlock"?"figure":"img";t.conversion.for("upcast").attributeToAttribute({view:{name:r,styles:{width:/.+/}},model:{key:"width",value:o=>ax(o)?ox(o.getStyle("width")):null}}).attributeToAttribute({view:{name:r,key:"width"},model:"width"}).attributeToAttribute({view:{name:r,styles:{height:/.+/}},model:{key:"height",value:o=>ax(o)?ox(o.getStyle("height")):null}}).attributeToAttribute({view:{name:r,key:"height"},model:"height"}),t.conversion.for("editingDowncast").add(o=>{s(o,"width","width",!0,!0),s(o,"height","height",!0,!0)}),t.conversion.for("dataDowncast").add(o=>{s(o,"width","width",!1),s(o,"height","height",!1)}),t.conversion.for("upcast").add(o=>{o.on("element:img",(a,l,c)=>{const d=l.viewItem.getAttribute("width"),f=l.viewItem.getAttribute("height");d&&f&&c.consumable.consume(l.viewItem,{styles:["aspect-ratio"]})})});function s(o,a,l,c,d=!1){o.on(`attribute:${a}:${e}`,(f,m,p)=>
51{if(!p.consumable.consume(m.item,f.name))return;const g=p.writer,y=p.mapper.toViewElement(m.item),v=n.findViewImgElement(y);m.attributeNewValue!==null?g.setAttribute(l,m.attributeNewValue,v):g.removeAttribute(l,v);const x=m.item.getAttribute("width"),C=m.item.getAttribute("height"),D=x&&C;if(D&&d&&g.setAttribute("loading","lazy",v),m.item.hasAttribute("sources"))return;const E=m.item.hasAttribute("resizedWidth");e==="imageInline"&&!E&&!c||D&&g.setStyle("aspect-ratio",`${x}/${C}`,v)})}}}class cX extends ut{_modelElementName;constructor(e,t){super(e),this._modelElementName=t}refresh(){const t=this.editor.plugins.get("ImageUtils"),n=t.getClosestSelectedImageElement(this.editor.model.document.selection);this._modelElementName==="imageBlock"?this.isEnabled=t.isInlineImage(n):this.isEnabled=t.isBlockImage(n)}execute(e={}){const t=this.editor,n=this.editor.model,r=t.plugins.get("ImageUtils"),s=r.getClosestSelectedImageElement(n.document.selection),o=Object.fromEntries(s.getAttributes());return!o.src&&!o.uploadId?null:n.change(a=>{const{setImageSizes:l=!0}=e,c=Array.from(n.markers).filter(m=>m.getRange().containsItem(s)),d=r.insertImage(o,n.createSelection(s,"on"),this._modelElementName,{setImageSizes:l});if(!d)return null;const f=a.createRangeOn(d);for(const m of c){const p=m.getRange(),g=p.root.rootName!="$graveyard"?p.getJoined(f,!0):f;a.updateMarker(m,{range:g})}return{oldElement:s,newElement:d}})}}class uX extends be{static get requires(){return[yr]}static get pluginName(){return"ImagePlaceholder"}static get isOfficialPlugin(){return!0}afterInit(){this._setupSchema(),this._setupConversion(),this._setupLoadListener()}_setupSchema(){const e=this.editor.model.schema;e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["placeholder"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["placeholder"]})}_setupConversion(){const e=this.editor,t=e.conversion,n=e.plugins.get("ImageUtils");t.for("editingDowncast").add(r=>{r.on("attribute:placeholder",(s,o,a)=>{if(!a.consumable.test(o.item,s.name)||!o.item.is("element","imageBlock")&&!o.item.is("element","imageInline"))return;a.consumable.consume(o.item,s.name);const l=a.writer,c=a.mapper.toViewElement(o.item),d=n.findViewImgElement(c);o.attributeNewValue?(l.addClass("image_placeholder",d),l.setStyle("background-image",`url(${o.attributeNewValue})`,d),l.setCustomProperty("editingPipeline:doNotReuseOnce",!0,d)):(l.removeClass("image_placeholder",d),l.removeStyle("background-image",d))})})}_setupLoadListener(){const e=this.editor,t=e.model,n=e.editing,r=n.view,s=e.plugins.get("ImageUtils");r.addObserver(C4),this.listenTo(r.document,"imageLoaded",(o,a)=>{const l=r.domConverter.mapDomToView(a.target);if(!l)return;const c=s.getImageWidgetFromImageView(l);if(!c)return;const d=n.mapper.toModelElement(c);!d||!d.hasAttribute("placeholder")||t.enqueueChange({isUndoable:!1},f=>{f.removeAttribute("placeholder",d)})})}}class dX extends be{static get requires(){return[aX,lX,yr,uX,Ls]}static get pluginName(){return"ImageBlockEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new cX(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,n=e.conversion,r=e.plugins.get("ImageUtils");n.for("dataDowncast").elementToStructure({model:"imageBlock",view:(s,{writer:o})=>IL(o)}),n.for("editingDowncast").elementToStructure({model:"imageBlock",view:(s,{writer:o})=>r.toImageWidget(IL(o),o,t("image widget"))}),n.for("downcast").add(lx(r,"imageBlock","src")).add(lx(r,"imageBlock","alt")).add(oX(r,"imageBlock")),n.for("upcast").elementToElement({view:iX(e,"imageBlock"),model:(s,{writer:o})=>o.createElement("imageBlock",s.hasAttribute("src")?{src:s.getAttribute("src")}:void 0)}).add(h8e(r))}_setupClipboardIntegration(){const e=this.editor,t=e.model,n=e.editing.view,r=e.plugins.get("ImageUtils"),s=e.plugins.get("ClipboardPipeline");this.listenTo(s,"inputTransformation",(o,a)=>{const l=Array.from(a.content.getChildren());let c;if(!l.every(r.isInlineImageView))return;a.targetRanges?c=e.editing.mapper.toModelRange(a.targetRanges[0]):c=t.document.selection.getFirstRange();const d=t.createSelection(c);if(x4(t.schema,d)==="imageBlock"){const f=new D0(n.document),m=l.map(p=>f.createElement("figure",{class:"image"},p));a.content=f.createDocumentFragment(m)}}),this.listenTo(s,"contentInsertion",(o,a)=>{a.method==="paste"&&t.change(l=>{const c=l.createRangeIn(a.content);for(const d of c.getItems())d.is("element","imageBlock")&&r.setImageNaturalSizeAttributes(d)})})}}class g8e extends Ge{focusTracker;keystrokes;_focusables;_focusCycler;children;constructor(e,t=[]){super(e),this.focusTracker=new Fn,this.keystrokes=new qn,this._focusables=new qi,this.children=this.createCollection(),this._focusCycler=new or({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});for(const n of t)this.children.add(n),this._focusables.add(n),n instanceof lK&&this._focusables.addMany(n.children);this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:-1},children:this.children})}render(){super.render(),Xc({view:this});for(const t of this._focusables)this.focusTracker.add(t.element);this.keystrokes.listenTo(this.element);const e=t=>t.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}class fX extends be{static get pluginName(){return"ImageInsertUI"}static get isOfficialPlugin(){return!0}static get requires(){return[yr]}dropdownView;_integrations=new Map;constructor(e){super(e),e.config.define("image.insert.integrations",["upload","assetManager","url"])}init(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get("ImageUtils");this.set("isImageSelected",!1),this.listenTo(e.model.document,"change",()=>{this.isImageSelected=n.isImage(t.getSelectedElement())});const r=o=>this._createToolbarComponent(o),s=o=>this._createMenuBarComponent(o);e.ui.componentFactory.add("insertImage",r),e.ui.componentFactory.add("imageInsert",r),e.ui.componentFactory.add("menuBar:insertImage",s)}registerIntegration({name:e,observable:t,buttonViewCreator:n,formViewCreator:r,menuBarButtonViewCreator:s,requiresForm:o=!1,override:a=!1}
51){this._integrations.has(e)&&!a&&Kt("image-insert-integration-exists",{name:e}),this._integrations.set(e,{observable:t,buttonViewCreator:n,menuBarButtonViewCreator:s,formViewCreator:r,requiresForm:o})}_createToolbarComponent(e){const t=this.editor,n=e.t,r=this._prepareIntegrations();if(!r.length)return null;let s;const o=r[0];if(r.length==1){if(!o.requiresForm)return o.buttonViewCreator(!0);s=o.buttonViewCreator(!0)}else{const c=o.buttonViewCreator(!1);s=new rm(e,c),s.tooltip=!0,s.bind("label").to(this,"isImageSelected",d=>n(d?"Replace image":"Insert image"))}const a=this.dropdownView=zi(e,s),l=r.map(({observable:c})=>typeof c=="function"?c():c);return a.bind("isEnabled").toMany(l,"isEnabled",(...c)=>c.some(d=>d)),a.once("change:isOpen",()=>{const c=r.flatMap(({formViewCreator:f})=>f(r.length==1)),d=new g8e(t.locale,c);a.panelView.children.add(d)}),a}_createMenuBarComponent(e){const t=e.t,n=this._prepareIntegrations();if(!n.length)return null;const r=n.flatMap(({menuBarButtonViewCreator:a})=>a(n.length==1)),s=new ls(e),o=new Ol(e);s.panelView.children.add(o),s.buttonView.set({icon:PTe,label:t("Image")});for(const a of r){const l=new Sa(e,s);l.children.add(a),o.items.add(l),a.delegate("execute").to(s)}return s}_prepareIntegrations(){const t=this.editor.config.get("image.insert.integrations"),n=[];if(!t.length)return Kt("image-insert-integrations-not-specified"),n;for(const r of t){if(!this._integrations.has(r)){["upload","assetManager","url"].includes(r)||Kt("image-insert-unknown-integration",{item:r});continue}n.push(this._integrations.get(r))}return n.length||Kt("image-insert-integrations-not-registered"),n}}class b8e extends be{static get requires(){return[dX,Qc,sX,fX]}static get pluginName(){return"ImageBlock"}static get isOfficialPlugin(){return!0}}class y8e extends be{static get requires(){return[aX,lX,yr,uX,Ls]}static get pluginName(){return"ImageInlineEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"],disallowIn:["caption"]}),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new cX(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,n=e.conversion,r=e.plugins.get("ImageUtils");n.for("dataDowncast").elementToElement({model:"imageInline",view:(s,{writer:o})=>o.createEmptyElement("img")}),n.for("editingDowncast").elementToStructure({model:"imageInline",view:(s,{writer:o})=>r.toImageWidget(i8e(o),o,t("image widget"))}),n.for("downcast").add(lx(r,"imageInline","src")).add(lx(r,"imageInline","alt")).add(oX(r,"imageInline")),n.for("upcast").elementToElement({view:iX(e,"imageInline"),model:(s,{writer:o})=>o.createElement("imageInline",s.hasAttribute("src")?{src:s.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const e=this.editor,t=e.model,n=e.editing.view,r=e.plugins.get("ImageUtils"),s=e.plugins.get("ClipboardPipeline");this.listenTo(s,"inputTransformation",(o,a)=>{const l=Array.from(a.content.getChildren());let c;if(!l.every(r.isBlockImageView))return;a.targetRanges?c=e.editing.mapper.toModelRange(a.targetRanges[0]):c=t.document.selection.getFirstRange();const d=t.createSelection(c);if(x4(t.schema,d)==="imageInline"){const f=new D0(n.document),m=l.map(p=>p.childCount===1?(Array.from(p.getAttributes()).forEach(g=>f.setAttribute(...g,r.findViewImgElement(p))),p.getChild(0)):p);a.content=f.createDocumentFragment(m)}}),this.listenTo(s,"contentInsertion",(o,a)=>{a.method==="paste"&&t.change(l=>{const c=l.createRangeIn(a.content);for(const d of c.getItems())d.is("element","imageInline")&&r.setImageNaturalSizeAttributes(d)})})}}class v8e extends be{static get requires(){return[y8e,Qc,sX,fX]}static get pluginName(){return"ImageInline"}static get isOfficialPlugin(){return!0}}class w8e extends be{static get requires(){return[b8e,v8e]}static get pluginName(){return"Image"}static get isOfficialPlugin(){return!0}}class hX extends be{static get pluginName(){return"ImageCaptionUtils"}static get isOfficialPlugin(){return!0}static get requires(){return[yr]}getCaptionFromImageModelElement(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}getCaptionFromModelSelection(e){const t=this.editor.plugins.get("ImageUtils"),n=e.getFirstPosition().findAnce
51stor("caption");return n&&t.isBlockImage(n.parent)?n:null}matchImageCaptionViewElement(e){const t=this.editor.plugins.get("ImageUtils");return e.name=="figcaption"&&t.isBlockImageView(e.parent)?{name:!0}:null}}class x8e extends ut{refresh(){const e=this.editor,t=e.plugins.get("ImageCaptionUtils"),n=e.plugins.get("ImageUtils");if(!e.plugins.has(dX)){this.isEnabled=!1,this.value=!1;return}const r=e.model.document.selection,s=r.getSelectedElement();if(!s){const o=t.getCaptionFromModelSelection(r);this.isEnabled=!!o,this.value=!!o;return}this.isEnabled=n.isImage(s),this.isEnabled?this.value=!!t.getCaptionFromImageModelElement(s):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change(n=>{this.value?this._hideImageCaption(n):this._showImageCaption(n,t)})}_showImageCaption(e,t){const r=this.editor.model.document.selection,s=this.editor.plugins.get("ImageCaptionEditing"),o=this.editor.plugins.get("ImageUtils");let a=r.getSelectedElement();const l=s._getSavedCaption(a);o.isInlineImage(a)&&(this.editor.execute("imageTypeBlock"),a=r.getSelectedElement());const c=l||e.createElement("caption");e.append(c,a),t&&e.setSelection(c,"in")}_hideImageCaption(e){const t=this.editor,n=t.model.document.selection,r=t.plugins.get("ImageCaptionEditing"),s=t.plugins.get("ImageCaptionUtils");let o=n.getSelectedElement(),a;o?a=s.getCaptionFromImageModelElement(o):(a=s.getCaptionFromModelSelection(n),o=a.parent),r._saveCaption(o,a),e.setSelection(o,"on"),e.remove(a)}}class _8e extends be{static get requires(){return[yr,hX]}static get pluginName(){return"ImageCaptionEditing"}static get isOfficialPlugin(){return!0}_savedCaptionsMap;constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema;t.isRegistered("caption")?t.extend("caption",{allowIn:"imageBlock"}):t.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new x8e(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const e=this.editor,t=e.editing.view,n=e.plugins.get("ImageUtils"),r=e.plugins.get("ImageCaptionUtils"),s=e.t;e.conversion.for("upcast").elementToElement({view:o=>r.matchImageCaptionViewElement(o),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(o,{writer:a})=>n.isBlockImage(o.parent)?a.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(o,{writer:a})=>{if(!n.isBlockImage(o.parent))return null;const l=a.createEditableElement("figcaption");a.setCustomProperty("imageCaption",!0,l),l.placeholder=s("Enter image caption"),W3({view:t,element:l,keepOnFocus:!0});const c=o.parent.getAttribute("alt"),d=c?s("Caption for image: %0",[c]):s("Caption for the image");return g4(l,a,{label:d})}})}_setupImageTypeCommandsIntegration(){const e=this.editor,t=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils"),r=e.commands.get("imageTypeInline"),s=e.commands.get("imageTypeBlock"),o=a=>{if(!a.return)return;const{oldElement:l,newElement:c}=a.return;if(!l)return;if(t.isBlockImage(l)){const f=n.getCaptionFromImageModelElement(l);if(f){this._saveCaption(c,f);return}}const d=this._getSavedCaption(l);d&&this._saveCaption(c,d)};r&&this.listenTo(r,"execute",o,{priority:"low"}),s&&this.listenTo(s,"execute",o,{priority:"low"})}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?An.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}_registerCaptionReconversion(){const e=this.editor,t=e.model,n=e.plugins.get("ImageUtils"),r=e.plugins.get("ImageCaptionUtils");t.document.on("change:data",()=>{const s=t.document.differ.getChanges();for(const o of s){if(o.attributeKey!=="alt")continue;const a=o.range.start.nodeAfter;if(n.isBlockImage(a)){const l=r.getCaptionFromImageModelElement(a);if(!l)return;e.editing.reconvertItem(l)}}})}}class C8e extends be{static get requires(){return[hX]}static get pluginName(){return"ImageCaptionUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,n=e.plugins.get("ImageCaptionUtils"),r=e.t;e.ui.componentFactory.add("toggleImageCaption",s=>{const o=e.commands.get("toggleImageCaption"),a=new nt(s);return a.set({icon:HY,tooltip:!0,isToggleable:!0}),a.bind("isOn","isEnabled").to(o,"value","isEnabled"),a.bind("label").to(o,"value",l=>r(l?"Toggle caption off":"Toggle caption on")),this.listenTo(a,"execute",()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});const l=n.getCaptionFromModelSelection(e.model.document.selection);if(l){const c=e.editing.mapper.toViewElement(l);t.scrollToTheSelection(),t.change(d=>
51{d.addClass("image__caption_highlighted",c)})}e.editing.view.focus()}),a})}}class D8e extends be{static get requires(){return[_8e,C8e]}static get pluginName(){return"ImageCaption"}static get isOfficialPlugin(){return!0}}function mX(i){const e=i.map(t=>t.replace("+","\\+"));return new RegExp(`^image\\/(${e.join("|")})$`)}function E8e(i){return new Promise((e,t)=>{const n=i.getAttribute("src");fetch(n).then(r=>r.blob()).then(r=>{const s=pX(r,n),a=`image.${s.replace("image/","")}`,l=new File([r],a,{type:s});e(l)}).catch(r=>r&&r.name==="TypeError"?A8e(n).then(e).catch(t):t(r))})}function T8e(i,e){return!i.isInlineImageView(e)||!e.getAttribute("src")?!1:!!e.getAttribute("src").match(/^data:image\/\w+;base64,/g)||!!e.getAttribute("src").match(/^blob:/g)}function pX(i,e){return i.type?i.type:e.match(/data:(image\/\w+);base64/)?e.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}function A8e(i){return k8e(i).then(e=>{const t=pX(e,i),r=`image.${t.replace("image/","")}`;return new File([e],r,{type:t})})}function k8e(i){return new Promise((e,t)=>{const n=$e.document.createElement("img");n.addEventListener("load",()=>{const r=$e.document.createElement("canvas");r.width=n.width,r.height=n.height,r.getContext("2d").drawImage(n,0,0),r.toBlob(o=>o?e(o):t())}),n.addEventListener("error",()=>t()),n.src=i})}class S8e extends be{static get pluginName(){return"ImageUploadUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("uploadImage",()=>this._createToolbarButton()),e.ui.componentFactory.add("imageUpload",()=>this._createToolbarButton()),e.ui.componentFactory.add("menuBar:uploadImage",()=>this._createMenuBarButton("standalone")),e.plugins.has("ImageInsertUI")&&e.plugins.get("ImageInsertUI").registerIntegration({name:"upload",observable:()=>e.commands.get("uploadImage"),buttonViewCreator:()=>this._createToolbarButton(),formViewCreator:()=>this._createDropdownButton(),menuBarButtonViewCreator:t=>this._createMenuBarButton(t?"insertOnly":"insertNested")})}_createButton(e){const t=this.editor,n=t.locale,r=t.commands.get("uploadImage"),s=t.config.get("image.upload.types"),o=mX(s),a=new e(t.locale),l=n.t;return a.set({acceptedType:s.map(c=>`image/${c}`).join(","),allowMultipleFiles:!0,label:l("Upload from computer"),icon:ITe}),a.bind("isEnabled").to(r),a.on("done",(c,d)=>{const f=Array.from(d).filter(m=>o.test(m.type));f.length&&(t.execute("uploadImage",{file:f}),t.editing.view.focus())}),a}_createToolbarButton(){const e=this.editor.locale.t,t=this.editor.plugins.get("ImageInsertUI"),n=this.editor.commands.get("uploadImage"),r=this._createButton(C7);return r.tooltip=!0,r.bind("label").to(t,"isImageSelected",n,"isAccessAllowed",(s,o)=>e(o?s?"Replace image from computer":"Upload image from computer":"You have no image upload permissions.")),r}_createDropdownButton(){const e=this.editor.locale.t,t=this.editor.plugins.get("ImageInsertUI"),n=this._createButton(C7);return n.withText=!0,n.bind("label").to(t,"isImageSelected",r=>e(r?"Replace from computer":"Upload from computer")),n.on("execute",()=>{t.dropdownView.isOpen=!1}),n}_createMenuBarButton(e){const t=this.editor.locale.t,n=this._createButton(_K);switch(n.withText=!0,e){case"standalone":n.label=t("Image from computer");break;case"insertOnly":n.label=t("Image");break;case"insertNested":n.label=t("From computer");break}return n}}class P8e extends be{static get pluginName(){return"ImageUploadProgress"}static get isOfficialPlugin(){return!0}placeholder;constructor(e){super(e),this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}uploadStatusChange=(e,t,n)=>{const r=this.editor,s=t.item,o=s.getAttribute("uploadId");if(!n.consumable.consume(t.item,e.name))return;const a=r.plugins.get("ImageUtils"),l=r.plugins.get(rh),c=o?t.attributeNewValue:null,d=this.placeholder,f=r.editing.mapper.toViewElement(s),m=n.writer;if(c=="reading"){RL(f,m),FL(a,d,f,m);return}if(c=="uploading"){const p=l.loaders.get(o);
51RL(f,m),p?(OL(f,m),R8e(f,m,p,r.editing.view),M8e(a,f,m,p)):FL(a,d,f,m);return}c=="complete"&&l.loaders.get(o)&&O8e(f,m,r.editing.view),F8e(f,m),OL(f,m),I8e(f,m)}}function RL(i,e){i.hasClass("ck-appear")||e.addClass("ck-appear",i)}function I8e(i,e){e.removeClass("ck-appear",i)}function FL(i,e,t,n){t.hasClass("ck-image-upload-placeholder")||n.addClass("ck-image-upload-placeholder",t);const r=i.findViewImgElement(t);r.getAttribute("src")!==e&&n.setAttribute("src",e,r),gX(t,"placeholder")||n.insert(n.createPositionAfter(r),B8e(n))}function OL(i,e){i.hasClass("ck-image-upload-placeholder")&&e.removeClass("ck-image-upload-placeholder",i),bX(i,e,"placeholder")}function R8e(i,e,t,n){const r=N8e(e);e.insert(e.createPositionAt(i,"end"),r),t.on("change:uploadedPercent",(s,o,a)=>{n.change(l=>{l.setStyle("width",a+"%",r)})})}function F8e(i,e){bX(i,e,"progressBar")}function O8e(i,e,t){const n=e.createUIElement("div",{class:"ck-image-upload-complete-icon"});e.insert(e.createPositionAt(i,"end"),n),setTimeout(()=>{t.change(r=>r.remove(r.createRangeOn(n)))},3e3)}function N8e(i){const e=i.createUIElement("div",{class:"ck-progress-bar"});return i.setCustomProperty("progressBar",!0,e),e}function B8e(i){const e=i.createUIElement("div",{class:"ck-upload-placeholder-loader"});return i.setCustomProperty("placeholder",!0,e),e}function gX(i,e){for(const t of i.getChildren())if(t.getCustomProperty(e))return t}function bX(i,e,t){const n=gX(i,t);n&&e.remove(e.createRangeOn(n))}function M8e(i,e,t,n){if(n.data){const r=i.findViewImgElement(e);t.setAttribute("src",n.data,r)}}class L8e extends ut{constructor(e){super(e),this.set("isAccessAllowed",!0)}refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),n=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(n)}execute(e){const t=mn(e.file),n=this.editor.model.document.selection,r=this.editor.plugins.get("ImageUtils"),s=Object.fromEntries(n.getAttributes());t.forEach((o,a)=>{const l=n.getSelectedElement();if(a&&l&&r.isImage(l)){const c=this.editor.model.createPositionAfter(l);this._uploadImage(o,s,c)}else this._uploadImage(o,s)})}_uploadImage(e,t,n){const r=this.editor,o=r.plugins.get(rh).createLoader(e),a=r.plugins.get("ImageUtils");o&&a.insertImage({...t,uploadId:o.id},n)}}class U8e extends be{static get requires(){return[rh,O7,Ls,yr]}static get pluginName(){return"ImageUploadEditing"}static get isOfficialPlugin(){return!0}_uploadImageElements;_uploadedImages=new Map;constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,n=e.conversion,r=e.plugins.get(rh),s=e.plugins.get("ImageUtils"),o=e.plugins.get("ClipboardPipeline"),a=mX(e.config.get("image.upload.types")),l=new L8e(e);e.commands.add("uploadImage",l),e.commands.add("imageUpload",l),n.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}).add(c=>c.on("element:img",(d,f,m)=>{if(!m.consumable.test(f.viewItem,{attributes:["data-ck-upload-id"]}))return;const p=f.viewItem.getAttribute("data-ck-upload-id");if(!p)return;const[g]=Array.from(f.modelRange.getItems({shallow:!0})),y=r.loaders.get(p);g&&(m.writer.setAttribute("uploadId",p,g),m.consumable.consume(f.viewItem,{attributes:["data-ck-upload-id"]}),y&&y.data&&m.writer.setAttribute("uploadStatus",y.status,g))},{priority:"low"})),this.listenTo(e.editing.view.document,"clipboardInput",(c,d)=>{if(V8e(d.dataTransfer))return;const f=Array.from(d.dataTransfer.files).filter(p=>p?a.test(p.type):!1);if(!f.length)return;if(c.stop(),e.model.change(p=>{d.targetRanges&&p.setSelection(d.targetRanges.map(g=>e.editing.mapper.toModelRange(g))),e.execute("uploadImage",{file:f})}),!e.commands.get("uploadImage").isAccessAllowed){const p=e.plugins.get("Notification"),g=e.locale.t;p.showWarning(g("You have no image upload permissions."),{namespace:"image"})}}),this.listenTo(o,"inputTransformation",(c,d)=>{const f=Array.from(e.editing.view.createRangeIn(d.content)).map(p=>p.item).filter(p=>T8e(s,p)&&!p.getAttribute("uploadProcessed")).map(p=>({promise:E8e(p),imageElement:p}));if(!f.length)return;const m=new D0(e.editing.view.document);for(const p of f){m.setAttribute("uploadProcessed",!0,p.imageElement);const g=r.createLoader(p.promise);g&&(m.setAttribute("src","",p.imageElement),m.setAttribute("uploadId",g.id,p.imageElement))}}),e.editing.view.document.on("dragover",(c,d)=>{d.preventDefault()}),t.on("change",()=>{const c=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),d=new Set;for(const f of c)if(f.type=="insert"&&f.name!="$text"){const m=f.position.nodeAfter,p=f.position.root.rootName=="$graveyard";for(const g of j8e(e,m)){const y=g.getAttribute("uploadId"),v=g.getAttribute("uploadStatus");if(!y||v=="complete")continue;const x=r.loaders.get(y);if(!x){!p&&this._uploadedImages.has(y)&&e.model.enqueueChange({isUndoable:!1},C=>{C.setAttribute("uploadStatus","complete",g),this.fire("uploadComplete",{data:this._uploadedImages.get(y),imageElement:g})});continue}p?d.has(y)||Array.from(this._uploadImageElements.get(y)).every(D=>D.root.rootName=="$graveyard")&&x.abort():(d.add(y),this._uploadImageElements.has(y)?this._uploadImageElements.get(y).add(g):this._uploadImageElements.set(y,new Set([g])),x.status=="idle"&&this._readAndUpload(x))}}}),this.on("uploadComplete",(c,{imageElement:d,data:f})=>{const m=f.urls?f.urls:f;this.editor.model.change(p=>{p.setAttribute("src",m.default,d),this._parseAndSetSrcsetAttributeOnImage(m,d,p),s.setImageNaturalSizeAttributes(d)})},{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&(e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this._registerConverters("imageBlock")),this.editor.plugins.has("ImageInlineEditing")&&(e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]}),this._registerConverters("imageInline"))}_readAndUpload(e){const t=this.editor,n=t.model,r=t.locale.t,s=t.plugins.get(rh),o=t.plugins.get(O7),a=t.plugins.get("ImageUtils"),l=this._uploadImageElements;return n.enqueueChange({isUndoable:!1},d=>{const f=l.get(e.id);for(const m of f)d.setAttribute("uploadStatus","reading",m)}),e.read().then(()=>{const d=e.upload();t.ui&&t.ui.ariaLiveAnnouncer.announce(r("Uploading image"));for(const f of l.get(e.id)){if(ot.isSafari){const m=t.editing.mapper.toViewElement(f),p=a.findViewImgElement(m);t.editing.view.once("render",()=>{if(!p.parent)return;const g=t.editing.view.domConverter.mapViewToDom(p.parent);if(!g)return;const y=g.style.display;g.style.display="none",g._ckHack=g.offsetHeight,g.style.display=y})}n.enqueueChange({isUndoable:!1},m=>{m.setAttribute("uploadStatus","uploading",f)})}return d}).then(d=>{n.enqueueChange({isUndoable:!1},f=>{for(const m of l.get(e.id))f.setAttribute("uploadStatus","complete",m),this.fire("uploadComplete",{data:d,imageElement:m});t.ui&&t.ui.ariaLiveAnnouncer.announce(r("Image upload complete")),this._uploadedImages.set(e.id,d)}),c()}).catch(d=>{if(t.ui&&t.ui.ariaLiveAnnouncer.announce(r("Error during image upload")),e.status!=="error"&&e.status!=="aborted")throw d;e.status=="error"&&d&&o.showWarning(d,{title:r("Upload failed"),namespace:"upload"}),n.enqueueChange({isUndoable:!1},f=>{for(const m of l.get(e.id))m.root.rootName!=="$graveyard"&&f.remove(m)}),c()});function c(){n.enqueueChange({isUndoable:!1},d=>{for(const f of l.get(e.id))d.removeAttribute("uploadId",f),d.removeAttribute("uploadStatus",f);l.delete(e.id)}),s.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,n){let r=0;const s=Object.keys(e).filter(o=>{const a=parseInt(o,10);if(!isNaN(a))return r=Math.max(r,a),!0}).map(o=>`${e[o]} ${o}w`).join(", ");
51if(s!=""){const o={srcset:s};!t.hasAttribute("width")&&!t.hasAttribute("height")&&(o.width=r),n.setAttributes(o,t)}}_registerConverters(e){const{conversion:t,plugins:n}=this.editor,r=n.get(rh),s=n.get(yr);t.for("dataDowncast").add(o=>{o.on(`attribute:uploadId:${e}`,(a,l,c)=>{if(!c.consumable.test(l.item,a.name))return;const d=r.loaders.get(l.attributeNewValue);if(!d||!d.data)return null;const f=c.mapper.toViewElement(l.item),m=s.findViewImgElement(f);m&&(c.consumable.consume(l.item,a.name),c.writer.setAttribute("data-ck-upload-id",d.id,m))})})}}function V8e(i){return Array.from(i.types).includes("text/html")&&i.getData("text/html")!==""}function j8e(i,e){const t=i.plugins.get("ImageUtils");return Array.from(i.model.createRangeOn(e)).filter(n=>t.isImage(n.item)).map(n=>n.item)}class z8e extends be{static get pluginName(){return"ImageUpload"}static get isOfficialPlugin(){return!0}static get requires(){return[U8e,S8e,P8e]}}class W8e extends ut{refresh(){const e=this.editor,n=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);this.isEnabled=!!n,!n||!n.hasAttribute("resizedWidth")?this.value=null:this.value={width:n.getAttribute("resizedWidth"),height:null}}execute(e){const t=this.editor,n=t.model,r=t.plugins.get("ImageUtils"),s=r.getClosestSelectedImageElement(n.document.selection);this.value={width:e.width,height:null},s&&n.change(o=>{o.setAttribute("resizedWidth",e.width,s),o.removeAttribute("resizedHeight",s),r.setImageNaturalSizeAttributes(s)})}}class yX extends be{static get requires(){return[yr]}static get pluginName(){return"ImageResizeEditing"}static get licenseFeatureCode(){return"IR"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:custom",value:"custom",icon:"custom"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new W8e(e);this._registerConverters("imageBlock"),this._registerConverters("imageInline"),e.commands.add("resizeImage",t),e.commands.add("imageResize",t)}afterInit(){this._registerSchema()}_registerSchema(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&(e.extend("imageBlock",{allowAttributes:["resizedWidth","resizedHeight"]}),e.setAttributeProperties("resizedWidth",{isFormatting:!0}),e.setAttributeProperties("resizedHeight",{isFormatting:!0})),this.editor.plugins.has("ImageInlineEditing")&&(e.extend("imageInline",{allowAttributes:["resizedWidth","resizedHeight"]}),e.setAttributeProperties("resizedWidth",{isFormatting:!0}),e.setAttributeProperties("resizedHeight",{isFormatting:!0}))}_registerConverters(e){const t=this.editor,n=t.plugins.get("ImageUtils");t.conversion.for("downcast").add(r=>r.on(`attribute:resizedWidth:${e}`,(s,o,a)=>{if(!a.consumable.consume(o.item,s.name))return;const l=a.writer,c=a.mapper.toViewElement(o.item);o.attributeNewValue!==null?(l.setStyle("width",o.attributeNewValue,c),l.addClass("image_resized",c)):(l.removeStyle("width",c),l.removeClass("image_resized",c))})),t.conversion.for("dataDowncast").attributeToAttribute({model:{name:e,key:"resizedHeight"},view:r=>({key:"style",value:{height:r}})}),t.conversion.for("editingDowncast").add(r=>r.on(`attribute:resizedHeight:${e}`,(s,o,a)=>{if(!a.consumable.consume(o.item,s.name))return;const l=a.writer,c=a.mapper.toViewElement(o.item),d=e==="imageInline"?n.findViewImgElement(c):c;o.attributeNewValue!==null?l.setStyle("height",o.attributeNewValue,d):l.removeStyle("height",d)})),t.conversion.for("upcast").attributeToAttribute({view:{name:e==="imageBlock"?"figure":"img",styles:{width:/.+/}},model:{key:"resizedWidth",value:r=>ax(r)?null:r.getStyle("width")}}),t.conversion.for("upcast").attributeToAttribute({view:{name:e==="imageBlock"?"figure":"img",styles:{height:/.+/}},model:{key:"resizedHeight",value:r=>ax(r)?null:r.getStyle("height")}}),t.conversion.for("upcast").add(r=>{r.on(`element:${e==="imageBlock"?"figure":"img"}`,(s,o,a)=>{a.consumable.consume(o.viewItem,{classes:["image_resized"]})})})}}const mT={small:HTe,medium:WTe,large:zTe,custom:VTe,original:jTe};class H8e extends be{static get requires(){return[yX]}static get pluginName(){return"ImageResizeButtons"}static get isOfficialPlugin(){return!0}_resizeUnit;constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),n=e.commands.get("resizeImage");this.bind("isEnabled").to(n);for(const r of t)this._registerImageResizeButton(r);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:n,value:r,icon:s}=e;t.ui.componentFactory.add(n,o=>{const a=new nt(o),l=t.commands.get("resizeImage"),c=this._getOptionLabelValue(e,!0);if(!mT[s])throw new oe("imageresizebuttons-missing-icon",t,e);if(a.set({label:c,icon:mT[s],tooltip:c,isToggleable:!0}),a.bind("isEnabled").to(this),t.plugins.has("ImageCustomResizeUI")&&Cp(e)){const d=t.plugins.get("ImageCustomResizeUI");this.listenTo(a,"execute",()=>{d._showForm(this._resizeUnit)})}else{const d=r?r+this._resizeUnit:null;a.bind("isOn").to(l,"value",l,"isEnabled",kS(d)),this.listenTo(a,"execute",()=>{t.execute("resizeImage",{width:d})})}return a})}_registerImageResizeDropdown(e){const t=this.editor,n=t.t,r=e.find(o=>!o.value),s=o=>{const a=t.commands.get("resizeImage"),l=zi(o,mK),c=l.buttonView,d=n("Resize image");return c.set({tooltip:d,commandValue:r.value,icon:mT.medium,isToggleable:!0,label:this._getOptionLabelValue(r),withText:!0,class:"ck-resize-image-button",ariaLabel:d,ariaLabelledBy:void 0}),c.bind("label").to(a,"value",f=>f&&f.width?f.width:this._getOptionLabelValue(r)),l.bind("isEnabled").to(this),Hl(l,()=>this._getResizeDropdownListItemDefinitions(e,a),{ariaLabel:n("Image resize list"),role:"menu"}),this.listenTo(l,"execute",f=>{"onClick"in f.source?f.source.onClick():(t.execute(f.source.commandName,{width:f.source.commandValue}),t.editing.view.focus())}),l};t.ui.componentFactory.add("resizeImage",s),t.ui.componentFactory.add("imageResize",s)}_getOptionLabelValue(e,t=!1){const n=this.editor.t;
51return e.label?e.label:t?Cp(e)?n("Custom image size"):e.value?n("Resize image to %0",e.value+this._resizeUnit):n("Resize image to the original size"):Cp(e)?n("Custom"):e.value?e.value+this._resizeUnit:n("Original")}_getResizeDropdownListItemDefinitions(e,t){const{editor:n}=this,r=new Jn,s=e.map(o=>Cp(o)?{...o,valueWithUnits:"custom"}:o.value?{...o,valueWithUnits:`${o.value}${this._resizeUnit}`}:{...o,valueWithUnits:null});for(const o of s){let a=null;if(n.plugins.has("ImageCustomResizeUI")&&Cp(o)){const l=n.plugins.get("ImageCustomResizeUI");a={type:"button",model:new Fl({label:this._getOptionLabelValue(o),role:"menuitemradio",withText:!0,icon:null,onClick:()=>{l._showForm(this._resizeUnit)}})};const c=Object.values(s).map(d=>d.valueWithUnits);a.model.bind("isOn").to(t,"value",t,"isEnabled",q8e(c))}else a={type:"button",model:new Fl({commandName:"resizeImage",commandValue:o.valueWithUnits,label:this._getOptionLabelValue(o),role:"menuitemradio",withText:!0,icon:null})},a.model.bind("isOn").to(t,"value",t,"isEnabled",kS(o.valueWithUnits));a.model.bind("isEnabled").to(t,"isEnabled"),r.add(a)}return r}}function Cp(i){return i.value==="custom"}function kS(i){return(e,t)=>{const n=e;return n===void 0||!t?!1:i===null&&n===i?!0:n!==null&&n.width===i}}function q8e(i){return(e,t)=>!i.some(n=>kS(n)(e,t))}const $8e="figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img",pT="image_resized";class G8e extends be{static get requires(){return[eT,yr]}static get pluginName(){return"ImageResizeHandles"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(e),this._setupResizerCreator()}_setupResizerCreator(){const e=this.editor,t=e.editing.view,n=e.plugins.get("ImageUtils");t.addObserver(C4),this.listenTo(t.document,"imageLoaded",(r,s)=>{if(!s.target.matches($8e))return;const o=e.editing.view.domConverter,a=o.domToView(s.target),l=n.getImageWidgetFromImageView(a);let c=this.editor.plugins.get(eT).getResizerByViewElement(l);if(c){c.redraw();return}const d=e.editing.mapper,f=d.toModelElement(l);c=e.plugins.get(eT).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:f,viewElement:l,editor:e,getHandleHost(m){return m.querySelector("img")},getResizeHost(){return o.mapViewToDom(d.toViewElement(f))},isCentered(){return f.getAttribute("imageStyle")=="alignCenter"},onCommit(m){t.change(p=>{p.removeClass(pT,l)}),e.execute("resizeImage",{width:m})}}),c.on("updateSize",()=>{l.hasClass(pT)||t.change(p=>{p.addClass(pT,l)});const m=f.name==="imageInline"?a:l;m.getStyle("height")&&t.change(p=>{p.removeStyle("height",m)})}),c.bind("isEnabled").to(this)})}}function vX(i){if(!i)return null;const[,e,t]=i.trim().match(/([.,\d]+)(%|px)$/)||[],n=Number.parseFloat(e);return Number.isNaN(n)?null:{value:n,unit:t}}function wX(i,e,t){return t==="px"?{value:e.value,unit:"px"}:{value:e.value/i*100,unit:"%"}}function xX(i){const{editing:e}=i,n=i.plugins.get("ImageUtils").getClosestSelectedImageElement(i.model.document.selection);if(!n)return null;const r=e.mapper.toViewElement(n),s=e.view.domConverter.mapViewToDom(r);return{model:n,view:r,dom:s}}function Y8e(i,e){const t=xX(i);if(!t)return null;const n=vX(t.model.getAttribute("resizedWidth")||null);if(!n)return null;if(n.unit===e)return n;const r=b4(t.dom),s={value:new gt(t.dom).width};return wX(r,s,e)}class K8e extends Ge{focusTracker;keystrokes;unit;backButtonView;saveButtonView;labeledInput;children;_focusables;_focusCycler;_validators;constructor(e,t,n){super(e),this.focusTracker=new Fn,this.keystrokes=new qn,this.unit=t,this.backButtonView=this._createBackButton(),this.saveButtonView=this._createSaveButton(),this.labeledInput=this._createLabeledInputView(),this.children=this.createCollection([this._createHeaderView()]),this.children.add(new nr(e,{children:[this.labeledInput,this.saveButtonView],class:["ck-form__row_with-submit","ck-form__row_large-top-padding"]}
51)),this._focusables=new qi,this._validators=n,this.keystrokes.set("Esc",(r,s)=>{this.fire("cancel"),s()}),this._focusCycler=new or({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-image-custom-resize-form","ck-responsive-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Xc({view:this}),[this.backButtonView,this.labeledInput,this.saveButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createBackButton(){const e=this.locale.t,t=new nt(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:jc,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_createSaveButton(){const e=this.locale.t,t=new nt(this.locale);return t.set({label:e("Save"),withText:!0,type:"submit",class:"ck-button-action ck-button-bold"}),t}_createHeaderView(){const e=this.locale.t,t=new Wl(this.locale,{label:e("Image Resize")});return t.children.add(this.backButtonView,0),t}_createLabeledInputView(){const e=this.locale.t,t=new hi(this.locale,Hke);return t.label=e("Resize image (in %0)",this.unit),t.class="ck-labeled-field-view_full-width",t.fieldView.set({step:.1}),t}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.labeledInput.errorText=t,!1}return!0}resetFormStatus(){this.labeledInput.errorText=null}get rawSize(){const{element:e}=this.labeledInput.fieldView;return e?e.value:null}get parsedSize(){const{rawSize:e}=this;if(e===null)return null;const t=Number.parseFloat(e);return Number.isNaN(t)?null:t}get sizeWithUnits(){const{parsedSize:e,unit:t}=this;return e===null?null:`${e}${t}`}}function X8e(i,e){const t=xX(i);if(!t)return null;const n=b4(t.dom),r=vX(window.getComputedStyle(t.dom).minWidth)||{value:1},s=Math.max(.1,wX(n,r,e).value);return{unit:e,lower:s,upper:e==="px"?n:100}}class Q8e extends be{_balloon;_form;static get requires(){return[zo]}static get pluginName(){return"ImageCustomResizeUI"}static get isOfficialPlugin(){return!0}destroy(){super.destroy(),this._form&&this._form.destroy()}_createForm(e){const t=this.editor;this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(Mh(K8e))(t.locale,e,Z8e(t)),this._form.render(),this.listenTo(this._form,"submit",()=>{this._form.isValid()&&(t.execute("resizeImage",{width:this._form.sizeWithUnits}),this._hideForm(!0))}),this.listenTo(this._form.labeledInput,"change:errorText",()=>{t.ui.update()}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),Kc({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(e){if(this._isVisible)return;this._form||this._createForm(e);const t=this.editor,n=this._form.labeledInput;this._form.disableCssTransitions(),this._form.resetFormStatus(),this._isInBalloon||this._balloon.add({view:this._form,position:_4(t)});const r=Y8e(t,e),s=r?r.value.toFixed(1):"",o=X8e(t,e);n.fieldView.value=n.fieldView.element.value=s,o&&Object.assign(n.fieldView,{min:o.lower.toFixed(1),max:Math.ceil(o.upper).toFixed(1)}),this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}function Z8e(i){const e=i.t;return[t=>{if(t.rawSize.trim()==="")return e("The value must not be empty.");if(t.parsedSize===null)return e("The value should be a plain number.")}]}class J8e extends be{static get requires(){return[yX,G8e,Q8e,H8e]}static get pluginName(){return"ImageResize"}static get isOfficialPlugin(){return!0}}class eIe extends ut{_defaultStyles;_styles;constructor(e,t){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(t.map(n=>{if(n.isDefault)for(const r of n.modelElements)this._defaultStyles[r]=n.name;return[n.name,n]}))}refresh(){const n=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!n,this.isEnabled?n.hasAttribute("imageStyle")?this.value=n.getAttribute("imageStyle"):this.value=this._defaultStyles[n.name]:this.value=!1}execute(e={}){const t=this.editor,n=t.model,r=t.plugins.get("ImageUtils");n.change(s=>{const o=e.value,{setImageSizes:a=!0}=e;let l=r.getClosestSelectedImageElement(n.document.selection);o&&this.shouldConvertImageType(o,l)&&(this.editor.execute(r.isBlockImage(l)?"imageTypeInline":"imageTypeBlock",{setImageSizes:a}),l=r.getClosestSelectedImageElement(n.document.selection)),!o||this._styles.get(o).isDefault?s.removeAttribute("imageStyle",l):s.setAttribute("imageStyle",o,l),a&&r.setImageNaturalSizeAttributes(l)})}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}}const T1={get inline(){return{name:"inline",title:"In line",icon:$Y,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:r4,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:GY,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:Zw,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:Jw,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:YY,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:Zw,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:Jw,modelElements:["imageBlock"],className:"image-style-side"}}},tIe={full:UTe,left:GY,right:YY,center:Zw,inlineLeft:r4,inlineRight:Jw,inline:$Y},nIe=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function iIe(i){return(i.configuredStyles.options||[]).map(n=>oIe(n)).filter(n=>aIe(n,i))}function rIe(i,e){return i&&e?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:i?{options:["block","side"]}:e?{options:["inline","alignLeft","alignRight"]}:{}}function sIe(i){return i.has("ImageBlockEditing")&&i.has("ImageInlineEditing")?[...nIe]:[]}function oIe(i){return typeof i=="string"?T1[i]?i={...T1[i]}:i={name:i}
51:i=lIe(T1[i.name],i),typeof i.icon=="string"&&(i.icon=tIe[i.icon]||i.icon),i}function aIe(i,{isBlockPluginLoaded:e,isInlinePluginLoaded:t}){const{modelElements:n,name:r}=i;if(!n||!n.length||!r)return _X({style:i}),!1;{const s=[e?"imageBlock":null,t?"imageInline":null];if(!n.some(o=>s.includes(o)))return Kt("image-style-missing-dependency",{style:i,missingPlugins:n.map(o=>o==="imageBlock"?"ImageBlockEditing":"ImageInlineEditing")}),!1}return!0}function lIe(i,e){const t={...e};for(const n in i)Object.prototype.hasOwnProperty.call(e,n)||(t[n]=i[n]);return t}function _X(i){Kt("image-style-configuration-definition-invalid",i)}const cx={normalizeStyles:iIe,getDefaultStylesConfiguration:rIe,getDefaultDropdownDefinitions:sIe,warnInvalidStyle:_X};function cIe(i){return(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const r=SS(t.attributeNewValue,i),s=SS(t.attributeOldValue,i),o=n.mapper.toViewElement(t.item),a=n.writer;s&&a.removeClass(s.className,o),r&&a.addClass(r.className,o)}}function uIe(i){const e={imageInline:i.filter(t=>!t.isDefault&&t.modelElements.includes("imageInline")),imageBlock:i.filter(t=>!t.isDefault&&t.modelElements.includes("imageBlock"))};return(t,n,r)=>{if(!n.modelRange)return;const s=n.viewItem,o=Rn(n.modelRange.getItems());if(o&&r.schema.checkAttribute(o,"imageStyle")){for(const a of e[o.name])r.consumable.consume(s,{classes:a.className})&&r.writer.setAttribute("imageStyle",a.name,o);dIe(r,s,o,i)}}}function dIe(i,e,t,n){if(!i.consumable.test(e,{styles:["float"]}))return;let r=null;switch(e.getStyle("float")){case"left":r="alignLeft";break;case"right":r="alignRight";break}if(!r)return;const s=SS(r,n);if(!s)return;const o=T1[s.name];n8e(s,o)&&(i.writer.setAttribute("imageStyle",r,t),i.consumable.consume(e,{styles:["float"]}))}function SS(i,e){for(const t of e)if(t.name===i)return t}class CX extends be{static get pluginName(){return"ImageStyleEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[yr]}normalizedStyles;init(){const e=this.editor,t=e.plugins.has("ImageBlockEditing"),n=e.plugins.has("ImageInlineEditing");e.config.define("image.styles",cx.getDefaultStylesConfiguration(t,n)),this.normalizedStyles=cx.normalizeStyles({configuredStyles:e.config.get("image.styles"),isBlockPluginLoaded:t,isInlinePluginLoaded:n}),this._setupConversion(t,n),this._setupPostFixer(),e.commands.add("imageStyle",new eIe(e,this.normalizedStyles))}_setupConversion(e,t){const n=this.editor,r=n.model.schema,s=cIe(this.normalizedStyles),o=uIe(this.normalizedStyles);n.editing.downcastDispatcher.on("attribute:imageStyle",s),n.data.downcastDispatcher.on("attribute:imageStyle",s),e&&(r.extend("imageBlock",{allowAttributes:"imageStyle"}),r.setAttributeProperties("imageStyle",{isFormatting:!0}),n.data.upcastDispatcher.on("element:figure",o,{priority:"low"})),t&&(r.extend("imageInline",{allowAttributes:"imageStyle"}),r.setAttributeProperties("imageStyle",{isFormatting:!0}),n.data.upcastDispatcher.on("element:img",o,{priority:"low"}))}_setupPostFixer(){const e=this.editor,t=e.model.document,n=e.plugins.get(yr),r=new Map(this.normalizedStyles.map(s=>[s.name,s]));t.registerPostFixer(s=>{let o=!1;for(const a of t.differ.getChanges())if(a.type=="insert"||a.type=="attribute"&&a.attributeKey=="imageStyle"){let l=a.type=="insert"?a.position.nodeAfter:a.range.start.nodeAfter;if(l&&l.is("element","paragraph")&&l.childCount>0&&(l=l.getChild(0)),!n.isImage(l))continue;const c=l.getAttribute("imageStyle");if(!c)continue;const d=r.get(c);(!d||!d.modelElements.includes(l.name))&&(s.removeAttribute("imageStyle",l),o=!0)}return o})}}class fIe extends be{static get requires(){return[CX]}static get pluginName(){return"ImageStyleUI"}static get isOfficialPlugin(){return!0}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=this.editor.plugins,t=this.editor.config.get("image.toolbar")||[],n=e.get("ImageStyleEditing"),r=NL(n.normalizedStyles,this.localizedDefaultStylesTitles);for(const o of r)this._createButton(o);const s=NL([...t.filter(Nr),...cx.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const o of s)this._createDropdown(o,r)}_createDropdown(e,t){const n=this.editor.ui.componentFactory;n.add(e.name,r=>{let s;const{defaultItem:o,items:a,title:l}=e,c=a.filter(p=>t.find(({name:g})=>BL(g)===p)).map(p=>{const g=n.create(p);return p===o&&(s=g),g});
51a.length!==c.length&&cx.warnInvalidStyle({dropdown:e});const d=zi(r,rm),f=d.buttonView,m=f.arrowView;return A0(d,c,{enableActiveItemFocusOnDropdownOpen:!0}),f.set({label:ML(l,s.label),class:null,tooltip:!0}),m.unbind("label"),m.set({label:l}),f.bind("icon").toMany(c,"isOn",(...p)=>{const g=p.findIndex(cp);return g<0?s.icon:c[g].icon}),f.bind("label").toMany(c,"isOn",(...p)=>{const g=p.findIndex(cp);return ML(l,g<0?s.label:c[g].label)}),f.bind("isOn").toMany(c,"isOn",(...p)=>p.some(cp)),f.bind("class").toMany(c,"isOn",(...p)=>p.some(cp)?"ck-splitbutton_flatten":void 0),f.on("execute",()=>{c.some(({isOn:p})=>p)?d.isOpen=!d.isOpen:s.fire("execute")}),d.bind("isEnabled").toMany(c,"isEnabled",(...p)=>p.some(cp)),this.listenTo(d,"execute",()=>{this.editor.editing.view.focus()}),d})}_createButton(e){const t=e.name;this.editor.ui.componentFactory.add(BL(t),n=>{const r=this.editor.commands.get("imageStyle"),s=new nt(n);return s.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),s.bind("isEnabled").to(r,"isEnabled"),s.bind("isOn").to(r,"value",o=>o===t),s.on("execute",this._executeCommand.bind(this,t)),s})}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function NL(i,e){for(const t of i)e[t.title]&&(t.title=e[t.title]);return i}function BL(i){return`imageStyle:${i}`}function ML(i,e){return(i?i+": ":"")+e}class hIe extends be{static get requires(){return[CX,fIe]}static get pluginName(){return"ImageStyle"}static get isOfficialPlugin(){return!0}}class mIe extends be{static get requires(){return[ix,yr]}static get pluginName(){return"ImageToolbar"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,t=e.t,n=e.plugins.get(ix),r=e.plugins.get("ImageUtils");n.register("image",{ariaLabel:t("Image toolbar"),items:pIe(e.config.get("image.toolbar")||[]),getRelatedElement:s=>r.getClosestSelectedImageWidget(s)})}}function pIe(i){return i.map(e=>Nr(e)?e.name:e)}class gIe extends be{static get pluginName(){return"IndentEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.commands.add("indent",new HM(e)),e.commands.add("outdent",new HM(e))}}class bIe extends be{static get pluginName(){return"IndentUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale,n=e.t,r=t.uiLanguageDirection=="ltr"?JM:e7,s=t.uiLanguageDirection=="ltr"?e7:JM;this._defineButton("indent",n("Increase indent"),r),this._defineButton("outdent",n("Decrease indent"),s)}_defineButton(e,t,n){const r=this.editor;r.ui.componentFactory.add(e,()=>{const s=this._createButton(nt,e,t,n);return s.set({tooltip:!0}),s}),r.ui.componentFactory.add("menuBar:"+e,()=>this._createButton(gn,e,t,n))}_createButton(e,t,n,r){const s=this.editor,o=s.commands.get(t),a=new e(s.locale);return a.set({label:n,icon:r}),a.bind("isEnabled").to(o,"isEnabled"),this.listenTo(a,"execute",()=>{s.execute(t),s.editing.view.focus()}),a}}class yIe extends be{static get pluginName(){return"Indent"}static get isOfficialPlugin(){return!0}static get requires(){return[gIe,bIe]}}class Uy extends ut{_indentBehavior;constructor(e,t){super(e),this._indentBehavior=t}refresh(){const t=this.editor.model,n=Rn(t.document.selection.getSelectedBlocks());if(!n||!this._isIndentationChangeAllowed(n)){this.isEnabled=!1;return}this.isEnabled=this._indentBehavior.checkEnabled(n.getAttribute("blockIndent"))}execute(){const e=this.editor.model,t=this._getBlocksToChange();e.change(n=>{for(const r of t){const s=r.getAttribute("blockIndent"),o=this._indentBehavior.getNextIndent(s);o?n.setAttribute("blockIndent",o,r):n.removeAttribute("blockIndent",r)}})}_getBlocksToChange(){const t=this.editor.model.document.selection;return Array.from(t.getSelectedBlocks()).filter(r=>this._isIndentationChangeAllowed(r))}_isIndentationChangeAllowed(e){const t=this.editor;return t.model.schema.checkAttribute(e,"blockIndent")?!t.plugins.has("ListUtils")||!this._indentBehavior.isForward?!0:!t.plugins.get("ListUtils").isListItemBlock(e):!1}}class LL{isForward;offset;unit;constructor(e){this.isForward=e.direction==="forward",this.offset=e.offset,this.unit=e.unit}checkEnabled(e){const t=parseFloat(e||"0");return this.isForward||t>0}getNextIndent(e){const t=parseFloat(e||"0");if(!(!e||e.endsWith(this.unit)))return this.isForward?this.offset+this.unit:void 0;const r=this.isForward?this.offset:-this.offset,s=t+r;return s>0?s+this.unit:void 0}}class UL{isForward;classes;constructor(e){this.isForward=e.direction==="forward",this.classes=e.classes}checkEnabled(e){const t=this.classes.indexOf(e);return this.isForward?t<this.classes.length-1:t>=0}getNextIndent(e){const t=this.classes.indexOf(e),n=this.isForward?1:-1;return this.classes[t+n]}}const vIe=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];class wIe extends be{constructor(e){super(e),e.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.config.get("indentBlock");t.classes&&t.classes.length?(this._setupConversionUsingClasses(t.classes),e.commands.add("indentBlock",new Uy(e,new UL({direction:"forward",classes:t.classes}
51))),e.commands.add("outdentBlock",new Uy(e,new UL({direction:"backward",classes:t.classes})))):(e.data.addStyleProcessorRules(OY),this._setupConversionUsingOffset(),e.commands.add("indentBlock",new Uy(e,new LL({direction:"forward",offset:t.offset,unit:t.unit}))),e.commands.add("outdentBlock",new Uy(e,new LL({direction:"backward",offset:t.offset,unit:t.unit}))))}afterInit(){const e=this.editor,t=e.model.schema,n=e.commands.get("indent"),r=e.commands.get("outdent"),s=e.config.get("heading.options");(s&&s.map(l=>l.model)||vIe).forEach(l=>{t.isRegistered(l)&&t.extend(l,{allowAttributes:"blockIndent"})}),t.setAttributeProperties("blockIndent",{isFormatting:!0}),n.registerChildCommand(e.commands.get("indentBlock")),r.registerChildCommand(e.commands.get("outdentBlock"))}_setupConversionUsingOffset(){const e=this.editor.conversion,n=this.editor.locale.contentLanguageDirection==="rtl"?"margin-right":"margin-left";e.for("upcast").attributeToAttribute({view:{styles:{[n]:/[\s\S]+/}},model:{key:"blockIndent",value:r=>{if(!r.is("element","li"))return r.getStyle(n)}}}),e.for("downcast").attributeToAttribute({model:"blockIndent",view:r=>({key:"style",value:{[n]:r}})})}_setupConversionUsingClasses(e){const t={model:{key:"blockIndent",values:[]},view:{}};for(const n of e)t.model.values.push(n),t.view[n]={key:"class",value:[n]};this.editor.conversion.attributeToAttribute(t)}}class xIe{_definitions=new Set;get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach(t=>this._definitions.add(t)):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",(t,n,r)=>{if(!r.consumable.test(n.item,"attribute:linkHref")||!(n.item.is("selection")||r.schema.isInline(n.item)))return;const s=r.writer,o=s.document.selection;for(const a of this._definitions){const l=s.createAttributeElement("a",a.attributes,{priority:5});a.classes&&s.addClass(a.classes,l);for(const c in a.styles)s.setStyle(c,a.styles[c],l);s.setCustomProperty("link",!0,l),a.callback(n.attributeNewValue)?n.item.is("selection")?s.wrap(o.getFirstRange(),l):s.wrap(r.mapper.toViewRange(n.range),l):s.unwrap(r.mapper.toViewRange(n.range),l)}},{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",(t,n,{writer:r,mapper:s})=>{const o=s.toViewElement(n.item),a=Array.from(o.getChildren()).find(l=>l.is("element","a"));if(a)for(const l of this._definitions){const c=ka(l.attributes);if(l.callback(n.attributeNewValue)){for(const[d,f]of c)d==="class"?r.addClass(f,a):r.setAttribute(d,f,a);l.classes&&r.addClass(l.classes,a);for(const d in l.styles)r.setStyle(d,l.styles[d],a)}else{for(const[d,f]of c)d==="class"?r.removeClass(f,a):r.removeAttribute(d,a);l.classes&&r.removeClass(l.classes,a);for(const d in l.styles)r.removeStyle(d,a)}}})}}}const _Ie=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,CIe="^(?:(?:<protocols>):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))",DIe=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,EIe=/^((\w+:(\/{2,})?)|(\W))/i,TIe=["https?","ftps?","mailto"],Vy="Ctrl+K";function AIe(i){return i.is("attributeElement")&&!!i.getCustomProperty("link")}function VL(i,{writer:e}){const t=e.createAttributeElement("a",{href:i},{priority:5});return e.setCustomProperty("link",!0,t),t}function DX(i,e=TIe){const t=String(i),n=e.join("|"),r=new RegExp(`${CIe.replace("<protocols>",n)}`,"i");return kIe(t,r)?t:"#"}function kIe(i,e){return!!i.replace(_Ie,"").match(e)}function SIe(i,e){const t={"Open in a new tab":i("Open in a new tab"),Downloadable:i("Downloadable")};return e.forEach(n=>("label"in n&&t[n.label]&&(n.label=t[n.label]),n)),e}function PIe(i){const e=[];if(i)for(const[t,n]of Object.entries(i)){const r=Object.assign({},n,{id:`link${Cxe(t)}`});e.push(r)}return e}function PS(i,e){return i?e.checkAttribute(i.name,"linkHref"):!1}function IIe(i){return DIe.test(i)}function D4(i,e){const t=IIe(i)?"mailto:":e,n=!!t&&!EX(i);return i&&n?t+i:i}function EX(i){return EIe.test(i)}function RIe(i){window.open(i,"_blank","noopener")}function IS(i){let e="";for(const t of i.getItems()){if(!t.is("$text")&&!t.is("$textProxy"))return;e+=t.data}return e}class FIe extends ut{manualDecorators=new Jn;automaticDecorators=new xIe;restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document.selection,n=t.getSelectedElement()||Rn(t.getSelectedBlocks());PS(n,e.schema)?(this.value=n.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(n,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref"));for(const r of this.manualDecorators)r.value=this._getDecoratorStateFromModel(r.id)}
51execute(e,t={},n){const r=this.editor.model,s=r.document.selection,o=[],a=[];for(const l in t)t[l]?o.push(l):a.push(l);r.change(l=>{const c=m=>{l.setAttribute("linkHref",e,m),o.forEach(p=>l.setAttribute(p,!0,m)),a.forEach(p=>l.removeAttribute(p,m))},d=(m,p)=>{const g=IS(m);if(!g)return m;let y=n;if(y||(y=p&&p==g?e:g),y!=g){const v=l.createDocumentFragment();for(const E of m.getItems()){const T=E;l.append(l.createText(T.data,T.getAttributes()),v)}const x=l.createRangeIn(v),C=OIe(g,y);let D=0;for(const{offset:E,actual:T,expected:S}of C){const A=E+D,I=l.createRange(x.start.getShiftedBy(A),x.start.getShiftedBy(A+T.length)),O=NIe(I,x).getAttributes(),j=Array.from(O).filter(([U])=>r.schema.getAttributeProperties(U).isFormatting),B=l.createText(S,j);c(B),l.remove(I),l.insert(B,I.start),D+=S.length}return r.insertContent(v,m),l.createRange(m.start,m.start.getShiftedBy(y.length))}},f=m=>{const{plugins:p}=this.editor;if(l.setSelection(m.end),p.has("TwoStepCaretMovement"))p.get("TwoStepCaretMovement")._handleForwardMovement();else for(const g of["linkHref",...o,...a])l.removeSelectionAttribute(g)};if(s.isCollapsed){const m=s.getFirstPosition();if(s.hasAttribute("linkHref")){const p=s.getAttribute("linkHref"),g=k_(m,"linkHref",p,r),y=d(g,p);c(y||g),y&&f(y)}else if(e!==""){const p=ka(s.getAttributes());p.set("linkHref",e),o.forEach(y=>{p.set(y,!0)});const g=r.insertContent(l.createText(n||e,p),m);f(g)}}else{const m=Array.from(s.getRanges()),p=r.schema.getValidRanges(m,"linkHref"),g=[];for(const x of s.getSelectedBlocks())r.schema.checkAttribute(x,"linkHref")&&g.push(l.createRangeOn(x));const y=g.slice();for(const x of p)this._isRangeToUpdate(x,g)&&y.push(x);const v=m.map(x=>({start:di.fromPosition(x.start,"toPrevious"),end:di.fromPosition(x.end,"toNext")}));for(let x of y){const C=(x.start.textNode||x.start.nodeAfter).getAttribute("linkHref");x=d(x,C)||x,c(x)}l.setSelection(v.map(x=>{const C=x.start.toPosition(),D=x.end.toPosition();return x.start.detach(),x.end.detach(),r.createRange(C,D)}))}})}_getDecoratorStateFromModel(e){const t=this.editor.model,n=t.document.selection,r=n.getSelectedElement();return PS(r,t.schema)?r.getAttribute(e):n.getAttribute(e)}_isRangeToUpdate(e,t){for(const n of t)if(n.containsRange(e))return!1;return!0}}function OIe(i,e){const t=uh(i,e),n={equal:0,insert:0,delete:0},r=[];let s="",o="";for(const a of[...t,null])a=="insert"?o+=e[n.equal+n.insert]:a=="delete"?s+=i[n.equal+n.delete]:(s.length||o.length)&&(r.push({offset:n.equal,actual:s,expected:o}),s="",o=""),a&&n[a]++;return r}function NIe(i,e){if(!i.isCollapsed)return Rn(i.getItems());const t=i.start;return t.textNode?t.textNode:!t.nodeBefore||t.isEqual(e.start)?t.nodeAfter:t.nodeBefore}class BIe extends ut{refresh(){const e=this.editor.model,t=e.document.selection,n=t.getSelectedElement();PS(n,e.schema)?this.isEnabled=e.schema.checkAttribute(n,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,n=t.document.selection,r=e.commands.get("link");t.change(s=>{const o=n.isCollapsed?[k_(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),t)]:t.schema.getValidRanges(n.getRanges(),"linkHref");for(const a of o)if(s.removeAttribute("linkHref",a),r)for(const l of r.manualDecorators)s.removeAttribute(l.id,a)})}}class MIe extends hn(){id;defaultValue;label;attributes;classes;styles;constructor({id:e,label:t,attributes:n,classes:r,styles:s,defaultValue:o}){super(),this.id=e,this.set("value",void 0),this.defaultValue=o,this.label=t,this.attributes=n,this.classes=r,this.styles=s}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}const LIe="ck-link_selected",jL="automatic",UIe="manual",VIe=/^(https?:)?\/\//;class ux extends be{_linkOpeners=[];static get pluginName(){return"LinkEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[tx,kK,Ls]}constructor(e){super(e),e.config.define("link",{allowCreatingEmptyLinks:!1,addTargetToExternalLinks:!1,toolbar:["linkPreview","|","editLink","linkProperties","unlink"]})}init(){const e=this.editor,t=this.editor.config.get("link.allowedProtocols");e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:VL}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(s,o)=>VL(DX(s,t),o)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:s=>s.getAttribute("href")}}),e.commands.add("link",new FIe(e)),e.commands.add("unlink",new BIe(e));const n=SIe(e.t,PIe(e.config.get("link.decorators")));this._enableAutomaticDecorators(n.filter(s=>s.mode===jL)),this._enableManualDecorators(n.filter(s=>s.mode===UIe)),e.plugins.get(tx).registerAttribute("linkHref"),FK(e,"linkHref","a",LIe),this._enableLinkOpen(),this._enableSelectionAttributesFixer(),this._enableClipboardIntegration()}_registerLinkOpener(e){this._linkOpeners.push(e)}_enableAutomaticDecorators(e){const t=this.editor,r=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&r.add({id:"linkIsExternal",mode:jL,callback:s=>!!s&&VIe.test(s),attributes:{target:"_blank",rel:"noopener noreferrer"}}),r.add(e),r.length&&t.conversion.for("downcast").add(r.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,r=t.commands.get("link").manualDecorators;e.forEach(s=>{t.model.schema.extend("$text",{allowAttributes:s.id});const o=new MIe(s);r.add(o),t.conversion.for("downcast").attributeToElement({model:o.id,view:(a,{writer:l,schema:c},{item:d})=>{if((d.is("selection")||c.isInline(d))&&a){const f=l.createAttributeElement("a",o.attributes,{priority:5});o.classes&&l.addClass(o.classes,f);for(const m in o.styles)l.setStyle(m,o.styles[m],f);return l.setCustomProperty("link",!0,f),f}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...o._createPattern()},model:{key:o.id}})})}_enableLinkOpen(){const e=this.editor,n=e.editing.view.document,r=s=>{this._linkOpeners.some(o=>o(s))||RIe(s)};this.listenTo(n,"click",(s,o)=>
51{if(!(ot.isMac?o.domEvent.metaKey:o.domEvent.ctrlKey))return;let l=o.domTarget;if(l.tagName.toLowerCase()!="a"&&(l=l.closest("a")),!l)return;const c=l.getAttribute("href");c&&(s.stop(),o.preventDefault(),r(c))},{context:"$capture"}),this.listenTo(n,"keydown",(s,o)=>{const l=e.commands.get("link").value;l&&o.keyCode===At.enter&&o.altKey&&(s.stop(),r(l))})}_enableSelectionAttributesFixer(){const t=this.editor.model,n=t.document.selection;this.listenTo(n,"change:attribute",(r,{attributeKeys:s})=>{!s.includes("linkHref")||n.hasAttribute("linkHref")||t.change(o=>{jIe(o,zIe(t.schema))})})}_enableClipboardIntegration(){const e=this.editor,t=e.model,n=this.editor.config.get("link.defaultProtocol");n&&this.listenTo(e.plugins.get("ClipboardPipeline"),"contentInsertion",(r,s)=>{t.change(o=>{const a=o.createRangeIn(s.content);for(const l of a.getItems())if(l.hasAttribute("linkHref")){const c=D4(l.getAttribute("linkHref"),n);o.setAttribute("linkHref",c,l)}})})}}function jIe(i,e){i.removeSelectionAttribute("linkHref");for(const t of e)i.removeSelectionAttribute(t)}function zIe(i){return i.getDefinition("$text").allowAttributes.filter(t=>t.startsWith("link"))}class WIe extends nt{constructor(e){super(e);const t=this.bindTemplate;this.set({href:void 0,withText:!0}),this.extendTemplate({attributes:{class:["ck-link-toolbar__preview"],href:t.to("href"),target:"_blank",rel:"noopener noreferrer"},on:{click:t.to(n=>{if(this.href){const r=()=>n.preventDefault();this.fire("navigate",this.href,r)}})}}),this.template.tag="a"}}class HIe extends Ge{focusTracker=new Fn;keystrokes=new qn;backButtonView;saveButtonView;
51displayedTextInputView;urlInputView;children;providersListChildren;_validators;_focusables=new qi;_focusCycler;constructor(e,t){super(e),this._validators=t,this.backButtonView=this._createBackButton(),this.saveButtonView=this._createSaveButton(),this.displayedTextInputView=this._createDisplayedTextInput(),this.urlInputView=this._createUrlInput(),this.providersListChildren=this.createCollection(),this.children=this.createCollection([this._createHeaderView()]),this._createFormChildren(),this.listenTo(this.providersListChildren,"add",()=>{this.stopListening(this.providersListChildren,"add"),this.children.add(this._createProvidersListView())}),this._focusCycler=new or({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-link-form","ck-responsive-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Xc({view:this}),[this.urlInputView,this.saveButtonView,...this.providersListChildren,this.backButtonView,this.displayedTextInputView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null}_createBackButton(){const e=this.locale.t,t=new nt(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:jc,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_createSaveButton(){const e=this.locale.t,t=new nt(this.locale);return t.set({label:e("Insert"),tooltip:!1,withText:!0,type:"submit",class:"ck-button-action ck-button-bold"}),t}_createHeaderView(){const e=this.locale.t,t=new Wl(this.locale,{label:e("Link")});return t.children.add(this.backButtonView,0),t}_createProvidersListView(){const e=new vd(this.locale);return e.extendTemplate({attributes:{class:["ck-link-form__providers-list"]}}),e.items.bindTo(this.providersListChildren).using(t=>{const n=new ho(this.locale);return n.children.add(t),n}),e}_createDisplayedTextInput(){const e=this.locale.t,t=new hi(this.locale,Is);return t.label=e("Displayed text"),t.class="ck-labeled-field-view_full-width",t}_createUrlInput(){const e=this.locale.t,t=new hi(this.locale,Is);return t.fieldView.inputMode="url",t.label=e("Link URL"),t.class="ck-labeled-field-view_full-width",t}_createFormChildren(){this.children.add(new nr(this.locale,{children:[this.displayedTextInputView],class:["ck-form__row_large-top-padding"]})),this.children.add(new nr(this.locale,{children:[this.urlInputView,this.saveButtonView],class:["ck-form__row_with-submit","ck-form__row_large-top-padding","ck-form__row_large-bottom-padding"]}))}get url(){const{element:e}=this.urlInputView.fieldView;return e?e.value.trim():null}}class qIe extends Ge{focusTracker=new Fn;keystrokes=new qn;backButtonView;listView;listChildren;emptyListInformation;children;_focusables=new qi;_focusCycler;constructor(e){super(e),this.listChildren=this.createCollection(),this.backButtonView=this._createBackButton(),this.listView=this._createListView(),this.emptyListInformation=this._createEmptyLinksListItemView(),this.children=this.createCollection([this._createHeaderView(),this.emptyListInformation]),this.set("title",""),this.set("emptyListPlaceholder",""),this.set("hasItems",!1),this.listenTo(this.listChildren,"change",()=>{this.hasItems=this.listChildren.length>0}),this.on("change:hasItems",(t,n,r)=>{r?(this.children.remove(this.emptyListInformation),this.children.add(this.listView)):(this.children.remove(this.listView),this.children.add(this.emptyListInformation))}),this.keystrokes.set("Esc",(t,n)=>{this.fire("cancel"),n()}),this._focusCycler=new or({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-providers"],tabindex:"-1"},children:this.children})}render(){super.render(),[this.listView,this.backButtonView].forEac
51h(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createListView(){const e=new vd(this.locale);return e.extendTemplate({attributes:{class:["ck-link-providers__list"]}}),e.items.bindTo(this.listChildren).using(t=>{const n=new ho(this.locale);return n.children.add(t),n}),e}_createBackButton(){const e=this.locale.t,t=new nt(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:jc,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_createHeaderView(){const e=new Wl(this.locale);return e.bind("label").to(this,"title"),e.children.add(this.backButtonView,0),e}_createEmptyLinksListItemView(){const e=new Ge(this.locale);return e.setTemplate({tag:"p",attributes:{class:["ck","ck-link__empty-list-info"]},children:[{text:this.bindTemplate.to("emptyListPlaceholder")}]}),e}}class $Ie extends Ge{focusTracker=new Fn;keystrokes=new qn;backButtonView;children;listChildren;_focusables=new qi;_focusCycler;constructor(e){super(e),this.backButtonView=this._createBackButton(),this.listChildren=this.createCollection(),this.children=this.createCollection([this._createHeaderView(),this._createListView()]),this._focusCycler=new or({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-properties"],tabindex:"-1"},children:this.children}),this.keystrokes.set("Esc",(t,n)=>{this.fire("back"),n()})}render(){super.render(),[...this.listChildren,this.backButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBackButton(){const e=this.locale.t,t=new nt(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:jc,tooltip:!0}),t.delegate("execute").to(this,"back"),t}_createHeaderView(){const e=this.locale.t,t=new Wl(this.locale,{label:e("Link properties")});return t.children.add(this.backButtonView,0),t}_createListView(){const e=new vd(this.locale);return e.extendTemplate({attributes:{class:["ck-link__list"]}}),e.items.bindTo(this.listChildren).using(t=>{const n=new ho(this.locale);return n.children.add(t),n}),e}}class GIe extends nt{arrowView;constructor(e){super(e),this.set({withText:!0}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-link__button"]}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Go;return e.content=qY,e}}const na="link-ui";class YIe extends be{toolbarView=null;formView=null;linkProviderItemsView=null;propertiesView=null;_balloon;_linksProviders=new Jn;static get requires(){return[zo,ux]}static get pluginName(){return"LinkUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t;this.set("selectedLinkableText",void 0),e.editing.view.addObserver(_Ee),this._balloon=e.plugins.get(zo),this._registerComponents(),this._registerEditingOpeners(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:na,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:na,view:(n,{writer:r})=>{if(!n.markerRange.isCollapsed)return null;const s=r.createUIElement("span");return r.addClass(["ck-fake-link-selection","ck-fake-link-selection_collapsed"],s),s}}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Create link"),keystroke:Vy},{label:t("Move out of a link"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}destroy(){super.destroy(),this.propertiesView&&this.propertiesView.destroy(),this.formView&&this.formView.destroy(),this.toolbarView&&this.toolbarView.destroy(),this.linkProviderItemsView&&this.linkProviderItemsView.destroy()}registerLinksListProvider(e){const t=this._linksProviders.filter(n=>(n.order||0)<=(e.order||0)).length;this._linksProviders.add(e,t)}_createViews(){const e=this.editor.commands.get("link");this.toolbarView=this._createToolbarView(),this.formView=this._createFormView(),e.manualDecorators.length&&(this.propertiesView=this._createPropertiesView()),this._enableUserBalloonInteractions()}_createToolbarView(){const e=this.editor,t=new ud(e.locale),n=e.commands.get("link");t.class="ck-link-toolbar";let r=e.config.get("link.toolbar");return n.manualDecorators.length||(r=r.filter(s=>s!=="linkProperties")),t.fillFromConfig(r,e.ui.componentFactory),t.keystrokes.set("Esc",(s,o)=>{this._hideUI(),o()}),t.keystrokes.set(Vy,(s,o)=>{this._addFormView(),o()}),e.ui.addToolbar(t,{isContextual:!0,beforeFocus:()=>{this._getSelectedLinkElement()&&!this._isToolbarVisible&&this._showUI(!0)},afterBlur:()=>{this._hideUI(!1)}}),t}_createFormView(){const e=this.editor,t=e.locale.t,n=e.commands.get("link"),r=e.config.get("link.defaultProtocol"),s=new(Mh(HIe))(e.locale,KIe(e));return s.displayedTextInputView.bind("isEnabled").to(this,"selectedLinkableText",o=>o!==void 0),s.urlInputView.bind("isEnabled").to(n,"isEnabled"),s.saveButtonView.bind("isEnabled").to(n,"isEnabled"),s.saveButtonView.bind("label").to(n,"value",o=>t(o?"Update":"Insert")),this.listenTo(s,"submit",()=>{if(s.isValid()){const o=s.urlInputView.fieldView.element.value,a=D4(o,r),l=s.displayedTextInputView.fieldView.element.value;e.execute("link",a,this._getDecoratorSwitchesState(),l!==this.selectedLinkableText?l:void 0),this._closeFormView()}}),this.listenTo(s.urlInputView,"change:errorText",()=>{e.ui.update()}),this.listenTo(s,"cancel",()=>{this._closeFormView()}),s.keystrokes.set("Esc",(o,a)=>{this._closeFormView(),a()}),s.providersListChildren.bindTo(this._linksProviders).using(o=>this._createLinksListProviderButton(o)),s}_createLinkProviderListView(e){return e.getListItems().map(({href:t,label:n,icon:r})=>{const s=new nt;return s.set({label:n,icon:r,tooltip:!1,withText:!0}),s.on("execute",()=>{this.formView.resetFormStatus(),this.formView.urlInputView.fieldView.value=t,this.editor.editing.view.focus(),this._removeLinksProviderView(),this.formView.focus()}),s})}_createLinkProviderItemsView(e){const t=this.editor,n=t.locale.t,r=new qIe(t.locale),{emptyListPlaceholder:s,label:o}=e;return r.emptyListPlaceholder=s||n("No links available"),r.title=o,this.listenTo(r,"cancel",()=>{t.editing.view.focus(),this._removeLinksProviderView(),this.formView.focus()}),r}_createPropertiesView(){const e=this.editor,t=this.editor.commands.get("link"),n=new(Mh($Ie))(e.locale);return this.listenTo(n,"back",()=>{e.editing.view.focus(),this._removePropertiesView()}),n.listChildren.bindTo(t.manualDecorators).using(r=>{const s=new Lh(e.locale);return s.set({label:r.label,withText:!0}),s.bind("isOn").toMany([r,t],"value",(o,a)=>a===void 0&&o===void 0?!!r.defaultValue:!!o),s.on("execute",()=>{r.set("value",!s.isOn),e.execute("link",t.value,this._getDecoratorSwitchesState())}),s}),n}_getDecoratorSwitchesState(){const e=this.editor.commands.get("link");return Array.from(e.manualDecorators).reduce((t,n)=>{const r=e.value===void 0&&n.value===void 0?n.defaultValue:n.value;
51return{...t,[n.id]:!!r}},{})}_registerEditingOpeners(){this.editor.plugins.get(ux)._registerLinkOpener(t=>{const n=this._getLinkProviderLinkByHref(t);if(!n)return!1;const{item:r,provider:s}=n;return s.navigate?s.navigate(r):!1})}_registerComponents(){const e=this.editor;e.ui.componentFactory.add("link",()=>{const t=this._createButton(nt);return t.set({tooltip:!0}),t}),e.ui.componentFactory.add("menuBar:link",()=>{const t=this._createButton(gn);return t.set({role:"menuitemcheckbox"}),t}),e.ui.componentFactory.add("linkPreview",t=>{const n=new WIe(t),r=e.config.get("link.allowedProtocols"),s=e.commands.get("link"),o=t.t;n.bind("isEnabled").to(s,"value",l=>!!l),n.bind("href").to(s,"value",l=>l&&DX(l,r));const a=l=>{if(!l){n.label=void 0,n.icon=void 0,n.tooltip=o("Open link in new tab");return}const c=this._getLinkProviderLinkByHref(l);if(c){const{label:d,tooltip:f,icon:m}=c.item;n.label=d,n.tooltip=f||!1,n.icon=m}else n.label=l,n.icon=void 0,n.tooltip=o("Open link in new tab")};return a(s.value),this.listenTo(s,"change:value",(l,c,d)=>{a(d)}),this.listenTo(n,"navigate",(l,c,d)=>{const f=this._getLinkProviderLinkByHref(c);if(!f)return;const{provider:m,item:p}=f,{navigate:g}=m;g&&g(p)&&(l.stop(),d())}),n}),e.ui.componentFactory.add("unlink",t=>{const n=e.commands.get("unlink"),r=new nt(t),s=t.t;return r.set({label:s("Unlink"),icon:bAe,tooltip:!0}),r.bind("isEnabled").to(n),this.listenTo(r,"execute",()=>{e.execute("unlink"),this._hideUI()}),r}),e.ui.componentFactory.add("editLink",t=>{const n=e.commands.get("link"),r=new nt(t),s=t.t;return r.set({label:s("Edit link"),icon:GTe,tooltip:!0}),r.bind("isEnabled").to(n),this.listenTo(r,"execute",()=>{this._addFormView()}),r}),e.ui.componentFactory.add("linkProperties",t=>{const n=e.commands.get("link"),r=new nt(t),s=t.t;return r.set({label:s("Link properties"),icon:nAe,tooltip:!0}),r.bind("isEnabled").to(n,"isEnabled",n,"value",n,"manualDecorators",(o,a,l)=>o&&!!a&&l.length>0),this.listenTo(r,"execute",()=>{this._addPropertiesView()}),r})}_createLinksListProviderButton(e){const t=this.editor.locale,n=new GIe(t);return n.set({label:e.label}),this.listenTo(n,"execute",()=>{this._showLinksProviderView(e)}),n}_createButton(e){const t=this.editor,n=t.locale,r=t.commands.get("link"),s=new e(t.locale),o=n.t;return s.set({label:o("Link"),icon:OTe,keystroke:Vy,isToggleable:!0}),s.bind("isEnabled").to(r,"isEnabled"),s.bind("isOn").to(r,"value",a=>!!a),this.listenTo(s,"execute",()=>{t.editing.view.scrollToTheSelection(),this._showUI(!0),this._getSelectedLinkElement()&&this._addFormView()}),s}_enableBalloonActivators(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),e.keystrokes.set(Vy,(n,r)=>{r(),e.commands.get("link").isEnabled&&(e.editing.view.scrollToTheSelection(),this._showUI(!0))})}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",(e,t)=>{this._isToolbarVisible&&!this.toolbarView.focusTracker.isFocused&&(this.toolbarView.focus(),t())},{priority:"high"}),this.editor.keystrokes.set("Esc",(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),Kc({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>{this._hideUI(!1)}})}_addToolbarView(){this.toolbarView||this._createViews(),!this._isToolbarInPanel&&this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this.formView.resetFormStatus(),this.formView.backButtonView.isVisible=e.isEnabled&&!!e.value,this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.selectedLinkableText=this._getSelectedLinkableText(),this.formView.displayedTextInputView.fieldView.value=this.selectedLinkableText||"",this.formView.urlInputView.fieldView.value=e.value||"",this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions()}_addPropertiesView(){this.propertiesView||this._createViews(),!this._arePropertiesInPanel&&(this.propertiesView.disableCssTransitions(),this._balloon.add({view:this.propertiesView,position:this._getBalloonPositionData()}),this.propertiesView.enableCssTransitions(),this.propertiesView.focus())}_showLinksProviderView(e){this.linkProviderItemsView&&this._removeLinksProviderView(),this.linkProviderItemsView=this._createLinkProviderItemsView(e),this._addLinkProviderItemsView(e)}_addLinkProviderItemsView(e){this.linkProviderItemsView.listChildren.clear(),this.linkProviderItemsView.listChildren.addMany(this._createLinkProviderListView(e)),this._balloon.add({view:this.linkProviderItemsView,position:this._getBalloonPositionData()}),this.linkProviderItemsView.focus()}_closeFormView(){const e=this.editor.commands.get("link");this.selectedLinkableText=void 0,e.value!==void 0?this._removeFormView():this._hideUI()}_removePropertiesView(){this._arePropertiesInPanel&&this._balloon.remove(this.propertiesView)}_removeLinksProviderView(){this._isLinksListInPanel&&this._balloon.remove(this.linkProviderItemsView)}_removeFormView(e=!0){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this.formView.displayedTextInputView.fieldView.reset(),this.formView.urlInputView.fieldView.reset(),this._balloon.remove(this.formView),e&&this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._isToolbarVisible?this._addFormView():this._addToolbarView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addToolbarView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpd
51atingUI()}_hideUI(e=!0){const t=this.editor;this._isUIInPanel&&(this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e&&t.editing.view.focus(),this._removeLinksProviderView(),this._removePropertiesView(),this._removeFormView(e),this._isToolbarInPanel&&this._balloon.remove(this.toolbarView),this._hideFakeVisualSelection())}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let n=this._getSelectedLinkElement(),r=o();const s=()=>{const a=this._getSelectedLinkElement(),l=o();n&&!a||!n&&l!==r?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=a,r=l};function o(){return t.selection.focus.getAncestors().reverse().find(a=>a.is("element"))}this.listenTo(e.ui,"update",s),this.listenTo(this._balloon,"change:visibleView",s)}get _arePropertiesInPanel(){return!!this.propertiesView&&this._balloon.hasView(this.propertiesView)}get _isLinksListInPanel(){return!!this.linkProviderItemsView&&this._balloon.hasView(this.linkProviderItemsView)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _isToolbarInPanel(){return!!this.toolbarView&&this._balloon.hasView(this.toolbarView)}get _isPropertiesVisible(){return!!this.propertiesView&&this._balloon.visibleView===this.propertiesView}get _isFormVisible(){return!!this.formView&&this._balloon.visibleView==this.formView}get _isToolbarVisible(){return!!this.toolbarView&&this._balloon.visibleView===this.toolbarView}get _isUIInPanel(){return this._arePropertiesInPanel||this._isLinksListInPanel||this._isFormInPanel||this._isToolbarInPanel}get _isUIVisible(){return this._isPropertiesVisible||this._isLinksListInPanel||this._isFormVisible||this._isToolbarVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document;if(this.editor.model.markers.has(na)){const r=this.editor.editing.mapper.markerNameToElements(na);if(r){const s=Array.from(r),o=e.createRange(e.createPositionBefore(s[0]),e.createPositionAfter(s[s.length-1]));return{target:e.domConverter.viewRangeToDom(o)}}}return{target:()=>{const r=this._getSelectedLinkElement();return r?e.domConverter.mapViewToDom(r):e.domConverter.viewRangeToDom(t.selection.getFirstRange())}}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,n=t.getSelectedElement();if(t.isCollapsed||n&&Wn(n))return gT(t.getFirstPosition());{const r=t.getFirstRange().getTrimmed(),s=gT(r.start),o=gT(r.end);return!s||s!=o?null:e.createRangeIn(s).getTrimmed().isEqual(r)?s:null}}_getSelectedLinkableText(){const e=this.editor.model,t=this.editor.editing,n=this._getSelectedLinkElement();if(!n)return IS(e.document.selection.getFirstRange());const r=t.view.createRangeOn(n),s=t.mapper.toModelRange(r);return IS(s)}_getLinkProviderLinkByHref(e){if(!e)return null;for(const t of this._linksProviders){const n=t.getItem?t.getItem(e):t.getListItems().find(r=>r.href===e);if(n)return{provider:t,item:n}}return null}_showFakeVisualSelection(){const e=this.editor.model;e.change(t=>{const n=e.document.selection.getFirstRange();if(e.markers.has(na))t.updateMarker(na,{range:n});else if(n.start.isAtEnd){const r=n.start.getLastMatchingPosition(({item:s})=>!e.schema.isContent(s),{boundaries:n});t.addMarker(na,{usingOperation:!1,affectsData:!1,range:t.createRange(r,n.end)})}else t.addMarker(na,{usingOperation:!1,affectsData:!1,range:n})})}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(na)&&e.change(t=>{t.removeMarker(na)})}}function gT(i){return i.getAncestors().find(e=>AIe(e))||null}function KIe(i){const e=i.t,t=i.config.get("link.allowCreatingEmptyLinks");return[n=>{if(!t&&!n.url.length)return e("Link URL must not be empty.")}]}const XIe=4,TX=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63}))|localhost)(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i"),QIe=2;class AX extends be{static get requires(){return[Nl,ux]}static get pluginName(){return"AutoLink"}static get isOfficialPlugin(){return!0}init(){const t=this.editor.model.document.selection;t.on("change:range",()=>{this.isEnabled=!t.anchor.parent.is("element","codeBlock")}),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling(),this._enablePasteLinking()}_expandLinkRange(e,t){return t.textNode&&t.textNode.hasAttribute("linkHref")?k_(t,"linkHref",t.textNode.getAttribute("linkHref"),e):null}_selectEntireLinks(e,t){const r=this.editor.model,s=r.document.selection,o=s.getFirstPosition(),a=s.getLastPosition();let l=t.getJoined(this._expandLinkRange(r,o)||t);l&&(l=l.getJoined(this._expandLinkRange(r,a)||t)),l&&(l.start.isBefore(o)||l.end.isAfter(a))&&e.setSelection(l)}_enablePasteLinking(){const e=this.editor,t=e.model,n=t.document.selection,r=e.plugins.get("ClipboardPipeline"),s=e.commands.get("link");r.on("inputTransformation",(o,a)=>
51{if(!this.isEnabled||!s.isEnabled||n.isCollapsed||a.method!=="paste"||n.rangeCount>1)return;const l=n.getFirstRange(),c=a.dataTransfer.getData("text/plain");if(!c)return;const d=c.match(TX);d&&d[2]===c&&(t.change(f=>{this._selectEntireLinks(f,l),s.execute(c)}),o.stop())},{priority:"high"})}_enableTypingHandling(){const e=this.editor,t=new RK(e.model,n=>{let r=n;if(!ZIe(r))return;r=r.slice(0,-1),"!.:,;?".includes(r[r.length-1])&&(r=r.slice(0,-1));const s=zL(r);if(s)return{url:s,removedTrailingCharacters:n.length-r.length}});t.on("matched:data",(n,r)=>{const{batch:s,range:o,url:a,removedTrailingCharacters:l}=r;if(!s.isTyping)return;const c=o.end.getShiftedBy(-l),d=c.getShiftedBy(-a.length),f=e.model.createRange(d,c);this._applyAutoLink(a,f)}),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,n=e.commands.get("enter");n&&n.on("execute",()=>{const r=t.document.selection.getFirstPosition();let s;r.parent.previousSibling?.is("element")?s=t.createRangeIn(r.parent.previousSibling):s=t.createRange(t.createPositionAt(r.parent,0),r),this._checkAndApplyAutoLinkOnRange(s)})}_enableShiftEnterHandling(){const e=this.editor,t=e.model,n=e.commands.get("shiftEnter");n&&n.on("execute",()=>{const r=t.document.selection.getFirstPosition(),s=t.createRange(t.createPositionAt(r.parent,0),r.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(s)})}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:n,range:r}=IK(e,t),s=zL(n);if(s){const o=t.createRange(r.end.getShiftedBy(-s.length),r.end);this._applyAutoLink(s,o)}}_applyAutoLink(e,t){const n=this.editor.model,r=this.editor.config.get("link.defaultProtocol"),s=D4(e,r);!this.isEnabled||!JIe(t,n)||!EX(s)||e6e(t)||this._persistAutoLink(s,t)}_persistAutoLink(e,t){const n=this.editor.model,r=this.editor.plugins.get("Delete");n.enqueueChange(s=>{s.setAttribute("linkHref",e,t),n.enqueueChange(()=>{r.requestUndoOnBackspace()})})}}function ZIe(i){return i.length>XIe&&i[i.length-1]===" "&&i[i.length-2]!==" "}function zL(i){const e=TX.exec(i);return e?e[QIe]:null}function JIe(i,e){return e.schema.checkAttributeInSelection(e.createSelection(i),"linkHref")}function e6e(i){const e=i.start.nodeAfter;return!!e&&e.hasAttribute("linkHref")}class t6e extends be{static get requires(){return[ux,YIe,AX]}static get pluginName(){return"Link"}static get isOfficialPlugin(){return!0}}class mo{_startElement;_referenceIndent;_isForward;_includeSelf;_sameAttributes;_sameIndent;_lowerIndent;_higherIndent;constructor(e,t){this._startElement=e,this._referenceIndent=e.getAttribute("listIndent"),this._isForward=t.direction=="forward",this._includeSelf=!!t.includeSelf,this._sameAttributes=mn(t.sameAttributes||[]),this._sameIndent=!!t.sameIndent,this._lowerIndent=!!t.lowerIndent,this._higherIndent=!!t.higherIndent}static first(e,t){const r=new this(e,t)[Symbol.iterator]();return Rn(r)}*[Symbol.iterator](){const e=[];for(const{node:t}of new S0(this._getStartNode(),this._isForward?"forward":"backward")){const n=t.getAttribute("listIndent");if(n<this._referenceIndent){if(!this._lowerIndent)break;this._referenceIndent=n}else if(n>this._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){e.push(t);continue}}else{if(!this._sameIndent){if(this._higherIndent){e.length&&(yield*e,e.length=0);break}continue}if(this._sameAttributes.some(r=>t.getAttribute(r)!==this._startElement.getAttribute(r)))break}e.length&&(yield*e,e.length=0),yield t}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}class S0{_node;_isForward;_previousNodesByIndent=[];_previous=null;_previousNodeIndent=null;constructor(e,t="forward"){this._node=e,this._isForward=t==="forward"}[Symbol.iterator](){return this}next(){if(!xn(this._node))return{done:!0,value:void 0};const e=this._node.getAttribute("listIndent");let t=null;if(this._previous){const r=this._previousNodeIndent;e>r?this._previousNodesByIndent[r]=this._previous:e<r?(t=this._previousNodesByIndent[e]||null,this._previousNodesByIndent.length=e):t=this._previous}const n={node:this._node,previous:this._previous,previousNodeInList:t};return this._previous=this._node,this._previousNodeIndent=e,this._node=this._isForward?this._node.nextSibling:this._node.previousSibling,{value:n,done:!1}}}class n6e{_listHead;constructor(e){this._listHead=e}[Symbol.iterator](){return new S0(this._listHead)}}class jh{static next(){return rr()}}function xn(i){return!!i&&i.is("element")&&i.hasAttribute("listItemId")}function Bl(i,e={}){return[...zc(i,{...e,direction:"backward"}),...zc(i,{...e,direction:"forward"})]}function zc(i,e={}){const t=e.direction=="forward",n=Array.from(new mo(i,{...e,includeSelf:t,sameIndent:!0,sameAttributes:"listItemId"}));return t?n:n.reverse()}function i6e(i){return Array.from(new mo(i,{direction:"forward",higherIndent:!0}))}function kX(i,e){const t=new mo(i,{sameIndent:!0,sameAttributes:"listType",...e}),n=new mo(i,{sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward",...e});return[...Array.from(t).reverse(),...n]}function Pa(i){return!mo.first(i,{sameIndent:!0,sameAttributes:"listItemId"})}function WL(i){return!mo.first(i,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function P0(i,e={}){i=mn(i);const t=e.withNested!==!1,n=new Set;for(const r of i)for(const s of Bl(r,{higherIndent:t}))n.add(s);return Cd(n)}function r6e(i){i=mn(i);const e=new Set;for(const t of i)for(const n of kX(t))e.add(n);return Cd(e)}function E4(i,e){const t=zc(i,{direction:"forward"}),n=jh.next();for(const r of t)e.setAttribute("listItemId",n,r);return t}function RS(i,e,t){const n={};for(const[s,o]of e.getAttributes())s.startsWith("list")&&(n[s]=o);const r=zc(i,{direction:"forward"});for(const s of r)t.setAttributes(n,s);return r}function FS(i,e,{expand:t,indentBy:n=1}={}){i=mn(i);const r=t?P0(i):i;for(const s of r){const o=s.getAttribute("listIndent")+n;o<0?F_(s,e):e.setAttribute("listIndent",o,s)}return r}function s6e(i,e){i=mn(i);const t=P0(i),n=new Set,r=Math.min(...t.map(o=>o.getAttribute("listIndent"))),s=new Map;for(const o of t)s.set(o,mo.first(o,{lowerIndent:!0}));for(const o of t){if(n.has(o))continue;n.add(o);const a=o.getAttribute("listIndent")-1;if(a<0){F_(o,e);continue}if(o.getAttribute("listIndent")==r){const l=l6e(o,s.get(o),e);for(const c of l)n.add(c);if(l.length)continue}e.setAttribute("listIndent",a,o)}return Cd(n)}function F_(i,e){i=mn(i);for(const t of i)t.is("element","listItem")&&e.rename(t,"paragraph");for(const t of i)for(const n of t.getAttributeKeys())n.startsWith("list")&&e.removeAttribute(n,t);return i}function Xg(i){if(!i.length)return!1;const e=i[0].getAttribute("listItemId");return e?!i.some(t=>t.getAttribute("listItemId")!=e):!1}function o6e(i,e){const t=[];let n=Number.POSITIVE_INFINITY;for(const{node:r}of new S0(i.nextSibling)){const s=r.getAttribute("listIndent");if(s==0)break;s<n&&(n=s);const o=s-n;e.setAttribute("listIndent",o,r),t.push(r)}return t}function Cd(i){return Array.from(i).filter(e=>e.root.rootName!=="$graveyard").sort((e,t)=>
51e.index-t.index)}function Qg(i){const e=i.document.selection.getSelectedElement();return e&&i.schema.isObject(e)&&i.schema.isBlock(e)?e:null}function bT(i,e){return e.checkChild(i.parent,"listItem")&&e.checkChild(i,"$text")&&!e.isObject(i)}function a6e(i){return i=="numbered"||i=="customNumbered"}function l6e(i,e,t){return zc(e,{direction:"forward"}).pop().index>i.index?RS(i,e,t):[]}class HL extends ut{_direction;constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=qL(e.document.selection);e.change(n=>{const r=[];Xg(t)&&!Pa(t[0])?(this._direction=="forward"&&r.push(...FS(t,n)),r.push(...E4(t[0],n))):this._direction=="forward"?r.push(...FS(t,n,{expand:!0})):r.push(...s6e(t,n));for(const s of r){if(!s.hasAttribute("listType"))continue;const o=mo.first(s,{sameIndent:!0});o&&n.setAttribute("listType",o.getAttribute("listType"),s)}this._fireAfterExecute(r)})}_fireAfterExecute(e){this.fire("afterExecute",Cd(new Set(e)))}_checkEnabled(){let e=qL(this.editor.model.document.selection),t=e[0];if(!t)return!1;if(this._direction=="backward"||Xg(e)&&!Pa(e[0]))return!0;e=P0(e),t=e[0];const n=mo.first(t,{sameIndent:!0});return n?n.getAttribute("listType")==t.getAttribute("listType"):!1}
51}function qL(i){const e=Array.from(i.getSelectedBlocks()),t=e.findIndex(n=>!xn(n));return t!=-1&&(e.length=t),e}class Wp extends ut{type;_listWalkerOptions;constructor(e,t,n={}){super(e),this.type=t,this._listWalkerOptions=n.multiLevel?{higherIndent:!0,lowerIndent:!0,sameAttributes:[]}:void 0}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,n=t.document,r=Qg(t),s=Array.from(n.selection.getSelectedBlocks()).filter(a=>t.schema.checkAttribute(a,"listType")||bT(a,t.schema)),o=e.forceValue!==void 0?!e.forceValue:this.value;t.change(a=>{if(o){const l=s[s.length-1],c=zc(l,{direction:"forward"}),d=[];c.length>1&&d.push(...E4(c[1],a)),d.push(...F_(s,a)),d.push(...o6e(l,a)),this._fireAfterExecute(d)}else if((r||n.selection.isCollapsed)&&xn(s[0])){const l=kX(r||s[0],this._listWalkerOptions);for(const c of l)a.setAttributes({...e.additionalAttributes,listType:this.type},c);this._fireAfterExecute(l)}else{const l=[];for(const c of s)if(!c.hasAttribute("listType"))!c.is("element","listItem")&&bT(c,t.schema)&&a.rename(c,"listItem"),a.setAttributes({...e.additionalAttributes,listIndent:0,listItemId:jh.next(),listType:this.type},c),l.push(c);else for(const d of P0(c,{withNested:!1}))d.getAttribute("listType")!=this.type&&(a.setAttributes({...e.additionalAttributes,listType:this.type},d),l.push(d));this._fireAfterExecute(l)}})}_fireAfterExecute(e){this.fire("afterExecute",Cd(new Set(e)))}_getValue(){const e=this.editor.model.document.selection,t=Array.from(e.getSelectedBlocks());if(!t.length)return!1;for(const n of t)if(n.getAttribute("listType")!=this.type)return!1;return!0}_checkEnabled(){const e=this.editor.model,t=e.schema,n=e.document.selection,r=Array.from(n.getSelectedBlocks());if(!r.length)return!1;if(this.value)return!0;for(const s of r)if(t.checkAttribute(s,"listType")||bT(s,t))return!0;return!1}}class $L extends ut{_direction;constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute({shouldMergeOnBlocksContentLevel:e=!1}={}){const t=this.editor.model,n=t.document.selection,r=[];t.change(s=>{const{firstElement:o,lastElement:a}=this._getMergeSubjectElements(n,e),l=o.getAttribute("listIndent")||0,c=a.getAttribute("listIndent"),d=a.getAttribute("listItemId");if(l!=c){const f=i6e(a);r.push(...FS([a,...f],s,{indentBy:l-c,expand:l<c}))}if(e){let f=n;n.isCollapsed&&(f=s.createSelection(s.createRange(s.createPositionAt(o,"end"),s.createPositionAt(a,0)))),t.deleteContent(f,{doNotResetEntireContent:n.isCollapsed});const m=f.getLastPosition().parent,p=m.nextSibling;r.push(m),p&&p!==a&&p.getAttribute("listItemId")==d&&r.push(...RS(p,m,s))}else r.push(...RS(a,o,s));this._fireAfterExecute(r)})}_fireAfterExecute(e){this.fire("afterExecute",Cd(new Set(e)))}_checkEnabled(){const e=this.editor.model,t=e.document.selection,n=Qg(e);if(t.isCollapsed||n){const r=n||t.getFirstPosition().parent;if(!xn(r))return!1;const s=this._direction=="backward"?r.previousSibling:r.nextSibling;if(!s||Xg([r,s]))return!1}else{const r=t.getLastPosition(),s=t.getFirstPosition();if(r.parent===s.parent||!xn(r.parent))return!1}return!0}_getMergeSubjectElements(e,t){const n=this.editor.model,r=Qg(n);let s,o;if(e.isCollapsed||r){const a=r||e.getFirstPosition().parent,l=Pa(a);this._direction=="backward"?(o=a,l&&!t?s=mo.first(a,{sameIndent:!0,lowerIndent:!0}):s=a.previousSibling):(s=a,o=a.nextSibling)}else s=e.getFirstPosition().parent,o=e.getLastPosition().parent;return{firstElement:s,lastElement:o}}}class GL extends ut{_direction;constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){this.editor.model.change(t=>{const n=E4(this._getStartBlock(),t);this._fireAfterExecute(n)})}_fireAfterExecute(e){this.fire("afterExecute",Cd(new Set(e)))}_checkEnabled(){const e=this.editor.model.document.selection,t=this._getStartBlock();return e.isCollapsed&&xn(t)&&!Pa(t)}_getStartBlock(){const t=this.editor.model.document.selection.getFirstPosition().parent;return this._direction=="before"?t:t.nextSibling}}class c6e extends be{static get pluginName(){return"ListItemBoldIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[Us]}init(){const e=this.editor,t=e.plugins.get("ListFormatting"),n=e.plugins.get(Us);!e.plugins.has("BoldEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(t.registerFormatAttribute("bold","listItemBold"),n.registerDowncastStrategy({scope:"item",attributeName:"listItemBold",setAttributeOnDowncast(r,s,o,a){s&&(r.addClass("ck-list-marker-bold",o),ot.isSafari&&!(a&&a.dataPipeline)&&r.setStyle("--ck-content-list-marker-dummy-bold","0",o))}}))}afterInit(){const e=this.editor,t=e.model;!e.plugins.has("BoldEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(t.schema.extend("$listItem",{allowAttributes:"listItemBold"}),t.schema.setAttributeProperties("listItemBold",{isFormatting:!0}),t.schema.addAttributeCheck(n=>{if(!n.last.getAttribute("listItemId"))return!1},"listItemBold"),e.conversion.for("upcast").attributeToAttribute({model:"listItemBold",view:{name:"li",classes:"ck-list-marker-bold"}}))}}class u6e extends be{static get pluginName(){return"ListItemItalicIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[Us]}init(){const e=this.editor,t=e.plugins.get("ListFormatting"),n=e.plugins.get(Us);!e.plugins.has("ItalicEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(t.registerFormatAttribute("italic","listItemItalic"),n.registerDowncastStrategy({scope:"item",attributeName:"listItemItalic",setAttributeOnDowncast(r,s,o,a){s&&(r.addClass("ck-list-marker-italic",o),ot.isSafari&&!(a&&a.dataPipeline)&&r.setStyle("--ck-content-list-marker-dummy-italic","0",o))}}))}afterInit(){const e=this.editor,t=e.model;!e.plugins.has("ItalicEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(t.schema.extend("$listItem",{allowAttributes:"listItemItalic"}),t.schema.setAttributeProperties("listItemItalic",{isFormatting:!0}),t.schema.addAttributeCheck(n=>{if(!n.last.getAttribute("listItemId"))return!1},"listItemItalic"),e.conversion.for("upcast").attributeToAttribute({model:"listItemItalic",view:{name:"li",classes:"ck-list-marker-italic"}}))}}class d6e extends be{static get pluginName(){return"ListItemFontSizeIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[Us]}init(){const e=this.editor,t=e.plugins.get("ListFormatting"),n=e.plugins.get(Us);if(!e.plugins.has("FontSizeEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting"))return;const r=Gg(e.config.get("fontSize.options"));t.registerFormatAttribute("fontSize","listItemFontSize"),n.registerDowncastStrategy({scope:"item",attributeName:"listItemFontSize",setAttributeOnDowncast(s,o,a,l){if(o){const c=r.find(d=>d.model==o);c&&c.view&&typeof c.view!="string"?c.view.styles?(s.addClass("ck-list-marker-font-size",a),s.setStyle("--ck-content-list-marker-font-size",c.view.styles["font-size"],a)):c.view.classes&&(s.addClass(`ck-list-marker-font-size-${o}`,a),ot.isSafari&&!(l&&l.dataPipeline)&&s.setStyle("--ck-content-list-marker-dummy-font-size","0",a)):(s.addClass("ck-list-marker-font-size",a),s.setStyle("--ck-content-list-marker-font-size",o,a))}}})}afterInit(){const e=this.editor,t=e.model;if(!e.plugins.has("FontSizeEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting"))return;t.schema.extend("$listItem",{allowAttributes:"listItemFontSize"}),t.schema.setAttributeProperties("listItemFontSize",{isFormatting:!0}),t.schema.addAttributeCheck(r=>{if(!r.last.getAttribute("listItemId"))return!1},"listItemFontSize"),e.conversion.for("upcast").elementToAttribute({model:{key:"listItemFontSize",value:r=>r.getStyle("--ck-content-list-marker-font-size")},view:{name:"li",classes:"ck-list-marker-font-size",styles:{"--ck-content-list-marker-font-size":/.*/}}});const n=Gg(e.config.get("fontSize.options"));for(const r of n)r.model&&r.view&&e.conversion.for("upcast").elementToAttribute({model:{key:"listItemFontSize",value:r.model},view:{name:"li",classes:`ck-list-marker-font-size-${r.model}`}})}}class f6e extends be{static get pluginName(){return"ListItemFontColorIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[Us]}init(){const e=this.editor,t=e.plugins.get("ListFormatting"),n=e.plugins.get(Us);!e.plugins.has("FontColorEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(t.registerFormatAttribute("fontColor","listItemFontColor"),n.registerDowncastStrategy({scope:"item",attributeName:"listItemFontColor",setAttributeOnDowncast(r,s,o){s&&(r.addClass("ck-list-marker-color",o),r.setStyle("--ck-content-list-marker-color",s,o))}}))}afterInit(){const e=this.editor,t=e.model;!e.plugins.has("FontColorEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(t.schema.extend("$listItem",{allowAttributes:"listItemFontColor"}),t.schema.setAttributeProperties("listItemFontColor",{isFormatting:!0}),t.schema.addAttributeCheck(n=>{if(!n.last.getAttribute("listItemId"))return!1},"listItemFontColor"),e.conversion.for("upcast").attributeToAttribute({model:{key:"listItemFontColor",value:n=>n.getStyle("--ck-content-list-marker-color")},view:{name:"li",classes:"ck-list-marker-color",styles:{"--ck-content-list-marker-color":/.*/}}}))}}class h6e extends be{static get pluginName(){return"ListItemFontFamilyIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[Us]}init(){const e=this.editor,t=e.plugins.get("ListFormatting"),n=e.plugins.get(Us);!e.plugins.has("FontFamilyEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(t.registerFormatAttribute("fontFamily","listItemFontFamily"),n.registerDowncastStrategy({scope:"item",attributeName:"listItemFontFamily",setAttributeOnDowncast(r,s,o){s&&(r.addClass("ck-list-marker-font-family",o),r.setStyle("--ck-content-list-marker-font-family",s,o))}}))}afterInit(){const e=this.editor,t=e.model;!e.plugins.has("FontFamilyEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(t.schema.extend("$listItem",{allowAttributes:"listItemFontFamily"}),t.schema.setAttributeProperties("listItemFontFamily",{isFormatting:!0}),t.schema.addAttributeCheck(n=>{if(!n.last.getAttribute("listItemId"))return!1},"listItemFontFamily"),e.conversion.for("upcast").attributeToAttribute({model:{key:"listItemFontFamily",value:n=>n.getStyle("--ck-content-list-marker-font-family")},view:{name:"li",classes:"ck-list-marker-font-family",styles:{"--ck-content-list-marker-font-family":/.*/}}}))}}class m6e extends be{_loadedFormatting={};static get pluginName(){return"ListFormatting"}static get isOfficialPlugin(){return!0}static get requires(){return[c6e,u6e,d6e,f6e,h6e]}constructor(e){super(e),e.config.define("list.enableListItemMarkerFormatting",!0)}afterInit(){this.editor.config.get("list.enableListItemMarkerFormatting")&&this._registerPostfixerForListItemFormatting()}_registerPostfixerForListItemFormatting(){const e=this.editor.model;e.document.registerPostFixer(t=>{const n=e.document.differ.getChanges(),r=new Set;let s=!1;for(const o of n)if(o.type==="attribute")(o.attributeKey=="listItemId"||o.attributeKey=="listType"||this._isInlineOrSelectionFormatting(o.attributeKey)||Object.values(this._loadedFormatting).includes(o.attributeKey))&&(xn(o.range.start.nodeAfter)?r.add(o.range.start.nodeAfter):xn(o.range.start.parent)&&r.add(o.range.start.parent));else if(xn(o.position.nodeAfter)&&r.add(o.position.nodeAfter),xn(o.position.nodeBefore)&&r.add(o.position.nodeBefore),xn(o.position.parent)&&r.add(o.position.parent),o.type=="insert"&&o.name!="$text"){const a=t.createRangeIn(o.position.nodeAfter);for(const l of a.getItems())xn(l)&&r.add(l)}for(const o of r){const a=p6e(e,o,Object.keys(this._loadedFormatting));for(const[l,c]of Object.entries(a)){const d=this._loadedFormatting[l];(c&&g6e(t,o,d,c)||!c&&b6e(t,o,d))&&(s=!0)}}return s})}registerFormatAttribute(e,t){this._loadedFormatting[e]=t}_isInlineOrSelectionFormatting(e){return e.replace(/^selection:/,"")in this._loadedFormatting}}function p6e(i,e,t){if(Pa(e))return YL(i,e,t);const n=Bl(e);return YL(i,n[0],t)}function YL(i,e,t){if(!y6e(e)||i.schema.isLimit(e))return Object.fromEntries(t.map(a=>[a]));if(e.isEmpty)return Object.fromEntries(t.map(a=>[a,e.getAttribute(`selection:${a}`)]));const n=new Set(t),r={},o=i.createRangeIn(e).getWalker({ignoreElementEnd:!0});for(const{item:a}of o){for(const l of n)if(i.schema.checkAttribute(a,l)){const c=a.getAttribute(l);c===void 0?(n.delete(l),r[l]=void 0):r[l]===void 0?r[l]=c:r[l]!==c&&(n.delete(l),r[l]=void 0)}else l in r||(r[l]=void 0);if(!n.size)break;
51i.schema.isLimit(a)&&o.jumpTo(i.createPositionAfter(a))}return r}function g6e(i,e,t,n){const r=Bl(e);let s=!1;for(const o of r)(!o.hasAttribute(t)||o.getAttribute(t)!==n)&&(i.setAttribute(t,n,o),s=!0);return s}function b6e(i,e,t){const n=Bl(e);let r=!1;for(const s of n)s.hasAttribute(t)&&(i.removeAttribute(t,s),r=!0);return r}function y6e(i){return["numbered","bulleted","customNumbered","customBulleted"].includes(i.getAttribute("listType"))}class v6e extends be{static get pluginName(){return"ListUtils"}static get isOfficialPlugin(){return!0}expandListBlocksToCompleteList(e){return r6e(e)}isFirstBlockOfListItem(e){return Pa(e)}isListItemBlock(e){return xn(e)}expandListBlocksToCompleteItems(e,t={}){return P0(e,t)}isNumberedListType(e){return a6e(e)}}function w6e(i){return i.is("element","ol")||i.is("element","ul")}function OS(i){return i.is("element","li")}function x6e(i){let e=0,t=i.parent;for(;t;){if(OS(t))e++;else{const n=t.previousSibling;n&&OS(n)&&e++}t=t.parent}return e}function _6e(i,e,t,n=PX(t,e)){return i.createAttributeElement(SX(t),null,{priority:2*e/100-100,id:n})}function C6e(i,e,t){return i.createAttributeElement("li",null,{priority:(2*e+1)/100-100,id:t})}function SX(i){return i=="numbered"||i=="customNumbered"?"ol":"ul"}function PX(i,e){return`list-${i}-${e}`}function ko(i,e,t){const n=i.nodeBefore;if(xn(n)){let r=n;for(const{node:s}of new S0(r,"backward"))if(r=s,t.has(r)||(t.add(r),e.has(n)))return;e.add(r)}else{const r=i.nodeAfter;xn(r)&&e.add(r)}}function D6e(i,e){let t=0,n=-1,r=null,s=!1;for(const{node:o}of i){const a=o.getAttribute("listIndent");if(a>t){let l;r===null?(r=a-t,l=t):(r>a&&(r=a),l=a-r),l>n+1&&(l=n+1),e.setAttribute("listIndent",l,o),s=!0,n=l}else r=null,t=a+1,n=a}return s}function E6e(i,e,t){const n=new Set;let r=!1;for(const{node:s}of i){if(n.has(s))continue;let o=s.getAttribute("listType"),a=s.getAttribute("listItemId");if(e.has(a)&&(a=jh.next()),e.add(a),s.is("element","listItem")){s.getAttribute("listItemId")!=a&&(t.setAttribute("listItemId",a,s),r=!0);continue}for(const l of zc(s,{direction:"forward"}))n.add(l),l.getAttribute("listType")!=o&&(a=jh.next(),o=l.getAttribute("listType")),l.getAttribute("listItemId")!=a&&(t.setAttribute("listItemId",a,l),r=!0)}return r}function T6e(){return(i,e,t)=>{const{writer:n,schema:r}=t;if(!e.modelRange)return;const s=Array.from(e.modelRange.getItems({shallow:!0})).filter(f=>r.checkAttribute(f,"listItemId"));if(!s.length)return;const o=e.viewItem.getAttribute("data-list-item-id")||jh.next();t.consumable.consume(e.viewItem,{attributes:"data-list-item-id"});const a=x6e(e.viewItem);let l=e.viewItem.parent&&e.viewItem.parent.is("element","ol")?"numbered":"bulleted";const c=s[0].getAttribute("listType");c&&(l=c);const d={listItemId:o,listIndent:a,listType:l};for(const f of s)f.hasAttribute("listItemId")||n.setAttributes(d,f);s.length>1&&s[1].getAttribute("listItemId")!=d.listItemId&&t.keepEmptyElement(s[0])}}function A6e(i,e,t,n){return()=>{const l=i.document.differ.getChanges(),c=[],d=new Set,f=new Set,m=new Set;for(const p of l)if(p.type=="insert"&&p.name!="$text")ko(p.position,d,m),p.attributes.has("listItemId")?f.add(p.position.nodeAfter):ko(p.position.getShiftedBy(p.length),d,m);else if(p.type=="remove"&&p.attributes.has("listItemId"))ko(p.position,d,m);else if(p.type=="attribute"){const g=p.range.start.nodeAfter;t.includes(p.attributeKey)?(ko(p.range.start,d,m),p.attributeNewValue===null?(ko(p.range.start.getShiftedBy(1),d,m),s(g)&&c.push(g)):f.add(g)):xn(g)&&s(g)&&c.push(g)}for(const p of d.values())c.push(...r(p,f));for(const p of new Set(c))e.reconvertItem(p)};function r(l,c){const d=[],f=new Set,m=[];for(const{node:p,previous:g}of new S0(l)){if(f.has(p))continue;const y=p.getAttribute("listIndent");g&&y<g.getAttribute("listIndent")&&(m.length=y+1),m[y]={modelAttributes:Object.fromEntries(Array.from(p.getAttributes()).filter(([x])=>t.includes(x))),modelElement:p};const v=zc(p,{direction:"forward"});for(const x of v)f.add(x),(s(x,v)||a(x,m,c))&&d.push(x)}return d}function s(l,c){const d=e.mapper.toViewElement(l);if(!d)return!1;if(o(d)||n.fire("checkElement",{modelElement:l,viewElement:d}))return!0;
51if(!l.is("element","paragraph")&&!l.is("element","listItem"))return!1;const m=RX(l,t,c);return m&&d.is("element","p")?!0:!!(!m&&d.is("element","span"))}function o(l){for(l=l.parent;l.is("attributeElement")&&["ol","ul","li"].includes(l.name);)l=l.parent;return!!(l.getCustomProperty("$structureSlotParent")&&!e.mapper.toModelElement(l))}function a(l,c,d){if(d.has(l))return!1;const f=e.mapper.toViewElement(l);let m=c.length-1;for(let p=f.parent;!p.is("editableElement");p=p.parent){const g=OS(p),y=w6e(p);if(!y&&!g)continue;const v=`checkAttributes:${g?"item":"list"}`;if(n.fire(v,{viewElement:p,modelAttributes:c[m].modelAttributes,modelReferenceElement:c[m].modelElement}))break;if(y&&(m--,m<0))return!1}return!0}}function KL(i,e,t,{dataPipeline:n}={}){const r=O6e(i,e);return(s,o,a)=>{const{writer:l,mapper:c,consumable:d}=a,f=o.item;if(!i.includes(o.attributeKey)||!r(f,d))return;const m={...a.options,dataPipeline:n},p=S6e(f,c,t,l);IX(p,l,c),R6e(p,l);const g=I6e(f,p,e,l,m);F6e(f,g,e,l,m)}}function k6e(i){return(e,t,n)=>{const{writer:r,mapper:s}=n,o=e.name.split(":")[1];if(!i.checkAttribute(o,"listItemId"))return;const a=s.toViewPosition(t.position),l=t.position.getShiftedBy(t.length),c=s.toViewPosition(l,{isPhantom:!0}),f=r.createRange(a,c).getTrimmed().end.nodeBefore;f&&IX(f,r,s)}}function XL(i,{dataPipeline:e}={}){return(t,{writer:n})=>{if(!RX(t,i))return null;if(!e)return n.createContainerElement("span",{class:"ck-list-bogus-paragraph"});const r=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,r),r}}function S6e(i,e,t,n){const r=t.createRangeOn(i),o=e.toViewRange(r).getTrimmed().getWalker();for(const{item:a}of o)if(a.is("element")&&a.getCustomProperty("listItemMarker"))o.jumpTo(n.createPositionAfter(a));else if(a.is("element")&&!a.getCustomProperty("listItemWrapper"))return a}function P6e(i,e){return(t,n)=>{if(n.modelPosition.offset>0)return;const r=n.modelPosition.parent;if(!xn(r)||!i.some(c=>c.scope=="itemMarker"&&c.canInjectMarkerIntoElement&&c.canInjectMarkerIntoElement(r)))return;const s=n.mapper.toViewElement(r),o=e.createRangeIn(s),a=o.getWalker();let l=o.start;for(const{item:c}of a){if(c.is("element")&&n.mapper.toModelElement(c)||c.is("$textProxy"))break;c.is("element")&&c.getCustomProperty("listItemMarker")&&(l=e.createPositionAfter(c),a.skip(({previousPosition:d})=>!d.isEqual(l)))}n.viewPosition=l}}function IX(i,e,t){for(;i.parent.is("attributeElement")&&i.parent.getCustomProperty("listItemWrapper");)e.unwrap(e.createRangeOn(i),i.parent);const n=[];r(e.createPositionBefore(i).getWalker({direction:"backward"})),r(e.createRangeIn(i).getWalker());for(const s of n)e.remove(s);function r(s){for(const{item:o}of s){if(o.is("element")&&t.toModelElement(o))break;o.is("element")&&o.getCustomProperty("listItemMarker")&&n.push(o)}}}function I6e(i,e,t,n,{dataPipeline:r}){let s=n.createRangeOn(e);if(!Pa(i))return s;for(const o of t){if(o.scope!="itemMarker")continue;const a=o.createElement(n,i,{dataPipeline:r});if(!a||(n.setCustomProperty("listItemMarker",!0,a),o.canInjectMarkerIntoElement&&o.canInjectMarkerIntoElement(i)?n.insert(n.createPositionAt(e,0),a):(n.insert(s.start,a),s=n.createRange(n.createPositionBefore(a),n.createPositionAfter(e))),!o.createWrapperElement||!o.canWrapElement))continue;const l=o.createWrapperElement(n,i,{dataPipeline:r});n.setCustomProperty("listItemWrapper",!0,l),o.canWrapElement(i)?s=n.wrap(s,l):(s=n.wrap(n.createRangeOn(a),l),s=n.createRange(s.start,n.createPositionAfter(e)))}return s}function R6e(i,e){let t=i.parent;for(;t.is("attributeElement")&&["ul","ol","li"].includes(t.name);){const n=t.parent;e.unwrap(e.createRangeOn(i),t),t=n}}function F6e(i,e,t,n,r){if(!i.hasAttribute("listIndent"))return;const s=i.getAttribute("listIndent");let o=i;for(let a=s;a>=0;a--){const l=C6e(n,a,o.getAttribute("listItemId")),c=_6e(n,a,o.getAttribute("listType"));for(const d of t)(d.scope=="list"||d.scope=="item")&&o.hasAttribute(d.attributeName)&&d.setAttributeOnDowncast(n,o.getAttribute(d.attributeName),d.scope=="list"?c:l,r,o);if(e=n.wrap(e,l),e=n.wrap(e,c),a==0||(o=mo.first(o,{lowerIndent:!0}),!o))break}}function O6e(i,e){const t=e.filter(n=>n.consume===!1).map(n=>n.attributeName);return(n,r)=>{const s=[];for(const o of i)n.hasAttribute(o)&&!t.includes(o)&&s.push(`attribute:${o}`);return s.every(o=>r.test(n,o)!==!1)?(s.forEach(o=>r.consume(n,o)),!0):!1}}function RX(i,e,t=Bl(i)){if(!xn(i))return!1;for(const n of i.getAttributeKeys())if(!(n.startsWith("selection:")||n=="htmlEmptyBlock")&&!e.includes(n))return!1;return t.length<2}const A1=["listType","listIndent","listItemId"];class Us extends be{_downcastStrategies=[];static get pluginName(){return"ListEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[k0,Nl,v6e,Ls,m6e]}constructor(e){super(e),e.config.define("list.multiBlock",!0)}init(){const e=this.editor,t=e.model,n=e.config.get("list.multiBlock");if(e.plugins.has("LegacyListEditing"))throw new oe("list-feature-conflict",this,{conflictPlugin:"LegacyListEditing"});t.schema.register("$listItem",{allowAttributes:A1}),n?(t.schema.extend("$container",{allowAttributesOf:"$listItem"}),t.schema.extend("$block",{allowAttributesOf:"$listItem"}),t.schema.extend("$blockObject",{allowAttributesOf:"$listItem"}
51)):t.schema.register("listItem",{inheritAllFrom:"$block",allowAttributesOf:"$listItem"});for(const r of A1)t.schema.setAttributeProperties(r,{copyOnReplace:!0});e.commands.add("numberedList",new Wp(e,"numbered")),e.commands.add("bulletedList",new Wp(e,"bulleted")),e.commands.add("customNumberedList",new Wp(e,"customNumbered",{multiLevel:!0})),e.commands.add("customBulletedList",new Wp(e,"customBulleted",{multiLevel:!0})),e.commands.add("indentList",new HL(e,"forward")),e.commands.add("outdentList",new HL(e,"backward")),e.commands.add("splitListItemBefore",new GL(e,"before")),e.commands.add("splitListItemAfter",new GL(e,"after")),n&&(e.commands.add("mergeListItemBackward",new $L(e,"backward")),e.commands.add("mergeListItemForward",new $L(e,"forward"))),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration(),this._setupAccessibilityIntegration(),this._setupListItemIdConversionStrategy()}afterInit(){const t=this.editor.commands,n=t.get("indent"),r=t.get("outdent");n&&n.registerChildCommand(t.get("indentList"),{priority:"high"}),r&&r.registerChildCommand(t.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(e){this._downcastStrategies.push(e)}getListAttributeNames(){return[...A1,...this._downcastStrategies.map(e=>e.attributeName)]}_setupDeleteIntegration(){const e=this.editor,t=e.commands.get("mergeListItemBackward"),n=e.commands.get("mergeListItemForward");this.listenTo(e.editing.view.document,"delete",(r,s)=>{const o=e.model.document.selection;Qg(e.model)||e.model.change(()=>{const a=o.getFirstPosition();if(o.isCollapsed&&s.direction=="backward"){if(!a.isAtStart)return;const l=a.parent;if(!xn(l))return;if(!mo.first(l,{sameAttributes:"listType",sameIndent:!0})&&l.getAttribute("listIndent")===0)WL(l)||e.execute("splitListItemAfter"),e.execute("outdentList");else{if(!t||!t.isEnabled)return;t.execute({shouldMergeOnBlocksContentLevel:QL(e.model,"backward")})}s.preventDefault(),r.stop()}else{if(o.isCollapsed&&!o.getLastPosition().isAtEnd||!n||!n.isEnabled)return;n.execute({shouldMergeOnBlocksContentLevel:QL(e.model,"forward")}),s.preventDefault(),r.stop()}})},{context:"li"})}_setupEnterIntegration(){const e=this.editor,t=e.model,n=e.commands,r=n.get("enter");this.listenTo(e.editing.view.document,"enter",(s,o)=>{const a=t.document,l=a.selection.getFirstPosition().parent;if(a.selection.isCollapsed&&xn(l)&&l.isEmpty&&!o.isSoft){const c=Pa(l),d=WL(l);c&&d?(e.execute("outdentList"),o.preventDefault(),s.stop()):c&&!d?(e.execute("splitListItemAfter"),o.preventDefault(),s.stop()):d&&(e.execute("splitListItemBefore"),o.preventDefault(),s.stop())}},{context:"li"}),this.listenTo(r,"afterExecute",()=>{const s=n.get("splitListItemBefore");if(s.refresh(),!s.isEnabled)return;const a=e.model.document.selection.getLastPosition().parent;Bl(a).length===2&&s.execute()})}_setupTabIntegration(){const e=this.editor;this.listenTo(e.editing.view.document,"tab",(t,n)=>{const r=n.shiftKey?"outdentList":"indentList";this.editor.commands.get(r).isEnabled&&(e.execute(r),n.stopPropagation(),n.preventDefault(),t.stop())},{context:"li"})}_setupConversion(){const e=this.editor,t=e.model,n=this.getListAttributeNames(),r=e.config.get("list.multiBlock"),s=r?"paragraph":"listItem";e.conversion.for("upcast").elementToElement({view:"li",model:(a,{writer:l})=>l.createElement(s,{listType:""})}).elementToElement({view:"p",model:(a,{writer:l})=>a.parent&&a.parent.is("element","li")?l.createElement(s,{listType:""}):null,converterPriority:"high"}).add(a=>{a.on("element:li",T6e())}),r||e.conversion.for("downcast").elementToElement({model:"listItem",view:"p"}),e.conversion.for("editingDowncast").elementToElement({model:s,view:XL(n),converterPriority:"high"}).add(a=>{a.on("attribute",KL(n,this._downcastStrategies,t)),a.on("remove",k6e(t.schema))}),e.conversion.for("dataDowncast").elementToElement({model:s,view:XL(n,{dataPipeline:!0}),converterPriority:"high"}).add(a=>{a.on("attribute",KL(n,this._downcastStrategies,t,{dataPipeline:!0}))});const o=P6e(this._downcastStrategies,e.editing.view);e.editing.mapper.on("modelToViewPosition",o),e.data.mapper.on("modelToViewPosition",o),this.listenTo(t.document,"change:data",A6e(t,e.editing,n,this),{priority:"high"}),this.on("checkAttributes:item",(a,{viewElement:l,modelAttributes:c})=>{l.id!=c.listItemId&&(a.return=!0,a.stop())}),this.on("checkAttributes:list",(a,{viewElement:l,modelAttributes:c})=>{(l.name!=SX(c.listType)||l.id!=PX(c.listType,c.listIndent))&&(a.return=!0,a.stop())})}_setupModelPostFixing(){const e=this.editor.model,t=this.getListAttributeNames();e.document.registerPostFixer(n=>N6e(e,n,t,this)),this.on("postFixer",(n,{listNodes:r,writer:s})=>{n.return=D6e(r,s)||n.return},{priority:"high"}),this.on("postFixer",(n,{listNodes:r,writer:s,seenIds:o})=>{n.return=E6e(r,o,s)||n.return},{priority:"high"})}_setupClipboardIntegration(){const e=this.editor.model,t=this.editor.plugins.get("ClipboardPipeline");this.listenTo(e,"insertContent",B6e(e),{priority:"high"}),this.listenTo(t,"outputTransformation",(n,r)=>{e.change(s=>{const o=Array.from(r.content.getChildren()),a=o[o.length-1];if(o.length>1&&a.is("element")&&a.isEmpty&&o.slice(0,-1).every(xn)&&s.remove(a),r.method=="copy"||r.method=="cut"){const l=Array.from(r.content.getChildren());Xg(l)&&F_(l,s)}})})}_setupAccessibilityIntegration(){const e=this.editor,t=e.t;e.accessibility.addKeystrokeInfoGroup({id:"list",label:t("Keystrokes that can be used in a list"),keystrokes:[{label:t("Increase list item indent"),keystroke:"Tab"},{label:t("Decrease list item indent"),keystroke:"Shift+Tab"}]})}_setupListItemIdConversionStrategy(){this.registerDowncastStrategy({scope:"item",attributeName:"listItemId",setAttributeOnDowncast(e,t,n,r){r&&(r.skipListItemIds||r.isClipboardPipeline)||e.setAttribute("data-list-item-id",t,n)}})}}function N6e(i,e,t,n){const r=i.document.differ.getChanges(),s=new Set,o=new Set,a=n.editor.config.get("list.multiBlock");let l=!1;for(const d of r){if(d.type=="insert"&&d.name!="$text"){const f=d.position.nodeAfter;if(!i.schema.checkAttribute(f,"listItemId"))for(const m of Array.from(f.getAttributeKeys()))t.includes(m)&&(e.removeAttribute(m,f),l=!0);ko(d.position,o,s),d.attributes.has("listItemId")||ko(d.position.getShiftedBy(d.length),o,s);for(const{item:m,previousPosition:p}of i.createRangeIn(f))xn(m)&&ko(p,o,s)}else d.type=="remove"?ko(d.position,o,s):d.type=="attribute"&&t.includes(d.attributeKey)&&
51(ko(d.range.start,o,s),d.attributeNewValue===null&&ko(d.range.start.getShiftedBy(1),o,s));if(!a&&d.type=="attribute"&&A1.includes(d.attributeKey)){const f=d.range.start.nodeAfter;d.attributeNewValue===null&&f&&f.is("element","listItem")?(e.rename(f,"paragraph"),l=!0):d.attributeOldValue===null&&f&&f.is("element")&&f.name!="listItem"&&(e.rename(f,"listItem"),l=!0)}}const c=new Set;for(const d of o.values())l=n.fire("postFixer",{listNodes:new n6e(d),listHead:d,writer:e,seenIds:c})||l;return l}function B6e(i){return(e,[t,n])=>{const r=t.is("documentFragment")?Array.from(t.getChildren()):[t];if(!r.length)return;const o=(n?i.createSelection(n):i.document.selection).getFirstPosition();let a;if(xn(o.parent))a=o.parent;else if(xn(o.nodeBefore)&&xn(o.nodeAfter))a=o.nodeBefore;else return;i.change(l=>{const c=a.getAttribute("listType"),d=a.getAttribute("listIndent"),f=r[0].getAttribute("listIndent")||0,m=Math.max(d-f,0);for(const p of r){const g=xn(p);a.is("element","listItem")&&p.is("element","paragraph")&&l.rename(p,"listItem"),l.setAttributes({listIndent:(g?p.getAttribute("listIndent"):0)+m,listItemId:g?p.getAttribute("listItemId"):jh.next(),listType:c},p)}})}}function QL(i,e){const t=i.document.selection;if(!t.isCollapsed)return!Qg(i);if(e==="forward")return!0;const r=t.getFirstPosition().parent,s=r.previousSibling;return i.schema.isObject(s)?!1:s.isEmpty?!0:Xg([r,s])}function NS(i,e,t,n){i.ui.componentFactory.add(e,()=>{const r=ZL(nt,i,e,t,n);return r.set({tooltip:!0,isToggleable:!0}),r}),i.ui.componentFactory.add(`menuBar:${e}`,()=>{const r=ZL(gn,i,e,t,n);return r.set({role:"menuitemcheckbox",isToggleable:!0}),r})}function ZL(i,e,t,n,r){const s=e.commands.get(t),o=new i(e.locale);return o.set({label:n,icon:r}),o.bind("isOn","isEnabled").to(s,"value","isEnabled"),o.on("execute",()=>{e.execute(t),e.editing.view.focus()}),o}class M6e extends be{static get pluginName(){return"ListUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.t;this.editor.ui.componentFactory.has("numberedList")||NS(this.editor,"numberedList",e("Numbered List"),LTe),this.editor.ui.componentFactory.has("bulletedList")||NS(this.editor,"bulletedList",e("Bulleted List"),xTe)}}class L6e extends be{static get requires(){return[Us,M6e]}static get pluginName(){return"List"}static get isOfficialPlugin(){return!0}}const U6e=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"}];for(const{listStyle:i,typeAttribute:e,listType:t}of U6e);class V6e extends ut{constructor(e){super(e),this.on("execute",()=>{this.refresh()},{priority:"highest"})}refresh(){const e=this._getSelectedItems();this.value=this._getValue(e),this.isEnabled=!!e.length}execute(e={}){this.editor.model.change(t=>{const n=this._getSelectedItems(),r=e.forceValue===void 0?!this._getValue(n):e.forceValue;for(const s of n)r?t.setAttribute("todoListChecked",!0,s):t.removeAttribute("todoListChecked",s)})}_getValue(e){return e.every(t=>t.getAttribute("todoListChecked"))}_getSelectedItems(){const e=this.editor.model,t=e.schema,n=e.document.selection.getFirstRange(),r=n.start.parent,s=[];t.checkAttribute(r,"todoListChecked")&&s.push(...Bl(r));for(const o of n.getItems({shallow:!0}))t.checkAttribute(o,"todoListChecked")&&!s.includes(o)&&s.push(...Bl(o));return s}}class j6e extends $o{domEventType=["change"];onDomEvent(e){if(e.target){const t=this.view.domConverter.mapDomToView(e.target);t&&t.is("element","input")&&t.getAttribute("type")=="checkbox"&&t.findAnce
51stor({classes:"todo-list__label"})&&this.fire("todoCheckboxChange",e)}}}const z6e=v_("Ctrl+Enter");class W6e extends be{static get pluginName(){return"TodoListEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Us]}init(){const e=this.editor,t=e.model,n=e.editing,r=e.plugins.get(Us),o=e.config.get("list.multiBlock")?"paragraph":"listItem";e.commands.add("todoList",new Wp(e,"todo")),e.commands.add("checkTodoList",new V6e(e)),n.view.addObserver(j6e),t.schema.extend("$listItem",{allowAttributes:"todoListChecked"}),t.schema.addAttributeCheck(a=>{const l=a.last;if(!l.getAttribute("listItemId")||l.getAttribute("listType")!="todo")return!1},"todoListChecked"),e.conversion.for("upcast").add(a=>{a.on("element:input",q6e()),a.on("element:li",H6e(),{priority:"low"}),a.on("element:label",yT({name:"label",classes:"todo-list__label"})),a.on("element:label",yT({name:"label",classes:["todo-list__label","todo-list__label_without-description"]})),a.on("element:span",yT({name:"span",classes:"todo-list__label__description"})),a.on("element:ul",$6e({name:"ul",classes:"todo-list"}))}),e.conversion.for("downcast").elementToElement({model:o,view:(a,{writer:l})=>{if(jy(a,r.getListAttributeNames()))return l.createContainerElement("span",{class:"todo-list__label__description"})},converterPriority:"highest"}),r.registerDowncastStrategy({scope:"list",attributeName:"listType",setAttributeOnDowncast(a,l,c){l=="todo"?a.addClass("todo-list",c):a.removeClass("todo-list",c)}}),r.registerDowncastStrategy({scope:"itemMarker",attributeName:"todoListChecked",createElement(a,l,{dataPipeline:c}){if(l.getAttribute("listType")!="todo")return null;const d=a.createUIElement("input",{type:"checkbox",...l.getAttribute("todoListChecked")?{checked:"checked"}:null,...c?{disabled:"disabled"}:{tabindex:"-1"}});if(c)return d;const f=a.createContainerElement("span",{contenteditable:"false"},d);return f.getFillerOffset=()=>null,f},canWrapElement(a){return jy(a,r.getListAttributeNames())},createWrapperElement(a,l,{dataPipeline:c}){const d=["todo-list__label"];return jy(l,r.getListAttributeNames())||d.push("todo-list__label_without-description"),a.createAttributeElement(c?"label":"span",{class:d.join(" ")})}}),r.on("checkElement",(a,{modelElement:l,viewElement:c})=>{const d=jy(l,r.getListAttributeNames());c.hasClass("todo-list__label__description")!=d&&(a.return=!0,a.stop())}),r.on("checkElement",(a,{modelElement:l,viewElement:c})=>{const d=l.getAttribute("listType")=="todo"&&Pa(l);let f=!1;const m=e.editing.view.createPositionBefore(c).getWalker({direction:"backward"});for(const{item:p}of m){if(p.is("element")&&e.editing.mapper.toModelElement(p))break;p.is("element","input")&&p.getAttribute("type")=="checkbox"&&(f=!0)}f!=d&&(a.return=!0,a.stop())}),r.on("postFixer",(a,{listNodes:l,writer:c})=>{for(const{node:d,previousNodeInList:f}of l){if(!f||f.getAttribute("listItemId")!=d.getAttribute("listItemId"))continue;const m=f.hasAttribute("todoListChecked"),p=d.hasAttribute("todoListChecked");p&&!m?(c.removeAttribute("todoListChecked",d),a.return=!0):!p&&m&&(c.setAttribute("todoListChecked",!0,d),a.return=!0)}}),t.document.registerPostFixer(a=>{const l=t.document.differ.getChanges();let c=!1;for(const d of l)if(d.type=="attribute"&&d.attributeKey=="listType"){const f=d.range.start.nodeAfter;d.attributeOldValue=="todo"&&f.hasAttribute("todoListChecked")&&(a.removeAttribute("todoListChecked",f),c=!0)}else if(d.type=="insert"&&d.name!="$text")for(const{item:f}of a.createRangeOn(d.position.nodeAfter))f.is("element")&&f.getAttribute("listType")!="todo"&&f.hasAttribute("todoListChecked")&&(a.removeAttribute("todoListChecked",f),c=!0);return c}),this.listenTo(n.view.document,"keydown",(a,l)=>{ld(l)===z6e&&(e.execute("checkTodoList"),a.stop())},{priority:"high"}),this.listenTo(n.view.document,"todoCheckboxChange",(a,l)=>{const c=l.target;if(!c||!c.is("element","input"))return;const d=n.view.createPositionAfter(c),m=n.mapper.toModelPosition(d).parent;m&&xn(m)&&m.getAttribute("listType")=="todo"&&this._handleCheckmarkChange(m)}),this.listenTo(n.view.document,"arrowKey",Y6e(t,e.locale),{context:"$text"}),this.listenTo(n.mapper,"viewToModelPosition",(a,l)=>{const c=l.viewPosition.parent,d=c.is("attributeElement","li")&&l.viewPosition.offset==0,f=JL(c)&&l.viewPosition.offset<=1,m=c.is("element","span")&&c.getAttribute("contenteditable")=="false"&&JL(c.parent);if(!d&&!f&&!m)return;const p=l.modelPosition.nodeAfter;p&&p.getAttribute("listType")=="todo"&&(l.modelPosition=t.createPositionAt(p,0))},{priority:"low"}),this._initAriaAnnouncements()}_handleCheckmarkChange(e){const t=this.editor,n=t.model,r=Array.from(n.document.selection.getRanges());n.change(s=>{s.setSelection(e,"end"),t.execute("checkTodoList"),s.setSelection(r)})}_initAriaAnnouncements(){const{model:e,ui:t,t:n}=this.editor;let r=null;t&&e.document.selection.on("change:range",()=>{const s=e.document.selection.focus.parent,o=e9(r),a=e9(s);o&&!a?t.ariaLiveAnnouncer.announce(n("Leaving a to-do list")):!o&&a&&t.ariaLiveAnnouncer.announce(n("Entering a to-do list")),r=s})}}function H6e(){return(i,e,t)=>{const{writer:n,schema:r}=t;if(!e.modelRange)return;const s=Array.from(e.modelRange.getItems({shallow:!0})).filter(o=>o.getAttribute("listType")==="todo"&&r.checkAttribute(o,"listItemId")).reduce((o,a)=>{const l=a.getAttribute("listItemId");return o.has(l)||o.set(l,Bl(a)),o},new Map);for(const[,o]of s.entries())if(o.some(a=>a.getAttribute("todoListChecked")))for(const a of o)n.setAttribute("todoListChecked",!0,a)}}function q6e(){return(i,e,t)=>{const n=e.modelCursor,r=n.parent,s=e.viewItem;if(!t.consumable.test(s,{name:!0})||s.getAttribute("type")!="checkbox"||!n.isAtStart||!r.hasAttribute("listType"))return;t.consumable.consume(s,{name:!0});const o=t.writer;o.setAttribute("listType","todo",r),e.viewItem.hasAttribute("checked")&&o.setAttribute("todoListChecked",!0,r),e.modelRange=o.createRange(n)}}function yT(i){const e=new Rl(i);return(t,n,r)=>{const s=e.match(n.viewItem);s&&r.consumable.consume(n.viewItem,s.match)&&Object.assign(n,r.convertChildren(n.viewItem,n.modelCursor))}}function $6e(i){const e=new Rl(i);return(t,n,r)=>{const s=e.match(n.viewItem);if(!s)return;const o=s.match;o.name=!1,r.consumable.consume(n.viewItem,o)}}function jy(i,e){return(i.is("element","paragraph")||i.is("element","listItem"))&&i.getAttribute("listType")=="todo"&&Pa(i)&&G6e(i,e)}function G6e(i,e){for(const t of i.getAttributeKeys())if(!t.startsWith("selection:")&&!e.includes(t))return!1;return!0}function Y6e(i,e){return(t,n)=>{const r=w_(n.keyCode,e.contentLanguageDirection),s=i.schema,o=i.document.selection;if(!o.isCollapsed)return;const a=o.getFirstPosition(),l=a.parent;if(r=="right"&&a.isAtEnd){const c=s.getNearestSelectionRange(i.createPositionAfter(l),"forward");if(!c)return;const d=c.start.parent;d&&xn(d)&&d.getAttribute("listType")=="todo"&&(i.change(f=>f.setSelection(c)),n.preventDefault(),n.stopPropagation(),t.stop())}else if(r=="left"&&a.isAtStart&&xn(l)&&l.getAttribute("listType")=="todo"){const c=s.getNearestSelectionRange(i.createPositionBefore(l),"backward");if(!c)return;i.change(d=>d.setSelection(c)),n.preventDefault(),n.stopPropagation(),t.stop()}}}function JL(i){return!!i&&i.is("attributeElement")&&i.hasClass("todo-list__label")}function e9(i){return!i||!i.is("element","paragraph")&&!i.is("element","listItem")?!1:i.getAttribute("listType")=="todo"}class K6e extends be{static get pluginName(){return"TodoListUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.t;NS(this.editor,"todoList",e("To-do List"),pAe)}}class X6e extends be{static get requires(){return[W6e,K6e]}static get pluginName(){return"TodoList"}static get isOfficialPlugin(){return!0}}function t9(i,e){const t=(n,r,s)=>{if(!s.consumable.consume(r.item,n.name))return;const o=r.attributeNewValue,a=s.writer,l=s.mapper.toViewElement(r.item),c=[...l.getChildren()].find(f=>f.getCustomProperty("media-content"));a.remove(c);const d=i.getMediaViewElement(a,o,e);a.insert(a.createPositionAt(l,0),d)};return n=>{n.on("attribute:url:media",t)}}function Q6e(i,e,t){return e.setCustomProperty("media",!0,i),_d(i,e,{label:t})}function n9(i,e,t,n){return i.createContainerElement("figure",{class:"media"},[e.getMediaViewElement(i,t,n),i.createSlot()])}function i9(i){const e=i.getSelectedElement();return e&&e.is("element","media")?e:null}function FX(i,e,t,n){i.change(r=>{const s=r.createElement("media",{url:e});i.insertObject(s,t,null,{setSelection:"on",findOptimalPosition:n?"auto":void 0})})}class Z6e extends ut{refresh(){const e=this.editor.model,t=e.document.selection,n=i9(t);this.value=n?n.getAttribute("url"):void 0,this.isEnabled=eRe(t)||J6e(t,e)}execute(e){const t=this.editor.model,n=t.document.selection,r=i9(n);r?t.change(s=>{s.setAttribute("url",e,r)}):FX(t,e,n,!0)}}function J6e(i,e){let n=S_(i,e).start.parent;return n.isEmpty&&!e.schema.isLimit(n)&&(n=n.parent),e.schema.checkChild(n,"media")}function eRe(i){const e=i.getSelectedElement();return!!e&&e.name==="media"}const tRe="0 0 64 42";class nRe{locale;providerDefinitions;constructor(e,t){const n=t.providers,r=t.extraProviders||[],s=new Set(t.removeProviders),o=n.concat(r).filter(a=>{const l=a.name;return l?!s.has(l):(Kt("media-embed-no-provider-name",{provider:a}),!1)});this.locale=e,this.providerDefinitions=o}hasMedia(e){return!!this._getMedia(e)}getMediaViewElement(e,t,n){return this._getMedia(t).getViewElement(e,n)}_getMedia(e){if(!e)return new r9(this.locale);e=e.trim();for(const t of this.providerDefinitions){const n=t.html,r=mn(t.url);for(const s of r){const o=this._getUrlMatches(e,s);if(o)return new r9(this.locale,e,o,n)}}return null}_getUrlMatches(e,t){let n=e.match(t);if(n)return n;let r=e.replace(/^https?:\/\//,"");return n=r.match(t),n||(r=r.replace(/^www\./,""),n=r.match(t),n)?n:null}}class r9{url;_locale;_match;_previewRenderer;constructor(e,t,n,r){this.url=this._getValidUrl(t),this._locale=e,this._match=n,this._previewRenderer=r}getViewElement(e,t){const n={};let r;if(t.renderForEditingView||t.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(n["data-oembed-url"]=this.url),t.renderForEditingView&&(n.class="ck-media__wrapper");const s=this._getPreviewHtml(t);r=e.createRawElement("div",n,(o,a)=>{a.setContentOf(o,s)})}else this.url&&(n.url=this.url),r=e.createEmptyElement(t.elementName,n);return e.setCustomProperty("media-content",!0,r),r}_getPreviewHtml(e){return this._previewRenderer?this._previewRenderer(this._match):this.url&&e.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const e=new Go,t=this._locale.t;return e.content=BTe,e.viewBox=tRe,new as({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[e]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url,"data-cke-tooltip-text":t("Open media in new tab")},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]}]}]}).render().outerHTML}_getValidUrl(e){return e?e.match(/^https?/)?e:"https://"+e:null}}class dx extends be{static get pluginName(){return"MediaEmbedEditing"}static get isOfficialPlugin(){return!0}registry;constructor(e){super(e),e.config.define("mediaEmbed",{elementName:"oembed",providers:[{name:"dailymotion",url:[/^dailymotion\.com\/video\/(\w+)/,/^dai.ly\/(\w+)/],html:t=>`<div style="position: relative; padding-bottom: 100%; height: 0; "><iframe src="https://www.dailymotion.com/embed/video/${t[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" width="480" height="270" allowfullscreen allow="autoplay"></iframe></div>`},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:t=>`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 126%;"><iframe src="https://open.spotify.com/embed/${t[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe></div>`},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)(?:&t=(\d+))?/,/^(?:m\.)?youtube\.com\/shorts\/([\w-]+)(?:\?t=(\d+))?/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)(?:\?t=(\d+))?/,/^youtube\.com\/embed\/([\w-]+)(?:\?start=(\d+))?/,/^youtu\.be\/([\w-]+)(?:\?t=(\d+))?/],html:t=>{const n=t[1],r=t[2];return`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;"><iframe src="https://www.youtube.com/embed/${n}${r?`?start=${r}`:""}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" allow="autoplay;
51 encrypted-media" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>`}},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^/]+\/(\d+)/,/^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:t=>`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;"><iframe src="https://player.vimeo.com/video/${t[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>`},{name:"instagram",url:[/^instagram\.com\/p\/(\w+)/,/^instagram\.com\/reel\/(\w+)/]},{name:"twitter",url:[/^twitter\.com/,/^x\.com/]},{name:"googleMaps",url:[/^google\.com\/maps/,/^goo\.gl\/maps/,/^maps\.google\.com/,/^maps\.app\.goo\.gl/]},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]}),this.registry=new nRe(e.locale,e.config.get("mediaEmbed"))}init(){const e=this.editor,t=e.model.schema,n=e.t,r=e.conversion,s=e.config.get("mediaEmbed.previewsInData"),o=e.config.get("mediaEmbed.elementName"),a=this.registry;e.commands.add("mediaEmbed",new Z6e(e)),t.register("media",{inheritAllFrom:"$blockObject",allowAttributes:["url"]}),r.for("dataDowncast").elementToStructure({model:"media",view:(l,{writer:c})=>{const d=l.getAttribute("url");return n9(c,a,d,{elementName:o,renderMediaPreview:!!d&&s})}}),r.for("dataDowncast").add(t9(a,{elementName:o,renderMediaPreview:s})),r.for("editingDowncast").elementToStructure({model:"media",view:(l,{writer:c})=>{const d=l.getAttribute("url"),f=n9(c,a,d,{elementName:o,renderForEditingView:!0});return Q6e(f,c,n("media widget"))}}),r.for("editingDowncast").add(t9(a,{elementName:o,renderForEditingView:!0})),r.for("upcast").elementToElement({view:l=>["oembed",o].includes(l.name)&&l.getAttribute("url")?{name:!0}:null,model:(l,{writer:c})=>{const d=l.getAttribute("url");return a.hasMedia(d)?c.createElement("media",{url:d}):null}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(l,{writer:c})=>{const d=l.getAttribute("data-oembed-url");return a.hasMedia(d)?c.createElement("media",{url:d}):null}}).add(l=>{const c=(d,f,m)=>{if(!m.consumable.consume(f.viewItem,{name:!0,classes:"media"}))return;const{modelRange:p,modelCursor:g}=m.convertChildren(f.viewItem,f.modelCursor);f.modelRange=p,f.modelCursor=g,Rn(p.getItems())||m.consumable.revert(f.viewItem,{name:!0,classes:"media"})};l.on("element:figure",c)})}}const iRe=/^(?:http(s)?:\/\/)?[\w-]+\.[\w-.~:/?#[\]@!$&'()*+,;=%]+$/;class rRe extends be{static get requires(){return[HK,Nl,v4]}static get pluginName(){return"AutoMediaEmbed"}static get isOfficialPlugin(){return!0}_timeoutId;_positionToInsert;constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document,n=e.plugins.get("ClipboardPipeline");this.listenTo(n,"inputTransformation",()=>{const s=t.selection.getFirstRange(),o=di.fromPosition(s.start);o.stickiness="toPrevious";const a=di.fromPosition(s.end);a.stickiness="toNext",t.once("change:data",()=>{this._embedMediaBetweenPositions(o,a),o.detach(),a.detach()},{priority:"high"})}),e.commands.get("undo").on("execute",()=>{this._timeoutId&&($e.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedMediaBetweenPositions(e,t){const n=this.editor,r=n.plugins.get(dx).registry,s=new is(e,t),o=s.getWalker({ignoreElementEnd:!0});let a="";for(const c of o)c.item.is("$textProxy")&&(a+=c.item.data);if(a=a.trim(),!a.match(iRe)){s.detach();return}if(!r.hasMedia(a)){s.detach();return}if(!n.commands.get("mediaEmbed").isEnabled){s.detach();return}this._positionToInsert=di.fromPosition(e),this._timeoutId=$e.window.setTimeout(()=>{n.model.change(c=>{this._timeoutId=null,c.remove(s),s.detach();let d=null;this._positionToInsert.root.rootName!=="$graveyard"&&(d=this._positionToInsert),FX(n.model,a,d,!1),this._positionToInsert.detach(),this._positionToInsert=null}),n.plugins.get(Nl).requestUndoOnBackspace()},100)}}class sRe extends Ge{focusTracker;keystrokes;urlInputView;_validators;_urlInputViewInfoDefault;_urlInputViewInfoTip;constructor(e,t){super(t),this.focusTracker=new Fn,this.keystrokes=new qn,this.set("mediaURLInputValue",""),this.urlInputView=this._createUrlInput(),this._val
51idators=e,this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form","ck-responsive-form"],tabindex:"-1"},children:[this.urlInputView]})}render(){super.render(),Xc({view:this}),this.focusTracker.add(this.urlInputView.element),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.urlInputView.focus()}get url(){return this.urlInputView.fieldView.element.value.trim()}set url(e){this.urlInputView.fieldView.value=e.trim()}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const e=this.locale.t,t=new hi(this.locale,Is),n=t.fieldView;return this._urlInputViewInfoDefault=e("Paste the media URL in the input."),this._urlInputViewInfoTip=e("Tip: Paste the URL into the content to embed faster."),t.label=e("Media URL"),t.infoText=this._urlInputViewInfoDefault,n.inputMode="url",n.on("input",()=>{t.infoText=n.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault,this.mediaURLInputValue=n.element.value.trim()}),t}}class oRe extends be{static get requires(){return[dx,As]}static get pluginName(){return"MediaEmbedUI"}static get isOfficialPlugin(){return!0}_formView;init(){const e=this.editor;e.ui.componentFactory.add("mediaEmbed",()=>{const t=this.editor.locale.t,n=this._createDialogButton(nt);return n.tooltip=!0,n.label=t("Insert media"),n}),e.ui.componentFactory.add("menuBar:mediaEmbed",()=>{const t=this.editor.locale.t,n=this._createDialogButton(gn);return n.label=t("Media"),n})}_createDialogButton(e){const t=this.editor,n=new e(t.locale),r=t.commands.get("mediaEmbed"),s=this.editor.plugins.get("Dialog");return n.icon=MTe,n.bind("isEnabled").to(r,"isEnabled"),n.on("execute",()=>{s.id==="mediaEmbed"?s.hide():this._showDialog()}),n}_showDialog(){const e=this.editor,t=e.plugins.get("Dialog"),n=e.commands.get("mediaEmbed"),r=e.locale.t,s=n.value!==void 0;if(!this._formView){const o=e.plugins.get(dx).registry;this._formView=new(Mh(sRe))(aRe(e.t,o),e.locale),this._formView.on("submit",()=>this._handleSubmitForm())}t.show({id:"mediaEmbed",title:r("Media embed"),content:this._formView,isModal:!0,onShow:()=>{this._formView.url=n.value||"",this._formView.resetFormStatus(),this._formView.urlInputView.fieldView.select()},actionButtons:[{label:r("Cancel"),withText:!0,onExecute:()=>t.hide()},{label:r(s?"Save":"Insert"),class:"ck-button-action",withText:!0,onExecute:()=>this._handleSubmitForm()}]})}_handleSubmitForm(){const e=this.editor,t=e.plugins.get("Dialog");this._formView.isValid()&&(e.execute("mediaEmbed",this._formView.url),t.hide(),e.editing.view.focus())}}function aRe(i,e){return[t=>{if(!t.url.length)return i("The URL must not be empty.")},t=>{if(!e.hasMedia(t.url))return i("This media URL is not supported.")}]}class lRe extends be{static get requires(){return[dx,oRe,rRe,Qc]}static get pluginName(){return"MediaEmbed"}static get isOfficialPlugin(){return!0}}const s9={"(":")","[":"]","{":"}"};class cRe extends ut{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"mention")}execute(e){const t=this.editor.model,r=t.document.selection,s=typeof e.mention=="string"?{id:e.mention}:e.mention,o=s.id,a=e.range||r.getFirstRange();if(!t.canEditAt(a))return;const l=e.text||o,c=OX({_text:l,id:o},s);if(!o.startsWith(e.marker))throw new oe("mentioncommand-incorrect-id",this);t.change(d=>{const f=ka(r.getAttributes()),m=new Map(f.entries());m.set("mention",c);const p=t.insertContent(d.createText(l,m),a),g=p.start.nodeBefore,y=p.end.nodeAfter,v=y&&y.is("$text")&&y.data.startsWith(" ");let x=!1;if(g&&y&&g.is("$text")&&y.is("$text")){const C=g.data.slice(-1),D=C in s9,E=D&&y.data.startsWith(s9[C]);x=D&&E}!x&&!v&&t.insertContent(d.createText(" ",f),a.start.getShiftedBy(l.length))})}}class uRe extends be{static get pluginName(){return"MentionEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model,n=t.document;t.schema.extend("$text",{allowAttributes:"mention"}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",attributes:"data-mention",classes:"mention"},model:{key:"mention",value:r=>NX(r)}}),e.conversion.for("downcast").attributeToElement({model:"mention",view:fRe}),e.conversion.for("downcast").add(dRe),n.registerPostFixer(r=>pRe(r,n,t.schema)),n.registerPostFixer(r=>gRe(r,n)),n.registerPostFixer(r=>hRe(r,n)),e.commands.add("mention",new cRe(e))}}function OX(i,e){return Object.assign({uid:rr()},i,e||{})}function NX(i,e){const t=i.getAttribute("data-mention"),n=i.getChild(0);if(!n)return;const r={id:t,_text:n.data};return OX(r,e)}function dRe(i){i.on("attribute:mention",(e,t,n)=>{const r=t.attributeNewValue;if(!t.item.is("$textProxy")||!r)return;const s=t.range.start;(s.textNode||s.nodeAfter).data!=r._text&&n.consumable.consume(t.item,e.name)},{priority:"highest"})}function fRe(i,{writer:e}){if(!i)return;const t={class:"mention","data-mention":i.id},n={id:i.uid,priority:20};return e.createAttributeElement("span",t,n)}function hRe(i,e){const t=e.selection,n=t.focus;return t.isCollapsed&&t.hasAttribute("mention")&&mRe(n)?(i.removeSelectionAttribute("mention"),!0):!1}function mRe(i){const e=i.isAtStart;return i.nodeBefore&&i.nodeBefore.is("$text")||e}function pRe(i,e,t){const n=e.differ.getChanges();let r=!1;for(const s of n){if(s.type=="attribute")continue;const o=s.position;if(s.name=="$text"){const a=o.textNode&&o.textNode.nextSibling;r=ku(o.textNode,i)||r,r=ku(a,i)||r,r=ku(o.nodeBefore,i)||r,r=ku(o.nodeAfter,i)||r}if(s.name!="$text"&&s.type=="insert"){const a=o.nodeAfter;for(const l of i.createRangeIn(a).getItems())r=ku(l,i)||r}if(s.type=="insert"&&t.isInline(s.name)){const a=o.nodeAfter&&o.nodeAfter.nextSibling;r=ku(o.nodeBefore,i)||r,r=ku(a,i)||r}}return r}function gRe(i,e){const t=e.differ.getChanges();let n=!1;for(const r of t)if(r.type==="attribute"&&r.attributeKey!="mention"){const s=r.range.start.nodeBefore,o=r.range.end.nodeAfter;for(const a of[s,o])BX(a)&&a.getAttribute(r.attributeKey)!=r.attributeNewValue&&(i.setAttribute(r.attributeKey,r.attributeNewValue,a),n=!0)}return n}function BX(i){if(!i||!(i.is("$text")||i.is("$textProxy"))||!i.hasAttribute("mention"))return!1;const e=i.data,n=i.getAttribute("mention")._text;return e!=n}function ku(i,e){return BX(i)?(e.removeAttribute("mention",i),!0):!1}class bRe extends vd{selected;position;constructor(e){super(e),this.extendTemplate({attributes:{class:["ck-mentions"],tabindex:"-1"}})}selectFirst(){this.select(0)}selectNext(){const e=this.selected,t=this.items.getIndex(e);this.select(t+1)}selectPrevious(){const e=this.selected,t=this.items.getIndex(e);this.select(t-1)}select(e){let t=0;e>0&&e<this.items.length?t=e:e<0&&(t=this.items.length-1);const n=this.items.get(t);this.selected!==n&&(this.selected&&this.selected.removeHighlight(),n.highlight(),this.selected=n,this._isItemVisibleInScrolledArea(n)||(this.element.scrollTop=n.element.offsetTop))}executeSelected(){this.selected.fire("execute")}_isItemVisibleInScrolledArea(e){return new gt(this.element).contains(new gt(e.element))}}class yRe extends Ge{domElement;constructor(e,t){super(e),this.template=void 0,this.domElement=t,this.domElement.classList.add("ck-button"),this.set("isOn",!1),this.on("change:isOn",(n,r,s)=>{s?(this.domElement.classList.add("ck-on"),this.domElement.classList.remove("ck-off")):(this.domElement.classList.add("ck-off"),this.domElement.classList.remove("ck-on"))}),this.listenTo(this.domElement,"click",()=>{this.fire("execute")})}render(){super.render(),this.element=this.domElement}focus(){this.domElement.focus()}}class vRe extends ho{item;marker;highlight(){const e=this.children.first;e.isOn=!0}removeHighlight(){const e=this.children.first;e.isOn=!1}}const zy=3,wRe=[At.arrowup,At.arrowdown,At.esc],xRe=[At.enter,At.tab];class _Re extends be{_mentionsView;_mentionsConfigurations;_balloon;_items=new Jn;_lastRequested;_requestFeedDebounced;static get pluginName(){return"MentionUI"}static get isOfficialPlugin(){return!0}
51static get requires(){return[zo]}constructor(e){super(e),this._mentionsView=this._createMentionView(),this._mentionsConfigurations=new Map,this._requestFeedDebounced=fo(this._requestFeed,100),e.config.define("mention",{feeds:[]})}init(){const e=this.editor,t=e.config.get("mention.commitKeys")||xRe,n=wRe.concat(t);this._balloon=e.plugins.get(zo),e.editing.view.document.on("keydown",(o,a)=>{s(a.keyCode)&&this._isUIVisible&&(a.preventDefault(),o.stop(),a.keyCode==At.arrowdown&&this._mentionsView.selectNext(),a.keyCode==At.arrowup&&this._mentionsView.selectPrevious(),t.includes(a.keyCode)&&this._mentionsView.executeSelected(),a.keyCode==At.esc&&this._hideUIAndRemoveMarker())},{priority:"highest"}),Kc({emitter:this._mentionsView,activator:()=>this._isUIVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUIAndRemoveMarker()});const r=e.config.get("mention.feeds");for(const o of r){const{feed:a,marker:l,dropdownLimit:c}=o;if(!SRe(l))throw new oe("mentionconfig-incorrect-marker",null,{marker:l});const d=typeof a=="function"?a.bind(this.editor):TRe(a),f=o.itemRenderer,m={marker:l,feedCallback:d,itemRenderer:f,dropdownLimit:c};this._mentionsConfigurations.set(l,m)}this._setupTextWatcher(r),this.listenTo(e,"change:isReadOnly",()=>{this._hideUIAndRemoveMarker()}),this.on("requestFeed:response",(o,a)=>this._handleFeedResponse(a)),this.on("requestFeed:error",()=>this._hideUIAndRemoveMarker());function s(o){return n.includes(o)}}destroy(){super.destroy(),this._mentionsView.destroy()}get _isUIVisible(){return this._balloon.visibleView===this._mentionsView}_createMentionView(){const e=this.editor.locale,t=new bRe(e);return t.items.bindTo(this._items).using(n=>{const{item:r,marker:s}=n,{dropdownLimit:o}=this._mentionsConfigurations.get(s),a=o||this.editor.config.get("mention.dropdownLimit")||10;if(t.items.length>=a)return null;const l=new vRe(e),c=this._renderItem(r,s);return c.delegate("execute").to(l),l.children.add(c),l.item=r,l.marker=s,l.on("execute",()=>{t.fire("execute",{item:r,marker:s})}),l}),t.on("execute",(n,r)=>{const s=this.editor,o=s.model,a=r.item,l=r.marker,c=s.model.markers.get("mention"),d=o.createPositionAt(o.document.selection.focus),f=o.createPositionAt(c.getStart()),m=o.createRange(f,d);this._hideUIAndRemoveMarker(),s.execute("mention",{mention:a,text:a.text,marker:l,range:m}),s.editing.view.focus()}),t}_getItemRenderer(e){const{itemRenderer:t}=this._mentionsConfigurations.get(e);return t}_requestFeed(e,t){this._lastRequested=t;const{feedCallback:n}=this._mentionsConfigurations.get(e),r=n(t);if(!(r instanceof Promise)){this.fire("requestFeed:response",{feed:r,marker:e,feedText:t});return}r.then(o=>{this._lastRequested==t?this.fire("requestFeed:response",{feed:o,marker:e,feedText:t}):this.fire("requestFeed:discarded",{feed:o,marker:e,feedText:t})}).catch(o=>{this.fire("requestFeed:error",{error:o}),Kt("mention-feed-callback-error",{marker:e})})}_setupTextWatcher(e){const t=this.editor,n=e.map(o=>({...o,pattern:LX(o.marker,o.minimumCharacters||0)})),r=new RK(t.model,DRe(n));r.on("matched",(o,a)=>{const l=MX(n,a.text),d=t.model.document.selection.focus,f=t.model.createPositionAt(d.parent,l.position);if(ARe(d)||kRe(f)){this._hideUIAndRemoveMarker();return}const m=ERe(l,a.text),p=l.marker.length+m.length,g=d.getShiftedBy(-p),y=d.getShiftedBy(-m.length),v=t.model.createRange(g,y);if(vT(t)){const x=t.model.markers.get("mention");t.model.change(C=>{C.updateMarker(x,{range:v})})}else t.model.change(x=>{x.addMarker("mention",{range:v,usingOperation:!1,affectsData:!1})});this._requestFeedDebounced(l.marker,m)}),r.on("unmatched",()=>{this._hideUIAndRemoveMarker()});const s=t.commands.get("mention");return r.bind("isEnabled").to(s),r}_handleFeedResponse(e){const{feed:t,marker:n}=e;if(!vT(this.editor))return;this._items.clear();for(const s of t){const o=typeof s!="object"?{id:s,text:s}:s;this._items.add({item:o,marker:n})}const r=this.editor.model.markers.get("mention");this._items.length?this._showOrUpdateUI(r):this._hideUIAndRemoveMarker()}_showOrUpdateUI(e){this._isUIVisible?this._balloon.updatePosition(this._getBalloonPanelPositionData(e,this._mentionsView.position)):this._balloon.add({view:this._mentionsView,position:this._getBalloonPanelPositionData(e,this._mentionsView.position),singleViewMode:!0,balloonClassName:"ck-mention-balloon"}),this._mentionsView.position=this._balloon.view.position,this._mentionsView.selectFirst()}_hideUIAndRemoveMarker(){this._balloon.hasView(this._mentionsView)&&this._balloon.remove(this._mentionsView),vT(this.editor)&&this.editor.model.change(e=>e.removeMarker("mention")),this._mentionsView.position=void 0}_renderItem(e,t){const n=this.editor;let r,s=e.id;const o=this._getItemRenderer(t);if(o){const a=o(e);typeof a!="string"?r=new yRe(n.locale,a):s=a}if(!r){const a=new nt(n.locale);a.label=s,a.withText=!0,r=a}return r}_getBalloonPanelPositionData(e,t){const n=this.editor,r=n.editing,s=r.view.domConverter,o=r.mapper,a=n.locale.uiLanguageDirection;return{target:()=>{let l=e.getRange();l.start.root.rootName=="$graveyard"&&(l=n.model.document.selection.getFirstRange());const c=o.toViewRange(l);return gt.getDomRangeRects(s.viewRangeToDom(c)).pop()},limiter:()=>{const l=this.editor.editing.view,d=l.document.selection.editableElement;return d?l.domConverter.mapViewToDom(d.root):null},positions:CRe(t,a)}}}function CRe(i,e){const t={caret_se:n=>({top:n.bottom+zy,left:n.right,name:"caret_se",config:{withArrow:!1}
51}),caret_ne:(n,r)=>({top:n.top-r.height-zy,left:n.right,name:"caret_ne",config:{withArrow:!1}}),caret_sw:(n,r)=>({top:n.bottom+zy,left:n.right-r.width,name:"caret_sw",config:{withArrow:!1}}),caret_nw:(n,r)=>({top:n.top-r.height-zy,left:n.right-r.width,name:"caret_nw",config:{withArrow:!1}})};return Object.prototype.hasOwnProperty.call(t,i)?[t[i]]:e!=="rtl"?[t.caret_se,t.caret_sw,t.caret_ne,t.caret_nw]:[t.caret_sw,t.caret_se,t.caret_nw,t.caret_ne]}function MX(i,e){let t;for(const n of i){const r=e.lastIndexOf(n.marker);r>0&&!e.substring(r-1).match(n.pattern)||(!t||r>=t.position)&&(t={marker:n.marker,position:r,minimumCharacters:n.minimumCharacters,pattern:n.pattern})}return t}function LX(i,e){const t=e==0?"*":`{${e},}`,n=ot.features.isRegExpUnicodePropertySupported?`\\p{Ps}\\p{Pi}"'`:`\\(\\[{"'`,r=".";i=i.replace(/[.*+?^${}()\-|[\]\\]/g,"\\$&");const s=`(?:^|[ ${n}])(${i})(${r}${t})$`;return new RegExp(s,"u")}function DRe(i){return t=>{const n=MX(i,t);if(!n)return!1;let r=0;n.position!==0&&(r=n.position-1);const s=t.substring(r);return n.pattern.test(s)}}function ERe(i,e){let t=0;i.position!==0&&(t=i.position-1);const n=LX(i.marker,0);return e.substring(t).match(n)[2]}function TRe(i){return e=>i.filter(n=>(typeof n=="string"?n:String(n.id)).toLowerCase().includes(e.toLowerCase()))}function ARe(i){const e=i.textNode&&i.textNode.hasAttribute("mention"),t=i.nodeBefore;return e||t&&t.is("$text")&&t.hasAttribute("mention")}function kRe(i){const e=i.nodeAfter;return e&&e.is("$text")&&e.hasAttribute("mention")}function SRe(i){return!!i}function vT(i){return i.model.markers.has("mention")}class PRe extends be{toMentionAttribute(e,t){return NX(e,t)}static get pluginName(){return"Mention"}static get isOfficialPlugin(){return!0}static get requires(){return[uRe,_Re]}}class IRe extends ut{refresh(){const e=this.editor.model,t=e.schema,n=e.document.selection;this.isEnabled=RRe(n,t,e)}execute(){const e=this.editor.model;e.change(t=>{const n=t.createElement("pageBreak");e.insertObject(n,null,null,{setSelection:"after"})})}}function RRe(i,e,t){const n=FRe(i,t);return e.checkChild(n,"pageBreak")}function FRe(i,e){const n=S_(i,e).start.parent;return n.isEmpty&&!n.is("element","$root")?n.parent:n}class ORe extends be{static get pluginName(){return"PageBreakEditing"}static get licenseFeatureCode(){return"PB"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const e=this.editor,t=e.model.schema,n=e.t,r=e.conversion;t.register("pageBreak",{inheritAllFrom:"$blockObject"}),r.for("dataDowncast").elementToStructure({model:"pageBreak",view:(s,{writer:o})=>o.createContainerElement("div",{class:"page-break",style:"page-break-after: always"},o.createContainerElement("span",{style:"display: none"}))}),r.for("editingDowncast").elementToStructure({model:"pageBreak",view:(s,{writer:o})=>{const a=n("Page break"),l=o.createContainerElement("div"),c=o.createRawElement("span",{class:"page-break__label"},function(d){d.innerText=n("Page break")});return o.addClass("page-break",l),o.insert(o.createPositionAt(l,0),c),NRe(l,o,a)}}),r.for("upcast").elementToElement({view:s=>{const o=s.getStyle("page-break-before")=="always",a=s.getStyle("page-break-after")=="always";if(!o&&!a)return null;if(s.childCount==1){const l=s.getChild(0);if(!l.is("element","span")||l.getStyle("display")!="none")return null}else if(s.childCount>1)return null;return{name:!0,styles:[...o?["page-break-before"]:[],...a?["page-break-after"]:[]],...s.hasClass("page-break")&&{classes:["page-break"]}}},model:"pageBreak",converterPriority:"high"}),e.commands.add("pageBreak",new IRe(e))}}function NRe(i,e,t){return e.setCustomProperty("pageBreak",!0,i),_d(i,e,{label:t})}class BRe extends be{static get pluginName(){return"PageBreakUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("pageBreak",()=>{const t=this._createButton(nt);return t.set({tooltip:!0}),t}),e.ui.componentFactory.add("menuBar:pageBreak",()=>this._createButton(gn))}_createButton(e){const t=this.editor,n=t.locale,r=t.commands.get("pageBreak"),s=new e(t.locale),o=n.t;return s.set({label:o("Page break"),icon:qTe}),s.bind("isEnabled").to(r,"isEnabled"),this.listenTo(s,"execute",()=>{t.execute("pageBreak"),t.editing.view.focus()}),s}}class MRe extends be{static get requires(){return[ORe,BRe,Qc]}static get pluginName(){return"PageBreak"}static get isOfficialPlugin(){return!0}}const Wy="removeFormat";class LRe extends be{static get pluginName(){return"RemoveFormatUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add(Wy,()=>{const t=this._createButton(nt);return t.set({tooltip:!0}),t}),e.ui.componentFactory.add(`menuBar:${Wy}`,()=>this._createButton(gn))}_createButton(e){const t=this.editor,n=t.locale,r=t.commands.get(Wy),s=new e(t.locale),o=n.t;return s.set({label:o("Remove Format"),icon:JTe}),s.bind("isEnabled").to(r,"isEnabled"),this.listenTo(s,"execute",()=>{t.execute(Wy),t.editing.view.focus()}),s}}class URe extends ut{_customAttributesHandlers=[];refresh(){const e=this.editor.model;this.isEnabled=!!Rn(this._getFormattingItems(e.document.selection))}execute(){const e=this.editor.model;e.change(t=>{for(const n of this._getFormattingItems(e.document.selection))if(n.is("selection"))for(const r of this._getFormattingAttributes(n))t.removeSelectionAttribute(r);else{const r=t.createRangeOn(n);for(const s of this._getFormattingAttributes(n))this._removeFormatting(s,n,r,t)}})}registerCustomAttribute(e,t){this._customAttributesHandlers.push({isFormatting:e,removeFormatting:t})}_removeFormatting(e,t,n,r){let s=!1;for(const{isFormatting:o,removeFormatting:a}of this._customAttributesHandlers)o(e,t)&&(a(e,n,r),s=!0);s||r.removeAttribute(e,n)}*_getFormattingItems(e){const t=this.editor.model,n=t.schema,r=s=>!!Rn(this._getFormattingAttributes(s));for(const s of e.getRanges())for(const o of s.getItems())n.isBlock(o)&&s.end.isTouching(t.createPositionAt(o,0))||r(o)&&(yield o);for(const s of e.getSelectedBlocks())r(s)&&(yield s);r(e)&&(yield e)}*_getFormattingAttributes(e){const t=this.editor.model.schema;for(const[n]of e.getAttributes()){for(const{isFormatting:s}of this._customAttributesHandlers)s(n,e)&&(yield n);const r=t.getAttributeProperties(n);r&&r.isFormatting&&(yield n)}}}class VRe extends be{static get pluginName(){return"RemoveFormatEditing"}static get licenseFeatureCode(){return"RF"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const e=this.editor;e.commands.add("removeFormat",new URe(e))}}class jRe extends be{static get requires(){return[VRe,LRe]}static get pluginName(){return"RemoveFormat"}static get isOfficialPlugin(){return!0}}const Hy="SourceEditingMode";class zRe extends be{static get pluginName(){return"SourceEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Qw]}_elementReplacer;_replacedRoots;_dataFromRoots;constructor(e){super(e),this.set("isSourceEditingMode",!1),this._elementReplacer=new xG,this._replacedRoots=new Map,this._dataFromRoots=new Map,e.config.define("sourceEditing.allowCollaborationFeatures",!1)}init(){this._checkCompatibility();const e=this.editor,t=e.locale.t;e.ui.componentFactory.add("sourceEditing",()=>{const n=this._createButton(nt);return n.set({label:t("Source"),icon:iAe,tooltip:!0,class:"ck-source-editing-button"}),n}),e.ui.componentFactory.add("menuBar:sourceEditing",()=>{const n=this._createButton(gn);return n.set({label:t("Show source"),role:"menuitemcheckbox"}),n}),this._isAllowedToHandleSourceEditingMode()&&(this.on("change:isSourceEditingMode",(n,r,s)=>{s?(this._hideVisibleDialog(),this._showSourceEditing(),this._disableCommands()):(this._hideSourceEditing(),this._enableCommands())}),this.on("change:isEnabled",(n,r,s)=>this._handleReadOnlyMode(!s)),this.listenTo(e,"change:isReadOnly",(n,r,s)=>this._handleReadOnlyMode(s))),e.data.on("get",()=>{this.isSourceEditingMode&&this.updateEditorData()},{priority:"high"})}updateEditorData(){const e=this.editor,t={};for(const[n,r]of this._replacedRoots){const s=this._dataFromRoots.get(n),o=r.dataset.value;s!==o&&(t[n]=o,this._dataFromRoots.set(n,o))}Object.keys(t).length&&e.data.set(t,{batchType:{isUndoable:!0},suppressErrorInCollaboration:!0})}_checkCompatibility(){const e=this.editor,t=e.config.get("sourceEditing.allowCollaborationFeatures");if(!t&&e.plugins.has("RealTimeCollaborativeEditing"))throw new oe("source-editing-incompatible-with-real-time-collaboration",null);!t&&["CommentsEditing","TrackChangesEditing","RevisionHistory"].some(r=>e.plugins.has(r))&&console.warn("You initialized the editor with the source editing feature and at least one of the collaboration features. Please be advised that the source editing feature may not work, and be careful when editing document source that c
51ontains markers created by the collaboration features."),e.plugins.has("RestrictedEditingModeEditing")&&console.warn("You initialized the editor with the source editing feature and restricted editing feature. Please be advised that the source editing feature may not work, and be careful when editing document source that contains markers created by the restricted editing feature.")}_showSourceEditing(){const e=this.editor,t=e.editing.view,n=e.model;n.change(r=>{r.setSelection(null),r.removeSelectionAttribute(n.document.selection.getAttributeKeys())});for(const[r,s]of t.domRoots){const o=WRe(e.data.get({rootName:r})),a=Ts(s.ownerDocument,"textarea",{rows:"1","aria-label":"Source code editing area"}),l=Ts(s.ownerDocument,"div",{class:"ck-source-editing-area","data-value":o},[a]);a.value=o,a.setSelectionRange(0,0),a.addEventListener("input",()=>{l.dataset.value=a.value,e.ui.update()}),t.change(c=>{const d=t.document.getRoot(r);c.addClass("ck-hidden",d)}),e.ui.setEditableElement("sourceEditing:"+r,a),this._replacedRoots.set(r,l),this._elementReplacer.replace(s,l),this._dataFromRoots.set(r,o)}this._hideDocumentOutline(),this._refreshAnnotationsVisibility(),this._focusSourceEditing()}_hideSourceEditing(){const t=this.editor.editing.view;this.updateEditorData(),t.change(n=>{for(const[r]of this._replacedRoots)n.removeClass("ck-hidden",t.document.getRoot(r))}),this._elementReplacer.restore(),this._replacedRoots.clear(),this._dataFromRoots.clear(),this._showDocumentOutline(),this._refreshAnnotationsVisibility(),t.focus()}_hideDocumentOutline(){this.editor.plugins.has("DocumentOutlineUI")&&(this.editor.plugins.get("DocumentOutlineUI").view.element.style.display="none")}_showDocumentOutline(){this.editor.plugins.has("DocumentOutlineUI")&&(this.editor.plugins.get("DocumentOutlineUI").view.element.style.display="")}_refreshAnnotationsVisibility(){this.editor.plugins.has("Annotations")&&this.editor.plugins.get("Annotations").refreshVisibility()}_focusSourceEditing(){const e=this.editor,[t]=this._replacedRoots.values(),n=t.querySelector("textarea");e.editing.view.document.isFocused=!1,n.focus()}_disableCommands(){const e=this.editor;for(const t of e.commands.commands())t.forceDisabled(Hy);e.plugins.has("CommentsArchiveUI")&&e.plugins.get("CommentsArchiveUI").forceDisabled(Hy)}_enableCommands(){const e=this.editor;for(const t of e.commands.commands())t.clearForceDisabled(Hy);e.plugins.has("CommentsArchiveUI")&&e.plugins.get("CommentsArchiveUI").clearForceDisabled(Hy)}_handleReadOnlyMode(e){if(this.isSourceEditingMode)for(const[,t]of this._replacedRoots)t.querySelector("textarea").readOnly=e}_isAllowedToHandleSourceEditingMode(){const t=this.editor.ui.view.editable;return t&&!t.hasExternalElement}_hideVisibleDialog(){if(this.editor.plugins.has("Dialog")){const e=this.editor.plugins.get("Dialog");e.isOpen&&e.hide()}}_createButton(e){const t=this.editor,n=new e(t.locale);return n.set({withText:!0,isToggleable:!0}),n.bind("isOn").to(this,"isSourceEditingMode"),n.bind("isEnabled").to(this,"isEnabled",t,"isReadOnly",t.plugins.get(Qw),"hasAny",(r,s,o)=>!(!r||s||o)),this.listenTo(n,"execute",()=>{this.isSourceEditingMode=!this.isSourceEditingMode}),n}}function WRe(i){return HRe(i)?F_e(i):i}function HRe(i){return i.startsWith("<")}class qRe extends Ge{tiles;focusTracker;keystrokes;constructor(e){super(e),this.tiles=this.createCollection(),this.setTemplate({tag:"div",children:[{tag:"div",attributes:{class:["ck","ck-character-grid__tiles"]},children:this.tiles}],attributes:{class:["ck","ck-character-grid"]}}),this.focusTracker=new Fn,this.keystrokes=new qn,c4({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.tiles,numberOfColumns:()=>$e.window.getComputedStyle(this.element.firstChild).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}createTile(e,t){const n=new nt(this.locale);return n.set({label:e,withText:!0,class:"ck-character-grid__tile"}),n.extendTemplate({attributes:{title:t},on:{mouseover:n.bindTemplate.to("mouseover"),focus:n.bindTemplate.to("focus")}}),n.on("mouseover",()=>{this.fire("tileHover",{name:t,character:e})}),n.on("focus",()=>{this.fire("tileFocus",{name:t,character:e})}),n.on("execute",()=>{this.fire("execute",{name:t,character:e})}),n}render(){super.render();for(const e of this.tiles)this.focusTracker.add(e.element);this.tiles.on("change",(e,{added:t,removed:n})=>{if(t.length>0)for(const r of t)this.focusTracker.add(r.element);if(n.length>0)for(const r of n)this.focusTracker.remove(r.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.keystrokes.destroy()}focus(){this.tiles.first.focus()}}class $Re extends Ge{constructor(e){super(e);const t=this.bindTemplate;this.set("character",null),this.set("name",null),this.bind("code").to(this,"character",GRe),this.setTemplate({tag:"div",children:[{tag:"span",attributes:{class:["ck-character-info__name"]},children:[{text:t.to("name",n=>n||"​")}]},{tag:"span",attributes:{class:["ck-character-info__code"]}
51,children:[{text:t.to("code")}]}],attributes:{class:["ck","ck-character-info"]}})}}function GRe(i){return i===null?"":"U+"+("0000"+i.codePointAt(0).toString(16)).slice(-4)}class YRe extends Ge{items;focusTracker;keystrokes;_focusCycler;categoriesView;gridView;infoView;constructor(e,t,n,r){super(e),this.categoriesView=t,this.gridView=n,this.infoView=r,this.items=this.createCollection(),this.focusTracker=new Fn,this.keystrokes=new qn,this._focusCycler=new or({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",children:[this.categoriesView,this.gridView,this.infoView],attributes:{tabindex:"-1"}}),this.items.add(this.categoriesView),this.items.add(this.gridView)}render(){super.render(),this.focusTracker.add(this.categoriesView.element),this.focusTracker.add(this.gridView.element),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}class KRe extends Ge{_groupNames;_dropdownView;constructor(e,t){super(e),this.set("currentGroupName",Array.from(t.entries())[0][0]),this._groupNames=t,this._dropdownView=new hi(e,f4),this.setTemplate({tag:"div",attributes:{class:["ck","ck-character-categories"]},children:[this._dropdownView]})}render(){super.render(),this._setupDropdown()}focus(){this._dropdownView.focus()}_setupDropdown(){const e=new Jn;for(const[r,s]of this._groupNames){const o={type:"button",model:new Fl({name:r,label:s,role:"menuitemradio",withText:!0})};o.model.bind("isOn").to(this,"currentGroupName",a=>a===r),e.add(o)}const t=this.locale.t,n=t("Category");this._dropdownView.set({label:n,isEmpty:!1}),this._dropdownView.fieldView.panelPosition=this.locale.uiLanguageDirection==="rtl"?"se":"sw",this._dropdownView.fieldView.buttonView.set({withText:!0,tooltip:n,ariaLabel:n,ariaLabelledBy:void 0,isOn:!1}),this._dropdownView.fieldView.buttonView.bind("label").to(this,"currentGroupName",r=>this._groupNames.get(r)),this._dropdownView.fieldView.on("execute",({source:r})=>{this.currentGroupName=r.name}),Hl(this._dropdownView.fieldView,e,{ariaLabel:n,role:"menu"})}}const wT="All";class XRe extends be{_characters;_groups;_allSpecialCharactersGroupLabel;static get requires(){return[PK,As]}static get pluginName(){return"SpecialCharacters"}static get licenseFeatureCode(){return"SCH"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}constructor(e){super(e);const t=e.t;this._characters=new Map,this._groups=new Map,this._allSpecialCharactersGroupLabel=t("All")}init(){const e=this.editor;e.ui.componentFactory.add("specialCharacters",()=>{const t=this._createDialogButton(nt);return t.set({tooltip:!0}),t}),e.ui.componentFactory.add("menuBar:specialCharacters",()=>this._createDialogButton(gn))}addItems(e,t,n={label:e}){if(e===wT)throw new oe("special-character-invalid-group-name",null);const r=this._getGroup(e,n.label);for(const s of t)r.items.add(s.title),this._characters.set(s.title,s.character)}getGroups(){const e=Array.from(this._groups.keys()),t=this.editor.config.get("specialCharacters.order")||[],n=t.find(r=>!e.includes(r));if(n)throw new oe("special-character-invalid-order-group-name",null,{invalidGroup:n});return new Set([...t,...e])}getCharactersForGroup(e){if(e===wT)return new Set(this._characters.keys());const t=this._groups.get(e);if(t)return t.items}getCharacter(e){return this._characters.get(e)}_getGroup(e,t){return this._groups.has(e)||this._groups.set(e,{items:new Set,label:t}),this._groups.get(e)}_updateGrid(e,t){t.tiles.clear();const n=this.getCharactersForGroup(e);for(const r of n){const s=this.getCharacter(r);t.tiles.add(t.createTile(s,r))}}_createDropdownPanelContent(e){const t=Array.from(this.getGroups()).map(a=>[a,this._groups.get(a).label]),n=new Map([[wT,this._allSpecialCharactersGroupLabel],...t]),r=new KRe(e,n),s=new qRe(e),o=new $Re(e);return s.on("tileHover",(a,l)=>{o.set(l)}),s.on("tileFocus",(a,l)=>{o.set(l)}),r.on("change:currentGroupName",(a,l,c)=>{this._updateGrid(c,s)}),this._updateGrid(r.currentGroupName,s),{categoriesView:r,gridView:s,infoView:o}}_createDialogButton(e){const t=this.editor,n=t.locale,r=new e(t.locale),s=t.commands.get("insertText"),o=n.t,a=this.editor.plugins.get("Dialog");return r.set({label:o("Special characters"),icon:rAe,isToggleable:!0}),r.bind("isOn").to(a,"id",l=>l==="specialCharacters"),r.bind("isEnabled").to(s,"isEnabled"),r.on("execute",()=>{if(a.id==="specialCharacters"){a.hide();return}this._showDialog()}),r}_showDialog(){const e=this.editor,t=e.plugins.get("Dialog"),n=e.locale,r=n.t,{categoriesView:s,gridView:o,infoView:a}=this._createDropdownPanelContent(n),l=new YRe(n,s,o,a);o.on("execute",(c,d)=>{e.execute("insertText",{text:d.character})}),t.show({id:"specialCharacters",title:r("Special characters"),className:"ck-special-characters",content:l,position:Ds.EDITOR_TOP_S
51IDE})}}class QRe extends be{static get pluginName(){return"SpecialCharactersArrows"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Arrows",[{title:t("leftwards simple arrow"),character:"←"},{title:t("rightwards simple arrow"),character:"→"},{title:t("upwards simple arrow"),character:"↑"},{title:t("downwards simple arrow"),character:"↓"},{title:t("leftwards double arrow"),character:"⇐"},{title:t("rightwards double arrow"),character:"⇒"},{title:t("upwards double arrow"),character:"⇑"},{title:t("downwards double arrow"),character:"⇓"},{title:t("leftwards dashed arrow"),character:"⇠"},{title:t("rightwards dashed arrow"),character:"⇢"},{title:t("upwards dashed arrow"),character:"⇡"},{title:t("downwards dashed arrow"),character:"⇣"},{title:t("leftwards arrow to bar"),character:"⇤"},{title:t("rightwards arrow to bar"),character:"⇥"},{title:t("upwards arrow to bar"),character:"⤒"},{title:t("downwards arrow to bar"),character:"⤓"},{title:t("up down arrow with base"),character:"↨"},{title:t("back with leftwards arrow above"),character:"🔙"},{title:t("end with leftwards arrow above"),character:"🔚"},{title:t("on with exclamation mark with left right arrow above"),character:"🔛"},{title:t("soon with rightwards arrow above"),character:"🔜"},{title:t("top with upwards arrow above"),character:"🔝"}],{label:t("Arrows")})}}class ZRe extends be{static get pluginName(){return"SpecialCharactersText"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Text",[{character:"‹",title:t("Single left-pointing angle quotation mark")},{character:"›",title:t("Single right-pointing angle quotation mark")},{character:"«",title:t("Left-pointing double angle quotation mark")},{character:"»",title:t("Right-pointing double angle quotation mark")},{character:"‘",title:t("Left single quotation mark")},{character:"’",title:t("Right single quotation mark")},{character:"“",title:t("Left double quotation mark")},{character:"”",title:t("Right double quotation mark")},{character:"‚",title:t("Single low-9 quotation mark")},{character:"„",title:t("Double low-9 quotation mark")},{character:"¡",title:t("Inverted exclamation mark")},{character:"¿",title:t("Inverted question mark")},{character:"‥",title:t("Two dot leader")},{character:"…",title:t("Horizontal ellipsis")},{character:"‡",title:t("Double dagger")},{character:"‰",title:t("Per mille sign")},{character:"‱",title:t("Per ten thousand sign")},{character:"‼",title:t("Double exclamation mark")},{character:"⁈",title:t("Question exclamation mark")},{character:"⁉",title:t("Exclamation question mark")},{character:"⁇",title:t("Double question mark")},{character:"©",title:t("Copyright sign")},{character:"®",title:t("Registered sign")},{character:"™",title:t("Trade mark sign")},{character:"§",title:t("Section sign")},{character:"¶",title:t("Paragraph sign")},{character:"⁋",title:t("Reversed paragraph sign")}],{label:t("Text")})}}class JRe extends be{static get pluginName(){return"SpecialCharactersMathematical"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Mathematical",[{character:"<",title:t("Less-than sign")},{character:">",title:t("Greater-than sign")},{character:"≤",title:t("Less-than or equal to")},{character:"≥",title:t("Greater-than or equal to")},{character:"–",title:t("En dash")},{character:"—",title:t("Em dash")},{character:"¯",title:t("Macron")},{character:"‾",title:t("Overline")},{character:"°",title:t("Degree sign")},{character:"−",title:t("Minus sign")},{character:"±",title:t("Plus-minus sign")},{character:"÷",title:t("Division sign")},{character:"⁄",title:t("Fraction slash")},{character:"×",title:t("Multiplication sign")},{character:"ƒ",title:t("Latin small letter f with hook")},{character:"∫",title:t("Integral")},{character:"∑",title:t("N-ary summation")},{character:"∞",title:t("Infinity")},{character:"√",title:t("Square root")},{character:"∼",title:t("Tilde operator")},{character:"≅",title:t("Approximately equal to")},{character:"≈",title:t("Almost equal to")},{character:"≠",title:t("Not equal to")},{character:"≡",title:t("Identical to")},{character:"∈",title:t("Element of")},{character:"∉",title:t("Not an element of")},{character:"∋",title:t("Contains as member")},{character:"∏",title:t("N-ary product")},{character:"∧",title:t("Logical and")},{character:"∨",title:t("Logical or")},{character:"¬",title:t("Not sign")},{character:"∩",title:t("Intersection")}
51,{character:"∪",title:t("Union")},{character:"∂",title:t("Partial differential")},{character:"∀",title:t("For all")},{character:"∃",title:t("There exists")},{character:"∅",title:t("Empty set")},{character:"∇",title:t("Nabla")},{character:"∗",title:t("Asterisk operator")},{character:"∝",title:t("Proportional to")},{character:"∠",title:t("Angle")},{character:"¼",title:t("Vulgar fraction one quarter")},{character:"½",title:t("Vulgar fraction one half")},{character:"¾",title:t("Vulgar fraction three quarters")}],{label:t("Mathematical")})}}class eFe extends be{static get pluginName(){return"SpecialCharactersLatin"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Latin",[{character:"Ā",title:t("Latin capital letter a with macron")},{character:"ā",title:t("Latin small letter a with macron")},{character:"Ă",title:t("Latin capital letter a with breve")},{character:"ă",title:t("Latin small letter a with breve")},{character:"Ą",title:t("Latin capital letter a with ogonek")},{character:"ą",title:t("Latin small letter a with ogonek")},{character:"Ć",title:t("Latin capital letter c with acute")},{character:"ć",title:t("Latin small letter c with acute")},{character:"Ĉ",title:t("Latin capital letter c with circumflex")},{character:"ĉ",title:t("Latin small letter c with circumflex")},{character:"Ċ",title:t("Latin capital letter c with dot above")},{character:"ċ",title:t("Latin small letter c with dot above")},{character:"Č",title:t("Latin capital letter c with caron")},{character:"č",title:t("Latin small letter c with caron")},{character:"Ď",title:t("Latin capital letter d with caron")},{character:"ď",title:t("Latin small letter d with caron")},{character:"Đ",title:t("Latin capital letter d with stroke")},{character:"đ",title:t("Latin small letter d with stroke")},{character:"Ē",title:t("Latin capital letter e with macron")},{character:"ē",title:t("Latin small letter e with macron")},{character:"Ĕ",title:t("Latin capital letter e with breve")},{character:"ĕ",title:t("Latin small letter e with breve")},{character:"Ė",title:t("Latin capital letter e with dot above")},{character:"ė",title:t("Latin small letter e with dot above")},{character:"Ę",title:t("Latin capital letter e with ogonek")},{character:"ę",title:t("Latin small letter e with ogonek")},{character:"Ě",title:t("Latin capital letter e with caron")},{character:"ě",title:t("Latin small letter e with caron")},{character:"Ĝ",title:t("Latin capital letter g with circumflex")},{character:"ĝ",title:t("Latin small letter g with circumflex")},{character:"Ğ",title:t("Latin capital letter g with breve")},{character:"ğ",title:t("Latin small letter g with breve")},{character:"Ġ",title:t("Latin capital letter g with dot above")},{character:"ġ",title:t("Latin small letter g with dot above")},{character:"Ģ",title:t("Latin capital letter g with cedilla")},{character:"ģ",title:t("Latin small letter g with cedilla")},{character:"Ĥ",title:t("Latin capital letter h with circumflex")},{character:"ĥ",title:t("Latin small letter h with circumflex")},{character:"Ħ",title:t("Latin capital letter h with stroke")},{character:"ħ",title:t("Latin small letter h with stroke")},{character:"Ĩ",title:t("Latin capital letter i with tilde")},{character:"ĩ",title:t("Latin small letter i with tilde")},{character:"Ī",title:t("Latin capital letter i with macron")},{character:"ī",title:t("Latin small letter i with macron")},{character:"Ĭ",title:t("Latin capital letter i with breve")},{character:"ĭ",title:t("Latin small letter i with breve")},{character:"Į",title:t("Latin capital letter i with ogonek")},{character:"į",title:t("Latin small letter i with ogonek")},{character:"İ",title:t("Latin capital letter i with dot above")},{character:"ı",title:t("Latin small letter dotless i")},{character:"IJ",title:t("Latin capital ligature ij")},{character:"ij",title:t("Latin small ligature ij")},{character:"Ĵ",title:t("Latin capital letter j with circumflex")},{character:"ĵ",title:t("Latin small letter j with circumflex")},{character:"Ķ",title:t("Latin capital letter k with cedilla")},{character:"ķ",title:t("Latin small letter k with cedilla")},{character:"ĸ",title:t("Latin small letter kra")},{character:"Ĺ",title:t("Latin capital letter l with acute")},{character:"ĺ",title:t("Latin small letter l with acute")},{character:"Ļ",title:t("Latin capital letter l with cedilla")},{character:"ļ",title:t("Latin small letter l with cedilla")},{character:"Ľ",title:t("Latin capital letter l with caron")},{character:"ľ",title:t("Latin small letter l with caron")}
51,{character:"Ŀ",title:t("Latin capital letter l with middle dot")},{character:"ŀ",title:t("Latin small letter l with middle dot")},{character:"Ł",title:t("Latin capital letter l with stroke")},{character:"ł",title:t("Latin small letter l with stroke")},{character:"Ń",title:t("Latin capital letter n with acute")},{character:"ń",title:t("Latin small letter n with acute")},{character:"Ņ",title:t("Latin capital letter n with cedilla")},{character:"ņ",title:t("Latin small letter n with cedilla")},{character:"Ň",title:t("Latin capital letter n with caron")},{character:"ň",title:t("Latin small letter n with caron")},{character:"ʼn",title:t("Latin small letter n preceded by apostrophe")},{character:"Ŋ",title:t("Latin capital letter eng")},{character:"ŋ",title:t("Latin small letter eng")},{character:"Ō",title:t("Latin capital letter o with macron")},{character:"ō",title:t("Latin small letter o with macron")},{character:"Ŏ",title:t("Latin capital letter o with breve")},{character:"ŏ",title:t("Latin small letter o with breve")},{character:"Ő",title:t("Latin capital letter o with double acute")},{character:"ő",title:t("Latin small letter o with double acute")},{character:"Œ",title:t("Latin capital ligature oe")},{character:"œ",title:t("Latin small ligature oe")},{character:"Ŕ",title:t("Latin capital letter r with acute")},{character:"ŕ",title:t("Latin small letter r with acute")},{character:"Ŗ",title:t("Latin capital letter r with cedilla")},{character:"ŗ",title:t("Latin small letter r with cedilla")},{character:"Ř",title:t("Latin capital letter r with caron")},{character:"ř",title:t("Latin small letter r with caron")},{character:"Ś",title:t("Latin capital letter s with acute")},{character:"ś",title:t("Latin small letter s with acute")},{character:"Ŝ",title:t("Latin capital letter s with circumflex")},{character:"ŝ",title:t("Latin small letter s with circumflex")},{character:"Ş",title:t("Latin capital letter s with cedilla")},{character:"ş",title:t("Latin small letter s with cedilla")},{character:"Š",title:t("Latin capital letter s with caron")},{character:"š",title:t("Latin small letter s with caron")},{character:"Ţ",title:t("Latin capital letter t with cedilla")},{character:"ţ",title:t("Latin small letter t with cedilla")},{character:"Ť",title:t("Latin capital letter t with caron")},{character:"ť",title:t("Latin small letter t with caron")},{character:"Ŧ",title:t("Latin capital letter t with stroke")},{character:"ŧ",title:t("Latin small letter t with stroke")},{character:"Ũ",title:t("Latin capital letter u with tilde")},{character:"ũ",title:t("Latin small letter u with tilde")},{character:"Ū",title:t("Latin capital letter u with macron")},{character:"ū",title:t("Latin small letter u with macron")},{character:"Ŭ",title:t("Latin capital letter u with breve")},{character:"ŭ",title:t("Latin small letter u with breve")},{character:"Ů",title:t("Latin capital letter u with ring above")},{character:"ů",title:t("Latin small letter u with ring above")},{character:"Ű",title:t("Latin capital letter u with double acute")},{character:"ű",title:t("Latin small letter u with double acute")},{character:"Ų",title:t("Latin capital letter u with ogonek")},{character:"ų",title:t("Latin small letter u with ogonek")},{character:"Ŵ",title:t("Latin capital letter w with circumflex")},{character:"ŵ",title:t("Latin small letter w with circumflex")},{character:"Ŷ",title:t("Latin capital letter y with circumflex")},{character:"ŷ",title:t("Latin small letter y with circumflex")},{character:"Ÿ",title:t("Latin capital letter y with diaeresis")},{character:"Ź",title:t("Latin capital letter z with acute")},{character:"ź",title:t("Latin small letter z with acute")},{character:"Ż",title:t("Latin capital letter z with dot above")},{character:"ż",title:t("Latin small letter z with dot above")},{character:"Ž",title:t("Latin capital letter z with caron")},{character:"ž",title:t("Latin small letter z with caron")},{character:"ſ",title:t("Latin small letter long s")}],{label:t("Latin")})}}class tFe extends be{static get pluginName(){return"SpecialCharactersCurrency"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Currency",[{character:"$",title:t("Dollar sign")},{character:"€",title:t("Euro sign")},{character:"¥",title:t("Yen sign")},{character:"£",title:t("Pound sign")},{character:"¢",title:t("Cent sign")},{character:"₠",title:t("Euro-currency sign")},{character:"₡",title:t("Colon sign")},{character:"₢",title:t("Cruzeiro sign")},{character:"₣",title:t("French franc sign")},{character:"₤",title:t("Lira sign")},{character:"¤",title:t("Currency sign")},{character:"₿",title:t("Bitcoin sign")},{character:"₥",title:t("Mill sign")},{character:"₦",title:t("Naira sign")},{character:"₧",title:t("Peseta sign")},{character:"₨",title:t("Rupee sign")},{character:"₩",title:t("Won sign")},{character:"₪",title:t("New sheqel sign")},{character:"₫",title:t("Dong sign")},{character:"₭",title:t("Kip sign")},{character:"₮",title:t("Tugrik sign")},{character:"₯",title:t("Drachma sign")},{character:"₰",title:t("German penny sign")},{character:"₱",title:t("Peso sign")},{character:"₲",title:t("Guarani sign")},{character:"₳",title:t("Austral sign")},{character:"₴",title:t("Hryvnia sign")},{character:"₵",title:t("Cedi sign")},{character:"₶",title:t("Livre tournois sign")},{character:"₷",title:t("Spesmilo sign")},{character:"₸",title:t("Tenge sign")},{character:"₹",title:t("Indian rupee sign")},{character:"₺",title:t("Turkish lira sign")},{character:"₻",title:t("Nordic mark sign")},{character:"₼",title:t("Manat sign")},{character:"₽",title:t("Ruble sign")}],{label:t("Currency")})}}class nFe extends be{static get pluginName(){return"SpecialCharactersEssentials"}static get isOfficialPlugin(){return!0}static get requires(){return[tFe,ZRe,JRe,QRe,eFe]}}const iFe=/^(left|center|right)$/,rFe=/^(left|none|right)$/;function T4(i,e){const{modelAttribute:t,styleName:n,attributeName:r,attributeType:s,viewElement:o,defaultValue:a,shouldUpcast:l=()=>!0,reduceBoxSides:c=!1}=e;i.for("upcast").attributeToAttribute({view:{name:o,styles:{[n]:/[\s\S]+/}},model:{key:t,value:(d,f,m)=>{if(!l(d))return;const p=Mo(a,"",m),g=d.getNormalizedStyle(n),y=c?S1(g):g;if(p!==y)return y;f.consumable.consume(d,{styles:n})}}}),r&&i.for("upcast").attributeToAttribute({view:{name:o,attributes:{[r]:/.+/}},model:{key:t,value:(d,f,m)=>{if(d.name=="figure"||d.hasStyle(n)||d.name=="table"&&d.parent.name=="figure"&&d.parent.hasStyle(n))return;const p=Mo(a,"",m);let g=d.getAttribute(r);if(g&&s=="length"){const y=parseFloat(g);isNaN(y)?g=p:g=y+(g.includes("%")?"%":"px")}if(p!==g)return g;f.consumable.consume(d,{attributes:r})}}})}function BS(i,e,t,n){const{conversion:r}=i;r.for("upcast").add(s=>s.on("element:"+e,(o,a,l)=>{if(!a.modelRange)return;const c=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter(v=>a.viewItem.hasStyle(v));if(!c.length)return;const d={styles:c};if(!l.consumable.test(a.viewItem,d))return;const f=[...a.modelRange.getItems({shallow:!0}
51)].pop(),m=f.findAncestor("table",{includeSelf:!0});let p=n;m&&m.getAttribute("tableType")=="layout"&&(p={style:"none",color:"",width:""}),l.consumable.consume(a.viewItem,d);const g={style:a.viewItem.getNormalizedStyle("border-style"),color:a.viewItem.getNormalizedStyle("border-color"),width:a.viewItem.getNormalizedStyle("border-width")},y={style:S1(g.style),color:S1(g.color),width:S1(g.width)};y.style!==p.style&&l.writer.setAttribute(t.style,y.style,f),y.color!==p.color&&l.writer.setAttribute(t.color,y.color,f),y.width!==p.width&&l.writer.setAttribute(t.width,y.width,f)})),i.config.get("experimentalFlags.upcastTableBorderZeroAttributes")&&r.for("upcast").add(s=>{s.on(`element:${e}`,(o,a,l)=>{const{modelRange:c,viewItem:d}=a,f=d.is("element","table")?d:d.findAncestor("table");if(!l.consumable.test(f,{attributes:"border"})||f.getAttribute("border")!=="0")return;const m=c?.start?.nodeAfter;!m||Object.values(t).some(p=>m.hasAttribute(p))||(l.writer.setAttribute(t.style,"none",m),d.is("element","table")&&l.consumable.consume(d,{attributes:"border"}))})})}function lg(i,e){const{modelElement:t,modelAttribute:n,styleName:r}=e;i.for("downcast").attributeToAttribute({model:{name:t,key:n},view:s=>({key:"style",value:{[r]:s}})})}function k1(i,e){const{modelAttribute:t,styleName:n}=e;i.for("downcast").add(r=>r.on(`attribute:${t}:table`,(s,o,a)=>{const{item:l,attributeNewValue:c}=o,{mapper:d,writer:f}=a;if(!a.consumable.consume(o.item,s.name))return;const m=[...d.toViewElement(l).getChildren()].find(p=>p.is("element","table"));c?f.setStyle(n,c,m):f.removeStyle(n,m)}))}function Mo(i,e,t){const n=t.modelRange&&Rn(t.modelRange.getItems({shallow:!0})),r=n&&n.is("element")&&n.findAncestor("table",{includeSelf:!0});return r&&r.getAttribute("tableType")==="layout"?e:i}function S1(i){if(!i)return;const e=["top","right","bottom","left"];if(!e.every(s=>i[s]))return i;const n=i.top;return e.every(s=>i[s]===n)?n:i}const mr={left:{className:"table-style-align-left"},center:{className:"table-style-align-center"},right:{className:"table-style-align-right"},blockLeft:{className:"table-style-block-align-left"},blockRight:{className:"table-style-block-align-right"}},sFe=[{view:{name:/^(table|figure)$/,styles:{float:rFe}},getAlign:i=>{let e=i.getStyle("float");return e==="none"&&(e="center"),e},getConsumables(i){const e=i.getStyle("float"),t=["float"];return e==="left"&&i.hasStyle("margin-right")?t.push("margin-right"):e==="right"&&i.hasStyle("margin-left")&&t.push("margin-left"),{styles:t}}},{view:{name:/^(table|figure)$/,styles:{"margin-left":"auto","margin-right":"auto"}},getAlign:()=>"center",getConsumables:()=>({styles:["margin-left","margin-right"]})},{view:{name:/^(table|figure)$/,key:"class",value:"table-style-align-left"},getAlign:()=>"left",getConsumables(){return{classes:mr.left.className}}},{view:{name:/^(table|figure)$/,key:"class",value:mr.right.className},getAlign:()=>"right",getConsumables(){return{classes:mr.right.className}}},{view:{name:/^(table|figure)$/,key:"class",value:mr.center.className},getAlign:()=>"center",getConsumables(){return{classes:mr.center.className}}},{view:{name:/^(table|figure)$/,key:"class",value:mr.blockLeft.className},getAlign:()=>"blockLeft",getConsumables(){return{classes:mr.blockLeft.className}}},{view:{name:/^(table|figure)$/,key:"class",value:mr.blockRight.className},getAlign:()=>"blockRight",getConsumables(){return{classes:mr.blockRight.className}}},{view:{name:/^(table|figure)$/,styles:{"margin-left":"0","margin-right":"auto"}},getAlign:()=>"blockLeft",getConsumables(){return{styles:["margin-left","margin-right"]}}},{view:{name:/^(table|figure)$/,styles:{"margin-left":"auto","margin-right":"0"}},getAlign:()=>"blockRight",getConsumables(){return{styles:["margin-left","margin-right"]}}},{view:{name:"table",attributes:{align:iFe}},getAlign:i=>i.getAttribute("align"),getConsumables(){return{attributes:"align"}}}],qy={center:{align:"center",style:"margin-left: auto; margin-right: auto;",className:"table-style-align-center"},left:{align:"left",style:"float: left;",className:"table-style-align-left"},right:{align:"right",style:"float: right;",className:"table-style-align-right"},blockLeft:{align:void 0,style:"margin-left: 0; margin-right: auto;",className:mr.blockLeft.className},blockRight:{align:void 0,style:"margin-left: auto; margin-right: 0;",className:mr.blockRight.className}};class Vt{_table;_startRow;_endRow;_startColumn;_endColumn;_includeAllSlots;_skipRows;_row;_rowIndex;_column;_cellIndex;_spannedCells;_nextCellAtColumn;_jumpedToStartRow=!1;constructor(e,t={}){this._table=e,this._startRow=t.row!==void 0?t.row:t.startRow||0,this._endRow=t.row!==void 0?t.row:t.endRow,this._startColumn=t.column!==void 0?t.column:t.startColumn||0,this._endColumn=t.column!==void 0?t.column:t.endColumn,this._includeAllSlots=!!t.includeAllSlots,this._skipRows=new Set,this._row=0,this._rowIndex=0,this._column=0,this._cellIndex=0,this._spannedCells=new Map,this._nextCellAtColumn=-1}[Symbol.iterator](){return this}next(){this._canJumpToStartRow()&&this._jumpToNonSpannedRowClosestToStartRow();const e=this._table.getChild(this._rowIndex);if(!e||this._isOverEndRow())return{done:!0,value:void 0};if(!e.is("element","tableRow"))return this._rowIndex++,this.next();if(this._isOverEndColumn())return this._advanceToNextRow();let t=null;const n=this._getSpanned();if(n)this._includeAllSlots&&!this._shouldSkipSlot()&&(t=this._formatOutValue(n.cell,n.row,n.column));else{const r=e.getChild(this._cellIndex);if(!r)return this._advanceToNextRow();const s=parseInt(r.getAttribute("colspan")||"1"),o=parseInt(r.getAttribute("rowspan")||"1");(s>1||o>1)&&this._recordSpans(r,o,s),this._shouldSkipSlot()||(t=this._formatOutValue(r)),this._nextCellAtColumn=this._column+s}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}
51skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return this._endRow!==void 0&&this._row>this._endRow}_isOverEndColumn(){return this._endColumn!==void 0&&this._column>this._endColumn}_formatOutValue(e,t=this._row,n=this._column){return{done:!1,value:new oFe(this,e,t,n)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._row<this._startRow,n=this._column<this._startColumn,r=this._endColumn!==void 0&&this._column>this._endColumn;return e||t||n||r}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,n){const r={cell:e,row:this._row,column:this._column};for(let s=this._row;s<this._row+t;s++)for(let o=this._column;o<this._column+n;o++)(s!=this._row||o!=this._column)&&this._markSpannedCell(s,o,r)}_markSpannedCell(e,t,n){this._spannedCells.has(e)||this._spannedCells.set(e,new Map),this._spannedCells.get(e).set(t,n)}_canJumpToStartRow(){return!!this._startRow&&this._startRow>0&&!this._jumpedToStartRow}_jumpToNonSpannedRowClosestToStartRow(){const e=this._getRowLength(0);for(let t=this._startRow;!this._jumpedToStartRow;t--)e===this._getRowLength(t)&&(this._row=t,this._rowIndex=t,this._jumpedToStartRow=!0)}_getRowLength(e){return[...this._table.getChild(e).getChildren()].reduce((n,r)=>n+parseInt(r.getAttribute("colspan")||"1"),0)}}class oFe{cell;row;column;cellAnchorRow;cellAnchorColumn;_cellIndex;_rowIndex;_table;constructor(e,t,n,r){this.cell=t,this.row=e._row,this.column=e._column,this.cellAnchorRow=n,this.cellAnchorColumn=r,this._cellIndex=e._cellIndex,this._rowIndex=e._rowIndex,this._table=e._table}get isAnchor(){return this.row===this.cellAnchorRow&&this.column===this.cellAnchorColumn}get cellWidth(){return parseInt(this.cell.getAttribute("colspan")||"1")}get cellHeight(){return parseInt(this.cell.getAttribute("rowspan")||"1")}get rowIndex(){return this._rowIndex}getPositionBefore(){return this._table.root.document.model.createPositionAt(this._table.getChild(this.row),this._cellIndex)}}function fi(i,e,t,n,r=1){e!=null&&r!==void 0&&r!==null&&e>r?n.setAttribute(i,e,t):n.removeAttribute(i,t)}function Dd(i,e,t={}){const n=i.createElement("tableCell",t);return i.insertElement("paragraph",n),i.insert(n,e),n}function MS(i,e){const t=e.parent.parent,n=parseInt(t.getAttribute("headingColumns")||"0"),{column:r}=i.getCellLocation(e);return!!n&&r<n}function P1(i,e,t){const{modelAttribute:n}=t;i.extend("tableCell",{allowAttributes:[n]}),i.setAttributeProperties(n,{isFormatting:!0}),T4(e,{viewElement:/^(td|th)$/,...t}),lg(e,{modelElement:"tableCell",...t})}function El(i){const e=i.getSelectedElement();return e&&e.is("element","table")?e:i.getFirstPosition().findAncestor("table")}function aFe(i){const e=new Map;for(const t of i){const n=t.findAncestor("table");e.has(n)||e.set(n,[]),e.get(n).push(t)}return e}function If({table:i,row:e,column:t}){const n=new Vt(i,{row:e,column:t});for(const{cell:r}of n)if(r.getAttribute("tableCellType")!=="header")return!1;return!0}function pl(i){const{model:e,config:t}=i;return e.schema.checkAttribute("tableCell","tableCellType")&&t.get("experimentalFlags.tableCellTypeSupport")===!0}function UX(i,e,t){const{startRow:n,startColumn:r,endRow:s,endColumn:o}=e,a=t.createElement("table"),l=i.getAttribute("tableType");l&&t.setAttribute("tableType",l,a);const c=s-n+1;for(let f=0;f<c;f++)t.insertElement("tableRow",a,"end");const d=[...new Vt(i,{startRow:n,endRow:s,startColumn:r,endColumn:o,includeAllSlots:!0})];for(const{row:f,column:m,cell:p,isAnchor:g,cellAnchorRow:y,cellAnchorColumn:v}of d){const x=f-n,C=a.getChild(x);if(!g)(y<n||v<r)&&Dd(t,t.createPositionAt(C,"end"));else{const D=t.cloneElement(p);t.append(D,C),HX(D,f,m,s,o,t)}}return lFe(a,i,n,r,t),a}function VX(i,e,t=0){const n=[],r=new Vt(i,{startRow:t,endRow:e-1});for(const s of r){const{row:o,cellHeight:a}=s,l=o+a-1;o<e&&e<=l&&n.push(s)}return n}function jX(i,e,t){const n=i.parent,r=n.parent,s=n.index,o=parseInt(i.getAttribute("rowspan")),a=e-s,l={},c=o-a;c>1&&(l.rowspan=c);const d=parseInt(i.getAttribute("colspan")||"1");d>1&&(l.colspan=d);const f=s,m=f+a,p=[...new Vt(r,{startRow:f,endRow:m,includeAllSlots:!0})];let g=null,y;for(const v of p){const{row:x,column:C,cell:D}=v;D===i&&y===void 0&&(y=C),y!==void 0&&y===C&&x===m&&(g=Dd(t,v.getPositionBefore(),l))}return fi("rowspan",a,i,t),g}function zX(i,e){const t=[],n=new Vt(i);for(const r of n){const{column:s,cellWidth:o}=r,a=s+o-1;s<e&&e<=a&&t.push(r)}return t}function WX(i,e,t,n){const r=parseInt(i.getAttribute("colspan")),s=t-e,o={},a=r-s;a>1&&(o.colspan=a);const l=parseInt(i.getAttribute("rowspan")||"1");l>1&&(o.rowspan=l);const c=Dd(n,n.createPositionAfter(i),o);return fi("colspan",s,i,n),c}
51function HX(i,e,t,n,r,s){const o=parseInt(i.getAttribute("colspan")||"1"),a=parseInt(i.getAttribute("rowspan")||"1");if(t+o-1>r){const d=r-t+1;fi("colspan",d,i,s,1)}if(e+a-1>n){const d=n-e+1;fi("rowspan",d,i,s,1)}}function lFe(i,e,t,n,r){const s=parseInt(e.getAttribute("headingRows")||"0");if(s>0){const a=s-t;fi("headingRows",a,i,r,0)}const o=parseInt(e.getAttribute("headingColumns")||"0");if(o>0){const a=o-n;fi("headingColumns",a,i,r,0)}}function LS(i,e){const t=e.getColumns(i),n=new Array(t).fill(0);for(const{column:s}of new Vt(i))n[s]++;const r=n.reduce((s,o,a)=>o?s:[...s,a],[]);if(r.length>0){const s=r[r.length-1];return e.removeColumns(i,{at:s}),!0}return!1}function US(i,e){const t=[],n=e.getRows(i);for(let r=0;r<n;r++)i.getChild(r).isEmpty&&t.push(r);if(t.length>0){const r=t[t.length-1];return e.removeRows(i,{at:r}),!0}return!1}function A4(i,e){LS(i,e)||US(i,e)}function qX(i,e){const t=Array.from(new Vt(i,{startColumn:e.firstColumn,endColumn:e.lastColumn,row:e.lastRow}));if(t.every(({cellHeight:s})=>s===1))return e.lastRow;const r=t[0].cellHeight-1;return e.lastRow+r}function $X(i,e){const t=Array.from(new Vt(i,{startRow:e.firstRow,endRow:e.lastRow,column:e.lastColumn}));if(t.every(({cellWidth:s})=>s===1))return e.lastColumn;const r=t[0].cellWidth-1;return e.lastColumn+r}function GX(i){for(const e of i.getChildren())if(e.is("element","table"))return e}function cFe(){return i=>{i.on("element:figure",(e,t,n)=>{if(!n.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const r=GX(t.viewItem);if(!r||!n.consumable.test(r,{name:!0}))return;n.consumable.consume(t.viewItem,{name:!0,classes:"table"});const s=n.convertItem(r,t.modelCursor),o=Rn(s.modelRange.getItems());if(!o||!o.is("element","table")){n.consumable.revert(t.viewItem,{name:!0,classes:"table"}),s.modelRange&&!s.modelRange.isCollapsed&&(t.modelRange=s.modelRange,t.modelCursor=s.modelCursor);return}n.convertChildren(t.viewItem,n.writer.createPositionAt(o,"end")),n.updateConversionResult(o,t)})}}function uFe(){return i=>{i.on("element:table",(e,t,n)=>{const r=t.viewItem;if(!n.consumable.test(r,{name:!0}))return;const{rows:s,headingRows:o,headingColumns:a}=fFe(r),l={};a&&(l.headingColumns=a),o&&(l.headingRows=o);const c=n.writer.createElement("table",l);if(n.safeInsert(c,t.modelCursor)){if(n.consumable.consume(r,{name:!0}),s.forEach(d=>n.convertItem(d,n.writer.createPositionAt(c,"end"))),n.convertChildren(r,n.writer.createPositionAt(c,"end")),c.isEmpty){const d=n.writer.createElement("tableRow");n.writer.insert(d,n.writer.createPositionAt(c,"end")),Dd(n.writer,n.writer.createPositionAt(d,"end"))}n.updateConversionResult(c,t)}})}}function dFe(){return i=>{i.on("element:tr",(e,t)=>{t.viewItem.isEmpty&&t.modelCursor.index==0&&e.stop()},{priority:"high"})}}function o9(i){return e=>{e.on(`element:${i}`,(t,n,{writer:r})=>{if(!n.modelRange)return;const s=n.modelRange.start.nodeAfter,o=r.createPositionAt(s,0);if(n.viewItem.isEmpty){r.insertElement("paragraph",o);return}const a=Array.from(s.getChildren());if(a.every(l=>l.is("element","$marker"))){const l=r.createElement("paragraph");r.insert(l,r.createPositionAt(s,0));for(const c of a)r.move(r.createRangeOn(c),r.createPositionAt(l,"end"))}},{priority:"low"})}}function fFe(i){let e,t=!0;const n=[],r=[];let s;for(const a of Array.from(i.getChildren())){if(a.name!=="tbody"&&a.name!=="thead"&&a.name!=="tfoot")continue;a.name==="thead"&&!s&&(t=!0,s=a);const l=Array.from(a.getChildren()).filter(d=>d.is("element","tr"));let c=null;for(const d of l){const f=Array.from(d.getChildren()).filter(m=>m.is("element","td")||m.is("element","th"));s&&a===s||a.name==="tbody"&&f.length>0&&(c===null||f.length===c)&&f.every(m=>m.is("element","th"))&&t?(n.push(d),t=!0):(r.push(d),t=!1),c=Math.max(c||0,f.length)}}const o=hFe(r);for(const a of o){let l=0;for(;l<a.length&&a[l]?.name==="th";)l+=1;(e===void 0||l<e)&&(e=l)}return{headingRows:n.length,headingColumns:e||0,rows:[...n,...r]}}function hFe(i){let e=new Map,t=0;const n=i.map(r=>{const s=[],o=Array.from(r.getChildren()).filter(l=>l.name==="th"||l.name==="td"),a=new Map;for(;o.length||s.length<t;){const l=e.get(s.length);if(l&&l.remaining>0)s.push(l.cell);else{const c=o.shift();if(c){const d=parseInt(c.getAttribute("colspan")||"1"),f=parseInt(c.getAttribute("rowspan")||"1");for(let m=0;m<d;m++)f>1&&a.set(s.length,{cell:c,remaining:f-1}),s.push(c)}else{s.push(null);continue}}}for(const[l,c]of e.entries())c.remaining-=1,c.remaining>0&&!a.has(l)&&a.set(l,c);return e=a,t=Math.max(t,s.length),s});for(const r of n)for(;r.length<t;)r.push(null);return n}function Ed(i){if(!i||!Nr(i))return i;const{top:e,right:t,bottom:n,left:r}=i;if(e==t&&t==n&&n==r)return e}function Td(i,e){const t=parseFloat(i);return Number.isNaN(t)||String(t)!==String(i)?i:`${t}${e}`}function O_(i,e={}){const t={borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",...i};return e.includeAlignmentProperty&&!t.alignment&&(t.alignment="center"),e.includePaddingProperty&&!t.padding&&(t.padding=""),e.includeVerticalAlignmentProperty&&!t.verticalAlignment&&(t.verticalAlignment="middle"),e.includeHorizontalAlignmentProperty&&!t.horizontalAlignment&&(t.horizontalAlignment=e.isRightToLeftContent?"right":"left"),t}function k4(i,e){return O_({borderStyle:"double",borderColor:"hsl(0, 0%, 70%)",borderWidth:"1px",...i},e)}function S4(i,e){return O_({borderStyle:"solid",borderColor:"hsl(0, 0%, 75%)",borderWidth:"1px",...i},e)}
51function a9(i,e){return(t,{writer:n})=>{const r=t.getAttribute("headingRows")||0,s=n.createContainerElement("table",null,[]),o=n.createContainerElement("figure",{class:"table"},s);r>0&&n.insert(n.createPositionAt(s,"end"),n.createContainerElement("thead",null,n.createSlot(a=>a.is("element","tableRow")&&a.index<r))),r<i.getRows(t)&&n.insert(n.createPositionAt(s,"end"),n.createContainerElement("tbody",null,n.createSlot(a=>a.is("element","tableRow")&&a.index>=r)));for(const{positionOffset:a,filter:l}of e.additionalSlots)n.insert(n.createPositionAt(s,a),n.createSlot(l));return n.insert(n.createPositionAt(s,"after"),n.createSlot(a=>a.is("element","tableRow")?!1:!e.additionalSlots.some(({filter:l})=>l(a)))),e.asWidget?pFe(o,n):o}}function mFe(){return(i,{writer:e})=>i.isEmpty?e.createEmptyElement("tr"):e.createContainerElement("tr")}function l9(i){return(t,{writer:n})=>{if(i.cellTypeEnabled?.()){const f=t.getAttribute("tableCellType")==="header"?"th":"td";return e(n,f)}const r=t.parent,s=r.parent,o=s.getChildIndex(r),a=new Vt(s,{row:o}),l=s.getAttribute("headingRows")||0,c=s.getAttribute("headingColumns")||0;let d=null;for(const f of a)if(f.cell==t){const m=f.row<l||f.column<c;d=e(n,m?"th":"td");break}return d};function e(t,n){return i.asWidget?g4(t.createEditableElement(n),t,{withAriaRole:!1}):t.createContainerElement(n)}}function c9(i={}){return(e,{writer:t})=>{if(!e.parent.is("element","tableCell")||!YX(e))return null;if(i.asWidget)return t.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const n=t.createContainerElement("p");return t.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}}function YX(i){return i.parent.childCount==1&&!gFe(i)}function pFe(i,e){return e.setCustomProperty("table",!0,i),_d(i,e,{hasSelectionHandle:!0})}function gFe(i){for(const e of i.getAttributeKeys())if(!(e.startsWith("selection:")||e=="htmlEmptyBlock"))return!0;return!1}function bFe(i){return(e,t)=>{const n=i.plugins.has("PlainTableOutput"),r=t.options.isClipboardPipeline,s=i.config.get("experimentalFlags.useExtendedTableBlockAlignment");return!n&&!(s&&r)?null:vFe(e,t,i)}}function yFe(i){return(e,{writer:t,options:n})=>{const r=i.plugins.has("PlainTableOutput"),s=n.isClipboardPipeline,o=i.config.get("experimentalFlags.useExtendedTableBlockAlignment");return!r&&!(o&&s)?null:e.parent.name==="table"?t.createContainerElement("caption"):null}}function vFe(i,e,t){const n=e.writer,r=i.getAttribute("headingRows")||0,s=n.createSlot(m=>m.is("element","tableRow")&&m.index<r),o=n.createSlot(m=>m.is("element","tableRow")&&m.index>=r),a=n.createSlot(m=>!m.is("element","tableRow")),l=n.createContainerElement("thead",null,s),c=n.createContainerElement("tbody",null,o),d=[];r&&d.push(l),r<i.childCount&&d.push(c);const f={class:"table"};if(t.plugins.has("TablePropertiesEditing")&&e.options.isClipboardPipeline){const m=k4(t.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),p=i.getAttribute("tableAlignment");let g=m.alignment;i.getAttribute("tableType")==="layout"&&(g="");const y=p||g;y&&(f.class+=" "+qy[y].className,f.style=qy[y].style,qy[y].align!==void 0&&(f.align=qy[y].align))}return n.createContainerElement("table",f,[a,...d])}function wFe(i){const e={"border-width":"tableBorderWidth","border-color":"tableBorderColor","border-style":"tableBorderStyle","background-color":"tableBackgroundColor"};for(const[t,n]of Object.entries(e))i.conversion.for("dataDowncast").add(r=>r.on(`attribute:${n}:table`,(s,o,a)=>{const{item:l,attributeNewValue:c}=o,{mapper:d,writer:f}=a,m=i.plugins.has("PlainTableOutput"),p=a.options.isClipboardPipeline,g=i.config.get("experimentalFlags.useExtendedTableBlockAlignment");if(!m&&!(g&&p)||!a.consumable.consume(l,s.name))return;const y=d.toViewElement(l);c?f.setStyle(t,c,y):f.removeStyle(t,y)},{priority:"high"}))}class xFe extends ut{refresh(){const e=this.editor.model,t=e.document.selection,n=e.schema;this.isEnabled=_Fe(t,n)}execute(e={}){const t=this.editor,n=t.model,r=t.plugins.get("TableUtils"),s=t.config.get("table.defaultHeadings.rows"),o=t.config.get("table.defaultHeadings.columns");e.headingRows===void 0&&s&&(e.headingRows=s),e.headingColumns===void 0&&o&&(e.headingColumns=o),n.change(a=>{const l=r.createTable(a,e);n.insertObject(l,null,null,{findOptimalPosition:"auto"}),a.setSelection(a.createPositionAt(l.getNodeByPath([0,0,0]),0))})}}function _Fe(i,e){const t=i.getFirstPosition().parent,n=t===t.root?t:t.parent;return e.checkChild(n,"table")}class u9 extends ut{order;constructor(e,t={}){super(e),this.order=t.order||"below"}refresh(){const e=this.editor.model.document.selection,n=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=n}execute(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get("TableUtils"),r=this.order==="above",s=n.getSelectionAffectedTableCells(t),o=n.getRowIndexes(s),a=r?o.first:o.last,l=s[0].findAnce
51stor("table");n.insertRows(l,{at:r?a:a+1,copyStructureFromAbove:!r})}}class d9 extends ut{order;constructor(e,t={}){super(e),this.order=t.order||"right"}refresh(){const e=this.editor.model.document.selection,n=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=n}execute(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get("TableUtils"),r=this.order==="left",s=n.getSelectionAffectedTableCells(t),o=n.getColumnIndexes(s),a=r?o.first:o.last,l=s[0].findAncestor("table");n.insertColumns(l,{columns:1,at:r?a:a+1})}}class f9 extends ut{direction;constructor(e,t={}){super(e),this.direction=t.direction||"horizontally"}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=t.length===1}execute(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];this.direction==="horizontally"?e.splitCellHorizontally(t,2):e.splitCellVertically(t,2)}}class $y extends ut{direction;isHorizontal;constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal=this.direction=="right"||this.direction=="left"}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,t=e.document,r=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(t.selection)[0],s=this.value,o=this.direction;e.change(a=>{const l=o=="right"||o=="down",c=l?r:s,d=l?s:r,f=d.parent;EFe(d,c,a);const m=this.isHorizontal?"colspan":"rowspan",p=parseInt(r.getAttribute(m)||"1"),g=parseInt(s.getAttribute(m)||"1");a.setAttribute(m,p+g,c),a.setSelection(a.createRangeIn(c));const y=this.editor.plugins.get("TableUtils"),v=f.findAncestor("table");A4(v,y)})}_getMergeableCell(){const t=this.editor.model.document,n=this.editor.plugins.get("TableUtils"),r=n.getTableCellsContainingSelection(t.selection)[0];if(!r)return;const s=this.isHorizontal?CFe(r,this.direction,n):DFe(r,this.direction,n);if(!s)return;const o=this.isHorizontal?"rowspan":"colspan",a=parseInt(r.getAttribute(o)||"1");if(parseInt(s.getAttribute(o)||"1")===a)return s}}function CFe(i,e,t){const r=i.parent.parent,s=e=="right"?i.nextSibling:i.previousSibling,o=(r.getAttribute("headingColumns")||0)>0;if(!s)return;const a=e=="right"?i:s,l=e=="right"?s:i,{column:c}=t.getCellLocation(a),{column:d}=t.getCellLocation(l),f=parseInt(a.getAttribute("colspan")||"1"),m=MS(t,a),p=MS(t,l);return o&&m!=p?void 0:c+f===d?s:void 0}function DFe(i,e,t){const n=i.parent,r=n.parent,s=r.getChildIndex(n);if(e=="down"&&s===t.getRows(r)-1||e=="up"&&s===0)return null;const o=parseInt(i.getAttribute("rowspan")||"1"),a=r.getAttribute("headingRows")||0,l=e=="down"&&s+o===a,c=e=="up"&&s===a;if(a&&(l||c))return null;const d=parseInt(i.getAttribute("rowspan")||"1"),f=e=="down"?s+d:s,m=[...new Vt(r,{endRow:f})],g=m.find(v=>v.cell===i).column,y=m.find(({row:v,cellHeight:x,column:C})=>C!==g?!1:e=="down"?v===f:f===v+x);return y&&y.cell?y.cell:null}function EFe(i,e,t){h9(i)||(h9(e)&&t.remove(t.createRangeIn(e)),t.move(t.createRangeIn(i),t.createPositionAt(e,"end"))),t.remove(i)}function h9(i){const e=i.getChild(0);return i.childCount==1&&e.is("element","paragraph")&&e.isEmpty}class TFe extends ut{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),n=t[0];if(n){const r=n.findAncestor("table"),o=e.getRows(r)-1,a=e.getRowIndexes(t),l=a.first===0&&a.last===o;this.isEnabled=!l}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),n=t.getSelectionAffectedTableCells(e.document.selection),r=t.getRowIndexes(n),s=n[0],o=s.findAncestor("table"),a=t.getCellLocation(s).column;e.change(l=>{const c=r.last-r.first+1;t.removeRows(o,{at:r.first,rows:c});const d=AFe(o,r.first,a,t.getRows(o));l.setSelection(l.createPositionAt(d,0))})}}function AFe(i,e,t,n){const r=i.getChild(Math.min(e,n-1));let s=r.getChild(0),o=0;for(const a of r.getChildren()){if(o>t)return s;s=a,o+=parseInt(a.getAttribute("colspan")||"1")}return s}class kFe extends ut{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),n=t[0];
51if(n){const r=n.findAncestor("table"),s=e.getColumns(r),{first:o,last:a}=e.getColumnIndexes(t);this.isEnabled=a-o<s-1}else this.isEnabled=!1}execute(){const e=this.editor.plugins.get("TableUtils"),[t,n]=PFe(this.editor.model.document.selection,e),r=t.parent.parent,s=[...new Vt(r)],o={first:s.find(l=>l.cell===t).column,last:s.find(l=>l.cell===n).column},a=SFe(s,t,n,o);this.editor.model.change(l=>{const c=o.last-o.first+1;e.removeColumns(r,{at:o.first,columns:c}),l.setSelection(l.createPositionAt(a,0))})}}function SFe(i,e,t,n){return parseInt(t.getAttribute("colspan")||"1")>1?t:e.previousSibling||t.nextSibling?t.nextSibling||e.previousSibling:n.first?i.reverse().find(({column:s})=>s<n.first).cell:i.reverse().find(({column:s})=>s>n.last).cell}function PFe(i,e){const t=e.getSelectionAffectedTableCells(i),n=t[0],r=t.pop(),s=[n,r];return n.isBefore(r)?s:s.reverse()}class IFe extends ut{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,n=e.getSelectionAffectedTableCells(t.document.selection);if(n.length===0){this.isEnabled=!1,this.value=!1;return}const r=n[0].findAncestor("table");this.isEnabled=t.schema.checkAttribute(r,"headingRows"),this.value=n.every(s=>this._isInHeading(s,s.parent.parent))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),n=this.editor.model,r=t.getSelectionAffectedTableCells(n.document.selection),s=r[0].findAnce
51stor("table"),{first:o,last:a}=t.getRowIndexes(r),l=this.value?o:a+1,c=s.getAttribute("headingRows")||0;n.change(d=>{if(l){const f=l>c?c:0,m=VX(s,l,f);for(const{cell:p}of m)jX(p,l,d)}t.setHeadingRowsCount(d,s,l)})}_isInHeading(e,t){const n=parseInt(t.getAttribute("headingRows")||"0");return!!n&&e.parent.index<n}}class RFe extends ut{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,n=e.getSelectionAffectedTableCells(t.document.selection);if(n.length===0){this.isEnabled=!1,this.value=!1;return}const r=n[0].findAncestor("table");this.isEnabled=t.schema.checkAttribute(r,"headingColumns"),this.value=n.every(s=>MS(e,s))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),n=this.editor.model,r=t.getSelectionAffectedTableCells(n.document.selection),s=r[0].findAncestor("table"),{first:o,last:a}=t.getColumnIndexes(r),l=this.value?o:a+1;n.change(c=>{if(l){const d=zX(s,l);for(const{cell:f,column:m}of d)WX(f,m,l,c)}t.setHeadingColumnsCount(c,s,l)})}}const FFe=5,VS=40,OFe=2,NFe=3;function BFe(i){const e=new Set;for(const t of i.document.differ.getChanges()){let n=null;switch(t.type){case"insert":n=["table","tableRow","tableCell"].includes(t.name)?t.position:null;break;case"remove":n=["tableRow","tableCell"].includes(t.name)?t.position:null;break;case"attribute":t.range.start.nodeAfter&&(n=["table","tableRow","tableCell"].includes(t.range.start.nodeAfter.name)?t.range.start:null);break}if(!n)continue;const r=n.nodeAfter&&n.nodeAfter.is("element","table")?n.nodeAfter:n.findAncestor("table");for(const s of i.createRangeOn(r).getItems())s.is("element","table")&&I0(s)&&e.add(s)}return e}function MFe(i,e){return VS*100/KX(i,e)}function KX(i,e){const t=m9(i,"tbody",e)||m9(i,"thead",e),n=e.editing.view.domConverter.mapViewToDom(t);return jS(n)}function m9(i,e,t){return[...[...t.editing.mapper.toViewElement(i).getChildren()].find(s=>s.is("element","table")).getChildren()].find(s=>s.is("element",e))}function jS(i){const e=$e.window.getComputedStyle(i);return e.boxSizing==="border-box"?parseFloat(e.width)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderLeftWidth)-parseFloat(e.borderRightWidth):parseFloat(e.width)}function LFe(i,e){const t=e.getCellLocation(i).column,n=i.getAttribute("colspan")||1;return{leftEdge:t,rightEdge:t+n-1}}function Jr(i){const e=Math.pow(10,OFe),t=typeof i=="number"?i:parseFloat(i);return Math.round(t*e)/e}function UFe(i,e,t){return i<=e?Jr(e):i>=t?Jr(t):Jr(i)}function VFe(i,e){return Array(i).fill(e)}function Zg(i){return i.map(e=>typeof e=="number"?e:parseFloat(e)).filter(e=>!Number.isNaN(e)).reduce((e,t)=>e+t,0)}function P4(i){const e=i.map(r=>r==="auto"||r===void 0?"auto":parseFloat(r.replace("%","")));let t=jFe(e);const n=Zg(t);return n!==100&&(t=t.map(r=>Jr(r*100/n)).map((r,s,o)=>{if(!(s===o.length-1))return r;const l=Zg(o);return Jr(r+100-l)})),t.map(r=>r+"%")}function jFe(i){const e=i.filter(r=>r==="auto").length;if(e===0)return i.map(r=>Jr(r));const t=Zg(i),n=Math.max((100-t)/e,FFe);return i.map(r=>r==="auto"?n:r).map(r=>Jr(r))}function zFe(i){const e=$e.window.getComputedStyle(i);return e.boxSizing==="border-box"?parseInt(e.width):parseFloat(e.width)+parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderWidth)}function XX(i,e,t,n){for(let r=0;r<Math.max(t.length,i.length);r++){const s=i[r],o=t[r];o?s?n.setAttribute("columnWidth",o,s):n.appendElement("tableColumn",{columnWidth:o},e):n.remove(s)}}function I0(i){if(i.is("element","tableColumnGroup"))return i;const e=i.getChildren();return Array.from(e).find(t=>t.is("element","tableColumnGroup"))}function R0(i){const e=I0(i);return e?Array.from(e.getChildren()):[]}function WFe(i){return R0(i).map(e=>e.getAttribute("columnWidth"))}function HFe(i,e){return R0(i).reduce((n,r)=>{const s=r.getAttribute("columnWidth"),o=r.getAttribute("colSpan");if(!o)return n.push(s),n;for(let a=0;a<o;a++)n.push(s);return e.removeAttribute("colSpan",r),n},[])}class Si extends be{static get pluginName(){return"TableUtils"}static get isOfficialPlugin(){return!0}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,n=t.parent,r=n.getChildIndex(t),s=new Vt(n,{row:r});for(const{cell:o,row:a,column:l}of s)if(o===e)return{row:a,column:l};}createTable(e,t){const n=e.createElement("table"),r=t.rows||2,s=t.columns||2;return xT(e,n,0,r,s),t.headingRows&&this.setHeadingRowsCount(e,n,Math.min(t.headingRows,r)),t.headingColumns&&this.setHeadingColumnsCount(e,n,Math.min(t.headingColumns,s)),n}insertRows(e,t={}){const n=this.editor.model,r=t.at||0,s=t.rows||1,o=t.copyStructureFromAbove!==void 0,a=t.copyStructureFromAbove?r-1:r,l=pl(this.editor),c=this.getRows(e),d=this.getColumns(e);if(r>c)throw new oe("tableutils-insertrows-insert-out-of-range",this,{options:t});n.change(f=>{let m=e.getAttribute("headingRows")||0;const p=e.getAttribute("headingColumns")||0;if(m>r&&(m+=s,this.setHeadingRowsCount(f,e,m,{shallow:!0})),!o&&(r===0||r===c)){const x=xT(f,e,r,s,d);if(l)for(let C=0;C<x.length;C++){const D=x[C];for(let E=0;E<d;E++){const T=D[E];(r+C<m||E<p)&&f.setAttribute("tableCellType","header",T)}}return}const g=o?Math.max(r,a):r,y=new Vt(e,{endRow:g}),v=new Array(d).fill(1);for(const{row:x,column:C,cellHeight:D,cellWidth:E,cell:T}of y){const S=x+D-1,A=x<r&&r<=S,I=x<=a&&a<=S;A?(f.setAttribute("rowspan",D+s,T),v[C]=-E):o&&I&&(v[C]=E)}for(let x=0;x<s;x++){const C=f.createElement("tableRow");f.insert(C,e,r);for(let D=0;D<v.length;D++){const E=v[D],T=f.createPositionAt(C,"end");if(E>0){const S=Dd(f,T,E>1?{colspan:E}:void 0);l&&(r+x<m||D<p)&&f.setAttribute("tableCellType","header",S)}D+=Math.abs(E)-1}}})}insertColumns(e,t={}){const n=this.editor.model,r=t.at||0,s=t.columns||1,o=pl(this.editor);n.change(a=>{const l=e.getAttribute("headingRows")||0;let c=e.getAttribute("headingColumns");r<c&&(c+=s,this.setHeadingColumnsCount(a,e,c,{shallow:!0}));const d=this.getColumns(e);if(r===0||d===r){let m=0;for(const p of e.getChildren()){if(!p.is("element","tableRow"))continue;const g=qf(s,a,a.createPositionAt(p,r?"end":0));if(o)for(let y=0;y<g.length;y++)(r+y<c||m<l)&&a.setAttribute("tableCellType","header",g[y]);m++}return}const f=new Vt(e,{column:r,includeAllSlots:!0});for(const m of f){const{row:p,cell:g,cellAnchorColumn:y,cellAnchorRow:v,cellWidth:x,cellHeight:C}=m;if(y<r){a.setAttribute("colspan",x+s,g);const D=v+C-1;for(let E=p;E<=D;E++)f.skipRow(E)}else{const D=qf(s,a,m.getPositionBefore());if(o)for(let E=0;E<D.length;E++)(r+E<c||p<l)&&a.setAttribute("tableCellType","header",D[E])}}})}removeRows(e,t){const n=this.editor.model,r=t.rows||1,s=this.getRows(e),o=t.at,a=o+r-1;if(a>s-1)throw new oe("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});n.change(l=>{const c={first:o,last:a},{cellsToMove:d,cellsToTrim:f}=GFe(e,c);if(d.size){const m=a+1;YFe(e,m,d,l)}for(let m=a;m>=o;m--)l.remove(e.getChild(m));for(const{rowspan:m,cell:p}of f)fi("rowspan",m,p,l);if($Fe(e,c,l),LS(e,this)||US(e,this),pl(this.editor)){let m=e.getAttribute("headingRows")||0;const p=this.getRows(e);for(;m<p&&If({table:e,row:m});)m++;this.setHeadingRowsCount(l,e,m,{shallow:!0})}})}
51removeColumns(e,t){const n=this.editor.model,r=t.at,s=t.columns||1,o=t.at+s-1;n.change(a=>{qFe(e,{first:r,last:o},a);const l=R0(e);for(let c=o;c>=r;c--){for(const{cell:d,column:f,cellWidth:m}of[...new Vt(e)])f<=c&&m>1&&f+m>c?fi("colspan",m-1,d,a):f===c&&a.remove(d);if(l[c]){const d=c===0?l[1]:l[c-1],f=parseFloat(l[c].getAttribute("columnWidth")),m=parseFloat(d.getAttribute("columnWidth"));a.remove(l[c]),a.setAttribute("columnWidth",f+m+"%",d)}}if(US(e,this)||LS(e,this),pl(this.editor)){let c=e.getAttribute("headingColumns")||0;const d=this.getColumns(e);for(;c<d&&If({table:e,column:c});)c++;this.setHeadingColumnsCount(a,e,c,{shallow:!0})}})}splitCellVertically(e,t=2){const n=this.editor.model,s=e.parent.parent,o=parseInt(e.getAttribute("rowspan")||"1"),a=parseInt(e.getAttribute("colspan")||"1");n.change(l=>{if(a>1){const{newCellsSpan:c,updatedSpan:d}=p9(a,t);fi("colspan",d,e,l);const f={};c>1&&(f.colspan=c),o>1&&(f.rowspan=o);const m=a>t?t-1:a-1;qf(m,l,l.createPositionAfter(e),f)}if(a<t){const c=t-a,d=[...new Vt(s)],{column:f}=d.find(({cell:y})=>y===e),m=d.filter(({cell:y,cellWidth:v,column:x})=>{const C=y!==e&&x===f,D=x<f&&x+v>f;return C||D});for(const{cell:y,cellWidth:v}of m)l.setAttribute("colspan",v+c,y);const p={};o>1&&(p.rowspan=o),qf(c,l,l.createPositionAfter(e),p);const g=s.getAttribute("headingColumns")||0;g>f&&fi("headingColumns",g+c,s,l)}})}splitCellHorizontally(e,t=2){const n=this.editor.model,r=e.parent,s=r.parent,o=s.getChildIndex(r),a=parseInt(e.getAttribute("rowspan")||"1"),l=parseInt(e.getAttribute("colspan")||"1");n.change(c=>{if(a>1){const d=[...new Vt(s,{startRow:o,endRow:o+a-1,includeAllSlots:!0})],{newCellsSpan:f,updatedSpan:m}=p9(a,t);fi("rowspan",m,e,c);const{column:p}=d.find(({cell:v})=>v===e),g={};f>1&&(g.rowspan=f),l>1&&(g.colspan=l);let y=0;for(const v of d){const{column:x,row:C}=v,D=C>=o+m,E=x===p;y>=f&&E&&(y=0),D&&E&&(y||qf(1,c,v.getPositionBefore(),g),y++)}}if(a<t){const d=t-a,f=[...new Vt(s,{startRow:0,endRow:o})];for(const{cell:g,cellHeight:y,row:v}of f)if(g!==e&&v+y>o){const x=y+d;c.setAttribute("rowspan",x,g)}const m={};l>1&&(m.colspan=l),xT(c,s,o+1,d,1,m);const p=s.getAttribute("headingRows")||0;p>o&&fi("headingRows",p+d,s,c)}})}getColumns(e){return[...e.getChild(0).getChildren()].filter(n=>n.is("element","tableCell")).reduce((n,r)=>{const s=parseInt(r.getAttribute("colspan")||"1");return n+s},0)}getRows(e){return Array.from(e.getChildren()).reduce((t,n)=>n.is("element","tableRow")?t+1:t,0)}createTableWalker(e,t={}){return new Vt(e,t)}getSelectedTableCells(e){const t=[];for(const n of this.sortRanges(e.getRanges())){const r=n.getContainedElement();r&&r.is("element","tableCell")&&t.push(r)}return t}setHeadingRowsCount(e,t,n,r={}){const{shallow:s,resetFormerHeadingCells:o=!0,autoExpand:a=!0}=r,l=t.getAttribute("headingRows")||0;if(n!==l&&(fi("headingRows",n,t,e,0),!(s||!pl(this.editor)))){for(const{cell:c,row:d,column:f}of new Vt(t,{endRow:n-1}))Gy({table:t,writer:e,cell:c,row:d,column:f});if(o&&n<l)for(let c=n;c<l&&If({table:t,row:c});c++)for(const{cell:d,row:f,column:m}of new Vt(t,{row:c}))Gy({table:t,writer:e,cell:d,row:f,column:m});if(a&&n>l){const c=this.getRows(t);for(;n<c&&If({table:t,row:n});)n++;fi("headingRows",n,t,e,0)}}}setHeadingColumnsCount(e,t,n,r={}){const{shallow:s,resetFormerHeadingCells:o=!0,autoExpand:a=!0}=r,l=t.getAttribute("headingColumns")||0;if(n!==l&&(fi("headingColumns",n,t,e,0),!(s||!pl(this.editor)))){for(const{cell:c,row:d,column:f}of new Vt(t,{endColumn:n-1}))Gy({table:t,writer:e,cell:c,row:d,column:f});if(o&&n<l)for(let c=n;c<l&&If({table:t,column:c});c++)for(const{cell:d,row:f,column:m}of new Vt(t,{column:c}))Gy({table:t,writer:e,cell:d,row:f,column:m});if(a&&n>l){const c=this.getColumns(t);for(;n<c&&If({table:t,column:n});)n++;fi("headingColumns",n,t,e,0)}}}getTableCellsContainingSelection(e){const t=[];for(const n of e.getRanges()){const r=n.start.findAncestor("tableCell");r&&t.push(r)}return t}getSelectionAffectedTableCells(e){const t=this.getSelectedTableCells(e);return t.length?t:this.getTableCellsContainingSelection(e)}getRowIndexes(e){const t=e.map(n=>n.parent.index);return this._getFirstLastIndexesObject(t)}
51getColumnIndexes(e){const t=e[0].findAncestor("table"),r=[...new Vt(t)].filter(s=>e.includes(s.cell)).map(s=>s.column);return this._getFirstLastIndexesObject(r)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const t=new Set,n=new Set;let r=0;for(const o of e){const{row:a,column:l}=this.getCellLocation(o),c=parseInt(o.getAttribute("rowspan"))||1,d=parseInt(o.getAttribute("colspan"))||1;t.add(a),n.add(l),c>1&&t.add(a+c-1),d>1&&n.add(l+d-1),r+=c*d}return XFe(t,n)==r}sortRanges(e){return Array.from(e).sort(KFe)}_getFirstLastIndexesObject(e){const t=e.sort((s,o)=>s-o),n=t[0],r=t[t.length-1];return{first:n,last:r}}_areCellInTheSameTableSection(e){const t=e[0].findAncestor("table"),n=this.getRowIndexes(e),r=parseInt(t.getAttribute("headingRows"))||0;if(!this._areIndexesInSameSection(n,r))return!1;const s=this.getColumnIndexes(e),o=parseInt(t.getAttribute("headingColumns"))||0;return this._areIndexesInSameSection(s,o)}_areIndexesInSameSection({first:e,last:t},n){const r=e<n,s=t<n;return r===s}}function xT(i,e,t,n,r,s={}){const o=[];for(let a=0;a<n;a++){const l=i.createElement("tableRow");i.insert(l,e,t),o.push(qf(r,i,i.createPositionAt(l,"end"),s))}return o}function qf(i,e,t,n={}){const r=[];let s=t;for(let o=0;o<i;o++){const a=Dd(e,s,n);r.push(a),s=e.createPositionAfter(a)}return r}function p9(i,e){if(i<e)return{newCellsSpan:1,updatedSpan:1};const t=Math.floor(i/e),n=i-t*e+t;return{newCellsSpan:t,updatedSpan:n}}function qFe(i,e,t){const n=i.getAttribute("headingColumns")||0;if(n&&e.first<n){const r=Math.min(n-1,e.last)-e.first+1;t.setAttribute("headingColumns",n-r,i)}}function $Fe(i,{first:e,last:t},n){const r=i.getAttribute("headingRows")||0;if(e<r){const s=t<r?r-(t-e+1):e;fi("headingRows",s,i,n,0)}}function GFe(i,{first:e,last:t}){const n=new Map,r=[];for(const{row:s,column:o,cellHeight:a,cell:l}of new Vt(i,{endRow:t})){const c=s+a-1;if(s>=e&&s<=t&&c>t){const m=t-s+1,p=a-m;n.set(o,{cell:l,rowspan:p})}if(s<e&&c>=e){let m;c>=t?m=t-e+1:m=c-e+1,r.push({cell:l,rowspan:a-m})}}return{cellsToMove:n,cellsToTrim:r}}function YFe(i,e,t,n){const s=[...new Vt(i,{includeAllSlots:!0,row:e})],o=i.getChild(e);let a;for(const{column:l,cell:c,isAnchor:d}of s)if(t.has(l)){const{cell:f,rowspan:m}=t.get(l),p=a?n.createPositionAfter(a):n.createPositionAt(o,0);n.move(n.createRangeOn(f),p),fi("rowspan",m,f,n),a=f}else d&&(a=c)}function KFe(i,e){const t=i.start,n=e.start;return t.isBefore(n)?-1:1}function XFe(i,e){const t=Array.from(i.values()),n=Array.from(e.values()),r=Math.max(...t),s=Math.min(...t),o=Math.max(...n),a=Math.min(...n);return(r-s+1)*(o-a+1)}function Gy({writer:i,table:e,row:t,column:n,cell:r}){const s=e.getAttribute("headingRows")||0,o=e.getAttribute("headingColumns")||0;t>=s&&n>=o?i.removeAttribute("tableCellType",r):i.setAttribute("tableCellType","header",r)}class QFe extends ut{refresh(){const e=this.editor.plugins.get(Si),t=e.getSelectedTableCells(this.editor.model.document.selection);this.isEnabled=e.isSelectionRectangular(t)}execute(){const e=this.editor.model,t=this.editor.plugins.get(Si);e.change(n=>{const r=t.getSelectedTableCells(e.document.selection),s=r.shift(),{mergeWidth:o,mergeHeight:a}=JFe(s,r,t);fi("colspan",o,s,n),fi("rowspan",a,s,n);for(const c of r)ZFe(c,s,n);const l=s.findAncestor("table");A4(l,t),n.setSelection(s,"in")})}}function ZFe(i,e,t){g9(i)||(g9(e)&&t.remove(t.createRangeIn(e)),t.move(t.createRangeIn(i),t.createPositionAt(e,"end"))),t.remove(i)}function g9(i){const e=i.getChild(0);return i.childCount==1&&e.is("element","paragraph")&&e.isEmpty}function JFe(i,e,t){let n=0,r=0;for(const c of e){const{row:d,column:f}=t.getCellLocation(c);n=b9(c,f,n,"colspan"),r=b9(c,d,r,"rowspan")}const{row:s,column:o}=t.getCellLocation(i),a=n-o,l=r-s;return{mergeWidth:a,mergeHeight:l}}function b9(i,e,t,n){const r=parseInt(i.getAttribute(n)||"1");return Math.max(t,e+r)}class eOe extends ut{constructor(e){super(e),this.affectsData=!1}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=t.length>0}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),n=t.getSelectionAffectedTableCells(e.document.selection),r=t.getRowIndexes(n),s=n[0].findAnce
51stor("table"),o=[];for(let a=r.first;a<=r.last;a++)for(const l of s.getChild(a).getChildren())o.push(e.createRangeOn(l));e.change(a=>{a.setSelection(o)})}}class tOe extends ut{constructor(e){super(e),this.affectsData=!1}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=t.length>0}execute(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,n=e.getSelectionAffectedTableCells(t.document.selection),r=n[0],s=n.pop(),o=r.findAncestor("table"),a=e.getCellLocation(r),l=e.getCellLocation(s),c=Math.min(a.column,l.column),d=Math.max(a.column,l.column),f=[];for(const m of new Vt(o,{startColumn:c,endColumn:d}))f.push(t.createRangeOn(m.cell));t.change(m=>{m.setSelection(f)})}}function nOe(i){i.document.registerPostFixer(e=>iOe(e,i))}function iOe(i,e){const t=e.document.differ.getChanges();let n=!1;const r=new Set;for(const s of t){let o=null;s.type=="insert"&&s.name=="table"&&(o=s.position.nodeAfter),(s.type=="insert"||s.type=="remove")&&(s.name=="tableRow"||s.name=="tableCell")&&(o=s.position.findAncestor("table")),lOe(s)&&(o=s.range.start.findAncestor("table")),o&&!r.has(o)&&(n=rOe(o,i)||n,n=sOe(o,i)||n,r.add(o))}return n}function rOe(i,e){let t=!1;const n=oOe(i);if(n.length){t=!0;for(const r of n)fi("rowspan",r.rowspan,r.cell,e,1)}return t}function sOe(i,e){let t=!1;const n=aOe(i),r=[];for(const[l,c]of n.entries())!c&&i.getChild(l).is("element","tableRow")&&r.push(l);if(r.length){t=!0;for(const l of r.reverse())e.remove(i.getChild(l)),n.splice(l,1)}const s=n.filter((l,c)=>i.getChild(c).is("element","tableRow")),o=s[0];if(!s.every(l=>l===o)){const l=s.reduce((c,d)=>d>c?d:c,0);for(const[c,d]of s.entries()){const f=l-d;if(f){for(let m=0;m<f;m++)Dd(e,e.createPositionAt(i.getChild(c),"end"));t=!0}}}return t}function oOe(i){const e=parseInt(i.getAttribute("headingRows")||"0"),t=Array.from(i.getChildren()).reduce((r,s)=>s.is("element","tableRow")?r+1:r,0),n=[];for(const{row:r,cell:s,cellHeight:o}of new Vt(i)){if(o<2)continue;const l=r<e?e:t;if(r+o>l){const c=l-r;n.push({cell:s,rowspan:c})}}return n}function aOe(i){const e=new Array(i.childCount).fill(0);for(const{rowIndex:t}of new Vt(i,{includeAllSlots:!0}))e[t]++;return e}function lOe(i){if(i.type!=="attribute")return!1;const e=i.attributeKey;return e==="headingRows"||e==="colspan"||e==="rowspan"}function cOe(i){i.document.registerPostFixer(e=>uOe(e,i))}function uOe(i,e){const t=e.document.differ.getChanges();let n=!1;for(const r of t)r.type=="insert"&&r.name=="table"&&(n=dOe(r.position.nodeAfter,i)||n),r.type=="insert"&&r.name=="tableRow"&&(n=QX(r.position.nodeAfter,i)||n),r.type=="insert"&&r.name=="tableCell"&&(n=zS(r.position.nodeAfter,i)||n),(r.type=="remove"||r.type=="insert")&&fOe(r)&&(n=zS(r.position.parent,i)||n);return n}function dOe(i,e){let t=!1;for(const n of i.getChildren())n.is("element","tableRow")&&(t=QX(n,e)||t);return t}function QX(i,e){let t=!1;for(const n of i.getChildren())t=zS(n,e)||t;return t}function zS(i,e){if(i.childCount==0)return e.insertElement("paragraph",i),!0;const t=Array.from(i.getChildren()).filter(n=>n.is("$text"));for(const n of t)e.wrap(e.createRangeOn(n),"paragraph");return!!t.length}function fOe(i){return i.position.parent.is("element","tableCell")?i.type=="insert"&&i.name=="$text"||i.type=="remove":!1}function hOe(i,e){const t=i.document.differ;for(const n of t.getChanges()){let r,s=!1;if(n.type=="attribute"){const c=n.range.start.nodeAfter;if(!c||!c.is("element","table")||n.attributeKey!="headingRows"&&n.attributeKey!="headingColumns")continue;r=c,s=n.attributeKey=="headingRows"}else(n.name=="tableRow"||n.name=="tableCell")&&(r=n.position.findAncestor("table"),s=n.name=="tableRow");if(!r)continue;const o=r.getAttribute("headingRows")||0,a=r.getAttribute("headingColumns")||0,l=new Vt(r);for(const c of l){const f=c.row<o||c.column<a?"th":"td",m=e.mapper.toViewElement(c.cell);m&&m.is("element")&&m.name!=f&&e.reconvertItem(s?c.cell.parent:c.cell)}}}function mOe(i,e){const t=i.document.differ,n=new Set;for(const r of t.getChanges()){const s=r.type=="attribute"?r.range.start.parent:r.position.parent;s.is("element","tableCell")&&n.add(s)}for(const r of n.values()){const s=Array.from(r.getChildren()).filter(o=>
vendor: 9,351 bytes, line 51
51pOe(o,e.mapper));for(const o of s)e.reconvertItem(o)}}function pOe(i,e){if(!i.is("element","paragraph"))return!1;const t=e.toViewElement(i);return t?YX(i)!==t.is("element","span"):!1}class F0 extends be{_additionalSlots;static get pluginName(){return"TableEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Si]}constructor(e){super(e),this._additionalSlots=[]}init(){const e=this.editor,t=e.model,n=t.schema,r=e.conversion,s=e.plugins.get(Si);n.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),n.register("tableRow",{allowIn:"table",isLimit:!0}),n.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),r.for("upcast").add(cFe()),r.for("upcast").add(uFe()),r.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:a9(s,{asWidget:!0,additionalSlots:this._additionalSlots})}),r.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:a9(s,{additionalSlots:this._additionalSlots})}),r.for("upcast").elementToElement({model:"tableRow",view:"tr"}),r.for("upcast").add(dFe()),r.for("downcast").elementToElement({model:"tableRow",view:mFe()}),r.for("upcast").elementToElement({model:"tableCell",view:"td"}),r.for("upcast").elementToElement({model:"tableCell",view:"th"}),r.for("upcast").add(o9("td")),r.for("upcast").add(o9("th")),r.for("editingDowncast").elementToElement({model:"tableCell",view:l9({asWidget:!0,cellTypeEnabled:()=>pl(this.editor)})}),r.for("dataDowncast").elementToElement({model:"tableCell",view:l9({cellTypeEnabled:()=>pl(this.editor)})}),r.for("editingDowncast").elementToElement({model:"paragraph",view:c9({asWidget:!0}),converterPriority:"high"}),r.for("dataDowncast").elementToElement({model:"paragraph",view:c9(),converterPriority:"high"}),r.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),r.for("upcast").attributeToAttribute({model:{key:"colspan",value:y9("colspan")},view:"colspan"}),r.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),r.for("upcast").attributeToAttribute({model:{key:"rowspan",value:y9("rowspan")},view:"rowspan"}),this._addPlainTableOutputConverters(),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.config.define("table.showHiddenBorders",!0),e.config.get("table.showHiddenBorders")&&e.editing.view.change(o=>{for(const a of e.editing.view.document.roots)o.addClass("ck-table-show-hidden-borders",a)}),e.commands.add("insertTable",new xFe(e)),e.commands.add("insertTableRowAbove",new u9(e,{order:"above"})),e.commands.add("insertTableRowBelow",new u9(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new d9(e,{order:"left"})),e.commands.add("insertTableColumnRight",new d9(e,{order:"right"})),e.commands.add("removeTableRow",new TFe(e)),e.commands.add("removeTableColumn",new kFe(e)),e.commands.add("splitTableCellVertically",new f9(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new f9(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new QFe(e)),e.commands.add("mergeTableCellRight",new $y(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new $y(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new $y(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new $y(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new RFe(e)),e.commands.add("setTableRowHeader",new IFe(e)),e.commands.add("selectTableRow",new eOe(e)),e.commands.add("selectTableColumn",new tOe(e)),nOe(t),cOe(t),this.listenTo(t.document,"change:data",()=>{pl(e)||hOe(t,e.editing),mOe(t,e.editing)})}registerAdditionalSlot(e){this._additionalSlots.push(e)}_addPlainTableOutputConverters(){const e=this.editor;e.conversion.for("dataDowncast").elementToStructure({model:"table",view:bFe(e),converterPriority:"high"}),e.plugins.has("TableCaptionEditing")&&e.conversion.for("dataDowncast").elementToElement({model:"caption",view:yFe(e),converterPriority:"high"}),e.plugins.has("TablePropertiesEditing")&&wFe(e)}}function y9(i){return e=>{const t=parseInt(e.getAttribute(i));return Number.isNaN(t)||t<=0?null:t}}class v9 extends Ge{items;keystrokes;focusTracker;constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new qn,this.focusTracker=new Fn,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",(n,r)=>`${r} × ${n}`),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"[email protected]":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck","ck-insert-table-dropdown__label"],"aria-hidden":!0},children:[{text:t.to("label")}]}],on:{mousedown:t.to(n=>{n.preventDefault()}),click:t.to(()=>{this.fire("execute")})}}),this.on("boxover",(n,r)=>{const{row:s,column:o}=r.target.dataset;this.items.get((parseInt(s,10)-1)*10+(parseInt(o,10)-1)).focus()}),this.focusTracker.on("change:focusedElement",(n,r,s)=>{if(!s)return;const{row:o,column:a}=s.dataset;this.set({rows:parseInt(o),columns:parseInt(a)})}),this.on("change:columns",()=>this._highlightGridBoxes()),this.on("change:rows",()=>this._highlightGridBoxes())}render(){super.render(),c4({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection});for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}reset(){this.set({rows:1,columns:1})}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map((n,r)=>{const s=Math.floor(r/10),o=r%10,a=s<e&&o<t;n.set("isOn",a)})}_createGridButton(e,t,n,r){const s=new nt(e);return s.set({label:r,class:"ck-insert-table-dropdown-grid-box"}),s.extendTemplate({attributes:{"data-row":t,"data-column":n}}),s}_createGridCollection(){const e=[];for(let t=0;t<100;t++){const n=Math.floor(t/10),r=t%10,s=`${n+1} × ${r+1}`;e.push(this._createGridButton(this.locale,n+1,r+1,s))}return this.createCollection(e)}}class gOe extends be{static get pluginName(){return"TableUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t,r=e.locale.contentLanguageDirection==="ltr";e.ui.componentFactory.add("insertTable",s=>{const o=e.commands.get("insertTable"),a=zi(s);a.bind("isEnabled").to(o),a.buttonView.set({icon:n7,label:t("Insert table"),tooltip:!0});let l;return a.on("change:isOpen",()=>{l||(l=new v9(s),a.panelView.children.add(l),l.delegate("execute").to(a),a.on("execute",()=>{e.execute("insertTable",{rows:l.rows,columns:l.columns}),e.editing.view.focus()}))}),a}),e.ui.componentFactory.add("menuBar:insertTable",s=>{const o=e.commands.get("insertTable"),a=new ls(s),l=new v9(s);return l.delegate("execute").to(a),a.on("change:isOpen",(c,d,f)=>{f||l.reset()}),l.on("execute",()=>{e.execute("insertTable",{rows:l.rows,columns:l.columns}),e.editing.view.focus()}),a.buttonView.set({label:t("Table"),icon:n7}),a.panelView.children.add(l),a.bind("isEnabled").to(o),a}),e.ui.componentFactory.add("tableColumn",s=>{const o=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:r?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:r?"insertTableColumnRight":"insertTableColumnLeft",label:t("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:t("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:t("Select column")}}];return this._prepareDropdown(t("Column"),cAe,o,s)}),e.ui.componentFactory.add("tableRow",s=>{const o=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:t("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:t("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:t("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:t("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:t("Select row")}}];return this._prepareDropdown(t("Row"),fAe,o,s)}),e.ui.componentFactory.add("mergeTableCells",s=>{const o=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:r?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:r?"mergeTableCellLeft":"mergeTableCellRight",label:t("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:t("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:t("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(t("Merge cells"),uAe,o,s)})}_prepareDropdown(e,t,n,r){const s=this.editor,o=zi(r),a=this._fillDropdownWithListOptions(o,n);return o.buttonView.set({label:e,icon:t,tooltip:!0}),o.bind("isEnabled").toMany(a,"isEnabled",(...l)=>l.some(c=>
51c)),this.listenTo(o,"execute",l=>{s.execute(l.source.commandName),l.source instanceof Lh||s.editing.view.focus()}),o}_prepareMergeSplitButtonDropdown(e,t,n,r){const s=this.editor,o=zi(r,rm),a="mergeTableCells",l=s.commands.get(a),c=this._fillDropdownWithListOptions(o,n);return o.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),o.bind("isEnabled").toMany([l,...c],"isEnabled",(...d)=>d.some(f=>f)),this.listenTo(o.buttonView,"execute",()=>{s.execute(a),s.editing.view.focus()}),this.listenTo(o,"execute",d=>{s.execute(d.source.commandName),s.editing.view.focus()}),o}_fillDropdownWithListOptions(e,t){const n=this.editor,r=[],s=new Jn;for(const o of t)bOe(o,n,r,s);return Hl(e,s),r}}function bOe(i,e,t,n){if(i.type==="button"||i.type==="switchbutton"){const r=i.model=new Fl(i.model),{commandName:s,bindIsOn:o}=i.model,a=e.commands.get(s);t.push(a),r.set({commandName:s}),r.bind("isEnabled").to(a),o&&r.bind("isOn").to(a,"value"),r.set({withText:!0})}n.add(i)}class Fc extends be{static get pluginName(){return"TableSelection"}static get isOfficialPlugin(){return!0}static get requires(){return[Si,Si]}init(){const e=this.editor,t=e.model,n=e.editing.view;this.listenTo(t,"deleteContent",(r,s)=>this._handleDeleteContent(r,s),{priority:"high"}),this.listenTo(n.document,"insertText",(r,s)=>this._handleInsertTextEvent(r,s),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(Si),t=this.editor.model.document.selection,n=e.getSelectedTableCells(t);return n.length==0?null:n}getSelectionAsFragment(){const e=this.editor.plugins.get(Si),t=this.getSelectedTableCells();return t?this.editor.model.change(n=>{const r=n.createDocumentFragment(),{first:s,last:o}=e.getColumnIndexes(t),{first:a,last:l}
51=e.getRowIndexes(t),c=t[0].findAncestor("table");let d=l,f=o;if(e.isSelectionRectangular(t)){const g={firstColumn:s,lastColumn:o,firstRow:a,lastRow:l};d=qX(c,g),f=$X(c,g)}const p=UX(c,{startRow:a,startColumn:s,endRow:d,endColumn:f},n);return n.insert(p,r,0),r}):null}setCellSelection(e,t){const n=this._getCellsToSelect(e,t);this.editor.model.change(r=>{r.setSelection(n.cells.map(s=>r.createRangeOn(s)),{backward:n.backward})})}getFocusCell(){const n=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return n&&n.is("element","tableCell")?n:null}getAnchorCell(){const e=this.editor.model.document.selection,n=Rn(e.getRanges()).getContainedElement();return n&&n.is("element","tableCell")?n:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add(r=>r.on("selection",(s,o,a)=>{const l=a.writer;n(l);const c=this.getSelectedTableCells();if(!c)return;for(const f of c){const m=a.mapper.toViewElement(f);l.addClass("ck-editor__editable_selected",m),t.add(m)}const d=a.mapper.toViewElement(c[c.length-1]);l.setSelection(d,0)},{priority:"lowest"}));function n(r){for(const s of t)r.removeClass("ck-editor__editable_selected",s);t.clear()}}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change(n=>{const r=n.createPositionAt(t[0],0),s=e.model.schema.getNearestSelectionRange(r);n.setSelection(s)})}})}_handleDeleteContent(e,t){const n=this.editor.plugins.get(Si),r=t[0],s=t[1],o=this.editor.model,a=!s||s.direction=="backward",l=n.getSelectedTableCells(r);l.length&&(e.stop(),o.change(c=>{const d=l[a?l.length-1:0];o.change(m=>{for(const p of l)o.deleteContent(m.createSelection(p,"in"))});const f=o.schema.getNearestSelectionRange(c.createPositionAt(d,0));r.is("documentSelection")?c.setSelection(f):r.setTo(f)}))}_handleInsertTextEvent(e,t){const n=this.editor,r=this.getSelectedTableCells();if(!r)return;const s=n.editing.view,o=n.editing.mapper,a=r.map(l=>s.createRangeOn(o.toViewElement(l)));t.selection=s.createSelection(a),t.preventDefault()}_getCellsToSelect(e,t){const n=this.editor.plugins.get("TableUtils"),r=n.getCellLocation(e),s=n.getCellLocation(t),o=Math.min(r.row,s.row),a=Math.max(r.row,s.row),l=Math.min(r.column,s.column),c=parseInt(t.getAttribute("colspan")||"1")-1,d=Math.max(r.column,s.column+c),f=new Array(a-o+1).fill(null).map(()=>[]),m={startRow:o,endRow:a,startColumn:l,endColumn:d};for(const{row:y,cell:v}of new Vt(e.findAncestor("table"),m))f[y-o].push(v);const p=s.row<r.row,g=s.column<r.column;return p&&f.reverse(),g&&f.forEach(y=>y.reverse()),{cells:f.flat(),backward:p||g}}}class yOe extends be{static get pluginName(){return"TableClipboard"}static get isOfficialPlugin(){return!0}static get requires(){return[ag,Ls,Fc,Si]}init(){const t=this.editor.editing.view.document;this.listenTo(t,"copy",(n,r)=>this._onCopyCut(n,r)),this.listenTo(t,"cut",(n,r)=>this._onCopyCut(n,r)),this._listenToContentInsertion(),this.decorate("_replaceTableSlotCell")}_listenToContentInsertion(){const{editor:e}=this,t=e.plugins.get(Ls),n=e.plugins.get(Fc);let r=!1;t.on("contentInsertion",(s,o)=>{r=o.method==="paste"}),this.listenTo(e.model,"insertContent",(s,[o,a])=>{(r||n.getSelectedTableCells()!==null)&&this._onInsertContent(s,o,a)},{priority:"high"}),t.on("contentInsertion",()=>{r=!1},{priority:"lowest"})}_onCopyCut(e,t){const n=this.editor.editing.view,r=this.editor.plugins.get(Fc),s=this.editor.plugins.get(ag);r.getSelectedTableCells()&&(e.name=="cut"&&!this.editor.model.canEditAt(this.editor.model.document.selection)||(t.preventDefault(),e.stop(),this.editor.model.enqueueChange({isUndoable:e.name==="cut"},()=>{const o=s._copySelectedFragmentWithMarkers(e.name,this.editor.model.document.selection,()=>r.getSelectionAsFragment());n.document.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:this.editor.data.toView(o),method:e.name})})))}_onInsertContent(e,t,n){if(n&&!n.is("documentSelection"))return;const r=this.editor.model,s=this.editor.plugins.get(Si),o=this.editor.plugins.get(ag),a=this.getTableIfOnlyTableInContent(t,r);
51if(!a)return;const l=s.getSelectionAffectedTableCells(r.document.selection);if(!l.length){A4(a,s);return}e.stop(),t.is("documentFragment")?o._pasteMarkersIntoTransformedElement(t.markers,c=>this._replaceSelectedCells(a,l,c)):this.editor.model.change(c=>{this._replaceSelectedCells(a,l,c)})}_replaceSelectedCells(e,t,n){const r=this.editor.plugins.get(Si),s={width:r.getColumns(e),height:r.getRows(e)},o=vOe(t,s,n,r),a=o.lastRow-o.firstRow+1,l=o.lastColumn-o.firstColumn+1,c={startRow:0,startColumn:0,endRow:Math.min(a,s.height)-1,endColumn:Math.min(l,s.width)-1};e=UX(e,c,n);const d=t[0].findAncestor("table"),f=this._replaceSelectedCellsWithPasted(e,s,d,o,n);if(this.editor.plugins.get("TableSelection").isEnabled){const m=r.sortRanges(f.map(p=>n.createRangeOn(p)));n.setSelection(m)}else n.setSelection(f[0],0);return d}_replaceSelectedCellsWithPasted(e,t,n,r,s){const{width:o,height:a}=t,l=xOe(e,o,a),c=[...new Vt(n,{startRow:r.firstRow,endRow:r.lastRow,startColumn:r.firstColumn,endColumn:r.lastColumn,includeAllSlots:!0})],d=[];let f;for(const v of c){const{row:x,column:C}=v;C===r.firstColumn&&(f=v.getPositionBefore());const D=x-r.firstRow,E=C-r.firstColumn,T=l[D%a][E%o],S=T?s.cloneElement(T):null,A=this._replaceTableSlotCell(v,S,f,s);A&&(HX(A,x,C,r.lastRow,r.lastColumn,s),d.push(A),f=s.createPositionAfter(A))}const m=parseInt(n.getAttribute("headingRows")||"0"),p=parseInt(n.getAttribute("headingColumns")||"0"),g=r.firstRow<m&&m<=r.lastRow,y=r.firstColumn<p&&p<=r.lastColumn;if(g){const v={first:r.firstColumn,last:r.lastColumn},x=WS(n,m,v,s,r.firstRow);d.push(...x)}if(y){const v={first:r.firstRow,last:r.lastRow},x=HS(n,p,v,s);d.push(...x)}return d}_replaceTableSlotCell(e,t,n,r){const{cell:s,isAnchor:o}=e;return o&&r.remove(s),t?(r.insert(t,n),t):null}getTableIfOnlyTableInContent(e,t){if(!e.is("documentFragment")&&!e.is("element"))return null;if(e.is("element","table"))return e;if(e.childCount==1&&e.getChild(0).is("element","table"))return e.getChild(0);const n=t.createRangeIn(e);for(const r of n.getItems())if(r.is("element","table")){const s=t.createRange(n.start,t.createPositionBefore(r));if(t.hasContent(s,{ignoreWhitespaces:!0}))return null;const o=t.createRange(t.createPositionAfter(r),n.end);return t.hasContent(o,{ignoreWhitespaces:!0})?null:r}return null}}function vOe(i,e,t,n){const r=i[0].findAncestor("table"),s=n.getColumnIndexes(i),o=n.getRowIndexes(i),a={firstColumn:s.first,lastColumn:s.last,firstRow:o.first,lastRow:o.last},l=i.length===1;return l&&(a.lastRow+=e.height-1,a.lastColumn+=e.width-1,wOe(r,a.lastRow+1,a.lastColumn+1,n)),l||!n.isSelectionRectangular(i)?_Oe(r,a,t):(a.lastRow=qX(r,a),a.lastColumn=$X(r,a)),a}function wOe(i,e,t,n){const r=n.getColumns(i),s=n.getRows(i);t>r&&n.insertColumns(i,{at:r,columns:t-r}),e>s&&n.insertRows(i,{at:s,rows:e-s})}function xOe(i,e,t){const n=new Array(t).fill(null).map(()=>new Array(e).fill(null));for(const{column:r,row:s,cell:o}of new Vt(i))n[s][r]=o;return n}function _Oe(i,e,t){const{firstRow:n,lastRow:r,firstColumn:s,lastColumn:o}=e,a={first:n,last:r},l={first:s,last:o};HS(i,s,a,t),HS(i,o+1,a,t),WS(i,n,l,t),WS(i,r+1,l,t,n)}function WS(i,e,t,n,r=0){return e<1?void 0:VX(i,e,r).filter(({column:a,cellWidth:l})=>ZX(a,l,t)).map(({cell:a})=>jX(a,e,n))}function HS(i,e,t,n){return e<1?void 0:zX(i,e).filter(({row:o,cellHeight:a})=>ZX(o,a,t)).map(({cell:o,column:a})=>WX(o,a,e,n))}function ZX(i,e,t){const n=i+e-1,{first:r,last:s}=t,o=i>=r&&i<=s,a=i<r&&n>=r;return o||a}class COe extends be{static get pluginName(){return"TableKeyboard"}static get isOfficialPlugin(){return!0}static get requires(){return[Fc,Si]}init(){const e=this.editor,n=e.editing.view.document,r=e.t;this.listenTo(n,"arrowKey",(...s)=>this._onArrowKey(...s),{context:"table"}),this.listenTo(n,"tab",(...s)=>this._handleTabOnSelectedTable(...s),{context:"figure"}),this.listenTo(n,"tab",(...s)=>this._handleTab(...s),{context:["th","td"]}),e.accessibility.addKeystrokeInfoGroup({id:"table",label:r("Keystrokes that can be used in a table cell"),keystrokes:[{label:r("Move the selection to the next cell"),keystroke:"Tab"},{label:r("Move the selection to the previous cell"),keystroke:"Shift+Tab"},{label:r("Insert a new table row (when in the last cell of a table)"),keystroke:"Tab"},{label:r("Navigate through the table"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]}]})}_handleTabOnSelectedTable(e,t){const s=this.editor.model.document.selection.getSelectedElement();!s||!s.is("element","table")||t.stopPropagation()}_handleTab(e,t){const n=this.editor,r=this.editor.plugins.get(Si),s=this.editor.plugins.get("TableSelection"),o=n.model.document.selection,a=!t.shiftKey;let l=r.getTableCellsContainingSelection(o)[0];if(l||(l=s.getFocusCell()),!l)return;t.stopPropagation();const c=l.parent,d=c.parent,f=d.getChildIndex(c),p=c.getChildIndex(l)===c.childCount-1,g=f===r.getRows(d)-1;a&&g&&p&&n.execute("insertTableRowBelow")}_onArrowKey(e,t){const n=this.editor,r=t.keyCode,s=w_(r,n.locale.contentLanguageDirection);this._handleArrowKeys(s,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const n=this.editor.plugins.get(Si),r=this.editor.plugins.get("TableSelection"),s=this.editor.model,o=s.document.selection,a=["right","down"].includes(e),l=n.getSelectedTableCells(o);if(l.length){let d;return t?d=r.getFocusCell():d=a?l[l.length-1]:l[0],this._navigateFromCellInDirection(d,e,t),!0}
51const c=o.focus.findAncestor("tableCell");if(!c)return!1;if(!o.isCollapsed)if(t){if(o.isBackward==a&&!o.containsEntireContent(c))return!1}else{const d=o.getSelectedElement();if(!d||!s.schema.isObject(d))return!1}return this._isSelectionAtCellEdge(o,c,a)?(this._navigateFromCellInDirection(c,e,t),!0):!1}_isSelectionAtCellEdge(e,t,n){const r=this.editor.model,s=this.editor.model.schema,o=n?e.getLastPosition():e.getFirstPosition();if(!s.getLimitElement(o).is("element","tableCell"))return r.createPositionAt(t,n?"end":0).isTouching(o);const a=r.createSelection(o);return r.modifySelection(a,{direction:n?"forward":"backward"}),o.isEqual(a.focus)}_navigateFromCellInDirection(e,t,n=!1){const r=this.editor.model,s=e.findAncestor("table"),o=[...new Vt(s,{includeAllSlots:!0})],{row:a,column:l}=o[o.length-1],c=o.find(({cell:C})=>C==e);let{row:d,column:f}=c;switch(t){case"left":f--;break;case"up":d--;break;case"right":f+=c.cellWidth;break;case"down":d+=c.cellHeight;break}const m=d<0||d>a,p=f<0&&d<=0,g=f>l&&d>=a;if(m||p||g){r.change(C=>{C.setSelection(C.createRangeOn(s))});return}f<0?(f=n?0:l,d--):f>l&&(f=n?l:0,d++);const y=o.find(C=>C.row==d&&C.column==f).cell,v=["right","down"].includes(t),x=this.editor.plugins.get("TableSelection");if(n&&x.isEnabled){const C=x.getAnchorCell()||e;x.setCellSelection(C,y)}else{const C=r.createPositionAt(y,v?0:"end");r.change(D=>{D.setSelection(C)})}}}class JX extends $o{domEventType=["mousemove","mouseleave"];onDomEvent(e){this.fire(e.type,e)}}class DOe extends be{static get pluginName(){return"TableMouse"}static get isOfficialPlugin(){return!0}static get requires(){return[Fc,Si]}init(){this.editor.editing.view.addObserver(JX),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,t=e.plugins.get(Si);let n=!1;const r=e.plugins.get(Fc);this.listenTo(e.editing.view.document,"mousedown",(s,o)=>{const a=e.model.document.selection;if(!this.isEnabled||!r.isEnabled||!o.domEvent.shiftKey)return;const l=r.getAnchorCell()||t.getTableCellsContainingSelection(a)[0];if(!l)return;const c=this._getModelTableCellFromDomEvent(o);c&&w9(l,c)&&(n=!0,r.setCellSelection(l,c),o.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{n=!1}),this.listenTo(e.editing.view.document,"selectionChange",s=>{n&&s.stop()},{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,n,r=!1,s=!1;const o=e.plugins.get(Fc);this.listenTo(e.editing.view.document,"mousedown",(a,l)=>{!this.isEnabled||!o.isEnabled||l.domEvent.shiftKey||l.domEvent.ctrlKey||l.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(l))}),this.listenTo(e.editing.view.document,"mousemove",(a,l)=>{if(!l.domEvent.buttons||!t)return;const c=this._getModelTableCellFromDomEvent(l);c&&w9(t,c)&&(n=c,!r&&n!=t&&(r=!0)),r&&(s=!0,o.setCellSelection(t,n),l.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{r=!1,s=!1,t=null,n=null}),this.listenTo(e.editing.view.document,"selectionChange",a=>{s&&a.stop()},{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,n=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(n).parent.findAncestor("tableCell",{includeSelf:!0})}}function w9(i,e){return i.parent.parent==e.parent.parent}class EOe extends be{static get requires(){return[F0,gOe,Fc,DOe,COe,yOe,Qc]}static get pluginName(){return"Table"}static get isOfficialPlugin(){return!0}}function fx(i){const e=eQ(i);return e||N_(i)}function eQ(i){const e=i.getSelectedElement();return e&&tQ(e)?e:null}function N_(i){const e=i.getFirstPosition();if(!e)return null;let t=e.parent;for(;t;){if(t.is("element")&&tQ(t))return t;t=t.parent}return null}function tQ(i){return i.is("element")&&!!i.getCustomProperty("table")&&Wn(i)}class TOe extends be{static get requires(){return[ix]}static get pluginName(){return"TableToolbar"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,t=e.t,n=e.plugins.get(ix),r=e.config.get("table.contentToolbar"),s=e.config.get("table.tableToolbar");r&&n.register("tableContent",{ariaLabel:t("Table toolbar"),items:r,getRelatedElement:N_}),s&&n.register("table",{ariaLabel:t("Table toolbar"),items:s,getRelatedElement:eQ})}}class AOe extends Ge{options;focusTracker;focusCycler;_focusables;dropdownView;
51inputView;keystrokes;_stillTyping;constructor(e,t){super(e),this.set("value",""),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isEmpty",!0),this.options=t,this.focusTracker=new Fn,this._focusables=new qi,this.dropdownView=this._createDropdownView(),this.inputView=this._createInputTextView(),this.keystrokes=new qn,this._stillTyping=!1,this.focusCycler=new or({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-input-color"]},children:[this.dropdownView,this.inputView]}),this.on("change:value",(n,r,s)=>this._setInputValue(s))}render(){super.render(),[this.inputView,this.dropdownView.buttonView].forEach(e=>{this.focusTracker.add(e.element),this._focusables.add(e)}),this.keystrokes.listenTo(this.element)}focus(e){e===-1?this.focusCycler.focusLast():this.focusCycler.focusFirst()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createDropdownView(){const e=this.locale,t=e.t,n=this.bindTemplate,r=this._createColorSelector(e),s=zi(e),o=new Ge;return o.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:n.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",n.if("value","ck-hidden",a=>a!="")]}}]}),s.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),s.buttonView.children.add(o),s.buttonView.label=t("Color picker"),s.buttonView.tooltip=!0,s.panelPosition=e.uiLanguageDirection==="rtl"?"se":"sw",s.panelView.children.add(r),s.bind("isEnabled").to(this,"isReadOnly",a=>!a),s.on("change:isOpen",(a,l,c)=>{c&&(r.updateSelectedColors(),r.showColorGridsFragment())}),s}_createInputTextView(){const e=this.locale,t=new hK(e);return t.extendTemplate({on:{blur:t.bindTemplate.to("blur")}}),t.value=this.value,t.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(t),t.on("input",()=>{const n=t.element.value,r=this.options.colorDefinitions.find(s=>n===s.label);this._stillTyping=!0,this.value=r&&r.color||n}),t.on("blur",()=>{this._stillTyping=!1,this._setInputValue(t.element.value)}),t.delegate("input").to(this),t}_createColorSelector(e){const t=e.t,n=this.options.defaultColorValue||"",r=t(n?"Restore default":"Remove color"),s=new h4(e,{colors:this.options.colorDefinitions,columns:this.options.columns,removeButtonLabel:r,colorPickerLabel:t("Color picker"),colorPickerViewConfig:this.options.colorPickerConfig===!1?!1:{...this.options.colorPickerConfig,hideInput:!0}});s.appendUI(),s.on("execute",(a,l)=>{if(l.source==="colorPickerSaveButton"){this.dropdownView.isOpen=!1;return}this.value=l.value||n,this.fire("input"),l.source!=="colorPicker"&&(this.dropdownView.isOpen=!1)});let o=this.value;return s.on("colorPicker:cancel",()=>{this.value=o,this.fire("input"),this.dropdownView.isOpen=!1}),s.colorGridsFragmentView.colorPickerButtonView.on("execute",()=>{o=this.value}),s.bind("selectedColor").to(this,"value"),s}_setInputValue(e){if(!this._stillTyping){const t=x9(e),n=this.options.colorDefinitions.find(r=>t===x9(r.color));n?this.inputView.value=n.label:this.inputView.value=e||""}}}function x9(i){return i.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const I4=i=>i==="";function R4(i){return{none:i("None"),solid:i("Solid"),dotted:i("Dotted"),dashed:i("Dashed"),double:i("Double"),groove:i("Groove"),ridge:i("Ridge"),inset:i("Inset"),outset:i("Outset")}}function nQ(i){return i('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function iQ(i){return i('The value is invalid. Try "10px" or "2em" or simply "2".')}function hx(i){return i=i.trim().toLowerCase(),I4(i)||SY(i)}function cg(i){return i=i.trim(),I4(i)||oQ(i)||C_(i)||PY(i)}function rQ(i){return i=i.trim(),I4(i)||oQ(i)||C_(i)}function sQ(i,e){const t=new Jn,n=R4(i.t);for(const r in n){const s={type:"button",model:new Fl({_borderStyleValue:r,label:n[r],role:"menuitemradio",withText:!0})};r==="none"?s.model.bind("isOn").to(i,"borderStyle",o=>e==="none"?!o:o===r):s.model.bind("isOn").to(i,"borderStyle",o=>o===r),t.add(s)}return t}function qS(i){const{view:e,icons:t,toolbar:n,labels:r,propertyName:s,nameToValue:o,defaultValue:a}=i;for(const l in r){const c=new nt(e.locale);c.set({role:"radio",isToggleable:!0,label:r[l],icon:t[l],tooltip:r[l]});const d=o?o(l):l;c.bind("isOn").to(e,s,f=>{let m=f;return f===""&&a&&(m=a),d===m}),c.on("execute",()=>{!a&&d&&e[s]===d?e[s]=void 0:e[s]=d}),n.items.add(c)}}const mx=[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}];function px(i){return(e,t,n)=>{const r=new AOe(e.locale,{colorDefinitions:kOe(i.colorConfig),columns:i.columns,defaultColorValue:i.defaultColorValue,colorPickerConfig:i.colorPickerConfig});
vendor: 4,856 bytes, line 51
51return r.inputView.set({id:t,ariaDescribedById:n}),r.bind("isReadOnly").to(e,"isEnabled",s=>!s),r.bind("hasError").to(e,"errorText",s=>!!s),r.on("input",()=>{e.errorText=null}),e.bind("isEmpty","isFocused").to(r),r}}function oQ(i){const e=parseFloat(i);return!Number.isNaN(e)&&i===String(e)}function kOe(i){return i.map(e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}}))}class SOe extends Ge{options;focusTracker;keystrokes;children;borderStyleDropdown;borderWidthInput;borderColorInput;backgroundInput;paddingInput;widthInput;heightInput;horizontalAlignmentToolbar;verticalAlignmentToolbar;saveButtonView;cancelButtonView;_focusables;_focusCycler;constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=t;const{borderStyleDropdown:n,borderWidthInput:r,borderColorInput:s,borderRowLabel:o}=this._createBorderFields(),{backgroundRowLabel:a,backgroundInput:l}=this._createBackgroundFields(),{widthInput:c,operatorLabel:d,heightInput:f,dimensionsLabel:m}=this._createDimensionFields(),{horizontalAlignmentToolbar:p,verticalAlignmentToolbar:g,alignmentLabel:y}=this._createAlignmentFields();this.focusTracker=new Fn,this.keystrokes=new qn,this.children=this.createCollection(),this.borderStyleDropdown=n,this.borderWidthInput=r,this.borderColorInput=s,this.backgroundInput=l,this.paddingInput=this._createPaddingField(),this.widthInput=c,this.heightInput=f,this.horizontalAlignmentToolbar=p,this.verticalAlignmentToolbar=g;const{saveButtonView:v,cancelButtonView:x}=this._createActionButtons();this.saveButtonView=v,this.cancelButtonView=x,this._focusables=new qi,this._focusCycler=new or({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Wl(e,{label:this.t("Cell properties")})),this.children.add(new nr(e,{labelView:o,children:[o,n,s,r],class:"ck-table-form__border-row"})),this.children.add(new nr(e,{labelView:a,children:[a,l],class:"ck-table-form__background-row"})),this.children.add(new nr(e,{children:[new nr(e,{labelView:m,children:[m,c,d,f],class:"ck-table-form__dimensions-row"}),new nr(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new nr(e,{labelView:y,children:[y,p,g],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new nr(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Xc({view:this}),[this.borderColorInput,this.backgroundInput].forEach(e=>{this._focusCycler.chain(e.fieldView.focusCycler)}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableCellProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},n=px({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),r=this.locale,s=this.t,o=s("Style"),a=new oo(r);a.text=s("Border");const l=R4(s),c=new hi(r,f4);c.set({label:o,class:"ck-table-form__border-style"}),c.fieldView.buttonView.set({ariaLabel:o,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:o}),c.fieldView.buttonView.bind("label").to(this,"borderStyle",m=>l[m||"none"]),c.fieldView.on("execute",m=>{this.borderStyle=m.source._borderStyleValue}),c.bind("isEmpty").to(this,"borderStyle",m=>!m),Hl(c.fieldView,sQ(this,t.style),{role:"menu",ariaLabel:o});const d=new hi(r,Is);d.set({label:s("Width"),class:"ck-table-form__border-width"}),d.fieldView.bind("value").to(this,"borderWidth"),d.bind("isEnabled").to(this,"borderStyle",Yy),d.fieldView.on("input",()=>{this.borderWidth=d.fieldView.element.value});const f=new hi(r,n);return f.set({label:s("Color"),class:"ck-table-form__border-color"}),f.fieldView.bind("value").to(this,"borderColor"),f.bind("isEnabled").to(this,"borderStyle",Yy),f.fieldView.on("input",()=>{this.borderColor=f.fieldView.value}),this.on("change:borderStyle",(m,p,g,y)=>{Yy(g)||(this.borderColor="",this.borderWidth=""),Yy(y)||(this.borderColor=t.color,this.borderWidth=t.width)}),{borderRowLabel:a,borderStyleDropdown:c,borderColorInput:f,borderWidthInput:d}}
51_createBackgroundFields(){const e=this.locale,t=this.t,n=new oo(e);n.text=t("Background");const r=px({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),s=new hi(e,r);return s.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),s.fieldView.bind("value").to(this,"backgroundColor"),s.fieldView.on("input",()=>{this.backgroundColor=s.fieldView.value}),{backgroundRowLabel:n,backgroundInput:s}}_createDimensionFields(){const e=this.locale,t=this.t,n=new oo(e);n.text=t("Dimensions");const r=new hi(e,Is);r.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),r.fieldView.bind("value").to(this,"width"),r.fieldView.on("input",()=>{this.width=r.fieldView.element.value});const s=new Ge(e);s.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const o=new hi(e,Is);return o.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),o.fieldView.bind("value").to(this,"height"),o.fieldView.on("input",()=>{this.height=o.fieldView.element.value}),{dimensionsLabel:n,widthInput:r,operatorLabel:s,heightInput:o}}_createPaddingField(){const e=this.locale,t=this.t,n=new hi(e,Is);return n.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),n.fieldView.bind("value").to(this,"padding"),n.fieldView.on("input",()=>{this.padding=n.fieldView.element.value}),n}_createAlignmentFields(){const e=this.locale,t=this.t,n=new oo(e),r={left:i4,center:VY,right:zY,justify:jY,top:wTe,middle:vTe,bottom:yTe};n.text=t("Table cell text alignment");const s=new ud(e),o=e.contentLanguageDirection==="rtl";s.set({isCompact:!0,role:"radiogroup",ariaLabel:t("Horizontal text alignment toolbar")}),qS({view:this,icons:r,toolbar:s,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:l=>{if(o){if(l==="left")return"right";if(l==="right")return"left"}return l},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const a=new ud(e);return a.set({isCompact:!0,role:"radiogroup",ariaLabel:t("Vertical text alignment toolbar")}),qS({view:this,icons:r,toolbar:a,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:s,verticalAlignmentToolbar:a,alignmentLabel:n}}_createActionButtons(){const e=this.locale,t=this.t,n=new nt(e),r=new nt(e),s=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return n.set({label:t("Save"),icon:E_,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(s,"errorText",(...o)=>o.every(a=>!a)),r.set({label:t("Cancel"),icon:D_,class:"ck-button-cancel",withText:!0}),r.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:r}}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,n=t("Align cell text to the left"),r=t("Align cell text to the center"),s=t("Align cell text to the right"),o=t("Justify cell text");return e.uiLanguageDirection==="rtl"?{right:s,center:r,left:n,justify:o}:{left:n,center:r,right:s,justify:o}}get _verticalAlignmentLabels(){const e=this.t;return{top:e("Align cell text to the top"),middle:e("Align cell text to the middle"),bottom:e("Align cell text to the bottom")}}}function Yy(i){return i!=="none"}const $S=[Ai.defaultPositions.northArrowSouth,Ai.defaultPositions.northArrowSouthWest,Ai.defaultPositions.northArrowSouthEast,Ai.defaultPositions.southArrowNorth,Ai.defaultPositions.southArrowNorthWest,Ai.defaultPositions.southArrowNorthEast,Ai.defaultPositions.viewportStickyNorth];function aQ(i,e){const t=i.plugins.get("ContextualBalloon"),n=i.editing.view.document.selection;let r;e==="cell"?N_(n)&&(r=cQ(i)):fx(n)&&(r=lQ(i)),r&&t.updatePosition(r)}function lQ(i){const e=i.model.document.selection,t=El(e),n=i.editing.mapper.toViewElement(t);return{target:i.editing.view.domConverter.mapViewToDom(n),positions:$S}}function cQ(i){const e=i.editing.mapper,t=i.editing.view.domConverter,n=i.model.document.selection;if(n.rangeCount>1)return{target:()=>POe(n.getRanges(),i),positions:$S};const r=uQ(n.getFirstPosition()),s=e.toViewElement(r);return{target:t.mapViewToDom(s),positions:$S}}function uQ(i){return i.nodeAfter&&i.nodeAfter.is("element","tableCell")?i.nodeAfter:i.findAnce
51stor("tableCell")}function POe(i,e){const t=e.editing.mapper,n=e.editing.view.domConverter,r=Array.from(i).map(s=>{const o=uQ(s.start),a=t.toViewElement(o);return new gt(n.mapViewToDom(a))});return gt.getBoundingRect(r)}const IOe=500,_9={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class ROe extends be{_defaultContentTableCellProperties;_defaultLayoutTableCellProperties;_balloon;view;_viewWithContentTableDefaults;_viewWithLayoutTableDefaults;_undoStepBatch;_isReady;static get requires(){return[zo]}static get pluginName(){return"TableCellPropertiesUI"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:mx,backgroundColors:mx})}init(){const e=this.editor,t=e.t;this._defaultContentTableCellProperties=S4(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:e.locale.contentLanguageDirection==="rtl"}),this._defaultLayoutTableCellProperties=O_(void 0,{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,isRightToLeftContent:e.locale.contentLanguageDirection==="rtl"}),this._balloon=e.plugins.get(zo),this.view=null,this._isReady=!1,e.ui.componentFactory.add("tableCellProperties",n=>{const r=new nt(n);r.set({label:t("Cell properties"),icon:lAe,tooltip:!0}),this.listenTo(r,"execute",()=>this._showView());const s=Object.values(_9).map(o=>e.commands.get(o));return r.bind("isEnabled").toMany(s,"isEnabled",(...o)=>o.some(a=>a)),r})}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(e){const t=this.editor,n=t.config.get("table.tableCellProperties"),r=Hg(n.borderColors),s=Wg(t.locale,r),o=Hg(n.backgroundColors),a=Wg(t.locale,o),l=n.colorPicker!==!1,c=new SOe(t.locale,{borderColors:s,backgroundColors:a,defaultTableCellProperties:e,colorPickerConfig:l?n.colorPicker||{}:!1}),d=t.t;c.render(),this.listenTo(c,"submit",()=>{this._hideView()}),this.listenTo(c,"cancel",()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._und
51oStepBatch),this._hideView()}),c.keystrokes.set("Esc",(p,g)=>{this._hideView(),g()}),Kc({emitter:c,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const f=nQ(d),m=iQ(d);return c.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle")),c.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:c.borderColorInput,commandName:"tableCellBorderColor",errorText:f,validator:hx})),c.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:c.borderWidthInput,commandName:"tableCellBorderWidth",errorText:m,validator:rQ})),c.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:c.paddingInput,commandName:"tableCellPadding",errorText:m,validator:cg})),c.on("change:width",this._getValidatedPropertyChangeCallback({viewField:c.widthInput,commandName:"tableCellWidth",errorText:m,validator:cg})),c.on("change:height",this._getValidatedPropertyChangeCallback({viewField:c.heightInput,commandName:"tableCellHeight",errorText:m,validator:cg})),c.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:c.backgroundInput,commandName:"tableCellBackgroun
51dColor",errorText:f,validator:hx})),c.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment")),c.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment")),c}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries(_9).map(([n,r])=>{const s=n,o=this.view===this._viewWithContentTableDefaults?this._defaultContentTableCellProperties[s]||"":this._defaultLayoutTableCellProperties[s]||"";return[n,e.get(r).value||o]}).forEach(([n,r])=>{(n==="borderColor"||n==="borderWidth")&&t.value==="none"||this.view.set(n,r)}),this._isReady=!0}_showView(){const e=this.editor,t=fx(e.editing.view.document.selection),n=t&&e.editing.mapper.toModelElement(t),r=!n||n.getAttribute("tableType")!=="layout";r&&!this._viewWithContentTableDefaults?this._viewWithContentTableDefaults=this._createPropertiesView(this._defaultContentTableCellProperties):!r&&!this._viewWithLayoutTableDefaults&&(this._viewWithLayoutTableDefaults=this._createPropertiesView(this._defaultLayoutTableCellProperties)),this.view=r?this._viewWithContentTableDefaults:this._viewWithLayoutTableDefaults,this.listenTo(e.ui,"update",()=>{this._updateView()}),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:cQ(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor,t=e.editing.view.document;N_(t.selection)?this._isViewVisible&&aQ(e,"cell"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,n,r)=>{this._isReady&&this.editor.execute(e,{value:r,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:n,validator:r,errorText:s}=e,o=fo(()=>{n.errorText=s},IOe);return(a,l,c)=>{o.cancel(),this._isReady&&(r(c)?(this.editor.execute(t,{value:c,batch:this._undoStepBatch}),n.errorText=null):o())}}}class Na extends ut{attributeName;_defaultValue;_defaultContentTableValue;_defaultLayoutTableValue;constructor(e,t,n){switch(super(e),this.attributeName=t,this._defaultContentTableValue=n,t){case"tableCellType":this._defaultLayoutTableValue="data";break;case"tableCellBorderStyle":this._defaultLayoutTableValue="none";break;case"tableCellHorizontalAlignment":this._defaultLayoutTableValue="left";break;case"tableCellVerticalAlignment":this._defaultLayoutTableValue="middle";break;default:this._defaultLayoutTableValue=void 0}}refresh(){const t=this.editor.model.document.selection,r=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(t),s=El(t);this._defaultValue=!s||s.getAttribute("tableType")!=="layout"?this._defaultContentTableValue:this._defaultLayoutTableValue,this.isEnabled=!!r.length,this.value=this._getSingleValue(r)}execute(e={}){const{value:t,batch:n}=e,r=this.editor.model,o=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(r.document.selection),a=this._getValueToSet(t);r.enqueueChange(n,l=>{a?o.forEach(c=>l.setAttribute(this.attributeName,a,c)):o.forEach(c=>l.removeAttribute(this.attributeName,c)),this.fire("afterExecute",{writer:l,tableCells:o,valueToSet:a})})}_getAttribute(e){if(!e)return;const t=e.getAttribute(this.attributeName);if(t!==this._defaultValue)return t}_getValueToSet(e){if(e!==this._defaultValue)return e}_getSingleValue(e){const t=this._getAttribute(e[0]);return e.every(r=>this._getAttribute(r)===t)?t:void 0}}class FOe extends Na{constructor(e,t){super(e,"tableCellWidth",t)}_getValueToSet(e){if(e=Td(e,"px"),e!==this._defaultValue)return e}}class dQ extends be{static get pluginName(){return"TableCellWidthEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[F0]}init(){const e=this.editor,t=S4(e.config.get("table.tableCellProperties.defaultProperties"));P1(e.model.schema,e.conversion,{modelAttribute:"tableCellWidth",styleName:"width",attributeName:"width",attributeType:"length",defaultValue:t.width}),e.commands.add("tableCellWidth",new FOe(e,t.width))}}class OOe extends Na{constructor(e,t){super(e,"tableCellPadding",t)}_getAttribute(e){if(!e)return;const t=Ed(e.getAttribute(this.attributeName));if(t!==this._defaultValue)return t}_getValueToSet(e){const t=Td(e,"px");if(t!==this._defaultValue)return t}}class NOe extends Na{constructor(e,t){super(e,"tableCellHeight",t)}_getValueToSet(e){const t=Td(e,"px");if(t!==this._defaultValue)return t}}class BOe extends Na{constructor(e,t){super(e,"tableCellBackgroun
51dColor",t)}}class MOe extends Na{constructor(e,t){super(e,"tableCellVerticalAlignment",t)}}class LOe extends Na{constructor(e,t){super(e,"tableCellHorizontalAlignment",t)}}class UOe extends Na{constructor(e,t){super(e,"tableCellBorderStyle",t)}_getAttribute(e){if(!e)return;const t=Ed(e.getAttribute(this.attributeName));if(t!==this._defaultValue)return t}}class VOe extends Na{constructor(e,t){super(e,"tableCellBorderColor",t)}_getAttribute(e){if(!e)return;const t=Ed(e.getAttribute(this.attributeName));if(t!==this._defaultValue)return t}}class jOe extends Na{constructor(e,t){super(e,"tableCellBorderWidth",t)}_getAttribute(e){if(!e)return;const t=Ed(e.getAttribute(this.attributeName));if(t!==this._defaultValue)return t}_getValueToSet(e){const t=Td(e,"px");if(t!==this._defaultValue)return t}}class zOe extends Na{constructor(e){super(e,"tableCellType","data"),this.on("afterExecute",(t,n)=>{const{writer:r,tableCells:s}=n,o=this.editor.plugins.get(Si),a=aFe(s);fQ(o,r,a.keys())})}refresh(){super.refresh();const e=El(this.editor.model.document.selection);this.isEnabled&&e&&e.getAttribute("tableType")==="layout"&&(this.isEnabled=!1)}_getAttribute(e){return e?.getAttribute(this.attributeName)||"data"}}function fQ(i,e,t){let n=!1;for(const r of t){let s=r.getAttribute("headingRows")||0,o=r.getAttribute("headingColumns")||0;const a=o>s;if(a){const c=_T(i,r,"column",o,s);c!==o&&(i.setHeadingColumnsCount(e,r,c,{shallow:!0}),o=c,n=!0)}const l=_T(i,r,"row",s,o);if(l!==s&&(i.setHeadingRowsCount(e,r,l,{shallow:!0}),s=l,n=!0),!a){const c=_T(i,r,"column",o,s);c!==o&&(i.setHeadingColumnsCount(e,r,c,{shallow:!0}),n=!0)}}return n}function _T(i,e,t,n,r){const s=t==="row"?i.getRows(e):i.getColumns(e);let o=n;for(let a=0;a<s;a++){const l=new Vt(e,{[t]:a});let c=!0,d=!1;for(const{cell:f,row:m,column:p}of l){if(f.getAttribute("tableCellType")!=="header"){c=!1;break}(t==="row"?p:m)>=r&&(d=!0)}if(!c)return Math.min(o,a);d&&(o=Math.max(o,a+1))}return Math.min(o,s)}const C9=/^(top|middle|bottom)$/,D9=/^(left|center|right|justify)$/;class WOe extends be{static get pluginName(){return"TableCellPropertiesEditing"}static get licenseFeatureCode(){return"TCP"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}static get requires(){return[F0,dQ]}init(){const e=this.editor,t=e.model.schema,n=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const r=S4(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:e.locale.contentLanguageDirection==="rtl"});e.data.addStyleProcessorRules(RY),HOe(e,{color:r.borderColor,style:r.borderStyle,width:r.borderWidth}),e.commands.add("tableCellBorderStyle",new UOe(e,r.borderStyle)),e.commands.add("tableCellBorderColor",new VOe(e,r.borderColor)),e.commands.add("tableCellBorderWidth",new jOe(e,r.borderWidth)),P1(t,n,{modelAttribute:"tableCellHeight",styleName:"height",attributeName:"height",attributeType:"length",defaultValue:r.height}),e.commands.add("tableCellHeight",new NOe(e,r.height)),e.data.addStyleProcessorRules(XEe),P1(t,n,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:r.padding}),e.commands.add("tableCellPadding",new OOe(e,r.padding)),e.data.addStyleProcessorRules(n4),P1(t,n,{modelAttribute:"tableCellBackgroun
51dColor",styleName:"background-color",attributeName:"bgcolor",attributeType:"color",defaultValue:r.backgroundColor}),e.commands.add("tableCellBackgroundColor",new BOe(e,r.backgroundColor)),qOe(t,n,r.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new LOe(e,r.horizontalAlignment)),$Oe(t,n,r.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new MOe(e,r.verticalAlignment)),e.config.get("experimentalFlags.tableCellTypeSupport")&&(GOe(e),e.commands.add("tableCellType",new zOe(e)))}}function HOe(i,e){const{conversion:t}=i,{schema:n}=i.model,r={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};n.extend("tableCell",{allowAttributes:Object.values(r)});for(const s of Object.values(r))n.setAttributeProperties(s,{isFormatting:!0});BS(i,"td",r,e),BS(i,"th",r,e),lg(t,{modelElement:"tableCell",modelAttribute:r.style,styleName:"border-style"}),lg(t,{modelElement:"tableCell",modelAttribute:r.color,styleName:"border-color"}),lg(t,{modelElement:"tableCell",modelAttribute:r.width,styleName:"border-width"})}function qOe(i,e,t){i.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),i.setAttributeProperties("tableCellHorizontalAlignment",{isFormatting:!0}),e.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:n=>({key:"style",value:{"text-align":n}})}),e.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":D9}},model:{key:"tableCellHorizontalAlignment",value:(n,r,s)=>{const o=Mo(t,"left",s),a=n.getStyle("text-align");if(a!==o)return a;r.consumable.consume(n,{styles:"text-align"})}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:D9}},model:{key:"tableCellHorizontalAlignment",value:(n,r,s)=>{const o=Mo(t,"left",s),a=n.getAttribute("align");if(a!==o)return a;r.consumable.consume(n,{attributes:"align"})}}})}function $Oe(i,e,t){i.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),i.setAttributeProperties("tableCellVerticalAlignment",{isFormatting:!0}),e.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:n=>({key:"style",value:{"vertical-align":n}})}),e.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":C9}},model:{key:"tableCellVerticalAlignment",value:(n,r,s)=>{const o=Mo(t,"middle",s),a=n.getStyle("vertical-align");if(a!==o)return a;r.consumable.consume(n,{styles:"vertical-align"})}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:C9}},model:{key:"tableCellVerticalAlignment",value:(n,r,s)=>{const o=Mo(t,"middle",s),a=n.getAttribute("valign");if(a!==o)return a;r.consumable.consume(n,{attributes:"valign"})}}})}function GOe(i){const{model:e,conversion:t,editing:n}=i,{schema:r}=e,s=i.plugins.get(Si);r.extend("tableCell",{allowAttributes:["tableCellType"]}),r.setAttributeProperties("tableCellType",{isFormatting:!0}),r.addAttributeCheck(o=>{if(Array.from(o).reverse().find(l=>l.name==="table")?.getAttribute("tableType")==="layout")return!1},"tableCellType"),t.for("upcast").add(o=>{o.on("element:th",(a,l,c)=>{const{writer:d}=c,{modelRange:f}=l,m=f?.start.nodeAfter;m?.is("element","tableCell")&&d.setAttribute("tableCellType","header",m)}),o.on("element:table",(a,l,c)=>{const{writer:d}=c,{modelRange:f}=l,m=f?.start.nodeAfter;if(m?.is("element","table")&&m.getAttribute("tableType")==="layout"){for(const{cell:p}of new Vt(m))if(p.getAttribute("tableCellType")==="header"){d.setAttribute("tableType","content",m);break}}},{priority:ns.low-1})}),e.document.registerPostFixer(o=>{const a=e.document.differ.getChanges(),l=new Set;for(const c of a){if(c.type==="attribute"&&(c.attributeKey==="headingRows"||c.attributeKey==="headingColumns")){const d=c.range.start.nodeAfter;d?.is("element","table")&&d.root.rootName!=="$graveyard"&&l.add(d)}if(c.type==="attribute"&&c.attributeKey==="tableCellType"){const d=c.range.start.nodeAfter;if(d?.is("element","tableCell")&&d.root.rootName!=="$graveyard"){const f=d.findAncestor("table");f&&l.add(f)}}if(c.type==="insert"&&c.position.nodeAfter){for(const{item:d}of e.createRangeOn(c.position.nodeAfter))if(d.is("element","tableCell")&&d.getAttribute("tableCellType")&&d.root.rootName!=="$graveyard"){const f=d.findAnce
51stor("table");f&&l.add(f)}}}return fQ(s,o,l)}),e.document.on("change:data",()=>{const{differ:o}=e.document,a=new Set;for(const l of o.getChanges())if(l.type==="attribute"&&l.attributeKey==="tableCellType"){const c=l.range.start.nodeAfter;c.is("element","tableCell")&&a.add(c)}for(const l of a){const c=n.mapper.toViewElement(l),f=l.getAttribute("tableCellType")==="header"?"th":"td";c?.name!==f&&n.reconvertItem(l)}})}class YOe extends be{static get pluginName(){return"TableCellProperties"}static get isOfficialPlugin(){return!0}static get requires(){return[WOe,ROe]}}class KOe extends ut{refresh(){this.isEnabled=!0}execute(e={}){const{model:t,plugins:n}=this.editor;let{table:r=t.document.selection.getSelectedElement(),columnWidths:s,tableWidth:o}=e;s&&(s=Array.isArray(s)?s:s.split(",")),t.change(a=>{o?a.setAttribute("tableWidth",o,r):a.removeAttribute("tableWidth",r);const l=n.get("TableColumnResizeEditing").getColumnGroupElement(r);if(!s&&!l)return;if(!s)return a.remove(l);const c=P4(s);if(l)Array.from(l.getChildren()).forEach((d,f)=>a.setAttribute("columnWidth",c[f],d));else{const d=a.createElement("tableColumnGroup");
51c.forEach(f=>a.appendElement("tableColumn",{columnWidth:f},d)),a.append(d,r)}})}}function XOe(i){return e=>e.on("element:colgroup",(t,n,r)=>{const s=n.modelCursor.findAncestor("table"),o=I0(s);if(!o)return;const a=R0(o),l=i.getColumns(s);let c=HFe(o,r.writer);c=Array.from({length:l},(d,f)=>c[f]||"auto"),(c.length!=a.length||c.includes("auto"))&&XX(a,o,P4(c),r.writer)},{priority:"low"})}function QOe(){return i=>i.on("insert:table",(e,t,n)=>{const r=n.writer,s=t.item,o=n.mapper.toViewElement(s),a=o.is("element","table")?o:Array.from(o.getChildren()).find(c=>c.is("element","table"));I0(s)?r.addClass("ck-table-resized",a):r.removeClass("ck-table-resized",a)},{priority:"low"})}function ZOe(){return i=>{i.on("element:table",(e,t,n)=>{n.consumable.consume(t.viewItem,{classes:"ck-table-resized"})})}}const E9=nm("px");class JOe extends be{_isResizingActive;_resizingData;_domEmitter;_tableUtilsPlugin;_initialMouseEventData=null;static get requires(){return[F0,Si]}static get pluginName(){return"TableColumnResizeEditing"}static get licenseFeatureCode(){return"TCR"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}constructor(e){super(e),this._isResizingActive=!1,this.set("_isResizingAllowed",!0),this._resizingData=null,this._domEmitter=new(ds()),this._tableUtilsPlugin=e.plugins.get("TableUtils"),this.on("change:_isResizingAllowed",(t,n,r)=>{const s=r?"removeClass":"addClass";e.editing.view.change(o=>{for(const a of e.editing.view.document.roots)o[s]("ck-column-resize_disabled",e.editing.view.document.getRoot(a.rootName))})})}init(){this._extendSchema(),this._registerPostFixer(),this._registerConverters(),this._registerResizingListeners(),this._registerResizerInserter();const e=this.editor,t=e.plugins.get("TableColumnResize");e.plugins.get("TableEditing").registerAdditionalSlot({filter:s=>s.is("element","tableColumnGroup"),positionOffset:0});const r=new KOe(e);e.commands.add("resizeTableWidth",r),e.commands.add("resizeColumnWidths",r),this.bind("_isResizingAllowed").to(e,"isReadOnly",t,"isEnabled",r,"isEnabled",(s,o,a)=>!s&&o&&a)}destroy(){this._domEmitter.stopListening(),super.destroy()}getColumnGroupElement(e){return I0(e)}getTableColumnElements(e){return R0(e)}getTableColumnsWidths(e){return WFe(e)}_extendSchema(){const e=this.editor.model.schema;e.extend("table",{allowAttributes:["tableWidth"]}),e.register("tableColumnGroup",{allowIn:"table",isLimit:!0}),e.register("tableColumn",{allowIn:"tableColumnGroup",allowAttributes:["columnWidth","colSpan"],isLimit:!0}),e.setAttributeProperties("columnWidth",{isFormatting:!0})}_registerPostFixer(){const t=this.editor.model;t.document.registerPostFixer(s=>{let o=!1;for(const a of BFe(t)){const l=this.getColumnGroupElement(a),c=this.getTableColumnElements(l),d=this.getTableColumnsWidths(l);let f=P4(d);f=n(f,a,this),!Nh(d,f)&&(XX(c,l,f,s),o=!0)}return o});function n(s,o,a){const l=a._tableUtilsPlugin.getColumns(o);if(l-s.length===0)return s;const d=s.map(m=>Number(m.replace("%",""))),f=r(a.editor.model.document.differ,o);for(const m of f){const p=l-d.length;if(p===0)continue;const g=p>0,y=a._tableUtilsPlugin.getCellLocation(m).column;if(g){const v=MFe(o,a.editor),x=VFe(p,v);d.splice(y,0,...x)}else{const v=d.splice(y,Math.abs(p));d[y]+=Zg(v)}}return d.map(m=>m+"%")}function r(s,o){const a=new Set;for(const l of s.getChanges())if(l.type=="insert"&&l.position.nodeAfter&&l.position.nodeAfter.name=="tableCell"&&l.position.nodeAfter.getAncestors().includes(o))a.add(l.position.nodeAfter);else if(l.type=="remove"){const c=l.position.nodeBefore||l.position.nodeAfter;c.name=="tableCell"&&c.getAncestors().includes(o)&&a.add(c)}return a}}_registerConverters(){const t=this.editor.conversion;t.for("upcast").attributeToAttribute({view:{name:/^(figure|table)$/,styles:{width:/[\s\S]+/}},model:{key:"tableWidth",value:n=>{if(!n.parent.is("element","figure"))return n.getStyle("width")}}}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableWidth"},view:n=>({name:"figure",key:"style",value:{width:n}})}),t.elementToElement({model:"tableColumnGroup",view:"colgroup"}),t.elementToElement({model:"tableColumn",view:"col"}),t.for("downcast").add(QOe()),t.for("upcast").add(ZOe()),t.for("upcast").add(XOe(this._tableUtilsPlugin)),t.for("upcast").attributeToAttribute({view:{name:"col",styles:{width:/.*/}},model:{key:"columnWidth",value:n=>{const r=n.getStyle("width");return!r||!r.endsWith("%")&&!r.endsWith("pt")?"auto":r}}}),t.for("upcast").attributeToAttribute({view:{name:"col",key:"span"},model:"colSpan"}),t.for("downcast").attributeToAttribute({model:{name:"tableColumn",key:"columnWidth"},view:n=>({key:"style",value:{width:n}})})}_registerResizingListeners(){const e=this.editor.editing.view;e.addObserver(JX),e.document.on("mouseover",this._onMouseOverHandler.bind(this),{priority:"high"}),e.document.on("mousedown",this._onMouseDownHandler.bind(this),{priority:"high"}),e.document.on("mouseout",this._onMouseOutHandler.bind(this),{priority:"high"}
51),this._domEmitter.listenTo($e.window.document,"mousemove",Oh(this._onMouseMoveHandler.bind(this),50)),this._domEmitter.listenTo($e.window.document,"mouseup",this._onMouseUpHandler.bind(this))}_recalculateResizerElement(e){const t=this.editor,n=t.editing.view.domConverter,r=n.mapViewToDom(e.findAncestor("table")),s=n.mapViewToDom(e.findAncestor(d=>["td","th"].includes(d.name))),o=new gt(r),a=new gt(s),l=E9(Number((o.top-a.top).toFixed(4))),c=E9(Number((a.bottom-o.bottom).toFixed(4)));t.editing.view.change(d=>{d.setStyle("top",l,e),d.setStyle("bottom",c,e)})}_resetResizerStyles(e){this.editor.editing.view.change(t=>{t.removeStyle("top",e),t.removeStyle("bottom",e)})}_onMouseOverHandler(e,t){const n=t.target;n.hasClass("ck-table-column-resizer")&&this._isResizingAllowed&&this._recalculateResizerElement(n)}_onMouseOutHandler(e,t){const n=t.target;n.hasClass("ck-table-column-resizer")&&this._isResizingAllowed&&(this._isResizingActive||this._resetResizerStyles(n))}_onMouseDownHandler(e,t){const n=t.target;if(!n.hasClass("ck-table-column-resizer")||!this._isResizingAllowed)return;const r=this.editor,s=r.editing.mapper.toModelElement(n.findAncestor("figure"));r.model.canEditAt(s)&&(t.preventDefault(),e.stop(),this._initialMouseEventData=t)}_startResizingAfterThreshold(){const e=this._initialMouseEventData,{target:t}=e,n=this.editor.editing.mapper.toModelElement(t.findAncestor("figure")),r=t.findAncestor("table"),s=o(n,this._tableUtilsPlugin,this.editor);Array.from(r.getChildren()).find(c=>c.is("element","colgroup"))||this.editor.editing.view.change(c=>{a(c,s,r)}),this._isResizingActive=!0,this._resizingData=this._getResizingData(e,s),this.editor.editing.view.change(c=>l(c,r,this._resizingData));function o(c,d,f){const m=Array(d.getColumns(c)),p=new Vt(c);for(const g of p){const y=f.editing.mapper.toViewElement(g.cell),v=f.editing.view.domConverter.mapViewToDom(y),x=zFe(v);(!m[g.column]||x<m[g.column])&&(m[g.column]=Jr(x))}return m}function a(c,d,f){const m=c.createContainerElement("colgroup");for(let p=0;p<d.length;p++){const g=c.createEmptyElement("col"),y=`${Jr(d[p]/Zg(d)*100)}%`;c.setStyle("width",y,g),c.insert(c.createPositionAt(m,"end"),g)}c.insert(c.createPositionAt(f,0),m)}function l(c,d,f){const m=f.widths.viewFigureWidth/f.widths.viewFigureParentWidth;c.addClass("ck-table-resized",d),c.addClass("ck-table-column-resizer__active",f.elements.viewResizer),c.setStyle("width",`${Jr(m*100)}%`,d.findAncestor("figure"))}}_onMouseMoveHandler(e,t){if(this._initialMouseEventData){const D=this._initialMouseEventData.domEvent;if(Math.abs(t.clientX-D.clientX)>=NFe)this._startResizingAfterThreshold(),this._initialMouseEventData=null;else return}if(!this._isResizingActive)return;if(!this._isResizingAllowed){this._onMouseUpHandler();return}const{columnPosition:n,flags:{isRightEdge:r,isTableCentered:s,isLtrContent:o},elements:{viewFigure:a,viewLeftColumn:l,viewRightColumn:c,viewResizer:d},widths:{viewFigureParentWidth:f,tableWidth:m,leftColumnWidth:p,rightColumnWidth:g}}=this._resizingData,y=-p+VS,v=r?f-m:g-VS,x=(o?1:-1)*(r&&s?2:1),C=UFe((t.clientX-n)*x,Math.min(y,0),Math.max(v,0));C!==0&&(this.editor.editing.view.change(D=>{const E=Jr((p+C)*100/m);if(D.setStyle("width",`${E}%`,l),r){const T=Jr((m+C)*100/f);D.setStyle("width",`${T}%`,a)}else{const T=Jr((g-C)*100/m);D.setStyle("width",`${T}%`,c)}}),this._recalculateResizerElement(d))}_onMouseUpHandler(){if(this._initialMouseEventData=null,!this._isResizingActive)return;const{viewResizer:e,modelTable:t,viewFigure:n,viewColgroup:r}=this._resizingData.elements,s=this.editor,o=s.editing.view,a=this.getColumnGroupElement(t),l=Array.from(r.getChildren()).filter(v=>v.is("view:element")),c=a?this.getTableColumnsWidths(a):null,d=l.map(v=>v.getStyle("width")),f=!Nh(c,d),m=t.getAttribute("tableWidth"),p=n.getStyle("width"),g=m!==p;(f||g)&&(this._isResizingAllowed?s.execute("resizeTableWidth",{table:t,tableWidth:`${Jr(p)}%`,columnWidths:d}):o.change(v=>{if(c)for(const x of l)v.setStyle("width",c.shift(),x);else v.remove(r);g&&(m?v.setStyle("width",m,n):v.removeStyle("width",n)),!c&&!m&&v.removeClass("ck-table-resized",[...n.getChildren()].find(x=>x.name==="table"))})),o.change(v=>{v.removeClass("ck-table-column-resizer__active",e)}),o.domConverter.mapViewToDom(e).matches(":hover")||this._resetResizerStyles(e),this._isResizingActive=!1,this._resizingData=null}_getResizingData(e,t){const n=this.editor,r=e.domEvent.clientX,s=e.target,o=s.findAnce
51stor("td")||s.findAncestor("th"),a=n.editing.mapper.toModelElement(o),l=a.findAncestor("table"),c=LFe(a,this._tableUtilsPlugin).rightEdge,d=this._tableUtilsPlugin.getColumns(l)-1;let f=l.getAttribute("tableAlignment");l.getAttribute("tableType")!=="layout"&&(f||=n.config.get("table.tableProperties.defaultProperties.alignment"),f||="center");const m=c===d,p=n.locale.contentLanguageDirection!=="rtl",g=f==="center",y=o.findAncestor("table"),v=y.findAncestor("figure"),x=[...y.getChildren()].find(R=>R.is("element","colgroup")),C=x.getChild(c),D=m?void 0:x.getChild(c+1),E=jS(n.editing.view.domConverter.mapViewToDom(v.parent)),T=jS(n.editing.view.domConverter.mapViewToDom(v)),S=KX(l,n),A=t[c],I=m?void 0:t[c+1];return{columnPosition:r,flags:{isRightEdge:m,isTableCentered:g,isLtrContent:p},elements:{viewResizer:s,modelTable:l,viewFigure:v,viewColgroup:x,viewLeftColumn:C,viewRightColumn:D},widths:{viewFigureParentWidth:E,viewFigureWidth:T,tableWidth:S,leftColumnWidth:A,rightColumnWidth:I}}}_registerResizerInserter(){this.editor.conversion.for("editingDowncast").add(e=>{e.on("insert:tableCell",(t,n,r)=>{const s=n.item,o=r.mapper.toViewElement(s),a=r.writer;a.insert(a.createPositionAt(o,"end"),a.createUIElement("div",{class:"ck-table-column-resizer"}))},{priority:"lowest"})})}}class eNe extends be{static get requires(){return[JOe,dQ]}static get pluginName(){return"TableColumnResize"}static get isOfficialPlugin(){return!0}}class Ad extends ut{attributeName;_defaultValue;_defaultContentTableValue;_defaultLayoutTableValue;constructor(e,t,n){super(e),this.attributeName=t,this._defaultContentTableValue=n,this._defaultLayoutTableValue=t==="tableBorderStyle"?"none":void 0}refresh(){const t=this.editor.model.document.selection,n=El(t);this._defaultValue=!n||n.getAttribute("tableType")!=="layout"?this._defaultContentTableValue:this._defaultLayoutTableValue,this.isEnabled=!!n,this.value=this._getValue(n)}execute(e={}){const t=this.editor.model,n=t.document.selection,{value:r,batch:s}=e,o=El(n),a=this._getValueToSet(r);t.enqueueChange(s,l=>{a?l.setAttribute(this.attributeName,a,o):l.removeAttribute(this.attributeName,o)})}_getValue(e){if(!e)return;const t=e.getAttribute(this.attributeName);if(t!==this._defaultValue)return t}_getValueToSet(e){if(e!==this._defaultValue)return e}}class tNe extends Ad{constructor(e,t){super(e,"tableBackgroundColor",t)}}class nNe extends Ad{constructor(e,t){super(e,"tableBorderColor",t)}_getValue(e){if(!e)return;const t=Ed(e.getAttribute(this.attributeName));if(t!==this._defaultValue)return t}}class iNe extends Ad{constructor(e,t){super(e,"tableBorderStyle",t)}_getValue(e){if(!e)return;const t=Ed(e.getAttribute(this.attributeName));if(t!==this._defaultValue)return t}}class rNe extends Ad{constructor(e,t){super(e,"tableBorderWidth",t)}_getValue(e){if(!e)return;const t=Ed(e.getAttribute(this.attributeName));if(t!==this._defaultValue)return t}_getValueToSet(e){const t=Td(e,"px");if(t!==this._defaultValue)return t}}class sNe extends Ad{constructor(e,t){super(e,"tableWidth",t)}_getValueToSet(e){if(e=Td(e,"px"),e!==this._defaultValue)return e}}class oNe extends Ad{constructor(e,t){super(e,"tableHeight",t)}_getValueToSet(e){if(e=Td(e,"px"),e!==this._defaultValue)return e}}class aNe extends Ad{constructor(e,t){super(e,"tableAlignment",t)}}class lNe extends be{static get pluginName(){return"TablePropertiesEditing"}static get licenseFeatureCode(){return"TCP"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}static get requires(){return[F0]}init(){const e=this.editor,t=e.model.schema,n=e.conversion;e.config.define("table.tableProperties.defaultProperties",{});const r=k4(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),s=e.config.get("table.tableProperties.alignment.useInlineStyles")!==!1;if(e.data.addStyleProcessorRules(OY),e.data.addStyleProcessorRules(RY),uNe(e,{color:r.borderColor,style:r.borderStyle,width:r.borderWidth}),e.commands.add("tableBorderColor",new nNe(e,r.borderColor)),e.commands.add("tableBorderStyle",new iNe(e,r.borderStyle)),e.commands.add("tableBorderWidth",new rNe(e,r.borderWidth)),e.config.get("experimentalFlags.useExtendedTableBlockAlignment")?dNe(t,n,r.alignment,s):fNe(t,n,r.alignment),e.commands.add("tableAlignment",new aNe(e,r.alignment)),A9(t,n,{modelAttribute:"tableWidth",styleName:"width",attributeName:"width",attributeType:"length",defaultValue:r.width}),e.commands.add("tableWidth",new sNe(e,r.width)),A9(t,n,{modelAttribute:"tableHeight",styleName:"height",attributeName:"height",attributeType:"length",defaultValue:r.height}),e.commands.add("tableHeight",new oNe(e,r.height)),e.data.addStyleProcessorRules(n4),pNe(t,n,{modelAttribute:"tableBackgroun
51dColor",styleName:"background-color",attributeName:"bgcolor",attributeType:"color",defaultValue:r.backgroundColor}),e.commands.add("tableBackgroundColor",new tNe(e,r.backgroundColor)),e.config.get("experimentalFlags.useExtendedTableBlockAlignment")){const o=e.editing.view.document;this.listenTo(o,"clipboardOutput",(a,l)=>{e.editing.view.change(c=>{for(const{item:d}of c.createRangeIn(l.content))cNe(d,c);l.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(l.content))})},{priority:"lowest"})}}}function cNe(i,e){if(!i.is("element","table"))return;const t=i.getAttribute("align"),n=i.getStyle("float"),r=i.getStyle("margin-left"),s=i.getStyle("margin-right");if(t&&t==="center"||n&&n==="right"&&t&&t==="right"){T9(e,t,i);return}n===void 0&&r==="auto"&&s==="0"&&T9(e,"right",i)}function T9(i,e,t){const n=i.createPositionBefore(t),r=i.createContainerElement("div",{align:e},t);i.insert(n,r)}function uNe(i,e){const{conversion:t}=i,{schema:n}=i.model,r={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};n.extend("table",{allowAttributes:Object.values(r)});for(const s of Object.values(r))n.setAttributeProperties(s,{isFormatting:!0});BS(i,"table",r,e),k1(t,{modelAttribute:r.color,styleName:"border-color"}),k1(t,{modelAttribute:r.style,styleName:"border-style"}),k1(t,{modelAttribute:r.width,styleName:"border-width"})}function dNe(i,e,t,n){i.extend("table",{allowAttributes:["tableAlignment"]}),i.setAttributeProperties("tableAlignment",{isFormatting:!0}),e.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment",values:["left","center","right","blockLeft","blockRight"]},view:{left:n?{key:"style",value:{float:"left","margin-right":"var(--ck-content-table-style-spacing, 1.5em)"}}:{key:"class",value:mr.left.className},right:n?{key:"style",value:{float:"right","margin-left":"var(--ck-content-table-style-spacing, 1.5em)"}}:{key:"class",value:mr.right.className},center:n?{key:"style",value:{"margin-left":"auto","margin-right":"auto"}}:{key:"class",value:mr.center.className},blockLeft:n?{key:"style",value:{"margin-left":"0","margin-right":"auto"}}:{key:"class",value:mr.blockLeft.className},blockRight:n?{key:"style",value:{"margin-left":"auto","margin-right":"0"}}:{key:"class",value:mr.blockRight.className}},converterPriority:"high"}),sFe.forEach(r=>{e.for("upcast").attributeToAttribute({view:r.view,model:{key:"tableAlignment",value:(s,o,a)=>{if(gNe(s))return;const l=Mo(t,"",a),c=r.getAlign(s),d=r.getConsumables(s);if(o.consumable.consume(s,d),c!==l)return c}}})}),e.for("upcast").add(hNe(t))}function fNe(i,e,t){const n=/^(left|center|right)$/,r=/^(left|none|right)$/;i.extend("table",{allowAttributes:["tableAlignment"]}),i.setAttributeProperties("tableAlignment",{isFormatting:!0}),e.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment",values:["left","center","right"]},view:{left:{key:"style",value:{float:"left"}},right:{key:"style",value:{float:"right"}},center:(s,o,a)=>({key:"style",value:a.item.getAttribute("tableType")!=="layout"?{float:"none"}:{"margin-left":"auto","margin-right":"auto"}})},converterPriority:"high"}),e.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:r}},model:{key:"tableAlignment",value:(s,o,a)=>{if(s.name=="figure"&&!s.hasClass("table"))return;const l=Mo(t,"",a);let c=s.getStyle("float");if(c==="none"&&(c="center"),c!==l)return c;o.consumable.consume(s,{styles:"float"})}}}).attributeToAttribute({view:{name:/^(table|figure)$/,styles:{"margin-left":"auto","margin-right":"auto"}},model:{key:"tableAlignment",value:(s,o,a)=>{if(s.name=="figure"&&!s.hasClass("table"))return;const l=Mo(t,"",a),c="center";if(c!==l)return c;o.consumable.consume(s,{styles:["margin-left","margin-right"]})}}}).attributeToAttribute({view:{name:"table",attributes:{align:n}},model:{key:"tableAlignment",value:(s,o,a)=>{const l=Mo(t,"",a),c=s.getAttribute("align");if(c!==l)return c;o.consumable.consume(s,{attributes:"align"})}}})}function hNe(i){return e=>{e.on("element:div",(t,n,r)=>{if(!r.consumable.test(n.viewItem,{name:!0,attributes:"align"}))return;const s=GX(n.viewItem);if(!s||!r.consumable.test(s,{name:!0}))return;r.consumable.consume(n.viewItem,{name:!0,attributes:"align"});const o=r.convertItem(s,n.modelCursor),a=Rn(o.modelRange.getItems());if(!a||!a.is("element","table")){r.consumable.revert(n.viewItem,{name:!0,attributes:"align"}),o.modelRange&&!o.modelRange.isCollapsed&&(n.modelRange=o.modelRange,n.modelCursor=o.modelCursor);return}const l=n.viewItem.getAttribute("align"),c=s.getAttribute("align"),d=Mo(i,"",n),f=mNe(l,c,d);f&&r.writer.setAttribute("tableAlignment",f,a),r.convertChildren(n.viewItem,r.writer.createPositionAt(a,"end")),r.updateConversionResult(a,n)})}}function mNe(i,e,t){if(i)switch(i){case"right":return e==="right"?"right":e==="left"?"left"
vendor: 4,722 bytes, line 51
51:"blockRight";case"center":return"center";case"left":return e===void 0?"blockLeft":"left";default:return t}}function pNe(i,e,t){const{modelAttribute:n}=t;i.extend("table",{allowAttributes:[n]}),i.setAttributeProperties(n,{isFormatting:!0}),T4(e,{viewElement:"table",...t}),k1(e,t)}function A9(i,e,t){const{modelAttribute:n}=t;i.extend("table",{allowAttributes:[n]}),i.setAttributeProperties(n,{isFormatting:!0}),T4(e,{viewElement:/^(table|figure)$/,shouldUpcast:r=>!(r.name=="table"&&r.parent.name=="figure"||r.name=="figure"&&!r.hasClass("table")),...t}),lg(e,{modelElement:"table",...t})}function gNe(i){return i.name=="figure"&&!i.hasClass("table")}class bNe extends Ge{options;focusTracker;keystrokes;children;borderStyleDropdown;borderWidthInput;borderColorInput;backgroundInput;widthInput;heightInput;alignmentToolbar;saveButtonView;cancelButtonView;_focusables;_focusCycler;constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:n,borderWidthInput:r,borderColorInput:s,borderRowLabel:o}=this._createBorderFields(),{backgroundRowLabel:a,backgroundInput:l}=this._createBackgroundFields(),{widthInput:c,operatorLabel:d,heightInput:f,dimensionsLabel:m}=this._createDimensionFields(),{alignmentToolbar:p,alignmentLabel:g}=this._createAlignmentFields();this.focusTracker=new Fn,this.keystrokes=new qn,this.children=this.createCollection(),this.borderStyleDropdown=n,this.borderWidthInput=r,this.borderColorInput=s,this.backgroundInput=l,this.widthInput=c,this.heightInput=f,this.alignmentToolbar=p;const{saveButtonView:y,cancelButtonView:v}=this._createActionButtons();this.saveButtonView=y,this.cancelButtonView=v,this._focusables=new qi,this._focusCycler=new or({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Wl(e,{label:this.t("Table properties")})),this.children.add(new nr(e,{labelView:o,children:[o,n,s,r],class:"ck-table-form__border-row"})),this.children.add(new nr(e,{labelView:a,children:[a,l],class:"ck-table-form__background-row"})),this.children.add(new nr(e,{children:[new nr(e,{labelView:m,children:[m,c,d,f],class:"ck-table-form__dimensions-row"}),new nr(e,{labelView:g,children:[g,p],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new nr(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Xc({view:this}),[this.borderColorInput,this.backgroundInput].forEach(e=>{this._focusCycler.chain(e.fieldView.focusCycler)}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},n=px({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),r=this.locale,s=this.t,o=s("Style"),a=new oo(r);a.text=s("Border");const l=R4(s),c=new hi(r,f4);c.set({label:o,class:"ck-table-form__border-style"}),c.fieldView.buttonView.set({ariaLabel:o,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:o}),c.fieldView.buttonView.bind("label").to(this,"borderStyle",m=>l[m||"none"]),c.fieldView.on("execute",m=>{this.borderStyle=m.source._borderStyleValue}),c.bind("isEmpty").to(this,"borderStyle",m=>!m),Hl(c.fieldView,sQ(this,t.style),{role:"menu",ariaLabel:o});const d=new hi(r,Is);d.set({label:s("Width"),class:"ck-table-form__border-width"}),d.fieldView.bind("value").to(this,"borderWidth"),d.bind("isEnabled").to(this,"borderStyle",Ky),d.fieldView.on("input",()=>{this.borderWidth=d.fieldView.element.value});const f=new hi(r,n);return f.set({label:s("Color"),class:"ck-table-form__border-color"}),f.fieldView.bind("value").to(this,"borderColor"),f.bind("isEnabled").to(this,"borderStyle",Ky),f.fieldView.on("input",()=>{this.borderColor=f.fieldView.value}),this.on("change:borderStyle",(m,p,g,y)=>{Ky(g)||(this.borderColor="",this.borderWidth=""),Ky(y)||(this.borderColor=t.color,this.borderWidth=t.width)}),{borderRowLabel:a,borderStyleDropdown:c,borderColorInput:f,borderWidthInput:d}}
51_createBackgroundFields(){const e=this.locale,t=this.t,n=new oo(e);n.text=t("Background");const r=px({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),s=new hi(e,r);return s.set({label:t("Color"),class:"ck-table-properties-form__background"}),s.fieldView.bind("value").to(this,"backgroundColor"),s.fieldView.on("input",()=>{this.backgroundColor=s.fieldView.value}),{backgroundRowLabel:n,backgroundInput:s}}_createDimensionFields(){const e=this.locale,t=this.t,n=new oo(e);n.text=t("Dimensions");const r=new hi(e,Is);r.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),r.fieldView.bind("value").to(this,"width"),r.fieldView.on("input",()=>{this.width=r.fieldView.element.value});const s=new Ge(e);s.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const o=new hi(e,Is);return o.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),o.fieldView.bind("value").to(this,"height"),o.fieldView.on("input",()=>{this.height=o.fieldView.element.value}),{dimensionsLabel:n,widthInput:r,operatorLabel:s,heightInput:o}}_createAlignmentFields(){const e=this.locale,t=this.t,n=new oo(e);n.text=t("Alignment");const r=new ud(e);return r.set({role:"radiogroup",isCompact:!0,ariaLabel:t("Table alignment toolbar")}),qS({view:this,icons:{left:r4,center:Zw,right:Jw},toolbar:r,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:n,alignmentToolbar:r}}_createActionButtons(){const e=this.locale,t=this.t,n=new nt(e),r=new nt(e),s=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return n.set({label:t("Save"),icon:E_,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(s,"errorText",(...o)=>o.every(a=>!a)),r.set({label:t("Cancel"),icon:D_,class:"ck-button-cancel",withText:!0}),r.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:r}}get _alignmentLabels(){const e=this.locale,t=this.t,n=t("Align table to the left"),r=t("Center table"),s=t("Align table to the right");return e.uiLanguageDirection==="rtl"?{right:s,center:r,left:n}:{left:n,center:r,right:s}}}function Ky(i){return i!=="none"}const yNe=500,k9={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class vNe extends be{_defaultContentTableProperties;_defaultLayoutTableProperties;_balloon;view=null;_viewWithContentTableDefaults=null;_viewWithLayoutTableDefaults=null;_undoStepBatch;_isReady;static get requires(){return[zo]}static get pluginName(){return"TablePropertiesUI"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("table.tableProperties",{borderColors:mx,backgroundColors:mx})}init(){const e=this.editor;this._defaultContentTableProperties=k4(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._defaultLayoutTableProperties=O_(),this._balloon=e.plugins.get(zo),e.ui.componentFactory.add("tableProperties",()=>this._createTablePropertiesButton())}_createTablePropertiesButton(){const e=this.editor,t=e.t,n=new nt(e.locale);n.set({label:t("Table properties"),icon:dAe,tooltip:!0}),this.listenTo(n,"execute",()=>this._showView());const r=Object.values(k9).map(s=>e.commands.get(s));return n.bind("isEnabled").toMany(r,"isEnabled",(...s)=>s.some(o=>o)),n}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(e){const t=this.editor,n=t.config.get("table.tableProperties"),r=Hg(n.borderColors),s=Wg(t.locale,r),o=Hg(n.backgroundColors),a=Wg(t.locale,o),l=n.colorPicker!==!1,c=new bNe(t.locale,{borderColors:s,backgroundColors:a,defaultTableProperties:e,colorPickerConfig:l?n.colorPicker||{}:!1}),d=t.t;c.render(),this.listenTo(c,"submit",()=>{this._hideView()}),this.listenTo(c,"cancel",()=>{this._undoStepBatch.operations.length&&t.execute("undo",this._und
51oStepBatch),this._hideView()}),c.keystrokes.set("Esc",(p,g)=>{this._hideView(),g()}),Kc({emitter:c,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const f=nQ(d),m=iQ(d);return c.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle")),c.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:c.borderColorInput,commandName:"tableBorderColor",errorText:f,validator:hx})),c.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:c.borderWidthInput,commandName:"tableBorderWidth",errorText:m,validator:rQ})),c.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:c.backgroundInput,commandName:"tableBackgroundColor",errorText:f,validator:hx})),c.on("change:width",this._getValidatedPropertyChangeCallback({viewField:c.widthInput,commandName:"tableWidth",errorText:m,validator:cg})),c.on("change:height",this._getValidatedPropertyChangeCallback({viewField:c.heightInput,commandName:"tableHeight",errorText:m,validator:cg})),c.on("change:alignment",this._getPropertyChangeCallback("tableAlignment")),c}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries(k9).map(([n,r])=>{const s=n,o=this.view===this._viewWithContentTableDefaults?this._defaultContentTableProperties[s]||"":this._defaultLayoutTableProperties[s]||"";return[s,e.get(r).value||o]}).forEach(([n,r])=>{(n==="borderColor"||n==="borderWidth")&&t.value==="none"||this.view.set(n,r)}),this._isReady=!0}_showView(){const e=this.editor,t=fx(e.editing.view.document.selection),n=t&&e.editing.mapper.toModelElement(t),r=!n||n.getAttribute("tableType")!=="layout";r&&!this._viewWithContentTableDefaults?this._viewWithContentTableDefaults=this._createPropertiesView(this._defaultContentTableProperties):!r&&!this._viewWithLayoutTableDefaults&&(this._viewWithLayoutTableDefaults=this._createPropertiesView(this._defaultLayoutTableProperties)),this.view=r?this._viewWithContentTableDefaults:this._viewWithLayoutTableDefaults,this.listenTo(e.ui,"update",()=>{this._updateView()}),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:lQ(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor,t=e.editing.view.document;fx(t.selection)?this._isViewVisible&&aQ(e,"table"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,n,r)=>{this._isReady&&this.editor.execute(e,{value:r,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:n,validator:r,errorText:s}=e,o=fo(()=>{n.errorText=s},yNe);return(a,l,c)=>{o.cancel(),this._isReady&&(r(c)?(this.editor.execute(t,{value:c,batch:this._undoStepBatch}),n.errorText=null):o())}}}class wNe extends be{static get pluginName(){return"TableProperties"}static get isOfficialPlugin(){return!0}static get requires(){return[lNe,vNe]}}function xNe(i){i.document.registerPostFixer(e=>_Ne(e,i))}function _Ne(i,e){const t=e.document.differ.getChanges();let n=!1;for(const r of t){if(r.type!="insert")continue;const s=r.position.parent;if(s.is("element","table")||r.name=="table"){const o=r.name=="table"?r.position.nodeAfter:s,a=Array.from(o.getChildren()).filter(c=>c.is("element","caption")),l=a.shift();if(!l)continue;for(const c of a)i.move(i.createRangeIn(c),l,"end"),i.remove(c);l.nextSibling&&(i.move(i.createRangeOn(l),o,"end"),n=!0),n=!!a.length||n}}return n}function S9(i){return!!i&&i.is("element","table")}function GS(i){for(const e of i.getChildren())if(e.is("element","caption"))return e;return null}function CNe(i){const e=El(i);return e?GS(e):null}function DNe(i){const e=i.parent;return i.name=="figcaption"&&e&&e.is("element","figure")&&e.hasClass("table")?{name:!0}:i.name=="caption"&&e&&e.is("element","table")?{name:!0}:null}class ENe extends ut{refresh(){const e=this.editor,t=El(e.model.document.selection);this.isEnabled=!!t&&e.model.schema.checkChild(t,"caption"),this.isEnabled?this.value=!!GS(t):this.value=!1}execute({focusCaptionOnShow:e=!1}={}){this.editor.model.change(t=>{this.value?this._hideTableCaption(t):this._showTableCaption(t,e)})}_showTableCaption(e,t){const n=this.editor.model,r=El(n.document.selection),a=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(r)||e.createElement("caption");n.insertContent(a,r,"end"),t&&e.setSelection(a,"in")}_hideTableCaption(e){const t=this.editor.model,n=El(t.document.selection),r=this.editor.plugins.get("TableCaptionEditing"),s=GS(n);
51r._saveCaption(n,s),t.deleteContent(e.createSelection(s,"on"))}}class TNe extends be{_savedCaptionsMap=new WeakMap;static get pluginName(){return"TableCaptionEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model.schema,n=e.editing.view,r=e.t,s=e.config.get("table.tableCaption.useCaptionElement");t.isRegistered("caption")?t.extend("caption",{allowIn:"table"}):t.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleTableCaption",new ENe(this.editor)),s&&e.plugins.get("TableEditing").registerAdditionalSlot({filter:a=>a.is("element","caption"),positionOffset:"end"}),e.conversion.for("upcast").elementToElement({view:DNe,model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(o,{writer:a})=>S9(o.parent)?a.createContainerElement(s?"caption":"figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(o,{writer:a})=>{if(!S9(o.parent))return null;const l=a.createEditableElement(s?"caption":"figcaption");return a.setCustomProperty("tableCaption",!0,l),l.placeholder=r("Enter table caption"),W3({view:n,element:l,keepOnFocus:!0}),g4(l,a)}}),xNe(e.model)}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?An.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}}class ANe extends be{static get pluginName(){return"TableCaptionUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view,n=e.t;e.ui.componentFactory.add("toggleTableCaption",r=>{const s=e.commands.get("toggleTableCaption"),o=new nt(r);return o.set({icon:HY,tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(s,"value","isEnabled"),o.bind("label").to(s,"value",a=>n(a?"Toggle caption off":"Toggle caption on")),this.listenTo(o,"execute",()=>{if(e.execute("toggleTableCaption",{focusCaptionOnShow:!0}),s.value){const a=CNe(e.model.document.selection),l=e.editing.mapper.toViewElement(a);if(!l)return;t.scrollToTheSelection(),t.change(c=>{c.addClass("table__caption_highlighted",l)})}e.editing.view.focus()}),o})}}class kNe extends be{static get pluginName(){return"TableCaption"}static get isOfficialPlugin(){return!0}static get requires(){return[TNe,ANe]}}class SNe{loader;constructor(e){this.loader=e}upload(){return this.loader.file.then(e=>new Promise(async(t,n)=>{try{const r=new FormData;r.append("file",e);const s=await Ne({url:"/editor",data:r,formData:!0,method:"post"});t({default:s.data.url})}catch(r){n(r.message)}}))}abort(){}}function PNe(i){i.plugins.get("FileRepository").createUploadAdapter=e=>new SNe(e)}function INe({field:i,formStateData:e,handleChange:t,formError:n,titleShow:r=!0,minHeight:s=300,maxHeight:o=500,enableFullscreen:a=!0}){const{modeType:l}=_t()||{},[c,d]=M.useState(!1),f={licenseKey:"GPL",toolbar:{items:["undo","redo","|","sourceEditing","|","heading","|","fontSize","fontFamily","fontColor","fontBackgroun
51dColor","|","bold","italic","underline","strikethrough","subscript","superscript","code","|","link","uploadImage","mediaEmbed","insertTable","blockQuote","codeBlock","|","alignment","|","bulletedList","numberedList","todoList","|","outdent","indent","|","horizontalLine","pageBreak","specialCharacters","|","highlight","removeFormat","|","findAndReplace"],shouldNotGroupWhenFull:!0},plugins:[Q3e,ZSe,s5e,b5e,l5e,d5e,m5e,n5e,I_,$4e,t6e,AX,L6e,X6e,T5e,EOe,TOe,kNe,wNe,YOe,eNe,w8e,D8e,hIe,mIe,z8e,J8e,lRe,B3e,U4e,NSe,yIe,wIe,sPe,MRe,XRe,nFe,jRe,u4e,zRe,HPe,KSe,Z4e,v4,PRe,PNe],heading:{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h1",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h2",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h3",title:"Heading 3",class:"ck-heading_heading3"},{model:"heading4",view:"h4",title:"Heading 4",class:"ck-heading_heading4"},{model:"heading5",view:"h5",title:"Heading 5",class:"ck-heading_heading5"},{model:"heading6",view:"h6",title:"Heading 6",class:"ck-heading_heading6"}]},fontSize:{options:[9,11,13,"default",17,19,21,27,35],supportAllValues:!0},fontFamily:{options:["default","Arial, Helvetica, sans-serif","Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif","Trebuchet MS, Helvetica, sans-serif","Verdana, Geneva, sans-serif"],supportAllValues:!0},fontColor:{columns:6,colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dark Grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light Grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light Green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light Blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}]}
51,fontBackgroundColor:{columns:6,colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dark Grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light Grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light Green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light Blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}]},table:{contentToolbar:["tableColumn","tableRow","mergeTableCells","tableProperties","tableCellProperties","toggleTableCaption"],tableProperties:{borderColors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dark Grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light Grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light Green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light Blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],backgroundColors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dark Grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light Grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light Green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light Blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}]},tableCellProperties:{borderColors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dark Grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light Grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light Green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light Blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],backgroundColors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dark Grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light Grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light Green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light Blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}]}},image:{resizeUnit:"px",resizeOptions:[{name:"resizeImage:original",value:null,label:"Original"},{name:"resizeImage:25",value:"25",label:"25%"},{name:"resizeImage:50",value:"50",label:"50%"},{name:"resizeImage:75",value:"75",label:"75%"}],toolbar:["imageTextAlternative","toggleImageCaption","|","imageStyle:inline","imageStyle:block","imageStyle:side","|","resizeImage"]},link:{decorators:{openInNewTab:{mode:"manual",label:"Open in a new tab",attributes:{target:"_blank",rel:"noopener noreferrer"}}}},mediaEmbed:{previewsInData:!0},mention:{feeds:[{marker:"@",feed:["@John","@Jane","@Mike","@Sarah","@David"],minimumCharacters:1}]},htmlSupport:{allow:[{name:"iframe",attributes:!0,classes:!0,styles:!0},{name:/.*/,attributes:!0,classes:!0,styles:!0}]}},[m,p]=M.useState(""),g=T=>{const S=new DOMParser().parseFromString(T,"text/html");return Array.from(S.querySelectorAll("img")).map(A=>A.src)},y={position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:9998},v={position:"fixed",inset:"4vh 4vw",zIndex:9999,background:"#fff",borderRadius:"8px",boxShadow:"0 24px 64px rgba(0,0,0,0.35)",display:"flex",flexDirection:"column",overflow:"hidden"},x={flex:1,overflow:"hidden",display:"flex",flexDirection:"column",minHeight:0},C={position:"relative",minHeight:`${s}px`,maxHeight:`${o}px`,overflowY:"auto",border:"1px solid #e0e0e0",borderRadius:"4px"},D={display:"flex",alignItems:"center",gap:"5px",marginLeft:"auto",padding:"4px 10px",fontSize:"12px",fontWeight:500,cursor:"pointer",border:"1px solid #ccc",borderRadius:"4px",background:"#f5f5f5",color:"#333",whiteSpace:"nowrap",transition:"background 0.15s"},E={display:"flex",alignItems:"center",marginBottom:"2vh"};return w.jsxs(w.Fragment,{children:[c&&w.jsx("div",{style:y,onClick:()=>d(!1)}),l!=="list"&&l!=="trash"&&r?w.jsxs("div",{style:E,children:[w.jsxs("label",{style:{margin:0},children:[i?.title,i?.validate?.includes("required")&&w.jsx("em",{children:" *"}),i?.info&&w.jsx("span",{className:"info",children:i?.info})]}),a&&w.jsx("button",{type:"button",style:D,onClick:()=>d(T=>!T),title:c?"Exit Fullscreen":"Enter Fullscreen",children:c?w.jsxs(w.Fragment,{children:[w.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:w.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"})}),"Exit Fullscreen"]}):w.jsxs(w.Fragment,{children:[w.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:w.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})}),"Fullscreen"]})})]}):w.jsx(w.Fragment,{}),!c&&w.jsxs("div",{style:{marginTop:r?0:"2vh"},children:[w.jsx("div",{style:C,children:w.jsx(tS,{editor:cL,data:e?.[i?.name]||"",config:f,onChange:(T,S)=>{const A=S.getData(),I=g(m),R=g(A);I.filter(j=>
51!R.includes(j)).forEach(async j=>{await Ne({url:"/editor/delete",method:"post",data:{url:j}})}),p(A),t(A,i)}})}),i?.name&&n?.[i.name]&&w.jsx("p",{className:"e",children:n[i.name]})]}),c&&w.jsxs("div",{style:v,children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:"1px solid #e0e0e0",background:"#fafafa"},children:[w.jsx("span",{style:{fontWeight:600,fontSize:"14px",color:"#333"},children:i?.title||"Editor"}),w.jsxs("button",{type:"button",style:{...D,marginLeft:0},onClick:()=>d(!1),title:"Exit Fullscreen",children:[w.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:w.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"})}),"Exit Fullscreen"]})]}),w.jsx("div",{style:x,className:"mx-editor-fullscreen",children:w.jsx(tS,{editor:cL,data:e?.[i?.name]||"",config:f,onChange:(T,S)=>{const A=S.getData(),I=g(m),R=g(A);I.filter(j=>!R.includes(j)).forEach(async j=>{await Ne({url:"/editor/delete",method:"post",data:{url:j}})}),p(A),t(A,i)}})}),i?.name&&n?.[i.name]&&w.jsx("p",{className:"e",style:{padding:"0 16px 10px"},children:n[i.name]})]}),w.jsx("style",{children:`
52
53      /* CKEditor content area list fix */
54.ck-editor__editable ul,
55.ck-editor__editable ol {
56  padding-left: 40px !important;
57  margin: 8px 0 !important;
58  list-style: revert !important;
59}
60
61.ck-editor__editable ul {
62  list-style-type: disc !important;
63}
64
65.ck-editor__editable ol {
66  list-style-type: decimal !important;
67}
68
69.ck-editor__editable li {
70  display: list-item !important;
71  list-style: revert !important;
72  padding: 0 !important;
73  float: none !important;
74  width: auto !important;
75  margin-bottom: 0 !important;
76  position: static !important;
77}
78
79/* CKEditor anchor tag fix */
80.ck-editor__editable a {
81  color: #0066cc !important;
82  text-decoration: underline !important;
83  cursor: pointer !important;
84}
85
86.ck-editor__editable a:hover {
87  color: #0044aa !important;
88  text-decoration: underline !important;
89}
90
91
92/* Horizontal rule */
93.ck-editor__editable hr {
94  border: none !important;
95  border-top: 2px solid #e0e0e0 !important;
96  margin: 16px 0 !important;
97}
98
99/* CKEditor toolbar white background */
100.ck.ck-toolbar {
101  background: #ffffff !important;
102  border-color: #e0e0e0 !important;
103}
104
105.ck.ck-toolbar .ck-toolbar__items {
106  background: #ffffff !important;
107}
108
109.ck.ck-toolbar-dropdown .ck-toolbar {
110  background: #ffffff !important;
111}
112        .ck-editor__editable_inline {
113          min-height: ${s}px !important;
114        }
115
116        /* Fullscreen: make the CKEditor root fill the container as a flex column */
117        .mx-editor-fullscreen .ck.ck-editor {
118          display: flex;
119          flex-direction: column;
120          height: 100%;
121        }
122
123        /* Fullscreen: toolbar stays at top, fixed inside the scrollable body */
124        .mx-editor-fullscreen .ck.ck-editor__top {
125          position: sticky;
126          top: 0;
127          z-index: 10;
128          background: #fff;
129          border-bottom: 1px solid #e0e0e0;
130          box-shadow: 0 2px 6px rgba(0,0,0,0.08);
131        }
132
133        /* Fullscreen: editable area fills remaining space and scrolls */
134        .mx-editor-fullscreen .ck.ck-editor__main {
135          flex: 1;
136          overflow-y: auto;
137        }
138
139        .mx-editor-fullscreen .ck.ck-editor__main .ck-editor__editable {
140          min-height: calc(92vh - 120px) !important;
141          height: 100%;
142          box-sizing: border-box;
143        }
144
145.mx-editor-fullscreen .ck.ck-editor__top {
146  position: sticky;
147  top: 0;
148  z-index: 10;
149  background: #fff;
150  border-bottom: 1px solid #e0e0e0;
151  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
152}
153
154        .mx-editor-fullscreen .ck.ck-editor {
155  display: flex;
156  flex-direction: column;
157  height: 100%;
158}
159
160.mx-editor-fullscreen .ck.ck-editor__top {
161  flex-shrink: 0;
162  background: #fff;
163  border-bottom: 1px solid #e0e0e0;
164  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
165}
166
167.mx-editor-fullscreen .ck.ck-editor__main {
168  flex: 1;
169  overflow-y: auto;
170}
171      `})]})}function Le({frmGroupName:i,frmArr:e,formStateData:t,setFormStateData:n,formError:r,setFormErrors:s}
171){const o=async(a,l)=>{let c="";if(l.type=="file")if(l?.params?.multiple){const d=a.target.files,f=d?Array.from(d)?.map(p=>({file:p,type:"new",name:p.name,ext:p.name?.split(".")?.pop()||""})):[];c=(t?.[l.name]||[]).concat(f)}else c=[a.target.files&&a.target.files[0]?{file:a.target.files[0],type:"new",name:a.target.files[0].name,ext:a.target.files[0].name?.split(".")?.pop()||""}:null];else if(l?.type=="checkbox"&&!l?.options)c=a.target.checked;else if(l?.type=="checkbox"&&l?.options){let d=t?.[l?.name]||[];a?.target?.checked?d.push(Number(a?.target?.value)):d=d?.filter(f=>f!==Number(a?.target?.value)),c=d}else l?.type=="date"||l?.type=="time"||l?.type=="datetime"||l.type=="editor"||l.type=="autocomplete"||l.type=="add-row-table"||l?.type=="async-select"?c=a:c=a?.target?.value;await n(d=>({...d,[l.name]:c})),_w(c,l,r,s,t,l.name)};return w.jsx(w.Fragment,{children:e?.map((a,l)=>w.jsx(Ee.Fragment,{children:a?.type==="add-row-table"?w.jsx(L0e,{control:a,formStateData:t,setFormStateData:n,formError:r,setFormErrors:s,frmGroupName:i}):w.jsx("li",{className:`${a?.attrp?.class||""} ${r?.[a?.name]?"err":""}`,style:a?.attrp?.style?a?.attrp?.style:void 0,title:a?.title,children:(()=>{switch(a.type){case"text":case"password":return w.jsx(gq,{field:a,frmGroupName:i,formStateData:t,setFormStateData:n,handleChange:o,formError:r});case"radio":return w.jsx(bq,{field:a,frmGroupName:i,formStateData:t,setFormStateData:n,handleChange:o,formError:r});case"checkbox":return w.jsx(yq,{field:a,frmGroupName:i,formStateData:t,setFormStateData:n,handleChange:o,formError:r});case"select":return w.jsx(vq,{field:a,frmGroupName:i,formStateData:t,setFormStateData:n,handleChange:o,formError:r});case"async-select":return w.jsx(h$,{field:a,frmGroupName:i,formStateData:t,setFormStateData:n,handleChange:o,formError:r});case"textarea":return w.jsx(wq,{field:a,frmGroupName:i,formStateData:t,setFormStateData:n,handleChange:o,formError:r});case"fileBase64":return w.jsx(V0e,{field:a,frmGroupName:i,formStateData:t,setFormStateData:n,handleChange:o,formError:r});case"date":return w.jsx(twe,{field:a,frmGroupName:i,formStateData:t,setFormStateData:n,handleChange:o,formError:r});case"time":return w.jsx(Z1e,{field:a,frmGroupName:i,formStateData:t,setFormStateData:n,handleChange:o,formError:r});case"datetime":return w.jsx(Q1e,{field:a,frmGroupName:i,formStateData:t,setFormStateData:n,handleChange:o,formError:r});case"editor":return w.jsx(w.Fragment,{children:w.jsx(INe,{field:a,frmGroupName:i,formStateData:t,setFormStateData:n,handleChange:o,formError:r})});case"button":return w.jsx(w.Fragment,{children:w.jsx(j0e,{field:a,frmGroupName:i,formStateData:t,setFormStateData:n,handleChange:o,formError:r})});default:return null}})()},l)},l))})}let RNe=[{type:"text",name:"title",title:"title",validate:"required"},{type:"date",name:"startDate",title:"Start Date",validate:"required",info:"test lable",attrp:{class:"c2"}},{type:"datetime",name:"endDate",title:"End Date",validate:"required",info:"test lable",attrp:{class:"c2"}},{type:"radio",name:"gender",title:"Gender",validate:"required",info:"Custom message",attrp:{class:"c2"},options:[{id:1,value:"Male"},{id:2,value:"Female"}]},{type:"checkbox",name:"selectllevel",title:"Select Level",validate:"required,mincheckedbox:2",info:"Custom message",attrp:{class:"c2"},options:[{id:1,value:"Level-1"},{id:2,value:"Level-2"},{id:3,value:"Level-3"},{id:4,value:"Level-4"}]},{type:"select",name:"titleId",title:"Tiitle",validate:"required",info:"Custom message",options:[{id:1,value:"Color"},{id:2,value:"Storage"},{id:3,value:"Ram"}]},{type:"file",name:"fileUpload",title:"Popup File",validate:"required"},{type:"editor",name:"content",title:"Description",validate:"required",info:"Custom message"},{type:"textarea",name:"message",title:"Message"}];const FNe=()=>{const[i,e]=M.useState({}),[t,n]=M.useState({}),r=jl(),s=$c(f=>f.modal);if(!s.isOpen)return null;const o=()=>{r(Ac())},a=()=>{s?.onCancel?s.onCancel():r(Ac())},l=()=>{s?.onCancel?s.onCancel():r(Ac())},c=()=>{s?.onConfirm?s.onConfirm():r(Ac())},d=()=>s.body?s.body:s.message?w.jsx("div",{dangerouslySetInnerHTML:{__html:s.message}}):null;return w.jsxs(w.Fragment,{children:[s.type==="alert"&&w.jsx("div",{className:"mxdialog alert-popup mxdestroy",children:w.jsxs("div",{className:"body",children:[w.jsx("a",{href:"#",className:"close del",onClick:o}),w.jsx("h2",{children:s.title}),w.jsxs("div",{className:"content",children:[d()," "]})]})}),s.type==="popup"&&w.jsx("div",{id:"sample-popup",className:"mxdialog sample-popup",children:w.jsxs("div",{className:"body",children:[w.jsx("a",{href:"#",className:"close del",onClick:o}),w.jsx("h2",{children:s.title}),w.jsx("div",{className:"content",children:w.jsxs("form",{name:"frmAddEdit",id:"frmAddEdit",className:"wrap-data",children:[w.jsx("div",{className:"wrap-form",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:RNe,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsxs("div",{className:"mx-btn",children:[w.jsx("button",{className:"fa-save btn",children:" submit"}),w.jsx("a",{href:"#",className:"btn undefined",onClick:a,children:"Close"})]})]})})]})}),s.type==="confirm"&&w.jsx("div",{className:"mxdialog mxdestroy",children:w.jsxs("div",{className:"body ",style:{to
171p:"-40%"},children:[w.jsx("a",{href:"#",className:"close del",onClick:o}),w.jsx("h2",{children:s.title}),w.jsxs("div",{className:"content ",children:[w.jsx("div",{dangerouslySetInnerHTML:{__html:s.message||""}}),w.jsxs("div",{className:"mx-btn",children:[w.jsx("a",{href:"#",className:"btn undefined",onClick:c,children:"OK"}),s?.onCancel&&typeof s.onCancel=="function"&&!s?.isHideCloseBtn&&w.jsx("a",{href:"#",className:"btn undefined",onClick:l,children:"Cancel"}),s?.onClose&&typeof s.onClose=="function"&&!s?.isHideCloseBtn&&w.jsx("a",{href:"#",className:"btn undefined",onClick:a,children:"Close"})]})]})]})}),s.type==="formpopup"&&w.jsx("div",{id:"sample-form-popup",className:"mxdialog form-popup",children:w.jsxs("div",{className:"body",children:[w.jsx("a",{href:"#",className:"close del",onClick:a}),w.jsx("h2",{children:s.title}),w.jsx("div",{className:"content",children:w.jsxs("form",{name:"frmAddEdit",id:"frmAddEdit",className:"wrap-data",onSubmit:async f=>{f.preventDefault(),s?.onSubmit&&await s.onSubmit(i)},children:[w.jsx("div",{className:"wrap-form",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:s.formArr||[],formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsx("div",{className:"mx-btn",children:w.jsxs("button",{type:"submit",className:"fa-save btn",children:[" ","Submit"]})})]})})]})})]})},ONe=()=>{const i=$c(e=>e.sideBarToggleReducer.isOpen);return w.jsxs(w.Fragment,{children:[w.jsx("link",{href:"https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900",rel:"stylesheet",type:"text/css"}),w.jsx(Yae,{}),w.jsxs("div",{className:`wrapper ${i?"active":""}`,children:[w.jsx(Xae,{}),w.jsx(Ine,{})]}),w.jsx(Kfe,{}),w.jsx(FNe,{})]})};let O0=20;function NNe(i,e){let t=i?.toString();const n=Object.fromEntries(new URLSearchParams(t)),r=n?.show??O0;let s=Number(n?.offset??0)+Number(r),o=Number(n?.offset??0)-Number(r),a=(({offset:m,show:p,orderBy:g,order:y,...v})=>v)(n),l={offset:s,show:r,orderBy:n?.orderBy??"",order:n?.order??"",status:e=="list"?1:0,...a},c={...l,offset:o,...a},d=zh(l),f=zh(c);return{nextLinkParams:d,preLinkParams:f}}function BNe(i,e,t){let n=i?.toString();const r=Object.fromEntries(new URLSearchParams(n));let s={offset:0,show:O0,orderBy:r?.orderBy??"",order:r?.order??"",status:e=="list"?1:0,...t};return{searchParams:zh(s),searchParamsObj:s}}function MNe(i,e){let t=i?.toString();const n=Object.fromEntries(new URLSearchParams(t));let r={offset:n?.offset?Number(n?.offset):0,show:n?.show?Number(n?.show):O0,totalRec:e?.count??0,dataArrayLength:e?.dataLength??0,enablePrevButton:!1,enableNextButton:!1};return r.dataArrayLength==0&&(r.enableNextButton=!1),r.offset==0?r.enablePrevButton=!1:r.enablePrevButton=!0,r.offset+r.show>=Number(r.totalRec)?r.enableNextButton=!1:r.enableNextButton=!0,{paginationDataTemp:r}}function LNe(i,e){let t={offset:0,show:O0,orderBy:"",order:"",status:e=="list"?1:0,...i};return{searchParams:zh(t)}}function UNe(i,e,t,n){let r=i?.toString();const s=Object.fromEntries(new URLSearchParams(r));let o={...s,offset:s?.offset?s?.offset:0,show:s?.show?Number(s?.show):O0,orderBy:t||"",order:n||"",status:e=="list"?1:0};return{sortParams:zh(o)}}function VNe(i,e,t){let n=i?.toString();const r=Object.fromEntries(new URLSearchParams(n));let s={...r,offset:0,show:t,orderBy:r?.orderBy?r?.orderBy:"",order:r?.order?r?.order:"",status:e=="list"?1:0};return{limitParams:zh(s)}}const zh=i=>Object.keys(i).map(e=>e+"="+(i[e]!==null&&i[e]!==void 0?i[e]:"")).join("&");function jNe(){let e=document.querySelector("table")?.outerHTML;e=zNe(e);let t=window.open("","","width=860,height=850,resizable=1,toolbar=0,menubar=1,scrollbars=1,status=1");t.document.open(),t.document.write(`<html><head><title>Print Page</title><style>
172          body {
173              font-family: Verdana, Helvetica, sans-serif;
174              font-weight: normal;
175              color: #000000;
176              text-decoration: none;
177              margin: 0px;
178              padding: 3px;
179              outline: none;
180          }
181  
182          .tbl-list {
183              font-size: 12px;
184              border-top: 1px solid #000000;
185              border-left: 1px solid #000000;
186          }
187  
188          .tbl-list td,
189          .tbl-list th {
190              border-right: 1px solid #000000;
191              border-bottom: 1px solid #000000;
192              padding: 3px;
193              text-decoration: none;
194          }
195          th a {
196          text-decoration: none;
197          color:black;
198          cursor:auto;
199          }
200          td a {
201          text-decoration: none;
202          color:black;
203          cursor:auto;
204          }
205  
206          a.print-doc {
207              text-decoration: none;
208              color: #333333;
209              margin: 10px 0px 10px 0px;
210              font-size: 11px;
211              font-weight: bold;
212          }
213          </style></head><body>`),t.document.write(e),t.document.write("</body></html>"),t.document.close()}function zNe(i){const e=document.createElement("div");e.innerHTML=i;const t=e.querySelectorAll(".noprintdata");return t&&t.forEach(n=>
213{n.remove()}),e.innerHTML}function et(i){let{modeTitle:e,modeType:t,modeName:n}=_t();e=i?.title??e;const[r,s]=M.useState({}),o=M.useRef(null),[a]=$t(),{pathname:l}=wr(),c=Mt(),[d,f]=M.useState(""),[m,p]=M.useState(""),g=$c(U=>U.paginationReducer),y=[],v=[],x="right",C=jl();function D(){C(Qz())}function E(){C(nW({isTrashRestore:!0}))}function T(){C(iW({isDelete:!0}))}const S=()=>{const{nextLinkParams:U,preLinkParams:F}=NNe(a,t);f(`${l}?${U}`),p(`${l}?${F}`)},A=()=>{const{paginationDataTemp:U}=MNe(a,g);s(U)};M.useEffect(()=>{S(),A()},[g]);const I=U=>{if(U?.key==="Enter"){const F=U.target.value??"";if(F.match(/^[0-9]+$/)){const{limitParams:H}=VNe(a,t,Number(F));c(`${l}?${H}`)}else alert("Only accept 0 to 9 digit")}};function R(){jNe()}const O=[{type:"button",label:"update",accessKey:"edit",class:"fa-save btn",pageShowingButton:["edit"],formSubmit:!0},{type:"button",label:"save",accessKey:"add",class:"fa-save btn",pageShowingButton:["add"],formSubmit:!0},{type:"button",label:"search",accessKey:"view",class:"fa-search btn",pageShowingButton:["list","trash"],action:()=>D()},{type:"button",label:"add",accessKey:"add",link:`/${n}-add`,class:"fa-add btn",pageShowingButton:["list","edit","view","trash"]},{type:"button",label:"list",accessKey:"view",link:`/${n}-list`,class:"fa-list btn",pageShowingButton:["add","edit","view","trash"]},{type:"button",label:"trash",accessKey:"trash",link:`/${n}-trash`,class:"fa-trash btn",pageShowingButton:["add","edit","list","view"]},{type:"button",label:"restore",accessKey:"restore",class:"fa-trash-o btn restore",pageShowingButton:["trash"],position:"left",action:()=>E()},{type:"button",label:"delete",accessKey:"delete",class:"fa-trash-o btn delete",pageShowingButton:["trash"],position:"left",action:()=>T()},{type:"button",label:"trash",accessKey:"trash",class:"fa-trash-o btn delete trash-call",pageShowingButton:["list"],position:"left",action:()=>E()},{type:"button",label:"print",class:"fa-print btn",pageShowingButton:["list","trash"],action:()=>R()}];let j=[...i?.extraEleFld||[],...O];j=i?.hidePageNavField&&i?.hidePageNavField.length>0?j.filter(U=>i?.hidePageNavField&&!i?.hidePageNavField.includes(U?.label)):j,j=j?.filter(U=>U?.pageShowingButton?U?.pageShowingButton&&U.pageShowingButton.includes(t):U),j.forEac
213h(U=>{!U?.position||U.position===x?y.push(U):U.position==="left"&&v.push(U)});const B=U=>{U?.action&&U?.action(U)};return w.jsxs("div",{className:"page-nav",id:"page-nav",children:[w.jsx("div",{id:"nav-left",className:"nav-left",children:v&&v?.length?v?.map((U,F)=>w.jsxs(In,{to:U?.link?U?.link:"#",onClick:H=>{U?.link||(H?.preventDefault(),U?.action&&B(U))},className:U?.class,style:U?.style?U?.style:{},children:[" ",U?.label," "]},F)):null}),w.jsx("h1",{className:"pg-ttl",children:e}),t&&(t=="add"||t=="edit")&&w.jsxs("div",{className:"mandatory",children:["Fields with (",w.jsx("em",{children:"* "}),") are mandatory"]}),w.jsxs("div",{id:"nav-right",className:"nav-right",children:[(t=="list"||t=="trash")&&r?.totalRec>r?.show?w.jsxs("div",{className:"mxpaging",children:[w.jsx("input",{type:"text",name:"showRecP",id:"showRecP",defaultValue:r?.show,ref:o,onKeyDown:I,className:"show-rec",title:"Show Records"}),w.jsxs("div",{children:[Number(r?.offset)+1," -"," ",Number(r?.dataArrayLength)+Number(r?.offset)," ","of ",r?.totalRec]}),w.jsx(In,{className:r?.enablePrevButton?"prev":"no-prev",to:r?.enablePrevButton?m:"#",onClick:U=>!r?.enablePrevButton&&U.preventDefault()}),w.jsx(In,{className:r?.enableNextButton?"next":"no-next",to:r?.enableNextButton?d:"",onClick:U=>!r?.enableNextButton&&U?.preventDefault()})]}):null,y&&y?.length?y?.map((U,F)=>U?.label&&U?.formSubmit?w.jsxs("button",{type:"submit",form:"frmAddEdit",className:U?.class,children:[" ",U?.label?.toUpperCase()]},F):w.jsxs(In,{to:U?.link?U?.link:"",onClick:H=>{U?.link||(H?.preventDefault(),U?.action&&B(U))},className:U?.class,style:U?.style?U?.style:{},children:[" ",U?.label," "]},F)):null]})]})}function Jt(i,e,t){let n={};Object.keys(i)?.length&&Object.values(i).forEach(r=>{r?.forEach(s=>{if(s?.name){let o="";s?.type=="checkbox"&&s?.options?o=s?.value?s?.value?.split(","):[]:o=s?.value,n[s?.name]=o||""}})}),t({...n})}function P9(i,e,t){let n=[];const s=new URLSearchParams(window?.location?.search)?.get("id")||null;if(t)n=(i[e.name]||[]).reduce((o,a)=>{const l=a[e.name]||"",c=a[e.name]?.split(".")?.pop()||"",d=l?{name:l,ext:c,type:"old",file:a[e.name+"Path"],id:a?.[e?.name+"ID"]?parseInt(a[e.name+"ID"]):s?parseInt(s):null}:null;return d&&o.push(d),o},[]);else{const o=i?.[e?.name]||"",a=i?.[e?.name]?.split(".")?.pop()||"",l=o?{name:o,ext:a,type:"old",file:i[e.name+"Path"],id:i?.[e?.name+"ID"]?parseInt(i[e.name+"ID"]):s?parseInt(s):null}:null;n=l?[l]:[]}return n}function sn(i,e,t,n){let r={};Object.keys(e)?.length&&Object.values(e).forEach(s=>{s?.forEach(o=>{if(o?.type==="add-row-table"){const a=i?.[o.frmGroup];a&&Array.isArray(a)&&a.length>0?r[o.frmGroup]=a:r[o.frmGroup]=[]}else{let a="";if(o?.type=="checkbox"&&o?.options?.length){let l=i?.[o?.name]?i[o?.name]?.split(",")?.map(c=>Number(c)):[];l&&l?.length&&(a=l)}else o?.type=="file"||o?.type=="fileBase64"?a=P9(i,o,o?.params?.multiple):a=i?.[o.name];r[o.name]=a??""}})}),n({...r})}function Xy(){const[i,e]=M.useState([]),[t,n]=M.useState([]),[r,s]=M.useState({}),[o,a]=M.useState({}),[l]=$t(),{modeType:c}=_t(),d=l.get("id"),f=async()=>{const C=await Ne({url:"/admin-master/org-list",method:"get"});e(C?.data||[])},m=async()=>{const C=await Ne({url:"/admin-master/role-list",method:"get"});n(C?.data||[])};M.useEffect(()=>{(async()=>(await Promise.all([m(),f()]),c=="edit"?v(d):Jt(y,r,s)))()},[d]);const p=[{type:"text",name:"displayName",title:"FullName",validate:"required"},{type:"text",name:"userName",title:"Login Name",validate:"required"},{type:"text",name:"userMobile",title:"Login Mobile No"},{type:"text",name:"userEmail",title:"Login Email",validate:"email"},{type:"password",name:"userPass",title:"Password",validate:"",ifShowPassword:!0},{type:"password",name:"userPass1",title:"Verify Password",validate:"equalTo:userPass",ifShowPassword:!0}],g=[{type:"select",name:"orgID",title:"Organization",validate:"required",options:i},{type:"select",name:"roleID",title:"User Role",validate:"required",options:t}];p.filter(C=>(C.name=="userPass"&&c=="add"&&(C.validate="required,"+C.validate),C));const y={formArr:p,formArr1:g},v=async C=>{const D=await Ne({url:`/admin-user/${C}`,method:"get"});D?.status===!0&&sn(D.data,y,r,s)},x=async C=>
213{if(C?.preventDefault(),Xt(y,r,o,a)){const E=await Ne({url:d?`/admin-user/${d}`:"/admin-user",data:r,method:d?"put":"post"});alert(E?.msg)}};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:x,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f50",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:p,formStateData:r,setFormStateData:s,formError:o,setFormErrors:a})})}),w.jsx("div",{className:"wrap-form f50",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr1",frmArr:g,formStateData:r,setFormStateData:s,formError:o,setFormErrors:a})})})]})]})}const It=i=>{const e=wr(),[t,n]=M.useState({}),[r,s]=M.useState({}),[o]=$t(),{modeType:a}=_t(),l=Mt(),c={search:i.searchFlds},d=jl(),f=$c(y=>y.searchBarToggleReducer.isOpen),m=()=>{d(Qz())};M.useEffect(()=>{const y=Object.fromEntries(o.entries()),v=["offset","show","orderBy","order","status"],x=Object.entries(y).some(([C,D])=>v.includes(C)?!1:D!=="");d(x?Yse():hk())},[e.pathname,o,d]),M.useEffect(()=>{if(i?.searchFlds){Jt(c,t,n);const y=Object.fromEntries(o.entries());sn(y,c,t,n)}},[i?.searchFlds,o]);const p=y=>{y.preventDefault();const{searchParams:v}=BNe(o,a,t);l(`?${v}`)},g=()=>{const y=Object.keys(t).reduce((x,C)=>(x[C]="",x),{});sn(y,c,t,n);const{searchParams:v}=LNe(y,a);l(`?${v}`),d(hk())};return w.jsxs("div",{className:`search-data ${f?"active":""}`,children:[w.jsx(In,{to:"#",className:"del",onClick:y=>{y.preventDefault(),m()}}),w.jsx("form",{name:"frmSearch",id:"frmSearch",onSubmit:p,children:w.jsxs("ul",{children:[i?.searchFlds&&w.jsx(Le,{frmGroupName:"search",frmArr:i.searchFlds,formStateData:t,setFormStateData:n,formError:r,setFormErrors:s}),w.jsx("li",{children:w.jsx("input",{type:"submit",name:"btnSearch",id:"btnSearch",form:"frmSearch",defaultValue:"",className:"btn search fa"})}),w.jsx("li",{children:w.jsx("input",{type:"button",name:"btnRest",id:"btnReset",onClick:g,defaultValue:"",className:"btn refresh fa"})})]})})]})};function Rt(i){const e=i?.editId,{modeName:t,modeType:n}=_t(),[r,s]=M.useState([]),[o,a]=M.useState([]),l=Mt(),[c]=$t(),d=wr(),f=jl(),[m,p]=M.useState(""),[g,y]=M.useState(""),[v,x]=M.useState([]),C=M.useRef(v),D=$c(L=>L.paginationReducer);M.useEffect(()=>{x([]),O(!1),j(!1),s(i?.columns)},[i.data,i.columns]);const E=M.useRef(null),T=(L,W)=>{let G=E.current?.querySelector(`#ve_${L}`);G&&G instanceof HTMLElement&&(G.style.display=W)},S=L=>{T(L,"flex")},A=L=>{T(L,"none")};M.useEffect(()=>{x([]),j(!1),O(!1)},[d?.search]),M.useEffect(()=>{D?.isDelete?(R(),f(iW({isDelete:!1}))):D?.isTrashRestore&&(I(),f(nW({isTrashRestore:!1})))},[D]);const I=async()=>{if(C?.current&&C.current?.length){let L={Ids:C.current,action:n=="list"?"trash":"restore"};const G={method:"POST",url:i?.apiUrl+"/trashRestore"||"",data:L},Y=await Ne(G);Y?.status==!0?(H(),x([]),j(!1),O(!1)):(alert(`${Y?.msg||"Fail to trash or restore"}`),x([]),j(!1),O(!1),H())}else alert("Select the record")},R=async()=>{if(C?.current&&C.current?.length){let L={Ids:C.current,action:"delete"};const G={method:"DELETE",url:i?.apiUrl+"/delete"||"",data:L};(await Ne(G))?.err==0&&(H(),x([]),j(!1),O(!1))}};M.useEffect(()=>{C.current=v},[v]);const O=L=>{(E?.current?.querySelectorAll(".list-item")).forEach(G=>{G instanceof HTMLInputElement&&(G.checked=L)})},j=(L=!0)=>{(E?.current?.querySelectorAll(".chkAll")).forEach(G=>{G instanceof HTMLInputElement&&(G.checked=L)})},B=L=>{x(W=>W.includes(L)?W.filter(G=>G!==L):[...W,L])},U=L=>{const W=L.target.checked;O(W),x(W?o.map(G=>G[e]):[])},F=async L=>{let W=c?.toString();const G=Object.fromEntries(new URLSearchParams(W));let Y="",ie="";(!G?.orderBy||!G?.order)&&(Y="asc",ie=L?.name),G?.orderBy&&G?.order&&(Y=G?.order=="asc"?"desc":"asc",ie=L?.name),y(Y),p(ie);const{sortParams:V}=UNe(c,n,ie,Y);l(`?${V}`)},H=async()=>{try{if(!i?.apiUrl&&i?.data){a(i?.data);return}let L=c?.toString(),W=Object.fromEntries(new URLSearchParams(L));W={...W,status:n=="trash"?0:1};const G={method:"GET",url:i?.apiUrl||"",params:W,showProgress:!0},Y=await Ne(G);if(Y&&Y?.status==!0){const ie=Y?.data?.length?Y?.data:[];f(ooe({count:Y?.count??0,dataLength:ie?.length??0})),a(ie)}else a([])}catch{a([])}};return M.useEffect(()=>{let L=c?.toString();const W=Object.fromEntries(new URLSearchParams(L));y(W?.order?W?.order:""),p(W?.orderBy?W?.orderBy:""),H()},[c,d.pathname]),w.jsxs("table",{width:"100%",cellSpacing:"2",cellPadding:"6",className:i?.tblCls?"tbl-list "+i?.tblCls:"tbl-list"+(i?.no_action?" no-action":""),ref:E,children:[w.jsx("thead",{children:r.length>0&&w.jsxs("tr",{children:[w.jsx("th",{align:"center",className:"noprint noprintdata",style:{width:"2%"},children:w.jsxs("i",{className:"chk",children:[w.jsx("input",{type:"checkbox",className:"chkAll",title:"Select All",onClick:U}),w.jsx("em",{})]})}),r?.map((L,W)=>w.jsx("th",{style:{width:L?.params?.width},title:L?.title,align:L?.params?.align||"center",children:L?.sortable==!1?w.jsx(In,{to:"#",children:L?.title}):w.jsx(In,{className:m==""?"sort asc":m==L?.name&&g=="asc"?"sort desc":"sort asc",to:"#",onClick:G=>{G?.preventDefault(),F(L)},children:L?.title})},W))]})}),o&&o.length?w.jsx("tbody",{children:o.map((L,W)=>w.jsxs("tr",{onMouseOver:()=>S(W),onMouseLeave:()=>A(W),children:[w.jsx("td",{align:"center",className:"noprintdata",children:w.jsxs("i",{className:"chk",children:[w.jsx("input",{type:"checkbox",id:"checkbox",className:"list-item",onClick:()=>B(L?.[e])}),w.jsx("em",{})]})}),r?.map((G,Y)=>w.jsx("td",{align:G?.params?.align||"center",children:G?.pkId?w.jsxs("div",{className:`veiw-edit ${i.no_action?"no-action":""}`,children:[L?.[G?.name],w.jsxs("div",{className:"ve-wrap",id:`ve_${W}`,style:{display:"none"},children:[w.jsx("div",{className:"edit",id:`edit_${W}`,children:w.jsx(In,{to:`/${t}-edit?id=${L?.[G?.name]}`,className:"edit",title:"Edit"})}),w.jsx("div",{className:"view",id:`view_${W}`,children:w.jsx(In,{to:`/${t}-view?id=${L?.[G?.name]}`,className:"view",title:"View"})})]})]}):G?.isImage&&L?.[G?.name+"Path"]?w.jsx(In,{to:L?.[G?.name+"Path"],title:L?.[G?.name],target:"_blank",children:w.jsx("img",{src:L?.[G?.name+"Path"],width:40,height:40,alt:L?.[G?.name]||""})}):G?.component?w.jsx(G.component,{rowData:L,columnData:G,columnName:G?.name}):L?.[G?.name]},`td_${W}_${Y}`))]},`tr_${W}`))}):w.jsx("tbody",{children:w.jsx("tr",{children:w.jsx("td",{colSpan:r.length+1,style:{textAlign:"center"},children:"No Records Found"})})})]})}function WNe(){const i="/admin-user",[e]=M.useState([]),t="userID",n=[{title:"ID",name:"userID",params:{align:"center",width:"1%"},pkId:!0},{title:"Image",name:"imageName",params:{align:"center"},isImage:!0,sortable:!1},{title:"FullName",name:"displayName",params:{align:"left"}},{title:"Login Name",name:"userName",params:{align:"left"}}
213,{title:"Email",name:"userEmail",params:{align:"left"}},{title:"Mobile No",name:"userMobile",params:{align:"center"}},{title:"Role/Type",name:"roleName",params:{align:"center"}},{title:"Last Login",name:"dateLogin",params:{align:"center"}}],r=[{type:"text",name:"userID",title:"ID"},{type:"text",name:"displayName",title:"FullName"},{type:"text",name:"Login Name",title:"UserName"},{type:"text",title:"Email",name:"userEmail"},{type:"text",title:"Mobile No",name:"userMobile"}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:r}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{data:e}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:t,tblCls:"xsmall",apiUrl:i})})]})]})}function I9(){const[i,e]=M.useState({}),[t,n]=M.useState({}),{modeType:r}=_t(),[s]=$t(),o=s.get("id");M.useEffect(()=>{r==="edit"?c(o):Jt(l,i,e)},[o]);const a=[{type:"text",name:"orgName",title:"Organization Name",validate:"required",attrp:{class:"c4"}},{type:"text",name:"orgEmail",title:"Organization Email",attrp:{class:"c4"}},{type:"text",name:"orgDomain",title:"Organization Domain",attrp:{class:"c4"}}],l={formArr:a},c=async f=>{const m=await Ne({url:`/organization/${f}`,method:"get"});m?.status===!0&&sn(m.data,l,i,e)},d=async f=>{if(f?.preventDefault(),Xt(l,i,t,n)){const p=await Ne({url:o?`/organization/${o}`:"/organization",data:i,method:o?"put":"post"});alert(p?.msg)}};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:d,id:"frmAddEdit",children:w.jsx("div",{className:"wrap-form f",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:a,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})})})]})}function HNe(){const i="/organization",e="orgID",t=[{title:"ID",name:"orgID",params:{align:"center",width:"1%"},pkId:!0},{title:"Organization Name",name:"orgName",params:{align:"center"}},{title:"Email",name:"orgEmail",params:{align:"left"}},{title:"Domain Name",name:"orgDomain",params:{align:"center"}}],n=[{type:"text",name:"orgID",title:"ID"},{type:"text",name:"orgName",title:"Organization Name"},{type:"text",name:"orgEmail",title:"Email"},{type:"text",title:"Email",name:"userEmail"},{type:"text",title:"Domain Name",name:"orgDomain"}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:n}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:t,editId:e,tblCls:"xsmall",apiUrl:i})})]})]})}function qNe(){const i="/admin-role",[e]=M.useState([]),t="roleID",n=[{title:"ID",name:"roleID",params:{align:"center",width:"1%"},pkId:!0},{title:"Role Name",name:"roleName",params:{align:"left"}},{title:"Role Email",name:"roleEmail",params:{align:"left"}},{title:"Landing Page",name:"rolePage",params:{align:"left"}},{title:"Role Key",name:"roleKey",params:{align:"left"}},{title:"Order",name:"xOrder",params:{align:"center"}}],r=[{type:"text",name:"roleID",title:"ID"},{type:"text",name:"roleName",title:"Role Name"},{type:"text",name:"roleKey",title:"Role Key"}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:r}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{data:e}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:t,tblCls:"xsmall",apiUrl:i})})]})]})}function $Ne({accessState:i,setAccessState:e}){const{getStateValue:t}=Yh(),n=["view","add","edit","delete","trash","restore"],[r,s]=M.useState([]),[o,a]=M.useState([]);M.useEffect(()=>{l()},[]);function l(){const g=t("mxmenu"),y=t("mxcoremenu"),v=g||[],x=y||[],C=[];v?.forEach(D=>{Number(D.adminMenuID)<99999&&D?.menuType==0&&C.push(D)}),s(C),a(x)}const c=(g,y)=>{e(v=>{const x=v[g]||[],C=x.includes(y)?x.filter(D=>D!==y):[...x,y];return{...v,[g]:C}})},d=(g,y)=>{e(v=>({...v,[g]:y?n:[]}))},f=(g,y)=>{const v={...i};[...o,...r].forEach(C=>{const D=C.adminMenuID,E=v[D]||[];v[D]=y?E.includes(g)?E:[...E,g]:E.filter(T=>T!==g)}),e(v)},m=g=>(i?.[g]||[])?.length===n?.length,p=(g,y)=>(i?.[g]||[])?.includes(y);return w.jsx(w.Fragment,{children:w.jsxs("table",{width:"100%",border:0,cellSpacing:0,cellPadding:8,className:"tbl-list",id:"tbl-access",children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsx("th",{align:"left",children:"Menu Name"}),w.jsx("th",{children:"ALL"}),n.map(g=>w.jsxs("th",{align:"center",children:[g.charAt(0).toUpperCase()+g.slice(1)," ",w.jsx("br",{})," ",w.jsxs("i",{className:"chk",style:{marginTop:4},children:[w.jsx("input",{type:"checkbox",className:"checkbox allv",checked:[...o,...r].every(y=>p(y.adminMenuID,g)),onChange:y=>f(g,y.target.checked)}),w.jsx("em",{})]})]},g))]})}),w.jsx("tbody",{children:r?.map(g=>w.jsxs("tr",{children:[w.jsx("td",{align:"left",children:g.menuTitle}),w.jsx("td",{children:w.jsxs("i",{className:"chk",children:[w.jsx("input",{type:"checkbox",className:"checkbox allh",checked:m(g.adminMenuID),onChange:y=>
213d(g.adminMenuID,y.target.checked)}),w.jsx("em",{})]})}),n?.map((y,v)=>w.jsx("td",{align:"center",children:w.jsxs("i",{className:"chk",children:[w.jsx("input",{type:"checkbox",checked:p(g.adminMenuID,y),onChange:()=>c(g.adminMenuID,y),className:"checkbox"}),w.jsx("em",{})]})},y))]},g.adminMenuID))}),w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsx("th",{align:"left",children:"Core Menu"}),w.jsx("th",{colSpan:7,children:" "})]})}),w.jsx("tbody",{children:o.map(g=>w.jsxs("tr",{children:[w.jsx("td",{align:"left",children:g.menuTitle}),w.jsx("td",{children:w.jsxs("i",{className:"chk",children:[w.jsx("input",{type:"checkbox",className:"checkbox allh",checked:m(g.adminMenuID),onChange:y=>d(g.adminMenuID,y.target.checked)}),w.jsx("em",{})]})}),n.map(y=>w.jsx("td",{align:"center",children:w.jsxs("i",{className:"chk",children:[w.jsx("input",{type:"checkbox",className:"checkbox",checked:p(g.adminMenuID,y),onChange:()=>c(g.adminMenuID,y)}),w.jsx("em",{})]})},y))]},g.adminMenuID))})]})})}function R9(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r,s]=M.useState([]),[o]=$t(),a=o.get("id"),[l,c]=M.useState([]),[d,f]=M.useState({}),{modeType:m}=_t(),p=async()=>{const D=await Ne({url:"/admin-master/org-list",method:"get"});s(D?.data||[])},g=async()=>{const D=await Ne({url:"/admin-role/menu",method:"get"});c(D?.data?.map(E=>
213({id:E.id,value:E.menuTitle}))??[])};M.useEffect(()=>{f({}),(async()=>(await Promise.all([p(),g()]),m==="edit"?x(a):Jt(v,i,e)))()},[a]);const y=[{type:"select",name:"orgID",title:"Organization",validate:"required",options:r},{type:"select",name:"parentID",title:"Role Parent",options:[]},{type:"text",name:"roleName",title:"Role Name",validate:"required"},{type:"text",name:"roleEmail",title:"Role Email"},{type:"select",name:"roleKey",title:"Role Landing Page",validate:"required",options:l}],v={formArr:y},x=async D=>{const E=await Ne({url:`/admin-role/${D}`,method:"get"});E?.status===!0&&(f(E?.data?.access),sn(E.data,v,i,e))},C=async D=>{if(D?.preventDefault(),Xt(v,i,t,n)){const T={...i,access:d};console.log(T);const S=await Ne({url:a?`/admin-role/${a}`:"/admin-role",data:T,method:a?"put":"post"});alert(S?.msg)}};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:C,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f70",children:w.jsx($Ne,{accessState:d,setAccessState:f})}),w.jsx("div",{className:"wrap-form f30",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:y,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})})]})]})}function F9(){const[i,e]=M.useState({}),[t,n]=M.useState({}),{modeName:r,modeType:s}=_t(),[o]=$t(),a=o.get("id"),l=Mt(),[c,d]=M.useState(0),[f,m]=M.useState([]),[p,g]=M.useState([]),y=[{type:"select",name:"seoUri",title:"DEAFAULT MENU",value:"",options:f,attrp:{class:"defaultMenu"}},{type:"select",name:"parentID",title:"MENU GROUP",value:"",options:p,attrp:{class:"groupMenu"}},{type:"text",name:"menuTitle",title:"Menu Title",validate:"required"},{type:"text",name:"xOrder",title:"Menu Order"}],v=[{type:"text",name:"params",title:"Params",validate:"",info:"eg: ?x=200"},{type:"checkbox",name:"hideMenu",title:"Hide Menu From Sidebar "},{type:"select",name:"forceNav",title:"FORCE NAVIGATION TO",options:[{id:"add",value:"Add Page"},{id:"edit",value:"Edit Page"},{id:"list",value:"List Page"}]}];let x={formArr:y,formArr1:v};async function C(){const T=await Ne({url:"/admin-master/menu-dropdown",method:"get"});if(Array.isArray(T.data)){const S=[],A=[];T?.data?.forEach(I=>{I?.menuType===0&&S.push({id:I.seoUri,value:I.menuTitle}),I?.menuType===1&&A.push({id:I.adminMenuID,value:I.menuTitle})}),m(S),g(A)}}async function D(T){const S=await Ne({url:`/admin-menu/${T}`,method:"get"});d(S?.data?.menuType);const A=document?.getElementsByClassName("groupMenu")?.[0],I=document?.getElementsByClassName("defaultMenu")?.[0];S?.data?.menuType==1&&(A&&(A.style.display="none"),I&&(I.style.display="block")),S?.data?.menuType==0&&(A&&(A.style.display="block"),I&&(I.style.display="none")),sn(S?.data,x,i,e)}M.useEffect(()=>{C()},[]),M.useEffect(()=>{s==="edit"?D(a):Jt(x,i,e)},[a]);const E=async T=>{if(T?.preventDefault(),Xt(x,i,t,n)){const A={...i,menuType:s=="add"?1:c};let I={url:s=="add"?"/admin-menu":`/admin-menu/${a}`,method:s=="add"?"post":"put",data:A,showLoading:!0},R=await Ne(I);R?.err===0&&s=="add"&&l(`/${r}-list`),R?.err===0&&s=="edit"&&D(a)}};return M.useEffect(()=>{const T=document?.getElementsByClassName("groupMenu")?.[0];T&&(T.style.display="none");const S=document?.getElementsByClassName("defaultMenu")?.[0];S&&(S.style.display="block")},[s]),w.jsx(w.Fragment,{children:w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{name:"frmAddEdit",className:"wrap-data",id:"frmAddEdit",onSubmit:E,children:[w.jsx("div",{className:"wrap-form f50",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:y,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsx("div",{className:"wrap-form f50",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr1",frmArr:v,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})})]})]})})}function GNe(){const i="/admin-menu",[e,t]=M.useState(!1),n="adminMenuID",r=[{title:"Menu Title",name:"menuTitle",params:{align:"left"}},{title:"ID",name:"adminMenuID",params:{align:"center",width:"1%"},pkId:!0},{title:"Menu URI",name:"seoUri",params:{align:"left"}},{title:"Params",name:"params",params:{align:"center"}},{title:"Force Nav",name:"forceNav",params:{align:"center"}},{title:"Hide Menu",name:"hideMenu",params:{align:"center"}},{title:"Order",name:"xOrder",params:{align:"center"}}];async function s(){(await Ne({url:"/admin-menu/recreate-menu",method:"get"}))?.status==!0&&t(l=>!l)}const o=[{label:"Reset Menu",class:"fa-reset btn",position:"left",action:()=>s()}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{extraEleFld:o}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:r,editId:n,tblCls:"xsmall",apiUrl:i},e.toString())})]})]})}const YNe={VITE_APP_BASE_PATH:""},{VITE_APP_BASE_PATH:KNe}=YNe;function XNe(){const{updateState:i}=Yh(),{isAuthenticated:e}=x5(),t=Mt();M.useEffect(()=>{e()&&t("/dashboard-list",{replace:!0})},[e]);const n={userName:"",password:""},[r,s]=M.useState(n),[o,a]=M.useState({});let l=[{type:"text",name:"userName",title:"Login Name",validate:"required"},{type:"password",name:"password",title:"Password",validate:"required"}],c={formArr:l};const d=async f=>{if(f?.preventDefault(),Xt(c,r,o,a))try{const p=await Ne({url:"/admin-user/login",method:"POST",data:r});if(p.status==!0){const g=p?.data;g?.TOKEN&&i("token",g?.TOKEN),g?.FONT&&i("font",g?.FONT),g?.PAGETITLE&&i("pagetitle",g?.PAGETITLE),g?.FONT&&i("font",g?.FONT),g?.THEME&&i("theme",g?.THEME),g?.THEMEMODE&&i("thememode",g?.THEMEMODE),g?.THEMETYPE&&i("themetype",g?.THEMETYPE),g?.MXACCESS&&i("mxaccess",g?.MXACCESS),g?.MXMENU&&i("mxmenu",g?.MXMENU),g?.MXMENU&&i("mxcoremenu",g?.MXCOREMENU),g?.FAVICON&&i("favicon",g?.FAVICON),g?.LOADERIMAGE&&i("loaderimage",g?.LOADERIMAGE),g?.MXNAME&&i("mxuser",{MXID:g?.MXID,MXNAME:g?.MXNAME,MXEMAIL:g?.MXEMAIL}),g?.ORGID&&i("orgid",g?.ORGID),g?.MXROLEKEY&&i("mxrolekey",g?.MXROLEKEY?.toLowerCase()?.trim());const y=g?.DEFAULTPAGE&&g?.DEFAULTPAGE!=""?g?.DEFAULTPAGE+"-list":"dashboard-list";t(`/${y}`,{replace:!0}),s(n)}else alert("Login Fail")}catch{}};return w.jsx("div",{className:"login-container",children:w.jsxs("div",{className:"login-box",children:[w.jsx("div",{className:"welcome",children:w.jsx("img",{id:"logo-login",src:`${KNe}/bycabs-logo.png`,alt:"logo"})}),w.jsx("div",{className:"login-wrap",children:w.jsx("form",{name:"frmLogin",i
213d:"frmLogin",onSubmit:d,autoComplete:"off",children:w.jsxs("ul",{id:"wrap-login",children:[w.jsx(Le,{frmGroupName:"formArr",frmArr:l,formStateData:r,setFormStateData:s,formError:o,setFormErrors:a}),w.jsx("li",{children:w.jsx("input",{type:"submit",name:"btnLogin",id:"btnLogin",className:"btn",value:"Login"})})]})})})]})})}function O9(){return w.jsxs("div",{className:"wrap-right",children:[w.jsx("div",{className:"page-nav"}),w.jsx("div",{className:"wrap-data",children:w.jsx("div",{className:"error-page",children:w.jsxs("div",{className:"content",children:[w.jsx("h2",{children:"404"}),w.jsxs("span",{className:"title",children:["Sorry, the page you requested ",w.jsx("br",{}),"was not found."]}),w.jsx(In,{to:"/dashboard-list",className:"btn",children:"Home Page"})]})})})]})}const QNe=()=>{const{getStateValue:i}=Yh(),e=i("mxaccess"),{modeName:t}=_t();return{hasPermissionForRoute:()=>e&&e?.hasOwnProperty(t)?!!e[t]?.includes("view"):!1}},ZNe=({children:i})=>{const{isAuthenticated:e,logout:t}=x5(),{hasPermissionForRoute:n}=QNe(),r=wr();return M.useEffect(()=>{(async()=>e()||await t())()},[r.pathname]),e()?r?.pathname==="/page-not-found"?w.jsx(w.Fragment,{children:i}):n()?w.jsx(w.Fragment,{children:i}):w.jsx(SR,{to:"/page-not-found"}):w.jsx(SR,{to:"/"})};function N9(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{(async()=>s=="edit"?g(a):Jt(p,i,e))()},[a]);const c=[{type:"text",name:"code",title:"Code",validate:"required",attrp:{class:"c3"}},{type:"text",name:"title",title:"Title",validate:"required",attrp:{class:"c3"}},{type:"text",name:"slug",title:"Slug",attrp:{class:"c3"}},{type:"editor",name:"additionalInfo",title:"Additional Information",validate:"required"}];let d=[{type:"add-row-table",frmGroup:"inclusionInfo",title:"form",fields:[{type:"text",name:"label",title:"Inclusion",validate:"required"}]}],f=[{type:"add-row-table",frmGroup:"exclusionInfo",title:"form",fields:[{type:"text",name:"label",title:"Exclusion",validate:"required"}]}],m=[{type:"add-row-table",frmGroup:"tagInfo",title:"form",fields:[{type:"text",name:"label",title:"Tag",validate:"required"}]}];const p={formArr:c,formArr2:d,formArr3:f,formArr4:m},g=async v=>{const x=await Ne({url:`/trip-type/${v}`,method:"get"});x?.status===!0&&sn(x.data,p,i,e)},y=async v=>{if(v?.preventDefault(),Xt(p,i,t,n)){const C=await Ne({url:a?`/trip-type/${a}`:"/trip-type",data:i,method:a?"put":"post"});alert(C?.msg),C?.status==!0&&l(`/${o}-list`)}};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:y,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:c,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsx("div",{className:"wrap-form f30",children:w.jsx(Le,{frmGroupName:"formArr2",frmArr:d,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})}),w.jsx("div",{className:"wrap-form f30",children:w.jsx(Le,{frmGroupName:"formArr3",frmArr:f,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})}),w.jsx("div",{className:"wrap-form f40",children:w.jsx(Le,{frmGroupName:"formArr4",frmArr:m,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]})]})}function B9(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{(async()=>s=="edit"?f(a):Jt(d,i,e))()},[a]);const c=[{type:"text",name:"fuelTypeName",title:"Fuel Type Name",validate:"required",attrp:{class:"c3"}}],d={formArr:c},f=async p=>{const g=await Ne({url:`/fuel-type/${p}`,method:"get"});g?.status===!0&&sn(g.data,d,i,e)},m=async p=>{if(p?.preventDefault(),Xt(d,i,t,n)){const y=await Ne({url:a?`/fuel-type/${a}`:"/fuel-type",data:i,method:a?"put":"post"});alert(y?.msg),y?.status==!0&&l(`/${o}-list`)}};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:m,id:"frmAddEdit",children:w.jsx("div",{className:"wrap-form f",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:c,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})})})]})}function M9(){const i="/fuel-type",e="fuelTypeID",t=[{type:"text",name:"fuelTypeID",title:"ID"},{type:"text",name:"fuelTypeName",title:"Fuel Type Name",params:{align:"left"}}],n=[{title:"ID",name:"fuelTypeID",params:{align:"center",width:"1%"},pkId:!0},{title:"Fuel Type Name",name:"fuelTypeName",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function L9(){const i="/trip-type",e="tripTypeID",t=[{type:"text",name:"tripTypeID",title:"ID"},{type:"text",name:"code",title:"Code"},{type:"text",name:"title",title:"Title"}],n=[{title:"ID",name:"tripTypeID",params:{align:"center",width:"1%"},pkId:!0},{title:"Code",name:"code",params:{align:"left"}},{title:"Title",name:"title",params:{align:"left"}},{title:"Slug",name:"slug",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{hidePageNavField:["trash"]}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function U9(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt(),[c,d]=M.useState([]);M.useEffect(()=>{(async()=>(g(),s=="edit"?p(a):Jt(m,i,e)))()},[a]);const f=[{type:"text",name:"vehicleType",title:"Vehicle Type",validate:"required",attrp:{class:"c2"}},{type:"text",name:"vehicleName",title:"Vehicle Name",validate:"required",attrp:{class:"c2"}},{type:"select",name:"isAC",title:"Ac/Non-AC",options:[{id:1,value:"AC"},{id:2,value:"Non-AC"}],validate:"required",attrp:{class:"c2"}},{type:"text",name:"seatCapacity",title:"Seat Capacity",validate:"required,number",attrp:{class:"c2"}},{type:"select",name:"fuelTypeID",title:"Fuel Type",options:c,validate:"required",attrp:{class:"c2"}},{type:"text",name:"vehicleTag",title:"Vehicle Tag",validate:"required",attrp:{class:"c2"}},{type:"text",name:"avgStar",title:"Vehicle Star",validate:"required",attrp:{class:"c2"}},{type:"text",name:"totalRating",title:"Vehicle Rating By People",validate:"required",attrp:{class:"c2"}},{type:"fileBase64",name:"vehicleImg",title:"Vehicle Image",info:"Size: W 200 x H 200",params:{accept:"image/*",multiple:!1}},{type:"fileBase64",name:"vehicleInteriorImg",title:"Interior Images",info:"Size: W 200 x H 200",params:{accept:"image/*",multiple:!0}},{type:"fileBase64",name:"vehicleExteriorImg",title:"Exterior Images",info:"Size: W 200 x H 200",params:{accept:"image/*",multiple:!0}}],m={formArr:f},p=async v=>{const x=await Ne({url:`/vehicle/${v}`,method:"get"});x?.status===!0&&sn(x.data,m,i,e)},g=async()=>{const v=await Ne({url:"/master/fuel-type",method:"get"});v?.status===!0&&d(v?.data)},y=async v=>{if(v?.preventDefault(),console.log(i),Xt(m,i,t,n)){const C=await Ne({url:a?`/vehicle/${a}`:"/vehicle",data:i,method:a?"put":"post"});alert(C?.msg),C?.status==!0&&l(`/${o}
213-list`)}};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:y,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f50",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:f,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsx("div",{className:"wrap-form f50",children:w.jsx("ul",{className:"tbl-form"})})]})]})}function V9(){const i="/vehicle",e="vehicleID",t=[{type:"text",name:"vehicleID",title:"ID",attr:{style:{width:"50px"}}},{type:"text",name:"vehicleName",title:"Vehicle Name",params:{align:"left"}},{type:"text",name:"vehicleType",title:"Vehicle Type",params:{align:"left"}},{type:"text",name:"vehicleTag",title:"Vehicle Tag",params:{align:"left"}}],n=[{title:"ID",name:"vehicleID",params:{align:"center",width:"1%"},pkId:!0},{title:"Image",name:"vehicleImg",params:{align:"center"},isImage:!0,sortable:!1},{title:"Vehicle Name",name:"vehicleName",params:{align:"left"}},{title:"Vehicle Type",name:"vehicleType",params:{align:"left"}},{title:"Vehicle Tag",name:"vehicleTag",params:{align:"left"}},{title:"Fuel type",name:"fuelTypeName",params:{align:"left"}},{title:"Ac Type ",name:"acType",params:{align:"left"}},{title:"Seat Capacity",name:"seatCapacity",params:{align:"left"}},{title:"Total Rating",name:"totalRating",params:{align:"left"}},{title:"Avg. Star",name:"avgStar",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function Ke(i){if(i==null||i==="")return 0;const e=Number(i);return isNaN(e)||!isFinite(e)?0:Number.isInteger(e)?e:Number(e.toFixed(2))}function Fr(i){if(i==null||i==="")return 0;const e=Number(i);return isNaN(e)||!isFinite(e)?0:Math.round(e)}let j9,z9,W9;const Kn=(i,e={})=>{const{allowCustomValue:t=!1}=e||{};return new Promise(n=>{clearTimeout(j9);const r=i?.trim();if(!r||r.length<2){n([]);return}j9=setTimeout(async()=>{try{const s=await Ne({url:`/master/master-location?q=${r}`,method:"get"});s?.status===!0&&Array.isArray(s.data)&&s.data.length>0?n(s.data.map(o=>({id:o.id,value:o.value}))):n(t?[{id:r,value:r}]:[])}catch(s){console.error("Location API error:",s),n([])}},400)})},td=(i,e={})=>{const{allowCustomValue:t=!1}=e||{};return new Promise(n=>{clearTimeout(z9);const r=i?.trim();if(!r||r.length<2){n([]);return}z9=setTimeout(async()=>{try{const s=await Ne({url:`/master/master-airport-location?q=${r}`,method:"get"});s?.status===!0&&Array.isArray(s.data)&&s.data.length>0?n(s.data.map(o=>({id:o.id,value:o.value}))):n(t?[{id:r,value:r}]:[])}catch(s){console.error("Airport Location API error:",s),n([])}},400)})},Lo=(i,e={})=>{const{allowCustomValue:t=!1}=e||{};return new Promise(n=>{clearTimeout(W9);const r=i?.trim();if(!r||r.length<2){n([]);return}W9=setTimeout(async()=>{try{const s=await Ne({url:`/master/google-place-location?q=${r}`,method:"get"});s?.status===!0&&Array.isArray(s.data)&&s.data.length>0?n(s.data.map(o=>({id:o.label,value:o.value}))):n(t?[{id:r,value:r}]:[])}catch(s){console.error("Google Location API error:",s),n([])}},400)})};function H9(){const[e,t]=M.useState({}),[n,r]=M.useState({}),[s]=$t(),{modeType:o,modeName:a}=_t(),[l,c]=M.useState(null),d=s.get("id"),f=Mt();M.useEffect(()=>{console.log(e)},[e]);const[m,p]=M.useState([]),g=async()=>{const S=await Ne({url:"/master/vehicle",method:"get"});return S?.status===!0?S?.data?.map(I=>({id:I?.vehicleID,value:I?.vehicleType})):[]},y=(S="")=>{try{t(A=>{if(!A.vehicleCatArr||!Array.isArray(A.vehicleCatArr))return console.warn("vehicleCatArr is not a valid array"),A;const I=Ke(A.kms),R=Ke(A.tollTax),O=Ke(A.nightAllowance),j=Ke(A.driverAllowance),B=A.vehicleCatArr.map(U=>{const F=Ke(U.rates);if(F===0)return{...U,isActive:!1,finalRate:"0",finalRateWithoutNightAllownace:"0",gstAmount:"0"};const H=F*I,L=H+j,W=L*(0/100),G=L+W+R,Y=H+O+j,ie=Y*(0/100),V=Y+ie+R;return{...U,finalRateWithoutNightAllownace:Fr(G).toString(),finalRate:Fr(V).toString(),gstAmount:Fr(ie).toString(),...S=="onRateChange"?{isActive:!!(Number(F)&&Number(F)>0)}:{}}});return{...A,vehicleCatArr:B}})}catch(A){console.error("Error calculating final rate:",A?.message),alert(`Error calculating final rate: ${A?.message}`)}};M.useEffect(()=>{(async()=>{const[A]=await Promise.all([g()]);if(p(A),o=="edit")E(d);else if(Jt(D,e,t),o=="add"){console.log("ste",m);const I=A?.map(R=>({vehicleID:R.id,rates:"0",afterRates:"0",discount:"0",gstAmount:"0",isActive:!1,finalRateWithoutNightAllownace:"0",finalRate:"0"}));t(R=>({...R,vehicleCatArr:I}))}})()},[d]);const v=[{name:"pickupLoc",type:"async-select",title:"Pickup Location",validate:"required",loadOptions:Lo,attrp:{class:"c2"}},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"PickupLoc Is Default",attrp:{class:"c2"}},{name:"dropLoc",type:"async-select",title:"Drop Location",loadOptions:Lo,validate:"required",attrp:{class:"c2"}},{type:"checkbox",name:"dropLocIsDefaultShow",title:"Drop Location Is Default",attrp:{class:"c2"}}
213,{type:"text",name:"kms",title:"Kms",validate:"required",attrp:{class:"c2"},cb:(S,A)=>{y()}},{type:"text",name:"tollTax",title:"Toll Tax",validate:"required",attrp:{class:"c2"},cb:(S,A)=>{y()}},{type:"text",name:"nightAllowance",title:"Night Allowance",validate:"required",info:"Applicable at night (11 PM to 5 AM).",value:"0",attrp:{class:"c2"},cb:(S,A)=>{y()}},{type:"text",name:"driverAllowance",title:"Driver Allowance",value:"0",validate:"required",attrp:{class:"c2"},cb:(S,A)=>{y()}}],x=[{type:"add-row-table",frmGroup:"pickupExtraLocArr",title:"form",fields:[{name:"pickupLoc",type:"async-select",title:"Pickup Location",loadOptions:Lo,attrp:{class:"c2"}},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"Pickup Location Is Default"}]}],C=[{type:"add-row-table",frmGroup:"vehicleCatArr",title:"form",fields:[{type:"select",name:"vehicleID",title:"Vehicle Type",options:m,validate:"required"},{type:"text",name:"rates",title:"Rate/KM",validate:"required,number",value:0,cb:(S,A)=>{y("onRateChange")}},{type:"text",name:"afterRates",title:"After Rate/KM",value:0,validate:"required,number"},{type:"text",name:"discount",title:"Discount In %",value:0,validate:"required,number"},{type:"checkbox",name:"isActive",title:"Is Active"},{type:"text",name:"gstAmount",title:"GST Value",value:0,validate:"required,number"},{type:"text",name:"finalRateWithoutNightAllownace",title:"Final Rate Without Night Allowance",value:0,validate:"required,number"},{type:"text",name:"finalRate",title:"Final Rate",value:0,validate:"required,number"}]}
213],D={formArr:v,formArr1:x,formArr2:C},E=async S=>{const A=await Ne({url:`/oneway-location/${S}`,method:"get"});A?.status===!0&&(sn(A.data,D,e,t),setTimeout(()=>{y()},70))},T=async S=>{if(S?.preventDefault(),l)return;Xt(D,e,n,r)&&(await Ne({url:d?`/oneway-location/${d}`:"/oneway-location",data:e,method:d?"put":"post",showLoading:!0}))?.status==!0&&f(`/${a}-list`)};return M.useEffect(()=>{(async()=>{try{const A=e?.pickupLoc?.value,I=e?.dropLoc?.value,R=e?.pickupExtraLocArr?.map(H=>H?.pickupLoc?.value)||[];if(!A||!I)return;const O=[{pickupLoc:A,dropLoc:I}];if(R.forEach(H=>{H&&O.push({pickupLoc:H,dropLoc:I})}),O.some(H=>H?.pickupLoc===H?.dropLoc)){r(H=>({...H,dropLoc:"Pickup and Drop cannot be same"}));return}const B=O.map(H=>H?.pickupLoc);if(new Set(B).size!==B.length){r(H=>({...H,dropLoc:"Duplicate pickup location found"}));return}const F=await Ne({url:"/oneway-location/check-location",method:"post",data:{locations:O,editId:d||null}});F?.status===!1?(r(H=>({...H,dropLoc:F?.msg||"Location already exists"})),c(F?.msg)):(r(H=>({...H,dropLoc:""})),c(null))}catch{c(null)}})()},[e?.pickupLoc,e?.dropLoc,e?.pickupExtraLocArr]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:T,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f60",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:v,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})})}),w.jsx("div",{className:"wrap-form f40",style:o=="edit"?{pointerEvents:"none",opacity:.6,userSelect:"none",cursor:"not-allowed"}:{},children:w.jsx(Le,{frmGroupName:"formArr1",frmArr:x,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})}),w.jsx("div",{className:"wrap-form f",children:w.jsx(Le,{frmGroupName:"formArr2",frmArr:C,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})})]})]})}function q9(){const i="/oneway-location",e="oneWayLocID",t=[{type:"text",name:"oneWayLocID",title:"ID",attr:{style:{width:"50px"}}},{type:"text",name:"pickupLoc",title:"Pickup Location",params:{align:"left"}},{type:"text",name:"dropLoc",title:"Drop Location",params:{align:"left"}}],n=[{title:"ID",name:"oneWayLocID",params:{align:"center",width:"1%"},pkId:!0},{title:"Pickup Location",name:"pickupLoc",params:{align:"left"}},{title:"Drop Location",name:"dropLoc",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function $9(){const i="/customer",e="customerID",t=[{type:"text",name:"customerID",title:"ID",attr:{style:{width:"50px"}}},{type:"text",name:"fullname",title:"FullName"},{type:"text",name:"mobile",title:"Mobile No."},{type:"text",name:"email",title:"Email"},{type:"select",name:"gender",title:"Gender",options:[{id:"male",value:"Male"},{id:"female",value:"Female"}],attr:{style:{width:"120px"}}},{type:"select",name:"nationality",title:"Nationality",options:[{id:"indian",value:"Indian"},{id:"non-indian",value:"Non-Indian"}],attr:{style:{width:"130px"}}}],n=[{title:"ID",name:"customerID",params:{align:"center",width:"1%"},pkId:!0},{title:"FullName",name:"fullname",params:{align:"left"}},{title:"Mobile No.",name:"mobile",params:{align:"left"}},{title:"Email",name:"email",params:{align:"left"}},{title:"Gender",name:"gender",params:{align:"left"}},{title:"Nationality",name:"nationality",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{hidePageNavField:["add"]}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function G9(){const i="/contact-enquiry",e="contactEquiriID",t=[{type:"text",name:"contactEquiriID",title:"ID",attr:{style:{width:"50px"}}},{type:"text",name:"fullname",title:"FullName"},{type:"text",name:"mobile",title:"Mobile No."},{type:"text",name:"email",title:"Email"}],n=[{title:"ID",name:"contactEquiriID",params:{align:"center",width:"1%"},pkId:!0},{title:"FullName",name:"fullname",params:{align:"left"}},{title:"Mobile No.",name:"mobile",params:{align:"left"}}
213,{title:"Email",name:"email",params:{align:"left"}},{title:"Description",name:"description",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{hidePageNavField:["add"]}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function Y9(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r,s]=M.useState(null),[o]=$t(),{modeType:a,modeName:l}=_t(),c=o.get("id"),d=Mt();M.useEffect(()=>{console.log(i)},[i]);const[f,m]=M.useState([]),p=async()=>{const T=await Ne({url:"/master/vehicle",method:"get"});return T?.status===!0?T?.data?.map(A=>({id:A?.vehicleID,value:A?.vehicleType})):[]};M.useEffect(()=>{(async()=>{const[S]=await Promise.all([p()]);if(m(S),a=="edit")D(c);else if(Jt(C,i,e),a=="add"){console.log("ste",f);const A=S?.map(I=>({vehicleID:I.id,rates:"0",afterRates:"0",discount:"0",gstAmount:"0",isActive:!1,finalRate:"0"}));e(I=>({...I,vehicleCatArr:A}))}})()},[c]);const g=(T="")=>{try{e(S=>{if(!S.vehicleCatArr||!Array.isArray(S.vehicleCatArr))return console.warn("vehicleCatArr is not a valid array"),S;const A=S.vehicleCatArr.map(I=>{const R=Ke(I.rates);return R===0?{...I,isActive:!1}:{...I,...T=="onRateChange"?{isActive:!!(Number(R)&&Number(R)>0)}:{}}});return{...S,vehicleCatArr:A}})}catch(S){console.error("Error calculating final rate:",S?.message),alert(`Error calculating final rate: ${S?.message}`)}},y=[{name:"pickupLoc",type:"async-select",title:"Pickup Location",loadOptions:Kn,validate:"required",attrp:{class:"c2"}},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"PickupLoc Is Default",attrp:{class:"c2"}},{type:"text",name:"tollTax",title:"Toll Tax",validate:"required",attrp:{class:"c2"}},{type:"text",name:"nightAllowance",title:"Night Allowance",validate:"required",info:"Applicable at night (11 PM to 5 AM).",value:"0",attrp:{class:"c2"}},{type:"text",name:"driverAllowance",title:"Driver Allowance",value:"
2130",validate:"required",attrp:{class:"c2"}}],v=[{type:"add-row-table",frmGroup:"pickupExtraLocArr",title:"form",fields:[{name:"pickupLoc",type:"async-select",loadOptions:Kn,title:"Pickup Location"},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"PickupLoc Is Default"}]}],x=[{type:"add-row-table",frmGroup:"vehicleCatArr",title:"form",fields:[{type:"select",name:"vehicleID",title:"Vehicle Type",options:f,validate:"required"},{type:"text",name:"rates",title:"Rate/KM",validate:"required,number",cb:(T,S)=>{g("onRateChange")},value:0},{type:"text",name:"afterRates",title:"After Rate/KM",value:0,validate:"required,number"},{type:"text",name:"discount",title:"Discount In %",value:0,validate:"required,number"},{type:"checkbox",name:"isActive",title:"Is Active"}]}],C={formArr:y,formArr1:v,formArr2:x},D=async T=>{const S=await Ne({url:`/oneway-static-location/${T}`,method:"get"});S?.status===!0&&sn(S.data,C,i,e)},E=async T=>{if(T?.preventDefault(),r)return;Xt(C,i,t,n)&&(await Ne({url:c?`/oneway-static-location/${c}`:"/oneway-static-location",data:i,method:c?"put":"post",showLoading:!0}))?.status==!0&&d(`/${l}-list`)};return M.useEffect(()=>{(async()=>{try{const S=i?.pickupLoc?.value,A=i?.pickupExtraLocArr?.map(j=>j?.pickupLoc?.value)||[];if(!S)return;const I=[S];if(A.forEach(j=>{j&&I.push(j)}),new Set(I).size!==I.length){n(j=>({...j,pickupLoc:"Duplicate pickup location found"}));return}const O=await Ne({url:"/oneway-static-location/check-location",method:"post",data:{locations:I,editId:Number(c||0)||null}});O?.status===!1?(n(j=>({...j,pickupLoc:O?.msg||"Pickup location already exists"})),s(O?.msg)):(n(j=>({...j,pickupLoc:""})),s(null))}catch{s(null)}})()},[i?.pickupLoc,i?.pickupExtraLocArr]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:E,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f60",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:y,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsx("div",{className:"wrap-form f40",style:a=="edit"?{pointerEvents:"none",opacity:.6,userSelect:"none",cursor:"not-allowed"}:{},children:w.jsx(Le,{frmGroupName:"formArr1",frmArr:v,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})}),w.jsx("div",{className:"wrap-form f",children:w.jsx(Le,{frmGroupName:"formArr2",frmArr:x,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]})]})}function K9(){const i="/oneway-static-location",e="staticLocID",t=[{type:"text",name:"staticLocID",title:"ID"},{type:"text",name:"pickupLoc",title:"Pickup Location",params:{align:"left"}}],n=[{title:"ID",name:"staticLocID",params:{align:"center",width:"1%"},pkId:!0},{title:"Pickup Location",name:"pickupLoc",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function X9(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),[s,o]=M.useState(null),{modeType:a,modeName:l}=_t(),c=r.get("id"),d=Mt();M.useEffect(()=>{console.log(i)},[i]);const[f,m]=M.useState([]),p=async()=>{const T=await Ne({url:"/master/vehicle",method:"get"});return T?.status===!0?T?.data?.map(A=>({id:A?.vehicleID,value:A?.vehicleType})):[]};M.useEffect(()=>{(async()=>{const[S]=await Promise.all([p()]);if(m(S),a=="edit")D(c);else if(Jt(C,i,e),a=="add"){console.log("ste",f);const A=S?.map(I=>({vehicleID:I.id,rates:"0",afterRates:"0",discount:"0",isActive:!1}));e(I=>({...I,vehicleCatArr:A}))}})()},[c]);const g=(T="")=>{try{e(S=>{if(!S.vehicleCatArr||!Array.isArray(S.vehicleCatArr))return console.warn("vehicleCatArr is not a valid array"),S;const A=S.vehicleCatArr.map(I=>{const R=Ke(I.rates);return R===0?{...I,isActive:!1}:{...I,...T=="onRateChange"?{isActive:!!(Number(R)&&Number(R)>0)}:{}}});return{...S,vehicleCatArr:A}})}catch(S){console.error("Error calculating final rate:",S?.message),alert(`Error calculating final rate: ${S?.message}`)}},y=[{name:"pickupLoc",type:"async-select",title:"Pickup Location",loadOptions:Lo,validate:"required",attrp:{class:"c2"}},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"PickupLoc Is Default",attrp:{class:"c2"}}],v=[{type:"add-row-table",frmGroup:"pickupExtraLocArr",title:"form",f
213ields:[{name:"pickupLoc",type:"async-select",title:"Pickup Location",loadOptions:Lo,attrp:{class:"c2"}},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"PickupLoc Is Default",attrp:{class:"c2"}}]}],x=[{type:"add-row-table",frmGroup:"vehicleCatArr",title:"form",fields:[{type:"select",name:"vehicleID",title:"Vehicle Type",options:f,validate:"required"},{type:"text",name:"rates",title:"Rate/KM",validate:"required,number",cb:(T,S)=>{g("onRateChange")},value:0},{type:"text",name:"afterRates",title:"After Rate/KM",value:0,validate:"required,number"},{type:"text",name:"discount",title:"Discount In %",value:0,validate:"required,number"},{type:"checkbox",name:"isActive",title:"Is Active"}]}],C={formArr:y,formArr1:v,formArr2:x},D=async T=>{const S=await Ne({url:`/roundtrip-location/${T}`,method:"get"});S?.status===!0&&sn(S.data,C,i,e)},E=async T=>{if(T?.preventDefault(),s)return;Xt(C,i,t,n)&&(await Ne({url:c?`/roundtrip-location/${c}`:"/roundtrip-location",data:i,method:c?"put":"post",showLoading:!0}))?.status==!0&&d(`/${l}-list`)};return M.useEffect(()=>{(async()=>{try{const S=i?.pickupLoc?.value,A=i?.pickupExtraLocArr?.map(j=>j?.pickupLoc?.value)||[];if(!S)return;const I=[S];if(A.forEach(j=>{j&&I.push(j)}),new Set(I).size!==I.length){n(j=>({...j,pickupLoc:"Duplicate pickup location found"}));return}const O=await Ne({url:"/roundtrip-location/check-location",method:"post",data:{locations:I,editId:Number(c||0)||null}});O?.status===!1?(n(j=>({...j,pickupLoc:O?.msg||"Pickup location already exists"})),o(O?.msg)):(n(j=>({...j,pickupLoc:""})),o(null))}catch{o(null)}})()},[i?.pickupLoc,i?.pickupExtraLocArr]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:E,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f60",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:y,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsx("div",{className:"wrap-form f40",style:a=="edit"?{pointerEvents:"none",opacity:.6,userSelect:"none",cursor:"not-allowed"}:{},children:w.jsx(Le,{frmGroupName:"formArr1",frmArr:v,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})}),w.jsx("div",{className:"wrap-form f",children:w.jsx(Le,{frmGroupName:"formArr2",frmArr:x,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]})]})}function Q9(){const i="/roundtrip-location",e="roundTripLocID",t=[{type:"text",name:"roundTripLocID",title:"ID"},{type:"text",name:"pickupLoc",title:"Pickup Location",params:{align:"left"}}],n=[{title:"ID",name:"roundTripLocID",params:{align:"center",width:"1%"},pkId:!0},{title:"Pickup Location",name:"pickupLoc",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function Z9(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),[a,l]=M.useState(null),c=r.get("id"),d=Mt();M.useEffect(()=>{console.log(i)},[i]);const[f,m]=M.useState([]),p=async()=>{const T=await Ne({url:"/master/vehicle",method:"get"});return T?.status===!0?T?.data?.map(A=>({id:A?.vehicleID,value:A?.vehicleType})):[]};M.useEffect(()=>{(async()=>{const[S]=await Promise.all([p()]);if(m(S),s=="edit")D(c);else if(Jt(C,i,e),s=="add"){console.log("ste",f);const A=S?.map(I=>({vehicleID:I.id,rates:"0",afterRates:"0",discount:"0",isActive:!1}));e(I=>({...I,vehicleCatArr:A}))}})()},[c]);const g=(T="")=>{try{e(S=>{if(!S.vehicleCatArr||!Array.isArray(S.vehicleCatArr))return console.warn("vehicleCatArr is not a valid array"),S;const A=S.vehicleCatArr.map(I=>{const R=Ke(I.rates);return R===0?{...I,isActive:!1}:{...I,...T=="onRateChange"?{isActive:!!(Number(R)&&Number(R)>0)}:{}}});return{...S,vehicleCatArr:A}})}catch(S){console.error("Error calculating final rate:",S?.message),alert(`Error calculating final rate: ${S?.message}`)}},y=[{name:"pickupLoc",type:"async-select",title:"Pickup Location",loadOptions:Kn,validate:"required",attrp:{class:"c2"}},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"PickupLoc Is Default",attrp:{class:"c2"}},{type:"text",name:"nightAllowance",title:"Night Allowance",validate:"required",info:"Applicable at night (11 PM to 5 AM).",value:"
2130",attrp:{class:"c2"}}],v=[{type:"add-row-table",frmGroup:"pickupExtraLocArr",title:"form",fields:[{name:"pickupLoc",type:"async-select",loadOptions:Kn,title:"Pickup Location",attrp:{class:"c2"}},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"PickupLoc Is Default",attrp:{class:"c2"}}]}],x=[{type:"add-row-table",frmGroup:"vehicleCatArr",title:"form",fields:[{type:"select",name:"vehicleID",title:"Vehicle Type",options:f,validate:"required"},{type:"text",name:"rates",title:"Rate/KM",cb:(T,S)=>{g("onRateChange")},validate:"required,number",value:0},{type:"text",name:"afterRates",title:"After Rate/KM",value:0,validate:"required,number"},{type:"text",name:"discount",title:"Discount In %",value:0,validate:"required,number"},{type:"checkbox",name:"isActive",title:"Is Active"}]}],C={formArr:y,formArr1:v,formArr2:x},D=async T=>{const S=await Ne({url:`/airport-return-location/${T}`,method:"get"});S?.status===!0&&sn(S.data,C,i,e)},E=async T=>{if(T?.preventDefault(),a)return;Xt(C,i,t,n)&&(await Ne({url:c?`/airport-return-location/${c}`:"/airport-return-location",data:i,method:c?"put":"post",showLoading:!0}))?.status==!0&&d(`/${o}-list`)};return M.useEffect(()=>{(async()=>{try{const S=i?.pickupLoc?.value,A=i?.pickupExtraLocArr?.map(j=>j?.pickupLoc?.value)||[];if(!S)return;const I=[S];if(A.forEach(j=>{j&&I.push(j)}),new Set(I).size!==I.length){n(j=>({...j,pickupLoc:"Duplicate pickup location found"}));return}const O=await Ne({url:"/airport-return-location/check-location",method:"post",data:{locations:I,editId:Number(c||0)||null}});O?.status===!1?(n(j=>({...j,pickupLoc:O?.msg||"Pickup location already exists"})),l(O?.msg)):(n(j=>({...j,pickupLoc:""})),l(null))}catch{l(null)}})()},[i?.pickupLoc,i?.pickupExtraLocArr]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:E,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f60",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:y,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsx("div",{className:"wrap-form f40",style:s=="edit"?{pointerEvents:"none",opacity:.6,userSelect:"none",cursor:"not-allowed"}:{},children:w.jsx(Le,{frmGroupName:"formArr1",frmArr:v,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})}),w.jsx("div",{className:"wrap-form f",children:w.jsx(Le,{frmGroupName:"formArr2",frmArr:x,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]})]})}function J9(){const i="/airport-return-location",e="airReturnLocID",t=[{type:"text",name:"airReturnLocID",title:"ID"},{type:"text",name:"pickupLoc",title:"Pickup Location",params:{align:"left"}}],n=[{title:"ID",name:"airReturnLocID",params:{align:"center",width:"1%"},pkId:!0},{title:"Pickup Location",name:"pickupLoc",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function eU(){const[e,t]=M.useState({}),[n,r]=M.useState({}),[s]=$t(),{modeType:o,modeName:a}=_t(),l=s.get("id"),c=Mt(),[d,f]=M.useState(null);M.useEffect(()=>{console.log(e)},[e]);const[m,p]=M.useState([]),g=async()=>{const S=await Ne({url:"/master/vehicle",method:"get"});return S?.status===!0?S?.data?.map(I=>({id:I?.vehicleID,value:I?.vehicleType})):[]},y=(S="")=>{try{t(A=>{if(!A.vehicleCatArr||!Array.isArray(A.vehicleCatArr))return console.warn("vehicleCatArr is not a valid array"),A;const I=Ke(A.kms),R=Ke(A.tollTax),O=Ke(A.nightAllowance),j=Ke(A.driverAllowance),B=A.vehicleCatArr.map(U=>{const F=Ke(U.rates);if(F===0)return{...U,isActive:!1,finalRate:"0",finalRateWithoutNightAllownace:"0",gstAmount:"0"};const H=F*I,L=H+j,W=L*(0/100),G=L+W+R,Y=H+O+j,ie=Y*(0/100),V=Y+ie+R;return{...U,finalRateWithoutNightAllownace:Fr(G).toString(),finalRate:Fr(V).toString(),gstAmount:Fr(ie).toString(),...S=="onRateChange"?{isActive:!!(Number(F)&&Number(F)>0)}:{}}});return{...A,vehicleCatArr:B}})}catch(A){console.error("Error calculating final rate:",A?.message),alert(`Error calculating final rate: ${A?.message}`)}};M.useEffect(()=>{(async()=>{const[A]=await Promise.all([g()]);if(p(A),o=="edit")E(l);else if(Jt(D,e,t),o=="add"){console.log("ste",m);const I=A?.map(R=>({vehicleID:R.id,rates:"0",afterRates:"0",discount:"0",gstAmount:"0",isActive:!1,finalRateWithoutNightAllownace:"0",finalRate:"0"}));t(R=>({...R,vehicleCatArr:I}))}})()},[l]);const v=[{name:"pickupLoc",type:"async-select",title:"Pickup Location",loadOptions:Lo,validate:"required",attrp:{class:"c2"}},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"PickupLoc Is Default",attrp:{class:"c2"}},{name:"dropLoc",type:"async-select",title:"Drop Airport Location",loadOptions:td,validate:"required",attrp:{class:"c2"}},{type:"checkbox",name:"dropLocIsDefaultShow",title:"Drop Airport Location Is Default",attrp:{class:"c2"}}
213,{type:"text",name:"kms",title:"Kms",validate:"required",attrp:{class:"c2"},cb:(S,A)=>{y()}},{type:"text",name:"tollTax",title:"Toll Tax",validate:"required",attrp:{class:"c2"},cb:(S,A)=>{y()}},{type:"text",name:"nightAllowance",title:"Night Allowance",validate:"required",info:"Applicable at night (11 PM to 5 AM).",value:"0",attrp:{class:"c2"},cb:(S,A)=>{y()}},{type:"text",name:"driverAllowance",title:"Driver Allowance",value:"0",validate:"required",attrp:{class:"c2"},cb:(S,A)=>{y()}}],x=[{type:"add-row-table",frmGroup:"pickupExtraLocArr",title:"form",fields:[{name:"pickupLoc",type:"async-select",loadOptions:Lo,title:"Pickup Location",attrp:{class:"c2"}},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"Pickup Location Is Default",attrp:{class:"c2"}}]}],C=[{type:"add-row-table",frmGroup:"vehicleCatArr",title:"form",fields:[{type:"select",name:"vehicleID",title:"Vehicle Type",options:m,validate:"required"},{type:"text",name:"rates",title:"Rate/KM",validate:"required,number",value:0,cb:(S,A)=>{y()}},{type:"text",name:"afterRates",title:"After Rate/KM",value:0,validate:"required,number"},{type:"text",name:"discount",title:"Discount In %",value:0,validate:"required,number"},{type:"checkbox",name:"isActive",title:"Is Active"},{type:"text",name:"gstAmount",title:"GST Value",value:0,validate:"required,number"},{type:"text",name:"finalRateWithoutNightAllownace",title:"Final Rate Without Night Allowance",value:0,validate:"required,number"},{type:"text",name:"finalRate",title:"Final Rate",value:0,validate:"required,number"}]}
213],D={formArr:v,formArr1:x,formArr2:C},E=async S=>{const A=await Ne({url:`/airport-drop-location/${S}`,method:"get"});A?.status===!0&&(sn(A.data,D,e,t),setTimeout(()=>{y()},70))},T=async S=>{if(S?.preventDefault(),d)return;Xt(D,e,n,r)&&(await Ne({url:l?`/airport-drop-location/${l}`:"/airport-drop-location",data:e,method:l?"put":"post",showLoading:!0}))?.status==!0&&c(`/${a}-list`)};return M.useEffect(()=>{(async()=>{try{const A=e?.pickupLoc?.value,I=e?.dropLoc?.value,R=e?.pickupExtraLocArr?.map(H=>H?.pickupLoc?.value)||[];if(!A||!I)return;const O=[{pickupLoc:A,dropLoc:I}];if(R.forEach(H=>{H&&O.push({pickupLoc:H,dropLoc:I})}),O.some(H=>H?.pickupLoc===H?.dropLoc)){r(H=>({...H,dropLoc:"Pickup and Drop cannot be same"}));return}const B=O.map(H=>H?.pickupLoc);if(new Set(B).size!==B.length){r(H=>({...H,dropLoc:"Duplicate pickup location found"}));return}const F=await Ne({url:"/airport-drop-location/check-location",method:"post",data:{locations:O,editId:Number(l||0)||null}});F?.status===!1?(r(H=>({...H,dropLoc:F?.msg||"Location already exists"})),f(F?.msg)):(r(H=>({...H,dropLoc:""})),f(null))}catch{f(null)}})()},[e?.pickupLoc,e?.dropLoc,e?.pickupExtraLocArr]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:T,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f60",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:v,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})})}),w.jsx("div",{className:"wrap-form f40",style:o=="edit"?{pointerEvents:"none",opacity:.6,userSelect:"none",cursor:"not-allowed"}:{},children:w.jsx(Le,{frmGroupName:"formArr1",frmArr:x,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})}),w.jsx("div",{className:"wrap-form f",children:w.jsx(Le,{frmGroupName:"formArr2",frmArr:C,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})})]})]})}function tU(){const i="/airport-drop-location",e="airportDropLocID",t=[{type:"text",name:"airportDropLocID",title:"ID",attr:{style:{width:"50px"}}},{type:"text",name:"pickupLoc",title:"Pickup Location",params:{align:"left"}},{type:"text",name:"dropLoc",title:"Drop Location",params:{align:"left"}}],n=[{title:"ID",name:"airportDropLocID",params:{align:"center",width:"1%"},pkId:!0},{title:"Pickup Location",name:"pickupLoc",params:{align:"left"}},{title:"Drop Location",name:"dropLoc",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function nU(){const[e,t]=M.useState({}),[n,r]=M.useState({}),[s]=$t(),{modeType:o,modeName:a}=_t(),l=s.get("id"),[c,d]=M.useState(null),f=Mt();M.useEffect(()=>{console.log(e)},[e]);const[m,p]=M.useState([]),g=async()=>{const S=await Ne({url:"/master/vehicle",method:"get"});return S?.status===!0?S?.data?.map(I=>({id:I?.vehicleID,value:I?.vehicleType})):[]},y=(S="")=>{try{t(A=>{if(!A.vehicleCatArr||!Array.isArray(A.vehicleCatArr))return console.warn("vehicleCatArr is not a valid array"),A;const I=Ke(A.kms),R=Ke(A.tollTax),O=Ke(A.nightAllowance),j=Ke(A.driverAllowance),B=A.vehicleCatArr.map(U=>{const F=Ke(U.rates);if(F===0)return{...U,isActive:!1,finalRate:"0",finalRateWithoutNightAllownace:"0",gstAmount:"0"};const H=F*I,L=H+j,W=L*(0/100),G=L+W+R,Y=H+O+j,ie=Y*(0/100),V=Y+ie+R;return{...U,finalRateWithoutNightAllownace:Fr(G).toString(),finalRate:Fr(V).toString(),gstAmount:Fr(ie).toString(),...S=="onRateChange"?{isActive:!!(Number(F)&&Number(F)>0)}:{}}});return{...A,vehicleCatArr:B}})}catch(A){console.error("Error calculating final rate:",A?.message),alert(`Error calculating final rate: ${A?.message}`)}};M.useEffect(()=>{(async()=>{const[A]=await Promise.all([g()]);if(p(A),o=="edit")E(l);else if(Jt(D,e,t),o=="add"){console.log("ste",m);const I=A?.map(R=>({vehicleID:R.id,rates:"0",afterRates:"0",discount:"0",gstAmount:"0",isActive:!1,finalRateWithoutNightAllownace:"0",finalRate:"0"}));t(R=>({...R,vehicleCatArr:I}))}})()},[l]);const v=[{name:"pickupLoc",type:"async-select",title:"Airport Pickup Location",loadOptions:td,validate:"required",attrp:{class:"c2"}},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"Airport PickupLoc Is Default",attrp:{class:"c2"}},{name:"dropLoc",type:"async-select",loadOptions:Lo,title:"Drop Location",validate:"required",attrp:{class:"c2"}},{type:"checkbox",name:"dropLocIsDefaultShow",title:"Drop Location Is Default",attrp:{class:"c2"}}
213,{type:"text",name:"kms",title:"Kms",validate:"required",attrp:{class:"c2"},cb:(S,A)=>{y()}},{type:"text",name:"tollTax",title:"Toll Tax",validate:"required",attrp:{class:"c2"},cb:(S,A)=>{y()}},{type:"text",name:"nightAllowance",title:"Night Allowance",validate:"required",info:"Applicable at night (11 PM to 5 AM).",value:"0",attrp:{class:"c2"},cb:(S,A)=>{y()}},{type:"text",name:"driverAllowance",title:"Driver Allowance",value:"0",validate:"required",attrp:{class:"c2"},cb:(S,A)=>{y()}}],x=[{type:"add-row-table",frmGroup:"dropExtraLocArr",title:"form",fields:[{name:"dropLoc",type:"async-select",loadOptions:Lo,title:"Drop Location",attrp:{class:"c2"}},{type:"checkbox",name:"dropLocIsDefaultShow",title:"Drop Location Is Default",attrp:{class:"c2"}}]}],C=[{type:"add-row-table",frmGroup:"vehicleCatArr",title:"form",fields:[{type:"select",name:"vehicleID",title:"Vehicle Type",options:m,validate:"required"},{type:"text",name:"rates",title:"Rate/KM",validate:"required,number",value:0,cb:(S,A)=>{y("onRateChange")}},{type:"text",name:"afterRates",title:"After Rate/KM",value:0,validate:"required,number"},{type:"text",name:"discount",title:"Discount In %",value:0,validate:"required,number"},{type:"checkbox",name:"isActive",title:"Is Active"},{type:"text",name:"gstAmount",title:"GST Value",value:0,validate:"required,number"},{type:"text",name:"finalRateWithoutNightAllownace",title:"Final Rate Without Night Allowance",value:0,validate:"required,number"},{type:"text",name:"finalRate",title:"Final Rate",value:0,validate:"required,number"}]}
213],D={formArr:v,formArr1:x,formArr2:C},E=async S=>{const A=await Ne({url:`/airport-pickup-location/${S}`,method:"get"});A?.status===!0&&(sn(A.data,D,e,t),setTimeout(()=>{y()},70))},T=async S=>{if(S?.preventDefault(),c)return;Xt(D,e,n,r)&&(await Ne({url:l?`/airport-pickup-location/${l}`:"/airport-pickup-location",data:e,method:l?"put":"post",showLoading:!0}))?.status==!0&&f(`/${a}-list`)};return M.useEffect(()=>{(async()=>{try{const A=e?.pickupLoc?.value,I=e?.dropLoc?.value,R=e?.pickupExtraLocArr?.map(H=>H?.pickupLoc?.value)||[],O=e?.dropExtraLocArr?.map(H=>H?.dropLoc?.value)||[];if(!A||!I)return;const j=[];if(j.push({pickupLoc:A,dropLoc:I}),R.forEach(H=>{H&&j.push({pickupLoc:H,dropLoc:I})}),O.forEach(H=>{H&&j.push({pickupLoc:A,dropLoc:H})}),R.forEach(H=>{O.forEach(L=>{H&&L&&j.push({pickupLoc:H,dropLoc:L})})}),j.some(H=>H?.pickupLoc===H?.dropLoc)){r(H=>({...H,dropLoc:"Pickup and Drop cannot be same"}));return}if(new Set(j.map(H=>`${H.pickupLoc}-${H.dropLoc}`)).size!==j.length){r(H=>({...H,dropLoc:"Duplicate route found"}));return}const F=await Ne({url:"/airport-pickup-location/check-location",method:"post",data:{locations:j,editId:l||null}});F?.status===!1?(r(H=>({...H,dropLoc:F?.msg||"Location already exists"})),d(F?.msg)):(r(H=>({...H,dropLoc:""})),d(null))}catch{d(null)}})()},[e?.pickupLoc,e?.dropLoc,e?.pickupExtraLocArr,e?.dropExtraLocArr]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:T,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f60",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:v,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})})}),w.jsx("div",{className:"wrap-form f40",style:o=="edit"?{pointerEvents:"none",opacity:.6,userSelect:"none",cursor:"not-allowed"}:{},children:w.jsx(Le,{frmGroupName:"formArr1",frmArr:x,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})}),w.jsx("div",{className:"wrap-form f",children:w.jsx(Le,{frmGroupName:"formArr2",frmArr:C,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})})]})]})}function iU(){const i="/airport-pickup-location",e="airportPickupLocID",t=[{type:"text",name:"airportPickupLocID",title:"ID",attr:{style:{width:"50px"}}},{type:"text",name:"pickupLoc",title:"Pickup Location",params:{align:"left"}},{type:"text",name:"dropLoc",title:"Drop Location",params:{align:"left"}}],n=[{title:"ID",name:"airportPickupLocID",params:{align:"center",width:"1%"},pkId:!0},{title:"Pickup Location",name:"pickupLoc",params:{align:"left"}},{title:"Drop Location",name:"dropLoc",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function rU(){const[e,t]=M.useState({}),[n,r]=M.useState({}),[s,o]=M.useState([]),[a,l]=M.useState([]),[c,d]=M.useState(null),[f,m]=M.useState(null),[p]=$t(),{modeType:g,modeName:y}=_t(),v=p.get("id"),x=Mt(),C=async()=>{const O=await Ne({url:"/master/vehicle",method:"get"});return O?.status?O.data.map(j=>({id:j.vehicleID,value:j.vehicleType})):[]},D=async()=>{const O=await Ne({url:"/master/local-package-type",method:"get"});return O?.status?O.data.map(j=>({localPackageTypeID:j.localPackageTypeID,hrs:j.hrs,kms:j.kms,packageTypeName:j.packageTypeName})):[]},E=(O,j="")=>{const B="vehicleCatArr_"+O;t(U=>{const F=U[B];if(!Array.isArray(F))return U;const H=F.map(L=>{const W=Ke(L.rates),G=Ke(L.kms);if(!W)return{...L,isActive:!1,gstAmount:"0",finalRate:"0"};const Y=W*G,ie=Y*(0/100),V=Y+ie;return{...L,gstAmount:Fr(ie).toString(),finalRate:Fr(V).toString(),...j=="onRateChange"?{isActive:!!(Number(W)&&Number(W)>0)}:{}}});return{...U,[B]:H}})};M.useEffect(()=>{(async()=>{const[j,B]=await Promise.all([C(),D()]);o(j),l(B),Jt(I,e,t);const U={};if(B.forEach(F=>{const H="vehicleCatArr_"+F.localPackageTypeID;U[H]=j.map(L=>({localPackageTypeID:F.localPackageTypeID,kms:F.kms,vehicleID:L.id,rates:"0",afterRates:"0",afterHours:"0",discount:"0",gstAmount:"0",finalRate:"0",isActive:!1}))}),t(F=>({...F,...U})),g==="edit"&&v){const F=await Ne({url:`/localtrip-location/${v}`,method:"get"});F?.status&&d(F.data)}})()},[v]),M.useEffect(()=>{c&&t(O=>{const j={...O};return j.pickupLoc=c.pickupLoc,j.pickupLocIsDefaultShow=c.pickupLocIsDefaultShow,j.pickupExtraLocArr=c.pickupExtraLocArr||[],Object.keys(c).forEac
213h(B=>{B.startsWith("vehicleCatArr_")&&(j[B]=c[B])}),j})},[c]);const T=[{name:"pickupLoc",type:"async-select",title:"Pickup Location",loadOptions:Lo,validate:"required",attrp:{class:"c2"}},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"Pickup Location Is Default",attrp:{class:"c2"}}],S=[{type:"add-row-table",frmGroup:"pickupExtraLocArr",title:"Extra Pickup Locations",fields:[{name:"pickupLoc",type:"async-select",loadOptions:Lo,title:"Pickup Location",attrp:{class:"c2"}},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"Is Default",attrp:{class:"c2"}}]}],A=(O,j)=>[{type:"add-row-table",frmGroup:"vehicleCatArr_"+O,title:"Vehicle Pricing",fields:[{type:"ac-hidden",name:"localPackageTypeID",title:"localPackageTypeID",value:O,disabled:!0},{type:"ac-hidden",name:"kms",title:"kms",value:j,disabled:!0},{type:"select",name:"vehicleID",title:"Vehicle",options:s,validate:"required"},{type:"text",name:"rates",title:"Rate / KM",validate:"required,number",value:0,cb:()=>E(O,"onRateChange")},{type:"text",name:"afterRates",title:"After Rate / KM",value:0,validate:"number"},{type:"text",name:"afterHours",title:"After Hours",value:0,validate:"number"},{type:"text",name:"discount",title:"Discount %",value:0,validate:"number",cb:()=>E(O)},{type:"checkbox",name:"isActive",title:"Is Active"},{type:"text",name:"gstAmount",title:"GST",disabled:!0,value:0},{type:"text",name:"finalRate",title:"Final Rate",disabled:!0,value:0}]}],I={formArr:T,formArr1:S},R=async O=>{if(O.preventDefault(),f||!Xt(I,e,n,r))return;(await Ne({url:v?`/localtrip-location/${v}`:"/localtrip-location",method:v?"put":"post",data:e,showLoading:!0}))?.status&&x(`/${y}-list`)};return M.useEffect(()=>{(async()=>{try{const j=e?.pickupLoc?.value,B=e?.pickupExtraLocArr?.map(L=>L?.pickupLoc?.value)||[];if(!j)return;const U=[j];if(B.forEach(L=>{L&&U.push(L)}),new Set(U).size!==U.length){r(L=>({...L,pickupLoc:"Duplicate pickup location found"}));return}const H=await Ne({url:"/localtrip-location/check-location",method:"post",data:{locations:U,editId:Number(v||0)||null}});H?.status===!1?(r(L=>({...L,pickupLoc:H?.msg||"Pickup location already exists"})),m(H?.msg)):(r(L=>({...L,pickupLoc:""})),m(null))}catch{m(null)}})()},[e?.pickupLoc,e?.pickupExtraLocArr]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:R,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f60",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:T,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})})}),w.jsx("div",{className:"wrap-form f40",style:g=="edit"?{pointerEvents:"none",opacity:.6,userSelect:"none",cursor:"not-allowed"}:{},children:w.jsx(Le,{frmGroupName:"formArr1",frmArr:S,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})}),a.map(O=>w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:O.packageTypeName}),w.jsx(Le,{frmGroupName:"vehicleCatArr_"+O.localPackageTypeID,frmArr:A(O.localPackageTypeID,O.kms),formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})]},O.localPackageTypeID))]})]})}function sU(){const i="/localtrip-location",e="localTripLocID",t=[{type:"text",name:"localTripLocID",title:"ID",attr:{style:{width:"50px"}}},{type:"text",name:"pickupLoc",title:"Pickup Location",params:{align:"left"}}],n=[{title:"ID",name:"localTripLocID",params:{align:"center",width:"1%"},pkId:!0},{title:"Pickup Location",name:"pickupLoc",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function oU(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{console.log(i)},[i]);const[c,d]=M.useState([]),f=async()=>{const C=await Ne({url:"/master/vehicle",method:"get"});return C?.status===!0?C?.data?.map(E=>
213({id:E?.vehicleID,value:E?.vehicleType})):[]};M.useEffect(()=>{(async()=>{const[D]=await Promise.all([f()]);if(d(D),s=="edit")v(a);else if(Jt(y,i,e),s=="add"){console.log("ste",c);const E=D?.map(T=>({vehicleID:T.id,rates:"0",afterRates:"0",discount:"0",gstAmount:"0",isActive:!1,finalRate:"0"}));e(T=>({...T,vehicleCatArr:E}))}})()},[a]);const m=[{name:"pickupLoc",type:"async-select",title:"Airport Pickup Location",loadOptions:td,validate:"required",attrp:{class:"c2"}},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"PickupLoc Is Default",attrp:{class:"c2"}},{type:"text",name:"tollTax",title:"Toll Tax",validate:"required",attrp:{class:"c2"}},{type:"text",name:"nightAllowance",title:"Night Allowance",validate:"required",info:"Applicable at night (11 PM to 5 AM).",value:"0",attrp:{class:"c2"}},{type:"text",name:"driverAllowance",title:"Driver Allowance",value:"0",validate:"required",attrp:{class:"c2"}}],p=[{type:"add-row-table",frmGroup:"pickupExtraLocArr",title:"form",fields:[{name:"pickupLoc",type:"async-select",title:"Airport Pickup Location",loadOptions:td,attrp:{class:"c2"}},{type:"checkbox",name:"pickupLocIsDefaultShow",title:"PickupLoc Is Default",attrp:{class:"c2"}}]}],g=[{type:"add-row-table",frmGroup:"vehicleCatArr",title:"form",fields:[{type:"select",name:"vehicleID",title:"Vehicle Type",options:c,validate:"required"},{type:"text",name:"rates",title:"Rate/KM",validate:"required,number",value:0},{type:"text",name:"afterRates",title:"After Rate/KM",value:0,validate:"required,number"},{type:"text",name:"discount",title:"Discount In %",value:0,validate:"required,number"},{type:"checkbox",name:"isActive",title:"Is Active"}]}],y={formArr:m,formArr1:p,formArr2:g},v=async C=>{const D=await Ne({url:`/airport-pickup-static-location/${C}`,method:"get"});D?.status===!0&&sn(D.data,y,i,e)},x=async C=>{C?.preventDefault(),Xt(y,i,t,n)&&(await Ne({url:a?`/airport-pickup-static-location/${a}`:"/airport-pickup-static-location",data:i,method:a?"put":"post",showLoading:!0}))?.status==!0&&l(`/${o}-list`)};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:x,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f60",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:m,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsx("div",{className:"wrap-form f40",style:s=="edit"?{pointerEvents:"none",opacity:.6,userSelect:"none",cursor:"not-allowed"}:{},children:w.jsx(Le,{frmGroupName:"formArr1",frmArr:p,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})}),w.jsx("div",{className:"wrap-form f",children:w.jsx(Le,{frmGroupName:"formArr2",frmArr:g,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]})]})}function aU(){const i="/airport-pickup-static-location",e="airPickupstaticLocID",t=[{type:"text",name:"airPickupstaticLocID",title:"ID"},{type:"text",name:"pickupLoc",title:"Pickup Location",params:{align:"left"}}],n=[{title:"ID",name:"airPickupstaticLocID",params:{align:"center",width:"1%"},pkId:!0},{title:"Pickup Location",name:"pickupLoc",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function lU(){const i="/location-master",e="locationMasterID",t=[{type:"text",name:"locationMasterID",title:"ID",attr:{style:{width:"50px"}}},{type:"text",name:"location",title:"Location Name",params:{align:"left"}},{type:"select",name:"locIsDefaultShow",options:[{id:1,value:"Yes"},{id:0,value:"No"}],title:"Is Default Show",attr:{style:{width:"160px"}}}],n=[{title:"ID",name:"locationMasterID",params:{align:"center",width:"1%"},pkId:!0},{title:"Location Name",name:"location",params:{align:"left"}},{title:"Is Default Location",name:"locIsDefaultShow",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function cU(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{(async()=>s=="edit"?m(a):Jt(f,i,e))()},[a]);const c=[{name:"location",type:"text",title:"Location Name",validate:"required",attrp:{class:"c2"}},{type:"checkbox",name:"locIsDefaultShow",title:"Is Default Show",attrp:{class:"c2"}}],d=[{type:"add-row-table",frmGroup:"extraLocArr",title:"form",f
213ields:[{name:"location",type:"text",title:"Location Name",attrp:{class:"c2"}},{type:"checkbox",name:"locIsDefaultShow",title:"Is Default Show"}]}],f={formArr:c,formArr1:d},m=async g=>{const y=await Ne({url:`/location-master/${g}`,method:"get"});y?.status===!0&&sn(y.data,f,i,e)},p=async g=>{if(g?.preventDefault(),Xt(f,i,t,n)){const v=await Ne({url:a?`/location-master/${a}`:"/location-master",data:i,method:a?"put":"post"});alert(v?.msg),v?.status==!0&&l(`/${o}-list`)}};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:p,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f50",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:c,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsx("div",{className:"wrap-form f50",style:s=="edit"?{pointerEvents:"none",opacity:.6,userSelect:"none",cursor:"not-allowed"}:{},children:w.jsx(Le,{frmGroupName:"formArr1",frmArr:d,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]})]})}function uU(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{(async()=>s=="edit"?m(a):Jt(f,i,e))()},[a]);const c=[{name:"location",type:"text",title:"Airport Name",validate:"required",attrp:{class:"c2"}},{type:"checkbox",name:"locIsDefaultShow",title:"Is Default Show",attrp:{class:"c2"}}],d=[{type:"add-row-table",frmGroup:"extraLocArr",title:"form",fields:[{name:"location",type:"text",title:"Airport Name",attrp:{class:"c2"}},{type:"checkbox",name:"locIsDefaultShow",title:"Is Default Show"}]}],f={formArr:c,formArr1:d},m=async g=>{const y=await Ne({url:`/airport-location-master/${g}`,method:"get"});y?.status===!0&&sn(y.data,f,i,e)},p=async g=>{g?.preventDefault(),Xt(f,i,t,n)&&(await Ne({url:a?`/airport-location-master/${a}`:"/airport-location-master",data:i,method:a?"put":"post",showLoading:!0}))?.status==!0&&l(`/${o}-list`)};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:p,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f50",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:c,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsx("div",{className:"wrap-form f50",style:s=="edit"?{pointerEvents:"none",opacity:.6,userSelect:"none",cursor:"not-allowed"}:{},children:w.jsx(Le,{frmGroupName:"formArr1",frmArr:d,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]})]})}function dU(){const i="/airport-location-master",e="airportLocationMasterID",t=[{type:"text",name:"airportLocationMasterID",title:"ID",attr:{style:{width:"50px"}}},{type:"text",name:"location",title:"Location Name",params:{align:"left"}},{type:"select",name:"locIsDefaultShow",options:[{id:1,value:"Yes"},{id:0,value:"No"}],title:"Is Default Show",attr:{style:{width:"160px"}}}],n=[{title:"ID",name:"airportLocationMasterID",params:{align:"center",width:"1%"},pkId:!0},{title:"Location Name",name:"location",params:{align:"left"}},{title:"Is Default Location",name:"locIsDefaultShow",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function kd(i,e,t){const n=i?.rowData??{};return w.jsxs("span",{children:[n?.vehicleType," - ",n?.vehicleName??"N.A"]})}function Sd(i,e,t){const n=i?.rowData??{};return w.jsx("span",{className:`badge badge-${n?.bookingStatus??""}`,children:n?.bookingStatus??"N.A"})}function Pd(i,e,t){const n=i?.rowData??{};return w.jsx("span",{className:"badge badge-outline",children:n?.tripTypeCode??"N.A"})}function Id(i,e,t){const n=i?.rowData??{};return w.jsx("span",{className:`badge badge-${n?.bookingType}-booking`,children:n?.bookingType??"N.A"})}const JNe=["pending","upcoming","assigned","ongoing","completed","cancelled","failed"],hQ=JNe.map(i=>({id:i,value:i})),eBe=["manual","online"],om=eBe.map(i=>({id:i,value:i})),Rd=async()=>{const i=await Ne({url:"/master/vehicle",method:"get"});return i?.status===!0?i?.data?.map(t=>({id:t?.vehicleID,value:t?.vehicleType})):[]},Fd=async()=>{const i=await Ne({url:"/master/trip-type",method:"get"});return i?.status===!0?i?.data?.map(t=>({id:t?.tripTypeID,value:t?.code})):[]};function tBe(){const i="/booking",e="bookingID",[t,n]=M.useState([]),[r,s]=M.useState([]);M.useEffect(()=>{(async()=>{const[c,d]=await Promise.all([Rd(),Fd()]);n(c),s(d)})()},[]);const o=[{type:"text",name:"bookingID",title:"ID",attr:{style:{width:"100px"}}},{type:"text",name:"bookingNo",title:"Booking ID"},{type:"text",name:"fullName",title:"Customer Name"},{type:"text",name:"mobile",title:"Contact Or Alternate"},{type:"select",name:"tripTypeID",options:r,title:"Trip Type",attr:{style:{width:"150px"}}},{type:"select",name:"vehicleID",options:t,title:"Vehicle",attr:{style:{width:"150px"}}},{type:"select",name:"bookingStatus",options:hQ,title:"Booking Status",attr:{style:{width:"150px"}}}],a=[{title:"ID",name:"bookingID",params:{align:"center",width:"1%"},pkId:!0},{title:"Booking ID",name:"bookingNo",params:{align:"left"}}
213,{title:"Booking Type",name:"bookingType",component:Id,params:{align:"left"}},{title:"Trip Type",name:"tripTypeCode",component:Pd,params:{align:"left"}},{title:"Booking Status",name:"bookingStatus",component:Sd,params:{align:"center"}},{title:"Booking Date",name:"bookingCreatedDate",params:{align:"left"}},{title:"Customer Name",name:"fullName",params:{align:"left"}},{title:"Contact",name:"mobile",params:{align:"left"}},{title:"Pickup Location",name:"pickupLocation",params:{align:"left"}},{title:"Drop Location / Package",name:"dropLocation",params:{align:"left"}},{title:"Pickup Date",name:"pickupDate",params:{align:"left"}},{title:"Pickup Time",name:"pickupTime",params:{align:"left"}},{title:"Return Date",name:"returnDate",params:{align:"left"}},{title:"Vehicle Name",name:"vehicleName",component:kd,params:{align:"left"}},{title:"Base Fare Price",name:"baseFarePrice",params:{align:"left"}},{title:"GST AMT.",name:"gstAmount",params:{align:"left"}},{title:"Final Amt.",name:"finalAmount",params:{align:"left"}},{title:"Paid Amt.",name:"paidAmount",params:{align:"left"}},{title:"Remaining Amt.",name:"remainingAmount",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:o}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:a,editId:e,tblCls:"xsmall",apiUrl:i})})]})]})}function vc(){const i="ONEWAY",[t,n]=M.useState({}),[r,s]=M.useState({}),[o]=$t(),[a,l]=M.useState([]),[c,d]=M.useState([]),[f,m]=M.useState([]),[p,g]=M.useState([]),[y,v]=M.useState([]),[x,C]=M.useState([]),D=M.useRef([]),[E,T]=M.useState({inclusion:[],exclusion:[]}),{modeType:S}=_t(),A=o.get("id"),I=Mt(),R=jl(),O=(Re="No Message....")=>new Promise(N=>{R(fw({type:"confirm",message:Re,onConfirm:()=>{R(Ac()),N(!0)},onCancel:()=>{R(Ac()),N(!1)}}))}),j=(Re="No Message....")=>{R(fw({type:"alert",message:Re}))},B=(Re=[],N)=>Re.map(te=>{let ne=te.label||"";
213return Object.entries(N).forEach(([Z,Q])=>{ne=ne.replace(new RegExp(`{{\\s*${Z}\\s*}}`,"gi"),Q??"")}),ne}).join(`
214`),U=Re=>{try{return Re?typeof Re=="object"?Re:JSON.parse(Re):null}catch{return null}},F=(Re=[])=>Re.map(N=>N.label).join(`
215`);M.useEffect(()=>{(async()=>S=="edit"?H(A):Jt(ye,t,n))()},[A]);const H=async Re=>{const N=await Ne({url:`/booking/${Re}`,method:"get"});if(N?.status===!0){const te=N.data,ne=U(te?.inclusionInfo),Z=U(te?.exclusionInfo);n({...te,inclusionInfo:ne?.inclusion?F(ne.inclusion):"",exclusionInfo:Z?.exclusion?F(Z.exclusion):""}),C(te.serviceChargesInfo),D.current=te.serviceChargesInfo}},L=async()=>{const Re=await Ne({url:"/master/trip-type",method:"get"});if(l([]),Re?.status===!0){g(Re?.data);const N=Re?.data?.map(te=>({id:te?.code,value:te?.code}));l(N),S=="add"&&ie(i)}},W=async()=>{const Re=await Ne({url:"/master/get-service-charges",method:"get"});v([]),Re?.status===!0&&v(Re?.data)},G=M.useMemo(()=>{const Re=new Set(y?.map(te=>te.serviceChargesID)),N=x?.filter(te=>!Re.has(te.serviceChargesID));return[...y||[],...N||[]]},[y,x]),Y=Re=>{C(N=>{const ne=N.some(Z=>Z.serviceChargesID===Re.serviceChargesID)?N.filter(Z=>Z.serviceChargesID!==Re.serviceChargesID):[...N,Re];return D.current=ne,Pe(),ne})},ie=async Re=>{try{const N=await Ne({url:`/master/trip-type/${Re}`,method:"get"});if(N?.status===!0){const te=N.data,ne=U(te?.inclusionInfo),Z=U(te?.exclusionInfo);T({inclusion:ne||[],exclusion:Z||[]})}else T({inclusion:[],exclusion:[]})}catch{T({inclusion:[],exclusion:[]})}},V=async()=>{const Re=await Ne({url:"/master/vehicle",method:"get"});if(d([]),Re?.status===!0){const N=Re?.data?.map(te=>({id:te?.vehicleID,value:te?.vehicleType}));d(N)}},q=async()=>{const Re=await Ne({url:"/master/local-package-type",method:"get"});if(m([]),Re?.status===!0){const N=Re?.data?.map(te=>({id:te?.localPackageTypeID,value:te?.packageTypeName,kms:te?.kms,hrs:te?.hrs}));m(N)}};M.useEffect(()=>{W(),L(),V(),q()},[]);const $=Re=>({afterRates:Re?.match(/Rs\.?\s*([\d.]+)\s*\/\s*km/i)?.[1]??null,afterHours:Re?.match(/Rs\.?\s*([\d.]+)\s*\/\s*hr/i)?.[1]??null});M.useEffect(()=>{if(!E?.inclusion?.length&&!E?.exclusion?.length)return;const Re=$(t?.exclusionInfo||""),N={kms:Ke(t?.distanceKms??0),hrs:Ke(t?.totalHrs??0),gstPercentage:Ke(t?.gstPercentage??"0"),afterRates:Re.afterRates??Ke(0),afterHours:Re.afterHours??Ke(0)};n(te=>({...te,inclusionInfo:B(E.inclusion,N),exclusionInfo:B(E.exclusion,N)}))},[E,t?.distanceKms,t?.totalHrs,t?.gstPercentage]);const J=M.useMemo(()=>{const Re=t?.tripType||"ONEWAY",N=[{type:"select",name:"bookingType",title:"BookingType",validate:"required",value:"manual",options:[{id:"manual",value:"manual"},{id:"online",value:"online"}],disabled:!0},{type:"select",name:"tripType",title:"Trip Type",validate:"required",value:i,options:a,cb:(te,ne)=>{n(Z=>({...Z,pickupLocation:"",dropLocation:"",extraLoc:[],localPackageTypeID:"",totalHrs:"",inclustionInfo:"",exclustionInfo:""})),te?.target?.value&&ie(te?.target?.value)}}];return Re==="ONEWAY"&&(N.push({type:"async-select",name:"pickupLocation",title:"Pickup Location",loadOptions:te=>Kn(te,{allowCustomValue:!0}),validate:"required",attrp:{class:"c1"}}),N.push({type:"async-select",name:"dropLocation",title:"Drop Location",loadOptions:te=>Kn(te,{allowCustomValue:!0}),validate:"required",attrp:{class:"c1"}})),Re==="ROUNDTRIP"&&(N.push({type:"async-select",name:"pickupLocation",title:"Pickup Location",loadOptions:te=>Kn(te,{allowCustomValue:!0}),validate:"required",attrp:{class:"c2"}}),N.push({type:"async-select",name:"dropLocation",title:"To Location",loadOptions:te=>Kn(te,{allowCustomValue:!0}),validate:"required",attrp:{class:"c2"}}),N.push({type:"add-row-table",frmGroup:"extraLoc",title:"form",attrp:{style:{padding:"0px 10px 0px 0px"}},fields:[{type:"async-select",name:"label",title:"Extra Location",loadOptions:te=>Kn(te,{allowCustomValue:!0})}]})),Re==="LOCALTRIP"&&(N.push({type:"async-select",name:"pickupLocation",title:"Pickup Location",loadOptions:te=>Kn(te,{allowCustomValue:!0}),validate:"required",attrp:{class:"c2"}}),N.push({type:"select",name:"localPackageTypeID",title:"Local Trip Package",validate:"required",attrp:{class:"c2"},options:f,cb:te=>{const ne=f?.find(Z=>Z.id===Number(te?.target?.value))??null;ne&&(n(Z=>({...Z,distanceKms:ne?.kms?.toString(),totalHrs:ne?.hrs?.toString()})),setTimeout(()=>{Pe()},200))}})),Re==="AIRPORTPICKUP"&&(N.push({type:"async-select",name:"pickupLocation",title:"Airport Pickup",loadOptions:te=>td(te,{allowCustomValue:!0}),validate:"required",attrp:{class:"c2"}}),N.push({type:"async-select",name:"dropLocation",title:"To Location",loadOptions:te=>Kn(te,{allowCustomValue:!0}),validate:"required",attrp:{class:"c2"}})),Re==="AIRPORTDROP"&&(N.push({type:"async-select",name:"pickupLocation",title:"Pickup Location",loadOptions:te=>Kn(te,{allowCustomValue:!0}),validate:"required",attrp:{class:"c2"}}),N.push({type:"async-select",name:"dropLocation",title:"Drop Airport",loadOptions:te=>td(te,{allowCustomValue:!0}),validate:"required",attrp:{class:"c2"}})),Re==="AIRPORTRETURN"&&(N.push({type:"async-select",name:"pickupLocation",title:"Pickup Location",loadOptions:te=>Kn(te,{allowCustomValue:!0}),validate:"required",attrp:{class:"c2"}}),N.push({type:"async-select",name:"dropLocation",title:"Airport",loadOptions:te=>td(te,{allowCustomValue:!0}),validate:"required",attrp:{class:"c2"}}
215)),N.push({type:"textarea",name:"inclusionInfo",title:"inclusion",attrp:{class:"c1"}},{type:"textarea",name:"exclusionInfo",title:"exclusion",attrp:{class:"c1"}}),N},[t?.tripType,a,f]),ce=M.useMemo(()=>{const Re=t?.hasGST||!1,N=[{type:"text",name:"fullName",title:"Full Name",validate:"required",attrp:{class:"c2"}},{type:"text",name:"mobile",title:"Contact Number",validate:"required",attrp:{class:"c2"}},{type:"text",name:"email",title:"Email",validate:"required",attrp:{class:"c2"}},{type:"text",name:"alternateMobile",title:"Alternate Contact Number",attrp:{class:"c2"}},{type:"select",name:"gender",title:"Select Gender",validate:"required",attrp:{class:"c2"},options:[{id:"male",value:"Male"},{id:"female",value:"Female"}]},{type:"checkbox",name:"hasGST",title:"IS GST",attrp:{class:"c2"},cb:(te,ne)=>{te.target.checked||n(Z=>({...Z,companyName:"",gstNumber:""}))}}];return Re&&(N.push({type:"text",name:"companyName",title:"Company Name",validate:"required",attrp:{class:"c2"}}),N.push({type:"text",name:"gstNumber",validate:"required",title:"GST Number",attrp:{class:"c2"}})),N.push({type:"textarea",name:"pickupAddress",title:"Pickup Address",attrp:{class:"c1"}}),N.push({type:"textarea",name:"dropAddress",title:"Drop Address",attrp:{class:"c1"}}),N},[t?.hasGST]),se=M.useMemo(()=>{const Re=t?.tripType||"ONEWAY",N=[{type:"select",name:"vehicleID",title:"Vehicle Category",validate:"required",attrp:{class:"c3"},options:c},{type:"text",name:"distanceKms",title:"Distance (KMs)",validate:"required",value:"0",attrp:{class:"c3"},cb:(te,ne)=>{Pe()}}];return Re==="LOCALTRIP"&&N.push({type:"text",name:"totalHrs",title:"Hours",info:"Only Use For Localtrip",validate:"required",value:"0",attrp:{class:"c3"}}),N.push({type:"date",name:"pickupDate",title:"Pickup Date",validate:"required",attrp:{class:"c3"}},{type:"time",name:"pickupTime",title:"Pickup Time",validate:"required",value:"0",attrp:{class:"c3"}}),Re==="ROUNDTRIP"&&N.push({type:"date",name:"returnDate",title:"Return Date",validate:"required",info:"Only Use for Roundtrip",attrp:{class:"c3"}}),N.push({type:"text",name:"ratePerKm",title:"Rate per KM (Rate)",validate:"required",value:"0",attrp:{class:"c3"},cb:(te,ne)=>{Pe()}},{type:"text",name:"surgeCharges",title:"Surge Charges",validate:"required",value:"0",attrp:{class:"c3"},cb:(te,ne)=>{Pe()}},{type:"text",name:"baseFarePrice",title:"Base Fare (Km*Rate)+Surge",validate:"required",value:"0",attrp:{class:"c3",readOnly:!0}},{type:"text",name:"nightAllowance",title:"Night Allowance",validate:"required",value:"0",attrp:{class:"c3"},cb:(te,ne)=>{Pe()}},{type:"text",name:"driverAllowance",title:"Driver Allowance",validate:"required",value:"0",attrp:{class:"c3"},cb:(te,ne)=>{Pe()}}),S==="edit"&&N.push({type:"text",name:"extraKms",title:"Extra Distance (KMs)",validate:"required",value:"0",attrp:{class:"c2"},cb:(te,ne)=>{Pe()}},{type:"text",name:"ratePerExtraKm",title:"After Rate/KMs",validate:"required",value:"0",attrp:{class:"c2"},cb:(te,ne)=>{Pe()}},{type:"text",name:"extraKmCharge",title:"Extra Distance Charge1",validate:"required",value:"0",attrp:{class:"c1",readOnly:!0},cb:(te,ne)=>{Pe()}},{type:"text",name:"extraHours",title:"Extra Hours",validate:"required",value:"0",attrp:{class:"c2"},cb:(te,ne)=>{Pe()}},{type:"text",name:"ratePerExtraHour",title:"Rate per Extra Hour",validate:"required",value:"0",attrp:{class:"c2"},cb:(te,ne)=>{Pe()}},{type:"text",name:"extraHourCharge",title:"Extra Hour Charge",validate:"required",value:"0",attrp:{class:"c1",readOnly:!0},cb:(te,ne)=>{Pe()}}),N.push({type:"text",name:"serviceCharges",title:"Service Charges",validate:"required",value:"0",attrp:{class:"c3",readOnly:!0}}),N.push({type:"text",name:"subTotal",title:"Sub Total",validate:"required",value:"0",attrp:{class:"c3"},cb:(te,ne)=>{Pe()}},{type:"text",name:"gstPercentage",title:"GST Percentage",validate:"required",value:"0",attrp:{class:"c3"},cb:(te,ne)=>{Pe()}},{type:"text",name:"gstAmount",title:"GST Amount(5%)",validate:"required",value:"0",attrp:{class:"c3",readOnly:!0},cb:(te,ne)=>{Pe()}},{type:"text",name:"parkingCharges",title:"Parking Charges",validate:"required",value:"
2150",attrp:{class:"c3"},cb:(te,ne)=>{Pe()}},{type:"text",name:"tollCharges",title:"Toll Charges",validate:"required",value:"0",attrp:{class:"c3"},cb:(te,ne)=>{Pe()}}),N.push({type:"text",name:"finalAmount",title:"Final Amount (Base Price + Night + Driver + Toll + Extra Distance + Extra hrs)",validate:"required",value:"0",attrp:{class:"c1",readOnly:!0}}),N},[t?.tripType,c,S]),ge=M.useMemo(()=>{const Re=t?.bookingType??"manual",N=t?.paymentType??"",te=[{type:"select",name:"paymentType",title:"Select Payment Type",validate:"required",attrp:{class:"c1"},options:[{id:"partialpay",value:"Advance Payment (Partial Payment)"},{id:"fullpay",value:"Full Payment"},{id:"paytodriver",value:"Pay To Driver"}]}];return N==="paytodriver"&&te.push({type:"text",name:"paidAmount",title:"Payment Amount",validate:"required",attrp:{class:"c1"},cb:(ne,Z)=>{Pe()}}),(N==="fullpay"||N==="partialpay")&&te.push({type:"select",name:"paymentMethod",title:"Payment Mode",validate:"required",options:[{id:"upi",value:"UPI"},{id:"card",value:"Card"},{id:"wallet",value:"Wallet"},{id:"netbanking",value:"NetBanking"},{id:"emi",value:"EMI"},{id:"cash",value:"Cash"}],attrp:{class:"c4",...Re==="online"?{readOnly:!0}:{}}},{type:"text",name:"paidAmount",title:"Payment Amount",validate:"required",attrp:{class:"c4",...Re==="online"?{readOnly:!0}:{}},cb:(ne,Z)=>{Pe()}},{type:"date",name:"paymentDate",title:"Payment Date",validate:"required",attrp:{class:"c4",...Re==="online"?{readOnly:!0}:{}}},{type:"text",name:"gatewayPaymentID",title:"Transaction ID",attrp:{class:"c4",...Re==="online"?{readOnly:!0}:{}}}),te.push({type:"text",name:"remainingAmount",title:"Remaining Amount",value:"0",validate:"required",attrp:{class:"c1",readOnly:!0}}),te},[t?.paymentType,t?.bookingType]),ye=M.useMemo(()=>({formArr1:J,formArr2:ce,formArr3:se,formArr4:ge}),[J,ce,se,ge]),Pe=()=>{try{const Re=D.current.reduce((N,te)=>N+Number(te.price||0),0);n(N=>{const te=Ke(N?.distanceKms??0),ne=Ke(N?.ratePerKm??0),Z=Ke(N?.nightAllowance??0),Q=Ke(N?.driverAllowance??0),le=Ke(N?.surgeCharges??0),we=Ke(N?.extraKms??0),xe=Ke(N?.ratePerExtraKm??0),fe=Ke(N?.extraHours??0),re=Ke(N?.ratePerExtraHour??0),ae=Ke(N?.tollCharges??0),me=Ke(N?.parkingCharges??0),De=Ke(N.gstPercentage??"0"),je=Ke(te*ne+le),tt=Ke(we*xe),bt=Ke(fe*re),it=Ke(je+Z+Q+tt+bt+Re),ht=Ke(it),kt=Ke(ht*De/100),pe=Ke(ht+kt+ae+me),Fe=Ke(N?.paidAmount??0),qe=Ke(pe-Fe);return{...N,baseFarePrice:je,subTotal:it,extraKmCharge:tt,extraHourCharge:bt,serviceCharges:Re,gstAmount:kt,finalAmount:Fr(pe),remainingAmount:Fr(qe)}})}catch(Re){alert(`Error calculating final rate: ${Re?.message}`)}},Ve=(Re,N)=>{if(!Re)return JSON.stringify({[N]:[]});const te=Re.split(`
216`).map(ne=>ne.trim()).filter(Boolean).map(ne=>({label:ne}));return JSON.stringify({[N]:te})},Ze=async Re=>{if(Re?.preventDefault(),t?.bookingStatus?.toLowerCase()=="cancelled"){j("This booking was cancelled, so updates are not allowed.");return}if(!await O(`Do you want to ${A?"update":"create"} booking ?`))return;const te=Xt(ye,t,r,s),ne=p?.find(Q=>Q?.code==t?.tripType);let Z={...t,tripTypeID:ne?.tripTypeID,inclusionInfo:Ve(t?.inclusionInfo,"inclusion"),exclusionInfo:Ve(t?.exclusionInfo,"exclusion"),serviceChargesInfo:JSON.stringify(x)};if(te){const Q=await Ne({url:A?`/booking/${A}`:"/booking",data:Z,method:A?"put":"post",showLoading:!0});if(Q?.status){const le=A||Q?.data?.bookingID;I(`/manual-booking-view?id=${le}`)}else alert(Q?.msg)}},dt=[{label:"View Booking",class:"fa-view btn",position:"left",action:Re=>{Re?.preventDefault&&Re.preventDefault(),I(`/manual-booking-view?id=${A}`)}}];return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{hidePageNavField:["add"],title:`${S} ${t?.bookingType??""} Booking`,extraEleFld:S=="edit"?dt:[]}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:Ze,id:"frmAddEdit",children:[w.jsxs("div",{className:"wrap-form f30",children:[w.jsxs("h2",{className:"form-head",children:["Customer Details"," ",S!="add"&&w.jsxs("div",{style:{float:"right"},children:[w.jsx("span",{className:"badge badge-orange badge-lg badge-dot badge-square",children:t?.bookingNo}),w.jsx("span",{className:"badge badge-orange badge-lg badge-dot badge-square ",style:{marginLeft:"9px"},children:t?.bookingType}),w.jsx("span",{className:`badge badge-${t?.bookingStatus?.toLowerCase()??"N.A"} badge-lg badge-square badge-dot`,style:{marginLeft:"10px"},children:t?.bookingStatus})]})]}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr2",frmArr:ce,formStateData:t,setFormStateData:n,formError:r,setFormErrors:s}
216)}),w.jsx("h2",{className:"form-head",style:{marginBottom:"3px"},children:"Service Charges "}),w.jsxs("table",{border:1,width:"100%",children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsx("th",{style:{textAlign:"center"},children:"#"}),w.jsx("th",{children:"Title"}),w.jsx("th",{children:"Price"})]})}),w.jsx("tbody",{children:G?.map(Re=>w.jsxs("tr",{children:[w.jsx("td",{style:{textAlign:"center"},children:w.jsx("input",{type:"checkbox",checked:x?.some(N=>N?.serviceChargesID===Re?.serviceChargesID),onChange:()=>Y(Re)})}),w.jsxs("td",{style:{padding:"5px"},children:[Re.title,!y?.some(N=>N.serviceChargesID===Re.serviceChargesID)&&w.jsx("span",{style:{color:"red",marginLeft:6},children:"(removed)"})]}),w.jsxs("td",{style:{padding:"5px"},children:["₹",Re.price]})]},Re.serviceChargesID))})]})]}),w.jsxs("div",{className:"wrap-form f30",children:[w.jsx("h2",{className:"form-head",children:"Location Details"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr1",frmArr:J,formStateData:t,setFormStateData:n,formError:r,setFormErrors:s})})]}),w.jsxs("div",{className:"wrap-form f40",children:[w.jsx("h2",{className:"form-head",children:"Pricing Details"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr3",frmArr:se,formStateData:t,setFormStateData:n,formError:r,setFormErrors:s})}),w.jsx("h2",{className:"form-head",children:"Payment Details"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr4",frmArr:ge,formStateData:t,setFormStateData:n,formError:r,setFormErrors:s})})]})]})]})}function Su(){const i=jl(),e=Mt(),t="0",[n,r]=M.useState(null),[s,o]=M.useState(null),[a,l]=M.useState(null),[c,d]=M.useState(null),[f,m]=M.useState(null),[p,g]=M.useState(null),[y,v]=M.useState({}),[x]=$t(),{modeType:C}=_t(),D=x.get("id"),[E,T]=M.useState(!1),S=(se="No Message....")=>{i(fw({type:"alert",message:se}))},A=se=>new Promise(ge=>{i(fw({type:"confirm",message:se,onConfirm:()=>{i(Ac()),ge(!0)},onCancel:()=>{i(Ac()),ge(!1)}}))});M.useEffect(()=>{(async()=>C=="view"?I(D):Jt(B,n,r))()},[D]);const I=async se=>{d(null),r(null),o(null),l(null);const ge=await Ne({url:`/booking/view/${se}`,method:"get"});ge?.status===!0&&(m(ge?.data?.bookingDetails?.bookingConfirmationPdfUrl??null),g(ge?.data?.bookingDetails?.taxInvoicePdfUrl??null),d(ge?.data?.bookingDetails?.bookingStatus??null),r(ge?.data?.bookingDetails),o(ge?.data?.bookingDetails),l(ge?.data?.transactionDetail))},R=M.useMemo(()=>{const se=n?.bookingStatus,ge=[{type:"select",name:"bookingStatus",title:"Select Booking Status",validate:"required",attrp:{class:"c1"},options:[{id:"upcoming",value:"Upcomming"},{id:"ongoing",value:"Ongoing"},{id:"completed",value:"Completed"},{id:"cancelled",value:"Cancelled"},{id:"failed",value:"Failed"}]}];return se==="cancelled"&&ge.push({type:"textarea",name:"cancelledReason",title:"Cancellation Reason",validate:"required"}),ge},[n?.bookingStatus]),O=M.useMemo(()=>[{type:"text",name:"baseFarePrice",title:"Base Fare (Kms * Rate + Surge Charge)",validate:"required",value:"0",attrp:{class:"c1",readOnly:!0}},{type:"text",name:"nightAllowance",title:"Night Allowance",validate:"required",value:"0",attrp:{class:"c3"},cb:(ge,ye)=>{U()}},{type:"text",name:"driverAllowance",title:"Driver Allowance",validate:"required",value:"0",attrp:{class:"c3"},cb:(ge,ye)=>{U()}},{type:"text",name:"extraKms",title:"Extra Distance (KMs)",validate:"required",value:"0",attrp:{class:"c3"},cb:(ge,ye)=>{U()}},{type:"text",name:"ratePerExtraKm",title:"After Rate/KMs",validate:"required",value:"0",attrp:{class:"c3"},cb:(ge,ye)=>{U()}},{type:"text",name:"extraKmCharge",title:"Extra Distance Charge1",validate:"required",value:"0",attrp:{class:"c3",readOnly:!0}},{type:"text",name:"extraHours",title:"Extra Hours",validate:"required",value:"0",attrp:{class:"c3"},cb:(ge,ye)=>{U()}},{type:"text",name:"ratePerExtraHour",title:"Rate per Extra Hour",validate:"required",value:"0",attrp:{class:"c3"},cb:(ge,ye)=>{U()}},{type:"text",name:"extraHourCharge",title:"Extra Hour Charge",validate:"required",value:"0",attrp:{class:"c3",readOnly:!0}},{type:"text",name:"serviceCharges",title:"Service Charges",validate:"required",value:"
2160",attrp:{class:"c2",readOnly:!0}},{type:"text",name:"subTotal",title:"Sub Total",validate:"required",value:"0",attrp:{class:"c3",readOnly:!0},cb:(ge,ye)=>{U()}},{type:"text",name:"gstPercentage",title:"GST Percentage",validate:"required",value:"0",attrp:{class:"c2"},cb:(ge,ye)=>{U()}},{type:"text",name:"gstAmount",title:"GST Amount(5%)",validate:"required",value:"0",attrp:{class:"c2",readOnly:!0}},{type:"text",name:"parkingCharges",title:"Parking Charges",validate:"required",value:"0",attrp:{class:"c2"},cb:(ge,ye)=>{U()}},{type:"text",name:"tollCharges",title:"Toll Charges",validate:"required",value:"0",attrp:{class:"c2"},cb:(ge,ye)=>{U()}},{type:"text",name:"finalAmount",title:"Total Amount",validate:"required",value:"0",attrp:{class:"c3",readOnly:!0}},{type:"text",name:"paidAmount",title:"Received Amount",validate:"required",value:"0",attrp:{class:"c3"},cb:(ge,ye)=>{U()}},{type:"text",name:"remainingAmount",title:"Balance Amount",validate:"required",value:"0",attrp:{class:"c3",readOnly:!0}}],[]),j=M.useMemo(()=>[{type:"text",name:"driverName",title:"Driver Name",attrp:{class:"c2"}},{type:"text",name:"driverMobile",title:"Driver Mobile",attrp:{class:"c2"}},{type:"text",name:"vehicleName",title:"Vehicle Name",attrp:{class:"c2"}},{type:"text",name:"vehicleNumber",title:"Vehicle Number",attrp:{class:"c2"}}],[]),B=M.useMemo(()=>({formArr1:R,formArr2:O,formArr3:j}),[R,O,j]),U=()=>{try{r(se=>{const ge=Ke(se?.nightAllowance??0),ye=Ke(se?.driverAllowance??0),Pe=Ke(se?.extraKms??0),Ve=Ke(se?.ratePerExtraKm??0),Ze=Ke(se?.extraHours??0),dt=Ke(se?.ratePerExtraHour??0),Re=Ke(se?.tollCharges??0),N=Ke(se?.parkingCharges??0),te=Ke(se.gstPercentage??t),ne=Ke(se?.baseFarePrice??0),Z=Ke(se?.serviceCharges??0),Q=Ke(Pe*Ve),le=Ke(Ze*dt),we=Ke(ne+Z+ge+ye+Q+le),xe=Ke(we),fe=Ke(xe*te/100),re=Ke(xe+fe+Re+N),ae=Ke(se?.paidAmount??0),me=Ke(re-ae);return{...se,baseFarePrice:ne,subTotal:we,extraKmCharge:Q,extraHourCharge:le,gstAmount:fe,finalAmount:Fr(re),remainingAmount:Fr(me)}})}catch(se){alert(`Error calculating final rate: ${se?.message}`)}},F=async(se=!1)=>{const ge=Xt(B,n,y,v);if(!await A(`Do you want to update the invoice ${se?"and sent invoice to on email":""} ?`))return!1;if(ge){let Pe={nightAllowance:n?.nightAllowance,driverAllowance:n?.driverAllowance,subTotal:n?.subTotal,extraKms:n?.extraKms,ratePerExtraKm:n?.ratePerExtraKm,extraKmCharge:n?.extraKmCharge,extraHours:n?.extraHours,ratePerExtraHour:n?.ratePerExtraHour,extraHourCharge:n?.extraHourCharge,gstPercentage:n?.gstPercentage,gstAmount:n?.gstAmount,parkingCharges:n?.parkingCharges,tollCharges:n?.tollCharges,finalAmount:n?.finalAmount,paidAmount:n?.paidAmount,remainingAmount:n?.remainingAmount,sentInvoice:se};const Ve=await Ne({url:`/booking/update-invoice/${D}`,data:Pe,method:"put",showLoading:!0});Ve?.status?I(D):alert(Ve?.msg)}},H=async()=>{if(Xt(B,n,y,v)){if(!await A(`Do you want to update the booking status to <strong>${n?.bookingStatus} </strong>?`))return!1;let ye={bookingStatus:n?.bookingStatus,cancelledReason:n?.cancelledReason??""};const Pe=await Ne({url:`/booking/update-booking-status/${D}`,data:ye,method:"put",showLoading:!0});Pe?.status?I(D):alert(Pe?.msg)}},L=async()=>{let se={driverName:n?.driverName||"",driverMobile:n?.driverMobile||"",vehicleName:n?.vehicleName||"",vehicleNumber:n?.vehicleNumber||""};const ge={driverName:"Driver Name",driverMobile:"Driver Mobile",vehicleName:"Vehicle Name",vehicleNumber:"Vehicle Number"},ye=Object.keys(se).filter(Ze=>!se[Ze]?.toString().trim()).map(Ze=>ge[Ze]);if(ye.length>0){const Ze=`${ye.join(", ")} is required`;return S(Ze),!1}if(!await A("Do you want to assign driver and cab detail ?"))return!1;const Ve=await Ne({url:`/booking/update-booking-assingment/${D}`,data:se,method:"put",showLoading:!0});Ve?.status?(I(D),T(!1)):alert(Ve?.msg)},W=[{label:"Edit Booking",class:"fa-edit btn",position:"left",action:se=>{se?.preventDefault&&se.preventDefault(),e(`/manual-booking-edit?id=${D}`)}}],G=se=>{if(se?.preventDefault&&se.preventDefault(),!f){alert("Booking Confirmation Pdf not available.");return}const ge=f,ye=900,Pe=700,Ve=window.screenX+(window.outerWidth-ye)/2,Ze=window.screenY+(window.outerHeight-Pe)/2,dt=window.open(ge,"BookingPDFWindow",`width=${ye},height=${Pe},left=${Ve},top=${Ze},resizable=yes,scrollbars=yes`);dt&&dt.focus()},Y=se=>{if(se?.preventDefault&&se.preventDefault(),!p){alert("Invoice Pdf not available.");return}const ge=p,ye=900,Pe=700,Ve=window.screenX+(window.outerWidth-ye)/2,Ze=window.screenY+(window.outerHeight-Pe)/2,dt=window.open(ge,"BookingPDFWindow",`width=${ye},height=${Pe},left=${Ve},top=${Ze},resizable=yes,scrollbars=yes`);dt&&dt.focus()},ie=async se=>{if(se?.preventDefault&&se.preventDefault(),!await A("Do you want to send the booking confirmation <strong>SMS</strong>?"))return!1;const ye=await Ne({url:`/booking/sent-booking-confirmation-sms/${D}`,method:"get",showLoading:!0});ye?.status||alert(ye?.msg)},V=async se=>{if(se?.preventDefault&&se.preventDefault(),!await A("Do you want to send the booking confirmation <strong>Email</strong>?"))return!1;const ye=await Ne({url:`/booking/sent-booking-confirmation-email/${D}`,method:"get",showLoading:!0});ye?.status||alert(ye?.msg)},q=async se=>{se?.preventDefault&&se.preventDefault();const ge=await Ne({url:`/booking/sent-booking-cancellation-email-sms/${D}`,method:"get"});ge?.status,alert(ge?.msg)},$=async se=>{if(se?.preventDefault&&se.preventDefault(),!await A("Do you want to send the booking upcoming <strong>Email</strong>?"))return!1;const ye=await Ne({url:`/booking/sent-booking-upcoming-email/${D}`,method:"get",showLoading:!0});ye?.status||alert(ye?.msg)},J=async se=>{if(se?.preventDefault&&se.preventDefault(),!await A("Do you want to send the booking upcoming <strong>SMS</strong>?"))return!1;const ye=await Ne({url:`/booking/sent-booking-upcoming-sms/${D}`,method:"get",showLoading:!0});ye?.status||alert(ye?.msg)},ce=(se,ge="blank")=>{se.preventDefault();const ye=`https://api.bycabs.com/admin/booking/duty-slip/${D}?type=${ge}`,Pe=1e3,Ve=800,Ze=window.screenX+(window.outerWidth-Pe)/2,dt=window.screenY+(window.outerHeight-Ve)/2;window.open(ye,"_blank",`
217      width=${Pe},
218      height=${Ve},
219      left=${Ze},
220      top=${dt},
221      resizable=yes,
222      scrollbars=yes
223    `)?.focus()};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{hidePageNavField:["add"],title:`${C} ${n?.bookingType??""} Booking`,extraEleFld:W}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:se=>{se?.preventDefault()},id:"frmAddEdit",children:[w.jsxs("div",{className:"wrap-form",style:{display:"flex",justifyContent:"flex-end",flexWrap:"wrap",gap:3,padding:"4px"},children:[c=="upcoming"&&s?.bookingAssignmentID&&w.jsxs(w.Fragment,{children:[w.jsxs("button",{type:"button",className:"fa-envelope btn dfullshipment_pdf_btn",onClick:$,children:[" ","Upcoming Mail"," "]}),w.jsxs("button",{type:"button",className:"fa-message btn dfullshipment_pdf_btn",onClick:J,children:[" ","Upcoming SMS"," "]})]}),w.jsxs("button",{type:"button",className:"fa-download btn dfullshipment_pdf_btn",onClick:G,children:[" ","Confirmation PDF"," "]}),(c=="upcoming"||c=="ongoing")&&w.jsxs(w.Fragment,{children:[w.jsxs("button",{type:"button",className:"fa-envelope btn dfullshipment_pdf_btn",onClick:V,children:[" ","Confimation Mail"," "]}),w.jsxs("button",{type:"button",className:"fa-message btn dfullshipment_pdf_btn",onClick:ie,children:[" ","Confimation SMS"," "]})]}),c=="cancelled"&&w.jsxs("button",{type:"button",className:"fa-message btn dfullshipment_pdf_btn",onClick:q,children:[" ","Cancellation Email & SMS"," "]}),c=="completed"&&w.jsxs("button",{type:"button",className:"fa-download btn dfullshipment_pdf_btn",onClick:Y,children:[" ","Tax Invoice PDF"," "]}),(c=="upcoming"||c=="ongoing")&&w.jsxs(w.Fragment,{children:[w.jsxs("button",{type:"button",className:"fa-download btn dfullshipment_pdf_btn",onClick:se=>ce(se,"blank"),children:[" ","Blank Duty Slip"," "]}),w.jsxs("button",{type:"button",className:"fa-download btn dfullshipment_pdf_btn",onClick:se=>ce(se,"fill"),children:[" ","Duty Slip"," "]})]})]}),w.jsx(nBe,{bookingDetails:s,transactionData:a}),w.jsxs("div",{className:"wrap-form f40",children:[w.jsx("h2",{className:"form-head",children:"Booking Status "}),w.jsxs("ul",{className:"tbl-form",children:[w.jsx(Le,{frmGroupName:"formArr1",frmArr:R,formStateData:n,setFormStateData:r,formError:y,setFormErrors:v}),["upcoming","ongoing"].includes(c)&&w.jsxs("li",{children:[w.jsx("button",{type:"button",onClick:se=>{se.preventDefault(),H()},className:"btn",children:"Update"}),c=="upcoming"&&w.jsxs("button",{type:"button",onClick:se=>{se.preventDefault(),T(!E)},className:"btn",style:{marginLeft:"10px"},children:[s?.bookingAssignmentID?"Re-assign":"Assign"," ","Driver and Vehicle"]})]})]}),w.jsxs("div",{children:[w.jsxs("div",{style:{display:`${c=="upcoming"&&E?"block":"none"}`},children:[w.jsx("h2",{className:"form-head",children:"Update Driver and Vehicle Details"}),w.jsxs("ul",{className:"tbl-form",children:[w.jsx(Le,{frmGroupName:"formArr3",frmArr:j,formStateData:n,setFormStateData:r,formError:y,setFormErrors:v}),w.jsxs("li",{children:[w.jsx("button",{type:"button",onClick:se=>{se.preventDefault(),L()},className:"btn",children:"Update Details"}),w.jsx("button",{type:"button",style:{marginLeft:"10px"},onClick:se=>{se.preventDefault(),T(!1)},className:"btn",children:"Close"})]})]})]}),s?.bookingAssignmentID&&w.jsxs("div",{children:[w.jsx("h2",{className:"form-head",children:"Assigned Driver and Vehicle Details"}),w.jsx("table",{style:{width:"100%",borderCollapse:"collapse",border:"1px solid #e5e7eb",borderRadius:"6px",overflow:"hidden",fontSize:"13px"},children:w.jsxs("tbody",{children:[w.jsxs("tr",{style:{borderBottom:"1px solid #e5e7eb"},children:[w.jsx("td",{style:{padding:"5px 3px 3px 20px",fontWeight:"500",color:"#555",width:"30%"},children:"Driver Name :"}),w.jsx("td",{style:{padding:"5px 3px 3px 20px",color:"#111"},children:s?.driverName||"N.A"})]}),w.jsxs("tr",{style:{borderBottom:"1px solid #e5e7eb"},children:[w.jsx("td",{style:{padding:"5px 3px 3px 20px",fontWeight:"500",color:"#555"},children:"Driver Mobile :"}),w.jsx("td",{style:{padding:"5px 3px 3px 20px",color:"#111"},children:s?.driverMobile||"N.A"})]}),w.jsxs("tr",{style:{borderBottom:"1px solid #e5e7eb"},children:[w.jsx("td",{style:{padding:"5px 3px 3px 20px",fontWeight:"500",color:"#555"},children:"Vehicle Name :"}),w.jsx("td",{style:{padding:"5px 3px 3px 20px",color:"#111"},children:s?.vehicleName||"N.A"})]}),w.jsxs("tr",{children:[w.jsx("td",{style:{padding:"5px 3px 3px 20px",fontWeight:"500",color:"#555"},children:"Vehicle Number :"}),w.jsx("td",{style:{padding:"5px 3px 3px 20px",color:"#111"},children:s?.vehicleNumber||"N.A"})]})]})})]})]}),w.jsx("h2",{className:"form-head",children:"Invoice Details"}),w.jsxs("ul",{className:"tbl-form",children:[w.jsx(Le,{frmGroupName:"formArr2",frmArr:O,formStateData:n,setFormStateData:r,formError:y,setFormErrors:v}),c=="completed"&&w.jsxs("li",{children:[w.jsx("button",{type:"button",className:"btn",style:{marginRight:"5px"},onClick:se=>{se.preventDefault(),F(!1)},children:"Update Invoice"}),w.jsx("button",{type:"button",className:"btn",onClick:se=>{se.preventDefault(),F(!0)},children:"Update & Sent Invoice"})]})]})]})]})]})}const nBe=({bookingDetails:i,transactionData:e})=>{let t=[];try{t=JSON?.parse(i?.dropLocation)}catch{t=[]}let n=null;try{n=JSON?.parse(i?.inclusionInfo)}catch{n=null}let r=null;try{r=JSON?.parse(i?.exclusionInfo)}catch{r=null}let s=null;try{s=JSON.parse(i?.serviceChargesInfo)}catch{s=null}return w.jsxs(w.Fragment,{children:[w.jsx("style",{children:`
224          .wrap-form {
225            border: 1px solid #ddd;
226            margin-bottom: 20px;
227          }
228
229          .form-head {
230            background: #f5f5f5;
231            padding: 10px 15px;
232            font-size: 16px;
233            font-weight: bold;
234            border-bottom: 1px solid #ddd;
235          }
236
237          table {
238            border-collapse: collapse;
239            width: 100%;
240          }
241
242          td, th {
243            padding: 10px;
244            border-bottom: 1px solid #e0e0e0;
245            vertical-align: top;
246          }
247
248          th {
249            background: #f0f0f0;
250            text-align: left;
251            font-weight: bold;
252          }
253
254          .label {
255            width: 30%;
256            font-weight: bold;
257            color: #555;
258          }
259
260          .section-title td {
261            background: #ffffff;
262            font-weight: bold;
263          }
264
265          ul {
266            margin: 0;
267            // padding-left: 18px;
268          }
269
270          ul li {
271            margin-bottom: 4px;
272          }
273
274          .right {
275            text-align: right;
276          }
277          .calc-text {
278            font-size: 12px;
279            color: #777;
280            margin-top: 2px;
281          }
282
283          .balance-amount {
284            font-weight: bold;
285            color: #c62828;
286          }
287        `}),w.jsxs("div",{className:"wrap-form f30",children:[w.jsxs("div",{className:"form-head",children:["Customer Details"," ",w.jsxs("div",{style:{float:"right"},children:[w.jsx("span",{className:"badge badge-orange badge-lg badge-dot badge-square",children:i?.bookingNo}),w.jsx("span",{className:"badge badge-orange badge-lg badge-dot badge-square ",style:{marginLeft:"9px"},children:i?.bookingType}),w.jsx("span",{className:`badge badge-${i?.bookingStatus?.toLowerCase()??"N.A"} badge-lg badge-square badge-dot`,style:{marginLeft:"10px"},children:i?.bookingStatus})]})]}),w.jsx("table",{children:w.jsxs("tbody",{children:[w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Full Name"}),w.jsx("td",{children:i?.fullName??"N.A"})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Gender"}),w.jsx("td",{children:i?.gender?.toUpperCase()??"N.A"})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Contact"}),w.jsxs("td",{children:[i?.mobile??"N.A",i?.alternateMobile?` / ${i?.alternateMobile}`:""]})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Email"}),w.jsx("td",{children:i?.email??"N.A"})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"GST"}),w.jsx("td",{align:"left",children:i?.hasGST?w.jsxs("ul",{children:[w.jsxs("li",{children:[w.jsx("strong",{children:"Company:"})," ",i?.companyName]}),w.jsxs("li",{children:[w.jsx("strong",{children:"GST No:"})," ",i?.gstNumber]})]}):"N.A"})]})]})}),w.jsx("div",{className:"form-head",children:"Trip & Vehicle Details"}),w.jsx("table",{children:w.jsxs("tbody",{children:[w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Trip Type"}),w.jsx("td",{children:i?.tripType??"N.A"})]}),i?.tripType=="LOCALTRIP"&&w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Package Type"}),w.jsx("td",{children:i?.packageTypeName??"N.A"})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"KMS"}),w.jsx("td",{children:i?.distanceKms?`${Ke(i.distanceKms)} KM`:"N.A"})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Pickup and Drop Location"}),w.jsx("td",{children:w.jsxs("ul",{children:[w.jsxs("li",{children:[w.jsx("strong",{children:"Pickup Location:"})," ",w.jsx("br",{})," ",i?.pickupLocation]}),i?.tripType!=="LOCALTRIP"&&w.jsxs("li",{children:[w.jsx("strong",{children:"Drop Location:"})," ",w.jsx("br",{}),w.jsx("ul",{children:t?.length?t?.map((o,a)=>w.jsx("li",{children:o},a)):w.jsx("li",{children:"N.A"})})]})]})})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Pickup and Drop Address"}),w.jsx("td",{children:w.jsxs("ul",{children:[w.jsxs("li",{children:[w.jsx("strong",{children:"Pickup Address:"})," ",w.jsx("br",{})," ",i?.pickupAddress??"N.A"]}),i?.tripType!=="LOCALTRIP"&&w.jsxs("li",{children:[w.jsx("strong",{children:"Drop Address:"})," ",w.jsx("br",{})," ",i?.dropAddress??"N.A"]})]})})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Pickup Date"}),w.jsx("td",{children:i?.pickupDate??"N.A"})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Pickup Time"}),w.jsx("td",{children:i?.pickupTime??"N.A"})]}),i?.tripType=="ROUNDTRIP"&&w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Return Date"}),w.jsx("td",{children:i?.returnDate??"N.A"})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Vehicle Detail"}),w.jsx("td",{children:w.jsxs("ul",{children:[w.jsxs("li",{chi
287ldren:[w.jsx("strong",{children:"Vehicle:"})," ",i?.vehicleType??"N.A"," -"," ",i?.vehicleTag??"N.A"," -"," ",i?.vehicleName??"N.A"]}),w.jsxs("li",{children:[w.jsx("strong",{children:"Seater:"})," ",i?.seatCapacity??"N.A"," Seater"," "]}),w.jsxs("li",{children:[w.jsx("strong",{children:"Fuel:"})," ",i?.fuelTypeName??"N.A"]}),w.jsxs("li",{children:[w.jsx("strong",{children:"AC Type:"})," ",i?.acType??"N.A"]})]})})]})]})}),w.jsx("div",{className:"form-head",children:"Inclusions & Exclusions"}),w.jsx("table",{children:w.jsxs("tbody",{children:[w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Inclusions"}),w.jsx("td",{children:w.jsx("ul",{children:n&&n?.inclusion&&n?.inclusion?.length?n?.inclusion?.map((o,a)=>w.jsx("li",{children:o?.label},a)):w.jsx("li",{children:"N.A"})})})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Exclusions"}),w.jsx("td",{children:w.jsx("ul",{children:r&&r?.exclusion&&r?.exclusion?.length?r?.exclusion?.map((o,a)=>w.jsx("li",{children:o?.label},a)):w.jsx("li",{children:"N.A"})})})]})]})})]}),w.jsxs("div",{className:"wrap-form f30",children:[w.jsx("div",{className:"form-head",children:"Fare Details"}),w.jsx("table",{children:w.jsxs("tbody",{children:[w.jsxs("tr",{children:[w.jsxs("td",{className:"label",children:["Base Price",w.jsxs("div",{className:"calc-text",children:["( ",i?.distanceKms??0," KM * ₹",i?.ratePerKm??0," ) + ₹ ",i?.surgeCharges??0]})]}),w.jsxs("td",{className:"right",children:["₹ ",Ke(i?.baseFarePrice??0)]})]}),w.jsxs("tr",{children:[w.jsxs("td",{className:"label",children:["Extra KM Charges",w.jsxs("div",{className:"calc-text",children:["( ",i?.extraKms??0," KM * ₹",i?.ratePerExtraKm??0," )"]})]}),w.jsxs("td",{className:"right",children:["₹ ",Ke(i?.extraKmCharge??0)]})]}),w.jsxs("tr",{children:[w.jsxs("td",{className:"label",children:["Extra Hour Charges",w.jsxs("div",{className:"calc-text",children:["( ",i?.extraHours??0," KM * ₹",i?.ratePerExtraHour??0," )"]})]}),w.jsxs("td",{className:"right",children:["₹ ",Ke(i?.extraHourCharge??0)]})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Driver Allowance"}),w.jsxs("td",{className:"right",children:["₹ ",Ke(i?.driverAllowance??0)]})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Night Allowance"}),w.jsxs("td",{className:"right",children:["₹ ",Ke(i?.nightAllowance??0)]})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Parking Charges"}),w.jsxs("td",{className:"right",children:["₹ ",Ke(i?.parkingCharges??0)]})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Service Charges"}),w.jsxs("td",{className:"right",children:[w.jsx("ul",{style:{fontSize:"11px",fontWeight:"bold"},children:s&&s?.length?s?.map((o,a)=>w.jsxs("li",{children:[o?.title," - ₹ ",o?.price]},a)):w.jsx("li",{children:"N.A"})}),"₹ ",Ke(i?.serviceCharges??0)]})]}),w.jsxs("tr",{className:"section-title",children:[w.jsx("td",{children:"Fare Subtotal"}),w.jsxs("td",{className:"right",children:["₹ ",Ke(i?.subTotal??0)]})]}),w.jsxs("tr",{children:[w.jsxs("td",{className:"label",children:["GST @ ",Ke(i?.gstPercentage??0),"%"]}),w.jsxs("td",{className:"right",children:["₹ ",Ke(i?.gstAmount??0)]})]}),w.jsxs("tr",{children:[w.jsx("td",{className:"label",children:"Toll Charges"}),w.jsxs("td",{className:"right",children:["₹ ",Ke(i?.tollCharges??0)]})]}),w.jsxs("tr",{className:"section-title",children:[w.jsx("td",{children:"Total Amount"}),w.jsxs("td",{className:"right",children:["₹ ",Ke(i?.finalAmount??0)]})]}),w.jsxs("tr",{className:"section-title",children:[w.jsx("td",{children:"Received Amount"}),w.jsxs("td",{className:"right",children:["₹ ",Ke(i?.paidAmount??0)]})]}),w.jsxs("tr",{className:"section-title",children:[w.jsx("td",{children:"Balance Amount"}),w.jsxs("td",{className:"right",children:["₹ ",Ke(i?.remainingAmount??0)]})]})]})}),w.jsx("div",{className:"form-head",children:"Transcation Details "}),w.jsxs("table",{children:[w.jsx("thead",{children:w.jsxs("tr",{children:[w.jsx("th",{children:"Transaction ID#"}),w.jsx("th",{children:"Amount"}),w.jsx("th",{children:"Payment Type"}),w.jsx("th",{children:"Gateway"}),w.jsx("th",{children:"Status"})]})}),w.jsx("tbody",{children:e&&e.length>0?e.map((o,a)=>w.jsxs("tr",{children:[w.jsx("td",{children:o?.gatewayPaymentID??"N.A"}),w.jsxs("td",{children:["₹",Ke(o?.amount??0)]}),w.jsx("td",{children:o?.paymentType??"N.A"}),w.jsx("td",{children:o?.paymentMethod?.toUpperCase()??"N.A"}),w.jsx("td",{children:w.jsx("span",{className:`status ${o?.paymentStatus}`,children:o?.paymentStatus??"N.A"})})]},a)):w.jsx("tr",{children:w.jsx("td",{colSpan:5,style:{textAlign:"center"},children:"No Transactions Found"})})})]})]})]})};function iBe(){const i="/rides/all-rides",e="bookingID",[t,n]=M.useState([]),[r,s]=M.useState([]);M.useEffect(()=>{(async()=>{const[c,d]=await Promise.all([Rd(),Fd()]);n(c),s(d)})()},[]);const o=[{type:"text",name:"bookingID",title:"ID",attr:{style:{width:"100px"}}},{type:"text",name:"bookingNo",title:"Booking ID"},{type:"text",name:"fullName",title:"Customer Name"},{type:"text",name:"mobile",title:"Contact Or Alternate"},{type:"select",name:"bookingType",options:om,title:"Booking Type",attr:{style:{width:"150px"}}},{type:"select",name:"tripTypeID",options:r,title:"Trip Type",attr:{style:{width:"150px"}}},{type:"select",name:"vehicleID",options:t,title:"Vehicle",attr:{style:{width:"150px"}}},{type:"select",name:"bookingStatus",options:hQ,title:"Booking Status",attr:{style:{width:"150px"}}}],a=[{title:"ID",name:"bookingID",params:{align:"center",width:"1%"},pkId:!0},{title:"Booking No.",name:"bookingNo",params:{align:"left"}}
287,{title:"Booking Type",name:"bookingType",component:Id,params:{align:"left"}},{title:"Trip Type",name:"tripTypeCode",component:Pd,params:{align:"left"}},{title:"Booking Status",name:"bookingStatus",component:Sd,params:{align:"center"}},{title:"Booking Date",name:"bookingCreatedDate",params:{align:"left"}},{title:"Customer Name",name:"fullName",params:{align:"left"}},{title:"Contact",name:"mobile",params:{align:"left"}},{title:"Pickup Location",name:"pickupLocation",params:{align:"left"}},{title:"Drop Location / Package",name:"dropLocation",params:{align:"left"}},{title:"Pickup Date",name:"pickupDate",params:{align:"left"}},{title:"Pickup Time",name:"pickupTime",params:{align:"left"}},{title:"Return Date",name:"returnDate",params:{align:"left"}},{title:"Vehicle Name",name:"vehicleName",component:kd,params:{align:"left"}},{title:"Base Fare Price",name:"baseFarePrice",params:{align:"left"}},{title:"GST AMT.",name:"gstAmount",params:{align:"left"}},{title:"Final Amt.",name:"finalAmount",params:{align:"left"}},{title:"Paid Amt.",name:"paidAmount",params:{align:"left"}},{title:"Remaining Amt.",name:"remainingAmount",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:o}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{hidePageNavField:["add"]}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:a,editId:e,tblCls:"xsmall",apiUrl:i})})]})]})}function rBe(){const i="/rides/cancelled-rides",e="bookingID",[t,n]=M.useState([]),[r,s]=M.useState([]);M.useEffect(()=>{(async()=>{const[c,d]=await Promise.all([Rd(),Fd()]);n(c),s(d)})()},[]);const o=[{type:"text",name:"bookingID",title:"ID",attr:{style:{width:"100px"}}},{type:"text",name:"bookingNo",title:"Booking ID"},{type:"text",name:"fullName",title:"Customer Name"},{type:"text",name:"mobile",title:"Contact Or Alternate"},{type:"select",name:"bookingType",options:om,title:"Booking Type",attr:{style:{width:"150px"}}},{type:"select",name:"tripTypeID",options:r,title:"Trip Type",attr:{style:{width:"150px"}}},{type:"select",name:"vehicleID",options:t,title:"Vehicle",attr:{style:{width:"150px"}}}],a=[{title:"ID",name:"bookingID",params:{align:"center",width:"1%"},pkId:!0},{title:"Booking No.",name:"bookingNo",params:{align:"left"}},{title:"Booking Type",name:"bookingType",component:Id,params:{align:"left"}},{title:"Trip Type",name:"tripTypeCode",component:Pd,params:{align:"left"}},{title:"Booking Status",name:"bookingStatus",component:Sd,params:{align:"center"}},{title:"Booking Date",name:"bookingCreatedDate",params:{align:"left"}},{title:"Cancelled Date",name:"cancelledDate",params:{align:"left"}},{title:"Customer Name",name:"fullName",params:{align:"left"}},{title:"Contact",name:"mobile",params:{align:"left"}},{title:"Pickup Location",name:"pickupLocation",params:{align:"left"}},{title:"Drop Location / Package",name:"dropLocation",params:{align:"left"}},{title:"Pickup Date",name:"pickupDate",params:{align:"left"}},{title:"Pickup Time",name:"pickupTime",params:{align:"left"}},{title:"Return Date",name:"returnDate",params:{align:"left"}},{title:"Vehicle Name",name:"vehicleName",component:kd,params:{align:"left"}},{title:"Base Fare Price",name:"baseFarePrice",params:{align:"left"}},{title:"GST AMT.",name:"gstAmount",params:{align:"left"}},{title:"Final Amt.",name:"finalAmount",params:{align:"left"}},{title:"Paid Amt.",name:"paidAmount",params:{align:"left"}},{title:"Remaining Amt.",name:"remainingAmount",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:o}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{hidePageNavField:["add"]}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:a,editId:e,tblCls:"xsmall",apiUrl:i})})]})]})}function sBe(){const i="/rides/completed-rides",e="bookingID",[t,n]=M.useState([]),[r,s]=M.useState([]);M.useEffect(()=>{(async()=>{const[c,d]=await Promise.all([Rd(),Fd()]);n(c),s(d)})()},[]);const o=[{type:"text",name:"bookingID",title:"ID",attr:{style:{width:"100px"}}},{type:"text",name:"bookingNo",title:"Booking ID"},{type:"text",name:"fullName",title:"Customer Name"},{type:"text",name:"mobile",title:"Contact Or Alternate"},{type:"select",name:"bookingType",options:om,title:"Booking Type",attr:{style:{width:"150px"}}},{type:"select",name:"tripTypeID",options:r,title:"Trip Type",attr:{style:{width:"150px"}}},{type:"select",name:"vehicleID",options:t,title:"Vehicle",attr:{style:{width:"150px"}}}],a=[{title:"ID",name:"bookingID",params:{align:"center",width:"1%"},pkId:!0},{title:"Booking No.",name:"bookingNo",params:{align:"left"}}
287,{title:"Booking Type",name:"bookingType",component:Id,params:{align:"left"}},{title:"Trip Type",name:"tripTypeCode",component:Pd,params:{align:"left"}},{title:"Booking Status",name:"bookingStatus",component:Sd,params:{align:"center"}},{title:"Booking Date",name:"bookingCreatedDate",params:{align:"left"}},{title:"Booking Completed",name:"bookingCompletedDate",params:{align:"left"}},{title:"Customer Name",name:"fullName",params:{align:"left"}},{title:"Contact",name:"mobile",params:{align:"left"}},{title:"Pickup Location",name:"pickupLocation",params:{align:"left"}},{title:"Drop Location / Package",name:"dropLocation",params:{align:"left"}},{title:"Pickup Date",name:"pickupDate",params:{align:"left"}},{title:"Pickup Time",name:"pickupTime",params:{align:"left"}},{title:"Return Date",name:"returnDate",params:{align:"left"}},{title:"Vehicle Name",name:"vehicleName",component:kd,params:{align:"left"}},{title:"Base Fare Price",name:"baseFarePrice",params:{align:"left"}},{title:"GST AMT.",name:"gstAmount",params:{align:"left"}},{title:"Final Amt.",name:"finalAmount",params:{align:"left"}},{title:"Paid Amt.",name:"paidAmount",params:{align:"left"}},{title:"Remaining Amt.",name:"remainingAmount",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:o}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{hidePageNavField:["add"]}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:a,editId:e,tblCls:"xsmall",apiUrl:i})})]})]})}function oBe(){const i="/rides/failed-rides",e="bookingID",[t,n]=M.useState([]),[r,s]=M.useState([]);M.useEffect(()=>{(async()=>{const[c,d]=await Promise.all([Rd(),Fd()]);n(c),s(d)})()},[]);const o=[{type:"text",name:"bookingID",title:"ID",attr:{style:{width:"100px"}}},{type:"text",name:"bookingNo",title:"Booking ID"},{type:"text",name:"fullName",title:"Customer Name"},{type:"text",name:"mobile",title:"Contact Or Alternate"},{type:"select",name:"bookingType",options:om,title:"Booking Type",attr:{style:{width:"150px"}}},{type:"select",name:"tripTypeID",options:r,title:"Trip Type",attr:{style:{width:"150px"}}},{type:"select",name:"vehicleID",options:t,title:"Vehicle",attr:{style:{width:"150px"}}}],a=[{title:"ID",name:"bookingID",params:{align:"center",width:"1%"},pkId:!0},{title:"Booking No.",name:"bookingNo",params:{align:"left"}},{title:"Booking Type",name:"bookingType",component:Id,params:{align:"left"}},{title:"Trip Type",name:"tripTypeCode",component:Pd,params:{align:"left"}},{title:"Booking Status",name:"bookingStatus",component:Sd,params:{align:"center"}},{title:"Booking Date",name:"bookingCreatedDate",params:{align:"left"}},{title:"Customer Name",name:"fullName",params:{align:"left"}},{title:"Contact",name:"mobile",params:{align:"left"}},{title:"Pickup Location",name:"pickupLocation",params:{align:"left"}},{title:"Drop Location / Package",name:"dropLocation",params:{align:"left"}},{title:"Pickup Date",name:"pickupDate",params:{align:"left"}},{title:"Pickup Time",name:"pickupTime",params:{align:"left"}},{title:"Return Date",name:"returnDate",params:{align:"left"}},{title:"Vehicle Name",name:"vehicleName",component:kd,params:{align:"left"}},{title:"Base Fare Price",name:"baseFarePrice",params:{align:"left"}},{title:"GST AMT.",name:"gstAmount",params:{align:"left"}},{title:"Final Amt.",name:"finalAmount",params:{align:"left"}},{title:"Paid Amt.",name:"paidAmount",params:{align:"left"}},{title:"Remaining Amt.",name:"remainingAmount",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:o}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{hidePageNavField:["add"]}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:a,editId:e,tblCls:"xsmall",apiUrl:i})})]})]})}function aBe(){const i="/rides/ongoing-rides",e="bookingID",[t,n]=M.useState([]),[r,s]=M.useState([]);M.useEffect(()=>{(async()=>{const[c,d]=await Promise.all([Rd(),Fd()]);n(c),s(d)})()},[]);const o=[{type:"text",name:"bookingID",title:"ID",attr:{style:{width:"100px"}}},{type:"text",name:"bookingNo",title:"Booking ID"},{type:"text",name:"fullName",title:"Customer Name"},{type:"text",name:"mobile",title:"Contact Or Alternate"},{type:"select",name:"bookingType",options:om,title:"Booking Type",attr:{style:{width:"150px"}}},{type:"select",name:"tripTypeID",options:r,title:"Trip Type",attr:{style:{width:"150px"}}},{type:"select",name:"vehicleID",options:t,title:"Vehicle",attr:{style:{width:"150px"}}}],a=[{title:"ID",name:"bookingID",params:{align:"center",width:"1%"},pkId:!0},{title:"Booking No.",name:"bookingNo",params:{align:"left"}}
287,{title:"Booking Type",name:"bookingType",component:Id,params:{align:"left"}},{title:"Trip Type",name:"tripTypeCode",component:Pd,params:{align:"left"}},{title:"Booking Status",name:"bookingStatus",component:Sd,params:{align:"center"}},{title:"Booking Date",name:"bookingCreatedDate",params:{align:"left"}},{title:"Customer Name",name:"fullName",params:{align:"left"}},{title:"Contact",name:"mobile",params:{align:"left"}},{title:"Pickup Location",name:"pickupLocation",params:{align:"left"}},{title:"Drop Location / Package",name:"dropLocation",params:{align:"left"}},{title:"Pickup Date",name:"pickupDate",params:{align:"left"}},{title:"Pickup Time",name:"pickupTime",params:{align:"left"}},{title:"Return Date",name:"returnDate",params:{align:"left"}},{title:"Vehicle Name",name:"vehicleName",component:kd,params:{align:"left"}},{title:"Base Fare Price",name:"baseFarePrice",params:{align:"left"}},{title:"GST AMT.",name:"gstAmount",params:{align:"left"}},{title:"Final Amt.",name:"finalAmount",params:{align:"left"}},{title:"Paid Amt.",name:"paidAmount",params:{align:"left"}},{title:"Remaining Amt.",name:"remainingAmount",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:o}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{hidePageNavField:["add"]}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:a,editId:e,tblCls:"xsmall",apiUrl:i})})]})]})}function lBe(){const i="/rides/upcoming-rides",e="bookingID",[t,n]=M.useState([]),[r,s]=M.useState([]);M.useEffect(()=>{(async()=>{const[c,d]=await Promise.all([Rd(),Fd()]);n(c),s(d)})()},[]);const o=[{type:"text",name:"bookingID",title:"ID",attr:{style:{width:"100px"}}},{type:"text",name:"bookingNo",title:"Booking ID"},{type:"text",name:"fullName",title:"Customer Name"},{type:"text",name:"mobile",title:"Contact Or Alternate"},{type:"select",name:"bookingType",options:om,title:"Booking Type",attr:{style:{width:"150px"}}},{type:"select",name:"tripTypeID",options:r,title:"Trip Type",attr:{style:{width:"150px"}}},{type:"select",name:"vehicleID",options:t,title:"Vehicle",attr:{style:{width:"150px"}}}],a=[{title:"ID",name:"bookingID",params:{align:"center",width:"1%"},pkId:!0},{title:"Booking No.",name:"bookingNo",params:{align:"left"}},{title:"Booking Type",name:"bookingType",component:Id,params:{align:"left"}},{title:"Trip Type",name:"tripTypeCode",component:Pd,params:{align:"left"}},{title:"Booking Status",name:"bookingStatus",component:Sd,params:{align:"center"}},{title:"Booking Date",name:"bookingCreatedDate",params:{align:"left"}},{title:"Customer Name",name:"fullName",params:{align:"left"}},{title:"Contact",name:"mobile",params:{align:"left"}},{title:"Pickup Location",name:"pickupLocation",params:{align:"left"}},{title:"Drop Location / Package",name:"dropLocation",params:{align:"left"}},{title:"Pickup Date",name:"pickupDate",params:{align:"left"}},{title:"Pickup Time",name:"pickupTime",params:{align:"left"}},{title:"Return Date",name:"returnDate",params:{align:"left"}},{title:"Vehicle Name",name:"vehicleName",component:kd,params:{align:"left"}},{title:"Base Fare Price",name:"baseFarePrice",params:{align:"left"}},{title:"GST AMT.",name:"gstAmount",params:{align:"left"}},{title:"Final Amt.",name:"finalAmount",params:{align:"left"}},{title:"Paid Amt.",name:"paidAmount",params:{align:"left"}},{title:"Remaining Amt.",name:"remainingAmount",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:o}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{hidePageNavField:["add"]}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:a,editId:e,tblCls:"xsmall",apiUrl:i})})]})]})}var mQ={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},fU=Ee.createContext&&Ee.createContext(mQ),cBe=["attr","size","title"];function uBe(i,e){if(i==null)return{};var t=dBe(i,e),n,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);for(r=0;r<s.length;r++)n=s[r],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(t[n]=i[n])}return t}function dBe(i,e){if(i==null)return{};var t={};for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){if(e.indexOf(n)>=0)continue;t[n]=i[n]}return t}function gx(){return gx=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},gx.apply(this,arguments)}function hU(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function bx(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};
vendor: 5,524 bytes, line 287
287e%2?hU(Object(t),!0).forEach(function(n){fBe(i,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):hU(Object(t)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(t,n))})}return i}function fBe(i,e,t){return e=hBe(e),e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function hBe(i){var e=mBe(i,"string");return typeof e=="symbol"?e:e+""}function mBe(i,e){if(typeof i!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var n=t.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function pQ(i){return i&&i.map((e,t)=>Ee.createElement(e.tag,bx({key:t},e.attr),pQ(e.child)))}function Lr(i){return e=>Ee.createElement(pBe,gx({attr:bx({},i.attr)},e),pQ(i.child))}function pBe(i){var e=t=>{var{attr:n,size:r,title:s}=i,o=uBe(i,cBe),a=r||t.size||"1em",l;return t.className&&(l=t.className),i.className&&(l=(l?l+" ":"")+i.className),Ee.createElement("svg",gx({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,o,{className:l,style:bx(bx({color:i.color||t.color},t.style),i.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&Ee.createElement("title",null,s),i.children)};return fU!==void 0?Ee.createElement(fU.Consumer,null,t=>e(t)):e(mQ)}function gBe(i){return Lr({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"},child:[]}]})(i)}function bBe(i){return Lr({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V192H0v272zm320-196c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zM192 268c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zM64 268c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zM400 64h-48V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H160V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H48C21.5 64 0 85.5 0 112v48h448v-48c0-26.5-21.5-48-48-48z"},child:[]}]})(i)}function yBe(i){return Lr({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V192H0v272zm64-192c0-8.8 7.2-16 16-16h288c8.8 0 16 7.2 16 16v64c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16v-64zM400 64h-48V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H160V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H48C21.5 64 0 85.5 0 112v48h448v-48c0-26.5-21.5-48-48-48z"},child:[]}]})(i)}function vBe(i){return Lr({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M499.99 176h-59.87l-16.64-41.6C406.38 91.63 365.57 64 319.5 64h-127c-46.06 0-86.88 27.63-103.99 70.4L71.87 176H12.01C4.2 176-1.53 183.34.37 190.91l6 24C7.7 220.25 12.5 224 18.01 224h20.07C24.65 235.73 16 252.78 16 272v48c0 16.12 6.16 30.67 16 41.93V416c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h256v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-54.07c9.84-11.25 16-25.8 16-41.93v-48c0-19.22-8.65-36.27-22.07-48H494c5.51 0 10.31-3.75 11.64-9.09l6-24c1.89-7.57-3.84-14.91-11.65-14.91zm-352.06-17.83c7.29-18.22 24.94-30.17 44.57-30.17h127c19.63 0 37.28 11.95 44.57 30.17L384 208H128l19.93-49.83zM96 319.8c-19.2 0-32-12.76-32-31.9S76.8 256 96 256s48 28.71 48 47.85-28.8 15.95-48 15.95zm320 0c-19.2 0-48 3.19-48-15.95S396.8 256 416 256s32 12.76 32 31.9-12.8 31.9-32 31.9z"},child:[]}]})(i)}function wBe(i){return Lr({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},child:[]}]})(i)}function xBe(i){return Lr({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(i)}function _Be(i){return Lr({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"},child:[]}]})(i)}function CBe(i){return Lr({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M624 448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h608c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM44.81 205.66l88.74 80a62.607 62.607 0 0 0 25.47 13.93l287.6 78.35c26.48 7.21 54.56 8.72 81 1.36 29.67-8.27 43.44-21.21 47.25-35.71 3.83-14.5-1.73-32.71-23.37-54.96-19.28-19.82-44.35-32.79-70.83-40l
287-97.51-26.56L282.8 30.22c-1.51-5.81-5.95-10.35-11.66-11.91L206.05.58c-10.56-2.88-20.9 5.32-20.71 16.44l47.92 164.21-102.2-27.84-27.59-67.88c-1.93-4.89-6.01-8.57-11.02-9.93L52.72 64.75c-10.34-2.82-20.53 5-20.72 15.88l.23 101.78c.19 8.91 6.03 17.34 12.58 23.25z"},child:[]}]})(i)}function DBe(i){return Lr({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M624 448H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h608c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16zM80.55 341.27c6.28 6.84 15.1 10.72 24.33 10.71l130.54-.18a65.62 65.62 0 0 0 29.64-7.12l290.96-147.65c26.74-13.57 50.71-32.94 67.02-58.31 18.31-28.48 20.3-49.09 13.07-63.65-7.21-14.57-24.74-25.27-58.25-27.45-29.85-1.94-59.54 5.92-86.28 19.48l-98.51 49.99-218.7-82.06a17.799 17.799 0 0 0-18-1.11L90.62 67.29c-10.67 5.41-13.25 19.65-5.17 28.53l156.22 98.1-103.21 52.38-72.35-36.47a17.804 17.804 0 0 0-16.07.02L9.91 230.22c-10.44 5.3-13.19 19.12-5.57 28.08l76.21 82.97z"},child:[]}]})(i)}function EBe(i){return Lr({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z"},child:[]}]})(i)}function TBe(i){return Lr({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z"},child:[]}]})(i)}function ABe(i){return Lr({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M308 96c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v44.748c0 6.627 5.373 12 12 12h85.28c27.308 0 48.261 9.958 60.97 27.252H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h158.757c-6.217 36.086-32.961 58.632-74.757 58.632H12c-6.627 0-12 5.373-12 12v53.012c0 3.349 1.4 6.546 3.861 8.818l165.052 152.356a12.001 12.001 0 0 0 8.139 3.182h82.562c10.924 0 16.166-13.408 8.139-20.818L116.871 319.906c76.499-2.34 131.144-53.395 138.318-127.906H308c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-58.69c-3.486-11.541-8.28-22.246-14.252-32H308z"},child:[]}]})(i)}function kBe(i){return Lr({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z"},child:[]}]})(i)}function SBe(i){return Lr({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"},child:[]}]})(i)}function PBe(i){return Lr({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M461.2 128H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h384c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h397.2c28.02 0 50.8-21.53 50.8-48V176c0-26.47-22.78-48-50.8-48zM416 336c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"},child:[]}]})(i)}const IBe={UPCOMING:w.jsx(vBe,{}),ONGOING:w.jsx(xBe,{}),COMPLETED:w.jsx(wBe,{}),CANCELLED:w.jsx(SBe,{}),ONE_WAY:w.jsx(gBe,{}),ROUND_TRIP:w.jsx(kBe,{}),LOCAL:w.jsx(_Be,{}),AIRPORT_PICKUP:w.jsx(CBe,{}),AIRPORT_DROP:w.jsx(DBe,{}),AIRPORT_RETURN:w.jsx(TBe,{}),EARNING_TODAY:w.jsx(ABe,{}),EARNING_WEEKLY:w.jsx(yBe,{}),EARNING_MONTHLY:w.jsx(bBe,{}),EARNING_TOTAL:w.jsx(PBe,{})},RBe=w.jsx(EBe,{});
287function FBe(){const i=Mt(),[e,t]=M.useState([]),[n,r]=M.useState([]),[s,o]=M.useState([]),[a,l]=M.useState("TODAY"),[c,d]=M.useState(new Date),[f,m]=M.useState(new Date);function p(g){return g?g.toISOString().split("T")[0]:""}return M.useEffect(()=>{(async()=>{const y=await Ne({method:"GET",url:"/dashboard",params:{mode:a,fromDate:p(c),toDate:p(f)},showLoading:!0});y?.status&&(t(y?.data?.topStats||[]),r(y?.data?.todayRides||[]),o(y?.data?.earnings||[]))})()},[a,c,f]),w.jsxs("div",{className:"wrap-right",children:[w.jsx("div",{className:"page-nav",id:"page-nav",children:w.jsx("h1",{className:"pg-ttl",children:"SMART DASHBOARD"})}),w.jsx("div",{className:"wrap-data",children:w.jsxs("div",{className:"dashboard",children:[w.jsxs("div",{className:"dashboard-date-filter",children:[w.jsxs("div",{className:"date-buttons",children:[w.jsx("button",{className:a==="ALL"?"active":"",onClick:()=>{const g=new Date;l("ALL"),d(g),m(g)},children:"ALL"}),w.jsx("button",{className:a==="TODAY"?"active":"",onClick:()=>{const g=new Date;l("TODAY"),d(g),m(g)},children:"Today"}),w.jsx("button",{className:a==="MONTH"?"active":"",onClick:()=>{const g=new Date;l("MONTH"),d(new Date(g.getFullYear(),g.getMonth(),1)),m(g)},children:"This Month"}),w.jsx("button",{className:a==="YEAR"?"active":"",onClick:()=>{const g=new Date;l("YEAR"),d(new Date(g.getFullYear(),0,1)),m(g)},children:"This Year"})]}),w.jsxs("div",{className:"date-picker",children:[w.jsx(Sg,{selected:c,onChange:g=>{d(g),l("CUSTOM")},selectsStart:!0,startDate:c,endDate:f,dateFormat:"dd/MM/yyyy",placeholderText:"From",showYearDropdown:!0,showMonthDropdown:!0,dropdownMode:"select",autoComplete:"off",popperPlacement:"bottom-start"}),w.jsx("span",{children:"To"}),w.jsx(Sg,{selected:f,onChange:g=>{m(g),l("CUSTOM")},selectsEnd:!0,startDate:c,endDate:f,minDate:c??void 0,dateFormat:"dd/MM/yyyy",placeholderText:"To",showYearDropdown:!0,showMonthDropdown:!0,dropdownMode:"select",autoComplete:"off",popperPlacement:"bottom-start"})]})]}),w.jsx(DT,{cards:CT(e,c,f),onNavigate:i}),w.jsx("h3",{className:"section-title",children:"Today's Rides"}),w.jsx(DT,{cards:CT(n,c,f),small:!0,onNavigate:i}),w.jsx("h3",{className:"section-title",children:"Your Earnings"}),w.jsx(DT,{cards:CT(s,c,f),onNavigate:i})]})})]})}function CT(i,e,t){return!e||!t?i:i.filter(n=>{if(!n.date)return!0;const r=new Date(n.date);return r>=e&&r<=t})}function DT({cards:i,small:e=!1,onNavigate:t}){return w.jsx("div",{className:`stats-grid ${e?"small":""}`,children:i.map(n=>w.jsx(OBe,{card:n,onNavigate:t},n.key))})}function OBe({card:i,onNavigate:e}){return w.jsxs("div",{className:`stat-card ${i.color} clickable`,onClick:()=>i.route&&e(i.route),role:"button",tabIndex:0,children:[w.jsx("h4",{children:i.title}),w.jsx("h2",{children:i.value}),w.jsx("span",{className:"icon",children:IBe[i.key]??RBe})]})}function mU(){const i="/pages",e="pageID",t=[{type:"text",name:"pageID",title:"ID"},{type:"text",name:"title",title:"Page Title",params:{align:"left"}},{type:"text",name:"slug",title:"Page Slug",params:{align:"left"}}],n=[{title:"ID",name:"pageID",params:{align:"center",width:"1%"},pkId:!0},{title:"Page Title",name:"title",params:{align:"left"}},{title:"Slug",name:"slug",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}const ql=(i="")=>i.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/&/g,"and").replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-");function ET(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{(async()=>s=="edit"?g(a):Jt(p,i,e))()},[a]);const c=[{type:"text",name:"title",title:"Title",validate:"required",attrp:{class:"c2"}},{type:"text",name:"slug",title:"Slug",validate:"required",attrp:{class:"c2"}},{type:"text",name:"meta_title",title:"Meta Title",validate:"required",attrp:{class:"c1"}},{type:"textarea",name:"meta_description",title:"Meta Description",validate:"required",attrp:{class:"c2"}}
287,{type:"textarea",name:"robots",title:"Robots",value:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",validate:"required",attrp:{class:"c2"}},{type:"text",name:"canonical_url",title:"Canonical Url",validate:"required",attrp:{class:"c2"}}],d=[{type:"textarea",name:"schema_json",title:"Schema Json",attrp:{class:"c1"}},{type:"text",name:"priority",title:"Priority",attrp:{class:"c1"}},{type:"select",name:"changefreq",title:"changefreq",options:[{id:"always",value:"always"},{id:"hourly",value:"hourly"},{id:"daily",value:"daily"},{id:"weekly",value:"weekly"},{id:"monthly",value:"monthly"},{id:"yearly",value:"yearly"},{id:"never",value:"never"}],attrp:{class:"c1"}},{type:"date",name:"lastmod",title:"lastmod",validate:"required",attrp:{class:"c1"}},{type:"select",name:"publishStatus",title:"Publish Status",validate:"required",options:[{id:"draft",value:"Draft"},{id:"pending",value:"Pending"},{id:"publish",value:"Publish"}],attrp:{class:"c2"}},{type:"checkbox",name:"isPopular",title:"Is Popular",attrp:{class:"c2"}}],f=[{type:"editor",name:"content",title:"Content",attrp:{class:"c1"}}],m=[{type:"text",name:"faqHeading",title:"Faq Heading",attrp:{class:"c2"}},{type:"text",name:"faqSubheading",title:"Faq SubHeading",attrp:{class:"c2"}},{type:"add-row-table",frmGroup:"faqData",title:"form",fields:[{type:"text",name:"question",title:"Question"},{type:"text",name:"answer",title:"Answer"}]}],p={formArr:c,formArr4:d,formArr5:f,faqSection:m},g=async v=>{const x=await Ne({url:`/pages/${v}`,method:"get"});x?.status===!0&&sn(x.data,p,i,e)},y=async v=>{v?.preventDefault();const x=Xt(p,i,t,n);console.log(i),x&&(await Ne({url:a?`/pages/${a}`:"/pages",data:i,method:a?"put":"post",showLoading:!0}))?.status==!0&&l(`/${o}-list`)};return M.useEffect(()=>{if(s=="edit"||s=="view"||!i?.title)return;const v=ql(i.title);e(x=>({...x,slug:v,canonical_url:v}))},[i?.title]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:y,id:"frmAddEdit",children:[w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Basic Detail"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:c,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Other"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr4",frmArr:d,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsx("div",{className:"wrap-form f",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr5",frmArr:f,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Faq's"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"faqSection",frmArr:m,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]})]})]})}function NBe(){const i="/cab-search-request",e="searchRequestID",t=[{type:"text",name:"searchRequestID",title:"ID"},{type:"text",name:"customerName",title:"Customer Name",params:{align:"left"}},{type:"text",name:"customerMobile",title:"Mobile",params:{align:"left"}}],n=[{title:"ID",name:"searchRequestID",params:{align:"center",width:"1%"},pkId:!0},{title:"Customer Name",name:"customerName",params:{align:"left"}},{title:"Mobile",name:"customerMobile",params:{align:"left"}},{title:"Trip Type",name:"tripTypeCode",params:{align:"left"}},{title:"Package Type",name:"packageTypeName",params:{align:"left"}},{title:"Pickup Location",name:"pickupLocation",params:{align:"left"}},{title:"Drop Location",name:"dropLocation",params:{align:"left"}},{title:"Pickup Date",name:"pickupDate",params:{align:"left"}},{title:"Pickup Time",name:"pickupTime",params:{align:"left"}},{title:"Return Date",name:"returnDate",params:{align:"left"}},{title:"Search Date",name:"searchDate",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}var eo={},F4="1.13.8",pU=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},B_=Array.prototype,O4=Object.prototype,gU=typeof Symbol<"u"?Symbol.prototype:null,BBe=B_.push,N0=B_.slice,Jg=O4.toString,MBe=O4.hasOwnProperty,gQ=typeof ArrayBuffer<"u",LBe=typeof DataView<"u",UBe=Array.isArray,b
287U=Object.keys,yU=Object.create,vU=gQ&&ArrayBuffer.isView,VBe=isNaN,jBe=isFinite,bQ=!{toString:null}.propertyIsEnumerable("toString"),wU=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],zBe=Math.pow(2,53)-1;function Mr(i,e){return e=e==null?i.length-1:+e,function(){for(var t=Math.max(arguments.length-e,0),n=Array(t),r=0;r<t;r++)n[r]=arguments[r+e];switch(e){case 0:return i.call(this,n);case 1:return i.call(this,arguments[0],n);case 2:return i.call(this,arguments[0],arguments[1],n)}var s=Array(e+1);for(r=0;r<e;r++)s[r]=arguments[r];return s[e]=n,i.apply(this,s)}}function Zc(i){var e=typeof i;return e==="function"||e==="object"&&!!i}function yQ(i){return i===null}function N4(i){return i===void 0}function B4(i){return i===!0||i===!1||Jg.call(i)==="[object Boolean]"}function vQ(i){return!!(i&&i.nodeType===1)}function xr(i){var e="[object "+i+"]";return function(t){return Jg.call(t)===e}}const M_=xr("String"),M4=xr("Number"),wQ=xr("Date"),xQ=xr("RegExp"),_Q=xr("Error"),L4=xr("Symbol"),U4=xr("ArrayBuffer");var CQ=xr("Function"),WBe=pU.document&&pU.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof WBe!="function"&&(CQ=function(i){return typeof i=="function"||!1});const vr=CQ,DQ=xr("Object");var EQ=LBe&&(!/\[native code\]/.test(String(DataView))||DQ(new DataView(new ArrayBuffer(8)))),V4=typeof Map<"u"&&DQ(new Map),HBe=xr("DataView");function qBe(i){return i!=null&&vr(i.getInt8)&&U4(i.buffer)}const e0=EQ?qBe:HBe,Jc=UBe||xr("Array");function eu(i,e){return i!=null&&MBe.call(i,e)}var YS=xr("Arguments");(function(){YS(arguments)||(YS=function(i){return eu(i,"callee")})})();const L_=YS;function TQ(i){return!L4(i)&&jBe(i)&&!isNaN(parseFloat(i))}function j4(i){return M4(i)&&VBe(i)}function z4(i){return function(){return i}}function AQ(i){return function(e){var t=i(e);return typeof t=="number"&&t>=0&&t<=zBe}}function kQ(i){return function(e){return e?.[i]}}const yx=kQ("byteLength"),$Be=AQ(yx);var GBe=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function YBe(i){return vU?vU(i)&&!e0(i):$Be(i)&&GBe.test(Jg.call(i))}const W4=gQ?YBe:z4(!1),br=kQ("length");function KBe(i){for(var e={},t=i.length,n=0;n<t;++n)e[i[n]]=!0;return{contains:function(r){return e[r]===!0},push:function(r){return e[r]=!0,i.push(r)}}}function SQ(i,e){e=KBe(e);var t=wU.length,n=i.constructor,r=vr(n)&&n.prototype||O4,s="constructor";for(eu(i,s)&&!e.contains(s)&&e.push(s);t--;)s=wU[t],s in i&&i[s]!==r[s]&&!e.contains(s)&&e.push(s)}function Mi(i){if(!Zc(i))return[];if(bU)return bU(i);var e=[];for(var t in i)eu(i,t)&&e.push(t);return bQ&&SQ(i,e),e}function PQ(i){if(i==null)return!0;var e=br(i);return typeof e=="number"&&(Jc(i)||M_(i)||L_(i))?e===0:br(Mi(i))===0}function H4(i,e){var t=Mi(e),n=t.length;if(i==null)return!n;for(var r=Object(i),s=0;s<n;s++){var o=t[s];if(e[o]!==r[o]||!(o in r))return!1}return!0}function pn(i){if(i instanceof pn)return i;if(!(this instanceof pn))return new pn(i);this._wrapped=i}pn.VERSION=F4;pn.prototype.value=function(){return this._wrapped};pn.prototype.valueOf=pn.prototype.toJSON=pn.prototype.value;pn.prototype.toString=function(){return String(this._wrapped)};function xU(i){return new Uint8Array(i.buffer||i,i.byteOffset||0,yx(i))}var _U="[object DataView]";function IQ(i,e){for(var t=[{a:i,b:e}],n=[],r=[];t.length;){var s=t.pop();if(s===!0){n.pop(),r.pop();continue}if(i=s.a,e=s.b,i===e){if(i!==0||1/i===1/e)continue;return!1}if(i==null||e==null)return!1;if(i!==i){if(e!==e)continue;return!1}var o=typeof i;if(o!=="function"&&o!=="object"&&typeof e!="object")return!1;i instanceof pn&&(i=i._wrapped),e instanceof pn&&(e=e._wrapped);var a=Jg.call(i);if(a!==Jg.call(e))return!1;if(EQ&&a=="[object Object]"&&e0(i)){if(!e0(e))return!1;a=_U}switch(a){case"[object RegExp]":case"[object String]":if(""+i==""+e)continue;return!1;case"[object Number]":t.push({a:+i,b:+e});continue;case"[object Date]":case"[object Boolean]":if(+i==+e)continue;return!1;case"[object Symbol]":if(gU.valueOf.call(i)===gU.valueOf.call(e))continue;return!1;case"[object ArrayBuffer]":case _U:t.push({a:xU(i),b:xU(e)});continue}var l=a==="[object Array]";if(!l&&W4(i)){var c=yx(i);if(c!==yx(e))return!1;if(i.buffer===e.buffer&&i.byteOffset===e.byteOffset)continue;l=!0}if(!l){if(typeof i!="object"||typeof e!="object")return!1;var d=i.constructor,f=e.constructor;if(d!==f&&!(vr(d)&&d instanceof d&&vr(f)&&f instanceof f)&&"constructor"in i&&"constructor"in e)return!1}for(var m=n.length;m--;)if(n[m]===i){if(r[m]===e)break;return!1}if(!(m>=0))if(n.push(i),r.push(e),t.push(!0),l){if(m=i.length,m!==e.length)return!1;for(;m--;)t.push({a:i[m],b:e[m]})}else{var p=Mi(i),g;if(m=p.length,Mi(e).length!==m)return!1;for(;m--;){if(g=p[m],!eu(e,g))return!1;t.push({a:i[g],b:e[g]})}}}return!0}function am(i){if(!Zc(i))return[];var e=[];
287for(var t in i)e.push(t);return bQ&&SQ(i,e),e}function q4(i){var e=br(i);return function(t){if(t==null)return!1;var n=am(t);if(br(n))return!1;for(var r=0;r<e;r++)if(!vr(t[i[r]]))return!1;return i!==OQ||!vr(t[$4])}}var $4="forEach",RQ="has",G4=["clear","delete"],FQ=["get",RQ,"set"],XBe=G4.concat($4,FQ),OQ=G4.concat(FQ),QBe=["add"].concat(G4,$4,RQ);const NQ=V4?q4(XBe):xr("Map"),BQ=V4?q4(OQ):xr("WeakMap"),MQ=V4?q4(QBe):xr("Set"),LQ=xr("WeakSet");function Od(i){for(var e=Mi(i),t=e.length,n=Array(t),r=0;r<t;r++)n[r]=i[e[r]];return n}function UQ(i){for(var e=Mi(i),t=e.length,n=Array(t),r=0;r<t;r++)n[r]=[e[r],i[e[r]]];return n}function Y4(i){for(var e={},t=Mi(i),n=0,r=t.length;n<r;n++)e[i[t[n]]]=t[n];return e}function t0(i){var e=[];for(var t in i)vr(i[t])&&e.push(t);return e.sort()}function K4(i,e){return function(t){var n=arguments.length;if(e&&(t=Object(t)),n<2||t==null)return t;for(var r=1;r<n;r++)for(var s=arguments[r],o=i(s),a=o.length,l=0;l<a;l++){var c=o[l];(!e||t[c]===void 0)&&(t[c]=s[c])}return t}}const X4=K4(am),Wh=K4(Mi),Q4=K4(am,!0);function ZBe(){return function(){}}function VQ(i){if(!Zc(i))return{};if(yU)return yU(i);var e=ZBe();e.prototype=i;var t=new e;return e.prototype=null,t}function jQ(i,e){var t=VQ(i);return e&&Wh(t,e),t}function zQ(i){return Zc(i)?Jc(i)?i.slice():X4({},i):i}function WQ(i,e){return e(i),i}function Z4(i){return Jc(i)?i:[i]}pn.toPath=Z4;function B0(i){return pn.toPath(i)}function J4(i,e){for(var t=e.length,n=0;n<t;n++){if(i==null)return;i=i[e[n]]}return t?i:void 0}function eP(i,e,t){var n=J4(i,B0(e));return N4(n)?t:n}function HQ(i,e){e=B0(e);for(var t=e.length,n=0;n<t;n++){var r=e[n];if(!eu(i,r))return!1;i=i[r]}return!!t}function U_(i){return i}function dd(i){return i=Wh({},i),function(e){return H4(e,i)}}function V_(i){return i=B0(i),function(e){return J4(e,i)}}function M0(i,e,t){if(e===void 0)return i;switch(t??3){case 1:return function(n){return i.call(e,n)};case 3:return function(n,r,s){return i.call(e,n,r,s)};case 4:return function(n,r,s,o){return i.call(e,n,r,s,o)}}return function(){return i.apply(e,arguments)}}function qQ(i,e,t){return i==null?U_:vr(i)?M0(i,e,t):Zc(i)&&!Jc(i)?dd(i):V_(i)}function j_(i,e){return qQ(i,e,1/0)}pn.iteratee=j_;function fs(i,e,t){return pn.iteratee!==j_?pn.iteratee(i,e):qQ(i,e,t)}function $Q(i,e,t){e=fs(e,t);for(var n=Mi(i),r=n.length,s={},o=0;o<r;o++){var a=n[o];s[a]=e(i[a],a,i)}return s}function tP(){}function GQ(i){return i==null?tP:function(e){return eP(i,e)}}function YQ(i,e,t){var n=Array(Math.max(0,i));e=M0(e,t,1);for(var r=0;r<i;r++)n[r]=e(r);return n}function vx(i,e){return e==null&&(e=i,i=0),i+Math.floor(Math.random()*(e-i+1))}const Hh=Date.now||function(){return new Date().getTime()};function KQ(i){var e=function(s){return i[s]},t="(?:"+Mi(i).join("|")+")",n=RegExp(t),r=RegExp(t,"g");return function(s){return s=s==null?"":""+s,n.test(s)?s.replace(r,e):s}}const XQ={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},QQ=KQ(XQ),JBe=Y4(XQ),ZQ=KQ(JBe),JQ=pn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var TT=/(.)^/,eMe={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},tMe=/\\|'|\r|\n|\u2028|\u2029/g;function nMe(i){return"\\"+eMe[i]}var iMe=/^\s*(\w|\$)+\s*$/;function eZ(i,e,t){!e&&t&&(e=t),e=Q4({},e,pn.templateSettings);var n=RegExp([(e.escape||TT).source,(e.interpolate||TT).source,(e.evaluate||TT).source].join("|")+"|$","g"),r=0,s="__p+='";i.replace(n,function(c,d,f,m,p){return s+=i.slice(r,p).replace(tMe,nMe),r=p+c.length,d?s+=`'+
288((__t=(`+d+`))==null?'':_.escape(__t))+
289'`:f?s+=`'+
290((__t=(`+f+`))==null?'':__t)+
291'`:m&&(s+=`';
292`+m+`
293__p+='`),c}),s+=`';
294`;var o=e.variable;if(o){if(!iMe.test(o))throw new Error("variable is not a bare identifier: "+o)}else s=`with(obj||{}){
295`+s+`}
296`,o="obj";s=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
297`+s+`return __p;
298`;var a;try{a=new Function(o,"_",s)}catch(c){throw c.source=s,c}var l=function(c){return a.call(this,c,pn)};return l.source="function("+o+`){
299`+s+"}",l}function tZ(i,e,t){e=B0(e);var n=e.length;if(!n)return vr(t)?t.call(i):t;for(var r=0;r<n;r++){var s=i?.[e[r]];s===void 0&&(s=t,r=n),i=vr(s)?s.call(i):s}return i}var rMe=0;function nZ(i){var e=++rMe+"";return i?i+e:e}function iZ(i){var e=pn(i);return e._chain=!0,e}function rZ(i,e,t,n,r){if(!(n instanceof e))return i.apply(t,r);var s=VQ(i.prototype),o=i.apply(s,r);return Zc(o)?o:s}var Nd=Mr(function(i,e){var t=Nd.placeholder,n=function(){for(var r=0,s=e.length,o=Array(s),a=0;a<s;a++)o[a]=e[a]===t?arguments[r++]:e[a];for(;r<arguments.length;)o.push(arguments[r++]);return rZ(i,n,this,this,o)};return n});Nd.placeholder=pn;const nP=Mr(function(i,e,t){if(!vr(i))throw new TypeError("Bind must be called on a function");var n=Mr(function(r){return rZ(i,n,e,this,t.concat(r))});return n}),js=AQ(br);function lm(i,e,t){!e&&e!==0&&(e=1/0);for(var n=[],r=0,s=0,o=br(i)||0,a=[];;){if(s>
299=o){if(!a.length)break;var l=a.pop();s=l.i,i=l.v,o=br(i);continue}var c=i[s++];a.length>=e?n[r++]=c:js(c)&&(Jc(c)||L_(c))?(a.push({i:s,v:i}),s=0,i=c,o=br(i)):t||(n[r++]=c)}return n}const sZ=Mr(function(i,e){e=lm(e,!1,!1);var t=e.length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var n=e[t];i[n]=nP(i[n],i)}return i});function oZ(i,e){var t=function(n){var r=t.cache,s=""+(e?e.apply(this,arguments):n);return eu(r,s)||(r[s]=i.apply(this,arguments)),r[s]};return t.cache={},t}const iP=Mr(function(i,e,t){return setTimeout(function(){return i.apply(null,t)},e)}),aZ=Nd(iP,pn,1);function lZ(i,e,t){var n,r,s,o,a=0;t||(t={});var l=function(){a=t.leading===!1?0:Hh(),n=null,o=i.apply(r,s),n||(r=s=null)},c=function(){var d=Hh();!a&&t.leading===!1&&(a=d);var f=e-(d-a);return r=this,s=arguments,f<=0||f>e?(n&&(clearTimeout(n),n=null),a=d,o=i.apply(r,s),n||(r=s=null)):!n&&t.trailing!==!1&&(n=setTimeout(l,f)),o};return c.cancel=function(){clearTimeout(n),a=0,n=r=s=null},c}function cZ(i,e,t){var n,r,s,o,a,l=function(){var d=Hh()-r;e>d?n=setTimeout(l,e-d):(n=null,t||(o=i.apply(a,s)),n||(s=a=null))},c=Mr(function(d){return a=this,s=d,r=Hh(),n||(n=setTimeout(l,e),t&&(o=i.apply(a,s))),o});return c.cancel=function(){clearTimeout(n),n=s=a=null},c}function uZ(i,e){return Nd(e,i)}function z_(i){return function(){return!i.apply(this,arguments)}}function dZ(){var i=arguments,e=i.length-1;return function(){for(var t=e,n=i[e].apply(this,arguments);t--;)n=i[t].call(this,n);return n}}function fZ(i,e){return function(){if(--i<1)return e.apply(this,arguments)}}function rP(i,e){var t;return function(){return--i>0&&(t=e.apply(this,arguments)),i<=1&&(e=null),t}}const hZ=Nd(rP,2);function sP(i,e,t){e=fs(e,t);for(var n=Mi(i),r,s=0,o=n.length;s<o;s++)if(r=n[s],e(i[r],r,i))return r}function mZ(i){return function(e,t,n){t=fs(t,n);for(var r=br(e),s=i>0?0:r-1;s>=0&&s<r;s+=i)if(t(e[s],s,e))return s;return-1}}const W_=mZ(1),oP=mZ(-1);function aP(i,e,t,n){t=fs(t,n,1);for(var r=t(e),s=0,o=br(i);s<o;){var a=Math.floor((s+o)/2);t(i[a])<r?s=a+1:o=a}return s}function pZ(i,e,t){return function(n,r,s){var o=0,a=br(n);if(typeof s=="number")i>0?o=s>=0?s:Math.max(s+a,o):a=s>=0?Math.min(s+1,a):s+a+1;else if(t&&s&&a)return s=t(n,r),n[s]===r?s:-1;if(r!==r)return s=e(N0.call(n,o,a),j4),s>=0?s+o:-1;for(s=i>0?o:a-1;s>=0&&s<a;s+=i)if(n[s]===r)return s;return-1}}const lP=pZ(1,W_,aP),gZ=pZ(-1,oP);function n0(i,e,t){var n=js(i)?W_:sP,r=n(i,e,t);if(r!==void 0&&r!==-1)return i[r]}function bZ(i,e){return n0(i,dd(e))}function Wo(i,e,t){e=M0(e,t);var n,r;if(js(i))for(n=0,r=i.length;n<r;n++)e(i[n],n,i);else{var s=Mi(i);for(n=0,r=s.length;n<r;n++)e(i[s[n]],s[n],i)}return i}function Ml(i,e,t){e=fs(e,t);for(var n=!js(i)&&Mi(i),r=(n||i).length,s=Array(r),o=0;o<r;o++){var a=n?n[o]:o;s[o]=e(i[a],a,i)}return s}function yZ(i){var e=function(t,n,r,s){var o=!js(t)&&Mi(t),a=(o||t).length,l=i>0?0:a-1;for(s||(r=t[o?o[l]:l],l+=i);l>=0&&l<a;l+=i){var c=o?o[l]:l;r=n(r,t[c],c,t)}return r};return function(t,n,r,s){var o=arguments.length>=3;return e(t,M0(n,s,4),r,o)}}const gh=yZ(1),wx=yZ(-1);function Wc(i,e,t){var n=[];return e=fs(e,t),Wo(i,function(r,s,o){e(r,s,o)&&n.push(r)}),n}function vZ(i,e,t){return Wc(i,z_(fs(e)),t)}function xx(i,e,t){e=fs(e,t);for(var n=!js(i)&&Mi(i),r=(n||i).length,s=0;s<r;s++){var o=n?n[s]:s;if(!e(i[o],o,i))return!1}return!0}function _x(i,e,t){e=fs(e,t);for(var n=!js(i)&&Mi(i),r=(n||i).length,s=0;s<r;s++){var o=n?n[s]:s;if(e(i[o],o,i))return!0}return!1}function co(i,e,t,n){return js(i)||(i=Od(i)),(typeof t!="number"||n)&&(t=0),lP(i,e,t)>=0}const wZ=Mr(function(i,e,t){var n,r;return vr(e)?r=e:(e=B0(e),n=e.slice(0,-1),e=e[e.length-1]),Ml(i,function(s){var o=r;if(!o){if(n&&n.length&&(s=J4(s,n)),s==null)return;o=s[e]}return o==null?o:o.apply(s,t)})});function H_(i,e){return Ml(i,V_(e))}function xZ(i,e){return Wc(i,dd(e))}function cP(i,e,t){var n=-1/0,r=-1/0,s,o;if(e==null||typeof e=="number"&&typeof i[0]!="object"&&i!=null){i=js(i)?i:Od(i);for(var a=0,l=i.length;a<l;a++)s=i[a],s!=null&&s>n&&(n=s)}else e=fs(e,t),Wo(i,function(c,d,f){o=e(c,d,f),(o>r||o===-1/0&&n===-1/0)&&(n=c,r=o)});return n}function _Z(i,e,t){var n=1/0,r=1/0,s,o;if(e==null||typeof e=="number"&&typeof i[0]!="object"&&i!=null){i=js(i)?i:Od(i);for(var a=0,l=i.length;a<l;a++)s=i[a],s!=null&&s<n&&(n=s)}else e=fs(e,t),Wo(i,function(c,d,f){o=e(c,d,f),(o<r||o===1/0&&n===1/0)&&(n=c,r=o)});return n}
299var sMe=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function uP(i){return i?Jc(i)?N0.call(i):M_(i)?i.match(sMe):js(i)?Ml(i,U_):Od(i):[]}function dP(i,e,t){if(e==null||t)return js(i)||(i=Od(i)),i[vx(i.length-1)];var n=uP(i),r=br(n);e=Math.max(Math.min(e,r),0);for(var s=r-1,o=0;o<e;o++){var a=vx(o,s),l=n[o];n[o]=n[a],n[a]=l}return n.slice(0,e)}function CZ(i){return dP(i,1/0)}function DZ(i,e,t){var n=0;return e=fs(e,t),H_(Ml(i,function(r,s,o){return{value:r,index:n++,criteria:e(r,s,o)}}).sort(function(r,s){var o=r.criteria,a=s.criteria;if(o!==a){if(o>a||o===void 0)return 1;if(o<a||a===void 0)return-1}return r.index-s.index}),"value")}function q_(i,e){return function(t,n,r){var s=e?[[],[]]:{};return n=fs(n,r),Wo(t,function(o,a){var l=n(o,a,t);i(s,o,l)}),s}}const EZ=q_(function(i,e,t){eu(i,t)?i[t].push(e):i[t]=[e]}),TZ=q_(function(i,e,t){i[t]=e}),AZ=q_(function(i,e,t){eu(i,t)?i[t]++:i[t]=1}),kZ=q_(function(i,e,t){i[t?0:1].push(e)},!0);function SZ(i){return i==null?0:js(i)?i.length:Mi(i).length}function oMe(i,e,t){return e in t}const fP=Mr(function(i,e){var t={},n=e[0];if(i==null)return t;vr(n)?(e.length>1&&(n=M0(n,e[1])),e=am(i)):(n=oMe,e=lm(e,!1,!1),i=Object(i));for(var r=0,s=e.length;r<s;r++){var o=e[r],a=i[o];n(a,o,i)&&(t[o]=a)}return t}),PZ=Mr(function(i,e){var t=e[0],n;return vr(t)?(t=z_(t),e.length>1&&(n=e[1])):(e=Ml(lm(e,!1,!1),String),t=function(r,s){return!co(e,s)}),fP(i,t,n)});function hP(i,e,t){return N0.call(i,0,Math.max(0,i.length-(e==null||t?1:e)))}function bh(i,e,t){return i==null||i.length<1?e==null||t?void 0:[]:e==null||t?i[0]:hP(i,i.length-e)}function nd(i,e,t){return N0.call(i,e==null||t?1:e)}function IZ(i,e,t){return i==null||i.length<1?e==null||t?void 0:[]:e==null||t?i[i.length-1]:nd(i,Math.max(0,i.length-e))}function RZ(i){return Wc(i,Boolean)}function FZ(i,e){return lm(i,e,!1)}const mP=Mr(function(i,e){return e=lm(e,!0,!0),Wc(i,function(t){return!co(e,t)})}),OZ=Mr(function(i,e){return mP(i,e)});function i0(i,e,t,n){B4(e)||(n=t,t=e,e=!1),t!=null&&(t=fs(t,n));for(var r=[],s=[],o=0,a=br(i);o<a;o++){var l=i[o],c=t?t(l,o,i):l;e&&!t?((!o||s!==c)&&r.push(l),s=c):t?co(s,c)||(s.push(c),r.push(l)):co(r,l)||r.push(l)}return r}const NZ=Mr(function(i){return i0(lm(i,!0,!0))});function BZ(i){for(var e=[],t=arguments.length,n=0,r=br(i);n<r;n++){var s=i[n];if(!co(e,s)){var o;for(o=1;o<t&&co(arguments[o],s);o++);o===t&&e.push(s)}}return e}function r0(i){for(var e=i&&cP(i,br).length||0,t=Array(e),n=0;n<e;n++)t[n]=H_(i,n);return t}const MZ=Mr(r0);function LZ(i,e){for(var t={},n=0,r=br(i);n<r;n++)e?t[i[n]]=e[n]:t[i[n][0]]=i[n][1];return t}function UZ(i,e,t){e==null&&(e=i||0,i=0),t||(t=e<i?-1:1);for(var n=Math.max(Math.ceil((e-i)/t),0),r=Array(n),s=0;s<n;s++,i+=t)r[s]=i;return r}function VZ(i,e){if(e==null||e<1)return[];for(var t=[],n=0,r=i.length;n<r;)t.push(N0.call(i,n,n+=e));return t}function pP(i,e){return i._chain?pn(e).chain():e}function gP(i){return Wo(t0(i),function(e){var t=pn[e]=i[e];pn.prototype[e]=function(){var n=[this._wrapped];return BBe.apply(n,arguments),pP(this,t.apply(pn,n))}}),pn}Wo(["pop","push","reverse","shift","sort","splice","unshift"],function(i){var e=B_[i];pn.prototype[i]=function(){var t=this._wrapped;return t!=null&&(e.apply(t,arguments),(i==="shift"||i==="splice")&&t.length===0&&delete t[0]),pP(this,t)}});Wo(["concat","join","slice"],function(i){var e=B_[i];pn.prototype[i]=function(){var t=this._wrapped;return t!=null&&(t=e.apply(t,arguments)),pP(this,t)}});const aMe=Object.freeze(Object.defineProperty({__proto__:null,VERSION:F4,after:fZ,all:xx,allKeys:am,any:_x,assign:Wh,before:rP,bind:nP,bindAll:sZ,chain:iZ,chunk:VZ,clone:zQ,collect:Ml,compact:RZ,compose:dZ,constant:z4,contains:co,countBy:AZ,create:jQ,debounce:cZ,default:pn,defaults:Q4,defer:aZ,delay:iP,detect:n0,difference:mP,drop:nd,each:Wo,escape:QQ,every:xx,extend:X4,extendOwn:Wh,filter:Wc,find:n0,findIndex:W_,findKey:sP,findLastIndex:oP,findWhere:bZ,first:bh,flatten:FZ,foldl:gh,foldr:wx,forEach:Wo,functions:t0,get:eP,groupBy:EZ,has:HQ,head:bh,identity:U_,include:co,includes:co,indexBy:TZ,indexOf:lP,initial:hP,inject:gh,intersection:BZ,invert:Y4,invoke:wZ,isArguments:L_,isArray:Jc,isArrayBuffer:U4,isBoolean:B4,isDataView:e0,isDate:wQ,isElement:vQ,isEmpty:PQ,isEqual:IQ,isError:_Q,isFinite:TQ,isFunction:vr,isMap:NQ,isMatch:H4,isNaN:j4,isNull:yQ,isNumber:M4,isObject:Zc,isRegExp:xQ,isSet:MQ,isString:M_,isSymbol:L4,isTypedArray:W4,isUndefined:N4,isWeakMap:BQ,isWeakSet:LQ,iteratee:j_,keys:Mi,last:IZ,lastIndexOf:gZ,map:Ml,mapObject:$Q,matcher:dd,matches:dd,max:cP,memoize:oZ,methods:t0,min:_Z,mixin:gP,negate:z_,noop:tP,now:Hh,object:LZ,omit:PZ,once:hZ,pairs:UQ,partial:Nd,partition:kZ,pick:fP,pluck:H_,property:V_,propertyOf:GQ,random:vx,range:UZ,reduce:gh,reduceRight:wx,reject:vZ,rest:nd,restArguments:Mr,result:tZ,sample:dP,select:Wc,shuffle:CZ,size:SZ,some:_x,sortBy:DZ,sortedIndex:aP,tail:nd,take:bh,tap:WQ,template:eZ,templateSettings:JQ,throttle:lZ,times:YQ,toArray:uP,toPath:Z4,transpose:r0,unescape:ZQ,union:NZ,uniq:i0,unique:i0,uniqueId:nZ,unzip:r0,values:Od,where:xZ,without:OZ,wrap:uZ,zip:MZ},Symbol.toStringTag,{value:"Module"}));var KS=gP(aMe);KS._=KS;const lMe=Object.freeze(Object.defineProperty({__proto__:null,VERSION:F4,after:fZ,all:xx,allKeys:am,any:_x,assign:Wh,before:rP,bind:nP,bindAll:sZ,chain:iZ,chunk:VZ,clone:zQ,collect:Ml,compact:RZ,compose:dZ,constant:z4,contains:co,countBy:AZ,create:jQ,debounce:cZ,default:KS,defaults:Q4,defer:aZ,delay:iP,detect:n0,difference:mP,drop:nd,each:Wo,escape:QQ,every:xx,extend:X4,extendOwn:Wh,filter:Wc,find:n0,findIndex:W_,findKey:sP,findLastIndex:oP,findWhere:bZ,first:bh,flatten:FZ,foldl:gh,foldr:wx,forEac
299h:Wo,functions:t0,get:eP,groupBy:EZ,has:HQ,head:bh,identity:U_,include:co,includes:co,indexBy:TZ,indexOf:lP,initial:hP,inject:gh,intersection:BZ,invert:Y4,invoke:wZ,isArguments:L_,isArray:Jc,isArrayBuffer:U4,isBoolean:B4,isDataView:e0,isDate:wQ,isElement:vQ,isEmpty:PQ,isEqual:IQ,isError:_Q,isFinite:TQ,isFunction:vr,isMap:NQ,isMatch:H4,isNaN:j4,isNull:yQ,isNumber:M4,isObject:Zc,isRegExp:xQ,isSet:MQ,isString:M_,isSymbol:L4,isTypedArray:W4,isUndefined:N4,isWeakMap:BQ,isWeakSet:LQ,iteratee:j_,keys:Mi,last:IZ,lastIndexOf:gZ,map:Ml,mapObject:$Q,matcher:dd,matches:dd,max:cP,memoize:oZ,methods:t0,min:_Z,mixin:gP,negate:z_,noop:tP,now:Hh,object:LZ,omit:PZ,once:hZ,pairs:UQ,partial:Nd,partition:kZ,pick:fP,pluck:H_,property:V_,propertyOf:GQ,random:vx,range:UZ,reduce:gh,reduceRight:wx,reject:vZ,rest:nd,restArguments:Mr,result:tZ,sample:dP,select:Wc,shuffle:CZ,size:SZ,some:_x,sortBy:DZ,sortedIndex:aP,tail:nd,take:bh,tap:WQ,template:eZ,templateSettings:JQ,throttle:lZ,times:YQ,toArray:uP,toPath:Z4,transpose:r0,unescape:ZQ,union:NZ,uniq:i0,unique:i0,uniqueId:nZ,unzip:r0,values:Od,where:xZ,without:OZ,wrap:uZ,zip:MZ},Symbol.toStringTag,{value:"Module"})),yi=oz(lMe);var Qy={},to={},AT={exports:{}},Zy={exports:{}},CU;function cm(){if(CU)return Zy.exports;CU=1;var i=(function(){return this===void 0})();if(i)Zy.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:i,propertyIsWritable:function(d,f){var m=Object.getOwnPropertyDescriptor(d,f);return!!(!m||m.writable||m.set)}};else{var e={}.hasOwnProperty,t={}.toString,n={}.constructor.prototype,r=function(d){var f=[];for(var m in d)e.call(d,m)&&f.push(m);return f},s=function(d,f){return{value:d[f]}},o=function(d,f,m){return d[f]=m.value,d},a=function(d){return d},l=function(d){try{return Object(d).constructor.prototype}catch{return n}},c=function(d){try{return t.call(d)==="[object Array]"}catch{return!1}};Zy.exports={isArray:c,keys:r,names:r,defineProperty:o,getDescriptor:s,freeze:a,getPrototypeOf:l,isES5:i,propertyIsWritable:function(){return!0}}}return Zy.exports}var Dp,DU;function Bn(){if(DU)return Dp;DU=1;var i={},e=cm(),t=typeof navigator>"u",n={e:{}},r,s=typeof self<"u"?self:typeof window<"u"?window:typeof Io<"u"?Io:Dp!==void 0?Dp:null;function o(){try{var $=r;return r=null,$.apply(this,arguments)}catch(J){return n.e=J,n}}function a($){return r=$,o}var l=function($,J){var ce={}.hasOwnProperty;function se(){this.constructor=$,this.constructor$=J;for(var ge in J.prototype)ce.call(J.prototype,ge)&&ge.charAt(ge.length-1)!=="$"&&(this[ge+"$"]=J.prototype[ge])}return se.prototype=J.prototype,$.prototype=new se,$.prototype};function c($){return $==null||$===!0||$===!1||typeof $=="string"||typeof $=="number"}function d($){return typeof $=="function"||typeof $=="object"&&$!==null}function f($){return c($)?new Error(A($)):$}function m($,J){var ce=$.length,se=new Array(ce+1),ge;for(ge=0;ge<ce;++ge)se[ge]=$[ge];return se[ge]=J,se}function p($,J,ce){if(e.isES5){var se=Object.getOwnPropertyDescriptor($,J);if(se!=null)return se.get==null&&se.set==null?se.value:ce}else return{}.hasOwnProperty.call($,J)?$[J]:void 0}function g($,J,ce){if(c($))return $;var se={value:ce,configurable:!0,enumerable:!1,writable:!0};return e.defineProperty($,J,se),$}function y($){throw $}var v=(function(){var $=[Array.prototype,Object.prototype,Function.prototype],J=function(ge){for(var ye=0;ye<$.length;++ye)if($[ye]===ge)return!0;return!1};if(e.isES5){var ce=Object.getOwnPropertyNames;return function(ge){for(var ye=[],Pe=Object.create(null);ge!=null&&!J(ge);){var Ve;try{Ve=ce(ge)}catch{return ye}for(var Ze=0;Ze<Ve.length;++Ze){var dt=Ve[Ze];if(!Pe[dt]){Pe[dt]=!0;var Re=Object.getOwnPropertyDescriptor(ge,dt);Re!=null&&Re.get==null&&Re.set==null&&ye.push(dt)}}ge=e.getPrototypeOf(ge)}return ye}}else{var se={}.hasOwnProperty;return function(ge){if(J(ge))return[];var ye=[];e:for(var Pe in ge)if(se.call(ge,Pe))ye.push(Pe);else{for(var Ve=0;Ve<$.length;++Ve)if(se.call($[Ve],Pe))continue e;
299ye.push(Pe)}return ye}}})(),x=/this\s*\.\s*\S+\s*=/;function C($){try{if(typeof $=="function"){var J=e.names($.prototype),ce=e.isES5&&J.length>1,se=J.length>0&&!(J.length===1&&J[0]==="constructor"),ge=x.test($+"")&&e.names($).length>0;if(ce||se||ge)return!0}return!1}catch{return!1}}function D($){return $}var E=/^[a-z$_][a-z$_0-9]*$/i;function T($){return E.test($)}function S($,J,ce){for(var se=new Array($),ge=0;ge<$;++ge)se[ge]=J+ge+ce;return se}function A($){try{return $+""}catch{return"[no string representation]"}}function I($){return $!==null&&typeof $=="object"&&typeof $.message=="string"&&typeof $.name=="string"}function R($){try{g($,"isOperational",!0)}catch{}}function O($){return $==null?!1:$ instanceof Error.__BluebirdErrorTypes__.OperationalError||$.isOperational===!0}function j($){return I($)&&e.propertyIsWritable($,"stack")}var B=(function(){return"stack"in new Error?function($){return j($)?$:new Error(A($))}:function($){if(j($))return $;try{throw new Error(A($))}catch(J){return J}}})();function U($){return{}.toString.call($)}function F($,J,ce){for(var se=e.names($),ge=0;ge<se.length;++ge){var ye=se[ge];if(ce(ye))try{e.defineProperty(J,ye,e.getDescriptor($,ye))}catch{}}}var H=function($){return e.isArray($)?$:null};if(typeof Symbol<"u"&&Symbol.iterator){var L=typeof Array.from=="function"?function($){return Array.from($)}:function($){for(var J=[],ce=$[Symbol.iterator](),se;!(se=ce.next()).done;)J.push(se.value);return J};H=function($){return e.isArray($)?$:$!=null&&typeof $[Symbol.iterator]=="function"?L($):null}}var W=typeof process<"u"&&U(process).toLowerCase()==="[object process]",G=typeof process<"u"&&typeof i<"u";function Y($){return G?i[$]:void 0}function ie(){if(typeof Promise=="function")try{var $=new Promise(function(){});if({}.toString.call($)==="[object Promise]")return Promise}catch{}}function V($,J){return $.bind(J)}var q={isClass:C,isIdentifier:T,inheritedDataKeys:v,getDataPropertyOrDefault:p,thrower:y,isArray:e.isArray,asArray:H,notEnumerableProp:g,isPrimitive:c,isObject:d,isError:I,canEvaluate:t,errorObj:n,tryCatch:a,inherits:l,withAppended:m,maybeWrapAsError:f,toFastProperties:D,filledRange:S,toString:A,canAttachTrace:j,ensureErrorObject:B,originatesFromRejection:O,markAsOriginatingFromRejection:R,classString:U,copyDescriptors:F,hasDevTools:typeof chrome<"u"&&chrome&&typeof chrome.loadTimes=="function",isNode:W,hasEnvVariables:G,env:Y,global:s,getNativePromise:ie,domainBind:V};q.isRecentNode=q.isNode&&(function(){var $=process.versions.node.split(".").map(Number);return $[0]===0&&$[1]>10||$[0]>0})(),q.isNode&&q.toFastProperties(process);try{throw new Error}catch($){q.lastLineError=$}return Dp=q,Dp}var Jy={exports:{}},kT,EU;function cMe(){if(EU)return kT;EU=1;var i=Bn(),e,t=function(){throw new Error(`No async scheduler available
300
301    See http://goo.gl/MqrFmX
302`)},n=i.getNativePromise();if(i.isNode&&typeof MutationObserver>"u"){var r=Io.setImmediate,s=process.nextTick;e=i.isRecentNode?function(a){r.call(Io,a)}:function(a){s.call(process,a)}}else if(typeof n=="function"&&typeof n.resolve=="function"){var o=n.resolve();e=function(a){o.then(a)}}else typeof MutationObserver<"u"&&!(typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova))?e=(function(){var a=document.createElement("div"),l={attributes:!0},c=!1,d=document.createElement("div"),f=new MutationObserver(function(){a.classList.toggle("foo"),c=!1});f.observe(d,l);var m=function(){c||(c=!0,d.classList.toggle("foo"))};return function(g){var y=new MutationObserver(function(){y.disconnect(),g()});y.observe(a,l),m()}})():typeof setImmediate<"u"?e=function(a){setImmediate(a)}:typeof setTimeout<"u"?e=function(a){setTimeout(a,0)}:e=t;return kT=e,kT}var ST,TU;function uMe(){if(TU)return ST;TU=1;function i(t,n,r,s,o){for(var a=0;a<o;++a)r[a+s]=t[a+n],t[a+n]=void 0}function e(t){this._capacity=t,this._length=0,this._front=0}return e.prototype._willBeOverCapacity=function(t){return this._capacity<t},e.prototype._pushOne=function(t){var n=this.length();this._checkCapacity(n+1);var r=this._front+n&this._capacity-1;this[r]=t,this._length=n+1},e.prototype.push=function(t,n,r){var s=this.length()+3;if(this._willBeOverCapacity(s)){this._pushOne(t),this._pushOne(n),this._pushOne(r);return}var o=this._front+s-3;this._checkCapacity(s);var a=this._capacity-1;this[o+0&a]=t,this[o+1&a]=n,this[o+2&a]=r,this._length=s},e.prototype.shift=function(){var t=this._front,n=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,n},e.prototype.length=function(){return this._length},e.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},e.prototype._resizeTo=function(t){var n=this._capacity;this._capacity=t;var r=this._front,s=this._length,o=r+s&n-1;i(this,0,this,n,o)},ST=e,ST}var AU;
302function dMe(){if(AU)return Jy.exports;AU=1;var i;try{throw new Error}catch(l){i=l}var e=cMe(),t=uMe(),n=Bn();function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new t(16),this._normalQueue=new t(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var l=this;this.drainQueues=function(){l._drainQueues()},this._schedule=e}r.prototype.setScheduler=function(l){var c=this._schedule;return this._schedule=l,this._customScheduler=!0,c},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){n.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(l,c){c?(process.stderr.write("Fatal "+(l instanceof Error?l.stack:l)+`
303`),process.exit(2)):this.throwLater(l)},r.prototype.throwLater=function(l,c){if(arguments.length===1&&(c=l,l=function(){throw c}),typeof setTimeout<"u")setTimeout(function(){l(c)},0);else try{this._schedule(function(){l(c)})}catch{throw new Error(`No async scheduler available
304
305    See http://goo.gl/MqrFmX
306`)}};function s(l,c,d){this._lateQueue.push(l,c,d),this._queueTick()}function o(l,c,d){this._normalQueue.push(l,c,d),this._queueTick()}function a(l){this._normalQueue._pushOne(l),this._queueTick()}return n.hasDevTools?(r.prototype.invokeLater=function(l,c,d){this._trampolineEnabled?s.call(this,l,c,d):this._schedule(function(){setTimeout(function(){l.call(c,d)},100)})},r.prototype.invoke=function(l,c,d){this._trampolineEnabled?o.call(this,l,c,d):this._schedule(function(){l.call(c,d)})},r.prototype.settlePromises=function(l){this._trampolineEnabled?a.call(this,l):this._schedule(function(){l._settlePromises()})}):(r.prototype.invokeLater=s,r.prototype.invoke=o,r.prototype.settlePromises=a),r.prototype._drainQueue=function(l){for(;l.length()>0;){var c=l.shift();if(typeof c!="function"){c._settlePromises();continue}var d=l.shift(),f=l.shift();c.call(d,f)}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1}
306,Jy.exports=r,Jy.exports.firstLineError=i,Jy.exports}var PT,kU;function Hc(){if(kU)return PT;kU=1;var i=cm(),e=i.freeze,t=Bn(),n=t.inherits,r=t.notEnumerableProp;function s(x,C){function D(E){if(!(this instanceof D))return new D(E);r(this,"message",typeof E=="string"?E:C),r(this,"name",x),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return n(D,Error),D}var o,a,l=s("Warning","warning"),c=s("CancellationError","cancellation error"),d=s("TimeoutError","timeout error"),f=s("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch{o=s("TypeError","type error"),a=s("RangeError","range error")}for(var m="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),p=0;p<m.length;++p)typeof Array.prototype[m[p]]=="function"&&(f.prototype[m[p]]=Array.prototype[m[p]]);i.defineProperty(f.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),f.prototype.isOperational=!0;var g=0;f.prototype.toString=function(){var x=Array(g*4+1).join(" "),C=`
307`+x+`AggregateError of:
308`;g++,x=Array(g*4+1).join(" ");for(var D=0;D<this.length;++D){for(var E=this[D]===this?"[Circular AggregateError]":this[D]+"",T=E.split(`
309`),S=0;S<T.length;++S)T[S]=x+T[S];E=T.join(`
310`),C+=E+`
311`}return g--,C};function y(x){if(!(this instanceof y))return new y(x);r(this,"name","OperationalError"),r(this,"message",x),this.cause=x,this.isOperational=!0,x instanceof Error?(r(this,"message",x.message),r(this,"stack",x.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}n(y,Error);var v=Error.__BluebirdErrorTypes__;return v||(v=e({CancellationError:c,TimeoutError:d,OperationalError:y,RejectionError:y,AggregateError:f}),i.defineProperty(Error,"__BluebirdErrorTypes__",{value:v,writable:!1,enumerable:!1,configurable:!1})),PT={Error,TypeError:o,RangeError:a,CancellationError:v.CancellationError,OperationalError:v.OperationalError,TimeoutError:v.TimeoutError,AggregateError:v.AggregateError,Warning:l},PT}var IT,SU;function fMe(){return SU||(SU=1,IT=function(i,e){var t=Bn(),n=t.errorObj,r=t.isObject;function s(f,m){if(r(f)){if(f instanceof i)return f;var p=a(f);if(p===n){m&&m._pushContext();var g=i.reject(p.e);return m&&m._popContext(),g}else if(typeof p=="function"){if(c(f)){var g=new i(e);return f._then(g._fulfill,g._reject,void 0,g,null),g}return d(f,p,m)}}return f}function o(f){return f.then}function a(f){try{return o(f)}catch(m){return n.e=m,n}}var l={}.hasOwnProperty;function c(f){try{return l.call(f,"_promise0")}catch{return!1}}function d(f,m,p){var g=new i(e),y=g;p&&p._pushContext(),g._captureStackTrace(),p&&p._popContext();var v=!0,x=t.tryCatch(m).call(f,C,D);v=!1,g&&x===n&&(g._rejectCallback(x.e,!0,!0),g=null);function C(E){g&&(g._resolveCallback(E),g=null)}function D(E){g&&(g._rejectCallback(E,v,!0),g=null)}return y}return s}),IT}var RT,PU;function hMe(){return PU||(PU=1,RT=function(i,e,t,n,r){var s=Bn();s.isArray;function o(l){switch(l){case-2:return[];case-3:return{}}}function a(l){var c=this._promise=new i(e);l instanceof i&&c._propagateFrom(l,3),c._setOnCancel(this),this._values=l,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return s.inherits(a,r),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function l(c,d){var f=t(this._values,this._promise);if(f instanceof i){f=f._target();var m=f._bitField;if(this._values=f,(m&50397184)===0)return this._promise._setAsyncGuaranteed(),f._then(l,this._reject,void 0,this,d);if((m&33554432)!==0)f=f._value();else return(m&16777216)!==0?this._reject(f._reason()):this._cancel()}if(f=s.asArray(f),f===null){var p=n("expecting an array or an iterable object but got "+s.classString(f)).reason();this._promise._rejectCallback(p,!1);return}if(f.length===0){d===-5?this._resolveEmptyArray():this._resolve(o(d));return}this._iterate(f)},a.prototype._iterate=function(l){var c=this.getActualLength(l.length);this._length=c,this._values=this.shouldCopyValues()?new Array(c):this._values;for(var d=this._promise,f=!1,m=null,p=0;p<c;++p){var g=t(l[p],d);g instanceof i?(g=g._target(),m=g._bitField):m=null,f?m!==null&&g.suppressUnhandledRejections():m!==null?(m&50397184)===0?(g._proxy(this,p),this._values[p]=g):(m&33554432)!==0?f=this._promiseFulfilled(g._value(),p):(m&16777216)!==0?f=this._promiseRe
311jected(g._reason(),p):f=this._promiseCancelled(p):f=this._promiseFulfilled(g,p)}f||d._setAsyncGuaranteed()},a.prototype._isResolved=function(){return this._values===null},a.prototype._resolve=function(l){this._values=null,this._promise._fulfill(l)},a.prototype._cancel=function(){this._isResolved()||!this._promise._isCancellable()||(this._values=null,this._promise._cancel())},a.prototype._reject=function(l){this._values=null,this._promise._rejectCallback(l,!1)},a.prototype._promiseFulfilled=function(l,c){this._values[c]=l;var d=++this._totalResolved;return d>=this._length?(this._resolve(this._values),!0):!1},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(l){return this._totalResolved++,this._reject(l),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var l=this._values;if(this._cancel(),l instanceof i)l.cancel();else for(var c=0;c<l.length;++c)l[c]instanceof i&&l[c].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(l){return l},a}),RT}var FT,IU;function mMe(){return IU||(IU=1,FT=function(i){var e=!1,t=[];i.prototype._promiseCreated=function(){},i.prototype._pushContext=function(){},i.prototype._popContext=function(){return null},i._peekContext=i.prototype._peekContext=function(){};function n(){this._trace=new n.CapturedTrace(s())}n.prototype._pushContext=function(){this._trace!==void 0&&(this._trace._promiseCreated=null,t.push(this._trace))},n.prototype._popContext=function(){if(this._trace!==void 0){var o=t.pop(),a=o._promiseCreated;return o._promiseCreated=null,a}return null};function r(){if(e)return new n}function s(){var o=t.length-1;if(o>=0)return t[o]}return n.CapturedTrace=null,n.create=r,n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var o=i.prototype._pushContext,a=i.prototype._popContext,l=i._peekContext,c=i.prototype._peekContext,d=i.prototype._promiseCreated;n.deactivateLongStackTraces=function(){i.prototype._pushContext=o,i.prototype._popContext=a,i._peekContext=l,i.prototype._peekContext=c,i.prototype._promiseCreated=d,e=!1},e=!0,i.prototype._pushContext=n.prototype._pushContext,i.prototype._popContext=n.prototype._popContext,i._peekContext=i.prototype._peekContext=s,i.prototype._promiseCreated=function(){var f=this._peekContext();f&&f._promiseCreated==null&&(f._promiseCreated=this)}},n}),FT}var OT,RU;function pMe(){return RU||(RU=1,OT=function(i,e){var t=i._getDomain,n=i._async,r=Hc().Warning,s=Bn(),o=s.canAttachTrace,a,l,c=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,d=/\((?:timers\.js):\d+:\d+\)/,f=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,m=null,p=null,g=!1,y,v=!!(s.env("BLUEBIRD_DEBUG")!=0&&(s.env("BLUEBIRD_DEBUG")||s.env("NODE_ENV")==="development")),x=!!(s.env("BLUEBIRD_WARNINGS")!=0&&(v||s.env("BLUEBIRD_WARNINGS"))),C=!!(s.env("BLUEBIRD_LONG_STACK_TRACES")!=0&&(v||s.env("BLUEBIRD_LONG_STACK_TRACES"))),D=s.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(x||!!s.env("BLUEBIRD_W_FORGOTTEN_RETURN"));i.prototype.suppressUnhandledRejections=function(){var re=this._target();re._bitField=re._bitField&-1048577|524288},i.prototype._ensurePossibleRejectionHandled=function(){(this._bitField&524288)===0&&(this._setRejectionIsUnhandled(),n.invokeLater(this._notifyUnhandledRejection,this,void 0))},i.prototype._notifyUnhandledRejectionIsHandled=function(){dt("rejectionHandled",a,void 0,this)},i.prototype._setReturnedNonUndefined=function(){this._bitField=this._bitField|268435456},i.prototype._returnedNonUndefined=function(){return(this._bitField&268435456)!==0},i.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var re=this._settledValue();this._setUnhandledRejectionIsNotified(),dt("unhandledRejection",l,re,this)}},i.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=this._bitField|262144},i.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},i.prototype._isUnhandledRejectionNotified=function(){return(this._bitField&262144)>0},i.prototype._setRejectionIsUnhandled=function(){this._bitField=this._bitField|1048576},i.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},i.prototype._isRejectionUnhandled=function(){return(this._bitField&1048576)>0},i.prototype._warn=function(re,ae,me){return J(re,ae,me||this)},i.onPossiblyUnhandledRejection=function(re){var ae=t();l=typeof re=="function"?ae===null?re:s.domainBind(ae,re):void 0},i.onUnhandledRejectionHandled=function(re){var ae=t();a=typeof re=="function"?ae===null?re:s.domainBind(ae,re):void 0};var E=function(){};i.longStackTraces=function(){if(n.haveItemsQueued()&&!fe.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created
312
313    See http://goo.gl/MqrFmX
314`);if(!fe.longStackTraces&&te()){var re=i.prototype._captureStackTrace,ae=i.prototype._attachExtraTrace;fe.longStackTraces=!0,E=function(){if(n.haveItemsQueued()&&!fe.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created
315
316    See http://goo.gl/MqrFmX
317`);i.prototype._captureStackTrace=re,i.prototype._attachExtraTrace=ae,e.deactivateLongStackTraces(),n.enableTrampoline(),fe.longStackTraces=!1},i.prototype._captureStackTrace=ie,i.prototype._attachExtraTrace=V,e.activateLongStackTraces(),n.disableTrampolineIfNecessary()}},i.hasLongStackTraces=function(){return fe.longStackTraces&&te()};var T=(function(){try{if(typeof CustomEvent=="function"){var re=new CustomEvent("CustomEvent");return s.global.dispatchEvent(re),function(ae,me){var De=new CustomEvent(ae.toLowerCase(),{detail:me,cancelable:!0});return!s.global.dispatchEvent(De)}}else if(typeof Event=="function"){var re=new Event("CustomEvent");return s.global.dispatchEvent(re),function(me,De){var je=new Event(me.toLowerCase(),{cancelable:!0});return je.detail=De,!s.global.dispatchEvent(je)}}else{var re=document.createEvent("CustomEvent");return re.initCustomEvent("testingtheevent",!1,!0,{}),s.global.dispatchEvent(re),function(me,De){var je=document.createEvent("CustomEvent");return je.initCustomEvent(me.toLowerCase(),!1,!0,De),!s.global.dispatchEvent(je)}}}catch{}return function(){return!1}})(),S=(function(){return s.isNode?function(){return process.emit.apply(process,arguments)}:s.global?function(re){var ae="on"+re.toLowerCase(),me=s.global[ae];
317return me?(me.apply(s.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}})();function A(re,ae){return{promise:ae}}var I={promiseCreated:A,promiseFulfilled:A,promiseRejected:A,promiseResolved:A,promiseCancelled:A,promiseChained:function(re,ae,me){return{promise:ae,child:me}},warning:function(re,ae){return{warning:ae}},unhandledRejection:function(re,ae,me){return{reason:ae,promise:me}},rejectionHandled:A},R=function(re){var ae=!1;try{ae=S.apply(null,arguments)}catch(De){n.throwLater(De),ae=!0}var me=!1;try{me=T(re,I[re].apply(null,arguments))}catch(De){n.throwLater(De),me=!0}return me||ae};i.config=function(re){if(re=Object(re),"longStackTraces"in re&&(re.longStackTraces?i.longStackTraces():!re.longStackTraces&&i.hasLongStackTraces()&&E()),"warnings"in re){var ae=re.warnings;fe.warnings=!!ae,D=fe.warnings,s.isObject(ae)&&"wForgottenReturn"in ae&&(D=!!ae.wForgottenReturn)}if("cancellation"in re&&re.cancellation&&!fe.cancellation){if(n.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");i.prototype._clearCancellationData=H,i.prototype._propagateFrom=L,i.prototype._onCancel=U,i.prototype._setOnCancel=F,i.prototype._attachCancellationCallback=B,i.prototype._execute=j,G=L,fe.cancellation=!0}return"monitoring"in re&&(re.monitoring&&!fe.monitoring?(fe.monitoring=!0,i.prototype._fireEvent=R):!re.monitoring&&fe.monitoring&&(fe.monitoring=!1,i.prototype._fireEvent=O)),i};function O(){return!1}i.prototype._fireEvent=O,i.prototype._execute=function(re,ae,me){try{re(ae,me)}catch(De){return De}},i.prototype._onCancel=function(){},i.prototype._setOnCancel=function(re){},i.prototype._attachCancellationCallback=function(re){},i.prototype._captureStackTrace=function(){},i.prototype._attachExtraTrace=function(){},i.prototype._clearCancellationData=function(){},i.prototype._propagateFrom=function(re,ae){};function j(re,ae,me){var De=this;try{re(ae,me,function(je){if(typeof je!="function")throw new TypeError("onCancel must be a function, got: "+s.toString(je));De._attachCancellationCallback(je)})}catch(je){return je}}function B(re){if(!this._isCancellable())return this;var ae=this._onCancel();ae!==void 0?s.isArray(ae)?ae.push(re):this._setOnCancel([ae,re]):this._setOnCancel(re)}function U(){return this._onCancelField}function F(re){this._onCancelField=re}function H(){this._cancellationParent=void 0,this._onCancelField=void 0}function L(re,ae){if((ae&1)!==0){this._cancellationParent=re;var me=re._branchesRemainingToCancel;me===void 0&&(me=0),re._branchesRemainingToCancel=me+1}(ae&2)!==0&&re._isBound()&&this._setBoundTo(re._boundTo)}function W(re,ae){(ae&2)!==0&&re._isBound()&&this._setBoundTo(re._boundTo)}var G=W;function Y(){var re=this._boundTo;return re!==void 0&&re instanceof i?re.isFulfilled()?re.value():void 0:re}function ie(){this._trace=new we(this._peekContext())}function V(re,ae){if(o(re)){var me=this._trace;if(me!==void 0&&ae&&(me=me._parent),me!==void 0)me.attachExtraTrace(re);else if(!re.__stackCleaned__){var De=Ve(re);s.notEnumerableProp(re,"stack",De.message+`
318`+De.stack.join(`
319`)),s.notEnumerableProp(re,"__stackCleaned__",!0)}}}function q(re,ae,me,De,je){if(re===void 0&&ae!==null&&D){if(je!==void 0&&je._returnedNonUndefined()||(De._bitField&65535)===0)return;me&&(me=me+" ");var tt="",bt="";if(ae._trace){for(var it=ae._trace.stack.split(`
320`),ht=ye(it),kt=ht.length-1;kt>=0;--kt){var pe=ht[kt];if(!d.test(pe)){var Fe=pe.match(f);Fe&&(tt="at "+Fe[1]+":"+Fe[2]+":"+Fe[3]+" ");break}}if(ht.length>0){for(var qe=ht[0],kt=0;kt<it.length;++kt)if(it[kt]===qe){kt>0&&(bt=`
321`+it[kt-1]);break}}}var Xe="a promise was created in a "+me+"handler "+tt+"but was not returned from it, see http://goo.gl/rRqMUw"+bt;De._warn(Xe,!0,ae)}}function $(re,ae){var me=re+" is deprecated and will be removed in a future version.";return ae&&(me+=" Use "+ae+" instead."),J(me)}function J(re,ae,me){if(fe.warnings){var De=new r(re),je;if(ae)me._attachExtraTrace(De);else if(fe.longStackTraces&&(je=i._peekContext()))je.attachExtraTrace(De);else{var tt=Ve(De);De.stack=tt.message+`
322`+tt.stack.join(`
323`)}R("warning",De)||Ze(De,"",!0)}}function ce(re,ae){for(var me=0;me<ae.length-1;++me)ae[me].push("From previous event:"),ae[me]=ae[me].join(`
324`);return me<ae.length&&(ae[me]=ae[me].join(`
325`)),re+`
326`+ae.join(`
327`)}function se(re){for(var ae=0;ae<re.length;++ae)(re[ae].length===0||ae+1<re.length&&re[ae][0]===re[ae+1][0])&&(re.splice(ae,1),ae--)}function ge(re){for(var ae=re[0],me=1;me<re.length;++me){for(var De=re[me],je=ae.length-1,tt=ae[je],bt=-1,it=De.length-1;it>=0;--it)if(De[it]===tt){bt=it;break}for(var it=bt;it>=0;--it){var ht=De[it];if(ae[je]===ht)ae.pop(),je--;else break}ae=De}}function ye(re){for(var ae=[],me=0;me<re.length;++me){var De=re[me],je=De==="    (No stack trace)"||m.test(De),tt=je&&ne(De);je&&!tt&&(g&&De.charAt(0)!==" "&&(De="    "+De),ae.push(De))}return ae}function Pe(re){for(var ae=re.stack.replace(/\s+$/g,"").split(`
328`),me=0;me<ae.length;++me){var De=ae[me];if(De==="    (No stack trace)"||m.test(De))break}return me>0&&re.name!="SyntaxError"&&(ae=ae.slice(me)),ae}function Ve(re){var ae=re.stack,me=re.toString();return ae=typeof ae=="string"&&ae.length>0?Pe(re):["    (No stack trace)"],{message:me,stack:re.name=="SyntaxError"?ae:ye(ae)}}function Ze(re,ae,me){if(typeof console<"u"){var De;if(s.isObject(re)){var je=re.stack;De=ae+p(je,re)}
328else De=ae+String(re);typeof y=="function"?y(De,me):(typeof console.log=="function"||typeof console.log=="object")&&console.log(De)}}function dt(re,ae,me,De){var je=!1;try{typeof ae=="function"&&(je=!0,re==="rejectionHandled"?ae(De):ae(me,De))}catch(tt){n.throwLater(tt)}re==="unhandledRejection"?!R(re,me,De)&&!je&&Ze(me,"Unhandled rejection "):R(re,De)}function Re(re){var ae;if(typeof re=="function")ae="[function "+(re.name||"anonymous")+"]";else{ae=re&&typeof re.toString=="function"?re.toString():s.toString(re);var me=/\[object [a-zA-Z0-9$_]+\]/;if(me.test(ae))try{var De=JSON.stringify(re);ae=De}catch{}ae.length===0&&(ae="(empty array)")}return"(<"+N(ae)+">, no stack trace)"}function N(re){var ae=41;return re.length<ae?re:re.substr(0,ae-3)+"..."}function te(){return typeof xe=="function"}var ne=function(){return!1},Z=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Q(re){var ae=re.match(Z);if(ae)return{fileName:ae[1],line:parseInt(ae[2],10)}}function le(re,ae){if(te()){for(var me=re.stack.split(`
329`),De=ae.stack.split(`
330`),je=-1,tt=-1,bt,it,ht=0;ht<me.length;++ht){var kt=Q(me[ht]);if(kt){bt=kt.fileName,je=kt.line;break}}for(var ht=0;ht<De.length;++ht){var kt=Q(De[ht]);if(kt){it=kt.fileName,tt=kt.line;break}}je<0||tt<0||!bt||!it||bt!==it||je>=tt||(ne=function(pe){if(c.test(pe))return!0;var Fe=Q(pe);return!!(Fe&&Fe.fileName===bt&&je<=Fe.line&&Fe.line<=tt)})}}function we(re){this._parent=re,this._promisesCreated=0;var ae=this._length=1+(re===void 0?0:re._length);xe(this,we),ae>32&&this.uncycle()}s.inherits(we,Error),e.CapturedTrace=we,we.prototype.uncycle=function(){var re=this._length;if(!(re<2)){for(var ae=[],me={},De=0,je=this;je!==void 0;++De)ae.push(je),je=je._parent;re=this._length=De;for(var De=re-1;De>=0;--De){var tt=ae[De].stack;me[tt]===void 0&&(me[tt]=De)}for(var De=0;De<re;++De){var bt=ae[De].stack,it=me[bt];if(it!==void 0&&it!==De){it>0&&(ae[it-1]._parent=void 0,ae[it-1]._length=1),ae[De]._parent=void 0,ae[De]._length=1;var ht=De>0?ae[De-1]:this;it<re-1?(ht._parent=ae[it+1],ht._parent.uncycle(),ht._length=ht._parent._length+1):(ht._parent=void 0,ht._length=1);for(var kt=ht._length+1,pe=De-2;pe>=0;--pe)ae[pe]._length=kt,kt++;return}}}},we.prototype.attachExtraTrace=function(re){if(!re.__stackCleaned__){this.uncycle();for(var ae=Ve(re),me=ae.message,De=[ae.stack],je=this;je!==void 0;)De.push(ye(je.stack.split(`
331`))),je=je._parent;ge(De),se(De),s.notEnumerableProp(re,"stack",ce(me,De)),s.notEnumerableProp(re,"__stackCleaned__",!0)}};var xe=(function(){var ae=/^\s*at\s*/,me=function(bt,it){return typeof bt=="string"?bt:it.name!==void 0&&it.message!==void 0?it.toString():Re(it)};if(typeof Error.stackTraceLimit=="number"&&typeof Error.captureStackTrace=="function"){Error.stackTraceLimit+=6,m=ae,p=me;var De=Error.captureStackTrace;return ne=function(bt){return c.test(bt)},function(bt,it){Error.stackTraceLimit+=6,De(bt,it),Error.stackTraceLimit-=6}}var je=new Error;if(typeof je.stack=="string"&&je.stack.split(`
332`)[0].indexOf("stackDetection@")>=0)return m=/@/,p=me,g=!0,function(it){it.stack=new Error().stack};var tt;try{throw new Error}catch(bt){tt="stack"in bt}return!("stack"in je)&&tt&&typeof Error.stackTraceLimit=="number"?(m=ae,p=me,function(it){Error.stackTraceLimit+=6;try{throw new Error}catch(ht){it.stack=ht.stack}Error.stackTraceLimit-=6}):(p=function(bt,it){return typeof bt=="string"?bt:(typeof it=="object"||typeof it=="function")&&it.name!==void 0&&it.message!==void 0?it.toString():Re(it)},null)})();typeof console<"u"&&typeof console.warn<"u"&&(y=function(re){console.warn(re)},s.isNode&&process.stderr.isTTY?y=function(re,ae){var me=ae?"\x1B[33m":"\x1B[31m";console.warn(me+re+`\x1B[0m
333`)}:!s.isNode&&typeof new Error().stack=="string"&&(y=function(re,ae){console.warn("%c"+re,ae?"color: darkorange":"color: red")}));var fe={warnings:x,longStackTraces:!1,cancellation:!1,monitoring:!1};return C&&i.longStackTraces(),{longStackTraces:function(){return fe.longStackTraces},warnings:function(){return fe.warnings},cancellation:function(){return fe.cancellation},monitoring:function(){return fe.monitoring},propagateFromFunction:function(){return G},boundValueFunction:function(){return Y},checkForgottenReturns:q,setBounds:le,warn:J,deprecated:$,CapturedTrace:we,fireDomEvent:T,fireGlobalEvent:S}}),OT}var NT,FU;function gMe(){return FU||(FU=1,NT=function(i,e){var t=Bn(),n=i.C
333ancellationError,r=t.errorObj;function s(f,m,p){this.promise=f,this.type=m,this.handler=p,this.called=!1,this.cancelPromise=null}s.prototype.isFinallyHandler=function(){return this.type===0};function o(f){this.finallyHandler=f}o.prototype._resultCancelled=function(){a(this.finallyHandler)};function a(f,m){return f.cancelPromise!=null?(arguments.length>1?f.cancelPromise._reject(m):f.cancelPromise._cancel(),f.cancelPromise=null,!0):!1}function l(){return d.call(this,this.promise._target()._settledValue())}function c(f){if(!a(this,f))return r.e=f,r}function d(f){var m=this.promise,p=this.handler;if(!this.called){this.called=!0;var g=this.isFinallyHandler()?p.call(m._boundValue()):p.call(m._boundValue(),f);if(g!==void 0){m._setReturnedNonUndefined();var y=e(g,m);if(y instanceof i){if(this.cancelPromise!=null)if(y._isCancelled()){var v=new n("late cancellation observer");return m._attachExtraTrace(v),r.e=v,r}else y.isPending()&&y._attachCancellationCallback(new o(this));return y._then(l,c,void 0,this,void 0)}}}return m.isRejected()?(a(this),r.e=f,r):(a(this),f)}return i.prototype._passThrough=function(f,m,p,g){return typeof f!="function"?this.then():this._then(p,g,void 0,new s(this,m,f),void 0)},i.prototype.lastly=i.prototype.finally=function(f){return this._passThrough(f,0,d,d)},i.prototype.tap=function(f){return this._passThrough(f,1,d)},s}),NT}var BT,OU;function bMe(){return OU||(OU=1,BT=function(i){var e=Bn(),t=cm().keys,n=e.tryCatch,r=e.errorObj;function s(o,a,l){return function(c){var d=l._boundValue();e:for(var f=0;f<o.length;++f){var m=o[f];if(m===Error||m!=null&&m.prototype instanceof Error){if(c instanceof m)return n(a).call(d,c)}else if(typeof m=="function"){var p=n(m).call(d,c);if(p===r)return p;if(p)return n(a).call(d,c)}else if(e.isObject(c)){for(var g=t(m),y=0;y<g.length;++y){var v=g[y];if(m[v]!=c[v])continue e}return n(a).call(d,c)}}return i}}return s}),BT}var MT,NU;function jZ(){if(NU)return MT;NU=1;var i=Bn(),e=i.maybeWrapAsError,t=Hc(),n=t.OperationalError,r=cm();function s(c){return c instanceof Error&&r.getPrototypeOf(c)===Error.prototype}var o=/^(?:name|message|stack|cause)$/;function a(c){var d;if(s(c)){d=new n(c),d.name=c.name,d.message=c.message,d.stack=c.stack;for(var f=r.keys(c),m=0;m<f.length;++m){var p=f[m];o.test(p)||(d[p]=c[p])}return d}return i.markAsOriginatingFromRejection(c),c}function l(c,d){return function(f,m){if(c!==null){if(f){var p=a(e(f));c._attachExtraTrace(p),c._reject(p)}else if(!d)c._fulfill(m);else{for(var g=arguments.length,y=new Array(Math.max(g-1,0)),v=1;v<g;++v)y[v-1]=arguments[v];c._fulfill(y)}c=null}}}return MT=l,MT}var LT,BU;function yMe(){return BU||(BU=1,LT=function(i,e,t,n,r){var s=Bn(),o=s.tryCatch;i.method=function(a){if(typeof a!="function")throw new i.TypeError("expecting a function but got "+s.classString(a));return function(){var l=new i(e);l._captureStackTrace(),l._pushContext();var c=o(a).apply(this,arguments),d=l._popContext();return r.checkForgottenReturns(c,d,"Promise.method",l),l._resolveFromSyncValue(c),l}},i.attempt=i.try=function(a){if(typeof a!="function")return n("expecting a function but got "+s.classString(a));var l=new i(e);l._captureStackTrace(),l._pushContext();var c;if(arguments.length>1){r.deprecated("calling Promise.try with more than 1 argument");var d=arguments[1],f=arguments[2];c=s.isArray(d)?o(a).apply(f,d):o(a).call(f,d)}else c=o(a)();var m=l._popContext();return r.checkForgottenReturns(c,m,"Promise.try",l),l._resolveFromSyncValue(c),l},i.prototype._resolveFromSyncValue=function(a){a===s.errorObj?this._rejectCallback(a.e,!1):this._resolveCallback(a,!0)}}),LT}var UT,MU;function vMe(){return MU||(MU=1,UT=function(i,e,t,n){var r=!1,s=function(c,d){this._reject(d)}
333,o=function(c,d){d.promiseRejectionQueued=!0,d.bindingPromise._then(s,s,null,this,c)},a=function(c,d){(this._bitField&50397184)===0&&this._resolveCallback(d.target)},l=function(c,d){d.promiseRejectionQueued||this._reject(c)};i.prototype.bind=function(c){r||(r=!0,i.prototype._propagateFrom=n.propagateFromFunction(),i.prototype._boundValue=n.boundValueFunction());var d=t(c),f=new i(e);f._propagateFrom(this,1);var m=this._target();if(f._setBoundTo(d),d instanceof i){var p={promiseRejectionQueued:!1,promise:f,target:m,bindingPromise:d};m._then(e,o,void 0,f,p),d._then(a,l,void 0,f,p),f._setOnCancel(d)}else f._resolveCallback(m);return f},i.prototype._setBoundTo=function(c){c!==void 0?(this._bitField=this._bitField|2097152,this._boundTo=c):this._bitField=this._bitField&-2097153},i.prototype._isBound=function(){return(this._bitField&2097152)===2097152},i.bind=function(c,d){return i.resolve(d).bind(c)}}),UT}var VT,LU;function wMe(){return LU||(LU=1,VT=function(i,e,t,n){var r=Bn(),s=r.tryCatch,o=r.errorObj,a=i._async;i.prototype.break=i.prototype.cancel=function(){if(!n.cancellation())return this._warn("cancellation is disabled");for(var l=this,c=l;l._isCancellable();){if(!l._cancelBy(c)){c._isFollowing()?c._followee().cancel():c._cancelBranched();break}var d=l._cancellationParent;if(d==null||!d._isCancellable()){l._isFollowing()?l._followee().cancel():l._cancelBranched();break}else l._isFollowing()&&l._followee().cancel(),l._setWillBeCancelled(),c=l,l=d}},i.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},i.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},i.prototype._cancelBy=function(l){return l===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},i.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},i.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),a.invoke(this._cancelPromises,this,void 0))},i.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},i.prototype._unsetOnCancel=function(){this._onCancelField=void 0},i.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},i.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},i.prototype._doInvokeOnCancel=function(l,c){if(r.isArray(l))for(var d=0;d<l.length;++d)this._doInvokeOnCancel(l[d],c);else if(l!==void 0)if(typeof l=="function"){if(!c){var f=s(l).call(this._boundValue());f===o&&(this._attachExtraTrace(f.e),a.throwLater(f.e))}}else l._resultCancelled(this)},i.prototype._invokeOnCancel=function(){var l=this._onCancel();this._unsetOnCancel(),a.invoke(this._doInvokeOnCancel,this,l)},i.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},i.prototype._resultCancelled=function(){this.cancel()}}),VT}var jT,UU;function xMe(){return UU||(UU=1,jT=function(i){function e(){return this.value}function t(){throw this.reason}i.prototype.return=i.prototype.thenReturn=function(n){return n instanceof i&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},i.prototype.throw=i.prototype.thenThrow=function(n){return this._then(t,void 0,void 0,{reason:n},void 0)},i.prototype.catchThrow=function(n){if(arguments.length<=1)return this._then(void 0,t,void 0,{reason:n},void 0);var r=arguments[1],s=function(){throw r};return this.caught(n,s)},i.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof i&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof i&&r.suppressUnhandledRejections();var s=function(){return r};return this.caught(n,s)}}),jT}var zT,VU;function _Me(){return VU||(VU=1,zT=function(i){function e(l){l!==void 0?(l=l._target(),this._bitField=l._bitField,this._settledValueField=l._isFateSealed()?l._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var t=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError(`cannot get fulfillment value of a non-fulfilled promise
334
335    See http://goo.gl/MqrFmX
336`);return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError(`cannot get rejection reason of a non-rejected promise
337
338    See http://goo.gl/MqrFmX
339`);return this._settledValue()},r=e.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0},s=e.prototype.isRejected=function(){return(this._bitField&16777216)!==0},o=e.prototype.isPending=function(){return(this._bitField&50397184)===0},a=e.prototype.isResolved=function(){return(this._bitField&50331648)!==0};e.prototype.isCancelled=function(){return(this._bitField&8454144)!==0},i.prototype.__isCancelled=function(){return(this._bitField&65536)===6
3395536},i.prototype._isCancelled=function(){return this._target().__isCancelled()},i.prototype.isCancelled=function(){return(this._target()._bitField&8454144)!==0},i.prototype.isPending=function(){return o.call(this._target())},i.prototype.isRejected=function(){return s.call(this._target())},i.prototype.isFulfilled=function(){return r.call(this._target())},i.prototype.isResolved=function(){return a.call(this._target())},i.prototype.value=function(){return t.call(this._target())},i.prototype.reason=function(){var l=this._target();return l._unsetRejectionIsUnhandled(),n.call(l)},i.prototype._value=function(){return this._settledValue()},i.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},i.PromiseInspection=e}),zT}var WT,jU;function CMe(){return jU||(jU=1,WT=function(i,e,t,n,r,s){var o=Bn(),a=o.canEvaluate,l=o.tryCatch,c=o.errorObj,d;if(a){for(var f=function(C){return new Function("value","holder",`                             
340	            'use strict';                                                    
341	            holder.pIndex = value;                                           
342	            holder.checkFulfillment(this);                                   
343	            `.replace(/Index/g,C))},m=function(C){return new Function("promise","holder",`                           
344	            'use strict';                                                    
345	            holder.pIndex = promise;                                         
346	            `.replace(/Index/g,C))},p=function(C){for(var D=new Array(C),E=0;E<D.length;++E)D[E]="this.p"+(E+1);var T=D.join(" = ")+" = null;",S=`var promise;
347`+D.map(function(O){return`                                                         
348	                promise = `+O+`;                                      
349	                if (promise instanceof Promise) {                            
350	                    promise.cancel();                                        
351	                }                                                            
352	            `}).join(`
353`),A=D.join(", "),I="Holder$"+C,R=`return function(tryCatch, errorObj, Promise, async) {    
354	            'use strict';                                                    
355	            function [TheName](fn) {                                         
356	                [TheProperties]                                              
357	                this.fn = fn;                                                
358	                this.asyncNeeded = true;                                     
359	                this.now = 0;                                                
360	            }                                                                
361	                                                                             
362	            [TheName].prototype._callFunction = function(promise) {          
363	                promise._pushContext();                                      
364	                var ret = tryCatch(this.fn)([ThePassedArguments]);           
365	                promise._popContext();                                       
366	                if (ret === errorObj) {                                      
367	                    promise._rejectCallback(ret.e, false);                   
368	                } else {                                                     
369	                    promise._resolveCallback(ret);                           
370	                }                                                            
371	            };                                                               
372	                                                                             
373	            [TheName].prototype.checkFulfillment = function(promise) {       
374	                var now = ++this.now;                                        
375	                if (now === [TheTotal]) {                                    
376	                    if (this.asyncNeeded) {                                  
377	                        async.invoke(this._callFunction, this, promise);     
378	                    } else {                                                 
379	                        this._callFunction(promise);                         
380	                    }                                                        
381	                                                                             
382	                }                                                            
383	            };                                                               
384	                                                                             
385	            [TheName].prototype._resultCancelled = function() {              
386	                [CancellationCode]                                           
387	            };                                                               
388	                                                                             
389	            return [TheName];                                                
390	        }(tryCatch, errorObj, Promise, async);                               
391	        `;return R=R.replace(/\[TheName\]/g,I).replace(/\[TheTotal\]/g,C).replace(/\[ThePassedArguments\]/g,A).replace(/\[TheProperties\]/g,T).replace(/\[CancellationCode\]/g,S),new Function("tryCatch","errorObj","Promise","async",R)(l,c,i,r)},g=[],y=[],v=[],x=0;x<8;++x)g.push(p(x+1)),y.push(f(x+1)),v.push(m(x+1));d=function(C){this._reject(C)}}i.join=function(){var C=arguments.length-1,D;if(C>0&&typeof arguments[C]=="function"&&(D=arguments[C],C<=8&&a)){var F=new i(n);F._captureStackTrace();for(var E=g[C-1],T=new E(D),S=y,A=0;A<C;
391++A){var I=t(arguments[A],F);if(I instanceof i){I=I._target();var R=I._bitField;(R&50397184)===0?(I._then(S[A],d,void 0,F,T),v[A](I,T),T.asyncNeeded=!1):(R&33554432)!==0?S[A].call(F,I._value(),T):(R&16777216)!==0?F._reject(I._reason()):F._cancel()}else S[A].call(F,I,T)}if(!F._isFateSealed()){if(T.asyncNeeded){var O=s();O!==null&&(T.fn=o.domainBind(O,T.fn))}F._setAsyncGuaranteed(),F._setOnCancel(T)}return F}for(var j=arguments.length,B=new Array(j),U=0;U<j;++U)B[U]=arguments[U];D&&B.pop();var F=new e(B).promise();return D!==void 0?F.spread(D):F}}),WT}var HT,zU;function DMe(){return zU||(zU=1,HT=function(i,e,t,n,r,s){var o=i._getDomain,a=Bn(),l=a.tryCatch,c=a.errorObj,d=i._async;function f(p,g,y,v){this.constructor$(p),this._promise._captureStackTrace();var x=o();this._callback=x===null?g:a.domainBind(x,g),this._preservedValues=v===r?new Array(this.length()):null,this._limit=y,this._inFlight=0,this._queue=[],d.invoke(this._asyncInit,this,void 0)}a.inherits(f,e),f.prototype._asyncInit=function(){this._init$(void 0,-2)},f.prototype._init=function(){},f.prototype._promiseFulfilled=function(p,g){var y=this._values,v=this.length(),x=this._preservedValues,C=this._limit;if(g<0){if(g=g*-1-1,y[g]=p,C>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(C>=1&&this._inFlight>=C)return y[g]=p,this._queue.push(g),!1;x!==null&&(x[g]=p);var D=this._promise,E=this._callback,T=D._boundValue();D._pushContext();var S=l(E).call(T,p,g,v),A=D._popContext();if(s.checkForgottenReturns(S,A,x!==null?"Promise.filter":"Promise.map",D),S===c)return this._reject(S.e),!0;var I=n(S,this._promise);if(I instanceof i){I=I._target();var R=I._bitField;if((R&50397184)===0)return C>=1&&this._inFlight++,y[g]=I,I._proxy(this,(g+1)*-1),!1;
391if((R&33554432)!==0)S=I._value();else return(R&16777216)!==0?(this._reject(I._reason()),!0):(this._cancel(),!0)}y[g]=S}var O=++this._totalResolved;return O>=v?(x!==null?this._filter(y,x):this._resolve(y),!0):!1},f.prototype._drainQueue=function(){for(var p=this._queue,g=this._limit,y=this._values;p.length>0&&this._inFlight<g;){if(this._isResolved())return;var v=p.pop();this._promiseFulfilled(y[v],v)}},f.prototype._filter=function(p,g){for(var y=g.length,v=new Array(y),x=0,C=0;C<y;++C)p[C]&&(v[x++]=g[C]);v.length=x,this._resolve(v)},f.prototype.preservedValues=function(){return this._preservedValues};function m(p,g,y,v){if(typeof g!="function")return t("expecting a function but got "+a.classString(g));var x=0;if(y!==void 0)if(typeof y=="object"&&y!==null){if(typeof y.concurrency!="number")return i.reject(new TypeError("'concurrency' must be a number but it is "+a.classString(y.concurrency)));x=y.concurrency}else return i.reject(new TypeError("options argument must be an object but it is "+a.classString(y)));return x=typeof x=="number"&&isFinite(x)&&x>=1?x:0,new f(p,g,x,v).promise()}i.prototype.map=function(p,g){return m(this,p,g,null)},i.map=function(p,g,y,v){return m(p,g,y,v)}}),HT}var qT,WU;function EMe(){if(WU)return qT;WU=1;var i=Object.create;if(i){var e=i(null),t=i(null);e[" size"]=t[" size"]=0}return qT=function(n){var r=Bn(),s=r.canEvaluate,o=r.isIdentifier,a,l;{var c=function(v){return new Function("ensureMethod",`                                    
392	        return function(obj) {                                               
393	            'use strict'                                                     
394	            var len = this.length;                                           
395	            ensureMethod(obj, 'methodName');                                 
396	            switch(len) {                                                    
397	                case 1: return obj.methodName(this[0]);                      
398	                case 2: return obj.methodName(this[0], this[1]);             
399	                case 3: return obj.methodName(this[0], this[1], this[2]);    
400	                case 0: return obj.methodName();                             
401	                default:                                                     
402	                    return obj.methodName.apply(obj, this);                  
403	            }                                                                
404	        };                                                                   
405	        `.replace(/methodName/g,v))(m)},d=function(v){return new Function("obj",`                                             
406	        'use strict';                                                        
407	        return obj.propertyName;                                             
408	        `.replace("propertyName",v))},f=function(v,x,C){var D=C[v];if(typeof D!="function"){if(!o(v))return null;if(D=x(v),C[v]=D,C[" size"]++,C[" size"]>512){for(var E=Object.keys(C),T=0;T<256;++T)delete C[E[T]];C[" size"]=E.length-256}}return D};a=function(v){return f(v,c,e)},l=function(v){return f(v,d,t)}}function m(v,x){var C;if(v!=null&&(C=v[x]),typeof C!="function"){var D="Object "+r.classString(v)+" has no method '"+r.toString(x)+"'";throw new n.TypeError(D)}return C}function p(v){var x=this.pop(),C=m(v,x);return C.apply(v,this)}n.prototype.call=function(v){for(var x=arguments.length,C=new Array(Math.max(x-1,0)),D=1;D<x;++D)C[D-1]=arguments[D];if(s){var E=a(v);if(E!==null)return this._then(E,void 0,void 0,C,void 0)}return C.push(v),this._then(p,void 0,void 0,C,void 0)};function g(v){return v[this]}function y(v){var x=+this;return x<0&&(x=Math.max(0,x+v.length)),v[x]}n.prototype.get=function(v){var x=typeof v=="number",C;if(x)C=y;else if(s){var D=l(v);C=D!==null?D:g}else C=g;return this._then(C,void 0,void 0,v,void 0)}},qT}var $T,HU;function TMe(){return HU||(HU=1,$T=function(i,e,t,n,r,s){var o=Bn(),a=Hc().TypeError,l=Bn().inherits,c=o.errorObj,d=o.tryCatch,f={};function m(D){setTimeout(function(){throw D},0)}function p(D){var E=t(D);return E!==D&&typeof D._isDisposable=="function"&&typeof D._getDisposer=="function"&&D._isDisposable()&&E._setDisposable(D._getDisposer()),E}function g(D,E){var T=0,S=D.length,A=new i(r);function I(){if(T>=S)return A._fulfill();var R=p(D[T++]);if(R instanceof i&&R._isDisposable()){try{R=t(R._getDisposer().tryDispose(E),D.promise)}catch(O){return m(O)}if(R instanceof i)return R._then(I,m,null,null,null)}I()}return I(),A}function y(D,E,T){this._data=D,this._promise=E,this._context=T}y.prototype.data=function(){return this._data},y.prototype.promise=function(){return this._promise},y.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value(
408):f},y.prototype.tryDispose=function(D){var E=this.resource(),T=this._context;T!==void 0&&T._pushContext();var S=E!==f?this.doDispose(E,D):null;return T!==void 0&&T._popContext(),this._promise._unsetDisposable(),this._data=null,S},y.isDisposer=function(D){return D!=null&&typeof D.resource=="function"&&typeof D.tryDispose=="function"};function v(D,E,T){this.constructor$(D,E,T)}l(v,y),v.prototype.doDispose=function(D,E){var T=this.data();return T.call(D,D,E)};function x(D){return y.isDisposer(D)?(this.resources[this.index]._setDisposable(D),D.promise()):D}function C(D){this.length=D,this.promise=null,this[D-1]=null}C.prototype._resultCancelled=function(){for(var D=this.length,E=0;E<D;++E){var T=this[E];T instanceof i&&T.cancel()}},i.using=function(){var D=arguments.length;if(D<2)return e("you must pass at least 2 arguments to Promise.using");var E=arguments[D-1];if(typeof E!="function")return e("expecting a function but got "+o.classString(E));var T,S=!0;D===2&&Array.isArray(arguments[0])?(T=arguments[0],D=T.length,S=!1):(T=arguments,D--);for(var A=new C(D),I=0;I<D;++I){var R=T[I];if(y.isDisposer(R)){var O=R;R=R.promise(),R._setDisposable(O)}else{var j=t(R);j instanceof i&&(R=j._then(x,null,null,{resources:A,index:I},void 0))}A[I]=R}for(var B=new Array(A.length),I=0;I<B.length;++I)B[I]=i.resolve(A[I]).reflect();var U=i.all(B).then(function(H){for(var L=0;L<H.length;++L){var W=H[L];if(W.isRejected())return c.e=W.error(),c;if(!W.isFulfilled()){U.cancel();return}H[L]=W.value()}F._pushContext(),E=d(E);var G=S?E.apply(void 0,H):E(H),Y=F._popContext();return s.checkForgottenReturns(G,Y,"Promise.using",F),G}),F=U.lastly(function(){var H=new i.PromiseInspection(U);return g(A,H)});return A.promise=F,F._setOnCancel(A),F},i.prototype._setDisposable=function(D){this._bitField=this._bitField|131072,this._disposer=D},i.prototype._isDisposable=function(){return(this._bitField&131072)>0},i.prototype._getDisposer=function(){return this._disposer},i.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},i.prototype.disposer=function(D){if(typeof D=="function")return new v(D,this,n());throw new a}}),$T}var GT,qU;function AMe(){return qU||(qU=1,GT=function(i,e,t){var n=Bn(),r=i.TimeoutError;function s(f){this.handle=f}s.prototype._resultCancelled=function(){clearTimeout(this.handle)};var o=function(f){return a(+this).thenReturn(f)},a=i.delay=function(f,m){var p,g;return m!==void 0?(p=i.resolve(m)._then(o,null,null,f,void 0),t.cancellation()&&m instanceof i&&p._setOnCancel(m)):(p=new i(e),g=setTimeout(function(){p._fulfill()},+f),t.cancellation()&&p._setOnCancel(new s(g)),p._captureStackTrace()),p._setAsyncGuaranteed(),p};i.prototype.delay=function(f){return a(f,this)};var l=function(f,m,p){var g;typeof m!="string"?m instanceof Error?g=m:g=new r("operation timed out"):g=new r(m),n.markAsOriginatingFromRejection(g),f._attachExtraTrace(g),f._reject(g),p?.cancel()};function c(f){return clearTimeout(this.handle),f}function d(f){throw clearTimeout(this.handle),f}i.prototype.timeout=function(f,m){f=+f;var p,g,y=new s(setTimeout(function(){p.isPending()&&l(p,m,g)},f));return t.cancellation()?(g=this.then(),p=g._then(c,d,void 0,y,void 0),p._setOnCancel(y)):p=this._then(c,d,void 0,y,void 0),p}}),GT}var YT,$U;function kMe(){return $U||($U=1,YT=function(i,e,t,n,r,s){var o=Hc(),a=o.TypeError,l=Bn(),c=l.errorObj,d=l.tryCatch,f=[];function m(g,y,v){for(var x=0;x<y.length;++x){v._pushContext();var C=d(y[x])(g);if(v._popContext(),C===c){v._pushContext();var D=i.reject(c.e);return v._popContext(),D}var E=n(C,v);if(E instanceof i)return E}return null}function p(g,y,v,x){if(s.cancellation()){var C=new i(t),D=this._finallyPromise=new i(t);this._promise=C.lastly(function(){return D}),C._captureStackTrace(),C._setOnCancel(this)}else{var E=this._promise=new i(t);E._captureStackTrace()}this._stack=x,this._generatorFunction=g,this._receiver=y,this._generator=void 0,this._yieldHandlers=typeof v=="function"?[v].concat(f):f,this._yieldedPromise=null,this._cancellationPhase=!1}l.inherits(p,r),p.prototype._isResolved=function(){return this._promise===null},p.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&this._finallyPromise!==null&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},p.prototype._promiseCancelled=function(){if(!this._isResolved()){var g=typeof this._generator.return<"u",y;
408if(g)this._promise._pushContext(),y=d(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var v=new i.CancellationError("generator .return() sentinel");i.coroutine.returnSentinel=v,this._promise._attachExtraTrace(v),this._promise._pushContext(),y=d(this._generator.throw).call(this._generator,v),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(y)}},p.prototype._promiseFulfilled=function(g){this._yieldedPromise=null,this._promise._pushContext();var y=d(this._generator.next).call(this._generator,g);this._promise._popContext(),this._continue(y)},p.prototype._promiseRejected=function(g){this._yieldedPromise=null,this._promise._attachExtraTrace(g),this._promise._pushContext();var y=d(this._generator.throw).call(this._generator,g);this._promise._popContext(),this._continue(y)},p.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof i){var g=this._yieldedPromise;this._yieldedPromise=null,g.cancel()}},p.prototype.promise=function(){return this._promise},p.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},p.prototype._continue=function(g){var y=this._promise;if(g===c)return this._cleanup(),this._cancellationPhase?y.cancel():y._rejectCallback(g.e,!1);var v=g.value;if(g.done===!0)return this._cleanup(),this._cancellationPhase?y.cancel():y._resolveCallback(v);var x=n(v,this._promise);if(!(x instanceof i)&&(x=m(x,this._yieldHandlers,this._promise),x===null)){this._promiseRejected(new a(`A value %s was yielded that could not be treated as a promise
409
410    See http://goo.gl/MqrFmX
411
412`.replace("%s",v)+`From coroutine:
413`+this._stack.split(`
414`).slice(1,-7).join(`
415`)));return}x=x._target();var C=x._bitField;(C&50397184)===0?(this._yieldedPromise=x,x._proxy(this,null)):(C&33554432)!==0?i._async.invoke(this._promiseFulfilled,this,x._value()):(C&16777216)!==0?i._async.invoke(this._promiseRejected,this,x._reason()):this._promiseCancelled()},i.coroutine=function(g,y){if(typeof g!="function")throw new a(`generatorFunction must be a function
416
417    See http://goo.gl/MqrFmX
418`);var v=Object(y).yieldHandler,x=p,C=new Error().stack;return function(){var D=g.apply(this,arguments),E=new x(void 0,void 0,v,C),T=E.promise();return E._generator=D,E._promiseFulfilled(void 0),T}},i.coroutine.addYieldHandler=function(g){if(typeof g!="function")throw new a("expecting a function but got "+l.classString(g));f.push(g)},i.spawn=function(g){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),typeof g!="function")return e(`generatorFunction must be a function
419
420    See http://goo.gl/MqrFmX
421`);var y=new p(g,this),v=y.promise();return y._run(i.spawn),v}}),YT}var KT,GU;function SMe(){return GU||(GU=1,KT=function(i){var e=Bn(),t=i._async,n=e.tryCatch,r=e.errorObj;function s(l,c){var d=this;if(!e.isArray(l))return o.call(d,l,c);var f=n(c).apply(d._boundValue(),[null].concat(l));f===r&&t.throwLater(f.e)}function o(l,c){var d=this,f=d._boundValue(),m=l===void 0?n(c).call(f,null):n(c).call(f,null,l);m===r&&t.throwLater(m.e)}function a(l,c){var d=this;if(!l){var f=new Error(l+"");f.cause=l,l=f}var m=n(c).call(d._boundValue(),l);m===r&&t.throwLater(m.e)}i.prototype.asCallback=i.prototype.nodeify=function(l,c){if(typeof l=="function"){var d=o;c!==void 0&&Object(c).spread&&(d=s),this._then(d,a,void 0,this,l)}return this}}),KT}var XT,YU;function PMe(){return YU||(YU=1,XT=function(i,e){var t={},n=Bn(),r=jZ(),s=n.withAppended,o=n.maybeWrapAsError,a=n.canEvaluate,l=Hc().TypeError,c="Async",d={__isPromisified__:!0},f=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],m=new RegExp("^(?:"+f.join("|")+")$"),p=function(U){return n.isIdentifier(U)&&U.charAt(0)!=="_"&&U!=="constructor"};function g(U){return!m.test(U)}function y(U){try{return U.__isPromisified__===!0}catch{return!1}}function v(U,F,H){var L=n.getDataPropertyOrDefault(U,F+H,d);return L?y(L):!1}function x(U,F,H){for(var L=0;L<U.length;L+=2){var W=U[L];if(H.test(W)){for(var G=W.replace(H,""),Y=0;Y<U.length;Y+=2)if(U[Y]===G)throw new l(`Cannot promisify an API that has normal methods with '%s'-suffix
422
423    See http://goo.gl/MqrFmX
424`.replace("%s",F))}}}function C(U,F,H,L){for(var W=n.inheritedDataKeys(U),G=[],Y=0;Y<W.length;++Y){var ie=W[Y],V=U[ie],q=L===p?!0:p(ie);
424typeof V=="function"&&!y(V)&&!v(U,ie,F)&&L(ie,V,U,q)&&G.push(ie,V)}return x(G,F,H),G}var D=function(U){return U.replace(/([$])/,"\\$")},E;{var T=function(U){for(var F=[U],H=Math.max(0,U-1-3),L=U-1;L>=H;--L)F.push(L);for(var L=U+1;L<=3;++L)F.push(L);return F},S=function(U){return n.filledRange(U,"_arg","")},A=function(U){return n.filledRange(Math.max(U,3),"_arg","")},I=function(U){return typeof U.length=="number"?Math.max(Math.min(U.length,1024),0):0};E=function(U,F,H,L,W,G){var Y=Math.max(0,I(L)-1),ie=T(Y),V=typeof U=="string"||F===t;function q(se){var ge=S(se).join(", "),ye=se>0?", ":"",Pe;return V?Pe=`ret = callback.call(this, {{args}}, nodeback); break;
425`:Pe=F===void 0?`ret = callback({{args}}, nodeback); break;
426`:`ret = callback.call(receiver, {{args}}, nodeback); break;
427`,Pe.replace("{{args}}",ge).replace(", ",ye)}function $(){for(var se="",ge=0;ge<ie.length;++ge)se+="case "+ie[ge]+":"+q(ie[ge]);return se+=`                                                             
428	        default:                                                             
429	            var args = new Array(len + 1);                                   
430	            var i = 0;                                                       
431	            for (var i = 0; i < len; ++i) {                                  
432	               args[i] = arguments[i];                                       
433	            }                                                                
434	            args[i] = nodeback;                                              
435	            [CodeForCall]                                                    
436	            break;                                                           
437	        `.replace("[CodeForCall]",V?`ret = callback.apply(this, args);
438`:`ret = callback.apply(receiver, args);
439`),se}var J=typeof U=="string"?"this != null ? this['"+U+"'] : fn":"fn",ce=`'use strict';                                                
440	        var ret = function (Parameters) {                                    
441	            'use strict';                                                    
442	            var len = arguments.length;                                      
443	            var promise = new Promise(INTERNAL);                             
444	            promise._captureStackTrace();                                    
445	            var nodeback = nodebackForPromise(promise, `+G+`);   
446	            var ret;                                                         
447	            var callback = tryCatch([GetFunctionCode]);                      
448	            switch(len) {                                                    
449	                [CodeForSwitchCase]                                          
450	            }                                                                
451	            if (ret === errorObj) {                                          
452	                promise._rejectCallback(maybeWrapAsError(ret.e), true, true);
453	            }                                                                
454	            if (!promise._isFateSealed()) promise._setAsyncGuaranteed();     
455	            return promise;                                                  
456	        };                                                                   
457	        notEnumerableProp(ret, '__isPromisified__', true);                   
458	        return ret;                                                          
459	    `.replace("[CodeForSwitchCase]",$()).replace("[GetFunctionCode]",J);return ce=ce.replace("Parameters",A(Y)),new Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",ce)(i,L,F,s,o,r,n.tryCatch,n.errorObj,n.notEnumerableProp,e)}}function R(U,F,H,L,W,G){var Y=(function(){return this})(),ie=U;typeof ie=="string"&&(U=L);function V(){var q=F;F===t&&(q=this);var $=new i(e);$._captureStackTrace();var J=typeof ie=="string"&&this!==Y?this[ie]:U,ce=r($,G);try{J.apply(q,s(arguments,ce))}catch(se){$._rejectCallback(o(se),!0,!0)}return $._isFateSealed()||$._setAsyncGuaranteed(),$}return n.notEnumerableProp(V,"__isPromisified__",!0),V}var O=a?E:R;function j(U,F,H,L,W){for(var G=new RegExp(D(F)+"$"),Y=C(U,F,G,H),ie=0,V=Y.length;ie<V;ie+=2){var q=Y[ie],$=Y[ie+1],J=q+F;if(L===O)U[J]=O(q,t,q,$,F,W);else{var ce=L($,function(){return O(q,t,q,$,F,W)});n.notEnumerableProp(ce,"__isPromisified__",!0),U[J]=ce}}return n.toFastProperties(U),U}function B(U,F,H){return O(U,F,void 0,U,null,H)}i.promisify=function(U,F){if(typeof U!="function")throw new l("expecting a function but got "+n.classString(U));if(y(U))return U;F=Object(F);var H=F.context===void 0?t:F.context,L=!!F.multiArgs,W=B(U,H,L);return n.copyDescriptors(U,W,g),W},i.promisifyAll=function(U,F){if(typeof U!="function"&&typeof U!="object")throw new l(`the target of promisifyAll must be an object or a function
460
461    See http://goo.gl/MqrFmX
462`);F=Object(F);var H=!!F.multiArgs,L=F.suffix;
462typeof L!="string"&&(L=c);var W=F.filter;typeof W!="function"&&(W=p);var G=F.promisifier;if(typeof G!="function"&&(G=O),!n.isIdentifier(L))throw new RangeError(`suffix must be a valid identifier
463
464    See http://goo.gl/MqrFmX
465`);for(var Y=n.inheritedDataKeys(U),ie=0;ie<Y.length;++ie){var V=U[Y[ie]];Y[ie]!=="constructor"&&n.isClass(V)&&(j(V.prototype,L,W,G,H),j(V,L,W,G,H))}return j(U,L,W,G,H)}}),XT}var QT,KU;function IMe(){return KU||(KU=1,QT=function(i,e,t,n){var r=Bn(),s=r.isObject,o=cm(),a;typeof Map=="function"&&(a=Map);var l=(function(){var m=0,p=0;function g(y,v){this[m]=y,this[m+p]=v,m++}return function(v){p=v.size,m=0;var x=new Array(v.size*2);return v.forEach(g,x),x}})(),c=function(m){for(var p=new a,g=m.length/2|0,y=0;y<g;++y){var v=m[g+y],x=m[y];p.set(v,x)}return p};function d(m){var p=!1,g;if(a!==void 0&&m instanceof a)g=l(m),p=!0;else{var y=o.keys(m),v=y.length;g=new Array(v*2);for(var x=0;x<v;++x){var C=y[x];g[x]=m[C],g[x+v]=C}}this.constructor$(g),this._isMap=p,this._init$(void 0,-3)}r.inherits(d,e),d.prototype._init=function(){},d.prototype._promiseFulfilled=function(m,p){this._values[p]=m;var g=++this._totalResolved;if(g>=this._length){var y;if(this._isMap)y=c(this._values);else{y={};for(var v=this.length(),x=0,C=this.length();x<C;++x)y[this._values[x+v]]=this._values[x]}return this._resolve(y),!0}return!1},d.prototype.shouldCopyValues=function(){return!1},d.prototype.getActualLength=function(m){return m>>1};function f(m){var p,g=t(m);if(s(g))g instanceof i?p=g._then(i.props,void 0,void 0,void 0,void 0):p=new d(g).promise();else return n(`cannot await properties of a non-object
466
467    See http://goo.gl/MqrFmX
468`);return g instanceof i&&p._propagateFrom(g,2),p}i.prototype.props=function(){return f(this)},i.props=function(m){return f(m)}}),QT}var ZT,XU;function RMe(){return XU||(XU=1,ZT=function(i,e,t,n){var r=Bn(),s=function(a){return a.then(function(l){return o(l,a)})};function o(a,l){var c=t(a);if(c instanceof i)return s(c);if(a=r.asArray(a),a===null)return n("expecting an array or an iterable object but got "+r.classString(a));var d=new i(e);l!==void 0&&d._propagateFrom(l,3);for(var f=d._fulfill,m=d._reject,p=0,g=a.length;p<g;++p){var y=a[p];y===void 0&&!(p in a)||i.cast(y)._then(f,m,void 0,d,null)}return d}i.race=function(a){return o(a,void 0)},i.prototype.race=function(){return o(this,void 0)}}),ZT}var JT,QU;function FMe(){return QU||(QU=1,JT=function(i,e,t,n,r,s){var o=i._getDomain,a=Bn(),l=a.tryCatch;function c(g,y,v,x){this.constructor$(g);var C=o();this._fn=C===null?y:a.domainBind(C,y),v!==void 0&&(v=i.resolve(v),v._attachCancellationCallback(this)),this._initialValue=v,this._currentCancellable=null,x===r?this._eachValues=Array(this._length):x===0?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}a.inherits(c,e),c.prototype._gotAccum=function(g){this._eachValues!==void 0&&this._eachValues!==null&&g!==r&&this._eachValues.push(g)},c.prototype._eachComplete=function(g){return this._eachValues!==null&&this._eachValues.push(g),this._eachValues},c.prototype._init=function(){},c.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==void 0?this._eachValues:this._initialValue)},c.prototype.shouldCopyValues=function(){return!1},c.prototype._resolve=function(g){this._promise._resolveCallback(g),this._values=null},c.prototype._resultCancelled=function(g){if(g===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof i&&this._currentCancellable.cancel(),this._initialValue instanceof i&&this._initialValue.cancel())},c.prototype._iterate=function(g){this._values=g;var y,v,x=g.length;if(this._initialValue!==void 0?(y=this._initialValue,v=0):(y=i.resolve(g[0]),v=1),this._currentCancellable=y,!y.isRejected())for(;v<x;++v){var C={accum:null,value:g[v],index:v,length:x,array:this};y=y._then(m,void 0,void 0,C,void 0)}this._eachValues!==void 0&&(y=y._then(this._eachComplete,void 0,void 0,this,void 0)),y._then(d,d,void 0,y,this)},i.prototype.reduce=function(g,y){return f(this,g,y,null)},i.reduce=function(g,y,v,x){return f(g,y,v,x)};function d(g,y){this.isFulfilled()?y._resolve(g):y._reject(g)}function f(g,y,v,x){if(typeof y!="function")return t("expecting a function but got "+a.classString(y));var C=new c(g,y,v,x);return C.promise()}function m(g){this.accum=g,this.array._gotAccum(g);var y=n(this.value,this.array._promise);return y instanceof i?(this.array._currentCancellable=y,y._then(p,void 0,void 0,this,void 0)):p.call(this,y)}function p(g){var y=this.array,v=y._promise,x=l(y._fn);v._pushContext();var C;y._eachValues!==void 0?C=x.call(v._boundValue(),g,this.index,this.length):C=x.call(v._boundValue(),this.accum,g,this.index,this.length),C instanceof i&&(y._currentCancellable=C);var D=v._popContext();return s.checkForgottenReturns(C,D,y._eachValues!==void 0?"Promise.each":"Promise.reduce",v),C}}),JT}var eA,ZU;function OMe(){return ZU||(ZU=1,eA=function(i,e,t){var n=i.PromiseInspection,r=Bn();function s(o){this.constructor$(o)}r.inherits(s,e),s.prototype._promiseResolved=function(o,a){this._values[o]=a;var l=++this._totalResolved;return l>=this._length?(this._resolve(this._values),!0):!1},s.prototype._promiseFulfilled=function(o,a){var l=new n;return l._bitField=33554432,l._settledValueField=o,this._promiseResolved(a,l)}
468,s.prototype._promiseRejected=function(o,a){var l=new n;return l._bitField=16777216,l._settledValueField=o,this._promiseResolved(a,l)},i.settle=function(o){return t.deprecated(".settle()",".reflect()"),new s(o).promise()},i.prototype.settle=function(){return i.settle(this)}}),eA}var tA,JU;function NMe(){return JU||(JU=1,tA=function(i,e,t){var n=Bn(),r=Hc().RangeError,s=Hc().AggregateError,o=n.isArray,a={};function l(d){this.constructor$(d),this._howMany=0,this._unwrap=!1,this._initialized=!1}n.inherits(l,e),l.prototype._init=function(){if(this._initialized){if(this._howMany===0){this._resolve([]);return}this._init$(void 0,-5);var d=o(this._values);!this._isResolved()&&d&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},l.prototype.init=function(){this._initialized=!0,this._init()},l.prototype.setUnwrap=function(){this._unwrap=!0},l.prototype.howMany=function(){return this._howMany},l.prototype.setHowMany=function(d){this._howMany=d},l.prototype._promiseFulfilled=function(d){return this._addFulfilled(d),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),this.howMany()===1&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1}
468,l.prototype._promiseRejected=function(d){return this._addRejected(d),this._checkOutcome()},l.prototype._promiseCancelled=function(){return this._values instanceof i||this._values==null?this._cancel():(this._addRejected(a),this._checkOutcome())},l.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var d=new s,f=this.length();f<this._values.length;++f)this._values[f]!==a&&d.push(this._values[f]);return d.length>0?this._reject(d):this._cancel(),!0}return!1},l.prototype._fulfilled=function(){return this._totalResolved},l.prototype._rejected=function(){return this._values.length-this.length()},l.prototype._addRejected=function(d){this._values.push(d)},l.prototype._addFulfilled=function(d){this._values[this._totalResolved++]=d},l.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},l.prototype._getRangeError=function(d){var f="Input array must contain at least "+this._howMany+" items but contains only "+d+" items";return new r(f)},l.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))};function c(d,f){if((f|0)!==f||f<0)return t(`expecting a positive integer
469
470    See http://goo.gl/MqrFmX
471`);var m=new l(d),p=m.promise();
471return m.setHowMany(f),m.init(),p}i.some=function(d,f){return c(d,f)},i.prototype.some=function(d){return c(this,d)},i._SomePromiseArray=l}),tA}var nA,eV;function BMe(){return eV||(eV=1,nA=function(i,e){var t=i.map;i.prototype.filter=function(n,r){return t(this,n,r,e)},i.filter=function(n,r,s){return t(n,r,s,e)}}),nA}var iA,tV;function MMe(){return tV||(tV=1,iA=function(i,e){var t=i.reduce,n=i.all;function r(){return n(this)}function s(o,a){return t(o,a,e,e)}i.prototype.each=function(o){return t(this,o,e,0)._then(r,void 0,void 0,this,void 0)},i.prototype.mapSeries=function(o){return t(this,o,e,e)},i.each=function(o,a){return t(o,a,e,0)._then(r,void 0,void 0,o,void 0)},i.mapSeries=s}),iA}var rA,nV;function LMe(){return nV||(nV=1,rA=function(i){var e=i._SomePromiseArray;function t(n){var r=new e(n),s=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),s}i.any=function(n){return t(n)},i.prototype.any=function(){return t(this)}}),rA}var iV;function UMe(){return iV||(iV=1,(function(i){i.exports=function(){var e=function(){return new m(`circular promise resolution chain
472
473    See http://goo.gl/MqrFmX
474`)},t=function(){return new B.PromiseInspection(this._target())},n=function(L){return B.reject(new m(L))};function r(){}var s={},o=Bn(),a;o.isNode?a=function(){var L=process.domain;return L===void 0&&(L=null),L}:a=function(){return null},o.notEnumerableProp(B,"_getDomain",a);var l=cm(),c=dMe(),d=new c;l.defineProperty(B,"_async",{value:d});var f=Hc(),m=B.TypeError=f.TypeError;B.RangeError=f.RangeError;var p=B.CancellationError=f.CancellationError;B.TimeoutError=f.TimeoutError,B.OperationalError=f.OperationalError,B.RejectionError=f.OperationalError,B.AggregateError=f.AggregateError;var g=function(){},y={},v={},x=fMe()(B,g),C=hMe()(B,g,x,n,r),D=mMe()(B),E=D.create,T=pMe()(B,D);T.CapturedTrace;var S=gMe()(B,x),A=bMe()(v),I=jZ(),R=o.errorObj,O=o.tryCatch;function j(L,W){if(typeof W!="function")throw new m("expecting a function but got "+o.classString(W));if(L.constructor!==B)throw new m(`the promise constructor cannot be invoked directly
475
476    See http://goo.gl/MqrFmX
477`)}function B(L){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,L!==g&&(j(this,L),this._resolveFromExecutor(L)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}B.prototype.toString=function(){return"[object Promise]"},B.prototype.caught=B.prototype.catch=function(L){var W=arguments.length;if(W>1){var G=new Array(W-1),Y=0,ie;for(ie=0;ie<W-1;++ie){var V=arguments[ie];if(o.isObject(V))G[Y++]=V;else return n("expecting an object but got A catch statement predicate "+o.classString(V))}return G.length=Y,L=arguments[ie],this.then(void 0,A(G,L,this))}return this.then(void 0,L)},B.prototype.reflect=function(){return this._then(t,t,void 0,this,void 0)},B.prototype.then=function(L,W){if(T.warnings()&&arguments.length>0&&typeof L!="function"&&typeof W!="function"){var G=".then() only accepts functions but was passed: "+o.classString(L);arguments.length>1&&(G+=", "+o.classString(W)),this._warn(G)}return this._then(L,W,void 0,void 0,void 0)},B.prototype.done=function(L,W){var G=this._then(L,W,void 0,void 0,void 0);G._setIsFinal()},B.prototype.spread=function(L){return typeof L!="function"?n("expecting a function but got "+o.classString(L)):this.all()._then(L,void 0,void 0,y,void 0)},B.prototype.toJSON=function(){var L={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(L.fulfillmentValue=this.value(),L.isFulfilled=!0):this.isRejected()&&(L.rejectionReason=this.reason(),L.isRejected=!0),L},B.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new C(this).promise()},B.prototype.error=function(L){return this.caught(o.originatesFromRejection,L)},B.getNewLibraryCopy=i.exports,B.is=function(L){return L instanceof B},B.fromNode=B.fromCallback=function(L){var W=new B(g);W._captureStackTrace();var G=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,Y=O(L)(I(W,G));return Y===R&&W._rejectCallback(Y.e,!0),W._isFateSealed()||W._setAsyncGuaranteed(),W},B.all=function(L){return new C(L).promise()},B.cast=function(L){var W=x(L);return W instanceof B||(W=new B(g),W._captureStackTrace(),W._setFulfilled(),W._rejectionHandler0=L),W},B.resolve=B.fulfilled=B.cast,B.reject=B.rejected=function(L){var W=new B(g);return W._captureStackTrace(),W._rejectCallback(L,!0),W}
477,B.setScheduler=function(L){if(typeof L!="function")throw new m("expecting a function but got "+o.classString(L));return d.setScheduler(L)},B.prototype._then=function(L,W,G,Y,ie){var V=ie!==void 0,q=V?ie:new B(g),$=this._target(),J=$._bitField;V||(q._propagateFrom(this,3),q._captureStackTrace(),Y===void 0&&(this._bitField&2097152)!==0&&((J&50397184)!==0?Y=this._boundValue():Y=$===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,q));var ce=a();if((J&50397184)!==0){var se,ge,ye=$._settlePromiseCtx;(J&33554432)!==0?(ge=$._rejectionHandler0,se=L):(J&16777216)!==0?(ge=$._fulfillmentHandler0,se=W,$._unsetRejectionIsUnhandled()):(ye=$._settlePromiseLateCancellationObserver,ge=new p("late cancellation observer"),$._attachExtraTrace(ge),se=W),d.invoke(ye,$,{handler:ce===null?se:typeof se=="function"&&o.domainBind(ce,se),promise:q,receiver:Y,value:ge})}else $._addCallbacks(L,W,q,Y,ce);return q},B.prototype._length=function(){return this._bitField&65535},B.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0},B.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864},B.prototype._setLength=function(L){this._bitField=this._bitField&-65536|L&65535},B.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432,this._fireEvent("promiseFulfilled",this)},B.prototype._setRejected=function(){this._bitField=this._bitField|16777216,this._fireEvent("promiseRejected",this)},B.prototype._setFollowing=function(){this._bitField=this._bitField|67108864,this._fireEvent("promiseResolved",this)},B.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304},B.prototype._isFinal=function(){return(this._bitField&4194304)>0},B.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},B.prototype._setCancelled=function(){this._bitField=this._bitField|65536,this._fireEvent("promiseCancelled",this)},B.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608},B.prototype._setAsyncGuaranteed=function(){d.hasCustomScheduler()||(this._bitField=this._bitField|134217728)},B.prototype._receiverAt=function(L){var W=L===0?this._receiver0:this[L*4-4+3];if(W!==s)return W===void 0&&this._isBound()?this._boundValue():W},B.prototype._promiseAt=function(L){return this[L*4-4+2]},B.prototype._fulfillmentHandlerAt=function(L){return this[L*4-4+0]},B.prototype._rejectionHandlerAt=function(L){return this[L*4-4+1]},B.prototype._boundValue=function(){},B.prototype._migrateCallback0=function(L){L._bitField;var W=L._fulfillmentHandler0,G=L._rejectionHandler0,Y=L._promise0,ie=L._receiverAt(0);ie===void 0&&(ie=s),this._addCallbacks(W,G,Y,ie,null)},B.prototype._migrateCallbackAt=function(L,W){var G=L._fulfillmentHandlerAt(W),Y=L._rejectionHandlerAt(W),ie=L._promiseAt(W),V=L._receiverAt(W);V===void 0&&(V=s),this._addCallbacks(G,Y,ie,V,null)},B.prototype._addCallbacks=function(L,W,G,Y,ie){var V=this._length();if(V>=65531&&(V=0,this._setLength(0)),V===0)this._promise0=G,this._receiver0=Y,typeof L=="function"&&(this._fulfillmentHandler0=ie===null?L:o.domainBind(ie,L)),typeof W=="function"&&(this._rejectionHandler0=ie===null?W:o.domainBind(ie,W));else{var q=V*4-4;this[q+2]=G,this[q+3]=Y,typeof L=="function"&&(this[q+0]=ie===null?L:o.domainBind(ie,L)),typeof W=="function"&&(this[q+1]=ie===null?W:o.domainBind(ie,W))}return this._setLength(V+1),V},B.prototype._proxy=function(L,W){this._addCallbacks(void 0,void 0,W,L,null)},B.prototype._resolveCallback=function(L,W){if((this._bitField&117506048)===0){if(L===this)return this._rejectCallback(e(),!1);var G=x(L,this);if(!(G instanceof B))return this._fulfill(L);W&&this._propagateFrom(G,2);var Y=G._target();if(Y===this){this._reject(e());return}var ie=Y._bitField;if((ie&50397184)===0){var V=this._length();V>0&&Y._migrateCallback0(this);for(var q=1;q<V;++q)Y._migrateCallbackAt(this,q);this._setFollowing(),this._setLength(0),this._setFollowee(Y)}else if((ie&33554432)!==0)this._fulfill(Y._value());else if((ie&16777216)!==0)this._reject(Y._reason());else{var $=new p("late cancellation observer");Y._attachExtraTrace($),this._reject($)}}},B.prototype._rejectCallback=function(L,W,G){var Y=o.ensureErrorObject(L),ie=Y===L;if(!ie&&!G&&T.warnings()){var V="a promise was rejected with a non-error: "+o.classString(L);this._warn(V,!0)}this._attachExtraTrace(Y,W?ie:!1),this._reject(L)},B.prototype._resolveFromExecutor=function(L){var W=this;this._captureStackTrace(),this._pushContext();var G=!0,Y=this._execute(L,function(ie){W._resolveCallback(ie)},function(ie){W._rejectCallback(ie,G)});G=!1,this._popContext(),Y!==void 0&&W._rejectCallback(Y,!0)},B.prototype._settlePromiseFromHandler=function(L,W,G,Y){var ie=Y._bitField;if((ie&65536)===0){Y._pushContext();var V;W===y?!G||typeof G.length!="number"?(V=R,V.e=new m("cannot .spread() a non-array: "+o.classString(G))):V=O(L).apply(this._boundValue(),G):V=O(L).call(W,G);var q=Y._popContext();ie=Y._bitField,(ie&65536)===0&&(V===v?Y._reject(G):V===R?Y._rejectCallback(V.e,!1):(T.checkForgottenReturns(V,q,"",Y,this),Y._resolveCallback(V)))}},B.prototype._target=function(){for(var L=this;L._isFollowing();)L=L._followee();return L},B.prototype._followee=function(){return this._rejectionHandler0},B.prototype._setFollowee=function(L){this._rejectionHandler0=L},B.prototype._settlePromise=function(L,W,G,Y){var ie=L instanceof B,V=this._bitField,q=(V&134217728)!==0;(V&65536)!==0?(ie&&L._invokeInternalOnCancel(),G instanceof S&&G.isFinallyHandler()?(G.cancelPromise=L,O(W).call(G,Y)===R&&L._reject(R.e)):W===t?L._fulfill(t.call(G)):G instanceof r?G._promiseCancelled(L):ie||L instanceof C?L._cancel():G.cancel()):typeof W=="function"?ie?(q&&L._setAsyncGuaranteed(),this._settlePromiseFromHandler(W,G,Y,L)):W.call(G,Y,L):G instanceof r?G._isResolved()||((V&33554432)!==0?G._promiseFulfilled(Y,L):G._promiseRe
477jected(Y,L)):ie&&(q&&L._setAsyncGuaranteed(),(V&33554432)!==0?L._fulfill(Y):L._reject(Y))},B.prototype._settlePromiseLateCancellationObserver=function(L){var W=L.handler,G=L.promise,Y=L.receiver,ie=L.value;typeof W=="function"?G instanceof B?this._settlePromiseFromHandler(W,Y,ie,G):W.call(Y,ie,G):G instanceof B&&G._reject(ie)},B.prototype._settlePromiseCtx=function(L){this._settlePromise(L.promise,L.handler,L.receiver,L.value)},B.prototype._settlePromise0=function(L,W,G){var Y=this._promise0,ie=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(Y,L,ie,W)},B.prototype._clearCallbackDataAtIndex=function(L){var W=L*4-4;this[W+2]=this[W+3]=this[W+0]=this[W+1]=void 0},B.prototype._fulfill=function(L){var W=this._bitField;if(!((W&117506048)>>>16)){if(L===this){var G=e();return this._attachExtraTrace(G),this._reject(G)}this._setFulfilled(),this._rejectionHandler0=L,(W&65535)>0&&((W&134217728)!==0?this._settlePromises():d.settlePromises(this))}},B.prototype._reject=function(L){var W=this._bitField;if(!((W&117506048)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=L,this._isFinal())return d.fatalError(L,o.isNode);(W&65535)>0?d.settlePromises(this):this._ensurePossibleRejectionHandled()}},B.prototype._fulfillPromises=function(L,W){for(var G=1;G<L;G++){var Y=this._fulfillmentHandlerAt(G),ie=this._promiseAt(G),V=this._receiverAt(G);this._clearCallbackDataAtIndex(G),this._settlePromise(ie,Y,V,W)}},B.prototype._rejectPromises=function(L,W){for(var G=1;G<L;G++){var Y=this._rejectionHandlerAt(G),ie=this._promiseAt(G),V=this._receiverAt(G);this._clearCallbackDataAtIndex(G),this._settlePromise(ie,Y,V,W)}},B.prototype._settlePromises=function(){var L=this._bitField,W=L&65535;if(W>0){if((L&16842752)!==0){var G=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,G,L),this._rejectPromises(W,G)}else{var Y=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,Y,L),this._fulfillPromises(W,Y)}this._setLength(0)}this._clearCancellationData()},B.prototype._settledValue=function(){var L=this._bitField;if((L&33554432)!==0)return this._rejectionHandler0;if((L&16777216)!==0)return this._fulfillmentHandler0};function U(L){this.promise._resolveCallback(L)}function F(L){this.promise._rejectCallback(L,!1)}B.defer=B.pending=function(){T.deprecated("Promise.defer","new Promise");var L=new B(g);return{promise:L,resolve:U,reject:F}},o.notEnumerableProp(B,"_makeSelfResolutionError",e),yMe()(B,g,x,n,T),vMe()(B,g,x,T),wMe()(B,C,n,T),xMe()(B),_Me()(B),CMe()(B,C,x,g,d,a),B.Promise=B,B.version="3.4.7",DMe()(B,C,n,x,g,T),EMe()(B),TMe()(B,n,x,E,g,T),AMe()(B,g,T),kMe()(B,n,g,x,r,T),SMe()(B),PMe()(B,g),IMe()(B,C,x,n),RMe()(B,g,x,n),FMe()(B,C,n,x,g,T),OMe()(B,C,T),NMe()(B,C,n),BMe()(B,g),MMe()(B,g),LMe()(B),o.toFastProperties(B),o.toFastProperties(B.prototype);function H(L){var W=new B(g);W._fulfillmentHandler0=L,W._rejectionHandler0=L,W._promise0=L,W._receiver0=L}return H({a:1}),H({b:2}),H({c:3}),H(1),H(function(){}),H(void 0),H(!1),H(new B(g)),T.setBounds(c.firstLineError,o.lastLineError),B}})(AT)),AT.exports}var rV;function tu(){if(rV)return to;rV=1;var i=yi,e=UMe()();to.defer=t,to.when=e.resolve,to.resolve=e.resolve,to.all=e.all,to.props=e.props,to.reject=e.reject,to.promisify=e.promisify,to.mapSeries=e.mapSeries,to.attempt=e.attempt,to.nfcall=function(n){var r=Array.prototype.slice.call(arguments,1),s=e.promisify(n);return s.apply(null,r)},e.prototype.fail=e.prototype.caught,e.prototype.also=function(n){return this.then(function(r){var s=i.extend({},r,n(r));return e.props(s)})};function t(){var n,r,s=new e.Promise(function(o,a){n=o,r=a});return{resolve:n,reject:r,promise:s}}return to}var an={},sV;function Bd(){if(sV)return an;sV=1;var i=yi,e=an.types={document:"document",paragraph:"paragraph",run:"run",text:"text",tab:"tab",checkbox:"checkbox",hyperlink:"hyperlink",noteReference:"noteReference",image:"image",note:"note",commentReference:"commentReference",comment:"comment",table:"table",tableRow:"tableRow",tableCell:"tableCell",break:"break",bookmarkStart:"bookmarkStart"};function t(S,A){return A=A||{},{type:e.document,children:S,notes:A.notes||new f({}),comments:A.comments||[]}}function n(S,A){A=A||{};var I=A.indent||{};return{type:e.paragraph,children:S,styleId:A.styleId||null,styleName:A.styleName||null,numbering:A.numbering||null,alignment:A.alignment||null,indent:{start:I.start||null,end:I.end||null,firstLine:I.firstLine||null,hanging:I.hanging||null}}}function r(S,A){return A=A||{},{type:e.run,children:S,styleId:A.styleId||null,styleName:A.styleName||null,isBold:!!A.isBold,isUnderline:!!A.isUnderline,isItalic:!!A.isItalic,isStrikethrough:!!A.isStrikethrough,isAllCaps:!!A.isAllCaps,isSmallCaps:!!A.isSmallCaps,verticalAlignment:A.verticalAlignment||s.baseline,font:A.font||null,fontSize:A.fontSize||null,highlight:A.highlight||null}}var s={baseline:"baseline",superscript:"superscript",subscript:"subscript"};function o(S){return{type:e.text,value:S}}function a(){return{type:e.tab}}function l(S){return{type:e.checkbox,checked:S.checked}}function c(S,A){return{type:e.hyperlink,children:S,href:A.href,anchor:A.anchor,targetFrame:A.targetFrame}}function d(S){return{type:e.noteReference,noteType:S.noteType,noteId:S.noteId}}function f(S){this._notes=i.indexBy(S,function(A){return y(A.noteType,A.noteId)})}f.prototype.resolve=function(S){return this.findNoteByKey(y(S.noteType,S.noteId))},f.prototype.findNoteByKey=function(S){return this._notes[S]||null};function m(S){return{type:e.note,noteType:S.noteType,noteId:S.noteId,body:S.body}}function p(S){return{type:e.commentReference,commentId:S.commentId}}function g(S){return{type:e.comment,commentId:S.commentId,body:S.body,authorName:S.authorName,authorInitials:S.authorInitials}}function y(S,A){return S+"-"+A}function v(S){return{type:e.image,read:function(A){return A?S.readImage(A):S.readImage().then(function(I){return Buffer.from(I)})},readAsArrayBuffer:function(){return S.readImage()},readAsBase64String:function(){return S.readImage("base64")},readAsBuffer:function(){return S.readImage().then(function(A){return Buffer.from(A)})},altText:S.altText,contentType:S.contentType}}function x(S,A){return A=A||{},{type:e.table,children:S,styleId:A.styleId||null,styleName:A.styleName||null}}function C(S,A){return A=A||{},{type:e.tableRow,children:S,isHeader:A.isHeader||!1}}function D(S,A){return A=A||{},{type:e.tableCell,children:S,colSpan:A.colSpan==null?1:A.colSpan,rowSpan:A.rowSpan==null?1:A.rowSpan}}function E(S){return{type:e.break,breakType:S}}function T(S){return{type:e.bookmarkStart,name:S.name}}return an.document=an.Document=t,an.paragraph=an.Paragraph=n,an.run=an.Run=r,an.text=an.Text=o,an.tab=an.Tab=a,an.checkbox=an.Checkbox=l,an.Hyperlink=c,an.noteReference=an.NoteReference=d,an.Notes=f,an.Note=m,an.commentReference=p,an.comment=g,an.Image=v,an.Table=x,an.TableRow=C,an.TableCell=D,an.lineBreak=E("line"),an.pageBreak=E("page"),an.columnBreak=E("column"),an.BookmarkStart=T,an.verticalAlignment=s,an}var Rf={},oV;function Ll(){if(oV)return Rf;oV=1;var i=yi;Rf.Result=e,Rf.success=t,Rf.warning=n,Rf.error=r;function e(l,c){this.value=l,this.messages=c||[]}e.prototype.map=function(l){return new e(l(this.value),this.messages)},e.prototype.flatMap=function(l){var c=l(this.value);return new e(c.value,s([this,c]))},e.prototype.flatMapThen=function(l){var c=this;return l(this.value).then(function(d){return new e(d.value,s([c,d]
477))})},e.combine=function(l){var c=i.flatten(i.pluck(l,"value")),d=s(l);return new e(c,d)};function t(l){return new e(l,[])}function n(l){return{type:"warning",message:l}}function r(l){return{type:"error",message:l.message,error:l}}function s(l){var c=[];return i.flatten(i.pluck(l,"messages"),!0).forEach(function(d){o(c,d)||c.push(d)}),c}function o(l,c){return i.find(l,a.bind(null,c))!==void 0}function a(l,c){return l.type===c.type&&l.message===c.message}return Rf}var Ep={},Tp={},aV;function VMe(){if(aV)return Tp;aV=1,Tp.byteLength=a,Tp.toByteArray=c,Tp.fromByteArray=m;for(var i=[],e=[],t=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,s=n.length;r<s;++r)i[r]=n[r],e[n.charCodeAt(r)]=r;e[45]=62,e[95]=63;function o(p){var g=p.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=p.indexOf("=");y===-1&&(y=g);var v=y===g?0:4-y%4;return[y,v]}function a(p){var g=o(p),y=g[0],v=g[1];return(y+v)*3/4-v}function l(p,g,y){return(g+y)*3/4-y}function c(p){var g,y=o(p),v=y[0],x=y[1],C=new t(l(p,v,x)),D=0,E=x>0?v-4:v,T;for(T=0;T<E;T+=4)g=e[p.charCodeAt(T)]<<18|e[p.charCodeAt(T+1)]<<12|e[p.charCodeAt(T+2)]<<6|e[p.charCodeAt(T+3)],C[D++]=g>>16&255,C[D++]=g>>8&255,C[D++]=g&255;return x===2&&(g=e[p.charCodeAt(T)]<<2|e[p.charCodeAt(T+1)]>>4,C[D++]=g&255),x===1&&(g=e[p.charCodeAt(T)]<<10|e[p.charCodeAt(T+1)]<<4|e[p.charCodeAt(T+2)]>>2,C[D++]=g>>8&255,C[D++]=g&255),C}function d(p){return i[p>>18&63]+i[p>>12&63]+i[p>>6&63]+i[p&63]}function f(p,g,y){for(var v,x=[],C=g;C<y;C+=3)v=(p[C]<<16&16711680)+(p[C+1]<<8&65280)+(p[C+2]&255),x.push(d(v));return x.join("")}function m(p){for(var g,y=p.length,v=y%3,x=[],C=16383,D=0,E=y-v;D<E;D+=C)x.push(f(p,D,D+C>E?E:D+C));return v===1?(g=p[y-1],x.push(i[g>>2]+i[g<<4&63]+"==")):v===2&&(g=(p[y-2]<<8)+p[y-1],x.push(i[g>>10]+i[g>>4&63]+i[g<<2&63]+"=")),x.join("")}return Tp}var sA={exports:{}};var lV;function jMe(){return lV||(lV=1,(function(i,e){(function(t){i.exports=t()})(function(){return(function t(n,r,s){function o(c,d){if(!r[c]){if(!n[c]){var f=typeof Np=="function"&&Np;if(!d&&f)return f(c,!0);if(a)return a(c,!0);var m=new Error("Cannot find module '"+c+"'");throw m.code="MODULE_NOT_FOUND",m}var p=r[c]={exports:{}};n[c][0].call(p.exports,function(g){var y=n[c][1][g];return o(y||g)},p,p.exports,t,n,r,s)}return r[c].exports}for(var a=typeof Np=="function"&&Np,l=0;l<s.length;l++)o(s[l]);return o}
vendor: 10,720 bytes, lines 477-478
477)({1:[function(t,n,r){var s=t("./utils"),o=t("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(l){for(var c,d,f,m,p,g,y,v=[],x=0,C=l.length,D=C,E=s.getTypeOf(l)!=="string";x<l.length;)D=C-x,f=E?(c=l[x++],d=x<C?l[x++]:0,x<C?l[x++]:0):(c=l.charCodeAt(x++),d=x<C?l.charCodeAt(x++):0,x<C?l.charCodeAt(x++):0),m=c>>2,p=(3&c)<<4|d>>4,g=1<D?(15&d)<<2|f>>6:64,y=2<D?63&f:64,v.push(a.charAt(m)+a.charAt(p)+a.charAt(g)+a.charAt(y));return v.join("")},r.decode=function(l){var c,d,f,m,p,g,y=0,v=0,x="data:";if(l.substr(0,x.length)===x)throw new Error("Invalid base64 input, it looks like a data url.");var C,D=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&D--,l.charAt(l.length-2)===a.charAt(64)&&D--,D%1!=0)throw new Error("Invalid base64 input, bad content length.");for(C=o.uint8array?new Uint8Array(0|D):new Array(0|D);y<l.length;)c=a.indexOf(l.charAt(y++))<<2|(m=a.indexOf(l.charAt(y++)))>>4,d=(15&m)<<4|(p=a.indexOf(l.charAt(y++)))>>2,f=(3&p)<<6|(g=a.indexOf(l.charAt(y++))),C[v++]=c,p!==64&&(C[v++]=d),g!==64&&(C[v++]=f);return C}},{"./support":30,"./utils":32}],2:[function(t,n,r){var s=t("./external"),o=t("./stream/DataWorker"),a=t("./stream/Crc32Probe"),l=t("./stream/DataLengthProbe");function c(d,f,m,p,g){this.compressedSize=d,this.uncompressedSize=f,this.crc32=m,this.compression=p,this.compressedContent=g}c.prototype={getContentWorker:function(){var d=new o(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new o(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(d,f,m){return d.pipe(new a).pipe(new l("uncompressedSize")).pipe(f.compressWorker(m)).pipe(new l("compressedSize")).withStreamInfo("compression",f)},n.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,n,r){var s=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,n,r){var s=t("./utils"),o=(function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l})();n.exports=function(a,l){return a!==void 0&&a.length?s.getTypeOf(a)!=="string"?(function(c,d,f,m){var p=o,g=m+f;c^=-1;for(var y=m;y<g;y++)c=c>>>8^p[255&(c^d[y])];return-1^c})(0|l,a,a.length,0):(function(c,d,f,m){var p=o,g=m+f;c^=-1;for(var y=m;y<g;y++)c=c>>>8^p[255&(c^d.charCodeAt(y))];return-1^c})(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(t,n,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,n,r){var s=null;s=typeof Promise<"u"?Promise:t("lie"),n.exports={Promise:s}},{lie:37}],7:[function(t,n,r){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=t("pako"),a=t("./utils"),l=t("./stream/GenericWorker"),c=s?"uint8array":"array";function d(f,m){l.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=m,this.meta={}}r.magic="\b\0",a.inherits(d,l),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(c,f.data),!1)},d.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(m){f.push({data:m,meta:f.meta})}},r.compressWorker=function(f){return new d("Deflate",f)},r.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,n,r){function s(p,g){var y,v="";for(y=0;y<g;y++)v+=String.fromCharCode(255&p),p>>>=8;return v}function o(p,g,y,v,x,C){var D,E,T=p.file,S=p.compression,A=C!==c.utf8encode,I=a.transformTo("string",C(T.name)),R=a.transformTo("string",c.utf8encode(T.name)),O=T.comment,j=a.transformTo("string",C(O)),B=a.transformTo("string",c.utf8encode(O)),U=R.length!==T.name.length,F=B.length!==O.length,H="",L="",W="",G=T.dir,Y=T.date,ie={crc32:0,compressedSize:0,uncompressedSize:0};g&&!y||(ie.crc32=p.crc32,ie.compressedSize=p.compressedSize,ie.uncompressedSize=p.uncompressedSize);var V=0;g&&(V|=8),A||!U&&!F||(V|=2048);var q=0,$=0;G&&(q|=16),x==="UNIX"?($=798,q|=(function(ce,se){var ge=ce;return ce||(ge=se?16893:33204),(65535&ge)<<16})(T.unixPermissions,G)):($=20,q|=(function(ce){return 63&(ce||0)})(T.dosPermissions)),D=Y.getUTCHours(),D<<=6,D|=Y.getUTCMinutes(),D<<=5,D|=Y.getUTCSeconds()/2,E=Y.getUTCFullYear()-1980,E<<=4,E|=Y.getUTCMonth()+1,E<<=5,E|=Y.getUTCDate(),U&&(L=s(1,1)+s(d(I),4)+R,H+="up"+s(L.length,2)+L),F&&(W=s(1,1)+s(d(j),4)+B,H+="uc"+s(W.length,2)+W);var J="";return J+=`
478\0`,J+=s(V,2),J+=S.magic,J+=s(D,2),J+=s(E,2),J+=s(ie.crc32,4),J+=s(ie.compressedSize,4),J+=s(ie.uncompressedSize,4),J+=s(I.length,2),J+=s(H.length,2),{fileRecord:f.LOCAL_FILE_HEADER+J+I+H,dirRecord:f.CENTRAL_FILE_HEADER+s($,2)+J+s(j.length,2)+"\0\0\0\0"+s(q,4)+s(v,4)+I+H+j}}var a=t("../utils"),l=t("../stream/GenericWorker"),c=t("../utf8"),d=t("../crc32"),f=t("../signature");function m(p,g,y,v){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=y,this.encodeFileName=v,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(m,l),m.prototype.push=function(p){var g=p.meta.percent||0,y=this.entriesCount,v=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,l.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:y?(g+100*(y-v-1))/y:100}}))},m.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var g=this.streamFiles&&!p.file.dir;if(g){var y=o(p,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:y.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(p){this.accumulate=!1;var g=this.streamFiles&&!p.file.dir,y=o(p,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(y.dirRecord),g)this.push({data:(function(v){return f.DATA_DESCRIPTOR+s(v.crc32,4)+s(v.compressedSize,4)+s(v.uncompressedSize,4)})(p),meta:{percent:100}});else for(this.push({data:y.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var p=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var y=this.bytesWritten-p,v=(function(x,C,D,E,T){var S=a.transformTo("string",T(E));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(x,2)+s(x,2)+s(C,4)+s(D,4)+s(S.length,2)+S})(this.dirRecords.length,y,p,this.zipComment,this.encodeFileName);this.push({data:v,meta:{percent:100}})},m.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},m.prototype.registerPrevious=function(p){this._sources.push(p);var g=this;return p.on("data",function(y){g.processChunk(y)}),p.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),p.on("error",function(y){g.error(y)}),this},m.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},m.prototype.error=function(p){var g=this._sources;if(!l.prototype.error.call(this,p))return!1;for(var y=0;y<g.length;y++)try{g[y].error(p)}catch{}return!0},m.prototype.lock=function(){l.prototype.lock.call(this);for(var p=this._sources,g=0;g<p.length;g++)p[g].lock()},n.exports=m},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,n,r){var s=t("../compressions"),o=t("./ZipFileWorker");r.generateWorker=function(a,l,c){var d=new o(l.streamFiles,c,l.platform,l.encodeFileName),f=0;try{a.forEach(function(m,p){f++;var g=(function(C,D){var E=C||D,T=s[E];if(!T)throw new Error(E+" is not a valid compression method !");return T})(p.options.compression,l.compression),y=p.options.compressionOptions||l.compressionOptions||{},v=p.dir,x=p.date;p._compressWorker(g,y).withStreamInfo("file",{name:m,dir:v,date:x,comment:p.comment||"",unixPermissions:p.unixPermissions,dosPermissions:p.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(m){d.error(m)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,n,r){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new s;for(var a in this)typeof this[a]!="function"&&(o[a]=this[a]);return o}}(s.prototype=t("./object")).loadAsync=t("./load"),s.support=t("./support"),s.defaults=t("./defaults"),s.version="3.10.1",s.loadAsync=function(o,a){return new s().loadAsync(o,a)},s.external=t("./external"),n.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,n,r){var s=t("./utils"),o=t("./external"),a=t("./utf8"),l=t("./zipEntries"),c=t("./stream/Crc32Probe"),d=t("./nodejsUtils");function f(m){return new o.Promise(function(p,g){var y=m.decompressed.getContentWorker().pipe(new c);y.on("error",function(v){g(v)}).on("end",function(){y.streamInfo.crc32!==m.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):p()}).resume()})}n.exports=function(m,p){var g=this;return p=s.extend(p||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),d.isNode&&d.isStream(m)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip f
478ile",m,!0,p.optimizedBinaryString,p.base64).then(function(y){var v=new l(p);return v.load(y),v}).then(function(y){var v=[o.Promise.resolve(y)],x=y.files;if(p.checkCRC32)for(var C=0;C<x.length;C++)v.push(f(x[C]));return o.Promise.all(v)}).then(function(y){for(var v=y.shift(),x=v.files,C=0;C<x.length;C++){var D=x[C],E=D.fileNameStr,T=s.resolve(D.fileNameStr);g.file(T,D.decompressed,{binary:!0,optimizedBinaryString:!0,date:D.date,dir:D.dir,comment:D.fileCommentStr.length?D.fileCommentStr:null,unixPermissions:D.unixPermissions,dosPermissions:D.dosPermissions,createFolders:p.createFolders}),D.dir||(g.file(T).unsafeOriginalName=E)}return v.zipComment.length&&(g.comment=v.zipComment),g})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,n,r){var s=t("../utils"),o=t("../stream/GenericWorker");function a(l,c){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}s.inherits(a,o),a.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(d){c.push({data:d,meta:{percent:0}})}).on("error",function(d){c.isPaused?this.generatedError=d:c.error(d)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},a.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,n,r){var s=t("readable-stream").Readable;function o(a,l,c){s.call(this,l),this._helper=a;var d=this;a.on("data",function(f,m){d.push(f)||d._helper.pause(),c&&c(m)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}t("../utils").inherits(o,s),o.prototype._read=function(){this._helper.resume()},n.exports=o},{"../utils":32,"readable-stream":16}],14:[function(t,n,r){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,o);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,o)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var o=new Buffer(s);return o.fill(0),o},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(t,n,r){function s(T,S,A){var I,R=a.getTypeOf(S),O=a.extend(A||{},d);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(T=x(T)),O.createFolders&&(I=v(T))&&C.call(this,I,!0);var j=R==="string"&&O.binary===!1&&O.base64===!1;A&&A.binary!==void 0||(O.binary=!j),(S instanceof f&&S.uncompressedSize===0||O.dir||!S||S.length===0)&&(O.base64=!1,O.binary=!0,S="",O.compression="STORE",R="string");var B=null;B=S instanceof f||S instanceof l?S:g.isNode&&g.isStream(S)?new y(T,S):a.prepareContent(T,S,O.binary,O.optimizedBinaryString,O.base64);var U=new m(T,B,O);this.files[T]=U}var o=t("./utf8"),a=t("./utils"),l=t("./stream/GenericWorker"),c=t("./stream/StreamHelper"),d=t("./defaults"),f=t("./compressedObject"),m=t("./zipObject"),p=t("./generate"),g=t("./nodejsUtils"),y=t("./nodejs/NodejsStreamInputAdapter"),v=function(T){T.slice(-1)==="/"&&(T=T.substring(0,T.length-1));var S=T.lastIndexOf("/");return 0<S?T.substring(0,S):""},x=function(T){return T.slice(-1)!=="/"&&(T+="/"),T},C=function(T,S){return S=S!==void 0?S:d.createFolders,T=x(T),this.files[T]||s.call(this,T,null,{dir:!0,createFolders:S}),this.files[T]};function D(T){return Object.prototype.toString.call(T)==="[object RegExp]"}var E={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(T){var S,A,I;for(S in this.files)I=this.files[S],(A=S.slice(this.root.length,S.length))&&S.slice(0,this.root.length)===this.root&&T(A,I)},filter:function(T){var S=[];return this.forEach(function(A,I){T(A,I)&&S.push(I)}),S},file:function(T,S,A){if(arguments.length!==1)return T=this.root+T,s.call(this,T,S,A),this;if(D(T)){var I=T;return this.filter(function(O,j){return!j.dir&&I.test(O)})}var R=this.files[this.root+T];return R&&!R.dir?R:null},folder:function(T){if(!T)return this;if(D(T))return this.filter(function(R,O){return O.dir&&T.test(R)});var S=this.root+T,A=C.call(this,S),I=this.clone();return I.root=A.name,I},remove:function(T){T=this.root+T;var S=this.files[T];if(S||(T.slice(-1)!=="/"&&(T+="/"),S=this.files[T]),S&&!S.dir)delete this.files[T];else for(var A=this.filter(function(R,O){return O.name.slice(0,T.length)===T}),I=0;I<A.length;I++)delete this.files[A[I].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")}
vendor: 22,027 bytes, line 478
478,generateInternalStream:function(T){var S,A={};try{if((A=a.extend(T||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=A.type.toLowerCase(),A.compression=A.compression.toUpperCase(),A.type==="binarystring"&&(A.type="string"),!A.type)throw new Error("No output type specified.");a.checkSupport(A.type),A.platform!=="darwin"&&A.platform!=="freebsd"&&A.platform!=="linux"&&A.platform!=="sunos"||(A.platform="UNIX"),A.platform==="win32"&&(A.platform="DOS");var I=A.comment||this.comment||"";S=p.generateWorker(this,A,I)}catch(R){(S=new l("error")).error(R)}return new c(S,A.type||"string",A.mimeType)},generateAsync:function(T,S){return this.generateInternalStream(T).accumulate(S)},generateNodeStream:function(T,S){return(T=T||{}).type||(T.type="nodebuffer"),this.generateInternalStream(T).toNodejsStream(S)}};n.exports=E},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,n,r){n.exports=t("stream")},{stream:void 0}],17:[function(t,n,r){var s=t("./DataReader");function o(a){s.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}t("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data[this.zero+a]},o.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.length-4;0<=m;--m)if(this.data[m]===l&&this.data[m+1]===c&&this.data[m+2]===d&&this.data[m+3]===f)return m-this.zero;return-1},o.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),f=a.charCodeAt(3),m=this.readData(4);return l===m[0]&&c===m[1]&&d===m[2]&&f===m[3]},o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./DataReader":18}],18:[function(t,n,r){var s=t("../utils");function o(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,c=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return s.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},n.exports=o},{"../utils":32}],19:[function(t,n,r){var s=t("./Uint8ArrayReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,n,r){var s=t("./DataReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./DataReader":18}],21:[function(t,n,r){var s=t("./ArrayReader");function o(a){s.call(this,a)}t("../utils").inherits(o,s),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},n.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(t,n,r){var s=t("../utils"),o=t("../support"),a=t("./ArrayReader"),l=t("./StringReader"),c=t("./NodeBufferReader"),d=t("./Uint8ArrayReader");n.exports=function(f){var m=s.getTypeOf(f);return s.checkSupport(m),m!=="string"||o.uint8array?m==="nodebuffer"?new c(f):o.uint8array?new d(s.transformTo("uint8array",f)):new a(s.transformTo("array",f)):new l(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,n,r){r.LOCAL_FILE_HEADER="PK��",r.CENTRAL_FILE_HEADER="PK��",r.CENTRAL_DIRECTORY_END="PK��",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK�\x07",r.ZIP64_CENTRAL_DIRECTORY_END="PK��",r.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,n,r){var s=t("./GenericWorker"),o=t("../utils");function a(l){s.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(a,s),a.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},n.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(t,n,r){var s=t("./GenericWorker"),o=t("../crc32");function a(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(a,s),a.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,n,r){var s=t("../utils"),o=t("./GenericWorker");function a(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}s.inherits(a,o),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}o.prototype.processChunk.call(this,l)},n.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(t,n,r){var s=t("../utils"),o=t("./GenericWorker");function a(l){o.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(d){c.dataIsReady=!0,c.data=d,c.max=d&&d.length||0,c.type=s.getTypeOf(d),c.isPaused||c._tickAndRepeat()},function(d){c.error(d)})}s.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(t,n,r){function s(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,a)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var a=this;return o.on("data",function(l){a.processChunk(l)}),o.on("end",function(){a.end()}),o.on("error",function(l){a.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,a){return this.extraStreamInfo[o]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},n.exports=s},{}],29:[function(t,n,r){var s=t("../utils"),o=t("./ConvertWorker"),a=t("./GenericWorker"),l=t("../base64"),c=t("../support"),d=t("../external"),f=null;if(c.nodestream)try{f=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(g,y){return new d.Promise(function(v,x){var C=[],D=g._internalType,E=g._outputType,T=g._mimeType;g.on("data",function(S,A){C.push(S),y&&y(A)}).on("error",function(S){C=[],x(S)}).on("end",function(){try{var S=(function(A,I,R){switch(A){case"blob":return s.newBlob(s.transformTo("arraybuffer",I),R);case"base64":return l.encode(I);default:return s.transformTo(A,I)}})(E,(function(A,I){var R,O=0,j=null,B=0;for(R=0;R<I.length;R++)B+=I[R].length;switch(A){case"string":return I.join("");case"array":return Array.prototype.concat.apply([],I);case"uint8array":for(j=new Uint8Array(B),R=0;R<I.length;R++)j.set(I[R],O),O+=I[R].length;return j;case"nodebuffer":return Buffer.concat(I);default:throw new Error("concat : unsupported type '"+A+"'")}})(D,C),T);v(S)}catch(A){x(A)}C=[]}).resume()})}function p(g,y,v){var x=y;switch(y){case"blob":case"arraybuffer":x="uint8array";break;case"base64":x="string"}try{this._internalType=x,this._outputType=y,this._mimeType=v,s.checkSupport(x),this._worker=g.pipe(new o(x)),g.lock()}catch(C){this._worker=new a("error"),this._worker.error(C)}}p.prototype={accumulate:function(g){return m(this,g)},on:function(g,y){var v=this;return g==="data"?this._worker.on(g,function(x){y.call(v,x.data,x.meta)}):this._worker.on(g,function(){s.delay(y,arguments,v)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},g)}},n.exports=p},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,n,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",r.nodebuffer=typeof Buffer<"u",r.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")r.blob=!1;else{var s=new ArrayBuffer(0);try{r.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(s),r.blob=o.getBlob("application/zip").size===0}catch{r.blob=!1}}}try{r.nodestream=!!t("readable-stream").Readable}catch{r.nodestream=!1}},{"readable-stream":16}],31:[function(t,n,r){for(var s=t("./utils"),o=t("./support"),a=t("./nodejsUtils"),l=t("./stream/GenericWorker"),c=new Array(256),d=0;d<256;d++)c[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;c[254]=c[254]=1;function f(){l.call(this,"utf-8 decode"),this.leftOver=null}function m(){l.call(this,"utf-8 encode")}r.utf8encode=function(p){return o.nodebuffer?a.newBufferFrom(p,"utf-8"):(function(g){var y,v,x,C,D,E=g.length,T=0;for(C=0;C<E;C++)(64512&(v=g.charCodeAt(C)))==55296&&C+1<E&&(64512&(x=g.charCodeAt(C+1)))==56320&&(v=65536+(v-55296<<10)+(x-56320),C++),T+=v<128?1:v<2048?2:v<65536?3:4;for(y=o.uint8array?new Uint8Array(T):new Array(T),C=D=0;D<T;C++)(64512&(v=g.charCodeAt(C)))==55296&&C+1<E&&(64512&(x=g.charCodeAt(C+1)))==56320&&(v=65536+(v-55296<<10)+(x-56320),C++),v<128?y[D++]=v:(v<2048?y[D++]=192|v>>>6:(v<65536?y[D++]=224|v>>>12:(y[D++]=240|v>>>18,y[D++]=128|v>>>12&63),y[D++]=128|v>>>6&63),y[D++]=128|63&v);return y})(p)},r.utf8decode=function(p){return o.nodebuffer?s.transformTo("nodebuffer",p).toString("utf-8"):(function(g){var y,v,x,C,D=g.length,E=new Array(2*D);for(y=v=0;y<D;)if((x=g[y++])<128)E[v++]=x;else if(4<(C=c[x]))E[v++]=65533,y+=C-1;else{for(x&=C===2?31:C===3?15:7;1<C&&y<D;)x=x<<6|63&g[y++],C--;1<C?E[v++]=65533:x<65536?E[v++]=x:(x-=65536,E[v++]=55296|x>>10&1023,E[v++]=56320|1023&x)}return E.length!==v&&(E.subarray?E=E.subarray(0,v):E.length=v),s.applyFromCharCode(E)})(p=s.transformTo(o.uint8array?"uint8array":"array",p))},s.inherits(f,l),f.prototype.processChunk=function(p){var g=s.transformTo(o.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var y=g;(g=new Uint8Array(y.length+this.leftOver.length)).set(this.leftOver,0),g.set(y,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var v=(function(C,D){var E;for((D=D||C.length)>C.length&&(D=C.length),E=D-1;0<=E&&(192&C[E])==128;)E--;return E<0||E===0?D:E+c[C[E]]>D?E:D})(g),x=g;v!==g.length&&(o.uint8array?(x=g.subarray(0,v),this.leftOver=g.subarray(v,g.length)):(x=g.slice(0,v),this.leftOver=g.slice(v,g.length))),this.push({data:r.utf8decode(x),meta:p.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=f,s.inherits(m,l),m.prototype.processChunk=function(p){this.push({data:r.utf8encode(p.data),meta:p.meta})},r.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,n,r){var s=t("./support"),o=t("./base64"),a=t("./nodejsUtils"),l=t("./external");function c(y){return y}function d(y,v){for(var x=0;x<y.length;++x)v[x]=255&y.charCodeAt(x);return v}t("setimmediate"),r.newBlob=function(y,v){r.checkSupport("blob");try{return new Blob([y],{type:v})}catch{try{var x=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return x.append(y),x.getBlob(v)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(y,v,x){var C=[],D=0,E=y.length;if(E<=x)return String.fromCharCode.apply(null,y);for(;D<E;)v==="array"||v==="nodebuffer"?C.push(String.fromCharCode.apply(null,y.slice(D,Math.min(D+x,E)))):C.push(String.fromCharCode.apply(null,y.subarray(D,Math.min(D+x,E)))),D+=x;return C.join("")},stringifyByChar:function(y){for(var v="",x=0;x<y.length;x++)v+=String.fromCharCode(y[x]);return v},applyCanBeUsed:{uint8array:(function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}})()}};function m(y){var v=65536,x=r.getTypeOf(y),C=!0;if(x==="uint8array"?C=f.applyCanBeUsed.uint8array:x==="nodebuffer"&&(C=f.applyCanBeUsed.nodebuffer),C)for(;1<v;)try{return f.stringifyByChunk(y,x,v)}catch{v=Math.floor(v/2)}return f.stringifyByChar(y)}function p(y,v){for(var x=0;x<y.length;x++)v[x]=y[x];return v}r.applyFromCharCode=m;var g={};g.string={string:c,array:function(y){return d(y,new Array(y.length))},arraybuffer:function(y){return g.string.uint8array(y).buffer},uint8array:function(y){return d(y,new Uint8Array(y.length))},nodebuffer:function(y){return d(y,a.allocBuffer(y.length))}},g.array={string:m,array:c,arraybuffer:function(y){return new Uint8Array(y).buffer},uint8array:function(y){return new Uint8Array(y)},nodebuffer:function(y){return a.newBufferFrom(y)}},g.arraybuffer={string:function(y){return m(new Uint8Array(y))},array:function(y){return p(new Uint8Array(y),new Array(y.byteLength))},arraybuffer:c,uint8array:function(y){return new Uint8Array(y)},nodebuffer:function(y){return a.newBufferFrom(new Uint8Array(y))}},g.uint8array={string:m,array:function(y){return p(y,new Array(y.length))},arraybuffer:function(y){return y.buffer},uint8array:c,nodebuffer:function(y){return a.newBufferFrom(y)}},g.nodebuffer={string:m,array:function(y){return p(y,new Array(y.length))},arraybuffer:function(y){return g.nodebuffer.uint8array(y).buffer},uint8array:function(y){return p(y,new Uint8Array(y.length))},nodebuffer:c},r.transformTo=function(y,v){if(v=v||"",!y)return v;r.checkSupport(y);var x=r.getTypeOf(v);return g[x][y](v)},r.resolve=function(y){for(var v=y.split("/"),x=[],C=0;C<v.length;C++){var D=v[C];D==="."||D===""&&C!==0&&C!==v.length-1||(D===".."?x.pop():x.push(D))}return x.join("/")},r.getTypeOf=function(y){return typeof y=="string"?"string":Object.prototype.toString.call(y)==="[object Array]"?"array":s.nodebuffer&&a.isBuffer(y)?"nodebuffer":s.uint8array&&y instanceof Uint8Array?"uint8array":s.arraybuffer&&y instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(y){if(!s[y.toLowerCase()])throw new Error(y+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(y){var v,x,C="";for(x=0;x<(y||"").length;x++)C+="\\x"+((v=y.charCodeAt(x))<16?"0":"")+v.toString(16).toUpperCase();return C},r.delay=function(y,v,x){setImmediate(function(){y.apply(x||null,v||[])})},r.inherits=function(y,v){function x(){}x.prototype=v.prototype,y.prototype=new x},r.extend=function(){var y,v,x={};for(y=0;y<arguments.length;y++)for(v in arguments[y])Object.prototype.hasOwnProperty.call(arguments[y],v)&&x[v]===void 0&&(x[v]=arguments[y][v]);return x},r.prepareContent=function(y,v,x,C,D){return l.Promise.resolve(v).then(function(E){return s.blob&&(E instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(E))!==-1)&&typeof FileReader<"u"?new l.Promise(function(T,S){var A=new FileReader;A.onload=function(I){T(I.target.result)},A.onerror=function(I){S(I.target.error)},A.readAsArrayBuffer(E)}):E}).then(function(E){var T=r.getTypeOf(E);return T?(T==="arraybuffer"?E=r.transformTo("uint8array",E):T==="string"&&(D?E=o.decode(E):x&&C!==!0&&(E=(function(S){return d(S,s.uint8array?new Uint8Array(S.length):new Array(S.length))})(E))),E):l.Promise.reject(new Error("Can't read the data of '"+y+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,n,r){var s=t("./reader/readerFor"),o=t("./utils"),a=t("./signature"),l=t("./zipEntry"),c=t("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var m=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(m)+", expected "+o.pretty(f)+")")}},isSignature:function(f,m){var p=this.reader.index;this.reader.setIndex(f);var g=this.reader.readString(4)===m;return this.reader.setIndex(p),g},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),m=c.uint8array?"uint8array":"array",p=o.transformTo(m,f);this.zipComment=this.loadOptions.decodeFileName(p)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,m,p,g=this.zip64EndOfCentralSize-44;0<g;)f=this.reader.readInt(2),m=this.reader.readInt(4),p=this.reader.readData(m),this.zip64ExtensibleData[f]={id:f,length:m,value:p}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,m;for(f=0;f<this.files.length;f++)m=this.files[f],this.reader.setIndex(m.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip f
478ile ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var m=f;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var p=this.centralDirOffset+this.centralDirSize;this.zip64&&(p+=20,p+=12+this.zip64EndOfCentralSize);var g=m-p;if(0<g)this.isSignature(m,a.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(f){this.reader=s(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,n,r){var s=t("./reader/readerFor"),o=t("./utils"),a=t("./compressedObject"),l=t("./crc32"),c=t("./utf8"),d=t("./compressions"),f=t("./support");function m(p,g){this.options=p,this.loadOptions=g}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(p){var g,y;if(p.skip(22),this.fileNameLength=p.readInt(2),y=p.readInt(2),this.fileName=p.readData(this.fileNameLength),p.skip(y),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((g=(function(v){for(var x in d)if(Object.prototype.hasOwnProperty.call(d,x)&&d[x].magic===v)return d[x];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,g,p.readData(this.compressedSize))},readCentralPart:function(p){this.versionMadeBy=p.readInt(2),p.skip(2),this.bitFlag=p.readInt(2),this.compressionMethod=p.readString(2),this.date=p.readDate(),this.crc32=p.readInt(4),this.compressedSize=p.readInt(4),this.uncompressedSize=p.readInt(4);var g=p.readInt(2);if(this.extraFieldsLength=p.readInt(2),this.fileCommentLength=p.readInt(2),this.diskNumberStart=p.readInt(2),this.internalFileAttributes=p.readInt(2),this.externalFileAttributes=p.readInt(4),this.localHeaderOffset=p.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");p.skip(g),this.readExtraFields(p),this.parseZIP64ExtraField(p),this.fileComment=p.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var p=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=s(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&
vendor: 12,590 bytes, line 478
478(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var g,y,v,x=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4<x;)g=p.readInt(2),y=p.readInt(2),v=p.readData(y),this.extraFields[g]={id:g,length:y,value:v};p.setIndex(x)},handleUTF8:function(){var p=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var y=o.transformTo(p,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(y)}var v=this.findExtraFieldUnicodeComment();if(v!==null)this.fileCommentStr=v;else{var x=o.transformTo(p,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(x)}}},findExtraFieldUnicodePath:function(){var p=this.extraFields[28789];if(p){var g=s(p.value);return g.readInt(1)!==1||l(this.fileName)!==g.readInt(4)?null:c.utf8decode(g.readData(p.length-5))}return null},findExtraFieldUnicodeComment:function(){var p=this.extraFields[25461];if(p){var g=s(p.value);return g.readInt(1)!==1||l(this.fileComment)!==g.readInt(4)?null:c.utf8decode(g.readData(p.length-5))}return null}},n.exports=m},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,n,r){function s(g,y,v){this.name=g,this.dir=v.dir,this.date=v.date,this.comment=v.comment,this.unixPermissions=v.unixPermissions,this.dosPermissions=v.dosPermissions,this._data=y,this._dataBinary=v.binary,this.options={compression:v.compression,compressionOptions:v.compressionOptions}}var o=t("./stream/StreamHelper"),a=t("./stream/DataWorker"),l=t("./utf8"),c=t("./compressedObject"),d=t("./stream/GenericWorker");s.prototype={internalStream:function(g){var y=null,v="string";try{if(!g)throw new Error("No output type specified.");var x=(v=g.toLowerCase())==="string"||v==="text";v!=="binarystring"&&v!=="text"||(v="string"),y=this._decompressWorker();var C=!this._dataBinary;C&&!x&&(y=y.pipe(new l.Utf8EncodeWorker)),!C&&x&&(y=y.pipe(new l.Utf8DecodeWorker))}catch(D){(y=new d("error")).error(D)}return new o(y,v,"")},async:function(g,y){return this.internalStream(g).accumulate(y)},nodeStream:function(g,y){return this.internalStream(g||"nodebuffer").toNodejsStream(y)},_compressWorker:function(g,y){if(this._data instanceof c&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var v=this._decompressWorker();return this._dataBinary||(v=v.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(v,g,y)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof d?this._data:new a(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],m=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},p=0;p<f.length;p++)s.prototype[f[p]]=m;n.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,n,r){(function(s){var o,a,l=s.MutationObserver||s.WebKitMutationObserver;if(l){var c=0,d=new l(g),f=s.document.createTextNode("");d.observe(f,{characterData:!0}),o=function(){f.data=c=++c%2}}else if(s.setImmediate||s.MessageChannel===void 0)o="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var y=s.document.createElement("script");y.onreadystatechange=function(){g(),y.onreadystatechange=null,y.parentNode.removeChild(y),y=null},s.document.documentElement.appendChild(y)}:function(){setTimeout(g,0)};else{var m=new s.MessageChannel;m.port1.onmessage=g,o=function(){m.port2.postMessage(0)}}var p=[];function g(){var y,v;a=!0;for(var x=p.length;x;){for(v=p,p=[],y=-1;++y<x;)v[y]();x=p.length}a=!1}n.exports=function(y){p.push(y)!==1||a||o()}}).call(this,typeof Io<"u"?Io:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(t,n,r){var s=t("immediate");function o(){}var a={},l=["REJECTED"],c=["FULFILLED"],d=["PENDING"];function f(x){if(typeof x!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,x!==o&&y(this,x)}function m(x,C,D){this.promise=x,typeof C=="function"&&(this.onFulfilled=C,this.callFulfilled=this.otherCallFulfilled),typeof D=="function"&&(this.onRejected=D,this.callRejected=this.otherCallRejected)}function p(x,C,D){s(function(){var E;try{E=C(D)}catch(T){return a.reject(x,T)}E===x?a.reject(x,new TypeError("Cannot resolve promise with itself")):a.resolve(x,E)})}function g(x){var C=x&&x.then;if(x&&(typeof x=="object"||typeof x=="function")&&typeof C=="function")return function(){C.apply(x,arguments)}}function y(x,C){var D=!1;function E(A){D||(D=!0,a.reject(x,A))}function T(A){D||(D=!0,a.resolve(x,A))}var S=v(function(){C(T,E)});S.status==="error"&&E(S.value)}function v(x,C){var D={};try{D.value=x(C),D.status="success"}catch(E){D.status="error",D.value=E}return D}(n.exports=f).prototype.finally=function(x){if(typeof x!="function")return this;var C=this.constructor;return this.then(function(D){return C.resolve(x()).then(function(){return D})},function(D){return C.resolve(x()).then(function(){throw D})})},f.prototype.catch=function(x){return this.then(null,x)},f.prototype.then=function(x,C){if(typeof x!="function"&&this.state===c||typeof C!="function"&&this.state===l)return this;var D=new this.constructor(o);return this.state!==d?p(D,this.state===c?x:C,this.outcome):this.queue.push(new m(D,x,C)),D},m.prototype.callFulfilled=function(x){a.resolve(this.promise,x)},m.prototype.otherCallFulfilled=function(x){p(this.promise,this.onFulfilled,x)},m.prototype.callRejected=function(x){a.reject(this.promise,x)},m.prototype.otherCallRejected=function(x){p(this.promise,this.onRejected,x)},a.resolve=function(x,C){var D=v(g,C);if(D.status==="error")return a.reject(x,D.value);var E=D.value;if(E)y(x,E);else{x.state=c,x.outcome=C;for(var T=-1,S=x.queue.length;++T<S;)x.queue[T].callFulfilled(C)}return x},a.reject=function(x,C){x.state=l,x.outcome=C;for(var D=-1,E=x.queue.length;++D<E;)x.queue[D].callRejected(C);return x},f.resolve=function(x){return x instanceof this?x:a.resolve(new this(o),x)},f.reject=function(x){var C=new this(o);return a.reject(C,x)},f.all=function(x){var C=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var D=x.length,E=!1;if(!D)return this.resolve([]);for(var T=new Array(D),S=0,A=-1,I=new this(o);++A<D;)R(x[A],A);return I;function R(O,j){C.resolve(O).then(function(B){T[j]=B,++S!==D||E||(E=!0,a.resolve(I,T))},function(B){E||(E=!0,a.reject(I,B))})}},f.race=function(x){var C=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var D=x.length,E=!1;if(!D)return this.resolve([]);for(var T=-1,S=new this(o);++T<D;)A=x[T],C.resolve(A).then(function(I){E||(E=!0,a.resolve(S,I))},function(I){E||(E=!0,a.reject(S,I))});var A;return S}},{immediate:36}],38:[function(t,n,r){var s={};(0,t("./lib/utils/common").assign)(s,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),n.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,n,r){var s=t("./zlib/deflate"),o=t("./utils/common"),a=t("./utils/strings"),l=t("./zlib/messages"),c=t("./zlib/zstream"),d=Object.prototype.toString,f=0,m=-1,p=0,g=8;function y(x){if(!(this instanceof y))return new y(x);this.options=o.assign({level:m,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:p,to:""},x||{});var C=this.options;C.raw&&0<C.windowBits?C.windowBits=-C.windowBits:C.gzip&&0<C.windowBits&&C.windowBits<16&&(C.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var D=s.deflateInit2(this.strm,C.level,C.method,C.windowBits,C.memLevel,C.strategy);if(D!==f)throw new Error(l[D]);if(C.header&&s.deflateSetHeader(this.strm,C.header),C.dictionary){var E;if(E=typeof C.dictionary=="string"?a.string2buf(C.dictionary):d.call(C.dictionary)==="[object ArrayBuffer]"?new Uint8Array(C.dictionary):C.dictionary,(D=s.deflateSetDictionary(this.strm,E))!==f)throw new Error(l[D]);this._dict_set=!0}}function v(x,C){var D=new y(C);if(D.push(x,!0),D.err)throw D.msg||l[D.err];return D.result}y.prototype.push=function(x,C){var D,E,T=this.strm,S=this.options.chunkSize;if(this.ended)return!1;E=C===~~C?C:C===!0?4:0,typeof x=="string"?T.input=a.string2buf(x):d.call(x)==="[object ArrayBuffer]"?T.input=new Uint8Array(x):T.input=x,T.next_in=0,T.avail_in=T.input.length;do{if(T.avail_out===0&&(T.output=new o.Buf8(S),T.next_out=0,T.avail_out=S),(D=s.deflate(T,E))!==1&&D!==f)return this.onEnd(D),!(this.ended=!0);T.avail_out!==0&&(T.avail_in!==0||E!==4&&E!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(o.shrinkBuf(T.output,T.next_out))):this.onData(o.shrinkBuf(T.output,T.next_out)))}while((0<T.avail_in||T.avail_out===0)&&D!==1);return E===4?(D=s.deflateEnd(this.strm),this.onEnd(D),this.ended=!0,D===f):E!==2||(this.onEnd(f),!(T.avail_out=0))},y.prototype.onData=function(x){this.chunks.push(x)},y.prototype.onEnd=function(x){x===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=x,this.msg=this.strm.msg},r.Deflate=y,r.deflate=v,r.deflateRaw=function(x,C){return(C=C||{}).raw=!0,v(x,C)},r.gzip=function(x,C){return(C=C||{}).gzip=!0,v(x,C)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,n,r){var s=t("./zlib/inflate"),o=t("./utils/common"),a=t("./utils/strings"),l=t("./zlib/constants"),c=t("./zlib/messages"),d=t("./zlib/zstream"),f=t("./zlib/gzheader"),m=Object.prototype.toString;function p(y){if(!(this instanceof p))return new p(y);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},y||{});var v=this.options;v.raw&&0<=v.windowBits&&v.windowBits<16&&(v.windowBits=-v.windowBits,v.windowBits===0&&(v.windowBits=-15)),!(0<=v.windowBits&&v.windowBits<16)||y&&y.windowBits||(v.windowBits+=32),15<v.windowBits&&v.windowBits<48&&(15&v.windowBits)==0&&(v.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var x=s.inflateInit2(this.strm,v.windowBits);if(x!==l.Z_OK)throw new Error(c[x]);this.header=new f,s.inflateGetHeader(this.strm,this.header)}function g(y,v){var x=new p(v);if(x.push(y,!0),x.err)throw x.msg||c[x.err];return x.result}p.prototype.push=function(y,v){var x,C,D,E,T,S,A=this.strm,I=this.options.chunkSize,R=this.options.dictionary,O=!1;if(this.ended)return!1;C=v===~~v?v:v===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof y=="string"?A.input=a.binstring2buf(y):m.call(y)==="[object ArrayBuffer]"?A.input=new Uint8Array(y):A.input=y,A.next_in=0,A.avail_in=A.input.length;do{if(A.avail_out===0&&(A.output=new o.Buf8(I),A.next_out=0,A.avail_out=I),(x=s.inflate(A,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&R&&(S=typeof R=="string"?a.string2buf(R):m.call(R)==="[object ArrayBuffer]"?new Uint8Array(R):R,x=s.inflateSetDictionary(this.strm,S)),x===l.Z_BUF_ERROR&&O===!0&&(x=l.Z_OK,O=!1),x!==l.Z_STREAM_END&&x!==l.Z_OK)return this.onEnd(x),!(this.ended=!0);A.next_out&&(A.avail_out!==0&&x!==l.Z_STREAM_END&&(A.avail_in!==0||C!==l.Z_FINISH&&C!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(D=a.utf8border(A.output,A.next_out),E=A.next_out-D,T=a.buf2string(A.output,D),A.next_out=E,A.avail_out=I-E,E&&o.arraySet(A.output,A.output,D,E,0),this.onData(T)):this.onData(o.shrinkBuf(A.output,A.next_out)))),A.avail_in===0&&A.avail_out===0&&(O=!0)}while((0<A.avail_in||A.avail_out===0)&&x!==l.Z_STREAM_END);return x===l.Z_STREAM_END&&(C=l.Z_FINISH),C===l.Z_FINISH?(x=s.inflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===l.Z_OK):C!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(A.avail_out=0))},p.prototype.onData=function(y){this.chunks.push(y)},p.prototype.onEnd=function(y){y===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=y,this.msg=this.strm.msg},r.Inflate=p,r.inflate=g,r.inflateRaw=function(y,v){return(v=v||{}).raw=!0,g(y,v)},r.ungzip=g},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,n,r){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";r.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1
vendor: 5,264 bytes, line 478
478);c.length;){var d=c.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(l[f]=d[f])}}return l},r.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var o={arraySet:function(l,c,d,f,m){if(c.subarray&&l.subarray)l.set(c.subarray(d,d+f),m);else for(var p=0;p<f;p++)l[m+p]=c[d+p]},flattenChunks:function(l){var c,d,f,m,p,g;for(c=f=0,d=l.length;c<d;c++)f+=l[c].length;for(g=new Uint8Array(f),c=m=0,d=l.length;c<d;c++)p=l[c],g.set(p,m),m+=p.length;return g}},a={arraySet:function(l,c,d,f,m){for(var p=0;p<f;p++)l[m+p]=c[d+p]},flattenChunks:function(l){return[].concat.apply([],l)}};r.setTyped=function(l){l?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,o)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,a))},r.setTyped(s)},{}],42:[function(t,n,r){var s=t("./common"),o=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new s.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function d(f,m){if(m<65537&&(f.subarray&&a||!f.subarray&&o))return String.fromCharCode.apply(null,s.shrinkBuf(f,m));for(var p="",g=0;g<m;g++)p+=String.fromCharCode(f[g]);return p}l[254]=l[254]=1,r.string2buf=function(f){var m,p,g,y,v,x=f.length,C=0;for(y=0;y<x;y++)(64512&(p=f.charCodeAt(y)))==55296&&y+1<x&&(64512&(g=f.charCodeAt(y+1)))==56320&&(p=65536+(p-55296<<10)+(g-56320),y++),C+=p<128?1:p<2048?2:p<65536?3:4;for(m=new s.Buf8(C),y=v=0;v<C;y++)(64512&(p=f.charCodeAt(y)))==55296&&y+1<x&&(64512&(g=f.charCodeAt(y+1)))==56320&&(p=65536+(p-55296<<10)+(g-56320),y++),p<128?m[v++]=p:(p<2048?m[v++]=192|p>>>6:(p<65536?m[v++]=224|p>>>12:(m[v++]=240|p>>>18,m[v++]=128|p>>>12&63),m[v++]=128|p>>>6&63),m[v++]=128|63&p);return m},r.buf2binstring=function(f){return d(f,f.length)},r.binstring2buf=function(f){for(var m=new s.Buf8(f.length),p=0,g=m.length;p<g;p++)m[p]=f.charCodeAt(p);return m},r.buf2string=function(f,m){var p,g,y,v,x=m||f.length,C=new Array(2*x);for(p=g=0;p<x;)if((y=f[p++])<128)C[g++]=y;else if(4<(v=l[y]))C[g++]=65533,p+=v-1;else{for(y&=v===2?31:v===3?15:7;1<v&&p<x;)y=y<<6|63&f[p++],v--;1<v?C[g++]=65533:y<65536?C[g++]=y:(y-=65536,C[g++]=55296|y>>10&1023,C[g++]=56320|1023&y)}return d(C,g)},r.utf8border=function(f,m){var p;for((m=m||f.length)>f.length&&(m=f.length),p=m-1;0<=p&&(192&f[p])==128;)p--;return p<0||p===0?m:p+l[f[p]]>m?p:m}},{"./common":41}],43:[function(t,n,r){n.exports=function(s,o,a,l){for(var c=65535&s|0,d=s>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;d=d+(c=c+o[l++]|0)|0,--f;);c%=65521,d%=65521}return c|d<<16|0}},{}],44:[function(t,n,r){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,n,r){var s=(function(){for(var o,a=[],l=0;l<256;l++){o=l;for(var c=0;c<8;c++)o=1&o?3988292384^o>>>1:o>>>1;a[l]=o}return a})();n.exports=function(o,a,l,c){var d=s,f=c+l;o^=-1;for(var m=c;m<f;m++)o=o>>>8^d[255&(o^a[m])];return-1^o}},{}],46:[function(t,n,r){var s,o=t("../utils/common"),a=t("./trees"),l=t("./adler32"),c=t("./crc32"),d=t("./messages"),f=0,m=4,p=0,g=-2,y=-1,v=4,x=2,C=8,D=9,E=286,T=30,S=19,A=2*E+1,I=15,R=3,O=258,j=O+R+1,B=42,U=113,F=1,H=2,L=3,W=4;function G(N,te){return N.msg=d[te],te}function Y(N){return(N<<1)-(4<N?9:0)}function ie(N){for(var te=N.length;0<=--te;)N[te]=0}function V(N){var te=N.state,ne=te.pending;ne>N.avail_out&&(ne=N.avail_out),ne!==0&&(o.arraySet(N.output,te.pending_buf,te.pending_out,ne,N.next_out),N.next_out+=ne,te.pending_out+=ne,N.total_out+=ne,N.avail_out-=ne,te.pending-=ne,te.pending===0&&(te.pending_out=0))}function q(N,te){a._tr_flush_block(N,0<=N.block_start?N.block_start:-1,N.strstart-N.block_start,te),N.block_start=N.strstart,V(N.strm)}function $(N,te){N.pending_buf[N.pending++]=te}function J(N,te){N.pending_buf[N.pending++]=te>>>8&255,N.pending_buf[N.pending++]=255&te}function ce(N,te){var ne,Z,Q=N.max_chain_length,le=N.strstart,we=N.prev_length,xe=N.nice_match,fe=N.strstart>N.w_size-j?N.strstart-(N.w_size-j):0,re=N.window,ae=N.w_mask,me=N.prev,De=N.strstart+O,je=re[le+we-1],tt=re[le+we];N.prev_length>=N.good_match&&(Q>>=2),xe>N.lookahead&&(xe=N.lookahead);do if(re[(ne=te)+we]===tt&&re[ne+we-1]===je&&re[ne]===re[le]&&re[++ne]===re[le+1]){le+=2,ne++;do;while(re[++le]===re[++ne]&&re[++le]===re[++ne]&&re[++le]===re[++ne]&&re[++le]===re[++ne]&&re[++le]===re[++ne]&&re[++le]===re[++ne]&&re[++le]===re[++ne]&&re[++le]===re[++ne]&&le<De);if(Z=O-(De-le),le=De-O,we<Z){if(N.match_start=te,xe<=(we=Z))break;je=re[le+we-1],tt=re[le+we]}}while((te=me[te&ae])>fe&&--Q!=0);return we<=N.lookahead?we:N.lookahead}function se(N){var te,ne,Z,Q,le,we,xe,fe,re,ae,me=N.w_size;do{if(Q=N.window_size-N.lookahead-N.strstart,N.strstart>=me+(me-j)){for(o.arraySet(N.window,N.window,me,me,0),N.match_start-=me,N.strstart-=me,N.block_start-=me,te=ne=N.hash_size;Z=N.head[--te],N.head[te]=me<=Z?Z-me:0,--ne;);for(te=ne=me;
vendor: 36,799 bytes, line 478
478Z=N.prev[--te],N.prev[te]=me<=Z?Z-me:0,--ne;);Q+=me}if(N.strm.avail_in===0)break;if(we=N.strm,xe=N.window,fe=N.strstart+N.lookahead,re=Q,ae=void 0,ae=we.avail_in,re<ae&&(ae=re),ne=ae===0?0:(we.avail_in-=ae,o.arraySet(xe,we.input,we.next_in,ae,fe),we.state.wrap===1?we.adler=l(we.adler,xe,ae,fe):we.state.wrap===2&&(we.adler=c(we.adler,xe,ae,fe)),we.next_in+=ae,we.total_in+=ae,ae),N.lookahead+=ne,N.lookahead+N.insert>=R)for(le=N.strstart-N.insert,N.ins_h=N.window[le],N.ins_h=(N.ins_h<<N.hash_shift^N.window[le+1])&N.hash_mask;N.insert&&(N.ins_h=(N.ins_h<<N.hash_shift^N.window[le+R-1])&N.hash_mask,N.prev[le&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=le,le++,N.insert--,!(N.lookahead+N.insert<R)););}while(N.lookahead<j&&N.strm.avail_in!==0)}function ge(N,te){for(var ne,Z;;){if(N.lookahead<j){if(se(N),N.lookahead<j&&te===f)return F;if(N.lookahead===0)break}if(ne=0,N.lookahead>=R&&(N.ins_h=(N.ins_h<<N.hash_shift^N.window[N.strstart+R-1])&N.hash_mask,ne=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart),ne!==0&&N.strstart-ne<=N.w_size-j&&(N.match_length=ce(N,ne)),N.match_length>=R)if(Z=a._tr_tally(N,N.strstart-N.match_start,N.match_length-R),N.lookahead-=N.match_length,N.match_length<=N.max_lazy_match&&N.lookahead>=R){for(N.match_length--;N.strstart++,N.ins_h=(N.ins_h<<N.hash_shift^N.window[N.strstart+R-1])&N.hash_mask,ne=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart,--N.match_length!=0;);N.strstart++}else N.strstart+=N.match_length,N.match_length=0,N.ins_h=N.window[N.strstart],N.ins_h=(N.ins_h<<N.hash_shift^N.window[N.strstart+1])&N.hash_mask;else Z=a._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++;if(Z&&(q(N,!1),N.strm.avail_out===0))return F}return N.insert=N.strstart<R-1?N.strstart:R-1,te===m?(q(N,!0),N.strm.avail_out===0?L:W):N.last_lit&&(q(N,!1),N.strm.avail_out===0)?F:H}function ye(N,te){for(var ne,Z,Q;;){if(N.lookahead<j){if(se(N),N.lookahead<j&&te===f)return F;if(N.lookahead===0)break}if(ne=0,N.lookahead>=R&&(N.ins_h=(N.ins_h<<N.hash_shift^N.window[N.strstart+R-1])&N.hash_mask,ne=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart),N.prev_length=N.match_length,N.prev_match=N.match_start,N.match_length=R-1,ne!==0&&N.prev_length<N.max_lazy_match&&N.strstart-ne<=N.w_size-j&&(N.match_length=ce(N,ne),N.match_length<=5&&(N.strategy===1||N.match_length===R&&4096<N.strstart-N.match_start)&&(N.match_length=R-1)),N.prev_length>=R&&N.match_length<=N.prev_length){for(Q=N.strstart+N.lookahead-R,Z=a._tr_tally(N,N.strstart-1-N.prev_match,N.prev_length-R),N.lookahead-=N.prev_length-1,N.prev_length-=2;++N.strstart<=Q&&(N.ins_h=(N.ins_h<<N.hash_shift^N.window[N.strstart+R-1])&N.hash_mask,ne=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart),--N.prev_length!=0;);if(N.match_available=0,N.match_length=R-1,N.strstart++,Z&&(q(N,!1),N.strm.avail_out===0))return F}else if(N.match_available){if((Z=a._tr_tally(N,0,N.window[N.strstart-1]))&&q(N,!1),N.strstart++,N.lookahead--,N.strm.avail_out===0)return F}else N.match_available=1,N.strstart++,N.lookahead--}return N.match_available&&(Z=a._tr_tally(N,0,N.window[N.strstart-1]),N.match_available=0),N.insert=N.strstart<R-1?N.strstart:R-1,te===m?(q(N,!0),N.strm.avail_out===0?L:W):N.last_lit&&(q(N,!1),N.strm.avail_out===0)?F:H}function Pe(N,te,ne,Z,Q){this.good_length=N,this.max_lazy=te,this.nice_length=ne,this.max_chain=Z,this.func=Q}function Ve(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=C,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*A),this.dyn_dtree=new o.Buf16(2*(2*T+1)),this.bl_tree=new o.Buf16(2*(2*S+1)),ie(this.dyn_ltree),ie(this.dyn_dtree),ie(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(I+1),this.heap=new o.Buf16(2*E+1),ie(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*E+1),ie(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ze(N){var te;return N&&N.state?(N.total_in=N.total_out=0,N.data_type=x,(te=N.state).pending=0,te.pending_out=0,te.wrap<0&&(te.wrap=-te.wrap),te.status=te.wrap?B:U,N.adler=te.wrap===2?0:1,te.last_flush=f,a._tr_init(te),p):G(N,g)}function dt(N){var te=Ze(N);return te===p&&(function(ne){ne.window_size=2*ne.w_size,ie(ne.head),ne.max_lazy_match=s[ne.level].max_lazy,ne.good_match=s[ne.level].good_length,ne.nice_match=s[ne.level].nice_length,ne.max_chain_length=s[ne.level].max_chain,ne.strstart=0,ne.block_start=0,ne.lookahead=0,ne.insert=0,ne.match_length=ne.prev_length=R-1,ne.match_available=0,ne.ins_h=0})(N.state),te}function Re(N,te,ne,Z,Q,le){if(!N)return g;var we=1;if(te===y&&(te=6),Z<0?(we=0,Z=-Z):15<Z&&(we=2,Z-=16),Q<1||D<Q||ne!==C||Z<8||15<Z||te<0||9<te||le<0||v<le)return G(N,g);Z===8&&(Z=9);var xe=new Ve;return(N.state=xe).strm=N,xe.wrap=we,xe.gzhead=null,xe.w_bits=Z,xe.w_size=1<<xe.w_bits,xe.w_mask=xe.w_size-1,xe.hash_bits=Q+7,xe.hash_size=1<<xe.hash_bits,xe.hash_mask=xe.hash_size-1,xe.hash_shift=~~((xe.hash_bits+R-1)/R),xe.window=new o.Buf8(2*xe.w_size),xe.head=new o.Buf16(xe.hash_size),xe.prev=new o.Buf16(xe.w_size),xe.lit_bufsize=1<<Q+6,xe.pending_buf_size=4*xe.lit_bufsize,xe.pending_buf=new o.Buf8(xe.pending_buf_size),xe.d_buf=1*xe.lit_bufsize,xe.l_buf=3*xe.lit_bufsize,xe.level=te,xe.strategy=le,xe.method=ne,dt(N)}s=[new Pe(0,0,0,0,function(N,te){var ne=65535;for(ne>N.pending_buf_size-5&&(ne=N.pending_buf_size-5);;){if(N.lookahead<=1){if(se(N),N.lookahead===0&&te===f)return F;if(N.lookahead===0)break}N.strstart+=N.lookahead,N.lookahead=0;var Z=N.block_start+ne;if((N.strstart===0||N.strstart>=Z)&&(N.lookahead=N.strstart-Z,N.strstart=Z,q(N,!1),N.strm.avail_out===0)||N.strstart-N.block_start>=N.w_size-j&&(q(N,!1),N.strm.avail_out===0))return F}return N.insert=0,te===m?(q(N,!0),N.strm.avail_out===0?L:W):(N.strstart>N.block_start&&(q(N,!1),N.strm.avail_out),F)}),new Pe(4,4,8,4,ge),new Pe(4,5,16,8,ge),new Pe(4,6,32,32,ge),new Pe(4,4,16,16,ye),new Pe(8,16,32,32,ye),new Pe(8,16,128,128,ye),new Pe(8,32,128,256,ye),new Pe(32,128,258,1024,ye),new Pe(32,258,258,4096,ye)],r.deflateInit=function(N,te){return Re(N,te,C,15,8,0)},r.deflateInit2=Re,r.deflateReset=dt,r.deflateResetKeep=Ze,r.deflateSetHeader=function(N,te){return N&&N.state?N.state.wrap!==2?g:(N.state.gzhead=te,p):g},r.deflate=function(N,te){var ne,Z,Q,le;if(!N||!N.state||5<te||te<0)return N?G(N,g):g;if(Z=N.state,!N.output||!N.input&&N.avail_in!==0||Z.status===666&&te!==m)return G(N,N.avail_out===0?-5:g);if(Z.strm=N,ne=Z.last_flush,Z.last_flush=te,Z.status===B)if(Z.wrap===2)N.adler=0,$(Z,31),$(Z,139),$(Z,8),Z.gzhead?($(Z,(Z.gzhead.text?1:0)+(Z.gzhead.hcrc?2:0)+(Z.gzhead.extra?4:0)+(Z.gzhead.name?8:0)+(Z.gzhead.comment?16:0)),$(Z,255&Z.gzhead.time),$(Z,Z.gzhead.time>>8&255),$(Z,Z.gzhead.time>>16&255),$(Z,Z.gzhead.time>>24&255),$(Z,Z.level===9?2:2<=Z.strategy||Z.level<2?4:0),$(Z,255&Z.gzhead.os),Z.gzhead.extra&&Z.gzhead.extra.length&&($(Z,255&Z.gzhead.extra.length),$(Z,Z.gzhead.extra.length>>8&255)),Z.gzhead.hcrc&&(N.adler=c(N.adler,Z.pending_buf,Z.pending,0)),Z.gzindex=0,Z.status=69):($(Z,0),$(Z,0),$(Z,0),$(Z,0),$(Z,0),$(Z,Z.level===9?2:2<=Z.strategy||Z.level<2?4:0),$(Z,3),Z.status=U);else{var we=C+(Z.w_bits-8<<4)<<8;we|=(2<=Z.strategy||Z.level<2?0:Z.level<6?1:Z.level===6?2:3)<<6,Z.strstart!==0&&(we|=32),we+=31-we%31,Z.status=U,J(Z,we),Z.strstart!==0&&(J(Z,N.adler>>>16),J(Z,65535&N.adler)),N.adler=1}if(Z.status===69)if(Z.gzhead.extra){for(Q=Z.pending;Z.gzindex<(65535&Z.gzhead.extra.length)&&(Z.pending!==Z.pending_buf_size||(Z.gzhead.hcrc&&Z.pending>Q&&(N.adler=c(N.adler,Z.pending_buf,Z.pending-Q,Q)),V(N),Q=Z.pending,Z.pending!==Z.pending_buf_size));)$(Z,255&Z.gzhead.extra[Z.gzindex]),Z.gzindex++;Z.gzhead.hcrc&&Z.pending>Q&&(N.adler=c(N.adler,Z.pending_buf,Z.pending-Q,Q)),Z.gzindex===Z.gzhead.extra.length&&(Z.gzindex=0,Z.status=73)}else Z.status=73;if(Z.status===73)if(Z.gzhead.name){Q=Z.pending;do{if(Z.pending===Z.pending_buf_size&&(Z.gzhead.hcrc&&Z.pending>Q&&(N.adler=c(N.adler,Z.pending_buf,Z.pending-Q,Q)),V(N),Q=Z.pending,Z.pending===Z.pending_buf_size)){le=1;break}le=Z.gzindex<Z.gzhead.name.length?255&Z.gzhead.name.charCodeAt(Z.gzindex++):0,$(Z,le)}while(le!==0);Z.gzhead.hcrc&&Z.pending>Q&&(N.adler=c(N.adler,Z.pending_buf,Z.pending-Q,Q)),le===0&&(Z.gzindex=0,Z.status=91)}else Z.status=91;if(Z.status===91)if(Z.gzhead.comment){Q=Z.pending;do{if(Z.pending===Z.pending_buf_size&&(Z.gzhead.hcrc&&Z.pending>Q&&(N.adler=c(N.adler,Z.pending_buf,Z.pending-Q,Q)),V(N),Q=Z.pending,Z.pending===Z.pending_buf_size)){le=1;break}le=Z.gzindex<Z.gzhead.comment.length?255&Z.gzhead.comment.charCodeAt(Z.gzindex++):0,$(Z,le)}while(le!==0);Z.gzhead.hcrc&&Z.pending>Q&&(N.adler=c(N.adler,Z.pending_buf,Z.pending-Q,Q)),le===0&&(Z.status=103)}else Z.status=103;if(Z.status===103&&(Z.gzhead.hcrc?(Z.pending+2>Z.pending_buf_size&&V(N),Z.pending+2<=Z.pending_buf_size&&($(Z,255&N.adler),$(Z,N.adler>>8&255),N.adler=0,Z.status=U)):Z.status=U),Z.pending!==0){if(V(N),N.avail_out===0)return Z.last_flush=-1,p}else if(N.avail_in===0&&Y(te)<=Y(ne)&&te!==m)return G(N,-5);if(Z.status===666&&N.avail_in!==0)return G(N,-5);if(N.avail_in!==0||Z.lookahead!==0||te!==f&&Z.status!==666){var xe=Z.strategy===2?(function(fe,re){for(var ae;;){if(fe.lookahead===0&&(se(fe),fe.lookahead===0)){if(re===f)return F;break}if(fe.match_length=0,ae=a._tr_tally(fe,0,fe.window[fe.strstart]),fe.lookahead--,fe.strstart++,ae&&(q(fe,!1),fe.strm.avail_out===0))return F}return fe.insert=0,re===m?(q(fe,!0),fe.strm.avail_out===0?L:W):fe.last_lit&&(q(fe,!1),fe.strm.avail_out===0)?F:H})(Z,te):Z.strategy===3?(function(fe,re){for(var ae,me,De,je,tt=fe.window;;){if(fe.lookahead<=O){if(se(fe),fe.lookahead<=O&&re===f)return F;if(fe.lookahead===0)break}if(fe.match_length=0,fe.lookahead>=R&&0<fe.strstart&&(me=tt[De=fe.strstart-1])===tt[++De]&&me===tt[++De]&&me===tt[++De]){je=fe.strstart+O;do;while(me===tt[++De]&&me===tt[++De]&&me===tt[++De]&&me===tt[++De]&&me===tt[++De]&&me===tt[++De]&&me===tt[++De]&&me===tt[++De]&&De<je);fe.match_length=O-(je-De),fe.match_length>fe.lookahead&&(fe.match_length=fe.lookahead)}if(fe.match_length>=R?(ae=a._tr_tally(fe,1,fe.match_length-R),fe.lookahead-=fe.match_length,fe.strstart+=fe.match_length,fe.match_length=0):(ae=a._tr_tally(fe,0,fe.window[fe.strstart]),fe.lookahead--,fe.strstart++),ae&&(q(fe,!1),fe.strm.avail_out===0))return F}return fe.insert=0,re===m?(q(fe,!0),fe.strm.avail_out===0?L:W):fe.last_lit&&(q(fe,!1),fe.strm.avail_out===0)?F:H})(Z,te):s[Z.level].func(Z,te);if(xe!==L&&xe!==W||(Z.status=666),xe===F||xe===L)return N.avail_out===0&&(Z.last_flush=-1),p;if(xe===H&&(te===1?a._tr_align(Z):te!==5&&(a._tr_stored_block(Z,0,0,!1),te===3&&(ie(Z.head),Z.lookahead===0&&(Z.strstart=0,Z.block_start=0,Z.insert=0))),V(N),N.avail_out===0))return Z.last_flush=-1,p}return te!==m?p:Z.wrap<=0?1:(Z.wrap===2?($(Z,255&N.adler),$(Z,N.adler>>8&255),$(Z,N.adler>>16&255),$(Z,N.adler>>24&255),$(Z,255&N.total_in),$(Z,N.total_in>>8&255),$(Z,N.total_in>>16&255),$(Z,N.total_in>>24&255)):(J(Z,N.adler>>>16),J(Z,65535&N.adler)),V(N),0<Z.wrap&&(Z.wrap=-Z.wrap),Z.pending!==0?p:1)},r.deflateEnd=function(N){var te;return N&&N.state?(te=N.state.status)!==B&&te!==69&&te!==73&&te!==91&&te!==103&&te!==U&&te!==666?G(N,g):(N.state=null,te===U?G(N,-3):p):g},r.deflateSetDictionary=function(N,te){var ne,Z,Q,le,we,xe,fe,re,ae=te.length;if(!N||!N.state||(le=(ne=N.state).wrap)===2||le===1&&ne.status!==B||ne.lookahead)return g;for(le===1&&(N.adler=l(N.adler,te,ae,0)),ne.wrap=0,ae>=ne.w_size&&(le===0&&(ie(ne.head),ne.strstart=0,ne.block_start=0,ne.insert=0),re=new o.Buf8(ne.w_size),o.arraySet(re,te,ae-ne.w_size,ne.w_size,0),te=re,ae=ne.w_size),we=N.avail_in,xe=N.next_in,fe=N.input,N.avail_in=ae,N.next_in=0,N.input=te,se(ne);ne.lookahead>=R;){for(Z=ne.strstart,Q=ne.lookahead-(R-1);ne.ins_h=(ne.ins_h<<ne.hash_shift^ne.window[Z+R-1])&ne.hash_mask,ne.prev[Z&ne.w_mask]=ne.head[ne.ins_h],ne.head[ne.ins_h]=Z,Z++,--Q;);ne.strstart=Z,ne.lookahead=R-1,se(ne)}return ne.strstart+=ne.lookahead,ne.block_start=ne.strstart,ne.insert=ne.lookahead,ne.lookahead=0,ne.match_length=ne.prev_length=R-1,ne.match_available=0,N.next_in=xe,N.input=fe,N.avail_in=we,ne.wrap=le,p},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,n,r){n.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,n,r){n.exports=function(s,o){var a,l,c,d,f,m,p,g,y,v,x,C,D,E,T,S,A,I,R,O,j,B,U,F,H;a=s.state,l=s.next_in,F=s.input,c=l+(s.avail_in-5),d=s.next_out,H=s.output,f=d-(o-s.avail_out),m=d+(s.avail_out-257),p=a.dmax,g=a.wsize,y=a.whave,v=a.wnext,x=a.window,C=a.hold,D=a.bits,E=a.lencode,T=a.distcode,S=(1<<a.lenbits)-1,A=(1<<a.distbits)-1;e:do{D<15&&(C+=F[l++]<<D,D+=8,C+=F[l++]<<D,D+=8),I=E[C&S];t:for(;;){if(C>>>=R=I>>>24,D-=R,(R=I>>>16&255)===0)H[d++]=65535&I;else{if(!(16&R)){if((64&R)==0){I=E[(65535&I)+(C&(1<<R)-1)];continue t}if(32&R){a.mode=12;break e}s.msg="invalid literal/length code",a.mode=30;break e}O=65535&I,(R&=15)&&(D<R&&(C+=F[l++]<<D,D+=8),O+=C&(1<<R)-1,C>>>=R,D-=R),D<15&&(C+=F[l++]<<D,D+=8,C+=F[l++]<<D,D+=8),I=T[C&A];n:for(;;){if(C>>>=R=I>>>24,D-=R,!(16&(R=I>>>16&255))){if((64&R)==0){I=T[(65535&I)+(C&(1<<R)-1)];continue n}s.msg="invalid distance code",a.mode=30;break e}if(j=65535&I,D<(R&=15)&&(C+=F[l++]<<D,(D+=8)<R&&(C+=F[l++]<<D,D+=8)),p<(j+=C&(1<<R)-1)){s.msg="invalid distance too far back",a.mode=30;break e}if(C>>>=R,D-=R,(R=d-f)<j){if(y<(R=j-R)&&a.sane){s.msg="invalid distance too far back",a.mode=30;break e}if(U=x,(B=0)===v){if(B+=g-R,R<O){for(O-=R;H[d++]=x[B++],--R;);B=d-j,U=H}}else if(v<R){if(B+=g+v-R,(R-=v)<O){for(O-=R;H[d++]=x[B++],--R;);if(B=0,v<O){for(O-=R=v;H[d++]=x[B++],--R;);B=d-j,U=H}}}else if(B+=v-R,R<O){for(O-=R;H[d++]=x[B++],--R;);B=d-j,U=H}for(;2<O;)H[d++]=U[B++],H[d++]=U[B++],H[d++]=U[B++],O-=3;O&&(H[d++]=U[B++],1<O&&(H[d++]=U[B++]))}else{for(B=d-j;H[d++]=H[B++],H[d++]=H[B++],H[d++]=H[B++],2<(O-=3););O&&(H[d++]=H[B++],1<O&&(H[d++]=H[B++]))}break}}break}}while(l<c&&d<m);l-=O=D>>3,C&=(1<<(D-=O<<3))-1,s.next_in=l,s.next_out=d,s.avail_in=l<c?c-l+5:5-(l-c),s.avail_out=d<m?m-d+257:257-(d-m),a.hold=C,a.bits=D}},{}],49:[function(t,n,r){var s=t("../utils/common"),o=t("./adler32"),a=t("./crc32"),l=t("./inffast"),c=t("./inftrees"),d=1,f=2,m=0,p=-2,g=1,y=852,v=592;function x(B){return(B>>>24&255)+(B>>>8&65280)+((65280&B)<<8)+((255&B)<<24)}function C(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function D(B){var U;return B&&B.state?(U=B.state,B.total_in=B.total_out=U.total=0,B.msg="",U.wrap&&(B.adler=1&U.wrap),U.mode=g,U.last=0,U.havedict=0,U.dmax=32768,U.head=null,U.hold=0,U.bits=0,U.lencode=U.lendyn=new s.Buf32(y),U.distcode=U.distdyn=new s.Buf32(v),U.sane=1,U.back=-1,m):p}function E(B){var U;return B&&B.state?((U=B.state).wsize=0,U.whave=0,U.wnext=0,D(B)):p}function T(B,U){var F,H;return B&&B.state?(H=B.state,U<0?(F=0,U=-U):(F=1+(U>>4),U<48&&(U&=15)),U&&(U<8||15<U)?p:(H.window!==null&&H.wbits!==U&&(H.window=null),H.wrap=F,H.wbits=U,E(B))):p}function S(B,U){var F,H;return B?(H=new C,(B.state=H).window=null,(F=T(B,U))!==m&&(B.state=null),F):p}var A,I,R=!0;function O(B){if(R){var U;for(A=new s.Buf32(512),I=new s.Buf32(32),U=0;U<144;)B.lens[U++]=8;for(;U<256;)B.lens[U++]=9;for(;U<280;)B.lens[U++]=7;for(;U<288;)B.lens[U++]=8;for(c(d,B.lens,0,288,A,0,B.work,{bits:9}),U=0;U<32;)B.lens[U++]=5;c(f,B.lens,0,32,I,0,B.work,{bits:5}),R=!1}B.lencode=A,B.lenbits=9,B.distcode=I,B.distbits=5}function j(B,U,F,H){var L,W=B.state;return W.window===null&&(W.wsize=1<<W.wbits,W.wnext=0,W.whave=0,W.window=new s.Buf8(W.wsize)),H>=W.wsize?(s.arraySet(W.window,U,F-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(H<(L=W.wsize-W.wnext)&&(L=H),s.arraySet(W.window,U,F-H,L,W.wnext),(H-=L)?(s.arraySet(W.window,U,F-H,H,0),W.wnext=H,W.whave=W.wsize):(W.wnext+=L,W.wnext===W.wsize&&(W.wnext=0),W.whave<W.wsize&&(W.whave+=L))),0}r.inflateReset=E,r.inflateReset2=T,r.inflateResetKeep=D,r.inflateInit=function(B){return S(B,15)},r.inflateInit2=S,r.inflate=function(B,U){var F,H,L,W,G,Y,ie,V,q,$,J,ce,se,ge,ye,Pe,Ve,Ze,dt,Re,N,te,ne,Z,Q=0,le=new s.Buf8(4),we=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!B||!B.state||!B.output||!B.input&&B.avail_in!==0)return p;(F=B.state).mode===12&&(F.mode=13),G=B.next_out,L=B.output,ie=B.avail_out,W=B.next_in,H=B.input,Y=B.avail_in,V=F.hold,q=F.bits,$=Y,J=ie,te=m;e:for(;;)switch(F.mode){case g:if(F.wrap===0){F.mode=13;break}for(;q<16;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}if(2&F.wrap&&V===35615){le[F.check=0]=255&V,le[1]=V>>>8&255,F.check=a(F.check,le,2,0),q=V=0,F.mode=2;break}if(F.flags=0,F.head&&(F.head.done=!1),!(1&F.wrap)||(((255&V)<<8)+(V>>8))%31){B.msg="incorrect header check",F.mode=30;break}if((15&V)!=8){B.msg="unknown compression method",F.mode=30;break}if(q-=4,N=8+(15&(V>>>=4)),F.wbits===0)F.wbits=N;else if(N>F.wbits){B.msg="invalid window size",F.mode=30;break}F.dmax=1<<N,B.adler=F.check=1,F.mode=512&V?10:12,q=V=0;break;case 2:for(;q<16;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}if(F.flags=V,(255&F.flags)!=8){B.msg="unknown compression method",F.mode=30;break}if(57344&F.flags){B.msg="unknown header flags set",F.mode=30;break}F.head&&(F.head.text=V>>8&1),512&F.flags&&(le[0]=255&V,le[1]=V>>>8&255,F.check=a(F.check,le,2,0)),q=V=0,F.mode=3;case 3:for(;q<32;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}F.head&&(F.head.time=V),512&F.flags&&(le[0]=255&V,le[1]=V>>>8&255,le[2]=V>>>16&255,le[3]=V>>>24&255,F.check=a(F.check,le,4,0)),q=V=0,F.mode=4;case 4:for(;q<16;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}F.head&&(F.head.xflags=255&V,F.head.os=V>>8),512&F.flags&&(le[0]=255&V,le[1]=V>>>8&255,F.check=a(F.check,le,2,0)),q=V=0,F.mode=5;case 5:if(1024&F.flags){for(;q<16;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}F.length=V,F.head&&(F.head.extra_len=V),512&F.flags&&(le[0]=255&V,le[1]=V>>>8&255,F.check=a(F.check,le,2,0)),q=V=0}else F.head&&(F.head.extra=null);F.mode=6;case 6:if(1024&F.flags&&(Y<(ce=F.length)&&(ce=Y),ce&&(F.head&&(N=F.head.extra_len-F.length,F.head.extra||(F.head.extra=new Array(F.head.extra_len)),s.arraySet(F.head.extra,H,W,ce,N)),512&F.flags&&(F.check=a(F.check,H,ce,W)),Y-=ce,W+=ce,F.length-=ce),F.length))break e;F.length=0,F.mode=7;case 7:if(2048&F.flags){if(Y===0)break e;for(ce=0;N=H[W+ce++],F.head&&N&&F.length<65536&&(F.head.name+=String.fromCharCode(N)),N&&ce<Y;);if(512&F.flags&&(F.check=a(F.check,H,ce,W)),Y-=ce,W+=ce,N)break e}else F.head&&(F.head.name=null);F.length=0,F.mode=8;case 8:if(4096&F.flags){if(Y===0)break e;for(ce=0;N=H[W+ce++],F.head&&N&&F.length<65536&&(F.head.comment+=String.fromCharCode(N)),N&&ce<Y;);if(512&F.flags&&(F.check=a(F.check,H,ce,W)),Y-=ce,W+=ce,N)break e}else F.head&&(F.head.comment=null);F.mode=9;case 9:if(512&F.flags){for(;q<16;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}if(V!==(65535&F.check)){B.msg="header crc mismatch",F.mode=30;break}q=V=0}F.head&&(F.head.hcrc=F.flags>>9&1,F.head.done=!0),B.adler=F.check=0,F.mode=12;break;case 10:for(;q<32;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}B.adler=F.check=x(V),q=V=0,F.mode=11;case 11:if(F.havedict===0)return B.next_out=G,B.avail_out=ie,B.next_in=W,B.avail_in=Y,F.hold=V,F.bits=q,2;B.adler=F.check=1,F.mode=12;case 12:if(U===5||U===6)break e;case 13:if(F.last){V>>>=7&q,q-=7&q,F.mode=27;break}for(;q<3;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}switch(F.last=1&V,q-=1,3&(V>>>=1)){case 0:F.mode=14;break;case 1:if(O(F),F.mode=20,U!==6)break;V>>>=2,q-=2;break e;case 2:F.mode=17;break;case 3:B.msg="invalid block type",F.mode=30}V>>>=2,q-=2;break;case 14:for(V>>>=7&q,q-=7&q;q<32;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}if((65535&V)!=(V>>>16^65535)){B.msg="invalid stored block lengths",F.mode=30;break}if(F.length=65535&V,q=V=0,F.mode=15,U===6)break e;case 15:F.mode=16;case 16:if(ce=F.length){if(Y<ce&&(ce=Y),ie<ce&&(ce=ie),ce===0)break e;s.arraySet(L,H,W,ce,G),Y-=ce,W+=ce,ie-=ce,G+=ce,F.length-=ce;break}F.mode=12;break;case 17:for(;q<14;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}if(F.nlen=257+(31&V),V>>>=5,q-=5,F.ndist=1+(31&V),V>>>=5,q-=5,F.ncode=4+(15&V),V>>>=4,q-=4,286<F.nlen||30<F.ndist){B.msg="too many length or distance symbols",F.mode=30;break}F.have=0,F.mode=18;case 18:for(;F.have<F.ncode;){for(;q<3;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}F.lens[we[F.have++]]=7&V,V>>>=3,q-=3}for(;F.have<19;)F.lens[we[F.have++]]=0;if(F.lencode=F.lendyn,F.lenbits=7,ne={bits:F.lenbits},te=c(0,F.lens,0,19,F.lencode,0,F.work,ne),F.lenbits=ne.bits,te){B.msg="invalid code lengths set",F.mode=30;break}F.have=0,F.mode=19;case 19:for(;F.have<F.nlen+F.ndist;){for(;Pe=(Q=F.lencode[V&(1<<F.lenbits)-1])>>>16&255,Ve=65535&Q,!((ye=Q>>>24)<=q);){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}if(Ve<16)V>>>=ye,q-=ye,F.lens[F.have++]=Ve;else{if(Ve===16){for(Z=ye+2;q<Z;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}if(V>>>=ye,q-=ye,F.have===0){B.msg="invalid bit length repeat",F.mode=30;break}N=F.lens[F.have-1],ce=3+(3&V),V>>>=2,q-=2}else if(Ve===17){for(Z=ye+3;q<Z;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}q-=ye,N=0,ce=3+(7&(V>>>=ye)),V>>>=3,q-=3}else{for(Z=ye+7;q<Z;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}q-=ye,N=0,ce=11+(127&(V>>>=ye)),V>>>=7,q-=7}if(F.have+ce>F.nlen+F.ndist){B.msg="invalid bit length repeat",F.mode=30;break}for(;ce--;)F.lens[F.have++]=N}}if(F.mode===30)break;if(F.lens[256]===0){B.msg="invalid code -- missing end-of-block",F.mode=30;break}if(F.lenbits=9,ne={bits:F.lenbits},te=c(d,F.lens,0,F.nlen,F.lencode,0,F.work,ne),F.lenbits=ne.bits,te){B.msg="invalid literal/lengths set",F.mode=30;break}if(F.distbits=6,F.distcode=F.distdyn,ne={bits:F.distbits},te=c(f,F.lens,F.nlen,F.ndist,F.distcode,0,F.work,ne),F.distbits=ne.bits,te){B.msg="invalid distances set",F.mode=30;break}if(F.mode=20,U===6)break e;case 20:F.mode=21;case 21:if(6<=Y&&258<=ie){B.next_out=G,B.avail_out=ie,B.next_in=W,B.avail_in=Y,F.hold=V,F.bits=q,l(B,J),G=B.next_out,L=B.output,ie=B.avail_out,W=B.next_in,H=B.input,Y=B.avail_in,V=F.hold,q=F.bits,F.mode===12&&(F.back=-1);break}for(F.back=0;Pe=(Q=F.lencode[V&(1<<F.lenbits)-1])>>>16&255,Ve=65535&Q,!((ye=Q>>>24)<=q);){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}if(Pe&&(240&Pe)==0){for(Ze=ye,dt=Pe,Re=Ve;Pe=(Q=F.lencode[Re+((V&(1<<Ze+dt)-1)>>Ze)])>>>16&255,Ve=65535&Q,!(Ze+(ye=Q>>>24)<=q);){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}V>>>=Ze,q-=Ze,F.back+=Ze}if(V>>>=ye,q-=ye,F.back+=ye,F.length=Ve,Pe===0){F.mode=26;break}if(32&Pe){F.back=-1,F.mode=12;break}if(64&Pe){B.msg="invalid literal/length code",F.mode=30;break}F.extra=15&Pe,F.mode=22;case 22:if(F.extra){for(Z=F.extra;q<Z;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}F.length+=V&(1<<F.extra)-1,V>>>=F.extra,q-=F.extra,F.back+=F.extra}F.was=F.length,F.mode=23;case 23:for(;Pe=(Q=F.distcode[V&(1<<F.distbits)-1])>>>16&255,Ve=65535&Q,!((ye=Q>>>24)<=q);){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}if((240&Pe)==0){for(Ze=ye,dt=Pe,Re=Ve;Pe=(Q=F.distcode[Re+((V&(1<<Ze+dt)-1)>>Ze)])>>>16&255,Ve=65535&Q,!(Ze+(ye=Q>>>24)<=q);){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}V>>>=Ze,q-=Ze,F.back+=Ze}if(V>>>=ye,q-=ye,F.back+=ye,64&Pe){B.msg="invalid distance code",F.mode=30;break}F.offset=Ve,F.extra=15&Pe,F.mode=24;case 24:if(F.extra){for(Z=F.extra;q<Z;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}F.offset+=V&(1<<F.extra)-1,V>>>=F.extra,q-=F.extra,F.back+=F.extra}if(F.offset>F.dmax){B.msg="invalid distance too far back",F.mode=30;break}F.mode=25;case 25:if(ie===0)break e;if(ce=J-ie,F.offset>ce){if((ce=F.offset-ce)>F.whave&&F.sane){B.msg="invalid distance too far back",F.mode=30;break}se=ce>F.wnext?(ce-=F.wnext,F.wsize-ce):F.wnext-ce,ce>F.length&&(ce=F.length),ge=F.window}else ge=L,se=G-F.offset,ce=F.length;for(ie<ce&&(ce=ie),ie-=ce,F.length-=ce;L[G++]=ge[se++],--ce;);F.length===0&&(F.mode=21);break;case 26:if(ie===0)break e;L[G++]=F.length,ie--,F.mode=21;break;case 27:if(F.wrap){for(;q<32;){if(Y===0)break e;Y--,V|=H[W++]<<q,q+=8}if(J-=ie,B.total_out+=J,F.total+=J,J&&(B.adler=F.check=F.flags?a(F.check,L,J,G-J):o(F.check,L,J,G-J)),J=ie,(F.flags?V:x(V))!==F.check){B.msg="incorrect data check",F.mode=30;break}q=V=0}F.mode=28;case 28:if(F.wrap&&F.flags){for(;q<32;){if(Y===0)break e;Y--,V+=H[W++]<<q,q+=8}if(V!==(4294967295&F.total)){B.msg="incorrect length check",F.mode=30;break}q=V=0}F.mode=29;case 29:te=1;break e;case 30:te=-3;break e;case 31:return-4;default:return p}return B.next_out=G,B.avail_out=ie,B.next_in=W,B.avail_in=Y,F.hold=V,F.bits=q,(F.wsize||J!==B.avail_out&&F.mode<30&&(F.mode<27||U!==4))&&j(B,B.output,B.next_out,J-B.avail_out)?(F.mode=31,-4):($-=B.avail_in,J-=B.avail_out,B.total_in+=$,B.total_out+=J,F.total+=J,F.wrap&&J&&(B.adler=F.check=F.flags?a(F.check,L,J,B.next_out-J):o(F.check,L,J,B.next_out-J)),B.data_type=F.bits+(F.last?64:0)+(F.mode===12?128:0)+(F.mode===20||F.mode===15?256:0),($==0&&J===0||U===4)&&te===m&&(te=-5),te)},r.inflateEnd=function(B){if(!B||!B.state)return p;var U=B.state;return U.window&&(U.window=null),B.state=null,m},r.inflateGetHeader=function(B,U){var F;return B&&B.state?(2&(F=B.state).wrap)==0?p:((F.head=U).done=!1,m):p},r.inflateSetDictionary=function(B,U){var F,H=U.length;return B&&B.state?(F=B.state).wrap!==0&&F.mode!==11?p:F.mode===11&&o(1,U,H,0)!==F.check?-3:j(B,U,H,H)?(F.mode=31,-4):(F.havedict=1,m):p},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,n,r){var s=t("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(d,f,m,p,g,y,v,x){var C,D,E,T,S,A,I,R,O,j=x.bits,B=0,U=0,F=0,H=0,L=0,W=0,G=0,Y=0,ie=0,V=0,q=null,$=0,J=new s.Buf16(16),ce=new s.Buf16(16),se=null,ge=0;for(B=0;B<=15;B++)J[B]=0;for(U=0;U<p;U++)J[f[m+U]]++;for(L=j,H=15;1<=H&&J[H]===0;H--);if(H<L&&(L=H),H===0)return g[y++]=20971520,g[y++]=20971520,x.bits=1,0;for(F=1;F<H&&J[F]===0;F++);for(L<F&&(L=F),B=Y=1;B<=15;B++)if(Y<<=1,(Y-=J[B])<0)return-1;if(0<Y&&(d===0||H!==1))return-1;for(ce[1]=0,B=1;B<15;B++)ce[B+1]=ce[B]+J[B];for(U=0;U<p;U++)f[m+U]!==0&&(v[ce[f[m+U]]++]=U);if(A=d===0?(q=se=v,19):d===1?(q=o,$-=257,se=a,ge-=257,256):(q=l,se=c,-1),B=F,S=y,G=U=V=0,E=-1,T=(ie=1<<(W=L))-1,d===1&&852<ie||d===2&&592<ie)return 1;for(;;){for(I=B-G,O=v[U]<A?(R=0,v[U]):v[U]>A?(R=se[ge+v[U]],q[$+v[U]]):(R=96,0),C=1<<B-G,F=D=1<<W;g[S+(V>>G)+(D-=C)]=I<<24|R<<16|O|0,D!==0;);for(C=1<<B-1;V&C;)C>>=1;if(C!==0?(V&=C-1,V+=C):V=0,U++,--J[B]==0){if(B===H)break;B=f[m+v[U]]}if(L<B&&(V&T)!==E){for(G===0&&(G=L),S+=F,Y=1<<(W=B-G);W+G<H&&!((Y-=J[W+G])<=0);)W++,Y<<=1;if(ie+=1<<W,d===1&&852<ie||d===2&&592<ie)return 1;g[E=V&T]=L<<24|W<<16|S-y|0}}return V!==0&&(g[S+V]=B-G<<24|64<<16|0),x.bits=L,0}},{"../utils/common":41}],51:[function(t,n,r){n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,n,r){var s=t("../utils/common"),o=0,a=1;function l(Q){for(var le=Q.length;0<=--le;)Q[le]=0}var c=0,d=29,f=256,m=f+1+d,p=30,g=19,y=2*m+1,v=15,x=16,C=7,D=256,E=16,T=17,S=18,A=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],I=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],R=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],j=new Array(2*(m+2));l(j);var B=new Array(2*p);l(B);var U=new Array(512);l(U);var F=new Array(256);l(F);var H=new Array(d);l(H);var L,W,G,Y=new Array(p);function ie(Q,le,we,xe,fe){this.static_tree=Q,this.extra_bits=le,this.extra_base=we,this.elems=xe,this.max_length=fe,this.has_stree=Q&&Q.length}function V(Q,le){this.dyn_tree=Q,this.max_code=0,this.stat_desc=le}function q(Q){return Q<256?U[Q]:U[256+(Q>>>7)]}function $(Q,le){Q.pending_buf[Q.pending++]=255&le,Q.pending_buf[Q.pending++]=le>>>8&255}function J(Q,le,we){Q.bi_valid>x-we?(Q.bi_buf|=le<<Q.bi_valid&65535,$(Q,Q.bi_buf),Q.bi_buf=le>>x-Q.bi_valid,Q.bi_valid+=we-x):(Q.bi_buf|=le<<Q.bi_valid&65535,Q.bi_valid+=we)}function ce(Q,le,we){J(Q,we[2*le],we[2*le+1])}function se(Q,le){for(var we=0;we|=1&Q,Q>>>=1,we<<=1,0<--le;);return we>>>1}function ge(Q,le,we){var xe,fe,re=new Array(v+1),ae=0;for(xe=1;xe<=v;xe++)re[xe]=ae=ae+we[xe-1]<<1;for(fe=0;fe<=le;fe++){var me=Q[2*fe+1];me!==0&&(Q[2*fe]=se(re[me]++,me))}}function ye(Q){var le;for(le=0;le<m;le++)Q.dyn_ltree[2*le]=0;for(le=0;le<p;le++)Q.dyn_dtree[2*le]=0;for(le=0;le<g;le++)Q.bl_tree[2*le]=0;Q.dyn_ltree[2*D]=1,Q.opt_len=Q.static_len=0,Q.last_lit=Q.matches=0}function Pe(Q){8<Q.bi_valid?$(Q,Q.bi_buf):0<Q.bi_valid&&(Q.pending_buf[Q.pending++]=Q.bi_buf),Q.bi_buf=0,Q.bi_valid=0}function Ve(Q,le,we,xe){var fe=2*le,re=2*we;return Q[fe]<Q[re]||Q[fe]===Q[re]&&xe[le]<=xe[we]}function Ze(Q,le,we){for(var xe=Q.heap[we],fe=we<<1;fe<=Q.heap_len&&(fe<Q.heap_len&&Ve(le,Q.heap[fe+1],Q.heap[fe],Q.depth)&&fe++,!Ve(le,xe,Q.heap[fe],Q.depth));)Q.heap[we]=Q.heap[fe],we=fe,fe<<=1;Q.heap[we]=xe}function dt(Q,le,we){var xe,fe,re,ae,me=0;if(Q.last_lit!==0)for(;xe=Q.pending_buf[Q.d_buf+2*me]<<8|Q.pending_buf[Q.d_buf+2*me+1],fe=Q.pending_buf[Q.l_buf+me],me++,xe===0?ce(Q,fe,le):(ce(Q,(re=F[fe])+f+1,le),(ae=A[re])!==0&&J(Q,fe-=H[re],ae),ce(Q,re=q(--xe),we),(ae=I[re])!==0&&J(Q,xe-=Y[re],ae)),me<Q.last_lit;);ce(Q,D,le)}function Re(Q,le){var we,xe,fe,re=le.dyn_tree,ae=le.stat_desc.static_tree,me=le.stat_desc.has_stree,De=le.stat_desc.elems,je=-1;for(Q.heap_len=0,Q.heap_max=y,we=0;we<De;we++)re[2*we]!==0?(Q.heap[++Q.heap_len]=je=we,Q.depth[we]=0):re[2*we+1]=0;for(;Q.heap_len<2;)re[2*(fe=Q.heap[++Q.heap_len]=je<2?++je:0)]=1,Q.depth[fe]=0,Q.opt_len--,me&&(Q.static_len-=ae[2*fe+1]);for(le.max_code=je,we=Q.heap_len>>1;1<=we;we--)Ze(Q,re,we);for(fe=De;we=Q.heap[1],Q.heap[1]=Q.heap[Q.heap_len--],Ze(Q,re,1),xe=Q.heap[1],Q.heap[--Q.heap_max]=we,Q.heap[--Q.heap_max]=xe,re[2*fe]=re[2*we]+re[2*xe],Q.depth[fe]=(Q.depth[we]>=Q.depth[xe]?Q.depth[we]:Q.depth[xe])+1,re[2*we+1]=re[2*xe+1]=fe,Q.heap[1]=fe++,Ze(Q,re,1),2<=Q.heap_len;);Q.heap[--Q.heap_max]=Q.heap[1],(function(tt,bt){var it,ht,kt,pe,Fe,qe,Xe=bt.dyn_tree,Dt=bt.max_code,Nt=bt.stat_desc.static_tree,dn=bt.stat_desc.has_stree,Cn=bt.stat_desc.extra_bits,$n=bt.stat_desc.extra_base,vi=bt.stat_desc.max_length,$i=0;for(pe=0;pe<=v;pe++)tt.bl_count[pe]=0;for(Xe[2*tt.heap[tt.heap_max]+1]=0,it=tt.heap_max+1;it<y;it++)vi<(pe=Xe[2*Xe[2*(ht=tt.heap[it])+1]+1]+1)&&(pe=vi,$i++),Xe[2*ht+1]=pe,Dt<ht||(tt.bl_count[pe]++,Fe=0,$n<=ht&&(Fe=Cn[ht-$n]),qe=Xe[2*ht],tt.opt_len+=qe*(pe+Fe),dn&&(tt.static_len+=qe*(Nt[2*ht+1]+Fe)));if($i!==0){do{for(pe=vi-1;tt.bl_count[pe]===0;)pe--;tt.bl_count[pe]--,tt.bl_count[pe+1]+=2,tt.bl_count[vi]--,$i-=2}while(0<$i);for(pe=vi;pe!==0;pe--)for(ht=tt.bl_count[pe];ht!==0;)Dt<(kt=tt.heap[--it])||(Xe[2*kt+1]!==pe&&(tt.opt_len+=(pe-Xe[2*kt+1])*Xe[2*kt],Xe[2*kt+1]=pe),ht--)}})(Q,le),ge(re,je,Q.bl_count)}function N(Q,le,we){var xe,fe,re=-1,ae=le[1],me=0,De=7,je=4;for(ae===0&&(De=138,je=3),le[2*(we+1)+1]=65535,xe=0;xe<=we;xe++)fe=ae,ae=le[2*(xe+1)+1],++me<De&&fe===ae||(me<je?Q.bl_tree[2*fe]+=me:fe!==0?(fe!==re&&Q.bl_tree[2*fe]++,Q.bl_tree[2*E]++):me<=10?Q.bl_tree[2*T]++:Q.bl_tree[2*S]++,re=fe,je=(me=0)===ae?(De=138,3):fe===ae?(De=6,3):(De=7,4))}function te(Q,le,we){var xe,fe,re=-1,ae=le[1],me=0,De=7,je=4;for(ae===0&&(De=138,je=3),xe=0;xe<=we;xe++)if(fe=ae,ae=le[2*(xe+1)+1],!(++me<De&&fe===ae)){if(me<je)for(;ce(Q,fe,Q.bl_tree),--me!=0;);else fe!==0?(fe!==re&&(ce(Q,fe,Q.bl_tree),me--),ce(Q,E,Q.bl_tree),J(Q,me-3,2)):me<=10?(ce(Q,T,Q.bl_tree),J(Q,me-3,3)):(ce(Q,S,Q.bl_tree),J(Q,me-11,7));re=fe,je=(me=0)===ae?(De=138,3):fe===ae?(De=6,3):(De=7,4)}}l(Y);var ne=!1;function Z(Q,le,we,xe){J(Q,(c<<1)+(xe?1:0),3),(function(fe,re,ae,me){Pe(fe),$(fe,ae),$(fe,~ae),s.arraySet(fe.pending_buf,fe.window,re,ae,fe.pending),fe.pending+=ae})(Q,le,we)}r._tr_init=function(Q){ne||((function(){var le,we,xe,fe,re,ae=new Array(v+1);for(fe=xe=0;fe<d-1;fe++)for(H[fe]=xe,le=0;le<1<<A[fe];le++)F[xe++]=fe;for(F[xe-1]=fe,fe=re=0;fe<16;fe++)for(Y[fe]=re,le=0;le<1<<I[fe];le++)U[re++]=fe;for(re>>=7;fe<p;fe++)for(Y[fe]=re<<7,le=0;le<1<<I[fe]-7;le++)U[256+re++]=fe;for(we=0;we<=v;we++)ae[we]=0;for(le=0;le<=143;)j[2*le+1]=8,le++,ae[8]++;for(;le<=255;)j[2*le+1]=9,le++,ae[9]++;for(;le<=279;)j[2*le+1]=7,le++,ae[7]++;for(;le<=287;)j[2*le+1]=8,le++,ae[8]++;for(ge(j,m+1,ae),le=0;le<p;le++)B[2*le+1]=5,B[2*le]=se(le,5);L=new ie(j,A,f+1,m,v),W=new ie(B,I,0,p,v),G=new ie(new Array(0),R,0,g,C)})(),ne=!0),Q.l_desc=new V(Q.dyn_ltree,L),Q.d_desc=new V(Q.dyn_dtree,W),Q.bl_desc=new V(Q.bl_tree,G),Q.bi_buf=0,Q.bi_valid=0,ye(Q)},r._tr_stored_block=Z,r._tr_flush_block=function(Q,le,we,xe){var fe,re,ae=0;0<Q.level?(Q.strm.data_type===2&&(Q.strm.data_type=(function(me){var De,je=4093624447;for(De=0;De<=31;De++,je>>>=1)if(1&je&&me.dyn_ltree[2*De]!==0)return o;if(me.dyn_ltree[18]!==0||me.dyn_ltree[20]!==0||me.dyn_ltree[26]!==0)return a;for(De=32;De<f;De++)if(me.dyn_ltree[2*De]!==0)return a;return o})(Q)),Re(Q,Q.l_desc),Re(Q,Q.d_desc),ae=(function(me){var De;for(N(me,me.dyn_ltree,me.l_desc.max_code),N(me,me.dyn_dtree,me.d_desc.max_code),Re(me,me.bl_desc),De=g-1;3<=De&&me.bl_tree[2*O[De]+1]===0;De--);return me.opt_len+=3*(De+1)+5+5+4,De})(Q),fe=Q.opt_len+3+7>>>3,(re=Q.static_len+3+7>>>3)<=fe&&(fe=re)):fe=re=we+5,we+4<=fe&&le!==-1?Z(Q,le,we,xe):Q.strategy===4||re===fe?(J(Q,2+(xe?1:0),3),dt(Q,j,B)):(J(Q,4+(xe?1:0),3),(function(me,De,je,tt){var bt;for(J(me,De-257,5),J(me,je-1,5),J(me,tt-4,4),bt=0;bt<tt;bt++)J(me,me.bl_tree[2*O[bt]+1],3);te(me,me.dyn_ltree,De-1),te(me,me.dyn_dtree,je-1)})(Q,Q.l_desc.max_code+1,Q.d_desc.max_code+1,ae+1),dt(Q,Q.dyn_ltree,Q.dyn_dtree)),ye(Q),xe&&Pe(Q)},r._tr_tally=function(Q,le,we){return Q.pending_buf[Q.d_buf+2*Q.last_lit]=le>>>8&255,Q.pending_buf[Q.d_buf+2*Q.last_lit+1]=255&le,Q.pending_buf[Q.l_buf+Q.last_lit]=255&we,Q.last_lit++,le===0?Q.dyn_ltree[2*we]++:(Q.matches++,le--,Q.dyn_ltree[2*(F[we]+f+1)]++,Q.dyn_dtree[2*q(le)]++),Q.last_lit===Q.lit_bufsize-1},r._tr_align=function(Q){J(Q,2,3),ce(Q,D,j),(function(le){le.bi_valid===16?($(le,le.bi_buf),le.bi_buf=0,le.bi_valid=0):8<=le.bi_valid&&(le.pending_buf[le.pending++]=255&le.bi_buf,le.bi_buf>>=8,le.bi_valid-=8)})(Q)}},{"../utils/common":41}],53:[function(t,n,r){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,n,r){(function(s){(function(o,a){if(!o.setImmediate){var l,c,d,f,m=1,p={},g=!1,y=o.document,v=Object.getPrototypeOf&&Object.getPrototypeOf(o);v=v&&v.setTimeout?v:o,l={}.toString.call(o.process)==="[object process]"?function(E){process.nextTick(function(){C(E)})}:(function(){if(o.postMessage&&!o.importScripts){var E=!0,T=o.onmessage;return o.onmessage=function(){E=!1},o.postMessage("","*"),o.onmessage=T,E}})()?(f="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",D,!1):o.attachEvent("onmessage",D),function(E){o.postMessage(f+E,"*")}):o.MessageChannel?((d=new MessageChannel).port1.onmessage=function(E){C(E.data)},function(E){d.port2.postMessage(E)}):y&&"onreadystatechange"in y.createElement("script")?(c=y.documentElement,function(E){var T=y.createElement("script");T.onreadystatechange=function(){C(E),T.onreadystatechange=null,c.removeChild(T),T=null},c.appendChild(T)}):function(E){setTimeout(C,0,E)},v.setImmediate=function(E){typeof E!="function"&&(E=new Function(""+E));for(var T=new Array(arguments.length-1),S=0;S<T.length;S++)T[S]=arguments[S+1];var A={callback:E,args:T};return p[m]=A,l(m),m++},v.clearImmediate=x}function x(E){delete p[E]}
478function C(E){if(g)setTimeout(C,0,E);else{var T=p[E];if(T){g=!0;try{(function(S){var A=S.callback,I=S.args;switch(I.length){case 0:A();break;case 1:A(I[0]);break;case 2:A(I[0],I[1]);break;case 3:A(I[0],I[1],I[2]);break;default:A.apply(a,I)}})(T)}finally{x(E),g=!1}}}}function D(E){E.source===o&&typeof E.data=="string"&&E.data.indexOf(f)===0&&C(+E.data.slice(f.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof Io<"u"?Io:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(sA)),sA.exports}var cV;function zZ(){if(cV)return Ep;cV=1;var i=VMe(),e=jMe();Ep.openArrayBuffer=t,Ep.splitPath=n,Ep.joinPath=r;function t(s){return e.loadAsync(s).then(function(o){function a(f){return o.file(f)!==null}function l(f,m){return o.file(f).async("uint8array").then(function(p){if(m==="base64")return i.fromByteArray(p);if(m){var g=new TextDecoder(m);return g.decode(p)}else return p})}function c(f,m){o.file(f,m)}function d(){return o.generateAsync({type:"arraybuffer"})}return{exists:a,read:l,write:c,toArrayBuffer:d}})}function n(s){var o=s.lastIndexOf("/");return o===-1?{dirname:"",basename:s}:{dirname:s.substring(0,o),basename:s.substring(o+1)}}function r(){var s=Array.prototype.filter.call(arguments,function(a){return a}),o=[];return s.forEach(function(a){/^\//.test(a)?o=[a]:o.push(a)}),o.join("/")}return Ep}var ev={},wc={},Ff={},uV;function WZ(){if(uV)return Ff;uV=1;var i=yi;Ff.Element=t,Ff.element=function(s,o,a){return new t(s,o,a)},Ff.text=function(s){return{type:"text",value:s}};var e=Ff.emptyElement={first:function(){return null},firstOrEmpty:function(){return e},attributes:{},children:[]};function t(s,o,a){this.type="element",this.name=s,this.attributes=o||{},this.children=a||[]}t.prototype.first=function(s){return i.find(this.children,function(o){return o.name===s})},t.prototype.firstOrEmpty=function(s){return this.first(s)||e},t.prototype.getElementsByTagName=function(s){var o=i.filter(this.children,function(a){return a.name===s});return r(o)},t.prototype.text=function(){if(this.children.length===0)return"";if(this.children.length!==1||this.children[0].type!=="text")throw new Error("Not implemented");return this.children[0].value};var n={getElementsByTagName:function(s){return r(i.flatten(this.map(function(o){return o.getElementsByTagName(s)},!0)))}};function r(s){return i.extend(s,n)}return Ff}var oA={},tv={},Ap={},ia={},Pu={},dV;function $_(){if(dV)return Pu;dV=1;function i(s,o,a){if(a===void 0&&(a=Array.prototype),s&&typeof a.find=="function")return a.find.call(s,o);for(var l=0;l<s.length;l++)if(Object.prototype.hasOwnProperty.call(s,l)){var c=s[l];if(o.call(void 0,c,l,s))return c}}function e(s,o){return o===void 0&&(o=Object),o&&typeof o.freeze=="function"?o.freeze(s):s}function t(s,o){if(s===null||typeof s!="object")throw new TypeError("target is not an object");for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(s[a]=o[a]);return s}var n=e({HTML:"text/html",isHTML:function(s){return s===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),r=e({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(s){return s===r.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return Pu.assign=t,Pu.find=i,Pu.freeze=e,Pu.MIME_TYPE=n,Pu.NAMESPACE=r,Pu}var fV;function bP(){if(fV)return ia;fV=1;var i=$_(),e=i.find,t=i.NAMESPACE;function n(K){return K!==""}function r(K){return K?K.split(/[\t\n\f\r ]+/).filter(n):[]}function s(K,ee){return K.hasOwnProperty(ee)||(K[ee]=!0),K}function o(K){if(!K)return[];var ee=r(K);return Object.keys(ee.reduce(s,{}))}function a(K){return function(ee){return K&&K.indexOf(ee)!==-1}}function l(K,ee){for(var ue in K)Object.prototype.hasOwnProperty.call(K,ue)&&(ee[ue]=K[ue])}function c(K,ee){var ue=K.prototype;if(!(ue instanceof ee)){let ze=function(){};var Ie=ze;
vendor: 7,473 bytes, line 478
478ze.prototype=ee.prototype,ze=new ze,l(ue,ze),K.prototype=ue=ze}ue.constructor!=K&&(typeof K!="function"&&console.error("unknown Class:"+K),ue.constructor=K)}var d={},f=d.ELEMENT_NODE=1,m=d.ATTRIBUTE_NODE=2,p=d.TEXT_NODE=3,g=d.CDATA_SECTION_NODE=4,y=d.ENTITY_REFERENCE_NODE=5,v=d.ENTITY_NODE=6,x=d.PROCESSING_INSTRUCTION_NODE=7,C=d.COMMENT_NODE=8,D=d.DOCUMENT_NODE=9,E=d.DOCUMENT_TYPE_NODE=10,T=d.DOCUMENT_FRAGMENT_NODE=11,S=d.NOTATION_NODE=12,A={},I={};A.INDEX_SIZE_ERR=(I[1]="Index size error",1),A.DOMSTRING_SIZE_ERR=(I[2]="DOMString size error",2);var R=A.HIERARCHY_REQUEST_ERR=(I[3]="Hierarchy request error",3);A.WRONG_DOCUMENT_ERR=(I[4]="Wrong document",4);var O=A.INVALID_CHARACTER_ERR=(I[5]="Invalid character",5);A.NO_DATA_ALLOWED_ERR=(I[6]="No data allowed",6),A.NO_MODIFICATION_ALLOWED_ERR=(I[7]="No modification allowed",7);var j=A.NOT_FOUND_ERR=(I[8]="Not found",8);A.NOT_SUPPORTED_ERR=(I[9]="Not supported",9);var B=A.INUSE_ATTRIBUTE_ERR=(I[10]="Attribute in use",10),U=A.INVALID_STATE_ERR=(I[11]="Invalid state",11);A.SYNTAX_ERR=(I[12]="Syntax error",12),A.INVALID_MODIFICATION_ERR=(I[13]="Invalid modification",13),A.NAMESPACE_ERR=(I[14]="Invalid namespace",14),A.INVALID_ACCESS_ERR=(I[15]="Invalid access",15);function F(K,ee){if(ee instanceof Error)var ue=ee;else ue=this,Error.call(this,I[K]),this.message=I[K],Error.captureStackTrace&&Error.captureStackTrace(this,F);return ue.code=K,ee&&(this.message=this.message+": "+ee),ue}F.prototype=Error.prototype,l(A,F);function H(){}H.prototype={length:0,item:function(K){return K>=0&&K<this.length?this[K]:null},toString:function(K,ee,ue){for(var Ie=!!ue&&!!ue.requireWellFormed,ze=[],at=0;at<this.length;at++)$n(this[at],ze,K,ee,null,Ie);return ze.join("")},filter:function(K){return Array.prototype.filter.call(this,K)},indexOf:function(K){return Array.prototype.indexOf.call(this,K)}};function L(K,ee){this._node=K,this._refresh=ee,W(this)}function W(K){var ee=K._node._inc||K._node.ownerDocument._inc;if(K._inc!==ee){var ue=K._refresh(K._node);if(Ba(K,"length",ue.length),!K.$$length||ue.length<K.$$length)for(var Ie=ue.length;Ie in K;Ie++)Object.prototype.hasOwnProperty.call(K,Ie)&&delete K[Ie];l(ue,K),K._inc=ee}}L.prototype.item=function(K){return W(this),this[K]||null},c(L,H);function G(){}function Y(K,ee){for(var ue=K.length;ue--;)if(K[ue]===ee)return ue}function ie(K,ee,ue,Ie){if(Ie?ee[Y(ee,Ie)]=ue:ee[ee.length++]=ue,K){ue.ownerElement=K;var ze=K.ownerDocument;ze&&(Ie&&Pe(ze,K,Ie),ye(ze,K,ue))}}function V(K,ee,ue){var Ie=Y(ee,ue);if(Ie>=0){for(var ze=ee.length-1;Ie<ze;)ee[Ie]=ee[++Ie];if(ee.length=ze,K){var at=K.ownerDocument;at&&(Pe(at,K,ue),ue.ownerElement=null)}}else throw new F(j,new Error(K.tagName+"@"+ue))}G.prototype={length:0,item:H.prototype.item,getNamedItem:function(K){for(var ee=this.length;ee--;){var ue=this[ee];if(ue.nodeName==K)return ue}},setNamedItem:function(K){var ee=K.ownerElement;if(ee&&ee!=this._ownerElement)throw new F(B);var ue=this.getNamedItem(K.nodeName);return ie(this._ownerElement,this,K,ue),ue},setNamedItemNS:function(K){var ee=K.ownerElement,ue;if(ee&&ee!=this._ownerElement)throw new F(B);return ue=this.getNamedItemNS(K.namespaceURI,K.localName),ie(this._ownerElement,this,K,ue),ue},removeNamedItem:function(K){var ee=this.getNamedItem(K);return V(this._ownerElement,this,ee),ee},removeNamedItemNS:function(K,ee){var ue=this.getNamedItemNS(K,ee);return V(this._ownerElement,this,ue),ue},getNamedItemNS:function(K,ee){for(var ue=this.length;ue--;){var Ie=this[ue];if(Ie.localName==ee&&Ie.namespaceURI==K)return Ie}return null}};function q(){}q.prototype={hasFeature:function(K,ee){return!0},createDocument:function(K,ee,ue){var Ie=new ge;if(Ie.implementation=this,Ie.childNodes=new H,Ie.doctype=ue||null,ue&&Ie.appendChild(ue),ee){var ze=Ie.createElementNS(K,ee);Ie.appendChild(ze)}return Ie},createDocumentType:function(K,ee,ue){var Ie=new ht;return Ie.name=K,Ie.nodeName=K,Ie.publicId=ee||"",Ie.systemId=ue||"",Ie}};function $(){}$.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(K,ee){return fe(this,K,ee)},replaceChild:function(K,ee){fe(this,K,ee,xe),ee&&this.removeChild(ee)},removeChild:function(K){return Ze(this,K)},appendChild:function(K){return this.insertBefore(K,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(K){return $i(this.ownerDocument||this,this,K)},normalize:function(){se(this,null,{enter:function(K){for(var ee=K.firstChild;ee;){var ue=ee.nextSibling;ue!==null&&ue.nodeType===p&&ee.nodeType===p?(K.removeChild(ue),ee.appendData(ue.data)):ee=ue}return!0}})},isSupported:function(K,ee){return this.ownerDocument.implementation.hasFeature(K,ee)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(K){for(var ee=this;ee;){var ue=ee._nsMap;if(ue){for(var Ie in ue)if(Object.prototype.hasOwnProperty.call(ue,Ie)&&ue[Ie]===K)return Ie}ee=ee.nodeType==m?ee.ownerDocument:ee.parentNode}return null},lookupNamespaceURI:function(K){for(var ee=this;ee;){var ue=ee._nsMap;if(ue&&Object.prototype.hasOwnProperty.call(ue,K))return ue[K];ee=ee.nodeType==m?ee.ownerDocument:ee.parentNode}return null},isDefaultNamespace:function(K){var ee=this.lookupPrefix(K);return ee==null}};function J(K){return K=="<"&&"&lt;"||K==">"&&"&gt;"||K=="&"&&"&amp;"||K=='"'&&"&quot;"||"&#"+K.charCodeAt()+";"}l(d,$),l(d,$.prototype);function ce(K,ee){return se(K,null,{enter:function(ue){return ee(ue)?se.STOP:!0}})===se.STOP}function se(K,ee,ue){for(var Ie=[{node:K,context:ee,phase:se.ENTER}];Ie.length>0;){var ze=Ie.pop();if(ze.phase===se.ENTER){var at=ue.enter(ze.node,ze.context);if(at===se.STOP)return se.STOP;if(Ie.push({node:ze.node,context:at,phase:se.EXIT}),at==null)continue;for(var We=ze.node.lastChild;We;)Ie.push({node:We,context:at,phase:se.ENTER}),We=We.previousSibling}else ue.exit&&ue.exit(ze.node,ze.context)}}se.STOP=Symbol("walkDOM.STOP"),se.ENTER=0,se.EXIT=1;function ge(){this.ownerDocument=this}function ye(K,ee,ue){K&&K._inc++;var Ie=ue.namespaceURI;Ie===t.XMLNS&&(ee._nsMap[ue.prefix?ue.localName:""]=ue.value)}function Pe(K,ee,ue,Ie){K&&K._inc++;var ze=ue.namespaceURI;ze===t.XMLNS&&delete ee._nsMap[ue.prefix?ue.localName:""]}function Ve(K,ee,ue){if(K&&K._inc){K._inc++;var Ie=ee.childNodes;if(ue)Ie[Ie.length++]=ue;else{for(var ze=ee.firstChild,at=0;ze;)Ie[at++]=ze,ze=ze.nextSibling;Ie.length=at,delete Ie[Ie.length]}}}function Ze(K,ee){var ue=ee.previousSibling,Ie=ee.nextSibling;return ue?ue.nextSibling=Ie:K.firstChild=Ie,Ie?Ie.previousSibling=ue:K.lastChild=ue,ee.parentNode=null,ee.previousSibling=null,ee.nextSibling=null,Ve(K.ownerDocument,K),ee}function dt(K){return K&&(K.nodeType===$.DOCUMENT_NODE||K.nodeType===$.DOCUMENT_FRAGMENT_NODE||K.nodeType===$.ELEMENT_NODE)}function Re(K){return K&&(te(K)||ne(K)||N(K)||K.nodeType===$.DOCUMENT_FRAGMENT_NODE||K.nodeType===$.COMMENT_NODE||K.nodeType===$.PROCESSING_INSTRUCTION_NODE)}function N(K){return K&&K.nodeType===$.DOCUMENT_TYPE_NODE}function te(K){return K&&K.nodeType===$.ELEMENT_NODE}function ne(K){return K&&K.nodeType===$.TEXT_NODE}function Z(K,ee){var ue=K.childNodes||[];if(e(ue,te)||N(ee))return!1;var Ie=e(ue,N);return!(ee&&Ie&&ue.indexOf(Ie)>ue.indexOf(ee))}function Q(K,ee){var ue=K.childNodes||[];function Ie(at){return te(at)&&at!==ee}if(e(ue,Ie))return!1;var ze=e(ue,N);return!(ee&&ze&&ue.indexOf(ze)>ue.indexOf(ee))}
vendor: 5,555 bytes, line 478
478function le(K,ee,ue){if(!dt(K))throw new F(R,"Unexpected parent node type "+K.nodeType);if(ue&&ue.parentNode!==K)throw new F(j,"child not in parent");if(!Re(ee)||N(ee)&&K.nodeType!==$.DOCUMENT_NODE)throw new F(R,"Unexpected node type "+ee.nodeType+" for parent node type "+K.nodeType)}function we(K,ee,ue){var Ie=K.childNodes||[],ze=ee.childNodes||[];if(ee.nodeType===$.DOCUMENT_FRAGMENT_NODE){var at=ze.filter(te);if(at.length>1||e(ze,ne))throw new F(R,"More than one element or text in fragment");if(at.length===1&&!Z(K,ue))throw new F(R,"Element in fragment can not be inserted before doctype")}if(te(ee)&&!Z(K,ue))throw new F(R,"Only one element can be added and only after doctype");if(N(ee)){if(e(Ie,N))throw new F(R,"Only one doctype is allowed");var We=e(Ie,te);if(ue&&Ie.indexOf(We)<Ie.indexOf(ue))throw new F(R,"Doctype can only be inserted before an element");if(!ue&&We)throw new F(R,"Doctype can not be appended since element is present")}}function xe(K,ee,ue){var Ie=K.childNodes||[],ze=ee.childNodes||[];if(ee.nodeType===$.DOCUMENT_FRAGMENT_NODE){var at=ze.filter(te);if(at.length>1||e(ze,ne))throw new F(R,"More than one element or text in fragment");if(at.length===1&&!Q(K,ue))throw new F(R,"Element in fragment can not be inserted before doctype")}if(te(ee)&&!Q(K,ue))throw new F(R,"Only one element can be added and only after doctype");if(N(ee)){let bn=function(Gn){return N(Gn)&&Gn!==ue};var Ft=bn;if(e(Ie,bn))throw new F(R,"Only one doctype is allowed");var We=e(Ie,te);if(ue&&Ie.indexOf(We)<Ie.indexOf(ue))throw new F(R,"Doctype can only be inserted before an element")}}function fe(K,ee,ue,Ie){le(K,ee,ue),K.nodeType===$.DOCUMENT_NODE&&(Ie||we)(K,ee,ue);var ze=ee.parentNode;if(ze&&ze.removeChild(ee),ee.nodeType===T){var at=ee.firstChild;if(at==null)return ee;var We=ee.lastChild}else at=We=ee;var Ft=ue?ue.previousSibling:K.lastChild;at.previousSibling=Ft,We.nextSibling=ue,Ft?Ft.nextSibling=at:K.firstChild=at,ue==null?K.lastChild=We:ue.previousSibling=We;do{at.parentNode=K;var bn=K.ownerDocument||K;re(at,bn)}while(at!==We&&(at=at.nextSibling));return Ve(K.ownerDocument||K,K),ee.nodeType==T&&(ee.firstChild=ee.lastChild=null),ee}function re(K,ee){if(K.ownerDocument!==ee){if(K.ownerDocument=ee,K.nodeType===f&&K.attributes)for(var ue=0;ue<K.attributes.length;ue++){var Ie=K.attributes.item(ue);Ie&&(Ie.ownerDocument=ee)}for(var ze=K.firstChild;ze;)re(ze,ee),ze=ze.nextSibling}}function ae(K,ee){ee.parentNode&&ee.parentNode.removeChild(ee),ee.parentNode=K,ee.previousSibling=K.lastChild,ee.nextSibling=null,ee.previousSibling?ee.previousSibling.nextSibling=ee:K.firstChild=ee,K.lastChild=ee,Ve(K.ownerDocument,K,ee);var ue=K.ownerDocument||K;return re(ee,ue),ee}ge.prototype={nodeName:"#document",nodeType:D,doctype:null,documentElement:null,_inc:1,insertBefore:function(K,ee){if(K.nodeType==T){for(var ue=K.firstChild;ue;){var Ie=ue.nextSibling;this.insertBefore(ue,ee),ue=Ie}return K}return fe(this,K,ee),re(K,this),this.documentElement===null&&K.nodeType===f&&(this.documentElement=K),K},removeChild:function(K){return this.documentElement==K&&(this.documentElement=null),Ze(this,K)},replaceChild:function(K,ee){fe(this,K,ee,xe),re(K,this),ee&&this.removeChild(ee),te(K)&&(this.documentElement=K)},importNode:function(K,ee){return vi(this,K,ee)},getElementById:function(K){var ee=null;return ce(this.documentElement,function(ue){if(ue.nodeType==f&&ue.getAttribute("id")==K)return ee=ue,!0}),ee},getElementsByClassName:function(K){var ee=o(K);return new L(this,function(ue){var Ie=[];return ee.length>0&&ce(ue.documentElement,function(ze){if(ze!==ue&&ze.nodeType===f){var at=ze.getAttribute("class");if(at){var We=K===at;if(!We){var Ft=o(at);We=ee.every(a(Ft))}We&&Ie.push(ze)}}}),Ie})},createElement:function(K){var ee=new me;ee.ownerDocument=this,ee.nodeName=K,ee.tagName=K,ee.localName=K,ee.childNodes=new H;var ue=ee.attributes=new G;return ue._ownerElement=ee,ee},createDocumentFragment:function(){var K=new qe;return K.ownerDocument=this,K.childNodes=new H,K},createTextNode:function(K){var ee=new tt;return ee.ownerDocument=this,ee.appendData(K),ee},createComment:function(K){var ee=new bt;return ee.ownerDocument=this,ee.appendData(K),ee},createCDATASection:function(K){if(K.indexOf("]]>")!==-1)throw new F(O,'data contains "]]>"');var ee=new it;return ee.ownerDocument=this,ee.appendData(K),ee},createProcessingInstruction:function(K,ee){var ue=new Xe;return ue.ownerDocument=this,ue.tagName=ue.nodeName=ue.target=K,ue.nodeValue=ue.data=ee,ue},createAttribute:function(K){var ee=new De;return ee.ownerDocument=this,ee.name=K,ee.nodeName=K,ee.localName=K,ee.specified=!0,ee},createEntityReference:function(K){var ee=new Fe;return ee.ownerDocument=this,ee.nodeName=K,ee},createElementNS:function(K,ee){var ue=new me,Ie=ee.split(":"),ze=ue.attributes=new G;return ue.childNodes=new H,ue.ownerDocument=this,ue.nodeName=ee,ue.tagName=ee,ue.namespaceURI=K,Ie.length==2?(ue.prefix=Ie[0],ue.localName=Ie[1]):ue.localName=ee,ze._ownerElement=ue,ue},createAttributeNS:function(K,ee){var ue=new De,Ie=ee.split(":");return ue.ownerDocument=this,ue.nodeName=ee,ue.name=ee,ue.namespaceURI=K,ue.specified=!0,Ie.length==2?(ue.prefix=Ie[0],ue.localName=Ie[1]):ue.localName=ee,ue}},c(ge,$);function me(){this._nsMap={}}me.prototype={nodeType:f,hasAttribute:function(K){return this.getAttributeNode(K)!=null},getAttribute:function(K){var ee=this.getAttributeNode(K);return ee&&ee.value||""},getAttributeNode:function(K){return this.attributes.getNamedItem(K)},setAttribute:function(K,ee){var ue=this.ownerDocument.createAttribute(K);
vendor: 7,620 bytes, line 478
478ue.value=ue.nodeValue=""+ee,this.setAttributeNode(ue)},removeAttribute:function(K){var ee=this.getAttributeNode(K);ee&&this.removeAttributeNode(ee)},appendChild:function(K){return K.nodeType===T?this.insertBefore(K,null):ae(this,K)},setAttributeNode:function(K){return this.attributes.setNamedItem(K)},setAttributeNodeNS:function(K){return this.attributes.setNamedItemNS(K)},removeAttributeNode:function(K){return this.attributes.removeNamedItem(K.nodeName)},removeAttributeNS:function(K,ee){var ue=this.getAttributeNodeNS(K,ee);ue&&this.removeAttributeNode(ue)},hasAttributeNS:function(K,ee){return this.getAttributeNodeNS(K,ee)!=null},getAttributeNS:function(K,ee){var ue=this.getAttributeNodeNS(K,ee);return ue&&ue.value||""},setAttributeNS:function(K,ee,ue){var Ie=this.ownerDocument.createAttributeNS(K,ee);Ie.value=Ie.nodeValue=""+ue,this.setAttributeNode(Ie)},getAttributeNodeNS:function(K,ee){return this.attributes.getNamedItemNS(K,ee)},getElementsByTagName:function(K){return new L(this,function(ee){var ue=[];return ce(ee,function(Ie){Ie!==ee&&Ie.nodeType==f&&(K==="*"||Ie.tagName==K)&&ue.push(Ie)}),ue})},getElementsByTagNameNS:function(K,ee){return new L(this,function(ue){var Ie=[];return ce(ue,function(ze){ze!==ue&&ze.nodeType===f&&(K==="*"||ze.namespaceURI===K)&&(ee==="*"||ze.localName==ee)&&Ie.push(ze)}),Ie})}},ge.prototype.getElementsByTagName=me.prototype.getElementsByTagName,ge.prototype.getElementsByTagNameNS=me.prototype.getElementsByTagNameNS,c(me,$);function De(){}De.prototype.nodeType=m,c(De,$);function je(){}je.prototype={data:"",substringData:function(K,ee){return this.data.substring(K,K+ee)},appendData:function(K){K=this.data+K,this.nodeValue=this.data=K,this.length=K.length},insertData:function(K,ee){this.replaceData(K,0,ee)},appendChild:function(K){throw new Error(I[R])},deleteData:function(K,ee){this.replaceData(K,ee,"")},replaceData:function(K,ee,ue){var Ie=this.data.substring(0,K),ze=this.data.substring(K+ee);ue=Ie+ue+ze,this.nodeValue=this.data=ue,this.length=ue.length}},c(je,$);function tt(){}tt.prototype={nodeName:"#text",nodeType:p,splitText:function(K){var ee=this.data,ue=ee.substring(K);ee=ee.substring(0,K),this.data=this.nodeValue=ee,this.length=ee.length;var Ie=this.ownerDocument.createTextNode(ue);return this.parentNode&&this.parentNode.insertBefore(Ie,this.nextSibling),Ie}},c(tt,je);function bt(){}bt.prototype={nodeName:"#comment",nodeType:C},c(bt,je);function it(){}it.prototype={nodeName:"#cdata-section",nodeType:g},c(it,je);function ht(){}ht.prototype.nodeType=E,c(ht,$);function kt(){}kt.prototype.nodeType=S,c(kt,$);function pe(){}pe.prototype.nodeType=v,c(pe,$);function Fe(){}Fe.prototype.nodeType=y,c(Fe,$);function qe(){}qe.prototype.nodeName="#document-fragment",qe.prototype.nodeType=T,c(qe,$);function Xe(){}Xe.prototype.nodeType=x,c(Xe,$);function Dt(){}Dt.prototype.serializeToString=function(K,ee,ue,Ie){return Nt.call(K,ee,ue,Ie)},$.prototype.toString=Nt;function Nt(K,ee,ue){var Ie=!!ue&&!!ue.requireWellFormed,ze=[],at=this.nodeType==9&&this.documentElement||this,We=at.prefix,Ft=at.namespaceURI;if(Ft&&We==null){var We=at.lookupPrefix(Ft);if(We==null)var bn=[{namespace:Ft,prefix:null}]}return $n(this,ze,K,ee,bn,Ie),ze.join("")}function dn(K,ee,ue){var Ie=K.prefix||"",ze=K.namespaceURI;if(!ze||Ie==="xml"&&ze===t.XML||ze===t.XMLNS)return!1;for(var at=ue.length;at--;){var We=ue[at];if(We.prefix===Ie)return We.namespace!==ze}return!0}function Cn(K,ee,ue){K.push(" ",ee,'="',ue.replace(/[<>&"\t\n\r]/g,J),'"')}function $n(K,ee,ue,Ie,ze,at){ze||(ze=[]),se(K,{ns:ze,isHTML:ue},{enter:function(We,Ft){var bn=Ft.ns,Gn=Ft.isHTML;if(Ie)if(We=Ie(We),We){if(typeof We=="string")return ee.push(We),null}else return null;switch(We.nodeType){case f:var _r=We.attributes,iu=_r.length,go=We.tagName;Gn=t.isHTML(We.namespaceURI)||Gn;var Gi=go;if(!Gn&&!We.prefix&&We.namespaceURI){for(var ei,Ri=0;Ri<_r.length;Ri++)if(_r.item(Ri).name==="xmlns"){ei=_r.item(Ri).value;break}if(!ei)for(var Ur=bn.length-1;Ur>=0;Ur--){var bo=bn[Ur];if(bo.prefix===""&&bo.namespace===We.namespaceURI){ei=bo.namespace;break}}if(ei!==We.namespaceURI)for(var Ur=bn.length-1;Ur>=0;Ur--){var bo=bn[Ur];if(bo.namespace===We.namespaceURI){bo.prefix&&(Gi=bo.prefix+":"+go);break}}}ee.push("<",Gi);for(var Yo=bn.slice(),Ma=0;Ma<iu;Ma++){var Vr=_r.item(Ma);Vr.prefix=="xmlns"?Yo.push({prefix:Vr.localName,namespace:Vr.value}):Vr.nodeName=="xmlns"&&Yo.push({prefix:"",namespace:Vr.value})}for(var Ma=0;Ma<iu;Ma++){var Vr=_r.item(Ma);if(dn(Vr,Gn,Yo)){var La=Vr.prefix||"",Ua=Vr.namespaceURI;Cn(ee,La?"xmlns:"+La:"xmlns",Ua),Yo.push({prefix:La,namespace:Ua})}var zs=Ie?Ie(Vr):Vr;zs&&(typeof zs=="string"?ee.push(zs):Cn(ee,zs.name,zs.value))}if(go===Gi&&dn(We,Gn,Yo)){var Ko=We.prefix||"",Ua=We.namespaceURI;Cn(ee,Ko?"xmlns:"+Ko:"xmlns",Ua),Yo.push({prefix:Ko,namespace:Ua})}var ms=We.firstChild;if(ms||Gn&&!/^(?:meta|link|img|br|hr|input)$/i.test(go)){if(ee.push(">"),Gn&&/^script$/i.test(go)){for(;ms;)ms.data?ee.push(ms.data):$n(ms,ee,Gn,Ie,Yo.slice(),at),ms=ms.nextSibling;return ee.push("</",go,">"),null}return{ns:Yo,isHTML:Gn,tag:Gi}}else return ee.push("/>"),null;case D:case T:return{ns:bn.slice(),isHTML:Gn,tag:null};case m:return Cn(ee,We.name,We.value),null;case p:return ee.push(We.data.replace(/[<&>]/g,J)),null;case g:if(at&&We.data.indexOf("]]>")!==-1)throw new F(U,'The CDATASection data contains "]]>"');return ee.push("<![CDATA[",We.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>"),null;case C:if(at&&We.data.indexOf("-->")!==-1)throw new F(U,'The comment node data contains "-->"');return ee.push("<!--",We.data,"-->"),null;case E:if(at){if(We.publicId&&!/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(We.publicId))throw new F(U,"DocumentType publicId is not a valid PubidLiteral");if(We.systemId&&!/^("[^"]*"|'[^']*')$/.test(We.systemId))throw new F(U,"DocumentType systemId is not a valid SystemLiteral");if(We.internalSubset&&We.internalSubset.indexOf("]>")!==-1)throw new F(U,'DocumentType internalSubset contains "]>"')}var Va=We.publicId,Mn=We.systemId;if(ee.push("<!DOCTYPE ",We.name),Va)ee.push(" PUBLIC ",Va),Mn&&Mn!="."&&ee.push(" ",Mn),ee.push(">");else if(Mn&&Mn!=".")ee.push(" SYSTEM ",Mn,">");else{var um=We.internalSubset;um&&ee.push(" [",um,"]"),ee.push(">")}return null;case x:if(at&&We.data.indexOf("?>")!==-1)throw new F(U,'The ProcessingInstruction data contains "?>"');return ee.push("<?",We.target," ",We.data,"?>"),null;case y:return ee.push("&",We.nodeName,";"),null;default:return ee.push("??",We.nodeName),null}},exit:function(We,Ft){Ft&&Ft.tag&&ee.push("</",Ft.tag,">")}})}function vi(K,ee,ue){var Ie;return se(ee,null,{enter:function(ze,at){var We=ze.cloneNode(!1);We.ownerDocument=K,We.parentNode=null,at===null?Ie=We:at.appendChild(We);var Ft=ze.nodeType===m||ue;return Ft?We:null}}),Ie}function $i(K,ee,ue){var Ie;return se(ee,null,{enter:function(ze,at){var We=new ze.constructor;for(var Ft in ze)if(Object.prototype.hasOwnProperty.call(ze,Ft)){var bn=ze[Ft];typeof bn!="object"&&bn!=We[Ft]&&(We[Ft]=bn)}ze.childNodes&&(We.childNodes=new H),We.ownerDocument=K;var Gn=ue;switch(We.nodeType){case f:var _r=ze.attributes,iu=We.attributes=new G,go=_r.length;iu._ownerElement=We;for(var Gi=0;Gi<go;Gi++)We.setAttributeNode($i(K,_r.item(Gi),!0));break;case m:Gn=!0}return at!==null?at.appendChild(We):Ie=We,Gn?We:null}}),Ie}function Ba(K,ee,ue){K[ee]=ue}try{Object.defineProperty&&(Object.defineProperty(L.prototype,"length",{get:function(){return W(this),this.$$length}}),Object.defineProperty($.prototype,"textContent",{get:function(){if(this.nodeType===f||this.nodeType===T){var K=[];
478return se(this,null,{enter:function(ee){if(ee.nodeType===f||ee.nodeType===T)return!0;if(ee.nodeType===x||ee.nodeType===C)return null;K.push(ee.nodeValue)}}),K.join("")}return this.nodeValue},set:function(K){switch(this.nodeType){case f:case T:for(;this.firstChild;)this.removeChild(this.firstChild);(K||String(K))&&this.appendChild(this.ownerDocument.createTextNode(K));break;default:this.data=K,this.value=K,this.nodeValue=K}}}),Ba=function(K,ee,ue){K["$$"+ee]=ue})}catch{}return ia.DocumentType=ht,ia.DOMException=F,ia.DOMImplementation=q,ia.Element=me,ia.Node=$,ia.NodeList=H,ia.walkDOM=se,ia.XMLSerializer=Dt,ia}var kp={},aA={},hV;function zMe(){return hV||(hV=1,(function(i){var e=$_().freeze;i.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),i.HTML_ENTITIES=e
vendor: 14,815 bytes, line 478
478({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:
478`
479`
vendor: 9,925 bytes, line 479
479,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"
479	",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),i.entityMap=i.HTML_ENTITIES})(aA)),aA}var nv={},mV;function WMe(){if(mV)return nv;mV=1;var i=$_().NAMESPACE,e=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,t=new RegExp("[\\-\\.0-9"+e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),n=new RegExp("^"+e.source+t.source+"*(?::"+e.source+t.source+"*)?$"),r=0,s=1,o=2,a=3,l=4,c=5,d=6,f=7;function m(R,O){this.message=R,this.locator=O,Error.captureStackTrace&&Error.captureStackTrace(this,m)}m.prototype=new Error,m.prototype.name=m.name;function p(){}p.prototype={parse:function(R,O,j){var B=this.domBuilder;B.startDocument(),E(O,O={}),g(R,O,j,B,this.errorHandler),B.endDocument()}};function g(R,O,j,B,U){function F(xe){if(xe>65535){xe-=65536;var fe=55296+(xe>>10),re=56320+(xe&1023);return String.fromCharCode(fe,re)}else return String.fromCharCode(xe)}function H(xe){var fe=xe.slice(1,-1);return Object.hasOwnProperty.call(j,fe)?j[fe]:fe.charAt(0)==="#"?F(parseInt(fe.substr(1).replace("x","0x"))):(U.error("entity n
479ot found:"+xe),xe)}function L(xe){if(xe>J){var fe=R.substring(J,xe).replace(/&#?\w+;/g,H);V&&W(J),B.characters(fe,0,xe-J),J=xe}}function W(xe,fe){for(;xe>=Y&&(fe=ie.exec(R));)G=fe.index,Y=G+fe[0].length,V.lineNumber++;V.columnNumber=xe-G+1}for(var G=0,Y=0,ie=/.*(?:\r\n?|\n)|.*$/g,V=B.locator,q=[{currentNSMap:O}],$={},J=0;;){try{var ce=R.indexOf("<",J);if(ce<0){if(!R.substr(J).match(/^\s*$/)){var se=B.doc,ge=se.createTextNode(R.substr(J));se.appendChild(ge),B.currentElement=ge}return}switch(ce>J&&L(ce),R.charAt(ce+1)){case"/":var ne=R.indexOf(">",ce+3),ye=R.substring(ce+2,ne).replace(/[ \t\n\r]+$/g,""),Pe=q.pop();ne<0?(ye=R.substring(ce+2).replace(/[\s<].*/,""),U.error("end tag name: "+ye+" is not complete:"+Pe.tagName),ne=ce+1+ye.length):ye.match(/\s</)&&(ye=ye.replace(/[\s<].*/,""),U.error("end tag name: "+ye+" maybe not complete"),ne=ce+1+ye.length);var Ve=Pe.localNSMap,Ze=Pe.tagName==ye,dt=Ze||Pe.tagName&&Pe.tagName.toLowerCase()==ye.toLowerCase();if(dt){if(B.endElement(Pe.uri,Pe.localName,ye),Ve)for(var Re in Ve)Object.prototype.hasOwnProperty.call(Ve,Re)&&B.endPrefixMapping(Re);Ze||U.fatalError("end tag name: "+ye+" is not match the current start tagName:"+Pe.tagName)}else q.push(Pe);ne++;break;case"?":V&&W(ce),ne=S(R,ce,B);break;case"!":V&&W(ce),ne=T(R,ce,B,U);break;default:V&&W(ce);var N=new A,te=q[q.length-1].currentNSMap,ne=v(R,ce,N,te,H,U),Z=N.length;if(!N.closed&&D(R,ne,N.tagName,$)&&(N.closed=!0,j.nbsp||U.warning("unclosed xml attribute")),V&&Z){for(var Q=y(V,{}),le=0;le<Z;le++){var we=N[le];W(we.offset),we.locator=y(V,{})}B.locator=Q,x(N,B,te)&&q.push(N),B.locator=V}else x(N,B,te)&&q.push(N);i.isHTML(N.uri)&&!N.closed?ne=C(R,ne,N.tagName,H,B):ne++}}catch(xe){if(xe instanceof m)throw xe;U.error("element parse error: "+xe),ne=-1}ne>J?J=ne:L(Math.max(ce,J)+1)}}function y(R,O){return O.lineNumber=R.lineNumber,O.columnNumber=R.columnNumber,O}function v(R,O,j,B,U,F){function H(V,q,$){j.attributeNames.hasOwnProperty(V)&&F.fatalError("Attribute "+V+" redefined"),j.addValue(V,q.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,U),$)}for(var L,W,G=++O,Y=r;;){var ie=R.charAt(G);switch(ie){case"=":if(Y===s)L=R.slice(O,G),Y=a;else if(Y===o)Y=a;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(Y===a||Y===s)if(Y===s&&(F.warning('attribute value must after "="'),L=R.slice(O,G)),O=G+1,G=R.indexOf(ie,O),G>0)W=R.slice(O,G),H(L,W,O-1),Y=c;else throw new Error("attribute value no end '"+ie+"' match");else if(Y==l)W=R.slice(O,G),H(L,W,O),F.warning('attribute "'+L+'" missed start quot('+ie+")!!"),O=G+1,Y=c;else throw new Error('attribute value must after "="');break;case"/":switch(Y){case r:j.setTagName(R.slice(O,G));case c:case d:case f:Y=f,j.closed=!0;case l:case s:break;case o:j.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return F.error("unexpected end of input"),Y==r&&j.setTagName(R.slice(O,G)),G;case">":switch(Y){case r:j.setTagName(R.slice(O,G));case c:case d:case f:break;case l:case s:W=R.slice(O,G),W.slice(-1)==="/"&&(j.closed=!0,W=W.slice(0,-1));case o:Y===o&&(W=L),Y==l?(F.warning('attribute "'+W+'" missed quot(")!'),H(L,W,O)):((!i.isHTML(B[""])||!W.match(/^(?:disabled|checked|selected)$/i))&&F.warning('attribute "'+W+'" missed value!! "'+W+'" instead!!'),H(W,W,O));break;case a:throw new Error("attribute value missed!!")}return G;case"€":ie=" ";default:if(ie<=" ")switch(Y){case r:j.setTagName(R.slice(O,G)),Y=d;break;case s:L=R.slice(O,G),Y=o;break;case l:var W=R.slice(O,G);F.warning('attribute "'+W+'" missed quot(")!!'),H(L,W,O);case c:Y=d;break}else switch(Y){case o:j.tagName,(!i.isHTML(B[""])||!L.match(/^(?:disabled|checked|selected)$/i))&&F.warning('attribute "'+L+'" missed value!! "'+L+'" instead2!!'),H(L,L,O),O=G,Y=s;break;case c:F.warning('attribute space is required"'+L+'"!!');case d:Y=s,O=G;break;case a:Y=l,O=G;break;case f:throw new Error("elements closed character '/' and '>' must be connected to")}}G++}}function x(R,O,j){for(var B=R.tagName,U=null,ie=R.length;ie--;){var F=R[ie],H=F.qName,L=F.value,V=H.indexOf(":");if(V>0)var W=F.prefix=H.slice(0,V),G=H.slice(V+1),Y=W==="xmlns"&&G;else G=H,W=null,Y=H==="xmlns"&&"";F.localName=G,Y!==!1&&(U==null&&(U={},E(j,j={})),j[Y]=U[Y]=L,F.uri=i.XMLNS,O.startPrefixMapping(Y,L))}for(var ie=R.length;ie--;){F=R[ie];var W=F.prefix;W&&(W==="xml"&&(F.uri=i.XML),W!=="xmlns"&&(F.uri=j[W||""]))}var V=B.indexOf(":");V>0?(W=R.prefix=B.slice(0,V),G=R.localName=B.slice(V+1)):(W=null,G=R.localName=B);var q=R.uri=j[W||""];if(O.startElement(q,G,B,R),R.closed){if(O.endElement(q,G,B),U)for(W in U)Object.prototype.hasOwnProperty.call(U,W)&&O.endPrefixMapping(W)}else return R.currentNSMap=j,R.localNSMap=U,!0}function C(R,O,j,B,U){if(/^(?:script|textarea)$/i.test(j)){var F=R.indexOf("</"+j+">",O),H=R.substring(O+1,F);if(/[&<]/.test(H))return/^script$/i.test(j)?(U.characters(H,0,H.length),F):(H=H.replace(/&#?\w+;/g,B),U.characters(H,0,H.length),F)}return O+1}function D(R,O,j,B){var U=B[j];return U==null&&(U=R.lastIndexOf("</"+j+">"),U<O&&(U=R.lastIndexOf("</"+j)),B[j]=U),U<O}function E(R,O){for(var j in R)Object.prototype.hasOwnProperty.call(R,j)&&(O[j]=R[j])}function T(R,O,j,B){var U=R.charAt(O+2);switch(U){case"-":if(R.charAt(O+3)==="-"){var F=R.indexOf("-->",O+4);return F>O?(j.comment(R,O+4,F-O-4),F+3):(B.error("Unclosed comment"),-1)}else return-1;default:if(R.substr(O+3,6)=="CDATA["){var F=R.indexOf("]]>",O+9);return j.startCDATA(),j.characters(R,O+9,F-O-9),j.endCDATA(),F+3}var H=I(R,O),L=H.length;if(L>1&&/!doctype/i.test(H[0][0])){var W=H[1][0],G=!1,Y=!1;L>3&&(/^public$/i.test(H[2][0])?(G=H[3][0],Y=L>4&&H[4][0]):/^system$/i.test(H[2][0])&&(Y=H[3][0]));var ie=H[L-1];return j.startDTD(W,G,Y),j.endDTD(),ie.index+ie[0].length}}return-1}function S(R,O,j){var B=R.indexOf("?>",O);
vendor: 4,438 bytes, lines 479-482
479if(B){var U=R.substring(O,B).match(/^<\?(\S*)\s*([\s\S]*?)$/);return U?(U[0].length,j.processingInstruction(U[1],U[2]),B+2):-1}return-1}function A(){this.attributeNames={}}A.prototype={setTagName:function(R){if(!n.test(R))throw new Error("invalid tagName:"+R);this.tagName=R},addValue:function(R,O,j){if(!n.test(R))throw new Error("invalid attribute:"+R);this.attributeNames[R]=this.length,this[this.length++]={qName:R,value:O,offset:j}},length:0,getLocalName:function(R){return this[R].localName},getLocator:function(R){return this[R].locator},getQName:function(R){return this[R].qName},getURI:function(R){return this[R].uri},getValue:function(R){return this[R].value}};function I(R,O){var j,B=[],U=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(U.lastIndex=O,U.exec(R);j=U.exec(R);)if(B.push(j),j[1])return B}return nv.XMLReader=p,nv.ParseError=m,nv}var pV;function HMe(){if(pV)return kp;pV=1;var i=$_(),e=bP(),t=zMe(),n=WMe(),r=e.DOMImplementation,s=i.NAMESPACE,o=n.ParseError,a=n.XMLReader;function l(v){return v.replace(/\r[\n\u0085]/g,`
480`).replace(/[\r\u0085\u2028]/g,`
481`)}function c(v){this.options=v||{locator:{}}}c.prototype.parseFromString=function(v,x){var C=this.options,D=new a,E=C.domBuilder||new f,T=C.errorHandler,S=C.locator,A=C.xmlns||{},I=/\/x?html?$/.test(x),R=I?t.HTML_ENTITIES:t.XML_ENTITIES;S&&E.setDocumentLocator(S),D.errorHandler=d(T,E,S),D.domBuilder=C.domBuilder||E,I&&(A[""]=s.HTML),A.xml=A.xml||s.XML;var O=C.normalizeLineEndings||l;return v&&typeof v=="string"?D.parse(O(v),A,R):D.errorHandler.error("invalid doc source"),E.doc};function d(v,x,C){if(!v){if(x instanceof f)return x;v=x}var D={},E=v instanceof Function;C=C||{};function T(S){var A=v[S];!A&&E&&(A=v.length==2?function(I){v(S,I)}:v),D[S]=A&&function(I){A("[xmldom "+S+"]	"+I+p(C))}||function(){}}return T("warning"),T("error"),T("fatalError"),D}function f(){this.cdata=!1}function m(v,x){x.lineNumber=v.lineNumber,x.columnNumber=v.columnNumber}f.prototype={startDocument:function(){this.doc=new r().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(v,x,C,D){var E=this.doc,T=E.createElementNS(v,C||x),S=D.length;y(this,T),this.currentElement=T,this.locator&&m(this.locator,T);for(var A=0;A<S;A++){var v=D.getURI(A),I=D.getValue(A),C=D.getQName(A),R=E.createAttributeNS(v,C);this.locator&&m(D.getLocator(A),R),R.value=R.nodeValue=I,T.setAttributeNode(R)}},endElement:function(v,x,C){var D=this.currentElement;D.tagName,this.currentElement=D.parentNode},startPrefixMapping:function(v,x){},endPrefixMapping:function(v){},processingInstruction:function(v,x){var C=this.doc.createProcessingInstruction(v,x);this.locator&&m(this.locator,C),y(this,C)},ignorableWhitespace:function(v,x,C){},characters:function(v,x,C){if(v=g.apply(this,arguments),v){if(this.cdata)var D=this.doc.createCDATASection(v);else var D=this.doc.createTextNode(v);this.currentElement?this.currentElement.appendChild(D):/^\s*$/.test(v)&&this.doc.appendChild(D),this.locator&&m(this.locator,D)}},skippedEntity:function(v){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(v){(this.locator=v)&&(v.lineNumber=0)},comment:function(v,x,C){v=g.apply(this,arguments);var D=this.doc.createComment(v);this.locator&&m(this.locator,D),y(this,D)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(v,x,C){var D=this.doc.implementation;if(D&&D.createDocumentType){var E=D.createDocumentType(v,x,C);this.locator&&m(this.locator,E),y(this,E),this.doc.doctype=E}},warning:function(v){console.warn("[xmldom warning]	"+v,p(this.locator))},error:function(v){console.error("[xmldom error]	"+v,p(this.locator))},fatalError:function(v){throw new o(v,this.locator)}};function p(v){if(v)return`
482@`+(v.systemId||"")+"#[line:"+v.lineNumber+",col:"+v.columnNumber+"]"}function g(v,x,C){return typeof v=="string"?v.substr(x,C):v.length>=x+C||x?new java.lang.String(v,x,C)+"":v}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(v){f.prototype[v]=function(){return null}});function y(v,x){v.currentElement?v.currentElement.appendChild(x):v.doc.appendChild(x)}return kp.__DOMHandler=f,kp.normalizeLineEndings=l,kp.DOMParser=c,kp}var gV;function qMe(){if(gV)return Ap;gV=1;var i=bP();return Ap.DOMImplementation=i.DOMImplementation,Ap.XMLSerializer
482=i.XMLSerializer,Ap.DOMParser=HMe().DOMParser,Ap}var bV;function $Me(){if(bV)return tv;bV=1;var i=qMe(),e=bP();function t(n){var r=null,s=new i.DOMParser({errorHandler:function(a,l){r={level:a,message:l}}}),o=s.parseFromString(n);if(r===null)return o;throw new Error(r.level+": "+r.message)}return tv.parseFromString=t,tv.Node=e.Node,tv}var yV;function GMe(){if(yV)return oA;yV=1;var i=tu(),e=yi,t=$Me(),n=WZ(),r=n.Element;oA.readString=o;var s=t.Node;function o(a,l){l=l||{};try{var c=t.parseFromString(a,"text/xml")}catch(p){return i.reject(p)}if(c.documentElement.tagName==="parsererror")return i.resolve(new Error(c.documentElement.textContent));function d(p){switch(p.nodeType){case s.ELEMENT_NODE:return f(p);case s.TEXT_NODE:return n.text(p.nodeValue)}}function f(p){var g=m(p),y=[];e.forEach(p.childNodes,function(x){var C=d(x);C&&y.push(C)});var v={};return e.forEach(p.attributes,function(x){v[m(x)]=x.value}),new r(g,v,y)}function m(p){if(p.namespaceURI){var g=l[p.namespaceURI],y;return g?y=g+":":y="{"+p.namespaceURI+"}",y+p.localName}else return p.localName}return i.resolve(d(c.documentElement))}return oA}var lA={},Iu={},ra={},vV;function nu(){return vV||(vV=1,(function(){var i,e,t,n,r,s,o,a=[].slice,l={}.hasOwnProperty;i=function(){var c,d,f,m,p,g;if(g=arguments[0],p=2<=arguments.length?a.call(arguments,1):[],r(Object.assign))Object.assign.apply(null,arguments);else for(c=0,f=p.length;c<f;c++)if(m=p[c],m!=null)for(d in m)l.call(m,d)&&(g[d]=m[d]);return g},r=function(c){return!!c&&Object.prototype.toString.call(c)==="[object Function]"},s=function(c){var d;return!!c&&((d=typeof c)=="function"||d==="object")},t=function(c){return r(Array.isArray)?Array.isArray(c):Object.prototype.toString.call(c)==="[object Array]"},n=function(c){var d;if(t(c))return!c.length;for(d in c)if(l.call(c,d))return!1;return!0},o=function(c){var d,f;return s(c)&&(f=Object.getPrototypeOf(c))&&(d=f.constructor)&&typeof d=="function"&&d instanceof d&&Function.prototype.toString.call(d)===Function.prototype.toString.call(Object)},e=function(c){return r(c.valueOf)?c.valueOf():c},ra.assign=i,ra.isFunction=r,ra.isObject=s,ra.isArray=t,ra.isEmpty=n,ra.isPlainObject=o,ra.getValue=e}).call(ra)),ra}var I1={exports:{}},R1={exports:{}},F1={exports:{}},O1={exports:{}},YMe=O1.exports,wV;function HZ(){return wV||(wV=1,(function(){O1.exports=(function(){function i(e,t,n){if(this.options=e.options,this.stringify=e.stringify,this.parent=e,t==null)throw new Error("Missing attribute name. "+this.debugInfo(t));if(n==null)throw new Error("Missing attribute value. "+this.debugInfo(t));this.name=this.stringify.attName(t),this.value=this.stringify.attValue(n)}return i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(e){return this.options.writer.set(e).attribute(this)},i.prototype.debugInfo=function(e){return e=e||this.name,e==null?"parent: <"+this.parent.name+">":"attribute: {"+e+"}, parent: <"+this.parent.name+">"},i})()}).call(YMe)),O1.exports}var KMe=F1.exports,xV;function G_(){return xV||(xV=1,(function(){var i,e,t,n,r,s,o=function(l,c){for(var d in c)a.call(c,d)&&(l[d]=c[d]);function f(){this.constructor=l}return f.prototype=c.prototype,l.prototype=new f,l.__super__=c.prototype,l},a={}.hasOwnProperty;s=nu(),r=s.isObject,n=s.isFunction,t=s.getValue,e=hs(),i=HZ(),F1.exports=(function(l){o(c,l);function c(d,f,m){if(c.__super__.constructor.call(this,d),f==null)throw new Error("Missing element name. "+this.debugInfo());this.name=this.stringify.eleName(f),this.attributes={},m!=null&&this.attribute(m),d.isDocument&&(this.isRoot=!0,this.documentObject=d,d.rootObject=this)}return c.prototype.clone=function(){var d,f,m,p;m=Object.create(this),m.isRoot&&(m.documentObject=null),m.attributes={},p=this.attributes;for(f in p)a.call(p,f)&&(d=p[f],m.attributes[f]=d.clone());return m.children=[],this.children.forEach(function(g){var y;return y=g.clone(),y.parent=m,m.children.push(y)}),m},c.prototype.attribute=function(d,f){var m,p;if(d!=null&&(d=t(d)),r(d))for(m in d)a.call(d,m)&&(p=d[m],this.attribute(m,p));else n(f)&&(f=f.apply()),(!this.options.skipNullAttributes||f!=null)&&(this.attributes[d]=new i(this,d,f));return this},c.prototype.removeAttribute=function(d){var f,m,p;if(d==null)throw new Error("Missing attribute name. "+this.debugInfo());if(d=t(d),Array.isArray(d))for(m=0,p=d.length;m<p;m++)f=d[m],delete this.attributes[f];else delete this.attributes[d];return this},c.prototype.toString=function(d){return this.options.writer.set(d).element
482(this)},c.prototype.att=function(d,f){return this.attribute(d,f)},c.prototype.a=function(d,f){return this.attribute(d,f)},c})(e)}).call(KMe)),F1.exports}var N1={exports:{}},XMe=N1.exports,_V;function Y_(){return _V||(_V=1,(function(){var i,e=function(n,r){for(var s in r)t.call(r,s)&&(n[s]=r[s]);function o(){this.constructor=n}return o.prototype=r.prototype,n.prototype=new o,n.__super__=r.prototype,n},t={}.hasOwnProperty;i=hs(),N1.exports=(function(n){e(r,n);function r(s,o){if(r.__super__.constructor.call(this,s),o==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.text=this.stringify.cdata(o)}return r.prototype.clone=function(){return Object.create(this)},r.prototype.toString=function(s){return this.options.writer.set(s).cdata(this)},r})(i)}).call(XMe)),N1.exports}var B1={exports:{}},QMe=B1.exports,CV;function K_(){return CV||(CV=1,(function(){var i,e=function(n,r){for(var s in r)t.call(r,s)&&(n[s]=r[s]);function o(){this.constructor=n}return o.prototype=r.prototype,n.prototype=new o,n.__super__=r.prototype,n},t={}.hasOwnProperty;i=hs(),B1.exports=(function(n){e(r,n);function r(s,o){if(r.__super__.constructor.call(this,s),o==null)throw new Error("Missing comment text. "+this.debugInfo());this.text=this.stringify.comment(o)}return r.prototype.clone=function(){return Object.create(this)},r.prototype.toString=function(s){return this.options.writer.set(s).comment(this)},r})(i)}).call(QMe)),B1.exports}var M1={exports:{}},ZMe=M1.exports,DV;function X_(){return DV||(DV=1,(function(){var i,e,t=function(r,s){for(var o in s)n.call(s,o)&&(r[o]=s[o]);function a(){this.constructor=r}return a.prototype=s.prototype,r.prototype=new a,r.__super__=s.prototype,r},n={}.hasOwnProperty;e=nu().isObject,i=hs(),M1.exports=(function(r){t(s,r);function s(o,a,l,c){var d;s.__super__.constructor.call(this,o),e(a)&&(d=a,a=d.version,l=d.encoding,c=d.standalone),a||(a="1.0"),this.version=this.stringify.xmlVersion(a),l!=null&&(this.encoding=this.stringify.xmlEncoding(l)),c!=null&&(this.standalone=this.stringify.xmlStandalone(c))}return s.prototype.toString=function(o){return this.options.writer.set(o).declaration(this)},s})(i)}).call(ZMe)),M1.exports}var L1={exports:{}},U1={exports:{}},JMe=U1.exports,EV;function Q_(){return EV||(EV=1,(function(){var i,e=function(n,r){for(var s in r)t.call(r,s)&&(n[s]=r[s]);function o(){this.constructor=n}return o.prototype=r.prototype,n.prototype=new o,n.__super__=r.prototype,n},t={}.hasOwnProperty;i=hs(),U1.exports=(function(n){e(r,n);function r(s,o,a,l,c,d){if(r.__super__.constructor.call(this,s),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(a==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(o));if(!l)throw new Error("Missing DTD attribute type. "+this.debugInfo(o));if(!c)throw new Error("Missing DTD attribute default. "+this.debugInfo(o));if(c.indexOf("#")!==0&&(c="#"+c),!c.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(o));if(d&&!c.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(o));this.elementName=this.stringify.eleName(o),this.attributeName=this.stringify.attName(a),this.attributeType=this.stringify.dtdAttType(l),this.defaultValue=this.stringify.dtdAttDefault(d),this.defaultValueType=c}return r.prototype.toString=function(s){return this.options.writer.set(s).dtdAttList(this)},r})(i)}).call(JMe)),U1.exports}var V1={exports:{}},e7e=V1.exports,TV;function Z_(){return TV||(TV=1,(function(){var i,e,t=function(r,s){for(var o in s)n.call(s,o)&&(r[o]=s[o]);function a(){this.constructor=r}return a.prototype=s.prototype,r.prototype=new a,r.__super__=s.prototype,r},n={}.hasOwnProperty;e=nu().isObject,i=hs(),V1.exports=(function(r){t(s,r);function s(o,a,l,c){if(s.__super__.constructor.call(this,o),l==null)throw new Error("Missing DTD entity name. "+this.debugInfo(l));if(c==null)throw new Error("Missing DTD entity value. "+this.debugInfo(l));if(this.pe=!!a,this.name=this.stringify.eleName(l),!e(c))this.value=this.stringify.dtdEntityValue(c);else{if(!c.pubID&&!c.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(l));if(c.pubID&&!c.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(l));if(c.pubID!=null&&(this.pubID=this.stringify.dtdPubID(c.pubID)),c.sysID!=null&&(this.sysID=this.stringify.dtdSysID(c.sysID)),c.nData!=null&&(this.nData=this.stringify.dtdNData(c.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(l))}}return s.prototype.toString=function(o){return this.options.writer.set(o).dtdEntity(this)},s})(i)}).call(e7e)),V1.exports}var j1={exports:{}},t7e=j1.exports,AV;function J_(){return AV||(AV=1,(function(){var i,e=function(n,r){for(var s in r)t.call(r,s)&&
482(n[s]=r[s]);function o(){this.constructor=n}return o.prototype=r.prototype,n.prototype=new o,n.__super__=r.prototype,n},t={}.hasOwnProperty;i=hs(),j1.exports=(function(n){e(r,n);function r(s,o,a){if(r.__super__.constructor.call(this,s),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());a||(a="(#PCDATA)"),Array.isArray(a)&&(a="("+a.join(",")+")"),this.name=this.stringify.eleName(o),this.value=this.stringify.dtdElementValue(a)}return r.prototype.toString=function(s){return this.options.writer.set(s).dtdElement(this)},r})(i)}).call(t7e)),j1.exports}var z1={exports:{}},n7e=z1.exports,kV;function e2(){return kV||(kV=1,(function(){var i,e=function(n,r){for(var s in r)t.call(r,s)&&(n[s]=r[s]);function o(){this.constructor=n}return o.prototype=r.prototype,n.prototype=new o,n.__super__=r.prototype,n},t={}.hasOwnProperty;i=hs(),z1.exports=(function(n){e(r,n);function r(s,o,a){if(r.__super__.constructor.call(this,s),o==null)throw new Error("Missing DTD notation name. "+this.debugInfo(o));if(!a.pubID&&!a.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(o));this.name=this.stringify.eleName(o),a.pubID!=null&&(this.pubID=this.stringify.dtdPubID(a.pubID)),a.sysID!=null&&(this.sysID=this.stringify.dtdSysID(a.sysID))}return r.prototype.toString=function(s){return this.options.writer.set(s).dtdNotation(this)},r})(i)}).call(n7e)),z1.exports}var i7e=L1.exports,SV;function t2(){return SV||(SV=1,(function(){var i,e,t,n,r,s,o=function(l,c){for(var d in c)a.call(c,d)&&(l[d]=c[d]);function f(){this.constructor=l}return f.prototype=c.prototype,l.prototype=new f,l.__super__=c.prototype,l},a={}.hasOwnProperty;s=nu().isObject,r=hs(),i=Q_(),t=Z_(),e=J_(),n=e2(),L1.exports=(function(l){o(c,l);function c(d,f,m){var p,g;c.__super__.constructor.call(this,d),this.name="!DOCTYPE",this.documentObject=d,s(f)&&(p=f,f=p.pubID,m=p.sysID),m==null&&(g=[f,m],m=g[0],f=g[1]),f!=null&&(this.pubID=this.stringify.dtdPubID(f)),m!=null&&(this.sysID=this.stringify.dtdSysID(m))}return c.prototype.element=function(d,f){var m;return m=new e(this,d,f),this.children.push(m),this},c.prototype.attList=function(d,f,m,p,g){var y;return y=new i(this,d,f,m,p,g),this.children.push(y),this},c.prototype.entity=function(d,f){var m;return m=new t(this,!1,d,f),this.children.push(m),this},c.prototype.pEntity=function(d,f){var m;return m=new t(this,!0,d,f),this.children.push(m),this},c.prototype.notation=function(d,f){var m;return m=new n(this,d,f),this.children.push(m),this},c.prototype.toString=function(d){return this.options.writer.set(d).docType(this)},c.prototype.ele=function(d,f){return this.element(d,f)},c.prototype.att=function(d,f,m,p,g){return this.attList(d,f,m,p,g)},c.prototype.ent=function(d,f){return this.entity(d,f)},c.prototype.pent=function(d,f){return this.pEntity(d,f)},c.prototype.not=function(d,f){return this.notation(d,f)},c.prototype.up=function(){return this.root()||this.documentObject},c})(r)}).call(i7e)),L1.exports}var W1={exports:{}},r7e=W1.exports,PV;function n2(){return PV||(PV=1,(function(){var i,e=function(n,r){for(var s in r)t.call(r,s)&&(n[s]=r[s]);function o(){this.constructor=n}return o.prototype=r.prototype,n.prototype=new o,n.__super__=r.prototype,n},t={}.hasOwnProperty;i=hs(),W1.exports=(function(n){e(r,n);function r(s,o){if(r.__super__.constructor.call(this,s),o==null)throw new Error("Missing raw text. "+this.debugInfo());this.value=this.stringify.raw(o)}return r.prototype.clone=function(){return Object.create(this)},r.prototype.toString=function(s){return this.options.writer.set(s).raw(this)},r})(i)}).call(r7e)),W1.exports}var H1={exports:{}},s7e=H1.exports,IV;function i2(){return IV||(IV=1,(function(){var i,e=function(n,r){for(var s in r)t.call(r,s)&&(n[s]=r[s]);function o(){this.constructor=n}return o.prototype=r.prototype,n.prototype=new o,n.__super__=r.prototype,n},t={}.hasOwnProperty;i=hs(),H1.exports=(function(n){e(r,n);function r(s,o){if(r.__super__.constructor.call(this,s),o==null)throw new Error("Missing element text. "+this.debugInfo());this.value=this.stringify.eleText(o)}return r.prototype.clone=function(){return Object.create(this)},r.prototype.toString=function(s){return this.options.writer.set(s).text(this)},r})(i)}).call(s7e)),H1.exports}var q1={exports:{}},o7e=q1.exports,RV;function r2(){return RV||(RV=1,(function(){var i,e=function(n,r){for(var s in r)t.call(r,s)&&
482(n[s]=r[s]);function o(){this.constructor=n}return o.prototype=r.prototype,n.prototype=new o,n.__super__=r.prototype,n},t={}.hasOwnProperty;i=hs(),q1.exports=(function(n){e(r,n);function r(s,o,a){if(r.__super__.constructor.call(this,s),o==null)throw new Error("Missing instruction target. "+this.debugInfo());this.target=this.stringify.insTarget(o),a&&(this.value=this.stringify.insValue(a))}return r.prototype.clone=function(){return Object.create(this)},r.prototype.toString=function(s){return this.options.writer.set(s).processingInstruction(this)},r})(i)}).call(o7e)),q1.exports}var $1={exports:{}},a7e=$1.exports,FV;function yP(){return FV||(FV=1,(function(){var i,e=function(n,r){for(var s in r)t.call(r,s)&&(n[s]=r[s]);function o(){this.constructor=n}return o.prototype=r.prototype,n.prototype=new o,n.__super__=r.prototype,n},t={}.hasOwnProperty;i=hs(),$1.exports=(function(n){e(r,n);function r(s){r.__super__.constructor.call(this,s),this.isDummy=!0}return r.prototype.clone=function(){return Object.create(this)},r.prototype.toString=function(s){return""},r})(i)}).call(a7e)),$1.exports}var l7e=R1.exports,OV;function hs(){return OV||(OV=1,(function(){var i,e,t,n,r,s,o,a,l,c,d,f,m,p,g={}.hasOwnProperty;p=nu(),m=p.isObject,f=p.isFunction,d=p.isEmpty,c=p.getValue,s=null,i=null,e=null,t=null,n=null,a=null,l=null,o=null,r=null,R1.exports=(function(){function y(v){this.parent=v,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],s||(s=G_(),i=Y_(),e=K_(),t=X_(),n=t2(),a=n2(),l=i2(),o=r2(),r=yP())}return y.prototype.element=function(v,x,C){var D,E,T,S,A,I,R,O,j,B,U;if(I=null,x===null&&C==null&&(j=[{},null],x=j[0],C=j[1]),x==null&&(x={}),x=c(x),m(x)||(B=[x,C],C=B[0],x=B[1]),v!=null&&(v=c(v)),Array.isArray(v))for(T=0,R=v.length;T<R;T++)E=v[T],I=this.element(E);else if(f(v))I=this.element(v.apply());else if(m(v)){for(A in v)if(g.call(v,A))if(U=v[A],f(U)&&(U=U.apply()),m(U)&&d(U)&&(U=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&A.indexOf(this.stringify.convertAttKey)===0)I=this.attribute(A.substr(this.stringify.convertAttKey.length),U);else if(!this.options.separateArrayItems&&Array.isArray(U))for(S=0,O=U.length;S<O;S++)E=U[S],D={},D[A]=E,I=this.element(D);else m(U)?(I=this.element(A),I.element(U)):I=this.element(A,U)}else this.options.skipNullNodes&&C===null?I=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&v.indexOf(this.stringify.convertTextKey)===0?I=this.text(C):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&v.indexOf(this.stringify.convertCDataKey)===0?I=this.cdata(C):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&v.indexOf(this.stringify.convertCommentKey)===0?I=this.comment(C):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&v.indexOf(this.stringify.convertRawKey)===0?I=this.raw(C):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&v.indexOf(this.stringify.convertPIKey)===0?I=this.instruction(v.substr(this.stringify.convertPIKey.length),C):I=this.node(v,x,C);if(I==null)throw new Error("Could not create any elements with: "+v+". "+this.debugInfo());return I},y.prototype.insertBefore=function(v,x,C){var D,E,T;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(v));return E=this.parent.children.indexOf(this),T=this.parent.children.splice(E),D=this.parent.element(v,x,C),Array.prototype.push.apply(this.parent.children,T),D},y.prototype.insertAfter=function(v,x,C){var D,E,T;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(v));return E=this.parent.children.indexOf(this),T=this.parent.children.splice(E+1),D=this.parent.element(v,x,C),Array.prototype.push.apply(this.parent.children,T),D},y.prototype.remove=function(){var v;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return v=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[v,v-v+1].concat([])),this.parent},y.prototype.node=function(v,x,C){var D,E;return v!=null&&(v=c(v)),x||(x={}),x=c(x),m(x)||(E=[x,C],C=E[0],x=E[1]),D=new s(this,v,x),C!=null&&D.text(C),this.children.push(D),D},y.prototype.text=function(v){var x;return x=new l(this,v),this.children.push(x),this},y.prototype.cdata=function(v){var x;return x=new i(this,v),this.children.push(x),this},y.prototype.comment=function(v){var x;return x=new e(this,v),this.children.push(x),this},y.prototype.commentBefore=function(v){var x,C;return x=this.parent.children.indexOf(this),C=this.parent.children.splice(
482x),this.parent.comment(v),Array.prototype.push.apply(this.parent.children,C),this},y.prototype.commentAfter=function(v){var x,C;return x=this.parent.children.indexOf(this),C=this.parent.children.splice(x+1),this.parent.comment(v),Array.prototype.push.apply(this.parent.children,C),this},y.prototype.raw=function(v){var x;return x=new a(this,v),this.children.push(x),this},y.prototype.dummy=function(){var v;return v=new r(this),this.children.push(v),v},y.prototype.instruction=function(v,x){var C,D,E,T,S;if(v!=null&&(v=c(v)),x!=null&&(x=c(x)),Array.isArray(v))for(T=0,S=v.length;T<S;T++)C=v[T],this.instruction(C);else if(m(v))for(C in v)g.call(v,C)&&(D=v[C],this.instruction(C,D));else f(x)&&(x=x.apply()),E=new o(this,v,x),this.children.push(E);return this},y.prototype.instructionBefore=function(v,x){var C,D;return C=this.parent.children.indexOf(this),D=this.parent.children.splice(C),this.parent.instruction(v,x),Array.prototype.push.apply(this.parent.children,D),this},y.prototype.instructionAfter=function(v,x){var C,D;return C=this.parent.children.indexOf(this),D=this.parent.children.splice(C+1),this.parent.instruction(v,x),Array.prototype.push.apply(this.parent.children,D),this},y.prototype.declaration=function(v,x,C){var D,E;return D=this.document(),E=new t(D,v,x,C),D.children[0]instanceof t?D.children[0]=E:D.children.unshift(E),D.root()||D},y.prototype.doctype=function(v,x){var C,D,E,T,S,A,I,R,O,j;for(D=this.document(),E=new n(D,v,x),O=D.children,T=S=0,I=O.length;S<I;T=++S)if(C=O[T],C instanceof n)return D.children[T]=E,E;for(j=D.children,T=A=0,R=j.length;A<R;T=++A)if(C=j[T],C.isRoot)return D.children.splice(T,0,E),E;return D.children.push(E),E},y.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},y.prototype.root=function(){var v;for(v=this;v;){if(v.isDocument)return v.rootObject;if(v.isRoot)return v;v=v.parent}},y.prototype.document=function(){var v;for(v=this;v;){if(v.isDocument)return v;v=v.parent}},y.prototype.end=function(v){return this.document().end(v)},y.prototype.prev=function(){var v;for(v=this.parent.children.indexOf(this);v>0&&this.parent.children[v-1].isDummy;)v=v-1;if(v<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[v-1]},y.prototype.next=function(){var v;for(v=this.parent.children.indexOf(this);v<this.parent.children.length-1&&this.parent.children[v+1].isDummy;)v=v+1;if(v===-1||v===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[v+1]},y.prototype.importDocument=function(v){var x;return x=v.root().clone(),x.parent=this,x.isRoot=!1,this.children.push(x),this},y.prototype.debugInfo=function(v){var x,C;return v=v||this.name,v==null&&!((x=this.parent)!=null&&x.name)?"":v==null?"parent: <"+this.parent.name+">":(C=this.parent)!=null&&C.name?"node: <"+v+">, parent: <"+this.parent.name+">":"node: <"+v+">"},y.prototype.ele=function(v,x,C){return this.element(v,x,C)},y.prototype.nod=function(v,x,C){return this.node(v,x,C)},y.prototype.txt=function(v){return this.text(v)},y.prototype.dat=function(v){return this.cdata(v)},y.prototype.com=function(v){return this.comment(v)},y.prototype.ins=function(v,x){return this.instruction(v,x)},y.prototype.doc=function(){return this.document()},y.prototype.dec=function(v,x,C){return this.declaration(v,x,C)},y.prototype.dtd=function(v,x){return this.doctype(v,x)},y.prototype.e=function(v,x,C){return this.element(v,x,C)},y.prototype.n=function(v,x,C){return this.node(v,x,C)},y.prototype.t=function(v){return this.text(v)},y.prototype.d=function(v){return this.cdata(v)},y.prototype.c=function(v){return this.comment(v)},y.prototype.r=function(v){return this.raw(v)},y.prototype.i=function(v,x){return this.instruction(v,x)},y.prototype.u=function(){return this.up()},y.prototype.importXMLBuilder=function(v){return this.importDocument(v)},y})()}).call(l7e)),R1.exports}var G1={exports:{}},c7e=G1.exports,NV;function qZ(){return NV||(NV=1,(function(){var i=function(t,n){return function(){return t.apply(n,arguments)}},e={}.hasOwnProperty;G1.exports=(function(){function t(n){this.assertLegalChar=i(this.assertLegalChar,this);var r,s,o;n||(n={}),this.noDoubleEncoding=n.noDoubleEncoding,s=n.stringify||{};for(r in s)e.call(s,r)&&(o=s[r],this[r]=o)}return t.prototype.eleName=function(n){return n=""+n||"",this.assertLegalChar(n)},t.prototype.eleText=function(n){return n=""+n||"",this.assertLegalChar(this.elEscape(n))},t.prototype.cdata=function(n){return n=""+n||"",n=n.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(n)},t.prototype.comment=function(n){if(n=""+n||"",n.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+n);return this.assertLegalChar(n)},t.prototype.raw=function(n){return""+n||""},t.prototype.attName=function(n){return n=""+n||""},t.prototype.attValue=function(n){return n=""+n||"",this.attEscape(n)},t.prototype.insTarget=function(n){return""+n||""},t.prototype.insValue=function(n){if(n=""+n||"",n.match(/\?>/))throw new Error("Invalid processing instruction value: "+n);return n},t.prototype.xmlVersion=function(n){if(n=""+n||"",!n.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+n);return n},t.prototype.xmlEncoding=function(n){if(n=""+n||"",!n.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+n);return n},t.prototype.xmlStandalone=function(n){return n?"yes":"no"},t.prototype.dtdPubID=function(n){return""+n||""},t.prototype.dtdSysID=function(n){return""+n||""},t.prototype.dtdElementValue=function(n){return""+n||""},t.prototype.dtdAttType=function(n){return""+n||""},t.prototype.dtdAttDefault=function(n){return n!=null?""+n||"":n},t.prototype.dtdEntityValue=function(n){return""+n||""},t.prototype.dtdNData=function(n){return""+n||""},t.prototype.convertAttKey="@",t.prototype.convertPIKey="?",t.prototype.convertTextKey="#text",t.prototype.convertCDataKey="#cdata",t.prototype.convertCommentKey="#comment",t.prototype.convertRawKey="#raw",t.prototype.assertLegalChar=function(n){var r;if(r=n.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),r)throw new Error("Invalid character in string: "+n+" at index "+r.index);return n},t.prototype.elEscape=function(n){var r;return r=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,n.replace(r,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")},t.prototype.attEscape=function(n){var r;return r=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,n.replace(r,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")},t})()}).call(c7e)),G1.exports}var Y1={exports:{}},K1={exports:{}},u7e=K1.exports,BV;function $Z(){return BV||(BV=1,(function(){var i={}.hasOwnProperty;K1.exports=(function(){function e(t){var n,r,s,o,a,l,c,d,f;t||(t={}),this.pretty=t.pretty||!1,this.allowEmpty=(r=t.allowEmpty)!=null?r:!1,this.pretty?(this.indent=(s=t.indent)!=null?s:"  ",this.newline=(o=t.newline)!=null?o:`
483`,this.offset=(a=t.offset)!=null?a:0,this.dontprettytextnodes=(l=t.dontprettytextnodes)!=null?l:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(c=t.spacebeforeslash)!=null?c:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,d=t.writer||{};
483for(n in d)i.call(d,n)&&(f=d[n],this[n]=f)}return e.prototype.set=function(t){var n,r,s;t||(t={}),"pretty"in t&&(this.pretty=t.pretty),"allowEmpty"in t&&(this.allowEmpty=t.allowEmpty),this.pretty?(this.indent="indent"in t?t.indent:"  ",this.newline="newline"in t?t.newline:`
484`,this.offset="offset"in t?t.offset:0,this.dontprettytextnodes="dontprettytextnodes"in t?t.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in t?t.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,r=t.writer||{};for(n in r)i.call(r,n)&&(s=r[n],this[n]=s);return this},e.prototype.space=function(t){var n;return this.pretty?(n=(t||0)+this.offset+1,n>0?new Array(n).join(this.indent):""):""},e})()}).call(u7e)),K1.exports}var d7e=Y1.exports,MV;function vP(){return MV||(MV=1,(function(){var i,e,t,n,r,s,o,a,l,c,d,f,m,p,g=function(v,x){for(var C in x)y.call(x,C)&&(v[C]=x[C]);function D(){this.constructor=v}return D.prototype=x.prototype,v.prototype=new D,v.__super__=x.prototype,v},y={}.hasOwnProperty;o=X_(),a=t2(),i=Y_(),e=K_(),c=G_(),f=n2(),m=i2(),d=r2(),l=yP(),t=Q_(),n=J_(),r=Z_(),s=e2(),p=$Z(),Y1.exports=(function(v){g(x,v);function x(C){x.__super__.constructor.call(this,C)}return x.prototype.document=function(C){var D,E,T,S,A;for(this.textispresent=!1,S="",A=C.children,E=0,T=A.length;E<T;E++)D=A[E],!(D instanceof l)&&(S+=(function(){switch(!1){case!(D instanceof o):return this.declaration(D);case!(D instanceof a):return this.docType(D);case!(D instanceof e):return this.comment(D);case!(D instanceof d):return this.processingInstruction(D);default:return this.element(D,0)}}).call(this));return this.pretty&&S.slice(-this.newline.length)===this.newline&&(S=S.slice(0,-this.newline.length)),S},x.prototype.attribute=function(C){return" "+C.name+'="'+C.value+'"'},x.prototype.cdata=function(C,D){return this.space(D)+"<![CDATA["+C.text+"]]>"+this.newline},x.prototype.comment=function(C,D){return this.space(D)+"<!-- "+C.text+" -->"+this.newline},x.prototype.declaration=function(C,D){var E;return E=this.space(D),E+='<?xml version="'+C.version+'"',C.encoding!=null&&(E+=' encoding="'+C.encoding+'"'),C.standalone!=null&&(E+=' standalone="'+C.standalone+'"'),E+=this.spacebeforeslash+"?>",E+=this.newline,E},x.prototype.docType=function(C,D){var E,T,S,A,I;if(D||(D=0),A=this.space(D),A+="<!DOCTYPE "+C.root().name,C.pubID&&C.sysID?A+=' PUBLIC "'+C.pubID+'" "'+C.sysID+'"':C.sysID&&(A+=' SYSTEM "'+C.sysID+'"'),C.children.length>0){for(A+=" [",A+=this.newline,I=C.children,T=0,S=I.length;T<S;T++)E=I[T],A+=(function(){switch(!1){case!(E instanceof t):return this.dtdAttList(E,D+1);case!(E instanceof n):return this.dtdElement(E,D+1);case!(E instanceof r):return this.dtdEntity(E,D+1);case!(E instanceof s):return this.dtdNotation(E,D+1);case!(E instanceof i):return this.cdata(E,D+1);case!(E instanceof e):return this.comment(E,D+1);case!(E instanceof d):return this.processingInstruction(E,D+1);default:throw new Error("Unknown DTD node type: "+E.constructor.name)}}).call(this);A+="]"}return A+=this.spacebeforeslash+">",A+=this.newline,A},x.prototype.element=function(C,D){var E,T,S,A,I,R,O,j,B,U,F,H,L;D||(D=0),L=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),H=this.space(D),j="",j+=H+"<"+C.name,B=C.attributes;for(O in B)y.call(B,O)&&(E=B[O],j+=this.attribute(E));if(C.children.length===0||C.children.every(function(W){return W.value===""}))this.allowEmpty?j+="></"+C.name+">"+this.newline:j+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&C.children.length===1&&C.children[0].value!=null)j+=">",j+=C.children[0].value,j+="</"+C.name+">"+this.newline;else{if(this.dontprettytextnodes){for(U=C.children,S=0,I=U.length;S<I;S++)if(T=U[S],T.value!=null){this.textispresent++,L=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,H=this.space(D)),j+=">"+this.newline,F=C.children,A=0,R=F.length;A<R;A++)T=F[A],j+=(function(){switch(!1){case!(T instanceof i):return this.cdata(T,D+1);case!(T instanceof e):return this.comment(T,D+1);
484case!(T instanceof c):return this.element(T,D+1);case!(T instanceof f):return this.raw(T,D+1);case!(T instanceof m):return this.text(T,D+1);case!(T instanceof d):return this.processingInstruction(T,D+1);case!(T instanceof l):return"";default:throw new Error("Unknown XML node type: "+T.constructor.name)}}).call(this);L&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),j+=H+"</"+C.name+">"+this.newline}return j},x.prototype.processingInstruction=function(C,D){var E;return E=this.space(D)+"<?"+C.target,C.value&&(E+=" "+C.value),E+=this.spacebeforeslash+"?>"+this.newline,E},x.prototype.raw=function(C,D){return this.space(D)+C.value+this.newline},x.prototype.text=function(C,D){return this.space(D)+C.value+this.newline},x.prototype.dtdAttList=function(C,D){var E;return E=this.space(D)+"<!ATTLIST "+C.elementName+" "+C.attributeName+" "+C.attributeType,C.defaultValueType!=="#DEFAULT"&&(E+=" "+C.defaultValueType),C.defaultValue&&(E+=' "'+C.defaultValue+'"'),E+=this.spacebeforeslash+">"+this.newline,E},x.prototype.dtdElement=function(C,D){return this.space(D)+"<!ELEMENT "+C.name+" "+C.value+this.spacebeforeslash+">"+this.newline},x.prototype.dtdEntity=function(C,D){var E;return E=this.space(D)+"<!ENTITY",C.pe&&(E+=" %"),E+=" "+C.name,C.value?E+=' "'+C.value+'"':(C.pubID&&C.sysID?E+=' PUBLIC "'+C.pubID+'" "'+C.sysID+'"':C.sysID&&(E+=' SYSTEM "'+C.sysID+'"'),C.nData&&(E+=" NDATA "+C.nData)),E+=this.spacebeforeslash+">"+this.newline,E},x.prototype.dtdNotation=function(C,D){var E;return E=this.space(D)+"<!NOTATION "+C.name,C.pubID&&C.sysID?E+=' PUBLIC "'+C.pubID+'" "'+C.sysID+'"':C.pubID?E+=' PUBLIC "'+C.pubID+'"':C.sysID&&(E+=' SYSTEM "'+C.sysID+'"'),E+=this.spacebeforeslash+">"+this.newline,E},x.prototype.openNode=function(C,D){var E,T,S,A;if(D||(D=0),C instanceof c){S=this.space(D)+"<"+C.name,A=C.attributes;for(T in A)y.call(A,T)&&(E=A[T],S+=this.attribute(E));return S+=(C.children?">":"/>")+this.newline,S}else return S=this.space(D)+"<!DOCTYPE "+C.rootNodeName,C.pubID&&C.sysID?S+=' PUBLIC "'+C.pubID+'" "'+C.sysID+'"':C.sysID&&(S+=' SYSTEM "'+C.sysID+'"'),S+=(C.children?" [":">")+this.newline,S},x.prototype.closeNode=function(C,D){switch(D||(D=0),!1){case!(C instanceof c):return this.space(D)+"</"+C.name+">"+this.newline;case!(C instanceof a):return this.space(D)+"]>"+this.newline}},x})(p)}).call(d7e)),Y1.exports}var f7e=I1.exports,LV;function h7e(){return LV||(LV=1,(function(){var i,e,t,n,r=function(o,a){for(var l in a)s.call(a,l)&&(o[l]=a[l]);function c(){this.constructor=o}return c.prototype=a.prototype,o.prototype=new c,o.__super__=a.prototype,o},s={}.hasOwnProperty;n=nu().isPlainObject,i=hs(),t=qZ(),e=vP(),I1.exports=(function(o){r(a,o);function a(l){a.__super__.constructor.call(this,null),this.name="?xml",l||(l={}),l.writer||(l.writer=new e),this.options=l,this.stringify=new t(l),this.isDocument=!0}return a.prototype.end=function(l){var c;return l?n(l)&&(c=l,l=this.options.writer.set(c)):l=this.options.writer,l.document(this)},a.prototype.toString=function(l){return this.options.writer.set(l).document(this)},a})(i)}).call(f7e)),I1.exports}var X1={exports:{}},m7e=X1.exports,UV;function p7e(){return UV||(UV=1,(function(){var i,e,t,n,r,s,o,a,l,c,d,f,m,p,g,y,v,x,C,D,E={}.hasOwnProperty;D=nu(),x=D.isObject,v=D.isFunction,C=D.isPlainObject,y=D.getValue,c=G_(),e=Y_(),t=K_(),f=n2(),g=i2(),d=r2(),a=X_(),l=t2(),n=Q_(),s=Z_(),r=J_(),o=e2(),i=HZ(),p=qZ(),m=vP(),X1.exports=(function(){function T(S,A,I){var R;this.name="?xml",S||(S={}),S.writer?C(S.writer)&&(R=S.writer,S.writer=new m(R)):S.writer=new m(S),this.options=S,this.writer=S.writer,this.stringify=new p(S),this.onDataCallback=A||function(){},this.onEndCallback=I||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return T.prototype.node=function(S,A,I){var R,O;if(S==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(S));return this.openCurrent(),S=y(S),A===null&&I==null&&(R=[{},null],A=R[0],I=R[1]),A==null&&(A={}),A=y(A),x(A)||(O=[A,I],I=O[0],A=O[1]),this.currentNode=new c(this,S,A),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,I!=null&&this.text(I),this},T.prototype.element=function(S,A,I){return this.currentNode&&this.currentNode instanceof l?this.dtdElement.apply(this,arguments):this.node(S,A,I)},T.prototype.attribute=function(S,A){var I,R;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(S));if(S!=null&&(S=y(S)),x(S))for(I in S)E.call(S,I)&&(R=S[I],this.attribute(I,R));else v(A)&&(A=A.apply()),(!this.options.skipNullAttributes||A!=null)&&(this.currentNode.attributes[S]=new i(this,S,A));return this},T.prototype.text=function(S){var A;return this.openCurrent(),A=new g(this,S),this.onData(this.writer.text(A,this.currentLevel+1),this.currentLevel+1),this},T.prototype.cdata=function(S){var A;return this.openCurrent(),A=new e(this,S),this.onData(this.writer.cd
484ata(A,this.currentLevel+1),this.currentLevel+1),this},T.prototype.comment=function(S){var A;return this.openCurrent(),A=new t(this,S),this.onData(this.writer.comment(A,this.currentLevel+1),this.currentLevel+1),this},T.prototype.raw=function(S){var A;return this.openCurrent(),A=new f(this,S),this.onData(this.writer.raw(A,this.currentLevel+1),this.currentLevel+1),this},T.prototype.instruction=function(S,A){var I,R,O,j,B;if(this.openCurrent(),S!=null&&(S=y(S)),A!=null&&(A=y(A)),Array.isArray(S))for(I=0,j=S.length;I<j;I++)R=S[I],this.instruction(R);else if(x(S))for(R in S)E.call(S,R)&&(O=S[R],this.instruction(R,O));else v(A)&&(A=A.apply()),B=new d(this,S,A),this.onData(this.writer.processingInstruction(B,this.currentLevel+1),this.currentLevel+1);return this},T.prototype.declaration=function(S,A,I){var R;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return R=new a(this,S,A,I),this.onData(this.writer.declaration(R,this.currentLevel+1),this.currentLevel+1),this},T.prototype.doctype=function(S,A,I){if(this.openCurrent(),S==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new l(this,A,I),this.currentNode.rootNodeName=S,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},T.prototype.dtdElement=function(S,A){var I;return this.openCurrent(),I=new r(this,S,A),this.onData(this.writer.dtdElement(I,this.currentLevel+1),this.currentLevel+1),this},T.prototype.attList=function(S,A,I,R,O){var j;return this.openCurrent(),j=new n(this,S,A,I,R,O),this.onData(this.writer.dtdAttList(j,this.currentLevel+1),this.currentLevel+1),this},T.prototype.entity=function(S,A){var I;return this.openCurrent(),I=new s(this,!1,S,A),this.onData(this.writer.dtdEntity(I,this.currentLevel+1),this.currentLevel+1),this},T.prototype.pEntity=function(S,A){var I;return this.openCurrent(),I=new s(this,!0,S,A),this.onData(this.writer.dtdEntity(I,this.currentLevel+1),this.currentLevel+1),this},T.prototype.notation=function(S,A){var I;return this.openCurrent(),I=new o(this,S,A),this.onData(this.writer.dtdNotation(I,this.currentLevel+1),this.currentLevel+1),this},T.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},T.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},T.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},T.prototype.openNode=function(S){if(!S.isOpen)return!this.root&&this.currentLevel===0&&S instanceof c&&(this.root=S),this.onData(this.writer.openNode(S,this.currentLevel),this.currentLevel),S.isOpen=!0},T.prototype.closeNode=function(S){if(!S.isClosed)return this.onData(this.writer.closeNode(S,this.currentLevel),this.currentLevel),S.isClosed=!0},T.prototype.onData=function(S,A){return this.documentStarted=!0,this.onDataCallback(S,A+1)},T.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},T.prototype.debugInfo=function(S){return S==null?"":"node: <"+S+">"},T.prototype.ele=function(){return this.element.apply(this,arguments)},T.prototype.nod=function(S,A,I){return this.node(S,A,I)},T.prototype.txt=function(S){return this.text(S)},T.prototype.dat=function(S){return this.cdata(S)},T.prototype.com=function(S){return this.comment(S)},T.prototype.ins=function(S,A){return this.instruction(S,A)},T.prototype.dec=function(S,A,I){return this.declaration(S,A,I)},T.prototype.dtd=function(S,A,I){return this.doctype(S,A,I)},T.prototype.e=function(S,A,I){return this.element(S,A,I)},T.prototype.n=function(S,A,I){return this.node(S,A,I)},T.prototype.t=function(S){return this.text(S)},T.prototype.d=function(S){return this.cdata(S)},T.prototype.c=function(S){return this.comment(S)},T.prototype.r=function(S){return this.raw(S)},T.prototype.i=function(S,A){return this.instruction(S,A)},T.prototype.att=function(){return this.currentNode&&this.currentNode instanceof l?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},T.prototype.a=function(){return this.currentNode&&this.currentNode instanceof l?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},T.prototype.ent=function(S,A){return this.entity(S,A)},T.prototype.pent=function(S,A){return this.pEntity(S,A)},T.prototype.not=function(S,A){return this.notation(S,A)},T})()}).call(m7e)),X1.exports}var Q1={exports:{}},g7e=Q1.exports,VV;function b7e(){return VV||(VV=1,(function(){var i,e,t,n,r,s,o,a,l,c,d,f,m,p,g=function(v,x){for(var C in x)y.call(x,C)&&(v[C]=x[C]);function D(){this.constructor=v}return D.prototype=x.prototype,v.prototype=new D,v.__super__=x.prototype,v},y={}.hasOwnProperty;o=X_(),a=t2(),i=Y_(),e=K_(),c=G_(),f=n2(),m=i2(),d=r2(),l=yP(),t=Q_(),n=J_(),r=Z_(),s=e2(),p=$Z(),Q1.exports=(function(v){g(x,v);function x(C,D){x.__super__.constructor.call(this,D),this.stream=C}return x.prototype.document=function(C){var D,E,T,S,A,I,R,O;for(I=C.children,E=0,S=I.length;E<S;E++)D=I[E],D.isLastRootNode=!1;for(C.children[C.children.length-1].isLastRootNode=!0,R=C.children,O=[],T=0,A=R.length;T<A;T++)if(D=R[T],!(D instanceof l))switch(!1){case!(D instanceof o):O.push(this.declaration(D));break;case!(D instanceof a):O.push(this.docType(D));break;case!(D instanceof e):O.push(this.comment(D));break;case!(D instanceof d):O.push(this.processingInstruction(D));break;
484default:O.push(this.element(D))}return O},x.prototype.attribute=function(C){return this.stream.write(" "+C.name+'="'+C.value+'"')},x.prototype.cdata=function(C,D){return this.stream.write(this.space(D)+"<![CDATA["+C.text+"]]>"+this.endline(C))},x.prototype.comment=function(C,D){return this.stream.write(this.space(D)+"<!-- "+C.text+" -->"+this.endline(C))},x.prototype.declaration=function(C,D){return this.stream.write(this.space(D)),this.stream.write('<?xml version="'+C.version+'"'),C.encoding!=null&&this.stream.write(' encoding="'+C.encoding+'"'),C.standalone!=null&&this.stream.write(' standalone="'+C.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(C))},x.prototype.docType=function(C,D){var E,T,S,A;if(D||(D=0),this.stream.write(this.space(D)),this.stream.write("<!DOCTYPE "+C.root().name),C.pubID&&C.sysID?this.stream.write(' PUBLIC "'+C.pubID+'" "'+C.sysID+'"'):C.sysID&&this.stream.write(' SYSTEM "'+C.sysID+'"'),C.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(C)),A=C.children,T=0,S=A.length;T<S;T++)switch(E=A[T],!1){case!(E instanceof t):this.dtdAttList(E,D+1);break;case!(E instanceof n):this.dtdElement(E,D+1);break;case!(E instanceof r):this.dtdEntity(E,D+1);break;case!(E instanceof s):this.dtdNotation(E,D+1);break;case!(E instanceof i):this.cdata(E,D+1);break;case!(E instanceof e):this.comment(E,D+1);break;case!(E instanceof d):this.processingInstruction(E,D+1);break;default:throw new Error("Unknown DTD node type: "+E.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(C))},x.prototype.element=function(C,D){var E,T,S,A,I,R,O,j;D||(D=0),j=this.space(D),this.stream.write(j+"<"+C.name),R=C.attributes;for(I in R)y.call(R,I)&&(E=R[I],this.attribute(E));if(C.children.length===0||C.children.every(function(B){return B.value===""}))this.allowEmpty?this.stream.write("></"+C.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&C.children.length===1&&C.children[0].value!=null)this.stream.write(">"),this.stream.write(C.children[0].value),this.stream.write("</"+C.name+">");else{for(this.stream.write(">"+this.newline),O=C.children,S=0,A=O.length;S<A;S++)switch(T=O[S],!1){case!(T instanceof i):this.cdata(T,D+1);break;case!(T instanceof e):this.comment(T,D+1);break;case!(T instanceof c):this.element(T,D+1);break;case!(T instanceof f):this.raw(T,D+1);break;case!(T instanceof m):this.text(T,D+1);break;case!(T instanceof d):this.processingInstruction(T,D+1);break;case!(T instanceof l):break;default:throw new Error("Unknown XML node type: "+T.constructor.name)}this.stream.write(j+"</"+C.name+">")}return this.stream.write(this.endline(C))},x.prototype.processingInstruction=function(C,D){return this.stream.write(this.space(D)+"<?"+C.target),C.value&&this.stream.write(" "+C.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(C))},x.prototype.raw=function(C,D){return this.stream.write(this.space(D)+C.value+this.endline(C))},x.prototype.text=function(C,D){return this.stream.write(this.space(D)+C.value+this.endline(C))},x.prototype.dtdAttList=function(C,D){return this.stream.write(this.space(D)+"<!ATTLIST "+C.elementName+" "+C.attributeName+" "+C.attributeType),C.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+C.defaultValueType),C.defaultValue&&this.stream.write(' "'+C.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(C))},x.prototype.dtdElement=function(C,D){return this.stream.write(this.space(D)+"<!ELEMENT "+C.name+" "+C.value),this.stream.write(this.spacebeforeslash+">"+this.endline(C))},x.prototype.dtdEntity=function(C,D){return this.stream.write(this.space(D)+"<!ENTITY"),C.pe&&this.stream.write(" %"),this.stream.write(" "+C.name),C.value?this.stream.write(' "'+C.value+'"'):(C.pubID&&C.sysID?this.stream.write(' PUBLIC "'+C.pubID+'" "'+C.sysID+'"'):C.sysID&&this.stream.write(' SYSTEM "'+C.sysID+'"'),C.nData&&this.stream.write(" NDATA "+C.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(C))},x.prototype.dtdNotation=function(C,D){return this.stream.write(this.space(D)+"<!NOTATION "+C.name),C.pubID&&C.sysID?this.stream.write(' PUBLIC "'+C.pubID+'" "'+C.sysID+'"'):C.pubID?this.stream.write(' PUBLIC "'+C.pubID+'"'):C.sysID&&this.stream.write(' SYSTEM "'+C.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(C))},x.prototype.endline=function(C){return C.isLastRootNode?"":this.newline},x})(p)}).call(g7e)),Q1.exports}var jV;function y7e(){return jV||(jV=1,(function(){var i,e,t,n,r,s,o;o=nu(),r=o.assign,s=o.isFunction,i=h7e(),e=p7e(),n=vP(),t=b7e(),Iu.create=function(a,l,c,d){var f,m;if(a==null)throw new Error("Root element needs a name.");return d=r({},l,c,d),f=new i(d),m=f.element(a),d.headless||(f.declaration(d),(d.pubID!=null||d.sysID!=null)&&f.doctype(d)),m},Iu.begin=function(a,l,c){var d;return s(a)&&(d=[a,l],l=d[0],c=d[1],a={}),l?new e(a,l,c):new i(a)},Iu.stringWriter=function(a){return new n(a)},Iu.streamWriter=function(a,l){return new t(a,l)}}).call(Iu)),Iu}var zV;function v7e(){if(zV)return lA;zV=1;var i=yi,e=y7e();lA.writeString=t;function t(r,s){var o=i.invert(s),a={element:c,text:n};function l(m,p){return a[p.type](m,p)}function c(m,p){var g=m.element(d(p.name),p.attributes);
484p.children.forEach(function(y){l(g,y)})}function d(m){var p=/^\{(.*)\}(.*)$/.exec(m);if(p){var g=o[p[1]];return g+(g===""?"":":")+p[2]}else return m}function f(m){var p=e.create(d(m.name),{version:"1.0",encoding:"UTF-8",standalone:!0});return i.forEach(s,function(g,y){var v="xmlns"+(y===""?"":":"+y);p.attribute(v,g)}),m.children.forEach(function(g){l(p,g)}),p.end()}return f(r)}function n(r,s){r.text(s.value)}return lA}var WV;function wP(){if(WV)return wc;WV=1;var i=WZ();return wc.Element=i.Element,wc.element=i.element,wc.emptyElement=i.emptyElement,wc.text=i.text,wc.readString=GMe().readString,wc.writeString=v7e().writeString,wc}var HV;function w7e(){if(HV)return ev;HV=1;var i=yi,e=tu(),t=wP();ev.read=r,ev.readXmlFromZipFile=s;var n={"http://schemas.openxmlformats.org/wordprocessingml/2006/main":"w","http://schemas.openxmlformats.org/officeDocument/2006/relationships":"r","http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing":"wp","http://schemas.openxmlformats.org/drawingml/2006/main":"a","http://schemas.openxmlformats.org/drawingml/2006/picture":"pic","http://purl.oclc.org/ooxml/wordprocessingml/main":"w","http://purl.oclc.org/ooxml/officeDocument/relationships":"r","http://purl.oclc.org/ooxml/drawingml/wordprocessingDrawing":"wp","http://purl.oclc.org/ooxml/drawingml/main":"a","http://purl.oclc.org/ooxml/drawingml/picture":"pic","http://schemas.openxmlformats.org/package/2006/content-types":"content-types","http://schemas.openxmlformats.org/package/2006/relationships":"relationships","http://schemas.openxmlformats.org/markup-compatibility/2006":"mc","urn:schemas-microsoft-com:vml":"v","urn:schemas-microsoft-com:office:word":"office-word","http://schemas.microsoft.com/office/word/2010/wordml":"wordml"};function r(l){return t.readString(l,n).then(function(c){return a(c)[0]})}function s(l,c){return l.exists(c)?l.read(c,"utf-8").then(o).then(r):e.resolve(null)}function o(l){return l.replace(/^\uFEFF/g,"")}function a(l){return l.type==="element"?l.name==="mc:AlternateContent"?l.firstOrEmpty("mc:Fallback").children:(l.children=i.flatten(l.children.map(a,!0)),[l]):[l]}return ev}var iv={},_o={},rv={},qV;function x7e(){if(qV)return rv;qV=1,Object.defineProperty(rv,"__esModule",{value:!0});var i
vendor: 119,105 bytes, line 484
484=[{"Typeface name":"Symbol","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Symbol","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"33","Unicode hex":"21"},{"Typeface name":"Symbol","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"8704","Unicode hex":"2200"},{"Typeface name":"Symbol","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"35","Unicode hex":"23"},{"Typeface name":"Symbol","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"8707","Unicode hex":"2203"},{"Typeface name":"Symbol","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"37","Unicode hex":"25"},{"Typeface name":"Symbol","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"38","Unicode hex":"26"},{"Typeface name":"Symbol","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"8717","Unicode hex":"220D"},{"Typeface name":"Symbol","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"40","Unicode hex":"28"},{"Typeface name":"Symbol","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"41","Unicode hex":"29"},{"Typeface name":"Symbol","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"42","Unicode hex":"2A"},{"Typeface name":"Symbol","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"43","Unicode hex":"2B"},{"Typeface name":"Symbol","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"44","Unicode hex":"2C"},{"Typeface name":"Symbol","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"8722","Unicode hex":"2212"},{"Typeface name":"Symbol","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"46","Unicode hex":"2E"},{"Typeface name":"Symbol","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"47","Unicode hex":"2F"},{"Typeface name":"Symbol","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"48","Unicode hex":"30"},{"Typeface name":"Symbol","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"49","Unicode hex":"31"},{"Typeface name":"Symbol","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"50","Unicode hex":"32"},{"Typeface name":"Symbol","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"51","Unicode hex":"33"},{"Typeface name":"Symbol","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"52","Unicode hex":"34"},{"Typeface name":"Symbol","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"53","Unicode hex":"35"},{"Typeface name":"Symbol","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"54","Unicode hex":"36"},{"Typeface name":"Symbol","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"55","Unicode hex":"37"},{"Typeface name":"Symbol","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"56","Unicode hex":"38"},{"Typeface name":"Symbol","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"57","Unicode hex":"39"},{"Typeface name":"Symbol","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"58","Unicode hex":"3A"},{"Typeface name":"Symbol","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"59","Unicode hex":"3B"},{"Typeface name":"Symbol","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"60","Unicode hex":"3C"},{"Typeface name":"Symbol","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"61","Unicode hex":"3D"},{"Typeface name":"Symbol","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"62","Unicode hex":"3E"},{"Typeface name":"Symbol","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"63","Unicode hex":"3F"},{"Typeface name":"Symbol","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"8773","Unicode hex":"2245"},{"Typeface name":"Symbol","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"913","Unicode hex":"391"},{"Typeface name":"Symbol","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"914","Unicode hex":"392"},{"Typeface name":"Symbol","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"935","Unicode hex":"3A7"},{"Typeface name":"Symbol","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"916","Unicode hex":"394"},{"Typeface name":"Symbol","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"917","Unicode hex":"395"},{"Typeface name":"Symbol","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"934","Unicode hex":"3A6"},{"Typeface name":"Symbol","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"915","Unicode hex":"393"},{"Typeface name":"Symbol","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"919","Unicode hex":"397"},{"Typeface name":"Symbol","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"921","Unicode hex":"399"},{"Typeface name":"Symbol","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"977","Unicode hex":"3D1"},{"Typeface name":"Symbol","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"922","Unicode hex":"39A"},{"Typeface name":"Symbol","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"923","Unicode hex":"39B"},{"Typeface name":"Symbol","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"924","Unicode hex":"39C"},{"Typeface name":"Symbol","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"925","Unicode hex":"39D"},{"Typeface name":"Symbol","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"927","Unicode hex":"39F"},{"Typeface name":"Symbol","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"928","Unicode hex":"3A0"},{"Typeface name":"Symbol","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"920","Unicode hex":"398"},{"Typeface name":"Symbol","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"929","Unicode hex":"3A1"},{"Typeface name":"Symbol","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"931","Unicode hex":"3A3"},{"Typeface name":"Symbol","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"932","Unicode hex":"3A4"},{"Typeface name":"Symbol","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"933","Unicode hex":"3A5"},{"Typeface name":"Symbol","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"962","Unicode hex":"3C2"},{"Typeface name":"Symbol","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"937","Unicode hex":"3A9"},{"Typeface name":"Symbol","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"926","Unicode hex":"39E"},{"Typeface name":"Symbol","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"936","Unicode hex":"3A8"},{"Typeface name":"Symbol","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"918","Unicode hex":"396"},{"Typeface name":"Symbol","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"91","Unicode hex":"5B"},{"Typeface name":"Symbol","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"8756","Unicode hex":"2234"},{"Typeface name":"Symbol","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"93","Unicode hex":"5D"},{"Typeface name":"Symbol","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"8869","Unicode hex":"22A5"},{"Typeface name":"Symbol","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"95","Unicode hex":"5F"},{"Typeface name":"Symbol","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"8254","Unicode hex":"203E"},{"Typeface name":"Symbol","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"945","Unicode hex":"3B1"},{"Typeface name":"Symbol","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"946","Unicode hex":"3B2"},{"Typeface name":"Symbol","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"967","Unicode hex":"3C7"},{"Typeface name":"Symbol","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"948","Unicode hex":"3B4"},{"Typeface name":"Symbol","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"949","Unicode hex":"3B5"},{"Typeface name":"Symbol","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"966","Unicode hex":"3C6"},{"Typeface name":"Symbol","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"947","Unicode hex":"3B3"},{"Typeface name":"Symbol","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"951","Unicode hex":"3B7"},{"Typeface name":"Symbol","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"953","Unicode hex":"3B9"},{"Typeface name":"Symbol","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"981","Unicode hex":"3D5"},{"Typeface name":"Symbol","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"954","Unicode hex":"3BA"},{"Typeface name":"Symbol","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"955","Unicode hex":"3BB"},{"Typeface name":"Symbol","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"956","Unicode hex":"3BC"},{"Typeface name":"Symbol","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"957","Unicode hex":"3BD"},{"Typeface name":"Symbol","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"959","Unicode hex":"3BF"},{"Typeface name":"Symbol","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"960","Unicode hex":"3C0"},{"Typeface name":"Symbol","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"952","Unicode hex":"3B8"},{"Typeface name":"Symbol","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"961","Unicode hex":"3C1"},{"Typeface name":"Symbol","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"963","Unicode hex":"3C3"},{"Typeface name":"Symbol","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"964","Unicode hex":"3C4"},{"Typeface name":"Symbol","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"965","Unicode hex":"3C5"},{"Typeface name":"Symbol","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"982","Unicode hex":"3D6"},{"Typeface name":"Symbol","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"969","Unicode hex":"3C9"},{"Typeface name":"Symbol","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"958","Unicode hex":"3BE"},{"Typeface name":"Symbol","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"968","Unicode hex":"3C8"},{"Typeface name":"Symbol","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"950","Unicode hex":"3B6"},{"Typeface name":"Symbol","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"123","Unicode hex":"7B"},{"Typeface name":"Symbol","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"124","Unicode hex":"7C"},{"Typeface name":"Symbol","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"125","Unicode hex":"7D"},{"Typeface name":"Symbol","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"126","Unicode hex":"7E"},{"Typeface name":"Symbol","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"8364","Unicode hex":"20AC"},{"Typeface name":"Symbol","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"978","Unicode hex":"3D2"},{"Typeface name":"Symbol","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"8242","Unicode hex":"2032"},{"Typeface name":"Symbol","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"8804","Unicode hex":"2264"},{"Typeface name":"Symbol","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"8260","Unicode hex":"2044"},{"Typeface name":"Symbol","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"8734","Unicode hex":"221E"},{"Typeface name":"Symbol","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"402","Unicode hex":"192"},{"Typeface name":"Symbol","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"9827","Unicode hex":"2663"},{"Typeface name":"Symbol","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"9830","Unicode hex":"2666"},{"Typeface name":"Symbol","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"9829","Unicode hex":"2665"},{"Typeface name":"Symbol","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"9824","Unicode hex":"2660"},{"Typeface name":"Symbol","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"8596","Unicode hex":"2194"},{"Typeface name":"Symbol","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"8592","Unicode hex":"2190"},{"Typeface name":"Symbol","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"8593","Unicode hex":"2191"},{"Typeface name":"Symbol","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"8594","Unicode hex":"2192"},{"Typeface name":"Symbol","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"8595","Unicode hex":"2193"},{"Typeface name":"Symbol","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"176","Unicode hex":"B0"},{"Typeface name":"Symbol","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"177","Unicode hex":"B1"},{"Typeface name":"Symbol","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"8243","Unicode hex":"2033"},{"Typeface name":"Symbol","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"8805","Unicode hex":"2265"},{"Typeface name":"Symbol","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"215","Unicode hex":"D7"},{"Typeface name":"Symbol","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"8733","Unicode hex":"221D"},{"Typeface name":"Symbol","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"8706","Unicode hex":"2202"},{"Typeface name":"Symbol","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"8226","Unicode hex":"2022"},{"Typeface name":"Symbol","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"247","Unicode hex":"F7"},{"Typeface name":"Symbol","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"8800","Unicode hex":"2260"},{"Typeface name":"Symbol","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"8801","Unicode hex":"2261"},{"Typeface name":"Symbol","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"8776","Unicode hex":"2248"},{"Typeface name":"Symbol","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"8230","Unicode hex":"2026"},{"Typeface name":"Symbol","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"9168","Unicode hex":"23D0"},{"Typeface name":"Symbol","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"9135","Unicode hex":"23AF"},{"Typeface name":"Symbol","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"8629","Unicode hex":"21B5"},{"Typeface name":"Symbol","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"8501","Unicode hex":"2135"},{"Typeface name":"Symbol","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"8465","Unicode hex":"2111"},{"Typeface name":"Symbol","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"8476","Unicode hex":"211C"},{"Typeface name":"Symbol","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"8472","Unicode hex":"2118"},{"Typeface name":"Symbol","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"8855","Unicode hex":"2297"},{"Typeface name":"Symbol","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"8853","Unicode hex":"2295"},{"Typeface name":"Symbol","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"8709","Unicode hex":"2205"},{"Typeface name":"Symbol","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"8745","Unicode hex":"2229"},{"Typeface name":"Symbol","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"8746","Unicode hex":"222A"},{"Typeface name":"Symbol","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"8835","Unicode hex":"2283"},{"Typeface name":"Symbol","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"8839","Unicode hex":"2287"},{"Typeface name":"Symbol","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"8836","Unicode hex":"2284"},{"Typeface name":"Symbol","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"8834","Unicode hex":"2282"},{"Typeface name":"Symbol","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"8838","Unicode hex":"2286"},{"Typeface name":"Symbol","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"8712","Unicode hex":"2208"},{"Typeface name":"Symbol","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"8713","Unicode hex":"2209"},{"Typeface name":"Symbol","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"8736","Unicode hex":"2220"},{"Typeface name":"Symbol","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"8711","Unicode hex":"2207"},{"Typeface name":"Symbol","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"174","Unicode hex":"AE"},{"Typeface name":"Symbol","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"169","Unicode hex":"A9"},{"Typeface name":"Symbol","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"8482","Unicode hex":"2122"},{"Typeface name":"Symbol","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"8719","Unicode hex":"220F"},{"Typeface name":"Symbol","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"8730","Unicode hex":"221A"},{"Typeface name":"Symbol","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"8901","Unicode hex":"22C5"},{"Typeface name":"Symbol","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"172","Unicode hex":"AC"},{"Typeface name":"Symbol","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"8743","Unicode hex":"2227"},{"Typeface name":"Symbol","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"8744","Unicode hex":"2228"},{"Typeface name":"Symbol","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"8660","Unicode hex":"21D4"},{"Typeface name":"Symbol","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"8656","Unicode hex":"21D0"},{"Typeface name":"Symbol","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"8657","Unicode hex":"21D1"},{"Typeface name":"Symbol","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"8658","Unicode hex":"21D2"},{"Typeface name":"Symbol","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"8659","Unicode hex":"21D3"},{"Typeface name":"Symbol","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"9674","Unicode hex":"25CA"},{"Typeface name":"Symbol","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"12296","Unicode hex":"3008"},{"Typeface name":"Symbol","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"174","Unicode hex":"AE"},{"Typeface name":"Symbol","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"169","Unicode hex":"A9"},{"Typeface name":"Symbol","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"8482","Unicode hex":"2122"},{"Typeface name":"Symbol","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"8721","Unicode hex":"2211"},{"Typeface name":"Symbol","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"9115","Unicode hex":"239B"},{"Typeface name":"Symbol","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"9116","Unicode hex":"239C"},{"Typeface name":"Symbol","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"9117","Unicode hex":"239D"},{"Typeface name":"Symbol","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"9121","Unicode hex":"23A1"},{"Typeface name":"Symbol","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"9122","Unicode hex":"23A2"},{"Typeface name":"Symbol","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"9123","Unicode hex":"23A3"},{"Typeface name":"Symbol","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"9127","Unicode hex":"23A7"},{"Typeface name":"Symbol","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"9128","Unicode hex":"23A8"},{"Typeface name":"Symbol","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"9129","Unicode hex":"23A9"},{"Typeface name":"Symbol","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"9130","Unicode hex":"23AA"},{"Typeface name":"Symbol","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"63743","Unicode hex":"F8FF"},{"Typeface name":"Symbol","Dingbat dec":"241","Dingbat hex":"F1","Unicode dec":"12297","Unicode hex":"3009"},{"Typeface name":"Symbol","Dingbat dec":"242","Dingbat hex":"F2","Unicode dec":"8747","Unicode hex":"222B"},{"Typeface name":"Symbol","Dingbat dec":"243","Dingbat hex":"F3","Unicode dec":"8992","Unicode hex":"2320"},{"Typeface name":"Symbol","Dingbat dec":"244","Dingbat hex":"F4","Unicode dec":"9134","Unicode hex":"23AE"},{"Typeface name":"Symbol","Dingbat dec":"245","Dingbat hex":"F5","Unicode dec":"8993","Unicode hex":"2321"},{"Typeface name":"Symbol","Dingbat dec":"246","Dingbat hex":"F6","Unicode dec":"9118","Unicode hex":"239E"},{"Typeface name":"Symbol","Dingbat dec":"247","Dingbat hex":"F7","Unicode dec":"9119","Unicode hex":"239F"},{"Typeface name":"Symbol","Dingbat dec":"248","Dingbat hex":"F8","Unicode dec":"9120","Unicode hex":"23A0"},{"Typeface name":"Symbol","Dingbat dec":"249","Dingbat hex":"F9","Unicode dec":"9124","Unicode hex":"23A4"},{"Typeface name":"Symbol","Dingbat dec":"250","Dingbat hex":"FA","Unicode dec":"9125","Unicode hex":"23A5"},{"Typeface name":"Symbol","Dingbat dec":"251","Dingbat hex":"FB","Unicode dec":"9126","Unicode hex":"23A6"},{"Typeface name":"Symbol","Dingbat dec":"252","Dingbat hex":"FC","Unicode dec":"9131","Unicode hex":"23AB"},{"Typeface name":"Symbol","Dingbat dec":"253","Dingbat hex":"FD","Unicode dec":"9132","Unicode hex":"23AC"},{"Typeface name":"Symbol","Dingbat dec":"254","Dingbat hex":"FE","Unicode dec":"9133","Unicode hex":"23AD"},{"Typeface name":"Webdings","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Webdings","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"128375","Unicode hex":"1F577"},{"Typeface name":"Webdings","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"128376","Unicode hex":"1F578"},{"Typeface name":"Webdings","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"128370","Unicode hex":"1F572"},{"Typeface name":"Webdings","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"128374","Unicode hex":"1F576"},{"Typeface name":"Webdings","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"127942","Unicode hex":"1F3C6"},{"Typeface name":"Webdings","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"127894","Unicode hex":"1F396"},{"Typeface name":"Webdings","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"128391","Unicode hex":"1F587"},{"Typeface name":"Webdings","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"128488","Unicode hex":"1F5E8"},{"Typeface name":"Webdings","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"128489","Unicode hex":"1F5E9"},{"Typeface name":"Webdings","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"128496","Unicode hex":"1F5F0"},{"Typeface name":"Webdings","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"128497","Unicode hex":"1F5F1"},{"Typeface name":"Webdings","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"127798","Unicode hex":"1F336"},{"Typeface name":"Webdings","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"127895","Unicode hex":"1F397"},{"Typeface name":"Webdings","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"128638","Unicode hex":"1F67E"},{"Typeface name":"Webdings","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"128636","Unicode hex":"1F67C"},{"Typeface name":"Webdings","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"128469","Unicode hex":"1F5D5"},{"Typeface name":"Webdings","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"128470","Unicode hex":"1F5D6"},{"Typeface name":"Webdings","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"128471","Unicode hex":"1F5D7"},{"Typeface name":"Webdings","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"9204","Unicode hex":"23F4"},{"Typeface name":"Webdings","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"9205","Unicode hex":"23F5"},{"Typeface name":"Webdings","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"9206","Unicode hex":"23F6"},{"Typeface name":"Webdings","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"9207","Unicode hex":"23F7"},{"Typeface name":"Webdings","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"9194","Unicode hex":"23EA"},{"Typeface name":"Webdings","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"9193","Unicode hex":"23E9"},{"Typeface name":"Webdings","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"9198","Unicode hex":"23EE"},{"Typeface name":"Webdings","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"9197","Unicode hex":"23ED"},{"Typeface name":"Webdings","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"9208","Unicode hex":"23F8"},{"Typeface name":"Webdings","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"9209","Unicode hex":"23F9"},{"Typeface name":"Webdings","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"9210","Unicode hex":"23FA"},{"Typeface name":"Webdings","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"128474","Unicode hex":"1F5DA"},{"Typeface name":"Webdings","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"128499","Unicode hex":"1F5F3"},{"Typeface name":"Webdings","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"128736","Unicode hex":"1F6E0"},{"Typeface name":"Webdings","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"127959","Unicode hex":"1F3D7"},{"Typeface name":"Webdings","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"127960","Unicode hex":"1F3D8"},{"Typeface name":"Webdings","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"127961","Unicode hex":"1F3D9"},{"Typeface name":"Webdings","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"127962","Unicode hex":"1F3DA"},{"Typeface name":"Webdings","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"127964","Unicode hex":"1F3DC"},{"Typeface name":"Webdings","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"127981","Unicode hex":"1F3ED"},{"Typeface name":"Webdings","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"127963","Unicode hex":"1F3DB"},{"Typeface name":"Webdings","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"127968","Unicode hex":"1F3E0"},{"Typeface name":"Webdings","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"127958","Unicode hex":"1F3D6"},{"Typeface name":"Webdings","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"127965","Unicode hex":"1F3DD"},{"Typeface name":"Webdings","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"128739","Unicode hex":"1F6E3"},{"Typeface name":"Webdings","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"128269","Unicode hex":"1F50D"},{"Typeface name":"Webdings","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"127956","Unicode hex":"1F3D4"},{"Typeface name":"Webdings","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"128065","Unicode hex":"1F441"},{"Typeface name":"Webdings","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"128066","Unicode hex":"1F442"},{"Typeface name":"Webdings","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"127966","Unicode hex":"1F3DE"},{"Typeface name":"Webdings","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"127957","Unicode hex":"1F3D5"},{"Typeface name":"Webdings","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"128740","Unicode hex":"1F6E4"},{"Typeface name":"Webdings","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"127967","Unicode hex":"1F3DF"},{"Typeface name":"Webdings","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"128755","Unicode hex":"1F6F3"},{"Typeface name":"Webdings","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"128364","Unicode hex":"1F56C"},{"Typeface name":"Webdings","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"128363","Unicode hex":"1F56B"},{"Typeface name":"Webdings","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"128360","Unicode hex":"1F568"},{"Typeface name":"Webdings","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"128264","Unicode hex":"1F508"},{"Typeface name":"Webdings","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"127892","Unicode hex":"1F394"},{"Typeface name":"Webdings","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"127893","Unicode hex":"1F395"},{"Typeface name":"Webdings","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"128492","Unicode hex":"1F5EC"},{"Typeface name":"Webdings","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"128637","Unicode hex":"1F67D"},{"Typeface name":"Webdings","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"128493","Unicode hex":"1F5ED"},{"Typeface name":"Webdings","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"128490","Unicode hex":"1F5EA"},{"Typeface name":"Webdings","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"128491","Unicode hex":"1F5EB"},{"Typeface name":"Webdings","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"11156","Unicode hex":"2B94"},{"Typeface name":"Webdings","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"10004","Unicode hex":"2714"},{"Typeface name":"Webdings","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"128690","Unicode hex":"1F6B2"},{"Typeface name":"Webdings","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"11036","Unicode hex":"2B1C"},{"Typeface name":"Webdings","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"128737","Unicode hex":"1F6E1"},{"Typeface name":"Webdings","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"128230","Unicode hex":"1F4E6"},{"Typeface name":"Webdings","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"128753","Unicode hex":"1F6F1"},{"Typeface name":"Webdings","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"11035","Unicode hex":"2B1B"},{"Typeface name":"Webdings","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"128657","Unicode hex":"1F691"},{"Typeface name":"Webdings","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"128712","Unicode hex":"1F6C8"},{"Typeface name":"Webdings","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"128745","Unicode hex":"1F6E9"},{"Typeface name":"Webdings","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"128752","Unicode hex":"1F6F0"},{"Typeface name":"Webdings","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"128968","Unicode hex":"1F7C8"},{"Typeface name":"Webdings","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"128372","Unicode hex":"1F574"},{"Typeface name":"Webdings","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"11044","Unicode hex":"2B24"},{"Typeface name":"Webdings","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"128741","Unicode hex":"1F6E5"},{"Typeface name":"Webdings","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"128660","Unicode hex":"1F694"},{"Typeface name":"Webdings","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"128472","Unicode hex":"1F5D8"},{"Typeface name":"Webdings","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"128473","Unicode hex":"1F5D9"},{"Typeface name":"Webdings","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"10067","Unicode hex":"2753"},{"Typeface name":"Webdings","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"128754","Unicode hex":"1F6F2"},{"Typeface name":"Webdings","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"128647","Unicode hex":"1F687"},{"Typeface name":"Webdings","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"128653","Unicode hex":"1F68D"},{"Typeface name":"Webdings","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"9971","Unicode hex":"26F3"},{"Typeface name":"Webdings","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"10680","Unicode hex":"29B8"},{"Typeface name":"Webdings","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"8854","Unicode hex":"2296"},{"Typeface name":"Webdings","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"128685","Unicode hex":"1F6AD"},{"Typeface name":"Webdings","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"128494","Unicode hex":"1F5EE"},{"Typeface name":"Webdings","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"9168","Unicode hex":"23D0"},{"Typeface name":"Webdings","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"128495","Unicode hex":"1F5EF"},{"Typeface name":"Webdings","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"128498","Unicode hex":"1F5F2"},{"Typeface name":"Webdings","Dingbat dec":"128","Dingbat hex":"80","Unicode dec":"128697","Unicode hex":"1F6B9"},{"Typeface name":"Webdings","Dingbat dec":"129","Dingbat hex":"81","Unicode dec":"128698","Unicode hex":"1F6BA"},{"Typeface name":"Webdings","Dingbat dec":"130","Dingbat hex":"82","Unicode dec":"128713","Unicode hex":"1F6C9"},{"Typeface name":"Webdings","Dingbat dec":"131","Dingbat hex":"83","Unicode dec":"128714","Unicode hex":"1F6CA"},{"Typeface name":"Webdings","Dingbat dec":"132","Dingbat hex":"84","Unicode dec":"128700","Unicode hex":"1F6BC"},{"Typeface name":"Webdings","Dingbat dec":"133","Dingbat hex":"85","Unicode dec":"128125","Unicode hex":"1F47D"},{"Typeface name":"Webdings","Dingbat dec":"134","Dingbat hex":"86","Unicode dec":"127947","Unicode hex":"1F3CB"},{"Typeface name":"Webdings","Dingbat dec":"135","Dingbat hex":"87","Unicode dec":"9975","Unicode hex":"26F7"},{"Typeface name":"Webdings","Dingbat dec":"136","Dingbat hex":"88","Unicode dec":"127938","Unicode hex":"1F3C2"},{"Typeface name":"Webdings","Dingbat dec":"137","Dingbat hex":"89","Unicode dec":"127948","Unicode hex":"1F3CC"},{"Typeface name":"Webdings","Dingbat dec":"138","Dingbat hex":"8A","Unicode dec":"127946","Unicode hex":"1F3CA"},{"Typeface name":"Webdings","Dingbat dec":"139","Dingbat hex":"8B","Unicode dec":"127940","Unicode hex":"1F3C4"},{"Typeface name":"Webdings","Dingbat dec":"140","Dingbat hex":"8C","Unicode dec":"127949","Unicode hex":"1F3CD"},{"Typeface name":"Webdings","Dingbat dec":"141","Dingbat hex":"8D","Unicode dec":"127950","Unicode hex":"1F3CE"},{"Typeface name":"Webdings","Dingbat dec":"142","Dingbat hex":"8E","Unicode dec":"128664","Unicode hex":"1F698"},{"Typeface name":"Webdings","Dingbat dec":"143","Dingbat hex":"8F","Unicode dec":"128480","Unicode hex":"1F5E0"},{"Typeface name":"Webdings","Dingbat dec":"144","Dingbat hex":"90","Unicode dec":"128738","Unicode hex":"1F6E2"},{"Typeface name":"Webdings","Dingbat dec":"145","Dingbat hex":"91","Unicode dec":"128176","Unicode hex":"1F4B0"},{"Typeface name":"Webdings","Dingbat dec":"146","Dingbat hex":"92","Unicode dec":"127991","Unicode hex":"1F3F7"},{"Typeface name":"Webdings","Dingbat dec":"147","Dingbat hex":"93","Unicode dec":"128179","Unicode hex":"1F4B3"},{"Typeface name":"Webdings","Dingbat dec":"148","Dingbat hex":"94","Unicode dec":"128106","Unicode hex":"1F46A"},{"Typeface name":"Webdings","Dingbat dec":"149","Dingbat hex":"95","Unicode dec":"128481","Unicode hex":"1F5E1"},{"Typeface name":"Webdings","Dingbat dec":"150","Dingbat hex":"96","Unicode dec":"128482","Unicode hex":"1F5E2"},{"Typeface name":"Webdings","Dingbat dec":"151","Dingbat hex":"97","Unicode dec":"128483","Unicode hex":"1F5E3"},{"Typeface name":"Webdings","Dingbat dec":"152","Dingbat hex":"98","Unicode dec":"10031","Unicode hex":"272F"},{"Typeface name":"Webdings","Dingbat dec":"153","Dingbat hex":"99","Unicode dec":"128388","Unicode hex":"1F584"},{"Typeface name":"Webdings","Dingbat dec":"154","Dingbat hex":"9A","Unicode dec":"128389","Unicode hex":"1F585"},{"Typeface name":"Webdings","Dingbat dec":"155","Dingbat hex":"9B","Unicode dec":"128387","Unicode hex":"1F583"},{"Typeface name":"Webdings","Dingbat dec":"156","Dingbat hex":"9C","Unicode dec":"128390","Unicode hex":"1F586"},{"Typeface name":"Webdings","Dingbat dec":"157","Dingbat hex":"9D","Unicode dec":"128441","Unicode hex":"1F5B9"},{"Typeface name":"Webdings","Dingbat dec":"158","Dingbat hex":"9E","Unicode dec":"128442","Unicode hex":"1F5BA"},{"Typeface name":"Webdings","Dingbat dec":"159","Dingbat hex":"9F","Unicode dec":"128443","Unicode hex":"1F5BB"},{"Typeface name":"Webdings","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"128373","Unicode hex":"1F575"},{"Typeface name":"Webdings","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"128368","Unicode hex":"1F570"},{"Typeface name":"Webdings","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"128445","Unicode hex":"1F5BD"},{"Typeface name":"Webdings","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"128446","Unicode hex":"1F5BE"},{"Typeface name":"Webdings","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"128203","Unicode hex":"1F4CB"},{"Typeface name":"Webdings","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"128466","Unicode hex":"1F5D2"},{"Typeface name":"Webdings","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"128467","Unicode hex":"1F5D3"},{"Typeface name":"Webdings","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"128366","Unicode hex":"1F56E"},{"Typeface name":"Webdings","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"128218","Unicode hex":"1F4DA"},{"Typeface name":"Webdings","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"128478","Unicode hex":"1F5DE"},{"Typeface name":"Webdings","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"128479","Unicode hex":"1F5DF"},{"Typeface name":"Webdings","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"128451","Unicode hex":"1F5C3"},{"Typeface name":"Webdings","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"128450","Unicode hex":"1F5C2"},{"Typeface name":"Webdings","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"128444","Unicode hex":"1F5BC"},{"Typeface name":"Webdings","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"127917","Unicode hex":"1F3AD"},{"Typeface name":"Webdings","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"127900","Unicode hex":"1F39C"},{"Typeface name":"Webdings","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"127896","Unicode hex":"1F398"},{"Typeface name":"Webdings","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"127897","Unicode hex":"1F399"},{"Typeface name":"Webdings","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"127911","Unicode hex":"1F3A7"},{"Typeface name":"Webdings","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"128191","Unicode hex":"1F4BF"},{"Typeface name":"Webdings","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"127902","Unicode hex":"1F39E"},{"Typeface name":"Webdings","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"128247","Unicode hex":"1F4F7"},{"Typeface name":"Webdings","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"127903","Unicode hex":"1F39F"},{"Typeface name":"Webdings","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"127916","Unicode hex":"1F3AC"},{"Typeface name":"Webdings","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"128253","Unicode hex":"1F4FD"},{"Typeface name":"Webdings","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"128249","Unicode hex":"1F4F9"},{"Typeface name":"Webdings","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"128254","Unicode hex":"1F4FE"},{"Typeface name":"Webdings","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"128251","Unicode hex":"1F4FB"},{"Typeface name":"Webdings","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"127898","Unicode hex":"1F39A"},{"Typeface name":"Webdings","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"127899","Unicode hex":"1F39B"},{"Typeface name":"Webdings","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"128250","Unicode hex":"1F4FA"},{"Typeface name":"Webdings","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"128187","Unicode hex":"1F4BB"},{"Typeface name":"Webdings","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"128421","Unicode hex":"1F5A5"},{"Typeface name":"Webdings","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"128422","Unicode hex":"1F5A6"},{"Typeface name":"Webdings","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"128423","Unicode hex":"1F5A7"},{"Typeface name":"Webdings","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"128377","Unicode hex":"1F579"},{"Typeface name":"Webdings","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"127918","Unicode hex":"1F3AE"},{"Typeface name":"Webdings","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"128379","Unicode hex":"1F57B"},{"Typeface name":"Webdings","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"128380","Unicode hex":"1F57C"},{"Typeface name":"Webdings","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"128223","Unicode hex":"1F4DF"},{"Typeface name":"Webdings","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"128385","Unicode hex":"1F581"},{"Typeface name":"Webdings","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"128384","Unicode hex":"1F580"},{"Typeface name":"Webdings","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"128424","Unicode hex":"1F5A8"},{"Typeface name":"Webdings","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"128425","Unicode hex":"1F5A9"},{"Typeface name":"Webdings","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"128447","Unicode hex":"1F5BF"},{"Typeface name":"Webdings","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"128426","Unicode hex":"1F5AA"},{"Typeface name":"Webdings","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"128476","Unicode hex":"1F5DC"},{"Typeface name":"Webdings","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"128274","Unicode hex":"1F512"},{"Typeface name":"Webdings","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"128275","Unicode hex":"1F513"},{"Typeface name":"Webdings","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"128477","Unicode hex":"1F5DD"},{"Typeface name":"Webdings","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"128229","Unicode hex":"1F4E5"},{"Typeface name":"Webdings","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"128228","Unicode hex":"1F4E4"},{"Typeface name":"Webdings","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"128371","Unicode hex":"1F573"},{"Typeface name":"Webdings","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"127779","Unicode hex":"1F323"},{"Typeface name":"Webdings","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"127780","Unicode hex":"1F324"},{"Typeface name":"Webdings","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"127781","Unicode hex":"1F325"},{"Typeface name":"Webdings","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"127782","Unicode hex":"1F326"},{"Typeface name":"Webdings","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"9729","Unicode hex":"2601"},{"Typeface name":"Webdings","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"127784","Unicode hex":"1F328"},{"Typeface name":"Webdings","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"127783","Unicode hex":"1F327"},{"Typeface name":"Webdings","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"127785","Unicode hex":"1F329"},{"Typeface name":"Webdings","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"127786","Unicode hex":"1F32A"},{"Typeface name":"Webdings","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"127788","Unicode hex":"1F32C"},{"Typeface name":"Webdings","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"127787","Unicode hex":"1F32B"},{"Typeface name":"Webdings","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"127772","Unicode hex":"1F31C"},{"Typeface name":"Webdings","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"127777","Unicode hex":"1F321"},{"Typeface name":"Webdings","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"128715","Unicode hex":"1F6CB"},{"Typeface name":"Webdings","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"128719","Unicode hex":"1F6CF"},{"Typeface name":"Webdings","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"127869","Unicode hex":"1F37D"},{"Typeface name":"Webdings","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"127864","Unicode hex":"1F378"},{"Typeface name":"Webdings","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"128718","Unicode hex":"1F6CE"},{"Typeface name":"Webdings","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"128717","Unicode hex":"1F6CD"},{"Typeface name":"Webdings","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"9413","Unicode hex":"24C5"},{"Typeface name":"Webdings","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"9855","Unicode hex":"267F"},{"Typeface name":"Webdings","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"128710","Unicode hex":"1F6C6"},{"Typeface name":"Webdings","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"128392","Unicode hex":"1F588"},{"Typeface name":"Webdings","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"127891","Unicode hex":"1F393"},{"Typeface name":"Webdings","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"128484","Unicode hex":"1F5E4"},{"Typeface name":"Webdings","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"128485","Unicode hex":"1F5E5"},{"Typeface name":"Webdings","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"128486","Unicode hex":"1F5E6"},{"Typeface name":"Webdings","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"128487","Unicode hex":"1F5E7"},{"Typeface name":"Webdings","Dingbat dec":"241","Dingbat hex":"F1","Unicode dec":"128746","Unicode hex":"1F6EA"},{"Typeface name":"Webdings","Dingbat dec":"242","Dingbat hex":"F2","Unicode dec":"128063","Unicode hex":"1F43F"},{"Typeface name":"Webdings","Dingbat dec":"243","Dingbat hex":"F3","Unicode dec":"128038","Unicode hex":"1F426"},{"Typeface name":"Webdings","Dingbat dec":"244","Dingbat hex":"F4","Unicode dec":"128031","Unicode hex":"1F41F"},{"Typeface name":"Webdings","Dingbat dec":"245","Dingbat hex":"F5","Unicode dec":"128021","Unicode hex":"1F415"},{"Typeface name":"Webdings","Dingbat dec":"246","Dingbat hex":"F6","Unicode dec":"128008","Unicode hex":"1F408"},{"Typeface name":"Webdings","Dingbat dec":"247","Dingbat hex":"F7","Unicode dec":"128620","Unicode hex":"1F66C"},{"Typeface name":"Webdings","Dingbat dec":"248","Dingbat hex":"F8","Unicode dec":"128622","Unicode hex":"1F66E"},{"Typeface name":"Webdings","Dingbat dec":"249","Dingbat hex":"F9","Unicode dec":"128621","Unicode hex":"1F66D"},{"Typeface name":"Webdings","Dingbat dec":"250","Dingbat hex":"FA","Unicode dec":"128623","Unicode hex":"1F66F"},{"Typeface name":"Webdings","Dingbat dec":"251","Dingbat hex":"FB","Unicode dec":"128506","Unicode hex":"1F5FA"},{"Typeface name":"Webdings","Dingbat dec":"252","Dingbat hex":"FC","Unicode dec":"127757","Unicode hex":"1F30D"},{"Typeface name":"Webdings","Dingbat dec":"253","Dingbat hex":"FD","Unicode dec":"127759","Unicode hex":"1F30F"},{"Typeface name":"Webdings","Dingbat dec":"254","Dingbat hex":"FE","Unicode dec":"127758","Unicode hex":"1F30E"},{"Typeface name":"Webdings","Dingbat dec":"255","Dingbat hex":"FF","Unicode dec":"128330","Unicode hex":"1F54A"},{"Typeface name":"Wingdings","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Wingdings","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"128393","Unicode hex":"1F589"},{"Typeface name":"Wingdings","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"9986","Unicode hex":"2702"},{"Typeface name":"Wingdings","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"9985","Unicode hex":"2701"},{"Typeface name":"Wingdings","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"128083","Unicode hex":"1F453"},{"Typeface name":"Wingdings","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"128365","Unicode hex":"1F56D"},{"Typeface name":"Wingdings","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"128366","Unicode hex":"1F56E"},{"Typeface name":"Wingdings","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"128367","Unicode hex":"1F56F"},{"Typeface name":"Wingdings","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"128383","Unicode hex":"1F57F"},{"Typeface name":"Wingdings","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"9990","Unicode hex":"2706"},{"Typeface name":"Wingdings","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"128386","Unicode hex":"1F582"},{"Typeface name":"Wingdings","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"128387","Unicode hex":"1F583"},{"Typeface name":"Wingdings","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"128234","Unicode hex":"1F4EA"},{"Typeface name":"Wingdings","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"128235","Unicode hex":"1F4EB"},{"Typeface name":"Wingdings","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"128236","Unicode hex":"1F4EC"},{"Typeface name":"Wingdings","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"128237","Unicode hex":"1F4ED"},{"Typeface name":"Wingdings","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"128448","Unicode hex":"1F5C0"},{"Typeface name":"Wingdings","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"128449","Unicode hex":"1F5C1"},{"Typeface name":"Wingdings","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"128462","Unicode hex":"1F5CE"},{"Typeface name":"Wingdings","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"128463","Unicode hex":"1F5CF"},{"Typeface name":"Wingdings","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"128464","Unicode hex":"1F5D0"},{"Typeface name":"Wingdings","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"128452","Unicode hex":"1F5C4"},{"Typeface name":"Wingdings","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"8987","Unicode hex":"231B"},{"Typeface name":"Wingdings","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"128430","Unicode hex":"1F5AE"},{"Typeface name":"Wingdings","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"128432","Unicode hex":"1F5B0"},{"Typeface name":"Wingdings","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"128434","Unicode hex":"1F5B2"},{"Typeface name":"Wingdings","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"128435","Unicode hex":"1F5B3"},{"Typeface name":"Wingdings","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"128436","Unicode hex":"1F5B4"},{"Typeface name":"Wingdings","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"128427","Unicode hex":"1F5AB"},{"Typeface name":"Wingdings","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"128428","Unicode hex":"1F5AC"},{"Typeface name":"Wingdings","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"9991","Unicode hex":"2707"},{"Typeface name":"Wingdings","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"9997","Unicode hex":"270D"},{"Typeface name":"Wingdings","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"128398","Unicode hex":"1F58E"},{"Typeface name":"Wingdings","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"9996","Unicode hex":"270C"},{"Typeface name":"Wingdings","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"128399","Unicode hex":"1F58F"},{"Typeface name":"Wingdings","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"128077","Unicode hex":"1F44D"},{"Typeface name":"Wingdings","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"128078","Unicode hex":"1F44E"},{"Typeface name":"Wingdings","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"9756","Unicode hex":"261C"},{"Typeface name":"Wingdings","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"9758","Unicode hex":"261E"},{"Typeface name":"Wingdings","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"9757","Unicode hex":"261D"},{"Typeface name":"Wingdings","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"9759","Unicode hex":"261F"},{"Typeface name":"Wingdings","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"128400","Unicode hex":"1F590"},{"Typeface name":"Wingdings","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"9786","Unicode hex":"263A"},{"Typeface name":"Wingdings","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"128528","Unicode hex":"1F610"},{"Typeface name":"Wingdings","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"9785","Unicode hex":"2639"},{"Typeface name":"Wingdings","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"128163","Unicode hex":"1F4A3"},{"Typeface name":"Wingdings","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"128369","Unicode hex":"1F571"},{"Typeface name":"Wingdings","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"127987","Unicode hex":"1F3F3"},{"Typeface name":"Wingdings","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"127985","Unicode hex":"1F3F1"},{"Typeface name":"Wingdings","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"9992","Unicode hex":"2708"},{"Typeface name":"Wingdings","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"9788","Unicode hex":"263C"},{"Typeface name":"Wingdings","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"127778","Unicode hex":"1F322"},{"Typeface name":"Wingdings","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"10052","Unicode hex":"2744"},{"Typeface name":"Wingdings","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"128326","Unicode hex":"1F546"},{"Typeface name":"Wingdings","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"10014","Unicode hex":"271E"},{"Typeface name":"Wingdings","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"128328","Unicode hex":"1F548"},{"Typeface name":"Wingdings","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"10016","Unicode hex":"2720"},{"Typeface name":"Wingdings","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"10017","Unicode hex":"2721"},{"Typeface name":"Wingdings","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"9770","Unicode hex":"262A"},{"Typeface name":"Wingdings","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"9775","Unicode hex":"262F"},{"Typeface name":"Wingdings","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"128329","Unicode hex":"1F549"},{"Typeface name":"Wingdings","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"9784","Unicode hex":"2638"},{"Typeface name":"Wingdings","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"9800","Unicode hex":"2648"},{"Typeface name":"Wingdings","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"9801","Unicode hex":"2649"},{"Typeface name":"Wingdings","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"9802","Unicode hex":"264A"},{"Typeface name":"Wingdings","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"9803","Unicode hex":"264B"},{"Typeface name":"Wingdings","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"9804","Unicode hex":"264C"},{"Typeface name":"Wingdings","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"9805","Unicode hex":"264D"},{"Typeface name":"Wingdings","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"9806","Unicode hex":"264E"},{"Typeface name":"Wingdings","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"9807","Unicode hex":"264F"},{"Typeface name":"Wingdings","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"9808","Unicode hex":"2650"},{"Typeface name":"Wingdings","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"9809","Unicode hex":"2651"},{"Typeface name":"Wingdings","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"9810","Unicode hex":"2652"},{"Typeface name":"Wingdings","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"9811","Unicode hex":"2653"},{"Typeface name":"Wingdings","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"128624","Unicode hex":"1F670"},{"Typeface name":"Wingdings","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"128629","Unicode hex":"1F675"},{"Typeface name":"Wingdings","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"9899","Unicode hex":"26AB"},{"Typeface name":"Wingdings","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"128318","Unicode hex":"1F53E"},{"Typeface name":"Wingdings","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"9724","Unicode hex":"25FC"},{"Typeface name":"Wingdings","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"128911","Unicode hex":"1F78F"},{"Typeface name":"Wingdings","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"128912","Unicode hex":"1F790"},{"Typeface name":"Wingdings","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"10065","Unicode hex":"2751"},{"Typeface name":"Wingdings","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"10066","Unicode hex":"2752"},{"Typeface name":"Wingdings","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"128927","Unicode hex":"1F79F"},{"Typeface name":"Wingdings","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"10731","Unicode hex":"29EB"},{"Typeface name":"Wingdings","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"9670","Unicode hex":"25C6"},{"Typeface name":"Wingdings","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"10070","Unicode hex":"2756"},{"Typeface name":"Wingdings","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"11049","Unicode hex":"2B29"},{"Typeface name":"Wingdings","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"8999","Unicode hex":"2327"},{"Typeface name":"Wingdings","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"11193","Unicode hex":"2BB9"},{"Typeface name":"Wingdings","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"8984","Unicode hex":"2318"},{"Typeface name":"Wingdings","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"127989","Unicode hex":"1F3F5"},{"Typeface name":"Wingdings","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"127990","Unicode hex":"1F3F6"},{"Typeface name":"Wingdings","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"128630","Unicode hex":"1F676"},{"Typeface name":"Wingdings","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"128631","Unicode hex":"1F677"},{"Typeface name":"Wingdings","Dingbat dec":"127","Dingbat hex":"7F","Unicode dec":"9647","Unicode hex":"25AF"},{"Typeface name":"Wingdings","Dingbat dec":"128","Dingbat hex":"80","Unicode dec":"127243","Unicode hex":"1F10B"},{"Typeface name":"Wingdings","Dingbat dec":"129","Dingbat hex":"81","Unicode dec":"10112","Unicode hex":"2780"},{"Typeface name":"Wingdings","Dingbat dec":"130","Dingbat hex":"82","Unicode dec":"10113","Unicode hex":"2781"},{"Typeface name":"Wingdings","Dingbat dec":"131","Dingbat hex":"83","Unicode dec":"10114","Unicode hex":"2782"},{"Typeface name":"Wingdings","Dingbat dec":"132","Dingbat hex":"84","Unicode dec":"10115","Unicode hex":"2783"},{"Typeface name":"Wingdings","Dingbat dec":"133","Dingbat hex":"85","Unicode dec":"10116","Unicode hex":"2784"},{"Typeface name":"Wingdings","Dingbat dec":"134","Dingbat hex":"86","Unicode dec":"10117","Unicode hex":"2785"},{"Typeface name":"Wingdings","Dingbat dec":"135","Dingbat hex":"87","Unicode dec":"10118","Unicode hex":"2786"},{"Typeface name":"Wingdings","Dingbat dec":"136","Dingbat hex":"88","Unicode dec":"10119","Unicode hex":"2787"},{"Typeface name":"Wingdings","Dingbat dec":"137","Dingbat hex":"89","Unicode dec":"10120","Unicode hex":"2788"},{"Typeface name":"Wingdings","Dingbat dec":"138","Dingbat hex":"8A","Unicode dec":"10121","Unicode hex":"2789"},{"Typeface name":"Wingdings","Dingbat dec":"139","Dingbat hex":"8B","Unicode dec":"127244","Unicode hex":"1F10C"},{"Typeface name":"Wingdings","Dingbat dec":"140","Dingbat hex":"8C","Unicode dec":"10122","Unicode hex":"278A"},{"Typeface name":"Wingdings","Dingbat dec":"141","Dingbat hex":"8D","Unicode dec":"10123","Unicode hex":"278B"},{"Typeface name":"Wingdings","Dingbat dec":"142","Dingbat hex":"8E","Unicode dec":"10124","Unicode hex":"278C"},{"Typeface name":"Wingdings","Dingbat dec":"143","Dingbat hex":"8F","Unicode dec":"10125","Unicode hex":"278D"},{"Typeface name":"Wingdings","Dingbat dec":"144","Dingbat hex":"90","Unicode dec":"10126","Unicode hex":"278E"},{"Typeface name":"Wingdings","Dingbat dec":"145","Dingbat hex":"91","Unicode dec":"10127","Unicode hex":"278F"},{"Typeface name":"Wingdings","Dingbat dec":"146","Dingbat hex":"92","Unicode dec":"10128","Unicode hex":"2790"},{"Typeface name":"Wingdings","Dingbat dec":"147","Dingbat hex":"93","Unicode dec":"10129","Unicode hex":"2791"},{"Typeface name":"Wingdings","Dingbat dec":"148","Dingbat hex":"94","Unicode dec":"10130","Unicode hex":"2792"},{"Typeface name":"Wingdings","Dingbat dec":"149","Dingbat hex":"95","Unicode dec":"10131","Unicode hex":"2793"},{"Typeface name":"Wingdings","Dingbat dec":"150","Dingbat hex":"96","Unicode dec":"128610","Unicode hex":"1F662"},{"Typeface name":"Wingdings","Dingbat dec":"151","Dingbat hex":"97","Unicode dec":"128608","Unicode hex":"1F660"},{"Typeface name":"Wingdings","Dingbat dec":"152","Dingbat hex":"98","Unicode dec":"128609","Unicode hex":"1F661"},{"Typeface name":"Wingdings","Dingbat dec":"153","Dingbat hex":"99","Unicode dec":"128611","Unicode hex":"1F663"},{"Typeface name":"Wingdings","Dingbat dec":"154","Dingbat hex":"9A","Unicode dec":"128606","Unicode hex":"1F65E"},{"Typeface name":"Wingdings","Dingbat dec":"155","Dingbat hex":"9B","Unicode dec":"128604","Unicode hex":"1F65C"},{"Typeface name":"Wingdings","Dingbat dec":"156","Dingbat hex":"9C","Unicode dec":"128605","Unicode hex":"1F65D"},{"Typeface name":"Wingdings","Dingbat dec":"157","Dingbat hex":"9D","Unicode dec":"128607","Unicode hex":"1F65F"},{"Typeface name":"Wingdings","Dingbat dec":"158","Dingbat hex":"9E","Unicode dec":"8729","Unicode hex":"2219"},{"Typeface name":"Wingdings","Dingbat dec":"159","Dingbat hex":"9F","Unicode dec":"8226","Unicode hex":"2022"},{"Typeface name":"Wingdings","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"11037","Unicode hex":"2B1D"},{"Typeface name":"Wingdings","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"11096","Unicode hex":"2B58"},{"Typeface name":"Wingdings","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"128902","Unicode hex":"1F786"},{"Typeface name":"Wingdings","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"128904","Unicode hex":"1F788"},{"Typeface name":"Wingdings","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"128906","Unicode hex":"1F78A"},{"Typeface name":"Wingdings","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"128907","Unicode hex":"1F78B"},{"Typeface name":"Wingdings","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"128319","Unicode hex":"1F53F"},{"Typeface name":"Wingdings","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"9642","Unicode hex":"25AA"},{"Typeface name":"Wingdings","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"128910","Unicode hex":"1F78E"},{"Typeface name":"Wingdings","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"128961","Unicode hex":"1F7C1"},{"Typeface name":"Wingdings","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"128965","Unicode hex":"1F7C5"},{"Typeface name":"Wingdings","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"9733","Unicode hex":"2605"},{"Typeface name":"Wingdings","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"128971","Unicode hex":"1F7CB"},{"Typeface name":"Wingdings","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"128975","Unicode hex":"1F7CF"},{"Typeface name":"Wingdings","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"128979","Unicode hex":"1F7D3"},{"Typeface name":"Wingdings","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"128977","Unicode hex":"1F7D1"},{"Typeface name":"Wingdings","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"11216","Unicode hex":"2BD0"},{"Typeface name":"Wingdings","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"8982","Unicode hex":"2316"},{"Typeface name":"Wingdings","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"11214","Unicode hex":"2BCE"},{"Typeface name":"Wingdings","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"11215","Unicode hex":"2BCF"},{"Typeface name":"Wingdings","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"11217","Unicode hex":"2BD1"},{"Typeface name":"Wingdings","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"10026","Unicode hex":"272A"},{"Typeface name":"Wingdings","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"10032","Unicode hex":"2730"},{"Typeface name":"Wingdings","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"128336","Unicode hex":"1F550"},{"Typeface name":"Wingdings","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"128337","Unicode hex":"1F551"},{"Typeface name":"Wingdings","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"128338","Unicode hex":"1F552"},{"Typeface name":"Wingdings","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"128339","Unicode hex":"1F553"},{"Typeface name":"Wingdings","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"128340","Unicode hex":"1F554"},{"Typeface name":"Wingdings","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"128341","Unicode hex":"1F555"},{"Typeface name":"Wingdings","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"128342","Unicode hex":"1F556"},{"Typeface name":"Wingdings","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"128343","Unicode hex":"1F557"},{"Typeface name":"Wingdings","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"128344","Unicode hex":"1F558"},{"Typeface name":"Wingdings","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"128345","Unicode hex":"1F559"},{"Typeface name":"Wingdings","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"128346","Unicode hex":"1F55A"},{"Typeface name":"Wingdings","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"128347","Unicode hex":"1F55B"},{"Typeface name":"Wingdings","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"11184","Unicode hex":"2BB0"},{"Typeface name":"Wingdings","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"11185","Unicode hex":"2BB1"},{"Typeface name":"Wingdings","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"11186","Unicode hex":"2BB2"},{"Typeface name":"Wingdings","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"11187","Unicode hex":"2BB3"},{"Typeface name":"Wingdings","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"11188","Unicode hex":"2BB4"},{"Typeface name":"Wingdings","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"11189","Unicode hex":"2BB5"},{"Typeface name":"Wingdings","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"11190","Unicode hex":"2BB6"},{"Typeface name":"Wingdings","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"11191","Unicode hex":"2BB7"},{"Typeface name":"Wingdings","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"128618","Unicode hex":"1F66A"},{"Typeface name":"Wingdings","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"128619","Unicode hex":"1F66B"},{"Typeface name":"Wingdings","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"128597","Unicode hex":"1F655"},{"Typeface name":"Wingdings","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"128596","Unicode hex":"1F654"},{"Typeface name":"Wingdings","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"128599","Unicode hex":"1F657"},{"Typeface name":"Wingdings","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"128598","Unicode hex":"1F656"},{"Typeface name":"Wingdings","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"128592","Unicode hex":"1F650"},{"Typeface name":"Wingdings","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"128593","Unicode hex":"1F651"},{"Typeface name":"Wingdings","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"128594","Unicode hex":"1F652"},{"Typeface name":"Wingdings","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"128595","Unicode hex":"1F653"},{"Typeface name":"Wingdings","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"9003","Unicode hex":"232B"},{"Typeface name":"Wingdings","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"8998","Unicode hex":"2326"},{"Typeface name":"Wingdings","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"11160","Unicode hex":"2B98"},{"Typeface name":"Wingdings","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"11162","Unicode hex":"2B9A"},{"Typeface name":"Wingdings","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"11161","Unicode hex":"2B99"},{"Typeface name":"Wingdings","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"11163","Unicode hex":"2B9B"},{"Typeface name":"Wingdings","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"11144","Unicode hex":"2B88"},{"Typeface name":"Wingdings","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"11146","Unicode hex":"2B8A"},{"Typeface name":"Wingdings","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"11145","Unicode hex":"2B89"},{"Typeface name":"Wingdings","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"11147","Unicode hex":"2B8B"},{"Typeface name":"Wingdings","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"129128","Unicode hex":"1F868"},{"Typeface name":"Wingdings","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"129130","Unicode hex":"1F86A"},{"Typeface name":"Wingdings","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"129129","Unicode hex":"1F869"},{"Typeface name":"Wingdings","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"129131","Unicode hex":"1F86B"},{"Typeface name":"Wingdings","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"129132","Unicode hex":"1F86C"},{"Typeface name":"Wingdings","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"129133","Unicode hex":"1F86D"},{"Typeface name":"Wingdings","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"129135","Unicode hex":"1F86F"},{"Typeface name":"Wingdings","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"129134","Unicode hex":"1F86E"},{"Typeface name":"Wingdings","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"129144","Unicode hex":"1F878"},{"Typeface name":"Wingdings","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"129146","Unicode hex":"1F87A"},{"Typeface name":"Wingdings","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"129145","Unicode hex":"1F879"},{"Typeface name":"Wingdings","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"129147","Unicode hex":"1F87B"},{"Typeface name":"Wingdings","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"129148","Unicode hex":"1F87C"},{"Typeface name":"Wingdings","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"129149","Unicode hex":"1F87D"},{"Typeface name":"Wingdings","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"129151","Unicode hex":"1F87F"},{"Typeface name":"Wingdings","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"129150","Unicode hex":"1F87E"},{"Typeface name":"Wingdings","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"8678","Unicode hex":"21E6"},{"Typeface name":"Wingdings","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"8680","Unicode hex":"21E8"},{"Typeface name":"Wingdings","Dingbat dec":"241","Dingbat hex":"F1","Unicode dec":"8679","Unicode hex":"21E7"},{"Typeface name":"Wingdings","Dingbat dec":"242","Dingbat hex":"F2","Unicode dec":"8681","Unicode hex":"21E9"},{"Typeface name":"Wingdings","Dingbat dec":"243","Dingbat hex":"F3","Unicode dec":"11012","Unicode hex":"2B04"},{"Typeface name":"Wingdings","Dingbat dec":"244","Dingbat hex":"F4","Unicode dec":"8691","Unicode hex":"21F3"},{"Typeface name":"Wingdings","Dingbat dec":"245","Dingbat hex":"F5","Unicode dec":"11009","Unicode hex":"2B01"},{"Typeface name":"Wingdings","Dingbat dec":"246","Dingbat hex":"F6","Unicode dec":"11008","Unicode hex":"2B00"},{"Typeface name":"Wingdings","Dingbat dec":"247","Dingbat hex":"F7","Unicode dec":"11011","Unicode hex":"2B03"},{"Typeface name":"Wingdings","Dingbat dec":"248","Dingbat hex":"F8","Unicode dec":"11010","Unicode hex":"2B02"},{"Typeface name":"Wingdings","Dingbat dec":"249","Dingbat hex":"F9","Unicode dec":"129196","Unicode hex":"1F8AC"},{"Typeface name":"Wingdings","Dingbat dec":"250","Dingbat hex":"FA","Unicode dec":"129197","Unicode hex":"1F8AD"},{"Typeface name":"Wingdings","Dingbat dec":"251","Dingbat hex":"FB","Unicode dec":"128502","Unicode hex":"1F5F6"},{"Typeface name":"Wingdings","Dingbat dec":"252","Dingbat hex":"FC","Unicode dec":"10003","Unicode hex":"2713"},{"Typeface name":"Wingdings","Dingbat dec":"253","Dingbat hex":"FD","Unicode dec":"128503","Unicode hex":"1F5F7"},{"Typeface name":"Wingdings","Dingbat dec":"254","Dingbat hex":"FE","Unicode dec":"128505","Unicode hex":"1F5F9"},{"Typeface name":"Wingdings 2","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Wingdings 2","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"128394","Unicode hex":"1F58A"},{"Typeface name":"Wingdings 2","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"128395","Unicode hex":"1F58B"},{"Typeface name":"Wingdings 2","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"128396","Unicode hex":"1F58C"},{"Typeface name":"Wingdings 2","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"128397","Unicode hex":"1F58D"},{"Typeface name":"Wingdings 2","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"9988","Unicode hex":"2704"},{"Typeface name":"Wingdings 2","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"9984","Unicode hex":"2700"},{"Typeface name":"Wingdings 2","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"128382","Unicode hex":"1F57E"},{"Typeface name":"Wingdings 2","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"128381","Unicode hex":"1F57D"},{"Typeface name":"Wingdings 2","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"128453","Unicode hex":"1F5C5"},{"Typeface name":"Wingdings 2","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"128454","Unicode hex":"1F5C6"},{"Typeface name":"Wingdings 2","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"128455","Unicode hex":"1F5C7"},{"Typeface name":"Wingdings 2","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"128456","Unicode hex":"1F5C8"},{"Typeface name":"Wingdings 2","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"128457","Unicode hex":"1F5C9"},{"Typeface name":"Wingdings 2","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"128458","Unicode hex":"1F5CA"},{"Typeface name":"Wingdings 2","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"128459","Unicode hex":"1F5CB"},{"Typeface name":"Wingdings 2","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"128460","Unicode hex":"1F5CC"},{"Typeface name":"Wingdings 2","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"128461","Unicode hex":"1F5CD"},{"Typeface name":"Wingdings 2","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"128203","Unicode hex":"1F4CB"},{"Typeface name":"Wingdings 2","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"128465","Unicode hex":"1F5D1"},{"Typeface name":"Wingdings 2","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"128468","Unicode hex":"1F5D4"},{"Typeface name":"Wingdings 2","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"128437","Unicode hex":"1F5B5"},{"Typeface name":"Wingdings 2","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"128438","Unicode hex":"1F5B6"},{"Typeface name":"Wingdings 2","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"128439","Unicode hex":"1F5B7"},{"Typeface name":"Wingdings 2","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"128440","Unicode hex":"1F5B8"},{"Typeface name":"Wingdings 2","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"128429","Unicode hex":"1F5AD"},{"Typeface name":"Wingdings 2","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"128431","Unicode hex":"1F5AF"},{"Typeface name":"Wingdings 2","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"128433","Unicode hex":"1F5B1"},{"Typeface name":"Wingdings 2","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"128402","Unicode hex":"1F592"},{"Typeface name":"Wingdings 2","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"128403","Unicode hex":"1F593"},{"Typeface name":"Wingdings 2","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"128408","Unicode hex":"1F598"},{"Typeface name":"Wingdings 2","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"128409","Unicode hex":"1F599"},{"Typeface name":"Wingdings 2","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"128410","Unicode hex":"1F59A"},{"Typeface name":"Wingdings 2","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"128411","Unicode hex":"1F59B"},{"Typeface name":"Wingdings 2","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"128072","Unicode hex":"1F448"},{"Typeface name":"Wingdings 2","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"128073","Unicode hex":"1F449"},{"Typeface name":"Wingdings 2","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"128412","Unicode hex":"1F59C"},{"Typeface name":"Wingdings 2","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"128413","Unicode hex":"1F59D"},{"Typeface name":"Wingdings 2","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"128414","Unicode hex":"1F59E"},{"Typeface name":"Wingdings 2","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"128415","Unicode hex":"1F59F"},{"Typeface name":"Wingdings 2","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"128416","Unicode hex":"1F5A0"},{"Typeface name":"Wingdings 2","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"128417","Unicode hex":"1F5A1"},{"Typeface name":"Wingdings 2","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"128070","Unicode hex":"1F446"},{"Typeface name":"Wingdings 2","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"128071","Unicode hex":"1F447"},{"Typeface name":"Wingdings 2","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"128418","Unicode hex":"1F5A2"},{"Typeface name":"Wingdings 2","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"128419","Unicode hex":"1F5A3"},{"Typeface name":"Wingdings 2","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"128401","Unicode hex":"1F591"},{"Typeface name":"Wingdings 2","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"128500","Unicode hex":"1F5F4"},{"Typeface name":"Wingdings 2","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"128504","Unicode hex":"1F5F8"},{"Typeface name":"Wingdings 2","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"128501","Unicode hex":"1F5F5"},{"Typeface name":"Wingdings 2","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"9745","Unicode hex":"2611"},{"Typeface name":"Wingdings 2","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"11197","Unicode hex":"2BBD"},{"Typeface name":"Wingdings 2","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"9746","Unicode hex":"2612"},{"Typeface name":"Wingdings 2","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"11198","Unicode hex":"2BBE"},{"Typeface name":"Wingdings 2","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"11199","Unicode hex":"2BBF"},{"Typeface name":"Wingdings 2","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"128711","Unicode hex":"1F6C7"},{"Typeface name":"Wingdings 2","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"10680","Unicode hex":"29B8"},{"Typeface name":"Wingdings 2","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"128625","Unicode hex":"1F671"},{"Typeface name":"Wingdings 2","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"128628","Unicode hex":"1F674"},{"Typeface name":"Wingdings 2","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"128626","Unicode hex":"1F672"},{"Typeface name":"Wingdings 2","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"128627","Unicode hex":"1F673"},{"Typeface name":"Wingdings 2","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"8253","Unicode hex":"203D"},{"Typeface name":"Wingdings 2","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"128633","Unicode hex":"1F679"},{"Typeface name":"Wingdings 2","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"128634","Unicode hex":"1F67A"},{"Typeface name":"Wingdings 2","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"128635","Unicode hex":"1F67B"},{"Typeface name":"Wingdings 2","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"128614","Unicode hex":"1F666"},{"Typeface name":"Wingdings 2","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"128612","Unicode hex":"1F664"},{"Typeface name":"Wingdings 2","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"128613","Unicode hex":"1F665"},{"Typeface name":"Wingdings 2","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"128615","Unicode hex":"1F667"},{"Typeface name":"Wingdings 2","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"128602","Unicode hex":"1F65A"},{"Typeface name":"Wingdings 2","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"128600","Unicode hex":"1F658"},{"Typeface name":"Wingdings 2","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"128601","Unicode hex":"1F659"},{"Typeface name":"Wingdings 2","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"128603","Unicode hex":"1F65B"},{"Typeface name":"Wingdings 2","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"9450","Unicode hex":"24EA"},{"Typeface name":"Wingdings 2","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"9312","Unicode hex":"2460"},{"Typeface name":"Wingdings 2","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"9313","Unicode hex":"2461"},{"Typeface name":"Wingdings 2","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"9314","Unicode hex":"2462"},{"Typeface name":"Wingdings 2","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"9315","Unicode hex":"2463"},{"Typeface name":"Wingdings 2","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"9316","Unicode hex":"2464"},{"Typeface name":"Wingdings 2","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"9317","Unicode hex":"2465"},{"Typeface name":"Wingdings 2","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"9318","Unicode hex":"2466"},{"Typeface name":"Wingdings 2","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"9319","Unicode hex":"2467"},{"Typeface name":"Wingdings 2","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"9320","Unicode hex":"2468"},{"Typeface name":"Wingdings 2","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"9321","Unicode hex":"2469"},{"Typeface name":"Wingdings 2","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"9471","Unicode hex":"24FF"},{"Typeface name":"Wingdings 2","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"10102","Unicode hex":"2776"},{"Typeface name":"Wingdings 2","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"10103","Unicode hex":"2777"},{"Typeface name":"Wingdings 2","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"10104","Unicode hex":"2778"},{"Typeface name":"Wingdings 2","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"10105","Unicode hex":"2779"},{"Typeface name":"Wingdings 2","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"10106","Unicode hex":"277A"},{"Typeface name":"Wingdings 2","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"10107","Unicode hex":"277B"},{"Typeface name":"Wingdings 2","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"10108","Unicode hex":"277C"},{"Typeface name":"Wingdings 2","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"10109","Unicode hex":"277D"},{"Typeface name":"Wingdings 2","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"10110","Unicode hex":"277E"},{"Typeface name":"Wingdings 2","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"10111","Unicode hex":"277F"},{"Typeface name":"Wingdings 2","Dingbat dec":"128","Dingbat hex":"80","Unicode dec":"9737","Unicode hex":"2609"},{"Typeface name":"Wingdings 2","Dingbat dec":"129","Dingbat hex":"81","Unicode dec":"127765","Unicode hex":"1F315"},{"Typeface name":"Wingdings 2","Dingbat dec":"130","Dingbat hex":"82","Unicode dec":"9789","Unicode hex":"263D"},{"Typeface name":"Wingdings 2","Dingbat dec":"131","Dingbat hex":"83","Unicode dec":"9790","Unicode hex":"263E"},{"Typeface name":"Wingdings 2","Dingbat dec":"132","Dingbat hex":"84","Unicode dec":"11839","Unicode hex":"2E3F"},{"Typeface name":"Wingdings 2","Dingbat dec":"133","Dingbat hex":"85","Unicode dec":"10013","Unicode hex":"271D"},{"Typeface name":"Wingdings 2","Dingbat dec":"134","Dingbat hex":"86","Unicode dec":"128327","Unicode hex":"1F547"},{"Typeface name":"Wingdings 2","Dingbat dec":"135","Dingbat hex":"87","Unicode dec":"128348","Unicode hex":"1F55C"},{"Typeface name":"Wingdings 2","Dingbat dec":"136","Dingbat hex":"88","Unicode dec":"128349","Unicode hex":"1F55D"},{"Typeface name":"Wingdings 2","Dingbat dec":"137","Dingbat hex":"89","Unicode dec":"128350","Unicode hex":"1F55E"},{"Typeface name":"Wingdings 2","Dingbat dec":"138","Dingbat hex":"8A","Unicode dec":"128351","Unicode hex":"1F55F"},{"Typeface name":"Wingdings 2","Dingbat dec":"139","Dingbat hex":"8B","Unicode dec":"128352","Unicode hex":"1F560"},{"Typeface name":"Wingdings 2","Dingbat dec":"140","Dingbat hex":"8C","Unicode dec":"128353","Unicode hex":"1F561"},{"Typeface name":"Wingdings 2","Dingbat dec":"141","Dingbat hex":"8D","Unicode dec":"128354","Unicode hex":"1F562"},{"Typeface name":"Wingdings 2","Dingbat dec":"142","Dingbat hex":"8E","Unicode dec":"128355","Unicode hex":"1F563"},{"Typeface name":"Wingdings 2","Dingbat dec":"143","Dingbat hex":"8F","Unicode dec":"128356","Unicode hex":"1F564"},{"Typeface name":"Wingdings 2","Dingbat dec":"144","Dingbat hex":"90","Unicode dec":"128357","Unicode hex":"1F565"},{"Typeface name":"Wingdings 2","Dingbat dec":"145","Dingbat hex":"91","Unicode dec":"128358","Unicode hex":"1F566"},{"Typeface name":"Wingdings 2","Dingbat dec":"146","Dingbat hex":"92","Unicode dec":"128359","Unicode hex":"1F567"},{"Typeface name":"Wingdings 2","Dingbat dec":"147","Dingbat hex":"93","Unicode dec":"128616","Unicode hex":"1F668"},{"Typeface name":"Wingdings 2","Dingbat dec":"148","Dingbat hex":"94","Unicode dec":"128617","Unicode hex":"1F669"},{"Typeface name":"Wingdings 2","Dingbat dec":"149","Dingbat hex":"95","Unicode dec":"8901","Unicode hex":"22C5"},{"Typeface name":"Wingdings 2","Dingbat dec":"150","Dingbat hex":"96","Unicode dec":"128900","Unicode hex":"1F784"},{"Typeface name":"Wingdings 2","Dingbat dec":"151","Dingbat hex":"97","Unicode dec":"10625","Unicode hex":"2981"},{"Typeface name":"Wingdings 2","Dingbat dec":"152","Dingbat hex":"98","Unicode dec":"9679","Unicode hex":"25CF"},{"Typeface name":"Wingdings 2","Dingbat dec":"153","Dingbat hex":"99","Unicode dec":"9675","Unicode hex":"25CB"},{"Typeface name":"Wingdings 2","Dingbat dec":"154","Dingbat hex":"9A","Unicode dec":"128901","Unicode hex":"1F785"},{"Typeface name":"Wingdings 2","Dingbat dec":"155","Dingbat hex":"9B","Unicode dec":"128903","Unicode hex":"1F787"},{"Typeface name":"Wingdings 2","Dingbat dec":"156","Dingbat hex":"9C","Unicode dec":"128905","Unicode hex":"1F789"},{"Typeface name":"Wingdings 2","Dingbat dec":"157","Dingbat hex":"9D","Unicode dec":"8857","Unicode hex":"2299"},{"Typeface name":"Wingdings 2","Dingbat dec":"158","Dingbat hex":"9E","Unicode dec":"10687","Unicode hex":"29BF"},{"Typeface name":"Wingdings 2","Dingbat dec":"159","Dingbat hex":"9F","Unicode dec":"128908","Unicode hex":"1F78C"},{"Typeface name":"Wingdings 2","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"128909","Unicode hex":"1F78D"},{"Typeface name":"Wingdings 2","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"9726","Unicode hex":"25FE"},{"Typeface name":"Wingdings 2","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"9632","Unicode hex":"25A0"},{"Typeface name":"Wingdings 2","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"9633","Unicode hex":"25A1"},{"Typeface name":"Wingdings 2","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"128913","Unicode hex":"1F791"},{"Typeface name":"Wingdings 2","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"128914","Unicode hex":"1F792"},{"Typeface name":"Wingdings 2","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"128915","Unicode hex":"1F793"},{"Typeface name":"Wingdings 2","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"128916","Unicode hex":"1F794"},{"Typeface name":"Wingdings 2","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"9635","Unicode hex":"25A3"},{"Typeface name":"Wingdings 2","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"128917","Unicode hex":"1F795"},{"Typeface name":"Wingdings 2","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"128918","Unicode hex":"1F796"},{"Typeface name":"Wingdings 2","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"128919","Unicode hex":"1F797"},{"Typeface name":"Wingdings 2","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"128920","Unicode hex":"1F798"},{"Typeface name":"Wingdings 2","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"11049","Unicode hex":"2B29"},{"Typeface name":"Wingdings 2","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"11045","Unicode hex":"2B25"},{"Typeface name":"Wingdings 2","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"9671","Unicode hex":"25C7"},{"Typeface name":"Wingdings 2","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"128922","Unicode hex":"1F79A"},{"Typeface name":"Wingdings 2","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"9672","Unicode hex":"25C8"},{"Typeface name":"Wingdings 2","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"128923","Unicode hex":"1F79B"},{"Typeface name":"Wingdings 2","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"128924","Unicode hex":"1F79C"},{"Typeface name":"Wingdings 2","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"128925","Unicode hex":"1F79D"},{"Typeface name":"Wingdings 2","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"128926","Unicode hex":"1F79E"},{"Typeface name":"Wingdings 2","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"11050","Unicode hex":"2B2A"},{"Typeface name":"Wingdings 2","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"11047","Unicode hex":"2B27"},{"Typeface name":"Wingdings 2","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"9674","Unicode hex":"25CA"},{"Typeface name":"Wingdings 2","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"128928","Unicode hex":"1F7A0"},{"Typeface name":"Wingdings 2","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"9686","Unicode hex":"25D6"},{"Typeface name":"Wingdings 2","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"9687","Unicode hex":"25D7"},{"Typeface name":"Wingdings 2","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"11210","Unicode hex":"2BCA"},{"Typeface name":"Wingdings 2","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"11211","Unicode hex":"2BCB"},{"Typeface name":"Wingdings 2","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"11200","Unicode hex":"2BC0"},{"Typeface name":"Wingdings 2","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"11201","Unicode hex":"2BC1"},{"Typeface name":"Wingdings 2","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"11039","Unicode hex":"2B1F"},{"Typeface name":"Wingdings 2","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"11202","Unicode hex":"2BC2"},{"Typeface name":"Wingdings 2","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"11043","Unicode hex":"2B23"},{"Typeface name":"Wingdings 2","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"11042","Unicode hex":"2B22"},{"Typeface name":"Wingdings 2","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"11203","Unicode hex":"2BC3"},{"Typeface name":"Wingdings 2","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"11204","Unicode hex":"2BC4"},{"Typeface name":"Wingdings 2","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"128929","Unicode hex":"1F7A1"},{"Typeface name":"Wingdings 2","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"128930","Unicode hex":"1F7A2"},{"Typeface name":"Wingdings 2","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"128931","Unicode hex":"1F7A3"},{"Typeface name":"Wingdings 2","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"128932","Unicode hex":"1F7A4"},{"Typeface name":"Wingdings 2","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"128933","Unicode hex":"1F7A5"},{"Typeface name":"Wingdings 2","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"128934","Unicode hex":"1F7A6"},{"Typeface name":"Wingdings 2","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"128935","Unicode hex":"1F7A7"},{"Typeface name":"Wingdings 2","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"128936","Unicode hex":"1F7A8"},{"Typeface name":"Wingdings 2","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"128937","Unicode hex":"1F7A9"},{"Typeface name":"Wingdings 2","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"128938","Unicode hex":"1F7AA"},{"Typeface name":"Wingdings 2","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"128939","Unicode hex":"1F7AB"},{"Typeface name":"Wingdings 2","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"128940","Unicode hex":"1F7AC"},{"Typeface name":"Wingdings 2","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"128941","Unicode hex":"1F7AD"},{"Typeface name":"Wingdings 2","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"128942","Unicode hex":"1F7AE"},{"Typeface name":"Wingdings 2","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"128943","Unicode hex":"1F7AF"},{"Typeface name":"Wingdings 2","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"128944","Unicode hex":"1F7B0"},{"Typeface name":"Wingdings 2","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"128945","Unicode hex":"1F7B1"},{"Typeface name":"Wingdings 2","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"128946","Unicode hex":"1F7B2"},{"Typeface name":"Wingdings 2","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"128947","Unicode hex":"1F7B3"},{"Typeface name":"Wingdings 2","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"128948","Unicode hex":"1F7B4"},{"Typeface name":"Wingdings 2","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"128949","Unicode hex":"1F7B5"},{"Typeface name":"Wingdings 2","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"128950","Unicode hex":"1F7B6"},{"Typeface name":"Wingdings 2","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"128951","Unicode hex":"1F7B7"},{"Typeface name":"Wingdings 2","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"128952","Unicode hex":"1F7B8"},{"Typeface name":"Wingdings 2","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"128953","Unicode hex":"1F7B9"},{"Typeface name":"Wingdings 2","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"128954","Unicode hex":"1F7BA"},{"Typeface name":"Wingdings 2","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"128955","Unicode hex":"1F7BB"},{"Typeface name":"Wingdings 2","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"128956","Unicode hex":"1F7BC"},{"Typeface name":"Wingdings 2","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"128957","Unicode hex":"1F7BD"},{"Typeface name":"Wingdings 2","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"128958","Unicode hex":"1F7BE"},{"Typeface name":"Wingdings 2","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"128959","Unicode hex":"1F7BF"},{"Typeface name":"Wingdings 2","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"128960","Unicode hex":"1F7C0"},{"Typeface name":"Wingdings 2","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"128962","Unicode hex":"1F7C2"},{"Typeface name":"Wingdings 2","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"128964","Unicode hex":"1F7C4"},{"Typeface name":"Wingdings 2","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"128966","Unicode hex":"1F7C6"},{"Typeface name":"Wingdings 2","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"128969","Unicode hex":"1F7C9"},{"Typeface name":"Wingdings 2","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"128970","Unicode hex":"1F7CA"},{"Typeface name":"Wingdings 2","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"10038","Unicode hex":"2736"},{"Typeface name":"Wingdings 2","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"128972","Unicode hex":"1F7CC"},{"Typeface name":"Wingdings 2","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"128974","Unicode hex":"1F7CE"},{"Typeface name":"Wingdings 2","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"128976","Unicode hex":"1F7D0"},{"Typeface name":"Wingdings 2","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"128978","Unicode hex":"1F7D2"},{"Typeface name":"Wingdings 2","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"10041","Unicode hex":"2739"},{"Typeface name":"Wingdings 2","Dingbat dec":"241","Dingbat hex":"F1","Unicode dec":"128963","Unicode hex":"1F7C3"},{"Typeface name":"Wingdings 2","Dingbat dec":"242","Dingbat hex":"F2","Unicode dec":"128967","Unicode hex":"1F7C7"},{"Typeface name":"Wingdings 2","Dingbat dec":"243","Dingbat hex":"F3","Unicode dec":"10031","Unicode hex":"272F"},{"Typeface name":"Wingdings 2","Dingbat dec":"244","Dingbat hex":"F4","Unicode dec":"128973","Unicode hex":"1F7CD"},{"Typeface name":"Wingdings 2","Dingbat dec":"245","Dingbat hex":"F5","Unicode dec":"128980","Unicode hex":"1F7D4"},{"Typeface name":"Wingdings 2","Dingbat dec":"246","Dingbat hex":"F6","Unicode dec":"11212","Unicode hex":"2BCC"},{"Typeface name":"Wingdings 2","Dingbat dec":"247","Dingbat hex":"F7","Unicode dec":"11213","Unicode hex":"2BCD"},{"Typeface name":"Wingdings 2","Dingbat dec":"248","Dingbat hex":"F8","Unicode dec":"8251","Unicode hex":"203B"},{"Typeface name":"Wingdings 2","Dingbat dec":"249","Dingbat hex":"F9","Unicode dec":"8258","Unicode hex":"2042"},{"Typeface name":"Wingdings 3","Dingbat dec":"32","Dingbat hex":"20","Unicode dec":"32","Unicode hex":"20"},{"Typeface name":"Wingdings 3","Dingbat dec":"33","Dingbat hex":"21","Unicode dec":"11104","Unicode hex":"2B60"},{"Typeface name":"Wingdings 3","Dingbat dec":"34","Dingbat hex":"22","Unicode dec":"11106","Unicode hex":"2B62"},{"Typeface name":"Wingdings 3","Dingbat dec":"35","Dingbat hex":"23","Unicode dec":"11105","Unicode hex":"2B61"},{"Typeface name":"Wingdings 3","Dingbat dec":"36","Dingbat hex":"24","Unicode dec":"11107","Unicode hex":"2B63"},{"Typeface name":"Wingdings 3","Dingbat dec":"37","Dingbat hex":"25","Unicode dec":"11110","Unicode hex":"2B66"},{"Typeface name":"Wingdings 3","Dingbat dec":"38","Dingbat hex":"26","Unicode dec":"11111","Unicode hex":"2B67"},{"Typeface name":"Wingdings 3","Dingbat dec":"39","Dingbat hex":"27","Unicode dec":"11113","Unicode hex":"2B69"},{"Typeface name":"Wingdings 3","Dingbat dec":"40","Dingbat hex":"28","Unicode dec":"11112","Unicode hex":"2B68"},{"Typeface name":"Wingdings 3","Dingbat dec":"41","Dingbat hex":"29","Unicode dec":"11120","Unicode hex":"2B70"},{"Typeface name":"Wingdings 3","Dingbat dec":"42","Dingbat hex":"2A","Unicode dec":"11122","Unicode hex":"2B72"},{"Typeface name":"Wingdings 3","Dingbat dec":"43","Dingbat hex":"2B","Unicode dec":"11121","Unicode hex":"2B71"},{"Typeface name":"Wingdings 3","Dingbat dec":"44","Dingbat hex":"2C","Unicode dec":"11123","Unicode hex":"2B73"},{"Typeface name":"Wingdings 3","Dingbat dec":"45","Dingbat hex":"2D","Unicode dec":"11126","Unicode hex":"2B76"},{"Typeface name":"Wingdings 3","Dingbat dec":"46","Dingbat hex":"2E","Unicode dec":"11128","Unicode hex":"2B78"},{"Typeface name":"Wingdings 3","Dingbat dec":"47","Dingbat hex":"2F","Unicode dec":"11131","Unicode hex":"2B7B"},{"Typeface name":"Wingdings 3","Dingbat dec":"48","Dingbat hex":"30","Unicode dec":"11133","Unicode hex":"2B7D"},{"Typeface name":"Wingdings 3","Dingbat dec":"49","Dingbat hex":"31","Unicode dec":"11108","Unicode hex":"2B64"},{"Typeface name":"Wingdings 3","Dingbat dec":"50","Dingbat hex":"32","Unicode dec":"11109","Unicode hex":"2B65"},{"Typeface name":"Wingdings 3","Dingbat dec":"51","Dingbat hex":"33","Unicode dec":"11114","Unicode hex":"2B6A"},{"Typeface name":"Wingdings 3","Dingbat dec":"52","Dingbat hex":"34","Unicode dec":"11116","Unicode hex":"2B6C"},{"Typeface name":"Wingdings 3","Dingbat dec":"53","Dingbat hex":"35","Unicode dec":"11115","Unicode hex":"2B6B"},{"Typeface name":"Wingdings 3","Dingbat dec":"54","Dingbat hex":"36","Unicode dec":"11117","Unicode hex":"2B6D"},{"Typeface name":"Wingdings 3","Dingbat dec":"55","Dingbat hex":"37","Unicode dec":"11085","Unicode hex":"2B4D"},{"Typeface name":"Wingdings 3","Dingbat dec":"56","Dingbat hex":"38","Unicode dec":"11168","Unicode hex":"2BA0"},{"Typeface name":"Wingdings 3","Dingbat dec":"57","Dingbat hex":"39","Unicode dec":"11169","Unicode hex":"2BA1"},{"Typeface name":"Wingdings 3","Dingbat dec":"58","Dingbat hex":"3A","Unicode dec":"11170","Unicode hex":"2BA2"},{"Typeface name":"Wingdings 3","Dingbat dec":"59","Dingbat hex":"3B","Unicode dec":"11171","Unicode hex":"2BA3"},{"Typeface name":"Wingdings 3","Dingbat dec":"60","Dingbat hex":"3C","Unicode dec":"11172","Unicode hex":"2BA4"},{"Typeface name":"Wingdings 3","Dingbat dec":"61","Dingbat hex":"3D","Unicode dec":"11173","Unicode hex":"2BA5"},{"Typeface name":"Wingdings 3","Dingbat dec":"62","Dingbat hex":"3E","Unicode dec":"11174","Unicode hex":"2BA6"},{"Typeface name":"Wingdings 3","Dingbat dec":"63","Dingbat hex":"3F","Unicode dec":"11175","Unicode hex":"2BA7"},{"Typeface name":"Wingdings 3","Dingbat dec":"64","Dingbat hex":"40","Unicode dec":"11152","Unicode hex":"2B90"},{"Typeface name":"Wingdings 3","Dingbat dec":"65","Dingbat hex":"41","Unicode dec":"11153","Unicode hex":"2B91"},{"Typeface name":"Wingdings 3","Dingbat dec":"66","Dingbat hex":"42","Unicode dec":"11154","Unicode hex":"2B92"},{"Typeface name":"Wingdings 3","Dingbat dec":"67","Dingbat hex":"43","Unicode dec":"11155","Unicode hex":"2B93"},{"Typeface name":"Wingdings 3","Dingbat dec":"68","Dingbat hex":"44","Unicode dec":"11136","Unicode hex":"2B80"},{"Typeface name":"Wingdings 3","Dingbat dec":"69","Dingbat hex":"45","Unicode dec":"11139","Unicode hex":"2B83"},{"Typeface name":"Wingdings 3","Dingbat dec":"70","Dingbat hex":"46","Unicode dec":"11134","Unicode hex":"2B7E"},{"Typeface name":"Wingdings 3","Dingbat dec":"71","Dingbat hex":"47","Unicode dec":"11135","Unicode hex":"2B7F"},{"Typeface name":"Wingdings 3","Dingbat dec":"72","Dingbat hex":"48","Unicode dec":"11140","Unicode hex":"2B84"},{"Typeface name":"Wingdings 3","Dingbat dec":"73","Dingbat hex":"49","Unicode dec":"11142","Unicode hex":"2B86"},{"Typeface name":"Wingdings 3","Dingbat dec":"74","Dingbat hex":"4A","Unicode dec":"11141","Unicode hex":"2B85"},{"Typeface name":"Wingdings 3","Dingbat dec":"75","Dingbat hex":"4B","Unicode dec":"11143","Unicode hex":"2B87"},{"Typeface name":"Wingdings 3","Dingbat dec":"76","Dingbat hex":"4C","Unicode dec":"11151","Unicode hex":"2B8F"},{"Typeface name":"Wingdings 3","Dingbat dec":"77","Dingbat hex":"4D","Unicode dec":"11149","Unicode hex":"2B8D"},{"Typeface name":"Wingdings 3","Dingbat dec":"78","Dingbat hex":"4E","Unicode dec":"11150","Unicode hex":"2B8E"},{"Typeface name":"Wingdings 3","Dingbat dec":"79","Dingbat hex":"4F","Unicode dec":"11148","Unicode hex":"2B8C"},{"Typeface name":"Wingdings 3","Dingbat dec":"80","Dingbat hex":"50","Unicode dec":"11118","Unicode hex":"2B6E"},{"Typeface name":"Wingdings 3","Dingbat dec":"81","Dingbat hex":"51","Unicode dec":"11119","Unicode hex":"2B6F"},{"Typeface name":"Wingdings 3","Dingbat dec":"82","Dingbat hex":"52","Unicode dec":"9099","Unicode hex":"238B"},{"Typeface name":"Wingdings 3","Dingbat dec":"83","Dingbat hex":"53","Unicode dec":"8996","Unicode hex":"2324"},{"Typeface name":"Wingdings 3","Dingbat dec":"84","Dingbat hex":"54","Unicode dec":"8963","Unicode hex":"2303"},{"Typeface name":"Wingdings 3","Dingbat dec":"85","Dingbat hex":"55","Unicode dec":"8997","Unicode hex":"2325"},{"Typeface name":"Wingdings 3","Dingbat dec":"86","Dingbat hex":"56","Unicode dec":"9251","Unicode hex":"2423"},{"Typeface name":"Wingdings 3","Dingbat dec":"87","Dingbat hex":"57","Unicode dec":"9085","Unicode hex":"237D"},{"Typeface name":"Wingdings 3","Dingbat dec":"88","Dingbat hex":"58","Unicode dec":"8682","Unicode hex":"21EA"},{"Typeface name":"Wingdings 3","Dingbat dec":"89","Dingbat hex":"59","Unicode dec":"11192","Unicode hex":"2BB8"},{"Typeface name":"Wingdings 3","Dingbat dec":"90","Dingbat hex":"5A","Unicode dec":"129184","Unicode hex":"1F8A0"},{"Typeface name":"Wingdings 3","Dingbat dec":"91","Dingbat hex":"5B","Unicode dec":"129185","Unicode hex":"1F8A1"},{"Typeface name":"Wingdings 3","Dingbat dec":"92","Dingbat hex":"5C","Unicode dec":"129186","Unicode hex":"1F8A2"},{"Typeface name":"Wingdings 3","Dingbat dec":"93","Dingbat hex":"5D","Unicode dec":"129187","Unicode hex":"1F8A3"},{"Typeface name":"Wingdings 3","Dingbat dec":"94","Dingbat hex":"5E","Unicode dec":"129188","Unicode hex":"1F8A4"},{"Typeface name":"Wingdings 3","Dingbat dec":"95","Dingbat hex":"5F","Unicode dec":"129189","Unicode hex":"1F8A5"},{"Typeface name":"Wingdings 3","Dingbat dec":"96","Dingbat hex":"60","Unicode dec":"129190","Unicode hex":"1F8A6"},{"Typeface name":"Wingdings 3","Dingbat dec":"97","Dingbat hex":"61","Unicode dec":"129191","Unicode hex":"1F8A7"},{"Typeface name":"Wingdings 3","Dingbat dec":"98","Dingbat hex":"62","Unicode dec":"129192","Unicode hex":"1F8A8"},{"Typeface name":"Wingdings 3","Dingbat dec":"99","Dingbat hex":"63","Unicode dec":"129193","Unicode hex":"1F8A9"},{"Typeface name":"Wingdings 3","Dingbat dec":"100","Dingbat hex":"64","Unicode dec":"129194","Unicode hex":"1F8AA"},{"Typeface name":"Wingdings 3","Dingbat dec":"101","Dingbat hex":"65","Unicode dec":"129195","Unicode hex":"1F8AB"},{"Typeface name":"Wingdings 3","Dingbat dec":"102","Dingbat hex":"66","Unicode dec":"129104","Unicode hex":"1F850"},{"Typeface name":"Wingdings 3","Dingbat dec":"103","Dingbat hex":"67","Unicode dec":"129106","Unicode hex":"1F852"},{"Typeface name":"Wingdings 3","Dingbat dec":"104","Dingbat hex":"68","Unicode dec":"129105","Unicode hex":"1F851"},{"Typeface name":"Wingdings 3","Dingbat dec":"105","Dingbat hex":"69","Unicode dec":"129107","Unicode hex":"1F853"},{"Typeface name":"Wingdings 3","Dingbat dec":"106","Dingbat hex":"6A","Unicode dec":"129108","Unicode hex":"1F854"},{"Typeface name":"Wingdings 3","Dingbat dec":"107","Dingbat hex":"6B","Unicode dec":"129109","Unicode hex":"1F855"},{"Typeface name":"Wingdings 3","Dingbat dec":"108","Dingbat hex":"6C","Unicode dec":"129111","Unicode hex":"1F857"},{"Typeface name":"Wingdings 3","Dingbat dec":"109","Dingbat hex":"6D","Unicode dec":"129110","Unicode hex":"1F856"},{"Typeface name":"Wingdings 3","Dingbat dec":"110","Dingbat hex":"6E","Unicode dec":"129112","Unicode hex":"1F858"},{"Typeface name":"Wingdings 3","Dingbat dec":"111","Dingbat hex":"6F","Unicode dec":"129113","Unicode hex":"1F859"},{"Typeface name":"Wingdings 3","Dingbat dec":"112","Dingbat hex":"70","Unicode dec":"9650","Unicode hex":"25B2"},{"Typeface name":"Wingdings 3","Dingbat dec":"113","Dingbat hex":"71","Unicode dec":"9660","Unicode hex":"25BC"},{"Typeface name":"Wingdings 3","Dingbat dec":"114","Dingbat hex":"72","Unicode dec":"9651","Unicode hex":"25B3"},{"Typeface name":"Wingdings 3","Dingbat dec":"115","Dingbat hex":"73","Unicode dec":"9661","Unicode hex":"25BD"},{"Typeface name":"Wingdings 3","Dingbat dec":"116","Dingbat hex":"74","Unicode dec":"9664","Unicode hex":"25C0"},{"Typeface name":"Wingdings 3","Dingbat dec":"117","Dingbat hex":"75","Unicode dec":"9654","Unicode hex":"25B6"},{"Typeface name":"Wingdings 3","Dingbat dec":"118","Dingbat hex":"76","Unicode dec":"9665","Unicode hex":"25C1"},{"Typeface name":"Wingdings 3","Dingbat dec":"119","Dingbat hex":"77","Unicode dec":"9655","Unicode hex":"25B7"},{"Typeface name":"Wingdings 3","Dingbat dec":"120","Dingbat hex":"78","Unicode dec":"9699","Unicode hex":"25E3"},{"Typeface name":"Wingdings 3","Dingbat dec":"121","Dingbat hex":"79","Unicode dec":"9698","Unicode hex":"25E2"},{"Typeface name":"Wingdings 3","Dingbat dec":"122","Dingbat hex":"7A","Unicode dec":"9700","Unicode hex":"25E4"},{"Typeface name":"Wingdings 3","Dingbat dec":"123","Dingbat hex":"7B","Unicode dec":"9701","Unicode hex":"25E5"},{"Typeface name":"Wingdings 3","Dingbat dec":"124","Dingbat hex":"7C","Unicode dec":"128896","Unicode hex":"1F780"},{"Typeface name":"Wingdings 3","Dingbat dec":"125","Dingbat hex":"7D","Unicode dec":"128898","Unicode hex":"1F782"},{"Typeface name":"Wingdings 3","Dingbat dec":"126","Dingbat hex":"7E","Unicode dec":"128897","Unicode hex":"1F781"},{"Typeface name":"Wingdings 3","Dingbat dec":"128","Dingbat hex":"80","Unicode dec":"128899","Unicode hex":"1F783"},{"Typeface name":"Wingdings 3","Dingbat dec":"129","Dingbat hex":"81","Unicode dec":"11205","Unicode hex":"2BC5"},{"Typeface name":"Wingdings 3","Dingbat dec":"130","Dingbat hex":"82","Unicode dec":"11206","Unicode hex":"2BC6"},{"Typeface name":"Wingdings 3","Dingbat dec":"131","Dingbat hex":"83","Unicode dec":"11207","Unicode hex":"2BC7"},{"Typeface name":"Wingdings 3","Dingbat dec":"132","Dingbat hex":"84","Unicode dec":"11208","Unicode hex":"2BC8"},{"Typeface name":"Wingdings 3","Dingbat dec":"133","Dingbat hex":"85","Unicode dec":"11164","Unicode hex":"2B9C"},{"Typeface name":"Wingdings 3","Dingbat dec":"134","Dingbat hex":"86","Unicode dec":"11166","Unicode hex":"2B9E"},{"Typeface name":"Wingdings 3","Dingbat dec":"135","Dingbat hex":"87","Unicode dec":"11165","Unicode hex":"2B9D"},{"Typeface name":"Wingdings 3","Dingbat dec":"136","Dingbat hex":"88","Unicode dec":"11167","Unicode hex":"2B9F"},{"Typeface name":"Wingdings 3","Dingbat dec":"137","Dingbat hex":"89","Unicode dec":"129040","Unicode hex":"1F810"},{"Typeface name":"Wingdings 3","Dingbat dec":"138","Dingbat hex":"8A","Unicode dec":"129042","Unicode hex":"1F812"},{"Typeface name":"Wingdings 3","Dingbat dec":"139","Dingbat hex":"8B","Unicode dec":"129041","Unicode hex":"1F811"},{"Typeface name":"Wingdings 3","Dingbat dec":"140","Dingbat hex":"8C","Unicode dec":"129043","Unicode hex":"1F813"},{"Typeface name":"Wingdings 3","Dingbat dec":"141","Dingbat hex":"8D","Unicode dec":"129044","Unicode hex":"1F814"},{"Typeface name":"Wingdings 3","Dingbat dec":"142","Dingbat hex":"8E","Unicode dec":"129046","Unicode hex":"1F816"},{"Typeface name":"Wingdings 3","Dingbat dec":"143","Dingbat hex":"8F","Unicode dec":"129045","Unicode hex":"1F815"},{"Typeface name":"Wingdings 3","Dingbat dec":"144","Dingbat hex":"90","Unicode dec":"129047","Unicode hex":"1F817"},{"Typeface name":"Wingdings 3","Dingbat dec":"145","Dingbat hex":"91","Unicode dec":"129048","Unicode hex":"1F818"},{"Typeface name":"Wingdings 3","Dingbat dec":"146","Dingbat hex":"92","Unicode dec":"129050","Unicode hex":"1F81A"},{"Typeface name":"Wingdings 3","Dingbat dec":"147","Dingbat hex":"93","Unicode dec":"129049","Unicode hex":"1F819"},{"Typeface name":"Wingdings 3","Dingbat dec":"148","Dingbat hex":"94","Unicode dec":"129051","Unicode hex":"1F81B"},{"Typeface name":"Wingdings 3","Dingbat dec":"149","Dingbat hex":"95","Unicode dec":"129052","Unicode hex":"1F81C"},{"Typeface name":"Wingdings 3","Dingbat dec":"150","Dingbat hex":"96","Unicode dec":"129054","Unicode hex":"1F81E"},{"Typeface name":"Wingdings 3","Dingbat dec":"151","Dingbat hex":"97","Unicode dec":"129053","Unicode hex":"1F81D"},{"Typeface name":"Wingdings 3","Dingbat dec":"152","Dingbat hex":"98","Unicode dec":"129055","Unicode hex":"1F81F"},{"Typeface name":"Wingdings 3","Dingbat dec":"153","Dingbat hex":"99","Unicode dec":"129024","Unicode hex":"1F800"},{"Typeface name":"Wingdings 3","Dingbat dec":"154","Dingbat hex":"9A","Unicode dec":"129026","Unicode hex":"1F802"},{"Typeface name":"Wingdings 3","Dingbat dec":"155","Dingbat hex":"9B","Unicode dec":"129025","Unicode hex":"1F801"},{"Typeface name":"Wingdings 3","Dingbat dec":"156","Dingbat hex":"9C","Unicode dec":"129027","Unicode hex":"1F803"},{"Typeface name":"Wingdings 3","Dingbat dec":"157","Dingbat hex":"9D","Unicode dec":"129028","Unicode hex":"1F804"},{"Typeface name":"Wingdings 3","Dingbat dec":"158","Dingbat hex":"9E","Unicode dec":"129030","Unicode hex":"1F806"},{"Typeface name":"Wingdings 3","Dingbat dec":"159","Dingbat hex":"9F","Unicode dec":"129029","Unicode hex":"1F805"},{"Typeface name":"Wingdings 3","Dingbat dec":"160","Dingbat hex":"A0","Unicode dec":"129031","Unicode hex":"1F807"},{"Typeface name":"Wingdings 3","Dingbat dec":"161","Dingbat hex":"A1","Unicode dec":"129032","Unicode hex":"1F808"},{"Typeface name":"Wingdings 3","Dingbat dec":"162","Dingbat hex":"A2","Unicode dec":"129034","Unicode hex":"1F80A"},{"Typeface name":"Wingdings 3","Dingbat dec":"163","Dingbat hex":"A3","Unicode dec":"129033","Unicode hex":"1F809"},{"Typeface name":"Wingdings 3","Dingbat dec":"164","Dingbat hex":"A4","Unicode dec":"129035","Unicode hex":"1F80B"},{"Typeface name":"Wingdings 3","Dingbat dec":"165","Dingbat hex":"A5","Unicode dec":"129056","Unicode hex":"1F820"},{"Typeface name":"Wingdings 3","Dingbat dec":"166","Dingbat hex":"A6","Unicode dec":"129058","Unicode hex":"1F822"},{"Typeface name":"Wingdings 3","Dingbat dec":"167","Dingbat hex":"A7","Unicode dec":"129060","Unicode hex":"1F824"},{"Typeface name":"Wingdings 3","Dingbat dec":"168","Dingbat hex":"A8","Unicode dec":"129062","Unicode hex":"1F826"},{"Typeface name":"Wingdings 3","Dingbat dec":"169","Dingbat hex":"A9","Unicode dec":"129064","Unicode hex":"1F828"},{"Typeface name":"Wingdings 3","Dingbat dec":"170","Dingbat hex":"AA","Unicode dec":"129066","Unicode hex":"1F82A"},{"Typeface name":"Wingdings 3","Dingbat dec":"171","Dingbat hex":"AB","Unicode dec":"129068","Unicode hex":"1F82C"},{"Typeface name":"Wingdings 3","Dingbat dec":"172","Dingbat hex":"AC","Unicode dec":"129180","Unicode hex":"1F89C"},{"Typeface name":"Wingdings 3","Dingbat dec":"173","Dingbat hex":"AD","Unicode dec":"129181","Unicode hex":"1F89D"},{"Typeface name":"Wingdings 3","Dingbat dec":"174","Dingbat hex":"AE","Unicode dec":"129182","Unicode hex":"1F89E"},{"Typeface name":"Wingdings 3","Dingbat dec":"175","Dingbat hex":"AF","Unicode dec":"129183","Unicode hex":"1F89F"},{"Typeface name":"Wingdings 3","Dingbat dec":"176","Dingbat hex":"B0","Unicode dec":"129070","Unicode hex":"1F82E"},{"Typeface name":"Wingdings 3","Dingbat dec":"177","Dingbat hex":"B1","Unicode dec":"129072","Unicode hex":"1F830"},{"Typeface name":"Wingdings 3","Dingbat dec":"178","Dingbat hex":"B2","Unicode dec":"129074","Unicode hex":"1F832"},{"Typeface name":"Wingdings 3","Dingbat dec":"179","Dingbat hex":"B3","Unicode dec":"129076","Unicode hex":"1F834"},{"Typeface name":"Wingdings 3","Dingbat dec":"180","Dingbat hex":"B4","Unicode dec":"129078","Unicode hex":"1F836"},{"Typeface name":"Wingdings 3","Dingbat dec":"181","Dingbat hex":"B5","Unicode dec":"129080","Unicode hex":"1F838"},{"Typeface name":"Wingdings 3","Dingbat dec":"182","Dingbat hex":"B6","Unicode dec":"129082","Unicode hex":"1F83A"},{"Typeface name":"Wingdings 3","Dingbat dec":"183","Dingbat hex":"B7","Unicode dec":"129081","Unicode hex":"1F839"},{"Typeface name":"Wingdings 3","Dingbat dec":"184","Dingbat hex":"B8","Unicode dec":"129083","Unicode hex":"1F83B"},{"Typeface name":"Wingdings 3","Dingbat dec":"185","Dingbat hex":"B9","Unicode dec":"129176","Unicode hex":"1F898"},{"Typeface name":"Wingdings 3","Dingbat dec":"186","Dingbat hex":"BA","Unicode dec":"129178","Unicode hex":"1F89A"},{"Typeface name":"Wingdings 3","Dingbat dec":"187","Dingbat hex":"BB","Unicode dec":"129177","Unicode hex":"1F899"},{"Typeface name":"Wingdings 3","Dingbat dec":"188","Dingbat hex":"BC","Unicode dec":"129179","Unicode hex":"1F89B"},{"Typeface name":"Wingdings 3","Dingbat dec":"189","Dingbat hex":"BD","Unicode dec":"129084","Unicode hex":"1F83C"},{"Typeface name":"Wingdings 3","Dingbat dec":"190","Dingbat hex":"BE","Unicode dec":"129086","Unicode hex":"1F83E"},{"Typeface name":"Wingdings 3","Dingbat dec":"191","Dingbat hex":"BF","Unicode dec":"129085","Unicode hex":"1F83D"},{"Typeface name":"Wingdings 3","Dingbat dec":"192","Dingbat hex":"C0","Unicode dec":"129087","Unicode hex":"1F83F"},{"Typeface name":"Wingdings 3","Dingbat dec":"193","Dingbat hex":"C1","Unicode dec":"129088","Unicode hex":"1F840"},{"Typeface name":"Wingdings 3","Dingbat dec":"194","Dingbat hex":"C2","Unicode dec":"129090","Unicode hex":"1F842"},{"Typeface name":"Wingdings 3","Dingbat dec":"195","Dingbat hex":"C3","Unicode dec":"129089","Unicode hex":"1F841"},{"Typeface name":"Wingdings 3","Dingbat dec":"196","Dingbat hex":"C4","Unicode dec":"129091","Unicode hex":"1F843"},{"Typeface name":"Wingdings 3","Dingbat dec":"197","Dingbat hex":"C5","Unicode dec":"129092","Unicode hex":"1F844"},{"Typeface name":"Wingdings 3","Dingbat dec":"198","Dingbat hex":"C6","Unicode dec":"129094","Unicode hex":"1F846"},{"Typeface name":"Wingdings 3","Dingbat dec":"199","Dingbat hex":"C7","Unicode dec":"129093","Unicode hex":"1F845"},{"Typeface name":"Wingdings 3","Dingbat dec":"200","Dingbat hex":"C8","Unicode dec":"129095","Unicode hex":"1F847"},{"Typeface name":"Wingdings 3","Dingbat dec":"201","Dingbat hex":"C9","Unicode dec":"11176","Unicode hex":"2BA8"},{"Typeface name":"Wingdings 3","Dingbat dec":"202","Dingbat hex":"CA","Unicode dec":"11177","Unicode hex":"2BA9"},{"Typeface name":"Wingdings 3","Dingbat dec":"203","Dingbat hex":"CB","Unicode dec":"11178","Unicode hex":"2BAA"},{"Typeface name":"Wingdings 3","Dingbat dec":"204","Dingbat hex":"CC","Unicode dec":"11179","Unicode hex":"2BAB"},{"Typeface name":"Wingdings 3","Dingbat dec":"205","Dingbat hex":"CD","Unicode dec":"11180","Unicode hex":"2BAC"},{"Typeface name":"Wingdings 3","Dingbat dec":"206","Dingbat hex":"CE","Unicode dec":"11181","Unicode hex":"2BAD"},{"Typeface name":"Wingdings 3","Dingbat dec":"207","Dingbat hex":"CF","Unicode dec":"11182","Unicode hex":"2BAE"},{"Typeface name":"Wingdings 3","Dingbat dec":"208","Dingbat hex":"D0","Unicode dec":"11183","Unicode hex":"2BAF"},{"Typeface name":"Wingdings 3","Dingbat dec":"209","Dingbat hex":"D1","Unicode dec":"129120","Unicode hex":"1F860"},{"Typeface name":"Wingdings 3","Dingbat dec":"210","Dingbat hex":"D2","Unicode dec":"129122","Unicode hex":"1F862"},{"Typeface name":"Wingdings 3","Dingbat dec":"211","Dingbat hex":"D3","Unicode dec":"129121","Unicode hex":"1F861"},{"Typeface name":"Wingdings 3","Dingbat dec":"212","Dingbat hex":"D4","Unicode dec":"129123","Unicode hex":"1F863"},{"Typeface name":"Wingdings 3","Dingbat dec":"213","Dingbat hex":"D5","Unicode dec":"129124","Unicode hex":"1F864"},{"Typeface name":"Wingdings 3","Dingbat dec":"214","Dingbat hex":"D6","Unicode dec":"129125","Unicode hex":"1F865"},{"Typeface name":"Wingdings 3","Dingbat dec":"215","Dingbat hex":"D7","Unicode dec":"129127","Unicode hex":"1F867"},{"Typeface name":"Wingdings 3","Dingbat dec":"216","Dingbat hex":"D8","Unicode dec":"129126","Unicode hex":"1F866"},{"Typeface name":"Wingdings 3","Dingbat dec":"217","Dingbat hex":"D9","Unicode dec":"129136","Unicode hex":"1F870"},{"Typeface name":"Wingdings 3","Dingbat dec":"218","Dingbat hex":"DA","Unicode dec":"129138","Unicode hex":"1F872"},{"Typeface name":"Wingdings 3","Dingbat dec":"219","Dingbat hex":"DB","Unicode dec":"129137","Unicode hex":"1F871"},{"Typeface name":"Wingdings 3","Dingbat dec":"220","Dingbat hex":"DC","Unicode dec":"129139","Unicode hex":"1F873"},{"Typeface name":"Wingdings 3","Dingbat dec":"221","Dingbat hex":"DD","Unicode dec":"129140","Unicode hex":"1F874"},{"Typeface name":"Wingdings 3","Dingbat dec":"222","Dingbat hex":"DE","Unicode dec":"129141","Unicode hex":"1F875"},{"Typeface name":"Wingdings 3","Dingbat dec":"223","Dingbat hex":"DF","Unicode dec":"129143","Unicode hex":"1F877"},{"Typeface name":"Wingdings 3","Dingbat dec":"224","Dingbat hex":"E0","Unicode dec":"129142","Unicode hex":"1F876"},{"Typeface name":"Wingdings 3","Dingbat dec":"225","Dingbat hex":"E1","Unicode dec":"129152","Unicode hex":"1F880"},{"Typeface name":"Wingdings 3","Dingbat dec":"226","Dingbat hex":"E2","Unicode dec":"129154","Unicode hex":"1F882"},{"Typeface name":"Wingdings 3","Dingbat dec":"227","Dingbat hex":"E3","Unicode dec":"129153","Unicode hex":"1F881"},{"Typeface name":"Wingdings 3","Dingbat dec":"228","Dingbat hex":"E4","Unicode dec":"129155","Unicode hex":"1F883"},{"Typeface name":"Wingdings 3","Dingbat dec":"229","Dingbat hex":"E5","Unicode dec":"129156","Unicode hex":"1F884"},{"Typeface name":"Wingdings 3","Dingbat dec":"230","Dingbat hex":"E6","Unicode dec":"129157","Unicode hex":"1F885"},{"Typeface name":"Wingdings 3","Dingbat dec":"231","Dingbat hex":"E7","Unicode dec":"129159","Unicode hex":"1F887"},{"Typeface name":"Wingdings 3","Dingbat dec":"232","Dingbat hex":"E8","Unicode dec":"129158","Unicode hex":"1F886"},{"Typeface name":"Wingdings 3","Dingbat dec":"233","Dingbat hex":"E9","Unicode dec":"129168","Unicode hex":"1F890"},{"Typeface name":"Wingdings 3","Dingbat dec":"234","Dingbat hex":"EA","Unicode dec":"129170","Unicode hex":"1F892"},{"Typeface name":"Wingdings 3","Dingbat dec":"235","Dingbat hex":"EB","Unicode dec":"129169","Unicode hex":"1F891"},{"Typeface name":"Wingdings 3","Dingbat dec":"236","Dingbat hex":"EC","Unicode dec":"129171","Unicode hex":"1F893"},{"Typeface name":"Wingdings 3","Dingbat dec":"237","Dingbat hex":"ED","Unicode dec":"129172","Unicode hex":"1F894"},{"Typeface name":"Wingdings 3","Dingbat dec":"238","Dingbat hex":"EE","Unicode dec":"129174","Unicode hex":"1F896"},{"Typeface name":"Wingdings 3","Dingbat dec":"239","Dingbat hex":"EF","Unicode dec":"129173","Unicode hex":"1F895"},{"Typeface name":"Wingdings 3","Dingbat dec":"240","Dingbat hex":"F0","Unicode dec":"129175","Unicode hex":"1F897"}]
484;return rv.default=i,rv}var $V;function _7e(){if($V)return _o;$V=1;var i=_o&&_o.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(_o,"__esModule",{value:!0}),_o.hex=_o.dec=_o.codePoint=void 0;for(var e=i(x7e()),t={},n=String.fromCodePoint?String.fromCodePoint:m,r=0,s=e.default;r<s.length;r++){var o=s[r],a=parseInt(o["Unicode dec"],10),l={codePoint:a,string:n(a)};t[o["Typeface name"].toUpperCase()+"_"+o["Dingbat dec"]]=l}function c(p,g){return t[p.toUpperCase()+"_"+g]}_o.codePoint=c;function d(p,g){return c(p,parseInt(g,10))}_o.dec=d;function f(p,g){return c(p,parseInt(g,16))}_o.hex=f;function m(p){if(p<=65535)return String.fromCharCode(p);var g=Math.floor((p-65536)/1024)+55296,y=(p-65536)%1024+56320;return String.fromCharCode(g,y)}return _o}var xc={},GV;function GZ(){if(GV)return xc;GV=1;var i=yi;xc.paragraph=e,xc.run=t,xc._elements=r,xc._elementsOfType=n,xc.getDescendantsOfType=s,xc.getDescendants=o;function e(l){return n("paragraph",l)}function t(l){return n("run",l)}function n(l,c){return r(function(d){return d.type===l?c(d):d})}function r(l){return function c(d){if(d.children){var f=i.map(d.children,c);d=i.extend(d,{children:f})}return l(d)}}function s(l,c){return o(l).filter(function(d){return d.type===c})}function o(l){var c=[];return a(l,function(d){c.push(d)}),c}function a(l,c){l.children&&l.children.forEach(function(d){a(d,c),c(d)})}return xc}var sv={},YV;function C7e(){if(YV)return sv;YV=1,sv.uriToZipEntryName=i,sv.replaceFragment=e;function i(t,n){return n.charAt(0)==="/"?n.substr(1):t+"/"+n}function e(t,n){var r=t.indexOf("#");
484return r!==-1&&(t=t.substring(0,r)),t+"#"+n}return sv}var KV;function D7e(){if(KV)return iv;KV=1,iv.createBodyReader=l,iv._readNumberingProperties=d;var i=_7e(),e=yi,t=Bd(),n=Ll().Result,r=Ll().warning,s=wP(),o=GZ(),a=C7e();function l(T){return{readXmlElement:function(S){return new c(T).readXmlElement(S)},readXmlElements:function(S){return new c(T).readXmlElements(S)}}}function c(T){var S=[],A=[],I=[],R=T.relationships,O=T.contentTypes,j=T.docxFile,B=T.files,U=T.numbering,F=T.styles;function H(pe){var Fe=pe.map(L);return C(Fe)}function L(pe){if(pe.type==="element"){var Fe=Z[pe.name];if(Fe)return Fe(pe);if(!Object.prototype.hasOwnProperty.call(m,pe.name)){var qe=r("An unrecognised element was ignored: "+pe.name);return p([qe])}}return g()}function W(pe){return J(pe).map(function(Fe){return{type:"paragraphProperties",styleId:Fe.styleId,styleName:Fe.name,alignment:pe.firstOrEmpty("w:jc").attributes["w:val"],numbering:d(Fe.styleId,pe.firstOrEmpty("w:numPr"),U),indent:G(pe.firstOrEmpty("w:ind"))}})}function G(pe){return{start:pe.attributes["w:start"]||pe.attributes["w:left"],end:pe.attributes["w:end"]||pe.attributes["w:right"],firstLine:pe.attributes["w:firstLine"],hanging:pe.attributes["w:hanging"]}}function Y(pe){return ce(pe).map(function(Fe){var qe=pe.firstOrEmpty("w:sz").attributes["w:val"],Xe=/^[0-9]+$/.test(qe)?parseInt(qe,10)/2:null;return{type:"runProperties",styleId:Fe.styleId,styleName:Fe.name,verticalAlignment:pe.firstOrEmpty("w:vertAlign").attributes["w:val"],font:pe.firstOrEmpty("w:rFonts").attributes["w:ascii"],fontSize:Xe,isBold:V(pe.first("w:b")),isUnderline:ie(pe.first("w:u")),isItalic:V(pe.first("w:i")),isStrikethrough:V(pe.first("w:strike")),isAllCaps:V(pe.first("w:caps")),isSmallCaps:V(pe.first("w:smallCaps")),highlight:$(pe.firstOrEmpty("w:highlight").attributes["w:val"])}})}function ie(pe){if(pe){var Fe=pe.attributes["w:val"];return Fe!==void 0&&Fe!=="false"&&Fe!=="0"&&Fe!=="none"}else return!1}function V(pe){if(pe){var Fe=pe.attributes["w:val"];return Fe!=="false"&&Fe!=="0"}else return!1}function q(pe){return pe!=="false"&&pe!=="0"}function $(pe){return!pe||pe==="none"?null:pe}function J(pe){return ge(pe,"w:pStyle","Paragraph",F.findParagraphStyleById)}function ce(pe){return ge(pe,"w:rStyle","Run",F.findCharacterStyleById)}function se(pe){return ge(pe,"w:tblStyle","Table",F.findTableStyleById)}function ge(pe,Fe,qe,Xe){var Dt=[],Nt=pe.first(Fe),dn=null,Cn=null;if(Nt&&(dn=Nt.attributes["w:val"],dn)){var $n=Xe(dn);$n?Cn=$n.name:Dt.push(kt(qe,dn))}return v({styleId:dn,name:Cn},Dt)}function ye(pe){var Fe=pe.attributes["w:fldCharType"];if(Fe==="begin")S.push({type:"begin",fldChar:pe}),A=[];else if(Fe==="end"){var qe=S.pop();if(qe.type==="begin"&&(qe=Ve(qe)),qe.type==="checkbox")return y(t.checkbox({checked:qe.checked}))}else if(Fe==="separate"){var Xe=S.pop(),Dt=Ve(Xe);S.push(Dt)}return g()}function Pe(){var pe=e.last(S.filter(function(Fe){return Fe.type==="hyperlink"}));return pe?pe.options:null}function Ve(pe){return Ze(A.join(""),pe.type==="begin"?pe.fldChar:s.emptyElement)}function Ze(pe,Fe){var qe=/^\s*HYPERLINK\s+(\\l\s+)?(?:"(.*)"|([^\\]\S*))/.exec(pe);if(qe){var Xe=qe[2]===void 0?qe[3]:qe[2],Dt=qe[1]===void 0?{href:Xe}:{anchor:Xe};return{type:"hyperlink",options:Dt}}var Nt=/\s*FORMCHECKBOX\s*/.exec(pe);if(Nt){var dn=Fe.firstOrEmpty("w:ffData").firstOrEmpty("w:checkBox"),Cn=dn.first("w:checked"),$n=Cn==null?V(dn.first("w:default")):V(Cn);return{type:"checkbox",checked:$n}}return{type:"unknown"}}function dt(pe){return A.push(pe.text()),g()}function Re(pe){var Fe=pe.attributes["w:font"],qe=pe.attributes["w:char"],Xe=i.hex(Fe,qe);return Xe==null&&/^F0..$/.test(qe)&&(Xe=i.hex(Fe,qe.substring(2))),Xe==null?p([r("A w:sym element with an unsupported character was ignored: char "+qe+" in font "+Fe)]):y(new t.Text(Xe.string))}function N(pe){return function(Fe){var qe=Fe.attributes["w:id"];return y(new t.NoteReference({noteType:pe,noteId:qe}))}}function te(pe){return y(t.commentReference({commentId:pe.attributes["w:id"]}))}function ne(pe){return H(pe.children)}var Z={"w:p":function(pe){var Fe=pe.firstOrEmpty("w:pPr"),qe=!!Fe.firstOrEmpty("w:rPr").first("w:del");
484if(qe)return pe.children.forEach(function(Dt){I.push(Dt)}),g();var Xe=pe.children;return I.length>0&&(Xe=I.concat(Xe),I=[]),x.map(W(Fe),H(Xe),function(Dt,Nt){return new t.Paragraph(Nt,Dt)}).insertExtra()},"w:r":function(pe){return x.map(Y(pe.firstOrEmpty("w:rPr")),H(pe.children),function(Fe,qe){var Xe=Pe();return Xe!==null&&(qe=[new t.Hyperlink(qe,Xe)]),new t.Run(qe,Fe)})},"w:fldChar":ye,"w:instrText":dt,"w:t":function(pe){return y(new t.Text(pe.text()))},"w:tab":function(pe){return y(new t.Tab)},"w:noBreakHyphen":function(){return y(new t.Text("‑"))},"w:softHyphen":function(pe){return y(new t.Text("­"))},"w:sym":Re,"w:hyperlink":function(pe){var Fe=pe.attributes["r:id"],qe=pe.attributes["w:anchor"];return H(pe.children).map(function(Xe){function Dt(dn){var Cn=pe.attributes["w:tgtFrame"]||null;return new t.Hyperlink(Xe,e.extend({targetFrame:Cn},dn))}if(Fe){var Nt=R.findTargetByRelationshipId(Fe);return qe&&(Nt=a.replaceFragment(Nt,qe)),Dt({href:Nt})}else return qe?Dt({anchor:qe}):Xe})},"w:tbl":Q,"w:tr":we,"w:tc":xe,"w:footnoteReference":N("footnote"),"w:endnoteReference":N("endnote"),"w:commentReference":te,"w:br":function(pe){var Fe=pe.attributes["w:type"];return Fe==null||Fe==="textWrapping"?y(t.lineBreak):Fe==="page"?y(t.pageBreak):Fe==="column"?y(t.columnBreak):p([r("Unsupported break type: "+Fe)])},"w:bookmarkStart":function(pe){var Fe=pe.attributes["w:name"];return Fe==="_GoBack"?g():y(new t.BookmarkStart({name:Fe}))},"mc:AlternateContent":function(pe){return ne(pe.firstOrEmpty("mc:Fallback"))},"w:sdt":function(pe){var Fe=H(pe.firstOrEmpty("w:sdtContent").children);return Fe.map(function(qe){var Xe=pe.firstOrEmpty("w:sdtPr").first("wordml:checkbox");if(Xe){var Dt=Xe.first("wordml:checked"),Nt=!!Dt&&q(Dt.attributes["wordml:val"]),dn=t.checkbox({checked:Nt}),Cn=!1,$n=qe.map(o._elementsOfType(t.types.text,function(vi){return vi.value.length>0&&!Cn?(Cn=!0,dn):vi}));return Cn?$n:dn}else return qe})},"w:ins":ne,"w:object":ne,"w:smartTag":ne,"w:drawing":ne,"w:pict":function(pe){return ne(pe).toExtra()},"v:roundrect":ne,"v:shape":ne,"v:textbox":ne,"w:txbxContent":ne,"wp:inline":me,"wp:anchor":me,"v:imagedata":bt,"v:group":ne,"v:rect":ne};return{readXmlElement:L,readXmlElements:H};function Q(pe){var Fe=le(pe.firstOrEmpty("w:tblPr"));return H(pe.children).flatMap(re).flatMap(function(qe){return Fe.map(function(Xe){return t.Table(qe,Xe)})})}function le(pe){return se(pe).map(function(Fe){return{styleId:Fe.styleId,styleName:Fe.name}})}function we(pe){var Fe=pe.firstOrEmpty("w:trPr"),qe=!!Fe.first("w:del");if(qe)return g();var Xe=!!Fe.first("w:tblHeader");return H(pe.children).map(function(Dt){return t.TableRow(Dt,{isHeader:Xe})})}function xe(pe){return H(pe.children).map(function(Fe){var qe=pe.firstOrEmpty("w:tcPr"),Xe=qe.firstOrEmpty("w:gridSpan").attributes["w:val"],Dt=Xe?parseInt(Xe,10):1,Nt=t.TableCell(Fe,{colSpan:Dt});return Nt._vMerge=fe(qe),Nt})}function fe(pe){var Fe=pe.first("w:vMerge");if(Fe){var qe=Fe.attributes["w:val"];return qe==="continue"||!qe}else return null}function re(pe){var Fe=e.any(pe,function(Dt){return Dt.type!==t.types.tableRow});if(Fe)return ae(pe),v(pe,[r("unexpected non-row element in table, cell merging may be incorrect")]);var qe=e.any(pe,function(Dt){return e.any(Dt.children,function(Nt){return Nt.type!==t.types.tableCell})});if(qe)return ae(pe),v(pe,[r("unexpected non-cell element in table row, cell merging may be incorrect")]);var Xe={};return pe.forEach(function(Dt){var Nt=0;Dt.children.forEach(function(dn){dn._vMerge&&Xe[Nt]?Xe[Nt].rowSpan++:(Xe[Nt]=dn,dn._vMerge=!1),Nt+=dn.colSpan})}),pe.forEach(function(Dt){Dt.children=Dt.children.filter(function(Nt){return!Nt._vMerge}),Dt.children.forEach(function(Nt){delete Nt._vMerge})}),y(pe)}function ae(pe){pe.forEach(function(Fe){var qe=o.getDescendantsOfType(Fe,t.types.tableCell);qe.forEach(function(Xe){delete Xe._vMerge})})}function me(pe){var Fe=pe.getElementsByTagName("a:graphic").getElementsByTagName("a:graphicData").getElementsByTagName("pic:pic").getElementsByTagName("pic:blipFill").getElementsByTagName("a:blip");return C(Fe.map(De.bind(null,pe)))}function De(pe,Fe){var qe=pe.firstOrEmpty("wp:docPr"),Xe=qe.attributes,Dt=je(Xe.descr)?Xe.title:Xe.descr,Nt=tt(Fe);return Nt===null?p([r("Could not find image file for a:blip element")]):ht(Nt,Dt).map(function(dn){var Cn=qe.firstOrEmpty("a:hlinkClick"),$n=Cn.attributes["r:id"];if($n){var vi=R.findTargetByRelationshipId($n);return new t.Hyperlink([dn],{href:vi})}else return dn})}function je(pe){return pe==null||/^\s*$/.test(pe)}function tt(pe){var Fe=pe.attributes["r:embed"],qe=pe.attributes["r:link"];if(Fe)return it(Fe);if(qe){var Xe=R.findTargetByRelationshipId(qe);return{path:Xe,read:B.read.bind(B,Xe)}}else return null}function bt(pe){var Fe=pe.attributes["r:id"];return Fe?ht(it(Fe),pe.attributes["o:title"]):p([r("A v:imagedata element without a relationship ID was ignored")])}function it(pe){var Fe=a.uriToZipEntryName("word",R.findTargetByRelationshipId(pe));return{path:Fe,read:j.read.bind(j,Fe)}}function ht(pe,Fe){var qe=O.findContentType(pe.path),Xe=t.Image({readImage:pe.read,altText:Fe,contentType:qe}),Dt=f[qe]?[]:r("Image of type "+qe+" is unlikely to display in web browsers");return v(Xe,Dt)}function kt(pe,Fe){return r(pe+" style with ID "+Fe+" was referenced but not defined in the document")}}function d(T,S,A){var I=S.firstOrEmpty("w:ilvl").attributes["w:val"],R=S.firstOrEmpty("w:numId").attributes["w:val"];if(I!==void 0&&R!==void 0)return A.findLevel(R,I);if(T!=null){var O=A.findLevelByParagraphStyleId(T);if(O!=null)return O}return R!==void 0?A.findLevel(R,"0"):null}var f={"image/png":!0,"image/gif":!0,"image/jpeg":!0,"image/svg+xml":!0,"image/tiff":!0},m={"office-word:wrap":!0,"v:shadow":!0,"v:shapetype":!0,"w:annotationRef":!0,"w:bookmarkEnd":!0,"w:sectPr":!0,"w:proofErr":!0,"w:lastRenderedPageBreak":!0,"w:commentRangeStart":!0,"w:commentRangeEnd":!0,"w:del":!0,"w:footnoteRef":!0,"w:endnoteRef":!0,"w:pPr":!0,"w:rPr":!0,"w:tblPr":!0,"w:tblGrid":!0,"w:trPr":!0,"w:tcPr":!0};function p(T){return new x(null,null,T)}function g(){return new x(null)}function y(T){return new x(T)}function v(T,S){return new x(T,null,S)}function x(T,S,A){this.value=T||[],this.extra=S||[],this._result=new n({element:this.value,extra:S},A),this.messages=this._result.messages}x.prototype.toExtra=function(){return new x(null,D(this.extra,this.value),this.messages)},x.prototype.insertExtra=function(){var T=this.extra;return T&&T.length?new x(D(this.value,T),null,this.messages):this},x.prototype.map=function(T){var S=this._result.map(function(A){return T(A.element)});return new x(S.value,this.extra,S.messages)},x.prototype.flatMap=function(T){var S=this._result.flatMap(function(A){return T(A.element)._result});return new x(S.value.element,D(this.extra,S.value.extra),S.messages)},x.map=function(T,S,A){return new x(A(T.value,S.value),D(T.extra,S.extra),T.messages.concat(S.messages))};function C(T){var S=n.combine(e.pluck(T,"_result"));return new x(e.flatten(e.pluck(S.value,"element")),e.filter(e.flatten(e.pluck(S.value,"extra")),E),S.messages)}function D(T,S){return e.flatten([T,S])}function E(T){return T}return iv}var cA={},XV;
484function E7e(){if(XV)return cA;XV=1,cA.DocumentXmlReader=t;var i=Bd(),e=Ll().Result;function t(n){var r=n.bodyReader;function s(o){var a=o.first("w:body");if(a==null)throw new Error("Could not find the body element: are you sure this is a docx file?");var l=r.readXmlElements(a.children).map(function(c){return new i.Document(c,{notes:n.notes,comments:n.comments})});return new e(l.value,l.messages)}return{convertXmlToDocument:s}}return cA}var Sp={},QV;function T7e(){if(QV)return Sp;QV=1,Sp.readRelationships=i,Sp.defaultValue=new e([]),Sp.Relationships=e;function i(t){var n=[];return t.children.forEach(function(r){if(r.name==="relationships:Relationship"){var s={relationshipId:r.attributes.Id,target:r.attributes.Target,type:r.attributes.Type};n.push(s)}}),new e(n)}function e(t){var n={};t.forEach(function(s){n[s.relationshipId]=s.target});var r={};return t.forEach(function(s){r[s.type]||(r[s.type]=[]),r[s.type].push(s.target)}),{findTargetByRelationshipId:function(s){return n[s]},findTargetsByType:function(s){return r[s]||[]}}}return Sp}var ov={},ZV;function A7e(){if(ZV)return ov;ZV=1,ov.readContentTypesFromXml=e;var i={png:"png",gif:"gif",jpeg:"jpeg",jpg:"jpeg",tif:"tiff",tiff:"tiff",bmp:"bmp"};ov.defaultContentTypes=t({},{});function e(n){var r={},s={};return n.children.forEach(function(o){if(o.name==="content-types:Default"&&(r[o.attributes.Extension]=o.attributes.ContentType),o.name==="content-types:Override"){var a=o.attributes.PartName;a.charAt(0)==="/"&&(a=a.substring(1)),s[a]=o.attributes.ContentType}}),t(s,r)}function t(n,r){return{findContentType:function(s){var o=n[s];if(o)return o;var a=s.split("."),l=a[a.length-1];if(r.hasOwnProperty(l))return r[l];var c=i[l.toLowerCase()];return c?"image/"+c:null}}}return ov}var Pp={},JV;function k7e(){if(JV)return Pp;JV=1;var i=yi;Pp.readNumberingXml=t,Pp.Numbering=e,Pp.defaultNumbering=new e({},{});function e(o,a,l){var c=i.flatten(i.values(a).map(function(p){return i.values(p.levels)})),d=i.indexBy(c.filter(function(p){return p.paragraphStyleId!=null}),"paragraphStyleId");function f(p,g){var y=o[p];if(y){var v=a[y.abstractNumId];if(v){if(v.numStyleLink==null)return a[y.abstractNumId].levels[g];var x=l.findNumberingStyleById(v.numStyleLink);return f(x.numId,g)}else return null}else return null}function m(p){return d[p]||null}return{findLevel:f,findLevelByParagraphStyleId:m}}function t(o,a){if(!a||!a.styles)throw new Error("styles is missing");var l=n(o),c=s(o);return new e(c,l,a.styles)}function n(o){var a={};return o.getElementsByTagName("w:abstractNum").forEach(function(l){var c=l.attributes["w:abstractNumId"];a[c]=r(l)}),a}function r(o){var a={},l=null;o.getElementsByTagName("w:lvl").forEach(function(d){var f=d.attributes["w:ilvl"],m=d.firstOrEmpty("w:numFmt").attributes["w:val"],p=m!=="bullet",g=d.firstOrEmpty("w:pStyle").attributes["w:val"];f===void 0?l={isOrdered:p,level:"0",paragraphStyleId:g}:a[f]={isOrdered:p,level:f,paragraphStyleId:g}}),l!==null&&a[l.level]===void 0&&(a[l.level]=l);var c=o.firstOrEmpty("w:numStyleLink").attributes["w:val"];return{levels:a,numStyleLink:c}}function s(o){var a={};return o.getElementsByTagName("w:num").forEach(function(l){var c=l.attributes["w:numId"],d=l.first("w:abstractNumId").attributes["w:val"];a[c]={abstractNumId:d}}),a}return Pp}var Ip={},ej;function S7e(){if(ej)return Ip;ej=1,Ip.readStylesXml=e,Ip.Styles=i,Ip.defaultStyles=new i({},{});function i(o,a,l,c){return{findParagraphStyleById:function(d){return o[d]},findCharacterStyleById:function(d){return a[d]},findTableStyleById:function(d){return l[d]},findNumberingStyleById:function(d){return c[d]}}}i.EMPTY=new i({},{},{},{});function e(o){var a={},l={},c={},d={},f={paragraph:a,character:l,table:c,numbering:d};return o.getElementsByTagName("w:style").forEach(function(m){var p=t(m),g=f[p.type];g&&g[p.styleId]===void 0&&(g[p.styleId]=p)}),new i(a,l,c,d)}function t(o){var a=o.attributes["w:type"];if(a==="numbering")return r(a,o);var l=s(o),c=n(o);return{type:a,styleId:l,name:c}}function n(o){var a=o.first("w:name");return a?a.attributes["w:val"]:null}function r(o,a){var l=s(a),c=a.firstOrEmpty("w:pPr").firstOrEmpty("w:numPr").firstOrEmpty("w:numId").attributes["w:val"];return{type:o,numId:c,styleId:l}}function s(o){return o.attributes["w:styleId"]}return Ip}var Of={},tj;function P7e(){if(tj)return Of;tj=1;var i=Bd(),e=Ll().Result;Of.createFootnotesReader=t.bind(Of,"footnote"),Of.createEndnotesReader=t.bind(Of,"endnote");function t(n,r){function s(l){return e.combine(l.getElementsByTagName("w:"+n).filter(o).map(a))}function o(l){var c=l.attributes["w:type"];return c!=="continuationSeparator"&&c!=="separator"}function a(l){var c=l.attributes["w:id"];return r.readXmlElements(l.children).map(function(d){return i.Note({noteType:n,noteId:c,body:d})})}return s}return Of}var uA={},nj;function I7e(){if(nj)return uA;nj=1;var i=Bd(),e=Ll().Result;function t(n){function r(o){return e.combine(o.getElementsByTagName("w:comment").map(s))}function s(o){var a=o.attributes["w:id"];function l(c){return(o.attributes[c]||"").trim()||null}return n.readXmlElements(o.children).map(function(c){return i.comment({commentId:a,body:c,authorName:l("w:author"),authorInitials:l("w:initials")})})}return r}return uA.createCommentsReader=t,uA}var dA={},ij;function R7e(){if(ij)return dA;ij=1;var i=tu();dA.Files=e;function e(){function t(n){return i.reject(new Error("could not open external image: '"+n+`'
485cannot open linked files from a web browser`))}return{read:t}}return dA}var rj;function F7e(){if(rj)return Qy;rj=1,Qy.read=g,Qy._findPartPaths=y;var i=tu(),e=Bd(),t=Ll().Result,n=zZ(),r=w7e().readXmlFromZipFile,s=D7e().createBodyReader,o=E7e().DocumentXmlReader,a=T7e(),l=A7e(),c=k7e(),d=S7e(),f=P7e(),m=I7e(),p=R7e().Files;function g(R,O,j){O=O||{},j=j||{};var B=new p({externalFileAccess:j.externalFileAccess,relativeToFile:O.path});return i.props({contentTypes:T(R),partPaths:y(R),docxFile:R,files:B}).also(function(U){return{styles:A(R,U.partPaths.styles)}}).also(function(U){return{numbering:S(R,U.partPaths.numbering,U.styles)}}).also(function(U){return{footnotes:D(U.partPaths.footnotes,U,function(F,H){return H?f.createFootnotesReader(F)(H):new t([])}),endnotes:D(U.partPaths.endnotes,U,function(F,H){return H?f.createEndnotesReader(F)(H):new t([])}),comments:D(U.partPaths.comments,U,function(F,H){return H?m.createCommentsReader(F)(H):new t([])})}}).also(function(U){return{notes:U.footnotes.flatMap(function(F){return U.endnotes.map(function(H){return new e.Notes(F.concat(H))})})}}).then(function(U){return D(U.partPaths.mainDocument,U,function(F,H){return U.notes.flatMap(function(L){return U.comments.flatMap(function(W){var G=new o({bodyReader:F,notes:L,comments:W});return G.convertXmlToDocument(H)})})})})}function y(R){return I(R).then(function(O){var j=v({docxFile:R,relationships:O,relationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",basePath:"",fallbackPath:"word/document.xml"});if(!R.exists(j))throw new Error("Could not find main document part. Are you sure this is a valid .docx file?");return C({filename:E(j),readElement:a.readRelationships,defaultValue:a.defaultValue})(R).then(function(B){function U(F){return v({docxFile:R,relationships:B,relationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/"+F,basePath:n.splitPath(j).dirname,fallbackPath:"word/"+F+".xml"})}return{mainDocument:j,comments:U("comments"),endnotes:U("endnotes"),footnotes:U("footnotes"),numbering:U("numbering"),styles:U("styles")}})})}function v(R){var O=R.docxFile,j=R.relationships,B=R.relationshipType,U=R.basePath,F=R.fallbackPath,H=j.findTargetsByType(B),L=H.map(function(G){return x(n.joinPath(U,G),"/")}),W=L.filter(function(G){return O.exists(G)});return W.length===0?F:W[0]}function x(R,O){return R.substring(0,O.length)===O?R.substring(O.length):R}function C(R){return function(O){return r(O,R.filename).then(function(j){return j?R.readElement(j):R.defaultValue})}}function D(R,O,j){var B=C({filename:E(R),readElement:a.readRelationships,defaultValue:a.defaultValue});return B(O.docxFile).then(function(U){var F=new s({relationships:U,contentTypes:O.contentTypes,docxFile:O.docxFile,numbering:O.numbering,styles:O.styles,files:O.files});return r(O.docxFile,R).then(function(H){return j(F,H)})})}function E(R){var O=n.splitPath(R);return n.joinPath(O.dirname,"_rels",O.basename+".rels")}var T=C({filename:"[Content_Types].xml",readElement:l.readContentTypesFromXml,defaultValue:l.defaultContentTypes});function S(R,O,j){return C({filename:O,readElement:function(B){return c.readNumberingXml(B,{styles:j})},defaultValue:c.defaultNumbering})(R)}function A(R,O){return C({filename:O,readElement:d.readStylesXml,defaultValue:d.defaultStyles})(R)}var I=C({filename:"_rels/.rels",readElement:a.readRelationships,defaultValue:a.defaultValue});return Qy}var av={},sj;function O7e(){if(sj)return av;sj=1;var i=yi,e=tu(),t=wP();av.writeStyleMap=o,av.readStyleMap=d;
485var n="http://schemas.zwobble.org/mammoth/style-map",r="mammoth/style-map",s="/"+r;function o(f,m){return f.write(r,m),a(f).then(function(){return l(f)})}function a(f){var m="word/_rels/document.xml.rels",p="http://schemas.openxmlformats.org/package/2006/relationships",g="{"+p+"}Relationship";return f.read(m,"utf8").then(t.readString).then(function(y){var v=y.children;c(v,g,"Id",{Id:"rMammothStyleMap",Type:n,Target:s});var x={"":p};return f.write(m,t.writeString(y,x))})}function l(f){var m="[Content_Types].xml",p="http://schemas.openxmlformats.org/package/2006/content-types",g="{"+p+"}Override";return f.read(m,"utf8").then(t.readString).then(function(y){var v=y.children;c(v,g,"PartName",{PartName:s,ContentType:"text/prs.mammoth.style-map"});var x={"":p};return f.write(m,t.writeString(y,x))})}function c(f,m,p,g){var y=i.find(f,function(v){return v.name===m&&v.attributes[p]===g[p]});y?y.attributes=g:f.push(t.element(m,g))}function d(f){return f.exists(r)?f.read(r,"utf8"):e.resolve(null)}return av}var lv={},Ru={},cl={},_c={},oj;function YZ(){if(oj)return _c;oj=1;var i=o2();function e(l,c,d){return n(i.element(l,c,{fresh:!1}),d)}function t(l,c,d){var f=i.element(l,c,{fresh:!0});return n(f,d)}function n(l,c){return{type:"element",tag:l,children:c||[]}}function r(l){return{type:"text",value:l}}var s={type:"forceWrite"};_c.freshElement=t,_c.nonFreshElement=e,_c.elementWithTag=n,_c.text=r,_c.forceWrite=s;var o={br:!0,hr:!0,img:!0,input:!0};function a(l){return l.children.length===0&&o[l.tag.tagName]}return _c.isVoidElement=a,_c}var fA,aj;function N7e(){if(aj)return fA;aj=1;var i=yi,e=YZ();function t(y){return n(c(y))}function n(y){var v=[];return y.map(r).forEach(function(x){l(v,x)}),v}function r(y){return s[y.type](y)}var s={element:o,text:a,forceWrite:a};function o(y){return e.elementWithTag(y.tag,n(y.children))}function a(y){return y}function l(y,v){var x=y[y.length-1];v.type==="element"&&!v.tag.fresh&&x&&x.type==="element"&&v.tag.matchesElement(x.tag)?(v.tag.separator&&l(x.children,e.text(v.tag.separator)),v.children.forEach(function(C){l(x.children,C)})):y.push(v)}function c(y){return d(y,function(v){return f[v.type](v)})}function d(y,v){return i.flatten(i.map(y,v),!0)}var f={element:p,text:g,forceWrite:m};function m(y){return[y]}function p(y){var v=c(y.children);return v.length===0&&!e.isVoidElement(y)?[]:[e.elementWithTag(y.tag,v)]}function g(y){return y.value.length===0?[]:[y]}return fA=t,fA}var lj;function s2(){if(lj)return cl;lj=1;var i=YZ();cl.freshElement=i.freshElement,cl.nonFreshElement=i.nonFreshElement,cl.elementWithTag=i.elementWithTag,cl.text=i.text,cl.forceWrite=i.forceWrite,cl.simplify=N7e();function e(o,a){a.forEach(function(l){t(o,l)})}function t(o,a){n[a.type](o,a)}var n={element:r,text:s,forceWrite:function(){}};function r(o,a){i.isVoidElement(a)?o.selfClosing(a.tag.tagName,a.tag.attributes):(o.open(a.tag.tagName,a.tag.attributes),e(o,a.children),o.close(a.tag.tagName))}function s(o,a){o.text(a.value)}return cl.write=e,cl}var cj;function o2(){if(cj)return Ru;cj=1;var i=yi,e=s2();Ru.topLevelElement=t,Ru.elements=n,Ru.element=s;function t(a,l){return n([s(a,l,{fresh:!0})])}function n(a){return new r(a.map(function(l){return i.isString(l)?s(l):l}))}function r(a){this._elements=a}r.prototype.wrap=function(l){for(var c=l(),d=this._elements.length-1;d>=0;d--)c=this._elements[d].wrapNodes(c);return c};function s(a,l,c){return c=c||{},new o(a,l,c)}function o(a,l,c){var d={};i.isArray(a)?(a.forEach(function(f){d[f]=!0}),a=a[0]):d[a]=!0,this.tagName=a,this.tagNames=d,this.attributes=l||{},this.fresh=c.fresh,this.separator=c.separator}return o.prototype.matchesElement=function(a){return this.tagNames[a.tagName]&&i.isEqual(this.attributes||{},a.attributes||{})},o.prototype.wrap=function(l){return this.wrapNodes(l())},o.prototype.wrapNodes=function(l){return[e.elementWithTag(this,l)]},Ru.empty=n([]),Ru.ignore={wrap:function(){return[]}},Ru}var hA={},uj;function KZ(){return uj||(uj=1,(function(i){var e=yi,t=tu(),n=s2();i.imgElement=r;function r(s){return function(o,a){return t.when(s(o)).then(function(l){var c={};return o.altText&&(c.alt=o.altText),e.extend(c,l),[n.freshElement("img",c)]})}}i.inline=i.imgElement,i.dataUri=r(function(s){return s.readAsBase64String().then(function(o){return{src:"data:"+s.contentType+";base64,"+o}})})})(hA)),hA}var mA={},pA={},dj;function B7e(){if(dj)return pA;dj=1;var i=yi;pA.writer=e;function e(a){return a=a||{},a.prettyPrint?n():r()}var t={div:!0,p:!0,ul:!0,li:!0};function n(){var a=0,l="  ",c=[],d=!0,f=!1,m=r();
485function p(T,S){t[T]&&D(),c.push(T),m.open(T,S),t[T]&&a++,d=!1}function g(T){t[T]&&(a--,D()),c.pop(),m.close(T)}function y(T){C();var S=E()?T:T.replace(`
486`,`
487`+l);m.text(S)}function v(T,S){D(),m.selfClosing(T,S)}function x(){return c.length===0||t[c[c.length-1]]}function C(){f||(D(),f=!0)}function D(){if(f=!1,!d&&x()&&!E()){m._append(`
488`);for(var T=0;T<a;T++)m._append(l)}}function E(){return i.some(c,function(T){return T==="pre"})}return{asString:m.asString,open:p,close:g,text:y,selfClosing:v}}function r(){var a=[];function l(y,v){var x=f(v);a.push("<"+y+x+">")}function c(y){a.push("</"+y+">")}function d(y,v){var x=f(v);a.push("<"+y+x+" />")}function f(y){return i.map(y,function(v,x){return" "+x+'="'+o(v)+'"'}).join("")}function m(y){a.push(s(y))}function p(y){a.push(y)}function g(){return a.join("")}return{asString:g,open:l,close:c,text:m,selfClosing:d,_append:p}}function s(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function o(a){return a.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}return pA}var gA={},fj;function M7e(){if(fj)return gA;fj=1;var i=yi;function e(f){return t(f,f)}function t(f,m){return function(){return{start:f,end:m}}}function n(f){var m=f.href||"";return m?{start:"[",end:"]("+m+")",anchorPosition:"before"}:{}}function r(f){var m=f.src||"",p=f.alt||"";return m||p?{start:"!["+p+"]("+m+")"}:{}}function s(f){return function(m,p){return{start:p?`
489`:"",end:p?"":`
490`,list:{isOrdered:f.isOrdered,indent:p?p.indent+1:0,count:0}}}}function o(f,m,p){m=m||{indent:0,isOrdered:!1,count:0},m.count++,p.hasClosed=!1;var g=m.isOrdered?m.count+".":"-",y=l("	",m.indent)+g+" ";return{start:y,end:function(){if(!p.hasClosed)return p.hasClosed=!0,`
491`}}}var a={p:t("",`
492
493`),br:t("",`  
494`),ul:s({isOrdered:!1}),ol:s({isOrdered:!0}),li:o,strong:e("__"),em:e("*"),a:n,img:r};(function(){for(var f=1;f<=6;f++)a["h"+f]=t(l("#",f)+" ",`
495
496`)})();function l(f,m){return new Array(m+1).join(f)}function c(){var f=[],m=[],p=null,g={};function y(T,S){S=S||{};var A=a[T]||function(){return{}},I=A(S,p,g);m.push({end:I.end,list:p}),I.list&&(p=I.list);var R=I.anchorPosition==="before";R&&v(S),f.push(I.start||""),R||v(S)}function v(T){T.id&&f.push('<a id="'+T.id+'"></a>')}function x(T){var S=m.pop();p=S.list;var A=i.isFunction(S.end)?S.end():S.end;f.push(A||"")}function C(T,S){y(T,S),x()}function D(T){f.push(d(T))}function E(){return f.join("")}return{asString:E,open:y,close:x,text:D,selfClosing:C}}gA.writer=c;function d(f){return f.replace(/\\/g,"\\\\").replace(/([\`\*_\{\}\[\]\(\)\#\+\-\.\!])/g,"\\$1")}return gA}var hj;function L7e(){if(hj)return mA;hj=1;var i=B7e(),e=M7e();mA.writer=t;function t(n){return n=n||{},n.outputFormat==="markdown"?e.writer():i.writer(n)}return mA}var mj;function U7e(){if(mj)return lv;mj=1;var i=yi,e=tu(),t=Bd(),n=o2(),r=Ll(),s=KZ(),o=s2(),a=L7e();lv.DocumentConverter=l;function l(v){return{convertToHtml:function(x){var C=i.indexBy(x.type===t.types.document?x.comments:[],"commentId"),D=new c(v,C);return D.convertToHtml(x)}}}function c(v,x){var C=1,D=[],E=[];v=i.extend({ignoreEmptyParagraphs:!0},v);var T=v.idPrefix===void 0?"":v.idPrefix,S=v.ignoreEmptyParagraphs,A=n.topLevelElement("p"),I=v.styleMap||[];function R(N){var te=[],ne=j(N,te,{}),Z=[];g(ne,function(le){le.type==="deferred"&&Z.push(le)});var Q={};return e.mapSeries(Z,function(le){return le.value().then(function(we){Q[le.id]=we})}).then(function(){function le(xe){return p(xe,function(fe){return fe.type==="deferred"?Q[fe.id]:fe.children?[i.extend({},fe,{children:le(fe.children)})]:[fe]})}var we=a.writer({prettyPrint:v.prettyPrint,outputFormat:v.outputFormat});return o.write(we,o.simplify(le(ne))),new r.Result(we.asString(),te)})}function O(N,te,ne){return p(N,function(Z){return j(Z,te,ne)})}function j(N,te,ne){if(!ne)throw new Error("options not set");var Z=Re[N.type];return Z?Z(N,te,ne):[]}function B(N,te,ne){return U(N,te).wrap(function(){var Z=O(N.children,te,ne);return S?Z:[o.forceWrite].concat(Z)})}function U(N,te){var ne=W(N);return ne?ne.to:(N.styleId&&te.push(m("paragraph",N)),A)}function F(N,te,ne){var Z=function(){return O(N.children,te,ne)},Q=[];if(N.highlight!==null){var le=L({type:"highlight",color:N.highlight});le&&Q.push(le)}N.isSmallCaps&&Q.push(H("smallCaps")),N.isAllCaps&&Q.push(H("allCaps")),N.isStrikethrough&&Q.push(H("strikethrough","s")),N.isUnderline&&Q.push(H("underline")),N.verticalAlignment===t.verticalAlignment.
496subscript&&Q.push(n.element("sub",{},{fresh:!1})),N.verticalAlignment===t.verticalAlignment.superscript&&Q.push(n.element("sup",{},{fresh:!1})),N.isItalic&&Q.push(H("italic","em")),N.isBold&&Q.push(H("bold","strong"));var we=n.empty,xe=W(N);return xe?we=xe.to:N.styleId&&te.push(m("run",N)),Q.push(we),Q.forEach(function(fe){Z=fe.wrap.bind(fe,Z)}),Z()}function H(N,te){var ne=L({type:N});return ne||(te?n.element(te,{},{fresh:!1}):n.empty)}function L(N,te){var ne=W(N);return ne?ne.to:te}function W(N){for(var te=0;te<I.length;te++)if(I[te].from.matches(N))return I[te]}function G(N){return function(te,ne){return e.attempt(function(){return N(te,ne)}).caught(function(Z){return ne.push(r.error(Z)),[]})}}function Y(N){return V(N.noteType,N.noteId)}function ie(N){return q(N.noteType,N.noteId)}function V(N,te){return $(N+"-"+te)}function q(N,te){return $(N+"-ref-"+te)}function $(N){return T+N}var J=n.elements([n.element("table",{},{fresh:!0})]);function ce(N,te,ne){return L(N,J).wrap(function(){return se(N,te,ne)})}function se(N,te,ne){var Z=i.findIndex(N.children,function(xe){return!xe.type===t.types.tableRow||!xe.isHeader});Z===-1&&(Z=N.children.length);var Q;if(Z===0)Q=O(N.children,te,i.extend({},ne,{isTableHeader:!1}));else{var le=O(N.children.slice(0,Z),te,i.extend({},ne,{isTableHeader:!0})),we=O(N.children.slice(Z),te,i.extend({},ne,{isTableHeader:!1}));Q=[o.freshElement("thead",{},le),o.freshElement("tbody",{},we)]}return[o.forceWrite].concat(Q)}function ge(N,te,ne){var Z=O(N.children,te,ne);return[o.freshElement("tr",{},[o.forceWrite].concat(Z))]}function ye(N,te,ne){var Z=ne.isTableHeader?"th":"td",Q=O(N.children,te,ne),le={};return N.colSpan!==1&&(le.colspan=N.colSpan.toString()),N.rowSpan!==1&&(le.rowspan=N.rowSpan.toString()),[o.freshElement(Z,le,[o.forceWrite].concat(Q))]}function Pe(N,te,ne){return L(N,n.ignore).wrap(function(){var Z=x[N.commentId],Q=E.length+1,le="["+y(Z)+Q+"]";return E.push({label:le,comment:Z}),[o.freshElement("a",{href:"#"+V("comment",N.commentId),id:q("comment",N.commentId)},[o.text(le)])]})}function Ve(N,te,ne){var Z=N.label,Q=N.comment,le=O(Q.body,te,ne).concat([o.nonFreshElement("p",{},[o.text(" "),o.freshElement("a",{href:"#"+q("comment",Q.commentId)},[o.text("↑")])])]);return[o.freshElement("dt",{id:V("comment",Q.commentId)},[o.text("Comment "+Z)]),o.freshElement("dd",{},le)]}function Ze(N,te,ne){return dt(N).wrap(function(){return[]})}function dt(N){var te=W(N);return te?te.to:N.breakType==="line"?n.topLevelElement("br"):n.empty}var Re={document:function(N,te,ne){var Z=O(N.children,te,ne),Q=D.map(function(we){return N.notes.resolve(we)}),le=O(Q,te,ne);return Z.concat([o.freshElement("ol",{},le),o.freshElement("dl",{},p(E,function(we){return Ve(we,te,ne)}))])},paragraph:B,run:F,text:function(N,te,ne){return[o.text(N.value)]},tab:function(N,te,ne){return[o.text("	")]},hyperlink:function(N,te,ne){var Z=N.anchor?"#"+$(N.anchor):N.href,Q={href:Z};N.targetFrame!=null&&(Q.target=N.targetFrame);var le=O(N.children,te,ne);return[o.nonFreshElement("a",Q,le)]},checkbox:function(N){var te={type:"checkbox"};return N.checked&&(te.checked="checked"),[o.freshElement("input",te)]},bookmarkStart:function(N,te,ne){var Z=o.freshElement("a",{id:$(N.name)},[o.forceWrite]);return[Z]},noteReference:function(N,te,ne){D.push(N);var Z=o.freshElement("a",{href:"#"+Y(N),id:ie(N)},[o.text("["+C+++"]")]);return[o.freshElement("sup",{},[Z])]},note:function(N,te,ne){var Z=O(N.body,te,ne),Q=o.elementWithTag(n.element("p",{},{fresh:!1}),[o.text(" "),o.freshElement("a",{href:"#"+ie(N)},[o.text("↑")])]),le=Z.concat([Q]);return o.freshElement("li",{id:Y(N)},le)},commentReference:Pe,comment:Ve,image:f(G(v.convertImage||s.dataUri)),table:ce,tableRow:ge,tableCell:ye,break:Ze};return{convertToHtml:R}}var d=1;function f(v){return function(x,C,D){return[{type:"deferred",id:d++,value:function(){return v(x,C,D)}}]}}function m(v,x){return r.warning("Unrecognised "+v+" style: '"+x.styleName+"' (Style ID: "+x.styleId+")")}function p(v,x){return i.flatten(v.map(x),!0)}function g(v,x){v.forEach(function(C){x(C),C.children&&g(C.children,x)})}var y=lv.commentAuthorLabel=function(x){return x.authorInitials||""};return lv}var bA={},pj;
496function V7e(){if(pj)return bA;pj=1;var i=Bd();function e(t){if(t.type==="text")return t.value;if(t.type===i.types.tab)return"	";var n=t.type==="paragraph"?`
497
498`:"";return(t.children||[]).map(e).join("")+n}return bA.convertElementToRawText=e,bA}var Rp={},Co={},yA={},vA={exports:{}},gj;function j7e(){if(gj)return vA.exports;gj=1;var i=vA.exports=function(e,t){this._tokens=e,this._startIndex=t||0};return i.prototype.head=function(){return this._tokens[this._startIndex]},i.prototype.tail=function(e){return new i(this._tokens,this._startIndex+1)},i.prototype.toArray=function(){return this._tokens.slice(this._startIndex)},i.prototype.end=function(){return this._tokens[this._tokens.length-1]},i.prototype.to=function(e){var t=this.head().source,n=e.head()||e.end();return t.to(n.source)},vA.exports}var bj;function z7e(){if(bj)return yA;bj=1;var i=j7e();return yA.Parser=function(e){var t=function(n,r){return n(new i(r))};return{parseTokens:t}},yA}var wA={},xA={},yj;function W7e(){return yj||(yj=1,(function(i){i.none=Object.create({value:function(){throw new Error("Called value on none")},isNone:function(){return!0},isSome:function(){return!1},map:function(){return i.none},flatMap:function(){return i.none},filter:function(){return i.none},toArray:function(){return[]},orElse:e,valueOrElse:e});function e(n){return typeof n=="function"?n():n}i.some=function(n){return new t(n)};var t=function(n){this._value=n};t.prototype.value=function(){return this._value},t.prototype.isNone=function(){return!1},t.prototype.isSome=function(){return!0},t.prototype.map=function(n){return new t(n(this._value))},t.prototype.flatMap=function(n){return n(this._value)},t.prototype.filter=function(n){return n(this._value)?this:i.none},t.prototype.toArray=function(){return[this._value]},t.prototype.orElse=function(n){return this},t.prototype.valueOrElse=function(n){return this._value},i.isOption=function(n){return n===i.none||n instanceof t},i.fromNullable=function(n){return n==null?i.none:new t(n)}})(xA)),xA}var _A,vj;function xP(){if(vj)return _A;vj=1,_A={failure:function(e,t){if(e.length<1)throw new Error("Failure must have errors");return new i({status:"failure",remaining:t,errors:e})},error:function(e,t){if(e.length<1)throw new Error("Failure must have errors");return new i({status:"error",remaining:t,errors:e})},success:function(e,t,n){return new i({status:"success",value:e,source:n,remaining:t,errors:[]})},cut:function(e){return new i({status:"cut",remaining:e,errors:[]})}};var i=function(e){this._value=e.value,this._status=e.status,this._hasValue=e.value!==void 0,this._remaining=e.remaining,this._source=e.source,this._errors=e.errors};return i.prototype.map=function(e){return this._hasValue?new i({value:e(this._value,this._source),status:this._status,remaining:this._remaining,source:this._source,errors:this._errors}):this},i.prototype.changeRemaining=function(e){return new i({value:this._value,status:this._status,remaining:e,source:this._source,errors:this._errors})},i.prototype.isSuccess=function(){return this._status==="success"||this._status==="cut"},i.prototype.isFailure=function(){return this._status==="failure"},i.prototype.isError=function(){return this._status==="error"},i.prototype.isCut=function(){return this._status==="cut"},i.prototype.value=function(){return this._value},i.prototype.remaining=function(){return this._remaining},i.prototype.source=function(){return this._source},i.prototype.errors=function(){return this._errors},_A}var CA={},wj;function XZ(){if(wj)return CA;wj=1,CA.error=function(e){return new i(e)};var i=function(e){this.expected=e.expected,this.actual=e.actual,this._location=e.location};return i.prototype.describe=function(){var e=this._location?this._location.describe()+`:
499`:"";return e+"Expected "+this.expected+`
500but got `+this.actual},i.prototype.lineNumber=function(){return this._location.lineNumber()},i.prototype.characterNumber=function(){return this._location.characterNumber()},CA}var DA={},xj;function H7e(){if(xj)return DA;xj=1,DA.fromArray=function(e){var t=0,n=function(){return t<e.length};return new i({hasNext:n,next:function(){if(n())return e[t++];throw new Error("No more elements")}})};var i=function(e){this._iterator=e};return i.prototype.map=function(e){var t=this._iterator;return new i({hasNext:function(){return t.hasNext()},next:function(){return e(t.next())}})},i.prototype.filter=function(e){var t=this._iterator,n=!1,r=!1,s,o=function(){if(!n)for(n=!0,r=!1;t.hasNext()&&!r;)s=t.next(),r=e(s)};return new i({hasNext:function(){return o(),r},next:function(){o();var a=s;return n=!1,a}})},i.prototype.first=function(){var e=this._iterator;return this._iterator.hasNext()?e.next():null},i.prototype.toArray=function(){for(var e=[];this._iterator.hasNext();)e.push(this._iterator.next());return e},DA}var _j;function QZ(){return _j||(_j=1,(function(i){var e=yi,t=W7e(),n=xP(),r=XZ(),s=H7e();i.token=function(m,p){var g=p!==void 0;return function(y){var v=y.head();if(v&&v.name===m&&(!g||v.value===p))return n.success(v.value,y.tail(),v.source);var x=d({name:m,value:p});return f(y,x)}},i.tokenOfType=function(m){return i.token(m)},i.firstOf=function(m,p){return e.isArray(p)||(p=Array.prototype.slice.call(arguments,1
500)),function(g){return s.fromArray(p).map(function(y){return y(g)}).filter(function(y){return y.isSuccess()||y.isError()}).first()||f(g,m)}},i.then=function(m,p){return function(g){var y=m(g);return y.map||console.log(y),y.map(p)}},i.sequence=function(){var m=Array.prototype.slice.call(arguments,0),p=function(y){var v=e.foldl(m,function(C,D){var E=C.result,T=C.hasCut;if(!E.isSuccess())return{result:E,hasCut:T};var S=D(E.remaining());if(S.isCut())return{result:E,hasCut:!0};if(S.isSuccess()){var A;D.isCaptured?A=E.value().withValue(D,S.value()):A=E.value();var I=S.remaining(),R=y.to(I);return{result:n.success(A,I,R),hasCut:T}}else return T?{result:n.error(S.errors(),S.remaining()),hasCut:T}:{result:S,hasCut:T}},{result:n.success(new o,y),hasCut:!1}).result,x=y.to(v.remaining());return v.map(function(C){return C.withValue(i.sequence.source,x)})};p.head=function(){var y=e.find(m,g);return i.then(p,i.sequence.extract(y))},p.map=function(y){return i.then(p,function(v){return y.apply(this,v.toArray())})};function g(y){return y.isCaptured}return p};var o=function(m,p){this._values=m||{},this._valuesArray=p||[]};o.prototype.withValue=function(m,p){if(m.captureName&&m.captureName in this._values)throw new Error('Cannot add second value for capture "'+m.captureName+'"');var g=e.clone(this._values);g[m.captureName]=p;var y=this._valuesArray.concat([p]);return new o(g,y)},o.prototype.get=function(m){if(m.captureName in this._values)return this._values[m.captureName];throw new Error('No value for capture "'+m.captureName+'"')},o.prototype.toArray=function(){return this._valuesArray},i.sequence.capture=function(m,p){var g=function(){return m.apply(this,arguments)};return g.captureName=p,g.isCaptured=!0,g},i.sequence.extract=function(m){return function(p){return p.get(m)}},i.sequence.applyValues=function(m){var p=Array.prototype.slice.call(arguments,1);return function(g){var y=p.map(function(v){return g.get(v)});return m.apply(this,y)}},i.sequence.source={captureName:"☃source☃"},i.sequence.cut=function(){return function(m){return n.cut(m)}},i.optional=function(m){return function(p){var g=m(p);return g.isSuccess()?g.map(t.some):g.isFailure()?n.success(t.none,p):g}},i.zeroOrMoreWithSeparator=function(m,p){return c(m,p,!1)},i.oneOrMoreWithSeparator=function(m,p){return c(m,p,!0)};var a=i.zeroOrMore=function(m){return function(p){for(var g=[],y;(y=m(p))&&y.isSuccess();)p=y.remaining(),g.push(y.value());return y.isError()?y:n.success(g,p)}};i.oneOrMore=function(m){return i.oneOrMoreWithSeparator(m,l)};function l(m){return n.success(null,m)}var c=function(m,p,g){return function(y){var v=m(y);if(v.isSuccess()){var x=i.sequence.capture(m,"main"),C=a(i.then(i.sequence(p,x),i.sequence.extract(x))),D=C(v.remaining());
500return n.success([v.value()].concat(D.value()),D.remaining())}else return g||v.isError()?v:n.success([],y)}};i.leftAssociative=function(m,p,g){var y;g?y=[{func:g,rule:p}]:y=p,y=y.map(function(x){return i.then(x.rule,function(C){return function(D,E){return x.func(D,C,E)}})});var v=i.firstOf.apply(null,["rules"].concat(y));return function(x){var C=x,D=m(x);if(!D.isSuccess())return D;for(var E=v(D.remaining());E.isSuccess();){var T=E.remaining(),S=C.to(E.remaining()),A=E.value();D=n.success(A(D.value(),S),T,S),E=v(D.remaining())}return E.isError()?E:D}},i.leftAssociative.firstOf=function(){return Array.prototype.slice.call(arguments,0)},i.nonConsuming=function(m){return function(p){return m(p).changeRemaining(p)}};var d=function(m){return m.value?m.name+' "'+m.value+'"':m.name};function f(m,p){var g,y=m.head();return y?g=r.error({expected:p,actual:d(y),location:y.source}):g=r.error({expected:p,actual:"end of tokens"}),n.failure([g],m)}})(wA)),wA}var EA={exports:{}},Cj;function ZZ(){if(Cj)return EA.exports;Cj=1,EA.exports=function(e,t){var n={asString:function(){return e},range:function(r,s){return new i(e,t,r,s)}};return n};var i=function(e,t,n,r){this._string=e,this._description=t,this._startIndex=n,this._endIndex=r};return i.prototype.to=function(e){return new i(this._string,this._description,this._startIndex,e._endIndex)},i.prototype.describe=function(){var e=this._position(),t=this._description?this._description+`
501`:"";return t+"Line number: "+e.lineNumber+`
502Character number: `+e.characterNumber},i.prototype.lineNumber=function(){return this._position().lineNumber},i.prototype.characterNumber=function(){return this._position().characterNumber},i.prototype._position=function(){for(var e=this,t=0,n=function(){return e._string.indexOf(`
503`,t)},r=1;n()!==-1&&n()<this._startIndex;)t=n()+1,r+=1;var s=this._startIndex-t+1;return{lineNumber:r,characterNumber:s}},EA.exports}var TA,Dj;function JZ(){return Dj||(Dj=1,TA=function(i,e,t){this.name=i,this.value=e,t&&(this.source=t)}),TA}var AA={},Ej;function q7e(){return Ej||(Ej=1,(function(i){var e=QZ(),t=xP();i.parser=function(s,o,a){var l={rule:m,leftAssociative:p,rightAssociative:g},c=new n(a.map(f)),d=e.firstOf(s,o);function f(x){return{name:x.name,rule:r(x.ruleBuilder.bind(null,l))}}function m(){return y(c)}function p(x){return y(c.untilExclusive(x))}function g(x){return y(c.untilInclusive(x))}function y(x){return v.bind(null,x)}function v(x,C){var D=d(C);return D.isSuccess()?x.apply(D):D}return l};function n(s){function o(f){return new n(s.slice(0,l().indexOf(f)))}function a(f){return new n(s.slice(0,l().indexOf(f)+1))}function l(){return s.map(function(f){return f.name})}function c(f){for(var m,p;;)if(m=d(f.remaining()),m.isSuccess())p=f.source().to(m.source()),f=t.success(m.value()(f.value(),p),m.remaining(),p);else return m.isFailure()?f:m}function d(f){return e.firstOf("infix",s.map(function(m){return m.rule}))(f)}return{apply:c,untilExclusive:o,untilInclusive:a}}i.infix=function(s,o){function a(l){return i.infix(s,function(c){var d=o(c);return function(f){var m=d(f);return m.map(function(p){return function(g,y){return l(g,p,y)}})}})}return{name:s,ruleBuilder:o,map:a}};var r=function(s){var o;return function(a){return o||(o=s()),o(a)}}})(AA)),AA}var kA={},Tj;function $7e(){if(Tj)return kA;Tj=1;var i=JZ(),e=ZZ();kA.RegexTokeniser=t;function t(n){n=n.map(function(a){return{name:a.name,regex:new RegExp(a.regex.source,"g")}});function r(a,l){for(var c=new e(a,l),d=0,f=[];d<a.length;){var m=s(a,d,c);d=m.endIndex,f.push(m.token)}return f.push(o(a,c)),f}function s(a,l,c){for(var d=0;d<n.length;d++){var f=n[d].regex;f.lastIndex=l;var m=f.exec(a);if(m){var g=l+m[0].length;if(m.index===l&&g>l){var p=m[1],y=new i(n[d].name,p,c.range(l,g));return{token:y,endIndex:g}}}}var g=l+1,y=new i("unrecognisedCharacter",a.substring(l,g),c.range(l,g));return{token:y,endIndex:g}}function o(a,l){return new i("end",null,l.range(a.length,a.length))}return{tokenise:r}}return kA}var Aj;function eJ(){return Aj||(Aj=1,Co.Parser=z7e().Parser,Co.rules=QZ(),Co.errors=XZ(),Co.results=xP(),Co.StringSource=ZZ(),Co.Token=JZ(),Co.bottomUp=q7e(),Co.RegexTokeniser=$7e().RegexTokeniser,Co.rule=function(i){var e;return function(t){return e||(e=i()),e(t)}
503}),Co}var Ui={},kj;function G7e(){if(kj)return Ui;kj=1,Ui.paragraph=i,Ui.run=e,Ui.table=t,Ui.bold=new r("bold"),Ui.italic=new r("italic"),Ui.underline=new r("underline"),Ui.strikethrough=new r("strikethrough"),Ui.allCaps=new r("allCaps"),Ui.smallCaps=new r("smallCaps"),Ui.highlight=n,Ui.commentReference=new r("commentReference"),Ui.lineBreak=new o({breakType:"line"}),Ui.pageBreak=new o({breakType:"page"}),Ui.columnBreak=new o({breakType:"column"}),Ui.equalTo=l,Ui.startsWith=c;function i(m){return new r("paragraph",m)}function e(m){return new r("run",m)}function t(m){return new r("table",m)}function n(m){return new s(m)}function r(m,p){p=p||{},this._elementType=m,this._styleId=p.styleId,this._styleName=p.styleName,p.list&&(this._listIndex=p.list.levelIndex,this._listIsOrdered=p.list.isOrdered)}r.prototype.matches=function(m){return m.type===this._elementType&&(this._styleId===void 0||m.styleId===this._styleId)&&(this._styleName===void 0||m.styleName&&this._styleName.operator(this._styleName.operand,m.styleName))&&(this._listIndex===void 0||a(m,this._listIndex,this._listIsOrdered))&&(this._breakType===void 0||this._breakType===m.breakType)};function s(m){m=m||{},this._color=m.color}s.prototype.matches=function(m){return m.type==="highlight"&&(this._color===void 0||m.color===this._color)};function o(m){m=m||{},this._breakType=m.breakType}o.prototype.matches=function(m){return m.type==="break"&&(this._breakType===void 0||m.breakType===this._breakType)};function a(m,p,g){return m.numbering&&m.numbering.level==p&&m.numbering.isOrdered==g}function l(m){return{operator:d,operand:m}}function c(m){return{operator:f,operand:m}}function d(m,p){return m.toUpperCase()===p.toUpperCase()}function f(m,p){return p.toUpperCase().indexOf(m.toUpperCase())===0}return Ui}var SA={},Sj;function Y7e(){if(Sj)return SA;Sj=1;var i=eJ(),e=i.RegexTokeniser;SA.tokenise=n;var t="'((?:\\\\.|[^'])*)";function n(r){var s="(?:[a-zA-Z\\-_]|\\\\.)",o=new e([{name:"identifier",regex:new RegExp("("+s+"(?:"+s+"|[0-9])*)")},{name:"dot",regex:/\./},{name:"colon",regex:/:/},{name:"gt",regex:/>/},{name:"whitespace",regex:/\s+/},{name:"arrow",regex:/=>/},{name:"equals",regex:/=/},{name:"startsWith",regex:/\^=/},{name:"open-paren",regex:/\(/},{name:"close-paren",regex:/\)/},{name:"open-square-bracket",regex:/\[/},{name:"close-square-bracket",regex:/\]/},{name:"string",regex:new RegExp(t+"'")},{name:"unterminated-string",regex:new RegExp(t)},{name:"integer",regex:/([0-9]+)/},{name:"choice",regex:/\|/},{name:"bang",regex:/(!)/}]);return o.tokenise(r)}return SA}var Pj;function K7e(){if(Pj)return Rp;Pj=1;var i=yi,e=eJ(),t=G7e(),n=o2(),r=Y7e().tokenise,s=Ll();Rp.readHtmlPath=d,Rp.readDocumentMatcher=l,Rp.readStyle=o;function o(I){return E(A,I)}function a(){return e.rules.sequence(e.rules.sequence.capture(c()),e.rules.tokenOfType("whitespace"),e.rules.tokenOfType("arrow"),e.rules.sequence.capture(e.rules.optional(e.rules.sequence(e.rules.tokenOfType("whitespace"),e.rules.sequence.capture(f())).head())),e.rules.tokenOfType("end")).map(function(I,R){return{from:I,to:R.valueOrElse(n.empty)}})}function l(I){return E(c(),I)}function c(){var I=e.rules.sequence,R=function(Ve,Ze){return e.rules.then(e.rules.token("identifier",Ve),function(){return Ze})},O=R("p",t.paragraph),j=R("r",t.run),B=e.rules.firstOf("p or r or table",O,j),U=e.rules.sequence(e.rules.tokenOfType("dot"),e.rules.sequence.cut(),e.rules.sequence.capture(m)).map(function(Ve){return{styleId:Ve}}),F=e.rules.firstOf("style name matcher",e.rules.then(e.rules.sequence(e.rules.tokenOfType("equals"),e.rules.sequence.cut(),e.rules.sequence.capture(g)).head(),function(Ve){return{styleName:t.equalTo(Ve)}}),e.rules.then(e.rules.sequence(e.rules.tokenOfType("startsWith"),e.rules.sequence.cut(),e.rules.sequence.capture(g)).head(),function(Ve){return{styleName:t.startsWith(Ve)}})),H=e.rules.sequence(e.rules.tokenOfType("open-square-bracket"),e.rules.sequence.cut(),e.rules.token("identifier","style-name"),e.rules.sequence.capture(F),e.rules.tokenOfType("close-square-bracket")).head(),L=e.rules.firstOf("list type",R("ordered-list",{isOrdered:!0}
503),R("unordered-list",{isOrdered:!1})),W=I(e.rules.tokenOfType("colon"),I.capture(L),I.cut(),e.rules.tokenOfType("open-paren"),I.capture(p),e.rules.tokenOfType("close-paren")).map(function(Ve,Ze){return{list:{isOrdered:Ve.isOrdered,levelIndex:Ze-1}}});function G(Ve){var Ze=e.rules.firstOf.apply(e.rules.firstOf,["matcher suffix"].concat(Ve)),dt=e.rules.zeroOrMore(Ze);return e.rules.then(dt,function(Re){var N={};return Re.forEach(function(te){i.extend(N,te)}),N})}var Y=I(I.capture(B),I.capture(G([U,H,W]))).map(function(Ve,Ze){return Ve(Ze)}),ie=I(e.rules.token("identifier","table"),I.capture(G([U,H]))).map(function(Ve){return t.table(Ve)}),V=R("b",t.bold),q=R("i",t.italic),$=R("u",t.underline),J=R("strike",t.strikethrough),ce=R("all-caps",t.allCaps),se=R("small-caps",t.smallCaps),ge=I(e.rules.token("identifier","highlight"),e.rules.sequence.capture(e.rules.optional(e.rules.sequence(e.rules.tokenOfType("open-square-bracket"),e.rules.sequence.cut(),e.rules.token("identifier","color"),e.rules.tokenOfType("equals"),e.rules.sequence.capture(g),e.rules.tokenOfType("close-square-bracket")).head()))).map(function(Ve){return t.highlight({color:Ve.valueOrElse(void 0)})}),ye=R("comment-reference",t.commentReference),Pe=I(e.rules.token("identifier","br"),I.cut(),e.rules.tokenOfType("open-square-bracket"),e.rules.token("identifier","type"),e.rules.tokenOfType("equals"),I.capture(g),e.rules.tokenOfType("close-square-bracket")).map(function(Ve){switch(Ve){case"line":return t.lineBreak;case"page":return t.pageBreak;case"column":return t.columnBreak}});return e.rules.firstOf("element type",Y,ie,V,q,$,J,ce,se,ge,ye,Pe)}function d(I){return E(f(),I)}function f(){var I=e.rules.sequence.capture,R=e.rules.tokenOfType("whitespace"),O=e.rules.then(e.rules.optional(e.rules.sequence(e.rules.tokenOfType("colon"),e.rules.token("identifier","fresh"))),function(F){return F.map(function(){return!0}).valueOrElse(!1)}),j=e.rules.then(e.rules.optional(e.rules.sequence(e.rules.tokenOfType("colon"),e.rules.token("identifier","separator"),e.rules.tokenOfType("open-paren"),I(g),e.rules.tokenOfType("close-paren")).head()),function(F){return F.valueOrElse("")}),B=e.rules.oneOrMoreWithSeparator(m,e.rules.tokenOfType("choice")),U=e.rules.sequence(I(B),I(e.rules.zeroOrMore(D)),I(O),I(j)).map(function(F,H,L,W){var G={},Y={};return H.forEach(function(ie){ie.append&&G[ie.name]?G[ie.name]+=" "+ie.value:G[ie.name]=ie.value}),L&&(Y.fresh=!0),W&&(Y.separator=W),n.element(F,G,Y)});return e.rules.firstOf("html path",e.rules.then(e.rules.tokenOfType("bang"),function(){return n.ignore}),e.rules.then(e.rules.zeroOrMoreWithSeparator(U,e.rules.sequence(R,e.rules.tokenOfType("gt"),R)),n.elements))}var m=e.rules.then(e.rules.tokenOfType("identifier"),v),p=e.rules.tokenOfType("integer"),g=e.rules.then(e.rules.tokenOfType("string"),v),y={n:`
504`,r:"\r",t:"	"};function v(I){return I.replace(/\\(.)/g,function(R,O){return y[O]||O})}var x=e.rules.sequence(e.rules.tokenOfType("open-square-bracket"),e.rules.sequence.cut(),e.rules.sequence.capture(m),e.rules.tokenOfType("equals"),e.rules.sequence.capture(g),e.rules.tokenOfType("close-square-bracket")).map(function(I,R){return{name:I,value:R,append:!1}}),C=e.rules.sequence(e.rules.tokenOfType("dot"),e.rules.sequence.cut(),e.rules.sequence.capture(m)).map(function(I){return{name:"class",value:I,append:!0}}),D=e.rules.firstOf("attribute or class",x,C);function E(I,R){var O=r(R),j=e.Parser(),B=j.parseTokens(I,O);return B.isSuccess()?s.success(B.value()):new s.Result(null,[s.warning(T(R,B))])}function T(I,R){return"Did not understand this style mapping, so ignored it: "+I+`
505`+R.errors().map(S).join(`
506`)}function S(I){return"Error was at character number "+I.characterNumber()+": Expected "+I.expected+" but got "+I.actual}var A=a();return Rp}var Fp={},Ij;function X7e(){if(Ij)return Fp;Ij=1,Fp.readOptions=n;var i=yi,e=Fp._defaultStyleMap=["p.Heading1 => h1:fresh","p.Heading2 => h2:fresh","p.Heading3 => h3:fresh","p.Heading4 => h4:fresh","p.Heading5 => h5:fresh","p.Heading6 => h6:fresh","p[style-name='Heading 1'] => h1:fresh","p[style-name='Heading 2'] => h2:fresh","p[style-name='Heading 3'] => h3:fresh","p[style-name='Heading 4'] => h4:fresh","p[style-name='Heading 5'] => h5:fresh","p[style-name='Heading 6'] => h6:fresh","p[style-name='heading 1'] => h1:fresh","p[style-name='heading 2'] => h2:fresh","p[style-name='heading 3'] => h3:fresh","p[style-name='heading 4'] => h4:fresh","p[style-name='heading 5'] => h5:fresh","p[style-name='heading 6'] => h6:fresh","p.Heading => h1:fresh","p[style-name='Heading'] => h1:fresh","r[style-name='Strong'] => strong","p[style-name='footnote text'] => p:fresh","r[style-name='footnote reference'] =>","p[style-name='endnote text'] => p:fresh","r[style-name='endnote reference'] =>","p[style-name='annotation text'] => p:fresh","r[style-name='annotation reference'] =>","p[style-name='Footnote'] => p:fresh","r[style-name='Footnote anchor'] =>","p[style-name='Endnote'] => p:fresh","r[style-name='Endnote anchor'] =>","p:unordered-list(1) => ul > li:fresh","p:unordered-list(2) => ul|ol > li > ul > li:fresh","p:unordered-list(3) => ul|ol > li > ul|ol > li > ul > li:fresh","p:unordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ul > li:fresh","p:unordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ul > li:fresh","p:ordered-list(1) => ol > li:fresh","p:ordered-list(2) => ul|ol > li > ol > li:fresh","p:ordered-list(3) => ul|ol > li > ul|ol > li > ol > li:fresh","p:ordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ol > li:fresh","p:ordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ol >
506 li:fresh","r[style-name='Hyperlink'] =>","p[style-name='Normal'] => p:fresh","p.Body => p:fresh","p[style-name='Body'] => p:fresh"],t=Fp._standardOptions={externalFileAccess:!1,transformDocument:s,includeDefaultStyleMap:!0,includeEmbeddedStyleMap:!0};function n(o){return o=o||{},i.extend({},t,o,{customStyleMap:r(o.styleMap),readStyleMap:function(){var a=this.customStyleMap;return this.includeEmbeddedStyleMap&&(a=a.concat(r(this.embeddedStyleMap))),this.includeDefaultStyleMap&&(a=a.concat(e)),a}})}function r(o){return o?i.isString(o)?o.split(`
507`).map(function(a){return a.trim()}).filter(function(a){return a!==""&&a.charAt(0)!=="#"}):o:[]}function s(o){return o}return Fp}var PA={},Rj;function Q7e(){if(Rj)return PA;Rj=1;var i=tu(),e=zZ();PA.openZip=t;function t(n){return n.arrayBuffer?i.resolve(e.openArrayBuffer(n.arrayBuffer)):i.reject(new Error("Could not find file in options"))}return PA}var IA={},Fj;function Z7e(){if(Fj)return IA;Fj=1;var i=o2(),e=s2();IA.element=t;function t(n){return function(r){return e.elementWithTag(i.element(n),[r])}}return IA}var Oj;function J7e(){if(Oj)return eo;Oj=1;var i=yi,e=F7e(),t=O7e(),n=U7e().DocumentConverter,r=V7e().convertElementToRawText,s=K7e().readStyle,o=X7e().readOptions,a=Q7e(),l=Ll().Result;eo.convertToHtml=c,eo.convertToMarkdown=d,eo.convert=f,eo.extractRawText=y,eo.images=KZ(),eo.transforms=GZ(),eo.underline=Z7e(),eo.embedStyleMap=v,eo.readEmbeddedStyleMap=m;function c(x,C){return f(x,C)}function d(x,C){var D=Object.create(C||{});return D.outputFormat="markdown",f(x,D)}function f(x,C){return C=o(C),a.openZip(x).tap(function(D){return t.readStyleMap(D).then(function(E){C.embeddedStyleMap=E})}).then(function(D){return e.read(D,x,C).then(function(E){return E.map(C.transformDocument)}).then(function(E){return p(E,C)})})}function m(x){return a.openZip(x).then(t.readStyleMap)}function p(x,C){var D=g(C.readStyleMap()),E=i.extend({},C,{styleMap:D.value}),T=new n(E);return x.flatMapThen(function(S){return D.flatMapThen(function(A){return T.convertToHtml(S)})})}function g(x){return l.combine((x||[]).map(s)).map(function(C){return C.filter(function(D){return!!D})})}function y(x){return a.openZip(x).then(e.read).then(function(C){return C.map(r)})}function v(x,C){return a.openZip(x).tap(function(D){return t.writeStyleMap(D,C)}).then(function(D){return D.toArrayBuffer()}).then(function(D){return{toArrayBuffer:function(){return D},toBuffer:function(){return Buffer.from(D)}}})}return eo.styleMapping=function(){throw new Error(`Use a raw string instead of mammoth.styleMapping e.g. "p[style-name='Title'] => h1" instead of mammoth.styleMapping("p[style-name='Title'] => h1")`)},eo}var eLe=J7e();const Nj=kx(eLe),tLe=i=>i==null||typeof i=="string"&&i.trim()==="",Nf=(i,e,t)=>{const n=`<p>(?:<strong>)?\\[${e}\\](?:<\\/strong>)?<\\/p>`;if(!new RegExp(n,"i").test(i))return null;const s=t.map(a=>`<p>(?:<strong>)?\\[${a}\\](?:<\\/strong>)?<\\/p>`).join("|"),o=new RegExp(`${n}([\\s\\S]*?)(?=${s}|$)`,"i");return i.match(o)?.[1]?.trim()||""},RA=(i,e,t)=>{const n=`\\*{0,2}\\[${e}\\]\\*{0,2}`;if(!new RegExp(n,"i").test(i))return null;const s=t.map(a=>`\\*{0,2}\\[${a}\\]\\*{0,2}`).join("|"),o=new RegExp(`${n}([\\s\\S]*?)(?=${s}|$)`,"i");return i.match(o)?.[1]?.trim()||""},Md=async(i,e,t={})=>{const n=await i.arrayBuffer(),[r,s]=await Promise.all([Nj.convertToHtml({arrayBuffer:n}),Nj.extractRawText({arrayBuffer:n})]),o=r.value,a=s.value,l={meta_title:RA(a,"META_TITLE",["META_DESCRIPTION"]),meta_description:RA(a,"META_DESCRIPTION",["INTRO_H1"]),hero_section_heading:RA(a,"INTRO_H1",["INTRO_CONTENT"]),hero_section_content:Nf(o,"INTRO_CONTENT",["SECTION1"]),section1_right_content:Nf(o,"SECTION1",["SECTION2"]),section2_left_content:Nf(o,"SECTION2",["SECTION3"]),section2_right_content:Nf(o,"SECTION3",["SECTION4"]),section3_left_content:Nf(o,"SECTION4",["SECTION5"]),section3_right_content:Nf(o,"SECTION5",[""])};let c=Object.fromEntries(Object.entries(l).filter(([d,f])=>f!==null));return Object.keys(c).length===0?(console.warn("[parseDocHelper] No markers found in doc file"),{}):e==="edit"&&(c=Object.fromEntries(Object.entries(c).filter(([d])=>tLe(t[d]))),Object.keys(c).length===0)?(console.warn("[parseDocHelper] All fields already have content, skipping"),{}):c};
507function FA(){const i="state",[e,t]=M.useState({}),[n,r]=M.useState({}),[s]=$t(),{modeType:o,modeName:a}=_t(),l=s.get("id"),c=Mt();M.useEffect(()=>{(async()=>o=="edit"?C(l):Jt(x,e,t))()},[l]),M.useEffect(()=>{const E=e?.docFile?.[0];if(!E)return;const T=E?.originalFile||E?.file||null;T instanceof File&&Md(T,o,e).then(S=>{Object.keys(S).length!==0&&t(A=>({...A,...S}))}).catch(console.error)},[e?.docFile]);const d=[{type:"select",name:"isParent",title:"Parent Page",validate:"required",options:[{id:"1",value:"Parent (Root)"},{id:"0",value:"Child (No Root)"}],attrp:{class:"c1"}},{type:"text",name:"title",title:"Title",validate:"required",attrp:{class:"c2"}},{type:"text",name:"slug",title:"Slug",validate:"required",attrp:{class:"c2"}},{type:"text",name:"meta_title",title:"Meta Title",validate:"required",attrp:{class:"c1"}},{type:"textarea",name:"meta_description",title:"Meta Description",validate:"required",attrp:{class:"c2"}},{type:"textarea",name:"robots",title:"Robots",value:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",validate:"required",attrp:{class:"c2"}},{type:"text",name:"canonical_url",title:"Canonical Url",validate:"required",attrp:{class:"c2"}}],f=[{type:"fileBase64",name:"docFile",title:"Upload Content DOCX",attrp:{class:"c1",accept:".docx"}},{type:"textarea",name:"schema_json",title:"Schema Json",attrp:{class:"c1"}},{type:"text",name:"priority",title:"Priority",attrp:{class:"c1"}},{type:"select",name:"changefreq",title:"changefreq",options:[{id:"always",value:"always"},{id:"hourly",value:"hourly"},{id:"daily",value:"daily"},{id:"weekly",value:"weekly"},{id:"monthly",value:"monthly"},{id:"yearly",value:"yearly"},{id:"never",value:"never"}],attrp:{class:"c1"}},{type:"date",name:"lastmod",title:"lastmod",validate:"required",attrp:{class:"c1"}},{type:"select",name:"publishStatus",title:"Publish Status",validate:"required",options:[{id:"draft",value:"Draft"},{id:"pending",value:"Pending"},{id:"publish",value:"Publish"}],attrp:{class:"c2"}},{type:"checkbox",name:"isPopular",title:"Is Popular",attrp:{class:"c2"}}],m=[{type:"text",name:"hero_section_heading",title:"Heading",validate:"required",attrp:{class:"c1"}},{type:"editor",name:"hero_section_content",title:"Content",validate:"required",attrp:{class:"c1"}}],p=[{type:"fileBase64",name:"section1_left_image",title:"Left Image",validate:"required",attrp:{class:"c5"}},{type:"text",name:"section1_left_image_alt",title:"Left Image Alt",validate:"required",attrp:{class:"c5"}},{type:"text",name:"section1_left_image_title",title:"Left Image Title",attrp:{class:"c5"}},{type:"editor",name:"section1_right_content",title:"Right Content",validate:"required",attrp:{class:"c1"}}],g=[{type:"editor",name:"section2_left_content",title:"Left Content",validate:"required",attrp:{class:"c2"}},{type:"editor",name:"section2_right_content",title:"Right Content",validate:"required",attrp:{class:"c2"}}],y=[{type:"editor",name:"section3_left_content",title:"Left Content",validate:"required",attrp:{class:"c2"}},{type:"editor",name:"section3_right_content",title:"Right Content",validate:"required",attrp:{class:"c2"}}],v=[{type:"text",name:"faqHeading",title:"Faq Heading",attrp:{class:"c2"}},{type:"text",name:"faqSubheading",title:"Faq SubHeading",attrp:{class:"c2"}},{type:"add-row-table",frmGroup:"faqData",title:"form",fields:[{type:"text",name:"question",title:"Question"},{type:"text",name:"answer",title:"Answer"}]}],x={formArr:d,formArr4:f,heroSection:m,contentSection1:p,contentSection2:g,contentSection3:y,faqSection:v},C=async E=>{const T=await Ne({url:`/seo-state-page/${E}`,method:"get"});T?.status===!0&&sn(T.data,x,e,t)},D=async E=>{if(E?.preventDefault(),Xt(x,e,n,r)){const{docFile:S,...A}=e;(await Ne({url:l?`/seo-state-page/${l}`:"/seo-state-page",data:A,method:l?"put":"post",showLoading:!0}))?.status==!0&&c(`/${a}-list`)}};return M.useEffect(()=>{if(o=="edit"||o=="view"||!e?.title)return;const E=ql(e.title);let T=e?.isParent==="0"||e?.isParent===0?`${i}/${E}`:E;t(S=>({...S,slug:T,canonical_url:T}))},[e?.title,e?.isParent]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:D,id:"frmAddEdit",children:[w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Basic Detail"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:d,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})})]}),w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Other"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr4",frmArr:f,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Hero Section"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"heroSection",frmArr:m,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 1"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"
507contentSection1",frmArr:p,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 2"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection2",frmArr:g,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 3"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection3",frmArr:y,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Faq's"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"faqSection",frmArr:v,formStateData:e,setFormStateData:t,formError:n,setFormErrors:r})})]})]})]})}function Bj(){const i="/seo-state-page",e="stateID",t=[{type:"text",name:"stateID",title:"ID"},{type:"text",name:"title",title:"Page Title",params:{align:"left"}},{type:"text",name:"slug",title:"Page Slug",params:{align:"left"}}],n=[{title:"ID",name:"stateID",params:{align:"center",width:"1%"},pkId:!0},{title:"Page Title",name:"title",params:{align:"left"}},{title:"Slug",name:"slug",params:{align:"left"}},{title:"Is Popular",name:"isPopular",params:{align:"left"}},{title:"Publish Status",name:"publishStatus",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function Mj(){const i="/seo-city-page",e="cityID",t=[{type:"text",name:"cityID",title:"ID"},{type:"text",name:"title",title:"Page Title",params:{align:"left"}},{title:"Location",name:"location",params:{align:"left"}},{type:"text",name:"slug",title:"Page Slug",params:{align:"left"}}],n=[{title:"ID",name:"cityID",params:{align:"center",width:"1%"},pkId:!0},{title:"Page Title",name:"title",params:{align:"left"}},{title:"Slug",name:"slug",params:{align:"left"}},{title:"Is Popular",name:"isPopular",params:{align:"left"}},{title:"Publish Status",name:"publishStatus",params:{align:"left"}},{title:"Is Show HomePage",name:"isShowHomepage",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function OA(){const i="city",[e,t]=M.useState({}),[n,r]=M.useState([]),[s,o]=M.useState({}),[a]=$t(),{modeType:l,modeName:c}=_t(),d=a.get("id"),f=Mt();M.useEffect(()=>{(async()=>(m(),l=="edit"?T(d):Jt(E,e,t)))()},[d]);const m=async()=>{const A=await Ne({url:"/master/seo-state-page",method:"get"});if(A?.status===!0){const I=A?.data?.map(R=>({id:R?.slug?.split("/")?.[1]||"",value:R?.title}));r(I)}else r([])};M.useEffect(()=>{const A=e?.docFile?.[0];if(!A)return;const I=A?.originalFile||A?.file||null;I instanceof File&&Md(I,l,e).then(R=>{Object.keys(R).length!==0&&t(O=>({...O,...R}))}).catch(console.error)},[e?.docFile]);const p=M.useMemo(()=>{const A=e?.isParent==1||e?.isParent=="1",I=[{type:"select",name:"isParent",title:"Parent Page",validate:"required",options:[{id:"1",value:"Parent (Root)"},{id:"0",value:"Child (No Root)"}],attrp:{class:"c1"}}];return A||I.push({type:"select",name:"stateSlug",title:"State",validate:"required",options:n,attrp:{class:"c1"}}),I.push({name:"location",type:"async-select",title:"Location",validate:"required",loadOptions:R=>Kn(R,{allowCustomValue:!0}),attrp:{class:"c1"}},{type:"text",name:"title",title:"Title",validate:"required",attrp:{class:"c2"}},{type:"text",name:"slug",title:"Slug",validate:"required",attrp:{class:"c2"}},{type:"text",name:"meta_title",title:"Meta Title",validate:"required",attrp:{class:"c1"}},{type:"textarea",name:"meta_description",title:"Meta Description",validate:"required",attrp:{class:"c2"}},{type:"textarea",name:"robots",title:"Robots",validate:"required",value:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",attrp:{class:"c2"}},{type:"text",name:"canonical_url",title:"Canonical Url",validate:"required",attrp:{class:"c2"}}),I},[e?.isParent]),g=[{type:"fileBase64",name:"docFile",title:"Upload Content DOCX",attrp:{class:"c1",accept:".docx"}}
507,{type:"textarea",name:"schema_json",title:"Schema Json",attrp:{class:"c1"}},{type:"text",name:"priority",title:"Priority",attrp:{class:"c1"}},{type:"select",name:"changefreq",title:"changefreq",options:[{id:"always",value:"always"},{id:"hourly",value:"hourly"},{id:"daily",value:"daily"},{id:"weekly",value:"weekly"},{id:"monthly",value:"monthly"},{id:"yearly",value:"yearly"},{id:"never",value:"never"}],attrp:{class:"c1"}},{type:"date",name:"lastmod",title:"lastmod",validate:"required",attrp:{class:"c1"}},{type:"select",name:"publishStatus",title:"Publish Status",validate:"required",options:[{id:"draft",value:"Draft"},{id:"pending",value:"Pending"},{id:"publish",value:"Publish"}],attrp:{class:"c2"}},{type:"checkbox",name:"isPopular",title:"Is Popular",attrp:{class:"c2"}},{type:"checkbox",name:"isShowHomepage",title:"Is Show On Hompage",attrp:{class:"c2"}}],y=[{type:"text",name:"hero_section_heading",title:"Heading",validate:"required",attrp:{class:"c1"}},{type:"editor",name:"hero_section_content",title:"Content",validate:"required",attrp:{class:"c1"}}],v=[{type:"fileBase64",name:"section1_left_image",title:"Left Image",validate:"required",attrp:{class:"c5"}},{type:"text",name:"section1_left_image_alt",title:"Left Image Alt",validate:"required",attrp:{class:"c5"}},{type:"text",name:"section1_left_image_title",title:"Left Image Title",attrp:{class:"c5"}},{type:"editor",name:"section1_right_content",title:"Right Content",validate:"required",attrp:{class:"c1"}}],x=[{type:"editor",name:"section2_left_content",title:"Left Content",validate:"required",attrp:{class:"c2"}},{type:"editor",name:"section2_right_content",title:"Right Content",validate:"required",attrp:{class:"c2"}}],C=[{type:"editor",name:"section3_left_content",title:"Left Content",validate:"required",attrp:{class:"c2"}},{type:"editor",name:"section3_right_content",title:"Right Content",validate:"required",attrp:{class:"c2"}}],D=[{type:"text",name:"faqHeading",title:"Faq Heading",attrp:{class:"c2"}},{type:"text",name:"faqSubheading",title:"Faq SubHeading",attrp:{class:"c2"}},{type:"add-row-table",frmGroup:"faqData",title:"form",fields:[{type:"text",name:"question",title:"Question"},{type:"text",name:"answer",title:"Answer"}]}],E=M.useMemo(()=>({formArr:p,formArr4:g,heroSection:y,contentSection1:v,contentSection2:x,contentSection3:C,faqSection:D}),[p]),T=async A=>{const I=await Ne({url:`/seo-city-page/${A}`,method:"get"});I?.status===!0&&sn(I.data,E,e,t)},S=async A=>{if(A?.preventDefault(),Xt(E,e,s,o)){const{docFile:R,...O}=e;(await Ne({url:d?`/seo-city-page/${d}`:"/seo-city-page",data:O,method:d?"put":"post",showLoading:!0}))?.status==!0&&f(`/${c}-list`)}};return M.useEffect(()=>{if(l=="edit"||l=="view"||!e?.title)return;const A=ql(e.title);let I=e?.isParent==="0"||e?.isParent===0?`${i}/taxi-service-in-${A}`:A;t(R=>({...R,slug:I,canonical_url:I}))},[e?.title,e?.isParent]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:S,id:"frmAddEdit",children:[w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Basic Detail"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:p,formStateData:e,setFormStateData:t,formError:s,setFormErrors:o})})]}),w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Other"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr4",frmArr:g,formStateData:e,setFormStateData:t,formError:s,setFormErrors:o})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Hero Section"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"heroSection",frmArr:y,formStateData:e,setFormStateData:t,formError:s,setFormErrors:o})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 1"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection1",frmArr:v,formStateData:e,setFormStateData:t,formError:s,setFormErrors:o})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 2"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"
507contentSection2",frmArr:x,formStateData:e,setFormStateData:t,formError:s,setFormErrors:o})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 3"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection3",frmArr:C,formStateData:e,setFormStateData:t,formError:s,setFormErrors:o})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Faq's"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"faqSection",frmArr:D,formStateData:e,setFormStateData:t,formError:s,setFormErrors:o})})]})]})]})}function Lj(){const i="/seo-service-page",e="serviceID",t=[{type:"text",name:"serviceID",title:"ID"},{type:"text",name:"title",title:"Page Title",params:{align:"left"}},{type:"text",name:"slug",title:"Page Slug",params:{align:"left"}}],n=[{title:"ID",name:"serviceID",params:{align:"center",width:"1%"},pkId:!0},{title:"Page Title",name:"title",params:{align:"left"}},{title:"Slug",name:"slug",params:{align:"left"}},{title:"Is Popular",name:"isPopular",params:{align:"left"}},{title:"Publish Status",name:"publishStatus",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function NA(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{(async()=>s=="edit"?x(a):Jt(v,i,e))()},[a]),M.useEffect(()=>{const D=i?.docFile?.[0];if(!D)return;const E=D?.originalFile||D?.file||null;E instanceof File&&Md(E,s,i).then(T=>{Object.keys(T).length!==0&&e(S=>({...S,...T}))}).catch(console.error)},[i?.docFile]);const c=[{type:"text",name:"title",title:"Title",validate:"required",attrp:{class:"c2"}},{type:"text",name:"slug",title:"Slug",validate:"required",attrp:{class:"c2"}},{type:"text",name:"meta_title",title:"Meta Title",validate:"required",attrp:{class:"c1"}},{type:"textarea",name:"meta_description",title:"Meta Description",validate:"required",attrp:{class:"c2"}},{type:"textarea",name:"robots",title:"Robots",validate:"required",value:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",attrp:{class:"c2"}},{type:"text",name:"canonical_url",title:"Canonical Url",validate:"required",attrp:{class:"c2"}}],d=[{type:"fileBase64",name:"docFile",title:"Upload Content DOCX",attrp:{class:"c1",accept:".docx"}},{type:"textarea",name:"schema_json",title:"Schema Json",attrp:{class:"c1"}},{type:"text",name:"priority",title:"Priority",attrp:{class:"c1"}},{type:"select",name:"changefreq",title:"changefreq",options:[{id:"always",value:"always"},{id:"hourly",value:"hourly"},{id:"daily",value:"daily"},{id:"weekly",value:"weekly"},{id:"monthly",value:"monthly"},{id:"yearly",value:"yearly"},{id:"never",value:"never"}],attrp:{class:"c1"}},{type:"date",name:"lastmod",title:"lastmod",validate:"required",attrp:{class:"c1"}},{type:"select",name:"publishStatus",title:"Publish Status",validate:"required",options:[{id:"draft",value:"Draft"},{id:"pending",value:"Pending"},{id:"publish",value:"Publish"}],attrp:{class:"c2"}},{type:"checkbox",name:"isPopular",title:"Is Popular",attrp:{class:"c2"}}],f=[{type:"text",name:"hero_section_heading",title:"Heading",validate:"required",attrp:{class:"c1"}},{type:"editor",name:"hero_section_content",title:"Content",validate:"required",attrp:{class:"c1"}}],m=[{type:"fileBase64",name:"section1_left_image",title:"Left Image",validate:"required",attrp:{class:"c5"}},{type:"text",name:"section1_left_image_alt",title:"Left Image Alt",validate:"required",attrp:{class:"c5"}},{type:"text",name:"section1_left_image_title",title:"Left Image Title",attrp:{class:"c5"}},{type:"editor",name:"section1_right_content",title:"Right Content",validate:"required",attrp:{class:"c1"}}],p=[{type:"editor",name:"section2_left_content",title:"Left Content",validate:"required",attrp:{class:"c2"}},{type:"editor",name:"section2_right_content",title:"Right Content",validate:"required",attrp:{class:"c2"}}],g=[{type:"editor",name:"section3_left_content",title:"Left Content",validate:"required",attrp:{class:"c2"}},{type:"editor",name:"section3_right_content",title:"Right Content",validate:"required",attrp:{class:"c2"}}],y=[{type:"text",name:"faqHeading",title:"Faq Heading",attrp:{class:"c2"}},{type:"text",name:"faqSubheading",title:"Faq SubHeading",attrp:{class:"c2"}}
507,{type:"add-row-table",frmGroup:"faqData",title:"form",fields:[{type:"text",name:"question",title:"Question"},{type:"text",name:"answer",title:"Answer"}]}],v={formArr:c,formArr4:d,heroSection:f,contentSection1:m,contentSection2:p,contentSection3:g,faqSection:y},x=async D=>{const E=await Ne({url:`/seo-service-page/${D}`,method:"get"});E?.status===!0&&sn(E.data,v,i,e)},C=async D=>{if(D?.preventDefault(),Xt(v,i,t,n)){const{docFile:T,...S}=i;(await Ne({url:a?`/seo-service-page/${a}`:"/seo-service-page",data:S,method:a?"put":"post",showLoading:!0}))?.status==!0&&l(`/${o}-list`)}};return M.useEffect(()=>{if(s=="edit"||s=="view"||!i?.title)return;const D=ql(i.title);e(E=>({...E,slug:D,canonical_url:D}))},[i?.title]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:C,id:"frmAddEdit",children:[w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Basic Detail"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:c,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Other"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr4",frmArr:d,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Hero Section"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"heroSection",frmArr:f,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 1"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection1",frmArr:m,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 2"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection2",frmArr:p,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 3"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection3",frmArr:g,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Faq's"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"faqSection",frmArr:y,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]})]})]})}function Uj(){const i="/seo-city-to-city-page",e="cityToCityID",t=[{type:"text",name:"cityToCityID",title:"ID"},{type:"text",name:"title",title:"Page Title",params:{align:"left"}},{type:"text",name:"category",title:"Category",params:{align:"left"}},{type:"text",name:"slug",title:"Page Slug",params:{align:"left"}},{type:"text",name:"routeToLocation",title:"From Location",params:{align:"left"}},{type:"text",name:"routeToLocation",title:"To Location",params:{align:"left"}}],n=[{title:"ID",name:"cityToCityID",params:{align:"center",width:"1%"},pkId:!0},{title:"Page Title",name:"title",params:{align:"left"}},{title:"Category",name:"category",params:{align:"left"}},{title:"Slug",name:"slug",params:{align:"left"}},{title:"From Location",name:"routeFromLocation",params:{align:"left"}},{title:"To Location",name:"routeToLocation",params:{align:"left"}},{title:"Is Popular",name:"isPopular",params:{align:"left"}},{title:"Publish Status",name:"publishStatus",params:{align:"left"}},{title:"Is Show HomePage",name:"isShowHomepage",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function BA(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{(async()=>s=="edit"?x(a):Jt(v,i,e))()},[a]),M.useEffect(()=>{const D=i?.docFile?.[0];if(!D)return;const E=D?.originalFile||D?.file||null;E instanceof File&&Md(E,s,i).then(T=>{Object.keys(T).length!==0&&e(S=>({...S,...T}))}).catch(console.error)},[i?.docFile]);const c=[{name:"routeFromLocation",type:"async-select",title:"From Location",info:"For Route",validate:"required",loadOptions:D=>Kn(D,{allowCustomValue:!0}),attrp:{class:"c2"}},{name:"routeToLocation",type:"async-select",title:"To Location",info:"For Route",validate:"required",loadOptions:D=>Kn(D,{allowCustomValue:!0}),attrp:{class:"c2"}},{type:"text",name:"title",title:"Title",validate:"required",attrp:{class:"c2"}},{type:"text",name:"slug",title:"Slug",validate:"required",attrp:{class:"c2"}},{type:"text",name:"meta_title",title:"Meta Title",validate:"required",attrp:{class:"c1"}}
507,{type:"textarea",name:"meta_description",title:"Meta Description",validate:"required",attrp:{class:"c2"}},{type:"textarea",name:"robots",title:"Robots",validate:"required",value:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",attrp:{class:"c2"}},{type:"text",name:"canonical_url",title:"Canonical Url",validate:"required",attrp:{class:"c2"}}],d=[{type:"fileBase64",name:"docFile",title:"Upload Content DOCX",attrp:{class:"c1",accept:".docx"}},{type:"textarea",name:"schema_json",title:"Schema Json",attrp:{class:"c1"}},{type:"text",name:"priority",title:"Priority",attrp:{class:"c1"}},{type:"select",name:"changefreq",title:"changefreq",options:[{id:"always",value:"always"},{id:"hourly",value:"hourly"},{id:"daily",value:"daily"},{id:"weekly",value:"weekly"},{id:"monthly",value:"monthly"},{id:"yearly",value:"yearly"},{id:"never",value:"never"}],attrp:{class:"c1"}},{type:"date",name:"lastmod",title:"lastmod",validate:"required",attrp:{class:"c1"}},{type:"select",name:"publishStatus",title:"Publish Status",validate:"required",options:[{id:"draft",value:"Draft"},{id:"pending",value:"Pending"},{id:"publish",value:"Publish"}],attrp:{class:"c2"}},{type:"checkbox",name:"isPopular",title:"Is Popular",attrp:{class:"c2"}},{type:"checkbox",name:"isTopRoute",title:"Is Top Route",attrp:{class:"c2"}},{type:"checkbox",name:"isShowHomepage",title:"Is Show On Hompage",attrp:{class:"c2"}}],f=[{type:"text",name:"hero_section_heading",title:"Heading",validate:"required",attrp:{class:"c3"}},{type:"text",name:"route_distance",title:"Route Distance",info:"Kms",attrp:{class:"c3"},validate:"required, number"},{type:"text",name:"route_estimate_time",title:"Route Estimate Time",attrp:{class:"c3"},validate:"required"},{type:"editor",name:"hero_section_content",title:"Content",validate:"required",attrp:{class:"c1"}}],m=[{type:"fileBase64",name:"section1_left_image",title:"Left Image",validate:"required",attrp:{class:"c5"}},{type:"text",name:"section1_left_image_alt",title:"Left Image Alt",validate:"required",attrp:{class:"c5"}},{type:"text",name:"section1_left_image_title",title:"Left Image Title",attrp:{class:"c5"}},{type:"editor",name:"section1_right_content",title:"Right Content",validate:"required",attrp:{class:"c1"}}],p=[{type:"editor",name:"section2_left_content",title:"Left Content",validate:"required",attrp:{class:"c2"}},{type:"editor",name:"section2_right_content",title:"Right Content",validate:"required",attrp:{class:"c2"}}],g=[{type:"editor",name:"section3_left_content",title:"Left Content",validate:"required",attrp:{class:"c2"}},{type:"editor",name:"section3_right_content",title:"Right Content",validate:"required",attrp:{class:"c2"}}],y=[{type:"text",name:"faqHeading",title:"Faq Heading",attrp:{class:"c2"}},{type:"text",name:"faqSubheading",title:"Faq SubHeading",attrp:{class:"c2"}},{type:"add-row-table",frmGroup:"faqData",title:"form",fields:[{type:"text",name:"question",title:"Question"},{type:"text",name:"answer",title:"Answer"}]}],v={formArr:c,formArr4:d,heroSection:f,contentSection1:m,contentSection2:p,contentSection3:g,faqSection:y},x=async D=>{const E=await Ne({url:`/seo-city-to-city-page/${D}`,method:"get"});E?.status===!0&&sn(E.data,v,i,e)},C=async D=>{if(D?.preventDefault(),Xt(v,i,t,n)){const{docFile:T,...S}=i;(await Ne({url:a?`/seo-city-to-city-page/${a}`:"/seo-city-to-city-page",data:S,method:a?"put":"post",showLoading:!0}))?.status==!0&&l(`/${o}-list`)}};return M.useEffect(()=>{if(s=="edit"||s=="view"||!i?.title)return;let E=`outstation/${ql(i.title)}`;e(T=>({...T,slug:E,canonical_url:E}))},[i?.title]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:C,id:"frmAddEdit",children:[w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Basic Detail"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:c,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Other"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr4",frmArr:d,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Hero Section"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"heroSection",frmArr:f,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 1"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"
507contentSection1",frmArr:m,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 2"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection2",frmArr:p,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 3"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection3",frmArr:g,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Faq's"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"faqSection",frmArr:y,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]})]})]})}function Vj(){const i="/blogs",e="blogID",t=[{type:"text",name:"blogID",title:"ID"},{type:"text",name:"title",title:"Page Title",params:{align:"left"}},{type:"text",name:"slug",title:"Page Slug",params:{align:"left"}}],n=[{title:"ID",name:"blogID",params:{align:"center",width:"1%"},pkId:!0},{title:"Page Title",name:"title",params:{align:"left"}},{title:"Slug",name:"slug",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}const nLe="blog";function MA(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{(async()=>s=="edit"?g(a):Jt(p,i,e))()},[a]);const c=[{type:"text",name:"title",title:"Title",validate:"required",attrp:{class:"c2"}},{type:"text",name:"slug",title:"Slug",validate:"required",attrp:{class:"c2"}},{type:"text",name:"meta_title",title:"Meta Title",validate:"required",attrp:{class:"c1"}},{type:"textarea",name:"meta_description",title:"Meta Description",validate:"required",attrp:{class:"c2"}},{type:"textarea",name:"robots",title:"Robots",value:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",validate:"required",attrp:{class:"c2"}},{type:"text",name:"canonical_url",title:"Canonical Url",validate:"required",attrp:{class:"c2"}}],d=[{type:"textarea",name:"schema_json",title:"Schema Json",attrp:{class:"c1"}},{type:"text",name:"priority",title:"Priority",attrp:{class:"c1"}},{type:"select",name:"changefreq",title:"changefreq",options:[{id:"always",value:"always"},{id:"hourly",value:"hourly"},{id:"daily",value:"daily"},{id:"weekly",value:"weekly"},{id:"monthly",value:"monthly"},{id:"yearly",value:"yearly"},{id:"never",value:"never"}],attrp:{class:"c1"}},{type:"date",name:"lastmod",title:"lastmod",validate:"required",attrp:{class:"c1"}},{type:"select",name:"publishStatus",title:"Publish Status",validate:"required",options:[{id:"draft",value:"Draft"},{id:"pending",value:"Pending"},{id:"publish",value:"Publish"}],attrp:{class:"c2"}},{type:"checkbox",name:"isPopular",title:"Is Popular",attrp:{class:"c2"}}],f=[{type:"async-select",name:"location",title:"Location",loadOptions:v=>Kn(v,{allowCustomValue:!0}),validate:"required",attrp:{class:"c2"}},{type:"fileBase64",name:"blogImage",title:"Blog Image",validate:"required",attrp:{class:"c2"}},{type:"text",name:"blogImageAlt",title:"Blog Image Alt",validate:"required",attrp:{class:"c2"}},{type:"text",name:"blogImageTitle",title:"Blog Image Title",attrp:{class:"c2"}},{type:"editor",name:"shortContent",title:"Short Content",validate:"required",attrp:{class:"c1"}},{type:"editor",name:"content",title:"Content",validate:"required",attrp:{class:"c1"}}],m=[{type:"text",name:"faqHeading",title:"Faq Heading",attrp:{class:"c2"}},{type:"text",name:"faqSubheading",title:"Faq SubHeading",attrp:{class:"c2"}},{type:"add-row-table",frmGroup:"faqData",title:"form",fields:[{type:"text",name:"question",title:"Question"},{type:"text",name:"answer",title:"Answer"}]}],p={formArr:c,formArr4:d,formArr5:f,faqSection:m},g=async v=>{const x=await Ne({url:`/blogs/${v}`,method:"get"});x?.status===!0&&sn(x.data,p,i,e)},y=async v=>{v?.preventDefault();const x=Xt(p,i,t,n);console.log(i),x&&(await Ne({url:a?`/blogs/${a}`:"/blogs",data:i,method:a?"put":"post",showLoading:!0}))?.status==!0&&l(`/${o}
507-list`)};return M.useEffect(()=>{if(s=="edit"||s=="view"||!i?.title)return;const v=ql(i.title);let x=`${nLe}/${v}`;e(C=>({...C,slug:x,canonical_url:x}))},[i?.title]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:y,id:"frmAddEdit",children:[w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Basic Detail"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:c,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Other"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr4",frmArr:d,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsx("div",{className:"wrap-form f",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr5",frmArr:f,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Faq's"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"faqSection",frmArr:m,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]})]})]})}function jj(){const i="/customer-feedback",e="feedbackID",t=[{type:"text",name:"feedbackID",title:"ID"},{type:"text",name:"name",title:"Reviewer Name",params:{align:"left"}}],n=[{title:"ID",name:"feedbackID",params:{align:"center",width:"1%"},pkId:!0},{title:"Reviewer Name",name:"name",params:{align:"left"}},{title:"Rating",name:"rating",params:{align:"left"}},{title:"Posted On",name:"postedOn",params:{align:"left"}},{title:"Publish Status",name:"publishStatus",params:{align:"left"}},{title:"Plateform",name:"plateform",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function LA(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt(),[c,d]=M.useState([]),f=async()=>{const v=await Ne({url:"/master/customer-feedback-plateform",method:"get"});if(v?.status===!0){const x=v?.data?.map(C=>({id:C?.plateformID,value:C?.name}));d(x)}else d([])};M.useEffect(()=>{f(),(async()=>s=="edit"?g(a):Jt(p,i,e))()},[a]);const m=M.useMemo(()=>[{type:"text",name:"name",title:"Reviewer Name",validate:"required",attrp:{class:"c2"}},{type:"text",name:"rating",title:"Rating",info:"Out of 5 rating",validate:"number,required",attrp:{class:"c2"}},{type:"textarea",name:"message",title:"Review Message",validate:"required",attrp:{class:"c2"}},{type:"text",name:"postedOn",title:"Review Posted Time/Date",validate:"required",attrp:{class:"c2"}},{type:"select",name:"plateformID",validate:"required",title:"Plateform",options:c,attrp:{class:"c2"}},{type:"fileBase64",name:"image",title:"Reviewer Image",attrp:{class:"c2"}},{type:"select",name:"publishStatus",title:"Publish Status",validate:"required",options:[{id:"draft",value:"Draft"},{id:"pending",value:"Pending"},{id:"publish",value:"Publish"}],attrp:{class:"c2"}}],[c]),p=M.useMemo(()=>({formArr:m}),[m]),g=async v=>{const x=await Ne({url:`/customer-feedback/${v}`,method:"get"});x?.status===!0&&sn(x.data,p,i,e)},y=async v=>{if(v?.preventDefault(),Xt(p,i,t,n)){const C=await Ne({url:a?`/customer-feedback/${a}`:"/customer-feedback",data:i,method:a?"put":"post"});alert(C?.msg),C?.status==!0&&l(`/${o}-list`)}};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:y,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f40",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:m,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsx("div",{className:"wrap-form f60"})]})]})}function zj(){const i="/surge-charges",e="surgeChargeID",t=[{type:"text",name:"surgeChargeID",title:"ID"}],n=[{title:"ID",name:"surgeChargeID",params:{align:"center",width:"1%"},pkId:!0},{title:"Trip Type",name:"tripTypeCode",params:{align:"left"}},{title:"Location",name:"location",params:{align:"left"}},{title:"Start Date Time",name:"startDateTime",params:{align:"left"}},{title:"End Date Time",name:"endDateTime",params:{align:"left"}},{title:"Surge Type",name:"surgeType",params:{align:"left"}},{title:"Surge Value",name:"surgeValue",params:{align:"left"}},{title:"Is Active",name:"isActive",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}let Wj;const Hj=(i,e,t={})=>{const{allowCustomValue:n=!1}=t||{};return new Promise(r=>{clearTimeout(Wj);const s=i?.trim();if(!s||s.length<2){r([]);return}Wj=setTimeout(async()=>{try{const o=await Ne({url:`/surge-charges/location?q=${s}&tripTypeCode=${e}`,method:"get"});o?.status===!0&&Array.isArray(o.data)&&o.data.length>0?r(o.data.map(a=>({id:a.id,value:a.value}))):r(n?[{id:s,value:s}]:[])}catch(o){console.error("Location API error:",o),r([])}},400)})};function UA(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt(),[c,d]=M.useState([]),[f,m]=M.useState([]),p=async()=>{const D=await Ne({url:"/master/trip-type",method:"get"});if(d([]),D?.status===!0){m(D?.data);const E=D?.data?.map(T=>({id:T?.code,value:T?.code}));d(E)}};M.useEffect(()=>{p(),(async()=>s=="edit"?x(a):Jt(v,i,e))()},[a]),M.useEffect(()=>{console.log(i),s=="add"&&e(D=>{const{fromLocationArr:E,...T}=D;return{...T,fromLocation:""}})},[i?.tripTypeCode,s]);const g=[{type:"select",name:"tripTypeCode",title:"Trip Type",info:"Surge Charge not applicable for Roundtrip and Airport Return",validate:"required",options:c,attrp:{class:"c1"}},{type:"async-select",name:"location",title:"From Location",info:"Pickup Location",validate:"required",loadOptions:D=>Hj(D,i?.tripTypeCode),attrp:{class:"c1"}},{type:"datetime",name:"startDateTime",title:"Start Date Time",validate:"required",attrp:{class:"c2"}},{type:"datetime",name:"endDateTime",title:"End Date Time",validate:"required",attrp:{class:"c2"}},{type:"select",name:"surgeType",title:"Surge Type",options:[{id:"percentage",value:"percentage"},{id:"amount",value:"amount"}],validate:"required",attrp:{class:"c2"}},{type:"text",name:"surgeValue",title:"Surge Value",validate:"required",attrp:{class:"c2"}},{type:"checkbox",name:"isActive",title:"Is Active",attrp:{class:"c2"}}],y=[{type:"add-row-table",frmGroup:"fromLocationArr",title:"form",f
507ields:[{name:"pickupLoc",type:"async-select",title:"Extra From Location",loadOptions:D=>Hj(D,i?.tripTypeCode),attrp:{class:"c2"}}]}],v={formArr:g,formArr1:y},x=async D=>{const E=await Ne({url:`/surge-charges/${D}`,method:"get"});E?.status===!0&&sn(E.data,v,i,e)},C=async D=>{D?.preventDefault(),Xt(v,i,t,n)&&(await Ne({url:a?`/surge-charges/${a}`:"/surge-charges",data:i,method:a?"put":"post",showLoading:!0}))?.status==!0&&l(`/${o}-list`)};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:C,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f40",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:g,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsx("div",{className:"wrap-form f40",style:s=="edit"?{pointerEvents:"none",opacity:.6,userSelect:"none",cursor:"not-allowed"}:{},children:w.jsx(Le,{frmGroupName:"formArr1",frmArr:y,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})}),w.jsx("div",{className:"wrap-form f20"})]})]})}function iLe(){const i="/request-vendor",e="requestVendorID",t=[{type:"text",name:"requestVendorID",title:"ID"}],n=[{title:"ID",name:"requestVendorID",params:{align:"center",width:"1%"},pkId:!0},{title:"Vendor Name",name:"vendorName",params:{align:"left"}},{title:"Vendor Mobile",name:"vendorMobile",params:{align:"left"}},{title:"Vendor Email",name:"vendorEmail",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function qj(){const i="/faqs",e="faqID",t=[{type:"text",name:"faqID",title:"ID"},{type:"text",name:"pageKey",title:"Page Key",params:{align:"left"}},{type:"text",name:"note",title:"Note",params:{align:"left"}}],n=[{title:"ID",name:"faqID",params:{align:"center",width:"1%"},pkId:!0},{title:"Page Key",name:"pageKey",params:{align:"left"}},{title:"Note",name:"note",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function VA(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{(async()=>s=="edit"?m(a):Jt(f,i,e))()},[a]);const c=[{type:"text",name:"pageKey",title:"Page Key",validate:"required",attrp:{class:"c1"}},{type:"text",name:"note",title:"Note",attrp:{class:"c1"}},{type:"text",name:"heading",title:"Heading",attrp:{class:"c1"}},{type:"textarea",name:"subheading",title:"Subheading",attrp:{class:"c1"}}],d=[{type:"add-row-table",frmGroup:"faqArr",title:"form",fields:[{type:"textarea",name:"question",validate:"required",title:"Question"},{type:"textarea",name:"answer",validate:"required",title:"Answer"}]}],f={formArr:c,faqSection:d},m=async g=>{const y=await Ne({url:`/faqs/${g}`,method:"get"});y?.status===!0&&sn(y.data,f,i,e)},p=async g=>{if(g?.preventDefault(),Xt(f,i,t,n)){const v=await Ne({url:a?`/faqs/${a}`:"/faqs",data:i,method:a?"put":"post"});alert(v?.msg),v?.status==!0&&l(`/${o}-list`)}};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:p,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f30",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:c,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsxs("div",{className:"wrap-form f70",children:[w.jsx("h2",{className:"form-head",children:"Faqs"}),w.jsx(Le,{frmGroupName:"faqSection",frmArr:d,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})]})]})]})}function $j(){const i="/jsonschema",e="schemaID",t=[{type:"text",name:"schemaID",title:"ID"},{type:"text",name:"pageKey",title:"Page Key",params:{align:"left"}},{type:"text",name:"note",title:"Note",params:{align:"left"}}],n=[{title:"ID",name:"schemaID",params:{align:"center",width:"1%"},pkId:!0},{title:"Page Key",name:"pageKey",params:{align:"left"}},{title:"Note",name:"note",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function jA(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{(async()=>s=="edit"?f(a):Jt(d,i,e))()},[a]);const c=[{type:"text",name:"pageKey",title:"Page Key",validate:"required",attrp:{class:"c1"}},{type:"text",name:"note",title:"Note",attrp:{class:"c1"}}
507,{type:"textarea",name:"jsonschema",title:"JSON SCHEMA",attrp:{class:"c1"}}],d={formArr:c},f=async p=>{const g=await Ne({url:`/jsonschema/${p}`,method:"get"});g?.status===!0&&sn(g.data,d,i,e)},m=async p=>{if(p?.preventDefault(),Xt(d,i,t,n)){const y=await Ne({url:a?`/jsonschema/${a}`:"/jsonschema",data:i,method:a?"put":"post"});alert(y?.msg),y?.status==!0&&l(`/${o}-list`)}};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:m,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f50",children:w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:c,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsx("div",{className:"wrap-form f50"})]})]})}function rLe(i,e,t){return(e=lLe(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function Ul(){return Ul=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},Ul.apply(null,arguments)}function Gj(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,n)}return t}function Ia(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Gj(Object(t),!0).forEach(function(n){rLe(i,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):Gj(Object(t)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(t,n))})}return i}function sLe(i,e){if(i==null)return{};var t,n,r=oLe(i,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);for(n=0;n<s.length;n++)t=s[n],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(i,t)&&(r[t]=i[t])}return r}function oLe(i,e){if(i==null)return{};var t={};for(var n in i)if({}.hasOwnProperty.call(i,n)){if(e.indexOf(n)!==-1)continue;t[n]=i[n]}return t}function aLe(i,e){if(typeof i!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var n=t.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function lLe(i){var e=aLe(i,"string");return typeof e=="symbol"?e:e+""}function XS(i){"@babel/helpers - typeof";return XS=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},XS(i)}var cLe="1.15.7";function Tl(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var $l=Tl(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),L0=Tl(/Edge/i),Yj=Tl(/firefox/i),ug=Tl(/safari/i)&&!Tl(/chrome/i)&&!Tl(/android/i),_P=Tl(/iP(ad|od|hone)/i),tJ=Tl(/chrome/i)&&Tl(/android/i),nJ={capture:!1,passive:!1};function Yt(i,e,t){i.addEventListener(e,t,!$l&&nJ)}function Ht(i,e,t){i.removeEventListener(e,t,!$l&&nJ)}function Cx(i,e){if(e){if(e[0]===">"&&(e=e.substring(1)),i)try{if(i.matches)return i.matches(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e)}catch{return!1}return!1}}function iJ(i){return i.host&&i!==document&&i.host.nodeType&&i.host!==i?i.host:i.parentNode}function Ao(i,e,t,n){if(i){t=t||document;do{if(e!=null&&(e[0]===">"?i.parentNode===t&&Cx(i,e):Cx(i,e))||n&&i===t)return i;if(i===t)break}while(i=iJ(i))}return null}var Kj=/\s+/g;function _s(i,e,t){if(i&&e)if(i.classList)i.classList[t?"add":"remove"](e);else{var n=(" "+i.className+" ").replace(Kj," ").replace(" "+e+" "," ");i.className=(n+(t?" "+e:"")).replace(Kj," ")}}function Ct(i,e,t){var n=i&&i.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(t=i.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function yh(i,e){var t="";if(typeof i=="string")t=i;else do{var n=Ct(i,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(i=i.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function rJ(i,e,t){if(i){var n=i.getElementsByTagName(e),r=0,s=n.length;if(t)for(;r<s;r++)t(n[r],r);return n}return[]}function Da(){var i=document.scrollingElement;return i||document.documentElement}function Ti(i,e,t,n,r){if(!(!i.getBoundingClientRect&&i!==window)){var s,o,a,l,c,d,f;if(i!==window&&i.parentNode&&i!==Da()?(s=i.getBoundingClientRect(),o=s.top,a=s.left,l=s.bottom,c=s.right,d=s.height,f=s.width):(o=0,a=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,f=window.innerWidth),(e||t)&&i!==window&&(r=r||i.parentNode,!$l))do if(r&&r.getBoundingClientRect&&(Ct(r,"transform")!=="none"||t&&Ct(r,"position")!=="static")){var m=r.getBoundingClientRect();o-=m.top+parseInt(Ct(r,"border-top-width")),a-=m.left+parseInt(Ct(r,"border-left-width")),l=o+s.height,c=a+s.width;break}while(r=r.parentNode);
vendor: 30,938 bytes, line 507
507if(n&&i!==window){var p=yh(r||i),g=p&&p.a,y=p&&p.d;p&&(o/=y,a/=g,f/=g,d/=y,l=o+d,c=a+f)}return{top:o,left:a,bottom:l,right:c,width:f,height:d}}}function Xj(i,e,t){for(var n=Pc(i,!0),r=Ti(i)[e];n;){var s=Ti(n)[t],o=void 0;if(o=r>=s,!o)return n;if(n===Da())break;n=Pc(n,!1)}return!1}function qh(i,e,t,n){for(var r=0,s=0,o=i.children;s<o.length;){if(o[s].style.display!=="none"&&o[s]!==wt.ghost&&(n||o[s]!==wt.dragged)&&Ao(o[s],t.draggable,i,!1)){if(r===e)return o[s];r++}s++}return null}function CP(i,e){for(var t=i.lastElementChild;t&&(t===wt.ghost||Ct(t,"display")==="none"||e&&!Cx(t,e));)t=t.previousElementSibling;return t||null}function io(i,e){var t=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==wt.clone&&(!e||Cx(i,e))&&t++;return t}function Qj(i){var e=0,t=0,n=Da();if(i)do{var r=yh(i),s=r.a,o=r.d;e+=i.scrollLeft*s,t+=i.scrollTop*o}while(i!==n&&(i=i.parentNode));return[e,t]}function uLe(i,e){for(var t in i)if(i.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===i[t][n])return Number(t)}return-1}function Pc(i,e){if(!i||!i.getBoundingClientRect)return Da();var t=i,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=Ct(t);if(t.clientWidth<t.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Da();if(n||e)return t;n=!0}}while(t=t.parentNode);return Da()}function dLe(i,e){if(i&&e)for(var t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}function zA(i,e){return Math.round(i.top)===Math.round(e.top)&&Math.round(i.left)===Math.round(e.left)&&Math.round(i.height)===Math.round(e.height)&&Math.round(i.width)===Math.round(e.width)}var dg;function sJ(i,e){return function(){if(!dg){var t=arguments,n=this;t.length===1?i.call(n,t[0]):i.apply(n,t),dg=setTimeout(function(){dg=void 0},e)}}}function fLe(){clearTimeout(dg),dg=void 0}function oJ(i,e,t){i.scrollLeft+=e,i.scrollTop+=t}function aJ(i){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(i).cloneNode(!0):t?t(i).clone(!0)[0]:i.cloneNode(!0)}function lJ(i,e,t){var n={};return Array.from(i.children).forEach(function(r){var s,o,a,l;if(!(!Ao(r,e.draggable,i,!1)||r.animated||r===t)){var c=Ti(r);n.left=Math.min((s=n.left)!==null&&s!==void 0?s:1/0,c.left),n.top=Math.min((o=n.top)!==null&&o!==void 0?o:1/0,c.top),n.right=Math.max((a=n.right)!==null&&a!==void 0?a:-1/0,c.right),n.bottom=Math.max((l=n.bottom)!==null&&l!==void 0?l:-1/0,c.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var ts="Sortable"+new Date().getTime();function hLe(){var i=[],e;return{captureAnimationState:function(){if(i=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(r){if(!(Ct(r,"display")==="none"||r===wt.ghost)){i.push({target:r,rect:Ti(r)});var s=Ia({},i[i.length-1].rect);if(r.thisAnimationDuration){var o=yh(r,!0);o&&(s.top-=o.f,s.left-=o.e)}r.fromRect=s}})}},addAnimationState:function(n){i.push(n)},removeAnimationState:function(n){i.splice(uLe(i,{target:n}),1)},animateAll:function(n){var r=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var s=!1,o=0;i.forEach(function(a){var l=0,c=a.target,d=c.fromRect,f=Ti(c),m=c.prevFromRect,p=c.prevToRect,g=a.rect,y=yh(c,!0);y&&(f.top-=y.f,f.left-=y.e),c.toRect=f,c.thisAnimationDuration&&zA(m,f)&&!zA(d,f)&&(g.top-f.top)/(g.left-f.left)===(d.top-f.top)/(d.left-f.left)&&(l=pLe(g,m,p,r.options)),zA(f,d)||(c.prevFromRect=d,c.prevToRect=f,l||(l=r.options.animation),r.animate(c,g,f,l)),l&&(s=!0,o=Math.max(o,l),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},l),c.thisAnimationDuration=l)}),clearTimeout(e),s?e=setTimeout(function(){typeof n=="function"&&n()},o):typeof n=="function"&&n(),i=[]},animate:function(n,r,s,o){if(o){Ct(n,"transition",""),Ct(n,"transform","");var a=yh(this.el),l=a&&a.a,c=a&&a.d,d=(r.left-s.left)/(l||1),f=(r.top-s.top)/(c||1);n.animatingX=!!d,n.animatingY=!!f,Ct(n,"transform","translate3d("+d+"px,"+f+"px,0)"),this.forRepaintDummy=mLe(n),Ct(n,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),Ct(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){Ct(n,"transition",""),Ct(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},o)}}}}function mLe(i){return i.offsetWidth}function pLe(i,e,t,n){return Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var Bf=[],WA={initializeByDefault:!0},U0={mount:function(e){for(var t in WA)WA.hasOwnProperty(t)&&!(t in e)&&(e[t]=WA[t]);Bf.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Bf.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var s=e+"Global";Bf.forEach(function(o){t[o.pluginName]&&(t[o.pluginName][s]&&t[o.pluginName][s](Ia({sortable:t},n)),t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](Ia({sortable:t},n)))})},initializePlugins:function(e,t,n,r){Bf.forEach(function(a){var l=a.pluginName;if(!(!e.options[l]&&!a.initializeByDefault)){var c=new a(e,t,e.options);c.sortable=e,c.options=e.options,e[l]=c,Ul(n,c.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var o=this.modifyOption(e,s,e.options[s]);typeof o<"u"&&(e.options[s]=o)}},getEventProperties:function(e,t){var n={};return Bf.forEach(function(r){typeof r.eventProperties=="function"&&Ul(n,r.eventProperties.call(t[r.pluginName],e))}),n},modifyOption:function(e,t,n){var r;return Bf.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[t]=="function"&&(r=s.optionListeners[t].call(e[s.pluginName],n))}),r}};function gLe(i){var e=i.sortable,t=i.rootEl,n=i.name,r=i.targetEl,s=i.cloneEl,o=i.toEl,a=i.fromEl,l=i.oldIndex,c=i.newIndex,d=i.oldDraggableIndex,f=i.newDraggableIndex,m=i.originalEvent,p=i.putSortable,g=i.extraEventProperties;if(e=e||t&&t[ts],!!e){var y,v=e.options,x="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!$l&&!L0?y=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(n,!0,!0)),y.to=o||t,y.from=a||t,y.item=r||t,y.clone=s,y.oldIndex=l,y.newIndex=c,y.oldDraggableIndex=d,y.newDraggableIndex=f,y.originalEvent=m,y.pullMode=p?p.lastPutMode:void 0;var C=Ia(Ia({},g),U0.getEventProperties(n,e));for(var D in C)y[D]=C[D];t&&t.dispatchEvent(y),v[x]&&v[x].call(e,y)}}var bLe=["evt"],Gr=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,s=sLe(n,bLe);U0.pluginEvent.bind(wt)(e,t,Ia({dragEl:Ye,parentEl:ii,ghostEl:Tt,rootEl:zn,nextEl:Uu,lastDownEl:Z1,cloneEl:Yn,cloneHidden:Tc,dragStarted:Hp,putSortable:Zi,activeSortable:wt.active,originalEvent:r,oldIndex:sh,oldDraggableIndex:fg,newIndex:Cs,newDraggableIndex:Dc,hideGhostForTarget:fJ,unhideGhostForTarget:hJ,cloneNowHidden:function(){Tc=!0},cloneNowShown:function(){Tc=!1},dispatchSortableEvent:function(a){Dr({sortable:t,name:a,originalEvent:r})}},s))};function Dr(i){gLe(Ia({putSortable:Zi,cloneEl:Yn,targetEl:Ye,rootEl:zn,oldIndex:sh,oldDraggableIndex:fg,newIndex:Cs,newDraggableIndex:Dc},i))}var Ye,ii,Tt,zn,Uu,Z1,Yn,Tc,sh,Cs,fg,Dc,cv,Zi,$f=!1,Dx=!1,Ex=[],Fu,Do,HA,qA,Zj,Jj,Hp,Mf,hg,mg=!1,uv=!1,J1,ur,$A=[],QS=!1,Tx=[],a2=typeof document<"u",dv=_P,ez=L0||$l?"cssFloat":"float",yLe=a2&&!tJ&&!_P&&"draggable"in document.createElement("div"),cJ=(function(){if(a2){if($l)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}})(),uJ=function(e,t){var n=Ct(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),s=qh(e,0,t),o=qh(e,1,t),a=s&&Ct(s),l=o&&Ct(o),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Ti(s).width,d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Ti(o).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&a.float!=="none"){var f=a.float==="left"?"left":"right";return o&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return s&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||c>=r&&n[ez]==="none"||o&&n[ez]==="none"&&c+d>r)?"vertical":"horizontal"},vLe=function(e,t,n){var r=n?e.left:e.top,s=n?e.right:e.bottom,o=n?e.width:e.height,a=n?t.left:t.top,l=n?t.right:t.bottom,c=n?t.width:t.height;return r===a||s===l||r+o/2===a+c/2},wLe=function(e,t){var n;return Ex.some(function(r){var s=r[ts].options.emptyInsertThreshold;if(!(!s||CP(r))){var o=Ti(r),a=e>=o.left-s&&e<=o.right+s,l=t>=o.top-s&&t<=o.bottom+s;if(a&&l)return n=r}}),n},dJ=function(e){function t(s,o){return function(a,l,c,d){var f=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(s==null&&(o||f))return!0;if(s==null||s===!1)return!1;if(o&&s==="clone")return s;if(typeof s=="function")return t(s(a,l,c,d),o)(a,l,c,d);var m=(o?a:l).options.group.name;return s===!0||typeof s=="string"&&s===m||s.join&&s.indexOf(m)>-1}}var n={},r=e.group;(!r||XS(r)!="object")&&(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},fJ=function(){!cJ&&Tt&&Ct(Tt,"display","none")},hJ=function(){!cJ&&Tt&&Ct(Tt,"display","")};a2&&!tJ&&document.addEventListener("click",function(i){if(Dx)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),Dx=!1,!1},!0);var Ou=function(e){if(Ye){e=e.touches?e.touches[0]:e;var t=wLe(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[ts]._onDragOver(n)}}},xLe=function(e){Ye&&Ye.parentNode[ts]._isOutsideThisEl(e.target)};function wt(i,e){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=e=Ul({},e),i[ts]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return uJ(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,a){o.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:wt.supportPointer!==!1&&"PointerEvent"in window&&(!ug||_P),emptyInsertThreshold:5};U0.initializePlugins(this,i,t);for(var n in t)!(n in e)&&(e[n]=t[n]);dJ(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:yLe,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Yt(i,"pointerdown",this._onTapStart):(Yt(i,"mousedown",this._onTapStart),Yt(i,"touchstart",this._onTapStart)),this.nativeDraggable&&(Yt(i,"dragover",this),Yt(i,"dragenter",this)),Ex.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Ul(this,hLe())}wt.prototype={constructor:wt,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Mf=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,Ye):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,s=r.preventOnFilter,o=e.type,a=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(a||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,d=r.filter;if(SLe(n),!Ye&&!(/mousedown|pointerdown/.test(o)&&e.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&ug&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Ao(l,r.draggable,n,!1),!(l&&l.animated)&&Z1!==l)){if(sh=io(l),fg=io(l,r.draggable),typeof d=="function"){if(d.call(this,e,l,this)){Dr({sortable:t,rootEl:c,name:"filter",targetEl:l,toEl:n,fromEl:n}),Gr("filter",t,{evt:e}),s&&e.preventDefault();return}}else if(d&&(d=d.split(",").some(function(f){if(f=Ao(c,f.trim(),n,!1),f)return Dr({sortable:t,rootEl:f,name:"filter",targetEl:l,fromEl:n,toEl:n}),Gr("filter",t,{evt:e}),!0}),d)){s&&e.preventDefault();return}r.handle&&!Ao(c,r.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var r=this,s=r.el,o=r.options,a=s.ownerDocument,l;if(n&&!Ye&&n.parentNode===s){var c=Ti(n);if(zn=s,Ye=n,ii=Ye.parentNode,Uu=Ye.nextSibling,Z1=n,cv=o.group,wt.dragged=Ye,Fu={target:Ye,clientX:(t||e).clientX,clientY:(t||e).clientY},Zj=Fu.clientX-c.left,Jj=Fu.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Ye.style["will-change"]="all",l=function(){if(Gr("delayEnded",r,{evt:e}),wt.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Yj&&r.nativeDraggable&&(Ye.draggable=!0),r._triggerDragStart(e,t),Dr({sortable:r,name:"choose",originalEvent:e}),_s(Ye,o.chosenClass,!0)},o.ignore.split(",").forEach(function(d){rJ(Ye,d.trim(),GA)}),Yt(a,"dragover",Ou),Yt(a,"mousemove",Ou),Yt(a,"touchmove",Ou),o.supportPointer?(Yt(a,"pointerup",r._onDrop),!this.nativeDraggable&&Yt(a,"pointercancel",r._onDrop)):(Yt(a,"mouseup",r._onDrop),Yt(a,"touchend",r._onDrop),Yt(a,"touchcancel",r._onDrop)),Yj&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ye.draggable=!0),Gr("delayStart",this,{evt:e}),o.delay&&(!o.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(L0||$l))){if(wt.eventCanceled){this._onDrop();return}o.supportPointer?(Yt(a,"pointerup",r._disableDelayedDrag),Yt(a,"pointercancel",r._disableDelayedDrag)):(Yt(a,"mouseup",r._disableDelayedDrag),Yt(a,"touchend",r._disableDelayedDrag),Yt(a,"touchcancel",r._disableDelayedDrag)),Yt(a,"mousemove",r._delayedDragTouchMoveHandler),Yt(a,"touchmove",r._delayedDragTouchMoveHandler),o.supportPointer&&Yt(a,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(l,o.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ye&&GA(Ye),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ht(e,"mouseup",this._disableDelayedDrag),Ht(e,"touchend",this._disableDelayedDrag),Ht(e,"touchcancel",this._disableDelayedDrag),Ht(e,"pointerup",this._disableDelayedDrag),Ht(e,"pointercancel",this._disableDelayedDrag),Ht(e,"mousemove",this._delayedDragTouchMoveHandler),Ht(e,"touchmove",this._delayedDragTouchMoveHandler),Ht(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Yt(document,"pointermove",this._onTouchMove):t?Yt(document,"touchmove",this._onTouchMove):Yt(document,"mousemove",this._onTouchMove):(Yt(Ye,"dragend",this),Yt(zn,"dragstart",this._onDragStart));try{document.selection?ew(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if($f=!1,zn&&Ye){Gr("dragStarted",this,{evt:t}),this.nativeDraggable&&Yt(document,"dragover",xLe);var n=this.options;!e&&_s(Ye,n.dragClass,!1),_s(Ye,n.ghostClass,!0),wt.active=this,e&&this._appendGhost(),Dr({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Do){this._lastX=Do.clientX,this._lastY=Do.clientY,fJ();for(var e=document.elementFromPoint(Do.clientX,Do.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Do.clientX,Do.clientY),e!==t);)t=e;if(Ye.parentNode[ts]._isOutsideThisEl(e),t)do{if(t[ts]){var n=void 0;if(n=t[ts]._onDragOver({clientX:Do.clientX,clientY:Do.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=iJ(t));hJ()}},_onTouchMove:function(e){if(Fu){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,s=e.touches?e.touches[0]:e,o=Tt&&yh(Tt,!0),a=Tt&&o&&o.a,l=Tt&&o&&o.d,c=dv&&ur&&Qj(ur),d=(s.clientX-Fu.clientX+r.x)/(a||1)+(c?c[0]-$A[0]:0)/(a||1),f=(s.clientY-Fu.clientY+r.y)/(l||1)+(c?c[1]-$A[1]:0)/(l||1);if(!wt.active&&!$f){if(n&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Tt){o?(o.e+=d-(HA||0),o.f+=f-(qA||0)):o={a:1,b:0,c:0,d:1,e:d,f};var m="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");Ct(Tt,"webkitTransform",m),Ct(Tt,"mozTransform",m),Ct(Tt,"msTransform",m),Ct(Tt,"transform",m),HA=d,qA=f,Do=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Tt){var e=this.options.fallbackOnBody?document.body:zn,t=Ti(Ye,!0,dv,!0,e),n=this.options;if(dv){for(ur=e;Ct(ur,"position")==="static"&&Ct(ur,"transform")==="none"&&ur!==document;)ur=ur.parentNode;ur!==document.body&&ur!==document.documentElement?(ur===document&&(ur=Da()),t.top+=ur.scrollTop,t.left+=ur.scrollLeft):ur=Da(),$A=Qj(ur)}Tt=Ye.cloneNode(!0),_s(Tt,n.ghostClass,!1),_s(Tt,n.fallbackClass,!0),_s(Tt,n.dragClass,!0),Ct(Tt,"transition",""),Ct(Tt,"transform",""),Ct(Tt,"box-sizing","border-box"),Ct(Tt,"margin",0),Ct(Tt,"top",t.top),Ct(Tt,"left",t.left),Ct(Tt,"width",t.width),Ct(Tt,"height",t.height),Ct(Tt,"opacity","0.8"),Ct(Tt,"position",dv?"absolute":"fixed"),Ct(Tt,"zIndex","100000"),Ct(Tt,"pointerEvents","none"),wt.ghost=Tt,e.appendChild(Tt),Ct(Tt,"transform-origin",Zj/parseInt(Tt.style.width)*100+"% "+Jj/parseInt(Tt.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,s=n.options;if(Gr("dragStart",this,{evt:e}),wt.eventCanceled){this._onDrop();return}Gr("setupClone",this),wt.eventCanceled||(Yn=aJ(Ye),Yn.removeAttribute("id"),Yn.draggable=!1,Yn.style["will-change"]="",this._hideClone(),_s(Yn,this.options.chosenClass,!1),wt.clone=Yn),n.cloneId=ew(function(){Gr("clone",n),!wt.eventCanceled&&(n.options.removeCloneOnHide||zn.insertBefore(Yn,Ye),n._hideClone(),Dr({sortable:n,name:"clone"}))}),!t&&_s(Ye,s.dragClass,!0),t?(Dx=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Ht(document,"mouseup",n._onDrop),Ht(document,"touchend",n._onDrop),Ht(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",s.setData&&s.setData.call(n,r,Ye)),Yt(document,"drop",n),Ct(Ye,"transform","translateZ(0)")),$f=!0,n._dragStartId=ew(n._dragStarted.bind(n,t,e)),Yt(document,"selectstart",n),Hp=!0,window.getSelection().removeAllRanges(),ug&&Ct(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,r,s,o,a=this.options,l=a.group,c=wt.active,d=cv===l,f=a.sort,m=Zi||c,p,g=this,y=!1;if(QS)return;function v(G,Y){Gr(G,g,Ia({evt:e,isOwner:d,axis:p?"vertical":"horizontal",revert:o,dragRect:r,targetRect:s,canSort:f,fromSortable:m,target:n,completed:C,onMove:function(V,q){return fv(zn,t,Ye,r,V,Ti(V),e,q)},changed:D},Y))}function x(){v("dragOverAnimationCapture"),g.captureAnimationState(),g!==m&&m.captureAnimationState()}function C(G){return v("dragOverCompleted",{insertion:G}),G&&(d?c._hideClone():c._showClone(g),g!==m&&(_s(Ye,Zi?Zi.options.ghostClass:c.options.ghostClass,!1),_s(Ye,a.ghostClass,!0)),Zi!==g&&g!==wt.active?Zi=g:g===wt.active&&Zi&&(Zi=null),m===g&&(g._ignoreWhileAnimating=n),g.animateAll(function(){v("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(n===Ye&&!Ye.animated||n===t&&!n.animated)&&(Mf=null),!a.dragoverBubble&&!e.rootEl&&n!==document&&(Ye.parentNode[ts]._isOutsideThisEl(e.target),!G&&Ou(e)),!a.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),y=!0}function D(){Cs=io(Ye),Dc=io(Ye,a.draggable),Dr({sortable:g,name:"change",toEl:t,newIndex:Cs,newDraggableIndex:Dc,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=Ao(n,a.draggable,t,!0),v("dragOver"),wt.eventCanceled)return y;if(Ye.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||g._ignoreWhileAnimating===n)return C(!1);if(Dx=!1,c&&!a.disabled&&(d?f||(o=ii!==zn):Zi===this||(this.lastPutMode=cv.checkPull(this,c,Ye,e))&&l.checkPut(this,c,Ye,e))){if(p=this._getDirection(e,n)==="vertical",r=Ti(Ye),v("dragOverValid"),wt.eventCanceled)return y;if(o)return ii=zn,x(),this._hideClone(),v("revert"),wt.eventCanceled||(Uu?zn.insertBefore(Ye,Uu):zn.appendChild(Ye)),C(!0);var E=CP(t,a.draggable);if(!E||ELe(e,p,this)&&!E.animated){if(E===Ye)return C(!1);if(E&&t===e.target&&(n=E),n&&(s=Ti(n)),fv(zn,t,Ye,r,n,s,e,!!n)!==!1)return x(),E&&E.nextSibling?t.insertBefore(Ye,E.nextSibling):t.appendChild(Ye),ii=t,D(),C(!0)}else if(E&&DLe(e,p,this)){var T=qh(t,0,a,!0);if(T===Ye)return C(!1);if(n=T,s=Ti(n),fv(zn,t,Ye,r,n,s,e,!1)!==!1)return x(),t.insertBefore(Ye,T),ii=t,D(),C(!0)}else if(n.parentNode===t){s=Ti(n);var S=0,A,I=Ye.parentNode!==t,R=!vLe(Ye.animated&&Ye.toRect||r,n.animated&&n.toRect||s,p),O=p?"top":"left",j=Xj(n,"top","top")||Xj(Ye,"top","top"),B=j?j.scrollTop:void 0;Mf!==n&&(A=s[O],mg=!1,uv=!R&&a.invertSwap||I),S=TLe(e,n,s,p,R?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,uv,Mf===n);var U;if(S!==0){var F=io(Ye);do F-=S,U=ii.children[F];while(U&&(Ct(U,"display")==="none"||U===Tt))}if(S===0||U===n)return C(!1);Mf=n,hg=S;var H=n.nextElementSibling,L=!1;L=S===1;var W=fv(zn,t,Ye,r,n,s,e,L);if(W!==!1)return(W===1||W===-1)&&(L=W===1),QS=!0,setTimeout(CLe,30),x(),L&&!H?t.appendChild(Ye):n.parentNode.insertBefore(Ye,L?H:n),j&&oJ(j,0,B-j.scrollTop),ii=Ye.parentNode,A!==void 0&&!uv&&(J1=Math.abs(A-Ti(n)[O])),D(),C(!0)}if(t.contains(Ye))return C(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ht(document,"mousemove",this._onTouchMove),Ht(document,"touchmove",this._onTouchMove),Ht(document,"pointermove",this._onTouchMove),Ht(document,"dragover",Ou),Ht(document,"mousemove",Ou),Ht(document,"touchmove",Ou)},_offUpEvents:function(){var e=this.el.ownerDocument;Ht(e,"mouseup",this._onDrop),Ht(e,"touchend",this._onDrop),Ht(e,"pointerup",this._onDrop),Ht(e,"pointercancel",this._onDrop),Ht(e,"touchcancel",this._onDrop),Ht(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(Cs=io(Ye),Dc=io(Ye,n.draggable),Gr("drop",this,{evt:e}),ii=Ye&&Ye.parentNode,Cs=io(Ye),Dc=io(Ye,n.draggable),wt.eventCanceled){this._nulling();return}$f=!1,uv=!1,mg=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ZS(this.cloneId),ZS(this._dragStartId),this.nativeDraggable&&(Ht(document,"drop",this),Ht(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ug&&Ct(document.body,"user-select",""),Ct(Ye,"transform",""),e&&(Hp&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Tt&&Tt.parentNode&&Tt.parentNode.removeChild(Tt),(zn===ii||Zi&&Zi.lastPutMode!=="clone")&&Yn&&Yn.parentNode&&Yn.parentNode.removeChild(Yn),Ye&&(this.nativeDraggable&&Ht(Ye,"dragend",this),GA(Ye),Ye.style["will-change"]="",Hp&&!$f&&_s(Ye,Zi?Zi.options.ghostClass:this.options.ghostClass,!1),_s(Ye,this.options.chosenClass,!1),Dr({sortable:this,name:"unchoose",toEl:ii,newIndex:null,newDraggableIndex:null,originalEvent:e}),zn!==ii?(Cs>=0&&(Dr({rootEl:ii,name:"add",toEl:ii,fromEl:zn,originalEvent:e}),Dr({sortable:this,name:"remove",toEl:ii,originalEvent:e}),Dr({rootEl:ii,name:"sort",toEl:ii,fromEl:zn,originalEvent:e}),Dr({sortable:this,name:"sort",toEl:ii,originalEvent:e})),Zi&&Zi.save()):Cs!==sh&&Cs>=0&&(Dr({sortable:this,name:"update",toEl:ii,originalEvent:e}),Dr({sortable:this,name:"sort",toEl:ii,originalEvent:e})),wt.active&&((Cs==null||Cs===-1)&&(Cs=sh,Dc=fg),Dr({sortable:this,name:"end",toEl:ii,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Gr("nulling",this),zn=Ye=ii=Tt=Uu=Yn=Z1=Tc=Fu=Do=Hp=Cs=Dc=sh=fg=Mf=hg=Zi=cv=wt.dragged=wt.ghost=wt.clone=wt.active=null;var e=this.el;Tx.forEach(function(t){e.contains(t)&&(t.checked=!0)}),Tx.length=HA=qA=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Ye&&(this._onDragOver(e),_Le(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,r=0,s=n.length,o=this.options;r<s;r++)t=n[r],Ao(t,o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||kLe(t));return e},sort:function(e,t){var n={},r=this.el;this.toArray().forEach(function(s,o){var a=r.children[o];Ao(a,this.options.draggable,r,!1)&&(n[s]=a)},this),t&&this.captureAnimationState(),e.forEach(function(s){n[s]&&(r.removeChild(n[s]),r.appendChild(n[s]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Ao(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var r=U0.modifyOption(this,e,t);typeof r<"u"?n[e]=r:n[e]=t,e==="group"&&dJ(n)},destroy:function(){Gr("destroy",this);var e=this.el;e[ts]=null,Ht(e,"mousedown",this._onTapStart),Ht(e,"touchstart",this._onTapStart),Ht(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ht(e,"dragover",this),Ht(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ex.splice(Ex.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Tc){if(Gr("hideClone",this),wt.eventCanceled)return;Ct(Yn,"display","none"),this.options.removeCloneOnHide&&Yn.parentNode&&Yn.parentNode.removeChild(Yn),Tc=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Tc){if(Gr("showClone",this),wt.eventCanceled)return;Ye.parentNode==zn&&!this.options.group.revertClone?zn.insertBefore(Yn,Ye):Uu?zn.insertBefore(Yn,Uu):zn.appendChild(Yn),this.options.group.revertClone&&this.animate(Ye,Yn),Ct(Yn,"display",""),Tc=!1}}};function _Le(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}function fv(i,e,t,n,r,s,o,a){var l,c=i[ts],d=c.options.onMove,f;return window.CustomEvent&&!$l&&!L0?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=e,l.from=i,l.dragged=t,l.draggedRect=n,l.related=r||e,l.relatedRect=s||Ti(e),l.willInsertAfter=a,l.originalEvent=o,i.dispatchEvent(l),d&&(f=d.call(c,l,o)),f}function GA(i){i.draggable=!1}function CLe(){QS=!1}function DLe(i,e,t){var n=Ti(qh(t.el,0,t.options,!0)),r=lJ(t.el,t.options,Tt),s=10;return e?i.clientX<r.left-s||i.clientY<n.top&&i.clientX<n.right:i.clientY<r.top-s||i.clientY<n.bottom&&i.clientX<n.left}function ELe(i,e,t){var n=Ti(CP(t.el,t.options.draggable)),r=lJ(t.el,t.options,Tt),s=10;return e?i.clientX>r.right+s||i.clientY>n.bottom&&i.clientX>n.left:i.clientY>r.bottom+s||i.clientX>n.right&&i.clientY>n.top}function TLe(i,e,t,n,r,s,o,a){var l=n?i.clientY:i.clientX,c=n?t.height:t.width,d=n?t.top:t.left,f=n?t.bottom:t.right,m=!1;if(!o){if(a&&J1<c*r){if(!mg&&(hg===1?l>d+c*s/2:l<f-c*s/2)&&(mg=!0),mg)m=!0;else if(hg===1?l<d+J1:l>f-J1)return-hg}else if(l>d+c*(1-r)/2&&l<f-c*(1-r)/2)return ALe(e)}return m=m||o,m&&(l<d+c*s/2||l>f-c*s/2)?l>d+c/2?1:-1:0}function ALe(i){return io(Ye)<io(i)?1:-1}function kLe(i){for(var e=i.tagName+i.className+i.src+i.href+i.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function SLe(i){Tx.length=0;for(var e=i.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&Tx.push(n)}}function ew(i){return setTimeout(i,0)}function ZS(i){return clearTimeout(i)}a2&&Yt(document,"touchmove",function(i){(wt.active||$f)&&i.cancelable&&i.preventDefault()});wt.utils={on:Yt,off:Ht,css:Ct,find:rJ,is:function(e,t){return!!Ao(e,t,e,!1)},extend:dLe,throttle:sJ,closest:Ao,toggleClass:_s,clone:aJ,index:io,nextTick:ew,cancelNextTick:ZS,detectDirection:uJ,getChild:qh,expando:ts};wt.get=function(i){return i[ts]};wt.mount=function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(wt.utils=Ia(Ia({},wt.utils),n.utils)),U0.mount(n)})};wt.create=function(i,e){return new wt(i,e)};wt.version=cLe;var Di=[],qp,JS,e5=!1,YA,KA,Ax,$p;function PLe(){function i(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return i.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?Yt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Yt(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Yt(document,"touchmove",this._handleFallbackAutoScroll):Yt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?Ht(document,"dragover",this._handleAutoScroll):(Ht(document,"pointermove",this._handleFallbackAutoScroll),Ht(document,"touchmove",this._handleFallbackAutoScroll),Ht(document,"mousemove",this._handleFallbackAutoScroll)),tz(),tw(),fLe()},nulling:function(){Ax=JS=qp=e5=$p=YA=KA=null,Di.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var r=this,s=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,a=document.elementFromPoint(s,o);if(Ax=t,n||this.options.forceAutoScrollFallback||L0||$l||ug){XA(t,this.options,a,n);var l=Pc(a,!0);e5&&(!$p||s!==YA||o!==KA)&&($p&&tz(),$p=setInterval(function(){var c=Pc(document.elementFromPoint(s,o),!0);c!==l&&(l=c,tw()),XA(t,r.options,c,n)},10),YA=s,KA=o)}else{if(!this.options.bubbleScroll||Pc(a,!0)===Da()){tw();return}XA(t,this.options,Pc(a,!1),!1)}}},Ul(i,{pluginName:"scroll",initializeByDefault:!0})}function tw(){Di.forEach(function(i){clearInterval(i.pid)}),Di=[]}function tz(){clearInterval($p)}var XA=sJ(function(i,e,t,n){if(e.scroll){var r=(i.touches?i.touches[0]:i).clientX,s=(i.touches?i.touches[0]:i).clientY,o=e.scrollSensitivity,a=e.scrollSpeed,l=Da(),c=!1,d;JS!==t&&(JS=t,tw(),qp=e.scroll,d=e.scrollFn,qp===!0&&(qp=Pc(t,!0)));var f=0,m=qp;
507do{var p=m,g=Ti(p),y=g.top,v=g.bottom,x=g.left,C=g.right,D=g.width,E=g.height,T=void 0,S=void 0,A=p.scrollWidth,I=p.scrollHeight,R=Ct(p),O=p.scrollLeft,j=p.scrollTop;p===l?(T=D<A&&(R.overflowX==="auto"||R.overflowX==="scroll"||R.overflowX==="visible"),S=E<I&&(R.overflowY==="auto"||R.overflowY==="scroll"||R.overflowY==="visible")):(T=D<A&&(R.overflowX==="auto"||R.overflowX==="scroll"),S=E<I&&(R.overflowY==="auto"||R.overflowY==="scroll"));var B=T&&(Math.abs(C-r)<=o&&O+D<A)-(Math.abs(x-r)<=o&&!!O),U=S&&(Math.abs(v-s)<=o&&j+E<I)-(Math.abs(y-s)<=o&&!!j);if(!Di[f])for(var F=0;F<=f;F++)Di[F]||(Di[F]={});(Di[f].vx!=B||Di[f].vy!=U||Di[f].el!==p)&&(Di[f].el=p,Di[f].vx=B,Di[f].vy=U,clearInterval(Di[f].pid),(B!=0||U!=0)&&(c=!0,Di[f].pid=setInterval((function(){n&&this.layer===0&&wt.active._onTouchMove(Ax);var H=Di[this.layer].vy?Di[this.layer].vy*a:0,L=Di[this.layer].vx?Di[this.layer].vx*a:0;typeof d=="function"&&d.call(wt.dragged.parentNode[ts],L,H,i,Ax,Di[this.layer].el)!=="continue"||oJ(Di[this.layer].el,L,H)}).bind({layer:f}),24))),f++}while(e.bubbleScroll&&m!==l&&(m=Pc(m,!1)));e5=c}},30),mJ=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,s=e.activeSortable,o=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var c=n||s;a();var d=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,f=document.elementFromPoint(d.clientX,d.clientY);l(),c&&!c.el.contains(f)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function DP(){}DP.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=qh(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:mJ};Ul(DP,{pluginName:"revertOnSpill"});function EP(){}EP.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,r=n||this.sortable;r.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),r.animateAll()},drop:mJ};Ul(EP,{pluginName:"removeOnSpill"});wt.mount(new PLe);wt.mount(EP,DP);const QA=[{key:"menuTitle",label:"MENU TITLE",flex:"2"},{key:"adminMenuID",label:"#ID",flex:"0.6"},{key:"seoUri",label:"MENU URI",flex:"1.5"},{key:"xOrder",label:"ORDER",flex:"0.6"}];function ILe(){const[i,e]=M.useState([]),[t,n]=M.useState(!0),r=M.useRef([]),s=async()=>{try{n(!0);const c=await Ne({url:"/admin-menu/getmenuapi",method:"get"});e(c?.data)}catch(c){console.error("Fetch Error:",c),e([])}finally{n(!1)}},o=async c=>{try{const d=[],f=(m,p=0)=>{m.forEach((g,y)=>{d.push({id:g.adminMenuID,parentID:p,xOrder:y+1}),g.childs&&g.childs.length>0&&f(g.childs,g.adminMenuID)})};f(c),await Ne({url:"/admin-menu/postmenuapi",method:"post",data:{menuUpdates:d}})}catch(d){console.error("Update DB Error:",d)}},a=()=>{r.current.forEach(c=>c&&typeof c.destroy=="function"&&c.destroy()),r.current=[]},l=M.useCallback(()=>{a();const c={group:"shared-menu",animation:150,handle:".drag-handle",onEnd:f=>{const{from:m,to:p,oldIndex:g,newIndex:y,item:v}=f,x=Number(v.dataset.id),C=p.dataset.listid;if(m===p){const D=Array.from(m.children);g<y?m.insertBefore(v,D[g]):m.insertBefore(v,D[g+1])}else m.appendChild(v);e(D=>{const E=JSON.parse(JSON.stringify(D));let T=null;const S=I=>{for(let R=0;R<I.length;R++){if(I[R].adminMenuID===x)return T=I.splice(R,1)[0],!0;if(I[R].childs&&S(I[R].childs))return!0}return!1};if(S(E),!T)return D;if(C==="root")E.splice(y,0,T);else{const I=E.find(R=>R.adminMenuID===Number(C));if(I){I.childs=I.childs||[];const R={...T};R.childs&&R.childs.length>0&&(R.childs=[]),I.childs.splice(y,0,R)}else E.push(T)}let A=1;return E.forEach(I=>{I.xOrder=A++,I.childs?.forEach(R=>{R.xOrder=A++})}),o(E),E})}},d=document.querySelector('[data-listid="root"]');d&&r.current.push(wt.create(d,c)),document.querySelectorAll(".child-zone").forEach(f=>{r.current.push(wt.create(f,c))})},[]);return M.useEffect(()=>{s()},[]),M.useEffect(()=>(i.length>=0&&l(),()=>a()),[i,l]),t?w.jsx("div",{style:{padding:20},children:"Loading Admin Menus..."}):w.jsxs("div",{style:sa.container,children:[w.jsxs("div",{style:sa.header,children:[w.jsx("div",{style:{width:40}}),QA.map(c=>w.jsx("div",{style:{...sa.col,flex:c.flex},children:c.label},c.key))]}),w.jsx("div",{"data-listid":"root",style:{minHeight:"50px"},children:i.map(c=>w.jsxs("div",{"data-id":c.adminMenuID,children:[w.jsxs("div",{className:"drag-handle",style:sa.parentRow,children:[w.jsx("span",{style:sa.handleIcon,children:"â ¿"}),QA.map(d=>w.jsx("div",{style:{...sa.col,flex:d.flex,fontWeight:d.key==="menuTitle"?"600":"400"},children:c[d.key]??"-"},d.key))]}),w.jsx("div",{className:"child-zone","data-listid":c.adminMenuID,style:sa.childArea,children:(c.childs||[]).map(d=>w.jsxs("div",{"data-id":d.adminMenuID,className:"drag-handle",style:sa.childRow,children:[w.jsx("span",{style:sa.handleIcon,children:"â ¿"}),QA.map(f=>w.jsx("div",{style:{...sa.col,flex:f.flex},children:d[f.key]??"-"},f.key))]},d.adminMenuID))})]},c.adminMenuID))})]})}const sa={container:{border:"1px solid #ddd",background:"#fff",margin:"20px",borderRadius:"4px",overflow:"hidden"},header:{display:"flex",background:"#f8f9fa",padding:"12px 0",borderBottom:"1px solid #dee2e6",fontWeight:"bold",fontSize:"11px",color:"#666"},parentRow:{display:"flex",padding:"10px 0",borderBottom:"1px solid #f0f
5070f0",alignItems:"center",cursor:"move",background:"#fff"},childRow:{display:"flex",padding:"8px 0",borderBottom:"1px solid #f8f8f8",alignItems:"center",cursor:"move",background:"#fcfcfc",marginLeft:"40px"},childArea:{minHeight:"10px",background:"rgba(0,0,0,0.01)"},col:{padding:"0 10px",fontSize:"13px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},handleIcon:{color:"#ccc",width:"40px",textAlign:"center",cursor:"grab",fontSize:"16px"}};function nz(){const i="/route-distance",e="routeDistanceID",t=[{type:"text",name:"routeDistanceID",title:"ID"},{type:"text",name:"fromLoc",title:"From Location"},{type:"text",name:"toLoc",title:"To Location"}],n=[{title:"ID",name:"routeDistanceID",params:{align:"center",width:"1%"},pkId:!0},{title:"From Location",name:"fromLoc",params:{align:"left"}},{title:"To Location",name:"toLoc",params:{align:"left"}},{title:"Distance",name:"distance",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function ZA(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{(async()=>s=="edit"?f(a):Jt(d,i,e))()},[a]);const c=[{type:"async-select",name:"fromLoc",title:"From Location",validate:"required",loadOptions:p=>Kn(p,{allowCustomValue:!0}),attrp:{class:"c3"}},{type:"async-select",name:"toLoc",title:"To Location",validate:"required",loadOptions:p=>Kn(p,{allowCustomValue:!0}),attrp:{class:"c3"}},{type:"text",name:"distance",title:"Distance",attrp:{class:"c3"},validate:"required,number"}],d={formArr:c},f=async p=>{const g=await Ne({url:`/route-distance/${p}`,method:"get"});g?.status===!0&&sn(g.data,d,i,e)},m=async p=>{p?.preventDefault(),Xt(d,i,t,n)&&(await Ne({url:a?`/route-distance/${a}`:"/route-distance",data:i,showLoading:!0,method:a?"put":"post"}))?.status==!0&&l(`/${o}-list`)};return w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data ",name:"frmAddEdit",onSubmit:m,id:"frmAddEdit",children:[w.jsx("div",{className:"wrap-form f60",children:w.jsx("ul",{className:"tbl-form ",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:c,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})}),w.jsx("div",{className:"wrap-form f40"})]})]})}function iz(){const i="/seo-local-page",e="localPageID",t=[{type:"text",name:"localPageID",title:"ID"},{type:"text",name:"title",title:"Page Title",params:{align:"left"}},{type:"text",name:"slug",title:"Page Slug",params:{align:"left"}},{type:"text",name:"location",title:"From Location",params:{align:"left"}}],n=[{title:"ID",name:"localPageID",params:{align:"center",width:"1%"},pkId:!0},{title:"Page Title",name:"title",params:{align:"left"}},{title:"Slug",name:"slug",params:{align:"left"}},{title:"Location",name:"location",params:{align:"left"}},{title:"Is Popular",name:"isPopular",params:{align:"left"}},{title:"Publish Status",name:"publishStatus",params:{align:"left"}},{title:"Is Show HomePage",name:"isShowHomepage",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function JA(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{(async()=>s=="edit"?x(a):Jt(v,i,e))()},[a]),M.useEffect(()=>{const D=i?.docFile?.[0];if(!D)return;const E=D?.originalFile||D?.file||null;E instanceof File&&Md(E,s,i).then(T=>{Object.keys(T).length!==0&&e(S=>({...S,...T}))}).catch(console.error)},[i?.docFile]);const c=[{name:"location",type:"async-select",title:"Location",validate:"required",loadOptions:D=>Kn(D,{allowCustomValue:!0}),attrp:{class:"c1"}},{type:"text",name:"title",title:"Title",validate:"required",attrp:{class:"c2"}},{type:"text",name:"slug",title:"Slug",validate:"required",attrp:{class:"c2"}},{type:"text",name:"meta_title",title:"Meta Title",validate:"required",attrp:{class:"c1"}}
507,{type:"textarea",name:"meta_description",title:"Meta Description",validate:"required",attrp:{class:"c2"}},{type:"textarea",name:"robots",title:"Robots",value:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",validate:"required",attrp:{class:"c2"}},{type:"text",name:"canonical_url",title:"Canonical Url",validate:"required",attrp:{class:"c2"}}],d=[{type:"fileBase64",name:"docFile",title:"Upload Content DOCX",attrp:{class:"c1",accept:".docx"}},{type:"textarea",name:"schema_json",title:"Schema Json",attrp:{class:"c1"}},{type:"text",name:"priority",title:"Priority",attrp:{class:"c1"}},{type:"select",name:"changefreq",title:"changefreq",options:[{id:"always",value:"always"},{id:"hourly",value:"hourly"},{id:"daily",value:"daily"},{id:"weekly",value:"weekly"},{id:"monthly",value:"monthly"},{id:"yearly",value:"yearly"},{id:"never",value:"never"}],attrp:{class:"c1"}},{type:"date",name:"lastmod",title:"lastmod",validate:"required",attrp:{class:"c1"}},{type:"select",name:"publishStatus",title:"Publish Status",validate:"required",options:[{id:"draft",value:"Draft"},{id:"pending",value:"Pending"},{id:"publish",value:"Publish"}],attrp:{class:"c2"}},{type:"checkbox",name:"isPopular",title:"Is Popular",attrp:{class:"c2"}},{type:"checkbox",name:"isTopRoute",title:"Is Top Route",attrp:{class:"c2"}},{type:"checkbox",name:"isShowHomepage",title:"Is Show On Hompage",attrp:{class:"c2"}}],f=[{type:"text",name:"hero_section_heading",title:"Heading",validate:"required",attrp:{class:"c3"}},{type:"editor",name:"hero_section_content",title:"Content",validate:"required",attrp:{class:"c1"}}],m=[{type:"fileBase64",name:"section1_left_image",title:"Left Image",validate:"required",attrp:{class:"c5"}},{type:"text",name:"section1_left_image_alt",title:"Left Image Alt",validate:"required",attrp:{class:"c5"}},{type:"text",name:"section1_left_image_title",title:"Left Image Title",attrp:{class:"c5"}},{type:"editor",name:"section1_right_content",title:"Right Content",validate:"required",attrp:{class:"c1"}}],p=[{type:"editor",name:"section2_left_content",title:"Left Content",validate:"required",attrp:{class:"c2"}},{type:"editor",name:"section2_right_content",title:"Right Content",validate:"required",attrp:{class:"c2"}}],g=[{type:"editor",name:"section3_left_content",title:"Left Content",validate:"required",attrp:{class:"c2"}},{type:"editor",name:"section3_right_content",title:"Right Content",validate:"required",attrp:{class:"c2"}}],y=[{type:"text",name:"faqHeading",title:"Faq Heading",attrp:{class:"c2"}},{type:"text",name:"faqSubheading",title:"Faq SubHeading",attrp:{class:"c2"}},{type:"add-row-table",frmGroup:"faqData",title:"form",fields:[{type:"text",name:"question",title:"Question"},{type:"text",name:"answer",title:"Answer"}]}],v={formArr:c,formArr4:d,heroSection:f,contentSection1:m,contentSection2:p,contentSection3:g,faqSection:y},x=async D=>{const E=await Ne({url:`/seo-local-page/${D}`,method:"get"});E?.status===!0&&sn(E.data,v,i,e)},C=async D=>{if(D?.preventDefault(),Xt(v,i,t,n)){const{docFile:T,...S}=i;(await Ne({url:a?`/seo-local-page/${a}`:"/seo-local-page",data:S,method:a?"put":"post",showLoading:!0}))?.status==!0&&l(`/${o}-list`)}};return M.useEffect(()=>{if(s=="edit"||s=="view"||!i?.title)return;let E=`local/${ql(i.title)}`;e(T=>({...T,slug:E,canonical_url:E}))},[i?.title]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:C,id:"frmAddEdit",children:[w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Basic Detail"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:c,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Other"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr4",frmArr:d,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Hero Section"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"heroSection",frmArr:f,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 1"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"
507contentSection1",frmArr:m,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 2"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection2",frmArr:p,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 3"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection3",frmArr:g,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Faq's"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"faqSection",frmArr:y,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]})]})]})}function rz(){const i="/seo-airport-page",e="airportPageID",t=[{type:"text",name:"airportPageID",title:"ID"},{type:"text",name:"title",title:"Page Title",params:{align:"left"}},{type:"text",name:"slug",title:"Page Slug",params:{align:"left"}},{type:"text",name:"location",title:"From Location",params:{align:"left"}}],n=[{title:"ID",name:"airportPageID",params:{align:"center",width:"1%"},pkId:!0},{title:"Page Title",name:"title",params:{align:"left"}},{title:"Slug",name:"slug",params:{align:"left"}},{title:"Location",name:"location",params:{align:"left"}},{title:"Is Popular",name:"isPopular",params:{align:"left"}},{title:"Publish Status",name:"publishStatus",params:{align:"left"}},{title:"Is Show HomePage",name:"isShowHomepage",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}function ek(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{(async()=>s=="edit"?x(a):Jt(v,i,e))()},[a]),M.useEffect(()=>{const D=i?.docFile?.[0];if(!D)return;const E=D?.originalFile||D?.file||null;E instanceof File&&Md(E,s,i).then(T=>{Object.keys(T).length!==0&&e(S=>({...S,...T}))}).catch(console.error)},[i?.docFile]);const c=[{name:"location",type:"async-select",title:"Location",validate:"required",loadOptions:D=>Kn(D,{allowCustomValue:!0}),attrp:{class:"c1"}},{type:"text",name:"title",title:"Title",validate:"required",attrp:{class:"c2"}},{type:"text",name:"slug",title:"Slug",validate:"required",attrp:{class:"c2"}},{type:"text",name:"meta_title",title:"Meta Title",validate:"required",attrp:{class:"c1"}},{type:"textarea",name:"meta_description",title:"Meta Description",validate:"required",attrp:{class:"c2"}},{type:"textarea",name:"robots",title:"Robots",value:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",validate:"required",attrp:{class:"c2"}},{type:"text",name:"canonical_url",title:"Canonical Url",validate:"required",attrp:{class:"c2"}}],d=[{type:"fileBase64",name:"docFile",title:"Upload Content DOCX",attrp:{class:"c1",accept:".docx"}},{type:"textarea",name:"schema_json",title:"Schema Json",attrp:{class:"c1"}},{type:"text",name:"priority",title:"Priority",attrp:{class:"c1"}},{type:"select",name:"changefreq",title:"changefreq",options:[{id:"always",value:"always"},{id:"hourly",value:"hourly"},{id:"daily",value:"daily"},{id:"weekly",value:"weekly"},{id:"monthly",value:"monthly"},{id:"yearly",value:"yearly"},{id:"never",value:"never"}],attrp:{class:"c1"}},{type:"date",name:"lastmod",title:"lastmod",validate:"required",attrp:{class:"c1"}},{type:"select",name:"publishStatus",title:"Publish Status",validate:"required",options:[{id:"draft",value:"Draft"},{id:"pending",value:"Pending"},{id:"publish",value:"Publish"}],attrp:{class:"c2"}},{type:"checkbox",name:"isPopular",title:"Is Popular",attrp:{class:"c2"}},{type:"checkbox",name:"isTopRoute",title:"Is Top Route",attrp:{class:"c2"}},{type:"checkbox",name:"isShowHomepage",title:"Is Show On Hompage",attrp:{class:"c2"}}],f=[{type:"text",name:"hero_section_heading",title:"Heading",validate:"required",attrp:{class:"c3"}},{type:"editor",name:"hero_section_content",title:"Content",validate:"required",attrp:{class:"c1"}}],m=[{type:"fileBase64",name:"section1_left_image",title:"Left Image",validate:"required",attrp:{class:"c5"}},{type:"text",name:"section1_left_image_alt",title:"Left Image Alt",validate:"required",attrp:{class:"c5"}},{type:"text",name:"section1_left_image_title",title:"Left Image Title",attrp:{class:"c5"}},{type:"editor",name:"section1_right_content",title:"Right Content",validate:"required",attrp:{class:"c1"}}],p=[{type:"editor",name:"section2_left_content",title:"Left Content",validate:"required",attrp:{class:"c2"}},{type:"editor",name:"section2_right_content",title:"Right Content",validate:"required",attrp:{class:"c2"}}],g=[{type:"editor",name:"section3_left_content",title:"Left Content",validate:"required",attrp:{class:"c2"}},{type:"editor",name:"section3_right_content",title:"Right Content",validate:"required",attrp:{class:"c2"}}],y=[{type:"text",name:"faqHeading",title:"Faq Heading",attrp:{class:"c2"}},{type:"text",name:"faqSubheading",title:"Faq SubHeading",attrp:{class:"c2"}}
507,{type:"add-row-table",frmGroup:"faqData",title:"form",fields:[{type:"text",name:"question",title:"Question"},{type:"text",name:"answer",title:"Answer"}]}],v={formArr:c,formArr4:d,heroSection:f,contentSection1:m,contentSection2:p,contentSection3:g,faqSection:y},x=async D=>{const E=await Ne({url:`/seo-airport-page/${D}`,method:"get"});E?.status===!0&&sn(E.data,v,i,e)},C=async D=>{if(D?.preventDefault(),Xt(v,i,t,n)){const{docFile:T,...S}=i;(await Ne({url:a?`/seo-airport-page/${a}`:"/seo-airport-page",data:S,method:a?"put":"post",showLoading:!0}))?.status==!0&&l(`/${o}-list`)}};return M.useEffect(()=>{if(s=="edit"||s=="view"||!i?.title)return;let E=`airport/${ql(i.title)}`;e(T=>({...T,slug:E,canonical_url:E}))},[i?.title]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:C,id:"frmAddEdit",children:[w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Basic Detail"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:c,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Other"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr4",frmArr:d,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Hero Section"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"heroSection",frmArr:f,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 1"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection1",frmArr:m,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 2"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection2",frmArr:p,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 3"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection3",frmArr:g,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Faq's"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"faqSection",frmArr:y,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]})]})]})}function tk(){const[i,e]=M.useState({}),[t,n]=M.useState({}),[r]=$t(),{modeType:s,modeName:o}=_t(),a=r.get("id"),l=Mt();M.useEffect(()=>{(async()=>s=="edit"?x(a):Jt(v,i,e))()},[a]),M.useEffect(()=>{const D=i?.docFile?.[0];if(!D)return;const E=D?.originalFile||D?.file||null;E instanceof File&&Md(E,s,i).then(T=>{Object.keys(T).length!==0&&e(S=>({...S,...T}))}).catch(console.error)},[i?.docFile]);const c=[{name:"routeFromLocation",type:"async-select",title:"From Location",info:"For Route",validate:"required",loadOptions:D=>Kn(D,{allowCustomValue:!0}),attrp:{class:"c2"}},{name:"routeToLocation",type:"async-select",title:"To Location",info:"For Route",validate:"required",loadOptions:D=>Kn(D,{allowCustomValue:!0}),attrp:{class:"c2"}},{type:"text",name:"title",title:"Title",validate:"required",attrp:{class:"c2"}},{type:"text",name:"slug",title:"Slug",validate:"required",attrp:{class:"c2"}},{type:"text",name:"meta_title",title:"Meta Title",validate:"required",attrp:{class:"c1"}},{type:"textarea",name:"meta_description",title:"Meta Description",validate:"required",attrp:{class:"c2"}},{type:"textarea",name:"robots",title:"Robots",validate:"required",value:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",attrp:{class:"c2"}},{type:"text",name:"canonical_url",title:"Canonical Url",validate:"required",attrp:{class:"c2"}}],d=[{type:"fileBase64",name:"docFile",title:"Upload Content DOCX",attrp:{class:"c1",accept:".docx"}}
507,{type:"textarea",name:"schema_json",title:"Schema Json",attrp:{class:"c1"}},{type:"text",name:"priority",title:"Priority",attrp:{class:"c1"}},{type:"select",name:"changefreq",title:"changefreq",options:[{id:"always",value:"always"},{id:"hourly",value:"hourly"},{id:"daily",value:"daily"},{id:"weekly",value:"weekly"},{id:"monthly",value:"monthly"},{id:"yearly",value:"yearly"},{id:"never",value:"never"}],attrp:{class:"c1"}},{type:"date",name:"lastmod",title:"lastmod",validate:"required",attrp:{class:"c1"}},{type:"select",name:"publishStatus",title:"Publish Status",validate:"required",options:[{id:"draft",value:"Draft"},{id:"pending",value:"Pending"},{id:"publish",value:"Publish"}],attrp:{class:"c2"}},{type:"checkbox",name:"isPopular",title:"Is Popular",attrp:{class:"c2"}},{type:"checkbox",name:"isTopRoute",title:"Is Top Route",attrp:{class:"c2"}},{type:"checkbox",name:"isShowHomepage",title:"Is Show On Hompage",attrp:{class:"c2"}}],f=[{type:"text",name:"hero_section_heading",title:"Heading",validate:"required",attrp:{class:"c3"}},{type:"text",name:"route_distance",title:"Route Distance",info:"Kms",attrp:{class:"c3"},validate:"required, number"},{type:"text",name:"route_estimate_time",title:"Route Estimate Time",attrp:{class:"c3"},validate:"required"},{type:"editor",name:"hero_section_content",title:"Content",validate:"required",attrp:{class:"c1"}}],m=[{type:"fileBase64",name:"section1_left_image",title:"Left Image",validate:"required",attrp:{class:"c5"}},{type:"text",name:"section1_left_image_alt",title:"Left Image Alt",validate:"required",attrp:{class:"c5"}},{type:"text",name:"section1_left_image_title",title:"Left Image Title",attrp:{class:"c5"}},{type:"editor",name:"section1_right_content",title:"Right Content",validate:"required",attrp:{class:"c1"}}],p=[{type:"editor",name:"section2_left_content",title:"Left Content",validate:"required",attrp:{class:"c2"}},{type:"editor",name:"section2_right_content",title:"Right Content",validate:"required",attrp:{class:"c2"}}],g=[{type:"editor",name:"section3_left_content",title:"Left Content",validate:"required",attrp:{class:"c2"}},{type:"editor",name:"section3_right_content",title:"Right Content",validate:"required",attrp:{class:"c2"}}],y=[{type:"text",name:"faqHeading",title:"Faq Heading",attrp:{class:"c2"}},{type:"text",name:"faqSubheading",title:"Faq SubHeading",attrp:{class:"c2"}},{type:"add-row-table",frmGroup:"faqData",title:"form",fields:[{type:"text",name:"question",title:"Question"},{type:"text",name:"answer",title:"Answer"}]}],v={formArr:c,formArr4:d,heroSection:f,contentSection1:m,contentSection2:p,contentSection3:g,faqSection:y},x=async D=>{const E=await Ne({url:`/seo-sharing-page/${D}`,method:"get"});E?.status===!0&&sn(E.data,v,i,e)},C=async D=>{if(D?.preventDefault(),Xt(v,i,t,n)){const{docFile:T,...S}=i;(await Ne({url:a?`/seo-sharing-page/${a}`:"/seo-sharing-page",data:S,method:a?"put":"post",showLoading:!0}))?.status==!0&&l(`/${o}-list`)}};return M.useEffect(()=>{if(s=="edit"||s=="view"||!i?.title)return;let E=`sharing-cab/${ql(i.title)}`;e(T=>({...T,slug:E,canonical_url:E}))},[i?.title]),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsxs("form",{className:"wrap-data",name:"frmAddEdit",onSubmit:C,id:"frmAddEdit",children:[w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Basic Detail"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr",frmArr:c,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f50",children:[w.jsx("h2",{className:"form-head",children:"Other"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"formArr4",frmArr:d,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Hero Section"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"heroSection",frmArr:f,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 1"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"
507contentSection1",frmArr:m,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 2"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection2",frmArr:p,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Content Section 3"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"contentSection3",frmArr:g,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]}),w.jsxs("div",{className:"wrap-form f",children:[w.jsx("h2",{className:"form-head",children:"Faq's"}),w.jsx("ul",{className:"tbl-form",children:w.jsx(Le,{frmGroupName:"faqSection",frmArr:y,formStateData:i,setFormStateData:e,formError:t,setFormErrors:n})})]})]})]})}function sz(){const i="/seo-sharing-page",e="sharingID",t=[{type:"text",name:"sharingID",title:"ID"},{type:"text",name:"title",title:"Page Title",params:{align:"left"}},{type:"text",name:"category",title:"Category",params:{align:"left"}},{type:"text",name:"slug",title:"Page Slug",params:{align:"left"}},{type:"text",name:"routeToLocation",title:"From Location",params:{align:"left"}},{type:"text",name:"routeToLocation",title:"To Location",params:{align:"left"}}],n=[{title:"ID",name:"sharingID",params:{align:"center",width:"1%"},pkId:!0},{title:"Page Title",name:"title",params:{align:"left"}},{title:"Category",name:"category",params:{align:"left"}},{title:"Slug",name:"slug",params:{align:"left"}},{title:"From Location",name:"routeFromLocation",params:{align:"left"}},{title:"To Location",name:"routeToLocation",params:{align:"left"}},{title:"Is Popular",name:"isPopular",params:{align:"left"}},{title:"Publish Status",name:"publishStatus",params:{align:"left"}},{title:"Is Show HomePage",name:"isShowHomepage",params:{align:"left"}}];return w.jsxs(w.Fragment,{children:[w.jsx(It,{searchFlds:t}),w.jsxs("div",{className:"wrap-right",children:[w.jsx(et,{}),w.jsx("div",{className:"wrap-data",children:w.jsx(Rt,{columns:n,editId:e,apiUrl:i})})]})]})}const RLe=[{path:"/",element:w.jsx(XNe,{})},{path:"/*",element:w.jsx(ZNe,{children:w.jsx(ONe,{})}),children:[{path:"page-not-found",element:w.jsx(O9,{})},{path:"demo-list",element:w.jsx(Xy,{})},{path:"demo-add",element:w.jsx(Xy,{})},{path:"dashboard-list",element:w.jsx(FBe,{})},{path:"admin-user-add",element:w.jsx(Xy,{})},{path:"admin-user-edit",element:w.jsx(Xy,{})},{path:"admin-user-list",element:w.jsx(WNe,{})},{path:"admin-role-add",element:w.jsx(R9,{})},{path:"admin-role-edit",element:w.jsx(R9,{})},{path:"admin-role-list",element:w.jsx(qNe,{})},{path:"admin-menu-add",element:w.jsx(F9,{})},{path:"admin-menu-edit",element:w.jsx(F9,{})},{path:"admin-menu-list",element:w.jsx(GNe,{})},{path:"organization-add",element:w.jsx(I9,{})},{path:"organization-edit",element:w.jsx(I9,{})},{path:"organization-list",element:w.jsx(HNe,{})},{path:"trip-type-add",element:w.jsx(N9,{})},{path:"trip-type-edit",element:w.jsx(N9,{})},{path:"trip-type-list",element:w.jsx(L9,{})},{path:"trip-type-trash",element:w.jsx(L9,{})},{path:"fuel-type-add",element:w.jsx(B9,{})},{path:"fuel-type-edit",element:w.jsx(B9,{})},{path:"fuel-type-list",element:w.jsx(M9,{})},{path:"fuel-type-trash",element:w.jsx(M9,{})},{path:"vehicle-add",element:w.jsx(U9,{})},{path:"vehicle-edit",element:w.jsx(U9,{})},{path:"vehicle-list",element:w.jsx(V9,{})},{path:"vehicle-trash",element:w.jsx(V9,{})},{path:"customer-feedback-list",element:w.jsx(jj,{})},{path:"customer-feedback-trash",element:w.jsx(jj,{})},{path:"customer-feedback-add",element:w.jsx(LA,{})},{path:"customer-feedback-edit",element:w.jsx(LA,{})},{path:"customer-feedback-view",element:w.jsx(LA,{})},{path:"oneway-location-add",element:w.jsx(H9,{})},{path:"oneway-location-edit",element:w.jsx(H9,{})},{path:"oneway-location-list",element:w.jsx(q9,{})},{path:"oneway-location-trash",element:w.jsx(q9,{})},{path:"oneway-static-location-add",element:w.jsx(Y9,{})},{path:"oneway-static-location-edit",element:w.jsx(Y9,{})},{path:"oneway-static-location-list",element:w.jsx(K9,{})},{path:"oneway-static-location-trash",element:w.jsx(K9,{})},{path:"airport-pickup-static-location-add",element:w.jsx(oU,{})},{path:"airport-pickup-static-location-edit",element:w.jsx(oU,{})},{path:"airport-pickup-static-location-list",element:w.jsx(aU,{})},{path:"airport-pickup-static-location-trash",element:w.jsx(aU,{})},{path:"roundtrip-location-add",element:w.jsx(X9,{})},{path:"roundtrip-location-edit",element:w.jsx(X9,{})},{path:"roundtrip-location-list",element:w.jsx(Q9,{})},{path:"roundtrip-location-trash",element:w.jsx(Q9,{})},{path:"airport-return-location-add",element:w.jsx(Z9,{})},{path:"airport-return-location-edit",element:w.jsx(Z9,{})},{path:"airport-return-location-list",element:w.jsx(J9,{})},{path:"airport-return-location-trash",element:w.jsx(J9,{})},{path:"airport-drop-location-add",element:w.jsx(eU,{})},{path:"airport-drop-location-edit",element:w.jsx(eU,{})},{path:"airport-drop-location-list",element:w.jsx(tU,{})},{path:"airport-drop-location-trash",element:w.jsx(tU,{})},{path:"airport-pickup-location-add",element:w.jsx(nU,{})},{path:"airport-pickup-location-edit",element:w.jsx(nU,{})},{path:"airport-pickup-location-list",element:w.jsx(iU,{})},{path:"airport-pickup-location-trash",element:w.jsx(iU,{})},{path:"localtrip-location-add",element:w.jsx(rU,{})},{path:"localtrip-location-edit",element:w.jsx(rU,{})},{path:"localtrip-location-list",element:w.jsx(sU,{})},{path:"localtrip-location-trash",element:w.jsx(sU,{})},{path:"location-master-add",element:w.jsx(cU,{})},{path:"location-master-edit",element:w.jsx(cU,{})},{path:"location-master-list",element:w.jsx(lU,{})},{path:"location-master-trash",element:w.jsx(lU,{})},{path:"airport-location-master-add",element:w.jsx(uU,{})},{path:"airport-location-master-edit",element:w.jsx(uU,{})},{path:"airport-location-master-list",element:w.jsx(dU,{})},{path:"airport-location-master-trash",element:w.jsx(dU,{})},{path:"customer-list",element:w.jsx($9,{})},{path:"customer-trash",element:w.jsx($9,{})},{path:"contact-enquiry-list",element:w.jsx(G9,{})},{path:"contact-enquiry-trash",element:w.jsx(G9,{})},{path:"manual-booking-list",element:w.jsx(tBe,{})},{path:"manual-booking-add",element:w.jsx(vc,{})},{path:"manual-booking-view",element:w.jsx(Su,{})},{path:"manual-booking-edit",element:w.jsx(vc,{})},{path:"all-rides-list",element:w.jsx(iBe,{})},{path:"all-rides-edit",element:w.jsx(vc,{})},{path:"all-rides-view",element:w.jsx(Su,{})},{path:"completed-rides-list",element:w.jsx(sBe,{})},{path:"completed-rides-edit",element:w.jsx(vc,{})},{path:"completed-rides-view",element:w.jsx(Su,{})},{path:"cancelled-rides-list",element:w.jsx(rBe,{})},{path:"cancelled-rides-edit",element:w.jsx(vc,{})},{path:"cancelled-rides-view",element:w.jsx(Su,{})},{path:"failed-rides-list",element:w.jsx(oBe,{})},{path:"failed-rides-edit",element:w.jsx(vc,{})},{path:"failed-rides-view",element:w.jsx(Su,{})},{path:"ongoing-rides-list",element:w.jsx(aBe,{})},{path:"ongoing-rides-edit",element:w.jsx(vc,{})},{path:"ongoing-rides-view",element:w.jsx(Su,{})},{path:"upcoming-rides-list",element:w.jsx(lBe,{})},{path:"upcoming-rides-edit",element:w.jsx(vc,{})},{path:"upcoming-rides-view",element:w.jsx(Su,{})},{path:"cab-search-request-list",element:w.jsx(NBe,{})},{path:"pages-list",element:w.jsx(mU,{})},{path:"pages-trash",element:w.jsx(mU,{})},{path:"pages-add",element:w.jsx(ET,{})},{path:"pages-edit",element:w.jsx(ET,{})},{path:"pages-view",element:w.jsx(ET,{})},{path:"seo-state-page-list",element:w.jsx(Bj,{})},{path:"seo-state-page-trash",element:w.jsx(Bj,{})},{path:"seo-state-page-add",element:w.jsx(FA,{})},{path:"seo-state-page-edit",element:w.jsx(FA,{})},{path:"seo-state-page-view",element:w.jsx(FA,{})},{path:"seo-city-page-list",element:w.jsx(Mj,{})},{path:"seo-city-page-trash",element:w.jsx(Mj,{})},{path:"seo-city-page-add",element:w.jsx(OA,{})},{path:"seo-city-page-edit",element:w.jsx(OA,{})},{path:"seo-city-page-view",element:w.jsx(OA,{})},{path:"seo-service-page-list",element:w.jsx(Lj,{})},{path:"seo-service-page-trash",element:w.jsx(Lj,{})},{path:"seo-service-page-add",element:w.jsx(NA,{})},{path:"seo-service-page-edit",element:w.jsx(NA,{})},{path:"seo-service-page-view",element:w.jsx(NA,{})},{path:"seo-city-to-city-page-list",element:w.jsx(Uj,{})},{path:"seo-city-to-city-page-trash",element:w.jsx(Uj,{})},{path:"seo-city-to-city-page-add",element:w.jsx(BA,{})},{path:"seo-city-to-city-page-edit",element:w.jsx(BA,{})},{path:"seo-city-to-city-page-view",element:w.jsx(BA,{})},{path:"seo-sharing-page-list",element:w.jsx(sz,{})},{path:"seo-sharing-page-trash",element:w.jsx(sz,{})},{path:"seo-sharing-page-add",element:w.jsx(tk,{})},{path:"seo-sharing-page-edit",element:w.jsx(tk,{})},{path:"seo-sharing-page-view",element:w.jsx(tk,{})},{path:"seo-local-page-list",element:w.jsx(iz,{})},{path:"seo-local-page-trash",element:w.jsx(iz,{})},{path:"seo-local-page-add",element:w.jsx(JA,{})},{path:"seo-local-page-edit",element:w.jsx(JA,{})},{path:"seo-local-page-view",element:w.jsx(JA,{})},{path:"seo-airport-page-list",element:w.jsx(rz,{})},{path:"seo-airport-page-trash",element:w.jsx(rz,{})},{path:"seo-airport-page-add",element:w.jsx(ek,{})},{path:"seo-airport-page-edit",element:w.jsx(ek,{})},{path:"seo-airport-page-view",element:w.jsx(ek,{})},{path:"blogs-list",element:w.jsx(Vj,{})},{path:"blogs-trash",element:w.jsx(Vj,{})},{path:"blogs-add",element:w.jsx(MA,{})},{path:"blogs-edit",element:w.jsx(MA,{})},{path:"blogs-view",element:w.jsx(MA,{})},{path:"surge-charges-list",element:w.jsx(zj,{})},{path:"surge-charges-trash",element:w.jsx(zj,{})},{path:"surge-charges-add",element:w.jsx(UA,{})},{path:"surge-charges-edit",element:w.jsx(UA,{})},{path:"surge-charges-view",element:w.jsx(UA,{})},{path:"vendor-request-list",element:w.jsx(iLe,{})},{path:"faqs-list",element:w.jsx(qj,{})},{path:"faqs-trash",element:w.jsx(qj,{})},{path:"faqs-add",element:w.jsx(VA,{})},{path:"faqs-edit",element:w.jsx(VA,{})},{path:"faqs-view",element:w.jsx(VA,{})},{path:"json-schema-list",element:w.jsx($j,{})},{path:"json-schema-trash",element:w.jsx($j,{})},{path:"json-schema-add",element:w.jsx(jA,{})},{path:"json-schema-edit",element:w.jsx(jA,{})},{path:"json-schema-view",element:w.jsx(jA,{})},{path:"test-menu-list",element:w.jsx(ILe,{})},{path:"route-distance-list",element:w.jsx(nz,{})},{path:"route-distance-trash",element:w.jsx(nz,{})},{path:"route-distance-add",element:w.jsx(ZA,{})},{path:"route-distance-edit",element:w.jsx(ZA,{})},{path:"route-distance-view",element:w.jsx(ZA,{})},{path:"*",element:w.jsx(O9,{})}]}],FLe=()=>yne(RLe),OLe={VITE_APP_BASE_PATH:""},{VITE_APP_BASE_PATH:NLe}=OLe;function BLe(){return w.jsx(Mse,{store:oW,children:w.jsx(iie,{basename:NLe,children:w.jsx(FLe,{})})})}Fte.createRoot(document.getElementById("root")).render(w.jsx(M.StrictMode,{children:w.jsx(BLe,{})}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.