vendor: 10,734 bytes, lines 1-26
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Usages-DTdYRcfN.js","assets/LineChart-CYK0ifYv.js","assets/ErrorBarContext-Vpb230Hc.js","assets/tooltipContext-BwCowrlx.js","assets/Line-C31thXLK.js","assets/BarChart-DFSQrLLm.js","assets/Bar-C1k-7kv9.js","assets/PieChart-BtAJIQFI.js","assets/Dashboard-D_AQYKJc.js","assets/Blogs-DgLqSOe-.js","assets/Earnings-D1niKpbe.js","assets/OpenAIUsage-CyIOH8BK.js","assets/GeneralSettings-C342yAGd.js","assets/ImageUpload-HajQf4bw.js","assets/HeroSettings-DMzLOO0D.js","assets/TestimonialsSettings-C_K4MEpT.js","assets/BrandLogosSettings-B6lzlCEU.js","assets/Tasks-CO0F5f01.js","assets/StatusBadge-ImhhWdZx.js","assets/useDebounce-C8Ddj5sY.js","assets/tasks-mYtm2G_9.js","assets/TaskForm-Cp0lYkxO.js","assets/GscIssues-DZhh3O3f.js","assets/GscRedirects-CAXJM582.js","assets/GscStructuredData-BFcTwrhM.js","assets/GscGaps-CNWZk3yd.js","assets/GscTraffic-CYvjDaSt.js","assets/Reports-Ba5-c2I_.js","assets/Languages-BFSxltMB.js","assets/EmailLogs-DYD18cjm.js"])))=>i.map(i=>d[i]); 2var wte=Object.defineProperty;var _te=(e,n,i)=>n in e?wte(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var Dt=(e,n,i)=>_te(e,typeof n!="symbol"?n+"":n,i);function Ate(e,n){for(var i=0;i<n.length;i++){const s=n[i];if(typeof s!="string"&&!Array.isArray(s)){for(const d in s)if(d!=="default"&&!(d in e)){const h=Object.getOwnPropertyDescriptor(s,d);h&&Object.defineProperty(e,d,h.get?h:{enumerable:!0,get:()=>s[d]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var op=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function os(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Cte(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var i=function s(){return this instanceof s?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};i.prototype=n.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var d=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(i,s,d.get?d:{enumerable:!0,get:function(){return e[s]}})}),i}var iB={exports:{}},D0={},oB={exports:{}},It={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var lm=Symbol.for("react.element"),jte=Symbol.for("react.portal"),Nte=Symbol.for("react.fragment"),Ete=Symbol.for("react.strict_mode"),Ste=Symbol.for("react.profiler"),Dte=Symbol.for("react.provider"),Tte=Symbol.for("react.context"),Ite=Symbol.for("react.forward_ref"),Mte=Symbol.for("react.suspense"),Pte=Symbol.for("react.memo"),Ote=Symbol.for("react.lazy"),yT=Symbol.iterator;function Bte(e){return e===null||typeof e!="object"?null:(e=yT&&e[yT]||e["@@iterator"],typeof e=="function"?e:null)}var sB={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},aB=Object.assign,lB={};function Ld(e,n,i){this.props=e,this.context=n,this.refs=lB,this.updater=i||sB}Ld.prototype.isReactComponent={};Ld.prototype.setState=function(e,n){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")};Ld.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function cB(){}cB.prototype=Ld.prototype;function V1(e,n,i){this.props=e,this.context=n,this.refs=lB,this.updater=i||sB}var U1=V1.prototype=new cB;U1.constructor=V1;aB(U1,Ld.prototype);U1.isPureReactComponent=!0;var xT=Array.isArray,dB=Object.prototype.hasOwnProperty,W1={current:null},uB={key:!0,ref:!0,__self:!0,__source:!0};function hB(e,n,i){var s,d={},h=null,f=null;if(n!=null)for(s in n.ref!==void 0&&(f=n.ref),n.key!==void 0&&(h=""+n.key),n)dB.call(n,s)&&!uB.hasOwnProperty(s)&&(d[s]=n[s]);var g=arguments.length-2;if(g===1)d.children=i;else if(1<g){for(var p=Array(g),x=0;x<g;x++)p[x]=arguments[x+2];d.children=p}if(e&&e.defaultProps)for(s in g=e.defaultProps,g)d[s]===void 0&&(d[s]=g[s]);return{$$typeof:lm,type:e,key:h,ref:f,props:d,_owner:W1.current}}function Lte(e,n){return{$$typeof:lm,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function H1(e){return typeof e=="object"&&e!==null&&e.$$typeof===lm}function Rte(e){var n={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(i){return n[i]})}var vT=/\/+/g;function gx(e,n){return typeof e=="object"&&e!==null&&e.key!=null?Rte(""+e.key):n.toString(36)}function qp(e,n,i,s,d){var h=typeof e;(h==="undefined"||h==="boolean")&&(e=null);var f=!1;if(e===null)f=!0;else switch(h){case"string":case"number":f=!0;break;case"object":switch(e.$$typeof){case lm:case jte:f=!0}}if(f)return f=e,d=d(f),e=s===""?"."+gx(f,0):s,xT(d)?(i="",e!=null&&(i=e.replace(vT,"$&/")+"/"),qp(d,n,i,"",function(x){return x})):d!=null&&(H1(d)&&(d=Lte(d,i+(!d.key||f&&f.key===d.key?"":(""+d.key).replace(vT,"$&/")+"/")+e)),n.push(d)),1;if(f=0,s=s===""?".":s+":",xT(e))for(var g=0;g<e.length;g++){h=e[g];var p=s+gx(h,g);f+=qp(h,n,i,p,d)}else if(p=Bte(e),typeof p=="function")for(e=p.call(e),g=0;!(h=e.next()).done;)h=h.value,p=s+gx(h,g++),f+=qp(h,n,i,p,d);else if(h==="object")throw n=String(e),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.");return f}function sp(e,n,i){if(e==null)return e;var s=[],d=0;return qp(e,s,"","",function(h){return n.call(i,h,d++)}),s}function zte(e){if(e._status===-1){var n=e._result;n=n(),n.then(function(i){(e._status===0||e._status===-1)&&(e._status=1,e._result=i)},function(i){(e._status===0||e._status===-1)&&(e._status=2,e._result=i)}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var Gr={current:null},Kp={transition:null},Fte={ReactCurrentDispatcher:Gr,ReactCurrentBatchConfig:Kp,ReactCurrentOwner:W1};function mB(){throw Error("act(...) is not supported in production builds of React.")}It.Children={map:sp,forEach:function(e,n,i){sp(e,function(){n.apply(this,arguments)},i)},count:function(e){var n=0;return sp(e,function(){n++}),n},toArray:function(e){return sp(e,function(n){return n})||[]},only:function(e){if(!H1(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};It.Component=Ld;It.Fragment=Nte;It.Profiler=Ste;It.PureComponent=V1;It.StrictMode=Ete;It.Suspense=Mte;It.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Fte;It.act=mB;It.cloneElement=function(e,n,i){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var s=aB({},e.props),d=e.key,h=e.ref,f=e._owner;if(n!=null){if(n.ref!==void 0&&(h=n.ref,f=W1.current),n.key!==void 0&&(d=""+n.key),e.type&&e.type.defaultProps)var g=e.type.defaultProps;for(p in n)dB.call(n,p)&&!uB.hasOwnProperty(p)&&(s[p]=n[p]===void 0&&g!==void 0?g[p]:n[p])}var p=arguments.length-2;if(p===1)s.children=i;else if(1<p){g=Array(p);for(var x=0;x<p;x++)g[x]=arguments[x+2];s.children=g}return{$$typeof:lm,type:e.type,key:d,ref:h,props:s,_owner:f}};It.createContext=function(e){return e={$$typeof:Tte,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Dte,_context:e},e.Consumer=e};It.createElement=hB;It.createFactory=function(e){var n=hB.bind(null,e);return n.type=e,n};It.createRef=function(){return{current:null}};It.forwardRef=function(e){return{$$typeof:Ite,render:e}};It.isValidElement=H1;It.lazy=function(e){return{$$typeof:Ote,_payload:{_status:-1,_result:e},_init:zte}};It.memo=function(e,n){return{$$typeof:Pte,type:e,compare:n===void 0?null:n}};It.startTransition=function(e){var n=Kp.transition;Kp.transition={};try{e()}finally{Kp.transition=n}};It.unstable_act=mB;It.useCallback=function(e,n){return Gr.current.useCallback(e,n)};It.useContext=function(e){return Gr.current.useContext(e)};It.useDebugValue=function(){};It.useDeferredValue=function(e){return Gr.current.useDeferredValue(e)};It.useEffect=function(e,n){return Gr.current.useEffect(e,n)};It.useId=function(){return Gr.current.useId()};It.useImperativeHandle=function(e,n,i){return Gr.current.useImperativeHandle(e,n,i)};It.useInsertionEffect=function(e,n){return Gr.current.useInsertionEffect(e,n)};It.useLayoutEffect=function(e,n){return Gr.current.useLayoutEffect(e,n)};It.useMemo=function(e,n){return Gr.current.useMemo(e,n)};It.useReducer=function(e,n,i){return Gr.current.useReducer(e,n,i)};It.useRef=function(e){return Gr.current.useRef(e)};It.useState=function(e){return Gr.current.useState(e)};It.useSyncExternalStore=function(e,n,i){return Gr.current.useSyncExternalStore(e,n,i)};It.useTransition=function(){return Gr.current.useTransition()};It.version="18.3.1";oB.exports=It;var j=oB.exports;const Rd=os(j),fB=Ate({__proto__:null,default:Rd},[j]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var $te=j,Vte=Symbol.for("react.element"),Ute=Symbol.for("react.fragment"),Wte=Object.prototype.hasOwnProperty,Hte=$te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Gte={key:!0,ref:!0,__self:!0,__source:!0};function pB(e,n,i){var s,d={},h=null,f=null;i!==void 0&&(h=""+i),n.key!==void 0&&(h=""+n.key),n.ref!==void 0&&(f=n.ref);for(s in n)Wte.call(n,s)&&!Gte.hasOwnProperty(s)&&(d[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps,n)d[s]===void 0&&(d[s]=n[s]);return{$$typeof:Vte,type:e,key:h,ref:f,props:d,_owner:Hte.current}}D0.Fragment=Ute;D0.jsx=pB;D0.jsxs=pB;iB.exports=D0;var a=iB.exports,Rv={},gB={exports:{}},Pi={},bB={exports:{}},kB={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(e){function n(ee,le){var je=ee.length;ee.push(le);e:for(;0<je;){var ve=je-1>>>1,Ce=ee[ve];if(0<d(Ce,le))ee[ve]=le,ee[je]=Ce,je=ve;else break e}}function i(ee){return ee.length===0?null:ee[0]}function s(ee){if(ee.length===0)return null;var le=ee[0],je=ee.pop();if(je!==le){ee[0]=je;e:for(var ve=0,Ce=ee.length,Q=Ce>>>1;ve<Q;){var te=2*(ve+1)-1,pe=ee[te],be=te+1,Oe=ee[be];
vendor: 10,389 bytes, lines 26-35
26if(0>d(pe,je))be<Ce&&0>d(Oe,pe)?(ee[ve]=Oe,ee[be]=je,ve=be):(ee[ve]=pe,ee[te]=je,ve=te);else if(be<Ce&&0>d(Oe,je))ee[ve]=Oe,ee[be]=je,ve=be;else break e}}return le}function d(ee,le){var je=ee.sortIndex-le.sortIndex;return je!==0?je:ee.id-le.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;e.unstable_now=function(){return h.now()}}else{var f=Date,g=f.now();e.unstable_now=function(){return f.now()-g}}var p=[],x=[],y=1,v=null,w=3,C=!1,E=!1,S=!1,D=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function B(ee){for(var le=i(x);le!==null;){if(le.callback===null)s(x);else if(le.startTime<=ee)s(x),le.sortIndex=le.expirationTime,n(p,le);else break;le=i(x)}}function R(ee){if(S=!1,B(ee),!E)if(i(p)!==null)E=!0,Ae(F);else{var le=i(x);le!==null&&he(R,le.startTime-ee)}}function F(ee,le){E=!1,S&&(S=!1,I(z),z=-1),C=!0;var je=w;try{for(B(le),v=i(p);v!==null&&(!(v.expirationTime>le)||ee&&!G());){var ve=v.callback;if(typeof ve=="function"){v.callback=null,w=v.priorityLevel;var Ce=ve(v.expirationTime<=le);le=e.unstable_now(),typeof Ce=="function"?v.callback=Ce:v===i(p)&&s(p),B(le)}else s(p);v=i(p)}if(v!==null)var Q=!0;else{var te=i(x);te!==null&&he(R,te.startTime-le),Q=!1}return Q}finally{v=null,w=je,C=!1}}var V=!1,P=null,z=-1,W=5,K=-1;function G(){return!(e.unstable_now()-K<W)}function Z(){if(P!==null){var ee=e.unstable_now();K=ee;var le=!0;try{le=P(!0,ee)}finally{le?se():(V=!1,P=null)}}else V=!1}var se;if(typeof M=="function")se=function(){M(Z)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,Se=ge.port2;ge.port1.onmessage=Z,se=function(){Se.postMessage(null)}}else se=function(){D(Z,0)};function Ae(ee){P=ee,V||(V=!0,se())}function he(ee,le){z=D(function(){ee(e.unstable_now())},le)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(ee){ee.callback=null},e.unstable_continueExecution=function(){E||C||(E=!0,Ae(F))},e.unstable_forceFrameRate=function(ee){0>ee||125<ee?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<ee?Math.floor(1e3/ee):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_getFirstCallbackNode=function(){return i(p)},e.unstable_next=function(ee){switch(w){case 1:case 2:case 3:var le=3;break;default:le=w}var je=w;w=le;try{return ee()}finally{w=je}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(ee,le){switch(ee){case 1:case 2:case 3:case 4:case 5:break;default:ee=3}var je=w;w=ee;try{return le()}finally{w=je}},e.unstable_scheduleCallback=function(ee,le,je){var ve=e.unstable_now();switch(typeof je=="object"&&je!==null?(je=je.delay,je=typeof je=="number"&&0<je?ve+je:ve):je=ve,ee){case 1:var Ce=-1;break;case 2:Ce=250;break;case 5:Ce=1073741823;break;case 4:Ce=1e4;break;default:Ce=5e3}return Ce=je+Ce,ee={id:y++,callback:le,priorityLevel:ee,startTime:je,expirationTime:Ce,sortIndex:-1},je>ve?(ee.sortIndex=je,n(x,ee),i(p)===null&&ee===i(x)&&(S?(I(z),z=-1):S=!0,he(R,je-ve))):(ee.sortIndex=Ce,n(p,ee),E||C||(E=!0,Ae(F))),ee},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(ee){var le=w;return function(){var je=w;w=le;try{return ee.apply(this,arguments)}finally{w=je}}}})(kB);bB.exports=kB;var qte=bB.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var Kte=j,Ii=qte;function ze(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var yB=new Set,jh={};function ic(e,n){wd(e,n),wd(e+"Capture",n)}function wd(e,n){for(jh[e]=n,e=0;e<n.length;e++)yB.add(n[e])}var Ms=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zv=Object.prototype.hasOwnProperty,Yte=/^[: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]*$/,wT={},_T={};function Qte(e){return zv.call(_T,e)?!0:zv.call(wT,e)?!1:Yte.test(e)?_T[e]=!0:(wT[e]=!0,!1)}function Zte(e,n,i,s){if(i!==null&&i.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return s?!1:i!==null?!i.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Jte(e,n,i,s){if(n===null||typeof n>"u"||Zte(e,n,i,s))return!0;if(s)return!1;if(i!==null)switch(i.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function qr(e,n,i,s,d,h,f){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=s,this.attributeNamespace=d,this.mustUseProperty=i,this.propertyName=e,this.type=n,this.sanitizeURL=h,this.removeEmptyString=f}var Cr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Cr[e]=new qr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Cr[n]=new qr(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Cr[e]=new qr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Cr[e]=new qr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Cr[e]=new qr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Cr[e]=new qr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Cr[e]=new qr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Cr[e]=new qr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Cr[e]=new qr(e,5,!1,e.toLowerCase(),null,!1,!1)});var G1=/[\-:]([a-z])/g;function q1(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(G1,q1);Cr[n]=new qr(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(G1,q1);Cr[n]=new qr(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(G1,q1);Cr[n]=new qr(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Cr[e]=new qr(e,1,!1,e.toLowerCase(),null,!1,!1)});Cr.xlinkHref=new qr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Cr[e]=new qr(e,1,!1,e.toLowerCase(),null,!0,!0)});function K1(e,n,i,s){var d=Cr.hasOwnProperty(n)?Cr[n]:null;(d!==null?d.type!==0:s||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(Jte(n,i,d,s)&&(i=null),s||d===null?Qte(n)&&(i===null?e.removeAttribute(n):e.setAttribute(n,""+i)):d.mustUseProperty?e[d.propertyName]=i===null?d.type===3?!1:"":i:(n=d.attributeName,s=d.attributeNamespace,i===null?e.removeAttribute(n):(d=d.type,i=d===3||d===4&&i===!0?"":""+i,s?e.setAttributeNS(s,n,i):e.setAttribute(n,i))))}var Ws=Kte.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ap=Symbol.for("react.element"),Qc=Symbol.for("react.portal"),Zc=Symbol.for("react.fragment"),Y1=Symbol.for("react.strict_mode"),Fv=Symbol.for("react.profiler"),xB=Symbol.for("react.provider"),vB=Symbol.for("react.context"),Q1=Symbol.for("react.forward_ref"),$v=Symbol.for("react.suspense"),Vv=Symbol.for("react.suspense_list"),Z1=Symbol.for("react.memo"),pa=Symbol.for("react.lazy"),wB=Symbol.for("react.offscreen"),AT=Symbol.iterator;function Fu(e){return e===null||typeof e!="object"?null:(e=AT&&e[AT]||e["@@iterator"],typeof e=="function"?e:null)}var _n=Object.assign,bx;function ah(e){if(bx===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);bx=n&&n[1]||""}return` 35`+bx+e}var kx=!1;function yx(e,n){if(!e||kx)return"";kx=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(x){var s=x}Reflect.construct(e,[],n)}
vendor: 16,880 bytes, lines 35-38
35else{try{n.call()}catch(x){s=x}e.call(n.prototype)}else{try{throw Error()}catch(x){s=x}e()}}catch(x){if(x&&s&&typeof x.stack=="string"){for(var d=x.stack.split(` 36`),h=s.stack.split(` 37`),f=d.length-1,g=h.length-1;1<=f&&0<=g&&d[f]!==h[g];)g--;for(;1<=f&&0<=g;f--,g--)if(d[f]!==h[g]){if(f!==1||g!==1)do if(f--,g--,0>g||d[f]!==h[g]){var p=` 38`+d[f].replace(" at new "," at ");return e.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",e.displayName)),p}while(1<=f&&0<=g);break}}}finally{kx=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?ah(e):""}function Xte(e){switch(e.tag){case 5:return ah(e.type);case 16:return ah("Lazy");case 13:return ah("Suspense");case 19:return ah("SuspenseList");case 0:case 2:case 15:return e=yx(e.type,!1),e;case 11:return e=yx(e.type.render,!1),e;case 1:return e=yx(e.type,!0),e;default:return""}}function Uv(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Zc:return"Fragment";case Qc:return"Portal";case Fv:return"Profiler";case Y1:return"StrictMode";case $v:return"Suspense";case Vv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vB:return(e.displayName||"Context")+".Consumer";case xB:return(e._context.displayName||"Context")+".Provider";case Q1:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z1:return n=e.displayName||null,n!==null?n:Uv(e.type)||"Memo";case pa:n=e._payload,e=e._init;try{return Uv(e(n))}catch{}}return null}function ene(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Uv(n);case 8:return n===Y1?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Ba(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _B(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function tne(e){var n=_B(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),s=""+e[n];if(!e.hasOwnProperty(n)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var d=i.get,h=i.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return d.call(this)},set:function(f){s=""+f,h.call(this,f)}}),Object.defineProperty(e,n,{enumerable:i.enumerable}),{getValue:function(){return s},setValue:function(f){s=""+f},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function lp(e){e._valueTracker||(e._valueTracker=tne(e))}function AB(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),s="";return e&&(s=_B(e)?e.checked?"true":"false":e.value),e=s,e!==i?(n.setValue(e),!0):!1}function bg(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Wv(e,n){var i=n.checked;return _n({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function CT(e,n){var i=n.defaultValue==null?"":n.defaultValue,s=n.checked!=null?n.checked:n.defaultChecked;i=Ba(n.value!=null?n.value:i),e._wrapperState={initialChecked:s,initialValue:i,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function CB(e,n){n=n.checked,n!=null&&K1(e,"checked",n,!1)}function Hv(e,n){CB(e,n);var i=Ba(n.value),s=n.type;if(i!=null)s==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Gv(e,n.type,i):n.hasOwnProperty("defaultValue")&&Gv(e,n.type,Ba(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function jT(e,n,i){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var s=n.type;if(!(s!=="submit"&&s!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,i||n===e.value||(e.value=n),e.defaultValue=n}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function Gv(e,n,i){(n!=="number"||bg(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var lh=Array.isArray;function hd(e,n,i,s){if(e=e.options,n){n={};for(var d=0;d<i.length;d++)n["$"+i[d]]=!0;for(i=0;i<e.length;i++)d=n.hasOwnProperty("$"+e[i].value),e[i].selected!==d&&(e[i].selected=d),d&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Ba(i),n=null,d=0;d<e.length;d++){if(e[d].value===i){e[d].selected=!0,s&&(e[d].defaultSelected=!0);return}n!==null||e[d].disabled||(n=e[d])}n!==null&&(n.selected=!0)}}function qv(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(ze(91));return _n({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function NT(e,n){var i=n.value;if(i==null){if(i=n.children,n=n.defaultValue,i!=null){if(n!=null)throw Error(ze(92));if(lh(i)){if(1<i.length)throw Error(ze(93));i=i[0]}n=i}n==null&&(n=""),i=n}e._wrapperState={initialValue:Ba(i)}}function jB(e,n){var i=Ba(n.value),s=Ba(n.defaultValue);i!=null&&(i=""+i,i!==e.value&&(e.value=i),n.defaultValue==null&&e.defaultValue!==i&&(e.defaultValue=i)),s!=null&&(e.defaultValue=""+s)}function ET(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function NB(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Kv(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?NB(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var cp,EB=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,i,s,d){MSApp.execUnsafeLocalFunction(function(){return e(n,i,s,d)})}:e}(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(cp=cp||document.createElement("div"),cp.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=cp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Nh(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var ph={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},nne=["Webkit","ms","Moz","O"];Object.keys(ph).forEach(function(e){nne.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),ph[n]=ph[e]})});function SB(e,n,i){return n==null||typeof n=="boolean"||n===""?"":i||typeof n!="number"||n===0||ph.hasOwnProperty(e)&&ph[e]?(""+n).trim():n+"px"}function DB(e,n){e=e.style;for(var i in n)if(n.hasOwnProperty(i)){var s=i.indexOf("--")===0,d=SB(i,n[i],s);i==="float"&&(i="cssFloat"),s?e.setProperty(i,d):e[i]=d}}var rne=_n({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Yv(e,n){if(n){if(rne[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(ze(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(ze(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(ze(61))}if(n.style!=null&&typeof n.style!="object")throw Error(ze(62))}}function Qv(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){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 Zv=null;function J1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jv=null,md=null,fd=null;function ST(e){if(e=um(e)){if(typeof Jv!="function")throw Error(ze(280));var n=e.stateNode;n&&(n=O0(n),Jv(e.stateNode,e.type,n))}}function TB(e){md?fd?fd.push(e):fd=[e]:md=e}function IB(){if(md){var e=md,n=fd;if(fd=md=null,ST(e),n)for(e=0;e<n.length;e++)ST(n[e])}}function MB(e,n){return e(n)}function PB(){}var xx=!1;function OB(e,n,i){if(xx)return e(n,i);xx=!0;try{return MB(e,n,i)}finally{xx=!1,(md!==null||fd!==null)&&(PB(),IB())}}function Eh(e,n){var i=e.stateNode;if(i===null)return null;var s=O0(i);if(s===null)return null;i=s[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(ze(231,n,typeof i));return i}var Xv=!1;if(Ms)try{var $u={};Object.defineProperty($u,"passive",{get:function(){Xv=!0}}),window.addEventListener("test",$u,$u),window.removeEventListener("test",$u,$u)}catch{Xv=!1}function ine(e,n,i,s,d,h,f,g,p){var x=Array.prototype.slice.call(arguments,3);try{n.apply(i,x)}catch(y){this.onError(y)}}var gh=!1,kg=null,yg=!1,ew=null,one={onError:function(e){gh=!0,kg=e}};function sne(e,n,i,s,d,h,f,g,p){gh=!1,kg=null,ine.apply(one,arguments)}function ane(e,n,i,s,d,h,f,g,p){if(sne.apply(this,arguments),gh){if(gh){var x=kg;gh=!1,kg=null}else throw Error(ze(198));yg||(yg=!0,ew=x)}}function oc(e){var n=e,i=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,n.flags&4098&&(i=n.return),e=n.return;while(e)}return n.tag===3?i:null}function BB(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function DT(e){if(oc(e)!==e)throw Error(ze(188))}function lne(e){var n=e.alternate;if(!n){if(n=oc(e),n===null)throw Error(ze(188));return n!==e?null:e}for(var i=e,s=n;;){var d=i.return;if(d===null)break;var h=d.alternate;if(h===null){if(s=d.return,s!==null){i=s;continue}break}if(d.child===h.child){for(h=d.child;h;){if(h===i)return DT(d),e;if(h===s)return DT(d),n;h=h.sibling}throw Error(ze(188))}if(i.return!==s.return)i=d,s=h;else{for(var f=!1,g=d.child;g;){if(g===i){f=!0,i=d,s=h;break}if(g===s){f=!0,s=d,i=h;break}g=g.sibling}if(!f){for(g=h.child;g;){if(g===i){f=!0,i=h,s=d;break}if(g===s){f=!0,s=h,i=d;break}g=g.sibling}if(!f)throw Error(ze(189))}}if(i.alternate!==s)throw Error(ze(190))}if(i.tag!==3)throw Error(ze(188));return i.stateNode.current===i?e:n}function LB(e){return e=lne(e),e!==null?RB(e):null}function RB(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=RB(e);if(n!==null)return n;e=e.sibling}return null}var zB=Ii.unstable_scheduleCallback,TT=Ii.unstable_cancelCallback,cne=Ii.unstable_shouldYield,dne=Ii.unstable_requestPaint,On=Ii.unstable_now,une=Ii.unstable_getCurrentPriorityLevel,X1=Ii.unstable_ImmediatePriority,FB=Ii.unstable_UserBlockingPriority,xg=Ii.unstable_NormalPriority,hne=Ii.unstable_LowPriority,$B=Ii.unstable_IdlePriority,T0=null,Jo=null;function mne(e){if(Jo&&typeof Jo.onCommitFiberRoot=="function")try{Jo.onCommitFiberRoot(T0,e,void 0,(e.current.flags&128)===128)}catch{}}var _o=Math.clz32?Math.clz32:gne,fne=Math.log,pne=Math.LN2;function gne(e){return e>>>=0,e===0?32:31-(fne(e)/pne|0)|0}var dp=64,up=4194304;function ch(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vg(e,n){var i=e.pendingLanes;if(i===0)return 0;var s=0,d=e.suspendedLanes,h=e.pingedLanes,f=i&268435455;if(f!==0){var g=f&~d;g!==0?s=ch(g):(h&=f,h!==0&&(s=ch(h)))}else f=i&~d,f!==0?s=ch(f):h!==0&&(s=ch(h));if(s===0)return 0;if(n!==0&&n!==s&&!(n&d)&&(d=s&-s,h=n&-n,d>=h||d===16&&(h&4194240)!==0))return n;if(s&4&&(s|=i&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=s;0<n;)i=31-_o(n),d=1<<i,s|=e[i],n&=~d;return s}function bne(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function kne(e,n){for(var i=e.suspendedLanes,s=e.pingedLanes,d=e.expirationTimes,h=e.pendingLanes;0<h;){var f=31-_o(h),g=1<<f,p=d[f];p===-1?(!(g&i)||g&s)&&(d[f]=bne(g,n)):p<=n&&(e.expiredLanes|=g),h&=~g}}function tw(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function VB(){var e=dp;return dp<<=1,!(dp&4194240)&&(dp=64),e}function vx(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function cm(e,n,i){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-_o(n),e[n]=i}function yne(e,n){var i=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0<i;){var d=31-_o(i),h=1<<d;n[d]=0,s[d]=-1,e[d]=-1,i&=~h}}function e_(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var s=31-_o(i),d=1<<s;d&n|e[s]&n&&(e[s]|=n),i&=~d}}var Yt=0;function UB(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var WB,t_,HB,GB,qB,nw=!1,hp=[],ja=null,Na=null,Ea=null,Sh=new Map,Dh=new Map,ya=[],xne="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function IT(e,n){switch(e){case"focusin":case"focusout":ja=null;break;case"dragenter":case"dragleave":Na=null;break;case"mouseover":case"mouseout":Ea=null;break;case"pointerover":case"pointerout":Sh.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dh.delete(n.pointerId)}}function Vu(e,n,i,s,d,h){return e===null||e.nativeEvent!==h?(e={blockedOn:n,domEventName:i,eventSystemFlags:s,nativeEvent:h,targetContainers:[d]},n!==null&&(n=um(n),n!==null&&t_(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),e)}function vne(e,n,i,s,d){switch(n){case"focusin":return ja=Vu(ja,e,n,i,s,d),!0;case"dragenter":return Na=Vu(Na,e,n,i,s,d),!0;case"mouseover":return Ea=Vu(Ea,e,n,i,s,d),!0;case"pointerover":var h=d.pointerId;return Sh.set(h,Vu(Sh.get(h)||null,e,n,i,s,d)),!0;case"gotpointercapture":return h=d.pointerId,Dh.set(h,Vu(Dh.get(h)||null,e,n,i,s,d)),!0}return!1}function KB(e){var n=El(e.target);if(n!==null){var i=oc(n);if(i!==null){if(n=i.tag,n===13){if(n=BB(i),n!==null){e.blockedOn=n,qB(e.priority,function(){HB(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yp(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=rw(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Zv=s,i.target.dispatchEvent(s),Zv=null}else return n=um(i),n!==null&&t_(n),e.blockedOn=i,!1;n.shift()}return!0}function MT(e,n,i){Yp(e)&&i.delete(n)}function wne(){nw=!1,ja!==null&&Yp(ja)&&(ja=null),Na!==null&&Yp(Na)&&(Na=null),Ea!==null&&Yp(Ea)&&(Ea=null),Sh.forEac
vendor: 11,902 bytes, line 38
38h(MT),Dh.forEach(MT)}function Uu(e,n){e.blockedOn===n&&(e.blockedOn=null,nw||(nw=!0,Ii.unstable_scheduleCallback(Ii.unstable_NormalPriority,wne)))}function Th(e){function n(d){return Uu(d,e)}if(0<hp.length){Uu(hp[0],e);for(var i=1;i<hp.length;i++){var s=hp[i];s.blockedOn===e&&(s.blockedOn=null)}}for(ja!==null&&Uu(ja,e),Na!==null&&Uu(Na,e),Ea!==null&&Uu(Ea,e),Sh.forEach(n),Dh.forEach(n),i=0;i<ya.length;i++)s=ya[i],s.blockedOn===e&&(s.blockedOn=null);for(;0<ya.length&&(i=ya[0],i.blockedOn===null);)KB(i),i.blockedOn===null&&ya.shift()}var pd=Ws.ReactCurrentBatchConfig,wg=!0;function _ne(e,n,i,s){var d=Yt,h=pd.transition;pd.transition=null;try{Yt=1,n_(e,n,i,s)}finally{Yt=d,pd.transition=h}}function Ane(e,n,i,s){var d=Yt,h=pd.transition;pd.transition=null;try{Yt=4,n_(e,n,i,s)}finally{Yt=d,pd.transition=h}}function n_(e,n,i,s){if(wg){var d=rw(e,n,i,s);if(d===null)Tx(e,n,s,_g,i),IT(e,s);else if(vne(d,e,n,i,s))s.stopPropagation();else if(IT(e,s),n&4&&-1<xne.indexOf(e)){for(;d!==null;){var h=um(d);if(h!==null&&WB(h),h=rw(e,n,i,s),h===null&&Tx(e,n,s,_g,i),h===d)break;d=h}d!==null&&s.stopPropagation()}else Tx(e,n,s,null,i)}}var _g=null;function rw(e,n,i,s){if(_g=null,e=J1(s),e=El(e),e!==null)if(n=oc(e),n===null)e=null;else if(i=n.tag,i===13){if(e=BB(n),e!==null)return e;e=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return _g=e,null}function YB(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(une()){case X1:return 1;case FB:return 4;case xg:case hne:return 16;case $B:return 536870912;default:return 16}default:return 16}}var wa=null,r_=null,Qp=null;function QB(){if(Qp)return Qp;var e,n=r_,i=n.length,s,d="value"in wa?wa.value:wa.textContent,h=d.length;for(e=0;e<i&&n[e]===d[e];e++);var f=i-e;for(s=1;s<=f&&n[i-s]===d[h-s];s++);return Qp=d.slice(e,1<s?1-s:void 0)}function Zp(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function mp(){return!0}function PT(){return!1}function Oi(e){function n(i,s,d,h,f){this._reactName=i,this._targetInst=d,this.type=s,this.nativeEvent=h,this.target=f,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(i=e[g],this[g]=i?i(h):h[g]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?mp:PT,this.isPropagationStopped=PT,this}return _n(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=mp)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=mp)},persist:function(){},isPersistent:mp}),n}var zd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},i_=Oi(zd),dm=_n({},zd,{view:0,detail:0}),Cne=Oi(dm),wx,_x,Wu,I0=_n({},dm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:o_,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Wu&&(Wu&&e.type==="mousemove"?(wx=e.screenX-Wu.screenX,_x=e.screenY-Wu.screenY):_x=wx=0,Wu=e),wx)},movementY:function(e){return"movementY"in e?e.movementY:_x}}),OT=Oi(I0),jne=_n({},I0,{dataTransfer:0}),Nne=Oi(jne),Ene=_n({},dm,{relatedTarget:0}),Ax=Oi(Ene),Sne=_n({},zd,{animationName:0,elapsedTime:0,pseudoElement:0}),Dne=Oi(Sne),Tne=_n({},zd,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ine=Oi(Tne),Mne=_n({},zd,{data:0}),BT=Oi(Mne),Pne={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},One={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"},Bne={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lne(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Bne[e])?!!n[e]:!1}function o_(){return Lne}var Rne=_n({},dm,{key:function(e){if(e.key){var n=Pne[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Zp(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?One[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:o_,charCode:function(e){return e.type==="keypress"?Zp(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Zp(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),zne=Oi(Rne),Fne=_n({},I0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),LT=Oi(Fne),$ne=_n({},dm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:o_}),Vne=Oi($ne),Une=_n({},zd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wne=Oi(Une),Hne=_n({},I0,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Gne=Oi(Hne),qne=[9,13,27,32],s_=Ms&&"CompositionEvent"in window,bh=null;Ms&&"documentMode"in document&&(bh=document.documentMode);var Kne=Ms&&"TextEvent"in window&&!bh,ZB=Ms&&(!s_||bh&&8<bh&&11>=bh),RT=" ",zT=!1;function JB(e,n){switch(e){case"keyup":return qne.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function XB(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jc=!1;function Yne(e,n){switch(e){case"compositionend":return XB(n);case"keypress":return n.which!==32?null:(zT=!0,RT);case"textInput":return e=n.data,e===RT&&zT?null:e;default:return null}}function Qne(e,n){if(Jc)return e==="compositionend"||!s_&&JB(e,n)?(e=QB(),Qp=r_=wa=null,Jc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return ZB&&n.locale!=="ko"?null:n.data;default:return null}}var Zne={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 FT(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Zne[e.type]:n==="textarea"}function e8(e,n,i,s){TB(s),n=Ag(n,"onChange"),0<n.length&&(i=new i_("onChange","change",null,i,s),e.push({event:i,listeners:n}))}var kh=null,Ih=null;function Jne(e){u8(e,0)}function M0(e){var n=td(e);if(AB(n))return e}function Xne(e,n){if(e==="change")return n}var t8=!1;if(Ms){var Cx;if(Ms){var jx="oninput"in document;if(!jx){var $T=document.createElement("div");$T.setAttribute("oninput","return;"),jx=typeof $T.oninput=="function"}Cx=jx}else Cx=!1;t8=Cx&&(!document.documentMode||9<document.documentMode)}function VT(){kh&&(kh.detachEvent("onpropertychange",n8),Ih=kh=null)}function n8(e){if(e.propertyName==="value"&&M0(Ih)){var n=[];e8(n,Ih,e,J1(e)),OB(Jne,n)}}function ere(e,n,i){e==="focusin"?(VT(),kh=n,Ih=i,kh.attachEvent("onpropertychange",n8)):e==="focusout"&&VT()}function tre(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return M0(Ih)}function nre(e,n){if(e==="click")return M0(n)}function rre(e,n){if(e==="input"||e==="change")return M0(n)}function ire(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var jo=typeof Object.is=="function"?Object.is:ire;function Mh(e,n){if(jo(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),s=Object.keys(n);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var d=i[s];if(!zv.call(n,d)||!jo(e[d],n[d]))return!1}return!0}function UT(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function WT(e,n){var i=UT(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=n&&s>=n)return{node:i,offset:n-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=UT(i)}}function r8(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?r8(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function i8(){for(var e=window,n=bg();n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=bg(e.document)}return n}function a_(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function ore(e){var n=i8(),i=e.focusedElem,s=e.selectionRange;if(n!==i&&i&&i.ownerDocument&&r8(i.ownerDocument.documentElement,i)){if(s!==null&&a_(i)){if(n=s.start,e=s.end,e===void 0&&(e=n),"selectionStart"in i)i.selectionStart=n,i.selectionEnd=Math.min(e,i.value.length);else if(e=(n=i.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var d=i.textContent.length,h=Math.min(s.start,d);s=s.end===void 0?h:Math.min(s.end,d),!e.extend&&h>s&&(d=s,s=h,h=d),d=WT(i,h);var f=WT(i,s);d&&f&&(e.rangeCount!==1||e.anchorNode!==d.node||e.anchorOffset!==d.offset||e.focusNode!==f.node||e.focusOffset!==f.offset)&&(n=n.createRange(),n.setStart(d.node,d.offset),e.removeAllRanges(),h>s?(e.addRange(n),e.extend(f.node,f.offset)):(n.setEnd(f.node,f.offset),e.addRange(n)))}}for(n=[],e=i;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<n.length;i++)e=n[i],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var sre=Ms&&"documentMode"in document&&11>=document.documentMode,Xc=null,iw=null,yh=null,ow=!1;function HT(e,n,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;ow||Xc==null||Xc!==bg(s)||(s=Xc,"selectionStart"in s&&a_(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focu
vendor: 4,510 bytes, line 38
38sNode:s.focusNode,focusOffset:s.focusOffset}),yh&&Mh(yh,s)||(yh=s,s=Ag(iw,"onSelect"),0<s.length&&(n=new i_("onSelect","select",null,n,i),e.push({event:n,listeners:s}),n.target=Xc)))}function fp(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var ed={animationend:fp("Animation","AnimationEnd"),animationiteration:fp("Animation","AnimationIteration"),animationstart:fp("Animation","AnimationStart"),transitionend:fp("Transition","TransitionEnd")},Nx={},o8={};Ms&&(o8=document.createElement("div").style,"AnimationEvent"in window||(delete ed.animationend.animation,delete ed.animationiteration.animation,delete ed.animationstart.animation),"TransitionEvent"in window||delete ed.transitionend.transition);function P0(e){if(Nx[e])return Nx[e];if(!ed[e])return e;var n=ed[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in o8)return Nx[e]=n[i];return e}var s8=P0("animationend"),a8=P0("animationiteration"),l8=P0("animationstart"),c8=P0("transitionend"),d8=new Map,GT="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Fa(e,n){d8.set(e,n),ic(n,[e])}for(var Ex=0;Ex<GT.length;Ex++){var Sx=GT[Ex],are=Sx.toLowerCase(),lre=Sx[0].toUpperCase()+Sx.slice(1);Fa(are,"on"+lre)}Fa(s8,"onAnimationEnd");Fa(a8,"onAnimationIteration");Fa(l8,"onAnimationStart");Fa("dblclick","onDoubleClick");Fa("focusin","onFocus");Fa("focusout","onBlur");Fa(c8,"onTransitionEnd");wd("onMouseEnter",["mouseout","mouseover"]);wd("onMouseLeave",["mouseout","mouseover"]);wd("onPointerEnter",["pointerout","pointerover"]);wd("onPointerLeave",["pointerout","pointerover"]);ic("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ic("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ic("onBeforeInput",["compositionend","keypress","textInput","paste"]);ic("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ic("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ic("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var dh="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(" "),cre=new Set("cancel close invalid load scroll toggle".split(" ").concat(dh));function qT(e,n,i){var s=e.type||"unknown-event";e.currentTarget=i,ane(s,n,void 0,e),e.currentTarget=null}function u8(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],d=s.event;s=s.listeners;e:{var h=void 0;if(n)for(var f=s.length-1;0<=f;f--){var g=s[f],p=g.instance,x=g.currentTarget;if(g=g.listener,p!==h&&d.isPropagationStopped())break e;qT(d,g,x),h=p}else for(f=0;f<s.length;f++){if(g=s[f],p=g.instance,x=g.currentTarget,g=g.listener,p!==h&&d.isPropagationStopped())break e;qT(d,g,x),h=p}}}if(yg)throw e=ew,yg=!1,ew=null,e}function hn(e,n){var i=n[dw];i===void 0&&(i=n[dw]=new Set);var s=e+"__bubble";i.has(s)||(h8(n,e,2,!1),i.add(s))}function Dx(e,n,i){var s=0;n&&(s|=4),h8(i,e,s,n)}var pp="_reactListening"+Math.random().toString(36).slice(2);function Ph(e){if(!e[pp]){e[pp]=!0,yB.forEach(function(i){i!=="selectionchange"&&(cre.has(i)||Dx(i,!1,e),Dx(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[pp]||(n[pp]=!0,Dx("selectionchange",!1,n))}}function h8(e,n,i,s){switch(YB(n)){case 1:var d=_ne;break;case 4:d=Ane;break;default:d=n_}i=d.bind(null,n,i,e),d=void 0,!Xv||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),s?d!==void 0?e.addEventListener(n,i,{capture:!0,passive:d}):e.addEventListener(n,i,!0):d!==void 0?e.addEventListener(n,i,{passive:d}):e.addEventListener(n,i,!1)}function Tx(e,n,i,s,d){var h=s;if(!(n&1)&&!(n&2)&&s!==null)e:for(;;){if(s===null)return;var f=s.tag;if(f===3||f===4){var g=s.stateNode.containerInfo;
vendor: 4,549 bytes, line 38
38if(g===d||g.nodeType===8&&g.parentNode===d)break;if(f===4)for(f=s.return;f!==null;){var p=f.tag;if((p===3||p===4)&&(p=f.stateNode.containerInfo,p===d||p.nodeType===8&&p.parentNode===d))return;f=f.return}for(;g!==null;){if(f=El(g),f===null)return;if(p=f.tag,p===5||p===6){s=h=f;continue e}g=g.parentNode}}s=s.return}OB(function(){var x=h,y=J1(i),v=[];e:{var w=d8.get(e);if(w!==void 0){var C=i_,E=e;switch(e){case"keypress":if(Zp(i)===0)break e;case"keydown":case"keyup":C=zne;break;case"focusin":E="focus",C=Ax;break;case"focusout":E="blur",C=Ax;break;case"beforeblur":case"afterblur":C=Ax;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":C=OT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":C=Nne;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":C=Vne;break;case s8:case a8:case l8:C=Dne;break;case c8:C=Wne;break;case"scroll":C=Cne;break;case"wheel":C=Gne;break;case"copy":case"cut":case"paste":C=Ine;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":C=LT}var S=(n&4)!==0,D=!S&&e==="scroll",I=S?w!==null?w+"Capture":null:w;S=[];for(var M=x,B;M!==null;){B=M;var R=B.stateNode;if(B.tag===5&&R!==null&&(B=R,I!==null&&(R=Eh(M,I),R!=null&&S.push(Oh(M,R,B)))),D)break;M=M.return}0<S.length&&(w=new C(w,E,null,i,y),v.push({event:w,listeners:S}))}}if(!(n&7)){e:{if(w=e==="mouseover"||e==="pointerover",C=e==="mouseout"||e==="pointerout",w&&i!==Zv&&(E=i.relatedTarget||i.fromElement)&&(El(E)||E[Ps]))break e;if((C||w)&&(w=y.window===y?y:(w=y.ownerDocument)?w.defaultView||w.parentWindow:window,C?(E=i.relatedTarget||i.toElement,C=x,E=E?El(E):null,E!==null&&(D=oc(E),E!==D||E.tag!==5&&E.tag!==6)&&(E=null)):(C=null,E=x),C!==E)){if(S=OT,R="onMouseLeave",I="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(S=LT,R="onPointerLeave",I="onPointerEnter",M="pointer"),D=C==null?w:td(C),B=E==null?w:td(E),w=new S(R,M+"leave",C,i,y),w.target=D,w.relatedTarget=B,R=null,El(y)===x&&(S=new S(I,M+"enter",E,i,y),S.target=B,S.relatedTarget=D,R=S),D=R,C&&E)t:{for(S=C,I=E,M=0,B=S;B;B=$c(B))M++;for(B=0,R=I;R;R=$c(R))B++;for(;0<M-B;)S=$c(S),M--;for(;0<B-M;)I=$c(I),B--;for(;M--;){if(S===I||I!==null&&S===I.alternate)break t;S=$c(S),I=$c(I)}S=null}else S=null;C!==null&&KT(v,w,C,S,!1),E!==null&&D!==null&&KT(v,D,E,S,!0)}}e:{if(w=x?td(x):window,C=w.nodeName&&w.nodeName.toLowerCase(),C==="select"||C==="input"&&w.type==="file")var F=Xne;else if(FT(w))if(t8)F=rre;else{F=tre;var V=ere}else(C=w.nodeName)&&C.toLowerCase()==="input"&&(w.type==="checkbox"||w.type==="radio")&&(F=nre);if(F&&(F=F(e,x))){e8(v,F,i,y);break e}V&&V(e,w,x),e==="focusout"&&(V=w._wrapperState)&&V.controlled&&w.type==="number"&&Gv(w,"number",w.value)}switch(V=x?td(x):window,e){case"focusin":(FT(V)||V.contentEditable==="true")&&(Xc=V,iw=x,yh=null);break;case"focusout":yh=iw=Xc=null;break;case"mousedown":ow=!0;break;case"contextmenu":case"mouseup":case"dragend":ow=!1,HT(v,i,y);break;case"selectionchange":if(sre)break;case"keydown":case"keyup":HT(v,i,y)}var P;if(s_)e:{switch(e){case"compositionstart":var z="onCompositionStart";break e;case"compositionend":z="onCompositionEnd";break e;case"compositionupdate":z="onCompositionUpdate";break e}z=void 0}else Jc?JB(e,i)&&(z="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(z="onCompositionStart");z&&(ZB&&i.locale!=="ko"&&(Jc||z!=="onCompositionStart"?z==="onCompositionEnd"&&Jc&&(P=QB()):(wa=y,r_="value"in wa?wa.value:wa.textContent,Jc=!0)),V=Ag(x,z),0<V.length&&(z=new BT(z,e,null,i,y),v.push({event:z,listeners:V}),P?z.data=P:(P=XB(i),P!==null&&(z.data=P)))),(P=Kne?Yne(e,i):Qne(e,i))&&(x=Ag(x,"onBeforeInput"),0<x.length&&(y=new BT("onBeforeInput","beforeinput",null,i,y),v.push({event:y,listeners:x}),y.data=P))}u8(v,n)})}function Oh(e,n,i){return{instance:e,listener:n,currentTarget:i}}function Ag(e,n){for(var i=n+"Capture",s=[];e!==null;){var d=e,h=d.stateNode;d.tag===5&&h!==null&&(d=h,h=Eh(e,i),h!=null&&s.unshift(Oh(e,h,d)),h=Eh(e,n),h!=null&&s.push(Oh(e,h,d))),e=e.return}return s}function $c(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function KT(e,n,i,s,d){for(var h=n._reactName,f=[];i!==null&&i!==s;){var g=i,p=g.alternate,x=g.stateNode;if(p!==null&&p===s)break;g.tag===5&&x!==null&&(g=x,d?(p=Eh(i,h),p!=null&&f.unshift(Oh(i,p,g))):d||(p=Eh(i,h),p!=null&&f.pu
vendor: 4,964 bytes, lines 38-39
38sh(Oh(i,p,g)))),i=i.return}f.length!==0&&e.push({event:n,listeners:f})}var dre=/\r\n?/g,ure=/\u0000|\uFFFD/g;function YT(e){return(typeof e=="string"?e:""+e).replace(dre,` 39`).replace(ure,"")}function gp(e,n,i){if(n=YT(n),YT(e)!==n&&i)throw Error(ze(425))}function Cg(){}var sw=null,aw=null;function lw(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var cw=typeof setTimeout=="function"?setTimeout:void 0,hre=typeof clearTimeout=="function"?clearTimeout:void 0,QT=typeof Promise=="function"?Promise:void 0,mre=typeof queueMicrotask=="function"?queueMicrotask:typeof QT<"u"?function(e){return QT.resolve(null).then(e).catch(fre)}:cw;function fre(e){setTimeout(function(){throw e})}function Ix(e,n){var i=n,s=0;do{var d=i.nextSibling;if(e.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"){if(s===0){e.removeChild(d),Th(n);return}s--}else i!=="$"&&i!=="$?"&&i!=="$!"||s++;i=d}while(i);Th(n)}function Sa(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function ZT(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"){if(n===0)return e;n--}else i==="/$"&&n++}e=e.previousSibling}return null}var Fd=Math.random().toString(36).slice(2),Qo="__reactFiber$"+Fd,Bh="__reactProps$"+Fd,Ps="__reactContainer$"+Fd,dw="__reactEvents$"+Fd,pre="__reactListeners$"+Fd,gre="__reactHandles$"+Fd;function El(e){var n=e[Qo];if(n)return n;for(var i=e.parentNode;i;){if(n=i[Ps]||i[Qo]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=ZT(e);e!==null;){if(i=e[Qo])return i;e=ZT(e)}return n}e=i,i=e.parentNode}return null}function um(e){return e=e[Qo]||e[Ps],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function td(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ze(33))}function O0(e){return e[Bh]||null}var uw=[],nd=-1;function $a(e){return{current:e}}function fn(e){0>nd||(e.current=uw[nd],uw[nd]=null,nd--)}function cn(e,n){nd++,uw[nd]=e.current,e.current=n}var La={},Or=$a(La),si=$a(!1),Ul=La;function _d(e,n){var i=e.type.contextTypes;if(!i)return La;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===n)return s.__reactInternalMemoizedMaskedChildContext;var d={},h;for(h in i)d[h]=n[h];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=d),d}function ai(e){return e=e.childContextTypes,e!=null}function jg(){fn(si),fn(Or)}function JT(e,n,i){if(Or.current!==La)throw Error(ze(168));cn(Or,n),cn(si,i)}function m8(e,n,i){var s=e.stateNode;if(n=n.childContextTypes,typeof s.getChildContext!="function")return i;s=s.getChildContext();for(var d in s)if(!(d in n))throw Error(ze(108,ene(e)||"Unknown",d));return _n({},i,s)}function Ng(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||La,Ul=Or.current,cn(Or,e),cn(si,si.current),!0}function XT(e,n,i){var s=e.stateNode;if(!s)throw Error(ze(169));i?(e=m8(e,n,Ul),s.__reactInternalMemoizedMergedChildContext=e,fn(si),fn(Or),cn(Or,e)):fn(si),cn(si,i)}var vs=null,B0=!1,Mx=!1;function f8(e){vs===null?vs=[e]:vs.push(e)}function bre(e){B0=!0,f8(e)}function Va(){if(!Mx&&vs!==null){Mx=!0;var e=0,n=Yt;try{var i=vs;for(Yt=1;e<i.length;e++){var s=i[e];do s=s(!0);while(s!==null)}vs=null,B0=!1}catch(d){throw vs!==null&&(vs=vs.slice(e+1)),zB(X1,Va),d}finally{Yt=n,Mx=!1}}return null}var rd=[],id=0,Eg=null,Sg=0,Gi=[],qi=0,Wl=null,Cs=1,js="";function xl(e,n){rd[id++]=Sg,rd[id++]=Eg,Eg=e,Sg=n}function p8(e,n,i){Gi[qi++]=Cs,Gi[qi++]=js,Gi[qi++]=Wl,Wl=e;var s=Cs;e=js;var d=32-_o(s)-1;s&=~(1<<d),i+=1;var h=32-_o(n)+d;if(30<h){var f=d-d%5;h=(s&(1<<f)-1).toString(32),s>>=f,d-=f,Cs=1<<32-_o(n)+d|i<<d|s,js=h+e}else Cs=1<<h|i<<d|s,js=e}function l_(e){e.return!==null&&(xl(e,1),p8(e,1,0))}function c_(e){for(;e===Eg;)Eg=rd[--id],rd[id]=null,Sg=rd[--id],rd[id]=null;for(;e===Wl;)Wl=Gi[--qi],Gi[qi]=null,js=Gi[--qi],Gi[qi]=null,Cs=Gi[--qi],Gi[qi]=null}var Di=null,Ei=null,kn=!1,yo=null;function g8(e,n){var i=Ki(5,null,null,0);i.elementType="DELETED",i.stateNode=n,i.return=e,n=e.deletions,n===null?(e.deletions=[i],e.flags|=16):n.push(i)}function eI(e,n){switch(e.tag){case 5:var i=e.type;return n=n.nodeType!==1||i.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Di=e,Ei=Sa(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Di=e,Ei=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(i=Wl!==null?{id:Cs,overflow:js}:null,e.memoizedState={dehydrated:n,treeContext:i,retryLane:1073741824},i=Ki(18,null,null,0),i.stateNode=n,i.return=e,e.child=i,Di=e,Ei=null,!0):!1;default:return!1}}function hw(e){return(e.mode&1)!==0&&(e.flags&128)===0}function mw(e){if(kn){var n=Ei;if(n){var i=n;
vendor: 26,300 bytes, lines 39-41
39if(!eI(e,n)){if(hw(e))throw Error(ze(418));n=Sa(i.nextSibling);var s=Di;n&&eI(e,n)?g8(s,i):(e.flags=e.flags&-4097|2,kn=!1,Di=e)}}else{if(hw(e))throw Error(ze(418));e.flags=e.flags&-4097|2,kn=!1,Di=e}}}function tI(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Di=e}function bp(e){if(e!==Di)return!1;if(!kn)return tI(e),kn=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!lw(e.type,e.memoizedProps)),n&&(n=Ei)){if(hw(e))throw b8(),Error(ze(418));for(;n;)g8(e,n),n=Sa(n.nextSibling)}if(tI(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ze(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"){if(n===0){Ei=Sa(e.nextSibling);break e}n--}else i!=="$"&&i!=="$!"&&i!=="$?"||n++}e=e.nextSibling}Ei=null}}else Ei=Di?Sa(e.stateNode.nextSibling):null;return!0}function b8(){for(var e=Ei;e;)e=Sa(e.nextSibling)}function Ad(){Ei=Di=null,kn=!1}function d_(e){yo===null?yo=[e]:yo.push(e)}var kre=Ws.ReactCurrentBatchConfig;function Hu(e,n,i){if(e=i.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(i._owner){if(i=i._owner,i){if(i.tag!==1)throw Error(ze(309));var s=i.stateNode}if(!s)throw Error(ze(147,e));var d=s,h=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===h?n.ref:(n=function(f){var g=d.refs;f===null?delete g[h]:g[h]=f},n._stringRef=h,n)}if(typeof e!="string")throw Error(ze(284));if(!i._owner)throw Error(ze(290,e))}return e}function kp(e,n){throw e=Object.prototype.toString.call(n),Error(ze(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function nI(e){var n=e._init;return n(e._payload)}function k8(e){function n(I,M){if(e){var B=I.deletions;B===null?(I.deletions=[M],I.flags|=16):B.push(M)}}function i(I,M){if(!e)return null;for(;M!==null;)n(I,M),M=M.sibling;return null}function s(I,M){for(I=new Map;M!==null;)M.key!==null?I.set(M.key,M):I.set(M.index,M),M=M.sibling;return I}function d(I,M){return I=Ma(I,M),I.index=0,I.sibling=null,I}function h(I,M,B){return I.index=B,e?(B=I.alternate,B!==null?(B=B.index,B<M?(I.flags|=2,M):B):(I.flags|=2,M)):(I.flags|=1048576,M)}function f(I){return e&&I.alternate===null&&(I.flags|=2),I}function g(I,M,B,R){return M===null||M.tag!==6?(M=Fx(B,I.mode,R),M.return=I,M):(M=d(M,B),M.return=I,M)}function p(I,M,B,R){var F=B.type;return F===Zc?y(I,M,B.props.children,R,B.key):M!==null&&(M.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===pa&&nI(F)===M.type)?(R=d(M,B.props),R.ref=Hu(I,M,B),R.return=I,R):(R=ig(B.type,B.key,B.props,null,I.mode,R),R.ref=Hu(I,M,B),R.return=I,R)}function x(I,M,B,R){return M===null||M.tag!==4||M.stateNode.containerInfo!==B.containerInfo||M.stateNode.implementation!==B.implementation?(M=$x(B,I.mode,R),M.return=I,M):(M=d(M,B.children||[]),M.return=I,M)}function y(I,M,B,R,F){return M===null||M.tag!==7?(M=Ll(B,I.mode,R,F),M.return=I,M):(M=d(M,B),M.return=I,M)}function v(I,M,B){if(typeof M=="string"&&M!==""||typeof M=="number")return M=Fx(""+M,I.mode,B),M.return=I,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case ap:return B=ig(M.type,M.key,M.props,null,I.mode,B),B.ref=Hu(I,null,M),B.return=I,B;case Qc:return M=$x(M,I.mode,B),M.return=I,M;case pa:var R=M._init;return v(I,R(M._payload),B)}if(lh(M)||Fu(M))return M=Ll(M,I.mode,B,null),M.return=I,M;kp(I,M)}return null}function w(I,M,B,R){var F=M!==null?M.key:null;if(typeof B=="string"&&B!==""||typeof B=="number")return F!==null?null:g(I,M,""+B,R);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case ap:return B.key===F?p(I,M,B,R):null;case Qc:return B.key===F?x(I,M,B,R):null;case pa:return F=B._init,w(I,M,F(B._payload),R)}if(lh(B)||Fu(B))return F!==null?null:y(I,M,B,R,null);kp(I,B)}return null}function C(I,M,B,R,F){if(typeof R=="string"&&R!==""||typeof R=="number")return I=I.get(B)||null,g(M,I,""+R,F);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case ap:return I=I.get(R.key===null?B:R.key)||null,p(M,I,R,F);case Qc:return I=I.get(R.key===null?B:R.key)||null,x(M,I,R,F);case pa:var V=R._init;return C(I,M,B,V(R._payload),F)}if(lh(R)||Fu(R))return I=I.get(B)||null,y(M,I,R,F,null);kp(M,R)}return null}function E(I,M,B,R){for(var F=null,V=null,P=M,z=M=0,W=null;P!==null&&z<B.length;z++){P.index>z?(W=P,P=null):W=P.sibling;var K=w(I,P,B[z],R);if(K===null){P===null&&(P=W);break}e&&P&&K.alternate===null&&n(I,P),M=h(K,M,z),V===null?F=K:V.sibling=K,V=K,P=W}if(z===B.length)return i(I,P),kn&&xl(I,z),F;if(P===null){for(;z<B.length;z++)P=v(I,B[z],R),P!==null&&(M=h(P,M,z),V===null?F=P:V.sibling=P,V=P);return kn&&xl(I,z),F}for(P=s(I,P);z<B.length;z++)W=C(P,I,z,B[z],R),W!==null&&(e&&W.alternate!==null&&P.delete(W.key===null?z:W.key),M=h(W,M,z),V===null?F=W:V.sibling=W,V=W);return e&&P.forEach(function(G){return n(I,G)}),kn&&xl(I,z),F}function S(I,M,B,R){var F=Fu(B);if(typeof F!="function")throw Error(ze(150));if(B=F.call(B),B==null)throw Error(ze(151));for(var V=F=null,P=M,z=M=0,W=null,K=B.next();P!==null&&!K.done;z++,K=B.next()){P.index>z?(W=P,P=null):W=P.sibling;var G=w(I,P,K.value,R);if(G===null){P===null&&(P=W);break}e&&P&&G.alternate===null&&n(I,P),M=h(G,M,z),V===null?F=G:V.sibling=G,V=G,P=W}if(K.done)return i(I,P),kn&&xl(I,z),F;if(P===null){for(;!K.done;z++,K=B.next())K=v(I,K.value,R),K!==null&&(M=h(K,M,z),V===null?F=K:V.sibling=K,V=K);return kn&&xl(I,z),F}for(P=s(I,P);!K.done;z++,K=B.next())K=C(P,I,z,K.value,R),K!==null&&(e&&K.alternate!==null&&P.delete(K.key===null?z:K.key),M=h(K,M,z),V===null?F=K:V.sibling=K,V=K);return e&&P.forEach(function(Z){return n(I,Z)}),kn&&xl(I,z),F}function D(I,M,B,R){if(typeof B=="object"&&B!==null&&B.type===Zc&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case ap:e:{for(var F=B.key,V=M;V!==null;){if(V.key===F){if(F=B.type,F===Zc){if(V.tag===7){i(I,V.sibling),M=d(V,B.props.children),M.return=I,I=M;break e}}else if(V.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===pa&&nI(F)===V.type){i(I,V.sibling),M=d(V,B.props),M.ref=Hu(I,V,B),M.return=I,I=M;break e}i(I,V);break}else n(I,V);V=V.sibling}B.type===Zc?(M=Ll(B.props.children,I.mode,R,B.key),M.return=I,I=M):(R=ig(B.type,B.key,B.props,null,I.mode,R),R.ref=Hu(I,M,B),R.return=I,I=R)}return f(I);case Qc:e:{for(V=B.key;M!==null;){if(M.key===V)if(M.tag===4&&M.stateNode.containerInfo===B.containerInfo&&M.stateNode.implementation===B.implementation){i(I,M.sibling),M=d(M,B.children||[]),M.return=I,I=M;break e}else{i(I,M);break}else n(I,M);M=M.sibling}M=$x(B,I.mode,R),M.return=I,I=M}return f(I);case pa:return V=B._init,D(I,M,V(B._payload),R)}if(lh(B))return E(I,M,B,R);if(Fu(B))return S(I,M,B,R);kp(I,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,M!==null&&M.tag===6?(i(I,M.sibling),M=d(M,B),M.return=I,I=M):(i(I,M),M=Fx(B,I.mode,R),M.return=I,I=M),f(I)):i(I,M)}return D}var Cd=k8(!0),y8=k8(!1),Dg=$a(null),Tg=null,od=null,u_=null;function h_(){u_=od=Tg=null}function m_(e){var n=Dg.current;fn(Dg),e._currentValue=n}function fw(e,n,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),e===i)break;e=e.return}}function gd(e,n){Tg=e,u_=od=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(ii=!0),e.firstContext=null)}function Ji(e){var n=e._currentValue;if(u_!==e)if(e={context:e,memoizedValue:n,next:null},od===null){if(Tg===null)throw Error(ze(308));od=e,Tg.dependencies={lanes:0,firstContext:e}}else od=od.next=e;return n}var Sl=null;function f_(e){Sl===null?Sl=[e]:Sl.push(e)}function x8(e,n,i,s){var d=n.interleaved;return d===null?(i.next=i,f_(n)):(i.next=d.next,d.next=i),n.interleaved=i,Os(e,s)}function Os(e,n){e.lanes|=n;var i=e.alternate;for(i!==null&&(i.lanes|=n),i=e,e=e.return;e!==null;)e.childLanes|=n,i=e.alternate,i!==null&&(i.childLanes|=n),i=e,e=e.return;return i.tag===3?i.stateNode:null}var ga=!1;function p_(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function v8(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ss(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Da(e,n,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,$t&2){var d=s.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),s.pending=n,Os(e,i)}return d=s.interleaved,d===null?(n.next=n,f_(s)):(n.next=d.next,d.next=n),s.interleaved=n,Os(e,i)}function Jp(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194240)!==0)){var s=n.lanes;s&=e.pendingLanes,i|=s,n.lanes=i,e_(e,i)}}function rI(e,n){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var d=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var f={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};h===null?d=h=f:h=h.next=f,i=i.next}while(i!==null);h===null?d=h=n:h=h.next=n}else d=h=n;i={baseState:s.baseState,firstBaseUpdate:d,lastBaseUpdate:h,shared:s.shared,effects:s.effects},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}function Ig(e,n,i,s){var d=e.updateQueue;ga=!1;var h=d.firstBaseUpdate,f=d.lastBaseUpdate,g=d.shared.pending;if(g!==null){d.shared.pending=null;var p=g,x=p.next;p.next=null,f===null?h=x:f.next=x,f=p;var y=e.alternate;y!==null&&(y=y.updateQueue,g=y.lastBaseUpdate,g!==f&&(g===null?y.firstBaseUpdate=x:g.next=x,y.lastBaseUpdate=p))}if(h!==null){var v=d.baseState;f=0,y=x=p=null,g=h;do{var w=g.lane,C=g.eventTime;if((s&w)===w){y!==null&&(y=y.next={eventTime:C,lane:0,tag:g.tag,payload:g.payload,callback:g.callback,next:null});e:{var E=e,S=g;switch(w=n,C=i,S.tag){case 1:if(E=S.payload,typeof E=="function"){v=E.call(C,v,w);break e}v=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=S.payload,w=typeof E=="function"?E.call(C,v,w):E,w==null)break e;v=_n({},v,w);break e;case 2:ga=!0}}g.callback!==null&&g.lane!==0&&(e.flags|=64,w=d.effects,w===null?d.effects=[g]:w.push(g))}else C={eventTime:C,lane:w,tag:g.tag,payload:g.payload,callback:g.callback,next:null},y===null?(x=y=C,p=v):y=y.next=C,f|=w;if(g=g.next,g===null){if(g=d.shared.pending,g===null)break;w=g,g=w.next,w.next=null,d.lastBaseUpdate=w,d.shared.pending=null}}while(!0);if(y===null&&(p=v),d.baseState=p,d.firstBaseUpdate=x,d.lastBaseUpdate=y,n=d.shared.interleaved,n!==null){d=n;do f|=d.lane,d=d.next;while(d!==n)}else h===null&&(d.shared.lanes=0);Gl|=f,e.lanes=f,e.memoizedState=v}}function iI(e,n,i){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var s=e[n],d=s.callback;if(d!==null){if(s.callback=null,s=i,typeof d!="function")throw Error(ze(191,d));d.call(s)}}}var hm={},Xo=$a(hm),Lh=$a(hm),Rh=$a(hm);function Dl(e){if(e===hm)throw Error(ze(174));return e}function g_(e,n){switch(cn(Rh,n),cn(Lh,e),cn(Xo,hm),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Kv(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Kv(n,e)}fn(Xo),cn(Xo,n)}function jd(){fn(Xo),fn(Lh),fn(Rh)}function w8(e){Dl(Rh.current);var n=Dl(Xo.current),i=Kv(n,e.type);n!==i&&(cn(Lh,e),cn(Xo,i))}function b_(e){Lh.current===e&&(fn(Xo),fn(Lh))}var vn=$a(0);function Mg(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Px=[];function k_(){for(var e=0;e<Px.length;e++)Px[e]._workInProgressVersionPrimary=null;Px.length=0}var Xp=Ws.ReactCurrentDispatcher,Ox=Ws.ReactCurrentBatchConfig,Hl=0,wn=null,Kn=null,cr=null,Pg=!1,xh=!1,zh=0,yre=0;function Er(){throw Error(ze(321))}function y_(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!jo(e[i],n[i]))return!1;return!0}function x_(e,n,i,s,d,h){if(Hl=h,wn=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Xp.current=e===null||e.memoizedState===null?_re:Are,e=i(s,d),xh){h=0;do{if(xh=!1,zh=0,25<=h)throw Error(ze(301));h+=1,cr=Kn=null,n.updateQueue=null,Xp.current=Cre,e=i(s,d)}while(xh)}if(Xp.current=Og,n=Kn!==null&&Kn.next!==null,Hl=0,cr=Kn=wn=null,Pg=!1,n)throw Error(ze(300));return e}function v_(){var e=zh!==0;return zh=0,e}function qo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return cr===null?wn.memoizedState=cr=e:cr=cr.next=e,cr}function Xi(){if(Kn===null){var e=wn.alternate;e=e!==null?e.memoizedState:null}else e=Kn.next;var n=cr===null?wn.memoizedState:cr.next;if(n!==null)cr=n,Kn=e;else{if(e===null)throw Error(ze(310));Kn=e,e={memoizedState:Kn.memoizedState,baseState:Kn.baseState,baseQueue:Kn.baseQueue,queue:Kn.queue,next:null},cr===null?wn.memoizedState=cr=e:cr=cr.next=e}return cr}function Fh(e,n){return typeof n=="function"?n(e):n}function Bx(e){var n=Xi(),i=n.queue;if(i===null)throw Error(ze(311));i.lastRenderedReducer=e;var s=Kn,d=s.baseQueue,h=i.pending;if(h!==null){if(d!==null){var f=d.next;d.next=h.next,h.next=f}s.baseQueue=d=h,i.pending=null}if(d!==null){h=d.next,s=s.baseState;var g=f=null,p=null,x=h;do{var y=x.lane;if((Hl&y)===y)p!==null&&(p=p.next={lane:0,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null}),s=x.hasEagerState?x.eagerState:e(s,x.action);else{var v={lane:y,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null};p===null?(g=p=v,f=s):p=p.next=v,wn.lanes|=y,Gl|=y}x=x.next}while(x!==null&&x!==h);p===null?f=s:p.next=g,jo(s,n.memoizedState)||(ii=!0),n.memoizedState=s,n.baseState=f,n.baseQueue=p,i.lastRenderedState=s}if(e=i.interleaved,e!==null){d=e;do h=d.lane,wn.lanes|=h,Gl|=h,d=d.next;while(d!==e)}else d===null&&(i.lanes=0);return[n.memoizedState,i.dispatch]}function Lx(e){var n=Xi(),i=n.queue;if(i===null)throw Error(ze(311));i.lastRenderedReducer=e;var s=i.dispatch,d=i.pending,h=n.memoizedState;if(d!==null){i.pending=null;var f=d=d.next;do h=e(h,f.action),f=f.next;while(f!==d);jo(h,n.memoizedState)||(ii=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),i.lastRenderedState=h}return[h,s]}function _8(){}function A8(e,n){var i=wn,s=Xi(),d=n(),h=!jo(s.memoizedState,d);if(h&&(s.memoizedState=d,ii=!0),s=s.queue,w_(N8.bind(null,i,s,e),[e]),s.getSnapshot!==n||h||cr!==null&&cr.memoizedState.tag&1){if(i.flags|=2048,$h(9,j8.bind(null,i,s,d,n),void 0,null),dr===null)throw Error(ze(349));Hl&30||C8(i,n,d)}return d}function C8(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=wn.updateQueue,n===null?(n={lastEffect:null,stores:null},wn.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function j8(e,n,i,s){n.value=i,n.getSnapshot=s,E8(n)&&S8(e)}function N8(e,n,i){return i(function(){E8(n)&&S8(e)})}function E8(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!jo(e,i)}catch{return!0}}function S8(e){var n=Os(e,1);n!==null&&Ao(n,e,1,-1)}function oI(e){var n=qo();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fh,lastRenderedState:e},n.queue=e,e=e.dispatch=wre.bind(null,wn,e),[n.memoizedState,e]}function $h(e,n,i,s){return e={tag:e,create:n,destroy:i,deps:s,next:null},n=wn.updateQueue,n===null?(n={lastEffect:null,stores:null},wn.updateQueue=n,n.lastEffect=e.next=e):(i=n.lastEffect,i===null?n.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,n.lastEffect=e)),e}function D8(){return Xi().memoizedState}function eg(e,n,i,s){var d=qo();wn.flags|=e,d.memoizedState=$h(1|n,i,void 0,s===void 0?null:s)}function L0(e,n,i,s){var d=Xi();s=s===void 0?null:s;var h=void 0;if(Kn!==null){var f=Kn.memoizedState;if(h=f.destroy,s!==null&&y_(s,f.deps)){d.memoizedState=$h(n,i,h,s);return}}wn.flags|=e,d.memoizedState=$h(1|n,i,h,s)}function sI(e,n){return eg(8390656,8,e,n)}function w_(e,n){return L0(2048,8,e,n)}function T8(e,n){return L0(4,2,e,n)}function I8(e,n){return L0(4,4,e,n)}function M8(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function P8(e,n,i){return i=i!=null?i.concat([e]):null,L0(4,4,M8.bind(null,n,e),i)}function __(){}function O8(e,n){var i=Xi();n=n===void 0?null:n;var s=i.memoizedState;return s!==null&&n!==null&&y_(n,s[1])?s[0]:(i.memoizedState=[e,n],e)}function B8(e,n){var i=Xi();n=n===void 0?null:n;var s=i.memoizedState;return s!==null&&n!==null&&y_(n,s[1])?s[0]:(e=e(),i.memoizedState=[e,n],e)}function L8(e,n,i){return Hl&21?(jo(i,n)||(i=VB(),wn.lanes|=i,Gl|=i,e.baseState=!0),n):(e.baseState&&(e.baseState=!1,ii=!0),e.memoizedState=i)}function xre(e,n){var i=Yt;Yt=i!==0&&4>i?i:4,e(!0);var s=Ox.transition;Ox.transition={};try{e(!1),n()}finally{Yt=i,Ox.transition=s}}function R8(){return Xi().memoizedState}function vre(e,n,i){var s=Ia(e);if(i={lane:s,action:i,hasEagerState:!1,eagerState:null,next:null},z8(e))F8(n,i);else if(i=x8(e,n,i,s),i!==null){var d=Wr();Ao(i,e,s,d),$8(i,n,s)}}function wre(e,n,i){var s=Ia(e),d={lane:s,action:i,hasEagerState:!1,eagerState:null,next:null};if(z8(e))F8(n,d);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var f=n.lastRenderedState,g=h(f,i);if(d.hasEagerState=!0,d.eagerState=g,jo(g,f)){var p=n.interleaved;p===null?(d.next=d,f_(n)):(d.next=p.next,p.next=d),n.interleaved=d;return}}catch{}finally{}i=x8(e,n,d,s),i!==null&&(d=Wr(),Ao(i,e,s,d),$8(i,n,s))}}function z8(e){var n=e.alternate;return e===wn||n!==null&&n===wn}function F8(e,n){xh=Pg=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function $8(e,n,i){if(i&4194240){var s=n.lanes;s&=e.pendingLanes,i|=s,n.lanes=i,e_(e,i)}}var Og={readContext:Ji,useCallback:Er,useContext:Er,useEffect:Er,useImperativeHandle:Er,useInsertionEffect:Er,useLayoutEffect:Er,useMemo:Er,useReducer:Er,useRef:Er,useState:Er,useDebugValue:Er,useDeferredValue:Er,useTransition:Er,useMutableSource:Er,useSyncExternalStore:Er,useId:Er,unstable_isNewReconciler:!1},_re={readContext:Ji,useCallback:function(e,n){return qo().memoizedState=[e,n===void 0?null:n],e},useContext:Ji,useEffect:sI,useImperativeHandle:function(e,n,i){return i=i!=null?i.concat([e]):null,eg(4194308,4,M8.bind(null,n,e),i)},useLayoutEffect:function(e,n){return eg(4194308,4,e,n)},useInsertionEffect:function(e,n){return eg(4,2,e,n)},useMemo:function(e,n){var i=qo();return n=n===void 0?null:n,e=e(),i.memoizedState=[e,n],e},useReducer:function(e,n,i){var s=qo();return n=i!==void 0?i(n):n,s.memoizedState=s.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},s.queue=e,e=e.dispatch=vre.bind(null,wn,e),[s.memoizedState,e]},useRef:function(e){var n=qo();return e={current:e},n.memoizedState=e},useState:oI,useDebugValue:__,useDeferredValue:function(e){return qo().memoizedState=e},useTransition:function(){var e=oI(!1),n=e[0];return e=xre.bind(null,e[1]),qo().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,i){var s=wn,d=qo();if(kn){if(i===void 0)throw Error(ze(407));i=i()}else{if(i=n(),dr===null)throw Error(ze(349));Hl&30||C8(s,n,i)}d.memoizedState=i;var h={value:i,getSnapshot:n};return d.queue=h,sI(N8.bind(null,s,h,e),[e]),s.flags|=2048,$h(9,j8.bind(null,s,h,i,n),void 0,null),i},useId:function(){var e=qo(),n=dr.identifierPrefix;if(kn){var i=js,s=Cs;i=(s&~(1<<32-_o(s)-1)).toString(32)+i,n=":"+n+"R"+i,i=zh++,0<i&&(n+="H"+i.toString(32)),n+=":"}else i=yre++,n=":"+n+"r"+i.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},Are={readContext:Ji,useCallback:O8,useContext:Ji,useEffect:w_,useImperativeHandle:P8,useInsertionEffect:T8,useLayoutEffect:I8,useMemo:B8,useReducer:Bx,useRef:D8,useState:function(){return Bx(Fh)},useDebugValue:__,useDeferredValue:function(e){var n=Xi();return L8(n,Kn.memoizedState,e)},useTransition:function(){var e=Bx(Fh)[0],n=Xi().memoizedState;return[e,n]},useMutableSource:_8,useSyncExternalStore:A8,useId:R8,unstable_isNewReconciler:!1},Cre={readContext:Ji,useCallback:O8,useContext:Ji,useEffect:w_,useImperativeHandle:P8,useInsertionEffect:T8,useLayoutEffect:I8,useMemo:B8,useReducer:Lx,useRef:D8,useState:function(){return Lx(Fh)},useDebugValue:__,useDeferredValue:function(e){var n=Xi();return Kn===null?n.memoizedState=e:L8(n,Kn.memoizedState,e)},useTransition:function(){var e=Lx(Fh)[0],n=Xi().memoizedState;return[e,n]},useMutableSource:_8,useSyncExternalStore:A8,useId:R8,unstable_isNewReconciler:!1};function bo(e,n){if(e&&e.defaultProps){n=_n({},n),e=e.defaultProps;for(var i in e)n[i]===void 0&&(n[i]=e[i]);return n}return n}function pw(e,n,i,s){n=e.memoizedState,i=i(s,n),i=i==null?n:_n({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var R0={isMounted:function(e){return(e=e._reactInternals)?oc(e)===e:!1},enqueueSetState:function(e,n,i){e=e._reactInternals;var s=Wr(),d=Ia(e),h=Ss(s,d);h.payload=n,i!=null&&(h.callback=i),n=Da(e,h,d),n!==null&&(Ao(n,e,d,s),Jp(n,e,d))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var s=Wr(),d=Ia(e),h=Ss(s,d);h.tag=1,h.payload=n,i!=null&&(h.callback=i),n=Da(e,h,d),n!==null&&(Ao(n,e,d,s),Jp(n,e,d))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=Wr(),s=Ia(e),d=Ss(i,s);d.tag=2,n!=null&&(d.callback=n),n=Da(e,d,s),n!==null&&(Ao(n,e,s,i),Jp(n,e,s))}};function aI(e,n,i,s,d,h,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,h,f):n.prototype&&n.prototype.isPureReactComponent?!Mh(i,s)||!Mh(d,h):!0}function V8(e,n,i){var s=!1,d=La,h=n.contextType;return typeof h=="object"&&h!==null?h=Ji(h):(d=ai(n)?Ul:Or.current,s=n.contextTypes,h=(s=s!=null)?_d(e,d):La),n=new n(i,h),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=R0,e.stateNode=n,n._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=d,e.__reactInternalMemoizedMaskedChildContext=h),n}function lI(e,n,i,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,s),n.state!==e&&R0.enqueueReplaceState(n,n.state,null)}function gw(e,n,i,s){var d=e.stateNode;d.props=i,d.state=e.memoizedState,d.refs={},p_(e);var h=n.contextType;typeof h=="object"&&h!==null?d.context=Ji(h):(h=ai(n)?Ul:Or.current,d.context=_d(e,h)),d.state=e.memoizedState,h=n.getDerivedStateFromProps,typeof h=="function"&&(pw(e,n,h,i),d.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(n=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),n!==d.state&&R0.enqueueReplaceState(d,d.state,null),Ig(e,i,d,s),d.state=e.memoizedState),typeof d.componentDidMount=="function"&&(e.flags|=4194308)}function Nd(e,n){try{var i="",s=n;do i+=Xte(s),s=s.return;while(s);var d=i}catch(h){d=` 40Error generating stack: `+h.message+` 41`+h.stack}return{value:e,source:n,stack:d,digest:null}}function Rx(e,n,i){return{value:e,source:null,stack:i??null,digest:n??null}}function bw(e,n){try{console.error(n.value)}catch(i){setTimeout(function(){throw i})}}var jre=typeof WeakMap=="function"?WeakMap:Map;function U8(e,n,i){i=Ss(-1,i),i.tag=3,i.payload={element:null};var s=n.value;return i.callback=function(){Lg||(Lg=!0,Nw=s),bw(e,n)},i}function W8(e,n,i){i=Ss(-1,i),i.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var d=n.value;i.payload=function(){return s(d)},i.callback=function(){bw(e,n)}}var h=e.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(i.callback=function(){bw(e,n),typeof s!="function"&&(Ta===null?Ta=new Set([this]):Ta.add(this));var f=n.stack;this.componentDidCatch(n.value,{componentStack:f!==null?f:""})}),i}function cI(e,n,i){var s=e.pingCache;if(s===null){s=e.pingCache=new jre;var d=new Set;s.set(n,d)}else d=s.get(n),d===void 0&&(d=new Set,s.set(n,d));d.has(i)||(d.add(i),e=Fre.bind(null,e,n,i),n.then(e,e))}function dI(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function uI(e,n,i,s,d){return e.mode&1?(e.flags|=65536,e.lanes=d,e):(e===n?e.flags|=65536:(e.flags|=128,i.flags|=131072,i.flags&=-52805,i.tag===1&&(i.alternate===null?i.tag=17:(n=Ss(-1,1),n.tag=2,Da(i,n,1))),i.lanes|=1),e)}var Nre=Ws.ReactCurrentOwner,ii=!1;function Fr(e,n,i,s){n.child=e===null?y8(n,null,i,s):Cd(n,e.child,i,s)}function hI(e,n,i,s,d){i=i.render;var h=n.ref;return gd(n,d),s=x_(e,n,i,s,h,d),i=v_(),e!==null&&!ii?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~d,Bs(e,n,d)):(kn&&i&&l_(n),n.flags|=1,Fr(e,n,s,d),n.child)}function mI(e,n,i,s,d){if(e===null){var h=i.type;return typeof h=="function"&&!T_(h)&&h.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(n.tag=15,n.type=h,H8(e,n,h,s,d)):(e=ig(i.type,null,s,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,!(e.lanes&d)){var f=h.memoizedProps;if(i=i.compare,i=i!==null?i:Mh,i(f,s)&&e.ref===n.ref)return Bs(e,n,d)}return n.flags|=1,e=Ma(h,s),e.ref=n.ref,e.return=n,n.child=e}function H8(e,n,i,s,d){if(e!==null){var h=e.memoizedProps;if(Mh(h,s)&&e.ref===n.ref)if(ii=!1,n.pendingProps=s=h,(e.lanes&d)!==0)e.flags&131072&&(ii=!0);else return n.lanes=e.lanes,Bs(e,n,d)}return kw(e,n,i,s,d)}function G8(e,n,i){var s=n.pendingProps,d=s.children,h=e!==null?e.memoizedState:null;if(s.mode==="hidden")if(!(n.mode&1))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},cn(ad,Ci),Ci|=i;else{if(!(i&1073741824))return e=h!==null?h.baseLanes|i:i,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,cn(ad,Ci),Ci|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=h!==null?h.baseLanes:i,cn(ad,Ci),Ci|=s}else h!==null?(s=h.baseLanes|i,n.memoizedState=null):s=i,cn(ad,Ci),Ci|=s;return Fr(e,n,d,i),n.child}function q8(e,n){var i=n.ref;(e===null&&i!==null||e!==null&&e.ref!==i)&&(n.flags|=512,n.flags|=2097152)}
vendor: 4,499 bytes, line 41
41function kw(e,n,i,s,d){var h=ai(i)?Ul:Or.current;return h=_d(n,h),gd(n,d),i=x_(e,n,i,s,h,d),s=v_(),e!==null&&!ii?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~d,Bs(e,n,d)):(kn&&s&&l_(n),n.flags|=1,Fr(e,n,i,d),n.child)}function fI(e,n,i,s,d){if(ai(i)){var h=!0;Ng(n)}else h=!1;if(gd(n,d),n.stateNode===null)tg(e,n),V8(n,i,s),gw(n,i,s,d),s=!0;else if(e===null){var f=n.stateNode,g=n.memoizedProps;f.props=g;var p=f.context,x=i.contextType;typeof x=="object"&&x!==null?x=Ji(x):(x=ai(i)?Ul:Or.current,x=_d(n,x));var y=i.getDerivedStateFromProps,v=typeof y=="function"||typeof f.getSnapshotBeforeUpdate=="function";v||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(g!==s||p!==x)&&lI(n,f,s,x),ga=!1;var w=n.memoizedState;f.state=w,Ig(n,s,f,d),p=n.memoizedState,g!==s||w!==p||si.current||ga?(typeof y=="function"&&(pw(n,i,y,s),p=n.memoizedState),(g=ga||aI(n,i,g,s,w,p,x))?(v||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(n.flags|=4194308)):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=p),f.props=s,f.state=p,f.context=x,s=g):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{f=n.stateNode,v8(e,n),g=n.memoizedProps,x=n.type===n.elementType?g:bo(n.type,g),f.props=x,v=n.pendingProps,w=f.context,p=i.contextType,typeof p=="object"&&p!==null?p=Ji(p):(p=ai(i)?Ul:Or.current,p=_d(n,p));var C=i.getDerivedStateFromProps;(y=typeof C=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(g!==v||w!==p)&&lI(n,f,s,p),ga=!1,w=n.memoizedState,f.state=w,Ig(n,s,f,d);var E=n.memoizedState;g!==v||w!==E||si.current||ga?(typeof C=="function"&&(pw(n,i,C,s),E=n.memoizedState),(x=ga||aI(n,i,x,s,w,E,p)||!1)?(y||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(s,E,p),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(s,E,p)),typeof f.componentDidUpdate=="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&w===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&w===e.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=E),f.props=s,f.state=E,f.context=p,s=x):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&w===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&w===e.memoizedState||(n.flags|=1024),s=!1)}return yw(e,n,i,s,h,d)}function yw(e,n,i,s,d,h){q8(e,n);var f=(n.flags&128)!==0;if(!s&&!f)return d&&XT(n,i,!1),Bs(e,n,h);s=n.stateNode,Nre.current=n;var g=f&&typeof i.getDerivedStateFromError!="function"?null:s.render();return n.flags|=1,e!==null&&f?(n.child=Cd(n,e.child,null,h),n.child=Cd(n,null,g,h)):Fr(e,n,g,h),n.memoizedState=s.state,d&&XT(n,i,!0),n.child}function K8(e){var n=e.stateNode;n.pendingContext?JT(e,n.pendingContext,n.pendingContext!==n.context):n.context&&JT(e,n.context,!1),g_(e,n.containerInfo)}function pI(e,n,i,s,d){return Ad(),d_(d),n.flags|=256,Fr(e,n,i,s),n.child}var xw={dehydrated:null,treeContext:null,retryLane:0};function vw(e){return{baseLanes:e,cachePool:null,transitions:null}}function Y8(e,n,i){var s=n.pendingProps,d=vn.current,h=!1,f=(n.flags&128)!==0,g;if((g=f)||(g=e!==null&&e.memoizedState===null?!1:(d&2)!==0),g?(h=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(d|=1),cn(vn,d&1),e===null)return mw(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(n.mode&1?e.data==="$!"?n.lanes=8:n.lanes=1073741824:n.lanes=1,null):(f=s.children,e=s.fallback,h?(s=n.mode,h=n.child,f={mode:"hidden",children:f},!(s&1)&&h!==null?(h.childLanes=0,h.pendingProps=f):h=$0(f,s,0,null),e=Ll(e,s,i,null),h.return=n,e.return=n,h.sibling=e,n.child=h,n.child.memoizedState=vw(i),n.memoizedState=xw,e):A_(n,f));if(d=e.memoizedState,d!==null&&(g=d.dehydrated,g!==null))return Ere(e,n,f,s,g,d,i);if(h){h=s.fallback,f=n.mode,d=e.child,g=d.sibling;var p={mode:"hidden",children:s.children};return!(f&1)&&n.child!==d?(s=n.child,s.childLanes=0,s.pendingProps=p,n.deleti
vendor: 6,034 bytes, line 41
41ons=null):(s=Ma(d,p),s.subtreeFlags=d.subtreeFlags&14680064),g!==null?h=Ma(g,h):(h=Ll(h,f,i,null),h.flags|=2),h.return=n,s.return=n,s.sibling=h,n.child=s,s=h,h=n.child,f=e.child.memoizedState,f=f===null?vw(i):{baseLanes:f.baseLanes|i,cachePool:null,transitions:f.transitions},h.memoizedState=f,h.childLanes=e.childLanes&~i,n.memoizedState=xw,s}return h=e.child,e=h.sibling,s=Ma(h,{mode:"visible",children:s.children}),!(n.mode&1)&&(s.lanes=i),s.return=n,s.sibling=null,e!==null&&(i=n.deletions,i===null?(n.deletions=[e],n.flags|=16):i.push(e)),n.child=s,n.memoizedState=null,s}function A_(e,n){return n=$0({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function yp(e,n,i,s){return s!==null&&d_(s),Cd(n,e.child,null,i),e=A_(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Ere(e,n,i,s,d,h,f){if(i)return n.flags&256?(n.flags&=-257,s=Rx(Error(ze(422))),yp(e,n,f,s)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(h=s.fallback,d=n.mode,s=$0({mode:"visible",children:s.children},d,0,null),h=Ll(h,d,f,null),h.flags|=2,s.return=n,h.return=n,s.sibling=h,n.child=s,n.mode&1&&Cd(n,e.child,null,f),n.child.memoizedState=vw(f),n.memoizedState=xw,h);if(!(n.mode&1))return yp(e,n,f,null);if(d.data==="$!"){if(s=d.nextSibling&&d.nextSibling.dataset,s)var g=s.dgst;return s=g,h=Error(ze(419)),s=Rx(h,s,void 0),yp(e,n,f,s)}if(g=(f&e.childLanes)!==0,ii||g){if(s=dr,s!==null){switch(f&-f){case 4:d=2;break;case 16:d=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:d=32;break;case 536870912:d=268435456;break;default:d=0}d=d&(s.suspendedLanes|f)?0:d,d!==0&&d!==h.retryLane&&(h.retryLane=d,Os(e,d),Ao(s,e,d,-1))}return D_(),s=Rx(Error(ze(421))),yp(e,n,f,s)}return d.data==="$?"?(n.flags|=128,n.child=e.child,n=$re.bind(null,e),d._reactRetry=n,null):(e=h.treeContext,Ei=Sa(d.nextSibling),Di=n,kn=!0,yo=null,e!==null&&(Gi[qi++]=Cs,Gi[qi++]=js,Gi[qi++]=Wl,Cs=e.id,js=e.overflow,Wl=n),n=A_(n,s.children),n.flags|=4096,n)}function gI(e,n,i){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),fw(e.return,n,i)}function zx(e,n,i,s,d){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:d}:(h.isBackwards=n,h.rendering=null,h.renderingStartTime=0,h.last=s,h.tail=i,h.tailMode=d)}function Q8(e,n,i){var s=n.pendingProps,d=s.revealOrder,h=s.tail;if(Fr(e,n,s.children,i),s=vn.current,s&2)s=s&1|2,n.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&gI(e,i,n);else if(e.tag===19)gI(e,i,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}if(cn(vn,s),!(n.mode&1))n.memoizedState=null;else switch(d){case"forwards":for(i=n.child,d=null;i!==null;)e=i.alternate,e!==null&&Mg(e)===null&&(d=i),i=i.sibling;i=d,i===null?(d=n.child,n.child=null):(d=i.sibling,i.sibling=null),zx(n,!1,d,i,h);break;case"backwards":for(i=null,d=n.child,n.child=null;d!==null;){if(e=d.alternate,e!==null&&Mg(e)===null){n.child=d;break}e=d.sibling,d.sibling=i,i=d,d=e}zx(n,!0,i,null,h);break;case"together":zx(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function tg(e,n){!(n.mode&1)&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Bs(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),Gl|=n.lanes,!(i&n.childLanes))return null;if(e!==null&&n.child!==e.child)throw Error(ze(153));if(n.child!==null){for(e=n.child,i=Ma(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=Ma(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function Sre(e,n,i){switch(n.tag){case 3:K8(n),Ad();break;case 5:w8(n);break;case 1:ai(n.type)&&Ng(n);break;case 4:g_(n,n.stateNode.containerInfo);break;case 10:var s=n.type._context,d=n.memoizedProps.value;cn(Dg,s._currentValue),s._currentValue=d;break;case 13:if(s=n.memoizedState,s!==null)return s.dehydrated!==null?(cn(vn,vn.current&1),n.flags|=128,null):i&n.child.childLanes?Y8(e,n,i):(cn(vn,vn.current&1),e=Bs(e,n,i),e!==null?e.sibling:null);cn(vn,vn.current&1);break;case 19:if(s=(i&n.childLanes)!==0,e.flags&128){if(s)return Q8(e,n,i);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),cn(vn,vn.current),s)break;return null;case 22:case 23:return n.lanes=0,G8(e,n,i)}return Bs(e,n,i)}var Z8,ww,J8,X8;Z8=function(e,n){for(var i=n.child;i!==null;){if(i.tag===5||i.tag===6)e.appendChild(i.stateNode);else if(i.tag!==4&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};ww=function(){};J8=function(e,n,i,s){var d=e.memoizedProps;if(d!==s){e=n.stateNode,Dl(Xo.current);var h=null;switch(i){case"input":d=Wv(e,d),s=Wv(e,s),h=[];break;case"select":d=_n({},d,{value:void 0}),s=_n({},s,{value:void 0}),h=[];break;case"textarea":d=qv(e,d),s=qv(e,s),h=[];break;default:typeof d.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=Cg)}Yv(i,s);var f;i=null;for(x in d)if(!s.hasOwnProperty(x)&&d.hasOwnProperty(x)&&d[x]!=null)if(x==="style"){var g=d[x];for(f in g)g.hasOwnProperty(f)&&(i||(i={}),i[f]="")}else x!=="dangerouslySetInnerHTML"&&x!=="children"&&x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(jh.hasOwnProperty(x)?h||(h=[]):(h=h||[]).push(x,null));for(x in s){var p=s[x];if(g=d!=null?d[x]:void 0,s.hasOwnProperty(x)&&p!==g&&(p!=null||g!=null))if(x==="style")if(g){for(f in g)!g.hasOwnProperty(f)||p&&p.hasOwnProperty(f)||(i||(i={}),i[f]="");for(f in p)p.hasOwnProperty(f)&&g[f]!==p[f]&&(i||(i={}),i[f]=p[f])}else i||(h||(h=[]),h.push(x,i)),i=p;else x==="dangerouslySetInnerHTML"?(p=p?p.__html:void 0,g=g?g.__html:void 0,p!=null&&g!==p&&
vendor: 4,903 bytes, line 41
41(h=h||[]).push(x,p)):x==="children"?typeof p!="string"&&typeof p!="number"||(h=h||[]).push(x,""+p):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&(jh.hasOwnProperty(x)?(p!=null&&x==="onScroll"&&hn("scroll",e),h||g===p||(h=[])):(h=h||[]).push(x,p))}i&&(h=h||[]).push("style",i);var x=h;(n.updateQueue=x)&&(n.flags|=4)}};X8=function(e,n,i,s){i!==s&&(n.flags|=4)};function Gu(e,n){if(!kn)switch(e.tailMode){case"hidden":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Sr(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(n)for(var d=e.child;d!==null;)i|=d.lanes|d.childLanes,s|=d.subtreeFlags&14680064,s|=d.flags&14680064,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)i|=d.lanes|d.childLanes,s|=d.subtreeFlags,s|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=s,e.childLanes=i,n}function Dre(e,n,i){var s=n.pendingProps;switch(c_(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Sr(n),null;case 1:return ai(n.type)&&jg(),Sr(n),null;case 3:return s=n.stateNode,jd(),fn(si),fn(Or),k_(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(bp(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,yo!==null&&(Dw(yo),yo=null))),ww(e,n),Sr(n),null;case 5:b_(n);var d=Dl(Rh.current);if(i=n.type,e!==null&&n.stateNode!=null)J8(e,n,i,s,d),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!s){if(n.stateNode===null)throw Error(ze(166));return Sr(n),null}if(e=Dl(Xo.current),bp(n)){s=n.stateNode,i=n.type;var h=n.memoizedProps;switch(s[Qo]=n,s[Bh]=h,e=(n.mode&1)!==0,i){case"dialog":hn("cancel",s),hn("close",s);break;case"iframe":case"object":case"embed":hn("load",s);break;case"video":case"audio":for(d=0;d<dh.length;d++)hn(dh[d],s);break;case"source":hn("error",s);break;case"img":case"image":case"link":hn("error",s),hn("load",s);break;case"details":hn("toggle",s);break;case"input":CT(s,h),hn("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!h.multiple},hn("invalid",s);break;case"textarea":NT(s,h),hn("invalid",s)}Yv(i,h),d=null;for(var f in h)if(h.hasOwnProperty(f)){var g=h[f];f==="children"?typeof g=="string"?s.textContent!==g&&(h.suppressHydrationWarning!==!0&&gp(s.textContent,g,e),d=["children",g]):typeof g=="number"&&s.textContent!==""+g&&(h.suppressHydrationWarning!==!0&&gp(s.textContent,g,e),d=["children",""+g]):jh.hasOwnProperty(f)&&g!=null&&f==="onScroll"&&hn("scroll",s)}switch(i){case"input":lp(s),jT(s,h,!0);break;case"textarea":lp(s),ET(s);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(s.onclick=Cg)}s=d,n.updateQueue=s,s!==null&&(n.flags|=4)}else{f=d.nodeType===9?d:d.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=NB(i)),e==="http://www.w3.org/1999/xhtml"?i==="script"?(e=f.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=f.createElement(i,{is:s.is}):(e=f.createElement(i),i==="select"&&(f=e,s.multiple?f.multiple=!0:s.size&&(f.size=s.size))):e=f.createElementNS(e,i),e[Qo]=n,e[Bh]=s,Z8(e,n,!1,!1),n.stateNode=e;e:{switch(f=Qv(i,s),i){case"dialog":hn("cancel",e),hn("close",e),d=s;break;case"iframe":case"object":case"embed":hn("load",e),d=s;break;case"video":case"audio":for(d=0;d<dh.length;d++)hn(dh[d],e);d=s;break;case"source":hn("error",e),d=s;break;case"img":case"image":case"link":hn("error",e),hn("load",e),d=s;break;case"details":hn("toggle",e),d=s;break;case"input":CT(e,s),d=Wv(e,s),hn("invalid",e);break;case"option":d=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},d=_n({},s,{value:void 0}),hn("invalid",e);break;case"textarea":NT(e,s),d=qv(e,s),hn("invalid",e);break;default:d=s}Yv(i,d),g=d;for(h in g)if(g.hasOwnProperty(h)){var p=g[h];h==="style"?DB(e,p):h==="dangerouslySetInnerHTML"?(p=p?p.__html:void 0,p!=null&&EB(e,p)):h==="children"?typeof p=="string"?(i!=="textarea"||p!=="")&&Nh(e,p):typeof p=="number"&&Nh(e,""+p):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(jh.hasOwnProperty(h)?p!=null&&h==="onScroll"&&hn("scroll",e):p!=null&&K1(e,h,p,f))}switch(i){case"input":lp(e),jT(e,s,!1);break;case"textarea":lp(e),ET(e);break;case"option":s.value!=null&&e.setAttribute("value",""+Ba(s.value));break;case"select":e.multiple=!!s.multiple,h=s.value,h!=null?hd(e,!!s.multiple,h,!1):s.defaultValue!=null&&hd(e,!!s.multiple,s.defaultValue,!0);break;default:typeof d.onClick=="function"&&(e.onclick=Cg)}switch(i){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}
vendor: 29,328 bytes, line 41
41return Sr(n),null;case 6:if(e&&n.stateNode!=null)X8(e,n,e.memoizedProps,s);else{if(typeof s!="string"&&n.stateNode===null)throw Error(ze(166));if(i=Dl(Rh.current),Dl(Xo.current),bp(n)){if(s=n.stateNode,i=n.memoizedProps,s[Qo]=n,(h=s.nodeValue!==i)&&(e=Di,e!==null))switch(e.tag){case 3:gp(s.nodeValue,i,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&gp(s.nodeValue,i,(e.mode&1)!==0)}h&&(n.flags|=4)}else s=(i.nodeType===9?i:i.ownerDocument).createTextNode(s),s[Qo]=n,n.stateNode=s}return Sr(n),null;case 13:if(fn(vn),s=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(kn&&Ei!==null&&n.mode&1&&!(n.flags&128))b8(),Ad(),n.flags|=98560,h=!1;else if(h=bp(n),s!==null&&s.dehydrated!==null){if(e===null){if(!h)throw Error(ze(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(ze(317));h[Qo]=n}else Ad(),!(n.flags&128)&&(n.memoizedState=null),n.flags|=4;Sr(n),h=!1}else yo!==null&&(Dw(yo),yo=null),h=!0;if(!h)return n.flags&65536?n:null}return n.flags&128?(n.lanes=i,n):(s=s!==null,s!==(e!==null&&e.memoizedState!==null)&&s&&(n.child.flags|=8192,n.mode&1&&(e===null||vn.current&1?Qn===0&&(Qn=3):D_())),n.updateQueue!==null&&(n.flags|=4),Sr(n),null);case 4:return jd(),ww(e,n),e===null&&Ph(n.stateNode.containerInfo),Sr(n),null;case 10:return m_(n.type._context),Sr(n),null;case 17:return ai(n.type)&&jg(),Sr(n),null;case 19:if(fn(vn),h=n.memoizedState,h===null)return Sr(n),null;if(s=(n.flags&128)!==0,f=h.rendering,f===null)if(s)Gu(h,!1);else{if(Qn!==0||e!==null&&e.flags&128)for(e=n.child;e!==null;){if(f=Mg(e),f!==null){for(n.flags|=128,Gu(h,!1),s=f.updateQueue,s!==null&&(n.updateQueue=s,n.flags|=4),n.subtreeFlags=0,s=i,i=n.child;i!==null;)h=i,e=s,h.flags&=14680066,f=h.alternate,f===null?(h.childLanes=0,h.lanes=e,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=f.childLanes,h.lanes=f.lanes,h.child=f.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=f.memoizedProps,h.memoizedState=f.memoizedState,h.updateQueue=f.updateQueue,h.type=f.type,e=f.dependencies,h.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),i=i.sibling;return cn(vn,vn.current&1|2),n.child}e=e.sibling}h.tail!==null&&On()>Ed&&(n.flags|=128,s=!0,Gu(h,!1),n.lanes=4194304)}else{if(!s)if(e=Mg(f),e!==null){if(n.flags|=128,s=!0,i=e.updateQueue,i!==null&&(n.updateQueue=i,n.flags|=4),Gu(h,!0),h.tail===null&&h.tailMode==="hidden"&&!f.alternate&&!kn)return Sr(n),null}else 2*On()-h.renderingStartTime>Ed&&i!==1073741824&&(n.flags|=128,s=!0,Gu(h,!1),n.lanes=4194304);h.isBackwards?(f.sibling=n.child,n.child=f):(i=h.last,i!==null?i.sibling=f:n.child=f,h.last=f)}return h.tail!==null?(n=h.tail,h.rendering=n,h.tail=n.sibling,h.renderingStartTime=On(),n.sibling=null,i=vn.current,cn(vn,s?i&1|2:i&1),n):(Sr(n),null);case 22:case 23:return S_(),s=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(n.flags|=8192),s&&n.mode&1?Ci&1073741824&&(Sr(n),n.subtreeFlags&6&&(n.flags|=8192)):Sr(n),null;case 24:return null;case 25:return null}throw Error(ze(156,n.tag))}function Tre(e,n){switch(c_(n),n.tag){case 1:return ai(n.type)&&jg(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return jd(),fn(si),fn(Or),k_(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return b_(n),null;case 13:if(fn(vn),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(ze(340));Ad()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return fn(vn),null;case 4:return jd(),null;case 10:return m_(n.type._context),null;case 22:case 23:return S_(),null;case 24:return null;default:return null}}var xp=!1,Ir=!1,Ire=typeof WeakSet=="function"?WeakSet:Set,ct=null;function sd(e,n){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(s){En(e,n,s)}else i.current=null}function _w(e,n,i){try{i()}catch(s){En(e,n,s)}}var bI=!1;function Mre(e,n){if(sw=wg,e=i8(),a_(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var d=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var f=0,g=-1,p=-1,x=0,y=0,v=e,w=null;t:for(;;){for(var C;v!==i||d!==0&&v.nodeType!==3||(g=f+d),v!==h||s!==0&&v.nodeType!==3||(p=f+s),v.nodeType===3&&(f+=v.nodeValue.length),(C=v.firstChild)!==null;)w=v,v=C;for(;;){if(v===e)break t;if(w===i&&++x===d&&(g=f),w===h&&++y===s&&(p=f),(C=v.nextSibling)!==null)break;v=w,w=v.parentNode}v=C}i=g===-1||p===-1?null:{start:g,end:p}}else i=null}i=i||{start:0,end:0}}else i=null;for(aw={focusedElem:e,selectionRange:i},wg=!1,ct=n;ct!==null;)if(n=ct,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ct=e;else for(;ct!==null;){n=ct;try{var E=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var S=E.memoizedProps,D=E.memoizedState,I=n.stateNode,M=I.getSnapshotBeforeUpdate(n.elementType===n.type?S:bo(n.type,S),D);I.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var B=n.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ze(163))}}catch(R){En(n,n.return,R)}if(e=n.sibling,e!==null){e.return=n.return,ct=e;break}ct=n.return}return E=bI,bI=!1,E}function vh(e,n,i){var s=n.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var d=s=s.next;do{if((d.tag&e)===e){var h=d.destroy;d.destroy=void 0,h!==void 0&&_w(n,i,h)}d=d.next}while(d!==s)}}function z0(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var s=i.create;i.destroy=s()}i=i.next}while(i!==n)}}function Aw(e){var n=e.ref;if(n!==null){var i=e.stateNode;switch(e.tag){case 5:e=i;break;default:e=i}typeof n=="function"?n(e):n.current=e}}function eL(e){var n=e.alternate;n!==null&&(e.alternate=null,eL(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Qo],delete n[Bh],delete n[dw],delete n[pre],delete n[gre])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function tL(e){return e.tag===5||e.tag===3||e.tag===4}function kI(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tL(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Cw(e,n,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?i.nodeType===8?i.parentNode.insertBefore(e,n):i.insertBefore(e,n):(i.nodeType===8?(n=i.parentNode,n.insertBefore(e,i)):(n=i,n.appendChild(e)),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=Cg));else if(s!==4&&(e=e.child,e!==null))for(Cw(e,n,i),e=e.sibling;e!==null;)Cw(e,n,i),e=e.sibling}function jw(e,n,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(jw(e,n,i),e=e.sibling;e!==null;)jw(e,n,i),e=e.sibling}var xr=null,ko=!1;function ha(e,n,i){for(i=i.child;i!==null;)nL(e,n,i),i=i.sibling}function nL(e,n,i){if(Jo&&typeof Jo.onCommitFiberUnmount=="function")try{Jo.onCommitFiberUnmount(T0,i)}catch{}switch(i.tag){case 5:Ir||sd(i,n);case 6:var s=xr,d=ko;xr=null,ha(e,n,i),xr=s,ko=d,xr!==null&&(ko?(e=xr,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):xr.removeChild(i.stateNode));break;case 18:xr!==null&&(ko?(e=xr,i=i.stateNode,e.nodeType===8?Ix(e.parentNode,i):e.nodeType===1&&Ix(e,i),Th(e)):Ix(xr,i.stateNode));break;case 4:s=xr,d=ko,xr=i.stateNode.containerInfo,ko=!0,ha(e,n,i),xr=s,ko=d;break;case 0:case 11:case 14:case 15:if(!Ir&&(s=i.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){d=s=s.next;do{var h=d,f=h.destroy;h=h.tag,f!==void 0&&(h&2||h&4)&&_w(i,n,f),d=d.next}while(d!==s)}ha(e,n,i);break;case 1:if(!Ir&&(sd(i,n),s=i.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=i.memoizedProps,s.state=i.memoizedState,s.componentWillUnmount()}catch(g){En(i,n,g)}ha(e,n,i);break;case 21:ha(e,n,i);break;case 22:i.mode&1?(Ir=(s=Ir)||i.memoizedState!==null,ha(e,n,i),Ir=s):ha(e,n,i);break;default:ha(e,n,i)}}function yI(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new Ire),n.forEach(function(s){var d=Vre.bind(null,e,s);i.has(s)||(i.add(s),s.then(d,d))})}}function go(e,n){var i=n.deletions;if(i!==null)for(var s=0;s<i.length;s++){var d=i[s];try{var h=e,f=n,g=f;e:for(;g!==null;){switch(g.tag){case 5:xr=g.stateNode,ko=!1;break e;case 3:xr=g.stateNode.containerInfo,ko=!0;break e;case 4:xr=g.stateNode.containerInfo,ko=!0;break e}g=g.return}if(xr===null)throw Error(ze(160));nL(h,f,d),xr=null,ko=!1;var p=d.alternate;p!==null&&(p.return=null),d.return=null}catch(x){En(d,n,x)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)rL(n,e),n=n.sibling}function rL(e,n){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(go(n,e),Wo(e),s&4){try{vh(3,e,e.return),z0(3,e)}catch(S){En(e,e.return,S)}try{vh(5,e,e.return)}catch(S){En(e,e.return,S)}}break;case 1:go(n,e),Wo(e),s&512&&i!==null&&sd(i,i.return);break;case 5:if(go(n,e),Wo(e),s&512&&i!==null&&sd(i,i.return),e.flags&32){var d=e.stateNode;try{Nh(d,"")}catch(S){En(e,e.return,S)}}if(s&4&&(d=e.stateNode,d!=null)){var h=e.memoizedProps,f=i!==null?i.memoizedProps:h,g=e.type,p=e.updateQueue;if(e.updateQueue=null,p!==null)try{g==="input"&&h.type==="radio"&&h.name!=null&&CB(d,h),Qv(g,f);var x=Qv(g,h);for(f=0;f<p.length;f+=2){var y=p[f],v=p[f+1];y==="style"?DB(d,v):y==="dangerouslySetInnerHTML"?EB(d,v):y==="children"?Nh(d,v):K1(d,y,v,x)}switch(g){case"input":Hv(d,h);break;case"textarea":jB(d,h);break;case"select":var w=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!h.multiple;var C=h.value;C!=null?hd(d,!!h.multiple,C,!1):w!==!!h.multiple&&(h.defaultValue!=null?hd(d,!!h.multiple,h.defaultValue,!0):hd(d,!!h.multiple,h.multiple?[]:"",!1))}d[Bh]=h}catch(S){En(e,e.return,S)}}break;case 6:if(go(n,e),Wo(e),s&4){if(e.stateNode===null)throw Error(ze(162));d=e.stateNode,h=e.memoizedProps;try{d.nodeValue=h}catch(S){En(e,e.return,S)}}break;case 3:if(go(n,e),Wo(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Th(n.containerInfo)}catch(S){En(e,e.return,S)}break;case 4:go(n,e),Wo(e);break;case 13:go(n,e),Wo(e),d=e.child,d.flags&8192&&(h=d.memoizedState!==null,d.stateNode.isHidden=h,!h||d.alternate!==null&&d.alternate.memoizedState!==null||(N_=On())),s&4&&yI(e);break;case 22:if(y=i!==null&&i.memoizedState!==null,e.mode&1?(Ir=(x=Ir)||y,go(n,e),Ir=x):go(n,e),Wo(e),s&8192){if(x=e.memoizedState!==null,(e.stateNode.isHidden=x)&&!y&&e.mode&1)for(ct=e,y=e.child;y!==null;){for(v=ct=y;ct!==null;){switch(w=ct,C=w.child,w.tag){case 0:case 11:case 14:case 15:vh(4,w,w.return);break;case 1:sd(w,w.return);var E=w.stateNode;if(typeof E.componentWillUnmount=="function"){s=w,i=w.return;try{n=s,E.props=n.memoizedProps,E.state=n.memoizedState,E.componentWillUnmount()}catch(S){En(s,i,S)}}break;case 5:sd(w,w.return);break;case 22:if(w.memoizedState!==null){vI(v);continue}}C!==null?(C.return=w,ct=C):vI(v)}y=y.sibling}e:for(y=null,v=e;;){if(v.tag===5){if(y===null){y=v;try{d=v.stateNode,x?(h=d.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none"):(g=v.stateNode,p=v.memoizedProps.style,f=p!=null&&p.hasOwnProperty("display")?p.display:null,g.style.display=SB("display",f))}catch(S){En(e,e.return,S)}}}else if(v.tag===6){if(y===null)try{v.stateNode.nodeValue=x?"":v.memoizedProps}catch(S){En(e,e.return,S)}}else if((v.tag!==22&&v.tag!==23||v.memoizedState===null||v===e)&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===e)break e;for(;v.sibling===null;){if(v.return===null||v.return===e)break e;y===v&&(y=null),v=v.return}y===v&&(y=null),v.sibling.return=v.return,v=v.sibling}}break;case 19:go(n,e),Wo(e),s&4&&yI(e);break;case 21:break;default:go(n,e),Wo(e)}}function Wo(e){var n=e.flags;if(n&2){try{e:{for(var i=e.return;i!==null;){if(tL(i)){var s=i;break e}i=i.return}throw Error(ze(160))}switch(s.tag){case 5:var d=s.stateNode;s.flags&32&&(Nh(d,""),s.flags&=-33);var h=kI(e);jw(e,h,d);break;case 3:case 4:var f=s.stateNode.containerInfo,g=kI(e);Cw(e,g,f);break;default:throw Error(ze(161))}}catch(p){En(e,e.return,p)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Pre(e,n,i){ct=e,iL(e)}function iL(e,n,i){for(var s=(e.mode&1)!==0;ct!==null;){var d=ct,h=d.child;if(d.tag===22&&s){var f=d.memoizedState!==null||xp;if(!f){var g=d.alternate,p=g!==null&&g.memoizedState!==null||Ir;g=xp;var x=Ir;if(xp=f,(Ir=p)&&!x)for(ct=d;ct!==null;)f=ct,p=f.child,f.tag===22&&f.memoizedState!==null?wI(d):p!==null?(p.return=f,ct=p):wI(d);for(;h!==null;)ct=h,iL(h),h=h.sibling;ct=d,xp=g,Ir=x}xI(e)}else d.subtreeFlags&8772&&h!==null?(h.return=d,ct=h):xI(e)}}function xI(e){for(;ct!==null;){var n=ct;if(n.flags&8772){var i=n.alternate;try{if(n.flags&8772)switch(n.tag){case 0:case 11:case 15:Ir||z0(5,n);break;case 1:var s=n.stateNode;if(n.flags&4&&!Ir)if(i===null)s.componentDidMount();else{var d=n.elementType===n.type?i.memoizedProps:bo(n.type,i.memoizedProps);s.componentDidUpdate(d,i.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var h=n.updateQueue;h!==null&&iI(n,h,s);break;case 3:var f=n.updateQueue;if(f!==null){if(i=null,n.child!==null)switch(n.child.tag){case 5:i=n.child.stateNode;break;case 1:i=n.child.stateNode}iI(n,f,i)}break;case 5:var g=n.stateNode;if(i===null&&n.flags&4){i=g;var p=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":p.autoFocus&&i.focus();break;case"img":p.src&&(i.src=p.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var x=n.alternate;if(x!==null){var y=x.memoizedState;if(y!==null){var v=y.dehydrated;v!==null&&Th(v)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ze(163))}Ir||n.flags&512&&Aw(n)}catch(w){En(n,n.return,w)}}if(n===e){ct=null;break}if(i=n.sibling,i!==null){i.return=n.return,ct=i;break}ct=n.return}}function vI(e){for(;ct!==null;){var n=ct;if(n===e){ct=null;break}var i=n.sibling;if(i!==null){i.return=n.return,ct=i;break}ct=n.return}}function wI(e){for(;ct!==null;){var n=ct;try{switch(n.tag){case 0:case 11:case 15:var i=n.return;try{z0(4,n)}catch(p){En(n,i,p)}break;case 1:var s=n.stateNode;if(typeof s.componentDidMount=="function"){var d=n.return;try{s.componentDidMount()}catch(p){En(n,d,p)}}var h=n.return;try{Aw(n)}catch(p){En(n,h,p)}break;case 5:var f=n.return;try{Aw(n)}catch(p){En(n,f,p)}}}catch(p){En(n,n.return,p)}if(n===e){ct=null;break}var g=n.sibling;if(g!==null){g.return=n.return,ct=g;break}ct=n.return}}var Ore=Math.ceil,Bg=Ws.ReactCurrentDispatcher,C_=Ws.ReactCurrentOwner,Zi=Ws.ReactCurrentBatchConfig,$t=0,dr=null,zn=null,Ar=0,Ci=0,ad=$a(0),Qn=0,Vh=null,Gl=0,F0=0,j_=0,wh=null,ri=null,N_=0,Ed=1/0,xs=null,Lg=!1,Nw=null,Ta=null,vp=!1,_a=null,Rg=0,_h=0,Ew=null,ng=-1,rg=0;function Wr(){return $t&6?On():ng!==-1?ng:ng=On()}function Ia(e){return e.mode&1?$t&2&&Ar!==0?Ar&-Ar:kre.transition!==null?(rg===0&&(rg=VB()),rg):(e=Yt,e!==0||(e=window.event,e=e===void 0?16:YB(e.type)),e):1}function Ao(e,n,i,s){if(50<_h)throw _h=0,Ew=null,Error(ze(185));cm(e,i,s),(!($t&2)||e!==dr)&&(e===dr&&(!($t&2)&&(F0|=i),Qn===4&&xa(e,Ar)),li(e,s),i===1&&$t===0&&!(n.mode&1)&&(Ed=On()+500,B0&&Va()))}function li(e,n){var i=e.callbackNode;kne(e,n);var s=vg(e,e===dr?Ar:0);if(s===0)i!==null&&TT(i),e.callbackNode=null,e.callbackPriority=0;else if(n=s&-s,e.callbackPriority!==n){if(i!=null&&TT(i),n===1)e.tag===0?bre(_I.bind(null,e)):f8(_I.bind(null,e)),mre(function(){!($t&6)&&Va()}),i=null;else{switch(UB(s)){case 1:i=X1;break;case 4:i=FB;break;case 16:i=xg;break;case 536870912:i=$B;break;default:i=xg}i=hL(i,oL.bind(null,e))}e.callbackPriority=n,e.callbackNode=i}}function oL(e,n){if(ng=-1,rg=0,$t&6)throw Error(ze(327));var i=e.callbackNode;if(bd()&&e.callbackNode!==i)return null;var s=vg(e,e===dr?Ar:0);if(s===0)return null;if(s&30||s&e.expiredLanes||n)n=zg(e,s);else{n=s;var d=$t;$t|=2;var h=aL();(dr!==e||Ar!==n)&&(xs=null,Ed=On()+500,Bl(e,n));do try{Rre();break}catch(g){sL(e,g)}while(!0);h_(),Bg.current=h,$t=d,zn!==null?n=0:(dr=null,Ar=0,n=Qn)}if(n!==0){if(n===2&&(d=tw(e),d!==0&&(s=d,n=Sw(e,d))),n===1)throw i=Vh,Bl(e,0),xa(e,s),li(e,On()),i;if(n===6)xa(e,s);else{if(d=e.current.alternate,!(s&30)&&!Bre(d)&&(n=zg(e,s),n===2&&(h=tw(e),h!==0&&(s=h,n=Sw(e,h))),n===1))throw i=Vh,Bl(e,0),xa(e,s),li(e,On()),i;switch(e.finishedWork=d,e.finishedLanes=s,n){case 0:case 1:throw Error(ze(345));case 2:vl(e,ri,xs);break;case 3:if(xa(e,s),(s&130023424)===s&&(n=N_+500-On(),10<n)){if(vg(e,0)!==0)break;if(d=e.suspendedLanes,(d&s)!==s){Wr(),e.pingedLanes|=e.suspendedLanes&d;break}e.timeoutHandle=cw(vl.bind(null,e,ri,xs),n);break}vl(e,ri,xs);break;case 4:if(xa(e,s),(s&4194240)===s)break;for(n=e.eventTimes,d=-1;0<s;){var f=31-_o(s);h=1<<f,f=n[f],f>d&&(d=f),s&=~h}if(s=d,s=On()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*Ore(s/1960))-s,10<s){e.timeoutHandle=cw(vl.bind(null,e,ri,xs),s);break}vl(e,ri,xs);break;case 5:vl(e,ri,xs);break;default:throw Error(ze(329))}}}return li(e,On()),e.callbackNode===i?oL.bind(null,e):null}function Sw(e,n){var i=wh;return e.current.memoizedState.isDehydrated&&(Bl(e,n).flags|=256),e=zg(e,n),e!==2&&(n=ri,ri=i,n!==null&&Dw(n)),e}function Dw(e){ri===null?ri=e:ri.push.apply(ri,e)}function Bre(e){for(var n=e;;){if(n.flags&16384){var i=n.updateQueue;if(i!==null&&(i=i.stores,i!==null))for(var s=0;s<i.length;s++){var d=i[s],h=d.getSnapshot;d=d.value;try{if(!jo(h(),d))return!1}catch{return!1}}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function xa(e,n){for(n&=~j_,n&=~F0,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var i=31-_o(n),s=1<<i;e[i]=-1,n&=~s}}function _I(e){if($t&6)throw Error(ze(327));bd();var n=vg(e,0);if(!(n&1))return li(e,On()),null;var i=zg(e,n);if(e.tag!==0&&i===2){var s=tw(e);s!==0&&(n=s,i=Sw(e,s))}if(i===1)throw i=Vh,Bl(e,0),xa(e,n),li(e,On()),i;if(i===6)throw Error(ze(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,vl(e,ri,xs),li(e,On()),null}function E_(e,n){var i=$t;$t|=1;try{return e(n)}finally{$t=i,$t===0&&(Ed=On()+500,B0&&Va())}}function ql(e){_a!==null&&_a.tag===0&&!($t&6)&&bd();var n=$t;$t|=1;var i=Zi.transition,s=Yt;try{if(Zi.transition=null,Yt=1,e)return e()}finally{Yt=s,Zi.transition=i,$t=n,!($t&6)&&Va()}}function S_(){Ci=ad.current,fn(ad)}function Bl(e,n){e.finishedWork=null,e.finishedLanes=0;var i=e.timeoutHandle;if(i!==-1&&(e.timeoutHandle=-1,hre(i)),zn!==null)for(i=zn.return;i!==null;){var s=i;switch(c_(s),s.tag){case 1:s=s.type.childContextTypes,s!=null&&jg();break;case 3:jd(),fn(si),fn(Or),k_();break;case 5:b_(s);break;case 4:jd();break;case 13:fn(vn);break;case 19:fn(vn);break;case 10:m_(s.type._context);break;case 22:case 23:S_()}i=i.return}if(dr=e,zn=e=Ma(e.current,null),Ar=Ci=n,Qn=0,Vh=null,j_=F0=Gl=0,ri=wh=null,Sl!==null){for(n=0;n<Sl.length;n++)if(i=Sl[n],s=i.interleaved,s!==null){i.interleaved=null;var d=s.next,h=i.pending;if(h!==null){var f=h.next;h.next=d,s.next=f}i.pending=s}Sl=null}return e}function sL(e,n){do{var i=zn;try{if(h_(),Xp.current=Og,Pg){for(var s=wn.memoizedState;s!==null;){var d=s.queue;d!==null&&(d.pending=null),s=s.next}Pg=!1}if(Hl=0,cr=Kn=wn=null,xh=!1,zh=0,C_.current=null,i===null||i.return===null){Qn=1,Vh=n,zn=null;break}e:{var h=e,f=i.return,g=i,p=n;if(n=Ar,g.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){var x=p,y=g,v=y.tag;if(!(y.mode&1)&&(v===0||v===11||v===15)){var w=y.alternate;w?(y.updateQueue=w.updateQueue,y.memoizedState=w.memoizedState,y.lanes=w.lanes):(y.updateQueue=null,y.memoizedState=null)}var C=dI(f);if(C!==null){C.flags&=-257,uI(C,f,g,h,n),C.mode&1&&cI(h,x,n),n=C,p=x;var E=n.updateQueue;if(E===null){var S=new Set;S.add(p),n.updateQueue=S}else E.add(p);break e}else{if(!(n&1)){cI(h,x,n),D_();break e}p=Error(ze(426))}}else if(kn&&g.mode&1){var D=dI(f);if(D!==null){!(D.flags&65536)&&(D.flags|=256),uI(D,f,g,h,n),d_(Nd(p,g));break e}}h=p=Nd(p,g),Qn!==4&&(Qn=2),wh===null?wh=[h]:wh.push(h),h=f;do{switch(h.tag){case 3:h.flags|=65536,n&=-n,h.lanes|=n;var I=U8(h,p,n);rI(h,I);break e;case 1:g=p;var M=h.type,B=h.stateNode;if(!(h.flags&128)&&(typeof M.getDerivedStateFromError=="function"||B!==null&&typeof B.componentDidCatch=="function"&&(Ta===null||!Ta.has(B)))){h.flags|=65536,n&=-n,h.lanes|=n;var R=W8(h,g,n);rI(h,R);break e}}h=h.return}while(h!==null)}cL(i)}catch(F){n=F,zn===i&&i!==null&&(zn=i=i.return);continue}break}while(!0)}function aL(){var e=Bg.current;return Bg.current=Og,e===null?Og:e}function D_(){(Qn===0||Qn===3||Qn===2)&&(Qn=4),dr===null||!(Gl&268435455)&&!(F0&268435455)||xa(dr,Ar)}function zg(e,n){var i=$t;$t|=2;var s=aL();(dr!==e||Ar!==n)&&(xs=null,Bl(e,n));do try{Lre();break}catch(d){sL(e,d)}while(!0);if(h_(),$t=i,Bg.current=s,zn!==null)throw Error(ze(261));return dr=null,Ar=0,Qn}function Lre(){for(;zn!==null;)lL(zn)}function Rre(){for(;zn!==null&&!cne();)lL(zn)}function lL(e){var n=uL(e.alternate,e,Ci);e.memoizedProps=e.pendingProps,n===null?cL(e):zn=n,C_.current=null}function cL(e){var n=e;do{var i=n.alternate;if(e=n.return,n.flags&32768){if(i=Tre(i,n),i!==null){i.flags&=32767,zn=i;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qn=6,zn=null;return}}else if(i=Dre(i,n,Ci),i!==null){zn=i;return}if(n=n.sibling,n!==null){zn=n;return}zn=n=e}while(n!==null);Qn===0&&(Qn=5)}function vl(e,n,i){var s=Yt,d=Zi.transition;try{Zi.transition=null,Yt=1,zre(e,n,i,s)}finally{Zi.transition=d,Yt=s}return null}function zre(e,n,i,s){do bd();while(_a!==null);if($t&6)throw Error(ze(327));i=e.finishedWork;var d=e.finishedLanes;if(i===null)return null;if(e.finishedWork=null,e.finishedLanes=0,i===e.current)throw Error(ze(177));e.callbackNode=null,e.callbackPriority=0;var h=i.lanes|i.childLanes;if(yne(e,h),e===dr&&(zn=dr=null,Ar=0),!(i.subtreeFlags&2064)&&!(i.flags&2064)||vp||(vp=!0,hL(xg,function(){return bd(),null})),h=(i.flags&15990)!==0,i.subtreeFlags&15990||h){h=Zi.transition,Zi.transition=null;var f=Yt;Yt=1;var g=$t;$t|=4,C_.current=null,Mre(e,i),rL(i,e),ore(aw),wg=!!sw,aw=sw=null,e.current=i,Pre(i),dne(),$t=g,Yt=f,Zi.transition=h}else e.current=i;if(vp&&(vp=!1,_a=e,Rg=d),h=e.pendingLanes,h===0&&(Ta=null),mne(i.stateNode),li(e,On()),n!==null)for(s=e.onRecoverableError,i=0;i<n.length;i++)d=n[i],s(d.value,{componentStack:d.stack,digest:d.digest});if(Lg)throw Lg=!1,e=Nw,Nw=null,e;return Rg&1&&e.tag!==0&&bd(),h=e.pendingLanes,h&1?e===Ew?_h++:(_h=0,Ew=e):_h=0,Va(),null}function bd(){if(_a!==null){var e=UB(Rg),n=Zi.transition,i=Yt;try{if(Zi.transition=null,Yt=16>e?16:e,_a===null)var s=!1;else{if(e=_a,_a=null,Rg=0,$t&6)throw Error(ze(331));var d=$t;for($t|=4,ct=e.current;ct!==null;){var h=ct,f=h.child;if(ct.flags&16){var g=h.deletions;if(g!==null){for(var p=0;p<g.length;p++){var x=g[p];for(ct=x;ct!==null;){var y=ct;switch(y.tag){case 0:case 11:case 15:vh(8,y,h)}var v=y.child;if(v!==null)v.return=y,ct=v;else for(;ct!==null;){y=ct;var w=y.sibling,C=y.return;if(eL(y),y===x){ct=null;break}if(w!==null){w.return=C,ct=w;break}ct=C}}}var E=h.alternate;if(E!==null){var S=E.child;if(S!==null){E.child=null;do{var D=S.sibling;S.sibling=null,S=D}while(S!==null)}}ct=h}}if(h.subtreeFlags&2064&&f!==null)f.return=h,ct=f;else e:for(;ct!==null;){if(h=ct,h.flags&2048)switch(h.tag){case 0:case 11:case 15:vh(9,h,h.return)}var I=h.sibling;if(I!==null){I.return=h.return,ct=I;break e}ct=h.return}}var M=e.current;for(ct=M;ct!==null;){f=ct;var B=f.child;if(f.subtreeFlags&2064&&B!==null)B.return=f,ct=B;else e:for(f=M;ct!==null;){if(g=ct,g.flags&2048)try{switch(g.tag){case 0:case 11:case 15:z0(9,g)}}catch(F){En(g,g.return,F)}if(g===f){ct=null;break e}var R=g.sibling;if(R!==null){R.return=g.return,ct=R;break e}ct=g.return}}if($t=d,Va(),Jo&&typeof Jo.onPostCommitFiberRoot=="function")try{Jo.onPostCommitFiberRoot(T0,e)}catch{}s=!0}return s}finally{Yt=i,Zi.transition=n}}return!1}function AI(e,n,i){n=Nd(i,n),n=U8(e,n,1),e=Da(e,n,1),n=Wr(),e!==null&&(cm(e,1,n),li(e,n))}function En(e,n,i){if(e.tag===3)AI(e,e,i);else for(;n!==null;){if(n.tag===3){AI(n,e,i);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ta===null||!Ta.has(s))){e=Nd(i,e),e=W8(n,e,1),n=Da(n,e,1),e=Wr(),n!==null&&(cm(n,1,e),li(n,e));break}}n=n.return}}function Fre(e,n,i){var s=e.pingCache;s!==null&&s.delete(n),n=Wr(),e.pingedLanes|=e.suspendedLanes&i,dr===e&&(Ar&i)===i&&(Qn===4||Qn===3&&(Ar&130023424)===Ar&&500>On()-N_?Bl(e,0):j_|=i),li(e,n)}function dL(e,n){n===0&&(e.mode&1?(n=up,up<<=1,!(up&130023424)&&(up=4194304)):n=1);var i=Wr();e=Os(e,n),e!==null&&(cm(e,n,i),li(e,i))}function $re(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),dL(e,i)}function Vre(e,n){var i=0;switch(e.tag){case 13:var s=e.stateNode,d=e.memoizedState;d!==null&&(i=d.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(ze(314))}s!==null&&s.delete(n),dL(e,i)}var uL;uL=function(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps||si.current)ii=!0;else{if(!(e.lanes&i)&&!(n.flags&128))return ii=!1,Sre(e,n,i);ii=!!(e.flags&131072)}else ii=!1,kn&&n.flags&1048576&&p8(n,Sg,n.index);switch(n.lanes=0,n.tag){case 2:var s=n.type;tg(e,n),e=n.pendingProps;var d=_d(n,Or.current);gd(n,i),d=x_(null,n,s,e,d,i);var h=v_();return n.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,ai(s)?(h=!0,Ng(n)):h=!1,n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,p_(n),d.updater=R0,n.stateNode=d,d._reactInternals=n,gw(n,s,e,i),n=yw(null,n,s,!0,h,i)):(n.tag=0,kn&&h&&l_(n),Fr(null,n,d,i),n=n.child),n;case 16:s=n.elementType;e:{switch(tg(e,n),e=n.pendingProps,d=s._init,s=d(s._payload),n.type=s,d=n.tag=Wre(s),e=bo(s,e),d){case 0:n=kw(null,n,s,e,i);break e;case 1:n=fI(null,n,s,e,i);break e;case 11:n=hI(null,n,s,e,i);break e;case 14:n=mI(null,n,s,bo(s.type,e),i);break e}throw Error(ze(306,s,""))}return n;case 0:return s=n.type,d=n.pendingProps,d=n.elementType===s?d:bo(s,d),kw(e,n,s,d,i);case 1:return s=n.type,d=n.pendingProps,d=n.elementType===s?d:bo(s,d),fI(e,n,s,d,i);case 3:e:{if(K8(n),e===null)throw Error(ze(387));s=n.pendingProps,h=n.memoizedState,d=h.element,v8(e,n),Ig(n,s,null,i);var f=n.memoizedState;if(s=f.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:f.cache,pendingSuspenseBoundaries:f.pendingSuspenseBoundaries,transitions:f.transitions},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){d=Nd(Error(ze(423)),n),n=pI(e,n,s,i,d);break e}else if(s!==d){d=Nd(Error(ze(424)),n),n=pI(e,n,s,i,d);break e}else for(Ei=Sa(n.stateNode.containerInfo.firstChild),Di=n,kn=!0,yo=null,i=y8(n,null,s,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Ad(),s===d){n=Bs(e,n,i);break e}Fr(e,n,s,i)}n=n.child}return n;case 5:return w8(n),e===null&&mw(n),s=n.type,d=n.pendingProps,h=e!==null?e.memoizedProps:null,f=d.children,lw(s,d)?f=null:h!==null&&lw(s,h)&&(n.flags|=32),q8(e,n),Fr(e,n,f,i),n.child;case 6:return e===null&&mw(n),null;case 13:return Y8(e,n,i);case 4:return g_(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=Cd(n,null,s,i):Fr(e,n,s,i),n.child;case 11:return s=n.type,d=n.pendingProps,d=n.elementType===s?d:bo(s,d),hI(e,n,s,d,i);case 7:return Fr(e,n,n.pendingProps,i),n.child;case 8:return Fr(e,n,n.pendingProps.children,i),n.child;case 12:return Fr(e,n,n.pendingProps.children,i),n.child;case 10:e:{if(s=n.type._context,d=n.pendingProps,h=n.memoizedProps,f=d.value,cn(Dg,s._currentValue),s._currentValue=f,h!==null)if(jo(h.value,f)){if(h.children===d.children&&!si.current){n=Bs(e,n,i);break e}}else for(h=n.child,h!==null&&(h.return=n);h!==null;){var g=h.dependencies;if(g!==null){f=h.child;for(var p=g.firstContext;p!==null;){if(p.context===s){if(h.tag===1){p=Ss(-1,i&-i),p.tag=2;var x=h.updateQueue;if(x!==null){x=x.shared;var y=x.pending;y===null?p.next=p:(p.next=y.next,y.next=p),x.pending=p}}h.lanes|=i,p=h.alternate,p!==null&&(p.lanes|=i),fw(h.return,i,n),g.lanes|=i;break}p=p.next}}else if(h.tag===10)f=h.type===n.type?null:h.child;else if(h.tag===18){if(f=h.return,f===null)throw Error(ze(341));f.lanes|=i,g=f.alternate,g!==null&&(g.lanes|=i),fw(f,i,n),f=h.sibling}else f=h.child;if(f!==null)f.return=h;else for(f=h;f!==null;){if(f===n){f=null;break}if(h=f.sibling,h!==null){h.return=f.return,f=h;break}f=f.return}h=f}Fr(e,n,d.children,i),n=n.child}return n;case 9:return d=n.type,s=n.pendingProps.children,gd(n,i),d=Ji(d),s=s(d),n.flags|=1,Fr(e,n,s,i),n.child;case 14:return s=n.type,d=bo(s,n.pendingProps),d=bo(s.type,d),mI(e,n,s,d,i);case 15:return H8(e,n,n.type,n.pendingProps,i);case 17:return s=n.type,d=n.pendingProps,d=n.elementType===s?d:bo(s,d),tg(e,n),n.tag=1,ai(s)?(e=!0,Ng(n)):e=!1,gd(n,i),V8(n,s,d),gw(n,s,d,i),yw(null,n,s,!0,e,i);case 19:return Q8(e,n,i);case 22:return G8(e,n,i)}throw Error(ze(156,n.tag))};function hL(e,n){return zB(e,n)}function Ure(e,n,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 10,069 bytes, line 41
41ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ki(e,n,i,s){return new Ure(e,n,i,s)}function T_(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wre(e){if(typeof e=="function")return T_(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Q1)return 11;if(e===Z1)return 14}return 2}function Ma(e,n){var i=e.alternate;return i===null?(i=Ki(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&14680064,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function ig(e,n,i,s,d,h){var f=2;if(s=e,typeof e=="function")T_(e)&&(f=1);else if(typeof e=="string")f=5;else e:switch(e){case Zc:return Ll(i.children,d,h,n);case Y1:f=8,d|=8;break;case Fv:return e=Ki(12,i,n,d|2),e.elementType=Fv,e.lanes=h,e;case $v:return e=Ki(13,i,n,d),e.elementType=$v,e.lanes=h,e;case Vv:return e=Ki(19,i,n,d),e.elementType=Vv,e.lanes=h,e;case wB:return $0(i,d,h,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xB:f=10;break e;case vB:f=9;break e;case Q1:f=11;break e;case Z1:f=14;break e;case pa:f=16,s=null;break e}throw Error(ze(130,e==null?e:typeof e,""))}return n=Ki(f,i,n,d),n.elementType=e,n.type=s,n.lanes=h,n}function Ll(e,n,i,s){return e=Ki(7,e,s,n),e.lanes=i,e}function $0(e,n,i,s){return e=Ki(22,e,s,n),e.elementType=wB,e.lanes=i,e.stateNode={isHidden:!1},e}function Fx(e,n,i){return e=Ki(6,e,null,n),e.lanes=i,e}function $x(e,n,i){return n=Ki(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Hre(e,n,i,s,d){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vx(0),this.expirationTimes=vx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vx(0),this.identifierPrefix=s,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function I_(e,n,i,s,d,h,f,g,p){return e=new Hre(e,n,i,g,p),n===1?(n=1,h===!0&&(n|=8)):n=0,h=Ki(3,null,null,n),e.current=h,h.stateNode=e,h.memoizedState={element:s,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},p_(h),e}function Gre(e,n,i){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Qc,key:s==null?null:""+s,children:e,containerInfo:n,implementation:i}}function mL(e){if(!e)return La;e=e._reactInternals;e:{if(oc(e)!==e||e.tag!==1)throw Error(ze(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(ai(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(ze(171))}if(e.tag===1){var i=e.type;if(ai(i))return m8(e,i,n)}return n}function fL(e,n,i,s,d,h,f,g,p){return e=I_(i,s,!0,e,d,h,f,g,p),e.context=mL(null),i=e.current,s=Wr(),d=Ia(i),h=Ss(s,d),h.callback=n??null,Da(i,h,d),e.current.lanes=d,cm(e,d,s),li(e,s),e}function V0(e,n,i,s){var d=n.current,h=Wr(),f=Ia(d);return i=mL(i),n.context===null?n.context=i:n.pendingContext=i,n=Ss(h,f),n.payload={element:e},s=s===void 0?null:s,s!==null&&(n.callback=s),e=Da(d,n,f),e!==null&&(Ao(e,d,f,h),Jp(e,d,f)),f}function Fg(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function CI(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function M_(e,n){CI(e,n),(e=e.alternate)&&CI(e,n)}function qre(){return null}var pL=typeof reportError=="function"?reportError:function(e){console.error(e)};function P_(e){this._internalRoot=e}U0.prototype.render=P_.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(ze(409));V0(e,n,null,null)};U0.prototype.unmount=P_.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;ql(function(){V0(null,e,null,null)}),n[Ps]=null}};function U0(e){this._internalRoot=e}U0.prototype.unstable_scheduleHydration=function(e){if(e){var n=GB();e={blockedOn:null,target:e,priority:n};for(var i=0;i<ya.length&&n!==0&&n<ya[i].priority;i++);ya.splice(i,0,e),i===0&&KB(e)}};function O_(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function W0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function jI(){}function Kre(e,n,i,s,d){if(d){if(typeof s=="function"){var h=s;s=function(){var x=Fg(f);h.call(x)}}var f=fL(n,s,e,0,null,!1,!1,"",jI);return e._reactRootContainer=f,e[Ps]=f.current,Ph(e.nodeType===8?e.parentNode:e),ql(),f}for(;d=e.lastChild;)e.removeChild(d);if(typeof s=="function"){var g=s;s=function(){var x=Fg(p);g.call(x)}}var p=I_(e,0,!1,null,null,!1,!1,"",jI);return e._reactRootContainer=p,e[Ps]=p.current,Ph(e.nodeType===8?e.parentNode:e),ql(function(){V0(n,p,i,s)}),p}function H0(e,n,i,s,d){var h=i._reactRootContainer;if(h){var f=h;if(typeof d=="function"){var g=d;d=function(){var p=Fg(f);g.call(p)}}V0(n,f,e,d)}else f=Kre(i,n,e,d,s);return Fg(f)}WB=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var i=ch(n.pendingLanes);i!==0&&(e_(n,i|1),li(n,On()),!($t&6)&&(Ed=On()+500,Va()))}break;case 13:ql(function(){var s=Os(e,1);if(s!==null){var d=Wr();Ao(s,e,1,d)}}),M_(e,1)}};t_=function(e){if(e.tag===13){var n=Os(e,134217728);if(n!==null){var i=Wr();Ao(n,e,134217728,i)}M_(e,134217728)}};HB=function(e){if(e.tag===13){var n=Ia(e),i=Os(e,n);if(i!==null){var s=Wr();Ao(i,e,n,s)}M_(e,n)}};GB=function(){return Yt};qB=function(e,n){var i=Yt;try{return Yt=e,n()}finally{Yt=i}};Jv=function(e,n,i){switch(n){case"input":if(Hv(e,i),n=i.name,i.type==="radio"&&n!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<i.length;n++){var s=i[n];if(s!==e&&s.form===e.form){var d=O0(s);if(!d)throw Error(ze(90));AB(s),Hv(s,d)}}}break;case"textarea":jB(e,i);break;case"select":n=i.value,n!=null&&hd(e,!!i.multiple,n,!1)}};MB=E_;PB=ql;var Yre={usingClientEntryPoint:!1,Events:[um,td,O0,TB,IB,E_]},qu={findFiberByHostInstance:El,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Qre={bundleType:qu.bundleType,version:qu.version,rendererPackageName:qu.rendererPackageName,rendererConfig:qu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ws.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=LB(e),e===null?null:e.stateNode},findFiberByHostInstance:qu.findFiberByHostInstance||qre,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wp.isDisabled&&wp.supportsFiber)try{T0=wp.inject(Qre),Jo=wp}catch{}}Pi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Yre;Pi.createPortal=function(e,n){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!O_(n))throw Error(ze(200));return Gre(e,n,null,i)};Pi.createRoot=function(e,n){if(!O_(e))throw Error(ze(299));var i=!1,s="",d=pL;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(d=n.onRecoverableError)),n=I_(e,1,!1,null,null,i,!1,s,d),e[Ps]=n.current,Ph(e.nodeType===8?e.parentNode:e),new P_(n)};Pi.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(ze(188)):(e=Object.keys(e).join(","),Error(ze(268,e)));return e=LB(n),e=e===null?null:e.stateNode,e};Pi.flushSync=function(e){return ql(e)};Pi.hydrate=function(e,n,i){if(!W0(n))throw Error(ze(200));return H0(null,e,n,!0,i)};Pi.hydrateRoot=function(e,n,i){if(!O_(e))throw Error(ze(405));var s=i!=null&&i.hydratedSources||null,d=!1,h="",f=pL;if(i!=null&&(i.unstable_strictMode===!0&&(d=!0),i.identifierPrefix!==void 0&&(h=i.identifierPrefix),i.onRecoverableError!==void 0&&(f=i.onRecoverableError)),n=fL(n,null,e,1,i??null,d,!1,h,f),e[Ps]=n.current,Ph(e),s)for(e=0;e<s.length;e++)i=s[e],d=i._getVersion,d=d(i._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[i,d]:n.mutableSourceEagerHydrationData.push(i,d);return new U0(n)};Pi.render=function(e,n,i){if(!W0(n))throw Error(ze(200));return H0(null,e,n,!1,i)};Pi.unmountComponentAtNode=function(e){if(!W0(e))throw Error(ze(40));return e._reactRootContainer?(ql(function(){H0(null,null,e,!1,function(){e._reactRootContainer=null,e[Ps]=null})}),!0):!1};Pi.unstable_batchedUpdates=E_;Pi.unstable_renderSubtreeIntoContainer=function(e,n,i,s){if(!W0(i))throw Error(ze(200));if(e==null||e._reactInternals===void 0)throw Error(ze(38));return H0(e,n,i,!1,s)};Pi.version="18.3.1-next-f1338f8080-20240426";function gL(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gL)}catch(e){console.error(e)}}gL(),gB.exports=Pi;var B_=gB.exports,NI=B_;Rv.createRoot=NI.createRoot,Rv.hydrateRoot=NI.hydrateRoot;const Zre="modulepreload",Jre=function(e){return"/"+e},EI={}
41,bt=function(n,i,s){let d=Promise.resolve();if(i&&i.length>0){document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),g=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));d=Promise.allSettled(i.map(p=>{if(p=Jre(p),p in EI)return;EI[p]=!0;const x=p.endsWith(".css"),y=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${y}`))return;const v=document.createElement("link");if(v.rel=x?"stylesheet":Zre,x||(v.as="script"),v.crossOrigin="",v.href=p,g&&v.setAttribute("nonce",g),document.head.appendChild(v),x)return new Promise((w,C)=>{v.addEventListener("load",w),v.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${p}`)))})}))}function h(f){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=f,window.dispatchEvent(g),!g.defaultPrevented)throw f}return d.then(f=>{for(const g of f||[])g.status==="rejected"&&h(g.reason);return n().catch(h)})};/** 42 * @remix-run/router v1.23.1 43 * 44 * Copyright (c) Remix Software Inc. 45 * 46 * This source code is licensed under the MIT license found in the 47 * LICENSE.md file in the root directory of this source tree. 48 * 49 * @license MIT 50 */function Uh(){return Uh=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Uh.apply(this,arguments)}var Aa;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Aa||(Aa={}));const SI="popstate";function Xre(e){e===void 0&&(e={});function n(s,d){let{pathname:h,search:f,hash:g}=s.location;return Tw("",{pathname:h,search:f,hash:g},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function i(s,d){return typeof d=="string"?d:$g(d)}return tie(n,i,null,e)}function Bn(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function L_(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function eie(){return Math.random().toString(36).substr(2,8)}function DI(e,n){return{usr:e.state,key:e.key,idx:n}}function Tw(e,n,i,s){return i===void 0&&(i=null),Uh({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?$d(n):n,{state:i,key:n&&n.key||s||eie()})}function $g(e){let{pathname:n="/",search:i="",hash:s=""}=e;return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function $d(e){let n={};if(e){let i=e.indexOf("#");i>=0&&(n.hash=e.substr(i),e=e.substr(0,i));let s=e.indexOf("?");s>=0&&(n.search=e.substr(s),e=e.substr(0,s)),e&&(n.pathname=e)}return n}function tie(e,n,i,s){s===void 0&&(s={});let{window:d=document.defaultView,v5Compat:h=!1}=s,f=d.history,g=Aa.Pop,p=null,x=y();x==null&&(x=0,f.replaceState(Uh({},f.state,{idx:x}),""));function y(){return(f.state||{idx:null}).idx}function v(){g=Aa.Pop;let D=y(),I=D==null?null:D-x;x=D,p&&p({action:g,location:S.location,delta:I})}function w(D,I){g=Aa.Push;let M=Tw(S.location,D,I);x=y()+1;let B=DI(M,x),R=S.createHref(M);try{f.pushState(B,"",R)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;d.location.assign(R)}h&&p&&p({action:g,location:S.location,delta:1})}function C(D,I){g=Aa.Replace;let M=Tw(S.location,D,I);x=y();let B=DI(M,x),R=S.createHref(M);f.replaceState(B,"",R),h&&p&&p({action:g,location:S.location,delta:0})}function E(D){let I=d.location.origin!=="null"?d.location.origin:d.location.href,M=typeof D=="str
50ing"?D:$g(D);return M=M.replace(/ $/,"%20"),Bn(I,"No window.location.(origin|href) available to create URL for href: "+M),new URL(M,I)}let S={get action(){return g},get location(){return e(d,f)},listen(D){if(p)throw new Error("A history only accepts one active listener");return d.addEventListener(SI,v),p=D,()=>{d.removeEventListener(SI,v),p=null}},createHref(D){return n(d,D)},createURL:E,encodeLocation(D){let I=E(D);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:w,replace:C,go(D){return f.go(D)}};return S}var TI;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(TI||(TI={}));function nie(e,n,i){return i===void 0&&(i="/"),rie(e,n,i)}function rie(e,n,i,s){let d=typeof n=="string"?$d(n):n,h=R_(d.pathname||"/",i);if(h==null)return null;let f=bL(e);iie(f);let g=null;for(let p=0;g==null&&p<f.length;++p){let x=gie(h);g=mie(f[p],x)}return g}function bL(e,n,i,s){n===void 0&&(n=[]),i===void 0&&(i=[]),s===void 0&&(s="");let d=(h,f,g)=>{let p={relativePath:g===void 0?h.path||"":g,caseSensitive:h.caseSensitive===!0,childrenIndex:f,route:h};p.relativePath.startsWith("/")&&(Bn(p.relativePath.startsWith(s),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(s.length));let x=Pa([s,p.relativePath]),y=i.concat(p);h.children&&h.children.length>0&&(Bn(h.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+x+'".')),bL(h.children,n,y,x)),!(h.path==null&&!h.index)&&n.push({path:x,score:uie(x,h.index),routesMeta:y})};return e.forEach((h,f)=>{var g;if(h.path===""||!((g=h.path)!=null&&g.includes("?")))d(h,f);else for(let p of kL(h.path))d(h,f,p)}),n}function kL(e){let n=e.split("/");if(n.length===0)return[];let[i,...s]=n,d=i.endsWith("?"),h=i.replace(/\?$/,"");if(s.length===0)return d?[h,""]:[h];let f=kL(s.join("/")),g=[];return g.push(...f.map(p=>p===""?h:[h,p].join("/"))),d&&g.push(...f),g.map(p=>e.startsWith("/")&&p===""?"/":p)}function iie(e){e.sort((n,i)=>n.score!==i.score?i.score-n.score:hie(n.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}const oie=/^:[\w-]+$/,sie=3,aie=2,lie=1,cie=10,die=-2,II=e=>e==="*";function uie(e,n){let i=e.split("/"),s=i.length;return i.some(II)&&(s+=die),n&&(s+=aie),i.filter(d=>!II(d)).reduce((d,h)=>d+(oie.test(h)?sie:h===""?lie:cie),s)}function hie(e,n){return e.length===n.length&&e.slice(0,-1).every((s,d)=>s===n[d])?e[e.length-1]-n[n.length-1]:0}function mie(e,n,i){let{routesMeta:s}=e,d={},h="/",f=[];for(let g=0;g<s.length;++g){let p=s[g],x=g===s.length-1,y=h==="/"?n:n.slice(h.length)||"/",v=fie({path:p.relativePath,caseSensitive:p.caseSensitive,end:x},y),w=p.route;if(!v)return null;
vendor: 5,158 bytes, lines 50-59
50Object.assign(d,v.params),f.push({params:d,pathname:Pa([h,v.pathname]),pathnameBase:vie(Pa([h,v.pathnameBase])),route:w}),v.pathnameBase!=="/"&&(h=Pa([h,v.pathnameBase]))}return f}function fie(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,s]=pie(e.path,e.caseSensitive,e.end),d=n.match(i);if(!d)return null;let h=d[0],f=h.replace(/(.)\/+$/,"$1"),g=d.slice(1);return{params:s.reduce((x,y,v)=>{let{paramName:w,isOptional:C}=y;if(w==="*"){let S=g[v]||"";f=h.slice(0,h.length-S.length).replace(/(.)\/+$/,"$1")}const E=g[v];return C&&!E?x[w]=void 0:x[w]=(E||"").replace(/%2F/g,"/"),x},{}),pathname:h,pathnameBase:f,pattern:e}}function pie(e,n,i){n===void 0&&(n=!1),i===void 0&&(i=!0),L_(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let s=[],d="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,g,p)=>(s.push({paramName:g,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(s.push({paramName:"*"}),d+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?d+="\\/*$":e!==""&&e!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,n?void 0:"i"),s]}function gie(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return L_(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),e}}function R_(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let i=n.endsWith("/")?n.length-1:n.length,s=e.charAt(i);return s&&s!=="/"?null:e.slice(i)||"/"}const bie=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,kie=e=>bie.test(e);function yie(e,n){n===void 0&&(n="/");let{pathname:i,search:s="",hash:d=""}=typeof e=="string"?$d(e):e,h;if(i)if(kie(i))h=i;else{if(i.includes("//")){let f=i;i=i.replace(/\/\/+/g,"/"),L_(!1,"Pathnames cannot have embedded double slashes - normalizing "+(f+" -> "+i))}i.startsWith("/")?h=MI(i.substring(1),"/"):h=MI(i,n)}else h=n;return{pathname:h,search:wie(s),hash:_ie(d)}}function MI(e,n){let i=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(d=>{d===".."?i.length>1&&i.pop():d!=="."&&i.push(d)}),i.length>1?i.join("/"):"/"}function Vx(e,n,i,s){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+i+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function xie(e){return e.filter((n,i)=>i===0||n.route.path&&n.route.path.length>0)}function z_(e,n){let i=xie(e);return n?i.map((s,d)=>d===i.length-1?s.pathname:s.pathnameBase):i.map(s=>s.pathnameBase)}function F_(e,n,i,s){s===void 0&&(s=!1);let d;typeof e=="string"?d=$d(e):(d=Uh({},e),Bn(!d.pathname||!d.pathname.includes("?"),Vx("?","pathname","search",d)),Bn(!d.pathname||!d.pathname.includes("#"),Vx("#","pathname","hash",d)),Bn(!d.search||!d.search.includes("#"),Vx("#","search","hash",d)));let h=e===""||d.pathname==="",f=h?"/":d.pathname,g;if(f==null)g=i;else{let v=n.length-1;if(!s&&f.startsWith("..")){let w=f.split("/");for(;w[0]==="..";)w.shift(),v-=1;d.pathname=w.join("/")}g=v>=0?n[v]:"/"}let p=yie(d,g),x=f&&f!=="/"&&f.endsWith("/"),y=(h||f===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(x||y)&&(p.pathname+="/"),p}const Pa=e=>e.join("/").replace(/\/\/+/g,"/"),vie=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),wie=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_ie=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Aie(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const yL=["post","put","patch","delete"];new Set(yL);const Cie=["get",...yL];new Set(Cie);/** 51 * React Router v6.30.2 52 * 53 * Copyright (c) Remix Software Inc. 54 * 55 * This source code is licensed under the MIT license found in the 56 * LICENSE.md file in the root directory of this source tree. 57 * 58 * @license MIT 59 */function Wh(){return Wh=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Wh.apply(this,arguments)}const $_=j.createContext(null),jie=j.createContext(null),Ua=j.createContext(null),G0=j.createContext(null),Hs=j.createContext({outlet:null,matches:[],isDataRoute:!1}),xL=j.createContext(null);function Nie(e,n){let{relative:i}=n===void 0?{}:n;Vd()||Bn(!1);let{basename:s,navigator:d}=j.useContext(Ua),{hash:h,pathname:f,search:g}=wL(e,{relative:i}),p=f;return s!=="/"&&(p=f==="/"?s:Pa([s,f])),d.createHref({pathname:p,search:g,hash:h})}function Vd(){return j.useContext(G0)!=null}function ro(){return Vd()||Bn(!1),j.useContext(G0).location}function vL(e){j.useContext(Ua).static||j.useLayoutEffect(e)}function Ot(){let{isDataRoute:e}=j.useContext(Hs);return e?Fie():Eie()}function Eie(){Vd()||Bn(!1);
vendor: 4,654 bytes, line 59
59let e=j.useContext($_),{basename:n,future:i,navigator:s}=j.useContext(Ua),{matches:d}=j.useContext(Hs),{pathname:h}=ro(),f=JSON.stringify(z_(d,i.v7_relativeSplatPath)),g=j.useRef(!1);return vL(()=>{g.current=!0}),j.useCallback(function(x,y){if(y===void 0&&(y={}),!g.current)return;if(typeof x=="number"){s.go(x);return}let v=F_(x,JSON.parse(f),h,y.relative==="path");e==null&&n!=="/"&&(v.pathname=v.pathname==="/"?n:Pa([n,v.pathname])),(y.replace?s.replace:s.push)(v,y.state,y)},[n,s,f,h,e])}function sc(){let{matches:e}=j.useContext(Hs),n=e[e.length-1];return n?n.params:{}}function wL(e,n){let{relative:i}=n===void 0?{}:n,{future:s}=j.useContext(Ua),{matches:d}=j.useContext(Hs),{pathname:h}=ro(),f=JSON.stringify(z_(d,s.v7_relativeSplatPath));return j.useMemo(()=>F_(e,JSON.parse(f),h,i==="path"),[e,f,h,i])}function Sie(e,n){return Die(e,n)}function Die(e,n,i,s){Vd()||Bn(!1);let{navigator:d}=j.useContext(Ua),{matches:h}=j.useContext(Hs),f=h[h.length-1],g=f?f.params:{};f&&f.pathname;let p=f?f.pathnameBase:"/";f&&f.route;let x=ro(),y;if(n){var v;let D=typeof n=="string"?$d(n):n;p==="/"||(v=D.pathname)!=null&&v.startsWith(p)||Bn(!1),y=D}else y=x;let w=y.pathname||"/",C=w;if(p!=="/"){let D=p.replace(/^\//,"").split("/");C="/"+w.replace(/^\//,"").split("/").slice(D.length).join("/")}let E=nie(e,{pathname:C}),S=Oie(E&&E.map(D=>Object.assign({},D,{params:Object.assign({},g,D.params),pathname:Pa([p,d.encodeLocation?d.encodeLocation(D.pathname).pathname:D.pathname]),pathnameBase:D.pathnameBase==="/"?p:Pa([p,d.encodeLocation?d.encodeLocation(D.pathnameBase).pathname:D.pathnameBase])})),h,i,s);return n&&S?j.createElement(G0.Provider,{value:{location:Wh({pathname:"/",search:"",hash:"",state:null,key:"default"},y),navigationType:Aa.Pop}},S):S}function Tie(){let e=zie(),n=Aie(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,d={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},n),i?j.createElement("pre",{style:d},i):null,null)}const Iie=j.createElement(Tie,null);class Mie extends j.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){console.error("React Router caught the following error during render",n,i)}render(){return this.state.error!==void 0?j.createElement(Hs.Provider,{value:this.props.routeContext},j.createElement(xL.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Pie(e){let{routeContext:n,match:i,children:s}=e,d=j.useContext($_);return d&&d.static&&d.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(d.staticContext._deepestRenderedBoundaryId=i.route.id),j.createElement(Hs.Provider,{value:n},s)}function Oie(e,n,i,s){var d;if(n===void 0&&(n=[]),i===void 0&&(i=null),s===void 0&&(s=null),e==null){var h;if(!i)return null;if(i.errors)e=i.matches;else if((h=s)!=null&&h.v7_partialHydration&&n.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let f=e,g=(d=i)==null?void 0:d.errors;if(g!=null){let y=f.findIndex(v=>v.route.id&&(g==null?void 0:g[v.route.id])!==void 0);y>=0||Bn(!1),f=f.slice(0,Math.min(f.length,y+1))}let p=!1,x=-1;if(i&&s&&s.v7_partialHydration)for(let y=0;y<f.length;y++){let v=f[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(x=y),v.route.id){let{loaderData:w,errors:C}=i,E=v.route.loader&&w[v.route.id]===void 0&&(!C||C[v.route.id]===void 0);if(v.route.lazy||E){p=!0,x>=0?f=f.slice(0,x+1):f=[f[0]];break}}}return f.reduceRight((y,v,w)=>{let C,E=!1,S=null,D=null;i&&(C=g&&v.route.id?g[v.route.id]:void 0,S=v.route.errorElement||Iie,p&&(x<0&&w===0?($ie("route-fallback"),E=!0,D=null):x===w&&(E=!0,D=v.route.hydrateFallbackElement||null)));let I=n.concat(f.slice(0,w+1)),M=()=>{let B;return C?B=S:E?B=D:v.route.Component?B=j.createElement(v.route.Component,null):v.route.element?B=v.route.element:B=y,j.createElement(Pie,{match:v,routeContext:{outlet:y,matches:I,isDataRoute:i!=null},children:B})};return i&&(v.route.ErrorBoundary||v.route.errorElement||w===0)?j.createElement(Mie,{location:i.location,revalidation:i.revalidation,component:S,error:C,children:M(),routeC
vendor: 2,440 bytes, line 59
59ontext:{outlet:null,matches:I,isDataRoute:!0}}):M()},null)}var _L=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(_L||{}),AL=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(AL||{});function Bie(e){let n=j.useContext($_);return n||Bn(!1),n}function Lie(e){let n=j.useContext(jie);return n||Bn(!1),n}function Rie(e){let n=j.useContext(Hs);return n||Bn(!1),n}function CL(e){let n=Rie(),i=n.matches[n.matches.length-1];return i.route.id||Bn(!1),i.route.id}function zie(){var e;let n=j.useContext(xL),i=Lie(),s=CL();return n!==void 0?n:(e=i.errors)==null?void 0:e[s]}function Fie(){let{router:e}=Bie(_L.UseNavigateStable),n=CL(AL.UseNavigateStable),i=j.useRef(!1);return vL(()=>{i.current=!0}),j.useCallback(function(d,h){h===void 0&&(h={}),i.current&&(typeof d=="number"?e.navigate(d):e.navigate(d,Wh({fromRouteId:n},h)))},[e,n])}const PI={};function $ie(e,n,i){PI[e]||(PI[e]=!0)}function Vie(e,n){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Pn(e){let{to:n,replace:i,state:s,relative:d}=e;Vd()||Bn(!1);let{future:h,static:f}=j.useContext(Ua),{matches:g}=j.useContext(Hs),{pathname:p}=ro(),x=Ot(),y=F_(n,z_(g,h.v7_relativeSplatPath),p,d==="path"),v=JSON.stringify(y);return j.useEffect(()=>x(JSON.parse(v),{replace:i,state:s,relative:d}),[x,v,d,i,s]),null}function Ee(e){Bn(!1)}function Uie(e){let{basename:n="/",children:i=null,location:s,navigationType:d=Aa.Pop,navigator:h,static:f=!1,future:g}=e;Vd()&&Bn(!1);let p=n.replace(/^\/*/,"/"),x=j.useMemo(()=>({basename:p,navigator:h,static:f,future:Wh({v7_relativeSplatPath:!1},g)}),[p,g,h,f]);typeof s=="string"&&(s=$d(s));let{pathname:y="/",search:v="",hash:w="",state:C=null,key:E="default"}=s,S=j.useMemo(()=>{let D=R_(y,p);return D==null?null:{location:{pathname:D,search:v,hash:w,state:C,key:E},navigationType:d}},[p,y,v,w,C,E,d]);return S==null?null:j.createElement(Ua.Provider,{value:x},j.createElement(G0.Provider,{children:i,value:S}))}function Wie(e){let{children:n,location:i}=e;return Sie(Iw(n),i)}new Promise(()=>{});function Iw(e,n){n===void 0&&(n=[]);let i=[];return j.Children.forEach(e,(s,d)=>
59{if(!j.isValidElement(s))return;let h=[...n,d];if(s.type===j.Fragment){i.push.apply(i,Iw(s.props.children,h));return}s.type!==Ee&&Bn(!1),!s.props.index||!s.props.children||Bn(!1);let f={id:s.props.id||h.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(f.children=Iw(s.props.children,h)),i.push(f)}),i}/** 60 * React Router DOM v6.30.2 61 * 62 * Copyright (c) Remix Software Inc. 63 * 64 * This source code is licensed under the MIT license found in the 65 * LICENSE.md file in the root directory of this source tree. 66 * 67 * @license MIT 68 */function Mw(){return Mw=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Mw.apply(this,arguments)}function Hie(e,n){if(e==null)return{};var i={},s=Object.keys(e),d,h;for(h=0;h<s.length;h++)d=s[h],!(n.indexOf(d)>=0)&&(i[d]=e[d]);return i}function Gie(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qie(e,n){return e.button===0&&(!n||n==="_self")&&!Gie(e)}function Pw(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,i)=>{let s=e[i];return n.concat(Array.isArray(s)?s.map(d=>[i,d]):[[i,s]])},[]))}function Kie(e,n){let i=Pw(e);return n&&n.forEach((s,d)=>{i.has(d)||n.getAll(d).forEach(h=>{i.append(d,h)})}),i}const Yie=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Qie="6";try{window.__reactRouterVersion=Qie}catch{}const Zie="startTransition",OI=fB[Zie];function Jie(e){let{basename:n,children:i,future:s,window:d}=e,h=j.useRef();h.current==null&&(h.current=Xre({window:d,v5Compat:!0}));let f=h.current,[g,p]=j.useState({action:f.action,location:f.location}),{v7_startTransition:x}=s||{},y=j.useCallback(v=>{x&&OI?OI(()=>p(v)):p(v)},[p,x]);return j.useLayoutEffect(()=>f.listen(y),[f,y]),j.useEffect(()=>Vie(s),[s]),j.createElement(Uie,{basename:n,children:i,location:g.location,navigationType:g.action,navigator:f,future:s})}const Xie=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",eoe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Fn=j.forwardRef(function(n,i){let{onClick:s,relative:d,reloadDocument:h,replace:f,state:g,target:p,to:x,preventScrollReset:y,viewTransition:v}=n,w=Hie(n,Yie),{basename:C}=j.useContext(Ua),E,S=!1;if(typeof x=="string"&&eoe.test(x)&&(E=x,Xie))try{let B=new URL(window.location.href),R=x.startsWith("//")?new URL(B.protocol+x):new URL(x),F=R_(R.pathname,C);R.origin===B.origin&&F!=null?x=F+R.search+R.hash:S=!0}catch{}let D=Nie(x,{relative:d}),I=toe(x,{replace:f,state:g,target:p,preventScrollReset:y,relative:d,viewTransition:v});function M(B){s&&s(B),B.defaultPrevented||I(B)}return j.createElement("a",Mw({},w,{href:E||D,onClick:S||h?s:M,ref:i,target:p}))});var BI;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(BI||(BI={}));var LI;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(LI||(LI={}));function toe(e,n){let{target:i,replace:s,state:d,preventScrollReset:h,relative:f,viewTransition:g}=n===void 0?{}:n,p=Ot(),x=ro(),y=wL(e,{relative:f});return j.useCallback(v=>{if(qie(v,i)){v.preventDefault();let w=s!==void 0?s:$g(x)===$g(y);p(e,{replace:w,state:d,preventScrollReset:h,relative:f,viewTransition:g})}},[x,p,y,s,d,i,e,h,f,g])}function Do(e){let n=j.useRef(Pw(e)),i=j.useRef(!1),s=ro(),d=j.useMemo(()=>Kie(s.search,i.current?null:n.current),[s.search]),h=Ot(),f=j.useCallback((g,p)=>{const x=Pw(typeof g=="function"?g(d):g);i.current=!0,h("?"+x,p)},[h,d]);return[d,f]}const noe={},RI=e=>{let n;const i=new Set,s=(y,v)=>{const w=typeof y=="function"?y(n):y;if(!Object.is(w,n)){const C=n;n=v??(typeof w!="object"||w===null)?w:Object.assign({}
68,n,w),i.forEach(E=>E(n,C))}},d=()=>n,p={setState:s,getState:d,getInitialState:()=>x,subscribe:y=>(i.add(y),()=>i.delete(y)),destroy:()=>{(noe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),i.clear()}},x=n=e(s,d,p);return p},roe=e=>e?RI(e):RI;var jL={exports:{}},NL={},EL={exports:{}},SL={};/** 69 * @license React 70 * use-sync-external-store-shim.production.js 71 * 72 * Copyright (c) Meta Platforms, Inc. and affiliates. 73 * 74 * This source code is licensed under the MIT license found in the 75 * LICENSE file in the root directory of this source tree. 76 */var Sd=j;function ioe(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var ooe=typeof Object.is=="function"?Object.is:ioe,soe=Sd.useState,aoe=Sd.useEffect,loe=Sd.useLayoutEffect,coe=Sd.useDebugValue;function doe(e,n){var i=n(),s=soe({inst:{value:i,getSnapshot:n}}),d=s[0].inst,h=s[1];return loe(function(){d.value=i,d.getSnapshot=n,Ux(d)&&h({inst:d})},[e,i,n]),aoe(function(){return Ux(d)&&h({inst:d}),e(function(){Ux(d)&&h({inst:d})})},[e]),coe(i),i}function Ux(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!ooe(e,i)}catch{return!0}}function uoe(e,n){return n()}var hoe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?uoe:doe;SL.useSyncExternalStore=Sd.useSyncExternalStore!==void 0?Sd.useSyncExternalStore:hoe;EL.exports=SL;var moe=EL.exports;/** 77 * @license React 78 * use-sync-external-store-shim/with-selector.production.js 79 * 80 * Copyright (c) Meta Platforms, Inc. and affiliates. 81 * 82 * This source code is licensed under the MIT license found in the 83 * LICENSE file in the root directory of this source tree. 84 */var q0=j,foe=moe;function poe(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var goe=typeof Object.is=="function"?Object.is:poe,boe=foe.useSyncExternalStore,koe=q0.useRef,yoe=q0.useEffect,xoe=q0.useMemo,voe=q0.useDebugValue;NL.useSyncExternalStoreWithSelector=function(e,n,i,s,d){var h=koe(null);if(h.current===null){var f={hasValue:!1,value:null};h.current=f}else f=h.current;h=xoe(function(){function p(C){if(!x){if(x=!0,y=C,C=s(C),d!==void 0&&f.hasValue){var E=f.value;if(d(E,C))return v=E}return v=C}if(E=v,goe(y,C))return E;var S=s(C);return d!==void 0&&d(E,S)?(y=C,E):(y=C,v=S)}var x=!1,y,v,w=i===void 0?null:i;return[function(){return p(n())},w===null?void 0:function(){return p(w())}]},[n,i,s,d]);var g=boe(e,h[0],h[1]);return yoe(function(){f.hasValue=!0,f.value=g},[g]),voe(g),g};jL.exports=NL;var DL=jL.exports;const woe=os(DL),TL={},{useDebugValue:_oe}=Rd,{useSyncExternalStoreWithSelector:Aoe}=woe;let zI=!1;const Coe=e=>e;function joe(e,n=Coe,i){(TL?"production":void 0)!=="production"&&i&&!zI&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),zI=!0);const s=Aoe(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,i);return _oe(s),s}const FI=e=>{(TL?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const n=typeof e=="function"?roe(e):e,i=(s,d)=>joe(n,s,d);return Object.assign(i,n),i},K0=e=>e?FI(e):FI,Noe={};function V_(e,n){let i;try{i=e()}catch{return}return{getItem:d=>{var h;const f=p=>p===null?null:JSON.parse(p,void 0),g=(h=i.getItem(d))!=null?h:null;return g instanceof Promise?g.then(f):f(g)},setItem:(d,h)=>i.setItem(d,JSON.stringify(h,void 0)),removeItem:d=>i.removeItem(d)}}const Hh=e=>n=>{try{const i=e(n);return i instanceof Promise?i:{then(s){return Hh(s)(i)},catch(s){return this}}}catch(i){return{then(s){return this},catch(s){return Hh(s)(i)}}}},Eoe=(e,n)=>(i,s,d)=>{let h={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:D=>D,version:0,merge:(D,I)=>({...I,...D}),...n},f=!1;const g=new Set,p=new Set;let x;try{x=h.getStorage()}catch{}if(!x)return e((...D)=>{console.warn(`[zustand persist middleware] Unable to update item '${h.name}', the given storage is currently unavailable.`),i(...D)},s,d);const y=Hh(h.serialize),v=()=>{const D=h.partialize({...s()});let I;const M=y({state:D,version:h.version}).then(B=>x.setItem(h.name,B)).catch(B=>{I=B});if(I)throw I;return M},w=d.setState;d.setState=(D,I)=>{w(D,I),v()};const C=e((...D)=>{i(...D),v()},s,d);let E;const S=()=>{var D;if(!x)return;f=!1,g.forEach(M=>M(s()));const I=((D=h.onRehydrateStorage)==null?void 0:D.call(h,s()))||void 0;return Hh(x.getItem.bind(x))(h.name).then(M=>
84{if(M)return h.deserialize(M)}).then(M=>{if(M)if(typeof M.version=="number"&&M.version!==h.version){if(h.migrate)return h.migrate(M.state,M.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return M.state}).then(M=>{var B;return E=h.merge(M,(B=s())!=null?B:C),i(E,!0),v()}).then(()=>{I==null||I(E,void 0),f=!0,p.forEach(M=>M(E))}).catch(M=>{I==null||I(void 0,M)})};return d.persist={setOptions:D=>{h={...h,...D},D.getStorage&&(x=D.getStorage())},clearStorage:()=>{x==null||x.removeItem(h.name)},getOptions:()=>h,rehydrate:()=>S(),hasHydrated:()=>f,onHydrate:D=>(g.add(D),()=>{g.delete(D)}),onFinishHydration:D=>(p.add(D),()=>{p.delete(D)})},S(),E||C},Soe=(e,n)=>(i,s,d)=>{let h={storage:V_(()=>localStorage),partialize:S=>S,version:0,merge:(S,D)=>({...D,...S}),...n},f=!1;const g=new Set,p=new Set;let x=h.storage;if(!x)return e((...S)=>{console.warn(`[zustand persist middleware] Unable to update item '${h.name}', the given storage is currently unavailable.`),i(...S)},s,d);const y=()=>{const S=h.partialize({...s()});return x.setItem(h.name,{state:S,version:h.version})},v=d.setState;d.setState=(S,D)=>{v(S,D),y()};const w=e((...S)=>{i(...S),y()},s,d);d.getInitialState=()=>w;let C;const E=()=>{var S,D;if(!x)return;f=!1,g.forEach(M=>{var B;return M((B=s())!=null?B:w)});const I=((D=h.onRehydrateStorage)==null?void 0:D.call(h,(S=s())!=null?S:w))||void 0;return Hh(x.getItem.bind(x))(h.name).then(M=>{if(M)if(typeof M.version=="number"&&M.version!==h.version){if(h.migrate)return[!0,h.migrate(M.state,M.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,M.state];return[!1,void 0]}).then(M=>{var B;const[R,F]=M;if(C=h.merge(F,(B=s())!=null?B:w),i(C,!0),R)return y()}).then(()=>{I==null||I(C,void 0),C=s(),f=!0,p.forEach(M=>M(C))}).catch(M=>{I==null||I(void 0,M)})};return d.persist={setOptions:S=>{h={...h,...S},S.storage&&(x=S.storage)},clearStorage:()=>{x==null||x.removeItem(h.name)},getOptions:()=>h,rehydrate:()=>E(),hasHydrated:()=>f,onHydrate:S=>(g.add(S),()=>{g.delete(S)}),onFinishHydration:S=>(p.add(S),()=>{p.delete(S)})},h.skipHydration||E(),C||w},Doe=(e,n)=>"getStorage"in n||"serialize"in n||"deserialize"in n?((Noe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Eoe(e,n)):Soe(e,n),IL=Doe;function ML(e,n){return function(){return e.apply(n,arguments)}}const{toString:Toe}=Object.prototype,{getPrototypeOf:U_}=Object,{iterator:Y0,toStringTag:PL}=Symbol,Q0=(e=>n=>{const i=Toe.call(n);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),To=e=>(e=e.toLowerCase(),n=>Q0(n)===e),Z0=e=>n=>typeof n===e,{isArray:Ud}=Array,Dd=Z0("undefined");function mm(e){return e!==null&&!Dd(e)&&e.constructor!==null&&!Dd(e.constructor)&&ci(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const OL=To("ArrayBuffer");function Ioe(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&OL(e.buffer),n}const Moe=Z0("string"),ci=Z0("function"),BL=Z0("number"),fm=e=>e!==null&&typeof e=="object",Poe=e=>e===!0||e===!1,og=e=>{if(Q0(e)!=="object")return!1;const n=U_(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(PL in e)&&!(Y0 in e)},Ooe=e=>{if(!fm(e)||mm(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Boe=To("Date"),Loe=To("File"),Roe=To("Blob"),zoe=To("FileList"),Foe=e=>fm(e)&&ci(e.pipe),$oe=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||ci(e.append)&&((n=Q0(e))==="formdata"||n==="object"&&ci(e.toString)&&e.toString()==="[object FormData]"))},Voe=To("URLSearchParams"),[Uoe,Woe,Hoe,Goe]=["ReadableStream","Request","Response","Headers"].map(To),qoe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pm(e,n,{allOwnKeys:i=!1}={}){if(e===null||typeof e>"u")return;let s,d;if(typeof e!="object"&&(e=[e]),Ud(e))for(s=0,d=e.length;s<d;s++)n.call(null,e[s],s,e);else{if(mm(e))return;const h=i?Object.getOwnPropertyNames(e):Object.keys(e),f=h.length;let g;for(s=0;s<f;s++)g=h[s],n.call(null,e[g],g,e)}}function LL(e,n){if(mm(e))return null;n=n.toLowerCase();const i=Object.keys(e);let s=i.length,d;for(;s-- >0;)if(d=i[s],n===d.toLowerCase())return d;return null}const Tl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,RL=e=>!Dd(e)&&e!==Tl;function Ow(){const{caseless:e,skipUndefined:n}=RL(this)&&this||{},i={},s=(d,h)=>{const f=e&&LL(i,h)||h;og(i[f])&&og(d)?i[f]=Ow(i[f],d):og(d)?i[f]=Ow({},d):Ud(d)?i[f]=d.slice():(!n||!Dd(d))&&(i[f]=d)};for(let d=0,h=arguments.length;d<h;d++)arguments[d]&&pm(arguments[d],s);return i}const Koe=(e,n,i,{allOwnKeys:s}={})=>(pm(n,(d,h)=>{i&&ci(d)?e[h]=ML(d,i):e[h]=d},{allOwnKeys:s}),e),Yoe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Qoe=(e,n,i,s)=>{e.prototype=Object.create(n.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:n.prototype}
vendor: 6,326 bytes, line 84
84),i&&Object.assign(e.prototype,i)},Zoe=(e,n,i,s)=>{let d,h,f;const g={};if(n=n||{},e==null)return n;do{for(d=Object.getOwnPropertyNames(e),h=d.length;h-- >0;)f=d[h],(!s||s(f,e,n))&&!g[f]&&(n[f]=e[f],g[f]=!0);e=i!==!1&&U_(e)}while(e&&(!i||i(e,n))&&e!==Object.prototype);return n},Joe=(e,n,i)=>{e=String(e),(i===void 0||i>e.length)&&(i=e.length),i-=n.length;const s=e.indexOf(n,i);return s!==-1&&s===i},Xoe=e=>{if(!e)return null;if(Ud(e))return e;let n=e.length;if(!BL(n))return null;const i=new Array(n);for(;n-- >0;)i[n]=e[n];return i},ese=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&U_(Uint8Array)),tse=(e,n)=>{const s=(e&&e[Y0]).call(e);let d;for(;(d=s.next())&&!d.done;){const h=d.value;n.call(e,h[0],h[1])}},nse=(e,n)=>{let i;const s=[];for(;(i=e.exec(n))!==null;)s.push(i);return s},rse=To("HTMLFormElement"),ise=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,s,d){return s.toUpperCase()+d}),$I=(({hasOwnProperty:e})=>(n,i)=>e.call(n,i))(Object.prototype),ose=To("RegExp"),zL=(e,n)=>{const i=Object.getOwnPropertyDescriptors(e),s={};pm(i,(d,h)=>{let f;(f=n(d,h,e))!==!1&&(s[h]=f||d)}),Object.defineProperties(e,s)},sse=e=>{zL(e,(n,i)=>{if(ci(e)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const s=e[i];if(ci(s)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},ase=(e,n)=>{const i={},s=d=>{d.forEach(h=>{i[h]=!0})};return Ud(e)?s(e):s(String(e).split(n)),i},lse=()=>{},cse=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function dse(e){return!!(e&&ci(e.append)&&e[PL]==="FormData"&&e[Y0])}const use=e=>{const n=new Array(10),i=(s,d)=>{if(fm(s)){if(n.indexOf(s)>=0)return;if(mm(s))return s;if(!("toJSON"in s)){n[d]=s;const h=Ud(s)?[]:{};return pm(s,(f,g)=>{const p=i(f,d+1);!Dd(p)&&(h[g]=p)}),n[d]=void 0,h}}return s};return i(e,0)},hse=To("AsyncFunction"),mse=e=>e&&(fm(e)||ci(e))&&ci(e.then)&&ci(e.catch),FL=((e,n)=>e?setImmediate:n?((i,s)=>(Tl.addEventListener("message",({source:d,data:h})=>{d===Tl&&h===i&&s.length&&s.shift()()},!1),d=>{s.push(d),Tl.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",ci(Tl.postMessage)),fse=typeof queueMicrotask<"u"?queueMicrotask.bind(Tl):typeof process<"u"&&process.nextTick||FL,pse=e=>e!=null&&ci(e[Y0]),me={isArray:Ud,isArrayBuffer:OL,isBuffer:mm,isFormData:$oe,isArrayBufferView:Ioe,isString:Moe,isNumber:BL,isBoolean:Poe,isObject:fm,isPlainObject:og,isEmptyObject:Ooe,isReadableStream:Uoe,isRequest:Woe,isResponse:Hoe,isHeaders:Goe,isUndefined:Dd,isDate:Boe,isFile:Loe,isBlob:Roe,isRegExp:ose,isFunction:ci,isStream:Foe,isURLSearchParams:Voe,isTypedArray:ese,isFileList:zoe,forEach:pm,merge:Ow,extend:Koe,trim:qoe,stripBOM:Yoe,inherits:Qoe,toFlatObject:Zoe,kindOf:Q0,kindOfTest:To,endsWith:Joe,toArray:Xoe,forEachEntry:tse,matchAll:nse,isHTMLForm:rse,hasOwnProperty:$I,hasOwnProp:$I,reduceDescriptors:zL,freezeMethods:sse,toObjectSet:ase,toCamelCase:ise,noop:lse,toFiniteNumber:cse,findKey:LL,global:Tl,isContextDefined:RL,isSpecCompliantForm:dse,toJSONObject:use,isAsyncFn:hse,isThenable:mse,setImmediate:FL,asap:fse,isIterable:pse};function Et(e,n,i,s,d){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",n&&(this.code=n),i&&(this.config=i),s&&(this.request=s),d&&(this.response=d,this.status=d.status?d.status:null)}me.inherits(Et,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:me.toJSONObject(this.config),code:this.code,status:this.status}}});const $L=Et.prototype,VL={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{VL[e]={value:e}});Object.defineProperties(Et,VL);Object.defineProperty($L,"isAxiosError",{value:!0});Et.from=(e,n,i,s,d,h)=>{const f=Object.create($L);me.toFlatObject(e,f,function(y){return y!==Error.prototype},x=>x!=="isAxiosError");const g=e&&e.message?e.message:"Error",p=n==null&&e?e.code:n;return Et.call(f,g,p,i,s,d),e&&f.cause==null&&Object.defineProperty(f,"cause",{value:e,configurable:!0}),f.name=e&&e.name||"Error",h&&Object.assign(f,h),f};const gse=null;function Bw(e){return me.isPlainObject(e)||me.isArray(e)}function UL(e){return me.endsWith(e,"[]")?e.slice(0,-2):e}function VI(e,n,i){return e?e.concat(n).map(function(d,h){return d=UL(d),!i&&h?"["+d+"]":d}).join(i?".":""):n}function bse(e){return me.isArray(e)&&!e.some(Bw)}const kse=me.toFlatObject(me,{},null,function(n){return/^is[A-Z]/.test(n)});function J0(e,n,i){if(!me.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,i=me.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,D){return!me.isUndefined(D[S])});const s=i.metaTokens,d=i.visitor||y,h=i.dots,f=i.indexes,p=(i.Blob||typeof Blob<"u"&&Blob)&&me.isSpecCompliantForm(n);if(!me.isFunction(d))throw new TypeError("visitor must be a function");function x(E){if(E===null)return"";if(me.isDate(E))return E.toISOString();if(me.isBoolean(E))return E.toString();if(!p&&me.isBlob(E))throw new Et("Blob is not supported. Use a Buffer instead.");return me.isArrayBuffer(E)||me.isTypedArray(E)?p&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function y(E,S,D){let I=E;if(E&&!D&&typeof E=="object"){if(me.endsWith(S,"{}"))S=s?S:S.slice(0,-2),E=JSON.stringify(E);else if(me.isArray(E)&&bse(E)||(me.isFileList(E)||me.endsWith(S,"[]"))&&(I=me.toArray(E)))return S=UL(S),I.forEach(function(B,R){!(me.isUndefined(B)||B===null)&&n.append(f===!0?VI([S],R,h):f===null?S:S+"[]",x(B))}),!1}return Bw(E)?!0:(n.append(VI(D,S,h),x(E)),!1)}const v=[],w=Object.assign(kse,{defaultVisitor:y,convertValue:x,isVisitable:Bw});function C(E,S){if(!me.isUndefined(E)){if(v.indexOf(E)!==-1)throw Error("Circular reference detected in "+S.join("."));v.push(E),me.forEach(E,function(I,M){(!(me.isUndefined(I)||I===null)&&d.call(n,I,me.isString(M)?M.trim():M,S,w))===!0&&C(I,S?S.concat(M):[M])}),v.pop()}}if(!me.isObject(e))throw new TypeError("data must be an object");return C(e),n}
vendor: 5,437 bytes, lines 84-85
84function UI(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return n[s]})}function W_(e,n){this._pairs=[],e&&J0(e,this,n)}const WL=W_.prototype;WL.append=function(n,i){this._pairs.push([n,i])};WL.toString=function(n){const i=n?function(s){return n.call(this,s,UI)}:UI;return this._pairs.map(function(d){return i(d[0])+"="+i(d[1])},"").join("&")};function yse(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function HL(e,n,i){if(!n)return e;const s=i&&i.encode||yse;me.isFunction(i)&&(i={serialize:i});const d=i&&i.serialize;let h;if(d?h=d(n,i):h=me.isURLSearchParams(n)?n.toString():new W_(n,i).toString(s),h){const f=e.indexOf("#");f!==-1&&(e=e.slice(0,f)),e+=(e.indexOf("?")===-1?"?":"&")+h}return e}class WI{constructor(){this.handlers=[]}use(n,i,s){return this.handlers.push({fulfilled:n,rejected:i,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){me.forEach(this.handlers,function(s){s!==null&&n(s)})}}const GL={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xse=typeof URLSearchParams<"u"?URLSearchParams:W_,vse=typeof FormData<"u"?FormData:null,wse=typeof Blob<"u"?Blob:null,_se={isBrowser:!0,classes:{URLSearchParams:xse,FormData:vse,Blob:wse},protocols:["http","https","file","blob","url","data"]},H_=typeof window<"u"&&typeof document<"u",Lw=typeof navigator=="object"&&navigator||void 0,Ase=H_&&(!Lw||["ReactNative","NativeScript","NS"].indexOf(Lw.product)<0),Cse=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jse=H_&&window.location.href||"http://localhost",Nse=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:H_,hasStandardBrowserEnv:Ase,hasStandardBrowserWebWorkerEnv:Cse,navigator:Lw,origin:jse},Symbol.toStringTag,{value:"Module"})),Pr={...Nse,..._se};function Ese(e,n){return J0(e,new Pr.classes.URLSearchParams,{visitor:function(i,s,d,h){return Pr.isNode&&me.isBuffer(i)?(this.append(s,i.toString("base64")),!1):h.defaultVisitor.apply(this,arguments)},...n})}function Sse(e){return me.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function Dse(e){const n={},i=Object.keys(e);let s;const d=i.length;let h;for(s=0;s<d;s++)h=i[s],n[h]=e[h];return n}function qL(e){function n(i,s,d,h){let f=i[h++];if(f==="__proto__")return!0;const g=Number.isFinite(+f),p=h>=i.length;return f=!f&&me.isArray(d)?d.length:f,p?(me.hasOwnProp(d,f)?d[f]=[d[f],s]:d[f]=s,!g):((!d[f]||!me.isObject(d[f]))&&(d[f]=[]),n(i,s,d[f],h)&&me.isArray(d[f])&&(d[f]=Dse(d[f])),!g)}if(me.isFormData(e)&&me.isFunction(e.entries)){const i={};return me.forEachEntry(e,(s,d)=>{n(Sse(s),d,i,0)}),i}return null}function Tse(e,n,i){if(me.isString(e))try{return(n||JSON.parse)(e),me.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(i||JSON.stringify)(e)}const gm={transitional:GL,adapter:["xhr","http","fetch"],transformRequest:[function(n,i){const s=i.getContentType()||"",d=s.indexOf("application/json")>-1,h=me.isObject(n);if(h&&me.isHTMLForm(n)&&(n=new FormData(n)),me.isFormData(n))return d?JSON.stringify(qL(n)):n;if(me.isArrayBuffer(n)||me.isBuffer(n)||me.isStream(n)||me.isFile(n)||me.isBlob(n)||me.isReadableStream(n))return n;if(me.isArrayBufferView(n))return n.buffer;if(me.isURLSearchParams(n))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let g;if(h){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Ese(n,this.formSerializer).toString();if((g=me.isFileList(n))||s.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return J0(g?{"files[]":n}:n,p&&new p,this.formSerializer)}}return h||d?(i.setContentType("application/json",!1),Tse(n)):n}],transformResponse:[function(n){const i=this.transitional||gm.transitional,s=i&&i.forcedJSONParsing,d=this.responseType==="json";if(me.isResponse(n)||me.isReadableStream(n))return n;if(n&&me.isString(n)&&(s&&!this.responseType||d)){const f=!(i&&i.silentJSONParsing)&&d;try{return JSON.parse(n,this.parseReviver)}catch(g){if(f)throw g.name==="SyntaxError"?Et.from(g,Et.ERR_BAD_RESPONSE,this,null,this.response):g}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pr.classes.FormData,Blob:Pr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};me.forEach(["delete","get","head","post","put","patch"],e=>{gm.headers[e]={}});const Ise=me.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"]),Mse=e=>{const n={};let i,s,d;return e&&e.split(` 85`).forEach(function(f){d=f.indexOf(":"),i=f.substring(0,d).trim().toLowerCase(),s=f.substring(d+1).trim(),!(!i||n[i]&&Ise[i])&&(i==="set-cookie"?n[i]?n[i].push(s):n[i]=[s]:n[i]=n[i]?n[i]+", "+s:s)}),n},HI=Symbol("internals");function Ku(e){return e&&String(e).trim().toLowerCase()}function sg(e){return e===!1||e==null?e:me.isArray(e)?e.map(sg):String(e)}function Pse(e){const n=Object.create(null),i=/([^\s,;
85=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=i.exec(e);)n[s[1]]=s[2];return n}const Ose=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Wx(e,n,i,s,d){if(me.isFunction(s))return s.call(this,n,i);if(d&&(n=i),!!me.isString(n)){if(me.isString(s))return n.indexOf(s)!==-1;if(me.isRegExp(s))return s.test(n)}}function Bse(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,i,s)=>i.toUpperCase()+s)}function Lse(e,n){const i=me.toCamelCase(" "+n);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+i,{value:function(d,h,f){return this[s].call(this,n,d,h,f)},configurable:!0})})}let di=class{constructor(n){n&&this.set(n)}set(n,i,s){const d=this;function h(g,p,x){const y=Ku(p);if(!y)throw new Error("header name must be a non-empty string");const v=me.findKey(d,y);(!v||d[v]===void 0||x===!0||x===void 0&&d[v]!==!1)&&(d[v||p]=sg(g))}const f=(g,p)=>me.forEach(g,(x,y)=>h(x,y,p));if(me.isPlainObject(n)||n instanceof this.constructor)f(n,i);else if(me.isString(n)&&(n=n.trim())&&!Ose(n))f(Mse(n),i);else if(me.isObject(n)&&me.isIterable(n)){let g={},p,x;for(const y of n){if(!me.isArray(y))throw TypeError("Object iterator must return a key-value pair");g[x=y[0]]=(p=g[x])?me.isArray(p)?[...p,y[1]]:[p,y[1]]:y[1]}f(g,i)}else n!=null&&h(i,n,s);return this}get(n,i){if(n=Ku(n),n){const s=me.findKey(this,n);if(s){const d=this[s];if(!i)return d;if(i===!0)return Pse(d);if(me.isFunction(i))return i.call(this,d,s);if(me.isRegExp(i))return i.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,i){if(n=Ku(n),n){const s=me.findKey(this,n);return!!(s&&this[s]!==void 0&&(!i||Wx(this,this[s],s,i)))}return!1}delete(n,i){const s=this;let d=!1;function h(f){if(f=Ku(f),f){const g=me.findKey(s,f);g&&(!i||Wx(s,s[g],g,i))&&(delete s[g],d=!0)}}return me.isArray(n)?n.forEach(h):h(n),d}clear(n){const i=Object.keys(this);let s=i.length,d=!1;for(;s--;){const h=i[s];(!n||Wx(this,this[h],h,n,!0))&&(delete this[h],d=!0)}return d}normalize(n){const i=this,s={};return me.forEach(this,(d,h)=>{const f=me.findKey(s,h);if(f){i[f]=sg(d),delete i[h];return}const g=n?Bse(h):String(h).trim();g!==h&&delete i[h],i[g]=sg(d),s[g]=!0}),this}
vendor: 4,795 bytes, lines 85-86
85concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const i=Object.create(null);return me.forEach(this,(s,d)=>{s!=null&&s!==!1&&(i[d]=n&&me.isArray(s)?s.join(", "):s)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,i])=>n+": "+i).join(` 86`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...i){const s=new this(n);return i.forEach(d=>s.set(d)),s}static accessor(n){const s=(this[HI]=this[HI]={accessors:{}}).accessors,d=this.prototype;function h(f){const g=Ku(f);s[g]||(Lse(d,f),s[g]=!0)}return me.isArray(n)?n.forEach(h):h(n),this}};di.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);me.reduceDescriptors(di.prototype,({value:e},n)=>{let i=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(s){this[i]=s}}});me.freezeMethods(di);function Hx(e,n){const i=this||gm,s=n||i,d=di.from(s.headers);let h=s.data;return me.forEach(e,function(g){h=g.call(i,h,d.normalize(),n?n.status:void 0)}),d.normalize(),h}function KL(e){return!!(e&&e.__CANCEL__)}function Wd(e,n,i){Et.call(this,e??"canceled",Et.ERR_CANCELED,n,i),this.name="CanceledError"}me.inherits(Wd,Et,{__CANCEL__:!0});function YL(e,n,i){const s=i.config.validateStatus;!i.status||!s||s(i.status)?e(i):n(new Et("Request failed with status code "+i.status,[Et.ERR_BAD_REQUEST,Et.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function Rse(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function zse(e,n){e=e||10;const i=new Array(e),s=new Array(e);let d=0,h=0,f;return n=n!==void 0?n:1e3,function(p){const x=Date.now(),y=s[h];f||(f=x),i[d]=p,s[d]=x;let v=h,w=0;for(;v!==d;)w+=i[v++],v=v%e;if(d=(d+1)%e,d===h&&(h=(h+1)%e),x-f<n)return;const C=y&&x-y;return C?Math.round(w*1e3/C):void 0}}function Fse(e,n){let i=0,s=1e3/n,d,h;const f=(x,y=Date.now())=>{i=y,d=null,h&&(clearTimeout(h),h=null),e(...x)};return[(...x)=>{const y=Date.now(),v=y-i;v>=s?f(x,y):(d=x,h||(h=setTimeout(()=>{h=null,f(d)},s-v)))},()=>d&&f(d)]}const Vg=(e,n,i=3)=>{let s=0;const d=zse(50,250);return Fse(h=>{const f=h.loaded,g=h.lengthComputable?h.total:void 0,p=f-s,x=d(p),y=f<=g;s=f;const v={loaded:f,total:g,progress:g?f/g:void 0,bytes:p,rate:x||void 0,estimated:x&&g&&y?(g-f)/x:void 0,event:h,lengthComputable:g!=null,[n?"download":"upload"]:!0};e(v)},i)},GI=(e,n)=>{const i=e!=null;return[s=>n[0]({lengthComputable:i,total:e,loaded:s}),n[1]]},qI=e=>(...n)=>me.asap(()=>e(...n)),$se=Pr.hasStandardBrowserEnv?((e,n)=>i=>(i=new URL(i,Pr.origin),e.protocol===i.protocol&&e.host===i.host&&(n||e.port===i.port)))(new URL(Pr.origin),Pr.navigator&&/(msie|trident)/i.test(Pr.navigator.userAgent)):()=>!0,Vse=Pr.hasStandardBrowserEnv?{write(e,n,i,s,d,h,f){if(typeof document>"u")return;const g=[`${e}=${encodeURIComponent(n)}`];me.isNumber(i)&&g.push(`expires=${new Date(i).toUTCString()}`),me.isString(s)&&g.push(`path=${s}`),me.isString(d)&&g.push(`domain=${d}`),h===!0&&g.push("secure"),me.isString(f)&&g.push(`SameSite=${f}`),document.cookie=g.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Use(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Wse(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function QL(e,n,i){let s=!Use(n);return e&&(s||i==!1)?Wse(e,n):n}const KI=e=>e instanceof di?{...e}:e;function Kl(e,n){n=n||{};const i={};function s(x,y,v,w){return me.isPlainObject(x)&&me.isPlainObject(y)?me.merge.call({caseless:w},x,y):me.isPlainObject(y)?me.merge({},y):me.isArray(y)?y.slice():y}function d(x,y,v,w){if(me.isUndefined(y)){if(!me.isUndefined(x))return s(void 0,x,v,w)}else return s(x,y,v,w)}function h(x,y){if(!me.isUndefined(y))return s(void 0,y)}function f(x,y){if(me.isUndefined(y)){if(!me.isUndefined(x))return s(void 0,x)}else return s(void 0,y)}function g(x,y,v){if(v in n)return s(x,y);if(v in e)return s(void 0,x)}const p={url:h,method:h,data:h,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:g,headers:(x,y,v)=>d(KI(x),KI(y),v,!0)};return me.forEach(Object.keys({...e,...n}),function(y){const v=p[y]||d,w=v(e[y],n[y],y);me.isUndefined(w)&&v!==g||(i[y]=w)}),i}
vendor: 4,112 bytes, line 86
86const ZL=e=>{const n=Kl({},e);let{data:i,withXSRFToken:s,xsrfHeaderName:d,xsrfCookieName:h,headers:f,auth:g}=n;if(n.headers=f=di.from(f),n.url=HL(QL(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),g&&f.set("Authorization","Basic "+btoa((g.username||"")+":"+(g.password?unescape(encodeURIComponent(g.password)):""))),me.isFormData(i)){if(Pr.hasStandardBrowserEnv||Pr.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if(me.isFunction(i.getHeaders)){const p=i.getHeaders(),x=["content-type","content-length"];Object.entries(p).forEach(([y,v])=>{x.includes(y.toLowerCase())&&f.set(y,v)})}}if(Pr.hasStandardBrowserEnv&&(s&&me.isFunction(s)&&(s=s(n)),s||s!==!1&&$se(n.url))){const p=d&&h&&Vse.read(h);p&&f.set(d,p)}return n},Hse=typeof XMLHttpRequest<"u",Gse=Hse&&function(e){return new Promise(function(i,s){const d=ZL(e);let h=d.data;const f=di.from(d.headers).normalize();let{responseType:g,onUploadProgress:p,onDownloadProgress:x}=d,y,v,w,C,E;function S(){C&&C(),E&&E(),d.cancelToken&&d.cancelToken.unsubscribe(y),d.signal&&d.signal.removeEventListener("abort",y)}let D=new XMLHttpRequest;D.open(d.method.toUpperCase(),d.url,!0),D.timeout=d.timeout;function I(){if(!D)return;const B=di.from("getAllResponseHeaders"in D&&D.getAllResponseHeaders()),F={data:!g||g==="text"||g==="json"?D.responseText:D.response,status:D.status,statusText:D.statusText,headers:B,config:e,request:D};YL(function(P){i(P),S()},function(P){s(P),S()},F),D=null}"onloadend"in D?D.onloadend=I:D.onreadystatechange=function(){!D||D.readyState!==4||D.status===0&&!(D.responseURL&&D.responseURL.indexOf("file:")===0)||setTimeout(I)},D.onabort=function(){D&&(s(new Et("Request aborted",Et.ECONNABORTED,e,D)),D=null)},D.onerror=function(R){const F=R&&R.message?R.message:"Network Error",V=new Et(F,Et.ERR_NETWORK,e,D);V.event=R||null,s(V),D=null},D.ontimeout=function(){let R=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded";const F=d.transitional||GL;d.timeoutErrorMessage&&(R=d.timeoutErrorMessage),s(new Et(R,F.clarifyTimeoutError?Et.ETIMEDOUT:Et.ECONNABORTED,e,D)),D=null},h===void 0&&f.setContentType(null),"setRequestHeader"in D&&me.forEach(f.toJSON(),function(R,F){D.setRequestHeader(F,R)}),me.isUndefined(d.withCredentials)||(D.withCredentials=!!d.withCredentials),g&&g!=="json"&&(D.responseType=d.responseType),x&&([w,E]=Vg(x,!0),D.addEventListener("progress",w)),p&&D.upload&&([v,C]=Vg(p),D.upload.addEventListener("progress",v),D.upload.addEventListener("loadend",C)),(d.cancelToken||d.signal)&&(y=B=>{D&&(s(!B||B.type?new Wd(null,e,D):B),D.abort(),D=null)},d.cancelToken&&d.cancelToken.subscribe(y),d.signal&&(d.signal.aborted?y():d.signal.addEventListener("abort",y)));const M=Rse(d.url);if(M&&Pr.protocols.indexOf(M)===-1){s(new Et("Unsupported protocol "+M+":",Et.ERR_BAD_REQUEST,e));return}D.send(h||null)})},qse=(e,n)=>{const{length:i}=e=e?e.filter(Boolean):[];if(n||i){let s=new AbortController,d;const h=function(x){if(!d){d=!0,g();const y=x instanceof Error?x:this.reason;s.abort(y instanceof Et?y:new Wd(y instanceof Error?y.message:y))}};let f=n&&setTimeout(()=>{f=null,h(new Et(`timeout ${n} of ms exceeded`,Et.ETIMEDOUT))},n);const g=()=>{e&&(f&&clearTimeout(f),f=null,e.forEach(x=>{x.unsubscribe?x.unsubscribe(h):x.removeEventListener("abort",h)}),e=null)};e.forEach(x=>x.addEventListener("abort",h));const{signal:p}=s;return p.unsubscribe=()=>me.asap(g),p}},Kse=function*(e,n){let i=e.byteLength;if(i<n){yield e;return}let s=0,d;for(;s<i;)d=s+n,yield e.slice(s,d),s=d},Yse=async function*(e,n){for await(const i of Qse(e))yield*Kse(i,n)},Qse=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:i,value:s}=await n.read();if(i)break;yield s}}finally{await n.cancel()}},YI=(e,n,i,s)=>{const d=Yse(e,n);let h=0,f,g=p=>{f||(f=!0,s&&s(p))};return new ReadableStream({async pull(p){try{const{done:x,value:y}=await d.next();if(x){g(),p.close();return}let v=y.byteLength;if(i){let w=h+=v;i(w)}p.enqueue(new Uint8Array(y))}catch(x){throw g(x),x}},cancel(p){return g(p),d.return()}},{highWaterMark:2})},QI=64*1024,{isFunction:_p}
vendor: 9,349 bytes, lines 86-89
86=me,Zse=(({Request:e,Response:n})=>({Request:e,Response:n}))(me.global),{ReadableStream:ZI,TextEncoder:JI}=me.global,XI=(e,...n)=>{try{return!!e(...n)}catch{return!1}},Jse=e=>{e=me.merge.call({skipUndefined:!0},Zse,e);const{fetch:n,Request:i,Response:s}=e,d=n?_p(n):typeof fetch=="function",h=_p(i),f=_p(s);if(!d)return!1;const g=d&&_p(ZI),p=d&&(typeof JI=="function"?(E=>S=>E.encode(S))(new JI):async E=>new Uint8Array(await new i(E).arrayBuffer())),x=h&&g&&XI(()=>{let E=!1;const S=new i(Pr.origin,{body:new ZI,method:"POST",get duplex(){return E=!0,"half"}}).headers.has("Content-Type");return E&&!S}),y=f&&g&&XI(()=>me.isReadableStream(new s("").body)),v={stream:y&&(E=>E.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!v[E]&&(v[E]=(S,D)=>{let I=S&&S[E];if(I)return I.call(S);throw new Et(`Response type '${E}' is not supported`,Et.ERR_NOT_SUPPORT,D)})});const w=async E=>{if(E==null)return 0;if(me.isBlob(E))return E.size;if(me.isSpecCompliantForm(E))return(await new i(Pr.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(me.isArrayBufferView(E)||me.isArrayBuffer(E))return E.byteLength;if(me.isURLSearchParams(E)&&(E=E+""),me.isString(E))return(await p(E)).byteLength},C=async(E,S)=>{const D=me.toFiniteNumber(E.getContentLength());return D??w(S)};return async E=>{let{url:S,method:D,data:I,signal:M,cancelToken:B,timeout:R,onDownloadProgress:F,onUploadProgress:V,responseType:P,headers:z,withCredentials:W="same-origin",fetchOptions:K}=ZL(E),G=n||fetch;P=P?(P+"").toLowerCase():"text";let Z=qse([M,B&&B.toAbortSignal()],R),se=null;const ge=Z&&Z.unsubscribe&&(()=>{Z.unsubscribe()});let Se;try{if(V&&x&&D!=="get"&&D!=="head"&&(Se=await C(z,I))!==0){let ve=new i(S,{method:"POST",body:I,duplex:"half"}),Ce;if(me.isFormData(I)&&(Ce=ve.headers.get("content-type"))&&z.setContentType(Ce),ve.body){const[Q,te]=GI(Se,Vg(qI(V)));I=YI(ve.body,QI,Q,te)}}me.isString(W)||(W=W?"include":"omit");const Ae=h&&"credentials"in i.prototype,he={...K,signal:Z,method:D.toUpperCase(),headers:z.normalize().toJSON(),body:I,duplex:"half",credentials:Ae?W:void 0};se=h&&new i(S,he);let ee=await(h?G(se,K):G(S,he));const le=y&&(P==="stream"||P==="response");if(y&&(F||le&&ge)){const ve={};["status","statusText","headers"].forEach(pe=>{ve[pe]=ee[pe]});const Ce=me.toFiniteNumber(ee.headers.get("content-length")),[Q,te]=F&&GI(Ce,Vg(qI(F),!0))||[];ee=new s(YI(ee.body,QI,Q,()=>{te&&te(),ge&&ge()}),ve)}P=P||"text";let je=await v[me.findKey(v,P)||"text"](ee,E);return!le&&ge&&ge(),await new Promise((ve,Ce)=>{YL(ve,Ce,{data:je,headers:di.from(ee.headers),status:ee.status,statusText:ee.statusText,config:E,request:se})})}catch(Ae){throw ge&&ge(),Ae&&Ae.name==="TypeError"&&/Load failed|fetch/i.test(Ae.message)?Object.assign(new Et("Network Error",Et.ERR_NETWORK,E,se),{cause:Ae.cause||Ae}):Et.from(Ae,Ae&&Ae.code,E,se)}}},Xse=new Map,JL=e=>{let n=e&&e.env||{};const{fetch:i,Request:s,Response:d}=n,h=[s,d,i];let f=h.length,g=f,p,x,y=Xse;for(;g--;)p=h[g],x=y.get(p),x===void 0&&y.set(p,x=g?new Map:Jse(n)),y=x;return x};JL();const G_={http:gse,xhr:Gse,fetch:{get:JL}};me.forEach(G_,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const eM=e=>`- ${e}`,eae=e=>me.isFunction(e)||e===null||e===!1;function tae(e,n){e=me.isArray(e)?e:[e];const{length:i}=e;let s,d;const h={};for(let f=0;f<i;f++){s=e[f];let g;if(d=s,!eae(s)&&(d=G_[(g=String(s)).toLowerCase()],d===void 0))throw new Et(`Unknown adapter '${g}'`);if(d&&(me.isFunction(d)||(d=d.get(n))))break;h[g||"#"+f]=d}if(!d){const f=Object.entries(h).map(([p,x])=>`adapter ${p} `+(x===!1?"is not supported by the environment":"is not available in the build"));let g=i?f.length>1?`since : 87`+f.map(eM).join(` 88`):" "+eM(f[0]):"as no adapter specified";throw new Et("There is no suitable adapter to dispatch the request "+g,"ERR_NOT_SUPPORT")}return d}const XL={getAdapter:tae,adapters:G_};function Gx(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wd(null,e)}function tM(e){return Gx(e),e.headers=di.from(e.headers),e.data=Hx.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),XL.getAdapter(e.adapter||gm.adapter,e)(e).then(function(s){return Gx(e),s.data=Hx.call(e,e.transformResponse,s),s.headers=di.from(s.headers),s},function(s){return KL(s)||(Gx(e),s&&s.response&&(s.response.data=Hx.call(e,e.transformResponse,s.response),s.response.headers=di.from(s.response.headers))),Promise.reject(s)})}const e9="1.13.2",X0={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{X0[e]=function(s){return typeof s===e||"a"+(n<1?"n ":" ")+e}});const nM={};X0.transitional=function(n,i,s){function d(h,f){return"[Axios v"+e9+"] Transitional option '"+h+"'"+f+(s?". "+s:"")}return(h,f,g)=>{if(n===!1)throw new Et(d(f," has been removed"+(i?" in "+i:"")),Et.ERR_DEPRECATED);return i&&!nM[f]&&(nM[f]=!0,console.warn(d(f," has been deprecated since v"+i+" and will be removed in the near future"))),n?n(h,f,g):!0}};X0.spelling=function(n){return(i,s)=>(console.warn(`${s} is likely a misspelling of ${n}`),!0)};function nae(e,n,i){if(typeof e!="object")throw new Et("options must be an object",Et.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let d=s.length;for(;d-- >0;){const h=s[d],f=n[h];if(f){const g=e[h],p=g===void 0||f(g,h,e);if(p!==!0)throw new Et("option "+h+" must be "+p,Et.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new Et("Unknown option "+h,Et.ERR_BAD_OPTION)}}const ag={assertOptions:nae,validators:X0},Ho=ag.validators;let Rl=class{constructor(n){this.defaults=n||{},this.interceptors={request:new WI,response:new WI}}async request(n,i){try{return await this._request(n,i)}catch(s){if(s instanceof Error){let d={};Error.captureStackTrace?Error.captureStackTrace(d):d=new Error;const h=d.stack?d.stack.replace(/^.+\n/,""):"";try{s.stack?h&&!String(s.stack).endsWith(h.replace(/^.+\n.+\n/,""))&&(s.stack+=` 89`+h):s.stack=h}catch{}}throw s}}_request(n,i){typeof n=="string"?(i=i||{},i.url=n):i=n||{},i=Kl(this.defaults,i);const{transitional:s,paramsSerializer:d,headers:h}=i;s!==void 0&&ag.assertOptions(s,{silentJSONParsing:Ho.transitional(Ho.boolean),forcedJSONParsing:Ho.transitional(Ho.boolean),clarifyTimeoutError:Ho.transitional(Ho.boolean)},!1),d!=null&&(me.isFunction(d)?i.paramsSerializer={serialize:d}:ag.assertOptions(d,{encode:Ho.function,serialize:Ho.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),ag.assertOptions(i,{baseUrl:Ho.spelling("baseURL"),withXsrfToken:Ho.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let f=h&&me.merge(h.common,h[i.method]);h&&me.forEach(["delete","get","head","post","put","patch","common"],E=>{delete h[E]}),i.headers=di.concat(f,h);const g=[];let p=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(i)===!1||(p=p&&S.synchronous,g.unshift(S.fulfilled,S.rejected))});const x=[];this.interceptors.response.forEach(function(S){x.push(S.fulfilled,S.rejected)});let y,v=0,w;if(!p){const E=[tM.bind(this),void 0];for(E.unshift(...g),E.push(...x),w=E.length,y=Promise.resolve(i);v<w;)y=y.then(E[v++],E[v++]);return y}w=g.length;let C=i;for(;v<w;){const E=g[v++],S=g[v++];try{C=E(C)}catch(D){S.call(this,D);break}}try{y=tM.call(this,C)}catch(E){return Promise.reject(E)}for(v=0,w=x.length;v<w;)y=y.then(x[v++],x[v++]);return y}getUri(n){n=Kl(this.defaults,n);const i=QL(n.baseURL,n.url,n.allowAbsoluteUrls);return HL(i,n.params,n.paramsSerializer)}};me.forEach(["delete","get","head","options"],function(n){Rl.prototype[n]=function(i,s){return this.request(Kl(s||{},{method:n,url:i,data:(s||{}).data}))}});me.forEach(["post","put","patch"],function(n){function i(s){return function(h,f,g){return this.request(Kl(g||{},{method:n,headers:s?{"Content-Type":"multipart/form-data"}:{},url:h,data:f}))}}Rl.prototype[n]=i(),Rl.prototype[n+"Form"]=i(!0)});let rae=class t9{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(h){i=h});const s=this;this.promise.then(d=>{if(!s._listeners)return;let h=s._listeners.length;for(;h-- >0;)s._listeners[h](d);s._listeners=null}),this.promise.then=d=>{let h;const f=new Promise(g=>{s.subscribe(g),h=g}).then(d);return f.cancel=function(){s.unsubscribe(h)},f},n(function(h,f,g){s.reason||(s.reason=new Wd(h,f,g),i(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const i=this._listeners.indexOf(n);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const n=new AbortController,i=s=>{n.abort(s)};return this.subscribe(i),n.signal.unsubscribe=()=>this.unsubscribe(i),n.signal}static source(){let n;return{token:new t9(function(d){n=d}),cancel:n}}};function iae(e){return function(i){return e.apply(null,i)}}function oae(e){return me.isObject(e)&&e.isAxiosError===!0}const Rw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
89alContent: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(Rw).forEach(([e,n])=>{Rw[n]=e});function n9(e){const n=new Rl(e),i=ML(Rl.prototype.request,n);return me.extend(i,Rl.prototype,n,{allOwnKeys:!0}),me.extend(i,n,null,{allOwnKeys:!0}),i.create=function(d){return n9(Kl(e,d))},i}const Ln=n9(gm);Ln.Axios=Rl;Ln.CanceledError=Wd;Ln.CancelToken=rae;Ln.isCancel=KL;Ln.VERSION=e9;Ln.toFormData=J0;Ln.AxiosError=Et;Ln.Cancel=Ln.CanceledError;Ln.all=function(n){return Promise.all(n)};Ln.spread=iae;Ln.isAxiosError=oae;Ln.mergeConfig=Kl;Ln.AxiosHeaders=di;Ln.formToJSON=e=>qL(me.isHTMLForm(e)?new FormData(e):e);Ln.getAdapter=XL.getAdapter;Ln.HttpStatusCode=Rw;Ln.default=Ln;const{Axios:p5e,AxiosError:g5e,CanceledError:b5e,isCancel:k5e,CancelToken:y5e,VERSION:x5e,all:v5e,Cancel:w5e,isAxiosError:_5e,spread:A5e,toFormData:C5e,AxiosHeaders:j5e,HttpStatusCode:N5e,formToJSON:E5e,getAdapter:S5e,mergeConfig:D5e}=Ln,Yl={LOGIN:"/user/login",SIGNUP:"/user/signup",DASHBOARD:"/dashboard",ADMIN_DASHBOARD:"/admin/dashboard"},ne=Ln.create({baseURL:"/api",headers:{"Content-Type":"application/json",Accept:"application/json"},withCredentials:!0}),rM=localStorage.getItem("auth-storage");var rB;if(rM)try{const e=JSON.parse(rM);(rB=e.state)!=null&&rB.token&&(ne.defaults.headers.common.Authorization=`Bearer ${e.state.token}`)}catch{}ne.interceptors.response.use(e=>e,e=>{var i,s;const n=window.location.pathname.includes("/login")||window.location.pathname.includes("/signup");return((i=e.response)==null?void 0:i.status)===401&&!n&&(localStorage.removeItem("auth-storage"),window.location.href=Yl.LOGIN),((s=e.response)==null?void 0:s.status)===419&&window.location.reload(),Promise.reject(e)});const ui=K0(IL((e,n)=>({activeSiteId:null,sites:[],setActiveSite:i=>e({activeSiteId:i}),setSites:i=>{var g;const s=Array.isArray(i)?i:[],d=n().activeSiteId,f=s.some(p=>p.id===d)?d:((g=s[0])==null?void 0:g.id)??null;e({sites:s,activeSiteId:f})},getActiveSite:()=>{const i=n();return(Array.isArray(i.sites)?i.sites:[]).find(d=>d.id===i.activeSiteId)},clearSites:()=>e({activeSiteId:null,sites:[]})}),{name:"site-storage",storage:V_(()=>localStorage),onRehydrateStorage:()=>e=>{e&&!Array.isArray(e.sites)&&(e.sites=[])}})),jr=K0(IL((e,n)=>({user:null,token:null,originalAdmin:null,originalToken:null,isImpersonating:!1,processingAuthToken:!1,setAuth:(i,s)=>{e({user:i,token:s}),s&&(ne.defaults.headers.common.Authorization=`Bearer ${s}`)},setProcessingAuthToken:i=>{e({processingAuthToken:i})},fetchUser:async()=>{var s;if(!n().token)return null;try{const d=await ne.get("/auth/user");return e({user:d.data}),d.data}catch(d){return console.error("Failed to fetch user:",d),((s=d.response)==null?void 0:s.status)===401&&(e({user:null,token:null,processingAuthToken:!1}),delete ne.defaults.headers.common.Authorization),null}},startImpersonation:(i,s)=>{const d=n();e({originalAdmin:d.user,originalToken:d.token,user:i,token:s,isImpersonating:!0}),ne.defaults.headers.common.Authorization=`Bearer ${s}`},stopImpersonation:()=>{const i=n();return i.originalAdmin&&i.originalToken?(e({user:i.originalAdmin,token:i.originalToken,originalAdmin:null,originalToken:null,isImpersonating:!1}),ne.defaults.headers.common.Authorization=`Bearer ${i.originalToken}`,!0):!1},logout:()=>{e({user:null,token:null,originalAdmin:null,originalToken:null,isImpersonating:!1,processingAuthToken:!1}),delete ne.defaults.headers.common.Authorization;try{ui.getState().clearSites()}catch{}try{localStorage.removeItem("auth-storage"),localStorage.removeItem("site-storage"),localStorage.removeItem("firstBlogGenerating"),localStorage.removeItem("dismissed_suggestions"),Object.keys(localStorage).forEach(i=>
vendor: 4,156 bytes, lines 89-144
89{(i.startsWith("firstBlogGenerating:")||i.startsWith("dismissed_suggestions:"))&&localStorage.removeItem(i)})}catch{}}}),{name:"auth-storage",storage:V_(()=>localStorage)}));/** 90 * @license lucide-react v0.562.0 - ISC 91 * 92 * This source code is licensed under the ISC license. 93 * See the LICENSE file in the root directory of this source tree. 94 */const sae=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),aae=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,i,s)=>s?s.toUpperCase():i.toLowerCase()),iM=e=>{const n=aae(e);return n.charAt(0).toUpperCase()+n.slice(1)},r9=(...e)=>e.filter((n,i,s)=>!!n&&n.trim()!==""&&s.indexOf(n)===i).join(" ").trim(),lae=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/** 95 * @license lucide-react v0.562.0 - ISC 96 * 97 * This source code is licensed under the ISC license. 98 * See the LICENSE file in the root directory of this source tree. 99 */var cae={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 100 * @license lucide-react v0.562.0 - ISC 101 * 102 * This source code is licensed under the ISC license. 103 * See the LICENSE file in the root directory of this source tree. 104 */const dae=j.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:d="",children:h,iconNode:f,...g},p)=>j.createElement("svg",{ref:p,...cae,width:n,height:n,stroke:e,strokeWidth:s?Number(i)*24/Number(n):i,className:r9("lucide",d),...!h&&!lae(g)&&{"aria-hidden":"true"},...g},[...f.map(([x,y])=>j.createElement(x,y)),...Array.isArray(h)?h:[h]]));/** 105 * @license lucide-react v0.562.0 - ISC 106 * 107 * This source code is licensed under the ISC license. 108 * See the LICENSE file in the root directory of this source tree. 109 */const ac=(e,n)=>{const i=j.forwardRef(({className:s,...d},h)=>j.createElement(dae,{ref:h,iconNode:n,className:r9(`lucide-${sae(iM(e))}`,`lucide-${e}`,s),...d}));return i.displayName=iM(e),i};/** 110 * @license lucide-react v0.562.0 - ISC 111 * 112 * This source code is licensed under the ISC license. 113 * See the LICENSE file in the root directory of this source tree. 114 */const uae=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],hae=ac("check",uae);/** 115 * @license lucide-react v0.562.0 - ISC 116 * 117 * This source code is licensed under the ISC license. 118 * See the LICENSE file in the root directory of this source tree. 119 */const mae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],fae=ac("circle-check",mae);/** 120 * @license lucide-react v0.562.0 - ISC 121 * 122 * This source code is licensed under the ISC license. 123 * See the LICENSE file in the root directory of this source tree. 124 */const pae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],gae=ac("circle-x",pae);/** 125 * @license lucide-react v0.562.0 - ISC 126 * 127 * This source code is licensed under the ISC license. 128 * See the LICENSE file in the root directory of this source tree. 129 */const bae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],kae=ac("info",bae);/** 130 * @license lucide-react v0.562.0 - ISC 131 * 132 * This source code is licensed under the ISC license. 133 * See the LICENSE file in the root directory of this source tree. 134 */const yae=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],xae=ac("mail",yae);/** 135 * @license lucide-react v0.562.0 - ISC 136 * 137 * This source code is licensed under the ISC license. 138 * See the LICENSE file in the root directory of this source tree. 139 */const vae=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],i9=ac("triangle-alert",vae);/** 140 * @license lucide-react v0.562.0 - ISC 141 * 142 * This source code is licensed under the ISC license. 143 * See the LICENSE file in the root directory of this source tree. 144 */const wae=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
144],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],o9=ac("x",wae);function _ae({user:e,onDismiss:n}){const[i,s]=j.useState(!1),[d,h]=j.useState(!1),[f,g]=j.useState(null),[p,x]=j.useState(!1),[y,v]=j.useState(!0),[w,C]=j.useState(!1),{fetchUser:E}=jr();if(j.useEffect(()=>{if(e!=null&&e.email_verified_at){C(!0),v(!1);return}e&&!e.email_verified_at?(async()=>{var R;try{(R=(await ne.get("/auth/user")).data)!=null&&R.email_verified_at&&(C(!0),E())}catch{}v(!1)})():v(!1)},[e==null?void 0:e.email_verified_at]),y)return null;const S=(e==null?void 0:e.role)==="admin"||(e==null?void 0:e.role)==="super_admin",D=(e==null?void 0:e.registration_source)==="wordpress_plugin"||(e==null?void 0:e.registration_source)==="opencart_plugin";if(!e||e.email_verified_at||w||p||S||D)return null;const I=async()=>{var B,R;s(!0),g(null);try{await ne.post("/auth/resend-verification"),h(!0)}catch(F){const V=((R=(B=F.response)==null?void 0:B.data)==null?void 0:R.message)||"Failed to send verification email";V.toLowerCase().includes("already verified")?(C(!0),E()):g(V)}finally{s(!1)}},M=()=>{x(!0),n&&n()};return a.jsx("div",{className:"bg-amber-50 border-l-4 border-amber-400 px-4 py-3 mb-4 relative",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(i9,{className:"h-5 w-5 text-amber-400 flex-shrink-0"}),a.jsx("span",{className:"ml-3 text-sm font-medium text-amber-800",children:"Email Verification Required"}),a.jsx("span",{className:"mx-2 text-amber-300",children:"|"}),d?a.jsxs("span",{className:"flex items-center text-sm text-green-600",children:[a.jsx(hae,{className:"h-4 w-4 mr-1"}),"Verification email sent!"]}):f?a.jsxs("span",{className:"flex items-center text-sm text-red-600",children:[f,a.jsx("button",{onClick:I,className:"ml-2 underline hover:no-underline",children:"Try again"})]}):a.jsxs("button",{onClick:I,disabled:i,className:"inline-flex items-center text-sm font-medium text-amber-700 hover:text-amber-900 underline hover:no-underline disabled:opacity-50",children:[a.jsx(xae,{className:"h-4 w-4 mr-1"}),i?"Sending...":"Resend verification email"]})]}),a.jsx("button",{onClick:M,className:"flex-shrink-0 ml-4 text-amber-400 hover:text-amber-500","aria-label":"Dismiss",children:a.jsx(o9,{className:"h-5 w-5"})})]})})}const Aae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"})}),Cae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),jae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})});function s9({apiPrefix:e="",viewAllPath:n="/user/notifications"}){const[i,s]=j.useState(!1),[d,h]=j.useState(0),[f,g]=j.useState([]),[p,x]=j.useState(!1),y=j.useRef(null),v=Ot(),w=j.useCallback(()=>{ne.get(`${e}/notifications/unread-count`).then(I=>{var M;return h(((M=I.data)==null?void 0:M.count)||0)}).catch(()=>{})},[e]);j.useEffect(()=>{w();const I=setInterval(w,3e4);return()=>clearInterval(I)},[w]),j.useEffect(()=>{const I=M=>{y.current&&!y.current.contains(M.target)&&s(!1)};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[]);const C=()=>{const I=!i;s(I),I&&(x(!0),ne.get(`${e}/notifications`,{params:{per_page:5}}).then(M=>{var B;return g(((B=M.data)==null?void 0:B.data)||[])}).catch(()=>{}).finally(()=>x(!1)))},E=I=>{I.read_at||ne.post(`${e}/notifications/${I.id}/read`).then(()=>{h(M=>Math.max(0,M-1))}).catch(()=>{}),s(!1),I.link&&(I.link.startsWith("/")?v(I.link):window.location.href=I.link)},S=(I,M)=>{I.stopPropagation(),ne.post(`${e}/notifications/${M.id}/read`).then(()=>{h(B=>Math.max(0,B-1)),g(B=>B.map(R=>R.id===M.id?{...R,read_at:new Date().toISOString()}:R))}).catch(()=>{})},D=()=>{ne.post(`${e}/notifications/read-all`).then(()=>{h(0),g(I=>I.map(M=>({...M,read_at:M.read_at||new Date().toISOString()})))}).catch(()=>{})};return a.jsxs("div",{className:"relative",ref:y,children:[a.jsxs("button",{onClick:C,className:"relative p-2 text-gray-500 hover:text-gray-700 rounded-lg hover:bg-gray-100 transition-colors",title:"Notifications",children:[a.jsx(Aae,{className:"w-5 h-5"}),d>0&&a.jsx("span",{className:"absolute -top-0.5 -right-0.5 flex items-center justify-center min-w-[18px] h-[18px] px-1 text-[10px] font-bold text-white bg-red-500 rounded-full",children:d>99?"99+":d})]}),i&&a.jsxs("div",{className:"absolute right-0 mt-2 w-80 bg-white rounded-lg shadow-lg border border-gray-200 z-50",children:[a.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-100",children:[a.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:"Notifications"}),d>0&&a.jsx("button",{onClick:D,className:"text-xs text-primary-600 hover:text-primary-700 font-medium",children:"Mark all as read"})]}),a.jsxs("div",{className:"max-h-80 overflow-y-auto",children:[p&&f.length===0&&a.jsx("div",{className:"px-4 py-6 text-center text-sm text-gray-500",children:"Loading..."}),!p&&f.length===0&&a.jsx("div",{className:"px-4 py-6 text-center text-sm text-gray-500",children:"No notifications yet"}),f.map(I=>a.jsx("div",{className:`relative w-full text-left px-4 py-3 hover:bg-gray-50 border-b border-gray-50 last:border-0 transition-colors cursor-pointer ${I.read_at?"":"bg-primary-50/40"}`,onClick:()=>E(I),children:a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("div",{className:"pt-1.5 flex-shrink-0",children:a.jsx("div",{className:`w-2 h-2 rounded-full ${I.read_at?"bg-transparent":"bg-primary-500"}`})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:`text-sm truncate ${I.read_at?"font-medium text-gray-700":"font-semibold text-gray-900"}`,children:I.title}),a.jsx("p",{className:"text-xs text-gray-500 mt-0.5 line-clamp-2",children:I.message}),a.jsx("p",{className:"text-xs text-gray-400 mt-1",children:I.created_at_human||I.created_at})]}),a.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[!I.read_at&&a.jsx("button",{onClick:M=>S(M,I),className:"p-1 text-gray-400 hover:text-primary-600 hover:bg-primary-50 rounded transition-colors",title:"Mark as read",children:a.jsx(Cae,{className:"w-3.5 h-3.5"})}),I.link&&a.jsx("button",{onClick:M=>{M.stopPropagation(),E(I)},className:"p-1 text-gray-400 hover:text-primary-600 hover:bg-primary-50 rounded transition-colors",title:"View",children:a.jsx(jae,{className:"w-3.5 h-3.5"})})]})]})},I.id))]}),a.jsx("div",{className:"border-t border-gray-100",children:a.jsx("button",{onClick:()=>{s(!1),v(n)},className:"w-full px-4 py-2.5 text-center text-sm font-medium text-primary-600 hover:text-primary-700 hover:bg-gray-50 transition-colors",children:"View All Notifications"})})]})]})}function Ls({src:e,alt:n,fallback:i,className:s,...d}){const[h,f]=j.useState(!1);return h||!e?i||null:a.jsx("img",{src:e,alt:n,className:s,onError:()=>f(!0),...d})}const Nae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"})}),Eae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})}),Sae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),Dae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),Tae=({className:e})=>a.jsxs("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.
144074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),Iae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15M12 9l-3 3m0 0l3 3m-3-3h12.75"})}),Mae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})}),Pae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),Oae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})}),Bae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),Lae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 002.25-2.25V6.75A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25v10.5A2.25 2.25 0 004.5 19.5z"})}),Rae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 01-.657.643 48.39 48.39 0 01-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 01-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 00-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 01-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 00.657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 01-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 005.427-.63 48.05 48.05 0 00.582-4.717.532.532 0 00-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 00.658-.663 48.422 48.422 0 00-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 01-.61-.58v0z"})}),zae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})}),Fae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 15.75l7.5-7.5 7.5 7.5"})}),$ae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"})}),oM=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z"})});function Vae({item:e,isActive:n,location:i}){const s=e.children?e.children.some(g=>i.pathname===g.href||i.pathname.startsWith(g.href)):!1,[d,h]=j.useState(s);if(j.useEffect(()=>{s&&h(!0)},[s]),e.children)return a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>h(!d),className:`w-full flex items-center px-3 py-2.5 text-sm font-medium rounded-lg transition-colors ${s?"bg-primary-50 text-primary-700":"text-gray-700 hover:bg-gray-100"}`,children:[a.jsx(e.icon,{className:`w-5 h-5 mr-3 ${s?"text-primary-600":"text-gray-400"}`}),a.jsx("span",{className:"flex-1 text-left",children:e.name}),a.jsx(zae,{className:`w-4 h-4 transition-transform duration-200 ${d?"rotate-90":""}`})]}),d&&a.jsx("div",{className:"ml-8 mt-1 space-y-1",children:e.children.map(g=>a.jsx(Fn,{to:g.href,className:`block px-3 py-1.5 text-sm rounded-lg transition-colors ${i.pathname===g.href?"bg-primary-50 text-primary-700 font-medium":"text-gray-500 hover:text-gray-700 hover:bg-gray-50"}`,children:g.name},g.name))})]});const f=n(e.href);return a.jsxs(Fn,{to:e.href,className:`flex items-center px-3 py-2.5 text-sm font-medium rounded-lg transition-colors ${f?"bg-primary-50 text-primary-700":"text-gray-700 hover:bg-gray-100"}`,children:[a.jsx(e.icon,{className:`w-5 h-5 mr-3 ${f?"text-primary-600":"text-gray-400"}`}),e.name]})}function Uae({children:e}){var le,je;
144const[n,i]=j.useState(!1),[s,d]=j.useState(!1),[h,f]=j.useState(!1),[g,p]=j.useState({balance:0}),[x,y]=j.useState(!1),[v,w]=j.useState(null),[C,E]=j.useState("BlogBotz"),S=ro(),D=Ot(),{user:I,logout:M,isImpersonating:B,stopImpersonation:R,originalAdmin:F}=jr(),{activeSiteId:V,sites:P,setActiveSite:z,clearSites:W}=ui(),K=!B&&((I==null?void 0:I.role)==="admin"||(I==null?void 0:I.role)==="super_admin"),G=()=>{W(),R(),D("/admin/users")},Z=Array.isArray(P)?P:[];j.useEffect(()=>{ge(),se()},[]);const se=async()=>{try{const Ce=(await ne.get("/website-settings/public")).data;Ce.general&&(Ce.general.site_logo&&w(Ce.general.site_logo),Ce.general.site_name&&E(Ce.general.site_name))}catch(ve){console.error("Failed to load website settings",ve)}},ge=async()=>{try{const ve=await ne.get("/credits");p({balance:ve.data.balance||0})}catch(ve){console.error("Failed to load credits",ve)}},Se=async()=>{try{await ne.post("/auth/logout")}catch(ve){console.error("Logout error:",ve)}finally{M(),D("/user/login")}},Ae=ve=>ve==="/user/dashboard"?S.pathname==="/user/dashboard":ve.includes("/topics/")?S.pathname.startsWith("/user/topics/"):ve.includes("/automation/")?S.pathname.startsWith("/user/automation/"):S.pathname===ve;Z.find(ve=>ve.id===V);const he=ve=>{z(ve),f(!1);const Ce=S.pathname;Ce.startsWith("/automation/")?D(`/user/automation/${ve}`):Ce.startsWith("/topics/")?D(`/user/topics/${ve}`):Ce.startsWith("/categories/")?D(`/user/topics/${ve}`):Ce.includes("/sync/")&&D(`/user/sync/${ve}`)},ee=[{name:"Dashboard",href:"/user/dashboard",icon:Nae},{name:"Blogs",icon:Sae,children:[{name:"All Blogs",href:"/user/blogs"},...V?[{name:"Topics",href:`/user/topics/${V}`},{name:"Content Sync",href:`/user/sync/${V}`},{name:"Automation",href:`/user/automation/${V}`}]:[]]},{name:"Credits",icon:Lae,children:[{name:"Buy Credits",href:"/user/credits"},{name:"Usage History",href:"/user/usages"}]},{name:"Team",href:"/user/team",icon:$ae},{name:"Integrations",href:"/user/integrations",icon:Rae}];return a.jsxs("div",{className:"min-h-screen bg-gray-50",children:[n&&a.jsx("div",{className:"fixed inset-0 z-40 bg-gray-900/50 lg:hidden",onClick:()=>i(!1)}),a.jsxs("aside",{className:`fixed inset-y-0 left-0 z-50 w-64 bg-white border-r border-gray-200 transform transition-transform duration-300 ease-in-out lg:translate-x-0 flex flex-col ${n?"translate-x-0":"-translate-x-full"}`,children:[a.jsxs("div",{className:"flex items-center justify-between h-16 px-6 border-b border-gray-200 flex-shrink-0",children:[a.jsx(Fn,{to:"/user/dashboard",className:"flex items-center",children:a.jsx(Ls,{src:v,alt:C,className:"h-7 w-auto object-contain",fallback:a.jsx("div",{className:"w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center",children:a.jsx("span",{className:"text-white font-bold text-sm",children:"BB"})})})}),a.jsx("button",{onClick:()=>i(!1),className:"lg:hidden p-1 rounded-md text-gray-500 hover:text-gray-700 hover:bg-gray-100",children:a.jsx(Pae,{className:"w-5 h-5"})})]}),Z.length>0&&a.jsxs("div",{className:"px-4 py-3 border-b border-gray-200",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[a.jsx("label",{className:"text-xs font-medium text-gray-500",children:"Active Site"}),a.jsx(Fn,{to:"/user/sites",className:"text-gray-400 hover:text-gray-600 transition-colors",title:"Manage Sites",children:a.jsx(Tae,{className:"w-4 h-4"})})]}),a.jsx("select",{value:V||"",onChange:ve=>he(Number(ve.target.value)),className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg bg-gray-50 focus:ring-2 focus:ring-primary-500 focus:border-primary-500",children:Z.map(ve=>a.jsx("option",{value:ve.id,children:ve.name||ve.url},ve.id))})]}),a.jsxs("nav",{className:"flex-1 overflow-y-auto px-4 py-6 space-y-1",children:[ee.map(ve=>a.jsx(Vae,{item:ve,isActive:Ae,location:S},ve.name)),a.jsx("div",{className:"pt-6",children:a.jsxs("button",{onClick:()=>D("/user/sites/add"),className:"flex items-center w-full px-3 py-2.5 text-sm font-medium text-primary-600 rounded-lg border-2 border-dashed border-primary-200 hover:bg-primary-50 transition-colors",children:[a.jsx(Bae,{className:"w-5 h-5 mr-2"}),"Add New Site"]})})]}),a.jsx("div",{className:"p-4 border-t border-gray-200 flex-shrink-0",children:a.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsx("span",{className:"text-sm font-medium text-gray-900",children:"Credits"}),a.jsx("span",{className:"text-lg font-semibold text-gray-900",children:g.balance})]}),a.jsx("div",{className:"p-[2px] rounded-lg bg-gradient-to-r from-orange-500 to-purple-500",children:a.jsxs("button",{onClick:()=>D("/user/credits"),className:"w-full flex items-center justify-center px-4 py-2.5 text-sm font-medium text-gray-900 rounded-lg bg-white hover:bg-gray-50 transition-colors",children:[a.jsx("div",{className:"w-6 h-6 bg-black rounded-full flex items-center justify-center mr-2",children:a.jsx(Fae,{className:"w-4 h-4 text-white"})}),"Buy Now"]})})]})})]}),a.jsxs("div",{className:"lg:pl-64",children:[a.jsx("header",{className:"sticky top-0 z-30 bg-white border-b border-gray-200",children:a.jsxs("div",{className:"flex items-center justify-between h-16 px-4 sm:px-6 lg:px-8",children:[a.jsx("button",{onClick:()=>i(!0),className:"lg:hidden p-2 rounded-md text-gray-500 hover:text-gray-700 hover:bg-gray-100",children:a.jsx(Mae,{className:"w-6 h-6"})}),a.jsx("div",{className:"hidden lg:block",children:a.jsx("h1",{className:"text-lg font-semibold text-gray-900",children:(()=>{for(const ve of ee){if(ve.href&&Ae(ve.href))return ve.name;if(ve.children){const Ce=ve.children.find(Q=>Ae(Q.href));if(Ce)return Ce.name}}return"Dashboard"})()})}),a.jsxs("div",{className:"flex items-center space-x-4",children:[B&&a.jsxs("div",{className:"flex items-center space-x-3 px-4 py-2 rounded-lg bg-amber-100 border border-amber-300",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("svg",{className:"w-4 h-4 text-amber-600",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),a.jsxs("span",{className:"text-sm font-medium text-amber-800",children:["Viewing as: ",a.jsx("span",{className:"font-semibold",children:I==null?void 0:I.name})]})]}),a.jsx("button",{onClick:G,className:"px-3 py-1 text-xs font-medium text-white bg-amber-600 rounded hover:bg-amber-700 transition-colors",children:"Stop & Return"})]}),K&&a.jsxs("button",{onClick:()=>y(!0),className:"flex items-center space-x-2 px-3 py-2 rounded-lg bg-red-100 hover:bg-red-200 text-red-700 transition-colors",children:[a.jsx(oM,{className:"w-4 h-4"}),a.jsx("span",{className:"text-sm font-medium hidden sm:inline",children:"Admin Panel"})]}),a.jsx(s9,{viewAllPath:"/user/notifications"}),a.jsxs("div",{className:"relative",children:[a.jsxs("button",{onClick:()=>d(!s),className:"flex items-center space-x-3 p-2 rounded-lg hover:bg-gray-100 transition-colors",children:[a.jsx("div",{className:"w-8 h-8 bg-primary-100 rounded-full flex items-center justify-center",children:I!=null&&I.avatar?a.jsx("img",{src:I.avatar,alt:"",className:"w-8 h-8 rounded-full object-cover"}):a.jsx("span",{className:"text-primary-600 font-medium text-sm",children:((je=(le=I==null?void 0:I.name)==null?void 0:le.charAt(0))==null?void 0:je.toUpperCase())||"U"})}),a.jsx("span",{className:"hidden sm:block text-sm font-medium text-gray-700",children:I==null?void 0:I.name}),a.jsx(Oae,{className:"w-4 h-4 text-gray-500"})]}),s&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>d(!1)}),a.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-20",children:[a.jsxs(Fn,{to:"/user/profile",onClick:()=>d(!1),className:"flex items-center px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:[a.jsx(Dae,{className:"w-4 h-4 mr-3 text-gray-400"}),"Profile"]}),a.jsxs(Fn,{to:"/user/sites",onClick:()=>d(!1),className:"flex items-center px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:[a.jsx(Eae,{className:"w-4 h-4 mr-3 text-gray-400"}),"Sites"]}),a.jsx("hr",{className:"my-1 border-gray-200"}),a.jsxs("button",{onClick:Se,className:"flex items-center w-full px-4 py-2 text-sm text-red-600 hover:bg-red-50",children:[a.jsx(Iae,{className:"w-4 h-4 mr-3"}),"Logout"]})]})]})]})]})]})}),a.jsxs("main",{className:"min-h-[calc(100vh-4rem-3rem)]",children:[a.jsx("div",{className:"px-4 sm:px-6 lg:px-8 pt-4",children:a.jsx(_ae,{user:I})}),e]}),a.jsx("footer",{className:"bg-white border-t border-gray-200 py-4 px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between text-sm text-gray-500",children:[a.jsxs("p",{children:["© ",new Date().getFullYear()," BlogBotz. All rights reserved."]}),a.jsxs("div",{className:"flex items-center space-x-4 mt-2 sm:mt-0",children:[a.jsx("a",{href:"#",className:"hover:text-gray-700",children:"Help"}),a.jsx("a",{href:"#",className:"hover:text-gray-700",children:"Privacy"}),a.jsx("a",{href:"#",className:"hover:text-gray-700",children:"Terms"})]})]})})]}),x&&a.jsx("div",{className:"fixed inset-0 z-[100] overflow-y-auto",children:a.jsxs("div",{className:"flex min-h-full items-center justify-center p-4",children:[a.jsx("div",{className:"fixed inset-0 bg-gray-900/50 transition-opacity",onClick:()=>y(!1)}),a.jsxs("div",{className:"relative bg-white rounded-xl shadow-xl max-w-md w-full p-6 z-10",children:[a.jsx("div",{className:"flex items-center justify-center w-12 h-12 mx-auto mb-4 bg-red-100 rounded-full",children:a.jsx(oM,{className:"w-6 h-6 text-red-600"})}),a.jsx("h3",{className:"text-lg font-semibold text-gray-900 text-center mb-2",children:"Return to Admin Panel"}),a.jsx("p",{className:"text-sm text-gray-600 text-center mb-6",children:"You are currently viewing the user panel. Would you like to return to the admin panel?"}),a.jsxs("div",{className:"flex space-x-3",children:[a.jsx("button",{onClick:()=>y(!1),className:"flex-1 px-4 py-2.5 text-sm font-medium text-gray-700 bg-gray-100 rounded-lg hover:bg-gray-200 transition-colors",children:"Stay Here"}),a.jsx("button",{onClick:()=>{y(!1),D("/admin/dashboard")},className:"flex-1 px-4 py-2.5 text-sm font-medium text-white bg-red-600 rounded-lg hover:bg-red-700 transition-colors",children:"Go to Admin Panel"})]})]})]})})]})}const Wae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),Hae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})}),Gae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"})}),qae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),Kae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),sM={error:{container:"bg-red-50 border-red-200 text-red-800",icon:qae,iconClass:"text-red-500"},success:{container:"bg-emerald-50 border-emerald-200 text-emerald-800",icon:Wae,iconClass:"text-emerald-500"},warning:{container:"bg-amber-50 border-amber-200 text-amber-800",icon:Hae,iconClass:"text-amber-500"},info:{container:"bg-blue-50 border-blue-200 text-blue-800",icon:Gae,iconClass:"text-blue-500"}};function en({type:e="error",message:n,onClose:i,children:s,autoClose:d=null}){const h=sM[e]||sM.error,f=h.icon;return Rd.useEffect(()=>{if(!i)return;const g=d===null?e==="success"?4e3:null:d===!1?null:Number(d);if(!g||g<=0)return;const p=setTimeout(i,g);return()=>clearTimeout(p)},[e,d,i,n]),a.jsxs("div",{role:e==="error"?"alert":"status","aria-live":e==="error"?"assertive":"polite",className:`flex items-start gap-3 p-4 rounded-lg border mb-4 ${h.container}`,children:[a.jsx(f,{className:`w-5 h-5 flex-shrink-0 mt-0.5 ${h.iconClass}`}),a.jsxs("div",{className:"flex-1 text-sm font-medium",children:[n&&a.jsx("p",{children:n}),s]}),i&&a.jsx("button",{onClick:i,"aria-label":"Dismiss",className:"flex-shrink-0 p-1 rounded-md hover:bg-black/5 transition-colors",children:a.jsx(Kae,{className:"w-4 h-4"})})]})}const T5e=({className:e="w-5 h-5"})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),I5e=({className:e="w-5 h-5"})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})}),M5e=({className:e="w-5 h-5"})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})}),P5e=({className:e="w-5 h-5"})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 15.75l7.5-7.5 7.5 7.5"})}),O5e=({className:e="w-5 h-5"})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})}),B5e=({className:e="w-5 h-5"})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),aM=({className:e="w-5 h-5"})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),L5e=({className:e="w-5 h-5"})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})}),R5e=({className:e="w-5 h-5"})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})}),zw=({className:e="w-5 h-5"})=>a.jsxs("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",
144children:[a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),Fw=({className:e="w-5 h-5"})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})}),uh=({className:e="w-5 h-5"})=>a.jsxs("svg",{className:`animate-spin ${e}`,fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),kd={appName:"BlogBotz"};function Yae(){const[e,n]=j.useState(""),[i,s]=j.useState(""),[d,h]=j.useState(!1),[f,g]=j.useState({}),[p,x]=j.useState(""),[y,v]=j.useState(""),[w,C]=j.useState(!1),[E,S]=j.useState(!1),[D,I]=j.useState(!1),[M,B]=j.useState(!1),[R,F]=j.useState(!1),[V,P]=j.useState("password"),[z,W]=j.useState(""),[K,G]=j.useState(kd.appName),Z=Ot(),[se]=Do(),{setAuth:ge}=jr(),Se=se.get("redirect")||"/user/dashboard";j.useEffect(()=>{const Q=se.get("error"),te=se.get("success");Q&&x(decodeURIComponent(Q)),te&&v(decodeURIComponent(te))},[se]),j.useEffect(()=>{Ae()},[]);const Ae=async()=>
144{try{const te=(await ne.get("/website-settings/public")).data.general||{},pe=te.site_logo||te.footer_logo;pe&&W(pe),te.site_name&&G(te.site_name)}catch(Q){console.error("Failed to load website settings:",Q)}},he=()=>e?/\S+@\S+\.\S+/.test(e)?!0:(g({email:"Please enter a valid email address"}),!1):(g({email:"Email is required"}),!1),ee=()=>{const Q={};return e?/\S+@\S+\.\S+/.test(e)||(Q.email="Please enter a valid email address"):Q.email="Email is required",i||(Q.password="Password is required"),g(Q),Object.keys(Q).length===0},le=async()=>{S(!0),x("");try{const Q=await ne.get("/auth/google/redirect");window.location.href=Q.data.auth_url}catch{x("Failed to initiate Google login. Please try again."),S(!1)}},je=async()=>{I(!0),x("");try{const Q=await ne.get("/auth/facebook/redirect");window.location.href=Q.data.auth_url}catch{x("Failed to initiate Facebook login. Please try again."),I(!1)}},ve=async Q=>{var te,pe,be,Oe;if(Q.preventDefault(),x(""),v(""),g({}),!!he()){B(!0);try{await ne.post("/auth/magic-link/request",{email:e}),F(!0),v("Magic link sent! Check your email and click the link to sign in.")}catch(at){(pe=(te=at.response)==null?void 0:te.data)!=null&&pe.errors?g(at.response.data.errors):x(((Oe=(be=at.response)==null?void 0:be.data)==null?void 0:Oe.message)||"Failed to send magic link. Please try again.")}finally{B(!1)}}},Ce=async Q=>{var te,pe,be,Oe;if(Q.preventDefault(),x(""),v(""),g({}),!!ee()){C(!0);try{const at=await ne.post("/auth/login",{email:e,password:i}),re=at.data.user;ge(re,at.data.token),re.role==="admin"||re.role==="super_admin"?Z("/admin/dashboard"):Z(Se)}catch(at){(pe=(te=at.response)==null?void 0:te.data)!=null&&pe.errors?g(at.response.data.errors):x(((Oe=(be=at.response)==null?void 0:be.data)==null?void 0:Oe.message)||"Invalid email or password. Please try again.")}finally{C(!1)}}};return a.jsxs("div",{className:"min-h-screen flex relative",children:[a.jsxs("div",{className:"hidden lg:flex lg:w-1/2 bg-gradient-to-br from-blue-600 via-blue-700 to-blue-800 fixed left-0 top-0 h-screen z-0 overflow-hidden",children:[a.jsx("div",{className:"absolute inset-0 opacity-[0.07]",children:a.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[a.jsx("defs",{children:a.jsx("pattern",{id:"grid-login",width:"8",height:"8",patternUnits:"userSpaceOnUse",children:a.jsx("path",{d:"M 8 0 L 0 0 0 8",fill:"none",stroke:"white",strokeWidth:"0.5"})})}),a.jsx("rect",{width:"100",height:"100",fill:"url(#grid-login)"})]})}),a.jsx("div",{className:"absolute top-32 right-16 w-40 h-40 bg-blue-400/20 rounded-full blur-3xl"}),a.jsx("div",{className:"absolute bottom-32 left-16 w-56 h-56 bg-blue-300/15 rounded-full blur-3xl"}),a.jsxs("div",{className:"relative z-10 flex flex-col justify-center h-full px-8 xl:px-16 w-full",children:[a.jsxs("div",{className:"mb-6",children:[z?a.jsx("div",{className:"inline-block bg-white rounded-xl px-4 py-2 shadow-lg",children:a.jsx(Ls,{src:z.startsWith("http")?z:`/storage/${z}`,alt:K,className:"h-10 w-auto object-contain",fallback:null})}):null,a.jsx("div",{className:`w-12 h-12 bg-white rounded-xl items-center justify-center shadow-lg ${z?"hidden":"flex"}`,children:a.jsx("span",{className:"text-blue-600 font-bold text-lg",children:"BB"})})]}),a.jsxs("h1",{className:"text-3xl xl:text-4xl font-bold text-white leading-tight mb-4",children:["Automate Your Blog,",a.jsx("br",{}),a.jsx("span",{className:"text-blue-200",children:"Amplify Your Reach"})]}),a.jsxs("p",{className:"text-base text-blue-100 mb-6 max-w-md",children:["Join thousands of content creators who save hours every week with ",kd.appName,"."]}),a.jsxs("div",{className:"space-y-3 mb-6",children:[a.jsxs("div",{className:"flex items-center gap-3 text-white",children:[a.jsx("div",{className:"w-7 h-7 bg-white/20 rounded-lg flex items-center justify-center flex-shrink-0",children:a.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),a.jsx("span",{className:"text-sm",children:"AI-powered content generation"})]}),a.jsxs("div",{className:"flex items-center gap-3 text-white",children:[a.jsx("div",{className:"w-7 h-7 bg-white/20 rounded-lg flex items-center justify-center flex-shrink-0",children:a.jsx("svg",{className:"w-4 h-4",fill:"
144currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),a.jsx("span",{className:"text-sm",children:"Schedule posts in advance"})]}),a.jsxs("div",{className:"flex items-center gap-3 text-white",children:[a.jsx("div",{className:"w-7 h-7 bg-white/20 rounded-lg flex items-center justify-center flex-shrink-0",children:a.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),a.jsx("span",{className:"text-sm",children:"Multi-platform integration"})]})]}),a.jsxs("div",{className:"p-4 bg-white/10 backdrop-blur-sm rounded-xl border border-white/20 max-w-md",children:[a.jsx("div",{className:"flex items-center gap-1 mb-2",children:[1,2,3,4,5].map(Q=>a.jsx("svg",{className:"w-4 h-4 text-yellow-400",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})},Q))}),a.jsxs("p",{className:"text-white text-sm italic mb-2",children:['"',kd.appName,' has completely transformed how I manage my content. I save at least 10 hours every week!"']}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-blue-300 to-blue-400 rounded-full flex items-center justify-center text-white font-semibold text-sm",children:"S"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-white font-medium text-xs",children:"Sarah Johnson"}),a.jsx("p",{className:"text-blue-200 text-xs",children:"Content Creator"})]})]})]})]})]}),a.jsx("div",{className:"flex-1 lg:ml-[50%] min-h-screen lg:min-h-0 lg:h-screen bg-gray-50 relative z-10 lg:overflow-hidden",children:a.jsx("div",{className:"flex flex-col justify-center h-full px-6 sm:px-8 lg:px-10 xl:px-12 py-6 lg:py-4",children:a.jsxs("div",{className:"w-full max-w-md mx-auto",children:[a.jsx("div",{className:"lg:hidden flex items-center justify-center gap-3 mb-6",children:a.jsx(Ls,{src:z?z.startsWith("http")?z:`/storage/${z}`:null,alt:K,className:"h-8 w-auto object-contain",fallback:a.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-lg flex items-center justify-center shadow-lg",children:a.jsx("span",{className:"text-white font-bold text-sm",children:"BB"})})})}),a.jsxs("div",{className:"text-center lg:text-left mb-5",children:[a.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-1",children:"Welcome back"}),a.jsx("p",{className:"text-sm text-gray-600",children:"Sign in to continue to your dashboard"})]}),p&&a.jsx("div",{className:"mb-4",children:a.jsx(en,{type:"error",message:p,onClose:()=>x("")})}),y&&a.jsx("div",{className:"mb-4",children:a.jsx(en,{type:"success",message:y,onClose:()=>v("")})}),a.jsxs("div",{className:"flex mb-4 bg-gray-100 rounded-lg p-1",children:[a.jsx("button",{type:"button",onClick:()=>{P("password"),F(!1),x(""),v("")},className:`flex-1 py-2 px-3 rounded-md text-sm font-medium transition-all ${V==="password"?"bg-white text-gray-900 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:"Password"}),a.jsx("button",{type:"button",onClick:()=>{P("magic"),x(""),v("")},className:`flex-1 py-2 px-3 rounded-md text-sm font-medium transition-all ${V==="magic"?"bg-white text-gray-900 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:"Magic Link"})]}),V==="password"?a.jsxs("form",{onSubmit:Ce,className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-1",children:"Email address"}),a.jsx("input",{id:"email",type:"email",value:e,onChange:Q=>n(Q.target.value),className:`w-full px-3 py-2.5 rounded-lg border text-sm ${f.email?"border-red-300 bg-red-50":"border-gray-300"} focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors`,placeholder:"[email protected]"}),f.email&&a.jsx("p",{className:"mt-1 text-xs text-red-600",children:f.email})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-1",children:"Password"}),a.jsxs("div",{className:"relative",children:[a.jsx("input",{id:"password",type:d?"text":"password",value:i,onChange:Q=>s(Q.target.value),className:`w-full px-3 py-2.5 pr-10 rounded-lg border text-sm ${f.password?"border-red-300 bg-red-50":"border-gray-300"} focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors`,placeholder:"Enter your password"}),a.jsx("button",{type:"button",onClick:()=>h(!d),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:d?a.jsx(Fw,{className:"w-4 h-4"}):a.jsx(zw,{className:"w-4 h-4"})})]}),f.password&&a.jsx("p",{className:"mt-1 text-xs text-red-600",children:f.password})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[a.jsx("input",{type:"checkbox",className:"w-3.5 h-3.5 rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),a.jsx("span",{className:"text-xs text-gray-600",children:"Remember me"})]}),a.jsx(Fn,{to:"/forgot-password",className:"text-xs font-medium text-blue-600 hover:text-blue-700",children:"Forgot password?"})]}),a.jsx("button",{type:"submit",disabled:w,className:"w-full py-2.5 px-4 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg shadow-md shadow-blue-600/25 hover:shadow-blue-600/35 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2 text-sm",children:w?a.jsxs(a.Fragment,{children:[a.jsx(uh,{className:"w-4 h-4"}),"Signing in..."]}):"Sign in"})]}):a.jsxs("form",{onSubmit:ve,className:"space-y-3",children:[a.jsx("div",{className:"p-3 bg-purple-50 border border-purple-100 rounded-lg",children:a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("svg",{className:"w-4 h-4 text-purple-600 mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-purple-900",children:"No password needed!"}),a.jsx("p",{className:"text-xs text-purple-700",children:"We'll send a secure login link to your email."})]})]})}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"magic-email",className:"block text-sm font-medium text-gray-700 mb-1",children:"Email address"}
144),a.jsx("input",{id:"magic-email",type:"email",value:e,onChange:Q=>n(Q.target.value),className:`w-full px-3 py-2.5 rounded-lg border text-sm ${f.email?"border-red-300 bg-red-50":"border-gray-300"} focus:ring-2 focus:ring-purple-500 focus:border-purple-500 transition-colors`,placeholder:"[email protected]"}),f.email&&a.jsx("p",{className:"mt-1 text-xs text-red-600",children:f.email})]}),a.jsx("button",{type:"submit",disabled:M||R,className:"w-full py-2.5 px-4 bg-purple-600 hover:bg-purple-700 text-white font-semibold rounded-lg shadow-md shadow-purple-600/25 hover:shadow-purple-600/35 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2 text-sm",children:M?a.jsxs(a.Fragment,{children:[a.jsx(uh,{className:"w-4 h-4"}),"Sending..."]}):R?a.jsxs(a.Fragment,{children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),"Check your email"]}):a.jsxs(a.Fragment,{children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})}),"Send Magic Link"]})}),R&&a.jsx("button",{type:"button",onClick:()=>{F(!1),v("")},className:"w-full py-1.5 text-xs text-purple-600 hover:text-purple-700 font-medium",children:"Send another link"})]}),a.jsxs("div",{className:"relative my-4",children:[a.jsx("div",{className:"absolute inset-0 flex items-center",children:a.jsx("div",{className:"w-full border-t border-gray-200"})}),a.jsx("div",{className:"relative flex justify-center",children:a.jsx("span",{className:"px-3 bg-gray-50 text-xs text-gray-500",children:"Or continue with"})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("button",{type:"button",onClick:le,disabled:E,className:"w-full py-2.5 px-4 bg-white border border-gray-300 rounded-lg font-medium text-gray-700 hover:bg-gray-50 hover:border-gray-400 transition-all duration-200 flex items-center justify-center gap-2 disabled:opacity-50 text-sm",children:[E?a.jsx(uh,{className:"w-4 h-4 text-gray-400"}):a.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",children:[a.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),a.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),a.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),a.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),"Continue with Google"]}),a.jsxs("button",{type:"button",onClick:je,disabled:D,className:"w-full py-2.5 px-4 bg-[#1877F2] border border-[#1877F2] rounded-lg font-medium text-white hover:bg-[#166FE5] transition-all duration-200 flex items-center justify-center gap-2 disabled:opacity-50 text-sm",children:[D?a.jsx(uh,{className:"w-4 h-4 text-white"}):a.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})}),"Continue with Facebook"]})]}),a.jsxs("p",{className:"mt-4 text-center text-sm text-gray-600",children:["Don't have an account?"," ",a.jsx(Fn,{to:`/signup${Se!=="/user/dashboard"?`?redirect=${encodeURIComponent(Se)}`:""}`,className:"font-semibold text-blue-600 hover:text-blue-700",children:"Create one for free"})]})]})})})]})}function Qae(){const[e,n]=j.useState(""),[i,s]=j.useState(""),[d,h]=j.useState(""),[f,g]=j.useState(!1),[p,x]=j.useState(!1),[y,v]=j.useState({}),[w,C]=j.useState(""),[E,S]=j.useState(!1),[D,I]=j.useState(!1),[M,B]=j.useState(""),[R,F]=j.useState(kd.appName),V=Ot(),[P]=Do(),{setAuth:z}=jr(),W=P.get("redirect")||"/user/dashboard",K=he=>he?he.split("@")[0].replace(/[._-]/g," ").split(" ").map(le=>le.charAt(0).toUpperCase()+le.slice(1)).join(" "):"";j.useEffect(()=>{G()},[]);const G=async()=>
144{try{const ee=(await ne.get("/website-settings/public")).data.general||{},le=ee.site_logo||ee.footer_logo;le&&B(le),ee.site_name&&F(ee.site_name)}catch(he){console.error("Failed to load website settings:",he)}},Z=[{met:i.length>=8,text:"At least 8 characters"},{met:/[A-Z]/.test(i),text:"One uppercase letter"},{met:/[a-z]/.test(i),text:"One lowercase letter"},{met:/[0-9]/.test(i),text:"One number"}],se=()=>{const he={};return e?/\S+@\S+\.\S+/.test(e)||(he.email="Please enter a valid email address"):he.email="Email is required",i?i.length<8&&(he.password="Password must be at least 8 characters"):he.password="Password is required",d?i!==d&&(he.passwordConfirmation="Passwords do not match"):he.passwordConfirmation="Please confirm your password",D||(he.terms="You must accept the Terms and Privacy Policy"),v(he),Object.keys(he).length===0},ge=async()=>{S(!0),C("");try{const he=await ne.get("/auth/google/redirect");window.location.href=he.data.auth_url}catch{C("Failed to initiate Google signup. Please try again."),S(!1)}},Se=async()=>{S(!0),C("");try{const he=await ne.get("/auth/facebook/redirect");window.location.href=he.data.auth_url}catch{C("Failed to initiate Facebook signup. Please try again."),S(!1)}},Ae=async he=>{var le,je,ve,Ce;if(he.preventDefault(),C(""),v({}),!se())return;S(!0);const ee=K(e);try{const Q=await ne.post("/auth/register",{name:ee,email:e,password:i,password_confirmation:d});z(Q.data.user,Q.data.token),V(W)}catch(Q){(je=(le=Q.response)==null?void 0:le.data)!=null&&je.errors?v(Q.response.data.errors):C(((Ce=(ve=Q.response)==null?void 0:ve.data)==null?void 0:Ce.message)||"Registration failed. Please try again.")}finally{S(!1)}};return a.jsxs("div",{className:"min-h-screen flex relative",children:[a.jsxs("div",{className:"hidden lg:flex lg:w-1/2 bg-gradient-to-br from-blue-600 via-blue-700 to-blue-800 fixed left-0 top-0 h-screen z-0 overflow-hidden",children:[a.jsx("div",{className:"absolute inset-0 opacity-[0.07]",children:a.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[a.jsx("defs",{children:a.jsx("pattern",{id:"grid-signup",width:"8",height:"8",patternUnits:"userSpaceOnUse",children:a.jsx("path",{d:"M 8 0 L 0 0 0 8",fill:"none",stroke:"white",strokeWidth:"0.5"})})}),a.jsx("rect",{width:"100",height:"100",fill:"url(#grid-signup)"})]})}),a.jsx("div",{className:"absolute top-32 right-16 w-40 h-40 bg-blue-400/20 rounded-full blur-3xl"}),a.jsx("div",{className:"absolute bottom-32 left-16 w-56 h-56 bg-blue-300/15 rounded-full blur-3xl"}),a.jsxs("div",{className:"relative z-10 flex flex-col justify-center h-full px-8 xl:px-16 w-full",children:[a.jsxs("div",{className:"mb-6",children:[M?a.jsx("div",{className:"inline-block bg-white rounded-xl px-4 py-2 shadow-lg",children:a.jsx(Ls,{src:M.startsWith("http")?M:`/storage/${M}`,alt:R,className:"h-10 w-auto object-contain",fallback:null})}):null,a.jsx("div",{className:`w-12 h-12 bg-white rounded-xl items-center justify-center shadow-lg ${M?"hidden":"flex"}`,children:a.jsx("span",{className:"text-blue-600 font-bold text-lg",children:"BB"})})]}),a.jsxs("h1",{className:"text-3xl xl:text-4xl font-bold text-white leading-tight mb-4",children:["Start Your Journey",a.jsx("br",{}),a.jsx("span",{className:"text-blue-200",children:"Today"})]}),a.jsx("p",{className:"text-base text-blue-100 mb-6 max-w-md",children:"Create your free account and discover how AI can transform your content creation workflow."}),a.jsxs("div",{className:"space-y-3 mb-6",children:[a.jsxs("div",{className:"flex items-center gap-3 text-white",children:[a.jsx("div",{className:"w-7 h-7 bg-white/20 rounded-lg flex items-center justify-center flex-shrink-0",children:a.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),a.jsx("span",{className:"text-sm",children:"No credit card required"})]}),a.jsxs("div",{className:"flex items-center gap-3 text-white",children:[a.jsx("div",{className:"w-7 h-7 bg-white/20 rounded-lg flex items-center justify-center flex-shrink-0",children:a.jsx("svg",{className:"w-4 h-4",fill:"
144currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),a.jsx("span",{className:"text-sm",children:"Free forever plan available"})]}),a.jsxs("div",{className:"flex items-center gap-3 text-white",children:[a.jsx("div",{className:"w-7 h-7 bg-white/20 rounded-lg flex items-center justify-center flex-shrink-0",children:a.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),a.jsx("span",{className:"text-sm",children:"Setup in under 5 minutes"})]})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-4 max-w-md",children:[a.jsxs("div",{className:"text-center p-3 bg-white/10 rounded-xl",children:[a.jsx("p",{className:"text-2xl font-bold text-white",children:"10K+"}),a.jsx("p",{className:"text-blue-200 text-xs",children:"Active Users"})]}),a.jsxs("div",{className:"text-center p-3 bg-white/10 rounded-xl",children:[a.jsx("p",{className:"text-2xl font-bold text-white",children:"500K+"}),a.jsx("p",{className:"text-blue-200 text-xs",children:"Posts Created"})]}),a.jsxs("div",{className:"text-center p-3 bg-white/10 rounded-xl",children:[a.jsx("p",{className:"text-2xl font-bold text-white",children:"99%"}),a.jsx("p",{className:"text-blue-200 text-xs",children:"Satisfaction"})]})]})]})]}),a.jsx("div",{className:"flex-1 lg:ml-[50%] min-h-screen lg:min-h-0 lg:h-screen bg-gray-50 relative z-10 lg:overflow-hidden",children:a.jsx("div",{className:"flex flex-col justify-center h-full px-6 sm:px-8 lg:px-10 xl:px-12 py-6 lg:py-4",children:a.jsxs("div",{className:"w-full max-w-md mx-auto",children:[a.jsx("div",{className:"lg:hidden flex items-center justify-center gap-3 mb-4",children:a.jsx(Ls,{src:M?M.startsWith("http")?M:`/storage/${M}`:null,alt:R,className:"h-8 w-auto object-contain",fallback:a.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-lg flex items-center justify-center shadow-lg",children:a.jsx("span",{className:"text-white font-bold text-sm",children:"BB"})})})}),a.jsxs("div",{className:"text-center lg:text-left mb-4",children:[a.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-1",children:"Create your account"}),a.jsx("p",{className:"text-sm text-gray-600",children:"Get started with your free account today"})]}),w&&a.jsx("div",{className:"mb-3",children:a.jsx(en,{type:"error",message:w,onClose:()=>C("")})}),a.jsxs("div",{className:"space-y-2 mb-4",children:[a.jsxs("button",{type:"button",onClick:ge,disabled:E,className:"w-full py-2.5 px-4 bg-white border border-gray-300 rounded-lg font-medium text-gray-700 hover:bg-gray-50 hover:border-gray-400 transition-all duration-200 flex items-center justify-center gap-2 disabled:opacity-50 text-sm",children:[a.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",children:[a.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),a.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),a.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),a.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),"Continue with Google"]}),a.jsxs("button",{type:"button",onClick:Se,disabled:E,className:"w-full py-2.5 px-4 bg-[#1877F2] border border-[#1877F2] rounded-lg font-medium text-white hover:bg-[#166FE5] transition-all duration-200 flex items-center justify-center gap-2 disabled:opacity-50 text-sm",children:[a.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})}),"Continue with Facebook"]})]}),a.jsxs("div",{className:"relative mb-4",children:[a.jsx("div",{className:"absolute inset-0 flex items-center",children:a.jsx("div",{className:"w-full border-t border-gray-200"})}),a.jsx("div",{className:"relative flex justify-center",children:a.jsx("span",{className:"px-3 bg-gray-50 text-xs text-gray-500",children:"Or sign up with email"})})]}),a.jsxs("form",{onSubmit:Ae,className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-1",children:"Email address"}
144),a.jsx("input",{id:"email",type:"email",value:e,onChange:he=>n(he.target.value),className:`w-full px-3 py-2 rounded-lg border text-sm ${y.email?"border-red-300 bg-red-50":"border-gray-300"} focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors`,placeholder:"[email protected]"}),y.email&&a.jsx("p",{className:"mt-1 text-xs text-red-600",children:y.email})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-1",children:"Password"}),a.jsxs("div",{className:"relative",children:[a.jsx("input",{id:"password",type:f?"text":"password",value:i,onChange:he=>s(he.target.value),className:`w-full px-3 py-2 pr-10 rounded-lg border text-sm ${y.password?"border-red-300 bg-red-50":"border-gray-300"} focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors`,placeholder:"Create a strong password"}),a.jsx("button",{type:"button",onClick:()=>g(!f),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:f?a.jsx(Fw,{className:"w-4 h-4"}):a.jsx(zw,{className:"w-4 h-4"})})]}),y.password&&a.jsx("p",{className:"mt-1 text-xs text-red-600",children:y.password}),i&&a.jsx("div",{className:"mt-1.5 flex flex-wrap gap-x-3 gap-y-1",children:Z.map((he,ee)=>a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(aM,{className:`w-3 h-3 ${he.met?"text-green-500":"text-gray-300"}`}),a.jsx("span",{className:`text-xs ${he.met?"text-green-600":"text-gray-400"}`,children:he.text})]},ee))})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"passwordConfirmation",className:"block text-sm font-medium text-gray-700 mb-1",children:"Confirm password"}),a.jsxs("div",{className:"relative",children:[a.jsx("input",{id:"passwordConfirmation",type:p?"text":"password",value:d,onChange:he=>h(he.target.value),className:`w-full px-3 py-2 pr-10 rounded-lg border text-sm ${y.passwordConfirmation?"border-red-300 bg-red-50":"border-gray-300"} focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors`,placeholder:"Confirm your password"}),a.jsx("button",{type:"button",onClick:()=>x(!p),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:p?a.jsx(Fw,{className:"w-4 h-4"}):a.jsx(zw,{className:"w-4 h-4"})})]}),y.passwordConfirmation&&a.jsx("p",{className:"mt-1 text-xs text-red-600",children:y.passwordConfirmation}),i&&d&&i===d&&a.jsxs("p",{className:"mt-1 text-xs text-green-600 flex items-center gap-1",children:[a.jsx(aM,{className:"w-3 h-3"})," Passwords match"]})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("input",{type:"checkbox",id:"terms",checked:D,onChange:he=>I(he.target.checked),className:`mt-0.5 w-3.5 h-3.5 rounded border-gray-300 text-blue-600 focus:ring-blue-500 ${y.terms?"border-red-300":""}`}),a.jsxs("label",{htmlFor:"terms",className:"text-xs text-gray-600",children:["I agree to the"," ",a.jsx("a",{href:"/terms",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-700 font-medium",children:"Terms"})," ","and"," ",a.jsx("a",{href:"/privacy",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-700 font-medium",children:"Privacy Policy"})]})]}),y.terms&&a.jsx("p",{className:"mt-1 text-xs text-red-600",children:y.terms})]}),a.jsx("button",{type:"submit",disabled:E,className:"w-full py-2.5 px-4 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg shadow-md shadow-blue-600/25 hover:shadow-blue-600/35 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2 text-sm mt-4",children:E?a.jsxs(a.Fragment,{children:[a.jsx(uh,{className:"w-4 h-4"}),"Creating account..."]}):"Create account"})]}),a.jsxs("p",{className:"mt-4 text-center text-sm text-gray-600",children:["Already have an account?"," ",a.jsx(Fn,{to:`/login${W!=="/user/dashboard"?`?redirect=${encodeURIComponent(W)}`:""}`,className:"font-semibold text-blue-600 hover:text-blue-700",children:"Sign in"})]})]})})})]})}function Zae(){const[e]=Do(),n=Ot(),[i,s]=j.useState("Verifying your email..."),[d,h]=j.useState("loading");return j.useEffect(()=>{const f=e.get("token");if(console.log("Verification token from URL:",f),!f){n("/user/login?error="+encodeURIComponent("No verification token provided. Please use the link from your email."));return}ne.get(`/auth/verify-email/${f}`).then(g=>{var x;console.log("Verification success:",g.data),(((x=g.data)==null?void 0:x.message)||"Email verified successfully!").includes("already verified")?(s("Email is already verified!"),h("success"),setTimeout(()=>{n("/user/login?success="+encodeURIComponent("Email is already verified. You can log in now."))},1500)):(s("Email verified successfully!"),h("success"),setTimeout(()=>{n("/user/login?success="+encodeURIComponent("Email verified successfully! You can now log in."))},1500))}).catch(g=>{var x,y,v;console.error("Verification error:",((x=g.response)==null?void 0:x.data)||g);const p=((v=(y=g.response)==null?void 0:y.data)==null?void 0:v.message)||"Invalid or expired verification token";h("redirecting"),s("Verification failed. Redirecting..."),setTimeout(()=>{n("/user/login?error="+encodeURIComponent(p+". Try using Magic Link to sign in - it will also verify your email."))},1e3)})},[e,n]),a.jsxs("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#f3f4f6"},children:[a.jsxs("div",{style:{background:"white",padding:"2rem",borderRadius:"12px",boxShadow:"0 4px 6px -1px rgba(0,0,0,0.1)",width:"100%",maxWidth:"400px",textAlign:"center"},children:[d==="loading"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{marginBottom:"1rem"},children:a.jsxs("svg",{style:{width:"48px",height:"48px",animation:"spin 1s linear infinite",color:"#4F46E5",margin:"0 auto"},fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{style:{opacity:.25},cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{style:{opacity:.75},fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),a.jsx("p",{style:{color:"#6B7280",fontWeight:500},children:i})]}),d==="success"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{width:"48px",height:"48px",background:"#D1FAE5",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 1rem"},children:a.jsx("svg",{style:{width:"24px",height:"24px",color:"#059669"},fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})}),a.jsx("p",{style:{color:"#059669",fontWeight:500},children:i}),a.jsx("p",{style:{color:"#6B7280",fontSize:"0.875rem",marginTop:"0.5rem"},children:"Redirecting to login..."})]}),d==="redirecting"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{marginBottom:"1rem"},children:a.jsxs("svg",{style:{width:"48px",height:"48px",animation:"spin 1s linear infinite",color:"#6B7280",margin:"0 auto"},fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{style:{opacity:.25},cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{style:{opacity:.75},fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),a.jsx("p",{style:{color:"#6B7280",fontWeight:500},children:i})]})]}),a.jsx("style",{children:` 145 @keyframes spin { 146 from { transform: rotate(0deg); } 147 to { transform: rotate(360deg); } 148 } 149 `})]})}function $w({label:e,name:n,type:i="text",value:s,onChange:d,error:h,placeholder:f,required:g=!1,minLength:p,maxLength:x,children:y,helpText:v,...w}){return a.jsxs("div",{className:"mb-4",children:[e&&a.jsxs("label",{htmlFor:n,className:"label",children:[e,g&&a.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),y||a.jsx("input",{type:i,id:n,name:n,value:s,onChange:d,placeholder:f,required:g,minLength:p,maxLength:x,className:h?"input-error":"input",...w}),v&&!h&&a.jsx("p",{className:"mt-1.5 text-sm text-gray-500",children:v}),h&&a.jsx("p",{className:"mt-1.5 text-sm text-red-600",children:h})]})}function Jae(){const[e,n]=j.useState(""),[i,s]=j.useState(""),[d,h]=j.useState(""),[f,g]=j.useState({}),[p,x]=j.useState(!1),y=()=>{const w={};
149return e?/\S+@\S+\.\S+/.test(e)||(w.email="Email is invalid"):w.email="Email is required",g(w),Object.keys(w).length===0},v=async w=>{var C,E,S,D;if(w.preventDefault(),s(""),h(""),g({}),!!y()){x(!0);try{await ne.post("/auth/forgot-password",{email:e}),s("If the email exists, a password reset link has been sent to your email address.")}catch(I){(E=(C=I.response)==null?void 0:C.data)!=null&&E.errors?g(I.response.data.errors):h(((D=(S=I.response)==null?void 0:S.data)==null?void 0:D.message)||"An error occurred. Please try again.")}finally{x(!1)}}};return a.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#f3f4f6"},children:a.jsxs("div",{style:{background:"white",padding:"2rem",borderRadius:"8px",boxShadow:"0 1px 3px rgba(0,0,0,0.1)",width:"100%",maxWidth:"400px"},children:[a.jsx("h1",{style:{marginBottom:"1.5rem",textAlign:"center"},children:"Forgot Password"}),i&&a.jsx(en,{type:"success",message:i}),d&&a.jsx(en,{type:"error",message:d,onClose:()=>h("")}),a.jsxs("form",{onSubmit:v,children:[a.jsx($w,{label:"Email",name:"email",type:"email",value:e,onChange:w=>n(w.target.value),error:f.email,placeholder:"Enter your email",required:!0}),a.jsx("button",{type:"submit",disabled:p,style:{width:"100%",padding:"0.75rem",background:p?"#9ca3af":"#4F46E5",color:"white",border:"none",borderRadius:"6px",cursor:p?"not-allowed":"pointer",fontWeight:"500",fontSize:"1rem",marginTop:"0.5rem"},children:p?"Sending...":"Send Reset Link"})]}),a.jsx("p",{style:{marginTop:"1rem",textAlign:"center",color:"#6b7280"},children:a.jsx(Fn,{to:Yl.LOGIN,style:{color:"#4F46E5",textDecoration:"none"},children:"Back to Login"})})]})})}function Xae(){const[e]=Do(),n=Ot(),{setAuth:i}=jr(),[s,d]=j.useState(""),[h,f]=j.useState(""),[g,p]=j.useState({}),[x,y]=j.useState(""),[v,w]=j.useState(!1),[C,E]=j.useState(""),[S,D]=j.useState("");j.useEffect(()=>{E(e.get("token")||""),D(e.get("email")||"")},[e]);const I=async M=>{var B,R;if(M.preventDefault(),y(""),s!==h){y("Passwords do not match");return}w(!0);try{const F=await ne.post("/auth/reset-password",{token:C,email:S,password:s,password_confirmation:h});i(F.data.user,F.data.token),n("/user/dashboard")}catch(F){y(((R=(B=F.response)==null?void 0:B.data)==null?void 0:R.message)||"Password reset failed")}finally{w(!1)}};return!C||!S?a.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#f3f4f6"},children:a.jsxs("div",{style:{background:"white",padding:"2rem",borderRadius:"8px",textAlign:"center"},children:[a.jsx("p",{children:"Invalid reset link"}),a.jsx(Fn,{to:"/forgot-password",children:"Request new reset link"})]})}):a.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#f3f4f6"},children:a.jsxs("div",{style:{background:"white",padding:"2rem",borderRadius:"8px",boxShadow:"0 1px 3px rgba(0,0,0,0.1)",width:"100%",maxWidth:"400px"},children:[a.jsx("h1",{style:{marginBottom:"1.5rem",textAlign:"center"},children:"Reset Password"}),x&&a.jsx(en,{type:"error",message:x,onClose:()=>y("")}),a.jsxs("form",{onSubmit:I,children:[a.jsx($w,{label:"New Password",name:"password",type:"password",value:s,onChange:M=>d(M.target.value),error:g.password,placeholder:"Enter new password",required:!0,minLength:8}),a.jsx($w,{label:"Confirm Password",name:"passwordConfirmation",type:"password",value:h,onChange:M=>f(M.target.value),error:g.passwordConfirmation,placeholder:"Confirm new password",required:!0}),a.jsx("button",{type:"submit",disabled:v,style:{width:"100%",padding:"0.75rem",background:v?"#9ca3af":"#4F46E5",color:"white",border:"none",borderRadius:"6px",cursor:v?"not-allowed":"pointer",fontWeight:"500",fontSize:"1rem",marginTop:"0.5rem"},children:v?"Resetting...":"Reset Password"})]})]})})}function ele(){const[e]=Do(),n=Ot(),{setAuth:i}=jr(),[s,d]=j.useState("Verifying magic link..."),[h,f]=j.useState("loading"),[g,p]=j.useState("");j.useEffect(()=>{const y=e.get("token"),v=e.get("email");if(!y||!v){n("/user/login");return}x(y,v)},[e,n]);const x=async(y,v)=>{var w,C;try{const E=await ne.post("/auth/magic-link/verify",{token:y,email:v}),S=E.data.user;i(S,E.data.token),f("success"),d("Login successful! Redirecting..."),setTimeout(()=>{S.role==="admin"||S.role==="super_admin"?n("/admin/dashboard"):n("/u
149ser/dashboard")},1e3)}catch(E){const S=((C=(w=E.response)==null?void 0:w.data)==null?void 0:C.message)||"Invalid or expired magic link";p(S),f("error"),setTimeout(()=>{n("/user/login?error="+encodeURIComponent(S+". Please request a new magic link."))},2e3)}};return a.jsxs("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#f3f4f6"},children:[a.jsxs("div",{style:{background:"white",padding:"2rem",borderRadius:"12px",boxShadow:"0 4px 6px -1px rgba(0,0,0,0.1)",width:"100%",maxWidth:"400px",textAlign:"center"},children:[h==="loading"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{marginBottom:"1rem"},children:a.jsxs("svg",{style:{width:"48px",height:"48px",animation:"spin 1s linear infinite",color:"#7C3AED",margin:"0 auto"},fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{style:{opacity:.25},cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{style:{opacity:.75},fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),a.jsx("p",{style:{color:"#6B7280",fontWeight:500},children:s})]}),h==="success"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{width:"48px",height:"48px",background:"#D1FAE5",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 1rem"},children:a.jsx("svg",{style:{width:"24px",height:"24px",color:"#059669"},fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})}),a.jsx("p",{style:{color:"#059669",fontWeight:500},children:s})]}),h==="error"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{width:"48px",height:"48px",background:"#FEE2E2",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 1rem"},children:a.jsx("svg",{style:{width:"24px",height:"24px",color:"#DC2626"},fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})})}),a.jsx("p",{style:{color:"#DC2626",fontWeight:500},children:g}),a.jsx("p",{style:{color:"#6B7280",fontSize:"0.875rem",marginTop:"0.5rem"},children:"Redirecting to login..."})]})]}),a.jsx("style",{children:` 150 @keyframes spin { 151 from { transform: rotate(0deg); } 152 to { transform: rotate(360deg); } 153 } 154 `})]})}function lM(){const[e]=Do(),n=Ot(),{setAuth:i}=jr(),[s,d]=j.useState(""),[h,f]=j.useState(!0),g=j.useCallback(async p=>{var x,y;try{const v=await ne.post("/auth/google/handle-code",{code:p});if(v.data.user&&v.data.token){const w=v.data.user;i(w,v.data.token),w.role==="admin"||w.role==="super_admin"?n("/admin/dashboard"):n("/user/dashboard")}else d("Authentication successful but user data was not received."),f(!1),setTimeout(()=>n(Yl.LOGIN),3e3)}catch(v){console.error("Google OAuth Error:",((x=v.response)==null?void 0:x.data)||v.message);let w="Failed to authenticate with Google. Please try again.";if((y=v.response)!=null&&y.data){const C=v.response.data;w=C.message||C.error||w,C.details&&(typeof C.details=="string"?w+=` (${C.details})`:C.details.error_description&&(w+=` (${C.details.error_description})`))}else v.message&&(w=v.message);d(w),f(!1),setTimeout(()=>n(Yl.LOGIN),5e3)}},[n,i]);return j.useEffect(()=>{const p=e.get("code");if(e.get("error")){d("Google authentication was cancelled or failed."),f(!1);return}p?g(p):(d("No authorization code received from Google."),f(!1))},[e,g]),a.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#f3f4f6"},children:a.jsx("div",{style:{background:"white",padding:"2rem",borderRadius:"8px",boxShadow:"0 1px 3px rgba(0,0,0,0.1)",width:"100%",maxWidth:"400px",textAlign:"center"},children:h?a.jsx("p",{children:"Authenticating with Google..."}):s?a.jsxs(a.Fragment,{children:[a.jsx(en,{type:"error",message:s}),a.jsx("p",{style:{marginTop:"1rem",color:"#6b7280"},children:"Redirecting to login..."})]}):a.jsx("p",{children:"Success! Redirecting..."})})})}function cM(){const[e]=Do(),n=Ot(),{setAuth:i}=jr(),[s,d]=j.useState(""),[h,f]=j.useState(!0),g=j.useCallback(async p=>{var x,y;try{const v=await ne.post("/auth/facebook/handle-code",{code:p});if(v.data.user&&v.data.token){const w=v.data.user;i(w,v.data.token),w.role==="admin"||w.role==="super_admin"?n("/admin/dashboard"):n("/u
154ser/dashboard")}else d("Authentication successful but user data was not received."),f(!1),setTimeout(()=>n(Yl.LOGIN),3e3)}catch(v){console.error("Facebook OAuth Error:",((x=v.response)==null?void 0:x.data)||v.message);let w="Failed to authenticate with Facebook. Please try again.";if((y=v.response)!=null&&y.data){const C=v.response.data;w=C.message||C.error||w}else v.message&&(w=v.message);d(w),f(!1),setTimeout(()=>n(Yl.LOGIN),5e3)}},[n,i]);return j.useEffect(()=>{const p=e.get("code");if(e.get("error")){d("Facebook authentication was cancelled or failed."),f(!1);return}p?g(p):(d("No authorization code received from Facebook."),f(!1))},[e,g]),a.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#f3f4f6"},children:a.jsx("div",{style:{background:"white",padding:"2rem",borderRadius:"8px",boxShadow:"0 1px 3px rgba(0,0,0,0.1)",width:"100%",maxWidth:"400px",textAlign:"center"},children:h?a.jsx("p",{children:"Authenticating with Facebook..."}):s?a.jsxs(a.Fragment,{children:[a.jsx(en,{type:"error",message:s}),a.jsx("p",{style:{marginTop:"1rem",color:"#6b7280"},children:"Redirecting to login..."})]}):a.jsx("p",{children:"Success! Redirecting..."})})})}function a9(e){var n,i,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var d=e.length;for(n=0;n<d;n++)e[n]&&(i=a9(e[n]))&&(s&&(s+=" "),s+=i)}else for(i in e)e[i]&&(s&&(s+=" "),s+=i);return s}function pn(){for(var e,n,i=0,s="",d=arguments.length;i<d;i++)(e=arguments[i])&&(n=a9(e))&&(s&&(s+=" "),s+=n);return s}var tle=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function q_(e){if(typeof e!="string")return!1;var n=tle;return n.includes(e)}var nle=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRen
154dering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],rle=new Set(nle);function l9(e){return typeof e!="string"?!1:rle.has(e)}function c9(e){return typeof e=="string"&&e.startsWith("data-")}function No(e){if(typeof e!="object"||e===null)return{};var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(l9(i)||c9(i))&&(n[i]=e[i]);return n}function eb(e){if(e==null)return null;if(j.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var n=e.props;return No(n)}return typeof e=="object"&&!Array.isArray(e)?No(e):null}function eo(e){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(l9(i)||c9(i)||q_(i))&&(n[i]=e[i]);return n}function ile(e){return e==null?null:j.isValidElement(e)?eo(e.props):typeof e=="object"&&!Array.isArray(e)?eo(e):null}var ole=["children","width","height","viewBox","className","style","title","desc"];function Vw(){return Vw=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vw.apply(null,arguments)}function sle(e,n){if(e==null)return{};var i,s,d=ale(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function ale(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}var d9=j.forwardRef((e,n)=>{var{children:i,width:s,height:d,viewBox:h,className:f,style:g,title:p,desc:x}=e,y=sle(e,ole),v=h||{width:s,height:d,x:0,y:0},w=pn("recharts-surface",f);return j.createElement("svg",Vw({},eo(y),{className:w,width:s,height:d,style:g,viewBox:"".concat(v.x," ").concat(v.y," ").concat(v.width," ").concat(v.height),ref:n}),j.createElement("title",null,p),j.createElement("desc",null,x),i)}),lle=["children","className"];function Uw(){return Uw=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Uw.apply(null,arguments)}function cle(e,n){if(e==null)return{};var i,s,d=dle(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function dle(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}
vendor: 9,301 bytes, line 154
154var ts=j.forwardRef((e,n)=>{var{children:i,className:s}=e,d=cle(e,lle),h=pn("recharts-layer",s);return j.createElement("g",Uw({className:h},eo(d),{ref:n}),i)}),u9=j.createContext(null),z5e=()=>j.useContext(u9);function Nn(e){return function(){return e}}const Ww=Math.PI,Hw=2*Ww,wl=1e-6,ule=Hw-wl;function h9(e){this._+=e[0];for(let n=1,i=e.length;n<i;++n)this._+=arguments[n]+e[n]}function hle(e){let n=Math.floor(e);if(!(n>=0))throw new Error(`invalid digits: ${e}`);if(n>15)return h9;const i=10**n;return function(s){this._+=s[0];for(let d=1,h=s.length;d<h;++d)this._+=Math.round(arguments[d]*i)/i+s[d]}}class mle{constructor(n){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=n==null?h9:hle(n)}moveTo(n,i){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+i}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(n,i){this._append`L${this._x1=+n},${this._y1=+i}`}quadraticCurveTo(n,i,s,d){this._append`Q${+n},${+i},${this._x1=+s},${this._y1=+d}`}bezierCurveTo(n,i,s,d,h,f){this._append`C${+n},${+i},${+s},${+d},${this._x1=+h},${this._y1=+f}`}arcTo(n,i,s,d,h){if(n=+n,i=+i,s=+s,d=+d,h=+h,h<0)throw new Error(`negative radius: ${h}`);let f=this._x1,g=this._y1,p=s-n,x=d-i,y=f-n,v=g-i,w=y*y+v*v;if(this._x1===null)this._append`M${this._x1=n},${this._y1=i}`;else if(w>wl)if(!(Math.abs(v*p-x*y)>wl)||!h)this._append`L${this._x1=n},${this._y1=i}`;else{let C=s-f,E=d-g,S=p*p+x*x,D=C*C+E*E,I=Math.sqrt(S),M=Math.sqrt(w),B=h*Math.tan((Ww-Math.acos((S+w-D)/(2*I*M)))/2),R=B/M,F=B/I;Math.abs(R-1)>wl&&this._append`L${n+R*y},${i+R*v}`,this._append`A${h},${h},0,0,${+(v*C>y*E)},${this._x1=n+F*p},${this._y1=i+F*x}`}}arc(n,i,s,d,h,f){if(n=+n,i=+i,s=+s,f=!!f,s<0)throw new Error(`negative radius: ${s}`);let g=s*Math.cos(d),p=s*Math.sin(d),x=n+g,y=i+p,v=1^f,w=f?d-h:h-d;this._x1===null?this._append`M${x},${y}`:(Math.abs(this._x1-x)>wl||Math.abs(this._y1-y)>wl)&&this._append`L${x},${y}`,s&&(w<0&&(w=w%Hw+Hw),w>ule?this._append`A${s},${s},0,1,${v},${n-g},${i-p}A${s},${s},0,1,${v},${this._x1=x},${this._y1=y}`:w>wl&&this._append`A${s},${s},0,${+(w>=Ww)},${v},${this._x1=n+s*Math.cos(h)},${this._y1=i+s*Math.sin(h)}`)}rect(n,i,s,d){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+i}h${s=+s}v${+d}h${-s}Z`}toString(){return this._}}function m9(e){let n=3;return e.digits=function(i){if(!arguments.length)return n;if(i==null)n=null;else{const s=Math.floor(i);if(!(s>=0))throw new RangeError(`invalid digits: ${i}`);n=s}return e},()=>new mle(n)}function K_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function f9(e){this._context=e}f9.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:this._context.lineTo(e,n);break}}};function tb(e){return new f9(e)}function p9(e){return e[0]}function g9(e){return e[1]}function b9(e,n){var i=Nn(!0),s=null,d=tb,h=null,f=m9(g);e=typeof e=="function"?e:e===void 0?p9:Nn(e),n=typeof n=="function"?n:n===void 0?g9:Nn(n);function g(p){var x,y=(p=K_(p)).length,v,w=!1,C;for(s==null&&(h=d(C=f())),x=0;x<=y;++x)!(x<y&&i(v=p[x],x,p))===w&&((w=!w)?h.lineStart():h.lineEnd()),w&&h.point(+e(v,x,p),+n(v,x,p));if(C)return h=null,C+""||null}return g.x=function(p){return arguments.length?(e=typeof p=="function"?p:Nn(+p),g):e},g.y=function(p){return arguments.length?(n=typeof p=="function"?p:Nn(+p),g):n},g.defined=function(p){return arguments.length?(i=typeof p=="function"?p:Nn(!!p),g):i},g.curve=function(p){return arguments.length?(d=p,s!=null&&(h=d(s)),g):d},g.context=function(p){return arguments.length?(p==null?s=h=null:h=d(s=p),g):s},g}function Ap(e,n,i){var s=null,d=Nn(!0),h=null,f=tb,g=null,p=m9(x);e=typeof e=="function"?e:e===void 0?p9:Nn(+e),n=typeof n=="function"?n:Nn(n===void 0?0:+n),i=typeof i=="function"?i:i===void 0?g9:Nn(+i);function x(v){var w,C,E,S=(v=K_(v)).length,D,I=!1,M,B=new Array(S),R=new Array(S);for(h==null&&(g=f(M=p())),w=0;w<=S;++w){if(!(w<S&&d(D=v[w],w,v))===I)if(I=!I)C=w,g.areaStart(),g.lineStart();else{for(g.lineEnd(),g.lineStart(),E=w-1;E>=C;--E)g.point(B[E],R[E]);g.lineEnd(),g.areaEnd()}I&&(B[w]=+e(D,w,v),R[w]=+n(D,w,v),g.point(s?+s(D,w,v):B[w],i?+i(D,w,v):R[w]))}if(M)return g=null,M+""||null}function y(){return b9().defined(d).curve(f).context(h)}return x.x=function(v){return arguments.length?(e=typeof v=="function"?v:Nn(+v),s=null,x):e},x.x0=function(v){return arguments.length?(e=typeof v=="function"?v:Nn(+v),x):e},x.x1=function(v){return arguments.length?(s=v==null?null:typeof v=="function"?v:Nn(+v),x):s},x.y=function(v){return arguments.length?(n=typeof v=="function"?v:Nn(+v),i=null,x):n},x.y0=function(v){return arguments.length?(n=typeof v=="function"?v:Nn(+v),x):n},x.y1=function(v){return arguments.length?(i=v==null?null:typeof v=="function"?v:Nn(+v),x):i},x.lineX0=x.lineY0=function(){return y().x(e).y(n)},x.lineY1=function(){return y().x(e).y(i)},x.lineX1=function(){return y().x(s).y(n)},x.defined=function(v){return arguments.length?(d=typeof v=="function"?v:Nn(!!v),x):d},x.curve=function(v){return arguments.length?(f=v,h!=null&&(g=f(h)),x):f},x.context=function(v){return arguments.length?(v==null?h=g=null:g=f(h=v),x):h},x}class k9{constructor(n,i){this._context=n,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(n,i){switch(n=+n,i=+i,this._point){case 0:{this._point=1,this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+n)/2,this._y0,this._x0,i,n,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,n,this._y0,n,i);break}}this._x0=n,this._y0=i}}function fle(e){return new k9(e,!0)}function ple(e){return new k9(e,!1)}function Ug(){}function Wg(e,n,i){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+n)/6,(e._y0+4*e._y1+i)/6)}function y9(e){this._context=e}y9.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Wg(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Wg(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function gle(e){return new y9(e)}function x9(e){this._context=e}x9.prototype={areaStart:Ug,areaEnd:Ug,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._x2=e,this._y2=n;break;case 1:this._point=2,this._x3=e,this._y3=n;break;case 2:this._point=3,this._x4=e,this._y4=n,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+n)/6);break;default:Wg(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function ble(e){return new x9(e)}function v9(e){this._context=e}v9.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+e)/6,s=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(i,s):this._context.moveTo(i,s);break;case 3:this._point=4;default:Wg(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function kle(e){return new v9(e)}function w9(e){this._context=e}w9.prototype={areaStart:Ug,areaEnd:Ug,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,n){e=+e,n=+n,this._point?this._context.lineTo(e,n):(this._point=1,this._context.moveTo(e,n))}};function yle(e){return new w9(e)}function dM(e){return e<0?-1:1}function uM(e,n,i){var s=e._x1-e._x0,d=n-e._x1,h=(e._y1-e._y0)/(s||d<0&&-0),f=(i-e._y1)/(d||s<0&&-0),g=(h*d+f*s)/(s+d);return(dM(h)+dM(f))*Math.min(Math.abs(h),Math.abs(f),.5*Math.abs(g))||0}
154function hM(e,n){var i=e._x1-e._x0;return i?(3*(e._y1-e._y0)/i-n)/2:n}function qx(e,n,i){var s=e._x0,d=e._y0,h=e._x1,f=e._y1,g=(h-s)/3;e._context.bezierCurveTo(s+g,d+g*n,h-g,f-g*i,h,f)}function Hg(e){this._context=e}Hg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:qx(this,this._t0,hM(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){var i=NaN;if(e=+e,n=+n,!(e===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,qx(this,hM(this,i=uM(this,e,n)),i);break;default:qx(this,this._t0,i=uM(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=i}}};function _9(e){this._context=new A9(e)}(_9.prototype=Object.create(Hg.prototype)).point=function(e,n){Hg.prototype.point.call(this,n,e)};function A9(e){this._context=e}A9.prototype={moveTo:function(e,n){this._context.moveTo(n,e)},closePath:function(){this._context.closePath()},lineTo:function(e,n){this._context.lineTo(n,e)},bezierCurveTo:function(e,n,i,s,d,h){this._context.bezierCurveTo(n,e,s,i,h,d)}};function xle(e){return new Hg(e)}function vle(e){return new _9(e)}function C9(e){this._context=e}C9.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,n=this._y,i=e.length;if(i)if(this._line?this._context.lineTo(e[0],n[0]):this._context.moveTo(e[0],n[0]),i===2)this._context.lineTo(e[1],n[1]);else for(var s=mM(e),d=mM(n),h=0,f=1;f<i;++h,++f)this._context.bezierCurveTo(s[0][h],d[0][h],s[1][h],d[1][h],e[f],n[f]);(this._line||this._line!==0&&i===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,n){this._x.push(+e),this._y.push(+n)}};function mM(e){var n,i=e.length-1,s,d=new Array(i),h=new Array(i),f=new Array(i);for(d[0]=0,h[0]=2,f[0]=e[0]+2*e[1],n=1;n<i-1;++n)d[n]=1,h[n]=4,f[n]=4*e[n]+2*e[n+1];for(d[i-1]=2,h[i-1]=7,f[i-1]=8*e[i-1]+e[i],n=1;n<i;++n)s=d[n]/h[n-1],h[n]-=s,f[n]-=s*f[n-1];for(d[i-1]=f[i-1]/h[i-1],n=i-2;n>=0;--n)d[n]=(f[n]-d[n+1])/h[n];for(h[i-1]=(e[i]+d[i-1])/2,n=0;n<i-1;++n)h[n]=2*e[n+1]-d[n+1];return[d,h]}function wle(e){return new C9(e)}function nb(e,n){this._context=e,this._t=n}nb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(e,n);else{var i=this._x*(1-this._t)+e*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}break}}this._x=e,this._y=n}};function _le(e){return new nb(e,.5)}function Ale(e){return new nb(e,0)}function Cle(e){return new nb(e,1)}function Ql(e,n){if((f=e.length)>1)for(var i=1,s,d,h=e[n[0]],f,g=h.length;i<f;++i)for(d=h,h=e[n[i]],s=0;s<g;++s)h[s][1]+=h[s][0]=isNaN(d[s][1])?d[s][0]:d[s][1]}function Gw(e){for(var n=e.length,i=new Array(n);--n>=0;)i[n]=n;return i}function jle(e,n){return e[n]}function Nle(e){const n=[];return n.key=e,n}function Ele(){var e=Nn([]),n=Gw,i=Ql,s=jle;function d(h){var f=Array.from(e.apply(this,arguments),Nle),g,p=f.length,x=-1,y;for(const v of h)for(g=0,++x;g<p;++g)(f[g][x]=[0,+s(v,f[g].key,x,h)]).data=v;for(g=0,y=K_(n(f));g<p;++g)f[y[g]].index=g;return i(f,y),f}return d.keys=function(h){return arguments.length?(e=typeof h=="function"?h:Nn(Array.from(h)),d):e},d.value=function(h){return arguments.length?(s=typeof h=="function"?h:Nn(+h),d):s},d.order=function(h){return arguments.length?(n=h==null?Gw:typeof h=="function"?h:Nn(Array.from(h)
154),d):n},d.offset=function(h){return arguments.length?(i=h??Ql,d):i},d}function Sle(e,n){if((s=e.length)>0){for(var i,s,d=0,h=e[0].length,f;d<h;++d){for(f=i=0;i<s;++i)f+=e[i][d][1]||0;if(f)for(i=0;i<s;++i)e[i][d][1]/=f}Ql(e,n)}}function Dle(e,n){if((d=e.length)>0){for(var i=0,s=e[n[0]],d,h=s.length;i<h;++i){for(var f=0,g=0;f<d;++f)g+=e[f][i][1]||0;s[i][1]+=s[i][0]=-g/2}Ql(e,n)}}function Tle(e,n){if(!(!((f=e.length)>0)||!((h=(d=e[n[0]]).length)>0))){for(var i=0,s=1,d,h,f;s<h;++s){for(var g=0,p=0,x=0;g<f;++g){for(var y=e[n[g]],v=y[s][1]||0,w=y[s-1][1]||0,C=(v-w)/2,E=0;E<g;++E){var S=e[n[E]],D=S[s][1]||0,I=S[s-1][1]||0;C+=D-I}p+=v,x+=C*v}d[s-1][1]+=d[s-1][0]=i,p&&(i-=x/p)}d[s-1][1]+=d[s-1][0]=i,Ql(e,n)}}var rb={},j9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){return i==="__proto__"}e.isUnsafeProperty=n})(j9);var Y_={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){switch(typeof i){case"number":case"symbol":return!1;case"string":return i.includes(".")||i.includes("[")||i.includes("]")}}e.isDeepKey=n})(Y_);var ib={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){var s;return typeof i=="string"||typeof i=="symbol"?i:Object.is((s=i==null?void 0:i.valueOf)==null?void 0:s.call(i),-0)?"-0":String(i)}e.toKey=n})(ib);var ob={},N9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){if(i==null)return"";if(typeof i=="string")return i;if(Array.isArray(i))return i.map(n).join(",");const s=String(i);return s==="0"&&Object.is(Number(i),-0)?"-0":s}e.toString=n})(N9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=N9,i=ib;function s(d){if(Array.isArray(d))return d.map(i.toKey);if(typeof d=="symbol")return[d];d=n.toString(d);const h=[],f=d.length;if(f===0)return h;let g=0,p="",x="",y=!1;for(d.charCodeAt(0)===46&&(h.push(""),g++);g<f;){const v=d[g];x?v==="\\"&&g+1<f?(g++,p+=d[g]):v===x?x="":p+=v:y?v==='"'||v==="'"?x=v:v==="]"?(y=!1,h.push(p),p=""):p+=v:v==="["?(y=!0,p&&(h.push(p),p="")):v==="."?p&&(h.push(p),p=""):p+=v,g++}return p&&h.push(p),h}e.toPath=s})(ob);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=j9,i=Y_,s=ib,d=ob;function h(g,p,x){if(g==null)return x;switch(typeof p){case"string":{if(n.isUnsafeProperty(p))return x;const y=g[p];return y===void 0?i.isDeepKey(p)?h(g,d.toPath(p),x):x:y}case"number":case"symbol":{typeof p=="number"&&(p=s.toKey(p));const y=g[p];return y===void 0?x:y}default:{if(Array.isArray(p))return f(g,p,x);if(Object.is(p==null?void 0:p.valueOf(),-0)?p="-0":p=String(p),n.isUnsafeProperty(p))return x;const y=g[p];return y===void 0?x:y}}}function f(g,p,x){if(p.length===0)return x;let y=g;for(let v=0;v<p.length;v++){if(y==null||n.isUnsafeProperty(p[v]))return x;y=y[p[v]]}return y===void 0?x:y}e.get=h})(rb);var Ile=rb.get;const Td=os(Ile);var Mle=4;function Ca(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mle,i=10**n,s=Math.round(e*i)/i;return Object.is(s,-0)?0:s}function vr(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return e.reduce((d,h,f)=>{var g=i[f-1];return typeof g=="string"?d+g+h:g!==void 0?d+Ca(g)+h:d+h},"")}var Yi=e=>e===0?0:e>0?1:-1,Eo=e=>typeof e=="number"&&e!=+e,Rs=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,ht=e=>(typeof e=="number"||e instanceof Number)&&!Eo(e),ns=e=>ht(e)||typeof e=="string",Ple=0,Gh=e=>{var n=++Ple;return"".concat(e||"").concat(n)},Ra=function(n,i){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ht(n)&&typeof n!="string")return s;var h;if(Rs(n)){if(i==null)return s;var f=n.indexOf("%");h=i*parseFloat(n.slice(0,f))/100}else h=+n;return Eo(h)&&(h=s),d&&i!=null&&h>i&&(h=i),h},E9=e=>{if(!Array.isArray(e))return!1;for(var n=e.length,i={},s=0;s<n;s++)if(!i[String(e[s])])i[String(e[s])]=!0;else return!0;return!1};function Ko(e,n,i){return ht(e)&&ht(n)?Ca(e+i*(n-e)):n}function S9(e,n,i){if(!(!e||!e.length))return e.find(s=>
154s&&(typeof n=="function"?n(s):Td(s,n))===i)}var Jn=e=>e===null||typeof e>"u",Q_=e=>Jn(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Ole(e){return e!=null}function bm(){}var D9=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Z_=(e,n)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var i=e;if(j.isValidElement(e)&&(i=e.props),typeof i!="object"&&typeof i!="function")return null;var s={};return Object.keys(i).forEach(d=>{q_(d)&&(s[d]=h=>i[d](i,h))}),s},Ble=(e,n,i)=>s=>(e(n,i,s),null),Lle=(e,n,i)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var s=null;return Object.keys(e).forEach(d=>{var h=e[d];q_(d)&&typeof h=="function"&&(s||(s={}),s[d]=Ble(h,n,i))}),s};function fM(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Rle(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?fM(Object(i),!0).forEach(function(s){zle(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):fM(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function zle(e,n,i){return(n=Fle(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Fle(e){var n=$le(e,"string");return typeof n=="symbol"?n:n+""}function $le(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Bi(e,n){var i=Rle({},e),s=n,d=Object.keys(n),h=d.reduce((f,g)=>(f[g]===void 0&&s[g]!==void 0&&(f[g]=s[g]),f),i);return h}var T9={},I9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i,s){const d=new Map;for(let h=0;h<i.length;h++){const f=i[h],g=s(f);d.has(g)||d.set(g,f)}return Array.from(d.values())}e.uniqBy=n})(I9);var J_={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){return i}e.identity=n})(J_);var M9={},sb={},P9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){return Number.isSafeInteger(i)&&i>=0}e.isLength=n})(P9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=P9;function i(s){return s!=null&&typeof s!="function"&&n.isLength(s.length)}e.isArrayLike=i})(sb);var O9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){return typeof i=="object"&&i!==null}e.isObjectLike=n})(O9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=sb,i=O9;function s(d){return i.isObjectLike(d)&&n.isArrayLike(d)}e.isArrayLikeObject=s})(M9);var B9={},L9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=rb;function i(s){return function(d){return n.get(d,s)}}e.property=i})(L9);var R9={},X_={},z9={},eA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){return i!==null&&(typeof i=="object"||typeof i=="function")}e.isObject=n})(eA);var tA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){return i==null||typeof i!="object"&&typeof i!="function"}e.isPrimitive=n})(tA);var nA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i,s){return i===s||Number.isNaN(i)&&Number.isNaN(s)}e.eq=n})(nA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=eA,i=tA,s=nA;function d(y,v,w){return typeof w!="function"?d(y,v,()=>{}):h(y,v,function C(E,S,D,I,M,B){const R=w(E,S,D,I,M,B);return R!==void 0?!!R:h(E,S,C,B)},new Map)}function h(y,v,w,C){if(v===y)return!0;switch(typeof v){case"object":return f(y,v,w,C);case"function":return Object.keys(v).length>0?h(y,{...v},w,C):s.eq(y,v);default:return n.isObject(y)?typeof v=="string"?v==="":!0:s.eq(y,v)}}
154function f(y,v,w,C){if(v==null)return!0;if(Array.isArray(v))return p(y,v,w,C);if(v instanceof Map)return g(y,v,w,C);if(v instanceof Set)return x(y,v,w,C);const E=Object.keys(v);if(y==null||i.isPrimitive(y))return E.length===0;if(E.length===0)return!0;if(C!=null&&C.has(v))return C.get(v)===y;C==null||C.set(v,y);try{for(let S=0;S<E.length;S++){const D=E[S];if(!i.isPrimitive(y)&&!(D in y)||v[D]===void 0&&y[D]!==void 0||v[D]===null&&y[D]!==null||!w(y[D],v[D],D,y,v,C))return!1}return!0}finally{C==null||C.delete(v)}}function g(y,v,w,C){if(v.size===0)return!0;if(!(y instanceof Map))return!1;for(const[E,S]of v.entries()){const D=y.get(E);if(w(D,S,E,y,v,C)===!1)return!1}return!0}function p(y,v,w,C){if(v.length===0)return!0;if(!Array.isArray(y))return!1;const E=new Set;for(let S=0;S<v.length;S++){const D=v[S];let I=!1;for(let M=0;M<y.length;M++){if(E.has(M))continue;const B=y[M];let R=!1;if(w(B,D,S,y,v,C)&&(R=!0),R){E.add(M),I=!0;break}}if(!I)return!1}return!0}function x(y,v,w,C){return v.size===0?!0:y instanceof Set?p([...y],[...v],w,C):!1}e.isMatchWith=d,e.isSetMatch=x})(z9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=z9;function i(s,d){return n.isMatchWith(s,d,()=>{})}e.isMatch=i})(X_);var F9={},rA={},$9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){return Object.getOwnPropertySymbols(i).filter(s=>Object.prototype.propertyIsEnumerable.call(i,s))}e.getSymbols=n})($9);var iA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){return i==null?i===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(i)}e.getTag=n})(iA);var oA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n="[object RegExp]",i="[object String]",s="[object Number]",d="[object Boolean]",h="[object Arguments]",f="[object Symbol]",g="[object Date]",p="[object Map]",x="[object Set]",y="[object Array]",v="[object Function]",w="[object ArrayBuffer]",C="[object Object]",E="[object Error]",S="[object DataView]",D="[object Uint8Array]",I="[object Uint8ClampedArray]",M="[object Uint16Array]",B="[object Uint32Array]",R="[object BigUint64Array]",F="[object Int8Array]",V="[object Int16Array]",P="[object Int32Array]",z="[object BigInt64Array]",W="[object Float32Array]",K="[object Float64Array]";e.argumentsTag=h,e.arrayBufferTag=w,e.arrayTag=y,e.bigInt64ArrayTag=z,e.bigUint64ArrayTag=R,e.booleanTag=d,e.dataViewTag=S,e.dateTag=g,e.errorTag=E,e.float32ArrayTag=W,e.float64ArrayTag=K,e.functionTag=v,e.int16ArrayTag=V,e.int32ArrayTag=P,e.int8ArrayTag=F,e.mapTag=p,e.numberTag=s,e.objectTag=C,e.regexpTag=n,e.setTag=x,e.stringTag=i,e.symbolTag=f,e.uint16ArrayTag=M,e.uint32ArrayTag=B,e.uint8ArrayTag=D,e.uint8ClampedArrayTag=I})(oA);var V9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}e.isTypedArray=n})(V9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=$9,i=iA,s=oA,d=tA,h=V9;function f(y,v){return g(y,void 0,y,new Map,v)}function g(y,v,w,C=new Map,E=void 0){const S=E==null?void 0:E(y,v,w,C);if(S!==void 0)return S;if(d.isPrimitive(y))return y;if(C.has(y))return C.get(y);if(Array.isArray(y)){const D=new Array(y.length);C.set(y,D);for(let I=0;I<y.length;I++)D[I]=g(y[I],I,w,C,E);return Object.hasOwn(y,"index")&&(D.index=y.index),Object.hasOwn(y,"input")&&(D.input=y.input),D}if(y instanceof Date)return new Date(y.getTime());if(y instanceof RegExp){const D=new RegExp(y.source,y.flags);return D.lastIndex=y.lastIndex,D}if(y instanceof Map){const D=new Map;C.set(y,D);for(const[I,M]of y)D.set(I,g(M,I,w,C,E));return D}if(y instanceof Set){const D=new Set;C.set(y,D);for(const I of y)D.add(g(I,void 0,w,C,E));return D}if(typeof Buffer<"u"&&Buffer.isBuffer(y))return y.subarray();if(h.isTypedArray(y)){const D=new(Object.getPrototypeOf(y)).constructor(y.length);C.set(y,D);for(let I=0;I<y.length;I++)D[I]=g(y[I],I,w,C,E);return D}if(y instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&y instanceof SharedArrayBuffer)return y.slice(0);if(y instanceof DataView){const D=new DataView(y.buffer.slice(0),y.byteOffset,y.byteLength);return C.set(y,D),p(D,y,w,C,E),D}if(typeof File<"u"&&y instanceof File){const D=new File([y],y.name,{type:y.type});return C.set(y,D),p(D,y,w,C,E),D}if(typeof Blob<"u"&&y instanceof Blob){const D=new Blob([y],{type:y.type});return C.set(y,D),p(D,y,w,C,E),D}if(y instanceof Error){const D=new y.constructor;return C.set(y,D),D.message=y.message,D.name=y.name,D.stack=y.stack,D.cause=y.cause,p(D,y,w,C,E),D}if(y instanceof Boolean){const D=new Boolean(y.valueOf());return C.set(y,D),p(D,y,w,C,E),D}if(y instanceof Number){const D=new Number(y.valueOf());return C.set(y,D),p(D,y,w,C,E),D}if(y instanceof String){const D=new String(y.valueOf());return C.set(y,D),p(D,y,w,C,E),D}if(typeof y=="object"&&x(y)){const D=Object.create(Object.getPrototypeOf(y));return C.set(y,D),p(D,y,w,C,E),D}return y}function p(y,v,w=y,C,E){const S=[...Object.keys(v),...n.getSymbols(v)];for(let D=0;D<S.length;D++){const I=S[D],M=Object.getOwnPropertyDescriptor(y,I);(M==null||M.writable)&&(y[I]=g(v[I],I,w,C,E))}}function x(y){switch(i.getTag(y)){case s.argumentsTag:case s.arrayTag:case s.arrayBufferTag:case s.dataViewTag:case s.booleanTag:case s.dateTag:case s.float32ArrayTag:case s.float64ArrayTag:case s.int8ArrayTag:case s.int16ArrayTag:case s.int32ArrayTag:case s.mapTag:case s.numberTag:case s.objectTag:case s.regexpTag:case s.setTag:case s.stringTag:case s.symbolTag:case s.uint8ArrayTag:case s.uint8ClampedArrayTag:case s.uint16ArrayTag:case s.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=f,e.cloneDeepWithImpl=g,e.copyProperties=p})(rA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=rA;function i(s){return n.cloneDeepWithImpl(s,void 0,s,new Map,void 0)}e.cloneDeep=i})(F9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=X_,i=F9;function s(d){return d=i.cloneDeep(d),h=>
154n.isMatch(h,d)}e.matches=s})(R9);var U9={},W9={},H9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=rA,i=oA;function s(d,h){return n.cloneDeepWith(d,(f,g,p,x)=>{const y=h==null?void 0:h(f,g,p,x);if(y!==void 0)return y;if(typeof d=="object")switch(Object.prototype.toString.call(d)){case i.numberTag:case i.stringTag:case i.booleanTag:{const v=new d.constructor(d==null?void 0:d.valueOf());return n.copyProperties(v,d),v}case i.argumentsTag:{const v={};return n.copyProperties(v,d),v.length=d.length,v[Symbol.iterator]=d[Symbol.iterator],v}default:return}})}e.cloneDeepWith=s})(H9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=H9;function i(s){return n.cloneDeepWith(s)}e.cloneDeep=i})(W9);var G9={},sA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=/^(?:0|[1-9]\d*)$/;function i(s,d=Number.MAX_SAFE_INTEGER){switch(typeof s){case"number":return Number.isInteger(s)&&s>=0&&s<d;case"symbol":return!1;case"string":return n.test(s)}}e.isIndex=i})(sA);var q9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=iA;function i(s){return s!==null&&typeof s=="object"&&n.getTag(s)==="[object Arguments]"}e.isArguments=i})(q9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=Y_,i=sA,s=q9,d=ob;function h(f,g){let p;if(Array.isArray(g)?p=g:typeof g=="string"&&n.isDeepKey(g)&&(f==null?void 0:f[g])==null?p=d.toPath(g):p=[g],p.length===0)return!1;let x=f;for(let y=0;y<p.length;y++){const v=p[y];if((x==null||!Object.hasOwn(x,v))&&!((Array.isArray(x)||s.isArguments(x))&&i.isIndex(v)&&v<x.length))return!1;x=x[v]}return!0}e.has=h})(G9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=X_,i=ib,s=W9,d=rb,h=G9;function f(g,p){switch(typeof g){case"object":{Object.is(g==null?void 0:g.valueOf(),-0)&&(g="-0");break}case"number":{g=i.toKey(g);break}}return p=s.cloneDeep(p),function(x){const y=d.get(x,g);return y===void 0?h.has(x,g):p===void 0?y===void 0:n.isMatch(y,p)}}e.matchesProperty=f})(U9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=J_,i=L9,s=R9,d=U9;function h(f){if(f==null)return n.identity;switch(typeof f){case"function":return f;case"object":return Array.isArray(f)&&f.length===2?d.matchesProperty(f[0],f[1]):s.matches(f);case"string":case"symbol":case"number":return i.property(f)}}e.iteratee=h})(B9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=I9,i=J_,s=M9,d=B9;function h(f,g=i.identity){return s.isArrayLikeObject(f)?n.uniqBy(Array.from(f),d.iteratee(g)):[]}e.uniqBy=h})(T9);var Vle=T9.uniqBy;const pM=os(Vle);function Ule(e,n,i){return n===!0?pM(e,i):typeof n=="function"?pM(e,n):e}var aA=j.createContext(null),Wle=e=>e,Un=()=>{var e=j.useContext(aA);return e?e.store.dispatch:Wle},lg=()=>{},Hle=()=>lg,Gle=(e,n)=>e===n;function yt(e){var n=j.useContext(aA);return DL.useSyncExternalStoreWithSelector(n?n.subscription.addNestedSub:Hle,n?n.store.getState:lg,n?n.store.getState:lg,n?e:lg,Gle)}function qle(e,n=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(n)}function Kle(e,n=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(n)}function Yle(e,n="expected all items to be functions, instead received the following types: "){if(!e.every(i=>typeof i=="function")){const i=e.map(s=>typeof s=="function"?`function ${s.name||"unnamed"}()`:typeof s).join(", ");throw new TypeError(`${n}[${i}]`)}}var gM=e=>Array.isArray(e)?e:[e];function Qle(e){const n=Array.isArray(e[0])?e[0]:e;return Yle(n,"createSelector expects all input-selectors to be functions, but received the following types: "),n}function Zle(e,n){const i=[],{length:s}=e;for(let d=0;d<s;d++)i.push(e[d].apply(null,n));return i}var Jle=class{constructor(e){this.value=e}deref(){return this.value}},Xle=typeof WeakRef<"u"?WeakRef:Jle,ece=0,bM=1;function Cp(){return{s:ece,v:void 0,o:null,p:null}}function K9(e,n={}){let i=Cp();const{resultEqualityCheck:s}=n;let d,h=0;function f(){var v;let g=i;const{length:p}=arguments;for(let w=0,C=p;w<C;w++){const E=arguments[w];if(typeof E=="function"||typeof E=="object"&&E!==null){let S=g.o;S===null&&(g.o=S=new WeakMap);const D=S.get(E);D===void 0?(g=Cp(),S.set(E,g)):g=D}else{let S=g.p;S===null&&(g.p=S=new Map);const D=S.get(E);D===void 0?(g=Cp(),S.set(E,g)):g=D}}const x=g;let y;if(g.s===bM)y=g.v;
154else if(y=e.apply(null,arguments),h++,s){const w=((v=d==null?void 0:d.deref)==null?void 0:v.call(d))??d;w!=null&&s(w,y)&&(y=w,h!==0&&h--),d=typeof y=="object"&&y!==null||typeof y=="function"?new Xle(y):y}return x.s=bM,x.v=y,y}return f.clearCache=()=>{i=Cp(),f.resetResultsCount()},f.resultsCount=()=>h,f.resetResultsCount=()=>{h=0},f}function tce(e,...n){const i=typeof e=="function"?{memoize:e,memoizeOptions:n}:e,s=(...d)=>{let h=0,f=0,g,p={},x=d.pop();typeof x=="object"&&(p=x,x=d.pop()),qle(x,`createSelector expects an output function after the inputs, but received: [${typeof x}]`);const y={...i,...p},{memoize:v,memoizeOptions:w=[],argsMemoize:C=K9,argsMemoizeOptions:E=[]}=y,S=gM(w),D=gM(E),I=Qle(d),M=v(function(){return h++,x.apply(null,arguments)},...S),B=C(function(){f++;const F=Zle(I,arguments);return g=M.apply(null,F),g},...D);return Object.assign(B,{resultFunc:x,memoizedResultFunc:M,dependencies:I,dependencyRecomputations:()=>f,resetDependencyRecomputations:()=>{f=0},lastResult:()=>g,recomputations:()=>h,resetRecomputations:()=>{h=0},memoize:v,argsMemoize:C})};return Object.assign(s,{withTypes:()=>s}),s}var xe=tce(K9),nce=Object.assign((e,n=xe)=>{Kle(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const i=Object.keys(e),s=i.map(h=>e[h]);return n(s,(...h)=>h.reduce((f,g,p)=>(f[i[p]]=g,f),{}))},{withTypes:()=>nce}),Y9={},Q9={},Z9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(s){return typeof s=="symbol"?1:s===null?2:s===void 0?3:s!==s?4:0}const i=(s,d,h)=>{if(s!==d){const f=n(s),g=n(d);if(f===g&&f===0){if(s<d)return h==="desc"?1:-1;if(s>d)return h==="desc"?-1:1}return h==="desc"?g-f:f-g}return 0};e.compareValues=i})(Z9);var J9={},lA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){return typeof i=="symbol"||i instanceof Symbol}e.isSymbol=n})(lA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=lA,i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;function d(h,f){return Array.isArray(h)?!1:typeof h=="number"||typeof h=="boolean"||h==null||n.isSymbol(h)?!0:typeof h=="string"&&(s.test(h)||!i.test(h))||f!=null&&Object.hasOwn(f,h)}e.isKey=d})(J9);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=Z9,i=J9,s=ob;function d(h,f,g,p){if(h==null)return[];g=p?void 0:g,Array.isArray(h)||(h=Object.values(h)),Array.isArray(f)||(f=f==null?[null]:[f]),f.length===0&&(f=[null]),Array.isArray(g)||(g=g==null?[]:[g]),g=g.map(C=>String(C));const x=(C,E)=>{let S=C;for(let D=0;D<E.length&&S!=null;++D)S=S[E[D]];return S},y=(C,E)=>E==null||C==null?E:typeof C=="object"&&"key"in C?Object.hasOwn(E,C.key)?E[C.key]:x(E,C.path):typeof C=="function"?C(E):Array.isArray(C)?x(E,C):typeof E=="object"?E[C]:E,v=f.map(C=>(Array.isArray(C)&&C.length===1&&(C=C[0]),C==null||typeof C=="function"||Array.isArray(C)||i.isKey(C)?C:{key:C,path:s.toPath(C)}));return h.map(C=>({original:C,criteria:v.map(E=>
154y(E,C))})).slice().sort((C,E)=>{for(let S=0;S<v.length;S++){const D=n.compareValues(C.criteria[S],E.criteria[S],g[S]);if(D!==0)return D}return 0}).map(C=>C.original)}e.orderBy=d})(Q9);var X9={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i,s=1){const d=[],h=Math.floor(s),f=(g,p)=>{for(let x=0;x<g.length;x++){const y=g[x];Array.isArray(y)&&p<h?f(y,p+1):d.push(y)}};return f(i,0),d}e.flatten=n})(X9);var cA={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=sA,i=sb,s=eA,d=nA;function h(f,g,p){return s.isObject(p)&&(typeof g=="number"&&i.isArrayLike(p)&&n.isIndex(g)&&g<p.length||typeof g=="string"&&g in p)?d.eq(p[g],f):!1}e.isIterateeCall=h})(cA);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=Q9,i=X9,s=cA;function d(h,...f){const g=f.length;return g>1&&s.isIterateeCall(h,f[0],f[1])?f=[]:g>2&&s.isIterateeCall(f[0],f[1],f[2])&&(f=[f[0]]),n.orderBy(h,i.flatten(f),["asc"])}e.sortBy=d})(Y9);var rce=Y9.sortBy;const ab=os(rce);var eR=e=>e.legend.settings,ice=e=>e.legend.size,oce=e=>e.legend.payload,F5e=xe([oce,eR],(e,n)=>{var{itemSorter:i}=n,s=e.flat(1);return i?ab(s,i):s}),jp=1;function sce(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[n,i]=j.useState({height:0,left:0,top:0,width:0}),s=j.useCallback(d=>{if(d!=null){var h=d.getBoundingClientRect(),f={height:h.height,left:h.left,top:h.top,width:h.width};(Math.abs(f.height-n.height)>jp||Math.abs(f.left-n.left)>jp||Math.abs(f.top-n.top)>jp||Math.abs(f.width-n.width)>jp)&&i({height:f.height,left:f.left,top:f.top,width:f.width})}},[n.width,n.height,n.top,n.left,...e]);return[n,s]}function yr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ace=typeof Symbol=="function"&&Symbol.observable||"@@observable",kM=ace,Kx=()=>Math.random().toString(36).substring(7).split("").join("."),lce={INIT:`@@redux/INIT${Kx()}`,REPLACE:`@@redux/REPLACE${Kx()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Kx()}`},Gg=lce;function dA(e){if(typeof e!="object"||e===null)return!1;let n=e;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n||Object.getPrototypeOf(e)===null}function tR(e,n,i){if(typeof e!="function")throw new Error(yr(2));if(typeof n=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(yr(0));if(typeof n=="function"&&typeof i>"u"&&(i=n,n=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(yr(1));return i(tR)(e,n)}let s=e,d=n,h=new Map,f=h,g=0,p=!1;function x(){f===h&&(f=new Map,h.forEach((D,I)=>{f.set(I,D)}))}function y(){if(p)throw new Error(yr(3));return d}function v(D){if(typeof D!="function")throw new Error(yr(4));if(p)throw new Error(yr(5));let I=!0;x();const M=g++;return f.set(M,D),function(){if(I){if(p)throw new Error(yr(6));I=!1,x(),f.delete(M),h=null}}}function w(D){if(!dA(D))throw new Error(yr(7));if(typeof D.type>"u")throw new Error(yr(8));if(typeof D.type!="string")throw new Error(yr(17));if(p)throw new Error(yr(9));try{p=!0,d=s(d,D)}finally{p=!1}return(h=f).forEach(M=>{M()}),D}function C(D){if(typeof D!="function")throw new Error(yr(10));s=D,w({type:Gg.REPLACE})}function E(){const D=v;return{subscribe(I){if(typeof I!="object"||I===null)throw new Error(yr(11));function M(){const R=I;R.next&&R.next(y())}return M(),{unsubscribe:D(M)}},[kM](){return this}}}return w({type:Gg.INIT}),{dispatch:w,subscribe:v,getState:y,replaceReducer:C,[kM]:E}}function cce(e){Object.keys(e).forEach(n=>{const i=e[n];if(typeof i(void 0,{type:Gg.INIT})>"u")throw new Error(yr(12));if(typeof i(void 0,{type:Gg.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(yr(13))})}function nR(e){const n=Object.keys(e),i={};for(let h=0;h<n.length;h++){const f=n[h];typeof e[f]=="function"&&(i[f]=e[f])}const s=Object.keys(i);let d;try{cce(i)}catch(h){d=h}return function(f={},g){if(d)throw d;let p=!1;const x={};for(let y=0;y<s.length;y++){const v=s[y],w=i[v],C=f[v],E=w(C,g);if(typeof E>"u")throw g&&g.type,new Error(yr(14));x[v]=E,p=p||E!==C}return p=p||s.length!==Object.keys(f).length,p?x:f}}function qg(...e){return e.length===0?n=>n:e.length===1?e[0]:e.reduce((n,i)=>(...s)=>n(i(...s)))}function dce(...e){return n=>(i,s)=>{const d=n(i,s);let h=()=>{throw new Error(yr(15))};const f={getState:d.getState,dispatch:(p,...x)=>h(p,...x)},g=e.map(p=>p(f));return h=qg(...g)(d.dispatch),{...d,dispatch:h}}}function rR(e){return dA(e)&&"type"in e&&typeof e.type=="string"}var iR=Symbol.for("immer-nothing"),yM=Symbol.for("immer-draftable"),Hr=Symbol.for("immer-state");function xo(e,...n){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Si=Object,Id=Si.getPrototypeOf,Kg="constructor",lb="prototype",qw="configurable",Yg="enumerable",cg="writable",qh="value",zs=e=>!!e&&!!e[Hr];function So(e){var n;return e?oR(e)||cb(e)||!!e[yM]||!!((n=e[Kg])!=null&&n[yM])||db(e)||ub(e):!1}var uce=Si[lb][Kg].toString(),xM=new WeakMap;function oR(e){if(!e||!uA(e))return!1;const n=Id(e);if(n===null||n===Si[lb])return!0;const i=Si.hasOwnProperty.call(n,Kg)&&n[Kg];if(i===Object)return!0;
154if(!qc(i))return!1;let s=xM.get(i);return s===void 0&&(s=Function.toString.call(i),xM.set(i,s)),s===uce}function km(e,n,i=!0){ym(e)===0?(i?Reflect.ownKeys(e):Si.keys(e)).forEach(d=>{n(d,e[d],e)}):e.forEach((s,d)=>n(d,s,e))}function ym(e){const n=e[Hr];return n?n.type_:cb(e)?1:db(e)?2:ub(e)?3:0}var vM=(e,n,i=ym(e))=>i===2?e.has(n):Si[lb].hasOwnProperty.call(e,n),Kw=(e,n,i=ym(e))=>i===2?e.get(n):e[n],Qg=(e,n,i,s=ym(e))=>{s===2?e.set(n,i):s===3?e.add(i):e[n]=i};function hce(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n}var cb=Array.isArray,db=e=>e instanceof Map,ub=e=>e instanceof Set,uA=e=>typeof e=="object",qc=e=>typeof e=="function",Yx=e=>typeof e=="boolean";function mce(e){const n=+e;return Number.isInteger(n)&&String(n)===e}var ws=e=>e.copy_||e.base_,hA=e=>e.modified_?e.copy_:e.base_;function Yw(e,n){if(db(e))return new Map(e);if(ub(e))return new Set(e);if(cb(e))return Array[lb].slice.call(e);const i=oR(e);if(n===!0||n==="class_only"&&!i){const s=Si.getOwnPropertyDescriptors(e);delete s[Hr];let d=Reflect.ownKeys(s);for(let h=0;h<d.length;h++){const f=d[h],g=s[f];g[cg]===!1&&(g[cg]=!0,g[qw]=!0),(g.get||g.set)&&(s[f]={[qw]:!0,[cg]:!0,[Yg]:g[Yg],[qh]:e[f]})}return Si.create(Id(e),s)}else{const s=Id(e);if(s!==null&&i)return{...e};const d=Si.create(s);return Si.assign(d,e)}}function mA(e,n=!1){return hb(e)||zs(e)||!So(e)||(ym(e)>1&&Si.defineProperties(e,{set:Np,add:Np,clear:Np,delete:Np}),Si.freeze(e),n&&km(e,(i,s)=>{mA(s,!0)},!1)),e}function fce(){xo(2)}var Np={[qh]:fce};function hb(e){return e===null||!uA(e)?!0:Si.isFrozen(e)}var Zg="MapSet",Qw="Patches",wM="ArrayMethods",sR={};function Zl(e){const n=sR[e];return n||xo(0,e),n}var _M=e=>!!sR[e],Kh,aR=()=>Kh,pce=(e,n)=>({drafts_:[],parent_:e,immer_:n,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:_M(Zg)?Zl(Zg):void 0,arrayMethodsPlugin_:_M(wM)?Zl(wM):void 0});function AM(e,n){n&&(e.patchPlugin_=Zl(Qw),e.patches_=[],e.inversePatches_=[],e.patchListener_=n)}function Zw(e){Jw(e),e.drafts_.forEach(gce),e.drafts_=null}function Jw(e){e===Kh&&(Kh=e.parent_)}var CM=e=>Kh=pce(Kh,e);function gce(e){const n=e[Hr];n.type_===0||n.type_===1?n.revoke_():n.revoked_=!0}function jM(e,n){n.unfinalizedDrafts_=n.drafts_.length;const i=n.drafts_[0];if(e!==void 0&&e!==i){i[Hr].modified_&&(Zw(n),xo(4)),So(e)&&(e=NM(n,e));const{patchPlugin_:d}=n;d&&d.generateReplacementPatches_(i[Hr].base_,e,n)}else e=NM(n,i);return bce(n,e,!0),Zw(n),n.patches_&&n.patchListener_(n.patches_,n.inversePatches_),e!==iR?e:void 0}function NM(e,n){if(hb(n))return n;const i=n[Hr];if(!i)return fA(n,e.handledSet_,e);if(!mb(i,e))return n;if(!i.modified_)return i.base_;if(!i.finalized_){const{callbacks_:s}=i;if(s)for(;s.length>0;)s.pop()(e);dR(i,e)}return i.copy_}function bce(e,n,i=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&mA(n,i)}function lR(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var mb=(e,n)=>e.scope_===n,kce=[];function cR(e,n,i,s){const d=ws(e),h=e.type_;if(s!==void 0&&Kw(d,s,h)===n){Qg(d,s,i,h);return}if(!e.draftLocations_){const g=e.draftLocations_=new Map;km(d,(p,x)=>{if(zs(x)){const y=g.get(x)||[];y.push(p),g.set(x,y)}})}const f=e.draftLocations_.get(n)??kce;for(const g of f)Qg(d,g,i,h)}function yce(e,n,i){e.callbacks_.push(function(d){var g;const h=n;if(!h||!mb(h,d))return;(g=d.mapSetPlugin_)==null||g.fixSetContents(h);const f=hA(h);cR(e,h.draft_??h,f,i),dR(h,d)})}function dR(e,n){var s;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((s=e.assigned_)==null?void 0:s.size)??0)>0)){const{patchPlugin_:d}=n;if(d){const h=d.getPath(e);h&&d.generatePatches_(e,h,n)}lR(e)}}function xce(e,n,i){const{scope_:s}=e;if(zs(i)){const d=i[Hr];mb(d,s)&&d.callbacks_.push(function(){dg(e);const f=hA(d);cR(e,i,f,n)})}else So(i)&&e.callbacks_.push(function(){const h=ws(e);Kw(h,n,e.type_)===i&&s.drafts_.length>1&&(e.assigned_.get(n)??!1)===!0&&e.copy_&&fA(Kw(e.copy_,n,e.type_),s.handledSet_,s)})}function fA(e,n,i){return!i.immer_.autoFreeze_&&i.unfinalizedDrafts_<1||zs(e)||n.has(e)||!So(e)||hb(e)||(n.add(e),km(e,(s,d)=>
154{if(zs(d)){const h=d[Hr];if(mb(h,i)){const f=hA(h);Qg(e,s,f,e.type_),lR(h)}}else So(d)&&fA(d,n,i)})),e}function vce(e,n){const i=cb(e),s={type_:i?1:0,scope_:n?n.scope_:aR(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:n,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let d=s,h=pA;i&&(d=[s],h=Yh);const{revoke:f,proxy:g}=Proxy.revocable(d,h);return s.draft_=g,s.revoke_=f,[g,s]}var pA={get(e,n){if(n===Hr)return e;let i=e.scope_.arrayMethodsPlugin_;const s=e.type_===1&&typeof n=="string";if(s&&i!=null&&i.isArrayOperationMethod(n))return i.createMethodInterceptor(e,n);const d=ws(e);if(!vM(d,n,e.type_))return wce(e,d,n);const h=d[n];if(e.finalized_||!So(h)||s&&e.operationMethod&&(i!=null&&i.isMutatingArrayMethod(e.operationMethod))&&mce(n))return h;if(h===Qx(e.base_,n)){dg(e);const f=e.type_===1?+n:n,g=e1(e.scope_,h,e,f);return e.copy_[f]=g}return h},has(e,n){return n in ws(e)},ownKeys(e){return Reflect.ownKeys(ws(e))},set(e,n,i){const s=uR(ws(e),n);if(s!=null&&s.set)return s.set.call(e.draft_,i),!0;if(!e.modified_){const d=Qx(ws(e),n),h=d==null?void 0:d[Hr];if(h&&h.base_===i)return e.copy_[n]=i,e.assigned_.set(n,!1),!0;if(hce(i,d)&&(i!==void 0||vM(e.base_,n,e.type_)))return!0;dg(e),Xw(e)}return e.copy_[n]===i&&(i!==void 0||n in e.copy_)||Number.isNaN(i)&&Number.isNaN(e.copy_[n])||(e.copy_[n]=i,e.assigned_.set(n,!0),xce(e,n,i)),!0},deleteProperty(e,n){return dg(e),Qx(e.base_,n)!==void 0||n in e.base_?(e.assigned_.set(n,!1),Xw(e)):e.assigned_.delete(n),e.copy_&&delete e.copy_[n],!0},getOwnPropertyDescriptor(e,n){const i=ws(e),s=Reflect.getOwnPropertyDescriptor(i,n);return s&&{[cg]:!0,[qw]:e.type_!==1||n!=="length",[Yg]:s[Yg],[qh]:i[n]}},defineProperty(){xo(11)},getPrototypeOf(e){return Id(e.base_)},setPrototypeOf(){xo(12)}},Yh={};km(pA,(e,n)=>{Yh[e]=function(){const i=arguments;return i[0]=i[0][0],n.apply(this,i)}});Yh.deleteProperty=function(e,n){return Yh.set.call(this,e,n,void 0)};Yh.set=function(e,n,i){return pA.set.call(this,e[0],n,i,e[0])};function Qx(e,n){const i=e[Hr];return(i?ws(i):e)[n]}function wce(e,n,i){var d;const s=uR(n,i);return s?qh in s?s[qh]:(d=s.get)==null?void 0:d.call(e.draft_):void 0}function uR(e,n){if(!(n in e))return;let i=Id(e);for(;i;){const s=Object.getOwnPropertyDescriptor(i,n);if(s)return s;i=Id(i)}}function Xw(e){e.modified_||(e.modified_=!0,e.parent_&&Xw(e.parent_))}function dg(e){e.copy_||(e.assigned_=new Map,e.copy_=Yw(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var _ce=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(i,s,d)=>{if(qc(i)&&!qc(s)){const f=s;s=i;const g=this;return function(x=f,...y){return g.produce(x,v=>s.call(this,v,...y))}}qc(s)||xo(6),d!==void 0&&!qc(d)&&xo(7);let h;if(So(i)){const f=CM(this),g=e1(f,i,void 0);let p=!0;try{h=s(g),p=!1}finally{p?Zw(f):Jw(f)}return AM(f,d),jM(h,f)}else if(!i||!uA(i)){if(h=s(i),h===void 0&&(h=i),h===iR&&(h=void 0),this.autoFreeze_&&mA(h,!0),d){const f=[],g=[];Zl(Qw).generateReplacementPatches_(i,h,{patches_:f,inversePatches_:g}),d(f,g)}return h}else xo(1,i)},this.produceWithPatches=(i,s)=>{if(qc(i))return(g,...p)=>this.produceWithPatches(g,x=>i(x,...p));let d,h;return[this.produce(i,s,(g,p)=>{d=g,h=p}),d,h]},Yx(n==null?void 0:n.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),Yx(n==null?void 0:n.useStrictShallowCopy)&&this.setUseStrictShallowCopy(n.useStrictShallowCopy),Yx(n==null?void 0:n.useStrictIteration)&&this.setUseStrictIteration(n.useStrictIteration)}createDraft(n){So(n)||xo(8),zs(n)&&(n=Co(n));const i=CM(this),s=e1(i,n,void 0);return s[Hr].isManual_=!0,Jw(i),s}finishDraft(n,i){const s=n&&n[Hr];(!s||!s.isManual_)&&xo(9);const{scope_:d}=s;return AM(d,i),jM(void 0,d)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}setUseStrictIteration(n){this.useStrictIteration_=n}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(n,i){let s;for(s=i.length-1;s>=0;s--){const h=i[s];if(h.path.length===0&&h.op==="replace"){n=h.value;break}}s>-1&&(i=i.slice(s+1));const d=Zl(Qw).applyPatches_;return zs(n)?d(n,i):this.produce(n,h=>d(h,i))}};function e1(e,n,i,s){const[d,h]=db(n)?Zl(Zg).proxyMap_(n,i):ub(n)?Zl(Zg).proxySet_(n,i):vce(n,i);return((i==null?void 0:i.scope_)??aR()).drafts_.push(d),h.callbacks_=(i==null?void 0:i.callbacks_)??[],h.key_=s,i&&s!==void 0?yce(i,h,s):h.callbacks_.push(function(p){var y;(y=p.mapSetPlugin_)==null||y.fixSetContents(h);const{patchPlugin_:x}=p;h.modified_&&x&&x.generatePatches_(h,[],p)}),d}function Co(e){return zs(e)||xo(10,e),hR(e)}function hR(e){if(!So(e)||hb(e))return e;const n=e[Hr];let i,s=!0;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,i=Yw(e,n.scope_.immer_.useStrictShallowCopy_),s=n.scope_.immer_.shouldUseStrictIteration()}else i=Yw(e,!0);return km(i,(d,h)=>{Qg(i,d,hR(h))},s),n&&(n.finalized_=!1),i}var Ace=new _ce,mR=Ace.produce;function fR(e){return({dispatch:i,getState:s})=>d=>h=>typeof h=="function"?h(i,s,e):d(h)}var Cce=fR(),jce=fR,Nce=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?qg:qg.apply(null,arguments)};function to(e,n){function i(...s){if(n){let d=n(...s);if(!d)throw new Error(Ti(0));return{type:e,payload:d.payload,..."meta"in d&&{meta:d.meta},..."error"in d&&{error:d.error}}}return{type:e,payload:s[0]}}return i.toString=()=>`${e}`,i.type=e,i.match=s=>rR(s)&&s.type===e,i}var pR=class hh extends Array{constructor(...n){super(...n),Object.setPrototypeOf(this,hh.prototype)}static get[Symbol.species](){return hh}concat(...n){return super.concat.apply(this,n)}prepend(...n){return n.length===1&&Array.isArray(n[0])?new hh(...n[0].c
154oncat(this)):new hh(...n.concat(this))}};function EM(e){return So(e)?mR(e,()=>{}):e}function Ep(e,n,i){return e.has(n)?e.get(n):e.set(n,i(n)).get(n)}function Ece(e){return typeof e=="boolean"}var Sce=()=>function(n){const{thunk:i=!0,immutableCheck:s=!0,serializableCheck:d=!0,actionCreatorCheck:h=!0}=n??{};let f=new pR;return i&&(Ece(i)?f.push(Cce):f.push(jce(i.extraArgument))),f},gR="RTK_autoBatch",bn=()=>e=>({payload:e,meta:{[gR]:!0}}),SM=e=>n=>{setTimeout(n,e)},bR=(e={type:"raf"})=>n=>(...i)=>{const s=n(...i);let d=!0,h=!1,f=!1;const g=new Set,p=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:SM(10):e.type==="callback"?e.queueNotification:SM(e.timeout),x=()=>{f=!1,h&&(h=!1,g.forEach(y=>y()))};return Object.assign({},s,{subscribe(y){const v=()=>d&&y(),w=s.subscribe(v);return g.add(y),()=>{w(),g.delete(y)}},dispatch(y){var v;try{return d=!((v=y==null?void 0:y.meta)!=null&&v[gR]),h=!d,h&&(f||(f=!0,p(x))),s.dispatch(y)}finally{d=!0}}})},Dce=e=>function(i){const{autoBatch:s=!0}=i??{};let d=new pR(e);return s&&d.push(bR(typeof s=="object"?s:void 0)),d};function Tce(e){const n=Sce(),{reducer:i=void 0,middleware:s,devTools:d=!0,preloadedState:h=void 0,enhancers:f=void 0}=e||{};let g;if(typeof i=="function")g=i;else if(dA(i))g=nR(i);else throw new Error(Ti(1));let p;typeof s=="function"?p=s(n):p=n();let x=qg;d&&(x=Nce({trace:!1,...typeof d=="object"&&d}));const y=dce(...p),v=Dce(y);let w=typeof f=="function"?f(v):v();const C=x(...w);return tR(g,h,C)}function kR(e){const n={},i=[];let s;const d={addCase(h,f){const g=typeof h=="string"?h:h.type;if(!g)throw new Error(Ti(28));if(g in n)throw new Error(Ti(29));return n[g]=f,d},addAsyncThunk(h,f){return f.pending&&(n[h.pending.type]=f.pending),f.rejected&&(n[h.rejected.type]=f.rejected),f.fulfilled&&(n[h.fulfilled.type]=f.fulfilled),f.settled&&i.push({matcher:h.settled,reducer:f.settled}),d},addMatcher(h,f){return i.push({matcher:h,reducer:f}),d},addDefaultCase(h){return s=h,d}};return e(d),[n,i,s]}function Ice(e){return typeof e=="function"}function Mce(e,n){let[i,s,d]=kR(n),h;if(Ice(e))h=()=>EM(e());else{const g=EM(e);h=()=>g}function f(g=h(),p){let x=[i[p.type],...s.filter(({matcher:y})=>y(p)).map(({reducer:y})=>y)];return x.filter(y=>!!y).length===0&&(x=[d]),x.reduce((y,v)=>{if(v)if(zs(y)){const C=v(y,p);return C===void 0?y:C}else{if(So(y))return mR(y,w=>v(w,p));{const w=v(y,p);if(w===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}}return y},g)}return f.getInitialState=h,f}var Pce="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Oce=(e=21)=>{let n="",i=e;for(;i--;)n+=Pce[Math.random()*64|0];return n},Bce=Symbol.for("rtk-slice-createasyncthunk");function Lce(e,n){return`${e}/${n}`}function Rce({creators:e}={}){var i;const n=(i=e==null?void 0:e.asyncThunk)==null?void 0:i[Bce];return function(d){const{name:h,reducerPath:f=h}=d;if(!h)throw new Error(Ti(11));const g=(typeof d.reducers=="function"?d.reducers(Fce()):d.reducers)||{},p=Object.keys(g),x={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},y={addCase(R,F){const V=typeof R=="string"?R:R.type;if(!V)throw new Error(Ti(12));if(V in x.sliceCaseReducersByType)throw new Error(Ti(13));return x.sliceCaseReducersByType[V]=F,y},addMatcher(R,F){return x.sliceMatchers.push({matcher:R,reducer:F}),y},exposeAction(R,F){return x.actionCreators[R]=F,y},exposeCaseReducer(R,F){return x.sliceCaseReducersByName[R]=F,y}};p.forEach(R=>{const F=g[R],V={reducerName:R,type:Lce(h,R),createNotation:typeof d.reducers=="function"};Vce(F)?Wce(V,F,y,n):$ce(V,F,y)});function v(){const[R={},F=[],V=void 0]=typeof d.extraReducers=="function"?kR(d.extraReducers):[d.extraReducers],P={...R,...x.sliceCaseReducersByType};return Mce(d.initialState,z=>{for(let W in P)z.addCase(W,P[W]);for(let W of x.sliceMatchers)z.addMatcher(W.matcher,W.reducer);for(let W of F)z.addMatcher(W.matcher,W.reducer);V&&z.addDefaultCase(V)})}const w=R=>R,C=new Map,E=new WeakMap;let S;function D(R,F){return S||(S=v()),S(R,F)}function I(){return S||(S=v()),S.getInitialState()}function M(R,F=!1){function V(z){let W=z[R];return typeof W>"u"&&F&&(W=Ep(E,V,I)),W}function P(z=w){const W=Ep(C,F,()=>new WeakMap);return Ep(W,z,()=>{const K={};for(const[G,Z]of Object.entries(d.selectors??{}))K[G]=zce(Z,z,()=>Ep(E,z,I),F);return K})}return{reducerPath:R,getSelectors:P,get selectors(){return P(V)},selectSlice:V}}const B={name:h,reducer:D,actions:x.actionCreators,caseReducers:x.sliceCaseReducersByName,getInitialState:I,...M(f),injectInto(R,{reducerPath:F,...V}={}){const P=F??f;return R.inject({reducerPath:P,reducer:D},V),{...B,...M(P,!0)}}};return B}}function zce(e,n,i,s){function d(h,...f){let g=n(h);return typeof g>"u"&&s&&(g=i()),e(g,...f)}return d.unwrapped=e,d}var hi=Rce();function Fce(){function e(n,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:n,...i}}return e.withTypes=()=>e,{reducer(n){return Object.assign({[n.name](...i){return n(...i)}}[n.name],{_reducerDefinitionType:"reducer"})},preparedReducer(n,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:n,reducer:i}},asyncThunk:e}}function $ce({type:e,reducerName:n,createNotation:i},s,d){let h,f;if("reducer"in s){if(i&&!Uce(s))throw new Error(Ti(17));h=s.reducer,f=s.prepare}else h=s;d.addCase(e,h).exposeCaseReducer(n,h).exposeAction(n,f?to(e,f):to(e))}function Vce(e){return e._reducerDefinitionType==="asyncThunk"}function Uce(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Wce({type:e,reducerName:n},i,s,d){if(!d)throw new Error(Ti(18));
154const{payloadCreator:h,fulfilled:f,pending:g,rejected:p,settled:x,options:y}=i,v=d(e,h,y);s.exposeAction(n,v),f&&s.addCase(v.fulfilled,f),g&&s.addCase(v.pending,g),p&&s.addCase(v.rejected,p),x&&s.addMatcher(v.settled,x),s.exposeCaseReducer(n,{fulfilled:f||Sp,pending:g||Sp,rejected:p||Sp,settled:x||Sp})}function Sp(){}var Hce="task",yR="listener",xR="completed",gA="cancelled",Gce=`task-${gA}`,qce=`task-${xR}`,t1=`${yR}-${gA}`,Kce=`${yR}-${xR}`,fb=class{constructor(e){Dt(this,"name","TaskAbortError");Dt(this,"message");this.code=e,this.message=`${Hce} ${gA} (reason: ${e})`}},bA=(e,n)=>{if(typeof e!="function")throw new TypeError(Ti(32))},Jg=()=>{},vR=(e,n=Jg)=>(e.catch(n),e),wR=(e,n)=>(e.addEventListener("abort",n,{once:!0}),()=>e.removeEventListener("abort",n)),zl=e=>{if(e.aborted)throw new fb(e.reason)};function _R(e,n){let i=Jg;return new Promise((s,d)=>{const h=()=>d(new fb(e.reason));if(e.aborted){h();return}i=wR(e,h),n.finally(()=>i()).then(s,d)}).finally(()=>{i=Jg})}var Yce=async(e,n)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(i){return{status:i instanceof fb?"cancelled":"rejected",error:i}}finally{n==null||n()}},Xg=e=>n=>vR(_R(e,n).then(i=>(zl(e),i))),AR=e=>{const n=Xg(e);return i=>n(new Promise(s=>setTimeout(s,i)))},{assign:yd}=Object,DM={},pb="listenerMiddleware",Qce=(e,n)=>{const i=s=>wR(e,()=>s.abort(e.reason));return(s,d)=>{bA(s);const h=new AbortController;i(h);const f=Yce(async()=>{zl(e),zl(h.signal);const g=await s({pause:Xg(h.signal),delay:AR(h.signal),signal:h.signal});return zl(h.signal),g},()=>h.abort(qce));return d!=null&&d.autoJoin&&n.push(f.catch(Jg)),{result:Xg(e)(f),cancel(){h.abort(Gce)}}}},Zce=(e,n)=>{const i=async(s,d)=>{zl(n);let h=()=>{};const g=[new Promise((p,x)=>{let y=e({predicate:s,effect:(v,w)=>{w.unsubscribe(),p([v,w.getState(),w.getOriginalState()])}});h=()=>{y(),x()}})];d!=null&&g.push(new Promise(p=>setTimeout(p,d,null)));try{const p=await _R(n,Promise.race(g));return zl(n),p}finally{h()}};return(s,d)=>vR(i(s,d))},CR=e=>{let{type:n,actionCreator:i,matcher:s,predicate:d,effect:h}=e;if(n)d=to(n).match;else if(i)n=i.type,d=i.match;else if(s)d=s;else if(!d)throw new Error(Ti(21));return bA(h),{predicate:d,type:n,effect:h}},jR=yd(e=>{const{type:n,predicate:i,effect:s}=CR(e);return{id:Oce(),effect:s,type:n,predicate:i,pending:new Set,unsubscribe:()=>{throw new Error(Ti(22))}}},{withTypes:()=>jR}),TM=(e,n)=>{const{type:i,effect:s,predicate:d}=CR(n);return Array.from(e.values()).find(h=>(typeof i=="string"?h.type===i:h.predicate===d)&&h.effect===s)},n1=e=>{e.pending.forEach(n=>{n.abort(t1)})},Jce=(e,n)=>()=>{for(const i of n.keys())n1(i);e.clear()},IM=(e,n,i)=>{try{e(n,i)}catch(s){setTimeout(()=>{throw s},0)}},NR=yd(to(`${pb}/add`),{withTypes:()=>NR}),Xce=to(`${pb}/removeAll`),ER=yd(to(`${pb}/remove`),{withTypes:()=>ER}),ede=(...e)=>{console.error(`${pb}/error`,...e)},xm=(e={})=>{const n=new Map,i=new Map,s=C=>{const E=i.get(C)??0;i.set(C,E+1)},d=C=>{const E=i.get(C)??1;E===1?i.delete(C):i.set(C,E-1)},{extra:h,onError:f=ede}=e;bA(f);const g=C=>(C.unsubscribe=()=>n.delete(C.id),n.set(C.id,C),E=>{C.unsubscribe(),E!=null&&E.cancelActive&&n1(C)}),p=C=>{const E=TM(n,C)??jR(C);return g(E)};yd(p,{withTypes:()=>p});const x=C=>{const E=TM(n,C);return E&&(E.unsubscribe(),C.cancelActive&&n1(E)),!!E};yd(x,{withTypes:()=>x});const y=async(C,E,S,D)=>{const I=new AbortController,M=Zce(p,I.signal),B=[];try{C.pending.add(I),s(C),await Promise.resolve(C.effect(E,yd({},S,{getOriginalState:D,condition:(R,F)=>M(R,F).then(Boolean),take:M,delay:AR(I.signal),pause:Xg(I.signal),extra:h,signal:I.signal,fork:Qce(I.signal,B),unsubscribe:C.unsubscribe,subscribe:()=>{n.set(C.id,C)},cancelActiveListeners:()=>{C.pending.forEach((R,F,V)=>{R!==I&&(R.abort(t1),V.delete(R))})},cancel:()=>{I.abort(t1),C.pending.delete(I)},throwIfCancelled:()=>{zl(I.signal)}})))}catch(R){R instanceof fb||IM(f,R,{raisedBy:"effect"})}finally{await Promise.all(B),I.abort(Kce),d(C),C.pending.delete(I)}},v=Jce(n,i);return{middleware:C=>E=>S=>{if(!rR(S))return E(S);if(NR.match(S))return p(S.payload);if(Xce.match(S)){v();return}if(ER.match(S))return x(S.payload);let D=C.getState();const I=()=>
154{if(D===DM)throw new Error(Ti(23));return D};let M;try{if(M=E(S),n.size>0){const B=C.getState(),R=Array.from(n.values());for(const F of R){let V=!1;try{V=F.predicate(S,B,D)}catch(P){V=!1,IM(f,P,{raisedBy:"predicate"})}V&&y(F,S,C,I)}}}finally{D=DM}return M},startListening:p,stopListening:x,clearListeners:v}};function Ti(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var tde={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},SR=hi({name:"chartLayout",initialState:tde,reducers:{setLayout(e,n){e.layoutType=n.payload},setChartSize(e,n){e.width=n.payload.width,e.height=n.payload.height},setMargin(e,n){var i,s,d,h;e.margin.top=(i=n.payload.top)!==null&&i!==void 0?i:0,e.margin.right=(s=n.payload.right)!==null&&s!==void 0?s:0,e.margin.bottom=(d=n.payload.bottom)!==null&&d!==void 0?d:0,e.margin.left=(h=n.payload.left)!==null&&h!==void 0?h:0},setScale(e,n){e.scale=n.payload}}}),{setMargin:nde,setLayout:rde,setChartSize:ide,setScale:ode}=SR.actions,sde=SR.reducer;function DR(e,n,i){return Array.isArray(e)&&e&&n+i!==0?e.slice(n,i+1):e}function xn(e){return Number.isFinite(e)}function rs(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function MM(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function ld(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?MM(Object(i),!0).forEach(function(s){ade(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):MM(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function ade(e,n,i){return(n=lde(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function lde(e){var n=cde(e,"string");return typeof n=="symbol"?n:n+""}function cde(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function ur(e,n,i){return Jn(e)||Jn(n)?i:ns(n)?Td(e,n,i):typeof n=="function"?n(e):i}var dde=(e,n,i)=>{if(n&&i){var{width:s,height:d}=i,{align:h,verticalAlign:f,layout:g}=n;if((g==="vertical"||g==="horizontal"&&f==="middle")&&h!=="center"&&ht(e[h]))return ld(ld({},e),{},{[h]:e[h]+(s||0)});if((g==="horizontal"||g==="vertical"&&h==="center")&&f!=="middle"&&ht(e[f]))return ld(ld({},e),{},{[f]:e[f]+(d||0)})}return e},Gs=(e,n)=>e==="horizontal"&&n==="xAxis"||e==="vertical"&&n==="yAxis"||e==="centric"&&n==="angleAxis"||e==="radial"&&n==="radiusAxis",TR=(e,n,i,s)=>{if(s)return e.map(g=>g.coordinate);var d,h,f=e.map(g=>(g.coordinate===n&&(d=!0),g.coordinate===i&&(h=!0),g.coordinate));return d||f.push(n),h||f.push(i),f},IR=(e,n,i)=>{if(!e)return null;var{duplicateDomain:s,type:d,range:h,scale:f,realScaleType:g,isCategorical:p,categoricalDomain:x,tickCount:y,ticks:v,niceTicks:w,axisType:C}=e;if(!f)return null;var E=g==="scaleBand"&&f.bandwidth?f.bandwidth()/2:2,S=d==="category"&&f.bandwidth?f.bandwidth()/E:0;if(S=C==="angleAxis"&&h&&h.length>=2?Yi(h[0]-h[1])*2*S:S,v||w){var D=(v||w||[]).map((I,M)=>{var B=s?s.indexOf(I):I;return{coordinate:f(B)+S,value:I,offset:S,index:M}});return D.filter(I=>!Eo(I.coordinate))}return p&&x?x.map((I,M)=>({coordinate:f(I)+S,value:I,index:M,offset:S})):f.ticks&&y!=null?f.ticks(y).map((I,M)=>({coordinate:f(I)+S,value:I,offset:S,index:M})):f.domain().map((I,M)=>({coordinate:f(I)+S,value:s?s[I]:I,index:M,offset:S}))},PM=1e-4,ude=e=>{var n=e.domain();if(!(!n||n.length<=2)){var i=n.length,s=e.range(),d=Math.min(s[0],s[1])-PM,h=Math.max(s[0],s[1])+PM,f=e(n[0]),g=e(n[i-1]);(f<d||f>h||g<d||g>h)&&e.domain([n[0],n[i-1]])}},V5e=(e,n)=>{if(!n||n.length!==2||!ht(n[0])||!ht(n[1]))return e;var i=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]),d=[e[0],e[1]];return(!ht(e[0])||e[0]<i)&&(d[0]=i),(!ht(e[1])||e[1]>s)&&(d[1]=s),d[0]>s&&(d[0]=s),d[1]<i&&(d[1]=i),d},hde=e=>{var n,i=e.length;if(!(i<=0)){var s=(n=e[0])===null||n===void 0?void 0:n.length;if(!(s==null||s<=0))for(var d=0;d<s;++d)for(var h=0,f=0,g=0;g<i;++g){var p=e[g],x=p==null?void 0:p[d];if(x!=null){var y=x[1],v=x[0],w=Eo(y)?v:y;w>=0?(x[0]=h,x[1]=h+w,h=y):(x[0]=f,x[1]=f+w,f=y)}}}},mde=e=>{var n,i=e.length;if(!(i<=0)){var s=(n=e[0])===null||n===void 0?void 0:n.length;if(!(s==null||s<=0))for(var d=0;d<s;++d)for(var h=0,f=0;f<i;++f){var g=e[f],p=g==null?void 0:g[d];if(p!=null){var x=Eo(p[1])?p[0]:p[1];x>=0?(p[0]=h,p[1]=h+x,h=p[1]):(p[0]=0,p[1]=0)}}}},fde={sign:hde,expand:Sle,none:Ql,silhouette:Dle,wiggle:Tle,positive:mde},pde=(e,n,i)=>{var s,d=(s=fde[i])!==null&&s!==void 0?s:Ql,h=Ele().keys(n).value((g,p)=>Number(ur(g,p,0))).order(Gw).offset(d),f=h(e);return f.forEach((g,p)=>{g.forEach((x,y)=>{var v=ur(e[y],n[p],0);Array.isArray(v)&&v.length===2&&ht(v[0])&&ht(v[1])&&(x[0]=v[0],x[1]=v[1])})}),f};function gde(e){return e==null?void 0:String(e)}function OM(e){var{axis:n,ticks:i,bandSize:s,entry:d,index:h,dataKey:f}=e;if(n.type==="category"){if(!n.allowDuplicatedCategory&&n.dataKey&&!Jn(d[n.dataKey])){var g=S9(i,"value",d[n.dataKey]);if(g)return g.coordinate+s/2}return i[h]?i[h].coordinate+s/2:null}var p=ur(d,Jn(f)?n.dataKey:f);return Jn(p)?null:n.scale(p)}var U5e=e=>{var{axis:n,ticks:i,offset:s,bandSize:d,entry:h,index:f}=e;if(n.type==="category")return i[f]?i[f].coordinate+s:null;var g=ur(h,n.dataKey,n.scale.domain()[f]);return Jn(g)?null:n.scale(g)-d/2+s},W5e=e=>{var{numericAxis:n}=e,i=n.scale.domain();if(n.type==="number"){var s=Math.min(i[0],i[1]),d=Math.max(i[0],i[1]);return s<=0&&d>=0?0:d<0?d:s}return i[0]},bde=e=>{var n=e.flat(2).filter(ht);return[Math.min(...n),Math.max(...n)]},kde=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],yde=(e,n,i)=>{if(e!=null)return kde(Object.keys(e).reduce((s,d)=>{var h=e[d];if(!h)return s;var{stackedData:f}=h,g=f.reduce((p,x)=>{var y=DR(x,n,i),v=bde(y);return!xn(v[0])||!xn(v[1])?p:[Math.min(p[0],v[0]),Math.max(p[1],v[1])]},[1/0,-1/0]);return[Math.min(g[0],s[0]),Math.max(g[1],s[1])]},[1/0,-1/0]))},BM=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,LM=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,e0=(e,n,i)=>{if(e&&e.scale&&e.scale.bandwidth){var s=e.scale.bandwidth();if(!i||s>0)return s}if(e&&n&&n.length>=2){for(var d=ab(n,y=>y.coordinate),h=1/0,f=1,g=d.length;f<g;f++){var p=d[f],x=d[f-1];h=Math.min(((p==null?void 0:p.coordinate)||0)-((x==null?void 0:x.coordinate)||0),h)}return h===1/0?0:h}return i?void 0:0};function RM(e){var{tooltipEntrySettings:n,dataKey:i,payload:s,value:d,name:h}=e;return ld(ld({},n),{},{dataKey:i,payload:s,value:d,name:h})}
154function MR(e,n){if(e)return String(e);if(typeof n=="string")return n}var xde=(e,n)=>{if(n==="horizontal")return e.chartX;if(n==="vertical")return e.chartY},vde=(e,n)=>n==="centric"?e.angle:e.radius,qs=e=>e.layout.width,Ks=e=>e.layout.height,wde=e=>e.layout.scale,PR=e=>e.layout.margin,gb=xe(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),bb=xe(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),_de="data-recharts-item-index",Ade="data-recharts-item-id",vm=60;function zM(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Dp(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?zM(Object(i),!0).forEach(function(s){Cde(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):zM(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function Cde(e,n,i){return(n=jde(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function jde(e){var n=Nde(e,"string");return typeof n=="symbol"?n:n+""}function Nde(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var Ede=e=>e.brush.height;function Sde(e){var n=bb(e);return n.reduce((i,s)=>{if(s.orientation==="left"&&!s.mirror&&!s.hide){var d=typeof s.width=="number"?s.width:vm;return i+d}return i},0)}function Dde(e){var n=bb(e);return n.reduce((i,s)=>{if(s.orientation==="right"&&!s.mirror&&!s.hide){var d=typeof s.width=="number"?s.width:vm;return i+d}return i},0)}function Tde(e){var n=gb(e);return n.reduce((i,s)=>s.orientation==="top"&&!s.mirror&&!s.hide?i+s.height:i,0)}function Ide(e){var n=gb(e);return n.reduce((i,s)=>s.orientation==="bottom"&&!s.mirror&&!s.hide?i+s.height:i,0)}var Nr=xe([qs,Ks,PR,Ede,Sde,Dde,Tde,Ide,eR,ice],(e,n,i,s,d,h,f,g,p,x)=>{var y={left:(i.left||0)+d,right:(i.right||0)+h},v={top:(i.top||0)+f,bottom:(i.bottom||0)+g},w=Dp(Dp({},v),y),C=w.bottom;w.bottom+=s,w=dde(w,p,x);var E=e-w.left-w.right,S=n-w.top-w.bottom;return Dp(Dp({brushBottom:C},w),{},{width:Math.max(E,0),height:Math.max(S,0)})}),Mde=xe(Nr,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),OR=xe(qs,Ks,(e,n)=>({x:0,y:0,width:e,height:n})),Pde=j.createContext(null),mi=()=>j.useContext(Pde)!=null,kb=e=>e.brush,yb=xe([kb,Nr,PR],(e,n,i)=>({height:e.height,x:ht(e.x)?e.x:n.left,y:ht(e.y)?e.y:n.top+n.height+n.brushBottom-((i==null?void 0:i.bottom)||0),width:ht(e.width)?e.width:n.width})),BR={},LR={},RR={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i,s,{signal:d,edges:h}={}){let f,g=null;const p=h!=null&&h.includes("leading"),x=h==null||h.includes("trailing"),y=()=>{g!==null&&(i.apply(f,g),f=void 0,g=null)},v=()=>{x&&y(),S()};let w=null;const C=()=>{w!=null&&clearTimeout(w),w=setTimeout(()=>{w=null,v()},s)},E=()=>{w!==null&&(clearTimeout(w),w=null)},S=()=>{E(),f=void 0,g=null},D=()=>{y()},I=function(...M){if(d!=null&&d.aborted)return;f=this,g=M;const B=w==null;C(),p&&B&&y()};return I.schedule=C,I.cancel=S,I.flush=D,d==null||d.addEventListener("abort",S,{once:!0}),I}e.debounce=n})(RR);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=RR;function i(s,d=0,h={}){typeof h!="object"&&(h={});const{leading:f=!1,trailing:g=!0,maxWait:p}=h,x=Array(2);f&&(x[0]="leading"),g&&(x[1]="trailing");let y,v=null;const w=n.debounce(function(...S){y=s.apply(this,S),v=null},d,{edges:x}),C=function(...S){return p!=null&&(v===null&&(v=Date.now()),Date.now()-v>=p)?(y=s.apply(this,S),v=Date.now(),w.cancel(),w.schedule(),y):(w.apply(this,S),y)},E=()=>(w.flush(),y);return C.cancel=w.cancel,C.flush=E,C}e.debounce=i})(LR);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=LR;function i(s,d=0,h={}){const{leading:f=!0,trailing:g=!0}=h;return n.debounce(s,d,{leading:f,maxWait:d,trailing:g})}e.throttle=i})(BR);var Ode=BR.throttle;const Bde=os(Ode);var t0=function(n,i){for(var s=arguments.length,d=new Array(s>2?s-2:0),h=2;h<s;h++)d[h-2]=arguments[h];if(typeof console<"u"&&console.warn&&(i===void 0&&console.warn("LogUtils requires an error message argument"),!n))if(i===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=0;console.warn(i.replace(/%s/g,()=>d[f++]))}},zR=(e,n,i)=>{var{width:s="100%",height:d="100%",aspect:h,maxHeight:f}=i,g=Rs(s)?e:Number(s),p=Rs(d)?n:Number(d);return h&&h>0&&(g?p=g/h:p&&(g=p*h),f&&p!=null&&p>f&&(p=f)),{calculatedWidth:g,calculatedHeight:p}},Lde={width:0,height:0,overflow:"visible"},Rde={width:0,overflowX:"visible"},zde={height:0,overflowY:"visible"},Fde={},$de=e=>{var{width:n,height:i}=e,s=Rs(n),d=Rs(i);return s&&d?Lde:s?Rde:d?zde:Fde};function Vde(e){var{width:n,height:i,aspect:s}=e,d=n,h=i;return d===void 0&&h===void 0?(d="100%",h="100%"):d===void 0?d=s&&s>0?void 0:"100%":h===void 0&&(h=s&&s>0?void 0:"100%"),{width:d,height:h}}function r1(){return r1=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},r1.apply(null,arguments)}function FM(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function $M(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};
154n%2?FM(Object(i),!0).forEach(function(s){Ude(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):FM(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function Ude(e,n,i){return(n=Wde(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Wde(e){var n=Hde(e,"string");return typeof n=="symbol"?n:n+""}function Hde(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var FR=j.createContext({width:-1,height:-1});function Gde(e){return rs(e.width)&&rs(e.height)}function $R(e){var{children:n,width:i,height:s}=e,d=j.useMemo(()=>({width:i,height:s}),[i,s]);return Gde(d)?j.createElement(FR.Provider,{value:d},n):null}var kA=()=>j.useContext(FR),qde=j.forwardRef((e,n)=>{var{aspect:i,initialDimension:s={width:-1,height:-1},width:d,height:h,minWidth:f=0,minHeight:g,maxHeight:p,children:x,debounce:y=0,id:v,className:w,onResize:C,style:E={}}=e,S=j.useRef(null),D=j.useRef();D.current=C,j.useImperativeHandle(n,()=>S.current);var[I,M]=j.useState({containerWidth:s.width,containerHeight:s.height}),B=j.useCallback((z,W)=>{M(K=>{var G=Math.round(z),Z=Math.round(W);return K.containerWidth===G&&K.containerHeight===Z?K:{containerWidth:G,containerHeight:Z}})},[]);j.useEffect(()=>{if(S.current==null||typeof ResizeObserver>"u")return bm;var z=Z=>{var se,{width:ge,height:Se}=Z[0].contentRect;B(ge,Se),(se=D.current)===null||se===void 0||se.call(D,ge,Se)};y>0&&(z=Bde(z,y,{trailing:!0,leading:!1}));var W=new ResizeObserver(z),{width:K,height:G}=S.current.getBoundingClientRect();return B(K,G),W.observe(S.current),()=>{W.disconnect()}},[B,y]);var{containerWidth:R,containerHeight:F}=I;t0(!i||i>0,"The aspect(%s) must be greater than zero.",i);var{calculatedWidth:V,calculatedHeight:P}=zR(R,F,{width:d,height:h,aspect:i,maxHeight:p});return t0(V!=null&&V>0||P!=null&&P>0,`The width(%s) and height(%s) of chart should be greater than 0, 155 please check the style of container, or the props width(%s) and height(%s), 156 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 157 height and width.`,V,P,d,h,f,g,i),j.createElement("div",{id:v?"".concat(v):void 0,className:pn("recharts-responsive-container",w),style:$M($M({},E),{},{width:d,height:h,minWidth:f,minHeight:g,maxHeight:p}),ref:S},j.createElement("div",{style:$de({width:d,height:h})},j.createElement($R,{width:V,height:P},x)))}),Kde=j.forwardRef((e,n)=>{var i=kA();if(rs(i.width)&&rs(i.height))return e.children;var{width:s,height:d}=Vde({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:h,calculatedHeight:f}=zR(void 0,void 0,{width:s,height:d,aspect:e.aspect,maxHeight:e.maxHeight});return ht(h)&&ht(f)?j.createElement($R,{width:h,height:f},e.children):j.createElement(qde,r1({},e,{width:s,height:d,ref:n}))});function VR(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var xb=()=>{var e,n=mi(),i=yt(Mde),s=yt(yb),d=(e=yt(kb))===null||e===void 0?void 0:e.padding;return!n||!s||!d?i:{width:s.width-d.left-d.right,height:s.height-d.top-d.bottom,x:d.left,y:d.top}},Yde={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},UR=()=>{var e;return(e=yt(Nr))!==null&&e!==void 0?e:Yde},WR=()=>yt(qs),HR=()=>yt(Ks),H5e=()=>yt(e=>e.layout.margin),on=e=>e.layout.layoutType,Hd=()=>yt(on),Qde=()=>{var e=Hd();if(e==="horizontal"||e==="vertical")return e},Zde=()=>{var e=Hd();return e!==void 0},vb=e=>{var n=Un(),i=mi(),{width:s,height:d}=e,h=kA(),f=s,g=d;return h&&(f=h.width>0?h.width:s,g=h.height>0?h.height:d),j.useEffect(()=>{!i&&rs(f)&&rs(g)&&n(ide({width:f,height:g}))},[n,i,f,g]),null},GR=Symbol.for("immer-nothing"),VM=Symbol.for("immer-draftable"),Mi=Symbol.for("immer-state");function vo(e,...n){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Qh=Object.getPrototypeOf;function Md(e){return!!e&&!!e[Mi]}function Jl(e){var n;return e?qR(e)||Array.isArray(e)||!!e[VM]||!!((n=e.constructor)!=null&&n[VM])||wm(e)||_b(e):!1}var Jde=Object.prototype.constructor.toString(),UM=new WeakMap;function qR(e){if(!e||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);if(n===null||n===Object.prototype)return!0;const i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;if(i===Object)return!0;
157if(typeof i!="function")return!1;let s=UM.get(i);return s===void 0&&(s=Function.toString.call(i),UM.set(i,s)),s===Jde}function n0(e,n,i=!0){wb(e)===0?(i?Reflect.ownKeys(e):Object.keys(e)).forEach(d=>{n(d,e[d],e)}):e.forEach((s,d)=>n(d,s,e))}function wb(e){const n=e[Mi];return n?n.type_:Array.isArray(e)?1:wm(e)?2:_b(e)?3:0}function i1(e,n){return wb(e)===2?e.has(n):Object.prototype.hasOwnProperty.call(e,n)}function KR(e,n,i){const s=wb(e);s===2?e.set(n,i):s===3?e.add(i):e[n]=i}function Xde(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n}function wm(e){return e instanceof Map}function _b(e){return e instanceof Set}function _l(e){return e.copy_||e.base_}function o1(e,n){if(wm(e))return new Map(e);if(_b(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const i=qR(e);if(n===!0||n==="class_only"&&!i){const s=Object.getOwnPropertyDescriptors(e);delete s[Mi];let d=Reflect.ownKeys(s);for(let h=0;h<d.length;h++){const f=d[h],g=s[f];g.writable===!1&&(g.writable=!0,g.configurable=!0),(g.get||g.set)&&(s[f]={configurable:!0,writable:!0,enumerable:g.enumerable,value:e[f]})}return Object.create(Qh(e),s)}else{const s=Qh(e);if(s!==null&&i)return{...e};const d=Object.create(s);return Object.assign(d,e)}}function yA(e,n=!1){return Ab(e)||Md(e)||!Jl(e)||(wb(e)>1&&Object.defineProperties(e,{set:Tp,add:Tp,clear:Tp,delete:Tp}),Object.freeze(e),n&&Object.values(e).forEach(i=>yA(i,!0))),e}function eue(){vo(2)}var Tp={value:eue};function Ab(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var tue={};function Xl(e){const n=tue[e];return n||vo(0,e),n}var Zh;function YR(){return Zh}function nue(e,n){return{drafts_:[],parent_:e,immer_:n,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function WM(e,n){n&&(Xl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=n)}function s1(e){a1(e),e.drafts_.forEach(rue),e.drafts_=null}function a1(e){e===Zh&&(Zh=e.parent_)}function HM(e){return Zh=nue(Zh,e)}function rue(e){const n=e[Mi];n.type_===0||n.type_===1?n.revoke_():n.revoked_=!0}function GM(e,n){n.unfinalizedDrafts_=n.drafts_.length;const i=n.drafts_[0];return e!==void 0&&e!==i?(i[Mi].modified_&&(s1(n),vo(4)),Jl(e)&&(e=r0(n,e),n.parent_||i0(n,e)),n.patches_&&Xl("Patches").generateReplacementPatches_(i[Mi].base_,e,n.patches_,n.inversePatches_)):e=r0(n,i,[]),s1(n),n.patches_&&n.patchListener_(n.patches_,n.inversePatches_),e!==GR?e:void 0}function r0(e,n,i){if(Ab(n))return n;const s=e.immer_.shouldUseStrictIteration(),d=n[Mi];if(!d)return n0(n,(h,f)=>qM(e,d,n,h,f,i),s),n;if(d.scope_!==e)return n;if(!d.modified_)return i0(e,d.base_,!0),d.base_;if(!d.finalized_){d.finalized_=!0,d.scope_.unfinalizedDrafts_--;const h=d.copy_;let f=h,g=!1;d.type_===3&&(f=new Set(h),h.clear(),g=!0),n0(f,(p,x)=>qM(e,d,h,p,x,i,g),s),i0(e,h,!1),i&&e.patches_&&Xl("Patches").generatePatches_(d,i,e.patches_,e.inversePatches_)}return d.copy_}function qM(e,n,i,s,d,h,f){if(d==null||typeof d!="object"&&!f)return;const g=Ab(d);if(!(g&&!f)){if(Md(d)){const p=h&&n&&n.type_!==3&&!i1(n.assigned_,s)?h.concat(s):void 0,x=r0(e,d,p);if(KR(i,s,x),Md(x))e.canAutoFreeze_=!1;else return}else f&&i.add(d);if(Jl(d)&&!g){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||n&&n.base_&&n.base_[s]===d&&g)return;r0(e,d),(!n||!n.scope_.parent_)&&typeof s!="symbol"&&(wm(i)?i.has(s):Object.prototype.propertyIsEnumerable.call(i,s))&&i0(e,d)}}}function i0(e,n,i=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&yA(n,i)}function iue(e,n){const i=Array.isArray(e),s={type_:i?1:0,scope_:n?n.scope_:YR(),modified_:!1,finalized_:!1,assigned_:{},parent_:n,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let d=s,h=xA;i&&(d=[s],h=Jh);const{revoke:f,proxy:g}=Proxy.revocable(d,h);return s.draft_=g,s.revoke_=f,g}var xA={get(e,n){if(n===Mi)return e;const i=_l(e);if(!i1(i,n))return oue(e,i,n);const s=i[n];return e.finalized_||!Jl(s)?s:s===Zx(e.base_,n)?(Jx(e),e.copy_[n]=c1(s,e)):s},has(e,n){return n in _l(e)},ownKeys(e){return Reflect.ownKeys(_l(e))},set(e,n,i){const s=QR(_l(e),n);if(s!=null&&s.set)return s.set.call(e.draft_,i),!0;if(!e.modified_){const d=Zx(_l(e),n),h=d==null?void 0:d[Mi];if(h&&h.base_===i)return e.copy_[n]=i,e.assigned_[n]=!1,!0;if(Xde(i,d)&&(i!==void 0||i1(e.base_,n)))return!0;Jx(e),l1(e)}return e.copy_[n]===i&&(i!==void 0||n in e.copy_)||Number.isNaN(i)&&Number.isNaN(e.copy_[n])||
157(e.copy_[n]=i,e.assigned_[n]=!0),!0},deleteProperty(e,n){return Zx(e.base_,n)!==void 0||n in e.base_?(e.assigned_[n]=!1,Jx(e),l1(e)):delete e.assigned_[n],e.copy_&&delete e.copy_[n],!0},getOwnPropertyDescriptor(e,n){const i=_l(e),s=Reflect.getOwnPropertyDescriptor(i,n);return s&&{writable:!0,configurable:e.type_!==1||n!=="length",enumerable:s.enumerable,value:i[n]}},defineProperty(){vo(11)},getPrototypeOf(e){return Qh(e.base_)},setPrototypeOf(){vo(12)}},Jh={};n0(xA,(e,n)=>{Jh[e]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}});Jh.deleteProperty=function(e,n){return Jh.set.call(this,e,n,void 0)};Jh.set=function(e,n,i){return xA.set.call(this,e[0],n,i,e[0])};function Zx(e,n){const i=e[Mi];return(i?_l(i):e)[n]}function oue(e,n,i){var d;const s=QR(n,i);return s?"value"in s?s.value:(d=s.get)==null?void 0:d.call(e.draft_):void 0}function QR(e,n){if(!(n in e))return;let i=Qh(e);for(;i;){const s=Object.getOwnPropertyDescriptor(i,n);if(s)return s;i=Qh(i)}}function l1(e){e.modified_||(e.modified_=!0,e.parent_&&l1(e.parent_))}function Jx(e){e.copy_||(e.copy_=o1(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sue=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(n,i,s)=>{if(typeof n=="function"&&typeof i!="function"){const h=i;i=n;const f=this;return function(p=h,...x){return f.produce(p,y=>i.call(this,y,...x))}}typeof i!="function"&&vo(6),s!==void 0&&typeof s!="function"&&vo(7);let d;if(Jl(n)){const h=HM(this),f=c1(n,void 0);let g=!0;try{d=i(f),g=!1}finally{g?s1(h):a1(h)}return WM(h,s),GM(d,h)}else if(!n||typeof n!="object"){if(d=i(n),d===void 0&&(d=n),d===GR&&(d=void 0),this.autoFreeze_&&yA(d,!0),s){const h=[],f=[];Xl("Patches").generateReplacementPatches_(n,d,h,f),s(h,f)}return d}else vo(1,n)},this.produceWithPatches=(n,i)=>{if(typeof n=="function")return(f,...g)=>this.produceWithPatches(f,p=>n(p,...g));let s,d;return[this.produce(n,i,(f,g)=>{s=f,d=g}),s,d]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Jl(e)||vo(8),Md(e)&&(e=aue(e));const n=HM(this),i=c1(e,void 0);return i[Mi].isManual_=!0,a1(n),i}finishDraft(e,n){const i=e&&e[Mi];(!i||!i.isManual_)&&vo(9);const{scope_:s}=i;return WM(s,n),GM(void 0,s)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,n){let i;for(i=n.length-1;i>=0;i--){const d=n[i];if(d.path.length===0&&d.op==="replace"){e=d.value;break}}i>-1&&(n=n.slice(i+1));const s=Xl("Patches").applyPatches_;return Md(e)?s(e,n):this.produce(e,d=>s(d,n))}};function c1(e,n){const i=wm(e)?Xl("MapSet").proxyMap_(e,n):_b(e)?Xl("MapSet").proxySet_(e,n):iue(e,n);return(n?n.scope_:YR()).drafts_.push(i),i}function aue(e){return Md(e)||vo(10,e),ZR(e)}function ZR(e){if(!Jl(e)||Ab(e))return e;const n=e[Mi];let i,s=!0;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,i=o1(e,n.scope_.immer_.useStrictShallowCopy_),s=n.scope_.immer_.shouldUseStrictIteration()}else i=o1(e,!0);return n0(i,(d,h)=>{KR(i,d,ZR(h))},s),n&&(n.finalized_=!1),i}var lue=new sue;lue.produce;var cue={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},JR=hi({name:"legend",initialState:cue,reducers:{setLegendSize(e,n){e.size.width=n.payload.width,e.size.height=n.payload.height},setLegendSettings(e,n){e.settings.align=n.payload.align,e.settings.layout=n.payload.layout,e.settings.verticalAlign=n.payload.verticalAlign,e.settings.itemSorter=n.payload.itemSorter},addLegendPayload:{reducer(e,n){e.payload.push(n.payload)},prepare:bn()},replaceLegendPayload:{reducer(e,n){var{prev:i,next:s}=n.payload,d=Co(e).payload.indexOf(i);d>-1&&(e.payload[d]=s)},prepare:bn()},removeLegendPayload:{reducer(e,n){var i=Co(e).payload.indexOf(n.payload);i>-1&&e.payload.splice(i,1)},prepare:bn()}}}),{setLegendSize:G5e,setLegendSettings:q5e,addLegendPayload:XR,replaceLegendPayload:ez,removeLegendPayload:tz}=JR.actions,due=JR.reducer;function d1(){return d1=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},d1.apply(null,arguments)}function KM(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Xx(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};
157n%2?KM(Object(i),!0).forEach(function(s){uue(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):KM(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function uue(e,n,i){return(n=hue(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function hue(e){var n=mue(e,"string");return typeof n=="symbol"?n:n+""}function mue(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function fue(e){return Array.isArray(e)&&ns(e[0])&&ns(e[1])?e.join(" ~ "):e}var pue=e=>{var{separator:n=" : ",contentStyle:i={},itemStyle:s={},labelStyle:d={},payload:h,formatter:f,itemSorter:g,wrapperClassName:p,labelClassName:x,label:y,labelFormatter:v,accessibilityLayer:w=!1}=e,C=()=>{if(h&&h.length){var F={padding:0,margin:0},V=(g?ab(h,g):h).map((P,z)=>{if(P.type==="none")return null;var W=P.formatter||f||fue,{value:K,name:G}=P,Z=K,se=G;if(W){var ge=W(K,G,P,z,h);if(Array.isArray(ge))[Z,se]=ge;else if(ge!=null)Z=ge;else return null}var Se=Xx({display:"block",paddingTop:4,paddingBottom:4,color:P.color||"#000"},s);return j.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(z),style:Se},ns(se)?j.createElement("span",{className:"recharts-tooltip-item-name"},se):null,ns(se)?j.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,j.createElement("span",{className:"recharts-tooltip-item-value"},Z),j.createElement("span",{className:"recharts-tooltip-item-unit"},P.unit||""))});return j.createElement("ul",{className:"recharts-tooltip-item-list",style:F},V)}return null},E=Xx({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),S=Xx({margin:0},d),D=!Jn(y),I=D?y:"",M=pn("recharts-default-tooltip",p),B=pn("recharts-tooltip-label",x);D&&v&&h!==void 0&&h!==null&&(I=v(y,h));var R=w?{role:"status","aria-live":"assertive"}:{};return j.createElement("div",d1({className:M,style:E},R),j.createElement("p",{className:B,style:S},j.isValidElement(I)?I:"".concat(I)),C())},Yu="recharts-tooltip-wrapper",gue={visibility:"hidden"};function bue(e){var{coordinate:n,translateX:i,translateY:s}=e;return pn(Yu,{["".concat(Yu,"-right")]:ht(i)&&n&&ht(n.x)&&i>=n.x,["".concat(Yu,"-left")]:ht(i)&&n&&ht(n.x)&&i<n.x,["".concat(Yu,"-bottom")]:ht(s)&&n&&ht(n.y)&&s>=n.y,["".concat(Yu,"-top")]:ht(s)&&n&&ht(n.y)&&s<n.y})}function YM(e){var{allowEscapeViewBox:n,coordinate:i,key:s,offsetTopLeft:d,position:h,reverseDirection:f,tooltipDimension:g,viewBox:p,viewBoxDimension:x}=e;if(h&&ht(h[s]))return h[s];var y=i[s]-g-(d>0?d:0),v=i[s]+d;if(n[s])return f[s]?y:v;var w=p[s];if(w==null)return 0;if(f[s]){var C=y,E=w;return C<E?Math.max(v,w):Math.max(y,w)}if(x==null)return 0;var S=v+g,D=w+x;return S>D?Math.max(y,w):Math.max(v,w)}function kue(e){var{translateX:n,translateY:i,useTranslate3d:s}=e;return{transform:s?"translate3d(".concat(n,"px, ").concat(i,"px, 0)"):"translate(".concat(n,"px, ").concat(i,"px)")}}function yue(e){var{allowEscapeViewBox:n,coordinate:i,offsetTopLeft:s,position:d,reverseDirection:h,tooltipBox:f,useTranslate3d:g,viewBox:p}=e,x,y,v;return f.height>0&&f.width>0&&i?(y=YM({allowEscapeViewBox:n,coordinate:i,key:"x",offsetTopLeft:s,position:d,reverseDirection:h,tooltipDimension:f.width,viewBox:p,viewBoxDimension:p.width}),v=YM({allowEscapeViewBox:n,coordinate:i,key:"y",offsetTopLeft:s,position:d,reverseDirection:h,tooltipDimension:f.height,viewBox:p,viewBoxDimension:p.height}),x=kue({translateX:y,translateY:v,useTranslate3d:g})):x=gue,{cssProperties:x,cssClasses:bue({translateX:y,translateY:v,coordinate:i})}}function QM(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Ip(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};
157n%2?QM(Object(i),!0).forEach(function(s){u1(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):QM(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function u1(e,n,i){return(n=xue(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function xue(e){var n=vue(e,"string");return typeof n=="symbol"?n:n+""}function vue(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}class wue extends j.PureComponent{constructor(){super(...arguments),u1(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),u1(this,"handleKeyDown",n=>{if(n.key==="Escape"){var i,s,d,h;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(i=(s=this.props.coordinate)===null||s===void 0?void 0:s.x)!==null&&i!==void 0?i:0,y:(d=(h=this.props.coordinate)===null||h===void 0?void 0:h.y)!==null&&d!==void 0?d:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var n,i;this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:n,allowEscapeViewBox:i,animationDuration:s,animationEasing:d,children:h,coordinate:f,hasPayload:g,isAnimationActive:p,offset:x,position:y,reverseDirection:v,useTranslate3d:w,viewBox:C,wrapperStyle:E,lastBoundingBox:S,innerRef:D,hasPortalFromProps:I}=this.props,{cssClasses:M,cssProperties:B}=yue({allowEscapeViewBox:i,coordinate:f,offsetTopLeft:x,position:y,reverseDirection:v,tooltipBox:{height:S.height,width:S.width},useTranslate3d:w,viewBox:C}),R=I?{}:Ip(Ip({transition:p&&n?"transform ".concat(s,"ms ").concat(d):void 0},B),{},{pointerEvents:"none",visibility:!this.state.dismissed&&n&&g?"visible":"hidden",position:"absolute",top:0,left:0}),F=Ip(Ip({},R),{},{visibility:!this.state.dismissed&&n&&g?"visible":"hidden"},E);return j.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:M,style:F,ref:D},h)}}var nz=()=>{var e;return(e=yt(n=>n.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function h1(){return h1=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},h1.apply(null,arguments)}function ZM(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function JM(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?ZM(Object(i),!0).forEach(function(s){_ue(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ZM(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function _ue(e,n,i){return(n=Aue(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Aue(e){var n=Cue(e,"string");return typeof n=="symbol"?n:n+""}function Cue(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var XM={curveBasisClosed:ble,curveBasisOpen:kle,curveBasis:gle,curveBumpX:fle,curveBumpY:ple,curveLinearClosed:yle,curveLinear:tb,curveMonotoneX:xle,curveMonotoneY:vle,curveNatural:wle,curveStep:_le,curveStepAfter:Cle,curveStepBefore:Ale},o0=e=>xn(e.x)&&xn(e.y),e6=e=>e.base!=null&&o0(e.base)&&o0(e),Qu=e=>e.x,Zu=e=>e.y,jue=(e,n)=>{if(typeof e=="function")return e;var i="curve".concat(Q_(e));return(i==="curveMonotone"||i==="curveBump")&&n?XM["".concat(i).c
157oncat(n==="vertical"?"Y":"X")]:XM[i]||tb},Nue=e=>{var{type:n="linear",points:i=[],baseLine:s,layout:d,connectNulls:h=!1}=e,f=jue(n,d),g=h?i.filter(o0):i,p;if(Array.isArray(s)){var x=i.map((C,E)=>JM(JM({},C),{},{base:s[E]}));d==="vertical"?p=Ap().y(Zu).x1(Qu).x0(C=>C.base.x):p=Ap().x(Qu).y1(Zu).y0(C=>C.base.y);var y=p.defined(e6).curve(f),v=h?x.filter(e6):x;return y(v)}d==="vertical"&&ht(s)?p=Ap().y(Zu).x1(Qu).x0(s):ht(s)?p=Ap().x(Qu).y1(Zu).y0(s):p=b9().x(Qu).y(Zu);var w=p.defined(o0).curve(f);return w(g)},ug=e=>{var{className:n,points:i,path:s,pathRef:d}=e,h=Hd();if((!i||!i.length)&&!s)return null;var f={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||h,connectNulls:e.connectNulls},g=i&&i.length?Nue(f):s;return j.createElement("path",h1({},No(e),Z_(e),{className:pn("recharts-curve",n),d:g===null?void 0:g,ref:d}))},Eue=["x","y","top","left","width","height","className"];function m1(){return m1=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},m1.apply(null,arguments)}
157function t6(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Sue(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?t6(Object(i),!0).forEach(function(s){Due(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t6(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function Due(e,n,i){return(n=Tue(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Tue(e){var n=Iue(e,"string");return typeof n=="symbol"?n:n+""}function Iue(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Mue(e,n){if(e==null)return{};var i,s,d=Pue(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function Pue(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}var Oue=(e,n,i,s,d,h)=>"M".concat(e,",").concat(d,"v").concat(s,"M").concat(h,",").concat(n,"h").concat(i),Bue=e=>{var{x:n=0,y:i=0,top:s=0,left:d=0,width:h=0,height:f=0,className:g}=e,p=Mue(e,Eue),x=Sue({x:n,y:i,top:s,left:d,width:h,height:f},p);return!ht(n)||!ht(i)||!ht(h)||!ht(f)||!ht(s)||!ht(d)?null:j.createElement("path",m1({},eo(x),{className:pn("recharts-cross",g),d:Oue(n,i,h,f,s,d)}))};function Lue(e,n,i,s){var d=s/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?n.x-d:i.left+.5,y:e==="horizontal"?i.top+.5:n.y-d,width:e==="horizontal"?s:i.width-1,height:e==="horizontal"?i.height-1:s}}function n6(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function r6(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?n6(Object(i),!0).forEach(function(s){Rue(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n6(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function Rue(e,n,i){return(n=zue(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function zue(e){var n=Fue(e,"string");return typeof n=="symbol"?n:n+""}function Fue(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var $ue=e=>e.replace(/([A-Z])/g,n=>"-".concat(n.toLowerCase())),Vue=(e,n,i)=>e.map(s=>"".concat($ue(s)," ").concat(n,"ms ").concat(i)).join(","),Uue=(e,n)=>[Object.keys(e),Object.keys(n)].reduce((i,s)=>i.filter(d=>s.includes(d))),Xh=(e,n)=>Object.keys(n).reduce((i,s)=>r6(r6({},i),{},{[s]:e(s,n[s])}),{});function i6(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Yn(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?i6(Object(i),!0).forEach(function(s){Wue(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):i6(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function Wue(e,n,i){return(n=Hue(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Hue(e){var n=Gue(e,"string");return typeof n=="symbol"?n:n+""}function Gue(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var s0=(e,n,i)=>e+(n-e)*i,f1=e=>{var{from:n,to:i}=e;return n!==i},rz=(e,n,i)=>{var s=Xh((d,h)=>{if(f1(h)){var[f,g]=e(h.from,h.to,h.velocity);return Yn(Yn({},h),{},{from:f,velocity:g})}return h},n);return i<1?Xh((d,h)=>f1(h)&&s[d]!=null?Yn(Yn({},h),{},{velocity:s0(h.velocity,s[d].velocity,i),from:s0(h.from,s[d].from,i)}):h,n):rz(e,s,i-1)};function que(e,n,i,s,d,h){var f,g=s.reduce((w,C)=>Yn(Yn({},w),{},{[C]:{from:e[C],velocity:0,to:n[C]}}),{}),p=()=>Xh((w,C)=>C.from,g),x=()=>!Object.values(g).filter(f1).length,y=null,v=w=>{f||(f=w);var C=w-f,E=C/i.dt;g=rz(i,g,E),d(Yn(Yn(Yn({},e),n),p())),f=w,x()||(y=h.setTimeout(v))};return()=>(y=h.setTimeout(v),()=>{var w;(w=y)===null||w===void 0||w()})}function Kue(e,n,i,s,d,h,f){var g=null,p=d.reduce((v,w)=>{var C=e[w],E=n[w];return C==null||E==null?v:Yn(Yn({},v),{},{[w]:[C,E]})},{}),x,y=v=>{x||(x=v);var w=(v-x)/s,C=Xh((S,D)=>s0(...D,i(w)),p);if(h(Yn(Yn(Yn({},e),n),C)),w<1)g=f.setTimeout(y);else{var E=Xh((S,D)=>s0(...D,i(1)),p);h(Yn(Yn(Yn({},e),n),E))}};return()=>(g=f.setTimeout(y),()=>{var v;(v=g)===null||v===void 0||v()})}const Yue=(e,n,i,s,d,h)=>{var f=Uue(e,n);return i==null?()=>(d(Yn(Yn({}
157,e),n)),()=>{}):i.isStepper===!0?que(e,n,i,f,d,h):Kue(e,n,i,s,f,d,h)};var a0=1e-4,iz=(e,n)=>[0,3*e,3*n-6*e,3*e-3*n+1],oz=(e,n)=>e.map((i,s)=>i*n**s).reduce((i,s)=>i+s),o6=(e,n)=>i=>{var s=iz(e,n);return oz(s,i)},Que=(e,n)=>i=>{var s=iz(e,n),d=[...s.map((h,f)=>h*f).slice(1),0];return oz(d,i)},Zue=e=>{var n,i=e.split("(");if(i.length!==2||i[0]!=="cubic-bezier")return null;var s=(n=i[1])===null||n===void 0||(n=n.split(")")[0])===null||n===void 0?void 0:n.split(",");if(s==null||s.length!==4)return null;var d=s.map(h=>parseFloat(h));return[d[0],d[1],d[2],d[3]]},Jue=function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];if(i.length===1)switch(i[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var d=Zue(i[0]);if(d)return d}}return i.length===4?i:[0,0,1,1]},Xue=(e,n,i,s)=>{var d=o6(e,i),h=o6(n,s),f=Que(e,i),g=x=>x>1?1:x<0?0:x,p=x=>{for(var y=x>1?1:x,v=y,w=0;w<8;++w){var C=d(v)-y,E=f(v);if(Math.abs(C-y)<a0||E<a0)return h(v);v=g(v-C/E)}return h(v)};return p.isStepper=!1,p},s6=function(){return Xue(...Jue(...arguments))},ehe=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:i=100,damping:s=8,dt:d=17}=n,h=(f,g,p)=>{var x=-(f-g)*i,y=p*s,v=p+(x-y)*d/1e3,w=p*d/1e3+f;return Math.abs(w-g)<a0&&Math.abs(v)<a0?[g,0]:[w,v]};return h.isStepper=!0,h.dt=d,h},the=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return s6(e);case"spring":return ehe();default:if(e.split("(")[0]==="cubic-bezier")return s6(e)}return typeof e=="function"?e:null};function nhe(e){var n,i=()=>null,s=!1,d=null,h=f=>{if(!s){if(Array.isArray(f)){if(!f.length)return;var g=f,[p,...x]=g;if(typeof p=="number"){d=e.setTimeout(h.bind(null,x),p);return}h(p),d=e.setTimeout(h.bind(null,x));return}typeof f=="string"&&(n=f,i(n)),typeof f=="object"&&(n=f,i(n)),typeof f=="function"&&f()}};return{stop:()=>{s=!0},start:f=>{s=!1,d&&(d(),d=null),h(f)},subscribe:f=>(i=f,()=>{i=()=>null}),getTimeoutController:()=>e}}class rhe{setTimeout(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=performance.now(),d=null,h=f=>{f-s>=i?n(f):typeof requestAnimationFrame=="function"&&(d=requestAnimationFrame(h))};return d=requestAnimationFrame(h),()=>{d!=null&&cancelAnimationFrame(d)}}}function ihe(){return nhe(new rhe)}var ohe=j.createContext(ihe);function she(e,n){var i=j.useContext(ohe);return j.useMemo(()=>n??i(e),[e,n,i])}var ahe=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),_m={isSsr:ahe()},lhe={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},a6={t:0},ev={t:1};function sz(e){var n=Bi(e,lhe),{isActive:i,canBegin:s,duration:d,easing:h,begin:f,onAnimationEnd:g,onAnimationStart:p,children:x}=n,y=i==="auto"?!_m.isSsr:i,v=she(n.animationId,n.animationManager),[w,C]=j.useState(y?a6:ev),E=j.useRef(null);return j.useEffect(()=>{y||C(ev)},[y]),j.useEffect(()=>{if(!y||!s)return bm;var S=Yue(a6,ev,the(h),d,C,v.getTimeoutController()),D=()=>{E.current=S()};return v.start([p,f,D,d,g]),()=>{v.stop(),E.current&&E.current(),g()}},[y,s,d,h,f,p,g,v]),x(w.t)}function az(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",i=j.useRef(Gh(n)),s=j.useRef(e);return s.current!==e&&(i.current=Gh(n),s.current=e),i.current}var che=["radius"],dhe=["radius"],l6,c6,d6,u6,h6,m6,f6,p6,g6,b6;function k6(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function y6(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?k6(Object(i),!0).forEach(function(s){uhe(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):k6(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function uhe(e,n,i){return(n=hhe(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function hhe(e){var n=mhe(e,"string");return typeof n=="symbol"?n:n+""}function mhe(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function l0(){return l0=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},l0.apply(null,arguments)}function x6(e,n){if(e==null)return{};var i,s,d=fhe(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function fhe(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}function Go(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var v6=(e,n,i,s,d)=>{var h=Ca(i),f=Ca(s),g=Math.min(Math.abs(h)/2,Math.abs(f)/2),p=f>=0?1:-1,x=h>=0?1:-1,y=f>=0&&h>=0||f<0&&h<0?1:0,v;if(g>0&&d instanceof Array){for(var w=[0,0,0,0],C=0,E=4;C<E;C++)w[C]=d[C]>g?g:d[C];v=vr(l6||(l6=Go(["M",",",""])),e,n+p*w[0]),w[0]>0&&(v+=vr(c6||(c6=Go(["A ",",",",0,0,",",",",",""])),w[0],w[0],y,e+x*w[0],n)),v+=vr(d6||(d6=Go(["L ",",",""])),e+i-x*w[1],n),w[1]>0&&(v+=vr(u6||(u6=Go(["A ",",",",0,0,",`, 158 `,",",""])),w[1],w[1],y,e+i,n+p*w[1])),v+=vr(h6||(h6=Go(["L ",",",""])),e+i,n+s-p*w[2]),w[2]>0&&(v+=vr(m6||(m6=Go(["A ",",",",0,0,",`, 159 `,",",""])),w[2],w[2],y,e+i-x*w[2],n+s)),v+=vr(f6||(f6=Go(["L ",",",""])),e+x*w[3],n+s),w[3]>0&&(v+=vr(p6||(p6=Go(["A ",",",",0,0,",`, 160 `,",",""])),w[3],w[3],y,e,n+s-p*w[3])),v+="Z"}else if(g>0&&d===+d&&d>0){var S=Math.min(g,d);v=vr(g6||(g6=Go(["M ",",",` 161 A `,",",",0,0,",",",",",` 162 L `,",",` 163 A `,",",",0,0,",",",",",` 164 L `,",",` 165 A `,",",",0,0,",",",",",` 166 L `,",",` 167 A `,",",",0,0,",",",","," Z"])),e,n+p*S,S,S,y,e+x*S,n,e+i-x*S,n,S,S,y,e+i,n+p*S,e+i,n+s-p*S,S,S,y,e+i-x*S,n+s,e+x*S,n+s,S,S,y,e,n+s-p*S)}else v=vr(b6||(b6=Go(["M ",","," h "," v "," h "," Z"])),e,n,i,s,-i);return v},w6={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},phe=e=>{var n=Bi(e,w6),i=j.useRef(null),[s,d]=j.useState(-1);j.useEffect(()=>{if(i.current&&i.current.getTotalLength)try{var he=i.current.getTotalLength();he&&d(he)}catch{}},[]);var{x:h,y:f,width:g,height:p,radius:x,className:y}=n,{animationEasing:v,animationDuration:w,animationBegin:C,isAnimationActive:E,isUpdateAnimationActive:S}=n,D=j.useRef(g),I=j.useRef(p),M=j.useRef(h),B=j.useRef(f),R=j.useMemo(()=>({x:h,y:f,width:g,height:p,radius:x}),[h,f,g,p,x]),F=az(R,"rectangle-");if(h!==+h||f!==+f||g!==+g||p!==+p||g===0||p===0)return null;var V=pn("recharts-rectangle",y);if(!S){var P=eo(n),{radius:z}=P,W=x6(P,che);return j.createElement("path",l0({},W,{x:Ca(h),y:Ca(f),width:Ca(g),height:Ca(p),radius:typeof x=="number"?x:void 0,className:V,d:v6(h,f,g,p,x)}))}var K=D.current,G=I.current,Z=M.current,se=B.current,ge="0px ".concat(s===-1?1:s,"px"),Se="".concat(s,"px 0px"),Ae=Vue(["strokeDasharray"],w,typeof v=="string"?v:w6.animationEasing);return j.createElement(sz,{animationId:F,key:F,canBegin:s>0,duration:w,easing:v,isActive:S,begin:C}
167,he=>{var ee=Ko(K,g,he),le=Ko(G,p,he),je=Ko(Z,h,he),ve=Ko(se,f,he);i.current&&(D.current=ee,I.current=le,M.current=je,B.current=ve);var Ce;E?he>0?Ce={transition:Ae,strokeDasharray:Se}:Ce={strokeDasharray:ge}:Ce={strokeDasharray:Se};var Q=eo(n),{radius:te}=Q,pe=x6(Q,dhe);return j.createElement("path",l0({},pe,{radius:typeof x=="number"?x:void 0,className:V,d:v6(je,ve,ee,le,x),ref:i,style:y6(y6({},Ce),n.style)}))})};function _6(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function A6(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?_6(Object(i),!0).forEach(function(s){ghe(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_6(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function ghe(e,n,i){return(n=bhe(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function bhe(e){var n=khe(e,"string");return typeof n=="symbol"?n:n+""}function khe(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var c0=Math.PI/180,yhe=e=>e*180/Math.PI,_r=(e,n,i,s)=>({x:e+Math.cos(-c0*s)*i,y:n+Math.sin(-c0*s)*i}),xhe=function(n,i){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(n-(s.left||0)-(s.right||0)),Math.abs(i-(s.top||0)-(s.bottom||0)))/2},vhe=(e,n)=>{var{x:i,y:s}=e,{x:d,y:h}=n;return Math.sqrt((i-d)**2+(s-h)**2)},whe=(e,n)=>{var{x:i,y:s}=e,{cx:d,cy:h}=n,f=vhe({x:i,y:s},{x:d,y:h});if(f<=0)return{radius:f,angle:0};var g=(i-d)/f,p=Math.acos(g);return s>h&&(p=2*Math.PI-p),{radius:f,angle:yhe(p),angleInRadian:p}},_he=e=>{var{startAngle:n,endAngle:i}=e,s=Math.floor(n/360),d=Math.floor(i/360),h=Math.min(s,d);return{startAngle:n-h*360,endAngle:i-h*360}},Ahe=(e,n)=>{var{startAngle:i,endAngle:s}=n,d=Math.floor(i/360),h=Math.floor(s/360),f=Math.min(d,h);return e+f*360},Che=(e,n)=>{var{chartX:i,chartY:s}=e,{radius:d,angle:h}=whe({x:i,y:s},n),{innerRadius:f,outerRadius:g}=n;if(d<f||d>g||d===0)return null;var{startAngle:p,endAngle:x}=_he(n),y=h,v;if(p<=x){for(;y>x;)y-=360;for(;y<p;)y+=360;v=y>=p&&y<=x}else{for(;y>p;)y-=360;for(;y<x;)y+=360;v=y>=x&&y<=p}return v?A6(A6({},n),{},{radius:d,angle:Ahe(y,n)}):null};function lz(e){var{cx:n,cy:i,radius:s,startAngle:d,endAngle:h}=e,f=_r(n,i,s,d),g=_r(n,i,s,h);return{points:[f,g],cx:n,cy:i,radius:s,startAngle:d,endAngle:h}}var C6,j6,N6,E6,S6,D6,T6;function p1(){return p1=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},p1.apply(null,arguments)}function Il(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var jhe=(e,n)=>{var i=Yi(n-e),s=Math.min(Math.abs(n-e),359.999);return i*s},Mp=e=>{var{cx:n,cy:i,radius:s,angle:d,sign:h,isExternal:f,cornerRadius:g,cornerIsExternal:p}=e,x=g*(f?1:-1)+s,y=Math.asin(g/x)/c0,v=p?d:d+h*y,w=_r(n,i,x,v),C=_r(n,i,s,v),E=p?d-h*y:d,S=_r(n,i,x*Math.cos(y*c0),E);return{center:w,circleTangency:C,lineTangency:S,theta:y}},cz=e=>{var{cx:n,cy:i,innerRadius:s,outerRadius:d,startAngle:h,endAngle:f}=e,g=jhe(h,f),p=h+g,x=_r(n,i,d,h),y=_r(n,i,d,p),v=vr(C6||(C6=Il(["M ",",",` 168 A `,",",`,0, 169 `,",",`, 170 `,",",` 171 `])),x.x,x.y,d,d,+(Math.abs(g)>180),+(h>p),y.x,y.y);if(s>0){var w=_r(n,i,s,h),C=_r(n,i,s,p);v+=vr(j6||(j6=Il(["L ",",",` 172 A `,",",`,0, 173 `,",",`, 174 `,","," Z"])),C.x,C.y,s,s,+(Math.abs(g)>180),+(h<=p),w.x,w.y)}else v+=vr(N6||(N6=Il(["L ",","," Z"])),n,i);return v},Nhe=e=>{var{cx:n,cy:i,innerRadius:s,outerRadius:d,cornerRadius:h,forceCornerRadius:f,cornerIsExternal:g,startAngle:p,endAngle:x}=e,y=Yi(x-p),{circleTangency:v,lineTangency:w,theta:C}=Mp({cx:n,cy:i,radius:d,angle:p,sign:y,cornerRadius:h,cornerIsExternal:g}),{circleTangency:E,lineTangency:S,theta:D}=Mp({cx:n,cy:i,radius:d,angle:x,sign:-y,cornerRadius:h,cornerIsExternal:g}),I=g?Math.abs(p-x):Math.abs(p-x)-C-D;if(I<0)return f?vr(E6||(E6=Il(["M ",",",` 175 a`,",",",0,0,1,",`,0 176 a`,",",",0,0,1,",`,0 177 `])),w.x,w.y,h,h,h*2,h,h,-h*2):cz({cx:n,cy:i,innerRadius:s,outerRadius:d,startAngle:p,endAngle:x});var M=vr(S6||(S6=Il(["M ",",",` 178 A`,",",",0,0,",",",",",` 179 A`,",",",0,",",",",",",",` 180 A`,",",",0,0,",",",",",` 181 `])),w.x,w.y,h,h,+(y<0),v.x,v.y,d,d,+(I>180),+(y<0),E.x,E.y,h,h,+(y<0),S.x,S.y);if(s>0){var{circleTangency:B,lineTangency:R,theta:F}=Mp({cx:n,cy:i,radius:s,angle:p,sign:y,isExternal:!0,cornerRadius:h,cornerIsExternal:g}),{circleTangency:V,lineTangency:P,theta:z}
181=Mp({cx:n,cy:i,radius:s,angle:x,sign:-y,isExternal:!0,cornerRadius:h,cornerIsExternal:g}),W=g?Math.abs(p-x):Math.abs(p-x)-F-z;if(W<0&&h===0)return"".concat(M,"L").concat(n,",").concat(i,"Z");M+=vr(D6||(D6=Il(["L",",",` 182 A`,",",",0,0,",",",",",` 183 A`,",",",0,",",",",",",",` 184 A`,",",",0,0,",",",",","Z"])),P.x,P.y,h,h,+(y<0),V.x,V.y,s,s,+(W>180),+(y>0),B.x,B.y,h,h,+(y<0),R.x,R.y)}else M+=vr(T6||(T6=Il(["L",",","Z"])),n,i);return M},Ehe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},She=e=>{var n=Bi(e,Ehe),{cx:i,cy:s,innerRadius:d,outerRadius:h,cornerRadius:f,forceCornerRadius:g,cornerIsExternal:p,startAngle:x,endAngle:y,className:v}=n;if(h<d||x===y)return null;var w=pn("recharts-sector",v),C=h-d,E=Ra(f,C,0,!0),S;return E>0&&Math.abs(x-y)<360?S=Nhe({cx:i,cy:s,innerRadius:d,outerRadius:h,cornerRadius:Math.min(E,C/2),forceCornerRadius:g,cornerIsExternal:p,startAngle:x,endAngle:y}):S=cz({cx:i,cy:s,innerRadius:d,outerRadius:h,startAngle:x,endAngle:y}),j.createElement("path",p1({},eo(n),{className:w,d:S}))};function Dhe(e,n,i){if(e==="horizontal")return[{x:n.x,y:i.top},{x:n.x,y:i.top+i.height}];if(e==="vertical")return[{x:i.left,y:n.y},{x:i.left+i.width,y:n.y}];if(D9(n)){if(e==="centric"){var{cx:s,cy:d,innerRadius:h,outerRadius:f,angle:g}=n,p=_r(s,d,h,g),x=_r(s,d,f,g);return[{x:p.x,y:p.y},{x:x.x,y:x.y}]}return lz(n)}}var dz={},uz={},hz={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=lA;function i(s){return n.isSymbol(s)?NaN:Number(s)}e.toNumber=i})(hz);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=hz;function i(s){return s?(s=n.toNumber(s),s===1/0||s===-1/0?(s<0?-1:1)*Number.MAX_VALUE:s===s?s:0):s===0?s:0}e.toFinite=i})(uz);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=cA,i=uz;function s(d,h,f){f&&typeof f!="number"&&n.isIterateeCall(d,h,f)&&(h=f=void 0),d=i.toFinite(d),h===void 0?(h=d,d=0):h=i.toFinite(h),f=f===void 0?d<h?1:-1:i.toFinite(f);const g=Math.max(Math.ceil((h-d)/(f||1)),0),p=new Array(g);for(let x=0;x<g;x++)p[x]=d,d+=f;return p}e.range=s})(dz);var The=dz.range;const mz=os(The);function Oa(e,n){return e==null||n==null?NaN:e<n?-1:e>n?1:e>=n?0:NaN}function Ihe(e,n){return e==null||n==null?NaN:n<e?-1:n>e?1:n>=e?0:NaN}function vA(e){let n,i,s;e.length!==2?(n=Oa,i=(g,p)=>Oa(e(g),p),s=(g,p)=>e(g)-p):(n=e===Oa||e===Ihe?e:Mhe,i=e,s=e);function d(g,p,x=0,y=g.length){if(x<y){if(n(p,p)!==0)return y;do{const v=x+y>>>1;i(g[v],p)<0?x=v+1:y=v}while(x<y)}return x}function h(g,p,x=0,y=g.length){if(x<y){if(n(p,p)!==0)return y;do{const v=x+y>>>1;i(g[v],p)<=0?x=v+1:y=v}while(x<y)}return x}function f(g,p,x=0,y=g.length){const v=d(g,p,x,y-1);return v>x&&s(g[v-1],p)>-s(g[v],p)?v-1:v}return{left:d,center:f,right:h}}function Mhe(){return 0}function fz(e){return e===null?NaN:+e}function*Phe(e,n){for(let i of e)i!=null&&(i=+i)>=i&&(yield i)}const Ohe=vA(Oa),Am=Ohe.right;vA(fz).center;class I6 extends Map{constructor(n,i=Rhe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:i}}),n!=null)for(const[s,d]of n)this.set(s,d)}get(n){return super.get(M6(this,n))}has(n){return super.has(M6(this,n))}set(n,i){return super.set(Bhe(this,n),i)}delete(n){return super.delete(Lhe(this,n))}}function M6({_intern:e,_key:n},i){const s=n(i);return e.has(s)?e.get(s):i}function Bhe({_intern:e,_key:n},i){const s=n(i);return e.has(s)?e.get(s):(e.set(s,i),i)}function Lhe({_intern:e,_key:n},i){const s=n(i);return e.has(s)&&(i=e.get(s),e.delete(s)),i}function Rhe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function zhe(e=Oa){if(e===Oa)return pz;if(typeof e!="function")throw new TypeError("compare is not a function");return(n,i)=>{const s=e(n,i);return s||s===0?s:(e(i,i)===0)-(e(n,n)===0)}}function pz(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(e<n?-1:e>n?1:0)}const Fhe=Math.sqrt(50),$he=Math.sqrt(10),Vhe=Math.sqrt(2);function d0(e,n,i){const s=(n-e)/Math.max(0,i),d=Math.floor(Math.log10(s)),h=s/Math.pow(10,d),f=h>=Fhe?10:h>=$he?5:h>=Vhe?2:1;let g,p,x;
184return d<0?(x=Math.pow(10,-d)/f,g=Math.round(e*x),p=Math.round(n*x),g/x<e&&++g,p/x>n&&--p,x=-x):(x=Math.pow(10,d)*f,g=Math.round(e/x),p=Math.round(n/x),g*x<e&&++g,p*x>n&&--p),p<g&&.5<=i&&i<2?d0(e,n,i*2):[g,p,x]}function g1(e,n,i){if(n=+n,e=+e,i=+i,!(i>0))return[];if(e===n)return[e];const s=n<e,[d,h,f]=s?d0(n,e,i):d0(e,n,i);if(!(h>=d))return[];const g=h-d+1,p=new Array(g);if(s)if(f<0)for(let x=0;x<g;++x)p[x]=(h-x)/-f;else for(let x=0;x<g;++x)p[x]=(h-x)*f;else if(f<0)for(let x=0;x<g;++x)p[x]=(d+x)/-f;else for(let x=0;x<g;++x)p[x]=(d+x)*f;return p}function b1(e,n,i){return n=+n,e=+e,i=+i,d0(e,n,i)[2]}function k1(e,n,i){n=+n,e=+e,i=+i;const s=n<e,d=s?b1(n,e,i):b1(e,n,i);return(s?-1:1)*(d<0?1/-d:d)}function P6(e,n){let i;for(const s of e)s!=null&&(i<s||i===void 0&&s>=s)&&(i=s);return i}function O6(e,n){let i;for(const s of e)s!=null&&(i>s||i===void 0&&s>=s)&&(i=s);return i}function gz(e,n,i=0,s=1/0,d){if(n=Math.floor(n),i=Math.floor(Math.max(0,i)),s=Math.floor(Math.min(e.length-1,s)),!(i<=n&&n<=s))return e;for(d=d===void 0?pz:zhe(d);s>i;){if(s-i>600){const p=s-i+1,x=n-i+1,y=Math.log(p),v=.5*Math.exp(2*y/3),w=.5*Math.sqrt(y*v*(p-v)/p)*(x-p/2<0?-1:1),C=Math.max(i,Math.floor(n-x*v/p+w)),E=Math.min(s,Math.floor(n+(p-x)*v/p+w));gz(e,n,C,E,d)}const h=e[n];let f=i,g=s;for(Ju(e,i,n),d(e[s],h)>0&&Ju(e,i,s);f<g;){for(Ju(e,f,g),++f,--g;d(e[f],h)<0;)++f;for(;d(e[g],h)>0;)--g}d(e[i],h)===0?Ju(e,i,g):(++g,Ju(e,g,s)),g<=n&&(i=g+1),n<=g&&(s=g-1)}return e}function Ju(e,n,i){const s=e[n];e[n]=e[i],e[i]=s}function Uhe(e,n,i){if(e=Float64Array.from(Phe(e)),!(!(s=e.length)||isNaN(n=+n))){if(n<=0||s<2)return O6(e);if(n>=1)return P6(e);var s,d=(s-1)*n,h=Math.floor(d),f=P6(gz(e,h).subarray(0,h+1)),g=O6(e.subarray(h+1));return f+(g-f)*(d-h)}}function Whe(e,n,i=fz){if(!(!(s=e.length)||isNaN(n=+n))){if(n<=0||s<2)return+i(e[0],0,e);if(n>=1)return+i(e[s-1],s-1,e);var s,d=(s-1)*n,h=Math.floor(d),f=+i(e[h],h,e),g=+i(e[h+1],h+1,e);return f+(g-f)*(d-h)}}function Hhe(e,n,i){e=+e,n=+n,i=(d=arguments.length)<2?(n=e,e=0,1):d<3?1:+i;for(var s=-1,d=Math.max(0,Math.ceil((n-e)/i))|0,h=new Array(d);++s<d;)h[s]=e+s*i;return h}function io(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}function Ys(e,n){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof n=="function"?this.interpolator(n):this.range(n);break}}return this}const y1=Symbol("implicit");function wA(){var e=new I6,n=[],i=[],s=y1;function d(h){let f=e.get(h);if(f===void 0){if(s!==y1)return s;e.set(h,f=n.push(h)-1)}return i[f%i.length]}return d.domain=function(h){if(!arguments.length)return n.slice();n=[],e=new I6;for(const f of h)e.has(f)||e.set(f,n.push(f)-1);return d},d.range=function(h){return arguments.length?(i=Array.from(h),d):i.slice()},d.unknown=function(h){return arguments.length?(s=h,d):s},d.copy=function(){return wA(n,i).unknown(s)},io.apply(d,arguments),d}function _A(){var e=wA().unknown(void 0),n=e.domain,i=e.range,s=0,d=1,h,f,g=!1,p=0,x=0,y=.5;delete e.unknown;function v(){var w=n().length,C=d<s,E=C?d:s,S=C?s:d;h=(S-E)/Math.max(1,w-p+x*2),g&&(h=Math.floor(h)),E+=(S-E-h*(w-p))*y,f=h*(1-p),g&&(E=Math.round(E),f=Math.round(f));var D=Hhe(w).map(function(I){return E+h*I});return i(C?D.reverse():D)}return e.domain=function(w){return arguments.length?(n(w),v()):n()},e.range=function(w){return arguments.length?([s,d]=w,s=+s,d=+d,v()):[s,d]},e.rangeRound=function(w){return[s,d]=w,s=+s,d=+d,g=!0,v()},e.bandwidth=function(){return f},e.step=function(){return h},e.round=function(w){return arguments.length?(g=!!w,v()):g},e.padding=function(w){return arguments.length?(p=Math.min(1,x=+w),v()):p},e.paddingInner=function(w){return arguments.length?(p=Math.min(1,w),v()):p},e.paddingOuter=function(w){return arguments.length?(x=+w,v()):x},e.align=function(w){return arguments.length?(y=Math.max(0,Math.min(1,w)),v()):y},e.copy=function(){return _A(n(),[s,d]).round(g).paddingInner(p).paddingOuter(x).align(y)},io.apply(v(),arguments)}function bz(e){var n=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return bz(n())},e}function Ghe(){return bz(_A.apply(null,arguments).paddingInner(1))}function AA(e,n,i){e.prototype=n.prototype=i,i.constructor=e}function kz(e,n){var i=Object.create(e.prototype);for(var s in n)i[s]=n[s];return i}function Cm(){}var em=.7,u0=1/em,xd="\\s*([+-]?\\d+)\\s*",tm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",es="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qhe=/^#([0-9a-f]{3,8})$/,Khe=new RegExp(`^rgb\\(${xd},${xd},${xd}\\)$`),Yhe=new RegExp(`^rgb\\(${es},${es},${es}\\)$`),Qhe=new RegExp(`^rgba\\(${xd},${xd},${xd},${tm}\\)$`),Zhe=new RegExp(`^rgba\\(${es},${es},${es},${tm}\\)$`),Jhe=new RegExp(`^hsl\\(${tm},${es},${es}\\)$`),Xhe=new RegExp(`^hsla\\(${tm},${es},${es},${tm}\\)$`),B6={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};AA(Cm,nm,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:L6,formatHex:L6,formatHex8:eme,formatHsl:tme,formatRgb:R6,toString:R6});function L6(){return this.rgb().formatHex()}function eme(){return this.rgb().formatHex8()}function tme(){return yz(this).formatHsl()}function R6(){return this.rgb().formatRgb()}function nm(e){var n,i;return e=(e+"").trim().toLowerCase(),(n=qhe.exec(e))?(i=n[1].length,n=parseInt(n[1],16),i===6?z6(n):i===3?new oi(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):i===8?Pp(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):i===4?Pp(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Khe.exec(e))?new oi(n[1],n[2],n[3],1):(n=Yhe.exec(e))?new oi(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Qhe.exec(e))?Pp(n[1],n[2],n[3],n[4]):(n=Zhe.exec(e))?Pp(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Jhe.exec(e))?V6(n[1],n[2]/100,n[3]/100,1):(n=Xhe.exec(e))?V6(n[1],n[2]/100,n[3]/100,n[4]):B6.hasOwnProperty(e)?z6(B6[e]):e==="transparent"?new oi(NaN,NaN,NaN,0):null}function z6(e){return new oi(e>>16&255,e>>8&255,e&255,1)}function Pp(e,n,i,s){return s<=0&&(e=n=i=NaN),new oi(e,n,i,s)}function nme(e){return e instanceof Cm||(e=nm(e)),e?(e=e.rgb(),new oi(e.r,e.g,e.b,e.opacity)):new oi}function x1(e,n,i,s){return arguments.length===1?nme(e):new oi(e,n,i,s??1)}function oi(e,n,i,s){this.r=+e,this.g=+n,this.b=+i,this.opacity=+s}AA(oi,x1,kz(Cm,{brighter(e){return e=e==null?u0:Math.pow(u0,e),new oi(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?em:Math.pow(em,e),new oi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new oi(Fl(this.r),Fl(this.g),Fl(this.b),h0(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:F6,formatHex:F6,formatHex8:rme,formatRgb:$6,toString:$6}));function F6(){return`#${Ml(this.r)}${Ml(this.g)}${Ml(this.b)}`}function rme(){return`#${Ml(this.r)}${Ml(this.g)}${Ml(this.b)}${Ml((isNaN(this.opacity)?1:this.opacity)*255)}`}function $6(){const e=h0(this.opacity);return`${e===1?"rgb(":"rgba("}${Fl(this.r)}, ${Fl(this.g)}, ${Fl(this.b)}${e===1?")":`, ${e})`}`}function h0(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ml(e){return e=Fl(e),(e<16?"0":"")+e.toString(16)}function V6(e,n,i,s){return s<=0?e=n=i=NaN:i<=0||i>=1?e=n=NaN:n<=0&&(e=NaN),new wo(e,n,i,s)}function yz(e){if(e instanceof wo)return new wo(e.h,e.s,e.l,e.opacity);if(e instanceof Cm||(e=nm(e)),!e)return new wo;if(e instanceof wo)return e;e=e.rgb();var n=e.r/255,i=e.g/255,s=e.b/255,d=Math.min(n,i,s),h=Math.max(n,i,s),f=NaN,g=h-d,p=(h+d)/2;return g?(n===h?f=(i-s)/g+(i<s)*6:i===h?f=(s-n)/g+2:f=(n-i)/g+4,g/=p<.5?h+d:2-h-d,f*=60):g=p>0&&p<1?0:f,new wo(f,g,p,e.opacity)}function ime(e,n,i,s){return arguments.length===1?yz(e):new wo(e,n,i,s??1)}function wo(e,n,i,s){this.h=+e,this.s=+n,this.l=+i,this.opacity=+s}AA(wo,ime,kz(Cm,{brighter(e){return e=e==null?u0:Math.pow(u0,e),new wo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?em:Math.pow(em,e),new wo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*n,d=2*i-s;return new oi(tv(e>=240?e-240:e+120,d,s),tv(e,d,s),tv(e<120?e+240:e-120,d,s),this.opacity)},clamp(){return new wo(U6(this.h),Op(this.s),Op(this.l),h0(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=h0(this.opacity);return`${e===1?"hsl(":"hsla("}${U6(this.h)}, ${Op(this.s)*100}%, ${Op(this.l)*100}%${e===1?")":`, ${e})`}`}}));function U6(e){return e=(e||0)%360,e<0?e+360:e}function Op(e){return Math.max(0,Math.min(1,e||0))}function tv(e,n,i){return(e<60?n+(i-n)*e/60:e<180?i:e<240?n+(i-n)*(240-e)/60:n)*255}const CA=e=>()=>e;function ome(e,n){return function(i){return e+i*n}}function sme(e,n,i){return e=Math.pow(e,i),n=Math.pow(n,i)-e,i=1/i,function(s){return Math.pow(e+s*n,i)}}function ame(e){return(e=+e)==1?xz:function(n,i){return i-n?sme(n,i,e):CA(isNaN(n)?i:n)}}function xz(e,n){var i=n-e;return i?ome(e,i):CA(isNaN(e)?n:e)}const W6=function e(n){var i=ame(n);function s(d,h){var f=i((d=x1(d)).r,(h=x1(h)).r),g=i(d.g,h.g),p=i(d.b,h.b),x=xz(d.opacity,h.opacity);return function(y){return d.r=f(y),d.g=g(y),d.b=p(y),d.opacity=x(y),d+""}}return s.gamma=e,s}(1);function lme(e,n){n||(n=[]);var i=e?Math.min(n.length,e.length):0,s=n.slice(),d;return function(h){for(d=0;d<i;++d)s[d]=e[d]*(1-h)+n[d]*h;return s}}function cme(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function dme(e,n){var i=n?n.length:0,s=e?Math.min(i,e.length):0,d=new Array(s),h=new Array(i),f;for(f=0;f<s;++f)d[f]=Gd(e[f],n[f]);for(;f<i;++f)h[f]=n[f];return function(g){for(f=0;f<s;++f)h[f]=d[f](g);return h}}function ume(e,n){var i=new Date;return e=+e,n=+n,function(s){return i.setTime(e*(1-s)+n*s),i}}function m0(e,n){return e=+e,n=+n,function(i){return e*(1-i)+n*i}}function hme(e,n){var i={},s={},d;(e===null||typeof e!="object")&&(e={}),(n===null||typeof n!="object")&&(n={});
vendor: 9,454 bytes, line 184
184for(d in n)d in e?i[d]=Gd(e[d],n[d]):s[d]=n[d];return function(h){for(d in i)s[d]=i[d](h);return s}}var v1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nv=new RegExp(v1.source,"g");function mme(e){return function(){return e}}function fme(e){return function(n){return e(n)+""}}function pme(e,n){var i=v1.lastIndex=nv.lastIndex=0,s,d,h,f=-1,g=[],p=[];for(e=e+"",n=n+"";(s=v1.exec(e))&&(d=nv.exec(n));)(h=d.index)>i&&(h=n.slice(i,h),g[f]?g[f]+=h:g[++f]=h),(s=s[0])===(d=d[0])?g[f]?g[f]+=d:g[++f]=d:(g[++f]=null,p.push({i:f,x:m0(s,d)})),i=nv.lastIndex;return i<n.length&&(h=n.slice(i),g[f]?g[f]+=h:g[++f]=h),g.length<2?p[0]?fme(p[0].x):mme(n):(n=p.length,function(x){for(var y=0,v;y<n;++y)g[(v=p[y]).i]=v.x(x);return g.join("")})}function Gd(e,n){var i=typeof n,s;return n==null||i==="boolean"?CA(n):(i==="number"?m0:i==="string"?(s=nm(n))?(n=s,W6):pme:n instanceof nm?W6:n instanceof Date?ume:cme(n)?lme:Array.isArray(n)?dme:typeof n.valueOf!="function"&&typeof n.toString!="function"||isNaN(n)?hme:m0)(e,n)}function jA(e,n){return e=+e,n=+n,function(i){return Math.round(e*(1-i)+n*i)}}function gme(e,n){n===void 0&&(n=e,e=Gd);for(var i=0,s=n.length-1,d=n[0],h=new Array(s<0?0:s);i<s;)h[i]=e(d,d=n[++i]);return function(f){var g=Math.max(0,Math.min(s-1,Math.floor(f*=s)));return h[g](f-g)}}function bme(e){return function(){return e}}function f0(e){return+e}var H6=[0,1];function Vr(e){return e}function w1(e,n){return(n-=e=+e)?function(i){return(i-e)/n}:bme(isNaN(n)?NaN:.5)}function kme(e,n){var i;return e>n&&(i=e,e=n,n=i),function(s){return Math.max(e,Math.min(n,s))}}function yme(e,n,i){var s=e[0],d=e[1],h=n[0],f=n[1];return d<s?(s=w1(d,s),h=i(f,h)):(s=w1(s,d),h=i(h,f)),function(g){return h(s(g))}}function xme(e,n,i){var s=Math.min(e.length,n.length)-1,d=new Array(s),h=new Array(s),f=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),n=n.slice().reverse());++f<s;)d[f]=w1(e[f],e[f+1]),h[f]=i(n[f],n[f+1]);return function(g){var p=Am(e,g,1,s)-1;return h[p](d[p](g))}}function jm(e,n){return n.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Cb(){var e=H6,n=H6,i=Gd,s,d,h,f=Vr,g,p,x;function y(){var w=Math.min(e.length,n.length);return f!==Vr&&(f=kme(e[0],e[w-1])),g=w>2?xme:yme,p=x=null,v}function v(w){return w==null||isNaN(w=+w)?h:(p||(p=g(e.map(s),n,i)))(s(f(w)))}return v.invert=function(w){return f(d((x||(x=g(n,e.map(s),m0)))(w)))},v.domain=function(w){return arguments.length?(e=Array.from(w,f0),y()):e.slice()},v.range=function(w){return arguments.length?(n=Array.from(w),y()):n.slice()},v.rangeRound=function(w){return n=Array.from(w),i=jA,y()},v.clamp=function(w){return arguments.length?(f=w?!0:Vr,y()):f!==Vr},v.interpolate=function(w){return arguments.length?(i=w,y()):i},v.unknown=function(w){return arguments.length?(h=w,v):h},function(w,C){return s=w,d=C,y()}}function NA(){return Cb()(Vr,Vr)}function vme(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function p0(e,n){if((i=(e=n?e.toExponential(n-1):e.toExponential()).indexOf("e"))<0)return null;var i,s=e.slice(0,i);return[s.length>1?s[0]+s.slice(2):s,+e.slice(i+1)]}function Pd(e){return e=p0(Math.abs(e)),e?e[1]:NaN}function wme(e,n){return function(i,s){for(var d=i.length,h=[],f=0,g=e[0],p=0;d>0&&g>0&&(p+g+1>s&&(g=Math.max(1,s-p)),h.push(i.substring(d-=g,d+g)),!((p+=g+1)>s));)g=e[f=(f+1)%e.length];return h.reverse().join(n)}}function _me(e){return function(n){return n.replace(/[0-9]/g,function(i){return e[+i]})}}var Ame=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function rm(e){if(!(n=Ame.exec(e)))throw new Error("invalid format: "+e);var n;return new EA({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}rm.prototype=EA.prototype;function EA(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}EA.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Cme(e){e:for(var n=e.length,i=1,s=-1,d;i<n;++i)switch(e[i]){case".":s=d=i;break;case"0":s===0&&(s=i),d=i;break;default:if(!+e[i])break e;s>0&&(s=0);break}return s>0?e.slice(0,s)+e.slice(d+1):e}var vz;function jme(e,n){var i=p0(e,n);if(!i)return e+"";var s=i[0],d=i[1],h=d-(vz=Math.max(-8,Math.min(8,Math.floor(d/3)))*3)+1,f=s.length;return h===f?s:h>f?s+new Array(h-f+1).join("0"):h>0?s.slice(0,h)+"."+s.slice(h):"0."+new Array(1-h).join("0")+p0(e,Math.max(0,n+h-1))[0]}function G6(e,n){var i=p0(e,n);if(!i)return e+"";var s=i[0],d=i[1];return d<0?"0."+new Array(-d).join("0")+s:s.length>d+1?s.slice(0,d+1)+"."+s.slice(d+1):s+new Array(d-s.length+2).join("0")}const q6={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:vme,e:(e,n)=>e.toExponential(n),f:(e,n)=>e.toFixed(n),g:(e,n)=>e.toPrecision(n),o:e=>Math.round(e).toString(8),p:(e,n)=>G6(e*100,n),r:G6,s:jme,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function K6(e){return e}var Y6=Array.prototype.map,Q6=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Nme(e){var n=e.grouping===void 0||e.thousands===void 0?K6:wme(Y6.call(e.grouping,Number),e.thousands+""),i=e.currency===void 0?"":e.currency[0]+"",s=e.currency===void 0?"":e.currency[1]+"",d=e.decimal===void 0?".":e.decimal+"",h=e.numerals===void 0?K6:_me(Y6.call(e.numerals,String)),f=e.percent===void 0?"%":e.percent+"",g=e.minus===void 0?"â":e.minus+"",p=e.nan===void 0?"NaN":e.nan+"";function x(v){v=rm(v);var w=v.fill,C=v.align,E=v.sign,S=v.symbol,D=v.zero,I=v.width,M=v.comma,B=v.precision,R=v.trim,F=v.type;F==="n"?(M=!0,F="g"):q6[F]||(B===void 0&&(B=12),R=!0,F="g"),(D||w==="0"&&C==="=")&&(D=!0,w="0",C="=");var V=S==="$"?i:S==="#"&&/[boxX]/.test(F)?"0"+F.toLowerCase():"",P=S==="$"?s:/[%p]/.test(F)?f:"",z=q6[F],W=/[defgprs%]/.test(F);B=B===void 0?6:/[gprs]/.test(F)?Math.max(1,Math.min(21,B)):Math.max(0,Math.min(20,B));function K(G){var Z=V,se=P,ge,Se,Ae;if(F==="c")se=z(G)+se,G="";else{G=+G;var he=G<0||1/G<0;if(G=isNaN(G)?p:z(Math.abs(G),B),R&&(G=Cme(G)),he&&+G==0&&E!=="+"&&(he=!1),Z=(he?E==="("?E:g:E==="-"||E==="("?"":E)+Z,se=(F==="s"?Q6[8+vz/3]:"")+se+(he&&E==="("?")":""),W){for(ge=-1,Se=G.length;++ge<Se;)if(Ae=G.charCodeAt(ge),48>Ae||Ae>57){se=(Ae===46?d+G.slice(ge+1):G.slice(ge))+se,G=G.slice(0,ge);break}}}M&&!D&&(G=n(G,1/0));var ee=Z.length+G.length+se.length,le=ee<I?new Array(I-ee+1).join(w):"";switch(M&&D&&(G=n(le+G,le.length?I-se.length:1/0),le=""),C){case"<":G=Z+G+se+le;break;case"=":G=Z+le+G+se;break;case"^":G=le.slice(0,ee=le.length>>1)+Z+G+se+le.slice(ee);break;default:G=le+Z+G+se;break}return h(G)}return K.toString=function(){return v+""},K}function y(v,w){var C=x((v=rm(v),v.type="f",v)),E=Math.max(-8,Math.min(8,Math.floor(Pd(w)/3)))*3,S=Math.pow(10,-E),D=Q6[8+E/3];return function(I){return C(S*I)+D}}return{format:x,formatPrefix:y}}var Bp,SA,wz;Eme({thousands:",",grouping:[3],currency:["$",""]});function Eme(e){return Bp=Nme(e),SA=Bp.format,wz=Bp.formatPrefix,Bp}function Sme(e){return Math.max(0,-Pd(Math.abs(e)))}function Dme(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Pd(n)/3)))*3-Pd(Math.abs(e)))}function Tme(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,Pd(n)-Pd(e))+1}function _z(e,n,i,s){var d=k1(e,n,i),h;switch(s=rm(s??",f"),s.type){case"s":{var f=Math.max(Math.abs(e),Math.abs(n));return s.precision==null&&!isNaN(h=Dme(d,f))&&(s.precision=h),wz(s,f)}case"":case"e":case"g":case"p":case"r":{s.precision==null&&!isNaN(h=Tme(d,Math.max(Math.abs(e),Math.abs(n))))&&(s.precision=h-(s.type==="e"));break}case"f":case"%":{s.precision==null&&!isNaN(h=Sme(d))&&(s.precision=h-(s.type==="%")*2);break}}return SA(s)}function Wa(e){var n=e.domain;return e.ticks=function(i){var s=n();return g1(s[0],s[s.length-1],i??10)},e.tickFormat=function(i,s){var d=n();return _z(d[0],d[d.length-1],i??10,s)},e.nice=function(i){i==null&&(i=10);var s=n(),d=0,h=s.length-1,f=s[d],g=s[h],p,x,y=10;for(g<f&&(x=f,f=g,g=x,x=d,d=h,h=x);y-- >0;){if(x=b1(f,g,i),x===p)return s[d]=f,s[h]=g,n(s);if(x>0)f=Math.floor(f/x)*x,g=Math.ceil(g/x)*x;else if(x<0)f=Math.ceil(f*x)/x,g=Math.floor(g*x)/x;else break;p=x}return e},e}function Az(){var e=NA();return e.copy=function(){return jm(e,Az())},io.apply(e,arguments),Wa(e)}function Cz(e){var n;function i(s){return s==null||isNaN(s=+s)?n:s}return i.invert=i,i.domain=i.range=function(s){return arguments.length?(e=Array.from(s,f0),i):e.slice()},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return Cz(e).unknown(n)},e=arguments.length?Array.from(e,f0):[0,1],Wa(i)}function jz(e,n){e=e.slice();var i=0,s=e.length-1,d=e[i],h=e[s],f;return h<d&&(f=i,i=s,s=f,f=d,d=h,h=f),e[i]=n.floor(d),e[s]=n.ceil(h),e}function Z6(e){return Math.log(e)}function J6(e){return Math.exp(e)}function Ime(e){return-Math.log(-e)}function Mme(e){return-Math.exp(-e)}function Pme(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Ome(e){return e===10?Pme:e===Math.E?Math.exp:n=>
184Math.pow(e,n)}function Bme(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),n=>Math.log(n)/e)}function X6(e){return(n,i)=>-e(-n,i)}function DA(e){const n=e(Z6,J6),i=n.domain;let s=10,d,h;function f(){return d=Bme(s),h=Ome(s),i()[0]<0?(d=X6(d),h=X6(h),e(Ime,Mme)):e(Z6,J6),n}return n.base=function(g){return arguments.length?(s=+g,f()):s},n.domain=function(g){return arguments.length?(i(g),f()):i()},n.ticks=g=>{const p=i();let x=p[0],y=p[p.length-1];const v=y<x;v&&([x,y]=[y,x]);let w=d(x),C=d(y),E,S;const D=g==null?10:+g;let I=[];if(!(s%1)&&C-w<D){if(w=Math.floor(w),C=Math.ceil(C),x>0){for(;w<=C;++w)for(E=1;E<s;++E)if(S=w<0?E/h(-w):E*h(w),!(S<x)){if(S>y)break;I.push(S)}}else for(;w<=C;++w)for(E=s-1;E>=1;--E)if(S=w>0?E/h(-w):E*h(w),!(S<x)){if(S>y)break;I.push(S)}I.length*2<D&&(I=g1(x,y,D))}else I=g1(w,C,Math.min(C-w,D)).map(h);return v?I.reverse():I},n.tickFormat=(g,p)=>{if(g==null&&(g=10),p==null&&(p=s===10?"s":","),typeof p!="function"&&(!(s%1)&&(p=rm(p)).precision==null&&(p.trim=!0),p=SA(p)),g===1/0)return p;const x=Math.max(1,s*g/n.ticks().length);return y=>{let v=y/h(Math.round(d(y)));return v*s<s-.5&&(v*=s),v<=x?p(y):""}},n.nice=()=>i(jz(i(),{floor:g=>h(Math.floor(d(g))),ceil:g=>h(Math.ceil(d(g)))})),n}function Nz(){const e=DA(Cb()).domain([1,10]);return e.copy=()=>jm(e,Nz()).base(e.base()),io.apply(e,arguments),e}function eP(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function tP(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function TA(e){var n=1,i=e(eP(n),tP(n));return i.constant=function(s){return arguments.length?e(eP(n=+s),tP(n)):n},Wa(i)}function Ez(){var e=TA(Cb());return e.copy=function(){return jm(e,Ez()).constant(e.constant())},io.apply(e,arguments)}function nP(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function Lme(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Rme(e){return e<0?-e*e:e*e}function IA(e){var n=e(Vr,Vr),i=1;function s(){return i===1?e(Vr,Vr):i===.5?e(Lme,Rme):e(nP(i),nP(1/i))}return n.exponent=function(d){return arguments.length?(i=+d,s()):i},Wa(n)}function MA(){var e=IA(Cb());return e.copy=function(){return jm(e,MA()).exponent(e.exponent())},io.apply(e,arguments),e}function zme(){return MA.apply(null,arguments).exponent(.5)}function rP(e){return Math.sign(e)*e*e}function Fme(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Sz(){var e=NA(),n=[0,1],i=!1,s;function d(h){var f=Fme(e(h));return isNaN(f)?s:i?Math.round(f):f}return d.invert=function(h){return e.invert(rP(h))},d.domain=function(h){return arguments.length?(e.domain(h),d):e.domain()},d.range=function(h){return arguments.length?(e.range((n=Array.from(h,f0)).map(rP)),d):n.slice()},d.rangeRound=function(h){return d.range(h).round(!0)},d.round=function(h){return arguments.length?(i=!!h,d):i},d.clamp=function(h){return arguments.length?(e.clamp(h),d):e.clamp()},d.unknown=function(h){return arguments.length?(s=h,d):s},d.copy=function(){return Sz(e.domain(),n).round(i).clamp(e.clamp()).unknown(s)},io.apply(d,arguments),Wa(d)}function Dz(){var e=[],n=[],i=[],s;function d(){var f=0,g=Math.max(1,n.length);for(i=new Array(g-1);++f<g;)i[f-1]=Whe(e,f/g);return h}function h(f){return f==null||isNaN(f=+f)?s:n[Am(i,f)]}return h.invertExtent=function(f){var g=n.indexOf(f);return g<0?[NaN,NaN]:[g>0?i[g-1]:e[0],g<i.length?i[g]:e[e.length-1]]},h.domain=function(f){if(!arguments.length)return e.slice();e=[];for(let g of f)g!=null&&!isNaN(g=+g)&&e.push(g);return e.sort(Oa),d()},h.range=function(f){return arguments.length?(n=Array.from(f),d()):n.slice()},h.unknown=function(f){return arguments.length?(s=f,h):s},h.quantiles=function(){return i.slice()},h.copy=function(){return Dz().domain(e).range(n).unknown(s)},io.apply(h,arguments)}function Tz(){var e=0,n=1,i=1,s=[.5],d=[0,1],h;function f(p){return p!=null&&p<=p?d[Am(s,p,0,i)]:h}function g(){var p=-1;for(s=new Array(i);++p<i;)s[p]=((p+1)*n-(p-i)*e)/(i+1);return f}return f.domain=function(p){return arguments.length?([e,n]=p,e=+e,n=+n,g()):[e,n]},f.range=function(p){return arguments.length?(i=(d=Array.from(p)).length-1,g()):d.slice()},f.invertExtent=function(p){var x=d.indexOf(p);return x<0?[NaN,NaN]:x<1?[e,s[0]]:x>=i?[s[i-1],n]:[s[x-1],s[x]]},f.unknown=function(p){return arguments.length&&(h=p),f},f.thresholds=function(){return s.slice()},f.copy=function(){return Tz().domain([e,n]).range(d).unknown(h)},io.apply(Wa(f),arguments)}function Iz(){var e=[.5],n=[0,1],i,s=1;function d(h){return h!=null&&h<=h?n[Am(e,h,0,s)]:i}return d.domain=function(h){return arguments.length?(e=Array.from(h),s=Math.min(e.length,n.length-1),d):e.slice()},d.range=function(h){return arguments.length?(n=Array.from(h),s=Math.min(e.length,n.length-1),d):n.slice()},d.invertExtent=function(h){var f=n.indexOf(h);return[e[f-1],e[f]]},d.unknown=function(h){return arguments.length?(i=h,d):i},d.copy=function(){return Iz().domain(e).range(n).unknown(i)},io.apply(d,arguments)}const rv=new Date,iv=new Date;function Xn(e,n,i,s){function d(h){return e(h=arguments.length===0?new Date:new Date(+h)),h}return d.floor=h=>(e(h=new Date(+h)),h),d.ceil=h=>(e(h=new Date(h-1)),n(h,1),e(h),h),d.round=h=>{const f=d(h),g=d.ceil(h);return h-f<g-h?f:g},d.offset=(h,f)=>(n(h=new Date(+h),f==null?1:Math.floor(f)),h),d.range=(h,f,g)=>{const p=[];if(h=d.ceil(h),g=g==null?1:Math.floor(g),!(h<f)||!(g>0))return p;let x;do p.push(x=new Date(+h)),n(h,g),e(h);while(x<h&&h<f);return p},d.filter=h=>Xn(f=>{if(f>=f)for(;e(f),!h(f);)f.setTime(f-1)},(f,g)=>{if(f>=f)if(g<0)for(;++g<=0;)for(;n(f,-1),!h(f););else for(;--g>=0;)for(;n(f,1),!h(f););}),i&&(d.count=(h,f)=>(rv.setTime(+h),iv.setTime(+f),e(rv),e(iv),Math.floor(i(rv,iv))),d.every=h=>(h=Math.floor(h),!isFinite(h)||!(h>0)?null:h>1?d.filter(s?f=>s(f)%h===0:f=>d.count(0,f)%h===0):d)),d}const g0=Xn(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);g0.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Xn(n=>{n.setTime(Math.floor(n/e)*e)},(n,i)=>{n.setTime(+n+i*e)},(n,i)=>(i-n)/e):g0);g0.range;const Ns=1e3,Qi=Ns*60,Es=Qi*60,Fs=Es*24,PA=Fs*7,iP=Fs*30,ov=Fs*365,Pl=Xn(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*Ns)},(e,n)=>(n-e)/Ns,e=>e.getUTCSeconds());Pl.range;const OA=Xn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ns)},(e,n)=>{e.setTime(+e+n*Qi)},(e,n)=>(n-e)/Qi,e=>e.getMinutes());OA.range;const BA=Xn(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*Qi)},(e,n)=>(n-e)/Qi,e=>e.getUTCMinutes());BA.range;const LA=Xn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ns-e.getMinutes()*Qi)},(e,n)=>{e.setTime(+e+n*Es)},(e,n)=>(n-e)/Es,e=>e.getHours());LA.range;const RA=Xn(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*Es)},(e,n)=>(n-e)/Es,e=>e.getUTCHours());RA.range;const Nm=Xn(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*Qi)/Fs,e=>e.getDate()-1);Nm.range;const jb=Xn(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/Fs,e=>e.getUTCDate()-1);jb.range;const Mz=Xn(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/Fs,e=>Math.floor(e/Fs));Mz.range;function lc(e){return Xn(n=>{n.setDate(n.getDate()-(n.getDay()+7-e)%7),n.setHours(0,0,0,0)},(n,i)=>{n.setDate(n.getDate()+i*7)},(n,i)=>(i-n-(i.getTimezoneOffset()-n.getTimezoneOffset())*Qi)/PA)}const Nb=lc(0),b0=lc(1),$me=lc(2),Vme=lc(3),Od=lc(4),Ume=lc(5),Wme=lc(6);Nb.range;b0.range;$me.range;Vme.range;Od.range;Ume.range;Wme.range;function cc(e){return Xn(n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-e)%7),n.setUTCHours(0,0,0,0)},(n,i)=>{n.setUTCDate(n.getUTCDate()+i*7)},(n,i)=>(i-n)/PA)}const Eb=cc(0),k0=cc(1),Hme=cc(2),Gme=cc(3),Bd=cc(4),qme=cc(5),Kme=cc(6);Eb.range;k0.range;Hme.range;Gme.range;Bd.range;qme.range;Kme.range;const zA=Xn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,n)=>{e.setMonth(e.getMonth()+n)},(e,n)=>n.getMonth()-e.getMonth()+(n.getFullYear()-e.getFullYear())*12,e=>e.getMonth());zA.range;const FA=Xn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCMonth(e.getUTCMonth()+n)},(e,n)=>n.getUTCMonth()-e.getUTCMonth()+(n.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());FA.range;const $s=Xn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n)},(e,n)=>n.getFullYear()-e.getFullYear(),e=>e.getFullYear());$s.every=e=>
vendor: 5,676 bytes, line 184
184!isFinite(e=Math.floor(e))||!(e>0)?null:Xn(n=>{n.setFullYear(Math.floor(n.getFullYear()/e)*e),n.setMonth(0,1),n.setHours(0,0,0,0)},(n,i)=>{n.setFullYear(n.getFullYear()+i*e)});$s.range;const Vs=Xn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n)},(e,n)=>n.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Vs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xn(n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/e)*e),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,i)=>{n.setUTCFullYear(n.getUTCFullYear()+i*e)});Vs.range;function Pz(e,n,i,s,d,h){const f=[[Pl,1,Ns],[Pl,5,5*Ns],[Pl,15,15*Ns],[Pl,30,30*Ns],[h,1,Qi],[h,5,5*Qi],[h,15,15*Qi],[h,30,30*Qi],[d,1,Es],[d,3,3*Es],[d,6,6*Es],[d,12,12*Es],[s,1,Fs],[s,2,2*Fs],[i,1,PA],[n,1,iP],[n,3,3*iP],[e,1,ov]];function g(x,y,v){const w=y<x;w&&([x,y]=[y,x]);const C=v&&typeof v.range=="function"?v:p(x,y,v),E=C?C.range(x,+y+1):[];return w?E.reverse():E}function p(x,y,v){const w=Math.abs(y-x)/v,C=vA(([,,D])=>D).right(f,w);if(C===f.length)return e.every(k1(x/ov,y/ov,v));if(C===0)return g0.every(Math.max(k1(x,y,v),1));const[E,S]=f[w/f[C-1][2]<f[C][2]/w?C-1:C];return E.every(S)}return[g,p]}const[Yme,Qme]=Pz(Vs,FA,Eb,Mz,RA,BA),[Zme,Jme]=Pz($s,zA,Nb,Nm,LA,OA);function sv(e){if(0<=e.y&&e.y<100){var n=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return n.setFullYear(e.y),n}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function av(e){if(0<=e.y&&e.y<100){var n=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return n.setUTCFullYear(e.y),n}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Xu(e,n,i){return{y:e,m:n,d:i,H:0,M:0,S:0,L:0}}function Xme(e){var n=e.dateTime,i=e.date,s=e.time,d=e.periods,h=e.days,f=e.shortDays,g=e.months,p=e.shortMonths,x=eh(d),y=th(d),v=eh(h),w=th(h),C=eh(f),E=th(f),S=eh(g),D=th(g),I=eh(p),M=th(p),B={a:he,A:ee,b:le,B:je,c:null,d:dP,e:dP,f:wfe,g:Ife,G:Pfe,H:yfe,I:xfe,j:vfe,L:Oz,m:_fe,M:Afe,p:ve,q:Ce,Q:mP,s:fP,S:Cfe,u:jfe,U:Nfe,V:Efe,w:Sfe,W:Dfe,x:null,X:null,y:Tfe,Y:Mfe,Z:Ofe,"%":hP},R={a:Q,A:te,b:pe,B:be,c:null,d:uP,e:uP,f:zfe,g:Yfe,G:Zfe,H:Bfe,I:Lfe,j:Rfe,L:Lz,m:Ffe,M:$fe,p:Oe,q:at,Q:mP,s:fP,S:Vfe,u:Ufe,U:Wfe,V:Hfe,w:Gfe,W:qfe,x:null,X:null,y:Kfe,Y:Qfe,Z:Jfe,"%":hP},F={a:K,A:G,b:Z,B:se,c:ge,d:lP,e:lP,f:pfe,g:aP,G:sP,H:cP,I:cP,j:ufe,L:ffe,m:dfe,M:hfe,p:W,q:cfe,Q:bfe,s:kfe,S:mfe,u:ife,U:ofe,V:sfe,w:rfe,W:afe,x:Se,X:Ae,y:aP,Y:sP,Z:lfe,"%":gfe};B.x=V(i,B),B.X=V(s,B),B.c=V(n,B),R.x=V(i,R),R.X=V(s,R),R.c=V(n,R);function V(re,ye){return function(Me){var Y=[],fe=-1,Ne=0,Ue=re.length,it,Ve,mt;for(Me instanceof Date||(Me=new Date(+Me));++fe<Ue;)re.charCodeAt(fe)===37&&(Y.push(re.slice(Ne,fe)),(Ve=oP[it=re.charAt(++fe)])!=null?it=re.charAt(++fe):Ve=it==="e"?" ":"0",(mt=ye[it])&&(it=mt(Me,Ve)),Y.push(it),Ne=fe+1);return Y.push(re.slice(Ne,fe)),Y.join("")}}function P(re,ye){return function(Me){var Y=Xu(1900,void 0,1),fe=z(Y,re,Me+="",0),Ne,Ue;if(fe!=Me.length)return null;if("Q"in Y)return new Date(Y.Q);if("s"in Y)return new Date(Y.s*1e3+("L"in Y?Y.L:0));if(ye&&!("Z"in Y)&&(Y.Z=0),"p"in Y&&(Y.H=Y.H%12+Y.p*12),Y.m===void 0&&(Y.m="q"in Y?Y.q:0),"V"in Y){if(Y.V<1||Y.V>53)return null;"w"in Y||(Y.w=1),"Z"in Y?(Ne=av(Xu(Y.y,0,1)),Ue=Ne.getUTCDay(),Ne=Ue>4||Ue===0?k0.ceil(Ne):k0(Ne),Ne=jb.offset(Ne,(Y.V-1)*7),Y.y=Ne.getUTCFullYear(),Y.m=Ne.getUTCMonth(),Y.d=Ne.getUTCDate()+(Y.w+6)%7):(Ne=sv(Xu(Y.y,0,1)),Ue=Ne.getDay(),Ne=Ue>4||Ue===0?b0.ceil(Ne):b0(Ne),Ne=Nm.offset(Ne,(Y.V-1)*7),Y.y=Ne.getFullYear(),Y.m=Ne.getMonth(),Y.d=Ne.getDate()+(Y.w+6)%7)}else("W"in Y||"U"in Y)&&("w"in Y||(Y.w="u"in Y?Y.u%7:"W"in Y?1:0),Ue="Z"in Y?av(Xu(Y.y,0,1)).getUTCDay():sv(Xu(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(Ue+5)%7:Y.w+Y.U*7-(Ue+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,av(Y)):sv(Y)}}function z(re,ye,Me,Y){for(var fe=0,Ne=ye.length,Ue=Me.length,it,Ve;fe<Ne;){if(Y>=Ue)return-1;if(it=ye.charCodeAt(fe++),it===37){if(it=ye.charAt(fe++),Ve=F[it in oP?ye.charAt(fe++):it],!Ve||(Y=Ve(re,Me,Y))<0)return-1}else if(it!=Me.charCodeAt(Y++))return-1}return Y}function W(re,ye,Me){var Y=x.exec(ye.slice(Me));return Y?(re.p=y.get(Y[0].toLowerCase()),Me+Y[0].length):-1}function K(re,ye,Me){var Y=C.exec(ye.slice(Me));return Y?(re.w=E.get(Y[0].toLowerCase()),Me+Y[0].length):-1}function G(re,ye,Me){var Y=v.exec(ye.slice(Me));return Y?(re.w=w.get(Y[0].toLowerCase()),Me+Y[0].length):-1}function Z(re,ye,Me){var Y=I.exec(ye.slice(Me));return Y?(re.m=M.get(Y[0].toLowerCase()),Me+Y[0].length):-1}function se(re,ye,Me){var Y=S.exec(ye.slice(Me));return Y?(re.m=D.get(Y[0].toLowerCase()),Me+Y[0].length):-1}function ge(re,ye,Me){return z(re,n,ye,Me)}function Se(re,ye,Me){return z(re,i,ye,Me)}function Ae(re,ye,Me){return z(re,s,ye,Me)}function he(re){return f[re.getDay()]}function ee(re){return h[re.getDay()]}function le(re){return p[re.getMonth()]}function je(re){return g[re.getMonth()]}function ve(re){return d[+(re.getHours()>=12)]}function Ce(re){return 1+~~(re.getMonth()/3)}function Q(re){return f[re.getUTCDay()]}function te(re){return h[re.getUTCDay()]}function pe(re){return p[re.getUTCMonth()]}function be(re){return g[re.getUTCMonth()]}function Oe(re){return d[+(re.getUTCHours()>=12)]}function at(re){return 1+~~(re.getUTCMonth()/3)}return{format:function(re){var ye=V(re+="",B);return ye.toString=function(){return re},ye},parse:function(re){var ye=P(re+="",!1);return ye.toString=function(){return re},ye},utcFormat:function(re){var ye=V(re+="",R);return ye.toString=function(){return re},ye},utcParse:function(re){var ye=P(re+="",!0);return ye.toString=function(){return re},ye}}}var oP={"-":"",_:" ",0:"0"},mr=/^\s*\d+/,efe=/^%/,tfe=/[\\^$*+?|[\]().{}]/g;function Vt(e,n,i){var s=e<0?"-":"",d=(s?-e:e)+"",h=d.length;
vendor: 4,556 bytes, line 184
184return s+(h<i?new Array(i-h+1).join(n)+d:d)}function nfe(e){return e.replace(tfe,"\\$&")}function eh(e){return new RegExp("^(?:"+e.map(nfe).join("|")+")","i")}function th(e){return new Map(e.map((n,i)=>[n.toLowerCase(),i]))}function rfe(e,n,i){var s=mr.exec(n.slice(i,i+1));return s?(e.w=+s[0],i+s[0].length):-1}function ife(e,n,i){var s=mr.exec(n.slice(i,i+1));return s?(e.u=+s[0],i+s[0].length):-1}function ofe(e,n,i){var s=mr.exec(n.slice(i,i+2));return s?(e.U=+s[0],i+s[0].length):-1}function sfe(e,n,i){var s=mr.exec(n.slice(i,i+2));return s?(e.V=+s[0],i+s[0].length):-1}function afe(e,n,i){var s=mr.exec(n.slice(i,i+2));return s?(e.W=+s[0],i+s[0].length):-1}function sP(e,n,i){var s=mr.exec(n.slice(i,i+4));return s?(e.y=+s[0],i+s[0].length):-1}function aP(e,n,i){var s=mr.exec(n.slice(i,i+2));return s?(e.y=+s[0]+(+s[0]>68?1900:2e3),i+s[0].length):-1}function lfe(e,n,i){var s=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(i,i+6));return s?(e.Z=s[1]?0:-(s[2]+(s[3]||"00")),i+s[0].length):-1}function cfe(e,n,i){var s=mr.exec(n.slice(i,i+1));return s?(e.q=s[0]*3-3,i+s[0].length):-1}function dfe(e,n,i){var s=mr.exec(n.slice(i,i+2));return s?(e.m=s[0]-1,i+s[0].length):-1}function lP(e,n,i){var s=mr.exec(n.slice(i,i+2));return s?(e.d=+s[0],i+s[0].length):-1}function ufe(e,n,i){var s=mr.exec(n.slice(i,i+3));return s?(e.m=0,e.d=+s[0],i+s[0].length):-1}function cP(e,n,i){var s=mr.exec(n.slice(i,i+2));return s?(e.H=+s[0],i+s[0].length):-1}function hfe(e,n,i){var s=mr.exec(n.slice(i,i+2));return s?(e.M=+s[0],i+s[0].length):-1}function mfe(e,n,i){var s=mr.exec(n.slice(i,i+2));return s?(e.S=+s[0],i+s[0].length):-1}function ffe(e,n,i){var s=mr.exec(n.slice(i,i+3));return s?(e.L=+s[0],i+s[0].length):-1}function pfe(e,n,i){var s=mr.exec(n.slice(i,i+6));return s?(e.L=Math.floor(s[0]/1e3),i+s[0].length):-1}function gfe(e,n,i){var s=efe.exec(n.slice(i,i+1));return s?i+s[0].length:-1}function bfe(e,n,i){var s=mr.exec(n.slice(i));return s?(e.Q=+s[0],i+s[0].length):-1}function kfe(e,n,i){var s=mr.exec(n.slice(i));return s?(e.s=+s[0],i+s[0].length):-1}function dP(e,n){return Vt(e.getDate(),n,2)}function yfe(e,n){return Vt(e.getHours(),n,2)}function xfe(e,n){return Vt(e.getHours()%12||12,n,2)}function vfe(e,n){return Vt(1+Nm.count($s(e),e),n,3)}function Oz(e,n){return Vt(e.getMilliseconds(),n,3)}function wfe(e,n){return Oz(e,n)+"000"}function _fe(e,n){return Vt(e.getMonth()+1,n,2)}function Afe(e,n){return Vt(e.getMinutes(),n,2)}function Cfe(e,n){return Vt(e.getSeconds(),n,2)}function jfe(e){var n=e.getDay();return n===0?7:n}function Nfe(e,n){return Vt(Nb.count($s(e)-1,e),n,2)}function Bz(e){var n=e.getDay();return n>=4||n===0?Od(e):Od.ceil(e)}function Efe(e,n){return e=Bz(e),Vt(Od.count($s(e),e)+($s(e).getDay()===4),n,2)}function Sfe(e){return e.getDay()}function Dfe(e,n){return Vt(b0.count($s(e)-1,e),n,2)}function Tfe(e,n){return Vt(e.getFullYear()%100,n,2)}function Ife(e,n){return e=Bz(e),Vt(e.getFullYear()%100,n,2)}function Mfe(e,n){return Vt(e.getFullYear()%1e4,n,4)}function Pfe(e,n){var i=e.getDay();return e=i>=4||i===0?Od(e):Od.ceil(e),Vt(e.getFullYear()%1e4,n,4)}function Ofe(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Vt(n/60|0,"0",2)+Vt(n%60,"0",2)}function uP(e,n){return Vt(e.getUTCDate(),n,2)}function Bfe(e,n){return Vt(e.getUTCHours(),n,2)}function Lfe(e,n){return Vt(e.getUTCHours()%12||12,n,2)}function Rfe(e,n){return Vt(1+jb.count(Vs(e),e),n,3)}function Lz(e,n){return Vt(e.getUTCMilliseconds(),n,3)}function zfe(e,n){return Lz(e,n)+"000"}function Ffe(e,n){return Vt(e.getUTCMonth()+1,n,2)}function $fe(e,n){return Vt(e.getUTCMinutes(),n,2)}function Vfe(e,n){return Vt(e.getUTCSeconds(),n,2)}function Ufe(e){var n=e.getUTCDay();return n===0?7:n}function Wfe(e,n){return Vt(Eb.count(Vs(e)-1,e),n,2)}function Rz(e){var n=e.getUTCDay();return n>=4||n===0?Bd(e):Bd.ceil(e)}function Hfe(e,n){return e=Rz(e),Vt(Bd.count(Vs(e),e)+(Vs(e).getUTCDay()===4),n,2)}function Gfe(e){return e.getUTCDay()}function qfe(e,n){return Vt(k0.count(Vs(e)-1,e),n,2)}function Kfe(e,n){return Vt(e.getUTCFullYear()%100,n,2)}function Yfe(e,n){return e=Rz(e),Vt(e.getUTCFullYear()%100,n,2)}function Qfe(e,n){return Vt(e.getUTCFullYear()%1e4,n,4)}function Zfe(e,n){var i=e.getUTCDay();return e=i>=4||i===0?Bd(e):Bd.ceil(e),Vt(e.getUTCFullYear()%1e4,n,4)}function Jfe(){return"+0000"}function hP(){return"%"}function mP(e){return+e}function fP(e){return Math.floor(+e/1e3)}var Vc,zz,Fz;Xfe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
184ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Xfe(e){return Vc=Xme(e),zz=Vc.format,Vc.parse,Fz=Vc.utcFormat,Vc.utcParse,Vc}function epe(e){return new Date(e)}function tpe(e){return e instanceof Date?+e:+new Date(+e)}function $A(e,n,i,s,d,h,f,g,p,x){var y=NA(),v=y.invert,w=y.domain,C=x(".%L"),E=x(":%S"),S=x("%I:%M"),D=x("%I %p"),I=x("%a %d"),M=x("%b %d"),B=x("%B"),R=x("%Y");function F(V){return(p(V)<V?C:g(V)<V?E:f(V)<V?S:h(V)<V?D:s(V)<V?d(V)<V?I:M:i(V)<V?B:R)(V)}return y.invert=function(V){return new Date(v(V))},y.domain=function(V){return arguments.length?w(Array.from(V,tpe)):w().map(epe)},y.ticks=function(V){var P=w();return e(P[0],P[P.length-1],V??10)},y.tickFormat=function(V,P){return P==null?F:x(P)},y.nice=function(V){var P=w();return(!V||typeof V.range!="function")&&(V=n(P[0],P[P.length-1],V??10)),V?w(jz(P,V)):y},y.copy=function(){return jm(y,$A(e,n,i,s,d,h,f,g,p,x))},y}function npe(){return io.apply($A(Zme,Jme,$s,zA,Nb,Nm,LA,OA,Pl,zz).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function rpe(){return io.apply($A(Yme,Qme,Vs,FA,Eb,jb,RA,BA,Pl,Fz).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Sb(){var e=0,n=1,i,s,d,h,f=Vr,g=!1,p;function x(v){return v==null||isNaN(v=+v)?p:f(d===0?.5:(v=(h(v)-i)*d,g?Math.max(0,Math.min(1,v)):v))}x.domain=function(v){return arguments.length?([e,n]=v,i=h(e=+e),s=h(n=+n),d=i===s?0:1/(s-i),x):[e,n]},x.clamp=function(v){return arguments.length?(g=!!v,x):g},x.interpolator=function(v){return arguments.length?(f=v,x):f};function y(v){return function(w){var C,E;return arguments.length?([C,E]=w,f=v(C,E),x):[f(0),f(1)]}}return x.range=y(Gd),x.rangeRound=y(jA),x.unknown=function(v){return arguments.length?(p=v,x):p},function(v){return h=v,i=v(e),s=v(n),d=i===s?0:1/(s-i),x}}function Ha(e,n){return n.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function $z(){var e=Wa(Sb()(Vr));return e.copy=function(){return Ha(e,$z())},Ys.apply(e,arguments)}function Vz(){var e=DA(Sb()).domain([1,10]);return e.copy=function(){return Ha(e,Vz()).base(e.base())},Ys.apply(e,arguments)}function Uz(){var e=TA(Sb());return e.copy=function(){return Ha(e,Uz()).constant(e.constant())},Ys.apply(e,arguments)}function VA(){var e=IA(Sb());return e.copy=function(){return Ha(e,VA()).exponent(e.exponent())},Ys.apply(e,arguments)}function ipe(){return VA.apply(null,arguments).exponent(.5)}function Wz(){var e=[],n=Vr;function i(s){if(s!=null&&!isNaN(s=+s))return n((Am(e,s,1)-1)/(e.length-1))}return i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let d of s)d!=null&&!isNaN(d=+d)&&e.push(d);return e.sort(Oa),i},i.interpolator=function(s){return arguments.length?(n=s,i):n},i.range=function(){return e.map((s,d)=>n(d/(e.length-1)))},i.quantiles=function(s){return Array.from({length:s+1},(d,h)=>Uhe(e,h/s))},i.copy=function(){return Wz(n).domain(e)},Ys.apply(i,arguments)}function Db(){var e=0,n=.5,i=1,s=1,d,h,f,g,p,x=Vr,y,v=!1,w;function C(S){return isNaN(S=+S)?w:(S=.5+((S=+y(S))-h)*(s*S<s*h?g:p),x(v?Math.max(0,Math.min(1,S)):S))}C.domain=function(S){return arguments.length?([e,n,i]=S,d=y(e=+e),h=y(n=+n),f=y(i=+i),g=d===h?0:.5/(h-d),p=h===f?0:.5/(f-h),s=h<d?-1:1,C):[e,n,i]},C.clamp=function(S){return arguments.length?(v=!!S,C):v},C.interpolator=function(S){return arguments.length?(x=S,C):x};function E(S){return function(D){var I,M,B;return arguments.length?([I,M,B]=D,x=gme(S,[I,M,B]),C):[x(0),x(.5),x(1)]}}return C.range=E(Gd),C.rangeRound=E(jA),C.unknown=function(S){return arguments.length?(w=S,C):w},function(S){return y=S,d=S(e),h=S(n),f=S(i),g=d===h?0:.5/(h-d),p=h===f?0:.5/(f-h),s=h<d?-1:1,C}}function Hz(){var e=Wa(Db()(Vr));return e.copy=function(){return Ha(e,Hz())},Ys.apply(e,arguments)}function Gz(){var e=DA(Db()).domain([.1,1,10]);return e.copy=function(){return Ha(e,Gz()).base(e.base())},Ys.apply(e,arguments)}function qz(){var e=TA(Db());return e.copy=function(){return Ha(e,qz()).constant(e.constant())},Ys.apply(e,arguments)}function UA(){var e=IA(Db());return e.copy=function(){return Ha(e,UA()).exponent(e.exponent())},Ys.apply(e,arguments)}function ope(){return UA.apply(null,arguments).exponent(.5)}const mh=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:_A,scaleDiverging:Hz,scaleDivergingLog:Gz,scaleDivergingPow:UA,scaleDivergingSqrt:ope,scaleDivergingSymlog:qz,scaleIdentity:Cz,scaleImplicit:y1,scaleLinear:Az,scaleLog:Nz,scaleOrdinal:wA,scalePoint:Ghe,scalePow:MA,scaleQuantile:Dz,scaleQuantize:Tz,scaleRadial:Sz,scaleSequential:$z,scaleSequentialLog:Vz,scaleSequentialPow:VA,scaleSequentialQuantile:Wz,scaleSequentialSqrt:ipe,scaleSequentialSymlog:Uz,scaleSqrt:zme,scaleSymlog:Ez,scaleThreshold:Iz,scaleTime:npe,scaleUtc:rpe,tickFormat:_z},Symbol.toStringTag,{value:"Module"}));var Qs=e=>e.chartData,Kz=xe([Qs],e=>{var n=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:n,dataStartIndex:0}}),Yz=(e,n,i,s)=>s?Kz(e):Qs(e),spe=(e,n,i)=>i?Kz(e):Qs(e);function za(e){if(Array.isArray(e)&&e.length===2){var[n,i]=e;if(xn(n)&&xn(i))return!0}return!1}function pP(e,n,i){return i?e:[Math.min(e[0],n[0]),Math.max(e[1],n[1])]}function Qz(e,n){if(n&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[i,s]=e,d,h;if(xn(i))d=i;else if(typeof i=="function")return;if(xn(s))h=s;else if(typeof s=="function")return;var f=[d,h];if(za(f))return f}}function ape(e,n,i){if(!(!i&&n==null)){if(typeof e=="function"&&n!=null)try{var s=e(n,i);if(za(s))return pP(s,n,i)}catch{}if(Array.isArray(e)&&e.length===2){var[d,h]=e,f,g;if(d==="auto")n!=null&&(f=Math.min(...n));else if(ht(d))f=d;else if(typeof d=="function")try{n!=null&&(f=d(n==null?void 0:n[0]))}catch{}
vendor: 13,437 bytes, line 184
184else if(typeof d=="string"&&BM.test(d)){var p=BM.exec(d);if(p==null||p[1]==null||n==null)f=void 0;else{var x=+p[1];f=n[0]-x}}else f=n==null?void 0:n[0];if(h==="auto")n!=null&&(g=Math.max(...n));else if(ht(h))g=h;else if(typeof h=="function")try{n!=null&&(g=h(n==null?void 0:n[1]))}catch{}else if(typeof h=="string"&&LM.test(h)){var y=LM.exec(h);if(y==null||y[1]==null||n==null)g=void 0;else{var v=+y[1];g=n[1]+v}}else g=n==null?void 0:n[1];var w=[f,g];if(za(w))return n==null?w:pP(w,n,i)}}}var qd=1e9,lpe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},HA,yn=!0,no="[DecimalError] ",$l=no+"Invalid argument: ",WA=no+"Exponent out of range: ",Kd=Math.floor,Al=Math.pow,cpe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ni,lr=1e7,mn=7,Zz=9007199254740991,y0=Kd(Zz/mn),dt={};dt.absoluteValue=dt.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};dt.comparedTo=dt.cmp=function(e){var n,i,s,d,h=this;if(e=new h.constructor(e),h.s!==e.s)return h.s||-e.s;if(h.e!==e.e)return h.e>e.e^h.s<0?1:-1;for(s=h.d.length,d=e.d.length,n=0,i=s<d?s:d;n<i;++n)if(h.d[n]!==e.d[n])return h.d[n]>e.d[n]^h.s<0?1:-1;return s===d?0:s>d^h.s<0?1:-1};dt.decimalPlaces=dt.dp=function(){var e=this,n=e.d.length-1,i=(n-e.e)*mn;if(n=e.d[n],n)for(;n%10==0;n/=10)i--;return i<0?0:i};dt.dividedBy=dt.div=function(e){return Ds(this,new this.constructor(e))};dt.dividedToIntegerBy=dt.idiv=function(e){var n=this,i=n.constructor;return rn(Ds(n,new i(e),0,1),i.precision)};dt.equals=dt.eq=function(e){return!this.cmp(e)};dt.exponent=function(){return $n(this)};dt.greaterThan=dt.gt=function(e){return this.cmp(e)>0};dt.greaterThanOrEqualTo=dt.gte=function(e){return this.cmp(e)>=0};dt.isInteger=dt.isint=function(){return this.e>this.d.length-2};dt.isNegative=dt.isneg=function(){return this.s<0};dt.isPositive=dt.ispos=function(){return this.s>0};dt.isZero=function(){return this.s===0};dt.lessThan=dt.lt=function(e){return this.cmp(e)<0};dt.lessThanOrEqualTo=dt.lte=function(e){return this.cmp(e)<1};dt.logarithm=dt.log=function(e){var n,i=this,s=i.constructor,d=s.precision,h=d+5;if(e===void 0)e=new s(10);else if(e=new s(e),e.s<1||e.eq(Ni))throw Error(no+"NaN");if(i.s<1)throw Error(no+(i.s?"NaN":"-Infinity"));return i.eq(Ni)?new s(0):(yn=!1,n=Ds(im(i,h),im(e,h),h),yn=!0,rn(n,d))};dt.minus=dt.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?eF(n,e):Jz(n,(e.s=-e.s,e))};dt.modulo=dt.mod=function(e){var n,i=this,s=i.constructor,d=s.precision;if(e=new s(e),!e.s)throw Error(no+"NaN");return i.s?(yn=!1,n=Ds(i,e,0,1).times(e),yn=!0,i.minus(n)):rn(new s(i),d)};dt.naturalExponential=dt.exp=function(){return Xz(this)};dt.naturalLogarithm=dt.ln=function(){return im(this)};dt.negated=dt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};dt.plus=dt.add=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?Jz(n,e):eF(n,(e.s=-e.s,e))};dt.precision=dt.sd=function(e){var n,i,s,d=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($l+e);if(n=$n(d)+1,s=d.d.length-1,i=s*mn+1,s=d.d[s],s){for(;s%10==0;s/=10)i--;for(s=d.d[0];s>=10;s/=10)i++}return e&&n>i?n:i};dt.squareRoot=dt.sqrt=function(){var e,n,i,s,d,h,f,g=this,p=g.constructor;if(g.s<1){if(!g.s)return new p(0);throw Error(no+"NaN")}for(e=$n(g),yn=!1,d=Math.sqrt(+g),d==0||d==1/0?(n=Zo(g.d),(n.length+e)%2==0&&(n+="0"),d=Math.sqrt(n),e=Kd((e+1)/2)-(e<0||e%2),d==1/0?n="5e"+e:(n=d.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),s=new p(n)):s=new p(d.toString()),i=p.precision,d=f=i+3;;)if(h=s,s=h.plus(Ds(g,h,f+2)).times(.5),Zo(h.d).slice(0,f)===(n=Zo(s.d)).slice(0,f)){if(n=n.slice(f-3,f+1),d==f&&n=="4999"){if(rn(h,i+1,0),h.times(h).eq(g)){s=h;break}}else if(n!="9999")break;f+=4}return yn=!0,rn(s,i)};dt.times=dt.mul=function(e){var n,i,s,d,h,f,g,p,x,y=this,v=y.constructor,w=y.d,C=(e=new v(e)).d;if(!y.s||!e.s)return new v(0);for(e.s*=y.s,i=y.e+e.e,p=w.length,x=C.length,p<x&&(h=w,w=C,C=h,f=p,p=x,x=f),h=[],f=p+x,s=f;s--;)h.push(0);for(s=x;--s>=0;){for(n=0,d=p+s;d>s;)g=h[d]+C[s]*w[d-s-1]+n,h[d--]=g%lr|0,n=g/lr|0;h[d]=(h[d]+n)%lr|0}for(;!h[--f];)h.pop();return n?++i:h.shift(),e.d=h,e.e=i,yn?rn(e,v.precision):e};dt.toDecimalPlaces=dt.todp=function(e,n){var i=this,s=i.constructor;return i=new s(i),e===void 0?i:(is(e,0,qd),n===void 0?n=s.rounding:is(n,0,8),rn(i,e+$n(i)+1,n))};dt.toExponential=function(e,n){var i,s=this,d=s.constructor;return e===void 0?i=ec(s,!0):(is(e,0,qd),n===void 0?n=d.rounding:is(n,0,8),s=rn(new d(s),e+1,n),i=ec(s,!0,e+1)),i};dt.toFixed=function(e,n){var i,s,d=this,h=d.constructor;return e===void 0?ec(d):(is(e,0,qd),n===void 0?n=h.rounding:is(n,0,8),s=rn(new h(d),e+$n(d)+1,n),i=ec(s.abs(),!1,e+$n(s)+1),d.isneg()&&!d.isZero()?"-"+i:i)};dt.toInteger=dt.toint=function(){var e=this,n=e.constructor;return rn(new n(e),$n(e)+1,n.rounding)};dt.toNumber=function(){return+this};dt.toPower=dt.pow=function(e){var n,i,s,d,h,f,g=this,p=g.constructor,x=12,y=+(e=new p(e));if(!e.s)return new p(Ni);if(g=new p(g),!g.s){if(e.s<1)throw Error(no+"Infinity");return g}if(g.eq(Ni))return g;if(s=p.precision,e.eq(Ni))return rn(g,s);if(n=e.e,i=e.d.length-1,f=n>=i,h=g.s,f){if((i=y<0?-y:y)<=Zz){for(d=new p(Ni),n=Math.ceil(s/mn+4),yn=!1;i%2&&(d=d.times(g),bP(d.d,n)),i=Kd(i/2),i!==0;)g=g.times(g),bP(g.d,n);return yn=!0,e.s<0?new p(Ni).div(d):rn(d,s)}}else if(h<0)throw Error(no+"NaN");return h=h<0&&e.d[Math.max(n,i)]&1?-1:1,g.s=1,yn=!1,d=e.times(im(g,s+x)),yn=!0,d=Xz(d),d.s=h,d};dt.toPrecision=function(e,n){var i,s,d=this,h=d.constructor;return e===void 0?(i=$n(d),s=ec(d,i<=h.toExpNeg||i>=h.toExpPos)):(is(e,1,qd),n===void 0?n=h.rounding:is(n,0,8),d=rn(new h(d),e,n),i=$n(d),s=ec(d,e<=i||i<=h.toExpNeg,e)),s};dt.toSignificantDigits=dt.tosd=function(e,n){var i=this,s=i.constructor;return e===void 0?(e=s.precision,n=s.rounding):(is(e,1,qd),n===void 0?n=s.rounding:is(n,0,8)),rn(new s(i),e,n)};dt.toString=dt.valueOf=dt.val=dt.toJSON=dt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,n=$n(e),i=e.constructor;return ec(e,n<=i.toExpNeg||n>=i.toExpPos)};function Jz(e,n){var i,s,d,h,f,g,p,x,y=e.constructor,v=y.precision;if(!e.s||!n.s)return n.s||(n=new y(e)),yn?rn(n,v):n;if(p=e.d,x=n.d,f=e.e,d=n.e,p=p.slice(),h=f-d,h){for(h<0?(s=p,h=-h,g=x.length):(s=x,d=f,g=p.length),f=Math.ceil(v/mn),g=f>g?f+1:g+1,h>g&&(h=g,s.length=1),s.reverse();h--;)s.push(0);s.reverse()}for(g=p.length,h=x.length,g-h<0&&(h=g,s=x,x=p,p=s),i=0;h;)i=(p[--h]=p[h]+x[h]+i)/lr|0,p[h]%=lr;for(i&&(p.unshift(i),++d),g=p.length;p[--g]==0;)p.pop();return n.d=p,n.e=d,yn?rn(n,v):n}function is(e,n,i){if(e!==~~e||e<n||e>i)throw Error($l+e)}function Zo(e){var n,i,s,d=e.length-1,h="",f=e[0];if(d>0){for(h+=f,n=1;n<d;n++)s=e[n]+"",i=mn-s.length,i&&(h+=ba(i)),h+=s;f=e[n],s=f+"",i=mn-s.length,i&&(h+=ba(i))}else if(f===0)return"0";for(;f%10===0;)f/=10;return h+f}var Ds=function(){function e(s,d){var h,f=0,g=s.length;for(s=s.slice();g--;)h=s[g]*d+f,s[g]=h%lr|0,f=h/lr|0;return f&&s.unshift(f),s}function n(s,d,h,f){var g,p;if(h!=f)p=h>f?1:-1;else for(g=p=0;g<h;g++)if(s[g]!=d[g]){p=s[g]>d[g]?1:-1;break}return p}function i(s,d,h){for(var f=0;h--;)s[h]-=f,f=s[h]<d[h]?1:0,s[h]=f*lr+s[h]-d[h];for(;!s[0]&&s.length>1;)s.shift()}return function(s,d,h,f){var g,p,x,y,v,w,C,E,S,D,I,M,B,R,F,V,P,z,W=s.constructor,K=s.s==d.s?1:-1,G=s.d,Z=d.d;if(!s.s)return new W(s);if(!d.s)throw Error(no+"Division by zero");for(p=s.e-d.e,P=Z.length,F=G.length,C=new W(K),E=C.d=[],x=0;Z[x]==(G[x]||0);)++x;if(Z[x]>(G[x]||0)&&--p,h==null?M=h=W.precision:f?M=h+($n(s)-$n(d))+1:M=h,M<0)return new W(0);if(M=M/mn+2|0,x=0,P==1)for(y=0,Z=Z[0],M++;(x<F||y)&&M--;x++)B=y*lr+(G[x]||0),E[x]=B/Z|0,y=B%Z|0;else{for(y=lr/(Z[0]+1)|0,y>1&&(Z=e(Z,y),G=e(G,y),P=Z.length,F=G.length),R=P,S=G.slice(0,P),D=S.length;D<P;)S[D++]=0;z=Z.slice(),z.unshift(0),V=Z[0],Z[1]>=lr/2&&++V;do y=0,g=n(Z,S,P,D),g<0?(I=S[0],P!=D&&(I=I*lr+(S[1]||0)),y=I/V|0,y>1?(y>=lr&&(y=lr-1),v=e(Z,y),w=v.length,D=S.length,g=n(v,S,w,D),g==1&&(y--,i(v,P<w?z:Z,w))):(y==0&&(g=y=1),v=Z.slice()),w=v.length,w<D&&v.unshift(0),i(S,v,D),g==-1&&(D=S.length,g=n(Z,S,P,D),g<1&&(y++,i(S,P<D?z:Z,D))),D=S.length):g===0&&(y++,S=[0]),E[x++]=y,g&&S[0]?S[D++]=G[R]||0:(S=[G[R]],D=1);while((R++<F||S[0]!==void 0)&&M--)}return E[0]||E.shift(),C.e=p,rn(C,f?h+$n(C)+1:h)}}();function Xz(e,n){var i,s,d,h,f,g,p=0,x=0,y=e.constructor,v=y.precision;if($n(e)>16)throw Error(WA+$n(e));if(!e.s)return new y(Ni);for(yn=!1,g=v,f=new y(.03125);e.abs().gte(.1);)e=e.times(f),x+=5;for(s=Math.log(Al(2,x))/Math.LN10*2+5|0,g+=s,i=d=h=new y(Ni),y.precision=g;;){if(d=rn(d.times(e),g),i=i.times(++p),f=h.plus(Ds(d,i,g)),Zo(f.d).slice(0,g)===Zo(h.d).slice(0,g)){for(;x--;)h=rn(h.times(h),g);return y.precision=v,n==null?(yn=!0,rn(h,v)):h}h=f}}function $n(e){for(var n=e.e*mn,i=e.d[0];i>=10;i/=10)n++;return n}function lv(e,n,i){if(n>e.LN10.sd())throw yn=!0,i&&(e.precision=i),Error(no+"LN10 precision limit exceeded");return rn(new e(e.LN10),n)}function ba(e){for(var n="";e--;)n+="0";return n}function im(e,n){var i,s,d,h,f,g,p,x,y,v=1,w=10,C=e,E=C.d,S=C.constructor,D=S.precision;if(C.s<1)throw Error(no+(C.s?"NaN":"-Infinity"));if(C.eq(Ni))return new S(0);if(n==null?(yn=!1,x=D):x=n,C.eq(10))return n==null&&(yn=!0),lv(S,x);if(x+=w,S.precision=x,i=Zo(E),s=i.charAt(0),h=$n(C),Math.abs(h)<15e14){for(;s<7&&s!=1||s==1&&i.charAt(1)>3;)C=C.times(e),i=Zo(C.d),s=i.charAt(0),v++;h=$n(C),s>1?(C=new S("0."+i),h++):C=new S(s+"."+i.slice(1))}else return p=lv(S,x+2,D).times(h+""),C=im(new S(s+"."+i.slice(1)),x-w).plus(p),S.precision=D,n==null?(yn=!0,rn(C,D)):C;for(g=f=C=Ds(C.minus(Ni),C.plus(Ni),x),y=rn(C.times(C),x),d=3;;){if(f=rn(f.times(y),x),p=g.plus(Ds(f,new S(d),x)),Zo(p.d).slice(0,x)===Zo(g.d).slice(0,x))return g=g.times(2),h!==0&&(g=g.plus(lv(S,x+2,D).times(h+""))),g=Ds(g,new S(v),x),S.precision=D,n==null?(yn=!0,rn(g,D)):g;g=p,d+=2}}function gP(e,n){var i,s,d;for((i=n.indexOf("."))>-1&&(n=n.replace(".","")),(s=n.search(/e/i))>0?(i<0&&(i=s),i+=+n.slice(s+1),n=n.substring(0,s)):i<0&&(i=n.length),s=0;n.charCodeAt(s)===48;)++s;for(d=n.length;n.charCodeAt(d-1)===48;)--d;if(n=n.slice(s,d),n){if(d-=s,i=i-s-1,e.e=Kd(i/mn),e.d=[],s=(i+1)%mn,i<0&&(s+=mn),s<d){for(s&&e.d.push(+n.slice(0,s)),d-=mn;s<d;)e.d.push(+n.slice(s,s+=mn));n=n.slice(s),s=mn-n.length}else s-=d;for(;s--;)n+="0";if(e.d.push(+n),yn&&(e.e>y0||e.e<-y0))throw Error(WA+i)}else e.s=0,e.e=0,e.d=[0];return e}function rn(e,n,i){var s,d,h,f,g,p,x,y,v=e.d;for(f=1,h=v[0];h>=10;h/=10)f++;if(s=n-f,s<0)s+=mn,d=n,x=v[y=0];else{if(y=Math.ceil((s+1)/mn),h=v.length,y>=h)return e;for(x=h=v[y],f=1;h>=10;h/=10)f++;s%=mn,d=s-mn+f}if(i!==void 0&&(h=Al(10,f-d-1),g=x/h%10|0,p=n<0||v[y+1]!==void 0||x%h,p=i<4?(g||p)&&(i==0||i==(e.s<0?3:2)):g>5||g==5&&(i==4||p||i==6&&(s>0?d>0?x/Al(10,f-d):0:v[y-1])%10&1||i==(e.s<0?8:7))),n<1||!v[0])return p?(h=$n(e),v.length=1,n=n-h-1,v[0]=Al(10,(mn-n%mn)%mn),e.e=Kd(-n/mn)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(s==0?(v.length=y,h=1,y--):(v.length=y+1,h=Al(10,mn-s),v[y]=d>0?(x/Al(10,f-d)%Al(10,d)|0)*h:0),p)for(;;)if(y==0){(v[0]+=h)==lr&&(v[0]=1,++e.e);break}else{if(v[y]+=h,v[y]!=lr)break;v[y--]=0,h=1}for(s=v.length;v[--s]===0;)v.pop();if(yn&&(e.e>y0||e.e<-y0))throw Error(WA+$n(e));return e}function eF(e,n){var i,s,d,h,f,g,p,x,y,v,w=e.constructor,C=w.precision;if(!e.s||!n.s)return n.s?n.s=-n.s:n=new w(e),yn?rn(n,C):n;if(p=e.d,v=n.d,s=n.e,x=e.e,p=p.slice(),f=x-s,f){for(y=f<0,y?(i=p,f=-f,g=v.length):(i=v,s=x,g=p.length),d=Math.max(Math.ceil(C/mn),g)+2,f>d&&(f=d,i.length=1),i.reverse(),d=f;d--;)i.push(0);i.reverse()}else{for(d=p.length,g=v.length,y=d<g,y&&(g=d),d=0;d<g;d++)if(p[d]!=v[d]){y=p[d]<v[d];break}f=0}for(y&&(i=p,p=v,v=i,n.s=-n.s),g=p.length,d=v.length-g;d>0;--d)p[g++]=0;for(d=v.length;d>f;){if(p[--d]<v[d]){for(h=d;h&&p[--h]===0;)p[h]=lr-1;--p[h],p[d]+=lr}p[d]-=v[d]}for(;p[--g]===0;)p.pop();for(;p[0]===0;p.shift())--s;return p[0]?(n.d=p,n.e=s,yn?rn(n,C):n):new w(0)}function ec(e,n,i){var s,d=$n(e),h=Zo(e.d),f=h.length;return n?(i&&(s=i-f)>0?h=h.charAt(0)+"."+h.slice(1)+ba(s):f>1&&(h=h.charAt(0)+"."+h.slice(1)),h=h+(d<0?"e":"e+")+d):d<0?(h="0."+ba(-d-1)+h,i&&(s=i-f)>0&&(h+=ba(s))):d>=f?(h+=ba(d+1-f),i&&(s=i-d-1)>0&&(h=h+"."+ba(s))):((s=d+1)<f&&(h=h.slice(0,s)+"."+h.slice(s)),i&&(s=i-f)>0&&(d+1===f&&(h+="."),h+=ba(s))),e.s<0?"-"+h:h}function bP(e,n){if(e.length>n)return e.length=n,!0}function tF(e){var n,i,s;function d(h){var f=this;if(!(f instanceof d))return new d(h);if(f.constructor=d,h instanceof d){f.s=h.s,f.e=h.e,f.d=(h=h.d)?h.slice():h;return}if(typeof h=="number"){if(h*0!==0)throw Error($l+h);if(h>0)f.s=1;else if(h<0)h=-h,f.s=-1;else{f.s=0,f.e=0,f.d=[0];return}if(h===~~h&&h<1e7){f.e=0,f.d=[h];return}return gP(f,h.toString())}else if(typeof h!="string")throw Error($l+h);if(h.charCodeAt(0)===45?(h=h.slice(1),f.s=-1):f.s=1,cpe.test(h))gP(f,h);else throw Error($l+h)}if(d.prototype=dt,d.ROUND_UP=0,d.ROUND_DOWN=1,d.ROUND_CEIL=2,d.ROUND_FLOOR=3,d.ROUND_HALF_UP=4,d.ROUND_HALF_DOWN=5,d.ROUND_HALF_EVEN=6,d.ROUND_HALF_CEIL=7,d.ROUND_HALF_FLOOR=8,d.clone=tF,d.config=d.set=dpe,e===void 0&&(e={}),e)for(s=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<s.length;)e.hasOwnProperty(i=s[n++])||(e[i]=this[i]);return d.config(e),d}function dpe(e){if(!e||typeof e!="object")throw Error(no+"Object expected");var n,i,s,d=["precision",1,qd,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(n=0;n<d.length;n+=3)if((s=e[i=d[n]])!==void 0)if(Kd(s)===s&&s>=d[n+1]&&s<=d[n+2])this[i]=s;else throw Error($l+i+": "+s);
184if((s=e[i="LN10"])!==void 0)if(s==Math.LN10)this[i]=new this(s);else throw Error($l+i+": "+s);return this}var HA=tF(lpe);Ni=new HA(1);const Kt=HA;var upe=e=>e,nF={},rF=e=>e===nF,kP=e=>function n(){return arguments.length===0||arguments.length===1&&rF(arguments.length<=0?void 0:arguments[0])?n:e(...arguments)},iF=(e,n)=>e===1?n:kP(function(){for(var i=arguments.length,s=new Array(i),d=0;d<i;d++)s[d]=arguments[d];var h=s.filter(f=>f!==nF).length;return h>=e?n(...s):iF(e-h,kP(function(){for(var f=arguments.length,g=new Array(f),p=0;p<f;p++)g[p]=arguments[p];var x=s.map(y=>rF(y)?g.shift():y);return n(...x,...g)}))}),hpe=e=>iF(e.length,e),_1=(e,n)=>{for(var i=[],s=e;s<n;++s)i[s-e]=s;return i},mpe=hpe((e,n)=>Array.isArray(n)?n.map(e):Object.keys(n).map(i=>n[i]).map(e)),fpe=function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];if(!i.length)return upe;var d=i.reverse(),h=d[0],f=d.slice(1);return function(){return f.reduce((g,p)=>p(g),h(...arguments))}};function oF(e){var n;return e===0?n=1:n=Math.floor(new Kt(e).abs().log(10).toNumber())+1,n}function sF(e,n,i){for(var s=new Kt(e),d=0,h=[];s.lt(n)&&d<1e5;)h.push(s.toNumber()),s=s.add(i),d++;return h}var aF=e=>{var[n,i]=e,[s,d]=[n,i];return n>i&&([s,d]=[i,n]),[s,d]},lF=(e,n,i)=>{if(e.lte(0))return new Kt(0);var s=oF(e.toNumber()),d=new Kt(10).pow(s),h=e.div(d),f=s!==1?.05:.1,g=new Kt(Math.ceil(h.div(f).toNumber())).add(i).mul(f),p=g.mul(d);return n?new Kt(p.toNumber()):new Kt(Math.ceil(p.toNumber()))},ppe=(e,n,i)=>{var s=new Kt(1),d=new Kt(e);if(!d.isint()&&i){var h=Math.abs(e);h<1?(s=new Kt(10).pow(oF(e)-1),d=new Kt(Math.floor(d.div(s).toNumber())).mul(s)):h>1&&(d=new Kt(Math.floor(e)))}else e===0?d=new Kt(Math.floor((n-1)/2)):i||(d=new Kt(Math.floor(e)));var f=Math.floor((n-1)/2),g=fpe(mpe(p=>d.add(new Kt(p-f).mul(s)).toNumber()),_1);return g(0,n)},cF=function(n,i,s,d){var h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((i-n)/(s-1)))return{step:new Kt(0),tickMin:new Kt(0),tickMax:new Kt(0)};var f=lF(new Kt(i).sub(n).div(s-1),d,h),g;n<=0&&i>=0?g=new Kt(0):(g=new Kt(n).add(i).div(2),g=g.sub(new Kt(g).mod(f)));var p=Math.ceil(g.sub(n).div(f).toNumber()),x=Math.ceil(new Kt(i).sub(g).div(f).toNumber()),y=p+x+1;return y>s?cF(n,i,s,d,h+1):(y<s&&(x=i>0?x+(s-y):x,p=i>0?p:p+(s-y)),{step:f,tickMin:g.sub(new Kt(p).mul(f)),tickMax:g.add(new Kt(x).mul(f))})},gpe=function(n){var[i,s]=n,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,f=Math.max(d,2),[g,p]=aF([i,s]);if(g===-1/0||p===1/0){var x=p===1/0?[g,..._1(0,d-1).map(()=>1/0)]:[..._1(0,d-1).map(()=>-1/0),p];return i>s?x.reverse():x}if(g===p)return ppe(g,d,h);var{step:y,tickMin:v,tickMax:w}=cF(g,p,f,h,0),C=sF(v,w.add(new Kt(.1).mul(y)),y);return i>s?C.reverse():C},bpe=function(n,i){var[s,d]=n,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[f,g]=aF([s,d]);if(f===-1/0||g===1/0)return[s,d];if(f===g)return[f];var p=Math.max(i,2),x=lF(new Kt(g).sub(f).div(p-1),h,0),y=[...sF(new Kt(f),new Kt(g),x),g];return h===!1&&(y=y.map(v=>Math.round(v))),s>d?y.reverse():y},K5e=e=>e.rootProps.maxBarSize,Y5e=e=>e.rootProps.barGap,kpe=e=>e.rootProps.barCategoryGap,Q5e=e=>e.rootProps.barSize,Tb=e=>e.rootProps.stackOffset,dF=e=>e.rootProps.reverseStackOrder,GA=e=>e.options.chartName,qA=e=>e.rootProps.syncId,uF=e=>e.rootProps.syncMethod,KA=e=>e.options.eventEmitter,ype=e=>e.rootProps.baseValue,Ur={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},_s={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},ji={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},Ib=(e,n)=>{if(!(!e||!n))return e!=null&&e.reversed?[n[1],n[0]]:n},xpe={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:_s.angleAxisId,includeHidden:!1,name:void 0,reversed:_s.reversed,scale:_s.scale,tick:_s.tick,tickCount:void 0,ticks:void 0,type:_s.type,unit:void 0},vpe={allowDataOverflow:ji.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:ji.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:ji.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:ji.scale,tick:ji.tick,tickCount:ji.tickCount,ticks:void 0,type:ji.type,unit:void 0},wpe={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:_s.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:_s.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:_s.scale,tick:_s.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},_pe={allowDataOverflow:ji.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:ji.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:ji.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:ji.scale,tick:ji.tick,tickCount:ji.tickCount,ticks:void 0,type:"category",unit:void 0},YA=(e,n)=>e.polarAxis.angleAxis[n]!=null?e.polarAxis.angleAxis[n]:e.layout.layoutType==="radial"?wpe:xpe,QA=(e,n)=>e.polarAxis.radiusAxis[n]!=null?e.polarAxis.radiusAxis[n]:e.layout.layoutType==="radial"?_pe:vpe,Mb=e=>e.polarOptions,ZA=xe([qs,Ks,Nr],xhe),hF=xe([Mb,ZA],(e,n)=>
184{if(e!=null)return Ra(e.innerRadius,n,0)}),mF=xe([Mb,ZA],(e,n)=>{if(e!=null)return Ra(e.outerRadius,n,n*.8)}),Ape=e=>{if(e==null)return[0,0];var{startAngle:n,endAngle:i}=e;return[n,i]},fF=xe([Mb],Ape);xe([YA,fF],Ib);var pF=xe([ZA,hF,mF],(e,n,i)=>{if(!(e==null||n==null||i==null))return[n,i]});xe([QA,pF],Ib);var gF=xe([on,Mb,hF,mF,qs,Ks],(e,n,i,s,d,h)=>{if(!(e!=="centric"&&e!=="radial"||n==null||i==null||s==null)){var{cx:f,cy:g,startAngle:p,endAngle:x}=n;return{cx:Ra(f,d,d/2),cy:Ra(g,h,h/2),innerRadius:i,outerRadius:s,startAngle:p,endAngle:x,clockWise:!1}}}),er=(e,n)=>n,Pb=(e,n,i)=>i;function JA(e){return e==null?void 0:e.id}function bF(e,n,i){var{chartData:s=[]}=n,{allowDuplicatedCategory:d,dataKey:h}=i,f=new Map;return e.forEach(g=>{var p,x=(p=g.data)!==null&&p!==void 0?p:s;if(!(x==null||x.length===0)){var y=JA(g);x.forEach((v,w)=>{var C=h==null||d?w:String(ur(v,h,null)),E=ur(v,g.dataKey,0),S;f.has(C)?S=f.get(C):S={},Object.assign(S,{[y]:E}),f.set(C,S)})}}),Array.from(f.values())}function XA(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Ob=(e,n)=>e===n?!0:e==null||n==null?!1:e[0]===n[0]&&e[1]===n[1];function Bb(e,n){return Array.isArray(e)&&Array.isArray(n)&&e.length===0&&n.length===0?!0:e===n}function Cpe(e,n){if(e.length===n.length){for(var i=0;i<e.length;i++)if(e[i]!==n[i])return!1;return!0}return!1}var tr=e=>{var n=on(e);return n==="horizontal"?"xAxis":n==="vertical"?"yAxis":n==="centric"?"angleAxis":"radiusAxis"},Yd=e=>e.tooltip.settings.axisId;function yP(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function x0(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?yP(Object(i),!0).forEach(function(s){jpe(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):yP(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function jpe(e,n,i){return(n=Npe(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Npe(e){var n=Epe(e,"string");return typeof n=="symbol"?n:n+""}function Epe(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var A1=[0,"auto"],sr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},kF=(e,n)=>e.cartesianAxis.xAxis[n],Zs=(e,n)=>{var i=kF(e,n);return i??sr},ar={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:A1,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:vm},yF=(e,n)=>e.cartesianAxis.yAxis[n],Js=(e,n)=>{var i=yF(e,n);return i??ar},Spe={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},eC=(e,n)=>{var i=e.cartesianAxis.zAxis[n];return i??Spe},Kr=(e,n,i)=>{switch(n){case"xAxis":return Zs(e,i);case"yAxis":return Js(e,i);case"zAxis":return eC(e,i);case"angleAxis":return YA(e,i);case"radiusAxis":return QA(e,i);default:throw new Error("Unexpected axis type: ".concat(n))}},Dpe=(e,n,i)=>{switch(n){case"xAxis":return Zs(e,i);case"yAxis":return Js(e,i);default:throw new Error("Unexpected axis type: ".concat(n))}},Em=(e,n,i)=>{switch(n){case"xAxis":return Zs(e,i);case"yAxis":return Js(e,i);case"angleAxis":return YA(e,i);case"radiusAxis":return QA(e,i);default:throw new Error("Unexpected axis type: ".concat(n))}},xF=e=>e.graphicalItems.cartesianItems.some(n=>n.type==="bar")||e.graphicalItems.polarItems.some(n=>n.type==="radialBar");function vF(e,n){return i=>{switch(e){case"xAxis":return"xAxisId"in i&&i.xAxisId===n;case"yAxis":return"yAxisId"in i&&i.yAxisId===n;case"zAxis":return"zAxisId"in i&&i.zAxisId===n;case"angleAxis":return"angleAxisId"in i&&i.angleAxisId===n;case"radiusAxis":return"radiusAxisId"in i&&i.radiusAxisId===n;default:return!1}}}var wF=e=>e.graphicalItems.cartesianItems,Tpe=xe([er,Pb],vF),_F=(e,n,i)=>e.filter(i).filter(s=>(n==null?void 0:n.includeHidden)===!0?!0:!s.hide),Sm=xe([wF,Kr,Tpe],_F,{memoizeOptions:{resultEqualityCheck:Bb}}),AF=xe([Sm],e=>e.filter(n=>n.type==="area"||n.type==="bar").filter(XA)),CF=e=>e.filter(n=>!("stackId"in n)||n.stackId===void 0),Ipe=xe([Sm],CF),jF=e=>e.map(n=>
184n.data).filter(Boolean).flat(1),Mpe=xe([Sm],jF,{memoizeOptions:{resultEqualityCheck:Bb}}),NF=(e,n)=>{var{chartData:i=[],dataStartIndex:s,dataEndIndex:d}=n;return e.length>0?e:i.slice(s,d+1)},tC=xe([Mpe,Yz],NF),EF=(e,n,i)=>(n==null?void 0:n.dataKey)!=null?e.map(s=>({value:ur(s,n.dataKey)})):i.length>0?i.map(s=>s.dataKey).flatMap(s=>e.map(d=>({value:ur(d,s)}))):e.map(s=>({value:s})),Lb=xe([tC,Kr,Sm],EF);function SF(e,n){switch(e){case"xAxis":return n.direction==="x";case"yAxis":return n.direction==="y";default:return!1}}function hg(e){if(ns(e)||e instanceof Date){var n=Number(e);if(xn(n))return n}}function xP(e){if(Array.isArray(e)){var n=[hg(e[0]),hg(e[1])];return za(n)?n:void 0}var i=hg(e);if(i!=null)return[i,i]}function Us(e){return e.map(hg).filter(Ole)}function Ppe(e,n,i){return!i||typeof n!="number"||Eo(n)?[]:i.length?Us(i.flatMap(s=>{var d=ur(e,s.dataKey),h,f;if(Array.isArray(d)?[h,f]=d:h=f=d,!(!xn(h)||!xn(f)))return[n-h,n+f]})):[]}var nr=e=>{var n=tr(e),i=Yd(e);return Em(e,n,i)},Dm=xe([nr],e=>e==null?void 0:e.dataKey),Ope=xe([AF,Yz,nr],bF),DF=(e,n,i,s)=>{var d={},h=n.reduce((f,g)=>{if(g.stackId==null)return f;var p=f[g.stackId];return p==null&&(p=[]),p.push(g),f[g.stackId]=p,f},d);return Object.fromEntries(Object.entries(h).map(f=>{var[g,p]=f,x=s?[...p].reverse():p,y=x.map(JA);return[g,{stackedData:pde(e,y,i),graphicalItems:x}]}))},TF=xe([Ope,AF,Tb,dF],DF),IF=(e,n,i,s)=>{var{dataStartIndex:d,dataEndIndex:h}=n;if(s==null&&i!=="zAxis"){var f=yde(e,d,h);if(!(f!=null&&f[0]===0&&f[1]===0))return f}},Bpe=xe([Kr],e=>e.allowDataOverflow),nC=e=>{var n;if(e==null||!("domain"in e))return A1;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var i=Us(e.ticks);return[Math.min(...i),Math.max(...i)]}if(e.type==="category")return e.ticks.map(String)}return(n=e==null?void 0:e.domain)!==null&&n!==void 0?n:A1},MF=xe([Kr],nC),PF=xe([MF,Bpe],Qz),Lpe=xe([TF,Qs,er,PF],IF,{memoizeOptions:{resultEqualityCheck:Ob}}),rC=e=>e.errorBars,Rpe=(e,n,i)=>e.flatMap(s=>n[s.id]).filter(Boolean).filter(s=>SF(i,s)),v0=function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];var d=i.filter(Boolean);if(d.length!==0){var h=d.flat(),f=Math.min(...h),g=Math.max(...h);return[f,g]}},OF=(e,n,i,s,d)=>{var h,f;if(i.length>0&&e.forEach(g=>{i.forEach(p=>{var x,y,v=(x=s[p.id])===null||x===void 0?void 0:x.filter(I=>SF(d,I)),w=ur(g,(y=n.dataKey)!==null&&y!==void 0?y:p.dataKey),C=Ppe(g,w,v);if(C.length>=2){var E=Math.min(...C),S=Math.max(...C);(h==null||E<h)&&(h=E),(f==null||S>f)&&(f=S)}var D=xP(w);D!=null&&(h=h==null?D[0]:Math.min(h,D[0]),f=f==null?D[1]:Math.max(f,D[1]))})}),(n==null?void 0:n.dataKey)!=null&&e.forEach(g=>{var p=xP(ur(g,n.dataKey));p!=null&&(h=h==null?p[0]:Math.min(h,p[0]),f=f==null?p[1]:Math.max(f,p[1]))}),xn(h)&&xn(f))return[h,f]},zpe=xe([tC,Kr,Ipe,rC,er],OF,{memoizeOptions:{resultEqualityCheck:Ob}});function Fpe(e){var{value:n}=e;if(ns(n)||n instanceof Date)return n}var $pe=(e,n,i)=>{var s=e.map(Fpe).filter(d=>d!=null);return i&&(n.dataKey==null||n.allowDuplicatedCategory&&E9(s))?mz(0,e.length):n.allowDuplicatedCategory?s:Array.from(new Set(s))},BF=e=>e.referenceElements.dots,Qd=(e,n,i)=>e.filter(s=>s.ifOverflow==="extendDomain").filter(s=>n==="xAxis"?s.xAxisId===i:s.yAxisId===i),Vpe=xe([BF,er,Pb],Qd),LF=e=>e.referenceElements.areas,Upe=xe([LF,er,Pb],Qd),RF=e=>e.referenceElements.lines,Wpe=xe([RF,er,Pb],Qd),zF=(e,n)=>{if(e!=null){var i=Us(e.map(s=>n==="xAxis"?s.x:s.y));if(i.length!==0)return[Math.min(...i),Math.max(...i)]}},Hpe=xe(Vpe,er,zF),FF=(e,n)=>{if(e!=null){var i=Us(e.flatMap(s=>[n==="xAxis"?s.x1:s.y1,n==="xAxis"?s.x2:s.y2]));if(i.length!==0)return[Math.min(...i),Math.max(...i)]}},Gpe=xe([Upe,er],FF);function qpe(e){var n;if(e.x!=null)return Us([e.x]);var i=(n=e.segment)===null||n===void 0?void 0:n.map(s=>s.x);return i==null||i.length===0?[]:Us(i)}function Kpe(e){var n;if(e.y!=null)return Us([e.y]);var i=(n=e.segment)===null||n===void 0?void 0:n.map(s=>s.y);return i==null||i.length===0?[]:Us(i)}var $F=(e,n)=>{if(e!=null){var i=e.flatMap(s=>n==="xAxis"?qpe(s):Kpe(s));if(i.length!==0)return[Math.min(...i),Math.max(...i)]}},Ype=xe([Wpe,er],$F),Qpe=xe(Hpe,Ype,Gpe,(e,n,i)=>v0(e,i,n)),VF=(e,n,i,s,d,h,f,g)=>{if(i!=null)return i;var p=f==="vertical"&&g==="xAxis"||f==="horizontal"&&g==="yAxis",x=p?v0(s,h,d):v0(h,d);return ape(n,x,e.allowDataOverflow)},Zpe=xe([Kr,MF,PF,Lpe,zpe,Qpe,on,er],VF,{memoizeOptions:{resultEqualityCheck:Ob}}),Jpe=[0,1],UF=(e,n,i,s,d,h,f)=>{if(!((e==null||i==null||i.length===0)&&f===void 0)){var{dataKey:g,type:p}=e,x=Gs(n,h);if(x&&g==null){var y;return mz(0,(y=i==null?void 0:i.length)!==null&&y!==void 0?y:0)}
184return p==="category"?$pe(s,e,x):d==="expand"?Jpe:f}},iC=xe([Kr,on,tC,Lb,Tb,er,Zpe],UF),WF=(e,n,i,s,d)=>{if(e!=null){var{scale:h,type:f}=e;if(h==="auto")return n==="radial"&&d==="radiusAxis"?"band":n==="radial"&&d==="angleAxis"?"linear":f==="category"&&s&&(s.indexOf("LineChart")>=0||s.indexOf("AreaChart")>=0||s.indexOf("ComposedChart")>=0&&!i)?"point":f==="category"?"band":"linear";if(typeof h=="string"){var g="scale".concat(Q_(h));return g in mh?g:"point"}}},Tm=xe([Kr,on,xF,GA,er],WF);function Xpe(e){if(e!=null){if(e in mh)return mh[e]();var n="scale".concat(Q_(e));if(n in mh)return mh[n]()}}function oC(e,n,i,s){if(!(i==null||s==null)){if(typeof e.scale=="function")return e.scale.copy().domain(i).range(s);var d=Xpe(n);if(d!=null){var h=d.domain(i).range(s);return ude(h),h}}}var HF=(e,n,i)=>{var s=nC(n);if(!(i!=="auto"&&i!=="linear")){if(n!=null&&n.tickCount&&Array.isArray(s)&&(s[0]==="auto"||s[1]==="auto")&&za(e))return gpe(e,n.tickCount,n.allowDecimals);if(n!=null&&n.tickCount&&n.type==="number"&&za(e))return bpe(e,n.tickCount,n.allowDecimals)}},sC=xe([iC,Em,Tm],HF),GF=(e,n,i,s)=>{if(s!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&za(n)&&Array.isArray(i)&&i.length>0){var d=n[0],h=i[0],f=n[1],g=i[i.length-1];return[Math.min(d,h),Math.max(f,g)]}return n},ege=xe([Kr,iC,sC,er],GF),tge=xe(Lb,Kr,(e,n)=>{if(!(!n||n.type!=="number")){var i=1/0,s=Array.from(Us(e.map(v=>v.value))).sort((v,w)=>v-w),d=s[0],h=s[s.length-1];if(d==null||h==null)return 1/0;var f=h-d;if(f===0)return 1/0;for(var g=0;g<s.length-1;g++){var p=s[g],x=s[g+1];if(!(p==null||x==null)){var y=x-p;i=Math.min(i,y)}}return i/f}}),qF=xe(tge,on,kpe,Nr,(e,n,i,s,d)=>d,(e,n,i,s,d)=>{if(!xn(e))return 0;var h=n==="vertical"?s.height:s.width;if(d==="gap")return e*h/2;if(d==="no-gap"){var f=Ra(i,e*h),g=e*h/2;return g-f-(g-f)/h*f}return 0}),nge=(e,n,i)=>{var s=Zs(e,n);return s==null||typeof s.padding!="string"?0:qF(e,"xAxis",n,i,s.padding)},rge=(e,n,i)=>{var s=Js(e,n);return s==null||typeof s.padding!="string"?0:qF(e,"yAxis",n,i,s.padding)},ige=xe(Zs,nge,(e,n)=>{var i,s;if(e==null)return{left:0,right:0};var{padding:d}=e;return typeof d=="string"?{left:n,right:n}:{left:((i=d.left)!==null&&i!==void 0?i:0)+n,right:((s=d.right)!==null&&s!==void 0?s:0)+n}}),oge=xe(Js,rge,(e,n)=>{var i,s;if(e==null)return{top:0,bottom:0};var{padding:d}=e;return typeof d=="string"?{top:n,bottom:n}:{top:((i=d.top)!==null&&i!==void 0?i:0)+n,bottom:((s=d.bottom)!==null&&s!==void 0?s:0)+n}}),sge=xe([Nr,ige,yb,kb,(e,n,i)=>i],(e,n,i,s,d)=>{var{padding:h}=s;return d?[h.left,i.width-h.right]:[e.left+n.left,e.left+e.width-n.right]}),age=xe([Nr,on,oge,yb,kb,(e,n,i)=>i],(e,n,i,s,d,h)=>{var{padding:f}=d;return h?[s.height-f.bottom,f.top]:n==="horizontal"?[e.top+e.height-i.bottom,e.top+i.top]:[e.top+i.top,e.top+e.height-i.bottom]}),Im=(e,n,i,s)=>{var d;switch(n){case"xAxis":return sge(e,i,s);case"yAxis":return age(e,i,s);case"zAxis":return(d=eC(e,i))===null||d===void 0?void 0:d.range;case"angleAxis":return fF(e);case"radiusAxis":return pF(e,i);default:return}},KF=xe([Kr,Im],Ib),Rb=xe([Kr,Tm,ege,KF],oC);xe([Sm,rC,er],Rpe);function YF(e,n){return e.id<n.id?-1:e.id>n.id?1:0}var zb=(e,n)=>n,Fb=(e,n,i)=>i,lge=xe(gb,zb,Fb,(e,n,i)=>e.filter(s=>s.orientation===n).filter(s=>s.mirror===i).sort(YF)),cge=xe(bb,zb,Fb,(e,n,i)=>e.filter(s=>s.orientation===n).filter(s=>s.mirror===i).sort(YF)),QF=(e,n)=>({width:e.width,height:n.height}),dge=(e,n)=>{var i=typeof n.width=="number"?n.width:vm;return{width:i,height:e.height}},ZF=xe(Nr,Zs,QF),uge=(e,n,i)=>{switch(n){case"top":return e.top;case"bottom":return i-e.bottom;default:return 0}},hge=(e,n,i)=>{switch(n){case"left":return e.left;case"right":return i-e.right;default:return 0}},mge=xe(Ks,Nr,lge,zb,Fb,(e,n,i,s,d)=>{var h={},f;return i.forEach(g=>{var p=QF(n,g);f==null&&(f=uge(n,s,e));var x=s==="top"&&!d||s==="bottom"&&d;h[g.id]=f-Number(x)*p.height,f+=(x?-1:1)*p.height}),h}),fge=xe(qs,Nr,cge,zb,Fb,(e,n,i,s,d)=>{var h={},f;return i.forEach(g=>{var p=dge(n,g);f==null&&(f=hge(n,s,e));var x=s==="left"&&!d||s==="right"&&d;h[g.id]=f-Number(x)*p.width,f+=(x?-1:1)*p.width}),h}),pge=(e,n)=>{var i=Zs(e,n);if(i!=null)return mge(e,i.orientation,i.mirror)},gge=xe([Nr,Zs,pge,(e,n)=>n],(e,n,i,s)=>{if(n!=null){var d=i==null?void 0:i[s];return d==null?{x:e.left,y:0}:{x:e.left,y:d}}}),bge=(e,n)=>{var i=Js(e,n);if(i!=null)return fge(e,i.orientation,i.mirror)},kge=xe([Nr,Js,bge,(e,n)=>n],(e,n,i,s)=>{if(n!=null){var d=i==null?void 0:i[s];return d==null?{x:0,y:e.top}:{x:d,y:e.top}}}),JF=xe(Nr,Js,(e,n)=>{var i=typeof n.width=="number"?n.width:vm;return{width:i,height:e.height}}),Z5e=(e,n,i)=>{switch(n){case"xAxis":return ZF(e,i).width;case"yAxis":return JF(e,i).height;default:return}},XF=(e,n,i,s)=>{if(i!=null){var{allowDuplicatedCategory:d,type:h,dataKey:f}=i,g=Gs(e,s),p=n.map(x=>x.value);if(f&&g&&h==="category"&&d&&E9(p))return p}},aC=xe([on,Lb,Kr,er],XF),e$=(e,n,i,s)=>{if(!(i==null||i.dataKey==null)){var{type:d,scale:h}=i,f=Gs(e,s);if(f&&(d==="number"||h!=="auto"))return n.map(g=>g.value)}},lC=xe([on,Lb,Em,er],e$),vP=xe([on,Dpe,Tm,Rb,aC,lC,Im,sC,er],(e,n,i,s,d,h,f,g,p)=>
184{if(n!=null){var x=Gs(e,p);return{angle:n.angle,interval:n.interval,minTickGap:n.minTickGap,orientation:n.orientation,tick:n.tick,tickCount:n.tickCount,tickFormatter:n.tickFormatter,ticks:n.ticks,type:n.type,unit:n.unit,axisType:p,categoricalDomain:h,duplicateDomain:d,isCategorical:x,niceTicks:g,range:f,realScaleType:i,scale:s}}}),yge=(e,n,i,s,d,h,f,g,p)=>{if(!(n==null||s==null)){var x=Gs(e,p),{type:y,ticks:v,tickCount:w}=n,C=i==="scaleBand"&&typeof s.bandwidth=="function"?s.bandwidth()/2:2,E=y==="category"&&s.bandwidth?s.bandwidth()/C:0;E=p==="angleAxis"&&h!=null&&h.length>=2?Yi(h[0]-h[1])*2*E:E;var S=v||d;if(S){var D=S.map((I,M)=>{var B=f?f.indexOf(I):I;return{index:M,coordinate:s(B)+E,value:I,offset:E}});return D.filter(I=>xn(I.coordinate))}return x&&g?g.map((I,M)=>({coordinate:s(I)+E,value:I,index:M,offset:E})).filter(I=>xn(I.coordinate)):s.ticks?s.ticks(w).map(I=>({coordinate:s(I)+E,value:I,offset:E})):s.domain().map((I,M)=>({coordinate:s(I)+E,value:f?f[I]:I,index:M,offset:E}))}},t$=xe([on,Em,Tm,Rb,sC,Im,aC,lC,er],yge),xge=(e,n,i,s,d,h,f)=>{if(!(n==null||i==null||s==null||s[0]===s[1])){var g=Gs(e,f),{tickCount:p}=n,x=0;return x=f==="angleAxis"&&(s==null?void 0:s.length)>=2?Yi(s[0]-s[1])*2*x:x,g&&h?h.map((y,v)=>({coordinate:i(y)+x,value:y,index:v,offset:x})):i.ticks?i.ticks(p).map(y=>({coordinate:i(y)+x,value:y,offset:x})):i.domain().map((y,v)=>({coordinate:i(y)+x,value:d?d[y]:y,index:v,offset:x}))}},n$=xe([on,Em,Rb,Im,aC,lC,er],xge),r$=xe(Kr,Rb,(e,n)=>{if(!(e==null||n==null))return x0(x0({},e),{},{scale:n})}),vge=xe([Kr,Tm,iC,KF],oC);xe((e,n,i)=>eC(e,i),vge,(e,n)=>{if(!(e==null||n==null))return x0(x0({},e),{},{scale:n})});var wge=xe([on,gb,bb],(e,n,i)=>{switch(e){case"horizontal":return n.some(s=>s.reversed)?"right-to-left":"left-to-right";case"vertical":return i.some(s=>s.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),i$=e=>e.options.defaultTooltipEventType,o$=e=>e.options.validateTooltipEventTypes;function s$(e,n,i){if(e==null)return n;var s=e?"axis":"item";return i==null?n:i.includes(s)?s:n}function cC(e,n){var i=i$(e),s=o$(e);return s$(n,i,s)}function _ge(e){return yt(n=>cC(n,e))}var a$=(e,n)=>{var i,s=Number(n);if(!(Eo(s)||n==null))return s>=0?e==null||(i=e[s])===null||i===void 0?void 0:i.value:void 0},Age=e=>e.tooltip.settings,va={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Cge={itemInteraction:{click:va,hover:va},axisInteraction:{click:va,hover:va},keyboardInteraction:va,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},l$=hi({name:"tooltip",initialState:Cge,reducers:{addTooltipEntrySettings:{reducer(e,n){e.tooltipItemPayloads.push(n.payload)},prepare:bn()},replaceTooltipEntrySettings:{reducer(e,n){var{prev:i,next:s}=n.payload,d=Co(e).tooltipItemPayloads.indexOf(i);d>-1&&(e.tooltipItemPayloads[d]=s)},prepare:bn()},removeTooltipEntrySettings:{reducer(e,n){var i=Co(e).tooltipItemPayloads.indexOf(n.payload);i>-1&&e.tooltipItemPayloads.splice(i,1)},prepare:bn()},setTooltipSettingsState(e,n){e.settings=n.payload},setActiveMouseOverItemIndex(e,n){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=n.payload.activeIndex,e.itemInteraction.hover.dataKey=n.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=n.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=n.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,n){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=n.payload.activeIndex,e.itemInteraction.click.dataKey=n.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=n.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=n.payload.activeCoordinate},setMouseOverAxisIndex(e,n){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=n.payload.activeIndex,e.axisInteraction.hover.dataKey=n.payload.activeDataKey,e.axisInteraction.hover.coordinate=n.payload.activeCoordinate},setMouseClickAxisIndex(e,n){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=n.payload.activeIndex,e.axisInteraction.click.dataKey=n.payload.activeDataKey,e.axisInteraction.click.coordinate=n.payload.activeCoordinate},setSyncInteraction(e,n){e.syncInteraction=n.payload},setKeyboardInteraction(e,n){e.keyboardInteraction.active=n.payload.active,e.keyboardInteraction.index=n.payload.activeIndex,e.keyboardInteraction.coordinate=n.payload.activeCoordinate}}}),{addTooltipEntrySettings:jge,replaceTooltipEntrySettings:Nge,removeTooltipEntrySettings:Ege,setTooltipSettingsState:Sge,setActiveMouseOverItemIndex:Dge,mouseLeaveItem:J5e,mouseLeaveChart:c$,setActiveClickItemIndex:X5e,setMouseOverAxisIndex:d$,setMouseClickAxisIndex:Tge,setSyncInteraction:C1,setKeyboardInteraction:j1}=l$.actions,Ige=l$.reducer;function wP(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Lp(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};
184n%2?wP(Object(i),!0).forEach(function(s){Mge(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):wP(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function Mge(e,n,i){return(n=Pge(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Pge(e){var n=Oge(e,"string");return typeof n=="symbol"?n:n+""}function Oge(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Bge(e,n,i){return n==="axis"?i==="click"?e.axisInteraction.click:e.axisInteraction.hover:i==="click"?e.itemInteraction.click:e.itemInteraction.hover}function Lge(e){return e.index!=null}var u$=(e,n,i,s)=>{if(n==null)return va;var d=Bge(e,n,i);if(d==null)return va;if(d.active)return d;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var h=e.settings.active===!0;if(Lge(d)){if(h)return Lp(Lp({},d),{},{active:!0})}else if(s!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:s,graphicalItemId:void 0};return Lp(Lp({},va),{},{coordinate:d.coordinate})};function Rge(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var n=e.valueOf();return Number.isFinite(n)?n:void 0}var i=Number(e);return Number.isFinite(i)?i:void 0}function zge(e,n){var i=Rge(e),s=n[0],d=n[1];if(i===void 0)return!1;var h=Math.min(s,d),f=Math.max(s,d);return i>=h&&i<=f}function Fge(e,n,i){if(i==null||n==null)return!0;var s=ur(e,n);return s==null||!za(i)?!0:zge(s,i)}var dC=(e,n,i,s)=>{var d=e==null?void 0:e.index;if(d==null)return null;var h=Number(d);if(!xn(h))return d;var f=0,g=1/0;n.length>0&&(g=n.length-1);var p=Math.max(f,Math.min(h,g)),x=n[p];return x==null||Fge(x,i,s)?String(p):null},h$=(e,n,i,s,d,h,f,g)=>{if(!(h==null||g==null)){var p=f[0],x=p==null?void 0:g(p.positions,h);if(x!=null)return x;var y=d==null?void 0:d[Number(h)];if(y)switch(i){case"horizontal":return{x:y.coordinate,y:(s.top+n)/2};default:return{x:(s.left+e)/2,y:y.coordinate}}}},m$=(e,n,i,s)=>{if(n==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var d;if(i==="hover"?d=e.itemInteraction.hover.graphicalItemId:d=e.itemInteraction.click.graphicalItemId,d==null&&s!=null){var h=e.tooltipItemPayloads[0];return h!=null?[h]:[]}return e.tooltipItemPayloads.filter(f=>{var g;return((g=f.settings)===null||g===void 0?void 0:g.graphicalItemId)===d})},Mm=e=>e.options.tooltipPayloadSearcher,Zd=e=>e.tooltip;function _P(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function AP(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?_P(Object(i),!0).forEach(function(s){$ge(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_P(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function $ge(e,n,i){return(n=Vge(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Vge(e){var n=Uge(e,"string");return typeof n=="symbol"?n:n+""}function Uge(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Wge(e,n){return e??n}var f$=(e,n,i,s,d,h,f)=>{if(!(n==null||h==null)){var{chartData:g,computedData:p,dataStartIndex:x,dataEndIndex:y}=i,v=[];return e.reduce((w,C)=>{var E,{dataDefinedOnItem:S,settings:D}=C,I=Wge(S,g),M=Array.isArray(I)?DR(I,x,y):I,B=(E=D==null?void 0:D.dataKey)!==null&&E!==void 0?E:s,R=D==null?void 0:D.nameKey,F;if(s&&Array.isArray(M)&&!Array.isArray(M[0])&&f==="axis"?F=S9(M,s,d):F=h(M,n,p,R),Array.isArray(F))F.forEac
184h(P=>{var z=AP(AP({},D),{},{name:P.name,unit:P.unit,color:void 0,fill:void 0});w.push(RM({tooltipEntrySettings:z,dataKey:P.dataKey,payload:P.payload,value:ur(P.payload,P.dataKey),name:P.name}))});else{var V;w.push(RM({tooltipEntrySettings:D,dataKey:B,payload:F,value:ur(F,B),name:(V=ur(F,R))!==null&&V!==void 0?V:D==null?void 0:D.name}))}return w},v)}},uC=xe([nr,on,xF,GA,tr],WF),Hge=xe([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,n)=>[...e,...n]),Gge=xe([tr,Yd],vF),Jd=xe([Hge,nr,Gge],_F,{memoizeOptions:{resultEqualityCheck:Bb}}),qge=xe([Jd],e=>e.filter(XA)),Kge=xe([Jd],jF,{memoizeOptions:{resultEqualityCheck:Bb}}),Xd=xe([Kge,Qs],NF),Yge=xe([qge,Qs,nr],bF),hC=xe([Xd,nr,Jd],EF),p$=xe([nr],nC),Qge=xe([nr],e=>e.allowDataOverflow),g$=xe([p$,Qge],Qz),Zge=xe([Jd],e=>e.filter(XA)),Jge=xe([Yge,Zge,Tb,dF],DF),Xge=xe([Jge,Qs,tr,g$],IF),e0e=xe([Jd],CF),t0e=xe([Xd,nr,e0e,rC,tr],OF,{memoizeOptions:{resultEqualityCheck:Ob}}),n0e=xe([BF,tr,Yd],Qd),r0e=xe([n0e,tr],zF),i0e=xe([LF,tr,Yd],Qd),o0e=xe([i0e,tr],FF),s0e=xe([RF,tr,Yd],Qd),a0e=xe([s0e,tr],$F),l0e=xe([r0e,a0e,o0e],v0),c0e=xe([nr,p$,g$,Xge,t0e,l0e,on,tr],VF),Pm=xe([nr,on,Xd,hC,Tb,tr,c0e],UF),d0e=xe([Pm,nr,uC],HF),u0e=xe([nr,Pm,d0e,tr],GF),b$=e=>{var n=tr(e),i=Yd(e),s=!1;return Im(e,n,i,s)},k$=xe([nr,b$],Ib),y$=xe([nr,uC,u0e,k$],oC),h0e=xe([on,hC,nr,tr],XF),m0e=xe([on,hC,nr,tr],e$),f0e=(e,n,i,s,d,h,f,g)=>{if(n){var{type:p}=n,x=Gs(e,g);if(s){var y=i==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,v=p==="category"&&s.bandwidth?s.bandwidth()/y:0;return v=g==="angleAxis"&&d!=null&&(d==null?void 0:d.length)>=2?Yi(d[0]-d[1])*2*v:v,x&&f?f.map((w,C)=>({coordinate:s(w)+v,value:w,index:C,offset:v})):s.domain().map((w,C)=>({coordinate:s(w)+v,value:h?h[w]:w,index:C,offset:v}))}}}
184,Xs=xe([on,nr,uC,y$,b$,h0e,m0e,tr],f0e),mC=xe([i$,o$,Age],(e,n,i)=>s$(i.shared,e,n)),x$=e=>e.tooltip.settings.trigger,fC=e=>e.tooltip.settings.defaultIndex,Om=xe([Zd,mC,x$,fC],u$),om=xe([Om,Xd,Dm,Pm],dC),v$=xe([Xs,om],a$),p0e=xe([Om],e=>{if(e)return e.dataKey}),eje=xe([Om],e=>{if(e)return e.graphicalItemId}),w$=xe([Zd,mC,x$,fC],m$),g0e=xe([qs,Ks,on,Nr,Xs,fC,w$,Mm],h$),b0e=xe([Om,g0e],(e,n)=>e!=null&&e.coordinate?e.coordinate:n),k0e=xe([Om],e=>{var n;return(n=e==null?void 0:e.active)!==null&&n!==void 0?n:!1}),y0e=xe([w$,om,Qs,Dm,v$,Mm,mC],f$),x0e=xe([y0e],e=>{if(e!=null){var n=e.map(i=>i.payload).filter(i=>i!=null);return Array.from(new Set(n))}});function CP(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function jP(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?CP(Object(i),!0).forEach(function(s){v0e(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):CP(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function v0e(e,n,i){return(n=w0e(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function w0e(e){var n=_0e(e,"string");return typeof n=="symbol"?n:n+""}function _0e(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var A0e=()=>yt(nr),C0e=()=>{var e=A0e(),n=yt(Xs),i=yt(y$);return e0(!e||!i?void 0:jP(jP({},e),{},{scale:i}),n)};function NP(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Uc(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?NP(Object(i),!0).forEach(function(s){j0e(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):NP(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function j0e(e,n,i){return(n=N0e(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function N0e(e){var n=E0e(e,"string");return typeof n=="symbol"?n:n+""}function E0e(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var S0e=(e,n,i,s)=>{var d=n.find(h=>h&&h.index===i);if(d){if(e==="horizontal")return{x:d.coordinate,y:s.chartY};if(e==="vertical")return{x:s.chartX,y:d.coordinate}}return{x:0,y:0}},D0e=(e,n,i,s)=>{var d=n.find(x=>x&&x.index===i);if(d){if(e==="centric"){var h=d.coordinate,{radius:f}=s;return Uc(Uc(Uc({},s),_r(s.cx,s.cy,f,h)),{},{angle:h,radius:f})}var g=d.coordinate,{angle:p}=s;return Uc(Uc(Uc({},s),_r(s.cx,s.cy,g,p)),{},{angle:p,radius:g})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function T0e(e,n){var{chartX:i,chartY:s}=e;return i>=n.left&&i<=n.left+n.width&&s>=n.top&&s<=n.top+n.height}var _$=(e,n,i,s,d)=>{var h,f=(h=n==null?void 0:n.length)!==null&&h!==void 0?h:0;if(f<=1||e==null)return 0;if(s==="angleAxis"&&d!=null&&Math.abs(Math.abs(d[1]-d[0])-360)<=1e-6)for(var g=0;g<f;g++){var p,x,y,v,w,C=g>0?(p=i[g-1])===null||p===void 0?void 0:p.coordinate:(x=i[f-1])===null||x===void 0?void 0:x.coordinate,E=(y=i[g])===null||y===void 0?void 0:y.coordinate,S=g>=f-1?(v=i[0])===null||v===void 0?void 0:v.coordinate:(w=i[g+1])===null||w===void 0?void 0:w.coordinate,D=void 0;if(!(C==null||E==null||S==null))if(Yi(E-C)!==Yi(S-E)){var I=[];if(Yi(S-E)===Yi(d[1]-d[0])){D=S;var M=E+d[1]-d[0];I[0]=Math.min(M,(M+C)/2),I[1]=Math.max(M,(M+C)/2)}else{D=C;var B=S+d[1]-d[0];I[0]=Math.min(E,(B+E)/2),I[1]=Math.max(E,(B+E)/2)}var R=[Math.min(E,(D+E)/2),Math.max(E,(D+E)/2)];if(e>R[0]&&e<=R[1]||e>=I[0]&&e<=I[1]){var F;return(F=i[g])===null||F===void 0?void 0:F.index}}else{var V=Math.min(C,S),P=Math.max(C,S);if(e>(V+E)/2&&e<=(P+E)/2){var z;return(z=i[g])===null||z===void 0?void 0:z.index}}}else if(n)for(var W=0;W<f;W++){var K=n[W];if(K!=null){var G=n[W+1],Z=n[W-1];if(W===0&&G!=null&&e<=(K.coordinate+G.coordinate)/2||W===f-1&&Z!=null&&e>(K.coordinate+Z.coordinate)/2||W>0&&W<f-1&&Z!=null&&G!=null&&e>(K.coordinate+Z.coordinate)/2&&e<=(K.coordinate+G.coordinate)/2)return K.index}}return-1},A$=()=>yt(GA),pC=(e,n)=>n,C$=(e,n,i)=>i,gC=(e,n,i,s)=>s,I0e=xe(Xs,e=>ab(e,n=>n.coordinate)),bC=xe([Zd,pC,C$,gC],u$),kC=xe([bC,Xd,Dm,Pm],dC),M0e=(e,n,i)=>{if(n!=null){var s=Zd(e);return n==="axis"?i==="hover"?s.axisInteraction.hover.dataKey:s.axisInteraction.click.dataKey:i==="hover"?s.itemInteraction.hover.dataKey:s.itemInteraction.click.dataKey}},j$=xe([Zd,pC,C$,gC],m$),w0=xe([qs,Ks,on,Nr,Xs,gC,j$,Mm],h$),P0e=xe([bC,w0],(e,n)=>{var i;return(i=e.coordinate)!==null&&i!==void 0?i:n}),N$=xe([Xs,kC],a$),O0e=xe([j$,kC,Qs,Dm,N$,Mm,pC],f$),B0e=xe([bC,kC],(e,n)=>({isActive:e.active&&n!=null,activeIndex:n})),L0e=(e,n,i,s,d,h,f)=>{if(!(!e||!i||!s||!d)&&T0e(e,f)){var g=xde(e,n),p=_$(g,h,d,i,s),x=S0e(n,d,p,e);return{activeIndex:String(p),activeCoordinate:x}}},R0e=(e,n,i,s,d,h,f)=>{if(!(!e||!s||!d||!h||!i)){var g=Che(e,i);if(g){var p=vde(g,n),x=_$(p,f,h,s,d),y=D0e(n,h,x,g);return{activeIndex:String(x),activeCoordinate:y}}}},z0e=(e,n,i,s,d,h,f,g)=>{if(!(!e||!n||!s||!d||!h))return n==="horizontal"||n==="vertical"?L0e(e,n,s,d,h,f,g):R0e(e,n,i,s,d,h,f)},F0e=xe(e=>e.zIndex.zIndexMap,(e,n)=>n,(e,n,i)=>i,(e,n,i)=>{if(n!=null){var s=e[n];if(s!=null)return i?s.panoramaElement:s.element}}),$0e=xe(e=>e.zIndex.zIndexMap,e=>{var n=Object.keys(e).map(s=>parseInt(s,10)).concat(Object.values(Ur)),i=Array.from(new Set(n));return i.sort((s,d)=>s-d)},{memoizeOptions:{resultEqualityCheck:Cpe}});function EP(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function SP(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};
184n%2?EP(Object(i),!0).forEach(function(s){V0e(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):EP(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function V0e(e,n,i){return(n=U0e(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function U0e(e){var n=W0e(e,"string");return typeof n=="symbol"?n:n+""}function W0e(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var H0e={},G0e={zIndexMap:Object.values(Ur).reduce((e,n)=>SP(SP({},e),{},{[n]:{element:void 0,panoramaElement:void 0,consumers:0}}),H0e)},q0e=new Set(Object.values(Ur));function K0e(e){return q0e.has(e)}var E$=hi({name:"zIndex",initialState:G0e,reducers:{registerZIndexPortal:{reducer:(e,n)=>{var{zIndex:i}=n.payload;e.zIndexMap[i]?e.zIndexMap[i].consumers+=1:e.zIndexMap[i]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:bn()},unregisterZIndexPortal:{reducer:(e,n)=>{var{zIndex:i}=n.payload;e.zIndexMap[i]&&(e.zIndexMap[i].consumers-=1,e.zIndexMap[i].consumers<=0&&!K0e(i)&&delete e.zIndexMap[i])},prepare:bn()},registerZIndexPortalElement:{reducer:(e,n)=>{var{zIndex:i,element:s,isPanorama:d}=n.payload;e.zIndexMap[i]?d?e.zIndexMap[i].panoramaElement=s:e.zIndexMap[i].element=s:e.zIndexMap[i]={consumers:0,element:d?void 0:s,panoramaElement:d?s:void 0}},prepare:bn()},unregisterZIndexPortalElement:{reducer:(e,n)=>{var{zIndex:i}=n.payload;e.zIndexMap[i]&&(n.payload.isPanorama?e.zIndexMap[i].panoramaElement=void 0:e.zIndexMap[i].element=void 0)},prepare:bn()}}}),{registerZIndexPortal:Y0e,unregisterZIndexPortal:Q0e,registerZIndexPortalElement:Z0e,unregisterZIndexPortalElement:J0e}=E$.actions,X0e=E$.reducer;function ea(e){var{zIndex:n,children:i}=e,s=Zde(),d=s&&n!==void 0&&n!==0,h=mi(),f=Un();j.useLayoutEffect(()=>d?(f(Y0e({zIndex:n})),()=>{f(Q0e({zIndex:n}))}):bm,[f,n,d]);var g=yt(p=>F0e(p,n,h));return d?g?B_.createPortal(i,g):null:i}function N1(){return N1=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},N1.apply(null,arguments)}function DP(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Rp(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?DP(Object(i),!0).forEach(function(s){ebe(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):DP(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function ebe(e,n,i){return(n=tbe(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function tbe(e){var n=nbe(e,"string");return typeof n=="symbol"?n:n+""}function nbe(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function rbe(e){var{cursor:n,cursorComp:i,cursorProps:s}=e;return j.isValidElement(n)?j.cloneElement(n,s):j.createElement(i,s)}function ibe(e){var n,{coordinate:i,payload:s,index:d,offset:h,tooltipAxisBandSize:f,layout:g,cursor:p,tooltipEventType:x,chartName:y}=e,v=i,w=s,C=d;if(!p||!v||y!=="ScatterChart"&&x!=="axis")return null;var E,S,D;if(y==="ScatterChart")E=v,S=Bue,D=Ur.cursorLine;else if(y==="BarChart")E=Lue(g,v,h,f),S=phe,D=Ur.cursorRectangle;else if(g==="radial"&&D9(v)){var{cx:I,cy:M,radius:B,startAngle:R,endAngle:F}=lz(v);E={cx:I,cy:M,startAngle:R,endAngle:F,innerRadius:B,outerRadius:B},S=She,D=Ur.cursorLine}else E={points:Dhe(g,v,h)},S=ug,D=Ur.cursorLine;var V=typeof p=="object"&&"className"in p?p.className:void 0,P=Rp(Rp(Rp(Rp({stroke:"#ccc",pointerEvents:"none"},h),E),eb(p)),{},{payload:w,payloadIndex:C,className:pn("recharts-tooltip-cursor",V)});return j.createElement(ea,{zIndex:(n=e.zIndex)!==null&&n!==void 0?n:D},j.createElement(rbe,{cursor:p,cursorComp:S,cursorProps:P}))}function obe(e){var n=C0e(),i=UR(),s=Hd(),d=A$();return n==null||i==null||s==null||d==null?null:j.createElement(ibe,N1({},e,{offset:i,layout:s,tooltipAxisBandSize:n,chartName:d}))}var S$=j.createContext(null),sbe=()=>j.useContext(S$),D$={exports:{}};(function(e){var n=Object.prototype.hasOwnProperty,i="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(i=!1));function d(p,x,y){this.fn=p,this.context=x,this.once=y||!1}function h(p,x,y,v,w){if(typeof y!="function")throw new TypeError("The listener must be a function");var C=new d(y,v||p,w),E=i?i+x:x;return p._events[E]?p._events[E].fn?p._events[E]=[p._events[E],C]:p._events[E].push(C):(p._events[E]=C,p._eventsCount++),p}function f(p,x){--p._eventsCount===0?p._events=new s:delete p._events[x]}function g(){this._events=new s,this._eventsCount=0}g.prototype.eventNames=function(){var x=[],y,v;if(this._eventsCount===0)return x;for(v in y=this._events)n.call(y,v)&&x.push(i?v.slice(1):v);return Object.getOwnPropertySymbols?x.concat(Object.getOwnPropertySymbols(y)):x},g.prototype.listeners=function(x){var y=i?i+x:x,v=this._events[y];if(!v)return[];if(v.fn)return[v.fn];for(var w=0,C=v.length,E=new Array(C);w<C;w++)E[w]=v[w].fn;return E},g.prototype.listenerCount=function(x){var y=i?i+x:x,v=this._events[y];return v?v.fn?1:v.length:0},g.prototype.emit=function(x,y,v,w,C,E){var S=i?i+x:x;if(!this._events[S])return!1;var D=this._events[S],I=arguments.length,M,B;if(D.fn){switch(D.once&&this.removeListener(x,D.fn,void 0,!0),I){case 1:return D.fn.call(D.context),!0;case 2:return D.fn.call(D.context,y),!0;case 3:return D.fn.call(D.context,y,v),!0;case 4:return D.fn.call(D.context,y,v,w),!0;case 5:return D.fn.call(D.context,y,v,w,C),!0;case 6:return D.fn.call(D.context,y,v,w,C,E),!0}for(B=1,M=new Array(I-1);B<I;B++)M[B-1]=arguments[B];
184D.fn.apply(D.context,M)}else{var R=D.length,F;for(B=0;B<R;B++)switch(D[B].once&&this.removeListener(x,D[B].fn,void 0,!0),I){case 1:D[B].fn.call(D[B].context);break;case 2:D[B].fn.call(D[B].context,y);break;case 3:D[B].fn.call(D[B].context,y,v);break;case 4:D[B].fn.call(D[B].context,y,v,w);break;default:if(!M)for(F=1,M=new Array(I-1);F<I;F++)M[F-1]=arguments[F];D[B].fn.apply(D[B].context,M)}}return!0},g.prototype.on=function(x,y,v){return h(this,x,y,v,!1)},g.prototype.once=function(x,y,v){return h(this,x,y,v,!0)},g.prototype.removeListener=function(x,y,v,w){var C=i?i+x:x;if(!this._events[C])return this;if(!y)return f(this,C),this;var E=this._events[C];if(E.fn)E.fn===y&&(!w||E.once)&&(!v||E.context===v)&&f(this,C);else{for(var S=0,D=[],I=E.length;S<I;S++)(E[S].fn!==y||w&&!E[S].once||v&&E[S].context!==v)&&D.push(E[S]);D.length?this._events[C]=D.length===1?D[0]:D:f(this,C)}return this},g.prototype.removeAllListeners=function(x){var y;return x?(y=i?i+x:x,this._events[y]&&f(this,y)):(this._events=new s,this._eventsCount=0),this},g.prototype.off=g.prototype.removeListener,g.prototype.addListener=g.prototype.on,g.prefixed=i,g.EventEmitter=g,e.exports=g})(D$);var abe=D$.exports;const lbe=os(abe);var sm=new lbe,E1="recharts.syncEvent.tooltip",TP="recharts.syncEvent.brush";function cbe(e,n){if(n){var i=Number.parseInt(n,10);if(!Eo(i))return e==null?void 0:e[i]}}var dbe={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},T$=hi({name:"options",initialState:dbe,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),ube=T$.reducer,{createEventEmitter:hbe}=T$.actions;function mbe(e){return e.tooltip.syncInteraction}var fbe={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},I$=hi({name:"chartData",initialState:fbe,reducers:{setChartData(e,n){if(e.chartData=n.payload,n.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}n.payload.length>0&&e.dataEndIndex!==n.payload.length-1&&(e.dataEndIndex=n.payload.length-1)},setComputedData(e,n){e.computedData=n.payload},setDataStartEndIndexes(e,n){var{startIndex:i,endIndex:s}=n.payload;i!=null&&(e.dataStartIndex=i),s!=null&&(e.dataEndIndex=s)}}}),{setChartData:IP,setDataStartEndIndexes:pbe,setComputedData:tje}=I$.actions,gbe=I$.reducer,bbe=["x","y"];function MP(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Wc(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?MP(Object(i),!0).forEach(function(s){kbe(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):MP(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function kbe(e,n,i){return(n=ybe(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function ybe(e){var n=xbe(e,"string");return typeof n=="symbol"?n:n+""}function xbe(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function vbe(e,n){if(e==null)return{};var i,s,d=wbe(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function wbe(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}function _be(){var e=yt(qA),n=yt(KA),i=Un(),s=yt(uF),d=yt(Xs),h=Hd(),f=xb(),g=yt(p=>p.rootProps.className);j.useEffect(()=>{if(e==null)return bm;var p=(x,y,v)=>
184{if(n!==v&&e===x){if(s==="index"){var w;if(f&&y!==null&&y!==void 0&&(w=y.payload)!==null&&w!==void 0&&w.coordinate&&y.payload.sourceViewBox){var C=y.payload.coordinate,{x:E,y:S}=C,D=vbe(C,bbe),{x:I,y:M,width:B,height:R}=y.payload.sourceViewBox,F=Wc(Wc({},D),{},{x:f.x+(B?(E-I)/B:0)*f.width,y:f.y+(R?(S-M)/R:0)*f.height});i(Wc(Wc({},y),{},{payload:Wc(Wc({},y.payload),{},{coordinate:F})}))}else i(y);return}if(d!=null){var V;if(typeof s=="function"){var P={activeTooltipIndex:y.payload.index==null?void 0:Number(y.payload.index),isTooltipActive:y.payload.active,activeIndex:y.payload.index==null?void 0:Number(y.payload.index),activeLabel:y.payload.label,activeDataKey:y.payload.dataKey,activeCoordinate:y.payload.coordinate},z=s(d,P);V=d[z]}else s==="value"&&(V=d.find(Ae=>String(Ae.value)===y.payload.label));var{coordinate:W}=y.payload;if(V==null||y.payload.active===!1||W==null||f==null){i(C1({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:K,y:G}=W,Z=Math.min(K,f.x+f.width),se=Math.min(G,f.y+f.height),ge={x:h==="horizontal"?V.coordinate:Z,y:h==="horizontal"?se:V.coordinate},Se=C1({active:y.payload.active,coordinate:ge,dataKey:y.payload.dataKey,index:String(V.index),label:y.payload.label,sourceViewBox:y.payload.sourceViewBox,graphicalItemId:y.payload.graphicalItemId});i(Se)}}};return sm.on(E1,p),()=>{sm.off(E1,p)}},[g,i,n,e,s,d,h,f])}function Abe(){var e=yt(qA),n=yt(KA),i=Un();j.useEffect(()=>{if(e==null)return bm;var s=(d,h,f)=>{n!==f&&e===d&&i(pbe(h))};return sm.on(TP,s),()=>{sm.off(TP,s)}},[i,n,e])}function Cbe(){var e=Un();j.useEffect(()=>{e(hbe())},[e]),_be(),Abe()}function jbe(e,n,i,s,d,h){var f=yt(C=>M0e(C,e,n)),g=yt(KA),p=yt(qA),x=yt(uF),y=yt(mbe),v=y==null?void 0:y.active,w=xb();j.useEffect(()=>{if(!v&&p!=null&&g!=null){var C=C1({active:h,coordinate:i,dataKey:f,index:d,label:typeof s=="number"?String(s):s,sourceViewBox:w,graphicalItemId:void 0});sm.emit(E1,p,C,g)}},[v,i,f,d,s,g,p,x,h,w])}function PP(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function OP(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?PP(Object(i),!0).forEach(function(s){Nbe(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):PP(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function Nbe(e,n,i){return(n=Ebe(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Ebe(e){var n=Sbe(e,"string");return typeof n=="symbol"?n:n+""}function Sbe(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Dbe(e){return e.dataKey}function Tbe(e,n){return j.isValidElement(e)?j.cloneElement(e,n):typeof e=="function"?j.createElement(e,n):j.createElement(pue,n)}var BP=[],Ibe={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function Mbe(e){var n,i,s=Bi(e,Ibe),{active:d,allowEscapeViewBox:h,animationDuration:f,animationEasing:g,content:p,filterNull:x,isAnimationActive:y,offset:v,payloadUniqBy:w,position:C,reverseDirection:E,useTranslate3d:S,wrapperStyle:D,cursor:I,shared:M,trigger:B,defaultIndex:R,portal:F,axisId:V}=s,P=Un(),z=typeof R=="number"?String(R):R;j.useEffect(()=>{P(Sge({shared:M,trigger:B,axisId:V,active:d,defaultIndex:z}))},[P,M,B,V,d,z]);var W=xb(),K=nz(),G=_ge(M),{activeIndex:Z,isActive:se}=(n=yt(Oe=>B0e(Oe,G,B,z)))!==null&&n!==void 0?n:{},ge=yt(Oe=>O0e(Oe,G,B,z)),Se=yt(Oe=>N$(Oe,G,B,z)),Ae=yt(Oe=>P0e(Oe,G,B,z)),he=ge,ee=sbe(),le=(i=d??se)!==null&&i!==void 0?i:!1,[je,ve]=sce([he,le]),Ce=G==="axis"?Se:void 0;jbe(G,B,Ae,Ce,Z,le);var Q=F??ee;if(Q==null||W==null||G==null)return null;var te=he??BP;le||(te=BP),x&&te.length&&(te=Ule(te.filter(Oe=>Oe.value!=null&&(Oe.hide!==!0||s.includeHidden)),w,Dbe));var pe=te.length>0,be=j.createElement(wue,{allowEscapeViewBox:h,animationDuration:f,animationEasing:g,isAnimationActive:y,active:le,coordinate:Ae,hasPayload:pe,offset:v,position:C,reverseDirection:E,useTranslate3d:S,viewBox:W,wrapperStyle:D,lastBoundingBox:je,innerRef:ve,hasPortalFromProps:!!F},Tbe(p,OP(OP({},s),{},{payload:te,label:Ce,active:le,activeIndex:Z,coordinate:Ae,accessibilityLayer:K})));return j.createElement(j.Fragment,null,B_.createPortal(be,Q),le&&j.createElement(obe,{cursor:I,tooltipEventType:G,coordinate:Ae,payload:te,index:Z}))}function Pbe(e,n,i){return(n=Obe(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Obe(e){var n=Bbe(e,"string");return typeof n=="symbol"?n:n+""}function Bbe(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}
184class Lbe{constructor(n){Pbe(this,"cache",new Map),this.maxSize=n}get(n){var i=this.cache.get(n);return i!==void 0&&(this.cache.delete(n),this.cache.set(n,i)),i}set(n,i){if(this.cache.has(n))this.cache.delete(n);else if(this.cache.size>=this.maxSize){var s=this.cache.keys().next().value;s!=null&&this.cache.delete(s)}this.cache.set(n,i)}clear(){this.cache.clear()}size(){return this.cache.size}}function LP(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Rbe(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?LP(Object(i),!0).forEach(function(s){zbe(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):LP(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function zbe(e,n,i){return(n=Fbe(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Fbe(e){var n=$be(e,"string");return typeof n=="symbol"?n:n+""}function $be(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var Vbe={cacheSize:2e3,enableCache:!0},M$=Rbe({},Vbe),RP=new Lbe(M$.cacheSize),Ube={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},zP="recharts_measurement_span";function Wbe(e,n){var i=n.fontSize||"",s=n.fontFamily||"",d=n.fontWeight||"",h=n.fontStyle||"",f=n.letterSpacing||"",g=n.textTransform||"";return"".concat(e,"|").concat(i,"|").concat(s,"|").concat(d,"|").concat(h,"|").concat(f,"|").concat(g)}var FP=(e,n)=>{try{var i=document.getElementById(zP);i||(i=document.createElement("span"),i.setAttribute("id",zP),i.setAttribute("aria-hidden","true"),document.body.appendChild(i)),Object.assign(i.style,Ube,n),i.textContent="".concat(e);var s=i.getBoundingClientRect();return{width:s.width,height:s.height}}catch{return{width:0,height:0}}},Ah=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||_m.isSsr)return{width:0,height:0};if(!M$.enableCache)return FP(n,i);var s=Wbe(n,i),d=RP.get(s);if(d)return d;var h=FP(n,i);return RP.set(s,h),h},P$;function Hbe(e,n,i){return(n=Gbe(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Gbe(e){var n=qbe(e,"string");return typeof n=="symbol"?n:n+""}function qbe(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var $P=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,VP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Kbe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Ybe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Qbe={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Zbe=["cm","mm","pt","pc","in","Q","px"];function Jbe(e){return Zbe.includes(e)}var cd="NaN";function Xbe(e,n){return e*Qbe[n]}class wr{static parse(n){var i,[,s,d]=(i=Ybe.exec(n))!==null&&i!==void 0?i:[];return s==null?wr.NaN:new wr(parseFloat(s),d??"")}constructor(n,i){this.num=n,this.unit=i,this.num=n,this.unit=i,Eo(n)&&(this.unit=""),i!==""&&!Kbe.test(i)&&(this.num=NaN,this.unit=""),Jbe(i)&&(this.num=Xbe(n,i),this.unit="px")}add(n){return this.unit!==n.unit?new wr(NaN,""):new wr(this.num+n.num,this.unit)}subtract(n){return this.unit!==n.unit?new wr(NaN,""):new wr(this.num-n.num,this.unit)}multiply(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new wr(NaN,""):new wr(this.num*n.num,this.unit||n.unit)}divide(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new wr(NaN,""):new wr(this.num/n.num,this.unit||n.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Eo(this.num)}}P$=wr;Hbe(wr,"NaN",new P$(NaN,""));function O$(e){if(e==null||e.includes(cd))return cd;for(var n=e;n.includes("*")||n.includes("/");){var i,[,s,d,h]=(i=$P.exec(n))!==null&&i!==void 0?i:[],f=wr.parse(s??""),g=wr.parse(h??""),p=d==="*"?f.multiply(g):f.divide(g);if(p.isNaN())return cd;n=n.replace($P,p.toString())}for(;n.includes("+")||/.-\d+(?:\.\d+)?/.test(n);){var x,[,y,v,w]=(x=VP.exec(n))!==null&&x!==void 0?x:[],C=wr.parse(y??""),E=wr.parse(w??""),S=v==="+"?C.add(E):C.subtract(E);if(S.isNaN())return cd;n=n.replace(VP,S.toString())}return n}var UP=/\(([^()]*)\)/;function eke(e){for(var n=e,i;(i=UP.exec(n))!=null;){var[,s]=i;n=n.replace(UP,O$(s))}return n}function tke(e){var n=e.replace(/\s+/g,"");return n=eke(n),n=O$(n),n}function nke(e){try{return tke(e)}catch{return cd}}function cv(e){var n=nke(e.slice(5,-1));return n===cd?"":n}var rke=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],ike=["dx","dy","angle","className","breakAll"];function S1(){return S1=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},S1.apply(null,arguments)}function WP(e,n){if(e==null)return{};var i,s,d=oke(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function oke(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}var B$=/[ \f\n\r\t\v\u2028\u2029]+/,L$=e=>{var{children:n,breakAll:i,style:s}=e;try{var d=[];Jn(n)||(i?d=n.toString().split(""):d=n.toString().split(B$));var h=d.map(g=>({word:g,width:Ah(g,s).width})),f=i?0:Ah(" ",s).width;return{wordsWithComputedWidth:h,spaceWidth:f}}catch{return null}};function ske(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var R$=(e,n,i,s)=>e.reduce((d,h)=>{var{word:f,width:g}=h,p=d[d.length-1];if(p&&g!=null&&(n==null||s||p.width+g+i<Number(n)))p.words.push(f),p.width+=g+i;else{var x={words:[f],width:g};d.push(x)}return d},[]),z$=e=>e.reduce((n,i)=>n.width>i.width?n:i),ake="â¦",HP=(e,n,i,s,d,h,f,g)=>{var p=e.slice(0,n),x=L$({breakAll:i,style:s,children:p+ake});if(!x)return[!1,[]];var y=R$(x.wordsWithComputedWidth,h,f,g),v=y.length>d||z$(y).width>Number(h);return[v,y]},lke=(e,n,i,s,d)=>{var{maxLines:h,children:f,style:g,breakAll:p}=e,x=ht(h),y=String(f),v=R$(n,s,i,d);if(!x||d)return v;var w=v.length>h||z$(v).width>Number(s);if(!w)return v;for(var C=0,E=y.length-1,S=0,D;C<=E&&S<=y.length-1;){var I=Math.floor((C+E)/2),M=I-1,[B,R]=HP(y,M,p,g,h,s,i,d),[F]=HP(y,I,p,g,h,s,i,d);if(!B&&!F&&(C=I+1),B&&F&&(E=I-1),!B&&F){D=R;break}S++}return D||v},GP=e=>{var n=Jn(e)?[]:e.toString().split(B$);return[{words:n,width:void 0}]},cke=e=>{var{width:n,scaleToFit:i,children:s,style:d,breakAll:h,maxLines:f}=e;if((n||i)&&!_m.isSsr){var g,p,x=L$({breakAll:h,children:s,style:d});if(x){var{wordsWithComputedWidth:y,spaceWidth:v}=x;g=y,p=v}else return GP(s);return lke({breakAll:h,children:s,maxLines:f,style:d},g,p,n,!!i)}return GP(s)},F$="#808080",dke={angle:0,breakAll:!1,capHeight:"0.71em",fill:F$,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0}
184,yC=j.forwardRef((e,n)=>{var i=Bi(e,dke),{x:s,y:d,lineHeight:h,capHeight:f,fill:g,scaleToFit:p,textAnchor:x,verticalAnchor:y}=i,v=WP(i,rke),w=j.useMemo(()=>cke({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:p,style:v.style,width:v.width}),[v.breakAll,v.children,v.maxLines,p,v.style,v.width]),{dx:C,dy:E,angle:S,className:D,breakAll:I}=v,M=WP(v,ike);if(!ns(s)||!ns(d)||w.length===0)return null;var B=Number(s)+(ht(C)?C:0),R=Number(d)+(ht(E)?E:0);if(!xn(B)||!xn(R))return null;var F;switch(y){case"start":F=cv("calc(".concat(f,")"));break;case"middle":F=cv("calc(".concat((w.length-1)/2," * -").concat(h," + (").concat(f," / 2))"));break;default:F=cv("calc(".concat(w.length-1," * -").concat(h,")"));break}var V=[];if(p){var P=w[0].width,{width:z}=v;V.push("scale(".concat(ht(z)&&ht(P)?z/P:1,")"))}return S&&V.push("rotate(".concat(S,", ").concat(B,", ").concat(R,")")),V.length&&(M.transform=V.join(" ")),j.createElement("text",S1({},eo(M),{ref:n,x:B,y:R,className:pn("recharts-text",D),textAnchor:x,fill:g.includes("url")?F$:g}),w.map((W,K)=>{var G=W.words.join(I?"":" ");return j.createElement("tspan",{x:B,dy:K===0?F:h,key:"".concat(G,"-").concat(K)},G)}))});yC.displayName="Text";var uke=["labelRef"],hke=["content"];function qP(e,n){if(e==null)return{};var i,s,d=mke(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function mke(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}function KP(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Mn(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?KP(Object(i),!0).forEach(function(s){fke(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):KP(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function fke(e,n,i){return(n=pke(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function pke(e){var n=gke(e,"string");return typeof n=="symbol"?n:n+""}function gke(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function As(){return As=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},As.apply(null,arguments)}var $$=j.createContext(null),bke=e=>{var{x:n,y:i,upperWidth:s,lowerWidth:d,width:h,height:f,children:g}=e,p=j.useMemo(()=>({x:n,y:i,upperWidth:s,lowerWidth:d,width:h,height:f}),[n,i,s,d,h,f]);return j.createElement($$.Provider,{value:p},g)},V$=()=>{var e=j.useContext($$),n=xb();return e||VR(n)},kke=j.createContext(null),yke=()=>{var e=j.useContext(kke),n=yt(gF);return e||n},xke=e=>{var{value:n,formatter:i}=e,s=Jn(e.children)?n:e.children;return typeof i=="function"?i(s):s},xC=e=>e!=null&&typeof e=="function",vke=(e,n)=>{var i=Yi(n-e),s=Math.min(Math.abs(n-e),360);return i*s},wke=(e,n,i,s,d)=>{var{offset:h,className:f}=e,{cx:g,cy:p,innerRadius:x,outerRadius:y,startAngle:v,endAngle:w,clockWise:C}=d,E=(x+y)/2,S=vke(v,w),D=S>=0?1:-1,I,M;switch(n){case"insideStart":I=v+D*h,M=C;break;case"insideEnd":I=w-D*h,M=!C;break;case"end":I=w+D*h,M=C;break;default:throw new Error("Unsupported position ".concat(n))}M=S<=0?M:!M;var B=_r(g,p,E,I),R=_r(g,p,E,I+(M?1:-1)*359),F="M".concat(B.x,",").concat(B.y,` 185 A`).concat(E,",").concat(E,",0,1,").concat(M?0:1,`, 186 `).concat(R.x,",").concat(R.y),V=Jn(e.id)?Gh("recharts-radial-line-"):e.id;return j.createElement("text",As({},s,{dominantBaseline:"central",className:pn("recharts-radial-bar-label",f)}),j.createElement("defs",null,j.createElement("path",{id:V,d:F})),j.createElement("textPath",{xlinkHref:"#".concat(V)},i))},_ke=(e,n,i)=>{var{cx:s,cy:d,innerRadius:h,outerRadius:f,startAngle:g,endAngle:p}=e,x=(g+p)/2;if(i==="outside"){var{x:y,y:v}=_r(s,d,f+n,x);return{x:y,y:v,textAnchor:y>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:d,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:d,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:d,textAnchor:"middle",verticalAnchor:"end"};var w=(h+f)/2,{x:C,y:E}=_r(s,d,w,x);return{x:C,y:E,textAnchor:"middle",verticalAnchor:"middle"}},D1=e=>"cx"in e&&ht(e.cx),Ake=(e,n)=>{var{parentViewBox:i,offset:s,position:d}=e,h;i!=null&&!D1(i)&&(h=i);var{x:f,y:g,upperWidth:p,lowerWidth:x,height:y}=n,v=f,w=f+(p-x)/2,C=(v+w)/2,E=(p+x)/2,S=v+p/2,D=y>=0?1:-1,I=D*s,M=D>0?"end":"start",B=D>0?"start":"end",R=p>=0?1:-1,F=R*s,V=R>0?"end":"start",P=R>0?"start":"end";if(d==="top"){var z={x:v+p/2,y:g-I,textAnchor:"middle",verticalAnchor:M};return Mn(Mn({},z),h?{height:Math.max(g-h.y,0),width:p}:{})}if(d==="bottom"){var W={x:w+x/2,y:g+y+I,textAnchor:"middle",verticalAnchor:B};return Mn(Mn({},W),h?{height:Math.max(h.y+h.height-(g+y),0),width:x}:{})}if(d==="left"){var K={x:C-F,y:g+y/2,textAnchor:V,verticalAnchor:"middle"};return Mn(Mn({},K),h?{width:Math.max(K.x-h.x,0),height:y}:{})}if(d==="right"){var G={x:C+E+F,y:g+y/2,textAnchor:P,verticalAnchor:"middle"};return Mn(Mn({},G),h?{width:Math.max(h.x+h.width-G.x,0),height:y}:{})}var Z=h?{width:E,height:y}:{};return d==="insideLeft"?Mn({x:C+F,y:g+y/2,textAnchor:P,verticalAnchor:"middle"},Z):d==="insideRight"?Mn({x:C+E-F,y:g+y/2,textAnchor:V,verticalAnchor:"middle"},Z):d==="insideTop"?Mn({x:v+p/2,y:g+I,textAnchor:"middle",verticalAnchor:B},Z):d==="insideBottom"?Mn({x:w+x/2,y:g+y-I,textAnchor:"middle",verticalAnchor:M},Z):d==="insideTopLeft"?Mn({x:v+F,y:g+I,textAnchor:P,verticalAnchor:B},Z):d==="insideTopRight"?Mn({x:v+p-F,y:g+I,textAnchor:V,verticalAnchor:B},Z):d==="insideBottomLeft"?Mn({x:w+F,y:g+y-I,textAnchor:P,verticalAnchor:M},Z):d==="insideBottomRight"?Mn({x:w+x-F,y:g+y-I,textAnchor:V,verticalAnchor:M},Z):d&&typeof d=="object"&&(ht(d.x)||Rs(d.x))&&(ht(d.y)||Rs(d.y))?Mn({x:f+Ra(d.x,E),y:g+Ra(d.y,y),textAnchor:"end",verticalAnchor:"end"},Z):Mn({x:S,y:g+y/2,textAnchor:"middle",verticalAnchor:"middle"},Z)},Cke={angle:0,offset:5,zIndex:Ur.label,position:"middle",textBreakAll:!1};function ka(e){var n=Bi(e,Cke),{viewBox:i,position:s,value:d,children:h,content:f,className:g="",textBreakAll:p,labelRef:x}=n,y=yke(),v=V$(),w=s==="center"?v:y??v,C,E,S;if(i==null?C=w:D1(i)?C=i:C=VR(i),!C||Jn(d)&&Jn(h)&&!j.isValidElement(f)&&typeof f!="function")return null;var D=Mn(Mn({},n),{},{viewBox:C});if(j.isValidElement(f)){var{labelRef:I}=D,M=qP(D,uke);return j.cloneElement(f,M)}if(typeof f=="function"){var{content:B}=D,R=qP(D,hke);if(E=j.createElement(f,R),j.isValidElement(E))return E}else E=xke(n);var F=eo(n);if(D1(C)){if(s==="insideStart"||s==="insideEnd"||s==="end")return wke(n,s,E,F,C);S=_ke(C,n.offset,n.position)}else S=Ake(n,C);return j.createElement(ea,{zIndex:n.zIndex},j.createElement(yC,As({ref:x,className:pn("recharts-label",g)},F,S,{textAnchor:ske(F.textAnchor)?F.textAnchor:S.textAnchor,breakAll:p}),E))}ka.displayName="Label";var jke=(e,n,i)=>{if(!e)return null;var s={viewBox:n,labelRef:i};return e===!0?j.createElement(ka,As({key:"label-implicit"},s)):ns(e)?j.createElement(ka,As({key:"label-implicit",value:e},s)):j.isValidElement(e)?e.type===ka?j.cloneElement(e,Mn({key:"label-implicit"},s)):j.createElement(ka,As({key:"label-implicit",content:e},s)):xC(e)?j.createElement(ka,As({key:"label-implicit",content:e},s)):e&&typeof e=="object"?j.createElement(ka,As({},e,{key:"label-implicit"},s)):null};function Nke(e){var{label:n,labelRef:i}=e,s=V$();return jke(n,s,i)||null}var U$={},W$={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){return i[i.length-1]}e.last=n})(W$);var H$={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function n(i){return Array.isArray(i)?i:Array.from(i)}e.toArray=n})(H$);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const n=W$,i=H$,s=sb;function d(h){if(s.isArrayLike(h))return n.last(i.toArray(h))}e.last=d})(U$);var Eke=U$.last;const Ske=os(Eke);var Dke=["valueAccessor"],Tke=["dataKey","clockWise","id","textBreakAll","zIndex"];function _0(){return _0=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},_0.apply(null,arguments)}function YP(e,n){if(e==null)return{};var i,s,d=Ike(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function Ike(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}var Mke=e=>Array.isArray(e.value)?Ske(e.value):e.value,G$=j.createContext(void 0),Pke=G$.Provider,q$=j.createContext(void 0),nje=q$.Provider;function Oke(){return j.useContext(G$)}function Bke(){return j.useContext(q$)}function mg(e){var{valueAccessor:n=Mke}=e,i=YP(e,Dke),{dataKey:s,clockWise:d,id:h,textBreakAll:f,zIndex:g}=i,p=YP(i,Tke),x=Oke(),y=Bke(),v=x||y;return!v||!v.length?null:j.createElement(ea,{zIndex:g??Ur.label},j.createElement(ts,{className:"recharts-label-list"},v.map((w,C)=>{var E,S=Jn(s)?n(w,C):ur(w&&w.payload,s),D=Jn(h)?{}:{id:"".concat(h,"-").concat(C)};return j.createElement(ka,_0({key:"label-".concat(C)},eo(w),p,D,{fill:(E=i.fill)!==null&&E!==void 0?E:w.fill,parentViewBox:w.parentViewBox,value:S,textBreakAll:f,viewBox:w.viewBox,index:C,zIndex:0}))})))}mg.displayName="LabelList";function Lke(e){var{label:n}=e;return n?n===!0?j.createElement(mg,{key:"labelList-implicit"}):j.isValidElement(n)||xC(n)?j.createElement(mg,{key:"labelList-implicit",content:n}):typeof n=="object"?j.createElement(mg,_0({key:"labelList-implicit"},n,{type:String(n.type)})):null:null}function T1(){return T1=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},T1.apply(null,arguments)}var K$=e=>{var{cx:n,cy:i,r:s,className:d}=e,h=pn("recharts-dot",d);return ht(n)&&ht(i)&&ht(s)?j.createElement("circle",T1({},No(e),Z_(e),{className:h,cx:n,cy:i,r:s})):null},Rke={radiusAxis:{},angleAxis:{}},Y$=hi({name:"polarAxis",initialState:Rke,reducers:{addRadiusAxis(e,n){e.radiusAxis[n.payload.id]=n.payload},removeRadiusAxis(e,n){delete e.radiusAxis[n.payload.id]},addAngleAxis(e,n){e.angleAxis[n.payload.id]=n.payload},removeAngleAxis(e,n){delete e.angleAxis[n.payload.id]}}}),{addRadiusAxis:rje,removeRadiusAxis:ije,addAngleAxis:oje,removeAngleAxis:sje}=Y$.actions,zke=Y$.reducer,Q$={exports:{}},sn={};/** 187 * @license React 188 * react-is.production.js 189 * 190 * Copyright (c) Meta Platforms, Inc. and affiliates. 191 * 192 * This source code is licensed under the MIT license found in the 193 * LICENSE file in the root directory of this source tree. 194 */var vC=Symbol.for("react.transitional.element"),wC=Symbol.for("react.portal"),$b=Symbol.for("react.fragment"),Vb=Symbol.for("react.strict_mode"),Ub=Symbol.for("react.profiler"),Wb=Symbol.for("react.consumer"),Hb=Symbol.for("react.context"),Gb=Symbol.for("react.forward_ref"),qb=Symbol.for("react.suspense"),Kb=Symbol.for("react.suspense_list"),Yb=Symbol.for("react.memo"),Qb=Symbol.for("react.lazy"),Fke=Symbol.for("react.view_transition"),$ke=Symbol.for("react.client.reference");function oo(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case vC:switch(e=e.type,e){case $b:case Ub:case Vb:case qb:case Kb:case Fke:return e;default:switch(e=e&&e.$$typeof,e){case Hb:case Gb:case Qb:case Yb:return e;case Wb:return e;default:return n}}case wC:return n}}}sn.ContextConsumer=Wb;sn.ContextProvider=Hb;sn.Element=vC;sn.ForwardRef=Gb;sn.Fragment=$b;sn.Lazy=Qb;sn.Memo=Yb;sn.Portal=wC;sn.Profiler=Ub;sn.StrictMode=Vb;sn.Suspense=qb;sn.SuspenseList=Kb;sn.isContextConsumer=function(e){return oo(e)===Wb};sn.isContextProvider=function(e){return oo(e)===Hb};sn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===vC};sn.isForwardRef=function(e){return oo(e)===Gb};sn.isFragment=function(e){return oo(e)===$b};sn.isLazy=function(e){return oo(e)===Qb};sn.isMemo=function(e){return oo(e)===Yb};sn.isPortal=function(e){return oo(e)===wC};sn.isProfiler=function(e){return oo(e)===Ub};sn.isStrictMode=function(e){return oo(e)===Vb};sn.isSuspense=function(e){return oo(e)===qb};sn.isSuspenseList=function(e){return oo(e)===Kb};sn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===$b||e===Ub||e===Vb||e===qb||e===Kb||typeof e=="object"&&e!==null&&(e.$$typeof===Qb||e.$$typeof===Yb||e.$$typeof===Hb||e.$$typeof===Wb||e.$$typeof===Gb||e.$$typeof===$ke||e.getModuleId!==void 0)};sn.typeOf=oo;Q$.exports=sn;var Vke=Q$.exports,QP=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",ZP=null,dv=null,Z$=e=>{if(e===ZP&&Array.isArray(dv))return dv;var n=[];
194return j.Children.forEach(e,i=>{Jn(i)||(Vke.isFragment(i)?n=n.concat(Z$(i.props.children)):n.push(i))}),dv=n,ZP=e,n};function aje(e,n){var i=[],s=[];return Array.isArray(n)?s=n.map(d=>QP(d)):s=[QP(n)],Z$(e).forEach(d=>{var h=Td(d,"type.displayName")||Td(d,"type.name");h&&s.indexOf(h)!==-1&&i.push(d)}),i}var J$=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function Uke(e){var{tooltipEntrySettings:n}=e,i=Un(),s=mi(),d=j.useRef(null);return j.useLayoutEffect(()=>{s||(d.current===null?i(jge(n)):d.current!==n&&i(Nge({prev:d.current,next:n})),d.current=n)},[n,i,s]),j.useLayoutEffect(()=>()=>{d.current&&(i(Ege(d.current)),d.current=null)},[i]),null}function Wke(e){var{legendPayload:n}=e,i=Un(),s=mi(),d=j.useRef(null);return j.useLayoutEffect(()=>{s||(d.current===null?i(XR(n)):d.current!==n&&i(ez({prev:d.current,next:n})),d.current=n)},[i,s,n]),j.useLayoutEffect(()=>()=>{d.current&&(i(tz(d.current)),d.current=null)},[i]),null}function lje(e){var{legendPayload:n}=e,i=Un(),s=yt(on),d=j.useRef(null);return j.useLayoutEffect(()=>{s!=="centric"&&s!=="radial"||(d.current===null?i(XR(n)):d.current!==n&&i(ez({prev:d.current,next:n})),d.current=n)},[i,s,n]),j.useLayoutEffect(()=>()=>{d.current&&(i(tz(d.current)),d.current=null)},[i]),null}var uv,Hke=()=>{var[e]=j.useState(()=>Gh("uid-"));return e},Gke=(uv=fB.useId)!==null&&uv!==void 0?uv:Hke;function qke(e,n){var i=Gke();return n||(e?"".concat(e,"-").concat(i):i)}var Kke=j.createContext(void 0),Yke=e=>{var{id:n,type:i,children:s}=e,d=qke("recharts-".concat(i),n);return j.createElement(Kke.Provider,{value:d},s(d))},Qke={cartesianItems:[],polarItems:[]},X$=hi({name:"graphicalItems",initialState:Qke,reducers:{addCartesianGraphicalItem:{reducer(e,n){e.cartesianItems.push(n.payload)},prepare:bn()},replaceCartesianGraphicalItem:{reducer(e,n){var{prev:i,next:s}=n.payload,d=Co(e).cartesianItems.indexOf(i);d>-1&&(e.cartesianItems[d]=s)},prepare:bn()},removeCartesianGraphicalItem:{reducer(e,n){var i=Co(e).cartesianItems.indexOf(n.payload);i>-1&&e.cartesianItems.splice(i,1)},prepare:bn()},addPolarGraphicalItem:{reducer(e,n){e.polarItems.push(n.payload)},prepare:bn()},removePolarGraphicalItem:{reducer(e,n){var i=Co(e).polarItems.indexOf(n.payload);i>-1&&e.polarItems.splice(i,1)},prepare:bn()}}}),{addCartesianGraphicalItem:Zke,replaceCartesianGraphicalItem:Jke,removeCartesianGraphicalItem:Xke,addPolarGraphicalItem:eye,removePolarGraphicalItem:tye}=X$.actions,nye=X$.reducer,rye=e=>{var n=Un(),i=j.useRef(null);return j.useLayoutEffect(()=>{i.current===null?n(Zke(e)):i.current!==e&&n(Jke({prev:i.current,next:e})),i.current=e},[n,e]),j.useLayoutEffect(()=>()=>{i.current&&(n(Xke(i.current)),i.current=null)},[n]),null},iye=j.memo(rye);function cje(e){var n=Un();return j.useLayoutEffect(()=>(n(eye(e)),()=>{n(tye(e))}),[n,e]),null}var oye=["points"];function JP(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function hv(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?JP(Object(i),!0).forEach(function(s){sye(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):JP(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function sye(e,n,i){return(n=aye(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function aye(e){var n=lye(e,"string");return typeof n=="symbol"?n:n+""}function lye(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function A0(){return A0=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},A0.apply(null,arguments)}function cye(e,n){if(e==null)return{};var i,s,d=dye(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function dye(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}function uye(e){var{option:n,dotProps:i,className:s}=e;if(j.isValidElement(n))return j.cloneElement(n,i);if(typeof n=="function")return n(i);var d=pn(s,typeof n!="boolean"?n.className:""),h=i??{},{points:f}=h,g=cye(h,oye);return j.createElement(K$,A0({},g,{className:d}))}function hye(e,n){return e==null?!1:n?!0:e.length===1}function mye(e){var{points:n,dot:i,className:s,dotClassName:d,dataKey:h,baseProps:f,needClip:g,clipPathId:p,zIndex:x=Ur.scatter}=e;if(!hye(n,i))return null;var y=J$(i),v=ile(i),w=n.map((E,S)=>{var D,I,M=hv(hv(hv({r:3},f),v),{},{index:S,cx:(D=E.x)!==null&&D!==void 0?D:void 0,cy:(I=E.y)!==null&&I!==void 0?I:void 0,dataKey:h,value:E.value,payload:E.payload,points:n});return j.createElement(uye,{key:"dot-".concat(S),option:i,dotProps:M,className:d})}),C={};return g&&p!=null&&(C.clipPath="url(#clipPath-".concat(y?"":"dots-").concat(p,")")),j.createElement(ea,{zIndex:x},j.createElement(ts,A0({className:s}
194,C),w))}function XP(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function e7(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?XP(Object(i),!0).forEach(function(s){fye(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):XP(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function fye(e,n,i){return(n=pye(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function pye(e){var n=gye(e,"string");return typeof n=="symbol"?n:n+""}function gye(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var eV=0,bye={xAxis:{},yAxis:{},zAxis:{}},tV=hi({name:"cartesianAxis",initialState:bye,reducers:{addXAxis:{reducer(e,n){e.xAxis[n.payload.id]=n.payload},prepare:bn()},replaceXAxis:{reducer(e,n){var{prev:i,next:s}=n.payload;e.xAxis[i.id]!==void 0&&(i.id!==s.id&&delete e.xAxis[i.id],e.xAxis[s.id]=s)},prepare:bn()},removeXAxis:{reducer(e,n){delete e.xAxis[n.payload.id]},prepare:bn()},addYAxis:{reducer(e,n){e.yAxis[n.payload.id]=n.payload},prepare:bn()},replaceYAxis:{reducer(e,n){var{prev:i,next:s}=n.payload;e.yAxis[i.id]!==void 0&&(i.id!==s.id&&delete e.yAxis[i.id],e.yAxis[s.id]=s)},prepare:bn()},removeYAxis:{reducer(e,n){delete e.yAxis[n.payload.id]},prepare:bn()},addZAxis:{reducer(e,n){e.zAxis[n.payload.id]=n.payload},prepare:bn()},replaceZAxis:{reducer(e,n){var{prev:i,next:s}=n.payload;e.zAxis[i.id]!==void 0&&(i.id!==s.id&&delete e.zAxis[i.id],e.zAxis[s.id]=s)},prepare:bn()},removeZAxis:{reducer(e,n){delete e.zAxis[n.payload.id]},prepare:bn()},updateYAxisWidth(e,n){var{id:i,width:s}=n.payload,d=e.yAxis[i];if(d){var h=d.widthHistory||[];if(h.length===3&&h[0]===h[2]&&s===h[1]&&s!==d.width&&Math.abs(s-h[0])<=1)return;var f=[...h,s].slice(-3);e.yAxis[i]=e7(e7({},e.yAxis[i]),{},{width:s,widthHistory:f})}}}}),{addXAxis:kye,replaceXAxis:yye,removeXAxis:xye,addYAxis:vye,replaceYAxis:wye,removeYAxis:_ye,addZAxis:dje,replaceZAxis:uje,removeZAxis:hje,updateYAxisWidth:Aye}=tV.actions,Cye=tV.reducer,jye=xe([Nr],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Nye=xe([jye,qs,Ks],(e,n,i)=>{if(!(!e||n==null||i==null))return{x:e.left,y:e.top,width:Math.max(0,n-e.left-e.right),height:Math.max(0,i-e.top-e.bottom)}}),_C=()=>yt(Nye),Eye=()=>yt(x0e);function t7(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function mv(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?t7(Object(i),!0).forEach(function(s){Sye(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t7(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function Sye(e,n,i){return(n=Dye(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Dye(e){var n=Tye(e,"string");return typeof n=="symbol"?n:n+""}function Tye(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var Iye=e=>{var{point:n,childIndex:i,mainColor:s,activeDot:d,dataKey:h,clipPath:f}=e;if(d===!1||n.x==null||n.y==null)return null;var g={index:i,dataKey:h,cx:n.x,cy:n.y,r:4,fill:s??"none",strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value},p=mv(mv(mv({},g),eb(d)),Z_(d)),x;return j.isValidElement(d)?x=j.cloneElement(d,p):typeof d=="function"?x=d(p):x=j.createElement(K$,p),j.createElement(ts,{className:"recharts-active-dot",clipPath:f},x)};function n7(e){var{points:n,mainColor:i,activeDot:s,itemDataKey:d,clipPath:h,zIndex:f=Ur.activeDot}=e,g=yt(om),p=Eye();if(n==null||p==null)return null;var x=n.find(y=>p.includes(y.payload));return Jn(x)?null:j.createElement(ea,{zIndex:f},j.createElement(Iye,{point:x,childIndex:Number(g),mainColor:i,dataKey:d,activeDot:s,clipPath:h}))}var Mye=e=>{var{chartData:n}=e,i=Un(),s=mi();return j.useEffect(()=>s?()=>{}:(i(IP(n)),()=>{i(IP(void 0))}),[n,i,s]),null},r7={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},nV=hi({name:"brush",initialState:r7,reducers:{setBrushSettings(e,n
194){return n.payload==null?r7:n.payload}}}),{setBrushSettings:mje}=nV.actions,Pye=nV.reducer;function Oye(e,n,i){return(n=Bye(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Bye(e){var n=Lye(e,"string");return typeof n=="symbol"?n:n+""}function Lye(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}class AC{static create(n){return new AC(n)}constructor(n){this.scale=n}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(n){var{bandAware:i,position:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n!==void 0){if(s)switch(s){case"start":return this.scale(n);case"middle":{var d=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+d}case"end":{var h=this.bandwidth?this.bandwidth():0;return this.scale(n)+h}default:return this.scale(n)}if(i){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+f}return this.scale(n)}}isInRange(n){var i=this.range(),s=i[0],d=i[i.length-1];return s<=d?n>=s&&n<=d:n>=d&&n<=s}}Oye(AC,"EPS",1e-4);function Rye(e){return(e%180+180)%180}var zye=function(n){var{width:i,height:s}=n,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,h=Rye(d),f=h*Math.PI/180,g=Math.atan(s/i),p=f>g&&f<Math.PI-g?s/Math.sin(f):i/Math.cos(f);return Math.abs(p)},Fye={dots:[],areas:[],lines:[]},rV=hi({name:"referenceElements",initialState:Fye,reducers:{addDot:(e,n)=>{e.dots.push(n.payload)},removeDot:(e,n)=>{var i=Co(e).dots.findIndex(s=>s===n.payload);i!==-1&&e.dots.splice(i,1)},addArea:(e,n)=>{e.areas.push(n.payload)},removeArea:(e,n)=>{var i=Co(e).areas.findIndex(s=>s===n.payload);i!==-1&&e.areas.splice(i,1)},addLine:(e,n)=>{e.lines.push(n.payload)},removeLine:(e,n)=>{var i=Co(e).lines.findIndex(s=>s===n.payload);i!==-1&&e.lines.splice(i,1)}}}),{addDot:fje,removeDot:pje,addArea:gje,removeArea:bje,addLine:kje,removeLine:yje}=rV.actions,$ye=rV.reducer,Vye=j.createContext(void 0),Uye=e=>{var{children:n}=e,[i]=j.useState("".concat(Gh("recharts"),"-clip")),s=_C();if(s==null)return null;var{x:d,y:h,width:f,height:g}=s;return j.createElement(Vye.Provider,{value:i},j.createElement("defs",null,j.createElement("clipPath",{id:i},j.createElement("rect",{x:d,y:h,height:g,width:f}))),n)};function iV(e,n){if(n<1)return[];if(n===1)return e;for(var i=[],s=0;s<e.length;s+=n){var d=e[s];d!==void 0&&i.push(d)}return i}function Wye(e,n,i){var s={width:e.width+n.width,height:e.height+n.height};return zye(s,i)}function Hye(e,n,i){var s=i==="width",{x:d,y:h,width:f,height:g}=e;return n===1?{start:s?d:h,end:s?d+f:h+g}:{start:s?d+f:h+g,end:s?d:h}}function am(e,n,i,s,d){if(e*n<e*s||e*n>e*d)return!1;var h=i();return e*(n-e*h/2-s)>=0&&e*(n+e*h/2-d)<=0}function Gye(e,n){return iV(e,n+1)}function qye(e,n,i,s,d){for(var h=(s||[]).slice(),{start:f,end:g}=n,p=0,x=1,y=f,v=function(){var E=s==null?void 0:s[p];if(E===void 0)return{v:iV(s,x)};var S=p,D,I=()=>(D===void 0&&(D=i(E,S)),D),M=E.coordinate,B=p===0||am(e,M,I,y,g);B||(p=0,y=f,x+=1),B&&(y=M+e*(I()/2+d),p+=x)},w;x<=h.length;)if(w=v(),w)return w.v;return[]}function Kye(e,n,i,s,d){var h=(s||[]).slice(),f=h.length;if(f===0)return[];for(var{start:g,end:p}=n,x=1;x<=f;x++){for(var y=(f-1)%x,v=g,w=!0,C=function(){var M=s[E],B=E,R,F=()=>(R===void 0&&(R=i(M,B)),R),V=M.coordinate,P=E===y||am(e,V,F,v,p);if(!P)return w=!1,1;P&&(v=V+e*(F()/2+d))},E=y;E<f&&!C();E+=x);if(w){for(var S=[],D=y;D<f;D+=x)S.push(s[D]);return S}}return[]}function i7(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Tr(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?i7(Object(i),!0).forEach(function(s){Yye(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):i7(Object(i)).forEac
194h(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function Yye(e,n,i){return(n=Qye(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function Qye(e){var n=Zye(e,"string");return typeof n=="symbol"?n:n+""}function Zye(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Jye(e,n,i,s,d){for(var h=(s||[]).slice(),f=h.length,{start:g}=n,{end:p}=n,x=function(w){var C=h[w],E,S=()=>(E===void 0&&(E=i(C,w)),E);if(w===f-1){var D=e*(C.coordinate+e*S()/2-p);h[w]=C=Tr(Tr({},C),{},{tickCoord:D>0?C.coordinate-D*e:C.coordinate})}else h[w]=C=Tr(Tr({},C),{},{tickCoord:C.coordinate});if(C.tickCoord!=null){var I=am(e,C.tickCoord,S,g,p);I&&(p=C.tickCoord-e*(S()/2+d),h[w]=Tr(Tr({},C),{},{isShow:!0}))}},y=f-1;y>=0;y--)x(y);return h}function Xye(e,n,i,s,d,h){var f=(s||[]).slice(),g=f.length,{start:p,end:x}=n;if(h){var y=s[g-1],v=i(y,g-1),w=e*(y.coordinate+e*v/2-x);if(f[g-1]=y=Tr(Tr({},y),{},{tickCoord:w>0?y.coordinate-w*e:y.coordinate}),y.tickCoord!=null){var C=am(e,y.tickCoord,()=>v,p,x);C&&(x=y.tickCoord-e*(v/2+d),f[g-1]=Tr(Tr({},y),{},{isShow:!0}))}}for(var E=h?g-1:g,S=function(M){var B=f[M],R,F=()=>(R===void 0&&(R=i(B,M)),R);if(M===0){var V=e*(B.coordinate-e*F()/2-p);f[M]=B=Tr(Tr({},B),{},{tickCoord:V<0?B.coordinate-V*e:B.coordinate})}else f[M]=B=Tr(Tr({},B),{},{tickCoord:B.coordinate});if(B.tickCoord!=null){var P=am(e,B.tickCoord,F,p,x);P&&(p=B.tickCoord+e*(F()/2+d),f[M]=Tr(Tr({},B),{},{isShow:!0}))}},D=0;D<E;D++)S(D);return f}function CC(e,n,i){var{tick:s,ticks:d,viewBox:h,minTickGap:f,orientation:g,interval:p,tickFormatter:x,unit:y,angle:v}=e;if(!d||!d.length||!s)return[];if(ht(p)||_m.isSsr){var w;return(w=Gye(d,ht(p)?p:0))!==null&&w!==void 0?w:[]}var C=[],E=g==="top"||g==="bottom"?"width":"height",S=y&&E==="width"?Ah(y,{fontSize:n,letterSpacing:i}):{width:0,height:0},D=(B,R)=>{var F=typeof x=="function"?x(B.value,R):B.value;return E==="width"?Wye(Ah(F,{fontSize:n,letterSpacing:i}),S,v):Ah(F,{fontSize:n,letterSpacing:i})[E]},I=d.length>=2?Yi(d[1].coordinate-d[0].coordinate):1,M=Hye(h,I,E);return p==="equidistantPreserveStart"?qye(I,M,D,d,f):p==="equidistantPreserveEnd"?Kye(I,M,D,d,f):(p==="preserveStart"||p==="preserveStartEnd"?C=Xye(I,M,D,d,f,p==="preserveStartEnd"):C=Jye(I,M,D,d,f),C.filter(B=>B.isShow))}var exe=e=>{var{ticks:n,label:i,labelGapWithTick:s=5,tickSize:d=0,tickMargin:h=0}=e,f=0;if(n){Array.from(n).forEach(y=>{if(y){var v=y.getBoundingClientRect();v.width>f&&(f=v.width)}});var g=i?i.getBoundingClientRect().width:0,p=d+h,x=f+p+g+(i?s:0);return Math.round(x)}return 0},txe=["axisLine","width","height","className","hide","ticks","axisType"];function nxe(e,n){if(e==null)return{};var i,s,d=rxe(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function rxe(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}function tc(){return tc=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},tc.apply(null,arguments)}function o7(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Rn(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?o7(Object(i),!0).forEach(function(s){ixe(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):o7(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function ixe(e,n,i){return(n=oxe(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function oxe(e){var n=sxe(e,"string");return typeof n=="symbol"?n:n+""}function sxe(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var Ts={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine
194:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:Ur.axis};function axe(e){var{x:n,y:i,width:s,height:d,orientation:h,mirror:f,axisLine:g,otherSvgProps:p}=e;if(!g)return null;var x=Rn(Rn(Rn({},p),No(g)),{},{fill:"none"});if(h==="top"||h==="bottom"){var y=+(h==="top"&&!f||h==="bottom"&&f);x=Rn(Rn({},x),{},{x1:n,y1:i+y*d,x2:n+s,y2:i+y*d})}else{var v=+(h==="left"&&!f||h==="right"&&f);x=Rn(Rn({},x),{},{x1:n+v*s,y1:i,x2:n+v*s,y2:i+d})}return j.createElement("line",tc({},x,{className:pn("recharts-cartesian-axis-line",Td(g,"className"))}))}function lxe(e,n,i,s,d,h,f,g,p){var x,y,v,w,C,E,S=g?-1:1,D=e.tickSize||f,I=ht(e.tickCoord)?e.tickCoord:e.coordinate;switch(h){case"top":x=y=e.coordinate,w=i+ +!g*d,v=w-S*D,E=v-S*p,C=I;break;case"left":v=w=e.coordinate,y=n+ +!g*s,x=y-S*D,C=x-S*p,E=I;break;case"right":v=w=e.coordinate,y=n+ +g*s,x=y+S*D,C=x+S*p,E=I;break;default:x=y=e.coordinate,w=i+ +g*d,v=w+S*D,E=v+S*p,C=I;break}return{line:{x1:x,y1:v,x2:y,y2:w},tick:{x:C,y:E}}}function cxe(e,n){switch(e){case"left":return n?"start":"end";case"right":return n?"end":"start";default:return"middle"}}function dxe(e,n){switch(e){case"left":case"right":return"middle";case"top":return n?"start":"end";default:return n?"end":"start"}}function uxe(e){var{option:n,tickProps:i,value:s}=e,d,h=pn(i.className,"recharts-cartesian-axis-tick-value");if(j.isValidElement(n))d=j.cloneElement(n,Rn(Rn({},i),{},{className:h}));else if(typeof n=="function")d=n(Rn(Rn({},i),{},{className:h}));else{var f="recharts-cartesian-axis-tick-value";typeof n!="boolean"&&(f=pn(f,n==null?void 0:n.className)),d=j.createElement(yC,tc({},i,{className:f}),s)}return d}var hxe=j.forwardRef((e,n)=>{var{ticks:i=[],tick:s,tickLine:d,stroke:h,tickFormatter:f,unit:g,padding:p,tickTextProps:x,orientation:y,mirror:v,x:w,y:C,width:E,height:S,tickSize:D,tickMargin:I,fontSize:M,letterSpacing:B,getTicksConfig:R,events:F,axisType:V}=e,P=CC(Rn(Rn({},R),{},{ticks:i}),M,B),z=cxe(y,v),W=dxe(y,v),K=No(R),G=eb(s),Z={};typeof d=="object"&&(Z=d);var se=Rn(Rn({},K),{},{fill:"none"},Z),ge=P.map(he=>Rn({entry:he},lxe(he,w,C,E,S,y,D,v,I))),Se=ge.map(he=>{var{entry:ee,line:le}=he;return j.createElement(ts,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(ee.value,"-").concat(ee.coordinate,"-").concat(ee.tickCoord)},d&&j.createElement("line",tc({},se,le,{className:pn("recharts-cartesian-axis-tick-line",Td(d,"className"))})))}),Ae=ge.map((he,ee)=>{var{entry:le,tick:je}=he,ve=Rn(Rn(Rn(Rn({textAnchor:z,verticalAnchor:W},K),{},{stroke:"none",fill:h},G),je),{},{index:ee,payload:le,visibleTicksCount:P.length,tickFormatter:f,padding:p},x);return j.createElement(ts,tc({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(le.value,"-").concat(le.coordinate,"-").concat(le.tickCoord)},Lle(F,le,ee)),s&&j.createElement(uxe,{option:s,tickProps:ve,value:"".concat(typeof f=="function"?f(le.value,ee):le.value).concat(g||"")}))});return j.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(V,"-ticks")},Ae.length>0&&j.createElement(ea,{zIndex:Ur.label},j.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(V,"-tick-labels"),ref:n},Ae)),Se.length>0&&j.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(V,"-tick-lines")},Se))}),mxe=j.forwardRef((e,n)=>{var{axisLine:i,width:s,height:d,className:h,hide:f,ticks:g,axisType:p}=e,x=nxe(e,txe),[y,v]=j.useState(""),[w,C]=j.useState(""),E=j.useRef(null);j.useImperativeHandle(n,()=>({getCalculatedWidth:()=>{var D;return exe({ticks:E.current,label:(D=e.labelRef)===null||D===void 0?void 0:D.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var S=j.useCallback(D=>{if(D){var I=D.getElementsByClassName("recharts-cartesian-axis-tick-value");E.current=I;var M=I[0];if(M){var B=window.getComputedStyle(M),R=B.fontSize,F=B.letterSpacing;(R!==y||F!==w)&&(v(R),C(F))}}},[y,w]);return f||s!=null&&s<=0||d!=null&&d<=0?null:j.createElement(ea,{zIndex:e.zIndex},j.createElement(ts,{className:pn("recharts-cartesian-axis",h)},j.createElement(axe,{x:e.x,y:e.y,width:s,height:d,orientation:e.orientation,mirror:e.mirror,axisLine
194:i,otherSvgProps:No(e)}),j.createElement(hxe,{ref:S,axisType:p,events:x,fontSize:y,getTicksConfig:e,height:e.height,letterSpacing:w,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:g,unit:e.unit,width:e.width,x:e.x,y:e.y}),j.createElement(bke,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},j.createElement(Nke,{label:e.label,labelRef:e.labelRef}),e.children)))}),jC=j.forwardRef((e,n)=>{var i=Bi(e,Ts);return j.createElement(mxe,tc({},i,{ref:n}))});jC.displayName="CartesianAxis";var fxe=["x1","y1","x2","y2","key"],pxe=["offset"],gxe=["xAxisId","yAxisId"],bxe=["xAxisId","yAxisId"];function s7(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function Mr(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?s7(Object(i),!0).forEach(function(s){kxe(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):s7(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function kxe(e,n,i){return(n=yxe(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function yxe(e){var n=xxe(e,"string");return typeof n=="symbol"?n:n+""}function xxe(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Ol(){return Ol=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Ol.apply(null,arguments)}function C0(e,n){if(e==null)return{};var i,s,d=vxe(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function vxe(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}var wxe=e=>{var{fill:n}=e;if(!n||n==="none")return null;var{fillOpacity:i,x:s,y:d,width:h,height:f,ry:g}=e;return j.createElement("rect",{x:s,y:d,ry:g,width:h,height:f,stroke:"none",fill:n,fillOpacity:i,className:"recharts-cartesian-grid-bg"})};function oV(e){var{option:n,lineItemProps:i}=e,s;if(j.isValidElement(n))s=j.cloneElement(n,i);else if(typeof n=="function")s=n(i);else{var d,{x1:h,y1:f,x2:g,y2:p,key:x}=i,y=C0(i,fxe),v=(d=No(y))!==null&&d!==void 0?d:{},{offset:w}=v,C=C0(v,pxe);s=j.createElement("line",Ol({},C,{x1:h,y1:f,x2:g,y2:p,fill:"none",key:x}))}return s}function _xe(e){var{x:n,width:i,horizontal:s=!0,horizontalPoints:d}=e;if(!s||!d||!d.length)return null;var{xAxisId:h,yAxisId:f}=e,g=C0(e,gxe),p=d.map((x,y)=>{var v=Mr(Mr({},g),{},{x1:n,y1:x,x2:n+i,y2:x,key:"line-".concat(y),index:y});return j.createElement(oV,{key:"line-".concat(y),option:s,lineItemProps:v})});return j.createElement("g",{className:"recharts-cartesian-grid-horizontal"},p)}function Axe(e){var{y:n,height:i,vertical:s=!0,verticalPoints:d}=e;if(!s||!d||!d.length)return null;var{xAxisId:h,yAxisId:f}=e,g=C0(e,bxe),p=d.map((x,y)=>{var v=Mr(Mr({},g),{},{x1:x,y1:n,x2:x,y2:n+i,key:"line-".concat(y),index:y});return j.createElement(oV,{option:s,lineItemProps:v,key:"line-".concat(y)})});return j.createElement("g",{className:"recharts-cartesian-grid-vertical"},p)}function Cxe(e){var{horizontalFill:n,fillOpacity:i,x:s,y:d,width:h,height:f,horizontalPoints:g,horizontal:p=!0}=e;if(!p||!n||!n.length||g==null)return null;var x=g.map(v=>Math.round(v+d-d)).sort((v,w)=>v-w);d!==x[0]&&x.unshift(0);var y=x.map((v,w)=>{var C=!x[w+1],E=C?d+f-v:x[w+1]-v;if(E<=0)return null;var S=w%n.length;return j.createElement("rect",{key:"react-".concat(w),y:v,x:s,height:E,width:h,stroke:"none",fill:n[S],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},y)}function jxe(e){var{vertical:n=!0,verticalFill:i,fillOpacity:s,x:d,y:h,width:f,height:g,verticalPoints:p}=e;if(!n||!i||!i.length)return null;var x=p.map(v=>Math.round(v+d-d)).sort((v,w)=>v-w);d!==x[0]&&x.unshift(0);var y=x.map((v,w)=>{var C=!x[w+1],E=C?d+f-v:x[w+1]-v;if(E<=0)return null;var S=w%i.length;return j.createElement("rect",{key:"react-".concat(w),x:v,y:h,width:E,height:g,stroke:"none",fill:i[S],fillOpacity:s,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},y)}var Nxe=(e,n)=>{var{xAxis:i,width:s,height:d,offset:h}=e;return TR(CC(Mr(Mr(Mr({},Ts),i),{}
194,{ticks:IR(i),viewBox:{x:0,y:0,width:s,height:d}})),h.left,h.left+h.width,n)},Exe=(e,n)=>{var{yAxis:i,width:s,height:d,offset:h}=e;return TR(CC(Mr(Mr(Mr({},Ts),i),{},{ticks:IR(i),viewBox:{x:0,y:0,width:s,height:d}})),h.top,h.top+h.height,n)},Sxe={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Ur.grid};function sV(e){var n=WR(),i=HR(),s=UR(),d=Mr(Mr({},Bi(e,Sxe)),{},{x:ht(e.x)?e.x:s.left,y:ht(e.y)?e.y:s.top,width:ht(e.width)?e.width:s.width,height:ht(e.height)?e.height:s.height}),{xAxisId:h,yAxisId:f,x:g,y:p,width:x,height:y,syncWithTicks:v,horizontalValues:w,verticalValues:C}=d,E=mi(),S=yt(W=>vP(W,"xAxis",h,E)),D=yt(W=>vP(W,"yAxis",f,E));if(!rs(x)||!rs(y)||!ht(g)||!ht(p))return null;var I=d.verticalCoordinatesGenerator||Nxe,M=d.horizontalCoordinatesGenerator||Exe,{horizontalPoints:B,verticalPoints:R}=d;if((!B||!B.length)&&typeof M=="function"){var F=w&&w.length,V=M({yAxis:D?Mr(Mr({},D),{},{ticks:F?w:D.ticks}):void 0,width:n??x,height:i??y,offset:s},F?!0:v);t0(Array.isArray(V),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof V,"]")),Array.isArray(V)&&(B=V)}if((!R||!R.length)&&typeof I=="function"){var P=C&&C.length,z=I({xAxis:S?Mr(Mr({},S),{},{ticks:P?C:S.ticks}):void 0,width:n??x,height:i??y,offset:s},P?!0:v);t0(Array.isArray(z),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof z,"]")),Array.isArray(z)&&(R=z)}return j.createElement(ea,{zIndex:d.zIndex},j.createElement("g",{className:"recharts-cartesian-grid"},j.createElement(wxe,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),j.createElement(Cxe,Ol({},d,{horizontalPoints:B})),j.createElement(jxe,Ol({},d,{verticalPoints:R})),j.createElement(_xe,Ol({},d,{offset:s,horizontalPoints:B,xAxis:S,yAxis:D})),j.createElement(Axe,Ol({},d,{offset:s,verticalPoints:R,xAxis:S,yAxis:D}))))}sV.displayName="CartesianGrid";var Dxe={},aV=hi({name:"errorBars",initialState:Dxe,reducers:{addErrorBar:(e,n)=>{var{itemId:i,errorBar:s}=n.payload;e[i]||(e[i]=[]),e[i].push(s)},replaceErrorBar:(e,n)=>{var{itemId:i,prev:s,next:d}=n.payload;e[i]&&(e[i]=e[i].map(h=>h.dataKey===s.dataKey&&h.direction===s.direction?d:h))},removeErrorBar:(e,n)=>{var{itemId:i,errorBar:s}=n.payload;e[i]&&(e[i]=e[i].filter(d=>d.dataKey!==s.dataKey||d.direction!==s.direction))}}}),{addErrorBar:xje,replaceErrorBar:vje,removeErrorBar:wje}=aV.actions,Txe=aV.reducer;function lV(e,n){var i,s,d=yt(x=>Zs(x,e)),h=yt(x=>Js(x,n)),f=(i=d==null?void 0:d.allowDataOverflow)!==null&&i!==void 0?i:sr.allowDataOverflow,g=(s=h==null?void 0:h.allowDataOverflow)!==null&&s!==void 0?s:ar.allowDataOverflow,p=f||g;return{needClip:p,needClipX:f,needClipY:g}}function Ixe(e){var{xAxisId:n,yAxisId:i,clipPathId:s}=e,d=_C(),{needClipX:h,needClipY:f,needClip:g}=lV(n,i);if(!g||!d)return null;var{x:p,y:x,width:y,height:v}=d;return j.createElement("clipPath",{id:"clipPath-".concat(s)},j.createElement("rect",{x:h?p:p-y/2,y:f?x:x-v/2,width:h?y:y*2,height:f?v:v*2}))}function Mxe(e){var n=eb(e),i=3,s=2;if(n!=null){var{r:d,strokeWidth:h}=n,f=Number(d),g=Number(h);return(Number.isNaN(f)||f<0)&&(f=i),(Number.isNaN(g)||g<0)&&(g=s),{r:f,strokeWidth:g}}return{r:i,strokeWidth:s}}var Pxe={};/** 195 * @license React 196 * use-sync-external-store-with-selector.production.js 197 * 198 * Copyright (c) Meta Platforms, Inc. and affiliates. 199 * 200 * This source code is licensed under the MIT license found in the 201 * LICENSE file in the root directory of this source tree. 202 */var Bm=j;function Oxe(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Bxe=typeof Object.is=="function"?Object.is:Oxe,Lxe=Bm.useSyncExternalStore,Rxe=Bm.useRef,zxe=Bm.useEffect,Fxe=Bm.useMemo,$xe=Bm.useDebugValue;Pxe.useSyncExternalStoreWithSelector=function(e,n,i,s,d){var h=Rxe(null);if(h.current===null){var f={hasValue:!1,value:null};h.current=f}else f=h.current;h=Fxe(function(){function p(C){if(!x){if(x=!0,y=C,C=s(C),d!==void 0&&f.hasValue){var E=f.value;if(d(E,C))return v=E}return v=C}if(E=v,Bxe(y,C))return E;var S=s(C);return d!==void 0&&d(E,S)?(y=C,E):(y=C,v=S)}var x=!1,y,v,w=i===void 0?null:i;return[function(){return p(n())},w===null?void 0:function(){return p(w())}]},[n,i,s,d]);var g=Lxe(e,h[0],h[1]);return zxe(function(){f.hasValue=!0,f.value=g},[g]),$xe(g),g};function Vxe(e){e()}function Uxe(){let e=null,n=null;return{clear(){e=null,n=null},notify(){Vxe(()=>{let i=e;for(;i;)i.callback(),i=i.next})},get(){const i=[];let s=e;for(;s;)i.push(s),s=s.next;return i},subscribe(i){let s=!0;const d=n={callback:i,next:null,prev:n};return d.prev?d.prev.next=d:e=d,function(){!s||e===null||(s=!1,d.next?d.next.prev=d.prev:n=d.prev,d.prev?d.prev.next=d.next:e=d.next)}}}}var a7={notify(){},get:()=>[]};function Wxe(e,n){let i,s=a7,d=0,h=!1;function f(S){y();const D=s.subscribe(S);let I=!1;return()=>{I||(I=!0,D(),v())}}function g(){s.notify()}function p(){E.onStateChange&&E.onStateChange()}function x(){return h}function y(){d++,i||(i=e.subscribe(p),s=Uxe())}function v(){d--,i&&d===0&&(i(),i=void 0,s.clear(),s=a7)}function w(){h||(h=!0,y())}function C(){h&&(h=!1,v())}const E={addNestedSub:f,notifyNestedSubs:g,handleChangeWrapper:p,isSubscribed:x,trySubscribe:w,tryUnsubscribe:C,getListeners:()=>s};return E}var Hxe=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gxe=Hxe(),qxe=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Kxe=qxe(),Yxe=()=>Gxe||Kxe?j.useLayoutEffect:j.useEffect,Qxe=Yxe();function l7(e,n){return e===n?e!==0||n!==0||1/e===1/n:e!==e&&n!==n}function Zxe(e,n){if(l7(e,n))return!0;
202if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;const i=Object.keys(e),s=Object.keys(n);if(i.length!==s.length)return!1;for(let d=0;d<i.length;d++)if(!Object.prototype.hasOwnProperty.call(n,i[d])||!l7(e[i[d]],n[i[d]]))return!1;return!0}var fv=Symbol.for("react-redux-context"),pv=typeof globalThis<"u"?globalThis:{};function Jxe(){if(!j.createContext)return{};const e=pv[fv]??(pv[fv]=new Map);let n=e.get(j.createContext);return n||(n=j.createContext(null),e.set(j.createContext,n)),n}var Xxe=Jxe();function eve(e){const{children:n,context:i,serverState:s,store:d}=e,h=j.useMemo(()=>{const p=Wxe(d);return{store:d,subscription:p,getServerState:s?()=>s:void 0}},[d,s]),f=j.useMemo(()=>d.getState(),[d]);Qxe(()=>{const{subscription:p}=h;return p.onStateChange=p.notifyNestedSubs,p.trySubscribe(),f!==d.getState()&&p.notifyNestedSubs(),()=>{p.tryUnsubscribe(),p.onStateChange=void 0}},[h,f]);const g=i||Xxe;return j.createElement(g.Provider,{value:h},n)}var tve=eve,nve=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius"]);function rve(e,n){return e==null&&n==null?!0:typeof e=="number"&&typeof n=="number"?e===n||e!==e&&n!==n:e===n}function NC(e,n){var i=new Set([...Object.keys(e),...Object.keys(n)]);for(var s of i)if(nve.has(s)){if(e[s]==null&&n[s]==null)continue;if(!Zxe(e[s],n[s]))return!1}else if(!rve(e[s],n[s]))return!1;return!0}function EC(e,n){var i,s;return(i=(s=e.graphicalItems.cartesianItems.find(d=>d.id===n))===null||s===void 0?void 0:s.xAxisId)!==null&&i!==void 0?i:eV}function SC(e,n){var i,s;return(i=(s=e.graphicalItems.cartesianItems.find(d=>d.id===n))===null||s===void 0?void 0:s.yAxisId)!==null&&i!==void 0?i:eV}var cV=(e,n,i)=>r$(e,"xAxis",EC(e,n),i),dV=(e,n,i)=>n$(e,"xAxis",EC(e,n),i),uV=(e,n,i)=>r$(e,"yAxis",SC(e,n),i),hV=(e,n,i)=>n$(e,"yAxis",SC(e,n),i),ive=xe([on,cV,uV,dV,hV],(e,n,i,s,d)=>Gs(e,"xAxis")?e0(n,s,!1):e0(i,d,!1)),ove=(e,n)=>n,mV=xe([wF,ove],(e,n)=>e.filter(i=>i.type==="area").find(i=>i.id===n)),fV=e=>{var n=on(e),i=Gs(n,"xAxis");return i?"yAxis":"xAxis"},sve=(e,n)=>{var i=fV(e);return i==="yAxis"?SC(e,n):EC(e,n)},ave=(e,n,i)=>TF(e,fV(e),sve(e,n),i),lve=xe([mV,ave],(e,n)=>{var i;if(!(e==null||n==null)){var{stackId:s}=e,d=JA(e);if(!(s==null||d==null)){var h=(i=n[s])===null||i===void 0?void 0:i.stackedData,f=h==null?void 0:h.find(g=>g.key===d);if(f!=null)return f.map(g=>[g[0],g[1]])}}}),cve=xe([on,cV,uV,dV,hV,lve,spe,ive,mV,ype],(e,n,i,s,d,h,f,g,p,x)=>{var{chartData:y,dataStartIndex:v,dataEndIndex:w}=f;if(!(p==null||e!=="horizontal"&&e!=="vertical"||n==null||i==null||s==null||d==null||s.length===0||d.length===0||g==null)){var{data:C}=p,E;if(C&&C.length>0?E=C:E=y==null?void 0:y.slice(v,w+1),E!=null)return Eve({layout:e,xAxis:n,yAxis:i,xAxisTicks:s,yAxisTicks:d,dataStartIndex:v,areaSettings:p,stackedData:h,displayedData:E,chartBaseValue:x,bandSize:g})}}),dve=["id"],uve=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function Vl(){return Vl=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Vl.apply(null,arguments)}function pV(e,n){if(e==null)return{};var i,s,d=hve(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function hve(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}function c7(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function dd(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};
202n%2?c7(Object(i),!0).forEach(function(s){mve(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):c7(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function mve(e,n,i){return(n=fve(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function fve(e){var n=pve(e,"string");return typeof n=="symbol"?n:n+""}function pve(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function j0(e,n){return e&&e!=="none"?e:n}var gve=e=>{var{dataKey:n,name:i,stroke:s,fill:d,legendType:h,hide:f}=e;return[{inactive:f,dataKey:n,type:h,color:j0(s,d),value:MR(i,n),payload:e}]},bve=j.memo(e=>{var{dataKey:n,data:i,stroke:s,strokeWidth:d,fill:h,name:f,hide:g,unit:p,tooltipType:x,id:y}=e,v={dataDefinedOnItem:i,positions:void 0,settings:{stroke:s,strokeWidth:d,fill:h,dataKey:n,nameKey:void 0,name:MR(f,n),hide:g,type:x,color:j0(s,h),unit:p,graphicalItemId:y}};return j.createElement(Uke,{tooltipEntrySettings:v})});function kve(e){var{clipPathId:n,points:i,props:s}=e,{needClip:d,dot:h,dataKey:f}=s,g=No(s);return j.createElement(mye,{points:i,dot:h,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:f,baseProps:g,needClip:d,clipPathId:n})}function yve(e){var{showLabels:n,children:i,points:s}=e,d=s.map(h=>{var f,g,p={x:(f=h.x)!==null&&f!==void 0?f:0,y:(g=h.y)!==null&&g!==void 0?g:0,width:0,lowerWidth:0,upperWidth:0,height:0};return dd(dd({},p),{},{value:h.value,payload:h.payload,parentViewBox:void 0,viewBox:p,fill:void 0})});return j.createElement(Pke,{value:n?d:void 0},i)}function d7(e){var{points:n,baseLine:i,needClip:s,clipPathId:d,props:h}=e,{layout:f,type:g,stroke:p,connectNulls:x,isRange:y}=h,{id:v}=h,w=pV(h,dve),C=No(w),E=eo(w);return j.createElement(j.Fragment,null,(n==null?void 0:n.length)>1&&j.createElement(ts,{clipPath:s?"url(#clipPath-".concat(d,")"):void 0},j.createElement(ug,Vl({},E,{id:v,points:n,connectNulls:x,type:g,baseLine:i,layout:f,stroke:"none",className:"recharts-area-area"})),p!=="none"&&j.createElement(ug,Vl({},C,{className:"recharts-area-curve",layout:f,type:g,connectNulls:x,fill:"none",points:n})),p!=="none"&&y&&j.createElement(ug,Vl({},C,{className:"recharts-area-curve",layout:f,type:g,connectNulls:x,fill:"none",points:i}))),j.createElement(kve,{points:n,props:w,clipPathId:d}))}function xve(e){var n,i,{alpha:s,baseLine:d,points:h,strokeWidth:f}=e,g=(n=h[0])===null||n===void 0?void 0:n.y,p=(i=h[h.length-1])===null||i===void 0?void 0:i.y;if(!xn(g)||!xn(p))return null;var x=s*Math.abs(g-p),y=Math.max(...h.map(v=>v.x||0));return ht(d)?y=Math.max(d,y):d&&Array.isArray(d)&&d.length&&(y=Math.max(...d.map(v=>v.x||0),y)),ht(y)?j.createElement("rect",{x:0,y:g<p?g:g-x,width:y+(f?parseInt("".concat(f),10):1),height:Math.floor(x)}):null}function vve(e){var n,i,{alpha:s,baseLine:d,points:h,strokeWidth:f}=e,g=(n=h[0])===null||n===void 0?void 0:n.x,p=(i=h[h.length-1])===null||i===void 0?void 0:i.x;if(!xn(g)||!xn(p))return null;var x=s*Math.abs(g-p),y=Math.max(...h.map(v=>v.y||0));return ht(d)?y=Math.max(d,y):d&&Array.isArray(d)&&d.length&&(y=Math.max(...d.map(v=>v.y||0),y)),ht(y)?j.createElement("rect",{x:g<p?g:g-x,y:0,width:x,height:Math.floor(y+(f?parseInt("".concat(f),10):1))}):null}function wve(e){var{alpha:n,layout:i,points:s,baseLine:d,strokeWidth:h}=e;return i==="vertical"?j.createElement(xve,{alpha:n,points:s,baseLine:d,strokeWidth:h}):j.createElement(vve,{alpha:n,points:s,baseLine:d,strokeWidth:h})}function _ve(e){var{needClip:n,clipPathId:i,props:s,previousPointsRef:d,previousBaselineRef:h}=e,{points:f,baseLine:g,isAnimationActive:p,animationBegin:x,animationDuration:y,animationEasing:v,onAnimationStart:w,onAnimationEnd:C}=s,E=j.useMemo(()=>({points:f,baseLine:g}),[f,g]),S=az(E,"recharts-area-"),D=Qde(),[I,M]=j.useState(!1),B=!I,R=j.useCallback(()=>{typeof C=="function"&&C(),M(!1)},[C]),F=j.useCallback(()=>{typeof w=="function"&&w(),M(!0)},[w]);if(D==null)return null;var V=d.current,P=h.current;return j.createElement(yve,{showLabels:B,points:f},s.children,j.createElement(sz,{animationId:S,begin:x,duration:y,isActive:p,easing:v,onAnimationEnd:R,onAnimationStart:F,key:S},z=>{if(V){var W=V.length/f.length,K=z===1?f:f.map((Z,se)=>{var ge=Math.floor(se*W);if(V[ge]){var Se=V[ge];return dd(dd({},Z),{},{x:Ko(Se.x,Z.x,z),y:Ko(Se.y,Z.y,z)})}return Z}),G;return ht(g)?G=Ko(P,g,z):Jn(g)||Eo(g)?G=Ko(P,0,z):G=g.map((Z,se)=>{var ge=Math.floor(se*W);if(Array.isArray(P)&&P[ge]){var Se=P[ge];return dd(dd({},Z),{},{x:Ko(Se.x,Z.x,z),y:Ko(Se.y,Z.y,z)})}return Z}),z>0&&(d.current=K,h.current=G),j.createElement(d7,{points:K,baseLine:G,needClip:n,clipPathId:i,props:s})}return z>0&&(d.current=f,h.current=g),j.createElement(ts,null,p&&j.createElement("defs",null,j.createElement("clipPath",{id:"animationClipPath-".concat(i)}
202,j.createElement(wve,{alpha:z,points:f,baseLine:g,layout:D,strokeWidth:s.strokeWidth}))),j.createElement(ts,{clipPath:"url(#animationClipPath-".concat(i,")")},j.createElement(d7,{points:f,baseLine:g,needClip:n,clipPathId:i,props:s})))}),j.createElement(Lke,{label:s.label}))}function Ave(e){var{needClip:n,clipPathId:i,props:s}=e,d=j.useRef(null),h=j.useRef();return j.createElement(_ve,{needClip:n,clipPathId:i,props:s,previousPointsRef:d,previousBaselineRef:h})}class Cve extends j.PureComponent{render(){var{hide:n,dot:i,points:s,className:d,top:h,left:f,needClip:g,xAxisId:p,yAxisId:x,width:y,height:v,id:w,baseLine:C,zIndex:E}=this.props;if(n)return null;var S=pn("recharts-area",d),D=w,{r:I,strokeWidth:M}=Mxe(i),B=J$(i),R=I*2+M,F=g?"url(#clipPath-".concat(B?"":"dots-").concat(D,")"):void 0;return j.createElement(ea,{zIndex:E},j.createElement(ts,{className:S},g&&j.createElement("defs",null,j.createElement(Ixe,{clipPathId:D,xAxisId:p,yAxisId:x}),!B&&j.createElement("clipPath",{id:"clipPath-dots-".concat(D)},j.createElement("rect",{x:f-R/2,y:h-R/2,width:y+R,height:v+R}))),j.createElement(Ave,{needClip:g,clipPathId:D,props:this.props})),j.createElement(n7,{points:s,mainColor:j0(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:F}),this.props.isRange&&Array.isArray(C)&&j.createElement(n7,{points:C,mainColor:j0(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:F}))}}var gV={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:Ur.area};function jve(e){var n,i=Bi(e,gV),{activeDot:s,animationBegin:d,animationDuration:h,animationEasing:f,connectNulls:g,dot:p,fill:x,fillOpacity:y,hide:v,isAnimationActive:w,legendType:C,stroke:E,xAxisId:S,yAxisId:D}=i,I=pV(i,uve),M=Hd(),B=A$(),{needClip:R}=lV(S,D),F=mi(),{points:V,isRange:P,baseLine:z}=(n=yt(ge=>cve(ge,e.id,F)))!==null&&n!==void 0?n:{},W=_C();if(M!=="horizontal"&&M!=="vertical"||W==null||B!=="AreaChart"&&B!=="ComposedChart")return null;var{height:K,width:G,x:Z,y:se}=W;return!V||!V.length?null:j.createElement(Cve,Vl({},I,{activeDot:s,animationBegin:d,animationDuration:h,animationEasing:f,baseLine:z,connectNulls:g,dot:p,fill:x,fillOpacity:y,height:K,hide:v,layout:M,isAnimationActive:w==="auto"?!_m.isSsr:w,isRange:P,legendType:C,needClip:R,points:V,stroke:E,width:G,left:Z,top:se,xAxisId:S,yAxisId:D}))}var Nve=(e,n,i,s,d)=>{var h=i??n;if(ht(h))return h;var f=e==="horizontal"?d:s,g=f.scale.domain();if(f.type==="number"){var p=Math.max(g[0],g[1]),x=Math.min(g[0],g[1]);return h==="dataMin"?x:h==="dataMax"||p<0?p:Math.max(Math.min(g[0],g[1]),0)}return h==="dataMin"?g[0]:h==="dataMax"?g[1]:g[0]};function Eve(e){var{areaSettings:{connectNulls:n,baseValue:i,dataKey:s},stackedData:d,layout:h,chartBaseValue:f,xAxis:g,yAxis:p,displayedData:x,dataStartIndex:y,xAxisTicks:v,yAxisTicks:w,bandSize:C}=e,E=d&&d.length,S=Nve(h,f,i,g,p),D=h==="horizontal",I=!1,M=x.map((R,F)=>{var V,P,z;if(E)z=d[y+F];else{var W=ur(R,s);Array.isArray(W)?(z=W,I=!0):z=[S,W]}var K=(V=(P=z)===null||P===void 0?void 0:P[1])!==null&&V!==void 0?V:null,G=K==null||E&&!n&&ur(R,s)==null;return D?{x:OM({axis:g,ticks:v,bandSize:C,entry:R,index:F}),y:G?null:p.scale(K),value:z,payload:R}:{x:G?null:g.scale(K),y:OM({axis:p,ticks:w,bandSize:C,entry:R,index:F}),value:z,payload:R}}),B;return E||I?B=M.map(R=>{var F=Array.isArray(R.value)?R.value[0]:null;return D?{x:R.x,y:F!=null&&R.y!=null?p.scale(F):null,payload:R.payload}:{x:F!=null?g.scale(F):null,y:R.y,payload:R.payload}}):B=D?p.scale(S):g.scale(S),{points:M,baseLine:B,isRange:I}}function Sve(e){var n=Bi(e,gV),i=mi();return j.createElement(Yke,{id:n.id,type:"area"},s=>j.createElement(j.Fragment,null,j.createElement(Wke,{legendPayload:gve(n)}),j.createElement(bve,{dataKey:n.dataKey,data:n.data,stroke:n.stroke,strokeWidth:n.strokeWidth,fill:n.fill,name:n.name,hide:n.hide,unit:n.unit,tooltipType:n.tooltipType,id:s}),j.createElement(iye,{type:"area",id:s,data:n.data,dataKey:n.dataKey,xAxisId:n.xAxisId,yAxisId:n.yAxisId,zAxisId:0,stackId:gde(n.stackId),hide:n.hide,barSize:void 0,baseValue:n.baseValue,isPanorama:i,connectNulls:n.connectNulls}),j.createElement(jve,Vl({},n,{id:s}))))}var fg=j.memo(Sve,NC);fg.displayName="Area";var Dve=["domain","range"],Tve=["domain","range"];function u7(e,n){if(e==null)return{};var i,s,d=Ive(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function Ive(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}function h7(e,n){return e===n?!0:Array.isArray(e)&&e.length===2&&Array.isArray(n)&&n.length===2?e[0]===n[0]&&e[1]===n[1]:!1}function bV(e,n){if(e===n)return!0;var{domain:i,range:s}=e,d=u7(e,Dve),{domain:h,range:f}=n,g=u7(n,Tve);return!h7(i,h)||!h7(s,f)?!1:NC(d,g)}var Mve=["dangerouslySetInnerHTML","ticks","scale"],Pve=["id","scale"];function I1(){return I1=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},I1.apply(null,arguments)}function m7(e,n){if(e==null)return{};var i,s,d=Ove(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function Ove(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}function Bve(e){var n=Un(),i=j.useRef(null);return j.useLayoutEffect(()=>{i.current===null?n(kye(e)):i.current!==e&&n(yye({prev:i.current,next:e})),i.current=e},[e,n]),j.useLayoutEffect(()=>()=>{i.current&&(n(xye(i.current)),i.current=null)},[n]),null}var Lve=e=>{var{xAxisId:n,className:i}=e,s=yt(OR),d=mi(),h="xAxis",f=yt(I=>t$(I,h,n,d)),g=yt(I=>ZF(I,n)),p=yt(I=>gge(I,n)),x=yt(I=>kF(I,n));if(g==null||p==null||x==null)return null;var{dangerouslySetInnerHTML:y,ticks:v,scale:w}=e,C=m7(e,Mve),{id:E,scale:S}=x,D=m7(x,Pve);return j.createElement(jC,I1({},C,D,{x:p.x,y:p.y,width:g.width,height:g.height,className:pn("recharts-".concat(h," ").concat(h),i),viewBox:s,ticks:f,axisType:h}))},Rve={allowDataOverflow:sr.allowDataOverflow,allowDecimals:sr.allowDecimals,allowDuplicatedCategory:sr.allowDuplicatedCategory,angle:sr.angle,axisLine
202:Ts.axisLine,height:sr.height,hide:!1,includeHidden:sr.includeHidden,interval:sr.interval,minTickGap:sr.minTickGap,mirror:sr.mirror,orientation:sr.orientation,padding:sr.padding,reversed:sr.reversed,scale:sr.scale,tick:sr.tick,tickCount:sr.tickCount,tickLine:Ts.tickLine,tickSize:Ts.tickSize,type:sr.type,xAxisId:0},zve=e=>{var n=Bi(e,Rve);return j.createElement(j.Fragment,null,j.createElement(Bve,{allowDataOverflow:n.allowDataOverflow,allowDecimals:n.allowDecimals,allowDuplicatedCategory:n.allowDuplicatedCategory,angle:n.angle,dataKey:n.dataKey,domain:n.domain,height:n.height,hide:n.hide,id:n.xAxisId,includeHidden:n.includeHidden,interval:n.interval,minTickGap:n.minTickGap,mirror:n.mirror,name:n.name,orientation:n.orientation,padding:n.padding,reversed:n.reversed,scale:n.scale,tick:n.tick,tickCount:n.tickCount,tickFormatter:n.tickFormatter,ticks:n.ticks,type:n.type,unit:n.unit}),j.createElement(Lve,n))},kV=j.memo(zve,bV);kV.displayName="XAxis";var Fve=["dangerouslySetInnerHTML","ticks","scale"],$ve=["id","scale"];function M1(){return M1=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},M1.apply(null,arguments)}function f7(e,n){if(e==null)return{};var i,s,d=Vve(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function Vve(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}function Uve(e){var n=Un(),i=j.useRef(null);return j.useLayoutEffect(()=>{i.current===null?n(vye(e)):i.current!==e&&n(wye({prev:i.current,next:e})),i.current=e},[e,n]),j.useLayoutEffect(()=>()=>{i.current&&(n(_ye(i.current)),i.current=null)},[n]),null}var Wve=e=>{var{yAxisId:n,className:i,width:s,label:d}=e,h=j.useRef(null),f=j.useRef(null),g=yt(OR),p=mi(),x=Un(),y="yAxis",v=yt(V=>JF(V,n)),w=yt(V=>kge(V,n)),C=yt(V=>t$(V,y,n,p)),E=yt(V=>yF(V,n));if(j.useLayoutEffect(()=>{if(!(s!=="auto"||!v||xC(d)||j.isValidElement(d)||E==null)){var V=h.current;if(V){var P=V.getCalculatedWidth();Math.round(v.width)!==Math.round(P)&&x(Aye({id:n,width:P}))}}},[C,v,x,d,n,s,E]),v==null||w==null||E==null)return null;var{dangerouslySetInnerHTML:S,ticks:D,scale:I}=e,M=f7(e,Fve),{id:B,scale:R}=E,F=f7(E,$ve);return j.createElement(jC,M1({},M,F,{ref:h,labelRef:f,x:w.x,y:w.y,tickTextProps:s==="auto"?{width:void 0}:{width:s},width:v.width,height:v.height,className:pn("recharts-".concat(y," ").concat(y),i),viewBox:g,ticks:C,axisType:y}))},Hve={allowDataOverflow:ar.allowDataOverflow,allowDecimals:ar.allowDecimals,allowDuplicatedCategory:ar.allowDuplicatedCategory,angle:ar.angle,axisLine:Ts.axisLine,hide:!1,includeHidden:ar.includeHidden,interval:ar.interval,minTickGap:ar.minTickGap,mirror:ar.mirror,orientation:ar.orientation,padding:ar.padding,reversed:ar.reversed,scale:ar.scale,tick:ar.tick,tickCount:ar.tickCount,tickLine:Ts.tickLine,tickSize:Ts.tickSize,type:ar.type,width:ar.width,yAxisId:0},Gve=e=>{var n=Bi(e,Hve);return j.createElement(j.Fragment,null,j.createElement(Uve,{interval:n.interval,id:n.yAxisId,scale:n.scale,type:n.type,domain:n.domain,allowDataOverflow:n.allowDataOverflow,dataKey:n.dataKey,allowDuplicatedCategory:n.allowDuplicatedCategory,allowDecimals:n.allowDecimals,tickCount:n.tickCount,padding:n.padding,includeHidden:n.includeHidden,reversed:n.reversed,ticks:n.ticks,width:n.width,orientation:n.orientation,mirror:n.mirror,hide:n.hide,unit:n.unit,name:n.name,angle:n.angle,minTickGap:n.minTickGap,tick:n.tick,tickFormatter:n.tickFormatter}),j.createElement(Wve,n))},yV=j.memo(Gve,bV);yV.displayName="YAxis";var qve=(e,n)=>n,DC=xe([qve,on,gF,tr,k$,Xs,I0e,Nr],z0e),TC=e=>{var n=e.currentTarget.getBoundingClientRect(),i=n.width/e.currentTarget.offsetWidth,s=n.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-n.left)/i),chartY:Math.round((e.clientY-n.top)/s)}},xV=to("mouseClick"),vV=xm();vV.startListening({actionCreator:xV,effect:(e,n)=>{var i=e.payload,s=DC(n.getState(),TC(i));(s==null?void 0:s.activeIndex)!=null&&n.dispatch(Tge({activeIndex:s.activeIndex,activeDataKey:void 0,activeCoordinate:s.activeCoordinate}))}});var P1=to("mouseMove"),wV=xm(),zp=null;wV.startListening({actionCreator:P1,effect:(e,n)=>{var i=e.payload;zp!==null&&cancelAnimationFrame(zp);var s=TC(i);zp=requestAnimationFrame(()=>
202{var d=n.getState(),h=cC(d,d.tooltip.settings.shared);if(h==="axis"){var f=DC(d,s);(f==null?void 0:f.activeIndex)!=null?n.dispatch(d$({activeIndex:f.activeIndex,activeDataKey:void 0,activeCoordinate:f.activeCoordinate})):n.dispatch(c$())}zp=null})}});function Kve(e,n){return n instanceof HTMLElement?"HTMLElement <".concat(n.tagName,' class="').concat(n.className,'">'):n===window?"global.window":e==="children"&&typeof n=="object"&&n!==null?"<<CHILDREN>>":n}var p7={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},_V=hi({name:"rootProps",initialState:p7,reducers:{updateOptions:(e,n)=>{var i;e.accessibilityLayer=n.payload.accessibilityLayer,e.barCategoryGap=n.payload.barCategoryGap,e.barGap=(i=n.payload.barGap)!==null&&i!==void 0?i:p7.barGap,e.barSize=n.payload.barSize,e.maxBarSize=n.payload.maxBarSize,e.stackOffset=n.payload.stackOffset,e.syncId=n.payload.syncId,e.syncMethod=n.payload.syncMethod,e.className=n.payload.className,e.baseValue=n.payload.baseValue,e.reverseStackOrder=n.payload.reverseStackOrder}}}),Yve=_V.reducer,{updateOptions:Qve}=_V.actions,AV=hi({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,n)=>n.payload}}),{updatePolarOptions:_je}=AV.actions,Zve=AV.reducer,CV=to("keyDown"),jV=to("focus"),IC=xm();IC.startListening({actionCreator:CV,effect:(e,n)=>{var i=n.getState(),s=i.rootProps.accessibilityLayer!==!1;if(s){var{keyboardInteraction:d}=i.tooltip,h=e.payload;if(!(h!=="ArrowRight"&&h!=="ArrowLeft"&&h!=="Enter")){var f=dC(d,Xd(i),Dm(i),Pm(i)),g=f==null?-1:Number(f);if(!(!Number.isFinite(g)||g<0)){var p=Xs(i);if(h==="Enter"){var x=w0(i,"axis","hover",String(d.index));n.dispatch(j1({active:!d.active,activeIndex:d.index,activeCoordinate:x}));return}var y=wge(i),v=y==="left-to-right"?1:-1,w=h==="ArrowRight"?1:-1,C=g+w*v;if(!(p==null||C>=p.length||C<0)){var E=w0(i,"axis","hover",String(C));n.dispatch(j1({active:!0,activeIndex:C.toString(),activeCoordinate:E}))}}}}}});IC.startListening({actionCreator:jV,effect:(e,n)=>{var i=n.getState(),s=i.rootProps.accessibilityLayer!==!1;if(s){var{keyboardInteraction:d}=i.tooltip;if(!d.active&&d.index==null){var h="0",f=w0(i,"axis","hover",String(h));n.dispatch(j1({active:!0,activeIndex:h,activeCoordinate:f}))}}}});var Wi=to("externalEvent"),NV=xm(),gv=new Map;NV.startListening({actionCreator:Wi,effect:(e,n)=>{var{handler:i,reactEvent:s}=e.payload;if(i!=null){s.persist();var d=s.type,h=gv.get(d);h!==void 0&&cancelAnimationFrame(h);var f=requestAnimationFrame(()=>{try{var g=n.getState(),p={activeCoordinate:b0e(g),activeDataKey:p0e(g),activeIndex:om(g),activeLabel:v$(g),activeTooltipIndex:om(g),isTooltipActive:k0e(g)};i(p,s)}finally{gv.delete(d)}});gv.set(d,f)}}});var Jve=xe([Zd],e=>e.tooltipItemPayloads),Xve=xe([Jve,Mm,(e,n)=>n,(e,n,i)=>i],(e,n,i,s)=>{var d=e.find(g=>g.settings.graphicalItemId===s);if(d!=null){var{positions:h}=d;if(h!=null){var f=n(h,i);return f}}}),EV=to("touchMove"),SV=xm();SV.startListening({actionCreator:EV,effect:(e,n)=>{var i=e.payload;if(!(i.touches==null||i.touches.length===0)){var s=n.getState(),d=cC(s,s.tooltip.settings.shared);if(d==="axis"){var h=i.touches[0];if(h==null)return;var f=DC(s,TC({clientX:h.clientX,clientY:h.clientY,currentTarget:i.currentTarget}));(f==null?void 0:f.activeIndex)!=null&&n.dispatch(d$({activeIndex:f.activeIndex,activeDataKey:void 0,activeCoordinate:f.activeCoordinate}))}else if(d==="item"){var g,p=i.touches[0];if(document.elementFromPoint==null||p==null)return;var x=document.elementFromPoint(p.clientX,p.clientY);if(!x||!x.getAttribute)return;var y=x.getAttribute(_de),v=(g=x.getAttribute(Ade))!==null&&g!==void 0?g:void 0,w=Jd(s).find(S=>S.id===v);if(y==null||w==null||v==null)return;var{dataKey:C}=w,E=Xve(s,y,v);n.dispatch(Dge({activeDataKey:C,activeIndex:y,activeCoordinate:E,activeGraphicalItemId:v}))}}}});var ewe=nR({brush:Pye,cartesianAxis:Cye,chartData:gbe,errorBars:Txe,graphicalItems:nye,layout:sde,legend:due,options:ube,polarAxis:zke,polarOptions:Zve,referenceElements:$ye,rootProps:Yve,tooltip:Ige,zIndex:X0e}),twe=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Tce({reducer:ewe,preloadedState:n,middleware:s=>{var d;return s({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((d="es6")!==null&&d!==void 0?d:"")}).concat([vV.middleware,wV.middleware,IC.middleware,NV.middleware,SV.middleware])},enhancers:s=>{var d=s;return typeof s=="function"&&(d=s()),d.concat(bR({type:"raf"}))},devTools:{serialize:{replacer:Kve},name:"recharts-".concat(i)}})};function nwe(e){var{preloadedState:n,children:i,reduxStoreName:s}=e,d=mi(),h=j.useRef(null);if(d)return i;h.current==null&&(h.current=twe(n,s));var f=aA;return j.createElement(tve,{context:f,store:h.current},i)}function rwe(e){var{layout:n,margin:i}=e,s=Un(),d=mi();return j.useEffect(()=>{d||(s(rde(n)),s(nde(i)))},[s,d,n,i]),null}var iwe=j.memo(rwe,NC);function owe(e){var n=Un();return j.useEffect(()=>{n(Qve(e))},[n,e]),null}function g7(e){var{zIndex:n,isPanorama:i}=e,s=j.useRef(null),d=Un();return j.useLayoutEffect(()=>(s.current&&d(Z0e({zIndex:n,element:s.current,isPanorama:i})),()=>{d(J0e({zIndex:n,isPanorama:i}))}),[d,n,i]),j.createElement("g",{tabIndex:-1,ref:s})}function b7(e){var{children:n,isPanorama:i}=e,s=yt($0e);
202if(!s||s.length===0)return n;var d=s.filter(f=>f<0),h=s.filter(f=>f>0);return j.createElement(j.Fragment,null,d.map(f=>j.createElement(g7,{key:f,zIndex:f,isPanorama:i})),n,h.map(f=>j.createElement(g7,{key:f,zIndex:f,isPanorama:i})))}var swe=["children"];function awe(e,n){if(e==null)return{};var i,s,d=lwe(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function lwe(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}function N0(){return N0=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},N0.apply(null,arguments)}var cwe={width:"100%",height:"100%",display:"block"},dwe=j.forwardRef((e,n)=>{var i=WR(),s=HR(),d=nz();if(!rs(i)||!rs(s))return null;var{children:h,otherAttributes:f,title:g,desc:p}=e,x,y;return f!=null&&(typeof f.tabIndex=="number"?x=f.tabIndex:x=d?0:void 0,typeof f.role=="string"?y=f.role:y=d?"application":void 0),j.createElement(d9,N0({},f,{title:g,desc:p,role:y,tabIndex:x,width:i,height:s,style:cwe,ref:n}),h)}),uwe=e=>{var{children:n}=e,i=yt(yb);if(!i)return null;var{width:s,height:d,y:h,x:f}=i;return j.createElement(d9,{width:s,height:d,x:f,y:h},n)},k7=j.forwardRef((e,n)=>{var{children:i}=e,s=awe(e,swe),d=mi();return d?j.createElement(uwe,null,j.createElement(b7,{isPanorama:!0},i)):j.createElement(dwe,N0({ref:n},s),j.createElement(b7,{isPanorama:!1},i))});function hwe(){var e=Un(),[n,i]=j.useState(null),s=yt(wde);return j.useEffect(()=>{if(n!=null){var d=n.getBoundingClientRect(),h=d.width/n.offsetWidth;xn(h)&&h!==s&&e(ode(h))}},[n,e,s]),i}function y7(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);n&&(s=s.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),i.push.apply(i,s)}return i}function mwe(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?y7(Object(i),!0).forEach(function(s){fwe(e,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):y7(Object(i)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))})}return e}function fwe(e,n,i){return(n=pwe(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}function pwe(e){var n=gwe(e,"string");return typeof n=="symbol"?n:n+""}function gwe(e,n){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var s=i.call(e,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function nc(){return nc=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},nc.apply(null,arguments)}var bwe=()=>(Cbe(),null);function E0(e){if(typeof e=="number")return e;if(typeof e=="string"){var n=parseFloat(e);if(!Number.isNaN(n))return n}return 0}var kwe=j.forwardRef((e,n)=>{var i,s,d=j.useRef(null),[h,f]=j.useState({containerWidth:E0((i=e.style)===null||i===void 0?void 0:i.width),containerHeight:E0((s=e.style)===null||s===void 0?void 0:s.height)}),g=j.useCallback((x,y)=>{f(v=>{var w=Math.round(x),C=Math.round(y);return v.containerWidth===w&&v.containerHeight===C?v:{containerWidth:w,containerHeight:C}})},[]),p=j.useCallback(x=>{if(typeof n=="function"&&n(x),x!=null&&typeof ResizeObserver<"u"){var{width:y,height:v}=x.getBoundingClientRect();g(y,v);var w=E=>{var{width:S,height:D}=E[0].contentRect;g(S,D)},C=new ResizeObserver(w);C.observe(x),d.current=C}},[n,g]);return j.useEffect(()=>()=>{var x=d.current;x!=null&&x.disconnect()},[g]),j.createElement(j.Fragment,null,j.createElement(vb,{width:h.containerWidth,height:h.containerHeight}),j.createElement("div",nc({ref:p},e)))}),ywe=j.forwardRef((e,n)=>{var{width:i,height:s}=e,[d,h]=j.useState({containerWidth:E0(i),containerHeight:E0(s)}),f=j.useCallback((p,x)=>{h(y=>{var v=Math.round(p),w=Math.round(x);return y.containerWidth===v&&y.containerHeight===w?y:{containerWidth:v,containerHeight:w}})},[]),g=j.useCallback(p=>{if(typeof n=="function"&&n(p),p!=null){var{width:x,height:y}=p.getBoundingClientRect();f(x,y)}},[n,f]);return j.createElement(j.Fragment,null,j.createElement(vb,{width:d.containerWidth,height:d.containerHeight}),j.createElement("div",nc({ref:g},e)))}
202),xwe=j.forwardRef((e,n)=>{var{width:i,height:s}=e;return j.createElement(j.Fragment,null,j.createElement(vb,{width:i,height:s}),j.createElement("div",nc({ref:n},e)))}),vwe=j.forwardRef((e,n)=>{var{width:i,height:s}=e;return Rs(i)||Rs(s)?j.createElement(ywe,nc({},e,{ref:n})):j.createElement(xwe,nc({},e,{ref:n}))});function wwe(e){return e===!0?kwe:vwe}var _we=j.forwardRef((e,n)=>{var{children:i,className:s,height:d,onClick:h,onContextMenu:f,onDoubleClick:g,onMouseDown:p,onMouseEnter:x,onMouseLeave:y,onMouseMove:v,onMouseUp:w,onTouchEnd:C,onTouchMove:E,onTouchStart:S,style:D,width:I,responsive:M,dispatchTouchEvents:B=!0}=e,R=j.useRef(null),F=Un(),[V,P]=j.useState(null),[z,W]=j.useState(null),K=hwe(),G=kA(),Z=(G==null?void 0:G.width)>0?G.width:I,se=(G==null?void 0:G.height)>0?G.height:d,ge=j.useCallback(re=>{K(re),typeof n=="function"&&n(re),P(re),W(re),re!=null&&(R.current=re)},[K,n,P,W]),Se=j.useCallback(re=>{F(xV(re)),F(Wi({handler:h,reactEvent:re}))},[F,h]),Ae=j.useCallback(re=>{F(P1(re)),F(Wi({handler:x,reactEvent:re}))},[F,x]),he=j.useCallback(re=>{F(c$()),F(Wi({handler:y,reactEvent:re}))},[F,y]),ee=j.useCallback(re=>{F(P1(re)),F(Wi({handler:v,reactEvent:re}))},[F,v]),le=j.useCallback(()=>{F(jV())},[F]),je=j.useCallback(re=>{F(CV(re.key))},[F]),ve=j.useCallback(re=>{F(Wi({handler:f,reactEvent:re}))},[F,f]),Ce=j.useCallback(re=>{F(Wi({handler:g,reactEvent:re}))},[F,g]),Q=j.useCallback(re=>{F(Wi({handler:p,reactEvent:re}))},[F,p]),te=j.useCallback(re=>{F(Wi({handler:w,reactEvent:re}))},[F,w]),pe=j.useCallback(re=>{F(Wi({handler:S,reactEvent:re}))},[F,S]),be=j.useCallback(re=>{B&&F(EV(re)),F(Wi({handler:E,reactEvent:re}))},[F,B,E]),Oe=j.useCallback(re=>{F(Wi({handler:C,reactEvent:re}))},[F,C]),at=wwe(M);return j.createElement(S$.Provider,{value:V},j.createElement(u9.Provider,{value:z},j.createElement(at,{width:Z??(D==null?void 0:D.width),height:se??(D==null?void 0:D.height),className:pn("recharts-wrapper",s),style:mwe({position:"relative",cursor:"default",width:Z,height:se},D),onClick:Se,onContextMenu:ve,onDoubleClick:Ce,onFocus:le,onKeyDown:je,onMouseDown:Q,onMouseEnter:Ae,onMouseLeave:he,onMouseMove:ee,onMouseUp:te,onTouchEnd:Oe,onTouchMove:be,onTouchStart:pe,ref:ge},j.createElement(bwe,null),i)))}),Awe=["width","height","responsive","children","className","style","compact","title","desc"];function Cwe(e,n){if(e==null)return{};var i,s,d=jwe(e,n);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(s=0;s<h.length;s++)i=h[s],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(d[i]=e[i])}return d}function jwe(e,n){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(n.indexOf(s)!==-1)continue;i[s]=e[s]}return i}var Nwe=j.forwardRef((e,n)=>{var{width:i,height:s,responsive:d,children:h,className:f,style:g,compact:p,title:x,desc:y}=e,v=Cwe(e,Awe),w=No(v);return p?j.createElement(j.Fragment,null,j.createElement(vb,{width:i,height:s}),j.createElement(k7,{otherAttributes:w,title:x,desc:y},h)):j.createElement(_we,{className:f,style:g,width:i,height:s,responsive:d??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},j.createElement(k7,{otherAttributes:w,title:x,desc:y,ref:n},j.createElement(Uye,null,h)))});function O1(){return O1=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},O1.apply(null,arguments)}var Ewe={top:5,right:5,bottom:5,left:5},Swe={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Ewe,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},Dwe=j.forwardRef(function(n,i){var s,d=Bi(n.categoricalChartProps,Swe),{chartName:h,defaultTooltipEventType:f,validateTooltipEventTypes:g,tooltipPayloadSearcher:p,categoricalChartProps:x}=n,y={chartName:h,defaultTooltipEventType:f,validateTooltipEventTypes:g,tooltipPayloadSearcher:p,eventEmitter:void 0};return j.createElement(nwe,{preloadedState:{options:y},reduxStoreName:(s=x.id)!==null&&s!==void 0?s:h},j.createElement(Mye,{chartData:x.data}),j.createElement(iwe,{layout:d.layout,margin:d.margin}),j.createElement(owe,{baseValue:d.baseValue,accessibilityLayer:d.accessibilityLayer,barCategoryGap:d.barCategoryGap,maxBarSize:d.maxBarSize,stackOffset:d.stackOffset,barGap:d.barGap,barSize:d.barSize,syncId:d.syncId,syncMethod:d.syncMethod,className:d.className,reverseStackOrder:d.reverseStackOrder}),j.createElement(Nwe,O1({},d,{ref:i}
202)))}),Twe=["axis"],Iwe=j.forwardRef((e,n)=>j.createElement(Dwe,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Twe,tooltipPayloadSearcher:cbe,categoricalChartProps:e,ref:n}));const Mwe=["google","facebook","amazon","apple","microsoft","twitter","instagram","youtube","linkedin","reddit","netflix","spotify","ebay","walmart","wikipedia","yahoo","bing","tiktok","github","stackoverflow","pinterest","discord","paypal","openai","anthropic","cloudflare","dropbox","slack","zoom","alibaba","aliexpress","target","costco","bestbuy","etsy","snapchat","tumblr","threads","twitch","stripe","whatsapp","telegram","gitlab","baidu","yandex","duckduckgo","godaddy","namecheap","siteground","bluehost","hostgator","vercel","netlify","heroku","digitalocean","amazonaws","medium","substack","cnn","bbc","nytimes","reuters"],Pwe=["localhost","example.com","example.org","example.net","test.com","test.org","test.net","invalid.com","wordpress.com","wordpress.org","blogspot.com","blogger.com","wix.com","squarespace.com","weebly.com","web.archive.org"],Owe=["co.uk","co.in","co.jp","co.kr","co.nz","co.za","com.au","com.br","com.mx","com.ar","com.co","com.tr","com.sg","com.my","com.ph","com.pk","com.ng","com.sa","com.hk","com.tw","com.vn","com.ua","org.uk","org.au","org.in"];function DV(e){try{const n=new URL(e).hostname.toLowerCase();if(/^\d{1,3}(\.\d{1,3}){3}$/.test(n))return!0;for(const f of Pwe)if(n===f||n.endsWith("."+f))return!0;let i=n,s=!1;for(const f of Owe)if(n.endsWith("."+f)){i=n.slice(0,-(f.length+1)),s=!0;break}const d=i.split(".");let h;return s?h=d[d.length-1]:h=d.length>=2?d[d.length-2]:d[0],Mwe.includes(h)}catch{return!1}}const Bwe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})}),Fp=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),Lwe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.59 14.37a6 6 0 01-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 006.16-12.12A14.98 14.98 0 009.631 8.41m5.96 5.96a14.926 14.926 0 01-5.841 2.58m-.119-8.54a6 6 0 00-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 00-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 01-2.448-2.448 14.9 14.9 0 01.06-.312m-2.24 2.39a4.493 4.493 0 00-1.757 4.306 4.493 4.493 0 004.306-1.758M16.5 9a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0z"})}),bv=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z"})}),x7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})}),Rwe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"})}),Kc=({className:e="h-5 w-5"})=>a.jsxs("svg",{className:`animate-spin ${e}`,fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),zwe=({currentStep:e,totalSteps:n=3})=>a.jsx("div",{className:"flex items-center justify-center gap-2",children:Array.from({length:n},(i,s)=>
202a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:`w-3 h-3 rounded-full transition-all duration-300 ${s<e?"bg-primary-600":s===e?"bg-primary-600 ring-4 ring-primary-100":"bg-gray-200"}`}),s<n-1&&a.jsx("div",{className:`w-8 h-0.5 mx-1 transition-all duration-300 ${s<e?"bg-primary-600":"bg-gray-200"}`})]},s))}),v7={wordpress:{name:"WordPress",color:"blue",accentBg:"bg-blue-50 border-blue-200",accentText:"text-blue-700",btnColor:"bg-blue-600 hover:bg-blue-700",instructions:[{title:"Install the BlogBotz Plugin",desc:a.jsxs(a.Fragment,{children:["Go to your WordPress admin panel, navigate to ",a.jsx("strong",{children:"Plugins > Add New"}),", search for ",a.jsx("strong",{children:'"BlogBotz"'})," and click ",a.jsx("strong",{children:"Install Now"}),", then ",a.jsx("strong",{children:"Activate"}),"."]})},{title:"Connect Your Site",desc:a.jsxs(a.Fragment,{children:["After activation, go to ",a.jsx("strong",{children:"BlogBotz"})," in your WordPress sidebar and click the ",a.jsx("strong",{children:"Connect"})," button to link your site."]})},{title:"Verify Connection",desc:"Click the button below to verify the plugin is installed and connected."}]},woocommerce:{name:"WooCommerce",color:"purple",accentBg:"bg-purple-50 border-purple-200",accentText:"text-purple-700",btnColor:"bg-purple-600 hover:bg-purple-700",instructions:[{title:"Install the BlogBotz Plugin",desc:a.jsxs(a.Fragment,{children:["Go to your WordPress admin panel, navigate to ",a.jsx("strong",{children:"Plugins > Add New"}),", search for ",a.jsx("strong",{children:'"BlogBotz"'})," and click ",a.jsx("strong",{children:"Install Now"}),", then ",a.jsx("strong",{children:"Activate"}),"."]})},{title:"Connect Your Store",desc:a.jsxs(a.Fragment,{children:["After activation, go to ",a.jsx("strong",{children:"BlogBotz"})," in your WordPress sidebar and click the ",a.jsx("strong",{children:"Connect"})," button. The plugin will automatically detect WooCommerce and sync your products."]})},{title:"Verify Connection",desc:"Click the button below to verify the plugin is installed and connected."}]},opencart:{name:"OpenCart",color:"orange",accentBg:"bg-orange-50 border-orange-200",accentText:"text-orange-700",btnColor:"bg-orange-600 hover:bg-orange-700",instructions:[{title:"Download & Install the Extension",desc:a.jsxs(a.Fragment,{children:["Download the BlogBotz extension and upload it via ",a.jsx("strong",{children:"Extensions > Installer"})," in your OpenCart admin. Then enable it under ",a.jsx("strong",{children:"Extensions > Extensions > Modules"}),"."]})},{title:"Connect Your Store",desc:a.jsxs(a.Fragment,{children:["Open the BlogBotz module settings in your OpenCart admin and click the ",a.jsx("strong",{children:"Connect"})," button to link your store."]})},{title:"Verify Connection",desc:"Click the button below to verify the extension is installed and connected."}]},shopify:{name:"Shopify",color:"green",accentBg:"bg-green-50 border-green-200",accentText:"text-green-700",btnColor:"bg-green-600 hover:bg-green-700",instructions:[{title:"Install the BlogBotz App",desc:a.jsxs(a.Fragment,{children:["Search for ",a.jsx("strong",{children:'"BlogBotz"'})," in the Shopify App Store and install the app to your store."]})},{title:"Connect from Shopify Admin",desc:"Once installed, open the BlogBotz app from your Shopify admin. Your products and collections will sync automatically."},{title:"Verify Connection",desc:"Click the button below to verify the app is installed and connected."}]}},w7=["We're analyzing your website to find the best content topics.","BlogBotz creates content that matches your brand and industry.","Your topics will be ready for review in about a minute.","Each topic comes with trending keywords for maximum SEO impact.","AI picks the best angle for each topic â informational, commercial, or comparison."],_7={crawling:{text:"Scanning your website...",sub:"Analyzing content and structure"},generating_topics:{text:"Generating topics...",sub:"Creating relevant content topics from your site"},discovering_keywords:{text:"Generating topics...",sub:"Creating relevant content topics from your site"},ready:{text:"Setup complete!",sub:"Your site is ready for content automation"},crawl_failed:{text:"Scan failed",sub:"There was an issue scanning your website"},requires_plugin_setup:{text:"Plugin setup required",sub:"Install the plugin to connect your website"}};function Fwe({initialStep:e=0,existingSite:n=null,creditsBalance:i=0,onComplete:s,onDismiss:d}){const h=Ot(),{setSites:f,setActiveSite:g}=ui(),p=j.useRef(null),[x,y]=j.useState(e),[v,w]=j.useState(""),[C,E]=j.useState(""),[S,D]=j.useState(!1),[I,M]=j.useState(""),[B,R]=j.useState(n),[F,V]=j.useState(null),[P,z]=j.useState(!1),[W,K]=j.useState(n?"crawling":null),[G,Z]=j.useState(null),[se,ge]=j.useState(!1),[Se,Ae]=j.useState(null),[he,ee]=j.useState({}),[le,je]=j.useState([]),[ve,Ce]=j.useState(new Set),[Q,te]=j.useState(!1),[pe,be]=j.useState(!1),[Oe,at]=j.useState(null),[re,ye]=j.useState(""),[Me,Y]=j.useState(null),[fe,Ne]=j.useState(0),[Ue,it]=j.useState(0),Ve=j.useRef(null),mt=j.useCallback(async(ot,Ye,rt)=>
202{try{await ne.post("/onboarding/track",{event:ot,step:Ye,metadata:rt})}catch{}},[]);j.useEffect(()=>{mt("wizard_opened",0)},[mt]),j.useEffect(()=>{(async()=>{try{const Ye=await ne.get("/plugin-links");ee(Ye.data||{})}catch{}})()},[]),j.useEffect(()=>{n&&x===0&&(R(n),K("crawling"),ue(n.id,!1))},[n]),j.useEffect(()=>()=>{p.current&&clearInterval(p.current)},[]),j.useEffect(()=>{if(!W||W==="ready"||W==="crawl_failed")return;const ot=setInterval(()=>{it(Ye=>(Ye+1)%w7.length)},5e3);return()=>clearInterval(ot)},[W]);const ut=j.useRef(!0);j.useEffect(()=>(ut.current=!0,()=>{ut.current=!1}),[]);const Fe=j.useCallback((ot,Ye)=>{p.current&&clearInterval(p.current);const rt=10*60*1e3,_t=Date.now(),An=async()=>{var Wt;if(ut.current){if(Date.now()-_t>rt){clearInterval(p.current),p.current=null,ut.current&&K("crawl_failed");return}try{const Be=await ne.get(`/sites/${ot}/setup-status`);if(!ut.current)return;const tt=Be.data;if(Z(tt),K(tt.setup_phase),tt.setup_phase==="requires_plugin_setup")clearInterval(p.current),p.current=null;else if(tt.setup_phase==="ready"){clearInterval(p.current),p.current=null;try{const st=await ne.get(`/sites/${ot}/topics`);if(!ut.current)return;const Bt=Array.isArray(st.data)?st.data:((Wt=st.data)==null?void 0:Wt.data)||[];je(Bt)}catch(st){console.error("Failed to load topics",st)}ut.current&&setTimeout(()=>y(Ye?2:1),800)}else tt.setup_phase==="crawl_failed"&&(clearInterval(p.current),p.current=null)}catch(Be){console.error("Polling failed",Be)}}};An(),p.current=setInterval(An,3e3)},[]),ue=j.useCallback(async(ot,Ye)=>{try{const rt=await ne.post(`/sites/${ot}/quick-setup`);if(rt.data.requires_plugin_setup){V(rt.data.detected_platform),z(!0),K("requires_plugin_setup"),y(1);return}if(rt.data.setup_complete){K("ready");const _t=rt.data.topics||[];je(_t),setTimeout(()=>y(Ye?2:1),800)}else Fe(ot,Ye)}catch(rt){console.error("Quick setup failed",rt),Fe(ot,Ye)}},[Fe]),Re=async ot=>{var Ye,rt,_t,An;if(ot.preventDefault(),E(""),M(""),!v){E("Website URL is required");return}if(!/^https?:\/\/.+/.test(v)){E("Please enter a valid URL (must start with http:// or https://)");return}if(DV(v)){E("This URL belongs to a well-known platform and cannot be registered. Please enter your own website URL. If you believe this is an error, contact support.");return}D(!0);try{const Be=(await ne.post("/sites",{url:v})).data,tt=Be.site||Be,st=Be.detected_platform,Bt=Be.is_plugin_platform;R(tt),V(st),z(Bt);const oe=await ne.get("/sites");f(Array.isArray(oe.data)?oe.data:[]),g(tt.id),mt("step_completed",1,{site_id:tt.id,platform:st}),Bt?y(1):(K("crawling"),ue(tt.id,!1))}catch(Wt){(rt=(Ye=Wt.response)==null?void 0:Ye.data)!=null&&rt.errors?M(Object.values(Wt.response.data.errors).flat().join(", ")):M(((An=(_t=Wt.response)==null?void 0:_t.data)==null?void 0:An.message)||"Failed to add website. Please check the URL and try again.")}finally{D(!1)}},ke=async()=>{var Ye,rt;if(!B)return;const ot=B.id||B;ge(!0),Ae(null);try{const _t=await ne.post(`/sites/${ot}/verify-connection`);_t.data.connected?Ae("connected"):(Ae("failed"),M(_t.data.message||"Connection failed. Please ensure the plugin is installed and activated."))}catch(_t){Ae("failed"),M(((rt=(Ye=_t.response)==null?void 0:Ye.data)==null?void 0:rt.message)||"Connection verification failed. Please try again.")}finally{ge(!1)}},$e=async()=>{if(!B)return;const ot=B.id||B;K("crawling"),y(2),ue(ot,!0)},lt=async()=>{if(!B)return;const ot=B.id||B;K("crawling");try{await ne.post(`/sites/${ot}/recrawl`)}catch{}z(!1),y(0),ue(ot,!1)},Ct=async()=>{if(!B)return;const ot=B.id||B;K("crawling"),M("");try{await ne.post(`/sites/${ot}/recrawl`),ue(ot,P)}catch{M("Failed to retry. Please try again."),K("crawl_failed")}},we=ot=>{Ce(Ye=>{const rt=new Set(Ye);return rt.has(ot)?rt.delete(ot):rt.add(ot),rt})},Xe=async()=>{if(!B)return;const ot=B.id||B;te(!0);try{await ne.post(`/sites/${ot}/confirm-topics`,{disabled_topic_ids:Array.from(ve)}),mt("step_completed",2,{active_topics:le.length-ve.size}),y(P?3:2)}catch{M("Failed to save topic preferences.")}finally{te(!1)}},X=async()=>{var ot,Ye;if(!(pe||Oe)){be(!0),ye(""),Y({phase:"queued"});try{const rt=await ne.post("/onboarding/generate-first-blog");if(!ut.current)return;rt.data.success?We():(ye(rt.data.error||"Blog generation failed."),be(!1),Y(null))}catch(rt){if(!ut.current)return;const _t=((Ye=(ot=rt.response)==null?void 0:ot.data)==null?void 0:Ye.error)||"Blog generation failed. You can generate blogs from the dashboard later.";ye(_t),be(!1),Y(null)}}},We=j.useCallback(()=>{Ve.current&&clearInterval(Ve.current);const ot=Date.now(),Ye=3*60*1e3,rt=async()=>{var _t;if(!ut.current){clearInterval(Ve.current);return}if(Date.now()-ot>Ye){clearInterval(Ve.current),ut.current&&(ye("Blog generation is taking longer than expected. Check your dashboard for updates."),be(!1));return}try{const An=await ne.get("/onboarding/first-blog-status");if(!ut.current)return;const Wt=An.data;Y(Wt),Wt.phase==="complete"?(clearInterval(Ve.current),at(Wt.blog||Wt),be(!1),mt("first_blog_generated",3,{blog_id:(_t=Wt.blog)==null?void 0:_t.id})):Wt.phase==="failed"&&(clearInterval(Ve.current),ye(Wt.error||"Blog generation failed."),be(!1))}catch{}};rt(),Ve.current=setInterval(rt,3e3)},[mt]);j.useEffect(()=>()=>{Ve.current&&clearInterval(Ve.current)},[]);const et=async()=>{try{await ne.post("/onboarding/complete")}catch{}s==null||s()},Je=async()=>{try{await ne.post("/onboarding/skip"),mt("wizard_dismissed",x)}catch{}d==null||d()},Ke=P?4:3,ce=()=>{if(P)switch(x){case 0:return Qe();case 1:return Ze();case 2:return W&&W!=="ready"&&W!=="requires_plugin_setup"?Nt():dn();case 3:return Br();default:return Qe()}else switch(x){case 0:return B&&W?Nt():Qe();case 1:return dn();case 2:return Br();default:return Qe()}},Qe=()=>a.jsxs("div",{className:"max-w-md mx-auto",children:[a.jsxs("div",{className:"text-center mb-8",children:[a.jsx("div",{className:"w-16 h-16 bg-primary-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx(Bwe,{className:"w-8 h-8 text-primary-600"})}),a.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Add Your Website"}),a.jsx("p",{className:"text-gray-500 mt-2",children:"Enter your website URL and we'll detect the best way to connect"})]}),I&&a.jsx("div",{className:"mb-6 p-4 bg-red-50 border border-red-200 rounded-lg",children:a.jsx("p",{className:"text-sm text-red-700",children:I})}),a.jsxs("form",{onSubmit:Re,className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"onboarding-url",className:"block text-sm font-medium text-gray-700 mb-1",children:"Website URL"}
202),a.jsx("input",{type:"url",id:"onboarding-url",value:v,onChange:ot=>{w(ot.target.value),E("")},className:`w-full px-4 py-3 border rounded-xl text-base focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 ${C?"border-red-300 bg-red-50":"border-gray-300"}`,placeholder:"https://example.com",autoFocus:!0,disabled:S}),C&&a.jsx("p",{className:"mt-1 text-sm text-red-600",children:C})]}),a.jsx("button",{type:"submit",disabled:S,className:"w-full py-3 px-6 bg-primary-600 text-white rounded-xl font-medium hover:bg-primary-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:S?a.jsxs(a.Fragment,{children:[a.jsx(Kc,{className:"h-5 w-5 text-white"}),"Detecting platform..."]}):"Continue"})]})]}),Ze=()=>{const ot=F||"wordpress",Ye=v7[ot]||v7.wordpress;return a.jsxs("div",{className:"max-w-lg mx-auto",children:[a.jsx("div",{className:`rounded-xl border p-4 mb-6 ${Ye.accentBg}`,children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Rwe,{className:`w-6 h-6 ${Ye.accentText}`}),a.jsxs("div",{children:[a.jsxs("p",{className:`text-sm font-semibold ${Ye.accentText}`,children:["We detected your site uses ",Ye.name,"!"]}),a.jsx("p",{className:`text-xs mt-0.5 ${Ye.accentText} opacity-80`,children:"Install our plugin to connect automatically for the best experience."})]})]})}),a.jsxs("div",{className:"text-center mb-6",children:[a.jsxs("h2",{className:"text-2xl font-bold text-gray-900",children:["Connect Your ",Ye.name," Site"]}),a.jsx("p",{className:"text-gray-500 mt-2",children:"Follow these steps to connect BlogBotz to your website"})]}),I&&a.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg",children:a.jsx("p",{className:"text-sm text-red-700",children:I})}),a.jsx("div",{className:"space-y-4 mb-6",children:Ye.instructions.map((rt,_t)=>a.jsxs("div",{className:"flex gap-4",children:[a.jsx("div",{className:"flex-shrink-0",children:a.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold text-white ${Ye.btnColor.split(" ")[0]}`,children:_t+1})}),a.jsxs("div",{className:"flex-1 pt-0.5",children:[a.jsx("h3",{className:"font-semibold text-gray-900 text-sm",children:rt.title}),a.jsx("p",{className:"text-sm text-gray-600 mt-1",children:rt.desc}),_t===Ye.instructions.length-1&&a.jsxs("div",{className:"mt-3 flex items-center gap-3",children:[a.jsx("button",{onClick:ke,disabled:se,className:`px-4 py-2 text-white text-sm font-medium rounded-lg transition-colors flex items-center gap-2 ${Ye.btnColor}`,children:se?a.jsxs(a.Fragment,{children:[a.jsx(Kc,{className:"h-4 w-4 text-white"}),"Verifying..."]}):"Verify Connection"}),Se==="connected"&&a.jsxs("span",{className:"flex items-center gap-1 text-sm text-green-600 font-medium",children:[a.jsx(Fp,{className:"w-5 h-5"})," Connected!"]}),Se==="failed"&&a.jsx("span",{className:"text-sm text-red-600",children:"Not connected yet"})]})]})]},_t))}),he[ot]&&he[ot].length>0&&a.jsxs("div",{className:"mb-6 p-4 bg-gray-50 rounded-xl border border-gray-200",children:[a.jsx("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Download Plugin"}),a.jsx("div",{className:"space-y-2",children:he[ot].map(rt=>a.jsxs("a",{href:rt.download_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between p-3 rounded-lg border border-gray-200 bg-white hover:border-gray-300 transition-colors group",children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-gray-900",children:rt.name}),rt.description&&a.jsx("p",{className:"text-xs text-gray-500 mt-0.5 truncate",children:rt.description})]}),a.jsxs("div",{className:"ml-3 flex items-center gap-2 flex-shrink-0",children:[rt.version&&a.jsxs("span",{className:"text-xs text-gray-400",children:["v",rt.version]}),a.jsx("span",{className:`px-3 py-1.5 text-xs font-medium text-white rounded-lg ${Ye.btnColor}`,children:"Download"})]})]},rt.id))})]}),a.jsx("div",{className:"space-y-3 pt-4 border-t border-gray-100",children:Se==="connected"?a.jsxs("button",{onClick:$e,className:"w-full py-3 px-6 bg-primary-600 text-white rounded-xl font-medium hover:bg-primary-700 transition-colors flex items-center justify-center gap-2",children:[a.jsx(Fp,{className:"w-5 h-5"}),"Continue Setup"]}):a.jsx("button",{onClick:lt,className:"w-full py-3 px-6 bg-gray-100 text-gray-700 border border-gray-200 rounded-xl font-medium hover:bg-gray-200 transition-colors",children:"Skip plugin â scan my website instead"})})]})},Nt=()=>{const ot=_7[W]||_7.crawling,Ye=W==="crawl_failed",rt=W==="ready";return a.jsxs("div",{className:"max-w-md mx-auto text-center",children:[a.jsx("div",{className:`w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-6 ${Ye?"bg-red-100":rt?"bg-green-100":"bg-primary-100"}`,children:Ye?a.jsx(x7,{className:"w-8 h-8 text-red-600"}):rt?a.jsx(Fp,{className:"w-8 h-8 text-green-600"}):a.jsx(Kc,{className:"h-8 w-8 text-primary-600"})}),a.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-2",children:ot.text}),a.jsx("p",{className:"text-gray-500 mb-2",children:ot.sub}),B&&a.jsx("p",{className:"text-sm text-gray-400 mb-6",children:B.url||B.name}),!Ye&&!rt&&a.jsxs("div",{className:"space-y-3 mt-8 text-left max-w-xs mx-auto",children:[a.jsx(A7,{label:"Scanning website",done:W!=="crawling",active:W==="crawling"}),a.jsx(A7,{label:"Generating topics",done:W==="ready",active:W==="generating_topics"||W==="discovering_keywords"})]}),G&&!Ye&&!rt&&G.topics_count>0&&a.jsxs("div",{className:"mt-4 text-xs text-gray-400",children:[G.topics_count," topics foun
202d"]}),!Ye&&!rt&&a.jsx("div",{className:"mt-6 bg-primary-50 border border-primary-100 rounded-xl p-4",children:a.jsx("p",{className:"text-sm text-primary-700",children:w7[Ue]})}),Ye&&a.jsxs("div",{className:"mt-6 space-y-3",children:[a.jsx("button",{onClick:Ct,className:"w-full py-3 px-6 bg-primary-600 text-white rounded-xl font-medium hover:bg-primary-700 transition-colors",children:"Retry Scan"}),a.jsx("button",{onClick:Je,className:"text-sm text-gray-500 hover:text-gray-700",children:"Skip to manual setup"})]})]})},dn=()=>{const ot=le.length-ve.size;return a.jsxs("div",{className:"max-w-lg mx-auto",children:[a.jsxs("div",{className:"text-center mb-6",children:[a.jsx("div",{className:"w-16 h-16 bg-primary-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx(bv,{className:"w-8 h-8 text-primary-600"})}),a.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:"Review Your Topics"}),a.jsxs("p",{className:"text-gray-500 mt-2",children:["We found ",le.length," topics for your site. Toggle off any you don't want."]})]}),I&&a.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg",children:a.jsx("p",{className:"text-sm text-red-700",children:I})}),le.length===0?a.jsxs("div",{className:"text-center py-8",children:[a.jsx("div",{className:"w-12 h-12 bg-amber-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx(x7,{className:"w-6 h-6 text-amber-600"})}),a.jsx("h3",{className:"font-semibold text-gray-900 mb-2",children:"No topics generated yet"}),a.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"This can happen if your site has very little content or if there was a temporary issue. You can retry or add topics manually from the dashboard."}),a.jsxs("div",{className:"space-y-3",children:[a.jsx("button",{onClick:()=>{if(B){const Ye=B.id||B,rt=P;K("generating_topics"),y(rt?2:0),ne.post(`/sites/${Ye}/retry-topic-generation`).then(()=>Fe(Ye,rt)).catch(()=>Fe(Ye,rt))}},className:"w-full py-2.5 px-6 bg-primary-600 text-white rounded-xl font-medium hover:bg-primary-700 transition-colors text-sm",children:"Retry Topic Generation"}),a.jsx("button",{onClick:()=>y(P?3:2),className:"text-sm text-gray-500 hover:text-gray-700 transition-colors",children:"Continue without topics â I'll add them manually"})]})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"space-y-2 max-h-[400px] overflow-y-auto pr-1",children:le.map(Ye=>{const rt=ve.has(Ye.id);return a.jsxs("div",{onClick:()=>we(Ye.id),className:`flex items-center justify-between p-4 rounded-xl border cursor-pointer transition-all ${rt?"border-gray-200 bg-gray-50 opacity-60":"border-primary-200 bg-primary-50/50 hover:bg-primary-50"}`,children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h3",{className:`font-medium ${rt?"text-gray-400":"text-gray-900"}`,children:Ye.name}),Ye.description&&a.jsx("p",{className:`text-sm mt-0.5 truncate ${rt?"text-gray-300":"text-gray-500"}`,children:Ye.description}),Ye.trending_keywords_count>0&&a.jsxs("p",{className:`text-xs mt-1 ${rt?"text-gray-300":"text-primary-600"}`,children:[Ye.trending_keywords_count," keyword",Ye.trending_keywords_count!==1?"s":""]})]}),a.jsx("div",{className:"ml-3 flex-shrink-0",children:a.jsx("div",{className:`w-10 h-6 rounded-full transition-colors relative ${rt?"bg-gray-300":"bg-primary-600"}`,children:a.jsx("div",{className:`w-4 h-4 rounded-full bg-white absolute top-1 transition-transform ${rt?"left-1":"left-5"}`})})})]},Ye.id)})}),a.jsx("div",{className:"mt-6 space-y-3",children:a.jsx("button",{onClick:Xe,disabled:Q||ot===0,className:"w-full py-3 px-6 bg-primary-600 text-white rounded-xl font-medium hover:bg-primary-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:Q?a.jsxs(a.Fragment,{children:[a.jsx(Kc,{className:"h-5 w-5 text-white"}),"Saving..."]}):`Looks good, continue (${ot} active)`})})]})]})},Ut=["BlogBotz optimizes your content for search engines automatically.","Each blog targets a specific keyword for maximum organic traffic.","You can edit any generated blog before publishing.","SEO scores above 80 mean your content is
202well-optimized for Google.","Blog generation takes about a minute. Almost there!","Your blogs are scheduled automatically â adjust frequency anytime.","BlogBotz generates unique featured images for every post."];j.useEffect(()=>{if(!pe)return;const ot=setInterval(()=>{Ne(Ye=>(Ye+1)%Ut.length)},5e3);return()=>clearInterval(ot)},[pe]);const Yr=[{key:"queued",label:"Finding the best keyword..."},{key:"keyword_selected",label:"Finding the best keyword..."},{key:"title_generated",label:"Crafting your blog title..."},{key:"content_generated",label:"Writing SEO-optimized content..."},{key:"image_generated",label:"Generating featured image..."},{key:"complete",label:"Scoring SEO quality..."}],fi=ot=>({queued:0,keyword_selected:1,title_generated:2,content_generated:3,image_generated:4,complete:5})[ot]??0,Br=()=>{const ot=fi(Me==null?void 0:Me.phase);return pe&&Me?a.jsxs("div",{className:"max-w-md mx-auto text-center",children:[a.jsx("div",{className:"w-16 h-16 bg-primary-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx(bv,{className:"w-8 h-8 text-primary-600"})}),a.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-2",children:"Generating your first blog..."}),a.jsx("p",{className:"text-gray-500 mb-8 text-sm",children:(B==null?void 0:B.name)||(B==null?void 0:B.url)||"Your website"}),a.jsx("div",{className:"space-y-3 text-left max-w-xs mx-auto mb-8",children:Yr.map((Ye,rt)=>{const _t=ot>rt,An=ot===rt;return a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center flex-shrink-0 ${_t?"bg-green-100":An?"bg-primary-100":"bg-gray-100"}`,children:_t?a.jsx("svg",{className:"w-4 h-4 text-green-600",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}):An?a.jsx(Kc,{className:"h-3.5 w-3.5 text-primary-600"}):a.jsx("div",{className:"w-2 h-2 rounded-full bg-gray-300"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("span",{className:`text-sm ${_t?"text-green-700 font-medium":An?"text-gray-900 font-medium":"text-gray-400"}`,children:Ye.label}),Ye.key==="title_generated"&&(Me==null?void 0:Me.title)&&ot>=2&&a.jsxs("p",{className:"text-xs text-primary-600 mt-0.5 truncate",children:['"',Me.title,'"']})]})]},Ye.key)})}),a.jsx("div",{className:"bg-primary-50 border border-primary-100 rounded-xl p-4 mb-6",children:a.jsx("p",{className:"text-sm text-primary-700 transition-opacity duration-300",children:Ut[fe]})}),a.jsx("button",{onClick:()=>{Ve.current&&clearInterval(Ve.current),et()},className:"text-sm text-gray-400 hover:text-gray-600 transition-colors",children:"Skip â your blog will finish in the background"})]}):Oe?a.jsxs("div",{className:"max-w-md mx-auto text-center",children:[a.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx(Fp,{className:"w-8 h-8 text-green-600"})}),a.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Your first blog is ready!"}),a.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-xl p-5 mb-6 text-left",children:[a.jsx("p",{className:"font-medium text-gray-900",children:Oe.title}),Oe.seo_score&&a.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[a.jsxs("span",{className:"text-xs font-medium text-green-700 bg-green-100 px-2 py-1 rounded-full",children:["SEO Score: ",Oe.seo_score,"/100"]}),Oe.seo_grade&&a.jsxs("span",{className:"text-xs text-gray-500",children:["Grade: ",Oe.seo_grade]})]})]}),a.jsxs("div",{className:"space-y-3",children:[a.jsx("button",{onClick:()=>{et(),h(`/user/blogs/${Oe.id}/view`)},className:"w-full py-3 px-6 bg-primary-600 text-white rounded-xl font-medium hover:bg-primary-700 transition-colors flex items-center justify-center gap-2",children:"View Your Blog â"}),a.jsx("button",{onClick:et,className:"w-full py-2.5 px-6 bg-gray-100 text-gray-700 rounded-xl font-medium hover:bg-gray-200 transition-colors text-sm",children:"Go to Dashboard"})]})]}):a.jsxs("div",{className:"max-w-md mx-auto text-center",children:[a.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx(Lwe,{className:"w-8 h-8 text-green-600"})}),a.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"You're All Set!"}),a.jsx("p",{className:"text-gray-500 mb-6",children:"Your content automation is configured and ready to go."}),re&&a.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4 mb-6 text-left",children:a.jsx("p",{className:"text-sm text-amber-700",children:re})}),a.jsxs("div",{className:"space-y-3",children:[i>0?a.jsxs("button",{onClick:()=>{ye(""),X()},className:"w-full py-3 px-6 bg-primary-600 text-white rounded-xl font-medium hover:bg-primary-700 transition-colors flex items-center justify-center gap-2",children:[a.jsx(bv,{className:"w-5 h-5"}),"Generate Your First Blog"]}):a.jsx("button",{onClick:()=>
202{et(),h("/user/credits")},className:"w-full py-3 px-6 bg-primary-600 text-white rounded-xl font-medium hover:bg-primary-700 transition-colors flex items-center justify-center gap-2",children:"Buy Credits to Start Generating"}),a.jsx("button",{onClick:et,className:"w-full py-2.5 px-6 bg-gray-100 text-gray-700 rounded-xl font-medium hover:bg-gray-200 transition-colors text-sm",children:"Go to Dashboard"})]})]})},Lr=x===0;return a.jsxs("div",{className:"fixed inset-0 z-50 bg-white overflow-y-auto",children:[a.jsx("div",{className:"sticky top-0 bg-white/95 backdrop-blur-sm border-b border-gray-100 px-6 py-4 z-10",children:a.jsxs("div",{className:"max-w-2xl mx-auto flex items-center justify-between",children:[a.jsx("div",{className:"flex items-center gap-3",children:a.jsx("span",{className:"text-sm font-medium text-gray-700",children:"BlogBotz Setup"})}),a.jsx(zwe,{currentStep:x,totalSteps:Ke}),a.jsx("div",{className:"w-24 flex justify-end",children:Lr&&a.jsx("button",{onClick:Je,className:"text-sm text-gray-400 hover:text-gray-500 transition-colors",children:"Skip"})})]})}),a.jsx("div",{className:"max-w-2xl mx-auto px-6 py-12",children:ce()})]})}function A7({label:e,done:n,active:i}){return a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center flex-shrink-0 ${n?"bg-green-100":i?"bg-primary-100":"bg-gray-100"}`,children:n?a.jsx("svg",{className:"w-4 h-4 text-green-600",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}):i?a.jsx(Kc,{className:"h-3.5 w-3.5 text-primary-600"}):a.jsx("div",{className:"w-2 h-2 rounded-full bg-gray-300"})}),a.jsx("span",{className:`text-sm ${n?"text-green-700 font-medium":i?"text-gray-900 font-medium":"text-gray-400"}`,children:e})]})}const kv=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),$p=({className:e="h-5 w-5"})=>a.jsxs("svg",{className:`animate-spin ${e}`,fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),$we=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),Vwe=[{key:"crawling",label:"Scanning your website",description:"We're learning about your content and structure"},{key:"generating_topics",label:"Creating blog topics",description:"Generating topics based on your website"}],C7=["We're analyzing your website to find the best content topics.","BlogBotz creates content that matches your brand and industry.","Your topics will be ready for review shortly.","Each topic comes with trending keywords for maximum SEO impact."],j7=["crawling","generating_topics","ready"];function Uwe(e,n){if(n==="crawl_failed")return e==="crawling"?"failed":"pending";if(n==="topic_generation_failed")return e==="crawling"?"done":e==="generating_topics"?"failed":"pending";const i=n==="discovering_keywords"?"ready":n,s=j7.indexOf(e),d=j7.indexOf(i);return d>s?"done":d===s?"active":"pending"}function Wwe({siteId:e,siteName:n,forceReady:i,onReady:s,onGenerateFirstBlog:d,firstBlogProgress:h,creditsBalance:f}){const g=Ot(),p=j.useRef(null),x=j.useRef(!0),[y,v]=j.useState(i?"ready":"crawling"),[w,C]=j.useState(null),[E,S]=j.useState(!1),[D,I]=j.useState(0);j.useEffect(()=>{if(y==="ready"||y==="crawl_failed"||y==="topic_generation_failed")return;const G=setInterval(()=>{I(Z=>(Z+1)%C7.length)},5e3);return()=>clearInterval(G)},[y]);const M=j.useCallback(()=>{p.current&&(clearInterval(p.current),p.current=null)},[]),B=j.useCallback(()=>{M();const G=Date.now(),Z=10*60*1e3,se=async()=>
202{if(x.current){if(Date.now()-G>Z){M(),x.current&&v("topic_generation_failed");return}try{const ge=await ne.get(`/sites/${e}/setup-status`);if(!x.current)return;const Se=ge.data;C(Se),v(Se.setup_phase),(Se.setup_phase==="ready"||Se.setup_phase==="crawl_failed"||Se.setup_phase==="topic_generation_failed")&&M()}catch(ge){console.error("Setup status poll failed",ge)}}};se(),p.current=setInterval(se,3e3)},[e,M]);j.useEffect(()=>(x.current=!0,e&&!i?B():i&&e&&ne.get(`/sites/${e}/setup-status`).then(G=>{x.current&&(C(G.data),v("ready"))}).catch(()=>{}),()=>{x.current=!1,M()}),[e,i,B,M]);const R=async()=>{S(!0);try{await ne.post(`/sites/${e}/recrawl`),v("crawling"),C(null),B()}catch(G){console.error("Retry failed",G)}finally{S(!1)}},F=async()=>{S(!0);try{await ne.post(`/sites/${e}/retry-topic-generation`),v("generating_topics"),C(null),B()}catch(G){console.error("Retry topic generation failed",G)}finally{S(!1)}},V=async()=>{S(!0);try{await ne.post(`/sites/${e}/generate-fallback-topics`),v("generating_topics"),C(null),B()}catch(G){console.error("Fallback generation failed",G)}finally{S(!1)}},P=h==null?void 0:h.phase,z=P&&!["not_started","complete","failed"].includes(P),W=P==="complete",K=P==="failed";if(y==="ready"){if(z)return a.jsx("div",{className:"rounded-xl border border-primary-200 bg-gradient-to-br from-primary-50 to-violet-50 p-6 h-full",children:a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-primary-100 flex items-center justify-center",children:a.jsx($p,{className:"h-5 w-5 text-primary-600"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Generating your first blog..."}),a.jsxs("p",{className:"mt-1 text-sm text-gray-600",children:[P==="queued"&&"Finding the best keyword...",P==="keyword_selected"&&"Selecting keyword...",P==="title_generated"&&(h.title?`Writing: "${h.title}"`:"Crafting your blog title..."),P==="content_generated"&&"Generating featured image...",P==="image_generated"&&"Scoring SEO quality..."]}),a.jsx("p",{className:"mt-2 text-xs text-gray-400",children:"This usually takes about a minute. You can navigate away."})]})]})});if(W){const G=h.blog||h,Z=(G==null?void 0:G.id)||h.blog_id;return a.jsx("div",{className:"rounded-xl border border-green-200 bg-green-50 p-6 h-full",children:a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-green-100 flex items-center justify-center",children:a.jsx(kv,{className:"h-6 w-6 text-green-600"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-green-900",children:"Your first blog is ready!"}),(G==null?void 0:G.title)&&a.jsx("p",{className:"mt-1 text-sm text-green-700",children:G.title}),(G==null?void 0:G.seo_score)&&a.jsxs("span",{className:"inline-block mt-1 text-xs font-medium text-green-700 bg-green-100 px-2 py-0.5 rounded-full",children:["SEO Score: ",G.seo_score,"/100"]}),a.jsx("div",{className:"mt-3",children:a.jsxs("button",{onClick:()=>g(Z?`/user/blogs/${Z}/view`:"/user/blogs"),className:"inline-flex items-center gap-2 px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700 transition-colors",children:["View Blog",a.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})]})})]})]})})}return a.jsx("div",{className:"rounded-xl border border-green-200 bg-green-50 p-6 h-full",children:a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-green-100 flex items-center justify-center",children:a.jsx(kv,{className:"h-6 w-6 text-green-600"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-green-900",children:"All set! Your site is ready."}),a.jsxs("p",{className:"mt-1 text-sm text-green-700",children:[n," has been analyzed and is ready for automated blogging.",(w==null?void 0:w.topics_count)>0&&` ${w.topics_count} topics ready for content generation.`]}),K&&a.jsx("div",{className:"mt-2 p-2 bg-amber-50 border border-amber-200 rounded-lg",children:a.jsx("p",{className:"text-xs text-amber-700",children:h.error||"Blog generation failed. Please try again."})}),a.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[a.jsxs("button",{onClick:()=>g(`/user/topics/${e}`),className:"inline-flex items-center gap-2 px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700 transition-colors",children:["Review Topics & Start Blogging",a.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})]}),d&&f>0&&a.jsxs("button",{onClick:d,className:"inline-flex items-center gap-2 px-4 py-2 bg-white border border-green-300 text-green-700 text-sm font-medium rounded-lg hover:bg-green-50 transition-colors",children:[a.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09
202L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456z"})}),K?"Retry Blog Generation":"Generate Your First Blog"]})]})]})]})})}return y==="crawl_failed"?a.jsx("div",{className:"rounded-xl border border-red-200 bg-red-50 p-6 h-full",children:a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-red-100 flex items-center justify-center",children:a.jsx("svg",{className:"h-6 w-6 text-red-600",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})})}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-red-900",children:"We had trouble scanning your site"}),a.jsx("p",{className:"mt-1 text-sm text-red-700",children:(w==null?void 0:w.crawl_error)||"Something went wrong while analyzing your website. This can happen if your site is temporarily unavailable."}),a.jsxs("div",{className:"mt-3 flex gap-3",children:[a.jsxs("button",{onClick:R,disabled:E,className:"inline-flex items-center gap-2 px-4 py-2 bg-red-600 text-white text-sm font-medium rounded-lg hover:bg-red-700 transition-colors disabled:opacity-50",children:[E?a.jsx($p,{className:"h-4 w-4"}):null,"Try Again"]}),a.jsx("button",{onClick:()=>g(`/user/topics/${e}`),className:"inline-flex items-center px-4 py-2 text-sm font-medium text-red-700 bg-red-100 rounded-lg hover:bg-red-200 transition-colors",children:"Set Up Manually"})]})]})]})}):y==="topic_generation_failed"?a.jsx("div",{className:"rounded-xl border border-amber-200 bg-amber-50 p-6 h-full",children:a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-amber-100 flex items-center justify-center",children:a.jsx("svg",{className:"h-6 w-6 text-amber-600",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})})}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-amber-900",children:"AI topic generation didn't work this time"}),a.jsxs("p",{className:"mt-1 text-sm text-amber-700",children:["We scanned your website successfully, but had trouble generating AI-powered topics.",(w==null?void 0:w.topic_generation_error)&&a.jsxs("span",{className:"block mt-1 text-xs text-amber-600",children:["Details: ",w.topic_generation_error]})]}),a.jsxs("div",{className:"mt-3 flex flex-wrap gap-3",children:[a.jsxs("button",{onClick:F,disabled:E,className:"inline-flex items-center gap-2 px-4 py-2 bg-amber-600 text-white text-sm font-medium rounded-lg hover:bg-amber-700 transition-colors disabled:opacity-50",children:[E?a.jsx($p,{className:"h-4 w-4"}):a.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182"})}),"Retry AI Generation"]}),a.jsx("button",{onClick:V,disabled:E,className:"inline-flex items-center px-4 py-2 text-sm font-medium text-amber-700 bg-amber-100 rounded-lg hover:bg-amber-200 transition-colors disabled:opacity-50",children:"Generate from Website Content"}),a.jsx("button",{onClick:()=>g(`/user/topics/${e}`),className:"inline-flex items-center px-4 py-2 text-sm font-medium text-amber-600 hover:text-amber-800 transition-colors",children:"Add Topics Manually"})]})]})]})}):a.jsxs("div",{className:"rounded-xl border border-blue-200 bg-gradient-to-r from-blue-50 to-indigo-50 p-6 h-full",children:[a.jsxs("div",{className:"mb-4",children:[a.jsxs("h3",{className:"text-lg font-semibold text-gray-900",children:["Setting up ",n]}),a.jsx("p",{className:"mt-0.5 text-sm text-gray-500",children:"This usually takes about a minute. You can navigate away â we'll keep working in the background."})]}),a.jsx("div",{className:"space-y-3",children:Vwe.map(G=>{const Z=Uwe(G.key,y);return a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"flex-shrink-0",children:[Z==="done"&&a.jsx("div",{className:"w-6 h-6 rounded-full bg-green-100 flex items-center justify-center",children:a.jsx(kv,{className:"h-4 w-4 text-green-600"})}),Z==="active"&&a.jsx("div",{className:"w-6 h-6 flex items-center justify-center",children:a.jsx($p,{className:"h-5 w-5 text-blue-600"})}),Z==="failed"&&a.jsx("div",{className:"w-6 h-6 rounded-full bg-red-100 flex items-center justify-center",children:a.jsx($we,{className:"h-4 w-4 text-red-600"})}),Z==="pending"&&a.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-200 flex items-center justify-center",children:a.jsx("div",{className:"w-2 h-2 rounded-full bg-gray-400"})})]}),a.jsx("div",{className:"flex-1 min-w-0",children:a.jsxs("p",{className:`text-sm font-medium ${Z==="done"?"text-green-700":Z==="active"?"text-blue-700":Z==="failed"?"text-red-600":"text-gray-400"}`,children:[G.label,Z==="active"&&"..."]})}),Z==="done"&&G.key==="generating_topics"&&(w==null?void 0:w.topics_count)>0&&a.jsxs("span",{className:"text-xs text-green-600 font-medium",children:[w.topics_count," topics"]})]},G.key)})}),a.jsx("div",{className:"mt-4 bg-blue-50 border border-blue-100 rounded-lg p-3",children:a.jsx("p",{className:"text-xs text-blue-700",children:C7[D]})})]})}const B1=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})}),N7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),Hwe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"})}),Gwe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 4.5l15 15m0 0V8.25m0 11.25H8.25"})}),MC=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),TV=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),qwe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),Kwe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})}),pg=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.59 14.37a6 6 0 01-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 006.16-12.12A14.98 14.98 0 009.631 8.41m5.96 5.96a14.926 14.926 0 01-5.841 2.58m-.119-8.54a6 6 0 00-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 00-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 01-2.448-2.448 14.9 14.9 0 01.06-.312m-2.24 2.39a4.493 4.493 0 00-1.757 4.306 4.493 4.493 0 004.306-1.758M16.5 9a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0z"})}),L1=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 002.25-2.25V6.75A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25v10.5A2.25 2.25 0 004.5 19.5z"})}),Ywe=({score:e,grade:n,above80:i,totalScored:s,onClick:d})=>{const f=2*Math.PI*36,g=e/100*f,p=e>=80?"#10b981":e>=60?"#f59e0b":"#ef4444";return a.jsx("div",{className:`bg-white rounded-xl border border-gray-200 p-6 ${d?"cursor-pointer hover:shadow-md hover:border-gray-300 transition-all":""}`,onClick:d,children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-gray-500",children:"SEO Score"}),a.jsxs("div",{className:"mt-1 flex items-baseline gap-2",children:[a.jsx("span",{className:"text-3xl font-bold text-gray-900",children:e}),a.jsx("span",{className:"text-lg font-bold px-2 py-0.5 rounded",style:{color:p,backgroundColor:`${p}15`},children:n})]}),s>0&&a.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:[i," of ",s," blogs above 80"]})]}),a.jsxs("div",{className:"relative w-20 h-20",children:[a.jsxs("svg",{className:"w-20 h-20
202-rotate-90",viewBox:"0 0 80 80",children:[a.jsx("circle",{cx:"40",cy:"40",r:36,fill:"none",stroke:"#f1f5f9",strokeWidth:"6"}),a.jsx("circle",{cx:"40",cy:"40",r:36,fill:"none",stroke:p,strokeWidth:"6",strokeDasharray:f,strokeDashoffset:f-g,strokeLinecap:"round",className:"transition-all duration-1000"})]}),a.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:a.jsxs("span",{className:"text-sm font-bold text-gray-700",children:[e,"%"]})})]})]})})},Vp=({title:e,value:n,icon:i,iconBg:s,trend:d,trendLabel:h,subtitle:f,subtitleColor:g,onClick:p})=>a.jsx("div",{className:`bg-white rounded-xl border border-gray-200 p-6 ${p?"cursor-pointer hover:shadow-md hover:border-gray-300 transition-all":""}`,onClick:p,children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-gray-500",children:e}),a.jsx("p",{className:"mt-2 text-3xl font-bold text-gray-900",children:n}),d!==void 0&&a.jsxs("div",{className:"mt-2 flex items-center",children:[d>=0?a.jsx(Hwe,{className:"w-4 h-4 text-emerald-500"}):a.jsx(Gwe,{className:"w-4 h-4 text-red-500"}),a.jsxs("span",{className:`text-sm font-medium ${d>=0?"text-emerald-600":"text-red-600"}`,children:[Math.abs(d),"%"]}),a.jsx("span",{className:"ml-1 text-sm text-gray-500",children:h||"vs last week"})]}),f&&a.jsx("p",{className:`mt-1 text-xs ${g||"text-gray-500"}`,children:f})]}),a.jsx("div",{className:`p-3 rounded-xl ${s}`,children:a.jsx(i,{className:"w-6 h-6 text-white"})})]})}),Qwe=({activity:e,onClick:n})=>{const i={pending:"bg-amber-100 text-amber-700",approved:"bg-blue-100 text-blue-700",published:"bg-emerald-100 text-emerald-700",rejected:"bg-red-100 text-red-700",draft:"bg-gray-100 text-gray-700"};return a.jsxs("div",{className:"flex items-center justify-between py-3 cursor-pointer hover:bg-gray-50 -mx-4 px-4 rounded-lg transition-colors",onClick:n,children:[a.jsxs("div",{className:"flex items-center min-w-0 flex-1",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 flex items-center justify-center flex-shrink-0",children:a.jsx(MC,{className:"w-5 h-5 text-primary-600"})}),a.jsxs("div",{className:"ml-3 min-w-0 flex-1",children:[a.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:e.title}),a.jsx("p",{className:"text-xs text-gray-500",children:e.site_name})]})]}),a.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0 ml-4",children:[a.jsx("span",{className:`px-2 py-1 text-xs font-medium rounded-full capitalize ${i[e.status]||i.draft}`,children:e.status}),a.jsx("span",{className:"text-xs text-gray-400",children:e.time_ago})]})]})},Zwe={globe:B1,topic:MC,warning:e=>a.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})}),rocket:pg,clock:TV,credit:L1},Jwe={globe:"bg-blue-100 text-blue-600",topic:"bg-purple-100 text-purple-600",warning:"bg-red-100 text-red-600",rocket:"bg-emerald-100 text-emerald-600",clock:"bg-amber-100 text-amber-600",credit:"bg-violet-100 text-violet-600"},Xwe=({active:e,payload:n,label:i})=>e&&n&&n.length?a.jsxs("div",{className:"bg-gray-900 text-white px-3 py-2 rounded-lg shadow-lg text-sm",children:[a.jsx("p",{className:"font-medium mb-1",children:i}),n.map((s,d)=>a.jsxs("p",{style:{color:s.color},children:[s.value," ",s.name]},d))]}):null;function e1e(){var pe,be,Oe,at,re;const e=Ot(),{user:n}
202=jr(),{sites:i,setSites:s,activeSiteId:d,setActiveSite:h}=ui(),[f,g]=j.useState(!0),[p,x]=j.useState(null),[y,v]=j.useState([]),[w,C]=j.useState([]),[E,S]=j.useState({balance:0}),[D,I]=j.useState([]),[M,B]=j.useState(!1),[R,F]=j.useState(!1),[V,P]=j.useState(null),[z,W]=j.useState(!1),[K,G]=j.useState(null),[Z,se]=j.useState(null),ge=j.useRef(null),Se=j.useRef(!0),Ae=j.useRef(!1),he=Array.isArray(i)?i:[];j.useEffect(()=>{ee()},[d]);const ee=async()=>{var ye;try{const Me=d?{site_id:d}:{},[Y,fe,Ne,Ue,it]=await Promise.all([ne.get("/sites"),ne.get("/dashboard/stats",{params:Me}),ne.get("/credits"),ne.get("/onboarding/status").catch(()=>({data:{onboarding_completed:!0}})),Ae.current?Promise.resolve(null):ne.get("/onboarding/first-blog-status").catch(()=>({data:{phase:"not_started"}}))]);s(Y.data),Y.data.length>0&&!d&&h(Y.data[0].id);const Ve=d||((ye=Y.data[0])==null?void 0:ye.id),mt=Y.data.find(Fe=>Fe.id===Ve);if(mt){const Fe=mt.crawl_status,ue=mt.topics_count||0,Re=mt.keywords_count||0,ke=mt.topic_generation_status,$e=!Fe||Fe==="pending"||Fe==="in_progress"||Fe==="failed"||Fe==="completed"&&ue===0,lt=ue>0&&Re===0,Ct=ke==="failed"||Fe==="failed",we=ke==="in_progress"||ke==="pending"||Fe==="pending"||Fe==="in_progress"||lt,Xe=`setup-ready-seen-${mt.id}`;Ct||we||$e?G({id:mt.id,name:mt.name}):Fe==="completed"&&ue>0&&Re>0&&!localStorage.getItem(Xe)?G({id:mt.id,name:mt.name,forceReady:!0}):G(null)}else G(null);if(x(fe.data.stats),v(fe.data.chart_data),C(fe.data.recent_activity),I(fe.data.next_steps||[]),S(Ne.data),it&&!Ae.current){const Fe=it.data;if(Fe!=null&&Fe.phase&&Fe.phase!=="not_started")se(Fe),["complete","failed"].includes(Fe.phase)?localStorage.removeItem("firstBlogGenerating"):le();else{const ue=localStorage.getItem("firstBlogGenerating");ue&&Date.now()-parseInt(ue,10)<3*60*1e3?(se({phase:"queued"}),le()):(localStorage.removeItem("firstBlogGenerating"),se(null))}}const ut=Ue.data;P(ut),ut.onboarding_completed||(ut.sites_count===0||ut.onboarding_step===0?F(!0):ut.onboarding_step>0&&ut.onboarding_step<3&&W(!0))}catch(Me){console.error("Failed to load dashboard data",Me)}finally{g(!1)}},le=j.useCallback(()=>{ge.current&&clearInterval(ge.current);const ye=Date.now(),Me=3*60*1e3,Y=async()=>{if(!Se.current){clearInterval(ge.current);return}if(Date.now()-ye>Me){clearInterval(ge.current),ge.current=null,Ae.current=!1,localStorage.removeItem("firstBlogGenerating"),se({phase:"failed",error:"Blog generation is taking longer than expected. Check your blogs page for updates."});return}try{const fe=await ne.get("/onboarding/first-blog-status");if(!Se.current)return;const Ne=fe.data;if(Ae.current&&Ne.phase==="not_started")return;se(Ne),(Ne.phase==="complete"||Ne.phase==="failed")&&(clearInterval(ge.current),ge.current=null,Ae.current=!1,localStorage.removeItem("firstBlogGenerating"))}catch{}};Y(),ge.current=setInterval(Y,3e3)},[]);j.useEffect(()=>(Se.current=!0,()=>{Se.current=!1,ge.current&&clearInterval(ge.current)}),[]);const je=async()=>{var ye,Me,Y,fe;try{Ae.current=!0,se({phase:"queued"}),localStorage.setItem("firstBlogGenerating",Date.now().toString());const Ne=await ne.post("/onboarding/generate-first-blog");if((ye=Ne.data)!=null&&ye.success)le();else{const Ue=((Me=Ne.data)==null?void 0:Me.error)||"Blog generation failed.";se({phase:"failed",error:Ue}),Ae.current=!1,localStorage.removeItem("firstBlogGenerating")}}catch(Ne){const Ue=((fe=(Y=Ne.response)==null?void 0:Y.data)==null?void 0:fe.error)||"Blog generation failed.";se({phase:"failed",error:Ue}),Ae.current=!1,localStorage.removeItem("firstBlogGenerating")}},ve=()=>{F(!1),W(!1),ee()},Ce=()=>{F(!1),W(!1),ee()},Q=()=>{const ye=p==null?void 0:p.credits_forecast_days;return ye==null?null:ye<=3?{text:`~${ye} day${ye!==1?"s":""} remaining`,color:"text-red-600"}:ye<=7?{text:`~${ye} days remaining`,color:"text-amber-600"}:{text:`~${ye} days remaining`,color:"text-gray-500"}};if(f)return a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})});if(R){const ye=((pe=V==null?void 0:V.sites)==null?void 0:pe[0])||null,Me=(V==null?void 0:V.onboarding_step)||0,Y=Me===0?0:Me===1?1:Me>=2?2:0;return a.jsx(Fwe,{initialStep:ye?Y:0,existingSite:ye,creditsBalance:E.balance??(V==null?void 0:V.credits_balance)??0,onComplete:ve,onDismiss:Ce})}if(he.length===0)return a.jsx("div",{className:"p-6 lg:p-8",children:a.jsxs("div",{className:"max-w-2xl mx-auto text-center py-16",children:[a.jsx("div",{className:"w-20 h-20 bg-primary-100 rounded-full flex items-center justify-center mx-auto mb-6",children:a.jsx(B1,{className:"w-10 h-10 text-primary-600"})}),a.jsxs("h1",{className:"text-3xl font-bold text-gray-900 mb-4",children:["Welcome, ",n==null?void 0:n.name,"!"]}),a.jsx("p",{className:"text-lg text-gray-600 mb-8",children:"Get started by connecting your first website. We'll help you automate your content creation."}),a.jsxs("button",{onClick:()=>e("/user/sites/add"),className:"btn-primary px-8 py-3 text-base",children:[a.jsx(N7,{className:"w-5 h-5 mr-2"}),"Connect Your First Website"]})]})});const te=Q();return a.jsxs("div",{className:"p-6 lg:p-8 space-y-6",children:[z&&a.jsx("div",{className:"bg-primary-50 border border-primary-200 rounded-xl p-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(pg,{className:"w-5 h-5 text-primary-600"}),a.jsxs("div",{className:"ml-3",children:[a.jsx("p",{className:"font-medium text-primary-800",children:"Continue your setup"}),a.jsx("p",{className:"text-sm text-primary-600",children:"You're almost there! Finish setting up to start generating blogs automatically."})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:()=>F(!0),className:"px-4 py-2 bg-primary-600 text-white rounded-lg font-medium text-sm hover:bg-primary-700 transition-colors",children:"Continue Setup"}),a.jsx("button",{onClick:()=>W(!1),className:"p-1 text-primary-400 hover:text-primary-600",children:a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})]})}),a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Dashboard"}),a.jsx("p",{className:"text-gray-500 mt-1",children:d?`Showing stats for ${((be=he.find(ye=>ye.id===d))==null?void 0:be.name)||"selected site"}
202`:`Welcome back, ${n==null?void 0:n.name}`})]}),a.jsxs("button",{onClick:()=>e("/user/blogs/create"),className:"btn-primary inline-flex items-center",children:[a.jsx(N7,{className:"w-5 h-5 mr-2"}),"Create Blog"]})]}),Z&&Z.phase!=="not_started"&&!K&&a.jsx("div",{className:`rounded-xl p-6 ${Z.phase==="complete"?"bg-green-50 border border-green-200":Z.phase==="failed"?"bg-amber-50 border border-amber-200":"bg-gradient-to-r from-primary-600 to-violet-600 text-white"}`,children:Z.phase==="complete"?a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"w-12 h-12 bg-green-100 rounded-xl flex items-center justify-center flex-shrink-0",children:a.jsx(qwe,{className:"w-6 h-6 text-green-600"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Your first blog is ready!"}),a.jsx("p",{className:"text-gray-600 text-sm mt-1",children:((Oe=Z.blog)==null?void 0:Oe.title)||Z.title}),(((at=Z.blog)==null?void 0:at.seo_score)||Z.seo_score)&&a.jsxs("span",{className:"inline-block mt-1 text-xs font-medium text-green-700 bg-green-100 px-2 py-0.5 rounded-full",children:["SEO Score: ",((re=Z.blog)==null?void 0:re.seo_score)||Z.seo_score,"/100"]})]})]}),a.jsx("button",{onClick:()=>{var ye;return e(`/user/blogs/${((ye=Z.blog)==null?void 0:ye.id)||Z.blog_id}/view`)},className:"px-5 py-2.5 bg-primary-600 text-white rounded-lg font-semibold text-sm hover:bg-primary-700 transition-colors flex-shrink-0",children:"View Blog"})]}):Z.phase==="failed"?a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(Kwe,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-amber-800",children:"Blog generation encountered an issue"}),a.jsx("p",{className:"text-sm text-amber-700 mt-1",children:Z.error||"Please try again."})]})]}),a.jsx("button",{onClick:je,className:"px-5 py-2.5 bg-amber-600 text-white rounded-lg font-semibold text-sm hover:bg-amber-700 transition-colors flex-shrink-0",children:"Retry"})]}):a.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"w-12 h-12 bg-white/20 rounded-xl flex items-center justify-center flex-shrink-0",children:a.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-white border-t-transparent"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold",children:"Generating your first blog..."}),a.jsxs("p",{className:"text-primary-100 text-sm mt-1",children:[Z.phase==="queued"&&"Finding the best keyword...",Z.phase==="keyword_selected"&&"Finding the best keyword...",Z.phase==="title_generated"&&`Writing: "${Z.title}"`,Z.phase==="content_generated"&&"Generating featured image...",Z.phase==="image_generated"&&"Scoring SEO quality..."]})]})]})})}),!K&&(p==null?void 0:p.total_blogs)===0&&he.length>0&&(!Z||Z.phase==="not_started")&&a.jsx("div",{className:"bg-gradient-to-r from-primary-600 to-violet-600 rounded-xl p-6 text-white",children:a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"w-12 h-12 bg-white/20 rounded-xl flex items-center justify-center flex-shrink-0",children:a.jsx(pg,{className:"w-6 h-6 text-white"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold",children:"Ready to generate your first blog?"}),a.jsx("p",{className:"text-primary-100 text-sm mt-1",children:"Your site is set up. Let BlogBotz create SEO-optimized content automatically."})]})]}),a.jsx("div",{className:"flex gap-3 flex-shrink-0",children:a.jsx("button",{onClick:je,className:"px-5 py-2.5 bg-white text-primary-700 rounded-lg font-semibold text-sm hover:bg-primary-50 transition-colors",children:"Generate First Blog"})})]})}),a.jsxs("div",{className:`grid gap-4 ${K?"grid-cols-1 lg:grid-cols-3":"grid-cols-1"}`,children:[a.jsx("div",{className:K?"lg:col-span-2":"",children:a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsx(Vp,{title:"Total Blogs",value:(p==null?void 0:p.total_blogs)||0,icon:MC,iconBg:"bg-primary-500",trend:p==null?void 0:p.weekly_trend}),a.jsx(Vp,{title:"Pending Review",value:(p==null?void 0:p.pending)||0,icon:TV,iconBg:"bg-amber-500",onClick:()=>e("/user/blogs?status=pending")}),a.jsx(Vp,{title:"Published",value:(p==null?void 0:p.published)||0,icon:pg,iconBg:"bg-emerald-500",onClick:()=>e("/user/blogs?status=published")}),a.jsx(Vp,{title:"Credit Balance",value:E.balance,icon:L1,iconBg:"bg-violet-500",subtitle:te==null?void 0:te.text,subtitleColor:te==null?void 0:te.color,onClick:()=>e("/user/credits")})]})}),K&&a.jsx("div",{className:"lg:col-span-1",children:a.jsx(Wwe,{siteId:K.id,siteName:K.name,forceReady:K.forceReady,onReady:()=>{localStorage.setItem(`setup-ready-seen-${K.id}`,"1"),G(null),ee()},onGenerateFirstBlog:(p==null?void 0:p.total_blogs)===0?je:void 0,firstBlogProgress:Z,creditsBalance:E.balance??0})})]}),D.length>0&&!M&&!K&&a.jsxs("div",{className:"bg-gradient-to-r from-primary-50 to-violet-50 border border-primary-200 rounded-xl p-5",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsx("h3",{className:"text-sm font-semibold text-gray-800 uppercase tracking-wide",children:"Suggested Next Steps"}),a.jsx("button",{onClick:()=>B(!0),className:"text-gray-400 hover:text-gray-600 p-1",children:a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:D.map(ye=>{const Me=Zwe[ye.icon]||B1,Y=Jwe[ye.icon]||"bg-gray-100 text-gray-600";return a.jsxs("button",{onClick:()=>e(ye.action),className:"flex items-start gap-3 p-3 bg-white rounded-lg border border-gray-200 hover:border-primary-300 hover:shadow-sm transition-all text-left",children:[a.jsx("div",{className:`w-9 h-9 rounded-lg flex items-center justify-center flex-shrink-0 ${Y}`,children:a.jsx(Me,{className:"w-5 h-5"})}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-gray-900",children:ye.title}),a.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:ye.description})]})]},ye.key)})})]}),(p==null?void 0:p.seo_total_scored)>0&&a.jsx(Ywe,{score:p.avg_seo_score,grade:p.seo_grade,above80:p.seo_above_80,totalScored:p.seo_total_scored,onClick:()=>e("/user/blogs")}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsxs("div",{className:"lg:col-span-2 bg-white rounded-xl border border-gray-200 p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-6",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Blog Generation"}),a.jsx("p",{className:"text-sm text-gray-500",children:"Last 30 days"})]}),a.jsxs("div",{className:"flex items-center gap-4 text-xs",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500 mr-1.5"}),a.jsx("span",{className:"text-gray-600",children:"Published"})]}),a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-amber-500 mr-1.5"}),a.jsx("span",{className:"text-gray-600",children:"Pending"})]}),a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-400 mr-1.5"}),a.jsx("span",{className:"text-gray-600",children:"Rejected"})]})]})]}),a.jsx("div",{className:"h-64",children:a.jsx(Kde,{width:"100%",height:"100%",children:a.jsxs(Iwe,{data:y,margin:{top:5,right:5,left:-20,bottom:5},children:[a.jsxs("defs",{children:[a.jsxs("linearGradient",{id:"colorPublished",x1:"0",y1:"0",x2:"0",y2:"1",children:[a.jsx("stop",{offset:"5%",
202stopColor:"#10b981",stopOpacity:.3}),a.jsx("stop",{offset:"95%",stopColor:"#10b981",stopOpacity:0})]}),a.jsxs("linearGradient",{id:"colorPending",x1:"0",y1:"0",x2:"0",y2:"1",children:[a.jsx("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.3}),a.jsx("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]}),a.jsxs("linearGradient",{id:"colorRejected",x1:"0",y1:"0",x2:"0",y2:"1",children:[a.jsx("stop",{offset:"5%",stopColor:"#f87171",stopOpacity:.3}),a.jsx("stop",{offset:"95%",stopColor:"#f87171",stopOpacity:0})]})]}),a.jsx(sV,{strokeDasharray:"3 3",stroke:"#f1f5f9"}),a.jsx(kV,{dataKey:"label",tick:{fontSize:12,fill:"#94a3b8"},tickLine:!1,axisLine:{stroke:"#e2e8f0"},interval:"preserveStartEnd"}),a.jsx(yV,{tick:{fontSize:12,fill:"#94a3b8"},tickLine:!1,axisLine:{stroke:"#e2e8f0"},allowDecimals:!1}),a.jsx(Mbe,{content:a.jsx(Xwe,{})}),a.jsx(fg,{type:"monotone",dataKey:"published",name:"Published",stroke:"#10b981",strokeWidth:2,fillOpacity:1,fill:"url(#colorPublished)",stackId:"1"}),a.jsx(fg,{type:"monotone",dataKey:"pending",name:"Pending",stroke:"#f59e0b",strokeWidth:2,fillOpacity:1,fill:"url(#colorPending)",stackId:"1"}),a.jsx(fg,{type:"monotone",dataKey:"rejected",name:"Rejected",stroke:"#f87171",strokeWidth:2,fillOpacity:1,fill:"url(#colorRejected)",stackId:"1"})]})})})]}),a.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Recent Activity"}),a.jsx("button",{onClick:()=>e("/user/blogs"),className:"text-sm text-primary-600 hover:text-primary-700 font-medium",children:"View all"})]}),a.jsx("div",{className:"space-y-1",children:w.length===0?a.jsx("p",{className:"text-sm text-gray-500 text-center py-8",children:"No recent activity"}):w.slice(0,5).map(ye=>a.jsx(Qwe,{activity:ye,onClick:()=>e(`/user/blogs/${ye.id}/view`)},ye.id))})]})]}),E.balance<=3&&a.jsx("div",{className:`rounded-xl p-4 ${E.balance===0?"bg-red-50 border border-red-200":"bg-amber-50 border border-amber-200"}`,children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(L1,{className:`w-5 h-5 ${E.balance===0?"text-red-500":"text-amber-500"}`}),a.jsxs("div",{className:"ml-3",children:[a.jsx("p",{className:`font-medium ${E.balance===0?"text-red-800":"text-amber-800"}`,children:E.balance===0?"No credits remaining":"Low credit balance"}),a.jsx("p",{className:`text-sm ${E.balance===0?"text-red-600":"text-amber-600"}`,children:E.balance===0?"Purchase credits to continue generating blogs":`You have ${E.balance} credit${E.balance!==1?"s":""} remaining`})]})]}),a.jsx("button",{onClick:()=>e("/user/credits"),className:`px-4 py-2 rounded-lg font-medium text-sm ${E.balance===0?"bg-red-600 text-white hover:bg-red-700":"bg-amber-600 text-white hover:bg-amber-700"}`,children:"Buy Credits"})]})})]})}const t1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),E7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})}),n1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"})}),S7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})}),yv=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),r1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})}),xv=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})});function i1e(){var ue,Re;const e=Ot(),{user:n,setAuth:i,token:s}=jr(),[d,h]=j.useState(""),[f,g]=j.useState(""),[p,x]=j.useState(""),[y,v]=j.useState(null),[w,C]=j.useState(null),[E,S]=j.useState(""),[D,I]=j.useState(""),[M,B]=j.useState(""),[R,F]=j.useState({}),[V,P]=j.useState(""),[z,W]=j.useState(""),[K,G]=j.useState(!1),[Z,se]=j.useState(!1),[ge,Se]=j.useState({blog_published:!0,first_blog_ready:!0,onboarding_complete:!0,low_credits:!0,welcome:!0}),[Ae,he]=j.useState(!1),[ee,le]=j.useState(!1),[je,ve]=j.useState(!1),[Ce,Q]=j.useState(""),[te,pe]=j.useState(""),[be,Oe]=j.useState(null),[at,re]=j.useState(!1);j.useEffect(()=>{n?(h(n.name||""),g(n.email||""),x(n.avatar||""),v(n.avatar||null)):fe(),ye(),Me()},[n]);const ye=async()=>{try{const ke=await ne.get("/profile/deletion-status");Oe(ke.data)}catch(ke){console.error("Failed to load deletion status",ke)}},Me=async()=>{try{const ke=await ne.get("/profile/email-preferences");Se(ke.data.email_preferences)}catch(ke){console.error("Failed to load email preferences",ke)}},Y=async ke=>{const $e=!ge[ke],lt={...ge,[ke]:$e};Se(lt),he(!0);try{await ne.put("/profile/email-preferences",{[ke]:$e})}catch{Se({...ge,[ke]:!$e}),P("Failed to update email preferences.")}finally{he(!1)}},fe=async()=>{try{const $e=(await ne.get("/profile")).data;h($e.name||""),g($e.email||""),x($e.avatar||""),v($e.avatar||null)}catch{P("Failed to load profile")}},Ne=()=>{const ke={};return(!d||d.trim().length<2)&&(ke.name="Name must be at least 2 characters"),f?/\S+@\S+\.\S+/.test(f)||(ke.email="Email is invali
202d"):ke.email="Email is required",D&&(D.length<8&&(ke.password="Password must be at least 8 characters"),E||(ke.currentPassword="Current password is required to change password"),D!==M&&(ke.passwordConfirmation="Passwords do not match")),F(ke),Object.keys(ke).length===0},Ue=ke=>{const $e=ke.target.files[0];if(!$e)return;if(!$e.type.match(/^image\/(jpeg|jpg|png|gif|webp)$/)){P("Please upload a valid image file (JPEG, PNG, GIF, or WebP)");return}if($e.size>5*1024*1024){P("Image size must be less than 5MB");return}const lt=new FileReader;lt.onloadend=()=>{v(lt.result)},lt.readAsDataURL($e),C($e),P("")},it=()=>{C(null),v(null),x("")},Ve=async ke=>{var $e,lt,Ct,we;if(ke.preventDefault(),P(""),W(""),F({}),!!Ne()){G(!0);try{let Xe;if(w){const X=new FormData;X.append("name",d),X.append("email",f),X.append("avatar",w),D&&(X.append("current_password",E),X.append("password",D),X.append("password_confirmation",M)),Xe=await ne.put("/profile",X)}else{const X={name:d,email:f};D&&(X.current_password=E,X.password=D,X.password_confirmation=M),p&&!y&&(X.remove_avatar=!0),Xe=await ne.put("/profile",X)}i(Xe.data.user,s),x(Xe.data.user.avatar||""),v(Xe.data.user.avatar||null),C(null),W("Profile updated successfully!"),S(""),I(""),B("")}catch(Xe){(lt=($e=Xe.response)==null?void 0:$e.data)!=null&<.errors?F(Xe.response.data.errors):P(((we=(Ct=Xe.response)==null?void 0:Ct.data)==null?void 0:we.message)||"Failed to update profile")}finally{G(!1)}}},mt=async ke=>{le(!0),P("");try{const $e=ke==="zip"?"/profile/export-data-zip":"/profile/export-data",lt=await ne.get($e,{responseType:"blob"}),Ct=window.URL.createObjectURL(new Blob([lt.data])),we=document.createElement("a");we.href=Ct,we.setAttribute("download",`my-data-export-${new Date().toISOString().split("T")[0]}.${ke==="zip"?"zip":"json"}`),document.body.appendChild(we),we.click(),we.remove(),window.URL.revokeObjectURL(Ct),W("Your data has been exported successfully!")}catch{P("Failed to export data. Please try again.")}finally{le(!1)}},ut=async()=>{var ke,$e,lt,Ct,we;if(!Ce){P("Please enter your password to confirm deletion.");return}re(!0),P("");try{const Xe=await ne.post("/profile/request-deletion",{password:Ce,reason:te||null});Oe({is_scheduled:!0,scheduled_deletion_at:Xe.data.scheduled_deletion_at,days_remaining:Xe.data.days_remaining}),ve(!1),Q(""),pe(""),W("Account scheduled for deletion. You have 30 days to cancel this request.")}catch(Xe){(lt=($e=(ke=Xe.response)==null?void 0:ke.data)==null?void 0:$e.errors)!=null&<.password?P(Xe.response.data.errors.password[0]):P(((we=(Ct=Xe.response)==null?void 0:Ct.data)==null?void 0:we.message)||"Failed to process deletion request.")}finally{re(!1)}},Fe=async()=>{var ke,$e;re(!0),P("");try{await ne.post("/profile/cancel-deletion"),Oe({is_scheduled:!1,scheduled_deletion_at:null,days_remaining:null}),W("Account deletion has been cancelled. Your account will remain active.")}catch(lt){P((($e=(ke=lt.response)==null?void 0:ke.data)==null?void 0:$e.error)||"Failed to cancel deletion request.")}finally{re(!1)}};return a.jsx("div",{className:"p-6 lg:p-8",children:a.jsxs("div",{className:"max-w-2xl mx-auto",children:[a.jsxs("div",{className:"mb-8",children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Profile Settings"}),a.jsx("p",{className:"text-gray-600 mt-1",children:"Manage your account information and password"})]}),z&&a.jsx(en,{type:"success",message:z,onClose:()=>W("")}),V&&a.jsx(en,{type:"error",message:V,onClose:()=>P("")}),a.jsxs("form",{onSubmit:Ve,className:"space-y-6",children:[a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"card-header",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Profile Information"})}),a.jsxs("div",{className:"card-body space-y-6",children:[a.jsxs("div",{className:"flex items-center gap-6",children:[a.jsx("div",{className:"w-20 h-20 rounded-full bg-primary-100 flex items-center justify-center overflow-hidden flex-shrink-0 border-2 border-gray-200",children:y?a.jsx(Ls,{src:y,alt:"Avatar",className:"w-full h-full object-cover",fallback:a.jsx("span",{className:"text-3xl font-semibold text-primary-600",children:((ue=d==null?void 0:d.charAt(0))==null?void 0:ue.toUpperCase())||"U"})}):a.jsx("span",{className:"text-3xl font-semibold text-primary-600",children:((Re=d==null?void 0:d.charAt(0))==null?void 0:Re.toUpperCase())||"U"})}),a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"font-medium text-gray-900",children:d||"Your Name"}),a.jsx("p",{className:"text-sm text-gray-500",children:f})]})]}),a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"name",className:"label",children:[a.jsx(t1e,{className:"w-4 h-4 inline mr-1.5"}),"Full Name"]}),a.jsx("input",{type:"text",id:"name",value:d,onChange:ke=>h(ke.target.value),className:R.name?"input-error":"input",placeholder:"Enter your full name"}),R.name&&a.jsx("p",{className:"mt-1 text-sm text-red-600",children:R.name})]}),a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"email",className:"label",children:[a.jsx(E7,{className:"w-4 h-4 inline mr-1.5"}),"Email Address"]}),a.jsx("input",{type:"email",id:"email",value:f,onChange:ke=>g(ke.target.value),className:R.email?"input-error":"input",placeholder:"Enter your email"}),R.email&&a.jsx("p",{className:"mt-1 text-sm text-red-600",children:R.email})]}),a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"avatar",className:"label",children:[a.jsx(S7,{className:"w-4 h-4 inline mr-1.5"}),"Profile Picture",a.jsx("span",{className:"text-gray-400 font-normal ml-1",children:"(optional)"})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("label",{htmlFor:"avatar-upload",className:"flex items-center justify-center px-4 py-2 border border-gray-300 rounded-lg text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 cursor-pointer transition-colors",children:[a.jsx(S7,{className:"w-4 h-4 mr-2"}),Z?"Uploading...":y?"Change Picture":"Upload Picture"]}),a.jsx("input",{type:"file",id:"avatar-upload",accept:"image/jpeg,image/jpg,image/png,image/gif,image/webp",onChange:Ue,className:"hidden",disabled:Z}),y&&a.jsx("button",{type:"button",onClick:it,className:"px-4 py-2 border border-red-300 rounded-lg text-sm font-medium text-red-700 bg-white hover:bg-red-50 transition-colors",children:"Remove"})]}),R.avatar&&a.jsx("p",{className:"mt-1 text-sm text-red-600",children:R.avatar}),a.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Supported formats: JPEG, PNG, GIF, WebP. Max size: 5MB"})]})]})]}),a.jsxs("div",{className:"card",children:[a.jsxs("div",{className:"card-header",children:[a.jsxs("h2",{className:"text-lg font-semibold text-gray-900",children:[a.jsx(n1e,{className:"w-5 h-5 inline mr-2"}),"Change Password"]}),a.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Leave blank to keep your current password"})]}),a.jsxs("div",{className:"card-body space-y-6",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"currentPassword",className:"label",children:"Current Password"}),a.jsx("input",{type:"password",id:"currentPassword",value:E,onChange:ke=>S(ke.target.value),className:R.currentPassword?"input-error":"input",placeholder:"Enter current password"}),R.currentPassword&&a.jsx("p",{className:"mt-1 text-sm text-red-600",children:R.currentPassword})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"password",className:"label",children:"New Password"}),a.jsx("input",{type:"password",id:"password",value:D,onChange:ke=>I(ke.target.value),className:R.password?"input-error":"input",placeholder:"Enter new password (min. 8 characters)"}),R.password&&a.jsx("p",{className:"mt-1 text-sm text-red-600",children:R.password})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"passwordConfirmation",className:"label",children:"Confirm New Password"}),a.jsx("input",{type:"password",id:"passwordConfirmation",value:M,onChange:ke=>B(ke.target.value),className:R.passwordConfirmation?"input-error":"input",placeholder:"Confirm new password"}),R.passwordConfirmation&&a.jsx("p",{className:"mt-1 text-sm text-red-600",children:R.passwordConfirmation})]})]})]}),a.jsxs("div",{className:"flex items-center justify-end gap-4",children:[a.jsx("button",{type:"button",onClick:()=>
202e("/user/dashboard"),className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",disabled:K,className:"btn-primary",children:K?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Saving..."]}):"Save Changes"})]})]}),a.jsxs("div",{className:"card mt-6",children:[a.jsxs("div",{className:"card-header",children:[a.jsxs("h2",{className:"text-lg font-semibold text-gray-900",children:[a.jsx(E7,{className:"w-5 h-5 inline mr-2"}),"Email Notifications"]}),a.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Choose which emails you'd like to receive"})]}),a.jsx("div",{className:"card-body",children:a.jsx("div",{className:"space-y-4",children:[{key:"blog_published",label:"Blog published",desc:"Get notified when a blog is published to your website"},{key:"first_blog_ready",label:"First blog ready",desc:"Receive a notification when your first blog is generated"},{key:"onboarding_complete",label:"Setup complete",desc:"Get a confirmation email when your automation setup is done"},{key:"low_credits",label:"Low credits warning",desc:"Get alerted when your credit balance is running low"},{key:"welcome",label:"Welcome email",desc:"Receive a welcome email after verifying your account"}].map(({key:ke,label:$e,desc:lt})=>a.jsxs("div",{className:"flex items-center justify-between py-2",children:[a.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[a.jsx("p",{className:"text-sm font-medium text-gray-900",children:$e}),a.jsx("p",{className:"text-xs text-gray-500",children:lt})]}),a.jsx("button",{type:"button",role:"switch","aria-checked":ge[ke],onClick:()=>Y(ke),disabled:Ae,className:`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 disabled:opacity-50 ${ge[ke]?"bg-primary-600":"bg-gray-200"}`,children:a.jsx("span",{className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${ge[ke]?"translate-x-5":"translate-x-0"}`})})]},ke))})})]}),a.jsxs("div",{className:"card mt-6",children:[a.jsxs("div",{className:"card-header",children:[a.jsxs("h2",{className:"text-lg font-semibold text-gray-900",children:[a.jsx(yv,{className:"w-5 h-5 inline mr-2"}),"Data & Privacy"]}),a.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Export your data or manage your account"})]}),a.jsx("div",{className:"card-body",children:a.jsx("div",{className:"space-y-4",children:a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-2",children:"Export Your Data"}),a.jsx("p",{className:"text-sm text-gray-500 mb-3",children:"Download a copy of all your data including profile, sites, blogs, and transaction history."}),a.jsxs("div",{className:"flex flex-wrap gap-3",children:[a.jsxs("button",{type:"button",onClick:()=>mt("json"),disabled:ee,className:"inline-flex items-center px-4 py-2 border border-gray-300 rounded-lg text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 transition-colors disabled:opacity-50",children:[a.jsx(yv,{className:"w-4 h-4 mr-2"}),ee?"Exporting...":"Export as JSON"]}),a.jsxs("button",{type:"button",onClick:()=>mt("zip"),disabled:ee,className:"inline-flex items-center px-4 py-2 border border-gray-300 rounded-lg text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 transition-colors disabled:opacity-50",children:[a.jsx(yv,{className:"w-4 h-4 mr-2"}),ee?"Exporting...":"Export as ZIP"]})]})]})})})]}),a.jsxs("div",{className:"card mt-6 border-red-200",children:[a.jsx("div",{className:"card-header bg-red-50 border-b border-red-200",children:a.jsxs("h2",{className:"text-lg font-semibold text-red-700",children:[a.jsx(xv,{className:"w-5 h-5 inline mr-2"}),"Danger Zone"]})}),a.jsx("div",{className:"card-body",children:be!=null&&be.is_scheduled?a.jsxs("div",{className:"space-y-4",children:[a.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:a.jsxs("div",{className:"flex items-start",children:[a.jsx(xv,{className:"w-5 h-5 text-yellow-600 mt-0.5 mr-3 flex-shrink-0"}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-yellow-800",children:"Account Scheduled for Deletion"}),a.jsxs("p",{className:"text-sm text-yellow-700 mt-1",children:["Your account is scheduled to be permanently deleted in"," ",a.jsxs("strong",{children:[be.days_remaining," days"]}),".",be.scheduled_deletion_at&&a.jsxs("span",{className:"block mt-1",children:["Deletion date: ",new Date(be.scheduled_deletion_at).toLocaleDateString()]})]})]})]})}),a.jsx("button",{type:"button",onClick:Fe,disabled:at,className:"inline-flex items-center px-4 py-2 border border-green-300 rounded-lg text-sm font-medium text-green-700 bg-white hover:bg-green-50 transition-colors disabled:opacity-50",children:at?"Processing...":"Cancel Deletion Request"})]}):a.jsx("div",{className:"space-y-4",children:a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-2",children:"Delete Account"}),a.jsx("p",{className:"text-sm text-gray-500 mb-3",children:"Permanently delete your account and all associated data. This action has a 30-day grace peri
202od during which you can cancel the request."}),a.jsxs("button",{type:"button",onClick:()=>ve(!0),className:"inline-flex items-center px-4 py-2 border border-red-300 rounded-lg text-sm font-medium text-red-700 bg-white hover:bg-red-50 transition-colors",children:[a.jsx(r1e,{className:"w-4 h-4 mr-2"}),"Delete My Account"]})]})})})]}),je&&a.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:a.jsxs("div",{className:"flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:p-0",children:[a.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity",onClick:()=>ve(!1)}),a.jsxs("div",{className:"relative inline-block w-full max-w-md p-6 my-8 text-left align-middle bg-white rounded-xl shadow-xl transform transition-all",children:[a.jsx("div",{className:"flex items-center justify-center w-12 h-12 mx-auto mb-4 rounded-full bg-red-100",children:a.jsx(xv,{className:"w-6 h-6 text-red-600"})}),a.jsx("h3",{className:"text-lg font-semibold text-center text-gray-900 mb-2",children:"Delete Your Account?"}),a.jsx("p",{className:"text-sm text-center text-gray-500 mb-6",children:"This will schedule your account for deletion in 30 days. You can cancel this request anytime during the grace period."}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"deletePassword",className:"label",children:["Confirm Password ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx("input",{type:"password",id:"deletePassword",value:Ce,onChange:ke=>Q(ke.target.value),className:"input",placeholder:"Enter your password"})]}),a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"deleteReason",className:"label",children:["Reason for leaving ",a.jsx("span",{className:"text-gray-400 font-normal",children:"(optional)"})]}),a.jsx("textarea",{id:"deleteReason",value:te,onChange:ke=>pe(ke.target.value),className:"input",rows:3,placeholder:"Help us improve by sharing your feedback..."})]})]}),a.jsxs("div",{className:"flex gap-3 mt-6",children:[a.jsx("button",{type:"button",onClick:()=>{ve(!1),Q(""),pe("")},className:"flex-1 btn-secondary",children:"Cancel"}),a.jsx("button",{type:"button",onClick:ut,disabled:at||!Ce,className:"flex-1 inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-lg text-sm font-medium text-white bg-red-600 hover:bg-red-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:at?"Processing...":"Delete Account"})]})]})]})})]})})}const o1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),D7={sm:"max-w-md",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl"};function PC({isOpen:e,onClose:n,title:i,children:s,size:d="md"}){return e?a.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:a.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4",children:[a.jsx("div",{className:"fixed inset-0 bg-gray-900/50 transition-opacity",onClick:n}),a.jsxs("div",{className:`relative w-full ${D7[d]||D7.md} bg-white rounded-xl shadow-xl`,onClick:h=>h.stopPropagation(),children:[i&&a.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:i}),a.jsx("button",{onClick:n,className:"p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",children:a.jsx(o1e,{className:"w-5 h-5"})})]}),a.jsx("div",{className:"p-6",children:s})]})]})}):null}const s1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})}),T7={danger:{icon:"bg-red-100 text-red-600",button:"btn-danger"},warning:{icon:"bg-amber-100 text-amber-600",button:"bg-amber-600 text-white hover:bg-amber-700 focus:ring-amber-500"},primary:{icon:"bg-primary-100 text-primary-600",button:"btn-primary"}};function rc({isOpen:e,onClose:n,onConfirm:i,title:s,message:d,confirmText:h="Confirm",cancelText:f="Cancel",variant:g="danger"}){const p=()=>{i(),n()},x=T7[g]||T7.danger;return a.jsx(PC,{isOpen:e,onClose:n,size:"sm",children:a.jsxs("div",{className:"text-center sm:text-left",children:[a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:`flex-shrink-0 w-12 h-12 rounded-full flex items-center justify-center ${x.icon}`,children:a.jsx(s1e,{className:"w-6 h-6"})}),a.jsxs("div",{className:"flex-1",children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:s}),a.jsx("p",{className:"text-sm text-gray-600 leading-relaxed",children:d})]})]}),a.jsxs("div",{className:"flex flex-col-reverse sm:flex-row sm:justify-end gap-3 mt-6",children:[a.jsx("button",{onClick:n,className:"btn-secondary",children:f}),a.jsx("button",{onClick:p,className:x.button,children:h})]})]})})}const a1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"})});function Is({children:e,content:n,position:i="top",showIcon:s=!0,className:d=""}){const[h,f]=j.useState(!1),[g,p]=j.useState({top:0,left:0}),x=j.useRef(null),y=j.useRef(null);return j.useEffect(()=>
202{if(h&&x.current&&y.current){const v=x.current.getBoundingClientRect(),w=y.current.getBoundingClientRect();let C=0,E=0;switch(i){case"top":C=v.top-w.height-8,E=v.left+v.width/2-w.width/2;break;case"bottom":C=v.bottom+8,E=v.left+v.width/2-w.width/2;break;case"left":C=v.top+v.height/2-w.height/2,E=v.left-w.width-8;break;case"right":C=v.top+v.height/2-w.height/2,E=v.right+8;break;default:C=v.top-w.height-8,E=v.left+v.width/2-w.width/2}const S=10;E<S&&(E=S),E+w.width>window.innerWidth-S&&(E=window.innerWidth-w.width-S),C<S&&(C=v.bottom+8),p({top:C,left:E})}},[h,i]),n?a.jsxs("div",{className:`relative inline-block ${d}`,children:[a.jsxs("div",{ref:x,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:"inline-flex items-center cursor-help",children:[e,s&&a.jsx(a1e,{className:"w-4 h-4 ml-1 text-gray-400 hover:text-gray-600 transition-colors"})]}),h&&a.jsxs("div",{ref:y,className:"fixed z-50 px-3 py-2 text-sm text-white bg-gray-900 rounded-lg shadow-lg max-w-xs pointer-events-none animate-fade-in",style:{top:`${g.top}px`,left:`${g.left}px`},children:[a.jsx("div",{className:"whitespace-pre-line",children:n}),a.jsx("div",{className:`absolute w-2 h-2 bg-gray-900 transform rotate-45 ${i==="top"?"bottom-[-4px] left-1/2 -translate-x-1/2":i==="bottom"?"top-[-4px] left-1/2 -translate-x-1/2":i==="left"?"right-[-4px] top-1/2 -translate-y-1/2":"left-[-4px] top-1/2 -translate-y-1/2"}`})]}),a.jsx("style",{jsx:!0,children:` 203 @keyframes fade-in { 204 from { 205 opacity: 0; 206 transform: translateY(-4px); 207 } 208 to { 209 opacity: 1; 210 transform: translateY(0); 211 } 212 } 213 .animate-fade-in { 214 animation: fade-in 0.2s ease-out; 215 } 216 `})]}):e}const I7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})}),vv=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),l1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})}),c1e=({className:e})=>a.jsxs("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),M7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}),IV=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),P7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),MV=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75
216a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})}),d1e=e=>{switch(e){case"completed":return{icon:IV,color:"text-emerald-600",bg:"bg-emerald-100",label:"Site Analyzed"};case"crawling":case"pending":return{icon:P7,color:"text-amber-600",bg:"bg-amber-100",label:"Analyzing"};case"failed":return{icon:MV,color:"text-red-600",bg:"bg-red-100",label:"Analysis Failed"};default:return{icon:P7,color:"text-gray-600",bg:"bg-gray-100",label:e||"Unknown"}}},u1e=(e,n)=>!n||n!=="wordpress"&&n!=="woocommerce"?null:e?{icon:IV,color:"text-emerald-600",bg:"bg-emerald-100",label:"Connected"}:{icon:MV,color:"text-amber-600",bg:"bg-amber-100",label:"Disconnected"};function h1e(){const e=Ot(),{sites:n,setSites:i,setActiveSite:s,activeSiteId:d}=ui(),[h,f]=j.useState(!0),[g,p]=j.useState({isOpen:!1,siteId:null,siteName:""}),[x,y]=j.useState({siteId:null,name:""}),[v,w]=j.useState(""),[C,E]=j.useState(""),S=Array.isArray(n)?n:[];j.useEffect(()=>{D();const R=setInterval(()=>{D()},3e4),F=()=>{document.hidden||D()};return document.addEventListener("visibilitychange",F),()=>{clearInterval(R),document.removeEventListener("visibilitychange",F)}},[]);const D=async()=>{try{const R=await ne.get("/sites");i(Array.isArray(R.data)?R.data:[])}catch(R){console.error("Failed to load sites",R)}finally{f(!1)}},I=async R=>{var V,P;const F=x.name.trim();if(!F){y({siteId:null,name:""});return}try{await ne.put(`/sites/${R}`,{name:F}),y({siteId:null,name:""}),D()}catch(z){w(((P=(V=z.response)==null?void 0:V.data)==null?void 0:P.message)||"Failed to update site name")}},M=(R,F)=>{p({isOpen:!0,siteId:R,siteName:F})},B=async()=>{var R,F;try{await ne.delete(`/sites/${g.siteId}`),w(""),E("Site deleted successfully"),D(),setTimeout(()=>E(""),3e3)}catch(V){w(((F=(R=V.response)==null?void 0:R.data)==null?void 0:F.message)||"Failed to delete site. Please try again.")}};return h?a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):a.jsxs("div",{className:"p-6 lg:p-8",children:[a.jsx(rc,{isOpen:g.isOpen,onClose:()=>p({isOpen:!1,siteId:null,siteName:""}),onConfirm:B,title:"Delete Site",message:`Are you sure you want to delete "${g.siteName}"? This action cannot be undone and will remove all associated topics and blogs.`,confirmText:"Delete",cancelText:"Cancel",variant:"danger"}),a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-8",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Manage Sites"}),a.jsx("p",{className:"text-gray-600 mt-1",children:"View and manage all your connected websites"})]}),a.jsxs("button",{onClick:()=>e("/user/sites/add"),className:"btn-primary",children:[a.jsx(vv,{className:"w-5 h-5 mr-2"}),"Add New Site"]})]}),v&&a.jsx(en,{type:"error",message:v,onClose:()=>w("")}),C&&a.jsx(en,{type:"success",message:C,onClose:()=>E("")}),S.length===0?a.jsxs("div",{className:"card p-12 text-center",children:[a.jsx(I7,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No sites connected"}),a.jsx("p",{className:"text-gray-500 mb-6",children:"Get started by connecting your first website."}),a.jsxs("button",{onClick:()=>e("/user/sites/add"),className:"btn-primary",children:[a.jsx(vv,{className:"w-5 h-5 mr-2"}),"Connect Website"]})]}):a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[S.map(R=>{const F=d1e(R.crawl_status),V=F.icon,P=u1e(R.api_connected,R.platform_type),z=P==null?void 0:P.icon,W=R.id===d;return a.jsx("div",{className:`card overflow-hidden transition-all hover:shadow-md ${W?"ring-2 ring-primary-500":""}`,children:a.jsxs("div",{className:"p-6",children:[a.jsxs("div",{className:"flex items-start justify-between mb-4",children:[a.jsxs("div",{className:"flex items-center min-w-0",children:[a.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-primary-400 to-primary-600 rounded-xl flex items-center justify-center flex-shrink-0",children:a.jsx(I7,{className:"w-6 h-6 text-white"})}),a.jsxs("div",{className:"ml-3 min-w-0",children:[x.siteId===R.id?a.jsx("input",{type:"text",value:x.name,onChange:K=>y({siteId:R.id,name:K.target.value}),onBlur:()=>I(R.id),onKeyDown:K=>{K.key==="Enter"&&I(R.id),K.key==="Escape"&&y({siteId:null,name:""})},autoFocus:!0,className:"input-field text-sm font-semibold w-full py-1 px-2"}):a.jsx("h3",{className:"font-semibold text-gray-900 truncate cursor-pointer hover:text-primary-600",onClick:()=>y({siteId:R.id,name:R.name}),title:"Click to edit site name",children:R.name}),a.jsx("p",{className:"text-sm text-gray-500 truncate",children:R.url})]})]}),W&&a.jsx("span",{className:"ml-2 px-2 py-1 text-xs font-medium bg-primary-100 text-primary-700 rounded-full flex-shrink-0",children:"Active"})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[a.jsx(Is,{content:F.label==="Site Analyzed"?"Your website has been successfully analyzed. Topics and categories have been extracted and are ready for blog generation.":F.label==="Analyzing"?"Your website is currently being analyzed. This process extracts topics, categories, and content structure.":F.label==="Analysis Failed"?R.crawl_error||"Website analysis failed. Please try re-analyzing your site or check if the website is accessible.":"Website analysis status",position:"top",showIcon:!1,children:a.jsxs("span",{className:`inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium ${F.bg} ${F.color}`,children:[a.jsx(V,{className:"w-3.5 h-3.5 mr-1"}),F.label]})}),R.platform_type&&a.jsx("span",{className:"px-2.5 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-600",children:R.platform_type}),P&&z&&a.jsx(Is,{content:P.label==="Connected"?"Your website is connected and active. You can publish blogs directly to your site.":"Your website is not connected. Go to Integrations to connect your site to BlogBotz.",position:"top",showIcon:!0,children:a.jsxs("span",{className:`inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium ${P.bg} ${P.color}`,children:[a.jsx(z,{className:"w-3.5 h-3.5 mr-1"}),P.label]})})]}),a.jsxs("div",{className:"flex items-center gap-4 py-3 border-t border-gray-100 text-sm text-gray-500",children:[a.jsxs("span",{className:"flex items-center",children:[a.jsx(M7,{className:"w-4 h-4 mr-1.5"}),R.topics_count||0," Topics"]}),R.blogs_count!==void 0&&a.jsxs("span",{className:"flex items-center",children:[a.jsx("svg",{className:"w-4 h-4 mr-1.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),R.blogs_count||0," Blogs"]})]}),a.jsxs("div",{className:"flex items-center gap-2 pt-4 border-t border-gray-100",children:[a.jsxs("button",{onClick:()=>{s(R.id),e(`/user/topics/${R.id}`)},className:"btn-primary flex-1",children:[a.jsx(M7,{className:"w-4 h-4 mr-1.5"}),"Topics"]}),a.jsx("button",{onClick:()=>e(`/user/automation/${R.id}`),className:"btn-secondary",title:"Automation Settings",children:a.jsx(c1e,{className:"w-4 h-4"})}),a.jsx("button",{onClick:()=>{s(R.id),e(`/user/sync/${R.id}`)},className:"btn-secondary",title:"Content Sync",children:a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"})})}),a.jsx("button",{onClick:()=>M(R.id,R.name),className:"btn-ghost text-red-600 hover:bg-red-50 hover:text-red-700",title:"Delete Site",children:a.jsx(l1e,{className:"w-4 h-4"})})]})]})},R.id)}),a.jsxs("button",{onClick:()=>e("/user/sites/add"),className:"card border-2 border-dashed border-gray-300 hover:border-primary-400 hover:bg-primary-50/50 transition-colors p-6 flex flex-col items-center justify-center min-h-[280px] group",children:[a.jsx("div",{className:"w-12 h-12 bg-gray-100 group-hover:bg-primary-100 rounded-xl flex items-center justify-center mb-4 transition-colors",children:a.jsx(vv,{className:"w-6 h-6 text-gray-400 group-hover:text-primary-600 transition-colors"})}),a.jsx("p",{className:"font-medium text-gray-600 group-hover:text-primary-700 transition-colors",children:"Add New Site"}),a.jsx("p",{className:"text-sm text-gray-400 mt-1",children:"Connect another website"})]})]})]})}const m1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})}),f1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"})}),p1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})}),g1e={wordpress:"WordPress",woocommerce:"WooCommerce",opencart:"OpenCart",shopify:"Shopify"},b1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})});function k1e(){const e=Ot(),{setSites:n,setActiveSite:i}=ui(),[s,d]=j.useState(""),[h,f]=j.useState(""),[g,p]=j.useState(!1),[x,y]=j.useState(""),[v,w]=j.useState(""),[C,E]=j.useState(null),[S,D]=j.useState(null),I=j.useRef(!0),M=j.useRef(null);j.useEffect(()=>(I.current=!0,()=>
216{I.current=!1,M.current&&clearTimeout(M.current)}),[]);const B=()=>(w(""),s?/^https?:\/\/.+/.test(s)?DV(s)?(w("This URL belongs to a well-known platform and cannot be registered. Please enter your own website URL. If you believe this is an error, contact support."),!1):!0:(w("Please enter a valid URL (must start with http:// or https://)"),!1):(w("Website URL is required"),!1)),R=async F=>{var V,P,z,W;if(F.preventDefault(),!!B()){y(""),p(!0);try{const K=await ne.post("/sites",{url:s,name:h||void 0}),G=K.data.site||K.data,Z=G.id,se=K.data.detected_platform||G.platform_type||null,ge=await ne.get("/sites");if(n(Array.isArray(ge.data)?ge.data:[]),i(Z),!I.current)return;E(se),D(Z),ne.post(`/sites/${Z}/quick-setup`).catch(()=>{}),M.current=setTimeout(()=>{I.current&&e("/user/dashboard")},1800)}catch(K){(P=(V=K.response)==null?void 0:V.data)!=null&&P.errors?y(Object.values(K.response.data.errors).flat().join(", ")):y(((W=(z=K.response)==null?void 0:z.data)==null?void 0:W.message)||"Failed to connect website. Please check the URL and try again.")}finally{p(!1)}}};return S?a.jsx("div",{className:"p-6 lg:p-8",children:a.jsx("div",{className:"max-w-xl mx-auto",children:a.jsxs("div",{className:"text-center py-16",children:[a.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx(b1e,{className:"w-8 h-8 text-green-600"})}),a.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Website Connected!"}),C?a.jsxs("p",{className:"text-gray-500 mb-2",children:["Detected platform: ",a.jsx("span",{className:"font-medium text-gray-700",children:g1e[C]||C})]}):null,a.jsx("p",{className:"text-gray-500 mb-6",children:"We're analyzing your site and generating topics. Redirecting to your dashboard..."}),a.jsx("div",{className:"flex justify-center",children:a.jsxs("svg",{className:"animate-spin h-6 w-6 text-primary-600",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})]})})}):a.jsx("div",{className:"p-6 lg:p-8",children:a.jsxs("div",{className:"max-w-xl mx-auto",children:[a.jsxs("button",{onClick:()=>e(-1),className:"flex items-center text-gray-600 hover:text-gray-900 mb-6",children:[a.jsx(p1e,{className:"w-4 h-4 mr-2"}),"Back"]}),a.jsxs("div",{className:"text-center mb-8",children:[a.jsx("div",{className:"w-16 h-16 bg-primary-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx(m1e,{className:"w-8 h-8 text-primary-600"})}),a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Connect a Website"}),a.jsx("p",{className:"text-gray-600 mt-2",children:"Add another website to automate blog content for"})]}),x&&a.jsx(en,{type:"error",message:x,onClose:()=>y("")}),a.jsx("div",{className:"card",children:a.jsx("div",{className:"card-body",children:a.jsxs("form",{onSubmit:R,className:"space-y-6",children:[a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"url",className:"label",children:[a.jsx(f1e,{className:"w-4 h-4 inline mr-1.5"}),"Website URL",a.jsx("span",{className:"text-red-500 ml-1",children:"*"}),a.jsx(Is,{content:"Enter your website URL (e.g., https://example.com). BlogBotz will detect the platform and analyze your site to generate relevant topics.",position:"top",showIcon:!0,className:"ml-2",children:a.jsx("span",{})})]}),a.jsx("input",{type:"url",id:"url",value:s,onChange:F=>{d(F.target.value),w("")},className:v?"input-error":"input",placeholder:"https://example.com",autoFocus:!0}),v&&a.jsx("p",{className:"mt-1.5 text-sm text-red-600",children:v}),a.jsx("p",{className:"mt-1.5 text-sm text-gray-500",children:"Supports WordPress, WooCommerce, OpenCart, Shopify, and custom websites"})]}),a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"name",className:"label",children:["Site Name",a.jsx("span",{className:"text-gray-400 font-normal ml-1",children:"(optional)"})]}),a.jsx("input",{type:"text",id:"name",value:h,onChange:F=>f(F.target.value),className:"input",placeholder:"My Blog"}),a.jsx("p",{className:"mt-1.5 text-sm text-gray-500",children:"A friendly name to identify your site. We'll use the domain name if left blank."})]}),a.jsx("button",{type:"submit",disabled:g,className:"btn-primary w-full py-3",children:g?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",f
216ill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Detecting platform..."]}):"Connect Website"})]})})}),a.jsxs("div",{className:"mt-6 p-4 bg-blue-50 rounded-lg border border-blue-100",children:[a.jsx("h3",{className:"text-sm font-medium text-blue-900 mb-2",children:"What happens after connecting?"}),a.jsxs("ul",{className:"text-sm text-blue-700 space-y-1",children:[a.jsx("li",{children:"⢠We detect your platform (WordPress, OpenCart, etc.)"}),a.jsx("li",{children:"⢠Your site is scanned to generate relevant blog topics"}),a.jsx("li",{children:"⢠You can review topics and start generating blogs right away"})]})]})]})})}const O7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}),y1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),x1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})}),B7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),v1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})}),w1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})}),L7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z"})}),R7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})}),_1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),A1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5"})}),C1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})});function z7(){const{siteId:e}=sc(),n=Ot(),{sites:i,setActiveSite:s,setSites:d}=ui(),[h,f]=j.useState([]),[g,p]=j.useState(!0),[x,y]=j.useState(!1),[v,w]=j.useState(""),[C,E]=j.useState(""),[S,D]=j.useState(null),I=j.useRef(null),[M,B]=j.useState(1),[R,F]=j.useState(10),[V,P]=j.useState(""),[z,W]=j.useState([]),[K,G]=j.useState(!1),[Z,se]=j.useState(!1),[ge,Se]=j.useState(null),[Ae,he]=j.useState({name:"",description:"",is_active:!0}),[ee,le]=j.useState(!1),[je,ve]=j.useState({isOpen:!1,topicId:null,topicName:""}),[Ce,Q]=j.useState({isOpen:!1,count:0}),[te,pe]=j.useState(null),be=Array.isArray(i)?i:[],Oe=be.find(we=>we.id===parseInt(e));j.useEffect(()=>(s(parseInt(e)),at(),()=>
216{I.current&&clearInterval(I.current)}),[e]);const at=async()=>{var we,Xe,X,We,et,Je;try{const[Ke,ce]=await Promise.allSettled([ne.get(`/sites/${e}`),ne.get(`/sites/${e}/topics`)]);if(Ke.status==="fulfilled")D(Ke.value.data),(Ke.value.data.crawl_status==="pending"||Ke.value.data.crawl_status==="in_progress")&&re();else{const Qe=(Xe=(we=Ke.reason)==null?void 0:we.response)==null?void 0:Xe.status;if(Qe===404){n("/user/dashboard",{replace:!0});return}else w(Qe===403?"You do not have permission to view this site.":"Failed to load site data. Please try refreshing the page.")}ce.status==="fulfilled"?f(ce.value.data):console.error("Failed to load topics:",(We=(X=ce.reason)==null?void 0:X.response)==null?void 0:We.status,(Je=(et=ce.reason)==null?void 0:et.response)==null?void 0:Je.data)}catch{w("Failed to load site data. Please try refreshing the page.")}finally{p(!1)}},re=()=>{I.current||(I.current=setInterval(async()=>{try{const we=await ne.get(`/sites/${e}`);D(we.data);const Xe=be.map(X=>X.id===parseInt(e)?we.data:X);d(Xe),(we.data.crawl_status==="completed"||we.data.crawl_status==="failed")&&(clearInterval(I.current),I.current=null,we.data.crawl_status==="completed"&&E("Website analysis completed! You can now generate topics."))}catch(we){console.error("Polling error:",we)}},3e3))},ye=async()=>{var we,Xe;y(!0),w("");try{const X=await ne.post(`/sites/${e}/topics/generate`);f(X.data),E("Topics generated and keywords discovered successfully!"),setTimeout(()=>E(""),3e3)}catch(X){w(((Xe=(we=X.response)==null?void 0:we.data)==null?void 0:Xe.message)||"Failed to generate topics")}finally{y(!1)}},Me=()=>{Se(null),he({name:"",description:"",is_active:!0}),se(!0)},Y=we=>{Se(we),he({name:we.name||"",description:we.description||"",is_active:we.is_active!==void 0?we.is_active:!0}),se(!0)},fe=async()=>{var we,Xe;if(!Ae.name.trim()){w("Topic name is required");return}le(!0),w("");try{if(ge&&ge.id){const X=await ne.put(`/topics/${ge.id}`,Ae);f(h.map(We=>We.id===ge.id?X.data:We)),E("Topic updated successfully!")}else{const We=(await ne.post(`/sites/${e}/topics`,{topics:[Ae]})).data[0];f([...h,We]),E("Topic added and keywords discovered!")}se(!1),setTimeout(()=>E(""),3e3)}catch(X){w(((Xe=(we=X.response)==null?void 0:we.data)==null?void 0:Xe.message)||"Failed to save topic")}finally{le(!1)}},Ne=we=>{ve({isOpen:!0,topicId:we.id,topicName:we.name})},Ue=async()=>{var we,Xe;try{await ne.delete(`/topics/${je.topicId}`),f(h.filter(X=>X.id!==je.topicId)),E("Topic deleted successfully!"),setTimeout(()=>E(""),3e3)}catch(X){w(((Xe=(we=X.response)==null?void 0:we.data)==null?void 0:Xe.message)||"Failed to delete topic")}finally{ve({isOpen:!1,topicId:null,topicName:""})}},it=async we=>{var Xe,X;pe(we),w("");try{await ne.post(`/sites/${e}/resync/keywords`,{topic_ids:[we]}),E("Keywords refreshed!");const We=await ne.get(`/sites/${e}/topics`);f(Array.isArray(We.data)?We.data:[]),setTimeout(()=>E(""),3e3)}catch(We){w(((X=(Xe=We.response)==null?void 0:Xe.data)==null?void 0:X.error)||"Failed to refresh keywords")}finally{pe(null)}},Ve=we=>{we.target.checked?W(ke.map(Xe=>Xe.id)):W([])},mt=we=>{W(Xe=>Xe.includes(we)?Xe.filter(X=>X!==we):[...Xe,we])},ut=()=>{z.length!==0&&Q({isOpen:!0,count:z.length})},Fe=async()=>{var Xe,X;G(!0),w("");const we=z.length;try{await ne.post("/topics/bulk-delete",{ids:z}),f(h.filter(We=>!z.includes(We.id))),W([]),E(`${we} topic(s) deleted successfully!`),setTimeout(()=>E(""),3e3)}catch(We){w(((X=(Xe=We.response)==null?void 0:Xe.data)==null?void 0:X.message)||"Failed to delete topics")}finally{G(!1),Q({isOpen:!1,count:0})}},ue=async()=>{try{const we=await ne.get(`/sites/${e}/topics/export`,{responseType:"blob"}),Xe=window.URL.createObjectURL(new Blob([we.data])),X=document.createElement("a");X.href=Xe,X.setAttribute("download",`topics-${e}-${new Date().toISOString().split("T")[0]}.csv`),document.body.appendChild(X),X.click(),X.remove(),E("Topics exported successfully!"),setTimeout(()=>E(""),3e3)}catch{w("Failed to export topics")}},Re=async we=>{var We,et;const Xe=we.target.files[0];if(!Xe)return;const X=new FormData;X.append("file",Xe),le(!0),w("");try{const Je=await ne.post(`/sites/${e}/topics/import`,X,{headers:{"Content-Type":"multipart/form-data"}});f(Je.data),E("Topics imported successfully!"),setTimeout(()=>E(""),3e3)}catch(Je){w(((et=(We=Je.response)==null?void 0:We.data)==null?void 0:et.message)||"Failed to import topics")}finally{le(!1),we.target.value=""}},ke=h.filter(we=>{var Xe,X;return((Xe=we.name)==null?void 0:Xe.toLowerCase().includes(V.toLowerCase()))||((X=we.description)==null?void 0:X.toLowerCase().includes(V.toLowerCase()))}),$e=Math.ceil(ke.length/R),lt=(M-1)*R,Ct=ke.slice(lt,lt+R);return g?a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):a.jsxs("div",{className:"p-6 lg:p-8",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-8",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Topics"}),a.jsx("p",{className:"text-gray-600 mt-1",children:Oe?`Managing topics for ${Oe.name}`:"Manage content topics for your site"})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("button",{onClick:()=>n("/user/blogs"),className:"btn-secondary flex items-center",children:[a.jsx(C1e,{className:"w-4 h-4 mr-2"}),"Blogs"]}),a.jsxs("button",{onClick:ue,className:"btn-secondary",title:"Export topics to CSV",children:[a.jsx(_1e,{className:"w-4 h-4 mr-2"}),"Export"]}),a.jsxs("label",{className:"btn-secondary cursor-pointer",children:[a.jsx(A1e,{className:"w-4 h-4 mr-2"}),"Import",a.jsx("input",{type:"file",accept:".csv",onChange:Re,className:"hidden"})]}),a.jsx("button",{onClick:ye,disabled:x||(S==null?void 0:S.crawl_status)!=="completed",className:"btn-secondary",title:(S==null?void 0:S.crawl_status)!=="completed"?"Website analysis must complete first":"",children:x?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Generating..."]}):a.jsxs(a.Fragment,{children:[a.jsx(L7,{className:"w-4 h-4 mr-2"}),"Generate"]})}),a.jsxs("button",{onClick:Me,className:"btn-primary",children:[a.jsx(B7,{className:"w-4 h-4 mr-2"}),"Add Topic"]})]})]}),a.jsxs("div",{className:"mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[a.jsx("div",{className:"flex-1 max-w-md",children:a.jsxs("div",{className:"relative",children:[a.jsx(R7,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),a.jsx("input",{type:"text",value:V,onChange:we=>{P(we.target.value),B(1)},placeholder:"Search topics...",className:"input pl-10 w-full"})]})}),z.length>0&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"text-sm text-gray-600",children:[z.length," selected"]}),a.jsx("button",{onClick:ut,disabled:K,className:"btn-danger text-sm",children:K?"Deleting...":`Delete Selected (${z.length})`})]})]}),v&&a.jsx(en,{type:"error",message:v,onClose:()=>w("")}),C&&a.jsx(en,{type:"success",message:C,onClose:()=>E("")}),S&&(S.crawl_status==="pending"||S.crawl_status==="in_progress")&&a.jsx("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded-lg",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"flex-shrink-0",children:a.jsx(y1e,{className:"w-5 h-5 text-amber-500"})}),a.jsxs("div",{className:"ml-3 flex-1",children:[a.jsx("h3",{className:"text-sm font-medium text-amber-800",children:"Analyzing your website"}),a.jsx("p",{className:"mt-1 text-sm text-amber-700",children:"We're scanning your website to understand its content and structure. This may take a few minutes. You can wait here or come back later."})]}),a.jsx("div",{className:"ml-4",children:a.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-amber-600"})})]})}),S&&S.crawl_status==="failed"&&a.jsx("div",{className:"mb-6 p-4 bg-red-50 border border-red-200 rounded-lg",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"flex-shrink-0",children:a.jsx(x1e,{className:"w-5 h-5 text-red-500"})}),a.jsxs("div",{className:"ml-3 flex-1",children:[a.jsx("h3",{className:"text-sm font-medium text-red-800",children:"Website analysis failed"}),a.jsx("p",{className:"mt-1 text-sm text-red-700",children:S.crawl_error||"We couldn't analyze your website. Please check the URL and try again, or add topics manually."}),a.jsx("p",{className:"mt-2 text-xs text-red-600",children:"If the issue persists, please contact support."})]})]})}),ke.length===0?a.jsxs("div",{className:"card p-12 text-center",children:[a.jsx(O7,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No topics yet"}),a.jsx("p",{className:"text-gray-500 mb-6",children:(S==null?void 0:S.crawl_status)==="completed"?"Generate topics automatically or add them manually.":(S==null?void 0:S.crawl_status)==="pending"||(S==null?void 0:S.crawl_status)==="in_progress"?"Wait for website analysis to complete, or add topics manually.":"Add topics manually to get started."}),a.jsxs("div",{className:"flex items-center justify-center gap-3",children:[a.jsxs("button",{onClick:ye,disabled:x||(S==null?void 0:S.crawl_status)!=="completed",className:"btn-primary",title:(S==null?void 0:S.crawl_status)!=="completed"?"Website analysis must complete first":"",children:[a.jsx(L7,{className:"w-4 h-4 mr-2"}),x?"Generating...":"Generate Topics"]}),a.jsxs("button",{onClick:Me,className:"btn-secondary",children:[a.jsx(B7,{className:"w-4 h-4 mr-2"}),"Add Manually"]})]})]}):a.jsxs("div",{className:"card overflow-hidden",children:[a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[a.jsx("thead",{className:"bg-gray-50",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-12",children:a.jsx("input",{type:"checkbox",checked:z.length>0&&z.length===Ct.length,onChange:Ve,className:"rounded border-gray-300 text-primary-600 focus:ring-primary-500"})}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-16",children:"Sn"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Topic Name"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Keywords"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Blogs Generated"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),a.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:Ct.map((we,Xe)=>a.jsxs("tr",{className:"hover:bg-gray-50",children:[a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:a.jsx("input",{type:"checkbox",checked:z.includes(we.id),onChange:()=>mt(we.id),className:"rounded border-gray-300 text-primary-600 focus:ring-primary-500"})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:a.jsx("span",{className:"text-sm text-gray-600",children:lt+Xe+1})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"w-8 h-8 bg-primary-100 rounded-lg flex items-center justify-center mr-3",children:a.jsx(O7,{className:"w-4 h-4 text-primary-600"})}),a.jsx("div",{className:"text-sm font-medium text-gray-900",children:we.name})]})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:we.id?a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>n(`/user/keywords/${we.id}`),className:"text-primary-600 hover:text-primary-900 hover:underline font-medium text-sm transition-colors",children:[we.trending_keywords_count||0," keywords"]}),we.keywords_last_refreshed_at&&a.jsx("p",{className:"text-[10px] text-gray-400 mt-0.5",children:(()=>{const X=Math.floor((Date.now()-new Date(we.keywords_last_refreshed_at))/864e5);return X===0?"Refreshed today":X===1?"Refreshed yesterday":`Refreshed ${X}d ago`})()})]}):a.jsx("span",{className:"text-sm text-gray-600",children:we.trending_keywords_count||0})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:(()=>{const X=we.blogs_count||0,We=we.trending_keywords_count||0,et=We>0?Math.min(100,Math.round(X/We*100)):0,Je=et>=75?"bg-green-500":et>=50?"bg-blue-500":et>=25?"bg-amber-500":"bg-gray-300";return a.jsx("div",{className:"flex items-center gap-2",children:a.jsxs("div",{className:"flex-1 min-w-[80px]",children:[a.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[a.jsxs("span",{className:"font-medium text-gray-700",children:[X," / ",We]}),a.jsxs("span",{className:"text-gray-500",children:[et,"%"]})]}),a.jsx("div",{className:"w-full bg-gray-200 rounded-full h-1.5",children:a.jsx("div",{className:`h-1.5 rounded-full transition-all ${Je}`,style:{width:`${et}%`}})})]})})})()}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:a.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${we.is_active!==!1?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800"}`,children:we.is_active!==!1?"Active":"Inactive"})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:a.jsxs("div",{className:"flex items-center gap-2",children:[we.id&&a.jsxs(a.Fragment,{children:[a.jsx("button",{onClick:()=>n(`/user/keywords/${we.id}`),className:"text-primary-600 hover:text-primary-900",title:"Manage Keywords",children:a.jsx(R7,{className:"w-5 h-5"})}),a.jsx("button",{onClick:()=>it(we.id),disabled:te===we.id,className:"text-amber-600 hover:text-amber-900 disabled:opacity-50",title:"Refresh Keywords",children:te===we.id?a.jsxs("svg",{className:"animate-spin w-5 h-5",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):a.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"})})})]}),a.jsx("button",{onClick:()=>Y(we),className:"text-blue-600 hover:text-blue-900",title:"Edit Topic",children:a.jsx(w1e,{className:"w-5 h-5"})}),a.jsx("button",{onClick:()=>Ne(we),className:"text-red-600 hover:text-red-900",title:"Delete Topic",children:a.jsx(v1e,{className:"w-5 h-5"})})]})})]}
216,we.id||we.name))})]})}),$e>1&&a.jsxs("div",{className:"bg-gray-50 px-6 py-4 flex items-center justify-between border-t border-gray-200",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsxs("span",{className:"text-sm text-gray-700",children:["Showing ",lt+1," to ",Math.min(lt+R,ke.length)," of ",ke.length," topics"]}),a.jsxs("select",{value:R,onChange:we=>{F(Number(we.target.value)),B(1)},className:"text-sm border-gray-300 rounded-md",children:[a.jsx("option",{value:10,children:"10 per page"}),a.jsx("option",{value:25,children:"25 per page"}),a.jsx("option",{value:50,children:"50 per page"}),a.jsx("option",{value:100,children:"100 per page"})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:()=>B(we=>Math.max(1,we-1)),disabled:M===1,className:"px-3 py-2 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50",children:"Previous"}),a.jsxs("span",{className:"text-sm text-gray-700",children:["Page ",M," of ",$e]}),a.jsx("button",{onClick:()=>B(we=>Math.min($e,we+1)),disabled:M===$e,className:"px-3 py-2 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50",children:"Next"})]})]})]}),a.jsx(PC,{isOpen:Z,onClose:()=>se(!1),title:ge?"Edit Topic":"Add Topic",size:"md",children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"label",children:"Topic Name *"}),a.jsx("input",{type:"text",value:Ae.name,onChange:we=>he({...Ae,name:we.target.value}),className:"input",placeholder:"Enter topic name"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"label",children:"Description"}),a.jsx("textarea",{value:Ae.description,onChange:we=>he({...Ae,description:we.target.value}),className:"input min-h-[100px] resize-none",placeholder:"Brief description of this topic",rows:4})]}),a.jsxs("div",{className:"flex items-center",children:[a.jsx("input",{type:"checkbox",id:"is_active",checked:Ae.is_active,onChange:we=>he({...Ae,is_active:we.target.checked}),className:"h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 rounded"}),a.jsx("label",{htmlFor:"is_active",className:"ml-2 block text-sm text-gray-900",children:"Active (Topic will be used for blog generation)"})]}),v&&a.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg",children:a.jsx("p",{className:"text-sm text-red-800",children:v})}),a.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-gray-200",children:[a.jsx("button",{onClick:()=>se(!1),className:"btn-secondary",disabled:ee,children:"Cancel"}),a.jsx("button",{onClick:fe,disabled:ee||!Ae.name.trim(),className:"btn-primary",children:ee?"Saving...":ge?"Update Topic":"Add Topic"})]})]})}),a.jsx(rc,{isOpen:je.isOpen,onClose:()=>ve({isOpen:!1,topicId:null,topicName:""}),onConfirm:Ue,title:"Delete Topic",message:`Are you sure you want to delete "${je.topicName}"? This action cannot be undone and will remove all associated keywords and blogs.`,confirmText:"Delete",cancelText:"Cancel",variant:"danger"}),a.jsx(rc,{isOpen:Ce.isOpen,onClose:()=>Q({isOpen:!1,count:0}),onConfirm:Fe,title:"Delete Selected Topics",message:`Are you sure you want to delete ${Ce.count} topic(s)? This action cannot be undone and will remove all associated keywords and blogs.`,confirmText:"Delete All",cancelText:"Cancel",variant:"danger"})]})}const wv=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})}),j1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})}),F7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 18L9 11.25l4.306 4.307a11.95 11.95 0 015.814-5.519l2.74-1.22m0 0l-5.94-2.28m5.94 2.28l-2.28 5.941"})}),N1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 01-1.043 3.296 3.745 3.745 0 01-3.296 1.043A3.745 3.745 0 0112 21c-1.268 0-2.39-.63
216-3.068-1.593a3.746 3.746 0 01-3.296-1.043 3.745 3.745 0 01-1.043-3.296A3.745 3.745 0 013 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 011.043-3.296 3.746 3.746 0 013.296-1.043A3.746 3.746 0 0112 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 013.296 1.043 3.746 3.746 0 011.043 3.296A3.745 3.745 0 0121 12z"})}),$7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),E1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})}),V7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z"})}),S1e=e=>e>=80?"text-emerald-600 bg-emerald-100":e>=60?"text-blue-600 bg-blue-100":e>=40?"text-amber-600 bg-amber-100":"text-gray-600 bg-gray-100";function D1e(){const{topicId:e}=sc(),n=Ot(),[i,s]=j.useState([]),[d,h]=j.useState(!0),[f,g]=j.useState("all"),[p,x]=j.useState(""),[y,v]=j.useState(""),[w,C]=j.useState(1),[E,S]=j.useState(10),[D,I]=j.useState(""),[M,B]=j.useState([]),[R,F]=j.useState(!1),[V,P]=j.useState(!1),[z,W]=j.useState(""),[K,G]=j.useState(!1),[Z,se]=j.useState(!1),[ge,Se]=j.useState({isOpen:!1,keywordId:null,keyword:""}),[Ae,he]=j.useState({isOpen:!1,count:0});j.useEffect(()=>{ee()},[e]);const ee=async()=>{try{const Y=await ne.get(`/topics/${e}/keywords`);s(Y.data)}catch(Y){console.error("Failed to load keywords",Y),x("Failed to load keywords")}finally{h(!1)}},le=async Y=>{var fe,Ne;if(Y.preventDefault(),!!z.trim()){G(!0),x("");try{const Ue=await ne.post(`/topics/${e}/keywords`,{keyword:z.trim()});s([...i,Ue.data]),W(""),P(!1),v("Keyword added successfully!"),setTimeout(()=>v(""),3e3)}catch(Ue){x(((Ne=(fe=Ue.response)==null?void 0:fe.data)==null?void 0:Ne.message)||"Failed to add keyword")}finally{G(!1)}}},je=async()=>{var Y,fe,Ne;se(!0),x("");try{const it=((Y=(await ne.post(`/topics/${e}/keywords/discover`)).data)==null?void 0:Y.count)||0;v(`Discovered ${it} keywords!`),await ee(),setTimeout(()=>v(""),3e3)}catch(Ue){x(((Ne=(fe=Ue.response)==null?void 0:fe.data)==null?void 0:Ne.message)||"Failed to start keyword discovery")}finally{se(!1)}},ve=Y=>{Se({isOpen:!0,keywordId:Y.id,keyword:Y.keyword})},Ce=async()=>{var Y,fe;try{await ne.delete(`/keywords/${ge.keywordId}`),s(i.filter(Ne=>Ne.id!==ge.keywordId)),v("Keyword deleted successfully!"),setTimeout(()=>v(""),3e3)}catch(Ne){x(((fe=(Y=Ne.response)==null?void 0:Y.data)==null?void 0:fe.message)||"Failed to delete keyword")}finally{Se({isOpen:!1,keywordId:null,keyword:""})}},Q=Y=>{Y.target.checked?B(at.map(fe=>fe.id)):B([])},te=Y=>{B(fe=>fe.includes(Y)?fe.filter(Ne=>Ne!==Y):[...fe,Y])},pe=()=>{M.length!==0&&he({isOpen:!0,count:M.length})},be=async()=>{var fe,Ne;F(!0),x("");const Y=M.length;try{await ne.post("/keywords/bulk-delete",{ids:M}),s(i.filter(Ue=>!M.includes(Ue.id))),B([]),v(`${Y} keyword(s) deleted successfully!`),setTimeout(()=>v(""),3e3)}catch(Ue){x(((Ne=(fe=Ue.response)==null?void 0:fe.data)==null?void 0:Ne.message)||"Failed to delete keywords")}finally{F(!1),he({isOpen:!1,count:0})}},at=(f==="all"?i:f==="available"?i.filter(Y=>!Y.used_at):i.filter(Y=>Y.used_at)).filter(Y=>{var fe;return(fe=Y.keyword)==null?void 0:fe.toLowerCase().includes(D.toLowerCase())}),re=Math.ceil(at.length/E),ye=(w-1)*E,Me=at.slice(ye,ye+E);return d?a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):a.jsxs("div",{className:"p-6 lg:p-8",children:[a.jsxs("button",{onClick:()=>n(-1),className:"flex items-center text-gray-600 hover:text-gray-900 mb-6",children:[a.jsx(j1e,{className:"w-4 h-4 mr-2"}),"Back to Topics"]}),p&&a.jsx(en,{type:"error",message:p,onClose:()=>x("")}),y&&a.jsx(en,{type:"success",message:y,onClose:()=>v("")}),a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-8",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-12 h-12 bg-primary-100 rounded-xl flex items-center justify-center",children:a.jsx(F7,{className:"w-6 h-6 text-primary-600"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Keywords"}),a.jsx("p",{className:"text-gray-600",children:"Manage keywords for c
216ontent generation"})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:je,disabled:Z,className:"btn-secondary",children:Z?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Discovering..."]}):a.jsxs(a.Fragment,{children:[a.jsx(V7,{className:"w-4 h-4 mr-2"}),"Discover"]})}),a.jsxs("button",{onClick:()=>P(!0),className:"btn-primary",children:[a.jsx($7,{className:"w-4 h-4 mr-2"}),"Add Keyword"]})]})]}),V&&a.jsx("div",{className:"card p-4 mb-6",children:a.jsxs("form",{onSubmit:le,className:"flex items-center gap-3",children:[a.jsx("input",{type:"text",value:z,onChange:Y=>W(Y.target.value),placeholder:"Enter keyword...",className:"input flex-1",autoFocus:!0}),a.jsx("button",{type:"submit",disabled:K||!z.trim(),className:"btn-primary",children:K?"Adding...":"Add"}),a.jsx("button",{type:"button",onClick:()=>{P(!1),W("")},className:"btn-secondary",children:"Cancel"})]})}),a.jsxs("div",{className:"mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx("div",{className:"flex items-center gap-2",children:["all","available","used"].map(Y=>a.jsx("button",{onClick:()=>g(Y),className:`px-4 py-2 rounded-lg text-sm font-medium capitalize transition-colors ${f===Y?"bg-primary-600 text-white":"bg-white text-gray-600 hover:bg-gray-100 border border-gray-200"}`,children:Y},Y))}),a.jsxs("div",{className:"relative",children:[a.jsx(wv,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),a.jsx("input",{type:"text",value:D,onChange:Y=>{I(Y.target.value),C(1)},placeholder:"Search keywords...",className:"input pl-10 w-64"})]})]}),M.length>0&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"text-sm text-gray-600",children:[M.length," selected"]}),a.jsx("button",{onClick:pe,disabled:R,className:"btn-danger text-sm",children:R?"Deleting...":`Delete Selected (${M.length})`})]})]}),at.length===0?a.jsxs("div",{className:"card p-12 text-center",children:[a.jsx(wv,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No keywords found"}),a.jsx("p",{className:"text-gray-500 mb-6",children:f==="all"?"No keywords yet. Add keywords manually or use auto-discovery.":`No ${f} keywords.`}),f==="all"&&a.jsxs("div",{className:"flex items-center justify-center gap-3",children:[a.jsxs("button",{onClick:je,disabled:Z,className:"btn-primary",children:[a.jsx(V7,{className:"w-4 h-4 mr-2"}),Z?"Discovering...":"Discover Keywords"]}),a.jsxs("button",{onClick:()=>P(!0),className:"btn-secondary",children:[a.jsx($7,{className:"w-4 h-4 mr-2"}),"Add Manually"]})]})]}):a.jsxs("div",{className:"card overflow-hidden",children:[a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[a.jsx("thead",{className:"bg-gray-50",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-12",children:a.jsx("input",{type:"checkbox",checked:M.length>0&&M.length===Me.length,onChange:Q,className:"rounded border-gray-300 text-primary-600 focus:ring-primary-500"})}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-16",children:"Sn"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Keyword"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Trend Score"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Search Volume"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Language"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),a.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:Me.map((Y,fe)=>a.jsxs("tr",{className:`hover:bg-gray-50 ${Y.used_at?"opacity-75":""}`,children:[a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:a.jsx("input",{type:"checkbox",checked:M.includes(Y.id),onChange:()=>te(Y.id),disabled:Y.used_at,className:"rounded border-gray-300 text-primary-600 focus:ring-primary-500"})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:a.jsx("span",{className:"text-sm text-gray-600",children:ye+fe+1})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"w-8 h-8 bg-primary-100 rounded-lg flex items-center justify-center mr-3",children:a.jsx(wv,{className:"w-4 h-4 text-primary-600"})}),a.jsx("div",{className:"text-sm font-medium text-gray-900",children:Y.keyword}),Y.used_at&&a.jsx(N1e,{className:"w-4 h-4 text-emerald-500 ml-2"})]})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:Y.trend_score!==null&&Y.trend_score!==void 0?a.jsxs("span",{className:`inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium ${S1e(Y.trend_score*100)}`,children:[a.jsx(F7,{className:"w-3.5 h-3.5 mr-1"}),(Y.trend_score*100).toFixed(0)]}):a.jsx("span",{className:"text-sm text-gray-400",children:"-"})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:Y.search_volume?a.jsx("span",{className:"text-sm text-gray-900",children:Y.search_volume.toLocaleStr
216ing()}):a.jsx("span",{className:"text-sm text-gray-400",children:"-"})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:Y.language_code?a.jsx("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-600",children:Y.language_code.toUpperCase()}):a.jsx("span",{className:"text-sm text-gray-400",children:"-"})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:a.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Y.used_at?"bg-emerald-100 text-emerald-800":"bg-blue-100 text-blue-800"}`,children:Y.used_at?"Used":"Available"})}),a.jsxs("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:[!Y.used_at&&a.jsx("button",{onClick:()=>ve(Y),className:"text-red-600 hover:text-red-900",title:"Delete keyword",children:a.jsx(E1e,{className:"w-5 h-5"})}),Y.used_at&&a.jsx("span",{className:"text-gray-400 text-xs",children:"-"})]})]},Y.id))})]})}),re>1&&a.jsxs("div",{className:"bg-gray-50 px-6 py-4 flex items-center justify-between border-t border-gray-200",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsxs("span",{className:"text-sm text-gray-700",children:["Showing ",ye+1," to ",Math.min(ye+E,at.length)," of ",at.length," keywords"]}),a.jsxs("select",{value:E,onChange:Y=>{S(Number(Y.target.value)),C(1)},className:"text-sm border-gray-300 rounded-md",children:[a.jsx("option",{value:10,children:"10 per page"}),a.jsx("option",{value:25,children:"25 per page"}),a.jsx("option",{value:50,children:"50 per page"}),a.jsx("option",{value:100,children:"100 per page"})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:()=>C(Y=>Math.max(1,Y-1)),disabled:w===1,className:"px-3 py-2 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50",children:"Previous"}),a.jsxs("span",{className:"text-sm text-gray-700",children:["Page ",w," of ",re]}),a.jsx("button",{onClick:()=>C(Y=>Math.min(re,Y+1)),disabled:w===re,className:"px-3 py-2 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50",children:"Next"})]})]})]}),i.length>0&&a.jsxs("div",{className:"mt-8 grid grid-cols-1 sm:grid-cols-3 gap-4",children:[a.jsxs("div",{className:"card p-4",children:[a.jsx("p",{className:"text-sm text-gray-500",children:"Total Keywords"}),a.jsx("p",{className:"text-2xl font-bold text-gray-900",children:i.length})]}),a.jsxs("div",{className:"card p-4",children:[a.jsx("p",{className:"text-sm text-gray-500",children:"Available"}),a.jsx("p",{className:"text-2xl font-bold text-blue-600",children:i.filter(Y=>!Y.used_at).length})]}),a.jsxs("div",{className:"card p-4",children:[a.jsx("p",{className:"text-sm text-gray-500",children:"Used"}),a.jsx("p",{className:"text-2xl font-bold text-emerald-600",children:i.filter(Y=>Y.used_at).length})]})]}),a.jsx(rc,{isOpen:ge.isOpen,onClose:()=>Se({isOpen:!1,keywordId:null,keyword:""}),onConfirm:Ce,title:"Delete Keyword",message:`Are you sure you want to delete "${ge.keyword}"? This action cannot be undone.`,confirmText:"Delete",cancelText:"Cancel",variant:"danger"}),a.jsx(rc,{isOpen:Ae.isOpen,onClose:()=>he({isOpen:!1,count:0}),onConfirm:be,title:"Delete Selected Keywords",message:`Are you sure you want to delete ${Ae.count} keyword(s)? This action cannot be undone.`,confirmText:"Delete All",cancelText:"Cancel",variant:"danger"})]})}const T1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z"})}),U7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),I1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),W7=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),M1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14"})}),P1e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),H7=[{key:"mon",label:"Mon"},{key:"tue",label:"Tue"},{key:"wed",label:"Wed"},{key:"thu",label:"Thu"},{key:"fri",label:"Fri"},{key:"sat",label:"Sat"},{key:"sun",label:"Sun"}],O1e={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},G7=["mon","tue","wed","thu","fri","sat","sun"],OC=[];for(let e=6;e<=23;e++)for(let n=0;n<60;n+=30){const i=`${String(e).padStart(2,"0")}
216:${String(n).padStart(2,"0")}`,s=e>=12?"PM":"AM",h=`${e===0?12:e>12?e-12:e}:${String(n).padStart(2,"0")} ${s}`;OC.push({value:i,label:h})}const B1e=[{value:60,label:"1 hour"},{value:120,label:"2 hours"},{value:180,label:"3 hours"},{value:240,label:"4 hours"}],L1e=[{group:"US / Canada",options:[{value:"America/New_York",label:"Eastern Time (ET) â New York, Toronto"},{value:"America/Chicago",label:"Central Time (CT) â Chicago, Dallas"},{value:"America/Denver",label:"Mountain Time (MT) â Denver, Phoenix"},{value:"America/Los_Angeles",label:"Pacific Time (PT) â Los Angeles, Vancouver"},{value:"America/Anchorage",label:"Alaska Time (AKT) â Anchorage"},{value:"Pacific/Honolulu",label:"Hawaii Time (HST) â Honolulu"}]},{group:"Europe",options:[{value:"Europe/London",label:"GMT / BST â London, Dublin"},{value:"Europe/Paris",label:"CET / CEST â Paris, Berlin, Rome, Madrid"},{value:"Europe/Helsinki",label:"EET / EEST â Helsinki, Kyiv, Tallinn"},{value:"Europe/Moscow",label:"MSK â Moscow, St. Petersburg"},{value:"Europe/Istanbul",label:"TRT â Istanbul, Ankara"}]},{group:"Asia / Pacific",options:[{value:"Asia/Dubai",label:"GST â Dubai, Abu Dhabi (UTC+4)"},{value:"Asia/Karachi",label:"PKT â Karachi, Lahore (UTC+5)"},{value:"Asia/Kolkata",label:"IST â Mumbai, Delhi, Bangalore (UTC+5:30)"},{value:"Asia/Dhaka",label:"BST â Dhaka (UTC+6)"},{value:"Asia/Bangkok",label:"ICT â Bangkok, Jakarta (UTC+7)"},{value:"Asia/Singapore",label:"SGT â Singapore, Kuala Lumpur (UTC+8)"},{value:"Asia/Shanghai",label:"CST â Beijing, Shanghai, Hong Kong (UTC+8)"},{value:"Asia/Tokyo",label:"JST â Tokyo, Osaka (UTC+9)"},{value:"Asia/Seoul",label:"KST â Seoul (UTC+9)"},{value:"Australia/Sydney",label:"AEST â Sydney, Melbourne (UTC+10/11)"},{value:"Australia/Perth",label:"AWST â Perth (UTC+8)"},{value:"Pacific/Auckland",label:"NZST â Auckland, Wellington (UTC+12/13)"}]},{group:"Latin America",options:[{value:"America/Sao_Paulo",label:"BRT â São Paulo, Rio de Janeiro (UTC-3)"},{value:"America/Argentina/Buenos_Aires",label:"ART â Buenos Aires (UTC-3)"},{value:"America/Bogota",label:"COT â Bogotá, Lima (UTC-5)"},{value:"America/Mexico_City",label:"CST â Mexico City (UTC-6)"}]},{group:"Africa / Middle East",options:[{value:"Africa/Cairo",label:"EET â Cairo (UTC+2)"},{value:"Africa/Johannesburg",label:"SAST â Johannesburg (UTC+2)"},{value:"Africa/Lagos",label:"WAT â Lagos, Nairobi (UTC+1)"},{value:"Asia/Riyadh",label:"AST â Riyadh, Baghdad (UTC+3)"},{value:"Asia/Tehran",label:"IRST â Tehran (UTC+3:30)"}]},{group:"UTC",options:[{value:"UTC",label:"UTC â Coordinated Universal Time"}]}],PV=["General Readers","Young Professionals","Small Business Owners","Parents & Families","Students","Tech Enthusiasts","Health & Fitness","Fashion & Beauty","Home & Garden","Food & Cooking","Pet Owners","Seniors"],R1e=e=>{if(!e)return{selected:[],custom:""};const n=e.split(",").map(d=>d.trim()).filter(Boolean),i=[],s=[];return n.forEach(d=>{const h=PV.find(f=>f.toLowerCase()===d.toLowerCase());h?i.push(h):s.push(d)}),{selected:i,custom:s.join(", ")}},q7=(e,n)=>{const i=[...e];return n.trim()&&n.split(",").map(s=>s.trim()).filter(Boolean).forEach(s=>{i.some(d=>d.toLowerCase()===s.toLowerCase())||i.push(s)}),i.join(", ")},z1e=(e,n,i)=>{if(n<=1)return[e];const[s,d]=e.split(":").map(Number),h=[];for(let f=0;f<n;f++){const g=s*60+d+f*i,p=Math.floor(g/60)%24,x=g%60;h.push(`${String(p).padStart(2,"0")}:${String(x).padStart(2,"0")}`)}return h},F1e=e=>{if(!e)return"";const n=OC.find(g=>g.value===e);if(n)return n.label;const[i,s]=e.split(":"),d=parseInt(i),h=d>=12?"PM":"AM";return`${d===0?12:d>12?d-12:d}:${s} ${h}`},kl=(e,n)=>{if(!e||!e[n])return null;const i=e[n];return typeof i=="string"?{time:i,count:1}:{time:i.time||"09:00",count:i.count||1}};function $1e(){const{siteId:e}=sc();Ot();const{sites:n}=ui(),[i,s]=j.useState(null),[d,h]=j.useState([]),[f,g]=j.useState(!0),[p,x]=j.useState(!1),[y,v]=j.useState(null),[w,C]=j.useState(null),[E,S]=j.useState(!1),[D,I]=j.useState([]),[M,B]=j.useState(!1),F=(Array.isArray(n)?n:[]).find(Q=>Q.id===parseInt(e)),V=j.useCallback(async()=>{try{B(!0);const Q=await ne.get(`/sites/${e}/automation-logs`);I(Q.data||[])}catch{}finally{B(!1)}},[e]),P=j.useCallback(async()=>{var Q;try{g(!0);const[te,pe]=await Promise.all([ne.get(`/sites/${e}/automation-settings`),ne.get("/languages")]),be=te.data,Oe={...be,schedule_days:be.schedule_days||[],schedule_times:be.schedule_times||{},blog_gap_minutes:be.blog_gap_minutes||120,timezone:be.timezone||"UTC"};s(Oe),h(((Q=pe.data)==null?void 0:Q.languages)||[]),v(null)}catch(te){console.error("Failed to fetch data:",te),v("Failed to load automation settings")}finally{g(!1)}},[e]);j.useEffect(()=>{P(),V()},[P,V]);const z=(Q,te)=>{s(pe=>({...pe,[Q]:te})),S(!0)},W=Q=>{s(te=>({...te,...Q})),S(!0)},K=async()=>{var Q;if(i!=null&&i.automation_enabled&&(!(i!=null&&i.schedule_days)||i.schedule_days.length===0)){v("Select at least one publishing day to enable automation");return}try{x(!0),v(null);const{id:te,site_id:pe,created_at:be,updated_at:Oe,default_language_object:at,defaultLanguage:re,...ye}=i,Y=(await ne.post(`/sites/${e}/automation-settings`,ye)).data;s(fe=>({...fe,...Y,schedule_days:Y.schedule_days||[],schedule_times:Y.schedule_times||{},blog_gap_minutes:Y.blog_gap_minutes||120,timezone:Y.timezone||"UTC"})),C("Settings saved successfully"),S(!1),setTimeout(()=>C(null),3e3)}catch(te){console.error("Failed to save settings:",te);const pe=(Q=te.response)==null?void 0:Q.data;if(pe!=null&&pe.errors){const be=Object.values(pe.errors).flat().join(", ");v(be)}else v((pe==null?void 0:pe.error)||(pe==null?void 0:pe.message)||te.message||"Failed to save settings")}finally{x(!1)}},G=async()=>{var Q,te;try{x(!0);const pe=!i.automation_enabled;await ne.post(`/sites/${e}/automation-settings`,{...i,automation_enabled:pe}),s(be=>({...be,automation_enabled:pe})),C(pe?"Automation enabled":"Automation disabled"),setTimeout(()=>C(null),3e3)}catch(pe){console.error("Failed to toggle automation:",pe),v(((te=(Q=pe.response)==null?void 0:Q.data)==null?void 0:te.error)||"Failed to toggle automation")}finally{x(!1)}};if(f)return a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})});if(!F)return a.jsx("div",{className:"p-6",children:a.jsx("div",{className:"bg-red-50 border border-red-200 rounded-xl p-4",children:a.jsx("p",{className:"text-red-800",children:"Site not found"})})});const Z=(i==null?void 0:i.schedule_days)||[],se=(i==null?void 0:i.schedule_times)||{},ge=()=>Z.reduce((Q,te)=>{const pe=kl(se,te);return Q+(pe?pe.count:1)},0),Se=(Q,te)=>{let pe=0,be=1;return Q.forEach(Oe=>{const at=kl(te,Oe),re=at?at.count:1;pe+=re,re>be&&(be=re)}),{schedule_days:Q,schedule_times:te,posts_per_week:Math.max(pe,1),max_posts_per_day:be}},Ae=Q=>{let te,pe;Z.includes(Q)?(te=Z.filter(be=>be!==Q),pe={...se},delete pe[Q]):(te=[...Z,Q],pe={...se,[Q]:{time:"09:00",count:1}}),W(Se(te,pe))}
216,he=(Q,te)=>{const pe=kl(se,Q)||{time:"09:00",count:1},be={...se,[Q]:{...pe,time:te}};W(Se(Z,be))},ee=(Q,te)=>{const pe=kl(se,Q)||{time:"09:00",count:1},be=Math.max(1,Math.min(5,pe.count+te)),Oe={...se,[Q]:{...pe,count:be}};W(Se(Z,Oe))},le=[...Z].sort((Q,te)=>G7.indexOf(Q)-G7.indexOf(te)),je=ge(),ve=Z.some(Q=>{const te=kl(se,Q);return te&&te.count>1}),Ce=(i==null?void 0:i.blog_gap_minutes)??120;return a.jsxs("div",{className:"p-6 lg:p-8 max-w-7xl mx-auto",children:[a.jsxs("div",{className:"mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Automation Settings"}),a.jsxs("p",{className:"text-gray-500 mt-1",children:["Configure automated blog generation and publishing for ",F.name]})]}),a.jsx("button",{onClick:K,disabled:!E||p,className:"inline-flex items-center px-4 py-2.5 bg-primary-600 text-white text-sm font-medium rounded-lg hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:p?"Saving...":"Save Changes"})]}),y&&a.jsx("div",{className:"mb-6 bg-red-50 border border-red-200 rounded-xl p-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("p",{className:"text-red-800",children:y}),a.jsx("button",{onClick:()=>v(null),className:"text-red-600 hover:text-red-800",children:a.jsx(U7,{className:"w-5 h-5"})})]})}),w&&a.jsx("div",{className:"mb-6 bg-emerald-50 border border-emerald-200 rounded-xl p-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("p",{className:"text-emerald-800",children:w}),a.jsx("button",{onClick:()=>C(null),className:"text-emerald-600 hover:text-emerald-800",children:a.jsx(U7,{className:"w-5 h-5"})})]})}),a.jsx("div",{className:"mb-6 bg-white rounded-xl border border-gray-200 p-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx("div",{className:`p-3 rounded-xl ${i!=null&&i.automation_enabled?"bg-emerald-500":"bg-gray-400"}`,children:a.jsx(T1e,{className:"w-6 h-6 text-white"})}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Automated Blog Generation"}),a.jsx("p",{className:"text-gray-500 mt-1",children:i!=null&&i.automation_enabled?"BlogBotz will automatically generate blog posts based on your schedule.":"Enable automation to automatically generate blog posts on a schedule."})]})]}),a.jsx("button",{onClick:G,disabled:p,className:`relative inline-flex h-7 w-12 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-600 focus:ring-offset-2 disabled:opacity-50 ${i!=null&&i.automation_enabled?"bg-emerald-500":"bg-gray-200"}`,role:"switch","aria-checked":i==null?void 0:i.automation_enabled,children:a.jsx("span",{className:`pointer-events-none inline-block h-6 w-6 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${i!=null&&i.automation_enabled?"translate-x-5":"translate-x-0"}`})})]})}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-6",children:[a.jsxs("div",{className:"flex items-start justify-between gap-4 mb-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(W7,{className:"w-5 h-5 text-primary-600"}),a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Publishing Schedule"})]}),a.jsxs("div",{className:"flex-shrink-0",children:[a.jsx("label",{className:"block text-xs font-medium text-gray-500 mb-1 text-right",children:"Timezone"}),a.jsx("select",{value:(i==null?void 0:i.timezone)||"UTC",onChange:Q=>z("timezone",Q.target.value),className:"px-2 py-1.5 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 bg-white max-w-[220px]",children:L1e.flatMap(Q=>[a.jsxs("option",{disabled:!0,value:"",children:["ââ ",Q.group," ââ"]},`__group__${Q.group}`),...Q.options.map(te=>a.jsx("option",{value:te.value,children:te.label},te.value))])})]})]}),a.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Pick the days and times to publish your blogs"}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Select publishing days"}),a.jsx("div",{className:"grid grid-cols-7 gap-2",children:H7.map(Q=>{const te=Z.includes(Q.key);return a.jsx("button",{type:"button",onClick:()=>Ae(Q.key),className:`rounded-lg py-2.5 text-xs font-semibold transition-all ${te?"bg-primary-600 text-white shadow-md":"bg-gray-100 text-gray-500 hover:bg-gray-200 hover:text-gray-700"}`,children:Q.label},Q.key)})}),Z.length===0&&a.jsx("p",{className:"mt-1.5 text-xs text-red-500",children:"Select at least one day to set up your schedule"})]}),le.length>0&&a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Blogs per day & time"}),a.jsx("div",{className:"space-y-2",children:le.map(Q=>{var pe;const te=kl(se,Q)||{time:"09:00",count:1};return a.jsxs("div",{className:"flex items-center gap-3 bg-gray-50 rounded-lg px-4 py-3",children:[a.jsx("span",{className:"text-sm font-medium text-gray-700 w-12 shrink-0",children:(pe=H7.find(be=>be.key===Q))==null?void 0:pe.label}),a.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[a.jsx("button",{type:"button",onClick:()=>ee(Q,-1),disabled:te.count<=1,className:"w-7 h-7 rounded-md flex items-center justify-center border border-gray-300 bg-white text-gray-500 hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed",children:a.jsx(M1e,{className:"w-3.5 h-3.5"})}),a.jsx("span",{className:"w-8 text-center text-sm font-semibold text-gray-900",children:te.count}),a.jsx("button",{type:"button",onClick:()=>ee(Q,1),disabled:te.count>=5,className:"w-7 h-7 rounded-md flex items-center justify-center border border-gray-300 bg-white text-gray-500 hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed",children:a.jsx(P1e,{className:"w-3.5 h-3.5"})}),a.jsx("span",{className:"text-xs text-gray-400 ml-1",children:te.count===1?"blog":"blogs"})]}),a.jsxs("div",{className:"flex items-center gap-1.5 ml-auto",children:[a.jsx(I1e,{className:"w-3.5 h-3.5 text-gray-400"}),a.jsx("select",{value:te.time,onChange:be=>he(Q,be.target.value),className:"px-2 py-1 text-sm border border-gray-300 rounded-md focus:ring-2 focus:ring-primary-500 focus:border-primary-500 bg-white",children:OC.map(be=>a.jsx("option",{value:be.value,children:be.label},be.value))})]})]},Q)})})]}),ve&&a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Gap between blogs"}),a.jsx("select",{value:Ce,onChange:Q=>z("blog_gap_minutes",parseInt(Q.target.value,10)),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500",children:B1e.map(Q=>a.jsx("option",{value:Q.value,children:Q.label},Q.value))}),a.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Time between each blog publish on days with multiple blogs"})]}),a.jsxs("label",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg border border-gray-100 cursor-pointer",children:[a.jsx("input",{type:"checkbox",checked:(i==null?void 0:i.auto_publish)||!1,onChange:Q=>z("auto_publish",Q.target.checked),className:"w-4 h-4 text-primary-600 border-gray-300 rounded focus:ring-primary-500"}),a.jsxs("div",{children:[a.jsx("span",{className:"text-sm font-medium text-gray-700 block",children:"Auto-publish blogs"}),a.jsx("span",{className:"text-xs text-gray-400",children:"Blogs will be published automatically without manual approval"})]})]}),le.length>0&&a.jsxs("div",{className:"bg-gradient-to-br from-primary-50 to-purple-50 rounded-xl border border-primary-100 p-5",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(W7,{className:"w-4 h-4 text-primary-600"}),a.jsx("span",{className:"text-sm font-semibold text-primary-900",children:"Your Weekly Schedule"})]}),a.jsx("div",{className:"space-y-1.5",children:le.map(Q=>{const te=kl(se,Q)||{time:"09:00",count:1},pe=z1e(te.time,te.count,Ce);return a.jsxs("div",{className:"flex items-center justify-between py-2 px-3 bg-white rounded-lg border border-primary-100",children:[a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx("span",{className:"w-2 h-2 rounded-full bg-primary-500"}),a.jsx("span",{className:"text-sm font-medium text-gray-900",children:O1e[Q]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("span",{className:"text-xs text-gray-400",children:pe.map(be=>F1e(be)).join(", ")}),a.jsxs("span",{className:"text-sm font-semibold text-primary-600",children:[te.count," ",te.count===1?"Blog":"Blogs"]})]})]},Q)})}),a.jsxs("div",{className:"mt-3 pt-3 border-t border-primary-100 text-xs text-gray-500 text-center",children:[a.jsx("span",{className:"font-semibold text-primary-600",children:je})," blog",je!==1?"s":""," per week across ",a.jsx("span",{className:"font-semibold text-primary-600",children:le.length})," day",le.length!==1?"s":""]})]})]})]}),a.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-6",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Content Settings"}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Article Length"}),a.jsxs("select",{value:(i==null?void 0:i.article_length)||"medium",onChange:Q=>z("article_length",Q.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500",children:[a.jsx("option",{value:"short",children:"Short (500-800 words)"}),a.jsx("option",{value:"medium",children:"Medium (1000-1500 words)"}),a.jsx("option",{value:"long",children:"Long (2000-3000 words)"})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Writing Tone"}),a.jsxs("select",{value:(i==null?void 0:i.writing_tone)||"professional",onChange:Q=>z("writing_tone",Q.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500",children:[a.jsx("option",{value:"professional",children:"Professional"}),a.jsx("option",{value:"casual",children:"Casual"}),a.jsx("option",{value:"friendly",children:"Friendly"}),a.jsx("option",{value:"formal",children:"Formal"})]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Content Style"}),a.jsxs("select",{value:(i==null?void 0:i.content_style)||"informative",onChange:Q=>z("content_style",Q.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500",children:[a.jsx("option",{value:"informative",children:"Informative"}),a.jsx("option",{value:"persuasive",children:"Persuasive"}),a.jsx("option",{value:"entertaining",children:"Entertaining"}),a.jsx("option",{value:"tutorial",children:"Tutorial"}),a.jsx("option",{value:"review",children:"Review"}),a.jsx("option",{value:"listicle",children:"Listicle"})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Image Style"}),a.jsxs("select",{value:(i==null?void 0:i.image_style)||"professional",onChange:Q=>z("image_style",Q.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500",children:[a.jsx("option",{value:"professional",children:"Professional"}),a.jsx("option",{value:"illustration",children:"Illustration"}),a.jsx("option",{value:"realistic",children:"Realistic"}),a.jsx("option",{value:"minimalist",children:"Minimalist"}),a.jsx("option",{value:"artistic",children:"Artistic"}),a.jsx("option",{value:"3d",children:"3D"})]})]})]}),a.jsxs("div",{className:"flex items-center justify-between py-2",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-gray-700",children:"Image Text Overlay"}),a.jsx("p",{className:"text-xs text-gray-500",children:"Randomly add title text on ~35% of images for a more authentic look"})]}),a.jsx("button",{type:"button",onClick:()=>z("image_text_overlay",!(i!=null&&i.image_text_overlay)),className:`relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 ${(i==null?void 0:i.image_text_overlay)!==!1?"bg-primary-600":"bg-gray-200"}`,children:a.jsx("span",{className:`pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${(i==null?void 0:i.image_text_overlay)!==!1?"translate-x-5":"translate-x-0"}`})})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Call to Action"}),a.jsxs("select",{value:(i==null?void 0:i.cta_type)||"soft",onChange:Q=>z("cta_type",Q.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500",children:[a.jsx("option",{value:"none",children:"None"}),a.jsx("option",{value:"soft",children:"Soft CTA"}),a.jsx("option",{value:"strong",children:"Strong CTA"})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Language"}),a.jsxs("select",{value:(i==null?void 0:i.default_language_id)||"",onChange:Q=>z("default_language_id",Q.target.value?parseInt(Q.target.value):null),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500",children:[a.jsx("option",{value:"",children:"Auto-detect"}),d.map(Q=>a.jsx("option",{value:Q.id,children:Q.name}
216,Q.id))]})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Target Audience"}),(()=>{const{selected:Q,custom:te}=R1e(i==null?void 0:i.target_audience),pe=Oe=>{const at=Q.includes(Oe)?Q.filter(re=>re!==Oe):[...Q,Oe];z("target_audience",q7(at,te))},be=Oe=>{z("target_audience",q7(Q,Oe))};return a.jsxs("div",{className:"space-y-3",children:[a.jsx("div",{className:"flex flex-wrap gap-2",children:PV.map(Oe=>a.jsx("button",{type:"button",onClick:()=>pe(Oe),className:`px-3 py-1.5 text-xs font-medium rounded-full border transition-all ${Q.includes(Oe)?"bg-primary-600 text-white border-primary-600":"bg-white text-gray-600 border-gray-300 hover:border-primary-300 hover:text-primary-600"}`,children:Oe},Oe))}),a.jsx("input",{type:"text",value:te,onChange:Oe=>be(Oe.target.value),placeholder:"Add custom audiences (comma-separated)",className:"w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500"})]})})()]})]})]}),a.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-6",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Features"}),a.jsx("div",{className:"space-y-3",children:[{key:"internal_linking_enabled",label:"Internal Linking",desc:"Link to other blog posts"},{key:"include_external_links",label:"External Links",desc:"Include relevant external resources"},{key:"include_faq",label:"FAQ Section",desc:"Add FAQ section to articles"},{key:"include_toc",label:"Table of Contents",desc:"Add table of contents for long articles"},{key:"product_recommendations_enabled",label:"Product Recommendations",desc:"Include relevant product recommendations"}].map(Q=>a.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[a.jsx("input",{type:"checkbox",checked:(i==null?void 0:i[Q.key])||!1,onChange:te=>z(Q.key,te.target.checked),className:"w-4 h-4 text-primary-600 border-gray-300 rounded focus:ring-primary-500"}),a.jsxs("div",{children:[a.jsx("span",{className:"text-sm font-medium text-gray-700",children:Q.label}),a.jsx("p",{className:"text-xs text-gray-500",children:Q.desc})]})]},Q.key))})]}),a.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-6",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Quality Control"}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Min SEO Score"}),a.jsx("input",{type:"number",value:(i==null?void 0:i.min_seo_score)||80,onChange:Q=>z("min_seo_score",parseInt(Q.target.value,10)),min:0,max:100,className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500"}),a.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Below this score may be regenerated"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Max Regen Attempts"}),a.jsx("input",{type:"number",value:(i==null?void 0:i.max_regeneration_attempts)||2,onChange:Q=>z("max_regeneration_attempts",parseInt(Q.target.value,10)),min:0,max:5,className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500"})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Forbidden Words"}),a.jsx("input",{type:"text",value:Array.isArray(i==null?void 0:i.forbidden_words)?i.forbidden_words.join(", "):"",onChange:Q=>z("forbidden_words",Q.target.value.split(",").map(te=>te.trim()).filter(te=>te)),placeholder:"competitor, spam, forbidden (comma-separated)",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500"}),a.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Words that should not appear in generated content"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Custom Instructions"}),a.jsx("textarea",{value:(i==null?void 0:i.custom_instructions)||"",onChange:Q=>z("custom_instructions",Q.target.value),rows:3,placeholder:"Add custom instructions for c
216ontent generation...",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500"})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Pricing Information",a.jsx("span",{className:"ml-1 text-xs font-normal text-gray-400",children:"(used in commercial/comparison blogs)"})]}),a.jsx("textarea",{value:(i==null?void 0:i.pricing_info)||"",onChange:Q=>z("pricing_info",Q.target.value),rows:4,placeholder:`e.g. 217Starter Plan: $19/mo â 5 users, basic features 218Pro Plan: $49/mo â 25 users, advanced analytics 219Enterprise: Custom pricing â unlimited users, dedicated support 220Free trial: 14 days, no credit card required`,className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500"}),a.jsx("p",{className:"mt-1 text-xs text-gray-500",children:'Enter your real pricing so the AI uses accurate prices in blog posts. Without this, the AI will say "check website for pricing" instead of guessing.'})]})]})]}),a.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Automation Log"}),a.jsxs("button",{onClick:V,disabled:M,className:"text-sm text-primary-600 hover:text-primary-700 font-medium flex items-center gap-1",children:[a.jsx("svg",{className:`w-4 h-4 ${M?"animate-spin":""}`,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})}),"Refresh"]})]}),M?a.jsx("div",{className:"text-center py-8 text-gray-400 text-sm",children:"Loading logs..."}):D.length===0?a.jsx("div",{className:"text-center py-8 text-gray-400 text-sm",children:"No automation activity yet. Logs appear once the scheduler runs."}):a.jsxs("div",{className:"overflow-x-auto",children:[a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"text-left text-xs font-medium text-gray-500 uppercase tracking-wide border-b border-gray-100",children:[a.jsx("th",{className:"pb-2 pr-4",children:"Time"}),a.jsx("th",{className:"pb-2 pr-4",children:"Status"}),a.jsx("th",{className:"pb-2 pr-4",children:"Topic / Keyword"}),a.jsx("th",{className:"pb-2",children:"Details"})]})}),a.jsx("tbody",{className:"divide-y divide-gray-50",children:D.map(Q=>a.jsxs("tr",{className:"py-2",children:[a.jsx("td",{className:"py-2 pr-4 text-gray-500 whitespace-nowrap",children:new Date(Q.created_at).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}),a.jsxs("td",{className:"py-2 pr-4",children:[Q.status==="dispatched"&&a.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-700",children:[a.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),"Generated"]}),Q.status==="skipped"&&a.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-700",children:[a.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-yellow-500"}),"Skipped"]}),Q.status==="failed"&&a.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-700",children:[a.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500"}),"Failed"]})]}),a.jsx("td",{className:"py-2 pr-4 text-gray-700",children:Q.topic?a.jsxs("div",{children:[a.jsx("div",{className:"font-medium",children:Q.topic}),Q.keyword&&a.jsx("div",{className:"text-xs text-gray-400",children:Q.keyword})]}):a.jsx("span",{className:"text-gray-400",children:"â"})}),a.jsx("td",{className:"py-2 text-gray-500",children:Q.status==="dispatched"?a.jsx("span",{className:"text-xs text-gray-400",children:"Blog generation queued"}):Q.error_message?a.jsx("span",{className:"text-xs text-red-500",title:Q.error_message,children:Q.error_message.length>60?Q.error_message.slice(0,60)+"â¦":Q.error_message}):a.jsx("span",{className:"text-xs",children:Q.skip_reason_label})})]},Q.id))})]}),a.jsx("p",{className:"mt-3 text-xs text-gray-400 text-center",children:"Showing last 50 automation events"})]})]})]})]})}/*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE */function K7(e,n){(n==null||n>e.length)&&(n=e.length);for(var i=0,s=Array(n);i<n;i++)s[i]=e[i];return s}function V1e(e){if(Array.isArray(e))return e}function U1e(e,n){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var s,d,h,f,g=[],p=!0,x=!1;try{if(h=(i=i.call(e)).next,n!==0)for(;!(p=(s=h.call(i)).done)&&(g.push(s.value),g.length!==n);p=!0);}catch(y){x=!0,d=y}
vendor: 9,736 bytes, lines 220-221
220finally{try{if(!p&&i.return!=null&&(f=i.return(),Object(f)!==f))return}finally{if(x)throw d}}return g}}function W1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 221In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H1e(e,n){return V1e(e)||U1e(e,n)||G1e(e,n)||W1e()}function G1e(e,n){if(e){if(typeof e=="string")return K7(e,n);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?K7(e,n):void 0}}const OV=Object.entries,Y7=Object.setPrototypeOf,q1e=Object.isFrozen,K1e=Object.getPrototypeOf,Y1e=Object.getOwnPropertyDescriptor;let Zn=Object.freeze,hr=Object.seal,Yc=Object.create,BV=typeof Reflect<"u"&&Reflect,R1=BV.apply,z1=BV.construct;Zn||(Zn=function(n){return n});hr||(hr=function(n){return n});R1||(R1=function(n,i){for(var s=arguments.length,d=new Array(s>2?s-2:0),h=2;h<s;h++)d[h-2]=arguments[h];return n.apply(i,d)});z1||(z1=function(n){for(var i=arguments.length,s=new Array(i>1?i-1:0),d=1;d<i;d++)s[d-1]=arguments[d];return new n(...s)});const Cl=Vn(Array.prototype.forEach),Q1e=Vn(Array.prototype.lastIndexOf),Q7=Vn(Array.prototype.pop),nh=Vn(Array.prototype.push),Z1e=Vn(Array.prototype.splice),vd=Array.isArray,fh=Vn(String.prototype.toLowerCase),_v=Vn(String.prototype.toString),Z7=Vn(String.prototype.match),rh=Vn(String.prototype.replace),J7=Vn(String.prototype.indexOf),J1e=Vn(String.prototype.trim),X1e=Vn(Number.prototype.toString),e_e=Vn(Boolean.prototype.toString),X7=typeof BigInt>"u"?null:Vn(BigInt.prototype.toString),eO=typeof Symbol>"u"?null:Vn(Symbol.prototype.toString),ni=Vn(Object.prototype.hasOwnProperty),ih=Vn(Object.prototype.toString),Dr=Vn(RegExp.prototype.test),yl=t_e(TypeError);function Vn(e){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),d=1;d<i;d++)s[d-1]=arguments[d];return R1(e,n,s)}}function t_e(e){return function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];return z1(e,i)}}function Ft(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fh;if(Y7&&Y7(e,null),!vd(n))return e;let s=n.length;for(;s--;){let d=n[s];if(typeof d=="string"){const h=i(d);h!==d&&(q1e(n)||(n[s]=h),d=h)}e[d]=!0}return e}function n_e(e){for(let n=0;n<e.length;n++)ni(e,n)||(e[n]=null);return e}function Ai(e){const n=Yc(null);for(const s of OV(e)){var i=H1e(s,2);const d=i[0],h=i[1];ni(e,d)&&(vd(h)?n[d]=n_e(h):h&&typeof h=="object"&&h.constructor===Object?n[d]=Ai(h):n[d]=h)}return n}function r_e(e){switch(typeof e){case"string":return e;case"number":return X1e(e);case"boolean":return e_e(e);case"bigint":return X7?X7(e):"0";case"symbol":return eO?eO(e):"Symbol()";case"undefined":return ih(e);case"function":case"object":{if(e===null)return ih(e);const n=e,i=Hi(n,"toString");if(typeof i=="function"){const s=i(n);return typeof s=="string"?s:ih(s)}return ih(e)}default:return ih(e)}}function Hi(e,n){for(;e!==null;){const s=Y1e(e,n);if(s){if(s.get)return Vn(s.get);if(typeof s.value=="function")return Vn(s.value)}e=K1e(e)}function i(){return null}return i}function i_e(e){try{return Dr(e,""),!0}catch{return!1}}const tO=Zn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Av=Zn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Cv=Zn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),o_e=Zn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),jv=Zn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),s_e=Zn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),nO=Zn(["#text"]),rO=Zn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Nv=Zn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),iO=Zn(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","
221subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Up=Zn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),a_e=hr(/{{[\w\W]*|^[\w\W]*}}/g),l_e=hr(/<%[\w\W]*|^[\w\W]*%>/g),c_e=hr(/\${[\w\W]*/g),d_e=hr(/^data-[\-\w.\u00B7-\uFFFF]+$/),u_e=hr(/^aria-[\-\w]+$/),oO=hr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),h_e=hr(/^(?:\w+script|data):/i),m_e=hr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),f_e=hr(/^html$/i),p_e=hr(/^[a-z][.\w]*(-[.\w]+)+$/i),sO=hr(/<[/\w!]/g),aO=hr(/<[/\w]/g),g_e=hr(/<\/no(script|embed|frames)/i),b_e=hr(/\/>/i),_i={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},LV=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],k_e=Zn(Ft({},LV)),y_e=function(){const e={};return Cl(LV,n=>{e[n]=hr(new RegExp("</"+n+"(?=[\\t\\n\\f\\r />])","i"))}),Zn(e)}(),x_e=function(){return typeof window>"u"?null:window},v_e=function(n,i){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let s=null;const d="data-tt-policy-suffix";i&&i.hasAttribute(d)&&(s=i.getAttribute(d));const h="dompurify"+(s?"#"+s:"");try{return n.createPolicy(h,{createHTML(f){return f},createScriptURL(f){return f}})}catch{return console.warn("TrustedTypes policy "+h+" could not be created."),null}},lO=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ma=function(n,i,s,d){return ni(n,i)&&vd(n[i])?Ft(d.base?Ai(d.base):{},n[i],d.transform):s},Ev=function(n,i,s){const d=ni(n,i)?n[i]:void 0;return d&&typeof d=="object"?Ai(d):s()};function RV(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x_e();const n=Le=>RV(Le);if(n.version="3.4.15",n.removed=[],!e||!e.document||e.document.nodeType!==_i.document||!e.Element)return n.isSupported=!1,n;let i=e.document;const s=i,d=s.currentScript;e.DocumentFragment;const h=e.HTMLTemplateElement,f=e.Node,g=e.Element,p=e.NodeFilter,x=e.NamedNodeMap;x===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const y=e.DOMParser,v=e.trustedTypes,w=g.prototype,C=Hi(w,"cloneNode"),E=Hi(w,"remove"),S=Hi(w,"removeAttributeNode"),D=Hi(w,"nextSibling"),I=Hi(w,"childNodes"),M=Hi(w,"parentNode"),B=Hi(w,"shadowRoot"),R=Hi(w,"attributes"),F=f&&f.prototype?Hi(f.prototype,"nodeType"):null,V=f&&f.prototype?Hi(f.prototype,"nodeName"):null,P=f&&f.prototype?Hi(f.prototype,"ownerDocument"):null,z=function(q){return F?F(q):q.nodeType},W=function(q){return V?V(q):q.nodeName};if(typeof h=="function"){const Le=i.createElement("template");Le.content&&Le.content.ownerDocument&&(i=Le.content.ownerDocument)}let K,G="",Z,se=!1,ge=0;const Se=function(){if(ge>0)throw yl('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Ae=function(q){Se(),ge++;try{return K.createHTML(q)}finally{ge--}},he=function(q){Se(),ge++;try{return K.createScriptURL(q)}finally{ge--}},ee=function(){return se||(Z=v_e(v,d),se=!0),Z},le=i,je=le.implementation,ve=le.createNodeIterator,Ce=le.createDocumentFragment,Q=le.getElementsByTagName,te=s.importNode;let pe=lO();n.isSupported=typeof OV=="function"&&typeof M=="function"&&je&&je.createHTMLDocument!==void 0;const be=a_e,Oe=l_e,at=c_e,re=d_e,ye=u_e,Me=h_e,Y=m_e,fe=p_e;let Ne=oO,Ue=null;const it=Ft({},[...tO,...Av,...Cv,...jv,...nO]);let Ve=null;const mt=Ft({},[...rO,...Nv,...iO,...Up]);let ut=Object.seal(Yc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Fe=null,ue=null;const Re=Object.seal(Yc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ke=!0,$e=!0,lt=!1,Ct=!0,we=!1,Xe=!0,X=!1,We=!1,et=null,Je=null,Ke=!1,ce=!1,Qe=!1,Ze=!1,Nt=!0,dn=!1;const Ut="user-content-";let Yr=!0,fi=!1,Br={},Lr=null;const ot=Ft({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ye=null;const rt=Ft({},["audio","video","img","source","image","track"]);let _t=null;const An=Ft({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Wt="http://www.w3.org/1998/Math/MathML",Be="http://www.w3.org/2000/svg",tt="http://www.w3.org/1999/xhtml";let st=tt,Bt=!1,oe=null;const Te=Ft({},[Wt,Be,tt],_v),pt=Zn(["mi","mo","mn","ms","mtext"]);let Ht=Ft({},pt);const Io=Zn(["annotation-xml"]);let pi=Ft({},Io);const Zb=Ft({},["title","style","font","a","script"]);let Ga=null;const ss=["application/xhtml+xml","text/html"],eu="text/html";let gn=null,ta=null;const Jb=i.createElement("form"),Mo=function(q){return q instanceof RegExp||q instanceof Function},tu=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ta&&ta===q)return;(!q||typeof q!="object")&&(q={}
vendor: 4,514 bytes, line 221
221),q=Ai(q),Ga=ss.indexOf(q.PARSER_MEDIA_TYPE)===-1?eu:q.PARSER_MEDIA_TYPE,gn=Ga==="application/xhtml+xml"?_v:fh,Ue=ma(q,"ALLOWED_TAGS",it,{transform:gn}),Ve=ma(q,"ALLOWED_ATTR",mt,{transform:gn}),oe=ma(q,"ALLOWED_NAMESPACES",Te,{transform:_v}),_t=ma(q,"ADD_URI_SAFE_ATTR",An,{transform:gn,base:An}),Ye=ma(q,"ADD_DATA_URI_TAGS",rt,{transform:gn,base:rt}),Lr=ma(q,"FORBID_CONTENTS",ot,{transform:gn}),Fe=ma(q,"FORBID_TAGS",Ai({}),{transform:gn}),ue=ma(q,"FORBID_ATTR",Ai({}),{transform:gn}),Br=ni(q,"USE_PROFILES")?q.USE_PROFILES&&typeof q.USE_PROFILES=="object"?Ai(q.USE_PROFILES):q.USE_PROFILES:!1,ke=q.ALLOW_ARIA_ATTR!==!1,$e=q.ALLOW_DATA_ATTR!==!1,lt=q.ALLOW_UNKNOWN_PROTOCOLS||!1,Ct=q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,we=q.SAFE_FOR_TEMPLATES||!1,Xe=q.SAFE_FOR_XML!==!1,X=q.WHOLE_DOCUMENT||!1,ce=q.RETURN_DOM||!1,Qe=q.RETURN_DOM_FRAGMENT||!1,Ze=q.RETURN_TRUSTED_TYPE||!1,Ke=q.FORCE_BODY||!1,Nt=q.SANITIZE_DOM!==!1,dn=q.SANITIZE_NAMED_PROPS||!1,Yr=q.KEEP_CONTENT!==!1,fi=q.IN_PLACE||!1,Ne=i_e(q.ALLOWED_URI_REGEXP)?q.ALLOWED_URI_REGEXP:oO,st=typeof q.NAMESPACE=="string"?q.NAMESPACE:tt,Ht=Ev(q,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ft({},pt)),pi=Ev(q,"HTML_INTEGRATION_POINTS",()=>Ft({},Io));const ie=Ev(q,"CUSTOM_ELEMENT_HANDLING",()=>Yc(null));if(ut=Yc(null),ni(ie,"tagNameCheck")&&Mo(ie.tagNameCheck)&&(ut.tagNameCheck=ie.tagNameCheck),ni(ie,"attributeNameCheck")&&Mo(ie.attributeNameCheck)&&(ut.attributeNameCheck=ie.attributeNameCheck),ni(ie,"allowCustomizedBuiltInElements")&&typeof ie.allowCustomizedBuiltInElements=="boolean"&&(ut.allowCustomizedBuiltInElements=ie.allowCustomizedBuiltInElements),hr(ut),we&&($e=!1),Qe&&(ce=!0),Br&&(Ue=Ft({},nO),Ve=Yc(null),Br.html===!0&&(Ft(Ue,tO),Ft(Ve,rO)),Br.svg===!0&&(Ft(Ue,Av),Ft(Ve,Nv),Ft(Ve,Up)),Br.svgFilters===!0&&(Ft(Ue,Cv),Ft(Ve,Nv),Ft(Ve,Up)),Br.mathMl===!0&&(Ft(Ue,jv),Ft(Ve,iO),Ft(Ve,Up))),Re.tagCheck=null,Re.attributeCheck=null,ni(q,"ADD_TAGS")&&(typeof q.ADD_TAGS=="function"?Re.tagCheck=q.ADD_TAGS:vd(q.ADD_TAGS)&&(Ue===it&&(Ue=Ai(Ue)),Ft(Ue,q.ADD_TAGS,gn))),ni(q,"ADD_ATTR")&&(typeof q.ADD_ATTR=="function"?Re.attributeCheck=q.ADD_ATTR:vd(q.ADD_ATTR)&&(Ve===mt&&(Ve=Ai(Ve)),Ft(Ve,q.ADD_ATTR,gn))),ni(q,"ADD_FORBID_CONTENTS")&&vd(q.ADD_FORBID_CONTENTS)&&(Lr===ot&&(Lr=Ai(Lr)),Ft(Lr,q.ADD_FORBID_CONTENTS,gn)),Yr&&(Ue["#text"]=!0),X&&Ft(Ue,["html","head","body"]),Ue.table&&(Ft(Ue,["tbody"]),delete Fe.tbody),q.TRUSTED_TYPES_POLICY){if(typeof q.TRUSTED_TYPES_POLICY.createHTML!="function")throw yl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw yl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Ie=K;K=q.TRUSTED_TYPES_POLICY;try{G=Ae("")}catch(nt){throw K=Ie,nt}}else q.TRUSTED_TYPES_POLICY===null?(K=void 0,G=""):(K===void 0&&(K=ee()),K&&typeof G=="string"&&(G=Ae("")));Zn&&Zn(q),ta=q},Lm=Ft({},[...Av,...Cv,...o_e]),Rm=Ft({},[...jv,...s_e]),Xb=function(q,ie,Ie){return ie.namespaceURI===tt?q==="svg":ie.namespaceURI===Wt?q==="svg"&&(Ie==="annotation-xml"||Ht[Ie]):!!Lm[q]},ek=function(q,ie,Ie){return ie.namespaceURI===tt?q==="math":ie.namespaceURI===Be?q==="math"&&pi[Ie]:!!Rm[q]},tk=function(q,ie,Ie){return ie.namespaceURI===Be&&!pi[Ie]||ie.namespaceURI===Wt&&!Ht[Ie]?!1:!Rm[q]&&(Zb[q]||!Lm[q])},nk=function(q){let ie=M(q);(!ie||!ie.tagName)&&(ie={namespaceURI:st,tagName:"template"});const Ie=fh(q.tagName),nt=fh(ie.tagName);return oe[q.namespaceURI]?q.namespaceURI===Be?Xb(Ie,ie,nt):q.namespaceURI===Wt?ek(Ie,ie,nt):q.namespaceURI===tt?tk(Ie,ie,nt):!!(Ga==="application/xhtml+xml"&&oe[q.namespaceURI]):!1},Po=function(q){nh(n.removed,{element:q});try{M(q).removeChild(q)}catch{if(E(q),!M(q))throw yl("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Oo=function(q,ie,Ie){try{S(q,ie)}catch{try{q.removeAttribute(Ie)}catch{}}},Bo=function(q){dc(q);const ie=I(q);if(ie){const nt=[];Cl(ie,ft=>{nh(nt,ft)}),Cl(nt,ft=>{try{E(ft)}catch{}})}const Ie=R(q);if(Ie)for(let nt=Ie.length-1;nt>=0;--nt){const ft=Ie[nt],xt=ft&&ft.name;typeof xt=="string"&&Oo(q,ft,xt)}},gi=function(q,ie,Ie){if(!Ie)try{Ie=ie.getAttributeNode(q)}catch{Ie=null}nh(n.removed,{attribute:Ie||null,from:ie});try{Ie?S(ie,Ie):ie.removeAttribute(q)}catch{try{ie.removeAttribute(q)}catch{}}if(q==="is")if(ce||Qe)try{Po(ie)}catch{}else try{ie.setAttribute(q,"")}catch{}},rk=function(q){const ie=R(q);if(ie)for(let Ie=ie.length-1;Ie>=0;--Ie){const nt=ie[Ie],ft=nt&&nt.name;
vendor: 4,230 bytes, line 221
221typeof ft!="string"||Ve[gn(ft)]||Oo(q,nt,ft)}},dc=function(q){const ie=[q];for(;ie.length>0;){const Ie=ie.pop();z(Ie)===_i.element&&rk(Ie);const ft=I(Ie);if(ft)for(let xt=ft.length-1;xt>=0;--xt)ie.push(ft[xt])}},zm=function(q,ie){return Xe?q==="patchsrc"?!0:q==="for"&&ie!=="label"&&ie!=="output":!1},ik=function(q){if(!Xe)return;const ie=[q];for(;ie.length>0;){const Ie=ie.pop(),nt=z(Ie);if(nt===_i.processingInstruction||nt===_i.comment&&Dr(aO,Ie.data)){try{E(Ie)}catch{}continue}if(nt===_i.element){const xt=Ie,Qt=gn(W(Ie));try{xt.hasAttribute&&xt.hasAttribute("patchsrc")&&xt.removeAttribute("patchsrc"),xt.hasAttribute&&xt.hasAttribute("for")&&zm("for",Qt)&&xt.removeAttribute("for")}catch{}}const ft=I(Ie);if(ft)for(let xt=ft.length-1;xt>=0;--xt)ie.push(ft[xt])}},Fm=function(q){let ie=null,Ie=null;if(Ke)q="<remove></remove>"+q;else{const xt=Z7(q,/^[\r\n\t ]+/);Ie=xt&&xt[0]}Ga==="application/xhtml+xml"&&st===tt&&(q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+q+"</body></html>");const nt=K?Ae(q):q;if(st===tt)try{ie=new y().parseFromString(nt,Ga)}catch{}if(!ie||!ie.documentElement){ie=je.createDocument(st,"template",null);try{ie.documentElement.innerHTML=Bt?G:nt}catch{}}const ft=ie.body||ie.documentElement;return q&&Ie&&ft.insertBefore(i.createTextNode(Ie),ft.childNodes[0]||null),st===tt?Q.call(ie,X?"html":"body")[0]:X?ie.documentElement:ft},$m=function(q){const ie=P?P(q):q.ownerDocument;return ve.call(ie||q,q,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},uc=function(q){return q=rh(q,be," "),q=rh(q,Oe," "),q=rh(q,at," "),q},Lo=function(q){var ie;q.normalize();const Ie=P?P(q):q.ownerDocument,nt=ve.call(Ie||q,q,p.SHOW_TEXT|p.SHOW_COMMENT|p.SHOW_CDATA_SECTION|p.SHOW_PROCESSING_INSTRUCTION,null);let ft=nt.nextNode();for(;ft;)ft.data=uc(ft.data),ft=nt.nextNode();const xt=(ie=q.querySelectorAll)===null||ie===void 0?void 0:ie.call(q,"template");xt&&Cl(xt,Qt=>{na(Qt.content)&&Lo(Qt.content)})},qa=function(q){const ie=V?V(q):null;return typeof ie!="string"||gn(ie)!=="form"?!1:typeof q.nodeName!="string"||typeof q.textContent!="string"||typeof q.removeChild!="function"||q.attributes!==R(q)||typeof q.removeAttribute!="function"||typeof q.removeAttributeNode!="function"||typeof q.getAttributeNode!="function"||typeof q.setAttribute!="function"||typeof q.namespaceURI!="string"||typeof q.insertBefore!="function"||typeof q.hasChildNodes!="function"||q.nodeType!==F(q)||q.childNodes!==I(q)},na=function(q){if(!F||typeof q!="object"||q===null)return!1;try{return F(q)===_i.documentFragment}catch{return!1}},Ka=function(q){if(!F||typeof q!="object"||q===null)return!1;try{return typeof F(q)=="number"}catch{return!1}};function Rr(Le,q,ie){Le.length!==0&&Cl(Le,Ie=>{Ie.call(n,q,ie,ta)})}const ok=function(q,ie){return!!(Xe&&q.hasChildNodes()&&!Ka(q.firstElementChild)&&Dr(sO,q.textContent)&&Dr(sO,q.innerHTML)||Xe&&q.namespaceURI===tt&&k_e[ie]&&(Ka(q.firstElementChild)||typeof q.textContent=="string"&&Dr(y_e[ie],q.textContent))||q.nodeType===_i.processingInstruction||Xe&&q.nodeType===_i.comment&&Dr(aO,q.data))},hc=function(q,ie){if(q instanceof RegExp)return Dr(q,ie);if(q instanceof Function){for(var Ie=arguments.length,nt=new Array(Ie>2?Ie-2:0),ft=2;ft<Ie;ft++)nt[ft-2]=arguments[ft];return!!q(ie,...nt)}return!1},sk=function(q,ie,Ie){if(!Fe[ie]&&ls(ie)&&hc(ut.tagNameCheck,ie))return!1;if(Yr&&!Lr[ie]){const nt=M(q),ft=I(q);if(ft&&nt){const xt=ft.length;for(let Qt=xt-1;Qt>=0;--Qt){const an=q===Ie?C(ft[Qt],!0):ft[Qt];nt.insertBefore(an,D(q))}}}return Po(q),!0},Vm=function(q,ie,Ie,nt){return q.length===0?ie:ie===Ie||ie===nt?Ai(ie):ie},as=function(q,ie){return q===ie||M(q)!==null?!1:(fi&&dc(q),!0)},Ya=function(q,ie){if(Rr(pe.beforeSanitizeElements,q,null),as(q,ie))return!0;if(qa(q))return Po(q),!0;const Ie=gn(W(q));if(Ue=Vm(pe.uponSanitizeElement,Ue,it,et),Rr(pe.uponSanitizeElement,q,{tagName:Ie,allowedTags:Ue}),as(q,ie))return!0;if(ok(q,Ie))return Po(q),!0;if(Fe[Ie]||!(Re.tagCheck instanceof Function&&Re.tagCheck(Ie))&&!Ue[Ie]){const ft=sk(q,Ie,ie);return ft===!1&&Rr(pe.afterSanitizeElements,q,null),ft}if(z(q)===_i.element&&!nk(q)||(Ie==="noscript"||Ie==="noembed"||Ie==="noframes")&&Dr(g_e,q.innerHTML))return Po(q),!0;
vendor: 5,109 bytes, lines 221-222
221if(we&&q.nodeType===_i.text){const ft=uc(q.textContent);q.textContent!==ft&&(nh(n.removed,{element:q.cloneNode()}),q.textContent=ft)}return Rr(pe.afterSanitizeElements,q,null),!1},Um=function(q,ie,Ie){if(ue[ie]||zm(ie,q)||Nt&&(ie==="id"||ie==="name")&&(Ie in i||Ie in Jb))return!1;const nt=Ve[ie]||Re.attributeCheck instanceof Function&&Re.attributeCheck(ie,q);return $e&&Dr(re,ie)||ke&&Dr(ye,ie)?!0:nt?_t[ie]||Dr(Ne,rh(Ie,Y,""))||(ie==="src"||ie==="xlink:href"||ie==="href")&&q!=="script"&&J7(Ie,"data:")===0&&Ye[q]||lt&&!Dr(Me,rh(Ie,Y,""))?!0:!Ie:ls(q)&&hc(ut.tagNameCheck,q)&&hc(ut.attributeNameCheck,ie,q)||ie==="is"&&ut.allowCustomizedBuiltInElements&&hc(ut.tagNameCheck,Ie)},ra=Ft({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ls=function(q){return!ra[fh(q)]&&Dr(fe,q)},ak=function(q,ie,Ie,nt){if(K&&typeof v=="object"&&typeof v.getAttributeType=="function"&&!Ie)switch(v.getAttributeType(q,ie)){case"TrustedHTML":return Ae(nt);case"TrustedScriptURL":return he(nt)}return nt},mc=function(q,ie,Ie,nt){try{return Ie?q.setAttributeNS(Ie,ie,nt):q.setAttribute(ie,nt),qa(q)?(Po(q),!1):!0}catch{return gi(ie,q),!1}},Qa=function(q){Rr(pe.beforeSanitizeAttributes,q,null);const ie=q.attributes;if(!ie||qa(q))return;Ve=Vm(pe.uponSanitizeAttribute,Ve,mt,Je);const Ie={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ve,forceKeepAttr:void 0};let nt=ie.length;const ft=gn(q.nodeName);for(;nt--;){const xt=ie[nt],Qt=xt.name,an=xt.namespaceURI,fr=xt.value,pr=gn(Qt),cs=fr;let gr=Qt==="value"?cs:J1e(cs),Ja=!1;if(Ie.attrName=pr,Ie.attrValue=gr,Ie.keepAttr=!0,Ie.forceKeepAttr=void 0,Rr(pe.uponSanitizeAttribute,q,Ie),gr=Ie.attrValue,dn&&(pr==="id"||pr==="name")&&J7(gr,Ut)!==0&&(gi(Qt,q,xt),gr=Ut+gr,Ja=!0),Xe&&Dr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,gr)){gi(Qt,q,xt);continue}if(pr==="attributename"&&Z7(gr,"href")){gi(Qt,q,xt);continue}if(!Ie.forceKeepAttr){if(!Ie.keepAttr){gi(Qt,q,xt);continue}if(!Ct&&Dr(b_e,gr)){gi(Qt,q,xt);continue}if(we&&(gr=uc(gr)),!Um(ft,pr,gr)){gi(Qt,q,xt);continue}gr=ak(ft,pr,an,gr),gr!==cs&&mc(q,Qt,an,gr)&&Ja&&Q7(n.removed)}}Rr(pe.afterSanitizeAttributes,q,null)},fc=function(q){let ie=null;const Ie=$m(q);for(Rr(pe.beforeSanitizeShadowDOM,q,null);ie=Ie.nextNode();)if(Rr(pe.uponSanitizeShadowNode,ie,null),Ya(ie,q),Qa(ie),na(ie.content)&&fc(ie.content),z(ie)===_i.element){const nt=B(ie);na(nt)&&(Za(nt),fc(nt))}Rr(pe.afterSanitizeShadowDOM,q,null)},Za=function(q){const ie=[{node:q,shadow:null}];for(;ie.length>0;){const Ie=ie.pop();if(Ie.shadow){fc(Ie.shadow);continue}const nt=Ie.node,xt=z(nt)===_i.element,Qt=I(nt);if(Qt)for(let an=Qt.length-1;an>=0;--an)ie.push({node:Qt[an],shadow:null});if(xt){const an=V?V(nt):null;if(typeof an=="string"&&gn(an)==="template"){const fr=nt.content;na(fr)&&ie.push({node:fr,shadow:null})}}if(xt){const an=B(nt);na(an)&&ie.push({node:null,shadow:an},{node:an,shadow:null})}}};return n.sanitize=function(Le){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=null,Ie=null,nt=null,ft=null;if(Bt=!Le,Bt&&(Le="<!-->"),typeof Le!="string"&&!Ka(Le)&&(Le=r_e(Le),typeof Le!="string"))throw yl("dirty is not a string, aborting");if(!n.isSupported)return Le;We?(Ue=et,Ve=Je):tu(q),(pe.uponSanitizeElement.length>0||pe.uponSanitizeAttribute.length>0)&&(Ue=Ai(Ue)),pe.uponSanitizeAttribute.length>0&&(Ve=Ai(Ve)),n.removed=[];const xt=fi&&typeof Le!="string"&&Ka(Le);if(xt){ik(Le);const fr=W(Le);if(typeof fr=="string"){const pr=gn(fr);if(!Ue[pr]||Fe[pr])throw Bo(Le),yl("root node is forbidden and cannot be sanitized in-place")}if(qa(Le))throw Bo(Le),yl("root node is clobbered and cannot be sanitized in-place");try{Za(Le)}catch(pr){throw Bo(Le),pr}}else if(Ka(Le))ie=Fm("<!---->"),Ie=ie.ownerDocument.importNode(Le,!0),Ie.nodeType===_i.element&&Ie.nodeName==="BODY"||Ie.nodeName==="HTML"?ie=Ie:ie.appendChild(Ie),Za(ie);else{if(!ce&&!we&&!X&&Le.indexOf("<")===-1)return K&&Ze?Ae(Le):Le;if(ie=Fm(Le),!ie)return ce?null:Ze?G:""}ie&&Ke&&Po(ie.firstChild);const Qt=xt?Le:ie;try{const fr=$m(Qt);for(;nt=fr.nextNode();)Ya(nt,Qt),Qa(nt),na(nt.content)&&fc(nt.content)}catch(fr){throw xt&&(Bo(Le),Cl(n.removed,pr=>{pr.element&&dc(pr.element)})),fr}if(xt)return Cl(n.removed,fr=>{fr.element&&dc(fr.element)}),we&&Lo(Le),Le;if(ce){if(we&&Lo(ie),Qe)for(ft=Ce.call(ie.ownerDocument);ie.firstChild;)ft.appendChild(ie.firstChild);else ft=ie;return(Ve.shadowroot||Ve.shadowrootmode)&&(ft=te.call(s,ft,!0)),ft}let an=X?ie.outerHTML:ie.innerHTML;return X&&Ue["!doctype"]&&ie.ownerDocument&&ie.ownerDocument.doctype&&ie.ownerDocument.doctype.name&&Dr(f_e,ie.ownerDocument.doctype.name)&&(an="<!DOCTYPE "+ie.ownerDocument.doctype.name+`> 222`+an),we&&(an=uc(an)),K&&Ze?Ae(an):an},n.setConfig=function(){let Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};tu(Le),We=!0,et=Ue,Je=Ve},n.clearConfig=function(){ta=null,We=!1,et=null,Je=null,K=Z,G=""},n.isValidAttribute=function(Le,q,ie){ta||tu({});const Ie=gn(Le),nt=gn(q);return Um(Ie,nt,ie)},n.addHook=function(Le,q){typeof q=="function"&&ni(pe,Le)&&nh(pe[
222Le],q)},n.removeHook=function(Le,q){if(ni(pe,Le)){if(q!==void 0){const ie=Q1e(pe[Le],q);return ie===-1?void 0:Z1e(pe[Le],ie,1)[0]}return Q7(pe[Le])}},n.removeHooks=function(Le){ni(pe,Le)&&(pe[Le]=[])},n.removeAllHooks=function(){pe=lO()},n}var w_e=RV();const __e={USE_PROFILES:{html:!0},FORBID_TAGS:["script","style","iframe","object","embed","link","meta","form"],FORBID_ATTR:["onerror","onload","onclick","onmouseover","onfocus","onblur","onchange","onsubmit","formaction"],ALLOW_DATA_ATTR:!1};function A_e(e){if(e==null)return"";const n=typeof e=="string"?e:String(e);try{return w_e.sanitize(n,__e)}catch{return""}}function zV(e){return{__html:A_e(e)}}const cO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),dO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),uO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),C_e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})}),j_e=({className:e})=>a.jsxs("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),hO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),mO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})}),fO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})}),N_e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"})}),pO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})}),Sv=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),E_e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"})}),S_e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})}),D_e=({score:e,grade:n})=>{const i=d=>d>=80?"text-green-600 bg-green-50 border-green-200":d>=60?"text-yellow-600 bg-yellow-50 border-yellow-200":d>=40?"text-orange-600 bg-orange-50 border-orange-200":"text-red-600 bg-red-50 border-red-200",s=d=>d!=null&&d.startsWith("A")?"bg-green-500":d!=null&&d.startsWith("B")?"bg-yellow-500":d!=null&&d.startsWith("
222C")?"bg-orange-500":"bg-red-500";return!e&&!n?null:a.jsxs("div",{className:`inline-flex items-center gap-2 px-3 py-1.5 rounded-lg border ${i(e)}`,children:[a.jsxs("div",{className:"flex items-baseline gap-1",children:[a.jsx("span",{className:"font-semibold",children:e??"--"}),a.jsx("span",{className:"text-xs opacity-70",children:"/100"})]}),a.jsx("span",{className:`w-5 h-5 rounded text-white text-xs font-bold flex items-center justify-center ${s(n)} flex-shrink-0`,children:n||"?"})]})},T_e=(e,n,i)=>{if(e==="product"){const s=Array.isArray(n)?n.map(d=>d.name||d).join(", "):"";return{bg:"bg-purple-50",text:"text-purple-700",border:"border-purple-200",label:s?`Product: ${s}`:"Product Blog",shortLabel:"Product"}}return e==="category"?{bg:"bg-blue-50",text:"text-blue-700",border:"border-blue-200",label:i?`Category: ${i}`:"Category Blog",shortLabel:"Category"}:{bg:"bg-gray-50",text:"text-gray-600",border:"border-gray-200",label:"General Blog",shortLabel:"General"}},Wp=e=>{const n={draft:{bg:"bg-gray-100",text:"text-gray-700",label:"Draft"},pending:{bg:"bg-amber-100",text:"text-amber-700",label:"Pending Review"},approved:{bg:"bg-blue-100",text:"text-blue-700",label:"Approved"},published:{bg:"bg-emerald-100",text:"text-emerald-700",label:"Published"},rejected:{bg:"bg-red-100",text:"text-red-700",label:"Rejected"}};return n[e]||n.draft};function I_e(){const e=Ot(),{activeSiteId:n,sites:i,setActiveSite:s,setSites:d}=ui(),[h,f]=j.useState([]),[g,p]=j.useState(!0),[x,y]=j.useState(""),[v,w]=j.useState(""),[C,E]=j.useState("blogs"),[S,D]=j.useState("all"),[I,M]=j.useState("all"),[B,R]=j.useState(!1),[F,V]=j.useState(null),[P,z]=j.useState({all:0,draft:0,pending:0,approved:0,published:0,rejected:0}),[W,K]=j.useState({}),[G,Z]=j.useState([]),[se,ge]=j.useState(!1),[Se,Ae]=j.useState(null),[he,ee]=j.useState([]),[le,je]=j.useState(null),[ve,Ce]=j.useState(!1),[Q,te]=j.useState(!1),[pe,be]=j.useState({isOpen:!1,queueId:null}),[Oe,at]=j.useState({isOpen:!1,scheduledBlogId:null}),[re,ye]=j.useState(1),[Me,Y]=j.useState(20),[fe,Ne]=j.useState({total:0,last_page:1,current_page:1,per_page:20}),it=(Array.isArray(i)?i:[]).find(X=>X.id===n);j.useEffect(()=>{ne.get("/sites").then(X=>{const We=Array.isArray(X.data)?X.data:[];d(We)}).catch(()=>{})},[]),j.useEffect(()=>{ye(1)},[I,S,n]),j.useEffect(()=>{C==="blogs"?Ve():C==="upcoming"&&ke()},[n,I,S,re,Me,C]);const Ve=async()=>{var X,We,et;try{p(!0);const Je={page:re,per_page:Me};n&&(Je.site_id=n),S!=="all"?Je.status=S:Je.status="all",I!=="all"&&(Je.date_filter=I);const Ke=await ne.get("/blogs/upcoming",{params:Je});let ce=[],Qe={};if((X=Ke.data)!=null&&X.blogs?(ce=Ke.data.blogs.data||Ke.data.blogs||[],Qe={total:Ke.data.blogs.total||0,last_page:Ke.data.blogs.last_page||1,current_page:Ke.data.blogs.current_page||1,per_page:Ke.data.blogs.per_page||Me}):(We=Ke.data)!=null&&We.data&&(ce=Ke.data.data,Qe={total:ce.length,last_page:1,current_page:1,per_page:Me}),f(Array.isArray(ce)?ce:[]),Ne(Qe),(et=Ke.data)!=null&&et.counts){const Ze=Ke.data.counts,Nt=(Ze.pending||0)+(Ze.approved||0)+(Ze.rejected||0)+(Ze.published||0)+(Ze.draft||0);z({all:Nt,draft:Ze.draft||0,pending:Ze.pending||0,approved:Ze.approved||0,published:Ze.published||0,rejected:Ze.rejected||0})}}catch(Je){console.error("Failed to load blogs",Je),f([])}finally{p(!1)}},mt=async X=>{var We,et;if(!W[`approve-${X}`]){y(""),w(""),K(Je=>({...Je,[`approve-${X}`]:!0}));try{await ne.post(`/blogs/${X}/approve`),w("Blog approved successfully"),await Ve(),setTimeout(()=>w(""),3e3)}catch(Je){y(((et=(We=Je.response)==null?void 0:We.data)==null?void 0:et.message)||"Failed to approve blog. Please try again.")}finally{K(Je=>{const Ke={...Je};return delete Ke[`approve-${X}`],Ke})}}},ut=async X=>{var We,et;if(!W[`reject-${X}`]){y(""),w(""),K(Je=>({...Je,[`reject-${X}`]:!0}));try{await ne.post(`/blogs/${X}/reject`),w("Blog rejected"),await Ve(),setTimeout(()=>w(""),3e3)}catch(Je){y(((et=(We=Je.response)==null?void 0:We.data)==null?void 0:et.message)||"Failed to reject blog. Please try again.")}finally{K(Je=>{const Ke={...Je};return delete Ke[`reject-${X}`],Ke})}}},Fe=async X=>{var et,Je,Ke;
222if(W[`preview-${X}`])return;y(""),w(""),K(ce=>({...ce,[`preview-${X}`]:!0}));const We=window.open("about:blank","_blank");try{const ce=await ne.post(`/blogs/${X}/preview`);(et=ce.data)!=null&&et.preview_url?(We?We.location.href=ce.data.preview_url:window.open(ce.data.preview_url,"_blank"),w("Opening preview in new tab...")):(We&&We.close(),y("Preview URL not available. Please check your website connection.")),setTimeout(()=>{w(""),Ve()},2e3)}catch(ce){We&&We.close(),y(((Ke=(Je=ce.response)==null?void 0:Je.data)==null?void 0:Ke.message)||"Failed to create preview. Please check your website connection.")}finally{K(ce=>{const Qe={...ce};return delete Qe[`preview-${X}`],Qe})}},ue=async X=>{var We,et,Je;if(!W[`publish-${X}`]){y(""),w(""),K(Ke=>({...Ke,[`publish-${X}`]:!0}));try{const Ke=await ne.post(`/blogs/${X}/publish`);w(((We=Ke.data)==null?void 0:We.message)||"Blog published successfully"),await Ve(),setTimeout(()=>w(""),3e3)}catch(Ke){y(((Je=(et=Ke.response)==null?void 0:et.data)==null?void 0:Je.message)||"Failed to publish blog. Please try again.")}finally{K(Ke=>{const ce={...Ke};return delete ce[`publish-${X}`],ce})}}},Re=async()=>{var X,We,et;try{ge(!0);const Je={page:re,per_page:Me};n&&(Je.site_id=n);const Ke=await ne.get("/blogs/scheduled",{params:Je});(X=Ke.data)!=null&&X.scheduled_blogs&&(Z(Ke.data.scheduled_blogs.data||[]),Ke.data.scheduled_blogs.current_page&&Ne({total:Ke.data.scheduled_blogs.total||0,last_page:Ke.data.scheduled_blogs.last_page||1,current_page:Ke.data.scheduled_blogs.current_page||1,per_page:Ke.data.scheduled_blogs.per_page||20}))}catch(Je){y(((et=(We=Je.response)==null?void 0:We.data)==null?void 0:et.message)||"Failed to load scheduled blogs")}finally{ge(!1)}},ke=async()=>{var X,We,et;try{Ce(!0);const Je={};n&&(Je.site_id=n);const Ke=await ne.get("/blogs/queue",{params:Je});(X=Ke.data)!=null&&X.queue&&(ee(Ke.data.queue||[]),je(Ke.data.schedule_info||null))}catch(Je){y(((et=(We=Je.response)==null?void 0:We.data)==null?void 0:et.message)||"Failed to load blog queue")}finally{Ce(!1)}},$e=async()=>{var X,We,et;if(!n){y("Please select a site from the header to refresh the queue");return}try{te(!0),y("");const Je=await ne.post("/blogs/queue/refresh",{site_id:n});w(((X=Je.data)==null?void 0:X.message)||"Queue refreshed successfully"),await ke(),setTimeout(()=>w(""),3e3)}catch(Je){y(((et=(We=Je.response)==null?void 0:We.data)==null?void 0:et.error)||"Failed to refresh queue")}finally{te(!1)}},lt=X=>{be({isOpen:!0,queueId:X})},Ct=async()=>{var We,et,Je;const X=pe.queueId;be({isOpen:!1,queueId:null});try{y("");const Ke=await ne.post(`/blogs/queue/${X}/skip`);w(((We=Ke.data)==null?void 0:We.message)||"Queue item skipped successfully"),await ke(),setTimeout(()=>w(""),3e3)}catch(Ke){y(((Je=(et=Ke.response)==null?void 0:et.data)==null?void 0:Je.error)||"Failed to skip queue item")}},we=async()=>{var We,et,Je;const X=Oe.scheduledBlogId;at({isOpen:!1,scheduledBlogId:null});try{y("");const Ke=await ne.post(`/blogs/scheduled/${X}/cancel`);w(((We=Ke.data)==null?void 0:We.message)||"Scheduled blog cancelled successfully"),await Re(),setTimeout(()=>w(""),3e3)}catch(Ke){y(((Je=(et=Ke.response)==null?void 0:et.data)==null?void 0:Je.message)||"Failed to cancel scheduled blog")}},Xe=h;return g?a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):a.jsxs("div",{className:"p-6 lg:p-8",children:[a.jsxs("div",{className:"mb-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Blog Dashboard"}),a.jsx("p",{className:"text-gray-600 mt-1",children:it?`Managing blogs for ${it.name}`:"Select a site from the header to view blogs"})]}),a.jsxs("button",{onClick:()=>e("/user/blogs/create"),className:"btn-primary inline-flex items-center",children:[a.jsx(hO,{className:"w-5 h-5 mr-2"}),"Create Blog"]})]}),a.jsx("div",{className:"mb-6 bg-white rounded-xl border border-gray-200 p-4",children:a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-4",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Sv,{className:"w-5 h-5 text-gray-400"}),a.jsx("label",{className:"text-sm font-medium text-gray-700",children:"Date:"}),a.jsxs("div",{className:"relative",children:[a.jsxs("select",{value:I,onChange:X=>M(X.target.value),className:"appearance-none bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 pl-3 pr-8 py-2 cursor-pointer",children:[a.jsx("option",{value:"all",children:"All Time"}),a.jsx("option",{value:"7days",children:"Last 7 Days"}),a.jsx("option",{value:"30days",children:"Last 30 Days"}),a.jsx("option",{value:"thisMonth",children:"This Month"})]}),a.jsx(S_e,{className:"w-4 h-4 text-gray-500 absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none"})]})]}),a.jsx("div",{className:"hidden sm:block w-px h-6 bg-gray-200"}),a.jsxs("div",{className:"text-sm text-gray-500",children:[fe.total," blog",fe.total!==1?"s":""," found"]}
222)]}),a.jsxs("button",{onClick:()=>R(!0),className:"text-sm text-primary-600 hover:text-primary-700 hover:underline flex items-center gap-1",children:[a.jsx(E_e,{className:"w-4 h-4"}),"How is SEO grade calculated?"]})]})}),x&&a.jsx(en,{type:"error",message:x,onClose:()=>y("")}),v&&a.jsx(en,{type:"success",message:v,onClose:()=>w("")}),a.jsx("div",{className:"mb-6",children:a.jsxs("div",{className:"flex gap-4 mb-4 border-b border-gray-200",children:[a.jsx("button",{onClick:()=>{E("blogs"),ye(1)},className:`px-4 py-2 font-medium text-sm border-b-2 transition-colors ${C==="blogs"?"border-primary-600 text-primary-600":"border-transparent text-gray-600 hover:text-gray-900"}`,children:"Blogs"}),a.jsx("button",{onClick:()=>{E("upcoming"),ye(1)},className:`px-4 py-2 font-medium text-sm border-b-2 transition-colors ${C==="upcoming"?"border-primary-600 text-primary-600":"border-transparent text-gray-600 hover:text-gray-900"}`,children:"Upcoming"})]})}),C==="blogs"&&a.jsx("div",{className:"mb-6",children:a.jsx("div",{className:"flex flex-wrap gap-2",children:[{key:"all",label:"All"},{key:"draft",label:"Draft"},{key:"pending",label:"Pending"},{key:"approved",label:"Approved"},{key:"published",label:"Published"},{key:"rejected",label:"Rejected"}].map(({key:X,label:We})=>a.jsxs("button",{onClick:()=>D(X),className:`px-4 py-2 rounded-lg text-sm font-medium transition-colors ${S===X?"bg-primary-600 text-white":"bg-white text-gray-600 hover:bg-gray-100 border border-gray-200"}`,children:[We,a.jsx("span",{className:`ml-2 px-2 py-0.5 rounded-full text-xs ${S===X?"bg-primary-500 text-white":"bg-gray-100 text-gray-600"}`,children:P[X]})]},X))})}),C==="upcoming"?ve?a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Upcoming Blog Generations"}),a.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"These topics and keywords will be used for the next automatic blog generations."})]}),a.jsx("button",{onClick:$e,disabled:Q||!n,className:"btn-secondary inline-flex items-center disabled:opacity-50 disabled:cursor-not-allowed",children:Q?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Refreshing..."]}):a.jsxs(a.Fragment,{children:[a.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"})}),"Refresh Queue"]})})]}),he.length===0?a.jsxs("div",{className:"card p-12 text-center",children:[a.jsx(cO,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),n?le&&(!le.automation_enabled||!le.schedule_days||le.schedule_days.length===0)?a.jsxs(a.Fragment,{children:[a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No blogs scheduled"}),a.jsx("p",{className:"text-gray-500 mb-6",children:le.automation_enabled?"You haven't configured a publishing schedule yet. Set up your schedule days and times in Automation Settings.":"Blog automation is currently disabled. Enable it and configure your schedule in Automation Settings."}),a.jsxs("button",{onClick:()=>e(`/user/automation/${n}`),className:"btn-primary inline-flex items-center",children:[a.jsxs("svg",{className:"w-5 h-5 mr-2",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 011.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.56.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.893.149c-.425.07-.765.383-.93.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 01-1.449.12l-.738-.527c-.35-.25-.806-.272-1.204-.107-.397.165-.71.505-.78.929l-.15.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 01-.12-1.45l.527-.737c.25-.35.273-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.107-1.204l-.527-.738a1.125 1.125 0 01.
22212-1.45l.773-.773a1.125 1.125 0 011.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894z"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),"Go to Automation Settings"]})]}):a.jsxs(a.Fragment,{children:[a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No upcoming blogs in queue"}),a.jsx("p",{className:"text-gray-500 mb-6",children:'Click "Refresh Queue" to calculate upcoming blog predictions based on your topics and keywords.'}),a.jsx("button",{onClick:$e,disabled:Q,className:"btn-primary inline-flex items-center disabled:opacity-50",children:Q?"Calculating...":"Generate Queue"})]}):a.jsxs(a.Fragment,{children:[a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No upcoming blogs in queue"}),a.jsx("p",{className:"text-gray-500 mb-6",children:"Select a site from the header to view the upcoming blog generation queue."})]})]}):a.jsxs("div",{className:"card overflow-hidden",children:[a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[a.jsx("thead",{className:"bg-gray-50",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"#"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Topic"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Keyword"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Trend Score"}),a.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Est. Date"}),a.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),a.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:he.map((X,We)=>{var et,Je,Ke,ce,Qe,Ze,Nt;return a.jsxs("tr",{className:`hover:bg-gray-50 ${We===0?"bg-green-50":""}`,children:[a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:a.jsx("span",{className:`inline-flex items-center justify-center w-6 h-6 rounded-full text-xs font-medium ${We===0?"bg-green-500 text-white":"bg-gray-200 text-gray-600"}`,children:X.position})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:a.jsx("div",{className:"text-sm font-medium text-gray-900",children:((et=X.topic)==null?void 0:et.name)||"N/A"})}),a.jsx("td",{className:"px-6 py-4",children:a.jsx("div",{className:"text-sm text-gray-900 max-w-xs truncate",title:(Je=X.keyword)==null?void 0:Je.keyword,children:((Ke=X.keyword)==null?void 0:Ke.keyword)||"N/A"})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"w-16 h-2 bg-gray-200 rounded-full overflow-hidden mr-2",children:a.jsx("div",{className:`h-full rounded-full ${(((ce=X.keyword)==null?void 0:ce.trend_score)||0)>=70?"bg-green-500":(((Qe=X.keyword)==null?void 0:Qe.trend_score)||0)>=50?"bg-yellow-500":"bg-red-500"}`,style:{width:`${((Ze=X.keyword)==null?void 0:Ze.trend_score)||0}%`}})}),a.jsx("span",{className:"text-xs text-gray-500",children:((Nt=X.keyword)==null?void 0:Nt.trend_score)||0})]})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Sv,{className:"w-4 h-4 text-gray-400"}),a.jsx("span",{className:"text-sm text-gray-900",children:X.estimated_at?new Date(X.estimated_at).toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}):"Soon"})]})}),a.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium",children:a.jsx("button",{onClick:()=>lt(X.id),className:"text-orange-600 hover:text-orange-900",title:"Skip this blog - select a different keyword",children:"Skip"})})]},X.id)})})]})}),a.jsx("div",{className:"px-6 py-4 border-t border-gray-200 bg-gray-50",children:a.jsx("p",{className:"text-xs text-gray-500",children:"The first item (highlighted in green) will be used for the next blog generation. Skipping an item will remove it and select the next available keyword."})})]})]}):Xe.length===0?a.jsxs("div",{className:"card p-12 text-center",children:[a.jsx(cO,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No blogs found"}),a.jsx("p",{className:"text-gray-500 mb-6",children:S==="all"?"No blogs have been generated yet. Create your first blog or set up automation.":`No blogs with "${S}" status.`}),S==="all"&&a.jsxs("button",{onClick:()=>e("/user/blogs/create"),className:"btn-primary inline-flex items-center",children:[a.jsx(hO,{className:"w-5 h-5 mr-2"}),"Create Your First Blog"]})]}):a.jsx("div",{className:"space-y-4",children:Xe.map(X=>{var et,Je;const We=Wp(X.status);return a.jsx("div",{className:"card overflow-hidden",children:a.jsx("div",{className:"p-6",children:a.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-start lg:justify-between gap-4",children:[a.jsx("div",{className:"flex-1 min-w-0",children:a.jsxs("div",{className:"flex items-start gap-4",children:[X.featured_image?a.jsx("div",{className:"w-20 h-20 flex-shrink-0 rounded-lg overflow-hidden bg-gray-100",children:a.jsx(Ls,{src:X.featured_image,alt:X.featured_image_alt||X.title,className:"w-full h-full object-cover",fallback:a.jsx("div",{className:"w-full h-full flex items-center justify-center",children:a.jsx(fO,{className:"w-8 h-8 text-gray-400"})})})}):a.jsx("div",{className:"w-20 h-20 bg-gray-100 rounded-lg flex-shrink-0 flex items-center justify-center",children:a.jsx(fO,{className:"w-8 h-8 text-gray-400"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900 truncate",children:X.title}),(X.published_at||X.created_at)&&a.jsxs("div",{className:"flex items-center gap-2 mt-1 mb-2",children:[a.jsx(Sv,{className:"w-4 h-4 text-gray-400"}),a.jsx("span",{className:"text-xs text-gray-500",children:X.published_at?`Published: ${new Date(X.published_at).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}`:X.created_at?`Created: ${new Date(X.created_at).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}`:""})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-2",children:[a.jsx(Is,{content:X.status==="draft"?"Draft: Blog is saved but not submitted for review. You can edit and submit it when ready.":X.status==="pending"?"Pending Review: Blog is submitted and waiting for approval before it can be published.":X.status==="approved"?"Approved: Blog has been approved and is ready to be published to your website.":X.status==="published"?"Published: Blog has been successfully published to your website and is live.":X.status==="rejected"?"Rejected: Blog was rejected during review. You can edit and resubmit it."
222:"Blog status",position:"top",showIcon:!1,children:a.jsx("span",{className:`inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium ${We.bg} ${We.text}`,children:We.label})}),X.target_type&&X.target_type!=="topic"&&(()=>{const Ke=T_e(X.target_type,X.target_products,X.target_category_name);return a.jsx(Is,{content:Ke.label,position:"top",showIcon:!1,children:a.jsx("span",{className:`inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium ${Ke.bg} ${Ke.text} border ${Ke.border}`,children:Ke.shortLabel})})})(),X.language_code&&a.jsx("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-600",children:X.language_code.toUpperCase()}),(et=X.topic)!=null&&et.name?a.jsxs("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-blue-50 text-blue-700 border border-blue-200",children:[a.jsx("svg",{className:"w-3 h-3 mr-1",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}),X.topic.name]}):a.jsxs("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-gray-50 text-gray-400 border border-gray-200",children:[a.jsx("svg",{className:"w-3 h-3 mr-1",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}),"No topic"]}),(Je=X.keyword)!=null&&Je.keyword?a.jsxs("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-purple-50 text-purple-700 border border-purple-200",children:[a.jsx("svg",{className:"w-3 h-3 mr-1",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 15.75l-2.489-2.489m0 0a3.375 3.375 0 10-4.773-4.773 3.375 3.375 0 004.774 4.774zM21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),X.keyword.keyword]}):a.jsxs("span",{className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-gray-50 text-gray-400 border border-gray-200",children:[a.jsx("svg",{className:"w-3 h-3 mr-1",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 15.75l-2.489-2.489m0 0a3.375 3.375 0 10-4.773-4.773 3.375 3.375 0 004.774 4.774zM21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"No keyword"]}),X.wordpress_url&&a.jsxs("a",{href:X.wordpress_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-green-50 text-green-600 hover:bg-green-100",children:[a.jsx(N_e,{className:"w-3 h-3 mr-1"}),"View Live"]})]}),X.meta_description&&a.jsx("p",{className:"mt-3 text-sm text-gray-600 line-clamp-2",children:X.meta_description})]})]})}),a.jsxs("div",{className:"flex flex-col items-end gap-3 flex-shrink-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:()=>e(`/user/blogs/${X.id}/edit`),className:"btn-ghost",title:"Edit blog",children:a.jsx(mO,{className:"w-4 h-4"})}),a.jsx("button",{onClick:()=>e(`/user/blogs/${X.id}/view`),className:"btn-ghost",title:"View blog",children:a.jsx(j_e,{className:"w-4 h-4"})}),(X.wordpress_url||["wordpress","woocommerce"].includes(it==null?void 0:it.platform_type))&&a.jsx("button",{onClick:()=>X.wordpress_url?window.open(X.wordpress_url,"_blank"):Fe(X.id),disabled:W[`preview-${X.id}`],className:"btn-ghost disabled:opacity-50 disabled:cursor-not-allowed",title:"View live on your website",children:W[`preview-${
222X.id}`]?a.jsxs("svg",{className:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):a.jsx(pO,{className:"w-4 h-4"})}),(X.status==="draft"||X.status==="pending")&&a.jsxs(a.Fragment,{children:[a.jsx("button",{onClick:()=>mt(X.id),disabled:W[`approve-${X.id}`],className:"btn-success disabled:opacity-50 disabled:cursor-not-allowed",children:W[`approve-${X.id}`]?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin w-4 h-4 mr-1",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Approving..."]}):a.jsxs(a.Fragment,{children:[a.jsx(dO,{className:"w-4 h-4 mr-1"}),"Approve"]})}),a.jsx("button",{onClick:()=>ut(X.id),disabled:W[`reject-${X.id}`],className:"btn-danger disabled:opacity-50 disabled:cursor-not-allowed",children:W[`reject-${X.id}`]?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin w-4 h-4 mr-1",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Rejecting..."]}):a.jsxs(a.Fragment,{children:[a.jsx(uO,{className:"w-4 h-4 mr-1"}),"Reject"]})})]}),X.status==="approved"&&a.jsx(Is,{content:"Publish this blog to your website. The blog will be published immediately and go live.",position:"top",showIcon:!1,children:a.jsx("button",{onClick:()=>ue(X.id),disabled:W[`publish-${X.id}`],className:"btn-primary disabled:opacity-50 disabled:cursor-not-allowed",children:W[`publish-${X.id}`]?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin w-4 h-4 mr-1",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Publishing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(C_e,{className:"w-4 h-4 mr-1"}),"Publish"]})})})]}),(X.seo_score||X.seo_grade)&&a.jsx(D_e,{score:X.seo_score,grade:X.seo_grade})]})]})})},X.id)})}),C==="blogs"&&fe.last_page>1&&a.jsxs("div",{className:"mt-6 bg-gray-50 px-6 py-4 flex items-center justify-between border-t border-gray-200 rounded-lg",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsxs("span",{className:"text-sm text-gray-700",children:["Showing ",(fe.current_page-1)*fe.per_page+1," to ",Math.min(fe.current_page*fe.per_page,fe.total)," of ",fe.total," blogs"]}),a.jsxs("select",{value:Me,onChange:X=>{Y(Number(X.target.value)),ye(1)},className:"text-sm border-gray-300 rounded-md",children:[a.jsx("option",{value:10,children:"10 per page"}),a.jsx("option",{value:20,children:"20 per page"}),a.jsx("option",{value:50,children:"50 per page"}),a.jsx("option",{value:100,children:"100 per page"})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:()=>ye(X=>Math.max(1,X-1)),disabled:fe.current_page===1,className:"px-3 py-2 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50",children:"Previous"}),a.jsxs("span",{className:"text-sm text-gray-700",children:["Page ",fe.current_page," of ",fe.last_page]}),a.jsx("button",{onClick:()=>ye(X=>Math.min(fe.last_page,X+1)),disabled:fe.current_page===fe.last_page,className:"px-3 py-2 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50",children:"Next"})]})]}),F&&a.jsxs("div",{className:"fixed inset-0 z-50 overflow-hidden",children:[a.jsx("div",{className:"absolute inset-0 bg-gray-900/60 backdrop-blur-sm",onClick:()=>V(null)}),a.jsx("div",{className:"fixed inset-4 sm:inset-6 lg:inset-8 z-10 flex flex-col",children:a.jsxs("div",{className:"bg-white rounded-xl shadow-2xl flex flex-col max-h-full overflow-hidden",children:[a.jsx("div",{className:"flex-shrink-0 px-6 py-4 border-b border-gray-200 bg-gray-50/80",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-red-100 flex items-center justify-center",children:a.jsx("svg",{className:"w-5 h-5 text-red-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Blog Preview"}),a.jsx("p",{className:"text-sm text-gray-500",children:"Review your blog content"})]})]}),a.jsx("button",{onClick:()=>V(null),className:"p-2 text-gray-400 hover:text-gray-600 rounded-lg hover:bg-gray-100 transition-colors",children:a.jsx(uO,{className:"w-5 h-5"})})]})}),a.jsx("div",{className:"flex-1 overflow-y-auto",children:a.jsxs("div",{className:"max-w-4xl mx-auto px-6 sm:px-8 lg:px-12 py-8",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-6",children:[a.jsx("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-xs font-medium ${Wp(F.status).bg} ${Wp(F.status).text}`,children:Wp(F.status).label}),F.language_code&&a.jsxs("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-600",children:[a.jsx("svg",{className:"w-3.5 h-3.5 mr-1.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"})}),F.language_code.toUpperCase()]}),F.created_at&&a.jsx("span",{className:"text-sm text-gray-500",children:new Date(F.created_at).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]}),a.jsx("h1",{className:"text-3xl sm:text-4xl font-bold text-gray-900 mb-6 leading-tight text-left",children:F.title}),F.featured_image&&a.jsx("div",{className:"mb-8 -mx-6 sm:-mx-8 lg:-mx-12",children:a.jsx(Ls,{src:F.featured_image,alt:F.title,className:"w-full h-auto object-cover max-h-96"})}),a.jsx("article",{className:"blog-preview-content prose prose-lg max-w-none text-left",children:F.content?a.jsx("div",{dangerouslySetInnerHTML:zV(F.content)}):a.jsx("p",{className:"text-gray-500 italic",children:"No content available"})})]})}),a.jsx("div",{className:"flex-shrink-0 px-6 py-4 border-t border-gray-200 bg-gray-50/80",children:a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[a.jsxs("div",{className:"flex flex-wrap gap-2",children:[(F.wordpress_url||["wordpress","woocommerce"].includes(it==null?void 0:it.platform_type))&&a.jsxs("button",{onClick:()=>{F.wordpress_url?window.open(F.wordpress_url,"_blank"):Fe(F.id),V(null)},disabled:W[`preview-${F.id}`],className:"btn-secondary inline-flex items-center text-sm disabled:opacity-50 disabled:cursor-not-allowed",children:[a.jsx(pO,{className:"w-4 h-4 mr-1.5"}),"View Live"]}),a.jsxs("button",{onClick:()=>{e(`/user/blogs/${F.id}/edit`),V(null)},className:"btn-secondary inline-flex items-center text-sm",children:[a.jsx(mO,{className:"w-4 h-4 mr-1.5"}),"Edit"]})]}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx("button",{onClick:()=>V(null),className:"btn-secondary text-sm",children:"Close"}),(F.status==="draft"||F.status==="pending")&&a.jsx("button",{onClick:()=>{mt(F.id),V(null)},disabled:W[`approve-${F.id}`],className:"btn-success text-sm disabled:opacity-50 disabled:cursor-not-allowed",children:W[`approve-${F.id}`]?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin w-4 h-4 mr-1.5",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Approving..."]}):a.jsxs(a.Fragment,{children:[a.jsx(dO,{className:"w-4 h-4 mr-1.5"}),"Approve"]})})]})]})})]})})]}),a.jsxs(PC,{isOpen:B,onClose:()=>R(!1),title:"How SEO Grade is Calculated",size:"lg",children:[a.jsxs("div",{className:"space-y-6",children:[a.jsx("p",{className:"text-gray-600",children:"The SEO score measures how well your content is optimized for search engines. It's calculated based on several key factors:"}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h4",{className:"font-semibold text-gray-900",children:"Title Optimization"}),a.jsx("span",{className:"text-sm font-medium text-primary-600",children:"20%"})]}),a.jsxs("ul",{className:"text-sm text-gray-600 space-y-1",children:[a.jsx("li",{children:"⢠Optimal length: 50-60 characters"}),a.jsx("li",{children:"⢠Contains the target keyword"}),a.jsx("li",{children:"⢠Compelling and click-worthy"})]})]}),a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h4",{className:"font-semibold text-gray-900",children:"Meta Description"}),a.jsx("span",{className:"text-sm font-medium text-primary-600",children:"15%"})]}),a.jsxs("ul",{className:"text-sm text-gray-600 space-y-1",children:[a.jsx("li",{children:"⢠Optimal length: 120-160 characters"}),a.jsx("li",{children:"⢠Includes the target keyword"}),a.jsx("li",{children:"⢠Provides a clear summary of the content"})]})]}),a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h4",{className:"font-semibold text-gray-900",children:"Content Length"}),a.jsx("span",{className:"text-sm font-medium text-primary-600",children:"20%"})]}),a.jsxs("ul",{className:"text-sm text-gray-600 space-y-1",children:[a.jsx("li",{children:"⢠Minimum 800 words re
222commended"}),a.jsx("li",{children:"⢠Comprehensive coverage of the topic"}),a.jsx("li",{children:"⢠Higher word count for competitive keywords"})]})]}),a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h4",{className:"font-semibold text-gray-900",children:"Keyword Usage"}),a.jsx("span",{className:"text-sm font-medium text-primary-600",children:"15%"})]}),a.jsxs("ul",{className:"text-sm text-gray-600 space-y-1",children:[a.jsx("li",{children:"⢠Keyword in title and first paragraph"}),a.jsx("li",{children:"⢠Used in headings (H2, H3)"}),a.jsx("li",{children:"⢠Natural keyword density throughout"})]})]}),a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h4",{className:"font-semibold text-gray-900",children:"Readability"}),a.jsx("span",{className:"text-sm font-medium text-primary-600",children:"15%"})]}),a.jsxs("ul",{className:"text-sm text-gray-600 space-y-1",children:[a.jsx("li",{children:"⢠Short, clear sentences"}),a.jsx("li",{children:"⢠Well-structured paragraphs"}),a.jsx("li",{children:"⢠Varied vocabulary"})]})]}),a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h4",{className:"font-semibold text-gray-900",children:"Content Structure"}),a.jsx("span",{className:"text-sm font-medium text-primary-600",children:"15%"})]}),a.jsxs("ul",{className:"text-sm text-gray-600 space-y-1",children:[a.jsx("li",{children:"⢠Proper heading hierarchy (H2, H3)"}),a.jsx("li",{children:"⢠Internal and external links"}),a.jsx("li",{children:"⢠Images with alt text"})]})]})]}),a.jsxs("div",{className:"border-t border-gray-200 pt-4",children:[a.jsx("h4",{className:"font-semibold text-gray-900 mb-3",children:"Grade Scale"}),a.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("span",{className:"inline-flex items-center justify-center w-10 h-10 rounded-lg bg-green-500 text-white font-bold text-lg",children:"A"}),a.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"80-100"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("span",{className:"inline-flex items-center justify-center w-10 h-10 rounded-lg bg-yellow-500 text-white font-bold text-lg",children:"B"}),a.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"60-79"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("span",{className:"inline-flex items-center justify-center w-10 h-10 rounded-lg bg-orange-500 text-white font-bold text-lg",children:"C"}),a.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"40-59"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("span",{className:"inline-flex items-center justify-center w-10 h-10 rounded-lg bg-red-500 text-white font-bold text-lg",children:"D"}),a.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"0-39"})]})]})]})]}),a.jsx("div",{className:"mt-6 flex justify-end",children:a.jsx("button",{onClick:()=>R(!1),className:"btn-primary",children:"Got it"})})]}),a.jsx(rc,{isOpen:pe.isOpen,onClose:()=>be({isOpen:!1,queueId:null}),onConfirm:Ct,title:"Skip Blog",message:"Are you sure you want to skip this blog? A different keyword will be selected for generation.",confirmText:"Skip",cancelText:"Cancel",variant:"warning"}),a.jsx(rc,{isOpen:Oe.isOpen,onClose:()=>at({isOpen:!1,scheduledBlogId:null}),onConfirm:we,title:"Cancel Scheduled Blog",message:"Are you sure you want to cancel this scheduled blog? The blog will be removed from the schedule.",confirmText:"Cancel Blog",cancelText:"Go Back",variant:"danger"})]})}const M_e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 002.25-2.25V6.75A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25v10.5A2.25 2.25 0 004.5 19.5z"})}),P_e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09
222L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z"})});function O_e(){const{user:e}=jr(),n=Ot(),[i,s]=Do(),[d,h]=j.useState(!0),[f,g]=j.useState(null),[p,x]=j.useState(null),[y,v]=j.useState([]),[w,C]=j.useState(null),[E,S]=j.useState(!1),[D,I]=j.useState(""),[M,B]=j.useState("");j.useEffect(()=>{R();const z=i.get("success"),W=i.get("canceled"),K=i.get("session_id");z==="true"&&K?(F(K),i.delete("success"),i.delete("session_id"),s(i)):W==="true"&&(B("Payment was canceled. You can try again anytime."),i.delete("canceled"),s(i))},[]);const R=async()=>{try{h(!0);const[z,W,K]=await Promise.all([ne.get("/credits"),ne.get("/credits/summary"),ne.get("/credits/packages")]);g(z.data),x(W.data),v(K.data.packages||[])}catch(z){console.error("Failed to load credits data:",z),B("Failed to load credit information. Please refresh the page.")}finally{h(!1)}},F=async z=>{var W,K;S(!0);try{const G=await ne.post("/credits/verify",{session_id:z});G.data.success?(I(`Payment successful! ${G.data.message}`),R()):B(G.data.error||"Failed to verify payment.")}catch(G){B(((K=(W=G.response)==null?void 0:W.data)==null?void 0:K.error)||"Failed to verify payment. Please contact support if you were charged.")}finally{S(!1)}},V=async z=>{var W,K;C(z),B("");try{const G=await ne.post("/credits/checkout",{package_id:z});G.data.checkout_url?window.location.href=G.data.checkout_url:B("Failed to create checkout session. Please try again.")}catch(G){console.error("Failed to create checkout:",G),B(((K=(W=G.response)==null?void 0:W.data)==null?void 0:K.error)||"Failed to start checkout. Please try again.")}finally{C(null)}},P=z=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(z/100);return d?a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):a.jsxs("div",{className:"p-6 sm:p-8 max-w-6xl mx-auto",children:[a.jsxs("div",{className:"mb-8 flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Credits"}),a.jsx("p",{className:"mt-1 text-gray-500",children:"Purchase credits to generate blogs"})]}),a.jsxs("button",{onClick:()=>n("/user/usages"),className:"flex items-center px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors",children:[a.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z"})}),"Usages"]})]}),D&&a.jsx("div",{className:"mb-6",children:a.jsx(en,{type:"success",message:D,onClose:()=>I("")})}),M&&a.jsx("div",{className:"mb-6",children:a.jsx(en,{type:"error",message:M,onClose:()=>B("")})}),E&&a.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:a.jsxs("div",{className:"bg-white rounded-xl p-8 text-center max-w-sm mx-4",children:[a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600 mx-auto mb-4"}),a.jsx("p",{className:"text-lg font-medium text-gray-900",children:"Verifying payment..."}),a.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Please wait while we confirm your purchase."})]})}),a.jsxs("div",{className:"bg-gradient-to-r from-primary-600 to-primary-700 rounded-2xl p-6 sm:p-8 text-white mb-8",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-primary-100 text-sm font-medium",children:"Available Credits"}),a.jsx("p",{className:"text-4xl sm:text-5xl font-bold mt-2",children:(f==null?void 0:f.balance)||0}),a.jsxs("p",{className:"text-primary-200 text-sm mt-2",children:[(p==null?void 0:p.total_used)||0," credits used total"]})]}),a.jsx("div",{className:"bg-white/20 rounded-full p-4",children:a.jsx(M_e,{className:"w-12 h-12 text-white"})})]}),(f==null?void 0:f.balance)<=3&&(f==null?void 0:f.balance)>0&&a.jsx("div",{className:"mt-4 bg-yellow-500/20 rounded-lg p-3",children:a.jsx("p",{className:"text-sm text-yellow-100",children:"Low credit balance! Purchase more credits below to continue generating blogs."})}),(f==null?void 0:f.balance)===0&&a.jsx("div",{className:"mt-4 bg-red-500/20 rounded-lg p-3",children:a.jsx("p",{className:"text-sm text-red-100",children:"You have no credits remaining. Purchase credits below to generate more blogs."})})]}),a.jsxs("div",{className:"mb-8",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Purchase Credits"}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:y.map(z=>a.jsxs("div",{className:`relative bg-white rounded-xl border-2 p-6 transition-all hover:shadow-lg ${z.popular?"border-primary-500 ring-2 ring-primary-100":"border-gray-200"}`,children:[z.popular&&a.jsx("div",{className:"absolute -top-3 left-1/2 transform -translate-x-1/2",children:a.jsxs("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold bg-primary-600 text-white",children:[a.jsx(P_e,{className:"w-3 h-3 mr-1"}),"Most Popular"]})}),a.jsxs("div",{className:"text-center mb-4",children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:z.name}),a.jsx("p",{className:"text-sm text-gray-500 mt-1",children:z.description})]}),a.jsxs("div",{className:"text-center mb-4",children:[a.jsx("span",{className:"text-3xl font-bold text-gray-900",children:P(z.price)}),z.savings&&a.jsxs("span",{className:"ml-2 inline-block px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-700",children:["Save ",z.savings]})]}),a.jsxs("div",{className:"text-center mb-6",children:[a.jsx("span",{className:"text-2xl font-bold text-primary-600",children:z.credits}),a.jsx("span",{className:"text-gray-500 ml-1",children:"credits"})]}),a.jsx("button",{onClick:()=>
222V(z.id),disabled:w===z.id,className:`w-full py-2.5 px-4 rounded-lg font-medium transition-colors ${z.popular?"bg-primary-600 text-white hover:bg-primary-700 disabled:bg-primary-400":"bg-gray-100 text-gray-900 hover:bg-gray-200 disabled:bg-gray-100 disabled:text-gray-400"}`,children:w===z.id?a.jsxs("span",{className:"flex items-center justify-center",children:[a.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Processing..."]}):"Purchase"})]},z.id))})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 mb-8",children:[a.jsxs("div",{className:"bg-white rounded-xl p-5 border border-gray-200",children:[a.jsx("p",{className:"text-sm text-gray-500",children:"Total Purchased"}),a.jsx("p",{className:"text-2xl font-bold text-gray-900 mt-1",children:(p==null?void 0:p.total_purchased)||0})]}),a.jsxs("div",{className:"bg-white rounded-xl p-5 border border-gray-200",children:[a.jsx("p",{className:"text-sm text-gray-500",children:"Bonus Credits"}),a.jsx("p",{className:"text-2xl font-bold text-gray-900 mt-1",children:(p==null?void 0:p.total_bonus)||0})]}),a.jsxs("div",{className:"bg-white rounded-xl p-5 border border-gray-200",children:[a.jsx("p",{className:"text-sm text-gray-500",children:"Total Used"}),a.jsx("p",{className:"text-2xl font-bold text-gray-900 mt-1",children:(p==null?void 0:p.total_used)||0})]})]}),a.jsx("div",{className:"mt-6 text-center text-sm text-gray-500",children:a.jsxs("p",{className:"flex items-center justify-center",children:[a.jsx("svg",{className:"w-4 h-4 mr-1 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})}),"Secure payments powered by Stripe"]})})]})}const B_e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),gO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),bO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456z"})}),kO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),L_e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),R_e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})}),z_e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),F_e=[{key:"auto",label:"Auto",tag:"Recommended",description:"We'll pick the best content type for maximum SEO impact",icon:a.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09
222L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456z"})}),color:"primary"},{key:"topic",label:"General Blog",description:"Write about a topic to boost your website SEO",icon:a.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 01-2.25 2.25M16.5 7.5V18a2.25 2.25 0 002.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 002.25 2.25h13.5M6 7.5h3v3H6V7.5z"})}),color:"gray"},{key:"product",label:"Product Blog",description:"Write about specific products from your store",icon:a.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"})}),color:"purple"},{key:"category",label:"Category Blog",description:"Write about a product category like Shoes or Electronics",icon:a.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}),color:"blue"}];function $_e(){const e=Ot(),[n]=Do(),{activeSiteId:i,setActiveSite:s}=ui(),[d,h]=j.useState(!0),[f,g]=j.useState(!1),[p,x]=j.useState([]),[y,v]=j.useState(0),[w,C]=j.useState(null),[E,S]=j.useState(null),[D,I]=j.useState(null),[M,B]=j.useState(""),[R,F]=j.useState(!1),[V,P]=j.useState(""),[z,W]=j.useState(""),[K,G]=j.useState(null),[Z,se]=j.useState(!1),[ge,Se]=j.useState([]),[Ae,he]=j.useState(null),[ee,le]=j.useState(""),[je,ve]=j.useState("auto"),[Ce,Q]=j.useState(!1),[te,pe]=j.useState("topic"),[be,Oe]=j.useState([]),[at,re]=j.useState(""),[ye,Me]=j.useState([]),[Y,fe]=j.useState(!1),[Ne,Ue]=j.useState([]),[it,Ve]=j.useState(null),[mt,ut]=j.useState(!1),Fe=(w==null?void 0:w.platform_type)==="woocommerce"||(w==null?void 0:w.platform_type)==="opencart";j.useEffect(()=>{const ce=n.get("target_type"),Qe=n.get("target_category_name");ce&&pe(ce),Qe&&Ve(Qe)},[]),j.useEffect(()=>{ke()},[i]),j.useEffect(()=>{w!=null&&w.id&&(ue(w.id),Fe&&Re(w.id))},[w==null?void 0:w.id]);const ue=async ce=>{var Qe;Q(!0);try{const Ze=await ne.get(`/sites/${ce}/categories`);(Qe=Ze.data)!=null&&Qe.categories&&Se(Ze.data.categories)}catch(Ze){console.error("Failed to load WordPress categories",Ze),Se([])}finally{Q(!1)}},Re=async ce=>{var Qe;ut(!0);try{const Ze=await ne.get(`/sites/${ce}/categories`);(Qe=Ze.data)!=null&&Qe.categories&&Ue(Ze.data.categories)}catch(Ze){console.error("Failed to load store categories",Ze),Ue([])}finally{ut(!1)}},ke=async()=>{var ce;try{h(!0),se(!1);const Ze=(await ne.get("/sites")).data||[];try{const Ut=await ne.get("/auth/user");v(Ut.data.credits_balance||0)}catch(Ut){console.error("Failed to fetch user credits:",Ut)}if(Ze.length===0){x([]),h(!1);return}let Nt=i||n.get("site_id");if(!Nt&&Ze.length>0&&(Nt=Ze[0].id,s(Nt)),!Nt){se(!0),h(!1);return}const dn=await ne.get("/blogs/topics-for-generation",{params:{site_id:Nt}});if(x(dn.data.sites||[]),dn.data.credits_balance!==void 0&&v(dn.data.credits_balance),((ce=dn.data.sites)==null?void 0:ce.length)>0){const Ut=dn.data.sites.find(Yr=>Yr.id===parseInt(Nt));C(Ut||dn.data.sites[0])}}catch(Qe){console.error("Failed to load data:",Qe),W("Failed to load data. Please refresh the page.")}finally{h(!1)}},$e=ce=>{pe(ce),Oe([]),re(""),Me([]),Ve(null),(ce==="product"||ce==="category")&&(S(null),I(null),B(""),F(!1))},lt=ce=>{S(ce),I(null),B(""),F(!1)},Ct=ce=>{ce.available&&(I(ce),F(!1),B(""))},we=async ce=>{if(re(ce),ce.length<2){Me([]);return}fe(!0);try{const Qe=await ne.get(`/sites/${w.id}/products/search`,{params:{q:ce}});Me(Qe.data||[])}catch(Qe){console.error("Product search failed",Qe),Me([])}finally{fe(!1)}},Xe=ce=>{Oe(Qe=>Qe.find(Nt=>Nt.id===ce.id)?Qe.filter(Nt=>Nt.id!==ce.id):Qe.length>=3?Qe:[...Qe,ce])},X=ce=>{Oe(Qe=>Qe.filter(Ze=>Ze.id!==ce))},We=async()=>{var ce,Qe;if(te==="product"&&be.length===0){W("Please select at least one product.");return}if(te==="category"&&!it){W("Please select a store category.");return}if((te==="topic"||te==="auto")&&!E){W("Please select a topic first.");return}if(!R&&!D){W("Please select a keyword or enter a custom keyword.");return}if(R&&!M.trim()){W("Please enter a custom keyword.");return}g(!0),W(""),P("");try{const Ze={topic_id:E==null?void 0:E.id,target_type:te==="auto"?"auto":te};if(R?Ze.custom_keyword=M.trim():D&&(Ze.keyword_id=D.id),te==="product"&&be.length>0&&(Ze.target_product_ids=be.map(dn=>dn.id)),te==="category"&&it&&(Ze.target_category_name=it),je==="existing"&&Ae){const dn=ge.find(Ut=>Ut.id===Ae);Ze.category_name=(dn==null?void 0:dn.name)||"",Ze.wordpress_category_id=Ae}else je==="custom"&&ee.trim()&&(Ze.category_name=ee.trim());const Nt=await ne.post("/blogs/generate",Ze);P(Nt.data.message),G(Nt.data.blog),v(Nt.data.credits_remaining),I(null),B(""),Oe([]),Ve(null),ke()}catch(Ze){console.error("Failed to generate blog:",Ze),W(((Qe=(ce=Ze.response)==null?void 0:ce.data)==null?void 0:Qe.error)||"Failed to generate blog. Please try again.")}finally{g(!1)}},et=ce=>Fe?{blogType:1,focus:2,keyword:3,wpCategory:4}[ce]||1:{topic:1,keyword:2,wpCategory:3}[ce]||1,Je=()=>te==="topic"||te==="auto"?!!E:te==="product"?be.length>0:te==="category"?!!it:!1,Ke=()=>te==="product"&&be.length>0?be.map(ce=>ce.name).join(", ").substring(0,80):te==="category"&&it?it:"";return d?a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):a.jsxs("div",{className:"p-6 sm:p-8 max-w-4xl mx-auto",children:[a.jsxs("div",{className:"mb-8",children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Create Blog"}),a.jsx("p",{className:"mt-1 text-gray-500",children:"Generate a new blog post by selecting a topic and keyword"})]}),a.jsxs("div",{className:"bg-gradient-to-r from-primary-600 to-primary-700 rounded-xl p-4 text-white mb-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(bO,{className:"w-5 h-5 mr-2"}),a.jsx("span",{className:"font-medium",children:"Credits Balance:"}),a.jsx("span",{className:"ml-2 text-xl font-bold",children:y})]}),y<1&&a.jsx("button",{onClick:()=>e("/user/credits"),className:"px-3 py-1 bg-white/20 rounded-lg text-sm hover:bg-white/30 transition-colors",children:"Buy Credits"})]}),y<1&&a.jsx("p",{className:"text-sm text-yellow-200 mt-2",children:"You need at least 1 credit to generate a blog."})]}),V&&a.jsx("div",{className:"mb-6",children:a.jsx(en,{type:"success",message:V,onClose:()=>P("")})}),z&&a.jsx("div",{className:"mb-6",children:a.jsx(en,{type:"error",message:z,onClose:()=>W("")})}),K&&a.jsx("div",{className:"mb-6 bg-green-50 border border-green-200 rounded-xl p-4",children:a.jsxs("div",{className:"flex items-start",children:[a.jsx(kO,{className:"w-6 h-6 text-green-500 flex-shrink-0 mt-0.5"}),a.jsxs("div",{className:"ml-3 flex-1",children:[a.jsx("h3",{className:"text-green-800 font-medium",children:"Blog Generated Successfully!"}),a.jsx("p",{className:"text-green-700 text-sm mt-1",children:K.title}),a.jsxs("div",{className:"mt-3 flex gap-2",children:[a.jsx("button",{onClick:()=>e("/user/blogs"),className:"px-3 py-1.5 bg-green-600 text-white text-sm rounded-lg hover:bg-green-700 transition-colors",children:"View All Blogs"}),a.jsx("button",{onClick:()=>G(null),className:"px-3 py-1.5 bg-white text-green-700 text-sm rounded-lg border border-green-300 hover:bg-green-50 transition-colors",children:"Create Another"})]})]})]})}),Z?a.jsxs("div",{className:"card p-8 text-center",children:[a.jsx(gO,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No site selected"}),a.jsx("p",{className:"text-gray-500 mb-4",children:"Please select a site from the header dropdown to create a blog."}),a.jsx("button",{onClick:()=>e("/user/sites"),className:"btn-primary",children:"Manage Sites"})]}):p.length===0&&!w?a.jsxs("div",{className:"card p-8 text-center",children:[a.jsx(gO,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No sites available"}),a.jsx("p",{className:"text-gray-500 mb-4",children:"Add a site and create topics to start generating blogs."}),a.jsxs("button",{onClick:()=>e("/user/sites/add"),className:"btn-primary",children:[a.jsx(B_e,{className:"w-4 h-4 mr-2"}),"Add Site"]})]}):a.jsxs("div",{className:"space-y-6",children:[w&&a.jsx("div",{className:"card p-4 bg-primary-50 border border-primary-200",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-primary-700 font-medium",children:"Selected Site"}),a.jsx("p",{className:"text-lg font-semibold text-gray-900",children:w.name}),a.jsx("p",{className:"text-sm text-gray-600",children:w.url})]}),a.jsx("button",{onClick:()=>e("/user/sites"),className:"text-sm text-primary-600 hover:text-primary-700 underline",children:"Change Site"})]})}),w&&Fe&&a.jsxs("div",{className:"card p-6",children:[a.jsxs("h2",{className:"text-lg font-semibold text-gray-900 mb-1",children:[a.jsx("span",{className:"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-700 text-sm font-bold mr-2",children:et("blogType")}),"What is this blog about?"]}),a.jsx("p",{className:"text-sm text-gray-500 mb-4 ml-8",children:"Choose the type of content you want to create"}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:F_e.map(ce=>{const Qe=te===ce.key,Ze={primary:Qe?"border-primary-500 bg-primary-50 ring-1 ring-primary-500":"border-gray-200 hover:border-primary-300",gray:Qe?"border-gray-500 bg-gray-50 ring-1 ring-gray-500":"border-gray-200 hover:border-gray-300",purple:Qe?"border-purple-500 bg-purple-50 ring-1 ring-purple-500":"border-gray-200 hover:border-purple-300",blue:Qe?"border-blue-500 bg-blue-50 ring-1 ring-blue-500":"border-gray-200 hover:border-blue-300"};return a.jsx("button",{onClick:()=>
222$e(ce.key),className:`p-4 rounded-lg border-2 text-left transition-all ${Ze[ce.color]}`,children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:`flex-shrink-0 p-2 rounded-lg ${Qe?"bg-white/80":"bg-gray-100"}`,children:ce.icon}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("p",{className:"font-semibold text-gray-900",children:ce.label}),ce.tag&&a.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded-full bg-primary-100 text-primary-700 font-medium",children:ce.tag})]}),a.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:ce.description})]})]})},ce.key)})})]}),w&&Fe&&te==="product"&&a.jsxs("div",{className:"card p-6",children:[a.jsxs("h2",{className:"text-lg font-semibold text-gray-900 mb-1",children:[a.jsx("span",{className:"inline-flex items-center justify-center w-6 h-6 rounded-full bg-purple-100 text-purple-700 text-sm font-bold mr-2",children:et("focus")}),"Select Products"]}),a.jsx("p",{className:"text-sm text-gray-500 mb-4 ml-8",children:"Search and select up to 3 products to feature in this blog"}),be.length>0&&a.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:be.map(ce=>a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 bg-purple-50 border border-purple-200 rounded-full text-sm",children:[ce.image_url&&a.jsx("img",{src:ce.image_url,alt:"",className:"w-5 h-5 rounded object-cover"}),a.jsx("span",{className:"text-purple-800 font-medium truncate max-w-[150px]",children:ce.name}),ce.price&&a.jsx("span",{className:"text-purple-600 text-xs",children:ce.price}),a.jsx("button",{onClick:()=>X(ce.id),className:"text-purple-400 hover:text-purple-600",children:a.jsx(z_e,{className:"w-4 h-4"})})]},ce.id))}),a.jsxs("div",{className:"relative",children:[a.jsx(R_e,{className:"w-5 h-5 text-gray-400 absolute left-3 top-1/2 -translate-y-1/2"}),a.jsx("input",{type:"text",value:at,onChange:ce=>we(ce.target.value),placeholder:"Search products by name...",className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500"}),Y&&a.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:a.jsxs("svg",{className:"animate-spin h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})})]}),ye.length>0&&a.jsx("div",{className:"mt-3 max-h-64 overflow-y-auto border border-gray-200 rounded-lg divide-y divide-gray-100",children:ye.map(ce=>{const Qe=be.some(Ze=>Ze.id===ce.id);return a.jsxs("button",{onClick:()=>Xe(ce),disabled:!Qe&&be.length>=3,className:`w-full flex items-center gap-3 p-3 text-left transition-colors ${Qe?"bg-purple-50":be.length>=3?"opacity-50 cursor-not-allowed":"hover:bg-gray-50"}`,children:[ce.image_url?a.jsx("img",{src:ce.image_url,alt:"",className:"w-10 h-10 rounded object-cover flex-shrink-0"}):a.jsx("div",{className:"w-10 h-10 bg-gray-100 rounded flex items-center justify-center flex-shrink-0",children:a.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:ce.name}),ce.price&&a.jsx("p",{className:"text-xs text-gray-500",children:ce.price})]}),a.jsx("div",{className:"flex-shrink-0",children:Qe?a.jsx(kO,{className:"w-5 h-5 text-purple-600"}):a.jsx("div",{className:"w-5 h-5 rounded-full border-2 border-gray-300"})})]},ce.id)})}),at.length>=2&&!Y&&ye.length===0&&a.jsxs("p",{className:"mt-3 text-sm text-gray-500 text-center py-4",children:['No products found for "',at,'"']})]}),w&&Fe&&te==="category"&&a.jsxs("div",{className:"card p-6",children:[a.jsxs("h2",{className:"text-lg font-semibold text-gray-900 mb-1",children:[a.jsx("span",{className:"inline-flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 text-sm font-bold mr-2",children:et("focus")}),"Select Store Category"]}),a.jsx("p",{className:"text-sm text-gray-500 mb-4 ml-8",children:"Choose a product category to write about"}),mt?a.jsxs("div",{className:"flex items-center gap-2 p-3 bg-gray-50 rounded-lg",children:[a.jsxs("svg",{className:"animate-spin h-4 w-4 text-gray-500",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),a.jsx("span",{className:"text-sm text-gray-500",children:"Loading c
222ategories..."})]}):Ne.length>0?a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:Ne.map(ce=>{const Qe=ce.name||ce,Ze=it===Qe;return a.jsxs("button",{onClick:()=>Ve(Ze?null:Qe),className:`p-3 rounded-lg border-2 text-left transition-all ${Ze?"border-blue-500 bg-blue-50 ring-1 ring-blue-500":"border-gray-200 hover:border-blue-300"}`,children:[a.jsx("p",{className:"font-medium text-gray-900 text-sm",children:Qe}),ce.count!==void 0&&a.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[ce.count," products"]})]},ce.id||Qe)})}):a.jsx("div",{className:"p-4 bg-yellow-50 border border-yellow-200 rounded-lg",children:a.jsx("p",{className:"text-sm text-yellow-700",children:"No store categories found. Make sure your website is connected and has product categories."})})]}),w&&(te==="topic"||te==="auto"||Fe&&Je()&&(te==="product"||te==="category"))&&a.jsxs("div",{className:"card p-6",children:[a.jsxs("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:[a.jsx("span",{className:"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-700 text-sm font-bold mr-2",children:et(Fe?te==="topic"||te==="auto"?"focus":"keyword":"topic")}),te==="product"||te==="category"?"Select Topic & Keyword":"Select Topic"]}),w.topics.length===0?a.jsxs("div",{className:"text-center py-4",children:[a.jsx("p",{className:"text-gray-500 mb-3",children:"No topics available for this site."}),a.jsx("button",{onClick:()=>e(`/user/topics/${w.id}`),className:"btn-secondary",children:"Manage Topics"})]}):a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:w.topics.map(ce=>a.jsxs("button",{onClick:()=>lt(ce),className:`p-4 rounded-lg border-2 text-left transition-all ${(E==null?void 0:E.id)===ce.id?"border-primary-500 bg-primary-50":"border-gray-200 hover:border-gray-300"}`,children:[a.jsx("p",{className:"font-medium text-gray-900",children:ce.name}),a.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[a.jsxs("span",{className:`text-xs px-2 py-0.5 rounded-full ${ce.available_keywords_count>0?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600"}`,children:[ce.available_keywords_count," available"]}),a.jsxs("span",{className:"text-xs text-gray-400",children:["/ ",ce.total_keywords_count," total"]})]})]},ce.id))})]}),E&&a.jsxs("div",{className:"card p-6",children:[a.jsxs("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:[a.jsx("span",{className:"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-700 text-sm font-bold mr-2",children:et("keyword")}),"Select Keyword"]}),(te==="product"||te==="category")&&Ke()&&!R&&a.jsxs("div",{className:"mb-4 p-3 bg-blue-50 border border-blue-200 rounded-lg",children:[a.jsxs("p",{className:"text-sm text-blue-800",children:[a.jsx("span",{className:"font-medium",children:"Suggested keyword:"})," ",Ke()]}),a.jsx("button",{onClick:()=>{F(!0),B(Ke()),I(null)},className:"mt-1 text-xs text-blue-600 hover:text-blue-800 underline",children:"Use this as custom keyword"})]}),a.jsx("div",{className:"mb-4",children:a.jsxs("label",{className:"flex items-center cursor-pointer",children:[a.jsx("input",{type:"checkbox",checked:R,onChange:ce=>{F(ce.target.checked),ce.target.checked&&I(null)},className:"w-4 h-4 text-primary-600 border-gray-300 rounded focus:ring-primary-500"}),a.jsx("span",{className:"ml-2 text-sm text-gray-700",children:"Use custom keyword"})]})}),R?a.jsxs("div",{children:[a.jsx("input",{type:"text",value:M,onChange:ce=>B(ce.target.value),placeholder:"Enter your custom keyword...",className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500"}),a.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Enter any keyword you want to target for this blog post."})]}):E.keywords.length===0?a.jsxs("div",{className:"text-center py-4",children:[a.jsx("p",{className:"text-gray-500 mb-3",children:"No keywords available for this topic."}),a.jsx("button",{onClick:()=>e(`/user/keywords/${E.id}`),className:"btn-secondary",children:"Manage Keywords"})]}):a.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:E.keywords.map(ce=>a.jsxs("button",{onClick:()=>Ct(ce),disabled:!ce.available,className:`w-full p-3 rounded-lg border-2 text-left transition-all flex items-center justify-between ${(D==null?void 0:D.id)===ce.id?"border-primary-500 bg-primary-50":ce.available?"border-gray-200 hover:border-gray-300":"border-gray-100 bg-gray-50 cursor-not-allowed opacity-60"}`,children:[a.jsxs("div",{children:[a.jsx("p",{className:`font-medium ${ce.available?"text-gray-900":"text-gray-500"}`,children:ce.keyword}),!ce.available&&ce.cooldown_until&&a.jsxs("p",{className:"text-xs text-gray-400 flex items-center mt-1",children:[a.jsx(L_e,{className:"w-3 h-3 mr-1"}),"Available ",new Date(ce.cooldown_until).toLocaleDateString()]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"text-xs text-gray-500",children:["Score: ",(ce.trend_score*100).toFixed(0),"%"]}),ce.available?a.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500"}):a.jsx("span",{className:"w-2 h-2 rounded-full bg-gray-300"})]})]},ce.id))})]}),E&&(D||R&&M.trim())&&a.jsxs("div",{className:"card p-6",children:[a.jsxs("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:[a.jsx("span",{className:"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-700 text-sm font-bold mr-2",children:et("wpCategory")}),"Publishing Category",a.jsx("span",{className:"text-gray-400 font-normal text-sm ml-2",children:"(optional)"})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex flex-wrap gap-3",children:[a.jsx("button",{type:"button",onClick:()=>{ve("auto"),he(null),le("")},className:`px-4 py-2 rounded-lg border-2 text-sm font-medium transition-all ${je==="auto"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-200 text-gray-700 hover:border-gray-300"}`,children:"Auto (from topic)"}),a.jsx("button",{type:"button",onClick:()=>{ve("existing"),le("")},className:`px-4 py-2 rounded-lg border-2 text-sm font-medium transition-all ${je==="existing"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-200 text-gray-700 hover:border-gray-300"}`,children:"Select Existing"}),a.jsx("button",{type:"button",onClick:()=>{ve("custom"),he(null)},className:`px-4 py-2 rounded-lg border-2 text-sm font-medium transition-all ${je==="custom"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-200 text-gray-700 hover:border-gray-300"}`,children:"Custom Category"})]}),je==="auto"&&a.jsxs("p",{className:"text-sm text-gray-500",children:["Category will be automatically matched or created from the topic name: ",a.jsx("strong",{children:E.name})]}),je==="existing"&&a.jsx("div",{children:Ce?a.jsxs("div",{className:"flex items-center gap-2 p-3 bg-gray-50 rounded-lg",children:[a.jsxs("svg",{className:"animate-spin h-4 w-4 text-gray-500",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),a.jsx("span",{className:"text-sm text-gray-500",children:"Loading c
222ategories..."})]}):ge.length>0?a.jsxs("select",{value:Ae||"",onChange:ce=>he(ce.target.value?parseInt(ce.target.value):null),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500",children:[a.jsx("option",{value:"",children:"Select a category..."}),ge.map(ce=>a.jsxs("option",{value:ce.id,children:[ce.name," ",ce.count>0&&`(${ce.count} posts)`]},ce.id))]}):a.jsx("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:a.jsx("p",{className:"text-sm text-yellow-700",children:"No categories found. Make sure your website is connected or use another option."})})}),je==="custom"&&a.jsxs("div",{children:[a.jsx("input",{type:"text",value:ee,onChange:ce=>le(ce.target.value),placeholder:"Enter category name...",className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500"}),a.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"This category will be created on your website if it doesn't exist."})]})]})]}),w&&Fe&&te!=="topic"&&E&&(D||R&&M.trim())&&a.jsxs("div",{className:"card p-6 bg-gray-50 border border-gray-200",children:[a.jsx("h3",{className:"text-sm font-semibold text-gray-700 uppercase tracking-wider mb-3",children:"Blog Summary"}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-sm text-gray-500 w-24 flex-shrink-0",children:"Type:"}),a.jsx("span",{className:`text-sm font-medium px-2 py-0.5 rounded-full ${te==="product"?"bg-purple-100 text-purple-700":te==="category"?"bg-blue-100 text-blue-700":te==="auto"?"bg-primary-100 text-primary-700":"bg-gray-100 text-gray-700"}`,children:te==="product"?"Product Blog":te==="category"?"Category Blog":te==="auto"?"Auto":"General Blog"})]}),te==="product"&&be.length>0&&a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-sm text-gray-500 w-24 flex-shrink-0",children:"Products:"}),a.jsx("span",{className:"text-sm text-gray-900",children:be.map(ce=>ce.name).join(", ")})]}),te==="category"&&it&&a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-sm text-gray-500 w-24 flex-shrink-0",children:"Category:"}),a.jsx("span",{className:"text-sm text-gray-900",children:it})]}),a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-sm text-gray-500 w-24 flex-shrink-0",children:"Topic:"}),a.jsx("span",{className:"text-sm text-gray-900",children:E.name})]}),a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-sm text-gray-500 w-24 flex-shrink-0",children:"Keyword:"}),a.jsx("span",{className:"text-sm text-gray-900",children:R?M:D==null?void 0:D.keyword})]}),a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-sm text-gray-500 w-24 flex-shrink-0",children:"Cost:"}),a.jsx("span",{className:"text-sm font-medium text-gray-900",children:"1 credit"})]})]})]}),E&&a.jsxs("div",{className:"flex justify-end gap-3",children:[a.jsx("button",{onClick:()=>e("/user/blogs"),className:"btn-secondary",children:"Cancel"}),a.jsx("button",{onClick:We,disabled:f||y<1||!R&&!D||R&&!M.trim(),className:"btn-primary disabled:opacity-50 disabled:cursor-not-allowed",children:f?a.jsxs("span",{className:"flex items-center",children:[a.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Generating..."]}):a.jsxs(a.Fragment,{children:[a.jsx(bO,{className:"w-4 h-4 mr-2"}),"Generate Blog"]})})]})]})]})}var FV={exports:{}},Dv={exports:{}},Tv,yO;function V_e(){if(yO)return Tv;yO=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Tv=e,Tv}var Iv,xO;function U_e(){if(xO)return Iv;xO=1;var e=V_e();function n(){}function i(){}return i.resetWarningCache=n,Iv=function(){function s(f,g,p,x,y,v){if(v!==e){var w=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw w.name="Invariant Violation",w}}s.isRequired=s;function d(){return s}var h={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:d,element:s,elementType:s,instanceOf:d,node:s,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:i,resetWarningCache:n};return h.PropTypes=h,h},Iv}var vO;function W_e(){return vO||(vO=1,Dv.exports=U_e()()),Dv.exports}/** 223 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. 224 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options 225 */class BC{constructor(n){Dt(this,"crashes",[]);Dt(this,"state","initializing");Dt(this,"_crashNumberLimit");Dt(this,"_now",Date.now);Dt(this,"_minimumNonErrorTimePeriod");Dt(this,"_boundErrorHandler");Dt(this,"_listeners");if(this.crashes=[],this._crashNumberLimit=typeof n.crashNumberLimit=="number"?n.crashNumberLimit:3,this._minimumNonErrorTimePeriod=typeof n.minimumNonErrorTimePeriod=="number"?n.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=i=>{const s="error"in i?i.error:i.reason;s instanceof Error&&this._handleError(s,i)},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(n,i){this._listeners[n]||(this._listeners[n]=[]),this._listeners[n].push(i)}off(n,i){this._listeners[n]=this._listeners[n].filter(s=>s!==i)}_fire(n,...i){const s=this._listeners[n]||[];for(const d of s)d.apply(this,[null,...i])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(n,i){if(this._shouldReactToError(n)){this.crashes.push({message:n.message,stack:n.stack,filename:i instanceof ErrorEvent?i.filename:void 0,lineno:i instanceof ErrorEvent?i.lineno:void 0,colno:i instanceof ErrorEvent?i.colno:void 0,date:this._now()});const s=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:n,causesRestart:s}),s?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(n){return n.is&&n.is("CKEditorError")&&n.context!==void 0&&n.context!==null&&this.state==="ready"&&this._isErrorComingFromThisItem(n)}
225_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;const n=this.crashes[this.crashes.length-1].date,i=this.crashes[this.crashes.length-1-this._crashNumberLimit].date;return(n-i)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function H_e(e){return e==null||typeof e!="object"&&typeof e!="function"}function G_e(e){return Object.getOwnPropertySymbols(e).filter(n=>Object.prototype.propertyIsEnumerable.call(e,n))}function q_e(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const K_e="[object RegExp]",$V="[object String]",VV="[object Number]",UV="[object Boolean]",WV="[object Arguments]",Y_e="[object Symbol]",Q_e="[object Date]",Z_e="[object Map]",J_e="[object Set]",X_e="[object Array]",eAe="[object ArrayBuffer]",tAe="[object Object]",nAe="[object DataView]",rAe="[object Uint8Array]",iAe="[object Uint8ClampedArray]",oAe="[object Uint16Array]",sAe="[object Uint32Array]",aAe="[object Int8Array]",lAe="[object Int16Array]",cAe="[object Int32Array]",dAe="[object Float32Array]",uAe="[object Float64Array]";function hAe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function mAe(e,n){return ud(e,void 0,e,new Map,n)}function ud(e,n,i,s=new Map,d=void 0){const h=d==null?void 0:d(e,n,i,s);if(h!=null)return h;if(H_e(e))return e;if(s.has(e))return s.get(e);if(Array.isArray(e)){const f=new Array(e.length);s.set(e,f);for(let g=0;g<e.length;g++)f[g]=ud(e[g],g,i,s,d);return Object.hasOwn(e,"index")&&(f.index=e.index),Object.hasOwn(e,"input")&&(f.input=e.input),f}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const f=new RegExp(e.source,e.flags);return f.lastIndex=e.lastIndex,f}if(e instanceof Map){const f=new Map;s.set(e,f);for(const[g,p]of e)f.set(g,ud(p,g,i,s,d));return f}if(e instanceof Set){const f=new Set;s.set(e,f);for(const g of e)f.add(ud(g,void 0,i,s,d));return f}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(hAe(e)){const f=new(Object.getPrototypeOf(e)).constructor(e.length);s.set(e,f);for(let g=0;g<e.length;g++)f[g]=ud(e[g],g,i,s,d);return f}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const f=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return s.set(e,f),Nl(f,e,i,s,d),f}if(typeof File<"u"&&e instanceof File){const f=new File([e],e.name,{type:e.type});return s.set(e,f),Nl(f,e,i,s,d),f}if(e instanceof Blob){const f=new Blob([e],{type:e.type});return s.set(e,f),Nl(f,e,i,s,d),f}if(e instanceof Error){const f=new e.constructor;return s.set(e,f),f.message=e.message,f.name=e.name,f.stack=e.stack,f.cause=e.cause,Nl(f,e,i,s,d),f}if(typeof e=="object"&&fAe(e)){const f=Object.create(Object.getPrototypeOf(e));return s.set(e,f),Nl(f,e,i,s,d),f}return e}function Nl(e,n,i=e,s,d){const h=[...Object.keys(n),...G_e(n)];for(let f=0;f<h.length;f++){const g=h[f],p=Object.getOwnPropertyDescriptor(e,g);(p==null||p.writable)&&(e[g]=ud(n[g],g,i,s,d))}}function fAe(e){switch(q_e(e)){case WV:case X_e:case eAe:case nAe:case UV:case Q_e:case dAe:case uAe:case aAe:case lAe:case cAe:case Z_e:case VV:case tAe:case K_e:case J_e:case $V:case Y_e:case rAe:case iAe:case oAe:case sAe:return!0;default:return!1}}function pAe(e,n){return mAe(e,(i,s,d,h)=>{const f=n==null?void 0:n(i,s,d,h);if(f!=null)return f;if(typeof e=="object")switch(Object.prototype.toString.call(e)){case VV:case $V:case UV:{const g=new e.constructor(e==null?void 0:e.valueOf());return Nl(g,e),g}case WV:{const g={};return Nl(g,e),g.length=e.length,g[Symbol.iterator]=e[Symbol.iterator],g}default:return}})}function gAe(e){return typeof e=="object"&&e!==null}function bAe(e,n,{signal:i,edges:s}={}){let d,h=null;const f=s!=null&&s.includes("leading"),g=s==null||s.includes("trailing"),p=()=>{h!==null&&(e.apply(d,h),d=void 0,h=null)},x=()=>{g&&p(),C()};let y=null;const v=()=>{y!=null&&clearTimeout(y),y=setTimeout(()=>{y=null,x()},n)},w=()=>{y!==null&&(clearTimeout(y),y=null)},C=()=>{w(),d=void 0,h=null},E=()=>{w(),p()},S=function(...D){if(i!=null&&i.aborted)return;d=this,h=D;const I=y==null;v(),f&&I&&p()};return S.schedule=v,S.cancel=C,S.flush=E,i==null||i.addEventListener("abort",C,{once:!0}),S}function kAe(e,n=0,i={}){typeof i!="object"&&(i={});const{leading:s=!1,trailing:d=!0,maxWait:h}=i,f=Array(2);s&&(f[0]="leading"),d&&(f[1]="trailing");let g,p=null;const x=bAe(function(...w){g=e.apply(this,w),p=null},n,{edges:f}),y=function(...w){return h!=null&&(p===null&&(p=Date.now()),Date.now()-p>=h)?(g=e.apply(this,w),p=Date.now(),x.cancel(),x.schedule(),g):(x.apply(this,w),g)},v=()=>(x.flush(),g);
225return y.cancel=x.cancel,y.flush=v,y}function yAe(e,n=0,i={}){typeof i!="object"&&(i={});const{leading:s=!0,trailing:d=!0}=i;return kAe(e,n,{leading:s,trailing:d,maxWait:n})}function HV(e){var i;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const s=e[Symbol.toStringTag];return s==null||!((i=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&i.writable)?!1:e.toString()===`[object ${s}]`}let n=e;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}function wO(e){return gAe(e)&&e.nodeType===1&&!HV(e)}/** 226 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. 227 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options 228 */function F1(e,n=new Set){const i=[e],s=new Set;let d=0;for(;i.length>d;){const h=i[d++];if(!(s.has(h)||!xAe(h)||n.has(h)))if(s.add(h),Symbol.iterator in h)try{for(const f of h)i.push(f)}catch{}else for(const f in h)f!=="defaultValue"&&i.push(h[f])}return s}function xAe(e){const n=Object.prototype.toString.call(e),i=typeof e;return!(i==="number"||i==="boolean"||i==="string"||i==="symbol"||i==="function"||n==="[object Date]"||n==="[object RegExp]"||n==="[object Module]"||e===void 0||e===null||e._watchdogExcluded||e instanceof EventTarget||e instanceof Event)}/** 229 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. 230 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options 231 */function GV(e,n,i=new Set){if(e===n&&vAe(e))return!0;const s=F1(e,i),d=F1(n,i);for(const h of s)if(d.has(h))return!0;return!1}function vAe(e){return typeof e=="object"&&e!==null}/** 232 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. 233 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options 234 */class qV extends BC{constructor(i,s={}){super(s);Dt(this,"_editor",null);Dt(this,"_lifecyclePromise",null);Dt(this,"_throttledSave");Dt(this,"_data");Dt(this,"_lastDocumentVersion");Dt(this,"_elementOrData");Dt(this,"_initUsingData",!0);Dt(this,"_editables",{});Dt(this,"_config");Dt(this,"_excludedProps");this._throttledSave=yAe(this._save.bind(this),typeof s.saveInterval=="number"?s.saveInterval:5e3),i&&(this._creator=(d,h)=>i.create(d,h)),this._destructor=d=>d.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(i){this._creator=i}setDestructor(i){this._destructor=i}_restart(){return Promise.resolve().then(()=>(this.state="initializing",this._fire("stateChange"),this._destroy())).catch(i=>{console.error("An error happened during the editor destroying.",i)}).then(()=>{const i={},s=[],d=this._config.rootsAttributes||{},h={};for(const[g,p]of Object.entries(this._data.roots))p.isLoaded?(i[g]="",h[g]=d[g]||{}):s.push(g);const f={...this._config,extraPlugins:this._config.extraPlugins||[],lazyRoots:s,rootsAttributes:h,_watchdogInitialData:this._data};return delete f.initialData,f.extraPlugins.push(wAe),this._initUsingData?this.create(i,f,f.context):wO(this._elementOrData)?this.create(this._elementOrData,f,f.context):this.create(this._editables,f,f.context)}).then(()=>{this._fire("restart")})}create(i=this._elementOrData,s=this._config,d){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then(()=>(super._startErrorHandling(),this._elementOrData=i,this._initUsingData=typeof i=="string"||Object.keys(i).length>0&&typeof Object.values(i)[0]=="string",this._config=this._cloneEditorConfiguration(s)||{},this._config.context=d,this._creator(i,this._config))).then(h=>{this._editor=h,h.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=h.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 i=this._editor;return this._editor=null,i.model.document.off("change:data",this._throttledSave),this._destructor(i)})}_save(){const i=this._editor.model.document.version;try{this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this._lastDocumentVersion=i}catch(s){console.error(s,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(i){this._excludedProps=i}_getData(){const i=this._editor,s=i.model.document.roots.filter(p=>p.isAttached()&&p.rootName!="$graveyard"),{plugins:d}=i,h=d.has("CommentsRepository")&&d.get("CommentsRepository"),f=d.has("TrackChanges")&&d.get("TrackChanges"),g={roots:{},markers:{},commentThreads:JSON.stringify([]),suggestions:JSON.stringify([])};
234s.forEach(p=>{g.roots[p.rootName]={content:JSON.stringify(Array.from(p.getChildren())),attributes:JSON.stringify(Array.from(p.getAttributes())),isLoaded:p._isLoaded}});for(const p of i.model.markers)p._affectsData&&(g.markers[p.name]={rangeJSON:p.getRange().toJSON(),usingOperation:p._managedUsingOperations,affectsData:p._affectsData});return h&&(g.commentThreads=JSON.stringify(h.getCommentThreads({toJSON:!0,skipNotAttached:!0}))),f&&(g.suggestions=JSON.stringify(f.getSuggestions({toJSON:!0,skipNotAttached:!0}))),g}_getEditables(){const i={};for(const s of this.editor.model.document.getRootNames()){const d=this.editor.ui.getEditableElement(s);d&&(i[s]=d)}return i}_isErrorComingFromThisItem(i){return GV(this._editor,i.context,this._excludedProps)}_cloneEditorConfiguration(i){return pAe(i,(s,d)=>{if(wO(s)||d==="context")return s})}}class wAe{constructor(n){Dt(this,"editor");Dt(this,"_data");this.editor=n,this._data=n.config.get("_watchdogInitialData")}init(){this.editor.data.on("init",n=>{n.stop(),this.editor.model.enqueueChange({isUndoable:!1},i=>{this._restoreCollaborationData(),this._restoreEditorData(i)}),this.editor.data.fire("ready")},{priority:999})}_createNode(n,i){if("name"in i){const s=n.createElement(i.name,i.attributes);if(i.children)for(const d of i.children)s._appendChild(this._createNode(n,d));return s}else return n.createText(i.data,i.attributes)}_restoreEditorData(n){const i=this.editor;Object.entries(this._data.roots).forEach(([s,{content:d,attributes:h}])=>{const f=JSON.parse(d),g=JSON.parse(h),p=i.model.document.getRoot(s);for(const[x,y]of g)n.setAttribute(x,y,p);for(const x of f){const y=this._createNode(n,x);n.insert(y,p,"end")}}),Object.entries(this._data.markers).forEach(([s,d])=>{const{document:h}=i.model,{rangeJSON:{start:f,end:g},...p}=d,x=h.getRoot(f.root),y=n.createPositionFromPath(x,f.path,f.stickiness),v=n.createPositionFromPath(x,g.path,g.stickiness),w=n.createRange(y,v);n.addMarker(s,{range:w,...p})})}_restoreCollaborationData(){const n=JSON.parse(this._data.commentThreads),i=JSON.parse(this._data.suggestions);if(this.editor.plugins.has("CommentsRepository")){const s=this.editor.plugins.get("CommentsRepository");for(const d of s.getCommentThreads())s._removeCommentThread({threadId:d.id});n.forEach(d=>{const h=this.editor.config.get("collaboration.channelId");this.editor.plugins.get("CommentsRepository").addCommentThread({channelId:h,...d})})}if(this.editor.plugins.has("TrackChangesEditing")){const s=this.editor.plugins.get("TrackChangesEditing");for(const d of s.getSuggestions())s._removeSuggestion(d);i.forEach(d=>{s.addSuggestionData(d)})}}}/** 235 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. 236 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options 237 */const Ch=Symbol("MainQueueId");class _Ae extends BC{constructor(i,s={}){super(s);Dt(this,"_watchdogs",new Map);Dt(this,"_watchdogConfig");Dt(this,"_context",null);Dt(this,"_contextProps",new Set);Dt(this,"_actionQueues",new AAe);Dt(this,"_contextConfig");Dt(this,"_item");this._watchdogConfig=s,this._creator=d=>i.create(d),this._destructor=d=>d.destroy(),this._actionQueues.onEmpty(()=>{this.state==="initializing"&&(this.state="ready",this._fire("stateChange"))})}setCreator(i){this._creator=i}setDestructor(i){this._destructor=i}get context(){return this._context}create(i={}){return this._actionQueues.enqueue(Ch,()=>(this._contextConfig=i,this._create()))}getItem(i){return this._getWatchdog(i)._item}getItemState(i){return this._getWatchdog(i).state}add(i){const s=_O(i);return Promise.all(s.map(d=>this._actionQueues.enqueue(d.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 h;if(this._watchdogs.has(d.id))throw new Error(`Item with the given id is already added: '${d.id}'.`);if(d.type==="editor")return h=new qV(null,this._watchdogConfig),h.setCreator(d.creator),h._setExcludedProperties(this._contextProps),d.destructor&&h.setDestructor(d.destructor),this._watchdogs.set(d.id,h),h.on("error",(f,{error:g,causesRestart:p})=>{this._fire("itemError",{itemId:d.id,error:g}),p&&this._actionQueues.enqueue(d.id,()=>new Promise(x=>{const y=()=>{h.off("restart",y),this._fire("itemRestart",{itemId:d.id}),x()};h.on("restart",y)}))}),h.create(d.sourceElementOrData,d.config,this._context);throw new Error(`Not supported item type: '${d.type}'.`)})))}remove(i){const s=_O(i);return Promise.all(s.map(d=>this._actionQueues.enqueue(d,()=>{const h=this._getWatchdog(d);
237return this._watchdogs.delete(d),h.destroy()})))}destroy(){return this._actionQueues.enqueue(Ch,()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))}_restart(){return this._actionQueues.enqueue(Ch,()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch(i=>{console.error("An error happened during destroying the context or items.",i)}).then(()=>this._create()).then(()=>this._fire("restart"))))}_create(){return Promise.resolve().then(()=>(this._startErrorHandling(),this._creator(this._contextConfig))).then(i=>(this._context=i,this._contextProps=F1(this._context),Promise.all(Array.from(this._watchdogs.values()).map(s=>(s._setExcludedProperties(this._contextProps),s.create(void 0,void 0,this._context))))))}_destroy(){return Promise.resolve().then(()=>{this._stopErrorHandling();const i=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map(s=>s.destroy())).then(()=>this._destructor(i))})}_getWatchdog(i){const s=this._watchdogs.get(i);if(!s)throw new Error(`Item with the given id was not registered: ${i}.`);return s}_isErrorComingFromThisItem(i){for(const s of this._watchdogs.values())if(s._isErrorComingFromThisItem(i))return!1;return GV(this._context,i.context)}}class AAe{constructor(){Dt(this,"_onEmptyCallbacks",[]);Dt(this,"_queues",new Map);Dt(this,"_activeActions",0)}onEmpty(n){this._onEmptyCallbacks.push(n)}enqueue(n,i){const s=n===Ch;this._activeActions++,this._queues.get(n)||this._queues.set(n,Promise.resolve());const h=(s?Promise.all(this._queues.values()):Promise.all([this._queues.get(Ch),this._queues.get(n)])).then(i),f=h.catch(()=>{});return this._queues.set(n,f),h.finally(()=>{this._activeActions--,this._queues.get(n)===f&&this._activeActions===0&&this._onEmptyCallbacks.forEach(g=>g())})}}function _O(e){return Array.isArray(e)?e:[e]}/** 238 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. 239 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options 240 */class CAe{constructor(n){Dt(this,"editor");Dt(this,"_entries",[]);Dt(this,"_frameStack",[]);Dt(this,"_errors",new Set);Dt(this,"_maxEntries");Dt(this,"_errorCallback");Dt(this,"_filterCallback");Dt(this,"_maxEntriesCallback");this.editor=n,n.config.define("actionsRecorder.maxEntries",1e3);const i=n.config.get("actionsRecorder");this._maxEntries=i.maxEntries,this._filterCallback=i.onFilter,this._errorCallback=i.onError,this._maxEntriesCallback=i.onMaxEntries||this._maxEntriesDefaultHandler,this._tapCommands(),this._tapOperationApply(),this._tapModelMethods(),this._tapModelSelection(),this._tapComponentFactory(),this._tapViewDocumentEvents()}static get pluginName(){return"ActionsRecorder"}static get isOfficialPlugin(){return!0}getEntries(){return this._entries.slice()}flushEntries(){this._entries=[]}_enterFrame(n,i){const s={timeStamp:new Date().toISOString(),...this._frameStack.length&&{parentEntry:this._frameStack.at(-1)},action:n,params:i==null?void 0:i.map(d=>Yo(d)),before:this._buildStateSnapshot()};return(!this._filterCallback||this._filterCallback(s,this._entries))&&this._entries.push(s),this._frameStack.push(s),s}_leaveFrame(n,i,s){const d=this._frameStack.pop();!d||d!==n||(i!==void 0&&(d.result=Yo(i)),s&&(d.error=Yo(s)),d.after=this._buildStateSnapshot(),s&&this._callErrorCallback(s),this._frameStack.length==0&&this._errors.clear(),this._entries.length>=this._maxEntries&&this._maxEntriesCallback())}_buildStateSnapshot(){const{model:n,isReadOnly:i,editing:s}=this.editor;return{documentVersion:n.document.version,editorReadOnly:i,editorFocused:s.view.document.isFocused,modelSelection:Yo(n.document.selection)}}_tapCommands(){for(const[n,i]of this.editor.commands)this._tapCommand(n,i);Hc(this.editor.commands,"add",{before:(n,[i,s])=>(this._tapCommand(i,s),!1)})}_tapOperationApply(){Hc(this.editor.model,"applyOperation",{before:(n,[i])=>i.baseVersion===null?!1:(n.callFrame=this._enterFrame("model.applyOperation",[i]),!0),after:n=>{this._leaveFrame(n.callFrame)},error:(n,i)=>{this._leaveFrame(n.callFrame,void 0,i)}})}_tapModelMethods(){for(const n of["insertContent","insertObject","deleteContent"])Hc(this.editor.model,n,{before:(i,...s)=>
240(i.callFrame=this._enterFrame(`model.${n}`,s),!0),after:(i,s)=>{this._leaveFrame(i.callFrame,s)},error:(i,s)=>{this._leaveFrame(i.callFrame,void 0,s)}})}_tapModelSelection(){const n=["change:range","change:attribute","change:marker"];this._tapFireMethod(this.editor.model.document.selection,n,{eventSource:"model-selection"})}_tapCommand(n,i){Hc(i,"execute",{before:(s,d)=>(s.callFrame=this._enterFrame(`commands.${n}:execute`,d),!0),after:(s,d)=>{this._leaveFrame(s.callFrame,d)},error:(s,d)=>{this._leaveFrame(s.callFrame,void 0,d)}})}_tapComponentFactory(){Hc(this.editor.ui.componentFactory,"create",{before:(n,[i])=>(n.componentName=i,n.callFrame=this._enterFrame(`component-factory.create:${i}`),!0),after:(n,i)=>{var d,h,f;const s={...n,eventSource:`component.${n.componentName}`};typeof i.fire=="function"&&this._tapFireMethod(i,["execute"],s),typeof((d=i.panelView)==null?void 0:d.fire)=="function"&&this._tapFireMethod(i.panelView,["execute"],s),typeof((f=(h=i.buttonView)==null?void 0:h.actionView)==null?void 0:f.fire)=="function"&&this._tapFireMethod(i.buttonView.actionView,["execute"],s),this._leaveFrame(n.callFrame)},error:(n,i)=>{this._leaveFrame(n.callFrame,void 0,i)}})}_tapViewDocumentEvents(){const n=["click","mousedown","mouseup","pointerdown","pointerup","focus","blur","keydown","keyup","selectionChange","compositionstart","compositionend","beforeinput","mutations","enter","delete","insertText","paste","copy","cut","dragstart","drop"];this._tapFireMethod(this.editor.editing.view.document,n,{eventSource:"observers"})}_tapFireMethod(n,i,s={}){Hc(n,"fire",{before:(d,[h,...f])=>{const g=typeof h=="string"?h:h.name;return i.includes(g)?(d.callFrame=this._enterFrame(`${d.eventSource}:${g}`,f),!0):!1},after:(d,h)=>{this._leaveFrame(d.callFrame,h)},error:(d,h)=>{this._leaveFrame(d.callFrame,void 0,h)}},s)}_callErrorCallback(n){if(!(!this._errorCallback||this._errors.has(n))){this._errors.add(n);try{this._errorCallback(n,this.getEntries())}catch(i){console.error("ActionsRecorder onError callback error:",i)}}}_maxEntriesDefaultHandler(){this._entries.shift()}}function Hc(e,n,i,s={}){const d=e[n];d[Symbol.for("Tapped method")]||(e[n]=(...h)=>{var p,x,y;const f=Object.assign({},s);let g;try{g=(p=i.before)==null?void 0:p.call(i,f,h);const v=d.apply(e,h);return g&&((x=i.after)==null||x.call(i,f,v)),v}catch(v){throw g&&((y=i.error)==null||y.call(i,f,v)),v}},e[n][Symbol.for("Tapped method")]=d)}function Yo(e,n=new WeakSet){var d;if(!e||["boolean","number","string"].includes(typeof e))return e;if(typeof e.toJSON=="function"){const h=e.toJSON();if(HV(h)||Array.isArray(h)||["string","number","boolean"].includes(typeof h))return Yo(h,n)}if(e instanceof Error)return{name:e.name,message:e.message,stack:e.stack};if(NAe(e)||typeof e!="object")return{type:typeof e,constructor:((d=e.constructor)==null?void 0:d.name)||"unknown",string:String(e)};if(e instanceof File||e instanceof Blob||e instanceof FormData||e instanceof DataTransfer)return String(e);if(n.has(e))return;if(n.add(e),Array.isArray(e))return e.length?e.map(h=>Yo(h,n)):void 0;const i={},s=[];e.domEvent&&(s.push("domEvent","domTarget","view","document"),i.domEvent=jAe(e.domEvent),i.target=Yo(e.target),e.dataTransfer&&(i.dataTransfer={types:e.dataTransfer.types,htmlData:e.dataTransfer.getData("text/html"),files:Yo(e.dataTransfer.files)}));for(const[h,f]of Object.entries(e)){if(h.startsWith("_")||s.includes(h)||typeof f=="function")continue;const g=Yo(f,n);g!==void 0&&(i[h]=g)}if(Symbol.iterator in e){const h=Array.from(e[Symbol.iterator]()).map(f=>Yo(f,n));h.length&&(i._items=h)}return Object.keys(i).length?i:void 0}function jAe(e){let n={type:e.type,target:i(e.target)};e instanceof MouseEvent&&(n={...n,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}),e instanceof KeyboardEvent&&(n={...n,key:e.key,code:e.code,keyCode:e.keyCode,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,repeat:e.repeat}),e instanceof InputEvent&&(n={...n,data:e.data,inputType:e.inputType,isComposing:e.isComposing}),e instanceof PointerEvent&&(n={...n,isPrimary:e.isPrimary});function i(s){return s?s instanceof Element?{tagName:s.tagName,className:s.className,id:s.id}:s instanceof Window||s instanceof Document?{type:s.constructor.name}:{}:null}return n}function NAe(e){return e&&typeof e.is=="function"}/** 241 * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. 242 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options 243 */const EAe=Object.freeze(Object.defineProperty({__proto__:null,ActionsRecorder:CAe,ContextWatchdog:_Ae,EditorWatchdog:qV,Watchdog:BC},Symbol.toStringTag,{value:"Module"})),SAe=Cte(EAe);/*! 244 * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 245 * For licensing, see LICENSE.md. 246 */(function(e,n){(function(i,s){e.exports=s(j,W_e(),SAe)})(self,(i,s,d)=>(()=>{var h={546:x=>{x.exports=d},949:x=>{x.exports=s},155:x=>{x.exports=i}},f={};function g(x){var y=f[x];if(y!==void 0)return y.exports;var v=f[x]={exports:{}};return h[x](v,v.exports,g),v.exports}g.n=x=>{var y=x&&x.__esModule?()=>x.default:()=>x;return g.d(y,{a:y}),y},g.d=(x,y)=>{for(var v in y)g.o(y,v)&&!g.o(x,v)&&Object.defineProperty(x,v,{enumerable:!0,get:y[v]})},g.o=(x,y)=>Object.prototype.hasOwnProperty.call(x,y),g.r=x=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(x,"__esModule",{value:!0})};var p={};return(()=>{g.r(p),g.d(p,{CKEditor:()=>M,CKEditorContext:()=>D,useMultiRootEditor:()=>V});var x=g(155),y=g.n(x),v=g(949),w=g.n(v);const C=new Array(256).fill("").map((P,z)=>("0"+z.toString(16)).slice(-2));var E=g(546);const S=y().createContext("contextWatchdog");class D extends y().Component{constructor(z,W){super(z,W),this.contextWatchdog=null,this.props.isLayoutReady&&this._initializeContextWatchdog(this.props.config)}shouldComponentUpdate(z){return this._shouldComponentUpdate(z)}async _shouldComponentUpdate(z){return z.id!==this.props.id&&(this.contextWatchdog&&await this.contextWatchdog.destroy(),await this._initializeContextWatchdog(z.config)),z.isLayoutReady&&!this.contextWatchdog?(await this._initializeContextWatchdog(z.config),!0):this.props.children!==z.children}render(){return y().createElement(S.Provider,{value:this.contextWatchdog},this.props.children)}componentWillUnmount(){this._destroyContext()}async _initializeContextWatchdog(z){this.contextWatchdog=new E.ContextWatchdog(this.props.context,this.props.watchdogConfig),this.contextWatchdog.on("error",(W,K)=>{this.props.onError(K.error,{phase:"runtime",willContextRestart:K.causesRestart})}),this.contextWatchdog.on("stateChange",()=>{this.contextWatchdog.state==="ready"&&this.props.onReady&&this.props.onReady(this.contextWatchdog.context)}),await this.contextWatchdog.create(z).catch(W=>
246{this.props.onError(W,{phase:"initialization",willContextRestart:!1})})}async _destroyContext(){this.contextWatchdog&&(await this.contextWatchdog.destroy(),this.contextWatchdog=null)}}D.defaultProps={isLayoutReady:!0,onError:(P,z)=>console.error(P,z)},D.propTypes={id:w().string,isLayoutReady:w().bool,context:w().func,watchdogConfig:w().object,config:w().object,onReady:w().func,onError:w().func};const I="Lock from React integration (@ckeditor/ckeditor5-react)";class M extends y().Component{constructor(z){super(z),this.editorDestructionInProgress=null,this.domContainer=y().createRef(),this.watchdog=null;const{CKEDITOR_VERSION:W}=window;if(W){const[K]=W.split(".").map(Number);K<37&&console.warn("The <CKEditor> component requires using CKEditor 5 in version 37 or higher.")}else console.warn('Cannot find the "CKEDITOR_VERSION" in the "window" scope.')}get editor(){return this.props.disableWatchdog?this.instance:this.watchdog?this.watchdog.editor:null}shouldComponentUpdate(z){return!!this.editor&&(z.id!==this.props.id||z.disableWatchdog!==this.props.disableWatchdog||(this._shouldUpdateEditor(z)&&this.editor.data.set(z.data),"disabled"in z&&(z.disabled?this.editor.enableReadOnlyMode(I):this.editor.disableReadOnlyMode(I)),!1))}async componentDidMount(){await this._initializeEditor()}async componentDidUpdate(){await this._destroyEditor(),await this._initializeEditor()}async componentWillUnmount(){await this._destroyEditor()}render(){return y().createElement("div",{ref:this.domContainer})}async _initializeEditor(){await this.editorDestructionInProgress,this.props.disableWatchdog?this.instance=await this._createEditor(this.domContainer.current,this._getConfig()):this.watchdog||(this.context instanceof E.ContextWatchdog?this.watchdog=new B(this.context):this.watchdog=new M._EditorWatchdog(this.props.editor,this.props.watchdogConfig),this.watchdog.setCreator((z,W)=>this._createEditor(z,W)),this.watchdog.on("error",(z,{error:W,causesRestart:K})=>{(this.props.onError||console.error)(W,{phase:"runtime",willEditorRestart:K})}),await this.watchdog.create(this.domContainer.current,this._getConfig()).catch(z=>{(this.props.onError||console.error)(z,{phase:"initialization",willEditorRestart:!1})}))}_createEditor(z,W){return this.props.editor.create(z,W).then(K=>{"disabled"in this.props&&this.props.disabled&&K.enableReadOnlyMode(I);const G=K.model.document,Z=K.editing.view.document;return G.on("change:data",se=>{this.props.onChange&&this.props.onChange(se,K)}),Z.on("focus",se=>{this.props.onFocus&&this.props.onFocus(se,K)}),Z.on("blur",se=>{this.props.onBlur&&this.props.onBlur(se,K)}),setTimeout(()=>{this.props.onReady&&this.props.onReady(K)}),K})}async _destroyEditor(){this.editorDestructionInProgress=new Promise(z=>{setTimeout(async()=>this.watchdog?(await this.watchdog.destroy(),this.watchdog=null,z()):this.instance?(await this.instance.destroy(),this.instance=null,z()):void z())})}_shouldUpdateEditor(z){return this.props.data!==z.data&&this.editor.data.get()!==z.data}_getConfig(){const z=this.props.config||{};return this.props.data&&z.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."),{...z,initialData:z.initialData||this.props.data||""}}}M.contextType=S,M.propTypes={editor:w().func.isRequired,data:w().string,config:w().object,disableWatchdog:w().bool,watchdogConfig:w().object,onChange:w().func,onReady:w().func,onFocus:w().func,onBlur:w().func,onError:w().func,disabled:w().bool,id:w().any},M._EditorWatchdog=E.EditorWatchdog;class B{constructor(z){this._contextWatchdog=z,this._id=function(){const W=4294967296*Math.random()>>>0,K=4294967296*Math.random()>>>0,G=4294967296*Math.random()>>>0,Z=4294967296*Math.random()>>>0;return"e"+C[255&W]+C[W>>8&255]+C[W>>16&255]+C[W>>24&255]+C[255&K]+C[K>>8&255]+C[K>>16&255]+C[K>>24&255]+C[255&G]+C[G>>8&255]+C[G>>16&255]+C[G>>24&255]+C[255&Z]+C[Z>>8&255]+C[Z>>16&255]+C[Z>>24&255]}()}setCreator(z){this._creator=z}create(z,W){return this._contextWatchdog.add({sourceElementOrData:z,config:W,creator:this._creator,id:this._id,type:"editor"})}on(z,W){this._contextWatchdog.on("itemError",(K,{itemId:G,error:Z})=>{G===this._id&&W(null,{error:Z,causesRestart:void 0})})}destroy(){return this._contextWatchdog.state==="ready"?this._contextWatchdog.remove(this._id):Promise.resolve()}get editor(){return this._contextWatchdog.getItem(this._id)}}const R="Lock from React integration (@ckeditor/ckeditor5-react)",F=({editor:P})=>{const z=(0,x.useRef)(null);return(0,x.useEffect)(()=>{const W=z.current;if(!P||!W)return;const K=P.ui.view.toolbar.element;return W&&W.appendChild(K),()=>{W&&W.removeChild(K)}},[P&&P.id]),y().createElement("div",{ref:z})},V=P=>{const z=(0,x.useRef)(null),W=(0,x.useRef)(null),K=(0,x.useContext)(S),[G,Z]=(0,x.useState)(null),[se,ge]=(0,x.useState)(P.data),[Se,Ae]=(0,x.useState)(P.rootsAttributes||{}),[he,ee]=(0,x.useState)([]),le=(0,x.useRef)(!0);(0,x.useEffect)(()=>((async()=>(await W.current,P.isLayoutReady!==!1&&await te()))(),()=>{Q().then(()=>{W.current=null})}),[P.isLayoutReady]),(0,x.useEffect)(()=>
246{G&&(P.disabled?G.enableReadOnlyMode(R):G.disableReadOnlyMode(R))},[P.disabled]),(0,x.useEffect)(()=>{if(G&&!W.current){const Y=G.getFullData();ge({...Y}),Ae({...G.getRootsAttributes()}),ee([...Object.keys(Y).map(fe=>ve(G,fe))])}},[G&&G.id]);const je=()=>{const Y=P.config||{};return P.data&&Y.initialData&&console.warn("Editor data should be provided either using `config.initialData` or `data` property. The config value takes precedence over `data` property and will be used when both are specified."),{...Y,rootsAttributes:Se}},ve=(Y,fe)=>y().createElement("div",{id:fe,key:fe,ref:Ne=>{if(Ne){const Ue=Y.ui.view.createEditable(fe,Ne);Y.ui.addEditable(Ue),Y.editing.view.forceRender()}}}),Ce=(Y,fe)=>P.editor.create(Y,fe).then(Ne=>{P.disabled&&P.disabled&&Ne.enableReadOnlyMode(R);const Ue=Ne.model.document,it=Ne.editing.view.document;return Ue.on("change:data",Ve=>((mt,ut)=>{const Fe=mt.model.document;if(!P.disableTwoWayDataBinding){const ue={},Re={};Fe.differ.getChanges().forEach(ke=>{let $e;if($e=ke.type=="insert"||ke.type=="remove"?ke.position.root:ke.range.root,!$e.isAttached())return;const{rootName:lt}=$e;ue[lt]=mt.getData({rootName:lt})}),Fe.differ.getChangedRoots().forEach(ke=>{if(ke.state)return void(ue[ke.name]!==void 0&&delete ue[ke.name]);const $e=ke.name;Re[$e]=mt.getRootAttributes($e)}),Object.keys(ue).length&&ge(ke=>({...ke,...ue})),Object.keys(Re).length&&Ae(ke=>({...ke,...Re}))}P.onChange&&P.onChange(ut,mt)})(Ne,Ve)),Ne.on("addRoot",(Ve,mt)=>((ut,Fe,ue)=>{const Re=ue.rootName,ke=ve(ut,Re);P.disableTwoWayDataBinding||(ge($e=>({...$e,[Re]:ut.getData({rootName:Re})})),Ae($e=>({...$e,[Re]:ut.getRootAttributes(Re)}))),ee($e=>[...$e,ke])})(Ne,0,mt)),Ne.on("detachRoot",(Ve,mt)=>((ut,Fe,ue)=>{const Re=ue.rootName;ee(ke=>ke.filter($e=>$e.props.id!==Re)),P.disableTwoWayDataBinding||(ge(ke=>{const{[Re]:$e,...lt}=ke;return{...lt}}),Ae(ke=>{const{[Re]:$e,...lt}=ke;return{...lt}})),ut.detachEditable(ue)})(Ne,0,mt)),it.on("focus",Ve=>{P.onFocus&&P.onFocus(Ve,Ne)}),it.on("blur",Ve=>{P.onBlur&&P.onBlur(Ve,Ne)}),Z(Ne),P.onReady&&P.onReady(Ne),Ne}),Q=async()=>{Z(null),ge({}),Ae({}),ee([]),W.current=new Promise(Y=>{setTimeout(async()=>z.current?(await z.current.destroy(),z.current=null,Y()):G?(await G.destroy(),Y()):void Y())})},te=async()=>{if(P.disableWatchdog)return void await Ce(P.data,je());if(z.current)return;K instanceof E.ContextWatchdog?z.current=new B(K):z.current=new E.EditorWatchdog(P.editor,P.watchdogConfig);const Y=z.current;Y.setCreator((fe,Ne)=>Ce(fe,Ne)),Y.on("error",(fe,{error:Ne,causesRestart:Ue})=>{(P.onError||console.error)(Ne,{phase:"runtime",willEditorRestart:Ue})}),await Y.create(se,je()).catch(fe=>{(P.onError||console.error)(fe,{phase:"initialization",willEditorRestart:!1})})};(0,x.useEffect)(()=>{if(G&&le.current){le.current=!1;const Y=Object.keys(se),fe=Object.keys(Se);if(!Y.every(Fe=>fe.includes(Fe)))throw new Error("`data` and `attributes` objects must have the same keys (roots).");const Ne=G.getFullData(),Ue=G.getRootsAttributes(),{addedKeys:it,removedKeys:Ve}=pe(Ne,se||{}),mt=Y.some(Fe=>Ne[Fe]!==void 0&&JSON.stringify(Ne[Fe])!==JSON.stringify(se[Fe])),ut=fe.filter(Fe=>JSON.stringify(Ue[Fe])!==JSON.stringify(Se[Fe]));G.model.change(Fe=>{be(it),Oe(Ve),mt&&at(),ut.length&&re(Fe,ut)})}},[se,Se]);const pe=(Y,fe)=>{const Ne=Object.keys(Y),Ue=Object.keys(fe);return{addedKeys:Ue.filter(it=>!Ne.includes(it)),removedKeys:Ne.filter(it=>!Ue.includes(it))}},be=Y=>{Y.forEach(fe=>{G.addRoot(fe,{data:se[fe]||"",attributes:(Se==null?void 0:Se[fe])||{},isUndoable:!0})})},Oe=Y=>{Y.forEach(fe=>{G.detachRoot(fe,!0)})},at=()=>{G.data.set(se,{suppressErrorInCollaboration:!0})},re=(Y,fe)=>{fe.forEach(Ne=>{Object.keys(Se[Ne]).forEach(Ue=>{G.registerRootAttribute(Ue)}),Y.clearAttributes(G.model.document.getRoot(Ne)),Y.setAttributes(Se[Ne],G.model.document.getRoot(Ne))})},ye=(0,x.useCallback)(Y=>{le.current=!0,ge(Y)},[ge]),Me=(0,x.useCallback)(Y=>{le.current=!0,Ae(Y)},[Ae]);return{editor:G,editableElements:he,toolbarElement:y().createElement(F,{editor:G}),data:se,setData:ye,attributes:Se,setAttributes:Me}}})(),p})())})(FV);var DAe=FV.exports,S0={exports:{}};S0.exports;(function(e,n){(function(i){const s=i.en=i.en||{};s.dictionary=Object.assign(s.dictionary||{},{"(may require <kbd>Fn</kbd>)":"(may require <kbd>Fn</kbd>)","%0 of %1":"%0 of %1",Accept:"Accept",Accessibility:"Accessibility","Accessibility help":"Accessibility help","Align cell text to the bottom":"Align cell text to the bottom","Align cell text to the center"
246:"Align cell text to the center","Align cell text to the left":"Align cell text to the left","Align cell text to the middle":"Align cell text to the middle","Align cell text to the right":"Align cell text to the right","Align cell text to the top":"Align cell text to the top","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background","Below, you can find a list of keyboard shortcuts that can be used in the editor.":"Below, you can find a list of keyboard shortcuts that can be used in the editor.",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold","Bold text":"Bold text",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Cannot access default workspace.":"Cannot access default workspace.","Cannot determine a category for the uploaded file.":"Cannot determine a category for the uploaded file.","Cannot upload file:":"Cannot upload file:","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Cell properties":"Cell properties","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Clear:"Clear","Click to edit block":"Click to edit block",Close:"Close","Close contextual balloons, dropdowns, and dialogs":"Close contextual balloons, dropdowns, and dialogs",Code:"Code",Color:"Color","Color picker":"Color picker",Column:"Column","Content editing keystrokes":"Content editing keystrokes","Copy selected content":"Copy selected content","Could not insert image at the current position.":"Could not insert image at the current position.","Could not obtain resized image URL.":"Could not obtain resized image URL.","Create link":"Create link",Custom:"Custom","Custom image size":"Custom image size",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent","Decrease list item indent":"Decrease list item indent","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Drag to move":"Drag to move","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit image":"Edit image","Edit link":"Edit link","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor dialog":"Editor dialog","Editor editing area: %0":"Editor editing area: %0","Editor menu bar":"Editor menu bar","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Enter table caption":"Enter table caption","Entering a to-do list":"Entering a to-do list","Error during image upload":"Error during image upload","Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.":"Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.","Failed to determine category of edited image.":"Failed to determine category of edited image.","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6",Height:"Height","Help Contents. To close this dialog press ESC.":"Help Contents. To close this dialog press ESC.",HEX:"HEX","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","Image from computer":"Image from computer","Image resize list":"Image resize list","Image toolbar":"Image toolbar","Image upload complete":"Image upload complete","image widget":"image widget","In line":"In line","Increase indent":"Increase indent","Increase list item indent":"Increase list item indent",Insert:"Insert","Insert a hard break (a new paragraph)":"Insert a hard break (a new paragraph)","Insert a new paragraph directly after a widget":"Insert a new paragraph directly after a widget","Insert a new paragraph directly before a widget":"Insert a new paragraph directly before a widget","Insert a new table row (when in the last cell of a table)":"Insert a new table row (when in the last cell of a table)","Insert a soft break (a <code><br></code> element)":"Insert a soft break (a <code><br></code> element)","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image via URL":"Insert image via URL","Insert image with file manager":"Insert image with file manager","Insert media":"Insert media","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table","Insert with file manager":"Insert with file manager","Inserting image failed":"Inserting image failed",Inset:"Inset","Invalid start index value.":"Invalid start index value.",Italic:"Italic","Italic text":"Italic text","Justify cell text":"Justify cell text","Keystrokes that can be used in a list":"Keystrokes that can be used in a list","Keystrokes that can be used in a table cell":"Keystrokes that can be used in a table cell","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"Keystrokes that can be used when a widget is selected (for example: image, table, etc.)","Leaving a to-do list":"Leaving a to-do list","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","Link URL must not be empty.":"Link URL must not be empty.","List properties":"List properties","Lower-latin":"Lower-latin","Lowerâroman":"Lowerâroman","Media toolbar":"Media toolbar","Media URL":"Media URL","media widget":"media widget",MENU_BAR_MENU_EDIT:"Edit",MENU_BAR_MENU_FILE:"File",MENU_BAR_MENU_FONT:"Font",MENU_BAR_MENU_FORMAT:"Format",MENU_BAR_MENU_HELP:"Help",MENU_BAR_MENU_INSERT:"Insert",MENU_BAR_MENU_TEXT:"Text",MENU_BAR_MENU_TOOLS:"Tools",MENU_BAR_MENU_VIEW:"View","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells","Move focus between form fields (inputs, buttons, etc.)":"Move focus between form fields (inputs, buttons, etc.)","Move focus in and out of an active dialog window":"Move focus in and out of an active dialog window","Move focus to the menu bar, navigate between menu bars":"Move focus to the menu bar, navigate between menu bars","Move focus to the toolbar, navigate between toolbars":"Move focus to the toolbar, navigate between toolbars","Move out of a link":"Move out of a link","Move out of an inline code style":"Move out of an inline code style","Move the caret to allow typing directly after a widget":"Move the caret to allow typing directly after a widget","Move the caret to allow typing directly before a widget":"Move the caret to allow typing directly before a widget","Move the selection to the next cell":"Move the selection to the next cell","Move the selection to the previous cell":"Move the selection to the previous cell","Navigate through the table":"Navigate through the table","Navigate through the toolbar or menu bar":"Navigate through the toolbar or menu bar",Next:"Next","No results found":"No results found","No searchable items":"No searchable items",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open file manager":"Open file manager","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab","Open media in new tab":"Open media in new tab","Open the accessibility help dialog":"Open the accessibility help dialog",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Paste content":"Paste content","Paste content as plain text":"Paste content as plain text","Paste the media URL in the input.":"Paste the media URL in the input.",'Please enter a valid color (e.g. "ff0000").':'Please enter a valid color (e.g. "ff0000").',"Press %0 for help.":"Press %0 for help.","Press Enter to type after or press Shift + Enter to type before the widget":"Press Enter to type after or press Shift + Enter to type before the widget",Previous:"Previous","Processing the edited image.":"Processing the edited image.",Purple:"Purple",Red:"Red",Redo:"Redo","Remove c
246olor":"Remove color","Replace from computer":"Replace from computer","Replace image":"Replace image","Replace image from computer":"Replace image from computer","Replace image with file manager":"Replace image with file manager","Replace with file manager":"Replace with file manager","Resize image":"Resize image","Resize image (in %0)":"Resize image (in %0)","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"Restore default","Reversed order":"Reversed order","Revert autoformatting action":"Revert autoformatting action","Rich Text Editor":"Rich Text Editor",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Selecting resized image failed":"Selecting resized image failed","Server failed to process the image.":"Server failed to process the image.","Show more items":"Show more items","Side image":"Side image",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough","Strikethrough text":"Strikethrough text",Style:"Style",Subscript:"Subscript",Superscript:"Superscript",Table:"Table","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alternative":"Text alternative",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".',"The URL must not be empty.":"The URL must not be empty.",'The value is invalid. Try "10px" or "2em" or simply "2".':'The value is invalid. Try "10px" or "2em" or simply "2".',"The value must not be empty.":"The value must not be empty.","The value should be a plain number.":"The value should be a plain number.","These keyboard shortcuts allow for quick access to content editing features.":"These keyboard shortcuts allow for quick access to content editing features.","This link has no URL":"This link has no URL","This media URL is not supported.":"This media URL is not supported.","Tip: Paste the URL into the content to embed faster.":"Tip: Paste the URL into the content to embed faster.","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","Toggle the circle list style":"Toggle the circle list style","Toggle the decimal list style":"Toggle the decimal list style","Toggle the decimal with leading zero list style":"Toggle the decimal with leading zero list style","Toggle the disc list style":"Toggle the disc list style","Toggle the lowerâlatin list style":"Toggle the lowerâlatin list style","Toggle the lowerâroman list style":"Toggle the lowerâroman list style","Toggle the square list style":"Toggle the square list style","Toggle the upperâlatin list style":"Toggle the upperâlatin list style","Toggle the upperâroman list style":"Toggle the upperâroman list style",Turquoise:"Turquoise","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title",Underline:"Underline","Underline text":"Underline text",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload from computer":"Upload from computer","Upload image from computer":"Upload image from computer","Upload in progress":"Upload in progress","Uploading image":"Uploading image","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.":"Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.","User interface and content navigation keystrokes":"User interface and content navigation keystrokes","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"Wrap text",Yellow:"Yellow"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),function(i,s){e.exports=s()}(self,()=>(()=>{var i={9246:(f,g,p)=>{const x=p(6931),y={};for(const w of Object.keys(x))y[x[w]]=w;const v={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"},lch:{channels:3,labels:"lch"},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"]}};f.exports=v;
vendor: 5,081 bytes, line 246
246for(const w of Object.keys(v)){if(!("channels"in v[w]))throw new Error("missing channels property: "+w);if(!("labels"in v[w]))throw new Error("missing channel labels property: "+w);if(v[w].labels.length!==v[w].channels)throw new Error("channel and label counts mismatch: "+w);const{channels:C,labels:E}=v[w];delete v[w].channels,delete v[w].labels,Object.defineProperty(v[w],"channels",{value:C}),Object.defineProperty(v[w],"labels",{value:E})}v.rgb.hsl=function(w){const C=w[0]/255,E=w[1]/255,S=w[2]/255,D=Math.min(C,E,S),I=Math.max(C,E,S),M=I-D;let B,R;I===D?B=0:C===I?B=(E-S)/M:E===I?B=2+(S-C)/M:S===I&&(B=4+(C-E)/M),B=Math.min(60*B,360),B<0&&(B+=360);const F=(D+I)/2;return R=I===D?0:F<=.5?M/(I+D):M/(2-I-D),[B,100*R,100*F]},v.rgb.hsv=function(w){let C,E,S,D,I;const M=w[0]/255,B=w[1]/255,R=w[2]/255,F=Math.max(M,B,R),V=F-Math.min(M,B,R),P=function(z){return(F-z)/6/V+.5};return V===0?(D=0,I=0):(I=V/F,C=P(M),E=P(B),S=P(R),M===F?D=S-E:B===F?D=.3333333333333333+C-S:R===F&&(D=.6666666666666666+E-C),D<0?D+=1:D>1&&(D-=1)),[360*D,100*I,100*F]},v.rgb.hwb=function(w){const C=w[0],E=w[1];let S=w[2];const D=v.rgb.hsl(w)[0],I=1/255*Math.min(C,Math.min(E,S));return S=1-.00392156862745098*Math.max(C,Math.max(E,S)),[D,100*I,100*S]},v.rgb.cmyk=function(w){const C=w[0]/255,E=w[1]/255,S=w[2]/255,D=Math.min(1-C,1-E,1-S);return[100*((1-C-D)/(1-D)||0),100*((1-E-D)/(1-D)||0),100*((1-S-D)/(1-D)||0),100*D]},v.rgb.keyword=function(w){const C=y[w];if(C)return C;let E,S=1/0;for(const M of Object.keys(x)){const B=x[M],R=(I=B,((D=w)[0]-I[0])**2+(D[1]-I[1])**2+(D[2]-I[2])**2);R<S&&(S=R,E=M)}var D,I;return E},v.keyword.rgb=function(w){return x[w]},v.rgb.xyz=function(w){let C=w[0]/255,E=w[1]/255,S=w[2]/255;return C=C>.04045?((C+.055)/1.055)**2.4:C/12.92,E=E>.04045?((E+.055)/1.055)**2.4:E/12.92,S=S>.04045?((S+.055)/1.055)**2.4:S/12.92,[100*(.4124*C+.3576*E+.1805*S),100*(.2126*C+.7152*E+.0722*S),100*(.0193*C+.1192*E+.9505*S)]},v.rgb.lab=function(w){const C=v.rgb.xyz(w);let E=C[0],S=C[1],D=C[2];return E/=95.047,S/=100,D/=108.883,E=E>.008856?E**.3333333333333333:7.787*E+.13793103448275862,S=S>.008856?S**.3333333333333333:7.787*S+.13793103448275862,D=D>.008856?D**.3333333333333333:7.787*D+.13793103448275862,[116*S-16,500*(E-S),200*(S-D)]},v.hsl.rgb=function(w){const C=w[0]/360,E=w[1]/100,S=w[2]/100;let D,I,M;if(E===0)return M=255*S,[M,M,M];D=S<.5?S*(1+E):S+E-S*E;const B=2*S-D,R=[0,0,0];for(let F=0;F<3;F++)I=C+.3333333333333333*-(F-1),I<0&&I++,I>1&&I--,M=6*I<1?B+6*(D-B)*I:2*I<1?D:3*I<2?B+(D-B)*(.6666666666666666-I)*6:B,R[F]=255*M;return R},v.hsl.hsv=function(w){const C=w[0];let E=w[1]/100,S=w[2]/100,D=E;const I=Math.max(S,.01);return S*=2,E*=S<=1?S:2-S,D*=I<=1?I:2-I,[C,100*(S===0?2*D/(I+D):2*E/(S+E)),100*((S+E)/2)]},v.hsv.rgb=function(w){const C=w[0]/60,E=w[1]/100;let S=w[2]/100;const D=Math.floor(C)%6,I=C-Math.floor(C),M=255*S*(1-E),B=255*S*(1-E*I),R=255*S*(1-E*(1-I));switch(S*=255,D){case 0:return[S,R,M];case 1:return[B,S,M];case 2:return[M,S,R];case 3:return[M,B,S];case 4:return[R,M,S];case 5:return[S,M,B]}},v.hsv.hsl=function(w){const C=w[0],E=w[1]/100,S=w[2]/100,D=Math.max(S,.01);let I,M;M=(2-E)*S;const B=(2-E)*D;return I=E*D,I/=B<=1?B:2-B,I=I||0,M/=2,[C,100*I,100*M]},v.hwb.rgb=function(w){const C=w[0]/360;let E=w[1]/100,S=w[2]/100;const D=E+S;let I;D>1&&(E/=D,S/=D);const M=Math.floor(6*C),B=1-S;I=6*C-M,1&M&&(I=1-I);const R=E+I*(B-E);let F,V,P;switch(M){default:case 6:case 0:F=B,V=R,P=E;break;case 1:F=R,V=B,P=E;break;case 2:F=E,V=B,P=R;break;case 3:F=E,V=R,P=B;break;case 4:F=R,V=E,P=B;break;case 5:F=B,V=E,P=R}return[255*F,255*V,255*P]},v.cmyk.rgb=function(w){const C=w[0]/100,E=w[1]/100,S=w[2]/100,D=w[3]/100;return[255*(1-Math.min(1,C*(1-D)+D)),255*(1-Math.min(1,E*(1-D)+D)),255*(1-Math.min(1,S*(1-D)+D))]},v.xyz.rgb=function(w){const C=w[0]/100,E=w[1]/100,S=w[2]/100;let D,I,M;return D=3.2406*C+-1.5372*E+-.4986*S,I=-.9689*C+1.8758*E+.0415*S,M=.0557*C+-.204*E+1.057*S,D=D>.0031308?1.055*D**.4166666666666667-.055:12.92*D,I=I>.0031308?1.055*I**.4166666666666667-.055:12.92*I,M=M>.0031308?1.055*M**.4166666666666667-.055:12.92*M,D=Math.min(Math.max(0,D),1),I=Math.min(Math.max(0,I),1),M=Math.min(Math.max(0,M),1),[255*D,255*I,255*M]},v.xyz.lab=function(w){let C=w[0],E=w[1],S=w[2];return C/=95.047,E/=100,S/=108.883,C=C>.008856?C**.3333333333333333:7.787*C+.13793103448275862,E=E>.008856?E**.3333333333333333:7.787*E+.13793103448275862,S=S>.008856?S**.3333333333333333:7.787*S+.13793103448275862,[116*E-16,500*(C-E),200*(E-S)]},v.lab.xyz=function(w){let C,E,S;E=(w[0]+16)/116,C=w[1]/500+E,S=E-w[2]/200;const D=E**3,I=C**3,M=S**3;return E=D>.008856?D:(E-.13793103448275862)/7.787,C=I>.008856?I:(C-.13793103448275862)/7.787,S=M>.008856?M:(S-.13793103448275862)/7.787,C*=95.047,E*=100,S*=108.883,[C,E,S]},v.lab.lch=function(w){const C=w[0],E=w[1],S=w[2];let D;return D=360*Math.atan2(S,E)/2/Math.PI,D<0&&(D+=360),[C,Math.sqrt(E*E+S*S),D]},v.lch.lab=function(w){const C=w[0],E=w[1],S=w[2]/360*2*Math.PI;return[C,E*Math.cos(S),E*Math.sin(S)]},v.rgb.ansi16=function(w,C=null){const[E,S,D]=w;let I=C===null?v.rgb.hsv(w)[2]:C;if(I=Math.round(I/50),I===0)return 30;
vendor: 6,919 bytes, line 246
246let M=30+(Math.round(D/255)<<2|Math.round(S/255)<<1|Math.round(E/255));return I===2&&(M+=60),M},v.hsv.ansi16=function(w){return v.rgb.ansi16(v.hsv.rgb(w),w[2])},v.rgb.ansi256=function(w){const C=w[0],E=w[1],S=w[2];return C===E&&E===S?C<8?16:C>248?231:Math.round((C-8)/247*24)+232:16+36*Math.round(C/255*5)+6*Math.round(E/255*5)+Math.round(S/255*5)},v.ansi16.rgb=function(w){let C=w%10;if(C===0||C===7)return w>50&&(C+=3.5),C=C/10.5*255,[C,C,C];const E=.5*(1+~~(w>50));return[(1&C)*E*255,(C>>1&1)*E*255,(C>>2&1)*E*255]},v.ansi256.rgb=function(w){if(w>=232){const E=10*(w-232)+8;return[E,E,E]}let C;return w-=16,[Math.floor(w/36)/5*255,Math.floor((C=w%36)/6)/5*255,C%6/5*255]},v.rgb.hex=function(w){const C=(((255&Math.round(w[0]))<<16)+((255&Math.round(w[1]))<<8)+(255&Math.round(w[2]))).toString(16).toUpperCase();return"000000".substring(C.length)+C},v.hex.rgb=function(w){const C=w.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!C)return[0,0,0];let E=C[0];C[0].length===3&&(E=E.split("").map(D=>D+D).join(""));const S=parseInt(E,16);return[S>>16&255,S>>8&255,255&S]},v.rgb.hcg=function(w){const C=w[0]/255,E=w[1]/255,S=w[2]/255,D=Math.max(Math.max(C,E),S),I=Math.min(Math.min(C,E),S),M=D-I;let B,R;return B=M<1?I/(1-M):0,R=M<=0?0:D===C?(E-S)/M%6:D===E?2+(S-C)/M:4+(C-E)/M,R/=6,R%=1,[360*R,100*M,100*B]},v.hsl.hcg=function(w){const C=w[1]/100,E=w[2]/100,S=E<.5?2*C*E:2*C*(1-E);let D=0;return S<1&&(D=(E-.5*S)/(1-S)),[w[0],100*S,100*D]},v.hsv.hcg=function(w){const C=w[1]/100,E=w[2]/100,S=C*E;let D=0;return S<1&&(D=(E-S)/(1-S)),[w[0],100*S,100*D]},v.hcg.rgb=function(w){const C=w[0]/360,E=w[1]/100,S=w[2]/100;if(E===0)return[255*S,255*S,255*S];const D=[0,0,0],I=C%1*6,M=I%1,B=1-M;let R=0;switch(Math.floor(I)){case 0:D[0]=1,D[1]=M,D[2]=0;break;case 1:D[0]=B,D[1]=1,D[2]=0;break;case 2:D[0]=0,D[1]=1,D[2]=M;break;case 3:D[0]=0,D[1]=B,D[2]=1;break;case 4:D[0]=M,D[1]=0,D[2]=1;break;default:D[0]=1,D[1]=0,D[2]=B}return R=(1-E)*S,[255*(E*D[0]+R),255*(E*D[1]+R),255*(E*D[2]+R)]},v.hcg.hsv=function(w){const C=w[1]/100,E=C+w[2]/100*(1-C);let S=0;return E>0&&(S=C/E),[w[0],100*S,100*E]},v.hcg.hsl=function(w){const C=w[1]/100,E=w[2]/100*(1-C)+.5*C;let S=0;return E>0&&E<.5?S=C/(2*E):E>=.5&&E<1&&(S=C/(2*(1-E))),[w[0],100*S,100*E]},v.hcg.hwb=function(w){const C=w[1]/100,E=C+w[2]/100*(1-C);return[w[0],100*(E-C),100*(1-E)]},v.hwb.hcg=function(w){const C=w[1]/100,E=1-w[2]/100,S=E-C;let D=0;return S<1&&(D=(E-S)/(1-S)),[w[0],100*S,100*D]},v.apple.rgb=function(w){return[w[0]/65535*255,w[1]/65535*255,w[2]/65535*255]},v.rgb.apple=function(w){return[w[0]/255*65535,w[1]/255*65535,w[2]/255*65535]},v.gray.rgb=function(w){return[w[0]/100*255,w[0]/100*255,w[0]/100*255]},v.gray.hsl=function(w){return[0,0,w[0]]},v.gray.hsv=v.gray.hsl,v.gray.hwb=function(w){return[0,100,w[0]]},v.gray.cmyk=function(w){return[0,0,0,w[0]]},v.gray.lab=function(w){return[w[0],0,0]},v.gray.hex=function(w){const C=255&Math.round(w[0]/100*255),E=((C<<16)+(C<<8)+C).toString(16).toUpperCase();return"000000".substring(E.length)+E},v.rgb.gray=function(w){return[(w[0]+w[1]+w[2])/3/255*100]}},9047:(f,g,p)=>{const x=p(9246),y=p(802),v={};Object.keys(x).forEach(w=>{v[w]={},Object.defineProperty(v[w],"channels",{value:x[w].channels}),Object.defineProperty(v[w],"labels",{value:x[w].labels});const C=y(w);Object.keys(C).forEach(E=>{const S=C[E];v[w][E]=function(D){const I=function(...M){const B=M[0];if(B==null)return B;B.length>1&&(M=B);const R=D(M);if(typeof R=="object")for(let F=R.length,V=0;V<F;V++)R[V]=Math.round(R[V]);return R};return"conversion"in D&&(I.conversion=D.conversion),I}(S),v[w][E].raw=function(D){const I=function(...M){const B=M[0];return B==null?B:(B.length>1&&(M=B),D(M))};return"conversion"in D&&(I.conversion=D.conversion),I}(S)})}),f.exports=v},802:(f,g,p)=>{const x=p(9246);function y(C){const E=function(){const D={},I=Object.keys(x);for(let M=I.length,B=0;B<M;B++)D[I[B]]={distance:-1,parent:null};return D}(),S=[C];for(E[C].distance=0;S.length;){const D=S.pop(),I=Object.keys(x[D]);for(let M=I.length,B=0;B<M;B++){const R=I[B],F=E[R];F.distance===-1&&(F.distance=E[D].distance+1,F.parent=D,S.unshift(R))}}return E}function v(C,E){return function(S){return E(C(S))}}function w(C,E){const S=[E[C].parent,C];let D=x[E[C].parent][C],I=E[C].parent;for(;E[I].parent;)S.unshift(E[I].parent),D=v(x[E[I].parent][I],D),I=E[I].parent;return D.conversion=S,D}f.exports=function(C){const E=y(C),S={},D=Object.keys(E);for(let I=D.length,M=0;M<I;M++){const B=D[M];E[B].parent!==null&&(S[B]=w(B,E))}return S}},6931:f=>{f.exports={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
246ive:[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]}},4199:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck-content code{background-color:hsla(0,0%,78%,.3);border-radius:2px;padding:.15em}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}","",{version:3,sources:["webpack://./../ckeditor5-basic-styles/theme/code.css"],names:[],mappings:"AAKA,iBACC,kCAAuC,CAEvC,iBAAkB,CADlB,aAED,CAEA,0CACC,kCACD",sourcesContent:[`/* 247 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 248 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 249 */ 250 251.ck-content code { 252 background-color: hsla(0, 0%, 78%, 0.3); 253 padding: .15em; 254 border-radius: 2px; 255} 256 257.ck.ck-editor__editable .ck-code_selected { 258 background-color: hsla(0, 0%, 78%, 0.5); 259} 260`],sourceRoot:""}]);const C=w},8708:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck-content blockquote{border-left:5px solid #ccc;font-style:italic;margin-left:0;margin-right:0;overflow:hidden;padding-left:1.5em;padding-right:1.5em}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}","",{version:3,sources:["webpack://./../ckeditor5-block-quote/theme/blockquote.css"],names:[],mappings:"AAKA,uBAWC,0BAAsC,CADtC,iBAAkB,CAFlB,aAAc,CACd,cAAe,CAPf,eAAgB,CAIhB,kBAAmB,CADnB,mBAOD,CAEA,gCACC,aAAc,CACd,2BACD",sourcesContent:[`/* 261 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 262 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 263 */ 264 265.ck-content blockquote { 266 /* See #12 */ 267 overflow: hidden; 268 269 /* https://github.com/ckeditor/ckeditor5-block-quote/issues/15 */ 270 padding-right: 1.5em; 271 padding-left: 1.5em; 272 273 margin-left: 0; 274 margin-right: 0; 275 font-style: italic; 276 border-left: solid 5px hsl(0, 0%, 80%); 277} 278 279.ck-content[dir="rtl"] blockquote { 280 border-left: 0; 281 border-right: solid 5px hsl(0, 0%, 80%); 282} 283`],sourceRoot:""}]);const C=w},1866:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,':root{--ck-image-processing-highlight-color:#f9fafa;--ck-image-processing-background-color:#e3e5e8}.ck.ck-editor__editable .image.image-processing{position:relative}.ck.ck-editor__editable .image.image-processing:before{animation:ck-image-processing-animation 2s linear infinite;background:linear-gradient(90deg,var(--ck-image-processing-background-color),var(--ck-image-processing-highlight-color),var(--ck-image-processing-background-color));background-size:200% 100%;content:"";height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.ck.ck-editor__editable .image.image-processing img{height:100%}@keyframes ck-image-processing-animation{0%{background-position:200% 0}to{background-position:-200% 0}}',"",{version:3,sources:["webpack://./../ckeditor5-ckbox/theme/ckboximageedit.css"],names:[],mappings:"AAKA,MAEC,6CAAyD,CACzD,8CACD,CAIE,gDACC,iBA2BD,CAzBC,uDAmBC,0DAA2D,CAR3D,oKAKC,CACD,yBAA0B,CAhB1B,UAAW,CAOX,WAAY,CAHZ,MAAO,CAFP,iBAAkB,CAClB,KAAM,CAKN,UAAW,CAHX,SAcD,CAEA,oDACC,WACD,CAKH,yCACC,GACC,0BACD,CACA,GACC,2BACD,CACD",sourcesContent:[`/* 284 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 285 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 286 */ 287 288:root { 289 /* Based on default CKBox theme colors */ 290 --ck-image-processing-highlight-color: hsl(220, 10%, 98%); 291 --ck-image-processing-background-color: hsl(220, 10%, 90%); 292} 293
294.ck.ck-editor__editable { 295 & .image { 296 &.image-processing { 297 position: relative; 298 299 &:before { 300 content: ''; 301 302 position: absolute; 303 top: 0; 304 left: 0; 305 z-index: 1; 306 307 height: 100%; 308 width: 100%; 309 310 background: linear-gradient( 311 90deg, 312 var(--ck-image-processing-background-color), 313 var(--ck-image-processing-highlight-color), 314 var(--ck-image-processing-background-color) 315 ); 316 background-size: 200% 100%; 317 318 animation: ck-image-processing-animation 2s linear infinite; 319 } 320 321 & img { 322 height: 100%; 323 } 324 } 325 } 326} 327 328@keyframes ck-image-processing-animation { 329 0% { 330 background-position: 200% 0; 331 } 332 100% { 333 background-position: -200% 0; 334 } 335} 336`],sourceRoot:""}]);const C=w},7793:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}.ck.ck-clipboard-drop-target-line{pointer-events:none;position:absolute}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}.ck.ck-clipboard-drop-target-line{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);height:0;margin-top:-1px}.ck.ck-clipboard-drop-target-line:before{border-style:solid;content:"";height:0;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-width)*-.5);width:0}[dir=ltr] .ck.ck-clipboard-drop-target-line:before{border-color:transparent transparent transparent var(--ck-clipboard-drop-target-color);border-width:calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5) var(--ck-clipboard-drop-target-dot-height);left:-1px}[dir=rtl] .ck.ck-clipboard-drop-target-line:before{border-color:transparent var(--ck-clipboard-drop-target-color) transparent transparent;border-width:calc(var(--ck-clipboard-drop-target-dot-width)*.5) var(--ck-clipboard-drop-target-dot-height) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0;right:-1px}',"",{version:3,sources:["webpack://./../ckeditor5-clipboard/theme/clipboard.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-clipboard/clipboard.css"],names:[],mappings:"AASC,8DACC,cAAe,CAEf,mBAAoB,CADpB,iBAOD,CAJC,mEACC,iBAAkB,CAClB,OACD,CAWA,qJACC,YACD,CAIF,kCAEC,mBAAoB,CADpB,iBAED,CC9BA,MACC,yCAA0C,CAC1C,yCAA0C,CAC1C,6DACD,CAOE,mEAIC,gDAAiD,CADjD,sDAAuD,CAFvD,2DAA8D,CAI9D,gBAAiB,CAHjB,wDAqBD,CAfC,yEAWC,sFAAuF,CAEvF,kBAAmB,CADnB,qKAA0K,CAX1K,UAAW,CAIX,aAAc,CAFd,QAAS,CAIT,QAAS,CADT,iBAAkB,CAElB,wDAA2D,CAE3D,0BAA2B,CAR3B,OAYD,CAOF,kEACC,gGACD,CAKA,gDACC,OAAS,CACT,sBACD,CAGD,kCAGC,gDAAiD,CADjD,sDAAuD,CADvD,QAAS,CAGT,eAwBD,CAtBC,yCAMC,kBAAmB,CALnB,UAAW,CAIX,QAAS,CAHT,iBAAkB,CAClB,uDAA0D,CAC1D,OAiBD,CArBA,mDAYE,sFAAuF,CADvF,+JAAoK,CAFpK,SAYF,CArBA,mDAmBE,sFAAuF,CADvF,+JAAmK,CAFnK,UAKF",sourcesContent:[`/* 337 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 338 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 339 */ 340
341.ck.ck-editor__editable { 342 /* 343 * Vertical drop target (in text). 344 */ 345 & .ck.ck-clipboard-drop-target-position { 346 display: inline; 347 position: relative; 348 pointer-events: none; 349 350 & span { 351 position: absolute; 352 width: 0; 353 } 354 } 355 356 /* 357 * Styles of the widget being dragged (its preview). 358 */ 359 & .ck-widget:-webkit-drag { 360 & > .ck-widget__selection-handle { 361 display: none; 362 } 363 364 & > .ck-widget__type-around { 365 display: none; 366 } 367 } 368} 369 370.ck.ck-clipboard-drop-target-line { 371 position: absolute; 372 pointer-events: none; 373} 374`,`/* 375 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 376 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 377 */ 378 379@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 380 381:root { 382 --ck-clipboard-drop-target-dot-width: 12px; 383 --ck-clipboard-drop-target-dot-height: 8px; 384 --ck-clipboard-drop-target-color: var(--ck-color-focus-border); 385} 386 387.ck.ck-editor__editable { 388 /* 389 * Vertical drop target (in text). 390 */ 391 & .ck.ck-clipboard-drop-target-position { 392 & span { 393 bottom: calc(-.5 * var(--ck-clipboard-drop-target-dot-height)); 394 top: calc(-.5 * var(--ck-clipboard-drop-target-dot-height)); 395 border: 1px solid var(--ck-clipboard-drop-target-color); 396 background: var(--ck-clipboard-drop-target-color); 397 margin-left: -1px; 398 399 /* The triangle above the marker */ 400 &::after { 401 content: ''; 402 width: 0; 403 height: 0; 404 405 display: block; 406 position: absolute; 407 left: 50%; 408 top: calc(-.5 * var(--ck-clipboard-drop-target-dot-height)); 409 410 transform: translateX(-50%); 411 border-color: var(--ck-clipboard-drop-target-color) transparent transparent transparent; 412 border-width: calc(var(--ck-clipboard-drop-target-dot-height)) calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0 calc(.5 * var(--ck-clipboard-drop-target-dot-width)); 413 border-style: solid; 414 } 415 } 416 } 417 418 /* 419 * Styles of the widget that it a drop target. 420 */ 421 & .ck-widget.ck-clipboard-drop-target-range { 422 outline: var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color) !important; 423 } 424 425 /* 426 * Styles of the widget being dragged (its preview). 427 */ 428 & .ck-widget:-webkit-drag { 429 zoom: 0.6; 430 outline: none !important; 431 } 432} 433 434.ck.ck-clipboard-drop-target-line { 435 height: 0; 436 border: 1px solid var(--ck-clipboard-drop-target-color); 437 background: var(--ck-clipboard-drop-target-color); 438 margin-top: -1px; 439 440 &::before { 441 content: ''; 442 position: absolute; 443 top: calc(-.5 * var(--ck-clipboard-drop-target-dot-width)); 444 width: 0; 445 height: 0; 446 border-style: solid; 447 448 @mixin ck-dir ltr { 449 left: -1px; 450 451 border-width: calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0 calc(.5 * var(--ck-clipboard-drop-target-dot-width)) var(--ck-clipboard-drop-target-dot-height); 452 border-color: transparent transparent transparent var(--ck-clipboard-drop-target-color); 453 } 454 455 @mixin ck-dir rtl { 456 right: -1px; 457 458 border-width:calc(.5 * var(--ck-clipboard-drop-target-dot-width)) var(--ck-clipboard-drop-target-dot-height) calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0; 459 border-color: transparent var(--ck-clipboard-drop-target-color) transparent transparent; 460 } 461 } 462} 463`],sourceRoot:""}]);const C=w},7388:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-panel)}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content{border:solid var(--ck-color-base-border);border-width:1px 1px 0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content.ck-sticky-panel__content_sticky{border-bottom-width:1px}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content .ck-menu-bar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content .ck-toolbar{border:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}","",{version:3,sources:["webpack://./../ckeditor5-editor-classic/theme/classiceditor.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-editor-classic/classiceditor.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,cAIC,iBAMD,CAJC,2DAEC,yBACD,CCLC,8DCED,eDeC,CAjBA,mKCMA,qCAAsC,CDJpC,2BAA4B,CAC5B,4BAcF,CAjBA,8DAOC,wCAAsB,
463CAAtB,sBAUD,CARC,8FACC,uBACD,CAEA,qJAEC,QACD,CAMH,yCAEC,0CAA2C,CCtB3C,eDgCD,CAZA,yHChBE,qCAAsC,CDqBtC,wBAAyB,CACzB,yBAMF,CAHC,0DACC,wCACD",sourcesContent:[`/* 464 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 465 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 466 */ 467 468.ck.ck-editor { 469 /* All the elements within \`.ck-editor\` are positioned relatively to it. 470 If any element needs to be positioned with respect to the <body>, etc., 471 it must land outside of the \`.ck-editor\` in DOM. */ 472 position: relative; 473 474 & .ck-editor__top .ck-sticky-panel .ck-toolbar { 475 /* https://github.com/ckeditor/ckeditor5-editor-classic/issues/62 */ 476 z-index: var(--ck-z-panel); 477 } 478} 479`,`/* 480 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 481 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 482 */ 483 484@import "../mixins/_rounded.css"; 485 486.ck.ck-editor__top { 487 & .ck-sticky-panel { 488 & .ck-sticky-panel__content { 489 @mixin ck-rounded-corners { 490 border-bottom-left-radius: 0; 491 border-bottom-right-radius: 0; 492 } 493 494 border: 1px solid var(--ck-color-base-border); 495 border-bottom-width: 0; 496 497 &.ck-sticky-panel__content_sticky { 498 border-bottom-width: 1px; 499 } 500 501 & .ck-menu-bar, 502 & .ck-toolbar { 503 border: 0; 504 } 505 } 506 } 507} 508 509/* Note: Use ck-editor__main to make sure these styles don't apply to other editor types */ 510.ck.ck-editor__main > .ck-editor__editable { 511 /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/113 */ 512 background: var(--ck-color-base-background); 513 514 @mixin ck-rounded-corners { 515 border-top-left-radius: 0; 516 border-top-right-radius: 0; 517 } 518 519 &:not(.ck-focused) { 520 border-color: var(--ck-color-base-border); 521 } 522} 523`,`/* 524 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 525 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 526 */ 527 528/** 529 * Implements rounded corner interface for .ck-rounded-corners class. 530 * 531 * @see $ck-border-radius 532 */ 533@define-mixin ck-rounded-corners { 534 border-radius: 0; 535 536 @nest .ck-rounded-corners &, 537 &.ck-rounded-corners { 538 border-radius: var(--ck-border-radius); 539 @mixin-content; 540 } 541} 542`],sourceRoot:""}]);const C=w},4098:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}@media (forced-colors:active){.ck .ck-placeholder,.ck.ck-placeholder{forced-color-adjust:preserve-parent-color}}.ck .ck-placeholder:before,.ck.ck-placeholder:before{cursor:text}@media (forced-colors:none){.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text)}}@media (forced-colors:active){.ck .ck-placeholder:before,.ck.ck-placeholder:before{font-style:italic;margin-left:1px}}","",{version:3,sources:["webpack://./../ckeditor5-engine/theme/placeholder.css","webpack://./../ckeditor5-ui/theme/mixins/_mediacolors.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-engine/placeholder.css"],names:[],mappings:"AAMA,uCAEC,iBAWD,CATC,qDAIC,8BAA+B,CAF/B,MAAO,CAKP,mBAAoB,CANpB,iBAAkB,CAElB,OAKD,CAKA,wCACC,YACD,CAQD,iCACC,iBACD,CC7BC,8BACC,uCCOA,yCDLA,CACD,CCOA,qDACC,WAmBD,CDvBA,4BACC,qDCMC,6CDJD,CACD,CAZA,8BACC,qDCsBC,iBAAkB,CAMlB,eD1BD,CACD",sourcesContent:[`/* 543 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 544 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 545 */ 546 547/* See ckeditor/ckeditor5#936. */ 548.ck.ck-placeholder, 549.ck .ck-placeholder { 550 position: relative; 551 552 &::before { 553 position: absolute; 554 left: 0; 555 right: 0; 556 content: attr(data-placeholder); 557 558 /* See ckeditor/ckeditor5#469. */ 559 pointer-events: none; 560 } 561} 562 563/* See ckeditor/ckeditor5#1987. */ 564.ck.ck-read-only .ck-placeholder { 565 &::before { 566 display: none; 567 } 568} 569 570/* 571 * Rules for the \`ck-placeholder\` are loaded before the rules for \`ck-reset_all\` in the base CKEditor 5 DLL build. 572 * This fix overwrites the incorrectly set \`position: static\` from \`ck-reset_all\`. 573 * See https://github.com/ckeditor/ckeditor5/issues/11418. 574 */ 575.ck.ck-reset_all .ck-placeholder { 576 position: relative; 577} 578`,`/* 579 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 580 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 581 */ 582 583@define-mixin ck-media-forced-colors { 584 @media (forced-colors: active) { 585 & { 586 @mixin-content; 587 } 588 } 589} 590 591@define-mixin ck-media-default-colors { 592 @media (forced-colors: none) { 593 & { 594 @mixin-content; 595 } 596 } 597} 598`,`/* 599 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 600 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 601 */ 602 603@import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css"; 604 605/* See ckeditor/ckeditor5#936. */ 606.ck.ck-placeholder, .ck .ck-placeholder { 607 @mixin ck-media-forced-colors { 608 /* 609 * This is needed for Edge on Windows to use the right color for the placeholder content (::before). 610 * See https://github.com/ckeditor/ckeditor5/issues/14907. 611 */ 612 forced-color-adjust: preserve-parent-color; 613 } 614 615 &::before { 616 cursor: text; 617 618 @mixin ck-media-default-colors { 619 color: var(--ck-color-engine-placeholder-text); 620 } 621 622 @mixin ck-media-forced-colors { 623 /* 624 * In the high contrast mode there is no telling between regular and placeholder text. Using 625 * italic text to address that issue. See https://github.com/ckeditor/ckeditor5/issues/14907. 626 */ 627 font-style: italic; 628 629 /* 630 * Without this margin, the caret will not show up and blink
630when the user puts the selection 631 * in the placeholder (Edge on Windows). See https://github.com/ckeditor/ckeditor5/issues/14907. 632 */ 633 margin-left: 1px; 634 } 635 } 636} 637`],sourceRoot:""}]);const C=w},8264:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}","",{version:3,sources:["webpack://./../ckeditor5-engine/theme/renderer.css"],names:[],mappings:"AAMA,qDACC,YACD",sourcesContent:[`/* 638 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 639 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 640 */ 641 642/* Elements marked by the Renderer as hidden should be invisible in the editor. */ 643.ck.ck-editor__editable span[data-ck-unsafe-element] { 644 display: none; 645} 646`],sourceRoot:""}]);const C=w},6269:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}","",{version:3,sources:["webpack://./../ckeditor5-heading/theme/heading.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-heading/heading.css"],names:[],mappings:"AAKA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,+BACC,eACD,CCZC,2EACC,SACD,CAEA,uEACC,cACD",sourcesContent:[`/* 647 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 648 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 649 */ 650 651.ck.ck-heading_heading1 { 652 font-size: 20px; 653} 654 655.ck.ck-heading_heading2 { 656 font-size: 17px; 657} 658 659.ck.ck-heading_heading3 { 660 font-size: 14px; 661} 662 663.ck[class*="ck-heading_heading"] { 664 font-weight: bold; 665} 666`,`/* 667 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 668 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 669 */ 670 671/* Resize dropdown's button label. */ 672.ck.ck-dropdown.ck-heading-dropdown { 673 & .ck-dropdown__button .ck-button__label { 674 width: 8em; 675 } 676 677 & .ck-dropdown__panel .ck-list__item { 678 min-width: 18em; 679 } 680} 681`],sourceRoot:""}]);const C=w},265:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck-content .image{clear:both;display:table;margin:.9em auto;min-width:50px;text-align:center}.ck-content .image img{display:block;height:auto;margin:0 auto;max-width:100%;min-width:100%}.ck-content .image-inline{align-items:flex-start;display:inline-flex;max-width:100%}.ck-content .image-inline picture{display:flex}.ck-content .image-inline img,.ck-content .image-inline picture{flex-grow:1;flex-shrink:1;max-width:100%}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}.ck.ck-editor__editable .image{z-index:1}.ck.ck-editor__editable .image.ck-widget_selected{z-index:2}.ck.ck-editor__editable .image-inline{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected{z-index:2}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable .image-inline img{height:auto}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/image.css"],names:[],mappings:"AAMC,mBAEC,UAAW,CADX,aAAc,CAOd,gBAAkB,CAGlB,cAAe,CARf,iBA2BD,CAjBC,uBAEC,aAAc,CAad,WAAY,CAVZ,aAAc,CAGd,cAAe,CAGf,cAKD,CAGD,0BAYC,sBAAuB,CANvB,mBAAoB,CAGpB,cAoBD,CAdC,kCACC,YACD,CAGA,gEAGC,WAAY,CACZ,aAAc,CAGd,cACD,CAUD,gEASC,eAAgB,CARhB,oBAAqB,CACrB,qBAAsB,CAQtB,sBAAuB,CAFvB,kBAGD,CAKA,+BACC,SASD,CAHC,kDACC,SACD,CAMD,sCACC,SAkBD,CAZC,yDACC,SAUD,CAHC,qEACC,YACD,CAMF,0CACC,WACD,CAMC,0FACC,cACD",sourcesContent:[`/* 682 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 683 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 684 */ 685 686.ck-content { 687 & .image { 688 display: table; 689 clear: both; 690 text-align: center; 691 692 /* Make sure there is some space between the content and the image. Center image by default. */ 693 /* The first value should be equal to --ck-spacing-large variable if used in the editor context 694 to avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */ 695 margin: 0.9em auto; 696 697 /* Make sure the caption will be displayed properly (See: https://github.com/ckeditor/ckeditor5/issues/1870). */ 698 min-width: 50px; 699 700 & img { 701 /* Prevent unnecessary margins caused by line-height (see #44). */ 702 display: block; 703 704 /* Center the image if its width is smaller than the content's width. */ 705 margin: 0 auto; 706 707 /* Make sure the image never exceeds the size of the parent container (ckeditor/ckeditor5-ui#67). */ 708 max-width: 100%; 709 710 /* Make sure the image is never smaller than the parent container (See: https://github.com/ckeditor/ckeditor5/issues/9300). */ 711 min-width: 100%; 712 713 /* Keep proportions of the block image if the height is set and the image is wider than the editor width. 714 See https://github.com/ckeditor/ckeditor5/issues/14542. */ 715 height: auto; 716 } 717 } 718 719 & .image-inline { 720 /* 721 * Normally, the .image-inline would have "display: inline-block" and "img { width: 100% }" (to follow the wrapper while resizing). 722 * Unfortunately, together with "srcset", it gets automatically stretched up to the width of the editing root. 723 * This strange behavior does not happen with inline-flex. 724 */ 725 display: inline-flex; 726 727 /* While being resized, don't allow the image to exceed the width of the editing root. */ 728 max-width: 100%; 729 730 /* This is required by Safari to resize images in a sensible way. Without this, the browser breaks the ratio. */ 731 align-items: flex-start; 732 733 /* When the picture is present it must act as a flex container to let the img resize properly */ 734 & picture { 735 display: flex; 736 } 737 738 /* When the picture is present, it must act like a resizable img. */ 739 & picture, 740 & img { 741 /* This is necessary for the img to span the entire .image-inline wrapper and to resize properly. */ 742 flex-grow: 1; 743 flex-shrink: 1; 744 745 /* Prevents overflowing the editing root boundaries when an inline image is very wide. */ 746 max-width: 100%; 747 } 748 } 749} 750 751.ck.ck-editor__editable { 752 /* 753 * Inhertit the content styles padding of the <figcaption> in case the integration overrides \`text-align: center\` 754 * of \`.image\` (e.g. to the left/right). This ensures the placeholder stays at the padding just like the native 755 * caret does, and not at the edge of <figcaption>. 756 */ 757 & .image > figcaption.ck-placeholder::before { 758 padding-left: inherit; 759 padding-right: inherit; 760 761 /* 762 * Make sure the image caption placeholder doesn't overflow the placeholder area. 763 * See https://github.com/ckeditor/ckeditor5/issues/9162. 764 */ 765 white-space: nowrap; 766 overflow: hidden; 767 text-overflow: ellipsis; 768 } 769 770 /* 771 * See https://github.com/ckeditor/ckeditor5/issues/15115. 772 */ 773 & .image { 774 z-index: 1; 775 776 /* 777 * Make sure the selected image always stays on top of its siblings. 778 * See https://github.com/ckeditor/ckeditor5/issues/9108. 779 */ 780 &.ck-widget_selected { 781 z-index: 2; 782 } 783 } 784 785 /* 786 * See https://github.com/ckeditor/ckeditor5/issues/15115. 787 */ 788 & .image-inline { 789 z-index: 1; 790 791 /* 792 * Make sure the selected inline image always stays on top of its siblings. 793 * See https://github.com/ckeditor/ckeditor5/issues/9108. 794 */ 795 &.ck-widget_selected { 796 z-index: 2; 797 798 /* 799 * Make sure the native browser selection style is not displayed. 800 * Inline image widgets have their own styles for the selected state and 801 * leaving this up to the browser is asking for a visual collision. 802 */ 803 & ::selection { 804 display: none; 805 } 806 } 807 } 808 809 /* Keep proportions of the inline image if the height is set and the image is wider than the editor width. 810 See https://github.com/ckeditor/ckeditor5/issues/14542. */ 811 & .image-inline img { 812 height: auto; 813 } 814 815 /* The inline image nested in the table should have its original size if not resized. 816 See https://github.com/ckeditor/ckeditor5/issues/9117. */ 817 & td, 818 & th { 819 & .image-inline img { 820 max-width: none; 821 } 822 } 823} 824`],sourceRoot:""}]);const C=w},5247:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highlighted-background:#fd0}.ck-content .image>figcaption{background-color:var(--ck-color-image-caption-background);caption-side:bottom;color:var(--ck-color-image-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;word-break:break-word}@media (forced-colors:active){.ck-content .image>figcaption{background-color:unset;color:unset}}@media (forced-colors:none){.ck.ck-editor__editable .image>
824figcaption.image__caption_highlighted{animation:ck-image-caption-highlight .6s ease-out}}@media (prefers-reduced-motion:reduce){.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{animation:none}}@keyframes ck-image-caption-highlight{0%{background-color:var(--ck-color-image-caption-highlighted-background)}to{background-color:var(--ck-color-image-caption-background)}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imagecaption.css","webpack://./../ckeditor5-ui/theme/mixins/_mediacolors.css"],names:[],mappings:"AAOA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,oDACD,CAGA,8BAKC,yDAA0D,CAH1D,mBAAoB,CAEpB,wCAAyC,CAHzC,qBAAsB,CAMtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,qBAYD,CAJC,8BAXD,8BAYE,sBAAuB,CACvB,WAEF,CADC,CCdA,4BACC,qEDmBA,iDCjBA,CACD,CDmBA,uCALD,qEAME,cAEF,CADC,CAGD,sCACC,GACC,qEACD,CAEA,GACC,yDACD,CACD",sourcesContent:[`/* 825 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 826 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 827 */ 828 829@import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css"; 830 831:root { 832 --ck-color-image-caption-background: hsl(0, 0%, 97%); 833 --ck-color-image-caption-text: hsl(0, 0%, 20%); 834 --ck-color-image-caption-highlighted-background: hsl(52deg 100% 50%); 835} 836 837/* Content styles */ 838.ck-content .image > figcaption { 839 display: table-caption; 840 caption-side: bottom; 841 word-break: break-word; 842 color: var(--ck-color-image-caption-text); 843 background-color: var(--ck-color-image-caption-background); 844 padding: .6em; 845 font-size: .75em; 846 outline-offset: -1px; 847 848 /* Improve placeholder rendering in high-constrast mode (https://github.com/ckeditor/ckeditor5/issues/14907). */ 849 @media (forced-colors: active) { 850 background-color: unset; 851 color: unset; 852 } 853} 854 855/* Editing styles */ 856.ck.ck-editor__editable .image > figcaption.image__caption_highlighted { 857 @mixin ck-media-default-colors { 858 animation: ck-image-caption-highlight .6s ease-out; 859 } 860 861 @media (prefers-reduced-motion: reduce) { 862 animation: none; 863 } 864} 865 866@keyframes ck-image-caption-highlight { 867 0% { 868 background-color: var(--ck-color-image-caption-highlighted-background); 869 } 870 871 100% { 872 background-color: var(--ck-color-image-caption-background); 873 } 874} 875`,`/* 876 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 877 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 878 */ 879 880@define-mixin ck-media-forced-colors { 881 @media (forced-colors: active) { 882 & { 883 @mixin-content; 884 } 885 } 886} 887 888@define-mixin ck-media-default-colors { 889 @media (forced-colors: none) { 890 & { 891 @mixin-content; 892 } 893 } 894} 895`],sourceRoot:""}]);const C=w},4642:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-image-custom-resize-form{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-image-custom-resize-form .ck-labeled-field-view{display:inline-block}.ck.ck-image-custom-resize-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-image-custom-resize-form{flex-wrap:wrap}.ck.ck-image-custom-resize-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-image-custom-resize-form .ck-button{flex-basis:50%}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imagecustomresizeform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,gCAIC,sBAAuB,CAHvB,YAAa,CACb,kBAAmB,CACnB,gBAsBD,CAnBC,uDACC,oBACD,CAEA,0CACC,YACD,CCbA,oCDCD,gCAeE,cAUF,CARE,uDACC,eACD,CAEA,2CACC,cACD,CCtBD",sourcesContent:[`/* 896 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 897 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 898 */ 899 900@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"; 901 902.ck.ck-image-custom-resize-form { 903 display: flex; 904 flex-direction: row; 905 flex-wrap: nowrap; 906 align-items: flex-start; 907 908 & .ck-labeled-field-view { 909 display: inline-block; 910 } 911 912 & .ck-label { 913 display: none; 914 } 915 916 @mixin ck-media-phone { 917 flex-wrap: wrap; 918 919 & .ck-labeled-field-view { 920 flex-basis: 100%; 921 } 922 923 & .ck-button { 924 flex-basis: 50%; 925 } 926 } 927} 928`,`/* 929 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 930 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 931 */ 932 933@define-mixin ck-media-phone { 934 @media screen and (max-width: 600px) { 935 @mixin-content; 936 } 937} 938`],sourceRoot:""}]);const C=w},3350:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-image-insert-url .ck-image-insert-url__action-row{display:grid;grid-template-columns:repeat(2,1fr)}:root{--ck-image-insert-insert-by-url-width:250px}.ck.ck-image-insert-url{--ck-input-width:100%}.ck.ck-image-insert-url .ck-image-insert-url__action-row{grid-column-gap:var(--ck-spacing-large);margin-top:var(--ck-spacing-large)}.ck.ck-image-insert-url .ck-image-insert-url__action-row .ck-button-cancel,.ck.ck-image-insert-url .ck-image-insert-url__action-row .ck-button-save{justify-content:center;min-width:auto}.ck.ck-image-insert-url .ck-image-insert-url__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}.ck.ck-image-insert-form>.ck.ck-button{display:block;padding:var(--ck-list-button-padding);width:100%}[dir=ltr] .ck.ck-image-insert-form>.ck.ck-button{text-align:left}[dir=rtl] .ck.ck-image-insert-form>.ck.ck-button{text-align:right}.ck.ck-image-insert-form>.ck.ck-collapsible:not(:first-child){border-top:1px solid var(--ck-color-base-border)}.ck.ck-image-insert-form>.ck.ck-collapsible:not(:last-child){border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-image-insert-form>.ck.ck-collapsible,.ck.ck-image-insert-form>.ck.ck-image-insert-url{min-width:var(--ck-image-insert-insert-by-url-width)}.ck.ck-image-insert-form>.ck.ck-image-insert-url{padding:var(--ck-spacing-large)}.ck.ck-image-insert-form:focus{outline:none}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageinsert.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageinsert.css"],names:[],mappings:"AAMC,yDACC,YAAa,CACb,mCACD,CCFD,MACC,2CACD,
938CAEA,wBACC,qBAgBD,CAdC,yDACC,uCAAwC,CACxC,kCAWD,CATC,oJAEC,sBAAuB,CACvB,cACD,CAEA,sFACC,0BACD,CAKD,uCACC,aAAc,CAEd,qCAAsC,CADtC,UAUD,CAZA,iDAME,eAMF,CAZA,iDAUE,gBAEF,CAGC,8DACC,gDACD,CAEA,6DACC,mDACD,CAMD,6FAJC,oDAOD,CAHA,iDAEC,+BACD,CAEA,+BACC,YACD",sourcesContent:[`/* 939 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 940 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 941 */ 942 943.ck.ck-image-insert-url { 944 & .ck-image-insert-url__action-row { 945 display: grid; 946 grid-template-columns: repeat(2, 1fr); 947 } 948} 949`,`/* 950 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 951 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 952 */ 953 954@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 955 956:root { 957 --ck-image-insert-insert-by-url-width: 250px; 958} 959 960.ck.ck-image-insert-url { 961 --ck-input-width: 100%; 962 963 & .ck-image-insert-url__action-row { 964 grid-column-gap: var(--ck-spacing-large); 965 margin-top: var(--ck-spacing-large); 966 967 & .ck-button-save, 968 & .ck-button-cancel { 969 justify-content: center; 970 min-width: auto; 971 } 972 973 & .ck-button .ck-button__label { 974 color: var(--ck-color-text); 975 } 976 } 977} 978 979.ck.ck-image-insert-form { 980 & > .ck.ck-button { 981 display: block; 982 width: 100%; 983 padding: var(--ck-list-button-padding); 984 985 @mixin ck-dir ltr { 986 text-align: left; 987 } 988 989 @mixin ck-dir rtl { 990 text-align: right; 991 } 992 } 993 994 & > .ck.ck-collapsible { 995 &:not(:first-child) { 996 border-top: 1px solid var(--ck-color-base-border); 997 } 998 999 &:not(:last-child) { 1000 border-bottom: 1px solid var(--ck-color-base-border); 1001 } 1002 1003 min-width: var(--ck-image-insert-insert-by-url-width); 1004 } 1005 1006 /* This is the case when there are no other integrations configured than insert by URL */ 1007 & > .ck.ck-image-insert-url { 1008 min-width: var(--ck-image-insert-insert-by-url-width); 1009 padding: var(--ck-spacing-large); 1010 } 1011 1012 &:focus { 1013 outline: none; 1014 } 1015} 1016`],sourceRoot:""}]);const C=w},7378:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-editor__editable img.image_placeholder{background-size:100% 100%}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageplaceholder.css"],names:[],mappings:"AAMC,8CACC,yBACD",sourcesContent:[`/* 1017 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1018 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1019 */ 1020 1021.ck.ck-editor__editable { 1022 & img.image_placeholder { 1023 background-size: 100% 100%; 1024 } 1025} 1026`],sourceRoot:""}]);const C=w},3469:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck-content img.image_resized{height:auto}.ck-content .image.image_resized{box-sizing:border-box;display:block;max-width:100%}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}.ck.ck-editor__editable td .image-inline.image_resized img,.ck.ck-editor__editable th .image-inline.image_resized img{max-width:100%}[dir=ltr] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-left:var(--ck-spacing-standard)}.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label{width:4em}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageresize.css"],names:[],mappings:"AAMA,8BACC,WACD,CAEA,iCAQC,qBAAsB,CADtB,aAAc,CANd,cAkBD,CATC,qCAEC,UACD,CAEA,4CAEC,aACD,CAQC,sHACC,cACD,CAIF,oFACC,uCACD,CAEA,oFACC,sCACD,CAEA,oEACC,SACD",sourcesContent:[`/* 1027 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1028 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1029 */ 1030 1031/* Preserve aspect ratio of the resized image after introducing image height attribute. */ 1032.ck-content img.image_resized { 1033 height: auto; 1034} 1035 1036.ck-content .image.image_resized { 1037 max-width: 100%; 1038 /* 1039 The \`<figure>\` element for resized images must not use \`display:table\` as browsers do not support \`max-width\` for it well. 1040 See https://stackoverflow.com/questions/4019604/chrome-safari-ignoring-max-width-in-table/14420691#14420691 for more. 1041 Fortunately, since we control the width, there is no risk that the image will look bad. 1042 */ 1043 display: block; 1044 box-sizing: border-box; 1045 1046 & img { 1047 /* For resized images it is the \`<figure>\` element that determines the image width. */ 1048 width: 100%; 1049 } 1050 1051 & > figcaption { 1052 /* The \`<figure>\` element uses \`display:block\`, so \`<figcaption>\` also has to. */ 1053 display: block; 1054 } 1055} 1056 1057.ck.ck-editor__editable { 1058 /* The resized inline image nested in the table should respect its parent size. 1059 See https://github.com/ckeditor/ckeditor5/issues/9117. */ 1060 & td, 1061 & th { 1062 & .image-inline.image_resized img { 1063 max-width: 100%; 1064 } 1065 } 1066} 1067 1068[dir="ltr"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon { 1069 margin-right: var(--ck-spacing-standard); 1070} 1071 1072[dir="rtl"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon { 1073 margin-left: var(--ck-spacing-standard); 1074} 1075
1076.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label { 1077 width: 4em; 1078} 1079`],sourceRoot:""}]);const C=w},6386:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,":root{--ck-image-style-spacing:1.5em;--ck-inline-image-style-spacing:calc(var(--ck-image-style-spacing)/2)}.ck-content .image-style-block-align-left,.ck-content .image-style-block-align-right{max-width:calc(100% - var(--ck-image-style-spacing))}.ck-content .image-style-align-left,.ck-content .image-style-align-right{clear:none}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-block-align-right{margin-left:auto;margin-right:0}.ck-content .image-style-block-align-left{margin-left:0;margin-right:auto}.ck-content p+.image-style-align-left,.ck-content p+.image-style-align-right,.ck-content p+.image-style-side{margin-top:0}.ck-content .image-inline.image-style-align-left,.ck-content .image-inline.image-style-align-right{margin-bottom:var(--ck-inline-image-style-spacing);margin-top:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-left{margin-right:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-right{margin-left:var(--ck-inline-image-style-spacing)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-background)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after{display:none}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-hover-background)}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imagestyle.css"],names:[],mappings:"AAKA,MACC,8BAA+B,CAC/B,qEACD,CAMC,qFAEC,oDACD,CAIA,yEAEC,UACD,CAEA,8BACC,WAAY,CACZ,yCAA0C,CAC1C,aACD,CAEA,oCACC,UAAW,CACX,0CACD,CAEA,sCACC,gBAAiB,CACjB,iBACD,CAEA,qCACC,WAAY,CACZ,yCACD,CAEA,2CAEC,gBAAiB,CADjB,cAED,CAEA,0CACC,aAAc,CACd,iBACD,CAGA,6GAGC,YACD,CAGC,mGAGC,kDAAmD,CADnD,+CAED,CAEA,iDACC,iDACD,CAEA,kDACC,gDACD,CAUC,0lBAGC,qDAKD,CAHC,8nBACC,YACD,CAKD,oVAGC,2DACD",sourcesContent:[`/* 1080 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1081 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1082 */ 1083 1084:root { 1085 --ck-image-style-spacing: 1.5em; 1086 --ck-inline-image-style-spacing: calc(var(--ck-image-style-spacing) / 2); 1087} 1088 1089.ck-content { 1090 /* Provides a minimal side margin for the left and right aligned images, so that the user has a visual feedback 1091 confirming successful application of the style if image width exceeds the editor's size. 1092 See https://github.com/ckeditor/ckeditor5/issues/9342 */ 1093 & .image-style-block-align-left, 1094 & .image-style-block-align-right { 1095 max-width: calc(100% - var(--ck-image-style-spacing)); 1096 } 1097 1098 /* Allows displaying multiple floating images in the same line. 1099 See https://github.com/ckeditor/ckeditor5/issues/9183#issuecomment-804988132 */ 1100 & .image-style-align-left, 1101 & .image-style-align-right { 1102 clear: none; 1103 } 1104 1105 & .image-style-side { 1106 float: right; 1107 margin-left: var(--ck-image-style-spacing); 1108 max-width: 50%; 1109 } 1110 1111 & .image-style-align-left { 1112 float: left; 1113 margin-right: var(--ck-image-style-spacing); 1114 } 1115 1116 & .image-style-align-center { 1117 margin-left: auto; 1118 margin-right: auto; 1119 } 1120 1121 & .image-style-align-right { 1122 float: right; 1123 margin-left: var(--ck-image-style-spacing); 1124 } 1125 1126 & .image-style-block-align-right { 1127 margin-right: 0; 1128 margin-left: auto; 1129 } 1130 1131 & .image-style-block-align-left { 1132 margin-left: 0; 1133 margin-right: auto; 1134 } 1135 1136 /* Simulates margin collapsing with the preceding paragraph, which does not work for the floating elements. */ 1137 & p + .image-style-align-left, 1138 & p + .image-style-align-right, 1139 & p + .image-style-side { 1140 margin-top: 0; 1141 } 1142 1143 & .image-inline { 1144 &.image-style-align-left, 1145 &.image-style-align-right { 1146 margin-top: var(--ck-inline-image-style-spacing); 1147 margin-bottom: var(--ck-inline-image-style-spacing); 1148 } 1149 1150 &.image-style-align-left { 1151 margin-right: var(--ck-inline-image-style-spacing); 1152 } 1153 1154 &.image-style-align-right { 1155 margin-left: var(--ck-inline-image-style-spacing); 1156 } 1157 } 1158} 1159 1160.ck.ck-splitbutton { 1161 /* The button should display as a regular drop-down if the action button 1162 is forced to fire the same action as the arrow button. */ 1163 &.ck-splitbutton_flatten { 1164 &:hover, 1165 &.ck-splitbutton_open { 1166 & > .ck-splitbutton__action:not(.ck-disabled), 1167 & > .ck-splitbutton__arrow:not(.ck-disabled), 1168 & > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) { 1169 background-color: var(--ck-color-button-on-background); 1170 1171 &::after { 1172 display: none; 1173 } 1174 } 1175 } 1176 1177 &.ck-splitbutton_open:hover { 1178 & > .ck-splitbutton__action:not(.ck-disabled), 1179 & > .ck-splitbutton__arrow:not(.ck-disabled), 1180 & > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) { 1181 background-color: var(--ck-color-button-on-hover-background); 1182 } 1183 } 1184 } 1185} 1186`],sourceRoot:""}]);const C=w},7693:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,'.ck-image-upload-complete-icon{border-radius:50%;display:block;position:absolute;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);z-index:1}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20;--ck-image-upload-icon-width:2px;--ck-image-upload-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck-image-upload-complete-icon{animation-delay:0ms,3s;animation-duration:.5s,.5s;animation-fill-mode:forwards,forwards;animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;background:var(--ck-color-image-upload-icon-background);font-size:calc(1px*var(--ck-image-upload-icon-size));height:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size));opacity:0;overflow:hidden;width:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size))}.ck-image-upload-complete-icon:after{animation-delay:.5s;animation-duration:.5s;animation-fill-mode:forwards;animation-name:ck-upload-complete-icon-check;border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);box-sizing:border-box;height:0;left:25%;opacity:0;top:50%;
1186transform:scaleX(-1) rotate(135deg);transform-origin:left top;width:0}@media (prefers-reduced-motion:reduce){.ck-image-upload-complete-icon{animation-duration:0ms}.ck-image-upload-complete-icon:after{animation:none;height:.45em;opacity:1;width:.3em}}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{height:0;opacity:1;width:0}33%{height:0;width:.3em}to{height:.45em;opacity:1;width:.3em}}',"",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageuploadicon.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadicon.css"],names:[],mappings:"AAKA,+BAUC,iBAAkB,CATlB,aAAc,CACd,iBAAkB,CAOlB,sCAAwC,CADxC,oCAAsC,CAGtC,SAMD,CAJC,qCACC,UAAW,CACX,iBACD,CChBD,MACC,iCAA8C,CAC9C,+CAA4D,CAG5D,8BAA+B,CAC/B,gCAAiC,CACjC,4DACD,CAEA,+BAWC,sBAA4B,CAN5B,0BAAgC,CADhC,qCAAuC,CADvC,wEAA0E,CAD1E,uDAAwD,CAMxD,oDAAuD,CAWvD,oFAAuF,CAlBvF,SAAU,CAgBV,eAAgB,CAChB,mFAqCD,CAjCC,qCAgBC,mBAAsB,CADtB,sBAAyB,CAEzB,4BAA6B,CAH7B,4CAA6C,CAF7C,sFAAuF,CADvF,oFAAqF,CASrF,qBAAsB,CAdtB,QAAS,CAJT,QAAS,CAGT,SAAU,CADV,OAAQ,CAKR,mCAAoC,CACpC,yBAA0B,CAH1B,OAcD,CAEA,uCA7CD,+BA8CE,sBASF,CAPE,qCACC,cAAe,CAGf,YAAc,CAFd,SAAU,CACV,UAED,CACD,CAGD,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,yCACC,GAGC,QAAS,CAFT,SAAU,CACV,OAED,CACA,IAEC,QAAS,CADT,UAED,CACA,GAGC,YAAc,CAFd,SAAU,CACV,UAED,CACD",sourcesContent:[`/* 1187 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1188 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1189 */ 1190 1191.ck-image-upload-complete-icon { 1192 display: block; 1193 position: absolute; 1194 1195 /* 1196 * Smaller images should have the icon closer to the border. 1197 * Match the icon position with the linked image indicator brought by the link image feature. 1198 */ 1199 top: min(var(--ck-spacing-medium), 6%); 1200 right: min(var(--ck-spacing-medium), 6%); 1201 border-radius: 50%; 1202 z-index: 1; 1203 1204 &::after { 1205 content: ""; 1206 position: absolute; 1207 } 1208} 1209`,`/* 1210 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1211 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1212 */ 1213 1214:root { 1215 --ck-color-image-upload-icon: hsl(0, 0%, 100%); 1216 --ck-color-image-upload-icon-background: hsl(120, 100%, 27%); 1217 1218 /* Match the icon size with the linked image indicator brought by the link image feature. */ 1219 --ck-image-upload-icon-size: 20; 1220 --ck-image-upload-icon-width: 2px; 1221 --ck-image-upload-icon-is-visible: clamp(0px, 100% - 50px, 1px); 1222} 1223 1224.ck-image-upload-complete-icon { 1225 opacity: 0; 1226 background: var(--ck-color-image-upload-icon-background); 1227 animation-name: ck-upload-complete-icon-show, ck-upload-complete-icon-hide; 1228 animation-fill-mode: forwards, forwards; 1229 animation-duration: 500ms, 500ms; 1230 1231 /* To make animation scalable. */ 1232 font-size: calc(1px * var(--ck-image-upload-icon-size)); 1233 1234 /* Hide completed upload icon after 3 seconds. */ 1235 animation-delay: 0ms, 3000ms; 1236 1237 /* 1238 * Use CSS math to simulate container queries. 1239 * https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries/#what-about-showing-and-hiding-things 1240 */ 1241 overflow: hidden; 1242 width: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size)); 1243 height: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size)); 1244 1245 /* This is check icon element made from border-width mixed with animations. */ 1246 &::after { 1247 /* Because of border transformation we need to "hard code" left position. */ 1248 left: 25%; 1249 1250 top: 50%; 1251 opacity: 0; 1252 height: 0; 1253 width: 0; 1254 1255 transform: scaleX(-1) rotate(135deg); 1256 transform-origin: left top; 1257 border-top: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon); 1258 border-right: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon); 1259 1260 animation-name: ck-upload-complete-icon-check; 1261 animation-duration: 500ms; 1262 animation-delay: 500ms; 1263 animation-fill-mode: forwards; 1264 1265 /* #1095. While reset is not providing proper box-sizing for pseudoelements, we need to handle it. */ 1266 box-sizing: border-box; 1267 } 1268 1269 @media (prefers-reduced-motion: reduce) { 1270 animation-duration: 0ms; 1271 1272 &::after { 1273 animation: none; 1274 opacity: 1; 1275 width: 0.3em; 1276 height: 0.45em; 1277 } 1278 } 1279} 1280 1281@keyframes ck-upload-complete-icon-show { 1282 from { 1283 opacity: 0; 1284 } 1285 1286 to { 1287 opacity: 1; 1288 } 1289} 1290 1291@keyframes ck-upload-complete-icon-hide { 1292 from { 1293 opacity: 1; 1294 } 1295 1296 to { 1297 opacity: 0; 1298 } 1299} 1300 1301@keyframes ck-upload-complete-icon-check { 1302 0% { 1303 opacity: 1; 1304 width: 0; 1305 height: 0; 1306 } 1307 33% { 1308 width: 0.3em; 1309 height: 0; 1310 } 1311 100% { 1312 opacity: 1; 1313 width: 0.3em; 1314 height: 0.45em; 1315 } 1316} 1317`],sourceRoot:""}]);const C=w},1559:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,'.ck .ck-upload-placeholder-loader{align-items:center;display:flex;justify-content:center;left:0;position:absolute;top:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px;--ck-upload-placeholder-image-aspect-ratio:2.8}.ck .ck-image-upload-placeholder{margin:0;width:100%}.ck .ck-image-upload-placeholder.image-inline{width:calc(var(--ck-upload-placeholder-loader-size)*2*var(--ck-upload-placeholder-image-aspect-ratio))}.ck .ck-image-upload-placeholder img{aspect-ratio:var(--ck-upload-placeholder-image-aspect-ratio)}.ck .ck-upload-placeholder-loader{height:100%;width:100%}.ck .ck-upload-placeholder-loader:before{animation:ck-upload-placeholder-loader 1s linear infinite;border-radius:50%;border-right:2px solid transparent;border-top:3px solid var(--ck-color-upload-placeholder-loader);height:var(--ck-upload-placeholder-loader-size);width:var(--ck-upload-placeholder-loader-size)}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}',"",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageuploadloader.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadloader.css"],names:[],mappings:"AAKA,kCAGC,kBAAmB,CADnB,YAAa,CAEb,sBAAuB,CAEvB,MAAO,CALP,iBAAkB,CAIlB,KAOD,CAJC,yCACC,UAAW,CACX,iBACD,CCXD,MACC,4CAAqD,CACrD,wCAAyC,CACzC,8CACD,CAEA,iCAGC,QAAS,CADT,UAgBD,CAbC,8CACC,sGACD,CAEA,qCAOC,4DACD,CAGD,kCAEC,WAAY,CADZ,UAWD,CARC,yCAMC,yDAA0D,CAH1D,iBAAkB,CAElB,kCAAmC,CADnC,8DAA+D,CAF/D,+CAAgD,CADhD,8CAMD,CAGD,wCACC,GACC,uBACD,CACD",sourcesContent:[`/* 1318 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1319 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1320 */ 1321 1322.ck .ck-upload-placeholder-loader { 1323 position: absolute;
1324 display: flex; 1325 align-items: center; 1326 justify-content: center; 1327 top: 0; 1328 left: 0; 1329 1330 &::before { 1331 content: ''; 1332 position: relative; 1333 } 1334} 1335`,`/* 1336 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1337 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1338 */ 1339 1340:root { 1341 --ck-color-upload-placeholder-loader: hsl(0, 0%, 70%); 1342 --ck-upload-placeholder-loader-size: 32px; 1343 --ck-upload-placeholder-image-aspect-ratio: 2.8; 1344} 1345 1346.ck .ck-image-upload-placeholder { 1347 /* We need to control the full width of the SVG gray background. */ 1348 width: 100%; 1349 margin: 0; 1350 1351 &.image-inline { 1352 width: calc( 2 * var(--ck-upload-placeholder-loader-size) * var(--ck-upload-placeholder-image-aspect-ratio) ); 1353 } 1354 1355 & img { 1356 /* 1357 * This is an arbitrary aspect for a 1x1 px GIF to display to the user. Not too tall, not too short. 1358 * There's nothing special about this number except that it should make the image placeholder look like 1359 * a real image during this short period after the upload started and before the image was read from the 1360 * file system (and a rich preview was loaded). 1361 */ 1362 aspect-ratio: var(--ck-upload-placeholder-image-aspect-ratio); 1363 } 1364} 1365 1366.ck .ck-upload-placeholder-loader { 1367 width: 100%; 1368 height: 100%; 1369 1370 &::before { 1371 width: var(--ck-upload-placeholder-loader-size); 1372 height: var(--ck-upload-placeholder-loader-size); 1373 border-radius: 50%; 1374 border-top: 3px solid var(--ck-color-upload-placeholder-loader); 1375 border-right: 2px solid transparent; 1376 animation: ck-upload-placeholder-loader 1s linear infinite; 1377 } 1378} 1379 1380@keyframes ck-upload-placeholder-loader { 1381 to { 1382 transform: rotate( 360deg ); 1383 } 1384} 1385`],sourceRoot:""}]);const C=w},2267:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-editor__editable .image,.ck.ck-editor__editable .image-inline{position:relative}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{left:0;position:absolute;top:0}.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}@media (prefers-reduced-motion:reduce){.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:none;opacity:1}}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{background:var(--ck-color-upload-bar-background);height:2px;transition:width .1s;width:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageuploadprogress.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadprogress.css"],names:[],mappings:"AAMC,qEAEC,iBACD,CAGA,uGAIC,MAAO,CAFP,iBAAkB,CAClB,KAED,CCRC,yFACC,oBAMD,CAJC,uCAHD,yFAKE,cAAe,CADf,SAGF,CADC,CAKF,uGAIC,gDAAiD,CAFjD,UAAW,CAGX,oBAAuB,CAFvB,OAGD,CAGD,kBACC,GAAO,SAAY,CACnB,GAAO,SAAY,CACpB",sourcesContent:[`/* 1386 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1387 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1388 */ 1389 1390.ck.ck-editor__editable { 1391 & .image, 1392 & .image-inline { 1393 position: relative; 1394 } 1395 1396 /* Upload progress bar. */ 1397 & .image .ck-progress-bar, 1398 & .image-inline .ck-progress-bar { 1399 position: absolute; 1400 top: 0; 1401 left: 0; 1402 } 1403} 1404`,`/* 1405 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1406 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1407 */ 1408 1409.ck.ck-editor__editable { 1410 & .image, 1411 & .image-inline { 1412 /* Showing animation. */ 1413 &.ck-appear { 1414 animation: fadeIn 700ms; 1415 1416 @media (prefers-reduced-motion: reduce) { 1417 opacity: 1; 1418 animation: none; 1419 } 1420 } 1421 } 1422 1423 /* Upload progress bar. */ 1424 & .image .ck-progress-bar, 1425 & .image-inline .ck-progress-bar { 1426 height: 2px; 1427 width: 0; 1428 background: var(--ck-color-upload-bar-background); 1429 transition: width 100ms; 1430 } 1431} 1432 1433@keyframes fadeIn { 1434 from { opacity: 0; } 1435 to { opacity: 1; } 1436} 1437`],sourceRoot:""}]);const C=w},4062:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/textalternativeform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,6BACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,oDACC,oBACD,
1437CAEA,uCACC,YACD,CCZA,oCDCD,6BAcE,cAUF,CARE,oDACC,eACD,CAEA,wCACC,cACD,CCrBD",sourcesContent:[`/* 1438 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1439 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1440 */ 1441 1442@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"; 1443 1444.ck.ck-text-alternative-form { 1445 display: flex; 1446 flex-direction: row; 1447 flex-wrap: nowrap; 1448 1449 & .ck-labeled-field-view { 1450 display: inline-block; 1451 } 1452 1453 & .ck-label { 1454 display: none; 1455 } 1456 1457 @mixin ck-media-phone { 1458 flex-wrap: wrap; 1459 1460 & .ck-labeled-field-view { 1461 flex-basis: 100%; 1462 } 1463 1464 & .ck-button { 1465 flex-basis: 50%; 1466 } 1467 } 1468} 1469`,`/* 1470 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1471 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1472 */ 1473 1474@define-mixin ck-media-phone { 1475 @media screen and (max-width: 600px) { 1476 @mixin-content; 1477 } 1478} 1479`],sourceRoot:""}]);const C=w},7719:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/link.css"],names:[],mappings:"AAMA,sBACC,mDAMD,CAHC,wCACC,yFACD,CAOD,4BACC,8CACD,CAGA,sCAEC,gDAAiD,CADjD,WAAY,CAEZ,iBAAkB,CAClB,oCACD",sourcesContent:[`/* 1480 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1481 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1482 */ 1483 1484/* Class added to span element surrounding currently selected link. */ 1485.ck .ck-link_selected { 1486 background: var(--ck-color-link-selected-background); 1487 1488 /* Give linked inline images some outline to let the user know they are also part of the link. */ 1489 & span.image-inline { 1490 outline: var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background); 1491 } 1492} 1493 1494/* 1495 * Classes used by the "fake visual selection" displayed in the content when an input 1496 * in the link UI has focus (the browser does not render the native selection in this state). 1497 */ 1498.ck .ck-fake-link-selection { 1499 background: var(--ck-color-link-fake-selection); 1500} 1501 1502/* A collapsed fake visual selection. */ 1503.ck .ck-fake-link-selection_collapsed { 1504 height: 100%; 1505 border-right: 1px solid var(--ck-color-base-text); 1506 margin-right: -1px; 1507 outline: solid 1px hsla(0, 0%, 100%, .5); 1508} 1509`],sourceRoot:""}]);const C=w},8762:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{color:var(--ck-color-link-default);cursor:pointer;max-width:var(--ck-input-width);min-width:3em;padding:0 var(--ck-spacing-medium);text-align:center;text-overflow:ellipsis}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{max-width:100%;min-width:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}","",{version:3,sources:["webpack://./../ckeditor5-link/theme/linkactions.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/linkactions.css"],names:[],mappings:"AAOA,oBACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,8CACC,oBAKD,CAHC,gEACC,eACD,CCXD,oCDCD,oBAcE,cAUF,CARE,8CACC,eACD,CAEA,8DACC,cACD,CCrBD,CCIA,wDACC,cAAe,CACf,eAmCD,CAjCC,0EAEC,kCAAmC,CAEnC,cAAe,CAIf,+BAAgC,CAChC,aAAc,CARd,kCAAmC,CASnC,iBAAkB,CAPlB,sBAYD,CAHC,gFACC,yBACD,CAGD,mPAIC,eACD,CAEA,+DACC,eACD,CAGC,gFACC,yBACD,CAWD,qHACC,sCACD,CDtDD,oCC0DC,wDACC,8DAMD,CAJC,0EAEC,cAAe,CADf,WAED,CAGD,gJAME,aAEF,CDzED",sourcesContent:[`/* 1510 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1511 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1512 */ 1513 1514@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"; 1515 1516.ck.ck-link-actions { 1517 display: flex; 1518 flex-direction: row; 1519 flex-wrap: nowrap; 1520 1521 & .ck-link-actions__preview { 1522 display: inline-block; 1523 1524 & .ck-button__label { 1525 overflow: hidden; 1526 } 1527 } 1528 1529 @mixin ck-media-phone { 1530 flex-wrap: wrap; 1531 1532 & .ck-link-actions__preview { 1533 flex-basis: 100%; 1534 } 1535 1536 & .ck-button:not(.ck-link-actions__preview) { 1537 flex-basis: 50%; 1538 } 1539 } 1540} 1541`,`/* 1542 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1543 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1544 */ 1545 1546@define-mixin ck-media-phone { 1547 @media screen and (max-width: 600px) { 1548 @mixin-content; 1549 } 1550} 1551`,`/* 1552 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1553 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1554 */ 1555 1556@import "@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css"; 1557@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 1558@import "../mixins/_focus.css"; 1559@import "../mixins/_shadow.css"; 1560@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"; 1561 1562.ck.ck-link-actions { 1563 & .ck-button.ck-link-actions__preview { 1564 padding-left: 0; 1565 padding-right: 0; 1566 1567 & .ck-button__label { 1568 padding: 0 var(--ck-spacing-medium); 1569 color: var(--ck-color-link-default); 1570 text-overflow: ellipsis; 1571 cursor: pointer; 1572 1573 /* Match the box model of the link editor form's input so the balloon 1574 does not change width when moving between actions and the form. */ 1575 max-width: var(--ck-input-width); 1576 min-width: 3em; 1577 text-align: center; 1578 1579 &:hover { 1580 text-decoration: underline; 1581 } 1582 } 1583 1584 &, 1585 &:hover, 1586 &:focus, 1587 &:active { 1588 background: none; 1589 } 1590 1591 &:active { 1592 box-shadow: none; 1593 } 1594 1595 &:focus { 1596 & .ck-button__label { 1597 text-decoration: underline; 1598 } 1599 } 1600 } 1601 1602 @mixin ck-dir ltr { 1603 & .ck-button:not(:first-child) { 1604 margin-left: var(--ck-spacing-standard); 1605 } 1606 } 1607 1608 @mixin ck-dir rtl { 1609 & .ck-button:not(:last-child) { 1610 margin-left: var(--ck-spacing-standard); 1611 } 1612 } 1613 1614 @mixin ck-media-phone { 1615 & .ck-button.ck-link-actions__preview { 1616 margin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0; 1617 1618 & .ck-button__label { 1619 min-width: 0; 1620 max-width: 100%; 1621 } 1622 } 1623 1624 & .ck-button:not(.ck-link-actions__preview) { 1625 @mixin ck-dir ltr { 1626 margin-left: 0; 1627 } 1628 1629 @mixin ck-dir rtl { 1630 margin-left: 0; 1631 } 1632 } 1633 } 1634} 1635`],sourceRoot:""}]);const C=w},3817:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-link-form{align-items:flex-start;display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{min-width:var(--ck-input-width);padding:0}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical>.ck-button{border-radius:0;margin:0;padding:var(--ck-spacing-standard);width:50%}.ck.ck-link-form_layout-vertical>.ck-button:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form_layout-vertical>.ck-button,[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}","",{version:3,sources:["webpack://./../ckeditor5-link/theme/linkform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/linkform.css"],names:[],mappings:"AAOA,iBAEC,sBAAuB,CADvB,YAkBD,CAfC,2BACC,YACD,CCPA,oCDCD,iBASE,cAUF,CARE,wCACC,eACD,CAEA,4BACC,cACD,CChBD,CDwBD,iCACC,aAYD,CALE,wHAEC,mCACD,CEhCF,iCAEC,+BAAgC,CADhC,SAgDD,CA7CC,wDACC,8EAMD,CAJC,uEACC,WAAY,CACZ,UACD,CAGD,4CAIC,eAAgB,CAFhB,QAAS,CADT,kCAAmC,CAEnC,SAkBD,CAfC,wDACC,gDACD,CARD,4GAeE,aAMF,CAJE,mEACC,kDACD,CAKF,6CACC,yDAUD,CARC,wEACC,SAAU,CACV,UAKD,CAHC,8EACC,eACD",sourcesContent:[`/* 1636 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1637 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1638 */ 1639 1640@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"; 1641 1642.ck.ck-link-form { 1643 display: flex; 1644 align-items: flex-start; 1645 1646 & .ck-label { 1647 display: none; 1648 } 1649 1650 @mixin ck-media-phone { 1651 flex-wrap: wrap; 1652 1653 & .ck-labeled-field-view { 1654 flex-basis: 100%; 1655 } 1656 1657 & .ck-button { 1658 flex-basis: 50%; 1659 } 1660 } 1661} 1662 1663/* 1664 * Style link form differently when manual decorators are available. 1665 * See: https://github.com/ckeditor/ckeditor5-link/issues/186. 1666 */ 1667.ck.ck-link-form_layout-vertical { 1668 display: block; 1669 1670 /* 1671 * Whether the form is in the responsive mode or not, if there are decorator buttons 1672 * keep the top margin of action buttons medium. 1673 */ 1674 & .ck-button { 1675 &.ck-button-save, 1676 &.ck-button-cancel { 1677 margin-top: var(--ck-spacing-medium); 1678 } 1679 } 1680} 1681`,`/* 1682 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1683 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1684 */ 1685 1686@define-mixin ck-media-phone { 1687 @media screen and (max-width: 600px) { 1688 @mixin-content; 1689 } 1690} 1691`,`/* 1692 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1693 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1694 */ 1695 1696@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 1697 1698/* 1699 * Style link form differently when manual decorators are available. 1700 * See: https://github.com/ckeditor/ckeditor5-link/issues/186. 1701 */ 1702.ck.ck-link-form_layout-vertical { 1703 padding: 0; 1704 min-width: var(--ck-input-width); 1705 1706 & .ck-labeled-field-view { 1707 margin: var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small); 1708 1709 & .ck-input-text { 1710 min-width: 0; 1711 width: 100%; 1712 } 1713 } 1714 1715 & > .ck-button { 1716 padding: var(--ck-spacing-standard); 1717 margin: 0; 1718 width: 50%; 1719 border-radius: 0; 1720 1721 &:not(:focus) { 1722 border-top: 1px solid var(--ck-color-base-border); 1723 } 1724 1725 @mixin ck-dir ltr { 1726 margin-left: 0; 1727 } 1728 1729 @mixin ck-dir rtl { 1730 margin-left: 0; 1731 1732 &:last-of-type { 1733 border-right: 1px solid var(--ck-color-base-border); 1734 } 1735 } 1736 } 1737 1738 /* Using additional \`.ck\` class for stronger CSS specificity than \`.ck.ck-link-form > :not(:first-child)\`. */ 1739 & .ck.ck-list { 1740 margin: var(--ck-spacing-standard) var(--ck-spacing-large); 1741 1742 & .ck-button.ck-switchbutton { 1743 padding: 0; 1744 width: 100%; 1745 1746 &:hover { 1747 background: none; 1748 } 1749 } 1750 } 1751} 1752`],sourceRoot:""}]);const C=w},4808:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,'.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{display:block;position:absolute}:root{--ck-link-image-indicator-icon-size:20;--ck-link-image-indicator-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{background-color:rgba(0,0,0,.4);background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzUuNzUgMCAwIDEtLjIxNy4yMDYgNS4yNTEgNS4yNTEgMCAwIDEtOC41MDMtNS45NTUuNy43IDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NHptNS40OTQtNS4zMzVhLjc1Ljc1IDAgMCAxLS4xMi4yNzRsLTEuMTQ3IDEuNjM5YS43NS43NSAwIDEgMS0xLjIyOC0uODZsLjg2LTEuMjNhMy43NSAzLjc1IDAgMCAwLTYuMTQ0LTQuMzAxbC0uODYgMS4yMjlhLjc1Ljc1IDAgMCAxLTEuMjI5LS44NmwxLjE0OC0xLjY0YS43NS43NSAwIDAgMSAuMjE3LS4yMDYgNS4yNTEgNS4yNTEgMCAwIDEgOC41MDMgNS45NTVtLTQuNTYzLTIuNTMyYS43NS43NSAwIDAgMSAuMTg0IDEuMDQ1bC0zLjE1NSA0LjUwNWEuNzUuNzUgMCAxIDEtMS4yMjktLjg2bDMuMTU1LTQuNTA2YS43NS43NSAwIDAgMSAxLjA0NS0uMTg0Ii8+PC9zdmc+");background-position:50%;background-repeat:no-repeat;background-size:14px;border-radius:100%;content:"";height:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size));overflow:hidden;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);width:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size))}',"",{version:3,sources:["webpack://./../ckeditor5-link/theme/linkimage.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/linkimage.css"],names:[],mappings:"AASE,+FACC,aAAc,CACd,iBACD,CCPF,MAEC,sCAAuC,
1752CACvC,oEACD,CAME,+FAUC,+BAAqC,CACrC,k2BAA+3B,CAG/3B,uBAA2B,CAD3B,2BAA4B,CAD5B,oBAAqB,CAGrB,kBAAmB,CAdnB,UAAW,CAsBX,oGAAuG,CAFvG,eAAgB,CAbhB,sCAAwC,CADxC,oCAAsC,CAetC,mGAED",sourcesContent:[`/* 1753 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1754 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1755 */ 1756 1757.ck.ck-editor__editable { 1758 /* Linked image indicator */ 1759 & figure.image > a, 1760 & a span.image-inline { 1761 &::after { 1762 display: block; 1763 position: absolute; 1764 } 1765 } 1766} 1767 1768`,`/* 1769 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1770 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1771 */ 1772 1773:root { 1774 /* Match the icon size with the upload indicator brought by the image upload feature. */ 1775 --ck-link-image-indicator-icon-size: 20; 1776 --ck-link-image-indicator-icon-is-visible: clamp(0px, 100% - 50px, 1px); 1777} 1778 1779.ck.ck-editor__editable { 1780 /* Linked image indicator */ 1781 & figure.image > a, 1782 & a span.image-inline { 1783 &::after {
1784 content: ""; 1785 1786 /* 1787 * Smaller images should have the icon closer to the border. 1788 * Match the icon position with the upload indicator brought by the image upload feature. 1789 */ 1790 top: min(var(--ck-spacing-medium), 6%); 1791 right: min(var(--ck-spacing-medium), 6%); 1792 1793 background-color: hsla(0, 0%, 0%, .4); 1794 background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+"); 1795 background-size: 14px; 1796 background-repeat: no-repeat; 1797 background-position: center; 1798 border-radius: 100%; 1799 1800 /* 1801 * Use CSS math to simulate container queries. 1802 * https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries/#what-about-showing-and-hiding-things 1803 */ 1804 overflow: hidden; 1805 width: calc(var(--ck-link-image-indicator-icon-is-visible) * var(--ck-link-image-indicator-icon-size)); 1806 height: calc(var(--ck-link-image-indicator-icon-is-visible) * var(--ck-link-image-indicator-icon-size)); 1807 } 1808 } 1809} 1810 1811`],sourceRoot:""}]);const C=w},1232:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck-editor__editable .ck-list-bogus-paragraph{display:block}","",{version:3,sources:["webpack://./../ckeditor5-list/theme/documentlist.css"],names:[],mappings:"AAKA,8CACC,aACD",sourcesContent:[`/* 1812 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1813 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1814 */ 1815 1816.ck-editor__editable .ck-list-bogus-paragraph { 1817 display: block; 1818} 1819`],sourceRoot:""}]);const C=w},6903:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck-content ol{list-style-type:decimal}.ck-content ol ol{list-style-type:lower-latin}.ck-content ol ol ol{list-style-type:lower-roman}.ck-content ol ol ol ol{list-style-type:upper-latin}.ck-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content ul{list-style-type:disc}.ck-content ul ul{list-style-type:circle}.ck-content ul ul ul,.ck-content ul ul ul ul{list-style-type:square}","",{version:3,sources:["webpack://./../ckeditor5-list/theme/list.css"],names:[],mappings:"AAKA,eACC,uBAiBD,CAfC,kBACC,2BAaD,CAXC,qBACC,2BASD,CAPC,wBACC,2BAKD,CAHC,2BACC,2BACD,CAMJ,eACC,oBAaD,CAXC,kBACC,sBASD,CAJE,6CACC,sBACD",sourcesContent:[`/* 1820 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1821 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1822 */ 1823 1824.ck-content ol { 1825 list-style-type: decimal; 1826 1827 & ol { 1828 list-style-type: lower-latin; 1829 1830 & ol { 1831 list-style-type: lower-roman; 1832 1833 & ol { 1834 list-style-type: upper-latin; 1835 1836 & ol { 1837 list-style-type: upper-roman; 1838 } 1839 } 1840 } 1841 } 1842} 1843 1844.ck-content ul { 1845 list-style-type: disc; 1846 1847 & ul { 1848 list-style-type: circle; 1849 1850 & ul { 1851 list-style-type: square; 1852 1853 & ul { 1854 list-style-type: square; 1855 } 1856 } 1857 } 1858} 1859`],sourceRoot:""}]);const C=w},9968:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-list-properties.ck-list-properties_without-styles{padding:var(--ck-spacing-large)}.ck.ck-list-properties.ck-list-properties_without-styles>*{min-width:14em}.ck.ck-list-properties.ck-list-properties_without-styles>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-list-styles-list{grid-template-columns:repeat(4,auto)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*{width:100%}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties .ck.ck-numbered-list-properties__start-index .ck-input{min-width:auto;width:100%}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order{background:transparent;margin-bottom:calc(var(--ck-spacing-tiny)*-1);padding-left:0;padding-right:0}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:active,.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:hover{background:none;border-color:transparent;box-shadow:none}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-list/listproperties.css"],names:[],mappings:"AAOC,yDACC,+BASD,CAPC,2DACC,cAKD,CAHC,6DACC,qCACD,CASD,wFACC,oCACD,CAGA,mFACC,gDAWD,CARE,+GACC,UAKD,CAHC,iHACC,qCACD,CAMJ,8EACC,cAAe,CACf,UACD,CAEA,uEACC,sBAAuB,CAGvB,6CAAgD,CAFhD,cAAe,CACf,eAQD,CALC,2JAGC,eAAgB,CADhB,wBAAyB,CADzB,eAGD",sourcesContent:[`/* 1860 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1861 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1862 */ 1863
1864.ck.ck-list-properties { 1865 /* When there are no list styles and there is no collapsible. */ 1866 &.ck-list-properties_without-styles { 1867 padding: var(--ck-spacing-large); 1868 1869 & > * { 1870 min-width: 14em; 1871 1872 & + * { 1873 margin-top: var(--ck-spacing-standard); 1874 } 1875 } 1876 } 1877 1878 /* 1879 * When the numbered list property fields (start at, reversed) should be displayed, 1880 * more horizontal space is needed. Reconfigure the style grid to create that space. 1881 */ 1882 &.ck-list-properties_with-numbered-properties { 1883 & > .ck-list-styles-list { 1884 grid-template-columns: repeat( 4, auto ); 1885 } 1886 1887 /* When list styles are rendered and property fields are in a collapsible. */ 1888 & > .ck-collapsible { 1889 border-top: 1px solid var(--ck-color-base-border); 1890 1891 & > .ck-collapsible__children { 1892 & > * { 1893 width: 100%; 1894 1895 & + * { 1896 margin-top: var(--ck-spacing-standard); 1897 } 1898 } 1899 } 1900 } 1901 } 1902 1903 & .ck.ck-numbered-list-properties__start-index .ck-input { 1904 min-width: auto; 1905 width: 100%; 1906 } 1907 1908 & .ck.ck-numbered-list-properties__reversed-order { 1909 background: transparent; 1910 padding-left: 0; 1911 padding-right: 0; 1912 margin-bottom: calc(-1 * var(--ck-spacing-tiny)); 1913 1914 &:active, &:hover { 1915 box-shadow: none; 1916 border-color: transparent; 1917 background: none; 1918 } 1919 } 1920} 1921`],sourceRoot:""}]);const C=w},7141:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-list-styles-list{display:grid}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-list{column-gap:var(--ck-spacing-medium);grid-template-columns:repeat(3,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-list-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-list-styles-list .ck-button,.ck.ck-list-styles-list .ck-button .ck-icon{height:var(--ck-list-style-button-size);width:var(--ck-list-style-button-size)}","",{version:3,sources:["webpack://./../ckeditor5-list/theme/liststyles.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-list/liststyles.css"],names:[],mappings:"AAKA,wBACC,YACD,CCFA,MACC,gCACD,CAEA,wBAGC,mCAAoC,CAFpC,oCAAwC,CAGxC,+BAAgC,CAFhC,gCA4BD,CAxBC,mCAiBC,sBAAuB,CAPvB,QAAS,CANT,SAmBD,CAJC,+EAhBA,uCAAwC,CADxC,sCAoBA",sourcesContent:[`/* 1922 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1923 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1924 */ 1925 1926.ck.ck-list-styles-list { 1927 display: grid; 1928} 1929`,`/* 1930 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1931 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1932 */ 1933 1934:root { 1935 --ck-list-style-button-size: 44px; 1936} 1937 1938.ck.ck-list-styles-list { 1939 grid-template-columns: repeat( 3, auto ); 1940 row-gap: var(--ck-spacing-medium); 1941 column-gap: var(--ck-spacing-medium); 1942 padding: var(--ck-spacing-large); 1943 1944 & .ck-button { 1945 /* Make the button look like a thumbnail (the icon "takes it all"). */ 1946 width: var(--ck-list-style-button-size); 1947 height: var(--ck-list-style-button-size); 1948 padding: 0; 1949 1950 /* 1951 * Buttons are aligned by the grid so disable default button margins to not collide with the 1952 * gaps in the grid. 1953 */ 1954 margin: 0; 1955 1956 /* 1957 * Make sure the button border (which is displayed on focus, BTW) does not steal pixels 1958 * from the button dimensions and, as a result, decrease the size of the icon 1959 * (which becomes blurry as it scales down). 1960 */ 1961 box-sizing: content-box; 1962 1963 & .ck-icon { 1964 width: var(--ck-list-style-button-size); 1965 height: var(--ck-list-style-button-size); 1966 } 1967 } 1968} 1969`],sourceRoot:""}]);const C=w},8991:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,':root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px;position:relative}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-todo-list-checkmark-size)}.ck-content[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-content .todo-list .todo-list__label>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;
1969transition:box-shadow .25s ease-in-out;width:100%}@media (prefers-reduced-motion:reduce){.ck-content .todo-list .todo-list__label>input:before{transition:none}}.ck-content .todo-list .todo-list__label>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-todo-list-checkmark-size)/8) calc(var(--ck-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-todo-list-checkmark-size)/2.6);left:calc(var(--ck-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-todo-list-checkmark-size)/5.3)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type=checkbox]{position:absolute}.ck-editor__editable.ck-content .todo-list .todo-list__label>input,.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input{cursor:pointer}.ck-editor__editable.ck-content .todo-list .todo-list__label>input:hover:before,.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-todo-list-checkmark-size)}.ck-editor__editable.ck-content[dir=rtl] .todo-list .todo-list__label>span[contenteditable=false]>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out;width:100%}@media (prefers-reduced-motion:reduce){.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:before{transition:none}}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-todo-list-checkmark-size)/8) calc(var(--ck-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-todo-list-checkmark-size)/2.6);left:calc(var(--ck-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-todo-list-checkmark-size)/5.3)}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input[checked]:after{border-color:#fff}.ck-editor__editable.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type=checkbox]{position:absolute}',"",{version:3,sources:["webpack://./../ckeditor5-list/theme/todolist.css"],names:[],mappings:"AAKA,MACC,kCACD,CA4EA,uBACC,eAwBD,CAtBC,0BAEC,iBAAkB,CADlB,iBAMD,CAHC,qCACC,cACD,CAIA,+CAtFD,uBAAwB,CAQxB,QAAS,CAPT,oBAAqB,CAGrB,yCAA0C,CAO1C,UAAW,CAGX,aAAc,CAFd,kBAAmB,CAVnB,iBAAkB,CAWlB,OAAQ,CARR,qBAAsB,CAFtB,wCAqFC,CAFA,wDApEA,MAAO,CAGP,iBAAkB,CAFlB,cAAe,CACf,WAoEA,CAhED,sDAOC,qBAAiC,CACjC,iBAAkB,CALlB,qBAAsB,CACtB,UAAW,CAHX,aAAc,CAKd,WAAY,CAJZ,iBAAkB,CAOlB,sCAAwC,CAJxC,UASD,CAHC,uCAXD,sDAYE,eAEF,CADC,CAGD,qDAaC,wBAAyB,CADzB,kBAAmB,CAEnB,sGAA+G,CAX/G,sBAAuB,CAEvB,UAAW,CAJX,aAAc,CAUd,mDAAwD,CAHxD,+CAAoD,CAJpD,mBAAoB,CAFpB,iBAAkB,CAOlB,gDAAqD,CAMrD,uBAAwB,CALxB,kDAMD,CAGC,+DACC,kBAA8B,CAC9B,oBACD,CAEA,8DACC,iBACD,CAwBA,wEACC,qBACD,CAEA,mGACC,iBACD,CAYD,kKAEC,cAKD,CAHC,4LACC,mCACD,CAMD,+FAxHA,uBAAwB,CAQx
1969B,QAAS,CAPT,oBAAqB,CAGrB,yCAA0C,CAO1C,UAAW,CAGX,aAAc,CAFd,kBAAmB,CAVnB,iBAAkB,CAWlB,OAAQ,CARR,qBAAsB,CAFtB,wCAuHA,CAFA,wGAtGC,MAAO,CAGP,iBAAkB,CAFlB,cAAe,CACf,WAsGD,CAlGA,sGAOC,qBAAiC,CACjC,iBAAkB,CALlB,qBAAsB,CACtB,UAAW,CAHX,aAAc,CAKd,WAAY,CAJZ,iBAAkB,CAOlB,sCAAwC,CAJxC,UASD,CAHC,uCAXD,sGAYE,eAEF,CADC,CAGD,qGAaC,wBAAyB,CADzB,kBAAmB,CAEnB,sGAA+G,CAX/G,sBAAuB,CAEvB,UAAW,CAJX,aAAc,CAUd,mDAAwD,CAHxD,+CAAoD,CAJpD,mBAAoB,CAFpB,iBAAkB,CAOlB,gDAAqD,CAMrD,uBAAwB,CALxB,kDAMD,CAGC,+GACC,kBAA8B,CAC9B,oBACD,CAEA,8GACC,iBACD,CA2DA,uHACC,iBACD",sourcesContent:[`/* 1970 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 1971 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 1972 */ 1973 1974:root { 1975 --ck-todo-list-checkmark-size: 16px; 1976} 1977 1978@define-mixin todo-list-checkbox { 1979 -webkit-appearance: none; 1980 display: inline-block; 1981 position: relative; 1982 width: var(--ck-todo-list-checkmark-size); 1983 height: var(--ck-todo-list-checkmark-size); 1984 vertical-align: middle; 1985 1986 /* Needed on iOS */ 1987 border: 0; 1988 1989 /* LTR styles */ 1990 left: -25px; 1991 margin-right: -15px; 1992 right: 0; 1993 margin-left: 0; 1994 1995 /* RTL styles */ 1996 @nest [dir=rtl]& { 1997 left: 0; 1998 margin-right: 0; 1999 right: -25px; 2000 margin-left: -15px; 2001 } 2002 2003 &::before { 2004 display: block; 2005 position: absolute; 2006 box-sizing: border-box; 2007 content: ''; 2008 width: 100%; 2009 height: 100%; 2010 border: 1px solid hsl(0, 0%, 20%); 2011 border-radius: 2px; 2012 transition: 250ms ease-in-out box-shadow; 2013 2014 @media (prefers-reduced-motion: reduce) { 2015 transition: none; 2016 } 2017 } 2018 2019 &::after { 2020 display: block; 2021 position: absolute; 2022 box-sizing: content-box; 2023 pointer-events: none; 2024 content: ''; 2025 2026 /* Calculate tick position, size and border-width proportional to the checkmark size. */ 2027 left: calc( var(--ck-todo-list-checkmark-size) / 3 ); 2028 top: calc( var(--ck-todo-list-checkmark-size) / 5.3 ); 2029 width: calc( var(--ck-todo-list-checkmark-size) / 5.3 ); 2030 height: calc( var(--ck-todo-list-checkmark-size) / 2.6 ); 2031 border-style: solid; 2032 border-color: transparent; 2033 border-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0; 2034 transform: rotate(45deg); 2035 } 2036 2037 &[checked] { 2038 &::before { 2039 background: hsl(126, 64%, 41%); 2040 border-color: hsl(126, 64%, 41%); 2041 } 2042 2043 &::after { 2044 border-color: hsl(0, 0%, 100%); 2045 } 2046 } 2047} 2048 2049/* 2050 * To-do list content styles. 2051 */ 2052.ck-content .todo-list { 2053 list-style: none; 2054 2055 & li { 2056 position: relative; 2057 margin-bottom: 5px; 2058 2059 & .todo-list { 2060 margin-top: 5px; 2061 } 2062 } 2063 2064 & .todo-list__label { 2065 & > input { 2066 @mixin todo-list-checkbox; 2067 } 2068 2069 & .todo-list__label__description { 2070 vertical-align: middle; 2071 } 2072 2073 &.todo-list__label_without-description input[type=checkbox] { 2074 position: absolute; 2075 } 2076 } 2077} 2078 2079/* 2080 * To-do list editing view styles. 2081 */ 2082.ck-editor__editable.ck-content .todo-list .todo-list__label { 2083 /* 2084 * To-do list should be interactive only during the editing 2085 * (https://github.com/ckeditor/ckeditor5/issues/2090). 2086 */ 2087 & > input, 2088 & > span[contenteditable=false] > input { 2089 cursor: pointer; 2090 2091 &:hover::before { 2092 box-shadow: 0 0 0 5px hsla(0, 0%, 0%, 0.1); 2093 } 2094 } 2095 2096 /* 2097 * Document Lists - editing view has an additional span around checkbox. 2098 */ 2099 & > span[contenteditable=false] > input { 2100 @mixin todo-list-checkbox; 2101 } 2102 2103 &.todo-list__label_without-description { 2104 & input[type=checkbox] { 2105 position: absolute; 2106 } 2107 } 2108} 2109`],sourceRoot:""}]);const C=w},70:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck-content .media{clear:both;display:block;margin:.9em 0;min-width:15em}","",{version:3,sources:["webpack://./../ckeditor5-media-embed/theme/mediaembed.css"],names:[],mappings:"AAKA,mBAGC,UAAW,CASX,aAAc,CAJd,aAAe,CAQf,cACD",sourcesContent:[`/* 2110 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2111 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2112 */ 2113 2114.ck-content .media { 2115 /* Don't allow floated content overlap the media. 2116 https://github.com/ckeditor/ckeditor5-media-embed/issues/53 */ 2117 clear: both; 2118 2119 /* Make sure there is some space between the content and the media. */ 2120 /* The first value should be equal to --ck-spacing-large variable if used in the editor context 2121 to avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */ 2122 margin: 0.9em 0; 2123 2124 /* Make sure media is not overriden with Bootstrap default \`flex\` value. 2125 See: https://github.com/ckeditor/ckeditor5/issues/1373. */ 2126 display: block; 2127 2128 /* Give the media some minimal width in the content to prevent them
2129 from being "squashed" in tight spaces, e.g. in table cells (#44) */ 2130 min-width: 15em; 2131} 2132`],sourceRoot:""}]);const C=w},7048:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,'.ck-media__wrapper .ck-media__placeholder{align-items:center;display:flex;flex-direction:column}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{display:block;overflow:hidden}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder),.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}:root{--ck-media-embed-placeholder-icon-size:3em;--ck-color-media-embed-placeholder-url-text:#757575;--ck-color-media-embed-placeholder-url-text-hover:var(--ck-color-base-text)}.ck-media__wrapper{margin:0 auto}.ck-media__wrapper .ck-media__placeholder{background:var(--ck-color-base-foreground);padding:calc(var(--ck-spacing-standard)*3)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon{background-position:50%;background-size:cover;height:var(--ck-media-embed-placeholder-icon-size);margin-bottom:var(--ck-spacing-large);min-width:var(--ck-media-embed-placeholder-icon-size)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon .ck-icon{height:100%;width:100%}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text{color:var(--ck-color-media-embed-placeholder-url-text);font-style:italic;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:var(--ck-color-media-embed-placeholder-url-text-hover);cursor:pointer;text-decoration:underline}.ck-media__wrapper[data-oembed-url*="open.spotify.com"]{max-height:380px;max-width:300px}.ck-media__wrapper[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSlzY2FsZSguOTgwMTIpIj48cmVjdCB3aWR0aD0iNjAuMDk5IiBoZWlnaHQ9IjYwLjA5OSIgeD0iMTc2LjAzMSIgeT0iMjMxLjM5OSIgZmlsbD0iIzM0YTY2OCIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiIHJ4PSI1LjIzOCIgcnk9IjUuMjM4Ii8+PHBhdGggZmlsbD0iIzVjODhjNSIgZD0ibTIwNi40NzcgMjYwLjktMjguOTg3IDI4Ljk4N2E1LjIyIDUuMjIgMCAwIDAgMy43OCAxLjYxaDQ5LjYyMWMxLjY5NCAwIDMuMTktLjc5OCA0LjE0Ni0yLjAzN3oiLz48cGF0aCBmaWxsPSIjZGQ0YjNlIiBkPSJNMjI2Ljc0MiAyMjIuOTg4Yy05LjI2NiAwLTE2Ljc3NyA3LjE3LTE2Ljc3NyAxNi4wMTQuMDA3IDIuNzYyLjY2MyA1LjQ3NCAyLjA5MyA3Ljg3NS40My43MDMuODMgMS40MDggMS4xOSAyLjEwN3EuNS43NTMuOTUgMS41MDguNTE1LjcxNS45ODggMS40NGMxLjMxIDEuNzY5IDIuNSAzLjUwMiAzLjYzNyA1LjE2OC43OTMgMS4yNzUgMS42ODMgMi42NCAyLjQ2NiAzLjk5IDIuMzYzIDQuMDk0IDQuMDA3IDguMDkyIDQuNiAxMy45MTR2LjAxMmMuMTgyLjQxMi41MTYuNjY2Ljg3OS42NjcuNDAzLS4wMDEuNzY4LS4zMTQuOTMtLjc5OS42MDMtNS43NTYgMi4yMzgtOS43MjkgNC41ODUtMTMuNzk0Ljc4Mi0xLjM1IDEuNjczLTIuNzE1IDIuNDY1LTMuOTkgMS4xMzctMS42NjYgMi4zMjgtMy40IDMuNjM4LTUuMTY5cS40NzMtLjcyMy45ODgtMS40MzkuNDUtLjc1NS45NS0xLjUwOGMuMzU5LS43Ljc2LTEuNDA0IDEuMTktMi4xMDcgMS40MjYtMi40MDIgMi01LjExNCAyLjAwNC03Ljg3NSAwLTguODQ0LTcuNTExLTE2LjAxNC0xNi43NzYtMTYuMDE0IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxlbGxpcHNlIGN4PSIyMjYuNzQyIiBjeT0iMjM5LjAwMiIgZmlsbD0iIzgwMmQyNyIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiIHJ4PSI1LjgyOCIgcnk9IjUuNTY0Ii8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE5MC4zMDEgMjM3LjI4M2MtNC42NyAwLTguNDU3IDMuODUzLTguNDU3IDguNjA2czMuNzg2IDguNjA3IDguNDU3IDguNjA3YzMuMDQzIDAgNC44MDYtLjk1OCA2LjMzNy0yLjUxNiAxLjUzLTEuNTU3IDIuMDg3LTMuOTEzIDIuMDg3LTYuMjlxLS4wMDEtLjU0My0uMDY0LTEuMDc5aC04LjI1N3YzLjA0M2g0Ljg1Yy0uMTk3Ljc1OS0uNTMxIDEuNDUtMS4wNTggMS45ODYtLjk0Mi45NTgtMi4wMjggMS41NDgtMy45MDEgMS41NDgtMi44NzYgMC01LjIwOC0yLjM3Mi01LjIwOC01LjI5OSAwLTIuOTI2IDIuMzMyLTUuMjk5IDUuMjA4LTUuMjk5IDEuMzk5IDAgMi42MTguNDA3IDMuNTg0IDEuMjkzbDIuMzgxLTIuMzhxLS4wMDEtLjAwMy0uMDA0LS4wMDVjLTEuNTg4LTEuNTI0LTMuNjItMi4yMTUtNS45NTUtMi4yMTVtNC40MyA1LjY2LjAwMy4wMDZ2LS4wMDN6IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGZpbGw9IiNjM2MzYzMiIGQ9Im0yMTUuMTg0IDI1MS45MjktNy45OCA3Ljk3OSAyOC40NzcgMjguNDc1YTUuMiA1LjIgMCAwIDAgLjQ0OS0yLjEyM3YtMzEuMTY1Yy0uNDY5LjY3NS0uOTM0IDEuMzQ5LTEuMzgyIDIuMDA1LS43OTIgMS4yNzUtMS42ODIgMi42NC0yLjQ2NSAzLjk5LTIuMzQ3IDQuMDY1LTMuOTgyIDguMDM4LTQuNTg1IDEzLjc5NC0uMTYyLjQ4NS0uNTI3Ljc5OC0uOTMuNzk5LS4zNjMtLjAwMS0uNjk3LS4yNTUtLjg3OS0uNjY3di0uMDEyYy0uNTkzLTUuODIyLTIuMjM3LTkuODItNC42LTEzLjkxNC0uNzgzLTEuMzUtMS42NzMtMi43MTUtMi40NjYtMy45OS0xLjEzNy0xLjY2Ni0yLjMyNy0zLjQtMy42MzctNS4xNjl6Ii8+PHBhdGggZmlsbD0iI2ZkZGM0ZiIgZD0ibTIxMi45ODMgMjQ4LjQ5NS0zNi45NTIgMzYuOTUzdi44MTJhNS4yMjcgNS4yMjcgMCAwIDAgNS4yMzggNS4y
2132MzhoMS4wMTVsMzUuNjY2LTM1LjY2NmExMzYgMTM2IDAgMCAwLTIuNzY0LTMuOSAzOCAzOCAwIDAgMC0uOTg5LTEuNDQgMzUgMzUgMCAwIDAtLjk1LTEuNTA4Yy0uMDgzLS4xNjItLjE3Ni0uMzI2LS4yNjQtLjQ4OSIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBmaWxsPSIjZmZmIiBkPSJtMjExLjk5OCAyNjEuMDgzLTYuMTUyIDYuMTUxIDI0LjI2NCAyNC4yNjRoLjc4MWE1LjIyNyA1LjIyNyAwIDAgMCA1LjIzOS01LjIzOHYtMS4wNDV6IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjwvZz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder{background:#4268b3}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDI0IiBoZWlnaHQ9IjEwMjQiPjxwYXRoIGZpbGw9IiNGRkZGRkUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTk2Ny40ODQgMEg1Ni41MTdDMjUuMzA0IDAgMCAyNS4zMDQgMCA1Ni41MTd2OTEwLjk2NkMwIDk5OC42OTQgMjUuMjk3IDEwMjQgNTYuNTIyIDEwMjRINTQ3VjYyOEg0MTRWNDczaDEzM1YzNTkuMDI5YzAtMTMyLjI2MiA4MC43NzMtMjA0LjI4MiAxOTguNzU2LTIwNC4yODIgNTYuNTEzIDAgMTA1LjA4NiA0LjIwOCAxMTkuMjQ0IDYuMDg5VjI5OWwtODEuNjE2LjAzN2MtNjMuOTkzIDAtNzYuMzg0IDMwLjQ5Mi03Ni4zODQgNzUuMjM2VjQ3M2gxNTMuNDg3bC0xOS45ODYgMTU1SDcwN3YzOTZoMjYwLjQ4NGMzMS4yMTMgMCA1Ni41MTYtMjUuMzAzIDU2LjUxNi01Ni41MTZWNTYuNTE1QzEwMjQgMjUuMzAzIDk5OC42OTcgMCA5NjcuNDg0IDAiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#cdf}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder{background:linear-gradient(-135deg,#1400c7,#b800b1,#f50000)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iNTA0IiBoZWlnaHQ9IjUwNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIC4xNTloNTAzLjg0MVY1MDMuOTRIMHoiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48cGF0aCBmaWxsPSIjRkZGIiBkPSJNMjUxLjkyMS4xNTljLTY4LjQxOCAwLTc2Ljk5Ny4yOS0xMDMuODY3IDEuNTE2LTI2LjgxNCAxLjIyMy00NS4xMjcgNS40ODItNjEuMTUxIDExLjcxLTE2LjU2NiA2LjQzNy0zMC42MTUgMTUuMDUxLTQ0LjYyMSAyOS4wNTYtMTQuMDA1IDE0LjAwNi0yMi42MTkgMjguMDU1LTI5LjA1NiA0NC42MjEtNi4yMjggMTYuMDI0LTEwLjQ4NyAzNC4zMzctMTEuNzEgNjEuMTUxQy4yOSAxNzUuMDgzIDAgMTgzLjY2MiAwIDI1Mi4wOGMwIDY4LjQxNy4yOSA3Ni45OTYgMS41MTYgMTAzLjg2NiAxLjIyMyAyNi44MTQgNS40ODIgNDUuMTI3IDExLjcxIDYxLjE1MSA2LjQzNyAxNi41NjYgMTUuMDUxIDMwLjYxNSAyOS4wNTYgNDQuNjIxIDE0LjAwNiAxNC4wMDUgMjguMDU1IDIyLjYxOSA0NC42MjEgMjkuMDU3IDE2LjAyNCA2LjIyNyAzNC4zMzcgMTAuNDg2IDYxLjE1MSAxMS43MDkgMjYuODcgMS4yMjYgMzUuNDQ5IDEuNTE2IDEwMy44NjcgMS41MTYgNjguNDE3IDAgNzYuOTk2LS4yOSAxMDMuODY2LTEuNTE2IDI2LjgxNC0xLjIyMyA0NS4xMjctNS40ODIgNjEuMTUxLTExLjcwOSAxNi41NjYtNi40MzggMzAuNjE1LTE1LjA1MiA0NC42MjEtMjkuMDU3IDE0LjAwNS0xNC4wMDYgMjIuNjE5LTI4LjA1NSAyOS4wNTctNDQuNjIxIDYuMjI3LTE2LjAyNCAxMC40ODYtMzQuMzM3IDExLjcwOS02MS4xNTEgMS4yMjYtMjYuODcgMS41MTYtMzUuNDQ5IDEuNTE2LTEwMy44NjYgMC02OC40MTgtLjI5LTc2Ljk5Ny0xLjUxNi0xMDMuODY3LTEuMjIzLTI2LjgxNC01LjQ4Mi00NS4xMjctMTEuNzA5LTYxLjE1MS02LjQzOC0xNi41NjYtMTUuMDUyLTMwLjYxNS0yOS4wNTctNDQuNjIxLTE0LjAwNi0xNC4wMDUtMjguMDU1LTIyLjYxOS00NC42MjEtMjkuMDU2LTE2LjAyNC02LjIyOC0zNC4zMzctMTAuNDg3LTYxLjE1MS0xMS43MUMzMjguOTE3LjQ0OSAzMjAuMzM4LjE1OSAyNTEuOTIxLjE1OW0wIDQ1LjM5MWM2Ny4yNjUgMCA3NS4yMzMuMjU3IDEwMS43OTcgMS40NjkgMjQuNTYyIDEuMTIgMzcuOTAxIDUuMjI0IDQ2Ljc3OCA4LjY3NCAxMS43NTkgNC41NyAyMC4xNTEgMTAuMDI5IDI4Ljk2NiAxOC44NDVzMTQuMjc1IDE3LjIwNyAxOC44NDUgMjguOTY2YzMuNDUgOC44NzcgNy41NTQgMjIuMjE2IDguNjc0IDQ2Ljc3OCAxLjIxMiAyNi41NjQgMS40NjkgMzQuNTMyIDEuNDY5IDEwMS43OTggMCA2Ny4yNjUtLjI1NyA3NS4yMzMtMS40NjkgMTAxLjc5Ny0xLjEyIDI0LjU2Mi01LjIyNCAzNy45MDEtOC42NzQgNDYuNzc4LTQuNTcgMTEuNzU5LTEwLjAyOSAyMC4xNTEtMTguODQ1IDI4Ljk2NnMtMTcuMjA3IDE0LjI3NS0yOC45NjYgMTguODQ1Yy04Ljg3NyAzLjQ1LTIyLjIxNiA3LjU1NC00Ni43NzggOC42NzQtMjYuNTYgMS4yMTItMzQuNTI3IDEuNDY5LTEwMS43OTcgMS40NjktNjcuMjcxIDAtNzUuMjM3LS4yNTctMTAxLjc5OC0xLjQ2OS0yNC41NjItMS4xMi0zNy45MDEtNS4yMjQtNDYuNzc4LTguNjc0LTExLjc1OS00LjU3LTIwLjE1MS0xMC4wMjktMjguOTY2LTE4Ljg0NXMtMTQuMjc1LTE3LjIwNy0xOC44NDUtMjguOTY2Yy0zLjQ1LTguODc3LTcuNTU0LTIyLjIxNi04LjY3NC00Ni43NzgtMS4yMTItMjYuNTY0LTEuNDY5LTM0LjUzMi0xLjQ2OS0xMDEuNzk3IDAtNjcuMjY2LjI1Ny03NS4yMzQgMS40NjktMTAxLjc5OCAxLjEyLTI0LjU2MiA1LjIyNC0zNy45MDEgOC42NzQtNDYuNzc4IDQuNTctMTEuNzU5IDEwLjAyOS0yMC4xNTEgMTguODQ1LTI4Ljk2NnMxNy4yMDctMTQuMjc1IDI4Ljk2Ni0xOC44NDVjOC44NzctMy40NSAyMi4yMTYtNy41NTQgNDYuNzc4LTguNjc0IDI2LjU2NC0xLjIxMiAzNC41MzItMS40NjkgMTAxLjc5OC0xLjQ2OSIgbWFzaz0idXJsKCNiKSIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0yNTEuOTIxIDMzNi4wNTNjLTQ2LjM3OCAwLTgzLjk3NC0zNy41OTYtODMuOTc0LTgzLjk3M3MzNy41OTYtODMuOTc0IDgzLjk3NC04My45NzRjNDYuMzc3IDAgODMuOTczIDM3LjU5NiA4My45NzMgODMuOTc0IDAgNDYuMzc3LTM3LjU5NiA4My45NzMtODMuOTczIDgzLjk3M20wLTIxMy4zMzhjLTcxLjQ0NyA
2132wLTEyOS4zNjUgNTcuOTE4LTEyOS4zNjUgMTI5LjM2NSAwIDcxLjQ0NiA1Ny45MTggMTI5LjM2NCAxMjkuMzY1IDEyOS4zNjQgNzEuNDQ2IDAgMTI5LjM2NC01Ny45MTggMTI5LjM2NC0xMjkuMzY0IDAtNzEuNDQ3LTU3LjkxOC0xMjkuMzY1LTEyOS4zNjQtMTI5LjM2NU00MTYuNjI3IDExNy42MDRjMCAxNi42OTYtMTMuNTM1IDMwLjIzLTMwLjIzMSAzMC4yMy0xNi42OTUgMC0zMC4yMy0xMy41MzQtMzAuMjMtMzAuMjNzMTMuNTM1LTMwLjIzMSAzMC4yMy0zMC4yMzFjMTYuNjk2IDAgMzAuMjMxIDEzLjUzNSAzMC4yMzEgMzAuMjMxIi8+PC9nPjwvc3ZnPg==)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#ffe0fe}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder{background:linear-gradient(90deg,#71c6f4,#0d70a5)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHZpZXdCb3g9IjAgMCA0MDAgNDAwIj48cGF0aCBkPSJNNDAwIDIwMGMwIDExMC41LTg5LjUgMjAwLTIwMCAyMDBTMCAzMTAuNSAwIDIwMCA4OS41IDAgMjAwIDBzMjAwIDg5LjUgMjAwIDIwME0xNjMuNCAzMDUuNWM4OC43IDAgMTM3LjItNzMuNSAxMzcuMi0xMzcuMiAwLTIuMSAwLTQuMi0uMS02LjIgOS40LTYuOCAxNy42LTE1LjMgMjQuMS0yNS04LjYgMy44LTE3LjkgNi40LTI3LjcgNy42IDEwLTYgMTcuNi0xNS40IDIxLjItMjYuNy05LjMgNS41LTE5LjYgOS41LTMwLjYgMTEuNy04LjgtOS40LTIxLjMtMTUuMi0zNS4yLTE1LjItMjYuNiAwLTQ4LjIgMjEuNi00OC4yIDQ4LjIgMCAzLjguNCA3LjUgMS4zIDExLTQwLjEtMi03NS42LTIxLjItOTkuNC01MC40LTQuMSA3LjEtNi41IDE1LjQtNi41IDI0LjIgMCAxNi43IDguNSAzMS41IDIxLjUgNDAuMS03LjktLjItMTUuMy0yLjQtMjEuOC02di42YzAgMjMuNCAxNi42IDQyLjggMzguNyA0Ny4zLTQgMS4xLTguMyAxLjctMTIuNyAxLjctMy4xIDAtNi4xLS4zLTkuMS0uOSA2LjEgMTkuMiAyMy45IDMzLjEgNDUgMzMuNS0xNi41IDEyLjktMzcuMyAyMC42LTU5LjkgMjAuNi0zLjkgMC03LjctLjItMTEuNS0uNyAyMS4xIDEzLjggNDYuNSAyMS44IDczLjcgMjEuOCIgc3R5bGU9ImZpbGw6I2ZmZiIvPjwvc3ZnPg==)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text{color:#b8e6ff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}',"",{version:3,sources:["webpack://./../ckeditor5-media-embed/theme/mediaembedediting.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-media-embed/mediaembedediting.css"],names:[],mappings:"AAMC,0CAGC,kBAAmB,CAFnB,YAAa,CACb,qBAcD,CAXC,sEAEC,cAAe,CAEf,iBAMD,CAJC,wGAEC,aAAc,CADd,eAED,CAWD,6kBACC,YACD,CAYF,2LACC,mBACD,CC1CA,MACC,0CAA2C,CAE3C,mDAA4D,CAC5D,2EACD,CAEA,mBACC,aA+FD,CA7FC,0CAEC,0CAA2C,CAD3C,0CA6BD,CA1BC,uEAIC,uBAA2B,CAC3B,qBAAsB,CAHtB,kDAAmD,CACnD,qCAAsC,CAFtC,qDAUD,CAJC,gFAEC,WAAY,CADZ,UAED,CAGD,4EACC,sDAAuD,CAGvD,iBAAkB,CADlB,iBAAkB,CAElB,sBAAuB,CAHvB,kBAUD,CALC,kFACC,4DAA6D,CAC7D,cAAe,CACf,yBACD,CAIF,wDAEC,gBAAiB,CADjB,eAED,CAEA,4UAIC,goGACD,CAEA,2EACC,kBAaD,CAXC,wGACC,orBACD,CAEA,6GACC,UAKD,CAHC,mHACC,UACD,CAIF,4EACC,2DAcD,CAZC,yGACC,o+GACD,CAGA,8GACC,aAKD,CAHC,oHACC,UACD,CAIF,6EAEC,iDAaD,CAXC,0GACC,g/BACD,CAEA,+GACC,aAKD,CAHC,qHACC,UACD",sourcesContent:[`/* 2133 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2134 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2135 */ 2136 2137.ck-media__wrapper { 2138 & .ck-media__placeholder { 2139 display: flex; 2140 flex-direction: column; 2141 align-items: center; 2142 2143 & .ck-media__placeholder__url { 2144 /* Otherwise the URL will overflow when the content is very narrow. */ 2145 max-width: 100%; 2146 2147 position: relative; 2148 2149 & .ck-media__placeholder__url__text { 2150 overflow: hidden; 2151 display: block; 2152 } 2153 } 2154 } 2155 2156 &[data-oembed-url*="twitter.com"], 2157 &[data-oembed-url*="google.com/maps"], 2158 &[data-oembed-url*="goo.gl/maps"], 2159 &[data-oembed-url*="maps.google.com"], 2160 &[data-oembed-url*="maps.app.goo.gl"], 2161 &[data-oembed-url*="facebook.com"], 2162 &[data-oembed-url*="instagram.com"] { 2163 & .ck-media__placeholder__icon * { 2164 display: none; 2165 } 2166 } 2167} 2168 2169/* Disable all mouse interaction as long as the editor is not readâonly. 2170 https://github.com/ckeditor/ckeditor5-media-embed/issues/58 */ 2171.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper > *:not(.ck-media__placeholder) { 2172 pointer-events: none; 2173} 2174 2175/* Disable all mouse interaction when the widget is not selected (e.g. to avoid opening links by accident). 2176 https://github.com/ckeditor/ckeditor5-media-embed/issues/18 */ 2177.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder { 2178 pointer-events: none; 2179} 2180`,`/* 2181 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2182 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2183 */ 2184 2185:root { 2186 --ck-media-embed-placeholder-icon-size: 3em; 2187 2188 --ck-color-media-embed-placeholder-url-text: hsl(0, 0%, 46%); 2189 --ck-color-media-embed-placeholder-url-text-hover: var(--ck-color-base-text); 2190} 2191 2192.ck-media__wrapper { 2193 margin: 0 auto; 2194 2195 & .ck-media__placeholder { 2196 padding: calc( 3 * var(--ck-spacing-standard) ); 2197 background: var(--ck-color-base-foreground); 2198 2199 & .ck-media__placeholder__icon { 2200 min-width: var(--ck-media-embed-placeholder-icon-size); 2201 height: var(--ck-media-embed-placeholder-icon-size); 2202 margin-bottom: var(--ck-spacing-large); 2203 background-position: center; 2204 background-size: cover; 2205 2206 & .ck-icon { 2207 width: 100%; 2208 height: 100%; 2209 } 2210 } 2211 2212 & .ck-media__placeholder__url__text { 2213 color: var(--ck-color-media-embed-placeholder-url-text); 2214 white-space: nowrap; 2215 text-align: center; 2216 font-style: italic; 2217 text-overflow: ellipsis; 2218 2219 &:hover { 2220 color: var(--ck-color-media-embed-placeholder-url-text-hover); 2221 cursor: pointer; 2222 text-decoration: underline; 2223 } 2224 } 2225 } 2226 2227 &[data-oembed-url*="open.spotify.com"] { 2228 max-width: 300px; 2229 max-height: 380px; 2230 } 2231 2232 &[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon, 2233 &[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon, 2234 &[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon, 2235 &[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon { 2236 background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMCAwIDMuNzggMS42MWg0OS42MjFjMS42OTQgMCAzLjE5LS43OTggNC4xNDYtMi4wMzd6IiBmaWxsPSIjNWM4OGM1Ii8+PHBhdGggZD0iTTIyNi43NDIgMjIyLjk4OGMtOS4yNjYgMC0xNi43NzcgNy4xNy0xNi43NzcgMTYuMDE0LjAwNyAyLjc2Mi42NjMgNS40NzQgMi4wOTMgNy44NzUuNDMuNzAzLjgzIDEuNDA4IDEuMTkgMi4xMDcuMzMzLjUwMi42NSAxLjAwNS45NSAxLjUwOC4zNDMuNDc3LjY3My45NTcuOTg4IDEuNDQgMS4zMSAxLjc2OSAyLjUgMy41MDIgMy42MzcgNS4xNjguNzkzIDEuMjc1IDEuNjgzIDIuNjQgMi40NjYgMy45OSAyLjM2MyA0LjA5NCA0LjAwNyA4LjA5MiA0LjYgMTMuOTE0di4wMTJjLjE4Mi40MTIuNTE2LjY2Ni44NzkuNjY3LjQwMy0uMDAxLjc2OC0uMzE0LjkzLS43OTkuNjAzLTUuNzU2IDIuMjM4LTkuNzI5IDQuNTg1LTEzLjc5NC43ODItMS4zNSAxLjY3My0yLjcxNSAyLjQ2NS0zLjk5IDEuMTM3LTEuNjY2IDIuMzI4LTMuNCAzLjYzOC01LjE2OS4zMTUtLjQ4Mi42NDUtLjk2Mi45ODgtMS40MzkuMy0uNTAzLjYxNy0xLjAwNi45NS0xLjUwOC4zNTktLjcuNzYtMS40MDQgMS4xOS0yLjEwNyAxLjQyNi0yLjQwMiAyLTUuMTE0IDIuMDA0LTcuODc1IDAtOC44NDQtNy41MTEtMTYuMDE0LTE2Ljc3Ni0xNi4wMTR6IiBmaWxsPSIjZGQ0YjNlIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxlbGxpcHNlIHJ5PSI1LjU2NCIgcng9IjUuODI4IiBjeT0iMjM5LjAwMiIgY3g9IjIyNi43NDIiIGZpbGw9IiM4MDJkMjciIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTE5MC4zMDEgMjM3LjI4M2MtNC42NyAwLTguNDU3IDMuODUzLTguNDU3IDguNjA2czMuNzg2IDguNjA3IDguNDU3IDguNjA3YzMuMDQzIDAgNC44MDYtLjk1OCA2LjMzNy0yLjUxNiAxLjUzLTEuNTU3IDIuMDg3LTMuOTEzIDIuMDg3LTYuMjkgMC0uMzYyLS4wMjMtLjcyMi0uMDY0LTEuMDc5aC04LjI1N3YzLjA0M2g0Ljg1Yy0uMTk3Ljc1OS0uNTMxIDEuNDUtMS4wNTggMS45ODYtLjk0Mi45NTgtMi4wMjggMS41NDgtMy45MDEgMS41NDgtMi44NzYgMC01LjIwOC0yLjM3Mi01LjIwOC01LjI5OSAwLTIuOTI2IDIuMzMyLTUuMjk5IDUuMjA4LTUuMjk5IDEuMzk5IDAgMi42MTguNDA3IDMuNTg0IDEuMjkzbDIuMzgxLTIuMzhjMC0uMDAyLS4wMDMtLjAwNC0uMDA0LS4wMDUtMS41ODgtMS41MjQtMy42Mi0yLjIxNS01Ljk1NS0yLjIxNXptNC40MyA1LjY2bC4wMDMuMDA2di0uMDAzeiIgZmlsbD0iI2ZmZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMjE1LjE4NCAyNTEuOTI5bC03
2236Ljk4IDcuOTc5IDI4LjQ3NyAyOC40NzVjLjI4Ny0uNjQ5LjQ0OS0xLjM2Ni40NDktMi4xMjN2LTMxLjE2NWMtLjQ2OS42NzUtLjkzNCAxLjM0OS0xLjM4MiAyLjAwNS0uNzkyIDEuMjc1LTEuNjgyIDIuNjQtMi40NjUgMy45OS0yLjM0NyA0LjA2NS0zLjk4MiA4LjAzOC00LjU4NSAxMy43OTQtLjE2Mi40ODUtLjUyNy43OTgtLjkzLjc5OS0uMzYzLS4wMDEtLjY5Ny0uMjU1LS44NzktLjY2N3YtLjAxMmMtLjU5My01LjgyMi0yLjIzNy05LjgyLTQuNi0xMy45MTQtLjc4My0xLjM1LTEuNjczLTIuNzE1LTIuNDY2LTMuOTktMS4xMzctMS42NjYtMi4zMjctMy40LTMuNjM3LTUuMTY5bC0uMDAyLS4wMDN6IiBmaWxsPSIjYzNjM2MzIi8+PHBhdGggZD0iTTIxMi45ODMgMjQ4LjQ5NWwtMzYuOTUyIDM2Ljk1M3YuODEyYTUuMjI3IDUuMjI3IDAgMCAwIDUuMjM4IDUuMjM4aDEuMDE1bDM1LjY2Ni0zNS42NjZhMTM2LjI3NSAxMzYuMjc1IDAgMCAwLTIuNzY0LTMuOSAzNy41NzUgMzcuNTc1IDAgMCAwLS45ODktMS40NGMtLjI5OS0uNTAzLS42MTYtMS4wMDYtLjk1LTEuNTA4LS4wODMtLjE2Mi0uMTc2LS4zMjYtLjI2NC0uNDg5eiIgZmlsbD0iI2ZkZGM0ZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMjExLjk5OCAyNjEuMDgzbC02LjE1MiA2LjE1MSAyNC4yNjQgMjQuMjY0aC43ODFhNS4yMjcgNS4yMjcgMCAwIDAgNS4yMzktNS4yMzh2LTEuMDQ1eiIgZmlsbD0iI2ZmZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48L2c+PC9zdmc+); 2237 } 2238 2239 &[data-oembed-url*="facebook.com"] .ck-media__placeholder { 2240 background: hsl(220, 46%, 48%); 2241 2242 & .ck-media__placeholder__icon { 2243 background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIxMDI0cHgiIGhlaWdodD0iMTAyNHB4IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPiAgICAgICAgPHRpdGxlPkZpbGwgMTwvdGl0bGU+ICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiAgICA8ZGVmcz48L2RlZnM+ICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9ImZMb2dvX1doaXRlIiBmaWxsPSIjRkZGRkZFIj4gICAgICAgICAgICA8cGF0aCBkPSJNOTY3LjQ4NCwwIEw1Ni41MTcsMCBDMjUuMzA0LDAgMCwyNS4zMDQgMCw1Ni41MTcgTDAsOTY3LjQ4MyBDMCw5OTguNjk0IDI1LjI5NywxMDI0IDU2LjUyMiwxMDI0IEw1NDcsMTAyNCBMNTQ3LDYyOCBMNDE0LDYyOCBMNDE0LDQ3MyBMNTQ3LDQ3MyBMNTQ3LDM1OS4wMjkgQzU0NywyMjYuNzY3IDYyNy43NzMsMTU0Ljc0NyA3NDUuNzU2LDE1NC43NDcgQzgwMi4yNjksMTU0Ljc0NyA4NTAuODQyLDE1OC45NTUgODY1LDE2MC44MzYgTDg2NSwyOTkgTDc4My4zODQsMjk5LjAzNyBDNzE5LjM5MSwyOTkuMDM3IDcwNywzMjkuNTI5IDcwNywzNzQuMjczIEw3MDcsNDczIEw4NjAuNDg3LDQ3MyBMODQwLjUwMSw2MjggTDcwNyw2MjggTDcwNywxMDI0IEw5NjcuNDg0LDEwMjQgQzk5OC42OTcsMTAyNCAxMDI0LDk5OC42OTcgMTAyNCw5NjcuNDg0IEwxMDI0LDU2LjUxNSBDMTAyNCwyNS4zMDMgOTk4LjY5NywwIDk2Ny40ODQsMCIgaWQ9IkZpbGwtMSI+PC9wYXRoPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+); 2244 } 2245 2246 & .ck-media__placeholder__url__text { 2247 color: hsl(220, 100%, 90%); 2248 2249 &:hover { 2250 color: hsl(0, 0%, 100%); 2251 } 2252 } 2253 } 2254 2255 &[data-oembed-url*="instagram.com"] .ck-media__placeholder { 2256 background: linear-gradient(-135deg,hsl(246, 100%, 39%),hsl(302, 100%, 36%),hsl(0, 100%, 48%)); 2257 2258 & .ck-media__placeholder__icon { 2259 background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI1MDRweCIgaGVpZ2h0PSI1MDRweCIgdmlld0JveD0iMCAwIDUwNCA1MDQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+Z2x5cGgtbG9nb19NYXkyMDE2PC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxkZWZzPiAgICAgICAgPHBvbHlnb24gaWQ9InBhdGgtMSIgcG9pbnRzPSIwIDAuMTU5IDUwMy44NDEgMC4xNTkgNTAzLjg0MSA1MDMuOTQgMCA1MDMuOTQiPjwvcG9seWdvbj4gICAgPC9kZWZzPiAgICA8ZyBpZD0iZ2x5cGgtbG9nb19NYXkyMDE2IiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJHcm91cC0zIj4gICAgICAgICAgICA8bWFzayBpZD0ibWFzay0yIiBmaWxsPSJ3aGl0ZSI+ICAgICAgICAgICAgICAgIDx1c2UgeGxpbms6aHJlZj0iI3BhdGgtMSI+PC91c2U+ICAgICAgICAgICAgPC9tYXNrPiAgICAgICAgICAgIDxnIGlkPSJDbGlwLTIiPjwvZz4gICAgICAgICAgICA8cGF0aCBkPSJNMjUxLjkyMSwwLjE1OSBDMTgzLjUwMywwLjE1OSAxNzQuOTI0LDAuNDQ5IDE0OC4wNTQsMS42NzUgQzEyMS4yNCwyLjg5OCAxMDIuOTI3LDcuMTU3IDg2LjkwMywxMy4zODUgQzcwLjMzNywxOS44MjIgNTYuMjg4LDI4LjQzNiA0Mi4yODIsNDIuNDQxIEMyOC4yNzcsNTYuNDQ3IDE5LjY2Myw3MC40OTYgMTMuMjI2LDg3LjA2MiBDNi45OTgsMTAzLjA4NiAyLjczOSwxMjEuMzk5IDEuNTE2LDE0OC4yMTMgQzAuMjksMTc1LjA4MyAwLDE4My42NjIgMCwyNTIuMDggQzAsMzIwLjQ5NyAwLjI5LDMyOS4wNzYgMS41MTYsMzU1Ljk0NiBDMi43MzksMzgyLjc2IDYuOTk4LDQwMS4wNzMgMTMuMjI2LDQxNy4wOTcgQzE5LjY2Myw0MzMuNjYzIDI4LjI3Nyw0NDcuNzEyIDQyLjI4Miw0NjEuNzE4IEM1Ni4yODgsNDc1LjcyMyA3MC4zMzcsNDg0LjMzNyA4Ni45MDMsNDkwLjc3NSBDMTAyLjkyNyw0OTcuMDAyIDEyMS4yNCw1MDEuMjYxIDE0OC4wNTQsNTAyLjQ4NCBDMTc0LjkyNCw1MDMuNzEgMTgzLjUwMyw1MDQgMjUxLjkyMSw1MDQgQzMyMC4zMzgsNTA0IDMyOC45MTcsNTAzLjcxIDM1NS43ODcsNTAyLjQ4NCBDMzgyLjYwMSw1MDEuMjYxIDQwMC45MTQsNDk3LjAwMiA0MTYuOTM4LDQ5MC43NzUgQzQzMy41MDQsNDg0LjMzNyA0NDcuNTUzLDQ3NS43MjMgNDYxLjU1OSw0NjEuNzE4IEM0NzUuNTY0LDQ0Ny43MTIgNDg0LjE3OCw0MzMuNjYzIDQ5MC42MTYsNDE3LjA5NyBDNDk2Ljg0Myw0MDEuMDczIDUwMS4xMDIsMzgyLjc2IDUwMi4zMjUsMzU1Ljk0NiBDNTAzLjU1MSwzMjkuMDc2IDUwMy44NDEsMzIwLjQ5NyA1MDMuODQxLDI1Mi4wOCBDNTAzLjg0MSwxODMuNjYyIDUwMy41NTEsMTc1LjA4MyA1MDIuMzI1LDE0OC4yMTMgQzUwMS4xMDIsMTIxLjM5OSA0OTYuODQzLDEwMy4wODYgNDkwLjYxNiw4Ny4wNjIgQzQ4NC4xNzgsNzAuNDk2IDQ3NS41NjQsNTYuNDQ3IDQ2MS41NTksNDIuNDQxIEM0NDcuNTUzLDI4LjQzNiA0MzMuNTA0LDE5LjgyMiA0MTYuOTM4LDEzLjM4NSBDNDAwLjkxNCw3LjE1NyAzODIuNjAxLDIuODk4IDM1NS43ODcsMS42NzUgQzMyOC45MTcsMC40NDkgMzIwLjMzOCwwLjE1OSAyNTEuOTIxLDAuMTU5IFogTTI1MS45MjEsNDUuNTUgQzMxOS4xODYsNDUuNTUgMzI3LjE1NCw0NS44MDcgMzUzLjcxOCw0Ny4wMTkgQzM3OC4yOCw0OC4xMzkgMzkxLjYxOSw1Mi4yNDMgNDAwLjQ5Niw1NS42OTMgQzQxMi4yNTUsNjAuMjYzIDQyMC42NDcsNjUuNzIyIDQyOS40NjIsNzQuNTM4IEM0MzguMjc4LDgzLjM1MyA0NDMuNzM3LDkxLjc0NSA0NDguMzA3LDEwMy41MDQgQzQ1MS43NTcsMTEyLjM4MSA0NTUuODYxLDEyNS43MiA0NTYuOTgxLDE1MC4yODIgQzQ1OC4xOTMsMTc2Ljg0NiA0NTguNDUsMTg0LjgxNCA0NTguNDUsMjUyLjA4IEM0NTguNDUsMzE5LjM0NSA0NTguMTkzLDMyNy4zMTMgNDU2Ljk4MSwzNTMuODc3IEM0NTUuODYxLDM3OC40MzkgNDUxLjc1NywzOTEuNzc4IDQ0OC4zMDcsNDAwLjY1NSBDNDQzLjczNyw0MTIuNDE0IDQzOC4yNzgsNDIwLjgwNiA0MjkuNDYyLDQyOS42MjEgQzQyMC42NDcsNDM4LjQzNyA0MTIuMjU1LDQ0My44OTYgNDAwLjQ5Niw0NDguNDY2IEMzOTEuNjE5LDQ1MS45MTYgMzc4LjI4LDQ1Ni4wMiAzNTMuNzE4LDQ1Ny4xNCBDMzI3LjE1OCw0NTguMzUyIDMxOS4xOTEsNDU4LjYwOSAyNTEuOTIxLDQ1OC42MDkgQzE4NC42NSw0NTguNjA5IDE3Ni42ODQsNDU4LjM1MiAxNTAuMTIzLDQ1Ny4xNCBDMTI1LjU2MSw0NTYuMDIgMTEyLjIyMiw0NTEuOTE2IDEwMy4zNDUsNDQ4LjQ2NiBDOTEuNTg2LDQ0My44OTYgODMuMTk0LDQzOC40MzcgNzQuMzc5LDQyOS42MjEgQzY1LjU2NCw0MjAuODA2IDYwLjEwNCw0MTIuNDE0IDU1LjUzNCw0MDAuNjU1IEM1Mi4wODQsMzkxLjc3OCA0Ny45OCwzNzguNDM5IDQ2Ljg2LDM1My44NzcgQzQ1LjY0OCwzMjcuMzEzIDQ1LjM5MSwzMTkuMzQ1IDQ1LjM5MSwyNTIuMDggQzQ1LjM5MSwxODQuODE0IDQ1LjY0OCwxNzYuODQ2IDQ2Ljg2LDE1MC4yODIgQzQ3Ljk4LDEyNS43MiA1Mi4wODQsMTEyLjM4MSA1NS41MzQsMTAzLjUwNCBDNjAuMTA0LDkxLjc0NSA2NS41NjMsODMuMzUzIDc0LjM3OSw3NC41MzggQzgzLjE5NCw2NS43MjIgOTEuNTg2LDYwLjI2MyAxMDMuMzQ1LDU1LjY5MyBDMTEyLjIyMiw1Mi4yNDMgMTI1LjU2MSw0OC4xMzkgMTUwLjEyMyw0Ny4wMTkgQzE3Ni42ODcsNDUuODA3IDE4NC42NTUsNDUuNTUgMjUxLjkyMSw0NS41NSBaIiBpZD0iRmlsbC0xIiBmaWxsPSIjRkZGRkZGIiBtYXNrPSJ1cmwoI21hc2stMikiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgICAgIDxwYXRoIGQ9Ik0yNTEuOTIxLDMzNi4wNTMgQzIwNS41NDMsMzM2LjA1MyAxNjcuOTQ3LDI5OC40NTcgMTY3Ljk0NywyNTIuMDggQzE2Ny45NDcsMjA1LjcwMiAyMDUuNTQzLDE2OC4xMDYgMjUxLjkyMSwxNjguMTA2IEMyOTguMjk4LDE2OC4xMDYgMzM1Ljg5NCwyMDUuNzAyIDMzNS44OTQsMjUyLjA4IEMzMzUuODk0LDI5OC40NTcgMjk4LjI5OCwzMzYuMDUzIDI1MS45MjEsMzM2LjA1MyBaIE0yNTEuOTIxLDEyMi43MTUgQzE4MC40NzQsMTIyLjcxNSAxMjIuNTU2LDE4MC42MzMgMTIyLjU1NiwyNTIuMDggQzEyMi41NTYsMzIzLjUyNiAxODAuNDc0LDM4MS40NDQgMjUxLjkyMSwzODEuNDQ0IEMzMjMuMzY3LDM4MS40NDQgMzgxLjI4NSwzMjMu
2259NTI2IDM4MS4yODUsMjUyLjA4IEMzODEuMjg1LDE4MC42MzMgMzIzLjM2NywxMjIuNzE1IDI1MS45MjEsMTIyLjcxNSBaIiBpZD0iRmlsbC00IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgICAgICA8cGF0aCBkPSJNNDE2LjYyNywxMTcuNjA0IEM0MTYuNjI3LDEzNC4zIDQwMy4wOTIsMTQ3LjgzNCAzODYuMzk2LDE0Ny44MzQgQzM2OS43MDEsMTQ3LjgzNCAzNTYuMTY2LDEzNC4zIDM1Ni4xNjYsMTE3LjYwNCBDMzU2LjE2NiwxMDAuOTA4IDM2OS43MDEsODcuMzczIDM4Ni4zOTYsODcuMzczIEM0MDMuMDkyLDg3LjM3MyA0MTYuNjI3LDEwMC45MDggNDE2LjYyNywxMTcuNjA0IiBpZD0iRmlsbC01IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgIDwvZz48L3N2Zz4=); 2260 } 2261 2262 /* stylelint-disable-next-line no-descending-specificity */ 2263 & .ck-media__placeholder__url__text { 2264 color: hsl(302, 100%, 94%); 2265 2266 &:hover { 2267 color: hsl(0, 0%, 100%); 2268 } 2269 } 2270 } 2271 2272 &[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder { 2273 /* Use gradient to contrast with focused widget (ckeditor/ckeditor5-media-embed#22). */ 2274 background: linear-gradient( to right, hsl(201, 85%, 70%), hsl(201, 85%, 35%) ); 2275 2276 & .ck-media__placeholder__icon { 2277 background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IldoaXRlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQwMCA0MDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQwMCA0MDA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDojRkZGRkZGO308L3N0eWxlPjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MDAsMjAwYzAsMTEwLjUtODkuNSwyMDAtMjAwLDIwMFMwLDMxMC41LDAsMjAwUzg5LjUsMCwyMDAsMFM0MDAsODkuNSw0MDAsMjAweiBNMTYzLjQsMzA1LjVjODguNywwLDEzNy4yLTczLjUsMTM3LjItMTM3LjJjMC0yLjEsMC00LjItMC4xLTYuMmM5LjQtNi44LDE3LjYtMTUuMywyNC4xLTI1Yy04LjYsMy44LTE3LjksNi40LTI3LjcsNy42YzEwLTYsMTcuNi0xNS40LDIxLjItMjYuN2MtOS4zLDUuNS0xOS42LDkuNS0zMC42LDExLjdjLTguOC05LjQtMjEuMy0xNS4yLTM1LjItMTUuMmMtMjYuNiwwLTQ4LjIsMjEuNi00OC4yLDQ4LjJjMCwzLjgsMC40LDcuNSwxLjMsMTFjLTQwLjEtMi03NS42LTIxLjItOTkuNC01MC40Yy00LjEsNy4xLTYuNSwxNS40LTYuNSwyNC4yYzAsMTYuNyw4LjUsMzEuNSwyMS41LDQwLjFjLTcuOS0wLjItMTUuMy0yLjQtMjEuOC02YzAsMC4yLDAsMC40LDAsMC42YzAsMjMuNCwxNi42LDQyLjgsMzguNyw0Ny4zYy00LDEuMS04LjMsMS43LTEyLjcsMS43Yy0zLjEsMC02LjEtMC4zLTkuMS0wLjljNi4xLDE5LjIsMjMuOSwzMy4xLDQ1LDMzLjVjLTE2LjUsMTIuOS0zNy4zLDIwLjYtNTkuOSwyMC42Yy0zLjksMC03LjctMC4yLTExLjUtMC43QzExMC44LDI5Ny41LDEzNi4yLDMwNS41LDE2My40LDMwNS41Ii8+PC9zdmc+); 2278 } 2279 2280 & .ck-media__placeholder__url__text { 2281 color: hsl(201, 100%, 86%); 2282 2283 &:hover { 2284 color: hsl(0, 0%, 100%); 2285 } 2286 } 2287 } 2288} 2289`],sourceRoot:""}]);const C=w},5651:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-media-form{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-field-view{display:inline-block}.ck.ck-media-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-media-form{flex-wrap:wrap}.ck.ck-media-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-media-form .ck-button{flex-basis:50%}}","",{version:3,sources:["webpack://./../ckeditor5-media-embed/theme/mediaform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,kBAEC,sBAAuB,CADvB,YAAa,CAEb,kBAAmB,CACnB,gBAqBD,CAnBC,yCACC,oBACD,CAEA,4BACC,YACD,CCbA,oCDCD,kBAeE,cAUF,CARE,yCACC,eACD,CAEA,6BACC,cACD,CCtBD",sourcesContent:[`/* 2290 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2291 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2292 */ 2293 2294@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"; 2295 2296.ck.ck-media-form { 2297 display: flex; 2298 align-items: flex-start; 2299 flex-direction: row; 2300 flex-wrap: nowrap; 2301 2302 & .ck-labeled-field-view { 2303 display: inline-block; 2304 } 2305 2306 & .ck-label { 2307 display: none; 2308 } 2309 2310 @mixin ck-media-phone { 2311 flex-wrap: wrap; 2312 2313 & .ck-labeled-field-view { 2314 flex-basis: 100%; 2315 } 2316 2317 & .ck-button { 2318 flex-basis: 50%; 2319 } 2320 } 2321} 2322`,`/* 2323 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2324 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2325 */ 2326 2327@define-mixin ck-media-phone { 2328 @media screen and (max-width: 600px) { 2329 @mixin-content; 2330 } 2331} 2332`],sourceRoot:""}]);const C=w},5506:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-input-color{display:flex;flex-direction:row-reverse;width:100%}.ck.ck-input-color>input.ck.ck-input-text{flex-grow:1;min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{overflow:hidden;position:relative}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{display:block;position:absolute}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-input-color>.ck.ck-input-text:focus{z-index:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-left-radius:0;border-top-left-radius:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-left:1px solid transparent}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-right:1px solid transparent}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border:1px solid var(--ck-color-input-border);height:20px;width:20px}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{background:red;border-radius:2px;height:150%;left:50%;
2332top:-30%;transform:rotate(45deg);transform-origin:50%;width:8%}.ck.ck-input-color .ck.ck-input-color__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);width:100%}.ck.ck-input-color .ck.ck-input-color__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-input-border)}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard);margin-right:0}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/colorinput.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/colorinput.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,mBAEC,YAAa,CACb,0BAA2B,CAF3B,UAgCD,CA5BC,0CAEC,WAAY,CADZ,cAED,CAEA,sCACC,cAMD,CAHC,kFACC,YACD,CAGD,8CAEC,YAWD,CATC,kFAEC,eAAgB,CADhB,iBAOD,CAJC,0IAEC,aAAc,CADd,iBAED,CC1BF,+CAGE,4BAA6B,CAD7B,yBAcF,CAhBA,+CAQE,2BAA4B,CAD5B,wBASF,CAHC,2CACC,SACD,CAIA,wEACC,SA0CD,CA3CA,kFAKE,2BAA4B,CAD5B,wBAuCF,CApCE,8FACC,iCACD,CATF,kFAcE,4BAA6B,CAD7B,yBA8BF,CA3BE,8FACC,kCACD,CAGD,oFACC,oDACD,CAEA,4GC1CF,eD2DE,CAjBA,+PCtCD,qCDuDC,CAjBA,4GAKC,6CAA8C,CAD9C,WAAY,CADZ,UAcD,CAVC,oKAKC,cAA6B,CAC7B,iBAAkB,CAHlB,WAAY,CADZ,QAAS,CADT,QAAS,CAMT,uBAAwB,CACxB,oBAAqB,CAJrB,QAKD,CAKH,oDAIC,2BAA4B,CAC5B,4BAA6B,CAH7B,qEAAwE,CADxE,UA0BD,CApBC,gEACC,oDACD,CATD,8DAYE,yBAeF,CA3BA,8DAgBE,wBAWF,CARC,gEACC,uCAMD,CAPA,0EAKE,sCAAuC,CADvC,cAGF",sourcesContent:[`/* 2333 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2334 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2335 */ 2336 2337.ck.ck-input-color { 2338 width: 100%; 2339 display: flex; 2340 flex-direction: row-reverse; 2341 2342 & > input.ck.ck-input-text { 2343 min-width: auto; 2344 flex-grow: 1; 2345 } 2346 2347 & > div.ck.ck-dropdown { 2348 min-width: auto; 2349 2350 /* This dropdown has no arrow but a color preview instead. */ 2351 & > .ck-input-color__button .ck-dropdown__arrow { 2352 display: none; 2353 } 2354 } 2355 2356 & .ck.ck-input-color__button { 2357 /* Resolving issue with misaligned buttons on Safari (see #10589) */ 2358 display: flex; 2359 2360 & .ck.ck-input-color__button__preview { 2361 position: relative; 2362 overflow: hidden; 2363 2364 & > .ck.ck-input-color__button__preview__no-color-indicator { 2365 position: absolute; 2366 display: block; 2367 } 2368 } 2369 } 2370} 2371`,`/* 2372 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2373 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2374 */ 2375 2376@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 2377@import "../mixins/_rounded.css"; 2378 2379.ck.ck-input-color { 2380 & > .ck.ck-input-text { 2381 @mixin ck-dir ltr { 2382 border-top-right-radius: 0; 2383 border-bottom-right-radius: 0; 2384 } 2385 2386 @mixin ck-dir rtl { 2387 border-top-left-radius: 0; 2388 border-bottom-left-radius: 0; 2389 } 2390 2391 /* Make sure the focused input is always on top of the dropdown button so its 2392 outline and border are never cropped (also when the input is read-only). */ 2393 &:focus { 2394 z-index: 0; 2395 } 2396 } 2397 2398 & > .ck.ck-dropdown { 2399 & > .ck.ck-button.ck-input-color__button { 2400 padding: 0; 2401 2402 @mixin ck-dir ltr { 2403 border-top-left-radius: 0; 2404 border-bottom-left-radius: 0; 2405 2406 &:not(:focus) { 2407 border-left: 1px solid transparent; 2408 } 2409 } 2410 2411 @mixin ck-dir rtl { 2412 border-top-right-radius: 0; 2413 border-bottom-right-radius: 0; 2414 2415 &:not(:focus) { 2416 border-right: 1px solid transparent; 2417 } 2418 } 2419 2420 &.ck-disabled { 2421 background: var(--ck-color-input-disabled-background); 2422 } 2423 2424 & > .ck.ck-input-color__button__preview { 2425 @mixin ck-rounded-corners; 2426 2427 width: 20px; 2428 height: 20px; 2429 border: 1px solid var(--ck-color-input-border); 2430 2431 & > .ck.ck-input-color__button__preview__no-color-indicator { 2432 top: -30%; 2433 left: 50%; 2434 height: 150%; 2435 width: 8%; 2436 background: hsl(0, 100%, 50%); 2437 border-radius: 2px; 2438 transform: rotate(45deg); 2439 transform-origin: 50%; 2440 } 2441 } 2442 } 2443 } 2444 2445 & .ck.ck-input-color__remove-color { 2446 width: 100%; 2447 padding: calc(var(--ck-spacing-standard) / 2) var(--ck-spacing-standard); 2448 2449 border-bottom-left-radius: 0; 2450 border-bottom-right-radius: 0; 2451 2452 &:not(:focus) { 2453 border-bottom: 1px solid var(--ck-color-input-border); 2454 } 2455 2456 @mixin ck-dir ltr { 2457 border-top-right-radius: 0; 2458 } 2459 2460 @mixin ck-dir rtl { 2461 border-top-left-radius: 0; 2462 } 2463 2464 & .ck.ck-icon { 2465 margin-right: var(--ck-spacing-standard); 2466 2467 @mixin ck-dir rtl { 2468 margin-right: 0; 2469 margin-left: var(--ck-spacing-standard); 2470 } 2471 } 2472 } 2473} 2474`,`/* 2475 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2476 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2477 */ 2478 2479/** 2480 * Implements rounded corner interface for .ck-rounded-corners class. 2481 * 2482 * @see $ck-border-radius 2483 */ 2484@define-mixin ck-rounded-corners { 2485 border-radius: 0; 2486 2487 @nest .ck-rounded-corners &, 2488 &.ck-rounded-corners { 2489 border-radius: var(--ck-border-radius); 2490 @mixin-content; 2491 } 2492} 2493`],sourceRoot:""}]);const C=w},4043:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/form.css"],names:[],mappings:"AAKA,YACC,mCAyBD,CAvBC,kBAEC,YACD,CAEA,8BACC,cAAe,CACf,OACD,CAEA,4BACC,cAWD,CARE,6DACC,4CACD,CAEA,mEACC,UACD",sourcesContent:[`/* 2494 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2495 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2496 */ 2497
2498.ck.ck-form { 2499 padding: 0 0 var(--ck-spacing-large); 2500 2501 &:focus { 2502 /* See: https://github.com/ckeditor/ckeditor5/issues/4773 */ 2503 outline: none; 2504 } 2505 2506 & .ck.ck-input-text { 2507 min-width: 100%; 2508 width: 0; 2509 } 2510 2511 & .ck.ck-dropdown { 2512 min-width: 100%; 2513 2514 & .ck-dropdown__button { 2515 &:not(:focus) { 2516 border: 1px solid var(--ck-color-base-border); 2517 } 2518 2519 & .ck-button__label { 2520 width: 100%; 2521 } 2522 } 2523 } 2524} 2525`],sourceRoot:""}]);const C=w},2655:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{min-width:100%;width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/formrow.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/formrow.css"],names:[],mappings:"AAKA,iBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,6BAaD,CAVC,iCACC,WACD,CAGC,wHAEC,sBACD,CCbF,iBACC,4DA2BD,CAvBE,6CAEE,mCAMF,CARA,6CAME,oCAEF,CAGD,2BAEC,cAAe,CADf,UAED,CAEA,2CACC,kCAKD,CAHC,wEACC,0BACD",sourcesContent:[`/* 2526 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2527 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2528 */ 2529 2530.ck.ck-form__row { 2531 display: flex; 2532 flex-direction: row; 2533 flex-wrap: nowrap; 2534 justify-content: space-between; 2535 2536 /* Ignore labels that work as fieldset legends */ 2537 & > *:not(.ck-label) { 2538 flex-grow: 1; 2539 } 2540 2541 &.ck-table-form__action-row { 2542 & .ck-button-save, 2543 & .ck-button-cancel { 2544 justify-content: center; 2545 } 2546 } 2547} 2548`,`/* 2549 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2550 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2551 */ 2552 2553@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 2554 2555.ck.ck-form__row { 2556 padding: var(--ck-spacing-standard) var(--ck-spacing-large) 0; 2557 2558 /* Ignore labels that work as fieldset legends */ 2559 & > *:not(.ck-label) { 2560 & + * { 2561 @mixin ck-dir ltr { 2562 margin-left: var(--ck-spacing-large); 2563 } 2564 2565 @mixin ck-dir rtl { 2566 margin-right: var(--ck-spacing-large); 2567 } 2568 } 2569 } 2570 2571 & > .ck-label { 2572 width: 100%; 2573 min-width: 100%; 2574 } 2575 2576 &.ck-table-form__action-row { 2577 margin-top: var(--ck-spacing-large); 2578 2579 & .ck-button .ck-button__label { 2580 color: var(--ck-color-text); 2581 } 2582 } 2583} 2584`],sourceRoot:""}]);const C=w},5032:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2)}.ck .ck-insert-table-dropdown__label,.ck[dir=rtl] .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{border:1px solid var(--ck-color-base-border);border-radius:1px;margin:var(--ck-insert-table-dropdown-box-margin);min-height:var(--ck-insert-table-dropdown-box-height);min-width:var(--ck-insert-table-dropdown-box-width);outline:none;transition:none}@media (prefers-reduced-motion:reduce){.ck .ck-insert-table-dropdown-grid-box{transition:none}}.ck .ck-insert-table-dropdown-grid-box:focus{box-shadow:none}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/inserttable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/inserttable.css"],names:[],mappings:"AAKA,oCACC,YAAa,CACb,kBAAmB,CACnB,cACD,CCJA,MACC,uCAAwC,CACxC,0CAA2C,CAC3C,yCAA0C,CAC1C,yCACD,CAEA,oCAGC,yFAA0F,CAD1F,oJAED,CAEA,mFAEC,iBACD,CAEA,uCAIC,4CAA6C,CAC7C,iBAAkB,CAFlB,iDAAkD,CADlD,qDAAsD,CADtD,mDAAoD,CAKpD,YAAa,CACb,eAcD,CAZC,uCATD,uCAUE,eAWF,CAVC,CAEA,6CACC,eACD,CAEA,6CAEC,6CAA8C,CAD9C,yCAED",sourcesContent:[`/* 2585 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2586 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2587 */ 2588 2589.ck .ck-insert-table-dropdown__grid {
2590 display: flex; 2591 flex-direction: row; 2592 flex-wrap: wrap; 2593} 2594`,`/* 2595 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2596 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2597 */ 2598 2599:root { 2600 --ck-insert-table-dropdown-padding: 10px; 2601 --ck-insert-table-dropdown-box-height: 11px; 2602 --ck-insert-table-dropdown-box-width: 12px; 2603 --ck-insert-table-dropdown-box-margin: 1px; 2604} 2605 2606.ck .ck-insert-table-dropdown__grid { 2607 /* The width of a container should match 10 items in a row so there will be a 10x10 grid. */ 2608 width: calc(var(--ck-insert-table-dropdown-box-width) * 10 + var(--ck-insert-table-dropdown-box-margin) * 20 + var(--ck-insert-table-dropdown-padding) * 2); 2609 padding: var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0; 2610} 2611 2612.ck .ck-insert-table-dropdown__label, 2613.ck[dir=rtl] .ck-insert-table-dropdown__label { 2614 text-align: center; 2615} 2616 2617.ck .ck-insert-table-dropdown-grid-box { 2618 min-width: var(--ck-insert-table-dropdown-box-width); 2619 min-height: var(--ck-insert-table-dropdown-box-height); 2620 margin: var(--ck-insert-table-dropdown-box-margin); 2621 border: 1px solid var(--ck-color-base-border); 2622 border-radius: 1px; 2623 outline: none; 2624 transition: none; 2625 2626 @media (prefers-reduced-motion: reduce) { 2627 transition: none; 2628 } 2629 2630 &:focus { 2631 box-shadow: none; 2632 } 2633 2634 &.ck-on { 2635 border-color: var(--ck-color-focus-border); 2636 background: var(--ck-color-focus-outer-shadow); 2637 } 2638} 2639 2640`],sourceRoot:""}]);const C=w},2329:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck-content .table{display:table;margin:.9em auto}.ck-content .table table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;height:100%;width:100%}.ck-content .table table td,.ck-content .table table th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content .table table th{background:rgba(0,0,0,.05);font-weight:700}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/table.css"],names:[],mappings:"AAKA,mBAKC,aAAc,CADd,gBAiCD,CA9BC,yBAYC,yBAAkC,CAVlC,wBAAyB,CACzB,gBAAiB,CAKjB,WAAY,CADZ,UAsBD,CAfC,wDAQC,wBAAiC,CANjC,aAAc,CACd,YAMD,CAEA,4BAEC,0BAA+B,CAD/B,eAED,CAMF,+BACC,gBACD,CAEA,+BACC,eACD,CAEA,+CAKC,oBAAqB,CAMrB,UACD",sourcesContent:[`/* 2641 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2642 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2643 */ 2644 2645.ck-content .table { 2646 /* Give the table widget some air and center it horizontally */ 2647 /* The first value should be equal to --ck-spacing-large variable if used in the editor context 2648 to avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */ 2649 margin: 0.9em auto; 2650 display: table; 2651 2652 & table { 2653 /* The table cells should have slight borders */ 2654 border-collapse: collapse; 2655 border-spacing: 0; 2656 2657 /* Table width and height are set on the parent <figure>. Make sure the table inside stretches 2658 to the full dimensions of the container (https://github.com/ckeditor/ckeditor5/issues/6186). */ 2659 width: 100%; 2660 height: 100%; 2661 2662 /* The outer border of the table should be slightly darker than the inner lines. 2663 Also see https://github.com/ckeditor/ckeditor5-table/issues/50. */ 2664 border: 1px double hsl(0, 0%, 70%); 2665 2666 & td, 2667 & th { 2668 min-width: 2em; 2669 padding: .4em; 2670 2671 /* The border is inherited from .ck-editor__nested-editable styles, so theoretically it's not necessary here. 2672 However, the border is a content style, so it should use .ck-content (so it works outside the editor). 2673 Hence, the duplication. See https://github.com/ckeditor/ckeditor5/issues/6314 */ 2674 border: 1px solid hsl(0, 0%, 75%); 2675 } 2676 2677 & th { 2678 font-weight: bold; 2679 background: hsla(0, 0%, 0%, 5%); 2680 } 2681 } 2682} 2683 2684/* Text alignment of the table header should match the editor settings and override the native browser styling, 2685when content is available outside the editor. See https://github.com/ckeditor/ckeditor5/issues/6638 */ 2686.ck-content[dir="rtl"] .table th { 2687 text-align: right; 2688} 2689 2690.ck-content[dir="ltr"] .table th { 2691 text-align: left; 2692} 2693 2694.ck-editor__editable .ck-table-bogus-paragraph { 2695 /* 2696 * Use display:inline-block to force Chrome/Safari to limit text mutations to this element. 2697 * See https://github.com/ckeditor/ckeditor5/issues/6062. 2698 */ 2699 display: inline-block; 2700 2701 /* 2702 * Inline HTML elements nested in the span should always be dimensioned in relation to the whole cell width. 2703 * See https://github.com/ckeditor/ckeditor5/issues/9117. 2704 */ 2705 width: 100%; 2706} 2707`],sourceRoot:""}]);const C=w},4143:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,":root{--ck-color-selector-caption-background:#f7f7f7;--ck-color-selector-caption-text:#333;--ck-color-selector-caption-highlighted-background:#fd0}.ck-content .table>figcaption{background-color:var(--ck-color-selector-caption-background);caption-side:top;color:var(--ck-color-selector-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;text-align:center;word-break:break-word}@media (forced-colors:active){.ck-content .table>figcaption{background-color:unset;color:unset}}@media (forced-colors:none){.ck.ck-editor__editable .table>figcaption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}}.ck.ck-editor__editable .table>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}@keyframes ck-table-caption-highlight{0%{background-color:var(--ck-color-selector-caption-highlighted-background)}to{background-color:var(--ck-color-selector-caption-background)}}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/tablecaption.css","webpack://./../ckeditor5-ui/theme/mixins/_mediacolors.css"],names:[],mappings:"AAOA,MACC,8CAAuD,CACvD,qCAAiD,CACjD,uDACD,CAGA,8BAMC,4DAA6D,CAJ7D,gBAAiB,CAGjB,2CAA4C,CAJ5C,qBAAsB,CAOtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,iBAAkB,CADlB,qBAaD,CCxBC,8BACC,8BDoBA,sBAAuB,CACvB,WCnBA,CACD,
2707CAIA,4BDqBC,qEACC,iDACD,CCnBD,CDsBA,gEASC,eAAgB,CARhB,oBAAqB,CACrB,qBAAsB,CAQtB,sBAAuB,CAFvB,kBAGD,CAGD,sCACC,GACC,wEACD,CAEA,GACC,4DACD,CACD",sourcesContent:[`/* 2708 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2709 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2710 */ 2711 2712@import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css"; 2713 2714:root { 2715 --ck-color-selector-caption-background: hsl(0, 0%, 97%); 2716 --ck-color-selector-caption-text: hsl(0, 0%, 20%); 2717 --ck-color-selector-caption-highlighted-background: hsl(52deg 100% 50%); 2718} 2719 2720/* Content styles */ 2721.ck-content .table > figcaption { 2722 display: table-caption; 2723 caption-side: top; 2724 word-break: break-word; 2725 text-align: center; 2726 color: var(--ck-color-selector-caption-text); 2727 background-color: var(--ck-color-selector-caption-background); 2728 padding: .6em; 2729 font-size: .75em; 2730 outline-offset: -1px; 2731 2732 /* Improve placeholder rendering in high-constrast mode (https://github.com/ckeditor/ckeditor5/issues/14907). */ 2733 @mixin ck-media-forced-colors { 2734 background-color: unset; 2735 color: unset; 2736 } 2737} 2738 2739/* Editing styles */ 2740.ck.ck-editor__editable .table > figcaption { 2741 @mixin ck-media-default-colors { 2742 &.table__caption_highlighted { 2743 animation: ck-table-caption-highlight .6s ease-out; 2744 } 2745 } 2746 2747 &.ck-placeholder::before { 2748 padding-left: inherit; 2749 padding-right: inherit; 2750 2751 /* 2752 * Make sure the table caption placeholder doesn't overflow the placeholder area. 2753 * See https://github.com/ckeditor/ckeditor5/issues/9162. 2754 */ 2755 white-space: nowrap; 2756 overflow: hidden; 2757 text-overflow: ellipsis; 2758 } 2759} 2760 2761@keyframes ck-table-caption-highlight { 2762 0% { 2763 background-color: var(--ck-color-selector-caption-highlighted-background); 2764 } 2765 2766 100% { 2767 background-color: var(--ck-color-selector-caption-background); 2768 } 2769} 2770`,`/* 2771 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2772 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2773 */ 2774 2775@define-mixin ck-media-forced-colors { 2776 @media (forced-colors: active) { 2777 & { 2778 @mixin-content; 2779 } 2780 } 2781} 2782 2783@define-mixin ck-media-default-colors { 2784 @media (forced-colors: none) { 2785 & { 2786 @mixin-content; 2787 } 2788 } 2789} 2790`],sourceRoot:""}]);const C=w},8986:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/tablecellproperties.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tablecellproperties.css"],names:[],mappings:"AAOE,6FACC,cAiBD,CAdE,0HAEC,cACD,CAEA,yHAEC,cACD,CAEA,uHACC,WACD,CClBJ,kCACC,WAkBD,CAfE,2FACC,mBAAoB,CACpB,SAAU,CACV,SACD,CAGC,4GACC,eAAgB,CAGhB,qCACD",sourcesContent:[`/* 2791 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2792 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2793 */ 2794 2795.ck.ck-table-cell-properties-form { 2796 & .ck-form__row { 2797 &.ck-table-cell-properties-form__alignment-row { 2798 flex-wrap: wrap; 2799 2800 & .ck.ck-toolbar { 2801 &:first-of-type { 2802 /* 4 buttons out of 7 (h-alignment + v-alignment) = 0.57 */ 2803 flex-grow: 0.57; 2804 } 2805 2806 &:last-of-type { 2807 /* 3 buttons out of 7 (h-alignment + v-alignment) = 0.43 */ 2808 flex-grow: 0.43; 2809 } 2810 2811 & .ck-button { 2812 flex-grow: 1; 2813 } 2814 } 2815 } 2816 } 2817} 2818`,`/* 2819 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2820 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2821 */ 2822
2823.ck.ck-table-cell-properties-form { 2824 width: 320px; 2825 2826 & .ck-form__row { 2827 &.ck-table-cell-properties-form__padding-row { 2828 align-self: flex-end; 2829 padding: 0; 2830 width: 25%; 2831 } 2832 2833 &.ck-table-cell-properties-form__alignment-row { 2834 & .ck.ck-toolbar { 2835 background: none; 2836 2837 /* Compensate for missing input label that would push the margin (toolbar has no inputs). */ 2838 margin-top: var(--ck-spacing-standard); 2839 } 2840 } 2841 } 2842} 2843`],sourceRoot:""}]);const C=w},8795:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,":root{--ck-color-selector-column-resizer-hover:var(--ck-color-base-active);--ck-table-column-resizer-width:7px;--ck-table-column-resizer-position-offset:calc(var(--ck-table-column-resizer-width)*-0.5 - 0.5px)}.ck-content .table .ck-table-resized{table-layout:fixed}.ck-content .table table{overflow:hidden}.ck-content .table td,.ck-content .table th{overflow-wrap:break-word;position:relative}.ck.ck-editor__editable .table .ck-table-column-resizer{bottom:0;cursor:col-resize;position:absolute;right:var(--ck-table-column-resizer-position-offset);top:0;user-select:none;width:var(--ck-table-column-resizer-width);z-index:var(--ck-z-default)}.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer,.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer{display:none}.ck.ck-editor__editable .table .ck-table-column-resizer:hover,.ck.ck-editor__editable .table .ck-table-column-resizer__active{background-color:var(--ck-color-selector-column-resizer-hover);bottom:-999999px;opacity:.25;top:-999999px}.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer{left:var(--ck-table-column-resizer-position-offset);right:unset}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/tablecolumnresize.css"],names:[],mappings:"AAKA,MACC,oEAAqE,CACrE,mCAAoC,CAIpC,iGACD,CAEA,qCACC,kBACD,CAEA,yBACC,eACD,CAEA,4CAIC,wBAAyB,CACzB,iBACD,CAEA,wDAGC,QAAS,CAGT,iBAAkB,CALlB,iBAAkB,CAGlB,oDAAqD,CAFrD,KAAM,CAKN,gBAAiB,CAFjB,0CAA2C,CAG3C,2BACD,CAQA,qJACC,YACD,CAEA,8HAEC,8DAA+D,CAO/D,gBAAiB,CANjB,WAAa,CAKb,aAED,CAEA,iEACC,mDAAoD,CACpD,WACD",sourcesContent:[`/* 2844 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2845 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2846 */ 2847 2848:root { 2849 --ck-color-selector-column-resizer-hover: var(--ck-color-base-active); 2850 --ck-table-column-resizer-width: 7px; 2851 2852 /* The offset used for absolute positioning of the resizer element, so that it is placed exactly above the cell border. 2853 The value is: minus half the width of the resizer decreased additionaly by the half the width of the border (0.5px). */ 2854 --ck-table-column-resizer-position-offset: calc(var(--ck-table-column-resizer-width) * -0.5 - 0.5px); 2855} 2856 2857.ck-content .table .ck-table-resized { 2858 table-layout: fixed; 2859} 2860 2861.ck-content .table table { 2862 overflow: hidden; 2863} 2864 2865.ck-content .table td, 2866.ck-content .table th { 2867 /* To prevent text overflowing beyond its cell when columns are resized by resize handler 2868 (https://github.com/ckeditor/ckeditor5/pull/14379#issuecomment-1589460978). */ 2869 overflow-wrap: break-word; 2870 position: relative; 2871} 2872 2873.ck.ck-editor__editable .table .ck-table-column-resizer { 2874 position: absolute; 2875 top: 0; 2876 bottom: 0; 2877 right: var(--ck-table-column-resizer-position-offset); 2878 width: var(--ck-table-column-resizer-width); 2879 cursor: col-resize; 2880 user-select: none; 2881 z-index: var(--ck-z-default); 2882} 2883 2884.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer { 2885 display: none; 2886} 2887 2888/* The resizer elements, which are extended to an extremely high height, break the drag & drop feature in Chrome. To make it work again, 2889 all resizers must be hidden while the table is dragged. */ 2890.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer { 2891 display: none; 2892} 2893 2894.ck.ck-editor__editable .table .ck-table-column-resizer:hover, 2895.ck.ck-editor__editable .table .ck-table-column-resizer__active { 2896 background-color: var(--ck-color-selector-column-resizer-hover); 2897 opacity: 0.25; 2898 /* The resizer element resides in each cell so to occupy the entire height of the table, which is unknown from a CSS point of view, 2899 it is extended to an extremely high height. Even for screens
2899with a very high pixel density, the resizer will fulfill its role as 2900 it should, i.e. for a screen of 476 ppi the total height of the resizer will take over 350 sheets of A4 format, which is totally 2901 unrealistic height for a single table. */ 2902 top: -999999px; 2903 bottom: -999999px; 2904} 2905 2906.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer { 2907 left: var(--ck-table-column-resizer-position-offset); 2908 right: unset; 2909} 2910`],sourceRoot:""}]);const C=w},8137:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,":root{--ck-color-selector-focused-cell-background:rgba(158,201,250,.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-selector-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableediting.css"],names:[],mappings:"AAKA,MACC,gEACD,CAKE,8QAGC,2DAA4D,CAK5D,iBAAkB,CAClB,8CAA+C,CAC/C,mBACD",sourcesContent:[`/* 2911 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2912 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2913 */ 2914 2915:root { 2916 --ck-color-selector-focused-cell-background: hsla(212, 90%, 80%, .3); 2917} 2918 2919.ck-widget.table { 2920 & td, 2921 & th { 2922 &.ck-editor__nested-editable.ck-editor__nested-editable_focused, 2923 &.ck-editor__nested-editable:focus { 2924 /* A very slight background to highlight the focused cell */ 2925 background: var(--ck-color-selector-focused-cell-background); 2926 2927 /* Fixes the problem where surrounding cells cover the focused cell's border. 2928 It does not fix the problem in all places but the UX is improved. 2929 See https://github.com/ckeditor/ckeditor5-table/issues/29. */ 2930 border-style: none; 2931 outline: 1px solid var(--ck-color-focus-border); 2932 outline-offset: -1px; /* progressive enhancement - no IE support */ 2933 } 2934 } 2935} 2936`],sourceRoot:""}]);const C=w},1623:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{align-items:center;flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{align-items:center;display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;position:absolute;transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";left:50%;position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:80px;min-width:80px;width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}
2936.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}@media (prefers-reduced-motion:reduce){.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:none}}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',"",{version:3,sources:["webpack://./../ckeditor5-table/theme/tableform.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableform.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAWE,wHACC,cACD,CAEA,8DAEC,kBAAmB,CADnB,cAgBD,CAbC,qFAGC,kBAAmB,CAFnB,YAAa,CACb,6BAMD,CAEA,sMACC,WACD,CAIF,4CAEC,iBAoBD,CAlBC,8EAGC,2DAAgE,CADhE,QAAS,CADT,iBAAkB,CAGlB,8BAA+B,CAG/B,SAUD,CAPC,oFACC,UAAW,CAGX,QAAS,CAFT,iBAAkB,CAClB,wDAA6D,CAE7D,0BACD,CChDH,MACC,0CAA2C,CAC3C,2CACD,CAMI,2FACC,kCAAmC,CACnC,iBACD,CAGD,8KAIC,cAAe,CADf,cAAe,CADf,UAGD,CAGD,8DACC,SAcD,CAZC,yMAEC,QACD,CAEA,iGACC,mBAAoB,CACpB,oBAAqB,CACrB,wCAAyC,CACzC,6CAA8C,CAC9C,gCACD,CAIF,4CACC,sCA6BD,CA3BC,8ECxCD,eD6DC,CArBA,mMCpCA,qCDyDA,CArBA,8EAGC,qCAAsC,CACtC,qCAAsC,CAEtC,oDAAqD,CADrD,wDAAyD,CAEzD,iBAcD,CAXC,oFACC,2EAA4E,CAE5E,kBAAmB,CADnB,kJAED,CAdD,8EAgBC,iEAKD,CAHC,uCAlBD,8EAmBE,cAEF,CADC,CAID,6GACC,YACD,CAIF,oDACC,GACC,SACD,CAEA,GACC,SACD,CACD",sourcesContent:[`/* 2937 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2938 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2939 */ 2940 2941.ck.ck-table-form { 2942 & .ck-form__row { 2943 &.ck-table-form__border-row { 2944 flex-wrap: wrap; 2945 } 2946 2947 &.ck-table-form__background-row { 2948 flex-wrap: wrap; 2949 } 2950 2951 &.ck-table-form__dimensions-row { 2952 flex-wrap: wrap; 2953 align-items: center; 2954 2955 & .ck-labeled-field-view { 2956 display: flex; 2957 flex-direction: column-reverse; 2958 align-items: center; 2959 2960 & .ck.ck-dropdown { 2961 flex-grow: 0; 2962 } 2963 } 2964 2965 & .ck-table-form__dimension-operator { 2966 flex-grow: 0; 2967 } 2968 } 2969 } 2970 2971 & .ck.ck-labeled-field-view { 2972 /* Allow absolute positioning of the status (error) balloons. */ 2973 position: relative; 2974 2975 & .ck.ck-labeled-field-view__status { 2976 position: absolute; 2977 left: 50%; 2978 bottom: calc( -1 * var(--ck-table-properties-error-arrow-size) ); 2979 transform: translate(-50%,100%); 2980 2981 /* Make sure the balloon status stays on top of other form elements. */ 2982 z-index: 1; 2983 2984 /* The arrow pointing towards the field. */ 2985 &::after { 2986 content: ""; 2987 position: absolute; 2988 top: calc( -1 * var(--ck-table-properties-error-arrow-size) ); 2989 left: 50%; 2990 transform: translateX( -50% ); 2991 } 2992 } 2993 } 2994} 2995`,`/* 2996 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 2997 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 2998 */ 2999 3000@import "../mixins/_rounded.css"; 3001 3002:root { 3003 --ck-table-properties-error-arrow-size: 6px; 3004 --ck-table-properties-min-error-width: 150px; 3005} 3006 3007.ck.ck-table-form { 3008 & .ck-form__row { 3009 &.ck-table-form__border-row { 3010 & .ck-labeled-field-view { 3011 & > .ck-label { 3012 font-size: var(--ck-font-size-tiny); 3013 text-align: center; 3014 } 3015 } 3016 3017 & .ck-table-form__border-style, 3018 & .ck-table-form__border-width { 3019 width: 80px; 3020 min-width: 80px; 3021 max-width: 80px; 3022 } 3023 } 3024 3025 &.ck-table-form__dimensions-row { 3026 padding: 0; 3027 3028 & .ck-table-form__dimensions-row__width, 3029 & .ck-table-form__dimensions-row__height { 3030 margin: 0 3031 } 3032 3033 & .ck-table-form__dimension-operator { 3034 align-self: flex-end; 3035 display: inline-block; 3036 height: var(--ck-ui-component-min-height); 3037 line-height: var(--ck-ui-component-min-height); 3038 margin: 0 var(--ck-spacing-small); 3039 } 3040 } 3041 } 3042 3043 & .ck.ck-labeled-field-view { 3044 padding-top: var(--ck-spacing-standard); 3045 3046 & .ck.ck-labeled-field-view__status { 3047 @mixin ck-rounded-corners; 3048 3049 background: var(--ck-color-base-error); 3050 color: var(--ck-color-base-background); 3051 padding: var(--ck-spacing-small) var(--ck-spacing-medium); 3052 min-width: var(--ck-table-properties-min-error-width); 3053 text-align: center; 3054 3055 /* The arrow pointing towards the field. */ 3056 &::after { 3057 border-color: transparent transparent var(--ck-color-base-error) transparent; 3058 border-width: 0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size); 3059 border-style: solid; 3060 } 3061 3062 animation: ck-table-form-labeled-view-status-appear .15s ease both; 3063 3064 @media (prefers-reduced-motion: reduce) { 3065 animation: none; 3066 } 3067 } 3068 3069 /* Hide the error balloon when the field is blurred. Makes the experience much more clear. */ 3070 & .ck-input.ck-error:not(:focus) + .ck.ck-labeled-field-view__status { 3071 display: none; 3072 } 3073 } 3074} 3075 3076@keyframes ck-table-form-labeled-view-status-appear { 3077 0% { 3078 opacity: 0; 3079 } 3080 3081 100% { 3082 opacity: 1; 3083 } 3084} 3085`,`/* 3086 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3087 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3088 */ 3089 3090/** 3091 * Implements rounded corner interface for .ck-rounded-corners class. 3092 * 3093 * @see $ck-border-radius 3094 */ 3095@define-mixin ck-rounded-corners { 3096 border-radius: 0; 3097 3098 @nest .ck-rounded-corners &, 3099 &.ck-rounded-corners { 3100 border-radius: var(--ck-border-radius); 3101 @mixin-content; 3102 } 3103} 3104`],sourceRoot:""}]);const C=w},5562:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-content:baseline;flex-basis:0;flex-wrap:wrap}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}","",{version:3,sources:["webpack://./../ckeditor5-table/theme/tableproperties.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableproperties.css"],names:[],mappings:"AAOE,mFAGC,sBAAuB,CADvB,YAAa,CADb,cAOD,CAHC,qHACC,gBACD,CCTH,6BACC,WAmBD,CAhBE,mFACC,mBAAoB,CACpB,SAYD,CAVC,kGACC,eAAgB,CAGhB,qCAKD,CAHC,uHACC,UACD",sourcesContent:[`/* 3105 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3106 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3107 */ 3108
3109.ck.ck-table-properties-form { 3110 & .ck-form__row { 3111 &.ck-table-properties-form__alignment-row { 3112 flex-wrap: wrap; 3113 flex-basis: 0; 3114 align-content: baseline; 3115 3116 & .ck.ck-toolbar .ck-toolbar__items { 3117 flex-wrap: nowrap; 3118 } 3119 } 3120 } 3121} 3122`,`/* 3123 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3124 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3125 */ 3126 3127.ck.ck-table-properties-form { 3128 width: 320px; 3129 3130 & .ck-form__row { 3131 &.ck-table-properties-form__alignment-row { 3132 align-self: flex-end; 3133 padding: 0; 3134 3135 & .ck.ck-toolbar { 3136 background: none; 3137 3138 /* Compensate for missing input label that would push the margin (toolbar has no inputs). */ 3139 margin-top: var(--ck-spacing-standard); 3140 3141 & .ck-toolbar__items > * { 3142 width: 40px; 3143 } 3144 } 3145 } 3146 } 3147} 3148`],sourceRoot:""}]);const C=w},8423:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,':root{--ck-table-selected-cell-background:rgba(158,207,250,.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{box-shadow:unset;caret-color:transparent;outline:unset;position:relative}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{background-color:var(--ck-table-selected-cell-background);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',"",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableselection.css"],names:[],mappings:"AAKA,MACC,wDACD,CAGC,0IAKC,gBAAiB,CAFjB,uBAAwB,CACxB,aAAc,CAFd,iBAiCD,CA3BC,sJAGC,yDAA0D,CAK1D,QAAS,CAPT,UAAW,CAKX,MAAO,CAJP,mBAAoB,CAEpB,iBAAkB,CAGlB,OAAQ,CAFR,KAID,CAEA,wTAEC,4BACD,CAMA,gKACC,aAKD,CAHC,0NACC,YACD",sourcesContent:[`/* 3149 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3150 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3151 */ 3152 3153:root { 3154 --ck-table-selected-cell-background: hsla(208, 90%, 80%, .3); 3155} 3156 3157.ck.ck-editor__editable .table table { 3158 & td.ck-editor__editable_selected, 3159 & th.ck-editor__editable_selected { 3160 position: relative; 3161 caret-color: transparent; 3162 outline: unset; 3163 box-shadow: unset; 3164 3165 /* https://github.com/ckeditor/ckeditor5/issues/6446 */ 3166 &:after { 3167 content: ''; 3168 pointer-events: none; 3169 background-color: var(--ck-table-selected-cell-background); 3170 position: absolute; 3171 top: 0; 3172 left: 0; 3173 right: 0; 3174 bottom: 0; 3175 } 3176 3177 & ::selection, 3178 &:focus { 3179 background-color: transparent; 3180 } 3181 3182 /* 3183 * To reduce the amount of noise, all widgets in the table selection have no outline and no selection handle. 3184 * See https://github.com/ckeditor/ckeditor5/issues/9491. 3185 */ 3186 & .ck-widget { 3187 outline: unset; 3188 3189 & > .ck-widget__selection-handle { 3190 display: none; 3191 } 3192 } 3193 } 3194} 3195`],sourceRoot:""}]);const C=w},1801:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-aria-live-announcer{left:-10000px;position:absolute;top:-10000px}.ck.ck-aria-live-region-list{list-style-type:none}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/arialiveannouncer/arialiveannouncer.css"],names:[],mappings:"AAKA,2BAEC,aAAc,CADd,iBAAkB,CAElB,YACD,CAEA,6BACC,oBACD",sourcesContent:[`/* 3196 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3197 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3198 */ 3199
3200.ck.ck-aria-live-announcer { 3201 position: absolute; 3202 left: -10000px; 3203 top: -10000px; 3204} 3205 3206.ck.ck-aria-live-region-list { 3207 list-style-type: none; 3208} 3209`],sourceRoot:""}]);const C=w},5727:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-autocomplete{position:relative}.ck.ck-autocomplete>.ck-search__results{position:absolute;z-index:var(--ck-z-panel)}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{bottom:100%}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{bottom:auto;top:100%}.ck.ck-autocomplete>.ck-search__results{border-radius:0}.ck-rounded-corners .ck.ck-autocomplete>.ck-search__results,.ck.ck-autocomplete>.ck-search__results.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-autocomplete>.ck-search__results{background:var(--ck-color-base-background);border:1px solid var(--ck-color-dropdown-panel-border);box-shadow:var(--ck-drop-shadow),0 0;max-height:200px;min-width:auto;overflow-y:auto}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{border-bottom-left-radius:0;border-bottom-right-radius:0;margin-bottom:-1px}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{border-top-left-radius:0;border-top-right-radius:0;margin-top:-1px}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/autocomplete/autocomplete.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/autocomplete/autocomplete.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,oBACC,iBAeD,CAbC,wCACC,iBAAkB,CAClB,yBAUD,CARC,6DACC,WACD,CAEA,6DAEC,WAAY,CADZ,QAED,CCVD,wCCEA,eDuBA,CAzBA,uHCMC,qCDmBD,CAzBA,wCAMC,0CAA2C,CAC3C,sDAAuD,CEPxD,oCAA8B,CFI7B,gBAAiB,CAIjB,cAAe,CAHf,eAoBD,CAfC,6DACC,2BAA4B,CAC5B,4BAA6B,CAG7B,kBACD,CAEA,6DACC,wBAAyB,CACzB,yBAA0B,CAG1B,eACD",sourcesContent:[`/* 3210 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3211 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3212 */ 3213 3214.ck.ck-autocomplete { 3215 position: relative; 3216 3217 & > .ck-search__results { 3218 position: absolute; 3219 z-index: var(--ck-z-panel); 3220 3221 &.ck-search__results_n { 3222 bottom: 100%; 3223 } 3224 3225 &.ck-search__results_s { 3226 top: 100%; 3227 bottom: auto; 3228 } 3229 } 3230} 3231`,`/* 3232 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3233 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3234 */ 3235 3236@import "@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"; 3237@import "@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"; 3238 3239.ck.ck-autocomplete { 3240 & > .ck-search__results { 3241 @mixin ck-rounded-corners; 3242 @mixin ck-drop-shadow; 3243 3244 max-height: 200px; 3245 overflow-y: auto; 3246 background: var(--ck-color-base-background); 3247 border: 1px solid var(--ck-color-dropdown-panel-border); 3248 min-width: auto; 3249 3250 &.ck-search__results_n { 3251 border-bottom-left-radius: 0; 3252 border-bottom-right-radius: 0; 3253 3254 /* Prevent duplicated borders between the input and the results pane. */ 3255 margin-bottom: -1px; 3256 } 3257 3258 &.ck-search__results_s { 3259 border-top-left-radius: 0; 3260 border-top-right-radius: 0; 3261 3262 /* Prevent duplicated borders between the input and the results pane. */ 3263 margin-top: -1px; 3264 } 3265 } 3266} 3267`,`/* 3268 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3269 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3270 */ 3271 3272/** 3273 * Implements rounded corner interface for .ck-rounded-corners class. 3274 * 3275 * @see $ck-border-radius 3276 */ 3277@define-mixin ck-rounded-corners { 3278 border-radius: 0; 3279 3280 @nest .ck-rounded-corners &, 3281 &.ck-rounded-corners { 3282 border-radius: var(--ck-border-radius); 3283 @mixin-content; 3284 } 3285} 3286`,`/* 3287 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3288 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3289 */ 3290 3291/** 3292 * A helper to combine multiple shadows. 3293 */ 3294@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 { 3295 box-shadow: $shadowA, $shadowB; 3296} 3297 3298/** 3299 * Gives an element a drop shadow so it looks like a floating panel. 3300 */ 3301@define-mixin ck-drop-shadow {
3302 @mixin ck-box-shadow var(--ck-drop-shadow); 3303} 3304`],sourceRoot:""}]);const C=w},9715:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir=ltr] .ck.ck-button,[dir=ltr] a.ck.ck-button{justify-content:left}[dir=rtl] .ck.ck-button,[dir=rtl] a.ck.ck-button{justify-content:right}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}@media (prefers-reduced-motion:reduce){.ck.ck-button,a.ck.ck-button{transition:none}}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{opacity:.5}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/button/button.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/button.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/mixins/_button.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AAQA,6BAMC,kBAAmB,CADnB,mBAAoB,CADpB,iBAAkB,CCHlB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD0BD,CA9BA,iDASE,oBAqBF,CA9BA,iDAaE,qBAiBF,CAdC,iEACC,YACD,CAGC,yGACC,oBACD,
3304CAID,iFACC,sBACD,CEzBD,6BCAC,oDD+ID,CC5IE,6EACC,0DACD,CAEA,+EACC,2DACD,CAID,qDACC,6DACD,CDfD,6BEDC,eFgJD,CA/IA,wIEGE,qCF4IF,CA/IA,6BA6BC,uBAAwB,CANxB,4BAA6B,CAjB7B,cAAe,CAcf,iBAAkB,CAHlB,aAAc,CAJd,4CAA6C,CAD7C,2CAA4C,CAJ5C,8BAA+B,CAC/B,iBAAkB,CAiBlB,4DAA8D,CAnB9D,qBAAsB,CAFtB,kBA0ID,CAhHC,uCA/BD,6BAgCE,eA+GF,CA9GC,CAEA,oFGpCA,2BAA2B,CCF3B,2CAA8B,CDC9B,YHyCA,CAIC,kJAEC,aACD,CAGD,iEAIC,aAAc,CACd,cAAe,CAHf,iBAAkB,CAClB,mBAAoB,CAMpB,qBASD,CAlBA,qFAYE,eAMF,CAlBA,qFAgBE,gBAEF,CAEA,yEACC,aAWD,CAZA,6FAIE,mCAQF,CAZA,6FAQE,oCAIF,CAZA,yEAWC,UACD,CAIC,oIIxFD,oDJ4FC,CAOA,gLKnGD,kCLqGC,CAEA,iGACC,UACD,CAGD,qEACC,yDAcD,CAXC,2HAEE,4CAA+C,CAC/C,oCAOF,CAVA,2HAQE,mCAAoC,CADpC,6CAGF,CAKA,mHACC,WACD,CAID,yCClIA,+CDsIA,CCnIC,yFACC,qDACD,CAEA,2FACC,sDACD,CAID,iEACC,wDACD,CDmHA,yCAGC,qCACD,CAEA,2DACC,iCACD,CAEA,+DACC,mCACD,CAID,2CClJC,mDDuJD,CCpJE,2FACC,yDACD,CAEA,6FACC,0DACD,CAID,mEACC,4DACD,CDmID,2CAIC,wCACD,CAEA,uCAEC,eACD",sourcesContent:[`/* 3305 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3306 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3307 */ 3308 3309@import "../../mixins/_unselectable.css"; 3310@import "../../mixins/_dir.css"; 3311 3312.ck.ck-button, 3313a.ck.ck-button { 3314 @mixin ck-unselectable; 3315 3316 position: relative; 3317 display: inline-flex; 3318 align-items: center; 3319 3320 @mixin ck-dir ltr { 3321 justify-content: left; 3322 } 3323 3324 @mixin ck-dir rtl { 3325 justify-content: right; 3326 } 3327 3328 & .ck-button__label { 3329 display: none; 3330 } 3331 3332 &.ck-button_with-text { 3333 & .ck-button__label { 3334 display: inline-block; 3335 } 3336 } 3337 3338 /* Center the icon horizontally in a button without text. */ 3339 &:not(.ck-button_with-text) { 3340 justify-content: center; 3341 } 3342} 3343`,`/* 3344 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3345 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3346 */ 3347 3348/** 3349 * Makes element unselectable. 3350 */ 3351@define-mixin ck-unselectable { 3352 -moz-user-select: none; 3353 -webkit-user-select: none; 3354 -ms-user-select: none; 3355 user-select: none 3356} 3357`,`/* 3358 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3359 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3360 */ 3361 3362@import "../../../mixins/_focus.css"; 3363@import "../../../mixins/_shadow.css"; 3364@import "../../../mixins/_disabled.css"; 3365@import "../../../mixins/_rounded.css"; 3366@import "../../mixins/_button.css"; 3367@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 3368 3369.ck.ck-button, 3370a.ck.ck-button { 3371 @mixin ck-button-colors --ck-color-button-default; 3372 @mixin ck-rounded-corners; 3373 3374 white-space: nowrap; 3375 cursor: default; 3376 vertical-align: middle; 3377 padding: var(--ck-spacing-tiny); 3378 text-align: center; 3379 3380 /* A very important piece of styling. Go to variable declaration to learn more. */ 3381 min-width: var(--ck-ui-component-min-height); 3382 min-height: var(--ck-ui-component-min-height); 3383 3384 /* Normalize the height of the line. Removing this will break consistent height 3385 among text and text-less buttons (with icons). */ 3386 line-height: 1; 3387 3388 /* Enable font size inheritance, which allows fluid UI scaling. */ 3389 font-size: inherit; 3390 3391 /* Avoid flickering when the foucs border shows up. */ 3392 border: 1px solid transparent; 3393 3394 /* Apply some smooth transition to the box-shadow and border. */ 3395 transition: box-shadow .2s ease-in-out, border .2s ease-in-out; 3396 3397 /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/189 */ 3398 -webkit-appearance: none; 3399 3400 @media (prefers-reduced-motion: reduce) { 3401 transition: none; 3402 } 3403 3404 &:active, 3405 &:focus { 3406 @mixin ck-focus-ring; 3407 @mixin ck-box-shadow var(--ck-focus-outer-shadow); 3408 } 3409 3410 /* Allow icon coloring using the text "color" property. */ 3411 & .ck-button__icon { 3412 & use, 3413 & use * { 3414 color: inherit; 3415 } 3416 } 3417 3418 & .ck-button__label { 3419 /* Enable font size inheritance, which allows fluid UI scaling. */ 3420 font-size: inherit; 3421 font-weight: inherit; 3422 color: inherit; 3423 cursor: inherit; 3424 3425 /* Must be consistent with .ck-icon's vertical align. Otherwise, buttons with and 3426 without labels (but with icons) have different sizes in Chrome */ 3427 vertical-align: middle; 3428 3429 @mixin ck-dir ltr { 3430 text-align: left; 3431 } 3432 3433 @mixin ck-dir rtl { 3434 text-align: right; 3435 } 3436 } 3437 3438 & .ck-button__keystroke { 3439 color: inherit; 3440 3441 @mixin ck-dir ltr { 3442 margin-left: var(--ck-spacing-large); 3443 } 3444 3445 @mixin ck-dir rtl { 3446 margin-right: var(--ck-spacing-large); 3447 } 3448 3449 opacity: .5; 3450 } 3451 3452 /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */ 3453 &.ck-disabled { 3454 &:active, 3455 &:focus { 3456 /* The disabled button should have a slightly less visible shadow when focu
3456sed. */ 3457 @mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow); 3458 } 3459 3460 & .ck-button__icon { 3461 @mixin ck-disabled; 3462 } 3463 3464 /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */ 3465 & .ck-button__label { 3466 @mixin ck-disabled; 3467 } 3468 3469 & .ck-button__keystroke { 3470 opacity: .3; 3471 } 3472 } 3473 3474 &.ck-button_with-text { 3475 padding: var(--ck-spacing-tiny) var(--ck-spacing-standard); 3476 3477 /* stylelint-disable-next-line no-descending-specificity */ 3478 & .ck-button__icon { 3479 @mixin ck-dir ltr { 3480 margin-left: calc(-1 * var(--ck-spacing-small)); 3481 margin-right: var(--ck-spacing-small); 3482 } 3483 3484 @mixin ck-dir rtl { 3485 margin-right: calc(-1 * var(--ck-spacing-small)); 3486 margin-left: var(--ck-spacing-small); 3487 } 3488 } 3489 } 3490 3491 &.ck-button_with-keystroke { 3492 /* stylelint-disable-next-line no-descending-specificity */ 3493 & .ck-button__label { 3494 flex-grow: 1; 3495 } 3496 } 3497 3498 /* A style of the button which is currently on, e.g. its feature is active. */ 3499 &.ck-on { 3500 @mixin ck-button-colors --ck-color-button-on; 3501 3502 color: var(--ck-color-button-on-color); 3503 } 3504 3505 &.ck-button-save { 3506 color: var(--ck-color-button-save); 3507 } 3508 3509 &.ck-button-cancel { 3510 color: var(--ck-color-button-cancel); 3511 } 3512} 3513 3514/* A style of the button which handles the primary action. */ 3515.ck.ck-button-action, 3516a.ck.ck-button-action { 3517 @mixin ck-button-colors --ck-color-button-action; 3518 3519 color: var(--ck-color-button-action-text); 3520} 3521 3522.ck.ck-button-bold, 3523a.ck.ck-button-bold { 3524 font-weight: bold; 3525} 3526`,`/* 3527 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3528 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3529 */ 3530 3531/** 3532 * Implements a button of given background color. 3533 * 3534 * @param {String} $background - Background color of the button. 3535 * @param {String} $border - Border color of the button. 3536 */ 3537@define-mixin ck-button-colors $prefix { 3538 background: var($(prefix)-background); 3539 3540 &:not(.ck-disabled) { 3541 &:hover { 3542 background: var($(prefix)-hover-background); 3543 } 3544 3545 &:active { 3546 background: var($(prefix)-active-background); 3547 } 3548 } 3549 3550 /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */ 3551 &.ck-disabled { 3552 background: var($(prefix)-disabled-background); 3553 } 3554} 3555`,`/* 3556 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3557 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3558 */ 3559 3560/** 3561 * Implements rounded corner interface for .ck-rounded-corners class. 3562 * 3563 * @see $ck-border-radius 3564 */ 3565@define-mixin ck-rounded-corners { 3566 border-radius: 0; 3567 3568 @nest .ck-rounded-corners &, 3569 &.ck-rounded-corners { 3570 border-radius: var(--ck-border-radius); 3571 @mixin-content; 3572 } 3573} 3574`,`/* 3575 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3576 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3577 */ 3578 3579/** 3580 * A visual style of focused element's border. 3581 */ 3582@define-mixin ck-focus-ring { 3583 /* Disable native outline. */ 3584 outline: none; 3585 border: var(--ck-focus-ring) 3586} 3587`,`/* 3588 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3589 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3590 */ 3591 3592/** 3593 * A helper to combine multiple shadows. 3594 */ 3595@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 { 3596 box-shadow: $shadowA, $shadowB; 3597} 3598 3599/** 3600 * Gives an element a drop shadow so it looks like a floating panel. 3601 */ 3602@define-mixin ck-drop-shadow { 3603 @mixin ck-box-shadow var(--ck-drop-shadow); 3604} 3605`,`/* 3606 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3607 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3608 */ 3609 3610/** 3611 * A class which indicates that an element holding it is disabled. 3612 */ 3613@define-mixin ck-disabled { 3614 opacity: var(--ck-disabled-opacity); 3615} 3616`],sourceRoot:""}]);const C=w},4391:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;
3616--ck-switch-button-toggle-inner-size:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton,.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton.ck-on:focus,.ck.ck-button.ck-switchbutton.ck-on:hover,.ck.ck-button.ck-switchbutton:active,.ck.ck-button.ck-switchbutton:focus,.ck.ck-button.ck-switchbutton:hover{background:transparent;color:inherit}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}@media (prefers-reduced-motion:reduce){.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{transition:none}}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/button/switchbutton.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/switchbutton.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AASE,4HACC,aACD,CCCF,MAEC,8CAA+C,CAE/C,0DAAgE,CAChE,2HAIC,CACD,0FACD,CAOC,0QAEC,sBAAuB,CADvB,aAED,CAEA,0DAGE,4CAOF,CAVA,0DAQE,2CAEF,CAEA,iDCpCA,eDgFA,CA5CA,yIChCC,qCD4ED,CA5CA,2DAKE,gBAuCF,CA5CA,2DAUE,iBAkCF,CA5CA,iDAkBC,uDAAwD,CAFxD,4BAA6B,CAD7B,iFAAsF,CAEtF,0CA2BD,CAxBC,2ECxDD,eDuEC,CAfA,6LCpDA,qCAAsC,CDsDpC,8CAaF,CAfA,2EAOC,yDAA0D,CAD1D,gDAAiD,CAIjD,uBAA0B,CAL1B,+CAUD,CAHC,uCAZD,2EAaE,eAEF,CADC,CAGD,uDACC,6DAKD,CAHC,iFACC,qDACD,CAIF,6DEpFA,kCFsFA,CAGA,oCACC,wBAAyB,CAEzB,eAAgB,CADhB,YAQD,CALC,uDACC,iGAAmG,CAEnG,4BAA6B,CAD7B,kBAED,CAKA,uDACC,sDAkBD,CAhBC,6DACC,4DACD,CAEA,2FAKE,2DAMF,CAXA,2FASE,oEAEF",sourcesContent:[`/* 3617 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3618 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3619 */ 3620
3621.ck.ck-button.ck-switchbutton { 3622 & .ck-button__toggle { 3623 display: block; 3624 3625 & .ck-button__toggle__inner { 3626 display: block; 3627 } 3628 } 3629} 3630`,`/* 3631 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3632 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3633 */ 3634 3635@import "../../../mixins/_rounded.css"; 3636@import "../../../mixins/_disabled.css"; 3637@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 3638 3639/* Note: To avoid rendering issues (aliasing) but to preserve the responsive nature 3640of the component, floatingâpoint numbers have been used which, for the default font size 3641(see: --ck-font-size-base), will generate simple integers. */ 3642:root { 3643 /* 34px at 13px font-size */ 3644 --ck-switch-button-toggle-width: 2.6153846154em; 3645 /* 14px at 13px font-size */ 3646 --ck-switch-button-toggle-inner-size: calc(1.0769230769em + 1px); 3647 --ck-switch-button-translation: calc( 3648 var(--ck-switch-button-toggle-width) - 3649 var(--ck-switch-button-toggle-inner-size) - 3650 2px /* Border */ 3651 ); 3652 --ck-switch-button-inner-hover-shadow: 0 0 0 5px var(--ck-color-switch-button-inner-shadow); 3653} 3654 3655.ck.ck-button.ck-switchbutton { 3656 /* Unlike a regular button, the switch button text color and background should never change. 3657 * Changing toggle switch (background, outline) is enough to carry the information about the 3658 * state of the entire component (https://github.com/ckeditor/ckeditor5/issues/12519) 3659 */ 3660 &, &:hover, &:focus, &:active, &.ck-on:hover, &.ck-on:focus, &.ck-on:active { 3661 color: inherit; 3662 background: transparent; 3663 } 3664 3665 & .ck-button__label { 3666 @mixin ck-dir ltr { 3667 /* Separate the label from the switch */ 3668 margin-right: calc(2 * var(--ck-spacing-large)); 3669 } 3670 3671 @mixin ck-dir rtl { 3672 /* Separate the label from the switch */ 3673 margin-left: calc(2 * var(--ck-spacing-large)); 3674 } 3675 } 3676 3677 & .ck-button__toggle { 3678 @mixin ck-rounded-corners; 3679 3680 @mixin ck-dir ltr { 3681 /* Make sure the toggle is always to the right as far as possible. */ 3682 margin-left: auto; 3683 } 3684 3685 @mixin ck-dir rtl { 3686 /* Make sure the toggle is always to the left as far as possible. */ 3687 margin-right: auto; 3688 } 3689 3690 /* Apply some smooth transition to the box-shadow and border. */ 3691 /* Gently animate the background color of the toggle switch */ 3692 transition: background 400ms ease, box-shadow .2s ease-in-out, outline .2s ease-in-out; 3693 border: 1px solid transparent; 3694 width: var(--ck-switch-button-toggle-width); 3695 background: var(--ck-color-switch-button-off-background); 3696 3697 & .ck-button__toggle__inner { 3698 @mixin ck-rounded-corners { 3699 border-radius: calc(.5 * var(--ck-border-radius)); 3700 } 3701 3702 width: var(--ck-switch-button-toggle-inner-size); 3703 height: var(--ck-switch-button-toggle-inner-size); 3704 background: var(--ck-color-switch-button-inner-background); 3705 3706 /* Gently animate the inner part of the toggle switch */ 3707 transition: all 300ms ease; 3708 3709 @media (prefers-reduced-motion: reduce) { 3710 transition: none; 3711 } 3712 } 3713 3714 &:hover { 3715 background: var(--ck-color-switch-button-off-hover-background); 3716 3717 & .ck-button__toggle__inner { 3718 box-shadow: var(--ck-switch-button-inner-hover-shadow); 3719 } 3720 } 3721 } 3722 3723 &.ck-disabled .ck-button__toggle { 3724 @mixin ck-disabled; 3725 } 3726 3727 /* Overriding default .ck-button:focus styles + an outline around the toogle */ 3728 &:focus { 3729 border-color: transparent; 3730 outline: none; 3731 box-shadow: none; 3732 3733 & .ck-button__toggle { 3734 box-shadow: 0 0 0 1px var(--ck-color-base-background), 0 0 0 5px var(--ck-color-focus-outer-shadow); 3735 outline-offset: 1px; 3736 outline: var(--ck-focus-ring); 3737 } 3738 } 3739 3740 /* stylelint-disable-next-line no-descending-specificity */ 3741 &.ck-on { 3742 & .ck-button__toggle { 3743 background: var(--ck-color-switch-button-on-background); 3744 3745 &:hover { 3746 background: var(--ck-color-switch-button-on-hover-background); 3747 } 3748 3749 & .ck-button__toggle__inner { 3750 /* 3751 * Move the toggle switch to the right. It will be animated. 3752 */ 3753 @mixin ck-dir ltr { 3754 transform: translateX( var( --ck-switch-button-translation ) ); 3755 } 3756 3757 @mixin ck-dir rtl { 3758 transform: translateX( calc( -1 * var( --ck-switch-button-translation ) ) ); 3759 } 3760 } 3761 } 3762 } 3763} 3764`,`/* 3765 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3766 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3767 */ 3768 3769/** 3770 * Implements rounded corner interface for .ck-rounded-corners class. 3771 * 3772 * @see $ck-border-radius 3773 */ 3774@define-mixin ck-rounded-corners { 3775 border-radius: 0; 3776 3777 @nest .ck-rounded-corners &, 3778 &.ck-rounded-corners { 3779 border-radius: var(--ck-border-radius); 3780 @mixin-content; 3781 } 3782} 3783`,`/* 3784 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3785 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3786 */ 3787 3788/** 3789 * A class which indicates that an element holding it is disabled. 3790 */ 3791@define-mixin ck-disabled { 3792 opacity: var(--ck-disabled-opacity); 3793} 3794`],sourceRoot:""}]);const C=w},25:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{border-radius:0;color:inherit;font-weight:700;padding:var(--ck-list-button-padding);width:100%}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:var(--ck-spacing-medium) var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/collapsible/collapsible.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/collapsible/collapsible.css"],names:[],mappings:"AAMC,sEACC,YACD,CCHD,MACC,yDACD,CAGC,iCAIC,eAAgB,CAChB,aAAc,CAHd,eAAiB,CACjB,qCAAsC,CAFtC,UAoBD,CAdC,uCACC,sBACD,CAEA,wIACC,sBAAuB,CACvB,wBAAyB,CACzB,eACD,CAEA,0CACC,qCAAsC,CACtC,sCACD,CAGD,6CACC,gFACD,CAGC,mEACC,wBACD",sourcesContent:[`/* 3795 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3796 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3797 */ 3798
3799.ck.ck-collapsible.ck-collapsible_collapsed { 3800 & > .ck-collapsible__children { 3801 display: none; 3802 } 3803} 3804`,`/* 3805 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3806 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3807 */ 3808 3809:root { 3810 --ck-collapsible-arrow-size: calc(0.5 * var(--ck-icon-size)); 3811} 3812 3813.ck.ck-collapsible { 3814 & > .ck.ck-button { 3815 width: 100%; 3816 font-weight: bold; 3817 padding: var(--ck-list-button-padding); 3818 border-radius: 0; 3819 color: inherit; 3820 3821 &:focus { 3822 background: transparent; 3823 } 3824 3825 &:active, &:not(:focus), &:hover:not(:focus) { 3826 background: transparent; 3827 border-color: transparent; 3828 box-shadow: none; 3829 } 3830 3831 & > .ck-icon { 3832 margin-right: var(--ck-spacing-medium); 3833 width: var(--ck-collapsible-arrow-size); 3834 } 3835 } 3836 3837 & > .ck-collapsible__children { 3838 padding: var(--ck-spacing-medium) var(--ck-spacing-large) var(--ck-spacing-large); 3839 } 3840 3841 &.ck-collapsible_collapsed { 3842 & > .ck.ck-button .ck-icon { 3843 transform: rotate(-90deg); 3844 } 3845 } 3846} 3847`],sourceRoot:""}]);const C=w},7317:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{transition:box-shadow .2s ease}@media (forced-colors:none){.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile.ck-color-selector__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}}@media (forced-colors:active){.ck.ck-color-grid__tile{height:unset;min-height:unset;min-width:unset;padding:0 var(--ck-spacing-small);width:unset}.ck.ck-color-grid__tile .ck-button__label{display:inline-block}}@media (prefers-reduced-motion:reduce){.ck.ck-color-grid__tile{transition:none}}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/colorgrid/colorgrid.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/colorgrid/colorgrid.css","webpack://./../ckeditor5-ui/theme/mixins/_mediacolors.css"],names:[],mappings:"AAKA,kBACC,YACD,CCCA,MACC,8BAA+B,CAK/B,wCACD,CAEA,kBACC,YAAa,CACb,WACD,CAEA,wBACC,8BAkED,CC3EC,4BACC,wBDgBA,QAAS,CAJT,qCAAsC,CAEtC,yCAA0C,CAD1C,wCAAyC,CAEzC,SAAU,CAJV,oCCTA,CDgBA,8HAIC,QACD,CAEA,+DACC,gDACD,CAEA,8BACC,8FACD,CAEA,gGAEC,iGACD,CCjCD,CAZA,8BACC,wBDqDA,YAAa,CAEb,gBAAiB,CADjB,eAAgB,CAEhB,iCAAkC,CAJlC,WClDA,CDwDA,0CACC,oBACD,CCzDD,CD4DA,uCAhDD,wBAiDE,eAkBF,CAjBC,CAEA,oCACC,YAAa,CACb,gBACD,CAEA,oCAEC,2CAA4C,CAD5C,YAED,CAGC,0CACC,aACD,CAIF,yBACC,oCACD",sourcesContent:[`/* 3848 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3849 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3850 */ 3851 3852.ck.ck-color-grid { 3853 display: grid; 3854} 3855`,`/* 3856 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3857 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3858 */ 3859 3860@import "../../../mixins/_rounded.css"; 3861@import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css"; 3862 3863:root { 3864 --ck-color-grid-tile-size: 24px; 3865 3866 /* Not using global colors here because these may change but some colors in a pallette 3867 * require special treatment. For instance, this ensures no matter what the UI text color is, 3868 * the check icon will look good on the black color tile. */ 3869 --ck-color-color-grid-check-icon: hsl(212, 81%, 46%); 3870} 3871
3872.ck.ck-color-grid { 3873 grid-gap: 5px; 3874 padding: 8px; 3875} 3876 3877.ck.ck-color-grid__tile { 3878 transition: .2s ease box-shadow; 3879 3880 @mixin ck-media-default-colors { 3881 width: var(--ck-color-grid-tile-size); 3882 height: var(--ck-color-grid-tile-size); 3883 min-width: var(--ck-color-grid-tile-size); 3884 min-height: var(--ck-color-grid-tile-size); 3885 padding: 0; 3886 border: 0; 3887 3888 &.ck-on, 3889 &:focus:not( .ck-disabled ), 3890 &:hover:not( .ck-disabled ) { 3891 /* Disable the default .ck-button's border ring. */ 3892 border: 0; 3893 } 3894 3895 &.ck-color-selector__color-tile_bordered { 3896 box-shadow: 0 0 0 1px var(--ck-color-base-border); 3897 } 3898 3899 &.ck-on { 3900 box-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-base-text); 3901 } 3902 3903 &:focus:not( .ck-disabled ), 3904 &:hover:not( .ck-disabled ) { 3905 box-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-focus-border); 3906 } 3907 } 3908 3909 /* 3910 * In high contrast mode, the colors are replaced with text labels. 3911 * See https://github.com/ckeditor/ckeditor5/issues/14907. 3912 */ 3913 @mixin ck-media-forced-colors { 3914 width: unset; 3915 height: unset; 3916 min-width: unset; 3917 min-height: unset; 3918 padding: 0 var(--ck-spacing-small); 3919 3920 & .ck-button__label { 3921 display: inline-block; 3922 } 3923 } 3924 3925 @media (prefers-reduced-motion: reduce) { 3926 transition: none; 3927 } 3928 3929 &.ck-disabled { 3930 cursor: unset; 3931 transition: unset; 3932 } 3933 3934 & .ck.ck-icon { 3935 display: none; 3936 color: var(--ck-color-color-grid-check-icon); 3937 } 3938 3939 &.ck-on { 3940 & .ck.ck-icon { 3941 display: block; 3942 } 3943 } 3944} 3945 3946.ck.ck-color-grid__label { 3947 padding: 0 var(--ck-spacing-standard); 3948} 3949`,`/* 3950 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3951 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3952 */ 3953 3954@define-mixin ck-media-forced-colors { 3955 @media (forced-colors: active) { 3956 & { 3957 @mixin-content; 3958 } 3959 } 3960} 3961 3962@define-mixin ck-media-default-colors { 3963 @media (forced-colors: none) { 3964 & { 3965 @mixin-content; 3966 } 3967 } 3968} 3969`],sourceRoot:""}]);const C=w},1905:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".color-picker-hex-input{width:max-content}.color-picker-hex-input .ck.ck-input{min-width:unset}.ck.ck-color-picker__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;margin:var(--ck-spacing-large) 0 0;width:unset}.ck.ck-color-picker__row .ck.ck-labeled-field-view{padding-top:unset}.ck.ck-color-picker__row .ck.ck-input-text{width:unset}.ck.ck-color-picker__row .ck-color-picker__hash-view{padding-right:var(--ck-spacing-medium);padding-top:var(--ck-spacing-tiny)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/colorpicker/colorpicker.css"],names:[],mappings:"AAKA,wBACC,iBAKD,CAHC,qCACC,eACD,CAGD,yBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,6BAA8B,CAC9B,kCAAmC,CACnC,WAcD,CAZC,mDACC,iBACD,CAEA,2CACC,WACD,CAEA,qDAEC,sCAAuC,CADvC,kCAED",sourcesContent:[`/* 3970 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 3971 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 3972 */ 3973 3974.color-picker-hex-input { 3975 width: max-content; 3976 3977 & .ck.ck-input { 3978 min-width: unset; 3979 } 3980} 3981 3982.ck.ck-color-picker__row { 3983 display: flex; 3984 flex-direction: row; 3985 flex-wrap: nowrap; 3986 justify-content: space-between; 3987 margin: var(--ck-spacing-large) 0 0; 3988 width: unset; 3989 3990 & .ck.ck-labeled-field-view { 3991 padding-top: unset; 3992 } 3993 3994 & .ck.ck-input-text { 3995 width: unset; 3996 } 3997 3998 & .ck-color-picker__hash-view { 3999 padding-top: var(--ck-spacing-tiny); 4000 padding-right: var(--ck-spacing-medium); 4001 } 4002} 4003`],sourceRoot:""}]);const C=w},6309:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{align-items:center;display:flex}[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{justify-content:flex-start}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar{display:flex;flex-direction:row;justify-content:space-around}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar .ck-button-cancel,.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar .ck-button-save{flex:1}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{width:100%}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker .ck.ck-icon{margin-left:var(--ck-spacing-standard)}.ck.ck-color-selector .ck-color-grids-fragment label.ck.ck-color-grid__label{font-weight:unset}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker{padding:8px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker{height:100px;min-width:180px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(saturation){border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(hue){border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius)}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(hue-pointer),.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(saturation-pointer){height:15px;width:15px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar{padding:0 8px 8px}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/colorselector/colorselector.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/colorselector/colorselector.css"],names:[],mappings:"AAUE,oLAGC,kBAAmB,CADnB,YAMD,CARA,wMAME,0BAEF,CAKA,iFACC,YAAa,CACb,kBAAmB,CACnB,4BAMD,CAJC,oMAEC,MAC
4003D,CCrBD,oLAEC,UACD,CAEA,0FAEC,2BAA4B,CAC5B,4BAA6B,CAF7B,qEAiBD,CAbC,sGACC,gDACD,CAEA,gHAEE,uCAMF,CARA,gHAME,sCAEF,CAGD,6EACC,iBACD,CAKA,oEACC,WAoBD,CAlBC,sFACC,YAAa,CACb,eAeD,CAbC,wGACC,iEACD,CAEA,iGACC,iEACD,CAEA,yNAGC,WAAY,CADZ,UAED,CAIF,iFACC,iBACD",sourcesContent:[`/* 4004 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4005 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4006 */ 4007 4008@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 4009 4010.ck.ck-color-selector { 4011 /* View fragment with color grids. */ 4012 & .ck-color-grids-fragment { 4013 & .ck-button.ck-color-selector__remove-color, 4014 & .ck-button.ck-color-selector__color-picker { 4015 display: flex; 4016 align-items: center; 4017 4018 @mixin ck-dir rtl { 4019 justify-content: flex-start; 4020 } 4021 } 4022 } 4023 4024 /* View fragment with a color picker. */ 4025 & .ck-color-picker-fragment { 4026 & .ck.ck-color-selector_action-bar { 4027 display: flex; 4028 flex-direction: row; 4029 justify-content: space-around; 4030 4031 & .ck-button-save, 4032 & .ck-button-cancel { 4033 flex: 1 4034 } 4035 } 4036 } 4037} 4038`,`/* 4039 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4040 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4041 */ 4042 4043@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 4044 4045.ck.ck-color-selector { 4046 /* View fragment with color grids. */ 4047 & .ck-color-grids-fragment { 4048 & .ck-button.ck-color-selector__remove-color, 4049 & .ck-button.ck-color-selector__color-picker { 4050 width: 100%; 4051 } 4052 4053 & .ck-button.ck-color-selector__color-picker { 4054 padding: calc(var(--ck-spacing-standard) / 2) var(--ck-spacing-standard); 4055 border-bottom-left-radius: 0; 4056 border-bottom-right-radius: 0; 4057 4058 &:not(:focus) { 4059 border-top: 1px solid var(--ck-color-base-border); 4060 } 4061 4062 & .ck.ck-icon { 4063 @mixin ck-dir ltr { 4064 margin-right: var(--ck-spacing-standard); 4065 } 4066 4067 @mixin ck-dir rtl { 4068 margin-left: var(--ck-spacing-standard); 4069 } 4070 } 4071 } 4072 4073 & label.ck.ck-color-grid__label { 4074 font-weight: unset; 4075 } 4076 } 4077 4078 /* View fragment with a color picker. */ 4079 & .ck-color-picker-fragment { 4080 & .ck.ck-color-picker { 4081 padding: 8px; 4082 4083 & .hex-color-picker { 4084 height: 100px; 4085 min-width: 180px; 4086 4087 &::part(saturation) { 4088 border-radius: var(--ck-border-radius) var(--ck-border-radius) 0 0; 4089 } 4090 4091 &::part(hue) { 4092 border-radius: 0 0 var(--ck-border-radius) var(--ck-border-radius); 4093 } 4094 4095 &::part(saturation-pointer), 4096 &::part(hue-pointer) { 4097 width: 15px; 4098 height: 15px; 4099 } 4100 } 4101 } 4102 4103 & .ck.ck-color-selector_action-bar { 4104 padding: 0 8px 8px; 4105 } 4106 } 4107} 4108`],sourceRoot:""}]);const C=w},9819:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-dialog-overlay{bottom:0;left:0;overscroll-behavior:none;position:fixed;right:0;top:0;user-select:none}.ck.ck-dialog-overlay.ck-dialog-overlay__transparent{animation:none;background:none;pointer-events:none}.ck.ck-dialog{overscroll-behavior:none;position:absolute;width:fit-content}.ck.ck-dialog .ck.ck-form__header{flex-shrink:0}.ck.ck-dialog .ck.ck-form__header .ck-form__header__label{cursor:grab}.ck.ck-dialog-overlay.ck-dialog-overlay__transparent .ck.ck-dialog{pointer-events:all}:root{--ck-dialog-overlay-background-color:rgba(0,0,0,.5);--ck-dialog-drop-shadow:0px 0px 6px 2px rgba(0,0,0,.15);--ck-dialog-max-width:100vw;--ck-dialog-max-height:90vh;--ck-color-dialog-background:var(--ck-color-base-background);--ck-color-dialog-form-header-border:var(--ck-color-base-border)}.ck.ck-dialog-overlay{animation:ck-dialog-fade-in .3s;background:var(--ck-dialog-overlay-background-color);z-index:var(--ck-z-dialog)}.ck.ck-dialog{border-radius:0}.ck-rounded-corners .ck.ck-dialog,.ck.ck-dialog.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dialog{box-shadow:var(--ck-drop-shadow),0 0;--ck-drop-shadow:var(--ck-dialog-drop-shadow);background:var(--ck-color-dialog-background);border:1px solid var(--ck-color-base-border);max-height:var(--ck-dialog-max-height);max-width:var(--ck-dialog-max-width)}.ck.ck-dialog .ck.ck-form__header{border-bottom:1px solid var(--ck-color-dialog-form-header-border)}@keyframes ck-dialog-fade-in{0%{background:transparent}to{background:var(--ck-dialog-overlay-background-color)}}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dialog/dialog.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dialog/dialog.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,sBAKC,QAAS,CACT,MAAO,CAJP,wBAAyB,CAEzB,cAAe,CAGf,OAAQ,CACR,KAAM,CAPN,gBAcD,CALC,qDAEC,cAAe,CACf,eAAgB,CAFhB,mBAGD,CAGD,cACC,wBAAyB,CAEzB,iBAAkB,CADlB,iBAcD,CAXC,kCACC,aAKD,CAHC,0DACC,WACD,CAVF,mEAcE,kBAEF,CC7BA,MACC,mDAA2D,CAC3D,uDAA8D,CAC9D,2BAA4B,CAC5B,2BAA4B,CAC5B,4DAA6D,CAC7D,gEACD,CAEA,sBACC,+BAAgC,CAChC,oDAAqD,CACrD,0BACD,CAEA,cCbC,eD2BD,CAdA,mECTE,qCDuBF,CAdA,cEf
4108C,oCAA8B,CFmB9B,6CAA8C,CAE9C,4CAA6C,CAG7C,4CAA6C,CAF7C,sCAAuC,CACvC,oCAMD,CAHC,kCACC,iEACD,CAGD,6BACC,GACC,sBACD,CAEA,GACC,oDACD,CACD",sourcesContent:[`/* 4109 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4110 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4111 */ 4112 4113.ck.ck-dialog-overlay { 4114 user-select: none; 4115 overscroll-behavior: none; 4116 4117 position: fixed; 4118 bottom: 0; 4119 left: 0; 4120 right: 0; 4121 top: 0; 4122 4123 &.ck-dialog-overlay__transparent { 4124 pointer-events: none; 4125 animation: none; 4126 background: none; 4127 } 4128} 4129 4130.ck.ck-dialog { 4131 overscroll-behavior: none; 4132 width: fit-content; 4133 position: absolute; 4134 4135 & .ck.ck-form__header { 4136 flex-shrink: 0; 4137 4138 & .ck-form__header__label { 4139 cursor: grab; 4140 } 4141 } 4142 4143 @nest .ck.ck-dialog-overlay.ck-dialog-overlay__transparent & { 4144 pointer-events: all; 4145 } 4146} 4147`,`/* 4148 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4149 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4150 */ 4151 4152@import "../../../mixins/_rounded.css"; 4153@import "../../../mixins/_shadow.css"; 4154@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"; 4155 4156:root { 4157 --ck-dialog-overlay-background-color: hsla( 0, 0%, 0%, .5 ); 4158 --ck-dialog-drop-shadow: 0px 0px 6px 2px hsl(0deg 0% 0% / 15%); 4159 --ck-dialog-max-width: 100vw; 4160 --ck-dialog-max-height: 90vh; 4161 --ck-color-dialog-background: var(--ck-color-base-background); 4162 --ck-color-dialog-form-header-border: var(--ck-color-base-border); 4163} 4164 4165.ck.ck-dialog-overlay { 4166 animation: ck-dialog-fade-in .3s; 4167 background: var(--ck-dialog-overlay-background-color); 4168 z-index: var(--ck-z-dialog); 4169} 4170 4171.ck.ck-dialog { 4172 @mixin ck-rounded-corners; 4173 @mixin ck-drop-shadow; 4174 4175 --ck-drop-shadow: var(--ck-dialog-drop-shadow); 4176 4177 background: var(--ck-color-dialog-background); 4178 max-height: var(--ck-dialog-max-height); 4179 max-width: var(--ck-dialog-max-width); 4180 border: 1px solid var(--ck-color-base-border); 4181 4182 & .ck.ck-form__header { 4183 border-bottom: 1px solid var(--ck-color-dialog-form-header-border); 4184 } 4185} 4186 4187@keyframes ck-dialog-fade-in { 4188 0% { 4189 background: hsla( 0, 0%, 0%, 0 ); 4190 } 4191 4192 100% { 4193 background: var(--ck-dialog-overlay-background-color); 4194 } 4195} 4196`,`/* 4197 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4198 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4199 */ 4200 4201/** 4202 * Implements rounded corner interface for .ck-rounded-corners class. 4203 * 4204 * @see $ck-border-radius 4205 */ 4206@define-mixin ck-rounded-corners { 4207 border-radius: 0; 4208 4209 @nest .ck-rounded-corners &, 4210 &.ck-rounded-corners { 4211 border-radius: var(--ck-border-radius); 4212 @mixin-content; 4213 } 4214} 4215`,`/* 4216 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4217 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4218 */ 4219 4220/** 4221 * A helper to combine multiple shadows. 4222 */ 4223@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 { 4224 box-shadow: $shadowA, $shadowB; 4225} 4226 4227/** 4228 * Gives an element a drop shadow so it looks like a floating panel. 4229 */ 4230@define-mixin ck-drop-shadow { 4231 @mixin ck-box-shadow var(--ck-drop-shadow); 4232} 4233`],sourceRoot:""}]);const C=w},9822:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-dialog .ck.ck-dialog__actions{display:flex;justify-content:flex-end;padding:var(--ck-spacing-large)}.ck.ck-dialog .ck.ck-dialog__actions>*+*{margin-left:var(--ck-spacing-large)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dialog/dialogactions.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dialog/dialogactions.css"],names:[],mappings:"AAMC,qCACC,YAAa,CACb,wBAAyB,CCDzB,+BDED,CCAC,yCACC,mCACD",sourcesContent:[`/* 4234 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4235 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4236 */ 4237 4238.ck.ck-dialog { 4239 & .ck.ck-dialog__actions { 4240 display: flex; 4241 justify-content: flex-end; 4242 } 4243} 4244`,`/* 4245 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4246 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4247 */ 4248
4249.ck.ck-dialog { 4250 & .ck.ck-dialog__actions { 4251 padding: var(--ck-spacing-large); 4252 4253 & > * + * { 4254 margin-left: var(--ck-spacing-large); 4255 } 4256 } 4257} 4258`],sourceRoot:""}]);const C=w},8149:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-panel)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left
4258:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-panel) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}.ck.ck-dropdown__panel:focus{outline:none}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/dropdown.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/dropdown.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,MACC,4BACD,CAEA,gBACC,oBAAqB,CACrB,iBA2ED,CAzEC,oCACC,mBAAoB,CACpB,2BACD,CAGA,+CACC,UACD,CAEA,oCACC,YAAa,CAEb,sCAAuC,CAEvC,iBAAkB,CAHlB,yBA4DD,CAvDC,+DACC,oBACD,CAEA,mSAKC,WACD,CAEA,mSAUC,WAAY,CADZ,QAED,CAEA,o
4258HAEC,MACD,CAEA,oHAEC,OACD,CAEA,kHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAQF,mCACC,mCACD,CCpFA,MACC,sDACD,CAEA,gBAEC,iBA2ED,CAzEC,oCACC,mCACD,CAGC,8CAIC,sCAAuC,CAHvC,gCAID,CAIA,8CACC,+BAAgC,CAGhC,oCACD,CAGD,gDC/BA,kCDiCA,CAIE,mFAEC,oCACD,CAIA,mFAEC,qCACD,CAID,iEAEC,eAAgB,CAChB,sBAAuB,CAFvB,SAGD,CAGA,6EC1DD,kCD4DC,CAGA,qDACC,2BAA4B,CAC5B,4BACD,CAEA,sGACC,UACD,CAGA,yHAEC,eAKD,CAHC,qIE7EF,2CF+EE,CAKH,uBGlFC,eHkHD,CAhCA,qFG9EE,qCH8GF,CAhCA,uBAIC,oDAAqD,CACrD,sDAAuD,CACvD,QAAS,CE1FT,oCAA8B,CF6F9B,cAuBD,CAnBC,6CACC,wBACD,CAEA,6CACC,yBACD,CAEA,6CACC,2BACD,CAEA,6CACC,4BACD,CAEA,6BACC,YACD",sourcesContent:[`/* 4259 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4260 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4261 */ 4262 4263:root { 4264 --ck-dropdown-max-width: 75vw; 4265} 4266 4267.ck.ck-dropdown { 4268 display: inline-block; 4269 position: relative; 4270 4271 & .ck-dropdown__arrow { 4272 pointer-events: none; 4273 z-index: var(--ck-z-default); 4274 } 4275 4276 /* Dropdown button should span horizontally, e.g. in vertical toolbars */ 4277 & .ck-button.ck-dropdown__button { 4278 width: 100%; 4279 } 4280 4281 & .ck-dropdown__panel { 4282 display: none; 4283 z-index: var(--ck-z-panel); 4284 max-width: var(--ck-dropdown-max-width); 4285 4286 position: absolute; 4287 4288 &.ck-dropdown__panel-visible { 4289 display: inline-block; 4290 } 4291 4292 &.ck-dropdown__panel_ne, 4293 &.ck-dropdown__panel_nw, 4294 &.ck-dropdown__panel_n, 4295 &.ck-dropdown__panel_nmw, 4296 &.ck-dropdown__panel_nme { 4297 bottom: 100%; 4298 } 4299 4300 &.ck-dropdown__panel_se, 4301 &.ck-dropdown__panel_sw, 4302 &.ck-dropdown__panel_smw, 4303 &.ck-dropdown__panel_sme, 4304 &.ck-dropdown__panel_s { 4305 /* 4306 * Using transform: translate3d( 0, 100%, 0 ) causes blurry dropdown on Chrome 67-78+ on non-retina displays. 4307 * See https://github.com/ckeditor/ckeditor5/issues/1053. 4308 */ 4309 top: 100%; 4310 bottom: auto; 4311 } 4312 4313 &.ck-dropdown__panel_ne, 4314 &.ck-dropdown__panel_se { 4315 left: 0px; 4316 } 4317 4318 &.ck-dropdown__panel_nw, 4319 &.ck-dropdown__panel_sw { 4320 right: 0px; 4321 } 4322 4323 &.ck-dropdown__panel_s, 4324 &.ck-dropdown__panel_n { 4325 /* Positioning panels relative to the center of the button */ 4326 left: 50%; 4327 transform: translateX(-50%); 4328 } 4329 4330 &.ck-dropdown__panel_nmw, 4331 &.ck-dropdown__panel_smw { 4332 /* Positioning panels relative to the middle-west of the button */ 4333 left: 75%; 4334 transform: translateX(-75%); 4335 } 4336 4337 &.ck-dropdown__panel_nme, 4338 &.ck-dropdown__panel_sme { 4339 /* Positioning panels relative to the middle-east of the button */ 4340 left: 25%; 4341 transform: translateX(-25%); 4342 } 4343 } 4344} 4345 4346/* 4347 * Toolbar dropdown panels should be always above the UI (eg. other dropdown panels) from the editor's content. 4348 * See https://github.com/ckeditor/ckeditor5/issues/7874 4349 */ 4350.ck.ck-toolbar .ck-dropdown__panel { 4351 z-index: calc( var(--ck-z-panel) + 1 ); 4352} 4353`,`/* 4354 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4355 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4356 */ 4357 4358@import "../../../mixins/_rounded.css"; 4359@import "../../../mixins/_disabled.css"; 4360@import "../../../mixins/_shadow.css"; 4361@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 4362 4363:root { 4364 --ck-dropdown-arrow-size: calc(0.5 * var(--ck-icon-size)); 4365} 4366 4367.ck.ck-dropdown { 4368 /* Enable font size inheritance, which allows fluid UI scaling. */ 4369 font-size: inherit; 4370 4371 & .ck-dropdown__arrow { 4372 width: var(--ck-dropdown-arrow-size); 4373 } 4374 4375 @mixin ck-dir ltr { 4376 & .ck-dropdown__arrow { 4377 right: var(--ck-spacing-standard); 4378 4379 /* A space to accommodate the triangle. */ 4380 margin-left: var(--ck-spacing-standard); 4381 } 4382 } 4383 4384 @mixin ck-dir rtl { 4385 & .ck-dropdown__arrow { 4386 left: var(--ck-spacing-standard); 4387 4388 /* A space to accommodate the triangle. */ 4389 margin-right: var(--ck-spacing-small); 4390 } 4391 } 4392 4393 &.ck-disabled .ck-dropdown__arrow { 4394 @mixin ck-disabled; 4395 } 4396 4397 & .ck-button.ck-dropdown__button { 4398 @mixin ck-dir ltr { 4399 &:not(.ck-button_with-text) { 4400 /* Make sure dropdowns with just an icon have the right inner spacing */ 4401 padding-left: var(--ck-spacing-small); 4402 } 4403 } 4404 4405 @mixin ck-dir rtl { 4406 &:not(.ck-button_with-text) {
4407 /* Make sure dropdowns with just an icon have the right inner spacing */ 4408 padding-right: var(--ck-spacing-small); 4409 } 4410 } 4411 4412 /* #23 */ 4413 & .ck-button__label { 4414 width: 7em; 4415 overflow: hidden; 4416 text-overflow: ellipsis; 4417 } 4418 4419 /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */ 4420 &.ck-disabled .ck-button__label { 4421 @mixin ck-disabled; 4422 } 4423 4424 /* https://github.com/ckeditor/ckeditor5/issues/816 */ 4425 &.ck-on { 4426 border-bottom-left-radius: 0; 4427 border-bottom-right-radius: 0; 4428 } 4429 4430 &.ck-dropdown__button_label-width_auto .ck-button__label { 4431 width: auto; 4432 } 4433 4434 /* https://github.com/ckeditor/ckeditor5/issues/8699 */ 4435 &.ck-off:active, 4436 &.ck-on:active { 4437 box-shadow: none; 4438 4439 &:focus { 4440 @mixin ck-box-shadow var(--ck-focus-outer-shadow); 4441 } 4442 } 4443 } 4444} 4445 4446.ck.ck-dropdown__panel { 4447 @mixin ck-rounded-corners; 4448 @mixin ck-drop-shadow; 4449 4450 background: var(--ck-color-dropdown-panel-background); 4451 border: 1px solid var(--ck-color-dropdown-panel-border); 4452 bottom: 0; 4453 4454 /* Make sure the panel is at least as wide as the drop-down's button. */ 4455 min-width: 100%; 4456 4457 /* Disabled corner border radius to be consistent with the .dropdown__button 4458 https://github.com/ckeditor/ckeditor5/issues/816 */ 4459 &.ck-dropdown__panel_se { 4460 border-top-left-radius: 0; 4461 } 4462 4463 &.ck-dropdown__panel_sw { 4464 border-top-right-radius: 0; 4465 } 4466 4467 &.ck-dropdown__panel_ne { 4468 border-bottom-left-radius: 0; 4469 } 4470 4471 &.ck-dropdown__panel_nw { 4472 border-bottom-right-radius: 0; 4473 } 4474 4475 &:focus { 4476 outline: none; 4477 } 4478} 4479`,`/* 4480 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4481 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4482 */ 4483 4484/** 4485 * A class which indicates that an element holding it is disabled. 4486 */ 4487@define-mixin ck-disabled { 4488 opacity: var(--ck-disabled-opacity); 4489} 4490`,`/* 4491 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4492 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4493 */ 4494 4495/** 4496 * A helper to combine multiple shadows. 4497 */ 4498@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 { 4499 box-shadow: $shadowA, $shadowB; 4500} 4501 4502/** 4503 * Gives an element a drop shadow so it looks like a floating panel. 4504 */ 4505@define-mixin ck-drop-shadow { 4506 @mixin ck-box-shadow var(--ck-drop-shadow); 4507} 4508`,`/* 4509 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4510 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4511 */ 4512 4513/** 4514 * Implements rounded corner interface for .ck-rounded-corners class. 4515 * 4516 * @see $ck-border-radius 4517 */ 4518@define-mixin ck-rounded-corners { 4519 border-radius: 0; 4520 4521 @nest .ck-rounded-corners &, 4522 &.ck-rounded-corners { 4523 border-radius: var(--ck-border-radius); 4524 @mixin-content; 4525 } 4526} 4527`],sourceRoot:""}]);const C=w},3629:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-dropdown>.ck-dropdown__panel>.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/listdropdown.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,6CCIC,eDqBD,CAzBA,iICQE,qCAAsC,CDJtC,wBAqBF,CAfE,mFCND,eDYC,CANA,6MCFA,qCAAsC,CDKpC,2BAA4B,CAC5B,4BAA6B,CAF7B,wBAIF,CAEA,kFCdD,eDmBC,CALA,2MCVA,qCAAsC,CDYpC,wBAAyB,CACzB,yBAEF",sourcesContent:[`/* 4528 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4529 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4530 */ 4531 4532@import "../../../mixins/_rounded.css"; 4533 4534.ck.ck-dropdown > .ck-dropdown__panel > .ck-list { 4535 /* Disabled radius of top-left border to be consistent with .dropdown__button 4536 https://github.com/ckeditor/ckeditor5/issues/816 */ 4537 @mixin ck-rounded-corners { 4538 border-top-left-radius: 0; 4539 } 4540 4541 /* Make sure the button belonging to the first/last child of the list goes well with the 4542 border radius of the entire panel. */ 4543 & .ck-list__item { 4544 &:first-child > .ck-button { 4545 @mixin ck-rounded-corners { 4546 border-top-left-radius: 0; 4547 border-bottom-left-radius: 0; 4548 border-bottom-right-radius: 0; 4549 } 4550 } 4551 4552 &:last-child > .ck-button { 4553 @mixin ck-rounded-corners { 4554 border-top-left-radius: 0; 4555 border-top-right-radius: 0; 4556 } 4557 } 4558 } 4559} 4560`,`/* 4561 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4562 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4563 */ 4564 4565/** 4566 * Implements rounded corner interface for .ck-rounded-corners class. 4567 * 4568 * @see $ck-border-radius 4569 */ 4570@define-mixin ck-rounded-corners { 4571 border-radius: 0; 4572 4573 @nest .ck-rounded-corners &, 4574 &.ck-rounded-corners { 4575 border-radius: var(--ck-border-radius); 4576 @mixin-content; 4577 } 4578} 4579`],sourceRoot:""}]);const C=w},1792:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton>.ck-splitbutton__arrow:not(:focus){border-bottom-width:0;border-top-width:0}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:focus:after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:focus:after{--ck-color-split-button-hover-border:var(--ck-color-focus-border)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/splitbutton.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/splitbutton.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,mBAEC,iBAKD,CAHC,iDACC,qCACD,CCJD,MACC,gDAAyD,CACzD,4CACD,CAMC,oIAKE,gCAAiC,CADjC,6BASF,CAbA,oIAWE,+BAAgC,CADhC,4BAGF,CAEA,0CAGC,eAiBD,CApBA,oDAQE,+BAAgC,CADhC,4BAaF,CApBA,oDAcE,gCAAiC,CADjC,6BAOF,CAHC,8CACC,mCACD,CAKD,sDAEC,qBAAwB,CADxB,kBAED,CAQC,0KACC,wDACD,CAIA,8JAKC,0DAA2D,CAJ3D,UAAW,CAGX,WAAY,CAFZ,iBAAkB,CAClB,SAGD,CAGA,sIACC,iEACD,CAGC,kLACC,SACD,
4579CAIA,kLACC,UACD,CAMF,uCCzFA,eDmGA,CAVA,qHCrFC,qCD+FD,CARE,qKACC,2BACD,CAEA,mKACC,4BACD",sourcesContent:[`/* 4580 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4581 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4582 */ 4583 4584.ck.ck-splitbutton { 4585 /* Enable font size inheritance, which allows fluid UI scaling. */ 4586 font-size: inherit; 4587 4588 & .ck-splitbutton__action:focus { 4589 z-index: calc(var(--ck-z-default) + 1); 4590 } 4591} 4592 4593`,`/* 4594 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4595 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4596 */ 4597 4598@import "../../../mixins/_rounded.css"; 4599 4600:root { 4601 --ck-color-split-button-hover-background: hsl(0, 0%, 92%); 4602 --ck-color-split-button-hover-border: hsl(0, 0%, 70%); 4603} 4604 4605.ck.ck-splitbutton { 4606 /* 4607 * Note: ck-rounded and ck-dir mixins don't go together (because they both use @nest). 4608 */ 4609 &:hover > .ck-splitbutton__action, 4610 &.ck-splitbutton_open > .ck-splitbutton__action { 4611 @nest [dir="ltr"] & { 4612 /* Don't round the action button on the right side */ 4613 border-top-right-radius: unset; 4614 border-bottom-right-radius: unset; 4615 } 4616 4617 @nest [dir="rtl"] & { 4618 /* Don't round the action button on the left side */ 4619 border-top-left-radius: unset; 4620 border-bottom-left-radius: unset; 4621 } 4622 } 4623 4624 & > .ck-splitbutton__arrow { 4625 /* It's a text-less button and since the icon is positioned absolutely in such situation, 4626 it must get some arbitrary min-width. */ 4627 min-width: unset; 4628 4629 @nest [dir="ltr"] & { 4630 /* Don't round the arrow button on the left side */ 4631 border-top-left-radius: unset; 4632 border-bottom-left-radius: unset; 4633 } 4634 4635 @nest [dir="rtl"] & { 4636 /* Don't round the arrow button on the right side */ 4637 border-top-right-radius: unset; 4638 border-bottom-right-radius: unset; 4639 } 4640 4641 & svg { 4642 width: var(--ck-dropdown-arrow-size); 4643 } 4644 } 4645 4646 /* Make sure the divider stretches 100% height of the button 4647 https://github.com/ckeditor/ckeditor5/issues/10936 */ 4648 & > .ck-splitbutton__arrow:not(:focus) { 4649 border-top-width: 0px; 4650 border-bottom-width: 0px; 4651 } 4652 4653 /* When the split button is "open" (the arrow is on) or being hovered, it should get some styling 4654 as a whole. The background of both buttons should stand out and there should be a visual 4655 separation between both buttons. */ 4656 &.ck-splitbutton_open, 4657 &:hover { 4658 /* When the split button hovered as a whole, not as individual buttons. */ 4659 & > .ck-button:not(.ck-on):not(.ck-disabled):not(:hover) { 4660 background: var(--ck-color-split-button-hover-background); 4661 } 4662 4663 /* Splitbutton separator needs to be set with the ::after pseudoselector 4664 to display properly the borders on focus */ 4665 & > .ck-splitbutton__arrow:not(.ck-disabled)::after { 4666 content: ''; 4667 position: absolute; 4668 width: 1px; 4669 height: 100%; 4670 background-color: var(--ck-color-split-button-hover-border); 4671 } 4672 4673 /* Make sure the divider between the buttons looks fine when the button is focused */ 4674 & > .ck-splitbutton__arrow:focus::after { 4675 --ck-color-split-button-hover-border: var(--ck-color-focus-border); 4676 } 4677 4678 @nest [dir="ltr"] & { 4679 & > .ck-splitbutton__arrow:not(.ck-disabled)::after { 4680 left: -1px; 4681 } 4682 } 4683 4684 @nest [dir="rtl"] & { 4685 & > .ck-splitbutton__arrow:not(.ck-disabled)::after { 4686 right: -1px; 4687 } 4688 } 4689 } 4690 4691 /* Don't round the bottom left and right corners of the buttons when "open" 4692 https://github.com/ckeditor/ckeditor5/issues/816 */ 4693 &.ck-splitbutton_open { 4694 @mixin ck-rounded-corners { 4695 & > .ck-splitbutton__action { 4696 border-bottom-left-radius: 0; 4697 } 4698 4699 & > .ck-splitbutton__arrow { 4700 border-bottom-right-radius: 0; 4701 } 4702 } 4703 } 4704} 4705`,`/* 4706 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4707 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4708 */ 4709 4710/** 4711 * Implements rounded corner interface for .ck-rounded-corners class. 4712 * 4713 * @see $ck-border-radius 4714 */ 4715@define-mixin ck-rounded-corners { 4716 border-radius: 0; 4717 4718 @nest .ck-rounded-corners &, 4719 &.ck-rounded-corners { 4720 border-radius: var(--ck-border-radius); 4721 @mixin-content; 4722 } 4723} 4724`],sourceRoot:""}]);const C=w},1666:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/dropdown/toolbardropdown.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/toolbardropdown.css"],names:[],mappings:"AAKA,MACC,oCACD,CAEA,4CAGC,8CAA+C,CAD/C,iBAQD,CAJE,6DACC,qCACD,CCZF,oCACC,QACD",sourcesContent:[`/* 4725 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4726 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4727 */ 4728 4729:root { 4730 --ck-toolbar-dropdown-max-width: 60vw; 4731} 4732
4733.ck.ck-toolbar-dropdown > .ck-dropdown__panel { 4734 /* https://github.com/ckeditor/ckeditor5/issues/5586 */ 4735 width: max-content; 4736 max-width: var(--ck-toolbar-dropdown-max-width); 4737 4738 & .ck-button { 4739 &:focus { 4740 z-index: calc(var(--ck-z-default) + 1); 4741 } 4742 } 4743} 4744`,`/* 4745 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4746 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4747 */ 4748 4749.ck.ck-toolbar-dropdown .ck-toolbar { 4750 border: 0; 4751} 4752`],sourceRoot:""}]);const C=w},8527:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,":root{--ck-accessibility-help-dialog-max-width:600px;--ck-accessibility-help-dialog-max-height:400px;--ck-accessibility-help-dialog-border-color:#ccced1;--ck-accessibility-help-dialog-code-background-color:#ededed;--ck-accessibility-help-dialog-kbd-shadow-color:#9c9c9c}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content{border:1px solid transparent;max-height:var(--ck-accessibility-help-dialog-max-height);max-width:var(--ck-accessibility-help-dialog-max-width);overflow:auto;padding:var(--ck-spacing-large);user-select:text}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content{*{white-space:normal}}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content .ck-label{display:none}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h3{font-size:1.2em;font-weight:700}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h4{font-size:1em;font-weight:700}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h3,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h4,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content p,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content table{margin:1em 0}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl{border-bottom:none;border-top:1px solid var(--ck-accessibility-help-dialog-border-color);display:grid;grid-template-columns:2fr 1fr}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dd,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dt{border-bottom:1px solid var(--ck-accessibility-help-dialog-border-color);padding:.4em 0}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dt{grid-column-start:1}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dd{grid-column-start:2;text-align:right}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content code,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd{background:var(--ck-accessibility-help-dialog-code-background-color);border-radius:2px;display:inline-block;font-size:.9em;line-height:1;padding:.4em;text-align:center;vertical-align:middle}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content code{font-family:monospace}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd{box-shadow:0 1px 1px var(--ck-accessibility-help-dialog-kbd-shadow-color);margin:0 1px;min-width:1.8em}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd+kbd{margin-left:2px}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/editorui/accessibilityhelp.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAQA,MACC,8CAA+C,CAC/C,+CAAgD,CAChD,mDAA8D,CAC9D,4DAAyE,CACzE,uDACD,CAEA,wEAOC,4BAA6B,CAJ7B,yDAA0D,CAD1D,uDAAwD,CAExD,aAAc,CAHd,+BAAgC,CAIhC,gBAgFD,CA5EC,8ECdA,2BAA2B,CCF3B,2CAA8B,CDC9B,YDkBA,CAZD,wEAcC,EACC,kBACD,CAqED,CAlEC,kFACC,YACD,CAEA,2EAEC,eAAgB,CADhB,eAED,CAEA,2EAEC,aAAc,CADd,eAED,CAEA,8SAIC,YACD,CAEA,2EAIC,kBAAmB,CADnB,qEAAsE,CAFtE,YAAa,CACb,6BAiBD,CAbC,4JACC,wEAAyE,CACzE,cACD,CAEA,8EACC,mBACD,CAEA,8EACC,mBAAoB,CACpB,gBACD,CAGD,yJAEC,oEAAqE,CAIrE,iBAAkB,CALlB,oBAAqB,CAOrB,cAAe,CAHf,aAAc,CAFd,YAAa,CAIb,iBAAkB,CAHlB,qBAKD,CAEA,6EACC,qBAC
4752D,CAEA,4EAEC,yEAA4E,CAC5E,YAAa,CAFb,eAOD,CAHC,gFACC,eACD",sourcesContent:[`/* 4753 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4754 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4755 */ 4756 4757@import "../../../mixins/_focus.css"; 4758@import "../../../mixins/_shadow.css"; 4759 4760:root { 4761 --ck-accessibility-help-dialog-max-width: 600px; 4762 --ck-accessibility-help-dialog-max-height: 400px; 4763 --ck-accessibility-help-dialog-border-color: hsl(220, 6%, 81%); 4764 --ck-accessibility-help-dialog-code-background-color: hsl(0deg 0% 92.94%); 4765 --ck-accessibility-help-dialog-kbd-shadow-color: hsl(0deg 0% 61%); 4766} 4767 4768.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content { 4769 padding: var(--ck-spacing-large); 4770 max-width: var(--ck-accessibility-help-dialog-max-width); 4771 max-height: var(--ck-accessibility-help-dialog-max-height); 4772 overflow: auto; 4773 user-select: text; 4774 4775 border: 1px solid transparent; 4776 4777 &:focus { 4778 @mixin ck-focus-ring; 4779 @mixin ck-box-shadow var(--ck-focus-outer-shadow); 4780 } 4781 4782 * { 4783 white-space: normal; 4784 } 4785 4786 /* Hide the main label of the content container. */ 4787 & .ck-label { 4788 display: none; 4789 } 4790 4791 & h3 { 4792 font-weight: bold; 4793 font-size: 1.2em; 4794 } 4795 4796 & h4 { 4797 font-weight: bold; 4798 font-size: 1em; 4799 } 4800 4801 & p, 4802 & h3, 4803 & h4, 4804 & table { 4805 margin: 1em 0; 4806 } 4807 4808 & dl { 4809 display: grid; 4810 grid-template-columns: 2fr 1fr; 4811 border-top: 1px solid var(--ck-accessibility-help-dialog-border-color); 4812 border-bottom: none; 4813 4814 & dt, & dd { 4815 border-bottom: 1px solid var(--ck-accessibility-help-dialog-border-color); 4816 padding: .4em 0; 4817 } 4818 4819 & dt { 4820 grid-column-start: 1; 4821 } 4822 4823 & dd { 4824 grid-column-start: 2; 4825 text-align: right; 4826 } 4827 } 4828 4829 & kbd, & code { 4830 display: inline-block; 4831 background: var(--ck-accessibility-help-dialog-code-background-color); 4832 padding: .4em; 4833 vertical-align: middle; 4834 line-height: 1; 4835 border-radius: 2px; 4836 text-align: center; 4837 font-size: .9em; 4838 } 4839 4840 & code { 4841 font-family: monospace; 4842 } 4843 4844 & kbd { 4845 min-width: 1.8em; 4846 box-shadow: 0px 1px 1px var(--ck-accessibility-help-dialog-kbd-shadow-color); 4847 margin: 0 1px; 4848 4849 & + kbd { 4850 margin-left: 2px; 4851 } 4852 } 4853} 4854 4855`,`/* 4856 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4857 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4858 */ 4859 4860/** 4861 * A visual style of focused element's border. 4862 */ 4863@define-mixin ck-focus-ring { 4864 /* Disable native outline. */ 4865 outline: none; 4866 border: var(--ck-focus-ring) 4867} 4868`,`/* 4869 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4870 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4871 */ 4872 4873/** 4874 * A helper to combine multiple shadows. 4875 */ 4876@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 { 4877 box-shadow: $shadowA, $shadowB; 4878} 4879 4880/** 4881 * Gives an element a drop shadow so it looks like a floating panel. 4882 */ 4883@define-mixin ck-drop-shadow { 4884 @mixin ck-box-shadow var(--ck-drop-shadow); 4885} 4886`],sourceRoot:""}]);const C=w},1185:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/editorui/editorui.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAWA,MACC,0CACD,CAEA,yDCJC,eDWD,CAPA,yJCAE,qCDOF,CAJC,oEEPA,2BAA2B,CCF3B,qCAA8B,CDC9B,YFWA,CAGD,+BAGC,4BAA6B,CAF7B,aAAc,CACd,oCA6BD,CA1BC,wCACC,eACD,CAEA,wCACC,gBACD,CAGA,4CACC,kCACD,CAGA,2CA
4886KC,qCACD,CAGA,sDACC,kDACD,CAKA,gEACC,oDACD,CAIA,gEACC,iDACD",sourcesContent:[`/* 4887 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4888 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4889 */ 4890 4891@import "../../../mixins/_rounded.css"; 4892@import "../../../mixins/_disabled.css"; 4893@import "../../../mixins/_shadow.css"; 4894@import "../../../mixins/_focus.css"; 4895@import "../../mixins/_button.css"; 4896 4897:root { 4898 --ck-color-editable-blur-selection: hsl(0, 0%, 85%); 4899} 4900 4901.ck.ck-editor__editable:not(.ck-editor__nested-editable) { 4902 @mixin ck-rounded-corners; 4903 4904 &.ck-focused { 4905 @mixin ck-focus-ring; 4906 @mixin ck-box-shadow var(--ck-inner-shadow); 4907 } 4908} 4909 4910.ck.ck-editor__editable_inline { 4911 overflow: auto; 4912 padding: 0 var(--ck-spacing-standard); 4913 border: 1px solid transparent; 4914 4915 &[dir="ltr"] { 4916 text-align: left; 4917 } 4918 4919 &[dir="rtl"] { 4920 text-align: right; 4921 } 4922 4923 /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/116 */ 4924 & > *:first-child { 4925 margin-top: var(--ck-spacing-large); 4926 } 4927 4928 /* https://github.com/ckeditor/ckeditor5/issues/847 */ 4929 & > *:last-child { 4930 /* 4931 * This value should match with the default margins of the block elements (like .media or .image) 4932 * to avoid a content jumping when the fake selection container shows up (See https://github.com/ckeditor/ckeditor5/issues/9825). 4933 */ 4934 margin-bottom: var(--ck-spacing-large); 4935 } 4936 4937 /* https://github.com/ckeditor/ckeditor5/issues/6517 */ 4938 &.ck-blurred ::selection { 4939 background: var(--ck-color-editable-blur-selection); 4940 } 4941} 4942 4943/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/111 */ 4944.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_n"] { 4945 &::after { 4946 border-bottom-color: var(--ck-color-panel-background); 4947 } 4948} 4949 4950.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_s"] { 4951 &::after { 4952 border-top-color: var(--ck-color-panel-background); 4953 } 4954} 4955`,`/* 4956 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4957 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4958 */ 4959 4960/** 4961 * Implements rounded corner interface for .ck-rounded-corners class. 4962 * 4963 * @see $ck-border-radius 4964 */ 4965@define-mixin ck-rounded-corners { 4966 border-radius: 0; 4967 4968 @nest .ck-rounded-corners &, 4969 &.ck-rounded-corners { 4970 border-radius: var(--ck-border-radius); 4971 @mixin-content; 4972 } 4973} 4974`,`/* 4975 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4976 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4977 */ 4978 4979/** 4980 * A visual style of focused element's border. 4981 */ 4982@define-mixin ck-focus-ring { 4983 /* Disable native outline. */ 4984 outline: none; 4985 border: var(--ck-focus-ring) 4986} 4987`,`/* 4988 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 4989 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 4990 */ 4991 4992/** 4993 * A helper to combine multiple shadows. 4994 */ 4995@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 { 4996 box-shadow: $shadowA, $shadowB; 4997} 4998 4999/** 5000 * Gives an element a drop shadow so it looks like a floating panel. 5001 */ 5002@define-mixin ck-drop-shadow { 5003 @mixin ck-box-shadow var(--ck-drop-shadow); 5004} 5005`],sourceRoot:""}]);const C=w},7913:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__header h2.ck-form__header__label{flex-grow:1}:root{--ck-form-header-height:44px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}[dir=ltr] .ck.ck-form__header>.ck-icon{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-form__header>.ck-icon{margin-left:var(--ck-spacing-medium)}.ck.ck-form__header .ck-form__header__label{--ck-font-size-base:15px;font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/formheader/formheader.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/formheader/formheader.css"],names:[],mappings:"AAKA,oBAIC,kBAAmB,CAHnB,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CAEjB,6BAKD,CAHC,8CACC,WACD,CCPD,MACC,4BACD,CAEA,oBAIC,mDAAoD,CAFpD,mCAAoC,CACpC,wCAAyC,CAFzC,uDAmBD,CAdC,uCAEE,qCAMF,CARA,uCAME,oCAEF,CAEA,4CACC,wBAAyB,CACzB,eACD",sourcesContent:[`/* 5006 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5007 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5008 */ 5009
5010.ck.ck-form__header { 5011 display: flex; 5012 flex-direction: row; 5013 flex-wrap: nowrap; 5014 align-items: center; 5015 justify-content: space-between; 5016 5017 & h2.ck-form__header__label { 5018 flex-grow: 1; 5019 } 5020} 5021`,`/* 5022 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5023 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5024 */ 5025 5026@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 5027 5028:root { 5029 --ck-form-header-height: 44px; 5030} 5031 5032.ck.ck-form__header { 5033 padding: var(--ck-spacing-small) var(--ck-spacing-large); 5034 height: var(--ck-form-header-height); 5035 line-height: var(--ck-form-header-height); 5036 border-bottom: 1px solid var(--ck-color-base-border); 5037 5038 & > .ck-icon { 5039 @mixin ck-dir ltr { 5040 margin-right: var(--ck-spacing-medium); 5041 } 5042 5043 @mixin ck-dir rtl { 5044 margin-left: var(--ck-spacing-medium); 5045 } 5046 } 5047 5048 & .ck-form__header__label { 5049 --ck-font-size-base: 15px; 5050 font-weight: bold; 5051 } 5052} 5053`],sourceRoot:""}]);const C=w},9529:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-highlighted-text mark{background:var(--ck-color-highlight-background);font-size:inherit;font-weight:inherit;line-height:inherit;vertical-align:initial}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/highlightedtext/highlightedtext.css"],names:[],mappings:"AAKA,6BACC,+CAAgD,CAIhD,iBAAkB,CAFlB,mBAAoB,CACpB,mBAAoB,CAFpB,sBAID",sourcesContent:[`/* 5054 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5055 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5056 */ 5057 5058.ck.ck-highlighted-text mark { 5059 background: var(--ck-color-highlight-background); 5060 vertical-align: initial; 5061 font-weight: inherit; 5062 line-height: inherit; 5063 font-size: inherit; 5064} 5065`],sourceRoot:""}]);const C=w},7621:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{cursor:inherit}.ck.ck-icon.ck-icon_inherit-color,.ck.ck-icon.ck-icon_inherit-color *{color:inherit}.ck.ck-icon.ck-icon_inherit-color :not([fill]){fill:currentColor}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/icon/icon.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/icon/icon.css"],names:[],mappings:"AAKA,YACC,qBACD,CCFA,MACC,0EACD,CAEA,YAKC,uBAAwB,CAHxB,0BAA2B,CAD3B,yBAA0B,CAU1B,qBAoBD,CAlBC,0BALA,cAQA,CAMC,sEACC,aAMD,CAJC,+CAEC,iBACD",sourcesContent:[`/* 5066 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5067 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5068 */ 5069 5070.ck.ck-icon { 5071 vertical-align: middle; 5072} 5073`,`/* 5074 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5075 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5076 */ 5077 5078:root { 5079 --ck-icon-size: calc(var(--ck-line-height-base) * var(--ck-font-size-normal)); 5080} 5081 5082.ck.ck-icon { 5083 width: var(--ck-icon-size); 5084 height: var(--ck-icon-size); 5085 5086 /* Multiplied by the height of the line in "px" should give SVG "viewport" dimensions */ 5087 font-size: .8333350694em; 5088 5089 /* Inherit cursor style (#5). */ 5090 cursor: inherit; 5091 5092 /* This will prevent blurry icons on Firefox. See #340. */ 5093 will-change: transform; 5094 5095 & * { 5096 /* Inherit cursor style (#5). */ 5097 cursor: inherit; 5098 } 5099 5100 /* Allows dynamic coloring of an icon by inheriting its color from the parent. */ 5101 &.ck-icon_inherit-color { 5102 color: inherit; 5103 5104 & * { 5105 color: inherit; 5106 5107 &:not([fill]) { 5108 /* Needed by FF. */ 5109 fill: currentColor; 5110 } 5111 } 5112 } 5113} 5114`],sourceRoot:""}]);const C=w},253:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);
5114transition:box-shadow .1s ease-in-out,border .1s ease-in-out}@media (prefers-reduced-motion:reduce){.ck.ck-input{transition:none}}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}@media (prefers-reduced-motion:reduce){.ck.ck-input.ck-error{animation:none}}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/input/input.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AASA,MACC,qBAAsB,CAGtB,2CACD,CAEA,aCLC,eDmDD,CA9CA,iECDE,qCD+CF,CA9CA,aAGC,2CAA4C,CAC5C,6CAA8C,CAK9C,4CAA6C,CAH7C,+BAAgC,CADhC,6DAA8D,CAO9D,4DAkCD,CAhCC,uCAdD,aAeE,eA+BF,CA9BC,CAEA,mBEvBA,2BAA2B,CCF3B,2CAA8B,CDC9B,YF2BA,CAEA,uBAEC,oDAAqD,CADrD,sDAAuD,CAEvD,yCAMD,CAJC,6BGnCD,oDHsCC,CAGD,sBAEC,sCAAuC,CADvC,+CAUD,CAPC,uCAJD,sBAKE,cAMF,CALC,CAEA,4BGjDD,iDHmDC,CAIF,0BACC,IACC,0BACD,CAEA,IACC,yBACD,CAEA,IACC,0BACD,CAEA,IACC,yBACD,CACD",sourcesContent:[`/* 5115 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5116 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5117 */ 5118 5119@import "../../../mixins/_rounded.css"; 5120@import "../../../mixins/_focus.css"; 5121@import "../../../mixins/_shadow.css"; 5122 5123:root { 5124 --ck-input-width: 18em; 5125 5126 /* Backward compatibility. */ 5127 --ck-input-text-width: var(--ck-input-width); 5128} 5129 5130.ck.ck-input { 5131 @mixin ck-rounded-corners; 5132 5133 background: var(--ck-color-input-background); 5134 border: 1px solid var(--ck-color-input-border); 5135 padding: var(--ck-spacing-extra-tiny) var(--ck-spacing-medium); 5136 min-width: var(--ck-input-width); 5137 5138 /* This is important to stay of the same height as surrounding buttons */ 5139 min-height: var(--ck-ui-component-min-height); 5140 5141 /* Apply some smooth transition to the box-shadow and border. */ 5142 transition: box-shadow .1s ease-in-out, border .1s ease-in-out; 5143 5144 @media (prefers-reduced-motion: reduce) { 5145 transition: none; 5146 } 5147 5148 &:focus { 5149 @mixin ck-focus-ring; 5150 @mixin ck-box-shadow var(--ck-focus-outer-shadow); 5151 } 5152 5153 &[readonly] { 5154 border: 1px solid var(--ck-color-input-disabled-border); 5155 background: var(--ck-color-input-disabled-background); 5156 color: var(--ck-color-input-disabled-text); 5157 5158 &:focus { 5159 /* The read-only input should have a slightly less visible shadow when focused. */ 5160 @mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow); 5161 } 5162 } 5163 5164 &.ck-error { 5165 border-color: var(--ck-color-input-error-border); 5166 animation: ck-input-shake .3s ease both; 5167 5168 @media (prefers-reduced-motion: reduce) { 5169 animation: none; 5170 } 5171 5172 &:focus { 5173 @mixin ck-box-shadow var(--ck-focus-error-outer-shadow); 5174 } 5175 } 5176} 5177 5178@keyframes ck-input-shake { 5179 20% { 5180 transform: translateX(-2px); 5181 } 5182 5183 40% { 5184 transform: translateX(2px); 5185 } 5186 5187 60% { 5188 transform: translateX(-1px); 5189 } 5190 5191 80% { 5192 transform: translateX(1px); 5193 } 5194} 5195`,`/* 5196 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5197 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5198 */ 5199 5200/** 5201 * Implements rounded corner interface for .ck-rounded-corners class. 5202 * 5203 * @see $ck-border-radius 5204 */ 5205@define-mixin ck-rounded-corners { 5206 border-radius: 0; 5207 5208 @nest .ck-rounded-corners &, 5209 &.ck-rounded-corners { 5210 border-radius: var(--ck-border-radius); 5211 @mixin-content; 5212 } 5213} 5214`,`/* 5215 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5216 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5217 */ 5218 5219/** 5220 * A visual style of focused element's border. 5221 */ 5222@define-mixin ck-focus-ring { 5223 /* Disable native outline. */ 5224 outline: none; 5225 border: var(--ck-focus-ring) 5226} 5227`,`/* 5228 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5229 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5230 */ 5231 5232/** 5233 * A helper to combine multiple shadows. 5234 */
5235@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 { 5236 box-shadow: $shadowA, $shadowB; 5237} 5238 5239/** 5240 * Gives an element a drop shadow so it looks like a floating panel. 5241 */ 5242@define-mixin ck-drop-shadow { 5243 @mixin ck-box-shadow var(--ck-drop-shadow); 5244} 5245`],sourceRoot:""}]);const C=w},7801:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/label/label.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/label/label.css"],names:[],mappings:"AAKA,aACC,aACD,CAEA,mBACC,YACD,CCNA,aACC,eACD",sourcesContent:[`/* 5246 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5247 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5248 */ 5249 5250.ck.ck-label { 5251 display: block; 5252} 5253 5254.ck.ck-voice-label { 5255 display: none; 5256} 5257`,`/* 5258 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5259 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5260 */ 5261 5262.ck.ck-label { 5263 font-weight: bold; 5264} 5265`],sourceRoot:""}]);const C=w},4962:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-labeled-field-label-default-position-x:var(--ck-spacing-medium);--ck-labeled-field-label-default-position-y:calc(var(--ck-font-size-base)*0.6);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0;transform:translate(calc(var(--ck-spacing-medium)*-1),-6px) scale(.75);transform-origin:100% 0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}@media (prefers-reduced-motion:reduce){.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transition:none}}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focu
5265sed):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-labeled-field-label-default-position-x),var(--ck-labeled-field-label-default-position-y)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-labeled-field-label-default-position-x)*-1),var(--ck-labeled-field-label-default-position-y)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/labeledfield/labeledfieldview.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAMC,mEACC,YAAa,CACb,iBACD,CAEA,uCACC,aAAc,CACd,iBACD,CCND,MACC,kEAAsE,CACtE,gFAAiF,CACjF,oEAAqE,CACrE,8EAAiF,CACjF,yEACD,CAEA,0BCLC,eDmHD,CA9GA,2FCDE,qCD+GF,CA3GC,mEACC,UAwCD,CAtCC,gFACC,KAoCD,CArCA,0FAIE,MAAS,CAGT,6DAA+D,CAF/D,oBAgCF,CArCA,0FAWE,OAAU,CAEV,sEAA0E,CAD1E,uBAyBF,CArCA,gFAkBC,yDAA0D,CAG1D,eAAmB,CADnB,kBAAoB,CAOpB,cAAe,CAFf,eAAgB,CANhB,2CAA8C,CAH9C,mBAAoB,CAQpB,sBAAuB,CAKvB,+JAQD,CAHC,uCAlCD,gFAmCE,eAEF,CADC,CASD,mKACC,gCACD,CAGD,yDACC,mCAAoC,CACpC,kCAAmC,CAInC,kBAKD,CAHC,6FACC,gCACD,CAID,4OAEC,yCACD,CAIA,2XAGE,+HAYF,CAfA,2XAOE,wIAQF,CAfA,uWAaC,sBAAuB,CAFvB,iEAAkE,CAGlE,SACD,CAKA,8FACC,sBACD,CAGA,yIACC,SACD,CAGA,kMACC,8HACD",sourcesContent:[`/* 5266 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5267 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5268 */ 5269 5270.ck.ck-labeled-field-view { 5271 & > .ck.ck-labeled-field-view__input-wrapper { 5272 display: flex; 5273 position: relative; 5274 } 5275 5276 & .ck.ck-label { 5277 display: block; 5278 position: absolute; 5279 } 5280} 5281`,`/* 5282 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5283 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5284 */ 5285 5286@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 5287@import "../../../mixins/_rounded.css"; 5288 5289:root { 5290 --ck-labeled-field-view-transition: .1s cubic-bezier(0, 0, 0.24, 0.95); 5291 --ck-labeled-field-empty-unfocused-max-width: 100% - 2 * var(--ck-spacing-medium); 5292 --ck-labeled-field-label-default-position-x: var(--ck-spacing-medium); 5293 --ck-labeled-field-label-default-position-y: calc(0.6 * var(--ck-font-size-base)); 5294 --ck-color-labeled-field-label-background: var(--ck-color-base-background); 5295} 5296 5297.ck.ck-labeled-field-view { 5298 @mixin ck-rounded-corners; 5299 5300 & > .ck.ck-labeled-field-view__input-wrapper { 5301 width: 100%; 5302 5303 & > .ck.ck-label { 5304 top: 0px; 5305 5306 @mixin ck-dir ltr { 5307 left: 0px; 5308 transform-origin: 0 0; 5309 /* By default, display the label scaled down above the field. */ 5310 transform: translate(var(--ck-spacing-medium), -6px) scale(.75); 5311 } 5312 5313 @mixin ck-dir rtl { 5314 right: 0px; 5315 transform-origin: 100% 0; 5316 transform: translate(calc(-1 * var(--ck-spacing-medium)), -6px) scale(.75); 5317 } 5318 5319 pointer-events: none; 5320 5321 background: var(--ck-color-labeled-field-label-background); 5322 padding: 0 calc(.5 * var(--ck-font-size-tiny)); 5323 line-height: initial; 5324 font-weight: normal; 5325 5326 /* Prevent overflow when the label is longer than the input */ 5327 text-overflow: ellipsis; 5328 overflow: hidden; 5329 5330 max-width: 100%; 5331 5332 transition: 5333 transform var(--ck-labeled-field-view-transition), 5334 padding var(--ck-labeled-field-view-transition), 5335 background var(--ck-labeled-field-view-transition); 5336 5337 @media (prefers-reduced-motion: reduce) { 5338 transition: none; 5339 } 5340 } 5341 } 5342 5343 &.ck-error { 5344 & > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label { 5345 color: var(--ck-color-base-error); 5346 } 5347 5348 & .ck-input:not([readonly]) + .ck.ck-label { 5349 color: var(--ck-color-base-error); 5350 } 5351 } 5352 5353 & .ck-labeled-field-view__status { 5354 font-size: var(--ck-font-size-small); 5355 margin-top: var(--ck-spacing-small); 5356 5357 /* Let the info wrap to the next line to avoid stretching the layout horizontally. 5358 The status could be very long. */ 5359 white-space: normal; 5360 5361 &.ck-labeled-field-view__status_error { 5362 color: var(--ck-color-base-error); 5363 } 5364 } 5365
5366 /* Disabled fields and fields that have no focus should fade out. */ 5367 &.ck-disabled > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label, 5368 &.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label { 5369 color: var(--ck-color-input-disabled-text); 5370 } 5371 5372 /* Fields that are disabled or not focused and without a placeholder should have full-sized labels. */ 5373 /* stylelint-disable-next-line no-descending-specificity */ 5374 &.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label, 5375 &.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label { 5376 @mixin ck-dir ltr { 5377 transform: translate(var(--ck-labeled-field-label-default-position-x), var(--ck-labeled-field-label-default-position-y)) scale(1); 5378 } 5379 5380 @mixin ck-dir rtl { 5381 transform: translate(calc(-1 * var(--ck-labeled-field-label-default-position-x)), var(--ck-labeled-field-label-default-position-y)) scale(1); 5382 } 5383 5384 /* Compensate for the default translate position. */ 5385 max-width: calc(var(--ck-labeled-field-empty-unfocused-max-width)); 5386 5387 background: transparent; 5388 padding: 0; 5389 } 5390 5391 /*------ DropdownView integration ----------------------------------------------------------------------------------- */ 5392 5393 /* Make sure dropdown' background color in any of dropdown's state does not collide with labeled field. */ 5394 & > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck.ck-button { 5395 background: transparent; 5396 } 5397 5398 /* When the dropdown is "empty", the labeled field label replaces its label. */ 5399 &.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck-button > .ck-button__label { 5400 opacity: 0; 5401 } 5402 5403 /* Make sure the label of the empty, unfocused input does not cover the dropdown arrow. */ 5404 &.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown + .ck-label { 5405 max-width: calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard)); 5406 } 5407} 5408`,`/* 5409 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5410 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5411 */ 5412 5413/** 5414 * Implements rounded corner interface for .ck-rounded-corners class. 5415 * 5416 * @see $ck-border-radius 5417 */ 5418@define-mixin ck-rounded-corners { 5419 border-radius: 0; 5420 5421 @nest .ck-rounded-corners &, 5422 &.ck-rounded-corners { 5423 border-radius: var(--ck-border-radius); 5424 @mixin-content; 5425 } 5426} 5427`],sourceRoot:""}]);const C=w},5199:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}:root{--ck-list-button-padding:calc(var(--ck-line-height-base)*0.11*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*0.4*var(--ck-font-size-base))}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item>.ck-button{border-radius:0;min-height:unset;width:100%}[dir=ltr] .ck.ck-list__item>.ck-button{text-align:left}[dir=rtl] .ck.ck-list__item>.ck-button{text-align:right}.ck.ck-list__item>.ck-button{padding:var(--ck-list-button-padding)}.ck.ck-list__item>.ck-button:active{box-shadow:none}.ck.ck-list__item>.ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item>.ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item>.ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item>.ck-button.ck-on:focus:not(.ck-switchbutton):not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item>.ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item>.ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item>.ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck-list .ck-list__group{padding-top:var(--ck-spacing-medium);
5427:not(.ck-hidden)~&{border-top:1px solid var(--ck-color-base-border)}}.ck-list .ck-list__group>.ck-label{font-size:11px;font-weight:700;padding:var(--ck-spacing-medium) var(--ck-spacing-medium) 0 var(--ck-spacing-medium)}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/list/list.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/list/list.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,YAGC,YAAa,CACb,qBAAsB,CCFtB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBDaD,CAZC,2DAEC,aACD,CAKA,kCACC,iBAAkB,CAClB,2BACD,CEdD,MACC,qJAGD,CAEA,YCLC,eDUD,CALA,+DCDE,qCDMF,CALA,YAIC,0CAA2C,CAD3C,oBAED,CAEA,kBACC,cAAe,CACf,cA2DD,CAzDC,6BAGC,eAAgB,CAFhB,gBAAiB,CACjB,UAwCD,CA1CA,uCAME,eAoCF,CA1CA,uCAUE,gBAgCF,CA1CA,6BAgBC,qCA0BD,CAxBC,oCACC,eACD,CAEA,mCACC,oDAAqD,CACrD,yCAaD,CAXC,0CACC,eACD,CAEA,2DACC,0DACD,CAEA,iFACC,4CACD,CAGD,qDACC,uDACD,CAMA,yCACC,0CAA2C,CAC3C,aAMD,CAJC,iEACC,uDAAwD,CACxD,aACD,CAKH,yBACC,oCAAqC,CAGrC,mBACC,gDACD,CAOD,CALC,mCACC,cAAe,CACf,eAAiB,CACjB,oFACD,CAGD,uBAGC,sCAAuC,CAFvC,UAAW,CACX,UAED",sourcesContent:[`/* 5428 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5429 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5430 */ 5431 5432@import "../../mixins/_unselectable.css"; 5433 5434.ck.ck-list { 5435 @mixin ck-unselectable; 5436 5437 display: flex; 5438 flex-direction: column; 5439 5440 & .ck-list__item, 5441 & .ck-list__separator { 5442 display: block; 5443 } 5444 5445 /* Make sure that whatever child of the list item gets focus, it remains on the 5446 top. Thanks to that, styles like box-shadow, outline, etc. are not masked by 5447 adjacent list items. */ 5448 & .ck-list__item > *:focus { 5449 position: relative; 5450 z-index: var(--ck-z-default); 5451 } 5452} 5453`,`/* 5454 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5455 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5456 */ 5457 5458/** 5459 * Makes element unselectable. 5460 */ 5461@define-mixin ck-unselectable { 5462 -moz-user-select: none; 5463 -webkit-user-select: none; 5464 -ms-user-select: none; 5465 user-select: none 5466} 5467`,`/* 5468 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5469 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5470 */ 5471 5472@import "../../../mixins/_disabled.css"; 5473@import "../../../mixins/_rounded.css"; 5474@import "../../../mixins/_shadow.css"; 5475@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 5476 5477:root { 5478 --ck-list-button-padding: 5479 calc(.11 * var(--ck-line-height-base) * var(--ck-font-size-base)) 5480 calc(.4 * var(--ck-line-height-base) * var(--ck-font-size-base)); 5481} 5482 5483.ck.ck-list { 5484 @mixin ck-rounded-corners; 5485 5486 list-style-type: none; 5487 background: var(--ck-color-list-background); 5488} 5489 5490.ck.ck-list__item { 5491 cursor: default; 5492 min-width: 12em; 5493 5494 & > .ck-button { 5495 min-height: unset; 5496 width: 100%; 5497 border-radius: 0; 5498 5499 @mixin ck-dir ltr { 5500 text-align: left; 5501 } 5502 5503 @mixin ck-dir rtl { 5504 text-align: right; 5505 } 5506 5507 /* List items should have the same height. Use absolute units to make sure it is so 5508 because e.g. different heading styles may have different height 5509 https://github.com/ckeditor/ckeditor5-heading/issues/63 */ 5510 padding: var(--ck-list-button-padding); 5511 5512 &:active { 5513 box-shadow: none; 5514 } 5515 5516 &.ck-on { 5517 background: var(--ck-color-list-button-on-background); 5518 color: var(--ck-color-list-button-on-text); 5519 5520 &:active { 5521 box-shadow: none; 5522 } 5523 5524 &:hover:not(.ck-disabled) { 5525 background: var(--ck-color-list-button-on-background-focus); 5526 } 5527 5528 &:focus:not(.ck-switchbutton):not(.ck-disabled) { 5529 border-color: var(--ck-color-base-background); 5530 } 5531 } 5532 5533 &:hover:not(.ck-disabled) { 5534 background: var(--ck-color-list-button-hover-background); 5535 } 5536 } 5537 5538 /* It's unnecessary to change the background/text of a switch toggle; it has different ways 5539 of conveying its state (like the switcher) */ 5540 & > .ck-switchbutton { 5541 &.ck-on { 5542 background: var(--ck-color-list-background); 5543 color: inherit; 5544 5545 &:hover:not(.ck-disabled) { 5546 background: var(--ck-color-list-button-hover-background); 5547 color: inherit; 5548 } 5549 } 5550 } 5551} 5552 5553.ck-list .ck-list__group { 5554 padding-top: var(--ck-spacing-medium); 5555 5556 /* The group should have a border when it's not the first item. */
5557 *:not(.ck-hidden) ~ & { 5558 border-top: 1px solid var(--ck-color-base-border); 5559 } 5560 5561 & > .ck-label { 5562 font-size: 11px; 5563 font-weight: bold; 5564 padding: var(--ck-spacing-medium) var(--ck-spacing-medium) 0 var(--ck-spacing-medium); 5565 } 5566} 5567 5568.ck.ck-list__separator { 5569 height: 1px; 5570 width: 100%; 5571 background: var(--ck-color-base-border); 5572} 5573`,`/* 5574 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5575 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5576 */ 5577 5578/** 5579 * Implements rounded corner interface for .ck-rounded-corners class. 5580 * 5581 * @see $ck-border-radius 5582 */ 5583@define-mixin ck-rounded-corners { 5584 border-radius: 0; 5585 5586 @nest .ck-rounded-corners &, 5587 &.ck-rounded-corners { 5588 border-radius: var(--ck-border-radius); 5589 @mixin-content; 5590 } 5591} 5592`],sourceRoot:""}]);const C=w},497:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-menu-bar{background:var(--ck-color-base-background);border:1px solid var(--ck-color-toolbar-border);display:flex;flex-wrap:wrap;gap:var(--ck-spacing-small);justify-content:flex-start;padding:var(--ck-spacing-small);width:100%}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubar.css"],names:[],mappings:"AAKA,gBAIC,0CAA2C,CAG3C,+CAAgD,CANhD,YAAa,CACb,cAAe,CAIf,2BAA4B,CAH5B,0BAA2B,CAE3B,+BAAgC,CAGhC,UACD",sourcesContent:[`/* 5593 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5594 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5595 */ 5596 5597.ck.ck-menu-bar { 5598 display: flex; 5599 flex-wrap: wrap; 5600 justify-content: flex-start; 5601 background: var(--ck-color-base-background); 5602 padding: var(--ck-spacing-small); 5603 gap: var(--ck-spacing-small); 5604 border: 1px solid var(--ck-color-toolbar-border); 5605 width: 100%; 5606} 5607`],sourceRoot:""}]);const C=w},4:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-menu-bar__menu{display:block;font-size:inherit;position:relative}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level{max-width:100%}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/menubar/menubarmenu.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenu.css"],names:[],mappings:"AAKA,sBACC,aAAc,CCCd,iBAAkB,CDAlB,iBACD,CCCC,kDACC,cACD",sourcesContent:[`/* 5608 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5609 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5610 */ 5611 5612.ck.ck-menu-bar__menu { 5613 display: block; 5614 position: relative; 5615} 5616`,`/* 5617 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5618 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5619 */ 5620 5621.ck.ck-menu-bar__menu { 5622 /* Enable font size inheritance, which allows fluid UI scaling. */ 5623 font-size: inherit; 5624 5625 &.ck-menu-bar__menu_top-level { 5626 max-width: 100%; 5627 } 5628} 5629`],sourceRoot:""}]);const C=w},3344:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-menu-bar__menu>.ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button{padding:var(--ck-list-button-padding);width:100%}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button>.ck-button__label{flex-grow:1;overflow:hidden;text-overflow:ellipsis}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button.ck-disabled>.ck-button__label{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-menu-bar__menu>.ck-menu-bar__menu__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-menu-bar__menu>.ck-menu-bar__menu__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button{min-height:unset;padding:var(--ck-spacing-small) var(--ck-spacing-medium)}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button .ck-button__label{line-height:unset;width:unset}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button .ck-icon{display:none}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button{border-radius:0}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button:focus{border-color:transparent;box-shadow:none}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button:focus:not(.ck-on){background:var(--ck-color-button-default-hover-background)}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button:not(:has(.ck-button__icon))>.ck-button__label{margin-left:calc(var(--ck-icon-size) - var(--ck-spacing-small))}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{transform:rotate(-90deg)}[dir=rtl] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{transform:rotate(90deg)}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button.ck-disabled>.ck-menu-bar__menu__button__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/menubar/menubarmenubutton.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenubutton.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AAMC,mFACC,mBAAoB,CACpB,2BACD,CCIA,iDACC,qCAAsC,CACtC,UAuBD,CArBC,mEACC,WAAY,CACZ,eAAgB,CAChB,s
5629BACD,CAEA,+ECdD,kCDgBC,CAGC,qFACC,oCACD,CAIA,qFACC,qCACD,CAOF,6EAEC,gBAAiB,CADjB,wDAgBD,CAbC,+FAEC,iBAAkB,CADlB,WAED,CAEA,mFACC,2BAA4B,CAC5B,4BACD,CAEA,sFACC,YACD,CAMD,mFACC,eAiDD,CA/CC,yFACC,wBAAyB,CACzB,eAKD,CAHC,qGACC,0DACD,CAID,iIACC,+DACD,CAEA,qHACC,mCASD,CAVA,+HAIE,wBAMF,CAVA,+HAQE,uBAEF,CAEA,iICrFD,kCDuFC,CAGC,+HAIC,sCAAuC,CAHvC,gCAID,CAIA,+HACC,+BAAgC,CAGhC,oCACD",sourcesContent:[`/* 5630 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5631 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5632 */ 5633 5634.ck.ck-menu-bar__menu { 5635 & > .ck-menu-bar__menu__button > .ck-menu-bar__menu__button__arrow { 5636 pointer-events: none; 5637 z-index: var(--ck-z-default); 5638 } 5639} 5640`,`/* 5641 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5642 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5643 */ 5644 5645@import "../../../mixins/_disabled.css"; 5646@import "../../mixins/_button.css"; 5647@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 5648 5649.ck.ck-menu-bar__menu { 5650 /* 5651 * All menu buttons. 5652 */ 5653 & > .ck-menu-bar__menu__button { 5654 padding: var(--ck-list-button-padding); 5655 width: 100%; 5656 5657 & > .ck-button__label { 5658 flex-grow: 1; 5659 overflow: hidden; 5660 text-overflow: ellipsis; 5661 } 5662 5663 &.ck-disabled > .ck-button__label { 5664 @mixin ck-disabled; 5665 } 5666 5667 @mixin ck-dir ltr { 5668 &:not(.ck-button_with-text) { 5669 padding-left: var(--ck-spacing-small); 5670 } 5671 } 5672 5673 @mixin ck-dir rtl { 5674 &:not(.ck-button_with-text) { 5675 padding-right: var(--ck-spacing-small); 5676 } 5677 } 5678 } 5679 5680 /* 5681 * Top-level menu buttons only. 5682 */ 5683 &.ck-menu-bar__menu_top-level > .ck-menu-bar__menu__button { 5684 padding: var(--ck-spacing-small) var(--ck-spacing-medium); 5685 min-height: unset; 5686 5687 & .ck-button__label { 5688 width: unset; 5689 line-height: unset; 5690 } 5691 5692 &.ck-on { 5693 border-bottom-left-radius: 0; 5694 border-bottom-right-radius: 0; 5695 } 5696 5697 & .ck-icon { 5698 display: none; 5699 } 5700 } 5701 5702 /* 5703 * Sub-menu buttons. 5704 */ 5705 &:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button { 5706 border-radius: 0; 5707 5708 &:focus { 5709 border-color: transparent; 5710 box-shadow: none; 5711 5712 &:not(.ck-on) { 5713 background: var(--ck-color-button-default-hover-background); 5714 } 5715 } 5716 5717 /* Spacing in buttons that miss the icon. */ 5718 &:not(:has(.ck-button__icon)) > .ck-button__label { 5719 margin-left: calc(var(--ck-icon-size) - var(--ck-spacing-small)); 5720 } 5721 5722 & > .ck-menu-bar__menu__button__arrow { 5723 width: var(--ck-dropdown-arrow-size); 5724 5725 @mixin ck-dir ltr { 5726 transform: rotate(-90deg); 5727 } 5728 5729 @mixin ck-dir rtl { 5730 transform: rotate(90deg); 5731 } 5732 } 5733 5734 &.ck-disabled > .ck-menu-bar__menu__button__arrow { 5735 @mixin ck-disabled; 5736 } 5737 5738 @mixin ck-dir ltr { 5739 & > .ck-menu-bar__menu__button__arrow { 5740 right: var(--ck-spacing-standard); 5741 5742 /* A space to accommodate the triangle. */ 5743 margin-left: var(--ck-spacing-standard); 5744 } 5745 } 5746 5747 @mixin ck-dir rtl { 5748 & > .ck-menu-bar__menu__button__arrow { 5749 left: var(--ck-spacing-standard); 5750 5751 /* A space to accommodate the triangle. */ 5752 margin-right: var(--ck-spacing-small); 5753 } 5754 } 5755 } 5756} 5757`,`/* 5758 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5759 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5760 */ 5761 5762/** 5763 * A class which indicates that an element holding it is disabled. 5764 */ 5765@define-mixin ck-disabled { 5766 opacity: var(--ck-disabled-opacity); 5767} 5768`],sourceRoot:""}]);const C=w},9481:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,":root{--ck-menu-bar-menu-item-min-width:18em}.ck.ck-menu-bar__menu .ck.ck-menu-bar__menu__item{min-width:var(--ck-menu-bar-menu-item-min-width)}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenulistitem.css"],names:[],mappings:"AAKA,MACC,sCACD,CAEA,kDACC,gDACD",sourcesContent:[`/* 5769 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5770 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5771 */ 5772 5773:root { 5774 --ck-menu-bar-menu-item-min-width: 18em; 5775} 5776 5777.ck.ck-menu-bar__menu .ck.ck-menu-bar__menu__item { 5778 min-width: var(--ck-menu-bar-menu-item-min-width); 5779} 5780`],sourceRoot:""}]);const C=w},977:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button{border-radius:0}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container,.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container .ck-spinner{--ck-toolbar-spinner-size:20px}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button:focus{border-color:transparent;box-shadow:none}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button:focus:not(.ck-on){background:var(--ck-color-button-default-hover-background)}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__panel>ul>.ck-menu-bar__menu__item>.ck-menu-bar__menu__item__button:not(:has(.ck-button__icon))>.ck-button__label{margin-left:calc(var(--ck-icon-size) - var(--ck-spacing-small))}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenulistitembutton.css"],names:[],mappings:"AASC,iEACC,eA0BD,CAxBC,0LAGC,8BACD,CAEA,uFAEC,4CAA+C,CAC/C,oCACD,CAMA,uEACC,wBAAyB,CACzB,eAKD,CAHC,mFACC,0DACD,CASD,uLACC,+DACD",sourcesContent:[`/* 5781 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5782 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5783 */ 5784
5785.ck.ck-menu-bar__menu { 5786 /* 5787 * List item buttons. 5788 */ 5789 & .ck-button.ck-menu-bar__menu__item__button { 5790 border-radius: 0; 5791 5792 & > .ck-spinner-container, 5793 & > .ck-spinner-container .ck-spinner { 5794 /* These styles correspond to .ck-icon so that the spinner seamlessly replaces the icon. */ 5795 --ck-toolbar-spinner-size: 20px; 5796 } 5797 5798 & > .ck-spinner-container { 5799 /* These margins are the same as for .ck-icon. */ 5800 margin-left: calc(-1 * var(--ck-spacing-small)); 5801 margin-right: var(--ck-spacing-small); 5802 } 5803 5804 /* 5805 * Hovered items automatically get focused. Default focus styles look odd 5806 * while moving across a huge list of items so let's get rid of them 5807 */ 5808 &:focus { 5809 border-color: transparent; 5810 box-shadow: none; 5811 5812 &:not(.ck-on) { 5813 background: var(--ck-color-button-default-hover-background); 5814 } 5815 } 5816 } 5817 5818 /* 5819 * First-level sub-menu item buttons. 5820 */ 5821 &.ck-menu-bar__menu_top-level > .ck-menu-bar__menu__panel > ul > .ck-menu-bar__menu__item > .ck-menu-bar__menu__item__button { 5822 /* Spacing in buttons that miss the icon. */ 5823 &:not(:has(.ck-button__icon)) > .ck-button__label { 5824 margin-left: calc(var(--ck-icon-size) - var(--ck-spacing-small)); 5825 } 5826 } 5827} 5828 5829 5830`],sourceRoot:""}]);const C=w},9108:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,":root{--ck-menu-bar-menu-max-width:75vw;--ck-menu-bar-nested-menu-horizontal-offset:5px}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{max-width:var(--ck-menu-bar-menu-max-width);position:absolute;z-index:var(--ck-z-panel)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw{bottom:100%}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw{bottom:auto;top:100%}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se{left:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw{right:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es{left:calc(100% - var(--ck-menu-bar-nested-menu-horizontal-offset))}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es{top:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en{bottom:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{right:calc(100% - var(--ck-menu-bar-nested-menu-horizontal-offset))}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{top:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn{bottom:0}:root{--ck-menu-bar-menu-panel-max-width:75vw}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{border-radius:0}.ck-rounded-corners .ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;height:fit-content;max-width:var(--ck-menu-bar-menu-panel-max-width)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se{border-top-left-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{border-top-right-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne{border-bottom-left-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn{border-bottom-right-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel:focus{outline:none}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/menubar/menubarmenupanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenupanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MACC,iCAAkC,CAClC,+CACD,CAEA,mDAEC,2CAA4C,CAC5C,iBAAkB,CAFlB,yBAkDD,CA9CC,gLAEC,WACD,CAEA,gLAGC,WAAY,CADZ,QAED,CAEA,gLAEC,MAC
5830D,CAEA,gLAEC,OACD,CAEA,gLAEC,kEACD,CAEA,wFACC,KACD,CAEA,wFACC,QACD,CAEA,gLAEC,mEACD,CAEA,wFACC,KACD,CAEA,wFACC,QACD,CCpDD,MACC,uCACD,CAEA,mDCDC,eDmCD,CAlCA,6ICGE,qCD+BF,CAlCA,mDAIC,oDAAqD,CACrD,sDAAuD,CACvD,QAAS,CETT,oCAA8B,CFU9B,kBAAmB,CACnB,iDA0BD,CAvBC,gLAEC,wBACD,CAEA,gLAEC,yBACD,CAEA,gLAEC,2BACD,CAEA,gLAEC,4BACD,CAEA,yDACC,YACD",sourcesContent:[`/* 5831 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5832 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5833 */ 5834 5835:root { 5836 --ck-menu-bar-menu-max-width: 75vw; 5837 --ck-menu-bar-nested-menu-horizontal-offset: 5px; 5838} 5839 5840.ck.ck-menu-bar__menu > .ck.ck-menu-bar__menu__panel { 5841 z-index: var(--ck-z-panel); 5842 max-width: var(--ck-menu-bar-menu-max-width); 5843 position: absolute; 5844 5845 &.ck-menu-bar__menu__panel_position_ne, 5846 &.ck-menu-bar__menu__panel_position_nw { 5847 bottom: 100%; 5848 } 5849 5850 &.ck-menu-bar__menu__panel_position_se, 5851 &.ck-menu-bar__menu__panel_position_sw { 5852 top: 100%; 5853 bottom: auto; 5854 } 5855 5856 &.ck-menu-bar__menu__panel_position_ne, 5857 &.ck-menu-bar__menu__panel_position_se { 5858 left: 0px; 5859 } 5860 5861 &.ck-menu-bar__menu__panel_position_nw, 5862 &.ck-menu-bar__menu__panel_position_sw { 5863 right: 0px; 5864 } 5865 5866 &.ck-menu-bar__menu__panel_position_es, 5867 &.ck-menu-bar__menu__panel_position_en { 5868 left: calc( 100% - var(--ck-menu-bar-nested-menu-horizontal-offset) ); 5869 } 5870 5871 &.ck-menu-bar__menu__panel_position_es { 5872 top: 0px; 5873 } 5874 5875 &.ck-menu-bar__menu__panel_position_en { 5876 bottom: 0px; 5877 } 5878 5879 &.ck-menu-bar__menu__panel_position_ws, 5880 &.ck-menu-bar__menu__panel_position_wn { 5881 right: calc( 100% - var(--ck-menu-bar-nested-menu-horizontal-offset) ); 5882 } 5883 5884 &.ck-menu-bar__menu__panel_position_ws { 5885 top: 0px; 5886 } 5887 5888 &.ck-menu-bar__menu__panel_position_wn { 5889 bottom: 0px; 5890 } 5891} 5892`,`/* 5893 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5894 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5895 */ 5896 5897@import "../../../mixins/_rounded.css"; 5898@import "../../../mixins/_shadow.css"; 5899 5900:root { 5901 --ck-menu-bar-menu-panel-max-width: 75vw; 5902} 5903 5904.ck.ck-menu-bar__menu > .ck.ck-menu-bar__menu__panel { 5905 @mixin ck-rounded-corners; 5906 @mixin ck-drop-shadow; 5907 5908 background: var(--ck-color-dropdown-panel-background); 5909 border: 1px solid var(--ck-color-dropdown-panel-border); 5910 bottom: 0; 5911 height: fit-content; 5912 max-width: var(--ck-menu-bar-menu-panel-max-width); 5913 5914 /* Corner border radius consistent with the button. */ 5915 &.ck-menu-bar__menu__panel_position_es, 5916 &.ck-menu-bar__menu__panel_position_se { 5917 border-top-left-radius: 0; 5918 } 5919 5920 &.ck-menu-bar__menu__panel_position_ws, 5921 &.ck-menu-bar__menu__panel_position_sw { 5922 border-top-right-radius: 0; 5923 } 5924 5925 &.ck-menu-bar__menu__panel_position_en, 5926 &.ck-menu-bar__menu__panel_position_ne { 5927 border-bottom-left-radius: 0; 5928 } 5929 5930 &.ck-menu-bar__menu__panel_position_wn, 5931 &.ck-menu-bar__menu__panel_position_nw { 5932 border-bottom-right-radius: 0; 5933 } 5934 5935 &:focus { 5936 outline: none; 5937 } 5938} 5939`,`/* 5940 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5941 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5942 */ 5943 5944/** 5945 * Implements rounded corner interface for .ck-rounded-corners class. 5946 * 5947 * @see $ck-border-radius 5948 */ 5949@define-mixin ck-rounded-corners { 5950 border-radius: 0; 5951 5952 @nest .ck-rounded-corners &, 5953 &.ck-rounded-corners { 5954 border-radius: var(--ck-border-radius); 5955 @mixin-content; 5956 } 5957} 5958`,`/* 5959 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5960 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5961 */ 5962 5963/** 5964 * A helper to combine multiple shadows. 5965 */ 5966@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 { 5967 box-shadow: $shadowA, $shadowB; 5968} 5969 5970/** 5971 * Gives an element a drop shadow so it looks like a floating panel. 5972 */ 5973@define-mixin ck-drop-shadow { 5974 @mixin ck-box-shadow var(--ck-drop-shadow); 5975} 5976`],sourceRoot:""}]);const C=w},3710:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-pane
vendor: 6,450 bytes, line 5976
5976l)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}',"",{version:3,sources:["webpack://./
5976../ckeditor5-ui/theme/components/panel/balloonpanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonpanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MAEC,8DACD,CAEA,qBACC,YAAa,CACb,iBAAkB,CAElB,yBAyCD,CAtCE,+GAEC,UAAW,CACX,iBACD,CAEA,wDACC,6CACD,CAEA,uDACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAGD,8CACC,aACD,CC9CD,MACC,6BAA8B,CAC9B,6BAA8B,CAC9B,8BAA+B,CAC/B,iCAAkC,CAClC,oEACD,CAEA,qBCLC,eDmMD,CA9LA,iFCDE,qCD+LF,CA9LA,qBAMC,2CAA4C,CAC5C,wEAAyE,CEdzE,oCAA8B,CFW9B,eA0LD,CApLE,+GAIC,kBAAmB,CADnB,QAAS,CADT,OAGD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,kDACD,CAEA,2CACC,iFAAkF,CAClF,gFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,iEAAkE,CAClE,uDAAwD,CACxD,qDACD,CAEA,2CACC,iFAAkF,CAClF,mFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,oDACD,CAEA,2CACC,iFAAkF,CAClF,kFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,mDACD,CAEA,2CACC,iFAAkF,CAClF,iFACD,CAIA,yGAEC,QAAS,CACT,uDAA0D,CAC1D,2CACD,CAIA,2GAEC,+CAAkD,CAClD,2CACD,CAIA,2GAEC,gDAAmD,CACnD,2CACD,CAIA,yGAIC,8CAAiD,CAFjD,QAAS,CACT,uDAED,CAIA,2GAGC,8CAAiD,CADjD,+CAED,CAIA,2GAGC,8CAAiD,CADjD,gDAED,CAIA,6GAIC,8CAAiD,CADjD,uDAA0D,CAD1D,SAGD,CAIA,6GAIC,8CAAiD,CAFjD,QAAS,CACT,sDAED,CAIA,6GAGC,uDAA0D,CAD1D,SAAU,CAEV,2CACD,CAIA,6GAEC,QAAS,CACT,sDAAyD,CACzD,2CACD,CAIA,yGAGC,sDAAyD,CADzD,6CAAgD,CAEhD,OACD,CAIA,yGAEC,4CAA+C,CAC/C,sDAAyD,CACzD,OACD",sourcesContent:[`/* 5977 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 5978 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 5979 */ 5980 5981:root { 5982 /* Make sure the balloon arrow does not float over its children. */ 5983 --ck-balloon-panel-arrow-z-index: calc(var(--ck-z-default) - 3); 5984} 5985 5986.ck.ck-balloon-panel { 5987 display: none; 5988 position: absolute; 5989 5990 z-index: var(--ck-z-panel); 5991 5992 &.ck-balloon-panel_with-arrow { 5993 &::before, 5994 &::after { 5995 content: ""; 5996 position: absolute; 5997 } 5998 5999 &::before { 6000 z-index: var(--ck-balloon-panel-arrow-z-index); 6001 } 6002 6003 &::after { 6004 z-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1); 6005 } 6006 } 6007 6008 &[class*="arrow_n"] { 6009 &::before { 6010 z-index: var(--ck-balloon-panel-arrow-z-index); 6011 } 6012 6013 &::after { 6014 z-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1); 6015 } 6016 } 6017 6018 &[class*="arrow_s"] { 6019 &::before { 6020 z-index: var(--ck-balloon-panel-arrow-z-index); 6021 } 6022 6023 &::after { 6024 z-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1); 6025 } 6026 } 6027 6028 &.ck-balloon-panel_visible { 6029 display: block; 6030 } 6031} 6032`,`/* 6033 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6034 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6035 */ 6036 6037@import "../../../mixins/_rounded.css"; 6038@import "../../../mixins/_shadow.css"; 6039 6040:root { 6041 --ck-balloon-border-width: 1px; 6042 --ck-balloon-arrow-offset: 2px; 6043 --ck-balloon-arrow-height: 10px; 6044 --ck-balloon-arrow-half-width: 8px; 6045 --ck-balloon-arrow-drop-shadow: 0 2px 2px var(--ck-color-shadow-drop); 6046} 6047 6048.ck.ck-balloon-panel { 6049 @mixin ck-rounded-corners; 6050 @mixin ck-drop-shadow; 6051 6052 min-height: 15px; 6053 6054 background: var(--ck-color-panel-background); 6055 border: var(--ck-balloon-border-width) solid var(--ck-color-panel-border); 6056 6057 &.ck-balloon-panel_with-arrow { 6058 &::before, 6059 &::after { 6060 width: 0; 6061 height: 0; 6062 border-style: solid; 6063 } 6064 } 6065 6066 &[class*="arrow_n"] { 6067 &::before, 6068 &::after { 6069 border-width: 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width); 6070 } 6071 6072 &::before { 6073 border-color: transparent transparent var(--ck-color-panel-border) transparent; 6074 margin-top: calc( -1 * var(--ck-balloon-border-width) ); 6075 } 6076 6077 &::after { 6078 border-color: transparent transparent var(--ck-color-panel-background) transparent; 6079 margin-top: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) ); 6080 } 6081 } 6082 6083 &[class*="arrow_s"] { 6084 &::before, 6085 &::after { 6086 border-width: var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width); 6087 } 6088 6089 &::before { 6090 border-color: var(--ck-color-panel-border) transparent transparent; 6091 filter: drop-shadow(var(--ck-balloon-arrow-drop-shadow)); 6092 margin-bottom: calc( -1 * var(--ck-balloon-border-width) ); 6093 } 6094 6095 &::after { 6096 border-color: var(--ck-color-panel-background) transparent transparent transparent; 6097 margin-bottom: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) ); 6098 } 6099 } 6100 6101 &[class*="arrow_e"] { 6102 &::before, 6103 &::after { 6104 border-width: var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height); 6105 } 6106 6107 &::before { 6108 border-color: transparent transparent transparent var(--ck-color-panel-border); 6109 margin-right: calc( -1 * var(--ck-balloon-border-width) ); 6110 } 6111 6112 &::after { 6113 border-color: transparent transparent transparent var(--ck-color-panel-background); 6114 margin-right: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) ); 6115 } 6116 } 6117 6118 &[class*="arrow_w"] { 6119 &::before, 6120 &::after { 6121 border-width: var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0; 6122 } 6123 6124 &::before { 6125 border-color: transparent var(--ck-color-panel-border) transparent transparent; 6126 margin-left: calc( -1 * var(--ck-balloon-border-width) ); 6127 } 6128 6129 &::after { 6130 border-color: transparent var(--ck-color-panel-background) transparent transparent; 6131 margin-left: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) ); 6132 } 6133 } 6134
6135 &.ck-balloon-panel_arrow_n { 6136 &::before, 6137 &::after { 6138 left: 50%; 6139 margin-left: calc(-1 * var(--ck-balloon-arrow-half-width)); 6140 top: calc(-1 * var(--ck-balloon-arrow-height)); 6141 } 6142 } 6143 6144 &.ck-balloon-panel_arrow_nw { 6145 &::before, 6146 &::after { 6147 left: calc(2 * var(--ck-balloon-arrow-half-width)); 6148 top: calc(-1 * var(--ck-balloon-arrow-height)); 6149 } 6150 } 6151 6152 &.ck-balloon-panel_arrow_ne { 6153 &::before, 6154 &::after { 6155 right: calc(2 * var(--ck-balloon-arrow-half-width)); 6156 top: calc(-1 * var(--ck-balloon-arrow-height)); 6157 } 6158 } 6159 6160 &.ck-balloon-panel_arrow_s { 6161 &::before, 6162 &::after { 6163 left: 50%; 6164 margin-left: calc(-1 * var(--ck-balloon-arrow-half-width)); 6165 bottom: calc(-1 * var(--ck-balloon-arrow-height)); 6166 } 6167 } 6168 6169 &.ck-balloon-panel_arrow_sw { 6170 &::before, 6171 &::after { 6172 left: calc(2 * var(--ck-balloon-arrow-half-width)); 6173 bottom: calc(-1 * var(--ck-balloon-arrow-height)); 6174 } 6175 } 6176 6177 &.ck-balloon-panel_arrow_se { 6178 &::before, 6179 &::after { 6180 right: calc(2 * var(--ck-balloon-arrow-half-width)); 6181 bottom: calc(-1 * var(--ck-balloon-arrow-height)); 6182 } 6183 } 6184 6185 &.ck-balloon-panel_arrow_sme { 6186 &::before, 6187 &::after { 6188 right: 25%; 6189 margin-right: calc(2 * var(--ck-balloon-arrow-half-width)); 6190 bottom: calc(-1 * var(--ck-balloon-arrow-height)); 6191 } 6192 } 6193 6194 &.ck-balloon-panel_arrow_smw { 6195 &::before, 6196 &::after { 6197 left: 25%; 6198 margin-left: calc(2 * var(--ck-balloon-arrow-half-width)); 6199 bottom: calc(-1 * var(--ck-balloon-arrow-height)); 6200 } 6201 } 6202
6203 &.ck-balloon-panel_arrow_nme { 6204 &::before, 6205 &::after { 6206 right: 25%; 6207 margin-right: calc(2 * var(--ck-balloon-arrow-half-width)); 6208 top: calc(-1 * var(--ck-balloon-arrow-height)); 6209 } 6210 } 6211 6212 &.ck-balloon-panel_arrow_nmw { 6213 &::before, 6214 &::after { 6215 left: 25%; 6216 margin-left: calc(2 * var(--ck-balloon-arrow-half-width)); 6217 top: calc(-1 * var(--ck-balloon-arrow-height)); 6218 } 6219 } 6220 6221 &.ck-balloon-panel_arrow_e { 6222 &::before, 6223 &::after { 6224 right: calc(-1 * var(--ck-balloon-arrow-height)); 6225 margin-top: calc(-1 * var(--ck-balloon-arrow-half-width)); 6226 top: 50%; 6227 } 6228 } 6229 6230 &.ck-balloon-panel_arrow_w { 6231 &::before, 6232 &::after { 6233 left: calc(-1 * var(--ck-balloon-arrow-height)); 6234 margin-top: calc(-1 * var(--ck-balloon-arrow-half-width)); 6235 top: 50%; 6236 } 6237 } 6238} 6239`,`/* 6240 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6241 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6242 */ 6243 6244/** 6245 * Implements rounded corner interface for .ck-rounded-corners class. 6246 * 6247 * @see $ck-border-radius 6248 */ 6249@define-mixin ck-rounded-corners { 6250 border-radius: 0; 6251 6252 @nest .ck-rounded-corners &, 6253 &.ck-rounded-corners { 6254 border-radius: var(--ck-border-radius); 6255 @mixin-content; 6256 } 6257} 6258`,`/* 6259 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6260 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6261 */ 6262 6263/** 6264 * A helper to combine multiple shadows. 6265 */ 6266@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 { 6267 box-shadow: $shadowA, $shadowB; 6268} 6269 6270/** 6271 * Gives an element a drop shadow so it looks like a floating panel. 6272 */ 6273@define-mixin ck-drop-shadow { 6274 @mixin ck-box-shadow var(--ck-drop-shadow); 6275} 6276`],sourceRoot:""}]);const C=w},991:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/balloonrotator.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonrotator.css"],names:[],mappings:"AAKA,oCAEC,kBAAmB,CADnB,YAAa,CAEb,sBACD,CAKA,6CACC,sBACD,CCXA,oCACC,6CAA8C,CAC9C,sDAAuD,CACvD,iCAgBD,CAbC,sCAGC,qCAAsC,CAFtC,oCAAqC,CACrC,kCAED,CAGA,iEAIC,mCAAoC,CAHpC,uCAID,CAMA,2DACC,eACD",sourcesContent:[`/* 6277 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6278 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6279 */ 6280 6281.ck .ck-balloon-rotator__navigation { 6282 display: flex; 6283 align-items: center; 6284 justify-content: center; 6285} 6286 6287/* Buttons inside a toolbar should be centered when rotator bar is wider. 6288 * See: https://github.com/ckeditor/ckeditor5-ui/issues/495 6289 */ 6290.ck .ck-balloon-rotator__content .ck-toolbar { 6291 justify-content: center; 6292} 6293`,`/* 6294 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6295 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6296 */ 6297 6298.ck .ck-balloon-rotator__navigation { 6299 background: var(--ck-color-toolbar-background); 6300 border-bottom: 1px solid var(--ck-color-toolbar-border); 6301 padding: 0 var(--ck-spacing-small); 6302 6303 /* Let's keep similar appearance to \`ck-toolbar\`. */ 6304 & > * { 6305 margin-right: var(--ck-spacing-small); 6306 margin-top: var(--ck-spacing-small); 6307 margin-bottom: var(--ck-spacing-small); 6308 } 6309 6310 /* Gives counter more breath than buttons. */ 6311 & .ck-balloon-rotator__counter { 6312 margin-right: var(--ck-spacing-standard); 6313 6314 /* We need to use smaller margin because of previous button's right margin. */ 6315 margin-left: var(--ck-spacing-small); 6316 } 6317} 6318 6319.ck .ck-balloon-rotator__content { 6320 6321 /* Disable default annotation shadow inside rotator with fake panels. */ 6322 & .ck.ck-annotation-wrapper { 6323 box-shadow: none; 6324 } 6325} 6326`],sourceRoot:""}]);const C=w},5380:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-panel) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}
6326:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/fakepanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/fakepanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,mBACC,iBAAkB,CAGlB,mCACD,CAEA,uBACC,iBACD,CAEA,mCACC,SACD,CAEA,oCACC,SACD,CCfA,MACC,6CAA8C,CAC9C,2CACD,CAGA,uBAKC,2CAA4C,CAC5C,6CAA8C,CAC9C,qCAAsC,CCXtC,oCAA8B,CDc9B,WAAY,CAPZ,eAAgB,CAMhB,UAED,CAEA,mCACC,0DAA2D,CAC3D,uDACD,CAEA,oCACC,kEAAqE,CACrE,+DACD,CACA,oCACC,kEAAqE,CACrE,+DACD,CAGA,yIAGC,4CACD",sourcesContent:[`/* 6327 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6328 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6329 */ 6330 6331.ck .ck-fake-panel { 6332 position: absolute; 6333 6334 /* Fake panels should be placed under main balloon content. */ 6335 z-index: calc(var(--ck-z-panel) - 1); 6336} 6337 6338.ck .ck-fake-panel div { 6339 position: absolute; 6340} 6341 6342.ck .ck-fake-panel div:nth-child( 1 ) { 6343 z-index: 2; 6344} 6345 6346.ck .ck-fake-panel div:nth-child( 2 ) { 6347 z-index: 1; 6348} 6349`,`/* 6350 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6351 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6352 */ 6353 6354@import "../../../mixins/_shadow.css"; 6355 6356:root { 6357 --ck-balloon-fake-panel-offset-horizontal: 6px; 6358 --ck-balloon-fake-panel-offset-vertical: 6px; 6359} 6360 6361/* Let's use \`.ck-balloon-panel\` appearance. See: balloonpanel.css. */ 6362.ck .ck-fake-panel div { 6363 @mixin ck-drop-shadow; 6364 6365 min-height: 15px; 6366 6367 background: var(--ck-color-panel-background); 6368 border: 1px solid var(--ck-color-panel-border); 6369 border-radius: var(--ck-border-radius); 6370 6371 width: 100%; 6372 height: 100%; 6373} 6374 6375.ck .ck-fake-panel div:nth-child( 1 ) { 6376 margin-left: var(--ck-balloon-fake-panel-offset-horizontal); 6377 margin-top: var(--ck-balloon-fake-panel-offset-vertical); 6378} 6379 6380.ck .ck-fake-panel div:nth-child( 2 ) { 6381 margin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 2); 6382 margin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 2); 6383} 6384.ck .ck-fake-panel div:nth-child( 3 ) { 6385 margin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 3); 6386 margin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 3); 6387} 6388 6389/* If balloon is positioned above element, we need to move fake panel to the top. */ 6390.ck .ck-balloon-panel_arrow_s + .ck-fake-panel, 6391.ck .ck-balloon-panel_arrow_se + .ck-fake-panel, 6392.ck .ck-balloon-panel_arrow_sw + .ck-fake-panel { 6393 --ck-balloon-fake-panel-offset-vertical: -6px; 6394} 6395`,`/* 6396 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6397 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6398 */ 6399 6400/** 6401 * A helper to combine multiple shadows. 6402 */ 6403@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 { 6404 box-shadow: $shadowA, $shadowB; 6405} 6406 6407/** 6408 * Gives an element a drop shadow so it looks like a floating panel. 6409 */ 6410@define-mixin ck-drop-shadow { 6411 @mixin ck-box-shadow var(--ck-drop-shadow); 6412} 6413`],sourceRoot:""}]);const C=w},8298:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-panel)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/panel/stickypanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/stickypanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAMC,qDAEC,cAAe,CACf,KAAM,CAFN,yBAGD,CAEA,kEAEC,iBAAkB,CADlB,QAED,CCPA,qDAIC,wBAAyB,CACzB,yBAA0B,CAF1B,sBAAuB,CCFxB,oCDKA",sourcesContent:[`/* 6414 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6415 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6416 */ 6417
6418.ck.ck-sticky-panel { 6419 & .ck-sticky-panel__content_sticky { 6420 z-index: var(--ck-z-panel); /* #315 */ 6421 position: fixed; 6422 top: 0; 6423 } 6424 6425 & .ck-sticky-panel__content_sticky_bottom-limit { 6426 top: auto; 6427 position: absolute; 6428 } 6429} 6430`,`/* 6431 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6432 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6433 */ 6434 6435@import "../../../mixins/_shadow.css"; 6436 6437.ck.ck-sticky-panel { 6438 & .ck-sticky-panel__content_sticky { 6439 @mixin ck-drop-shadow; 6440 6441 border-width: 0 1px 1px; 6442 border-top-left-radius: 0; 6443 border-top-right-radius: 0; 6444 } 6445} 6446`,`/* 6447 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6448 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6449 */ 6450 6451/** 6452 * A helper to combine multiple shadows. 6453 */ 6454@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 { 6455 box-shadow: $shadowA, $shadowB; 6456} 6457 6458/** 6459 * Gives an element a drop shadow so it looks like a floating panel. 6460 */ 6461@define-mixin ck-drop-shadow { 6462 @mixin ck-box-shadow var(--ck-drop-shadow); 6463} 6464`],sourceRoot:""}]);const C=w},2722:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,'.ck-vertical-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck-vertical-form .ck-button:focus:after{display:none}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck.ck-responsive-form .ck-button:focus:after{display:none}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-number,.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border-radius:0;margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}.ck.ck-responsive-form>.ck-button:last-child:not(:focus),.ck.ck-responsive-form>.ck-button:nth-last-child(2):not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',"",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/responsive-form/responsiveform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/responsive-form/responsiveform.css"],names:[],mappings:"AAQC,mCAMC,WAAY,CALZ,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,QAAS,CAHT,OAAQ,CAKR,SACD,CAEA,yCACC,YACD,CCdA,oCDoBE,wCAMC,WAAY,CALZ,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,QAAS,CAHT,OAAQ,CAKR,SACD,CAEA,8CACC,YACD,CC9BF,CCAD,qDACC,kDACD,CAEA,uBACC,+BAoED,CAlEC,6BAEC,YACD,CASC,uGACC,sCACD,CDvBD,oCCMD,uBAqBE,SAAU,CACV,oCA+CF,CA7CE,8CACC,wDAYD,CAVC,4HAEC,WAAY,CACZ,UACD,CAGA,4EACC,kBACD,CAKA,0DACC,kDACD,CAGD,iGAIC,eAAgB,CADhB,kCAAmC,CADnC,kCAmBD,CAfC,yHACC,gDACD,CARD,0OAeE,aAMF,CAJE,+IACC,kDACD,CDrEH",sourcesContent:[`/* 6465 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6466 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6467 */ 6468 6469@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"; 6470 6471.ck-vertical-form .ck-button { 6472 &::after { 6473 content: ""; 6474 width: 0; 6475 position: absolute; 6476 right: -1px; 6477 top: -1px; 6478 bottom: -1px; 6479 z-index: 1; 6480 } 6481 6482 &:focus::after { 6483 display: none; 6484 } 6485} 6486 6487.ck.ck-responsive-form { 6488 @mixin ck-media-phone { 6489 & .ck-button { 6490 &::after { 6491 content: ""; 6492 width: 0; 6493 position: absolute; 6494 right: -1px; 6495 top: -1px; 6496 bottom: -1px; 6497 z-index: 1; 6498 } 6499 6500 &:focus::after { 6501 display: none; 6502 } 6503 } 6504 } 6505} 6506`,`/* 6507 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6508 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6509 */ 6510 6511@define-mixin ck-media-phone { 6512 @media screen and (max-width: 600px) { 6513 @mixin-content; 6514 } 6515} 6516`,`/* 6517 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6518 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6519 */ 6520 6521@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"; 6522@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 6523 6524.ck-vertical-form > .ck-button:nth-last-child(2)::after { 6525 border-right: 1px solid var(--ck-color-base-border); 6526} 6527
6528.ck.ck-responsive-form { 6529 padding: var(--ck-spacing-large); 6530 6531 &:focus { 6532 /* See: https://github.com/ckeditor/ckeditor5/issues/4773 */ 6533 outline: none; 6534 } 6535 6536 @mixin ck-dir ltr { 6537 & > :not(:first-child) { 6538 margin-left: var(--ck-spacing-standard); 6539 } 6540 } 6541 6542 @mixin ck-dir rtl { 6543 & > :not(:last-child) { 6544 margin-left: var(--ck-spacing-standard); 6545 } 6546 } 6547 6548 @mixin ck-media-phone { 6549 padding: 0; 6550 width: calc(.8 * var(--ck-input-width)); 6551 6552 & .ck-labeled-field-view { 6553 margin: var(--ck-spacing-large) var(--ck-spacing-large) 0; 6554 6555 & .ck-input-text, 6556 & .ck-input-number { 6557 min-width: 0; 6558 width: 100%; 6559 } 6560 6561 /* Let the long error messages wrap in the narrow form. */ 6562 & .ck-labeled-field-view__error { 6563 white-space: normal; 6564 } 6565 } 6566 6567 /* Styles for two last buttons in the form (save&cancel, edit&unlink, etc.). */ 6568 & > .ck-button:nth-last-child(2) { 6569 &::after { 6570 border-right: 1px solid var(--ck-color-base-border); 6571 } 6572 } 6573 6574 & > .ck-button:nth-last-child(1), 6575 & > .ck-button:nth-last-child(2) { 6576 padding: var(--ck-spacing-standard); 6577 margin-top: var(--ck-spacing-large); 6578 border-radius: 0; 6579 6580 &:not(:focus) { 6581 border-top: 1px solid var(--ck-color-base-border); 6582 } 6583 6584 @mixin ck-dir ltr { 6585 margin-left: 0; 6586 } 6587 6588 @mixin ck-dir rtl { 6589 margin-left: 0; 6590 6591 &:last-of-type { 6592 border-right: 1px solid var(--ck-color-base-border); 6593 } 6594 } 6595 } 6596 } 6597} 6598`],sourceRoot:""}]);const C=w},8107:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{position:absolute;top:50%;transform:translateY(-50%)}[dir=ltr] .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{left:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{right:var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view .ck-search__reset{position:absolute;top:50%;transform:translateY(-50%)}.ck.ck-search>.ck-search__results>.ck-search__info>span:first-child{display:block}.ck.ck-search>.ck-search__results>.ck-search__info:not(.ck-hidden)~*{display:none}:root{--ck-search-field-view-horizontal-spacing:calc(var(--ck-icon-size) + var(--ck-spacing-medium))}.ck.ck-search>.ck-labeled-field-view .ck-input{width:100%}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon{--ck-labeled-field-label-default-position-x:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon>.ck-labeled-field-view__input-wrapper>.ck-icon{opacity:.5;pointer-events:none}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input{width:100%}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input,[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input:not(.ck-input-text_empty){padding-left:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset{--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset.ck-labeled-field-view_empty{--ck-labeled-field-empty-unfocused-max-width:100% - var(--ck-search-field-view-horizontal-spacing) - var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{background:none;min-height:auto;min-width:auto;opacity:.5;padding:0}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{left:var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset:hover{opacity:1}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input{width:100%}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input:not(.ck-input-text_empty),[dir=rtl] .ck.ck-search>
6598.ck-labeled-field-view.ck-search__query_with-reset .ck-input{padding-right:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-search__results{min-width:100%}.ck.ck-search>.ck-search__results>.ck-search__info{padding:var(--ck-spacing-medium) var(--ck-spacing-large);width:100%}.ck.ck-search>.ck-search__results>.ck-search__info *{white-space:normal}.ck.ck-search>.ck-search__results>.ck-search__info>span:first-child{font-weight:700}.ck.ck-search>.ck-search__results>.ck-search__info>span:last-child{margin-top:var(--ck-spacing-medium)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/search/search.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/search/search.css"],names:[],mappings:"AASE,oFACC,iBAAkB,CAClB,OAAQ,CACR,0BASD,CAZA,8FAME,6BAMF,CAZA,8FAUE,8BAEF,CAEA,uDACC,iBAAkB,CAClB,OAAQ,CACR,0BACD,CAKC,oEACC,aACD,CAGA,qEACC,YACD,CChCH,MACC,8FACD,CAIE,+CACC,UACD,CAEA,gEACC,0FAoBD,CAlBC,+GACC,UAAW,CACX,mBACD,CAEA,0EACC,UAWD,CAJE,kMACC,2DACD,CAKH,iEACC,sGAwCD,CAtCC,6FACC,6HACD,CAEA,mFAIC,eAAgB,CAFhB,eAAgB,CADhB,cAAe,CAIf,UAAW,CACX,SAaD,CAnBA,6FASE,8BAUF,CAnBA,6FAaE,6BAMF,CAHC,yFACC,SACD,CAGD,2EACC,UAWD,CAZA,oMAUE,4DAEF,CAIF,kCACC,cAkBD,CAhBC,mDAEC,wDAAyD,CADzD,UAcD,CAXC,qDACC,kBACD,CAEA,oEACC,eACD,CAEA,mEACC,mCACD",sourcesContent:[`/* 6599 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6600 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6601 */ 6602 6603@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 6604 6605.ck.ck-search { 6606 & > .ck-labeled-field-view { 6607 & > .ck-labeled-field-view__input-wrapper > .ck-icon { 6608 position: absolute; 6609 top: 50%; 6610 transform: translateY(-50%); 6611 6612 @mixin ck-dir ltr { 6613 left: var(--ck-spacing-medium); 6614 } 6615 6616 @mixin ck-dir rtl { 6617 right: var(--ck-spacing-medium); 6618 } 6619 } 6620 6621 & .ck-search__reset { 6622 position: absolute; 6623 top: 50%; 6624 transform: translateY(-50%); 6625 } 6626 } 6627 6628 & > .ck-search__results { 6629 & > .ck-search__info { 6630 & > span:first-child { 6631 display: block; 6632 } 6633 6634 /* Hide the filtered view when nothing was found */ 6635 &:not(.ck-hidden) ~ * { 6636 display: none; 6637 } 6638 } 6639 } 6640} 6641`,`/* 6642 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6643 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6644 */ 6645 6646@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 6647 6648:root { 6649 --ck-search-field-view-horizontal-spacing: calc(var(--ck-icon-size) + var(--ck-spacing-medium)); 6650} 6651 6652.ck.ck-search { 6653 & > .ck-labeled-field-view { 6654 & .ck-input { 6655 width: 100%; 6656 } 6657 6658 &.ck-search__query_with-icon { 6659 --ck-labeled-field-label-default-position-x: var(--ck-search-field-view-horizontal-spacing); 6660 6661 & > .ck-labeled-field-view__input-wrapper > .ck-icon { 6662 opacity: .5; 6663 pointer-events: none; 6664 } 6665 6666 & .ck-input { 6667 width: 100%; 6668 6669 @mixin ck-dir ltr { 6670 padding-left: var(--ck-search-field-view-horizontal-spacing); 6671 } 6672 6673 @mixin ck-dir rtl { 6674 &:not(.ck-input-text_empty) { 6675 padding-left: var(--ck-search-field-view-horizontal-spacing); 6676 } 6677 } 6678 } 6679 } 6680 6681 &.ck-search__query_with-reset { 6682 --ck-labeled-field-empty-unfocused-max-width: 100% - 2 * var(--ck-search-field-view-horizontal-spacing); 6683 6684 &.ck-labeled-field-view_empty { 6685 --ck-labeled-field-empty-unfocused-max-width: 100% - var(--ck-search-field-view-horizontal-spacing) - var(--ck-spacing-medium); 6686 } 6687 6688 & .ck-search__reset { 6689 min-width: auto; 6690 min-height: auto; 6691 6692 background: none; 6693 opacity: .5; 6694 padding: 0; 6695 6696 @mixin ck-dir ltr { 6697 right: var(--ck-spacing-medium); 6698 } 6699 6700 @mixin ck-dir rtl { 6701 left: var(--ck-spacing-medium); 6702 } 6703 6704 &:hover { 6705 opacity: 1; 6706 } 6707 } 6708 6709 & .ck-input { 6710 width: 100%; 6711 6712 @mixin ck-dir ltr { 6713 &:not(.ck-input-text_empty) { 6714 padding-right: var(--ck-search-field-view-horizontal-spacing); 6715 } 6716 } 6717 6718 @mixin ck-dir rtl { 6719 padding-right: var(--ck-search-field-view-horizontal-spacing); 6720 } 6721 } 6722 } 6723 } 6724 6725 & > .ck-search__results { 6726 min-width: 100%; 6727 6728 & > .ck-search__info { 6729 width: 100%; 6730 padding: var(--ck-spacing-medium) var(--ck-spacing-large); 6731 6732 & * { 6733 white-space: normal; 6734 } 6735 6736 & > span:first-child { 6737 font-weight: bold; 6738 } 6739 6740 & > span:last-child { 6741 margin-top: var(--ck-spacing-medium); 6742 } 6743 } 6744 } 6745} 6746 6747`],sourceRoot:""}]);const C=w},109:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-spinner-container{display:block;position:relative}.ck.ck-spinner{left:0;margin:0 auto;position:absolute;right:0;top:50%;transform:translateY(-50%);z-index:1}:root{--ck-toolbar-spinner-size:18px}.ck.ck-spinner-container{animation:rotate 1.5s linear infinite;height:var(--ck-toolbar-spinner-size);width:var(--ck-toolbar-spinner-size)}@media (prefers-reduced-motion:reduce){.ck.ck-spinner-container{animation-duration:3s}}.ck.ck-spinner{border:2px solid var(--ck-color-text);border-radius:50%;border-top:2px solid transparent;height:var(--ck-toolbar-spinner-size);width:var(--ck-toolbar-spinner-size)}@keyframes rotate{to{transform:rotate(1turn)}}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/spinner/spinner.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/spinner/spinner.css"],names:[],mappings:"AASA,yBACC,aAAc,CACd,iBACD,CAEA,eAGC,MAAO,CAEP,aAAc,CAJd,iBAAkB,CAGlB,OAAQ,CAFR,OAAQ,CAIR,0BAA2B,CAC3B,SACD,
6747CCjBA,MACC,8BACD,CAEA,yBAGC,qCAAsC,CADtC,qCAAsC,CADtC,oCAOD,CAHC,uCALD,yBAME,qBAEF,CADC,CAGD,eAKC,qCAA6B,CAF7B,iBAAkB,CAElB,gCAA6B,CAH7B,qCAAsC,CADtC,oCAKD,CAEA,kBACC,GACC,uBACD,CACD",sourcesContent:[`/* 6748 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6749 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6750 */ 6751 6752:root { 6753 --ck-toolbar-spinner-size: 18px; 6754} 6755 6756.ck.ck-spinner-container { 6757 display: block; 6758 position: relative; 6759} 6760 6761.ck.ck-spinner { 6762 position: absolute; 6763 top: 50%; 6764 left: 0; 6765 right: 0; 6766 margin: 0 auto; 6767 transform: translateY(-50%); 6768 z-index: 1; 6769} 6770`,`/* 6771 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6772 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6773 */ 6774 6775:root { 6776 --ck-toolbar-spinner-size: 18px; 6777} 6778 6779.ck.ck-spinner-container { 6780 width: var(--ck-toolbar-spinner-size); 6781 height: var(--ck-toolbar-spinner-size); 6782 animation: 1.5s infinite rotate linear; 6783 6784 @media (prefers-reduced-motion: reduce) { 6785 animation-duration: 3s; 6786 } 6787} 6788 6789.ck.ck-spinner { 6790 width: var(--ck-toolbar-spinner-size); 6791 height: var(--ck-toolbar-spinner-size); 6792 border-radius: 50%; 6793 border: 2px solid var(--ck-color-text); 6794 border-top-color: transparent; 6795} 6796 6797@keyframes rotate { 6798 to { 6799 transform: rotate(360deg) 6800 } 6801} 6802`],sourceRoot:""}]);const C=w},1671:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck-textarea{overflow-x:hidden}","",{version:3,sources:["webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/textarea/textarea.css"],names:[],mappings:"AASA,aACC,iBACD",sourcesContent:[`/* 6803 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6804 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6805 */ 6806 6807/* 6808 * This fixes a problem in Firefox when the initial height of the complement does not match the number of rows. 6809 * This bug is especially visible when rows=1. 6810 */ 6811.ck-textarea { 6812 overflow-x: hidden 6813} 6814`],sourceRoot:""}]);const C=w},2710:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/toolbar/blocktoolbar.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/blocktoolbar.css"],names:[],mappings:"AAKA,4BACC,iBAAkB,CAClB,2BACD,CCHA,MACC,oDAAqD,CACrD,yDACD,CAEA,4BACC,0CAA2C,CAC3C,sCACD",sourcesContent:[`/* 6815 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6816 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6817 */ 6818 6819.ck.ck-block-toolbar-button { 6820 position: absolute; 6821 z-index: var(--ck-z-default); 6822} 6823`,`/* 6824 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6825 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6826 */ 6827 6828:root { 6829 --ck-color-block-toolbar-button: var(--ck-color-text); 6830 --ck-block-toolbar-button-size: var(--ck-font-size-normal); 6831} 6832
6833.ck.ck-block-toolbar-button { 6834 color: var(--ck-color-block-toolbar-button); 6835 font-size: var(--ck-block-toolbar-size); 6836} 6837`],sourceRoot:""}]);const C=w},9677:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;background:var(--ck-color-toolbar-border);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-dropdown__panel{min-width:auto}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-button>.ck-button__label{max-width:7em;width:auto}.ck.ck-toolbar:focus{outline:none}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/toolbar/toolbar.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/toolbar.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,eAKC,kBAAmB,CAFnB,YAAa,CACb,oBAAqB,CCFrB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD6CD,CA3CC,kCAGC,kBAAmB,CAFnB,YAAa,CACb,kBAAmB,CAEnB,WAED,CAEA,yCACC,oBAWD,CAJC,yGAEC,YACD,CAGD,uCACC,eACD,CAEA,sDACC,gBACD,CAEA,sDACC,qBAC
6837D,CAEA,sDACC,gBACD,CAGC,yFACC,YACD,CE/CF,eCGC,eDwGD,CA3GA,qECOE,qCDoGF,CA3GA,eAGC,6CAA8C,CAE9C,+CAAgD,CADhD,iCAuGD,CApGC,yCACC,kBAAmB,CAGnB,yCAA0C,CAO1C,qCAAsC,CADtC,kCAAmC,CAPnC,aAAc,CADd,SAUD,CAEA,uCACC,QACD,CAGC,gEAEC,oCACD,CAIA,kEACC,YACD,CAGD,gHAIC,qCAAsC,CADtC,kCAED,CAEA,mCAEC,SAaD,CAVC,0DAQC,eAAgB,CAHhB,QAAS,CAHT,UAOD,CAGD,kCAEC,SAWD,CATC,uDAEC,QAMD,CAHC,yFACC,eACD,CASD,kFACC,mCACD,CAMA,wEACC,cACD,CAEA,iFACC,aAAc,CACd,UACD,CAGD,qBACC,YACD,CAtGD,qCAyGE,QAEF,CAYC,+FACC,cACD,CAEA,iJAEC,mCACD,CAEA,qHACC,aACD,CAIC,6JAEC,2BAA4B,CAD5B,wBAED,CAGA,2JAEC,4BAA6B,CAD7B,yBAED,CASD,8RACC,mCACD,CAWA,qHACC,cACD,CAIC,6JAEC,4BAA6B,CAD7B,yBAED,CAGA,2JAEC,2BAA4B,CAD5B,wBAED,CASD,8RACC,oCACD",sourcesContent:[`/* 6838 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6839 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6840 */ 6841 6842@import "../../mixins/_unselectable.css"; 6843 6844.ck.ck-toolbar { 6845 @mixin ck-unselectable; 6846 6847 display: flex; 6848 flex-flow: row nowrap; 6849 align-items: center; 6850 6851 & > .ck-toolbar__items { 6852 display: flex; 6853 flex-flow: row wrap; 6854 align-items: center; 6855 flex-grow: 1; 6856 6857 } 6858 6859 & .ck.ck-toolbar__separator { 6860 display: inline-block; 6861 6862 /* 6863 * A leading or trailing separator makes no sense (separates from nothing on one side). 6864 * For instance, it can happen when toolbar items (also separators) are getting grouped one by one and 6865 * moved to another toolbar in the dropdown. 6866 */ 6867 &:first-child, 6868 &:last-child { 6869 display: none; 6870 } 6871 } 6872 6873 & .ck-toolbar__line-break { 6874 flex-basis: 100%; 6875 } 6876 6877 &.ck-toolbar_grouping > .ck-toolbar__items { 6878 flex-wrap: nowrap; 6879 } 6880 6881 &.ck-toolbar_vertical > .ck-toolbar__items { 6882 flex-direction: column; 6883 } 6884 6885 &.ck-toolbar_floating > .ck-toolbar__items { 6886 flex-wrap: nowrap; 6887 } 6888 6889 & > .ck.ck-toolbar__grouped-dropdown { 6890 & > .ck-dropdown__button .ck-dropdown__arrow { 6891 display: none; 6892 } 6893 } 6894} 6895`,`/* 6896 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6897 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6898 */ 6899 6900/** 6901 * Makes element unselectable. 6902 */ 6903@define-mixin ck-unselectable { 6904 -moz-user-select: none; 6905 -webkit-user-select: none; 6906 -ms-user-select: none; 6907 user-select: none 6908} 6909`,`/* 6910 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 6911 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 6912 */ 6913 6914@import "../../../mixins/_rounded.css"; 6915@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css"; 6916 6917.ck.ck-toolbar { 6918 @mixin ck-rounded-corners; 6919 6920 background: var(--ck-color-toolbar-background); 6921 padding: 0 var(--ck-spacing-small); 6922 border: 1px solid var(--ck-color-toolbar-border); 6923 6924 & .ck.ck-toolbar__separator { 6925 align-self: stretch; 6926 width: 1px; 6927 min-width: 1px; 6928 background: var(--ck-color-toolbar-border); 6929 6930 /* 6931 * These margins make the separators look better in balloon toolbars (when aligned with the "tip"). 6932 * See https://github.com/ckeditor/ckeditor5/issues/7493. 6933 */ 6934 margin-top: var(--ck-spacing-small); 6935 margin-bottom: var(--ck-spacing-small); 6936 } 6937 6938 & .ck-toolbar__line-break { 6939 height: 0; 6940 } 6941 6942 & > .ck-toolbar__items { 6943 & > *:not(.ck-toolbar__line-break) { 6944 /* (#11) Separate toolbar items. */ 6945 margin-right: var(--ck-spacing-small); 6946 } 6947 6948 /* Don't display a separator after an empty items container, for instance, 6949 when all items were grouped */ 6950 &:empty + .ck.ck-toolbar__separator { 6951 display: none; 6952 } 6953 } 6954 6955 & > .ck-toolbar__items > *:not(.ck-toolbar__line-break), 6956 & > .ck.ck-toolbar__grouped-dropdown { 6957 /* Make sure items wrapped to the next line have v-spacing */ 6958 margin-top: var(--ck-spacing-small); 6959 margin-bottom: var(--ck-spacing-small); 6960 } 6961 6962 &.ck-toolbar_vertical { 6963 /* Items in a vertical toolbar span the entire width. */ 6964 padding: 0; 6965 6966 /* Specificity matters here. See https://github.com/ckeditor/ckeditor5-theme-lark/issues/168. */ 6967 & > .ck-toolbar__items > .ck { 6968 /* Items in a vertical toolbar should span the horizontal space. */ 6969 width: 100%; 6970 6971 /* Items in a vertical toolbar should have no margin. */ 6972 margin: 0; 6973 6974 /* Items in a vertical toolbar span the entire width so rounded corners are pointless. */ 6975 border-radius: 0; 6976 } 6977 } 6978 6979 &.ck-toolbar_compact { 6980 /* No spacing around items. */ 6981 padding: 0; 6982 6983 & > .ck-toolbar__items > * { 6984 /* Compact toolbar items have no spacing between them. */ 6985 margin: 0; 6986 6987 /* "Middle" children should have no rounded corners. */ 6988 &:not(:first-child):not(:last-child) { 6989 border-radius: 0; 6990 } 6991 } 6992 } 6993 6994 & > .ck.ck-toolbar__grouped-dropdown { 6995 /* 6996 * Dropdown button has asymmetric padding to fit the arrow. 6997 * This button has no arrow so let's revert that padding back to normal. 6998 */ 6999 & > .ck.ck-button.ck-dropdown__button { 7000 padding-left: var(--ck-spacing-tiny); 7001 } 7002 } 7003 7004 /* A drop-down containing the nested toolbar with configured items. */ 7005 & .ck-toolbar__nested-toolbar-dropdown { 7006 /* Prevent empty space in the panel when the dropdown label is visible and long but the toolbar has few items. */ 7007 & > .ck-dropdown__panel { 7008 min-width: auto; 7009 } 7010 7011 & > .ck-button > .ck-button__label { 7012 max-width: 7em; 7013 width: auto; 7014 } 7015 } 7016 7017 &:focus { 7018 outline: none; 7019 } 7020 7021 @nest .ck-toolbar-container & { 7022 border: 0; 7023 } 7024} 7025 7026/* stylelint-disable */ 7027 7028/* 7029 * Styles for RTL toolbars. 7030 *
7031 * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir" 7032 * because its parent is not controlled by the editor framework. 7033 */ 7034[dir="rtl"] .ck.ck-toolbar, 7035.ck.ck-toolbar[dir="rtl"] { 7036 & > .ck-toolbar__items > .ck { 7037 margin-right: 0; 7038 } 7039 7040 &:not(.ck-toolbar_compact) > .ck-toolbar__items > .ck { 7041 /* (#11) Separate toolbar items. */ 7042 margin-left: var(--ck-spacing-small); 7043 } 7044 7045 & > .ck-toolbar__items > .ck:last-child { 7046 margin-left: 0; 7047 } 7048 7049 &.ck-toolbar_compact > .ck-toolbar__items > .ck { 7050 /* No rounded corners on the right side of the first child. */ 7051 &:first-child { 7052 border-top-left-radius: 0; 7053 border-bottom-left-radius: 0; 7054 } 7055 7056 /* No rounded corners on the left side of the last child. */ 7057 &:last-child { 7058 border-top-right-radius: 0; 7059 border-bottom-right-radius: 0; 7060 } 7061 } 7062 7063 /* Separate the the separator form the grouping dropdown when some items are grouped. */ 7064 & > .ck.ck-toolbar__separator { 7065 margin-left: var(--ck-spacing-small); 7066 } 7067 7068 /* Some spacing between the items and the separator before the grouped items dropdown. */ 7069 &.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) { 7070 margin-left: var(--ck-spacing-small); 7071 } 7072} 7073 7074/* 7075 * Styles for LTR toolbars. 7076 * 7077 * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir" 7078 * because its parent is not controlled by the editor framework. 7079 */ 7080[dir="ltr"] .ck.ck-toolbar, 7081.ck.ck-toolbar[dir="ltr"] { 7082 & > .ck-toolbar__items > .ck:last-child { 7083 margin-right: 0; 7084 } 7085 7086 &.ck-toolbar_compact > .ck-toolbar__items > .ck { 7087 /* No rounded corners on the right side of the first child. */ 7088 &:first-child { 7089 border-top-right-radius: 0; 7090 border-bottom-right-radius: 0; 7091 } 7092 7093 /* No rounded corners on the left side of the last child. */ 7094 &:last-child { 7095 border-top-left-radius: 0; 7096 border-bottom-left-radius: 0; 7097 } 7098 } 7099 7100 /* Separate the the separator form the grouping dropdown when some items are grouped. */ 7101 & > .ck.ck-toolbar__separator { 7102 margin-right: var(--ck-spacing-small); 7103 } 7104 7105 /* Some spacing between the items and the separator before the grouped items dropdown. */ 7106 &.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) { 7107 margin-right: var(--ck-spacing-small); 7108 } 7109} 7110 7111/* stylelint-enable */ 7112`,`/* 7113 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7114 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7115 */ 7116 7117/** 7118 * Implements rounded corner interface for .ck-rounded-corners class. 7119 * 7120 * @see $ck-border-radius 7121 */ 7122@define-mixin ck-rounded-corners { 7123 border-radius: 0; 7124 7125 @nest .ck-rounded-corners &, 7126 &.ck-rounded-corners { 7127 border-radius: var(--ck-border-radius); 7128 @mixin-content; 7129 } 7130} 7131`],sourceRoot:""}]);const C=w},9205:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck.ck-balloon-panel.ck-tooltip{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;z-index:calc(var(--ck-z-dialog) + 100);--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-tooltip-text-padding:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip.ck-tooltip_multi-line .ck-tooltip__text{display:inline-block;max-width:200px;padding:var(--ck-tooltip-text-padding) 0;white-space:break-spaces}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/tooltip/tooltip.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/tooltip/tooltip.css"],names:[],mappings:"AAOA,gCCEC,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBAAgB,CDFhB,sCAAyC,CEFzC,6BAA8B,CAC9B,6BAA8B,CAC9B,iCAAkC,CAClC,6BAA8B,CAC9B,6BAA8B,CAC9B,8DAA+D,CAE/D,kCFJD,CEMC,kDAGC,kCAAmC,CAFnC,cAAe,CACf,eAED,CAEA,wEAEC,oBAAqB,CAErB,eAAgB,CADhB,wCAAyC,CAFzC,wBAID,CArBD,gCAwBC,eAMD,CAHC,uCACC,YACD",sourcesContent:[`/* 7132 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7133 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7134 */ 7135 7136@import "../../mixins/_unselectable.css"; 7137 7138.ck.ck-balloon-panel.ck-tooltip { 7139 @mixin ck-unselectable; 7140 7141 z-index: calc( var(--ck-z-dialog) + 100 ); 7142} 7143`,`/* 7144 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7145 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7146 */ 7147 7148/** 7149 * Makes element unselectable. 7150 */ 7151@define-mixin ck-unselectable { 7152 -moz-user-select: none; 7153 -webkit-user-select: none; 7154 -ms-user-select: none; 7155 user-select: none 7156} 7157`,`/* 7158 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7159 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7160 */ 7161 7162@import "../../../mixins/_rounded.css"; 7163 7164.ck.ck-balloon-panel.ck-tooltip { 7165 --ck-balloon-border-width: 0px; 7166 --ck-balloon-arrow-offset: 0px; 7167 --ck-balloon-arrow-half-width: 4px; 7168 --ck-balloon-arrow-height: 4px; 7169 --ck-tooltip-text-padding: 4px; 7170 --ck-color-panel-background: var(--ck-color-tooltip-background); 7171 7172 padding: 0 var(--ck-spacing-medium); 7173 7174 & .ck-tooltip__text { 7175 font-size: .9em; 7176 line-height: 1.5; 7177 color: var(--ck-color-tooltip-text); 7178 } 7179 7180 &.ck-tooltip_multi-line .ck-tooltip__text { 7181 white-space: break-spaces; 7182 display: inline-block; 7183 padding: var(--ck-tooltip-text-padding) 0; 7184 max-width: 200px; 7185 } 7186 7187 /* Reset balloon panel styles */ 7188 box-shadow: none; 7189 7190 /* Hide the default shadow of the .ck-balloon-panel tip */ 7191 &::before { 7192 display: none; 7193 } 7194} 7195`],sourceRoot:""}]);const C=w},7676:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck-hidden{display:none!important}:root{--ck-z-default:1;--ck-z-panel:calc(var(--ck-z-default) + 999);--ck-z-dialog:9999}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-powered-by-line-height:10px;--ck-powered-by-padding-vertical:2px;--ck-powered-by-padding-horizontal:4px;--ck-powered-by-text-color:#4f4f4f;--ck-powered-by-border-radius:var(--ck-border-radius);--ck-powered-by-background:#fff;--ck-powered-by-border-color:var(--ck-color-focus-border)}.ck.ck-balloon-panel.ck-powered-by-balloon{--ck-border-radius:var(--ck-powered-by-border-radius);background:var(--ck-powered-by-background);box-shadow:none;min-height:unset;z-index:calc(var(--ck-z-panel) - 1)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by{line-height:var(--ck-powered-by-line-height)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by a{align-items:center;cursor:pointer;display:flex;filter:grayscale(80%);line-height:var(--ck-powered-by-line-height);opacity:.66;padding:var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-powered-by__label{color:var(--ck-powered-by-text-color);cursor:pointer;font-size:7.5px;font-weight:700;letter-spacing:-.2px;line-height:normal;margin-right:4px;padding-left:2px;text-transform:uppercase}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-icon{cursor:pointer;display:block}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by:hover a{filter:grayscale(0);opacity:1}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_inside]{border-color:transparent}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_border]{border:var(--ck-focus-ring);border-color:var(--ck-powered-by-border-color)}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-dialog-background:var(--ck-custom-background);--ck-color-dialog-form-header-border:var(--ck-custom-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-color-highlight-background:#ff0;--ck-color-light-red:#fcc;--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}
7195.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{background:transparent;border:0;box-sizing:border-box;height:auto;margin:0;padding:0;position:static;text-decoration:none;transition:none;vertical-align:middle;width:auto;word-wrap:break-word}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/globals/_hidden.css","webpack://./../ckeditor5-ui/theme/globals/_zindex.css","webpack://./../ckeditor5-ui/theme/globals/_transition.css","webpack://./../ckeditor5-ui/theme/globals/_poweredby.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_colors.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_disabled.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_focus.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_fonts.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_reset.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_spacing.css"],names:[],mappings:"AAQA,WAGC,sBACD,CCPA,MACC,gBAAiB,CACjB,4CAA+C,CAC/C,kBACD,CCDA,oDAEC,yBACD,CCNA,MACC,gCAAiC,CACjC,oCAAqC,CACrC,sCAAuC,CACvC,kCAA2C,CAC3C,qDAAsD,CACtD,+BAA4C,CAC5C,yDACD,CAEA,2CACC,qDAAsD,CAGtD,0CAA2C,CAD3C,eAAgB,CAEhB,gBAAiB,CACjB,mCAiDD,CA/CC,6DACC,4CAoCD,CAlCC,+DAGC,kBAAmB,CAFnB,cAAe,CACf,YAAa,CAGb,qBAAsB,CACtB,4CAA6C,CAF7C,WAAY,CAGZ,qFACD,CAEA,mFASC,qCAAsC,CAFtC,cAAe,CANf,eAAgB,CAIhB,eAAiB,CAHjB,oBAAqB,CAMrB,kBAAmB,CAFnB,gBAAiB,CAHjB,gBAAiB,CACjB,wBAOD,CAEA,sEAEC,cAAe,CADf,aAED,CAGC,qEACC,mBAAqB,CACrB,SACD,CAIF,mEACC,wBACD,CAEA,mEACC,2BAA4B,CAC5B,8CACD,CChED,MACC,kCAAmD,CACnD,+BAAoD,CACpD,8BAAkD,CAClD,8BAAuD,CACvD,6BAAmD,CACnD,yBAA+C,CAC/C,8BAAsD,CACtD,oCAA4D,CAC5D,6BAAkD,CAIlD,mDAA4D,CAC5D,qEAA+E,CAC/E,qCAA4D,CAC5D,qDAA8D,CAC9D,gDAAyD,CACzD,yCAAqD,CACrD,sCAAsD,CACtD,4CAA0D,CAC1D,sCAAsD,CAItD,gDAAuD,CACvD,kDAAiE,CACjE,mDAAkE,CAClE,yDAA8D,CAE9D,uCAA6D,CAC7D,6CAAoE,CACpE,8CAAoE,CACpE,gDAAiE,CACjE,kCAAyD,CAGzD,+DAAsE,CACtE,iDAAsE,CACtE,kDAAsE,CACtE,oDAAoE,CACpE,6DAAsE,CAEtE,8BAAoD,CACpD,gCAAqD,CAErD,+CAA8D,CAC9D,qDAAiE,CACjE,+EAAqF,CACrF,oDAAuE,CACvE,yEAA8E,CAC9E,oDAAgE,CAIhE,oEAA2E,CAC3E,4DAAoE,CAIpE,wDAAiE,CACjE,4DAAmE,CAInE,2DAAoE,CACpE,mDAA6D,CAC7D,wDAAgE,CAChE,+CAA0D,CAC1D,4CAA2D,CAC3D,4DAAoE,CACpE,sCAAsD,CAItD,0DAAmE,CACnE,uFAA6F,CAC7F,oEAA2E,CAC3E,0EAA+E,CAC/E,8DAAsE,CAItE,2DAAoE,CACpE,mDAA6D,CAI7D,6DAAsE,CACtE,qDAA+D,CAI/D,uDAAgE,CAChE,uDAAiE,CAIjE,0CAAyD,CAIzD,wCAA2D,CAI3D,+BAAoD,CACpD,uDAAmE,CACnE,kDAAgE,CAIhE,oCAAyD,
7195CAIzD,yBAAgD,CChHhD,wBAAyB,CCAzB,0CAA2C,CAK3C,gGAAiG,CAKjG,4GAA6G,CAK7G,sGAAuG,CAKvG,sDAAuD,CCvBvD,wBAAyB,CACzB,6BAA8B,CAC9B,wDAA6D,CAE7D,yBAA0B,CAC1B,2BAA4B,CAC5B,yBAA0B,CAC1B,wBAAyB,CACzB,0BAA2B,CCJ3B,kCJgHD,CI1GA,2EAYC,sBAAuB,CADvB,QAAS,CART,qBAAsB,CAEtB,WAAY,CAIZ,QAAS,CACT,SAAU,CAJV,eAAgB,CAOhB,oBAAqB,CAErB,eAAgB,CADhB,qBAAsB,CAVtB,UAAW,CAcX,oBACD,CAKA,8DAGC,wBAAyB,CAEzB,0BAA2B,CAG3B,WAAY,CACZ,UAAW,CALX,iGAAkG,CAElG,eAAgB,CAChB,kBAGD,CAGC,qDACC,gBACD,CAEA,mDAEC,sBACD,CAEA,qDACC,oBACD,CAEA,mLAGC,WACD,CAEA,iNAGC,cACD,CAEA,qDAEC,yBAAoC,CADpC,YAED,CAEA,qEAGC,QAAQ,CADR,SAED,CAMD,8BAEC,gBACD,CCxFA,MACC,sBAAuB,CCAvB,gEAAiE,CAKjE,0DAA2D,CAK3D,wEAAyE,CCbzE,uBAA8B,CAC9B,mDAA2D,CAC3D,4CAAkD,CAClD,oDAA4D,CAC5D,mDAA2D,CAC3D,kDAA2D,CAC3D,yDFFD",sourcesContent:[`/* 7196 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7197 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7198 */ 7199 7200/** 7201 * A class which hides an element in DOM. 7202 */ 7203.ck-hidden { 7204 /* Override selector specificity. Otherwise, all elements with some display 7205 style defined will override this one, which is not a desired result. */ 7206 display: none !important; 7207} 7208`,`/* 7209 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7210 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7211 */ 7212 7213:root { 7214 --ck-z-default: 1; 7215 --ck-z-panel: calc( var(--ck-z-default) + 999 ); 7216 --ck-z-dialog: 9999; 7217} 7218`,`/* 7219 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7220 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7221 */ 7222 7223/** 7224 * A class that disables all transitions of the element and its children. 7225 */ 7226.ck-transitions-disabled, 7227.ck-transitions-disabled * { 7228 transition: none !important; 7229} 7230`,`/* 7231 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7232 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7233 */ 7234 7235:root { 7236 --ck-powered-by-line-height: 10px; 7237 --ck-powered-by-padding-vertical: 2px; 7238 --ck-powered-by-padding-horizontal: 4px; 7239 --ck-powered-by-text-color: hsl(0, 0%, 31%); 7240 --ck-powered-by-border-radius: var(--ck-border-radius); 7241 --ck-powered-by-background: hsl(0, 0%, 100%); 7242 --ck-powered-by-border-color: var(--ck-color-focus-border); 7243} 7244 7245.ck.ck-balloon-panel.ck-powered-by-balloon { 7246 --ck-border-radius: var(--ck-powered-by-border-radius); 7247 7248 box-shadow: none; 7249 background: var(--ck-powered-by-background); 7250 min-height: unset; 7251 z-index: calc( var(--ck-z-panel) - 1 ); 7252 7253 & .ck.ck-powered-by { 7254 line-height: var(--ck-powered-by-line-height); 7255 7256 & a { 7257 cursor: pointer; 7258 display: flex; 7259 align-items: center; 7260 opacity: .66; 7261 filter: grayscale(80%); 7262 line-height: var(--ck-powered-by-line-height); 7263 padding: var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal); 7264 } 7265 7266 & .ck-powered-by__label { 7267 font-size: 7.5px; 7268 letter-spacing: -.2px; 7269 padding-left: 2px; 7270 text-transform: uppercase; 7271 font-weight: bold; 7272 margin-right: 4px; 7273 cursor: pointer; 7274 line-height: normal; 7275 color: var(--ck-powered-by-text-color); 7276 7277 } 7278 7279 & .ck-icon { 7280 display: block; 7281 cursor: pointer; 7282 } 7283 7284 &:hover { 7285 & a { 7286 filter: grayscale(0%); 7287 opacity: 1; 7288 } 7289 } 7290 } 7291 7292 &[class*="position_inside"] { 7293 border-color: transparent; 7294 } 7295 7296 &[class*="position_border"] { 7297 border: var(--ck-focus-ring); 7298 border-color: var(--ck-powered-by-border-color); 7299 } 7300} 7301 7302`,`/* 7303 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7304 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7305 */ 7306 7307:root { 7308 --ck-color-base-foreground: hsl(0, 0%, 98%); 7309 --ck-color-base-background: hsl(0, 0%, 100%); 7310 --ck-color-base-border: hsl(220, 6%, 81%); 7311 --ck-color-base-action: hsl(104, 50.2%, 42.5%); 7312 --ck-color-base-focus: hsl(209, 92%, 70%); 7313 --ck-color-base-text: hsl(0, 0%, 20%); 7314 --ck-color-base-active: hsl(218.1, 100%, 58%); 7315 --ck-color-base-active-focus: hsl(218.2, 100%, 52.5%);
7316 --ck-color-base-error: hsl(15, 100%, 43%); 7317 7318 /* -- Generic colors ------------------------------------------------------------------------ */ 7319 7320 --ck-color-focus-border-coordinates: 218, 81.8%, 56.9%; 7321 --ck-color-focus-border: hsl(var(--ck-color-focus-border-coordinates)); 7322 --ck-color-focus-outer-shadow: hsl(212.4, 89.3%, 89%); 7323 --ck-color-focus-disabled-shadow: hsla(209, 90%, 72%,.3); 7324 --ck-color-focus-error-shadow: hsla(9,100%,56%,.3); 7325 --ck-color-text: var(--ck-color-base-text); 7326 --ck-color-shadow-drop: hsla(0, 0%, 0%, 0.15); 7327 --ck-color-shadow-drop-active: hsla(0, 0%, 0%, 0.2); 7328 --ck-color-shadow-inner: hsla(0, 0%, 0%, 0.1); 7329 7330 /* -- Buttons ------------------------------------------------------------------------------- */ 7331 7332 --ck-color-button-default-background: transparent; 7333 --ck-color-button-default-hover-background: hsl(0, 0%, 94.1%); 7334 --ck-color-button-default-active-background: hsl(0, 0%, 94.1%); 7335 --ck-color-button-default-disabled-background: transparent; 7336 7337 --ck-color-button-on-background: hsl(212, 100%, 97.1%); 7338 --ck-color-button-on-hover-background: hsl(211.7, 100%, 92.9%); 7339 --ck-color-button-on-active-background: hsl(211.7, 100%, 92.9%); 7340 --ck-color-button-on-disabled-background: hsl(211, 15%, 95%); 7341 --ck-color-button-on-color: hsl(218.1, 100%, 58%); 7342 7343 7344 --ck-color-button-action-background: var(--ck-color-base-action); 7345 --ck-color-button-action-hover-background: hsl(104, 53.2%, 40.2%); 7346 --ck-color-button-action-active-background: hsl(104, 53.2%, 40.2%); 7347 --ck-color-button-action-disabled-background: hsl(104, 44%, 58%); 7348 --ck-color-button-action-text: var(--ck-color-base-background); 7349 7350 --ck-color-button-save: hsl(120, 100%, 27%); 7351 --ck-color-button-cancel: hsl(15, 100%, 43%); 7352 7353 --ck-color-switch-button-off-background: hsl(0, 0%, 57.6%); 7354 --ck-color-switch-button-off-hover-background: hsl(0, 0%, 49%); 7355 --ck-color-switch-button-on-background: var(--ck-color-button-action-background); 7356 --ck-color-switch-button-on-hover-background: hsl(104, 53.2%, 40.2%); 7357 --ck-color-switch-button-inner-background: var(--ck-color-base-background); 7358 --ck-color-switch-button-inner-shadow: hsla(0, 0%, 0%, 0.1); 7359 7360 /* -- Dropdown ------------------------------------------------------------------------------ */ 7361 7362 --ck-color-dropdown-panel-background: var(--ck-color-base-background); 7363 --ck-color-dropdown-panel-border: var(--ck-color-base-border); 7364 7365 /* -- Dialog -------------------------------------------------------------------------------- */ 7366 7367 --ck-color-dialog-background: var(--ck-custom-background); 7368 --ck-color-dialog-form-header-border: var(--ck-custom-border); 7369 7370 /* -- Input --------------------------------------------------------------------------------- */ 7371 7372 --ck-color-input-background: var(--ck-color-base-background); 7373 --ck-color-input-border: var(--ck-color-base-border); 7374 --ck-color-input-error-border: var(--ck-color-base-error); 7375 --ck-color-input-text: var(--ck-color-base-text); 7376 --ck-color-input-disabled-background: hsl(0, 0%, 95%); 7377 --ck-color-input-disabled-border: var(--ck-color-base-border); 7378 --ck-color-input-disabled-text: hsl(0, 0%, 46%); 7379 7380 /* -- List ---------------------------------------------------------------------------------- */ 7381 7382 --ck-color-list-background: var(--ck-color-base-background); 7383 --ck-color-list-button-hover-background: var(--ck-color-button-default-hover-background); 7384 --ck-color-list-button-on-background: var(--ck-color-button-on-color); 7385 --ck-color-list-button-on-background-focus: var(--ck-color-button-on-color); 7386 --ck-color-list-button-on-text: var(--ck-color-base-background); 7387 7388 /* -- Panel --------------------------------------------------------------------------------- */ 7389 7390 --ck-color-panel-background: var(--ck-color-base-background); 7391 --ck-color-panel-border: var(--ck-color-base-border); 7392 7393 /* -- Toolbar ------------------------------------------------------------------------------- */ 7394 7395 --ck-color-toolbar-background: var(--ck-color-base-background); 7396 --ck-color-toolbar-border: var(--ck-color-base-border); 7397 7398 /* -- Tooltip ------------------------------------------------------------------------------- */ 7399 7400 --ck-color-tooltip-background: var(--ck-color-base-text); 7401 --ck-color-tooltip-text: var(--ck-color-base-background); 7402 7403 /* -- Engine -------------------------------------------------------------------------------- */ 7404 7405 --ck-color-engine-placeholder-text: hsl(0, 0%, 44%); 7406 7407 /* -- Upload -------------------------------------------------------------------------------- */ 7408 7409 --ck-color-upload-bar-background: hsl(209, 92%, 70%); 7410 7411 /* -- Link -------------------------------------------------------------------------------- */ 7412 7413 --ck-color-link-default: hsl(240, 100%, 47%); 7414 --ck-color-link-selected-background: hsla(201, 100%, 56%, 0.1); 7415 --ck-color-link-fake-selection: hsla(201, 100%, 56%, 0.3); 7416 7417 /* -- Search result highlight ---------------------------------------------------------------- */ 7418 7419 --ck-color-highlight-background: hsl(60, 100%, 50%); 7420 7421 /* -- Generic colors ------------------------------------------------------------------------- */ 7422 7423 --ck-color-light-red: hsl(0, 100%, 90%); 7424} 7425`,`/* 7426 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7427 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7428 */ 7429 7430:root { 7431 /** 7432 * An opacity value of disabled UI item. 7433 */ 7434 --ck-disabled-opacity: .5; 7435} 7436`,`/* 7437 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7438 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7439 */ 7440 7441:root { 7442 /** 7443 * The geometry of the of focused element's outer shadow. 7444 */ 7445 --ck-focus-outer-shadow-geometry: 0 0 0 3px; 7446 7447 /** 7448 * A visual style of focused element's outer shadow. 7449 */ 7450 --ck-focus-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow); 7451 7452 /** 7453 * A visual style of focused element's outer shadow (when disabled). 7454 */ 7455 --ck-focus-disabled-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow); 7456 7457 /** 7458 * A visual style of focused element's outer shadow (when has errors). 7459 */ 7460 --ck-focus-error-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow); 7461 7462 /** 7463 * A visual style of focused element's border or outline. 7464 */ 7465 --ck-focus-ring: 1px solid var(--ck-color-focus-border); 7466} 7467`,`/* 7468 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7469 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7470 */ 7471 7472:root { 7473 --ck-font-size-base: 13px; 7474 --ck-line-height-base: 1.84615; 7475 --ck-font-face: Helvetica, Arial, Tahoma, Verdana, Sans-Serif; 7476 7477 --ck-font-size-tiny: 0.7em; 7478 --ck-font-size-small: 0.75em; 7479 --ck-font-size-normal: 1em; 7480 --ck-font-size-big: 1.4em; 7481 --ck-font-size-large: 1.8em; 7482} 7483`,`/* 7484 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7485 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7486 */ 7487 7488:root { 7489 /* This is super-important. This is **manually** adjusted so a button without an icon 7490 is never smaller than a button with icon, additionally making sure that text-less buttons 7491 are perfect squares. The value is also shared by other components which should stay "in-line" 7492 with buttons. */ 7493 --ck-ui-component-min-height: 2.3em; 7494} 7495 7496/** 7497 * Resets an element, ignoring its children. 7498 */ 7499.ck.ck-reset, 7500.ck.ck-reset_all, 7501.ck-reset_all *:not(.ck-reset_all-excluded *) { 7502 box-sizing: border-box; 7503 width: auto; 7504 height: auto; 7505 position: static; 7506
7507 /* Do not include inheritable rules here. */ 7508 margin: 0; 7509 padding: 0; 7510 border: 0; 7511 background: transparent; 7512 text-decoration: none; 7513 vertical-align: middle; 7514 transition: none; 7515 7516 /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/105 */ 7517 word-wrap: break-word; 7518} 7519 7520/** 7521 * Resets an element AND its children. 7522 */ 7523.ck.ck-reset_all, 7524.ck-reset_all *:not(.ck-reset_all-excluded *) { 7525 /* These are rule inherited by all children elements. */ 7526 border-collapse: collapse; 7527 font: normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face); 7528 color: var(--ck-color-text); 7529 text-align: left; 7530 white-space: nowrap; 7531 cursor: auto; 7532 float: none; 7533} 7534 7535.ck-reset_all { 7536 & .ck-rtl *:not(.ck-reset_all-excluded *) { 7537 text-align: right; 7538 } 7539 7540 & iframe:not(.ck-reset_all-excluded *) { 7541 /* For IE */ 7542 vertical-align: inherit; 7543 } 7544 7545 & textarea:not(.ck-reset_all-excluded *) { 7546 white-space: pre-wrap; 7547 } 7548 7549 & textarea:not(.ck-reset_all-excluded *), 7550 & input[type="text"]:not(.ck-reset_all-excluded *), 7551 & input[type="password"]:not(.ck-reset_all-excluded *) { 7552 cursor: text; 7553 } 7554 7555 & textarea[disabled]:not(.ck-reset_all-excluded *), 7556 & input[type="text"][disabled]:not(.ck-reset_all-excluded *), 7557 & input[type="password"][disabled]:not(.ck-reset_all-excluded *) { 7558 cursor: default; 7559 } 7560 7561 & fieldset:not(.ck-reset_all-excluded *) { 7562 padding: 10px; 7563 border: 2px groove hsl(255, 7%, 88%); 7564 } 7565 7566 & button:not(.ck-reset_all-excluded *)::-moz-focus-inner { 7567 /* See http://stackoverflow.com/questions/5517744/remove-extra-button-spacing-padding-in-firefox */ 7568 padding: 0; 7569 border: 0 7570 } 7571} 7572 7573/** 7574 * Default UI rules for RTL languages. 7575 */ 7576.ck[dir="rtl"], 7577.ck[dir="rtl"] .ck { 7578 text-align: right; 7579} 7580`,`/* 7581 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7582 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7583 */ 7584 7585/** 7586 * Default border-radius value. 7587 */ 7588:root{ 7589 --ck-border-radius: 2px; 7590} 7591`,`/* 7592 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7593 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7594 */ 7595 7596:root { 7597 /** 7598 * A visual style of element's inner shadow (i.e. input). 7599 */ 7600 --ck-inner-shadow: 2px 2px 3px var(--ck-color-shadow-inner) inset; 7601 7602 /** 7603 * A visual style of element's drop shadow (i.e. panel). 7604 */ 7605 --ck-drop-shadow: 0 1px 2px 1px var(--ck-color-shadow-drop); 7606 7607 /** 7608 * A visual style of element's active shadow (i.e. comment or suggestion). 7609 */ 7610 --ck-drop-shadow-active: 0 3px 6px 1px var(--ck-color-shadow-drop-active); 7611} 7612`,`/* 7613 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7614 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7615 */ 7616 7617:root { 7618 --ck-spacing-unit: 0.6em; 7619 --ck-spacing-large: calc(var(--ck-spacing-unit) * 1.5); 7620 --ck-spacing-standard: var(--ck-spacing-unit); 7621 --ck-spacing-medium: calc(var(--ck-spacing-unit) * 0.8); 7622 --ck-spacing-small: calc(var(--ck-spacing-unit) * 0.5); 7623 --ck-spacing-tiny: calc(var(--ck-spacing-unit) * 0.3); 7624 --ck-spacing-extra-tiny: calc(var(--ck-spacing-unit) * 0.16); 7625} 7626`],sourceRoot:""}]);const C=w},695:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;
7626top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}@media (prefers-reduced-motion:reduce){.ck .ck-widget{transition:none}}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}@media (forced-colors:none){.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background)}}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}@media (prefers-reduced-motion:reduce){.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{transition:none}}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}@media (prefers-reduced-motion:reduce){.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{transition:none}}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}","",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widget.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widget.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./../ckeditor5-ui/theme/mixins/_mediacolors.css"],names:[],mappings:"AAKA,MACC,+CAAgD,CAChD,6CAAsD,CACtD,uCAAgD,CAEhD,kDAAmD,CACnD,gCAAiC,CACjC,kEACD,CAOA,8DAEC,iBAqBD,CAnBC,4EACC,iBAOD,CALC,qFAGC,aACD,CASD,iLACC,kBACD,CAGD,kBACC,qDAAsD,CAEtD,qDAAs
7626D,CACtD,6CAA8C,CAF9C,0CAA2C,CAI3C,aAAc,CADd,kCAAmC,CAGnC,uCAAwC,CACxC,4CAA6C,CAF7C,iCAsCD,CAlCC,8NAKC,iBACD,CAEA,0CAEC,qCAAsC,CADtC,oCAED,CAEA,2CAEC,sCAAuC,CADvC,oCAED,CAEA,8CACC,uCAAwC,CACxC,sCACD,CAEA,6CACC,uCAAwC,CACxC,qCACD,CAGA,8CAEC,QAAS,CADT,6CAAgD,CAEhD,yBACD,CChFD,MACC,iCAAkC,CAClC,kCAAmC,CACnC,4CAA6C,CAC7C,wCAAyC,CAEzC,wCAAiD,CACjD,sCAAkD,CAClD,2EAA4E,CAC5E,yEACD,CAEA,eAGC,yBAA0B,CAD1B,mBAAoB,CADpB,gDAAiD,CAGjD,6GAcD,CAZC,uCAND,eAOE,eAWF,CAVC,CAEA,0EAEC,6EACD,CAEA,qBACC,iDACD,CAGD,gCACC,4BAYD,CARC,yGCnCA,2BAA2B,CCF3B,qCAA8B,CDC9B,YD2CA,CGvCA,4BACC,yGHoCC,iEGlCD,CACD,CHuCA,4EAKC,4BAA6B,CAa7B,iEAAkE,CAhBlE,qBAAsB,CAoBtB,mDAAoD,CAhBpD,SAAU,CALV,WAAY,CAsBZ,KAAM,CAFN,2BAA4B,CAT5B,6SAwCD,CA3BC,uCAzBD,4EA0BE,eA0BF,CAzBC,CAEA,qFAIC,oDAAqD,CADrD,yCAA0C,CAD1C,wCAeD,CAVC,kHACC,SAAU,CAGV,+DAKD,CAHC,uCAND,kHAOE,eAEF,CADC,CAKF,wHACC,SACD,CAID,kFAEC,oDAAqD,CADrD,SAED,CAKC,oMAEC,6CAA8C,CAD9C,SAOD,CAHC,gRACC,SACD,CAOH,qFACC,SAAU,CACV,oDACD,CAGA,gDAEC,eAkBD,CAhBC,yEAOC,iCACD,CAGC,gOAEC,gDACD,CAOD,wIAEC,mDAQD,CALE,ghBAEC,gDACD,CAKH,yKAOC,yDACD",sourcesContent:[`/* 7627 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7628 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7629 */ 7630 7631:root { 7632 --ck-color-resizer: var(--ck-color-focus-border); 7633 --ck-color-resizer-tooltip-background: hsl(0, 0%, 15%); 7634 --ck-color-resizer-tooltip-text: hsl(0, 0%, 95%); 7635 7636 --ck-resizer-border-radius: var(--ck-border-radius); 7637 --ck-resizer-tooltip-offset: 10px; 7638 --ck-resizer-tooltip-height: calc(var(--ck-spacing-small) * 2 + 10px); 7639} 7640 7641.ck .ck-widget { 7642 /* This is neccessary for type around UI to be positioned properly. */ 7643 position: relative; 7644} 7645 7646.ck .ck-widget.ck-widget_with-selection-handle { 7647 /* Make the widget wrapper a relative positioning container for the drag handle. */ 7648 position: relative; 7649 7650 & .ck-widget__selection-handle { 7651 position: absolute; 7652 7653 & .ck-icon { 7654 /* Make sure the icon in not a subject to font-size or line-height to avoid 7655 unnecessary spacing around it. */ 7656 display: block; 7657 } 7658 } 7659 7660 /* Show the selection handle on mouse hover over the widget, but not for nested widgets. */ 7661 &:hover > .ck-widget__selection-handle { 7662 visibility: visible; 7663 } 7664 7665 /* Show the selection handle when the widget is selected, but not for nested widgets. */ 7666 &.ck-widget_selected > .ck-widget__selection-handle { 7667 visibility: visible; 7668 } 7669} 7670 7671.ck .ck-size-view { 7672 background: var(--ck-color-resizer-tooltip-background); 7673 color: var(--ck-color-resizer-tooltip-text); 7674 border: 1px solid var(--ck-color-resizer-tooltip-text); 7675 border-radius: var(--ck-resizer-border-radius); 7676 font-size: var(--ck-font-size-tiny); 7677 display: block; 7678 padding: 0 var(--ck-spacing-small); 7679 height: var(--ck-resizer-tooltip-height); 7680 line-height: var(--ck-resizer-tooltip-height); 7681 7682 &.ck-orientation-top-left, 7683 &.ck-orientation-top-right, 7684 &.ck-orientation-bottom-right, 7685 &.ck-orientation-bottom-left, 7686 &.ck-orientation-above-center { 7687 position: absolute; 7688 } 7689 7690 &.ck-orientation-top-left { 7691 top: var(--ck-resizer-tooltip-offset); 7692 left: var(--ck-resizer-tooltip-offset); 7693 } 7694 7695 &.ck-orientation-top-right { 7696 top: var(--ck-resizer-tooltip-offset); 7697 right: var(--ck-resizer-tooltip-offset); 7698 } 7699 7700 &.ck-orientation-bottom-right { 7701 bottom: var(--ck-resizer-tooltip-offset); 7702 right: var(--ck-resizer-tooltip-offset); 7703 } 7704 7705 &.ck-orientation-bottom-left { 7706 bottom: var(--ck-resizer-tooltip-offset); 7707 left: var(--ck-resizer-tooltip-offset); 7708 } 7709 7710 /* Class applied if the widget is too small to contain the size label */ 7711 &.ck-orientation-above-center { 7712 top: calc(var(--ck-resizer-tooltip-height) * -1); 7713 left: 50%; 7714 transform: translate(-50%); 7715 } 7716} 7717`,`/* 7718 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7719 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7720 */ 7721 7722@import "../mixins/_focus.css"; 7723@import "../mixins/_shadow.css"; 7724@import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css"; 7725 7726:root { 7727 --ck-widget-outline-thickness: 3px; 7728 --ck-widget-handler-icon-size: 16px; 7729 --ck-widget-handler-animation-duration: 200ms; 7730 --ck-widget-handler-animation-curve: ease; 7731 7732 --ck-color-widget-blurred-border: hsl(0, 0%, 87%); 7733 --ck-color-widget-hover-border: hsl(43, 100%, 62%); 7734 --ck-color-widget-editable-focus-background: var(--ck-color-base-background); 7735 --ck-color-widget-drag-handler-icon-color: var(--ck-color-base-background); 7736} 7737 7738.ck .ck-widget { 7739 outline-width: var(--ck-widget-outline-thickness); 7740 outline-style: solid; 7741 outline-color: transparent; 7742 transition: outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve); 7743 7744 @media (prefers-reduced-motion: reduce) { 7745 transition: none; 7746 } 7747 7748 &.ck-widget_selected, 7749 &.ck-widget_selected:hover { 7750 outline: var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border); 7751 } 7752 7753 &:hover { 7754 outline-color: var(--ck-color-widget-hover-border); 7755 } 7756} 7757 7758.ck .ck-editor__nested-editable { 7759 border: 1px solid transparent; 7760 7761 /* The :focus style is applied before .ck-editor__nested-editable_focused class is rendered in the view. 7762 These styles show a different border for a blink of an eye, so \`:focus\` need to have same styles applied. */ 7763 &.ck-editor__nested-editable_focused, 7764 &:focus { 7765 @mixin ck-focus-ring;
7766 @mixin ck-box-shadow var(--ck-inner-shadow); 7767 @mixin ck-media-default-colors { 7768 background-color: var(--ck-color-widget-editable-focus-background); 7769 } 7770 } 7771} 7772 7773.ck .ck-widget.ck-widget_with-selection-handle { 7774 & .ck-widget__selection-handle { 7775 padding: 4px; 7776 box-sizing: border-box; 7777 7778 /* Background and opacity will be animated as the handler shows up or the widget gets selected. */ 7779 background-color: transparent; 7780 opacity: 0; 7781 7782 /* Transition: 7783 * background-color for the .ck-widget_selected state change, 7784 * visibility for hiding the handler, 7785 * opacity for the proper look of the icon when the handler disappears. */ 7786 transition: 7787 background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve), 7788 visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve), 7789 opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve); 7790 7791 /* Make only top corners round. */ 7792 border-radius: var(--ck-border-radius) var(--ck-border-radius) 0 0; 7793 7794 /* Place the drag handler outside the widget wrapper. */ 7795 transform: translateY(-100%); 7796 left: calc(0px - var(--ck-widget-outline-thickness)); 7797 top: 0; 7798 7799 @media (prefers-reduced-motion: reduce) { 7800 transition: none; 7801 } 7802 7803 & .ck-icon { 7804 /* Make sure the dimensions of the icon are independent of the fon-size of the content. */ 7805 width: var(--ck-widget-handler-icon-size); 7806 height: var(--ck-widget-handler-icon-size); 7807 color: var(--ck-color-widget-drag-handler-icon-color); 7808 7809 /* The "selected" part of the icon is invisible by default */ 7810 & .ck-icon__selected-indicator { 7811 opacity: 0; 7812 7813 /* Note: The animation is longer on purpose. Simply feels better. */ 7814 transition: opacity 300ms var(--ck-widget-handler-animation-curve); 7815 7816 @media (prefers-reduced-motion: reduce) { 7817 transition: none; 7818 } 7819 } 7820 } 7821 7822 /* Advertise using the look of the icon that once clicked the handler, the widget will be selected. */ 7823 &:hover .ck-icon .ck-icon__selected-indicator { 7824 opacity: 1; 7825 } 7826 } 7827 7828 /* Show the selection handler on mouse hover over the widget, but not for nested widgets. */ 7829 &:hover > .ck-widget__selection-handle { 7830 opacity: 1; 7831 background-color: var(--ck-color-widget-hover-border); 7832 } 7833 7834 /* Show the selection handler when the widget is selected, but not for nested widgets. */ 7835 &.ck-widget_selected, 7836 &.ck-widget_selected:hover { 7837 & > .ck-widget__selection-handle { 7838 opacity: 1; 7839 background-color: var(--ck-color-focus-border); 7840 7841 /* When the widget is selected, notify the user using the proper look of the icon. */ 7842 & .ck-icon .ck-icon__selected-indicator { 7843 opacity: 1; 7844 } 7845 } 7846 } 7847} 7848 7849/* In a RTL environment, align the selection handler to the right side of the widget */ 7850/* stylelint-disable-next-line no-descending-specificity */ 7851.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle { 7852 left: auto; 7853 right: calc(0px - var(--ck-widget-outline-thickness)); 7854} 7855 7856/* https://github.com/ckeditor/ckeditor5/issues/6415 */ 7857.ck.ck-editor__editable.ck-read-only .ck-widget { 7858 /* Prevent the :hover outline from showing up because of the used outline-color transition. */ 7859 transition: none; 7860 7861 &:not(.ck-widget_selected) { 7862 /* Disable visual effects of hover/active widget when CKEditor is in readOnly mode. 7863 * See: https://github.com/ckeditor/ckeditor5/issues/1261 7864 * 7865 * Leave the unit because this custom property is used in calc() by other features. 7866 * See: https://github.com/ckeditor/ckeditor5/issues/6775 7867 */ 7868 --ck-widget-outline-thickness: 0px; 7869 } 7870 7871 &.ck-widget_with-selection-handle { 7872 & .ck-widget__selection-handle, 7873 & .ck-widget__selection-handle:hover { 7874 background: var(--ck-color-widget-blurred-border); 7875 } 7876 } 7877} 7878 7879/* Style the widget when it's selected but the editable it belongs to lost focus. */ 7880/* stylelint-disable-next-line no-descending-specificity */ 7881.ck.ck-editor__editable.ck-blurred .ck-widget { 7882 &.ck-widget_selected, 7883 &.ck-widget_selected:hover { 7884 outline-color: var(--ck-color-widget-blurred-border); 7885 7886 &.ck-widget_with-selection-handle { 7887 & > .ck-widget__selection-handle, 7888 & > .ck-widget__selection-handle:hover { 7889 background: var(--ck-color-widget-blurred-border); 7890 } 7891 } 7892 } 7893} 7894 7895.ck.ck-editor__editable > .ck-widget.ck-widget_with-selection-handle:first-child, 7896.ck.ck-editor__editable blockquote > .ck-widget.ck-widget_with-selection-handle:first-child {
7897 /* Do not crop selection handler if a widget is a first-child in the blockquote or in the root editable. 7898 In fact, anything with overflow: hidden. 7899 https://github.com/ckeditor/ckeditor5-block-quote/issues/28 7900 https://github.com/ckeditor/ckeditor5-widget/issues/44 7901 https://github.com/ckeditor/ckeditor5-widget/issues/66 */ 7902 margin-top: calc(1em + var(--ck-widget-handler-icon-size)); 7903} 7904`,`/* 7905 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7906 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7907 */ 7908 7909/** 7910 * A visual style of focused element's border. 7911 */ 7912@define-mixin ck-focus-ring { 7913 /* Disable native outline. */ 7914 outline: none; 7915 border: var(--ck-focus-ring) 7916} 7917`,`/* 7918 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7919 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7920 */ 7921 7922/** 7923 * A helper to combine multiple shadows. 7924 */ 7925@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 { 7926 box-shadow: $shadowA, $shadowB; 7927} 7928 7929/** 7930 * Gives an element a drop shadow so it looks like a floating panel. 7931 */ 7932@define-mixin ck-drop-shadow { 7933 @mixin ck-box-shadow var(--ck-drop-shadow); 7934} 7935`,`/* 7936 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7937 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7938 */ 7939 7940@define-mixin ck-media-forced-colors { 7941 @media (forced-colors: active) { 7942 & { 7943 @mixin-content; 7944 } 7945 } 7946} 7947 7948@define-mixin ck-media-default-colors { 7949 @media (forced-colors: none) { 7950 & { 7951 @mixin-content; 7952 } 7953 } 7954} 7955`],sourceRoot:""}]);const C=w},4095:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}","",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widgetresize.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widgetresize.css"],names:[],mappings:"AAKA,4BAEC,iBACD,CAEA,wBACC,YAAa,CAMb,MAAO,CAFP,mBAAoB,CAHpB,iBAAkB,CAMlB,KACD,CAGC,2EACC,aACD,CAGD,gCAIC,kBAAmB,CAHnB,iBAcD,CATC,4IAEC,kBACD,CAEA,4IAEC,kBACD,CCpCD,MACC,sBAAuB,CAGvB,yDAAiE,CACjE,6BACD,CAEA,wBACC,yCACD,CAEA,gCAGC,uCAAwC,CACxC,gDAA6D,CAC7D,6CAA8C,CAH9C,6BAA8B,CAD9B,4BAyBD,CAnBC,oEAEC,6BAA8B,CAD9B,4BAED,CAEA,qEAEC,8BAA+B,CAD/B,4BAED,CAEA,wEACC,+BAAgC,CAChC,8BACD,CAEA,uEACC,+BAAgC,CAChC,6BACD",sourcesContent:[`/* 7956 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 7957 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 7958 */ 7959 7960.ck .ck-widget_with-resizer { 7961 /* Make the widget wrapper a relative positioning container for the drag handle. */ 7962 position: relative; 7963} 7964 7965.ck .ck-widget__resizer { 7966 display: none; 7967 position: absolute; 7968 7969 /* The wrapper itself should not interfere with the pointer device, only the handles should. */ 7970 pointer-events: none; 7971 7972 left: 0; 7973 top: 0; 7974} 7975 7976.ck-focused .ck-widget_with-resizer.ck-widget_selected { 7977 & > .ck-widget__resizer { 7978 display: block; 7979 } 7980} 7981 7982.ck .ck-widget__resizer__handle { 7983 position: absolute; 7984 7985 /* Resizers are the only UI elements that should interfere with a pointer device. */ 7986 pointer-events: all; 7987 7988 &.ck-widget__resizer__handle-top-left, 7989 &.ck-widget__resizer__handle-bottom-right { 7990 cursor: nwse-resize; 7991 } 7992 7993 &.ck-widget__resizer__handle-top-right, 7994 &.ck-widget__resizer__handle-bottom-left { 7995 cursor: nesw-resize; 7996 } 7997} 7998`,`/* 7999 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 8000 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 8001 */ 8002 8003:root { 8004 --ck-resizer-size: 10px; 8005 8006 /* Set the resizer with a 50% offset. */ 8007 --ck-resizer-offset: calc( ( var(--ck-resizer-size) / -2 ) - 2px); 8008 --ck-resizer-border-width: 1px; 8009} 8010 8011.ck .ck-widget__resizer { 8012 outline: 1px solid var(--ck-color-resizer); 8013} 8014 8015.ck .ck-widget__resizer__handle { 8016 width: var(--ck-resizer-size); 8017 height: var(--ck-resizer-size); 8018 background: var(--ck-color-focus-border); 8019 border: var(--ck-resizer-border-width) solid hsl(0, 0%, 100%); 8020 border-radius: var(--ck-resizer-border-radius); 8021 8022 &.ck-widget__resizer__handle-top-left { 8023 top: var(--ck-resizer-offset); 8024 left: var(--ck-resizer-offset); 8025 } 8026 8027 &.ck-widget__resizer__handle-top-right { 8028 top: var(--ck-resizer-offset); 8029 right: var(--ck-resizer-offset); 8030 } 8031 8032 &.ck-widget__resizer__handle-bottom-right { 8033 bottom: var(--ck-resizer-offset); 8034 right: var(--ck-resizer-offset); 8035 } 8036 8037 &.ck-widget__resizer__handle-bottom-left { 8038 bottom: var(--ck-resizer-offset); 8039 left: var(--ck-resizer-offset); 8040 } 8041} 8042`],sourceRoot:""}]);const C=w},8508:(f,g,p)=>{p.d(g,{A:()=>C});var x=p(9372),y=p.n(x),v=p(935),w=p.n(v)()(y());w.push([f
vendor: 6,797 bytes, line 8042
8042.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}@media (prefers-reduced-motion:reduce){.ck .ck-widget .ck-widget__type-around__button{transition:none}}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}@media (prefers-reduced-motion:reduce){.ck .ck-widget .ck-widget__type-around__button svg{transition:none}}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}@media (prefers-reduced-motion:reduce){.ck .ck-widget .ck-widget__type-around__button:hover,.ck .ck-widget .ck-widget__type-around__button:hover svg line,.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:none}}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}
vendor: 1,543 bytes, line 8042
8042.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}
vendor: 1,735 bytes, line 8042
8042to{opacity:1}}',"",{version:3,sources:["webpack://./../ckeditor5-widget/theme/widgettypearound.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widgettypearound.css"],names:[],mappings:"AASC,+CACC,aAAc,CAEd,eAAgB,CADhB,iBAAkB,CAElB,2BAwBD,CAtBC,mDAGC,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAEA,qFAGC,kBAAoB,CADpB,gDAAoD,CAGpD,0BACD,CAEA,oFAEC,mDAAuD,CACvD,mBAAqB,CAErB,yBACD,CAUA,mLACC,UAAW,CACX,aAAc,CAGd,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAMD,2EACC,YAAa,CAEb,MAAO,CADP,iBAAkB,CAElB,OACD,CAOA,iFACC,gDAAqD,CACrD,iDACD,CAKA,wHAEC,aAAc,CADd,qDAED,CAKA,uHACC,wDAA6D,CAC7D,aACD,CAoBD,mOACC,YACD,CC3GA,MACC,wCAAyC,CACzC,wEAAyE,CACzE,8EAA+E,CAC/E,2FAA4F,CAC5F,wDAAyD,CACzD,uDAAwD,CACxD,yEACD,CAgBC,+CAGC,oDAAqD,CACrD,mBAAoB,CAFpB,+CAAgD,CAVjD,SAAU,CACV,mBAAoB,CAYnB,uMAAyM,CAJzM,8CAwED,CAhEC,uCATD,+CAUE,eA+DF,CA9DC,CAEA,mDAEC,UAAW,CAGX,cAAe,CAFf,8BAA+B,CAC/B,6BAA8B,CAH9B,UAwBD,CAlBC,uCAPD,mDAQE,eAiBF,CAhBC,CAEA,qDACC,mBAAoB,CACpB,mBAAoB,CAEpB,SAAU,CACV,qDAAsD,CACtD,kBAAmB,CACnB,oBAAqB,CACrB,qBACD,CAEA,wDACC,kBACD,CAGD,qDAIC,6DA4BD,CAtBE,kEACC,oDACD,CAEA,8DACC,wDACD,CAGD,uCAQE,qLACC,cACD,CAEF,CASD,uKA7FD,SAAU,CACV,mBA8FC,CAOD,gGACC,0DACD,CAOA,uKAEC,2DAQD,CANC,mLAIC,uEAAkF,CADlF,mBAAoB,CADpB,2DAA4D,CAD5D,0DAID,CAOD,8GACC,gBACD,CAKA,mDAGC,mFAAoF,CAOpF,oCAAqC,CARrC,UAAW,CAOX,oCAAwC,CARxC,mBAUD,CAOC,6JAEC,yBACD,CAUA,yKACC,iDACD,CAMA,uOAxKD,SAAU,CACV,mBAyKC,CAoBA,6yBACC,SACD,CASF,uHACC,aAAc,CACd,iBACD,CAYG,iRAxNF,SAAU,CACV,mBAyNE,CAQH,kIACC,qEAKD,CAHC,wIACC,WACD,CAGD,4CACC,GACC,oBACD,CACA,OACC,mBACD,CACD,CAEA,gDACC,OACC,mBACD,CACA,OACC,mBACD,CACD,CAEA,8CACC,GACC,6HACD,CACA,IACC,6HACD,CACA,GACC,+HACD,CACD,CAEA,kDACC,GACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,GACC,SACD,CACD",sourcesContent:[
8042`/* 8043 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 8044 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 8045 */ 8046 8047.ck .ck-widget { 8048 /* 8049 * Styles of the type around buttons 8050 */ 8051 & .ck-widget__type-around__button { 8052 display: block; 8053 position: absolute; 8054 overflow: hidden; 8055 z-index: var(--ck-z-default); 8056 8057 & svg { 8058 position: absolute; 8059 top: 50%; 8060 left: 50%; 8061 z-index: calc(var(--ck-z-default) + 2); 8062 } 8063 8064 &.ck-widget__type-around__button_before { 8065 /* Place it in the middle of the outline */ 8066 top: calc(-0.5 * var(--ck-widget-outline-thickness)); 8067 left: min(10%, 30px); 8068 8069 transform: translateY(-50%); 8070 } 8071 8072 &.ck-widget__type-around__button_after { 8073 /* Place it in the middle of the outline */ 8074 bottom: calc(-0.5 * var(--ck-widget-outline-thickness)); 8075 right: min(10%, 30px); 8076 8077 transform: translateY(50%); 8078 } 8079 } 8080 8081 /* 8082 * Styles for the buttons when: 8083 * - the widget is selected, 8084 * - or the button is being hovered (regardless of the widget state). 8085 */ 8086 &.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button, 8087 & > .ck-widget__type-around > .ck-widget__type-around__button:hover { 8088 &::after { 8089 content: ""; 8090 display: block; 8091 position: absolute; 8092 top: 1px; 8093 left: 1px; 8094 z-index: calc(var(--ck-z-default) + 1); 8095 } 8096 } 8097 8098 /* 8099 * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard. 8100 */ 8101 & > .ck-widget__type-around > .ck-widget__type-around__fake-caret { 8102 display: none; 8103 position: absolute; 8104 left: 0; 8105 right: 0; 8106 } 8107 8108 /* 8109 * When the widget is hovered the "fake caret" would normally be narrower than the 8110 * extra outline displayed around the widget. Let's extend the "fake caret" to match 8111 * the full width of the widget. 8112 */ 8113 &:hover > .ck-widget__type-around > .ck-widget__type-around__fake-caret { 8114 left: calc( -1 * var(--ck-widget-outline-thickness) ); 8115 right: calc( -1 * var(--ck-widget-outline-thickness) ); 8116 } 8117 8118 /* 8119 * Styles for the horizontal "fake caret" when it should be displayed before the widget (backward keyboard navigation). 8120 */ 8121 &.ck-widget_type-around_show-fake-caret_before > .ck-widget__type-around > .ck-widget__type-around__fake-caret { 8122 top: calc( -1 * var(--ck-widget-outline-thickness) - 1px ); 8123 display: block; 8124 } 8125 8126 /* 8127 * Styles for the horizontal "fake caret" when it should be displayed after the widget (forward keyboard navigation). 8128 */ 8129 &.ck-widget_type-around_show-fake-caret_after > .ck-widget__type-around > .ck-widget__type-around__fake-caret { 8130 bottom: calc( -1 * var(--ck-widget-outline-thickness) - 1px ); 8131 display: block; 8132 } 8133} 8134 8135/* 8136 * Integration with the read-only mode of the editor. 8137 */ 8138.ck.ck-editor__editable.ck-read-only .ck-widget__type-around { 8139 display: none; 8140} 8141 8142/* 8143 * Integration with the restricted editing mode (feature) of the editor. 8144 */ 8145.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around { 8146 display: none; 8147} 8148 8149/* 8150 * Integration with the #isEnabled property of the WidgetTypeAround plugin. 8151 */ 8152.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around { 8153 display: none; 8154} 8155`,`/* 8156 * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. 8157 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license 8158 */ 8159 8160:root { 8161 --ck-widget-type-around-button-size: 20px; 8162 --ck-color-widget-type-around-button-active: var(--ck-color-focus-border); 8163 --ck-color-widget-type-around-button-hover: var(--ck-color-widget-hover-border); 8164 --ck-color-widget-type-around-button-blurred-editable: var(--ck-color-widget-blurred-border); 8165 --ck-color-widget-type-around-button-radar-start-alpha: 0; 8166 --ck-color-widget-type-around-button-radar-end-alpha: .3; 8167 --ck-color-widget-type-around-button-icon: var(--ck-color-base-background); 8168} 8169 8170@define-mixin ck-widget-type-around-button-visible { 8171 opacity: 1; 8172 pointer-events: auto; 8173} 8174 8175@define-mixin ck-widget-type-around-button-hidden { 8176 opacity: 0; 8177 pointer-events: none; 8178} 8179 8180.ck .ck-widget { 8181 /* 8182 * Styles of the type around buttons 8183 */ 8184 & .ck-widget__type-around__button { 8185 width: var(--ck-widget-type-around-button-size); 8186 height: var(--ck-widget-type-around-button-size); 8187 background: var(--ck-color-widget-type-around-button); 8188 border-radius: 100px; 8189 transition: opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve), background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve); 8190 8191 @mixin ck-widget-type-around-button-hidden; 8192 8193 @media (prefers-reduced-motion: reduce) { 8194 transition: none; 8195 } 8196 8197 & svg { 8198 width: 10px; 8199 height: 8px; 8200 transform: translate(-50%,-50%); 8201 transition: transform .5s ease;
8202 margin-top: 1px; 8203 8204 @media (prefers-reduced-motion: reduce) { 8205 transition: none; 8206 } 8207 8208 & * { 8209 stroke-dasharray: 10; 8210 stroke-dashoffset: 0; 8211 8212 fill: none; 8213 stroke: var(--ck-color-widget-type-around-button-icon); 8214 stroke-width: 1.5px; 8215 stroke-linecap: round; 8216 stroke-linejoin: round; 8217 } 8218 8219 & line { 8220 stroke-dasharray: 7; 8221 } 8222 } 8223 8224 &:hover { 8225 /* 8226 * Display the "sonar" around the button when hovered. 8227 */ 8228 animation: ck-widget-type-around-button-sonar 1s ease infinite; 8229 8230 /* 8231 * Animate active button's icon. 8232 */ 8233 & svg { 8234 & polyline { 8235 animation: ck-widget-type-around-arrow-dash 2s linear; 8236 } 8237 8238 & line { 8239 animation: ck-widget-type-around-arrow-tip-dash 2s linear; 8240 } 8241 } 8242 8243 @media (prefers-reduced-motion: reduce) { 8244 animation: none; 8245 8246 & svg { 8247 & polyline { 8248 animation: none; 8249 } 8250 8251 & line { 8252 animation: none; 8253 } 8254 } 8255 } 8256 } 8257 } 8258 8259 /* 8260 * Show type around buttons when the widget gets selected or being hovered. 8261 */ 8262 &.ck-widget_selected, 8263 &:hover { 8264 & > .ck-widget__type-around > .ck-widget__type-around__button { 8265 @mixin ck-widget-type-around-button-visible; 8266 } 8267 } 8268 8269 /* 8270 * Styles for the buttons when the widget is NOT selected (but the buttons are visible 8271 * and still can be hovered). 8272 */ 8273 &:not(.ck-widget_selected) > .ck-widget__type-around > .ck-widget__type-around__button { 8274 background: var(--ck-color-widget-type-around-button-hover); 8275 } 8276 8277 /* 8278 * Styles for the buttons when: 8279 * - the widget is selected, 8280 * - or the button is being hovered (regardless of the widget state). 8281 */ 8282 &.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button, 8283 & > .ck-widget__type-around > .ck-widget__type-around__button:hover { 8284 background: var(--ck-color-widget-type-around-button-active); 8285 8286 &::after { 8287 width: calc(var(--ck-widget-type-around-button-size) - 2px); 8288 height: calc(var(--ck-widget-type-around-button-size) - 2px); 8289 border-radius: 100px; 8290 background: linear-gradient(135deg, hsla(0,0%,100%,0) 0%, hsla(0,0%,100%,.3) 100%); 8291 } 8292 } 8293 8294 /* 8295 * Styles for the "before" button when the widget has a selection handle. Because some space 8296 * is consumed by the handle, the button must be moved slightly to the right to let it breathe. 8297 */ 8298 &.ck-widget_with-selection-handle > .ck-widget__type-around > .ck-widget__type-around__button_before { 8299 margin-left: 20px; 8300 } 8301 8302 /* 8303 * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard. 8304 */ 8305 & .ck-widget__type-around__fake-caret { 8306 pointer-events: none; 8307 height: 1px; 8308 animation: ck-widget-type-around-fake-caret-pulse linear 1s infinite normal forwards; 8309 8310 /* 8311 * The semi-transparent-outline+background combo improves the contrast 8312 * when the background underneath the fake caret is dark. 8313 */ 8314 outline: solid 1px hsla(0, 0%, 100%, .5); 8315 background: var(--ck-color-base-text); 8316 } 8317 8318 /* 8319 * Styles of the widget when the "fake caret" is blinking (e.g. upon keyboard navigation). 8320 * Despite the widget being physically selected in the model, its outline should disappear. 8321 */ 8322 &.ck-widget_selected { 8323 &.ck-widget_type-around_show-fake-caret_before, 8324 &.ck-widget_type-around_show-fake-caret_after { 8325 outline-color: transparent; 8326 } 8327 } 8328 8329 &.ck-widget_type-around_show-fake-caret_before, 8330 &.ck-widget_type-around_show-fake-caret_after { 8331 /* 8332 * When the "fake caret" is visible we simulate that the widget is not selected 8333 * (despite being physically selected), so the outline color should be for the 8334 * unselected widget. 8335 */ 8336 &.ck-widget_selected:hover { 8337 outline-color: var(--ck-color-widget-hover-border); 8338 } 8339 8340 /* 8341 * Styles of the type around buttons when the "fake caret" is blinking (e.g. upon keyboard navigation). 8342 * In this state, the type around buttons would collide with the fake carets so they should disappear. 8343 */ 8344 & > .ck-widget__type-around > .ck-widget__type-around__button { 8345 @mixin ck-widget-type-around-button-hidden; 8346 } 8347 8348 /* 8349 * Fake horizontal caret integration with the selection handle. When the caret is visible, simply 8350 * hide the handle because it intersects with the caret (and does not make much sense anyway). 8351 */ 8352 &.ck-widget_with-selection-handle { 8353 &.ck-widget_selected, 8354 &.ck-widget_selected:hover { 8355 & > .ck-widget__selection-handle { 8356 opacity: 0 8357 } 8358 } 8359 } 8360 8361 /* 8362 * Fake horizontal caret integration with the resize UI. When the caret is visible, simply 8363 * hide the resize UI because it creates too much noise. It can be visible when the user 8364 * hovers the widget, though. 8365 */ 8366 &.ck-widget_selected.ck-widget_with-resizer > .ck-widget__resizer { 8367 opacity: 0 8368 } 8369 } 8370} 8371 8372/* 8373 * Styles for the "before" button when the widget has a selection handle in an RTL environment. 8374 * The selection handler is aligned to the right side of the widget so there is no need to create 8375 * additional space for it next to the "before" button. 8376 */ 8377.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around > .ck-widget__type-around__button_before { 8378 margin-left: 0; 8379 margin-right: 20px; 8380} 8381 8382/* 8383 * Hide type around buttons when the widget is selected as a child of a selected 8384 * nested editable (e.g. mulit-cell table selection). 8385 * 8386 * See https://github.com/ckeditor/ckeditor5/issues/7263. 8387 */ 8388.ck-editor__nested-editable.ck-editor__editable_selected { 8389 & .ck-widget { 8390 &.ck-widget_selected, 8391 &:hover { 8392 & > .ck-widget__type-around > .ck-widget__type-around__button { 8393 @mixin ck-widget-type-around-button-hidden; 8394 } 8395 } 8396 } 8397} 8398 8399/* 8400 * Styles for the buttons when the widget is selected but the user clicked outside of the editor (blurred the editor). 8401 */ 8402.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button:not(:hover) { 8403 background: var(--ck-color-widget-type-around-button-blurred-editable); 8404 8405 & svg * { 8406 stroke: hsl(0,0%,60%); 8407 } 8408} 8409 8410@keyframes ck-widget-type-around-arrow-dash { 8411 0% { 8412 stroke-dashoffset: 10; 8413 } 8414 20%, 100% { 8415 stroke-dashoffset: 0; 8416 } 8417} 8418 8419@keyframes ck-widget-type-around-arrow-tip-dash { 8420 0%, 20% { 8421 stroke-dashoffset: 7; 8422 } 8423 40%, 100% { 8424 stroke-dashoffset: 0; 8425 } 8426} 8427 8428@keyframes ck-widget-type-around-button-sonar { 8429 0% { 8430 box-shadow: 0 0 0 0 hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha)); 8431 } 8432 50% { 8433 box-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-end-alpha)); 8434 } 8435 100% { 8436 box-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha)); 8437 } 8438} 8439 8440@keyframes ck-widget-type-around-fake-caret-pulse { 8441 0% { 8442 opacity: 1; 8443 } 8444 49% { 8445 opacity: 1; 8446 } 8447 50% { 8448 opacity: 0; 8449 } 8450 99% { 8451 opacity: 0; 8452 } 8453 100% { 8454 opacity: 1; 8455 } 8456} 8457`],sourceRoot:""}]);const C=w},935:f=>{f.exports=function(g){var p=[];return p.toString=function(){return this.map(function(x){var y=g(x);return x[2]?"@media ".concat(x[2]," {").concat(y,"}"):y}).join("")}
8457,p.i=function(x,y,v){typeof x=="string"&&(x=[[null,x,""]]);var w={};if(v)for(var C=0;C<this.length;C++){var E=this[C][0];E!=null&&(w[E]=!0)}for(var S=0;S<x.length;S++){var D=[].concat(x[S]);v&&w[D[0]]||(y&&(D[2]?D[2]="".concat(y," and ").concat(D[2]):D[2]=y),p.push(D))}},p}},9372:f=>{function g(x,y){return function(v){if(Array.isArray(v))return v}(x)||function(v,w){var C=v&&(typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"]);if(C!=null){var E,S,D=[],I=!0,M=!1;try{for(C=C.call(v);!(I=(E=C.next()).done)&&(D.push(E.value),!w||D.length!==w);I=!0);}catch(B){M=!0,S=B}finally{try{I||C.return==null||C.return()}finally{if(M)throw S}}return D}}(x,y)||function(v,w){if(v){if(typeof v=="string")return p(v,w);var C=Object.prototype.toString.call(v).slice(8,-1);if(C==="Object"&&v.constructor&&(C=v.constructor.name),C==="Map"||C==="Set")return Array.from(v);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return p(v,w)}}(x,y)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 8458In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function p(x,y){(y==null||y>x.length)&&(y=x.length);for(var v=0,w=new Array(y);v<y;v++)w[v]=x[v];return w}f.exports=function(x){var y=g(x,4),v=y[1],w=y[3];if(!w)return v;if(typeof btoa=="function"){var C=btoa(unescape(encodeURIComponent(JSON.stringify(w)))),E="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(C),S="/*# ".concat(E," */"),D=w.sources.map(function(I){return"/*# sourceURL=".concat(w.sourceRoot||"").concat(I," */")});return[v].concat(D).concat([S]).join(` 8459`)}return[v].join(` 8460`)}},2591:(f,g,p)=>{var x,y=function(){return x===void 0&&(x=!!(window&&document&&document.all&&!window.atob)),x},v=function(){var P={};return function(z){if(P[z]===void 0){var W=document.querySelector(z);if(window.HTMLIFrameElement&&W instanceof window.HTMLIFrameElement)try{W=W.contentDocument.head}catch{W=null}P[z]=W}return P[z]}}(),w=[];function C(P){for(var z=-1,W=0;W<w.length;W++)if(w[W].identifier===P){z=W;break}return z}function E(P,z){for(var W={},K=[],G=0;G<P.length;G++){var Z=P[G],se=z.base?Z[0]+z.base:Z[0],ge=W[se]||0,Se="".concat(se," ").concat(ge);W[se]=ge+1;var Ae=C(Se),he={css:Z[1],media:Z[2],sourceMap:Z[3]};Ae!==-1?(w[Ae].references++,w[Ae].updater(he)):w.push({identifier:Se,updater:V(he,z),references:1}),K.push(Se)}return K}function S(P){var z=document.createElement("style"),W=P.attributes||{};if(W.nonce===void 0){var K=p.nc;K&&(W.nonce=K)}if(Object.keys(W).forEach(function(Z){z.setAttribute(Z,W[Z])}),typeof P.insert=="function")P.insert(z);else{var G=v(P.insert||"head");if(!G)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");G.appendChild(z)}return z}
vendor: 1,141 bytes, lines 8460-8462
8460var D,I=(D=[],function(P,z){return D[P]=z,D.filter(Boolean).join(` 8461`)});function M(P,z,W,K){var G=W?"":K.media?"@media ".concat(K.media," {").concat(K.css,"}"):K.css;if(P.styleSheet)P.styleSheet.cssText=I(z,G);else{var Z=document.createTextNode(G),se=P.childNodes;se[z]&&P.removeChild(se[z]),se.length?P.insertBefore(Z,se[z]):P.appendChild(Z)}}function B(P,z,W){var K=W.css,G=W.media,Z=W.sourceMap;if(G?P.setAttribute("media",G):P.removeAttribute("media"),Z&&typeof btoa<"u"&&(K+=` 8462/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(Z))))," */")),P.styleSheet)P.styleSheet.cssText=K;else{for(;P.firstChild;)P.removeChild(P.firstChild);P.appendChild(document.createTextNode(K))}}var R=null,F=0;function V(P,z){var W,K,G;if(z.singleton){var Z=F++;W=R||(R=S(z)),K=M.bind(null,W,Z,!1),G=M.bind(null,W,Z,!0)}else W=S(z),K=B.bind(null,W,z),G=function(){(function(se){if(se.parentNode===null)return!1;se.parentNode.removeChild(se)})(W)};return K(P),function(se){if(se){if(se.css===P.css&&se.media===P.media&&se.sourceMap===P.sourceMap)return;K(P=se)}else G()}}f.exports=function(P,z){(z=z||{}
8462).singleton||typeof z.singleton=="boolean"||(z.singleton=y());var W=E(P=P||[],z);return function(K){if(K=K||[],Object.prototype.toString.call(K)==="[object Array]"){for(var G=0;G<W.length;G++){var Z=C(W[G]);w[Z].references--}for(var se=E(K,z),ge=0;ge<W.length;ge++){var Se=C(W[ge]);w[Se].references===0&&(w[Se].updater(),w.splice(Se,1))}W=se}}}}},s={};function d(f){var g=s[f];if(g!==void 0)return g.exports;var p=s[f]={id:f,exports:{}};return i[f](p,p.exports,d),p.exports}d.n=f=>{var g=f&&f.__esModule?()=>f.default:()=>f;return d.d(g,{a:g}),g},d.d=(f,g)=>{for(var p in g)d.o(g,p)&&!d.o(f,p)&&Object.defineProperty(f,p,{enumerable:!0,get:g[p]})},d.o=(f,g)=>Object.prototype.hasOwnProperty.call(f,g),d.nc=void 0;var h={};return(()=>{let f;d.d(h,{default:()=>px});try{f={window,document}}catch{f={window:{},document:{}}}const g=f,p=function(){try{return navigator.userAgent.toLowerCase()}catch{return""}}();var x;const y={isMac:v(p),isWindows:(x=p,x.indexOf("windows")>-1),isGecko:function(l){return!!l.match(/gecko\/\d+/)}(p),isSafari:function(l){return l.indexOf(" applewebkit/")>-1&&l.indexOf("chrome")===-1}(p),isiOS:function(l){return!!l.match(/iphone|ipad/i)||v(l)&&navigator.maxTouchPoints>0}(p),isAndroid:function(l){return l.indexOf("android")>-1}(p),isBlink:function(l){return l.indexOf("chrome/")>-1&&l.indexOf("edge/")<0}(p),features:{isRegExpUnicodePropertySupported:function(){let l=!1;try{l="Ä".search(new RegExp("[\\p{L}]","u"))===0}catch{}return l}()}};function v(l){return l.indexOf("macintosh")>-1}function w(l,t,r,o){r=r||function(k,_){return k===_};const c=Array.isArray(l)?l:Array.prototype.slice.call(l),u=Array.isArray(t)?t:Array.prototype.slice.call(t),m=function(k,_,A){const N=C(k,_,A);if(N===-1)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const T=E(k,N),O=E(_,N),L=C(T,O,A),$=k.length-L,U=_.length-L;return{firstIndex:N,lastIndexOld:$,lastIndexNew:U}}(c,u,r);return o?function(k,_){const{firstIndex:A,lastIndexOld:N,lastIndexNew:T}=k;if(A===-1)return Array(_).fill("equal");let O=[];return A>0&&(O=O.concat(Array(A).fill("equal"))),T-A>0&&(O=O.concat(Array(T-A).fill("insert"))),N-A>0&&(O=O.concat(Array(N-A).fill("delete"))),T<_&&(O=O.concat(Array(_-T).fill("equal"))),O}(m,u.length):function(k,_){const A=[],{firstIndex:N,lastIndexOld:T,lastIndexNew:O}=_;return O-N>0&&A.push({index:N,type:"insert",values:k.slice(N,O)}),T-N>0&&A.push({index:N+(O-N),type:"delete",howMany:T-N}),A}(u,m)}function C(l,t,r){for(let o=0;o<Math.max(l.length,t.length);o++)if(l[o]===void 0||t[o]===void 0||!r(l[o],t[o]))return o;return-1}function E(l,t){return l.slice(t).reverse()}function S(l,t,r){r=r||function($,U){return $===U};const o=l.length,c=t.length;if(o>200||c>200||o+c>300)return S.fastDiff(l,t,r,!0);let u,m;if(c<o){const $=l;l=t,t=$,u="delete",m="insert"}else u="insert",m="delete";const b=l.length,k=t.length,_=k-b,A={},N={};function T($){const U=(N[$-1]!==void 0?N[$-1]:-1)+1,H=N[$+1]!==void 0?N[$+1]:-1,J=U>H?-1:1;A[$+J]&&(A[$]=A[$+J].slice(0)),A[$]||(A[$]=[]),A[$].push(U>H?u:m);let ae=Math.max(U,H),_e=ae-$;for(;_e<b&&ae<k&&r(l[_e],t[ae]);)_e++,ae++,A[$].push("equal");return ae}let O,L=0;do{for(O=-L;O<_;O++)N[O]=T(O);for(O=_+L;O>_;O--)N[O]=T(O);N[_]=T(_),L++}while(N[_]!==k);return A[_].slice(1)}S.fastDiff=w;const D=function(){return function l(){l.called=!0}};class I{constructor(t,r){this.source=t,this.name=r,this.path=[],this.stop=D(),this.off=D()}}const M=new Array(256).fill("").map((l,t)=>("0"+t.toString(16)).slice(-2));function B(){const l=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,r=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0;return"e"+M[255&l]+M[l>>8&255]+M[l>>16&255]+M[l>>24&255]+M[255&t]+M[t>>8&255]+M[t>>16&255]+M[t>>24&255]+M[255&r]+M[r>>8&255]+M[r>>16&255]+M[r>>24&255]+M[255&o]+M[o>>8&255]+M[o>>16&255]+M[o>>24&255]}const R={get(l="normal"){return typeof l!="number"?this[l]||this.normal:l},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function F(l,t){const r=R.get(t.priority);for(let o=0;o<l.length;o++)if(R.get(l[o].priority)<r)return void l.splice(o,0,t);l.push(t)}const V="https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html";
8462class P extends Error{constructor(t,r,o){super(function(c,u){const m=new WeakSet,b=(A,N)=>{if(typeof N=="object"&&N!==null){if(m.has(N))return`[object ${N.constructor.name}]`;m.add(N)}return N},k=u?` ${JSON.stringify(u,b)}`:"",_=K(c);return c+k+_}(t,o)),this.name="CKEditorError",this.context=r,this.data=o}is(t){return t==="CKEditorError"}static rethrowUnexpectedError(t,r){if(t.is&&t.is("CKEditorError"))throw t;const o=new P(t.message,r);throw o.stack=t.stack,o}}function z(l,t){console.warn(...G(l,t))}function W(l,t){console.error(...G(l,t))}function K(l){return` 8463Read more: ${V}#error-${l}`}function G(l,t){const r=K(l);return t?[l,t,r]:[l,r]}const Z="41.4.2",se=new Date(2024,4,17);if(globalThis.CKEDITOR_VERSION)throw new P("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=Z;const ge=Symbol("listeningTo"),Se=Symbol("emitterId"),Ae=Symbol("delegations"),he=ee(Object);function ee(l){return l?class extends l{on(t,r,o){this.listenTo(this,t,r,o)}once(t,r,o){let c=!1;this.listenTo(this,t,(u,...m)=>{c||(c=!0,u.off(),r.call(this,u,...m))},o)}off(t,r){this.stopListening(this,t,r)}listenTo(t,r,o,c={}){let u,m;this[ge]||(this[ge]={});const b=this[ge];je(t)||le(t);const k=je(t);(u=b[k])||(u=b[k]={emitter:t,callbacks:{}}),(m=u.callbacks[r])||(m=u.callbacks[r]=[]),m.push(o),function(_,A,N,T,O){A._addEventListener?A._addEventListener(N,T,O):_._addEventListener.call(A,N,T,O)}(this,t,r,o,c)}stopListening(t,r,o){const c=this[ge];let u=t&&je(t);const m=c&&u?c[u]:void 0,b=m&&r?m.callbacks[r]:void 0;if(!(!c||t&&!m||r&&!b))if(o)pe(this,t,r,o),b.indexOf(o)!==-1&&(b.length===1?delete m.callbacks[r]:pe(this,t,r,o));else if(b){for(;o=b.pop();)pe(this,t,r,o);delete m.callbacks[r]}else if(m){for(r in m.callbacks)this.stopListening(t,r);delete c[u]}else{for(u in c)this.stopListening(c[u].emitter);delete this[ge]}}fire(t,...r){try{const o=t instanceof I?t:new I(this,t),c=o.name;let u=Q(this,c);if(o.path.push(this),u){const b=[o,...r];u=Array.from(u);for(let k=0;k<u.length&&(u[k].callback.apply(this,b),o.off.called&&(delete o.off.called,this._removeEventListener(c,u[k].callback)),!o.stop.called);k++);}const m=this[Ae];if(m){const b=m.get(c),k=m.get("*");b&&te(b,o,r),k&&te(k,o,r)}return o.return}catch(o){P.rethrowUnexpectedError(o,this)}}delegate(...t){return{to:(r,o)=>{this[Ae]||(this[Ae]=new Map),t.forEach(c=>{const u=this[Ae].get(c);u?u.set(r,o):this[Ae].set(c,new Map([[r,o]]))})}}}stopDelegating(t,r){if(this[Ae])if(t)if(r){const o=this[Ae].get(t);o&&o.delete(r)}else this[Ae].delete(t);else this[Ae].clear()}_addEventListener(t,r,o){(function(m,b){const k=ve(m);if(k[b])return;let _=b,A=null;const N=[];for(;_!==""&&!k[_];)k[_]={callbacks:[],childEvents:[]},N.push(k[_]),A&&k[_].childEvents.push(A),A=_,_=_.substr(0,_.lastIndexOf(":"));if(_!==""){for(const T of N)T.callbacks=k[_].callbacks.slice();k[_].childEvents.push(A)}})(this,t);const c=Ce(this,t),u={callback:r,priority:R.get(o.priority)};for(const m of c)F(m,u)}_removeEventListener(t,r){const o=Ce(this,t);for(const c of o)for(let u=0;u<c.length;u++)c[u].callback==r&&(c.splice(u,1),u--)}}:he}function le(l,t){l[Se]||(l[Se]=t||B())}function je(l){return l[Se]}function ve(l){return l._events||Object.defineProperty(l,"_events",{value:{}}),l._events}function Ce(l,t){const r=ve(l)[t];if(!r)return[];let o=[r.callbacks];for(let c=0;c<r.childEvents.length;c++){const u=Ce(l,r.childEvents[c]);o=o.concat(u)}return o}function Q(l,t){let r;return l._events&&(r=l._events[t])&&r.callbacks.length?r.callbacks:t.indexOf(":")>-1?Q(l,t.substr(0,t.lastIndexOf(":"))):null}function te(l,t,r){for(let[o,c]of l){c?typeof c=="function"&&(c=c(t.name)):c=t.name;const u=new I(t.source,c);u.path=[...t.path],o.fire(u,...r)}}function pe(l,t,r,o){t._removeEventListener?t._removeEventListener(r,o):l._removeEventListener.call(t,r,o)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach(l=>{ee[l]=he.prototype[l]});const be=function(l){var t=typeof l;return l!=null&&(t=="object"||t=="function")},Oe=Symbol("observableProperties"),at=Symbol("boundObservables"),re=Symbol("boundProperties"),ye=Symbol("decoratedMethods"),Me=Symbol("decoratedOriginal"),Y=fe(ee());function fe(l){return l?class extends l{set(t,r){if(be(t))return void Object.keys(t).forEach(c=>{this.set(c,t[c])},this);Ne(this);const o=this[Oe];if(t in this&&!o.has(t))throw new P("observable-set-cannot-override",this);Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get:()=>o.get(t),set(c){const u=o.get(t);let m=this.fire(`set:${t}`,t,c,u);m===void 0&&(m=c),u===m&&o.has(t)||(o.set(t,m),this.fire(`change:${t}`,t,m,u))}}),this[t]=r}bind(...t){if(!t.length||!Ve(t))throw new P("observable-bind-wrong-properties",this);if(new Set(t).size!==t.length)throw new P("observable-bind-duplicate-properties",this);Ne(this);const r=this[re];t.forEach(c=>{if(r.has(c))throw new P("observable-bind-rebind",this)});const o=new Map;return t.forEach(c=>{const u={property:c,to:[]};r.set(c,u),o.set(c,u)}),{to:Ue,toMany:it,_observable:this,_bindProperties:t,_to:[],_bindings:o}}unbind(...t){if(!this[Oe])return;const r=this[re],o=this[at];if(t.length){if(!Ve(t))throw new P("observable-unbind-wrong-properties",this);t.forEach(c=>{const u=r.get(c);u&&(u.to.forEach(([m,b])=>{const k=o.get(m),_=k[b];_.delete(u),_.size||delete k[b],Object.keys(k).length||(o.delete(m),this.stopListening(m,"change"))}),r.delete(c))})}else o.forEach((c,u)=>{this.stopListening(u,"change")}),o.clear(),r.clear()}decorate(t){Ne(this);const r=this[t];if(!r)throw new P("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:t});this.on(t,(o,c)=>{o.return=r.apply(this,c)}),this[t]=function(...o){return this.fire(t,o)},this[t][Me]=r,this[ye]||(this[ye]=[]),this[ye].push(t)}stopListening(t,r,o){if(!t&&this[ye]){for(const c of this[ye])this[c]=this[c][Me];delete this[ye]}super.stopListening(t,r,o)}}:Y}function Ne(l){l[Oe]||(Object.defineProperty(l,Oe,{value:new Map}),Object.defineProperty(l,at,{value:new Map}),Object.defineProperty(l,re,{value:new Map}))}function Ue(...l){const t=function(...u){if(!u.length)throw new P("observable-bind-to-parse-error",null);const m={to:[]};let b;return typeof u[u.length-1]=="function"&&(m.callback=u.pop()),u.forEach(k=>{if(typeof k=="string")b.properties.push(k);else{if(typeof k!="object")throw new P("observable-bind-to-parse-error",null);b={observable:k,properties:[]},m.to.push(b)}}),m}(...l),r=Array.from(this._bindings.keys()),o=r.length;if(!t.callback&&t.to.length>1)throw new P("observable-bind-to-no-callback",this);if(o>1&&t.callback)throw new P("observable-bind-to-extra-callback",this);var c;t.to.forEach(u=>{if(u.properties.length&&u.properties.length!==o)throw new P("observable-bind-to-properties-length",this);u.properties.length||(u.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(r[0]).callback=t.callback),c=this._observable,this._to.forEach(u=>{const m=c[at];let b;m.get(u.observable)||c.listenTo(u.observable,"change",(k,_)=>{b=m.get(u.observable)[_],b&&b.forEach(A=>{mt(c,A.property)})})}),function(u){let m;
8463u._bindings.forEach((b,k)=>{u._to.forEach(_=>{m=_.properties[b.callback?0:u._bindProperties.indexOf(k)],b.to.push([_.observable,m]),function(A,N,T,O){const L=A[at],$=L.get(T),U=$||{};U[O]||(U[O]=new Set),U[O].add(N),$||L.set(T,U)}(u._observable,b,_.observable,m)})})}(this),this._bindProperties.forEach(u=>{mt(this._observable,u)})}function it(l,t,r){if(this._bindings.size>1)throw new P("observable-bind-to-many-not-one-binding",this);this.to(...function(o,c){const u=o.map(m=>[m,c]);return Array.prototype.concat.apply([],u)}(l,t),r)}function Ve(l){return l.every(t=>typeof t=="string")}function mt(l,t){const r=l[re].get(t);let o;r.callback?o=r.callback.apply(l,r.to.map(c=>c[0][c[1]])):(o=r.to[0],o=o[0][o[1]]),Object.prototype.hasOwnProperty.call(l,t)?l[t]=o:l.set(t,o)}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach(l=>{fe[l]=Y.prototype[l]});class ut{constructor(){this._replacedElements=[]}replace(t,r){this._replacedElements.push({element:t,newElement:r}),t.style.display="none",r&&t.parentNode.insertBefore(r,t.nextSibling)}restore(){this._replacedElements.forEach(({element:t,newElement:r})=>{t.style.display="",r&&r.remove()}),this._replacedElements=[]}}function Fe(l){let t=0;for(const r of l)t++;return t}function ue(l,t){const r=Math.min(l.length,t.length);for(let o=0;o<r;o++)if(l[o]!=t[o])return o;return l.length==t.length?"same":l.length<t.length?"prefix":"extension"}function Re(l){return!(!l||!l[Symbol.iterator])}const ke=typeof op=="object"&&op&&op.Object===Object&&op;var $e=typeof self=="object"&&self&&self.Object===Object&&self;const lt=ke||$e||Function("return this")(),Ct=lt.Symbol;var we=Object.prototype,Xe=we.hasOwnProperty,X=we.toString,We=Ct?Ct.toStringTag:void 0;const et=function(l){var t=Xe.call(l,We),r=l[We];try{l[We]=void 0;var o=!0}catch{}var c=X.call(l);return o&&(t?l[We]=r:delete l[We]),c};var Je=Object.prototype.toString;const Ke=function(l){return Je.call(l)};var ce=Ct?Ct.toStringTag:void 0;const Qe=function(l){return l==null?l===void 0?"[object Undefined]":"[object Null]":ce&&ce in Object(l)?et(l):Ke(l)},Ze=Array.isArray,Nt=function(l){return l!=null&&typeof l=="object"},dn=function(l){return typeof l=="string"||!Ze(l)&&Nt(l)&&Qe(l)=="[object String]"};function Ut(l,t,r={},o=[]){const c=r&&r.xmlns,u=c?l.createElementNS(c,t):l.createElement(t);for(const m in r)u.setAttribute(m,r[m]);!dn(o)&&Re(o)||(o=[o]);for(let m of o)dn(m)&&(m=l.createTextNode(m)),u.appendChild(m);return u}const Yr=function(l,t){return function(r){return l(t(r))}},fi=Yr(Object.getPrototypeOf,Object);var Br=Function.prototype,Lr=Object.prototype,ot=Br.toString,Ye=Lr.hasOwnProperty,rt=ot.call(Object);const _t=function(l){if(!Nt(l)||Qe(l)!="[object Object]")return!1;var t=fi(l);if(t===null)return!0;var r=Ye.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ot.call(r)==rt},An=function(){this.__data__=[],this.size=0},Wt=function(l,t){return l===t||l!=l&&t!=t},Be=function(l,t){for(var r=l.length;r--;)if(Wt(l[r][0],t))return r;return-1};var tt=Array.prototype.splice;const st=function(l){var t=this.__data__,r=Be(t,l);return!(r<0)&&(r==t.length-1?t.pop():tt.call(t,r,1),--this.size,!0)},Bt=function(l){var t=this.__data__,r=Be(t,l);return r<0?void 0:t[r][1]},oe=function(l){return Be(this.__data__,l)>-1},Te=function(l,t){var r=this.__data__,o=Be(r,l);return o<0?(++this.size,r.push([l,t])):r[o][1]=t,this};function pt(l){var t=-1,r=l==null?0:l.length;for(this.clear();++t<r;){var o=l[t];this.set(o[0],o[1])}}pt.prototype.clear=An,pt.prototype.delete=st,pt.prototype.get=Bt,pt.prototype.has=oe,pt.prototype.set=Te;const Ht=pt,Io=function(){this.__data__=new Ht,this.size=0},pi=function(l){var t=this.__data__,r=t.delete(l);return this.size=t.size,r},Zb=function(l){return this.__data__.get(l)},Ga=function(l){return this.__data__.has(l)},ss=function(l){if(!be(l))return!1;var t=Qe(l);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"},eu=lt["__core-js_shared__"];var gn=function(){var l=/[^.]+$/.exec(eu&&eu.keys&&eu.keys.IE_PROTO||"");
8463return l?"Symbol(src)_1."+l:""}();const ta=function(l){return!!gn&&gn in l};var Jb=Function.prototype.toString;const Mo=function(l){if(l!=null){try{return Jb.call(l)}catch{}try{return l+""}catch{}}return""};var tu=/^\[object .+?Constructor\]$/,Lm=Function.prototype,Rm=Object.prototype,Xb=Lm.toString,ek=Rm.hasOwnProperty,tk=RegExp("^"+Xb.call(ek).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const nk=function(l){return!(!be(l)||ta(l))&&(ss(l)?tk:tu).test(Mo(l))},Po=function(l,t){return l==null?void 0:l[t]},Oo=function(l,t){var r=Po(l,t);return nk(r)?r:void 0},Bo=Oo(lt,"Map"),gi=Oo(Object,"create"),rk=function(){this.__data__=gi?gi(null):{},this.size=0},dc=function(l){var t=this.has(l)&&delete this.__data__[l];return this.size-=t?1:0,t};var zm=Object.prototype.hasOwnProperty;const ik=function(l){var t=this.__data__;if(gi){var r=t[l];return r==="__lodash_hash_undefined__"?void 0:r}return zm.call(t,l)?t[l]:void 0};var Fm=Object.prototype.hasOwnProperty;const $m=function(l){var t=this.__data__;return gi?t[l]!==void 0:Fm.call(t,l)},uc=function(l,t){var r=this.__data__;return this.size+=this.has(l)?0:1,r[l]=gi&&t===void 0?"__lodash_hash_undefined__":t,this};function Lo(l){var t=-1,r=l==null?0:l.length;for(this.clear();++t<r;){var o=l[t];this.set(o[0],o[1])}}Lo.prototype.clear=rk,Lo.prototype.delete=dc,Lo.prototype.get=ik,Lo.prototype.has=$m,Lo.prototype.set=uc;const qa=Lo,na=function(){this.size=0,this.__data__={hash:new qa,map:new(Bo||Ht),string:new qa}},Ka=function(l){var t=typeof l;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?l!=="__proto__":l===null},Rr=function(l,t){var r=l.__data__;return Ka(t)?r[typeof t=="string"?"string":"hash"]:r.map},ok=function(l){var t=Rr(this,l).delete(l);return this.size-=t?1:0,t},hc=function(l){return Rr(this,l).get(l)},sk=function(l){return Rr(this,l).has(l)},Vm=function(l,t){var r=Rr(this,l),o=r.size;return r.set(l,t),this.size+=r.size==o?0:1,this};function as(l){var t=-1,r=l==null?0:l.length;for(this.clear();++t<r;){var o=l[t];this.set(o[0],o[1])}}as.prototype.clear=na,as.prototype.delete=ok,as.prototype.get=hc,as.prototype.has=sk,as.prototype.set=Vm;const Ya=as,Um=function(l,t){var r=this.__data__;if(r instanceof Ht){var o=r.__data__;if(!Bo||o.length<199)return o.push([l,t]),this.size=++r.size,this;r=this.__data__=new Ya(o)}return r.set(l,t),this.size=r.size,this};function ra(l){var t=this.__data__=new Ht(l);this.size=t.size}ra.prototype.clear=Io,ra.prototype.delete=pi,ra.prototype.get=Zb,ra.prototype.has=Ga,ra.prototype.set=Um;const ls=ra,ak=function(l,t){for(var r=-1,o=l==null?0:l.length;++r<o&&t(l[r],r,l)!==!1;);return l},mc=function(){try{var l=Oo(Object,"defineProperty");return l({},"",{}),l}catch{}}(),Qa=function(l,t,r){t=="__proto__"&&mc?mc(l,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):l[t]=r};var fc=Object.prototype.hasOwnProperty;const Za=function(l,t,r){var o=l[t];fc.call(l,t)&&Wt(o,r)&&(r!==void 0||t in l)||Qa(l,t,r)},Le=function(l,t,r,o){var c=!r;r||(r={});for(var u=-1,m=t.length;++u<m;){var b=t[u],k=void 0;k===void 0&&(k=l[b]),c?Qa(r,b,k):Za(r,b,k)}return r},q=function(l,t){for(var r=-1,o=Array(l);++r<l;)o[r]=t(r);return o},ie=function(l){return Nt(l)&&Qe(l)=="[object Arguments]"};var Ie=Object.prototype,nt=Ie.hasOwnProperty,ft=Ie.propertyIsEnumerable;const xt=ie(function(){return arguments}())?ie:function(l){return Nt(l)&&nt.call(l,"callee")&&!ft.call(l,"callee")},Qt=function(){return!1};var an=n&&!n.nodeType&&n,fr=an&&!0&&e&&!e.nodeType&&e,pr=fr&&fr.exports===an?lt.Buffer:void 0;const cs=(pr?pr.isBuffer:void 0)||Qt;var gr=/^(?:0|[1-9]\d*)$/;const Ja=function(l,t){var r=typeof l;return!!(t=t??9007199254740991)&&(r=="number"||r!="symbol"&&gr.test(l))&&l>-1&&l%1==0&&l<t},Wm=function(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=9007199254740991};var un={};un["[object Float32Array]"]=un["[object Float64Array]"]=un["[object Int8Array]"]=un["[object Int16Array]"]=un["[object Int32Array]"]=un["[object Uint8Array]"]=un["[object Uint8ClampedArray]"]=un["[object Uint16Array]"]=un["[object Uint32Array]"]=!0,un["[object Arguments]"]=un["[object Array]"]=un["[object ArrayBuffer]"]=un["[object Boolean]"]=un["[object DataView]"]=un["[object Date]"]=un["[object Error]"]=un["[object Function]"]=un["[object Map]"]=un["[object Number]"]=un["[object Object]"]=un["[object RegExp]"]=un["[object Set]"]=un["[object String]"]=un["[object WeakMap]"]=!1;
8463const ZV=function(l){return Nt(l)&&Wm(l.length)&&!!un[Qe(l)]},lk=function(l){return function(t){return l(t)}};var RC=n&&!n.nodeType&&n,nu=RC&&!0&&e&&!e.nodeType&&e,ck=nu&&nu.exports===RC&&ke.process;const pc=function(){try{var l=nu&&nu.require&&nu.require("util").types;return l||ck&&ck.binding&&ck.binding("util")}catch{}}();var zC=pc&&pc.isTypedArray;const dk=zC?lk(zC):ZV;var JV=Object.prototype.hasOwnProperty;const FC=function(l,t){var r=Ze(l),o=!r&&xt(l),c=!r&&!o&&cs(l),u=!r&&!o&&!c&&dk(l),m=r||o||c||u,b=m?q(l.length,String):[],k=b.length;for(var _ in l)!t&&!JV.call(l,_)||m&&(_=="length"||c&&(_=="offset"||_=="parent")||u&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||Ja(_,k))||b.push(_);return b};var XV=Object.prototype;const uk=function(l){var t=l&&l.constructor;return l===(typeof t=="function"&&t.prototype||XV)},eU=Yr(Object.keys,Object);var tU=Object.prototype.hasOwnProperty;const nU=function(l){if(!uk(l))return eU(l);var t=[];for(var r in Object(l))tU.call(l,r)&&r!="constructor"&&t.push(r);return t},Hm=function(l){return l!=null&&Wm(l.length)&&!ss(l)},ru=function(l){return Hm(l)?FC(l):nU(l)},rU=function(l,t){return l&&Le(t,ru(t),l)},iU=function(l){var t=[];if(l!=null)for(var r in Object(l))t.push(r);return t};var oU=Object.prototype.hasOwnProperty;const sU=function(l){if(!be(l))return iU(l);var t=uk(l),r=[];for(var o in l)(o!="constructor"||!t&&oU.call(l,o))&&r.push(o);return r},gc=function(l){return Hm(l)?FC(l,!0):sU(l)},aU=function(l,t){return l&&Le(t,gc(t),l)};var $C=n&&!n.nodeType&&n,VC=$C&&!0&&e&&!e.nodeType&&e,UC=VC&&VC.exports===$C?lt.Buffer:void 0,WC=UC?UC.allocUnsafe:void 0;const HC=function(l,t){if(t)return l.slice();var r=l.length,o=WC?WC(r):new l.constructor(r);return l.copy(o),o},GC=function(l,t){var r=-1,o=l.length;for(t||(t=Array(o));++r<o;)t[r]=l[r];return t},lU=function(l,t){for(var r=-1,o=l==null?0:l.length,c=0,u=[];++r<o;){var m=l[r];t(m,r,l)&&(u[c++]=m)}return u},qC=function(){return[]};var cU=Object.prototype.propertyIsEnumerable,KC=Object.getOwnPropertySymbols;const hk=KC?function(l){return l==null?[]:(l=Object(l),lU(KC(l),function(t){return cU.call(l,t)}))}:qC,dU=function(l,t){return Le(l,hk(l),t)},YC=function(l,t){for(var r=-1,o=t.length,c=l.length;++r<o;)l[c+r]=t[r];return l},QC=Object.getOwnPropertySymbols?function(l){for(var t=[];l;)YC(t,hk(l)),l=fi(l);return t}:qC,uU=function(l,t){return Le(l,QC(l),t)},ZC=function(l,t,r){var o=t(l);return Ze(l)?o:YC(o,r(l))},mk=function(l){return ZC(l,ru,hk)},hU=function(l){return ZC(l,gc,QC)},fk=Oo(lt,"DataView"),pk=Oo(lt,"Promise"),gk=Oo(lt,"Set"),bk=Oo(lt,"WeakMap");var JC="[object Map]",XC="[object Promise]",e2="[object Set]",t2="[object WeakMap]",n2="[object DataView]",mU=Mo(fk),fU=Mo(Bo),pU=Mo(pk),gU=Mo(gk),bU=Mo(bk),Xa=Qe;(fk&&Xa(new fk(new ArrayBuffer(1)))!=n2||Bo&&Xa(new Bo)!=JC||pk&&Xa(pk.resolve())!=XC||gk&&Xa(new gk)!=e2||bk&&Xa(new bk)!=t2)&&(Xa=function(l){var t=Qe(l),r=t=="[object Object]"?l.constructor:void 0,o=r?Mo(r):"";if(o)switch(o){case mU:return n2;case fU:return JC;case pU:return XC;case gU:return e2;case bU:return t2}return t});const iu=Xa;var kU=Object.prototype.hasOwnProperty;const yU=function(l){var t=l.length,r=new l.constructor(t);return t&&typeof l[0]=="string"&&kU.call(l,"index")&&(r.index=l.index,r.input=l.input),r},Gm=lt.Uint8Array,kk=function(l){var t=new l.constructor(l.byteLength);return new Gm(t).set(new Gm(l)),t},xU=function(l,t){var r=t?kk(l.buffer):l.buffer;return new l.constructor(r,l.byteOffset,l.byteLength)};var vU=/\w*$/;const wU=function(l){var t=new l.constructor(l.source,vU.exec(l));return t.lastIndex=l.lastIndex,t};var r2=Ct?Ct.prototype:void 0,i2=r2?r2.valueOf:void 0;const _U=function(l){return i2?Object(i2.call(l)):{}},o2=function(l,t){var r=t?kk(l.buffer):l.buffer;return new l.constructor(r,l.byteOffset,l.length)},AU=function(l,t,r){var o=l.constructor;switch(t){case"[object ArrayBuffer]":return kk(l);case"[object Boolean]":case"[object Date]":return new o(+l);case"[object DataView]":return xU(l,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o2(l,r);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(l);case"[object RegExp]":return wU(l);case"[object Symbol]":return _U(l)}};var s2=Object.create;const CU=function(){function l(){}return function(t){if(!be(t))return{};if(s2)return s2(t);l.prototype=t;var r=new l;return l.prototype=void 0,r}}(),a2=function(l){return typeof l.constructor!="function"||uk(l)?{}:CU(fi(l))},jU=function(l){return Nt(l)&&iu(l)=="[object Map]"};var l2=pc&&pc.isMap;const NU=l2?lk(l2):jU,EU=function(l){return Nt(l)&&iu(l)=="[object Set]"};var c2=pc&&pc.isSet;const SU=c2?lk(c2):EU;var d2="[object Arguments]",u2="[object Function]",h2="[object Object]",ln={};ln[d2]=ln["[object Array]"]=ln["[object ArrayBuffer]"]=ln["[object DataView]"]=ln["[object Boolean]"]=ln["[object Date]"]=ln["[object Float32Array]"]=ln["[object Float64Array
8463]"]=ln["[object Int8Array]"]=ln["[object Int16Array]"]=ln["[object Int32Array]"]=ln["[object Map]"]=ln["[object Number]"]=ln[h2]=ln["[object RegExp]"]=ln["[object Set]"]=ln["[object String]"]=ln["[object Symbol]"]=ln["[object Uint8Array]"]=ln["[object Uint8ClampedArray]"]=ln["[object Uint16Array]"]=ln["[object Uint32Array]"]=!0,ln["[object Error]"]=ln[u2]=ln["[object WeakMap]"]=!1;const yk=function l(t,r,o,c,u,m){var b,k=1&r,_=2&r,A=4&r;if(o&&(b=u?o(t,c,u,m):o(t)),b!==void 0)return b;if(!be(t))return t;var N=Ze(t);if(N){if(b=yU(t),!k)return GC(t,b)}else{var T=iu(t),O=T==u2||T=="[object GeneratorFunction]";if(cs(t))return HC(t,k);if(T==h2||T==d2||O&&!u){if(b=_||O?{}:a2(t),!k)return _?uU(t,aU(b,t)):dU(t,rU(b,t))}else{if(!ln[T])return u?t:{};b=AU(t,T,k)}}m||(m=new ls);var L=m.get(t);if(L)return L;m.set(t,b),SU(t)?t.forEach(function(U){b.add(l(U,r,o,U,t,m))}):NU(t)&&t.forEach(function(U,H){b.set(H,l(U,r,o,H,t,m))});var $=N?void 0:(A?_?hU:mk:_?gc:ru)(t);return ak($||t,function(U,H){$&&(U=t[H=U]),Za(b,H,l(U,r,o,H,t,m))}),b},xk=function(l,t){return yk(l,5,t=typeof t=="function"?t:void 0)},el=function(l){return Nt(l)&&l.nodeType===1&&!_t(l)};class m2{constructor(t,r){this._config={},r&&this.define(f2(r)),t&&this._setObjectToTarget(this._config,t)}set(t,r){this._setToTarget(this._config,t,r)}define(t,r){this._setToTarget(this._config,t,r,!0)}get(t){return this._getFromSource(this._config,t)}*names(){for(const t of Object.keys(this._config))yield t}_setToTarget(t,r,o,c=!1){if(_t(r))return void this._setObjectToTarget(t,r,c);const u=r.split(".");r=u.pop();for(const m of u)_t(t[m])||(t[m]={}),t=t[m];if(_t(o))return _t(t[r])||(t[r]={}),t=t[r],void this._setObjectToTarget(t,o,c);c&&t[r]!==void 0||(t[r]=o)}_getFromSource(t,r){const o=r.split(".");r=o.pop();for(const c of o){if(!_t(t[c])){t=null;break}t=t[c]}return t?f2(t[r]):void 0}_setObjectToTarget(t,r,o){Object.keys(r).forEach(c=>{this._setToTarget(t,c,r[c],o)})}}function f2(l){return xk(l,DU)}function DU(l){return el(l)||typeof l=="function"?l:void 0}function ia(l){if(l){if(l.defaultView)return l instanceof l.defaultView.Document;if(l.ownerDocument&&l.ownerDocument.defaultView)return l instanceof l.ownerDocument.defaultView.Node}return!1}function qm(l){const t=Object.prototype.toString.apply(l);return t=="[object Window]"||t=="[object global]"}const p2=Li(ee());function Li(l){return l?class extends l{listenTo(t,r,o,c={}){if(ia(t)||qm(t)){const u={capture:!!c.useCapture,passive:!!c.usePassive},m=this._getProxyEmitter(t,u)||new TU(t,u);this.listenTo(m,r,o,c)}else super.listenTo(t,r,o,c)}stopListening(t,r,o){if(ia(t)||qm(t)){const c=this._getAllProxyEmitters(t);for(const u of c)this.stopListening(u,r,o)}else super.stopListening(t,r,o)}_getProxyEmitter(t,r){return function(o,c){const u=o[ge];return u&&u[c]?u[c].emitter:null}(this,g2(t,r))}_getAllProxyEmitters(t){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map(r=>this._getProxyEmitter(t,r)).filter(r=>!!r)}}:p2}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach(l=>{Li[l]=p2.prototype[l]});class TU extends ee(){constructor(t,r){super(),le(this,g2(t,r)),this._domNode=t,this._options=r}attach(t){if(this._domListeners&&this._domListeners[t])return;const r=this._createDomListener(t);this._domNode.addEventListener(t,r,this._options),this._domListeners||(this._domListeners={}),this._domListeners[t]=r}detach(t){let r;!this._domListeners[t]||(r=this._events[t])&&r.callbacks.length||this._domListeners[t].removeListener()}_addEventListener(t,r,o){this.attach(t),ee().prototype._addEventListener.call(this,t,r,o)}_removeEventListener(t,r){ee().prototype._removeEventListener.call(this,t,r),this.detach(t)}_createDomListener(t){const r=o=>{this.fire(t,o)};return r.removeListener=()=>{this._domNode.removeEventListener(t,r,this._options),delete this._domListeners[t]},r}}function g2(l,t){let r=function(o){return o["data-ck-expando"]||(o["data-ck-expando"]=B())}(l);for(const o of Object.keys(t).sort())t[o]&&(r+="-"+o);return r}function b2(l){const t=l.ownerDocument.defaultView.getComputedStyle(l);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function Sn(l){return Object.prototype.toString.call(l)=="[object Text]"}function Km(l){return Object.prototype.toString.apply(l)=="[object Range]"}function k2(l){return l&&l.parentNode?l.offsetParent===g.document.body?null:l.offsetParent:null}const y2=["top","right","bottom","left","width","height"];class Tt{constructor(t){const r=Km(t);if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),vk(t)||r)if(r){const o=Tt.getDomRangeRects(t);
vendor: 6,637 bytes, line 8463
8463Ym(this,Tt.getBoundingRect(o))}else Ym(this,t.getBoundingClientRect());else if(qm(t)){const{innerWidth:o,innerHeight:c}=t;Ym(this,{top:0,right:o,bottom:c,left:0,width:o,height:c})}else Ym(this,t)}clone(){return new Tt(this)}moveTo(t,r){return this.top=r,this.right=t+this.width,this.bottom=r+this.height,this.left=t,this}moveBy(t,r){return this.top+=r,this.right+=t,this.left+=t,this.bottom+=r,this}getIntersection(t){const r={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left),width:0,height:0};if(r.width=r.right-r.left,r.height=r.bottom-r.top,r.width<0||r.height<0)return null;{const o=new Tt(r);return o._source=this._source,o}}getIntersectionArea(t){const r=this.getIntersection(t);return r?r.getArea():0}getArea(){return this.width*this.height}getVisible(){const t=this._source;let r=this.clone();if(x2(t))return r;let o,c=t,u=t.parentNode||t.commonAncestorContainer;for(;u&&!x2(u);){const b=((m=u)instanceof HTMLElement?m.ownerDocument.defaultView.getComputedStyle(m).overflow:"visible")==="visible";c instanceof HTMLElement&&v2(c)==="absolute"&&(o=c);const k=v2(u);if(b||o&&(k==="relative"&&b||k!=="relative")){c=u,u=u.parentNode;continue}const _=new Tt(u),A=r.getIntersection(_);if(!A)return null;A.getArea()<r.getArea()&&(r=A),c=u,u=u.parentNode}var m;return r}isEqual(t){for(const r of y2)if(this[r]!==t[r])return!1;return!0}contains(t){const r=this.getIntersection(t);return!(!r||!r.isEqual(t))}toAbsoluteRect(){const{scrollX:t,scrollY:r}=g.window,o=this.clone().moveBy(t,r);if(vk(o._source)){const c=k2(o._source);c&&function(u,m){const b=new Tt(m),k=b2(m);let _=0,A=0;_-=b.left,A-=b.top,_+=m.scrollLeft,A+=m.scrollTop,_-=k.left,A-=k.top,u.moveBy(_,A)}(o,c)}return o}excludeScrollbarsAndBorders(){const t=this._source;let r,o,c;if(qm(t))r=t.innerWidth-t.document.documentElement.clientWidth,o=t.innerHeight-t.document.documentElement.clientHeight,c=t.getComputedStyle(t.document.documentElement).direction;else{const u=b2(t);r=t.offsetWidth-t.clientWidth-u.left-u.right,o=t.offsetHeight-t.clientHeight-u.top-u.bottom,c=t.ownerDocument.defaultView.getComputedStyle(t).direction,this.left+=u.left,this.top+=u.top,this.right-=u.right,this.bottom-=u.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=r,c==="ltr"?this.right-=r:this.left+=r,this.height-=o,this.bottom-=o,this}static getDomRangeRects(t){const r=[],o=Array.from(t.getClientRects());if(o.length)for(const c of o)r.push(new Tt(c));else{let c=t.startContainer;Sn(c)&&(c=c.parentNode);const u=new Tt(c.getBoundingClientRect());u.right=u.left,u.width=0,r.push(u)}return r}static getBoundingRect(t){const r={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let o=0;for(const c of t)o++,r.left=Math.min(r.left,c.left),r.top=Math.min(r.top,c.top),r.right=Math.max(r.right,c.right),r.bottom=Math.max(r.bottom,c.bottom);return o==0?null:(r.width=r.right-r.left,r.height=r.bottom-r.top,new Tt(r))}}function Ym(l,t){for(const r of y2)l[r]=t[r]}function x2(l){return!!vk(l)&&l===l.ownerDocument.body}function vk(l){return l!==null&&typeof l=="object"&&l.nodeType===1&&typeof l.getBoundingClientRect=="function"}function v2(l){return l instanceof HTMLElement?l.ownerDocument.defaultView.getComputedStyle(l).position:"static"}const Dn=class{constructor(l,t){Dn._observerInstance||Dn._createObserver(),this._element=l,this._callback=t,Dn._addElementCallback(l,t),Dn._observerInstance.observe(l)}get element(){return this._element}destroy(){Dn._deleteElementCallback(this._element,this._callback)}static _addElementCallback(l,t){Dn._elementCallbacks||(Dn._elementCallbacks=new Map);let r=Dn._elementCallbacks.get(l);r||(r=new Set,Dn._elementCallbacks.set(l,r)),r.add(t)}static _deleteElementCallback(l,t){const r=Dn._getElementCallbacks(l);r&&(r.delete(t),r.size||(Dn._elementCallbacks.delete(l),Dn._observerInstance.unobserve(l))),Dn._elementCallbacks&&!Dn._elementCallbacks.size&&(Dn._observerInstance=null,Dn._elementCallbacks=null)}static _getElementCallbacks(l){return Dn._elementCallbacks?Dn._elementCallbacks.get(l):null}static _createObserver(){Dn._observerInstance=new g.window.ResizeObserver(l=>{for(const t of l){const r=Dn._getElementCallbacks(t.target);if(r)for(const o of r)o(t)}})}};let ou=Dn;function w2(l,t){l instanceof HTMLTextAreaElement&&(l.value=t),l.innerHTML=t}function bc(l){return t=>t+l}function su(l){let t=0;for(;l.previousSibling;)l=l.previousSibling,t++;return t}function _2(l,t,r){l.insertBefore(r,l.childNodes[t]||null)}function au(l){return l&&l.nodeType===Node.COMMENT_NODE}function tl(l){return!!(l&&l.getClientRects&&l.getClientRects().length)}ou._observerInstance=null,ou._elementCallbacks=null;var A2=Math.pow;function Qm({element:l,target:t,positions:r,limiter:o,fitInViewport:c,viewportOffsetConfig:u}){ss(t)&&(t=t()),ss(o)&&(o=o());const m=k2(l),b=function(T){T=Object.assign({top:0,bottom:0,left:0,right:0},T);const O=new Tt(g.window);return O.top+=T.top,O.height-=T.top,O.bottom-=T.bottom,O.height-=T.bottom,O}(u),k=new Tt(l),_=C2(t,b);let A;if(!_||!b.getIntersection(_))return null;const N={targetRect:_,elementRect:k,positionedElementAncestor:m,viewportRect:b};if(o||c){if(o){const T=C2(o,b);T&&(N.limiterRect=T)}A=function(T,O){const{elementRect:L}=O,$=L.getArea(),U=T.map(ae=>new j2(ae,O)).filter(ae=>!!ae.name);let H=0,J=null;for(const ae of U){const{limiterIntersectionArea:_e,viewportIntersectionArea:qe}=ae;if(_e===$)return ae;const vt=A2(qe,2)+A2(_e,2);vt>H&&(H=vt,J=ae)}return J}(r,N)}else A=new j2(r[0],N);return A}function C2(l,t){const r=new Tt(l).getVisible();return r?r.getIntersection(t):null}class j2{constructor(t,r){const o=t(r.targetRect,r.elementRect,r.viewportRect,r.limiterRect);if(!o)return;const{left:c,top:u,name:m,config:b}=o;this.name=m,this.config=b,this._positioningFunctionCoordinates={left:c,top:u},this._options=r}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const t=this._options.limiterRect;return t?t.getIntersectionArea(this._rect):0}get viewportIntersectionArea(){return this._options.viewportRect.getIntersectionArea(this._rect)}get _rect(){return 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._rect.toAbsoluteRect()),this._cachedAbsoluteRect}}function N2(l){const t=l.parentNode;t&&t.removeChild(l)}
8463function IU({window:l,rect:t,alignToTop:r,forceScroll:o,viewportOffset:c}){const u=t.clone().moveBy(0,c.bottom),m=t.clone().moveBy(0,-c.top),b=new Tt(l).excludeScrollbarsAndBorders(),k=r&&o,_=[m,u].every(L=>b.contains(L));let{scrollX:A,scrollY:N}=l;const T=A,O=N;k?N-=b.top-t.top+c.top:_||(S2(m,b)?N-=b.top-t.top+c.top:E2(u,b)&&(N+=r?t.top-b.top-c.top:t.bottom-b.bottom+c.bottom)),_||(D2(t,b)?A-=b.left-t.left+c.left:T2(t,b)&&(A+=t.right-b.right+c.right)),A==T&&N===O||l.scrollTo(A,N)}function MU({parent:l,getRect:t,alignToTop:r,forceScroll:o,ancestorOffset:c=0,limiterElement:u}){const m=wk(l),b=r&&o;let k,_,A;const N=u||m.document.body;for(;l!=N;)_=t(),k=new Tt(l).excludeScrollbarsAndBorders(),A=k.contains(_),b?l.scrollTop-=k.top-_.top+c:A||(S2(_,k)?l.scrollTop-=k.top-_.top+c:E2(_,k)&&(l.scrollTop+=r?_.top-k.top-c:_.bottom-k.bottom+c)),A||(D2(_,k)?l.scrollLeft-=k.left-_.left+c:T2(_,k)&&(l.scrollLeft+=_.right-k.right+c)),l=l.parentNode}function E2(l,t){return l.bottom>t.bottom}function S2(l,t){return l.top<t.top}function D2(l,t){return l.left<t.left}function T2(l,t){return l.right>t.right}function wk(l){return Km(l)?l.startContainer.ownerDocument.defaultView:l.ownerDocument.defaultView}function PU(l){if(Km(l)){let t=l.commonAncestorContainer;return Sn(t)&&(t=t.parentNode),t}return l.parentNode}function I2(l,t){const r=wk(l),o=new Tt(l);if(r===t)return o;{let c=r;for(;c!=t;){const u=c.frameElement,m=new Tt(u).excludeScrollbarsAndBorders();o.moveBy(m.left,m.top),c=c.parent}}return o}const OU={ctrl:"â",cmd:"â",alt:"â¥",shift:"â§"},BU={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},M2={37:"â",38:"â",39:"â",40:"â",9:"â¥",33:"Page Up",34:"Page Down"},Mt=function(){const l={pageup:33,pagedown:34,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 t=65;t<=90;t++)l[String.fromCharCode(t).toLowerCase()]=t;for(let t=48;t<=57;t++)l[t-48]=t;for(let t=112;t<=123;t++)l["f"+(t-111)]=t;return Object.assign(l,{"'":222,",":108,"-":109,".":110,"/":111,";":186,"=":187,"[":219,"\\":220,"]":221,"`":223}),l}(),LU=Object.fromEntries(Object.entries(Mt).map(([l,t])=>{let r;return r=t in M2?M2[t]:l.charAt(0).toUpperCase()+l.slice(1),[t,r]}));function kc(l){let t;if(typeof l=="string"){if(t=Mt[l.toLowerCase()],!t)throw new P("keyboard-unknown-key",null,{key:l})}else t=l.keyCode+(l.altKey?Mt.alt:0)+(l.ctrlKey?Mt.ctrl:0)+(l.shiftKey?Mt.shift:0)+(l.metaKey?Mt.cmd:0);return t}function lu(l){return typeof l=="string"&&(l=function(t){return t.split("+").map(r=>r.trim())}(l)),l.map(t=>typeof t=="string"?function(r){if(r.endsWith("!"))return kc(r.slice(0,-1));const o=kc(r);return(y.isMac||y.isiOS)&&o==Mt.ctrl?Mt.cmd:o}(t):t).reduce((t,r)=>r+t,0)}function Zm(l){let t=lu(l);return Object.entries(y.isMac||y.isiOS?OU:BU).reduce((r,[o,c])=>(t&Mt[o]&&(t&=~Mt[o],r+=c),r),"")+(t?LU[t]:"")}function _k(l,t){const r=t==="ltr";switch(l){case Mt.arrowleft:return r?"left":"right";case Mt.arrowright:return r?"right":"left";case Mt.arrowup:return"up";case Mt.arrowdown:return"down"}}function tn(l){return Array.isArray(l)?l:[l]}const Ak=function(l,t,r){(r!==void 0&&!Wt(l[t],r)||r===void 0&&!(t in l))&&Qa(l,t,r)},P2=function(l){return function(t,r,o){for(var c=-1,u=Object(t),m=o(t),b=m.length;b--;){var k=m[++c];if(r(u[k],k,u)===!1)break}return t}}(),RU=function(l){return Nt(l)&&Hm(l)},O2=function(l,t){if((t!=="constructor"||typeof l[t]!="function")&&t!="__proto__")return l[t]},zU=function(l){return Le(l,gc(l))},FU=function(l,t,r,o,c,u,m){var b=O2(l,r),k=O2(t,r),_=m.get(k);if(_)Ak(l,r,_);else{var A=void 0,N=A===void 0;if(N){var T=Ze(k),O=!T&&cs(k),L=!T&&!O&&dk(k);A=k,T||O||L?Ze(b)?A=b:RU(b)?A=GC(b):O?(N=!1,A=HC(k,!0)):L?(N=!1,A=o2(k,!0)):A=[]:_t(k)||xt(k)?(A=b,xt(b)?A=zU(b):be(b)&&!ss(b)||(A=a2(k))):N=!1}N&&(m.set(k,A),c(A,k,o,u,m),m.delete(k)),Ak(l,r,A)}},$U=function l(t,r,o,c,u){t!==r&&P2(r,function(m,b){if(u||(u=new ls),be(m))FU(t,r,b,o,l,c,u);else{var k=void 0;k===void 0&&(k=m),Ak(t,b,k)}},gc)},oa=function(l){return l},VU=function(l,t,r){switch(r.length){case 0:return l.call(t);case 1:return l.call(t,r[0]);case 2:return l.call(t,r[0],r[1]);case 3:return l.call(t,r[0],r[1],r[2])}return l.apply(t,r)};var B2=Math.max;const UU=function(l,t,r){return t=B2(t===void 0?l.length-1:t,0),function(){for(var o=arguments,c=-1,u=B2(o.length-t,0),m=Array(u);++c<u;)m[c]=o[t+c];c=-1;for(var b=Array(t+1);++c<t;)b[c]=o[c];return b[t]=r(m),VU(l,this,b)}},WU=function(l){return function(){return l}},HU=mc?function(l,t){return mc(l,"toString",{configurable:!0,enumerable:!1,value:WU(t),writable:!0})}:oa;var GU=Date.now;const qU=function(l){var t=0,r=0;return function(){var o=GU(),c=16-(o-r);if(r=o,c>0){if(++t>=800)return arguments[0]}else t=0;return l.apply(void 0,arguments)}}(HU),KU=function(l,t){return qU(UU(l,t,oa),l+"")},YU=function(l,t,r){if(!be(r))return!1;var o=typeof t;return!!(o=="number"?Hm(r)&&Ja(t,r.length):o=="string"&&t in r)&&Wt(r[t],l)},L2=function(l){return KU(function(t,r){var o=-1,c=r.length,u=c>1?r[c-1]:void 0,m=c>2?r[2]:void 0;for(u=l.length>3&&typeof u=="function"?(c--,u):void 0,m&&YU(r[0],r[1],m)&&(u=c<3?void 0:u,c=1),t=Object(t);++o<c;){var b=r[o];b&&l(t,b,o,u)}return t})},Ck=L2(function(l,t,r){$U(l,t,r)});function QU(l,t,r=1,o){if(typeof r!="number")throw new P("translation-service-quantity-not-a-number",null,{quantity:r});const c=o||g.window.CKEDITOR_TRANSLATIONS,u=function(A){return Object.keys(A).length}(c);u===1&&(l=Object.keys(c)[0]);const m=t.id||t.string;if(u===0||!function(A,N,T){return!!T[A]&&!!T[A].dictionary[N]}(l,m,c))return r!==1?t.plural:t.string;const b=c[l].dictionary,k=c[l].getPluralForm||(A=>A===1?0:1),_=b[m];return typeof _=="string"?_:_[Number(k(r))]}g.window.CKEDITOR_TRANSLATIONS||(g.window.CKEDITOR_TRANSLATIONS={});const ZU=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig"];function R2(l){return ZU.includes(l)?"rtl":"ltr"}class JU{constructor({uiLanguage:t="en",contentLanguage:r,translations:o}={}){this.uiLanguage=t,this.contentLanguage=r||this.uiLanguage,this.uiLanguageDirection=R2(this.uiLanguage),this.contentLanguageDirection=R2(this.contentLanguage),this.translations=function(c){return Array.isArray(c)?c.reduce((u,m)=>Ck(u,m)):c}(o),this.t=(c,u)=>this._t(c,u)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(t,r=[]){r=tn(r),typeof t=="string"&&(t={string:t});const o=t.plural?r[0]:1;return function(c,u){return c.replace(/%(\d+)/g,(m,b)=>b<u.length?u[b]:m)}(QU(this.uiLanguage,t,o,this.translations),r)}}class so extends ee(){constructor(t={},r={}){super();const o=Re(t);if(o||(r=t),this._items=[],this._itemMap=new Map,this._idProperty=r.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],o)for(const c of t)this._items.push(c),this._itemMap.set(this._getItemIdBeforeAdding(c),c)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(t,r){return this.addMany([t],r)}addMany(t,r){if(r===void 0)r=this._items.length;else if(r>this._items.length||r<0)throw new P("collection-add-item-invalid-index",this);let o=0;for(const c of t){const u=this._getItemIdBeforeAdding(c),m=r+o;this._items.splice(m,0,c),this._itemMap.set(u,c),this.fire("add",c,m),o++}return this.fire("change",{added:t,removed:[],index:r}),this}get(t){let r;if(typeof t=="string")r=this._itemMap.get(t);else{if(typeof t!="number")throw new P("collection-get-invalid-arg",this);r=this._items[t]}return r||null}has(t){if(typeof t=="string")return this._itemMap.has(t);{const r=t[this._idProperty];return r&&this._itemMap.has(r)}}getIndex(t){let r;return r=typeof t=="string"?this._itemMap.get(t):t,r?this._items.indexOf(r):-1}remove(t){const[r,o]=this._remove(t);return this.fire("change",{added:[],removed:[r],index:o}),r}map(t,r){return this._items.map(t,r)}
8463forEach(t,r){this._items.forEach(t,r)}find(t,r){return this._items.find(t,r)}filter(t,r){return this._items.filter(t,r)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const t=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:t,index:0})}bindTo(t){if(this._bindToCollection)throw new P("collection-bind-to-rebind",this);return this._bindToCollection=t,{as:r=>{this._setUpBindToBinding(o=>new r(o))},using:r=>{typeof r=="function"?this._setUpBindToBinding(r):this._setUpBindToBinding(o=>o[r])}}}_setUpBindToBinding(t){const r=this._bindToCollection,o=(c,u,m)=>{const b=r._bindToCollection==this,k=r._bindToInternalToExternalMap.get(u);if(b&&k)this._bindToExternalToInternalMap.set(u,k),this._bindToInternalToExternalMap.set(k,u);else{const _=t(u);if(!_)return void this._skippedIndexesFromExternal.push(m);let A=m;for(const N of this._skippedIndexesFromExternal)m>N&&A--;for(const N of r._skippedIndexesFromExternal)A>=N&&A++;this._bindToExternalToInternalMap.set(u,_),this._bindToInternalToExternalMap.set(_,u),this.add(_,A);for(let N=0;N<r._skippedIndexesFromExternal.length;N++)A<=r._skippedIndexesFromExternal[N]&&r._skippedIndexesFromExternal[N]++}};for(const c of r)o(0,c,r.getIndex(c));this.listenTo(r,"add",o),this.listenTo(r,"remove",(c,u,m)=>{const b=this._bindToExternalToInternalMap.get(u);b&&this.remove(b),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((k,_)=>(m<_&&k.push(_-1),m>_&&k.push(_),k),[])})}_getItemIdBeforeAdding(t){const r=this._idProperty;let o;if(r in t){if(o=t[r],typeof o!="string")throw new P("collection-add-invalid-id",this);if(this.get(o))throw new P("collection-add-item-already-exists",this)}else t[r]=o=B();return o}_remove(t){let r,o,c,u=!1;const m=this._idProperty;if(typeof t=="string"?(o=t,c=this._itemMap.get(o),u=!c,c&&(r=this._items.indexOf(c))):typeof t=="number"?(r=t,c=this._items[r],u=!c,c&&(o=c[m])):(c=t,o=c[m],r=this._items.indexOf(c),u=r==-1||!this._itemMap.get(o)),u)throw new P("collection-remove-404",this);this._items.splice(r,1),this._itemMap.delete(o);const b=this._bindToInternalToExternalMap.get(c);return this._bindToInternalToExternalMap.delete(c),this._bindToExternalToInternalMap.delete(b),this.fire("remove",c,r),[c,r]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function rr(l){const t=l.next();return t.done?null:t.value}class ir extends Li(fe()){constructor(){super(),this._elements=new Set,this._nextEventLoopTimeout=null,this.set("isFocused",!1),this.set("focusedElement",null)}add(t){if(this._elements.has(t))throw new P("focustracker-add-element-already-exist",this);this.listenTo(t,"focus",()=>this._focus(t),{useCapture:!0}),this.listenTo(t,"blur",()=>this._blur(),{useCapture:!0}),this._elements.add(t)}remove(t){t===this.focusedElement&&this._blur(),this._elements.has(t)&&(this.stopListening(t),this._elements.delete(t))}destroy(){this.stopListening()}_focus(t){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=t,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}class zr{constructor(){this._listener=new(Li())}listenTo(t){this._listener.listenTo(t,"keydown",(r,o)=>{this._listener.fire("_keydown:"+kc(o),o)})}set(t,r,o={}){const c=lu(t),u=o.priority;this._listener.listenTo(this._listener,"_keydown:"+c,(m,b)=>{r(b,()=>{b.preventDefault(),b.stopPropagation(),m.stop()}),m.return=!0},{priority:u})}press(t){return!!this._listener.fire("_keydown:"+kc(t),t)}stopListening(t){this._listener.stopListening(t)}destroy(){this.stopListening()}}function Ro(l){return Re(l)?new Map(l):function(t){const r=new Map;for(const o in t)r.set(o,t[o]);return r}(l)}function jk(l,t){let r;function o(...c){o.cancel(),r=setTimeout(()=>l(...c),t)}return o.cancel=()=>{clearTimeout(r)},o}function Nk(l,t){return!!(r=l.charAt(t-1))&&r.length==1&&/[\ud800-\udbff]/.test(r)&&function(o){return!!o&&o.length==1&&/[\udc00-\udfff]/.test(o)}(l.charAt(t));var r}function Ek(l,t){return!!(r=l.charAt(t))&&r.length==1&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(r);var r}const XU=function(){const l=[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")],t=new RegExp("\\p{Regional_Indicator}{2}","u").source,r="(?:"+l.map(o=>o.source).join("|")+")";return new RegExp(`${t}|${r}(?:â${r})*`,"ug")}();function z2(l,t){const r=String(l).matchAll(XU);return Array.from(r).some(o=>o.index<t&&t<o.index+o[0].length)}class Ri extends so{constructor(t=[]){super(t,{idProperty:"viewUid"}),this.on("add",(r,o,c)=>{this._renderViewIntoCollectionParent(o,c)}),this.on("remove",(r,o)=>{o.element&&this._parentElement&&o.element.remove()}),this._parentElement=null}destroy(){this.map(t=>t.destroy())}setParent(t){this._parentElement=t;for(const r of this)this._renderViewIntoCollectionParent(r)}delegate(...t){if(!t.length||!t.every(r=>typeof r=="string"))throw new P("ui-viewcollection-delegate-wrong-events",this);return{to:r=>{for(const o of this)for(const c of t)o.delegate(c).to(r);this.on("add",(o,c)=>{for(const u of t)c.delegate(u).to(r)}),this.on("remove",(o,c)=>{for(const u of t)c.stopDelegating(u,r)})}}}_renderViewIntoCollectionParent(t,r){t.isRendered||t.render(),t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[r])}remove(t){return super.remove(t)}}class ao extends ee(){constructor(t){super(),Object.assign(this,U2(V2(t))),this._isRendered=!1,this._revertData=null}render(){const t=this._renderNode({intoFragment:!0});return this._isRendered=!0,t}apply(t){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:t,intoFragment:!1,isApplying:!0,revertData:this._revertData}),t}revert(t){if(!this._revertData)throw new P("ui-template-revert-not-applied",[this,t]);this._revertTemplateFromNode(t,this._revertData)}*getViews(){yield*function*t(r){if(r.children)for(const o of r.children)Xm(o
vendor: 5,787 bytes, line 8463
8463)?yield o:Sk(o)&&(yield*t(o))}(this)}static bind(t,r){return{to:(o,c)=>new eW({eventNameOrFunction:o,attribute:o,observable:t,emitter:r,callback:c}),if:(o,c,u)=>new F2({observable:t,emitter:r,attribute:o,valueIfTrue:c,callback:u})}}static extend(t,r){if(t._isRendered)throw new P("template-extend-render",[this,t]);q2(t,U2(V2(r)))}_renderNode(t){let r;if(r=t.node?this.tag&&this.text:this.tag?this.text:!this.text,r)throw new P("ui-template-wrong-syntax",this);return this.text?this._renderText(t):this._renderElement(t)}_renderElement(t){let r=t.node;return r||(r=t.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(t),this._renderElementChildren(t),this._setUpListeners(t),r}_renderText(t){let r=t.node;return r?t.revertData.text=r.textContent:r=t.node=document.createTextNode(""),Jm(this.text)?this._bindToObservable({schema:this.text,updater:tW(r),data:t}):r.textContent=this.text.join(""),r}_renderAttributes(t){if(!this.attributes)return;const r=t.node,o=t.revertData;for(const c in this.attributes){const u=r.getAttribute(c),m=this.attributes[c];o&&(o.attributes[c]=u);const b=K2(m)?m[0].ns:null;if(Jm(m)){const k=K2(m)?m[0].value:m;o&&Y2(c)&&k.unshift(u),this._bindToObservable({schema:k,updater:nW(r,c,b),data:t})}else if(c=="style"&&typeof m[0]!="string")this._renderStyleAttribute(m[0],t);else{o&&u&&Y2(c)&&m.unshift(u);const k=m.map(_=>_&&_.value||_).reduce((_,A)=>_.concat(A),[]).reduce(H2,"");yc(k)||r.setAttributeNS(b,c,k)}}}_renderStyleAttribute(t,r){const o=r.node;for(const c in t){const u=t[c];Jm(u)?this._bindToObservable({schema:[u],updater:rW(o,c),data:r}):o.style[c]=u}}_renderElementChildren(t){const r=t.node,o=t.intoFragment?document.createDocumentFragment():r,c=t.isApplying;let u=0;for(const m of this.children)if(Dk(m)){if(!c){m.setParent(r);for(const b of m)o.appendChild(b.element)}}else if(Xm(m))c||(m.isRendered||m.render(),o.appendChild(m.element));else if(ia(m))o.appendChild(m);else if(c){const b={children:[],bindings:[],attributes:{}};t.revertData.children.push(b),m._renderNode({intoFragment:!1,node:o.childNodes[u++],isApplying:!0,revertData:b})}else o.appendChild(m.render());t.intoFragment&&r.appendChild(o)}_setUpListeners(t){if(this.eventListeners)for(const r in this.eventListeners){const o=this.eventListeners[r].map(c=>{const[u,m]=r.split("@");return c.activateDomEventListener(u,m,t)});t.revertData&&t.revertData.bindings.push(o)}}_bindToObservable({schema:t,updater:r,data:o}){const c=o.revertData;$2(t,r,o);const u=t.filter(m=>!yc(m)).filter(m=>m.observable).map(m=>m.activateAttributeListener(t,r,o));c&&c.bindings.push(u)}_revertTemplateFromNode(t,r){for(const c of r.bindings)for(const u of c)u();if(r.text)return void(t.textContent=r.text);const o=t;for(const c in r.attributes){const u=r.attributes[c];u===null?o.removeAttribute(c):o.setAttribute(c,u)}for(let c=0;c<r.children.length;++c)this._revertTemplateFromNode(o.childNodes[c],r.children[c])}}class cu{constructor(t){this.attribute=t.attribute,this.observable=t.observable,this.emitter=t.emitter,this.callback=t.callback}getValue(t){const r=this.observable[this.attribute];return this.callback?this.callback(r,t):r}activateAttributeListener(t,r,o){const c=()=>$2(t,r,o);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,c),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,c)}}}class eW extends cu{constructor(t){super(t),this.eventNameOrFunction=t.eventNameOrFunction}activateDomEventListener(t,r,o){const c=(u,m)=>{r&&!m.target.matches(r)||(typeof this.eventNameOrFunction=="function"?this.eventNameOrFunction(m):this.observable.fire(this.eventNameOrFunction,m))};return this.emitter.listenTo(o.node,t,c),()=>{this.emitter.stopListening(o.node,t,c)}}}class F2 extends cu{constructor(t){super(t),this.valueIfTrue=t.valueIfTrue}getValue(t){return!yc(super.getValue(t))&&(this.valueIfTrue||!0)}}function Jm(l){return!!l&&(l.value&&(l=l.value),Array.isArray(l)?l.some(Jm):l instanceof cu)}function $2(l,t,{node:r}){const o=function(u,m){return u.map(b=>b instanceof cu?b.getValue(m):b)}(l,r);let c;c=l.length==1&&l[0]instanceof F2?o[0]:o.reduce(H2,""),yc(c)?t.remove():t.set(c)}function tW(l){return{set(t){l.textContent=t},remove(){l.textContent=""}}}function nW(l,t,r){return{set(o){l.setAttributeNS(r,t,o)},remove(){l.removeAttributeNS(r,t)}}}function rW(l,t){return{set(r){l.style[t]=r},remove(){l.style[t]=null}}}function V2(l){return xk(l,t=>{if(t&&(t instanceof cu||Sk(t)||Xm(t)||Dk(t)))return t})}function U2(l){if(typeof l=="string"?l=function(t){return{text:[t]}}(l):l.text&&function(t){t.text=tn(t.text)}(l),l.on&&(l.eventListeners=function(t){for(const r in t)W2(t,r);return t}(l.on),delete l.on),!l.text){l.attributes&&function(r){for(const o in r)r[o].value&&(r[o].value=tn(r[o].value)),W2(r,o)}(l.attributes);const t=[];if(l.children)if(Dk(l.children))t.push(l.children);else for(const r of l.children)Sk(r)||Xm(r)||ia(r)?t.push(r):t.push(new ao(r));l.children=t}return l}function W2(l,t){l[t]=tn(l[t])}function H2(l,t){return yc(t)?l:yc(l)?t:`${l} ${t}`}function G2(l,t){for(const r in t)l[r]?l[r].push(...t[r]):l[r]=t[r]}function q2(l,t){if(t.attributes&&(l.attributes||(l.attributes={}),G2(l.attributes,t.attributes)),t.eventListeners&&(l.eventListeners||(l.eventListeners={}),G2(l.eventListeners,t.eventListeners)),t.text&&l.text.push(...t.text),t.children&&t.children.length){if(l.children.length!=t.children.length)throw new P("ui-template-extend-children-mismatch",l);let r=0;for(const o of t.children)q2(l.children[r++],o)}}function yc(l){return!l&&l!==0}function Xm(l){return l instanceof kt}function Sk(l){return l instanceof ao}function Dk(l){return l instanceof Ri}function K2(l){return be(l[0])&&l[0].ns}function Y2(l){return l=="class"||l=="style"}
8463var iW=d(2591),He=d.n(iW),Q2=d(7676),oW={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(Q2.A,oW),Q2.A.locals;class kt extends Li(fe()){constructor(t){super(),this.element=null,this.isRendered=!1,this.locale=t,this.t=t&&t.t,this._viewCollections=new so,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(r,o)=>{o.locale=t,o.t=t&&t.t}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=ao.bind(this,this)}createCollection(t){const r=new Ri(t);return this._viewCollections.add(r),r}registerChild(t){Re(t)||(t=[t]);for(const r of t)this._unboundChildren.add(r)}deregisterChild(t){Re(t)||(t=[t]);for(const r of t)this._unboundChildren.remove(r)}setTemplate(t){this.template=new ao(t)}extendTemplate(t){ao.extend(this.template,t)}render(){if(this.isRendered)throw new P("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(t=>t.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}function ef({emitter:l,activator:t,callback:r,contextElements:o}){l.listenTo(document,"mousedown",(c,u)=>{if(!t())return;const m=typeof u.composedPath=="function"?u.composedPath():[],b=typeof o=="function"?o():o;for(const k of b)if(k.contains(u.target)||m.includes(k))return;r()})}function Tk(l){return class extends l{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...t){super(...t),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}}function tf({view:l}){l.listenTo(l.element,"submit",(t,r)=>{r.preventDefault(),l.fire("submit")},{useCapture:!0})}function sW({keystrokeHandler:l,focusTracker:t,gridItems:r,numberOfColumns:o,uiLanguageDirection:c}){const u=()=>o;function m(_){return A=>{const N=r.find(L=>L.element===t.focusedElement),T=r.getIndex(N),O=_(T,r);r.get(O).focus(),A.stopPropagation(),A.preventDefault()}}function b(_,A){return _===A-1?0:_+1}function k(_,A){return _===0?A-1:_-1}l.set("arrowright",m((_,A)=>c==="rtl"?k(_,A.length):b(_,A.length))),l.set("arrowleft",m((_,A)=>c==="rtl"?b(_,A.length):k(_,A.length))),l.set("arrowup",m((_,A)=>{let N=_-u();return N<0&&(N=_+u()*Math.floor(A.length/u()),N>A.length-1&&(N-=u())),N})),l.set("arrowdown",m((_,A)=>{let N=_+u();return N>A.length-1&&(N=_%u()),N}))}class Pe extends fe(){constructor(t){super(),this._disableStack=new Set,this.editor=t,this.set("isEnabled",!0)}forceDisabled(t){this._disableStack.add(t),this._disableStack.size==1&&(this.on("set:isEnabled",Z2,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),this._disableStack.size==0&&(this.off("set:isEnabled",Z2),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function Z2(l){l.return=!1,l.stop()}class St extends fe(){constructor(t){super(),this.editor=t,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(t,"change:isReadOnly",()=>{this.refresh()}),this.on("set:isEnabled",r=>{if(!this.affectsData)return;const o=t.model.document.selection,c=o.getFirstPosition().root.rootName!="$graveyard"&&t.model.canEditAt(o);(t.isReadOnly||this._isEnabledBasedOnSelection&&!c)&&(r.return=!1,r.stop())},{priority:"highest"}),this.on("execute",r=>{this.isEnabled||r.stop()},{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(t){this._affectsData=t}refresh(){this.isEnabled=!0}forceDisabled(t){this._disableStack.add(t),this._disableStack.size==1&&(this.on("set:isEnabled",J2,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),this._disableStack.size==0&&(this.off("set:isEnabled",J2),this.refresh())}execute(...t){}destroy(){this.stopListening()}}function J2(l){l.return=!1,l.stop()}class X2 extends St{constructor(){super(...arguments),this._childCommandsDefinitions=[]}refresh(){}execute(...t){const r=this._getFirstEnabledCommand();return!!r&&r.execute(t)}registerChildCommand(t,r={}){F(this._childCommandsDefinitions,{command:t,priority:r.priority||"normal"}),t.on("change:isEnabled",()=>this._checkEnabled()),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const t=this._childCommandsDefinitions.find(({command:r})=>r.isEnabled);return t&&t.command}}class e5 extends ee(){constructor(t,r=[],o=[]){super(),this._plugins=new Map,this._context=t,this._availablePlugins=new Map;for(const c of r)c.pluginName&&this._availablePlugins.set(c.pluginName,c);this._contextPlugins=new Map;for(const[c,u]of o)this._contextPlugins.set(c,u),this._contextPlugins.set(u,c),c.pluginName&&this._availablePlugins.set(c.pluginName,c)}*[Symbol.iterator](){for(const t of this._plugins)typeof t[0]=="function"&&(yield t)}get(t){const r=this._plugins.get(t);if(!r){let o=t;throw typeof t=="function"&&(o=t.pluginName||t.name),new P("plugincollection-
8463plugin-not-loaded",this._context,{plugin:o})}return r}has(t){return this._plugins.has(t)}init(t,r=[],o=[]){const c=this,u=this._context;(function L($,U=new Set){$.forEach(H=>{k(H)&&(U.has(H)||(U.add(H),H.pluginName&&!c._availablePlugins.has(H.pluginName)&&c._availablePlugins.set(H.pluginName,H),H.requires&&L(H.requires,U)))})})(t),T(t);const m=[...function L($,U=new Set){return $.map(H=>k(H)?H:c._availablePlugins.get(H)).reduce((H,J)=>U.has(J)?H:(U.add(J),J.requires&&(T(J.requires,J),L(J.requires,U).forEach(ae=>H.add(ae))),H.add(J)),new Set)}(t.filter(L=>!A(L,r)))];(function(L,$){for(const U of $){if(typeof U!="function")throw new P("plugincollection-replace-plugin-invalid-type",null,{pluginItem:U});const H=U.pluginName;if(!H)throw new P("plugincollection-replace-plugin-missing-name",null,{pluginItem:U});if(U.requires&&U.requires.length)throw new P("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:H});const J=c._availablePlugins.get(H);if(!J)throw new P("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:H});const ae=L.indexOf(J);if(ae===-1){if(c._contextPlugins.has(J))return;throw new P("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:H})}if(J.requires&&J.requires.length)throw new P("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:H});L.splice(ae,1,U),c._availablePlugins.set(H,U)}})(m,o);const b=m.map(L=>{let $=c._contextPlugins.get(L);return $=$||new L(u),c._add(L,$),$});return O(b,"init").then(()=>O(b,"afterInit")).then(()=>b);function k(L){return typeof L=="function"}function _(L){return k(L)&&!!L.isContextPlugin}function A(L,$){return $.some(U=>U===L||N(L)===U||N(U)===L)}function N(L){return k(L)?L.pluginName||L.name:L}function T(L,$=null){L.map(U=>k(U)?U:c._availablePlugins.get(U)||U).forEach(U=>{(function(H,J){if(!k(H))throw J?new P("plugincollection-soft-required",u,{missingPlugin:H,requiredBy:N(J)}):new P("plugincollection-plugin-not-found",u,{plugin:H})})(U,$),function(H,J){if(_(J)&&!_(H))throw new P("plugincollection-context-required",u,{plugin:N(H),requiredBy:N(J)})}(U,$),function(H,J){if(J&&A(H,r))throw new P("plugincollection-required",u,{plugin:N(H),requiredBy:N(J)})}(U,$)})}function O(L,$){return L.reduce((U,H)=>H[$]?c._contextPlugins.has(H)?U:U.then(H[$].bind(H)):U,Promise.resolve())}}destroy(){const t=[];for(const[,r]of this)typeof r.destroy!="function"||this._contextPlugins.has(r)||t.push(r.destroy());return Promise.all(t)}_add(t,r){this._plugins.set(t,r);const o=t.pluginName;if(o){if(this._plugins.has(o))throw new P("plugincollection-plugin-name-conflict",null,{pluginName:o,plugin1:this._plugins.get(o).constructor,plugin2:t});this._plugins.set(o,r)}}}var t5=Object.getOwnPropertySymbols,aW=Object.prototype.hasOwnProperty,lW=Object.prototype.propertyIsEnumerable;class n5{constructor(t){this._contextOwner=null;const r=t||{},{translations:o}=r,c=((b,k)=>{var _={};for(var A in b)aW.call(b,A)&&k.indexOf(A)<0&&(_[A]=b[A]);if(b!=null&&t5)for(var A of t5(b))k.indexOf(A)<0&&lW.call(b,A)&&(_[A]=b[A]);return _})(r,["translations"]);this.config=new m2(c,this.constructor.defaultConfig);const u=this.constructor.builtinPlugins;this.config.define("plugins",u),this.plugins=new e5(this,u);const m=this.config.get("language")||{};this.locale=new JU({uiLanguage:typeof m=="string"?m:m.ui,contentLanguage:this.config.get("language.content"),translations:o}),this.t=this.locale.t,this.editors=new so}initPlugins(){const t=this.config.get("plugins")||[],r=this.config.get("substitutePlugins")||[];for(const o of t.concat(r)){if(typeof o!="function")throw new P("context-initplugins-constructor-only",null,{Plugin:o});if(o.isContextPlugin!==!0)throw new P("context-initplugins-invalid-plugin",null,{Plugin:o})}return this.plugins.init(t,[],r)}destroy(){return Promise.all(Array.from(this.editors,t=>t.destroy())).then(()=>this.plugins.destroy())}_addEditor(t,r){if(this._contextOwner)throw new P("context-addeditor-private-context");this.editors.add(t),r&&(this._contextOwner=t)}_removeEditor(t){return this.editors.has(t)&&this.editors.remove(t),this._contextOwner===t?this.destroy():Promise.resolve()}_getEditorConfig(){const t={};for(const r of this.config.names())["plugins","removePlugins","extraPlugins"].includes(r)||(t[r]=this.config.get(r));return t}static create(t){return new Promise(r=>{const o=new this(t);r(o.initPlugins().then(()=>o))})}}class nf extends fe(){constructor(t){super(),this.context=t}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}class cW extends zr{constructor(t){super(),this.editor=t}set(t,r,o={}){if(typeof r=="string"){const c=r;r=(u,m)=>{this.editor.execute(c),m()}}super.set(t,r,o)}}var r5=d(4098),dW={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(r5.A,dW),r5.A.locals;const rf=new WeakMap;let i5=!1;function o5({view:l,element:t,text:r,isDirectHost:o=!0,keepOnFocus:c=!1}){const u=l.document;function m(b){rf.get(u).set(t,{text:b,isDirectHost:o,keepOnFocus:c,hostElement:o?t:null}),l.change(k=>Ik(u,k))}rf.has(u)||(rf.set(u,new Map),u.registerPostFixer(b=>
8463Ik(u,b)),u.on("change:isComposing",()=>{l.change(b=>Ik(u,b))},{priority:"high"})),t.is("editableElement")&&t.on("change:placeholder",(b,k,_)=>{m(_)}),t.placeholder?m(t.placeholder):r&&m(r),r&&function(){i5||z("enableplaceholder-deprecated-text-option"),i5=!0}()}function uW(l,t){return!t.hasClass("ck-placeholder")&&(l.addClass("ck-placeholder",t),!0)}function hW(l,t){return!!t.hasClass("ck-placeholder")&&(l.removeClass("ck-placeholder",t),!0)}function mW(l,t){if(!l.isAttached()||Array.from(l.getChildren()).some(c=>!c.is("uiElement")))return!1;const r=l.document,o=r.selection.anchor;return(!r.isComposing||!o||o.parent!==l)&&(!!t||!r.isFocused||!!o&&o.parent!==l)}function Ik(l,t){const r=rf.get(l),o=[];let c=!1;for(const[u,m]of r)m.isDirectHost&&(o.push(u),s5(t,u,m)&&(c=!0));for(const[u,m]of r){if(m.isDirectHost)continue;const b=fW(u);b&&(o.includes(b)||(m.hostElement=b,s5(t,u,m)&&(c=!0)))}return c}function s5(l,t,r){const{text:o,isDirectHost:c,hostElement:u}=r;let m=!1;return u.getAttribute("data-placeholder")!==o&&(l.setAttribute("data-placeholder",o,u),m=!0),(c||t.childCount==1)&&mW(u,r.keepOnFocus)?uW(l,u)&&(m=!0):hW(l,u)&&(m=!0),m}function fW(l){if(l.childCount){const t=l.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}class nl{is(){throw new Error("is() method is abstract")}}const a5=function(l){return yk(l,4)};class rl extends ee(nl){constructor(t){super(),this.document=t,this.parent=null}get index(){let t;if(!this.parent)return null;if((t=this.parent.getChildIndex(this))==-1)throw new P("view-node-not-found-in-parent",this);return t}get nextSibling(){const t=this.index;return t!==null&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return t!==null&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}isAttached(){return this.root.is("rootElement")}getPath(){const t=[];let r=this;for(;r.parent;)t.unshift(r.index),r=r.parent;return t}getAncestors(t={}){const r=[];let o=t.includeSelf?this:this.parent;for(;o;)r[t.parentFirst?"push":"unshift"](o),o=o.parent;return r}getCommonAncestor(t,r={}){const o=this.getAncestors(r),c=t.getAncestors(r);let u=0;for(;o[u]==c[u]&&o[u];)u++;return u===0?null:o[u-1]}isBefore(t){if(this==t||this.root!==t.root)return!1;const r=this.getPath(),o=t.getPath(),c=ue(r,o);switch(c){case"prefix":return!0;case"extension":return!1;default:return r[c]<o[c]}}isAfter(t){return this!=t&&this.root===t.root&&!this.isBefore(t)}_remove(){this.parent._removeChildren(this.index)}_fireChange(t,r){this.fire(`change:${t}`,r),this.parent&&this.parent._fireChange(t,r)}toJSON(){const t=a5(this);return delete t.parent,t}}rl.prototype.is=function(l){return l==="node"||l==="view:node"};class Zt extends rl{constructor(t,r){super(t),this._textData=r}get data(){return this._textData}get _data(){return this.data}set _data(t){this._fireChange("text",this),this._textData=t}isSimilar(t){return t instanceof Zt&&(this===t||this.data===t.data)}_clone(){return new Zt(this.document,this.data)}}Zt.prototype.is=function(l){return l==="$text"||l==="view:$text"||l==="text"||l==="view:text"||l==="node"||l==="view:node"};class zo extends nl{constructor(t,r,o){if(super(),this.textNode=t,r<0||r>t.data.length)throw new P("view-textproxy-wrong-offsetintext",this);if(o<0||r+o>t.data.length)throw new P("view-textproxy-wrong-length",this);this.data=t.data.substring(r,r+o),this.offsetInText=r}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(t={}){const r=[];let o=t.includeSelf?this.textNode:this.parent;for(;o!==null;)r[t.parentFirst?"push":"unshift"](o),o=o.parent;return r}}zo.prototype.is=function(l){return l==="$textProxy"||l==="view:$textProxy"||l==="textProxy"||l==="view:textProxy"};class Fo{constructor(...t){this._patterns=[],this.add(...t)}add(...t){for(let r of t)(typeof r=="string"||r instanceof RegExp)&&(r={name:r}),this._patterns.push(r)}match(...t){for(const r of t)for(const o of this._patterns){const c=l5(r,o);if(c)return{element:r,pattern:o,match:c}}return null}matchAll(...t){const r=[];
8463for(const o of t)for(const c of this._patterns){const u=l5(o,c);u&&r.push({element:o,pattern:c,match:u})}return r.length>0?r:null}getElementName(){if(this._patterns.length!==1)return null;const t=this._patterns[0],r=t.name;return typeof t=="function"||!r||r instanceof RegExp?null:r}}function l5(l,t){if(typeof t=="function")return t(l);const r={};return t.name&&(r.name=function(o,c){return o instanceof RegExp?!!c.match(o):o===c}(t.name,l.name),!r.name)||t.attributes&&(r.attributes=function(o,c){const u=new Set(c.getAttributeKeys());return _t(o)?(o.style!==void 0&&z("matcher-pattern-deprecated-attributes-style-key",o),o.class!==void 0&&z("matcher-pattern-deprecated-attributes-class-key",o)):(u.delete("style"),u.delete("class")),Mk(o,u,m=>c.getAttribute(m))}(t.attributes,l),!r.attributes)||t.classes&&(r.classes=function(o,c){return Mk(o,c.getClassNames(),()=>{})}(t.classes,l),!r.classes)||t.styles&&(r.styles=function(o,c){return Mk(o,c.getStyleNames(!0),u=>c.getStyle(u))}(t.styles,l),!r.styles)?null:r}function Mk(l,t,r){const o=function(m){return Array.isArray(m)?m.map(b=>_t(b)?(b.key!==void 0&&b.value!==void 0||z("matcher-pattern-missing-key-or-value",b),[b.key,b.value]):[b,!0]):_t(m)?Object.entries(m):[[m,!0]]}(l),c=Array.from(t),u=[];if(o.forEach(([m,b])=>{c.forEach(k=>{(function(_,A){return _===!0||_===A||_ instanceof RegExp&&A.match(_)})(m,k)&&function(_,A,N){if(_===!0)return!0;const T=N(A);return _===T||_ instanceof RegExp&&!!String(T).match(_)}(b,k,r)&&u.push(k)})}),o.length&&!(u.length<o.length))return u}const of=function(l){return typeof l=="symbol"||Nt(l)&&Qe(l)=="[object Symbol]"};var pW=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gW=/^\w*$/;const Pk=function(l,t){if(Ze(l))return!1;var r=typeof l;return!(r!="number"&&r!="symbol"&&r!="boolean"&&l!=null&&!of(l))||gW.test(l)||!pW.test(l)||t!=null&&l in Object(t)};function Ok(l,t){if(typeof l!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");var r=function(){var o=arguments,c=t?t.apply(this,o):o[0],u=r.cache;if(u.has(c))return u.get(c);var m=l.apply(this,o);return r.cache=u.set(c,m)||u,m};return r.cache=new(Ok.Cache||Ya),r}Ok.Cache=Ya;const bW=Ok,kW=function(l){var t=bW(l,function(o){return r.size===500&&r.clear(),o}),r=t.cache;return t};var yW=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xW=/\\(\\)?/g,vW=kW(function(l){var t=[];
8463return l.charCodeAt(0)===46&&t.push(""),l.replace(yW,function(r,o,c,u){t.push(c?u.replace(xW,"$1"):o||r)}),t});const wW=vW,_W=function(l,t){for(var r=-1,o=l==null?0:l.length,c=Array(o);++r<o;)c[r]=t(l[r],r,l);return c};var c5=Ct?Ct.prototype:void 0,d5=c5?c5.toString:void 0;const AW=function l(t){if(typeof t=="string")return t;if(Ze(t))return _W(t,l)+"";if(of(t))return d5?d5.call(t):"";var r=t+"";return r=="0"&&1/t==-1/0?"-0":r},Bk=function(l){return l==null?"":AW(l)},sf=function(l,t){return Ze(l)?l:Pk(l,t)?[l]:wW(Bk(l))},CW=function(l){var t=l==null?0:l.length;return t?l[t-1]:void 0},xc=function(l){if(typeof l=="string"||of(l))return l;var t=l+"";return t=="0"&&1/l==-1/0?"-0":t},Lk=function(l,t){for(var r=0,o=(t=sf(t,l)).length;l!=null&&r<o;)l=l[xc(t[r++])];return r&&r==o?l:void 0},u5=function(l,t,r){var o=-1,c=l.length;t<0&&(t=-t>c?0:c+t),(r=r>c?c:r)<0&&(r+=c),c=t>r?0:r-t>>>0,t>>>=0;for(var u=Array(c);++o<c;)u[o]=l[o+t];return u},jW=function(l,t){return t.length<2?l:Lk(l,u5(t,0,-1))},NW=function(l,t){return t=sf(t,l),(l=jW(l,t))==null||delete l[xc(CW(t))]},EW=function(l,t){return l==null||NW(l,t)},du=function(l,t,r){var o=l==null?void 0:Lk(l,t);return o===void 0?r:o},SW=function(l,t,r,o){if(!be(l))return l;for(var c=-1,u=(t=sf(t,l)).length,m=u-1,b=l;b!=null&&++c<u;){var k=xc(t[c]),_=r;if(k==="__proto__"||k==="constructor"||k==="prototype")return l;if(c!=m){var A=b[k];(_=void 0)==void 0&&(_=be(A)?A:Ja(t[c+1])?[]:{})}Za(b,k,_),b=b[k]}return l},DW=function(l,t,r){return l==null?l:SW(l,t,r)};class Rk{constructor(t){this._styles={},this._styleProcessor=t}get isEmpty(){return!Object.entries(this._styles).length}get size(){return this.isEmpty?0:this.getStyleNames().length}setTo(t){this.clear();const r=function(o){let c=null,u=0,m=0,b=null;const k=new Map;if(o==="")return k;o.charAt(o.length-1)!=";"&&(o+=";");for(let _=0;_<o.length;_++){const A=o.charAt(_);if(c===null)switch(A){case":":b||(b=o.substr(u,_-u),m=_+1);break;case'"':case"'":c=A;break;case";":{const N=o.substr(m,_-m);b&&k.set(b.trim(),N.trim()),b=null,u=_+1;break}}else A===c&&(c=null)}return k}(t);for(const[o,c]of r)this._styleProcessor.toNormalizedForm(o,c,this._styles)}has(t){if(this.isEmpty)return!1;const r=this._styleProcessor.getReducedForm(t,this._styles).find(([o])=>o===t);return Array.isArray(r)}set(t,r){if(be(t))for(const[o,c]of Object.entries(t))this._styleProcessor.toNormalizedForm(o,c,this._styles);else this._styleProcessor.toNormalizedForm(t,r,this._styles)}remove(t){const r=zk(t);EW(this._styles,r),delete this._styles[t],this._cleanEmptyObjectsOnPath(r)}getNormalized(t){return this._styleProcessor.getNormalized(t,this._styles)}toString(){return this.isEmpty?"":this.getStylesEntries().map(t=>t.join(":")).sort().join(";")+";"}getAsString(t){if(this.isEmpty)return;if(this._styles[t]&&!be(this._styles[t]))return this._styles[t];const r=this._styleProcessor.getReducedForm(t,this._styles).find(([o])=>o===t);return Array.isArray(r)?r[1]:void 0}getStyleNames(t=!1){return this.isEmpty?[]:t?this._styleProcessor.getStyleNames(this._styles):this.getStylesEntries().map(([r])=>r)}clear(){this._styles={}}getStylesEntries(){const t=[],r=Object.keys(this._styles);for(const o of r)t.push(...this._styleProcessor.getReducedForm(o,this._styles));return t}_cleanEmptyObjectsOnPath(t){const r=t.split(".");if(!(r.length>1))return;const o=r.splice(0,r.length-1).join("."),c=du(this._styles,o);c&&!Object.keys(c).length&&this.remove(o)}}class TW{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(t,r,o){if(be(r))Fk(o,zk(t),r);else if(this._normalizers.has(t)){const c=this._normalizers.get(t),{path:u,value:m}=c(r);Fk(o,u,m)}else Fk(o,t,r)}getNormalized(t,r){if(!t)return Ck({},r);if(r[t]!==void 0)return r[t];if(this._extractors.has(t)){const o=this._extractors.get(t);if(typeof o=="string")return du(r,o);const c=o(t,r);if(c)return c}return du(r,zk(t))}getReducedForm(t,r){const o=this.getNormalized(t,r);return o===void 0?[]:this._reducers.has(t)?this._reducers.get(t)(o):[[t,o]]}getStyleNames(t){const r=Array.from(this._consumables.keys()).filter(c=>{const u=this.getNormalized(c,t);return u&&typeof u=="object"?Object.keys(u).length:u}),o=new Set([...r,...Object.keys(t)]);return Array.from(o)}getRelatedStyles(t){return this._consumables.get(t)||[]}setNormalizer(t,r){this._normalizers.set(t,r)}setExtractor(t,r){this._extractors.set(t,r)}setReducer(t,r){this._reducers.set(t,r)}setStyleRelation(t,r){this._mapStyleNames(t,r);for(const o of r)this._mapStyleNames(o,[t])}_mapStyleNames(t,r){this._consumables.has(t)||this._consumables.set(t,[]),this._consumables.get(t).push(...r)}}function zk(l){return l.replace("-",".")}function Fk(l,t,r){let o=r;be(r)&&(o=Ck({},du(l,t),r)),DW(l,t,o)}class bi extends rl{constructor(t,r,o,c){if(super(t),this._unsafeAttributesToRender=[],this._customProperties=new Map,this.name=r,this._attrs=function(u){const m=Ro(u);for(const[b,k]of m)k===null?m.delete(b):typeof k!="string"&&m.set(b,String(k));return m}(o),this._children=[],c&&this._insertChild(0,c),this._classes=new Set,this._attrs.has("class")){const u=this._attrs.get("class");h5(this._classes,u),this._attrs.delete("class")}this._styles=new Rk(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return this._children.length===0}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>
84630&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(t){if(t=="class")return this._classes.size>0?[...this._classes].join(" "):void 0;if(t=="style"){const r=this._styles.toString();return r==""?void 0:r}return this._attrs.get(t)}hasAttribute(t){return t=="class"?this._classes.size>0:t=="style"?!this._styles.isEmpty:this._attrs.has(t)}isSimilar(t){if(!(t instanceof bi))return!1;if(this===t)return!0;if(this.name!=t.name||this._attrs.size!==t._attrs.size||this._classes.size!==t._classes.size||this._styles.size!==t._styles.size)return!1;for(const[r,o]of this._attrs)if(!t._attrs.has(r)||t._attrs.get(r)!==o)return!1;for(const r of this._classes)if(!t._classes.has(r))return!1;for(const r of this._styles.getStyleNames())if(!t._styles.has(r)||t._styles.getAsString(r)!==this._styles.getAsString(r))return!1;return!0}hasClass(...t){for(const r of t)if(!this._classes.has(r))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(t){return this._styles.getAsString(t)}getNormalizedStyle(t){return this._styles.getNormalized(t)}getStyleNames(t){return this._styles.getStyleNames(t)}hasStyle(...t){for(const r of t)if(!this._styles.has(r))return!1;return!0}findAncestor(...t){const r=new Fo(...t);let o=this.parent;for(;o&&!o.is("documentFragment");){if(r.match(o))return o;o=o.parent}return null}getCustomProperty(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const t=Array.from(this._classes).sort().join(","),r=this._styles.toString(),o=Array.from(this._attrs).map(c=>`${c[0]}="${c[1]}"`).sort().join(" ");return this.name+(t==""?"":` class="${t}"`)+(r?` style="${r}"`:"")+(o==""?"":` ${o}`)}shouldRenderUnsafeAttribute(t){return this._unsafeAttributesToRender.includes(t)}_clone(t=!1){const r=[];if(t)for(const c of this.getChildren())r.push(c._clone(t));const o=new this.constructor(this.document,this.name,this._attrs,r);return o._classes=new Set(this._classes),o._styles.set(this._styles.getNormalized()),o._customProperties=new Map(this._customProperties),o.getFillerOffset=this.getFillerOffset,o._unsafeAttributesToRender=this._unsafeAttributesToRender,o}_appendChild(t){return this._insertChild(this.childCount,t)}_insertChild(t,r){this._fireChange("children",this);let o=0;const c=function(u,m){return typeof m=="string"?[new Zt(u,m)]:(Re(m)||(m=[m]),Array.from(m).map(b=>typeof b=="string"?new Zt(u,b):b instanceof zo?new Zt(u,b.data):b))}(this.document,r);for(const u of c)u.parent!==null&&u._remove(),u.parent=this,u.document=this.document,this._children.splice(t,0,u),t++,o++;return o}_removeChildren(t,r=1){this._fireChange("children",this);for(let o=t;o<t+r;o++)this._children[o].parent=null;return this._children.splice(t,r)}_setAttribute(t,r){const o=String(r);this._fireChange("attributes",this),t=="class"?h5(this._classes,o):t=="style"?this._styles.setTo(o):this._attrs.set(t,o)}_removeAttribute(t){return this._fireChange("attributes",this),t=="class"?this._classes.size>0&&(this._classes.clear(),!0):t=="style"?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(t)}_addClass(t){this._fireChange("attributes",this);for(const r of tn(t))this._classes.add(r)}_removeClass(t){this._fireChange("attributes",this);for(const r of tn(t))this._classes.delete(r)}_setStyle(t,r){this._fireChange("attributes",this),typeof t!="string"?this._styles.set(t):this._styles.set(t,r)}_removeStyle(t){this._fireChange("attributes",this);for(const r of tn(t))this._styles.remove(r)}_setCustomProperty(t,r){this._customProperties.set(t,r)}_removeCustomProperty(t){return this._customProperties.delete(t)}}function h5(l,t){const r=t.split(/\s+/);l.clear(),r.forEach(o=>l.add(o))}bi.prototype.is=function(l,t){return t?t===this.name&&(l==="element"||l==="view:element"):l==="element"||l==="view:element"||l==="node"||l==="view:node"};class uu extends bi{constructor(t,r,o,c){super(t,r,o,c),this.getFillerOffset=IW}}function IW(){const l=[...this.getChildren()],t=l[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const r of l)if(!r.is("uiElement"))return null;return this.childCount}uu.prototype.is=function(l,t){return t?t===this.name&&(l==="containerElement"||l==="view:containerElement"||l==="element"||l==="view:element"):l==="containerElement"||l==="view:containerElement"||l==="element"||l==="view:element"||l==="node"||l==="view:node"};class af extends fe(uu){constructor(t,r,o,c){super(t,r,o,c),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("placeholder",void 0),this.bind("isReadOnly").to(t),this.bind("isFocused").to(t,"isFocused",u=>u&&t.selection.editableElement==this),this.listenTo(t.selection,"change",()=>{this.isFocused=t.isFocused&&t.selection.editableElement==this})}destroy(){this.stopListening()}}af.prototype.is=function(l,t){return t?t===this.name&&(l==="editableElement"||l==="view:editableElement"||l==="containerElement"||l==="view:containerElement"||l==="element"||l==="view:element"):l==="editableElement"||l==="view:editableElement"||l==="containerElement"||l==="view:containerElement"||l==="element"||l==="view:element"||l==="node"||l==="view:node"};const m5=Symbol("rootName");class f5 extends af{constructor(t,r){super(t,r),this.rootName="main"}get rootName(){return this.getCustomProperty(m5)}set rootName(t){this._setCustomProperty(m5,t)}set _name(t){this.name=t}}f5.prototype.is=function(l,t){return t?t===this.name&&(l==="rootElement"||l==="view:rootElement"||l==="editableElement"||l==="view:editableElement"||l==="containerElement"||l==="view:containerElement"||l==="element"||l==="view:element"):l==="rootElement"||l==="view:rootElement"||l==="editableElement"||l==="view:editableElement"||l==="containerElement"||l==="view:containerElement"||l==="element"||l==="view:element"||l==="node"||l==="view:node"};class il{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new P("view-tree-walker-no-start-position",null);if(t.direction&&t.direction!="forward"&&t.direction!="backward")throw new P("view-tree-walker-unknown-direction",t.startPosition,{direction:t.direction});this.boundaries=t.boundaries||null,t.startPosition?this._position=Ge._createAt(t.startPosition):this._position=Ge._createAt(t.boundaries[t.direction=="backward"?"end":"start"]),this.direction=t.direction||"forward",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.
vendor: 6,739 bytes, line 8463
8463ignoreElementEnd,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(t){let r,o;do o=this.position,r=this.next();while(!r.done&&t(r.value));r.done||(this._position=o)}next(){return this.direction=="forward"?this._next():this._previous()}_next(){let t=this.position.clone();const r=this.position,o=t.parent;if(o.parent===null&&t.offset===o.childCount)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let c;if(o instanceof Zt){if(t.isAtEnd)return this._position=Ge._createAfter(o),this._next();c=o.data[t.offset]}else c=o.getChild(t.offset);if(c instanceof bi){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(t))return{done:!0,value:void 0};t.offset++}else t=new Ge(c,0);return this._position=t,this._formatReturnValue("elementStart",c,r,t,1)}if(c instanceof Zt){if(this.singleCharacters)return t=new Ge(c,0),this._position=t,this._next();let u,m=c.data.length;return c==this._boundaryEndParent?(m=this.boundaries.end.offset,u=new zo(c,0,m),t=Ge._createAfter(u)):(u=new zo(c,0,c.data.length),t.offset++),this._position=t,this._formatReturnValue("text",u,r,t,m)}if(typeof c=="string"){let u;this.singleCharacters?u=1:u=(o===this._boundaryEndParent?this.boundaries.end.offset:o.data.length)-t.offset;const m=new zo(o,t.offset,u);return t.offset+=u,this._position=t,this._formatReturnValue("text",m,r,t,u)}return t=Ge._createAfter(o),this._position=t,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",o,r,t)}_previous(){let t=this.position.clone();const r=this.position,o=t.parent;if(o.parent===null&&t.offset===0)return{done:!0,value:void 0};if(o==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let c;if(o instanceof Zt){if(t.isAtStart)return this._position=Ge._createBefore(o),this._previous();c=o.data[t.offset-1]}else c=o.getChild(t.offset-1);if(c instanceof bi)return this.shallow?(t.offset--,this._position=t,this._formatReturnValue("elementStart",c,r,t,1)):(t=new Ge(c,c.childCount),this._position=t,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",c,r,t));if(c instanceof Zt){if(this.singleCharacters)return t=new Ge(c,c.data.length),this._position=t,this._previous();let u,m=c.data.length;if(c==this._boundaryStartParent){const b=this.boundaries.start.offset;u=new zo(c,b,c.data.length-b),m=u.data.length,t=Ge._createBefore(u)}else u=new zo(c,0,c.data.length),t.offset--;return this._position=t,this._formatReturnValue("text",u,r,t,m)}if(typeof c=="string"){let u;if(this.singleCharacters)u=1;else{const b=o===this._boundaryStartParent?this.boundaries.start.offset:0;u=t.offset-b}t.offset-=u;const m=new zo(o,t.offset,u);return this._position=t,this._formatReturnValue("text",m,r,t,u)}return t=Ge._createBefore(o),this._position=t,this._formatReturnValue("elementStart",o,r,t,1)}_formatReturnValue(t,r,o,c,u){return r instanceof zo&&(r.offsetInText+r.data.length==r.textNode.data.length&&(this.direction!="forward"||this.boundaries&&this.boundaries.end.isEqual(this.position)?o=Ge._createAfter(r.textNode):(c=Ge._createAfter(r.textNode),this._position=c)),r.offsetInText===0&&(this.direction!="backward"||this.boundaries&&this.boundaries.start.isEqual(this.position)?o=Ge._createBefore(r.textNode):(c=Ge._createBefore(r.textNode),this._position=c))),{done:!1,value:{type:t,item:r,previousPosition:o,nextPosition:c,length:u}}}}class Ge extends nl{constructor(t,r){super(),this.parent=t,this.offset=r}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 t=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===t}get root(){return this.parent.root}get editableElement(){let t=this.parent;for(;!(t instanceof af);){if(!t.parent)return null;t=t.parent}return t}getShiftedBy(t){const r=Ge._createAt(this),o=r.offset+t;return r.offset=o<0?0:o,r}getLastMatchingPosition(t,r={}){r.startPosition=this;const o=new il(r);return o.skip(t),o.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(t){const r=this.getAncestors(),o=t.getAncestors();let c=0;for(;r[c]==o[c]&&r[c];)c++;return c===0?null:r[c-1]}isEqual(t){return this.parent==t.parent&&this.offset==t.offset}isBefore(t){return this.compareWith(t)=="before"}isAfter(t){return this.compareWith(t)=="after"}compareWith(t){if(this.root!==t.root)return"different";if(this.isEqual(t))return"same";const r=this.parent.is("node")?this.parent.getPath():[],o=t.parent.is("node")?t.parent.getPath():[];r.push(this.offset),o.push(t.offset);const c=ue(r,o);switch(c){case"prefix":return"before";case"extension":return"after";default:return r[c]<o[c]?"before":"after"}}getWalker(t={}){return t.startPosition=this,new il(t)}clone(){return new Ge(this.parent,this.offset)}static _createAt(t,r){if(t instanceof Ge)return new this(t.parent,t.offset);{const o=t;if(r=="end")r=o.is("$text")?o.data.length:o.childCount;else{if(r=="before")return this._createBefore(o);if(r=="after")return this._createAfter(o);if(r!==0&&!r)throw new P("view-createpositionat-offset-required",o)}return new Ge(o,r)}}static _createAfter(t){if(t.is("$textProxy"))return new Ge(t.textNode,t.offsetInText+t.data.length);if(!t.parent)throw new P("view-position-after-root",t,{root:t});return new Ge(t.parent,t.index+1)}static _createBefore(t){if(t.is("$textProxy"))return new Ge(t.textNode,t.offsetInText);if(!t.parent)throw new P("view-position-before-root",t,{root:t});return new Ge(t.parent,t.index)}}Ge.prototype.is=function(l){return l==="position"||l==="view:position"};class wt extends nl{constructor(t,r=null){super(),this.start=t.clone(),this.end=r?r.clone():t.clone()}*[Symbol.iterator](){yield*new il({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 t=this.start.getLastMatchingPosition(lf,{direction:"backward"}),r=this.end.getLastMatchingPosition(lf);return t.parent.is("$text")&&t.isAtStart&&(t=Ge._createBefore(t.parent)),r.parent.is("$text")&&r.isAtEnd&&(r=Ge._createAfter(r.parent)),new wt(t,r)}getTrimmed(){let t=this.start.getLastMatchingPosition(lf);if(t.isAfter(this.end)||t.isEqual(this.end))return new wt(t,t);let r=this.end.getLastMatchingPosition(lf,{direction:"backward"});
vendor: 9,370 bytes, line 8463
8463const o=t.nodeAfter,c=r.nodeBefore;return o&&o.is("$text")&&(t=new Ge(o,0)),c&&c.is("$text")&&(r=new Ge(c,c.data.length)),new wt(t,r)}isEqual(t){return this==t||this.start.isEqual(t.start)&&this.end.isEqual(t.end)}containsPosition(t){return t.isAfter(this.start)&&t.isBefore(this.end)}containsRange(t,r=!1){t.isCollapsed&&(r=!1);const o=this.containsPosition(t.start)||r&&this.start.isEqual(t.start),c=this.containsPosition(t.end)||r&&this.end.isEqual(t.end);return o&&c}getDifference(t){const r=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&r.push(new wt(this.start,t.start)),this.containsPosition(t.end)&&r.push(new wt(t.end,this.end))):r.push(this.clone()),r}getIntersection(t){if(this.isIntersecting(t)){let r=this.start,o=this.end;return this.containsPosition(t.start)&&(r=t.start),this.containsPosition(t.end)&&(o=t.end),new wt(r,o)}return null}getWalker(t={}){return t.boundaries=this,new il(t)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let t=this.start.nodeAfter,r=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(t=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(r=this.end.parent.previousSibling),t&&t.is("element")&&t===r?t:null}clone(){return new wt(this.start,this.end)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const r=new il(t);for(const o of r)yield o.item}*getPositions(t={}){t.boundaries=this;const r=new il(t);yield r.position;for(const o of r)yield o.nextPosition}isIntersecting(t){return this.start.isBefore(t.end)&&this.end.isAfter(t.start)}static _createFromParentsAndOffsets(t,r,o,c){return new this(new Ge(t,r),new Ge(o,c))}static _createFromPositionAndShift(t,r){const o=t,c=t.getShiftedBy(r);return r>0?new this(o,c):new this(c,o)}static _createIn(t){return this._createFromParentsAndOffsets(t,0,t,t.childCount)}static _createOn(t){const r=t.is("$textProxy")?t.offsetSize:1;return this._createFromPositionAndShift(Ge._createBefore(t),r)}}function lf(l){return!(!l.item.is("attributeElement")&&!l.item.is("uiElement"))}wt.prototype.is=function(l){return l==="range"||l==="view:range"};class lo extends ee(nl){constructor(...t){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",t.length&&this.setTo(...t)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.end:t.start).clone()}get focus(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.start:t.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 t of this._ranges)yield t.clone()}getFirstRange(){let t=null;for(const r of this._ranges)t&&!r.start.isBefore(t.start)||(t=r);return t?t.clone():null}getLastRange(){let t=null;for(const r of this._ranges)t&&!r.end.isAfter(t.end)||(t=r);return t?t.clone():null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}isEqual(t){if(this.isFake!=t.isFake||this.isFake&&this.fakeSelectionLabel!=t.fakeSelectionLabel||this.rangeCount!=t.rangeCount)return!1;if(this.rangeCount===0)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const r of this._ranges){let o=!1;for(const c of t._ranges)if(r.isEqual(c)){o=!0;break}if(!o)return!1}return!0}isSimilar(t){if(this.isBackward!=t.isBackward)return!1;const r=Fe(this.getRanges());if(r!=Fe(t.getRanges()))return!1;if(r==0)return!0;for(let o of this.getRanges()){o=o.getTrimmed();let c=!1;for(let u of t.getRanges())if(u=u.getTrimmed(),o.start.isEqual(u.start)&&o.end.isEqual(u.end)){c=!0;break}if(!c)return!1}return!0}getSelectedElement(){return this.rangeCount!==1?null:this.getFirstRange().getContainedElement()}setTo(...t){let[r,o,c]=t;if(typeof o=="object"&&(c=o,o=void 0),r===null)this._setRanges([]),this._setFakeOptions(c);else if(r instanceof lo||r instanceof $k)this._setRanges(r.getRanges(),r.isBackward),this._setFakeOptions({fake:r.isFake,label:r.fakeSelectionLabel});else if(r instanceof wt)this._setRanges([r],c&&c.backward),this._setFakeOptions(c);else if(r instanceof Ge)this._setRanges([new wt(r)]),this._setFakeOptions(c);else if(r instanceof rl){const u=!!c&&!!c.backward;let m;if(o===void 0)throw new P("view-selection-setto-required-second-parameter",this);m=o=="in"?wt._createIn(r):o=="on"?wt._createOn(r):new wt(Ge._createAt(r,o)),this._setRanges([m],u),this._setFakeOptions(c)}else{if(!Re(r))throw new P("view-selection-setto-not-selectable",this);this._setRanges(r,c&&c.backward),this._setFakeOptions(c)}this.fire("change")}setFocus(t,r){if(this.anchor===null)throw new P("view-selection-setfocus-no-ranges",this);const o=Ge._createAt(t,r);if(o.compareWith(this.focus)=="same")return;const c=this.anchor;this._ranges.pop(),o.compareWith(c)=="before"?this._addRange(new wt(o,c),!0):this._addRange(new wt(c,o)),this.fire("change")}_setRanges(t,r=!1){t=Array.from(t),this._ranges=[];for(const o of t)this._addRange(o);this._lastRangeBackward=!!r}_setFakeOptions(t={}){this._isFake=!!t.fake,this._fakeSelectionLabel=t.fake&&t.label||""}_addRange(t,r=!1){if(!(t instanceof wt))throw new P("view-selection-add-range-not-range",this);this._pushRange(t),this._lastRangeBackward=!!r}_pushRange(t){for(const r of this._ranges)if(t.isIntersecting(r))throw new P("view-selection-range-intersects",this,{addedRange:t,intersectingRange:r});this._ranges.push(new wt(t.start,t.end))}}lo.prototype.is=function(l){return l==="selection"||l==="view:selection"};class $k extends ee(nl){constructor(...t){super(),this._selection=new lo,this._selection.delegate("change").to(this),t.length&&this._selection.setTo(...t)}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(t){return this._selection.isEqual(t)}isSimilar(t){return this._selection.isSimilar(t)}_setTo(...t){this._selection.setTo(...t)}_setFocus(t,r){this._selection.setFocus(t,r)}}$k.prototype.is=function(l){return l==="selection"||l=="documentSelection"||l=="view:selection"||l=="view:documentSelection"};class vc extends I{constructor(t,r,o){super(t,r),this.startRange=o,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const Vk=Symbol("bubbling contexts");function Uk(l){return class extends l{fire(t,...r){try{const o=t instanceof I?t:new I(this,t),c=Wk(this);if(!c.size)return;if(hu(o,"capturing",this),wc(c,"$capture",o,...r))return o.return;const u=o.startRange||this.selection.getFirstRange(),m=u?u.getContainedElement():null,b=!!m&&!!p5(c,m);let k=m||function(_){if(!_)return null;const A=_.start.parent,N=_.end.parent,T=A.getPath(),O=N.getPath();return T.length>O.length?A:N}(u);if(hu(o,"atTarget",k),!b){if(wc(c,"$text",o,...r))return o.return;hu(o,"bubbling",k)}for(;k;){if(k.is("rootElement")){if(wc(c,"$root",o,...r))return o.return}else if(k.is("element")&&wc(c,k.name,o,...r))return o.return;if(wc(c,k,o,...r))return o.return;k=k.parent,hu(o,"bubbling",k)}return hu(o,"bubbling",this),wc(c,"$document",o,...r),o.return}catch(o){P.rethrowUnexpectedError(o,this)}}_addEventListener(t,r,o){const c=tn(o.context||"$document"),u=Wk(this);for(const m of c){let b=u.get(m);b||(b=new(ee()),u.set(m,b)),this.listenTo(b,t,r,o)}}_removeEventListener(t,r){const o=Wk(this);for(const c of o.values())this.stopListening(c,t,r)}}}{const l=Uk(Object);["fire","_addEventListener","_removeEventListener"].forEach(t=>{Uk[t]=l.prototype[t]})}function hu(l,t,r){l instanceof vc&&(l._eventPhase=t,l._currentTarget=r)}function wc(l,t,r,...o){const c=typeof t=="string"?l.get(t):p5(l,t);return!!c&&(c.fire(r,...o),r.stop.called)}function p5(l,t){for(const[r,o]of l)if(typeof r=="function"&&r(t))return o;return null}function Wk(l){return l[Vk]||(l[Vk]=new Map),l[Vk]}class cf extends Uk(fe()){constructor(t){super(),this._postFixers=new Set,this.selection=new $k,this.roots=new so({idProperty:"rootName"}),this.stylesProcessor=t,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(t="main"){return this.roots.get(t)}registerPostFixer(t){this._postFixers.add(t)}
8463destroy(){this.roots.forEach(t=>t.destroy()),this.stopListening()}_callPostFixers(t){let r=!1;do for(const o of this._postFixers)if(r=o(t),r)break;while(r)}}class ol extends bi{constructor(t,r,o,c){super(t,r,o,c),this._priority=10,this._id=null,this._clonesGroup=null,this.getFillerOffset=MW}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(this.id===null)throw new P("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(t){return this.id!==null||t.id!==null?this.id===t.id:super.isSimilar(t)&&this.priority==t.priority}_clone(t=!1){const r=super._clone(t);return r._priority=this._priority,r._id=this._id,r}}function MW(){if(Hk(this))return null;let l=this.parent;for(;l&&l.is("attributeElement");){if(Hk(l)>1)return null;l=l.parent}return!l||Hk(l)>1?null:this.childCount}function Hk(l){return Array.from(l.getChildren()).filter(t=>!t.is("uiElement")).length}ol.DEFAULT_PRIORITY=10,ol.prototype.is=function(l,t){return t?t===this.name&&(l==="attributeElement"||l==="view:attributeElement"||l==="element"||l==="view:element"):l==="attributeElement"||l==="view:attributeElement"||l==="element"||l==="view:element"||l==="node"||l==="view:node"};class Gk extends bi{constructor(t,r,o,c){super(t,r,o,c),this.getFillerOffset=PW}_insertChild(t,r){if(r&&(r instanceof rl||Array.from(r).length>0))throw new P("view-emptyelement-cannot-add",[this,r]);return 0}}function PW(){return null}Gk.prototype.is=function(l,t){return t?t===this.name&&(l==="emptyElement"||l==="view:emptyElement"||l==="element"||l==="view:element"):l==="emptyElement"||l==="view:emptyElement"||l==="element"||l==="view:element"||l==="node"||l==="view:node"};class df extends bi{constructor(t,r,o,c){super(t,r,o,c),this.getFillerOffset=BW}_insertChild(t,r){if(r&&(r instanceof rl||Array.from(r).length>0))throw new P("view-uielement-cannot-add",[this,r]);return 0}render(t,r){return this.toDomElement(t)}toDomElement(t){const r=t.createElement(this.name);for(const o of this.getAttributeKeys())r.setAttribute(o,this.getAttribute(o));return r}}function OW(l){l.document.on("arrowKey",(t,r)=>function(o,c,u){if(c.keyCode==Mt.arrowright){const m=c.domTarget.ownerDocument.defaultView.getSelection(),b=m.rangeCount==1&&m.getRangeAt(0).collapsed;if(b||c.shiftKey){const k=m.focusNode,_=m.focusOffset,A=u.domPositionToView(k,_);if(A===null)return;let N=!1;const T=A.getLastMatchingPosition(O=>(O.item.is("uiElement")&&(N=!0),!(!O.item.is("uiElement")&&!O.item.is("attributeElement"))));if(N){const O=u.viewPositionToDom(T);b?m.collapse(O.parent,O.offset):m.extend(O.parent,O.offset)}}}}(0,r,l.domConverter),{priority:"low"})}function BW(){return null}df.prototype.is=function(l,t){return t?t===this.name&&(l==="uiElement"||l==="view:uiElement"||l==="element"||l==="view:element"):l==="uiElement"||l==="view:uiElement"||l==="element"||l==="view:element"||l==="node"||l==="view:node"};class qk extends bi{constructor(t,r,o,c){super(t,r,o,c),this.getFillerOffset=LW}_insertChild(t,r){if(r&&(r instanceof rl||Array.from(r).length>0))throw new P("view-rawelement-cannot-add",[this,r]);return 0}render(t,r){}}function LW(){return null}qk.prototype.is=function(l,t){return t?t===this.name&&(l==="rawElement"||l==="view:rawElement"||l==="element"||l==="view:element"):l==="rawElement"||l==="view:rawElement"||l===this.name||l==="view:"+this.name||l==="element"||l==="view:element"||l==="node"||l==="view:node"};class sl extends ee(nl){constructor(t,r){super(),this._children=[],this._customProperties=new Map,this.document=t,r&&this._insertChild(0,r)}[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(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(t){return this._insertChild(this.childCount,t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(t,r){this._fireChange("children",this);let o=0;const c=function(u,m){return typeof m=="string"?[new Zt(u,m)]:(Re(m)||(m=[m]),Array.from(m).map(b=>typeof b=="string"?new Zt(u,b):b instanceof zo?new Zt(u,b.data):b))}(this.document,r);for(const u of c)u.parent!==null&&u._remove(),u.parent=this,this._children.splice(t,0,u),t++,o++;return o}_removeChildren(t,r=1){this._fireChange("children",this);for(let o=t;o<t+r;o++)this._children[o].parent=null;return this._children.splice(t,r)}_fireChange(t,r){this.fire("change:"+t,r)}_setCustomProperty(t,r){this._customProperties.set(t,r)}_removeCustomProperty(t){return this._customProperties.delete(t)}}sl.prototype.is=function(l){return l==="documentFragment"||l==="view:documentFragment"};class g5{constructor(t){this._cloneGroups=new Map,this._slotFactory=null,this.document=t}setSelection(...t){this.document.selection._setTo(...t)}setSelectionFocus(t,r){this.document.selection._setFocus(t,r)}createDocumentFragment(t){return new sl(this.document,t)}createText(t){return new Zt(this.document,t)}createAttributeElement(t,r,o={}){const c=new ol(this.document,t,r);return typeof o.priority=="number"&&(c._priority=o.priority),o.id&&(c._id=o.id),o.renderUnsafeAttributes&&c._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),c}createContainerElement(t,r,o={},c={}){let u=null;_t(o)?c=o:u=o;const m=new uu(this.document,t,r,u);return c.renderUnsafeAttributes&&m._unsafeAttributesToRender.push(...c.renderUnsafeAttributes),m}createEditableElement(t,r,o={}){const c=new af(this.document,t,r);return o.renderUnsafeAttributes&&c._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),c}createEmptyElement(t,r,o={}){const c=new Gk(this.document,t,r);return o.renderUnsafeAttributes&&c._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),c}createUIElement(t,r,o){const c=new df(this.document,t,r);return o&&(c.render=o),c}createRawElement(t,r,o,c={}){const u=new qk(this.document,t,r);return o&&(u.render=o),c.renderUnsafeAttributes&&u._unsafeAttributesToRender.push(...c.renderUnsafeAttributes),u}setAttribute(t,r,o){o._setAttribute(t,r)}removeAttribute(t,r){r._removeAttribute(t)}addClass(t,r){r._addClass(t)}removeClass(t,r){r._removeClass(t)}setStyle(t,r,o){_t(t)&&o===void 0?r._setStyle(t):o._setStyle(t,r)}removeStyle(t,r){r._removeStyle(t)}setCustomProperty(t,r,o){o._setCustomProperty(t,r)}removeCustomProperty(t,r){return r._removeCustomProperty(t)}breakAttributes(t){return t instanceof Ge?this._breakAttributes(t):this._breakAttributesRange(t)}
vendor: 4,385 bytes, line 8463
8463breakContainer(t){const r=t.parent;if(!r.is("containerElement"))throw new P("view-writer-break-non-container-element",this.document);if(!r.parent)throw new P("view-writer-break-root",this.document);if(t.isAtStart)return Ge._createBefore(r);if(!t.isAtEnd){const o=r._clone(!1);this.insert(Ge._createAfter(r),o);const c=new wt(t,Ge._createAt(r,"end")),u=new Ge(o,0);this.move(c,u)}return Ge._createAfter(r)}mergeAttributes(t){const r=t.offset,o=t.parent;if(o.is("$text"))return t;if(o.is("attributeElement")&&o.childCount===0){const m=o.parent,b=o.index;return o._remove(),this._removeFromClonedElementsGroup(o),this.mergeAttributes(new Ge(m,b))}const c=o.getChild(r-1),u=o.getChild(r);if(!c||!u)return t;if(c.is("$text")&&u.is("$text"))return k5(c,u);if(c.is("attributeElement")&&u.is("attributeElement")&&c.isSimilar(u)){const m=c.childCount;return c._appendChild(u.getChildren()),u._remove(),this._removeFromClonedElementsGroup(u),this.mergeAttributes(new Ge(c,m))}return t}mergeContainers(t){const r=t.nodeBefore,o=t.nodeAfter;if(!(r&&o&&r.is("containerElement")&&o.is("containerElement")))throw new P("view-writer-merge-containers-invalid-position",this.document);const c=r.getChild(r.childCount-1),u=c instanceof Zt?Ge._createAt(c,"end"):Ge._createAt(r,"end");return this.move(wt._createIn(o),Ge._createAt(r,"end")),this.remove(wt._createOn(o)),u}insert(t,r){y5(r=Re(r)?[...r]:[r],this.document);const o=r.reduce((m,b)=>{const k=m[m.length-1],_=!b.is("uiElement");return k&&k.breakAttributes==_?k.nodes.push(b):m.push({breakAttributes:_,nodes:[b]}),m},[]);let c=null,u=t;for(const{nodes:m,breakAttributes:b}of o){const k=this._insertNodes(u,m,b);c||(c=k.start),u=k.end}return c?new wt(c,u):new wt(t)}remove(t){const r=t instanceof wt?t:wt._createOn(t);if(mu(r,this.document),r.isCollapsed)return new sl(this.document);const{start:o,end:c}=this._breakAttributesRange(r,!0),u=o.parent,m=c.offset-o.offset,b=u._removeChildren(o.offset,m);for(const _ of b)this._removeFromClonedElementsGroup(_);const k=this.mergeAttributes(o);return r.start=k,r.end=k.clone(),new sl(this.document,b)}clear(t,r){mu(t,this.document);const o=t.getWalker({direction:"backward",ignoreElementEnd:!0});for(const c of o){const u=c.item;let m;if(u.is("element")&&r.isSimilar(u))m=wt._createOn(u);else if(!c.nextPosition.isAfter(t.start)&&u.is("$textProxy")){const b=u.getAncestors().find(k=>k.is("element")&&r.isSimilar(k));b&&(m=wt._createIn(b))}m&&(m.end.isAfter(t.end)&&(m.end=t.end),m.start.isBefore(t.start)&&(m.start=t.start),this.remove(m))}}move(t,r){let o;if(r.isAfter(t.end)){const c=(r=this._breakAttributes(r,!0)).parent,u=c.childCount;t=this._breakAttributesRange(t,!0),o=this.remove(t),r.offset+=c.childCount-u}else o=this.remove(t);return this.insert(r,o)}wrap(t,r){if(!(r instanceof ol))throw new P("view-writer-wrap-invalid-attribute",this.document);if(mu(t,this.document),t.isCollapsed){let c=t.start;c.parent.is("element")&&(o=c.parent,!Array.from(o.getChildren()).some(m=>!m.is("uiElement")))&&(c=c.getLastMatchingPosition(m=>m.item.is("uiElement"))),c=this._wrapPosition(c,r);const u=this.document.selection;return u.isCollapsed&&u.getFirstPosition().isEqual(t.start)&&this.setSelection(c),new wt(c)}return this._wrapRange(t,r);var o}unwrap(t,r){if(!(r instanceof ol))throw new P("view-writer-unwrap-invalid-attribute",this.document);if(mu(t,this.document),t.isCollapsed)return t;const{start:o,end:c}=this._breakAttributesRange(t,!0),u=o.parent,m=this._unwrapChildren(u,o.offset,c.offset,r),b=this.mergeAttributes(m.start);b.isEqual(m.start)||m.end.offset--;const k=this.mergeAttributes(m.end);return new wt(b,k)}rename(t,r){const o=new uu(this.document,t,r.getAttributes());return this.insert(Ge._createAfter(r),o),this.move(wt._createIn(r),Ge._createAt(o,0)),this.remove(wt._createOn(r)),o}clearClonedElementsGroup(t){this._cloneGroups.delete(t)}createPositionAt(t,r){return Ge._createAt(t,r)}createPositionAfter(t){return Ge._createAfter(t)}createPositionBefore(t){return Ge._createBefore(t)}createRange(t,r){return new wt(t,r)}createRangeOn(t){return wt._createOn(t)}createRangeIn(t){return wt._createIn(t)}createSelection(...t){return new lo(...t)}createSlot(t="children"){if(!this._slotFactory)throw new P("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,t)}_registerSlotFactory(t){this._slotFactory=t}_clearSlotFactory(){this._slotFactory=null}
vendor: 6,305 bytes, line 8463
8463_insertNodes(t,r,o){let c,u;if(c=o?Kk(t):t.parent.is("$text")?t.parent.parent:t.parent,!c)throw new P("view-writer-invalid-position-container",this.document);u=o?this._breakAttributes(t,!0):t.parent.is("$text")?Yk(t):t;const m=c._insertChild(u.offset,r);for(const A of r)this._addToClonedElementsGroup(A);const b=u.getShiftedBy(m),k=this.mergeAttributes(u);k.isEqual(u)||b.offset--;const _=this.mergeAttributes(b);return new wt(k,_)}_wrapChildren(t,r,o,c){let u=r;const m=[];for(;u<o;){const k=t.getChild(u),_=k.is("$text"),A=k.is("attributeElement");if(A&&this._wrapAttributeElement(c,k))m.push(new Ge(t,u));else if(_||!A||RW(c,k)){const N=c._clone();k._remove(),N._appendChild(k),t._insertChild(u,N),this._addToClonedElementsGroup(N),m.push(new Ge(t,u))}else this._wrapChildren(k,0,k.childCount,c);u++}let b=0;for(const k of m)k.offset-=b,k.offset!=r&&(this.mergeAttributes(k).isEqual(k)||(b++,o--));return wt._createFromParentsAndOffsets(t,r,t,o)}_unwrapChildren(t,r,o,c){let u=r;const m=[];for(;u<o;){const k=t.getChild(u);if(k.is("attributeElement"))if(k.isSimilar(c)){const _=k.getChildren(),A=k.childCount;k._remove(),t._insertChild(u,_),this._removeFromClonedElementsGroup(k),m.push(new Ge(t,u),new Ge(t,u+A)),u+=A,o+=A-1}else this._unwrapAttributeElement(c,k)?(m.push(new Ge(t,u),new Ge(t,u+1)),u++):(this._unwrapChildren(k,0,k.childCount,c),u++);else u++}let b=0;for(const k of m)k.offset-=b,!(k.offset==r||k.offset==o)&&(this.mergeAttributes(k).isEqual(k)||(b++,o--));return wt._createFromParentsAndOffsets(t,r,t,o)}_wrapRange(t,r){const{start:o,end:c}=this._breakAttributesRange(t,!0),u=o.parent,m=this._wrapChildren(u,o.offset,c.offset,r),b=this.mergeAttributes(m.start);b.isEqual(m.start)||m.end.offset--;const k=this.mergeAttributes(m.end);return new wt(b,k)}_wrapPosition(t,r){if(r.isSimilar(t.parent))return b5(t.clone());t.parent.is("$text")&&(t=Yk(t));const o=this.createAttributeElement("_wrapPosition-fake-element");o._priority=Number.POSITIVE_INFINITY,o.isSimilar=()=>!1,t.parent._insertChild(t.offset,o);const c=new wt(t,t.getShiftedBy(1));this.wrap(c,r);const u=new Ge(o.parent,o.index);o._remove();const m=u.nodeBefore,b=u.nodeAfter;return m instanceof Zt&&b instanceof Zt?k5(m,b):b5(u)}_wrapAttributeElement(t,r){if(!x5(t,r)||t.name!==r.name||t.priority!==r.priority)return!1;for(const o of t.getAttributeKeys())if(o!=="class"&&o!=="style"&&r.hasAttribute(o)&&r.getAttribute(o)!==t.getAttribute(o))return!1;for(const o of t.getStyleNames())if(r.hasStyle(o)&&r.getStyle(o)!==t.getStyle(o))return!1;for(const o of t.getAttributeKeys())o!=="class"&&o!=="style"&&(r.hasAttribute(o)||this.setAttribute(o,t.getAttribute(o),r));for(const o of t.getStyleNames())r.hasStyle(o)||this.setStyle(o,t.getStyle(o),r);for(const o of t.getClassNames())r.hasClass(o)||this.addClass(o,r);return!0}_unwrapAttributeElement(t,r){if(!x5(t,r)||t.name!==r.name||t.priority!==r.priority)return!1;for(const o of t.getAttributeKeys())if(o!=="class"&&o!=="style"&&(!r.hasAttribute(o)||r.getAttribute(o)!==t.getAttribute(o)))return!1;if(!r.hasClass(...t.getClassNames()))return!1;for(const o of t.getStyleNames())if(!r.hasStyle(o)||r.getStyle(o)!==t.getStyle(o))return!1;for(const o of t.getAttributeKeys())o!=="class"&&o!=="style"&&this.removeAttribute(o,r);return this.removeClass(Array.from(t.getClassNames()),r),this.removeStyle(Array.from(t.getStyleNames()),r),!0}_breakAttributesRange(t,r=!1){const o=t.start,c=t.end;if(mu(t,this.document),t.isCollapsed){const k=this._breakAttributes(t.start,r);return new wt(k,k)}const u=this._breakAttributes(c,r),m=u.parent.childCount,b=this._breakAttributes(o,r);return u.offset+=u.parent.childCount-m,new wt(b,u)}_breakAttributes(t,r=!1){const o=t.offset,c=t.parent;if(t.parent.is("emptyElement"))throw new P("view-writer-cannot-break-empty-element",this.document);if(t.parent.is("uiElement"))throw new P("view-writer-cannot-break-ui-element",this.document);if(t.parent.is("rawElement"))throw new P("view-writer-cannot-break-raw-element",this.document);if(!r&&c.is("$text")&&Qk(c.parent)||Qk(c))return t.clone();if(c.is("$text"))return this._breakAttributes(Yk(t),r);if(o==c.childCount){const u=new Ge(c.parent,c.index+1);return this._breakAttributes(u,r)}if(o===0){const u=new Ge(c.parent,c.index);return this._breakAttributes(u,r)}{const u=c.index+1,m=c._clone();c.parent._insertChild(u,m),this._addToClonedElementsGroup(m);const b=c.childCount-o,k=c._removeChildren(o,b);m._appendChild(k);const _=new Ge(c.parent,u);return this._breakAttributes(_,r)}}_addToClonedElementsGroup(t){if(!t.root.is("rootElement"))return;if(t.is("element"))for(const c of t.getChildren())this._addToClonedElementsGroup(c);const r=t.id;if(!r)return;let o=this._cloneGroups.get(r);o||(o=new Set,this._cloneGroups.set(r,o)),o.add(t),t._clonesGroup=o}_removeFromClonedElementsGroup(t){if(t.is("element"))for(const c of t.getChildren())this._removeFromClonedElementsGroup(c);const r=t.id;if(!r)return;const o=this._cloneGroups.get(r);o&&o.delete(t)}}function Kk(l){let t=l.parent;for(;!Qk(t);){if(!t)return;t=t.parent}return t}function RW(l,t){return l.priority<t.priority||!(l.priority>t.priority)&&l.getIdentity()<t.getIdentity()}function b5(l){const t=l.nodeBefore;if(t&&t.is("$text"))return new Ge(t,t.data.length);const r=l.nodeAfter;return r&&r.is("$text")?new Ge(r,0):l}function Yk(l){if(l.offset==l.parent.data.length)return new Ge(l.parent.parent,l.parent.index+1);if(l.offset===0)return new Ge(l.parent.parent,l.parent.index);const t=l.parent.data.slice(l.offset);return l.parent._data=l.parent.data.slice(0,l.offset),l.parent.parent._insertChild(l.parent.index+1,new Zt(l.root.document,t)),new Ge(l.parent.parent,l.parent.index+1)}function k5(l,t){const r=l.data.length;return l._data+=t.data,t._remove(),new Ge(l,r)}const zW=[Zt,ol,uu,Gk,qk,df];function y5(l,t){for(const r of l){if(!zW.some(o=>r instanceof o))throw new P("view-writer-insert-invalid-node-type",t);r.is("$text")||y5(r.getChildren(),t)}}function Qk(l){return l&&(l.is("containerElement")||l.is("documentFragment"))}function mu(l,t){const r=Kk(l.start),o=Kk(l.end);if(!r||!o||r!==o)throw new P("view-writer-invalid-range-container",t)}function x5(l,t){return l.id===null&&t.id===null}const v5=l=>l.createTextNode("Â "),w5=l=>{const t=l.createElement("span");return t.dataset.ckeFiller="true",t.innerText="Â ",t}
8463,_5=l=>{const t=l.createElement("br");return t.dataset.ckeFiller="true",t},co=7,fu="â ".repeat(co);function ki(l){return typeof l=="string"?l.substr(0,co)===fu:Sn(l)&&l.data.substr(0,co)===fu}function _c(l){return l.data.length==co&&ki(l)}function A5(l){const t=typeof l=="string"?l:l.data;return ki(l)?t.slice(co):t}function FW(l,t){if(t.keyCode==Mt.arrowleft){const r=t.domTarget.ownerDocument.defaultView.getSelection();if(r.rangeCount==1&&r.getRangeAt(0).collapsed){const o=r.getRangeAt(0).startContainer,c=r.getRangeAt(0).startOffset;ki(o)&&c<=co&&r.collapse(o,0)}}}var C5=d(8264),$W={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(C5.A,$W),C5.A.locals;class VW extends fe(){constructor(t,r){super(),this.domDocuments=new Set,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this._inlineFiller=null,this._fakeSelectionContainer=null,this.domConverter=t,this.selection=r,this.set("isFocused",!1),this.set("isSelecting",!1),y.isBlink&&!y.isAndroid&&this.on("change:isSelecting",()=>{this.isSelecting||this.render()}),this.set("isComposing",!1),this.on("change:isComposing",()=>{this.isComposing||this.render()})}markToSync(t,r){if(t==="text")this.domConverter.mapViewToDom(r.parent)&&this.markedTexts.add(r);else{if(!this.domConverter.mapViewToDom(r))return;if(t==="attributes")this.markedAttributes.add(r);else{if(t!=="children")throw new P("view-renderer-unknown-type",this);this.markedChildren.add(r)}}}render(){if(this.isComposing&&!y.isAndroid)return;let t=null;const r=!(y.isBlink&&!y.isAndroid)||!this.isSelecting;for(const o of this.markedChildren)this._updateChildrenMappings(o);r?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?t=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(t=this.selection.getFirstPosition(),this.markedChildren.add(t.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(t=this.domConverter.domPositionToView(this._inlineFiller),t&&t.parent.is("$text")&&(t=Ge._createBefore(t.parent)));for(const o of this.markedAttributes)this._updateAttrs(o);for(const o of this.markedChildren)this._updateChildren(o,{inlineFillerPosition:t});for(const o of this.markedTexts)!this.markedChildren.has(o.parent)&&this.domConverter.mapViewToDom(o.parent)&&this._updateText(o,{inlineFillerPosition:t});if(r)if(t){const o=this.domConverter.viewPositionToDom(t),c=o.parent.ownerDocument;ki(o.parent)?this._inlineFiller=o.parent:this._inlineFiller=j5(c,o.parent,o.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.domConverter._clearTemporaryCustomProperties(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(t){const r=this.domConverter.mapViewToDom(t);if(!r)return;const o=Array.from(r.childNodes),c=Array.from(this.domConverter.viewChildrenToDom(t,{withChildren:!1})),u=this._diffNodeLists(o,c),m=this._findUpdateActions(u,o,c,UW);if(m.indexOf("update")!==-1){const b={equal:0,insert:0,delete:0};for(const k of m)if(k==="update"){const _=b.equal+b.insert,A=b.equal+b.delete,N=t.getChild(_);!N||N.is("uiElement")||N.is("rawElement")||this._updateElementMappings(N,o[A]),N2(c[_]),b.equal++}else b[k]++}}_updateElementMappings(t,r){this.domConverter.unbindDomElement(r),this.domConverter.bindElements(r,t),this.markedChildren.add(t),this.markedAttributes.add(t)}_getInlineFillerPosition(){const t=this.selection.getFirstPosition();return t.parent.is("$text")?Ge._createBefore(t.parent):t}_isSelectionInInlineFiller(){if(this.selection.rangeCount!=1||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),r=this.domConverter.viewPositionToDom(t);return!!(r&&Sn(r.parent)&&ki(r.parent))}_removeInlineFiller(){const t=this._inlineFiller;if(!ki(t))throw new P("view-renderer-filler-was-lost",this);_c(t)?t.remove():t.data=t.data.substr(co),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(this.selection.rangeCount!=1||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),r=t.parent,o=t.offset;if(!this.domConverter.mapViewToDom(r.root)||!r.is("element")||!function(m){if(m.getAttribute("contenteditable")=="false")return!1;
8463const b=m.findAncestor(k=>k.hasAttribute("contenteditable"));return!b||b.getAttribute("contenteditable")=="true"}(r))return!1;const c=t.nodeBefore,u=t.nodeAfter;return!(c instanceof Zt||u instanceof Zt)&&!!(o!==r.getFillerOffset()||c&&c.is("element","br"))&&(!y.isAndroid||!c&&!u)}_updateText(t,r){const o=this.domConverter.findCorrespondingDomText(t);let c=this.domConverter.viewToDom(t).data;const u=r.inlineFillerPosition;u&&u.parent==t.parent&&u.offset==t.index&&(c=fu+c),N5(o,c)}_updateAttrs(t){const r=this.domConverter.mapViewToDom(t);if(!r)return;const o=Array.from(r.attributes).map(u=>u.name),c=t.getAttributeKeys();for(const u of c)this.domConverter.setDomElementAttribute(r,u,t.getAttribute(u),t);for(const u of o)t.hasAttribute(u)||this.domConverter.removeDomElementAttribute(r,u)}_updateChildren(t,r){const o=this.domConverter.mapViewToDom(t);if(!o)return;if(y.isAndroid){let N=null;for(const T of Array.from(o.childNodes)){if(N&&Sn(N)&&Sn(T)){o.normalize();break}N=T}}const c=r.inlineFillerPosition,u=o.childNodes,m=Array.from(this.domConverter.viewChildrenToDom(t,{bind:!0}));c&&c.parent===t&&j5(o.ownerDocument,m,c.offset);const b=this._diffNodeLists(u,m),k=this._findUpdateActions(b,u,m,WW);let _=0;const A=new Set;for(const N of k)N==="delete"?(A.add(u[_]),N2(u[_])):N!=="equal"&&N!=="update"||_
8463++;_=0;for(const N of k)N==="insert"?(_2(o,_,m[_]),_++):N==="update"?(N5(u[_],m[_].data),_++):N==="equal"&&(this._markDescendantTextToSync(this.domConverter.domToView(m[_])),_++);for(const N of A)N.parentNode||this.domConverter.unbindDomElement(N)}_diffNodeLists(t,r){return t=function(o,c){const u=Array.from(o);return u.length==0||!c||u[u.length-1]==c&&u.pop(),u}(t,this._fakeSelectionContainer),S(t,r,HW.bind(null,this.domConverter))}_findUpdateActions(t,r,o,c){if(t.indexOf("insert")===-1||t.indexOf("delete")===-1)return t;let u=[],m=[],b=[];const k={equal:0,insert:0,delete:0};for(const _ of t)_==="insert"?b.push(o[k.equal+k.insert]):_==="delete"?m.push(r[k.equal+k.delete]):(u=u.concat(S(m,b,c).map(A=>A==="equal"?"update":A)),u.push("equal"),m=[],b=[]),k[_]++;return u.concat(S(m,b,c).map(_=>_==="equal"?"update":_))}_markDescendantTextToSync(t){if(t){if(t.is("$text"))this.markedTexts.add(t);else if(t.is("element"))for(const r of t.getChildren())this._markDescendantTextToSync(r)}}_updateSelection(){if(y.isBlink&&!y.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(this.selection.rangeCount===0)return this._removeDomSelection(),void this._removeFakeSelection();const t=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&t&&(this.selection.isFake?this._updateFakeSelection(t):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(t)):this.isComposing&&y.isAndroid||this._updateDomSelection(t))}_updateFakeSelection(t){const r=t.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(m){const b=m.createElement("div");return b.className="ck-fake-selection-container",Object.assign(b.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),b.textContent="Â ",b}(r));const o=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(o,this.selection),!this._fakeSelectionNeedsUpdate(t))return;o.parentElement&&o.parentElement==t||t.appendChild(o),o.textContent=this.selection.fakeSelectionLabel||"Â ";const c=r.getSelection(),u=r.createRange();c.removeAllRanges(),u.selectNodeContents(o),c.addRange(u)}_updateDomSelection(t){const r=t.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(r))return;const o=this.domConverter.viewPositionToDom(this.selection.anchor),c=this.domConverter.viewPositionToDom(this.selection.focus);r.setBaseAndExtent(o.parent,o.offset,c.parent,c.offset),y.isGecko&&function(u,m){let b=u.parent,k=u.offset;if(Sn(b)&&_c(b)&&(k=su(b)+1,b=b.parentNode),b.nodeType!=Node.ELEMENT_NODE||k!=b.childNodes.length-1)return;const _=b.childNodes[k];_&&_.tagName=="BR"&&m.addRange(m.getRangeAt(0))}(c,r)}_domSelectionNeedsUpdate(t){if(!this.domConverter.isDomSelectionCorrect(t))return!0;const r=t&&this.domConverter.domSelectionToView(t);return(!r||!this.selection.isEqual(r))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(r))}_fakeSelectionNeedsUpdate(t){const r=this._fakeSelectionContainer,o=t.ownerDocument.getSelection();return!r||r.parentElement!==t||o.anchorNode!==r&&!r.contains(o.anchorNode)||r.textContent!==this.selection.fakeSelectionLabel}_removeDomSelection(){for(const t of this.domDocuments){const r=t.getSelection();if(r.rangeCount){const o=t.activeElement,c=this.domConverter.mapDomToView(o);o&&c&&r.removeAllRanges()}}}_removeFakeSelection(){const t=this._fakeSelectionContainer;t&&t.remove()}_updateFocus(){if(this.isFocused){const t=this.selection.editableElement;t&&this.domConverter.focus(t)}}}function j5(l,t,r){const o=t instanceof Array?t:t.childNodes,c=o[r];if(Sn(c))return c.data=fu+c.data,c;{const u=l.createTextNode(fu);return Array.isArray(t)?o.splice(r,0,u):_2(t,r,u),u}}function UW(l,t){return ia(l)&&ia(t)&&!Sn(l)&&!Sn(t)&&!au(l)&&!au(t)&&l.tagName.toLowerCase()===t.tagName.toLowerCase()}function WW(l,t){return ia(l)&&ia(t)&&Sn(l)&&Sn(t)}function HW(l,t,r){return t===r||(Sn(t)&&Sn(r)?t.data===r.data:!(!l.isBlockFiller(t)||!l.isBlockFiller(r)))}function N5(l,t){const r=l.data;if(r==t)return;const o=w(r,t);for(const c of o)c.type==="insert"?l.insertData(c.index,c.values.join("")):l.deleteData(c.index,c.howMany)}const GW=_5(g.document),qW=v5(g.document),KW=w5(g.document),uf="data-ck-unsafe-attribute-",E5="data-ck-unsafe-element";class hf{constructor(t,{blockFillerMode:r,renderingMode:o="editing"}={}){this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new Fo,this._inlineObjectElementMatcher=new Fo,this._elementsWithTemporaryCustomProperties=new Set,this.document=t,this.renderingMode=o,this.blockFillerMode=r||(o==="editing"?"br":"nbsp"),this.preElements=["pre"],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"?g.document:g.document.implementation.createHTMLDocument("")}bindFakeSelection(t,r){this._fakeSelectionMapping.set(t,new lo(r))}fakeSelectionToView(t){return this._fakeSelectionMapping.get(t)}bindElements(t,r){this._domToViewMapping.set(t,r),this._viewToDomMapping.set(r,t)}unbindDomElement(t){const r=this._domToViewMapping.get(t);if(r){this._domToViewMapping.delete(t),this._viewToDomMapping.delete(r);for(const o of Array.from(t.children))this.unbindDomElement(o)}}bindDocumentFragments(t,r){this._domToViewMapping.set(t,r),this._viewToDomMapping.set(r,t)}shouldRenderAttribute(t,r,o){return this.renderingMode==="data"||!(t=t.toLowerCase()).startsWith("on")&&(t!=="srcdoc"||!r.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&(o==="img"&&(t==="src"||t==="srcset")||o==="source"&&t==="srcset"||!r.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))}setContentOf(t,r){if(this.renderingMode==="data")return void(t.innerHTML=r);const o=new DOMParser().parseFromString(r,"text/html"),c=o.createDocumentFragment(),u=o.body.childNodes;for(;u.length>0;)c.appendChild(u[0]);const m=o.createTreeWalker(c,NodeFilter.SHOW_ELEMENT),b=[];let k;for(;k=m.nextNode();)b.push(k);for(const _ of b){for(const N of _.getAttributeNames())this.setDomElementAttribute(_,N,_.getAttribute(N));const A=_.tagName.toLowerCase();this._shouldRenameElement(A)&&(T5(A),_.replaceWith(this._createReplacementDomElement(A,_)))}for(;t.firstChild;)t.firstChild.remove();t.append(c)}viewToDom(t,r={}){if(t.is("$text")){const o=this._processDataFromViewText(t);return this._domDocument.createTextNode(o)}{const o=t;if(this.mapViewToDom(o)){if(!o.getCustomProperty("editingPipeline:doNotReuseOnce"))return this.mapViewToDom(o);this._elementsWithTemporaryCustomProperties.add(o)}let c;if(o.is("documentFragment"))c=this._domDocument.createDocumentFragment(),r.bind&&this.bindDocumentFragments(c,o);else{if(o.is("uiElement"))return c=o.name==="$comment"?this._domDocument.createComment(o.getCustomProperty("$rawContent")):o.render(this._domDocument,this),r.bind&&this.bindElements(c,o),c;this._shouldRenameElement(o.name)?(T5(o.name),c=this._createReplacementDomElement(o.name)):c=o.hasAttribute("xmlns")?this._domDocument.createElementNS(o.getAttribute("xmlns"),o.name):this._domDocument.createElement(o.name),o.is("rawElement")&&o.render(c,this),r.bind&&this.bindElements(c,o);for(const u of o.getAttributeKeys())this.setDomElementAttribute(c,u,o.getAttribute(u),o)}if(r.withChildren!==!1)for(const u of this.viewChildrenToDom(o,r))c instanceof HTMLTemplateElement?c.content.appendChild(u):c.appendChild(u);return c}}setDomElementAttribute(t,r,o,c){const u=this.shouldRenderAttribute(r,o,t.tagName.toLowerCase())||c&&c.shouldRenderUnsafeAttribute(r);u||z("domconverter-unsafe-attribute-detected",{domElement:t,key:r,value:o}),function(m){try{g.document.createAttribute(m)}catch{return!1}return!0}(r)?(t.hasAttribute(r)&&!u?t.removeAttribute(r):t.hasAttribute(uf+r)&&u&&t.removeAttribute(uf+r),t.setAttribute(u?r:uf+r,o)):z("domconverter-invalid-attribute-detected",{domElement:t,key:r,value:o})}removeDomElementAttribute(t,r){r!=E5&&(t.removeAttribute(r),t.removeAttribute(uf+r))}*viewChildrenToDom(t,r={}){const o=t.getFillerOffset&&t.getFillerOffset();let c=0;for(const u of t.getChildren()){o===c&&(yield this._getBlockFiller());const m=u.is("element")&&!!u.getCustomProperty("dataPipeline:transparentRendering")&&!rr(u.getAttributes());m&&this.renderingMode=="data"?yield*this.viewChildrenToDom(u,r):(m&&z("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:u}),yield this.viewToDom(u,r)),c++}o===c&&(yield this._getBlockFiller())}viewRangeToDom(t){const r=this.viewPositionToDom(t.start),o=this.viewPositionToDom(t.end),c=this._domDocument.createRange();return c.setStart(r.parent,r.offset),c.setEnd(o.parent,o.offset),c}viewPositionToDom(t){const r=t.parent;if(r.is("$text")){const o=this.findCorrespondingDomText(r);if(!o)return null;
8463let c=t.offset;return ki(o)&&(c+=co),{parent:o,offset:c}}{let o,c,u;if(t.offset===0){if(o=this.mapViewToDom(r),!o)return null;u=o.childNodes[0]}else{const m=t.nodeBefore;if(c=m.is("$text")?this.findCorrespondingDomText(m):this.mapViewToDom(m),!c)return null;o=c.parentNode,u=c.nextSibling}return Sn(u)&&ki(u)?{parent:u,offset:co}:{parent:o,offset:c?su(c)+1:0}}}domToView(t,r={}){const o=[],c=this._domToView(t,r,o),u=c.next().value;return u?(c.next(),this._processDomInlineNodes(null,o,r),u.is("$text")&&u.data.length==0?null:u):null}*domChildrenToView(t,r={},o=[]){let c=[];c=t instanceof HTMLTemplateElement?[...t.content.childNodes]:[...t.childNodes];for(let u=0;u<c.length;u++){const m=c[u],b=this._domToView(m,r,o),k=b.next().value;k!==null&&(this._isBlockViewElement(k)&&this._processDomInlineNodes(t,o,r),yield k,b.next())}this._processDomInlineNodes(t,o,r)}domSelectionToView(t){if(function(c){if(!y.isGecko||!c.rangeCount)return!1;const u=c.getRangeAt(0).startContainer;try{Object.prototype.toString.call(u)}catch{return!0}return!1}(t))return new lo([]);if(t.rangeCount===1){let c=t.getRangeAt(0).startContainer;Sn(c)&&(c=c.parentNode);const u=this.fakeSelectionToView(c);if(u)return u}const r=this.isDomSelectionBackward(t),o=[];for(let c=0;c<t.rangeCount;c++){const u=t.getRangeAt(c),m=this.domRangeToView(u);m&&o.push(m)}return new lo(o,{backward:r})}domRangeToView(t){const r=this.domPositionToView(t.startContainer,t.startOffset),o=this.domPositionToView(t.endContainer,t.endOffset);return r&&o?new wt(r,o):null}domPositionToView(t,r=0){if(this.isBlockFiller(t))return this.domPositionToView(t.parentNode,su(t));const o=this.mapDomToView(t);if(o&&(o.is("uiElement")||o.is("rawElement")))return Ge._createBefore(o);if(Sn(t)){if(_c(t))return this.domPositionToView(t.parentNode,su(t));const c=this.findCorrespondingViewText(t);let u=r;return c?(ki(t)&&(u-=co,u=u<0?0:u),new Ge(c,u)):null}if(r===0){const c=this.mapDomToView(t);if(c)return new Ge(c,0)}else{const c=t.childNodes[r-1];if(Sn(c)&&_c(c)||c&&this.isBlockFiller(c))return this.domPositionToView(c.parentNode,su(c));const u=Sn(c)?this.findCorrespondingViewText(c):this.mapDomToView(c);if(u&&u.parent)return new Ge(u.parent,u.index+1)}return null}mapDomToView(t){return this.getHostViewElement(t)||this._domToViewMapping.get(t)}findCorrespondingViewText(t){if(_c(t))return null;const r=this.getHostViewElement(t);if(r)return r;const o=t.previousSibling;if(o){if(!this.isElement(o))return null;const c=this.mapDomToView(o);if(c){const u=c.nextSibling;return u instanceof Zt?u:null}}else{const c=this.mapDomToView(t.parentNode);if(c){const u=c.getChild(0);return u instanceof Zt?u:null}}return null}mapViewToDom(t){return this._viewToDomMapping.get(t)}findCorrespondingDomText(t){const r=t.previousSibling;return r&&this.mapViewToDom(r)?this.mapViewToDom(r).nextSibling:!r&&t.parent&&this.mapViewToDom(t.parent)?this.mapViewToDom(t.parent).childNodes[0]:null}focus(t){const r=this.mapViewToDom(t);if(r&&r.ownerDocument.activeElement!==r){const{scrollX:o,scrollY:c}=g.window,u=[];S5(r,m=>{const{scrollLeft:b,scrollTop:k}=m;u.push([b,k])}),r.focus(),S5(r,m=>{const[b,k]=u.shift();m.scrollLeft=b,m.scrollTop=k}),g.window.scrollTo(o,c)}}_clearDomSelection(){const t=this.mapViewToDom(this.document.selection.editableElement);if(!t)return;const r=t.ownerDocument.defaultView.getSelection(),o=this.domSelectionToView(r);o&&o.rangeCount>0&&r.removeAllRanges()}isElement(t){return t&&t.nodeType==Node.ELEMENT_NODE}isDocumentFragment(t){return t&&t.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(t){return this.blockFillerMode=="br"?t.isEqualNode(GW):!(t.tagName!=="BR"||!D5(t,this.blockElements)||t.parentNode.childNodes.length!==1)||t.isEqualNode(KW)||function(r,o){return r.isEqualNode(qW)&&D5(r,o)&&r.parentNode.childNodes.length===1}(t,this.blockElements)}isDomSelectionBackward(t){if(t.isCollapsed)return!1;const r=this._domDocument.createRange();try{r.setStart(t.anchorNode,t.anchorOffset),r.setEnd(t.focusNode,t.focusOffset)}catch{return!1}const o=r.collapsed;return r.detach(),o}getHostViewElement(t){const r=function(o){const c=[];let u=o;for(;u&&u.nodeType!=Node.DOCUMENT_NODE;)c.unshift(u),u=u.parentNode;return c}(t);for(r.pop();r.length;){const o=r.pop(),c=this._domToViewMapping.get(o);if(c&&(c.is("uiElement")||c.is("rawElement")))return c}return null}isDomSelectionCorrect(t){return this._isDomSelectionPositionCorrect(t.anchorNode,t.anchorOffset)&&this._isDomSelectionPositionCorrect(t.focusNode,t.focusOffset)}registerRawContentMatcher(t){this._rawContentElementMatcher.add(t)}registerInlineObjectMatcher(t){this._inlineObjectElementMatcher.add(t)}_clearTemporaryCustomProperties(){for(const t of this._elementsWithTemporaryCustomProperties)t._removeCustomProperty("editingPipeline:doNotReuseOnce");this._elementsWithTemporaryCustomProperties.clear()}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return v5(this._domDocument);case"markedNbsp":return w5(this._domDocument);case"br":return _5(this._domDocument)}}_isDomSelectionPositionCorrect(t,r){if(Sn(t)&&ki(t)&&r<co||this.isElement(t)&&ki(t.childNodes[r]))return!1;const o=this.mapDomToView(t);return!o||!o.is("uiElement")&&!o.is("rawElement")}*_domToView(t,r,o){if(this.isBlockFiller(t))return null;const c=this.getHostViewElement(t);if(c)return c;
8463if(au(t)&&r.skipComments)return null;if(Sn(t)){if(_c(t))return null;{const u=t.data;if(u==="")return null;const m=new Zt(this.document,u);return o.push(m),m}}{let u=this.mapDomToView(t);if(u)return this._isInlineObjectElement(u)&&o.push(u),u;if(this.isDocumentFragment(t))u=new sl(this.document),r.bind&&this.bindDocumentFragments(t,u);else{u=this._createViewElement(t,r),r.bind&&this.bindElements(t,u);const b=t.attributes;if(b)for(let k=b.length,_=0;_<k;_++)u._setAttribute(b[_].name,b[_].value);if(this._isViewElementWithRawContent(u,r))return u._setCustomProperty("$rawContent",t.innerHTML),this._isBlockViewElement(u)||o.push(u),u;if(au(t))return u._setCustomProperty("$rawContent",t.data),u}yield u;const m=[];if(r.withChildren!==!1)for(const b of this.domChildrenToView(t,r,m))u._appendChild(b);if(this._isInlineObjectElement(u))o.push(u);else for(const b of m)o.push(b)}}_processDomInlineNodes(t,r,o){if(!r.length||t&&!this.isDocumentFragment(t)&&!this._isBlockDomElement(t))return;let c=!1;for(let u=0;u<r.length;u++){const m=r[u];if(!m.is("$text")){c=!1;continue}let b,k=!1;if(YW(m,this.preElements))b=A5(m.data);else{b=m.data.replace(/[ \n\t\r]{1,}/g," "),k=/[^\S\u00A0]/.test(b.charAt(b.length-1));const _=u>0?r[u-1]:null,A=u+1<r.length?r[u+1]:null,N=!_||_.is("element")&&_.name=="br"||c,T=!A&&!ki(m.data);o.withChildren!==!1&&(N&&(b=b.replace(/^ /,"")),T&&(b=b.replace(/ $/,""))),b=A5(b),b=b.replace(/ \u00A0/g," ");const O=A&&A.is("element")&&A.name!="br",L=A&&A.is("$text")&&A.data.charAt(0)==" ";(/[ \u00A0]\u00A0$/.test(b)||!A||O||L)&&(b=b.replace(/\u00A0$/," ")),(N||_&&_.is("element")&&_.name!="br")&&(b=b.replace(/^\u00A0/," "))}b.length==0&&m.parent?(m._remove(),r.splice(u,1),u--):(m._data=b,c=k)}r.length=0}_processDataFromViewText(t){let r=t.data;if(t.getAncestors().some(o=>this.preElements.includes(o.name)))return r;if(r.charAt(0)==" "){const o=this._getTouchingInlineViewNode(t,!1);!(o&&o.is("$textProxy")&&this._nodeEndsWithSpace(o))&&o||(r="Â "+r.substr(1))}if(r.charAt(r.length-1)==" "){const o=this._getTouchingInlineViewNode(t,!0),c=o&&o.is("$textProxy")&&o.data.charAt(0)==" ";r.charAt(r.length-2)!=" "&&o&&!c||(r=r.substr(0,r.length-1)+"Â ")}return r.replace(/ {2}/g," Â ")}_nodeEndsWithSpace(t){if(t.getAncestors().some(o=>this.preElements.includes(o.name)))return!1;const r=this._processDataFromViewText(t);return r.charAt(r.length-1)==" "}_getTouchingInlineViewNode(t,r){const o=new il({startPosition:r?Ge._createAfter(t):Ge._createBefore(t),direction:r?"forward":"backward"});for(const c of o){if(c.item.is("element","br"))return null;if(this._isInlineObjectElement(c.item))return c.item;if(c.item.is("containerElement"))return null;if(c.item.is("$textProxy"))return c.item}return null}_isBlockDomElement(t){return this.isElement(t)&&this.blockElements.includes(t.tagName.toLowerCase())}_isBlockViewElement(t){return t.is("element")&&this.blockElements.includes(t.name)}_isInlineObjectElement(t){return!!t.is("element")&&(t.name=="br"||this.inlineObjectElements.includes(t.name)||!!this._inlineObjectElementMatcher.match(t))}_createViewElement(t,r){if(au(t))return new df(this.document,"$comment");const o=r.keepOriginalCase?t.tagName:t.tagName.toLowerCase();return new bi(this.document,o)}_isViewElementWithRawContent(t,r){return r.withChildren!==!1&&t.is("element")&&!!this._rawContentElementMatcher.match(t)}_shouldRenameElement(t){const r=t.toLowerCase();return this.renderingMode==="editing"&&this.unsafeElements.includes(r)}_createReplacementDomElement(t,r){const o=this._domDocument.createElement("span");if(o.setAttribute(E5,t),r){for(;r.firstChild;)o.appendChild(r.firstChild);for(const c of r.getAttributeNames())o.setAttribute(c,r.getAttribute(c))}return o}}function YW(l,t){return l.getAncestors().some(r=>r.is("element")&&t.includes(r.name))}function S5(l,t){let r=l;for(;r;)t(r),r=r.parentElement}function D5(l,t){const r=l.parentNode;return!!r&&!!r.tagName&&t.includes(r.tagName.toLowerCase())}function T5(l){l==="script"&&z("domconverter-unsafe-script-element-detected"),l==="style"&&z("domconverter-unsafe-style-element-detected")}class $o extends Li(){constructor(t){super(),this._isEnabled=!1,this.view=t,this.document=t.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(t){return t&&t.nodeType===3&&(t=t.parentNode),!(!t||t.nodeType!==1)&&t.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}const I5=L2(function(l,t){Le(t,gc(t),l)});class Ac{constructor(t,r,o){this.view=t,this.document=t.document,this.domEvent=r,this.domTarget=r.target,I5(this,o)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class sa extends $o{constructor(){super(...arguments),this.useCapture=!1}observe(t){(typeof this.domEventType=="string"?[this.domEventType]:this.domEventType).forEach(r=>{this.listenTo(t,r,(o,c)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(c.target)&&this.onDomEvent(c)},{useCapture:this.useCapture})})}stopObserving(t){this.stopListening(t)}fire(t,r,o){this.isEnabled&&this.document.fire(t,new Ac(this.view,r,o))}}class QW extends sa{constructor(){super(...arguments),this.domEventType=["keydown","keyup"]}onDomEvent(t){const r={keyCode:t.keyCode,altKey:t.altKey,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,metaKey:t.metaKey,get keystroke(){return kc(this)}};this.fire(t.type,t,r)}}const Zk=function(){return lt.Date.now()};var ZW=/\s/;const JW=function(l){for(var t=l.length;t--&&ZW.test(l.charAt(t)););return t};var XW=/^\s+/;const eH=function(l){return l&&l.slice(0,JW(l)+1).replace(XW,"")};var tH=/^[-+]0x[0-9a-f]+$/i,nH=/^0b[01]+$/i,rH=/^0o[0-7]+$/i,iH=parseInt;const M5=function(l){if(typeof l=="number")return l;if(of(l))return NaN;if(be(l)){var t=typeof l.valueOf=="function"?l.valueOf():l;l=be(t)?t+"":t}if(typeof l!="string")return l===0?l:+l;l=eH(l);var r=nH.test(l);return r||rH.test(l)?iH(l.slice(2),r?2:8):tH.test(l)?NaN:+l};var oH=Math.max,sH=Math.min;const Cc=function(l,t,r){var o,c,u,m,b,k,_=0,A=!1,N=!1,T=!0;if(typeof l!="function")throw new TypeError("Expected a function");function O(J){var ae=o,_e=c;return o=c=void 0,_=J,m=l.apply(_e,ae)}function L(J){var ae=J-k;return k===void 0||ae>=t||ae<0||N&&J-_>=u}function $(){var J=Zk();if(L(J))return U(J);b=setTimeout($,function(ae){var _e=t-(ae-k);return N?sH(_e,u-(ae-_)):_e}(J))}function U(J){return b=void 0,T&&o?O(J):(o=c=void 0,m)}function H(){var J=Zk(),ae=L(J);if(o=arguments,c=this,k=J,ae){if(b===void 0)return function(_e){return _=_e,b=setTimeout($,t),A?O(_e):m}(k);if(N)return clearTimeout(b),b=setTimeout($,t),O(k)}return b===void 0&&(b=setTimeout($,t)),m}return t=M5(t)||0,be(r)&&(A=!!r.leading,u=(N="maxWait"in r)?oH(M5(r.maxWait)||0,t):u,T="trailing"in r?!!r.trailing:T),H.cancel=function(){b!==void 0&&clearTimeout(b),_=0,o=k=c=b=void 0},H.flush=function(){return b===void 0?m:U(Zk())},H};class aH extends $o{constructor(t){super(t),this._fireSelectionChangeDoneDebounced=Cc(r=>{this.document.fire("selectionChangeDone",r)},200)}observe(){const t=this.document;t.on("arrowKey",(r,o)=>{t.selection.isFake&&this.isEnabled&&o.preventDefault()},{context:"$capture"}),t.on("arrowKey",(r,o)=>{t.selection.isFake&&this.isEnabled&&this._handleSelectionMove(o.keyCode)},{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(t){const r=this.document.selection,o=new lo(r.getRanges(),{backward:r.isBackward,fake:!1});t!=Mt.arrowleft&&t!=Mt.arrowup||o.setTo(o.getFirstPosition()),t!=Mt.arrowright&&t!=Mt.arrowdown||o.setTo(o.getLastPosition());const c={oldSelection:r,newSelection:o,domSelection:null};this.document.fire("selectionChange",c),this._fireSelectionChangeDoneDebounced(c)}}const lH=function(l){return this.__data__.set(l,"__lodash_hash_undefined__"),this},cH=function(l){return this.__data__.has(l)};function mf(l){var t=-1,r=l==null?0:l.length;for(this.__data__=new Ya;++t<r;)this.add(l[t])}mf.prototype.add=mf.prototype.push=lH,mf.prototype.has=cH;const dH=mf,uH=function(l,t){for(var r=-1,o=l==null?0:l.length;++r<o;)if(t(l[r],r,l))return!0;return!1},hH=function(l,t){return l.has(t)},P5=function(l,t,r,o,c,u){var m=1&r,b=l.length,k=t.length;if(b!=k&&!(m&&k>b))return!1;var _=u.get(l),A=u.get(t);if(_&&A)return _==t&&A==l;var N=-1,T=!0,O=2&r?new dH:void 0;for(u.set(l,t),u.set(t,l);++N<b;){var L=l[N],$=t[N];if(o)var U=m?o($,L,N,t,l,u):o(L,$,N,l,t,u);if(U!==void 0){if(U)continue;T=!1;break}if(O){if(!uH(t,function(H,J){if(!hH(O,J)&&(L===H||c(L,H,r,o,u)))return O.pu
vendor: 2,115 bytes, line 8463
8463sh(J)})){T=!1;break}}else if(L!==$&&!c(L,$,r,o,u)){T=!1;break}}return u.delete(l),u.delete(t),T},mH=function(l){var t=-1,r=Array(l.size);return l.forEach(function(o,c){r[++t]=[c,o]}),r},fH=function(l){var t=-1,r=Array(l.size);return l.forEach(function(o){r[++t]=o}),r};var O5=Ct?Ct.prototype:void 0,Jk=O5?O5.valueOf:void 0;const pH=function(l,t,r,o,c,u,m){switch(r){case"[object DataView]":if(l.byteLength!=t.byteLength||l.byteOffset!=t.byteOffset)return!1;l=l.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(l.byteLength!=t.byteLength||!u(new Gm(l),new Gm(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Wt(+l,+t);case"[object Error]":return l.name==t.name&&l.message==t.message;case"[object RegExp]":case"[object String]":return l==t+"";case"[object Map]":var b=mH;case"[object Set]":var k=1&o;if(b||(b=fH),l.size!=t.size&&!k)return!1;var _=m.get(l);if(_)return _==t;o|=2,m.set(l,t);var A=P5(b(l),b(t),o,c,u,m);return m.delete(l),A;case"[object Symbol]":if(Jk)return Jk.call(l)==Jk.call(t)}return!1};var gH=Object.prototype.hasOwnProperty;const bH=function(l,t,r,o,c,u){var m=1&r,b=mk(l),k=b.length;if(k!=mk(t).length&&!m)return!1;for(var _=k;_--;){var A=b[_];if(!(m?A in t:gH.call(t,A)))return!1}var N=u.get(l),T=u.get(t);if(N&&T)return N==t&&T==l;var O=!0;u.set(l,t),u.set(t,l);for(var L=m;++_<k;){var $=l[A=b[_]],U=t[A];if(o)var H=m?o(U,$,A,t,l,u):o($,U,A,l,t,u);if(!(H===void 0?$===U||c($,U,r,o,u):H)){O=!1;break}L||(L=A=="constructor")}if(O&&!L){var J=l.constructor,ae=t.constructor;J==ae||!("constructor"in l)||!("constructor"in t)||typeof J=="function"&&J instanceof J&&typeof ae=="function"&&ae instanceof ae||(O=!1)}return u.delete(l),u.delete(t),O};var B5="[object Arguments]",L5="[object Array]",ff="[object Object]",R5=Object.prototype.hasOwnProperty;const kH=function(l,t,r,o,c,u){var m=Ze(l),b=Ze(t),k=m?L5:iu(l),_=b?L5:iu(t),A=(k=k==B5?ff:k)==ff,N=(_=_==B5?ff:_)==ff,T=k==_;if(T&&cs(l)){if(!cs(t))return!1;m=!0,A=!1}if(T&&!A)return u||(u=new ls),m||dk(l)?P5(l,t,r,o,c,u):pH(l,t,k,r,o,c,u);if(!(1&r)){var O=A&&R5.call(l,"__wrapped__"),L=N&&R5.call(t,"__wrapped__");
8463if(O||L){var $=O?l.value():l,U=L?t.value():t;return u||(u=new ls),c($,U,r,o,u)}}return!!T&&(u||(u=new ls),bH(l,t,r,o,c,u))},pf=function l(t,r,o,c,u){return t===r||(t==null||r==null||!Nt(t)&&!Nt(r)?t!=t&&r!=r:kH(t,r,o,c,l,u))},yH=function(l,t,r){var o=(r=typeof r=="function"?r:void 0)?r(l,t):void 0;return o===void 0?pf(l,t,void 0,r):!!o};class z5 extends $o{constructor(t){super(t),this._config={childList:!0,characterData:!0,subtree:!0},this.domConverter=t.domConverter,this.renderer=t._renderer,this._domElements=new Set,this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(t){this._domElements.add(t),this.isEnabled&&this._mutationObserver.observe(t,this._config)}stopObserving(t){if(this._domElements.delete(t),this.isEnabled){this._mutationObserver.disconnect();for(const r of this._domElements)this._mutationObserver.observe(r,this._config)}}enable(){super.enable();for(const t of this._domElements)this._mutationObserver.observe(t,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(t){if(t.length===0)return;const r=this.domConverter,o=new Set,c=new Set;for(const m of t){const b=r.mapDomToView(m.target);b&&(b.is("uiElement")||b.is("rawElement")||m.type!=="childList"||this._isBogusBrMutation(m)||c.add(b))}for(const m of t){const b=r.mapDomToView(m.target);if((!b||!b.is("uiElement")&&!b.is("rawElement"))&&m.type==="characterData"){const k=r.findCorrespondingViewText(m.target);k&&!c.has(k.parent)?o.add(k):!k&&ki(m.target)&&c.add(r.mapDomToView(m.target.parentNode))}}let u=!1;for(const m of o)u=!0,this.renderer.markToSync("text",m);for(const m of c){const b=r.mapViewToDom(m),k=Array.from(m.getChildren()),_=Array.from(r.domChildrenToView(b,{withChildren:!1}));yH(k,_,xH)||(u=!0,this.renderer.markToSync("children",m))}u&&this.view.forceRender()}_isBogusBrMutation(t){let r=null;return t.nextSibling===null&&t.removedNodes.length===0&&t.addedNodes.length==1&&(r=this.domConverter.domToView(t.addedNodes[0],{withChildren:!1})),r&&r.is("element","br")}}function xH(l,t){if(!Array.isArray(l))return l===t||!(!l.is("$text")||!t.is("$text"))&&l.data===t.data}class gf extends sa{constructor(t){super(t),this._isFocusChanging=!1,this.domEventType=["focus","blur"],this.useCapture=!0;const r=this.document;r.on("focus",()=>{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout(()=>{this.flush(),t.change(()=>{})},50)}),r.on("blur",(o,c)=>{const u=r.selection.editableElement;u!==null&&u!==c.target||(r.isFocused=!1,this._isFocusChanging=!1,t.change(()=>{}))})}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(t){this.fire(t.type,t)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class vH extends $o{constructor(t){super(t),this.mutationObserver=t.getObserver(z5),this.focusObserver=t.getObserver(gf),this.selection=this.document.selection,this.domConverter=t.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=Cc(r=>{this.document.fire("selectionChangeDone",r)},200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._documentIsSelectingInactivityTimeoutDebounced=Cc(()=>this.document.isSelecting=!1,5e3),this._loopbackCounter=0}observe(t){const r=t.ownerDocument,o=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,r),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(t,"selectstart",()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()},{priority:"highest"}),this.listenTo(t,"keydown",o,{priority:"highest",useCapture:!0}),this.listenTo(t,"keyup",o,{priority:"highest",useCapture:!0}),this._documents.has(r)||(this.listenTo(r,"mouseup",o,{priority:"highest",useCapture:!0}),this.listenTo(r,"selectionchange",(c,u)=>{this.document.isComposing&&!y.isAndroid||(this._handleSelectionChange(u,r),this._documentIsSelectingInactivityTimeoutDebounced())}),this._documents.add(r))}stopObserving(t){this.stopListening(t)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(t,r){if(!this.isEnabled)return;const o=r.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(o.anchorNode))return;this.mutationObserver.flush();const c=this.domConverter.domSelectionToView(o);if(c.rangeCount!=0){if(this.view.hasDomSelection=!0,this.focusObserver.flush(),!this.selection.isEqual(c)||!this.domConverter.isDomSelectionCorrect(o))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.selection.isSimilar(c))this.view.forceRender();else{const u={oldSelection:this.selection,newSelection:c,domSelection:o};this.document.fire("selectionChange",u),this._fireSelectionChangeDoneDebounced(u)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class wH extends sa{constructor(t){super(t),this.domEventType=["compositionstart","compositionupdate","compositionend"];const r=this.document;r.on("compositionstart",()=>{r.isComposing=!0},{priority:"low"}),r.on("compositionend",()=>{r.isComposing=!1},{priority:"low"})}onDomEvent(t){this.fire(t.type,t,{data:t.data})}}class F5{constructor(t,r={}){this._files=r.cacheFiles?$5(t):null,this._native=t}get files(){return this._files||(this._files=$5(this._native)),this._files}get types(){return this._native.types}getData(t){return this._native.getData(t)}setData(t,r){this._native.setData(t,r)}set effectAllowed(t){this._native.effectAllowed=t}get effectAllowed(){return this._native.effectAllowed}set dropEffect(t){this._native.dropEffect=t}get dropEffect(){return this._native.dropEffect}setDragImage(t,r,o){this._native.setDragImage(t,r,o)}get isCanceled(){return this._native.dropEffect=="none"||!!this._native.mozUserCancelled}}function $5(l){const t=Array.from(l.files||[]),r=Array.from(l.items||[]);return t.length?t:r.filter(o=>o.kind==="file").map(o=>o.getAsFile())}class _H extends sa{constructor(){super(...arguments),this.domEventType="beforeinput"}onDomEvent(t){const r=t.getTargetRanges(),o=this.view,c=o.document;let u=null,m=null,b=[];if(t.dataTransfer&&(u=new F5(t.dataTransfer)),t.data!==null?m=t.data:u&&(m=u.getData("text/plain")),c.selection.isFake)b=Array.from(c.selection.getRanges());else if(r.length)b=r.map(k=>{const _=o.domConverter.domPositionToView(k.startContainer,k.startOffset),A=o.domConverter.domPositionToView(k.endContainer,k.endOffset);return _?o.createRange(_,A):A?o.createRange(A):void 0}).filter(k=>!!k);else if(y.isAndroid){const k=t.target.ownerDocument.defaultView.getSelection();b=Array.from(o.domConverter.domSelectionToView(k).getRanges())}if(y.isAndroid&&t.inputType=="insertCompositionText"&&m&&m.endsWith(` 8464`))this.fire(t.type,t,{inputType:"insertParagraph",targetRanges:[o.createRange(b[0].end)]});else if(t.inputType=="insertText"&&m&&m.includes(` 8465`)){const k=m.split(/\n{1,2}/g);let _=b;for(let A=0;A<k.length;A++){const N=k[A];N!=""&&(this.fire(t.type,t,{data:N,dataTransfer:u,targetRanges:_,inputType:t.inputType,isComposing:t.isComposing}),_=[c.selection.getFirstRange()]),A+1<k.length&&(this.fire(t.type,t,{inputType:"insertParagraph",targetRanges:_}),_=[c.selection.getFirstRange()])}}else this.fire(t.type,t,{data:m,dataTransfer:u,targetRanges:b,inputType:t.inputType,isComposing:t.isComposing})}}class AH extends $o{constructor(t){super(t),this.document.on("key
8465down",(r,o)=>{if(this.isEnabled&&((c=o.keyCode)==Mt.arrowright||c==Mt.arrowleft||c==Mt.arrowup||c==Mt.arrowdown)){const u=new vc(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(u,o),u.stop.called&&r.stop()}var c})}observe(){}stopObserving(){}}class CH extends $o{constructor(t){super(t);const r=this.document;r.on("keydown",(o,c)=>{if(!this.isEnabled||c.keyCode!=Mt.tab||c.ctrlKey)return;const u=new vc(r,"tab",r.selection.getFirstRange());r.fire(u,c),u.stop.called&&o.stop()})}observe(){}stopObserving(){}}const uo=function(l){return yk(l,5)};class jH extends fe(){constructor(t){super(),this.domRoots=new Map,this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this.document=new cf(t),this.domConverter=new hf(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new VW(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new g5(this.document),this.addObserver(z5),this.addObserver(gf),this.addObserver(vH),this.addObserver(QW),this.addObserver(aH),this.addObserver(wH),this.addObserver(AH),this.addObserver(_H),this.addObserver(CH),this.document.on("arrowKey",FW,{priority:"low"}),OW(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}),y.isiOS&&this.listenTo(this.document,"blur",(r,o)=>{this.domConverter.mapDomToView(o.domEvent.relatedTarget)||this.domConverter._clearDomSelection()})}attachDomRoot(t,r="main"){const o=this.document.getRoot(r);o._name=t.tagName.toLowerCase();const c={};for(const{name:m,value:b}of Array.from(t.attributes))c[m]=b,m==="class"?this._writer.addClass(b.split(" "),o):this._writer.setAttribute(m,b,o);this._initialDomRootAttributes.set(t,c);const u=()=>{this._writer.setAttribute("contenteditable",(!o.isReadOnly).toString(),o),o.isReadOnly?this._writer.addClass("ck-read-only",o):this._writer.removeClass("ck-read-only",o)};u(),this.domRoots.set(r,t),this.domConverter.bindElements(t,o),this._renderer.markToSync("children",o),this._renderer.markToSync("attributes",o),this._renderer.domDocuments.add(t.ownerDocument),o.on("change:children",(m,b)=>this._renderer.markToSync("children",b)),o.on("change:attributes",(m,b)=>this._renderer.markToSync("attributes",b)),o.on("change:text",(m,b)=>this._renderer.markToSync("text",b)),o.on("change:isReadOnly",()=>this.change(u)),o.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const m of this._observers.values())m.observe(t,r)}detachDomRoot(t){const r=this.domRoots.get(t);Array.from(r.attributes).forEach(({name:c})=>r.removeAttribute(c));const o=this._initialDomRootAttributes.get(r);for(const c in o)r.setAttribute(c,o[c]);this.domRoots.delete(t),this.domConverter.unbindDomElement(r);for(const c of this._observers.values())c.stopObserving(r)}getDomRoot(t="main"){return this.domRoots.get(t)}addObserver(t){let r=this._observers.get(t);if(r)return r;r=new t(this),this._observers.set(t,r);for(const[o,c]of this.domRoots)r.observe(c,o);return r.enable(),r}getObserver(t){return this._observers.get(t)}disableObservers(){for(const t of this._observers.values())t.disable()}enableObservers(){for(const t of this._observers.values())t.enable()}scrollToTheSelection({alignToTop:t,forceScroll:r,viewportOffset:o=20,ancestorOffset:c=20}={}){const u=this.document.selection.getFirstRange();if(!u)return;const m=uo({alignToTop:t,forceScroll:r,viewportOffset:o,ancestorOffset:c});typeof o=="number"&&(o={top:o,bottom:o,left:o,right:o});const b={target:this.domConverter.viewRangeToDom(u),viewportOffset:o,ancestorOffset:c,alignToTop:t,forceScroll:r};this.fire("scrollToTheSelection",b,m),function({target:k,viewportOffset:_=0,ancestorOffset:A=0,alignToTo
8465p:N,forceScroll:T}){const O=wk(k);let L=O,$=null;for(_=function(U){return typeof U=="number"?{top:U,bottom:U,left:U,right:U}:U}(_);L;){let U;U=PU(L==O?k:$),MU({parent:U,getRect:()=>I2(k,L),alignToTop:N,ancestorOffset:A,forceScroll:T});const H=I2(k,L);if(IU({window:L,rect:H,viewportOffset:_,alignToTop:N,forceScroll:T}),L.parent!=L){if($=L.frameElement,L=L.parent,!$)return}else L=null}}(b)}focus(){if(!this.document.isFocused){const t=this.document.selection.editableElement;t&&(this.domConverter.focus(t),this.forceRender())}}change(t){if(this.isRenderingInProgress||this._postFixersInProgress)throw new P("cannot-change-view-tree",this);try{if(this._ongoingChange)return t(this._writer);this._ongoingChange=!0;const r=t(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),r}catch(r){P.rethrowUnexpectedError(r,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(gf).flush(),this.change(()=>{})}destroy(){for(const t of this._observers.values())t.destroy();this.document.destroy(),this.stopListening()}createPositionAt(t,r){return Ge._createAt(t,r)}createPositionAfter(t){return Ge._createAfter(t)}createPositionBefore(t){return Ge._createBefore(t)}createRange(t,r){return new wt(t,r)}createRangeOn(t){return wt._createOn(t)}createRangeIn(t){return wt._createIn(t)}createSelection(...t){return new lo(...t)}_disableRendering(t){this._renderingDisabled=t,t==0&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class aa{is(){throw new Error("is() method is abstract")}}class al extends aa{constructor(t){super(),this.parent=null,this._attrs=Ro(t)}get document(){return null}get index(){let t;if(!this.parent)return null;if((t=this.parent.getChildIndex(this))===null)throw new P("model-node-not-found-in-parent",this);return t}get startOffset(){let t;if(!this.parent)return null;if((t=this.parent.getChildStartOffset(this))===null)throw new P("model-node-not-found-in-parent",this);return t}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const t=this.index;return t!==null&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return t!==null&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}isAttached(){return this.parent!==null&&this.root.isAttached()}getPath(){const t=[];let r=this;for(;r.parent;)t.unshift(r.startOffset),r=r.parent;return t}getAncestors(t={}){const r=[];let o=t.includeSelf?this:this.parent;for(;o;)r[t.parentFirst?"push":"unshift"](o),o=o.parent;return r}getCommonAncestor(t,r={}){const o=this.getAncestors(r),c=t.getAncestors(r);let u=0;for(;o[u]==c[u]&&o[u];)u++;return u===0?null:o[u-1]}isBefore(t){if(this==t||this.root!==t.root)return!1;const r=this.getPath(),o=t.getPath(),c=ue(r,o);switch(c){case"prefix":return!0;case"extension":return!1;default:return r[c]<o[c]}}isAfter(t){return this!=t&&this.root===t.root&&!this.isBefore(t)}hasAttribute(t){return this._attrs.has(t)}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const t={};return this._attrs.size&&(t.attributes=Array.from(this._attrs).reduce((r,o)=>(r[o[0]]=o[1],r),{})),t}_clone(t){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(t,r){this._attrs.set(t,r)}_setAttributesTo(t){this._attrs=Ro(t)}_removeAttribute(t){return this._attrs.delete(t)}_clearAttributes(){this._attrs.clear()}}al.prototype.is=function(l){return l==="node"||l==="model:node"};class pu{constructor(t){this._nodes=[],t&&this._insertNodes(0,t)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((t,r)=>t+r.offsetSize,0)}getNode(t){return this._nodes[t]||null}getNodeIndex(t){const r=this._nodes.indexOf(t);return r==-1?null:r}getNodeStartOffset(t){const r=this.getNodeIndex(t);return r===null?null:this._nodes.slice(0,r).reduce((o,c)=>o+c.offsetSize,0)}indexToOffset(t){if(t==this._nodes.length)return this.maxOffset;const r=this._nodes[t];
vendor: 8,427 bytes, line 8465
8465if(!r)throw new P("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(r)}offsetToIndex(t){let r=0;for(const o of this._nodes){if(t>=r&&t<r+o.offsetSize)return this.getNodeIndex(o);r+=o.offsetSize}if(r!=t)throw new P("model-nodelist-offset-out-of-bounds",this,{offset:t,nodeList:this});return this.length}_insertNodes(t,r){for(const o of r)if(!(o instanceof al))throw new P("model-nodelist-insertnodes-not-node",this);this._nodes=function(o,c,u,m){if(Math.max(c.length,o.length)>1e4)return o.slice(0,u).concat(c).concat(o.slice(u+m,o.length));{const b=Array.from(o);return b.splice(u,m,...c),b}}(this._nodes,Array.from(r),t,0)}_removeNodes(t,r=1){return this._nodes.splice(t,r)}toJSON(){return this._nodes.map(t=>t.toJSON())}}class Jt extends al{constructor(t,r){super(r),this._data=t||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const t=super.toJSON();return t.data=this.data,t}_clone(){return new Jt(this.data,this.getAttributes())}static fromJSON(t){return new Jt(t.data,t.attributes)}}Jt.prototype.is=function(l){return l==="$text"||l==="model:$text"||l==="text"||l==="model:text"||l==="node"||l==="model:node"};class ho extends aa{constructor(t,r,o){if(super(),this.textNode=t,r<0||r>t.offsetSize)throw new P("model-textproxy-wrong-offsetintext",this);if(o<0||r+o>t.offsetSize)throw new P("model-textproxy-wrong-length",this);this.data=t.data.substring(r,r+o),this.offsetInText=r}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 t=this.textNode.getPath();return t.length>0&&(t[t.length-1]+=this.offsetInText),t}getAncestors(t={}){const r=[];let o=t.includeSelf?this:this.parent;for(;o;)r[t.parentFirst?"push":"unshift"](o),o=o.parent;return r}hasAttribute(t){return this.textNode.hasAttribute(t)}getAttribute(t){return this.textNode.getAttribute(t)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}ho.prototype.is=function(l){return l==="$textProxy"||l==="model:$textProxy"||l==="textProxy"||l==="model:textProxy"};class Gt extends al{constructor(t,r,o){super(r),this._children=new pu,this.name=t,o&&this._insertChild(0,o)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return this.childCount===0}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}offsetToIndex(t){return this._children.offsetToIndex(t)}getNodeByPath(t){let r=this;for(const o of t)r=r.getChild(r.offsetToIndex(o));return r}findAncestor(t,r={}){let o=r.includeSelf?this:this.parent;for(;o;){if(o.name===t)return o;o=o.parent}return null}toJSON(){const t=super.toJSON();if(t.name=this.name,this._children.length>0){t.children=[];for(const r of this._children)t.children.push(r.toJSON())}return t}_clone(t=!1){const r=t?Array.from(this._children).map(o=>o._clone(!0)):void 0;return new Gt(this.name,this.getAttributes(),r)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,r){const o=function(c){return typeof c=="string"?[new Jt(c)]:(Re(c)||(c=[c]),Array.from(c).map(u=>typeof u=="string"?new Jt(u):u instanceof ho?new Jt(u.data,u.getAttributes()):u))}(r);for(const c of o)c.parent!==null&&c._remove(),c.parent=this;this._children._insertNodes(t,o)}_removeChildren(t,r=1){const o=this._children._removeNodes(t,r);for(const c of o)c.parent=null;return o}static fromJSON(t){let r;if(t.children){r=[];for(const o of t.children)o.name?r.push(Gt.fromJSON(o)):r.push(Jt.fromJSON(o))}return new Gt(t.name,t.attributes,r)}}Gt.prototype.is=function(l,t){return t?t===this.name&&(l==="element"||l==="model:element"):l==="element"||l==="model:element"||l==="node"||l==="model:node"};class ds{constructor(t){if(!t||!t.boundaries&&!t.startPosition)throw new P("model-tree-walker-no-start-position",null);const r=t.direction||"forward";if(r!="forward"&&r!="backward")throw new P("model-tree-walker-unknown-direction",t,{direction:r});this.direction=r,this.boundaries=t.boundaries||null,t.startPosition?this._position=t.startPosition.clone():this._position=De._createAt(this.boundaries[this.direction=="backward"?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.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(t){let r,o,c,u;do c=this.position,u=this._visitedParent,{done:r,value:o}=this.next();while(!r&&t(o));r||(this._position=c,this._visitedParent=u)}next(){return this.direction=="forward"?this._next():this._previous()}_next(){const t=this.position,r=this.position.clone(),o=this._visitedParent;if(o.parent===null&&r.offset===o.maxOffset)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&r.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const c=gu(r,o),u=c||V5(r,o,c);if(u instanceof Gt){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(r))return{done:!0,value:void 0};r.offset++}else r.path.push(0),this._visitedParent=u;return this._position=r,ll("elementStart",u,t,r,1)}if(u instanceof Jt){let m;if(this.singleCharacters)m=1;else{let _=u.endOffset;this._boundaryEndParent==o&&this.boundaries.end.offset<_&&(_=this.boundaries.end.offset),m=_-r.offset}const b=r.offset-u.startOffset,k=new ho(u,b,m);return r.offset+=m,this._position=r,ll("text",k,t,r,m)}return r.path.pop(),r.offset++,this._position=r,this._visitedParent=o.parent,this.ignoreElementEnd?this._next():ll("elementEnd",o,t,r)}_previous(){const t=this.position,r=this.position.clone(),o=this._visitedParent;if(o.parent===null&&r.offset===0)return{done:!0,value:void 0};if(o==this._boundaryStartParent&&r.offset==this.boundaries.start.offset)return{done:!0,value:void 0};const c=r.parent,u=gu(r,c),m=u||U5(r,c,u);if(m instanceof Gt)return r.offset--,this.shallow?(this._position=r,ll("elementStart",m,t,r,1)):(r.path.push(m.maxOffset),this._position=r,this._visitedParent=m,this.ignoreElementEnd?this._previous():ll("elementEnd",m,t,r));if(m instanceof Jt){let b;if(this.singleCharacters)b=1;else{let A=m.startOffset;this._boundaryStartParent==o&&this.boundaries.start.offset>A&&(A=this.boundaries.start.offset),b=r.offset-A}const k=r.offset-m.startOffset,_=new ho(m,k-b,b);return r.offset-=b,this._position=r,ll("text",_,t,r,b)}return r.path.pop(),this._position=r,this._visitedParent=o.parent,ll("elementStart",o,t,r,1)}}function ll(l,t,r,o,c){return{done:!1,value:{type:l,item:t,previousPosition:r,nextPosition:o,length:c}}}class De extends aa{constructor(t,r,o="toNone"){if(super(),!t.is("element")&&!t.is("documentFragment"))throw new P("model-position-root-invalid",t);if(!(r instanceof Array)||r.length===0)throw new P("model-position-path-incorrect-format",t,{path:r});t.is("rootElement")?r=r.slice():(r=[...t.getPath(),...r],t=t.root),this.root=t,this.path=r,this.stickiness=o}get offset(){return this.path[this.path.length-1]}set offset(t){this.path[this.path.length-1]=t}get parent(){let t=this.root;for(let r=0;r<this.path.length-1;r++)if(t=t.getChild(t.offsetToIndex(this.path[r])),!t)throw new P("model-position-path-incorrect",this,{position:this});if(t.is("$text"))throw new P("model-position-path-incorrect",this,{position:this});return t}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){return gu(this,this.parent)}get nodeAfter(){const t=this.parent;return V5(this,t,gu(this,t))}get nodeBefore(){const t=this.parent;return U5(this,t,gu(this,t))}get isAtStart(){return this.offset===0}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(t){if(this.root!=t.root)return"different";const r=ue(this.path,t.path);switch(r){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[r]<t.path[r]?"before":"after"}}
8465getLastMatchingPosition(t,r={}){r.startPosition=this;const o=new ds(r);return o.skip(t),o.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){const t=this.parent;return t.is("documentFragment")?[t]:t.getAncestors({includeSelf:!0})}findAncestor(t){const r=this.parent;return r.is("element")?r.findAncestor(t,{includeSelf:!0}):null}getCommonPath(t){if(this.root!=t.root)return[];const r=ue(this.path,t.path),o=typeof r=="string"?Math.min(this.path.length,t.path.length):r;return this.path.slice(0,o)}getCommonAncestor(t){const r=this.getAncestors(),o=t.getAncestors();let c=0;for(;r[c]==o[c]&&r[c];)c++;return c===0?null:r[c-1]}getShiftedBy(t){const r=this.clone(),o=r.offset+t;return r.offset=o<0?0:o,r}isAfter(t){return this.compareWith(t)=="after"}isBefore(t){return this.compareWith(t)=="before"}isEqual(t){return this.compareWith(t)=="same"}isTouching(t){if(this.root!==t.root)return!1;const r=Math.min(this.path.length,t.path.length);for(let o=0;o<r;o++){const c=this.path[o]-t.path[o];if(c<-1||c>1)return!1;if(c===1)return W5(t,this,o);if(c===-1)return W5(this,t,o)}return this.path.length===t.path.length||(this.path.length>t.path.length?Xk(this.path,r):Xk(t.path,r))}hasSameParentAs(t){return this.root!==t.root?!1:ue(this.getParentPath(),t.getParentPath())=="same"}getTransformedByOperation(t){let r;switch(t.type){case"insert":r=this._getTransformedByInsertOperation(t);break;case"move":case"remove":case"reinsert":r=this._getTransformedByMoveOperation(t);break;case"split":r=this._getTransformedBySplitOperation(t);break;case"merge":r=this._getTransformedByMergeOperation(t);break;default:r=De._createAt(this)}return r}_getTransformedByInsertOperation(t){return this._getTransformedByInsertion(t.position,t.howMany)}_getTransformedByMoveOperation(t){return this._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany)}_getTransformedBySplitOperation(t){const r=t.movedRange;return r.containsPosition(this)||r.start.isEqual(this)&&this.stickiness=="toNext"?this._getCombined(t.splitPosition,t.moveTargetPosition):t.graveyardPosition?this._getTransformedByMove(t.graveyardPosition,t.insertionPosition,1):this._getTransformedByInsertion(t.insertionPosition,1)}_getTransformedByMergeOperation(t){const r=t.movedRange;let o;return r.containsPosition(this)||r.start.isEqual(this)?(o=this._getCombined(t.sourcePosition,t.targetPosition),t.sourcePosition.isBefore(t.targetPosition)&&(o=o._getTransformedByDeletion(t.deletionPosition,1))):o=this.isEqual(t.deletionPosition)?De._createAt(t.deletionPosition):this._getTransformedByMove(t.deletionPosition,t.graveyardPosition,1),o}_getTransformedByDeletion(t,r){const o=De._createAt(this);if(this.root!=t.root)return o;if(ue(t.getParentPath(),this.getParentPath())=="same"){if(t.offset<this.offset){if(t.offset+r>this.offset)return null;o.offset-=r}}else if(ue(t.getParentPath(),this.getParentPath())=="prefix"){const c=t.path.length-1;if(t.offset<=this.path[c]){if(t.offset+r>this.path[c])return null;o.path[c]-=r}}return o}_getTransformedByInsertion(t,r){const o=De._createAt(this);if(this.root!=t.root)return o;if(ue(t.getParentPath(),this.getParentPath())=="same")(t.offset<this.offset||t.offset==this.offset&&this.stickiness!="toPrevious")&&(o.offset+=r);else if(ue(t.getParentPath(),this.getParentPath())=="prefix"){const c=t.path.length-1;t.offset<=this.path[c]&&(o.path[c]+=r)}return o}_getTransformedByMove(t,r,o){if(r=r._getTransformedByDeletion(t,o),t.isEqual(r))return De._createAt(this);const c=this._getTransformedByDeletion(t,o);return c===null||t.isEqual(this)&&this.stickiness=="toNext"||t.getShiftedBy(o).isEqual(this)&&this.stickiness=="toPrevious"?this._getCombined(t,r):c._getTransformedByInsertion(r,o)}_getCombined(t,r){const o=t.path.length-1,c=De._createAt(r);return c.stickiness=this.stickiness,c.offset=c.offset+this.path[o]-t.offset,c.path=[...c.path,...this.path.slice(o+1)],c}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(t,r,o="toNone"){if(t instanceof De)return new De(t.root,t.path,t.stickiness);{const c=t;if(r=="end")r=c.maxOffset;else{if(r=="before")return this._createBefore(c,o);if(r=="after")return this._createAfter(c,o);if(r!==0&&!r)throw new P("model-createpositionat-offset-required",[this,t])}if(!c.is("element")&&!c.is("documentFragment"))throw new P("model-position-parent-incorrect",[this,t]);const u=c.getPath();return u.push(r),new this(c.root,u,o)}}static _createAfter(t,r){if(!t.parent)throw new P("model-position-after-root",[this,t],{root:t});return this._createAt(t.parent,t.endOffset,r)}static _createBefore(t,r){if(!t.parent)throw new P("model-position-before-root",t,{root:t});return this._createAt(t.parent,t.startOffset,r)}static fromJSON(t,r){if(t.root==="$graveyard"){const o=new De(r.graveyard,t.path);return o.stickiness=t.stickiness,o}if(!r.getRoot(t.root))throw new P("model-position-fromjson-no-root",r,{rootName:t.root});return new De(r.getRoot(t.root),t.path,t.stickiness)}}function gu(l,t){const r=t.getChild(t.offsetToIndex(l.offset));return r&&r.is("$text")&&r.startOffset<l.offset?r:null}function V5(l,t,r){return r!==null?null:t.getChild(t.offsetToIndex(l.offset))}function U5(l,t,r){return r!==null?null:t.getChild(t.offsetToIndex(l.offset)-1)}function W5(l,t,r){return r+1!==l.path.length&&!!Xk(t.path,r+1)&&!!function(o,c){let u=o.parent,m=o.path.length-1,b=0;for(;m>=c;){if(o.path[m]+b!==u.maxOffset)return!1;b=1,m--,u=u.parent}return!0}(l,r+1)}function Xk(l,t){for(;t<l.length;){if(l[t]!==0)return!1;t++}return!0}De.prototype.is=function(l){return l==="position"||l==="model:position"};class de extends aa{constructor(t,r){super(),this.start=De._createAt(t),this.end=r?De._createAt(r):De._createAt(t),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new ds({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return ue(this.start.getParentPath(),this.end.getParentPath())=="same"}get root(){return this.start.root}containsPosition(t){return t.isAfter(this.start)&&t.isBefore(this.end)}containsRange(t,r=!1){t.isCollapsed&&(r=!1);const o=this.containsPosition(t.start)||r&&this.start.isEqual(t.start),c=this.containsPosition(t.end)||r&&this.end.isEqual(t.end
vendor: 4,518 bytes, line 8465
8465);return o&&c}containsItem(t){const r=De._createBefore(t);return this.containsPosition(r)||this.start.isEqual(r)}isEqual(t){return this.start.isEqual(t.start)&&this.end.isEqual(t.end)}isIntersecting(t){return this.start.isBefore(t.end)&&this.end.isAfter(t.start)}getDifference(t){const r=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&r.push(new de(this.start,t.start)),this.containsPosition(t.end)&&r.push(new de(t.end,this.end))):r.push(new de(this.start,this.end)),r}getIntersection(t){if(this.isIntersecting(t)){let r=this.start,o=this.end;return this.containsPosition(t.start)&&(r=t.start),this.containsPosition(t.end)&&(o=t.end),new de(r,o)}return null}getJoined(t,r=!1){let o=this.isIntersecting(t);if(o||(o=this.start.isBefore(t.start)?r?this.end.isTouching(t.start):this.end.isEqual(t.start):r?t.end.isTouching(this.start):t.end.isEqual(this.start)),!o)return null;let c=this.start,u=this.end;return t.start.isBefore(c)&&(c=t.start),t.end.isAfter(u)&&(u=t.end),new de(c,u)}getMinimalFlatRanges(){const t=[],r=this.start.getCommonPath(this.end).length,o=De._createAt(this.start);let c=o.parent;for(;o.path.length>r+1;){const u=c.maxOffset-o.offset;u!==0&&t.push(new de(o,o.getShiftedBy(u))),o.path=o.path.slice(0,-1),o.offset++,c=c.parent}for(;o.path.length<=this.end.path.length;){const u=this.end.path[o.path.length-1],m=u-o.offset;m!==0&&t.push(new de(o,o.getShiftedBy(m))),o.offset=u,o.path.push(0)}return t}getWalker(t={}){return t.boundaries=this,new ds(t)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const r=new ds(t);for(const o of r)yield o.item}*getPositions(t={}){t.boundaries=this;const r=new ds(t);yield r.position;for(const o of r)yield o.nextPosition}getTransformedByOperation(t){switch(t.type){case"insert":return this._getTransformedByInsertOperation(t);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(t);case"split":return[this._getTransformedBySplitOperation(t)];case"merge":return[this._getTransformedByMergeOperation(t)]}return[new de(this.start,this.end)]}getTransformedByOperations(t){const r=[new de(this.start,this.end)];for(const o of t)for(let c=0;c<r.length;c++){const u=r[c].getTransformedByOperation(o);r.splice(c,1,...u),c+=u.length-1}for(let o=0;o<r.length;o++){const c=r[o];for(let u=o+1;u<r.length;u++){const m=r[u];(c.containsRange(m)||m.containsRange(c)||c.isEqual(m))&&r.splice(u,1)}}return r}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;const t=this.start.nodeAfter,r=this.end.nodeBefore;return t&&t.is("element")&&t===r?t:null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(t,r=!1){return this._getTransformedByInsertion(t.position,t.howMany,r)}_getTransformedByMoveOperation(t,r=!1){const o=t.sourcePosition,c=t.howMany,u=t.targetPosition;return this._getTransformedByMove(o,u,c,r)}_getTransformedBySplitOperation(t){const r=this.start._getTransformedBySplitOperation(t);let o=this.end._getTransformedBySplitOperation(t);return this.end.isEqual(t.insertionPosition)&&(o=this.end.getShiftedBy(1)),r.root!=o.root&&(o=this.end.getShiftedBy(-1)),new de(r,o)}_getTransformedByMergeOperation(t){if(this.start.isEqual(t.targetPosition)&&this.end.isEqual(t.deletionPosition))return new de(this.start);let r=this.start._getTransformedByMergeOperation(t),o=this.end._getTransformedByMergeOperation(t);return r.root!=o.root&&(o=this.end.getShiftedBy(-1)),r.isAfter(o)?(t.sourcePosition.isBefore(t.targetPosition)?(r=De._createAt(o),r.offset=0):(t.deletionPosition.isEqual(r)||(o=t.deletionPosition),r=t.targetPosition),new de(r,o)):new de(r,o)}_getTransformedByInsertion(t,r,o=!1){if(o&&this.containsPosition(t))return[new de(this.start,t),new de(t.getShiftedBy(r),this.end._getTransformedByInsertion(t,r))];{const c=new de(this.start,this.end);return c.start=c.start._getTransformedByInsertion(t,r),c.end=c.end._getTransformedByInsertion(t,r),[c]}}_getTransformedByMove(t,r,o,c=!1){if(this.isCollapsed){const N=this.start._getTransformedByMove(t,r,o);return[new de(N)]}const u=de._createFromPositionAndShift(t,o),m=r._getTransformedByDeletion(t,o);if(this.containsPosition(r)&&!c&&(u.containsPosition(this.start)||u.containsPosition(this.end))){const N=this.start._getTransformedByMove(t,r,o),T=this.end._getTransformedByMove(t,r,o);return[new de(N,T)]}let b;const k=this.getDifference(u);let _=null;const A=this.getIntersection(u);
8465if(k.length==1?_=new de(k[0].start._getTransformedByDeletion(t,o),k[0].end._getTransformedByDeletion(t,o)):k.length==2&&(_=new de(this.start,this.end._getTransformedByDeletion(t,o))),b=_?_._getTransformedByInsertion(m,o,A!==null||c):[],A){const N=new de(A.start._getCombined(u.start,m),A.end._getCombined(u.start,m));b.length==2?b.splice(1,0,N):b.push(N)}return b}_getTransformedByDeletion(t,r){let o=this.start._getTransformedByDeletion(t,r),c=this.end._getTransformedByDeletion(t,r);return o==null&&c==null?null:(o==null&&(o=t),c==null&&(c=t),new de(o,c))}static _createFromPositionAndShift(t,r){const o=t,c=t.getShiftedBy(r);return r>0?new this(o,c):new this(c,o)}static _createIn(t){return new this(De._createAt(t,0),De._createAt(t,t.maxOffset))}static _createOn(t){return this._createFromPositionAndShift(De._createBefore(t),t.offsetSize)}static _createFromRanges(t){if(t.length===0)throw new P("range-create-from-ranges-empty-array",null);if(t.length==1)return t[0].clone();const r=t[0];t.sort((u,m)=>u.start.isAfter(m.start)?1:-1);const o=t.indexOf(r),c=new this(r.start,r.end);if(o>0)for(let u=o-1;t[u].end.isEqual(c.start);u++)c.start=De._createAt(t[u].start);for(let u=o+1;u<t.length&&t[u].start.isEqual(c.end);u++)c.end=De._createAt(t[u].end);return c}static fromJSON(t,r){return new this(De.fromJSON(t.start,r),De.fromJSON(t.end,r))}}de.prototype.is=function(l){return l==="range"||l==="model:range"};class H5 extends ee(){constructor(){super(),this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._deferredBindingRemovals=new Map,this._unboundMarkerNames=new Set,this.on("modelToViewPosition",(t,r)=>{if(r.viewPosition)return;const o=this._modelToViewMapping.get(r.modelPosition.parent);if(!o)throw new P("mapping-model-position-view-parent-not-found",this,{modelPosition:r.modelPosition});r.viewPosition=this.findPositionIn(o,r.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(t,r)=>{if(r.modelPosition)return;const o=this.findMappedViewAncestor(r.viewPosition),c=this._viewToModelMapping.get(o),u=this._toModelOffset(r.viewPosition.parent,r.viewPosition.offset,o);r.modelPosition=De._createAt(c,u)},{priority:"low"})}bindElements(t,r){this._modelToViewMapping.set(t,r),this._viewToModelMapping.set(r,t)}unbindViewElement(t,r={}){const o=this.toModelElement(t);if(this._elementToMarkerNames.has(t))for(const c of this._elementToMarkerNames.get(t))this._unboundMarkerNames.add(c);r.defer?this._deferredBindingRemovals.set(t,t.root):(this._viewToModelMapping.delete(t),this._modelToViewMapping.get(o)==t&&this._modelToViewMapping.delete(o))}unbindModelElement(t){const r=this.toViewElement(t);this._modelToViewMapping.delete(t),this._viewToModelMapping.get(r)==t&&this._viewToModelMapping.delete(r)}bindElementToMarker(t,r){const o=this._markerNameToElements.get(r)||new Set;o.add(t);const c=this._elementToMarkerNames.get(t)||new Set;c.add(r),this._markerNameToElements.set(r,o),this._elementToMarkerNames.set(t,c)}unbindElementFromMarkerName(t,r){const o=this._markerNameToElements.get(r);o&&(o.delete(t),o.size==0&&this._markerNameToElements.delete(r));const c=this._elementToMarkerNames.get(t);c&&(c.delete(r),c.size==0&&this._elementToMarkerNames.delete(t))}flushUnboundMarkerNames(){const t=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),t}flushDeferredBindings(){for(const[t,r]of this._deferredBindingRemovals)t.root==r&&this.unbindViewElement(t);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(t){return this._viewToModelMapping.get(t)}toViewElement(t){return this._modelToViewMapping.get(t)}toModelRange(t){return new de(this.toModelPosition(t.start),this.toModelPosition(t.end))}toViewRange(t){return new wt(this.toViewPosition(t.start),this.toViewPosition(t.end))}toModelPosition(t){const r={viewPosition:t,mapper:this};return this.fire("viewToModelPosition",r),r.modelPosition}toViewPosition(t,r={}){const o={modelPosition:t,mapper:this,isPhantom:r.isPhantom};return this.fire("modelToViewPosition",o),o.viewPosition}markerNameToElements(t){const r=this._markerNameToElements.get(t);if(!r)return null;const o=new Set;for(const c of r)if(c.is("attributeElement"))for(const u of c.getElementsWithSameId())o.add(u);else o.add(c);return o}registerViewToModelLength(t,r){this._viewToModelLengthCallbacks.set(t,r)}findMappedViewAncestor(t){let r=t.parent;for(;!this._viewToModelMapping.has(r);)r=r.parent;return r}
vendor: 7,182 bytes, line 8465
8465_toModelOffset(t,r,o){if(o!=t)return this._toModelOffset(t.parent,t.index,o)+this._toModelOffset(t,r,t);if(t.is("$text"))return r;let c=0;for(let u=0;u<r;u++)c+=this.getModelLength(t.getChild(u));return c}getModelLength(t){if(this._viewToModelLengthCallbacks.get(t.name))return this._viewToModelLengthCallbacks.get(t.name)(t);if(this._viewToModelMapping.has(t))return 1;if(t.is("$text"))return t.data.length;if(t.is("uiElement"))return 0;{let r=0;for(const o of t.getChildren())r+=this.getModelLength(o);return r}}findPositionIn(t,r){let o,c=0,u=0,m=0;if(t.is("$text"))return new Ge(t,r);for(;u<r;)o=t.getChild(m),c=this.getModelLength(o),u+=c,m++;return u==r?this._moveViewPositionToTextNode(new Ge(t,m)):this.findPositionIn(o,r-(u-c))}_moveViewPositionToTextNode(t){const r=t.nodeBefore,o=t.nodeAfter;return r instanceof Zt?new Ge(r,r.data.length):o instanceof Zt?new Ge(o,0):t}}class NH{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(t,r){r=bf(r),t instanceof ho&&(t=this._getSymbolForTextProxy(t)),this._consumable.has(t)||this._consumable.set(t,new Map),this._consumable.get(t).set(r,!0)}consume(t,r){return r=bf(r),t instanceof ho&&(t=this._getSymbolForTextProxy(t)),!!this.test(t,r)&&(this._consumable.get(t).set(r,!1),!0)}test(t,r){r=bf(r),t instanceof ho&&(t=this._getSymbolForTextProxy(t));const o=this._consumable.get(t);if(o===void 0)return null;const c=o.get(r);return c===void 0?null:c}revert(t,r){r=bf(r),t instanceof ho&&(t=this._getSymbolForTextProxy(t));const o=this.test(t,r);return o===!1?(this._consumable.get(t).set(r,!0),!0):o!==!0&&null}verifyAllConsumed(t){const r=[];for(const[o,c]of this._consumable)for(const[u,m]of c){const b=u.split(":")[0];m&&t==b&&r.push({event:u,item:o.name||o.description})}if(r.length)throw new P("conversion-model-consumable-not-consumed",null,{items:r})}_getSymbolForTextProxy(t){let r=null;const o=this._textProxyRegistry.get(t.startOffset);if(o){const c=o.get(t.endOffset);c&&(r=c.get(t.parent))}return r||(r=this._addSymbolForTextProxy(t)),r}_addSymbolForTextProxy(t){const r=t.startOffset,o=t.endOffset,c=t.parent,u=Symbol("$textProxy:"+t.data);let m,b;return m=this._textProxyRegistry.get(r),m||(m=new Map,this._textProxyRegistry.set(r,m)),b=m.get(o),b||(b=new Map,m.set(o,b)),b.set(c,u),u}}function bf(l){const t=l.split(":");return t[0]=="insert"?t[0]:t[0]=="addMarker"||t[0]=="removeMarker"?l:t.length>1?t[0]+":"+t[1]:t[0]}var EH=Object.defineProperty,SH=Object.defineProperties,DH=Object.getOwnPropertyDescriptors,G5=Object.getOwnPropertySymbols,TH=Object.prototype.hasOwnProperty,IH=Object.prototype.propertyIsEnumerable,q5=(l,t,r)=>t in l?EH(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,ey=(l,t)=>{for(var r in t||(t={}))TH.call(t,r)&&q5(l,r,t[r]);if(G5)for(var r of G5(t))IH.call(t,r)&&q5(l,r,t[r]);return l},K5=(l,t)=>SH(l,DH(t));class Y5 extends ee(){constructor(t){super(),this._conversionApi=ey({dispatcher:this},t),this._firedEventsMap=new WeakMap}convertChanges(t,r,o){const c=this._createConversionApi(o,t.getRefreshedItems());for(const m of t.getMarkersToRemove())this._convertMarkerRemove(m.name,m.range,c);const u=this._reduceChanges(t.getChanges());for(const m of u)m.type==="insert"?this._convertInsert(de._createFromPositionAndShift(m.position,m.length),c):m.type==="reinsert"?this._convertReinsert(de._createFromPositionAndShift(m.position,m.length),c):m.type==="remove"?this._convertRemove(m.position,m.length,m.name,c):this._convertAttribute(m.range,m.attributeKey,m.attributeOldValue,m.attributeNewValue,c);c.mapper.flushDeferredBindings();for(const m of c.mapper.flushUnboundMarkerNames()){const b=r.get(m).getRange();this._convertMarkerRemove(m,b,c),this._convertMarkerAdd(m,b,c)}for(const m of t.getMarkersToAdd())this._convertMarkerAdd(m.name,m.range,c);c.consumable.verifyAllConsumed("insert")}convert(t,r,o,c={}){const u=this._createConversionApi(o,void 0,c);this._convertInsert(t,u);for(const[m,b]of r)this._convertMarkerAdd(m,b,u);u.consumable.verifyAllConsumed("insert")}convertSelection(t,r,o){const c=this._createConversionApi(o);this.fire("cleanSelection",{selection:t},c);const u=t.getFirstPosition().root;if(!c.mapper.toViewElement(u))return;const m=Array.from(r.getMarkersAtPosition(t.getFirstPosition()));if(this._addConsumablesForSelection(c.consumable,t,m),this.fire("selection",{selection:t},c),t.isCollapsed){for(const b of m)if(c.consumable.test(t,"addMarker:"+b.name)){const k=b.getRange();if(!MH(t.getFirstPosition(),b,c.mapper))continue;const _={item:t,markerName:b.name,markerRange:k};this.fire(`addMarker:${b.name}`,_,c)}for(const b of t.getAttributeKeys())if(c.consumable.test(t,"attribute:"+b)){const k={item:t,range:t.getFirstRange(),attributeKey:b,attributeOldValue:null,attributeNewValue:t.getAttribute(b)};this.fire(`attribute:${b}:$text`,k,c)}}}_convertInsert(t,r,o={}){o.doNotAddConsumables||this._addConsumablesForInsert(r.consumable,t);for(const c of Array.from(t.getWalker({shallow:!0})).map(Q5))this._testAndFire("insert",c,r)}_convertRemove(t,r,o,c){this.fire(`remove:${o}`,{position:t,length:r},c)}_convertAttribute(t,r,o,c,u){this._addConsumablesForRange(u.consumable,t,`attribute:${r}`);for(const m of t){const b={item:m.item,range:de._createFromPositionAndShift(m.previousPosition,m.length),attributeKey:r,attributeOldValue:o,attributeNewValue:c};this._testAndFire(`attribute:${r}`,b,u)}}_convertReinsert(t,r){const o=Array.from(t.getWalker({shallow:!0}));this._addConsumablesForInsert(r.consumable,o);for(const c of o.map(Q5))this._testAndFire("insert",K5(ey({},c),{reconversion:!0}),r)}_convertMarkerAdd(t,r,o){if(r.root.rootName=="$graveyard")return;const c=`addMarker:${t}`;if(o.consumable.add(r,c),this.fire(c,{markerName:t,markerRange:r},o),o.consumable.consume(r,c)){this._addConsumablesForRange(o.consumable,r,c);for(const u of r.getItems()){if(!o.consumable.test(u,c))continue;const m={item:u,range:de._createOn(u),markerName:t,markerRange:r};this.fire(c,m,o)}}}_convertMarkerRemove(t,r,o){r.root.rootName!="$graveyard"&&this.fire(`removeMarker:${t}`,{markerName:t,markerRange:r},o)}_reduceChanges(t){const r={changes:t};return this.fire("reduceChanges",r),r.changes}_addConsumablesForInsert(t,r){for(const o of r){const c=o.item;if(t.test(c,"insert")===null){t.add(c,"insert");for(const u of c.getAttributeKeys())t.add(c,"attribute:"+u)}}return t}_addConsumablesForRange(t,r,o){for(const c of r.getItems())t.add(c,o);return t}_addConsumablesForSelection(t,r,o){t.add(r,"selection");for(const c of o)t.add(r,"addMarker:"+c.name);for(const c of r.getAttributeKeys())t.add(r,"attribute:"+c);return t}_testAndFire(t,r,o){const c=function(k,_){const A=_.item.is("element")?_.item.name:"$text";return`${k}:${A}`}(t,r),u=r.item.is("$textProxy")?o.consumable._getSymbolForTextProxy(r.item):r.item,m=this._firedEventsMap.get(o),b=m.get(u);if(b){if(b.has(c))return;b.add(c)}else m.set(u,new Set([c]));this.fire(c,r,o)}_testAndFireAddAttributes(t,r){const o={item:t,range:de._createOn(t)};for(const c of o.item.getAttributeKeys())o.attributeKey=c,o.attributeOldValue=null,o.attributeNewValue=o.item.getAttribute(c),this._testAndFire(`attribute:${c}`,o,r)}_createConversionApi(t,r=new Set,o={}){const c=K5(ey({}
8465,this._conversionApi),{consumable:new NH,writer:t,options:o,convertItem:u=>this._convertInsert(de._createOn(u),c),convertChildren:u=>this._convertInsert(de._createIn(u),c,{doNotAddConsumables:!0}),convertAttributes:u=>this._testAndFireAddAttributes(u,c),canReuseView:u=>!r.has(c.mapper.toModelElement(u))});return this._firedEventsMap.set(c,new Map),c}}function MH(l,t,r){const o=t.getRange(),c=Array.from(l.getAncestors());return c.shift(),c.reverse(),!c.some(u=>{if(o.containsItem(u))return!!r.toViewElement(u).getCustomProperty("addHighlight")})}function Q5(l){return{item:l.item,range:de._createFromPositionAndShift(l.previousPosition,l.length)}}class yi extends ee(aa){constructor(...t){super(),this._lastRangeBackward=!1,this._attrs=new Map,this._ranges=[],t.length&&this.setTo(...t)}get anchor(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.end:t.start}return null}get focus(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.start:t.end}return null}get isCollapsed(){return this._ranges.length===1&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(t){if(this.rangeCount!=t.rangeCount)return!1;if(this.rangeCount===0)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const r of this._ranges){let o=!1;for(const c of t._ranges)if(r.isEqual(c)){o=!0;break}if(!o)return!1}return!0}*getRanges(){for(const t of this._ranges)yield new de(t.start,t.end)}getFirstRange(){let t=null;for(const r of this._ranges)t&&!r.start.isBefore(t.start)||(t=r);return t?new de(t.start,t.end):null}getLastRange(){let t=null;for(const r of this._ranges)t&&!r.end.isAfter(t.end)||(t=r);return t?new de(t.start,t.end):null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}setTo(...t){let[r,o,c]=t;if(typeof o=="object"&&(c=o,o=void 0),r===null)this._setRanges([]);else if(r instanceof yi)this._setRanges(r.getRanges(),r.isBackward);else if(r&&typeof r.getRanges=="function")this._setRanges(r.getRanges(),r.isBackward);else if(r instanceof de)this._setRanges([r],!!c&&!!c.backward);else if(r instanceof De)this._setRanges([new de(r)]);else if(r instanceof al){const u=!!c&&!!c.backward;let m;if(o=="in")m=de._createIn(r);else if(o=="on")m=de._createOn(r);else{if(o===void 0)throw new P("model-selection-setto-required-second-parameter",[this,r]);m=new de(De._createAt(r,o))}this._setRanges([m],u)}else{if(!Re(r))throw new P("model-selection-setto-not-selectable",[this,r]);this._setRanges(r,c&&!!c.backward)}}_setRanges(t,r=!1){const o=Array.from(t),c=o.some(u=>{if(!(u instanceof de))throw new P("model-selection-set-ranges-not-range",[this,t]);return this._ranges.every(m=>!m.isEqual(u))});(o.length!==this._ranges.length||c)&&(this._replaceAllRanges(o),this._lastRangeBackward=!!r,this.fire("change:range",{directChange:!0}))}setFocus(t,r){if(this.anchor===null)throw new P("model-selection-setfocus-no-ranges",[this,t]);const o=De._createAt(t,r);if(o.compareWith(this.focus)=="same")return;const c=this.anchor;this._ranges.length&&this._popRange(),o.compareWith(c)=="before"?(this._pushRange(new de(o,c)),this._lastRangeBackward=!0):(this._pushRange(new de(c,o)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(t){return this._attrs.has(t)}removeAttribute(t){this.hasAttribute(t)&&(this._attrs.delete(t),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}setAttribute(t,r){this.getAttribute(t)!==r&&(this._attrs.set(t,r),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}getSelectedElement(){return this.rangeCount!==1?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const t=new WeakSet;for(const r of this.getRanges()){const o=J5(r.start,t);OH(o,r)&&(yield o);for(const u of r.getWalker()){const m=u.item;u.type=="elementEnd"&&PH(m,t,r)&&(yield m)}const c=J5(r.end,t);BH(c,r)&&(yield c)}}containsEntireContent(t=this.anchor.root){const r=De._createAt(t,0),o=De._createAt(t,"end");return r.isTouching(this.getFirstPosition())&&o.isTouching(this.getLastPosition())}_pushRange(t){this._checkRange(t),this._ranges.push(new de(t.start,t.end))}_checkRange(t){for(let r=0;r<this._ranges.length;r++)if(t.isIntersecting(this._ranges[r]))throw new P("model-selection-range-intersects",[this,t],{addedRange:t,intersectingRange:this._ranges[r]})}_replaceAllRanges(t){this._removeAllRanges();for(const r of t)this._pushRange(r)}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}function Z5(l,t){return!t.has(l)&&(t.add(l),l.root.document.model.schema.isBlock(l)&&!!l.parent)}function PH(l,t,r){return Z5(l,t)&&ty(l,r)}function J5(l,t){const r=l.parent.root.document.model.schema,o=l.parent.getAncestors({parentFirst:!0,includeSelf:!0});let c=!1;const u=o.find(m=>!c&&(c=r.isLimit(m),!c&&Z5(m,t)));return o.forEach(m=>t.add(m)),u}function ty(l,t){const r=function(o){const c=o.root.document.model.schema;let u=o.parent;for(;u;){if(c.isBlock(u))return u;u=u.parent}}(l);return r?!t.containsRange(de._createOn(r),!0):!0}function OH(l,t){return!!l&&(!(!t.isCollapsed&&!l.isEmpty)||!t.start.isTouching(De._createAt(l,l.maxOffset))&&ty(l,t))}function BH(l,t){return!!l&&(!(!t.isCollapsed&&!l.isEmpty)||!t.end.isTouching(De._createAt(l,0))&&ty(l,t))}yi.prototype.is=function(l){return l==="selection"||l==="model:selection"};class xi extends ee(de){constructor(t,r){super(t,r),LH.call(this)}detach(){this.stopListening()}toRange(){return new de(this.start,this.end)}static fromRange(t){return new xi(t.start,t.end)}}function LH(){this.listenTo(this.root.document.model,"applyOperation",(l,t)=>{const r=t[0];r.isDocumentOperation&&RH.call(this,r)},{priority:"low"})}function RH(l){const t=this.getTransformedByOperation(l),r=de._createFromRanges(t),o=!r.isEqual(this),c=function(m,b){switch(b.type){case"insert":return m.containsPosition(b.position);case"move":case"remove":case"reinsert":case"merge":return m.containsPosition(b.sourcePosition)||m.start.isEqual(b.sourcePosition)||m.containsPosition(b.targetPosition);case"split":return m.containsPosition(b.splitPosition)||m.containsPosition(b.insertionPosition)}return!1}(this,l);let u=null;if(o){r.root.rootName=="$graveyard"&&(u=l.type=="remove"?l.sourcePosition:l.deletionPosition);const m=this.toRange();this.start=r.start,this.end=r.end,this.fire("change:range",m,{deleti
8465onPosition:u})}else c&&this.fire("change:content",this.toRange(),{deletionPosition:u})}xi.prototype.is=function(l){return l==="liveRange"||l==="model:liveRange"||l=="range"||l==="model:range"};const kf="selection:";class mo extends ee(aa){constructor(t){super(),this._selection=new zH(t),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(t){return this._selection.containsEntireContent(t)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(t){return this._selection.getAttribute(t)}hasAttribute(t){return this._selection.hasAttribute(t)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(t){this._selection.observeMarkers(t)}_setFocus(t,r){this._selection.setFocus(t,r)}_setTo(...t){this._selection.setTo(...t)}_setAttribute(t,r){this._selection.setAttribute(t,r)}_removeAttribute(t){this._selection.removeAttribute(t)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(t){this._selection.restoreGravity(t)}static _getStoreAttributeKey(t){return kf+t}static _isStoreAttributeKey(t){return t.startsWith(kf)}}mo.prototype.is=function(l){return l==="selection"||l=="model:selection"||l=="documentSelection"||l=="model:documentSelection"};class zH extends yi{constructor(t){super(),this.markers=new so({idProperty:"name"}),this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this._model=t.model,this._document=t,this.listenTo(this._model,"applyOperation",(r,o)=>{const c=o[0];c.isDocumentOperation&&c.type!="marker"&&c.type!="rename"&&c.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",()=>{this._validateSelectionRanges(this.getRanges())}),this.listenTo(this._model.markers,"update",(r,o,c,u)=>{this._updateMarker(o,u)}),this.listenTo(this._document,"change",(r,o)=>{(function(c,u){const m=c.document.differ;for(const b of m.getChanges()){if(b.type!="insert")continue;const k=b.position.parent;b.length===k.maxOffset&&c.enqueueChange(u,_=>{const A=Array.from(k.getAttributeKeys()).filter(N=>N.startsWith(kf));for(const N of A)_.removeAttribute(N,k)})}})(this._model,o)})}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 t=0;t<this._ranges.length;t++)this._ranges[t].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(...t){super.setTo(...t),this._updateAttributes(!0),this.updateMarkers()}setFocus(t,r){super.setFocus(t,r),this._updateAttributes(!0),this.updateMarkers()}setAttribute(t,r){if(this._setAttribute(t,r)){const o=[t];this.fire("change:attribute",{attributeKeys:o,directChange:!0})}}removeAttribute(t){if(this._removeAttribute(t)){const r=[t];this.fire("change:attribute",{attributeKeys:r,directChange:!0})}}overrideGravity(){const t=B();return this._overriddenGravityRegister.add(t),this._overriddenGravityRegister.size===1&&this._updateAttributes(!0),t}restoreGravity(t){if(!this._overriddenGravityRegister.has(t))throw new P("document-selection-gravity-wrong-restore",this,{uid:t});this._overriddenGravityRegister.delete(t),this.isGravityOverridden||this._updateAttributes(!0)}observeMarkers(t){this._observedMarkers.add(t),this.updateMarkers()}
vendor: 4,343 bytes, line 8465
8465_replaceAllRanges(t){this._validateSelectionRanges(t),super._replaceAllRanges(t)}_popRange(){this._ranges.pop().detach()}_pushRange(t){const r=this._prepareRange(t);r&&this._ranges.push(r)}_validateSelectionRanges(t){for(const r of t)if(!this._document._validateSelectionRange(r))throw new P("document-selection-wrong-position",this,{range:r})}_prepareRange(t){if(this._checkRange(t),t.root==this._document.graveyard)return;const r=xi.fromRange(t);return r.on("change:range",(o,c,u)=>{if(this._hasChangedRange=!0,r.root==this._document.graveyard){this._selectionRestorePosition=u.deletionPosition;const m=this._ranges.indexOf(r);this._ranges.splice(m,1),r.detach()}}),r}updateMarkers(){if(!this._observedMarkers.size)return;const t=[];let r=!1;for(const c of this._model.markers){const u=c.name.split(":",1)[0];if(!this._observedMarkers.has(u))continue;const m=c.getRange();for(const b of this.getRanges())m.containsRange(b,!b.isCollapsed)&&t.push(c)}const o=Array.from(this.markers);for(const c of t)this.markers.has(c)||(this.markers.add(c),r=!0);for(const c of Array.from(this.markers))t.includes(c)||(this.markers.remove(c),r=!0);r&&this.fire("change:marker",{oldMarkers:o,directChange:!1})}_updateMarker(t,r){const o=t.name.split(":",1)[0];if(!this._observedMarkers.has(o))return;let c=!1;const u=Array.from(this.markers),m=this.markers.has(t);if(r){let b=!1;for(const k of this.getRanges())if(r.containsRange(k,!k.isCollapsed)){b=!0;break}b&&!m?(this.markers.add(t),c=!0):!b&&m&&(this.markers.remove(t),c=!0)}else m&&(this.markers.remove(t),c=!0);c&&this.fire("change:marker",{oldMarkers:u,directChange:!1})}_updateAttributes(t){const r=Ro(this._getSurroundingAttributes()),o=Ro(this.getAttributes());if(t)this._attributePriority=new Map,this._attrs=new Map;else for(const[u,m]of this._attributePriority)m=="low"&&(this._attrs.delete(u),this._attributePriority.delete(u));this._setAttributesTo(r);const c=[];for(const[u,m]of this.getAttributes())o.has(u)&&o.get(u)===m||c.push(u);for(const[u]of o)this.hasAttribute(u)||c.push(u);c.length>0&&this.fire("change:attribute",{attributeKeys:c,directChange:!1})}_setAttribute(t,r,o=!0){const c=o?"normal":"low";return c=="low"&&this._attributePriority.get(t)=="normal"?!1:super.getAttribute(t)!==r&&(this._attrs.set(t,r),this._attributePriority.set(t,c),!0)}_removeAttribute(t,r=!0){const o=r?"normal":"low";return(o!="low"||this._attributePriority.get(t)!="normal")&&(this._attributePriority.set(t,o),!!super.hasAttribute(t)&&(this._attrs.delete(t),!0))}_setAttributesTo(t){const r=new Set;for(const[o,c]of this.getAttributes())t.get(o)!==c&&this._removeAttribute(o,!1);for(const[o,c]of t)this._setAttribute(o,c,!1)&&r.add(o);return r}*getStoredAttributes(){const t=this.getFirstPosition().parent;if(this.isCollapsed&&t.isEmpty)for(const r of t.getAttributeKeys())r.startsWith(kf)&&(yield[r.substr(10),t.getAttribute(r)])}_getSurroundingAttributes(){const t=this.getFirstPosition(),r=this._model.schema;if(t.root.rootName=="$graveyard")return null;let o=null;if(this.isCollapsed){const c=t.textNode?t.textNode:t.nodeBefore,u=t.textNode?t.textNode:t.nodeAfter;if(this.isGravityOverridden||(o=bu(c,r)),o||(o=bu(u,r)),!this.isGravityOverridden&&!o){let m=c;for(;m&&!o;)m=m.previousSibling,o=bu(m,r)}if(!o){let m=u;for(;m&&!o;)m=m.nextSibling,o=bu(m,r)}o||(o=this.getStoredAttributes())}else{const c=this.getFirstRange();for(const u of c){if(u.item.is("element")&&r.isObject(u.item)){o=bu(u.item,r);break}if(u.type=="text"){o=u.item.getAttributes();break}}}return o}_fixGraveyardSelection(t){const r=this._model.schema.getNearestSelectionRange(t);r&&this._pushRange(r)}}function bu(l,t){if(!l)return null;if(l instanceof ho||l instanceof Jt)return l.getAttributes();if(!t.isInline(l))return null;if(!t.isObject(l))return[];const r=[];for(const[o,c]of l.getAttributes())t.checkAttribute("$text",o)&&t.getAttributeProperties(o).copyFromObject!==!1&&r.push([o,c]);return r}class X5{constructor(t){this._dispatchers=t}add(t){for(const r of this._dispatchers)t(r);return this}}class FH extends X5{elementToElement(t){return this.add(function(r){const o=nj(r.model),c=ku(r.view,"container");return o.attributes.length&&(o.children=!0),u=>{u.on(`insert:${o.name}`,VH(c,sj(o)),{priority:r.converterPriority||"normal"}),(o.children||o.attributes.length)&&u.on("reduceChanges",oj(o),{priority:"low"})}}(t))}
8465elementToStructure(t){return this.add(function(r){const o=nj(r.model),c=ku(r.view,"container");return o.children=!0,u=>{if(u._conversionApi.schema.checkChild(o.name,"$text"))throw new P("conversion-element-to-structure-disallowed-text",u,{elementName:o.name});var m,b;u.on(`insert:${o.name}`,(m=c,b=sj(o),(k,_,A)=>{if(!b(_.item,A.consumable,{preflight:!0}))return;const N=new Map;A.writer._registerSlotFactory(function(L,$,U){return(H,J)=>{const ae=H.createContainerElement("$slot");let _e=null;if(J==="children")_e=Array.from(L.getChildren());else{if(typeof J!="function")throw new P("conversion-slot-mode-unknown",U.dispatcher,{modeOrFilter:J});_e=Array.from(L.getChildren()).filter(qe=>J(qe))}return $.set(ae,_e),ae}}(_.item,N,A));const T=m(_.item,A,_);if(A.writer._clearSlotFactory(),!T)return;(function(L,$,U){const H=Array.from($.values()).flat(),J=new Set(H);if(J.size!=H.length)throw new P("conversion-slot-filter-overlap",U.dispatcher,{element:L});if(J.size!=L.childCount)throw new P("conversion-slot-filter-incomplete",U.dispatcher,{element:L})})(_.item,N,A),b(_.item,A.consumable);const O=A.mapper.toViewPosition(_.range.start);A.mapper.bindElements(_.item,T),A.writer.insert(O,T),A.convertAttributes(_.item),function(L,$,U,H){U.mapper.on("modelToViewPosition",_e,{priority:"highest"});let J=null,ae=null;for([J,ae]of $)aj(L,ae,U,H),U.writer.move(U.writer.createRangeIn(J),U.writer.createPositionBefore(J)),U.writer.remove(J);function _e(qe,vt){const jt=vt.modelPosition.nodeAfter,nn=ae.indexOf(jt);nn<0||(vt.viewPosition=vt.mapper.findPositionIn(J,nn))}U.mapper.off("modelToViewPosition",_e)}(T,N,A,{reconversion:_.reconversion})}),{priority:r.converterPriority||"normal"}),u.on("reduceChanges",oj(o),{priority:"low"})}}(t))}attributeToElement(t){return this.add(function(r){r=uo(r);let o=r.model;typeof o=="string"&&(o={key:o});let c=`attribute:${o.key}`;if(o.name&&(c+=":"+o.name),o.values)for(const m of o.values)r.view[m]=ku(r.view[m],"attribute");else r.view=ku(r.view,"attribute");const u=rj(r);return m=>{m.on(c,$H(u),{priority:r.converterPriority||"normal"})}}(t))}attributeToAttribute(t){return this.add(function(r){r=uo(r);let o=r.model;typeof o=="string"&&(o={key:o});let c=`attribute:${o.key}`;if(o.name&&(c+=":"+o.name),o.values)for(const m of o.values)r.view[m]=ij(r.view[m]);else r.view=ij(r.view);const u=rj(r);return m=>{var b;m.on(c,(b=u,(k,_,A)=>{if(!A.consumable.test(_.item,k.name))return;const N=b(_.attributeOldValue,A,_),T=b(_.attributeNewValue,A,_);if(!N&&!T)return;A.consumable.consume(_.item,k.name);const O=A.mapper.toViewElement(_.item),L=A.writer;if(!O)throw new P("conversion-attribute-to-attribute-on-text",A.dispatcher,_);if(_.attributeOldValue!==null&&N)if(N.key=="class"){const $=typeof N.value=="string"?N.value.split(/\s+/):N.value;for(const U of $)L.removeClass(U,O)}else if(N.key=="style")if(typeof N.value=="string"){const $=new Rk(L.document.stylesProcessor);$.setTo(N.value);for(const[U]of $.getStylesEntries())L.removeStyle(U,O)}else{const $=Object.keys(N.value);for(const U of $)L.removeStyle(U,O)}else L.removeAttribute(N.key,O);if(_.attributeNewValue!==null&&T)if(T.key=="class"){const $=typeof T.value=="string"?T.value.split(/\s+/):T.value;for(const U of $)L.addClass(U,O)}else if(T.key=="style")if(typeof T.value=="string"){const $=new Rk(L.document.stylesProcessor);$.setTo(T.value);for(const[U,H]of $.getStylesEntries())L.setStyle(U,H,O)}else{const $=Object.keys(T.value);for(const U of $)L.setStyle(U,T.value[U],O)}else L.setAttribute(T.key,T.value,O)}),{priority:r.converterPriority||"normal"})}}(t))}markerToElement(t){return this.add(function(r){const o=ku(r.view,"ui");return c=>{c.on(`addMarker:${r.model}`,UH(o),{priority:r.converterPriority||"normal"}),c.on(`removeMarker:${r.model}`,(u,m,b)=>{const k=b.mapper.markerNameToElements(m.markerName);if(k){for(const _ of k)b.mapper.unbindElementFromMarkerName(_,m.markerName),b.writer.clear(b.writer.createRangeOn(_),_);b.writer.clearClonedElementsGroup(m.markerName),u.stop()}},{priority:r.converterPriority||"normal"})}}(t))}markerToHighlight(t){return this.add(function(r){return o=>{var c;o.on(`addMarker:${r.model}`,(c=r.view,(u,m,b)=>{if(!m.item||!(m.item instanceof yi||m.item instanceof mo||m.item.is("$textProxy")))return;const k=ny(c,m,b);if(!k||!b.consumable.consume(m.item,u.name))return;const _=b.writer,A=ej(_,k),N=_.document.selection;if(m.item instanceof yi||m.item instanceof mo)_.wrap(N.getFirstRange(),A);else{const T=b.mapper.toViewRange(m.range),O=_.wrap(T,A);for(const L of O.getItems())if(L.is("attributeElement")&&L.isSimilar(A)){b.mapper.bindElementToMarker(L,m.markerName);break}}}),{priority:r.converterPriority||"normal"}),o.on(`addMarker:${r.model}`,function(u){return(m,b,k)=>{if(!b.item||!(b.item instanceof Gt))return;const _=ny(u,b,k);if(!_||!k.consumable.test(b.item,m.name))return;const A=k.mapper.toViewElement(b.item);if(A&&A.getCustomProperty("addHighlight")){k.consumable.consume(b.item,m.name);for(const N of de._createIn(b.item))k.consumable.consume(N.item,m.name);A.getCustomProperty("addHighlight")(A,_,k.writer),k.mapper.bindElementToMarker(A,b.markerName)}}}(r.view),{priority:r.converterPriority||"normal"}),o.on(`removeMarker:${r.model}`,function(u){return(m,b,k)=>{if(b.markerRange.isCollapsed)return;const _=ny(u,b,k);if(!_)return;const A=ej(k.writer,_),N=k.mapper.markerNameToElements(b.markerName);if(N){for(const T of N)k.mapper.unbindElementFromMarkerName(T,b.markerName),T.is("attributeElement")?k.writer.unwrap(k.writer.createRangeOn(T),A):T.getCustomProperty("removeHighlight")(T,_.id,k.writer);k.writer.clearClonedElementsGroup(b.markerName),m.stop()}}}(r.view),{priority:r.converterPriority||"normal"})}}(t))}markerToData(t){return this.add(function(r){r=uo(r);const o=r.model;let c=r.view;return c||(c=u=>({group:o,name:u.substr(r.model.length+1)})),u=>{var m;u.on(`addMarker:${o}`,(m=c,(b,k,_)=>{const A=m(k.markerName,_);if(!A)return;const N=k.markerRange;_.consumable.consume(N,b.name)&&(tj(N,!1,_,k,A),tj(N,!0,_,k,A),b.stop())}),{priority:r.converterPriority||"normal"}),u.on(`removeMarker:${o}`,function(b){return(k,_,A)=>{const N=b(_.markerName,A);if(!N)return;const T=A.mapper.markerNameToElements(_.markerName);if(T){for(const L of T)A.mapper.unbindElementFromMarkerName(L,_.markerName),L.is("containerElement")?(O(`data-${N.group}-start-before`,L),O(`data-${N.group}-start-after`,L),O(`data-${N.group}-end-before`,L),O(`data-${N.group}-end-after`,L)):A.writer.clear(A.writer.createRangeOn(L),L);A.writer.clearClonedElementsGroup(_.markerName),k.stop()}function O(L,$){if($.hasAttribute(L)){const U=new Set($.getAttribute(L).split(","));U.delete(N.name),U.size==0?A.writer.removeAttribute(L,$):A.writer.setAttribute(L,Array.from(U).join(","),$)}}}}(c),{priority:r.converterPriority||"normal"})}}(t))}}function ej(l,t){const r=l.createAttributeElement("span",t.attributes);return t.classes&&r._addClass(t.classes),typeof t.priority=="number"&&(r._priority=t.priority),r._id=t.id,r}function $H(l){return(t,r,o)=>{if(!o.consumable.test(r.item,t.name))return;const c=l(r.attributeOldValue,o,r),u=l(r.attributeNewValue,o,r);if(!c&&!u)return;o.consumable.consume(r.item,t.name);const m=o.writer,b=m.document.selection;if(r.item instanceof yi||r.item instanceof mo)m.wrap(b.getFirstRange(),u);else{let k=o.mapper.toViewRange(r.range);r.attributeOldValue!==null&&c&&(k=m.unwrap(k,c)),r.attributeNewValue!==null&&u&&m.wrap(k,u)}}}function VH(l,t=HH){return(r,o,c)=>{if(!t(o.item,c.consumable,{preflight:!0}))return;const u=l(o.item,c,o);if(!u)return;t(o.item,c.consumable);const m=c.mapper.toViewPosition(o.range.start);c.mapper.bindElements(o.item,u),c.writer.insert(m,u),c.convertAttributes(o.item),aj(u,o.item.getChildren(),c,{reconversion:o.reconversion})}}function UH(l){return(t,r,o)=>{r.isOpening=!0;const c=l(r,o);r.isOpening=!1;const u=l(r,o);if(!c||!u)return;const m=r.markerRange;if(m.isCollapsed&&!o.consumable.consume(m,t.name))return;for(const _ of m)if(!o.consumable.consume(_.item,t.name))return;const b=o.mapper,k=o.writer;k.insert(b.toViewPosition(m.start),c),o.mapper.bindElementToMarker(c,r.markerName),m.isCollapsed||(k.insert(b.toViewPosition(m.end),u),o.mapper.bindElementToMarker(u,r.markerName)),t.stop()}}function tj(l,t,r,o,c){const u=t?l.start:l.end,m=u.nodeAfter&&u.nodeAfter.is("element")?u.no
8465deAfter:null,b=u.nodeBefore&&u.nodeBefore.is("element")?u.nodeBefore:null;if(m||b){let k,_;t&&m||!t&&!b?(k=m,_=!0):(k=b,_=!1);const A=r.mapper.toViewElement(k);if(A)return void function(N,T,O,L,$,U){const H=`data-${U.group}-${T?"start":"end"}-${O?"before":"after"}`,J=N.hasAttribute(H)?N.getAttribute(H).split(","):[];J.unshift(U.name),L.writer.setAttribute(H,J.join(","),N),L.mapper.bindElementToMarker(N,$.markerName)}(A,t,_,r,o,c)}(function(k,_,A,N,T){const O=`${T.group}-${_?"start":"end"}`,L=T.name?{name:T.name}:null,$=A.writer.createUIElement(O,L);A.writer.insert(k,$),A.mapper.bindElementToMarker($,N.markerName)})(r.mapper.toViewPosition(u),t,r,o,c)}function nj(l){return typeof l=="string"&&(l={name:l}),{name:l.name,attributes:l.attributes?tn(l.attributes):[],children:!!l.children}}function ku(l,t){return typeof l=="function"?l:(r,o)=>function(c,u,m){typeof c=="string"&&(c={name:c});let b;const k=u.writer,_=Object.assign({},c.attributes);if(m=="container")b=k.createContainerElement(c.name,_);else if(m=="attribute"){const A={priority:c.priority||ol.DEFAULT_PRIORITY};b=k.createAttributeElement(c.name,_,A)}else b=k.createUIElement(c.name,_);if(c.styles){const A=Object.keys(c.styles);for(const N of A)k.setStyle(N,c.styles[N],b)}if(c.classes){const A=c.classes;if(typeof A=="string")k.addClass(A,b);else for(const N of A)k.addClass(N,b)}return b}(l,o,t)}function rj(l){return l.model.values?(t,r,o)=>{const c=l.view[t];return c?c(t,r,o):null}:l.view}function ij(l){return typeof l=="string"?t=>({key:l,value:t}):typeof l=="object"?l.value?()=>l:t=>({key:l.key,value:t}):l}function ny(l,t,r){const o=typeof l=="function"?l(t,r):l;return o?(o.priority||(o.priority=10),o.id||(o.id=t.markerName),o):null}function oj(l){const t=function(r){return(o,c)=>{if(!o.is("element",r.name))return!1;if(c.type=="attribute"){if(r.attributes.includes(c.attributeKey))return!0}else if(r.children)return!0;return!1}}(l);return(r,o)=>{const c=[];o.reconvertedElements||(o.reconvertedElements=new Set);for(const u of o.changes){const m=u.type=="attribute"?u.range.start.nodeAfter:u.position.parent;if(m&&t(m,u)){if(!o.reconvertedElements.has(m)){o.reconvertedElements.add(m);const b=De._createBefore(m);let k=c.length;for(let _=c.length-1;_>=0;_--){const A=c[_],N=(A.type=="attribute"?A.range.start:A.position).compareWith(b);if(N=="before"||A.type=="remove"&&N=="same")break;k=_}c.splice(k,0,{type:"remove",name:m.name,position:b,length:1},{type:"reinsert",name:m.name,position:b,length:1})}}else c.push(u)}o.changes=c}}function sj(l){return(t,r,o={})=>{const c=["insert"];for(const u of l.attributes)t.hasAttribute(u)&&c.push(`attribute:${u}`);return!!c.every(u=>r.test(t,u))&&(o.preflight||c.forEach(u=>r.consume(t,u)),!0)}}function aj(l,t,r,o){for(const c of t)WH(l.root,c,r,o)||r.convertItem(c)}function WH(l,t,r,o){const{writer:c,mapper:u}=r;if(!o.reconversion)return!1;const m=u.toViewElement(t);return!(!m||m.root==l)&&!!r.canReuseView(m)&&(c.move(c.createRangeOn(m),u.toViewPosition(De._createBefore(t))),!0)}function HH(l,t,{preflight:r}={}){return r?t.test(l,"insert"):t.consume(l,"insert")}function lj(l){const{schema:t,document:r}=l.model;for(const o of r.getRoots())if(o.isEmpty&&!t.checkChild(o,"$text")&&t.checkChild(o,"paragraph"))return l.insertElement("paragraph",o),!0;return!1}function cj(l,t,r){const o=r.createContext(l);return!!r.checkChild(o,"paragraph")&&!!r.checkChild(o.push("paragraph"),t)}function dj(l,t){const r=t.createElement("paragraph");return t.insert(r,l),t.createPositionAt(r,0)}var GH=Object.defineProperty,qH=Object.defineProperties,KH=Object.getOwnPropertyDescriptors,uj=Object.getOwnPropertySymbols,YH=Object.prototype.hasOwnProperty,QH=Object.prototype.propertyIsEnumerable,hj=(l,t,r)=>t in l?GH(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r;class ZH extends X5{elementToElement(t){return this.add(mj(t))}elementToAttribute(t){return this.add(function(r){r=uo(r),fj(r);const o=pj(r,!1),c=ry(r.view),u=c?`element:${c}`:"element";return m=>{m.on(u,o,{priority:r.converterPriority||"low"})}}(t))}attributeToAttribute(t){return this.add(function(r){r=uo(r);let o=null;(typeof r.view=="string"||r.view.key)&&(o=function(u){typeof u.view=="string"&&(u.view={key:u.view});const m=u.view.key,b=u.view.value===void 0?/[\s\S]*/:u.view.value;let k;return m=="class"||m=="style"?k={[m=="class"?"classes":"styles"]:b}:k={attributes:{[m]:b}},u.view.name&&(k.name=u.view.name),u.view=k,m}(r)),fj(r,o);const c=pj(r,!0);return u=>{u.on("element",c,{priority:r.converterPriority||"low"})}}(t))}elementToMarker(t){return this.add(function(r){const o=function(m){return(b,k)=>{const _=typeof m=="string"?m:m(b,k);return k.writer.createElement("$marker",{"data-name":_})}}(r.model);return mj((c=((m,b)=>{for(var k in b||(b={}))YH.call(b,k)&&hj(m,k,b[k]);if(uj)for(var k of uj(b))QH.call(b,k)&&hj(m,k,b[k]);return m})({},r),u={model:o},qH(c,KH(u))));var c,u}(t))}dataToMarker(t){return this.add(function(r){r=uo(r),r.model||(r.model=m=>m?r.view+":"+m:r.view);const o={view:r.view,model:r.model},c=iy(gj(o,"start")),u=iy(gj(o,"end"));return m=>{m.on(`element:${r.view}-start`,c,{priority:r.converterPriority||"normal"}),m.on(`element:${r.view}-end`,u,{priority:r.converterPriority||"normal"});const b=R.low,k=R.highest,_=R.get(r.converterPriority)/k;m.on("element",function(A){return(N,T,O)=>{const L=`data-${A.view}`;function $(U,H){for(const J of H){const ae=A.model(J,O),_e=O.writer.createElement("$marker",{"data-name":ae});O.writer.insert(_e,U),T.modelCursor.isEqual(U)?T.modelCursor=T.modelCursor.getShiftedBy(1):T.modelCursor=T.modelCursor._getTransformedByInsertion(U,1),T.modelRange=T.modelRange._getTransformedByInsertion(U,1)[0]}}(O.consumable.test(T.viewItem,{attributes:L+"-end-after"})||O.consumable.test(T.viewItem,{attributes:L+"-start-after"})||O.consumable.test(T.viewItem,{attributes:L+"-end-before"})||O.consumable.test(T.viewItem,{attributes:L+"-start-before"}))&&(T.modelRange||Object.assign(T,O.convertChildren(T.viewItem,T.modelCursor)),O.consumable.consume(T.viewItem,{attributes:L+"-end-after"})&&$(T.modelRange.end,T.viewItem.getAttribute(L+"-end-after").split(",")),O.consumable.consume(T.viewItem,{attributes:L+"-start-after"})&&$(T.modelRange.end,T.viewItem.getAttribute(L+"-start-after").split(",")),O.consumable.consume(T.viewItem,{attributes:L+"-end-before"})&&$(T.modelRange.start,T.viewItem.getAttribute(L+"-end-before").split(",")),O.consumable.consume(T.viewItem,{attributes:L+"-start-before"})&&$(T.modelRange.start,T.viewItem.getAttribute(L+"-start-before").split(",")))}}(o),{priority:b+_})}}(t))}}function mj(l){const t=iy(l=uo(l)),r=ry(l.view),o=r?`element:${r}`:"element";return c=>{c.on(o,t,{priority:l.converterPriority||"normal"})}}function ry(l){return typeof l=="string"?l:typeof l=="object"&&typeof l.name=="string"?l.name:null}function iy(l){const t=new Fo(l.view);return(r,o,c)=>{const u=t.match(o.viewItem);if(!u)return;const m=u.match;if(m.name=!0,!c.consumable.test(o.viewItem,m))return;const b=function(k,_,A){return k instanceof Function?k(_,A):A.writer.createElement(k)}(l.model,o.viewItem,c);b&&c.safeInsert(b,o.modelCursor)&&(c.consumable.consume(o.viewItem,m),c.convertChildren(o.viewItem,b),c.updateConversionResult(b,o))}}function fj(l,t=null){const r=t===null||(u=>u.getAttribute(t)),o=typeof l.model!="object"?l.model:l.model.key,c=typeof l.model!="object"||l.model.value===void 0?r:l.model.value;l.model={key:o,value:c}}function pj(l,t){const r=new Fo(l.view);return(o,c,u)=>{if(!c.modelRange&&t)return;const m=r.match(c.viewItem);if(!m||(function(A,N){const T=typeof A=="function"?A(N):A;return typeof T=="object"&&!ry(T)?!1:!T.classes&&!T.attributes&&!T.styles}(l.view,c.viewItem)?m.match.name=!0:delete m.match.name,!u.consumable.test(c.viewItem,m.match)))return;const b=l.model.key,k=typeof l.model.value=="function"?l.model.value(c.viewItem,u):l.model.value;if(k===null)return;c.modelRange||Object.assign(c,u.convertChildren(c.viewItem,c.modelCursor)),function(A,N,T,O){let L=!1;for(const $ of Array.from(A.getItems({shallow:T})))O.schema.checkAttribute($,N.key)&&(L=!0,$.hasAttribute(N.key)||O.writer.setAttribute(N.key,N.value,$));return L}(c.modelRange,{key:b,value:k},t,u)&&(u.consumable.test(c.viewItem,{name:!0})&&(m.match.name=!0),u.consumable.consume(c.viewItem,m.match))}}function gj(l,t){return{view:`${l.view}-${t}`,model:(r,o)=>{const c=r.getAttribute("name"),u=l.model(c,o);return o.writer.createElement("$marker",{"data-name":u})}}}function JH(l){l.document.registerPostFixer(t=>function(r,o){const c=o.document.selection,u=o.schema,m=[];let b=!1;for(const k of c.getRanges()){const _=bj(k,u);_&&!_.isEqual(k)?(m.push(_),b=!0):m.push(k)}return b&&r.setSelection(function(k){const _=[...k],A=new Set;let N=1;for(;N<_.length;){const T=_[N],O=_.slice(0,N);for(const[L,$]of O.entries())if(!A.has(L)){if(T.isEqual($))A.add(L);else if(T.isIntersecting($)){A.add(L),A.add(N);const U=T.getJoined($);_.push(U)}}N++}return _.filter((T,O)=>!A.has(O))}(m),{backward:c.isBackward}),!1}(t,l))}function bj(l,t){return l.isCollapsed?function(r,o){const c=r.start,u=o.getNearestSelectionRange(c);if(!u){const b=c.getAncestors().reverse().find(k=>o.isObject(k));return b?de._createOn(b):null}if(!u.isCollapsed)return u;const m=u.start;return c.isEqual(m)?null:new de(m)}(l,t):function(r,o){const{start:c,end:u}=r,m=o.checkChild(c,"$text"),b=o.checkChild(u,"$text"),k=o.getLimitElement(c),_=o.getLimitElement(u);if(k===_){if(m&&b)return null;if(function(T,O,L){const $=T.nodeAfter&&!L.isLimit(T.nodeAfter)||L.checkChild(T,"$text"),U=O.nodeBefore&&!L.isLimit(O.nodeBefore)||L.checkChild(O,"$text");return $||U}(c,u,o)){const T=c.nodeAfter&&o.isSelectable(c.nodeAfter)?null:o.getNearestSelectionRange(c,"forward"),O=u.nodeBefore&&o.isSelectable(u.nodeBefore)?null:o.getNearestSelectionRange(u,"backward"),L=T?T.start:c,$=O?O.end:u;return new de(L,$)}}const A=k&&!k.is("rootElement"),N=_&&!_.is("rootElement");
8465if(A||N){const T=c.nodeAfter&&u.nodeBefore&&c.nodeAfter.parent===u.nodeBefore.parent,O=A&&(!T||!yj(c.nodeAfter,o)),L=N&&(!T||!yj(u.nodeBefore,o));let $=c,U=u;return O&&($=De._createBefore(kj(k,o))),L&&(U=De._createAfter(kj(_,o))),new de($,U)}return null}(l,t)}function kj(l,t){let r=l,o=r;for(;t.isLimit(o)&&o.parent;)r=o,o=o.parent;return r}function yj(l,t){return l&&t.isSelectable(l)}class XH extends fe(){constructor(t,r){super(),this.model=t,this.view=new jH(r),this.mapper=new H5,this.downcastDispatcher=new Y5({mapper:this.mapper,schema:t.schema});const o=this.model.document,c=o.selection,u=this.model.markers;var m,b,k;this.listenTo(this.model,"_beforeChanges",()=>{this.view._disableRendering(!0)},{priority:"highest"}),this.listenTo(this.model,"_afterChanges",()=>{this.view._disableRendering(!1)},{priority:"lowest"}),this.listenTo(o,"change",()=>{this.view.change(_=>{this.downcastDispatcher.convertChanges(o.differ,u,_),this.downcastDispatcher.convertSelection(c,u,_)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(_,A){return(N,T)=>{const O=T.newSelection,L=[];for(const U of O.getRanges())L.push(A.toModelRange(U));const $=_.createSelection(L,{backward:O.isBackward});$.isEqual(_.document.selection)||_.change(U=>{U.setSelection($)})}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(m=this.mapper,b=this.model.schema,k=this.view,(_,A)=>{if(!k.document.isComposing||y.isAndroid)for(let N=0;N<A.targetRanges.length;N++){const T=A.targetRanges[N],O=m.toModelRange(T),L=bj(O,b);L&&!L.isEqual(O)&&(A.targetRanges[N]=m.toViewRange(L))}}),{priority:"high"}),this.downcastDispatcher.on("insert:$text",(_,A,N)=>{if(!N.consumable.consume(A.item,_.name))return;const T=N.writer,O=N.mapper.toViewPosition(A.range.start),L=T.createText(A.item.data);T.insert(O,L)},{priority:"lowest"}),this.downcastDispatcher.on("insert",(_,A,N)=>{N.convertAttributes(A.item),A.reconversion||!A.item.is("element")||A.item.isEmpty||N.convertChildren(A.item)},{priority:"lowest"}),this.downcastDispatcher.on("remove",(_,A,N)=>{const T=N.mapper.toViewPosition(A.position),O=A.position.getShiftedBy(A.length),L=N.mapper.toViewPosition(O,{isPhantom:!0}),$=N.writer.createRange(T,L),U=N.writer.remove($.getTrimmed());for(const H of N.writer.createRangeIn(U).getItems())N.mapper.unbindViewElement(H,{defer:!0})},{priority:"low"}),this.downcastDispatcher.on("cleanSelection",(_,A,N)=>{const T=N.writer,O=T.document.selection;for(const L of O.getRanges())L.isCollapsed&&L.end.parent.isAttached()&&N.writer.mergeAttributes(L.start);T.setSelection(null)}),this.downcastDispatcher.on("selection",(_,A,N)=>{const T=A.selection;if(T.isCollapsed||!N.consumable.consume(T,"selection"))return;const O=[];for(const L of T.getRanges())O.push(N.mapper.toViewRange(L));N.writer.setSelection(O,{backward:T.isBackward})},{priority:"low"}),this.downcastDispatcher.on("selection",(_,A,N)=>{const T=A.selection;if(!T.isCollapsed||!N.consumable.consume(T,"selection"))return;const O=N.writer,L=T.getFirstPosition(),$=N.mapper.toViewPosition(L),U=O.breakAttributes($);O.setSelection(U)},{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(_=>{if(_.rootName=="$graveyard")return null;const A=new f5(this.view.document,_.name);return A.rootName=_.rootName,this.mapper.bindElements(_,A),A})}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(t){const r=typeof t=="string"?t:t.name,o=this.model.markers.get(r);if(!o)throw new P("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:r});this.model.change(()=>{this.model.markers._refresh(o)})}reconvertItem(t){this.model.change(()=>{this.model.document.differ._refreshItem(t)})}}class yu{constructor(){this._consumables=new Map}add(t,r){let o;t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):(this._consumables.has(t)?o=this._consumables.get(t):(o=new eG(t),this._consumables.set(t,o)),o.add(r))}test(t,r){const o=this._consumables.get(t);return o===void 0?null:t.is("$text")||t.is("documentFragment")?o:o.test(r)}consume(t,r){return!!this.test(t,r)&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!1):this._consumables.get(t).consume(r),!0)}revert(t,r){const o=this._consumables.get(t);o!==void 0&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):o.revert(r))}static consumablesFromElement(t){const r={element:t,name:!0,attributes:[],classes:[],styles:[]},o=t.getAttributeKeys();for(const m of o)m!="style"&&m!="class"&&r.attributes.push(m);const c=t.getClassNames();for(const m of c)r.classes.push(m);const u=t.getStyleNames();for(const m of u)r.styles.push(m);return r}static createFrom(t,r){if(r||(r=new yu),t.is("$text"))return r.add(t),r;t.is("element")&&r.add(t,yu.consumablesFromElement(t)),t.is("documentFragment")&&r.add(t);for(const o of t.getChildren())r=yu.createFrom(o,r);return r}}const yf=["attributes","classes","styles"];class eG{constructor(t){this.element=t,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(t){t.name&&(this._canConsumeName=!0);for(const r of yf)r in t&&this._add(r,t[r])}test(t){if(t.name&&!this._canConsumeName)return this._canConsumeName;for(const r of yf)if(r in t){const o=this._test(r,t[r]);if(o!==!0)return o}return!0}consume(t){t.name&&(this._canConsumeName=!1);for(const r of yf)r in t&&this._consume(r,t[r])}revert(t){t.name&&(this._canConsumeName=!0);for(const r of yf)r in t&&this._revert(r,t[r])}_add(t,r){const o=tn(r),c=this._consumables[t];for(const u of o){if(t==="attributes"&&(u==="class"||u==="style"))throw new P("viewconsumable-invalid-attribute",this);if(c.set(u,!0),t==="styles")for(const m of this.element.document.stylesProcessor.getRelatedStyles(u))c.set(m,!0)}}_test(t,r){const o=tn(r),c=this._consumables[t];for(const u of o)if(t!=="attributes"||u!=="class"&&u!=="style"){const m=c.get(u);if(m===void 0)return null;if(!m)return!1}else{const m=u=="class"?"classes":"styles",b=this._test(m,[...this._consumables[m].keys()]);if(b!==!0)return b}return!0}_consume(t,r){const o=tn(r),c=this._consumables[t];for(const u of o)if(t!=="attributes"||u!=="class"&&u!=="style"){if(c.set(u,!1),t=="styles")for(const m of this.element.document.stylesProcessor.getRelatedStyles(u))c.set(m,!1)}else{const m=u=="class"?"classes":"styles";this._consume(m,[...this._consumables[m].keys()])}}_revert(t,r){const o=tn(r),c=this._consumables[t];for(const u of o)if(t!=="attributes"||u!=="class"&&u!=="style")c.get(u)===!1&&c.set(u,!0);else{const m=u=="class"?"classes":"styles";this._revert(m,[...this._consumables[m].keys()])}}}class tG extends fe(){constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",(t,r)=>{r[0]=new cl(r[0])},{priority:"highest"}),this.on("checkChild",(t,r)=>{r[0]=new cl(r[0]),r[1]=this.getDefinition(r[1])},{priority:"highest"})}register(t,r){if(this._sourceDefinitions[t])throw new P("schema-cannot-register-item-twice",this,{itemName:t});this._sourceDefinitions[t]=[Object.assign({},r)],this._clearCache()}extend(t,r){if(!this._sourceDefinitions[t])throw new P("schema-cannot-extend-missing-item",this,{itemName:t});this._sourceDefinitions[t].push(Object.assign({},r)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(t){let r;return r=typeof t=="string"?t:"is"in t&&(t.is("$text")||t.is("$textProxy"))?"$text":t.name,this.getDefinitions()[r]}isRegistered(t){return!!this.getDefinition(t)}isBlock(t){const r=this.getDefinition(t);return!(!r||!r.isBlock)}isLimit(t){const r=this.getDefinition(t);return!!r&&!(!r.isLimit&&!r.isObject)}isObject(t){const r=this.getDefinition(t);return!!r&&!!(r.isObject||r.isLimit&&r.isSelectable&&r.isContent)}isInline(t){const r=this.getDefinition(t);return!(!r||!r.isInline)}isSelectable(t){const r=this.getDefinition(t);return!!r&&!(!r.isSelectable&&!r.isObject)}isContent(t){const r=this.getDefinition(t);return!!r&&!(!r.isContent&&!r.isObject)}checkChild(t,r){return!!r&&this._checkContextMatch(r,t)}checkAttribute(t,r){const o=this.getDefinition(t.last);return!!o&&o.allowAttributes.includes(r)}checkMerge(t,r){if(t instanceof De){const o=t.nodeBefore,c=t.nodeAfter;if(!(o instanceof Gt))throw new P("schema-check-merge-no-element-before",this);if(!(c instanceof Gt))throw new P("schema-check-merge-no-element-after",this);return this.checkMerge(o,c)}for(const o of r.getChildren())if(!this.checkChild(t,o))return!1;return!0}addChildCheck(t){this.on("checkChild",(r,[o,c])=>{if(!c)return;const u=t(o,c);typeof u=="boolean"&&(r.stop(),r.return=u)},{priority:"high"})}addAttributeCheck(t){this.on("checkAttribute",(r,[o,c])=>{const u=t(o,c);typeof u=="boolean"&&(r.stop(),r.return=u)},{priority:"high"})}setAttributeProperties(t,r){this._attributeProperties[t]=Object.assign(this.getAttributeProperties(t),r)}getAttributeProperties(t){return this._attributeProperties[t]||{}}getLimitElement(t){let r;for(t instanceof De?r=t.parent:r=(t instanceof de?[t]:Array.from(t.getRanges())).reduce((o,c)=>{const u=c.getCommonAncestor();return o?o.getCommonAncestor(u,{includeSelf:!0}):u},null);!this.isLimit(r)&&r.parent;)r=r.parent;return r}checkAttributeInSelection(t,r){if(t.isCollapsed){const o=[...t.getFirstPosition().getAncestors(),new Jt("",t.getAttributes())];return this.checkAttribute(o,r)}{const o=t.getRanges();for(const c of o)for(const u of c)if(this.checkAttribute(u.item,r))return!0}return!1}*getValidRanges(t,r){t=function*(o){for(const c of o)yield*c.getMinimalFlatRanges()}(t);for(const o of t)yield*this._getValidRangesForRange(o,r)}getNearestSelectionRange(t,r="both"){if(t.root.rootName=="$graveyard")return null;if(this.checkChild(t,"$text"))return new de(t);let o,c;const u=t.getAncestors().reverse().find(m=>this.isLimit(m))||t.root;r!="both"&&r!="backward"||(o=new ds({boundaries:de._createIn(u),startPosition:t,direction:"backward"})),r!="both"&&r!="forward"||(c=new ds({boundaries:de._createIn(u),startPosition:t}));for(const m of function*(b,k){let _=!1;for(;!_;){if(_=!0,b){const A=b.next();A.done||(_=!1,yield{walker:b,value:A.value})}if(k){const A=k.next();A.done||(_=!1,yield{walker:k,value:A.value})}}}(o,c)){const b=m.walker==o?"elementEnd":"elementStart",k=m.value;if(k.type==b&&this.isObject(k.item))return de._createOn(k.item);if(this.checkChild(k.nextPosition,"$text"))return new de(k.nextPosition)}return null}findAllowedParent(t,r){let o=t.parent;for(;o;){if(this.checkChild(o,r))return o;if(this.isLimit(o))return null;o=o.parent}return null}setAllowedAttributes(t,r,o){const c=o.model;for(const[u,m]of Object.entries(r))c.schema.checkAttribute(t,u)&&o.setAttribute(u,m,t)}
8465removeDisallowedAttributes(t,r){for(const o of t)if(o.is("$text"))xj(this,o,r);else{const c=de._createIn(o).getPositions();for(const u of c)xj(this,u.nodeBefore||u.parent,r)}}getAttributesWithProperty(t,r,o){const c={};for(const[u,m]of t.getAttributes()){const b=this.getAttributeProperties(u);b[r]!==void 0&&(o!==void 0&&o!==b[r]||(c[u]=m))}return c}createContext(t){return new cl(t)}_clearCache(){this._compiledDefinitions=null}_compile(){const t={},r=this._sourceDefinitions,o=Object.keys(r);for(const c of o)t[c]=nG(r[c],c);for(const c of o)rG(t,c);for(const c of o)iG(t,c);for(const c of o)oG(t,c);for(const c of o)sG(t,c),aG(t,c);for(const c of o)lG(t,c),cG(t,c),dG(t,c);this._compiledDefinitions=t}_checkContextMatch(t,r,o=r.length-1){const c=r.getItem(o);if(t.allowIn.includes(c.name)){if(o==0)return!0;{const u=this.getDefinition(c);return this._checkContextMatch(u,r,o-1)}}return!1}*_getValidRangesForRange(t,r){let o=t.start,c=t.start;for(const u of t.getItems({shallow:!0}))u.is("element")&&(yield*this._getValidRangesForRange(de._createIn(u),r)),this.checkAttribute(u,r)||(o.isEqual(c)||(yield new de(o,c)),o=De._createAfter(u)),c=De._createAfter(u);o.isEqual(c)||(yield new de(o,c))}findOptimalInsertionRange(t,r){const o=t.getSelectedElement();if(o&&this.isObject(o)&&!this.isInline(o))return r=="before"||r=="after"?new de(De._createAt(o,r)):de._createOn(o);const c=rr(t.getSelectedBlocks());if(!c)return new de(t.focus);if(c.isEmpty)return new de(De._createAt(c,0));const u=De._createAfter(c);return t.focus.isTouching(u)?new de(u):new de(De._createBefore(c))}}class cl{constructor(t){if(t instanceof cl)return t;let r;r=typeof t=="string"?[t]:Array.isArray(t)?t:t.getAncestors({includeSelf:!0}),this._items=r.map(hG)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(t){const r=new cl([t]);return r._items=[...this._items,...r._items],r}getItem(t){return this._items[t]}*getNames(){yield*this._items.map(t=>t.name)}endsWith(t){return Array.from(this.getNames()).join(" ").endsWith(t)}startsWith(t){return Array.from(this.getNames()).join(" ").startsWith(t)}}function nG(l,t){const r={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(o,c){for(const u of o){const m=Object.keys(u).filter(b=>b.startsWith("is"));for(const b of m)c[b]=!!u[b]}}(l,r),dl(l,r,"allowIn"),dl(l,r,"allowContentOf"),dl(l,r,"allowWhere"),dl(l,r,"allowAttributes"),dl(l,r,"allowAttributesOf"),dl(l,r,"allowChildren"),dl(l,r,"inheritTypesFrom"),function(o,c){for(const u of o){const m=u.inheritAllFrom;m&&(c.allowContentOf.push(m),c.allowWhere.push(m),c.allowAttributesOf.push(m),c.inheritTypesFrom.push(m))}}(l,r),r}function rG(l,t){const r=l[t];for(const o of r.allowChildren){const c=l[o];c&&c.allowIn.push(t)}r.allowChildren.length=0}function iG(l,t){for(const r of l[t].allowContentOf)l[r]&&uG(l,r).forEach(o=>{o.allowIn.push(t)});delete l[t].allowContentOf}function oG(l,t){for(const r of l[t].allowWhere){const o=l[r];if(o){const c=o.allowIn;l[t].allowIn.push(...c)}}delete l[t].allowWhere}function sG(l,t){for(const r of l[t].allowAttributesOf){const o=l[r];if(o){const c=o.allowAttributes;l[t].allowAttributes.push(...c)}}delete l[t].allowAttributesOf}function aG(l,t){const r=l[t];for(const o of r.inheritTypesFrom){const c=l[o];if(c){const u=Object.keys(c).filter(m=>m.startsWith("is"));for(const m of u)m in r||(r[m]=c[m])}}delete r.inheritTypesFrom}function lG(l,t){const r=l[t],o=r.allowIn.filter(c=>l[c]);r.allowIn=Array.from(new Set(o))}function cG(l,t){const r=l[t];for(const o of r.allowIn)l[o].allowChildren.push(t)}function dG(l,t){const r=l[t];r.allowAttributes=Array.from(new Set(r.allowAttributes))}function dl(l,t,r){for(const o of l){const c=o[r];typeof c=="string"?t[r].push(c):Array.isArray(c)&&t[r].push(...c)}}function uG(l,t){const r=l[t];return(o=l,Object.keys(o).map(c=>o[c])).filter(c=>c.allowIn.includes(r.name));var o}function hG(l){return typeof l=="string"||l.is("documentFragment")?{name:typeof l=="string"?l:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:l.is("element")?l.name:"$text",*getAttributeKeys(){yield*l.getAttributeKeys()},getAttribute:t=>l.getAttribute(t)}}function xj(l,t,r){for(const o of t.getAttributeKeys())l.checkAttribute(t,o)||r.removeAttribute(o,t)}var mG=Object.defineProperty,fG=Object.defineProperties,pG=Object.getOwnPropertyDescriptors,vj=Object.getOwnPropertySymbols,gG=Object.prototype.hasOwnProperty,bG=Object.prototype.propertyIsEnumerable,wj=(l,t,r)=>t in l?mG(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r;class kG extends ee(){constructor(t){var r;super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi=(r=((o,c)=>{for(var u in c||(c={}))gG.call(c,u)&&wj(o,u,c[u]);if(vj)for(var u of vj(c))bG.call(c,u)&&wj(o,u,c[u]);return o}
vendor: 6,878 bytes, line 8465
8465)({},t),fG(r,pG({consumable:null,writer:null,store:null,convertItem:(o,c)=>this._convertItem(o,c),convertChildren:(o,c)=>this._convertChildren(o,c),safeInsert:(o,c)=>this._safeInsert(o,c),updateConversionResult:(o,c)=>this._updateConversionResult(o,c),splitToAllowedParent:(o,c)=>this._splitToAllowedParent(o,c),getSplitParts:o=>this._getSplitParts(o),keepEmptyElement:o=>this._keepEmptyElement(o)})))}convert(t,r,o=["$root"]){this.fire("viewCleanup",t),this._modelCursor=function(m,b){let k;for(const _ of new cl(m)){const A={};for(const T of _.getAttributeKeys())A[T]=_.getAttribute(T);const N=b.createElement(_.name,A);k&&b.insert(N,k),k=De._createAt(N,0)}return k}(o,r),this.conversionApi.writer=r,this.conversionApi.consumable=yu.createFrom(t),this.conversionApi.store={};const{modelRange:c}=this._convertItem(t,this._modelCursor),u=r.createDocumentFragment();if(c){this._removeEmptyElements();for(const m of Array.from(this._modelCursor.parent.getChildren()))r.append(m,u);u.markers=function(m,b){const k=new Set,_=new Map,A=de._createIn(m).getItems();for(const N of A)N.is("element","$marker")&&k.add(N);for(const N of k){const T=N.getAttribute("data-name"),O=b.createPositionBefore(N);_.has(T)?_.get(T).end=O.clone():_.set(T,new de(O.clone())),b.remove(N)}return _}(u,r)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,u}_convertItem(t,r){const o={viewItem:t,modelCursor:r,modelRange:null};if(t.is("element")?this.fire(`element:${t.name}`,o,this.conversionApi):t.is("$text")?this.fire("text",o,this.conversionApi):this.fire("documentFragment",o,this.conversionApi),o.modelRange&&!(o.modelRange instanceof de))throw new P("view-conversion-dispatcher-incorrect-result",this);return{modelRange:o.modelRange,modelCursor:o.modelCursor}}_convertChildren(t,r){let o=r.is("position")?r:De._createAt(r,0);const c=new de(o);for(const u of Array.from(t.getChildren())){const m=this._convertItem(u,o);m.modelRange instanceof de&&(c.end=m.modelRange.end,o=m.modelCursor)}return{modelRange:c,modelCursor:o}}_safeInsert(t,r){const o=this._splitToAllowedParent(t,r);return!!o&&(this.conversionApi.writer.insert(t,o.position),!0)}_updateConversionResult(t,r){const o=this._getSplitParts(t),c=this.conversionApi.writer;r.modelRange||(r.modelRange=c.createRange(c.createPositionBefore(t),c.createPositionAfter(o[o.length-1])));const u=this._cursorParents.get(t);r.modelCursor=u?c.createPositionAt(u,0):r.modelRange.end}_splitToAllowedParent(t,r){const{schema:o,writer:c}=this.conversionApi;let u=o.findAllowedParent(r,t);if(u){if(u===r.parent)return{position:r};this._modelCursor.parent.getAncestors().includes(u)&&(u=null)}if(!u)return cj(r,t,o)?{position:dj(r,c)}:null;const m=this.conversionApi.writer.split(r,u),b=[];for(const _ of m.range.getWalker())if(_.type=="elementEnd")b.push(_.item);else{const A=b.pop(),N=_.item;this._registerSplitPair(A,N)}const k=m.range.end.parent;return this._cursorParents.set(t,k),{position:m.position,cursorParent:k}}_registerSplitPair(t,r){this._splitParts.has(t)||this._splitParts.set(t,[t]);const o=this._splitParts.get(t);this._splitParts.set(r,o),o.push(r)}_getSplitParts(t){let r;return r=this._splitParts.has(t)?this._splitParts.get(t):[t],r}_keepEmptyElement(t){this._emptyElementsToKeep.add(t)}_removeEmptyElements(){let t=!1;for(const r of this._splitParts.keys())r.isEmpty&&!this._emptyElementsToKeep.has(r)&&(this.conversionApi.writer.remove(r),this._splitParts.delete(r),t=!0);t&&this._removeEmptyElements()}}class yG{getHtml(t){const r=g.document.implementation.createHTMLDocument("").createElement("div");return r.appendChild(t),r.innerHTML}}class xG{constructor(t){this.skipComments=!0,this.domParser=new DOMParser,this.domConverter=new hf(t,{renderingMode:"data"}),this.htmlWriter=new yG}toData(t){const r=this.domConverter.viewToDom(t);return this.htmlWriter.getHtml(r)}toView(t){const r=this._toDom(t);return this.domConverter.domToView(r,{skipComments:this.skipComments})}registerRawContentMatcher(t){this.domConverter.registerRawContentMatcher(t)}useFillerType(t){this.domConverter.blockFillerMode=t=="marked"?"markedNbsp":"nbsp"}_toDom(t){t.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(t=`<body>${t}</body>`);const r=this.domParser.parseFromString(t,"text/html"),o=r.createDocumentFragment(),c=r.body.childNodes;for(;c.length>0;)o.appendChild(c[0]);return o}}class vG extends ee(){constructor(t,r){super(),this.model=t,this.mapper=new H5,this.downcastDispatcher=new Y5({mapper:this.mapper,schema:t.schema}),this.downcastDispatcher.on("insert:$text",(o,c,u)=>{if(!u.consumable.consume(c.item,o.name))return;const m=u.writer,b=u.mapper.toViewPosition(c.range.start),k=m.createText(c.item.data);m.insert(b,k)},{priority:"lowest"}),this.downcastDispatcher.on("insert",(o,c,u)=>{u.convertAttributes(c.item),c.reconversion||!c.item.is("element")||c.item.isEmpty||u.convertChildren(c.item)},{priority:"lowest"}),this.upcastDispatcher=new kG({schema:t.schema}),this.viewDocument=new cf(r),this.stylesProcessor=r,this.htmlProcessor=new xG(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new g5(this.viewDocument),this.upcastDispatcher.on("text",(o,c,{schema:u,consumable:m,writer:b})=>{let k=c.modelCursor;if(!m.test(c.viewItem))return;if(!u.checkChild(k,"$text")){if(!cj(k,"$text",u)||c.viewItem.data.trim().length==0)return;const A=k.nodeBefore;k=dj(k,b),A&&A.is("element","$marker")&&(b.move(b.createRangeOn(A),k),k=b.createPositionAfter(A))}m.consume(c.viewItem);const _=b.createText(c.viewItem.data);b.insert(_,k),c.modelRange=b.createRange(k,k.getShiftedBy(_.offsetSize)),c.modelCursor=c.modelRange.end},{priority:"lowest"}),this.upcastDispatcher.on("element",(o,c,u)=>{if(!c.modelRange&&u.consumable.consume(c.viewItem,{name:!0})){const{modelRange:m,modelCursor:b}=u.convertChildren(c.viewItem,c.modelCursor);c.modelRange=m,c.modelCursor=b}},{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(o,c,u)=>{if(!c.modelRange&&u.consumable.consume(c.viewItem,{name:!0})){const{modelRange:m,modelCursor:b}=u.convertChildren(c.viewItem,c.modelCursor);c.modelRange=m,c.modelCursor=b}},{priority:"lowest"}),fe().prototype.decorate.call(this,"init"),fe().prototype.decorate.call(this,"set"),fe().prototype.decorate.call(this,"get"),fe().prototype.decorate.call(this,"toView"),fe().prototype.decorate.call(this,"toModel"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"}),this.on("ready",()=>{this.model.enqueueChange({isUndoable:!1},lj)},{priority:"lowest"})}get(t={}){const{rootName:r="main",trim:o="empty"}=t;if(!this._checkIfRootsExists([r]))throw new P("datacontroller-get-non-existent-root",this);const c=this.model.document.getRoot(r);return c.isAttached()||z("datacontroller-get-detached-root",this),o!=="empty"||this.model.hasContent(c,{ignoreWhitespace
vendor: 20,648 bytes, line 8465
8465s:!0})?this.stringify(c,t):""}stringify(t,r={}){const o=this.toView(t,r);return this.processor.toData(o)}toView(t,r={}){const o=this.viewDocument,c=this._viewWriter;this.mapper.clearBindings();const u=de._createIn(t),m=new sl(o);this.mapper.bindElements(t,m);const b=t.is("documentFragment")?t.markers:function(k){const _=[],A=k.root.document;if(!A)return new Map;const N=de._createIn(k);for(const T of A.model.markers){const O=T.getRange(),L=O.isCollapsed,$=O.start.isEqual(N.start)||O.end.isEqual(N.end);if(L&&$)_.push([T.name,O]);else{const U=N.getIntersection(O);U&&_.push([T.name,U])}}return _.sort(([T,O],[L,$])=>{if(O.end.compareWith($.start)!=="after")return 1;if(O.start.compareWith($.end)!=="before")return-1;switch(O.start.compareWith($.start)){case"before":return 1;case"after":return-1;default:switch(O.end.compareWith($.end)){case"before":return 1;case"after":return-1;default:return L.localeCompare(T)}}}),new Map(_)}(t);return this.downcastDispatcher.convert(u,b,c,r),m}init(t){if(this.model.document.version)throw new P("datacontroller-init-document-not-empty",this);let r={};if(typeof t=="string"?r.main=t:r=t,!this._checkIfRootsExists(Object.keys(r)))throw new P("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},o=>{for(const c of Object.keys(r)){const u=this.model.document.getRoot(c);o.insert(this.parse(r[c],u),u,0)}}),Promise.resolve()}set(t,r={}){let o={};if(typeof t=="string"?o.main=t:o=t,!this._checkIfRootsExists(Object.keys(o)))throw new P("datacontroller-set-non-existent-root",this);this.model.enqueueChange(r.batchType||{},c=>{c.setSelection(null),c.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const u of Object.keys(o)){const m=this.model.document.getRoot(u);c.remove(c.createRangeIn(m)),c.insert(this.parse(o[u],m),m,0)}})}parse(t,r="$root"){const o=this.processor.toView(t);return this.toModel(o,r)}toModel(t,r="$root"){return this.model.change(o=>this.upcastDispatcher.convert(t,o,r))}addStyleProcessorRules(t){t(this.stylesProcessor)}registerRawContentMatcher(t){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(t),this.htmlProcessor.registerRawContentMatcher(t)}destroy(){this.stopListening()}_checkIfRootsExists(t){for(const r of t)if(!this.model.document.getRoot(r))return!1;return!0}}class wG{constructor(t,r){this._helpers=new Map,this._downcast=tn(t),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=tn(r),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(t,r){const o=this._downcast.includes(r);if(!this._upcast.includes(r)&&!o)throw new P("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:t,dispatchers:[r],isDowncast:o})}for(t){if(!this._helpers.has(t))throw new P("conversion-for-unknown-group",this);return this._helpers.get(t)}elementToElement(t){this.for("downcast").elementToElement(t);for(const{model:r,view:o}of oy(t))this.for("upcast").elementToElement({model:r,view:o,converterPriority:t.converterPriority})}attributeToElement(t){this.for("downcast").attributeToElement(t);for(const{model:r,view:o}of oy(t))this.for("upcast").elementToAttribute({view:o,model:r,converterPriority:t.converterPriority})}attributeToAttribute(t){this.for("downcast").attributeToAttribute(t);for(const{model:r,view:o}of oy(t))this.for("upcast").attributeToAttribute({view:o,model:r})}_createConversionHelpers({name:t,dispatchers:r,isDowncast:o}){if(this._helpers.has(t))throw new P("conversion-group-exists",this);const c=o?new FH(r):new ZH(r);this._helpers.set(t,c)}}function*oy(l){if(l.model.values)for(const t of l.model.values){const r={key:l.model.key,value:t},o=l.view[t],c=l.upcastAlso?l.upcastAlso[t]:void 0;yield*_j(r,o,c)}else yield*_j(l.model,l.view,l.upcastAlso)}function*_j(l,t,r){if(yield{model:l,view:t},r)for(const o of tn(r))yield{model:l,view:o}}class vi{constructor(t){this.baseVersion=t,this.isDocumentOperation=this.baseVersion!==null,this.batch=null}_validate(){}toJSON(){const t=Object.assign({},this);return t.__className=this.constructor.className,delete t.batch,delete t.isDocumentOperation,t}static get className(){return"Operation"}static fromJSON(t,r){return new this(t.baseVersion)}}function sy(l,t){const r=Cj(t),o=r.reduce((m,b)=>m+b.offsetSize,0),c=l.parent;wu(l);const u=l.index;return c._insertChild(u,r),vu(c,u+r.length),vu(c,u),new de(l,l.getShiftedBy(o))}function Aj(l){if(!l.isFlat)throw new P("operation-utils-remove-range-not-flat",this);const t=l.start.parent;wu(l.start),wu(l.end);const r=t._removeChildren(l.start.index,l.end.index-l.start.index);return vu(t,l.start.index),r}function xu(l,t){if(!l.isFlat)throw new P("operation-utils-move-range-not-flat",this);const r=Aj(l);return sy(t=t._getTransformedByDeletion(l.start,l.end.offset-l.start.offset),r)}function Cj(l){const t=[];(function r(o){if(typeof o=="string")t.push(new Jt(o));else if(o instanceof ho)t.push(new Jt(o.data,o.getAttributes()));else if(o instanceof al)t.push(o);else if(Re(o))for(const c of o)r(c)})(l);for(let r=1;r<t.length;r++){const o=t[r],c=t[r-1];o instanceof Jt&&c instanceof Jt&&jj(o,c)&&(t.splice(r-1,2,new Jt(c.data+o.data,c.getAttributes())),r--)}return t}function vu(l,t){const r=l.getChild(t-1),o=l.getChild(t);if(r&&o&&r.is("$text")&&o.is("$text")&&jj(r,o)){const c=new Jt(r.data+o.data,r.getAttributes());l._removeChildren(t-1,2),l._insertChild(t-1,c)}}function wu(l){const t=l.textNode,r=l.parent;if(t){const o=l.offset-t.startOffset,c=t.index;r._removeChildren(c,1);const u=new Jt(t.data.substr(0,o),t.getAttributes()),m=new Jt(t.data.substr(o),t.getAttributes());r._insertChild(c,[u,m])}}function jj(l,t){const r=l.getAttributes(),o=t.getAttributes();for(const c of r){if(c[1]!==t.getAttribute(c[0]))return!1;o.next()}return o.next().done}class Lt extends vi{constructor(t,r,o,c){super(c),this.sourcePosition=t.clone(),this.sourcePosition.stickiness="toNext",this.howMany=r,this.targetPosition=o.clone(),this.targetPosition.stickiness="toNone"}get type(){return this.targetPosition.root.rootName=="$graveyard"?"remove":this.sourcePosition.root.rootName=="$graveyard"?"reinsert":"move"}get affectedSelectable(){return[de._createFromPositionAndShift(this.sourcePosition,this.howMany),de._createFromPositionAndShift(this.targetPosition,0)]}clone(){return new Lt(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const t=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new Lt(this.getMovedRangeStart(),this.howMany,t,this.baseVersion+1)}_validate(){const t=this.sourcePosition.parent,r=this.targetPosition.parent,o=this.sourcePosition.offset,c=this.targetPosition.offset;if(o+this.howMany>t.maxOffset)throw new P("move-operation-nodes-do-not-exist",this);if(t===r&&o<c&&c<o+this.howMany)throw new P("move-operation-range-into-itself",this);if(this.sourcePosition.root==this.targetPosition.root&&ue(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())=="prefix"){const u=this.sourcePosition.path.length-1;if(this.targetPosition.path[u]>=o&&this.targetPosition.path[u]<o+this.howMany)throw new P("move-operation-node-into-itself",this)}}_execute(){xu(de._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t.targetPosition=this.targetPosition.toJSON(),t}static get className(){return"MoveOperation"}static fromJSON(t,r){const o=De.fromJSON(t.sourcePosition,r),c=De.fromJSON(t.targetPosition,r);return new this(o,t.howMany,c,t.baseVersion)}}class or extends vi{constructor(t,r,o){super(o),this.position=t.clone(),this.position.stickiness="toNone",this.nodes=new pu(Cj(r)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}get affectedSelectable(){return this.position.clone()}clone(){const t=new pu([...this.nodes].map(o=>o._clone(!0))),r=new or(this.position,t,this.baseVersion);return r.shouldReceiveAttributes=this.shouldReceiveAttributes,r}getReversed(){const t=this.position.root.document.graveyard,r=new De(t,[0]);return new Lt(this.position,this.nodes.maxOffset,r,this.baseVersion+1)}_validate(){const t=this.position.parent;if(!t||t.maxOffset<this.position.offset)throw new P("insert-operation-position-invalid",this)}_execute(){const t=this.nodes;this.nodes=new pu([...t].map(r=>r._clone(!0))),sy(this.position,t)}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t.nodes=this.nodes.toJSON(),t}static get className(){return"InsertOperation"}static fromJSON(t,r){const o=[];for(const u of t.nodes)u.name?o.push(Gt.fromJSON(u)):o.push(Jt.fromJSON(u));const c=new or(De.fromJSON(t.position,r),o,t.baseVersion);return c.shouldReceiveAttributes=t.shouldReceiveAttributes,c}}class Xt extends vi{constructor(t,r,o,c,u){super(u),this.splitPosition=t.clone(),this.splitPosition.stickiness="toNext",this.howMany=r,this.insertionPosition=o,this.graveyardPosition=c?c.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const t=this.insertionPosition.path.slice();return t.push(0),new De(this.insertionPosition.root,t)}get movedRange(){const t=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new de(this.splitPosition,t)}get affectedSelectable(){const t=[de._createFromPositionAndShift(this.splitPosition,0),de._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&t.push(de._createFromPositionAndShift(this.graveyardPosition,0)),t}clone(){return new Xt(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.splitPosition.root.document.graveyard,r=new De(t,[0]);return new Cn(this.moveTargetPosition,this.howMany,this.splitPosition,r,this.baseVersion+1)}_validate(){const t=this.splitPosition.parent,r=this.splitPosition.offset;if(!t||t.maxOffset<r)throw new P("split-operation-position-invalid",this);if(!t.parent)throw new P("split-operation-split-in-root",this);if(this.howMany!=t.maxOffset-this.splitPosition.offset)throw new P("split-operation-how-many-invalid",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new P("split-operation-graveyard-position-invalid",this)}_execute(){const t=this.splitPosition.parent;if(this.graveyardPosition)xu(de._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const r=t._clone();sy(this.insertionPosition,r)}xu(new de(De._createAt(t,this.splitPosition.offset),De._createAt(t,t.maxOffset)),this.moveTargetPosition)}toJSON(){const t=super.toJSON();return t.splitPosition=this.splitPosition.toJSON(),t.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(t.graveyardPosition=this.graveyardPosition.toJSON()),t}static get className(){return"SplitOperation"}static getInsertionPosition(t){const r=t.path.slice(0,-1);return r[r.length-1]++,new De(t.root,r,"toPrevious")}static fromJSON(t,r){const o=De.fromJSON(t.splitPosition,r),c=De.fromJSON(t.insertionPosition,r),u=t.graveyardPosition?De.fromJSON(t.graveyardPosition,r):null;return new this(o,t.howMany,c,u,t.baseVersion)}}class Cn extends vi{constructor(t,r,o,c,u){super(u),this.sourcePosition=t.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=r,this.targetPosition=o.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=c.clone()}get type(){return"merge"}get deletionPosition(){return new De(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const t=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new de(this.sourcePosition,t)}get affectedSelectable(){const t=this.sourcePosition.parent;return[de._createOn(t),de._createFromPositionAndShift(this.targetPosition,0),de._createFromPositionAndShift(this.graveyardPosition,0)]}clone(){return new Cn(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.targetPosition._getTransformedByMergeOperation(this),r=this.sourcePosition.path.slice(0,-1),o=new De(this.sourcePosition.root,r)._getTransformedByMergeOperation(this);return new Xt(t,this.howMany,o,this.graveyardPosition,this.baseVersion+1)}_validate(){const t=this.sourcePosition.parent,r=this.targetPosition.parent;if(!t.parent)throw new P("merge-operation-source-position-invalid",this);if(!r.parent)throw new P("merge-operation-target-position-invalid",this);if(this.howMany!=t.maxOffset)throw new P("merge-operation-how-many-invalid",this)}_execute(){const t=this.sourcePosition.parent;xu(de._createIn(t),this.targetPosition),xu(de._createOn(t),this.graveyardPosition)}toJSON(){const t=super.toJSON();return t.sourcePosition=t.sourcePosition.toJSON(),t.targetPosition=t.targetPosition.toJSON(),t.graveyardPosition=t.graveyardPosition.toJSON(),t}static get className(){return"MergeOperation"}static fromJSON(t,r){const o=De.fromJSON(t.sourcePosition,r),c=De.fromJSON(t.targetPosition,r),u=De.fromJSON(t.graveyardPosition,r);return new this(o,t.howMany,c,u,t.baseVersion)}}class Qr extends vi{constructor(t,r,o,c,u,m){super(m),this.name=t,this.oldRange=r?r.clone():null,this.newRange=o?o.clone():null,this.affectsData=u,this._markers=c}get type(){return"marker"}get affectedSelectable(){const t=[];return this.oldRange&&t.push(this.oldRange.clone()),this.newRange&&(this.oldRange?t.push(...this.newRange.getDifference(this.oldRange)):t.push(this.newRange.clone())),t}clone(){return new Qr(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new Qr(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 t=super.toJSON();return this.oldRange&&(t.oldRange=this.oldRange.toJSON()),this.newRange&&(t.newRange=this.newRange.toJSON()),delete t._markers,t}static get className(){return"MarkerOperation"}static fromJSON(t,r){return new Qr(t.name,t.oldRange?de.fromJSON(t.oldRange,r):null,t.newRange?de.fromJSON(t.newRange,r):null,r.model.markers,t.affectsData,t.baseVersion)}}const Nj=function(l,t){return pf(l,t)};class Tn extends vi{constructor(t,r,o,c,u){super(u),this.range=t.clone(),this.key=r,this.oldValue=o===void 0?null:o,this.newValue=c===void 0?null:c}get type(){return this.oldValue===null?"addAttribute":this.newValue===null?"removeAttribute":"changeAttribute"}get affectedSelectable(){return this.range.clone()}clone(){return new Tn(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Tn(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const t=super.toJSON();return t.range=this.range.toJSON(),t}_validate(){if(!this.range.isFlat)throw new P("attribute-operation-range-not-flat",this);for(const t of this.range.getItems({shallow:!0})){if(this.oldValue!==null&&!Nj(t.getAttribute(this.key),this.oldValue))throw new P("attribute-operation-wrong-old-value",this,{item:t,key:this.key,value:this.oldValue});if(this.oldValue===null&&this.newValue!==null&&t.hasAttribute(this.key))throw new P("attribute-operation-attribute-exists",this,{node:t,key:this.key})}}_execute(){Nj(this.oldValue,this.newValue)||function(t,r,o){wu(t.start),wu(t.end);for(const c of t.getItems({shallow:!0})){const u=c.is("$textProxy")?c.textNode:c;o!==null?u._setAttribute(r,o):u._removeAttribute(r),vu(u.parent,u.index)}vu(t.end.parent,t.end.index)}(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(t,r){return new Tn(de.fromJSON(t.range,r),t.key,t.oldValue,t.newValue,t.baseVersion)}}class Wn extends vi{get type(){return"noop"}get affectedSelectable(){return null}clone(){return new Wn(this.baseVersion)}getReversed(){return new Wn(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}class Zr extends vi{constructor(t,r,o,c){super(c),this.position=t,this.position.stickiness="toNext",this.oldName=r,this.newName=o}get type(){return"rename"}get affectedSelectable(){return this.position.nodeAfter}clone(){return new Zr(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new Zr(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const t=this.position.nodeAfter;if(!(t instanceof Gt))throw new P("rename-operation-wrong-position",this);if(t.name!==this.oldName)throw new P("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t}static get className(){return"RenameOperation"}static fromJSON(t,r){return new Zr(De.fromJSON(t.position,r),t.oldName,t.newName,t.baseVersion)}}class us extends vi{constructor(t,r,o,c,u){super(u),this.root=t,this.key=r,this.oldValue=o===void 0?null:o,this.newValue=c===void 0?null:c}get type(){return this.oldValue===null?"addRootAttribute":this.newValue===null?"removeRootAttribute":"changeRootAttribute"}get affectedSelectable(){return this.root}clone(){return new us(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new us(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new P("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 P("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 P("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 t=super.toJSON();return t.root=this.root.toJSON(),t}static get className(){return"RootAttributeOperation"}static fromJSON(t,r){if(!r.getRoot(t.root))throw new P("rootattribute-operation-fromjson-no-root",this,{rootName:t.root});return new us(r.getRoot(t.root),t.key,t.oldValue,t.newValue,t.baseVersion)}}class Vo extends vi{constructor(t,r,o,c,u){super(u),this.rootName=t,this.elementName=r,this.isAdd=o,this._document=c,!this._document.getRoot(this.rootName)&&(this._document.createRoot(this.elementName,this.rootName)._isAttached=!1)}get type(){return this.isAdd?"addRoot":"detachRoot"}get affectedSelectable(){return this._document.getRoot(this.rootName)}clone(){return new Vo(this.rootName,this.elementName,this.isAdd,this._document,this.baseVersion)}getReversed(){return new Vo(this.rootName,this.elementName,!this.isAdd,this._document,this.baseVersion+1)}_execute(){this._document.getRoot(this.rootName)._isAttached=this.isAdd}toJSON(){const t=super.toJSON();return delete t._document,t}static get className(){return"RootOperation"}static fromJSON(t,r){return new Vo(t.rootName,t.elementName,t.isAdd,r,t.baseVersion)}}const zi={};zi[Tn.className]=Tn,zi[or.className]=or,zi[Qr.className]=Qr,zi[Lt.className]=Lt,zi[Wn.className]=Wn,zi[vi.className]=vi,zi[Zr.className]=Zr,zi[us.className]=us,zi[Vo.className]=Vo,zi[Xt.className]=Xt,zi[Cn.className]=Cn;class _G{static fromJSON(t,r){return zi[t.__className].fromJSON(t,r)}}const ay=new Map;function Pt(l,t,r){let o=ay.get(l);o||(o=new Map,ay.set(l,o)),o.set(t,r)}function AG(l){return[l]}function Ej(l,t,r={}){const o=function(c,u){const m=ay.get(c);return m&&m.has(u)?m.get(u):AG}(l.constructor,t.constructor);try{return o(l=l.clone(),t,r)}catch(c){throw c}}function CG(l,t,r){l=l.slice(),t=t.slice();const o=new jG(r.document,r.useRelations,r.forceWeakRemove);o.setOriginalOperations(l),o.setOriginalOperations(t);const c=o.originalOperations;if(l.length==0||t.length==0)return{operationsA:l,operationsB:t,originalOperations:c};const u=new WeakMap;for(const k of l)u.set(k,0);const m={nextBaseVersionA:l[l.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:l.length,originalOperationsBCount:t.length};let b=0;for(;b<l.length;){const k=l[b],_=u.get(k);if(_==t.length){b++;continue}const A=t[_],N=Ej(k,A,o.getContext(k,A,!0)),T=Ej(A,k,o.getContext(A,k,!1));o.updateRelation(k,A),o.setOriginalOperations(N,k),o.setOriginalOperations(T,A);for(const O of N)u.set(O,_+T.length);l.splice(b,1,...N),t.splice(_,1,...T)}
vendor: 4,332 bytes, line 8465
8465return Sj(l,m.nextBaseVersionB),Sj(t,m.nextBaseVersionA),{operationsA:l,operationsB:t,originalOperations:c}}class jG{constructor(t,r,o=!1){this.originalOperations=new Map,this._history=t.history,this._useRelations=r,this._forceWeakRemove=!!o,this._relations=new Map}setOriginalOperations(t,r=null){const o=r?this.originalOperations.get(r):null;for(const c of t)this.originalOperations.set(c,o||c)}updateRelation(t,r){if(t instanceof Lt)r instanceof Cn?t.targetPosition.isEqual(r.sourcePosition)||r.movedRange.containsPosition(t.targetPosition)?this._setRelation(t,r,"insertAtSource"):t.targetPosition.isEqual(r.deletionPosition)?this._setRelation(t,r,"insertBetween"):t.targetPosition.isAfter(r.sourcePosition)&&this._setRelation(t,r,"moveTargetAfter"):r instanceof Lt&&(t.targetPosition.isEqual(r.sourcePosition)||t.targetPosition.isBefore(r.sourcePosition)?this._setRelation(t,r,"insertBefore"):this._setRelation(t,r,"insertAfter"));else if(t instanceof Xt){if(r instanceof Cn)t.splitPosition.isBefore(r.sourcePosition)&&this._setRelation(t,r,"splitBefore");else if(r instanceof Lt)if(t.splitPosition.isEqual(r.sourcePosition)||t.splitPosition.isBefore(r.sourcePosition))this._setRelation(t,r,"splitBefore");else{const o=de._createFromPositionAndShift(r.sourcePosition,r.howMany);if(t.splitPosition.hasSameParentAs(r.sourcePosition)&&o.containsPosition(t.splitPosition)){const c=o.end.offset-t.splitPosition.offset,u=t.splitPosition.offset-o.start.offset;this._setRelation(t,r,{howMany:c,offset:u})}}}else if(t instanceof Cn)r instanceof Cn?(t.targetPosition.isEqual(r.sourcePosition)||this._setRelation(t,r,"mergeTargetNotMoved"),t.sourcePosition.isEqual(r.targetPosition)&&this._setRelation(t,r,"mergeSourceNotMoved"),t.sourcePosition.isEqual(r.sourcePosition)&&this._setRelation(t,r,"mergeSameElement")):r instanceof Xt?t.sourcePosition.isEqual(r.splitPosition)&&this._setRelation(t,r,"splitAtSource"):r instanceof Lt&&r.howMany>0&&(t.sourcePosition.isEqual(r.sourcePosition.getShiftedBy(r.howMany))&&this._setRelation(t,r,"mergeSourceAffected"),t.targetPosition.isEqual(r.sourcePosition)&&this._setRelation(t,r,"mergeTargetWasBefore"));else if(t instanceof Qr){const o=t.newRange;if(!o)return;if(r instanceof Lt){const c=de._createFromPositionAndShift(r.sourcePosition,r.howMany),u=c.containsPosition(o.start)||c.start.isEqual(o.start),m=c.containsPosition(o.end)||c.end.isEqual(o.end);!u&&!m||c.containsRange(o)||this._setRelation(t,r,{side:u?"left":"right",path:u?o.start.path.slice():o.end.path.slice()})}else if(r instanceof Cn){const c=o.start.isEqual(r.targetPosition),u=o.start.isEqual(r.deletionPosition),m=o.end.isEqual(r.deletionPosition),b=o.end.isEqual(r.sourcePosition);(c||u||m||b)&&this._setRelation(t,r,{wasInLeftElement:c,wasStartBeforeMergedElement:u,wasEndBeforeMergedElement:m,wasInRightElement:b})}}}getContext(t,r,o){return{aIsStrong:o,aWasUndone:this._wasUndone(t),bWasUndone:this._wasUndone(r),abRelation:this._useRelations?this._getRelation(t,r):null,baRelation:this._useRelations?this._getRelation(r,t):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(t){const r=this.originalOperations.get(t);return r.wasUndone||this._history.isUndoneOperation(r)}_getRelation(t,r){const o=this.originalOperations.get(r),c=this._history.getUndoneOperation(o);if(!c)return null;const u=this.originalOperations.get(t),m=this._relations.get(u);return m&&m.get(c)||null}_setRelation(t,r,o){const c=this.originalOperations.get(t),u=this.originalOperations.get(r);let m=this._relations.get(c);m||(m=new Map,this._relations.set(c,m)),m.set(u,o)}}function Sj(l,t){for(const r of l)r.baseVersion=t++}function Dj(l,t,r){const o=l.nodes.getNode(0).getAttribute(t);if(o==r)return null;const c=new de(l.position,l.position.getShiftedBy(l.howMany));return new Tn(c,t,o,r,0)}function Tj(l,t){return l.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany)===null}function jc(l,t){const r=[];for(let o=0;o<l.length;o++){const c=l[o],u=new Lt(c.start,c.end.offset-c.start.offset,t,0);r.push(u);for(let m=o+1;m<l.length;m++)l[m]=l[m]._getTransformedByMove(u.sourcePosition,u.targetPosition,u.howMany)[0];t=t._getTransformedByMove(u.sourcePosition,u.targetPosition,u.howMany)}return r}Pt(Tn,Tn,(l,t,r)=>{if(l.key===t.key&&l.range.start.hasSameParentAs(t.range.start)){const o=l.range.getDifference(t.range).map(u=>
8465new Tn(u,l.key,l.oldValue,l.newValue,0)),c=l.range.getIntersection(t.range);return c&&r.aIsStrong&&o.push(new Tn(c,t.key,t.newValue,l.newValue,0)),o.length==0?[new Wn(0)]:o}return[l]}),Pt(Tn,or,(l,t)=>{if(l.range.start.hasSameParentAs(t.position)&&l.range.containsPosition(t.position)){const r=l.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map(o=>new Tn(o,l.key,l.oldValue,l.newValue,l.baseVersion));if(t.shouldReceiveAttributes){const o=Dj(t,l.key,l.oldValue);o&&r.unshift(o)}return r}return l.range=l.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[l]}),Pt(Tn,Cn,(l,t)=>{const r=[];l.range.start.hasSameParentAs(t.deletionPosition)&&(l.range.containsPosition(t.deletionPosition)||l.range.start.isEqual(t.deletionPosition))&&r.push(de._createFromPositionAndShift(t.graveyardPosition,1));const o=l.range._getTransformedByMergeOperation(t);return o.isCollapsed||r.push(o),r.map(c=>new Tn(c,l.key,l.oldValue,l.newValue,l.baseVersion))}),Pt(Tn,Lt,(l,t)=>function(o,c){const u=de._createFromPositionAndShift(c.sourcePosition,c.howMany);let m=null,b=[];u.containsRange(o,!0)?m=o:o.start.hasSameParentAs(u.start)?(b=o.getDifference(u),m=o.getIntersection(u)):b=[o];const k=[];for(let _ of b){_=_._getTransformedByDeletion(c.sourcePosition,c.howMany);const A=c.getMovedRangeStart(),N=_.start.hasSameParentAs(A),T=_._getTransformedByInsertion(A,c.howMany,N);k.push(...T)}return m&&k.push(m._getTransformedByMove(c.sourcePosition,c.targetPosition,c.howMany,!1)[0]),k}(l.range,t).map(o=>new Tn(o,l.key,l.oldValue,l.newValue,l.baseVersion))),Pt(Tn,Xt,(l,t)=>{if(l.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||l.range.end.offset++,[l];if(l.range.start.hasSameParentAs(t.splitPosition)&&l.range.containsPosition(t.splitPosition)){const r=l.clone();return r.range=new de(t.moveTargetPosition.clone(),l.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),l.range.end=t.splitPosition.clone(),l.range.end.stickiness="toPrevious",[l,r]}return l.range=l.range._getTransformedBySplitOperation(t),[l]}),Pt(or,Tn,(l,t)=>{const r=[l];if(l.shouldReceiveAttributes&&l.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(l.position)){const o=Dj(l,t.key,t.newValue);o&&r.push(o)}return r}),Pt(or,or,(l,t,r)=>(l.position.isEqual(t.position)&&r.aIsStrong||(l.position=l.position._getTransformedByInsertOperation(t)),[l])),Pt(or,Lt,(l,t)=>(l.position=l.position._getTransformedByMoveOperation(t),[l])),Pt(or,Xt,(l,t)=>(l.position=l.position._getTransformedBySplitOperation(t),[l])),Pt(or,Cn,(l,t)=>(l.position=l.position._getTransformedByMergeOperation(t),[l])),Pt(Qr,or,(l,t)=>(l.oldRange&&(l.oldRange=l.oldRange._getTransformedByInsertOperation(t)[0]),l.newRange&&(l.newRange=l.newRange._getTransformedByInsertOperation(t)[0]),[l])),Pt(Qr,Qr,(l,t,r)=>{if(l.name==t.name){if(!r.aIsStrong)return[new Wn(0)];l.oldRange=t.newRange?t.newRange.clone():null}return[l]}),Pt(Qr,Cn,(l,t)=>(l.oldRange&&(l.oldRange=l.oldRange._getTransformedByMergeOperation(t)),l.newRange&&(l.newRange=l.newRange._getTransformedByMergeOperation(t)),[l])),Pt(Qr,Lt,(l,t,r)=>{if(l.oldRange&&(l.oldRange=de._createFromRanges(l.oldRange._getTransformedByMoveOperation(t))),l.newRange){if(r.abRelation){const o=de._createFromRanges(l.newRange._getTransformedByMoveOperation(t));if(r.abRelation.side=="left"&&t.targetPosition.isEqual(l.newRange.start))return l.newRange.end=o.end,l.newRange.start.path=r.abRelation.path,[l];if(r.abRelation.side=="right"&&t.targetPosition.isEqual(l.newRange.end))return l.newRange.start=o.start,l.newRange.end.path=r.abRelation.path,[l]}l.newRange=de._createFromRanges(l.newRange._getTransformedByMoveOperation(t))}return[l]}),Pt(Qr,Xt,(l,t,r)=>{if(l.oldRange&&(l.oldRange=l.oldRange._getTransformedBySplitOperation(t)),l.newRange){if(r.abRelation){const o=l.newRange._getTransformedBySplitOperation(t);return l.newRange.start.isEqual(t.splitPosition)&&r.abRelation.wasStartBeforeMergedElement?l.newRange.start=De._createAt(t.insertionPosition):l.newRange.start.isEqual(t.splitPosition)&&!r.abRelation.wasInLeftElement&&(l.newRange.start=De._createAt(t.moveTargetPosition)),l.newRange.end.isEqual(t.splitPosition)&&r.abRelation.wasInRightElement?l.newRange.end=De._createAt(t.moveTargetPosition):l.newRange.end.isEqual(t.splitPosition)&&r.abRelation.wasEndBeforeMergedElement?l.newRange.end=De._createAt(t.insertionPosition):l.newRange.end=o.end,[l]}l.newRange=l.newRange._getTransformedBySplitOperation(t)}return[l]}),Pt(Cn,or,(l,t)=>(l.sourcePosition.hasSameParentAs(t.position)&&(l.howMany+=t.howMany),l.sourcePosition=l.sourcePosition._getTransformedByInsertOperation(t),l.targetPosition=l.targetPosition._getTransformedByInsertOperation(t),[l])),Pt(Cn,Cn,(l,t,r)=>{if(l.sourcePosition.isEqual(t.sourcePosition)&&l.targetPosition.isEqual(t.targetPosition)){if
8465(r.bWasUndone){const o=t.graveyardPosition.path.slice();return o.push(0),l.sourcePosition=new De(t.graveyardPosition.root,o),l.howMany=0,[l]}return[new Wn(0)]}if(l.sourcePosition.isEqual(t.sourcePosition)&&!l.targetPosition.isEqual(t.targetPosition)&&!r.bWasUndone&&r.abRelation!="splitAtSource"){const o=l.targetPosition.root.rootName=="$graveyard",c=t.targetPosition.root.rootName=="$graveyard";if(c&&!o||!(o&&!c)&&r.aIsStrong){const u=t.targetPosition._getTransformedByMergeOperation(t),m=l.targetPosition._getTransformedByMergeOperation(t);return[new Lt(u,l.howMany,m,0)]}return[new Wn(0)]}return l.sourcePosition.hasSameParentAs(t.targetPosition)&&(l.howMany+=t.howMany),l.sourcePosition=l.sourcePosition._getTransformedByMergeOperation(t),l.targetPosition=l.targetPosition._getTransformedByMergeOperation(t),l.graveyardPosition.isEqual(t.graveyardPosition)&&r.aIsStrong||(l.graveyardPosition=l.graveyardPosition._getTransformedByMergeOperation(t)),[l]}),Pt(Cn,Lt,(l,t,r)=>{const o=de._createFromPositionAndShift(t.sourcePosition,t.howMany);return t.type=="remove"&&!r.bWasUndone&&!r.forceWeakRemove&&l.deletionPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(l.sourcePosition)?[new Wn(0)]:(t.sourcePosition.getShiftedBy(t.howMany).isEqual(l.sourcePosition)?l.sourcePosition.stickiness="toNone":t.targetPosition.isEqual(l.sourcePosition)&&r.abRelation=="mergeSourceAffected"?l.sourcePosition.stickiness="toNext":t.sourcePosition.isEqual(l.targetPosition)?(l.targetPosition.stickiness="toNone",l.howMany-=t.howMany):t.targetPosition.isEqual(l.targetPosition)&&r.abRelation=="mergeTargetWasBefore"?(l.targetPosition.stickiness="toPrevious",l.howMany+=t.howMany):(l.sourcePosition.hasSameParentAs(t.targetPosition)&&(l.howMany+=t.howMany),l.sourcePosition.hasSameParentAs(t.sourcePosition)&&(l.howMany-=t.howMany)),l.sourcePosition=l.sourcePosition._getTransformedByMoveOperation(t),l.targetPosition=l.targetPosition._getTransformedByMoveOperation(t),l.sourcePosition.stickiness="toPrevious",l.targetPosition.stickiness="toNext",l.graveyardPosition.isEqual(t.targetPosition)||(l.graveyardPosition=l.graveyardPosition._getTransformedByMoveOperation(t)),[l])}),Pt(Cn,Xt,(l,t,r)=>{if(t.graveyardPosition&&(l.graveyardPosition=l.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),l.deletionPosition.isEqual(t.graveyardPosition)&&(l.howMany=t.howMany)),l.targetPosition.isEqual(t.splitPosition)){const o=t.howMany!=0,c=t.graveyardPosition&&l.deletionPosition.isEqual(t.graveyardPosition);if(o||c||r.abRelation=="mergeTargetNotMoved")return l.sourcePosition=l.sourcePosition._getTransformedBySplitOperation(t),[l]}if(l.sourcePosition.isEqual(t.splitPosition)){if(r.abRelation=="mergeSourceNotMoved")return l.howMany=0,l.targetPosition=l.targetPosition._getTransformedBySplitOperation(t),[l];if(r.abRelation=="mergeSameElement"||l.sourcePosition.offset>0)return l.sourcePosition=t.moveTargetPosition.clone(),l.targetPosition=l.targetPosition._getTransformedBySplitOperation(t),[l]}return l.sourcePosition.hasSameParentAs(t.splitPosition)&&(l.howMany=t.splitPosition.offset),l.sourcePosition=l.sourcePosition._getTransformedBySplitOperation(t),l.targetPosition=l.targetPosition._getTransformedBySplitOperation(t),[l]}),Pt(Lt,or,(l,t)=>{const r=de._createFromPositionAndShift(l.sourcePosition,l.howMany)._getTransformedByInsertOperation(t,!1)[0];return l.sourcePosition=r.start,l.howMany=r.end.offset-r.start.offset,l.targetPosition.isEqual(t.position)||(l.targetPosition=l.targetPosition._getTransformedByInsertOperation(t)),[l]}),Pt(Lt,Lt,(l,t,r)=>{const o=de._createFromPositionAndShift(l.sourcePosition,l.howMany),c=de._createFromPositionAndShift(t.sourcePosition,t.howMany);let u,m=r.aIsStrong,b=!r.aIsStrong;if(r.abRelation=="insertBefore"||r.baRelation=="insertAfter"?b=!0:r.abRelation!="insertAfter"&&r.baRelation!="insertBefore"||(b=!1),u=l.targetPosition.isEqual(t.targetPosition)&&b?l.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):l.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Tj(l,t)&&Tj(t,l))return[t.getReversed()];if(o.containsPosition(t.targetPosition)&&o.containsRange(c,!0))return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),jc([o],u);if(c.containsPosition(l.targetPosition)&&c.containsRange(o,!0))return o.start=o.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),o.end=o.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),jc([o],u);const k=ue(l.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if(k=="prefix"||k=="extension")return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),jc([o],u);l.type!="remove"||t.type=="remove"||r.aWasUndone||r.forceWeakRemove?l.type=="remove"||t.type!="remove"||r.bWasUndone||r.forceWeakRemove||(m=!1):m=!0;const _=[],A=o.getDifference(c);for(const T of A){T.start=T.start._getTransformedByDeletion(t.sourcePosition,t.howMany),T.end=T.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const O=ue(T.start.getParentPath(),t.getMovedRangeStart().getParentPath())=="same",L=T._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,O);_.push(...L)}const N=o.getIntersection(c);return N!==null&&m&&(N.start=N.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),N.end=N.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),_.length===0?_.push(N):_.length==1?c.start.isBefore(o.start)||c.start.isEqual(o.start)?_.unshift(N):_.push(N):_.splice(1,0,N)),_.length===0?[new Wn(l.baseVersion)]:jc(_,u)}),Pt(Lt,Xt,(l,t,r)=>{let o=l.targetPosition.clone();l.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&r.abRelation!="moveTargetAfter"||(o=l.targetPosition._getTransformedBySplitOperation(t));const c=de._createFromPositionAndShift(l.sourcePosition,l.howMany);if(c.end.isEqual(t.insertionPosition))return t.graveyardPosition||l.howMany++,l.targetPosition=o,[l];if(c.start.hasSameParentAs(t.splitPosition)&&c.containsPosition(t.splitPosition)){let m=new de(t.splitPosition,c.end);return m=m._getTransformedBySplitOperation(t),jc([new de(c.start,t.splitPosition),m],o)}l.targetPosition.isEqual(t.splitPosition)&&r.abRelation=="insertAtSource"&&(
8465o=t.moveTargetPosition),l.targetPosition.isEqual(t.insertionPosition)&&r.abRelation=="insertBetween"&&(o=l.targetPosition);const u=[c._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const m=c.start.isEqual(t.graveyardPosition)||c.containsPosition(t.graveyardPosition);l.howMany>1&&m&&!r.aWasUndone&&u.push(de._createFromPositionAndShift(t.insertionPosition,1))}return jc(u,o)}),Pt(Lt,Cn,(l,t,r)=>{const o=de._createFromPositionAndShift(l.sourcePosition,l.howMany);if(t.deletionPosition.hasSameParentAs(l.sourcePosition)&&o.containsPosition(t.sourcePosition)){if(l.type!="remove"||r.forceWeakRemove){if(l.howMany==1)return r.bWasUndone?(l.sourcePosition=t.graveyardPosition.clone(),l.targetPosition=l.targetPosition._getTransformedByMergeOperation(t),[l]):[new Wn(0)]}else if(!r.aWasUndone){const u=[];let m=t.graveyardPosition.clone(),b=t.targetPosition._getTransformedByMergeOperation(t);l.howMany>1&&(u.push(new Lt(l.sourcePosition,l.howMany-1,l.targetPosition,0)),m=m._getTransformedByMove(l.sourcePosition,l.targetPosition,l.howMany-1),b=b._getTransformedByMove(l.sourcePosition,l.targetPosition,l.howMany-1));const k=t.deletionPosition._getCombined(l.sourcePosition,l.targetPosition),_=new Lt(m,1,k,0),A=_.getMovedRangeStart().path.slice();A.push(0);const N=new De(_.targetPosition.root,A);b=b._getTransformedByMove(m,k,1);const T=new Lt(b,t.howMany,N,0);return u.push(_),u.push(T),u}}const c=de._createFromPositionAndShift(l.sourcePosition,l.howMany)._getTransformedByMergeOperation(t);return l.sourcePosition=c.start,l.howMany=c.end.offset-c.start.offset,l.targetPosition=l.targetPosition._getTransformedByMergeOperation(t),[l]}),Pt(Zr,or,(l,t)=>(l.position=l.position._getTransformedByInsertOperation(t),[l])),Pt(Zr,Cn,(l,t)=>l.position.isEqual(t.deletionPosition)?(l.position=t.graveyardPosition.clone(),l.position.stickiness="toNext",[l]):(l.position=l.position._getTransformedByMergeOperation(t),[l])),Pt(Zr,Lt,(l,t)=>(l.position=l.position._getTransformedByMoveOperation(t),[l])),Pt(Zr,Zr,(l,t,r)=>{if(l.position.isEqual(t.position)){if(!r.aIsStrong)return[new Wn(0)];l.oldName=t.newName}return[l]}),Pt(Zr,Xt,(l,t)=>{if(ue(l.position.path,t.splitPosition.getParentPath())=="same"&&!t.graveyardPosition){const r=new Zr(l.position.getShiftedBy(1),l.oldName,l.newName,0);return[l,r]}return l.position=l.position._getTransformedBySplitOperation(t),[l]}),Pt(us,us,(l,t,r)=>{if(l.root===t.root&&l.key===t.key){if(!r.aIsStrong||l.newValue===t.newValue)return[new Wn(0)];l.oldValue=t.newValue}return[l]}),Pt(Vo,Vo,(l,t)=>l.rootName===t.rootName&&l.isAdd===t.isAdd?[new Wn(0)]:[l]),Pt(Xt,or,(l,t)=>(l.splitPosition.hasSameParentAs(t.position)&&l.splitPosition.offset<t.position.offset&&(l.howMany+=t.howMany),l.splitPosition=l.splitPosition._getTransformedByInsertOperation(t),l.insertionPosition=l.insertionPosition._getTransformedByInsertOperation(t),[l])),Pt(Xt,Cn,(l,t,r)=>{if(!l.graveyardPosition&&!r.bWasUndone&&l.splitPosition.hasSameParentAs(t.sourcePosition)){const o=t.graveyardPosition.path.slice();o.push(0);const c=new De(t.graveyardPosition.root,o),u=Xt.getInsertionPosition(new De(t.graveyardPosition.root,o)),m=new Xt(c,0,u,null,0);return l.splitPosition=l.splitPosition._getTransformedByMergeOperation(t),l.insertionPosition=Xt.getInsertionPosition(l.splitPosition),l.graveyardPosition=m.insertionPosition.clone(),l.graveyardPosition.stickiness="toNext",[m,l]}return l.splitPosition.hasSameParentAs(t.deletionPosition)&&!l.splitPosition.isAfter(t.deletionPosition)&&l.howMany--,l.splitPosition.hasSameParentAs(t.targetPosition)&&(l.howMany+=t.howMany),l.splitPosition=l.splitPosition._getTransformedByMergeOperation(t),l.insertionPosition=Xt.getInsertionPosition(l.splitPosition),l.graveyardPosition&&(l.graveyardPosition=l.graveyardPosition._getTransformedByMergeOperation(t)),[l]}),Pt(Xt,Lt,(l,t,r)=>{const o=de._createFromPositionAndShift(t.sourcePosition,t.howMany);if(l.graveyardPosition){const u=o.start.isEqual(l.graveyardPosition)||o.containsPosition(l.graveyardPosition);if(!r.bWasUndone&&u){const m=l.splitPosition._getTransformedByMoveOperation(t),b=l.graveyardPosition._getTransformedByMoveOperation(t),k=b.path.slice();k.push(0);const _=new De(b.root,k);return[new Lt(m,l.howMany,_,0)]}l.graveyardPosition=l.graveyardPosition._getTransformedByMoveOperation(t)}const c=l.splitPosition.isEqual(t.targetPosition);if(c&&(r.baRelation=="insertAtSource"||r.abRelation=="splitBefore"))return l.howMany+=t.howMany,l.splitPosition=l.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),l.insertionPosition=Xt.getInsertionPosition(l.splitPosition),[l];if(c&&r.abRelation&&r.abRelation.howMany){const{howMany:u,offset:m}=r.abRelation;return l.howMany+=u,l.splitPosition=l.splitPosition.getShiftedBy(m),[l]}if(l.splitPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(l.splitPosition)){const u=t.howMany-(l.splitPosition.offset-t.sourcePosition.offset);return l.howMany-=u,l.splitPosition.hasSameParentAs(t.targetPosition)&&l.splitPosition.offset<t.targetPosition.offset&&(l.howMany+=t.howMany),l.splitPosition=t.sourcePosition.clone(),l.insertionPosition=Xt.getInsertionPosition(l.splitPosition),[l]}return t.sourcePosition.isEqual(t.targetPosition)||(l.splitPosition.hasSameParentAs(t.sourcePosition)&&l.splitPosition.offset<=t.sourcePosition.offset&&(l.howMany-=t.howMany),l.splitPosition.hasSameParentAs(t.targetPosition)&&l.splitPosition.offset<t.targetPosition.offset&&(l.howMany+=t.howMany)),l.splitPosition.stickiness="toNone",l.splitPosition=l.splitPosition._getTransformedByMoveOperation(t),l.splitPosition.stickiness="toNext",l.graveyardPosition?l.insertionPosition=l.insertionPosition._getTransformedByMoveOperation(t):l.insertionPosition=Xt.getInsertionPosition(l.splitPosition),[l]}),Pt(Xt,Xt,(l,t,r)=>
8465{if(l.splitPosition.isEqual(t.splitPosition)){if(!l.graveyardPosition&&!t.graveyardPosition)return[new Wn(0)];if(l.graveyardPosition&&t.graveyardPosition&&l.graveyardPosition.isEqual(t.graveyardPosition))return[new Wn(0)];if(r.abRelation=="splitBefore")return l.howMany=0,l.graveyardPosition=l.graveyardPosition._getTransformedBySplitOperation(t),[l]}if(l.graveyardPosition&&t.graveyardPosition&&l.graveyardPosition.isEqual(t.graveyardPosition)){const o=l.splitPosition.root.rootName=="$graveyard",c=t.splitPosition.root.rootName=="$graveyard";if(c&&!o||!(o&&!c)&&r.aIsStrong){const u=[];return t.howMany&&u.push(new Lt(t.moveTargetPosition,t.howMany,t.splitPosition,0)),l.howMany&&u.push(new Lt(l.splitPosition,l.howMany,l.moveTargetPosition,0)),u}return[new Wn(0)]}if(l.graveyardPosition&&(l.graveyardPosition=l.graveyardPosition._getTransformedBySplitOperation(t)),l.splitPosition.isEqual(t.insertionPosition)&&r.abRelation=="splitBefore")return l.howMany++,[l];if(t.splitPosition.isEqual(l.insertionPosition)&&r.baRelation=="splitBefore"){const o=t.insertionPosition.path.slice();o.push(0);const c=new De(t.insertionPosition.root,o);return[l,new Lt(l.insertionPosition,1,c,0)]}return l.splitPosition.hasSameParentAs(t.splitPosition)&&l.splitPosition.offset<t.splitPosition.offset&&(l.howMany-=t.howMany),l.splitPosition=l.splitPosition._getTransformedBySplitOperation(t),l.insertionPosition=Xt.getInsertionPosition(l.splitPosition),[l]});class br extends ee(De){constructor(t,r,o="toNone"){if(super(t,r,o),!this.root.is("rootElement"))throw new P("model-liveposition-root-not-rootelement",t);NG.call(this)}detach(){this.stopListening()}toPosition(){return new De(this.root,this.path.slice(),this.stickiness)}static fromPosition(t,r){return new this(t.root,t.path.slice(),r||t.stickiness)}}function NG(){this.listenTo(this.root.document.model,"applyOperation",(l,t)=>{const r=t[0];r.isDocumentOperation&&EG.call(this,r)},{priority:"low"})}function EG(l){const t=this.getTransformedByOperation(l);if(!this.isEqual(t)){const r=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",r)}}br.prototype.is=function(l){return l==="livePosition"||l==="model:livePosition"||l=="position"||l==="model:position"};class Nc{constructor(t={}){typeof t=="string"&&(t=t==="transparent"?{isUndoable:!1}:{},z("batch-constructor-deprecated-string-type"));const{isUndoable:r=!0,isLocal:o=!0,isUndo:c=!1,isTyping:u=!1}=t;this.operations=[],this.isUndoable=r,this.isLocal=o,this.isUndo=c,this.isTyping=u}get type(){return z("batch-type-deprecated"),"default"}get baseVersion(){for(const t of this.operations)if(t.baseVersion!==null)return t.baseVersion;return null}addOperation(t){return t.batch=this,this.operations.push(t),t}}var SG=Object.defineProperty,DG=Object.defineProperties,TG=Object.getOwnPropertyDescriptors,Ij=Object.getOwnPropertySymbols,IG=Object.prototype.hasOwnProperty,MG=Object.prototype.propertyIsEnumerable,Mj=(l,t,r)=>t in l?SG(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,Pj=(l,t)=>{for(var r in t||(t={}))IG.call(t,r)&&Mj(l,r,t[r]);if(Ij)for(var r of Ij(t))MG.call(t,r)&&Mj(l,r,t[r]);return l};class PG{constructor(t){this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changedRoots=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set,this._markerCollection=t}get isEmpty(){return this._changesInElement.size==0&&this._changedMarkers.size==0&&this._changedRoots.size==0}bufferOperation(t){const r=t;switch(r.type){case"insert":if(this._isInInsertedElement(r.position.parent))return;this._markInsert(r.position.parent,r.position.offset,r.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const o of r.range.getItems({shallow:!0}))this._isInInsertedElement(o.parent)||this._markAttribute(o);break;case"remove":case"move":case"reinsert":{if(r.sourcePosition.isEqual(r.targetPosition)||r.sourcePosition.getShiftedBy(r.howMany).isEqual(r.targetPosition))return;const o=this._isInInsertedElement(r.sourcePosition.parent),c=this._isInInsertedElement(r.targetPosition.parent);o||this._markRemove(r.sourcePosition.parent,r.sourcePosition.offset,r.howMany),c||this._markInsert(r.targetPosition.parent,r.getMovedRangeStart().offset,r.howMany);break}case"rename":{if(this._isInInsertedElement(r.position.parent))return;this._markRemove(r.position.parent,r.position.offset,1),this._markInsert(r.position.parent,r.position.offset,1);const o=de._createFromPositionAndShift(r.position,1);for(const c of this._markerCollection.getMarkersIntersectingRange(o)){const u=c.getData();this.bufferMarkerChange(c.name,u,u)}break}case"split":{const o=r.splitPosition.parent;this._isInInsertedElement(o)||this._markRemove(o,r.splitPosition.offset,r.howMany),this._isInInsertedElement(r.insertionPosition.parent)||this._markInsert(r.insertionPosition.parent,r.insertionPosition.offset,1),r.graveyardPosition&&this._markRemove(r.graveyardPosition.parent,r.graveyardPosition.offset,1);break}case"merge":{const o=r.sourcePosition.parent;this._isInInsertedElement(o.parent)||this._markRemove(o.parent,o.startOffset,1);const c=r.graveyardPosition.parent;this._markInsert(c,r.graveyardPosition.offset,1);const u=r.targetPosition.parent;this._isInInsertedElement(u)||this._markInsert(u,r.targetPosition.offset,o.maxOffset);break}case"detachRoot":case"addRoot":{const o=r.affectedSelectable;if(!o._isLoaded||o.isAttached()==r.isAdd)return;this._bufferRootStateChange(r.rootName,r.isAdd);break}case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{if(!r.root._isLoaded)return;const o=r.root.rootName;this._bufferRootAttributeChange(o,r.key,r.oldValue,r.newValue);break}}this._cachedChanges=null}bufferMarkerChange(t,r,o){r.range&&r.range.root.is("rootElement")&&!r.range.root._isLoaded&&(r.range=null),o.range&&o.range.root.is("rootElement")&&!o.range.root._isLoaded&&(o.range=null);let c=this._changedMarkers.get(t);c?c.newMarkerData=o:(c={newMarkerData:o,oldMarkerData:r},this._changedMarkers.set(t,c)),c.oldMarkerData.range==null&&o.range==null&&this._changedMarkers.delete(t)}getMarkersToRemove(){const t=[];for(const[r,o]of this._changedMarkers)o.oldMarkerData.range!=null&&t.push({name:r,range:o.oldMarkerData.range});return t}
8465getMarkersToAdd(){const t=[];for(const[r,o]of this._changedMarkers)o.newMarkerData.range!=null&&t.push({name:r,range:o.newMarkerData.range});return t}getChangedMarkers(){return Array.from(this._changedMarkers).map(([t,r])=>({name:t,data:{oldRange:r.oldMarkerData.range,newRange:r.newMarkerData.range}}))}hasDataChanges(){if(this.getChanges().length||this._changedRoots.size>0)return!0;for(const{newMarkerData:t,oldMarkerData:r}of this._changedMarkers.values()){if(t.affectsData!==r.affectsData)return!0;if(t.affectsData){const o=t.range&&!r.range,c=!t.range&&r.range,u=t.range&&r.range&&!t.range.isEqual(r.range);if(o||c||u)return!0}}return!1}getChanges(t={}){if(this._cachedChanges)return t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let r=[];for(const o of this._changesInElement.keys()){const c=this._changesInElement.get(o).sort((A,N)=>A.offset===N.offset?A.type!=N.type?A.type=="remove"?-1:1:0:A.offset<N.offset?-1:1),u=this._elementSnapshots.get(o),m=Oj(o.getChildren()),b=OG(u.length,c);let k=0,_=0;for(const A of b)if(A==="i")r.push(this._getInsertDiff(o,k,m[k])),k++;else if(A==="r")r.push(this._getRemoveDiff(o,k,u[_])),_++;else if(A==="a"){const N=m[k].attributes,T=u[_].attributes;let O;if(m[k].name=="$text")O=new de(De._createAt(o,k),De._createAt(o,k+1));else{const L=o.offsetToIndex(k);O=new de(De._createAt(o,k),De._createAt(o.getChild(L),0))}r.push(...this._getAttributesDiff(O,T,N)),k++,_++}else k++,_++}r.sort((o,c)=>o.position.root!=c.position.root?o.position.root.rootName<c.position.root.rootName?-1:1:o.position.isEqual(c.position)?o.changeCount-c.changeCount:o.position.isBefore(c.position)?-1:1);for(let o=1,c=0;o<r.length;o++){const u=r[c],m=r[o],b=u.type=="remove"&&m.type=="remove"&&u.name=="$text"&&m.name=="$text"&&u.position.isEqual(m.position),k=u.type=="insert"&&m.type=="insert"&&u.name=="$text"&&m.name=="$text"&&u.position.parent==m.position.parent&&u.position.offset+u.length==m.position.offset,_=u.type=="attribute"&&m.type=="attribute"&&u.position.parent==m.position.parent&&u.range.isFlat&&m.range.isFlat&&u.position.offset+u.length==m.position.offset&&u.attributeKey==m.attributeKey&&u.attributeOldValue==m.attributeOldValue&&u.attributeNewValue==m.attributeNewValue;b||k||_?(u.length++,_&&(u.range.end=u.range.end.getShiftedBy(1)),r[o]=null):c=o}r=r.filter(o=>o);for(const o of r)delete o.changeCount,o.type=="attribute"&&(delete o.position,delete o.length);return this._changeCount=0,this._cachedChangesWithGraveyard=r,this._cachedChanges=r.filter(BG),t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}
8465getChangedRoots(){return Array.from(this._changedRoots.values()).map(t=>{const r=Pj({},t);return r.state!==void 0&&delete r.attributes,r})}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_bufferRootStateChange(t,r){if(!this._changedRoots.has(t))return void this._changedRoots.set(t,{name:t,state:r?"attached":"detached"});const o=this._changedRoots.get(t);o.state!==void 0?(delete o.state,o.attributes===void 0&&this._changedRoots.delete(t)):o.state=r?"attached":"detached"}_bufferRootAttributeChange(t,r,o,c){const u=this._changedRoots.get(t)||{name:t},m=u.attributes||{};if(m[r]){const b=m[r];c===b.oldValue?delete m[r]:b.newValue=c}else m[r]={oldValue:o,newValue:c};Object.entries(m).length===0?(delete u.attributes,u.state===void 0&&this._changedRoots.delete(t)):(u.attributes=m,this._changedRoots.set(t,u))}_refreshItem(t){if(this._isInInsertedElement(t.parent))return;this._markRemove(t.parent,t.startOffset,t.offsetSize),this._markInsert(t.parent,t.startOffset,t.offsetSize),this._refreshedItems.add(t);const r=de._createOn(t);for(const o of this._markerCollection.getMarkersIntersectingRange(r)){const c=o.getData();this.bufferMarkerChange(o.name,c,c)}this._cachedChanges=null}_bufferRootLoad(t){if(t.isAttached()){this._bufferRootStateChange(t.rootName,!0),this._markInsert(t,0,t.maxOffset);for(const o of t.getAttributeKeys())this._bufferRootAttributeChange(t.rootName,o,null,t.getAttribute(o));for(const o of this._markerCollection)if(o.getRange().root==t){const c=o.getData();this.bufferMarkerChange(o.name,(r=Pj({},c),DG(r,TG({range:null}))),c)}var r}}_markInsert(t,r,o){if(t.root.is("rootElement")&&!t.root._isLoaded)return;const c={type:"insert",offset:r,howMany:o,count:this._changeCount++};this._markChange(t,c)}_markRemove(t,r,o){if(t.root.is("rootElement")&&!t.root._isLoaded)return;const c={type:"remove",offset:r,howMany:o,count:this._changeCount++};this._markChange(t,c),this._removeAllNestedChanges(t,r,o)}_markAttribute(t){if(t.root.is("rootElement")&&!t.root._isLoaded)return;const r={type:"attribute",offset:t.startOffset,howMany:t.offsetSize,count:this._changeCount++};this._markChange(t.parent,r)}_markChange(t,r){this._makeSnapshot(t);const o=this._getChangesForElement(t);this._handleChange(r,o),o.push(r);for(let c=0;c<o.length;c++)o[c].howMany<1&&(o.splice(c,1),c--)}_getChangesForElement(t){let r;return this._changesInElement.has(t)?r=this._changesInElement.get(t):(r=[],this._changesInElement.set(t,r)),r}_makeSnapshot(t){this._elementSnapshots.has(t)||this._elementSnapshots.set(t,Oj(t.getChildren()))}_handleChange(t,r){t.nodesToHandle=t.howMany;for(const o of r){const c=t.offset+t.howMany,u=o.offset+o.howMany;if(t.type=="insert"&&(o.type=="insert"&&(t.offset<=o.offset?o.offset+=t.howMany:t.offset<u&&(o.howMany+=t.nodesToHandle,t.nodesToHandle=0)),o.type=="remove"&&t.offset<o.offset&&(o.offset+=t.howMany),o.type=="attribute")){if(t.offset<=o.offset)o.offset+=t.howMany;else if(t.offset<u){const m=o.howMany;o.howMany=t.offset-o.offset,r.unshift({type:"attribute",offset:c,howMany:m-o.howMany,count:this._changeCount++})}}if(t.type=="remove"){if(o.type=="insert"){if(c<=o.offset)o.offset-=t.howMany;else if(c<=u)if(t.offset<o.offset){const m=c-o.offset;o.offset=t.offset,o.howMany-=m,t.nodesToHandle-=m}else o.howMany-=t.nodesToHandle,t.nodesToHandle=0;else if(t.offset<=o.offset)t.nodesToHandle-=o.howMany,o.howMany=0;else if(t.offset<u){const m=u-t.offset;o.howMany-=m,t.nodesToHandle-=m}}if(o.type=="remove"&&(c<=o.offset?o.offset-=t.howMany:t.offset<o.offset&&(t.nodesToHandle+=o.howMany,o.howMany=0)),o.type=="attribute"){if(c<=o.offset)o.offset-=t.howMany;else if(t.offset<o.offset){const m=c-o.offset;o.offset=t.offset,o.howMany-=m}else if(t.offset<u)if(c<=u){const m=o.howMany;o.howMany=t.offset-o.offset;const b=m-o.howMany-t.nodesToHandle;r.unshift({type:"attribute",offset:t.offset,howMany:b,count:this._changeCount++})}else o.howMany-=u-t.offset}}if(t.type=="attribute"){if(o.type=="insert")if(t.offset<o.offset&&c>o.offset){if(c>u){const m={type:"attribute",offset:u,howMany:c-u,count:this._changeCount++};this._handleChange(m,r),r.push(m)}t.nodesToHandle=o.offset-t.offset,t.howMany=t.nodesToHandle}else t.offset>=o.offset&&t.offset<u&&(c>u?(t.nodesToHandle=c-u,t.offset=u):t.nodesToHandle=0);if(o.type=="remove"&&t.offset<o.offset&&c>o.offset){const m={type:"attribute",offset:o.offset,howMany:c-o.offset,count:this._changeCount++};this._handleChange(m,r),r.push(m),t.nodesToHandle=o.offset-t.offset,t.howMany=t.nodesToHandle}o.type=="attribute"&&(t.offset>
8465=o.offset&&c<=u?(t.nodesToHandle=0,t.howMany=0,t.offset=0):t.offset<=o.offset&&c>=u&&(o.howMany=0))}}t.howMany=t.nodesToHandle,delete t.nodesToHandle}_getInsertDiff(t,r,o){return{type:"insert",position:De._createAt(t,r),name:o.name,attributes:new Map(o.attributes),length:1,changeCount:this._changeCount++,_element:o.element}}_getRemoveDiff(t,r,o){return{type:"remove",position:De._createAt(t,r),name:o.name,attributes:new Map(o.attributes),length:1,changeCount:this._changeCount++,_element:o.element}}_getAttributesDiff(t,r,o){const c=[];o=new Map(o);for(const[u,m]of r){const b=o.has(u)?o.get(u):null;b!==m&&c.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:u,attributeOldValue:m,attributeNewValue:b,changeCount:this._changeCount++}),o.delete(u)}for(const[u,m]of o)c.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:u,attributeOldValue:null,attributeNewValue:m,changeCount:this._changeCount++});return c}_isInInsertedElement(t){const r=t.parent;if(!r)return!1;const o=this._changesInElement.get(r),c=t.startOffset;if(o){for(const u of o)if(u.type=="insert"&&c>=u.offset&&c<u.offset+u.howMany)return!0}return this._isInInsertedElement(r)}_removeAllNestedChanges(t,r,o){const c=new de(De._createAt(t,r),De._createAt(t,r+o));for(const u of c.getItems({shallow:!0}))u.is("element")&&(this._elementSnapshots.delete(u),this._changesInElement.delete(u),this._removeAllNestedChanges(u,0,u.maxOffset))}}function Oj(l){const t=[];for(const r of l)if(r.is("$text"))for(let o=0;o<r.data.length;o++)t.push({name:"$text",attributes:new Map(r.getAttributes())});else t.push({name:r.name,attributes:new Map(r.getAttributes()),element:r});return t}function OG(l,t){const r=[];let o=0,c=0;for(const u of t){if(u.offset>o){for(let m=0;m<u.offset-o;m++)r.push("e");c+=u.offset-o}if(u.type=="insert"){for(let m=0;m<u.howMany;m++)r.push("i");o=u.offset+u.howMany}else if(u.type=="remove"){for(let m=0;m<u.howMany;m++)r.push("r");o=u.offset,c+=u.howMany}else r.push(..."a".repeat(u.howMany).split("")),o=u.offset+u.howMany,c+=u.howMany}if(c<l)for(let u=0;u<l-c-o;u++)r.push("e");return r}function BG(l){const t="position"in l&&l.position.root.rootName=="$graveyard",r="range"in l&&l.range.root.rootName=="$graveyard";return!t&&!r}class LG{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set,this._baseVersionToOperationIndex=new Map,this._version=0,this._gaps=new Map}get version(){return this._version}set version(t){this._operations.length&&t>this._version+1&&this._gaps.set(this._version,t),this._version=t}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(t){if(t.baseVersion!==this.version)throw new P("model-document-history-addoperation-incorrect-version",this,{operation:t,historyVersion:this.version});this._operations.push(t),this._version++,this._baseVersionToOperationIndex.set(t.baseVersion,this._operations.length-1)}getOperations(t,r=this.version){if(!this._operations.length)return[];const o=this._operations[0];t===void 0&&(t=o.baseVersion);let c=r-1;for(const[b,k]of this._gaps)t>b&&t<k&&(t=k),c>b&&c<k&&(c=b-1);if(c<o.baseVersion||t>this.lastOperation.baseVersion)return[];let u=this._baseVersionToOperationIndex.get(t);u===void 0&&(u=0);let m=this._baseVersionToOperationIndex.get(c);return m===void 0&&(m=this._operations.length-1),this._operations.slice(u,m+1)}getOperation(t){const r=this._baseVersionToOperationIndex.get(t);if(r!==void 0)return this._operations[r]}setOperationAsUndone(t,r){this._undoPairs.set(r,t),this._undoneOperations.add(t)}isUndoingOperation(t){return this._undoPairs.has(t)}isUndoneOperation(t){return this._undoneOperations.has(t)}getUndoneOperation(t){return this._undoPairs.get(t)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class xf extends Gt{constructor(t,r,o="main"){super(r),this._isAttached=!0,this._isLoaded=!0,this._document=t,this.rootName=o}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}xf.prototype.is=function(l,t){return t?t===this.name&&(l==="rootElement"||l==="model:rootElement"||l==="element"||l==="model:element"):l==="rootElement"||l==="model:rootElement"||l==="element"||l==="model:element"||l==="node"||l==="model:node"};var RG=Object.defineProperty,zG=Object.defineProperties,FG=Object.getOwnPropertyDescriptors,Bj=Object.getOwnPropertySymbols,$G=Object.prototype.hasOwnProperty,VG=Object.prototype.propertyIsEnumerable,Lj=(l,t,r)=>t in l?RG(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,Rj=(l,t)=>{for(var r in t||(t={}))$G.call(t,r)&&Lj(l,r,t[r]);if(Bj)for(var r of Bj(t))VG.call(t,r)&&Lj(l,r,t[r]);return l},zj=(l,t)=>zG(l,FG(t));const Fj="$graveyard";class UG extends ee(){constructor(t){super(),this.model=t,this.history=new LG,this.selection=new mo(this),this.roots=new so({idProperty:"rootName"}),this.differ=new PG(t.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Fj),this.listenTo(t,"applyOperation",(r,o)=>{const c=o[0];c.isDocumentOperation&&this.differ.bufferOperation(c)},{priority:"high"}),this.listenTo(t,"applyOperation",(r,o)=>{const c=o[0];c.isDocumentOperation&&this.history.addOperation(c)},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(t.markers,"update",(r,o,c,u,m)=>{const b=zj(Rj({},o.getData()),{range:u});this.differ.bufferMarkerChange(o.name,m,b),c===null&&o.on("change",(k,_)=>{const A=o.getData();this.differ.bufferMarkerChange(o.name,zj(Rj({},A),{range:_}),A)})}),this.registerPostFixer(r=>{let o=!1;for(const c of this.roots)c.isAttached()||c.isEmpty||(r.remove(r.createRangeIn(c)),o=!0);for(const c of this.model.markers)c.getRange().root.isAttached()||(r.removeMarker(c),o=!0);return o}
8465)}get version(){return this.history.version}set version(t){this.history.version=t}get graveyard(){return this.getRoot(Fj)}createRoot(t="$root",r="main"){if(this.roots.get(r))throw new P("model-document-createroot-name-exists",this,{name:r});const o=new xf(this,t,r);return this.roots.add(o),o}destroy(){this.selection.destroy(),this.stopListening()}getRoot(t="main"){return this.roots.get(t)}getRootNames(t=!1){return this.getRoots(t).map(r=>r.rootName)}getRoots(t=!1){return this.roots.filter(r=>r!=this.graveyard&&(t||r.isAttached())&&r._isLoaded)}registerPostFixer(t){this._postFixers.add(t)}toJSON(){const t=a5(this);return t.selection="[engine.model.DocumentSelection]",t.model="[engine.model.Model]",t}_handleChangeBlock(t){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(t),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",t.batch):this.fire("change",t.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){const t=this.getRoots();return t.length?t[0]:this.graveyard}_getDefaultRange(){const t=this._getDefaultRoot(),r=this.model,o=r.schema,c=r.createPositionFromPath(t,[0]);return o.getNearestSelectionRange(c)||r.createRange(c)}_validateSelectionRange(t){return $j(t.start)&&$j(t.end)}_callPostFixers(t){let r=!1;do for(const o of this._postFixers)if(this.selection.refresh(),r=o(t),r)break;while(r)}}function $j(l){const t=l.textNode;if(t){const r=t.data,o=l.offset-t.startOffset;return!Nk(r,o)&&!Ek(r,o)}return!0}var WG=Object.defineProperty,HG=Object.defineProperties,GG=Object.getOwnPropertyDescriptors,Vj=Object.getOwnPropertySymbols,qG=Object.prototype.hasOwnProperty,KG=Object.prototype.propertyIsEnumerable,Uj=(l,t,r)=>t in l?WG(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r;class YG extends ee(){constructor(){super(...arguments),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(t){const r=t instanceof Ec?t.name:t;return this._markers.has(r)}get(t){return this._markers.get(t)||null}_set(t,r,o=!1,c=!1){const u=t instanceof Ec?t.name:t;if(u.includes(","))throw new P("markercollection-incorrect-marker-name",this);const m=this._markers.get(u);if(m){const A=m.getData(),N=m.getRange();let T=!1;return N.isEqual(r)||(m._attachLiveRange(xi.fromRange(r)),T=!0),o!=m.managedUsingOperations&&(m._managedUsingOperations=o,T=!0),typeof c=="boolean"&&c!=m.affectsData&&(m._affectsData=c,T=!0),T&&this.fire(`update:${u}`,m,N,r,A),m}const b=xi.fromRange(r),k=new Ec(u,b,o,c);var _;return this._markers.set(u,k),this.fire(`update:${u}`,k,null,r,(_=((A,N)=>{for(var T in N||(N={}))qG.call(N,T)&&Uj(A,T,N[T]);if(Vj)for(var T of Vj(N))KG.call(N,T)&&Uj(A,T,N[T]);return A})({},k.getData()),HG(_,GG({range:null})))),k}_remove(t){const r=t instanceof Ec?t.name:t,o=this._markers.get(r);return!!o&&(this._markers.delete(r),this.fire(`update:${r}`,o,o.getRange(),null,o.getData()),this._destroyMarker(o),!0)}_refresh(t){const r=t instanceof Ec?t.name:t,o=this._markers.get(r);if(!o)throw new P("markercollection-refresh-marker-not-exists",this);const c=o.getRange();this.fire(`update:${r}`,o,c,c,o.getData())}*getMarkersAtPosition(t){for(const r of this)r.getRange().containsPosition(t)&&(yield r)}*getMarkersIntersectingRange(t){for(const r of this)r.getRange().getIntersection(t)!==null&&(yield r)}destroy(){for(const t of this._markers.values())this._destroyMarker(t);this._markers=null,this.stopListening()}*getMarkersGroup(t){for(const r of this._markers.values())r.name.startsWith(t+":")&&(yield r)}_destroyMarker(t){t.stopListening(),t._detachLiveRange()}}class Ec extends ee(aa){constructor(t,r,o,c){super(),this.name=t,this._liveRange=this._attachLiveRange(r),this._managedUsingOperations=o,this._affectsData=c}get managedUsingOperations(){if(!this._liveRange)throw new P("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new P("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}
vendor: 5,672 bytes, line 8465
8465getStart(){if(!this._liveRange)throw new P("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new P("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new P("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(t){return this._liveRange&&this._detachLiveRange(),t.delegate("change:range").to(this),t.delegate("change:content").to(this),this._liveRange=t,t}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Ec.prototype.is=function(l){return l==="marker"||l==="model:marker"};class QG extends vi{constructor(t,r){super(null),this.sourcePosition=t.clone(),this.howMany=r}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t}_validate(){if(this.sourcePosition.root.document)throw new P("detach-operation-on-document-node",this)}_execute(){Aj(de._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class hs extends aa{constructor(t){super(),this.markers=new Map,this._children=new pu,t&&this._insertChild(0,t)}[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(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}getPath(){return[]}getNodeByPath(t){let r=this;for(const o of t)r=r.getChild(r.offsetToIndex(o));return r}offsetToIndex(t){return this._children.offsetToIndex(t)}toJSON(){const t=[];for(const r of this._children)t.push(r.toJSON());return t}static fromJSON(t){const r=[];for(const o of t)o.name?r.push(Gt.fromJSON(o)):r.push(Jt.fromJSON(o));return new hs(r)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,r){const o=function(c){return typeof c=="string"?[new Jt(c)]:(Re(c)||(c=[c]),Array.from(c).map(u=>typeof u=="string"?new Jt(u):u instanceof ho?new Jt(u.data,u.getAttributes()):u))}(r);for(const c of o)c.parent!==null&&c._remove(),c.parent=this;this._children._insertNodes(t,o)}_removeChildren(t,r=1){const o=this._children._removeNodes(t,r);for(const c of o)c.parent=null;return o}}hs.prototype.is=function(l){return l==="documentFragment"||l==="model:documentFragment"};class ZG{constructor(t,r){this.model=t,this.batch=r}createText(t,r){return new Jt(t,r)}createElement(t,r){return new Gt(t,r)}createDocumentFragment(){return new hs}cloneElement(t,r=!0){return t._clone(r)}insert(t,r,o=0){if(this._assertWriterUsedCorrectly(),t instanceof Jt&&t.data=="")return;const c=De._createAt(r,o);if(t.parent){if(Gj(t.root,c.root))return void this.move(de._createOn(t),c);if(t.root.document)throw new P("model-writer-insert-forbidden-move",this);this.remove(t)}const u=c.root.document?c.root.document.version:null,m=new or(c,t,u);if(t instanceof Jt&&(m.shouldReceiveAttributes=!0),this.batch.addOperation(m),this.model.applyOperation(m),t instanceof hs)for(const[b,k]of t.markers){const _=De._createAt(k.root,0),A={range:new de(k.start._getCombined(_,c),k.end._getCombined(_,c)),usingOperation:!0,affectsData:!0};this.model.markers.has(b)?this.updateMarker(b,A):this.addMarker(b,A)}}insertText(t,r,o,c){r instanceof hs||r instanceof Gt||r instanceof De?this.insert(this.createText(t),r,o):this.insert(this.createText(t,r),o,c)}insertElement(t,r,o,c){r instanceof hs||r instanceof Gt||r instanceof De?this.insert(this.createElement(t),r,o):this.insert(this.createElement(t,r),o,c)}append(t,r){this.insert(t,r,"end")}appendText(t,r,o){r instanceof hs||r instanceof Gt?this.insert(this.createText(t),r,"end"):this.insert(this.createText(t,r),o,"end")}appendElement(t,r,o){r instanceof hs||r instanceof Gt?this.insert(this.createElement(t),r,"end"):this.insert(this.createElement(t,r),o,"end")}setAttribute(t,r,o){if(this._assertWriterUsedCorrectly(),o instanceof de){const c=o.getMinimalFlatRanges();for(const u of c)Wj(this,t,r,u)}else Hj(this,t,r,o)}setAttributes(t,r){for(const[o,c]of Ro(t))this.setAttribute(o,c,r)}removeAttribute(t,r){if(this._assertWriterUsedCorrectly(),r instanceof de){const o=r.getMinimalFlatRanges();for(const c of o)Wj(this,t,null,c)}else Hj(this,t,null,r)}clearAttributes(t){this._assertWriterUsedCorrectly();const r=o=>{for(const c of o.getAttributeKeys())this.removeAttribute(c,o)};if(t instanceof de)for(const o of t.getItems())r(o);else r(t)}move(t,r,o){if(this._assertWriterUsedCorrectly(),!(t instanceof de))throw new P("writer-move-invalid-range",this);if(!t.isFlat)throw new P("writer-move-range-not-flat",this);const c=De._createAt(r,o);if(c.isEqual(t.start))return;if(this._addOperationForAffectedMarkers("move",t),!Gj(t.root,c.root))throw new P("writer-move-different-document",this);const u=t.root.document?t.root.document.version:null,m=new Lt(t.start,t.end.offset-t.start.offset,c,u);this.batch.addOperation(m),this.model.applyOperation(m)}remove(t){this._assertWriterUsedCorrectly();const r=(t instanceof de?t:de._createOn(t)).getMinimalFlatRanges().reverse();for(const o of r)this._addOperationForAffectedMarkers("move",o),JG(o.start,o.end.offset-o.start.offset,this.batch,this.model)}merge(t){this._assertWriterUsedCorrectly();
vendor: 8,791 bytes, line 8465
8465const r=t.nodeBefore,o=t.nodeAfter;if(this._addOperationForAffectedMarkers("merge",t),!(r instanceof Gt))throw new P("writer-merge-no-element-before",this);if(!(o instanceof Gt))throw new P("writer-merge-no-element-after",this);t.root.document?this._merge(t):this._mergeDetached(t)}createPositionFromPath(t,r,o){return this.model.createPositionFromPath(t,r,o)}createPositionAt(t,r){return this.model.createPositionAt(t,r)}createPositionAfter(t){return this.model.createPositionAfter(t)}createPositionBefore(t){return this.model.createPositionBefore(t)}createRange(t,r){return this.model.createRange(t,r)}createRangeIn(t){return this.model.createRangeIn(t)}createRangeOn(t){return this.model.createRangeOn(t)}createSelection(...t){return this.model.createSelection(...t)}_mergeDetached(t){const r=t.nodeBefore,o=t.nodeAfter;this.move(de._createIn(o),De._createAt(r,"end")),this.remove(o)}_merge(t){const r=De._createAt(t.nodeBefore,"end"),o=De._createAt(t.nodeAfter,0),c=t.root.document.graveyard,u=new De(c,[0]),m=t.root.document.version,b=new Cn(o,t.nodeAfter.maxOffset,r,u,m);this.batch.addOperation(b),this.model.applyOperation(b)}rename(t,r){if(this._assertWriterUsedCorrectly(),!(t instanceof Gt))throw new P("writer-rename-not-element-instance",this);const o=t.root.document?t.root.document.version:null,c=new Zr(De._createBefore(t),t.name,r,o);this.batch.addOperation(c),this.model.applyOperation(c)}split(t,r){this._assertWriterUsedCorrectly();let o,c,u=t.parent;if(!u.parent)throw new P("writer-split-element-no-parent",this);if(r||(r=u.parent),!t.parent.getAncestors({includeSelf:!0}).includes(r))throw new P("writer-split-invalid-limit-element",this);do{const m=u.root.document?u.root.document.version:null,b=u.maxOffset-t.offset,k=Xt.getInsertionPosition(t),_=new Xt(t,b,k,null,m);this.batch.addOperation(_),this.model.applyOperation(_),o||c||(o=u,c=t.parent.nextSibling),u=(t=this.createPositionAfter(t.parent)).parent}while(u!==r);return{position:t,range:new de(De._createAt(o,"end"),De._createAt(c,0))}}wrap(t,r){if(this._assertWriterUsedCorrectly(),!t.isFlat)throw new P("writer-wrap-range-not-flat",this);const o=r instanceof Gt?r:new Gt(r);if(o.childCount>0)throw new P("writer-wrap-element-not-empty",this);if(o.parent!==null)throw new P("writer-wrap-element-attached",this);this.insert(o,t.start);const c=new de(t.start.getShiftedBy(1),t.end.getShiftedBy(1));this.move(c,De._createAt(o,0))}unwrap(t){if(this._assertWriterUsedCorrectly(),t.parent===null)throw new P("writer-unwrap-element-no-parent",this);this.move(de._createIn(t),this.createPositionAfter(t)),this.remove(t)}addMarker(t,r){if(this._assertWriterUsedCorrectly(),!r||typeof r.usingOperation!="boolean")throw new P("writer-addmarker-no-usingoperation",this);const o=r.usingOperation,c=r.range,u=r.affectsData!==void 0&&r.affectsData;if(this.model.markers.has(t))throw new P("writer-addmarker-marker-exists",this);if(!c)throw new P("writer-addmarker-no-range",this);return o?(_u(this,t,null,c,u),this.model.markers.get(t)):this.model.markers._set(t,c,o,u)}updateMarker(t,r){this._assertWriterUsedCorrectly();const o=typeof t=="string"?t:t.name,c=this.model.markers.get(o);if(!c)throw new P("writer-updatemarker-marker-not-exists",this);if(!r)return z("writer-updatemarker-reconvert-using-editingcontroller",{markerName:o}),void this.model.markers._refresh(c);const u=typeof r.usingOperation=="boolean",m=typeof r.affectsData=="boolean",b=m?r.affectsData:c.affectsData;if(!u&&!r.range&&!m)throw new P("writer-updatemarker-wrong-options",this);const k=c.getRange(),_=r.range?r.range:k;u&&r.usingOperation!==c.managedUsingOperations?r.usingOperation?_u(this,o,null,_,b):(_u(this,o,k,null,b),this.model.markers._set(o,_,void 0,b)):c.managedUsingOperations?_u(this,o,k,_,b):this.model.markers._set(o,_,void 0,b)}removeMarker(t){this._assertWriterUsedCorrectly();const r=typeof t=="string"?t:t.name;if(!this.model.markers.has(r))throw new P("writer-removemarker-no-marker",this);const o=this.model.markers.get(r);if(!o.managedUsingOperations)return void this.model.markers._remove(r);_u(this,r,o.getRange(),null,o.affectsData)}addRoot(t,r="$root"){this._assertWriterUsedCorrectly();const o=this.model.document.getRoot(t);if(o&&o.isAttached())throw new P("writer-addroot-root-exists",this);const c=this.model.document,u=new Vo(t,r,!0,c,c.version);return this.batch.addOperation(u),this.model.applyOperation(u),this.model.document.getRoot(t)}detachRoot(t){this._assertWriterUsedCorrectly();const r=typeof t=="string"?this.model.document.getRoot(t):t;if(!r||!r.isAttached())throw new P("writer-detachroot-no-root",this);for(const u of this.model.markers)u.getRange().root===r&&this.removeMarker(u);for(const u of r.getAttributeKeys())this.removeAttribute(u,r);this.remove(this.createRangeIn(r));const o=this.model.document,c=new Vo(r.rootName,r.name,!1,o,o.version);this.batch.addOperation(c),this.model.applyOperation(c)}setSelection(...t){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...t)}setSelectionFocus(t,r){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(t,r)}setSelectionAttribute(t,r){if(this._assertWriterUsedCorrectly(),typeof t=="string")this._setSelectionAttribute(t,r);else for(const[o,c]of Ro(t))this._setSelectionAttribute(o,c)}removeSelectionAttribute(t){if(this._assertWriterUsedCorrectly(),typeof t=="string")this._removeSelectionAttribute(t);else for(const r of t)this._removeSelectionAttribute(r)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(t){this.model.document.selection._restoreGravity(t)}_setSelectionAttribute(t,r){const o=this.model.document.selection;if(o.isCollapsed&&o.anchor.parent.isEmpty){const c=mo._getStoreAttributeKey(t);this.setAttribute(c,r,o.anchor.parent)}o._setAttribute(t,r)}_removeSelectionAttribute(t){const r=this.model.document.selection;if(r.isCollapsed&&r.anchor.parent.isEmpty){const o=mo._getStoreAttributeKey(t);this.removeAttribute(o,r.anchor.parent)}r._removeAttribute(t)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new P("writer-incorrect-use",this)}_addOperationForAffectedMarkers(t,r){for(const o of this.model.markers){if(!o.managedUsingOperations)continue;const c=o.getRange();let u=!1;if(t==="move"){const m=r;u=m.containsPosition(c.start)||m.start.isEqual(c.start)||m.containsPosition(c.end)||m.end.isEqual(c.end)}else{const m=r,b=m.nodeBefore,k=m.nodeAfter,_=c.start.parent==b&&c.start.isAtEnd,A=c.end.parent==k&&c.end.offset==0,N=c.end.nodeAfter==k,T=c.start.nodeAfter==k;u=_||A||N||T}u&&this.updateMarker(o.name,{range:c})}}}function Wj(l,t,r,o){const c=l.model,u=c.document;let m,b,k,_=o.start;for(const N of o.getWalker({shallow:!0}))k=N.item.getAttribute(t),m&&b!=k&&(b!=r&&A(),_=m),m=N.nextPosition,b=k;function A(){const N=new de(_,m),T=N.root.document?u.version:null,O=new Tn(N,t,b,r,T);l.batch.addOperation(O),c.applyOperation(O)}m instanceof De&&m!=_&&b!=r&&A()}function Hj(l,t,r,o){const c=l.model,u=c.document,m=o.getAttribute(t);let b,k;if(m!=r){if(o.root===o){const _=o.document?u.version:null;k=new us(o,t,m,r,_)}else{b=new de(De._createBefore(o),l.createPositionAfter(o));const _=b.root.document?u.version:null;k=new Tn(b,t,m,r,_)}l.batch.addOperation(k),c.applyOperation(k)}}function _u(l,t,r,o,c){const u=l.model,m=u.document,b=new Qr(t,r,o,u.markers,!!c,m.version);l.batch.addOperation(b),u.applyOperation(b)}function JG(l,t,r,o){let c;if(l.root.document){const u=o.document,m=new De(u.graveyard,[0]);c=new Lt(l,t,m,u.version)}else c=new QG(l,t);r.addOperation(c),o.applyOperation(c)}function Gj(l,t){return l===t||l instanceof xf&&t instanceof xf}function XG(l,t,r={}){if(t.isCollapsed)return;const o=t.getFirstRange();if(o.root.rootName=="$graveyard")return;const c=l.schema;l.change(u=>{if(!r.doNotResetEntireContent&&function(_,A){const N=_.getLimitElement(A);if(!A.containsEntireContent(N))return!1;const T=A.getFirstRange();return T.start.parent==T.end.parent?!1:_.checkChild(N,"paragraph")}(c,t))return void function(_,A){const N=_.model.schema.getLimitElement(A);_.remove(_.createRangeIn(N)),Yj(_,_.createPositionAt(N,0),A)}(u,t);const m={};if(!r.doNotAutoparagraph){const _=t.getSelectedElement();_&&Object.assign(m,c.getAttributesWithProperty(_,"copyOnReplace",!0))}const[b,k]=function(_){const A=_.root.document.model,N=_.start;let T=_.end;if(A.hasContent(_,{ignoreMarkers:!0})){const O=function(L){const $=L.parent,U=$.root.document.model.schema,H=$.getAncestors({parentFirst:!0,includeSelf:!0});for(const J of H){if(U.isLimit(J))return null;if(U.isBlock(J))return J}}(T);if(O&&T.isTouching(A.createPositionAt(O,0))){const L=A.createSelection(_);A.modifySelection(L,{direction:"backward"});const $=L.getLastPosition(),U=A.createRange($,T);A.hasContent(U,{ignoreMarkers:!0})||(T=$)}
vendor: 13,131 bytes, line 8465
8465}return[br.fromPosition(N,"toPrevious"),br.fromPosition(T,"toNext")]}(o);b.isTouching(k)||u.remove(u.createRange(b,k)),r.leaveUnmerged||(function(_,A,N){const T=_.model;if(!ly(_.model.schema,A,N))return;const[O,L]=function($,U){const H=$.getAncestors(),J=U.getAncestors();let ae=0;for(;H[ae]&&H[ae]==J[ae];)ae++;return[H[ae],J[ae]]}(A,N);!O||!L||(!T.hasContent(O,{ignoreMarkers:!0})&&T.hasContent(L,{ignoreMarkers:!0})?Kj(_,A,N,O.parent):qj(_,A,N,O.parent))}(u,b,k),c.removeDisallowedAttributes(b.parent.getChildren(),u)),Qj(u,t,b),!r.doNotAutoparagraph&&function(_,A){const N=_.checkChild(A,"$text"),T=_.checkChild(A,"paragraph");return!N&&T}(c,b)&&Yj(u,b,t,m),b.detach(),k.detach()})}function qj(l,t,r,o){const c=t.parent,u=r.parent;if(c!=o&&u!=o){for(t=l.createPositionAfter(c),(r=l.createPositionBefore(u)).isEqual(t)||l.insert(u,t),l.merge(t);r.parent.isEmpty;){const m=r.parent;r=l.createPositionBefore(m),l.remove(m)}ly(l.model.schema,t,r)&&qj(l,t,r,o)}}function Kj(l,t,r,o){const c=t.parent,u=r.parent;if(c!=o&&u!=o){for(t=l.createPositionAfter(c),(r=l.createPositionBefore(u)).isEqual(t)||l.insert(c,r);t.parent.isEmpty;){const m=t.parent;t=l.createPositionBefore(m),l.remove(m)}r=l.createPositionBefore(u),function(m,b){const k=b.nodeBefore,_=b.nodeAfter;k.name!=_.name&&m.rename(k,_.name),m.clearAttributes(k),m.setAttributes(Object.fromEntries(_.getAttributes()),k),m.merge(b)}(l,r),ly(l.model.schema,t,r)&&Kj(l,t,r,o)}}function ly(l,t,r){const o=t.parent,c=r.parent;return o!=c&&!l.isLimit(o)&&!l.isLimit(c)&&function(u,m,b){const k=new de(u,m);for(const _ of k.getWalker())if(b.isLimit(_.item))return!1;return!0}(t,r,l)}function Yj(l,t,r,o={}){const c=l.createElement("paragraph");l.model.schema.setAllowedAttributes(c,o,l),l.insert(c,t),Qj(l,r,l.createPositionAt(c,0))}function Qj(l,t,r){t instanceof mo?l.setSelection(r):t.setTo(r)}function Zj(l,t){const r=[];Array.from(l.getItems({direction:"backward"})).map(o=>t.createRangeOn(o)).filter(o=>(o.start.isAfter(l.start)||o.start.isEqual(l.start))&&(o.end.isBefore(l.end)||o.end.isEqual(l.end))).forEach(o=>{r.push(o.start.parent),t.remove(o)}),r.forEach(o=>{let c=o;for(;c.parent&&c.isEmpty;){const u=t.createRangeOn(c);c=c.parent,t.remove(u)}})}class eq{constructor(t,r,o){this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null,this._nodeToSelect=null,this.model=t,this.writer=r,this.position=o,this.canMergeWith=new Set([this.position.parent]),this.schema=t.schema,this._documentFragment=r.createDocumentFragment(),this._documentFragmentPosition=r.createPositionAt(this._documentFragment,0)}handleNodes(t){for(const r of Array.from(t))this._handleNode(r);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(t){const r=this.writer.createPositionAfter(this._lastNode),o=this.writer.createPositionAfter(t);if(o.isAfter(r)){if(this._lastNode=t,this.position.parent!=t||!this.position.isAtEnd)throw new P("insertcontent-invalid-insertion-position",this);this.position=o,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?de._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new de(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(t){if(this.schema.isObject(t))return void this._handleObject(t);let r=this._checkAndAutoParagraphToAllowedPosition(t);r||(r=this._checkAndSplitToAllowedPosition(t),r)?(this._appendToFragment(t),this._firstNode||(this._firstNode=t),this._lastNode=t):this._handleDisallowedNode(t)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const t=br.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=t.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=t.toPosition(),t.detach()}_handleObject(t){this._checkAndSplitToAllowedPosition(t)?this._appendToFragment(t):this._tryAutoparagraphing(t)}_handleDisallowedNode(t){t.is("element")?this.handleNodes(t.getChildren()):this._tryAutoparagraphing(t)}_appendToFragment(t){if(!this.schema.checkChild(this.position,t))throw new P("insertcontent-wrong-position",this,{node:t,position:this.position});this.writer.insert(t,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(t.offsetSize),this.schema.isObject(t)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=t:this._nodeToSelect=null,this._filterAttributesOf.push(t)}_setAffectedBoundaries(t){this._affectedStart||(this._affectedStart=br.fromPosition(t,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(t)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=br.fromPosition(t,"toNext"))}_mergeOnLeft(){const t=this._firstNode;if(!(t instanceof Gt)||!this._canMergeLeft(t))return;const r=br._createBefore(t);r.stickiness="toNext";const o=br.fromPosition(this.position,"toNext");this._affectedStart.isEqual(r)&&(this._affectedStart.detach(),this._affectedStart=br._createAt(r.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=r.nodeBefore,this._lastNode=r.nodeBefore),this.writer.merge(r),r.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=br._createAt(r.nodeBefore,"end","toNext")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),r.detach()}_mergeOnRight(){const t=this._lastNode;if(!(t instanceof Gt)||!this._canMergeRight(t))return;const r=br._createAfter(t);if(r.stickiness="toNext",!this.position.isEqual(r))throw new P("insertcontent-invalid-insertion-position",this);this.position=De._createAt(r.nodeBefore,"end");const o=br.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(r)&&(this._affectedEnd.detach(),this._affectedEnd=br._createAt(r.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=r.nodeBefore,this._lastNode=r.nodeBefore),this.writer.merge(r),r.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=br._createAt(r.nodeBefore,0,"toPrevious")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),r.detach()}_canMergeLeft(t){const r=t.previousSibling;return r instanceof Gt&&this.canMergeWith.has(r)&&this.model.schema.checkMerge(r,t)}_canMergeRight(t){const r=t.nextSibling;return r instanceof Gt&&this.canMergeWith.has(r)&&this.model.schema.checkMerge(t,r)}_tryAutoparagraphing(t){const r=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,r)&&this.schema.checkChild(r,t)&&(r._appendChild(t),this._handleNode(r))}_checkAndAutoParagraphToAllowedPosition(t){if(this.schema.checkChild(this.position.parent,t))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",t))return!1;this._insertPartialFragment();const r=this.writer.createElement("paragraph");return this.writer.insert(r,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=r,this.position=this.writer.createPositionAt(r,0),!0}_checkAndSplitToAllowedPosition(t){const r=this._getAllowedIn(this.position.parent,t);if(!r)return!1;for(r!=this.position.parent&&this._insertPartialFragment();r!=this.position.parent;)if(this.position.isAtStart){const o=this.position.parent;this.position=this.writer.createPositionBefore(o),o.isEmpty&&o.parent===r&&this.writer.remove(o)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const o=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=o,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(t,r){return this.schema.checkChild(t,r)?t:this.schema.isLimit(t)?null:this._getAllowedIn(t.parent,r)}}function tq(l,t,r,o={}){if(!l.schema.isObject(t))throw new P("insertobject-element-not-an-object",l,{object:t});const c=r||l.document.selection;let u=c;o.findOptimalPosition&&l.schema.isBlock(t)&&(u=l.createSelection(l.schema.findOptimalInsertionRange(c,o.findOptimalPosition)));const m=rr(c.getSelectedBlocks()),b={};return m&&Object.assign(b,l.schema.getAttributesWithProperty(m,"copyOnReplace",!0)),l.change(k=>{u.isCollapsed||l.deleteContent(u,{doNotAutoparagraph:!0});let _=t;const A=u.anchor.parent;!l.schema.checkChild(A,t)&&l.schema.checkChild(A,"paragraph")&&l.schema.checkChild("paragraph",t)&&(_=k.createElement("paragraph"),k.insert(t,_)),l.schema.setAllowedAttributes(_,b,k);const N=l.insertContent(_,u);return N.isCollapsed||o.setSelection&&function(T,O,L,$){const U=T.model;if(L=="on")return void T.setSelection(O,"on");if(L!="after")throw new P("insertobject-invalid-place-parameter-value",U);let H=O.nextSibling;if(U.schema.isInline(O))return void T.setSelection(O,"after");!(H&&U.schema.checkChild(H,"$text"))&&U.schema.checkChild(O.parent,"paragraph")&&(H=T.createElement("paragraph"),U.schema.setAllowedAttributes(H,$,T),U.insertContent(H,T.createPositionAfter(O))),H&&T.setSelection(H,0)}(k,t,o.setSelection,b),N})}const nq=' ,.?!:;"-()';function rq(l,t){const{isForward:r,walker:o,unit:c,schema:u,treatEmojiAsSingleUnit:m}=l,{type:b,item:k,nextPosition:_}=t;if(b=="text")return l.unit==="word"?function(A,N){let T=A.position.textNode;for(T||(T=N?A.position.nodeAfter:A.position.nodeBefore);T&&T.is("$text");){const O=A.position.offset-T.startOffset;if(sq(T,O,N))T=N?A.position.nodeAfter:A.position.nodeBefore;else{if(oq(T.data,O,N))break;A.next()}}return A.position}(o,r):function(A,N,T){const O=A.position.textNode;if(O){const L=O.data;let $=A.position.offset-O.startOffset;for(;Nk(L,$)||N=="character"&&Ek(L,$)||T&&z2(L,$);)A.next(),$=A.position.offset-O.startOffset}return A.position}(o,c,m);if(b==(r?"elementStart":"elementEnd")){if(u.isSelectable(k))return De._createAt(k,r?"after":"before");if(u.checkChild(_,"$text"))return _}else{if(u.isLimit(k))return void o.skip(()=>!0);if(u.checkChild(_,"$text"))return _}}function iq(l,t){const r=l.root,o=De._createAt(r,t?"end":0);return t?new de(l,o):new de(o,l)}function oq(l,t,r){const o=t+(r?0:-1);return nq.includes(l.charAt(o))}function sq(l,t,r){return t===(r?l.offsetSize:0)}class aq extends fe(){constructor(){super(),this.markers=new YG,this.document=new UG(this),this.schema=new tG,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(t=>this.decorate(t)),this.on("applyOperation",(t,r)=>{r[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((t,r)=>{if(r.name==="$marker")return!0}),JH(this),this.document.registerPostFixer(lj),this.on("insertContent",(t,[r,o])=>{t.return=function(c,u,m){return c.change(b=>{const k=m||c.document.selection;k.isCollapsed||c.deleteContent(k,{doNotAutoparagraph:!0});const _=new eq(c,b,k.anchor),A=[];let N;if(u.is("documentFragment")){if(u.markers.size){const L=[];for(const[$,U]of u.markers){const{start:H,end:J}=U,ae=H.isEqual(J);L.push({position:H,name:$,isCollapsed:ae},{position:J,name:$,isCollapsed:ae})}L.sort(({position:$},{position:U})=>$.isBefore(U)?1:-1);for(const{position:$,name:U,isCollapsed:H}of L){let J=null,ae=null;const _e=$.parent===u&&$.isAtStart,qe=$.parent===u&&$.isAtEnd;_e||qe?H&&(ae=_e?"start":"end"):(J=b.createElement("$marker"),b.insert(J,$)),A.push({name:U,element:J,collapsed:ae})}}N=u.getChildren()}else N=[u];_.handleNodes(N);let T=_.getSelectionRange();if(u.is("documentFragment")&&A.length){const L=T?xi.fromRange(T):null,$={};for(let U=A.length-1;U>=0;U--){const{name:H,element:J,collapsed:ae}=A[U],_e=!$[H];if(_e&&($[H]=[]),J){const qe=b.createPositionAt(J,"before");$[H].push(qe),b.remove(J)}else{const qe=_.getAffectedRange();if(!qe){ae&&$[H].push(_.position);continue}
8465ae?$[H].push(qe[ae]):$[H].push(_e?qe.start:qe.end)}}for(const[U,[H,J]]of Object.entries($))H&&J&&H.root===J.root&&H.root.document&&!b.model.markers.has(U)&&b.addMarker(U,{usingOperation:!0,affectsData:!0,range:new de(H,J)});L&&(T=L.toRange(),L.detach())}T&&(k instanceof mo?b.setSelection(T):k.setTo(T));const O=_.getAffectedRange()||c.createRange(k.anchor);return _.destroy(),O})}(this,r,o)}),this.on("insertObject",(t,[r,o,c])=>{t.return=tq(this,r,o,c)}),this.on("canEditAt",t=>{const r=!this.document.isReadOnly;t.return=r,r||t.stop()})}change(t){try{return this._pendingChanges.length===0?(this._pendingChanges.push({batch:new Nc,callback:t}),this._runPendingChanges()[0]):t(this._currentWriter)}catch(r){P.rethrowUnexpectedError(r,this)}}enqueueChange(t,r){try{t?typeof t=="function"?(r=t,t=new Nc):t instanceof Nc||(t=new Nc(t)):t=new Nc,this._pendingChanges.push({batch:t,callback:r}),this._pendingChanges.length==1&&this._runPendingChanges()}catch(o){P.rethrowUnexpectedError(o,this)}}applyOperation(t){t._execute()}insertContent(t,r,o,...c){const u=cy(r,o);return this.fire("insertContent",[t,u,o,...c])}insertObject(t,r,o,c,...u){const m=cy(r,o);return this.fire("insertObject",[t,m,c,c,...u])}deleteContent(t,r){XG(this,t,r)}modifySelection(t,r){(function(o,c,u={}){const m=o.schema,b=u.direction!="backward",k=u.unit?u.unit:"character",_=!!u.treatEmojiAsSingleUnit,A=c.focus,N=new ds({boundaries:iq(A,b),singleCharacters:!0,direction:b?"forward":"backward"}),T={walker:N,schema:m,isForward:b,unit:k,treatEmojiAsSingleUnit:_};let O;for(;O=N.next();){if(O.done)return;const L=rq(T,O.value);if(L)return void(c instanceof mo?o.change($=>{$.setSelectionFocus(L)}):c.setFocus(L))}})(this,t,r)}getSelectedContent(t){return function(r,o){return r.change(c=>{const u=c.createDocumentFragment(),m=o.getFirstRange();if(!m||m.isCollapsed)return u;const b=m.start.root,k=m.start.getCommonPath(m.end),_=b.getNodeByPath(k);let A;A=m.start.parent==m.end.parent?m:c.createRange(c.createPositionAt(_,m.start.path[k.length]),c.createPositionAt(_,m.end.path[k.length]+1));const N=A.end.offset-A.start.offset;for(const T of A.getItems({shallow:!0}))T.is("$textProxy")?c.appendText(T.data,T.getAttributes(),u):c.append(c.cloneElement(T,!0),u);if(A!=m){const T=m._getTransformedByMove(A.start,c.createPositionAt(u,0),N)[0],O=c.createRange(c.createPositionAt(u,0),T.start);Zj(c.createRange(T.end,c.createPositionAt(u,"end")),c),Zj(O,c)}return u})}(this,t)}hasContent(t,r={}){const o=t instanceof de?t:de._createIn(t);if(o.isCollapsed)return!1;const{ignoreWhitespaces:c=!1,ignoreMarkers:u=!1}=r;if(!u){for(const m of this.markers.getMarkersIntersectingRange(o))if(m.affectsData)return!0}for(const m of o.getItems())if(this.schema.isContent(m)&&(!m.is("$textProxy")||!c||m.data.search(/\S/)!==-1))return!0;return!1}canEditAt(t){const r=cy(t);return this.fire("canEditAt",[r])}createPositionFromPath(t,r,o){return new De(t,r,o)}createPositionAt(t,r){return De._createAt(t,r)}createPositionAfter(t){return De._createAfter(t)}createPositionBefore(t){return De._createBefore(t)}createRange(t,r){return new de(t,r)}createRangeIn(t){return de._createIn(t)}createRangeOn(t){return de._createOn(t)}createSelection(...t){return new yi(...t)}createBatch(t){return new Nc(t)}createOperationFromJSON(t){return _G.fromJSON(t,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const t=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const r=this._pendingChanges[0].batch;this._currentWriter=new ZG(this,r);const o=this._pendingChanges[0].callback(this._currentWriter);t.push(o),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}
vendor: 4,131 bytes, line 8465
8465return t}}function cy(l,t){if(l)return l instanceof yi||l instanceof mo?l:l instanceof al?t||t===0?new yi(l,t):l.is("rootElement")?new yi(l,"in"):new yi(l,"on"):new yi(l)}class lq extends sa{constructor(){super(...arguments),this.domEventType="click"}onDomEvent(t){this.fire(t.type,t)}}class dy extends sa{constructor(){super(...arguments),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(t){this.fire(t.type,t)}}class ms{constructor(t){this.document=t}createDocumentFragment(t){return new sl(this.document,t)}createElement(t,r,o){return new bi(this.document,t,r,o)}createText(t){return new Zt(this.document,t)}clone(t,r=!1){return t._clone(r)}appendChild(t,r){return r._appendChild(t)}insertChild(t,r,o){return o._insertChild(t,r)}removeChildren(t,r,o){return o._removeChildren(t,r)}remove(t){const r=t.parent;return r?this.removeChildren(r.getChildIndex(t),1,r):[]}replace(t,r){const o=t.parent;if(o){const c=o.getChildIndex(t);return this.removeChildren(c,1,o),this.insertChild(c,r,o),!0}return!1}unwrapElement(t){const r=t.parent;if(r){const o=r.getChildIndex(t);this.remove(t),this.insertChild(o,t.getChildren(),r)}}rename(t,r){const o=new bi(this.document,t,r.getAttributes(),r.getChildren());return this.replace(r,o)?o:null}setAttribute(t,r,o){o._setAttribute(t,r)}removeAttribute(t,r){r._removeAttribute(t)}addClass(t,r){r._addClass(t)}removeClass(t,r){r._removeClass(t)}setStyle(t,r,o){_t(t)&&o===void 0?r._setStyle(t):o._setStyle(t,r)}removeStyle(t,r){r._removeStyle(t)}setCustomProperty(t,r,o){o._setCustomProperty(t,r)}removeCustomProperty(t,r){return r._removeCustomProperty(t)}createPositionAt(t,r){return Ge._createAt(t,r)}createPositionAfter(t){return Ge._createAfter(t)}createPositionBefore(t){return Ge._createBefore(t)}createRange(t,r){return new wt(t,r)}createRangeOn(t){return wt._createOn(t)}createRangeIn(t){return wt._createIn(t)}createSelection(...t){return new lo(...t)}}class cq{constructor(){this._commands=new Map}add(t,r){this._commands.set(t,r)}get(t){return this._commands.get(t)}execute(t,...r){const o=this.get(t);if(!o)throw new P("commandcollection-command-not-found",this,{commandName:t});return o.execute(...r)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const t of this.commands())t.destroy()}}var dq=Object.defineProperty,Jj=Object.getOwnPropertySymbols,uq=Object.prototype.hasOwnProperty,hq=Object.prototype.propertyIsEnumerable,Xj=(l,t,r)=>t in l?dq(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r;const uy="contentEditing",e4="common";class mq{constructor(t){this.keystrokeInfos=new Map,this._editor=t;const r=t.config.get("menuBar.isVisible"),o=t.locale.t;this.addKeystrokeInfoCategory({id:uy,label:o("Content editing keystrokes"),description:o("These keyboard shortcuts allow for quick access to content editing features.")});const c=[{label:o("Close contextual balloons, dropdowns, and dialogs"),keystroke:"Esc"},{label:o("Open the accessibility help dialog"),keystroke:"Alt+0"},{label:o("Move focus between form fields (inputs, buttons, etc.)"),keystroke:[["Tab"],["Shift+Tab"]]},{label:o("Move focus to the toolbar, navigate between toolbars"),keystroke:"Alt+F10",mayRequireFn:!0},{label:o("Navigate through the toolbar or menu bar"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]},{label:o("Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content."),keystroke:[["Enter"],["Space"]]}];r&&c.push({label:o("Move focus to the menu bar, navigate between menu bars"),keystroke:"Alt+F9",mayRequireFn:!0}),this.addKeystrokeInfoCategory({id:"navigation",label:o("User interface and content navigation keystrokes"),description:o("Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface."),groups:[{id:"common",keystrokes:c}]})}addKeystrokeInfoCategory({id:t,label:r,description:o,groups:c}){this.keystrokeInfos.set(t,{id:t,label:r,description:o,groups:new Map}),this.addKeystrokeInfoGroup({categoryId:t,id:e4}
8465),c&&c.forEach(u=>{this.addKeystrokeInfoGroup(((m,b)=>{for(var k in b||(b={}))uq.call(b,k)&&Xj(m,k,b[k]);if(Jj)for(var k of Jj(b))hq.call(b,k)&&Xj(m,k,b[k]);return m})({categoryId:t},u))})}addKeystrokeInfoGroup({categoryId:t=uy,id:r,label:o,keystrokes:c}){const u=this.keystrokeInfos.get(t);if(!u)throw new P("accessibility-unknown-keystroke-info-category",this._editor,{groupId:r,categoryId:t});u.groups.set(r,{id:r,label:o,keystrokes:c||[]})}addKeystrokeInfos({categoryId:t=uy,groupId:r=e4,keystrokes:o}){if(!this.keystrokeInfos.has(t))throw new P("accessibility-unknown-keystroke-info-category",this._editor,{categoryId:t,keystrokes:o});const c=this.keystrokeInfos.get(t);if(!c.groups.has(r))throw new P("accessibility-unknown-keystroke-info-group",this._editor,{groupId:r,categoryId:t,keystrokes:o});c.groups.get(r).keystrokes.push(...o)}}var t4=Object.getOwnPropertySymbols,fq=Object.prototype.hasOwnProperty,pq=Object.prototype.propertyIsEnumerable,n4=(l,t)=>{var r={};for(var o in l)fq.call(l,o)&&t.indexOf(o)<0&&(r[o]=l[o]);if(l!=null&&t4)for(var o of t4(l))t.indexOf(o)<0&&pq.call(l,o)&&(r[o]=l[o]);return r};class gq extends fe(){constructor(t={}){super();const r=this.constructor,o=r.defaultConfig||{},{translations:c}=o,u=n4(o,["translations"]),m=t,{translations:b=c}=m,k=n4(m,["translations"]),_=t.language||u.language;this._context=t.context||new n5({language:_,translations:b}),this._context._addEditor(this,!t.context);const A=Array.from(r.builtinPlugins||[]);this.config=new m2(k,u),this.config.define("plugins",A),this.config.define(this._context._getEditorConfig()),this.plugins=new e5(this,A,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new cq,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.model=new aq,this.on("change:isReadOnly",()=>{this.model.document.isReadOnly=this.isReadOnly});const N=new TW;this.data=new vG(this.model,N),this.editing=new XH(this.model,N),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new wG([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 cW(this),this.keystrokes.listenTo(this.editing.view.document),this.accessibility=new mq(this)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(t){throw new P("editor-isreadonly-has-no-setter")}enableReadOnlyMode(t){if(typeof t!="string"&&typeof t!="symbol")throw new P("editor-read-only-lock-id-invalid",null,{lockId:t});this._readOnlyLocks.has(t)||(this._readOnlyLocks.add(t),this._readOnlyLocks.size===1&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(t){if(typeof t!="string"&&typeof t!="symbol")throw new P("editor-read-only-lock-id-invalid",null,{lockId:t});this._readOnlyLocks.has(t)&&(this._readOnlyLocks.delete(t),this._readOnlyLocks.size===0&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}setData(t){this.data.set(t)}getData(t){return this.data.get(t)}initPlugins(){const t=this.config,r=t.get("plugins"),o=t.get("removePlugins")||[],c=t.get("extraPlugins")||[],u=t.get("substitutePlugins")||[];return this.plugins.init(r.concat(c),o,u)}destroy(){let t=Promise.resolve();return this.state=="initializing"&&(t=new Promise(r=>this.once("ready",r))),t.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(t,...r){try{return this.commands.execute(t,...r)}catch(o){P.rethrowUnexpectedError(o,this)}}focus(){this.editing.view.focus()}static create(...t){throw new Error("This is an abstract method.")}}function hy(l){return class extends l{updateSourceElement(t){if(!this.sourceElement)throw new P("editor-missing-sourceelement",this);const r=this.config.get("updateSourceElementOnDestroy"),o=this.sourceElement instanceof HTMLTextAreaElement;if(!r&&!o)return void w2(this.sourceElement,"");const c=typeof t=="string"?t:this.data.get();w2(this.sourceElement,c)}}}hy.updateSourceElement=hy(Object).prototype.updateSourceElement;class r4 extends nf{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new so({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(t){if(typeof t!="string")throw new P("pendingactions-add-invalid-message",this);const r=new(fe());return r.set("message",t),this._actions.add(r),this.hasAny=!0,r}remove(t){this._actions.remove(t),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const At={bold:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.
84656 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z"/></svg>',cancel:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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.414l-4.243 4.243z"/></svg>',caption:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2z"/><path 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-2h14zm0 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-.492L17 2.5z" fill-opacity=".6"/></svg>',check:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.972 16.615a.997.997 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.323a.997.997 0 0 1-.745.292z"/></svg>',imageUpload:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h9.494a2.97 2.97 0 0 1-.414-.287 2.998 2.998 0 0 1-1.055-2.03 3.003 3.003 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.1H1.202Zm11.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.134 2.134 0 0 0-1.875-.978Z"/><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.784.784 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.79Z"/><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.784.784 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.79Z"/></svg>',imageAssetManager:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.201 1c-.662 0-1.2.47-1.2 1.1v14.248c0 .64.533 1.152 1.185 1.152h6.623v-7.236L6.617 9.15a.694.694 0 0 0-.957-.033L1.602 13.55V2.553l14.798.003V9.7H18V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.723 2.805a2.094 2.094 0 0 0-1.621.832 2.127 2.127 0 0 0 1.136 3.357 2.13 2.13 0 0 0 2.611-1.506 2.133 2.133 0 0 0-.76-2.244 2.13 2.13 0 0 0-1.366-.44Z"/><path clip-rule="evenodd" d="M19.898 12.369v6.187a.844.844 0 0 1-.844.844h-8.719a.844.844 0 0 1-.843-.844v-7.312a.844.844 0 0 1 .843-.844h2.531a.843.843 0 0 1 .597.248l.838.852h4.75c.223 0 .441.114.6.272a.844.844 0 0 1 .247.597Zm-1.52.654-4.377.02-1.1-1.143H11v6h7.4l-.023-4.877Z"/></svg>',textAlternative:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3.035 1C2.446 1 2 1.54 2 2.098V10.5h1.5v-8h13v8H18V2.098C18 1.539 17.48 1 16.9 1H3.035Zm10.453 2.61a1.885 1.885 0 0 0-1.442.736 1.89 1.89 0 0 0 1.011 2.976 1.903 1.903 0 0 0 2.253-1.114 1.887 1.887 0 0 0-1.822-2.598ZM7.463 8.163a.611.611 0 0 0-.432.154L5.071 10.5h5.119L7.88 8.348a.628.628 0 0 0-.417-.185Zm6.236 1.059a.62.62 0 0 0-.42.164L12.07 10.5h2.969l-.92-1.113a.618.618 0 0 0-.42-.165ZM.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.908.908 0 0 0-.912-.912H.91ZM3.668 13h1.947l2.135 5.7H5.898l-.28-.946H3.601l-.278.945H1.516L3.668 13Zm4.947 0h1.801v4.3h2.7v1.4h-4.5V13h-.001Zm4.5 0h5.4v1.4h-1.798v4.3h-1.701v-4.3h-1.9V13h-.001Zm-8.517 1.457-.614 2.059h1.262l-.648-2.059Z"/></svg>',loupe:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.68 13.74h-.001l4.209 4.208a1 1 0 1 0 1.414-1.414l-4.267-4.268a6 6 0 1 0-1.355 1.474ZM13 9a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"/></svg>',previousArrow:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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>',nextArrow:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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.382l-4.043 4.042z"/></svg>',importExport:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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.822V4.5ZM14 5V2l3.3 3H14Zm-3.692 12.5c.062.105.133.206.213.303L11.52 19H8v-.876a2.243 2.243 0 0 0 1.82-.624h.488Zm7.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 0l2.346-2.815Zm-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>',paragraph:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.5 5.5H7v5h3.5a2.5 2.5 0 1 0 0-5zM5 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-1z"/></svg>',plus:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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-1Z"/></svg>',text:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555Zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13Z"/><path d="m12.09 17-.534-1.292.848-1.971.545 1.319L12.113 17h-.023Zm1.142-5.187.545 1.319L15.5 9.13l1.858 4.316h-3.45l.398.965h3.467L18.887 17H20l-3.873-9h-1.254l-1.641 3.813Z"/></svg>',alignLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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.75zm0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75zm0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75z"/></svg>',objectLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z"/><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 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectCenter:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><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 1zm-1.506.5H6.5V12h6.997V7.5z"/></svg>',objectRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z"/><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 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',objectFullWidth:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><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 1zm-1.505.5H3.504V12h12.991V7.5z"/></svg>',objectInline:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z"/><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 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockLeft:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><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 1zm-1.506.5H3.5V12h6.997V7.5z"/></svg>',objectBlockRight:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M2 3h16v1.5H2zm0 12h16v1.5H2z"/><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 1zm-1.506.5H9.5V12h6.997V7.5z"/></svg>',pencil:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.3 17.37-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 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.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5 9.375 17H19v1.5H8z"/></svg>',pilcrow:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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-4z"/></svg>',quote:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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.003v-4.574zm8 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.003v-4.574z"/></svg>',threeVerticalDots:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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>',dragIndicator:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M5 16.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/><path d="M12 16.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/></svg>',redo:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.7
84655.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 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-.032h8.927z"/></svg>',undo:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 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.75.75 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-.032H5.042z"/></svg>',bulletedList:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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.75zm-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.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-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.75z"/></svg>',numberedList:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 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-.75z"/></svg>',browseFiles:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.627 16.5zm5.873-.196zm0-7.001V8h-13v8.5h4.341c.191.54.457 1.044.785 1.5H2a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 2 2h4.5a1.5 1.5 0 0 1 1.06.44L9.122 4H16a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 19 8v2.531a6.027 6.027 0 0 0-1.5-1.228zM16 6.5v-1H8.5l-2-2H2v13h1V8a1.5 1.5 0 0 1 1.5-1.5H16z"/><path d="M14.5 19.5a5 5 0 1 1 0-10 5 5 0 0 1 0 10zM15 14v-2h-1v2h-2v1h2v2h1v-2h2v-1h-2z"/></svg>',indent:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zM1.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>',outdent:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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.75zm5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5zm1.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>',table:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 5.5v3h4v-3H3Zm0 4v3h4v-3H3Zm0 4v3h4v-3H3Zm5 3h4v-3H8v3Zm5 0h4v-3h-4v3Zm4-4v-3h-4v3h4Zm0-4v-3h-4v3h4Zm1.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.5v13.5Zm-6.5-4v-3H8v3h4Zm0-4v-3H8v3h4Z"/></svg>'};var i4=d(7801),bq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(i4.A,bq),i4.A.locals;class vf extends kt{constructor(t){super(t),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${B()}`;const r=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:r.to("for")},children:[{text:r.to("text")}]})}}class kq extends kt{constructor(t,r){super(t);const o=t.t,c=new vf;c.text=o("Help Contents. To close this dialog press ESC."),this.setTemplate({tag:"div",attributes:{class:["ck","ck-accessibility-help-dialog__content"],"aria-labelledby":c.id,role:"document",tabindex:-1},children:[Ut(document,"p",{},o("Below, you can find a list of keyboard shortcuts that can be used in the editor.")),...this._createCategories(Array.from(r.values())
8465),c]})}focus(){this.element.focus()}_createCategories(t){return t.map(r=>{const o=[Ut(document,"h3",{},r.label),...Array.from(r.groups.values()).map(c=>this._createGroup(c)).flat()];return r.description&&o.splice(1,0,Ut(document,"p",{},r.description)),Ut(document,"section",{},o)})}_createGroup(t){const r=t.keystrokes.sort((c,u)=>c.label.localeCompare(u.label)).map(c=>this._createGroupRow(c)).flat(),o=[Ut(document,"dl",{},r)];return t.label&&o.unshift(Ut(document,"h4",{},t.label)),o}_createGroupRow(t){const r=this.locale.t,o=Ut(document,"dt"),c=Ut(document,"dd"),u=function(b){return typeof b=="string"?[[b]]:typeof b[0]=="string"?[b]:b}(t.keystroke),m=[];for(const b of u)m.push(b.map(yq).join(""));return o.innerHTML=t.label,c.innerHTML=m.join(", ")+(t.mayRequireFn&&y.isMac?` ${r("(may require <kbd>Fn</kbd>)")}`:""),[o,c]}}function yq(l){return Zm(l).split("+").map(t=>`<kbd>${t}</kbd>`).join("+")}const o4='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 6.628a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"/><path d="M8.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-.103V9.125Z"/><path clip-rule="evenodd" d="M10 18.5a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17Zm0 1.5c5.523 0 10-4.477 10-10S15.523 0 10 0 0 4.477 0 10s4.477 10 10 10Z"/></svg>';var s4=d(8527),xq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(s4.A,xq),s4.A.locals;class vq extends Pe{constructor(){super(...arguments),this.contentView=null}static get requires(){return[gs]}static get pluginName(){return"AccessibilityHelp"}init(){const t=this.editor,r=t.locale.t;t.ui.componentFactory.add("accessibilityHelp",()=>{const o=this._createButton(Rt);return o.set({tooltip:!0,withText:!1,label:r("Accessibility help")}),o}),t.ui.componentFactory.add("menuBar:accessibilityHelp",()=>{const o=this._createButton(wi);return o.label=r("Accessibility"),o}),t.keystrokes.set("Alt+0",(o,c)=>{this._showDialog(),c()}),this._setupRootLabels()}_createButton(t){const r=new t(this.editor.locale);return r.set({keystroke:"Alt+0",icon:o4}),r.on("execute",()=>this._showDialog()),r}_setupRootLabels(){const t=this.editor,r=t.editing.view,o=t.t;function c(u,m){const b=`${m.getAttribute("aria-label")}. ${o("Press %0 for help.",[Zm("Alt+0")])}`;u.setAttribute("aria-label",b,m)}t.ui.on("ready",()=>{r.change(u=>{for(const m of r.document.roots)c(u,m)}),t.on("addRoot",(u,m)=>{const b=t.editing.view.document.getRoot(m.rootName);r.change(k=>c(k,b))},{priority:"low"})})}_showDialog(){const t=this.editor,r=t.plugins.get("Dialog"),o=t.locale.t;this.contentView||(this.contentView=new kq(t.locale,t.accessibility.keystrokeInfos)),r.show({id:"accessibilityHelp",className:"ck-accessibility-help-dialog",title:o("Accessibility help"),icon:o4,hasCloseButton:!0,content:this.contentView})}}class wq extends Ri{constructor(t,r=[]){super(r),this.locale=t}get bodyCollectionContainer(){return this._bodyCollectionContainer}attachToDom(){this._bodyCollectionContainer=new ao({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let t=document.querySelector(".ck-body-wrapper");t||(t=Ut(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(t)),t.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const t=document.querySelector(".ck-body-wrapper");t&&t.childElementCount==0&&t.remove()}}var a4=d(7621),_q={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(a4.A,_q),a4.A.locals;const l4=class extends kt{constructor(){super();const l=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",l.if("isVisible","ck-hidden",t=>!t),"ck-reset_all-excluded",l.if("isColorInherited","ck-icon_inherit-color")],viewBox:l.to("viewBox")}})}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 l=new DOMParser().parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=l.getAttribute("viewBox");t&&(this.viewBox=t);for(const{name:r,value:o}of Array.from(l.attributes))l4.presentationalAttributeNames.includes(r)&&this.element.setAttribute(r,o);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;l.childNodes.length>0;)this.element.appendChild(l.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(l=>{l.style.fill=this.fillColor})}};let fs=l4;fs.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
8465-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"];class Aq extends kt{constructor(){super(),this.set({style:void 0,text:void 0,id:void 0});const t=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:t.to("style"),id:t.to("id")},children:[{text:t.to("text")}]})}}var c4=d(9715),Cq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(c4.A,Cq),c4.A.locals;class Rt extends kt{constructor(t,r=new Aq){super(t),this._focusDelayed=null;const o=this.bindTemplate,c=B();this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${c}`),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(r),this.iconView=new fs,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const u={tag:"button",attributes:{class:["ck","ck-button",o.to("class"),o.if("isEnabled","ck-disabled",m=>!m),o.if("isVisible","ck-hidden",m=>!m),o.to("isOn",m=>m?"ck-on":"ck-off"),o.if("withText","ck-button_with-text"),o.if("withKeystroke","ck-button_with-keystroke")],role:o.to("role"),type:o.to("type",m=>m||"button"),tabindex:o.to("tabindex"),"aria-checked":o.to("ariaChecked"),"aria-label":o.to("ariaLabel"),"aria-labelledby":o.to("ariaLabelledBy"),"aria-disabled":o.if("isEnabled",!0,m=>!m),"aria-pressed":o.to("isOn",m=>!!this.isToggleable&&String(!!m)),"data-cke-tooltip-text":o.to("_tooltipString"),"data-cke-tooltip-position":o.to("tooltipPosition")},children:this.children,on:{click:o.to(m=>{this.isEnabled?this.fire("execute"):m.preventDefault()})}};y.isSafari&&(this._focusDelayed||(this._focusDelayed=jk(()=>this.focus(),0)),u.on.mousedown=o.to(()=>{this._focusDelayed()}),u.on.mouseup=o.to(()=>{this._focusDelayed.cancel()})),this.setTemplate(u)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(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(t){return t.bind("text","style","id").to(this,"label","labelStyle","ariaLabelledBy"),t}_createKeystrokeView(){const t=new kt;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",r=>Zm(r))}]}),t}_getTooltipString(t,r,o){return t?typeof t=="string"?t:(o&&(o=Zm(o)),t instanceof Function?t(r,o):`${r}${o?` (${o})`:""}`):""}}var d4=d(4391),jq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(d4.A,jq),d4.A.locals;class wf extends Rt{constructor(t){super(t),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const t=new kt;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),t}}class u4 extends Rt{constructor(t){super(t),this.buttonView=this,this._fileInputView=new Nq(t),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)}}class Nq extends kt{constructor(t){super(t),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const r=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:r.to("acceptedType"),multiple:r.to("allowMultipleFiles")},on:{change:r.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""})}})}open(){this.element.click()}}const _f='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><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-.136L.941 4.523z"/></svg>';var h4=d(25),Eq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(h4.A,Eq),h4.A.locals;class Sq extends kt{constructor(t,r){super(t);const o=this.bindTemplate;this.set("isCollapsed",!1),this.set("label",""),this.buttonView=this._createButtonView(),this.children=this.createCollection(),this.set("_collapsibleAriaLabelUid",void 0),r&&this.children.addMany(r),this.setTemplate({tag:"div",attributes:{class:["ck","ck-collapsible",o.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:o.if("isCollapsed","hidden"),"aria-labelledby":o.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.i
8465d}focus(){this.buttonView.focus()}_createButtonView(){const t=new Rt(this.locale),r=t.bindTemplate;return t.set({withText:!0,icon:_f}),t.extendTemplate({attributes:{"aria-expanded":r.to("isOn",o=>String(o))}}),t.bind("label").to(this),t.bind("isOn").to(this,"isCollapsed",o=>!o),t.on("execute",()=>{this.isCollapsed=!this.isCollapsed}),t}}var m4=d(7317),Dq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(m4.A,Dq),m4.A.locals,d(6931),d(9047);var f4=d(4962),Tq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(f4.A,Tq),f4.A.locals;class Af extends kt{constructor(t,r){super(t);const o=`ck-labeled-field-view-${B()}`,c=`ck-labeled-field-view-status-${B()}`;this.fieldView=r(this,o,c),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(o),this.statusView=this._createStatusView(c),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",(m,b)=>m||b);const u=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",u.to("class"),u.if("isEnabled","ck-disabled",m=>!m),u.if("isEmpty","ck-labeled-field-view_empty"),u.if("isFocused","ck-labeled-field-view_focused"),u.if("placeholder","ck-labeled-field-view_placeholder"),u.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(t){const r=new vf(this.locale);return r.for=t,r.bind("text").to(this,"label"),r}_createStatusView(t){const r=new kt(this.locale),o=this.bindTemplate;return r.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",o.if("errorText","ck-labeled-field-view__status_error"),o.if("_statusText","ck-hidden",c=>!c)],id:t,role:o.if("errorText","alert")},children:[{text:o.to("_statusText")}]}),r}focus(t){this.fieldView.focus(t)}}class Iq extends kt{constructor(t){super(t),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 ir,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const r=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",r.if("isFocused","ck-input_focused"),r.if("isEmpty","ck-input-text_empty"),r.if("hasError","ck-error")],id:r.to("id"),placeholder:r.to("placeholder"),tabindex:r.to("tabIndex"),readonly:r.to("isReadOnly"),"aria-invalid":r.if("hasError",!0),"aria-describedby":r.to("ariaDescribedById"),"aria-label":r.to("ariaLabel")},on:{input:r.to((...o)=>{this.fire("input",...o),this._updateIsEmpty()}),change:r.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",(t,r,o)=>{this._setDomElementValue(o),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=!this.element.value}_setDomElementValue(t){this.element.value=t||t===0?t:""}}var p4=d(253),Mq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(p4.A,Mq),p4.A.locals;class Pq extends Iq{constructor(t){super(t),this.set("inputMode","text");const r=this.bindTemplate;this.extendTemplate({attributes:{inputmode:r.to("inputMode")}})}}class Oq extends Pq{constructor(t){super(t),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}var g4=d(1671),Bq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(g4.A,Bq),g4.A.locals;class Lq extends kt{constructor(t){super(t);const r=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",r.to("position",o=>`ck-dropdown__panel_${o}`),r.if("isVisible","ck-dropdown__panel-visible")],tabindex:"-1"},children:this.children,on:{selectstart:r.to(o=>{o.target.tagName.toLocaleLowerCase()!=="input"&&o.preventDefault()})}})}focus(){if(this.children.length){const t=this.children.first;typeof t.focus=="function"?t.focus():z("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const t=this.children.last;typeof t.focusLast=="function"?t.focusLast():t.focus()}}}var b4=d(8149),Rq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(b4.A,Rq),b4.A.locals;const my=class extends kt{constructor(l,t,r){super(l);const o=this.bindTemplate;this.buttonView=t,this.panelView=r,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 zr,this.focusTracker=new ir,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",o.to("class"),o.if("isEnabled","ck-disabled",c=>!c)],id:o.to("id"),"aria-describedby":o.to("ariaDescribedById")},children:[t,r]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":o.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,r,o)=>{if(o)if(this.panelPosition==="auto"){const c=my._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=c?c.name:this._panelPositions[0].name}else this.panelView.position=this.panelPosition}),this.keystrokes.listenTo(this.element);const l=(t,r)=>{this.isOpen&&(this.isOpen=!1,r())};this.keystrokes.set("arrowdown",(t,r)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,r())}),this.keystrokes.set("arrowright",(t,r)=>{this.isOpen&&r()}),this.keystrokes.set("arrowleft",l),this.keystrokes.set("esc",l)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:l,north:t,southEast:r,southWest:o,northEast:c,northWest:u,southMiddleEast:m,southMiddleWest:b,northMiddleEast:k,northMiddleWest:_}=my.defaultPanelPositions;return this.locale.uiLanguageDirection!=="rtl"?[r,o,m,b,l,c,u,k,_,t]:[o,r,b,m,l,u,c,_,k,t]}};let fy=my;fy.defaultPanelPositions={south:(l,t)=>({top:l.bottom,left:l.left-(t.width-l.width)/2,name:"s"}),southEast:l=>({top:l.bottom,left:l.left,name:"se"}),southWest:(l,t)=>
8465({top:l.bottom,left:l.left-t.width+l.width,name:"sw"}),southMiddleEast:(l,t)=>({top:l.bottom,left:l.left-(t.width-l.width)/4,name:"sme"}),southMiddleWest:(l,t)=>({top:l.bottom,left:l.left-3*(t.width-l.width)/4,name:"smw"}),north:(l,t)=>({top:l.top-t.height,left:l.left-(t.width-l.width)/2,name:"n"}),northEast:(l,t)=>({top:l.top-t.height,left:l.left,name:"ne"}),northWest:(l,t)=>({top:l.top-t.height,left:l.left-t.width+l.width,name:"nw"}),northMiddleEast:(l,t)=>({top:l.top-t.height,left:l.left-(t.width-l.width)/4,name:"nme"}),northMiddleWest:(l,t)=>({top:l.top-t.height,left:l.left-3*(t.width-l.width)/4,name:"nmw"})},fy._getOptimalPosition=Qm;class zq extends Rt{constructor(t){super(t),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",r=>String(r))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const t=new fs;return t.content=_f,t.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),t}}class Fi extends ee(){constructor(t){if(super(),this.focusables=t.focusables,this.focusTracker=t.focusTracker,this.keystrokeHandler=t.keystrokeHandler,this.actions=t.actions,t.actions&&t.keystrokeHandler)for(const r in t.actions){let o=t.actions[r];typeof o=="string"&&(o=[o]);for(const c of o)t.keystrokeHandler.set(c,(u,m)=>{this[r](),m()})}this.on("forwardCycle",()=>this.focusFirst(),{priority:"low"}),this.on("backwardCycle",()=>this.focusLast(),{priority:"low"})}get first(){return this.focusables.find(py)||null}get last(){return this.focusables.filter(py).slice(-1)[0]||null}get next(){return this._getDomFocusableItem(1)}get previous(){return this._getDomFocusableItem(-1)}get current(){let t=null;return this.focusTracker.focusedElement===null?null:(this.focusables.find((r,o)=>{const c=r.element===this.focusTracker.focusedElement;return c&&(t=o),c}),t)}focusFirst(){this._focus(this.first,1)}focusLast(){this._focus(this.last,-1)}focusNext(){const t=this.next;t&&this.focusables.getIndex(t)===this.current||t===this.first?this.fire("forwardCycle"):this._focus(t,1)}focusPrevious(){const t=this.previous;t&&this.focusables.getIndex(t)===this.current||t===this.last?this.fire("backwardCycle"):this._focus(t,-1)}_focus(t,r){t&&this.focusTracker.focusedElement!==t.element&&t.focus(r)}_getDomFocusableItem(t){const r=this.focusables.length;if(!r)return null;const o=this.current;if(o===null)return this[t===1?"first":"last"];let c=this.focusables.get(o),u=(o+r+t)%r;do{const m=this.focusables.get(u);if(py(m)){c=m;break}u=(u+r+t)%r}while(u!==o);return c}}function py(l){return Au(l)&&tl(l.element)}function Au(l){return!(!("focus"in l)||typeof l.focus!="function")}class k4 extends kt{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class Fq extends kt{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}var $q=Object.defineProperty,y4=Object.getOwnPropertySymbols,Vq=Object.prototype.hasOwnProperty,Uq=Object.prototype.propertyIsEnumerable,x4=(l,t,r)=>t in l?$q(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,v4=(l,t)=>{for(var r in t||(t={}))Vq.call(t,r)&&x4(l,r,t[r]);if(y4)for(var r of y4(t))Uq.call(t,r)&&x4(l,r,t[r]);return l};function w4(l){if(Array.isArray(l))return{items:l,removeItems:[]};const t={items:[],removeItems:[]};return l?v4(v4({},t),l):t}var _4=d(9677),Wq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(_4.A,Wq),_4.A.locals;const Hq={alignLeft:At.alignLeft,bold:At.bold,importExport:At.importExport,paragraph:At.paragraph,plus:At.plus,text:At.text,threeVerticalDots:At.threeVerticalDots,pilcrow:At.pilcrow,dragIndicator:At.dragIndicator};class gy extends kt{constructor(t,r){super(t);const o=this.bindTemplate,c=this.t;this.options=r||{},this.set("ariaLabel",c("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new ir,this.keystrokes=new zr,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new Gq(t),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const u=t.uiLanguageDirection==="rtl";
8465this._focusCycler=new Fi({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[u?"arrowright":"arrowleft","arrowup"],focusNext:[u?"arrowleft":"arrowright","arrowdown"]}});const m=["ck","ck-toolbar",o.to("class"),o.if("isCompact","ck-toolbar_compact")];var b;this.options.shouldGroupWhenFull&&this.options.isFloating&&m.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:m,role:"toolbar","aria-label":o.to("ariaLabel"),style:{maxWidth:o.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:(b=this,b.bindTemplate.to(k=>{k.target===b.element&&k.preventDefault()}))}}),this._behavior=this.options.shouldGroupWhenFull?new Kq(this):new qq(this)}render(){super.render(),this.focusTracker.add(this.element);for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",(t,r)=>{this.focusTracker.add(r.element)}),this.items.on("remove",(t,r)=>{this.focusTracker.remove(r.element)}),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(t,r,o){this.items.addMany(this._buildItemsFromConfig(t,r,o))}_buildItemsFromConfig(t,r,o){const c=w4(t),u=o||c.removeItems;return this._cleanItemsConfiguration(c.items,r,u).map(m=>be(m)?this._createNestedToolbarDropdown(m,r,u):m==="|"?new k4:m==="-"?new Fq:r.create(m)).filter(m=>!!m)}_cleanItemsConfiguration(t,r,o){const c=t.filter((u,m,b)=>u==="|"||o.indexOf(u)===-1&&(u==="-"?!this.options.shouldGroupWhenFull||(z("toolbarview-line-break-ignored-when-grouping-items",b),!1):!(!be(u)&&!r.has(u))||(z("toolbarview-item-unavailable",{item:u}),!1)));return this._cleanSeparatorsAndLineBreaks(c)}_cleanSeparatorsAndLineBreaks(t){const r=m=>m!=="-"&&m!=="|",o=t.length,c=t.findIndex(r);if(c===-1)return[];const u=o-t.slice().reverse().findIndex(r);return t.slice(c,u).filter((m,b,k)=>r(m)?!0:!(b>0&&k[b-1]===m))}_createNestedToolbarDropdown(t,r,o){let{label:c,icon:u,items:m,tooltip:b=!0,withText:k=!1}=t;if(m=this._cleanItemsConfiguration(m,r,o),!m.length)return null;const _=ps(this.locale);return c||z("toolbarview-nested-toolbar-dropdown-missing-label",t),_.class="ck-toolbar__nested-toolbar-dropdown",_.buttonView.set({label:c,tooltip:b,withText:!!k}),u!==!1?_.buttonView.icon=Hq[u]||u||At.threeVerticalDots:_.buttonView.withText=!0,yy(_,()=>_.toolbarView._buildItemsFromConfig(m,r,o)),_}}class Gq extends kt{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class qq{constructor(t){const r=t.bindTemplate;t.set("isVertical",!1),t.itemsView.children.bindTo(t.items).using(o=>o),t.focusables.bindTo(t.items).using(o=>Au(o)?o:null),t.extendTemplate({attributes:{class:[r.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class Kq{constructor(t){this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,this.view=t,this.viewChildren=t.children,this.viewFocusables=t.focusables,this.viewItemsView=t.itemsView,this.viewFocusTracker=t.focusTracker,this.viewLocale=t.locale,this.ungroupedItems=t.createCollection(),this.groupedItems=t.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),t.itemsView.children.bindTo(this.ungroupedItems).using(r=>r),this.ungroupedItems.on("change",this._updateFocusCyclableItems.bind(this)),t.children.on("change",this._updateFocusCyclableItems.bind(this)),t.items.on("change",(r,o)=>{const c=o.index,u=Array.from(o.added);for(const m of o.removed)c>=this.ungroupedItems.length?this.groupedItems.remove(m):this.ungroupedItems.remove(m);for(let m=c;m<c+u.length;m++){const b=u[m-c];m>this.ungroupedItems.length?this.groupedItems.add(b,m-this.ungroupedItems.length):this.ungroupedItems.add(b,m)}this._updateGrouping()}),t.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(t){this.viewElement=t.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(t)}
8465destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!tl(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const t=this.groupedItems.length;let r;for(;this._areItemsOverflowing;)this._groupLastItem(),r=!0;if(!r&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==t&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const t=this.viewElement,r=this.viewLocale.uiLanguageDirection,o=new Tt(t.lastChild),c=new Tt(t);if(!this.cachedPadding){const u=g.window.getComputedStyle(t),m=r==="ltr"?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(u[m])}return r==="ltr"?o.right>c.right-this.cachedPadding:o.left<c.left+this.cachedPadding}_enableGroupingOnResize(){let t;this.resizeObserver=new ou(this.viewElement,r=>{t&&t===r.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),t=r.contentRect.width)}),this._updateGrouping()}_enableGroupingOnMaxWidthChange(t){t.on("change:maxWidth",()=>{this._updateGrouping()})}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new k4),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 t=this.viewLocale,r=t.t,o=ps(t);return o.class="ck-toolbar__grouped-dropdown",o.panelPosition=t.uiLanguageDirection==="ltr"?"sw":"se",yy(o,this.groupedItems),o.buttonView.set({label:r("Show more items"),tooltip:!0,tooltipPosition:t.uiLanguageDirection==="rtl"?"se":"sw",icon:At.threeVerticalDots}),o}_updateFocusCyclableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(t=>{Au(t)&&this.viewFocusables.add(t)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}class Sc extends kt{constructor(t){super(t);const r=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",r.if("isVisible","ck-hidden",o=>!o)],role:"presentation"},children:this.children})}focus(){this.children.first&&this.children.first.focus()}}class by extends kt{constructor(t){super(t),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}class Cf extends kt{constructor(t,r=new vf){super(t);const o=this.bindTemplate,c=new ky(t);this.set({label:"",isVisible:!0}),this.labelView=r,this.labelView.bind("text").to(this,"label"),this.children=this.createCollection(),this.children.addMany([this.labelView,c]),c.set({role:"group",ariaLabelledBy:r.id}),c.focusTracker.destroy(),c.keystrokes.destroy(),this.items=c.items,this.setTemplate({tag:"li",attributes:{role:"presentation",class:["ck","ck-list__group",o.if("isVisible","ck-hidden",u=>!u)]},children:this.children})}focus(){if(this.items){const t=this.items.find(r=>!(r instanceof by));t&&t.focus()}}}var A4=d(5199),Yq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(A4.A,Yq),A4.A.locals;class ky extends kt{constructor(t){super(t),this._listItemGroupToChangeListeners=new WeakMap;const r=this.bindTemplate;this.focusables=new Ri,this.items=this.createCollection(),this.focusTracker=new ir,this.keystrokes=new zr,this._focusCycler=new Fi({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:r.to("role"),"aria-label":r.to("ariaLabel"),"aria-labelledby":r.to("ariaLabelledBy")},children:this.items})}render(){super.render();for(const t of this.items)t instanceof Cf?this._registerFocusableItemsGroup(t):t instanceof Sc&&this._registerFocusableListItem(t);this.items.on("change",(t,r)=>{for(const o of r.removed)o instanceof Cf?this._deregisterFocusableItemsGroup(o):o instanceof Sc&&this._deregisterFocusableListItem(o);for(const o of Array.from(r.added).reverse())o instanceof Cf?this._registerFocusableItemsGroup(o,r.index):this._registerFocusableListItem(o,r.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(t,r){this.focusTracker.add(t.element),this.focusables.add(t,r)}_deregisterFocusableListItem(t){this.focusTracker.remove(t.element),this.focusables.remove(t)}_getOnGroupItemsChangeCallback(t){return(r,o)=>{for(const c of o.removed)this._deregisterFocusableListItem(c);for(const c of Array.from(o.added).reverse())this._registerFocusableListItem(c,this.items.getIndex(t)+o.index)}}
8465_registerFocusableItemsGroup(t,r){Array.from(t.items).forEach((c,u)=>{const m=r!==void 0?r+u:void 0;this._registerFocusableListItem(c,m)});const o=this._getOnGroupItemsChangeCallback(t);this._listItemGroupToChangeListeners.set(t,o),t.items.on("change",o)}_deregisterFocusableItemsGroup(t){for(const r of t.items)this._deregisterFocusableListItem(r);t.items.off("change",this._listItemGroupToChangeListeners.get(t)),this._listItemGroupToChangeListeners.delete(t)}}var C4=d(1792),Qq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(C4.A,Qq),C4.A.locals;class jf extends kt{constructor(t,r){super(t);const o=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(r),this.arrowView=this._createArrowView(),this.keystrokes=new zr,this.focusTracker=new ir,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",o.to("class"),o.if("isVisible","ck-hidden",c=>!c),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",(t,r)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),r())}),this.keystrokes.set("arrowleft",(t,r)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),r())})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(t){const r=t||new Rt;return t||r.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),r.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),r.delegate("execute").to(this),r}_createArrowView(){const t=new Rt,r=t.bindTemplate;return t.icon=_f,t.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":r.to("isOn"),"aria-haspopup":!0,"aria-expanded":r.to("isOn",o=>String(o))}}),t.bind("isEnabled").to(this),t.bind("label").to(this),t.bind("tooltip").to(this),t.delegate("execute").to(this,"open"),t}}var j4=d(1666),Zq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(j4.A,Zq),j4.A.locals;var N4=d(3629),Jq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(N4.A,Jq),N4.A.locals;function ps(l,t=zq){const r=typeof t=="function"?new t(l):t,o=new Lq(l),c=new fy(l,r,o);return r.bind("isEnabled").to(c),r instanceof jf?r.arrowView.bind("isOn").to(c,"isOpen"):r.bind("isOn").to(c,"isOpen"),function(u){(function(m){m.on("render",()=>{ef({emitter:m,activator:()=>m.isOpen,callback:()=>{m.isOpen=!1},contextElements:()=>[m.element,...m.focusTracker._elements]})})})(u),function(m){m.on("execute",b=>{b.source instanceof wf||(m.isOpen=!1)})}(u),function(m){m.focusTracker.on("change:isFocused",(b,k,_)=>{m.isOpen&&!_&&(m.isOpen=!1)})}(u),function(m){m.keystrokes.set("arrowdown",(b,k)=>{m.isOpen&&(m.panelView.focus(),k())}),m.keystrokes.set("arrowup",(b,k)=>{m.isOpen&&(m.panelView.focusLast(),k())})}(u),function(m){m.on("change:isOpen",(b,k,_)=>{if(_)return;const A=m.panelView.element;A&&A.contains(g.document.activeElement)&&m.buttonView.focus()})}(u),function(m){m.on("change:isOpen",(b,k,_)=>{_&&m.panelView.focus()},{priority:"low"})}(u)}(c),c}function yy(l,t,r={}){l.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),l.isOpen?E4(l,t,r):l.once("change:isOpen",()=>E4(l,t,r),{priority:"highest"}),r.enableActiveItemFocusOnDropdownOpen&&T4(l,()=>l.toolbarView.items.find(o=>o.isOn))}function E4(l,t,r){const o=l.locale,c=o.t,u=l.toolbarView=new gy(o),m=typeof t=="function"?t():t;u.ariaLabel=r.ariaLabel||c("Dropdown toolbar"),r.maxWidth&&(u.maxWidth=r.maxWidth),r.class&&(u.class=r.class),r.isCompact&&(u.isCompact=r.
8465isCompact),r.isVertical&&(u.isVertical=!0),m instanceof Ri?u.items.bindTo(m).using(b=>b):u.items.addMany(m),l.panelView.children.add(u),u.items.delegate("execute").to(l)}function S4(l,t,r={}){l.isOpen?D4(l,t,r):l.once("change:isOpen",()=>D4(l,t,r),{priority:"highest"}),T4(l,()=>l.listView.items.find(o=>o instanceof Sc&&o.children.first.isOn))}function D4(l,t,r){const o=l.locale,c=l.listView=new ky(o),u=typeof t=="function"?t():t;c.ariaLabel=r.ariaLabel,c.role=r.role,I4(l,c.items,u,o),l.panelView.children.add(c),c.items.delegate("execute").to(l)}function T4(l,t){l.on("change:isOpen",()=>{if(!l.isOpen)return;const r=t();r&&(typeof r.focus=="function"?r.focus():z("ui-dropdown-focus-child-on-open-child-missing-focus",{view:r}))},{priority:R.low-10})}function I4(l,t,r,o){t.bindTo(r).using(c=>{if(c.type==="separator")return new by(o);if(c.type==="group"){const u=new Cf(o);return u.set({label:c.label}),I4(l,u.items,c.items,o),u.items.delegate("execute").to(l),u}if(c.type==="button"||c.type==="switchbutton"){const u=new Sc(o);let m;return c.type==="button"?(m=new Rt(o),m.bind("ariaChecked").to(m,"isOn")):m=new wf(o),m.bind(...Object.keys(c.model)).to(c.model),m.delegate("execute").to(u),u.children.add(m),u}return null})}const Nf=(l,t,r)=>{const o=new Oq(l.locale);return o.set({id:t,ariaDescribedById:r}),o.bind("isReadOnly").to(l,"isEnabled",c=>!c),o.bind("hasError").to(l,"errorText",c=>!!c),o.on("input",()=>{l.errorText=null}),l.bind("isEmpty","isFocused","placeholder").to(o),o};var M4=d(1905),Xq={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(M4.A,Xq),M4.A.locals;var P4=d(6309),eK={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(P4.A,eK),P4.A.locals;class tK{constructor(t){this._components=new Map,this.editor=t}*names(){for(const t of this._components.values())yield t.originalName}add(t,r){this._components.set(xy(t),{callback:r,originalName:t})}create(t){if(!this.has(t))throw new P("componentfactory-item-missing",this,{name:t});return this._components.get(xy(t)).callback(this.editor.locale)}has(t){return this._components.has(xy(t))}}function xy(l){return String(l).toLowerCase()}var O4=d(7913),nK={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(O4.A,nK),O4.A.locals;class rK extends kt{constructor(t,r={}){super(t);const o=this.bindTemplate;this.set("label",r.label||""),this.set("class",r.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",o.to("class")]},children:this.children}),r.icon&&(this.iconView=new fs,this.iconView.content=r.icon,this.children.add(this.iconView));const c=new kt(t);c.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"],role:"presentation"},children:[{text:o.to("label")}]}),this.children.add(c)}}var B4=d(9822),iK={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(B4.A,iK),B4.A.locals;class oK extends kt{constructor(t){super(t),this.children=this.createCollection(),this.keystrokes=new zr,this._focusTracker=new ir,this._focusables=new Ri,this.focusCycler=new Fi({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(t){for(const r of t){const o=new Rt(this.locale);let c;for(c in o.on("execute",()=>r.onExecute()),r.onCreate&&r.onCreate(o),r)c!="onExecute"&&c!="onCreate"&&o.set(c,r[c]);this.children.add(o)}this._updateFocusCyclableItems()}focus(t){t===-1?this.focusCycler.focusLast():this.focusCycler.focusFirst()}_updateFocusCyclableItems(){Array.from(this.children).forEach(t=>{this._focusables.add(t),this._focusTracker.add(t.element)})}}class sK extends kt{constructor(t){super(t),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)}}var L4=d(9819),aK={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(L4.A,aK),L4.A.locals;const Ef="screen-center",R4="editor-center",lK="editor-top-side",cK="editor-top-center",dK="editor-bottom-center",uK="editor-above-center",hK="editor-below-center",z4=bc("px"),F4=class extends function(l){return class extends l{constructor(...t){super(...t),this._onDragBound=this._onDrag.bind(this),this._onDragEndBound=this._onDragEnd.bind(this),this._lastDraggingCoordinates={x:0,y:0},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(g.document,"mouseup",this._onDragEndBound),this.listenTo(g.document,"touchend",this._onDragEndBound),this.listenTo(g.document,"mousemove",this._onDragBound),this.listenTo(g.document,"touchmove",this._onDragBound)}_detachDragListeners(){this.stopListening(g.document,"mouseup",this._onDragEndBound),this.stopListening(g.document,"touchend",this._onDragEndBound),this.stopListening(g.document,"mousemove",this._onDragBound),this.stopListening(g.document,"touchmove",this._onDragBound)}_onDragStart(t,r){if(!this._isHandleElementPressed(r))return;this._attachDragListeners();let o=0,c=0;r instanceof MouseEvent?(o=r.clientX,c=r.clientY):(o=r.touches[0].clientX,c=r.touches[0].clientY),this._lastDraggingCoordinates={x:o,y:c},this.isDragging=!0}_onDrag(t,r){if(!this.isDragging)return void this._detachDragListeners();let o=0,c=0;r instanceof MouseEvent?(o=r.clientX,c=r.clientY):(o=r.touches[0].clientX,c=r.touches[0].clientY),r.preventDefault(),this.fire("drag",{deltaX:Math.round(o-this._lastDraggingCoordinates.x),deltaY:Math.round(c-this._lastDraggingCoordinates.y)}),this._lastDraggingCoordinates={x:o,y:c}}_onDragEnd(){this._detachDragListeners(),this.isDragging=!1}_isHandleElementPressed(t){return!!this.dragHandleElement&&(this.dragHandleElement===t.target||t.target instanceof HTMLElement&&this.dragHandleElement.contains(t.target))}}}(kt){constructor(l,{getCurrentDomRoot:t,getViewportOffset:r}){super(l),this.wasMoved=!1;const o=this.bindTemplate,c=l.t;this.set("className",""),this.set("ariaLabel",c("Editor dialog")),this.set("isModal",!1),this.set("position",Ef),this.set("_isVisible",!1),this.set("_isTransparent",!1),this.set("_top",0),this.set("_left",0),this._getCurrentDomRoot=t,this._getViewportOffset=r,this.decorate("moveTo"),this.parts=this.createCollection(),this.keystrokes=new zr,this.focusTracker=new ir,this._focusables=new Ri,this._focusCycler=new Fi({focu
8465sables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog-overlay",o.if("isModal","ck-dialog-overlay__transparent",u=>!u),o.if("_isVisible","ck-hidden",u=>!u)],tabindex:"-1"},children:[{tag:"div",attributes:{tabindex:"-1",class:["ck","ck-dialog",o.to("className")],role:"dialog","aria-label":o.to("ariaLabel"),style:{top:o.to("_top",u=>z4(u)),left:o.to("_left",u=>z4(u)),visibility:o.if("_isTransparent","hidden")}},children:this.parts}]})}render(){super.render(),this.keystrokes.set("Esc",(l,t)=>{this.fire("close",{source:"escKeyPress"}),t()}),this.on("drag",(l,{deltaX:t,deltaY:r})=>{this.wasMoved=!0,this.moveBy(t,r)}),this.listenTo(g.window,"resize",()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()}),this.listenTo(g.document,"scroll",()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()}),this.on("change:_isVisible",(l,t,r)=>{r&&(this._isTransparent=!0,setTimeout(()=>{this.updatePosition(),this._isTransparent=!1,this.focus()},10))}),this.keystrokes.listenTo(this.element)}get dragHandleElement(){return this.headerView?this.headerView.element:null}setupParts({icon:l,title:t,hasCloseButton:r=!0,content:o,actionButtons:c}){t&&(this.headerView=new rK(this.locale,{icon:l}),r&&(this.closeButtonView=this._createCloseButton(),this.headerView.children.add(this.closeButtonView)),this.headerView.label=t,this.ariaLabel=t,this.parts.add(this.headerView,0)),o&&(o instanceof kt&&(o=[o]),this.contentView=new sK(this.locale),this.contentView.children.addMany(o),this.parts.add(this.contentView)),c&&(this.actionsView=new oK(this.locale),this.actionsView.setButtons(c),this.parts.add(this.actionsView)),this._updateFocusCyclableItems()}focus(){this._focusCycler.focusFirst()}moveTo(l,t){const r=this._getViewportRect(),o=this._getDialogRect();l+o.width>r.right&&(l=r.right-o.width),l<r.left&&(l=r.left),t<r.top&&(t=r.top),this._moveTo(l,t)}_moveTo(l,t){this._left=l,this._top=t}moveBy(l,t){this.moveTo(this._left+l,this._top+t)}_moveOffScreen(){this._moveTo(-9999,-9999)}updatePosition(){if(!this.element||!this.element.parentNode)return;const l=this._getViewportRect();let t,r=this.position;this._getCurrentDomRoot()?t=this._getVisibleDomRootRect(l):r=Ef;const o=F4.defaultOffset,c=this._getDialogRect();switch(r){case lK:if(t){const u=this.locale.contentLanguageDirection==="ltr"?t.right-c.width-o:t.left+o;this.moveTo(u,t.top+o)}else this._moveOffScreen();break;case R4:t?this.moveTo(Math.round(t.left+t.width/2-c.width/2),Math.round(t.top+t.height/2-c.height/2)):this._moveOffScreen();break;case Ef:this.moveTo(Math.round((l.width-c.width)/2),Math.round((l.height-c.height)/2));break;case cK:t?this.moveTo(Math.round(t.left+t.width/2-c.width/2),t.top+o):this._moveOffScreen();break;case dK:t?this.moveTo(Math.round(t.left+t.width/2-c.width/2),t.bottom-c.height-o):this._moveOffScreen();break;case uK:t?this.moveTo(Math.round(t.left+t.width/2-c.width/2),t.top-c.height-o):this._moveOffScreen();break;case hK:t?this.moveTo(Math.round(t.left+t.width/2-c.width/2),t.bottom+o):this._moveOffScreen()}}_getVisibleDomRootRect(l){let t=new Tt(this._getCurrentDomRoot()).getVisible();return t?(t=l.getIntersection(t),t||null):null}_getDialogRect(){return new Tt(this.element.firstElementChild)}_getViewportRect(){return function(l){l=Object.assign({top:0,bottom:0,left:0,right:0},l);const t=new Tt(g.window);return t.top+=l.top,t.height-=l.top,t.bottom-=l.bottom,t.height-=l.bottom,t.left+=l.left,t.right-=l.right,t.width-=l.left+l.right,t}(this._getViewportOffset())}_updateFocusCyclableItems(){const l=[];if(this.contentView)for(const t of this.contentView.children)Au(t)&&l.push(t);this.actionsView&&l.push(this.actionsView),this.closeButtonView&&l.push(this.closeButtonView),l.forEach(t=>{var r;this._focusables.add(t),this.focusTracker.add(t.element),Au(r=t)&&"focusCycler"in r&&r.focusCycler instanceof Fi&&(this.listenTo(t.focusCycler,"forwardCycle",o=>{this._focusCycler.focusNext(),this._focusCycler.next!==this._focusCycler.focusables.get(this._focusCycler.current)&&o.stop()}),this.listenTo(t.focusCycler,"backwardCycle",o=>{this._focusCycler.focusPrevious(),this._focusCycler.previous!==this._focusCycler.focusables.get(this._focusCycler.current)&&o.stop()}))})}_createCloseButton(){const l=new Rt(this.locale),t=this.locale.t;return l.set({label:t("Close"),tooltip:!0,icon:At.cancel}),l.on("execute",()=>this.fire("close",{source:"closeButton"})),l}};let Sf=F4;Sf.defaultOffset=15;class gs extends Pe{constructor(t){super(t);const r=t.t;this._initShowHideListeners(),this._initFocusToggler(),this._initMultiRootIntegration(),this.set("id",null),t.accessibility.addKeystrokeInfos({categoryId:"navigation",keystrokes:[{label:r("Move focus in and out of an active dialog window"),keystroke:"Ctrl+F6",mayRequireFn:!0}]})}static get pluginName(){return"Dialog"}_initShowHideListeners(){this.on("show",(t,r)=>{this._show(r)}
8465),this.on("show",(t,r)=>{r.onShow&&r.onShow(this)},{priority:"low"}),this.on("hide",()=>{gs._visibleDialogPlugin&&gs._visibleDialogPlugin._hide()}),this.on("hide",()=>{this._onHide&&(this._onHide(this),this._onHide=void 0)},{priority:"low"})}_initFocusToggler(){const t=this.editor;t.keystrokes.set("Ctrl+F6",(r,o)=>{this.isOpen&&!this.view.isModal&&(this.view.focusTracker.isFocused?t.editing.view.focus():this.view.focus(),o())})}_initMultiRootIntegration(){const t=this.editor.model;t.document.on("change:data",()=>{if(!this.view)return;const r=t.document.differ.getChangedRoots();for(const o of r)o.state&&this.view.updatePosition()})}show(t){this.hide(),this.fire(`show:${t.id}`,t)}_show({id:t,icon:r,title:o,hasCloseButton:c=!0,content:u,actionButtons:m,className:b,isModal:k,position:_,onHide:A}){const N=this.editor;this.view=new Sf(N.locale,{getCurrentDomRoot:()=>N.editing.view.getDomRoot(N.model.document.selection.anchor.root.rootName),getViewportOffset:()=>N.ui.viewportOffset});const T=this.view;T.on("close",()=>{this.hide()}),N.ui.view.body.add(T),N.ui.focusTracker.add(T.element),N.keystrokes.listenTo(T.element),_||(_=k?Ef:R4),T.set({position:_,_isVisible:!0,className:b,isModal:k}),T.setupParts({icon:r,title:o,hasCloseButton:c,content:u,actionButtons:m}),this.id=t,A&&(this._onHide=A),this.isOpen=!0,gs._visibleDialogPlugin=this}hide(){gs._visibleDialogPlugin&&gs._visibleDialogPlugin.fire(`hide:${gs._visibleDialogPlugin.id}`)}_hide(){if(!this.view)return;const t=this.editor,r=this.view;r.contentView&&r.contentView.reset(),t.ui.view.body.remove(r),t.ui.focusTracker.remove(r.element),t.keystrokes.stopListening(r.element),r.destroy(),t.editing.view.focus(),this.id=null,this.isOpen=!1,gs._visibleDialogPlugin=null}}var $4=d(3710),mK={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()($4.A,mK),$4.A.locals;var fK=Object.defineProperty,V4=Object.getOwnPropertySymbols,pK=Object.prototype.hasOwnProperty,gK=Object.prototype.propertyIsEnumerable,U4=(l,t,r)=>t in l?fK(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,zt=(l,t)=>{for(var r in t||(t={}))pK.call(t,r)&&U4(l,r,t[r]);if(V4)for(var r of V4(t))gK.call(t,r)&&U4(l,r,t[r]);return l};const W4=bc("px"),H4=g.document.body,bK={top:-99999,left:-99999,name:"arrowless",config:{withArrow:!1}},vy=class extends kt{constructor(l){super(l);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.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",r=>`ck-balloon-panel_${r}`),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",W4),left:t.to("left",W4)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(l){this.show();const t=vy.defaultPositions,r=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:H4,fitInViewport:!0},l),o=vy._getOptimalPosition(r)||bK,c=parseInt(o.left),u=parseInt(o.top),m=o.name,b=o.config||{},{withArrow:k=!0}=b;this.top=u,this.left=c,this.position=m,this.withArrow=k}pin(l){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(l):this._stopPinning()},this._startPinning(l),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(l){this.attachTo(l);const t=wy(l.target),r=l.limiter?wy(l.limiter):H4;this.listenTo(g.document,"scroll",(o,c)=>{const u=c.target,m=t&&u.contains(t),b=r&&u.contains(r);!m&&!b&&t&&r||this.attachTo(l)},{useCapture:!0}),this.listenTo(g.window,"resize",()=>{this.attachTo(l)})}_stopPinning(){this.stopListening(g.document,"scroll"),this.stopListening(g.window,"resize")}};let Jr=vy;function wy(l){return el(l)?l:Km(l)?l.commonAncestorContainer:typeof l=="function"?wy(l()):null}function G4(l={}){const{sideOffset:t=Jr.arrowSideOffset,heightOffset:r=Jr.arrowHeightOffset,stickyVerticalOffset:o=Jr.stickyVerticalOffset,config:c}=l;return{northWestArrowSouthWest:(b,k)=>zt({top:u(b,k),left:b.left-t,name:"arrow_sw"},c&&{config:c}
8465),northWestArrowSouthMiddleWest:(b,k)=>zt({top:u(b,k),left:b.left-.25*k.width-t,name:"arrow_smw"},c&&{config:c}),northWestArrowSouth:(b,k)=>zt({top:u(b,k),left:b.left-k.width/2,name:"arrow_s"},c&&{config:c}),northWestArrowSouthMiddleEast:(b,k)=>zt({top:u(b,k),left:b.left-.75*k.width+t,name:"arrow_sme"},c&&{config:c}),northWestArrowSouthEast:(b,k)=>zt({top:u(b,k),left:b.left-k.width+t,name:"arrow_se"},c&&{config:c}),northArrowSouthWest:(b,k)=>zt({top:u(b,k),left:b.left+b.width/2-t,name:"arrow_sw"},c&&{config:c}),northArrowSouthMiddleWest:(b,k)=>zt({top:u(b,k),left:b.left+b.width/2-.25*k.width-t,name:"arrow_smw"},c&&{config:c}),northArrowSouth:(b,k)=>zt({top:u(b,k),left:b.left+b.width/2-k.width/2,name:"arrow_s"},c&&{config:c}),northArrowSouthMiddleEast:(b,k)=>zt({top:u(b,k),left:b.left+b.width/2-.75*k.width+t,name:"arrow_sme"},c&&{config:c}),northArrowSouthEast:(b,k)=>zt({top:u(b,k),left:b.left+b.width/2-k.width+t,name:"arrow_se"},c&&{config:c}),northEastArrowSouthWest:(b,k)=>zt({top:u(b,k),left:b.right-t,name:"arrow_sw"},c&&{config:c}),northEastArrowSouthMiddleWest:(b,k)=>zt({top:u(b,k),left:b.right-.25*k.width-t,name:"arrow_smw"},c&&{config:c}),northEastArrowSouth:(b,k)=>zt({top:u(b,k),left:b.right-k.width/2,name:"arrow_s"},c&&{config:c}),northEastArrowSouthMiddleEast:(b,k)=>zt({top:u(b,k),left:b.right-.75*k.width+t,name:"arrow_sme"},c&&{config:c}),northEastArrowSouthEast:(b,k)=>zt({top:u(b,k),left:b.right-k.width+t,name:"arrow_se"},c&&{config:c}),southWestArrowNorthWest:b=>zt({top:m(b),left:b.left-t,name:"arrow_nw"},c&&{config:c}),southWestArrowNorthMiddleWest:(b,k)=>zt({top:m(b),left:b.left-.25*k.width-t,name:"arrow_nmw"},c&&{config:c}),southWestArrowNorth:(b,k)=>zt({top:m(b),left:b.left-k.width/2,name:"arrow_n"},c&&{config:c}),southWestArrowNorthMiddleEast:(b,k)=>zt({top:m(b),left:b.left-.75*k.width+t,name:"arrow_nme"},c&&{config:c}),southWestArrowNorthEast:(b,k)=>zt({top:m(b),left:b.left-k.width+t,name:"arrow_ne"},c&&{config:c}),southArrowNorthWest:b=>zt({top:m(b),left:b.left+b.width/2-t,name:"arrow_nw"},c&&{config:c}),southArrowNorthMiddleWest:(b,k)=>zt({top:m(b),left:b.left+b.width/2-.25*k.width-t,name:"arrow_nmw"},c&&{config:c}),southArrowNorth:(b,k)=>zt({top:m(b),left:b.left+b.width/2-k.width/2,name:"arrow_n"},c&&{config:c}),southArrowNorthMiddleEast:(b,k)=>zt({top:m(b),left:b.left+b.width/2-.75*k.width+t,name:"arrow_nme"},c&&{config:c}),southArrowNorthEast:(b,k)=>zt({top:m(b),left:b.left+b.width/2-k.width+t,name:"arrow_ne"},c&&{config:c}),southEastArrowNorthWest:b=>zt({top:m(b),left:b.right-t,name:"arrow_nw"},c&&{config:c}),southEastArrowNorthMiddleWest:(b,k)=>zt({top:m(b),left:b.right-.25*k.width-t,name:"arrow_nmw"},c&&{config:c}),southEastArrowNorth:(b,k)=>zt({top:m(b),left:b.right-k.width/2,name:"arrow_n"},c&&{config:c}),southEastArrowNorthMiddleEast:(b,k)=>zt({top:m(b),left:b.right-.75*k.width+t,name:"arrow_nme"},c&&{config:c}),southEastArrowNorthEast:(b,k)=>zt({top:m(b),left:b.right-k.width+t,name:"arrow_ne"},c&&{config:c}),westArrowEast:(b,k)=>zt({top:b.top+b.height/2-k.height/2,left:b.left-k.width-r,name:"arrow_e"},c&&{config:c}),eastArrowWest:(b,k)=>zt({top:b.top+b.height/2-k.height/2,left:b.right+r,name:"arrow_w"},c&&{config:c}),viewportStickyNorth:(b,k,_,A)=>{const N=A||_;return b.getIntersection(N)?N.height-b.height>o?null:{top:N.top+o,left:b.left+b.width/2-k.width/2,name:"arrowless",config:zt({withArrow:!1},c)}:null}};function u(b,k){return b.top-k.height-r}function m(b){return b.bottom+r}}Jr.arrowSideOffset=25,Jr.arrowHeightOffset=10,Jr.stickyVerticalOffset=20,Jr._getOptimalPosition=Qm,Jr.defaultPositions=G4();var q4=d(9205),kK={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(q4.A,kK),q4.A.locals;const K4="ck-tooltip",Xr=class extends Li(){constructor(l){if(super(),this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver=null,this._mutationObserver=null,Xr._editors.add(l),Xr._instance)return Xr._instance;Xr._instance=this,this.tooltipTextView=new kt(l.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 Jr(l.locale),this.balloonPanelView.class=K4,this.balloonPanelView.content.add(this.tooltipTextView),this._mutationObserver=function(t){const r=new MutationObserver(()=>{t()});return{attach(o){r.observe(o,{attributes:!0,attributeFilter:["data-cke-tooltip-text","data-cke-tooltip-position"]})},detach(){r.disconnect()}}}(()=>{this._updateTooltipPosition()}),this._pinTooltipDebounced=Cc(this._pinTooltip,600),this._unpinTooltipDebounced=Cc(this._unpinTooltip,400),this.listenTo(g.document,"keydown",this._onKeyDown.bind(this),{useCapture:!0}),this.listenTo(g.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(g.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(g.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(g.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(g.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(l){const t=l.ui.view&&l.ui.view.body;Xr._editors.delete(l),this.stopListening(l.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),Xr._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),Xr._instance=null)}static getPositioningFunctions(l){const t=Xr.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[l]}
8465_onKeyDown(l,t){t.key==="Escape"&&this._currentElementWithTooltip&&(this._unpinTooltip(),t.stopPropagation())}_onEnterOrFocus(l,{target:t}){const r=_y(t);r?r!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(r,Y4(r))):l.name==="focus"&&this._unpinTooltip()}_onLeaveOrBlur(l,{target:t,relatedTarget:r}){if(l.name==="mouseleave"){if(!el(t))return;const o=this.balloonPanelView.element,c=o&&(o===r||o.contains(r)),u=!c&&t===o;if(c)return void this._unpinTooltipDebounced.cancel();if(!u&&this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const m=_y(t),b=_y(r);(u||m&&m!==b)&&this._unpinTooltipDebounced()}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._unpinTooltipDebounced()}}_onScroll(l,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(l,{text:t,position:r,cssClass:o}){this._unpinTooltip();const c=rr(Xr._editors.values()).ui.view.body;c.has(this.balloonPanelView)||c.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.pin({target:l,positions:Xr.getPositioningFunctions(r)}),this._resizeObserver=new ou(l,()=>{tl(l)||this._unpinTooltip()}),this._mutationObserver.attach(l),this.balloonPanelView.class=[K4,o].filter(u=>u).join(" ");for(const u of Xr._editors)this.listenTo(u.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=l,this._currentTooltipPosition=r}_unpinTooltip(){this._unpinTooltipDebounced.cancel(),this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const l of Xr._editors)this.stopListening(l.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this.tooltipTextView.text="",this._resizeObserver&&this._resizeObserver.destroy(),this._mutationObserver.detach()}_updateTooltipPosition(){if(!this._currentElementWithTooltip)return;const l=Y4(this._currentElementWithTooltip);tl(this._currentElementWithTooltip)&&l.text?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:Xr.getPositioningFunctions(l.position)}):this._unpinTooltip()}};let Df=Xr;function _y(l){return el(l)?l.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}function Y4(l){return{text:l.dataset.ckeTooltipText,position:l.dataset.ckeTooltipPosition||"s",cssClass:l.dataset.ckeTooltipClass||""}}Df.defaultBalloonPositions=G4({heightOffset:5,sideOffset:13}),Df._editors=new Set,Df._instance=null;const Tf=function(l,t,r){var o=!0,c=!0;if(typeof l!="function")throw new TypeError("Expected a function");return be(r)&&(o="leading"in r?!!r.leading:o,c="trailing"in r?!!r.trailing:c),Cc(l,t,{leading:o,maxWait:t,trailing:c})};var yK=Object.defineProperty,Q4=Object.getOwnPropertySymbols,xK=Object.prototype.hasOwnProperty,vK=Object.prototype.propertyIsEnumerable,Z4=(l,t,r)=>t in l?yK(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,wK=(l,t)=>{for(var r in t||(t={}))xK.call(t,r)&&Z4(l,r,t[r]);if(Q4)for(var r of Q4(t))vK.call(t,r)&&Z4(l,r,t[r]);return l};const _K=50,AK=350,CK="Powered by";class jK extends Li(){constructor(t){super(),this.editor=t,this._balloonView=null,this._lastFocusedEditableElement=null,this._showBalloonThrottled=Tf(this._showBalloon.bind(this),50,{leading:!0}),t.on("ready",this._handleEditorReady.bind(this))}destroy(){const t=this._balloonView;t&&(t.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const t=this.editor;(t.config.get("ui.poweredBy.forceVisible")||function(r){function o(O){return O.length>=40&&O.length<=255?"VALID":"INVALID"}if(!r)return"INVALID";let c="";try{c=atob(r)}catch{return"INVALID"}const u=c.split("-"),m=u[0],b=u[1];if(!b)return o(r);try{atob(b)}catch{try{if(atob(m),!atob(m).length)return o(r)}catch{return o(r)}}if(m.length<40||m.length>255)return"INVALID";let k="";try{atob(m),k=atob(b)}catch{return"INVALID"}if(k.length!==8)return"INVALID";const _=Number(k.substring(0,4)),A=Number(k.substring(4,6))-1,N=Number(k.substring(6,8)),T=new Date(_,A,N);return T<se||isNaN(Number(T))?"INVALID":"VALID"}(t.config.get("licenseKey"))!=="VALID")&&t.ui.view&&(t.ui.focusTracker.on("change:isFocused",(r,o,c)=>{this._updateLastFocusedEditableElement(),c?this._showBalloon():this._hideBalloon()}),t.ui.focusTracker.on("change:focusedElement",(r,o,c)=>{this._updateLastFocusedEditableElement(),c&&this._showBalloon()}),t.ui.on("update",()=>{this._showBalloonThrottled()}))}_createBalloonView(){const t=this.editor,r=this._balloonView=new Jr,o=X4(t),c=new NK(t.locale,o.label);r.content.add(c),r.set({class:"ck-powered-by-balloon"}),t.ui.view.body.add(r),t.ui.focusTracker.add(r.element),this._balloonView=r}_showBalloon(){if(!this._lastFocusedEditableElement)return;const t=function(r,o){const c=X4(r),u=c.side==="right"?function(m,b){return J4(m,b,(k,_)=>k.left+k.width-_.width-b.horizontalOffset)}(o,c):function(m,b){return J4(m,b,k=>k.left+b.horizontalOffset)}(o,c);return{target:o,positions:[u]}}(this.editor,this._lastFocusedEditableElement);t&&(this._balloonView||this._createBalloonView(),this._balloonView.pin(t))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_updateLastFocusedEditableElement(){const t=this.editor,r=t.ui.focusTracker.isFocused,o=t.ui.focusTracker.focusedElement;if(!r||!o)return void(this._lastFocusedEditableElement=null);const c=Array.from(t.ui.getEditableElementsNames()).map(u=>t.ui.getEditableElement(u));c.includes(o)?this._lastFocusedEditableElement=o:this._lastFocusedEditableElement=c[0]}}class NK extends kt{constructor(t,r){super(t);const o=new fs,c=this.bindTemplate;o.set({content:`
vendor: 5,961 bytes, line 8465
8465<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.77 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>
8465 8466`,isColorInherited:!1}),o.extendTemplate({attributes:{style:{width:"53px",height:"10px"}}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...r?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[r]}]:[],o],on:{dragstart:c.to(u=>u.preventDefault())}}]})}}function J4(l,t,r){return(o,c)=>{const u=new Tt(l);if(u.width<AK||u.height<_K)return null;let m;m=t.position==="inside"?u.bottom-c.height:u.bottom-c.height/2,m-=t.verticalOffset;const b=r(u,c),k=o.clone().moveTo(b,m).getIntersection(c.clone().moveTo(b,m)).getVisible();return!k||k.getArea()<c.getArea()?null:{top:m,left:b,name:`position_${t.position}-side_${t.side}`,config:{withArrow:!1}}}}function X4(l){const t=l.config.get("ui.poweredBy"),r=t&&t.position||"border";return wK({position:r,label:CK,verticalOffset:r==="inside"?5:0,horizontalOffset:5,side:l.locale.contentLanguageDirection==="ltr"?"right":"left"},t)}var eN=d(1801),EK={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(eN.A,EK),eN.A.locals;const tN={POLITE:"polite",ASSERTIVE:"assertive"};class SK{constructor(t){this.editor=t,t.once("ready",()=>{for(const r of Object.values(tN))this.announce("",r)})}announce(t,r=tN.POLITE){const o=this.editor;if(!o.ui.view)return;this.view||(this.view=new DK(o.locale),o.ui.view.body.add(this.view));const{politeness:c,isUnsafeHTML:u}=typeof r=="string"?{politeness:r}:r;let m=this.view.regionViews.find(b=>b.politeness===c);m||(m=new TK(o,c),this.view.regionViews.add(m)),m.announce({announcement:t,isUnsafeHTML:u})}}class DK extends kt{constructor(t){super(t),this.regionViews=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-aria-live-announcer"]},children:this.regionViews})}}class TK extends kt{constructor(t,r){super(t.locale),this.setTemplate({tag:"div",attributes:{role:"region","aria-live":r,"aria-relevant":"additions"},children:[{tag:"ul",attributes:{class:["ck","ck-aria-live-region-list"]}}]}),t.on("destroy",()=>{this._pruneAnnouncementsInterval!==null&&(clearInterval(this._pruneAnnouncementsInterval),this._pruneAnnouncementsInterval=null)}),this.politeness=r,this._domConverter=t.data.htmlProcessor.domConverter,this._pruneAnnouncementsInterval=setInterval(()=>{this.element&&this._listElement.firstChild&&this._listElement.firstChild.remove()},5e3)}announce({announcement:t,isUnsafeHTML:r}){if(!t.trim().length)return;const o=document.createElement("li");r?this._domConverter.setContentOf(o,t):o.innerText=t,this._listElement.appendChild(o)}get _listElement(){return this.element.querySelector("ul")}}var IK=Object.defineProperty,nN=Object.getOwnPropertySymbols,MK=Object.prototype.hasOwnProperty,PK=Object.prototype.propertyIsEnumerable,rN=(l,t,r)=>t in l?IK(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r;class OK extends fe(){constructor(t){super(),this.isReady=!1,this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[];const r=t.editing.view;this.editor=t,this.componentFactory=new tK(t),this.focusTracker=new ir,this.tooltipManager=new Df(t),this.poweredBy=new jK(t),this.ariaLiveAnnouncer=new SK(t),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",()=>{this.isReady=!0}),this.listenTo(r.document,"layoutChanged",this.update.bind(this)),this.listenTo(r,"scrollToTheSelection",this._handleScrollToTheSelection.bind(this)),this._initFocusTracking()}
vendor: 5,116 bytes, line 8466
8466get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy();for(const t of this._editableElementsMap.values())t.ckeditorInstance=null,this.editor.keystrokes.stopListening(t);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(t,r){this._editableElementsMap.set(t,r),r.ckeditorInstance||(r.ckeditorInstance=this.editor),this.focusTracker.add(r);const o=()=>{this.editor.editing.view.getDomRoot(t)||this.editor.keystrokes.listenTo(r)};this.isReady?o():this.once("ready",o)}removeEditableElement(t){const r=this._editableElementsMap.get(t);r&&(this._editableElementsMap.delete(t),this.editor.keystrokes.stopListening(r),this.focusTracker.remove(r),r.ckeditorInstance=null)}getEditableElement(t="main"){return this._editableElementsMap.get(t)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(t,r={}){t.isRendered?(this.focusTracker.add(t.element),this.editor.keystrokes.listenTo(t.element)):t.once("render",()=>{this.focusTracker.add(t.element),this.editor.keystrokes.listenTo(t.element)}),this._focusableToolbarDefinitions.push({toolbarView:t,options:r})}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const t=this.editor,r=t.config.get("ui.viewportOffset");if(r)return r;const o=t.config.get("toolbar.viewportTopOffset");return o?(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:o}):{top:0}}_initFocusTracking(){const t=this.editor,r=t.editing.view;let o,c;t.keystrokes.set("Alt+F10",(u,m)=>{const b=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(b)&&!Array.from(r.domRoots.values()).includes(b)&&(o=b);const k=this._getCurrentFocusedToolbarDefinition();k&&c||(c=this._getFocusableCandidateToolbarDefinitions());for(let _=0;_<c.length;_++){const A=c.shift();if(c.push(A),A!==k&&this._focusFocusableCandidateToolbar(A)){k&&k.options.afterBlur&&k.options.afterBlur();break}}m()}),t.keystrokes.set("Esc",(u,m)=>{const b=this._getCurrentFocusedToolbarDefinition();b&&(o?(o.focus(),o=null):t.editing.view.focus(),b.options.afterBlur&&b.options.afterBlur(),m())})}_getFocusableCandidateToolbarDefinitions(){const t=[];for(const r of this._focusableToolbarDefinitions){const{toolbarView:o,options:c}=r;(tl(o.element)||c.beforeFocus)&&t.push(r)}return t.sort((r,o)=>iN(r)-iN(o)),t}_getCurrentFocusedToolbarDefinition(){for(const t of this._focusableToolbarDefinitions)if(t.toolbarView.element&&t.toolbarView.element.contains(this.focusTracker.focusedElement))return t;return null}_focusFocusableCandidateToolbar(t){const{toolbarView:r,options:{beforeFocus:o}}=t;return o&&o(),!!tl(r.element)&&(r.focus(),!0)}_handleScrollToTheSelection(t,r){const o=((c,u)=>{for(var m in u||(u={}))MK.call(u,m)&&rN(c,m,u[m]);if(nN)for(var m of nN(u))PK.call(u,m)&&rN(c,m,u[m]);return c})({top:0,bottom:0,left:0,right:0},this.viewportOffset);r.viewportOffset.top+=o.top,r.viewportOffset.bottom+=o.bottom,r.viewportOffset.left+=o.left,r.viewportOffset.right+=o.right}}function iN(l){const{toolbarView:t,options:r}=l;let o=10;return tl(t.element)&&o--,r.isContextual&&o--,o}var oN=d(1185),BK={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(oN.A,BK),oN.A.locals;class LK extends kt{constructor(t){super(t),this.body=new wq(t)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class RK extends LK{constructor(t){super(t),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:t.uiLanguageDirection,lang:t.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 t=this.t,r=new vf;return r.text=t("Rich Text Editor"),r.extendTemplate({attributes:{class:"ck-voice-label"}}),r}}class zK extends kt{constructor(t,r,o){super(t),this.name=null,this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:t.contentLanguage,dir:t.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=o,this._hasExternalElement=!!this._editableElement,this._editingView=r}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",()=>
8466this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const t=this._editingView;function r(o){t.change(c=>{const u=t.document.getRoot(o.name);c.addClass(o.isFocused?"ck-focused":"ck-blurred",u),c.removeClass(o.isFocused?"ck-blurred":"ck-focused",u)})}t.isRenderingInProgress?function o(c){t.once("change:isRenderingInProgress",(u,m,b)=>{b?o(c):r(c)})}(this):r(this)}}class FK extends zK{constructor(t,r,o,c={}){super(t,r,o);const u=t.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=c.label||(()=>u("Editor editing area: %0",this.name))}render(){super.render();const t=this._editingView;t.change(r=>{const o=t.document.getRoot(this.name);r.setAttribute("aria-label",this._generateLabel(this),o)})}}class Ay extends nf{static get pluginName(){return"Notification"}init(){this.on("show:warning",(t,r)=>{window.alert(r.message)},{priority:"lowest"})}showSuccess(t,r={}){this._showNotification({message:t,type:"success",namespace:r.namespace,title:r.title})}showInfo(t,r={}){this._showNotification({message:t,type:"info",namespace:r.namespace,title:r.title})}showWarning(t,r={}){this._showNotification({message:t,type:"warning",namespace:r.namespace,title:r.title})}_showNotification(t){const r=t.namespace?`show:${t.type}:${t.namespace}`:`show:${t.type}`;this.fire(r,{message:t.message,type:t.type,title:t.title||""})}}class sN extends fe(){constructor(t,r){super(),r&&I5(this,r),t&&this.set(t)}}var aN=d(991),$K={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(aN.A,$K),aN.A.locals;var lN=d(5380),VK={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(lN.A,VK),lN.A.locals;const If=bc("px");class Mf extends Pe{constructor(t){super(t),this._viewToStack=new Map,this._idToStack=new Map,this._view=null,this._rotatorView=null,this._fakePanelsView=null,this.positionLimiter=()=>{const r=this.editor.editing.view,o=r.document.selection.editableElement;return o?r.domConverter.mapViewToDom(o.root):null},this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}static get pluginName(){return"ContextualBalloon"}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(t){return Array.from(this._viewToStack.keys()).includes(t)}add(t){if(this._view||this._createPanelView(),this.hasView(t.view))throw new P("contextualballoon-add-view-exist",[this,t]);const r=t.stackId||"main";if(!this._idToStack.has(r))return this._idToStack.set(r,new Map([[t.view,t]])),this._viewToStack.set(t.view,this._idToStack.get(r)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!t.singleViewMode||this.showStack(r));const o=this._idToStack.get(r);t.singleViewMode&&this.showStack(r),o.set(t.view,t),this._viewToStack.set(t.view,o),o===this._visibleStack&&this._showView(t)}remove(t){if(!this.hasView(t))throw new P("contextualballoon-remove-view-not-exist",[this,t]);const r=this._viewToStack.get(t);this._singleViewMode&&this.visibleView===t&&(this._singleViewMode=!1),this.visibleView===t&&(r.size===1?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(r.values())[r.size-2])),r.size===1?(this._idToStack.delete(this._getStackId(r)),this._numberOfStacks=this._idToStack.size):r.delete(t),this._viewToStack.delete(t)}updatePosition(t){t&&(this._visibleStack.get(this.visibleView).position=t),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(t){this.visibleStack=t;const r=this._idToStack.get(t);if(!r)throw new P("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==r&&this._showView(Array.from(r.values()).pop())}_createPanelView(){this._view=new Jr(this.editor.locale),this.editor.ui.view.body.add(this._view),this.editor.ui.focusTracker.add(this._view.element),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(t){return Array.from(this._idToStack.entries()).find(r=>r[1]===t)[0]}_showNextStack(){const t=Array.from(this._idToStack.values());let r=t.indexOf(this._visibleStack)+1;t[r]||(r=0),this.showStack(this._getStackId(t[r]))}_showPrevStack(){const t=Array.from(this._idToStack.values());let r=t.indexOf(this._visibleStack)-1;t[r]||(r=t.length-1),this.showStack(this._getStackId(t[r]))}_createRotatorView(){const t=new UK(this.editor.locale),r=this.editor.locale.t;return this.view.content.add(t),t.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(o,c)=>!c&&o>1),t.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),t.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(o,c)=>{if(c<2)return"";const u=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return r("%0 of %1",[u,c])}),t.buttonNextView.on("execute",()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),t.buttonPrevView.on("execute",()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),t}_createFakePanelsView(){const t=new WK(this.editor.locale,this.view);return t.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(r,o)=>!o&&r>=2?Math.min(r-1,2):0),t.listenTo(this.view,"change:top",()=>t.updatePosition()),t.listenTo(this.view,"change:left",()=>t.updatePosition()),this.editor.ui.view.body.add(t),t}_showView({view:t,balloonClassName:r="",withArrow:o=!0,singleViewMode:c=!1}){this.view.class=r,this.view.withArrow=o,this._rotatorView.showView(t),this.visibleView=t,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),c&&(this._singleViewMode=!0)}_getBalloonPosition(){let t=Array.from(this._visibleStack.values()).pop().position;return t&&(t.limiter||(t=Object.assign({},t,{limiter:this.positionLimiter})),t=Object.assign({},t,{viewportOffsetConfig:this.editor.ui.viewportOffset})),t}}class UK extends kt{constructor(t){super(t);const r=t.t,o=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new ir,this.buttonPrevView=this._createButtonView(r("Previous"),At.previousArrow),this.buttonNextView=this._createButtonView(r("Next"),At.nextArrow),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",o.to("isNavigationVisible",c=>c?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:o.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(t){this.hideView(),this.content.add(t)}hideView(){this.content.clear()}_createButtonView(t,r){const o=new Rt(this.locale);return o.set({label:t,icon:r,tooltip:!0}),o}}class WK extends kt{constructor(t,r){super(t);const o=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=r,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",o.to("numberOfPanels",c=>
vendor: 5,072 bytes, line 8466
8466c?"":"ck-hidden")],style:{top:o.to("top",If),left:o.to("left",If),width:o.to("width",If),height:o.to("height",If)}},children:this.content}),this.on("change:numberOfPanels",(c,u,m,b)=>{m>b?this._addPanels(m-b):this._removePanels(b-m),this.updatePosition()})}_addPanels(t){for(;t--;){const r=new kt;r.setTemplate({tag:"div"}),this.content.add(r),this.registerChild(r)}}_removePanels(t){for(;t--;){const r=this.content.last;this.content.remove(r),this.deregisterChild(r),r.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:t,left:r}=this._balloonPanelView,{width:o,height:c}=new Tt(this._balloonPanelView.element);Object.assign(this,{top:t,left:r,width:o,height:c})}}}var cN=d(8298),HK={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(cN.A,HK),cN.A.locals;const Dc=bc("px");class GK extends kt{constructor(t){super(t);const r=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 ao({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:r.to("isSticky",o=>o?"block":"none"),height:r.to("isSticky",o=>o?Dc(this._contentPanelRect.height):null)}}}).render(),this.contentPanelElement=new ao({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",r.if("isSticky","ck-sticky-panel__content_sticky"),r.if("_isStickyToTheBottomOfLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:r.to("isSticky",o=>o?Dc(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:r.to("_stickyTopOffset",o=>o&&Dc(o)),bottom:r.to("_stickyBottomOffset",o=>o&&Dc(o)),marginLeft:r.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(g.document,"scroll",()=>{this.checkIfShouldBeSticky()},{useCapture:!0}),this.listenTo(this,"change:isActive",()=>{this.checkIfShouldBeSticky()})}checkIfShouldBeSticky(){if(!this.limiterElement||!this.isActive)return void this._unstick();const t=new Tt(this.limiterElement);let r=t.getVisible();if(r){const o=new Tt(g.window);o.top+=this.viewportTopOffset,o.height-=this.viewportTopOffset,r=r.getIntersection(o)}if(r&&t.top<r.top){const o=r.top;if(o+this._contentPanelRect.height+this.limiterBottomOffset>r.bottom){const c=Math.max(t.bottom-r.bottom,0)+this.limiterBottomOffset;t.bottom-c>t.top+this._contentPanelRect.height?this._stickToBottomOfLimiter(c):this._unstick()}else this._contentPanelRect.height+this.limiterBottomOffset<t.height?this._stickToTopOfAncestors(o):this._unstick()}else this._unstick()}_stickToTopOfAncestors(t){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=t,this._stickyBottomOffset=null,this._marginLeft=Dc(-g.window.scrollX)}_stickToBottomOfLimiter(t){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!0,this._stickyTopOffset=null,this._stickyBottomOffset=t,this._marginLeft=Dc(-g.window.scrollX)}_unstick(){this.isSticky=!1,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=null,this._stickyBottomOffset=null,this._marginLeft=null}get _contentPanelRect(){return new Tt(this.contentPanelElement)}}class qK extends Af{constructor(t,r){const o=t.t,c=Object.assign({},{showResetButton:!0,showIcon:!0,creator:Nf},r);super(t,c.creator),this.label=r.label,this._viewConfig=c,this._viewConfig.showIcon&&(this.iconView=new fs,this.iconView.content=At.loupe,this.fieldWrapperChildren.add(this.iconView,0),this.extendTemplate({attributes:{class:"ck-search__query_with-icon"}})),this._viewConfig.showResetButton&&(this.resetButtonView=new Rt(t),this.resetButtonView.set({label:o("Clear"),icon:At.cancel,class:"ck-search__reset",isVisible:!1,tooltip:!0}),this.resetButtonView.on("execute",()=>{this.reset(),this.focus(),this.fire("reset")}),this.resetButtonView.bind("isVisible").to(this.fieldView,"isEmpty",u=>!u),this.fieldWrapperChildren.add(this.resetButtonView),this.extendTemplate({attributes:{class:"ck-search__query_with-reset"}}))}reset(){this.fieldView.reset(),this._viewConfig.showResetButton&&(this.resetButtonView.isVisible=!1)}}class KK extends kt{constructor(){super();const t=this.bindTemplate;this.set({isVisible:!1,primaryText:"",secondaryText:""}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__info",t.if("isVisible","ck-hidden",r=>!r)],tabindex:-1},children:[{tag:"span",children:[{text:[t.to("primaryText")]}]},{tag:"span",children:[{text:[t.to("secondaryText")]}]}]})}focus(){this.element.focus()}}class YK extends kt{constructor(t){super(t),this.children=this.createCollection(),this.focusTracker=new ir,this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__results"],tabindex:-1},children:this.children}
8466),this._focusCycler=new Fi({focusables:this.children,focusTracker:this.focusTracker})}render(){super.render();for(const t of this.children)this.focusTracker.add(t.element)}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}var dN=/[\\^$.*+?()[\]{}|]/g,QK=RegExp(dN.source);const uN=function(l){return(l=Bk(l))&&QK.test(l)?l.replace(dN,"\\$&"):l};var hN=d(8107),ZK={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(hN.A,ZK),hN.A.locals;var JK=Object.defineProperty,mN=Object.getOwnPropertySymbols,XK=Object.prototype.hasOwnProperty,eY=Object.prototype.propertyIsEnumerable,fN=(l,t,r)=>t in l?JK(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r;class tY extends kt{constructor(t,r){super(t),this._config=r,this.filteredView=r.filteredView,this.queryView=this._createSearchTextQueryView(),this.focusTracker=new ir,this.keystrokes=new zr,this.resultsView=new YK(t),this.children=this.createCollection(),this.focusableChildren=this.createCollection([this.queryView,this.resultsView]),this.set("isEnabled",!0),this.set("resultsCount",0),this.set("totalItemsCount",0),r.infoView&&r.infoView.instance?this.infoView=r.infoView.instance:(this.infoView=new KK,this._enableDefaultInfoViewBehavior(),this.on("render",()=>{this.search("")})),this.resultsView.children.addMany([this.infoView,this.filteredView]),this.focusCycler=new Fi({focusables:this.focusableChildren,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.on("search",(o,{resultsCount:c,totalItemsCount:u})=>{this.resultsCount=c,this.totalItemsCount=u}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search",r.class||null],tabindex:"-1"},children:this.children})}render(){super.render(),this.children.addMany([this.queryView,this.resultsView]);const t=r=>r.stopPropagation();for(const r of this.focusableChildren)this.focusTracker.add(r.element);this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}focus(){this.queryView.focus()}reset(){this.queryView.reset(),this.search("")}search(t){const r=t?new RegExp(uN(t),"ig"):null,o=this.filteredView.filter(r);this.fire("search",((c,u)=>{for(var m in u||(u={}))XK.call(u,m)&&fN(c,m,u[m]);if(mN)for(var m of mN(u))eY.call(u,m)&&fN(c,m,u[m]);return c})({query:t},o))}_createSearchTextQueryView(){const t=new qK(this.locale,this._config.queryView);return this.listenTo(t.fieldView,"input",()=>{this.search(t.fieldView.element.value)}),t.on("reset",()=>this.reset()),t.bind("isEnabled").to(this),t}_enableDefaultInfoViewBehavior(){const t=this.locale.t,r=this.infoView;function o(c,{query:u,resultsCount:m,totalItemsCount:b}){return typeof c=="function"?c(u,m,b):c}this.on("search",(c,u)=>{if(u.resultsCount)r.set({isVisible:!1});else{const m=this._config.infoView&&this._config.infoView.text;let b,k;u.totalItemsCount?m&&m.notFound?(b=m.notFound.primary,k=m.notFound.secondary):(b=t("No results found"),k=""):m&&m.noSearchableItems?(b=m.noSearchableItems.primary,k=m.noSearchableItems.secondary):(b=t("No searchable items"),k=""),r.set({primaryText:o(b,u),secondaryText:o(k,u),isVisible:!0})}})}}var pN=d(5727),nY={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(pN.A,nY),pN.A.locals;const Cy=class extends tY{constructor(l,t){super(l,t),this._config=t;const r=bc("px");this.extendTemplate({attributes:{class:["ck-autocomplete"]}});const o=this.resultsView.bindTemplate;this.resultsView.set("isVisible",!1),this.resultsView.set("_position","s"),this.resultsView.set("_width",0),this.resultsView.extendTemplate({attributes:{class:[o.if("isVisible","ck-hidden",c=>!c),o.to("_position",c=>`ck-search__results_${c}`)],style:{width:o.to("_width",r)}}}),this.focusTracker.on("change:isFocused",(c,u,m)=>{this._updateResultsVisibility(),m?this.resultsView.element.scrollTop=0:t.resetOnBlur&&this.queryView.reset()}),this.on("search",()=>{this._updateResultsVisibility(),this._updateResultsViewWidthAndPosition()}),this.keystrokes.set("esc",(c,u)=>{this.resultsView.isVisible&&(this.queryView.focus(),this.resultsView.isVisible=!1,u())}),this.listenTo(g.document,"scroll",()=>{this._updateResultsViewWidthAndPosition()}),this.on("change:isEnabled",()=>{this._updateResultsVisibility()}),this.filteredView.on("execute",(c,{value:u})=>{this.focus(),this.reset(),this.queryView.fieldView.value=this.queryView.fieldView.element.value=u,this.resultsView.isVisible=!1}),this.resultsView.on("change:isVisible",()=>{this._updateResultsViewWidthAndPosition()})}_updateResultsViewWidthAndPosition(){if(!this.resultsView.isVisible)return;this.resultsView._width=new Tt(this.queryView.fieldView.element).width;const l=Cy._getOptimalPosition({element:this.resultsView.element,target:this.queryView.element,fitInViewport:!0,positions:Cy.defaultResultsPositions});this.resultsView._position=l?l.name:"s"}_updateResultsVisibility(){const l=this._config.queryMinChars===void 0?0:this._config.queryMinChars,t=this.queryView.fieldView.element.value.length;this.resultsView.isVisible=this.focusTracker.isFocused&&this.isEnabled&&t>=l}};let gN=Cy;gN.defaultResultsPositions=[l=>({top:l.bottom,left:l.left,name:"s"}),(l,t)=>({top:l.top-t.height,left:l.left,name:"n"})],gN._getOptimalPosition=Qm;var bN=d(9529),rY={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(bN.A,rY),bN.A.locals;var kN=d(109),iY={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(kN.A,iY),kN.A.locals;var yN=d(2710),oY={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(yN.A,oY),yN.A.locals;var xN=d(3344),sY={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(xN.A,sY),xN.A.locals;class aY extends Rt{constructor(t){super(t);const r=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",o=>String(o)),"data-cke-tooltip-disabled":r.to("isOn")},on:{mouseenter:r.to("mouseenter")}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const t=new fs;return t.content=_f,t.extendTemplate({attributes:{class:"ck-menu-bar__menu__button__arrow"}}),t}}
8466var vN=d(9481),lY={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(vN.A,lY),vN.A.locals;class jy extends Sc{constructor(t,r){super(t);const o=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item"]},on:{mouseenter:o.to("mouseenter")}}),this.delegate("mouseenter").to(r)}}var cY=Object.defineProperty,wN=Object.getOwnPropertySymbols,dY=Object.prototype.hasOwnProperty,uY=Object.prototype.propertyIsEnumerable,_N=(l,t,r)=>t in l?cY(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,AN=(l,t)=>{for(var r in t||(t={}))dY.call(t,r)&&_N(l,r,t[r]);if(wN)for(var r of wN(t))uY.call(t,r)&&_N(l,r,t[r]);return l};const Cu={toggleMenusAndFocusItemsOnHover(l){l.on("menu:mouseenter",t=>{if(l.isOpen){for(const r of l.menus){const o=t.path[0],c=o instanceof jy&&o.children.first===r;r.isOpen=(t.path.includes(r)||c)&&r.isEnabled}t.source.focus()}})},focusCycleMenusOnArrows(l){const t=l.locale.uiLanguageDirection==="rtl";function r(o,c){const u=l.children.getIndex(o),m=o.isOpen,b=l.children.length,k=l.children.get((u+b+c)%b);o.isOpen=!1,m&&(k.isOpen=!0),k.buttonView.focus()}l.on("menu:arrowright",o=>{r(o.source,t?-1:1)}),l.on("menu:arrowleft",o=>{r(o.source,t?1:-1)})},closeMenusWhenTheBarCloses(l){l.on("change:isOpen",()=>{l.isOpen||l.menus.forEach(t=>{t.isOpen=!1})})},closeMenuWhenAnotherOnTheSameLevelOpens(l){l.on("menu:change:isOpen",(t,r,o)=>{o&&l.menus.filter(c=>t.source.parentMenuView===c.parentMenuView&&t.source!==c&&c.isOpen).forEach(c=>{c.isOpen=!1})})},closeOnClickOutside(l){ef({emitter:l,activator:()=>l.isOpen,callback:()=>l.close(),contextElements:()=>l.children.map(t=>t.element)})}},ul={openAndFocusPanelOnArrowDownKey(l){l.keystrokes.set("arrowdown",(t,r)=>{l.focusTracker.focusedElement===l.buttonView.element&&(l.isOpen||(l.isOpen=!0),l.panelView.focus(),r())})},openOnArrowRightKey(l){const t=l.locale.uiLanguageDirection==="rtl"?"arrowleft":"arrowright";l.keystrokes.set(t,(r,o)=>{l.focusTracker.focusedElement===l.buttonView.element&&l.isEnabled&&(l.isOpen||(l.isOpen=!0),l.panelView.focus(),o())})},openOnButtonClick(l){l.buttonView.on("execute",()=>{l.isOpen=!0,l.panelView.focus()})},toggleOnButtonClick(l){l.buttonView.on("execute",()=>{l.isOpen=!l.isOpen,l.isOpen&&l.panelView.focus()})},closeOnArrowLeftKey(l){const t=l.locale.uiLanguageDirection==="rtl"?"arrowright":"arrowleft";l.keystrokes.set(t,(r,o)=>{l.isOpen&&(l.isOpen=!1,l.focus(),o())})},closeOnEscKey(l){l.keystrokes.set("esc",(t,r)=>{l.isOpen&&(l.isOpen=!1,l.focus(),r())})},closeOnParentClose(l){l.parentMenuView.on("change:isOpen",(t,r,o)=>{o||t.source!==l.parentMenuView||(l.isOpen=!1)})}},hY={southEast:l=>({top:l.bottom,left:l.left,name:"se"}),southWest:(l,t)=>({top:l.bottom,left:l.left-t.width+l.width,name:"sw"}),northEast:(l,t)=>({top:l.top-t.height,left:l.left,name:"ne"}),northWest:(l,t)=>({top:l.top-t.height,left:l.left-t.width+l.width,name:"nw"}),eastSouth:l=>({top:l.top,left:l.right-5,name:"es"}),eastNorth:(l,t)=>({top:l.top-t.height,left:l.right-5,name:"en"}),westSouth:(l,t)=>({top:l.top,left:l.left-t.width+5,name:"ws"}),westNorth:(l,t)=>({top:l.top-t.height,left:l.left-t.width+5,name:"wn"})},mY=[{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:"sourceEditing",items:["menuBar:sourceEditing"]},{groupId:"showBlocks",items:["menuBar:showBlocks"]},{groupId:"restrictedEditingException",items:["menuBar:restrictedEditingException"]}]},{menuId:"insert",label:"Insert",groups:[{groupId:"insertMainWidgets",items:["menuBar:uploadImage","menuBar:ckbox","menuBar:ckfinder","menuBar:insertTable"]},{groupId:"insertInline",items:["menuBar:link","menuBar:comment"]},{groupId:"insertMinorWidgets",items:["menuBar:insertTemplate","menuBar:blockQuote","menuBar:codeBlock","menuBar:htmlEmbed"]},{groupId:"insertStructureWidgets",items:["menuBar:horizontalLine","menuBar:pageBreak","menuBar:tableOfContents"]}
8466,{groupId:"restrictedEditing",items:["menuBar:restrictedEditing"]}]},{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:todoList"]},{groupId:"indent",items:["menuBar:alignment","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"]},{groupId:"tools",items:["menuBar:trackChanges","menuBar:commentsArchive"]}]},{menuId:"help",label:"Help",groups:[{groupId:"help",items:["menuBar:accessibilityHelp"]}]}];function fY({normalizedConfig:l,locale:t,componentFactory:r}){const o=uo(l);return function(c,u){const m=u.removeItems,b=[];u.items=u.items.filter(({menuId:k})=>!m.includes(k)||(b.push(k),!1)),Tc(u.items,k=>{k.groups=k.groups.filter(({groupId:_})=>!m.includes(_)||(b.push(_),!1));for(const _ of k.groups)_.items=_.items.filter(A=>{const N=NN(A);return!m.includes(N)||(b.push(N),!1)})});for(const k of m)b.includes(k)||z("menu-bar-item-could-not-be-removed",{menuBarConfig:c,itemName:k})}(l,o),function(c,u){const m=u.addItems,b=[];for(const k of m){const _=bY(k.position),A=kY(k.position);if(pY(k))if(A){const N=u.items.findIndex(T=>T.menuId===A);N!=-1?_==="before"?(u.items.splice(N,0,k.menu),b.push(k)):_==="after"&&(u.items.splice(N+1,0,k.menu),b.push(k)):CN(u,k.menu,A,_)&&b.push(k)}else _==="start"?(u.items.unshift(k.menu),b.push(k)):_==="end"&&(u.items.push(k.menu),b.push(k));else gY(k)?Tc(u.items,N=>{if(N.menuId===A)_==="start"?(N.groups.unshift(k.group),b.push(k)):_==="end"&&(N.groups.push(k.group),b.push(k));else{const T=N.groups.findIndex(O=>O.groupId===A);T!==-1&&(_==="before"?(N.groups.splice(T,0,k.group),b.push(k)):_==="after"&&(N.groups.splice(T+1,0,k.group),b.push(k)))}}):CN(u,k.item,A,_)&&b.push(k)}for(const k of m)b.includes(k)||z("menu-bar-item-could-not-be-added",{menuBarConfig:c,addedItemConfig:k})}(l,o),function(c,u,m){Tc(u.items,b=>{for(const k of b.groups)k.items=k.items.filter(_=>{const A=typeof _=="string"&&!m.has(_);return A&&!u.isUsingDefaultConfig&&z("menu-bar-item-unavailable",{menuBarConfig:c,parentMenuConfig:uo(b),componentName:_}),!A})})}(l,o,r),jN(l,o),function(c,u){const m=u.t,b={File:m({string:"File",id:"MENU_BAR_MENU_FILE"}),Edit:m({string:"Edit",id:"MENU_BAR_MENU_EDIT"}),View:m({string:"View",id:"MENU_BAR_MENU_VIEW"}),Insert:m({string:"Insert",id:"MENU_BAR_MENU_INSERT"}),Format:m({string:"Format",id:"MENU_BAR_MENU_FORMAT"}),Tools:m({string:"Tools",id:"MENU_BAR_MENU_TOOLS"}),Help:m({string:"Help",id:"MENU_BAR_MENU_HELP"}),Text:m({string:"Text",id:"MENU_BAR_MENU_TEXT"}),Font:m({string:"Font",id:"MENU_BAR_MENU_FONT"})};Tc(c.items,k=>{k.label in b&&(k.label=b[k.label])})}(o,t),o}function CN(l,t,r,o){let c=!1;return Tc(l.items,u=>{for(const{groupId:m,items:b}of u.groups){if(c)return;if(m===r)o==="start"?(b.unshift(t),c=!0):o==="end"&&(b.push(t),c=!0);
8466else{const k=b.findIndex(_=>NN(_)===r);k!==-1&&(o==="before"?(b.splice(k,0,t),c=!0):o==="after"&&(b.splice(k+1,0,t),c=!0))}}}),c}function jN(l,t){const r=t.isUsingDefaultConfig;let o=!1;t.items=t.items.filter(c=>!!c.groups.length||(Ny(l,c,r),!1)),t.items.length?(Tc(t.items,c=>{c.groups=c.groups.filter(u=>!!u.items.length||(o=!0,!1));for(const u of c.groups)u.items=u.items.filter(m=>!(EN(m)&&!m.groups.length)||(Ny(l,m,r),o=!0,!1))}),o&&jN(l,t)):Ny(l,l,r)}function Ny(l,t,r){r||z("menu-bar-menu-empty",{menuBarConfig:l,emptyMenuConfig:t})}function Tc(l,t){if(Array.isArray(l))for(const o of l)r(o);function r(o){t(o);for(const c of o.groups)for(const u of c.items)EN(u)&&r(u)}}function pY(l){return typeof l=="object"&&"menu"in l}function gY(l){return typeof l=="object"&&"group"in l}function bY(l){return l.startsWith("start")?"start":l.startsWith("end")?"end":l.startsWith("after")?"after":"before"}function kY(l){const t=l.match(/^[^:]+:(.+)/);return t?t[1]:null}function NN(l){return typeof l=="string"?l:l.menuId}function EN(l){return typeof l=="object"&&"menuId"in l}function yY(l,t){const r=t.element;l.ui.focusTracker.add(r),l.keystrokes.listenTo(r);const o=function(c){let u;return u="items"in c&&c.items?AN({items:c.items,removeItems:[],addItems:[],isVisible:!0,isUsingDefaultConfig:!1},c):AN({items:uo(mY),addItems:[],removeItems:[],isVisible:!0,isUsingDefaultConfig:!0},c),u}(l.config.get("menuBar")||{});t.fillFromConfig(o,l.ui.componentFactory),l.keystrokes.set("Esc",(c,u)=>{r.contains(l.ui.focusTracker.focusedElement)&&(l.editing.view.focus(),u())}),l.keystrokes.set("Alt+F9",(c,u)=>{r.contains(l.ui.focusTracker.focusedElement)||(t.focus(),u())})}var SN=d(9108),xY={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(SN.A,xY),SN.A.locals;class vY extends kt{constructor(t){super(t);const r=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",r.to("position",o=>`ck-menu-bar__menu__panel_position_${o}`),r.if("isVisible","ck-hidden",o=>!o)],tabindex:"-1"},children:this.children,on:{selectstart:r.to(o=>{o.target.tagName.toLocaleLowerCase()!=="input"&&o.preventDefault()})}})}focus(t=1){this.children.length&&(t===1?this.children.first.focus():this.children.last.focus())}}var DN=d(4),wY={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(DN.A,wY),DN.A.locals;const TN=class extends kt{constructor(l){super(l);const t=this.bindTemplate;this.buttonView=new aY(l),this.buttonView.delegate("mouseenter").to(this),this.buttonView.bind("isOn","isEnabled").to(this,"isOpen","isEnabled"),this.panelView=new vY(l),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new zr,this.focusTracker=new ir,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",r=>!r),t.if("parentMenuView","ck-menu-bar__menu_top-level",r=>!r)]},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),ul.closeOnEscKey(this),this._repositionPanelOnOpen()}_attachBehaviors(){this.parentMenuView?(ul.openOnButtonClick(this),ul.openOnArrowRightKey(this),ul.closeOnArrowLeftKey(this),ul.closeOnParentClose(this)):(this._propagateArrowKeystrokeEvents(),ul.openAndFocusPanelOnArrowDownKey(this),ul.toggleOnButtonClick(this))}_propagateArrowKeystrokeEvents(){this.keystrokes.set("arrowright",(l,t)=>{this.fire("arrowright"),t()}),this.keystrokes.set("arrowleft",(l,t)=>{this.fire("arrowleft"),t()})}_repositionPanelOnOpen(){this.on("change:isOpen",(l,t,r)=>{if(!r)return;const o=TN._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=o?o.name:this._panelPositions[0].name})}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:l,southWest:t,northEast:r,northWest:o,westSouth:c,eastSouth:u,westNorth:m,eastNorth:b}=hY;return this.locale.uiLanguageDirection==="ltr"?this.parentMenuView?[u,b,c,m]:[l,t,r,o]:this.parentMenuView?[c,m,u,b]:[t,l,o,r]}};let Ic=TN;Ic._getOptimalPosition=Qm;class Ey extends ky{constructor(t){super(t),this.role="menu"}}var IN=d(977),_Y={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(IN.A,_Y),IN.A.locals;class wi extends Rt{constructor(t){super(t),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}class MN extends u4{constructor(t){super(t),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}var PN=d(497),AY={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(PN.A,AY),PN.A.locals;const ON=["mouseenter","arrowleft","arrowright","change:isOpen"];class CY extends kt{constructor(t){super(t),this.menus=[];const r=t.t;this.set("isOpen",!1),this._setupIsOpenUpdater(),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar"],"aria-label":r("Editor menu bar"),role:"menubar"},children:this.children})}fillFromConfig(t,r){const o=fY({normalizedConfig:t,locale:this.locale,componentFactory:r}).items.map(c=>this._createMenu({componentFactory:r,menuDefinition:c}));this.children.addMany(o)}render(){super.render(),Cu.toggleMenusAndFocusItemsOnHover(this),Cu.closeMenusWhenTheBarCloses(this),Cu.closeMenuWhenAnotherOnTheSameLevelOpens(this),Cu.focu
8466sCycleMenusOnArrows(this),Cu.closeOnClickOutside(this)}focus(){this.children.first&&this.children.first.focus()}close(){for(const t of this.children)t.isOpen=!1}registerMenu(t,r=null){r?(t.delegate(...ON).to(r),t.parentMenuView=r):t.delegate(...ON).to(this,o=>"menu:"+o),t._attachBehaviors(),this.menus.push(t)}_createMenu({componentFactory:t,menuDefinition:r,parentMenuView:o}){const c=this.locale,u=new Ic(c);return this.registerMenu(u,o),u.buttonView.set({label:r.label}),u.once("change:isOpen",()=>{const m=new Ey(c);m.ariaLabel=r.label,u.panelView.children.add(m),m.items.addMany(this._createMenuItems({menuDefinition:r,parentMenuView:u,componentFactory:t}))}),u}_createMenuItems({menuDefinition:t,parentMenuView:r,componentFactory:o}){const c=this.locale,u=[];for(const m of t.groups){for(const b of m.items){const k=new jy(c,r);if(be(b))k.children.add(this._createMenu({componentFactory:o,menuDefinition:b,parentMenuView:r}));else{const _=this._createMenuItemContentFromFactory({componentName:b,componentFactory:o,parentMenuView:r});if(!_)continue;k.children.add(_)}u.push(k)}m!==t.groups[t.groups.length-1]&&u.push(new by(c))}return u}_createMenuItemContentFromFactory({componentName:t,parentMenuView:r,componentFactory:o}){const c=o.create(t);return c instanceof Ic||c instanceof wi||c instanceof MN?(this._registerMenuTree(c,r),c.on("execute",()=>{this.close()}),c):(z("menu-bar-component-unsupported",{componentName:t,componentView:c}),null)}_registerMenuTree(t,r){if(!(t instanceof Ic))return void t.delegate("mouseenter").to(r);this.registerMenu(t,r);const o=t.panelView.children.filter(u=>u instanceof Ey)[0];if(!o)return void t.delegate("mouseenter").to(r);const c=o.items.filter(u=>u instanceof Sc);for(const u of c)this._registerMenuTree(u.children.get(0),t)}_setupIsOpenUpdater(){let t;this.on("menu:change:isOpen",(r,o,c)=>{clearTimeout(t),c?this.isOpen=!0:t=setTimeout(()=>{this.isOpen=Array.from(this.children).some(u=>u.isOpen)},0)})}}class jY extends OK{constructor(t,r){super(t),this.view=r,this._toolbarConfig=w4(t.config.get("toolbar")),this._elementReplacer=new ut,this.listenTo(t.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(t){const r=this.editor,o=this.view,c=r.editing.view,u=o.editable,m=c.document.getRoot();u.name=m.rootName,o.render();const b=u.element;this.setEditableElement(u.name,b),o.editable.bind("isFocused").to(this.focusTracker),c.attachDomRoot(b),t&&this._elementReplacer.replace(t,this.element),this._initPlaceholder(),this._initToolbar(),o.menuBarView&&yY(r,o.menuBarView),this._initDialogPluginIntegration(),this.fire("ready")}destroy(){super.destroy();const t=this.view,r=this.editor.editing.view;this._elementReplacer.restore(),r.detachDomRoot(t.editable.name),t.destroy()}_initToolbar(){const t=this.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,t.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",({top:r})=>r||0),t.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const t=this.editor,r=t.editing.view,o=r.document.getRoot(),c=t.sourceElement;let u;const m=t.config.get("placeholder");m&&(u=typeof m=="string"?m:m[this.view.editable.name]),!u&&c&&c.tagName.toLowerCase()==="textarea"&&(u=c.getAttribute("placeholder")),u&&(o.placeholder=u),o5({view:r,element:o,isDirectHost:!1,keepOnFocus:!0})}_handleScrollToTheSelectionWithStickyPanel(t,r,o){const c=this.view.stickyPanel;if(c.isSticky){const u=new Tt(c.element).height;r.viewportOffset.top+=u}else{const u=()=>{this.editor.editing.view.scrollToTheSelection(o)};this.listenTo(c,"change:isSticky",u),setTimeout(()=>{this.stopListening(c,"change:isSticky",u)},20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const t=this.view.stickyPanel,r=this.editor.plugins.get("Dialog");r.on("show",()=>{const o=r.view;o.on("moveTo",(c,u)=>{if(!t.isSticky||o.wasMoved)return;const m=new Tt(t.contentPanelElement);u[1]<m.bottom+Sf.defaultOffset&&(u[1]=m.bottom+Sf.defaultOffset)},{priority:"high"})},{priority:"low"})}}var BN=d(7388),NY={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(BN.A,NY),BN.A.locals;class EY extends RK{constructor(t,r,o={}
8466){super(t),this.stickyPanel=new GK(t),this.toolbar=new gy(t,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),o.useMenuBar&&(this.menuBarView=new CY(t)),this.editable=new FK(t,r)}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 LN{constructor(t){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit=typeof t.crashNumberLimit=="number"?t.crashNumberLimit:3,this._minimumNonErrorTimePeriod=typeof t.minimumNonErrorTimePeriod=="number"?t.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=r=>{const o="error"in r?r.error:r.reason;o instanceof Error&&this._handleError(o,r)},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(t,r){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(r)}off(t,r){this._listeners[t]=this._listeners[t].filter(o=>o!==r)}_fire(t,...r){const o=this._listeners[t]||[];for(const c of o)c.apply(this,[null,...r])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(t,r){if(this._shouldReactToError(t)){this.crashes.push({message:t.message,stack:t.stack,filename:r instanceof ErrorEvent?r.filename:void 0,lineno:r instanceof ErrorEvent?r.lineno:void 0,colno:r instanceof ErrorEvent?r.colno:void 0,date:this._now()});const o=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:t,causesRestart:o}),o?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(t){return t.is&&t.is("CKEditorError")&&t.context!==void 0&&t.context!==null&&this.state==="ready"&&this._isErrorComingFromThisItem(t)}_shouldRestart(){return this.crashes.length<=this._crashNumberLimit?!0:(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function Sy(l,t=new Set){const r=[l],o=new Set;let c=0;for(;r.length>c;){const u=r[c++];if(!o.has(u)&&SY(u)&&!t.has(u))if(o.add(u),Symbol.iterator in u)try{for(const m of u)r.push(m)}catch{}else for(const m in u)m!=="defaultValue"&&r.push(u[m])}return o}function SY(l){const t=Object.prototype.toString.call(l),r=typeof l;return!(r==="number"||r==="boolean"||r==="string"||r==="symbol"||r==="function"||t==="[object Date]"||t==="[object RegExp]"||t==="[object Module]"||l==null||l._watchdogExcluded||l instanceof EventTarget||l instanceof Event)}function RN(l,t,r=new Set){if(l===t&&typeof(o=l)=="object"&&o!==null)return!0;var o;const c=Sy(l,r),u=Sy(t,r);for(const m of c)if(u.has(m))return!0;return!1}var DY=Object.defineProperty,TY=Object.defineProperties,IY=Object.getOwnPropertyDescriptors,Pf=Object.getOwnPropertySymbols,zN=Object.prototype.hasOwnProperty,FN=Object.prototype.propertyIsEnumerable,$N=(l,t,r)=>t in l?DY(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,Dy=(l,t)=>{for(var r in t||(t={}))zN.call(t,r)&&$N(l,r,t[r]);if(Pf)for(var r of Pf(t))FN.call(t,r)&&$N(l,r,t[r]);return l};class VN extends LN{constructor(t,r={}){super(r),this._editor=null,this._lifecyclePromise=null,this._initUsingData=!0,this._editables={},this._throttledSave=Tf(this._save.bind(this),typeof r.saveInterval=="number"?r.saveInterval:5e3),t&&(this._creator=(o,c)=>t.create(o,c)),this._destructor=o=>o.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(t){this._creator=t}setDestructor(t){this._destructor=t}_restart(){return Promise.resolve().then(()=>(this.state="initializing",this._fire("stateChange"),this._destroy())).catch(t=>{console.error("An error happened during the editor destroying.",t)}).then(()=>{const t={},r=[],o=this._config.rootsAttributes||{},c={};for(const[k,_]of Object.entries(this._data.roots))_.isLoaded?(t[k]="",c[k]=o[k]||{}):r.push(k);const u=(m=Dy({},this._config),b={extraPlugins:this._config.extraPlugins||[],lazyRoots:r,rootsAttributes:c,_watchdogInitialData:this._data},TY(m,IY(b)));var m,b;return delete u.initialData,u.extraPlugins.push(MY),this._initUsingData?this.create(t,u,u.context):el(this._elementOrData)?this.create(this._elementOrData,u,u.context):this.create(this._editables,u,u.context)}).then(()=>{this._fire("restart")})}create(t=this._elementOrData,r=this._config,o){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then(()=>(super._startErrorHandling(),this._elementOrData=t,this._initUsingData=typeof t=="string"||Object.keys(t).length>0&&typeof Object.values(t)[0]=="string",this._config=this._cloneEditorConfiguration(r)||{},this._config.context=o,this._creator(t,this._config))).then(c=>{this._editor=c,c.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=c.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 t=this._editor;return this._editor=null,t.model.document.off("change:data",this._throttledSave),this._destructor(t)})}_save(){const t=this._editor.model.document.version;try{this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this._lastDocumentVersion=t}catch(r){console.error(r,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(t){this._excludedProps=t}_getData(){const t=this._editor,r=t.model.document.roots.filter(b=>b.isAttached()&&b.rootName!="$graveyard"),{plugins:o}=t,c=o.has("CommentsRepository")&&o.get("CommentsRepository"),u=o.has("TrackChanges")&&o.get("TrackChanges"),m={roots:{},markers:{},commentThreads:JSON.stringify([]),suggestions:JSON.stringify([])};r.forEach(b=>{m.roots[b.rootName]={content:JSON.stringify(Array.from(b.getChildren())),attributes:JSON.stringify(Array.from(b.getAttributes())),isLoaded:b._isLoaded}});for(const b of t.model.markers)b._affectsData&&(m.markers[b.name]={rangeJSON:b.getRange().toJSON(),usingOperation:b._managedUsingOperations,affectsData:b._affectsData});return c&&(m.commentThreads=JSON.stringify(c.getCommentThreads({toJSON:!0,skipNotAttached:!0}))),u&&(m.suggestions=JSON.stringify(u.getSuggestions({toJSON:!0,skipNotAttached:!0}))),m}_getEditables(){const t={};for(const r of this.editor.model.document.getRootNames()){const o=this.editor.ui.getEditableElement(r);o&&(t[r]=o)}return t}_isErrorComingFromThisItem(t){return RN(this._editor,t.context,this._excludedProps)}_cloneEditorConfiguration(t){return xk(t,(r,o)=>el(r)||o==="context"?r:void 0)}}class MY{constructor(t){this.editor=t,this._data=t.config.get("_watchdogInitialData")}init(){this.editor.data.on("init",t=>{t.stop(),this.editor.model.enqueueChange({isUndoable:!1},r=>{this._restoreCollaborationData(),this._restoreEditorData(r)}),this.editor.data.fire("ready")},{priority:999})}_createNode(t,r){if("name"in r){const o=t.createElement(r.name,r.attributes);if(r.children)for(const c of r.children)o._appendChild(this._createNode(t,c)
8466);return o}return t.createText(r.data,r.attributes)}_restoreEditorData(t){const r=this.editor;Object.entries(this._data.roots).forEach(([o,{content:c,attributes:u}])=>{const m=JSON.parse(c),b=JSON.parse(u),k=r.model.document.getRoot(o);for(const[_,A]of b)t.setAttribute(_,A,k);for(const _ of m){const A=this._createNode(t,_);t.insert(A,k,"end")}}),Object.entries(this._data.markers).forEach(([o,c])=>{const{document:u}=r.model,m=c,{rangeJSON:{start:b,end:k}}=m,_=((L,$)=>{var U={};for(var H in L)zN.call(L,H)&&$.indexOf(H)<0&&(U[H]=L[H]);if(L!=null&&Pf)for(var H of Pf(L))$.indexOf(H)<0&&FN.call(L,H)&&(U[H]=L[H]);return U})(m,["rangeJSON"]),A=u.getRoot(b.root),N=t.createPositionFromPath(A,b.path,b.stickiness),T=t.createPositionFromPath(A,k.path,k.stickiness),O=t.createRange(N,T);t.addMarker(o,Dy({range:O},_))})}_restoreCollaborationData(){const t=JSON.parse(this._data.commentThreads),r=JSON.parse(this._data.suggestions);t.forEach(o=>{const c=this.editor.config.get("collaboration.channelId"),u=this.editor.plugins.get("CommentsRepository");u.hasCommentThread(o.threadId)&&u.getCommentThread(o.threadId).remove(),u.addCommentThread(Dy({channelId:c},o))}),r.forEach(o=>{const c=this.editor.plugins.get("TrackChangesEditing");c.hasSuggestion(o.id)?c.getSuggestion(o.id).attributes=o.attributes:c.addSuggestionData(o)})}}const ju=Symbol("MainQueueId");class PY{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(t){this._onEmptyCallbacks.push(t)}enqueue(t,r){const o=t===ju;this._activeActions++,this._queues.get(t)||this._queues.set(t,Promise.resolve());const c=(o?Promise.all(this._queues.values()):Promise.all([this._queues.get(ju),this._queues.get(t)])).then(r),u=c.catch(()=>{});return this._queues.set(t,u),c.finally(()=>{this._activeActions--,this._queues.get(t)===u&&this._activeActions===0&&this._onEmptyCallbacks.forEach(m=>m())})}}function UN(l){return Array.isArray(l)?l:[l]}class Of extends hy(gq){constructor(t,r={}){if(!Bf(t)&&r.initialData!==void 0)throw new P("editor-create-initial-data",null);super(r),this.config.define("menuBar.isVisible",!1),this.config.get("initialData")===void 0&&this.config.set("initialData",function(m){return Bf(m)?(b=m,b instanceof HTMLTextAreaElement?b.value:b.innerHTML):m;var b}(t)),Bf(t)&&(this.sourceElement=t),this.model.document.createRoot();const o=!this.config.get("toolbar.shouldNotGroupWhenFull"),c=this.config.get("menuBar"),u=new EY(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:o,useMenuBar:c.isVisible});this.ui=new jY(this,u),function(m){if(!ss(m.updateSourceElement))throw new P("attachtoform-missing-elementapi-interface",m);const b=m.sourceElement;if(function(k){return!!k&&k.tagName.toLowerCase()==="textarea"}(b)&&b.form){let k;const _=b.form,A=()=>m.updateSourceElement();ss(_.submit)&&(k=_.submit,_.submit=()=>{A(),k.apply(_)}),_.addEventListener("submit",A),m.on("destroy",()=>{_.removeEventListener("submit",A),k&&(_.submit=k)})}}(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(t,r={}){return new Promise(o=>{const c=new this(t,r);o(c.initPlugins().then(()=>c.ui.init(Bf(t)?t:null)).then(()=>c.data.init(c.config.get("initialData"))).then(()=>c.fire("ready")).then(()=>c))})}}function Bf(l){return el(l)}Of.Context=n5,Of.EditorWatchdog=VN,Of.ContextWatchdog=class extends LN{constructor(l,t={}){super(t),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new PY,this._watchdogConfig=t,this._creator=r=>l.create(r),this._destructor=r=>r.destroy(),this._actionQueues.onEmpty(()=>{this.state==="initializing"&&(this.state="ready",this._fire("stateChange"))})}setCreator(l){this._creator=l}setDestructor(l){this._destructor=l}get context(){return this._context}create(l={}){return this._actionQueues.enqueue(ju,()=>(this._contextConfig=l,this._create()))}getItem(l){return this._getWatchdog(l)._item}getItemState(l){return this._getWatchdog(l).state}add(l){const t=UN(l);return Promise.all(t.map(r=>this._actionQueues.enqueue(r.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 `
8466ContextWatchdog#create()` method first.");let o;if(this._watchdogs.has(r.id))throw new Error(`Item with the given id is already added: '${r.id}'.`);if(r.type==="editor")return o=new VN(null,this._watchdogConfig),o.setCreator(r.creator),o._setExcludedProperties(this._contextProps),r.destructor&&o.setDestructor(r.destructor),this._watchdogs.set(r.id,o),o.on("error",(c,{error:u,causesRestart:m})=>{this._fire("itemError",{itemId:r.id,error:u}),m&&this._actionQueues.enqueue(r.id,()=>new Promise(b=>{const k=()=>{o.off("restart",k),this._fire("itemRestart",{itemId:r.id}),b()};o.on("restart",k)}))}),o.create(r.sourceElementOrData,r.config,this._context);throw new Error(`Not supported item type: '${r.type}'.`)})))}remove(l){const t=UN(l);return Promise.all(t.map(r=>this._actionQueues.enqueue(r,()=>{const o=this._getWatchdog(r);return this._watchdogs.delete(r),o.destroy()})))}destroy(){return this._actionQueues.enqueue(ju,()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))}_restart(){return this._actionQueues.enqueue(ju,()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch(l=>{console.error("An error happened during destroying the context or items.",l)}).then(()=>this._create()).then(()=>this._fire("restart"))))}_create(){return Promise.resolve().then(()=>(this._startErrorHandling(),this._creator(this._contextConfig))).then(l=>(this._context=l,this._contextProps=Sy(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 l=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map(t=>t.destroy())).then(()=>this._destructor(l))})}_getWatchdog(l){const t=this._watchdogs.get(l);if(!t)throw new Error(`Item with the given id was not registered: ${l}.`);return t}_isErrorComingFromThisItem(l){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(l))return!1;return RN(this._context,l.context)}};class Nu extends sa{constructor(t){super(t),this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];const r=this.document;function o(c){return(u,m)=>{m.preventDefault();const b=m.dropRange?[m.dropRange]:null,k=new I(r,c);r.fire(k,{dataTransfer:m.dataTransfer,method:u.name,targetRanges:b,target:m.target,domEvent:m.domEvent}),k.stop.called&&m.stopPropagation()}}this.listenTo(r,"paste",o("clipboardInput"),{priority:"low"}),this.listenTo(r,"drop",o("clipboardInput"),{priority:"low"}),this.listenTo(r,"dragover",o("dragging"),{priority:"low"})}onDomEvent(t){const r="clipboardData"in t?t.clipboardData:t.dataTransfer,o=t.type=="drop"||t.type=="paste",c={dataTransfer:new F5(r,{cacheFiles:o})};t.type!="drop"&&t.type!="dragover"||(c.dropRange=function(u,m){const b=m.target.ownerDocument,k=m.clientX,_=m.clientY;let A;return b.caretRangeFromPoint&&b.caretRangeFromPoint(k,_)?A=b.caretRangeFromPoint(k,_):m.rangeParent&&(A=b.createRange(),A.setStart(m.rangeParent,m.rangeOffset),A.collapse(!0)),A?u.domConverter.domRangeToView(A):null}(this.view,t)),this.fire(t.type,t,c)}}const WN=["figcaption","li"],HN=["ol","ul"];function GN(l){if(l.is("$text")||l.is("$textProxy"))return l.data;if(l.is("element","img")&&l.hasAttribute("alt"))return l.getAttribute("alt");if(l.is("element","br"))return` 8467`;let t="",r=null;for(const o of l.getChildren())t+=OY(o,r)+GN(o),r=o;return t}function OY(l,t){return t?l.is("element","li")&&!l.isEmpty&&l.getChild(0).is("containerElement")||HN.includes(l.name)&&HN.includes(t.name)?` 8468 8469`:l.is("containerElement")||t.is("containerElement")?WN.includes(l.name)||WN.includes(t.name)?` 8470`:` 8471 8472`:"":""}const BY=function(l,t){return l&&P2(l,t,ru)},LY=function(l,t,r,o){var c=r.length,u=c;if(l==null)return!u;for(l=Object(l);c--;){var m=r[c];if(m[2]?m[1]!==l[m[0]]:!(m[0]in l))return!1}for(;++c<u;){var b=(m=r[c])[0],k=l[b],_=m[1];if(m[2]){if(k===void 0&&!(b in l))return!1}else{var A=new ls,N;if(!(N===void 0?pf(_,k,3,o,A):N))return!1}}return!0},qN=function(l){return l==l&&!be(l)},RY=function(l){for(var t=ru(l),r=t.length;r--;){var o=t[r],c=l[o];t[r]=[o,c,qN(c)]}return t},KN=function(l,t){return function(r){return r!=null&&r[l]===t&&(t!==void 0||l in Object(r))}},zY=function(l){var t=RY(l);return t.length==1&&t[0][2]?KN(t[0][0],t[0][1]):function(r){return r===l||LY(r,l,t)}},FY=function(l,t){return l!=null&&t in Object(l)},$Y=function(l,t,r){for(var o=-1,c=(t=sf(t,l)).length,u=!1;++o<c;){var m=xc(t[o]);if(!(u=l!=null&&r(l,m)))break;l=l[m]}return u||++o!=c?u:!!(c=l==null?0:l.length)&&Wm(c)&&Ja(m,c)&&(Ze(l)||xt(l))},VY=function(l,t){return l!=null&&$Y(l,t,FY)},UY=function(l,t){return Pk(l)&&qN(t)?KN(xc(l),t):function(r){var o=du(r,l);return o===void 0&&o===t?VY(r,l):pf(t,o,3)}},WY=function(l){return function(t){return t==null?void 0:t[l]}},HY=function(l){return function(t){return Lk(t,l)}},GY=function(l){return Pk(l)?WY(xc(l)):HY(l)},qY=function(l){return typeof l=="function"?l:l==null?oa:typeof l=="object"?Ze(l)?UY(l[0],l[1]):zY(l):GY(l)},KY=function(l,t){var r={};return t=qY(t),BY(l,function(o,c,u){Qa(r,c,t(o,c,u))}),r};var YY=Object.defineProperty,QY=Object.defineProperties,ZY=Object.getOwnPropertyDescriptors,YN=Object.getOwnPropertySymbols,JY=Object.prototype.hasOwnProperty,XY=Object.prototype.propertyIsEnumerable,QN=(l,t,r)=>t in l?YY(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r;class Eu extends Pe{constructor(){super(...arguments),this._markersToCopy=new Map}static get pluginName(){return"ClipboardMarkersUtils"}_registerMarkerToCopy(t,r){this._markersToCopy.set(t,r)}_copySelectedFragmentWithMarkers(t,r,o=c=>c.model.getSelectedContent(c.model.document.selection)){return this.editor.model.change(c=>{const u=c.model.document.selection;c.setSelection(r);const m=this._insertFakeMarkersIntoSelection(c,c.model.document.selection,t),b=o(c),k=this._removeFakeMarkersInsideElement(c,b);for(const[_,A]of Object.entries(m)){k[_]||(k[_]=c.createRangeIn(b));for(const N of A)c.remove(N)}b.markers.clear();for(const[_,A]of Object.entries(k))b.markers.set(_,A);return c.setSelection(u),b})}_pasteMarkersIntoTransformedElement(t,r){const o=this._getPasteMarkersFromRangeMap(t);return this.editor.model.change(c=>{const u=this._insertFakeMarkersElements(c,o),m=r(c),b=this._removeFakeMarkersInsideElement(c,m);for(const k of Object.values(u).flat())c.remove(k);for(const[k,_]of Object.entries(b))c.model.markers.has(k)||c.addMarker(k,{usingOperation:!0,affectsData:!0,range:_});return m})}_pasteFragmentWithMarkers(t){const r=this._getPasteMarkersFromRangeMap(t.markers);t.markers.clear();for(const o of r)t.markers.set(o.name,o.range);return this.editor.model.insertContent(t)}
8472_forceMarkersCopy(t,r,o={allowedActions:"all",copyPartiallySelected:!0,duplicateOnPaste:!0}){const c=this._markersToCopy.get(t);this._markersToCopy.set(t,o),r(),c?this._markersToCopy.set(t,c):this._markersToCopy.delete(t)}_isMarkerCopyable(t,r){const o=this._getMarkerClipboardConfig(t);if(!o)return!1;if(!r)return!0;const{allowedActions:c}=o;return c==="all"||c.includes(r)}_hasMarkerConfiguration(t){return!!this._getMarkerClipboardConfig(t)}_getMarkerClipboardConfig(t){const[r]=t.split(":");return this._markersToCopy.get(r)||null}_insertFakeMarkersIntoSelection(t,r,o){const c=this._getCopyableMarkersFromSelection(t,r,o);return this._insertFakeMarkersElements(t,c)}_getCopyableMarkersFromSelection(t,r,o){const c=Array.from(r.getRanges()),u=new Set(c.flatMap(m=>Array.from(t.model.markers.getMarkersIntersectingRange(m))));return Array.from(u).filter(m=>{if(!this._isMarkerCopyable(m.name,o))return!1;const{copyPartiallySelected:b}=this._getMarkerClipboardConfig(m.name);if(!b){const k=m.getRange();return c.some(_=>_.containsRange(k,!0))}return!0}).map(m=>({name:o==="dragstart"?this._getUniqueMarkerName(m.name):m.name,range:m.getRange()}))}_getPasteMarkersFromRangeMap(t,r=null){const{model:o}=this.editor;return(t instanceof Map?Array.from(t.entries()):Object.entries(t)).flatMap(([c,u])=>{if(!this._hasMarkerConfiguration(c))return[{name:c,range:u}];if(this._isMarkerCopyable(c,r)){const m=this._getMarkerClipboardConfig(c),b=o.markers.has(c)&&o.markers.get(c).getRange().root.rootName==="$graveyard";return(m.duplicateOnPaste||b)&&(c=this._getUniqueMarkerName(c)),[{name:c,range:u}]}return[]})}_insertFakeMarkersElements(t,r){const o={},c=r.flatMap(u=>{const{start:m,end:b}=u.range;return[{position:m,marker:u,type:"start"},{position:b,marker:u,type:"end"}]}).sort(({position:u},{position:m})=>u.isBefore(m)?1:-1);for(const{position:u,marker:m,type:b}of c){const k=t.createElement("$marker",{"data-name":m.name,"data-type":b});o[m.name]||(o[m.name]=[]),o[m.name].push(k),t.insert(k,u)}return o}_removeFakeMarkersInsideElement(t,r){const o=this._getAllFakeMarkersFromElement(t,r).reduce((c,u)=>{const m=u.markerElement&&t.createPositionBefore(u.markerElement);let b=c[u.name],k=!1;b&&b.start&&b.end&&(this._getMarkerClipboardConfig(u.name).duplicateOnPaste?c[this._getUniqueMarkerName(u.name)]=c[u.name]:k=!0,b=null);var _,A;return k||(c[u.name]=(_=((N,T)=>{for(var O in T||(T={}))JY.call(T,O)&&QN(N,O,T[O]);if(YN)for(var O of YN(T))XY.call(T,O)&&QN(N,O,T[O]);return N})({},b),A={[u.type]:m},QY(_,ZY(A)))),u.markerElement&&t.remove(u.markerElement),c},{});return KY(o,c=>new de(c.start||t.createPositionFromPath(r,[0]),c.end||t.createPositionAt(r,"end")))}_getAllFakeMarkersFromElement(t,r){const o=Array.from(t.createRangeIn(r)).flatMap(({item:m})=>{if(!m.is("element","$marker"))return[];const b=m.getAttribute("data-name"),k=m.getAttribute("data-type");return[{markerElement:m,name:b,type:k}]}),c=[],u=[];for(const m of o)m.type==="end"&&(o.some(b=>b.name===m.name&&b.type==="start")||c.push({markerElement:null,name:m.name,type:"start"})),m.type==="start"&&(o.some(b=>b.name===m.name&&b.type==="end")||u.unshift({markerElement:null,name:m.name,type:"end"}));return[...c,...o,...u]}_getUniqueMarkerName(t){const r=t.split(":"),o=B().substring(1,6);return r.length===3?`${r.slice(0,2).join(":")}:${o}`:`${r.join(":")}:${o}`}}class $i extends Pe{static get pluginName(){return"ClipboardPipeline"}static get requires(){return[Eu]}init(){this.editor.editing.view.addObserver(Nu),this._setupPasteDrop(),this._setupCopyCut()}_fireOutputTransformationEvent(t,r,o){const c=this.editor.plugins.get("ClipboardMarkersUtils");this.editor.model.enqueueChange({isUndoable:o==="cut"},()=>{const u=c._copySelectedFragmentWithMarkers(o,r);this.fire("outputTransformation",{dataTransfer:t,content:u,method:o})})}_setupPasteDrop(){const t=this.editor,r=t.model,o=t.editing.view,c=o.document,u=this.editor.plugins.get("ClipboardMarkersUtils");this.listenTo(c,"clipboardInput",(m,b)=>{b.method!="paste"||t.model.canEditAt(t.model.document.selection)||m.stop()},{priority:"highest"}),this.listenTo(c,"clipboardInput",(m,b)=>{const k=b.dataTransfer;let _;if(b.content)_=b.content;else{let T="";k.getData("text/html")?T=function(O){return O.replace(/<span(?: class="Apple-converted-s
8472pace"|)>(\s+)<\/span>/g,(L,$)=>$.length==1?" ":$).replace(/<!--[\s\S]*?-->/g,"")}(k.getData("text/html")):k.getData("text/plain")&&(((A=(A=k.getData("text/plain")).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/\t/g," ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g," ")).includes("</p><p>")||A.includes("<br>"))&&(A=`<p>${A}</p>`),T=A),_=this.editor.data.htmlProcessor.toView(T)}var A;const N=new I(this,"inputTransformation");this.fire(N,{content:_,dataTransfer:k,targetRanges:b.targetRanges,method:b.method}),N.stop.called&&m.stop(),o.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(m,b)=>{if(b.content.isEmpty)return;const k=this.editor.data.toModel(b.content,"$clipboardHolder");k.childCount!=0&&(m.stop(),r.change(()=>{this.fire("contentInsertion",{content:k,method:b.method,dataTransfer:b.dataTransfer,targetRanges:b.targetRanges})}))},{priority:"low"}),this.listenTo(this,"contentInsertion",(m,b)=>{b.resultRange=u._pasteFragmentWithMarkers(b.content)},{priority:"low"})}_setupCopyCut(){const t=this.editor,r=t.model.document,o=t.editing.view.document,c=(u,m)=>{const b=m.dataTransfer;m.preventDefault(),this._fireOutputTransformationEvent(b,r.selection,u.name)};this.listenTo(o,"copy",c,{priority:"low"}),this.listenTo(o,"cut",(u,m)=>{t.model.canEditAt(t.model.document.selection)?c(u,m):m.preventDefault()},{priority:"low"}),this.listenTo(this,"outputTransformation",(u,m)=>{const b=t.data.toView(m.content);o.fire("clipboardOutput",{dataTransfer:m.dataTransfer,content:b,method:m.method})},{priority:"low"}),this.listenTo(o,"clipboardOutput",(u,m)=>{m.content.isEmpty||(m.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(m.content)),m.dataTransfer.setData("text/plain",GN(m.content))),m.method=="cut"&&t.model.deleteContent(r.selection)},{priority:"low"})}}class ZN{constructor(t,r=20){this._batch=null,this.model=t,this._size=0,this.limit=r,this._isLocked=!1,this._changeCallback=(o,c)=>{c.isLocal&&c.isUndoable&&c!==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(t){this._size+=t,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(t=!1){this.isLocked&&!t||(this._batch=null,this._size=0)}}class eQ extends St{constructor(t,r){super(t),this._buffer=new ZN(t.model,r),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(t={}){const r=this.editor.model,o=r.document,c=t.text||"",u=c.length;let m=o.selection;if(t.selection?m=t.selection:t.range&&(m=r.createSelection(t.range)),!r.canEditAt(m))return;const b=t.resultRange;r.enqueueChange(this._buffer.batch,k=>{this._buffer.lock();const _=Array.from(o.selection.getAttributes());r.deleteContent(m),c&&r.insertContent(k.createText(c,_),m),b?k.setSelection(b):m.is("documentSelection")||k.setSelection(m),this._buffer.unlock(),this._buffer.input(u)})}}const JN=["insertText","insertReplacementText"];class tQ extends $o{constructor(t){super(t),this.focusObserver=t.getObserver(gf),y.isAndroid&&JN.push("insertCompositionText");const r=t.document;r.on("beforeinput",(o,c)=>{if(!this.isEnabled)return;const{data:u,targetRanges:m,inputType:b,domEvent:k}=c;if(!JN.includes(b))return;this.focusObserver.flush();const _=new I(r,"insertText");r.fire(_,new Ac(t,k,{text:u,selection:t.createSelection(m)})),_.stop.called&&o.stop()}),r.on("compositionend",(o,{data:c,domEvent:u})=>{this.isEnabled&&!y.isAndroid&&c&&r.fire("insertText",new Ac(t,u,{text:c,selection:r.selection}))},{priority:"lowest"})}observe(){}stopObserving(){}}class XN extends Pe{static get pluginName(){return"Input"}init(){const t=this.editor,r=t.model,o=t.editing.view,c=r.document.selection;o.addObserver(tQ);const u=new eQ(t,t.config.get("typing.undoStep")||20);t.commands.add("insertText",u),t.commands.add("input",u),this.listenTo(o.document,"insertText",(m,b)=>{o.document.isComposing||b.preventDefault();const{text:k,selection:_,resultRange:A}=b,N=Array.from(_.getRanges()).map(L=>t.editing.mapper.toModelRange(L));let T=k;if(y.isAndroid){const L=Array.from(N[0].getItems()).reduce(($,U)=>$+(U.is("$textProxy")?U.data:""),"");L&&(L.length<=T.length?T.startsWith(L)&&(T=T.substring(L.length),N[0].start=N[0].start.getShiftedBy(L.length)):L.startsWith(T)&&(N[0].start=N[0].start.getShiftedBy(T.length),T=""))}const O={text:T,selection:r.createSelection(N)};A&&(O.resultRange=t.editing.mapper.toModelRange(A)),t.execute("insertText",O),o.scrollToTheSelection()}),y.isAndroid?this.listenTo(o.document,"keydown",(m,b)=>{!c.isCollapsed&&b.keyCode==229&&o.document.isComposing&&eE(r,u)}):this.listenTo(o.document,"compositionstart",()=>{c.isCollapsed||eE(r,u)})}}function eE(l,t){if(!t.isEnabled)return;const r=t.buffer;r.lock(),l.enqueueChange(r.batch,()=>{l.deleteContent(l.document.selection)}),r.unlock()}class tE extends St{constructor(t,r){super(t),this.direction=r,this._buffer=new ZN(t.model,t.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(t={}){const r=this.editor.model,o=r.document;r.enqueueChange(this._buffer.batch,c=>{this._buffer.lock();const u=c.createSelection(t.selection||o.selection);if(!r.canEditAt(u))return;const m=t.sequence||1,b=u.isCollapsed;if(u.isCollapsed&&r.modifySelection(u,{direction:this.direction,unit:t.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(m))return void this._replaceEntireContentWithParagraph(c);if(this._shouldReplaceFirstBlockWithParagraph(u,m))return void this.editor.execute("paragraph",{selection:u});if(u.isCollapsed)return;let k=0;
8472u.getFirstRange().getMinimalFlatRanges().forEach(_=>{k+=Fe(_.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),r.deleteContent(u,{doNotResetEntireContent:b,direction:this.direction}),this._buffer.input(k),c.setSelection(u),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(t){if(t>1)return!1;const r=this.editor.model,o=r.document.selection,c=r.schema.getLimitElement(o);if(!(o.isCollapsed&&o.containsEntireContent(c))||!r.schema.checkChild(c,"paragraph"))return!1;const u=c.getChild(0);return!u||!u.is("element","paragraph")}_replaceEntireContentWithParagraph(t){const r=this.editor.model,o=r.document.selection,c=r.schema.getLimitElement(o),u=t.createElement("paragraph");t.remove(t.createRangeIn(c)),t.insert(u,c),t.setSelection(u,0)}_shouldReplaceFirstBlockWithParagraph(t,r){const o=this.editor.model;if(r>1||this.direction!="backward"||!t.isCollapsed)return!1;const c=t.getFirstPosition(),u=o.schema.getLimitElement(c),m=u.getChild(0);return c.parent==m&&!!t.containsEntireContent(m)&&!!o.schema.checkChild(u,"paragraph")&&m.name!="paragraph"}}const nE="word",la="selection",Mc="backward",Su="forward",rE={deleteContent:{unit:la,direction:Mc},deleteContentBackward:{unit:"codePoint",direction:Mc},deleteWordBackward:{unit:nE,direction:Mc},deleteHardLineBackward:{unit:la,direction:Mc},deleteSoftLineBackward:{unit:la,direction:Mc},deleteContentForward:{unit:"character",direction:Su},deleteWordForward:{unit:nE,direction:Su},deleteHardLineForward:{unit:la,direction:Su},deleteSoftLineForward:{unit:la,direction:Su}};class nQ extends $o{constructor(t){super(t);const r=t.document;let o=0;r.on("keydown",()=>{o++}),r.on("keyup",()=>{o=0}),r.on("beforeinput",(c,u)=>{if(!this.isEnabled)return;const{targetRanges:m,domEvent:b,inputType:k}=u,_=rE[k];if(!_)return;const A={direction:_.direction,unit:_.unit,sequence:o};A.unit==la&&(A.selectionToRemove=t.createSelection(m[0])),k==="deleteContentBackward"&&(y.isAndroid&&(A.sequence=1),function(T){if(T.length!=1||T[0].isCollapsed)return!1;const O=T[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let L=0;for(const{nextPosition:$,item:U}of O){if($.parent.is("$text")){const H=$.parent.data,J=$.offset;if(Nk(H,J)||Ek(H,J)||z2(H,J))continue;L++}else(U.is("containerElement")||U.is("emptyElement"))&&L++;if(L>1)return!0}return!1}(m)&&(A.unit=la,A.selectionToRemove=t.createSelection(m)));const N=new vc(r,"delete",m[0]);r.fire(N,new Ac(t,b,A)),N.stop.called&&c.stop()}),y.isBlink&&function(c){const u=c.view,m=u.document;let b=null,k=!1;function _(N){return N==Mt.backspace||N==Mt.delete}function A(N){return N==Mt.backspace?Mc:Su}
8472m.on("keydown",(N,{keyCode:T})=>{b=T,k=!1}),m.on("keyup",(N,{keyCode:T,domEvent:O})=>{const L=m.selection,$=c.isEnabled&&T==b&&_(T)&&!L.isCollapsed&&!k;if(b=null,$){const U=L.getFirstRange(),H=new vc(m,"delete",U),J={unit:la,direction:A(T),selectionToRemove:L};m.fire(H,new Ac(u,O,J))}}),m.on("beforeinput",(N,{inputType:T})=>{const O=rE[T];_(b)&&O&&O.direction==A(b)&&(k=!0)},{priority:"high"}),m.on("beforeinput",(N,{inputType:T,data:O})=>{b==Mt.delete&&T=="insertText"&&O=="�"&&N.stop()},{priority:"high"})}(this)}observe(){}stopObserving(){}}class bs extends Pe{static get pluginName(){return"Delete"}init(){const t=this.editor,r=t.editing.view,o=r.document,c=t.model.document;r.addObserver(nQ),this._undoOnBackspace=!1;const u=new tE(t,"forward");t.commands.add("deleteForward",u),t.commands.add("forwardDelete",u),t.commands.add("delete",new tE(t,"backward")),this.listenTo(o,"delete",(m,b)=>{o.isComposing||b.preventDefault();const{direction:k,sequence:_,selectionToRemove:A,unit:N}=b,T=k==="forward"?"deleteForward":"delete",O={sequence:_};if(N=="selection"){const L=Array.from(A.getRanges()).map($=>t.editing.mapper.toModelRange($));O.selection=t.model.createSelection(L)}else O.unit=N;t.execute(T,O),r.scrollToTheSelection()},{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(o,"delete",(m,b)=>{this._undoOnBackspace&&b.direction=="backward"&&b.sequence==1&&b.unit=="codePoint"&&(this._undoOnBackspace=!1,t.execute("undo"),b.preventDefault(),m.stop())},{context:"$capture"}),this.listenTo(c,"change",()=>{this._undoOnBackspace=!1}))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class rQ extends Pe{static get requires(){return[XN,bs]}static get pluginName(){return"Typing"}}function iE(l,t){let r=l.start;return{text:Array.from(l.getWalker({ignoreElementEnd:!1})).reduce((o,{item:c})=>c.is("$text")||c.is("$textProxy")?o+c.data:(r=t.createPositionAfter(c),""),""),range:t.createRange(r,l.end)}}class oE extends fe(){constructor(t,r){super(),this.model=t,this.testCallback=r,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",()=>{this.isEnabled?this._startListening():(this.stopListening(t.document.selection),this.stopListening(t.document))}),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const t=this.model.document;this.listenTo(t.selection,"change:range",(r,{directChange:o})=>{o&&(t.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))}),this.listenTo(t,"change:data",(r,o)=>{!o.isUndo&&o.isLocal&&this._evaluateTextBeforeSelection("data",{batch:o})})}_evaluateTextBeforeSelection(t,r={}){const o=this.model,c=o.document.selection,u=o.createRange(o.createPositionAt(c.focus.parent,0),c.focus),{text:m,range:b}=iE(u,o),k=this.testCallback(m);if(!k&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!k,k){const _=Object.assign(r,{text:m,range:b});typeof k=="object"&&Object.assign(_,k),this.fire(`matched:${t}`,_)}}}class sE extends Pe{constructor(t){super(t),this._isNextGravityRestorationSkipped=!1,this.attributes=new Set,this._overrideUid=null}static get pluginName(){return"TwoStepCaretMovement"}init(){const t=this.editor,r=t.model,o=t.editing.view,c=t.locale,u=r.document.selection;this.listenTo(o.document,"arrowKey",(m,b)=>{if(!u.isCollapsed||b.shiftKey||b.altKey||b.ctrlKey)return;const k=b.keyCode==Mt.arrowright,_=b.keyCode==Mt.arrowleft;if(!k&&!_)return;const A=c.contentLanguageDirection;let N=!1;N=A==="ltr"&&k||A==="rtl"&&_?this._handleForwardMovement(b):this._handleBackwardMovement(b),N===!0&&m.stop()},{context:"$text",priority:"highest"}),this.listenTo(u,"change:range",(m,b)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!b.directChange&&Vi(u.getFirstPosition(),this.attributes)||this._restoreGravity())}),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(t){this.attributes.add(t)}_handleForwardMovement(t){const r=this.attributes,o=this.editor.model,c=o.document.selection,u=c.getFirstPosition();return!this._isGravityOverridden&&(!u.isAtStart||!ks(c,r))&&!!Vi(u,r)&&(Tu(t),ks(c,r)&&Vi(u,r,!0)?Du(o,r):this._overrideGravity(),!0)}_handleBackwardMovement(t){const r=this.attributes,o=this.editor.model,c=o.document.selection,u=c.getFirstPosition();return this._isGravityOverridden?(Tu(t),this._restoreGravity(),Vi(u,r,!0)?Du(o,r):Lf(o,r,u),!0):u.isAtStart?!!ks(c,r)&&(Tu
8472(t),Lf(o,r,u),!0):!ks(c,r)&&Vi(u,r,!0)?(Tu(t),Lf(o,r,u),!0):!!aE(u,r)&&(u.isAtEnd&&!ks(c,r)&&Vi(u,r)?(Tu(t),Lf(o,r,u),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}_enableClickingAfterNode(){const t=this.editor,r=t.model,o=r.document.selection,c=t.editing.view.document;t.editing.view.addObserver(dy);let u=!1;this.listenTo(c,"mousedown",()=>{u=!0}),this.listenTo(c,"selectionChange",()=>{const m=this.attributes;if(!u||(u=!1,!o.isCollapsed)||!ks(o,m))return;const b=o.getFirstPosition();Vi(b,m)&&(b.isAtStart||Vi(b,m,!0)?Du(r,m):this._isGravityOverridden||this._overrideGravity())})}_enableInsertContentSelectionAttributesFixer(){const t=this.editor.model,r=t.document.selection,o=this.attributes;this.listenTo(t,"insertContent",()=>{const c=r.getFirstPosition();ks(r,o)&&Vi(c,o)&&Du(t,o)},{priority:"low"})}_handleDeleteContentAfterNode(){const t=this.editor,r=t.model,o=r.document.selection,c=t.editing.view;let u=!1,m=!1;this.listenTo(c.document,"delete",(b,k)=>{u=k.direction==="backward"},{priority:"high"}),this.listenTo(r,"deleteContent",()=>{if(!u)return;const b=o.getFirstPosition();m=ks(o,this.attributes)&&!aE(b,this.attributes)},{priority:"high"}),this.listenTo(r,"deleteContent",()=>{u&&(u=!1,m||t.model.enqueueChange(()=>{const b=o.getFirstPosition();ks(o,this.attributes)&&Vi(b,this.attributes)&&(b.isAtStart||Vi(b,this.attributes,!0)?Du(r,this.attributes):this._isGravityOverridden||this._overrideGravity())}))},{priority:"low"})}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change(t=>t.overrideSelectionGravity())}_restoreGravity(){this.editor.model.change(t=>{t.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}}function ks(l,t){for(const r of t)if(l.hasAttribute(r))return!0;return!1}function Lf(l,t,r){const o=r.nodeBefore;l.change(c=>{if(o){const u=[],m=l.schema.isObject(o)&&l.schema.isInline(o);for(const[b,k]of o.getAttributes())!l.schema.checkAttribute("$text",b)||m&&l.schema.getAttributeProperties(b).copyFromObject===!1||u.push([b,k]);c.setSelectionAttribute(u)}else c.removeSelectionAttribute(t)})}function Du(l,t){l.change(r=>{r.removeSelectionAttribute(t)})}function Tu(l){l.preventDefault()}function aE(l,t){return Vi(l.getShiftedBy(-1),t)}function Vi(l,t,r=!1){const{nodeBefore:o,nodeAfter:c}=l;for(const u of t){const m=o?o.getAttribute(u):void 0,b=c?c.getAttribute(u):void 0;if((!r||m!==void 0&&b!==void 0)&&b!==m)return!0}return!1}const lE={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"â¢"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"â
",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"â
",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"â¤"},greaterThanOrEqual:{from:">=",to:"â¥"},notEqual:{from:"!=",to:"â "},arrowLeft:{from:"<-",to:"â"},arrowRight:{from:"->",to:"â"},horizontalEllipsis:{from:"...",to:"â¦"},enDash:{from:/(^| )(--)( )$/,to:[null,"â",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"â",null]},quotesPrimary:{from:Pc('"'),to:[null,"â",null,"â"]},quotesSecondary:{from:Pc("'"),to:[null,"â",null,"â"]},quotesPrimaryEnGb:{from:Pc("'"),to:[null,"â",null,"â"]},quotesSecondaryEnGb:{from:Pc('"'),to:[null,"â",null,"â"]},quotesPrimaryPl:{from:Pc('"'),to:[null,"â",null,"â"]},quotesSecondaryPl:{from:Pc("'"),to:[null,"â",null,"â"]}},cE={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},iQ=["symbols","mathematical","typography","quotes"];function oQ(l){return typeof l=="string"?new RegExp(`(${uN(l)})$`):l}function sQ(l){return typeof l=="string"?()=>[l]:l instanceof Array?()=>l:l}function aQ(l){return(l.textNode?l.textNode:l.nodeAfter).getAttributes()}function Pc(l){return new RegExp(`(^|\\s)(${l})([^${l}]*)(${l})$`)}function Rf(l,t,r,o){return o.createRange(dE(l,t,r,!0,o),dE(l,t,r,!1,o))}function dE(l,t,r,o,c){let u=l.textNode||(o?l.nodeBefore:l.nodeAfter),m=null;for(;u&&u.getAttribute(t)==r;)m=u,u=o?u.previousSibling:u.nextSibling;return m?c.createPositionAt(m,o?"before":"after"):l}function*uE(l,t){for(const r of t)r&&l.getAttributeProperties(r[0]).copyOnEnter&&(yield r)}class lQ extends St{execute(){this.editor.model.change(t=>
vendor: 4,684 bytes, line 8472
8472{this.enterBlock(t),this.fire("afterExecute",{writer:t})})}enterBlock(t){const r=this.editor.model,o=r.document.selection,c=r.schema,u=o.isCollapsed,m=o.getFirstRange(),b=m.start.parent,k=m.end.parent;if(c.isLimit(b)||c.isLimit(k))return u||b!=k||r.deleteContent(o),!1;if(u){const _=uE(t.model.schema,o.getAttributes());return hE(t,m.start),t.setSelectionAttribute(_),!0}{const _=!(m.start.isAtStart&&m.end.isAtEnd),A=b==k;if(r.deleteContent(o,{leaveUnmerged:_}),_){if(A)return hE(t,o.focus),!0;t.setSelection(k,0)}}return!1}}function hE(l,t){l.split(t),l.setSelection(t.parent.nextSibling,0)}const cQ={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class mE extends $o{constructor(t){super(t);const r=this.document;let o=!1;r.on("keydown",(c,u)=>{o=u.shiftKey}),r.on("beforeinput",(c,u)=>{if(!this.isEnabled)return;let m=u.inputType;y.isSafari&&o&&m=="insertParagraph"&&(m="insertLineBreak");const b=u.domEvent,k=cQ[m];if(!k)return;const _=new vc(r,"enter",u.targetRanges[0]);r.fire(_,new Ac(t,b,{isSoft:k.isSoft})),_.stop.called&&c.stop()})}observe(){}stopObserving(){}}class zf extends Pe{static get pluginName(){return"Enter"}init(){const t=this.editor,r=t.editing.view,o=r.document,c=this.editor.t;r.addObserver(mE),t.commands.add("enter",new lQ(t)),this.listenTo(o,"enter",(u,m)=>{o.isComposing||m.preventDefault(),m.isSoft||(t.execute("enter"),r.scrollToTheSelection())},{priority:"low"}),t.accessibility.addKeystrokeInfos({keystrokes:[{label:c("Insert a hard break (a new paragraph)"),keystroke:"Enter"}]})}}class dQ extends St{execute(){const t=this.editor.model,r=t.document;t.change(o=>{(function(c,u,m){const b=m.isCollapsed,k=m.getFirstRange(),_=k.start.parent,A=k.end.parent,N=_==A;if(b){const T=uE(c.schema,m.getAttributes());fE(c,u,k.end),u.removeSelectionAttribute(m.getAttributeKeys()),u.setSelectionAttribute(T)}else{const T=!(k.start.isAtStart&&k.end.isAtEnd);c.deleteContent(m,{leaveUnmerged:T}),N?fE(c,u,m.focus):T&&u.setSelection(A,0)}})(t,o,r.selection),this.fire("afterExecute",{writer:o})})}refresh(){const t=this.editor.model,r=t.document;this.isEnabled=function(o,c){if(c.rangeCount>1)return!1;const u=c.anchor;if(!u||!o.checkChild(u,"softBreak"))return!1;const m=c.getFirstRange(),b=m.start.parent,k=m.end.parent;return!((Ty(b,o)||Ty(k,o))&&b!==k)}(t.schema,r.selection)}}function fE(l,t,r){const o=t.createElement("softBreak");l.insertContent(o,r),t.setSelection(o,"after")}function Ty(l,t){return!l.is("rootElement")&&(t.isLimit(l)||Ty(l.parent,t))}class uQ extends Pe{static get pluginName(){return"ShiftEnter"}init(){const t=this.editor,r=t.model.schema,o=t.conversion,c=t.editing.view,u=c.document,m=this.editor.t;r.register("softBreak",{allowWhere:"$text",isInline:!0}),o.for("upcast").elementToElement({model:"softBreak",view:"br"}),o.for("downcast").elementToElement({model:"softBreak",view:(b,{writer:k})=>k.createEmptyElement("br")}),c.addObserver(mE),t.commands.add("shiftEnter",new dQ(t)),this.listenTo(u,"enter",(b,k)=>{u.isComposing||k.preventDefault(),k.isSoft&&(t.execute("shiftEnter"),c.scrollToTheSelection())},{priority:"low"}),t.accessibility.addKeystrokeInfos({keystrokes:[{label:m("Insert a soft break (a <code><br></code> element)"),keystroke:"Shift+Enter"}]})}}class hQ extends ee(){constructor(){super(...arguments),this._stack=[]}add(t,r){const o=this._stack,c=o[0];this._insertDescriptor(t);const u=o[0];c===u||Iy(c,u)||this.fire("change:top",{oldDescriptor:c,newDescriptor:u,writer:r})}remove(t,r){const o=this._stack,c=o[0];this._removeDescriptor(t);const u=o[0];c===u||Iy(c,u)||this.fire("change:top",{oldDescriptor:c,newDescriptor:u,writer:r})}_insertDescriptor(t){const r=this._stack,o=r.findIndex(u=>u.id===t.id);if(Iy(t,r[o]))return;o>-1&&r.splice(o,1);let c=0;for(;r[c]&&mQ(r[c],t);)c++;r.splice(c,0,t)}_removeDescriptor(t){const r=this._stack,o=r.findIndex(c=>c.id===t);o>-1&&r.splice(o,1)}}function Iy(l,t){return l&&t&&l.priority==t.priority&&Ff(l.classes)==Ff(t.classes)}function mQ(l,t){return l.priority>t.priority||!(l.priority<t.priority)&&Ff(l.classes)>Ff(t.classes)}function Ff(l){return Array.isArray(l)?l.sort().join(","):l}const fQ='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>',pQ="ck-widget",pE="ck-widget_selected";function In(l){return!!l.is("element")&&!!l.getCustomProperty("widget")}function My(l,t,r={}
8472){if(!l.is("containerElement"))throw new P("widget-to-widget-wrong-element-type",null,{element:l});return t.setAttribute("contenteditable","false",l),t.addClass(pQ,l),t.setCustomProperty("widget",!0,l),l.getFillerOffset=kQ,t.setCustomProperty("widgetLabel",[],l),r.label&&function(o,c){o.getCustomProperty("widgetLabel").push(c)}(l,r.label),r.hasSelectionHandle&&function(o,c){const u=c.createUIElement("div",{class:"ck ck-widget__selection-handle"},function(m){const b=this.toDomElement(m),k=new fs;return k.set("content",fQ),k.render(),b.appendChild(k.element),b});c.insert(c.createPositionAt(o,0),u),c.addClass(["ck-widget_with-selection-handle"],o)}(l,t),gE(l,t),l}function gQ(l,t,r){if(t.classes&&r.addClass(tn(t.classes),l),t.attributes)for(const o in t.attributes)r.setAttribute(o,t.attributes[o],l)}function bQ(l,t,r){if(t.classes&&r.removeClass(tn(t.classes),l),t.attributes)for(const o in t.attributes)r.removeAttribute(o,l)}function gE(l,t,r=gQ,o=bQ){const c=new hQ;c.on("change:top",(u,m)=>{m.oldDescriptor&&o(l,m.oldDescriptor,m.writer),m.newDescriptor&&r(l,m.newDescriptor,m.writer)}),t.setCustomProperty("addHighlight",(u,m,b)=>c.add(m,b),l),t.setCustomProperty("removeHighlight",(u,m,b)=>c.remove(m,b),l)}function bE(l,t,r={}){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],l),t.setAttribute("role","textbox",l),t.setAttribute("tabindex","-1",l),r.label&&t.setAttribute("aria-label",r.label,l),t.setAttribute("contenteditable",l.isReadOnly?"false":"true",l),l.on("change:isReadOnly",(o,c,u)=>{t.setAttribute("contenteditable",u?"false":"true",l)}
8472),l.on("change:isFocused",(o,c,u)=>{u?t.addClass("ck-editor__nested-editable_focused",l):t.removeClass("ck-editor__nested-editable_focused",l)}),gE(l,t),l}function kE(l,t){const r=l.getSelectedElement();if(r){const o=ca(l);if(o)return t.createRange(t.createPositionAt(r,o))}return t.schema.findOptimalInsertionRange(l)}function kQ(){return null}const ys="widget-type-around";function hl(l,t,r){return!!l&&In(l)&&!r.isInline(t)}function ca(l){return l.getAttribute(ys)}var yE=d(8508),yQ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(yE.A,yQ),yE.A.locals;const xE=["before","after"],xQ=new DOMParser().parseFromString('<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>',"image/svg+xml").firstChild,vE="ck-widget__type-around_disabled";class vQ extends Pe{constructor(){super(...arguments),this._currentFakeCaretModelElement=null}static get pluginName(){return"WidgetTypeAround"}static get requires(){return[zf,bs]}init(){const t=this.editor,r=t.editing.view;this.on("change:isEnabled",(o,c,u)=>{r.change(m=>{for(const b of r.document.roots)u?m.removeClass(vE,b):m.addClass(vE,b)}),u||t.model.change(m=>{m.removeSelectionAttribute(ys)})}),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(t,r){const o=this.editor,c=o.editing.view,u=o.model.schema.getAttributesWithProperty(t,"copyOnReplace",!0);o.execute("insertParagraph",{position:o.model.createPositionAt(t,r),attributes:u}),c.focus(),c.scrollToTheSelection()}_listenToIfEnabled(t,r,o,c){this.listenTo(t,r,(...u)=>{this.isEnabled&&o(...u)},c)}_insertParagraphAccordingToFakeCaretPosition(){const t=this.editor.model.document.selection,r=ca(t);if(!r)return!1;const o=t.getSelectedElement();return this._insertParagraph(o,r),!0}_enableTypeAroundUIInjection(){const t=this.editor,r=t.model.schema,o=t.locale.t,c={before:o("Insert paragraph before block"),after:o("Insert paragraph after block")};t.editing.downcastDispatcher.on("insert",(u,m,b)=>{const k=b.mapper.toViewElement(m.item);k&&hl(k,m.item,r)&&(function(_,A,N){const T=_.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},function(O){const L=this.toDomElement(O);return function($,U){for(const H of xE){const J=new ao({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${H}`],title:U[H],"aria-hidden":"true"},children:[$.ownerDocument.importNode(xQ,!0)]});$.appendChild(J.render())}}(L,A),function($){const U=new ao({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});$.appendChild(U.render())}(L),L});_.insert(_.createPositionAt(N,"end"),T)}(b.writer,c,k),k.getCustomProperty("widgetLabel").push(()=>this.isEnabled?o("Press Enter to type after or press Shift + Enter to type before the widget"):""))},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const t=this.editor,r=t.model,o=r.document.selection,c=r.schema,u=t.editing.view;function m(b){return`ck-widget_type-around_show-fake-caret_${b}`}this._listenToIfEnabled(u.document,"arrowKey",(b,k)=>{this._handleArrowKeyPress(b,k)},{context:[In,"$text"],priority:"high"}),this._listenToIfEnabled(o,"change:range",(b,k)=>{k.directChange&&t.model.change(_=>{_.removeSelectionAttribute(ys)})}),this._listenToIfEnabled(r.document,"change:data",()=>{const b=o.getSelectedElement();b&&hl(t.editing.mapper.toViewElement(b),b,c)||t.model.change(k=>{k.removeSelectionAttribute(ys)})}),this._listenToIfEnabled(t.editing.downcastDispatcher,"selection",(b,k,_)=>{const A=_.writer;if(this._currentFakeCaretModelElement){const L=_.mapper.toViewElement(this._currentFakeCaretModelElement);L&&(A.removeClass(xE.map(m),L),this._currentFakeCaretModelElement=null)}const N=k.selection.getSelectedElement();if(!N)return;const T=_.mapper.toViewElement(N);if(!hl(T,N,c))return;const O=ca(k.selection);O&&(A.addClass(m(O),T),this._currentFakeCaretModelElement=N)}),this._listenToIfEnabled(t.ui.focusTracker,"change:isFocused",(b,k,_)=>{_||t.model.change(A=>{A.removeSelectionAttribute(ys)})})}_handleArrowKeyPress(t,r){const o=this.editor,c=o.model,u=c.document.selection,m=c.schema,b=o.editing.view,k=function(N,T){const O=_k(N,T);return O==="down"||O==="right"}(r.keyCode,o.locale.contentLanguageDirection),_=b.document.selection.getSelectedElement();let A;hl(_,o.editing.mapper.toModelElement(_),m)?A=this._handleArrowKeyPressOnSelectedWidget(k):u.isCollapsed?A=this._handleArrowKeyPressWhenSelectionNextToAWidget(k):r.shiftKey||(A=this._handleArrowKeyPressWhenNonCollapsedSelection(k)),A&&(r.preventDefault(),t.stop())}_handleArrowKeyPressOnSelectedWidget(t){const r=this.editor.model,o=ca(r.document.selection);return r.change(c=>o?o!==(t?"after":"before")?(c.removeSelectionAttribute(ys),!0):!1:(c.setSelectionAttribute(ys,t?"after":"before"),!0))}_handleArrowKeyPressWhenSelectionNextToAWidget(t){const r=this.editor,o=r.model,c=o.schema,u=r.plugins.get("Widget"),m=u._getObjectElementNextToSelection(t);return!!hl(r.editing.mapper.toViewElement(m),m,c)&&(o.change(b=>{u._setSelectionOverElement(m),b.setSelectionAttribute(ys,t?"before":"after")}),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(t){const r=this.editor,o=r.model,c=o.schema,u=r.editing.mapper,m=o.document.selection,b=t?m.getLastPosition().nodeBefore:m.getFirstPosition().nodeAfter;return!!hl(u.toViewElement(b),b,c)&&(o.change(k=>{k.setSelection(b,"on"),k.setSelectionAttribute(ys,t?"after":"before")}),!0)}_enableInsertingParagraphsOnButtonClick(){const t=this.editor,r=t.editing.view;this._listenToIfEnabled(r.document,"mousedown",(o,c)=>{const u=c.domTarget.closest(".ck-widget__type-around__button");if(!u)return;const m=function(_){return _.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(u),b=function(_,A){const N=_.closest(".ck-widget");return A.mapDomToView(N)}(u,r.domConverter),k=t.editing.mapper.toModelElement(b);this._insertParagraph(k,m),c.preventDefault(),o.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const t=this.editor,r=t.model.document.selection,o=t.editing.view;this._listenToIfEnabled(o.document,"enter",(c,u)=>{if(c.eventPhase!="atTarget")return;const m=r.getSelectedElement(),b=t.editing.mapper.toViewElement(m),k=t.model.schema;let _;this._insertParagraphAccordingToFakeCaretPosition()?_=!0:hl(b,m,k)&&(this._insertParagraph(m,u.isSoft?"before":"after"),_=!0),_&&(u.preventDefault(),c.stop())},{context:In})}_enableInsertingParagraphsOnTypingKeystroke(){const t=this.editor.editing.view.document;this._listenToIfEnabled(t,"insertText",(r,o)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(o.selection=t.selection)},{priority:"high"}),y.isAndroid?this._listenToIfEnabled(t,"keydown",(r,o)=>{o.keyCode==229&&this._insertParagraphAccordingToFakeCaretPosition()}):this._listenToIfEnabled(t,"compositionstart",()=>{this._insertParagraphAccordingToFakeCaretPosition()},{priority:"high"})}_enableDeleteIntegration(){const t=this.editor,r=t.editing.view,o=t.model,c=o.schema;this._listenToIfEnabled(r.document,"delete",(u,m)=>{if(u.eventPhase!="atTarget")return;const b=ca(o.document.selection);if(!b)return;const k=m.direction,_=o.document.selection.getSelectedElement(),A=k=="forward";if(b==="before"===A)t.execute("delete",{selection:o.createSelection(_,"on")});else{const N=c.getNearestSelectionRange(o.createPositionAt(_,b),k);if(N)if(N.isCollapsed){const T=o.createSelection(N.start);if(o.modifySelection(T,{direction:k}),T.focus.isEqual(N.start)){const O=function(L,$){let U=$;for(const H of $.getAncestors({parentFirst:!0})){if(H.childCount>1||L.isLimit(H))break;U=H}return U}(c,N.start.parent);o.deleteContent(o.createSelection(O,"on"),{doNotAutoparagraph:!0})}else o.change(O=>{O.setSelection(N),t.execute(A?"deleteForward":"delete")})}else o.change(T=>{T.setSelection(N),t.execute(A?"deleteForward":"delete")})}m.preventDefault(),u.stop()},{context:In})}_enableInsertContentIntegration(){const t=this.editor,r=this.editor.model,o=r.document.selection;this._listenToIfEnabled(t.model,"insertContent",(c,[u,m])=>{if(m&&!m.is("documentSelection"))return;const b=ca(o);return b?(c.stop(),r.change(k=>{const _=o.getSelectedElement(),A=r.createPositionAt(_,b),N=k.createSelection(A),T=r.insertContent(u,N);return k.setSelection(N),T})):void 0},{priority:"high"})}_enableInsertObjectIntegration(){const t=this.editor,r=this.editor.model.document.selection;this._listenToIfEnabled(t.model,"insertObject",(o,c)=>{const[,u,m={}]=c;if(u&&!u.is("documentSelection"))return;const b=ca(r);b&&(m.findOptimalPosition=b,c[3]=m)},{priority:"high"})}_enableDeleteContentIntegration(){const t=this.editor,r=this.editor.model.document.selection;this._listenToIfEnabled(t.model,"deleteContent",(o,[c])=>{c&&!c.is("documentSelection")||ca(r)&&o.stop()},{priority:"high"})}}function wQ(l){const t=l.model;return(r,o)=>{const c=o.keyCode==Mt.arrowup,u=o.keyCode==Mt.arrowdown,m=o.shift
8472Key,b=t.document.selection;if(!c&&!u)return;const k=u;if(m&&function(A,N){return!A.isCollapsed&&A.isBackward==N}(b,k))return;const _=function(A,N,T){const O=A.model;if(T){const L=N.isCollapsed?N.focus:N.getLastPosition(),$=wE(O,L,"forward");if(!$)return null;const U=O.createRange(L,$),H=_E(O.schema,U,"backward");return H?O.createRange(L,H):null}{const L=N.isCollapsed?N.focus:N.getFirstPosition(),$=wE(O,L,"backward");if(!$)return null;const U=O.createRange($,L),H=_E(O.schema,U,"forward");return H?O.createRange(H,L):null}}(l,b,k);if(_){if(_.isCollapsed&&(b.isCollapsed||m))return;(_.isCollapsed||function(A,N,T){const O=A.model,L=A.view.domConverter;if(T){const ae=O.createSelection(N.start);O.modifySelection(ae),ae.focus.isAtEnd||N.start.isEqual(ae.focus)||(N=O.createRange(ae.focus,N.end))}const $=A.mapper.toViewRange(N),U=L.viewRangeToDom($),H=Tt.getDomRangeRects(U);let J;for(const ae of H)if(J!==void 0){if(Math.round(ae.top)>=J)return!1;J=Math.max(J,Math.round(ae.bottom))}else J=Math.round(ae.bottom);return!0}(l,_,k))&&(t.change(A=>{const N=k?_.end:_.start;if(m){const T=t.createSelection(b.anchor);T.setFocus(N),A.setSelection(T)}else A.setSelection(N)}),r.stop(),o.preventDefault(),o.stopPropagation())}}}function wE(l,t,r){const o=l.schema,c=l.createRangeIn(t.root),u=r=="forward"?"elementStart":"elementEnd";for(const{previousPosition:m,item:b,type:k}of c.getWalker({startPosition:t,direction:r})){if(o.isLimit(b)&&!o.isInline(b))return m;if(k==u&&o.isBlock(b))return null}return null}function _E(l,t,r){const o=r=="backward"?t.end:t.start;if(l.checkChild(o,"$text"))return o;for(const{nextPosition:c}of t.getWalker({direction:r}))if(l.checkChild(c,"$text"))return c;return null}var AE=d(695),_Q={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(AE.A,_Q),AE.A.locals;class Iu extends Pe{constructor(){super(...arguments),this._previouslySelected=new Set}static get pluginName(){return"Widget"}static get requires(){return[vQ,bs]}init(){const t=this.editor,r=t.editing.view,o=r.document,c=t.t;this.editor.editing.downcastDispatcher.on("selection",(u,m,b)=>{const k=b.writer,_=m.selection;if(_.isCollapsed)return;const A=_.getSelectedElement();if(!A)return;const N=t.editing.mapper.toViewElement(A);var T;In(N)&&b.consumable.consume(_,"selection")&&k.setSelection(k.createRangeOn(N),{fake:!0,label:(T=N,T.getCustomProperty("widgetLabel").reduce((O,L)=>typeof L=="function"?O?O+". "+L():L():O?O+". "+L:L,""))})}),this.editor.editing.downcastDispatcher.on("selection",(u,m,b)=>{this._clearPreviouslySelectedWidgets(b.writer);const k=b.writer,_=k.document.selection;let A=null;for(const N of _.getRanges())for(const T of N){const O=T.item;In(O)&&!AQ(O,A)&&(k.addClass(pE,O),this._previouslySelected.add(O),A=O)}},{priority:"low"}),r.addObserver(dy),this.listenTo(o,"mousedown",(...u)=>this._onMousedown(...u)),this.listenTo(o,"arrowKey",(...u)=>{this._handleSelectionChangeOnArrowKeyPress(...u)},{context:[In,"$text"]}),this.listenTo(o,"arrowKey",(...u)=>{this._preventDefaultOnArrowKeyPress(...u)},{context:"$root"}),this.listenTo(o,"arrowKey",wQ(this.editor.editing),{context:"$text"}),this.listenTo(o,"delete",(u,m)=>{this._handleDelete(m.direction=="forward")&&(m.preventDefault(),u.stop())},{context:"$root"}),this.listenTo(o,"tab",(u,m)=>{u.eventPhase=="atTarget"&&(m.shiftKey||this._selectFirstNestedEditable()&&(m.preventDefault(),u.stop()))},{context:In,priority:"low"}),this.listenTo(o,"tab",(u,m)=>{m.shiftKey&&this._selectAncestorWidget()&&(m.preventDefault(),u.stop())},{priority:"low"}),this.listenTo(o,"keydown",(u,m)=>{m.keystroke==Mt.esc&&this._selectAncestorWidget()&&(m.preventDefault(),u.stop())},{priority:"low"}),t.accessibility.addKeystrokeInfoGroup({id:"widget",label:c("Keystrokes that can be used when a widget is selected (for example: image, table, etc.)"),keystrokes:[{label:c("Insert a new paragraph directly after a widget"),keystroke:"Enter"},{label:c("Insert a new paragraph directly before a widget"),keystroke:"Shift+Enter"},{label:c("Move the caret to allow typing directly before a widget"),keystroke:[["arrowup"],["arrowleft"]]},{label:c("Move the caret to allow typing directly after a widget"),keystroke:[["arrowdown"],["arrowright"]]}]})}_onMousedown(t,r){const o=this.editor,c=o.editing.view,u=c.document;let m=r.target;if(r.domEvent.detail>=3)return void(this._selectBlockContent(m)&&r.preventDefault());if(function(k){let _=k;for(;_;){if(_.is("editableElement")&&!_.is("rootElement"))return!0;
8472if(In(_))return!1;_=_.parent}return!1}(m)||!In(m)&&(m=m.findAncestor(In),!m))return;y.isAndroid&&r.preventDefault(),u.isFocused||c.focus();const b=o.editing.mapper.toModelElement(m);this._setSelectionOverElement(b)}_selectBlockContent(t){const r=this.editor,o=r.model,c=r.editing.mapper,u=o.schema,m=c.findMappedViewAncestor(this.editor.editing.view.createPositionAt(t,0)),b=function(k,_){for(const A of k.getAncestors({includeSelf:!0,parentFirst:!0})){if(_.checkChild(A,"$text"))return A;if(_.isLimit(A)&&!_.isObject(A))break}return null}(c.toModelElement(m),o.schema);return!!b&&(o.change(k=>{const _=u.isLimit(b)?null:function(T,O){const L=new ds({startPosition:T});for(const{item:$}of L){if(O.isLimit($)||!$.is("element"))return null;if(O.checkChild($,"$text"))return $}return null}(k.createPositionAfter(b),u),A=k.createPositionAt(b,0),N=_?k.createPositionAt(_,0):k.createPositionAt(b,"end");k.setSelection(k.createRange(A,N))}),!0)}_handleSelectionChangeOnArrowKeyPress(t,r){const o=r.keyCode,c=this.editor.model,u=c.schema,m=c.document.selection,b=m.getSelectedElement(),k=_k(o,this.editor.locale.contentLanguageDirection),_=k=="down"||k=="right",A=k=="up"||k=="down";if(b&&u.isObject(b)){const T=_?m.getLastPosition():m.getFirstPosition(),O=u.getNearestSelectionRange(T,_?"forward":"backward");return void(O&&(c.change(L=>{L.setSelection(O)}),r.preventDefault(),t.stop()))}if(!m.isCollapsed&&!r.shiftKey){const T=m.getFirstPosition(),O=m.getLastPosition(),L=T.nodeAfter,$=O.nodeBefore;return void((L&&u.isObject(L)||$&&u.isObject($))&&(c.change(U=>{U.setSelection(_?O:T)}),r.preventDefault(),t.stop()))}if(!m.isCollapsed)return;const N=this._getObjectElementNextToSelection(_);if(N&&u.isObject(N)){if(u.isInline(N)&&A)return;this._setSelectionOverElement(N),r.preventDefault(),t.stop()}}_preventDefaultOnArrowKeyPress(t,r){const o=this.editor.model,c=o.schema,u=o.document.selection.getSelectedElement();u&&c.isObject(u)&&(r.preventDefault(),t.stop())}_handleDelete(t){const r=this.editor.model.document.selection;if(!this.editor.model.canEditAt(r)||!r.isCollapsed)return;const o=this._getObjectElementNextToSelection(t);return o?(this.editor.model.change(c=>{let u=r.anchor.parent;for(;u.isEmpty;){const m=u;u=m.parent,c.remove(m)}this._setSelectionOverElement(o)}),!0):void 0}_setSelectionOverElement(t){this.editor.model.change(r=>{r.setSelection(r.createRangeOn(t))})}_getObjectElementNextToSelection(t){const r=this.editor.model,o=r.schema,c=r.document.selection,u=r.createSelection(c);if(r.modifySelection(u,{direction:t?"forward":"backward"}),u.isEqual(c))return null;const m=t?u.focus.nodeBefore:u.focus.nodeAfter;return m&&o.isObject(m)?m:null}_clearPreviouslySelectedWidgets(t){for(const r of this._previouslySelected)t.removeClass(pE,r);this._previouslySelected.clear()}_selectFirstNestedEditable(){const t=this.editor,r=this.editor.editing.view.document;for(const o of r.selection.getFirstRange().getItems())if(o.is("editableElement")){const c=t.editing.mapper.toModelElement(o);if(!c)continue;const u=t.model.createPositionAt(c,0),m=t.model.schema.getNearestSelectionRange(u,"forward");return t.model.change(b=>{b.setSelection(m)}),!0}return!1}_selectAncestorWidget(){const t=this.editor,r=t.editing.mapper,o=t.editing.view.document.selection.getFirstPosition().parent,c=(o.is("$text")?o.parent:o).findAncestor(In);if(!c)return!1;const u=r.toModelElement(c);return!!u&&(t.model.change(m=>{m.setSelection(u,"on")}),!0)}}function AQ(l,t){return!!t&&Array.from(l.getAncestors()).includes(t)}class $f extends Pe{constructor(){super(...arguments),this._toolbarDefinitions=new Map}static get requires(){return[Mf]}static get pluginName(){return"WidgetToolbarRepository"}init(){const t=this.editor;if(t.plugins.has("BalloonToolbar")){const r=t.plugins.get("BalloonToolbar");this.listenTo(r,"show",o=>{(function(c){const u=c.getSelectedElement();return!(!u||!In(u))})(t.editing.view.document.selection)&&o.stop()},{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",()=>{this._updateToolbarsVisibility()}),this.listenTo(t.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(t.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const t of this._toolbarDefinitions.values())t.view.destroy()}register(t,{ariaLabel:r,items:o,getRelatedElement:c,balloonClassName:u="ck-toolbar-container"}){if(!o.length)return void z("widget-toolbar-no-items",{toolbarId:t});const m=this.editor,b=m.t,k=new gy(m.locale);if(k.ariaLabel=r||b("Widget toolbar"),this._toolbarDefinitions.has(t))throw new P("widget-toolbar-duplicated",this,{toolbarId:t});const _={view:k,getRelatedElement:c,balloonClassName:u,itemsConfig:o,initialized:!1};m.ui.addToolbar(k,{isContextual:!0,beforeFocus:()=>{const A=c(m.editing.view.document.selection);A&&this._showToolbar(_,A)},afterBlur:()=>{this._hideToolbar(_)}}),this._toolbarDefinitions.set(t,_)}_updateToolbarsVisibility(){let t=0,r=null,o=null;for(const c of this._toolbarDefinitions.values()){const u=c.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&u)if(this.editor.ui.focusTracker.isFocused){const m=u.getAncestors().length;m>t&&(t=m,r=u,o=c)}else this._isToolbarVisible(c)&&this._hideToolbar(c);else this._isToolbarInBalloon(c)&&this._hideToolbar(c)}o&&this._showToolbar(o,r)}_hideToolbar(t){this._balloon.remove(t.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(t,r){this._isToolbarVisible(t)?CE(this.editor,r):this._isToolbarInBalloon(t)||(t.initialized||(t.initialized=!0,t.view.fillFromConfig(t.itemsConfig,this.editor.ui.componentFactory)
8472),this._balloon.add({view:t.view,position:jE(this.editor,r),balloonClassName:t.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(const o of this._toolbarDefinitions.values())if(this._isToolbarVisible(o)){const c=o.getRelatedElement(this.editor.editing.view.document.selection);CE(this.editor,c)}}))}_isToolbarVisible(t){return this._balloon.visibleView===t.view}_isToolbarInBalloon(t){return this._balloon.hasView(t.view)}}function CE(l,t){const r=l.plugins.get("ContextualBalloon"),o=jE(l,t);r.updatePosition(o)}function jE(l,t){const r=l.editing.view,o=Jr.defaultPositions;return{target:r.domConverter.mapViewToDom(t),positions:[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast,o.viewportStickyNorth]}}var NE=d(4095),CQ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(NE.A,CQ),NE.A.locals;const Py=bc("px");class jQ extends kt{constructor(){super();const t=this.bindTemplate;this.set({isVisible:!1,left:null,top:null,width:null}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-clipboard-drop-target-line",t.if("isVisible","ck-hidden",r=>!r)],style:{left:t.to("left",r=>Py(r)),top:t.to("top",r=>Py(r)),width:t.to("width",r=>Py(r))}}})}}class Vf extends Pe{constructor(){super(...arguments),this.removeDropMarkerDelayed=jk(()=>this.removeDropMarker(),40),this._updateDropMarkerThrottled=Tf(t=>this._updateDropMarker(t),40),this._reconvertMarkerThrottled=Tf(()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")},0),this._dropTargetLineView=new jQ,this._domEmitter=new(Li()),this._scrollables=new Map}static get pluginName(){return"DragDropTarget"}init(){this._setupDropMarker()}destroy(){this._domEmitter.stopListening();for(const{resizeObserver:t}of this._scrollables.values())t.destroy();return this._updateDropMarkerThrottled.cancel(),this.removeDropMarkerDelayed.cancel(),this._reconvertMarkerThrottled.cancel(),super.destroy()}updateDropMarker(t,r,o,c,u,m){this.removeDropMarkerDelayed.cancel();const b=EE(this.editor,t,r,o,c,u,m);if(b)return m&&m.containsRange(b)?this.removeDropMarker():void this._updateDropMarkerThrottled(b)}getFinalDropRange(t,r,o,c,u,m){const b=EE(this.editor,t,r,o,c,u,m);return this.removeDropMarker(),b}removeDropMarker(){const t=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,t.markers.has("drop-target")&&t.change(r=>{r.removeMarker("drop-target")})}_setupDropMarker(){const t=this.editor;t.ui.view.body.add(this._dropTargetLineView),t.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),t.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(r,{writer:o})=>{if(t.model.schema.checkChild(r.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(o);r.markerRange.isCollapsed?this._updateDropTargetLine(r.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(t){const r=this.editor,o=r.model.markers;r.model.change(c=>{o.has("drop-target")?o.get("drop-target").getRange().isEqual(t)||c.updateMarker("drop-target",{range:t}):c.addMarker("drop-target",{range:t,usingOperation:!1,affectsData:!1})})}_createDropTargetPosition(t){return t.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},function(r){const o=this.toDomElement(r);return o.append("â ",r.createElement("span"),"â "),o})}_updateDropTargetLine(t){const r=this.editor.editing,o=t.start.nodeBefore,c=t.start.nodeAfter,u=t.start.parent,m=o?r.mapper.toViewElement(o):null,b=m?r.view.domConverter.mapViewToDom(m):null,k=c?r.mapper.toViewElement(c):null,_=k?r.view.domConverter.mapViewToDom(k):null,A=r.mapper.toViewElement(u);if(!A)return;const N=r.view.domConverter.mapViewToDom(A),T=this._getScrollableRect(A),{scrollX:O,scrollY:L}=g.window,$=b?new Tt(b):null,U=_?new Tt(_):null,H=new Tt(N).excludeScrollbarsAndBorders(),J=$?$.bottom:H.top,ae=U?U.top:H.bottom,_e=g.window.getComputedStyle(N),qe=J<=ae?(J+ae)/2:ae;if(T.top<qe&&qe<T.bottom){const vt=H.left+parseFloat(_e.paddingLeft),jt=H.right-parseFloat(_e.paddingRight),nn=Math.max(vt+O,T.left),Gn=Math.min(jt+O,T.right);this._dropTargetLineView.set({isVisible:!0,left:nn,top:qe+L,width:Gn-nn})}else this._dropTargetLineView.isVisible=!1}_getScrollableRect(t){const r=t.root.rootName;let o;if(this._scrollables.has(r))o=this._scrollables.get(r).domElement;else{o=function(u){let m=u;do{m=m.parentElement;const b=g.window.getComputedStyle(m).overflowY;if(b=="auto"||b=="scroll")break}while(m.tagName!="BODY");return m}(this.editor.editing.view.domConverter.mapViewToDom(t)),this._domEmitter.listenTo(o,"scroll",this._reconvertMarkerThrottled,{usePassive:!0});const c=new ou(o,this._reconvertMarkerThrottled);this._scrollables.set(r,{domElement:o,resizeObserver:c})}return new Tt(o).excludeScrollbarsAndBorders()}}function EE(l,t,r,o,c,u,m){const b=l.model,k=l.editing.mapper;let _=DE(l,t);for(;_;){if(!u){if(b.schema.checkChild(_,"$text")){if(r){const A=r[0].start,N=k.toModelPosition(A);if(!m||Array.from(m.getItems()).every(T=>b.schema.checkChild(N,T))){if(b.schema.checkChild(N,"$text"))return b.createRange(N);if(A)return Uf(l,DE(l,A.parent),o,c)}}}else if(b.schema.isInline(_))return Uf(l,_,o,c)}if(b.schema.isBlock(_))return Uf(l,_,o,c);if(b.schema.checkChild(_,"$block")){const A=Array.from(_.getChildren()).filter(O=>O.is("element")&&!NQ(l,O));let N=0,T=A.length;if(T==0)return b.createRange(b.createPositionAt(_,"end"));for(;N<T-1;){const O=Math.floor((N+T)/2);SE(l,A[O],o,c)=="before"?T=O:N=O}return Uf(l,A[N],o,c)}_=_.parent}return null}function NQ(l,t){const r=l.editing.mapper,o=l.editing.view.domConverter,c=r.toViewElement(t);if(!c)return!0;const u=o.mapViewToDom(c);return g.window.getComputedStyle(u).float!="none"}function Uf(l,t,r,o){const c=l.model;return c.createRange(c.createPositionAt(t,SE(l,t,r,o)))}function SE(l,t,r,o){const c=l.editing.mapper,u=l.editing.view.domConverter,m=c.toViewElement(t),b=u.mapViewToDom(m),k=new Tt(b);return l.model.schema.isInline(t)?r<(k.left+k.right)/2?"before":"after":o<(k.top+k.bottom)/2?"before":"after"}function DE(l,t){const r=l.editing.mapper,o=l.editing.view,c=r.toModelElement(t);if(c)return c;const u=o.createPositionBefore(t),m=r.findMappedViewAncestor(u);return r.toModelElement(m)}var EQ=Object.defineProperty,SQ=Object.defineProperties,DQ=Object.getOwnPropertyDescriptors,TE=Object.getOwnPropertySymbols,TQ=Object.prototype.hasOwnProperty,IQ=Object.prototype.propertyIsEnumerable,IE=(l,t,r)=>t in l?EQ(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r;class MQ extends Pe{constructor(){super(...arguments),this._isBlockDragging=!1,this._domEmitter=new(Li())}static get pluginName(){return"DragDropBlockToolbar"}init(){const t=this.editor;if(this.listenTo(t,"change:isReadOnly",(r,o,c)=>{c?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")}),y.isAndroid&&this.forceDisabled("noAndroidSupport"),t.plugins.has("BlockToolbar")){const r=t.plugins.get("BlockToolbar").buttonView.element;this._domEmitter.listenTo(r,"dragstart",(o,c)=>this._handleBlockDragStart(c)),this._domEmitter.listenTo(g.document,"dragover",(o,c)=>this._handleBlockDragging(c)),this._domEmitter.listenTo(g.document,"drop",(o,c)=>this._handleBlockDragging(c)),this._domEmitter.listenTo(g.document,"dragend",()=>this._handleBlockDragEnd(),{useCapture:!0}),this.isEnabled&&r.setAttribute("draggable","true"),this.on("change:isEnabled",(o,c,u)=>{r.setAttribute("draggable",u?"true":"false")})}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(t){if(!this.isEnabled)return;const r=this.editor.model,o=r.document.selection,c=this.editor.editing.view,u=Array.from(o.getSelectedBlocks()),m=r.createRange(r.createPositionBefore(u[0]),r.createPositionAfter(u[u.length-1]));r.change(b=>b.setSelection(m)),this._isBlockDragging=!0,c.focus(),c.getObserver(Nu).onDomEvent(t)}_handleBlockDragging(t){if(!this.isEnabled||!this._isBlockDragging)return;const r=t.clientX+(this.editor.locale.contentLanguageDirection=="ltr"?100:-100),o=t.clientY,c=document.elementFromPoint(r,o),u=this.editor.editing.view;var m,b;c&&c.closest(".ck-editor__editable")&&u.getObserver(Nu).onDomEvent((m=((k,_)=>{for(var A in _||(_={}))TQ.call(_,A)&&IE(k,A,_[A]);if(TE)for(var A of TE(_))IQ.call(_,A)&&IE(k,A,_[A]);return k})({},t),b={type:t.type,dataTransfer:t.dataTransfer,target:c,clientX:r,clientY:o,preventDefault:()=>t.preventDefault(),stopPropagation:()=>t.stopPropagation()},SQ(m,DQ(b))))}_handleBlockDragEnd(){this._isBlockDragging=!1}}var ME=d(7793),PQ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(ME.A,PQ),ME.A.locals;class OQ extends Pe{constructor(){super(...arguments),this._clearDraggableAttributesDelayed=jk(()=>this._clearDraggableAttributes(),40),this._blockMode=!1,this._domEmitter=new(Li())}static get pluginName(){return"DragDrop"}static get requires(){return[$i,Iu,Vf,MQ]}init(){const t=this.editor,r=t.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,r.addObserver(Nu),r.addObserver(dy),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(t,"change:isReadOnly",(o,c,u)=>{u?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}),this.on("change:isEnabled",(o,c,u)=>{u||this._finalizeDragging(!1)}),y.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 t=this.editor,r=t.model,o=t.editing.view,c=o.document,u=t.plugins.get(Vf);this.listenTo(c,"dragstart",(m,b)=>{if(b.target&&b.target.is("editableElement")||(this._prepareDraggedRange(b.target),!this._draggedRange))return void b.preventDefault();this._draggingUid=B(),b.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",b.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const k=r.createSelection(this._draggedRange.toRange());this.editor.plugins.get("ClipboardPipeline")._fireOutputTransformationEvent(b.dataTransfer,k,"dragstart");const{dataTransfer:_,domTarget:A,domEvent:N}=b,{clientX:T}=N;this._updatePreview({dataTransfer:_,domTarget:A,clientX:T}),b.stopPropagation(),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")},{priority:"low"}),this.listenTo(c,"dragend",(m,b)=>{this._finalizeDragging(!b.dataTransfer.isCanceled&&b.dataTransfer.dropEffect=="move")},{priority:"low"}),this._domEmitter.listenTo(g.document,"dragend",()=>{this._blockMode=!1},{useCapture:!0}),this.listenTo(c,"dragenter",()=>{this.isEnabled&&o.focus()}),this.listenTo(c,"dragleave",()=>{u.removeDropMarkerDelayed()}),this.listenTo(c,"dragging",(m,b)=>{if(!this.isEnabled)return void(b.dataTransfer.dropEffect="none");const{clientX:k,clientY:_}=b.domEvent;u.updateDropMarker(b.target,b.targetRanges,k,_,this._blockMode,this._draggedRange),this._draggedRange||(b.dataTransfer.dropEffect="copy"),y.isGecko||(b.dataTransfer.effectAllowed=="copy"?b.dataTransfer.dropEffect="copy":["all","copyMove"].includes(b.dataTransfer.effectAllowed)&&(b.dataTransfer.dropEffect="move")),m.stop()},{priority:"low"})}_setupClipboardInputIntegration(){const t=this.editor,r=t.editing.view.document,o=t.plugins.get(Vf);this.listenTo(r,"clipboardInput",(c,u)=>{if(u.method!="drop")return;const{clientX:m,clientY:b}=u.domEvent,k=o.getFinalDropRange(u.target,u.targetRanges,m,b,this._blockMode,this._draggedRange);
8472if(!k)return this._finalizeDragging(!1),void c.stop();if(this._draggedRange&&this._draggingUid!=u.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid=""),PE(u.dataTransfer)=="move"&&this._draggedRange&&this._draggedRange.containsRange(k,!0))return this._finalizeDragging(!1),void c.stop();u.targetRanges=[t.editing.mapper.toViewRange(k)]},{priority:"high"})}_setupContentInsertionIntegration(){const t=this.editor.plugins.get($i);t.on("contentInsertion",(r,o)=>{if(!this.isEnabled||o.method!=="drop")return;const c=o.targetRanges.map(u=>this.editor.editing.mapper.toModelRange(u));this.editor.model.change(u=>u.setSelection(c))},{priority:"high"}),t.on("contentInsertion",(r,o)=>{if(!this.isEnabled||o.method!=="drop")return;const c=PE(o.dataTransfer)=="move",u=!o.resultRange||!o.resultRange.isCollapsed;this._finalizeDragging(u&&c)},{priority:"lowest"})}_setupDraggableAttributeHandling(){const t=this.editor,r=t.editing.view,o=r.document;this.listenTo(o,"mousedown",(c,u)=>{if(y.isAndroid||!u)return;this._clearDraggableAttributesDelayed.cancel();let m=OE(u.target);if(y.isBlink&&!t.isReadOnly&&!m&&!o.selection.isCollapsed){const b=o.selection.getSelectedElement();b&&In(b)||(m=o.selection.editableElement)}m&&(r.change(b=>{b.setAttribute("draggable","true",m)}),this._draggableElement=t.editing.mapper.toModelElement(m))}),this.listenTo(o,"mouseup",()=>{y.isAndroid||this._clearDraggableAttributesDelayed()})}_clearDraggableAttributes(){const t=this.editor.editing;t.view.change(r=>{this._draggableElement&&this._draggableElement.root.rootName!="$graveyard"&&r.removeAttribute("draggable",t.mapper.toViewElement(this._draggableElement)),this._draggableElement=null})}_finalizeDragging(t){const r=this.editor,o=r.model;r.plugins.get(Vf).removeDropMarker(),this._clearDraggableAttributes(),r.plugins.has("WidgetToolbarRepository")&&r.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(t&&this.isEnabled&&o.change(c=>{const u=o.createSelection(this._draggedRange);o.deleteContent(u,{doNotAutoparagraph:!0});const m=u.getFirstPosition().parent;m.isEmpty&&!o.schema.checkChild(m,"$text")&&o.schema.checkChild(m,"paragraph")&&c.insertElement("paragraph",m,0)}),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(t){const r=this.editor,o=r.model,c=o.document.selection,u=t?OE(t):null;if(u){const _=r.editing.mapper.toModelElement(u);this._draggedRange=xi.fromRange(o.createRangeOn(_)),this._blockMode=o.schema.isBlock(_),r.plugins.has("WidgetToolbarRepository")&&r.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop");return}if(c.isCollapsed&&!c.getFirstPosition().parent.isEmpty)return;const m=Array.from(c.getSelectedBlocks()),b=c.getFirstRange();if(m.length==0)return void(this._draggedRange=xi.fromRange(b));const k=BE(o,m);if(m.length>1)this._draggedRange=xi.fromRange(k),this._blockMode=!0;else if(m.length==1){const _=b.start.isTouching(k.start)&&b.end.isTouching(k.end);this._draggedRange=xi.fromRange(_?k:b),this._blockMode=_}o.change(_=>_.setSelection(this._draggedRange.toRange()))}_updatePreview({dataTransfer:t,domTarget:r,clientX:o}){const c=this.editor.editing.view,u=c.document.selection.editableElement,m=c.domConverter.mapViewToDom(u),b=g.window.getComputedStyle(m);this._previewContainer?this._previewContainer.firstElementChild&&this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=Ut(g.document,"div",{style:"position: fixed; left: -999999px;"}),g.document.body.appendChild(this._previewContainer));const k=new Tt(m);if(m.contains(r))return;const _=parseFloat(b.paddingLeft),A=Ut(g.document,"div");A.className="ck ck-content",A.style.width=b.width,A.style.paddingLeft=`${k.left-o+_}px`,y.isiOS&&(A.style.backgroundColor="white"),A.innerHTML=t.getData("text/html"),t.setDragImage(A,0,0),this._previewContainer.appendChild(A)}}function PE(l){return y.isGecko?l.dropEffect:["all","copyMove"].includes(l.effectAllowed)?"move":"copy"}function OE(l){if(l.is("editableElement"))return null;
8472if(l.hasClass("ck-widget__selection-handle"))return l.findAncestor(In);if(In(l))return l;const t=l.findAncestor(r=>In(r)||r.is("editableElement"));return In(t)?t:null}function BE(l,t){const r=t[0],o=t[t.length-1],c=r.getCommonAncestor(o),u=l.createPositionBefore(r),m=l.createPositionAfter(o);if(c&&c.is("element")&&!l.schema.isLimit(c)){const b=l.createRangeOn(c),k=u.isTouching(b.start),_=m.isTouching(b.end);if(k&&_)return BE(l,[c])}return l.createRange(u,m)}class BQ extends Pe{static get pluginName(){return"PastePlainText"}static get requires(){return[$i]}init(){const t=this.editor,r=t.model,o=t.editing.view,c=o.document,u=r.document.selection;let m=!1;o.addObserver(Nu),this.listenTo(c,"keydown",(b,k)=>{m=k.shiftKey}),t.plugins.get($i).on("contentInsertion",(b,k)=>{(m||function(_,A){if(_.childCount>1)return!1;const N=_.getChild(0);return A.isObject(N)?!1:Array.from(N.getAttributeKeys()).length==0}(k.content,r.schema))&&r.change(_=>{const A=Array.from(u.getAttributes()).filter(([T])=>r.schema.getAttributeProperties(T).isFormatting);u.isCollapsed||r.deleteContent(u,{doNotAutoparagraph:!0}),A.push(...u.getAttributes());const N=_.createRangeIn(k.content);for(const T of N.getItems())T.is("$textProxy")&&_.setAttributes(A,T)})})}}class LE extends Pe{static get pluginName(){return"Clipboard"}static get requires(){return[Eu,$i,OQ,BQ]}init(){const t=this.editor,r=this.editor.t;t.accessibility.addKeystrokeInfos({keystrokes:[{label:r("Copy selected content"),keystroke:"CTRL+C"},{label:r("Paste content"),keystroke:"CTRL+V"},{label:r("Paste content as plain text"),keystroke:"CTRL+SHIFT+V"}]})}}class LQ extends St{constructor(t){super(t),this.affectsData=!1}execute(){const t=this.editor.model,r=t.document.selection;let o=t.schema.getLimitElement(r);if(r.containsEntireContent(o)||!RE(t.schema,o))do if(o=o.parent,!o)return;while(!RE(t.schema,o));t.change(c=>{c.setSelection(o,"in")})}}function RE(l,t){return l.isLimit(t)&&(l.checkChild(t,"$text")||l.checkChild(t,"paragraph"))}const RQ=lu("Ctrl+A");class zQ extends Pe{static get pluginName(){return"SelectAllEditing"}init(){const t=this.editor,r=t.t,o=t.editing.view.document;t.commands.add("selectAll",new LQ(t)),this.listenTo(o,"keydown",(c,u)=>{kc(u)===RQ&&(t.execute("selectAll"),u.preventDefault())}),t.accessibility.addKeystrokeInfos({keystrokes:[{label:r("Select all"),keystroke:"CTRL+A"}]})}}class FQ extends Pe{static get pluginName(){return"SelectAllUI"}init(){const t=this.editor;t.ui.componentFactory.add("selectAll",()=>{const r=this._createButton(Rt);return r.set({tooltip:!0}),r}),t.ui.componentFactory.add("menuBar:selectAll",()=>this._createButton(wi))}_createButton(t){const r=this.editor,o=r.locale,c=r.commands.get("selectAll"),u=new t(r.locale),m=o.t;return u.set({label:m("Select all"),icon:'<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-.75zm18.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-.75zm-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-.2h1.6zm4 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-.2h1.6zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5h8.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-.2h1.1zm18.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-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5h10.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-.2h1.1zm18.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-.2h1.1zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5h2.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5h5.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 0h2.25zM18.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.5h2.25zM8.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-.2h1.6zm4 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-.2h1.6z"/></svg>',keystroke:"Ctrl+A"}),u.bind("isEnabled").to(c,"isEnabled"),this.listenTo(u,"execute",()=>{r.execute("selectAll"),r.editing.view.focus()}),u}}class $Q extends Pe{static get requires(){return[zQ,FQ]}static get pluginName(){return"SelectAll"}}var VQ=Object.defineProperty,zE=Object.getOwnPropertySymbols,UQ=Object.prototype.hasOwnProperty,WQ=Object.prototype.propertyIsEnumerable,FE=(l,t,r)=>t in l?VQ(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r;class $E extends St{constructor(t){super(t),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(t.data,"set",(r,o)=>{o[1]=((u,m)=>{for(var b in m||(m={}))UQ.call(m,b)&&FE(u,b,m[b]);if(zE)for(var b of zE(m))WQ.call(m,b)&&FE(u,b,m[b]);return u})({},o[1]);const c=o[1];c.batchType||(c.batchType={isUndoable:!1})},{priority:"high"}),this.listenTo(t.data,"set",(r,o)=>{o[1].batchType.isUndoable||this.clearStack()})}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(t){const r=this.editor.model.document.selection,o={ranges:r.hasOwnRange?Array.from(r.getRanges()):[],isBackward:r.isBackward};this._stack.push({batch:t,selection:o}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(t,r,o){const c=this.editor.model,u=c.document,m=[],b=t.map(_=>_.getTransformedByOperations(o)),k=b.flat();for(const _ of b){const A=_.filter(N=>N.root!=u.graveyard).filter(N=>!GQ(N,k));A.length&&(HQ(A),m.push(A[0]))}m.length&&c.change(_=>{_.setSelection(m,{backward:r})})}_undo(t,r){const o=this.editor.model,c=o.document;this._createdBatches.add(r);const u=t.operations.slice().filter(m=>m.isDocumentOperation);u.reverse();for(const m of u){const b=m.baseVersion+1,k=Array.from(c.history.getOperations(b)),_=CG([m.getReversed()],k,{useRelations:!0,document:this.editor.model.document,forceWeakRemove:!0}).operationsA;for(let A of _){const N=A.affectedSelectable;
8472N&&!o.canEditAt(N)&&(A=new Wn(A.baseVersion)),r.addOperation(A),o.applyOperation(A),c.history.setOperationAsUndone(m,A)}}}}function HQ(l){l.sort((t,r)=>t.start.isBefore(r.start)?-1:1);for(let t=1;t<l.length;t++){const r=l[t-1].getJoined(l[t],!0);r&&(t--,l.splice(t,2,r))}}function GQ(l,t){return t.some(r=>r!==l&&r.containsRange(l,!0))}class qQ extends $E{execute(t=null){const r=t?this._stack.findIndex(u=>u.batch==t):this._stack.length-1,o=this._stack.splice(r,1)[0],c=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(c,()=>{this._undo(o.batch,c);const u=this.editor.model.document.history.getOperations(o.batch.baseVersion);this._restoreSelection(o.selection.ranges,o.selection.isBackward,u)}),this.fire("revert",o.batch,c),this.refresh()}}class KQ extends $E{execute(){const t=this._stack.pop(),r=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(r,()=>{const o=t.batch.operations[t.batch.operations.length-1].baseVersion+1,c=this.editor.model.document.history.getOperations(o);this._restoreSelection(t.selection.ranges,t.selection.isBackward,c),this._undo(t.batch,r)}),this.refresh()}}class YQ extends Pe{constructor(){super(...arguments),this._batchRegistry=new WeakSet}static get pluginName(){return"UndoEditing"}init(){const t=this.editor,r=t.t;this._undoCommand=new qQ(t),this._redoCommand=new KQ(t),t.commands.add("undo",this._und
8472oCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",(o,c)=>{const u=c[0];if(!u.isDocumentOperation)return;const m=u.batch,b=this._redoCommand.createdBatches.has(m),k=this._undoCommand.createdBatches.has(m);this._batchRegistry.has(m)||(this._batchRegistry.add(m),m.isUndoable&&(b?this._undoCommand.addBatch(m):k||(this._undoCommand.addBatch(m),this._redoCommand.clearStack())))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(o,c,u)=>{this._redoCommand.addBatch(u)}),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:r("Undo"),keystroke:"CTRL+Z"},{label:r("Redo"),keystroke:[["CTRL+Y"],["CTRL+SHIFT+Z"]]}]})}}class QQ extends Pe{static get pluginName(){return"UndoUI"}init(){const t=this.editor,r=t.locale,o=t.t,c=r.uiLanguageDirection=="ltr"?At.undo:At.redo,u=r.uiLanguageDirection=="ltr"?At.redo:At.undo;this._addButtonsToFactory("undo",o("Undo"),"CTRL+Z",c),this._addButtonsToFactory("redo",o("Redo"),"CTRL+Y",u)}_addButtonsToFactory(t,r,o,c){const u=this.editor;u.ui.componentFactory.add(t,()=>{const m=this._createButton(Rt,t,r,o,c);return m.set({tooltip:!0}),m}),u.ui.componentFactory.add("menuBar:"+t,()=>this._createButton(wi,t,r,o,c))}_createButton(t,r,o,c,u){const m=this.editor,b=m.locale,k=m.commands.get(r),_=new t(b);return _.set({label:o,icon:u,keystroke:c}),_.bind("isEnabled").to(k,"isEnabled"),this.listenTo(_,"execute",()=>{m.execute(r),m.editing.view.focus()}),_}}class VE extends Pe{static get requires(){return[YQ,QQ]}static get pluginName(){return"Undo"}}class ZQ extends fe(){constructor(){super();const t=new window.FileReader;this._reader=t,this._data=void 0,this.set("loaded",0),t.onprogress=r=>{this.loaded=r.loaded}}get error(){return this._reader.error}get data(){return this._data}read(t){const r=this._reader;return this.total=t.size,new Promise((o,c)=>{r.onload=()=>{const u=r.result;this._data=u,o(u)},r.onerror=()=>{c("error")},r.onabort=()=>{c("aborted")},this._reader.readAsDataURL(t)})}abort(){this._reader.abort()}}class fo extends Pe{constructor(){super(...arguments),this.loaders=new so,this._loadersMap=new Map,this._pendingAction=null}static get pluginName(){return"FileRepository"}static get requires(){return[r4]}init(){this.loaders.on("change",()=>this._updatePendingAction()),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(t,r)=>r?t/r*100:0)}getLoader(t){return this._loadersMap.get(t)||null}createLoader(t){if(!this.createUploadAdapter)return z("filerepository-no-upload-adapter"),null;const r=new UE(Promise.resolve(t),this.createUploadAdapter);return this.loaders.add(r),this._loadersMap.set(t,r),t instanceof Promise&&r.file.then(o=>{this._loadersMap.set(o,r)}).catch(()=>{}),r.on("change:uploaded",()=>{let o=0;for(const c of this.loaders)o+=c.uploaded;this.uploaded=o}),r.on("change:uploadTotal",()=>{let o=0;
8472for(const c of this.loaders)c.uploadTotal&&(o+=c.uploadTotal);this.uploadTotal=o}),r}destroyLoader(t){const r=t instanceof UE?t:this.getLoader(t);r._destroy(),this.loaders.remove(r),this._loadersMap.forEach((o,c)=>{o===r&&this._loadersMap.delete(c)})}_updatePendingAction(){const t=this.editor.plugins.get(r4);if(this.loaders.length){if(!this._pendingAction){const r=this.editor.t,o=c=>`${r("Upload in progress")} ${parseInt(c)}%.`;this._pendingAction=t.add(o(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",o)}}else t.remove(this._pendingAction),this._pendingAction=null}}class UE extends fe(){constructor(t,r){super(),this.id=B(),this._filePromiseWrapper=this._createFilePromiseWrapper(t),this._adapter=r(this),this._reader=new ZQ,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(o,c)=>c?o/c*100:0),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then(t=>this._filePromiseWrapper?t:null):Promise.resolve(null)}get data(){return this._reader.data}read(){if(this.status!="idle")throw new P("filerepository-read-wrong-status",this);return this.status="reading",this.file.then(t=>this._reader.read(t)).then(t=>{if(this.status!=="reading")throw this.status;return this.status="idle",t}).catch(t=>{throw t==="aborted"?(this.status="aborted","aborted"):(this.status="error",this._reader.error?this._reader.error:t)})}upload(){if(this.status!="idle")throw new P("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then(()=>this._adapter.upload()).then(t=>(this.uploadResponse=t,this.status="idle",t)).catch(t=>{throw this.status==="aborted"?"aborted":(this.status="error",t)})}abort(){const t=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?t=="reading"?this._reader.abort():t=="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(t){const r={};return r.promise=new Promise((o,c)=>
8472{r.rejecter=c,r.isFulfilled=!1,t.then(u=>{r.isFulfilled=!0,o(u)}).catch(u=>{r.isFulfilled=!0,c(u)})}),r}}const WE="ckCsrfToken",HE="abcdefghijklmnopqrstuvwxyz0123456789";function JQ(){let l=function(o){o=o.toLowerCase();const c=document.cookie.split(";");for(const u of c){const m=u.split("=");if(decodeURIComponent(m[0].trim().toLowerCase())===o)return decodeURIComponent(m[1])}return null}(WE);var t,r;return l&&l.length==40||(l=function(o){let c="";const u=new Uint8Array(o);window.crypto.getRandomValues(u);for(let m=0;m<u.length;m++){const b=HE.charAt(u[m]%HE.length);c+=Math.random()>.5?b.toUpperCase():b}return c}(40),t=WE,r=l,document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(r)+";path=/"),l}class XQ{constructor(t,r,o){this.loader=t,this.url=r,this.t=o}upload(){return this.loader.file.then(t=>new Promise((r,o)=>{this._initRequest(),this._initListeners(r,o,t),this._sendRequest(t)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const t=this.xhr=new XMLHttpRequest;t.open("POST",this.url,!0),t.responseType="json"}_initListeners(t,r,o){const c=this.xhr,u=this.loader,m=(0,this.t)("Cannot upload file:")+` ${o.name}.`;c.addEventListener("error",()=>r(m)),c.addEventListener("abort",()=>r()),c.addEventListener("load",()=>{const b=c.response;if(!b||!b.uploaded)return r(b&&b.error&&b.error.message?b.error.message:m);t({default:b.url})}),c.upload&&c.upload.addEventListener("progress",b=>{b.lengthComputable&&(u.uploadTotal=b.total,u.uploaded=b.loaded)})}_sendRequest(t){const r=new FormData;r.append("upload",t),r.append("ckCsrfToken",JQ()),this.xhr.send(r)}}function da(l,t,r,o){let c,u=null;typeof o=="function"?c=o:(u=l.commands.get(o),c=()=>{l.execute(o)}),l.model.document.on("change:data",(m,b)=>{if(u&&!u.isEnabled||!t.isEnabled)return;const k=rr(l.model.document.selection.getRanges());if(!k.isCollapsed||b.isUndo||!b.isLocal)return;const _=Array.from(l.model.document.differ.getChanges()),A=_[0];if(_.length!=1||A.type!=="insert"||A.name!="$text"||A.length!=1)return;const N=A.position.parent;if(N.is("element","codeBlock")||N.is("element","listItem")&&typeof o!="function"&&!["numberedList","bulletedList","todoList"].includes(o)||u&&u.value===!0)return;const T=N.getChild(0),O=l.model.createRangeOn(T);if(!O.containsRange(k)&&!k.end.isEqual(O.end))return;const L=r.exec(T.data.substr(0,k.end.offset));L&&l.model.enqueueChange($=>{const U=$.createPositionAt(N,0),H=$.createPositionAt(N,L[0].length),J=new xi(U,H);if(c({match:L})!==!1){$.remove(J);const ae=l.model.document.selection.getFirstRange(),_e=$.createRangeIn(N);!N.isEmpty||_e.isEqual(ae)||_e.containsRange(ae,!0)||$.remove(N)}J.detach(),l.model.enqueueChange(()=>{l.plugins.get("Delete").requestUndoOnBackspace()})})})}function Oc(l,t,r,o){let c,u;r instanceof RegExp?c=r:u=r,u=u||(m=>{let b;const k=[],_=[];for(;(b=c.exec(m))!==null&&!(b&&b.length<4);){let{index:A,1:N,2:T,3:O}=b;const L=N+T+O;A+=b[0].length-L.length;const $=[A,A+N.length],U=[A+N.length+T.length,A+N.length+T.length+O.length];k.push($),k.push(U),_.push([A+N.length,A+N.length+T.length])}return{remove:k,format:_}}),l.model.document.on("change:data",(m,b)=>{if(b.isUndo||!b.isLocal||!t.isEnabled)return;const k=l.model,_=k.document.selection;if(!_.isCollapsed)return;const A=Array.from(k.document.differ.getChanges()),N=A[0];if(A.length!=1||N.type!=="insert"||N.name!="$text"||N.length!=1)return;const T=_.focus,O=T.parent,{text:L,range:$}=function(ae,_e){let qe=ae.start;return{text:Array.from(ae.getItems()).reduce((jt,nn)=>!nn.is("$text")&&!nn.is("$textProxy")||nn.getAttribute("code")?(qe=_e.createPositionAfter(nn),""):jt+nn.data,""),range:_e.createRange(qe,ae.end)}}(k.createRange(k.createPositionAt(O,0),T),k),U=u(L),H=GE($.start,U.format,k),J=GE($.start,U.remove,k);H.length&&J.length&&k.enqueueChange(ae=>{if(o(ae,H)!==!1){for(const _e of J.reverse())ae.remove(_e);k.enqueueChange(()=>{l.plugins.get("Delete").requestUndoOnBackspace()})}})})}function GE(l,t,r){return t.filter(o=>o[0]!==void 0&&o[1]!==void 0).map(o=>r.createRange(l.getShiftedBy(o[0]),l.getShiftedBy(o[1])))}function Wf(l,t){return(r,o)=>{if(!l.commands.get(t).isEnabled)return!1;const c=l.model.schema.getValidRanges(o,t);for(const u of c)r.setAttribute(t,!0,u);r.removeSelectionAttribute(t)}}class qE extends St{constructor(t,r){super(t),this.attributeKey=r}refresh(){const t=this.editor.model,r=t.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=t.schema.checkAttributeInSelection(r.selection,this.attributeKey)}execute(t={}){const r=this.editor.model,o=r.document.selection,c=t.forceValue===void 0?!this.value:t.forceValue;r.change(u=>{if(o.isCollapsed)c?u.setSelectionAttribute(this.attributeKey,!0):u.removeSelectionAttribute(this.attributeKey);else{const m=r.schema.getValidRanges(o.getRanges(),this.attributeKey);for(const b of m)c?u.setAttribute(this.attributeKey,c,b):u.removeAttribute(this.attributeKey,b)}})}_getValueFromFirstAllowedNode(){const t=this.editor.model,r=t.schema,o=t.document.selection;if(o.isCollapsed)return o.hasAttribute(this.attributeKey);for(const c of o.getRanges())for(const u of c.getItems())if(r.checkAttribute(u,this.attributeKey))return u.hasAttribute(this.attributeKey);return!1}}const Bc="bold";class eZ extends Pe{static get pluginName(){return"BoldEditing"}init(){const t=this.editor,r=this.editor.t;t.model.schema.extend("$text",{allowAttributes:Bc}),t.model.schema.setAttributeProperties(Bc,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Bc,view:"strong",upcastAlso:["b",o=>{const c=o.getStyle("font-weight");return c&&(c=="bold"||Number(c)>=600)?{name:!0,styles:["font-weight"]}:null}]}),t.commands.add(Bc,new qE(t,Bc)),t.keystrokes.set("CTRL+B",Bc),t.accessibility.addKeystrokeInfos({keystrokes:[{label:r("Bold text"),keystroke:"CTRL+B"}]})}}function KE({editor:l,commandName:t,plugin:r,icon:o,label:c,keystroke:u}){return m=>{const b=l.commands.get(t),k=new m(l.locale);return k.set({label:c,icon:o,keystroke:u,isToggleable:!0}),k.bind("isEnabled").to(b,"isEnabled"),r.listenTo(k,"execute",()=>{l.execute(t),l.editing.view.focus()}),k}}const Hf="bold";class tZ extends Pe{static get pluginName(){return"BoldUI"}init(){const t=this.editor,r=t.locale.t,o=t.commands.get(Hf),c=KE({editor:t,commandName:Hf,plugin:this,icon:At.bold,label:r("Bold"),keystroke:"CTRL+B"});
8472t.ui.componentFactory.add(Hf,()=>{const u=c(Rt);return u.set({tooltip:!0}),u.bind("isOn").to(o,"value"),u}),t.ui.componentFactory.add("menuBar:"+Hf,()=>c(wi))}}var YE=d(4199),nZ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(YE.A,nZ),YE.A.locals;const Lc="italic";class rZ extends Pe{static get pluginName(){return"ItalicEditing"}init(){const t=this.editor,r=this.editor.t;t.model.schema.extend("$text",{allowAttributes:Lc}),t.model.schema.setAttributeProperties(Lc,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Lc,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),t.commands.add(Lc,new qE(t,Lc)),t.keystrokes.set("CTRL+I",Lc),t.accessibility.addKeystrokeInfos({keystrokes:[{label:r("Italic text"),keystroke:"CTRL+I"}]})}}const Gf="italic";class iZ extends Pe{static get pluginName(){return"ItalicUI"}init(){const t=this.editor,r=t.commands.get(Gf),o=t.locale.t,c=KE({editor:t,commandName:Gf,plugin:this,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z"/></svg>',keystroke:"CTRL+I",label:o("Italic")});t.ui.componentFactory.add(Gf,()=>{const u=c(Rt);return u.set({tooltip:!0}),u.bind("isOn").to(r,"value"),u}),t.ui.componentFactory.add("menuBar:"+Gf,()=>c(wi))}}class oZ extends St{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const r=this.editor.model,o=r.schema,c=r.document.selection,u=Array.from(c.getSelectedBlocks()),m=t.forceValue===void 0?!this.value:t.forceValue;r.change(b=>{if(m){const k=u.filter(_=>qf(_)||ZE(o,_));this._applyQuote(b,k)}else this._removeQuote(b,u.filter(qf))})}_getValue(){const t=rr(this.editor.model.document.selection.getSelectedBlocks());return!(!t||!qf(t))}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,r=this.editor.model.schema,o=rr(t.getSelectedBlocks());return!!o&&ZE(r,o)}_removeQuote(t,r){QE(t,r).reverse().forEach(o=>{if(o.start.isAtStart&&o.end.isAtEnd)return void t.unwrap(o.start.parent);if(o.start.isAtStart){const u=t.createPositionBefore(o.start.parent);return void t.move(o,u)}o.end.isAtEnd||t.split(o.end);const c=t.createPositionAfter(o.end.parent);t.move(o,c)})}_applyQuote(t,r){const o=[];QE(t,r).reverse().forEach(c=>{let u=qf(c.start);u||(u=t.createElement("blockQuote"),t.wrap(c,u)),o.push(u)}),o.reverse().reduce((c,u)=>c.nextSibling==u?(t.merge(t.createPositionAfter(c)),c):u)}}function qf(l){return l.parent.name=="blockQuote"?l.parent:null}function QE(l,t){let r,o=0;const c=[];for(;o<t.length;){const u=t[o],m=t[o+1];r||(r=l.createPositionBefore(u)),m&&u.nextSibling==m||(c.push(l.createRange(r,l.createPositionAfter(u))),r=null),o++}return c}function ZE(l,t){const r=l.checkChild(t.parent,"blockQuote"),o=l.checkChild(["$root","blockQuote"],t);return r&&o}class sZ extends Pe{static get pluginName(){return"BlockQuoteEditing"}static get requires(){return[zf,bs]}init(){const t=this.editor,r=t.model.schema;t.commands.add("blockQuote",new oZ(t)),r.register("blockQuote",{inheritAllFrom:"$container"}),t.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),t.model.document.registerPostFixer(m=>{const b=t.model.document.differ.getChanges();for(const k of b)if(k.type=="insert"){const _=k.position.nodeAfter;if(!_)continue;if(_.is("element","blockQuote")&&_.isEmpty)return m.remove(_),!0;if(_.is("element","blockQuote")&&!r.checkChild(k.position,_))return m.unwrap(_),!0;if(_.is("element")){const A=m.createRangeIn(_);for(const N of A.getItems())if(N.is("element","blockQuote")&&!r.checkChild(m.createPositionBefore(N),N))return m.unwrap(N),!0}}else if(k.type=="remove"){const _=k.position.parent;if(_.is("element","blockQuote")&&_.isEmpty)return m.remove(_),!0}return!1});const o=this.editor.editing.view.document,c=t.model.document.selection,u=t.commands.get("blockQuote");this.listenTo(o,"enter",(m,b)=>{!c.isCollapsed||!u.value||c.getLastPosition().parent.isEmpty&&(t.execute("blockQuote"),t.editing.view.scrollToTheSelection(),b.preventDefault(),m.stop())},{context:"blockquote"}),this.listenTo(o,"delete",(m,b)=>{if(b.direction!="backward"||!c.isCollapsed||!u.value)return;const k=c.getLastPosition().parent;k.isEmpty&&!k.previousSibling&&(t.execute("blockQuote"),t.editing.view.scrollToTheSelection(),b.preventDefault(),m.stop())},{context:"blockquote"})}}var JE=d(8708),aZ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(JE.A,aZ),JE.A.locals;class lZ extends Pe{static get pluginName(){return"BlockQuoteUI"}init(){const t=this.editor,r=t.commands.get("blockQuote");t.ui.componentFactory.add("blockQuote",()=>{const o=this._createButton(Rt);return o.set({tooltip:!0}),o.bind("isOn").to(r,"value"),o}),t.ui.componentFactory.add("menuBar:blockQuote",()=>this._createButton(wi))}_createButton(t){const r=this.editor,o=r.locale,c=r.commands.get("blockQuote"),u=new t(r.locale),m=o.t;return u.set({label:m("Block quote"),icon:At.quote,isToggleable:!0}),u.bind("isEnabled").to(c,"isEnabled"),this.listenTo(u,"execute",()=>{r.execute("blockQuote"),r.editing.view.focus()}),u}}class cZ extends Pe{static get pluginName(){return"CKBoxUI"}afterInit(){const t=this.editor;if(!t.commands.get("ckbox"))return;const r=t.t,o=t.ui.componentFactory;if(o.add("ckbox",()=>{const c=this._createButton(Rt);return c.tooltip=!0,c}),o.add("menuBar:ckbox",()=>this._createButton(wi)),t.plugins.has("ImageInsertUI")){const c=t.plugins.get("ImageInsertUI");c.registerIntegration({name:"assetManager",observable:()=>t.commands.get("ckbox"),buttonViewCreator:()=>{const u=this.editor.ui.componentFactory.create("ckbox");return u.icon=At.imageAssetManager,u.bind("label").to(c,"isImageSelected",m=>r(m?"Replace image with file manager":"Insert image with file manager")),u},formViewCreator:()=>{const u=this.editor.ui.componentFactory.create("ckbox");return u.icon=At.imageAssetManager,u.withText=!0,u.bind("label").to(c,"isImageSelected",m=>r(m?"Replace with file manager":"Insert with file manager")),u.on("execute",()=>{c.dropdownView.isOpen=!1}),u}})}}_createButton(t){const r=this.editor,o=r.locale,c=new t(o),u=r.commands.get("ckbox"),m=o.t;return c.set({label:m("Open file manager"),icon:At.browseFiles}),c.bind("isOn","isEnabled").to(u,"value","isEnabled"),c.on("execute",()=>{r.execute("ckbox")}),c}}var dZ=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],Mu=l=>{let t=0;for(let r=0;r<l.length;r++){let o=l[r];t=83*t+dZ.indexOf(o)}return t},Oy=l=>{let t=l/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},By=l=>{let t=Math.max(0,Math.min(1,l));return t<=.0031308?Math.trunc(12.92*t*255+.5):Math.trunc(255*(1.055*Math.pow(t,.4166666666666667)-.055)+.5)},Ly=(l,t)=>(r=>
8472r<0?-1:1)(l)*Math.pow(Math.abs(l),t),XE=class extends Error{constructor(l){super(l),this.name="ValidationError",this.message=l}},uZ=l=>{if(!l||l.length<6)throw new XE("The blurhash string must be at least 6 characters");let t=Mu(l[0]),r=Math.floor(t/9)+1,o=t%9+1;if(l.length!==4+2*o*r)throw new XE(`blurhash length mismatch: length is ${l.length} but it should be ${4+2*o*r}`)},hZ=l=>{let t=l>>8&255,r=255&l;return[Oy(l>>16),Oy(t),Oy(r)]},mZ=(l,t)=>{let r=Math.floor(l/361),o=Math.floor(l/19)%19,c=l%19;return[Ly((r-9)/9,2)*t,Ly((o-9)/9,2)*t,Ly((c-9)/9,2)*t]},fZ=(l,t,r,o)=>{uZ(l),o|=1;let c=Mu(l[0]),u=Math.floor(c/9)+1,m=c%9+1,b=(Mu(l[1])+1)/166,k=new Array(m*u);for(let N=0;N<k.length;N++)if(N===0){let T=Mu(l.substring(2,6));k[N]=hZ(T)}else{let T=Mu(l.substring(4+2*N,6+2*N));k[N]=mZ(T,b*o)}let _=4*t,A=new Uint8ClampedArray(_*r);for(let N=0;N<r;N++)for(let T=0;T<t;T++){let O=0,L=0,$=0;for(let ae=0;ae<u;ae++)for(let _e=0;_e<m;_e++){let qe=Math.cos(Math.PI*T*_e/t)*Math.cos(Math.PI*N*ae/r),vt=k[_e+ae*m];O+=vt[0]*qe,L+=vt[1]*qe,$+=vt[2]*qe}let U=By(O),H=By(L),J=By($);A[4*T+0+N*_]=U,A[4*T+1+N*_]=H,A[4*T+2+N*_]=J,A[4*T+3+N*_]=255}return A},pZ=Object.defineProperty,e3=Object.getOwnPropertySymbols,gZ=Object.prototype.hasOwnProperty,bZ=Object.prototype.propertyIsEnumerable,t3=(l,t,r)=>t in l?pZ(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r;function n3(l){const t=[];let r=0;for(const c in l){const u=parseInt(c,10);isNaN(u)||(u>r&&(r=u),t.push(`${l[c]} ${c}w`))}const o=[{srcset:t.join(","),sizes:`(max-width: ${r}px) 100vw, ${r}px`,type:"image/webp"}];return{imageFallbackUrl:l.default,imageSources:o}}const Pu=32;function r3({url:l,method:t="GET",data:r,onUploadProgress:o,signal:c,authorization:u}){const m=new XMLHttpRequest;m.open(t,l.toString()),m.setRequestHeader("Authorization",u),m.setRequestHeader("CKBox-Version","CKEditor 5"),m.responseType="json";const b=()=>{m.abort()};return new Promise((k,_)=>{c.throwIfAborted(),c.addEventListener("abort",b),m.addEventListener("loadstart",()=>{c.addEventListener("abort",b)}),m.addEventListener("loadend",()=>{c.removeEventListener("abort",b)}),m.addEventListener("error",()=>{_()}),m.addEventListener("abort",()=>{_()}),m.addEventListener("load",()=>{const A=m.response;if(!A||A.statusCode>=400)return _(A&&A.message);k(A)}),o&&m.upload.addEventListener("progress",A=>{o(A)}),m.send(r)})}const kZ={"image/gif":"gif","image/jpeg":"jpg","image/png":"png","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"};function yZ(l,t){return r=this,o=null,c=function*(){try{const u=yield fetch(l,((m,b)=>{for(var k in b||(b={}))gZ.call(b,k)&&t3(m,k,b[k]);if(e3)for(var k of e3(b))bZ.call(b,k)&&t3(m,k,b[k]);return m})({method:"HEAD",cache:"force-cache"},t));return u.ok&&u.headers.get("content-type")||""}catch{return""}},new Promise((u,m)=>{var b=A=>{try{_(c.next(A))}catch(N){m(N)}},k=A=>{try{_(c.throw(A))}catch(N){m(N)}},_=A=>A.done?u(A.value):Promise.resolve(A.value).then(b,k);_((c=c.apply(r,o)).next())});var r,o,c}var xZ=Object.defineProperty,i3=Object.getOwnPropertySymbols,vZ=Object.prototype.hasOwnProperty,wZ=Object.prototype.propertyIsEnumerable,o3=(l,t,r)=>t in l?xZ(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,s3=(l,t)=>{for(var r in t||(t={}))vZ.call(t,r)&&o3(l,r,t[r]);if(i3)for(var r of i3(t))wZ.call(t,r)&&o3(l,r,t[r]);return l};class _Z extends St{constructor(t){super(t),this._chosenAssets=new Set,this._wrapper=null,this._initListeners()}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){this.fire("ckbox:open")}_getValue(){return this._wrapper!==null}_checkEnabled(){const t=this.editor.commands.get("insertImage"),r=this.editor.commands.get("link");return!(!t.isEnabled&&!r.isEnabled)}_prepareOptions(){const t=this.editor.config.get("ckbox");return{theme:t.theme,language:t.language,tokenUrl:t.tokenUrl,serviceOrigin:t.serviceOrigin,forceDemoLabel:t.forceDemoLabel,dialog:{onClose:()=>this.fire("ckbox:close")},assets:{onChoose:r=>this.fire("ckbox:choose",r)}}}_initListeners(){const t=this.editor,r=t.model,o=!t.config.get("ckbox.ignoreDataId");this.on("ckbox",()=>{this.refresh()},{priority:"low"}),this.on("ckbox:open",()=>{this.isEnabled&&!this.value&&(this._wrapper=Ut(document,"div",{class:"ck ckbox-wrapper"}),document.body.appendChild(this._wrapper),window.CKBox.mount(this._wrapper,this._prepareOptions()))}),this.on("ckbox:close",()=>{this.value&&(this._wrapper.remove(),this._wrapper=null,t.editing.view.focus())}),this.on("ckbox:choose",(c,u)=>{if(!this.isEnabled)return;const m=t.commands.get("insertImage"),b=t.commands.get("link"),k=function({assets:A,isImageAllowed:N,isLinkAllowed:T}){return A.map(O=>function(L){const $=L.data.metadata;return $?$.width&&$.height:!1}(O)?{id:O.data.id,type:"image",attributes:AZ(O)}:{id:O.data.id,type:"link",attributes:CZ(O)}).filter(O=>O.type==="image"?N:T)}({assets:u,isImageAllowed:m.isEnabled,isLinkAllowed:b.isEnabled}),_=k.length;_!==0&&(r.change(A=>{for(const N of k){const T=N===k[_-1],O=_===1;this._insertAsset(N,T,A,O),o&&(setTimeout(()=>this._chosenAssets.delete(N),1e3),this._chosenAssets.add(N))}}),t.editing.view.focus())}),this.listenTo(t,"destroy",()=>{this.fire("ckbox:close"),this._chosenAssets.clear()})}_insertAsset(t,r,o,c){const u=this.editor.model.document.selection;o.removeSelectionAttribute("linkHref"),t.type==="image"?this._insertImage(t):this._insertLink(t,o,c),r||o.setSelection(u.getLastPosition())}_insertImage(t){const r=this.editor,{imageFallbackUrl:o,imageSources:c,imageTextAlternative:u,imageWidth:m,imageHeight:b,imagePlaceholder:k}=t.attributes;r.execute("insertImage",{source:s3({src:o,sources:c,alt:u,width:m,height:b},k?{placeholder:k}:null)})}_insertLink(t,r,o){const c=this.editor,u=c.model,m=u.document.selection,{linkName:b,linkHref:k}=t.attributes;if(m.isCollapsed){const _=Ro(m.getAttributes()),A=r.createText(b,_);if(!o){const T=m.getLastPosition(),O=T.parent;O.name==="paragraph"&&O.isEmpty||c.execute("insertParagraph",{position:T});const L=u.insertContent(A);return r.setSelection(L),void c.execute("link",k)}const N=u.insertContent(A);r.setSelection(N)}c.execute("link",k)}}
8472function AZ(l){const{imageFallbackUrl:t,imageSources:r}=n3(l.data.imageUrls),{description:o,width:c,height:u,blurHash:m}=l.data.metadata,b=function(k){if(k)try{const _=`${Pu}px`,A=document.createElement("canvas");A.setAttribute("width",_),A.setAttribute("height",_);const N=A.getContext("2d");if(!N)return;const T=N.createImageData(Pu,Pu),O=fZ(k,Pu,Pu);return T.data.set(O),N.putImageData(T,0,0),A.toDataURL()}catch{return}}(m);return s3({imageFallbackUrl:t,imageSources:r,imageTextAlternative:o||"",imageWidth:c,imageHeight:u},b?{imagePlaceholder:b}:null)}function CZ(l){return{linkName:l.data.name,linkHref:jZ(l)}}function jZ(l){const t=new URL(l.data.url);return t.searchParams.set("download","true"),t.toString()}var Ry=(l,t,r)=>new Promise((o,c)=>{var u=k=>{try{b(r.next(k))}catch(_){c(_)}},m=k=>{try{b(r.throw(k))}catch(_){c(_)}},b=k=>k.done?o(k.value):Promise.resolve(k.value).then(u,m);b((r=r.apply(l,t)).next())});class a3 extends Pe{static get pluginName(){return"CKBoxUtils"}static get requires(){return["CloudServices"]}init(){return Ry(this,null,function*(){const t=this.editor,r=!!t.config.get("ckbox"),o=!!window.CKBox;if(!r&&!o)return;t.config.define("ckbox",{serviceOrigin:"https://api.ckbox.io",defaultUploadCategories:null,ignoreDataId:!1,language:t.locale.uiLanguage,theme:"lark",tokenUrl:t.config.get("cloudServices.tokenUrl")});const c=t.plugins.get("CloudServices"),u=t.config.get("cloudServices.tokenUrl"),m=t.config.get("ckbox.tokenUrl");if(!m)throw new P("ckbox-plugin-missing-token-url",this);this._token=m==u?c.token:yield c.registerTokenUrl(m)})}getToken(){return this._token}getWorkspaceId(){const t=(0,this.editor.t)("Cannot access default workspace."),r=this.editor.config.get("ckbox.defaultUploadWorkspaceId"),o=function(c,u){const[,m]=c.value.split("."),b=JSON.parse(atob(m)),k=b.auth&&b.auth.ckbox&&b.auth.ckbox.workspaces||[b.aud];return u?(b.auth&&b.auth.ckbox&&b.auth.ckbox.role)=="superadmin"||k.includes(u)?u:null:k[0]}(this._token,r);if(o==null)throw W("ckbox-access-default-workspace-error"),t;return o}getCategoryIdForFile(t,r){return Ry(this,null,function*(){const o=(0,this.editor.t)("Cannot determine a category for the uploaded file."),c=this.editor.config.get("ckbox.defaultUploadCategories"),u=this._getAvailableCategories(r),m=typeof t=="string"?(b=yield yZ(t,r),kZ[b]):function(A){const N=A.name,T=new RegExp("\\.(?<ext>[^.]+)$");return N.match(T).groups.ext.toLowerCase()}(t);var b;const k=yield u;if(!k)throw o;if(c){const A=Object.keys(c).find(N=>c[N].find(T=>T.toLowerCase()==m));if(A){const N=k.find(T=>T.id===A||T.name===A);if(!N)throw o;return N.id}}const _=k.find(A=>A.extensions.find(N=>N.toLowerCase()==m));if(!_)throw o;return _.id})}_getAvailableCategories(t){return Ry(this,null,function*(){const r=this.editor,o=this._token,{signal:c}=t,u=r.config.get("ckbox.serviceOrigin"),m=this.getWorkspaceId();try{const k=[];let _,A=0;do{const N=yield b(A);k.push(...N.items),_=N.totalCount-(A+50),A+=50}while(_>0);return k}catch{return c.throwIfAborted(),void W("ckbox-fetch-category-http-error")}function b(k){const _=new URL("categories",u);return _.searchParams.set("limit","50"),_.searchParams.set("offset",k.toString()),_.searchParams.set("workspaceId",m),r3({url:_,signal:c,authorization:o.value})}})}}var zy=(l,t,r)=>new Promise((o,c)=>{var u=k=>{try{b(r.next(k))}catch(_){c(_)}},m=k=>{try{b(r.throw(k))}catch(_){c(_)}},b=k=>k.done?o(k.value):Promise.resolve(k.value).then(u,m);b((r=r.apply(l,t)).next())});class NZ extends Pe{static get requires(){return["ImageUploadEditing","ImageUploadProgress",fo,l3]}static get pluginName(){return"CKBoxUploadAdapter"}afterInit(){return zy(this,null,function*(){const t=this.editor,r=!!t.config.get("ckbox"),o=!!window.CKBox;if(!r&&!o)return;const c=t.plugins.get(fo),u=t.plugins.get(a3);c.createUploadAdapter=k=>new EZ(k,t,u);const m=!t.config.get("ckbox.ignoreDataId"),b=t.plugins.get("ImageUploadEditing");m&&b.on("uploadComplete",(k,{imageElement:_,data:A})=>{t.model.change(N=>{N.setAttribute("ckboxImageId",A.ckboxImageId,_)})})})}}class EZ{constructor(t,r,o){this.loader=t,this.token=o.getToken(),this.ckboxUtils=o,this.editor=r,this.controller=new AbortController,this.serviceOrigin=r.config.get("ckbox.serviceOrigin")}upload(){return zy(this,null,function*(){const t=this.ckboxUtils,r=this.editor.t,o=yield this.loader.file,c=yield t.getCategoryIdForFile(o,{signal:this.controller.signal}),u=new URL("assets",this.serviceOrigin),m=new FormData;return u.searchParams.set("workspaceId",t.getWorkspaceId()),m.append("categoryId",c),m.append("file",o),r3({method:"POST",url:u,data:m,onUploadProgress:b=>{b.lengthComputable&&(this.loader.uploadTotal=b.total,this.loader.uploaded=b.loaded)},signal:this.controller.signal,authorization:this.token.value}).then(b=>zy(this,null,function*(){const k=n3(b.imageUrls);
8472return{ckboxImageId:b.id,default:k.imageFallbackUrl,sources:k.imageSources}})).catch(()=>{const b=r("Cannot upload file:")+` ${o.name}.`;return Promise.reject(b)})})}abort(){this.controller.abort()}}class l3 extends Pe{static get pluginName(){return"CKBoxEditing"}static get requires(){return["LinkEditing","PictureEditing",NZ,a3]}init(){const t=this.editor;this._shouldBeInitialised()&&(this._checkImagePlugins(),d3()&&t.commands.add("ckbox",new _Z(t)))}afterInit(){const t=this.editor;this._shouldBeInitialised()&&(t.config.get("ckbox.ignoreDataId")||(this._initSchema(),this._initConversion(),this._initFixers()))}_shouldBeInitialised(){return!!this.editor.config.get("ckbox")||d3()}_checkImagePlugins(){const t=this.editor;t.plugins.has("ImageBlockEditing")||t.plugins.has("ImageInlineEditing")||W("ckbox-plugin-image-feature-missing",t)}_initSchema(){const t=this.editor.model.schema;t.extend("$text",{allowAttributes:"ckboxLinkId"}),t.isRegistered("imageBlock")&&t.extend("imageBlock",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),t.isRegistered("imageInline")&&t.extend("imageInline",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),t.addAttributeCheck((r,o)=>{if(!r.last.getAttribute("linkHref")&&o==="ckboxLinkId")return!1})}_initConversion(){const t=this.editor;t.conversion.for("downcast").add(o=>{o.on("attribute:ckboxLinkId:imageBlock",(c,u,m)=>{const{writer:b,mapper:k,consumable:_}=m;if(!_.consume(u.item,c.name))return;const A=[...k.toViewElement(u.item).getChildren()].find(N=>N.name==="a");A&&(u.item.hasAttribute("ckboxLinkId")?b.setAttribute("data-ckbox-resource-id",u.item.getAttribute("ckboxLinkId"),A):b.removeAttribute("data-ckbox-resource-id",A))},{priority:"low"}),o.on("attribute:ckboxLinkId",(c,u,m)=>{const{writer:b,mapper:k,consumable:_}=m;if(_.consume(u.item,c.name)){if(u.attributeOldValue){const A=c3(b,u.attributeOldValue);b.unwrap(k.toViewRange(u.range),A)}if(u.attributeNewValue){const A=c3(b,u.attributeNewValue);if(u.item.is("selection")){const N=b.document.selection;b.wrap(N.getFirstRange(),A)}else b.wrap(k.toViewRange(u.range),A)}}},{priority:"low"})}),t.conversion.for("upcast").add(o=>{o.on("element:a",(c,u,m)=>{const{writer:b,consumable:k}=m;if(!u.viewItem.getAttribute("href")||!k.consume(u.viewItem,{attributes:["data-ckbox-resource-id"]}))return;const _=u.viewItem.getAttribute("data-ckbox-resource-id");if(_)if(u.modelRange)for(let A of u.modelRange.getItems())A.is("$textProxy")&&(A=A.textNode),DZ(A)&&b.setAttribute("ckboxLinkId",_,A);else{const A=u.modelCursor.nodeBefore||u.modelCursor.parent;b.setAttribute("ckboxLinkId",_,A)}},{priority:"low"})}),t.conversion.for("downcast").attributeToAttribute({model:"ckboxImageId",view:"data-ckbox-resource-id"}),t.conversion.for("upcast").elementToAttribute({model:{key:"ckboxImageId",value:o=>o.getAttribute("data-ckbox-resource-id")},view:{attributes:{"data-ckbox-resource-id":/[\s\S]+/}}});const r=t.commands.get("replaceImageSource");r&&this.listenTo(r,"cleanupImage",(o,[c,u])=>{c.removeAttribute("ckboxImageId",u)})}_initFixers(){const t=this.editor,r=t.model,o=r.document.selection;r.document.registerPostFixer(function(c){return u=>{let m=!1;const b=c.model,k=c.commands.get("ckbox");if(!k)return m;for(const _ of b.document.differ.getChanges()){if(_.type!=="insert"&&_.type!=="attribute")continue;const A=_.type==="insert"?new de(_.position,_.position.getShiftedBy(_.length)):_.range,N=_.type==="attribute"&&_.attributeKey==="linkHref"&&_.attributeNewValue===null;for(const T of A.getItems()){if(N&&T.hasAttribute("ckboxLinkId")){u.removeAttribute("ckboxLinkId",T),m=!0;continue}const O=SZ(T,k._chosenAssets);for(const L of O){const $=L.type==="image"?"ckboxImageId":"ckboxLinkId";L.id!==T.getAttribute($)&&(u.setAttribute($,L.id,T),m=!0)}}}return m}}(t)),r.document.registerPostFixer(function(c){return u=>!(c.hasAttribute("linkHref")||!c.hasAttribute("ckboxLinkId"))&&(u.removeSelectionAttribute("ckboxLinkId"),!0)}(o))}}function SZ(l,t){const r=l.is("element","imageInline")||l.is("element","imageBlock"),o=l.hasAttribute("linkHref");return[...t].filter(c=>c.type==="image"&&r?c.attributes.imageFallbackUrl===l.getAttribute("src"):c.type==="link"&&o?c.attributes.linkHref===l.getAttribute("linkHref"):void 0)}function c3(l,t){const r=l.createAttributeElement("a",{"data-ckbox-resource-id":t},{priority:5});return l.setCustomProperty("link",!0,r),r}function DZ(l){return!!l.is("$text")||!(!l.is("element","imageInline")&&!l.is("element","imageBlock"))}function d3(){return!!window.CKBox}var u3=d(1866),TZ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(u3.A,TZ),u3.A.locals;class IZ extends Pe{static get pluginName(){return"CKFinderUI"}init(){const t=this.editor,r=t.ui.componentFactory,o=t.t;if(r.add("ckfinder",c=>{const u=this._createButton(Rt),m=c.t;return u.set({label:m("Insert image or file"),tooltip:!0}),u}),r.add("menuBar:ckfinder",c=>{const u=this._createButton(wi),m=c.t;return u.label=m("Image or file"),u}),t.plugins.has("ImageInsertUI")){const c=t.plugins.get("ImageInsertUI");c.registerIntegration({name:"assetManager",observable:()=>t.commands.get("ckfinder"),buttonViewCreator:()=>{const u=this.editor.ui.componentFactory.create("ckfinder");return u.icon=At.imageAssetManager,u.bind("label").to(c,"isImageSelected",m=>o(m?"Replace image with file manager":"Insert image with file manager")),u},formViewCreator:()=>{const u=this.editor.ui.componentFactory.create("ckfinder");return u.icon=At.imageAssetManager,u.withText=!0,u.bind("label").to(c,"isImageSelected",m=>o(m?"Replace with file manager":"Insert with file manager")),u.on("execute",()=>{c.dropdownView.isOpen=!1}),u}})}}_createButton(t){const r=this.editor,o=new t(r.locale),c=r.commands.get("ckfinder");return o.icon=At.browseFiles,o.bind("isEnabled").to(c),o.on("execute",()=>{r.execute("ckfinder"),r.editing.view.focus()}),o}}class MZ extends St{constructor(t){super(t),this.affectsData=!1,this.stopListening(this.editor.model.document,"change"),this.listenTo(this.editor.model.document,"change",()=>this.refresh(),{priority:"low"})}refresh(){const t=this.editor.commands.get("insertImage"),r=this.editor.commands.get("link");this.isEnabled=t.isEnabled||r.isEnabled}execute(){const t=this.editor,r=this.editor.config.get("ckfinder.openerMethod")||"modal";if(r!="popup"&&r!="modal")throw new P("ckfinder-unknown-openermethod",t);const o=this.editor.config.get("ckfinder.options")||{};o.chooseFiles=!0;const c=o.onInit;o.language||(o.language=t.locale.uiLanguage),o.onInit=u=>{c&&c(u),u.on("files:choose",m=>{const b=m.data.files.toArray(),k=b.filter(N=>!N.isImage()),_=b.filter(N=>N.isImage());for(const N of k)t.execute("link",N.getUrl());const A=[];for(const N of _){const T=N.getUrl();A.push(T||u.request("file:getProxyUrl",{file:N}))}A.length&&h3(t,A)}),u.on("file:choose:resizedImage",m=>{const b=m.data.resizedUrl;if(b)h3(t,[b]);
8472else{const k=t.plugins.get("Notification"),_=t.locale.t;k.showWarning(_("Could not obtain resized image URL."),{title:_("Selecting resized image failed"),namespace:"ckfinder"})}})},window.CKFinder[r](o)}}function h3(l,t){if(l.commands.get("insertImage").isEnabled)l.execute("insertImage",{source:t});else{const r=l.plugins.get("Notification"),o=l.locale.t;r.showWarning(o("Could not insert image at the current position."),{title:o("Inserting image failed"),namespace:"ckfinder"})}}class PZ extends Pe{static get pluginName(){return"CKFinderEditing"}static get requires(){return[Ay,"LinkEditing"]}init(){const t=this.editor;if(!t.plugins.has("ImageBlockEditing")&&!t.plugins.has("ImageInlineEditing"))throw new P("ckfinder-missing-image-plugin",t);t.commands.add("ckfinder",new MZ(t))}}class OZ extends Pe{static get pluginName(){return"CloudServicesUploadAdapter"}static get requires(){return["CloudServices",fo]}init(){const t=this.editor,r=t.plugins.get("CloudServices"),o=r.token,c=r.uploadUrl;if(!o)return;const u=t.plugins.get("CloudServicesCore");this._uploadGateway=u.createUploadGateway(o,c),t.plugins.get(fo).createUploadAdapter=m=>new BZ(this._uploadGateway,m)}}class BZ{constructor(t,r){this.uploadGateway=t,this.loader=r}upload(){return this.loader.file.then(t=>(this.fileUploader=this.uploadGateway.upload(t),this.fileUploader.on("progress",(r,o)=>{this.loader.uploadTotal=o.total,this.loader.uploaded=o.uploaded}),this.fileUploader.send()))}abort(){this.fileUploader.abort()}}class LZ extends St{constructor(t){super(t),this._isEnabledBasedOnSelection=!1}refresh(){const t=this.editor.model,r=rr(t.document.selection.getSelectedBlocks());this.value=!!r&&r.is("element","paragraph"),this.isEnabled=!!r&&m3(r,t.schema)}execute(t={}){const r=this.editor.model,o=r.document,c=t.selection||o.selection;r.canEditAt(c)&&r.change(u=>{const m=c.getSelectedBlocks();for(const b of m)!b.is("element","paragraph")&&m3(b,r.schema)&&u.rename(b,"paragraph")})}}function m3(l,t){return t.checkChild(l.parent,"paragraph")&&!t.isObject(l)}class RZ extends St{constructor(t){super(t),this._isEnabledBasedOnSelection=!1}execute(t){const r=this.editor.model,o=t.attributes;let c=t.position;r.canEditAt(c)&&r.change(u=>{if(c=this._findPositionToInsertParagraph(c,u),!c)return;const m=u.createElement("paragraph");o&&r.schema.setAllowedAttributes(m,o,u),r.insertContent(m,c),u.setSelection(m,"in")})}_findPositionToInsertParagraph(t,r){const o=this.editor.model;if(o.schema.checkChild(t,"paragraph"))return t;const c=o.schema.findAllowedParent(t,"paragraph");if(!c)return null;const u=t.parent,m=o.schema.checkChild(u,"$text");return u.isEmpty||m&&t.isAtEnd?o.createPositionAfter(u):!u.isEmpty&&m&&t.isAtStart?o.createPositionBefore(u):r.split(t,c).position}}const f3=class extends Pe{static get pluginName(){return"Paragraph"}init(){const l=this.editor,t=l.model;l.commands.add("paragraph",new LZ(l)),l.commands.add("insertParagraph",new RZ(l)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),l.conversion.elementToElement({model:"paragraph",view:"p"}),l.conversion.for("upcast").elementToElement({model:(r,{writer:o})=>f3.paragraphLikeElements.has(r.name)?r.isEmpty?null:o.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}};let Fy=f3;Fy.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class zZ extends St{constructor(t,r){super(t),this.modelElements=r}refresh(){const t=rr(this.editor.model.document.selection.getSelectedBlocks());this.value=!!t&&this.modelElements.includes(t.name)&&t.name,this.isEnabled=!!t&&this.modelElements.some(r=>p3(t,r,this.editor.model.schema))}execute(t){const r=this.editor.model,o=r.document,c=t.value;r.change(u=>{const m=Array.from(o.selection.getSelectedBlocks()).filter(b=>p3(b,c,r.schema));for(const b of m)b.is("element",c)||u.rename(b,c)})}}function p3(l,t,r){return r.checkChild(l.parent,t)&&!r.isObject(l)}const g3="paragraph";class FZ extends Pe{static get pluginName(){return"HeadingEditing"}constructor(t){super(t),t.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[Fy]}init(){const t=this.editor,r=t.config.get("heading.options"),o=[];for(const c of r)c.model!=="paragraph"&&(t.model.schema.register(c.model,{inheritAllFrom
8472:"$block"}),t.conversion.elementToElement(c),o.push(c.model));this._addDefaultH1Conversion(t),t.commands.add("heading",new zZ(t,o))}afterInit(){const t=this.editor,r=t.commands.get("enter"),o=t.config.get("heading.options");r&&this.listenTo(r,"afterExecute",(c,u)=>{const m=t.model.document.selection.getFirstPosition().parent;o.some(b=>m.is("element",b.model))&&!m.is("element",g3)&&m.childCount===0&&u.writer.rename(m,g3)})}_addDefaultH1Conversion(t){t.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:R.low+1})}}var b3=d(6269),$Z={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(b3.A,$Z),b3.A.locals;class VZ extends Pe{static get pluginName(){return"HeadingUI"}init(){const t=this.editor,r=t.t,o=function(m){const b=m.t,k={Paragraph:b("Paragraph"),"Heading 1":b("Heading 1"),"Heading 2":b("Heading 2"),"Heading 3":b("Heading 3"),"Heading 4":b("Heading 4"),"Heading 5":b("Heading 5"),"Heading 6":b("Heading 6")};return m.config.get("heading.options").map(_=>{const A=k[_.title];return A&&A!=_.title&&(_.title=A),_})}(t),c=r("Choose heading"),u=r("Heading");t.ui.componentFactory.add("heading",m=>{const b={},k=new so,_=t.commands.get("heading"),A=t.commands.get("paragraph"),N=[_];for(const O of o){const L={type:"button",model:new sN({label:O.title,class:O.class,role:"menuitemradio",withText:!0})};O.model==="paragraph"?(L.model.bind("isOn").to(A,"value"),L.model.set("commandName","paragraph"),N.push(A)):(L.model.bind("isOn").to(_,"value",$=>$===O.model),L.model.set({commandName:"heading",commandValue:O.model})),k.add(L),b[O.model]=O.title}const T=ps(m);return S4(T,k,{ariaLabel:u,role:"menu"}),T.buttonView.set({ariaLabel:u,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:u}),T.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),T.bind("isEnabled").toMany(N,"isEnabled",(...O)=>O.some(L=>L)),T.buttonView.bind("label").to(_,"value",A,"value",(O,L)=>{const $=L?"paragraph":O;return typeof $=="boolean"?c:b[$]?b[$]:c}),T.buttonView.bind("ariaLabel").to(_,"value",A,"value",(O,L)=>{const $=L?"paragraph":O;return typeof $=="boolean"?u:b[$]?`${b[$]}, ${u}`:u}),this.listenTo(T,"execute",O=>{const{commandName:L,commandValue:$}=O.source;t.execute(L,$?{value:$}:void 0),t.editing.view.focus()}),T}),t.ui.componentFactory.add("menuBar:heading",m=>{const b=new Ic(m),k=t.commands.get("heading"),_=t.commands.get("paragraph"),A=[k],N=new Ey(m);b.set({class:"ck-heading-dropdown"}),N.set({ariaLabel:r("Heading"),role:"menu"}),b.buttonView.set({label:r("Heading")}),b.panelView.children.add(N);for(const T of o){const O=new jy(m,b),L=new wi(m);O.children.add(L),N.items.add(O),L.set({label:T.title,role:"menuitemradio",class:T.class}),L.bind("ariaChecked").to(L,"isOn"),L.delegate("execute").to(b),L.on("execute",()=>{const $=T.model==="paragraph"?"paragraph":"heading";t.execute($,{value:T.model}),t.editing.view.focus()}),T.model==="paragraph"?(L.bind("isOn").to(_,"value"),A.push(_)):L.bind("isOn").to(k,"value",$=>$===T.model)}return b.bind("isEnabled").toMany(A,"isEnabled",(...T)=>T.some(O=>O)),b})}}function k3(l){return l.createContainerElement("figure",{class:"image"},[l.createEmptyElement("img"),l.createSlot("children")])}function y3(l,t){const r=l.plugins.get("ImageUtils"),o=l.plugins.has("ImageInlineEditing")&&l.plugins.has("ImageBlockEditing");return u=>r.isInlineImageView(u)?o&&(u.getStyle("display")=="block"||u.findAncestor(r.isBlockImageView)?"imageBlock":"imageInline")!==t?null:c(u):null;function c(u){const m={name:!0};return u.hasAttribute("src")&&(m.attributes=["src"]),m}}function $y(l,t){const r=rr(t.getSelectedBlocks());return!r||l.isObject(r)||r.isEmpty&&r.name!="listItem"?"imageBlock":"imageInline"}function Kf(l){return l&&l.endsWith("px")?parseInt(l):null}function x3(l){const t=Kf(l.getStyle("width")),r=Kf(l.getStyle("height"));return!(!t||!r)}var UZ=Object.defineProperty,v3=Object.getOwnPropertySymbols,WZ=Object.prototype.hasOwnProperty,HZ=Object.prototype.propertyIsEnumerable,w3=(l,t,r)=>t in l?UZ(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,_3=(l,t)=>
8472{for(var r in t||(t={}))WZ.call(t,r)&&w3(l,r,t[r]);if(v3)for(var r of v3(t))HZ.call(t,r)&&w3(l,r,t[r]);return l};const GZ=/^(image|image-inline)$/;class ei extends Pe{constructor(){super(...arguments),this._domEmitter=new(Li())}static get pluginName(){return"ImageUtils"}isImage(t){return this.isInlineImage(t)||this.isBlockImage(t)}isInlineImageView(t){return!!t&&t.is("element","img")}isBlockImageView(t){return!!t&&t.is("element","figure")&&t.hasClass("image")}insertImage(t={},r=null,o=null,c={}){const u=this.editor,m=u.model,b=m.document.selection,k=A3(u,r||b,o);t=_3(_3({},Object.fromEntries(b.getAttributes())),t);for(const _ in t)m.schema.checkAttribute(k,_)||delete t[_];return m.change(_=>{const{setImageSizes:A=!0}=c,N=_.createElement(k,t);return m.insertObject(N,r,null,{setSelection:"on",findOptimalPosition:r||k=="imageInline"?void 0:"auto"}),N.parent?(A&&this.setImageNaturalSizeAttributes(N),N):null})}setImageNaturalSizeAttributes(t){const r=t.getAttribute("src");r&&(t.getAttribute("width")||t.getAttribute("height")||this.editor.model.change(o=>{const c=new g.window.Image;this._domEmitter.listenTo(c,"load",()=>{t.getAttribute("width")||t.getAttribute("height")||this.editor.model.enqueueChange(o.batch,u=>{u.setAttribute("width",c.naturalWidth,t),u.setAttribute("height",c.naturalHeight,t)}),this._domEmitter.stopListening(c,"load")}),c.src=r}))}getClosestSelectedImageWidget(t){const r=t.getFirstPosition();if(!r)return null;const o=t.getSelectedElement();if(o&&this.isImageWidget(o))return o;let c=r.parent;for(;c;){if(c.is("element")&&this.isImageWidget(c))return c;c=c.parent}return null}getClosestSelectedImageElement(t){const r=t.getSelectedElement();return this.isImage(r)?r:t.getFirstPosition().findAncestor("imageBlock")}getImageWidgetFromImageView(t){return t.findAncestor({classes:GZ})}isImageAllowed(){const t=this.editor.model.document.selection;return function(r,o){if(A3(r,o,null)=="imageBlock"){const u=function(m,b){const k=kE(m,b),_=k.start.parent;return _.isEmpty&&!_.is("element","$root")?_.parent:_}(o,r.model);if(r.model.schema.checkChild(u,"imageBlock"))return!0}else if(r.model.schema.checkChild(o.focus,"imageInline"))return!0;return!1}(this.editor,t)&&function(r){return[...r.focus.getAncestors()].every(o=>!o.is("element","imageBlock"))}(t)}toImageWidget(t,r,o){return r.setCustomProperty("image",!0,t),My(t,r,{label:()=>{const c=this.findViewImgElement(t).getAttribute("alt");return c?`${c} ${o}`:o}})}isImageWidget(t){return!!t.getCustomProperty("image")&&In(t)}isBlockImage(t){return!!t&&t.is("element","imageBlock")}isInlineImage(t){return!!t&&t.is("element","imageInline")}findViewImgElement(t){if(this.isInlineImageView(t))return t;const r=this.editor.editing.view;for(const{item:o}of r.createRangeIn(t))if(this.isInlineImageView(o))return o}destroy(){return this._domEmitter.stopListening(),super.destroy()}}function A3(l,t,r){const o=l.model.schema,c=l.config.get("image.insert.type");return l.plugins.has("ImageBlockEditing")?l.plugins.has("ImageInlineEditing")?r||(c==="inline"?"imageInline":c!=="auto"?"imageBlock":t.is("selection")?$y(o,t):o.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}class qZ extends St{refresh(){const t=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!t,this.isEnabled&&t.hasAttribute("alt")?this.value=t.getAttribute("alt"):this.value=!1}execute(t){const r=this.editor,o=r.plugins.get("ImageUtils"),c=r.model,u=o.getClosestSelectedImageElement(c.document.selection);c.change(m=>{m.setAttribute("alt",t.newValue,u)})}}class KZ extends Pe{static get requires(){return[ei]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new qZ(this.editor))}}var C3=d(4062),YZ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(C3.A,YZ),C3.A.locals;var j3=d(2722),QZ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(j3.A,QZ),j3.A.locals;class ZZ extends kt{constructor(t){super(t);const r=this.locale.t;this.focusTracker=new ir,this.keystrokes=new zr,this.labeledInput=this._createLabeledInputVie
8472w(),this.saveButtonView=this._createButton(r("Save"),At.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(r("Cancel"),At.cancel,"ck-button-cancel","cancel"),this._focusables=new Ri,this._focusCycler=new Fi({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),tf({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(t,r,o,c){const u=new Rt(this.locale);return u.set({label:t,icon:r,tooltip:!0}),u.extendTemplate({attributes:{class:o}}),c&&u.delegate("execute").to(this,c),u}_createLabeledInputView(){const t=this.locale.t,r=new Af(this.locale,Nf);return r.label=t("Text alternative"),r}}function N3(l){const t=l.editing.view,r=Jr.defaultPositions,o=l.plugins.get("ImageUtils");return{target:t.domConverter.mapViewToDom(o.getClosestSelectedImageWidget(t.document.selection)),positions:[r.northArrowSouth,r.northArrowSouthWest,r.northArrowSouthEast,r.southArrowNorth,r.southArrowNorthWest,r.southArrowNorthEast,r.viewportStickyNorth]}}class JZ extends Pe{static get requires(){return[Mf]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const t=this.editor,r=t.t;t.ui.componentFactory.add("imageTextAlternative",o=>{const c=t.commands.get("imageTextAlternative"),u=new Rt(o);return u.set({label:r("Change image text alternative"),icon:At.textAlternative,tooltip:!0}),u.bind("isEnabled").to(c,"isEnabled"),u.bind("isOn").to(c,"value",m=>!!m),this.listenTo(u,"execute",()=>{this._showForm()}),u})}_createForm(){const t=this.editor,r=t.editing.view.document,o=t.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(Tk(ZZ))(t.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{t.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this._form.keystrokes.set("Esc",(c,u)=>{this._hideForm(!0),u()}),this.listenTo(t.ui,"update",()=>{o.getClosestSelectedImageWidget(r.selection)?this._isVisible&&function(c){const u=c.plugins.get("ContextualBalloon");if(c.plugins.get("ImageUtils").getClosestSelectedImageWidget(c.editing.view.document.selection)){const m=N3(c);u.updatePosition(m)}}(t):this._hideForm(!0)}),ef({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const t=this.editor,r=t.commands.get("imageTextAlternative"),o=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:N3(t)}),o.fieldView.value=o.fieldView.element.value=r.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(t=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),t&&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 E3 extends Pe{static get requires(){return[KZ,JZ]}static get pluginName(){return"ImageTextAlternative"}}function S3(l,t){const r=(o,c,u)=>{if(!u.consumable.consume(c.item,o.name))return;const m=u.writer,b=u.mapper.toViewElement(c.item),k=l.findViewImgElement(b);c.attributeNewValue===null?(m.removeAttribute("srcset",k),m.removeAttribute("sizes",k)):c.attributeNewValue&&(m.setAttribute("srcset",c.attributeNewValue,k),m.setAttribute("sizes","100vw",k))};return o=>{o.on(`attribute:srcset:${t}`,r)}}function Yf(l,t,r){const o=(c,u,m)=>{if(!m.consumable.consume(u.item,c.name))return;const b=m.writer,k=m.mapper.toViewElement(u.item),_=l.findViewImgElement(k);b.setAttribute(u.attributeKey,u.attributeNewValue||"",_)};return c=>{c.on(`attribute:${r}:${t}`,o)}}class D3 extends $o{observe(t){this.listenTo(t,"load",(r,o)=>{const c=o.target;this.checkShouldIgnoreEventFromTarget(c)||c.tagName=="IMG"&&this._fireEvents(o)},{useCapture:!0})}stopObserving(t){this.stopListening(t)}_fireEvents(t){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",t))}}var XZ=Object.defineProperty,T3=Object.getOwnPropertySymbols,eJ=Object.prototype.hasOwnProperty,tJ=Object.prototype.propertyIsEnumerable,I3=(l,t,r)=>t in l?XZ(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,Qf=(l,t)=>
8472{for(var r in t||(t={}))eJ.call(t,r)&&I3(l,r,t[r]);if(T3)for(var r of T3(t))tJ.call(t,r)&&I3(l,r,t[r]);return l};class nJ extends St{constructor(t){super(t);const r=t.config.get("image.insert.type");t.plugins.has("ImageBlockEditing")||r==="block"&&z("image-block-plugin-required"),t.plugins.has("ImageInlineEditing")||r==="inline"&&z("image-inline-plugin-required")}refresh(){const t=this.editor.plugins.get("ImageUtils");this.isEnabled=t.isImageAllowed()}execute(t){const r=tn(t.source),o=this.editor.model.document.selection,c=this.editor.plugins.get("ImageUtils"),u=Object.fromEntries(o.getAttributes());r.forEach((m,b)=>{const k=o.getSelectedElement();if(typeof m=="string"&&(m={src:m}),b&&k&&c.isImage(k)){const _=this.editor.model.createPositionAfter(k);c.insertImage(Qf(Qf({},m),u),_)}else c.insertImage(Qf(Qf({},m),u))})}}class rJ extends St{constructor(t){super(t),this.decorate("cleanupImage")}refresh(){const t=this.editor.plugins.get("ImageUtils"),r=this.editor.model.document.selection.getSelectedElement();this.isEnabled=t.isImage(r),this.value=this.isEnabled?r.getAttribute("src"):null}execute(t){const r=this.editor.model.document.selection.getSelectedElement(),o=this.editor.plugins.get("ImageUtils");this.editor.model.change(c=>{c.setAttribute("src",t.source,r),this.cleanupImage(c,r),o.setImageNaturalSizeAttributes(r)})}cleanupImage(t,r){t.removeAttribute("srcset",r),t.removeAttribute("sizes",r),t.removeAttribute("sources",r),t.removeAttribute("width",r),t.removeAttribute("height",r),t.removeAttribute("alt",r)}}class Vy extends Pe{static get requires(){return[ei]}static get pluginName(){return"ImageEditing"}init(){const t=this.editor,r=t.conversion;t.editing.view.addObserver(D3),r.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:"srcset"});const o=new nJ(t),c=new rJ(t);t.commands.add("insertImage",o),t.commands.add("replaceImageSource",c),t.commands.add("imageInsert",o)}}class M3 extends Pe{static get requires(){return[ei]}static get pluginName(){return"ImageSizeAttributes"}afterInit(){this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline")}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:["width","height"]}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:["width","height"]})}_registerConverters(t){const r=this.editor,o=r.plugins.get("ImageUtils"),c=t==="imageBlock"?"figure":"img";function u(m,b,k,_){m.on(`attribute:${b}:${t}`,(A,N,T)=>{if(!T.consumable.consume(N.item,A.name))return;const O=T.writer,L=T.mapper.toViewElement(N.item),$=o.findViewImgElement(L);if(N.attributeNewValue!==null?O.setAttribute(k,N.attributeNewValue,$):O.removeAttribute(k,$),N.item.hasAttribute("sources"))return;const U=N.item.hasAttribute("resizedWidth");if(t==="imageInline"&&!U&&!_)return;const H=N.item.getAttribute("width"),J=N.item.getAttribute("height");H&&J&&O.setStyle("aspect-ratio",`${H}/${J}`,$)})}r.conversion.for("upcast").attributeToAttribute({view:{name:c,styles:{width:/.+/}},model:{key:"width",value:m=>x3(m)?Kf(m.getStyle("width")):null}}).attributeToAttribute({view:{name:c,key:"width"},model:"width"}).attributeToAttribute({view:{name:c,styles:{height:/.+/}},model:{key:"height",value:m=>x3(m)?Kf(m.getStyle("height")):null}}).attributeToAttribute({view:{name:c,key:"height"},model:"height"}),r.conversion.for("editingDowncast").add(m=>{u(m,"width","width",!0),u(m,"height","height",!0)}),r.conversion.for("dataDowncast").add(m=>{u(m,"width","width",!1),u(m,"height","height",!1)})}}class P3 extends St{constructor(t,r){super(t),this._modelElementName=r}refresh(){const t=this.editor.plugins.get("ImageUtils"),r=t.getClosestSelectedImageElement(this.editor.model.document.selection);this._modelElementName==="imageBlock"?this.isEnabled=t.isInlineImage(r):this.isEnabled=t.isBlockImage(r)}execute(t={}){const r=this.editor,o=this.editor.model,c=r.plugins.get("ImageUtils"),u=c.getClosestSelectedImageElement(o.document.selection),m=Object.fromEntries(u.getAttributes());return m.src||m.uploadId?o.change(b=>{const{setImageSizes:k=!0}=t,_=Array.from(o.markers).filter(T=>T.getRange().containsItem(u)),A=c.insertImage(m,o.createSelection(u,"on"),this._modelElementName,{setImageSizes:k});if(!A)return null;const N=b.createRangeOn(A);for(const T of _){const O=T.getRange(),L=O.root.rootName!="$graveyard"?O.getJoined(N,!0):N;b.updateMarker(T,{range:L})}return{oldElement:u,newElement:A}}):null}}var O3=d(7378),iJ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(O3.A,iJ),O3.A.locals;class B3 extends Pe{static get requires(){return[ei]}static get pluginName(){return"ImagePlaceholder"}afterInit(){this._setupSchema(),this._setupConversion(),this._setupLoadListener()}_setupSchema(){const t=this.editor.model.schema;t.isRegistered("imageBlock")&&t.extend("imageBlock",{allowAttributes:["placeholder"]}),t.isRegistered("imageInline")&&t.extend("imageInline",{allowAttributes:["placeholder"]})}_setupConversion(){const t=this.editor,r=t.conversion,o=t.plugins.get("ImageUtils");r.for("editingDowncast").add(c=>{c.on("attribute:placeholder",(u,m,b)=>{if(!b.consumable.test(m.item,u.name)||!m.item.is("element","imageBlock")&&!m.item.is("element","imageInline"))return;b.consumable.consume(m.item,u.name);const k=b.writer,_=b.mapper.toViewElement(m.item),A=o.findViewImgElement(_);m.attributeNewValue?(k.addClass("image_placeholder",A),k.setStyle("background-image",`url(${m.attributeNewValue})`,A),k.setCustomProperty("editingPipeline:doNotReuseOnce",!0,A)):(k.removeClass("image_placeholder",A),k.removeStyle("background-image",A))})})}_setupLoadListener(){const t=this.editor,r=t.model,o=t.editing,c=o.view,u=t.plugins.get("ImageUtils");c.addObserver(D3),this.listenTo(c.document,"imageLoaded",(m,b)=>{const k=c.domConverter.mapDomToView(b.target);if(!k)return;const _=u.getImageWidgetFromImageView(k);if(!_)return;const A=o.mapper.toModelElement(_);A&&A.hasAttribute("placeholder")&&r.enqueueChange({isUndoable:!1},N=>{N.removeAttribute("placeholder",A)})})}}class L3 extends Pe{static get requires(){return[Vy,M3,ei,B3,$i]}static get pluginName(){return"ImageBlockEditing"}init(){const t=this.editor;
8472t.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),t.plugins.has("ImageInlineEditing")&&(t.commands.add("imageTypeBlock",new P3(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const t=this.editor,r=t.t,o=t.conversion,c=t.plugins.get("ImageUtils");o.for("dataDowncast").elementToStructure({model:"imageBlock",view:(u,{writer:m})=>k3(m)}),o.for("editingDowncast").elementToStructure({model:"imageBlock",view:(u,{writer:m})=>c.toImageWidget(k3(m),m,r("image widget"))}),o.for("downcast").add(Yf(c,"imageBlock","src")).add(Yf(c,"imageBlock","alt")).add(S3(c,"imageBlock")),o.for("upcast").elementToElement({view:y3(t,"imageBlock"),model:(u,{writer:m})=>m.createElement("imageBlock",u.hasAttribute("src")?{src:u.getAttribute("src")}:void 0)}).add(function(u){const m=(b,k,_)=>{if(!_.consumable.test(k.viewItem,{name:!0,classes:"image"}))return;const A=u.findViewImgElement(k.viewItem);if(!A||!_.consumable.test(A,{name:!0}))return;_.consumable.consume(k.viewItem,{name:!0,classes:"image"});const N=rr(_.convertItem(A,k.modelCursor).modelRange.getItems());N?(_.convertChildren(k.viewItem,N),_.updateConversionResult(N,k)):_.consumable.revert(k.viewItem,{name:!0,classes:"image"})};return b=>{b.on("element:figure",m)}}(c))}_setupClipboardIntegration(){const t=this.editor,r=t.model,o=t.editing.view,c=t.plugins.get("ImageUtils"),u=t.plugins.get("ClipboardPipeline");this.listenTo(u,"inputTransformation",(m,b)=>{const k=Array.from(b.content.getChildren());let _;if(!k.every(c.isInlineImageView))return;_=b.targetRanges?t.editing.mapper.toModelRange(b.targetRanges[0]):r.document.selection.getFirstRange();const A=r.createSelection(_);if($y(r.schema,A)==="imageBlock"){const N=new ms(o.document),T=k.map(O=>N.createElement("figure",{class:"image"},O));b.content=N.createDocumentFragment(T)}}),this.listenTo(u,"contentInsertion",(m,b)=>{b.method==="paste"&&r.change(k=>{const _=k.createRangeIn(b.content);for(const A of _.getItems())A.is("element","imageBlock")&&c.setImageNaturalSizeAttributes(A)})})}}var R3=d(3350),oJ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(R3.A,oJ),R3.A.locals;class sJ extends kt{constructor(t,r=[]){super(t),this.focusTracker=new ir,this.keystrokes=new zr,this._focusables=new Ri,this.children=this.createCollection(),this._focusCycler=new Fi({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});for(const o of r)this.children.add(o),this._focusables.add(o),o instanceof Sq&&this._focusables.addMany(o.children);if(this._focusables.length>1)for(const o of this._focusables)aJ(o)&&(o.focusCycler.on("forwardCycle",c=>{this._focusCycler.focusNext(),c.stop()}),o.focusCycler.on("backwardCycle",c=>{this._focusCycler.focusPrevious(),c.stop()}));this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:-1},children:this.children})}render(){super.render(),tf({view:this});for(const r of this._focusables)this.focusTracker.add(r.element);this.keystrokes.listenTo(this.element);const t=r=>r.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}function aJ(l){return"focusCycler"in l}class z3 extends Pe{constructor(t){super(t),this._integrations=new Map,t.config.define("image.insert.integrations",["upload","assetManager","url"])}static get pluginName(){return"ImageInsertUI"}static get requires(){return[ei]}init(){const t=this.editor,r=t.model.document.selection,o=t.plugins.get("ImageUtils");this.set("isImageSelected",!1),this.listenTo(t.model.document,"change",()=>{this.isImageSelected=o.isImage(r.getSelectedElement())});const c=u=>this._createToolbarComponent(u);t.ui.componentFactory.add("insertImage",c),t.ui.componentFactory.add("imageInsert",c)}registerIntegration({name:t,observable:r,buttonViewCreator:o,formViewCreator:c,requiresForm:u}){this._integrations.has(t)&&z("image-insert-integration-exists",{name:t}),this._integrations.set(t,{observable:r,buttonViewCreator:o,formViewCreator:c,requiresForm:!!u})}_createToolbarComponent(t){const r=this.editor,o=t.t,c=this._prepareIntegrations();if(!c.length)return null;let u;const m=c[0];if(c.length==1){if(!m.requiresForm)return m.buttonViewCreator(!0);u=m.buttonViewCreator(!0)}else{const _=m.buttonViewCreator(!1);u=new jf(t,_),u.tooltip=!0,u.bind("label").to(this,"isImageSelected",A=>o(A?"Replace image":"Insert image"))}const b=this.dropdownView=ps(t,u),k=c.map(({observable:_})=>typeof _=="function"?_():_);return b.bind("isEnabled").toMany(k,"isEnabled",(..._)=>_.some(A=>A)),b.once("change:isOpen",()=>{const _=c.map(({formViewCreator:N})=>N(c.length==1)),A=new sJ(r.locale,_);b.panelView.children.add(A)}),b}_prepareIntegrations(){const t=this.editor.config.get("image.insert.integrations"),r=[];if(!t.length)return z("image-insert-integrations-not-specified"),r;for(const o of t)this._integrations.has(o)?r.push(this._integrations.get(o)):["upload","assetManager","url"].includes(o)||z("image-insert-unknown-integration",{item:o});return r.length||z("image-insert-integrations-not-registered"),r}}var F3=d(265),lJ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(F3.A,lJ),F3.A.locals;class cJ extends Pe{static get requires(){return[L3,Iu,E3,z3]}static get pluginName(){return"ImageBlock"}}class dJ extends Pe{static get requires(){return[Vy,M3,ei,B3,$i]}static get pluginName(){return"ImageInlineEditing"}init(){const t=this.editor,r=t.model.schema;
8472r.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),r.addChildCheck((o,c)=>{if(o.endsWith("caption")&&c.name==="imageInline")return!1}),this._setupConversion(),t.plugins.has("ImageBlockEditing")&&(t.commands.add("imageTypeInline",new P3(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const t=this.editor,r=t.t,o=t.conversion,c=t.plugins.get("ImageUtils");o.for("dataDowncast").elementToElement({model:"imageInline",view:(u,{writer:m})=>m.createEmptyElement("img")}),o.for("editingDowncast").elementToStructure({model:"imageInline",view:(u,{writer:m})=>c.toImageWidget(function(b){return b.createContainerElement("span",{class:"image-inline"},b.createEmptyElement("img"))}(m),m,r("image widget"))}),o.for("downcast").add(Yf(c,"imageInline","src")).add(Yf(c,"imageInline","alt")).add(S3(c,"imageInline")),o.for("upcast").elementToElement({view:y3(t,"imageInline"),model:(u,{writer:m})=>m.createElement("imageInline",u.hasAttribute("src")?{src:u.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const t=this.editor,r=t.model,o=t.editing.view,c=t.plugins.get("ImageUtils"),u=t.plugins.get("ClipboardPipeline");this.listenTo(u,"inputTransformation",(m,b)=>{const k=Array.from(b.content.getChildren());let _;if(!k.every(c.isBlockImageView))return;_=b.targetRanges?t.editing.mapper.toModelRange(b.targetRanges[0]):r.document.selection.getFirstRange();const A=r.createSelection(_);if($y(r.schema,A)==="imageInline"){const N=new ms(o.document),T=k.map(O=>O.childCount===1?(Array.from(O.getAttributes()).forEach(L=>N.setAttribute(...L,c.findViewImgElement(O))),O.getChild(0)):O);b.content=N.createDocumentFragment(T)}}),this.listenTo(u,"contentInsertion",(m,b)=>{b.method==="paste"&&r.change(k=>{const _=k.createRangeIn(b.content);for(const A of _.getItems())A.is("element","imageInline")&&c.setImageNaturalSizeAttributes(A)})})}}class uJ extends Pe{static get requires(){return[dJ,Iu,E3,z3]}static get pluginName(){return"ImageInline"}}class $3 extends Pe{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[ei]}getCaptionFromImageModelElement(t){for(const r of t.getChildren())if(r&&r.is("element","caption"))return r;return null}getCaptionFromModelSelection(t){const r=this.editor.plugins.get("ImageUtils"),o=t.getFirstPosition().findAncestor("caption");return o&&r.isBlockImage(o.parent)?o:null}matchImageCaptionViewElement(t){const r=this.editor.plugins.get("ImageUtils");return t.name=="figcaption"&&r.isBlockImageView(t.parent)?{name:!0}:null}}class hJ extends St{refresh(){const t=this.editor,r=t.plugins.get("ImageCaptionUtils"),o=t.plugins.get("ImageUtils");if(!t.plugins.has(L3))return this.isEnabled=!1,void(this.value=!1);const c=t.model.document.selection,u=c.getSelectedElement();if(!u){const m=r.getCaptionFromModelSelection(c);return this.isEnabled=!!m,void(this.value=!!m)}this.isEnabled=o.isImage(u),this.isEnabled?this.value=!!r.getCaptionFromImageModelElement(u):this.value=!1}execute(t={}){const{focusCaptionOnShow:r}=t;this.editor.model.change(o=>{this.value?this._hideImageCaption(o):this._showImageCaption(o,r)})}_showImageCaption(t,r){const o=this.editor.model.document.selection,c=this.editor.plugins.get("ImageCaptionEditing"),u=this.editor.plugins.get("ImageUtils");let m=o.getSelectedElement();const b=c._getSavedCaption(m);u.isInlineImage(m)&&(this.editor.execute("imageTypeBlock"),m=o.getSelectedElement());const k=b||t.createElement("caption");t.append(k,m),r&&t.setSelection(k,"in")}_hideImageCaption(t){const r=this.editor,o=r.model.document.selection,c=r.plugins.get("ImageCaptionEditing"),u=r.plugins.get("ImageCaptionUtils");let m,b=o.getSelectedElement();b?m=u.getCaptionFromImageModelElement(b):(m=u.getCaptionFromModelSelection(o),b=m.parent),c._saveCaption(b,m),t.setSelection(b,"on"),t.remove(m)}}class mJ extends Pe{constructor(t){super(t),this._savedCaptionsMap=new WeakMap}static get requires(){return[ei,$3]}static get pluginName(){return"ImageCaptionEditing"}init(){const t=this.editor,r=t.model.schema;r.isRegistered("caption")?r.extend("caption",{allowIn:"imageBlock"}):r.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),t.commands.add("toggleImageCaption",new hJ(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const t=this.editor,r=t.editing.view,o=t.plugins.get("ImageUtils"),c=t.plugins.get("ImageCaptionUtils"),u=t.t;t.conversion.for("upcast").elementToElement({view:m=>c.matchImageCaptionViewElement(m),model:"caption"}),t.conversion.for("dataDowncast").elementToElement({model:"caption",view:(m,{writer
8472:b})=>o.isBlockImage(m.parent)?b.createContainerElement("figcaption"):null}),t.conversion.for("editingDowncast").elementToElement({model:"caption",view:(m,{writer:b})=>{if(!o.isBlockImage(m.parent))return null;const k=b.createEditableElement("figcaption");b.setCustomProperty("imageCaption",!0,k),k.placeholder=u("Enter image caption"),o5({view:r,element:k,keepOnFocus:!0});const _=m.parent.getAttribute("alt");return bE(k,b,{label:_?u("Caption for image: %0",[_]):u("Caption for the image")})}})}_setupImageTypeCommandsIntegration(){const t=this.editor,r=t.plugins.get("ImageUtils"),o=t.plugins.get("ImageCaptionUtils"),c=t.commands.get("imageTypeInline"),u=t.commands.get("imageTypeBlock"),m=b=>{if(!b.return)return;const{oldElement:k,newElement:_}=b.return;if(!k)return;if(r.isBlockImage(k)){const N=o.getCaptionFromImageModelElement(k);if(N)return void this._saveCaption(_,N)}const A=this._getSavedCaption(k);A&&this._saveCaption(_,A)};c&&this.listenTo(c,"execute",m,{priority:"low"}),u&&this.listenTo(u,"execute",m,{priority:"low"})}_getSavedCaption(t){const r=this._savedCaptionsMap.get(t);return r?Gt.fromJSON(r):null}_saveCaption(t,r){this._savedCaptionsMap.set(t,r.toJSON())}_registerCaptionReconversion(){const t=this.editor,r=t.model,o=t.plugins.get("ImageUtils"),c=t.plugins.get("ImageCaptionUtils");r.document.on("change:data",()=>{const u=r.document.differ.getChanges();for(const m of u){if(m.attributeKey!=="alt")continue;const b=m.range.start.nodeAfter;if(o.isBlockImage(b)){const k=c.getCaptionFromImageModelElement(b);if(!k)return;t.editing.reconvertItem(k)}}})}}class fJ extends Pe{static get requires(){return[$3]}static get pluginName(){return"ImageCaptionUI"}init(){const t=this.editor,r=t.editing.view,o=t.plugins.get("ImageCaptionUtils"),c=t.t;t.ui.componentFactory.add("toggleImageCaption",u=>{const m=t.commands.get("toggleImageCaption"),b=new Rt(u);return b.set({icon:At.caption,tooltip:!0,isToggleable:!0}),b.bind("isOn","isEnabled").to(m,"value","isEnabled"),b.bind("label").to(m,"value",k=>c(k?"Toggle caption off":"Toggle caption on")),this.listenTo(b,"execute",()=>{t.execute("toggleImageCaption",{focusCaptionOnShow:!0});const k=o.getCaptionFromModelSelection(t.model.document.selection);if(k){const _=t.editing.mapper.toViewElement(k);r.scrollToTheSelection(),r.change(A=>{A.addClass("image__caption_highlighted",_)})}t.editing.view.focus()}),b})}}var V3=d(5247),pJ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(V3.A,pJ),V3.A.locals;function U3(l){const t=l.map(r=>r.replace("+","\\+"));return new RegExp(`^image\\/(${t.join("|")})$`)}function gJ(l){return new Promise((t,r)=>{const o=l.getAttribute("src");fetch(o).then(c=>c.blob()).then(c=>{const u=W3(c,o),m=u.replace("image/",""),b=new File([c],`image.${m}`,{type:u});t(b)}).catch(c=>c&&c.name==="TypeError"?function(u){return function(m){return new Promise((b,k)=>{const _=g.document.createElement("img");_.addEventListener("load",()=>{const A=g.document.createElement("canvas");A.width=_.width,A.height=_.height,A.getContext("2d").drawImage(_,0,0),A.toBlob(N=>N?b(N):k())}),_.addEventListener("error",()=>k()),_.src=m})}(u).then(m=>{const b=W3(m,u),k=b.replace("image/","");return new File([m],`image.${k}`,{type:b})})}(o).then(t).catch(r):r(c))})}function W3(l,t){return l.type?l.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class bJ extends Pe{static get pluginName(){return"ImageUploadUI"}init(){const t=this.editor,r=t.t,o=()=>{const c=this._createButton(u4);return c.set({label:r("Upload image from computer"),tooltip:!0}),c};if(t.ui.componentFactory.add("uploadImage",o),t.ui.componentFactory.add("imageUpload",o),t.ui.componentFactory.add("menuBar:uploadImage",()=>{const c=this._createButton(MN);return c.label=r("Image from computer"),c}),t.plugins.has("ImageInsertUI")){const c=t.plugins.get("ImageInsertUI");c.registerIntegration({name:"upload",observable:()=>t.commands.get("uploadImage"),buttonViewCreator:()=>{const u=t.ui.componentFactory.create("uploadImage");return u.bind("label").to(c,"isImageSelected",m=>r(m?"Replace image from computer":"Upload image from computer")),u},formViewCreator:()=>{const u=t.ui.componentFactory.create("uploadImage");return u.withText=!0,u.bind("label").to(c,"isImageSelected",m=>r(m?"Replace from computer":"Upload from computer")),u.on("execute",()=>{c.dropdownView.isOpen=!1}),u}})}}_createButton(t){const r=this.editor,o=r.locale,c=r.commands.get("uploadImage"),u=r.config.get("image.upload.types"),m=U3(u),b=new t(r.locale),k=o.t;return b.set({acceptedType:u.map(_=>`image/${_}`).join(","),allowMultipleFiles:!0,label:k("Upload image from computer"),icon:At.imageUpload}),b.bind("isEnabled").to(c),b.on("done",(_,A)=>{const N=Array.from(A).filter(T=>m.test(T.type));N.length&&(r.execute("uploadImage",{file:N}),r.editing.view.focus())}),b}}var H3=d(2267),kJ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(H3.A,kJ),H3.A.locals;var G3=d(7693),yJ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(G3.A,yJ),G3.A.locals;var q3=d(1559),xJ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(q3.A,xJ),q3.A.locals;class vJ extends Pe{constructor(t){super(t),this.uploadStatusChange=(r,o,c)=>{const u=this.editor,m=o.item,b=m.getAttribute("uploadId");if(!c.consumable.consume(o.item,r.name))return;const k=u.plugins.get("ImageUtils"),_=u.plugins.get(fo),A=b?o.attributeNewValue:null,N=this.placeholder,T=u.editing.mapper.toViewElement(m),O=c.writer;if(A=="reading")return K3(T,O),void Y3(k,N,T,O);
8472if(A=="uploading"){const L=_.loaders.get(b);return K3(T,O),void(L?(Q3(T,O),function($,U,H,J){const ae=function(_e){const qe=_e.createUIElement("div",{class:"ck-progress-bar"});return _e.setCustomProperty("progressBar",!0,qe),qe}(U);U.insert(U.createPositionAt($,"end"),ae),H.on("change:uploadedPercent",(_e,qe,vt)=>{J.change(jt=>{jt.setStyle("width",vt+"%",ae)})})}(T,O,L,u.editing.view),function($,U,H,J){if(J.data){const ae=$.findViewImgElement(U);H.setAttribute("src",J.data,ae)}}(k,T,O,L)):Y3(k,N,T,O))}A=="complete"&&_.loaders.get(b)&&function(L,$,U){const H=$.createUIElement("div",{class:"ck-image-upload-complete-icon"});$.insert($.createPositionAt(L,"end"),H),setTimeout(()=>{U.change(J=>J.remove(J.createRangeOn(H)))},3e3)}(T,O,u.editing.view),function(L,$){J3(L,$,"progressBar")}(T,O),Q3(T,O),function(L,$){$.removeClass("ck-appear",L)}(T,O)},this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}static get pluginName(){return"ImageUploadProgress"}init(){const t=this.editor;t.plugins.has("ImageBlockEditing")&&t.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),t.plugins.has("ImageInlineEditing")&&t.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}}function K3(l,t){l.hasClass("ck-appear")||t.addClass("ck-appear",l)}function Y3(l,t,r,o){r.hasClass("ck-image-upload-placeholder")||o.addClass("ck-image-upload-placeholder",r);const c=l.findViewImgElement(r);c.getAttribute("src")!==t&&o.setAttribute("src",t,c),Z3(r,"placeholder")||o.insert(o.createPositionAfter(c),function(u){const m=u.createUIElement("div",{class:"ck-upload-placeholder-loader"});return u.setCustomProperty("placeholder",!0,m),m}(o))}function Q3(l,t){l.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",l),J3(l,t,"placeholder")}function Z3(l,t){for(const r of l.getChildren())if(r.getCustomProperty(t))return r}function J3(l,t,r){const o=Z3(l,r);o&&t.remove(t.createRangeOn(o))}var wJ=Object.defineProperty,_J=Object.defineProperties,AJ=Object.getOwnPropertyDescriptors,X3=Object.getOwnPropertySymbols,CJ=Object.prototype.hasOwnProperty,jJ=Object.prototype.propertyIsEnumerable,eS=(l,t,r)=>t in l?wJ(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r;class NJ extends St{refresh(){const t=this.editor,r=t.plugins.get("ImageUtils"),o=t.model.document.selection.getSelectedElement();this.isEnabled=r.isImageAllowed()||r.isImage(o)}execute(t){const r=tn(t.file),o=this.editor.model.document.selection,c=this.editor.plugins.get("ImageUtils"),u=Object.fromEntries(o.getAttributes());r.forEach((m,b)=>{const k=o.getSelectedElement();if(b&&k&&c.isImage(k)){const _=this.editor.model.createPositionAfter(k);this._uploadImage(m,u,_)}else this._uploadImage(m,u)})}_uploadImage(t,r,o){const c=this.editor,u=c.plugins.get(fo).createLoader(t),m=c.plugins.get("ImageUtils");var b,k;u&&m.insertImage((b=((_,A)=>{for(var N in A||(A={}))CJ.call(A,N)&&eS(_,N,A[N]);if(X3)for(var N of X3(A))jJ.call(A,N)&&eS(_,N,A[N]);return _})({},r),k={uploadId:u.id},_J(b,AJ(k))),o)}}class EJ extends Pe{constructor(t){super(t),t.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}static get requires(){return[fo,Ay,$i,ei]}static get pluginName(){return"ImageUploadEditing"}init(){const t=this.editor,r=t.model.document,o=t.conversion,c=t.plugins.get(fo),u=t.plugins.get("ImageUtils"),m=t.plugins.get("ClipboardPipeline"),b=U3(t.config.get("image.upload.types")),k=new NJ(t);t.commands.add("uploadImage",k),t.commands.add("imageUpload",k),o.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(t.editing.view.document,"clipboardInput",(_,A)=>{if(N=A.dataTransfer,Array.from(N.types).includes("text/html")&&N.getData("text/html")!=="")return;var N;const T=Array.from(A.dataTransfer.files).filter(O=>!!O&&b.test(O.type));T.length&&(_.stop(),t.model.change(O=>{A.targetRanges&&O.setSelection(A.targetRanges.map(L=>t.editing.mapper.toModelRange(L))),t.execute("uploadImage",{file:T})}))}),this.listenTo(m,"inputTransformation",(_,A)=>{const N=Array.from(t.editing.view.createRangeIn(A.content)).map(O=>O.item).filter(O=>function(L,$){return!(!L.isInlineImageView($)||!$.getAttribute("src")||!$.getAttribute("src").match(/^data:image\/\w+;base64,/g)&&!$.getAttribute("src").match(/^blob:/g))}(u,O)&&!O.getAttribute("uploadProcessed")).map(O=>({promise:gJ(O),imageElement:O}));if(!N.length)return;const T=new ms(t.editing.view.document);for(const O of N){T.setAttribute("uploadProcessed",!0,O.imageElement);const L=c.createLoader(O.promise);L&&(T.setAttribute("src","",O.imageElement),T.setAttribute("uploadId",L.id,O.imageElement))}}),t.editing.view.document.on("dragover",(_,A)=>{A.preventDefault()}),r.on("change",()=>{const _=r.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),A=new Set;for(const N of _)if(N.type=="insert"&&N.name!="$text"){const T=N.position.nodeAfter,O=N.position.root.rootName=="$graveyard";for(const L of SJ(t,T)){const $=L.getAttribute("uploadId");if(!$)continue;const U=c.loaders.get($);U&&(O?A.has($)||U.abort():(A.add($),this._uploadImageElements.set($,L),U.status=="idle"&&this._readAndUpload(U)))}}}),this.on("uploadComplete",(_,{imageElement:A,data:N})=>{const T=N.urls?N.urls:N;this.editor.model.change(O=>{O.setAttribute("src",T.default,A),this._parseAndSetSrcsetAttributeOnImage(T,A,O),u.setImageNaturalSizeAttributes(A)})},{priority:"low"})}afterInit(){const t=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&t.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(t){const r=this.editor,o=r.model,c=r.locale.t,u=r.plugins.get(fo),m=r.plugins.get(Ay),b=r.plugins.get("ImageUtils"),k=this._uploadImageElements;return o.enqueueChange({isUndoable:!1},A=>{A.setAttribute("uploadStatus","reading",k.get(t.id))}),t.read().then(()=>{const A=t.upload(),N=k.get(t.id);if(y.isSafari){const T=r.editing.mapper.toViewElement(N),O=b.findViewImgElement(T);r.editing.view.once("render",()=>{if(!O.parent)return;const L=r.editing.view.domConverter.mapViewToDom(O.parent);if(!L)return;const $=L.style.display;L.style.display="none",L._ckHack=L.offsetHeight,L.style.display=$})}return r.ui&&r.ui.ariaLiveAnnouncer.announce(c("Uploading image")),o.enqueueChange({isUndoable:!1},T=>{T.setAttribute("uploadStatus","uploading",N)}),A}).then(A=>{o.enqueueChange({isUndoable:!1},N=>{const T=k.get(t.id);N.setAttribute("uploadStatus","complete",T),r.ui&&r.ui.ariaLiveAnnouncer.announce(c("Image upload complete")),this.fire("uploadComplete",{data:A,imageElement:T})}),_()}).catch(A=>{if(r.ui&&r.ui.ariaLiveAnnouncer.announce(c("Error during image upload")),t.status!=="error"&&t.status!=="aborted")throw A;t.status=="error"&&A&&m.showWarning(A,{title:c("Upload failed"),namespace:"upload"}),o.enqueueChange({isUndoable:!1},N=>{N.remove(k.get(t.id))}),_()});function _(){o.enqueueChange({isUndoable:!1},A=>{const N=k.get(t.id);A.removeAttribute("uploadId",N),A.removeAttribute("uploadStatus",N),k.delete(t.id)}),u.destroyLoader(t)}}_parseAndSetSrcsetAttributeOnImage(t,r,o){let c=0;const u=Object.keys(t).filter(m=>{const b=parseInt(m,10);if(!isNaN(b))return c=Math.max(c,b),!0}).map(m=>`${t[m]} ${m}w`).join(", ");
8472if(u!=""){const m={srcset:u};r.hasAttribute("width")||r.hasAttribute("height")||(m.width=c),o.setAttributes(m,r)}}}function SJ(l,t){const r=l.plugins.get("ImageUtils");return Array.from(l.model.createRangeOn(t)).filter(o=>r.isImage(o.item)).map(o=>o.item)}var tS=d(4642),DJ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(tS.A,DJ),tS.A.locals;var nS=d(3469),TJ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(nS.A,TJ),nS.A.locals;class IJ extends St{constructor(t,r){super(t),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(r.map(o=>{if(o.isDefault)for(const c of o.modelElements)this._defaultStyles[c]=o.name;return[o.name,o]}))}refresh(){const t=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!t,this.isEnabled?t.hasAttribute("imageStyle")?this.value=t.getAttribute("imageStyle"):this.value=this._defaultStyles[t.name]:this.value=!1}execute(t={}){const r=this.editor,o=r.model,c=r.plugins.get("ImageUtils");o.change(u=>{const m=t.value,{setImageSizes:b=!0}=t;let k=c.getClosestSelectedImageElement(o.document.selection);m&&this.shouldConvertImageType(m,k)&&(this.editor.execute(c.isBlockImage(k)?"imageTypeInline":"imageTypeBlock",{setImageSizes:b}),k=c.getClosestSelectedImageElement(o.document.selection)),!m||this._styles.get(m).isDefault?u.removeAttribute("imageStyle",k):u.setAttribute("imageStyle",m,k),b&&c.setImageNaturalSizeAttributes(k)})}shouldConvertImageType(t,r){return!this._styles.get(t).modelElements.includes(r.name)}}var MJ=Object.defineProperty,rS=Object.getOwnPropertySymbols,PJ=Object.prototype.hasOwnProperty,OJ=Object.prototype.propertyIsEnumerable,iS=(l,t,r)=>t in l?MJ(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,oS=(l,t)=>{for(var r in t||(t={}))PJ.call(t,r)&&iS(l,r,t[r]);if(rS)for(var r of rS(t))OJ.call(t,r)&&iS(l,r,t[r]);return l};const{objectFullWidth:BJ,objectInline:sS,objectLeft:aS,objectRight:Uy,objectCenter:Wy,objectBlockLeft:lS,objectBlockRight:cS}=At,Zf={get inline(){return{name:"inline",title:"In line",icon:sS,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:aS,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:lS,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:Wy,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:Uy,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:cS,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:Wy,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:Uy,modelElements:["imageBlock"],className:"image-style-side"}}},dS={full:BJ,left:lS,right:cS,center:Wy,inlineLeft:aS,inlineRight:Uy,inline:sS},uS=[{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 hS(l){z("image-style-configuration-definition-invalid",l)}const Hy={normalizeStyles:function(l){return(l.configuredStyles.options||[]).map(t=>function(r){return r=typeof r=="string"?Zf[r]?oS({},Zf[r]):{name:r}:function(o,c){const u=oS({},c);for(const m in o)Object.prototype.hasOwnProperty.call(c,m)||(u[m]=o[m]);return u}(Zf[r.name],r),typeof r.icon=="string"&&(r.icon=dS[r.icon]||r.icon),r}(t)).filter(t=>function(r,{isBlockPluginLoaded:o,isInlinePluginLoaded:c}){const{modelElements:u,name:m}=r;if(!(u&&u.length&&m))return hS({style:r}),!1;{const b=[o?"imageBlock":null,c?"imageInline":null];if(!u.some(k=>b.includes(k)))return z("image-style-missing-dependency",{style:r,missingPlugins:u.map(k=>k==="imageBlock"?"ImageBlockEditing":"ImageInlineEditing")}),!1}return!0}(t,l))},getDefaultStylesConfiguration:function(l,t){return l&&t?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:l?{options:["block","side"]}:t?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(l){return l.has("ImageBlockEditing")&&l.has("ImageInlineEditing")?[...uS]:[]}
8472,warnInvalidStyle:hS,DEFAULT_OPTIONS:Zf,DEFAULT_ICONS:dS,DEFAULT_DROPDOWN_DEFINITIONS:uS};function mS(l,t){for(const r of t)if(r.name===l)return r}class fS extends Pe{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[ei]}init(){const{normalizeStyles:t,getDefaultStylesConfiguration:r}=Hy,o=this.editor,c=o.plugins.has("ImageBlockEditing"),u=o.plugins.has("ImageInlineEditing");o.config.define("image.styles",r(c,u)),this.normalizedStyles=t({configuredStyles:o.config.get("image.styles"),isBlockPluginLoaded:c,isInlinePluginLoaded:u}),this._setupConversion(c,u),this._setupPostFixer(),o.commands.add("imageStyle",new IJ(o,this.normalizedStyles))}_setupConversion(t,r){const o=this.editor,c=o.model.schema,u=(m=this.normalizedStyles,(k,_,A)=>{if(!A.consumable.consume(_.item,k.name))return;const N=mS(_.attributeNewValue,m),T=mS(_.attributeOldValue,m),O=A.mapper.toViewElement(_.item),L=A.writer;T&&L.removeClass(T.className,O),N&&L.addClass(N.className,O)});var m;const b=function(k){const _={imageInline:k.filter(A=>!A.isDefault&&A.modelElements.includes("imageInline")),imageBlock:k.filter(A=>!A.isDefault&&A.modelElements.includes("imageBlock"))};return(A,N,T)=>{if(!N.modelRange)return;const O=N.viewItem,L=rr(N.modelRange.getItems());if(L&&T.schema.checkAttribute(L,"imageStyle"))for(const $ of _[L.name])T.consumable.consume(O,{classes:$.className})&&T.writer.setAttribute("imageStyle",$.name,L)}}(this.normalizedStyles);o.editing.downcastDispatcher.on("attribute:imageStyle",u),o.data.downcastDispatcher.on("attribute:imageStyle",u),t&&(c.extend("imageBlock",{allowAttributes:"imageStyle"}),o.data.upcastDispatcher.on("element:figure",b,{priority:"low"})),r&&(c.extend("imageInline",{allowAttributes:"imageStyle"}),o.data.upcastDispatcher.on("element:img",b,{priority:"low"}))}_setupPostFixer(){const t=this.editor,r=t.model.document,o=t.plugins.get(ei),c=new Map(this.normalizedStyles.map(u=>[u.name,u]));r.registerPostFixer(u=>{let m=!1;for(const b of r.differ.getChanges())if(b.type=="insert"||b.type=="attribute"&&b.attributeKey=="imageStyle"){let k=b.type=="insert"?b.position.nodeAfter:b.range.start.nodeAfter;if(k&&k.is("element","paragraph")&&k.childCount>0&&(k=k.getChild(0)),!o.isImage(k))continue;const _=k.getAttribute("imageStyle");if(!_)continue;const A=c.get(_);A&&A.modelElements.includes(k.name)||(u.removeAttribute("imageStyle",k),m=!0)}return m})}}var pS=d(6386),LJ={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(pS.A,LJ),pS.A.locals;class RJ extends Pe{static get requires(){return[fS]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const t=this.editor.t;return{"Wrap text":t("Wrap text"),"Break text":t("Break text"),"In line":t("In line"),"Full size image":t("Full size image"),"Side image":t("Side image"),"Left aligned image":t("Left aligned image"),"Centered image":t("Centered image"),"Right aligned image":t("Right aligned image")}}init(){const t=this.editor.plugins,r=this.editor.config.get("image.toolbar")||[],o=gS(t.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const u of o)this._createButton(u);const c=gS([...r.filter(be),...Hy.getDefaultDropdownDefinitions(t)],this.localizedDefaultStylesTitles);for(const u of c)this._createDropdown(u,o)}_createDropdown(t,r){const o=this.editor.ui.componentFactory;o.add(t.name,c=>{let u;const{defaultItem:m,items:b,title:k}=t,_=b.filter(O=>r.find(({name:L})=>bS(L)===O)).map(O=>{const L=o.create(O);return O===m&&(u=L),L});b.length!==_.length&&Hy.warnInvalidStyle({dropdown:t});const A=ps(c,jf),N=A.buttonView,T=N.arrowView;return yy(A,_,{enableActiveItemFocusOnDropdownOpen:!0}),N.set({label:kS(k,u.label),class:null,tooltip:!0}),T.unbind("label"),T.set({label:k}),N.bind("icon").toMany(_,"isOn",(...O)=>{const L=O.findIndex(oa);return L<0?u.icon:_[L].icon}),N.bind("label").toMany(_,"isOn",(...O)=>{const L=O.findIndex(oa);return kS(k,L<0?u.label:_[L].label)}),N.bind("isOn").toMany(_,"isOn",(...O)=>O.some(oa)),N.bind("class").toMany(_,"isOn",(...O)=>O.some(oa)?"ck-splitbutton_flatten":void 0),N.on("execute",()=>{_.some(({isOn:O})=>O)?A.isOpen=!A.isOpen:u.fire("execute")}),A.bind("isEnabled").toMany(_,"isEnabled",(...O)=>O.some(oa)),this.listenTo(A,"execute",()=>{this.editor.editing.view.focus()}),A})}_createButton(t){const r=t.name;this.editor.ui.componentFactory.add(bS(r),o=>{const c=this.editor.commands.get("imageStyle"),u=new Rt(o);return u.set({label:t.title,icon:t.icon,tooltip:!0,isToggleable:!0}),u.bind("isEnabled").to(c,"isEnabled"),u.bind("isOn").to(c,"value",m=>m===r),u.on("execute",this._executeCommand.bind(this,r)),u})}_executeCommand(t){this.editor.execute("imageStyle",{value:t}),this.editor.editing.view.focus()}}function gS(l,t){for(const r of l)t[r.title]&&(r.title=t[r.title]);return l}function bS(l){return`imageStyle:${l}`}function kS(l,t){return(l?l+": ":"")+t}class zJ extends Pe{static get pluginName(){return"IndentEditing"}init(){const t=this.editor;
8472t.commands.add("indent",new X2(t)),t.commands.add("outdent",new X2(t))}}class FJ extends Pe{static get pluginName(){return"IndentUI"}init(){const t=this.editor,r=t.locale,o=t.t,c=r.uiLanguageDirection=="ltr"?At.indent:At.outdent,u=r.uiLanguageDirection=="ltr"?At.outdent:At.indent;this._defineButton("indent",o("Increase indent"),c),this._defineButton("outdent",o("Decrease indent"),u)}_defineButton(t,r,o){const c=this.editor;c.ui.componentFactory.add(t,()=>{const u=this._createButton(Rt,t,r,o);return u.set({tooltip:!0}),u}),c.ui.componentFactory.add("menuBar:"+t,()=>this._createButton(wi,t,r,o))}_createButton(t,r,o,c){const u=this.editor,m=u.commands.get(r),b=new t(u.locale);return b.set({label:o,icon:c}),b.bind("isEnabled").to(m,"isEnabled"),this.listenTo(b,"execute",()=>{u.execute(r),u.editing.view.focus()}),b}}class $J{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(t){Array.isArray(t)?t.forEach(r=>this._definitions.add(r)):this._definitions.add(t)}getDispatcher(){return t=>{t.on("attribute:linkHref",(r,o,c)=>{if(!c.consumable.test(o.item,"attribute:linkHref")||!o.item.is("selection")&&!c.schema.isInline(o.item))return;const u=c.writer,m=u.document.selection;for(const b of this._definitions){const k=u.createAttributeElement("a",b.attributes,{priority:5});b.classes&&u.addClass(b.classes,k);for(const _ in b.styles)u.setStyle(_,b.styles[_],k);u.setCustomProperty("link",!0,k),b.callback(o.attributeNewValue)?o.item.is("selection")?u.wrap(m.getFirstRange(),k):u.wrap(c.mapper.toViewRange(o.range),k):u.unwrap(c.mapper.toViewRange(o.range),k)}},{priority:"high"})}}getDispatcherForLinkedImage(){return t=>{t.on("attribute:linkHref:imageBlock",(r,o,{writer:c,mapper:u})=>{const m=u.toViewElement(o.item),b=Array.from(m.getChildren()).find(k=>k.is("element","a"));for(const k of this._definitions){const _=Ro(k.attributes);if(k.callback(o.attributeNewValue)){for(const[A,N]of _)A==="class"?c.addClass(N,b):c.setAttribute(A,N,b);k.classes&&c.addClass(k.classes,b);for(const A in k.styles)c.setStyle(A,k.styles[A],b)}else{for(const[A,N]of _)A==="class"?c.removeClass(N,b):c.removeAttribute(A,b);k.classes&&c.removeClass(k.classes,b);for(const A in k.styles)c.removeStyle(A,b)}}})}}}const VJ=function(l,t,r){var o=l.length;return r=r===void 0?o:r,!t&&r>=o?l:u5(l,t,r)};var UJ=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const yS=function(l){return UJ.test(l)},WJ=function(l){return l.split("")};var xS="\\ud800-\\udfff",HJ="["+xS+"]",Gy="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",qy="\\ud83c[\\udffb-\\udfff]",vS="[^"+xS+"]",wS="(?:\\ud83c[\\udde6-\\uddff]){2}",_S="[\\ud800-\\udbff][\\udc00-\\udfff]",AS="(?:"+Gy+"|"+qy+")?",CS="[\\ufe0e\\ufe0f]?",GJ=CS+AS+("(?:\\u200d(?:"+[vS,wS,_S].join("|")+")"+CS+AS+")*"),qJ="(?:"+[vS+Gy+"?",Gy,wS,_S,HJ].join("|")+")",KJ=RegExp(qy+"(?="+qy+")|"+qJ+GJ,"g");const YJ=function(l){return l.match(KJ)||[]},QJ=function(l){return yS(l)?YJ(l):WJ(l)},ZJ=function(l){return function(t){t=Bk(t);var r=yS(t)?QJ(t):void 0,o=r?r[0]:t.charAt(0),c=r?VJ(r,1).join(""):t.slice(1);return o[l]()+c}}("toUpperCase"),JJ=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,XJ=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,eX=/^((\w+:(\/{2,})?)|(\W))/i,tX=["https?","ftps?","mailto"],Jf="Ctrl+K";function jS(l,{writer:t}){const r=t.createAttributeElement("a",{href:l},{priority:5});return t.setCustomProperty("link",!0,r),r}function NS(l,t=tX){const r=String(l),o=t.join("|");return function(c,u){return!!c.replace(JJ,"").match(u)}(r,new RegExp(`${"^(?:(?:<protocols>):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))".replace("<protocols>",o)}`,"i"))?r:"#"}function Ky(l,t){return!!l&&t.checkAttribute(l.name,"linkHref")}function Yy(l,t){const r=(o=l,XJ.test(o)?"mailto:":t);var o;const c=!!r&&!ES(l);return l&&c?r+l:l}function ES(l){return eX.test(l)}function SS(l){window.open(l,"_blank","noopener")}class nX extends St{constructor(){super(...arguments),this.manualDecorators=new so,this.automaticDecorators=new $J}restoreManualDecoratorStates(){for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}refresh(){const t=this.editor.model,r=t.document.selection,o=r.getSelectedElement()||rr(r.getSelectedBlocks());Ky(o,t.schema)?(this.value=o.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttribute(o,"linkHref")):(this.value=r.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttributeInSelection(r,"linkHref"));for(const c of this.manualDecorators)c.value=this._getDecoratorStateFromModel(c.id)}execute(t,r={}){const o=this.editor.model,c=o.document.selection,u=[],m=[];for(const b in r)r[b]?u.push(b):m.push(b);o.change(b=>{if(c.isCollapsed){const k=c.getFirstPosition();if(c.hasAttribute("linkHref")){const _=DS(c);let A=Rf(k,"linkHref",c.getAttribute("linkHref"),o);c.getAttribute("linkHref")===_&&(A=this._updateLinkContent(o,b,A,t)),b.setAttribute("linkHref",t,A),u.forEach(N=>{b.setAttribute(N,!0,A)}),m.forEach(N=>{b.removeAttribute(N,A)}),b.setSelection(b.createPositionAfter(A.end.nodeBefore))}else if(t!==""){const _=Ro(c.getAttributes());_.set("linkHref",t),u.forEach(N=>{_.set(N,!0)});const{end:A}=o.insertContent(b.createText(t,_),k);b.setSelection(A)}["linkHref",...u,...m].forEach(_=>{b.removeSelectionAttribute(_)})}
8472else{const k=o.schema.getValidRanges(c.getRanges(),"linkHref"),_=[];for(const N of c.getSelectedBlocks())o.schema.checkAttribute(N,"linkHref")&&_.push(b.createRangeOn(N));const A=_.slice();for(const N of k)this._isRangeToUpdate(N,_)&&A.push(N);for(const N of A){let T=N;if(A.length===1){const O=DS(c);c.getAttribute("linkHref")===O&&(T=this._updateLinkContent(o,b,N,t),b.setSelection(b.createSelection(T)))}b.setAttribute("linkHref",t,T),u.forEach(O=>{b.setAttribute(O,!0,T)}),m.forEach(O=>{b.removeAttribute(O,T)})}}})}_getDecoratorStateFromModel(t){const r=this.editor.model,o=r.document.selection,c=o.getSelectedElement();return Ky(c,r.schema)?c.getAttribute(t):o.getAttribute(t)}_isRangeToUpdate(t,r){for(const o of r)if(o.containsRange(t))return!1;return!0}_updateLinkContent(t,r,o,c){const u=r.createText(c,{linkHref:c});return t.insertContent(u,o)}}function DS(l){if(l.isCollapsed){const t=l.getFirstPosition();return t.textNode&&t.textNode.data}{const t=Array.from(l.getFirstRange().getItems());if(t.length>1)return null;const r=t[0];return r.is("$text")||r.is("$textProxy")?r.data:null}}class rX extends St{refresh(){const t=this.editor.model,r=t.document.selection,o=r.getSelectedElement();Ky(o,t.schema)?this.isEnabled=t.schema.checkAttribute(o,"linkHref"):this.isEnabled=t.schema.checkAttributeInSelection(r,"linkHref")}execute(){const t=this.editor,r=this.editor.model,o=r.document.selection,c=t.commands.get("link");r.change(u=>{const m=o.isCollapsed?[Rf(o.getFirstPosition(),"linkHref",o.getAttribute("linkHref"),r)]:r.schema.getValidRanges(o.getRanges(),"linkHref");for(const b of m)if(u.removeAttribute("linkHref",b),c)for(const k of c.manualDecorators)u.removeAttribute(k.id,b)})}}class iX extends fe(){constructor({id:t,label:r,attributes:o,classes:c,styles:u,defaultValue:m}){super(),this.id=t,this.set("value",void 0),this.defaultValue=m,this.label=r,this.attributes=o,this.classes=c,this.styles=u}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}var TS=d(7719),oX={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(TS.A,oX),TS.A.locals;var sX=Object.defineProperty,IS=Object.getOwnPropertySymbols,aX=Object.prototype.hasOwnProperty,lX=Object.prototype.propertyIsEnumerable,MS=(l,t,r)=>t in l?sX(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,cX=(l,t)=>{for(var r in t||(t={}))aX.call(t,r)&&MS(l,r,t[r]);if(IS)for(var r of IS(t))lX.call(t,r)&&MS(l,r,t[r]);return l};const PS="automatic",dX=/^(https?:)?\/\//;class OS extends Pe{static get pluginName(){return"LinkEditing"}static get requires(){return[sE,XN,$i]}constructor(t){super(t),t.config.define("link",{allowCreatingEmptyLinks:!1,addTargetToExternalLinks:!1})}init(){const t=this.editor,r=this.editor.config.get("link.allowedProtocols");t.model.schema.extend("$text",{allowAttributes:"linkHref"}),t.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:jS}),t.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(c,u)=>jS(NS(c,r),u)}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:c=>c.getAttribute("href")}}),t.commands.add("link",new nX(t)),t.commands.add("unlink",new rX(t));const o=function(c,u){const m={"Open in a new tab":c("Open in a new tab"),Downloadable:c("Downloadable")};return u.forEach(b=>("label"in b&&m[b.label]&&(b.label=m[b.label]),b)),u}(t.t,function(c){const u=[];if(c)for(const[m,b]of Object.entries(c)){const k=Object.assign({},b,{id:`link${ZJ(m)}`});u.push(k)}return u}(t.config.get("link.decorators")));this._enableAutomaticDecorators(o.filter(c=>c.mode===PS)),this._enableManualDecorators(o.filter(c=>c.mode==="manual")),t.plugins.get(sE).registerAttribute("linkHref"),function(c,u,m,b){const k=c.editing.view,_=new Set;k.document.registerPostFixer(A=>{const N=c.model.document.selection;let T=!1;if(N.hasAttribute(u)){const O=Rf(N.getFirstPosition(),u,N.getAttribute(u),c.model),L=c.editing.mapper.toViewRange(O);for(const $ of L.getItems())$.is("element",m)&&!$.hasClass(b)&&(A.addClass(b,$),_.add($),T=!0)}return T}),c.conversion.for("editingDowncast").add(A=>{function N(){k.change(T=>{for(const O of _.values())T.removeClass(b,O),_.delete(O)})}A.on("insert",N,{priority:"highest"}),A.on("remove",N,{priority:"highest"}),A.on("attribute",N,{priority:"highest"}),A.on("selection",N,{priority:"highest"})})}(t,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableSelectionAttributesFixer(),this._enableClipboardIntegration()}_enableAutomaticDecorators(t){const r=this.editor,o=r.commands.get("link").automaticDecorators;r.config.get("link.addTargetToExternalLinks")&&o.add({id:"linkIsExternal",mode:PS,callback:c=>!!c&&dX.test(c),attributes:{target:"_blank",rel:"noopener noreferrer"}}),o.add(t),o.length&&r.conversion.for("downcast").add(o.getDispatcher())}_enableManualDecorators(t){if(!t.length)return;const r=this.editor,o=r.commands.get("link").manualDecorators;t.forEach(c=>{r.model.schema.extend("$text",{allowAttributes:c.id});const u=new iX(c);o.add(u),r.conversion.for("downcast").attributeToElement({model:u.id,view:(m,{writer
8472:b,schema:k},{item:_})=>{if((_.is("selection")||k.isInline(_))&&m){const A=b.createAttributeElement("a",u.attributes,{priority:5});u.classes&&b.addClass(u.classes,A);for(const N in u.styles)b.setStyle(N,u.styles[N],A);return b.setCustomProperty("link",!0,A),A}}}),r.conversion.for("upcast").elementToAttribute({view:cX({name:"a"},u._createPattern()),model:{key:u.id}})})}_enableLinkOpen(){const t=this.editor,r=t.editing.view.document;this.listenTo(r,"click",(o,c)=>{if(!(y.isMac?c.domEvent.metaKey:c.domEvent.ctrlKey))return;let u=c.domTarget;if(u.tagName.toLowerCase()!="a"&&(u=u.closest("a")),!u)return;const m=u.getAttribute("href");m&&(o.stop(),c.preventDefault(),SS(m))},{context:"$capture"}),this.listenTo(r,"keydown",(o,c)=>{const u=t.commands.get("link").value;u&&c.keyCode===Mt.enter&&c.altKey&&(o.stop(),SS(u))})}_enableSelectionAttributesFixer(){const t=this.editor.model,r=t.document.selection;this.listenTo(r,"change:attribute",(o,{attributeKeys:c})=>{c.includes("linkHref")&&!r.hasAttribute("linkHref")&&t.change(u=>{var m;(function(b,k){b.removeSelectionAttribute("linkHref");for(const _ of k)b.removeSelectionAttribute(_)})(u,(m=t.schema,m.getDefinition("$text").allowAttributes.filter(b=>b.startsWith("link"))))})})}_enableClipboardIntegration(){const t=this.editor,r=t.model,o=this.editor.config.get("link.defaultProtocol");o&&this.listenTo(t.plugins.get("ClipboardPipeline"),"contentInsertion",(c,u)=>{r.change(m=>{const b=m.createRangeIn(u.content);for(const k of b.getItems())if(k.hasAttribute("linkHref")){const _=Yy(k.getAttribute("linkHref"),o);m.setAttribute("linkHref",_,k)}})})}}var BS=d(3817),uX={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(BS.A,uX),BS.A.locals;class hX extends kt{constructor(t,r,o){super(t),this.focusTracker=new ir,this.keystrokes=new zr,this._focusables=new Ri;const c=t.t;this._validators=o,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(c("Save"),At.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(c("Cancel"),At.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(r),this.children=this._createFormChildren(r.manualDecorators),this._focusCycler=new Fi({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const u=["ck","ck-link-form","ck-responsive-form"];r.manualDecorators.length&&u.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:u,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((t,r)=>(t[r.name]=r.isOn,t),{})}render(){super.render(),tf({view:this}),[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].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 t of this._validators){const r=t(this);if(r)return this.urlInputView.errorText=r,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null}_createUrlInput(){const t=this.locale.t,r=new Af(this.locale,Nf);return r.label=t("Link URL"),r}_createButton(t,r,o,c){const u=new Rt(this.locale);return u.set({label:t,icon:r,tooltip:!0}),u.extendTemplate({attributes:{class:o}}),c&&u.delegate("execute").to(this,c),u}_createManualDecoratorSwitches(t){const r=this.createCollection();for(const o of t.manualDecorators){const c=new wf(this.locale);c.set({name:o.id,label:o.label,withText:!0}),c.bind("isOn").toMany([o,t],"value",(u,m)=>m===void 0&&u===void 0?!!o.defaultValue:!!u),c.on("execute",()=>{o.set("value",!c.isOn)}),r.add(c)}return r}_createFormChildren(t){const r=this.createCollection();if(r.add(this.urlInputView),t.length){const o=new kt;o.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map(c=>({tag:"li",children:[c],attributes:{class:["ck","ck-list__item"]}}
8472)),attributes:{class:["ck","ck-reset","ck-list"]}}),r.add(o)}return r.add(this.saveButtonView),r.add(this.cancelButtonView),r}get url(){const{element:t}=this.urlInputView.fieldView;return t?t.value.trim():null}}var LS=d(8762),mX={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(LS.A,mX),LS.A.locals;class fX extends kt{constructor(t,r={}){super(t),this.focusTracker=new ir,this.keystrokes=new zr,this._focusables=new Ri;const o=t.t;this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(o("Unlink"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 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.294l.006.004zm5.494-5.335a.748.748 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.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-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-.184zm4.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.06l-1.415-1.414z"/></svg>',"unlink"),this.editButtonView=this._createButton(o("Edit link"),At.pencil,"edit"),this.set("href",void 0),this._linkConfig=r,this._focusCycler=new Fi({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render(),[this.previewButtonView,this.editButtonView,this.unlinkButtonView].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()}_createButton(t,r,o){const c=new Rt(this.locale);return c.set({label:t,icon:r,tooltip:!0}),c.delegate("execute").to(this,o),c}_createPreviewButton(){const t=new Rt(this.locale),r=this.bindTemplate,o=this.t;return t.set({withText:!0,tooltip:o("Open link in new tab")}),t.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:r.to("href",c=>c&&NS(c,this._linkConfig.allowedProtocols)),target:"_blank",rel:"noopener noreferrer"}}),t.bind("label").to(this,"href",c=>c||o("This link has no URL")),t.bind("isEnabled").to(this,"href",c=>!!c),t.template.tag="a",t.template.eventListeners={},t}}const Uo="link-ui";class pX extends Pe{constructor(){super(...arguments),this.actionsView=null,this.formView=null}static get requires(){return[Mf]}static get pluginName(){return"LinkUI"}init(){const t=this.editor,r=this.editor.t;t.editing.view.addObserver(lq),this._balloon=t.plugins.get(Mf),this._createToolbarLinkButton(),this._enableBalloonActivators(),t.conversion.for("editingDowncast").markerToHighlight({model:Uo,view:{classes:["ck-fake-link-selection"]}}),t.conversion.for("editingDowncast").markerToElement({model:Uo,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}}),t.accessibility.addKeystrokeInfos({keystrokes:[{label:r("Create link"),keystroke:Jf},{label:r("Move out of a link"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}destroy(){super.destroy(),this.formView&&this.formView.destroy(),this.actionsView&&this.actionsView.destroy()}_createViews(){this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._enableUserBalloonInteractions()}_createActionsView(){const t=this.editor,r=new fX(t.locale,t.config.get("link")),o=t.commands.get("link"),c=t.commands.get("unlink");return r.bind("href").to(o,"value"),r.editButtonView.bind("isEnabled").to(o),r.unlinkButtonView.bind("isEnabled").to(c),this.listenTo(r,"edit",()=>{this._addFormView()}),this.listenTo(r,"unlink",()=>{t.execute("unlink"),this._hideUI()}
8472),r.keystrokes.set("Esc",(u,m)=>{this._hideUI(),m()}),r.keystrokes.set(Jf,(u,m)=>{this._addFormView(),m()}),r}_createFormView(){const t=this.editor,r=t.commands.get("link"),o=t.config.get("link.defaultProtocol"),c=new(Tk(hX))(t.locale,r,function(u){const m=u.t,b=u.config.get("link.allowCreatingEmptyLinks");return[k=>{if(!b&&!k.url.length)return m("Link URL must not be empty.")}]}(t));return c.urlInputView.fieldView.bind("value").to(r,"value"),c.urlInputView.bind("isEnabled").to(r,"isEnabled"),c.saveButtonView.bind("isEnabled").to(r,"isEnabled"),this.listenTo(c,"submit",()=>{if(c.isValid()){const{value:u}=c.urlInputView.fieldView.element,m=Yy(u,o);t.execute("link",m,c.getDecoratorSwitchesState()),this._closeFormView()}}),this.listenTo(c.urlInputView,"change:errorText",()=>{t.ui.update()}),this.listenTo(c,"cancel",()=>{this._closeFormView()}),c.keystrokes.set("Esc",(u,m)=>{this._closeFormView(),m()}),c}_createToolbarLinkButton(){const t=this.editor,r=t.commands.get("link");t.ui.componentFactory.add("link",()=>{const o=this._createButton(Rt);return o.set({tooltip:!0,isToggleable:!0}),o.bind("isOn").to(r,"value",c=>!!c),o}),t.ui.componentFactory.add("menuBar:link",()=>this._createButton(wi))}_createButton(t){const r=this.editor,o=r.locale,c=r.commands.get("link"),u=new t(r.locale),m=o.t;return u.set({label:m("Link"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.741.741 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.294l.006.004zm5.494-5.335a.748.748 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.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-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-.184z"/></svg>',keystroke:Jf}),u.bind("isEnabled").to(c,"isEnabled"),this.listenTo(u,"execute",()=>this._showUI(!0)),u}_enableBalloonActivators(){const t=this.editor,r=t.editing.view.document;this.listenTo(r,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),t.keystrokes.set(Jf,(o,c)=>{c(),t.commands.get("link").isEnabled&&this._showUI(!0)})}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",(t,r)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),r())},{priority:"high"}),this.editor.keystrokes.set("Esc",(t,r)=>{this._isUIVisible&&(this._hideUI(),r())}),ef({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this.actionsView||this._createViews(),this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const t=this.editor.commands.get("link");this.formView.disableCssTransitions(),this.formView.resetFormStatus(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.formView.urlInputView.fieldView.value=t.value||"",this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions()}_closeFormView(){const t=this.editor.commands.get("link");t.restoreManualDecoratorStates(),t.value!==void 0?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this.formView.urlInputView.fieldView.reset(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(t=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),t&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),t&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const t=this.editor;this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),t.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}
8472_startUpdatingUI(){const t=this.editor,r=t.editing.view.document;let o=this._getSelectedLinkElement(),c=m();const u=()=>{const b=this._getSelectedLinkElement(),k=m();o&&!b||!o&&k!==c?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),o=b,c=k};function m(){return r.selection.focus.getAncestors().reverse().find(b=>b.is("element"))}this.listenTo(t.ui,"update",u),this.listenTo(this._balloon,"change:visibleView",u)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _areActionsInPanel(){return!!this.actionsView&&this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return!!this.actionsView&&this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){const t=this._balloon.visibleView;return!!this.formView&&t==this.formView||this._areActionsVisible}_getBalloonPositionData(){const t=this.editor.editing.view,r=this.editor.model,o=t.document;let c;if(r.markers.has(Uo)){const u=Array.from(this.editor.editing.mapper.markerNameToElements(Uo)),m=t.createRange(t.createPositionBefore(u[0]),t.createPositionAfter(u[u.length-1]));c=t.domConverter.viewRangeToDom(m)}else c=()=>{const u=this._getSelectedLinkElement();return u?t.domConverter.mapViewToDom(u):t.domConverter.viewRangeToDom(o.selection.getFirstRange())};return{target:c}}_getSelectedLinkElement(){const t=this.editor.editing.view,r=t.document.selection,o=r.getSelectedElement();if(r.isCollapsed||o&&In(o))return Qy(r.getFirstPosition());{const c=r.getFirstRange().getTrimmed(),u=Qy(c.start),m=Qy(c.end);return u&&u==m&&t.createRangeIn(u).getTrimmed().isEqual(c)?u:null}}_showFakeVisualSelection(){const t=this.editor.model;t.change(r=>{const o=t.document.selection.getFirstRange();if(t.markers.has(Uo))r.updateMarker(Uo,{range:o});else if(o.start.isAtEnd){const c=o.start.getLastMatchingPosition(({item:u})=>!t.schema.isContent(u),{boundaries:o});r.addMarker(Uo,{usingOperation:!1,affectsData:!1,range:r.createRange(c,o.end)})}else r.addMarker(Uo,{usingOperation:!1,affectsData:!1,range:o})})}_hideFakeVisualSelection(){const t=this.editor.model;t.markers.has(Uo)&&t.change(r=>{r.removeMarker(Uo)})}}function Qy(l){return l.getAncestors().find(t=>{return(r=t).is("attributeElement")&&!!r.getCustomProperty("link");var r})||null}const RS=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})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class gX extends Pe{static get requires(){return[bs,OS]}static get pluginName(){return"AutoLink"}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(t,r){return r.textNode&&r.textNode.hasAttribute("linkHref")?Rf(r,"linkHref",r.textNode.getAttribute("linkHref"),t):null}_selectEntireLinks(t,r){const o=this.editor.model,c=o.document.selection,u=c.getFirstPosition(),m=c.getLastPosition();let b=r.getJoined(this._expandLinkRange(o,u)||r);b&&(b=b.getJoined(this._expandLinkRange(o,m)||r)),b&&(b.start.isBefore(u)||b.end.isAfter(m))&&t.setSelection(b)}_enablePasteLinking(){const t=this.editor,r=t.model,o=r.document.selection,c=t.plugins.get("ClipboardPipeline"),u=t.commands.get("link");c.on("inputTransformation",(m,b)=>{if(!this.isEnabled||!u.isEnabled||o.isCollapsed||b.method!=="paste"||o.rangeCount>1)return;const k=o.getFirstRange(),_=b.dataTransfer.getData("text/plain");if(!_)return;const A=_.match(RS);A&&A[2]===_&&(r.change(N=>{this._selectEntireLinks(N,k),u.execute(_)}),m.stop())},{priority:"high"})}_enableTypingHandling(){const t=this.editor,r=new oE(t.model,o=>{if(!function(u){return u.length>4&&u[u.length-1]===" "&&u[u.length-2]!==" "}(o))return;const c=zS(o.substr(0,o.length-1));return c?{url:c}:void 0});r.on("matched:data",(o,c)=>{const{batch:u,range:m,url:b}=c;if(!u.isTyping)return;const k=m.end.getShiftedBy(-1),_=k.getShiftedBy(-b.length),A=t.model.createRange(_,k);this._applyAutoLink(b,A)}),r.bind("isEnabled").to(this)}_enableEnterHandling(){const t=this.editor,r=t.model,o=t.commands.get("enter");o&&o.on("execute",()=>{const c=r.document.selection.getFirstPosition();if(!c.parent.previousSibling)return;const u=r.createRangeIn(c.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(u)})}_enableShiftEnterHandling(){const t=this.editor,r=t.model,o=t.commands.get("shiftEnter");o&&o.on("execute",()=>{const c=r.document.selection.getFirstPosition(),u=r.createRange(r.createPositionAt(c.parent,0),c.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(u)})}_checkAndApplyAutoLinkOnRange(t){const r=this.editor.model,{text:o,range:c}=iE(t,r),u=zS(o);if(u){const m=r.createRange(c.end.getShiftedBy(-u.length),c.end);this._applyAutoLink(u,m)}}_applyAutoLink(t,r){const o=this.editor.model,c=Yy(t,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(u,m){return m.schema.checkAttributeInSelection(m.createSelection(u),"linkHref")}(r,o)&&ES(c)&&!function(u){const m=u.start.nodeAfter;return!!m&&m.hasAttribute("linkHref")}(r)&&this._persistAutoLink(c,r)}_persistAutoLink(t,r){const o=this.editor.model,c=this.editor.plugins.get("Delete");o.enqueueChange(u=>{u.setAttribute("linkHref",t,r),o.enqueueChange(()=>{c.requestUndoOnBackspace()})})}}function zS(l){const t=RS.exec(l);return t?t[2]:null}var FS=d(4808),bX={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(FS.A,bX),FS.A.locals;class Ui{constructor(t,r){this._startElement=t,this._referenceIndent=t.getAttribute("listIndent"),this._isForward=r.direction=="forward",this._includeSelf=!!r.includeSelf,this._sameAttributes=tn(r.sameAttributes||[]),this._sameIndent=!!r.sameIndent,this._lowerIndent=!!r.lowerIndent,this._higherIndent=!!r.higherIndent}static first(t,r){return rr(new this(t,r)[Symbol.iterator]())}*[Symbol.iterator](){const t=[];for(const{node:r}of Ou(this._getStartNode(),this._isForward?"forward":"backward")){const o=r.getAttribute("listIndent");if(o<this._referenceIndent){if(!this._lowerIndent)break;this._referenceIndent=o}else if(o>this._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){t.push(r);continue}}else{if(!this._sameIndent){if(this._higherIndent){t.length&&(yield*t,t.length=0);break}continue}if(this._sameAttributes.some(c=>r.getAttribute(c)!==this._startElement.getAttribute(c)))break}t.length&&(yield*t,t.length=0),yield r}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}function*Ou(l,t="forward"){const r=t=="forward",o=[];let c=null;for(;Hn(l);){let u=null;if(c){const m=l.getAttribute("listIndent"),b=c.getAttribute("listIndent");m>b?o[b]=c:m<b?(u=o[m],o.length=m):u=c}yield{node:l,previous:c,previousNodeInList:u},c=l,l=r?l.nextSibling:l.previousSibling}}class kX{constructor(t){this._listHead=t}[Symbol.iterator](){return Ou(this._listHead,"forward")}}var yX=Object.defineProperty,xX=Object.defineProperties,vX=Object.getOwnPropertyDescriptors,$S=Object.getOwnPropertySymbols,wX=Object.prototype.hasOwnProperty,_X=Object.prototype.propertyIsEnumerable,VS=(l,t,r)=>t in l?yX(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,Bu=(l,t)=>{for(var r in t||(t={}))wX.call(t,r)&&VS(l,r,t[r]);if($S)for(var r of $S(t))_X.call(t,r)&&VS(l,r,t[r]);return l},Zy=(l,t)=>xX(l,vX(t));class Rc{static next(){return B()}}function Hn(l){return!!l&&l.is("element")&&l.hasAttribute("listItemId")}function Jy(l,t={}){return[...ua(l,Zy(Bu({},t),{direction:"backward"})),...ua(l,Zy(Bu({},t),{direction:"forward"}))]}function ua(l,t={}){const r=t.direction=="forward",o=Array.from(new Ui(l,Zy(Bu({},t),{includeSelf:r,sameIndent:!0,sameAttributes:"listItemId"})));return r?o:o.reverse()}
8472function US(l,t){const r=new Ui(l,Bu({sameIndent:!0,sameAttributes:"listType"},t)),o=new Ui(l,Bu({sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward"},t));return[...Array.from(r).reverse(),...o]}function ml(l){return!Ui.first(l,{sameIndent:!0,sameAttributes:"listItemId"})}function WS(l){return!Ui.first(l,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function Lu(l,t={}){l=tn(l);const r=t.withNested!==!1,o=new Set;for(const c of l)for(const u of Jy(c,{higherIndent:r}))o.add(u);return fl(o)}function AX(l){l=tn(l);const t=new Set;for(const r of l)for(const o of US(r))t.add(o);return fl(t)}function Xy(l,t){const r=ua(l,{direction:"forward"}),o=Rc.next();for(const c of r)t.setAttribute("listItemId",o,c);return r}function ex(l,t,r){const o={};for(const[u,m]of t.getAttributes())u.startsWith("list")&&(o[u]=m);const c=ua(l,{direction:"forward"});for(const u of c)r.setAttributes(o,u);return c}function tx(l,t,{expand:r,indentBy:o=1}={}){l=tn(l);const c=r?Lu(l):l;for(const u of c){const m=u.getAttribute("listIndent")+o;m<0?Xf(u,t):t.setAttribute("listIndent",m,u)}return c}function Xf(l,t){l=tn(l);for(const r of l)r.is("element","listItem")&&t.rename(r,"paragraph");for(const r of l)for(const o of r.getAttributeKeys())o.startsWith("list")&&t.removeAttribute(o,r);return l}function Ru(l){if(!l.length)return!1;const t=l[0].getAttribute("listItemId");return!!t&&!l.some(r=>r.getAttribute("listItemId")!=t)}function fl(l){return Array.from(l).filter(t=>t.root.rootName!=="$graveyard").sort((t,r)=>t.index-r.index)}function zu(l){const t=l.document.selection.getSelectedElement();return t&&l.schema.isObject(t)&&l.schema.isBlock(t)?t:null}function nx(l,t){return t.checkChild(l.parent,"listItem")&&t.checkChild(l,"$text")&&!t.isObject(l)}function CX(l){return l=="numbered"||l=="customNumbered"}function jX(l,t,r){return ua(t,{direction:"forward"}).pop().index>l.index?ex(l,t,r):[]}class HS extends St{constructor(t,r){super(t),this._direction=r}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,r=GS(t.document.selection);t.change(o=>{const c=[];Ru(r)&&!ml(r[0])?(this._direction=="forward"&&c.push(...tx(r,o)),c.push(...Xy(r[0],o))):this._direction=="forward"?c.push(...tx(r,o,{expand:!0})):c.push(...function(u,m){const b=Lu(u=tn(u)),k=new Set,_=Math.min(...b.map(N=>N.getAttribute("listIndent"))),A=new Map;for(const N of b)A.set(N,Ui.first(N,{lowerIndent:!0}));for(const N of b){if(k.has(N))continue;k.add(N);const T=N.getAttribute("listIndent")-1;if(T<0)Xf(N,m);else{if(N.getAttribute("listIndent")==_){const O=jX(N,A.get(N),m);for(const L of O)k.add(L);if(O.length)continue}m.setAttribute("listIndent",T,N)}}return fl(k)}(r,o));for(const u of c){if(!u.hasAttribute("listType"))continue;const m=Ui.first(u,{sameIndent:!0});m&&o.setAttribute("listType",m.getAttribute("listType"),u)}this._fireAfterExecute(c)})}_fireAfterExecute(t){this.fire("afterExecute",fl(new Set(t)))}_checkEnabled(){let t=GS(this.editor.model.document.selection),r=t[0];if(!r)return!1;if(this._direction=="backward"||Ru(t)&&!ml(t[0]))return!0;t=Lu(t),r=t[0];const o=Ui.first(r,{sameIndent:!0});return!!o&&o.getAttribute("listType")==r.getAttribute("listType")}}function GS(l){const t=Array.from(l.getSelectedBlocks()),r=t.findIndex(o=>!Hn(o));return r!=-1&&(t.length=r),t}var NX=Object.defineProperty,EX=Object.defineProperties,SX=Object.getOwnPropertyDescriptors,qS=Object.getOwnPropertySymbols,DX=Object.prototype.hasOwnProperty,TX=Object.prototype.propertyIsEnumerable,KS=(l,t,r)=>t in l?NX(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,rx=(l,t)=>{for(var r in t||(t={}))DX.call(t,r)&&KS(l,r,t[r]);if(qS)for(var r of qS(t))TX.call(t,r)&&KS(l,r,t[r]);return l},ix=(l,t)=>EX(l,SX(t));class ep extends St{constructor(t,r,o={}){super(t),this.type=r,this._listWalkerOptions=o.multiLevel?{higherIndent:!0,lowerIndent:!0,sameAttributes:[]}:void 0}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const r=this.editor.model,o=r.document,c=zu(r),u=Array.from(o.selection.getSelectedBlocks()).filter(b=>r.schema.checkAttribute(b,"listType")||nx(b,r.schema)),m=t.forceValue!==void 0?!t.forceValue:this.value;r.change(b=>{if(m){const k=u[u.length-1],_=ua(k,{direction:"forward"}),A=[];_.length>1&&A.push(...Xy(_[1],b)),A.push(...Xf(u,b)),A.push(...function(N,T){const O=[];let L=Number.POSITIVE_INFINITY;for(const{node:$}of Ou(N.nextSibling,"forward")){const U=$.getAttribute("listIndent");if(U==0)break;U<L&&(L=U);const H=U-L;T.setAttribute("listIndent",H,$),O.push($)}return O}(k,b)),this._fireAfterExecute(A)}else if((c||o.selection.isCollapsed)&&Hn(u[0])){const k=US(c||u[0],this._listWalkerOptions);for(const _ of k)b.setAttributes(ix(rx({}
8472,t.additionalAttributes),{listType:this.type}),_);this._fireAfterExecute(k)}else{const k=[];for(const _ of u)if(_.hasAttribute("listType"))for(const A of Lu(_,{withNested:!1}))A.getAttribute("listType")!=this.type&&(b.setAttributes(ix(rx({},t.additionalAttributes),{listType:this.type}),A),k.push(A));else!_.is("element","listItem")&&nx(_,r.schema)&&b.rename(_,"listItem"),b.setAttributes(ix(rx({},t.additionalAttributes),{listIndent:0,listItemId:Rc.next(),listType:this.type}),_),k.push(_);this._fireAfterExecute(k)}})}_fireAfterExecute(t){this.fire("afterExecute",fl(new Set(t)))}_getValue(){const t=this.editor.model.document.selection,r=Array.from(t.getSelectedBlocks());if(!r.length)return!1;for(const o of r)if(o.getAttribute("listType")!=this.type)return!1;return!0}_checkEnabled(){const t=this.editor.model,r=t.schema,o=t.document.selection,c=Array.from(o.getSelectedBlocks());if(!c.length)return!1;if(this.value)return!0;for(const u of c)if(r.checkAttribute(u,"listType")||nx(u,r))return!0;return!1}}class YS extends St{constructor(t,r){super(t),this._direction=r}refresh(){this.isEnabled=this._checkEnabled()}execute({shouldMergeOnBlocksContentLevel:t=!1}={}){const r=this.editor.model,o=r.document.selection,c=[];r.change(u=>{const{firstElement:m,lastElement:b}=this._getMergeSubjectElements(o,t),k=m.getAttribute("listIndent")||0,_=b.getAttribute("listIndent"),A=b.getAttribute("listItemId");if(k!=_){const T=(N=b,Array.from(new Ui(N,{direction:"forward",higherIndent:!0})));c.push(...tx([b,...T],u,{indentBy:k-_,expand:k<_}))}var N;if(t){let T=o;o.isCollapsed&&(T=u.createSelection(u.createRange(u.createPositionAt(m,"end"),u.createPositionAt(b,0)))),r.deleteContent(T,{doNotResetEntireContent:o.isCollapsed});const O=T.getLastPosition().parent,L=O.nextSibling;c.push(O),L&&L!==b&&L.getAttribute("listItemId")==A&&c.push(...ex(L,O,u))}else c.push(...ex(b,m,u));this._fireAfterExecute(c)})}_fireAfterExecute(t){this.fire("afterExecute",fl(new Set(t)))}_checkEnabled(){const t=this.editor.model,r=t.document.selection,o=zu(t);if(r.isCollapsed||o){const c=o||r.getFirstPosition().parent;if(!Hn(c))return!1;const u=this._direction=="backward"?c.previousSibling:c.nextSibling;if(!u||Ru([c,u]))return!1}else{const c=r.getLastPosition(),u=r.getFirstPosition();if(c.parent===u.parent||!Hn(c.parent))return!1}return!0}_getMergeSubjectElements(t,r){const o=zu(this.editor.model);let c,u;if(t.isCollapsed||o){const m=o||t.getFirstPosition().parent,b=ml(m);this._direction=="backward"?(u=m,c=b&&!r?Ui.first(m,{sameIndent:!0,lowerIndent:!0}):m.previousSibling):(c=m,u=m.nextSibling)}else c=t.getFirstPosition().parent,u=t.getLastPosition().parent;return{firstElement:c,lastElement:u}}}class QS extends St{constructor(t,r){super(t),this._direction=r}refresh(){this.isEnabled=this._checkEnabled()}execute(){this.editor.model.change(t=>{const r=Xy(this._getStartBlock(),t);this._fireAfterExecute(r)})}_fireAfterExecute(t){this.fire("afterExecute",fl(new Set(t)))}_checkEnabled(){const t=this.editor.model.document.selection,r=this._getStartBlock();return t.isCollapsed&&Hn(r)&&!ml(r)}_getStartBlock(){const t=this.editor.model.document.selection.getFirstPosition().parent;return this._direction=="before"?t:t.nextSibling}}class IX extends Pe{static get pluginName(){return"ListUtils"}expandListBlocksToCompleteList(t){return AX(t)}isFirstBlockOfListItem(t){return ml(t)}isListItemBlock(t){return Hn(t)}expandListBlocksToCompleteItems(t,r={}){return Lu(t,r)}isNumberedListType(t){return CX(t)}}function ZS(l){return l.is("element","ol")||l.is("element","ul")}function tp(l){return l.is("element","li")}function MX(l,t,r,o=XS(r,t)){return l.createAttributeElement(JS(r),null,{priority:2*t/100-100,id:o})}function PX(l,t,r){return l.createAttributeElement("li",null,{priority:(2*t+1)/100-100,id:r})}function JS(l){return l=="numbered"||l=="customNumbered"?"ol":"ul"}function XS(l,t){return`list-${l}-${t}`}function po(l,t){const r=l.nodeBefore;if(Hn(r)){let o=r;for(const{node:c}of Ou(o,"backward"))if(o=c,t.has(o))return;t.set(r,o)}else{const o=l.nodeAfter;Hn(o)&&t.set(o,o)}}function OX(){return(l,t,r)=>{const{writer:o,schema:c}=r;if(!t.modelRange)return;const u=Array.from(t.modelRange.getItems({shallow:!0})).filter(N=>c.checkAttribute(N,"listItemId"));if(!u.length)return;const m=Rc.next(),b=function(N){let T=0,O=N.parent;for(;O;){if(tp(O))T++;else{const L=O.previousSibling;L&&tp(L)&&T++}O=O.parent}return T}(t.viewItem);let k=t.viewItem.parent&&t.viewItem.parent.is("element","ol")?"numbered":"bulleted";const _=u[0].getAttribute("listType");_&&(k=_);const A={listItemId:m,listIndent:b,listType:k};for(const N of u)N.hasAttribute("listItemId")||o.setAttributes(A,N);u.length>1&&u[1].getAttribute("listItemId")!=A.listItemId&&r.keepEmptyElement(u[0])}}function eD(){return(l,t,r)=>{if(!r.consumable.test(t.viewItem,{name:!0}))return;const o=new ms(t.viewItem.document);for(const c of Array.from(t.viewItem.getChildren()))tp(c)||ZS(c)||o.remove(c)}}function tD(l,t,r,{dataPipeline:o}={}){const c=function(u){return(m,b)=>{const k=[];for(const _ of u)m.hasAttribute(_)&&k.push(`attribute:${_}`);return!!k.every(_=>b.test(m,_)!==!1)&&(k.forEach(_=>b.consume(m,_)),!0)}}(l);return(u,m,b)=>{const{writer:k,mapper:_,consumable:A}=b,N=m.item;if(!l.includes(m.attributeKey)||!c(N,A))return;const T=function(L,$,U){const H=U.createRangeOn(L);return $.toViewRange(H).getTrimmed().end.nodeBefore}(N,_,r);rD(T,k,_),function(L,$){let U=L.parent;for(;U.is("attributeElement")&&["ul","ol","li"].includes(U.name);){const H=U.parent;$.unwrap($.createRangeOn(L),U),U=H}}(T,k);const O=function(L,$,U,H,{dataPipeline:J}){let ae=H.createRangeOn($);if(!ml(L))return ae;
8472for(const _e of U){if(_e.scope!="itemMarker")continue;const qe=_e.createElement(H,L,{dataPipeline:J});if(!qe||(H.setCustomProperty("listItemMarker",!0,qe),_e.canInjectMarkerIntoElement&&_e.canInjectMarkerIntoElement(L)?H.insert(H.createPositionAt($,0),qe):(H.insert(ae.start,qe),ae=H.createRange(H.createPositionBefore(qe),H.createPositionAfter($))),!_e.createWrapperElement||!_e.canWrapElement))continue;const vt=_e.createWrapperElement(H,L,{dataPipeline:J});H.setCustomProperty("listItemWrapper",!0,vt),_e.canWrapElement(L)?ae=H.wrap(ae,vt):(ae=H.wrap(H.createRangeOn(qe),vt),ae=H.createRange(ae.start,H.createPositionAfter($)))}return ae}(N,T,t,k,{dataPipeline:o});(function(L,$,U,H){if(!L.hasAttribute("listIndent"))return;const J=L.getAttribute("listIndent");let ae=L;for(let _e=J;_e>=0;_e--){const qe=PX(H,_e,ae.getAttribute("listItemId")),vt=MX(H,_e,ae.getAttribute("listType"));for(const jt of U)jt.scope!="list"&&jt.scope!="item"||!ae.hasAttribute(jt.attributeName)||jt.setAttributeOnDowncast(H,ae.getAttribute(jt.attributeName),jt.scope=="list"?vt:qe);if($=H.wrap($,qe),$=H.wrap($,vt),_e==0||(ae=Ui.first(ae,{lowerIndent:!0}),!ae))break}})(N,O,t,k)}}function nD(l,{dataPipeline:t}={}
8472){return(r,{writer:o})=>{if(!iD(r,l))return null;if(!t)return o.createContainerElement("span",{class:"ck-list-bogus-paragraph"});const c=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,c),c}}function rD(l,t,r){for(;l.parent.is("attributeElement")&&l.parent.getCustomProperty("listItemWrapper");)t.unwrap(t.createRangeOn(l),l.parent);const o=[];c(t.createPositionBefore(l).getWalker({direction:"backward"})),c(t.createRangeIn(l).getWalker());for(const u of o)t.remove(u);function c(u){for(const{item:m}of u){if(m.is("element")&&r.toModelElement(m))break;m.is("element")&&m.getCustomProperty("listItemMarker")&&o.push(m)}}}function iD(l,t,r=Jy(l)){if(!Hn(l))return!1;for(const o of l.getAttributeKeys())if(!o.startsWith("selection:")&&!t.includes(o))return!1;return r.length<2}var oD=d(1232),BX={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(oD.A,BX),oD.A.locals;var sD=d(6903),LX={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(sD.A,LX),sD.A.locals;const np=["listType","listIndent","listItemId"];class RX extends Pe{constructor(t){super(t),this._downcastStrategies=[],t.config.define("list.multiBlock",!0)}static get pluginName(){return"ListEditing"}static get requires(){return[zf,bs,IX,$i]}init(){const t=this.editor,r=t.model,o=t.config.get("list.multiBlock");if(t.plugins.has("LegacyListEditing"))throw new P("list-feature-conflict",this,{conflictPlugin:"LegacyListEditing"});r.schema.register("$listItem",{allowAttributes:np}),o?(r.schema.extend("$container",{allowAttributesOf:"$listItem"}),r.schema.extend("$block",{allowAttributesOf:"$listItem"}),r.schema.extend("$blockObject",{allowAttributesOf:"$listItem"})):r.schema.register("listItem",{inheritAllFrom:"$block",allowAttributesOf:"$listItem"});for(const c of np)r.schema.setAttributeProperties(c,{copyOnReplace:!0});t.commands.add("numberedList",new ep(t,"numbered")),t.commands.add("bulletedList",new ep(t,"bulleted")),t.commands.add("customNumberedList",new ep(t,"customNumbered",{multiLevel:!0})),t.commands.add("customBulletedList",new ep(t,"customBulleted",{multiLevel:!0})),t.commands.add("indentList",new HS(t,"forward")),t.commands.add("outdentList",new HS(t,"backward")),t.commands.add("splitListItemBefore",new QS(t,"before")),t.commands.add("splitListItemAfter",new QS(t,"after")),o&&(t.commands.add("mergeListItemBackward",new YS(t,"backward")),t.commands.add("mergeListItemForward",new YS(t,"forward"))),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration(),this._setupAccessibilityIntegration()}afterInit(){const t=this.editor.commands,r=t.get("indent"),o=t.get("outdent");r&&r.registerChildCommand(t.get("indentList"),{priority:"high"}),o&&o.registerChildCommand(t.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(t){this._downcastStrategies.push(t)}getListAttributeNames(){return[...np,...this._downcastStrategies.map(t=>t.attributeName)]}_setupDeleteIntegration(){const t=this.editor,r=t.commands.get("mergeListItemBackward"),o=t.commands.get("mergeListItemForward");this.listenTo(t.editing.view.document,"delete",(c,u)=>{const m=t.model.document.selection;zu(t.model)||t.model.change(()=>{const b=m.getFirstPosition();if(m.isCollapsed&&u.direction=="backward"){if(!b.isAtStart)return;const k=b.parent;if(!Hn(k))return;if(Ui.first(k,{sameAttributes:"listType",sameIndent:!0})||k.getAttribute("listIndent")!==0){if(!r||!r.isEnabled)return;r.execute({shouldMergeOnBlocksContentLevel:aD(t.model,"backward")})}else WS(k)||t.execute("splitListItemAfter"),t.execute("outdentList");u.preventDefault(),c.stop()}else{if(m.isCollapsed&&!m.getLastPosition().isAtEnd||!o||!o.isEnabled)return;o.execute({shouldMergeOnBlocksContentLevel:aD(t.model,"forward")}),u.preventDefault(),c.stop()}})},{context:"li"})}_setupEnterIntegration(){const t=this.editor,r=t.model,o=t.commands,c=o.get("enter");this.listenTo(t.editing.view.document,"enter",(u,m)=>{const b=r.document,k=b.selection.getFirstPosition().parent;if(b.selection.isCollapsed&&Hn(k)&&k.isEmpty&&!m.isSoft){const _=ml(k),A=WS(k);_&&A?(t.execute("outdentList"),m.preventDefault(),u.stop()):_&&!A?(t.execute("splitListItemAfter"),m.preventDefault(),u.stop()):A&&(t.execute("splitListItemBefore"),m.preventDefault(),u.stop())}},{context:"li"}),this.listenTo(c,"afterExecute",()=>{const u=o.get("splitListItemBefore");u.refresh(),u.isEnabled&&Jy(t.model.document.selection.getLastPosition().parent).length===2&&u.execute()})}_setupTabIntegration(){const t=this.editor;this.listenTo(t.editing.view.document,"tab",(r,o)=>{const c=o.shiftKey?"outdentList":"indentList";this.editor.commands.get(c).isEnabled&&(t.execute(c),o.stopPropagation(),o.preventDefault(),r.stop())},{context:"li"})}_setupConversion(){const t=this.editor,r=t.model,o=this.getListAttributeNames(),c=t.config.get("list.multiBlock"),u=c?"paragraph":"listItem";t.conversion.for("upcast").elementToElement({view:"li",model:(_,{writer
8472:A})=>A.createElement(u,{listType:""})}).elementToElement({view:"p",model:(_,{writer:A})=>_.parent&&_.parent.is("element","li")?A.createElement(u,{listType:""}):null,converterPriority:"high"}).add(_=>{_.on("element:li",OX()),_.on("element:ul",eD(),{priority:"high"}),_.on("element:ol",eD(),{priority:"high"})}),c||t.conversion.for("downcast").elementToElement({model:"listItem",view:"p"}),t.conversion.for("editingDowncast").elementToElement({model:u,view:nD(o),converterPriority:"high"}).add(_=>{var A;_.on("attribute",tD(o,this._downcastStrategies,r)),_.on("remove",(A=r.schema,(N,T,O)=>{const{writer:L,mapper:$}=O,U=N.name.split(":")[1];if(!A.checkAttribute(U,"listItemId"))return;const H=$.toViewPosition(T.position),J=T.position.getShiftedBy(T.length),ae=$.toViewPosition(J,{isPhantom:!0}),_e=L.createRange(H,ae).getTrimmed().end.nodeBefore;_e&&rD(_e,L,$)}))}),t.conversion.for("dataDowncast").elementToElement({model:u,view:nD(o,{dataPipeline:!0}),converterPriority:"high"}).add(_=>{_.on("attribute",tD(o,this._downcastStrategies,r,{dataPipeline:!0}))});const m=(b=this._downcastStrategies,k=t.editing.view,(_,A)=>{if(A.modelPosition.offset>0)return;const N=A.modelPosition.parent;if(!Hn(N)||!b.some(U=>U.scope=="itemMarker"&&U.canInjectMarkerIntoElement&&U.canInjectMarkerIntoElement(N)))return;const T=A.mapper.toViewElement(N),O=k.createRangeIn(T),L=O.getWalker();let $=O.start;for(const{item:U}of L){if(U.is("element")&&A.mapper.toModelElement(U)||U.is("$textProxy"))break;U.is("element")&&U.getCustomProperty("listItemMarker")&&($=k.createPositionAfter(U),L.skip(({previousPosition:H})=>!H.isEqual($)))}A.viewPosition=$});var b,k;t.editing.mapper.on("modelToViewPosition",m),t.data.mapper.on("modelToViewPosition",m),this.listenTo(r.document,"change:data",function(_,A,N,T){return()=>{const U=_.document.differ.getChanges(),H=[],J=new Map,ae=new Set;for(const _e of U)if(_e.type=="insert"&&_e.name!="$text")po(_e.position,J),_e.attributes.has("listItemId")?ae.add(_e.position.nodeAfter):po(_e.position.getShiftedBy(_e.length),J);else if(_e.type=="remove"&&_e.attributes.has("listItemId"))po(_e.position,J);else if(_e.type=="attribute"){const qe=_e.range.start.nodeAfter;N.includes(_e.attributeKey)?(po(_e.range.start,J),_e.attributeNewValue===null?(po(_e.range.start.getShiftedBy(1),J),L(qe)&&H.push(qe)):ae.add(qe)):Hn(qe)&&L(qe)&&H.push(qe)}for(const _e of J.values())H.push(...O(_e,ae));for(const _e of new Set(H))A.reconvertItem(_e)};function O(U,H){const J=[],ae=new Set,_e=[];for(const{node:qe,previous:vt}of Ou(U,"forward")){if(ae.has(qe))continue;const jt=qe.getAttribute("listIndent");vt&&jt<vt.getAttribute("listIndent")&&(_e.length=jt+1),_e[jt]=Object.fromEntries(Array.from(qe.getAttributes()).filter(([Gn])=>N.includes(Gn)));const nn=ua(qe,{direction:"forward"});for(const Gn of nn)ae.add(Gn),(L(Gn,nn)||$(Gn,_e,H))&&J.push(Gn)}return J}function L(U,H){const J=A.mapper.toViewElement(U);if(!J)return!1;if(T.fire("checkElement",{modelElement:U,viewElement:J}))return!0;if(!U.is("element","paragraph")&&!U.is("element","listItem"))return!1;const ae=iD(U,N,H);return!(!ae||!J.is("element","p"))||!(ae||!J.is("element","span"))}function $(U,H,J){if(J.has(U))return!1;const ae=A.mapper.toViewElement(U);let _e=H.length-1;for(let qe=ae.parent;!qe.is("editableElement");qe=qe.parent){const vt=tp(qe),jt=ZS(qe);if(!jt&&!vt)continue;const nn="checkAttributes:"+(vt?"item":"list");if(T.fire(nn,{viewElement:qe,modelAttributes:H[_e]}))break;if(jt&&(_e--,_e<0))return!1}return!0}}(r,t.editing,o,this),{priority:"high"}),this.on("checkAttributes:item",(_,{viewElement:A,modelAttributes:N})=>{A.id!=N.listItemId&&(_.return=!0,_.stop())}),this.on("checkAttributes:list",(_,{viewElement:A,modelAttributes:N})=>{A.name==JS(N.listType)&&A.id==XS(N.listType,N.listIndent)||(_.return=!0,_.stop())})}_setupModelPostFixing(){const t=this.editor.model,r=this.getListAttributeNames();t.document.registerPostFixer(o=>function(c,u,m,b){const k=c.document.differ.getChanges(),_=new Map,A=b.editor.config.get("list.multiBlock");let N=!1;for(const O of k){if(O.type=="insert"&&O.name!="$text"){const L=O.position.nodeAfter;if(!c.schema.checkAttribute(L,"listItemId"))for(const $ of Array.from(L.getAttributeKeys()))m.includes($)&&(u.removeAttribute($,L),N=!0);po(O.position,_),O.attributes.has("listItemId")||po(O.position.getShiftedBy(O.length),_);for(const{item:$,previousPosition:U}of c.createRangeIn(L))Hn($)&&po(U,_)}else O.type=="remove"?po(O.position,_):O.type=="attribute"&&m.includes(O.attributeKey)&&
8472(po(O.range.start,_),O.attributeNewValue===null&&po(O.range.start.getShiftedBy(1),_));if(!A&&O.type=="attribute"&&np.includes(O.attributeKey)){const L=O.range.start.nodeAfter;O.attributeNewValue===null&&L&&L.is("element","listItem")?(u.rename(L,"paragraph"),N=!0):O.attributeOldValue===null&&L&&L.is("element")&&L.name!="listItem"&&(u.rename(L,"listItem"),N=!0)}}const T=new Set;for(const O of _.values())N=b.fire("postFixer",{listNodes:new kX(O),listHead:O,writer:u,seenIds:T})||N;return N}(t,o,r,this)),this.on("postFixer",(o,{listNodes:c,writer:u})=>{o.return=function(m,b){let k=0,_=-1,A=null,N=!1;for(const{node:T}of m){const O=T.getAttribute("listIndent");if(O>k){let L;A===null?(A=O-k,L=k):(A>O&&(A=O),L=O-A),L>_+1&&(L=_+1),b.setAttribute("listIndent",L,T),N=!0,_=L}else A=null,k=O+1,_=O}return N}(c,u)||o.return},{priority:"high"}),this.on("postFixer",(o,{listNodes:c,writer:u,seenIds:m})=>{o.return=function(b,k,_){const A=new Set;let N=!1;for(const{node:T}of b){if(A.has(T))continue;let O=T.getAttribute("listType"),L=T.getAttribute("listItemId");if(k.has(L)&&(L=Rc.next()),k.add(L),T.is("element","listItem"))T.getAttribute("listItemId")!=L&&(_.setAttribute("listItemId",L,T),N=!0);else for(const $ of ua(T,{direction:"forward"}))A.add($),$.getAttribute("listType")!=O&&(L=Rc.next(),O=$.getAttribute("listType")),$.getAttribute("listItemId")!=L&&(_.setAttribute("listItemId",L,$),N=!0)}return N}(c,m,u)||o.return},{priority:"high"})}_setupClipboardIntegration(){const t=this.editor.model,r=this.editor.plugins.get("ClipboardPipeline");this.listenTo(t,"insertContent",function(o){return(c,[u,m])=>{const b=u.is("documentFragment")?Array.from(u.getChildren()):[u];if(!b.length)return;const k=(m?o.createSelection(m):o.document.selection).getFirstPosition();let _;if(Hn(k.parent))_=k.parent;else{if(!Hn(k.nodeBefore))return;_=k.nodeBefore}o.change(A=>{const N=_.getAttribute("listType"),T=_.getAttribute("listIndent"),O=b[0].getAttribute("listIndent")||0,L=Math.max(T-O,0);for(const $ of b){const U=Hn($);_.is("element","listItem")&&$.is("element","paragraph")&&A.rename($,"listItem"),A.setAttributes({listIndent:(U?$.getAttribute("listIndent"):0)+L,listItemId:U?$.getAttribute("listItemId"):Rc.next(),listType:N},$)}})}}(t),{priority:"high"}),this.listenTo(r,"outputTransformation",(o,c)=>{t.change(u=>{const m=Array.from(c.content.getChildren()),b=m[m.length-1];if(m.length>1&&b.is("element")&&b.isEmpty&&m.slice(0,-1).every(Hn)&&u.remove(b),c.method=="copy"||c.method=="cut"){const k=Array.from(c.content.getChildren());Ru(k)&&Xf(k,u)}})})}_setupAccessibilityIntegration(){const t=this.editor,r=t.t;t.accessibility.addKeystrokeInfoGroup({id:"list",label:r("Keystrokes that can be used in a list"),keystrokes:[{label:r("Increase list item indent"),keystroke:"Tab"},{label:r("Decrease list item indent"),keystroke:"Shift+Tab"}]})}}function aD(l,t){const r=l.document.selection;if(!r.isCollapsed)return!zu(l);if(t==="forward")return!0;const o=r.getFirstPosition().parent,c=o.previousSibling;return!l.schema.isObject(c)&&(!!c.isEmpty||Ru([o,c]))}function lD(l,t,r,o){l.ui.componentFactory.add(t,()=>{const c=cD(Rt,l,t,r,o);return c.set({tooltip:!0,isToggleable:!0}),c}),l.ui.componentFactory.add(`menuBar:${t}`,()=>cD(wi,l,t,r,o))}function cD(l,t,r,o,c){const u=t.commands.get(r),m=new l(t.locale);return m.set({label:o,icon:c}),m.bind("isOn","isEnabled").to(u,"value","isEnabled"),m.on("execute",()=>{t.execute(r),t.editing.view.focus()}),m}class zX extends Pe{static get pluginName(){return"ListUI"}init(){const t=this.editor.t;this.editor.ui.componentFactory.has("numberedList")||lD(this.editor,"numberedList",t("Numbered List"),At.numberedList),this.editor.ui.componentFactory.has("bulletedList")||lD(this.editor,"bulletedList",t("Bulleted List"),At.bulletedList)}}class FX extends Pe{static get requires(){return[RX,zX]}static get pluginName(){return"List"}}const $X=[{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:l,typeAttribute:t,listType:r}of $X);var dD=d(9968),VX={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(dD.A,VX),dD.A.locals;var uD=d(7141),UX={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(uD.A,UX),uD.A.locals,lu("Ctrl+Enter");var hD=d(8991),WX={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(hD.A,WX),hD.A.locals,lu("Ctrl+Enter");function mD(l,t){const r=(o,c,u)=>{if(!u.consumable.consume(c.item,o.name))return;const m=c.attributeNewValue,b=u.writer,k=u.mapper.toViewElement(c.item),_=[...k.getChildren()].find(N=>N.getCustomProperty("media-content"));b.remove(_);const A=l.getMediaViewElement(b,m,t);b.insert(b.createPositionAt(k,0),A)};return o=>{o.on("attribute:url:media",r)}}function fD(l,t,r,o){return l.createContainerElement("figure",{class:"media"},[t.getMediaViewElement(l,r,o),l.createSlot()])}function pD(l){const t=l.getSelectedElement();return t&&t.is("element","media")?t:null}function gD(l,t,r,o){l.change(c=>{const u=c.createElement("media",{url:t});l.insertObject(u,r,null,{setSelection:"on",findOptimalPosition:o?"auto":void 0})})}class HX extends St{refresh(){const t=this.editor.model,r=t.document.selection,o=pD(r);this.value=o?o.getAttribute("url"):void 0,this.isEnabled=function(c){const u=c.getSelectedElement();return!!u&&u.name==="media"}(r)||function(c,u){let b=kE(c,u).start.parent;return b.isEmpty&&!u.schema.isLimit(b)&&(b=b.parent),u.schema.checkChild(b,"media")}(r,t)}execute(t){const r=this.editor.model,o=r.document.selection,c=pD(o);c?r.change(u=>{u.setAttribute("url",t,c)}):gD(r,t,o,!0)}}class GX{constructor(t,r){const o=r.providers,c=r.extraProviders||[],u=new Set(r.removeProviders),m=o.concat(c).filter(b=>{const k=b.name;return k?!u.has(k):(z("media-embed-no-provider-name",{provider:b}),!1)});this.locale=t,this.providerDefinitions=m}hasMedia(t){return!!this._getMedia(t)}getMediaViewElement(t,r,o){return this._getMedia(r).getViewElement(t,o)}_getMedia(t){if(!t)return new bD(this.locale);t=t.trim();for(const r of this.providerDefinitions){const o=r.html,c=tn(r.url);for(const u of c){const m=this._getUrlMatches(t,u);if(m)return new bD(this.locale,t,m,o)}}return null}_getUrlMatches(t,r){let o=t.match(r);if(o)return o;let c=t.replace(/^https?:\/\//,"");return o=c.match(r),o||(c=c.replace(/^www\./,""),o=c.match(r),o||null)}}class bD{constructor(t,r,o,c){this.url=this._getValidUrl(r),this._locale=t,this._match=o,this._previewRenderer=c}getViewElement(t,r){const o={};let c;if(r.renderForEditingView||r.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(o["data-oembed-url"]=this.url),r.renderForEditingView&&(o.class="ck-media__wrapper");const u=this._getPreviewHtml(r);c=t.createRawElement("div",o,(m,b)=>{b.setContentOf(m,u)})}else this.url&&(o.url=this.url),c=t.createEmptyElement(r.elementName,o);return t.setCustomProperty("media-content",!0,c),c}_getPreviewHtml(t){return this._previewRenderer?this._previewRenderer(this._match):this.url&&t.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const t=new fs,r=this._locale.t;return t.content='<svg viewBox="0 0 64 42" xmlns="http://www.w3.org/2000/svg"><path d="M47.426 17V3.713L63.102 0v19.389h-.001l.001.272c0 1.595-2.032 3.43-4.538 4.098-2.506.668-4.538-.083-4.538-1.678 0-1.594 2.032-3.43 4.538-4.098.914-.244 2.032-.565 2.888-.603V4.516L49.076 7.447v9.556A1.014 1.014 0 0 0 49 17h-1.574zM29.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.994 1.994 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.805V17zm-11.
8472637 0H17.5a1 1 0 0 0-1 1v.05A4.244 4.244 0 1 1 17.863 17zm29.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.155h18.692zM20.6 21.375v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616V37.53H20.6zm24.233-16.155v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615V37.53h-1.615zM29.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-.35v-9.956z"/></svg>',t.viewBox="0 0 64 42",new ao({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[t]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url,"data-cke-tooltip-text":r("Open media in new tab")},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]}]}]}).render().outerHTML}_getValidUrl(t){return t?t.match(/^https?/)?t:"https://"+t:null}}var kD=d(7048),qX={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(kD.A,qX),kD.A.locals;class rp extends Pe{constructor(t){super(t),t.config.define("mediaEmbed",{elementName:"oembed",providers:[{name:"dailymotion",url:[/^dailymotion\.com\/video\/(\w+)/,/^dai.ly\/(\w+)/],html:r=>`<div style="position: relative; padding-bottom: 100%; height: 0; "><iframe src="https://www.dailymotion.com/embed/video/${r[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:r=>`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 126%;"><iframe src="https://open.spotify.com/embed/${r[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\/v\/([\w-]+)(?:\?t=(\d+))?/,/^youtube\.com\/embed\/([\w-]+)(?:\?start=(\d+))?/,/^youtu\.be\/([\w-]+)(?:\?t=(\d+))?/],html:r=>{const o=r[1],c=r[2];return`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;"><iframe src="https://www.youtube.com/embed/${o}${c?`?start=${c}`:""}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" allow="autoplay; encrypted-media" 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:r=>`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;"><iframe src="https://player.vimeo.com/video/${r[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+)/},{name:"twitter",url:/^twitter\.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 GX(t.locale,t.config.get("mediaEmbed"))}static get pluginName(){return"MediaEmbedEditing"}init(){const t=this.editor,r=t.model.schema,o=t.t,c=t.conversion,u=t.config.get("mediaEmbed.previewsInData"),m=t.config.get("mediaEmbed.elementName"),b=this.registry;t.commands.add("mediaEmbed",new HX(t)),r.register("media",{inheritAllFrom
8472:"$blockObject",allowAttributes:["url"]}),c.for("dataDowncast").elementToStructure({model:"media",view:(k,{writer:_})=>{const A=k.getAttribute("url");return fD(_,b,A,{elementName:m,renderMediaPreview:!!A&&u})}}),c.for("dataDowncast").add(mD(b,{elementName:m,renderMediaPreview:u})),c.for("editingDowncast").elementToStructure({model:"media",view:(k,{writer:_})=>{const A=k.getAttribute("url");return function(N,T,O){return T.setCustomProperty("media",!0,N),My(N,T,{label:O})}(fD(_,b,A,{elementName:m,renderForEditingView:!0}),_,o("media widget"))}}),c.for("editingDowncast").add(mD(b,{elementName:m,renderForEditingView:!0})),c.for("upcast").elementToElement({view:k=>["oembed",m].includes(k.name)&&k.getAttribute("url")?{name:!0}:null,model:(k,{writer:_})=>{const A=k.getAttribute("url");return b.hasMedia(A)?_.createElement("media",{url:A}):null}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(k,{writer:_})=>{const A=k.getAttribute("data-oembed-url");return b.hasMedia(A)?_.createElement("media",{url:A}):null}}).add(k=>{k.on("element:figure",(_,A,N)=>{if(!N.consumable.consume(A.viewItem,{name:!0,classes:"media"}))return;const{modelRange:T,modelCursor:O}=N.convertChildren(A.viewItem,A.modelCursor);A.modelRange=T,A.modelCursor=O,rr(T.getItems())||N.consumable.revert(A.viewItem,{name:!0,classes:"media"})})})}}const KX=/^(?:http(s)?:\/\/)?[\w-]+\.[\w-.~:/?#[\]@!$&'()*+,;=%]+$/;class YX extends Pe{constructor(t){super(t),this._timeoutId=null,this._positionToInsert=null}static get requires(){return[LE,bs,VE]}static get pluginName(){return"AutoMediaEmbed"}init(){const t=this.editor,r=t.model.document,o=t.plugins.get("ClipboardPipeline");this.listenTo(o,"inputTransformation",()=>{const c=r.selection.getFirstRange(),u=br.fromPosition(c.start);u.stickiness="toPrevious";const m=br.fromPosition(c.end);m.stickiness="toNext",r.once("change:data",()=>{this._embedMediaBetweenPositions(u,m),u.detach(),m.detach()},{priority:"high"})}),t.commands.get("undo").on("execute",()=>{this._timeoutId&&(g.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedMediaBetweenPositions(t,r){const o=this.editor,c=o.plugins.get(rp).registry,u=new xi(t,r),m=u.getWalker({ignoreElementEnd:!0});let b="";for(const k of m)k.item.is("$textProxy")&&(b+=k.item.data);if(b=b.trim(),!b.match(KX)||!c.hasMedia(b))return void u.detach();o.commands.get("mediaEmbed").isEnabled?(this._positionToInsert=br.fromPosition(t),this._timeoutId=g.window.setTimeout(()=>{o.model.change(k=>{this._timeoutId=null,k.remove(u),u.detach();let _=null;this._positionToInsert.root.rootName!=="$graveyard"&&(_=this._positionToInsert),gD(o.model,b,_,!1),this._positionToInsert.detach(),this._positionToInsert=null}),o.plugins.get(bs).requestUndoOnBackspace()},100)):u.detach()}}var yD=d(5651),QX={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(yD.A,QX),yD.A.locals;class ZX extends kt{constructor(t,r){super(r);const o=r.t;this.focusTracker=new ir,this.keystrokes=new zr,this.set("mediaURLInputValue",""),this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(o("Save"),At.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(o("Cancel"),At.cancel,"ck-button-cancel","cancel"),this._focusables=new Ri,this._focusCycler=new Fi({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._validators=t,this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form","ck-responsive-form"],tabindex:"-1"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),tf({view:this}),[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach(r=>{this._focusables.add(r),this.focusTracker.add(r.element)}),this.keystrokes.listenTo(this.element);const t=r=>r.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.fieldView.element.value.trim()}set url(t){this.urlInputView.fieldView.element.value=t.trim()}isValid(){this.resetFormStatus();
8472for(const t of this._validators){const r=t(this);if(r)return this.urlInputView.errorText=r,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const t=this.locale.t,r=new Af(this.locale,Nf),o=r.fieldView;return this._urlInputViewInfoDefault=t("Paste the media URL in the input."),this._urlInputViewInfoTip=t("Tip: Paste the URL into the content to embed faster."),r.label=t("Media URL"),r.infoText=this._urlInputViewInfoDefault,o.on("input",()=>{r.infoText=o.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault,this.mediaURLInputValue=o.element.value.trim()}),r}_createButton(t,r,o,c){const u=new Rt(this.locale);return u.set({label:t,icon:r,tooltip:!0}),u.extendTemplate({attributes:{class:o}}),c&&u.delegate("execute").to(this,c),u}}class JX extends Pe{static get requires(){return[rp]}static get pluginName(){return"MediaEmbedUI"}init(){const t=this.editor,r=t.commands.get("mediaEmbed");t.ui.componentFactory.add("mediaEmbed",o=>{const c=ps(o);return this._setUpDropdown(c,r),c})}_setUpDropdown(t,r){const o=this.editor,c=o.t,u=t.buttonView,m=o.plugins.get(rp).registry;t.once("change:isOpen",()=>{const b=new(Tk(ZX))(function(k,_){return[A=>{if(!A.url.length)return k("The URL must not be empty.")},A=>{if(!_.hasMedia(A.url))return k("This media URL is not supported.")}]}(o.t,m),o.locale);t.panelView.children.add(b),u.on("open",()=>{b.disableCssTransitions(),b.url=r.value||"",b.urlInputView.fieldView.select(),b.enableCssTransitions()},{priority:"low"}),t.on("submit",()=>{b.isValid()&&(o.execute("mediaEmbed",b.url),o.editing.view.focus())}),t.on("change:isOpen",()=>b.resetFormStatus()),t.on("cancel",()=>{o.editing.view.focus()}),b.delegate("submit","cancel").to(t),b.urlInputView.fieldView.bind("value").to(r,"value"),b.urlInputView.on("change:errorText",()=>{o.ui.update()}),b.urlInputView.bind("isEnabled").to(r,"isEnabled")}),t.bind("isEnabled").to(r),u.set({label:c("Insert media"),icon:'<svg viewBox="0 0 22 20" xmlns="http://www.w3.org/2000/svg"><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.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-14.24 1h13.008v12H4.467l.029-12Zm-2.208 1h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003l-.029 1h-.974v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h.974v1h-.974v-1Zm16.448 0h1.003v1h-1.003v-1Z"/><path d="M8.374 6.648a.399.399 0 0 1 .395-.4.402.402 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-.35V6.648Z"/></svg>',tooltip:!0})}}var xD=d(70),XX={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(xD.A,XX),xD.A.locals;function vD(l){return l!==void 0&&l.endsWith("px")}function zc(l){return l.toFixed(2).replace(/\.?0+$/,"")+"px"}var eee=Object.defineProperty,tee=Object.defineProperties,nee=Object.getOwnPropertyDescriptors,wD=Object.getOwnPropertySymbols,ree=Object.prototype.hasOwnProperty,iee=Object.prototype.propertyIsEnumerable,_D=(l,t,r)=>t in l?eee(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,oee=(l,t)=>{for(var r in t||(t={}))ree.call(t,r)&&_D(l,r,t[r]);if(wD)for(var r of wD(t))iee.call(t,r)&&_D(l,r,t[r]);return l};function see(l,t,r){if(!l.childCount)return;const o=new ms(l.document),c=function(k,_){const A=_.createRangeIn(k),N=[],T=new Set;for(const O of A.getItems()){if(!O.is("element")||!O.name.match(/^(p|h\d+|li|div)$/))continue;let L=fee(O);if(L===void 0||parseFloat(L)!=0||Array.from(O.getClassNames()).find($=>$.startsWith("MsoList"))||(L=void 0),O.hasStyle("mso-list")||L!==void 0&&T.has(L)){const $=hee(O);N.push({element:O,id:$.id,order:$.order,indent:$.indent,marginLeft:L}),L!==void 0&&T.add(L)}else T.clear()}return N}(l,o);if(!c.length)return;const u={},m=[];for(const k of c)if(k.indent!==void 0){aee(k)||(m.length=0);const _=`${k.id}:${k.indent}`,A=Math.min(k.indent-1,m.length);if(A<m.length&&m[A].id!==k.id&&(m.length=A),A<m.length-1)m.length=A+1;else{const T=cee(k,t);if(A>m.length-1||m[A].listElement.name!=T.type){A==0&&T.type=="ol"&&k.id!==void 0&&u[_]&&(T.startIndex=u[_]);const O=uee(T,o,r);if(vD(k.marginLeft)&&(A==0||vD(m[A-1].marginLeft))){let L=k.marginLeft;A>0&&(L=zc(parseFloat(L)-parseFloat(m[A-1].marginLeft))),o.setStyle("padding-left",L,O)}if(m.length==0){const L=k.element.parent,$=L.getChildIndex(k.element)+1;o.insertChild($,O,L)}else{const L=m[A-1].listItemElements;o.appendChild(O,L[L.length-1])}m[A]=(b=oee({},k),tee(b,nee({listElement:O,listItemElements:[]}))),A==0&&k.id!==void 0&&(u[_]=T.startIndex||1)}}const N=k.element.name=="li"?k.element:o.createElement("li");o.appendChild(N,m[A].listElement),m[A].listItemElements.push(N),A==0&&k.id!==void 0&&u[_]++,k.element!=N&&o.appendChild(k.element,N),mee(k.element,o),o.removeStyle("text-indent",k.element),o.removeStyle("margin-left",k.element)}else{const _=m.find(A=>A.marginLeft==k.marginLeft);if(_){const A=_.listItemElements;o.appendChild(k.element,A[A.length-1]),o.removeStyle("margin-left",k.element)}else m.length=0}var b}function aee(l){const t=l.element.previousSibling;return lee(t||l.element.parent)}function lee(l){return l.is("element","ol")||l.is("element","ul")}function cee(l,t){const r=new RegExp(`@list l${l.id}:level${l.indent}\\s*({[^}]*)`,"gi"),o=/mso-level-number-format:([^;]{0,100});/gi,c=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,u=new RegExp(`@list\\s+l${l.id}:level\\d\\s*{[^{]*mso-level-text:"%\\d\\\\.`,"gi"),m=new RegExp(`@list l${l.id}:level\\d\\s*{[^{]*mso-level-number-format:`,"gi"),b=u.exec(t),k=m.exec(t),_=b&&!k,A=r.exec(t);let N="decimal",T="ol",O=null;if(A&&A[1]){const L=o.exec(A[1]);if(L&&L[1]&&(N=L[1].trim(),T=N!=="bullet"&&N!=="image"?"ol":"ul"),N==="bullet"){const $=function(U){
8472if(U.name=="li"&&U.parent.name=="ul"&&U.parent.hasAttribute("type"))return U.parent.getAttribute("type");const H=function(ae){if(ae.getChild(0).is("$text"))return null;for(const _e of ae.getChildren()){if(!_e.is("element","span"))continue;const qe=_e.getChild(0);if(qe)return qe.is("$text")?qe:qe.getChild(0)}return null}(U);if(!H)return null;const J=H._data;return J==="o"?"circle":J==="·"?"disc":J==="§"?"square":null}(l.element);$&&(N=$)}else{const $=c.exec(A[1]);$&&$[1]&&(O=parseInt($[1]))}_&&(T="ol")}return{type:T,startIndex:O,style:dee(N),isLegalStyleList:_}}function dee(l){if(l.startsWith("arabic-leading-zero"))return"decimal-leading-zero";switch(l){case"alpha-upper":return"upper-alpha";case"alpha-lower":return"lower-alpha";case"roman-upper":return"upper-roman";case"roman-lower":return"lower-roman";case"circle":case"disc":case"square":return l;default:return null}}function uee(l,t,r){const o=t.createElement(l.type);return l.style&&t.setStyle("list-style-type",l.style,o),l.startIndex&&l.startIndex>1&&t.setAttribute("start",l.startIndex,o),l.isLegalStyleList&&r&&t.addClass("legal-list",o),o}function hee(l){const t=l.getStyle("mso-list");if(t===void 0)return{};const r=t.match(/(^|\s{1,100})l(\d+)/i),o=t.match(/\s{0,100}lfo(\d+)/i),c=t.match(/\s{0,100}level(\d+)/i);return r&&o&&c?{id:r[2],order:o[1],indent:parseInt(c[1])}:{indent:1}}function mee(l,t){const r=new Fo({name:"span",styles:{"mso-list":"Ignore"}}),o=t.createRangeIn(l);for(const c of o)c.type==="elementStart"&&r.match(c.item)&&t.remove(c.item)}function fee(l){const t=l.getStyle("margin-left");return t===void 0||t.endsWith("px")?t:function(r){const o=parseFloat(r);return r.endsWith("pt")?zc(96*o/72):r.endsWith("pc")?zc(12*o*96/72):r.endsWith("in")?zc(96*o):r.endsWith("cm")?zc(96*o/2.54):r.endsWith("mm")?zc(o/10*96/2.54):r}(t)}function pee(l,t){if(!l.childCount)return;const r=new ms(l.document),o=function(u,m){const b=m.createRangeIn(u),k=new Fo({name:/v:(.+)/}),_=[];for(const A of b){if(A.type!="elementStart")continue;const N=A.item,T=N.previousSibling,O=T&&T.is("element")?T.name:null,L=["Chart"],$=k.match(N),U=N.getAttribute("o:gfxdata"),H=O==="v:shapetype",J=U&&L.some(ae=>N.getAttribute("id").includes(ae));$&&U&&!H&&!J&&_.push(A.item.getAttribute("id"))}return _}(l,r);(function(u,m,b){const k=b.createRangeIn(m),_=new Fo({name:"img"}),A=[];for(const N of k)if(N.item.is("element")&&_.match(N.item)){const T=N.item,O=T.getAttribute("v:shapes")?T.getAttribute("v:shapes").split(" "):[];O.length&&O.every(L=>u.indexOf(L)>-1)?A.push(T):T.getAttribute("src")||A.push(T)}for(const N of A)b.remove(N)})(o,l,r),function(u,m,b){const k=b.createRangeIn(m),_=[];for(const T of k)if(T.type=="elementStart"&&T.item.is("element","v:shape")){const O=T.item.getAttribute("id");if(u.includes(O))continue;A(T.item.parent.getChildren(),O)||_.push(T.item)}for(const T of _){const O={src:N(T)};T.hasAttribute("alt")&&(O.alt=T.getAttribute("alt"));const L=b.createElement("img",O);b.insertChild(T.index+1,L,T.parent)}function A(T,O){for(const L of T)if(L.is("element")&&(L.name=="img"&&L.getAttribute("v:shapes")==O||A(L.getChildren(),O)))return!0;return!1}function N(T){for(const O of T.getChildren())if(O.is("element")&&O.getAttribute("src"))return O.getAttribute("src")}}(o,l,r),function(u,m){const b=m.createRangeIn(u),k=new Fo({name:/v:(.+)/}),_=[];for(const A of b)A.type=="elementStart"&&k.match(A.item)&&_.push(A.item);for(const A of _)m.remove(A)}(l,r);const c=function(u,m){const b=m.createRangeIn(u),k=new Fo({name:"img"}),_=[];for(const A of b)A.item.is("element")&&k.match(A.item)&&A.item.getAttribute("src").startsWith("file://")&&_.push(A.item);return _}(l,r);c.length&&function(u,m,b){if(u.length===m.length)for(let k=0;k<u.length;k++){const _=`data:${m[k].type};base64,${gee(m[k].hex)}`;b.setAttribute("src",_,u[k])}}(c,function(u){if(!u)return[];const m=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,b=new RegExp("(?:("+m.source+"))([\\da-fA-F\\s]+)\\}","g"),k=u.match(b),_=[];if(k)for(const A of k){let N=!1;A.includes("\\pngblip")?N="image/png":A.includes("\\jpegblip")&&(N="image/jpeg"),N&&_.push({hex:A.replace(m,"").replace(/[^\da-fA-F]/g,""),type:N})}return _}(t),r)}function gee(l){return btoa(l.match(/\w{2}/g).map(t=>
8472String.fromCharCode(parseInt(t,16))).join(""))}const bee=/<meta\s*name="?generator"?\s*content="?microsoft\s*word\s*\d+"?\/?>/i,kee=/xmlns:o="urn:schemas-microsoft-com/i;class yee{constructor(t,r=!1){this.document=t,this.hasMultiLevelListPlugin=r}isActive(t){return bee.test(t)||kee.test(t)}execute(t){const{body:r,stylesString:o}=t._parsedData;see(r,o,this.hasMultiLevelListPlugin),pee(r,t.dataTransfer.getData("text/rtf")),function(c){const u=[],m=new ms(c.document);for(const{item:b}of m.createRangeIn(c))if(b.is("element")){for(const k of b.getClassNames())/\bmso/gi.exec(k)&&m.removeClass(k,b);for(const k of b.getStyleNames())/\bmso/gi.exec(k)&&m.removeStyle(k,b);(b.is("element","w:sdt")||b.is("element","w:sdtpr")&&b.isEmpty||b.is("element","o:p")&&b.isEmpty)&&u.push(b)}for(const b of u){const k=b.parent,_=k.getChildIndex(b);m.insertChild(_,b.getChildren(),k),m.remove(b)}}(r),t.content=r}}function AD(l,t,r,{blockElements:o,inlineObjectElements:c}){let u=r.createPositionAt(l,t=="forward"?"after":"before");return u=u.getLastMatchingPosition(({item:m})=>m.is("element")&&!o.includes(m.name)&&!c.includes(m.name),{direction:t}),t=="forward"?u.nodeAfter:u.nodeBefore}function CD(l,t){return!!l&&l.is("element")&&t.includes(l.name)}const xee=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class vee{constructor(t){this.document=t}isActive(t){return xee.test(t)}execute(t){const r=new ms(this.document),{body:o}=t._parsedData;(function(c,u){for(const m of c.getChildren())if(m.is("element","b")&&m.getStyle("font-weight")==="normal"){const b=c.getChildIndex(m);u.remove(m),u.insertChild(b,m.getChildren(),c)}})(o,r),function(c,u){for(const m of u.createRangeIn(c)){const b=m.item;if(b.is("element","li")){const k=b.getChild(0);k&&k.is("element","p")&&u.unwrapElement(k)}}}(o,r),function(c,u){const m=new cf(u.document.stylesProcessor),b=new hf(m,{renderingMode:"data"}),k=b.blockElements,_=b.inlineObjectElements,A=[];for(const N of u.createRangeIn(c)){const T=N.item;if(T.is("element","br")){const O=AD(T,"forward",u,{blockElements:k,inlineObjectElements:_}),L=AD(T,"backward",u,{blockElements:k,inlineObjectElements:_}),$=CD(O,k);(CD(L,k)||$)&&A.push(T)}}for(const N of A)N.hasClass("Apple-interchange-newline")?u.remove(N):u.replace(N,u.createElement("p"))}(o,r),t.content=o}}const wee=/<google-sheets-html-origin/i;class _ee{constructor(t){this.document=t}isActive(t){return wee.test(t)}execute(t){const r=new ms(this.document),{body:o}=t._parsedData;(function(c,u){for(const m of c.getChildren())if(m.is("element","google-sheets-html-origin")){const b=c.getChildIndex(m);u.remove(m),u.insertChild(b,m.getChildren(),c)}})(o,r),function(c,u){for(const m of c.getChildren())m.is("element","table")&&m.hasAttribute("xmlns")&&u.removeAttribute("xmlns",m)}(o,r),function(c,u){for(const m of c.getChildren())m.is("element","table")&&m.getStyle("width")==="0px"&&u.removeStyle("width",m)}(o,r),function(c,u){for(const m of Array.from(c.getChildren()))m.is("element","style")&&u.remove(m)}(o,r),t.content=o}}function jD(l){return l.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(t,r)=>r.length===1?" ":Array(r.length+1).join("Â ").substr(0,r.length))}function Aee(l,t){const r=new DOMParser,o=function(k){return jD(jD(k)).replace(/(<span\s+style=['"]mso-spacerun:yes['"]>[^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<span\s+style=['"]mso-spacerun:yes['"]><\/span>/g,"").replace(/(<span\s+style=['"]letter-spacing:[^'"]+?['"]>)[\r\n]+(<\/span>)/g,"$1 $2").replace(/ <\//g,"Â </").replace(/ <o:p><\/o:p>/g,"Â <o:p></o:p>").replace(/<o:p>( |\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)</g,"><")}(function(k){const _="</body>",A="</html>",N=k.indexOf(_);if(N<0)return k;const T=k.indexOf(A,N+_.length);return k.substring(0,N+_.length)+(T>=0?k.substring(T):"")}(l=(l=l.replace(/<!--\[if gte vml 1]>/g,"")).replace(/<o:SmartTagType(?:\s+[^\s>=]+(?:="[^"]*")?)*\s*\/?>/gi,""))),c=r.parseFromString(o,"text/html");(function(k){k.querySelectorAll("span[style*=spacerun]").forEach(_=>{const A=_,N=A.innerText.length||0;A.innerText=Array(N+1).join("Â ").substr(0,N)})})(c);const u=c.body.innerHTML,m=function(k,_){const A=new cf(_),N=new hf(A,{renderingMode:"data"}),T=k.createDocumentFragment(),O=k.body.childNodes;for(;O.length>0;)T.appendChild(O[0]);return N.domToView(T,{skipComments:!0})}(c,t),b=function(k){const _=[],A=[],N=Array.from(k.getElementsByTagName("style"));for(const T of N)T.sheet&&T.sheet.cssRules&&T.sheet.cssRules.length&&(_.push(T.sheet),A.push(T.innerHTML));return{styles:_,stylesString:A.join(" ")}}(c);return{body:m,bodyString:u,styles:b.styles,stylesString:b.stylesString}}function jn(l,t,r,o,c=1){t!=null&&c!=null&&t>c?o.setAttribute(l,t,r):o.removeAttribute(l,r)}function pl(l,t,r={}){const o=l.createElement("tableCell",r);return l.insertElement("paragraph",o),l.insert(o,t),o}function ox(l,t){const r=t.parent.parent,o=parseInt(r.getAttribute("headingColumns")||"0"),{column:c}
8472=l.getCellLocation(t);return!!o&&c<o}function Cee(){return l=>{l.on("element:table",(t,r,o)=>{const c=r.viewItem;if(!o.consumable.test(c,{name:!0}))return;const{rows:u,headingRows:m,headingColumns:b}=function(A){let N,T=0;const O=[],L=[];let $;for(const U of Array.from(A.getChildren())){if(U.name!=="tbody"&&U.name!=="thead"&&U.name!=="tfoot")continue;U.name!=="thead"||$||($=U);const H=Array.from(U.getChildren()).filter(J=>J.is("element","tr"));for(const J of H)if($&&U===$||U.name==="tbody"&&Array.from(J.getChildren()).length&&Array.from(J.getChildren()).every(ae=>ae.is("element","th")))T++,O.push(J);else{L.push(J);const ae=jee(J);(!N||ae<N)&&(N=ae)}}return{headingRows:T,headingColumns:N||0,rows:[...O,...L]}}(c),k={};b&&(k.headingColumns=b),m&&(k.headingRows=m);const _=o.writer.createElement("table",k);if(o.safeInsert(_,r.modelCursor)){if(o.consumable.consume(c,{name:!0}),u.forEach(A=>o.convertItem(A,o.writer.createPositionAt(_,"end"))),o.convertChildren(c,o.writer.createPositionAt(_,"end")),_.isEmpty){const A=o.writer.createElement("tableRow");o.writer.insert(A,o.writer.createPositionAt(_,"end")),pl(o.writer,o.writer.createPositionAt(A,"end"))}o.updateConversionResult(_,r)}})}}function ND(l){return t=>{t.on(`element:${l}`,(r,o,{writer:c})=>{if(!o.modelRange)return;const u=o.modelRange.start.nodeAfter,m=c.createPositionAt(u,0);if(o.viewItem.isEmpty)return void c.insertElement("paragraph",m);const b=Array.from(u.getChildren());if(b.every(k=>k.is("element","$marker"))){const k=c.createElement("paragraph");c.insert(k,c.createPositionAt(u,0));for(const _ of b)c.move(c.createRangeOn(_),c.createPositionAt(k,"end"))}},{priority:"low"})}}function jee(l){let t=0,r=0;const o=Array.from(l.getChildren()).filter(c=>c.name==="th"||c.name==="td");for(;r<o.length&&o[r].name==="th";){const c=o[r];t+=parseInt(c.getAttribute("colspan")||"1"),r++}return t}class qt{constructor(t,r={}){this._jumpedToStartRow=!1,this._table=t,this._startRow=r.row!==void 0?r.row:r.startRow||0,this._endRow=r.row!==void 0?r.row:r.endRow,this._startColumn=r.column!==void 0?r.column:r.startColumn||0,this._endColumn=r.column!==void 0?r.column:r.endColumn,this._includeAllSlots=!!r.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 t=this._table.getChild(this._rowIndex);if(!t||this._isOverEndRow())return{done:!0,value:void 0};if(!t.is("element","tableRow"))return this._rowIndex++,this.next();if(this._isOverEndColumn())return this._advanceToNextRow();let r=null;const o=this._getSpanned();if(o)this._includeAllSlots&&!this._shouldSkipSlot()&&(r=this._formatOutValue(o.cell,o.row,o.column));else{const c=t.getChild(this._cellIndex);if(!c)return this._advanceToNextRow();const u=parseInt(c.getAttribute("colspan")||"1"),m=parseInt(c.getAttribute("rowspan")||"1");(u>1||m>1)&&this._recordSpans(c,m,u),this._shouldSkipSlot()||(r=this._formatOutValue(c)),this._nextCellAtColumn=this._column+u}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,r||this.next()}skipRow(t){this._skipRows.add(t)}_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(t,r=this._row,o=this._column){return{done:!1,value:new Nee(this,t,r,o)}}_shouldSkipSlot(){const t=this._skipRows.has(this._row),r=this._row<this._startRow,o=this._column<this._startColumn,c=this._endColumn!==void 0&&this._column>this._endColumn;return t||r||o||c}_getSpanned(){const t=this._spannedCells.get(this._row);return t&&t.get(this._column)||null}_recordSpans(t,r,o){const c={cell:t,row:this._row,column:this._column};for(let u=this._row;u<this._row+r;u++)for(let m=this._column;m<this._column+o;m++)u==this._row&&m==this._column||this._markSpannedCell(u,m,c)}_markSpannedCell(t,r,o){this._spannedCells.has(t)||this._spannedCells.set(t,new Map),this._spannedCells.get(t).set(r,o)}_canJumpToStartRow(){return!!this._startRow&&this._startRow>0&&!this._jumpedToStartRow}_jumpToNonSpannedRowClosestToStartRow(){const t=this._getRowLength(0);for(let r=this._startRow;!this._jumpedToStartRow;r--)t===this._getRowLength(r)&&(this._row=r,this._rowIndex=r,this._jumpedToStartRow=!0)}_getRowLength(t){return[...this._table.getChild(t).getChildren()].reduce((r,o)=>r+parseInt(o.getAttribute("colspan")||"1"),0)}}class Nee{constructor(t,r,o,c){this.cell=r,this.row=t._row,this.column=t._column,this.cellAnchorRow=o,this.cellAnchorColumn=c,this._cellIndex=t._cellIndex,this._rowIndex=t._rowIndex,this._table=t._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)}}
8472function ED(l,t){return(r,{writer:o})=>{const c=r.getAttribute("headingRows")||0,u=o.createContainerElement("table",null,[]),m=o.createContainerElement("figure",{class:"table"},u);c>0&&o.insert(o.createPositionAt(u,"end"),o.createContainerElement("thead",null,o.createSlot(b=>b.is("element","tableRow")&&b.index<c))),c<l.getRows(r)&&o.insert(o.createPositionAt(u,"end"),o.createContainerElement("tbody",null,o.createSlot(b=>b.is("element","tableRow")&&b.index>=c)));for(const{positionOffset:b,filter:k}of t.additionalSlots)o.insert(o.createPositionAt(u,b),o.createSlot(k));return o.insert(o.createPositionAt(u,"after"),o.createSlot(b=>!b.is("element","tableRow")&&!t.additionalSlots.some(({filter:k})=>k(b)))),t.asWidget?function(b,k){return k.setCustomProperty("table",!0,b),My(b,k,{hasSelectionHandle:!0})}(m,o):m}}function SD(l={}){return(t,{writer:r})=>{const o=t.parent,c=o.parent,u=c.getChildIndex(o),m=new qt(c,{row:u}),b=c.getAttribute("headingRows")||0,k=c.getAttribute("headingColumns")||0;let _=null;for(const A of m)if(A.cell==t){const N=A.row<b||A.column<k?"th":"td";_=l.asWidget?bE(r.createEditableElement(N),r):r.createContainerElement(N);break}return _}}function DD(l={}){return(t,{writer:r})=>{if(!t.parent.is("element","tableCell")||!TD(t))return null;if(l.asWidget)return r.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const o=r.createContainerElement("p");return r.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}}function TD(l){return l.parent.childCount==1&&!!l.getAttributeKeys().next().done}class Eee extends St{refresh(){const t=this.editor.model,r=t.document.selection,o=t.schema;this.isEnabled=function(c,u){const m=c.getFirstPosition().parent,b=m===m.root?m:m.parent;return u.checkChild(b,"table")}(r,o)}execute(t={}){const r=this.editor,o=r.model,c=r.plugins.get("TableUtils"),u=r.config.get("table.defaultHeadings.rows"),m=r.config.get("table.defaultHeadings.columns");t.headingRows===void 0&&u&&(t.headingRows=u),t.headingColumns===void 0&&m&&(t.headingColumns=m),o.change(b=>{const k=c.createTable(b,t);o.insertObject(k,null,null,{findOptimalPosition:"auto"}),b.setSelection(b.createPositionAt(k.getNodeByPath([0,0,0]),0))})}}class ID extends St{constructor(t,r={}){super(t),this.order=r.order||"below"}refresh(){const t=this.editor.model.document.selection,r=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(t).length;this.isEnabled=r}execute(){const t=this.editor,r=t.model.document.selection,o=t.plugins.get("TableUtils"),c=this.order==="above",u=o.getSelectionAffectedTableCells(r),m=o.getRowIndexes(u),b=c?m.first:m.last,k=u[0].findAnce
8472stor("table");o.insertRows(k,{at:c?b:b+1,copyStructureFromAbove:!c})}}class MD extends St{constructor(t,r={}){super(t),this.order=r.order||"right"}refresh(){const t=this.editor.model.document.selection,r=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(t).length;this.isEnabled=r}execute(){const t=this.editor,r=t.model.document.selection,o=t.plugins.get("TableUtils"),c=this.order==="left",u=o.getSelectionAffectedTableCells(r),m=o.getColumnIndexes(u),b=c?m.first:m.last,k=u[0].findAncestor("table");o.insertColumns(k,{columns:1,at:c?b:b+1})}}class PD extends St{constructor(t,r={}){super(t),this.direction=r.direction||"horizontally"}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=t.length===1}execute(){const t=this.editor.plugins.get("TableUtils"),r=t.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];this.direction==="horizontally"?t.splitCellHorizontally(r,2):t.splitCellVertically(r,2)}}function OD(l,t,r){const{startRow:o,startColumn:c,endRow:u,endColumn:m}=t,b=r.createElement("table"),k=u-o+1;for(let A=0;A<k;A++)r.insertElement("tableRow",b,"end");const _=[...new qt(l,{startRow:o,endRow:u,startColumn:c,endColumn:m,includeAllSlots:!0})];for(const{row:A,column:N,cell:T,isAnchor:O,cellAnchorRow:L,cellAnchorColumn:$}of _){const U=A-o,H=b.getChild(U);if(O){const J=r.cloneElement(T);r.append(J,H),FD(J,A,N,u,m,r)}else(L<o||$<c)&&pl(r,r.createPositionAt(H,"end"))}return function(A,N,T,O,L){const $=parseInt(N.getAttribute("headingRows")||"0");$>0&&jn("headingRows",$-T,A,L,0);const U=parseInt(N.getAttribute("headingColumns")||"0");U>0&&jn("headingColumns",U-O,A,L,0)}(b,l,o,c,r),b}function BD(l,t,r=0){const o=[],c=new qt(l,{startRow:r,endRow:t-1});for(const u of c){const{row:m,cellHeight:b}=u;m<t&&t<=m+b-1&&o.push(u)}return o}function LD(l,t,r){const o=l.parent,c=o.parent,u=o.index,m=t-u,b={},k=parseInt(l.getAttribute("rowspan"))-m;k>1&&(b.rowspan=k);const _=parseInt(l.getAttribute("colspan")||"1");_>1&&(b.colspan=_);const A=u+m,N=[...new qt(c,{startRow:u,endRow:A,includeAllSlots:!0})];let T,O=null;for(const L of N){const{row:$,column:U,cell:H}=L;H===l&&T===void 0&&(T=U),T!==void 0&&T===U&&$===A&&(O=pl(r,L.getPositionBefore(),b))}return jn("rowspan",m,l,r),O}function RD(l,t){const r=[],o=new qt(l);for(const c of o){const{column:u,cellWidth:m}=c;u<t&&t<=u+m-1&&r.push(c)}return r}function zD(l,t,r,o){const c=r-t,u={},m=parseInt(l.getAttribute("colspan"))-c;m>1&&(u.colspan=m);const b=parseInt(l.getAttribute("rowspan")||"1");b>1&&(u.rowspan=b);const k=pl(o,o.createPositionAfter(l),u);return jn("colspan",c,l,o),k}function FD(l,t,r,o,c,u){const m=parseInt(l.getAttribute("colspan")||"1"),b=parseInt(l.getAttribute("rowspan")||"1");r+m-1>c&&jn("colspan",c-r+1,l,u,1),t+b-1>o&&jn("rowspan",o-t+1,l,u,1)}function sx(l,t){const r=t.getColumns(l),o=new Array(r).fill(0);for(const{column:u}of new qt(l))o[u]++;const c=o.reduce((u,m,b)=>m?u:[...u,b],[]);if(c.length>0){const u=c[c.length-1];return t.removeColumns(l,{at:u}),!0}return!1}function ax(l,t){const r=[],o=t.getRows(l);for(let c=0;c<o;c++)l.getChild(c).isEmpty&&r.push(c);if(r.length>0){const c=r[r.length-1];return t.removeRows(l,{at:c}),!0}return!1}function lx(l,t){sx(l,t)||ax(l,t)}function $D(l,t){const r=Array.from(new qt(l,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(r.every(({cellHeight:c})=>c===1))return t.lastRow;const o=r[0].cellHeight-1;return t.lastRow+o}function VD(l,t){const r=Array.from(new qt(l,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(r.every(({cellWidth:c})=>c===1))return t.lastColumn;const o=r[0].cellWidth-1;return t.lastColumn+o}class ip extends St{constructor(t,r){super(t),this.direction=r.direction,this.isHorizontal=this.direction=="right"||this.direction=="left"}refresh(){const t=this._getMergeableCell();this.value=t,this.isEnabled=!!t}execute(){const t=this.editor.model,r=t.document,o=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(r.selection)[0],c=this.value,u=this.direction;t.change(m=>{const b=u=="right"||u=="down",k=b?o:c,_=b?c:o,A=_.parent;(function($,U,H){UD($)||(UD(U)&&H.remove(H.createRangeIn(U)),H.move(H.createRangeIn($),H.createPositionAt(U,"end"))),H.remove($)})(_,k,m);const N=this.isHorizontal?"colspan":"rowspan",T=parseInt(o.getAttribute(N)||"1"),O=parseInt(c.getAttribute(N)||"1");m.setAttribute(N,T+O,k),m.setSelection(m.createRangeIn(k));const L=this.editor.plugins.get("TableUtils");
8472lx(A.findAncestor("table"),L)})}_getMergeableCell(){const t=this.editor.model.document,r=this.editor.plugins.get("TableUtils"),o=r.getTableCellsContainingSelection(t.selection)[0];if(!o)return;const c=this.isHorizontal?function(b,k,_){const A=b.parent,N=A.parent,T=k=="right"?b.nextSibling:b.previousSibling,O=(N.getAttribute("headingColumns")||0)>0;if(!T)return;const L=k=="right"?b:T,$=k=="right"?T:b,{column:U}=_.getCellLocation(L),{column:H}=_.getCellLocation($),J=parseInt(L.getAttribute("colspan")||"1"),ae=ox(_,L),_e=ox(_,$);if(!(O&&ae!=_e))return U+J===H?T:void 0}(o,this.direction,r):function(b,k,_){const A=b.parent,N=A.parent,T=N.getChildIndex(A);if(k=="down"&&T===_.getRows(N)-1||k=="up"&&T===0)return null;const O=parseInt(b.getAttribute("rowspan")||"1"),L=N.getAttribute("headingRows")||0,$=k=="down"&&T+O===L,U=k=="up"&&T===L;if(L&&($||U))return null;const H=parseInt(b.getAttribute("rowspan")||"1"),J=k=="down"?T+H:T,ae=[...new qt(N,{endRow:J})],_e=ae.find(jt=>jt.cell===b),qe=_e.column,vt=ae.find(({row:jt,cellHeight:nn,column:Gn})=>Gn===qe&&(k=="down"?jt===J:J===jt+nn));return vt&&vt.cell?vt.cell:null}(o,this.direction,r);if(!c)return;const u=this.isHorizontal?"rowspan":"colspan",m=parseInt(o.getAttribute(u)||"1");return parseInt(c.getAttribute(u)||"1")===m?c:void 0}}function UD(l){const t=l.getChild(0);return l.childCount==1&&t.is("element","paragraph")&&t.isEmpty}class See extends St{refresh(){const t=this.editor.plugins.get("TableUtils"),r=t.getSelectionAffectedTableCells(this.editor.model.document.selection),o=r[0];if(o){const c=o.findAncestor("table"),u=t.getRows(c)-1,m=t.getRowIndexes(r),b=m.first===0&&m.last===u;this.isEnabled=!b}else this.isEnabled=!1}execute(){const t=this.editor.model,r=this.editor.plugins.get("TableUtils"),o=r.getSelectionAffectedTableCells(t.document.selection),c=r.getRowIndexes(o),u=o[0],m=u.findAncestor("table"),b=r.getCellLocation(u).column;t.change(k=>{const _=c.last-c.first+1;r.removeRows(m,{at:c.first,rows:_});const A=function(N,T,O,L){const $=N.getChild(Math.min(T,L-1));let U=$.getChild(0),H=0;for(const J of $.getChildren()){if(H>O)return U;U=J,H+=parseInt(J.getAttribute("colspan")||"1")}return U}(m,c.first,b,r.getRows(m));k.setSelection(k.createPositionAt(A,0))})}}class Dee extends St{refresh(){const t=this.editor.plugins.get("TableUtils"),r=t.getSelectionAffectedTableCells(this.editor.model.document.selection),o=r[0];if(o){const c=o.findAncestor("table"),u=t.getColumns(c),{first:m,last:b}=t.getColumnIndexes(r);this.isEnabled=b-m<u-1}else this.isEnabled=!1}execute(){const t=this.editor.plugins.get("TableUtils"),[r,o]=function(k,_){const A=_.getSelectionAffectedTableCells(k),N=A[0],T=A.pop(),O=[N,T];return N.isBefore(T)?O:O.reverse()}(this.editor.model.document.selection,t),c=r.parent.parent,u=[...new qt(c)],m={first:u.find(k=>k.cell===r).column,last:u.find(k=>k.cell===o).column},b=function(k,_,A,N){return parseInt(A.getAttribute("colspan")||"1")>1?A:_.previousSibling||A.nextSibling?A.nextSibling||_.previousSibling:N.first?k.reverse().find(({column:O})=>O<N.first).cell:k.reverse().find(({column:O})=>O>N.last).cell}(u,r,o,m);this.editor.model.change(k=>{const _=m.last-m.first+1;t.removeColumns(c,{at:m.first,columns:_}),k.setSelection(k.createPositionAt(b,0))})}}class Tee extends St{refresh(){const t=this.editor.plugins.get("TableUtils"),r=this.editor.model,o=t.getSelectionAffectedTableCells(r.document.selection),c=o.length>0;this.isEnabled=c,this.value=c&&o.every(u=>this._isInHeading(u,u.parent.parent))}execute(t={}){if(t.forceValue===this.value)return;const r=this.editor.plugins.get("TableUtils"),o=this.editor.model,c=r.getSelectionAffectedTableCells(o.document.selection),u=c[0].findAncestor("table"),{first:m,last:b}=r.getRowIndexes(c),k=this.value?m:b+1,_=u.getAttribute("headingRows")||0;o.change(A=>{if(k){const N=BD(u,k,k>_?_:0);for(const{cell:T}of N)LD(T,k,A)}jn("headingRows",k,u,A,0)})}_isInHeading(t,r){const o=parseInt(r.getAttribute("headingRows")||"0");return!!o&&t.parent.index<o}}class Iee extends St{refresh(){const t=this.editor.model,r=this.editor.plugins.get("TableUtils"),o=r.getSelectionAffectedTableCells(t.document.selection),c=o.length>0;this.isEnabled=c,this.value=c&&o.every(u=>ox(r,u))}execute(t={}){if(t.forceValue===this.value)return;const r=this.editor.plugins.get("TableUtils"),o=this.editor.model,c=r.getSelectionAffectedTableCells(o.document.selection),u=c[0].findAnce
vendor: 4,426 bytes, line 8472
8472stor("table"),{first:m,last:b}=r.getColumnIndexes(c),k=this.value?m:b+1;o.change(_=>{if(k){const A=RD(u,k);for(const{cell:N,column:T}of A)zD(N,T,k,_)}jn("headingColumns",k,u,_,0)})}}function Mee(l){if(l.is("element","tableColumnGroup"))return l;const t=l.getChildren();return Array.from(t).find(r=>r.is("element","tableColumnGroup"))}function Pee(l){const t=Mee(l);return t?Array.from(t.getChildren()):[]}class kr extends Pe{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(t){const r=t.parent,o=r.parent,c=o.getChildIndex(r),u=new qt(o,{row:c});for(const{cell:m,row:b,column:k}of u)if(m===t)return{row:b,column:k}}createTable(t,r){const o=t.createElement("table"),c=r.rows||2,u=r.columns||2;return cx(t,o,0,c,u),r.headingRows&&jn("headingRows",Math.min(r.headingRows,c),o,t,0),r.headingColumns&&jn("headingColumns",Math.min(r.headingColumns,u),o,t,0),o}insertRows(t,r={}){const o=this.editor.model,c=r.at||0,u=r.rows||1,m=r.copyStructureFromAbove!==void 0,b=r.copyStructureFromAbove?c-1:c,k=this.getRows(t),_=this.getColumns(t);if(c>k)throw new P("tableutils-insertrows-insert-out-of-range",this,{options:r});o.change(A=>{const N=t.getAttribute("headingRows")||0;if(N>c&&jn("headingRows",N+u,t,A,0),!m&&(c===0||c===k))return void cx(A,t,c,u,_);const T=m?Math.max(c,b):c,O=new qt(t,{endRow:T}),L=new Array(_).fill(1);for(const{row:$,column:U,cellHeight:H,cellWidth:J,cell:ae}of O){const _e=$+H-1,qe=$<=b&&b<=_e;$<c&&c<=_e?(A.setAttribute("rowspan",H+u,ae),L[U]=-J):m&&qe&&(L[U]=J)}for(let $=0;$<u;$++){const U=A.createElement("tableRow");A.insert(U,t,c);for(let H=0;H<L.length;H++){const J=L[H],ae=A.createPositionAt(U,"end");J>0&&pl(A,ae,J>1?{colspan:J}:void 0),H+=Math.abs(J)-1}}})}insertColumns(t,r={}){const o=this.editor.model,c=r.at||0,u=r.columns||1;o.change(m=>{const b=t.getAttribute("headingColumns");c<b&&m.setAttribute("headingColumns",b+u,t);const k=this.getColumns(t);if(c===0||k===c){for(const A of t.getChildren())A.is("element","tableRow")&&Fc(u,m,m.createPositionAt(A,c?"end":0));return}const _=new qt(t,{column:c,includeAllSlots:!0});for(const A of _){const{row:N,cell:T,cellAnchorColumn:O,cellAnchorRow:L,cellWidth:$,cellHeight:U}=A;if(O<c){m.setAttribute("colspan",$+u,T);const H=L+U-1;for(let J=N;J<=H;J++)_.skipRow(J)}else Fc(u,m,A.getPositionBefore())}})}removeRows(t,r){const o=this.editor.model,c=r.rows||1,u=this.getRows(t),m=r.at,b=m+c-1;if(b>u-1)throw new P("tableutils-removerows-row-index-out-of-range",this,{table:t,options:r});o.change(k=>{const _={first:m,last:b},{cellsToMove:A,cellsToTrim:N}=function(T,{first:O,last:L}){const $=new Map,U=[];for(const{row:H,column:J,cellHeight:ae,cell:_e}of new qt(T,{endRow:L})){const qe=H+ae-1;if(H>=O&&H<=L&&qe>L){const vt=ae-(L-H+1);$.set(J,{cell:_e,rowspan:vt})}if(H<O&&qe>=O){let vt;vt=qe>=L?L-O+1:qe-O+1,U.push({cell:_e,rowspan:ae-vt})}}return{cellsToMove:$,cellsToTrim:U}}(t,_);A.size&&function(T,O,L,$){const U=new qt(T,{includeAllSlots:!0,row:O}),H=[...U],J=T.getChild(O);let ae;for(const{column:_e,cell:qe,isAnchor:vt}of H)if(L.has(_e)){const{cell:jt,rowspan:nn}=L.get(_e),Gn=ae?$.createPositionAfter(ae):$.createPositionAt(J,0);$.move($.createRangeOn(jt),Gn),jn("rowspan",nn,jt,$),ae=jt}else vt&&(ae=qe)}(t,b+1,A,k);for(let T=b;T>=m;T--)k.remove(t.getChild(T));for(const{rowspan:T,cell:O}of N)jn("rowspan",T,O,k);(function(T,{first:O,last:L},$){const U=T.getAttribute("headingRows")||0;O<U&&jn("headingRows",L<U?U-(L-O+1):O,T,$,0)})(t,_,k),sx(t,this)||ax(t,this)})}removeColumns(t,r){const o=this.editor.model,c=r.at,u=r.columns||1,m=r.at+u-1;o.change(b=>{(function(_,A,N){const T=_.getAttribute("headingColumns")||0;if(T&&A.first<T){const O=Math.min(T-1,A.last)-A.first+1;N.setAttribute("headingColumns",T-O,_)}})(t,{first:c,last:m},b);const k=Pee(t);for(let _=m;_>=c;_--){for(const{cell:A,column:N,cellWidth:T}of[...new qt(t)])N<=_&&T>1&&N+T>_?jn("colspan",T-1,A,b):N===_&&b.remove(A);if(k[_]){const A=_===0?k[1]:k[_-1],N=parseFloat(k[_].getAttribute("columnWidth")),T=parseFloat(A.getAttribute("columnWidth"));b.remove(k[_]),b.setAttribute("columnWidth",N+T+"%",A)}}ax(t,this)||sx(t,this)})}splitCellVertically(t,r=2){const o=this.editor.model,c=t.parent.parent,u=parseInt(t.getAttribute("rowspan")||"1"),m=parseInt(t.getAttribute("colspan")||"1");o.change(b=>{if(m>1){const{newCellsSpan:k,updatedSpan:_}=WD(m,r);jn("colspan",_,t,b);const A={};k>1&&(A.colspan=k),u>
84721&&(A.rowspan=u),Fc(m>r?r-1:m-1,b,b.createPositionAfter(t),A)}if(m<r){const k=r-m,_=[...new qt(c)],{column:A}=_.find(({cell:L})=>L===t),N=_.filter(({cell:L,cellWidth:$,column:U})=>L!==t&&U===A||U<A&&U+$>A);for(const{cell:L,cellWidth:$}of N)b.setAttribute("colspan",$+k,L);const T={};u>1&&(T.rowspan=u),Fc(k,b,b.createPositionAfter(t),T);const O=c.getAttribute("headingColumns")||0;O>A&&jn("headingColumns",O+k,c,b)}})}splitCellHorizontally(t,r=2){const o=this.editor.model,c=t.parent,u=c.parent,m=u.getChildIndex(c),b=parseInt(t.getAttribute("rowspan")||"1"),k=parseInt(t.getAttribute("colspan")||"1");o.change(_=>{if(b>1){const A=[...new qt(u,{startRow:m,endRow:m+b-1,includeAllSlots:!0})],{newCellsSpan:N,updatedSpan:T}=WD(b,r);jn("rowspan",T,t,_);const{column:O}=A.find(({cell:$})=>$===t),L={};N>1&&(L.rowspan=N),k>1&&(L.colspan=k);for(const $ of A){const{column:U,row:H}=$;H>=m+T&&U===O&&(H+m+T)%N==0&&Fc(1,_,$.getPositionBefore(),L)}}if(b<r){const A=r-b,N=[...new qt(u,{startRow:0,endRow:m})];for(const{cell:L,cellHeight:$,row:U}of N)if(L!==t&&U+$>m){const H=$+A;_.setAttribute("rowspan",H,L)}const T={};k>1&&(T.colspan=k),cx(_,u,m+1,A,1,T);const O=u.getAttribute("headingRows")||0;O>m&&jn("headingRows",O+A,u,_)}})}getColumns(t){return[...t.getChild(0).getChildren()].filter(r=>r.is("element","tableCell")).reduce((r,o)=>r+parseInt(o.getAttribute("colspan")||"1"),0)}getRows(t){return Array.from(t.getChildren()).reduce((r,o)=>o.is("element","tableRow")?r+1:r,0)}createTableWalker(t,r={}){return new qt(t,r)}getSelectedTableCells(t){const r=[];for(const o of this.sortRanges(t.getRanges())){const c=o.getContainedElement();c&&c.is("element","tableCell")&&r.push(c)}return r}getTableCellsContainingSelection(t){const r=[];for(const o of t.getRanges()){const c=o.start.findAncestor("tableCell");c&&r.push(c)}return r}getSelectionAffectedTableCells(t){const r=this.getSelectedTableCells(t);return r.length?r:this.getTableCellsContainingSelection(t)}getRowIndexes(t){const r=t.map(o=>o.parent.index);return this._getFirstLastIndexesObject(r)}
8472getColumnIndexes(t){const r=t[0].findAncestor("table"),o=[...new qt(r)].filter(c=>t.includes(c.cell)).map(c=>c.column);return this._getFirstLastIndexesObject(o)}isSelectionRectangular(t){if(t.length<2||!this._areCellInTheSameTableSection(t))return!1;const r=new Set,o=new Set;let c=0;for(const m of t){const{row:b,column:k}=this.getCellLocation(m),_=parseInt(m.getAttribute("rowspan"))||1,A=parseInt(m.getAttribute("colspan"))||1;r.add(b),o.add(k),_>1&&r.add(b+_-1),A>1&&o.add(k+A-1),c+=_*A}return function(m,b){const k=Array.from(m.values()),_=Array.from(b.values()),A=Math.max(...k),N=Math.min(...k),T=Math.max(..._),O=Math.min(..._);return(A-N+1)*(T-O+1)}(r,o)==c}sortRanges(t){return Array.from(t).sort(Oee)}_getFirstLastIndexesObject(t){const r=t.sort((o,c)=>o-c);return{first:r[0],last:r[r.length-1]}}_areCellInTheSameTableSection(t){const r=t[0].findAncestor("table"),o=this.getRowIndexes(t),c=parseInt(r.getAttribute("headingRows"))||0;if(!this._areIndexesInSameSection(o,c))return!1;const u=this.getColumnIndexes(t),m=parseInt(r.getAttribute("headingColumns"))||0;return this._areIndexesInSameSection(u,m)}_areIndexesInSameSection({first:t,last:r},o){return t<o==r<o}}function cx(l,t,r,o,c,u={}){for(let m=0;m<o;m++){const b=l.createElement("tableRow");l.insert(b,t,r),Fc(c,l,l.createPositionAt(b,"end"),u)}}function Fc(l,t,r,o={}){for(let c=0;c<l;c++)pl(t,r,o)}function WD(l,t){if(l<t)return{newCellsSpan:1,updatedSpan:1};const r=Math.floor(l/t);return{newCellsSpan:r,updatedSpan:l-r*t+r}}function Oee(l,t){const r=l.start,o=t.start;return r.isBefore(o)?-1:1}class Bee extends St{refresh(){const t=this.editor.plugins.get(kr),r=t.getSelectedTableCells(this.editor.model.document.selection);this.isEnabled=t.isSelectionRectangular(r)}execute(){const t=this.editor.model,r=this.editor.plugins.get(kr);t.change(o=>{const c=r.getSelectedTableCells(t.document.selection),u=c.shift(),{mergeWidth:m,mergeHeight:b}=function(k,_,A){let N=0,T=0;for(const H of _){const{row:J,column:ae}=A.getCellLocation(H);N=GD(H,ae,N,"colspan"),T=GD(H,J,T,"rowspan")}const{row:O,column:L}=A.getCellLocation(k),$=N-L,U=T-O;return{mergeWidth:$,mergeHeight:U}}(u,c,r);jn("colspan",m,u,o),jn("rowspan",b,u,o);for(const k of c)Lee(k,u,o);lx(u.findAncestor("table"),r),o.setSelection(u,"in")})}}function Lee(l,t,r){HD(l)||(HD(t)&&r.remove(r.createRangeIn(t)),r.move(r.createRangeIn(l),r.createPositionAt(t,"end"))),r.remove(l)}function HD(l){const t=l.getChild(0);return l.childCount==1&&t.is("element","paragraph")&&t.isEmpty}function GD(l,t,r,o){const c=parseInt(l.getAttribute(o)||"1");return Math.max(r,t+c)}class Ree extends St{constructor(t){super(t),this.affectsData=!1}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=t.length>0}execute(){const t=this.editor.model,r=this.editor.plugins.get("TableUtils"),o=r.getSelectionAffectedTableCells(t.document.selection),c=r.getRowIndexes(o),u=o[0].findAncestor("table"),m=[];for(let b=c.first;b<=c.last;b++)for(const k of u.getChild(b).getChildren())m.push(t.createRangeOn(k));t.change(b=>{b.setSelection(m)})}}class zee extends St{constructor(t){super(t),this.affectsData=!1}refresh(){const t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=t.length>0}execute(){const t=this.editor.plugins.get("TableUtils"),r=this.editor.model,o=t.getSelectionAffectedTableCells(r.document.selection),c=o[0],u=o.pop(),m=c.findAncestor("table"),b=t.getCellLocation(c),k=t.getCellLocation(u),_=Math.min(b.column,k.column),A=Math.max(b.column,k.column),N=[];for(const T of new qt(m,{startColumn:_,endColumn:A}))N.push(r.createRangeOn(T.cell));r.change(T=>{T.setSelection(N)})}}function Fee(l){l.document.registerPostFixer(t=>function(r,o){const c=o.document.differ.getChanges();let u=!1;const m=new Set;for(const b of c){let k=null;b.type=="insert"&&b.name=="table"&&(k=b.position.nodeAfter),b.type!="insert"&&b.type!="remove"||b.name!="tableRow"&&b.name!="tableCell"||(k=b.position.findAncestor("table")),Uee(b)&&(k=b.range.start.findAnce
8472stor("table")),k&&!m.has(k)&&(u=$ee(k,r)||u,u=Vee(k,r)||u,m.add(k))}return u}(t,l))}function $ee(l,t){let r=!1;const o=function(c){const u=parseInt(c.getAttribute("headingRows")||"0"),m=Array.from(c.getChildren()).reduce((k,_)=>_.is("element","tableRow")?k+1:k,0),b=[];for(const{row:k,cell:_,cellHeight:A}of new qt(c)){if(A<2)continue;const N=k<u?u:m;if(k+A>N){const T=N-k;b.push({cell:_,rowspan:T})}}return b}(l);if(o.length){r=!0;for(const c of o)jn("rowspan",c.rowspan,c.cell,t,1)}return r}function Vee(l,t){let r=!1;const o=function(b){const k=new Array(b.childCount).fill(0);for(const{rowIndex:_}of new qt(b,{includeAllSlots:!0}))k[_]++;return k}(l),c=[];for(const[b,k]of o.entries())!k&&l.getChild(b).is("element","tableRow")&&c.push(b);if(c.length){r=!0;for(const b of c.reverse())t.remove(l.getChild(b)),o.splice(b,1)}const u=o.filter((b,k)=>l.getChild(k).is("element","tableRow")),m=u[0];if(!u.every(b=>b===m)){const b=u.reduce((k,_)=>_>k?_:k,0);for(const[k,_]of u.entries()){const A=b-_;if(A){for(let N=0;N<A;N++)pl(t,t.createPositionAt(l.getChild(k),"end"));r=!0}}}return r}function Uee(l){if(l.type!=="attribute")return!1;const t=l.attributeKey;return t==="headingRows"||t==="colspan"||t==="rowspan"}function Wee(l){l.document.registerPostFixer(t=>function(r,o){const c=o.document.differ.getChanges();let u=!1;for(const m of c)m.type=="insert"&&m.name=="table"&&(u=Hee(m.position.nodeAfter,r)||u),m.type=="insert"&&m.name=="tableRow"&&(u=qD(m.position.nodeAfter,r)||u),m.type=="insert"&&m.name=="tableCell"&&(u=dx(m.position.nodeAfter,r)||u),m.type!="remove"&&m.type!="insert"||!Gee(m)||(u=dx(m.position.parent,r)||u);return u}(t,l))}function Hee(l,t){let r=!1;for(const o of l.getChildren())o.is("element","tableRow")&&(r=qD(o,t)||r);return r}function qD(l,t){let r=!1;for(const o of l.getChildren())r=dx(o,t)||r;return r}function dx(l,t){if(l.childCount==0)return t.insertElement("paragraph",l),!0;const r=Array.from(l.getChildren()).filter(o=>o.is("$text"));for(const o of r)t.wrap(t.createRangeOn(o),"paragraph");return!!r.length}function Gee(l){return!!l.position.parent.is("element","tableCell")&&(l.type=="insert"&&l.name=="$text"||l.type=="remove")}function qee(l,t){if(!l.is("element","paragraph"))return!1;const r=t.toViewElement(l);return!!r&&TD(l)!==r.is("element","span")}var KD=d(8137),Kee={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(KD.A,Kee),KD.A.locals;class Yee extends Pe{constructor(t){super(t),this._additionalSlots=[]}static get pluginName(){return"TableEditing"}static get requires(){return[kr]}init(){const t=this.editor,r=t.model,o=r.schema,c=t.conversion,u=t.plugins.get(kr);o.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),o.register("tableRow",{allowIn:"table",isLimit:!0}),o.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),c.for("upcast").add(m=>{m.on("element:figure",(b,k,_)=>{if(!_.consumable.test(k.viewItem,{name:!0,classes:"table"}))return;const A=function(T){for(const O of T.getChildren())if(O.is("element","table"))return O}(k.viewItem);if(!A||!_.consumable.test(A,{name:!0}))return;_.consumable.consume(k.viewItem,{name:!0,classes:"table"});const N=rr(_.convertItem(A,k.modelCursor).modelRange.getItems());N?(_.convertChildren(k.viewItem,_.writer.createPositionAt(N,"end")),_.updateConversionResult(N,k)):_.consumable.revert(k.viewItem,{name:!0,classes:"table"})})}),c.for("upcast").add(Cee()),c.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:ED(u,{asWidget:!0,additionalSlots:this._additionalSlots})}),c.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:ED(u,{additionalSlots:this._additionalSlots})}),c.for("upcast").elementToElement({model:"tableRow",view:"tr"}),c.for("upcast").add(m=>{m.on("element:tr",(b,k)=>{k.viewItem.isEmpty&&k.modelCursor.index==0&&b.stop()},{priority:"high"})}),c.for("downcast").elementToElement({model:"tableRow",view:(m,{writer:b})=>m.isEmpty?b.createEmptyElement("tr"):b.createContainerElement("tr")}),c.for("upcast").elementToElement({model:"tableCell",view:"td"}),c.for("upcast").elementToElement({model:"tableCell",view:"th"}),c.for("upcast").add(ND("td")),c.for("upcast").add(ND("th")),c.for("editingDowncast").elementToElement({model:"tableCell",view:SD({asWidget:!0})}),c.for("dataDowncast").elementToElement({model:"tableCell",view:SD()}),c.for("editingDowncast").elementToElement({model:"paragraph",view:DD({asWidget:!0}),converterPriority:"high"}),c.for("dataDowncast").elementToElement({model:"paragraph",view:DD(),converterPriority:"high"}),c.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),c.for("upcast").attributeToAttribute({model:{key:"colspan",value:YD("colspan")},view:"colspan"}),c.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),c.for("upcast").attributeToAttribute({model:{key:"rowspan",value:YD("rowspan")},view:"rowspan"}),t.config.define("table.defaultHeadings.rows",0),t.config.define("table.defaultHeadings.columns",0),t.commands.add("insertTable",new Eee(t)),t.commands.add("insertTableRowAbove",new ID(t,{order:"above"})),t.commands.add("insertTableRowBelow",new ID(t,{order:"below"})),t.commands.add("insertTableColumnLeft",new MD(t,{order:"left"})),t.commands.add("insertTableColumnRight",new MD(t,{order:"right"}
8472)),t.commands.add("removeTableRow",new See(t)),t.commands.add("removeTableColumn",new Dee(t)),t.commands.add("splitTableCellVertically",new PD(t,{direction:"vertically"})),t.commands.add("splitTableCellHorizontally",new PD(t,{direction:"horizontally"})),t.commands.add("mergeTableCells",new Bee(t)),t.commands.add("mergeTableCellRight",new ip(t,{direction:"right"})),t.commands.add("mergeTableCellLeft",new ip(t,{direction:"left"})),t.commands.add("mergeTableCellDown",new ip(t,{direction:"down"})),t.commands.add("mergeTableCellUp",new ip(t,{direction:"up"})),t.commands.add("setTableColumnHeader",new Iee(t)),t.commands.add("setTableRowHeader",new Tee(t)),t.commands.add("selectTableRow",new Ree(t)),t.commands.add("selectTableColumn",new zee(t)),Fee(r),Wee(r),this.listenTo(r.document,"change:data",()=>{(function(m,b){const k=m.document.differ;for(const _ of k.getChanges()){let A,N=!1;if(_.type=="attribute"){const $=_.range.start.nodeAfter;if(!$||!$.is("element","table")||_.attributeKey!="headingRows"&&_.attributeKey!="headingColumns")continue;A=$,N=_.attributeKey=="headingRows"}else _.name!="tableRow"&&_.name!="tableCell"||(A=_.position.findAncestor("table"),N=_.name=="tableRow");if(!A)continue;const T=A.getAttribute("headingRows")||0,O=A.getAttribute("headingColumns")||0,L=new qt(A);for(const $ of L){const U=$.row<T||$.column<O?"th":"td",H=b.mapper.toViewElement($.cell);H&&H.is("element")&&H.name!=U&&b.reconvertItem(N?$.cell.parent:$.cell)}}})(r,t.editing),function(m,b){const k=m.document.differ,_=new Set;for(const A of k.getChanges()){const N=A.type=="attribute"?A.range.start.parent:A.position.parent;N.is("element","tableCell")&&_.add(N)}for(const A of _.values()){const N=Array.from(A.getChildren()).filter(T=>qee(T,b.mapper));for(const T of N)b.reconvertItem(T)}}(r,t.editing)})}registerAdditionalSlot(t){this._additionalSlots.push(t)}}function YD(l){return t=>{const r=parseInt(t.getAttribute(l));return Number.isNaN(r)||r<=0?null:r}}var QD=d(5032),Qee={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(QD.A,Qee),QD.A.locals;class ZD extends kt{constructor(t){super(t);const r=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new zr,this.focusTracker=new ir,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",(o,c)=>`${c} Ã ${o}`),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"[email protected]":r.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck","ck-insert-table-dropdown__label"],"aria-hidden":!0},children:[{text:r.to("label")}]}],on:{mousedown:r.to(o=>{o.preventDefault()}),click:r.to(()=>{this.fire("execute")})}}),this.on("boxover",(o,c)=>{const{row:u,column:m}=c.target.dataset;this.items.get(10*(parseInt(u,10)-1)+(parseInt(m,10)-1)).focus()}),this.focusTracker.on("change:focusedElement",(o,c,u)=>{if(!u)return;const{row:m,column:b}=u.dataset;this.set({rows:parseInt(m),columns:parseInt(b)})}),this.on("change:columns",()=>this._highlightGridBoxes()),this.on("change:rows",()=>this._highlightGridBoxes())}render(){super.render(),sW({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection});for(const t of this.items)this.focusTracker.add(t.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 t=this.rows,r=this.columns;this.items.map((o,c)=>{const u=Math.floor(c/10)<t&&c%10<r;o.set("isOn",u)})}_createGridButton(t,r,o,c){const u=new Rt(t);return u.set({label:c,class:"ck-insert-table-dropdown-grid-box"}),u.extendTemplate({attributes:{"data-row":r,"data-column":o}}),u}_createGridCollection(){const t=[];for(let r=0;r<100;r++){const o=Math.floor(r/10),c=r%10,u=`${o+1} Ã ${c+1}`;t.push(this._createGridButton(this.locale,o+1,c+1,u))}return this.createCollection(t)}}class Zee extends Pe{static get pluginName(){return"TableUI"}init(){const t=this.editor,r=this.editor.t,o=t.locale.contentLanguageDirection==="ltr";t.ui.componentFactory.add("insertTable",c=>{const u=t.commands.get("insertTable"),m=ps(c);let b;return m.bind("isEnabled").to(u),m.buttonView.set({icon:At.table,label:r("Insert table"),tooltip:!0}),m.on("change:isOpen",()=>{b||(b=new ZD(c),m.panelView.children.add(b),b.delegate("execute").to(m),m.on("execute",()=>{t.execute("insertTable",{rows:b.rows,columns:b.columns}),t.editing.view.focus()}))}),m}),t.ui.componentFactory.add("menuBar:insertTable",c=>{const u=t.commands.get("insertTable"),m=new Ic(c),b=new ZD(c);return b.delegate("execute").to(m),m.on("change:isOpen",(k,_,A)=>{A||b.reset()}),b.on("execute",()=>{t.execute("insertTable",{rows:b.rows,columns:b.columns}),t.editing.view.focus()}),m.buttonView.set({label:r("Table"),icon:At.table}),m.panelView.children.add(b),m.bind("isEnabled").to(u),m}),t.ui.componentFactory.add("tableColumn",c=>{const u=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:r("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:o?"insertTableColumnLeft":"insertTableColumnRight",label:r("Insert column left")}},{type:"button",model:{commandName:o?"insertTableColumnRight":"insertTableColumnLeft",label:r("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:r("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:r("Select column")}}];return this._prepareDropdown(r("Column"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M18 7v1H2V7h16zm0 5v1H2v-1h16z" 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 1zm-2 1H8v4h4V2zm0 6H8v4h4V8zm0 6H8v4h4v-4z"/></svg>',u,c)}),t.ui.componentFactory.add("tableRow",c=>{const u=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:r("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:r("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:r("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:r("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:r("Select row")}}];return this._prepareDropdown(r("Row"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v16h-1V2z" 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-1zm1 2v4h4V8H2zm6 0v4h4V8H8zm6 0v4h4V8h-4z"/></svg>',u,c)}),t.ui.componentFactory.add("mergeTableCells",c=>{const u=[{type:"button",model:{commandName:"mergeTableCellUp",label:r("Merge cell up")}},{type:"button",model:{commandName:o?"mergeTableCellRight":"mergeTableCellLeft",label:r("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:r("Merge cell down")}},{type:"button",model:{commandName:o?"mergeTableCellLeft":"mergeTableCellRight",label:r("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:r("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:r("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(r("Merge cells"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><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 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v7h-1V2zm6 5v1H2V7h16zM8 12v1H2v-1h6z" 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-1zm1 2v9h10V9H8z"/></svg>',u,c)})}_prepareDropdown(t,r,o,c){const u=this.editor,m=ps(c),b=this._fillDropdownWithListOptions(m,o);return m.buttonView.set({label:t,icon:r,tooltip:!0}),m.bind("isEnabled").toMany(b,"isEnabled",(...k)=>k.some(_=>_)),this.listenTo(m,"execute",k=>{u.execute(k.source.commandName),k.source instanceof wf||u.editing.view.focus()}),m}_prepareMergeSplitButtonDropdown(t,r,o,c){const u=this.editor,m=ps(c,jf),b="mergeTableCells",k=u.commands.get(b),_=this._fillDropdownWithListOptions(m,o);return m.buttonView.set({label:t,icon:r,tooltip:!0,isEnabled:!0}),m.bind("isEnabled").toMany([k,..._],"isEnabled",(...A)=>A.some(N=>N)),this.listenTo(m.buttonView,"execute",()=>{u.execute(b),u.editing.view.focus()}),this.listenTo(m,"execute",A=>{u.execute(A.source.commandName),u.editing.view.focus()}),m}_fillDropdownWithListOptions(t,r){const o=this.editor,c=[],u=new so;for(const m of r)Jee(m,o,c,u);return S4(t,u),c}}function Jee(l,t,r,o){if(l.type==="button"||l.type==="switchbutton"){const c=l.model=new sN(l.model),{commandName:u,bindIsOn:m}=l.model,b=t.commands.get(u);r.push(b),c.set({commandName:u}),c.bind("isEnabled").to(b),m&&c.bind("isOn").to(b,"value"),c.set({withText:!0})}o.add(l)}var JD=d(8423),Xee={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(JD.A,Xee),JD.A.locals;class gl extends Pe{static get pluginName(){return"TableSelection"}static get requires(){return[kr,kr]}init(){const t=this.editor,r=t.model,o=t.editing.view;this.listenTo(r,"deleteContent",(c,u)=>this._handleDeleteContent(c,u),{priority:"high"}),this.listenTo(o.document,"insertText",(c,u)=>this._handleInsertTextEvent(c,u),{priority:"high"}
8472),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const t=this.editor.plugins.get(kr),r=this.editor.model.document.selection,o=t.getSelectedTableCells(r);return o.length==0?null:o}getSelectionAsFragment(){const t=this.editor.plugins.get(kr),r=this.getSelectedTableCells();return r?this.editor.model.change(o=>{const c=o.createDocumentFragment(),{first:u,last:m}=t.getColumnIndexes(r),{first:b,last:k}=t.getRowIndexes(r),_=r[0].findAncestor("table");let A=k,N=m;if(t.isSelectionRectangular(r)){const O={firstColumn:u,lastColumn:m,firstRow:b,lastRow:k};A=$D(_,O),N=VD(_,O)}const T=OD(_,{startRow:b,startColumn:u,endRow:A,endColumn:N},o);return o.insert(T,c,0),c}):null}setCellSelection(t,r){const o=this._getCellsToSelect(t,r);this.editor.model.change(c=>{c.setSelection(o.cells.map(u=>c.createRangeOn(u)),{backward:o.backward})})}getFocusCell(){const t=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return t&&t.is("element","tableCell")?t:null}getAnchorCell(){const t=rr(this.editor.model.document.selection.getRanges()).getContainedElement();return t&&t.is("element","tableCell")?t:null}_defineSelectionConverter(){const t=this.editor,r=new Set;t.conversion.for("editingDowncast").add(o=>o.on("selection",(c,u,m)=>{const b=m.writer;(function(A){for(const N of r)A.removeClass("ck-editor__editable_selected",N);r.clear()})(b);const k=this.getSelectedTableCells();if(!k)return;for(const A of k){const N=m.mapper.toViewElement(A);b.addClass("ck-editor__editable_selected",N),r.add(N)}const _=m.mapper.toViewElement(k[k.length-1]);b.setSelection(_,0)},{priority:"lowest"}))}_enablePluginDisabling(){const t=this.editor;this.on("change:isEnabled",()=>{if(!this.isEnabled){const r=this.getSelectedTableCells();if(!r)return;t.model.change(o=>{const c=o.createPositionAt(r[0],0),u=t.model.schema.getNearestSelectionRange(c);o.setSelection(u)})}})}_handleDeleteContent(t,r){const o=this.editor.plugins.get(kr),c=r[0],u=r[1],m=this.editor.model,b=!u||u.direction=="backward",k=o.getSelectedTableCells(c);k.length&&(t.stop(),m.change(_=>{const A=k[b?k.length-1:0];m.change(T=>{for(const O of k)m.deleteContent(T.createSelection(O,"in"))});const N=m.schema.getNearestSelectionRange(_.createPositionAt(A,0));c.is("documentSelection")?_.setSelection(N):c.setTo(N)}))}_handleInsertTextEvent(t,r){const o=this.editor,c=this.getSelectedTableCells();if(!c)return;const u=o.editing.view,m=o.editing.mapper,b=c.map(k=>u.createRangeOn(m.toViewElement(k)));r.selection=u.createSelection(b)}_getCellsToSelect(t,r){const o=this.editor.plugins.get("TableUtils"),c=o.getCellLocation(t),u=o.getCellLocation(r),m=Math.min(c.row,u.row),b=Math.max(c.row,u.row),k=Math.min(c.column,u.column),_=Math.max(c.column,u.column),A=new Array(b-m+1).fill(null).map(()=>[]),N={startRow:m,endRow:b,startColumn:k,endColumn:_};for(const{row:L,cell:$}of new qt(t.findAncestor("table"),N))A[L-m].push($);const T=u.row<c.row,O=u.column<c.column;return T&&A.reverse(),O&&A.forEach(L=>L.reverse()),{cells:A.flat(),backward:T||O}}}class ete extends Pe{static get pluginName(){return"TableClipboard"}static get requires(){return[Eu,$i,gl,kr]}init(){const t=this.editor,r=t.editing.view.document;this.listenTo(r,"copy",(o,c)=>this._onCopyCut(o,c)),this.listenTo(r,"cut",(o,c)=>this._onCopyCut(o,c)),this.listenTo(t.model,"insertContent",(o,[c,u])=>this._onInsertContent(o,c,u),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(t,r){const o=this.editor.editing.view,c=this.editor.plugins.get(gl),u=this.editor.plugins.get(Eu);c.getSelectedTableCells()&&(t.name!="cut"||this.editor.model.canEditAt(this.editor.model.document.selection))&&(r.preventDefault(),t.stop(),this.editor.model.enqueueChange({isUndoable:t.name==="cut"},()=>{const m=u._copySelectedFragmentWithMarkers(t.name,this.editor.model.document.selection,()=>c.getSelectionAsFragment());o.document.fire("clipboardOutput",{dataTransfer:r.dataTransfer,content:this.editor.data.toView(m),method:t.name})}))}_onInsertContent(t,r,o){if(o&&!o.is("documentSelection"))return;const c=this.editor.model,u=this.editor.plugins.get(kr),m=this.editor.plugins.get(Eu),b=this.getTableIfOnlyTableInContent(r,c);if(!b)return;const k=u.getSelectionAffectedTableCells(c.document.selection);k.length?(t.stop(),r.is("documentFragment")?m._pasteMarkersIntoTransformedElement(r.markers,_=>this._replaceSelectedCells(b,k,_)):this.editor.model.change(_=>{this._replaceSelectedCells(b,k,_)})):lx(b,u)}_replaceSelectedCells(t,r,o){const c=this.editor.plugins.get(kr),u={width:c.getColumns(t),height:c.getRows(t)}
8472,m=function(N,T,O,L){const $=N[0].findAncestor("table"),U=L.getColumnIndexes(N),H=L.getRowIndexes(N),J={firstColumn:U.first,lastColumn:U.last,firstRow:H.first,lastRow:H.last},ae=N.length===1;return ae&&(J.lastRow+=T.height-1,J.lastColumn+=T.width-1,function(_e,qe,vt,jt){const nn=jt.getColumns(_e),Gn=jt.getRows(_e);vt>nn&&jt.insertColumns(_e,{at:nn,columns:vt-nn}),qe>Gn&&jt.insertRows(_e,{at:Gn,rows:qe-Gn})}($,J.lastRow+1,J.lastColumn+1,L)),ae||!L.isSelectionRectangular(N)?function(_e,qe,vt){const{firstRow:jt,lastRow:nn,firstColumn:Gn,lastColumn:gT}=qe,bT={first:jt,last:nn},kT={first:Gn,last:gT};hx(_e,Gn,bT,vt),hx(_e,gT+1,bT,vt),ux(_e,jt,kT,vt),ux(_e,nn+1,kT,vt,jt)}($,J,O):(J.lastRow=$D($,J),J.lastColumn=VD($,J)),J}(r,u,o,c),b=m.lastRow-m.firstRow+1,k=m.lastColumn-m.firstColumn+1;t=OD(t,{startRow:0,startColumn:0,endRow:Math.min(b,u.height)-1,endColumn:Math.min(k,u.width)-1},o);const _=r[0].findAncestor("table"),A=this._replaceSelectedCellsWithPasted(t,u,_,m,o);if(this.editor.plugins.get("TableSelection").isEnabled){const N=c.sortRanges(A.map(T=>o.createRangeOn(T)));o.setSelection(N)}else o.setSelection(A[0],0);return _}_replaceSelectedCellsWithPasted(t,r,o,c,u){const{width:m,height:b}=r,k=function(U,H,J){const ae=new Array(J).fill(null).map(()=>new Array(H).fill(null));for(const{column:_e,row:qe,cell:vt}of new qt(U))ae[qe][_e]=vt;return ae}(t,m,b),_=[...new qt(o,{startRow:c.firstRow,endRow:c.lastRow,startColumn:c.firstColumn,endColumn:c.lastColumn,includeAllSlots:!0})],A=[];let N;for(const U of _){const{row:H,column:J}=U;J===c.firstColumn&&(N=U.getPositionBefore());const ae=H-c.firstRow,_e=J-c.firstColumn,qe=k[ae%b][_e%m],vt=qe?u.cloneElement(qe):null,jt=this._replaceTableSlotCell(U,vt,N,u);jt&&(FD(jt,H,J,c.lastRow,c.lastColumn,u),A.push(jt),N=u.createPositionAfter(jt))}const T=parseInt(o.getAttribute("headingRows")||"0"),O=parseInt(o.getAttribute("headingColumns")||"0"),L=c.firstRow<T&&T<=c.lastRow,$=c.firstColumn<O&&O<=c.lastColumn;if(L){const U=ux(o,T,{first:c.firstColumn,last:c.lastColumn},u,c.firstRow);A.push(...U)}if($){const U=hx(o,O,{first:c.firstRow,last:c.lastRow},u);A.push(...U)}return A}_replaceTableSlotCell(t,r,o,c){const{cell:u,isAnchor:m}=t;return m&&c.remove(u),r?(c.insert(r,o),r):null}getTableIfOnlyTableInContent(t,r){if(!t.is("documentFragment")&&!t.is("element"))return null;if(t.is("element","table"))return t;if(t.childCount==1&&t.getChild(0).is("element","table"))return t.getChild(0);const o=r.createRangeIn(t);for(const c of o.getItems())if(c.is("element","table")){const u=r.createRange(o.start,r.createPositionBefore(c));if(r.hasContent(u,{ignoreWhitespaces:!0}))return null;const m=r.createRange(r.createPositionAfter(c),o.end);return r.hasContent(m,{ignoreWhitespaces:!0})?null:c}return null}}function ux(l,t,r,o,c=0){if(!(t<1))return BD(l,t,c).filter(({column:u,cellWidth:m})=>XD(u,m,r)).map(({cell:u})=>LD(u,t,o))}function hx(l,t,r,o){if(!(t<1))return RD(l,t).filter(({row:c,cellHeight:u})=>XD(c,u,r)).map(({cell:c,column:u})=>zD(c,u,t,o))}function XD(l,t,r){const o=l+t-1,{first:c,last:u}=r;return l>=c&&l<=u||l<c&&o>=c}class tte extends Pe{static get pluginName(){return"TableKeyboard"}static get requires(){return[gl,kr]}init(){const t=this.editor,r=t.editing.view.document,o=t.t;this.listenTo(r,"arrowKey",(...c)=>this._onArrowKey(...c),{context:"table"}),this.listenTo(r,"tab",(...c)=>this._handleTabOnSelectedTable(...c),{context:"figure"}),this.listenTo(r,"tab",(...c)=>this._handleTab(...c),{context:["th","td"]}),t.accessibility.addKeystrokeInfoGroup({id:"table",label:o("Keystrokes that can be used in a table cell"),keystrokes:[{label:o("Move the selection to the next cell"),keystroke:"Tab"},{label:o("Move the selection to the previous cell"),keystroke:"Shift+Tab"},{label:o("Insert a new table row (when in the last cell of a table)"),keystroke:"Tab"},{label:o("Navigate through the table"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]}]})}_handleTabOnSelectedTable(t,r){const o=this.editor,c=o.model.document.selection.getSelectedElement();c&&c.is("element","table")&&(r.preventDefault(),r.stopPropagation(),t.stop(),o.model.change(u=>{u.setSelection(u.createRangeIn(c.getChild(0).getChild(0)))}))}_handleTab(t,r){const o=this.editor,c=this.editor.plugins.get(kr),u=this.editor.plugins.get("TableSelection"),m=o.model.document.selection,b=!r.shiftKey;let k=c.getTableCellsContainingSelection(m)[0];if(k||(k=u.getFocusCell()),!k)return;r.preventDefault(),r.stopPropagation(),t.stop();const _=k.parent,A=_.parent,N=A.getChildIndex(_),T=_.getChildIndex(k),O=T===0;if(!b&&O&&N===0)return void o.model.change(H=>{H.setSelection(H.createRangeOn(A))});const L=T===_.childCount-1,$=N===c.getRows(A)-1;if(b&&$&&L&&(o.execute("insertTableRowBelow"),N===c.getRows(A)-1))return void o.model.change(H=>{H.setSelection(H.createRangeOn(A))});let U;if(b&&L)U=A.getChild(N+1).getChild(0);else if(!b&&O){const H=A.getChild(N-1);U=H.getChild(H.childCount-1)}else U=_.getChild(T+(b?1:-1));o.model.change(H=>{H.setSelection(H.createRangeIn(U))})}_onArrowKey(t,r){const o=this.editor,c=_k(r.keyCode,o.locale.contentLanguageDirection);this._handleArrowKeys(c,r.shiftKey)&&(r.preventDefault(),r.stopPropagation(),t.stop())}_handleArrowKeys(t,r){const o=this.editor.plugins.get(kr),c=this.editor.plugins.get("TableSelection"),u=this.editor.model,m=u.document.selection,b=["right","down"].includes(t),k=o.getSelectedTableCells(m);if(k.length){let A;return A=r?c.getFocusCell():b?k[k.length-1]:k[0],this._navigateFromCellInDirection(A,t,r),!0}
8472const _=m.focus.findAncestor("tableCell");if(!_)return!1;if(!m.isCollapsed)if(r){if(m.isBackward==b&&!m.containsEntireContent(_))return!1}else{const A=m.getSelectedElement();if(!A||!u.schema.isObject(A))return!1}return!!this._isSelectionAtCellEdge(m,_,b)&&(this._navigateFromCellInDirection(_,t,r),!0)}_isSelectionAtCellEdge(t,r,o){const c=this.editor.model,u=this.editor.model.schema,m=o?t.getLastPosition():t.getFirstPosition();if(!u.getLimitElement(m).is("element","tableCell"))return c.createPositionAt(r,o?"end":0).isTouching(m);const b=c.createSelection(m);return c.modifySelection(b,{direction:o?"forward":"backward"}),m.isEqual(b.focus)}_navigateFromCellInDirection(t,r,o=!1){const c=this.editor.model,u=t.findAncestor("table"),m=[...new qt(u,{includeAllSlots:!0})],{row:b,column:k}=m[m.length-1],_=m.find(({cell:$})=>$==t);let{row:A,column:N}=_;switch(r){case"left":N--;break;case"up":A--;break;case"right":N+=_.cellWidth;break;case"down":A+=_.cellHeight}if(A<0||A>b||N<0&&A<=0||N>k&&A>=b)return void c.change($=>{$.setSelection($.createRangeOn(u))});N<0?(N=o?0:k,A--):N>k&&(N=o?k:0,A++);const T=m.find($=>$.row==A&&$.column==N).cell,O=["right","down"].includes(r),L=this.editor.plugins.get("TableSelection");if(o&&L.isEnabled){const $=L.getAnchorCell()||t;L.setCellSelection($,T)}else{const $=c.createPositionAt(T,O?0:"end");c.change(U=>{U.setSelection($)})}}}class nte extends sa{constructor(){super(...arguments),this.domEventType=["mousemove","mouseleave"]}onDomEvent(t){this.fire(t.type,t)}}class rte extends Pe{static get pluginName(){return"TableMouse"}static get requires(){return[gl,kr]}init(){this.editor.editing.view.addObserver(nte),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const t=this.editor,r=t.plugins.get(kr);let o=!1;const c=t.plugins.get(gl);this.listenTo(t.editing.view.document,"mousedown",(u,m)=>{const b=t.model.document.selection;if(!this.isEnabled||!c.isEnabled||!m.domEvent.shiftKey)return;const k=c.getAnchorCell()||r.getTableCellsContainingSelection(b)[0];if(!k)return;const _=this._getModelTableCellFromDomEvent(m);_&&eT(k,_)&&(o=!0,c.setCellSelection(k,_),m.preventDefault())}),this.listenTo(t.editing.view.document,"mouseup",()=>{o=!1}),this.listenTo(t.editing.view.document,"selectionChange",u=>{o&&u.stop()},{priority:"highest"})}_enableMouseDragSelection(){const t=this.editor;let r,o,c=!1,u=!1;const m=t.plugins.get(gl);this.listenTo(t.editing.view.document,"mousedown",(b,k)=>{this.isEnabled&&m.isEnabled&&(k.domEvent.shiftKey||k.domEvent.ctrlKey||k.domEvent.altKey||(r=this._getModelTableCellFromDomEvent(k)))}),this.listenTo(t.editing.view.document,"mousemove",(b,k)=>{if(!k.domEvent.buttons||!r)return;const _=this._getModelTableCellFromDomEvent(k);_&&eT(r,_)&&(o=_,c||o==r||(c=!0)),c&&(u=!0,m.setCellSelection(r,o),k.preventDefault())}),this.listenTo(t.editing.view.document,"mouseup",()=>{c=!1,u=!1,r=null,o=null}),this.listenTo(t.editing.view.document,"selectionChange",b=>{u&&b.stop()},{priority:"highest"})}_getModelTableCellFromDomEvent(t){const r=t.target,o=this.editor.editing.view.createPositionAt(r,0);return this.editor.editing.mapper.toModelPosition(o).parent.findAncestor("tableCell",{includeSelf:!0})}}function eT(l,t){return l.parent.parent==t.parent.parent}var tT=d(2329),ite={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(tT.A,ite),tT.A.locals;function ote(l){const t=l.getSelectedElement();return t&&nT(t)?t:null}function ste(l){const t=l.getFirstPosition();if(!t)return null;let r=t.parent;for(;r;){if(r.is("element")&&nT(r))return r;r=r.parent}return null}function nT(l){return!!l.getCustomProperty("table")&&In(l)}var rT=d(5506),ate={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(rT.A,ate),rT.A.locals;var iT=d(2655),lte={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(iT.A,lte),iT.A.locals;var oT=d(4043),cte={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(oT.A,cte),oT.A.locals;var sT=d(1623),dte={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(sT.A,dte),sT.A.locals;var aT=d(8986),ute={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(aT.A,ute),aT.A.locals;const bl=Jr.defaultPositions;
8472bl.northArrowSouth,bl.northArrowSouthWest,bl.northArrowSouthEast,bl.southArrowNorth,bl.southArrowNorthWest,bl.southArrowNorthEast,bl.viewportStickyNorth;var lT=d(5562),hte={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(lT.A,hte),lT.A.locals;var cT=d(4143),mte={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(cT.A,mte),cT.A.locals;var dT=d(8795),fte={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};He()(dT.A,fte),dT.A.locals;var pte=Object.defineProperty,uT=Object.getOwnPropertySymbols,gte=Object.prototype.hasOwnProperty,bte=Object.prototype.propertyIsEnumerable,hT=(l,t,r)=>t in l?pte(l,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[t]=r,mT=(l,t)=>{for(var r in t||(t={}))gte.call(t,r)&&hT(l,r,t[r]);if(uT)for(var r of uT(t))bte.call(t,r)&&hT(l,r,t[r]);return l};const kte={autoRefresh:!0},fT=36e5;class mx extends fe(){constructor(t,r={}){if(super(),!t)throw new P("token-missing-token-url",this);r.initValue&&this._validateTokenValue(r.initValue),this.set("value",r.initValue),this._refresh=typeof t=="function"?t:()=>{return o=t,new Promise((c,u)=>{const m=new XMLHttpRequest;m.open("GET",o),m.addEventListener("load",()=>{const b=m.status,k=m.response;return b<200||b>299?u(new P("token-cannot-download-new-token",null)):c(k)}),m.addEventListener("error",()=>u(new Error("Network Error"))),m.addEventListener("abort",()=>u(new Error("Abort"))),m.send()});var o},this._options=mT(mT({},kte),r)}init(){return new Promise((t,r)=>{this.value?(this._options.autoRefresh&&this._registerRefreshTokenTimeout(),t(this)):this.refreshToken().then(t).catch(r)})}refreshToken(){return this._refresh().then(t=>(this._validateTokenValue(t),this.set("value",t),this._options.autoRefresh&&this._registerRefreshTokenTimeout(),this))}destroy(){clearTimeout(this._tokenRefreshTimeout)}_validateTokenValue(t){const r=typeof t=="string",o=!/^".*"$/.test(t),c=r&&t.split(".").length===3;if(!o||!c)throw new P("token-not-in-jwt-format",this)}_registerRefreshTokenTimeout(){const t=this._getTokenRefreshTimeoutTime();clearTimeout(this._tokenRefreshTimeout),this._tokenRefreshTimeout=setTimeout(()=>{this.refreshToken()},t)}_getTokenRefreshTimeoutTime(){try{const[,t]=this.value.split("."),{exp:r}=JSON.parse(atob(t));return r?Math.floor((1e3*r-Date.now())/2):fT}catch{return fT}}static create(t,r={}){return new mx(t,r).init()}}const fx=/^data:(\S*?);base64,/;class yte extends ee(){constructor(t,r,o){if(super(),!t)throw new P("fileuploader-missing-file",null);if(!r)throw new P("fileuploader-missing-token",null);if(!o)throw new P("fileuploader-missing-api-address",null);this.file=function(c){if(typeof c!="string")return!1;const u=c.match(fx);return!(!u||!u.length)}(t)?function(c,u=512){try{const m=c.match(fx)[1],b=atob(c.replace(fx,"")),k=[];for(let _=0;_<b.length;_+=u){const A=b.slice(_,_+u),N=new Array(A.length);for(let T=0;T<A.length;T++)N[T]=A.charCodeAt(T);k.push(new Uint8Array(N))}return new Blob(k,{type:m})}catch{throw new P("fileuploader-decoding-image-data-error",null)}}(t):t,this._token=r,this._apiAddress=o}onProgress(t){return this.on("progress",(r,o)=>t(o)),this}onError(t){return this.once("error",(r,o)=>t(o)),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){const t=new XMLHttpRequest;t.open("POST",this._apiAddress),t.setRequestHeader("Authorization",this._token.value),t.responseType="json",this.xhr=t}_attachXHRListeners(){const t=this.xhr,r=o=>()=>this.fire("error",o);t.addEventListener("error",r("Network Error")),t.addEventListener("abort",r("Abort")),t.upload&&t.upload.addEventListener("progress",o=>{o.lengthComputable&&this.fire("progress",{total:o.total,uploaded:o.loaded})}),t.addEventListener("load",()=>{const o=t.status,c=t.response;if(o<200||o>299)return this.fire("error",c.message||c.error)})}_sendRequest(){const t=new FormData,r=this.xhr;return t.append("file",this.file),new Promise((o,c)=>{r.addEventListener("load",()=>{const u=r.status,m=r.response;return u<200||u>299?m.message?c(new P("fileuploader-uploading-data-failed",this,{message:m.message})):c(m.error):o(m)}),r.addEventListener("error",()=>c(new Error("Network Error"))),r.addEventListener("abort",()=>c(new Error("Abort"))),r.send(t)})}}class xte{constructor(t,r){if(!t)throw new P("uploadgateway-missing-token",null);if(!r)throw new P("uploadgateway-missing-api-address",null);this._token=t,this._apiAddress=r}upload(t){return new yte(t,this._token,this._apiAddress)}}class vte extends nf{static get pluginName(){return"CloudServicesCore"}createToken(t,r){return new mx(t,r)}createUploadGateway(t,r){return new xte(t,r)}}var pT=(l,t,r)=>new Promise((o,c)=>{var u=k=>{try{b(r.next(k))}catch(_){c(_)}},m=k=>{try{b(r.throw(k))}catch(_){c(_)}},b=k=>k.done?o(k.value):Promise.resolve(k.value).then(u,m);b((r=r.apply(l,t)).next())});class px extends Of{}px.builtinPlugins=[class extends Pe{static get requires(){return[vq,LE,zf,$Q,uQ,rQ,VE]}static get pluginName(){return"Essentials"}}
8472,class extends Pe{static get requires(){return[fo]}static get pluginName(){return"CKFinderUploadAdapter"}init(){const l=this.editor.config.get("ckfinder.uploadUrl");l&&(this.editor.plugins.get(fo).createUploadAdapter=t=>new XQ(t,l,this.editor.t))}},class extends Pe{static get requires(){return[bs]}static get pluginName(){return"Autoformat"}afterInit(){const l=this.editor,t=this.editor.t;this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats(),this._addCodeBlockAutoformats(),this._addHorizontalLineAutoformats(),l.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Revert autoformatting action"),keystroke:"Backspace"}]})}_addListAutoformats(){const l=this.editor.commands;l.get("bulletedList")&&da(this.editor,this,/^[*-]\s$/,"bulletedList"),l.get("numberedList")&&da(this.editor,this,/^1[.|)]\s$/,"numberedList"),l.get("todoList")&&da(this.editor,this,/^\[\s?\]\s$/,"todoList"),l.get("checkTodoList")&&da(this.editor,this,/^\[\s?x\s?\]\s$/,()=>{this.editor.execute("todoList"),this.editor.execute("checkTodoList")})}_addBasicStylesAutoformats(){const l=this.editor.commands;if(l.get("bold")){const t=Wf(this.editor,"bold");Oc(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,t),Oc(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,t)}if(l.get("italic")){const t=Wf(this.editor,"italic");Oc(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,t),Oc(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,t)}if(l.get("code")){const t=Wf(this.editor,"code");Oc(this.editor,this,/(`)([^`]+)(`)$/g,t)}if(l.get("strikethrough")){const t=Wf(this.editor,"strikethrough");Oc(this.editor,this,/(~~)([^~]+)(~~)$/g,t)}}_addHeadingAutoformats(){const l=this.editor.commands.get("heading");l&&l.modelElements.filter(t=>t.match(/^heading[1-6]$/)).forEach(t=>{const r=t[7],o=new RegExp(`^(#{${r}})\\s$`);da(this.editor,this,o,()=>{if(!l.isEnabled||l.value===t)return!1;this.editor.execute("heading",{value:t})})})}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&da(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){const l=this.editor,t=l.model.document.selection;l.commands.get("codeBlock")&&da(l,this,/^```$/,()=>{if(t.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})})}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&da(this.editor,this,/^---$/,"horizontalLine")}},class extends Pe{static get requires(){return[eZ,tZ]}static get pluginName(){return"Bold"}},class extends Pe{static get requires(){return[rZ,iZ]}static get pluginName(){return"Italic"}},class extends Pe{static get requires(){return[sZ,lZ]}static get pluginName(){return"BlockQuote"}},class extends Pe{static get pluginName(){return"CKBox"}static get requires(){return[l3,cZ]}},class extends Pe{static get pluginName(){return"CKFinder"}static get requires(){return["Link","CKFinderUploadAdapter",PZ,IZ]}},class extends nf{constructor(){super(...arguments),this.token=null,this._tokens=new Map}static get pluginName(){return"CloudServices"}static get requires(){return[vte]}init(){return pT(this,null,function*(){const l=this.context.config.get("cloudServices")||{};for(const[r,o]of Object.entries(l))this[r]=o;if(!this.tokenUrl)return void(this.token=null);const t=this.context.plugins.get("CloudServicesCore");this.token=yield t.createToken(this.tokenUrl).init(),this._tokens.set(this.tokenUrl,this.token)})}registerTokenUrl(l){return pT(this,null,function*(){if(this._tokens.has(l))return this.getTokenFor(l);const t=this.context.plugins.get("CloudServicesCore"),r=yield t.createToken(l).init();return this._tokens.set(l,r),r})}getTokenFor(l){const t=this._tokens.get(l);if(!t)throw new P("cloudservices-token-not-registered",this);return t}destroy(){super.destroy();for(const l of this._tokens.values())l.destroy()}},class extends Pe{static get pluginName(){return"EasyImage"}static get requires(){return[OZ,"ImageUpload"]}init(){const l=this.editor;l.plugins.has("ImageBlockEditing")||l.plugins.has("ImageInlineEditing")||z("easy-image-image-feature-missing",l)}},class extends Pe{static get requires(){return[FZ,VZ]}static get pluginName(){return"Heading"}},class extends Pe{static get requires(){return[cJ,uJ]}static get pluginName(){return"Image"}},class extends Pe{static get requires(){return[mJ,fJ]}static get pluginName(){return"ImageCaption"}},class extends Pe{static get requires(){return[fS,RJ]}static get pluginName(){return"ImageStyle"}}
8472,class extends Pe{static get requires(){return[$f,ei]}static get pluginName(){return"ImageToolbar"}afterInit(){const l=this.editor,t=l.t,r=l.plugins.get($f),o=l.plugins.get("ImageUtils");var c;r.register("image",{ariaLabel:t("Image toolbar"),items:(c=l.config.get("image.toolbar")||[],c.map(u=>be(u)?u.name:u)),getRelatedElement:u=>o.getClosestSelectedImageWidget(u)})}},class extends Pe{static get pluginName(){return"ImageUpload"}static get requires(){return[EJ,bJ,vJ]}},class extends Pe{static get pluginName(){return"Indent"}static get requires(){return[zJ,FJ]}},class extends Pe{static get requires(){return[OS,pX,gX]}static get pluginName(){return"Link"}},FX,class extends Pe{static get requires(){return[rp,JX,YX,Iu]}static get pluginName(){return"MediaEmbed"}},Fy,class extends Pe{static get pluginName(){return"PasteFromOffice"}static get requires(){return[$i]}init(){const l=this.editor,t=l.plugins.get("ClipboardPipeline"),r=l.editing.view.document,o=[],c=this.editor.plugins.has("MultiLevelList");o.push(new yee(r,c)),o.push(new vee(r)),o.push(new _ee(r)),t.on("inputTransformation",(u,m)=>{if(m._isTransformedWithPasteFromOffice||l.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;const b=m.dataTransfer.getData("text/html"),k=o.find(_=>_.isActive(b));k&&(m._parsedData||(m._parsedData=Aee(b,r.stylesProcessor)),k.execute(m),m._isTransformedWithPasteFromOffice=!0)},{priority:"high"})}},class extends Pe{static get requires(){return[Vy,ei]}static get pluginName(){return"PictureEditing"}afterInit(){const l=this.editor;l.plugins.has("ImageBlockEditing")&&l.model.schema.extend("imageBlock",{allowAttributes:["sources"]}),l.plugins.has("ImageInlineEditing")&&l.model.schema.extend("imageInline",{allowAttributes:["sources"]}),this._setupConversion(),this._setupImageUploadEditingIntegration()}_setupConversion(){const l=this.editor,t=l.conversion,r=l.plugins.get("ImageUtils");t.for("upcast").add(function(o){const c=["srcset","media","type","sizes"],u=(m,b,k)=>{const _=b.viewItem;if(!k.consumable.test(_,{name:!0}))return;const A=new Map;for(const O of _.getChildren())if(O.is("element","source")){const L={};for(const $ of c)O.hasAttribute($)&&k.consumable.test(O,{attributes:$})&&(L[$]=O.getAttribute($));Object.keys(L).length&&A.set(O,L)}const N=o.findViewImgElement(_);if(!N)return;let T=b.modelCursor.parent;if(!T.is("element","imageBlock")){const O=k.convertItem(N,b.modelCursor);b.modelRange=O.modelRange,b.modelCursor=O.modelCursor,T=rr(O.modelRange.getItems())}k.consumable.consume(_,{name:!0});for(const[O,L]of A)k.consumable.consume(O,{attributes:Object.keys(L)});A.size&&k.writer.setAttribute("sources",Array.from(A.values()),T),k.convertChildren(_,T)};return m=>{m.on("element:picture",u)}}(r)),t.for("downcast").add(function(o){const c=(u,m,b)=>{if(!b.consumable.consume(m.item,u.name))return;const k=b.writer,_=b.mapper.toViewElement(m.item),A=o.findViewImgElement(_),N=m.attributeNewValue;if(N&&N.length){const T=k.createContainerElement("picture",null,N.map($=>k.createEmptyElement("source",$))),O=[];let L=A.parent;for(;L&&L.is("attributeElement");){const $=L.parent;k.unwrap(k.createRangeOn(A),L),O.unshift(L),L=$}k.insert(k.createPositionBefore(A),T),k.move(k.createRangeOn(A),k.createPositionAt(T,"end"));for(const $ of O)k.wrap(k.createRangeOn(T),$)}else if(A.parent.is("element","picture")){const T=A.parent;k.move(k.createRangeOn(A),k.createPositionBefore(T)),k.remove(T)}};return u=>{u.on("attribute:sources:imageBlock",c),u.on("attribute:sources:imageInline",c)}}(r))}_setupImageUploadEditingIntegration(){const l=this.editor;if(!l.plugins.has("ImageUploadEditing"))return;const t=l.plugins.get("ImageUploadEditing");this.listenTo(t,"uploadComplete",(r,{imageElement:o,data:c})=>{const u=c.sources;u&&l.model.change(m=>{m.setAttributes({sources:u},o)})})}},class extends Pe{static get requires(){return[Yee,Zee,gl,rte,tte,ete,Iu]}static get pluginName(){return"Table"}},class extends Pe{static get requires(){return[$f]}static get pluginName(){return"TableToolbar"}afterInit(){const l=this.editor,t=l.t,r=l.plugins.get($f),o=l.config.get("table.contentToolbar"),c=l.config.get("table.tableToolbar");o&&r.register("tableContent",{ariaLabel:t("Table toolbar"),items:o,getRelatedElement:ste}),c&&r.register("table",{ariaLabel:t("Table toolbar"),items:c,getRelatedElement:ote})}},class extends Pe{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}constructor(l){super(l),l.config.define("typing",{transformations:{include:iQ}})}init(){const l=this.editor.model.document.selection;l.on("change:range",()=>{this.isEnabled=!l.anchor.parent.is("element","codeBlock")}),this._enableTransformationWatchers()}_enableTransformationWatchers(){const l=this.editor,t=l.model,r=l.plugins.get("Delete"),o=function(u){const m=u.extra||[],b=u.remove||[],k=_=>!b.includes(_);return function(_){const A=new Set;for(const N of _)if(typeof N=="string"&&cE[N])for(const T of cE[N])A.add(T);else A.add(N);return Array.from(A)}(u.include.concat(m).filter(k)).filter(k).map(_=>typeof _=="string"&&lE[_]?lE[_]:_).filter(_=>typeof _=="object").map(_=>({from:oQ(_.from),to:sQ(_.to)}))}(l.config.get("typing.transformations")),c=new oE(l.model,u=>{for(const m of o)if(m.from.test(u))return{normalizedTransformation:m}});c.on("matched:data",(u,m)=>{if(!m.batch.isTyping)return;const{from:b,to:k}=m.normalizedTransformation,_=b.exec(m.text),A=k(_.slice(1)),N=m.range;let T=_.index;t.enqueueChange(O=>{for(let L=1;L<_.length;L++){const $=_[L],U=A[L-1];if(U==null){T+=$.length;continue}
8472const H=N.start.getShiftedBy(T),J=t.createRange(H,H.getShiftedBy($.length)),ae=aQ(H);t.insertContent(O.createText(U,ae),J),T+=U.length}t.enqueueChange(()=>{r.requestUndoOnBackspace()})})}),c.bind("isEnabled").to(this)}}],px.defaultConfig={toolbar:{items:["undo","redo","|","heading","|","bold","italic","|","link","uploadImage","insertTable","blockQuote","mediaEmbed","|","bulletedList","numberedList","outdent","indent"]},image:{toolbar:["imageStyle:inline","imageStyle:block","imageStyle:side","|","toggleImageCaption","imageTextAlternative"]},table:{contentToolbar:["tableColumn","tableRow","mergeTableCells"]},language:"en"}})(),h=h.default})())})(S0,S0.exports);var TAe=S0.exports;const IAe=os(TAe),MAe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),KV=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"})}),PAe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})});function OAe({message:e,platform:n,onClose:i,showLink:s=!0}){const h=`${(f=>({wordpress:"WordPress",woocommerce:"WooCommerce",opencart:"OpenCart",shopify:"Shopify"})[f==null?void 0:f.toLowerCase()]||"your site")(n)} is not connected to BlogBotz. Please connect your site to publish content.`;return a.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 mb-4",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(MAe,{className:"w-5 h-5 text-red-500 flex-shrink-0 mt-0.5"}),a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"text-sm font-medium text-red-800",children:e||h}),s&&a.jsxs("div",{className:"mt-3 flex items-center gap-3",children:[a.jsxs(Fn,{to:"/integrations",className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-red-600 text-white text-sm font-medium rounded-lg hover:bg-red-700 transition-colors",children:[a.jsx(KV,{className:"w-4 h-4"}),"Connect Your Site"]}),a.jsx("span",{className:"text-xs text-red-600",children:"Follow the integration guide to connect"})]})]}),i&&a.jsx("button",{onClick:i,className:"flex-shrink-0 p-1 rounded-md hover:bg-red-100 transition-colors",children:a.jsx(PAe,{className:"w-4 h-4 text-red-500"})})]})})}function BAe({platform:e,siteUrl:n}){const i=s=>({wordpress:"WordPress",woocommerce:"WooCommerce",opencart:"OpenCart",shopify:"Shopify"})[s==null?void 0:s.toLowerCase()]||"Your site";return a.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 mb-4",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("svg",{className:"w-5 h-5 text-amber-500 flex-shrink-0 mt-0.5",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})}),a.jsxs("div",{className:"flex-1",children:[a.jsx("h4",{className:"text-sm font-semibold text-amber-800",children:"Site Not Connected"}),a.jsxs("p",{className:"text-sm text-amber-700 mt-1",children:[i(e)," ",n?`(${n})`:""," is not connected to BlogBotz. You can edit and save this blog, but publishing requires a connected site."]}),a.jsxs(Fn,{to:"/integrations",className:"inline-flex items-center gap-1.5 mt-2 text-sm font-medium text-amber-800 hover:text-amber-900",children:[a.jsx(KV,{className:"w-4 h-4"}),"Go to Integrations",a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})]})]})]})})}const LAe=["connection is required","connect your","not connected","website connection","opencart connection","shopify connection","api connection","authentication failed","unauthorized","invali
8472d credentials","app password","api key"],AO=e=>{if(!e)return!1;const n=e.toLowerCase();return LAe.some(i=>n.includes(i))},RAe=e=>{if(!e)return{isConnected:!1,reason:"No site selected",canPublish:!1};const n=e.platform_type||e.platform;if(n==="wordpress"||n==="woocommerce"){const i=e.api_connected&&e.wordpress_username&&e.wordpress_app_password;return{isConnected:i,reason:i?null:"Website connection not configured",canPublish:i,platform:n}}if(n==="opencart"){const i=e.api_connected&&e.store_key;return{isConnected:i,reason:i?null:"OpenCart extension not connected",canPublish:i,platform:n}}if(n==="shopify"){const i=e.api_connected&&e.shopify_access_token;return{isConnected:i,reason:i?null:"Shopify app not connected",canPublish:i,platform:n}}return n==="custom"||n==="api"?{isConnected:!0,reason:null,canPublish:!0,platform:n}:n==="blogbotz"?{isConnected:!0,reason:null,canPublish:!0,platform:n}:n?{isConnected:!!e.api_connected,reason:e.api_connected?null:"Site not connected",canPublish:!!e.api_connected,platform:n}:{isConnected:!0,reason:null,canPublish:!0,platform:n}},Mv=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})}),zAe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})}),FAe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z"})}),$Ae=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z"})}),CO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),VAe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})}),UAe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.233-2.33 3 3 0 013.758 3.848A3.752 3.752 0 0118 19.5H6.75z"})}),jO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),WAe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"})}),NO=e=>e?e.replace(/<script\s+type=["']application\/ld\+json["']>[\s\S]*?<\/script>/gi,"").trim():"",HAe=({score:e,grade:n})=>{const i=d=>d>=80?"text-green-600 bg-green-50 border-green-200":d>=60?"text-yellow-600 bg-yellow-50 border-yellow-200":d>=40?"text-orange-600 bg-orange-50 border-orange-200":"text-red-600 bg-red-50 border-red-200",s=d=>d!=null&&d.startsWith("A")?"bg-green-500":d!=null&&d.startsWith("B")?"bg-yellow-500":d!=null&&d.startsWith("
8472C")?"bg-orange-500":"bg-red-500";return a.jsxs("div",{className:`inline-flex items-end gap-2 px-3 py-1.5 rounded-lg border ${i(e)} relative`,children:[a.jsxs("div",{className:"flex items-baseline gap-1",children:[a.jsx("span",{className:"font-semibold",children:e??"--"}),a.jsx("span",{className:"text-xs opacity-70",children:"/100"})]}),a.jsx("span",{className:`w-5 h-5 rounded text-white text-xs font-bold flex items-center justify-center ${s(n)} flex-shrink-0`,children:n||"?"})]})};function GAe(){var ot,Ye,rt,_t,An,Wt;const e=Ot(),{id:n}=sc(),[i,s]=j.useState(null),[d,h]=j.useState(!0),[f,g]=j.useState(!1),[p,x]=j.useState(!1),[y,v]=j.useState(""),[w,C]=j.useState(""),[E,S]=j.useState(!1),[D,I]=j.useState(null),[M,B]=j.useState(!1),[R,F]=j.useState(!1),[V,P]=j.useState(!1),[z,W]=j.useState(!1),[K,G]=j.useState(!1),[Z,se]=j.useState(!1),[ge,Se]=j.useState(""),[Ae,he]=j.useState(null),[ee,le]=j.useState(null),[je,ve]=j.useState(""),[Ce,Q]=j.useState(""),[te,pe]=j.useState(""),[be,Oe]=j.useState(""),[at,re]=j.useState(""),[ye,Me]=j.useState([]),[Y,fe]=j.useState(""),[Ne,Ue]=j.useState(!1),[it,Ve]=j.useState(null),[mt,ut]=j.useState(null),[Fe,ue]=j.useState(""),[Re,ke]=j.useState([]),[$e,lt]=j.useState(!1),[Ct,we]=j.useState("");j.useEffect(()=>{Xe()},[n]);const Xe=async()=>{var Be;try{h(!0);const st=(await ne.get(`/blogs/${n}`)).data.blog;if(s(st),ve(st.title||""),Q(NO(st.content||"")),pe(st.meta_description||""),Oe(st.featured_image||""),re(st.featured_image_alt||""),Me(st.tags||[]),Ve(st.featured_image||null),ue(st.category_name||""),(Be=st.site)!=null&&Be.id&&X(st.site.id),st.site){const Bt=RAe(st.site);le(Bt)}st.seo_data?I(st.seo_data):We()}catch(tt){v("Failed to load blog. It may have been deleted."),console.error("Failed to load blog",tt)}finally{h(!1)}},X=async Be=>{try{lt(!0),we("");const tt=await ne.get(`/sites/${Be}/categories`);ke(tt.data.categories||[]),tt.data.message&&we(tt.data.message)}catch(tt){console.error("Failed to load categories",tt),ke([]),we("Failed to load categories.")}finally{lt(!1)}},We=async()=>{try{B(!0);const Be=await ne.get(`/blogs/${n}/seo-score`);I(Be.data.seo_data)}catch(Be){console.error("Failed to load SEO score",Be)}finally{B(!1)}},et=async()=>{try{B(!0);const Be=await ne.post(`/blogs/${n}/seo-score/recalculate`);I(Be.data.seo_data),C("SEO score recalculated!"),setTimeout(()=>C(""),3e3)}catch{v("Failed to recalculate SEO score")}finally{B(!1)}},Je=async()=>{var Be,tt;if(!f){v(""),C(""),g(!0);try{const Bt=(await ne.put(`/blogs/${n}`,{title:je,content:Ce,meta_description:te,featured_image:be||null,featured_image_alt:at||null,tags:ye,category_name:Fe||null})).data.blog;s(Bt),Bt.content&&Q(NO(Bt.content)),Oe(Bt.featured_image||""),re(Bt.featured_image_alt||""),Ve(mt||Bt.featured_image||null),We(),C("Blog saved successfully!"),setTimeout(()=>C(""),3e3)}catch(st){v(((tt=(Be=st.response)==null?void 0:Be.data)==null?void 0:tt.message)||"Failed to save blog. Please try again.")}finally{g(!1)}}},Ke=async()=>{var Be,tt;if(!p){v(""),x(!0);try{const st=await ne.post(`/blogs/${n}/regenerate-image`);Oe(st.data.featured_image),re(st.data.featured_image_alt||""),Ve(st.data.featured_image),C("Featured image regenerated successfully!"),setTimeout(()=>C(""),3e3)}catch(st){v(((tt=(Be=st.response)==null?void 0:Be.data)==null?void 0:tt.error)||"Failed to regenerate image. Please try again.")}finally{x(!1)}}},ce=()=>{Y.trim()&&!ye.includes(Y.trim())&&(Me([...ye,Y.trim()]),fe(""))},Qe=Be=>{Me(ye.filter(tt=>tt!==Be))},Ze=Be=>{Be.key==="Enter"&&(Be.preventDefault(),ce())},Nt=async Be=>{var Bt,oe;const tt=Be.target.files[0];if(!tt)return;if(!tt.type.match(/^image\/(jpeg|jpg|png|gif|webp)$/)){v("Please upload a valid image file (JPEG, PNG, GIF, or WebP)");return}if(tt.size>10*1024*1024){v("Image size must be less than 10MB");return}const st=new FileReader;st.onloadend=()=>{const Te=st.result;ut(Te),Ve(Te)},st.readAsDataURL(tt),v(""),Ue(!0);try{const Te=new FormData;Te.append("image",tt);const pt=await ne.post(`/blogs/${n}/upload-image`,Te,{headers:{"Content-Type":"multipart/form-data"}}),Ht=pt.data.featured_image;Oe(Ht),re(pt.data.featured_image_alt||""),C("Image uploaded successfully!"),setTimeout(()=>C(""),3e3)}catch(Te){v(((oe=(Bt=Te.response)==null?void 0:Bt.data)==null?void 0:oe.error)||"Failed to upload image. Please try again."),Ve(mt||be||null)}finally{Ue(!1),Be.target.value=""}},dn=()=>{Oe(""),re(""),Ve(null),ut(null),C("Image removed. Remember to save your changes."),setTimeout(()=>C(""),3e3)},Ut=async()=>{var Be,tt;if(!V){v(""),P(!0);try{const st=await ne.post(`/blogs/${n}/approve`);s(st.data.blog),C("Blog approved successfully!"),setTimeout(()=>C(""),3e3)}catch(st){v(((tt=(Be=st.response)==null?void 0:Be.data)==null?void 0:tt.message)||"Failed to approve blog")}finally{P(!1)}}},Yr=async()=>{var Be,tt;if(!z){v(""),W(!0);try{const st=await ne.post(`/blogs/${n}/reject`,{reason:ge||"No reason provided"});s(st.data.blog),se(!1),Se(""),C("Blog rejected"),setTimeout(()=>C(""),3e3)}catch(st){v(((tt=(Be=st.response)==null?void 0:Be.data)==null?void 0:tt.message)||"Failed to reject blog")}finally{W(!1)}}},fi=async()=>{var Be,tt,st,Bt;if(!K){if(ee&&!ee.isConnected){he({message:`Your ${ee.platform||"site"} is not connected to BlogBotz. Please connect your site first to publish content.`,platform:ee.platform||((Be=i==null?void 0:i.site)==null?void 0:Be.platform_type)});return}v(""),he(null),G(!0);try{const oe=await ne.post(`/blogs/${n}/publish`);s(oe.data.blog),C("Blog published successfully!"),setTimeout(()=>C(""),3e3)}catch(oe){const Te=((st=(tt=oe.response)==null?void 0:tt.data)==null?void 0:st.message)||"Failed to publish blog";AO(Te)?he({message:Te,platform:(Bt=i==null?void 0:i.site)==null?void 0:Bt.platform_type}):v(Te)}finally{G(!1)}}},Br=async()=>{var Be,tt,st,Bt;if(!K){if(ee&&!ee.isConnected){he({message:`Your ${ee.platform||"site"} is not connected to BlogBotz. Please connect your site first to republish content.`,platform:ee.platform||((Be=i==null?void 0:i.site)==null?void 0:Be.platform_type)});return}v(""),he(null),G(!0);try{const oe=await ne.post(`/blogs/${n}/republish`);s(oe.data.blog),C("Blog republished successfully!"),setTimeout(()=>C(""),3e3)}catch(oe){const Te=((st=(tt=oe.response)==null?void 0:tt.data)==null?void 0:st.message)||"Failed to republish blog";AO(Te)?he({message:Te,platform:(Bt=i==null?void 0:i.site)==null?void 0:Bt.platform_type}):v(Te)}finally{G(!1)}}},Lr={toolbar:["heading","|","bold","italic","link","bulletedList","numberedList","|","blockQuote","insertTable","|","undo","redo"],heading:{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{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"}]},link:{addTargetToExternalLinks:!0,defaultProtocol:"https://"}};return d?a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):i?a.jsxs("div",{className:"p-6 lg:p-8 max-w-6xl mx-auto",children:[a.jsxs("div",{className:"mb-8 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx("button",{onClick:()=>e("/user/blogs"),className:"p-2 text-gray-400 hover:text-gray-600 rounded-lg hover:bg-gray-100",children:a.jsx(Mv,{className:"w-5 h-5"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Edit Blog"}),a.jsx("p",{className:"text-gray-600 mt-1",children:((ot=i.site)==null?void 0:ot.name)||"Unknown Site"})]})]}),a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[D&&a.jsx(HAe,{score:D.total_score,grade:D.grade}),a.jsxs("button",{onClick:()=>e("/user/blogs"),className:"btn-secondary flex items-center",children:[a.jsx(Mv,{className:"w-4 h-4 mr-2"}),"Blogs"]}),a.jsx("button",{onClick:Je,disabled:f,className:"btn-primary disabled:opacity-50 disabled:cursor-not-allowed",children:f?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Saving..."]}):"Save Changes"}),i.status==="pending"&&a.jsxs(a.Fragment,{children:[a.jsxs("button",{onClick:Ut,disabled:V,className:"inline-flex items-center px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 disabled:opacity-50 disabled:cursor-not-allowed text-sm font-medium",children:[V?a.jsxs("svg",{className:"animate-spin w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):a.jsx(CO,{className:"w-4 h-4 mr-2"}),"Approve"]}),a.jsxs("button",{onClick:()=>se(!0),disabled:z,className:"inline-flex items-center px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 disabled:opacity-50 disabled:cursor-not-allowed text-sm font-medium",children:[a.jsx(jO,{className:"w-4 h-4 mr-2"}),"Reject"]})]}),i.status==="approved"&&a.jsxs("button",{onClick:fi,disabled:K,className:"inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed text-sm font-medium",children:[K?a.jsxs("svg",{className:"animate-spin w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):a.jsx(UAe,{className:"w-4 h-4 mr-2"}),"Publish"]}),i.status==="published"&&a.jsxs("button",{onClick:Br,disabled:K,className:"inline-flex items-center px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 disabled:opacity-50 disabled:cursor-not-allowed text-sm font-medium",children:[K?a.jsxs("svg",{className:"animate-spin w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):a.jsx(WAe,{className:"w-4 h-4 mr-2"}),"Republish"]})]})]}),Ae&&a.jsx(OAe,{message:Ae.message,platform:Ae.platform,onClose:()=>he(null)}),y&&a.jsx(en,{type:"error",message:y,onClose:()=>v("")}),w&&a.jsx(en,{type:"success",message:w,onClose:()=>C("")}),ee&&!ee.isConnected&&!Ae&&(i==null?void 0:i.status)!=="published"&&a.jsx(BAe,{platform:ee.platform||((Ye=i==null?void 0:i.site)==null?void 0:Ye.platform_type),siteUrl:(rt=i==null?void 0:i.site)==null?void 0:rt.url}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[a.jsxs("div",{className:"card p-6",children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Title"}),a.jsx("input",{type:"text",value:je,onChange:Be=>ve(Be.target.value),className:"input-field w-full text-lg",placeholder:"Enter blog title..."}),a.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[je.length," characters ",je.length>=50&&je.length<=60?"(optimal)":je.length<50?"(aim for 50-60)":"(a bit long)"]})]}),a.jsxs("div",{className:"card p-6",children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Meta Description",a.jsx(Is,{content:"SEO meta description appears in search engine results. Keep it under 160 characters for best display.",position:"top",showIcon:!0,className:"ml-2",children:a.jsx("span",{})})]}),a.jsx("textarea",{value:te,onChange:Be=>pe(Be.target.value),rows:3,maxLength:300,className:"input-field w-full",placeholder:"Write a compelling description for search results..."}),a.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[te.length,"/160 characters",te.length>=150&&te.length<=160?a.jsx("span",{className:"text-green-600 ml-1",children:"(optimal)"}):te.length<150?a.jsx("span",{className:"text-yellow-600 ml-1",children:"(aim for 150-160)"}):a.jsx("span",{className:"text-orange-600 ml-1",children:"(may be truncated)"})]})]}),a.jsxs("div",{className:"card p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Content"}),a.jsx("button",{onClick:()=>S(!E),className:"text-xs text-primary-600 hover:text-primary-700",children:E?"Visual Editor":"HTML Editor"})]}),E?a.jsx("textarea",{value:Ce,onChange:Be=>Q(Be.target.value),rows:25,className:"input-field w-full font-mono text-sm",placeholder:"Enter HTML content..."}):a.jsx("div",{className:"border border-gray-300 rounded-lg overflow-hidden",children:a.jsx(DAe.CKEditor,{editor:IAe,data:Ce,config:Lr,onChange:(Be,tt)=>{const st=tt.getData();Q(st)}})}),a.jsxs("p",{className:"text-xs text-gray-500 mt-2",children:["Word count: ~",Ce.replace(/<[^>]*>
8472/g,"").split(/\s+/).filter(Boolean).length," words"]})]})]}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"card p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsxs("h3",{className:"text-sm font-medium text-gray-700 flex items-center",children:[a.jsx($Ae,{className:"w-4 h-4 mr-2"}),"SEO Score"]}),a.jsx("button",{onClick:et,disabled:M,className:"text-xs text-primary-600 hover:text-primary-700 disabled:opacity-50",children:M?"Calculating...":"Recalculate"})]}),D?a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"text-center py-4",children:[a.jsx("div",{className:"text-4xl font-bold text-gray-900",children:D.total_score}),a.jsxs("div",{className:"text-sm text-gray-500",children:[D.passed_checks,"/",D.total_checks," checks passed"]})]}),a.jsx("div",{className:"space-y-2",children:Object.entries(D.category_scores||{}).slice(0,5).map(([Be,tt])=>a.jsxs("div",{className:"flex items-center justify-between text-xs",children:[a.jsx("span",{className:"text-gray-600 capitalize",children:Be.replace("_"," ")}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-16 h-1.5 bg-gray-200 rounded-full overflow-hidden",children:a.jsx("div",{className:`h-full rounded-full ${tt.score>=70?"bg-green-500":tt.score>=50?"bg-yellow-500":"bg-red-500"}`,style:{width:`${tt.score}%`}})}),a.jsx("span",{className:"w-8 text-right text-gray-500",children:tt.score})]})]},Be))}),a.jsx("button",{onClick:()=>F(!R),className:"text-xs text-primary-600 hover:text-primary-700 w-full text-center pt-2",children:R?"Hide Details":"Show All Details"}),R&&((_t=D.recommendations)==null?void 0:_t.length)>0&&a.jsxs("div",{className:"pt-4 border-t",children:[a.jsx("h4",{className:"text-xs font-medium text-gray-700 mb-2",children:"Top Recommendations"}),a.jsx("ul",{className:"space-y-2",children:D.recommendations.slice(0,3).map((Be,tt)=>a.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[a.jsx(VAe,{className:`w-4 h-4 flex-shrink-0 ${Be.priority==="high"?"text-red-500":"text-yellow-500"}`}),a.jsx("span",{className:"text-gray-600",children:Be.issue})]},tt))})]}),R&&a.jsxs("div",{className:"pt-4 border-t",children:[a.jsx("h4",{className:"text-xs font-medium text-gray-700 mb-2",children:"Passed Checks"}),a.jsx("ul",{className:"space-y-1 max-h-32 overflow-y-auto",children:Object.entries(D.category_scores||{}).map(([Be,tt])=>{var st;return(st=tt.passed)==null?void 0:st.map((Bt,oe)=>a.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[a.jsx(CO,{className:"w-3 h-3 flex-shrink-0 text-green-500 mt-0.5"}),a.jsx("span",{className:"text-gray-500",children:Bt})]},`${Be}-${oe}`))})})]})]}):M?a.jsxs("div",{className:"text-center py-8",children:[a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600 mx-auto"}),a.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"Calculating SEO score..."})]}):a.jsx("div",{className:"text-center py-8 text-gray-500 text-sm",children:"Save your blog to calculate SEO score"})]}),a.jsxs("div",{className:"card p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Featured Image"}),a.jsx(Is,{content:"Generate a new image using AI",position:"top",showIcon:!1,children:a.jsx("button",{onClick:Ke,disabled:p,className:"btn-ghost text-xs disabled:opacity-50",children:p?a.jsxs("svg",{className:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):a.jsxs(a.Fragment,{children:[a.jsx(FAe,{className:"w-4 h-4 mr-1"}),"Regenerate"]})})})]}),it?a.jsxs("div",{className:"mb-4 relative group",children:[a.jsx("div",{className:"w-full h-40 rounded-lg overflow-hidden bg-gray-100",children:a.jsx("img",{src:it,alt:at||je,className:"w-full h-full object-cover",onError:Be=>{mt&&it!==mt&&(Be.target.src=mt)}})}),Ne&&a.jsx("div",{className:"absolute inset-0 bg-black bg-opacity-50 rounded-lg flex items-center justify-center",children:a.jsx("div",{className:"text-white text-sm",children:"Uploading..."})}),!Ne&&a.jsx("div",{className:"absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-50 transition-opacity rounded-lg flex items-center justify-center opacity-0 group-hover:opacity-100",children:a.jsx("button",{onClick:dn,className:"bg-red-500 hover:bg-red-600 text-white px-3 py-1.5 rounded text-xs font-medium",children:"Remove"})})]}):a.jsx("div",{className:"w-full h-40 bg-gray-100 rounded-lg flex items-center justify-center mb-4 border-2 border-dashed border-gray-300",children:a.jsx(zAe,{className:"w-10 h-10 text-gray-400"})}),a.jsxs("label",{className:"block",children:[a.jsx("input",{type:"file",accept:"image/*",onChange:Nt,disabled:Ne,className:"hidden"}),a.jsx("div",{className:"btn-secondary w-full text-center cursor-pointer text-sm",children:Ne?"Uploading...":it?"Change Image":"Upload Image"})]}),a.jsxs("div",{className:"mt-3",children:[a.jsx("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:"Alt Text"}),a.jsx("input",{type:"text",value:at,onChange:Be=>re(Be.target.value),className:"input-field w-full text-sm",placeholder:"Describe the image..."})]})]}),a.jsxs("div",{className:"card p-6",children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Category"}),$e?a.jsxs("div",{className:"flex items-center text-sm text-gray-500",children:[a.jsxs("svg",{className:"animate-spin w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}
8472),"Loading categories..."]}):Re.length>0?a.jsxs("div",{children:[a.jsxs("select",{value:Fe||"",onChange:Be=>ue(Be.target.value),className:"w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 bg-white",children:[a.jsx("option",{value:"",children:"Select a category..."}),Fe&&!Re.some(Be=>Be.name===Fe)&&a.jsxs("option",{value:Fe,children:[Fe," (auto-detected)"]}),Re.map(Be=>a.jsx("option",{value:Be.name,children:Be.name},Be.id||Be.name))]}),Fe&&!Re.some(Be=>Be.name===Fe)&&a.jsx("p",{className:"text-xs text-indigo-600 mt-1",children:"This category will be created on WordPress when published"}),a.jsx("div",{className:"mt-2",children:a.jsx("input",{type:"text",value:Fe,onChange:Be=>ue(Be.target.value),className:"w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500",placeholder:"Or type a custom category..."})})]}):a.jsxs("div",{children:[a.jsx("input",{type:"text",value:Fe,onChange:Be=>ue(Be.target.value),className:"w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500",placeholder:"Enter category name..."}),Fe&&a.jsxs("p",{className:"text-xs text-indigo-600 mt-1",children:['Auto-detected: "',Fe,'" (will be created on publish)']}),!Fe&&a.jsx("p",{className:"text-xs text-gray-500 mt-1",children:Ct||"No categories found on your site. Enter a name to create one during publish."})]})]}),a.jsxs("div",{className:"card p-6",children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Tags"}),a.jsxs("div",{className:"flex gap-2 mb-3",children:[a.jsx("input",{type:"text",value:Y,onChange:Be=>fe(Be.target.value),onKeyPress:Ze,className:"input-field flex-1 text-sm",placeholder:"Add a tag..."}),a.jsx("button",{onClick:ce,className:"btn-secondary px-3 text-sm",children:"Add"})]}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[ye.map((Be,tt)=>a.jsxs("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs bg-gray-100 text-gray-700",children:[Be,a.jsx("button",{onClick:()=>Qe(Be),className:"ml-1 text-gray-400 hover:text-gray-600",children:"Ã"})]},tt)),ye.length===0&&a.jsx("p",{className:"text-xs text-gray-500",children:"No tags"})]})]}),a.jsxs("div",{className:"card p-6",children:[a.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-3",children:"Blog Info"}),a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-500",children:"Status"}),a.jsx("span",{className:`font-medium capitalize px-2 py-0.5 rounded text-xs ${i.status==="published"?"bg-green-100 text-green-700":i.status==="approved"?"bg-blue-100 text-blue-700":i.status==="rejected"?"bg-red-100 text-red-700":"bg-yellow-100 text-yellow-700"}`,children:i.status})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-500",children:"Language"}),a.jsx("span",{className:"font-medium uppercase",children:i.language_code||"EN"})]}),((An=i.topic)==null?void 0:An.name)&&a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-500",children:"Topic"}),a.jsx("span",{className:"font-medium text-right truncate ml-2",children:i.topic.name})]}),((Wt=i.keyword)==null?void 0:Wt.keyword)&&a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-500",children:"Keyword"}),a.jsx("span",{className:"font-medium text-right truncate ml-2 text-xs",children:i.keyword.keyword})]}),Fe&&a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-500",children:"Category"}),a.jsx("span",{className:"font-medium text-right truncate ml-2",children:Fe})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-500",children:"Created"}),a.jsx("span",{className:"font-medium",children:new Date(i.created_at).toLocaleDateString()})]})]})]})]})]}),a.jsx("style",{children:` 8473 .ck-editor__editable { 8474 min-height: 400px; 8475 max-height: 600px; 8476 } 8477 .ck-editor__editable:focus { 8478 border-color: #6366f1 !important; 8479 box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important; 8480 } 8481 .ck.ck-editor__main > .ck-editor__editable { 8482 background: white; 8483 } 8484 .ck-content h2 { 8485 font-size: 1.5rem; 8486 font-weight: 600; 8487 margin-top: 1.5rem; 8488 margin-bottom: 0.75rem; 8489 } 8490 .ck-content h3 { 8491 font-size: 1.25rem; 8492 font-weight: 600; 8493 margin-top: 1.25rem; 8494 margin-bottom: 0.5rem; 8495 } 8496 .ck-content p { 8497 margin-bottom: 1rem; 8498 } 8499 .ck-content ul, .ck-content ol { 8500 margin-left: 1.5rem; 8501 margin-bottom: 1rem; 8502 } 8503 .ck-content blockquote { 8504 border-left: 4px solid #e5e7eb; 8505 padding-left: 1rem; 8506 font-style: italic; 8507 color: #6b7280; 8508 } 8509 `}),Z&&a.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:a.jsxs("div",{className:"flex min-h-full items-center justify-center p-4",children:[a.jsx("div",{className:"fixed inset-0 bg-gray-900/50 transition-opacity",onClick:()=>!z&&se(!1)}),a.jsxs("div",{className:"relative bg-white rounded-xl shadow-xl max-w-md w-full p-6 z-10",children:[a.jsx("div",{className:"flex items-center justify-center w-12 h-12 mx-auto mb-4 bg-red-100 rounded-full",children:a.jsx(jO,{className:"w-6 h-6 text-red-600"})}),a.jsx("h3",{className:"text-lg font-semibold text-gray-900 text-center mb-2",children:"Reject Blog"}),a.jsx("p",{className:"text-sm text-gray-600 text-center mb-4",children:"Are you sure you want to reject this blog? Optionally provide a reason."}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Reason (optional)"}),a.jsx("textarea",{value:ge,onChange:Be=>Se(Be.target.value),rows:3,className:"w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-red-500 focus:border-red-500",placeholder:"Why is this blog being rejected?"})]}),a.jsxs("div",{className:"flex space-x-3",children:[a.jsx("button",{onClick:()=>{se(!1),Se("")},disabled:z,className:"flex-1 px-4 py-2.5 text-sm font-medium text-gray-700 bg-gray-100 rounded-lg hover:bg-gray-200 transition-colors disabled:opacity-50",children:"Cancel"}),a.jsx("button",{onClick:Yr,disabled:z,className:"flex-1 px-4 py-2.5 text-sm font-medium text-white bg-red-600 rounded-lg hover:bg-red-700 transition-colors disabled:opacity-50 flex items-center justify-center",children:z?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Rejecting..."]}):"Reject Blog"})]})]})]})})]}):a.jsxs("div",{className:"p-6 lg:p-8",children:[a.jsx(en,{type:"error",message:y||"Blog not found"}),a.jsxs("button",{onClick:()=>e("/user/blogs"),className:"btn-secondary mt-4 inline-flex items-center",children:[a.jsx(Mv,{className:"w-5 h-5 mr-2"}),"Back to Blogs"]})]})}const qAe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})}),KAe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})}),YAe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})}),QAe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),ZAe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.338-2.32 3 3 0 013.182 3.025A4.5 4.5 0 0118 19.5H6.75z"})}),JAe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182M2.985 19.644l3.181-3.182"})}),XAe=e=>{const n={draft:{bg:"bg-gray-100",text:"text-gray-700",label:"Draft"},pending:{bg:"bg-amber-100",text:"text-amber-700",label:"Pending Review"},approved:{bg:"bg-blue-100",text:"text-blue-700",label:"Approved"},published:{bg:"bg-emerald-100",text:"text-emerald-700",label:"Published"},rejected:{bg:"bg-red-100",text:"text-red-700",label:"Rejected"}};return n[e]||n.draft},eCe=e=>{if(!e)return"text-gray-400";const n=e.toUpperCase();return n==="A+"||n==="A"?"text-emerald-600":n==="B+"||n==="B"?"text-blue-600":n==="C+"||n==="C"?"text-amber-600":"text-red-600"};function tCe(){const{id:e}=sc(),n=Ot(),[i,s]=j.useState(null),[d,h]=j.useState(!0),[f,g]=j.useState(""),[p,x]=j.useState(""),[y,v]=j.useState(!1),[w,C]=j.useState(!1);j.useEffect(()=>{E()},[e]);const E=async()=>{try{h(!0);const F=await ne.get(`/blogs/${e}`);s(F.data.blog)}catch{g("Failed to load blog. It may have been deleted.")}finally{h(!1)}},S=async()=>{var F,V;v(!0),x("");try{const P=await ne.post(`/blogs/${e}/approve`);if((F=P.data)!=null&&F.blog)s(P.data.blog);else{const z=(V=P.data)!=null&&V.published?"published":"approved";s(W=>({...W,status:z}))}}catch{x("Failed to approve blog.")}finally{v(!1)}},D=async()=>{var F,V,P;C(!0),x("");try{const z=await ne.post(`/blogs/${e}/publish`);(F=z.data)!=null&&F.blog?s(z.data.blog):s(W=>({...W,status:"published"}))}catch(z){x(((P=(V=z.response)==null?void 0:V.data)==null?void 0:P.message)||"Failed to publish blog.")}finally{C(!1)}},I=async()=>{var F,V,P;C(!0),x("");try{const z=await ne.post(`/blogs/${e}/republish`);(F=z.data)!=null&&F.blog?s(z.data.blog):s(W=>({...W,published_at:new Date().toISOString()}))}catch(z){x(((P=(V=z.response)==null?void 0:V.data)==null?void 0:P.message)||"Failed to republish blog.")}finally{C(!1)}};if(d)return a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})});if(f||!i)return a.jsx("div",{className:"p-6 lg:p-8",children:a.jsxs("div",{className:"max-w-2xl mx-auto text-center py-16",children:[a.jsx("p",{className:"text-gray-500 mb-4",children:f||"Blog not found."}),a.jsx("button",{onClick:()=>n("/user/blogs"),className:"btn-primary",children:"Back to Blogs"})]})});const M=XAe(i.status),B=i.content?i.content.replace(/<[^>]*>
8509/g,"").split(/\s+/).filter(Boolean).length:0,R=Math.max(1,Math.ceil(B/200));return a.jsxs("div",{className:"min-h-screen bg-white",children:[a.jsx("div",{className:"sticky top-0 z-10 bg-white/95 backdrop-blur-sm border-b border-gray-100 px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"max-w-4xl mx-auto flex items-center justify-between h-14",children:[a.jsxs("button",{onClick:()=>n("/user/blogs"),className:"inline-flex items-center gap-2 text-sm text-gray-500 hover:text-gray-900 transition-colors",children:[a.jsx(qAe,{className:"w-4 h-4"}),"All Blogs"]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:`inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium ${M.bg} ${M.text}`,children:M.label}),i.seo_score!=null&&a.jsxs("span",{className:`inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-gray-100 ${eCe(i.seo_grade)}`,children:["SEO ",i.seo_score]}),a.jsx("div",{className:"w-px h-5 bg-gray-200 mx-1"}),i.wordpress_url&&a.jsx("a",{href:i.wordpress_url,target:"_blank",rel:"noopener noreferrer",className:"btn-ghost inline-flex items-center text-sm",title:"View live on website",children:a.jsx(YAe,{className:"w-4 h-4"})}),a.jsx("button",{onClick:()=>n(`/user/blogs/${e}/edit`),className:"btn-ghost inline-flex items-center text-sm",title:"Edit blog",children:a.jsx(KAe,{className:"w-4 h-4"})}),(i.status==="draft"||i.status==="pending")&&a.jsx("button",{onClick:S,disabled:y,className:"btn-success text-sm disabled:opacity-50",children:y?"Approving...":a.jsxs(a.Fragment,{children:[a.jsx(QAe,{className:"w-4 h-4 mr-1.5 inline"}),"Approve"]})}),i.status==="approved"&&a.jsx("button",{onClick:D,disabled:w,className:"btn-primary text-sm disabled:opacity-50",children:w?"Publishing...":a.jsxs(a.Fragment,{children:[a.jsx(ZAe,{className:"w-4 h-4 mr-1.5 inline"}),"Publish"]})}),i.status==="published"&&a.jsx("button",{onClick:I,disabled:w,className:"btn-primary text-sm disabled:opacity-50",children:w?"Republishing...":a.jsxs(a.Fragment,{children:[a.jsx(JAe,{className:"w-4 h-4 mr-1.5 inline"}),"Republish"]})})]})]})}),p&&a.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 pt-4",children:a.jsxs("div",{className:"flex items-center justify-between p-3 bg-red-50 border border-red-200 rounded-lg",children:[a.jsx("p",{className:"text-sm text-red-700",children:p}),a.jsx("button",{onClick:()=>x(""),className:"text-red-400 hover:text-red-600 ml-3",children:a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})}),a.jsxs("article",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-10",children:[a.jsx("h1",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-gray-900 mb-5 leading-tight tracking-tight",children:i.title}),a.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-gray-500 mb-8 pb-8 border-b border-gray-100",children:[i.created_at&&a.jsx("span",{children:new Date(i.created_at).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}),a.jsxs("span",{children:[R," min read"]}),a.jsxs("span",{children:[B.toLocaleString()," words"]}),i.language_code&&i.language_code!=="en"&&a.jsx("span",{className:"uppercase",children:i.language_code})]}),i.featured_image&&a.jsx("div",{className:"mb-10 -mx-4 sm:mx-0 sm:rounded-2xl overflow-hidden",children:a.jsx("img",{src:i.featured_image,alt:i.featured_image_alt||i.title,className:"w-full h-auto object-cover",onError:F=>{F.target.style.display="none"}})}),a.jsx("div",{className:"blog-preview-content prose prose-lg max-w-none text-left",dangerouslySetInnerHTML:zV(i.content||'<p class="text-gray-400 italic">No content</p>')}),i.tags&&i.tags.length>0&&a.jsx("div",{className:"mt-8 pt-8 border-t border-gray-100 flex flex-wrap gap-2",children:i.tags.map((F,V)=>a.jsx("span",{className:"px-3 py-1 bg-gray-100 text-gray-600 text-xs rounded-full font-medium",children:F},V))}),i.meta_description&&a.jsxs("div",{className:"mt-10 pt-8 border-t border-gray-100",children:[a.jsx("p",{className:"text-xs uppercase tracking-wide text-gray-400 font-medium mb-2",children:"Meta Description"}),a.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:i.meta_description})]}),a.jsx("div",{className:"mt-10 pt-8 border-t border-gray-100",children:a.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 text-sm",children:[i.topic&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Topic"}),a.jsx("p",{className:"font-medium text-gray-700",children:i.topic.name})]}),i.keyword&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Target Keyword"}),a.jsx("p",{className:"font-medium text-gray-700",children:i.keyword.keyword})]}),i.site&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Website"}),a.jsx("p",{className:"font-medium text-gray-700",children:i.site.name||i.site.url})]}),i.category_name&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Category"}),a.jsx("p",{className:"font-medium text-gray-700",children:i.category_name})]})]})})]})]})}function nCe(){const e=Ot(),{user:n,token:i}=jr(),[s,d]=j.useState(null),[h,f]=j.useState(!0),[g,p]=j.useState(!1),[x,y]=j.useState(null),[v,w]=j.useState(""),C=!!(n&&i);j.useEffect(()=>
8509{i&&(ne.defaults.headers.common.Authorization=`Bearer ${i}`)},[i]),j.useEffect(()=>{E()},[]);const E=async()=>{try{const I=await ne.get("/wordpress/pending-connection");I.data.has_pending?d(I.data):y("No pending WordPress connection found. Please try connecting again from your WordPress site.")}catch{y("Failed to load connection data. Please try again.")}finally{f(!1)}},S=async()=>{var I,M;if(!v||v.trim().length===0){y("Please enter an author name for blog posts");return}p(!0),y(null);try{const B=await ne.post("/wordpress/process-connection",{author_name:v.trim()});B.data.success?window.location.href=B.data.redirect_url:(y(B.data.error||"Failed to process connection"),p(!1))}catch(B){y(((M=(I=B.response)==null?void 0:I.data)==null?void 0:M.error)||"Failed to process connection. Please try again."),p(!1)}},D=async()=>{try{const I=await ne.post("/wordpress/cancel-connection");I.data.redirect_url?window.location.href=I.data.redirect_url:e("/user/dashboard")}catch{e("/user/dashboard")}};return h?a.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-indigo-600 mx-auto"}),a.jsx("p",{className:"mt-4 text-gray-600",children:"Loading..."})]})}):x&&!s?a.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:a.jsxs("div",{className:"max-w-md w-full bg-white rounded-lg shadow-lg p-8 text-center",children:[a.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx("svg",{className:"w-8 h-8 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Connection Error"}),a.jsx("p",{className:"text-gray-600 mb-6",children:x}),a.jsx("button",{onClick:()=>e("/user/dashboard"),className:"px-6 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors",children:"Go to Dashboard"})]})}):C?a.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:a.jsxs("div",{className:"max-w-lg w-full bg-white rounded-lg shadow-lg overflow-hidden",children:[a.jsxs("div",{className:"bg-gradient-to-r from-indigo-600 to-purple-600 px-8 py-6 text-white",children:[a.jsxs("h1",{className:"text-2xl font-bold",children:["Connect to ",kd.appName]}),a.jsx("p",{className:"text-indigo-100 mt-1",children:"Authorize your WordPress site"})]}),a.jsxs("div",{className:"p-8",children:[a.jsx("div",{className:"bg-gray-50 rounded-lg p-4 mb-6",children:a.jsxs("div",{className:"flex items-center space-x-3",children:[a.jsx("div",{className:"w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center",children:a.jsx("svg",{className:"w-6 h-6 text-blue-600",fill:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{d:"M12 2C6.477 2 2 6.477 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10c0-5.523-4.477-10-10-10zM3.5 12c0-1.232.264-2.402.736-3.46l4.047 11.085A8.5 8.5 0 013.5 12zm8.5 8.5c-.834 0-1.64-.12-2.4-.345l2.55-7.41 2.613 7.157c.017.042.038.08.06.117-.884.31-1.833.48-2.823.48zm1.172-12.486c.512-.027.973-.08.973-.08.458-.054.404-.728-.054-.702 0 0-1.376.108-2.265.108-.835 0-2.24-.108-2.24-.108-.458-.026-.512.675-.054.702 0 0 .434.053.892.08l1.324 3.63-1.86 5.578-3.096-9.208c.512-.027.973-.08.973-.08.458-.054.404-.728-.054-.702 0 0-1.376.108-2.265.108-.16 0-.347-.004-.547-.01A8.49 8.49 0 0112 3.5c2.213 0 4.228.846 5.74 2.232-.037-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .727-.28 1.572-.647 2.748l-.848 2.833-3.071-9.14zm3.635 11.097l2.59-7.49c.484-1.21.645-2.177.645-3.038 0-.312-.02-.602-.058-.874A8.468 8.468 0 0120.5 12a8.5 8.5 0 01-6.693 8.3z"})})}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-gray-900",children:s==null?void 0:s.site_name}),a.jsx("p",{className:"text-sm text-gray-500",children:s==null?void 0:s.site_url}),(s==null?void 0:s.is_woocommerce)&&a.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-purple-100 text-purple-800 mt-1",children:"WooCommerce"})]})]})}),a.jsxs("div",{className:"mb-6",children:[a.jsx("p",{className:"text-sm text-gray-500 mb-1",children:"Connecting as:"}),a.jsx("p",{className:"font-medium text-gray-900",children:n==null?void 0:n.email})]}),a.jsxs("div",{className:"mb-6",children:[a.jsxs("label",{htmlFor:"author_name",className:"block text-sm font-medium text-gray-700 mb-2",children:["Blog Author Name ",a.jsx("span",{className:"text-red-500",children:"*"}
8509),a.jsx(Is,{content:"This name will appear as the author on all blog posts published to your WordPress site. Choose a name that represents you or your brand.",position:"top",showIcon:!0,className:"ml-2",children:a.jsx("span",{})})]}),a.jsx("input",{type:"text",id:"author_name",value:v,onChange:I=>w(I.target.value),placeholder:"e.g., John Doe, Your Company Name",className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500",required:!0}),a.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"This name will appear as the author on all blog posts published to your WordPress site."})]}),a.jsxs("div",{className:"mb-6",children:[a.jsxs("h3",{className:"text-sm font-medium text-gray-900 mb-3",children:["This will allow ",kd.appName," to:"]}),a.jsxs("ul",{className:"space-y-2",children:[a.jsxs("li",{className:"flex items-center text-sm text-gray-600",children:[a.jsx("svg",{className:"w-5 h-5 text-green-500 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Publish blog posts to your site"]}),a.jsxs("li",{className:"flex items-center text-sm text-gray-600",children:[a.jsx("svg",{className:"w-5 h-5 text-green-500 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Read your categories and pages"]}),(s==null?void 0:s.is_woocommerce)&&a.jsxs("li",{className:"flex items-center text-sm text-gray-600",children:[a.jsx("svg",{className:"w-5 h-5 text-green-500 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Access your WooCommerce products"]})]})]}),x&&a.jsx("div",{className:"mb-6 p-3 bg-red-50 border border-red-200 rounded-lg text-red-700 text-sm",children:x}),a.jsxs("div",{className:"flex space-x-3",children:[a.jsx("button",{onClick:D,disabled:g,className:"flex-1 px-4 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-colors disabled:opacity-50",children:"Cancel"}),a.jsx("button",{onClick:S,disabled:g,className:"flex-1 px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors disabled:opacity-50 flex items-center justify-center",children:g?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Connecting..."]}):"Authorize Connection"})]})]})]})}):a.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:a.jsxs("div",{className:"max-w-md w-full bg-white rounded-lg shadow-lg p-8 text-center",children:[a.jsx("div",{className:"w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx("svg",{className:"w-8 h-8 text-indigo-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}),a.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Login Required"}),a.jsx("p",{className:"text-gray-600 mb-4",children:"Please login to connect your WordPress site."}),s&&a.jsxs("div",{className:"bg-gray-50 rounded-lg p-3 mb-4 text-left",children:[a.jsx("p",{className:"text-sm text-gray-500",children:"Site to connect:"}),a.jsx("p",{className:"font-medium text-gray-900",children:s.site_name}),a.jsx("p",{className:"text-sm text-gray-500",children:s.site_url})]}),a.jsx("button",{onClick:()=>e("/login?redirect=/wordpress-connect"),className:"w-full px-6 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors",children:"Login to Continue"}),a.jsxs("p",{className:"mt-4 text-sm text-gray-500",children:["Don't have an account?"," ",a.jsx("button",{onClick:()=>e("/signup?redirect=/wordpress-connect"),className:"text-indigo-600 hover:text-indigo-700",children:"Sign up"})]})]})})}const EO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5"})}),SO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"})}),DO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"})}),TO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),IO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 14.25h13.5m-13.5 0a3 3 0 01-3-3m3 3a3 3 0 100 6h13.5a3 3 0 100-6m-16.5-3a3 3 0 013-3h13.5a3 3 0 013 3m-19.5 0a4.5 4.5 0 01.9-2.7L5.737 5.1a3.375 3.375 0 012.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 01.9 2.7m0 0a3 3 0 01-3 3m0 3h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008zm-3 6h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008z"})}),rCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0013.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 01-.75.75H9a.75.75 0 01-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 01-2.25 2.25H6.75A2.25 2.25 0 014.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 011.927-.184"})}),iCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),oCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})}),ti=({code:e,language:n="json"})=>{const[i,s]=j.useState(!1),d=()=>{navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),2e3)};return a.jsxs("div",{className:"relative group",children:[a.jsx("button",{onClick:d,className:"absolute top-2 right-2 p-2 rounded-lg bg-gray-700 hover:bg-gray-600 text-gray-300 opacity-0 group-hover:opacity-100 transition-opacity",title:"Copy to clipboard",children:i?a.jsx(iCe,{className:"w-4 h-4 text-green-400"}):a.jsx(rCe,{className:"w-4 h-4"})}),a.jsx("pre",{className:"bg-gray-900 rounded-lg p-4 overflow-x-auto text-sm",children:a.jsx("code",{className:`language-${n} text-gray-100`,children:e})})]})},Gc=({method:e,path:n,description:i,request:s,response:d,children:h})=>{const[f,g]=j.useState(!1),p={GET:"bg-green-100 text-green-800",POST:"bg-blue-100 text-blue-800",PUT:"bg-yellow-100 text-yellow-800",DELETE:"bg-red-100 text-red-800"};return a.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden mb-4",children:[a.jsxs("button",{onClick:()=>g(!f),className:"w-full flex items-center justify-between p-4 bg-gray-50 hover:bg-gray-100 transition-colors",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("span",{className:`px-2 py-1 rounded text-xs font-bold ${p[e]}`,children:e}),a.jsx("code",{className:"text-sm font-mono text-gray-900",children:n})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("span",{className:"text-sm text-gray-600",children:i}),a.jsx(oCe,{className:`w-5 h-5 text-gray-400 transition-transform ${f?"rotate-180":""}`})]})]}),f&&a.jsxs("div",{className:"p-4 border-t border-gray-200 space-y-4",children:[h,s&&a.jsxs("div",{children:[a.jsx("h5",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Request Body"}),a.jsx(ti,{code:JSON.stringify(s,null,2)})]}),d&&a.jsxs("div",{children:[a.jsx("h5",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Response"}),a.jsx(ti,{code:JSON.stringify(d,null,2)})]})]})]})},oh=({id:e,title:n,icon:i,children:s})=>a.jsxs("section",{id:e,className:"mb-12 scroll-mt-8",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary-100 flex items-center justify-center",children:a.jsx(i,{className:"w-5 h-5 text-primary-600"})}),a.jsx("h2",{className:"text-2xl font-bold text-gray-900",children:n})]}),s]});function sCe(){const[e,n]=j.useState("getting-started"),i=[{id:"getting-started",label:"Getting Started",icon:TO},{id:"webhooks",label:"Receiving Blogs (Webhooks)",icon:DO},{id:"authentication",label:"Authentication",icon:SO},{id:"endpoints",label:"API Endpoints",icon:IO},{id:"examples",label:"Code Examples",icon:EO}],s=window.location.origin+"/api/v1/integration";return a.jsxs("div",{className:"min-h-screen bg-gray-50",children:[a.jsx("header",{className:"bg-white border-b border-gray-200 sticky top-0 z-50",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex items-center justify-between h-16",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center",children:a.jsx("span",{className:"text-white font-bold text-sm",children:"BB"})}),a.jsx("h1",{className:"text-xl font-bold text-gray-900",children:"BlogBotz API Documentation"})]}),a.jsx("a",{href:"/dashboard",className:"text-sm text-primary-600 hover:text-primary-700 font-medium",children:"Back to Dashboard"})]})})}),a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:a.jsxs("div",{className:"flex gap-8",children:[a.jsx("nav",{className:"hidden lg:block w-64 flex-shrink-0",children:a.jsx("div",{className:"sticky top-24 space-y-1",children:i.map(d=>a.jsxs("a",{href:`#${d.id}`,onClick:()=>n(d.id),className:`flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-colors ${e===d.id?"bg-primary-100 text-primary-700":"text-gray-600 hover:bg-gray-100"}`,children:[a.jsx(d.icon,{className:"w-5 h-5"}),d.label]},d.id))})}),a.jsxs("main",{className:"flex-1 min-w-0",children:[a.jsx(oh,{id:"getting-started",title:"Getting Started",icon:TO,children:a.jsxs("div",{className:"prose prose-gray max-w-none",children:[a.jsx("p",{className:"text-lg text-gray-600 mb-6",children:"Connect BlogBotz to any website or platform to re
8509ceive AI-generated blog posts automatically. BlogBotz handles everything â content generation, scheduling, and delivery. You just need to set up a webhook endpoint to receive and publish the blogs on your site."}),a.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4 mb-6",children:[a.jsx("h4",{className:"font-semibold text-green-800 mb-2",children:"How It Works"}),a.jsx("p",{className:"text-sm text-green-700",children:"BlogBotz generates blogs automatically based on your topics and keywords. When a blog is ready, BlogBotz sends it to your webhook URL with the full content, images, and metadata. Your site just needs to receive the webhook and publish the post â no polling required."})]}),a.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-6",children:[a.jsx("h4",{className:"font-semibold text-blue-800 mb-2",children:"Base URL"}),a.jsx("code",{className:"text-sm bg-blue-100 px-2 py-1 rounded",children:s})]}),a.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Quick Start (Recommended: Webhook Integration)"}),a.jsxs("ol",{className:"space-y-3 text-gray-600",children:[a.jsxs("li",{className:"flex gap-3",children:[a.jsx("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary-100 text-primary-700 flex items-center justify-center text-sm font-medium",children:"1"}),a.jsxs("span",{children:["Add your website in the ",a.jsx("a",{href:"/user/sites/add",className:"text-primary-600 hover:underline font-medium",children:"BlogBotz dashboard"}),", then go to ",a.jsx("a",{href:"/user/integrations",className:"text-primary-600 hover:underline font-medium",children:"Integrations"})," to generate your API Key, API Secret, and Webhook Secret"]})]}),a.jsxs("li",{className:"flex gap-3",children:[a.jsx("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary-100 text-primary-700 flex items-center justify-center text-sm font-medium",children:"2"}),a.jsxs("span",{children:["Create a webhook endpoint on your site (e.g., ",a.jsx("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"https://yoursite.com/webhooks/blogbotz"}),")"]})]}),a.jsxs("li",{className:"flex gap-3",children:[a.jsx("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary-100 text-primary-700 flex items-center justify-center text-sm font-medium",children:"3"}),a.jsx("span",{children:"Configure the webhook URL in BlogBotz settings or via the API"})]}),a.jsxs("li",{className:"flex gap-3",children:[a.jsx("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary-100 text-primary-700 flex items-center justify-center text-sm font-medium",children:"4"}),a.jsx("span",{children:"BlogBotz sends blogs to your webhook â your endpoint publishes them and confirms back"})]})]}),a.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 mt-6",children:[a.jsx("h4",{className:"font-semibold text-gray-800 mb-2",children:"REST API (Optional)"}),a.jsx("p",{className:"text-sm text-gray-600",children:"The full REST API is available if you want to programmatically manage topics, keywords, or blogs. However, most integrations only need the webhook â everything else can be managed from the BlogBotz dashboard."})]})]})}),a.jsx(oh,{id:"webhooks",title:"Receiving Blogs (Webhooks)",icon:DO,children:a.jsxs("div",{className:"space-y-6",children:[a.jsx("p",{className:"text-gray-600",children:"BlogBotz automatically generates and sends blog posts to your website via webhooks. You just need to create a single webhook endpoint on your site to receive the content. Everything else â topics, keywords, scheduling, and generation â is managed from the BlogBotz dashboard."}),a.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[a.jsx("h4",{className:"font-semibold text-green-800 mb-2",children:"The Flow"}),a.jsxs("ol",{className:"text-sm text-green-700 space-y-1 list-decimal list-inside",children:[a.jsx("li",{children:"BlogBotz generates a blog post based on your topics and keywords"}),a.jsxs("li",{children:["When the blog is published (auto-publish or manual click from dashboard), BlogBotz sends a ",a.jsx("code",{className:"bg-green-100 px-1 rounded",children:"blog.published"})," event to your webhook URL"]}),a.jsx("li",{children:"Your webhook endpoint receives the full blog content (HTML, images, meta, tags)"}),a.jsxs("li",{children:["Your endpoint creates the post and returns ",a.jsx("code",{className:"bg-green-100 px-1 rounded",children:'{"post_id": "...", "post_url": "..."}'})," â BlogBotz automatically marks it as published"]})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-gray-900 mb-3",children:"Available Events"}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[a.jsx("thead",{className:"bg-gray-50",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Event"}),a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Description"})]})}),a.jsxs("tbody",{className:"bg-white divide-y divide-gray-200",children:[a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"blog.generated"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"New blog generated and ready for review"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"blog.approved"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"Blog approved and ready to publish"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"blog.published"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"Blog confirmed as published"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"blog.rejected"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"Blog was rejected"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"topic.created"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"New topic created"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"keyword.discovered"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"New keywords discovered"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"credits.low"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"Credits running low (<10)"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"credits.depleted"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"No credits remaining"})]})]})]})})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-gray-900 mb-3",children:"Webhook Payload: blog.published (Primary Event)"}),a.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"This is the main event you need to handle. When a blog is published (either auto-publish or manual click), BlogBotz sends the full blog content to your webhook URL. Your endpoint should create the post and return a response."}),a.jsx(ti,{code:`{ 8510 "event": "blog.published", 8511 "timestamp": "2024-12-24T10:30:00Z", 8512 "data": { 8513 "blog_id": 123, 8514 "blogbotz_id": 123, 8515 "title": "10 SEO Tips for 2024", 8516 "slug": "10-seo-tips-2024", 8517 "content": "<p>Full HTML content ready to publish...</p>", 8518 "excerpt": "Learn the top SEO strategies...", 8519 "status": "publish", 8520 "featured_image": "https://s3.../image.png", 8521 "featured_image_alt": "SEO tips illustration", 8522 "tags": ["SEO", "Marketing"], 8523 "meta_title": "10 SEO Tips for 2024", 8524 "meta_description": "Learn the top SEO strategies..." 8525 } 8526}`}),a.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4 mt-3",children:[a.jsx("h5",{className:"font-semibold text-green-800 mb-1",children:"Expected Response"}),a.jsx("p",{className:"text-sm text-green-700 mb-2",children:"Your endpoint should return a JSON response with the published post details so BlogBotz can track it:"}),a.jsx(ti,{code:`{ 8527 "post_id": "456", 8528 "post_url": "https://yoursite.com/blog/10-seo-tips-2024" 8529}`})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-gray-900 mb-3",children:"Webhook Payload: Notification
8529Events"}),a.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"For notification events (blog.generated, blog.approved, blog.rejected, etc.), BlogBotz sends a different payload with metadata about the blog. These are informational â you don't need to create posts from these."}),a.jsx(ti,{code:`{ 8530 "event": "blog.approved", 8531 "timestamp": "2024-12-24T10:30:00Z", 8532 "data": { 8533 "blog_id": 123, 8534 "site_id": 45, 8535 "title": "10 SEO Tips for 2024", 8536 "slug": "10-seo-tips-2024", 8537 "content": "<p>Full HTML content...</p>", 8538 "featured_image": "https://s3.../image.png", 8539 "featured_image_alt": "SEO tips illustration", 8540 "meta_description": "Learn the top SEO strategies...", 8541 "tags": ["SEO", "Marketing"], 8542 "topic": { 8543 "id": 12, 8544 "name": "Digital Marketing" 8545 }, 8546 "keyword": { 8547 "id": 56, 8548 "keyword": "SEO tips 2024" 8549 }, 8550 "seo_score": 85, 8551 "seo_grade": "A", 8552 "language_code": "en", 8553 "status": "approved", 8554 "created_at": "2024-12-20T14:00:00Z" 8555 } 8556}`})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-gray-900 mb-3",children:"Webhook Headers"}),a.jsx(ti,{code:`X-BlogBotz-Signature: hmac_sha256_signature 8557X-BlogBotz-Event: blog.approved 8558X-BlogBotz-Timestamp: 2024-12-24T10:30:00Z 8559Content-Type: application/json`,language:"text"})]}),a.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[a.jsx("h4",{className:"font-semibold text-blue-800 mb-2",children:"Signature Verification"}),a.jsx("p",{className:"text-sm text-blue-700 mb-3",children:"Verify webhook signatures to ensure requests come from BlogBotz. The signature is an HMAC-SHA256 hash of the request body using your webhook secret."}),a.jsx(ti,{code:`$signature = hash_hmac('sha256', $requestBody, $webhookSecret); 8560$isValid = hash_equals($signature, $receivedSignature);`,language:"php"})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-gray-900 mb-3",children:"Retry Behavior"}),a.jsxs("p",{className:"text-sm text-gray-600 mb-3",children:["If your webhook endpoint returns a non-2xx status code or is unreachable, BlogBotz will automatically retry delivery with exponential backoff. Up to ",a.jsx("strong",{children:"5 attempts"})," total:"]}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[a.jsx("thead",{className:"bg-gray-50",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Attempt"}),a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Retry After"})]})}),a.jsxs("tbody",{className:"bg-white divide-y divide-gray-200",children:[a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm text-gray-900",children:"1st retry"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"1 minute"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm text-gray-900",children:"2nd retry"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"5 minutes"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm text-gray-900",children:"3rd retry"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"15 minutes"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm text-gray-900",children:"4th retry"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"1 hour"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm text-gray-900",children:"5th (final)"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"4 hours"})]})]})]})}),a.jsxs("p",{className:"text-sm text-gray-500 mt-2",children:["After 5 failed attempts, the webhook is marked as failed. You can manually retry from the BlogBotz dashboard. Your endpoint should return a ",a.jsx("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"200"})," status code to acknowledge receipt."]})]}),a.jsxs("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:[a.jsx("h4",{className:"font-semibold text-yellow-800 mb
8560-2",children:"Your Endpoint Requirements"}),a.jsxs("ul",{className:"text-sm text-yellow-700 space-y-1",children:[a.jsxs("li",{children:["Must accept ",a.jsx("code",{className:"bg-yellow-100 px-1 rounded",children:"POST"})," requests with ",a.jsx("code",{className:"bg-yellow-100 px-1 rounded",children:"Content-Type: application/json"})]}),a.jsxs("li",{children:["Must return a ",a.jsx("code",{className:"bg-yellow-100 px-1 rounded",children:"2xx"})," status code within ",a.jsx("strong",{children:"30 seconds"})]}),a.jsxs("li",{children:["Should verify the ",a.jsx("code",{className:"bg-yellow-100 px-1 rounded",children:"X-BlogBotz-Signature"})," header before processing"]}),a.jsx("li",{children:"Should be idempotent â the same webhook may be delivered more than once during retries"})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-gray-900 mb-3",children:"Confirming Publication (Callback)"}),a.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"After your site publishes the blog, call back to BlogBotz to confirm it was published. This updates the blog status in BlogBotz and prevents duplicate publishing."}),a.jsx(Gc,{method:"POST",path:"/blogs/{id}/confirm-publish",description:"Confirm blog was published on your site",request:{external_url:"https://yoursite.com/blog/10-seo-tips",external_id:"123",published_at:"2024-12-24T10:30:00Z"},response:{success:!0,message:"Blog marked as published",data:{blog_id:123,status:"published",external_url:"https://yoursite.com/blog/10-seo-tips",published_at:"2024-12-24T10:30:00Z"}}}),a.jsx(Gc,{method:"POST",path:"/blogs/{id}/publish-failed",description:"Report that publishing failed",request:{error_message:"Database connection error"},response:{success:!0,message:"Publish failure recorded",data:{blog_id:123,status:"approved"}}})]})]})}),a.jsx(oh,{id:"authentication",title:"Authentication",icon:SO,children:a.jsxs("div",{className:"space-y-6",children:[a.jsx("p",{className:"text-gray-600",children:"To confirm blog publications back to BlogBotz, your webhook handler needs to make authenticated API calls. BlogBotz uses a three-key system:"}),a.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[a.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[a.jsx("h4",{className:"font-semibold text-blue-800 mb-2",children:"API Key"}),a.jsx("p",{className:"text-sm text-blue-700 mb-2",children:a.jsx("code",{className:"bg-blue-100 px-1.5 py-0.5 rounded text-xs",children:"bbk_..."})}),a.jsxs("p",{className:"text-sm text-blue-700",children:["Sent in the ",a.jsx("code",{className:"bg-blue-100 px-1 rounded",children:"X-Api-Key"})," header for all API requests."]})]}),a.jsxs("div",{className:"bg-purple-50 border border-purple-200 rounded-lg p-4",children:[a.jsx("h4",{className:"font-semibold text-purple-800 mb-2",children:"API Secret"}),a.jsx("p",{className:"text-sm text-purple-700 mb-2",children:a.jsx("code",{className:"bg-purple-100 px-1.5 py-0.5 rounded text-xs",children:"bbs_..."})}),a.jsx("p",{className:"text-sm text-purple-700",children:"Used to generate HMAC-SHA256 signatures for the confirm-publish callback. Never expose in client-side code."})]}),a.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[a.jsx("h4",{className:"font-semibold text-green-800 mb-2",children:"Webhook Secret"}),a.jsx("p",{className:"text-sm text-green-700 mb-2",children:a.jsx("code",{className:"bg-green-100 px-1.5 py-0.5 rounded text-xs",children:"bbw_..."})}),a.jsx("p",{className:"text-sm text-green-700",children:"Used to verify incoming webhooks from BlogBotz are authentic (not from a third party)."})]})]}),a.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("h4",{className:"font-semibold text-gray-900 mb-3",children:"Generating HMAC Signature for Callbacks"}),a.jsxs("p",{className:"text-sm text-gray-600 mb-2",children:["When calling the confirm-publish endpoint, include an HMAC signature. Payload format: ",a.jsx("code",{className:"bg-gray-200 px-1 rounded text-xs",children:"UPPERCASE_METHOD + full_path + json_body + timestamp"})]}),a.jsx(ti,{code:`// PHP 8561$timestamp = time(); 8562$body = json_encode(['external_url' => $url, 'external_id' => $postId, 'published_at' => date('c')]); 8563 8564// IMPORTANT: Use the full request path (without leading slash), not relative endpoint 8565$fullPath = 'api/v1/integration/blogs/' . $blogId . '/confirm-publish'; 8566$payload = 'POST' . $fullPath . $body . $timestamp; 8567$signature = hash_hmac('sha256', $payload, $apiSecret); 8568 8569// Headers to send: 8570// X-Api-Key: bbk_your_api_key 8571// X-Signature: $signature 8572// X-Timestamp: $timestamp`,language:"php"})]}),a.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:[a.jsx("h4",{className:"font-semibold text-red-800 mb
8572-2",children:"Important: Endpoint Path in Signature"}),a.jsxs("p",{className:"text-sm text-red-700",children:["The signature payload must use the ",a.jsx("strong",{children:"full request path without leading slash"})," (e.g., ",a.jsx("code",{className:"bg-red-100 px-1 rounded",children:"api/v1/integration/blogs/123/confirm-publish"}),"), not the relative endpoint path. This is the same path your HTTP client sends to the server. For GET requests with no body, the body portion becomes ",a.jsx("code",{className:"bg-red-100 px-1 rounded",children:"[]"})," (empty JSON array)."]})]})]})}),a.jsx(oh,{id:"endpoints",title:"API Endpoints (Optional)",icon:IO,children:a.jsxs("div",{className:"space-y-6",children:[a.jsx("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 mb-4",children:a.jsx("p",{className:"text-sm text-gray-600",children:"These endpoints are optional. Everything is managed from the BlogBotz dashboard. Use these only if you want to programmatically read your site data or stats."})}),a.jsx(Gc,{method:"GET",path:"/site",description:"Get your site details",response:{success:!0,data:{site:{id:1,name:"My Website",url:"https://example.com",platform_type:"custom",integration_type:"api",is_active:!0,detected_language:"en",primary_language:"en",brand_voice:"Professional and friendly",contact_info:null,created_at:"2024-12-24T10:30:00Z"}}}}),a.jsx(Gc,{method:"GET",path:"/site/stats",description:"Get site statistics",response:{success:!0,data:{topics:{total:5,active:4},keywords:{total:150,available:120},blogs:{total:45,draft:2,pending:3,approved:5,published:35,rejected:0},this_month:{generated:12,published:10}}}}),a.jsx(Gc,{method:"GET",path:"/blogs",description:"List your blogs",children:a.jsxs("div",{className:"mb-4",children:[a.jsx("h5",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Query Parameters"}),a.jsx("table",{className:"min-w-full text-sm",children:a.jsxs("tbody",{children:[a.jsxs("tr",{className:"border-b",children:[a.jsx("td",{className:"py-2 pr-4 font-mono text-gray-900",children:"status"}),a.jsx("td",{className:"py-2 text-gray-600",children:"Filter by status (draft, pending, approved, published, rejected)"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"py-2 pr-4 font-mono text-gray-900",children:"per_page"}),a.jsx("td",{className:"py-2 text-gray-600",children:"Results per page, max 100 (default: 20)"})]})]})})]})}),a.jsx(Gc,{method:"GET",path:"/blogs/{id}",description:"Get a specific blog",response:{success:!0,data:{blog:{id:123,title:"10 SEO Tips for 2024",slug:"10-seo-tips-2024",content:"<p>Full HTML content...</p>",featured_image:"https://...",meta_description:"Learn the top SEO strategies...",status:"published",seo_score:85}}}})]})}),a.jsx(oh,{id:"examples",title:"Code Examples",icon:EO,children:a.jsxs("div",{className:"space-y-8",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Laravel Integration"}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("h5",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Configuration (config/blogbotz.php)"}),a.jsx(ti,{code:`<?php 8573 8574return [ 8575 'api_key' => env('BLOGBOTZ_API_KEY'), 8576 'api_secret' => env('BLOGBOTZ_API_SECRET'), 8577 'base_url' => env('BLOGBOTZ_URL', 'https://blogbotz.com/api/v1/integration'), 8578 'webhook_secret' => env('BLOGBOTZ_WEBHOOK_SECRET'), 8579];`,language:"php"})]}),a.jsxs("div",{children:[a.jsx("h5",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Service Class (app/Services/BlogBotzService.php)"}),a.jsx(ti,{code:`<?php 8580 8581namespace App\\Services; 8582 8583use Illuminate\\Support\\Facades\\Http; 8584 8585class BlogBotzService 8586{ 8587 protected string $baseUrl; 8588 protected string $apiKey; 8589 protected string $apiSecret; 8590 8591 public function __construct() 8592 { 8593 $this->baseUrl = config('blogbotz.base_url'); 8594 $this->apiKey = config('blogbotz.api_key'); 8595 $this->apiSecret = config('blogbotz.api_secret'); 8596 } 8597 8598 public function getBlogs(array $filters = []) 8599 { 8600 return $this->request('GET', '/blogs', $filters); 8601 } 8602 8603 public function getBlog(int $id) 8604 { 8605 return $this->request('GET', "/blogs/{$id}"); 8606 } 8607 8608 public function fetchBlogForPublishing(int $id) 8609 { 8610 return $this->request('POST', "/blogs/{$id}/fetch"); 8611 } 8612
8613 public function confirmPublished(int $blogId, string $url, string $externalId) 8614 { 8615 return $this->request('POST', "/blogs/{$blogId}/confirm-publish", [ 8616 'external_url' => $url, 8617 'external_id' => $externalId, 8618 'published_at' => now()->toIso8601String(), 8619 ]); 8620 } 8621 8622 protected function request(string $method, string $endpoint, array $data = []) 8623 { 8624 $timestamp = time(); 8625 $body = json_encode($data); // Always json_encode, even if empty (produces "[]") 8626 8627 // The signature uses the full URL path (without leading slash) 8628 // e.g., "api/v1/integration/blogs/123/confirm-publish" 8629 $fullPath = ltrim(parse_url($this->baseUrl . $endpoint, PHP_URL_PATH), '/'); 8630 8631 // Generate HMAC signature: METHOD + FULL_PATH + BODY + TIMESTAMP 8632 $payload = strtoupper($method) . $fullPath . $body . $timestamp; 8633 $signature = hash_hmac('sha256', $payload, $this->apiSecret); 8634 8635 $headers = [ 8636 'X-Api-Key' => $this->apiKey, 8637 'X-Timestamp' => $timestamp, 8638 'X-Signature' => $signature, 8639 'Content-Type' => 'application/json', 8640 ]; 8641 8642 $response = Http::withHeaders($headers)->$method($this->baseUrl . $endpoint, $data); 8643 8644 return $response->json(); 8645 } 8646}`,language:"php"})]}),a.jsxs("div",{children:[a.jsx("h5",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Webhook Controller (app/Http/Controllers/BlogBotzWebhookController.php)"}),a.jsx(ti,{code:`<?php 8647 8648namespace App\\Http\\Controllers; 8649 8650use Illuminate\\Http\\Request; 8651use App\\Models\\Post; 8652use App\\Services\\BlogBotzService; 8653 8654class BlogBotzWebhookController extends Controller 8655{ 8656 public function handle(Request $request, BlogBotzService $blogBotz) 8657 { 8658 // Verify signature 8659 $signature = $request->header('X-BlogBotz-Signature'); 8660 $payload = $request->getContent(); 8661 $expected = hash_hmac('sha256', $payload, config('blogbotz.webhook_secret')); 8662 8663 if (!hash_equals($expected, $signature)) { 8664 abort(401, 'Invalid signature'); 8665 } 8666 8667 $event = $request->input('event'); 8668 $data = $request->input('data'); 8669 8670 match($event) { 8671 'blog.published' => $this->handleBlogPublished($data), 8672 'blog.generated' => $this->notifyAdmins($data), 8673 'credits.low' => $this->sendCreditsAlert($data), 8674 default => null, 8675 }; 8676 8677 return response()->json(['received' => true]); 8678 } 8679 8680 protected function handleBlogPublished(array $data) 8681 { 8682 // Create post in your CMS 8683 $post = Post::create([ 8684 'title' => $data['title'], 8685 'slug' => $data['slug'], 8686 'content' => $data['content'], 8687 'featured_image' => $data['featured_image'], 8688 'meta_description' => $data['meta_description'], 8689 'blogbotz_id' => $data['blog_id'], 8690 'status' => 'published', 8691 ]); 8692 8693 // Return post_id and post_url so BlogBotz tracks it 8694 // (BlogBotz reads this from the webhook response automatically) 8695 return response()->json([ 8696 'post_id' => $post->id, 8697 'post_url' => route('posts.show', $post), 8698 ]); 8699 } 8700}`,language:"php"})]})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Node.js Integration"}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("h5",{className:"text-sm font-semibold text-gray-700 mb-2",children:"BlogBotz Client (blogbotz.js)"}),a.jsx(ti,{code:`const crypto = require('crypto'); 8701const axios = require('axios'); 8702 8703class BlogBotz { 8704 constructor(apiKey, apiSecret, baseUrl = 'https://blogbotz.com/api/v1/integration') { 8705 this.apiKey = apiKey; 8706 this.apiSecret = apiSecret; 8707 this.baseUrl = baseUrl; 8708 } 8709 8710 // Generate HMAC signature: METHOD + FULL_PATH + BODY + TIMESTAMP 8711 generateSignature(method, fullPath, body = '[]') { 8712 const timestamp = Math.floor(Date.now() / 1000); 8713 const payload = method.toUpperCase() + fullPath + body + timestamp; 8714 const signature = crypto.createHmac('sha256', this.apiSecret).update(payload).digest('hex'); 8715 return { timestamp, signature }; 8716 } 8717 8718 async request(method, endpoint, data = null) { 8719 const body = data ? JSON.stringify(data) : JSON.stringify([]); 8720 // Use the full URL path (without leading slash) for signature 8721 const url = new URL(this.baseUrl + endpoint); 8722 const fullPath = url.pathname.replace(/^\\//, ''); 8723 const { timestamp, signature } = this.generateSignature(method, fullPath, body); 8724 8725 const response = await axios({ 8726 method, 8727 url: this.baseUrl + endpoint, 8728 data: data, 8729 headers: { 8730 'X-Api-Key': this.apiKey, 8731 'X-Timestamp': timestamp, 8732 'X-Signature': signature, 8733 'Content-Type': 'application/json', 8734 }, 8735 }); 8736 return response.data; 8737 } 8738 8739 async getBlogs(filters = {}) { 8740 const queryString = new URLSearchParams(filters).toString(); 8741 const endpoint = '/blogs' + (queryString ? '?' + queryString : ''); 8742 return this.request('GET', endpoint); 8743 } 8744 8745 async getBlog(id) { 8746 return this.request('GET', \`/blogs/\${id}\`); 8747 } 8748 8749 async fetchBlogForPublishing(id) { 8750 return this.request('POST', \`/blogs/\${id}/fetch\`); 8751 } 8752 8753 async confirmPublished(blogId, externalUrl, externalId) { 8754 return this.request('POST', \`/blogs/\${blogId}/confirm-publish\`, { 8755 external_url: externalUrl, 8756 external_id: externalId, 8757 published_at: new Date().toISOString(), 8758 }); 8759 } 8760 8761 // Webhook Secret - Verify incoming webhooks from BlogBotz 8762 static verifyWebhook(payload, signature, webhookSecret) { 8763 const expected = crypto.createHmac('sha256', webhookSecret).update(payload).digest('hex'); 8764 return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signature)); 8765 } 8766} 8767 8768module.exports = BlogBotz;`,language:"javascript"})]}),a.jsxs("div",{children:[a.jsx("h5",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Express Webhook Handler"}),a.jsx(ti,{code:`const express = require('express'); 8769const BlogBotz = require('./blogbotz'); 8770const Post = require('./models/post'); 8771 8772const router = express.Router(); 8773// API Key + API Secret for making API calls 8774const blogBotz = new BlogBotz( 8775 process.env.BLOGBOTZ_API_KEY, 8776 process.env.BLOGBOTZ_API_SECRET 8777); 8778 8779router.post('/webhooks/blogbotz', express.raw({ type: 'application/json' }), async (req, res) => { 8780 const signature = req.headers['x-blogbotz-signature']; 8781 const payload = req.body.toString(); 8782
8783 // Verify signature using Webhook Secret (different from API Secret!) 8784 if (!BlogBotz.verifyWebhook(payload, signature, process.env.BLOGBOTZ_WEBHOOK_SECRET)) { 8785 return res.status(401).json({ error: 'Invalid signature' }); 8786 } 8787 8788 const { event, data } = JSON.parse(payload); 8789 8790 try { 8791 switch (event) { 8792 case 'blog.published': 8793 // Create post in your database 8794 const post = await Post.create({ 8795 title: data.title, 8796 slug: data.slug, 8797 content: data.content, 8798 featuredImage: data.featured_image, 8799 metaDescription: data.meta_description, 8800 blogbotzId: data.blog_id, 8801 }); 8802 8803 // Return post_id and post_url â BlogBotz tracks it automatically 8804 return res.json({ 8805 received: true, 8806 post_id: post.id, 8807 post_url: \`https://yoursite.com/blog/\${post.slug}\`, 8808 }); 8809 break; 8810 8811 case 'credits.low': 8812 console.warn('BlogBotz credits running low!', data); 8813 break; 8814 } 8815 8816 res.json({ received: true }); 8817 } catch (error) { 8818 console.error('Webhook error:', error); 8819 res.status(500).json({ error: 'Webhook processing failed' }); 8820 } 8821}); 8822 8823module.exports = router;`,language:"javascript"})]})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Generic PHP Integration"}),a.jsx(ti,{code:`<?php 8824 8825class BlogBotzAPI { 8826 private string $apiKey; 8827 private string $apiSecret; 8828 private string $baseUrl; 8829 8830 public function __construct(string $apiKey, string $apiSecret, string $baseUrl = 'https://blogbotz.com/api/v1/integration') { 8831 $this->apiKey = $apiKey; 8832 $this->apiSecret = $apiSecret; 8833 $this->baseUrl = $baseUrl; 8834 } 8835 8836 public function getBlogs(array $filters = []): array { 8837 return $this->request('GET', '/blogs', $filters); 8838 } 8839 8840 public function fetchBlog(int $id): array { 8841 return $this->request('POST', "/blogs/{$id}/fetch"); 8842 } 8843
8844 public function confirmPublished(int $blogId, string $url, string $externalId): array { 8845 return $this->request('POST', "/blogs/{$blogId}/confirm-publish", [ 8846 'external_url' => $url, 8847 'external_id' => $externalId, 8848 'published_at' => date('c'), 8849 ]); 8850 } 8851 8852 private function request(string $method, string $endpoint, array $data = []): array { 8853 $url = $this->baseUrl . $endpoint; 8854 $body = json_encode($data); // Always json_encode (empty array produces "[]") 8855 $timestamp = time(); 8856 8857 // Use full URL path (without leading slash) for signature 8858 $fullPath = ltrim(parse_url($url, PHP_URL_PATH), '/'); 8859 8860 // Generate HMAC signature: METHOD + FULL_PATH + BODY + TIMESTAMP 8861 $payload = strtoupper($method) . $fullPath . $body . $timestamp; 8862 $signature = hash_hmac('sha256', $payload, $this->apiSecret); 8863 8864 $headers = [ 8865 'X-Api-Key: ' . $this->apiKey, 8866 'X-Timestamp: ' . $timestamp, 8867 'X-Signature: ' . $signature, 8868 'Content-Type: application/json', 8869 ]; 8870 8871 $ch = curl_init(); 8872 curl_setopt($ch, CURLOPT_URL, $method === 'GET' && $data ? $url . '?' . http_build_query($data) : $url); 8873 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 8874 curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 8875 curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); 8876 8877 if ($body) { 8878 curl_setopt($ch, CURLOPT_POSTFIELDS, $body); 8879 } 8880 8881 $response = curl_exec($ch); 8882 curl_close($ch); 8883 8884 return json_decode($response, true); 8885 } 8886 8887 // Webhook Secret - Verify incoming webhooks from BlogBotz 8888 public static function verifyWebhookSignature(string $payload, string $signature, string $webhookSecret): bool { 8889 $expected = hash_hmac('sha256', $payload, $webhookSecret); 8890 return hash_equals($expected, $signature); 8891 } 8892} 8893 8894// Usage - Initialize with API Key and API Secret 8895$blogBotz = new BlogBotzAPI( 8896 $_ENV['BLOGBOTZ_API_KEY'], 8897 $_ENV['BLOGBOTZ_API_SECRET'] 8898); 8899 8900// Get approved blogs 8901$blogs = $blogBotz->getBlogs(['status' => 'approved']); 8902 8903foreach ($blogs['data']['blogs'] as $blog) { 8904 // Fetch full blog content 8905 $fullBlog = $blogBotz->fetchBlog($blog['id']); 8906 8907 // Create in your CMS... 8908 $postId = create_post($fullBlog['data']['blog']); 8909 8910 // Confirm published 8911 $blogBotz->confirmPublished( 8912 $blog['id'], 8913 'https://yoursite.com/blog/' . $fullBlog['data']['blog']['slug'], 8914 $postId 8915 ); 8916} 8917 8918// Webhook handler example - uses Webhook Secret (not API Secret!) 8919$webhookPayload = file_get_contents('php://input'); 8920$receivedSignature = $_SERVER['HTTP_X_BLOGBOTZ_SIGNATURE'] ?? ''; 8921$webhookSecret = $_ENV['BLOGBOTZ_WEBHOOK_SECRET']; 8922 8923if (BlogBotzAPI::verifyWebhookSignature($webhookPayload, $receivedSignature, $webhookSecret)) { 8924 $data = json_decode($webhookPayload, true); 8925 $event = $data['event'] ?? ''; 8926 $blogData = $data['data'] ?? []; 8927 8928 if ($event === 'blog.published') { 8929 // Create post in your CMS 8930 $postId = create_post($blogData); 8931 $postUrl = 'https://yoursite.com/blog/' . $blogData['slug']; 8932 8933 // Return post_id and post_url so BlogBotz can track it 8934 header('Content-Type: application/json'); 8935 echo json_encode(['post_id' => $postId, 'post_url' => $postUrl]); 8936 exit; 8937 } 8938}`,language:"php"})]})]})}),a.jsxs("div",{className:"mb-12",children:[a.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-6",children:"Error Codes"}),a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[a.jsx("thead",{className:"bg-gray-50",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Code"}),a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"HTTP Status"}),a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Description"})]})}),a.jsxs("tbody",{className:"bg-white divide-y divide-gray-200",children:[a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"UNAUTHORIZED"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"401"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"Invalid or missing API key"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"FORBIDDEN"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"403"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"IP not whitelisted or access denied"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"NOT_FOUND"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"404"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"Resource not found"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"VALIDATION_ERROR"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"422"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"Request validation failed"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"RATE_LIMITED"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"429"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"Too many requests"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"INSUFFICIENT_CREDITS"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"402"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"No credits available for generation"})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"px-4 py-3 text-sm font-mono text-gray-900",children:"SERVER_ERROR"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"500"}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-600",children:"Internal server error"})]})]})]})})]}),a.jsxs("div",{className:"border-t border-gray-200 pt-8 text-center text-gray-500 text-sm",children:[a.jsx("p",{children:"Need help? Contact us at [email protected]"}),a.jsx("p",{className:"mt-2",children:"API Version 1.0 | Last updated: March 2026"})]})]})]})})]})}const aCe=()=>a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0013.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 01-.75.75H9.75a.75.75 0 01-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 01-2.25 2.25H6.75A2.25 2.25 0 014.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 011.927-.184"})}),YV=()=>a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),lCe=()=>a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"})}),cCe=()=>a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})});function MO(e){if(!e)return"other";const n=e.toLowerCase();return n.includes("wordpress")||n==="woocommerce"?"wordpress":n.includes("opencart")?"opencart":n.includes("shopify")?"shopify":"other"}const dCe=[{key:"wordpress",label:"WordPress",color:"blue"},{key:"opencart",label:"OpenCart",color:"orange"},{key:"shopify",label:"Shopify",color:"green"},{key:"other",label:"Other",color:"purple"}];function uCe(){const e=Ot(),{activeSiteId:n,getActiveSite:i,setSites:s}=ui(),d=i(),h=MO((d==null?void 0:d.platform_type)||(d==null?void 0:d.platform)),[f,g]=j.useState(h);j.useEffect(()=>{g(MO((d==null?void 0:d.platform_type)||(d==null?void 0:d.platform)))},[n,d==null?void 0:d.platform_type]);const[p,x]=j.useState(!1),[y,v]=j.useState({}),[w,C]=j.useState(!1),[E,S]=j.useState(null);j.useEffect(()=>{ne.get("/help").then(M=>{var R;const B=((R=M.data)==null?void 0:R.data)||M.data||{};v(B.pluginLinks||{})}).catch(()=>{})},[]);const D=async()=>{var M,B;if(n){C(!0),S(null);try{const R=await ne.post(`/sites/${n}/verify-connection`);S(R.data);const F=await ne.get("/sites");s(Array.isArray(F.data)?F.data:[])}catch(R){S({connected:!1,message:((B=(M=R.response)==null?void 0:M.data)==null?void 0:B.message)||"Connection test failed"})}finally{C(!1)}}};if(!n)return a.jsxs("div",{className:"p-6 sm:p-8 max-w-7xl mx-auto",children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Integrations"}),a.jsx("p",{className:"mt-1 text-gray-500 mb-6",children:"Connect BlogBotz with your favorite platforms."}),a.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 text-amber-700",children:"Please select a site from the header to view integration options."})]});const I={blue:{activeBg:"bg-blue-50",activeBorder:"border-blue-500",activeText:"text-blue-700"},green:{activeBg:"bg-green-50",activeBorder:"border-green-500",activeText:"text-green-700"},orange:{activeBg:"bg-orange-50",activeBorder:"border-orange-500",activeText:"text-orange-700"},purple:{activeBg:"bg-purple-50",activeBorder:"border-purple-500",activeText:"text-purple-700"}};
8938return a.jsxs("div",{className:"p-6 sm:p-8 max-w-7xl mx-auto space-y-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Integrations"}),a.jsx("p",{className:"mt-1 text-gray-500",children:"Connect BlogBotz to your website. Choose your platform below for setup instructions."})]}),a.jsxs("div",{className:"bg-white rounded-lg shadow-sm border",children:[a.jsx("div",{className:"border-b border-gray-200",children:a.jsx("nav",{className:"flex -mb-px overflow-x-auto","aria-label":"Platform tabs",children:dCe.map(M=>{const B=f===M.key,R=I[M.color];return a.jsxs("button",{onClick:()=>g(M.key),className:`whitespace-nowrap px-6 py-3.5 text-sm font-medium border-b-2 transition-colors ${B?`${R.activeBorder} ${R.activeText} ${R.activeBg}`:"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[M.label,h===M.key&&a.jsx("span",{className:"ml-2 inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-green-100 text-green-700",children:"Active"})]},M.key)})})}),a.jsxs("div",{className:"p-6",children:[f==="wordpress"&&a.jsx(hCe,{links:y.wordpress||[]}),f==="opencart"&&a.jsx(mCe,{links:y.opencart||[]}),f==="shopify"&&a.jsx(fCe,{links:y.shopify||[]}),f==="other"&&a.jsx(gCe,{activeSite:d,navigate:e})]})]}),a.jsxs("div",{className:"bg-white rounded-lg shadow-sm border p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Active Site Details"}),a.jsx("button",{onClick:D,disabled:w,className:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-primary-600 rounded-lg hover:bg-primary-700 disabled:opacity-50 transition-colors",children:w?a.jsxs(a.Fragment,{children:[a.jsxs("svg",{className:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Testing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(QV,{}),"Test Connection"]})})]}),E&&a.jsx("div",{className:`mb-4 text-sm px-4 py-3 rounded-lg ${E.connected?"bg-green-50 border border-green-200 text-green-700":"bg-red-50 border border-red-200 text-red-700"}`,children:E.connected?a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(YV,{})," ",E.message||"Connection successful!"]}):E.message||"Connection failed"}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-4",children:[a.jsxs("div",{children:[a.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"Site Name"}),a.jsx("dd",{className:"mt-1 text-sm text-gray-900",children:(d==null?void 0:d.name)||"â"})]}),a.jsxs("div",{children:[a.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"URL"}),a.jsx("dd",{className:"mt-1 text-sm text-gray-900",children:d!=null&&d.url?a.jsxs("a",{href:d.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary-600 hover:underline flex items-center gap-1",children:[d.url,a.jsx(lCe,{})]}):"â"})]}),a.jsxs("div",{children:[a.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"Platform"}),a.jsx("dd",{className:"mt-1 text-sm text-gray-900 capitalize",children:(d==null?void 0:d.platform_type)||(d==null?void 0:d.platform)||"Not Connected"})]}),a.jsxs("div",{children:[a.jsx("dt",{className:"text-sm font-medium text-gray-500",children:"Status"}),a.jsx("dd",{className:"mt-1",children:a.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-xs font-medium ${d!=null&&d.api_connected?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600"}`,children:d!=null&&d.api_connected?"Connected":"Disconnected"})})]})]})]})]})}function LC({links:e,colorClass:n}){return e.length?a.jsx("div",{className:"flex flex-wrap gap-3 mt-3",children:e.map(i=>a.jsxs("a",{href:i.download_url,target:"_blank",rel:"noopener noreferrer",className:`inline-flex items-center gap-2 px-4 py-2.5 text-white text-sm font-medium rounded-lg transition-colors ${n}`,children:[a.jsx(cCe,{}),i.name,i.version?` (v${i.version})`:""]},i.id))}):null}function hCe({links:e}){return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"WordPress / WooCommerce Plugin"}),a.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Our WordPress plugin handles everything automatically â content publishing, category sync, and real-time updates. No manual configuration needed."})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs($r,{number:1,title:"Install the Plugin",children:[a.jsxs("p",{className:"text-sm text-gray-600",children:["Go to your WordPress admin panel and navigate to ",a.jsx("strong",{children:"Plugins > Add New"}),". Search for ",a.jsx("strong",{children:'"BlogBotz"'})," and click ",a.jsx("strong",{children:"Install Now"}),", then ",a.jsx("strong",{children:"Activate"}),"."]}),a.jsx(LC,{links:e,colorClass:"bg-blue-600 hover:bg-blue-700"})]}),a.jsx($r,{number:2,title:"Click Connect",children:a.jsxs("p",{className:"text-sm text-gray-600",children:["After activation, go to ",a.jsx("strong",{children:"BlogBotz"})," in your WordPress sidebar. Click the ",a.jsx("strong",{children:"Connect"})," button â the plugin will link to your BlogBotz account automatically. No keys or codes to copy."]})}),a.jsx($r,{number:3,title:"Start Creating Content",children:a.jsx("p",{className:"text-sm text-gray-600",children:"Once connected, generated blogs will be automatically published to your WordPress site with proper formatting, categories, and featured images. Your WordPress categories are synced, and all content updates happen in real-time."})})]}),a.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:a.jsxs("p",{className:"text-sm text-blue-700",children:[a.jsx("strong",{children:"Tip:"})," The plugin works with popular SEO plugins like Yoast and Rank Math for optimal search visibility."]})})]})}function mCe({links:e}){return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"OpenCart Extension"}),a.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Our OpenCart extension adds a complete blog system to your store with AI-powered content generation. Available for both OpenCart 3.x and 4.x."})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs($r,{number:1,title:"Download the Extension",children:[a.jsx("p",{className:"text-sm text-gray-600",children:"Get the BlogBotz extension from the OpenCart Marketplace. Cho
8938ose the version that matches your OpenCart installation:"}),a.jsx(LC,{links:e,colorClass:"bg-orange-600 hover:bg-orange-700"})]}),a.jsx($r,{number:2,title:"Install the Extension",children:a.jsxs("p",{className:"text-sm text-gray-600",children:["In your OpenCart admin, go to ",a.jsx("strong",{children:"Extensions > Installer"})," and upload the downloaded file. Then go to ",a.jsx("strong",{children:"Extensions > Extensions"}),", select ",a.jsx("strong",{children:"Modules"})," from the dropdown, find ",a.jsx("strong",{children:"BlogBotz"}),", and click the green ",a.jsx("strong",{children:"Install"})," button."]})}),a.jsx($r,{number:3,title:"Click Connect",children:a.jsxs("p",{className:"text-sm text-gray-600",children:["Open the BlogBotz module settings and click the ",a.jsx("strong",{children:"Connect"})," button. The extension will link to your BlogBotz account automatically â no keys or codes to copy."]})}),a.jsx($r,{number:4,title:"Enable and Configure",children:a.jsxs("p",{className:"text-sm text-gray-600",children:["In your OpenCart admin, go to the ",a.jsx("strong",{children:"BlogBotz"})," module settings and enable the module. You can also configure blog display options and SEO settings."]})}),a.jsx($r,{number:5,title:"You're All Set!",children:a.jsx("p",{className:"text-sm text-gray-600",children:"Once connected and enabled, your OpenCart store now has a full blog system with categories, tags, comments, author profiles, RSS feeds, and AI-powered blog generation. Start creating content from your BlogBotz dashboard."})})]}),a.jsx("div",{className:"bg-orange-50 border border-orange-200 rounded-lg p-4",children:a.jsxs("p",{className:"text-sm text-orange-700",children:[a.jsx("strong",{children:"Tip:"})," The extension is theme-compatible and supports multi-language and multi-store setups. Future changes will sync automatically via real-time webhooks."]})})]})}function fCe({links:e}){return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Shopify App"}),a.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Our Shopify app is a standalone integration. Install it directly from the Shopify App Store â no separate BlogBotz account required. Everything is managed from your Shopify admin."})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs($r,{number:1,title:"Install from Shopify App Store",children:[a.jsxs("p",{className:"text-sm text-gray-600",children:["Visit the Shopify App Store and search for ",a.jsx("strong",{children:'"BlogBotz"'}),", or click the button below to go directly to the app listing."]}),a.jsx(LC,{links:e,colorClass:"bg-green-600 hover:bg-green-700"})]}),a.jsx($r,{number:2,title:"Add the App to Your Store",children:a.jsxs("p",{className:"text-sm text-gray-600",children:["Click ",a.jsx("strong",{children:"Add app"})," and authorize it. The app will connect to your Shopify store automatically."]})}),a.jsx($r,{number:3,title:"Configure from Shopify Admin",children:a.jsx("p",{className:"text-sm text-gray-600",children:"Once installed, open the app from your Shopify admin panel. You can customize the blog settings, train it with your product data, and manage everything right from Shopify. No need to visit BlogBotz separately."})})]}),a.jsx("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:a.jsxs("p",{className:"text-sm text-green-700",children:[a.jsx("strong",{children:"Note:"})," The Shopify app is fully standalone. Your products, collections, and pages sync automatically. Billing is handled through Shopify's billing system."]})})]})}const PO=()=>a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"})}),QV=()=>a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z"})});function Pv({label:e,value:n,mono:i=!0}){const[s,d]=j.useState(!1),h=()=>{navigator.clipboard.writeText(n),d(!0),setTimeout(()=>d(!1),2e3)};return a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:e}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("code",{className:`flex-1 text-sm bg-gray-100 px-3 py-2 rounded-lg border border-gray-200 truncate ${i?"font-mono":""}`,children:n||"â"}),n&&a.jsx("button",{onClick:h,className:"p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",title:"Copy",children:s?a.jsx(YV,{}):a.jsx(aCe,{})})]})]})}function pCe({siteId:e,siteName:n}){const[i,s]=j.useState(null),[d,h]=j.useState(!0),[f,g]=j.useState(!1),[p,x]=j.useState(""),[y,v]=j.useState(""),[w,C]=j.useState(""),[E,S]=j.useState(!1),[D,I]=j.useState(null),M=async()=>{var V;try{h(!0);const P=await ne.get(`/sites/${e}/api-integration`);s(P.data.integration),C(((V=P.data.integration)==null?void 0:V.webhook_url)||"")}catch{x("Failed to load API integration")}finally{h(!1)}};j.useEffect(()=>{M()},[e]);const B=async()=>{var V,P,z;g(!0),x("");try{const W=await ne.post(`/sites/${e}/api-integration/generate`);s(W.data.integration),C(((V=W.data.integration)==null?void 0:V.webhook_url)||""),v("API credentials generated! Save your API Secret â it won't be shown again.")}catch(W){x(((z=(P=W.response)==null?void 0:P.data)==null?void 0:z.message)||"Failed to generate credentials")}finally{g(!1)}},R=async()=>{var V,P;g(!0),x("");try{const z=await ne.post(`/sites/${e}/api-integration/webhook`,{webhook_url:w||null});s(z.data.integration),S(!1),v("Webhook URL updated")}catch(z){x(((P=(V=z.response)==null?void 0:V.data)==null?void 0:P.message)||"Failed to update webhook")}finally{g(!1)}},F=async()=>{var V,P;I(null),g(!0);try{const z=await ne.post(`/sites/${e}/api-integration/webhook/test`);I(z.data)}catch(z){I({success:!1,error:((P=(V=z.response)==null?void 0:V.data)==null?void 0:P.message)||"Test failed"})}finally{g(!1)}};return d?a.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-8 text-center",children:[a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-purple-600 mx-auto"}),a.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"Loading API settings..."})]}):a.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden",children:[a.jsxs("div",{className:"px-6 py-4 bg-gradient-to-r from-purple-50 to-indigo-50 border-b border-purple-200",children:[a.jsxs("h4",{className:"text-base font-semibold text-gray-900",children:["API Settings for ",n]}),a.jsx("p",{className:"text-sm text-gray-600 mt-0.5",children:"Generate credentials and configure webhooks for your custom integration."})]}),a.jsxs("div",{className:"p-6 space-y-5",children:[p&&a.jsxs("div",{className:"bg-red-50 border border-red-200 text-red-700 text-sm px-4 py-3 rounded-lg flex justify-between items-center",children:[p,a.jsx("button",{onClick:()=>x(""),className:"text-red-500 hover:text-red-700 text-lg leading-none",children:"Ã"})]}),y&&a.jsxs("div",{className:"bg-green-50 border border-green-200 text-green-700 text-sm px-4 py-3 rounded-lg flex justify-between items-center",children:[y,a.jsx("button",{onClick:()=>v(""),className:"text-green-500 hover:text-green-700 text-lg leading-none",children:"Ã"})]}),i?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"space-y-3",children:[a.jsx("h5",{className:"text-sm font-semibold text-gray-900 mb-1",children:"API Credentials"}),a.jsx(Pv,{label:"API Key",value:i.api_key}),a.jsx(Pv,{label:"API Secret",value:i.api_secret}),a.jsx(Pv,{label:"Webhook Secret",value:i.webhook_secret})]}),a.jsxs("div",{className:"pt-4 border-t border-gray-200",children:[a.jsx("h5",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Webhook Configuration"}),E?a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:"Webhook URL"}),a.jsx("input",{type:"url",value:w,onChange:V=>C(V.target.value),placeholder:"https://yoursite.com/api/blogbotz-webhook",className:"w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500"})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{onClick:R,disabled:f,className:"px-4 py-2 text-sm font-medium text-white bg-purple-600 rounded-lg hover:bg-purple-700 disabled:opacity-50 transition-colors",children:f?"
8938Saving...":"Save"}),a.jsx("button",{onClick:()=>{S(!1),C(i.webhook_url||"")},className:"px-4 py-2 text-sm font-medium text-gray-600 bg-gray-100 rounded-lg hover:bg-gray-200 transition-colors",children:"Cancel"})]})]}):a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[a.jsx("div",{className:"flex-1 min-w-0",children:a.jsx("code",{className:"text-sm bg-gray-100 px-3 py-2 rounded-lg border border-gray-200 block truncate",children:i.webhook_url||"Not configured"})}),a.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[a.jsx("button",{onClick:()=>S(!0),className:"px-3 py-2 text-sm font-medium text-purple-700 bg-purple-50 border border-purple-200 rounded-lg hover:bg-purple-100 transition-colors",children:i.webhook_url?"Edit":"Configure"}),i.webhook_url&&a.jsxs("button",{onClick:F,disabled:f,className:"inline-flex items-center gap-1.5 px-3 py-2 text-sm font-medium text-green-700 bg-green-50 border border-green-200 rounded-lg hover:bg-green-100 disabled:opacity-50 transition-colors",children:[a.jsx(QV,{}),"Test"]})]})]}),D&&a.jsx("div",{className:`mt-3 text-sm px-4 py-3 rounded-lg ${D.success?"bg-green-50 border border-green-200 text-green-700":"bg-red-50 border border-red-200 text-red-700"}`,children:D.success?"Webhook test successful!":`Test failed: ${D.error}`})]}),(i.request_count>0||i.last_used_at)&&a.jsxs("div",{className:"pt-4 border-t border-gray-200 flex gap-6",children:[a.jsxs("div",{children:[a.jsx("span",{className:"text-xs text-gray-500",children:"Requests"}),a.jsx("p",{className:"text-sm font-semibold text-gray-900",children:i.request_count||0})]}),a.jsxs("div",{children:[a.jsx("span",{className:"text-xs text-gray-500",children:"Last Used"}),a.jsx("p",{className:"text-sm font-semibold text-gray-900",children:i.last_used_at?new Date(i.last_used_at).toLocaleDateString():"Never"})]})]})]}):a.jsxs("div",{className:"text-center py-8",children:[a.jsx("div",{className:"w-14 h-14 bg-purple-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx(PO,{})}),a.jsx("h5",{className:"text-base font-semibold text-gray-900 mb-2",children:"No API Credentials Yet"}),a.jsx("p",{className:"text-sm text-gray-500 mb-6 max-w-sm mx-auto",children:"Generate API credentials to connect your custom website or application to BlogBotz."}),a.jsxs("button",{onClick:B,disabled:f,className:"inline-flex items-center gap-2 px-5 py-2.5 bg-purple-600 text-white text-sm font-medium rounded-lg hover:bg-purple-700 disabled:opacity-50 transition-colors",children:[a.jsx(PO,{}),f?"Generating...":"Generate API Credentials"]})]})]})]})}function gCe({activeSite:e,navigate:n}){return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Other Platforms & Custom API"}),a.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Connect any platform or custom application using our REST API. Works with any blogging platform, CMS, or static site generator."})]}),e?a.jsx(pCe,{siteId:e.id,siteName:e.name}):a.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-5 text-center",children:a.jsxs("p",{className:"text-sm text-yellow-700",children:["Please add a site first from the ",a.jsx("strong",{children:"Sites"})," page to generate API credentials."]})}),a.jsxs("div",{className:"space-y-4",children:[a.jsx($r,{number:1,title:"Add Your Site",children:a.jsxs("p",{className:"text-sm text-gray-600",children:["If you haven't already, go to ",a.jsx("strong",{children:"Sites"}),' in the sidebar and add your website. Select "Custom / API" as the platform type.']})}),a.jsx($r,{number:2,title:"Generate API Credentials",children:a.jsx("p",{className:"text-sm text-gray-600",children:'Click "Generate API Credentials" above. Save your API Secret immediately â it is only shown once.'})}),a.jsx($r,{number:3,title:"Configure Your Webhook",children:a.jsx("p",{className:"text-sm text-gray-600",children:"Set your webhook URL above. BlogBotz will send POST requests with generated blog content to your endpoint."})}),a.jsx($r,{number:4,title:"Test Your Connection",children:a.jsxs("p",{className:"text-sm text-gray-600",children:['Use the "Test" button above to send a test webhook, then check the'," ",a.jsx("button",{onClick:()=>n("/user/docs/api"),className:"text-purple-600 hover:underline font-medium",children:"API Documentation"})," ","for full endpoint details and code examples."]})})]}),a.jsxs("div",{className:"bg-purple-50 border border-purple-200 rounded-lg p-4",children:[a.jsx("p",{className:"text-sm font-medium text-purple-700 mb-2",children:"Works with popular platforms:"}),a.jsxs("ul",{className:"text-sm text-purple-600 space-y-1",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Custom CMS:"}
8938)," Drupal, Joomla, Contentful, Strapi, Sanity"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Static Sites:"})," Next.js, Gatsby, Hugo, Jekyll"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"E-commerce:"})," Magento, PrestaShop, custom stores"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Other:"})," Any platform with webhook or API support"]})]})]})]})}function $r({number:e,title:n,children:i}){return a.jsxs("div",{className:"flex gap-4",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-gray-100 text-gray-700 flex items-center justify-center text-sm font-bold",children:e}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h4",{className:"text-sm font-semibold text-gray-900 mb-1",children:n}),i]})]})}const OO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})}),bCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"})}),kCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})}),BO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"})}),yCe=({className:e})=>a.jsxs("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a7.723 7.723 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.212-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 010-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28z"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),LO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5a17.919 17.919 0 01-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})}),RO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})});function xCe(){const{siteId:e}=sc(),n=Ot(),[i]=Do(),{sites:s}=ui(),[d,h]=j.useState(!0),[f,g]=j.useState(!1),[p,x]=j.useState(null),[y,v]=j.useState(null),w=i.get("return")||`/user/automation/${e}`,C=i.get("feature")||"this feature",S=(Array.isArray(s)?s:[]).find(B=>B.id===parseInt(e));j.useEffect(()=>{D()},[e]);const D=async()=>{try{h(!0);const B=await ne.get(`/sites/${e}`);v(B.data)}catch(B){console.error("Failed to load site:",B),S&&v(S)}finally{h(!1)}},I=async()=>{var B,R;g(!0),x(null);try{const F=await ne.post(`/sites/${e}/verify-connection`);x({success:F.data.connected,message:F.data.message,platform:F.data.platform}),F.data.connected&&setTimeout(()=>{n(w)},2e3)}catch(F){x({success:!1,message:((R=(B=F.response)==null?void 0:B.data)==null?void 0:R.message)||"Connection verification failed. Please try again."})}finally{g(!1)}},M=(y==null?void 0:y.platform_type)==="opencart"?"OpenCart":(y==null?void 0:y.platform_type)==="woocommerce"?"WooCommerce":(y==null?void 0:y.platform_type)==="wordpress"?"WordPress":"your website";return d?a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):a.jsxs("div",{className:"p-6 sm:p-8 max-w-7xl mx-auto",children:[a.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Website Connection"}),a.jsx("p",{className:"mt-1 text-gray-500",children:"Connect your website to enable automation features"})]}),a.jsxs("button",{onClick:()=>n(-1),className:"flex items-center px-4 py-2 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors",children:[a.jsx(kCe,{className:"w-4 h-4 mr-2"}),"Go Back"]})]}),p&&a.jsx("div",{className:`mb-6 p-4 rounded-lg ${p.success?"bg-green-50 border border-green-200":"bg-amber-50 border border-amber-200"}`,children:a.jsxs("div",{className:"flex items-start gap-3",children:[p.success?a.jsx(RO,{className:"w-5 h-5 text-green-600 flex-shrink-0 mt-0.5"}):a.jsx(OO,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:`font-semibold ${p.success?"text-green-800":"text-amber-800"}
8938`,children:p.success?"Connection Successful!":"Website Not Connected"}),a.jsx("p",{className:`text-sm mt-1 ${p.success?"text-green-700":"text-amber-700"}`,children:p.success?p.message:"To get started, connect your website to BlogBotz. We support WordPress, WooCommerce, OpenCart, and Custom API integrations."}),p.success?a.jsx("p",{className:"text-sm text-green-600 mt-2",children:"Redirecting you back..."}):a.jsxs("button",{onClick:()=>n("/user/integrations"),className:"inline-flex items-center mt-3 text-sm font-medium text-amber-800 hover:text-amber-900",children:["View Integration Guide",a.jsx("svg",{className:"w-4 h-4 ml-1",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})]})]})]})}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[a.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden",children:[a.jsx("div",{className:"bg-gradient-to-r from-amber-500 to-orange-500 px-6 py-4",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 bg-white/20 backdrop-blur rounded-lg flex items-center justify-center",children:a.jsx(OO,{className:"w-5 h-5 text-white"})}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-lg font-semibold text-white",children:"Connection Required"}),a.jsxs("p",{className:"text-amber-100 text-sm",children:["Connect your website to access ",C]})]})]})}),y&&a.jsx("div",{className:"px-6 py-3 bg-gray-50 border-b border-gray-200",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(LO,{className:"w-5 h-5 text-gray-400"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-gray-900",children:y.name}),a.jsx("p",{className:"text-sm text-gray-500",children:y.url})]})]})}),a.jsxs("div",{className:"p-6",children:[a.jsx("h3",{className:"font-semibold text-gray-900 mb-2",children:"Why do I need to connect?"}),a.jsxs("p",{className:"text-sm text-gray-600 mb-4",children:["To use ",C,", BlogBotz needs to communicate with your website. This requires a secure connection between BlogBotz and ",M,"."]}),a.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3 mb-4",children:a.jsxs("p",{className:"text-sm text-amber-800",children:[a.jsx("strong",{children:"Tip:"}),` If you've already installed our plugin/extension, click "Verify Connection" to test.`]})}),a.jsx("h4",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Once connected, you can:"}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:["Auto-publish blogs to your site","Configure posting schedules","Manage content categories","Enable SEO optimization","Set content preferences","Track published posts"].map((B,R)=>a.jsxs("div",{className:"flex items-center gap-2 text-gray-600",children:[a.jsx(RO,{className:"w-4 h-4 text-green-500 flex-shrink-0"}),a.jsx("span",{className:"text-sm",children:B})]},R))})]})]}),a.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:[a.jsx("h3",{className:"font-semibold text-gray-900 mb-4",children:"How to Connect Your Website"}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 bg-primary-100 text-primary-600 rounded-full flex items-center justify-center text-sm font-bold",children:"1"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-gray-900",children:"Go to Integration Settings"}),a.jsx("p",{className:"text-sm text-gray-500",children:"Click the button in the sidebar"})]})]}),a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 bg-primary-100 text-primary-600 rounded-full flex items-center justify-center text-sm font-bold",children:"2"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-gray-900",children:"Install Plugin/Extension"}),a.jsx("p",{className:"text-sm text-gray-500",children:"WordPress, OpenCart, or Custom API"})]})]}),a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 bg-primary-100 text-primary-600 rounded-full flex items-center justify-center text-sm font-bold",children:"3"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-gray-900",children:"Use Easy Connect"}),a.jsx("p",{className:"text-sm text-gray-500",children:"Link your site instantly"})]})]}),a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 bg-green-100 text-green-600 rounded-full flex items-center justify-center text-sm font-bold",children:"4"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-gray-900",children:"Verify Connection"}),a.jsx("p",{className:"text-sm text-gray-500",children:"Test that everything works"})]})]})]})]})]}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:[a.jsx("h3",{className:"font-semibold text-gray-900 mb-4",children:"Qu
8938ick Actions"}),a.jsxs("div",{className:"space-y-3",children:[a.jsx("button",{onClick:I,disabled:f,className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 bg-primary-600 text-white font-medium rounded-lg hover:bg-primary-700 disabled:bg-primary-400 transition-colors",children:f?a.jsxs(a.Fragment,{children:[a.jsx(BO,{className:"w-4 h-4 animate-spin"}),"Verifying..."]}):a.jsxs(a.Fragment,{children:[a.jsx(BO,{className:"w-4 h-4"}),"Verify Connection"]})}),a.jsxs("button",{onClick:()=>n("/user/integrations"),className:"w-full flex items-center justify-center gap-2 px-4 py-2.5 bg-amber-600 text-white font-medium rounded-lg hover:bg-amber-700 transition-colors",children:[a.jsx(bCe,{className:"w-4 h-4"}),"Go to Integration Guide"]}),a.jsx("div",{className:"border-t border-gray-200 pt-3 mt-3",children:a.jsxs("button",{onClick:()=>n(`/user/automation/${e}`),className:"w-full flex items-center justify-center gap-2 px-4 py-2 bg-gray-100 text-gray-700 text-sm font-medium rounded-lg hover:bg-gray-200 transition-colors",children:[a.jsx(yCe,{className:"w-4 h-4"}),"Automation Settings"]})}),a.jsxs("button",{onClick:()=>n("/user/sites"),className:"w-full flex items-center justify-center gap-2 px-4 py-2 bg-gray-100 text-gray-700 text-sm font-medium rounded-lg hover:bg-gray-200 transition-colors",children:[a.jsx(LO,{className:"w-4 h-4"}),"My Sites"]})]})]}),a.jsxs("div",{className:"bg-gray-50 rounded-xl border border-gray-200 p-6",children:[a.jsx("h3",{className:"font-semibold text-gray-900 mb-2",children:"Need Help?"}),a.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Check our documentation for detailed setup instructions."}),a.jsxs("a",{href:"/user/docs/api",className:"inline-flex items-center text-sm text-primary-600 hover:text-primary-700 font-medium",children:["View Documentation",a.jsx("svg",{className:"w-4 h-4 ml-1",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})]})]})]})]})]})}const zO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"})});function vCe(){const[e,n]=j.useState([]),[i,s]=j.useState(!0),[d,h]=j.useState("all"),[f,g]=j.useState({current_page:1,last_page:1}),p=Ot(),x=(E=1)=>{s(!0);const S={per_page:15,page:E};d!=="all"&&(S.filter=d),ne.get("/notifications",{params:S}).then(D=>{var I,M,B;n(((I=D.data)==null?void 0:I.data)||[]),g({current_page:((M=D.data)==null?void 0:M.current_page)||1,last_page:((B=D.data)==null?void 0:B.last_page)||1})}).catch(()=>{}).finally(()=>s(!1))};j.useEffect(()=>{x(1)},[d]);const y=E=>{ne.post(`/notifications/${E}/read`).then(()=>{n(S=>S.map(D=>D.id===E?{...D,read_at:new Date().toISOString()}:D))})},v=()=>{ne.post("/notifications/read-all").then(()=>{n(E=>E.map(S=>({...S,read_at:S.read_at||new Date().toISOString()})))})},w=E=>{E.read_at||y(E.id),E.link&&p(E.link)},C=[{key:"all",label:"All"},{key:"unread",label:"Unread"},{key:"read",label:"Read"}];return a.jsxs("div",{className:"p-4 sm:p-6 lg:p-8",children:[a.jsxs("div",{className:"flex items-center justify-between mb-6",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(zO,{className:"w-6 h-6 text-gray-400"}),a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Notifications"})]}),a.jsx("button",{onClick:v,className:"px-4 py-2 text-sm font-medium text-primary-600 hover:text-primary-700 hover:bg-primary-50 rounded-lg transition-colors",children:"Mark all as read"})]}),a.jsx("div",{className:"flex gap-1 mb-6 bg-gray-100 rounded-lg p-1 w-fit",children:C.map(E=>a.jsx("button",{onClick:()=>h(E.key),className:`px-4 py-2 text-sm font-medium rounded-md transition-colors ${d===E.key?"bg-white text-gray-900 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:E.label},E.key))}),a.jsx("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden",children:i?a.jsxs("div",{className:"px-6 py-12 text-center text-gray-500",children:[a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600 mx-auto mb-3"}),"Loading..."]}):e.length===0?a.jsxs("div",{className:"px-6 py-12 text-center text-gray-500",children:[a.jsx(zO,{className:"w-12 h-12 text-gray-300 mx-auto mb-3"}),a.jsx("p",{className:"text-lg font-medium",children:"No notifications"}),a.jsx("p",{className:"text-sm mt-1",children:"You're all caught up!"})]}):e.map(E=>
8938a.jsxs("div",{onClick:()=>w(E),className:`flex items-start gap-3 px-6 py-4 border-b border-gray-100 last:border-0 cursor-pointer hover:bg-gray-50 transition-colors ${E.read_at?"":"bg-primary-50/30"}`,children:[a.jsx("div",{className:"pt-1 flex-shrink-0",children:a.jsx("div",{className:`w-2.5 h-2.5 rounded-full ${E.read_at?"bg-transparent":"bg-primary-500"}`})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:`text-sm ${E.read_at?"font-medium text-gray-700":"font-semibold text-gray-900"}`,children:E.title}),a.jsx("p",{className:"text-sm text-gray-500 mt-0.5",children:E.message}),a.jsx("p",{className:"text-xs text-gray-400 mt-1",children:E.created_at_human||E.created_at})]}),!E.read_at&&a.jsx("button",{onClick:S=>{S.stopPropagation(),y(E.id)},className:"px-3 py-1 text-xs font-medium text-primary-600 hover:bg-primary-100 rounded-md transition-colors flex-shrink-0",children:"Mark read"})]},E.id))}),f.last_page>1&&a.jsxs("div",{className:"flex items-center justify-center gap-2 mt-6",children:[a.jsx("button",{disabled:f.current_page===1,onClick:()=>x(f.current_page-1),className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),a.jsxs("span",{className:"text-sm text-gray-600",children:["Page ",f.current_page," of ",f.last_page]}),a.jsx("button",{disabled:f.current_page===f.last_page,onClick:()=>x(f.current_page+1),className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})}const FO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"})}),Ov=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z"})}),Hp=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),$O=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})}),gg=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})}),wCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})}),_Ce=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})}),$1=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),VO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})}),jl=({className:e="h-4 w-4"})=>a.jsxs("svg",{className:`animate-spin ${e}`,fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),Bv=[{key:"dashboard",label:"Dashboard"},{key:"blogs",label:"Blogs"},{key:"topics",label:"Topics"},{key:"automation",label:"Automation"},{key:"credits_view",label:"Credits View"},{key:"settings",label:"Settings"},{key:"integrations",label:"Integrations"},{key:"api_docs",label:"API Docs"},{key:"team_manage",label:"Team Manage"}],ACe=[{value:"",label:"All Statuses"},{value:"active",label:"Active"},{value:"invited",label:"Invited"},{value:"inactive",label:"Inactive"}],CCe=e=>{switch(e){case"active":return"bg-green-100 text-green-700";case"invited":return"bg-yellow-100 text-yellow-700";case"inactive":return"bg-gray-100 text-gray-600";default:return"bg-gray-100 text-gray-600"}},jCe=e=>({dashboard:"bg-blue-100 text-blue-700",blogs:"bg-purple-100 text-purple-700",topics:"bg-teal-100 text-teal-700",automation:"bg-orange-100 text-orange-700",credits_view:"bg-emerald-100 text-emerald-700",settings:"bg-gray-200 text-gray-700",integrations:"bg-indigo-100 text-indigo-700",api_docs:"bg-cyan-100 text-cyan-700",team_manage:"bg-rose-100 text-rose-700"})[e]||"bg-gray-100 text-gray-600",NCe=({type:e,message:n,onClose:i})=>(j.useEffect(()=>{const s=setTimeout(i,5e3);return()=>clearTimeout(s)},[i]),a.jsxs("div",{className:`mb-4 p-4 rounded-lg flex items-center justify-between ${e==="success"?"bg-green-50 border border-green-200 text-green-800":"bg-red-50 border border-red-200 text-red-800"}`,children:[a.jsxs("div",{className:"flex items-center",children:[e==="success"?a.jsx("svg",{className:"w-5 h-5 mr-3 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}):a.jsx("svg",{className:"w-5 h-5 mr-3 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75
8938a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})}),a.jsx("span",{className:"text-sm font-medium",children:n})]}),a.jsx("button",{onClick:i,className:"ml-4 flex-shrink-0 hover:opacity-70",children:a.jsx($1,{className:"w-4 h-4"})})]})),UO=({isOpen:e,title:n,message:i,onConfirm:s,onCancel:d,loading:h})=>e?a.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:a.jsxs("div",{className:"flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:p-0",children:[a.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity",onClick:d}),a.jsxs("div",{className:"relative inline-block w-full max-w-md p-6 my-8 text-left align-middle bg-white rounded-xl shadow-xl transform transition-all",children:[a.jsx("div",{className:"flex items-center justify-center w-12 h-12 mx-auto mb-4 rounded-full bg-red-100",children:a.jsx(gg,{className:"w-6 h-6 text-red-600"})}),a.jsx("h3",{className:"text-lg font-semibold text-center text-gray-900 mb-2",children:n}),a.jsx("p",{className:"text-sm text-center text-gray-500 mb-6",children:i}),a.jsxs("div",{className:"flex gap-3",children:[a.jsx("button",{type:"button",onClick:d,disabled:h,className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 transition-colors disabled:opacity-50",children:"Cancel"}),a.jsx("button",{type:"button",onClick:s,disabled:h,className:"flex-1 inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-lg text-sm font-medium text-white bg-red-600 hover:bg-red-700 transition-colors disabled:opacity-50",children:h?a.jsxs(a.Fragment,{children:[a.jsx(jl,{className:"h-4 w-4 mr-2"})," Deleting..."]}):"Delete"})]})]})]})}):null;function ECe(){var tt,st,Bt;const[e,n]=j.useState("users"),[i,s]=j.useState(null),d=(oe,Te)=>{s({type:oe,message:Te})},[h,f]=j.useState([]),[g,p]=j.useState(!0),[x,y]=j.useState(""),[v,w]=j.useState(""),[C,E]=j.useState([]),[S,D]=j.useState(!1),[I,M]=j.useState(!1),[B,R]=j.useState(null),[F,V]=j.useState(!1),[P,z]=j.useState({name:"",email:"",role_id:"",site_ids:[]}),[W,K]=j.useState({}),[G,Z]=j.useState({isOpen:!1,user:null}),[se,ge]=j.useState(!1),[Se,Ae]=j.useState(null),[he,ee]=j.useState([]),[le,je]=j.useState(!0),[ve,Ce]=j.useState([]),[Q,te]=j.useState(!1),[pe,be]=j.useState(null),[Oe,at]=j.useState(!1),[re,ye]=j.useState({name:"",description:"",permissions:[]}),[Me,Y]=j.useState({}),[fe,Ne]=j.useState({isOpen:!1,role:null}),[Ue,it]=j.useState(!1),[Ve,mt]=j.useState([]);j.useEffect(()=>{ut(),Fe(),ue()},[]),j.useEffect(()=>{ut()},[x,v]);const ut=async()=>{var oe;try{p(!0);const Te={};x&&(Te.search=x),v&&(Te.status=v);const pt=await ne.get("/team/users",{params:Te}),Ht=((oe=pt.data)==null?void 0:oe.data)||pt.data||[];f(Array.isArray(Ht)?Ht:[])}catch(Te){console.error("Failed to load team users",Te),d("error","Failed to load team members.")}finally{p(!1)}},Fe=async()=>{try{je(!0);const Te=(await ne.get("/team/roles")).data;ee((Te==null?void 0:Te.roles)||(Te==null?void 0:Te.data)||Te||[]),Te!=null&&Te.available_permissions&&Ce(Te.available_permissions)}catch(oe){console.error("Failed to load roles",oe),d("error","Failed to load roles.")}finally{je(!1)}},ue=async()=>{var oe;try{const Te=await ne.get("/sites"),pt=((oe=Te.data)==null?void 0:oe.data)||Te.data||[];mt(Array.isArray(pt)?pt:[])}catch(Te){console.error("Failed to load sites",Te)}},Re=()=>{R(null),z({name:"",email:"",role_id:"",site_ids:[]}),K({}),M(!0)},ke=oe=>{var Te;R(oe),z({name:oe.name||"",email:oe.email||"",role_id:oe.role_id||((Te=oe.role)==null?void 0:Te.id)||"",site_ids:oe.site_ids||(oe.sites?oe.sites.map(pt=>pt.id):[])}),K({}),M(!0)},$e=()=>{M(!1),R(null),z({name:"",email:"",role_id:"",site_ids:[]}),K({})},lt=()=>{const oe={};return P.name.trim()||(oe.name="Name is required."),P.email.trim()?/\S+@\S+\.\S+/.test(P.email)||(oe.email="Please enter a valid email address."):oe.email="Email is required.",P.role_id||(oe.role_id="Please select a role."),K(oe),Object.keys(oe).length===0},Ct=async oe=>{var Te,pt,Ht,Io;if(oe.preventDefault(),!!lt()){V(!0);try{B?(await ne.put(`/team/users/${B.id}`,{name:P.name,email:P.email,role_id:P.role_id,site_ids:P.site_ids}),d("success","Team member updated successfully.")):(await ne.post("/team/users",{name:P.name,email:P.email,role_id:P.role_id,site_ids:P.site_ids}),d("success","Invitation sent successfully.")),$e(),ut()}catch(pi){(pt=(Te=pi.response)==null?void 0:Te.data)!=null&&pt.errors?K(pi.response.data.errors):d("error",((Io=(Ht=pi.response)==null?void 0:Ht.data)==null?void 0:Io.message)||"Failed to save team member.")}finally{V(!1)}}}
8938,we=oe=>{Z({isOpen:!0,user:oe})},Xe=async()=>{var oe,Te;if(G.user){ge(!0);try{await ne.delete(`/team/users/${G.user.id}`),d("success","Team member removed successfully."),Z({isOpen:!1,user:null}),E(pt=>pt.filter(Ht=>Ht!==G.user.id)),ut()}catch(pt){d("error",((Te=(oe=pt.response)==null?void 0:oe.data)==null?void 0:Te.message)||"Failed to remove team member.")}finally{ge(!1)}}},X=async oe=>{var Te,pt;Ae(oe.id);try{await ne.post(`/team/users/${oe.id}/resend-invitation`),d("success",`Invitation resent to ${oe.email}.`)}catch(Ht){d("error",((pt=(Te=Ht.response)==null?void 0:Te.data)==null?void 0:pt.message)||"Failed to resend invitation.")}finally{Ae(null)}},We=async()=>{var oe,Te;if(C.length!==0){D(!0);try{await ne.post("/team/users/bulk-delete",{ids:C}),d("success",`${C.length} member(s) removed successfully.`),E([]),ut()}catch(pt){d("error",((Te=(oe=pt.response)==null?void 0:oe.data)==null?void 0:Te.message)||"Failed to bulk delete members.")}finally{D(!1)}}},et=oe=>{E(Te=>Te.includes(oe)?Te.filter(pt=>pt!==oe):[...Te,oe])},Je=()=>{C.length===h.length?E([]):E(h.map(oe=>oe.id))},Ke=oe=>{z(Te=>({...Te,site_ids:Te.site_ids.includes(oe)?Te.site_ids.filter(pt=>pt!==oe):[...Te.site_ids,oe]}))},ce=()=>{be(null),ye({name:"",description:"",permissions:[]}),Y({}),te(!0)},Qe=oe=>{be(oe),ye({name:oe.name||"",description:oe.description||"",permissions:oe.permissions||[]}),Y({}),te(!0)},Ze=()=>{te(!1),be(null),ye({name:"",description:"",permissions:[]}),Y({})},Nt=()=>{const oe={};return re.name.trim()||(oe.name="Role name is required."),re.permissions.length===0&&(oe.permissions="Select at least one permission."),Y(oe),Object.keys(oe).length===0},dn=async oe=>{var Te,pt,Ht,Io;if(oe.preventDefault(),!!Nt()){at(!0);try{pe?(await ne.put(`/team/roles/${pe.id}`,{name:re.name,description:re.description,permissions:re.permissions}),d("success","Role updated successfully.")):(await ne.post("/team/roles",{name:re.name,description:re.description,permissions:re.permissions}),d("success","Role created successfully.")),Ze(),Fe()}catch(pi){(pt=(Te=pi.response)==null?void 0:Te.data)!=null&&pt.errors?Y(pi.response.data.errors):d("error",((Io=(Ht=pi.response)==null?void 0:Ht.data)==null?void 0:Io.message)||"Failed to save role.")}finally{at(!1)}}},Ut=oe=>{Ne({isOpen:!0,role:oe})},Yr=async()=>{var oe,Te;if(fe.role){it(!0);try{await ne.delete(`/team/roles/${fe.role.id}`),d("success","Role deleted successfully."),Ne({isOpen:!1,role:null}),Fe()}catch(pt){d("error",((Te=(oe=pt.response)==null?void 0:oe.data)==null?void 0:Te.message)||"Failed to delete role.")}finally{it(!1)}}},fi=oe=>{ye(Te=>({...Te,permissions:Te.permissions.includes(oe)?Te.permissions.filter(pt=>pt!==oe):[...Te.permissions,oe]}))},Br=oe=>{var Te;if((Te=oe.role)!=null&&Te.name)return oe.role.name;if(oe.role_id){const pt=he.find(Ht=>Ht.id===oe.role_id);return pt?pt.name:"Unknown"}return"N/A"},Lr=oe=>{if(ve.length>0){const pt=ve.find(Ht=>(typeof Ht=="string"?Ht:Ht.key)===oe);if(pt&&typeof pt=="object"&&pt.label)return pt.label}const Te=Bv.find(pt=>pt.key===oe);return Te?Te.label:oe},ot=ve.length>0?ve.map(oe=>{var Te;return typeof oe=="string"?{key:oe,label:((Te=Bv.find(pt=>pt.key===oe))==null?void 0:Te.label)||oe}:oe}):Bv,[Ye,rt]=j.useState("");j.useEffect(()=>{const oe=setTimeout(()=>{y(Ye)},400);return()=>clearTimeout(oe)},[Ye]);const _t=()=>a.jsxs("div",{children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-3 flex-1",children:[a.jsxs("div",{className:"relative flex-1 w-full sm:max-w-xs",children:[a.jsx(_Ce,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),a.jsx("input",{type:"text",value:Ye,onChange:oe=>rt(oe.target.value),placeholder:"Search by name or email...",className:"w-full pl-9 pr-4 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500"})]}),a.jsxs("div",{className:"relative",children:[a.jsx("select",{value:v,onChange:oe=>w(oe.target.value),className:"appearance-none pl-3 pr-8 py-2 border border-gray-300 rounded-lg text-sm bg-white focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500",children:ACe.map(oe=>a.jsx("option",{value:oe.value,children:oe.label},oe.value))}),a.jsx(VO,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 pointer-events-none"})]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[C.length>0&&a.jsx("button",{onClick:We,disabled:S,className:"inline-flex items-center px-4 py-2 border border-red-300 rounded-lg text-sm font-medium text-red-700 bg-white hover:bg-red-50 transition-colors disabled:opacity-50",children:S?a.jsxs(a.Fragment,{children:[a.jsx(jl,{className:"h-4 w-4 mr-2"})," Deleting..."]}):a.jsxs(a.Fragment,{children:[a.jsx(gg,{className:"w-4 h-4 mr-1.5"}),"Delete (",C.length,")"]})}),a.jsxs("button",{onClick:Re,className:"inline-flex items-center px-4 py-2 bg-primary-600 text-white rounded-lg text-sm font-medium hover:bg-primary-700 transition-colors",children:[a.jsx(Hp,{className:"w-4 h-4 mr-1.5"}),"Invite Member"]})]})]}),a.jsx("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden",children:g?a.jsxs("div",{className:"flex items-center justify-center py-16",children:[a.jsx(jl,{className:"h-8 w-8 text-primary-600"}),a.jsx("span",{className:"ml-3 text-gray-500",children:"Loading team members..."})]}):h.length===0?a.jsxs("div",{className:"text-center py-16 px-4",children:[a.jsx(FO,{className:"w-12 h-12 text-gray-300 mx-auto mb-3"}),a.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-1",children:"No team members found"}),a.jsx("p",{className:"text-sm text-gray-500 mb-4",children:x||v?"Try adjusting your search or filter criteria.":"Get started by inviting your first team member."}),!x&&!v&&a.jsxs("button",{onClick:Re,className:"inline-flex items-center px-4 py-2 bg-primary-600 text-white rounded-lg text-sm font-medium hover:bg-primary-700 transition-colors",children:[a.jsx(Hp,{className:"w-4 h-4 mr-1.5"}),"Invite Member"]})]}):a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[a.jsx("thead",{className:"bg-gray-50",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-3 text-left",children:a.jsx("input",{type:"checkbox",checked:C.length===
8938h.length&&h.length>0,onChange:Je,className:"rounded border-gray-300 text-primary-600 focus:ring-primary-500"})}),a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Name"}),a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Email"}),a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Role"}),a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),a.jsx("th",{className:"px-4 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),a.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:h.map(oe=>a.jsxs("tr",{className:"hover:bg-gray-50 transition-colors",children:[a.jsx("td",{className:"px-4 py-3",children:a.jsx("input",{type:"checkbox",checked:C.includes(oe.id),onChange:()=>et(oe.id),className:"rounded border-gray-300 text-primary-600 focus:ring-primary-500"})}),a.jsx("td",{className:"px-4 py-3",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"w-8 h-8 rounded-full bg-primary-100 flex items-center justify-center flex-shrink-0",children:a.jsx("span",{className:"text-sm font-semibold text-primary-600",children:(oe.name||oe.email||"?").charAt(0).toUpperCase()})}),a.jsx("span",{className:"ml-3 text-sm font-medium text-gray-900",children:oe.name||"--"})]})}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-500",children:oe.email}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-700",children:Br(oe)}),a.jsx("td",{className:"px-4 py-3",children:a.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium capitalize ${CCe(oe.status)}`,children:oe.status||"unknown"})}),a.jsx("td",{className:"px-4 py-3 text-right",children:a.jsxs("div",{className:"flex items-center justify-end gap-2",children:[a.jsx("button",{onClick:()=>ke(oe),className:"inline-flex items-center px-2.5 py-1.5 text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors",title:"Edit",children:a.jsx($O,{className:"w-3.5 h-3.5"})}),oe.status==="invited"&&a.jsx("button",{onClick:()=>X(oe),disabled:Se===oe.id,className:"inline-flex items-center px-2.5 py-1.5 text-xs font-medium text-primary-700 bg-primary-50 border border-primary-200 rounded-md hover:bg-primary-100 transition-colors disabled:opacity-50",title:"Resend Invite",children:Se===oe.id?a.jsx(jl,{className:"w-3.5 h-3.5"}):a.jsx(wCe,{className:"w-3.5 h-3.5"})}),a.jsx("button",{onClick:()=>we(oe),className:"inline-flex items-center px-2.5 py-1.5 text-xs font-medium text-red-700 bg-white border border-red-300 rounded-md hover:bg-red-50 transition-colors",title:"Remove",children:a.jsx(gg,{className:"w-3.5 h-3.5"})})]})})]},oe.id))})]})})})]}),An=()=>a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-6",children:[a.jsx("p",{className:"text-sm text-gray-500",children:"Define roles and assign permissions to control team access."}),a.jsxs("button",{onClick:ce,className:"inline-flex items-center px-4 py-2 bg-primary-600 text-white rounded-lg text-sm font-medium hover:bg-primary-700 transition-colors",children:[a.jsx(Hp,{className:"w-4 h-4 mr-1.5"}),"Create Role"]})]}),a.jsx("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden",children:le?a.jsxs("div",{className:"flex items-center justify-center py-16",children:[a.jsx(jl,{className:"h-8 w-8 text-primary-600"}),a.jsx("span",{className:"ml-3 text-gray-500",children:"Loading roles..."})]}):(Array.isArray(he)?he:[]).length===0?a.jsxs("div",{className:"text-center py-16 px-4",children:[a.jsx(Ov,{className:"w-12 h-12 text-gray-300 mx-auto mb-3"}),a.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-1",children:"No roles defined"}),a.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"Create roles to organize permissions for your team members."}),a.jsxs("button",{onClick:ce,className:"inline-flex items-center px-4 py-2 bg-primary-600 text-white rounded-lg text-sm font-medium hover:bg-primary-700 transition-colors",children:[a.jsx(Hp,{className:"w-4 h-4 mr-1.5"}),"Create Role"]})]}):a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[a.jsx("thead",{className:"bg-gray-50",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Name"}),a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Description"}),a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Permissions"}),a.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Members"}),a.jsx("th",{className:"px-4 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),a.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:(Array.isArray(he)?he:[]).map(oe=>a.jsxs("tr",{className:"hover:bg-gray-50 transition-colors",children:[a.jsx("td",{className:"px-4 py-3",children:a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:"w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center flex-shrink-0",children:a.jsx(Ov,{className:"w-4 h-4 text-indigo-600"})}),a.jsx("span",{className:"ml-3 text-sm font-medium text-gray-900",children:oe.name})]})}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-500 max-w-xs truncate",children:oe.description||"--"}),a.jsx("td",{className:"px-4 py-3",children:a.jsxs("div",{className:"flex flex-wrap gap-1 max-w-md",children:[(oe.permissions||[]).slice(0,5).map(Te=>a.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-xs font-medium ${jCe(Te)}`,children:Lr(Te)},Te)),(oe.permissions||[]).length>5&&a.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 text-gray-600",children:["+",oe.permissions.length-5," more"]})]})}),a.jsx("td",{className:"px-4 py-3 text-sm text-gray-700",children:oe.members_count!==void 0?oe.members_count:oe.users_count!==void 0?oe.users_count:"--"}),a.jsx("td",{className:"px-4 py-3 text-right",children:a.jsxs("div",{className:"flex items-center justify-end gap-2",children:[a.jsx("button",{onClick:()=>Qe(oe),className:"inline-flex items-center px-2.5 py-1.5 text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors",title:"Edit",children:a.jsx($O,{className:"w-3.5 h-3.5"})}),a.jsx("button",{onClick:()=>
8938Ut(oe),className:"inline-flex items-center px-2.5 py-1.5 text-xs font-medium text-red-700 bg-white border border-red-300 rounded-md hover:bg-red-50 transition-colors",title:"Delete",children:a.jsx(gg,{className:"w-3.5 h-3.5"})})]})})]},oe.id))})]})})})]}),Wt=()=>I?a.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:a.jsxs("div",{className:"flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:p-0",children:[a.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity",onClick:$e}),a.jsxs("div",{className:"relative inline-block w-full max-w-lg p-6 my-8 text-left align-middle bg-white rounded-xl shadow-xl transform transition-all",children:[a.jsxs("div",{className:"flex items-center justify-between mb-6",children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:B?"Edit Team Member":"Invite Team Member"}),a.jsx("button",{onClick:$e,className:"text-gray-400 hover:text-gray-600 transition-colors",children:a.jsx($1,{className:"w-5 h-5"})})]}),a.jsxs("form",{onSubmit:Ct,className:"space-y-5",children:[a.jsxs("div",{children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Name ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx("input",{type:"text",value:P.name,onChange:oe=>z(Te=>({...Te,name:oe.target.value})),className:`w-full px-3 py-2 border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 ${W.name?"border-red-300":"border-gray-300"}`,placeholder:"Enter full name"}),W.name&&a.jsx("p",{className:"mt-1 text-xs text-red-600",children:Array.isArray(W.name)?W.name[0]:W.name})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Email ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx("input",{type:"email",value:P.email,onChange:oe=>z(Te=>({...Te,email:oe.target.value})),className:`w-full px-3 py-2 border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 ${W.email?"border-red-300":"border-gray-300"}`,placeholder:"Enter email address"}),W.email&&a.jsx("p",{className:"mt-1 text-xs text-red-600",children:Array.isArray(W.email)?W.email[0]:W.email})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Role ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsxs("div",{className:"relative",children:[a.jsxs("select",{value:P.role_id,onChange:oe=>z(Te=>({...Te,role_id:oe.target.value})),className:`appearance-none w-full px-3 py-2 border rounded-lg text-sm bg-white focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 ${W.role_id?"border-red-300":"border-gray-300"}`,children:[a.jsx("option",{value:"",children:"Select a role..."}),(Array.isArray(he)?he:[]).map(oe=>a.jsx("option",{value:oe.id,children:oe.name},oe.id))]}),a.jsx(VO,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 pointer-events-none"})]}),W.role_id&&a.jsx("p",{className:"mt-1 text-xs text-red-600",children:Array.isArray(W.role_id)?W.role_id[0]:W.role_id})]}),Ve.length>0&&a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Site Access"}),a.jsx("div",{className:"border border-gray-200 rounded-lg p-3 max-h-40 overflow-y-auto space-y-2",children:Ve.map(oe=>a.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[a.jsx("input",{type:"checkbox",checked:P.site_ids.includes(oe.id),onChange:()=>Ke(oe.id),className:"rounded border-gray-300 text-primary-600 focus:ring-primary-500"}),a.jsx("span",{className:"text-sm text-gray-700",children:oe.name}),a.jsx("span",{className:"text-xs text-gray-400",children:oe.url})]},oe.id))})]}),a.jsxs("div",{className:"flex gap-3 pt-2",children:[a.jsx("button",{type:"button",onClick:$e,disabled:F,className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 transition-colors disabled:opacity-50",children:"Cancel"}),a.jsx("button",{type:"submit",disabled:F,className:"flex-1 inline-flex items-center justify-center px-4 py-2 bg-primary-600 text-white rounded-lg text-sm font-medium hover:bg-primary-700 transition-colors disabled:opacity-50",children:F?a.jsxs(a.Fragment,{children:[a.jsx(jl,{className:"h-4 w-4 mr-2"})," ",B?"Saving...":"Sending..."]}):B?"Save Changes":"Send Invitation"})]})]})]})]})}):null,Be=()=>Q?a.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:a.jsxs("div",{className:"flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:p-0",children:[a.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity",onClick:Ze}),a.jsxs("div",{className:"relative inline-block w-full max-w-lg p-6 my-8 text-left align-middle bg-white rounded-xl shadow-xl transform transition-all",children:[a.jsxs("div",{className:"flex items-center justify-between mb-6",children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:pe?"Edit Role":"Create Role"}),a.jsx("button",{onClick:Ze,className:"text-gray-400 hover:text-gray-600 transition-colors",children:a.jsx($1,{className:"w-5 h-5"})})]}),a.jsxs("form",{onSubmit:dn,className:"space-y-5",children:[a.jsxs("div",{children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Role Name ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx("input",{type:"text",value:re.name,onChange:oe=>ye(Te=>({...Te,name:oe.target.value})),className:`w-full px-3 py-2 border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 ${Me.name?"border-red-300":"border-gray-300"}`,placeholder:"e.g. Editor, Viewer, Manager"}),Me.name&&a.jsx("p",{className:"mt-1 text-xs text-red-600",children:Array.isArray(Me.name)?Me.name[0]:Me.name})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),a.jsx("textarea",{value:re.description,onChange:oe=>ye(Te=>({...Te,description:oe.target.value})),rows:3,className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 resize-none",placeholder:"Briefly describe what this role can do..."})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Permissions ",a.jsx("span",{className:"text-red-500",children:"*"})]}),Me.permissions&&a.jsx("p",{className:"mb-2 text-xs text-red-600",children:Array.isArray(Me.permissions)?Me.permissions[0]:Me.permissions}),a.jsx("div",{className:"border border-gray-200 rounded-lg p-4",children:a.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:ot.map(oe=>{const Te=oe.key||oe,pt=oe.label||Lr(Te);return a.jsxs("label",{className:`flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer transition-colors ${re.permissions.includes(Te)?"border-primary-300 bg-primary-50":"border-gray-200 bg-white hover:bg-gray-50"}`,children:[a.jsx("input",{type:"checkbox",checked:re.permissions.includes(Te),onChange:()=>fi(Te),className:"rounded border-gray-300 text-primary-600 focus:ring-primary-500"}),a.jsx("span",{className:"text-sm text-gray-700",children:pt})]},Te)})})})]}),a.jsxs("div",{className:"flex gap-3 pt-2",children:[a.jsx("button",{type:"button",onClick:Ze,disabled:Oe,className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 transition-colors disabled:opacity-50",children:"Cancel"}),a.jsx("button",{type:"submit",disabled:Oe,className:"flex-1 inline-flex items-center justify-center px-4 py-2 bg-primary-600 text-white rounded-lg text-sm font-medium hover:bg-primary-700 transition-colors disabled:opacity-50",children:Oe?a.jsxs(a.Fragment,{children:[a.jsx(jl,{className:"h-4 w-4 mr-2"})," ",pe?"Saving...":"Creating..."]}):pe?"Save Changes":"Create Role"})]})]})]})]})}):null;return a.jsxs("div",{className:"p-6 sm:p-8 max-w-7xl mx-auto",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Team Management"}),a.jsx("p",{className:"mt-1 text-gray-500",children:"Manage your team members, roles, and permissions."})]}),i&&a.jsx(NCe,{type:i.type,message:i.message,onClose:()=>s(null)}),a.jsx("div",{className:"mb-6",children:a.jsx("div",{className:"border-b border-gray-200",children:a.jsxs("nav",{className:"flex space-x-6","aria-label":"Team tabs",children:[a.jsxs("button",{onClick:()=>n("users"),className:`flex items-center space-x-2 py-3 px-1 border-b-2 font-medium text-sm transition-colors whitespace-nowrap ${e==="users"?"border-primary-500 text-primary-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[a.jsx(FO,{className:`w-5 h-5 ${e==="users"?"text-primary-600":"text-gray-400"}`}),a.jsx("span",{children:"Users"}),!g&&h.length>0&&a.jsx("span",{className:`ml-1 px-2 py-0.5 rounded-full text-xs font-medium ${e==="users"?"bg-primary-100 text-primary-700":"bg-gray-100 text-gray-600"}`,children:h.length})]}),a.jsxs("button",{onClick:()=>n("roles"),className:`flex items-center space-x-2 py-3 px-1 border-b-2 font-medium text-sm transition-colors whitespace-nowrap ${e==="roles"?"border-primary-500 text-primary-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[a.jsx(Ov,{className:`w-5 h-5 ${e==="roles"?"text-primary-600":"text-gray-400"}`}),a.jsx("span",{children:"Roles"}),!le&&(Array.isArray(he)?he:[]).length>0&&a.jsx("span",{className:`ml-1 px-2 py-0.5 rounded-full text-xs font-medium ${e==="roles"?"bg-primary-100 text-primary-700":"bg-gray-100 text-gray-600"}`,children:(Array.isArray(he)?he:[]).length})]})]})})}),e==="users"&&_t(),e==="roles"&&An(),Wt(),Be(),a.jsx(UO,{isOpen:G.isOpen,title:"Remove Team Member",message:`Are you sure you want to remove "${((tt=G.user)==null?void 0:tt.name)||((st=G.user)==null?void 0:st.email)||""}"? They will lose access to this team immediately.`,onConfirm:Xe,onCancel:()=>Z({isOpen:!1,user:null}),loading:se}),a.jsx(UO,{isOpen:fe.isOpen,title:"Delete Role",message:`Are you sure you want to delete the "${((Bt=fe.role)==null?void 0:Bt.name)||""}" role? Members assigned to this role may lose their permissions.`,onConfirm:Yr,onCancel:()=>Ne({isOpen:!1,role:null}),loading:Ue})]})}const SCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"})}),DCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})}),WO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.042A8.967 8.967 0 006 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 016 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 016-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0018 18a8.967 8.967 0 00-6 2.292m0-14.25v14.25"})}),HO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"})}),GO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z"})}),qO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 001.5-.189m-1.5.189a6.01 6.01 0 01-1.5-.189m3.75 7.478a12.06 12.06 0 01-4.5 0m3.75 2.383a14.406 14.406 0 01-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 10-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"})}),TCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})}),fa=({text:e})=>{const[n,i]=j.useState(!1);return a.jsxs("span",{className:"relative inline-flex ml-1.5",children:[a.jsx("button",{type:"button",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onClick:()=>i(!n),className:"text-gray-400 hover:text-gray-600 transition-colors focus:outline-none",children:a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"})})}),n&&a.jsxs("div",{className:"absolute z-50 bottom-full left-1/2 -translate-x-1/2 mb-2 w-64 px-3 py-2 text-xs text-white bg-gray-900 rounded-lg shadow-lg",children:[e,a.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 -mt-1",children:a.jsx("div",{className:"border-4 border-transparent border-t-gray-900"})})]})]})},KO={product:{bg:"bg-purple-500",dot:"bg-purple-400",text:"text-purple-700"},category:{bg:"bg-blue-500",dot:"bg-blue-400",text:"text-blue-700"},general:{bg:"bg-gray-400",dot:"bg-gray-300",text:"text-gray-600"},topic:{bg:"bg-gray-400",dot:"bg-gray-300",text:"text-gray-600"}};function Lv(e){if(!e)return"Never";const n=new Date(e),s=new Date-n,d=Math.floor(s/(1e3*60*60*24));return d===0?"Today":d===1?"Yesterday":d<7?`${d} days ago`:d<30?`${Math.floor(d/7)} week${Math.floor(d/7)>1?"s":""} ago`:`${Math.floor(d/30)} month${Math.floor(d/30)>1?"s":""} ago`}function ICe(){var it,Ve,mt,ut,Fe;const{siteId:e}=sc(),n=Ot(),{setActiveSite:i}=ui(),[s,d]=j.useState(null),[h,f]=j.useState(!0),[g,p]=j.useState(""),[x,y]=j.useState(""),[v,w]=j.useState(null),[C,E]=j.useState(!1),[S,D]=j.useState(""),I=j.useRef(null),[M,B]=j.useState([]),[R,F]=j.useState([]),[V,P]=j.useState(!1),[z,W]=j.useState(null),[K,G]=j.useState([]),[Z,se]=j.useState(()=>{try{return JSON.parse(localStorage.getItem("dismissed_suggestions")||"[]")}catch{return[]}});j.useEffect(()=>(e&&(i(parseInt(e)),ge()),()=>
8938{I.current&&clearInterval(I.current)}),[e]);const ge=async()=>{f(!0);try{await Promise.all([Se(),Ae(),he(),ee(),le()])}catch(ue){console.error("Failed to load content sync data",ue)}finally{f(!1)}},Se=async()=>{const ue=await ne.get(`/sites/${e}`);d(ue.data)},Ae=async()=>{const ue=await ne.get(`/sites/${e}/resync/status`);return w(ue.data),ue.data},he=async()=>{const ue=await ne.get(`/sites/${e}/topics`);B(Array.isArray(ue.data)?ue.data:[])},ee=async()=>{try{const ue=await ne.get(`/sites/${e}/content-summary`);W(ue.data)}catch(ue){console.error("Failed to load content summary",ue)}},le=async()=>{var ue;try{const Re=await ne.get(`/sites/${e}/content-suggestions`);G(((ue=Re.data)==null?void 0:ue.suggestions)||[])}catch(Re){console.error("Failed to load suggestions",Re)}},je=()=>{I.current&&clearInterval(I.current),I.current=setInterval(async()=>{try{const ue=await Ae();(ue.resync_status==="completed"||ue.resync_status==="failed"||!ue.resync_status)&&(clearInterval(I.current),I.current=null,E(!1),D(""),ue.resync_status==="completed"?(y("Sync completed successfully!"),await Promise.all([he(),ee(),le()])):ue.resync_status==="failed"&&p(ue.resync_error||"Sync failed. Please try again."))}catch(ue){console.error("Polling error",ue)}},3e3)},ve=async()=>{var ue,Re;p(""),y(""),E(!0),D("full");try{await ne.post(`/sites/${e}/resync`),je()}catch(ke){E(!1),D(""),p(((Re=(ue=ke.response)==null?void 0:ue.data)==null?void 0:Re.error)||"Failed to start sync")}},Ce=async()=>{var ue,Re;p(""),y(""),E(!0),D("crawling");try{await ne.post(`/sites/${e}/resync`),je()}catch(ke){E(!1),D(""),p(((Re=(ue=ke.response)==null?void 0:ue.data)==null?void 0:Re.error)||"Failed to start crawl")}},Q=async()=>{var ue,Re,ke;p(""),y(""),E(!0),D("generating_topics");try{const $e=await ne.post(`/sites/${e}/resync/topics`);E(!1),D(""),y(((ue=$e.data)==null?void 0:ue.message)||"Topics refreshed!"),await Promise.all([he(),Ae(),le()])}catch($e){E(!1),D(""),p(((ke=(Re=$e.response)==null?void 0:Re.data)==null?void 0:ke.error)||"Failed to refresh topics")}},te=async()=>{var ue,Re,ke;p(""),y(""),E(!0),D("discovering_keywords");try{const $e=await ne.post(`/sites/${e}/resync/keywords`,{topic_ids:R.length>0?R:void 0,clear_stale:V});E(!1),D(""),y(((ue=$e.data)==null?void 0:ue.message)||"Keywords refreshed!"),F([]),await Promise.all([he(),Ae(),le()])}catch($e){E(!1),D(""),p(((ke=(Re=$e.response)==null?void 0:Re.data)==null?void 0:ke.error)||"Failed to refresh keywords")}},pe=ue=>{F(Re=>Re.includes(ue)?Re.filter(ke=>ke!==ue):[...Re,ue])},be=()=>{R.length===M.length?F([]):F(M.map(ue=>ue.id))},Oe=ue=>{const Re=[...Z,ue];se(Re),localStorage.setItem("dismissed_suggestions",JSON.stringify(Re))},at=ue=>{var Re,ke,$e,lt;if(ue.action_type==="recrawl")Ce();else if(ue.action_type==="refresh_keywords")(Re=ue.action_data)!=null&&Re.topic_ids&&F(ue.action_data.topic_ids),(ke=document.getElementById("keywords-card"))==null||ke.scrollIntoView({behavior:"smooth"});else if(ue.action_type==="create_blog"){const Ct=new URLSearchParams;($e=ue.action_data)!=null&&$e.target_type&&Ct.set("target_type",ue.action_data.target_type),(lt=ue.action_data)!=null&<.target_category_name&&Ct.set("target_category_name",ue.action_data.target_category_name),n(`/user/blogs/create?${Ct.toString()}`)}else ue.action_type==="settings"&&n(`/user/automation/${e}`)},re=(s==null?void 0:s.platform_type)==="woocommerce"||(s==null?void 0:s.platform_type)==="opencart",ye=!["custom","blogbotz"].includes(s==null?void 0:s.platform_type),Me=K.filter(ue=>!Z.includes(ue.type)),fe=(()=>{const ue=new Date,Re=new Date(ue);Re.setDate(ue.getDate()-ue.getDay()+1);const ke=[];for(let $e=0;$e<7;$e++){const lt=new Date(Re);lt.setDate(Re.getDate()+$e),ke.push(lt)}return ke})(),Ne=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ue=ue=>z!=null&&z.queue_items?z.queue_items.find(Re=>Re.estimated_at?new Date(Re.estimated_at).toDateString()===ue.toDateString():!1):null;return h?a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):a.jsxs("div",{className:"p-6 sm:p-8 max-w-5xl mx-auto",children:[a.jsxs("div",{className:"mb-8",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Content Sync"}),a.jsx(fa,{text:"Content Sync keeps your blog strategy up-to-date by analyzing your website, discovering relevant topics, and finding trending keywords. It's completely free â no credits are used for any sync operation."})]}),a.jsx("p",{className:"mt-1 text-gray-500",children:"Keep your blog content fresh and relevant. All sync operations are free â no credits used."})]}),g&&a.jsx("div",{className:"mb-6",children:a.jsx(en,{type:"error",message:g,onClose:()=>p("")})}),x&&a.jsx("div",{className:"mb-6",children:a.jsx(en,{type:"success",message:x,onClose:()=>y("")})}),C&&a.jsx("div",{className:"mb-6 bg-primary-50 border border-primary-200 rounded-xl p-4",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("svg",{className:"animate-spin h-5 w-5 text-primary-600",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-primary-800",children:S==="full"?"Running full sync...":S==="crawling"?"Analyzing your website...":S==="generating_topics"?"Finding new topics...":S==="discovering_keywords"?"Discovering keywords...":"Syncing..."}),a.jsx("p",{className:"text-xs text-primary-600 mt-0.5",children:(v==null?void 0:v.resync_status)==="crawling"?"Crawling your website for new content...":(v==null?void 0:v.resync_status)==="generating_topics"?"Analyzing content to discover topics...":(v==null?void 0:v.resync_status)==="discovering_keywords"?"Finding trending keywords for your topics...":"This may take a minute. Please wait."})]})]})}),z&&a.jsxs("div",{className:"card p-6 mb-6",children:[a.jsxs("div",{className:"flex items-center mb-4",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Upcoming Blog Queue â This Week"}),a.jsx(fa,{text:"Shows which topics and keywords are queued for upcoming blog generation. Each colored icon represents a queued item that will be auto-generated: purple = product-focused, blue = category-focused, gray = general topic. Once generated, blogs will be automatically approved and ready to publish (or sent for review if auto-publish is disabled)."})]}),a.jsx("div",{className:"grid grid-cols-7 gap-2 mb-4",children:fe.map((ue,Re)=>{const ke=Ue(ue),$e=ue.toDateString()===new Date().toDateString(),lt=ue<new Date&&!$e,Ct=(ke==null?void 0:ke.target_type)||"topic",we=KO[Ct]||KO.topic;return a.jsxs("div",{className:`text-center ${lt?"opacity-50":""}`,children:[a.jsx("p",{className:`text-xs font-medium mb-1 ${$e?"text-primary-600":"text-gray-500"}`,children:Ne[Re]}
8938),a.jsx("div",{className:`h-14 rounded-lg border-2 flex items-center justify-center ${$e?"border-primary-300 bg-primary-50":"border-gray-100 bg-gray-50"}`,children:ke?a.jsx("div",{className:`w-8 h-8 rounded-lg ${we.bg} flex items-center justify-center`,children:Ct==="product"?a.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"})}):Ct==="category"?a.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}):a.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 01-2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 002.25 2.25h13.5M6 7.5h3v3H6V7.5z"})})}):a.jsx("span",{className:"text-xs text-gray-300",children:"â"})}),ke&&a.jsx("p",{className:"text-[10px] text-gray-500 mt-1 truncate px-1",title:ke.keyword||ke.topic_name||"",children:ke.keyword||ke.topic_name||""})]},Re)})}),a.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm text-gray-600",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"w-3 h-3 rounded bg-purple-500 inline-block"}),((it=z.this_week)==null?void 0:it.product)||0," product"]}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"w-3 h-3 rounded bg-blue-500 inline-block"}),((Ve=z.this_week)==null?void 0:Ve.category)||0," category"]}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"w-3 h-3 rounded bg-gray-400 inline-block"}),((mt=z.this_week)==null?void 0:mt.general)||0," general"]}),a.jsx("span",{className:"text-gray-400 mx-1",children:"|"}),a.jsxs("span",{className:"font-medium",children:[((ut=z.this_week)==null?void 0:ut.total)||0," generated this week"]}),a.jsx("span",{className:"text-gray-400",children:"/"}),a.jsxs("span",{children:[((Fe=z.this_month)==null?void 0:Fe.total)||0," this month"]})]}),re&&z.coverage&&a.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-100 space-y-2",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500 mb-1",children:[a.jsx("span",{children:"Categories covered"}),a.jsxs("span",{children:[z.coverage.categories_with_blogs,"/",z.coverage.categories_total]})]}),a.jsx("div",{className:"w-full h-2 bg-gray-100 rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-blue-500 rounded-full transition-all",style:{width:`${z.coverage.categories_total>0?z.coverage.categories_with_blogs/z.coverage.categories_total*100:0}%`}})})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500 mb-1",children:[a.jsx("span",{children:"Products covered"}),a.jsxs("span",{children:[z.coverage.products_with_blogs,"/",z.coverage.products_total]})]}),a.jsx("div",{className:"w-full h-2 bg-gray-100 rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-purple-500 rounded-full transition-all",style:{width:`${z.coverage.products_total>0?z.coverage.products_with_blogs/z.coverage.products_total*100:0}%`}})})]})]})]}),Me.length>0&&a.jsxs("div",{className:"card p-6 mb-6",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx(qO,{className:"w-5 h-5 text-amber-500"}),a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Suggestions"}),a.jsx(fa,{text:"Smart suggestions based on your content strategy. We analyze your topics, keywords, and website data to recommend actions like refreshing stale keywords, covering gaps in your content, or re-analyzing your site after changes."})]}),a.jsx("div",{className:"space-y-3",children:Me.map((ue,Re)=>a.jsxs("div",{className:"flex items-start gap-3 p-3 bg-gray-50 rounded-lg border border-gray-100",children:[a.jsx("div",{className:"flex-shrink-0 mt-0.5",children:ue.priority==="high"?a.jsx(TCe,{className:"w-5 h-5 text-amber-500"}):a.jsx(qO,{className:"w-5 h-5 text-gray-400"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-gray-900",children:ue.title}),a.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:ue.description}),a.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[a.jsx("button",{onClick:()=>at(ue),disabled:C,className:"text-xs px-3 py-1 bg-primary-600 text-white rounded-lg hover:bg-primary-700 transition-colors disabled:opacity-50",children:ue.action_label}),a.jsx("button",{onClick:()=>Oe(ue.type),className:"text-xs text-gray-400 hover:text-gray-600",children:"Dismiss"})]})]})]},Re))})]}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[a.jsxs("div",{className:"card p-6",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-indigo-100 flex items-center justify-center",children:a.jsx(DCe,{className:"w-5 h-5 text-indigo-600"})}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx("h3",{className:"font-semibold text-gray-900",children:"Your Website"}),a.jsx(fa,{text:"We crawl your website to understand its structure, products, categories, and pages. This data is used to generate relevant blog topics. Re-analyze after adding new products or pages to your site."})]}),a.jsxs("p",{className:"text-xs text-gray-500",children:["Last analyzed: ",Lv(v==null?void 0:v.last_crawled_at)]})]})]}),a.jsxs("div",{className:"space-y-2 mb-4 text-sm text-gray-600",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{children:"Platform"}),a.jsx("span",{className:"font-medium text-gray-900 capitalize",children:(v==null?void 0:v.platform_type)==="custom"?"Custom API":(v==null?void 0:v.platform_type)||"Not detected"})]}),re&&(z==null?void 0:z.coverage)&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{children:"Products"}),a.jsx("span",{className:"font-medium text-gray-900",children:z.coverage.products_total})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{children:"Categories"}),a.jsx("span",{className:"font-medium text-gray-900",children:z.coverage.categories_total})]})]})]}),ye?a.jsxs("button",{onClick:Ce,disabled:C,className:"w-full btn-secondary text-sm disabled:opacity-50",children:[a.jsx(SCe,{className:"w-4 h-4 mr-2 inline"}),"Re-analyze My Website"]}):a.jsxs("p",{className:"text-xs text-gray-400 text-center",children:["Website crawling is not available for ",(s==null?void 0:s.platform_type)==="custom"?"Custom API":"this platform type",". Topics and keywords can be managed manually."]})]}),a.jsxs("div",{className:"card p-6",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-green-100 flex items-center justify-center",children:a.jsx(WO,{className:"w-5 h-5 text-green-600"})}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx("h3",{className:"font-semibold text-gray-900",children:"Blog Topics"}),a.jsx(fa,{text:"Topics are the themes your blogs are written about (e.g. 'Web Development Trends'). We auto-discover topics from your website content. Finding new topics won't remove existing ones â it only adds new ones."})]}),a.jsxs("p",{className:"text-xs text-gray-500",children:[(v==null?void 0:v.topic_count)||0," active topics · Last discovered: ",Lv(v==null?void 0:v.topics_last_generated_at)]})]})]}),a.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Discover new topics from your website content. Existing topics are kept."}),a.jsxs("button",{onClick:Q,disabled:C,className:"w-full btn-secondary text-sm disabled:opacity-50",children:[a.jsx(WO,{className:"w-4 h-4 mr-2 inline"}),"Find New Topics"]})]}),a.jsxs("div",{id:"keywords-card",className:"card p-6 md:col-span-2",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-amber-100 flex items-center justify-center",children:a.jsx(HO,{className:"w-5 h-5 text-amber-600"})}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx("h3",{className:"font-semibold text-gray-900",children:"Keywords"}),a.jsx(fa,{text:"Keywords are specific search terms used to write blog posts (e.g. 'best React frameworks 2025'). Each topic has multiple keywords. Refreshing finds new trending keywords and optionally removes outdated ones. Select specific topics or refresh all at once."})]}),a.jsxs("p",{className:"text-xs text-gray-500",children:[(v==null?void 0:v.keyword_count)||0," keywords across ",(v==null?void 0:v.topic_count)||0," topics"]})]})]}),M.length>0&&a.jsxs("div",{className:"mb-4",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("p",{className:"text-sm text-gray-700 font-medium",children:"Select topics to refresh:"}),a.jsx("button",{onClick:be,className:"text-xs text-primary-600 hover:text-primary-700",children:R.length===M.length?"Deselect all":"Select all"})]}),a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2 max-h-48 overflow-y-auto",children:M.map(ue=>a.jsxs("label",{className:`flex items-center gap-2 p-2 rounded-lg border cursor-pointer transition-colors ${R.includes(ue.id)?"border-primary-300 bg-primary-50":"border-gray-200 hover:border-gray-300"}`,children:[a.jsx("input",{type:"checkbox",checked:R.includes(ue.id),onChange:()=>pe(ue.id),className:"w-4 h-4 text-primary-600 border-gray-300 rounded focus:ring-primary-500"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:ue.name}),a.jsxs("p",{className:"text-xs text-gray-500",children:[ue.trending_keywords_count||0," keywords",ue.keywords_last_refreshed_at&&a.jsxs("span",{className:"ml-1",children:["· ",Lv(ue.keywords_last_refreshed_at)]})]})]})]},ue.id))})]}),a.jsx("div",{className:"mb-4",children:a.jsxs("label",{className:"flex items-center cursor-pointer",children:[a.jsx("input",{type:"checkbox",checked:V,onChange:ue=>P(ue.target.checked),className:"w-4 h-4 text-primary-600 border-gray-300 rounded focus:ring-primary-500"}),a.jsx("span",{className:"ml-2 text-sm text-gray-700",children:"Remove outdated keywords first"}),a.jsx(fa,{text:"Deletes keywords that haven't been used in a blog post and are older than 60 days. This keeps your keyword list fresh and prevents writing about outdated trends."})]})}),a.jsxs("button",{onClick:te,disabled:C,className:"btn-secondary text-sm disabled:opacity-50",children:[a.jsx(HO,{className:"w-4 h-4 mr-2 inline"}),"Refresh Keywords",R.length>0&&a.jsxs("span",{className:"ml-1",children:["(",R.length," topic",R.length>
89381?"s":"",")"]})]})]})]}),a.jsx("div",{className:"mt-6 card p-6 bg-gradient-to-r from-primary-50 to-indigo-50 border border-primary-200",children:a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary-600 flex items-center justify-center",children:a.jsx(GO,{className:"w-5 h-5 text-white"})}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx("h3",{className:"font-semibold text-gray-900",children:"One-Click Full Sync"}),a.jsx(fa,{text:"Runs all three steps in order: 1) Re-analyzes your website for new content, 2) Discovers new blog topics, 3) Refreshes keywords for all topics. Use this after making major changes to your website."})]}),a.jsx("p",{className:"text-sm text-gray-600",children:ye?"Re-analyze website, find new topics, and refresh all keywords":"Find new topics and refresh all keywords"})]})]}),a.jsx("button",{onClick:ve,disabled:C,className:"btn-primary disabled:opacity-50",children:C?a.jsxs("span",{className:"flex items-center",children:[a.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Syncing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(GO,{className:"w-4 h-4 mr-2"}),"Full Sync"]})})]})})]})}const YO=({className:e})=>a.jsxs("svg",{className:`animate-spin ${e||""}`,fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),QO=({className:e})=>a.jsxs("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),ZO=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})});function MCe(){var le,je,ve;const[e]=Do(),n=Ot(),i=e.get("token")||"",[s,d]=j.useState(!0),[h,f]=j.useState(null),[g,p]=j.useState(""),[x,y]=j.useState(""),[v,w]=j.useState(""),[C,E]=j.useState(""),[S,D]=j.useState(!1),[I,M]=j.useState(!1),[B,R]=j.useState({}),[F,V]=j.useState(""),[P,z]=j.useState(""),[W,K]=j.useState(!1),[G,Z]=j.useState(""),[se,ge]=j.useState("BlogBotz");j.useEffect(()=>{Se()},[]),j.useEffect(()=>{i?Ae():(d(!1),p("No invitation token provided. Please use the link from your email."))},[i]);const Se=async()=>
8938{try{const Q=(await ne.get("/website-settings/public")).data.general||{},te=Q.site_logo||Q.footer_logo;te&&Z(te),Q.site_name&&ge(Q.site_name)}catch(Ce){console.error("Failed to load website settings:",Ce)}},Ae=async()=>{var Ce,Q,te,pe,be,Oe,at;d(!0),p("");try{const re=await ne.get(`/team/invitation/${i}`);f(((Ce=re.data)==null?void 0:Ce.invitation)||re.data),y(((te=(Q=re.data)==null?void 0:Q.invitation)==null?void 0:te.name)||((pe=re.data)==null?void 0:pe.name)||"")}catch(re){const ye=(be=re.response)==null?void 0:be.status,Me=((at=(Oe=re.response)==null?void 0:Oe.data)==null?void 0:at.message)||"";ye===410||Me.toLowerCase().includes("expired")?p("This invitation has expired. Please ask the team owner to send a new invitation."):ye===409||Me.toLowerCase().includes("already accepted")||Me.toLowerCase().includes("already been accepted")?p("This invitation has already been accepted. You can sign in with your account."):p(ye===404?"This invitation link is invalid. Please check your email for the correct link.":Me||"This invitation link is invalid or has expired.")}finally{d(!1)}},he=()=>{const Ce={};return x.trim()||(Ce.name="Name is required"),v?v.length<8&&(Ce.password="Password must be at least 8 characters"):Ce.password="Password is required",C?v!==C&&(Ce.passwordConfirmation="Passwords do not match"):Ce.passwordConfirmation="Please confirm your password",R(Ce),Object.keys(Ce).length===0},ee=async Ce=>{var Q,te,pe,be;if(Ce.preventDefault(),V(""),z(""),R({}),!!he()){K(!0);try{await ne.post("/team/accept-invitation",{token:i,name:x.trim(),password:v,password_confirmation:C}),z("Invitation accepted successfully! Redirecting to login..."),setTimeout(()=>{n("/user/login?success="+encodeURIComponent("Account created successfully. Please sign in with your new credentials."))},2e3)}catch(Oe){(te=(Q=Oe.response)==null?void 0:Q.data)!=null&&te.errors?R(Oe.response.data.errors):V(((be=(pe=Oe.response)==null?void 0:pe.data)==null?void 0:be.message)||"Failed to accept invitation. Please try again.")}finally{K(!1)}}};return s?a.jsxs("div",{className:"min-h-screen flex relative",children:[a.jsxs("div",{className:"hidden lg:flex lg:w-1/2 bg-gradient-to-br from-blue-600 via-blue-700 to-blue-800 fixed left-0 top-0 h-screen z-0 overflow-hidden",children:[a.jsx("div",{className:"absolute inset-0 opacity-[0.07]",children:a.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[a.jsx("defs",{children:a.jsx("pattern",{id:"grid-invite-loading",width:"8",height:"8",patternUnits:"userSpaceOnUse",children:a.jsx("path",{d:"M 8 0 L 0 0 0 8",fill:"none",stroke:"white",strokeWidth:"0.5"})})}),a.jsx("rect",{width:"100",height:"100",fill:"url(#grid-invite-loading)"})]})}),a.jsx("div",{className:"absolute top-32 right-16 w-40 h-40 bg-blue-400/20 rounded-full blur-3xl"}),a.jsx("div",{className:"absolute bottom-32 left-16 w-56 h-56 bg-blue-300/15 rounded-full blur-3xl"}),a.jsxs("div",{className:"relative z-10 flex flex-col justify-center h-full px-8 xl:px-16 w-full",children:[a.jsx("div",{className:"mb-6",children:G?a.jsx("div",{className:"inline-block bg-white rounded-xl px-4 py-2 shadow-lg",children:a.jsx("img",{src:G.startsWith("http")?G:`/storage/${G}`,alt:se,className:"h-10 w-auto object-contain"})}):a.jsx("div",{className:"w-12 h-12 bg-white rounded-xl flex items-center justify-center shadow-lg",children:a.jsx("svg",{className:"w-7 h-7 text-blue-600",fill:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"})})})}),a.jsxs("h1",{className:"text-3xl xl:text-4xl font-bold text-white leading-tight mb-4",children:["Join the Team,",a.jsx("br",{}),a.jsx("span",{className:"text-blue-200",children:"Create Together"})]}),a.jsxs("p",{className:"text-base text-blue-100 mb-6 max-w-md",children:["Collaborate with your team to create amazing content with ",se,"."]})]})]}),a.jsx("div",{className:"flex-1 lg:ml-[50%] min-h-screen lg:min-h-0 lg:h-screen bg-gray-50 relative z-10 lg:overflow-hidden",children:a.jsx("div",{className:"flex flex-col justify-center items-center h-full px-6 sm:px-8 lg:px-10 xl:px-12 py-6 lg:py-4",children:a.jsxs("div",{className:"w-full max-w-md mx-auto text-center",children:[a.jsx(YO,{className:"w-10 h-10 text-blue-600 mx-auto mb-4"}),a.jsx("p",{className:"text-gray-600 text-sm font-medium",children:"Validating your invitation..."})]})})})]}):g?a.jsxs("div",{className:"min-h-screen flex relative",children:[a.jsxs("div",{className:"hidden lg:flex lg:w-1/2 bg-gradient-to-br from-blue-600 via-blue-700 to-blue-800 fixed left-0 top-0 h-screen z-0 overflow-hidden",children:[a.jsx("div",{className:"absolute inset-0 opacity-[0.07]",children:a.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[a.jsx("defs",{children:a.jsx("pattern",{id:"grid-invite-error",width:"8",he
8938ight:"8",patternUnits:"userSpaceOnUse",children:a.jsx("path",{d:"M 8 0 L 0 0 0 8",fill:"none",stroke:"white",strokeWidth:"0.5"})})}),a.jsx("rect",{width:"100",height:"100",fill:"url(#grid-invite-error)"})]})}),a.jsx("div",{className:"absolute top-32 right-16 w-40 h-40 bg-blue-400/20 rounded-full blur-3xl"}),a.jsx("div",{className:"absolute bottom-32 left-16 w-56 h-56 bg-blue-300/15 rounded-full blur-3xl"}),a.jsxs("div",{className:"relative z-10 flex flex-col justify-center h-full px-8 xl:px-16 w-full",children:[a.jsx("div",{className:"mb-6",children:G?a.jsx("div",{className:"inline-block bg-white rounded-xl px-4 py-2 shadow-lg",children:a.jsx("img",{src:G.startsWith("http")?G:`/storage/${G}`,alt:se,className:"h-10 w-auto object-contain"})}):a.jsx("div",{className:"w-12 h-12 bg-white rounded-xl flex items-center justify-center shadow-lg",children:a.jsx("svg",{className:"w-7 h-7 text-blue-600",fill:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"})})})}),a.jsxs("h1",{className:"text-3xl xl:text-4xl font-bold text-white leading-tight mb-4",children:["Join the Team,",a.jsx("br",{}),a.jsx("span",{className:"text-blue-200",children:"Create Together"})]}),a.jsxs("p",{className:"text-base text-blue-100 mb-6 max-w-md",children:["Collaborate with your team to create amazing content with ",se,"."]})]})]}),a.jsx("div",{className:"flex-1 lg:ml-[50%] min-h-screen lg:min-h-0 lg:h-screen bg-gray-50 relative z-10 lg:overflow-hidden",children:a.jsx("div",{className:"flex flex-col justify-center h-full px-6 sm:px-8 lg:px-10 xl:px-12 py-6 lg:py-4",children:a.jsxs("div",{className:"w-full max-w-md mx-auto",children:[a.jsx("div",{className:"lg:hidden flex items-center justify-center gap-3 mb-6",children:G?a.jsx("img",{src:G.startsWith("http")?G:`/storage/${G}`,alt:se,className:"h-8 w-auto object-contain"}):a.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-lg flex items-center justify-center shadow-lg",children:a.jsx("svg",{className:"w-5 h-5 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"})})})}),a.jsxs("div",{className:"text-center mb-6",children:[a.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx("svg",{className:"w-8 h-8 text-red-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})})}),a.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Invitation Unavailable"}),a.jsx("p",{className:"text-sm text-gray-600",children:g})]}),a.jsxs("div",{className:"space-y-3",children:[a.jsx(Fn,{to:"/user/login",className:"w-full py-2.5 px-4 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg shadow-md shadow-blue-600/25 hover:shadow-blue-600/35 transition-all duration-200 flex items-center justify-center gap-2 text-sm",children:"Go to Sign In"}),a.jsx(Fn,{to:"/signup",className:"w-full py-2.5 px-4 bg-white border border-gray-300 rounded-lg font-medium text-gray-700 hover:bg-gray-50 hover:border-gray-400 transition-all duration-200 flex items-center justify-center gap-2 text-sm",children:"Create an Account"})]})]})})})]}):a.jsxs("div",{className:"min-h-screen flex relative",children:[a.jsxs("div",{className:"hidden lg:flex lg:w-1/2 bg-gradient-to-br from-blue-600 via-blue-700 to-blue-800 fixed left-0 top-0 h-screen z-0 overflow-hidden",children:[a.jsx("div",{className:"absolute inset-0 opacity-[0.07]",children:a.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[a.jsx("defs",{children:a.jsx("pattern",{id:"grid-invite",width:"8",he
8938ight:"8",patternUnits:"userSpaceOnUse",children:a.jsx("path",{d:"M 8 0 L 0 0 0 8",fill:"none",stroke:"white",strokeWidth:"0.5"})})}),a.jsx("rect",{width:"100",height:"100",fill:"url(#grid-invite)"})]})}),a.jsx("div",{className:"absolute top-32 right-16 w-40 h-40 bg-blue-400/20 rounded-full blur-3xl"}),a.jsx("div",{className:"absolute bottom-32 left-16 w-56 h-56 bg-blue-300/15 rounded-full blur-3xl"}),a.jsxs("div",{className:"relative z-10 flex flex-col justify-center h-full px-8 xl:px-16 w-full",children:[a.jsx("div",{className:"mb-6",children:G?a.jsx("div",{className:"inline-block bg-white rounded-xl px-4 py-2 shadow-lg",children:a.jsx("img",{src:G.startsWith("http")?G:`/storage/${G}`,alt:se,className:"h-10 w-auto object-contain"})}):a.jsx("div",{className:"w-12 h-12 bg-white rounded-xl flex items-center justify-center shadow-lg",children:a.jsx("svg",{className:"w-7 h-7 text-blue-600",fill:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"})})})}),a.jsxs("h1",{className:"text-3xl xl:text-4xl font-bold text-white leading-tight mb-4",children:["Join the Team,",a.jsx("br",{}),a.jsx("span",{className:"text-blue-200",children:"Create Together"})]}),a.jsxs("p",{className:"text-base text-blue-100 mb-6 max-w-md",children:["Collaborate with your team to create amazing content with ",se,"."]}),a.jsxs("div",{className:"space-y-3 mb-6",children:[a.jsxs("div",{className:"flex items-center gap-3 text-white",children:[a.jsx("div",{className:"w-7 h-7 bg-white/20 rounded-lg flex items-center justify-center flex-shrink-0",children:a.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),a.jsx("span",{className:"text-sm",children:"Shared workspace & content"})]}),a.jsxs("div",{className:"flex items-center gap-3 text-white",children:[a.jsx("div",{className:"w-7 h-7 bg-white/20 rounded-lg flex items-center justify-center flex-shrink-0",children:a.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),a.jsx("span",{className:"text-sm",children:"Role-based access control"})]}),a.jsxs("div",{className:"flex items-center gap-3 text-white",children:[a.jsx("div",{className:"w-7 h-7 bg-white/20 rounded-lg flex items-center justify-center flex-shrink-0",children:a.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:a.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),a.jsx("span",{className:"text-sm",children:"Seamless team collaboration"})]})]}),a.jsx("div",{className:"p-4 bg-white/10 backdrop-blur-sm rounded-xl border border-white/20 max-w-md",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"flex -space-x-2",children:[a.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-blue-300 to-blue-400 rounded-full flex items-center justify-center text-white font-semibold text-sm border-2 border-white/20",children:((je=(le=h==null?void 0:h.owner_name)==null?void 0:le.charAt(0))==null?void 0:je.toUpperCase())||"T"}),a.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-emerald-300 to-emerald-400 rounded-full flex items-center justify-center text-white font-semibold text-sm border-2 border-white/20",children:((ve=x==null?void 0:x.charAt(0))==null?void 0:ve.toUpperCase())||"Y"})]}),a.jsxs("div",{children:[a.jsxs("p",{className:"text-white font-medium text-sm",children:["You're joining ",h==null?void 0:h.owner_name,"'s team"]}),a.jsx("p",{className:"text-blue-200 text-xs",children:"Set up your account to get started"})]})]})})]})]}),a.jsx("div",{className:"flex-1 lg:ml-[50%] min-h-screen lg:min-h-0 lg:h-screen bg-gray-50 relative z-10 lg:overflow-hidden",children:a.jsx("div",{className:"flex flex-col justify-center h-full px-6 sm:px-8 lg:px-10 xl:px-12 py-6 lg:py-4",children:a.jsxs("div",{className:"w-full max-w-md mx-auto",children:[a.jsx("div",{className:"lg:hidden flex items-center justify-center gap-3 mb-6",children:G?a.jsx("img",{src:G.startsWith("http")?G:`/storage/${G}`,alt:se,className:"h-8 w-auto object-contain"}):a.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-lg flex items-center justify-center shadow-lg",children:a.jsx("svg",{className:"w-5 h-5 text-white",f
8938ill:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"})})})}),a.jsxs("div",{className:"text-center lg:text-left mb-5",children:[a.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-1",children:"Accept Invitation"}),a.jsx("p",{className:"text-sm text-gray-600",children:"Set up your account to join the team"})]}),F&&a.jsxs("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg text-sm text-red-700 flex items-start gap-2",children:[a.jsx("svg",{className:"w-4 h-4 mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})}),a.jsx("span",{children:F})]}),P&&a.jsxs("div",{className:"mb-4 p-3 bg-green-50 border border-green-200 rounded-lg text-sm text-green-700 flex items-start gap-2",children:[a.jsx("svg",{className:"w-4 h-4 mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),a.jsx("span",{children:P})]}),!P&&a.jsx("div",{className:"mb-4 p-4 bg-blue-50 border border-blue-100 rounded-lg",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center flex-shrink-0",children:a.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"})})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("p",{className:"text-sm font-medium text-blue-900",children:["You've been invited by ",h==null?void 0:h.owner_name]}),a.jsxs("p",{className:"text-xs text-blue-700 mt-0.5",children:["Role: ",a.jsx("span",{className:"font-medium capitalize",children:(h==null?void 0:h.role_name)||(h==null?void 0:h.role)})]})]})]})}),!P&&a.jsxs("form",{onSubmit:ee,className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-1",children:"Email address"}),a.jsx("input",{id:"email",type:"email",value:(h==null?void 0:h.email)||"",readOnly:!0,className:"w-full px-3 py-2.5 rounded-lg border border-gray-300 bg-gray-100 text-gray-500 text-sm cursor-not-allowed"})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-1",children:"Full name"}),a.jsx("input",{id:"name",type:"text",value:x,onChange:Ce=>y(Ce.target.value),className:`w-full px-3 py-2.5 rounded-lg border text-sm ${B.name?"border-red-300 bg-red-50":"border-gray-300"} focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors`,placeholder:"Enter your full name"}),B.name&&a.jsx("p",{className:"mt-1 text-xs text-red-600",children:B.name})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-1",children:"Password"}),a.jsxs("div",{className:"relative",children:[a.jsx("input",{id:"password",type:S?"text":"password",value:v,onChange:Ce=>w(Ce.target.value),className:`w-full px-3 py-2.5 pr-10 rounded-lg border text-sm ${B.password?"border-red-300 bg-red-50":"border-gray-300"} focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors`,placeholder:"Create a password (min 8 characters)"}),a.jsx("button",{type:"button",onClick:()=>D(!S),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:S?a.jsx(ZO,{className:"w-4 h-4"}):a.jsx(QO,{className:"w-4 h-4"})})]}),B.password&&a.jsx("p",{className:"mt-1 text-xs text-red-600",children:B.password})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"passwordConfirmation",className:"block text-sm font-medium text-gray-700 mb-1",children:"Confirm password"}),a.jsxs("div",{className:"relative",children:[a.jsx("input",{id:"passwordConfirmation",type:I?"text":"password",value:C,onChange:Ce=>E(Ce.target.value),className:`w-full px-3 py-2.5 pr-10 rounded-lg border text-sm ${B.passwordConfirmation?"border-red-300 bg-red-50":"border-gray-300"} focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors`,placeholder:"Confirm your password"}),a.jsx("button",{type:"button",onClick:()=>M(!I),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:I?a.jsx(ZO,{className:"w-4 h-4"}):a.jsx(QO,{className:"w-4 h-4"})})]}),B.passwordConfirmation&&a.jsx("p",{className:"mt-1 text-xs text-red-600",children:B.passwordConfirmation}),v&&C&&v===C&&a.jsxs("p",{className:"mt-1 text-xs text-green-600 flex items-center gap-1",children:[a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),"Passwords match"]})]}),a.jsx("button",{type:"submit",disabled:W,className:"w-full py-2.5 px-4 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg shadow-md shadow-blue-600/25 hover:shadow-blue-600/35 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2 text-sm mt-4",children:W?a.jsxs(a.Fragment,{children:[a.jsx(YO,{className:"w-4 h-4"}),"Accepting invitation..."]}):a.jsxs(a.Fragment,{children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),"Accept Invitation"]})})]}),a.jsxs("p",{className:"mt-4 text-center text-sm text-gray-600",children:["Already have an account?"," ",a.jsx(Fn,{to:"/user/login",className:"font-semibold text-blue-600 hover:text-blue-700",children:"Sign in"})]})]})})})]})}const PCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})});function OCe({open:e,onClose:n,onSubmitted:i}){const s=j.useRef(null),[d,h]=j.useState(()=>`Bug: ${window.location.pathname}`),[f,g]=j.useState(""),[p,x]=j.useState("medium"),[y,v]=j.useState([]),[w,C]=j.useState(!1),[E,S]=j.useState("");
8938if(!e)return null;const D=R=>{var V;const F=((V=R.clipboardData)==null?void 0:V.items)||[];for(const P of F)if(P.kind==="file"){const z=P.getAsFile();z&&v(W=>[...W,z])}},I=R=>v(F=>F.filter((V,P)=>P!==R)),M=()=>{h(`Bug: ${window.location.pathname}`),g(""),x("medium"),v([]),S("")},B=async R=>{var V,P;if(R.preventDefault(),!d.trim())return;C(!0),S("");const F=[f.trim(),"",`**Page:** ${window.location.href}`,`**User Agent:** ${navigator.userAgent}`].filter(Boolean).join(` 8939`);try{const z=new FormData;z.append("title",d),z.append("description",F),z.append("type","bug"),z.append("priority",p),z.append("status","open"),z.append("metadata[reference_url]",window.location.href),y.forEach((W,K)=>z.append(`attachments[${K}]`,W)),await ne.post("/admin/tasks",z,{headers:{"Content-Type":"multipart/form-data"}}),M(),i==null||i(),n()}catch(z){S(((P=(V=z==null?void 0:z.response)==null?void 0:V.data)==null?void 0:P.message)||"Failed to submit bug report")}finally{C(!1)}};return a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50",onClick:n,children:a.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-lg w-full max-h-[90vh] overflow-y-auto",onClick:R=>R.stopPropagation(),onPaste:D,children:[a.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-gray-200",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Report a Bug"}),a.jsx("button",{onClick:n,className:"p-1 text-gray-500 hover:bg-gray-100 rounded",children:a.jsx(PCe,{className:"w-5 h-5"})})]}),a.jsxs("form",{onSubmit:B,className:"p-5 space-y-4",children:[E&&a.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg text-sm text-red-700",children:E}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Title *"}),a.jsx("input",{type:"text",required:!0,value:d,onChange:R=>h(R.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-red-500 focus:border-red-500"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),a.jsx("textarea",{rows:4,value:f,onChange:R=>g(R.target.value),placeholder:"What went wrong? What did you expect?",className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-red-500 focus:border-red-500"}),a.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Current page URL and browser info will be auto-attached."})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Priority"}),a.jsxs("select",{value:p,onChange:R=>x(R.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm",children:[a.jsx("option",{value:"low",children:"Low"}),a.jsx("option",{value:"medium",children:"Medium"}),a.jsx("option",{value:"high",children:"High"}),a.jsx("option",{value:"urgent",children:"Urgent"})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Screenshots / Files"}),a.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"Paste screenshots with Ctrl+V, or use the picker below."}),a.jsx("input",{ref:s,type:"file",multiple:!0,onChange:R=>v([...y,...Array.from(R.target.files)]),className:"block w-full text-sm text-gray-600 file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:bg-red-50 file:text-red-700 hover:file:bg-red-100"}),y.length>0&&a.jsx("ul",{className:"mt-3 space-y-1",children:y.map((R,F)=>a.jsxs("li",{className:"flex items-center justify-between text-xs bg-gray-50 px-3 py-1.5 rounded",children:[a.jsxs("span",{className:"truncate",children:[R.name," ",a.jsxs("span",{className:"text-gray-400",children:["(",(R.size/1024).toFixed(1)," KB)"]})]}),a.jsx("button",{type:"button",onClick:()=>I(F),className:"text-red-600 hover:text-red-800",children:"Remove"})]},F))})]}),a.jsxs("div",{className:"flex justify-end gap-3 pt-2 border-t border-gray-200",children:[a.jsx("button",{type:"button",onClick:n,className:"px-4 py-2 text-sm text-gray-600 hover:bg-gray-100 rounded-lg",children:"Cancel"}),a.jsx("button",{type:"submit",disabled:w,className:"px-4 py-2 bg-red-600 hover:bg-red-700 disabled:opacity-50 text-white rounded-lg text-sm font-medium",children:w?"Submittingâ¦":"Submit Bug"})]})]})]})})}const BCe=K0((e,n)=>({toasts:[],addToast:(i,s="success",d=5e3)=>{i!==null&&typeof i=="object"&&!Array.isArray(i)&&(s=i.type||s,i=i.message);const h=Date.now()+Math.random();e(f=>({toasts:[...f.toasts,{id:h,message:i,type:s}]})),d>0&&setTimeout(()=>{e(f=>({toasts:f.toasts.filter(g=>g.id!==h)}))},d)},removeToast:i=>{e(s=>({toasts:s.toasts.filter(d=>d.id!==i)}))},success:i=>n().addToast(i,"success"),error:i=>n().addToast(i,"error"),warning:i=>n().addToast(i,"warning"),info:i=>n().addToast(i,"info"),showToast:(i,s="success")=>n().addToast(i,s),showSuccess:i=>n().addToast(i,"success"),showError:i=>n().addToast(i,"error")})),JO={success:{bg:"bg-emerald-50",text:"text-emerald-800",border:"border-emerald-200",Icon:fae,iconColor:"text-emerald-500"},error:{bg:"bg-red-50",text:"text-red-800",border:"border-red-200",Icon:gae,iconColor:"text-red-500"},warning:{bg:"bg-amber-50",text:"text-amber-800",border:"border-amber-200",Icon:i9,iconColor:"text-amber-500"},info:{bg:"bg-blue-50",text:"text-blue-800",border:"border-blue-200",Icon:kae,iconColor:"text-blue-500"}};function LCe(){const{toasts:e,removeToast:n}=BCe();return e.length?a.jsx("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2 max-w-sm pointer-events-none","aria-live":"polite","aria-atomic":"true",children:e.map(i=>{const s=JO[i.type]||JO.info,d=s.Icon;return a.jsxs("div",{className:`pointer-events-auto flex items-start gap-3 px-4 py-3 rounded-lg shadow-lg border ${s.bg} ${s.text} ${s.border} animate-[slideIn_0.2s_ease-out]`,role:i.type==="error"?"alert":"status",children:[a.jsx(d,{className:`w-5 h-5 flex-shrink-0 mt-0.5 ${s.iconColor}`}),a.jsx("p",{className:"flex-1 text-sm font-medium",children:i.message}),a.jsx("button",{onClick:()=>n(i.id),className:"flex-shrink-0 p-1 rounded hover:bg-black/5","aria-label":"Dismiss",children:a.jsx(o9,{className:"w-4 h-4"})})]},i.id)})}):null}function RCe({state:e,onClose:n}){const i=j.useRef(null),[s,d]=Rd.useState(!1);if(j.useEffect(()=>{var x;if(!e)return;const p=y=>{y.key==="Escape"&&!s&&n()};return document.addEventListener("keydown",p),(x=i.current)==null||x.focus(),()=>document.removeEventListener("keydown",p)},[e,s,n]),!e)return null;const h=e.variant==="danger"?"danger":"primary",f="bg-red-600 hover:bg-red-700 focus:ring-red-500",g=async()=>{var p;if(!s){d(!0);try{await((p=e.onConfirm)==null?void 0:p.call(e)),n()}catch{}finally{d(!1)}}};return a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50",role:"dialog","aria-modal":"true","aria-labelledby":"
8939confirm-dialog-title",onClick:s?void 0:n,children:a.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full",onClick:p=>p.stopPropagation(),children:[a.jsxs("div",{className:"p-5",children:[a.jsx("h2",{id:"confirm-dialog-title",className:"text-lg font-semibold text-gray-900",children:e.title||"Are you sure?"}),e.message&&a.jsx("p",{className:"mt-2 text-sm text-gray-600",children:e.message})]}),a.jsxs("div",{className:"px-5 py-3 bg-gray-50 rounded-b-lg flex justify-end gap-3",children:[a.jsx("button",{ref:i,onClick:n,disabled:s,className:"px-4 py-2 text-sm text-gray-700 bg-white border border-gray-300 hover:bg-gray-100 rounded-lg disabled:opacity-50",children:e.cancelText||"Cancel"}),a.jsx("button",{onClick:g,disabled:s,className:`px-4 py-2 text-sm font-medium text-white rounded-lg focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 ${f}`,children:s?"Workingâ¦":e.confirmText||"Confirm"})]})]})})}const zCe=K0(e=>({state:null,confirm:n=>e({state:n}),close:()=>e({state:null})}));function FCe(){const{state:e,close:n}=zCe();return a.jsx(RCe,{state:e,onClose:()=>{e!=null&&e.onCancel&&e.onCancel(),n()}})}const $Ce=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"})}),VCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"})}),UCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),WCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})}),HCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m-3-2.818l.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),GCe=({className:e})=>a.jsxs("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:[a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.
8939074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),qCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15M12 9l-3 3m0 0l3 3m-3-3h12.75"})}),KCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})}),YCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),QCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})}),ZCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})}),JCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})}),XCe=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 14.25h13.5m-13.5 0a3 3 0 01-3-3m3 3a3 3 0 100 6h13.5a3 3 0 100-6m-16.5-3a3 3 0 013-3h13.5a3 3 0 013 3m-19.5 0a4.5 4.5 0 01.9-2.7L5.737 5.1a3.375 3.375 0 012.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 01.9 2.7m0 0a3 3 0 01-3 3m0 3h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008zm-3 6h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008z"})}),e2e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z"})}),t2e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 01-2.25 2.25M16.5 7.5V18a2.25 2.25 0 002.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 002.25 2.25h13.5M6 7.5h3v3H6v-3z"})}),n2e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.34 15.84c-.688-.06-1.386-.09-2.09-.09H7.5a4.5 4.5 0 110-9h.75c.704 0 1.402-.03 2.09-.09m0 9.18c.253.962.584 1.892.985 2.783.247.55.06 1.21-.463 1.511l-.657.38c-.551.318-1.26.117-1.527-.461a20.845 20.845 0 01-1.44-4.282m3.102.069a18.03 18.03 0 01-.59-4.59c0-1.586.205-3.124.59-4.59m0 9.18a23.848 23.848 0 018.835 2.535M10.34 6.66a23.847 23.847 0 008.835-2.535m0 0A23.74 23.74 0 0018.795 3m.38 1.125a23.91 23.91 0 011.014 5.395m-1.014 8.855c-.118.38-.245.754-.38 1.125m.38-1.125a23.91 23.91 0 001.014-5.395m0-3.46c.495.413.811 1.035.811 1.73 0 .695-.316 1.317-.811 1.73m0-3.46a24.347 24.347 0 010 3.46"})}),r2e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z"})}),i2e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3a7.5 7.5 0 00-7.5 7.5v3a7.5 7.5 0 0015 0v-3A7.5 7.5 0 0012 3zM3 10.5h3M18 10.5h3M3 18l3-1.5M18 16.5l3 1.5M12 3v18"})}),o2e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h11.25c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25z"})}),s2e=({className:e})=>a.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 15.803a7.5 7.5 0 0010.607 0z"})});function a2e({item:e,isActive:n,location:i}){const s=e.children?e.children.some(g=>i.pathname===g.href||i.pathname.startsWith(g.href)):!1,[d,h]=j.useState(s);if(j.useEffect(()=>{s&&h(!0)},[s]),e.children)return a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>h(!d),className:`w-full flex items-center px-3 py-2.5 text-sm font-medium rounded-lg transition-colors ${s?"bg-red-50 text-red-700":"text-gray-700 hover:bg-gray-100"}`,children:[a.jsx(e.icon,{className:`w-5 h-5 mr-3 ${s?"text-red-600":"text-gray-400"}`}),a.jsx("span",{className:"flex-1 text-left",children:e.name}),a.jsx(ZCe,{className:`w-4 h-4 transition-transform duration-200 ${d?"rotate-90":""}`})]}),d&&a.jsx("div",{className:"ml-8 mt-1 space-y-1",children:e.children.map(g=>a.jsx(Fn,{to:g.href,className:`block px-3 py-1.5 text-sm rounded-lg transition-colors ${i.pathname===g.href?"bg-red-50 text-red-700 font-medium":"text-gray-500 hover:text-gray-700 hover:bg-gray-50"}`,children:g.name},g.name))})]});const f=n(e.href);return a.jsxs(Fn,{to:e.href,className:`flex items-center px-3 py-2.5 text-sm font-medium rounded-lg transition-colors ${f?"bg-red-50 text-red-700":"text-gray-700 hover:bg-gray-100"}`,children:[a.jsx(e.icon,{className:`w-5 h-5 mr-3 ${f?"text-red-600":"text-gray-400"}`}),e.name]})}const XO=[{name:"Dashboard",href:"/admin/dashboard",icon:$Ce},{name:"Users",icon:VCe,children:[{name:"All Users",href:"/admin/users"},{name:"Teams",href:"/admin/teams"}]},{name:"Content",icon:UCe,children:[{name:"Blogs",href:"/admin/blogs"},{name:"Content Pipeline",href:"/admin/content-pipeline"},{name:"Languages",href:"/admin/languages"}]},{name:"Sites",icon:WCe,children:[{name:"All Sites",href:"/admin/sites"},{name:"Site Health",href:"/admin/site-health"}]},{name:"Finance",icon:HCe,children:[{name:"Payments",href:"/admin/payments"},{name:"Credits",href:"/admin/credits"},{name:"Earnings",href:"/admin/earnings"},{name:"Coupons",href:"/admin/coupons"}]},{name:"Monitoring",icon:XCe,children:[{name:"System Health",href:"/admin/system-health"},{name:"API Usage",href:"/admin/api-usage"},{name:"OpenAI Usage",href:"/admin/openai-usage"},{name:"Audit Logs",href:"/admin/audit-logs"},{name:"Email Logs",href:"/admin/email-logs"},{name:"DB Whitelist",href:"/admin/db-whitelist"}]},{name:"Announcements",href:"/admin/announcements",icon:n2e},{name:"blogbotz.com",icon:t2e,children:[{name:"Dashboard",href:"/admin/blogbotz/dashboard"},{name:"Blog Posts",href:"/admin/blogbotz/blogs"},{name:"Published",href:"/admin/blogbotz/published"},{name:"Settings",href:"/admin/blogbotz/settings"},{name:"Webhook Logs",href:"/admin/blogbotz/webhook-logs"}]},{name:"SEO",icon:s2e,children:[{name:"SEO Pages",href:"/admin/seo-pages"},{name:"New SEO Page",href:"/admin/seo-pages/new"}]},{name:"Settings",icon:GCe,children:[{name:"Notifications",href:"/admin/notifications"},{name:"Plugin Links",href:"/admin/plugin-links"}]},{name:"Website",icon:JCe,children:[{name:"General",href:"/admin/website-settings/general"},{name:"Hero Section",href:"/admin/website-settings/hero"},{name:"Features",href:"/admin/website-settings/features"},{name:"Testimonials",href:"/admin/website-settings/testimonials"},{name:"FAQs",href:"/admin/website-settings/faqs"},{name:"Pricing",href:"/admin/website-settings/pricing"},{name:"Statistics",href:"/admin/website-settings/stats"},{name:"Brand Logos",href:"/admin/website-settings/brand-logos"},{name:"Blog Posts",href:"/admin/website-settings/blogs"}]},{name:"Reports",href:"/admin/reports",icon:e2e},{name:"Tasks & Issues",href:"/admin/tasks",icon:o2e},{name:"GSC Autofix",icon:r2e,children:[{name:"SEO & AIO Score",href:"/admin/gsc/seo-aio"},{name:"Search Traffic",href:"/admin/gsc/traffic"},{name:"SEO Opportunities",href:"/admin/gsc/gaps"},{name:"GSC Issues",href:"/admin/gsc/issues"},{name:"Structured Data",href:"/admin/gsc/structured-data"},{name:"Task Blocklist",href:"/admin/gsc/blocklist"},{name:"SEO Redirects",href:"/admin/gsc/redirects"},{name:"Connection & API",href:"/admin/gsc/connection"},{name:"Module Settings",href:"/admin/gsc/settings"}]}];function l2e({children:e}){var M,B,R,F;const[n,i]=j.useState(!1),[s,d]=j.useState(!1),[h,f]=j.useState(!1),[g,p]=j.useState(null),[x,y]=j.useState("Admin Panel"),v=ro(),w=Ot(),{user:C,logout:E}=jr();j.useEffect(()=>{S()},[]);const S=async()=>
8939{try{const P=(await ne.get("/website-settings/public")).data;P.general&&(P.general.site_logo&&p(P.general.site_logo),P.general.site_name&&y(P.general.site_name))}catch(V){console.error("Failed to load website settings",V)}},D=async()=>{try{await ne.post("/auth/logout")}catch(V){console.error("Logout error:",V)}finally{E(),w(Yl.LOGIN)}},I=V=>v.pathname===V||v.pathname.startsWith(V+"/");return a.jsxs("div",{className:"min-h-screen bg-gray-50",children:[n&&a.jsx("div",{className:"fixed inset-0 z-40 bg-gray-900/50 lg:hidden",onClick:()=>i(!1)}),a.jsxs("aside",{className:`fixed inset-y-0 left-0 z-50 w-64 bg-white border-r border-gray-200 transform transition-transform duration-300 ease-in-out lg:translate-x-0 flex flex-col ${n?"translate-x-0":"-translate-x-full"}`,children:[a.jsxs("div",{className:"flex items-center justify-between h-16 px-6 border-b border-gray-200 flex-shrink-0",children:[a.jsx(Fn,{to:"/admin/dashboard",className:"flex items-center",children:a.jsx(Ls,{src:g,alt:x,className:"h-7 w-auto object-contain",fallback:a.jsx("div",{className:"w-8 h-8 bg-red-600 rounded-lg flex items-center justify-center",children:a.jsx("span",{className:"text-white font-bold text-sm",children:"BB"})})})}),a.jsx("button",{onClick:()=>i(!1),className:"lg:hidden p-1 rounded-md text-gray-500 hover:text-gray-700 hover:bg-gray-100",children:a.jsx(YCe,{className:"w-5 h-5"})})]}),a.jsx("nav",{className:"flex-1 overflow-y-auto px-4 py-6 space-y-1",children:XO.map(V=>a.jsx(a2e,{item:V,isActive:I,location:v},V.name))}),a.jsx("div",{className:"p-4 border-t border-gray-200 flex-shrink-0",children:a.jsxs("div",{className:"flex items-center space-x-3",children:[a.jsx("div",{className:"w-10 h-10 bg-red-100 rounded-full flex items-center justify-center",children:C!=null&&C.avatar?a.jsx("img",{src:C.avatar,alt:"",className:"w-10 h-10 rounded-full object-cover"}):a.jsx("span",{className:"text-red-600 font-medium text-sm",children:((B=(M=C==null?void 0:C.name)==null?void 0:M.charAt(0))==null?void 0:B.toUpperCase())||"A"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:C==null?void 0:C.name}),a.jsx("p",{className:"text-xs text-gray-500 truncate",children:C==null?void 0:C.email})]})]})})]}),a.jsxs("div",{className:"lg:pl-64",children:[a.jsx("header",{className:"sticky top-0 z-30 bg-white border-b border-gray-200",children:a.jsxs("div",{className:"flex items-center justify-between h-16 px-4 sm:px-6 lg:px-8",children:[a.jsx("button",{onClick:()=>i(!0),className:"lg:hidden p-2 rounded-md text-gray-500 hover:text-gray-700 hover:bg-gray-100",children:a.jsx(KCe,{className:"w-6 h-6"})}),a.jsx("div",{className:"hidden lg:block",children:a.jsx("h1",{className:"text-lg font-semibold text-gray-900",children:(()=>{for(const V of XO){if(V.href&&I(V.href))return V.name;if(V.children){const P=V.children.find(z=>I(z.href));if(P)return P.name}}return"Admin Dashboard"})()})}),a.jsxs("div",{className:"flex items-center space-x-4",children:[a.jsxs("button",{onClick:()=>f(!0),className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-red-600 hover:bg-red-50 rounded-lg transition-colors",title:"Report a bug",children:[a.jsx(i2e,{className:"w-4 h-4"}),a.jsx("span",{className:"hidden sm:inline",children:"Report Bug"})]}),a.jsx(s9,{apiPrefix:"/admin",viewAllPath:"/admin/notifications"}),a.jsxs("div",{className:"relative",children:[a.jsxs("button",{onClick:()=>d(!s),className:"flex items-center space-x-3 p-2 rounded-lg hover:bg-gray-100 transition-colors",children:[a.jsx("div",{className:"w-8 h-8 bg-red-100 rounded-full flex items-center justify-center",children:C!=null&&C.avatar?a.jsx("img",{src:C.avatar,alt:"",className:"w-8 h-8 rounded-full object-cover"}):a.jsx("span",{className:"text-red-600 font-medium text-sm",children:((F=(R=C==null?void 0:C.name)==null?void 0:R.charAt(0))==null?void 0:F.toUpperCase())||"A"})}),a.jsx("span",{className:"hidden sm:block text-sm font-medium text-gray-700",children:C==null?void 0:C.name}),a.jsx(QCe,{className:"w-4 h-4 text-gray-500"})]}),s&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>d(!1)}),a.jsxs("div",{className:"absolute right-0 mt-2 w-48 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-20",children:[a.jsx(Fn,{to:"/profile",onClick:()=>d(!1),className:"flex items-center px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:"Profile"}),a.jsxs("button",{onClick:D,className:"flex items-center w-full px-4 py-2 text-sm text-red-600 hover:bg-red-50",children:[a.jsx(qCe,{className:"w-4 h-4 mr-3"}),"Logout"]})]})]})]})]})]})}),a.jsx("main",{className:"min-h-[calc(100vh-4rem)] p-4 sm:p-6 lg:p-8",children:e})]}),a.jsx(OCe,{open:h,onClose:()=>f(!1)}),a.jsx(LCe,{}),a.jsx(FCe,{})]})}const c2e=j.lazy(()=>bt(()=>import("./Usages-DTdYRcfN.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),d2e=j.lazy(()=>bt(()=>import("./Dashboard-D_AQYKJc.js"),__vite__mapDeps([8,2,3,5,6,1,4]))),u2e=j.lazy(()=>bt(()=>import("./Users-DkOifBxj.js"),[])),h2e=j.lazy(()=>bt(()=>import("./UserDetail-D4FNo3FG.js"),[])),m2e=j.lazy(()=>bt(()=>import("./Credits-TkrhXfDg.js"),[])),f2e=j.lazy(()=>bt(()=>import("./Blogs-DgLqSOe-.js"),__vite__mapDeps([9,7,3,2,1,4]))),p2e=j.lazy(()=>bt(()=>import("./Sites-yfyvZtZP.js"),[])),g2e=j.lazy(()=>bt(()=>import("./Earnings-D1niKpbe.js"),__vite__mapDeps([10,1,2,3,4,5,6,7]))),b2e=j.lazy(()=>bt(()=>import("./ApiUsage-CPV4LaNl.js"),[])),k2e=j.lazy(()=>bt(()=>import("./OpenAIUsage-CyIOH8BK.js"),__vite__mapDeps([11,7,3,1,2,4,5,6]))),y2e=j.lazy(()=>bt(()=>import("./Settings-Cuh6Lwfy.js"),[])),x2e=j.lazy(()=>bt(()=>import("./AuditLogs-Dl0MkQJR.js"),[])),v2e=j.lazy(()=>bt(()=>import("./GeneralSettings-C342yAGd.js"),__vite__mapDeps([12,13]))),w2e=j.lazy(()=>bt(()=>import("./HeroSettings-DMzLOO0D.js"),__vite__mapDeps([14,13]))),_2e=j.lazy(()=>bt(()=>import("./FeaturesSettings-C8V_50Sa.js"),[])),A2e=j.lazy(()=>bt(()=>import("./TestimonialsSettings-C_K4MEpT.js"),__vite__mapDeps([15,13]))),C2e=j.lazy(()=>bt(()=>import("./FAQsSettings-B2uP1_cM.js"),[])),j2e=j.lazy(()=>bt(()=>import("./PricingSettings-DJEH5O6s.js"),[])),N2e=j.lazy(()=>bt(()=>import("./StatsSettings-8QBV8z3G.js"),[])),E2e=j.lazy(()=>bt(()=>import("./BlogsSettings-BxlWasq1.js"),[])),eB=j.lazy(()=>bt(()=>import("./BlogForm-Cv1XcSeb.js"),[])),S2e=j.lazy(()=>bt(()=>import("./BrandLogosSettings-B6lzlCEU.js"),__vite__mapDeps([16,13])));j.lazy(()=>bt(()=>import("./BlogBotzIntegration-DP4WO6C8.js"),[]));const D2e=j.lazy(()=>bt(()=>import("./BlogBotzDashboard-RYtIY-Zw.js"),[])),T2e=j.lazy(()=>bt(()=>import("./BlogBotzBlogs-BmkdADUh.js"),[])),I2e=j.lazy(()=>bt(()=>import("./BlogBotzBlogEdit-CHx_FBZ8.js"),[])),M2e=j.lazy(()=>bt(()=>import("./BlogBotzPublished-DwhZYq_F.js"),[])),P2e=j.lazy(()=>bt(()=>import("./BlogBotzSettings-DRyVscbq.js"),[])),O2e=j.lazy(()=>bt(()=>import("./BlogBotzWebhookLogs-CrHY4gfO.js"),[])),B2e=j.lazy(()=>bt(()=>import("./Tasks-CO0F5f01.js"),__vite__mapDeps([17,18,19,20]))),tB=j.lazy(()=>bt(()=>import("./TaskForm-Cp0lYkxO.js"),__vite__mapDeps([21,20]))),L2e=j.lazy(()=>bt(()=>import("./TaskDetail-BgEqwBbF.js"),[])),R2e=j.lazy(()=>bt(()=>import("./GscConnection-BLYHtkF4.js"),[])),z2e=j.lazy(()=>bt(()=>import("./GscSettings-CZtdDjar.js"),[])),F2e=j.lazy(()=>bt(()=>import("./GscIssues-DZhh3O3f.js"),__vite__mapDeps([22,18]))),$2e=j.lazy(()=>bt(()=>import("./GscBlocklist-S7dWGihn.js"),[])),V2e=j.lazy(()=>bt(()=>import("./GscRedirects-CAXJM582.js"),__vite__mapDeps([23,18,19]))),U2e=j.lazy(()=>bt(()=>import("./GscStructuredData-BFcTwrhM.js"),__vite__mapDeps([24,18]))),W2e=j.lazy(()=>bt(()=>import("./GscSeoAio-DDT30Uga.js"),[])),H2e=j.lazy(()=>bt(()=>import("./GscGaps-CNWZk3yd.js"),__vite__mapDeps([25,18]))),G2e=j.lazy(()=>bt(()=>import("./GscTraffic-CYvjDaSt.js"),__vite__mapDeps([26,2,3,6,4]))),q2e=j.lazy(()=>bt(()=>import("./DbWhitelist-Bi0hXgkh.js"),[])),K2e=j.lazy(()=>bt(()=>import("./Notifications-V4dZnqnV.js"),[])),Y2e=j.lazy(()=>bt(()=>import("./Payments-C5uraaWu.js"),[])),Q2e=j.lazy(()=>bt(()=>import("./SystemHealth-CVpUtzkW.js"),[])),Z2e=j.lazy(()=>bt(()=>import("./ContentPipeline-DVOS26E2.js"),[])),J2e=j.lazy(()=>bt(()=>import("./Reports-Ba5-c2I_.js"),__vite__mapDeps([27,5,6,3,2,7,1,4]))),X2e=j.lazy(()=>bt(()=>import("./Teams-CEJmwh3y.js"),[])),e5e=j.lazy(()=>bt(()=>import("./Languages-BFSxltMB.js"),__vite__mapDeps([28,7,3]))),t5e=j.lazy(()=>bt(()=>import("./SiteHealth-DVezKe5Q.js"),[])),n5e=j.lazy(()=>bt(()=>import("./Coupons-D-JV9PL7.js"),[])),r5e=j.lazy(()=>bt(()=>import("./EmailLogs-DYD18cjm.js"),__vite__mapDeps([29,5,2,3,6]))),i5e=j.lazy(()=>bt(()=>import("./Announcements-CihLkvv0.js"),[])),o5e=j.lazy(()=>bt(()=>import("./PluginLinks-Dv00j3Uz.js"),[])),s5e=j.lazy(()=>bt(()=>import("./SEO-DkNt3sUL.js"),[])),nB=j.lazy(()=>bt(()=>import("./SEOForm-DaIoXlR0.js"),[]));function a5e({children:e}){const n=ro(),i=Ot(),{setAuth:s,fetchUser:d,setProcessingAuthToken:h}=jr(),{clearSites:f}=ui();return j.useEffect(()=>{const g=new URLSearchParams(n.search),p=g.get("auth_token");p&&(h(!0),f(),s(null,p),ne.defaults.headers.common.Authorization=`Bearer ${p}`,d().then(()=>{g.delete("auth_token");const x=g.toString(),y=n.pathname+(x?`?${x}`:"");i(y,{replace:!0})}).finally(()=>{h(!1)}))},[n.search,s,d,i,n.pathname,h,f]),e}function sh({to:e}){const n=ro();return a.jsx(Pn,{to:`${e}${n.search}`,replace:!0})}function Gp({children:e}){const{user:n,token:i}=jr();if(i&&n){const s=n.role==="admin"||n.role==="super_admin";return a.jsx(Pn,{to:s?"/admin/dashboard":"/user/dashboard",replace:!0})}return e}function l5e(){const e=ro(),n=e.pathname.replace(/^\/public/,"");return a.jsx(Pn,{to:`${n}${e.search}`,replace:!0})}function qn({children:e}){const n=ro(),{user:i,token:s,processingAuthToken:d}=jr();return new URLSearchParams(n.search).has("auth_token")||d?a.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-50",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600 mx-auto"}),a.jsx("p",{className:"mt-4 text-gray-600",children:"Logging you in..."})]})}):!s||!i?a.jsx(Pn,{to:"/user/login",replace:!0}):a.jsx(Uae,{children:e})}function gt({children:e}){const{user:n,token:i}=jr();return!i||!n?a.jsx(Pn,{to:"/user/login",replace:!0}):n.role==="admin"||n.role==="super_admin"?a.jsx(l2e,{children:e}):a.jsx(Pn,{to:"/user/dashboard",replace:!0})}function c5e(){return a.jsx(Jie,{children:a.jsx(a5e,{children:a.jsxs(Wie,{children:[a.jsx(Ee,{path:"/public/*",element:a.jsx(l5e,{})}),a.jsx(Ee,{path:"/user/login",element:a.jsx(Gp,{children:a.jsx(Yae,{})})}),a.jsx(Ee,{path:"/user/signup",element:a.jsx(Gp,{children:a.jsx(Qae,{})})}),a.jsx(Ee,{path:"/user/verify-email",element:a.jsx(Zae,{})}),a.jsx(Ee,{path:"/user/forgot-password",element:a.jsx(Gp,{children:a.jsx(Jae,{})})}),a.jsx(Ee,{path:"/user/reset-password",element:a.jsx(Gp,{children:a.jsx(Xae,{})})}),a.jsx(Ee,{path:"/user/auth/magic-link",element:a.jsx(ele,{})}),a.jsx(Ee,{path:"/user/auth/google/callback",element:a.jsx(lM,{})}),a.jsx(Ee,{path:"/user/auth/facebook/callback",element:a.jsx(cM,{})}),a.jsx(Ee,{path:"/login",element:a.jsx(sh,{to:"/user/login"})}),a.jsx(Ee,{path:"/signup",element:a.jsx(sh,{to:"/user/signup"})}),a.jsx(Ee,{path:"/verify-email",element:a.jsx(sh,{to:"/user/verify-email"})}),a.jsx(Ee,{path:"/forgot-password",element:a.jsx(Pn,{to:"/user/forgot-password",replace:!0})}),a.jsx(Ee,{path:"/reset-password",element:a.jsx(sh,{to:"/user/reset-password"})}),a.jsx(Ee,{path:"/auth/magic-link",element:a.jsx(sh,{to:"/user/auth/magic-link"})}),a.jsx(Ee,{path:"/auth/google/callback",element:a.jsx(lM,{})}),a.jsx(Ee,{path:"/auth/facebook/callback",element:a.jsx(cM,{})}),a.jsx(Ee,{path:"/user/wordpress-connect",element:a.jsx(nCe,{})}),a.jsx(Ee,{path:"/wordpress-connect",element:a.jsx(Pn,{to:"/user/wordpress-connect",replace:!0})}),a.jsx(Ee,{path:"/user/docs/api",element:a.jsx(sCe,{})}),a.jsx(Ee,{path:"/docs/api",element:a.jsx(Pn,{to:"/user/docs/api",replace:!0})}
8939),a.jsx(Ee,{path:"/user/dashboard",element:a.jsx(qn,{children:a.jsx(e1e,{})})}),a.jsx(Ee,{path:"/user/sites",element:a.jsx(qn,{children:a.jsx(h1e,{})})}),a.jsx(Ee,{path:"/user/sites/add",element:a.jsx(qn,{children:a.jsx(k1e,{})})}),a.jsx(Ee,{path:"/user/topics/:siteId",element:a.jsx(qn,{children:a.jsx(z7,{})})}),a.jsx(Ee,{path:"/user/sync/:siteId",element:a.jsx(qn,{children:a.jsx(ICe,{})})}),a.jsx(Ee,{path:"/user/categories/:siteId",element:a.jsx(qn,{children:a.jsx(z7,{})})}),a.jsx(Ee,{path:"/user/keywords/:topicId",element:a.jsx(qn,{children:a.jsx(D1e,{})})}),a.jsx(Ee,{path:"/user/automation/:siteId",element:a.jsx(qn,{children:a.jsx($1e,{})})}),a.jsx(Ee,{path:"/user/site/:siteId/connect",element:a.jsx(qn,{children:a.jsx(xCe,{})})}),a.jsx(Ee,{path:"/user/blogs",element:a.jsx(qn,{children:a.jsx(I_e,{})})}),a.jsx(Ee,{path:"/user/blogs/create",element:a.jsx(qn,{children:a.jsx($_e,{})})}),a.jsx(Ee,{path:"/user/blogs/:id/view",element:a.jsx(qn,{children:a.jsx(tCe,{})})}),a.jsx(Ee,{path:"/user/blogs/:id/edit",element:a.jsx(qn,{children:a.jsx(GAe,{})})}),a.jsx(Ee,{path:"/user/credits",element:a.jsx(qn,{children:a.jsx(O_e,{})})}),a.jsx(Ee,{path:"/user/usages",element:a.jsx(qn,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}),children:a.jsx(c2e,{})})})}),a.jsx(Ee,{path:"/user/profile",element:a.jsx(qn,{children:a.jsx(i1e,{})})}),a.jsx(Ee,{path:"/user/integrations",element:a.jsx(qn,{children:a.jsx(uCe,{})})}),a.jsx(Ee,{path:"/user/notifications",element:a.jsx(qn,{children:a.jsx(vCe,{})})}),a.jsx(Ee,{path:"/user/team",element:a.jsx(qn,{children:a.jsx(ECe,{})})}),a.jsx(Ee,{path:"/user/team/accept-invitation",element:a.jsx(MCe,{})}),a.jsx(Ee,{path:"/dashboard",element:a.jsx(Pn,{to:"/user/dashboard",replace:!0})}),a.jsx(Ee,{path:"/sites",element:a.jsx(Pn,{to:"/user/sites",replace:!0})}),a.jsx(Ee,{path:"/sites/add",element:a.jsx(Pn,{to:"/user/sites/add",replace:!0})}),a.jsx(Ee,{path:"/blogs",element:a.jsx(Pn,{to:"/user/blogs",replace:!0})}),a.jsx(Ee,{path:"/blogs/create",element:a.jsx(Pn,{to:"/user/blogs/create",replace:!0})}),a.jsx(Ee,{path:"/credits",element:a.jsx(Pn,{to:"/user/credits",replace:!0})}),a.jsx(Ee,{path:"/usages",element:a.jsx(Pn,{to:"/user/usages",replace:!0})}),a.jsx(Ee,{path:"/profile",element:a.jsx(Pn,{to:"/user/profile",replace:!0})}),a.jsx(Ee,{path:"/integrations",element:a.jsx(Pn,{to:"/user/integrations",replace:!0})}),a.jsx(Ee,{path:"/admin/dashboard",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(d2e,{})})})}),a.jsx(Ee,{path:"/admin/users",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(u2e,{})})})}),a.jsx(Ee,{path:"/admin/users/:id",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(h2e,{})})})}),a.jsx(Ee,{path:"/admin/credits",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(m2e,{})})})}),a.jsx(Ee,{path:"/admin/blogs",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(f2e,{})})})}),a.jsx(Ee,{path:"/admin/sites",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(p2e,{})})})}),a.jsx(Ee,{path:"/admin/earnings",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(g2e,{})})})}),a.jsx(Ee,{path:"/admin/api-usage",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(b2e,{})})})}),a.jsx(Ee,{path:"/admin/settings",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(y2e,{})})})}),a.jsx(Ee,{path:"/admin/audit-logs",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(x2e,{})})})}),a.jsx(Ee,{path:"/admin/openai-usage",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(k2e,{})})})}),a.jsx(Ee,{path:"/admin/payments",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(Y2e,{})})})}),a.jsx(Ee,{path:"/admin/system-health",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(Q2e,{})})})}),a.jsx(Ee,{path:"/admin/content-pipeline",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(Z2e,{})})})}),a.jsx(Ee,{path:"/admin/reports",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(J2e,{})})})}),a.jsx(Ee,{path:"/admin/teams",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(X2e,{})})})}),a.jsx(Ee,{path:"/admin/languages",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(e5e,{})})})}),a.jsx(Ee,{path:"/admin/site-health",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(t5e,{})})})}),a.jsx(Ee,{path:"/admin/coupons",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(n5e,{})})})}),a.jsx(Ee,{path:"/admin/email-logs",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(r5e,{})})})}),a.jsx(Ee,{path:"/admin/announcements",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(i5e,{})})})}),a.jsx(Ee,{path:"/admin/plugin-links",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(o5e,{})})})}),a.jsx(Ee,{path:"/admin/seo-pages",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(s5e,{})})})}),a.jsx(Ee,{path:"/admin/seo-pages/new",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(nB,{})})})}),a.jsx(Ee,{path:"/admin/seo-pages/:id/edit",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(nB,{})})})}),a.jsx(Ee,{path:"/admin/website-settings/general",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(v2e,{})})})}),a.jsx(Ee,{path:"/admin/website-settings/hero",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(w2e,{})})})}),a.jsx(Ee,{path:"/admin/website-settings/features",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(_2e,{})})})}),a.jsx(Ee,{path:"/admin/website-settings/testimonials",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(A2e,{})})})}),a.jsx(Ee,{path:"/admin/website-settings/faqs",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(C2e,{})})})}),a.jsx(Ee,{path:"/admin/website-settings/pricing",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(j2e,{})})})}),a.jsx(Ee,{path:"/admin/website-settings/stats",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(N2e,{})})})}),a.jsx(Ee,{path:"/admin/website-settings/brand-logos",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(S2e,{})})})}),a.jsx(Ee,{path:"/admin/website-settings/blogs",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(E2e,{})})})}),a.jsx(Ee,{path:"/admin/website-settings/blogs/new",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(eB,{})})})}),a.jsx(Ee,{path:"/admin/website-settings/blogs/:id/edit",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(eB,{})})})}),a.jsx(Ee,{path:"/admin/notifications",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(K2e,{})})})}),a.jsx(Ee,{path:"/admin/blogbotz/dashboard",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(D2e,{})})})}),a.jsx(Ee,{path:"/admin/blogbotz/blogs",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(T2e,{})})})}),a.jsx(Ee,{path:"/admin/blogbotz/blogs/:id/edit",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(I2e,{})})})}),a.jsx(Ee,{path:"/admin/blogbotz/published",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(M2e,{})})})}),a.jsx(Ee,{path:"/admin/blogbotz/settings",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(P2e,{})})})}),a.jsx(Ee,{path:"/admin/blogbotz/webhook-logs",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(O2e,{})})})}),a.jsx(Ee,{path:"/admin/integrations/blogbotz",element:a.jsx(Pn,{to:"/admin/blogbotz/dashboard",replace:!0})}),a.jsx(Ee,{path:"/admin/tasks",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(B2e,{})})})}),a.jsx(Ee,{path:"/admin/tasks/create",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(tB,{})})})}),a.jsx(Ee,{path:"/admin/tasks/:id",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(L2e,{})})})}),a.jsx(Ee,{path:"/admin/tasks/:id/edit",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-s
8939pin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(tB,{})})})}),a.jsx(Ee,{path:"/admin/gsc/connection",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(R2e,{})})})}),a.jsx(Ee,{path:"/admin/gsc/settings",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(z2e,{})})})}),a.jsx(Ee,{path:"/admin/gsc/issues",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(F2e,{})})})}),a.jsx(Ee,{path:"/admin/gsc/blocklist",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx($2e,{})})})}),a.jsx(Ee,{path:"/admin/gsc/redirects",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(V2e,{})})})}),a.jsx(Ee,{path:"/admin/gsc/structured-data",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(U2e,{})})})}),a.jsx(Ee,{path:"/admin/gsc/seo-aio",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(W2e,{})})})}),a.jsx(Ee,{path:"/admin/gsc/gaps",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(H2e,{})})})}),a.jsx(Ee,{path:"/admin/gsc/traffic",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(G2e,{})})})}),a.jsx(Ee,{path:"/admin/db-whitelist",element:a.jsx(gt,{children:a.jsx(j.Suspense,{fallback:a.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-600"})}),children:a.jsx(q2e,{})})})}),a.jsx(Ee,{path:"/",element:a.jsx(Pn,{to:"/user/dashboard",replace:!0})}),a.jsx(Ee,{path:"/user/*",element:a.jsx(Pn,{to:"/user/dashboard",replace:!0})})]})})})}class d5e extends Rd.Component{constructor(n){super(n),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(n){return{hasError:!0}}componentDidCatch(n,i){this.setState({error:n,errorInfo:i}),console.error("React Error Boundary caught an error:",n,i)}render(){return this.state.hasError?a.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:a.jsxs("div",{className:"max-w-2xl w-full bg-white rounded-lg shadow-lg p-6",children:[a.jsxs("div",{className:"flex items-center mb-4",children:[a.jsx("div",{className:"w-12 h-12 bg-red-100 rounded-full flex items-center justify-center",children:a.jsx("svg",{className:"w-6 h-6 text-red-600",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"})})}),a.jsxs("div",{className:"ml-4",children:[a.jsx("h1",{className:"text-xl font-bold text-gray-900",children:"Something went wrong"}),a.jsx("p",{className:"text-gray-500",children:"An error occurred while rendering this page"})]})]}),a.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 mb-4",children:[a.jsx("p",{className:"text-red-800 font-medium mb-2",children:"Error Details:"}),a.jsx("pre",{className:"text-sm text-red-700 whitespace-pre-wrap break-words overflow-auto max-h-40",children:this.state.error&&this.state.error.toString()})]}),this.state.errorInfo&&a.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 mb-4",children:[a.jsx("p",{className:"text-gray-800 font-medium mb-2",children:"Component Stack:"}),a.jsx("pre",{className:"text-xs text-gray-600 whitespace-pre-wrap break-words overflow-auto max-h-60",children:this.state.errorInfo.componentStack})]}),a.jsxs("div",{className:"flex gap-3",children:[a.jsx("button",{onClick:()=>window.location.reload(),className:"px-4 py-2 bg-primary-600 text-white rounded-lg hover:bg-primary-700 transition-colors",children:"Reload Page"}),a.jsx("button",{onClick:()=>{this.setState({hasError:!1,error:null,errorInfo:null}),window.location.href="/dashboard"},className:"px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition-colors",children:"Go to Dashboard"})]})]})}):this.props.children}}Rv.createRoot(document.getElementById("app")).render(a.jsx(Rd.StrictMode,{children:a.jsx(d5e,{children:a.jsx(c5e,{})})}));export{xe as $,en as A,pn as B,sV as C,Lle as D,d9 as E,yt as F,F5e as G,z5e as H,Ls as I,H5e as J,sce as K,Fn as L,PC as M,WR as N,HR as O,T5e as P,B_ as Q,Kde as R,uh as S,Mbe as T,ht as U,Un as V,q5e as W,kV as X,yV as Y,G5e as Z,Ule as _,ne as a,Kr as a$,on as a0,r$ as a1,n$ as a2,Yz as a3,wF as a4,Gs as a5,e0 as a6,NC as a7,Ur as a8,mi as a9,Ra as aA,xn as aB,JA as aC,Nr as aD,OR as aE,spe as aF,EC as aG,SC as aH,K5e as aI,Y5e as aJ,kpe as aK,TF as aL,Q5e as aM,Z5e as aN,gde as aO,aje as aP,W5e as aQ,V5e as aR,U5e as aS,om as aT,eb as aU,p0e as aV,Eo as aW,Yi as aX,er as aY,Pb as aZ,vF as a_,Yke as aa,Wke as ab,iye as ac,MR as ad,Uke as ae,lV as af,_C as ag,Hd as ah,Mxe as ai,J$ as aj,ea as ak,ts as al,Ixe as am,n7 as an,ur as ao,OM as ap,Jn as aq,az as ar,sz as as,Ko as at,Lke as au,Pke as av,eo as aw,No as ax,mye as ay,XA as az,Iwe as b,_F as b0,jF as b1,Kz as b2,NF as b3,EF as b4,rC as b5,OF as b6,MF as b7,PF as b8,VF as b9,Vue as bA,vr as bB,She as bC,phe as bD,Dge as bE,J5e as bF,X5e as bG,ac as bH,zCe as bI,BCe as bJ,fae as bK,i9 as bL,o9 as bM,Tb as ba,UF as bb,Tm as bc,HF as bd,GF as be,cje as bf,lje as bg,Td as bh,_r as bi,nje as bj,eje as bk,Ade as bl,_de as bm,xhe as bn,ug as bo,yC as bp,_je as bq,nwe as br,Mye as bs,iwe as bt,owe as bu,Nwe as bv,m9 as bw,Nn as bx,Q_ as by,os as bz,fg as c,jr as d,ui as e,sc as f,P5e as g,O5e as h,I5e as i,a as j,M5e as k,rc as l,DAe as m,IAe as n,L5e as o,R5e as p,B5e as q,j as r,zV as s,Rd as t,Ot as u,Do as v,RCe as w,Dwe as x,cbe as y,Bi as z};
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.