pesona-ui 0.1.20 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react"),en=require("react-dom");var bt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Si(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Sn={exports:{}},jr={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react"),en=require("react-dom");var bt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _i(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Sn={exports:{}},jr={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Xi;function ac(){if(Xi)return jr;Xi=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,s,i){var a=null;if(i!==void 0&&(a=""+i),s.key!==void 0&&(a=""+s.key),"key"in s){i={};for(var l in s)l!=="key"&&(i[l]=s[l])}else i=s;return s=i.ref,{$$typeof:r,type:n,key:a,ref:s!==void 0?s:null,props:i}}return jr.Fragment=e,jr.jsx=t,jr.jsxs=t,jr}var Ir={};/**
9
+ */var Zi;function ac(){if(Zi)return jr;Zi=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,s,i){var a=null;if(i!==void 0&&(a=""+i),s.key!==void 0&&(a=""+s.key),"key"in s){i={};for(var l in s)l!=="key"&&(i[l]=s[l])}else i=s;return s=i.ref,{$$typeof:r,type:n,key:a,ref:s!==void 0?s:null,props:i}}return jr.Fragment=e,jr.jsx=t,jr.jsxs=t,jr}var Ir={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,58 +14,58 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Zi;function oc(){return Zi||(Zi=1,process.env.NODE_ENV!=="production"&&function(){function r(A){if(A==null)return null;if(typeof A=="function")return A.$$typeof===te?null:A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){case y:return"Fragment";case S:return"Profiler";case N:return"StrictMode";case m:return"Suspense";case T:return"SuspenseList";case Z:return"Activity"}if(typeof A=="object")switch(typeof A.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),A.$$typeof){case x:return"Portal";case j:return(A.displayName||"Context")+".Provider";case _:return(A._context.displayName||"Context")+".Consumer";case $:var B=A.render;return A=A.displayName,A||(A=B.displayName||B.name||"",A=A!==""?"ForwardRef("+A+")":"ForwardRef"),A;case k:return B=A.displayName||null,B!==null?B:r(A.type)||"Memo";case P:B=A._payload,A=A._init;try{return r(A(B))}catch{}}return null}function e(A){return""+A}function t(A){try{e(A);var B=!1}catch{B=!0}if(B){B=console;var F=B.error,X=typeof Symbol=="function"&&Symbol.toStringTag&&A[Symbol.toStringTag]||A.constructor.name||"Object";return F.call(B,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",X),e(A)}}function n(A){if(A===y)return"<>";if(typeof A=="object"&&A!==null&&A.$$typeof===P)return"<...>";try{var B=r(A);return B?"<"+B+">":"<...>"}catch{return"<...>"}}function s(){var A=v.A;return A===null?null:A.getOwner()}function i(){return Error("react-stack-top-frame")}function a(A){if(q.call(A,"key")){var B=Object.getOwnPropertyDescriptor(A,"key").get;if(B&&B.isReactWarning)return!1}return A.key!==void 0}function l(A,B){function F(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",B))}F.isReactWarning=!0,Object.defineProperty(A,"key",{get:F,configurable:!0})}function c(){var A=r(this.type);return I[A]||(I[A]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),A=this.props.ref,A!==void 0?A:null}function u(A,B,F,X,J,H,le,ue){return F=H.ref,A={$$typeof:b,type:A,key:B,props:H,_owner:J},(F!==void 0?F:null)!==null?Object.defineProperty(A,"ref",{enumerable:!1,get:c}):Object.defineProperty(A,"ref",{enumerable:!1,value:null}),A._store={},Object.defineProperty(A._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(A,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(A,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.defineProperty(A,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ue}),Object.freeze&&(Object.freeze(A.props),Object.freeze(A)),A}function h(A,B,F,X,J,H,le,ue){var K=B.children;if(K!==void 0)if(X)if(w(K)){for(X=0;X<K.length;X++)g(K[X]);Object.freeze&&Object.freeze(K)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(K);if(q.call(B,"key")){K=r(A);var re=Object.keys(B).filter(function(ie){return ie!=="key"});X=0<re.length?"{key: someKey, "+re.join(": ..., ")+": ...}":"{key: someKey}",W[K+X]||(re=0<re.length?"{"+re.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Ji;function oc(){return Ji||(Ji=1,process.env.NODE_ENV!=="production"&&function(){function r(A){if(A==null)return null;if(typeof A=="function")return A.$$typeof===te?null:A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){case y:return"Fragment";case S:return"Profiler";case N:return"StrictMode";case m:return"Suspense";case T:return"SuspenseList";case Z:return"Activity"}if(typeof A=="object")switch(typeof A.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),A.$$typeof){case x:return"Portal";case j:return(A.displayName||"Context")+".Provider";case _:return(A._context.displayName||"Context")+".Consumer";case $:var B=A.render;return A=A.displayName,A||(A=B.displayName||B.name||"",A=A!==""?"ForwardRef("+A+")":"ForwardRef"),A;case k:return B=A.displayName||null,B!==null?B:r(A.type)||"Memo";case P:B=A._payload,A=A._init;try{return r(A(B))}catch{}}return null}function e(A){return""+A}function t(A){try{e(A);var B=!1}catch{B=!0}if(B){B=console;var F=B.error,X=typeof Symbol=="function"&&Symbol.toStringTag&&A[Symbol.toStringTag]||A.constructor.name||"Object";return F.call(B,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",X),e(A)}}function n(A){if(A===y)return"<>";if(typeof A=="object"&&A!==null&&A.$$typeof===P)return"<...>";try{var B=r(A);return B?"<"+B+">":"<...>"}catch{return"<...>"}}function s(){var A=v.A;return A===null?null:A.getOwner()}function i(){return Error("react-stack-top-frame")}function a(A){if(q.call(A,"key")){var B=Object.getOwnPropertyDescriptor(A,"key").get;if(B&&B.isReactWarning)return!1}return A.key!==void 0}function l(A,B){function F(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",B))}F.isReactWarning=!0,Object.defineProperty(A,"key",{get:F,configurable:!0})}function c(){var A=r(this.type);return I[A]||(I[A]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),A=this.props.ref,A!==void 0?A:null}function u(A,B,F,X,J,H,le,ue){return F=H.ref,A={$$typeof:b,type:A,key:B,props:H,_owner:J},(F!==void 0?F:null)!==null?Object.defineProperty(A,"ref",{enumerable:!1,get:c}):Object.defineProperty(A,"ref",{enumerable:!1,value:null}),A._store={},Object.defineProperty(A._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(A,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(A,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.defineProperty(A,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ue}),Object.freeze&&(Object.freeze(A.props),Object.freeze(A)),A}function h(A,B,F,X,J,H,le,ue){var K=B.children;if(K!==void 0)if(X)if(w(K)){for(X=0;X<K.length;X++)g(K[X]);Object.freeze&&Object.freeze(K)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(K);if(q.call(B,"key")){K=r(A);var re=Object.keys(B).filter(function(ie){return ie!=="key"});X=0<re.length?"{key: someKey, "+re.join(": ..., ")+": ...}":"{key: someKey}",W[K+X]||(re=0<re.length?"{"+re.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,X,K,re,K),W[K+X]=!0)}if(K=null,F!==void 0&&(t(F),K=""+F),a(B)&&(t(B.key),K=""+B.key),"key"in B){F={};for(var ne in B)ne!=="key"&&(F[ne]=B[ne])}else F=B;return K&&l(F,typeof A=="function"?A.displayName||A.name||"Unknown":A),u(A,K,H,J,s(),F,le,ue)}function g(A){typeof A=="object"&&A!==null&&A.$$typeof===b&&A._store&&(A._store.validated=1)}var f=L,b=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),j=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),te=Symbol.for("react.client.reference"),v=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=Object.prototype.hasOwnProperty,w=Array.isArray,O=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(A){return A()}};var D,I={},M=f.react_stack_bottom_frame.bind(f,i)(),U=O(n(i)),W={};Ir.Fragment=y,Ir.jsx=function(A,B,F,X,J){var H=1e4>v.recentlyCreatedOwnerStacks++;return h(A,B,F,!1,X,J,H?Error("react-stack-top-frame"):M,H?O(n(A)):U)},Ir.jsxs=function(A,B,F,X,J){var H=1e4>v.recentlyCreatedOwnerStacks++;return h(A,B,F,!0,X,J,H?Error("react-stack-top-frame"):M,H?O(n(A)):U)}}()),Ir}var Ji;function lc(){return Ji||(Ji=1,process.env.NODE_ENV==="production"?Sn.exports=ac():Sn.exports=oc()),Sn.exports}var p=lc();const ze=({type:r="button",className:e,children:t,...n})=>p.jsx("button",{type:r==="submit"?"submit":"button",className:e,...n,children:t}),cc=({children:r,className:e})=>p.jsx("div",{className:`card-header ${e}`,children:r}),uc=({children:r,className:e="",...t})=>p.jsx("div",{className:`card-body ${e}`,...t,children:r}),hc=({children:r,className:e=""})=>p.jsx("div",{className:`card-footer ${e}`,children:r}),dc=({children:r,className:e="",...t})=>p.jsx("div",{className:`card ${e}`,...t,children:r}),fc=()=>p.jsx("div",{className:"spinner",children:p.jsx("svg",{className:"spinner-icon",width:"30px",height:"30px",viewBox:"0 0 66 66",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("circle",{className:"path",fill:"none",strokeWidth:"6",strokeLinecap:"round",cx:"33",cy:"33",r:"30"})})}),Pt=(r,e)=>{L.useEffect(()=>{if(!Array.isArray(r)||r.length===0)return;const t=n=>{r.every(i=>i.current&&!i.current.contains(n.target))&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[r,e])},pc=({children:r,items:e,position:t="bottom-left",className:n=""})=>{const[s,i]=L.useState(!1),[a,l]=L.useState({top:0,left:0}),c=L.useRef(null),u=L.useRef(null);return Pt([c,u],()=>{i(!1)}),L.useEffect(()=>{if(s&&c.current&&u.current){const h=c.current.getBoundingClientRect(),g=u.current.getBoundingClientRect(),{scrollX:f,scrollY:b}=window;let x=0,y=0;switch(t){case"bottom-left":x=h.bottom,y=h.left;break;case"bottom-right":x=h.bottom,y=h.right-g.width;break;case"top-left":x=h.top-g.height,y=h.left;break;case"top-right":x=h.top-g.height,y=h.right-g.width;break}l({top:Math.round(x+b),left:Math.round(y+f)})}},[s,t]),p.jsxs(p.Fragment,{children:[p.jsx("div",{ref:c,onClick:()=>i(!s),children:r}),s&&en.createPortal(p.jsx("div",{ref:u,style:{position:"absolute",top:`${a.top}px`,left:`${a.left}px`},className:`dropdown-menu ${t} ${n}`,children:e.map((h,g)=>p.jsxs("div",{className:`dropdown-menu-item ${h.className}`,onClick:()=>{h.onClick(),i(!1)},children:[h.icon&&h.icon," ",h.label]},g))}),document.body)]})},gc=({children:r,className:e="",position:t="bottom-left"})=>{const[n,s]=L.useState(!1),i=L.useRef(null),a=L.useRef(null),l=L.useRef(`dropdown-${Math.random().toString(36).substr(2,9)}`),c=()=>{s(!n)};return Pt([i,a],()=>{s(!1)}),p.jsx("div",{className:`dropdown ${e}`,ref:i,id:l.current,children:L.Children.map(r,u=>L.isValidElement(u)?L.cloneElement(u,{toggleDropdown:c,isOpen:n,position:t,contentRef:a,dropdownId:l.current}):u)})},mc=({children:r,className:e="",toggleDropdown:t,dropdownId:n})=>p.jsx("div",{className:`dropdown-toggle ${e}`,onClick:t,"data-dropdown-id":n,children:r}),bc=({children:r,className:e="",isOpen:t=!1,position:n="bottom-left",contentRef:s,dropdownId:i})=>{const[a,l]=L.useState({top:0,left:0});return L.useEffect(()=>{if(t&&s?.current){const c=document.querySelector(`[data-dropdown-id="${i}"]`);if(c){const u=c.getBoundingClientRect(),h=s.current.getBoundingClientRect(),{scrollX:g,scrollY:f}=window;let b=0,x=0;switch(n){case"bottom-left":b=u.bottom,x=u.left;break;case"bottom-right":b=u.bottom,x=u.right-h.width;break;case"top-left":b=u.top-h.height,x=u.left;break;case"top-right":b=u.top-h.height,x=u.right-h.width;break}l({top:Math.round(b+f),left:Math.round(x+g)})}}},[t,n,s,i]),t?en.createPortal(p.jsx("div",{ref:s,style:{position:"absolute",top:`${a.top}px`,left:`${a.left}px`},className:`dropdown-content ${n} ${e}`,children:r}),document.body):null},vc=({className:r,text:e})=>p.jsx("span",{className:r,children:e}),yc=({children:r,className:e="",...t})=>p.jsx("div",{className:`box ${e}`,...t,children:r}),ci=({children:r})=>p.jsx(p.Fragment,{children:r}),_o=({children:r})=>p.jsx(p.Fragment,{children:r}),Ec=({className:r="",navClassName:e="",contentClassName:t="",children:n,activeTab:s,handleActiveTab:i,customHeader:a})=>{const{tabs:l,groups:c}=L.useMemo(()=>{const h=[],g=[];return L.Children.forEach(n,f=>{if(L.isValidElement(f)){if(f.type===_o){const b=[],x=f.props;L.Children.forEach(x.children,y=>{L.isValidElement(y)&&y.type===ci&&(h.push({title:y.props.title,icon:y.props.icon,children:y.props.children}),b.push(h.length-1))}),g.push({title:x.title,tabIndices:b})}else if(f.type===ci){const b=f.props;h.push({title:b.title,icon:b.icon,children:b.children})}}}),{tabs:h,groups:g}},[n]);L.useEffect(()=>{l.length>0&&(s<0||s>=l.length)&&i(0)},[l.length,s,i]);const u=(h,g)=>p.jsxs("div",{className:`tab-item ${g===s?"active":""}`,onClick:()=>i(g),role:"button",tabIndex:0,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),i(g))},children:[h.icon&&p.jsx("span",{className:"tab-icon",children:h.icon}),p.jsx("span",{className:"tab-title",children:h.title})]},`tab-nav-${g}`);return p.jsxs("div",{className:`card tabs ${r}`,children:[p.jsxs("div",{className:`card-header ${e}`,children:[a,p.jsx("div",{className:"nav-tabs",role:"tablist",children:c.length>0?c.map(h=>p.jsxs(L.Fragment,{children:[p.jsx("legend",{className:"tab-item-legend",children:h.title}),h.tabIndices.map(g=>u(l[g],g))]},`group-${h.title}`)):l.map((h,g)=>u(h,g))})]}),p.jsx("div",{className:`card-body ${t}`,children:p.jsx("div",{className:"tab-content",children:p.jsx("div",{className:"tab-panel",children:l[s]?p.jsx("div",{children:l[s].children},`tab-content-${s}`):p.jsx("div",{children:"No content available"})})})})]})};var Co={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Qi=L.createContext&&L.createContext(Co),xc=["attr","size","title"];function wc(r,e){if(r==null)return{};var t=Nc(r,e),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(s=0;s<i.length;s++)n=i[s],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function Nc(r,e){if(r==null)return{};var t={};for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(e.indexOf(n)>=0)continue;t[n]=r[n]}return t}function Fn(){return Fn=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Fn.apply(this,arguments)}function ea(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,n)}return t}function Un(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ea(Object(t),!0).forEach(function(n){Tc(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ea(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Tc(r,e,t){return e=Ac(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ac(r){var e=Sc(r,"string");return typeof e=="symbol"?e:e+""}function Sc(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Oo(r){return r&&r.map((e,t)=>L.createElement(e.tag,Un({key:t},e.attr),Oo(e.child)))}function Oe(r){return e=>L.createElement(_c,Fn({attr:Un({},r.attr)},e),Oo(r.child))}function _c(r){var e=t=>{var{attr:n,size:s,title:i}=r,a=wc(r,xc),l=s||t.size||"1em",c;return t.className&&(c=t.className),r.className&&(c=(c?c+" ":"")+r.className),L.createElement("svg",Fn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,a,{className:c,style:Un(Un({color:r.color||t.color},t.style),r.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),i&&L.createElement("title",null,i),r.children)};return Qi!==void 0?L.createElement(Qi.Consumer,null,t=>e(t)):e(Co)}function Cc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(r)}function Ro(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(r)}function _i(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(r)}function Oc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 18 9 12 15 6"},child:[]}]})(r)}function Rc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(r)}function Lc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"},child:[]}]})(r)}function kc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"},child:[]}]})(r)}function jc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"19 20 9 12 19 4 19 20"},child:[]},{tag:"line",attr:{x1:"5",y1:"19",x2:"5",y2:"5"},child:[]}]})(r)}function Ic(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"5 4 15 12 5 20 5 4"},child:[]},{tag:"line",attr:{x1:"19",y1:"5",x2:"19",y2:"19"},child:[]}]})(r)}function qc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]}]})(r)}function Lo(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(r)}var qr={},rr={},_n={},kt={},jt={},Gs={},ta;function ko(){return ta||(ta=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.Doctype=r.CDATA=r.Tag=r.Style=r.Script=r.Comment=r.Directive=r.Text=r.Root=r.isTag=r.ElementType=void 0;var e;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(e=r.ElementType||(r.ElementType={}));function t(n){return n.type===e.Tag||n.type===e.Script||n.type===e.Style}r.isTag=t,r.Root=e.Root,r.Text=e.Text,r.Directive=e.Directive,r.Comment=e.Comment,r.Script=e.Script,r.Style=e.Style,r.Tag=e.Tag,r.CDATA=e.CDATA,r.Doctype=e.Doctype}(Gs)),Gs}var ee={},ra;function na(){if(ra)return ee;ra=1;var r=ee&&ee.__extends||function(){var m=function(T,k){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,Z){P.__proto__=Z}||function(P,Z){for(var te in Z)Object.prototype.hasOwnProperty.call(Z,te)&&(P[te]=Z[te])},m(T,k)};return function(T,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");m(T,k);function P(){this.constructor=T}T.prototype=k===null?Object.create(k):(P.prototype=k.prototype,new P)}}(),e=ee&&ee.__assign||function(){return e=Object.assign||function(m){for(var T,k=1,P=arguments.length;k<P;k++){T=arguments[k];for(var Z in T)Object.prototype.hasOwnProperty.call(T,Z)&&(m[Z]=T[Z])}return m},e.apply(this,arguments)};Object.defineProperty(ee,"__esModule",{value:!0}),ee.cloneNode=ee.hasChildren=ee.isDocument=ee.isDirective=ee.isComment=ee.isText=ee.isCDATA=ee.isTag=ee.Element=ee.Document=ee.CDATA=ee.NodeWithChildren=ee.ProcessingInstruction=ee.Comment=ee.Text=ee.DataNode=ee.Node=void 0;var t=ko(),n=function(){function m(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(m.prototype,"parentNode",{get:function(){return this.parent},set:function(T){this.parent=T},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"previousSibling",{get:function(){return this.prev},set:function(T){this.prev=T},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"nextSibling",{get:function(){return this.next},set:function(T){this.next=T},enumerable:!1,configurable:!0}),m.prototype.cloneNode=function(T){return T===void 0&&(T=!1),j(this,T)},m}();ee.Node=n;var s=function(m){r(T,m);function T(k){var P=m.call(this)||this;return P.data=k,P}return Object.defineProperty(T.prototype,"nodeValue",{get:function(){return this.data},set:function(k){this.data=k},enumerable:!1,configurable:!0}),T}(n);ee.DataNode=s;var i=function(m){r(T,m);function T(){var k=m!==null&&m.apply(this,arguments)||this;return k.type=t.ElementType.Text,k}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),T}(s);ee.Text=i;var a=function(m){r(T,m);function T(){var k=m!==null&&m.apply(this,arguments)||this;return k.type=t.ElementType.Comment,k}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),T}(s);ee.Comment=a;var l=function(m){r(T,m);function T(k,P){var Z=m.call(this,P)||this;return Z.name=k,Z.type=t.ElementType.Directive,Z}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),T}(s);ee.ProcessingInstruction=l;var c=function(m){r(T,m);function T(k){var P=m.call(this)||this;return P.children=k,P}return Object.defineProperty(T.prototype,"firstChild",{get:function(){var k;return(k=this.children[0])!==null&&k!==void 0?k:null},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"childNodes",{get:function(){return this.children},set:function(k){this.children=k},enumerable:!1,configurable:!0}),T}(n);ee.NodeWithChildren=c;var u=function(m){r(T,m);function T(){var k=m!==null&&m.apply(this,arguments)||this;return k.type=t.ElementType.CDATA,k}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),T}(c);ee.CDATA=u;var h=function(m){r(T,m);function T(){var k=m!==null&&m.apply(this,arguments)||this;return k.type=t.ElementType.Root,k}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),T}(c);ee.Document=h;var g=function(m){r(T,m);function T(k,P,Z,te){Z===void 0&&(Z=[]),te===void 0&&(te=k==="script"?t.ElementType.Script:k==="style"?t.ElementType.Style:t.ElementType.Tag);var v=m.call(this,Z)||this;return v.name=k,v.attribs=P,v.type=te,v}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"tagName",{get:function(){return this.name},set:function(k){this.name=k},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"attributes",{get:function(){var k=this;return Object.keys(this.attribs).map(function(P){var Z,te;return{name:P,value:k.attribs[P],namespace:(Z=k["x-attribsNamespace"])===null||Z===void 0?void 0:Z[P],prefix:(te=k["x-attribsPrefix"])===null||te===void 0?void 0:te[P]}})},enumerable:!1,configurable:!0}),T}(c);ee.Element=g;function f(m){return(0,t.isTag)(m)}ee.isTag=f;function b(m){return m.type===t.ElementType.CDATA}ee.isCDATA=b;function x(m){return m.type===t.ElementType.Text}ee.isText=x;function y(m){return m.type===t.ElementType.Comment}ee.isComment=y;function N(m){return m.type===t.ElementType.Directive}ee.isDirective=N;function S(m){return m.type===t.ElementType.Root}ee.isDocument=S;function _(m){return Object.prototype.hasOwnProperty.call(m,"children")}ee.hasChildren=_;function j(m,T){T===void 0&&(T=!1);var k;if(x(m))k=new i(m.data);else if(y(m))k=new a(m.data);else if(f(m)){var P=T?$(m.children):[],Z=new g(m.name,e({},m.attribs),P);P.forEach(function(w){return w.parent=Z}),m.namespace!=null&&(Z.namespace=m.namespace),m["x-attribsNamespace"]&&(Z["x-attribsNamespace"]=e({},m["x-attribsNamespace"])),m["x-attribsPrefix"]&&(Z["x-attribsPrefix"]=e({},m["x-attribsPrefix"])),k=Z}else if(b(m)){var P=T?$(m.children):[],te=new u(P);P.forEach(function(O){return O.parent=te}),k=te}else if(S(m)){var P=T?$(m.children):[],v=new h(P);P.forEach(function(O){return O.parent=v}),m["x-mode"]&&(v["x-mode"]=m["x-mode"]),k=v}else if(N(m)){var q=new l(m.name,m.data);m["x-name"]!=null&&(q["x-name"]=m["x-name"],q["x-publicId"]=m["x-publicId"],q["x-systemId"]=m["x-systemId"]),k=q}else throw new Error("Not implemented yet: ".concat(m.type));return k.startIndex=m.startIndex,k.endIndex=m.endIndex,m.sourceCodeLocation!=null&&(k.sourceCodeLocation=m.sourceCodeLocation),k}ee.cloneNode=j;function $(m){for(var T=m.map(function(P){return j(P,!0)}),k=1;k<T.length;k++)T[k].prev=T[k-1],T[k-1].next=T[k];return T}return ee}var sa;function jo(){return sa||(sa=1,function(r){var e=jt&&jt.__createBinding||(Object.create?function(l,c,u,h){h===void 0&&(h=u);var g=Object.getOwnPropertyDescriptor(c,u);(!g||("get"in g?!c.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return c[u]}}),Object.defineProperty(l,h,g)}:function(l,c,u,h){h===void 0&&(h=u),l[h]=c[u]}),t=jt&&jt.__exportStar||function(l,c){for(var u in l)u!=="default"&&!Object.prototype.hasOwnProperty.call(c,u)&&e(c,l,u)};Object.defineProperty(r,"__esModule",{value:!0}),r.DomHandler=void 0;var n=ko(),s=na();t(na(),r);var i={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function l(c,u,h){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof u=="function"&&(h=u,u=i),typeof c=="object"&&(u=c,c=void 0),this.callback=c??null,this.options=u??i,this.elementCB=h??null}return l.prototype.onparserinit=function(c){this.parser=c},l.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},l.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},l.prototype.onerror=function(c){this.handleCallback(c)},l.prototype.onclosetag=function(){this.lastNode=null;var c=this.tagStack.pop();this.options.withEndIndices&&(c.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(c)},l.prototype.onopentag=function(c,u){var h=this.options.xmlMode?n.ElementType.Tag:void 0,g=new s.Element(c,u,void 0,h);this.addNode(g),this.tagStack.push(g)},l.prototype.ontext=function(c){var u=this.lastNode;if(u&&u.type===n.ElementType.Text)u.data+=c,this.options.withEndIndices&&(u.endIndex=this.parser.endIndex);else{var h=new s.Text(c);this.addNode(h),this.lastNode=h}},l.prototype.oncomment=function(c){if(this.lastNode&&this.lastNode.type===n.ElementType.Comment){this.lastNode.data+=c;return}var u=new s.Comment(c);this.addNode(u),this.lastNode=u},l.prototype.oncommentend=function(){this.lastNode=null},l.prototype.oncdatastart=function(){var c=new s.Text(""),u=new s.CDATA([c]);this.addNode(u),c.parent=u,this.lastNode=c},l.prototype.oncdataend=function(){this.lastNode=null},l.prototype.onprocessinginstruction=function(c,u){var h=new s.ProcessingInstruction(c,u);this.addNode(h)},l.prototype.handleCallback=function(c){if(typeof this.callback=="function")this.callback(c,this.dom);else if(c)throw c},l.prototype.addNode=function(c){var u=this.tagStack[this.tagStack.length-1],h=u.children[u.children.length-1];this.options.withStartIndices&&(c.startIndex=this.parser.startIndex),this.options.withEndIndices&&(c.endIndex=this.parser.endIndex),u.children.push(c),h&&(c.prev=h,h.next=c),c.parent=u,this.lastNode=null},l}();r.DomHandler=a,r.default=a}(jt)),jt}var Vs={},ia;function Dc(){return ia||(ia=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CARRIAGE_RETURN_PLACEHOLDER_REGEX=r.CARRIAGE_RETURN_PLACEHOLDER=r.CARRIAGE_RETURN_REGEX=r.CARRIAGE_RETURN=r.CASE_SENSITIVE_TAG_NAMES_MAP=r.CASE_SENSITIVE_TAG_NAMES=void 0,r.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],r.CASE_SENSITIVE_TAG_NAMES_MAP=r.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,t){return e[t.toLowerCase()]=t,e},{}),r.CARRIAGE_RETURN="\r",r.CARRIAGE_RETURN_REGEX=new RegExp(r.CARRIAGE_RETURN,"g"),r.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),r.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(r.CARRIAGE_RETURN_PLACEHOLDER,"g")}(Vs)),Vs}var aa;function Io(){if(aa)return kt;aa=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.formatAttributes=n,kt.escapeSpecialCharacters=i,kt.revertEscapedCharacters=a,kt.formatDOM=l;var r=jo(),e=Dc();function t(c){return e.CASE_SENSITIVE_TAG_NAMES_MAP[c]}function n(c){for(var u={},h=0,g=c.length;h<g;h++){var f=c[h];u[f.name]=f.value}return u}function s(c){c=c.toLowerCase();var u=t(c);return u||c}function i(c){return c.replace(e.CARRIAGE_RETURN_REGEX,e.CARRIAGE_RETURN_PLACEHOLDER)}function a(c){return c.replace(e.CARRIAGE_RETURN_PLACEHOLDER_REGEX,e.CARRIAGE_RETURN)}function l(c,u,h){u===void 0&&(u=null);for(var g=[],f,b=0,x=c.length;b<x;b++){var y=c[b];switch(y.nodeType){case 1:{var N=s(y.nodeName);f=new r.Element(N,n(y.attributes)),f.children=l(N==="template"?y.content.childNodes:y.childNodes,f);break}case 3:f=new r.Text(a(y.nodeValue));break;case 8:f=new r.Comment(y.nodeValue);break;default:continue}var S=g[b-1]||null;S&&(S.next=f),f.parent=u,f.prev=S,f.next=null,g.push(f)}return h&&(f=new r.ProcessingInstruction(h.substring(0,h.indexOf(" ")).toLowerCase(),h),f.next=g[0]||null,f.parent=u,g.unshift(f),g[1]&&(g[1].prev=g[0])),g}return kt}var oa;function Mc(){if(oa)return _n;oa=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.default=y;var r=Io(),e="html",t="head",n="body",s=/<([a-zA-Z]+[0-9]?)/,i=/<head[^]*>/i,a=/<body[^]*>/i,l=function(N,S){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(N,S){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u=typeof window=="object"&&window.DOMParser;if(typeof u=="function"){var h=new u,g="text/html";c=function(N,S){return S&&(N="<".concat(S,">").concat(N,"</").concat(S,">")),h.parseFromString(N,g)},l=c}if(typeof document=="object"&&document.implementation){var f=document.implementation.createHTMLDocument();l=function(N,S){if(S){var _=f.documentElement.querySelector(S);return _&&(_.innerHTML=N),f}return f.documentElement.innerHTML=N,f}}var b=typeof document=="object"&&document.createElement("template"),x;b&&b.content&&(x=function(N){return b.innerHTML=N,b.content.childNodes});function y(N){var S,_;N=(0,r.escapeSpecialCharacters)(N);var j=N.match(s),$=j&&j[1]?j[1].toLowerCase():"";switch($){case e:{var m=c(N);if(!i.test(N)){var T=m.querySelector(t);(S=T?.parentNode)===null||S===void 0||S.removeChild(T)}if(!a.test(N)){var T=m.querySelector(n);(_=T?.parentNode)===null||_===void 0||_.removeChild(T)}return m.querySelectorAll(e)}case t:case n:{var k=l(N).querySelectorAll($);return a.test(N)&&i.test(N)?k[0].parentNode.childNodes:k}default:{if(x)return x(N);var T=l(N,n).querySelector(n);return T.childNodes}}}return _n}var la;function Pc(){if(la)return rr;la=1;var r=rr&&rr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(rr,"__esModule",{value:!0}),rr.default=s;var e=r(Mc()),t=Io(),n=/<(![a-zA-Z\s]+)>/;function s(i){if(typeof i!="string")throw new TypeError("First argument must be a string");if(!i)return[];var a=i.match(n),l=a?a[1]:void 0;return(0,t.formatDOM)((0,e.default)(i),null,l)}return rr}var Cn={},Ie={},Dr={},ca;function Bc(){if(ca)return Dr;ca=1;var r=0;Dr.SAME=r;var e=1;return Dr.CAMELCASE=e,Dr.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1},Dr}var ua;function $c(){if(ua)return Ie;ua=1;const r=0,e=1,t=2,n=3,s=4,i=5,a=6;function l(m){return u.hasOwnProperty(m)?u[m]:null}function c(m,T,k,P,Z,te,v){this.acceptsBooleans=T===t||T===n||T===s,this.attributeName=P,this.attributeNamespace=Z,this.mustUseProperty=k,this.propertyName=m,this.type=T,this.sanitizeURL=te,this.removeEmptyString=v}const u={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(m=>{u[m]=new c(m,r,!1,m,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([m,T])=>{u[m]=new c(m,e,!1,T,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(m=>{u[m]=new c(m,t,!1,m.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(m=>{u[m]=new c(m,t,!1,m,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"].forEach(m=>{u[m]=new c(m,n,!1,m.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(m=>{u[m]=new c(m,n,!0,m,null,!1,!1)}),["capture","download"].forEach(m=>{u[m]=new c(m,s,!1,m,null,!1,!1)}),["cols","rows","size","span"].forEach(m=>{u[m]=new c(m,a,!1,m,null,!1,!1)}),["rowSpan","start"].forEach(m=>{u[m]=new c(m,i,!1,m.toLowerCase(),null,!1,!1)});const g=/[\-\:]([a-z])/g,f=m=>m[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"].forEach(m=>{const T=m.replace(g,f);u[T]=new c(T,e,!1,m,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(m=>{const T=m.replace(g,f);u[T]=new c(T,e,!1,m,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(m=>{const T=m.replace(g,f);u[T]=new c(T,e,!1,m,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(m=>{u[m]=new c(m,e,!1,m.toLowerCase(),null,!1,!1)});const b="xlinkHref";u[b]=new c("xlinkHref",e,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(m=>{u[m]=new c(m,e,!1,m.toLowerCase(),null,!0,!0)});const{CAMELCASE:x,SAME:y,possibleStandardNames:N}=Bc(),_=":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",j=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+_+"]*$")),$=Object.keys(N).reduce((m,T)=>{const k=N[T];return k===y?m[T]=T:k===x?m[T.toLowerCase()]=T:m[T]=k,m},{});return Ie.BOOLEAN=n,Ie.BOOLEANISH_STRING=t,Ie.NUMERIC=i,Ie.OVERLOADED_BOOLEAN=s,Ie.POSITIVE_NUMERIC=a,Ie.RESERVED=r,Ie.STRING=e,Ie.getPropertyInfo=l,Ie.isCustomAttribute=j,Ie.possibleStandardNames=$,Ie}var Mr={},nr={},Ws,ha;function Fc(){if(ha)return Ws;ha=1;var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,t=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
23
- `,u="/",h="*",g="",f="comment",b="declaration";Ws=function(y,N){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];N=N||{};var S=1,_=1;function j(w){var O=w.match(e);O&&(S+=O.length);var D=w.lastIndexOf(c);_=~D?w.length-D:_+w.length}function $(){var w={line:S,column:_};return function(O){return O.position=new m(w),P(),O}}function m(w){this.start=w,this.end={line:S,column:_},this.source=N.source}m.prototype.content=y;function T(w){var O=new Error(N.source+":"+S+":"+_+": "+w);if(O.reason=w,O.filename=N.source,O.line=S,O.column=_,O.source=y,!N.silent)throw O}function k(w){var O=w.exec(y);if(O){var D=O[0];return j(D),y=y.slice(D.length),O}}function P(){k(t)}function Z(w){var O;for(w=w||[];O=te();)O!==!1&&w.push(O);return w}function te(){var w=$();if(!(u!=y.charAt(0)||h!=y.charAt(1))){for(var O=2;g!=y.charAt(O)&&(h!=y.charAt(O)||u!=y.charAt(O+1));)++O;if(O+=2,g===y.charAt(O-1))return T("End of comment missing");var D=y.slice(2,O-2);return _+=2,j(D),y=y.slice(O),_+=2,w({type:f,comment:D})}}function v(){var w=$(),O=k(n);if(O){if(te(),!k(s))return T("property missing ':'");var D=k(i),I=w({type:b,property:x(O[0].replace(r,g)),value:D?x(D[0].replace(r,g)):g});return k(a),I}}function q(){var w=[];Z(w);for(var O;O=v();)O!==!1&&(w.push(O),Z(w));return w}return P(),q()};function x(y){return y?y.replace(l,g):g}return Ws}var da;function Uc(){if(da)return nr;da=1;var r=nr&&nr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.default=t;var e=r(Fc());function t(n,s){var i=null;if(!n||typeof n!="string")return i;var a=(0,e.default)(n),l=typeof s=="function";return a.forEach(function(c){if(c.type==="declaration"){var u=c.property,h=c.value;l?s(u,h,c):h&&(i=i||{},i[u]=h)}}),i}return nr}var Pr={},fa;function Hc(){if(fa)return Pr;fa=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,t=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,i=function(u){return!u||t.test(u)||r.test(u)},a=function(u,h){return h.toUpperCase()},l=function(u,h){return"".concat(h,"-")},c=function(u,h){return h===void 0&&(h={}),i(u)?u:(u=u.toLowerCase(),h.reactCompat?u=u.replace(s,l):u=u.replace(n,l),u.replace(e,a))};return Pr.camelCase=c,Pr}var Br,pa;function zc(){if(pa)return Br;pa=1;var r=Br&&Br.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},e=r(Uc()),t=Hc();function n(s,i){var a={};return!s||typeof s!="string"||(0,e.default)(s,function(l,c){l&&c&&(a[(0,t.camelCase)(l,i)]=c)}),a}return n.default=n,Br=n,Br}var ga;function qo(){return ga||(ga=1,function(r){var e=Mr&&Mr.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(r,"__esModule",{value:!0}),r.returnFirstArg=r.canTextBeChildOfNode=r.ELEMENTS_WITH_NO_TEXT_CHILDREN=r.PRESERVE_CUSTOM_ATTRIBUTES=void 0,r.isCustomComponent=i,r.setStyleProp=l;var t=L,n=e(zc()),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function i(h,g){return h.includes("-")?!s.has(h):!!(g&&typeof g.is=="string")}var a={reactCompat:!0};function l(h,g){if(typeof h=="string"){if(!h.trim()){g.style={};return}try{g.style=(0,n.default)(h,a)}catch{g.style={}}}}r.PRESERVE_CUSTOM_ATTRIBUTES=Number(t.version.split(".")[0])>=16,r.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var c=function(h){return!r.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(h.name)};r.canTextBeChildOfNode=c;var u=function(h){return h};r.returnFirstArg=u}(Mr)),Mr}var ma;function Do(){if(ma)return Cn;ma=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.default=i;var r=$c(),e=qo(),t=["checked","value"],n=["input","select","textarea"],s={reset:!0,submit:!0};function i(l,c){l===void 0&&(l={});var u={},h=!!(l.type&&s[l.type]);for(var g in l){var f=l[g];if((0,r.isCustomAttribute)(g)){u[g]=f;continue}var b=g.toLowerCase(),x=a(b);if(x){var y=(0,r.getPropertyInfo)(x);switch(t.includes(x)&&n.includes(c)&&!h&&(x=a("default"+b)),u[x]=f,y&&y.type){case r.BOOLEAN:u[x]=!0;break;case r.OVERLOADED_BOOLEAN:f===""&&(u[x]=!0);break}continue}e.PRESERVE_CUSTOM_ATTRIBUTES&&(u[g]=f)}return(0,e.setStyleProp)(l.style,u),u}function a(l){return r.possibleStandardNames[l]}return Cn}var sr={},ba;function Gc(){if(ba)return sr;ba=1;var r=sr&&sr.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(sr,"__esModule",{value:!0}),sr.default=i;var e=L,t=r(Do()),n=qo(),s={cloneElement:e.cloneElement,createElement:e.createElement,isValidElement:e.isValidElement};function i(l,c){c===void 0&&(c={});for(var u=[],h=typeof c.replace=="function",g=c.transform||n.returnFirstArg,f=c.library||s,b=f.cloneElement,x=f.createElement,y=f.isValidElement,N=l.length,S=0;S<N;S++){var _=l[S];if(h){var j=c.replace(_,S);if(y(j)){N>1&&(j=b(j,{key:j.key||S})),u.push(g(j,_,S));continue}}if(_.type==="text"){var $=!_.data.trim().length;if($&&_.parent&&!(0,n.canTextBeChildOfNode)(_.parent)||c.trim&&$)continue;u.push(g(_.data,_,S));continue}var m=_,T={};a(m)?((0,n.setStyleProp)(m.attribs.style,m.attribs),T=m.attribs):m.attribs&&(T=(0,t.default)(m.attribs,m.name));var k=void 0;switch(_.type){case"script":case"style":_.children[0]&&(T.dangerouslySetInnerHTML={__html:_.children[0].data});break;case"tag":_.name==="textarea"&&_.children[0]?T.defaultValue=_.children[0].data:_.children&&_.children.length&&(k=i(_.children,c));break;default:continue}N>1&&(T.key=S),u.push(g(x(_.name,T,k),_,S))}return u.length===1?u[0]:u}function a(l){return n.PRESERVE_CUSTOM_ATTRIBUTES&&l.type==="tag"&&(0,n.isCustomComponent)(l.name,l.attribs)}return sr}var va;function Vc(){return va||(va=1,function(r){var e=qr&&qr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(r,"__esModule",{value:!0}),r.htmlToDOM=r.domToReact=r.attributesToProps=r.Text=r.ProcessingInstruction=r.Element=r.Comment=void 0,r.default=l;var t=e(Pc());r.htmlToDOM=t.default;var n=e(Do());r.attributesToProps=n.default;var s=e(Gc());r.domToReact=s.default;var i=jo();Object.defineProperty(r,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(r,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(r,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(r,"Text",{enumerable:!0,get:function(){return i.Text}});var a={lowerCaseAttributeNames:!1};function l(c,u){if(typeof c!="string")throw new TypeError("First argument must be a string");return c?(0,s.default)((0,t.default)(c,u?.htmlparser2||a),u):[]}}(qr)),qr}var Wc=Vc();const ya=Si(Wc),Kc=ya.default||ya,Yc=({type:r,text:e})=>{const[t,n]=L.useState(!0),s=L.useRef(null),i=L.useRef(null),a=()=>{i.current&&(i.current.style.transition="opacity 0.4s",i.current.style.opacity="0"),s.current=window.setTimeout(()=>{n(!t)},500)};return L.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),t?p.jsxs("div",{ref:i,className:`alert ${r}`,role:"alert",children:[p.jsx("p",{children:Kc(e)}),p.jsx("button",{className:"close",type:"button","data-toggle":"close",onClick:a,children:p.jsx(Lo,{})})]}):null},Mo=({children:r,className:e="",...t})=>p.jsx("div",{className:`modal-header ${e}`,...t,children:r}),Po=({children:r,className:e="",...t})=>p.jsx("div",{className:`modal-body ${e}`,...t,children:r}),Bo=({children:r,className:e="",...t})=>p.jsx("div",{className:`modal-footer ${e}`,...t,children:r}),$o=({children:r,className:e="",...t})=>(L.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}),[]),en.createPortal(p.jsx("div",{className:"modal",...t,children:p.jsx("div",{className:`modal-dialog ${e}`,children:r})}),document.body)),Xc=({labelIcon:r,label:e="Confirmation",message:t,onCancel:n,onConfirm:s})=>p.jsxs($o,{className:"modal-sm",children:[p.jsxs(Mo,{className:"bg-danger",children:[p.jsxs("div",{className:"modal-header-title",children:[r||null,p.jsx("span",{children:e})]}),p.jsx("div",{className:"tools",children:p.jsx(Lo,{className:"icon",onClick:n})})]}),p.jsx(Po,{children:p.jsx("p",{children:t})}),p.jsxs(Bo,{className:"justify-content-space-between",children:[p.jsxs(ze,{type:"button",className:"btn btn-default",onClick:n,children:[p.jsx(Cc,{})," Batalkan"]}),p.jsxs(ze,{type:"button",className:"btn btn-primary",onClick:s,children:[p.jsx(Ro,{})," Konfirmasi"]})]})]}),Zc=({className:r="",type:e,title:t,text:n})=>p.jsxs("div",{className:`callout ${e} ${r}`,children:[t&&p.jsx("h5",{children:t}),typeof n=="string"?p.jsx("p",{children:n}):n]}),Jc=({children:r,text:e,position:t="top",className:n="",offset:s=5})=>{const[i,a]=L.useState(!1),[l,c]=L.useState({top:0,left:0}),u=L.useRef(null),h=L.useRef(null);return L.useEffect(()=>{if(i&&u.current&&h.current){const g=u.current.getBoundingClientRect(),f=h.current.getBoundingClientRect(),{scrollX:b,scrollY:x}=window;let y=0,N=0;switch(t){case"top":y=g.top-f.height-s,N=g.left+(g.width-f.width)/2;break;case"bottom":y=g.bottom+s,N=g.left+(g.width-f.width)/2;break;case"left":y=g.top+(g.height-f.height)/2,N=g.left-f.width-s;break;case"right":y=g.top+(g.height-f.height)/2,N=g.right+s;break}c({top:Math.round(y+x),left:Math.round(N+b)})}},[i,t,s]),p.jsxs("div",{ref:u,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[r,i&&en.createPortal(p.jsx("div",{ref:h,style:{position:"absolute",top:`${l.top}px`,left:`${l.left}px`},className:`tooltip ${t} ${n}`,children:e}),document.body)]})},Qc=({className:r,children:e,text:t})=>{const[n,s]=L.useState(!1),[i,a]=L.useState({top:0,left:0}),l=L.useRef(null),c=L.useRef(null);Pt([l,c],()=>{s(!1)}),L.useEffect(()=>{if(n&&l.current&&c.current){const h=l.current.getBoundingClientRect(),g=c.current.getBoundingClientRect(),{scrollX:f,scrollY:b}=window;let x=0,y=0;r.includes("top")?(x=h.top-g.height-10,y=h.left+(h.width-g.width)/2):r.includes("bottom")?(x=h.bottom+10,y=h.left+(h.width-g.width)/2):r.includes("left")?(x=h.top+(h.height-g.height)/2,y=h.left-g.width-10):r.includes("right")&&(x=h.top+(h.height-g.height)/2,y=h.right+10),a({top:Math.round(x+b),left:Math.round(y+f)})}},[n,r]);function u(){s(!n)}return p.jsxs("div",{ref:l,onClick:u,children:[e,n&&en.createPortal(p.jsxs("div",{ref:c,className:`popover ${r}`,role:"tooltip",style:{position:"absolute",top:`${i.top}px`,left:`${i.left}px`},children:[p.jsx("div",{className:"arrow"}),p.jsx("div",{className:"popover-content",children:t})]}),document.body)]})};function eu(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM9 14H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-8 4H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2z"},child:[]}]})(r)}function tu(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"},child:[]}]})(r)}function ru(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"},child:[]}]})(r)}function nu(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M24 24H0V0h24v24z",opacity:".87"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"},child:[]}]})(r)}const su=({defaultIndex:r=0,children:e})=>{const[t,n]=L.useState(r),s=i=>{n(i===t?null:i)};return p.jsx("div",{className:"panel-group",children:L.Children.map(e,(i,a)=>L.cloneElement(i,{isOpen:t===a,onClick:()=>s(a)}))})},iu=({title:r,titleIcon:e,children:t,isOpen:n=!1,onClick:s})=>{const i=L.Children.toArray(t).find(l=>l.type===Fo),a=L.Children.toArray(t).find(l=>l.type===Uo);return p.jsxs("div",{className:"card mb-10",children:[p.jsxs("div",{className:"card-header",role:"button",tabIndex:0,onClick:s,onKeyDown:s,children:[p.jsxs("div",{className:"card-header-title",children:[e," ",r]}),p.jsx("div",{className:"tools",children:p.jsx(nu,{className:`menu-caret ${n?"active":""}`})})]}),n&&p.jsxs("div",{className:"panel active",children:[i,a]})]})},Fo=({className:r="",children:e})=>p.jsx("div",{className:`card-body ${r}`,children:e}),Uo=({className:r="",children:e})=>p.jsx("div",{className:`card-footer ${r}`,children:e}),au=({size:r=40,className:e="",color:t})=>p.jsx("span",{className:`circular-progress ${e} ${t?`brand-${t}`:""}`,style:{width:`${r}px`,height:`${r}px`}}),ou=({showLabel:r=!1,progress:e=0,className:t="",color:n})=>{const s=t.includes("indeterminate");return p.jsxs("div",{className:`linear-progress ${t}`,children:[p.jsx("div",{className:`progress-bar ${n?`brand-${n}`:""}`,children:p.jsx("span",{className:"progress",style:{width:`${e}%`}})}),r&&!s&&p.jsxs("span",{className:"progress-label",children:[e,"%"]})]})},lu=({progress:r=0,size:e=40,className:t="",color:n,strokeWidth:s=4})=>{const[i,a]=L.useState(0);return L.useEffect(()=>{if(i<r){const l=setTimeout(()=>{a(i+1)},10);return()=>clearTimeout(l)}},[i,r]),p.jsxs("div",{className:`circular-progress-with-label ${t}`,children:[p.jsx("span",{className:`progress ${n?`brand-${n}`:""}`,style:{width:`${e}px`,height:`${e}px`,borderWidth:`${s}px`,background:n?`radial-gradient(closest-side, var(--secondary-bg) 79%, transparent 80% 100%), conic-gradient(var(--brand-${n}) ${i}%, var(--primary-bg) 0)`:`radial-gradient(closest-side, var(--secondary-bg) 79%, transparent 80% 100%), conic-gradient(#888 ${i}%, var(--primary-bg) 0)`}}),p.jsxs("span",{className:"progress-label",children:[i,"%"]})]})},ye=[];for(let r=0;r<256;++r)ye.push((r+256).toString(16).slice(1));function cu(r,e=0){return(ye[r[e+0]]+ye[r[e+1]]+ye[r[e+2]]+ye[r[e+3]]+"-"+ye[r[e+4]]+ye[r[e+5]]+"-"+ye[r[e+6]]+ye[r[e+7]]+"-"+ye[r[e+8]]+ye[r[e+9]]+"-"+ye[r[e+10]]+ye[r[e+11]]+ye[r[e+12]]+ye[r[e+13]]+ye[r[e+14]]+ye[r[e+15]]).toLowerCase()}let Ks;const uu=new Uint8Array(16);function hu(){if(!Ks){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ks=crypto.getRandomValues.bind(crypto)}return Ks(uu)}const du=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ea={randomUUID:du};function Ho(r,e,t){if(Ea.randomUUID&&!r)return Ea.randomUUID();r=r||{};const n=r.random??r.rng?.()??hu();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,cu(n)}const Ci=L.forwardRef(({name:r,label:e,message:t,error:n,checked:s=!1,onChange:i,...a},l)=>{const c=Ho(),u=h=>{i(h)};return p.jsxs(p.Fragment,{children:[p.jsxs("label",{className:"custom-checkbox",htmlFor:c,children:[p.jsx("input",{className:"form-control",type:"checkbox",id:c,name:r,ref:l,role:"checkbox",checked:s,onChange:u,...a}),p.jsx("span",{className:"checkmark"}),e&&p.jsx("span",{className:a.required?"required":"",children:e})]}),n?p.jsx("small",{className:"form-message text-danger",children:n}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Ci.displayName="Checkbox";const fu=({children:r})=>p.jsx("div",{className:"form",children:r}),pu=({className:r="",children:e})=>p.jsx("div",{className:`form-group ${r}`,children:e}),gu=({className:r="",children:e})=>p.jsx("div",{className:`form-checkbox ${r}`,children:e}),mu=({className:r="",children:e})=>p.jsx("div",{className:`form-radio ${r}`,children:e}),Oi=(r,e)=>{L.useEffect(()=>{if(r&&e.current){const t=e.current.getBoundingClientRect(),n=window.innerHeight;t.bottom>n?e.current.classList.add("position-top"):e.current.classList.remove("position-top");const s=e.current.querySelector(".option.selected");s&&s.scrollIntoView({block:"nearest"})}},[r,e])},yt=L.forwardRef((r,e)=>{const{name:t,label:n,message:s,selectLabel:i="Select an option",size:a="md",floatingLabel:l=!1,error:c,options:u,value:h="",onChange:g,onBlur:f,required:b,disabled:x}=r,[y,N]=L.useState(!1),S=L.useRef(null),_=L.useRef(null),j=L.useRef(null),$=u.find(T=>T.value===h)?.label??i;L.useImperativeHandle(e,()=>j.current),L.useEffect(()=>N(!1),[]),Pt([S],()=>{N(!1),j.current?.blur()}),Oi(y,_);const m=T=>{const k=u.find(te=>te.value===T);if(!k)return;const P=k.value;if(g?.({target:{name:t,value:P,type:"select-one"},currentTarget:{name:t,value:P}}),j.current){j.current.value=String(P);const te=new CustomEvent("change",{bubbles:!0,detail:{originalValue:P}});j.current.dispatchEvent(te)}N(!1)};return p.jsxs(p.Fragment,{children:[p.jsxs("select",{ref:j,name:t,value:h!=null&&!Number.isNaN(h)?h:"",onChange:g,onBlur:f,required:b,disabled:x,style:{position:"absolute",left:"-9999px"},tabIndex:-1,children:[p.jsx("option",{value:"",children:"Select an option"}),u.map(T=>p.jsx("option",{value:String(T.value),children:T.label},T.value))]}),n&&!l&&p.jsxs("label",{htmlFor:t,children:[n," ",b&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:`dropdown-select-container ${a}`,ref:S,children:[p.jsxs("div",{className:`dropdown-header ${y?"open":""} ${x?"disabled":""}`,onClick:()=>!x&&N(!y),"aria-haspopup":"listbox","aria-expanded":y,children:[p.jsx("span",{className:"label",children:$}),p.jsx(_i,{className:"arrow"})]}),y&&p.jsx("div",{className:"dropdown-options scrollbar",ref:_,role:"listbox",children:u.map(T=>p.jsx("div",{className:`option ${T.value===h?"selected":""}`,onClick:()=>m(T.value),role:"option","aria-selected":T.value===h,children:T.label},T.value))})]}),n&&l&&p.jsxs("label",{htmlFor:t,children:[n," ",b&&p.jsx("span",{className:"text-danger",children:"*"})]}),c?p.jsx("small",{className:"form-message text-danger",children:c}):s&&p.jsx("small",{className:"form-message text-muted",children:s})]})});yt.displayName="Select";const bu=r=>{const[e,t]=L.useState(!1);return L.useEffect(()=>{const n=()=>{if(!r.current)return;const{top:i,height:a}=r.current.getBoundingClientRect(),l=window.innerHeight;t(i+a>l)};n();const s=()=>{n()};return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[r]),e},zo=r=>{const e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return`${e}-${t}-${n}`},vu=r=>r.toLocaleDateString("id-ID",{timeZone:"Asia/Jakarta",year:"numeric",month:"long",day:"numeric"}),Wr=(r,e)=>Array.from({length:r},(t,n)=>e(n)),On=(r,e)=>{const t=new Date(e,r,1).getDay(),n=new Date(e,r+1,0).getDate(),s=Wr(t,()=>({value:"",label:""})),i=Wr(n,a=>({value:(a+1).toString(),label:(a+1).toString()}));return[...s,...i]},yu=(r,e)=>{const t=new Date(e,r+1,0).getDate();return Wr(t,n=>({value:(n+1).toString(),label:(n+1).toString()}))},Go=(r="id-ID")=>Wr(12,e=>({value:(e+1).toString(),label:new Date(2024,e,1).toLocaleString(r,{month:"long"})})),Vo=()=>{const r=new Date().getFullYear(),e=r-60,n=r+20-e+1;return Wr(n,s=>{const i=e+s;return{value:i.toString(),label:i.toString()}})},xa=r=>{const e=new Date(r);return e instanceof Date&&!isNaN(e.getTime())},Eu=["Min","Sen","Sel","Rab","Kam","Jum","Sab"],xu=r=>{const[e,t]=L.useState(r);return{selectedDate:e,handlePrevMonth:()=>{const c=new Date(e);c.setMonth(e.getMonth()-1),t(c)},handleNextMonth:()=>{const c=new Date(e);c.setMonth(e.getMonth()+1),t(c)},handleDateClick:(c,u,h,g)=>{const f=new Date(parseInt(h,10),parseInt(u,10),parseInt(c,10));t(f),g(zo(f))},isSelectedDate:(c,u,h)=>parseInt(h,10)===e.getFullYear()&&parseInt(u,10)===e.getMonth()+1&&parseInt(c,10)===e.getDate(),setDate:c=>{t(c)}}},Wo=({onSelect:r,defaultDate:e,full:t=!1})=>{const n=L.useRef(null),s=bu(n),i=xa(e)?new Date(e):new Date,{selectedDate:a,handlePrevMonth:l,handleNextMonth:c,handleDateClick:u,isSelectedDate:h,setDate:g}=xu(i),[f,b]=L.useState(On(i.getMonth(),i.getFullYear()));L.useEffect(()=>{if(e&&xa(e)){const y=new Date(e);g(y)}},[e,g]),L.useEffect(()=>{b(On(a.getMonth(),a.getFullYear()))},[a]);const x=(y,N)=>{const S=parseInt(y,10),_=S+1;return f.map((j,$)=>j.value!==""?p.jsx("div",{className:`calendar-day ${h(j.value,_.toString(),N)?"selected-date":""}`,onClick:()=>{const m=new Date(parseInt(N,10),S,parseInt(j.value,10)),T=t?vu(m):zo(m);u(j.value,y,N,()=>r(T))},children:j.label},`day-${$}`):p.jsx("div",{className:"calendar-day empty"},`day-${$}`))};return p.jsxs("div",{className:`date-picker ${s?"position-top":""}`,ref:n,children:[p.jsxs("div",{className:"calendar-nav",children:[p.jsx("button",{type:"button",className:"btn btn-rounded",onClick:l,children:p.jsx(tu,{})}),p.jsxs("div",{className:"calendar-select",children:[p.jsx(yt,{name:"month",size:"md",options:Go(),value:(a.getMonth()+1).toString(),onChange:y=>{const N=parseInt(y.target.value,10)-1,S=new Date(a.getFullYear(),N,a.getDate());g(S),b(On(N,S.getFullYear()))}}),p.jsx(yt,{name:"year",size:"md",options:Vo(),value:a.getFullYear().toString(),onChange:y=>{const N=parseInt(y.target.value,10),S=new Date(N,a.getMonth(),a.getDate());g(S),b(On(S.getMonth(),N))}})]}),p.jsx("button",{type:"button",className:"btn btn-rounded",onClick:c,children:p.jsx(ru,{})})]}),p.jsxs("div",{className:"calendar",children:[p.jsx("div",{className:"calendar-header",children:Eu.map((y,N)=>p.jsx("div",{className:"calendar-day-name",children:y},`day-${N}`))}),p.jsx("div",{className:"calendar-body",children:x(a.getMonth().toString(),a.getFullYear().toString())})]})]})},Ko=L.forwardRef(({name:r,label:e,message:t,floatingLabel:n,locale:s="id",error:i,value:a,...l},c)=>{const u=_=>{if(!_)return new Date;const j=new Date(_);return isNaN(j.getTime())?new Date:j},h=u(a),[g,f]=L.useState({day:h.getDate(),month:h.getMonth()+1,year:h.getFullYear()});L.useEffect(()=>{if(a){const _=u(a);f({day:_.getDate(),month:_.getMonth()+1,year:_.getFullYear()})}},[a]),L.useEffect(()=>{const _=new Date(g.year,g.month,0).getDate();g.day>_&&f(j=>({...j,day:_}))},[g.month,g.year]);const b=(_,j)=>{const $=parseInt(j,10);if(isNaN($))return;const m={...g,[_]:$};if(f(m),l.onChange){const T=`${m.year}-${String(m.month).padStart(2,"0")}-${String(m.day).padStart(2,"0")}`;l.onChange({target:{name:r,value:T}})}},x=L.useMemo(()=>yu(g.month-1,g.year),[g.month,g.year]),y=L.useMemo(()=>Go(s),[s]),N=L.useMemo(()=>Vo(),[]),S=p.jsxs("label",{htmlFor:r,children:[e," ",l.required&&p.jsx("span",{className:"text-danger",children:"*"})]});return p.jsxs(p.Fragment,{children:[!n&&S,p.jsxs("div",{className:"row",ref:c,children:[p.jsx("div",{className:"col-md-3",children:p.jsx(yt,{name:`${r}-day`,disabled:l.disabled,options:x,value:g.day.toString(),onChange:_=>b("day",_.target.value),"aria-label":"Day"})}),p.jsx("div",{className:"col-md-5",children:p.jsx(yt,{name:`${r}-month`,disabled:l.disabled,options:y,value:g.month.toString(),onChange:_=>b("month",_.target.value),"aria-label":"Month"})}),p.jsx("div",{className:"col-md-4",children:p.jsx(yt,{name:`${r}-year`,disabled:l.disabled,options:N,value:g.year.toString(),onChange:_=>b("year",_.target.value),"aria-label":"Year"})})]}),n&&S,i?p.jsx("small",{className:"form-message text-danger",children:i}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Ko.displayName="DropdownDatePicker";const wu=({type:r="text",className:e,...t})=>p.jsx("input",{type:r,className:`clear ${e}`,...t}),Yo=L.forwardRef(({className:r,name:e,label:t,message:n,floatingLabel:s,error:i,...a},l)=>p.jsxs(p.Fragment,{children:[!s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",a.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("input",{type:"text",className:`form-control ${r}`,id:e,name:e,placeholder:s?"":" ",ref:l,...a}),s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",a.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):n&&p.jsx("small",{className:"form-message text-muted",children:n})]})),Nu=L.forwardRef(({className:r,name:e,label:t,message:n,floatingLabel:s,error:i,actionIcon:a,actionButtonLabel:l,actionButtonHandler:c,...u},h)=>p.jsxs(p.Fragment,{children:[!s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",u.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:"input-group-icon",children:[p.jsx("input",{type:"text",className:`form-control pr-35 ${r}`,id:e,name:e,placeholder:s?"":" ",ref:h,...u}),a&&p.jsx(ze,{role:"button",className:"icon",onClick:c,tabIndex:0,"aria-label":l,disabled:u.disabled,children:a})]}),s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",u.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):n&&p.jsx("small",{className:"form-message text-muted",children:n})]})),Xo=L.forwardRef(({name:r,label:e,message:t,floatingLabel:n,full:s,error:i,onChange:a,value:l,...c},u)=>{const[h,g]=L.useState(!1),f=L.useRef(null),b=L.useRef(null);L.useImperativeHandle(u,()=>f.current),L.useEffect(()=>{l!==void 0&&f.current&&(f.current.value=l)},[l]);const x=y=>{f.current&&(f.current.value=y,a?.({target:f.current,currentTarget:f.current}),g(!1))};return Pt([b],()=>g(!1)),p.jsxs(p.Fragment,{children:[!n&&p.jsxs("label",{htmlFor:r,children:[e," ",c.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:"input-group-icon",children:[p.jsx("input",{type:"text",className:"form-control",id:r,name:r,placeholder:n?"":" ",ref:f,onChange:a,...c}),p.jsx(ze,{role:"button",className:"icon",onClick:y=>{y.stopPropagation(),g(N=>!N)},"aria-label":"Open date picker",disabled:c.disabled,children:p.jsx(eu,{})})]}),p.jsx("div",{ref:b,className:`date-picker-container ${h?"show":"hide"}`,style:{display:h?"block":"none"},children:p.jsx(Wo,{full:s,onSelect:x,defaultDate:l||void 0})}),n&&p.jsxs("label",{htmlFor:r,children:[e," ",c.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Xo.displayName="InputDate";const Zo=L.forwardRef(({name:r,label:e,message:t,accept:n,error:s,onChange:i,...a},l)=>{const c=u=>{i&&i(u)};return p.jsxs("div",{className:"form-group",children:[e&&p.jsxs("label",{htmlFor:r,children:[e," ",a.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("input",{type:"file",className:"form-control",id:r,name:r,accept:n,onChange:c,ref:l,...a}),s?p.jsx("small",{className:"form-message text-danger",children:s}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Zo.displayName="InputFile";const Tu=()=>p.jsx("div",{children:"InputImageSize"}),Jo=L.forwardRef(({name:r,label:e,message:t,floatingLabel:n,error:s,...i},a)=>p.jsxs(p.Fragment,{children:[!n&&p.jsxs("label",{htmlFor:r,children:[e," ",i.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("textarea",{className:"form-control",id:r,name:r,placeholder:n?"":" ",ref:a,...i}),n&&p.jsxs("label",{htmlFor:r,children:[e," ",i.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),s?p.jsx("small",{className:"form-message text-danger",children:s}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]}));Jo.displayName="InputTextArea";const Au=L.forwardRef(({name:r,label:e,message:t,options:n,error:s,...i},a)=>p.jsxs(p.Fragment,{children:[e&&p.jsxs("label",{htmlFor:r,children:[e," ",i.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("div",{className:"form-control",children:n.map(l=>{const c=`${Ho()}-${l.value}`;return p.jsxs("div",{className:"d-flex align-items-center",children:[p.jsx("input",{type:"radio",id:c,name:r,value:l.value,ref:a,...i}),p.jsx("label",{htmlFor:c,children:l.label})]},l.value)})}),s?p.jsx("small",{className:"form-message text-danger",children:s}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})),Qo=L.forwardRef(({name:r,label:e,message:t,size:n="md",options:s,selectedValue:i,error:a,required:l,...c},u)=>p.jsxs(p.Fragment,{children:[e&&p.jsxs("label",{htmlFor:r,children:[e," ",l&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("div",{className:"btn-group","data-toggle":"buttons",children:s.map(h=>{const g=h.value.toString()===i?.toString();return p.jsxs("label",{className:`btn auto btn-default btn-${n} ${g?"active":""}`,children:[p.jsx("input",{type:"radio",id:h.value.toString(),name:r,value:h.value.toString(),ref:u,...c}),p.jsx("span",{children:h.label})]},h.value.toString())})}),a?p.jsx("small",{className:"form-message text-danger",children:a}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]}));Qo.displayName="RadioButtonGroup";const el=L.forwardRef(({name:r,label:e,message:t,selectLabel:n,floatingLabel:s=!1,error:i,options:a,value:l=[],onChange:c,required:u,disabled:h,className:g},f)=>{const[b,x]=L.useState(!1),[y,N]=L.useState(l),S=L.useRef(null),_=L.useRef(null);L.useEffect(()=>{JSON.stringify(l)!==JSON.stringify(y)&&N(l)},[y,l]);const j=m=>{const T=y.includes(m)?y.filter(k=>k!==m):[...y,m];N(T),c&&c({target:{name:r,value:T}})};Pt([S],()=>{x(!1)}),Oi(b,_);const $=y.map(m=>a.find(T=>T.value===m)?.label).filter(Boolean).join(", ");return p.jsxs(p.Fragment,{children:[e&&!s&&p.jsxs("label",{htmlFor:r,children:[e," ",u&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:`dropdown-select-container ${g||""}`,ref:S,children:[p.jsxs("div",{className:`dropdown-header ${b?"open":""} ${h?"disabled":""}`,onClick:()=>!h&&x(!b),ref:f,children:[p.jsx("span",{className:"label",children:$||n||"Select an option"}),p.jsx(_i,{className:`arrow ${b?"open":""}`})]}),b&&!h&&p.jsx("div",{className:"dropdown-options scrollbar",ref:_,role:"listbox",children:a?.map(m=>p.jsx("div",{className:`option ${y.includes(m.value)?"selected":""}`,children:p.jsx(Ci,{name:m.value.toString(),label:m.label,checked:y.includes(m.value),onChange:()=>j(m.value)})},m.value))})]}),e&&s&&p.jsxs("label",{htmlFor:r,children:[e," ",u&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});el.displayName="SelectMultiple";const tl=L.forwardRef((r,e)=>{const{name:t,label:n,message:s,selectLabel:i="Select an option",size:a="md",floatingLabel:l=!1,error:c,options:u=[],value:h="",onChange:g,required:f,disabled:b,selectSearch:x="",setSelectSearch:y,isLoading:N=!1}=r,[S,_]=L.useState(!1),j=L.useRef(null),$=L.useRef(null),m=L.useRef(null);L.useImperativeHandle(e,()=>m.current),Pt([j],()=>_(!1)),Oi(S,$);const T=h?u.find(P=>P.value===h)?.label:i,k=P=>{g?.({target:{name:t,value:P}}),m.current&&(m.current.value=String(P),m.current.dispatchEvent(new Event("change",{bubbles:!0}))),_(!1)};return p.jsxs(p.Fragment,{children:[p.jsxs("select",{ref:m,name:t,value:h,onChange:g,style:{position:"absolute",left:"-9999px"},tabIndex:-1,children:[p.jsx("option",{value:"",children:"Select an option"}),u.map(P=>p.jsx("option",{value:P.value,children:P.label},P.value))]}),n&&!l&&p.jsxs("label",{htmlFor:t,children:[n," ",f&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:`dropdown-select-container ${a}`,ref:j,children:[p.jsxs("div",{className:`dropdown-header ${S?"open":""} ${b?"disabled":""}`,onClick:()=>!b&&_(!S),"aria-haspopup":"listbox","aria-expanded":S,children:[p.jsx("span",{className:"label",children:T}),p.jsx(_i,{className:"arrow"})]}),S&&p.jsxs("div",{className:"dropdown-options scrollbar",ref:$,role:"listbox",children:[p.jsx("div",{className:"search-input",children:p.jsx(Yo,{name:"search",placeholder:"Ketik untuk mencari..",type:"search",autoFocus:!0,value:x,onChange:P=>y?.(P.currentTarget.value)})}),N?p.jsx("div",{className:"p-10 text-center",children:"Loading options..."}):u.length===0?p.jsx("div",{className:"p-10 text-center",children:"Tidak ada hasil ditemukan"}):u.map(P=>p.jsx("div",{className:`option ${h===P.value?"selected":""}`,onClick:()=>k(P.value),role:"option","aria-selected":h===P.value,children:P.label},P.value))]})]}),n&&l&&p.jsxs("label",{htmlFor:t,children:[n," ",f&&p.jsx("span",{className:"text-danger",children:"*"})]}),c?p.jsx("small",{className:"form-message text-danger",children:c}):s&&p.jsx("small",{className:"form-message text-muted",children:s})]})});tl.displayName="SelectWithSearch";const rl=L.forwardRef(({name:r,className:e="",error:t,checked:n=!1,onChange:s,...i},a)=>{const l=c=>{s&&s(c)};return p.jsx(p.Fragment,{children:p.jsxs("label",{className:`switch ${e} ${t?"has-error":""}`,children:[p.jsx("input",{type:"checkbox",id:r,name:r,ref:a,checked:n,onChange:l,disabled:i.disabled,...i}),p.jsx("span",{className:"slider round"})]})})});rl.displayName="Switch";var nl=typeof global=="object"&&global&&global.Object===Object&&global,Su=typeof self=="object"&&self&&self.Object===Object&&self,tt=nl||Su||Function("return this")(),wt=tt.Symbol,sl=Object.prototype,_u=sl.hasOwnProperty,Cu=sl.toString,$r=wt?wt.toStringTag:void 0;function Ou(r){var e=_u.call(r,$r),t=r[$r];try{r[$r]=void 0;var n=!0}catch{}var s=Cu.call(r);return n&&(e?r[$r]=t:delete r[$r]),s}var Ru=Object.prototype,Lu=Ru.toString;function ku(r){return Lu.call(r)}var ju="[object Null]",Iu="[object Undefined]",wa=wt?wt.toStringTag:void 0;function gr(r){return r==null?r===void 0?Iu:ju:wa&&wa in Object(r)?Ou(r):ku(r)}function ct(r){return r!=null&&typeof r=="object"}var It=Array.isArray;function Nt(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}function il(r){return r}var qu="[object AsyncFunction]",Du="[object Function]",Mu="[object GeneratorFunction]",Pu="[object Proxy]";function Ri(r){if(!Nt(r))return!1;var e=gr(r);return e==Du||e==Mu||e==qu||e==Pu}var Ys=tt["__core-js_shared__"],Na=function(){var r=/[^.]+$/.exec(Ys&&Ys.keys&&Ys.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Bu(r){return!!Na&&Na in r}var $u=Function.prototype,Fu=$u.toString;function Bt(r){if(r!=null){try{return Fu.call(r)}catch{}try{return r+""}catch{}}return""}var Uu=/[\\^$.*+?()[\]{}|]/g,Hu=/^\[object .+?Constructor\]$/,zu=Function.prototype,Gu=Object.prototype,Vu=zu.toString,Wu=Gu.hasOwnProperty,Ku=RegExp("^"+Vu.call(Wu).replace(Uu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Yu(r){if(!Nt(r)||Bu(r))return!1;var e=Ri(r)?Ku:Hu;return e.test(Bt(r))}function Xu(r,e){return r?.[e]}function $t(r,e){var t=Xu(r,e);return Yu(t)?t:void 0}var ui=$t(tt,"WeakMap"),Ta=Object.create,Zu=function(){function r(){}return function(e){if(!Nt(e))return{};if(Ta)return Ta(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();function Ju(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}function Qu(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var eh=800,th=16,rh=Date.now;function nh(r){var e=0,t=0;return function(){var n=rh(),s=th-(n-t);if(t=n,s>0){if(++e>=eh)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}function sh(r){return function(){return r}}var Hn=function(){try{var r=$t(Object,"defineProperty");return r({},"",{}),r}catch{}}(),ih=Hn?function(r,e){return Hn(r,"toString",{configurable:!0,enumerable:!1,value:sh(e),writable:!0})}:il,ah=nh(ih);function oh(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var lh=9007199254740991,ch=/^(?:0|[1-9]\d*)$/;function al(r,e){var t=typeof r;return e=e??lh,!!e&&(t=="number"||t!="symbol"&&ch.test(r))&&r>-1&&r%1==0&&r<e}function Li(r,e,t){e=="__proto__"&&Hn?Hn(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}function tn(r,e){return r===e||r!==r&&e!==e}var uh=Object.prototype,hh=uh.hasOwnProperty;function ol(r,e,t){var n=r[e];(!(hh.call(r,e)&&tn(n,t))||t===void 0&&!(e in r))&&Li(r,e,t)}function dh(r,e,t,n){var s=!t;t||(t={});for(var i=-1,a=e.length;++i<a;){var l=e[i],c=void 0;c===void 0&&(c=r[l]),s?Li(t,l,c):ol(t,l,c)}return t}var Aa=Math.max;function fh(r,e,t){return e=Aa(e===void 0?r.length-1:e,0),function(){for(var n=arguments,s=-1,i=Aa(n.length-e,0),a=Array(i);++s<i;)a[s]=n[e+s];s=-1;for(var l=Array(e+1);++s<e;)l[s]=n[s];return l[e]=t(a),Ju(r,this,l)}}function ph(r,e){return ah(fh(r,e,il),r+"")}var gh=9007199254740991;function ll(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=gh}function Yn(r){return r!=null&&ll(r.length)&&!Ri(r)}function mh(r,e,t){if(!Nt(t))return!1;var n=typeof e;return(n=="number"?Yn(t)&&al(e,t.length):n=="string"&&e in t)?tn(t[e],r):!1}function bh(r){return ph(function(e,t){var n=-1,s=t.length,i=s>1?t[s-1]:void 0,a=s>2?t[2]:void 0;for(i=r.length>3&&typeof i=="function"?(s--,i):void 0,a&&mh(t[0],t[1],a)&&(i=s<3?void 0:i,s=1),e=Object(e);++n<s;){var l=t[n];l&&r(e,l,n,i)}return e})}var vh=Object.prototype;function ki(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||vh;return r===t}function yh(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var Eh="[object Arguments]";function Sa(r){return ct(r)&&gr(r)==Eh}var cl=Object.prototype,xh=cl.hasOwnProperty,wh=cl.propertyIsEnumerable,hi=Sa(function(){return arguments}())?Sa:function(r){return ct(r)&&xh.call(r,"callee")&&!wh.call(r,"callee")};function Nh(){return!1}var ul=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_a=ul&&typeof module=="object"&&module&&!module.nodeType&&module,Th=_a&&_a.exports===ul,Ca=Th?tt.Buffer:void 0,Ah=Ca?Ca.isBuffer:void 0,Kr=Ah||Nh,Sh="[object Arguments]",_h="[object Array]",Ch="[object Boolean]",Oh="[object Date]",Rh="[object Error]",Lh="[object Function]",kh="[object Map]",jh="[object Number]",Ih="[object Object]",qh="[object RegExp]",Dh="[object Set]",Mh="[object String]",Ph="[object WeakMap]",Bh="[object ArrayBuffer]",$h="[object DataView]",Fh="[object Float32Array]",Uh="[object Float64Array]",Hh="[object Int8Array]",zh="[object Int16Array]",Gh="[object Int32Array]",Vh="[object Uint8Array]",Wh="[object Uint8ClampedArray]",Kh="[object Uint16Array]",Yh="[object Uint32Array]",fe={};fe[Fh]=fe[Uh]=fe[Hh]=fe[zh]=fe[Gh]=fe[Vh]=fe[Wh]=fe[Kh]=fe[Yh]=!0;fe[Sh]=fe[_h]=fe[Bh]=fe[Ch]=fe[$h]=fe[Oh]=fe[Rh]=fe[Lh]=fe[kh]=fe[jh]=fe[Ih]=fe[qh]=fe[Dh]=fe[Mh]=fe[Ph]=!1;function Xh(r){return ct(r)&&ll(r.length)&&!!fe[gr(r)]}function ji(r){return function(e){return r(e)}}var hl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gr=hl&&typeof module=="object"&&module&&!module.nodeType&&module,Zh=Gr&&Gr.exports===hl,Xs=Zh&&nl.process,fr=function(){try{var r=Gr&&Gr.require&&Gr.require("util").types;return r||Xs&&Xs.binding&&Xs.binding("util")}catch{}}(),Oa=fr&&fr.isTypedArray,Ii=Oa?ji(Oa):Xh,Jh=Object.prototype,Qh=Jh.hasOwnProperty;function dl(r,e){var t=It(r),n=!t&&hi(r),s=!t&&!n&&Kr(r),i=!t&&!n&&!s&&Ii(r),a=t||n||s||i,l=a?yh(r.length,String):[],c=l.length;for(var u in r)(e||Qh.call(r,u))&&!(a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||al(u,c)))&&l.push(u);return l}function fl(r,e){return function(t){return r(e(t))}}var ed=fl(Object.keys,Object),td=Object.prototype,rd=td.hasOwnProperty;function nd(r){if(!ki(r))return ed(r);var e=[];for(var t in Object(r))rd.call(r,t)&&t!="constructor"&&e.push(t);return e}function sd(r){return Yn(r)?dl(r):nd(r)}function id(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var ad=Object.prototype,od=ad.hasOwnProperty;function ld(r){if(!Nt(r))return id(r);var e=ki(r),t=[];for(var n in r)n=="constructor"&&(e||!od.call(r,n))||t.push(n);return t}function pl(r){return Yn(r)?dl(r,!0):ld(r)}var Yr=$t(Object,"create");function cd(){this.__data__=Yr?Yr(null):{},this.size=0}function ud(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var hd="__lodash_hash_undefined__",dd=Object.prototype,fd=dd.hasOwnProperty;function pd(r){var e=this.__data__;if(Yr){var t=e[r];return t===hd?void 0:t}return fd.call(e,r)?e[r]:void 0}var gd=Object.prototype,md=gd.hasOwnProperty;function bd(r){var e=this.__data__;return Yr?e[r]!==void 0:md.call(e,r)}var vd="__lodash_hash_undefined__";function yd(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Yr&&e===void 0?vd:e,this}function qt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}qt.prototype.clear=cd;qt.prototype.delete=ud;qt.prototype.get=pd;qt.prototype.has=bd;qt.prototype.set=yd;function Ed(){this.__data__=[],this.size=0}function Xn(r,e){for(var t=r.length;t--;)if(tn(r[t][0],e))return t;return-1}var xd=Array.prototype,wd=xd.splice;function Nd(r){var e=this.__data__,t=Xn(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():wd.call(e,t,1),--this.size,!0}function Td(r){var e=this.__data__,t=Xn(e,r);return t<0?void 0:e[t][1]}function Ad(r){return Xn(this.__data__,r)>-1}function Sd(r,e){var t=this.__data__,n=Xn(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}function ht(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}ht.prototype.clear=Ed;ht.prototype.delete=Nd;ht.prototype.get=Td;ht.prototype.has=Ad;ht.prototype.set=Sd;var Xr=$t(tt,"Map");function _d(){this.size=0,this.__data__={hash:new qt,map:new(Xr||ht),string:new qt}}function Cd(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}function Zn(r,e){var t=r.__data__;return Cd(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Od(r){var e=Zn(this,r).delete(r);return this.size-=e?1:0,e}function Rd(r){return Zn(this,r).get(r)}function Ld(r){return Zn(this,r).has(r)}function kd(r,e){var t=Zn(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}function Ft(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Ft.prototype.clear=_d;Ft.prototype.delete=Od;Ft.prototype.get=Rd;Ft.prototype.has=Ld;Ft.prototype.set=kd;function jd(r,e){for(var t=-1,n=e.length,s=r.length;++t<n;)r[s+t]=e[t];return r}var gl=fl(Object.getPrototypeOf,Object),Id="[object Object]",qd=Function.prototype,Dd=Object.prototype,ml=qd.toString,Md=Dd.hasOwnProperty,Pd=ml.call(Object);function Bd(r){if(!ct(r)||gr(r)!=Id)return!1;var e=gl(r);if(e===null)return!0;var t=Md.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&ml.call(t)==Pd}function $d(){this.__data__=new ht,this.size=0}function Fd(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}function Ud(r){return this.__data__.get(r)}function Hd(r){return this.__data__.has(r)}var zd=200;function Gd(r,e){var t=this.__data__;if(t instanceof ht){var n=t.__data__;if(!Xr||n.length<zd-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new Ft(n)}return t.set(r,e),this.size=t.size,this}function Qe(r){var e=this.__data__=new ht(r);this.size=e.size}Qe.prototype.clear=$d;Qe.prototype.delete=Fd;Qe.prototype.get=Ud;Qe.prototype.has=Hd;Qe.prototype.set=Gd;var bl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ra=bl&&typeof module=="object"&&module&&!module.nodeType&&module,Vd=Ra&&Ra.exports===bl,La=Vd?tt.Buffer:void 0,ka=La?La.allocUnsafe:void 0;function vl(r,e){if(e)return r.slice();var t=r.length,n=ka?ka(t):new r.constructor(t);return r.copy(n),n}function Wd(r,e){for(var t=-1,n=r==null?0:r.length,s=0,i=[];++t<n;){var a=r[t];e(a,t,r)&&(i[s++]=a)}return i}function Kd(){return[]}var Yd=Object.prototype,Xd=Yd.propertyIsEnumerable,ja=Object.getOwnPropertySymbols,Zd=ja?function(r){return r==null?[]:(r=Object(r),Wd(ja(r),function(e){return Xd.call(r,e)}))}:Kd;function Jd(r,e,t){var n=e(r);return It(r)?n:jd(n,t(r))}function di(r){return Jd(r,sd,Zd)}var fi=$t(tt,"DataView"),pi=$t(tt,"Promise"),gi=$t(tt,"Set"),Ia="[object Map]",Qd="[object Object]",qa="[object Promise]",Da="[object Set]",Ma="[object WeakMap]",Pa="[object DataView]",ef=Bt(fi),tf=Bt(Xr),rf=Bt(pi),nf=Bt(gi),sf=Bt(ui),Ue=gr;(fi&&Ue(new fi(new ArrayBuffer(1)))!=Pa||Xr&&Ue(new Xr)!=Ia||pi&&Ue(pi.resolve())!=qa||gi&&Ue(new gi)!=Da||ui&&Ue(new ui)!=Ma)&&(Ue=function(r){var e=gr(r),t=e==Qd?r.constructor:void 0,n=t?Bt(t):"";if(n)switch(n){case ef:return Pa;case tf:return Ia;case rf:return qa;case nf:return Da;case sf:return Ma}return e});var af=Object.prototype,of=af.hasOwnProperty;function lf(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&of.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var zn=tt.Uint8Array;function qi(r){var e=new r.constructor(r.byteLength);return new zn(e).set(new zn(r)),e}function cf(r,e){var t=qi(r.buffer);return new r.constructor(t,r.byteOffset,r.byteLength)}var uf=/\w*$/;function hf(r){var e=new r.constructor(r.source,uf.exec(r));return e.lastIndex=r.lastIndex,e}var Ba=wt?wt.prototype:void 0,$a=Ba?Ba.valueOf:void 0;function df(r){return $a?Object($a.call(r)):{}}function yl(r,e){var t=e?qi(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var ff="[object Boolean]",pf="[object Date]",gf="[object Map]",mf="[object Number]",bf="[object RegExp]",vf="[object Set]",yf="[object String]",Ef="[object Symbol]",xf="[object ArrayBuffer]",wf="[object DataView]",Nf="[object Float32Array]",Tf="[object Float64Array]",Af="[object Int8Array]",Sf="[object Int16Array]",_f="[object Int32Array]",Cf="[object Uint8Array]",Of="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Lf="[object Uint32Array]";function kf(r,e,t){var n=r.constructor;switch(e){case xf:return qi(r);case ff:case pf:return new n(+r);case wf:return cf(r);case Nf:case Tf:case Af:case Sf:case _f:case Cf:case Of:case Rf:case Lf:return yl(r,t);case gf:return new n;case mf:case yf:return new n(r);case bf:return hf(r);case vf:return new n;case Ef:return df(r)}}function El(r){return typeof r.constructor=="function"&&!ki(r)?Zu(gl(r)):{}}var jf="[object Map]";function If(r){return ct(r)&&Ue(r)==jf}var Fa=fr&&fr.isMap,qf=Fa?ji(Fa):If,Df="[object Set]";function Mf(r){return ct(r)&&Ue(r)==Df}var Ua=fr&&fr.isSet,Pf=Ua?ji(Ua):Mf,Bf=1,xl="[object Arguments]",$f="[object Array]",Ff="[object Boolean]",Uf="[object Date]",Hf="[object Error]",wl="[object Function]",zf="[object GeneratorFunction]",Gf="[object Map]",Vf="[object Number]",Nl="[object Object]",Wf="[object RegExp]",Kf="[object Set]",Yf="[object String]",Xf="[object Symbol]",Zf="[object WeakMap]",Jf="[object ArrayBuffer]",Qf="[object DataView]",ep="[object Float32Array]",tp="[object Float64Array]",rp="[object Int8Array]",np="[object Int16Array]",sp="[object Int32Array]",ip="[object Uint8Array]",ap="[object Uint8ClampedArray]",op="[object Uint16Array]",lp="[object Uint32Array]",de={};de[xl]=de[$f]=de[Jf]=de[Qf]=de[Ff]=de[Uf]=de[ep]=de[tp]=de[rp]=de[np]=de[sp]=de[Gf]=de[Vf]=de[Nl]=de[Wf]=de[Kf]=de[Yf]=de[Xf]=de[ip]=de[ap]=de[op]=de[lp]=!0;de[Hf]=de[wl]=de[Zf]=!1;function $n(r,e,t,n,s,i){var a,l=e&Bf;if(a!==void 0)return a;if(!Nt(r))return r;var c=It(r);if(c)a=lf(r);else{var u=Ue(r),h=u==wl||u==zf;if(Kr(r))return vl(r,l);if(u==Nl||u==xl||h&&!s)a=h?{}:El(r);else{if(!de[u])return s?r:{};a=kf(r,u,l)}}i||(i=new Qe);var g=i.get(r);if(g)return g;i.set(r,a),Pf(r)?r.forEach(function(x){a.add($n(x,e,t,x,r,i))}):qf(r)&&r.forEach(function(x,y){a.set(y,$n(x,e,t,y,r,i))});var f=di,b=c?void 0:f(r);return oh(b||r,function(x,y){b&&(y=x,x=r[y]),ol(a,y,$n(x,e,t,y,r,i))}),a}var cp=1,up=4;function ur(r){return $n(r,cp|up)}var hp="__lodash_hash_undefined__";function dp(r){return this.__data__.set(r,hp),this}function fp(r){return this.__data__.has(r)}function Gn(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new Ft;++e<t;)this.add(r[e])}Gn.prototype.add=Gn.prototype.push=dp;Gn.prototype.has=fp;function pp(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}function gp(r,e){return r.has(e)}var mp=1,bp=2;function Tl(r,e,t,n,s,i){var a=t&mp,l=r.length,c=e.length;if(l!=c&&!(a&&c>l))return!1;var u=i.get(r),h=i.get(e);if(u&&h)return u==e&&h==r;var g=-1,f=!0,b=t&bp?new Gn:void 0;for(i.set(r,e),i.set(e,r);++g<l;){var x=r[g],y=e[g];if(n)var N=a?n(y,x,g,e,r,i):n(x,y,g,r,e,i);if(N!==void 0){if(N)continue;f=!1;break}if(b){if(!pp(e,function(S,_){if(!gp(b,_)&&(x===S||s(x,S,t,n,i)))return b.push(_)})){f=!1;break}}else if(!(x===y||s(x,y,t,n,i))){f=!1;break}}return i.delete(r),i.delete(e),f}function vp(r){var e=-1,t=Array(r.size);return r.forEach(function(n,s){t[++e]=[s,n]}),t}function yp(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var Ep=1,xp=2,wp="[object Boolean]",Np="[object Date]",Tp="[object Error]",Ap="[object Map]",Sp="[object Number]",_p="[object RegExp]",Cp="[object Set]",Op="[object String]",Rp="[object Symbol]",Lp="[object ArrayBuffer]",kp="[object DataView]",Ha=wt?wt.prototype:void 0,Zs=Ha?Ha.valueOf:void 0;function jp(r,e,t,n,s,i,a){switch(t){case kp:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case Lp:return!(r.byteLength!=e.byteLength||!i(new zn(r),new zn(e)));case wp:case Np:case Sp:return tn(+r,+e);case Tp:return r.name==e.name&&r.message==e.message;case _p:case Op:return r==e+"";case Ap:var l=vp;case Cp:var c=n&Ep;if(l||(l=yp),r.size!=e.size&&!c)return!1;var u=a.get(r);if(u)return u==e;n|=xp,a.set(r,e);var h=Tl(l(r),l(e),n,s,i,a);return a.delete(r),h;case Rp:if(Zs)return Zs.call(r)==Zs.call(e)}return!1}var Ip=1,qp=Object.prototype,Dp=qp.hasOwnProperty;function Mp(r,e,t,n,s,i){var a=t&Ip,l=di(r),c=l.length,u=di(e),h=u.length;if(c!=h&&!a)return!1;for(var g=c;g--;){var f=l[g];if(!(a?f in e:Dp.call(e,f)))return!1}var b=i.get(r),x=i.get(e);if(b&&x)return b==e&&x==r;var y=!0;i.set(r,e),i.set(e,r);for(var N=a;++g<c;){f=l[g];var S=r[f],_=e[f];if(n)var j=a?n(_,S,f,e,r,i):n(S,_,f,r,e,i);if(!(j===void 0?S===_||s(S,_,t,n,i):j)){y=!1;break}N||(N=f=="constructor")}if(y&&!N){var $=r.constructor,m=e.constructor;$!=m&&"constructor"in r&&"constructor"in e&&!(typeof $=="function"&&$ instanceof $&&typeof m=="function"&&m instanceof m)&&(y=!1)}return i.delete(r),i.delete(e),y}var Pp=1,za="[object Arguments]",Ga="[object Array]",Rn="[object Object]",Bp=Object.prototype,Va=Bp.hasOwnProperty;function $p(r,e,t,n,s,i){var a=It(r),l=It(e),c=a?Ga:Ue(r),u=l?Ga:Ue(e);c=c==za?Rn:c,u=u==za?Rn:u;var h=c==Rn,g=u==Rn,f=c==u;if(f&&Kr(r)){if(!Kr(e))return!1;a=!0,h=!1}if(f&&!h)return i||(i=new Qe),a||Ii(r)?Tl(r,e,t,n,s,i):jp(r,e,c,t,n,s,i);if(!(t&Pp)){var b=h&&Va.call(r,"__wrapped__"),x=g&&Va.call(e,"__wrapped__");if(b||x){var y=b?r.value():r,N=x?e.value():e;return i||(i=new Qe),s(y,N,t,n,i)}}return f?(i||(i=new Qe),Mp(r,e,t,n,s,i)):!1}function Al(r,e,t,n,s){return r===e?!0:r==null||e==null||!ct(r)&&!ct(e)?r!==r&&e!==e:$p(r,e,t,n,Al,s)}function Fp(r){return function(e,t,n){for(var s=-1,i=Object(e),a=n(e),l=a.length;l--;){var c=a[++s];if(t(i[c],c,i)===!1)break}return e}}var Up=Fp();function mi(r,e,t){(t!==void 0&&!tn(r[e],t)||t===void 0&&!(e in r))&&Li(r,e,t)}function Hp(r){return ct(r)&&Yn(r)}function bi(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}function zp(r){return dh(r,pl(r))}function Gp(r,e,t,n,s,i,a){var l=bi(r,t),c=bi(e,t),u=a.get(c);if(u){mi(r,t,u);return}var h=i?i(l,c,t+"",r,e,a):void 0,g=h===void 0;if(g){var f=It(c),b=!f&&Kr(c),x=!f&&!b&&Ii(c);h=c,f||b||x?It(l)?h=l:Hp(l)?h=Qu(l):b?(g=!1,h=vl(c,!0)):x?(g=!1,h=yl(c,!0)):h=[]:Bd(c)||hi(c)?(h=l,hi(l)?h=zp(l):(!Nt(l)||Ri(l))&&(h=El(c))):g=!1}g&&(a.set(c,h),s(h,c,n,i,a),a.delete(c)),mi(r,t,h)}function Sl(r,e,t,n,s){r!==e&&Up(e,function(i,a){if(s||(s=new Qe),Nt(i))Gp(r,e,a,t,Sl,n,s);else{var l=n?n(bi(r,a),i,a+"",r,e,s):void 0;l===void 0&&(l=i),mi(r,a,l)}},pl)}function mt(r,e){return Al(r,e)}var Et=bh(function(r,e,t){Sl(r,e,t)}),V=(r=>(r[r.TYPE=3]="TYPE",r[r.LEVEL=12]="LEVEL",r[r.ATTRIBUTE=13]="ATTRIBUTE",r[r.BLOT=14]="BLOT",r[r.INLINE=7]="INLINE",r[r.BLOCK=11]="BLOCK",r[r.BLOCK_BLOT=10]="BLOCK_BLOT",r[r.INLINE_BLOT=6]="INLINE_BLOT",r[r.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",r[r.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",r[r.ANY=15]="ANY",r))(V||{});class et{constructor(e,t,n={}){this.attrName=e,this.keyName=t;const s=V.TYPE&V.ATTRIBUTE;this.scope=n.scope!=null?n.scope&V.LEVEL|s:V.ATTRIBUTE,n.whitelist!=null&&(this.whitelist=n.whitelist)}static keys(e){return Array.from(e.attributes).map(t=>t.name)}add(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1}canAdd(e,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class hr extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const _l=class vi{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let n=null;try{n=e.parentNode}catch{return null}return this.find(n,t)}return null}create(e,t,n){const s=this.query(t);if(s==null)throw new hr(`Unable to create ${t} blot`);const i=s,a=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(n),l=new i(e,a,n);return vi.blots.set(l.domNode,l),l}find(e,t=!1){return vi.find(e,t)}query(e,t=V.ANY){let n;return typeof e=="string"?n=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?n=this.types.text:typeof e=="number"?e&V.LEVEL&V.BLOCK?n=this.types.block:e&V.LEVEL&V.INLINE&&(n=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(s=>(n=this.classes[s],!!n)),n=n||this.tags[e.tagName]),n==null?null:"scope"in n&&t&V.LEVEL&n.scope&&t&V.TYPE&n.scope?n:null}register(...e){return e.map(t=>{const n="blotName"in t,s="attrName"in t;if(!n&&!s)throw new hr("Invalid definition");if(n&&t.blotName==="abstract")throw new hr("Cannot register abstract class");const i=n?t.blotName:s?t.attrName:void 0;return this.types[i]=t,s?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):n&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(a=>a.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(a=>{(this.tags[a]==null||t.className==null)&&(this.tags[a]=t)}))),t})}};_l.blots=new WeakMap;let pr=_l;function Wa(r,e){return(r.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${e}-`)===0)}class Vp extends et{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0):!1}remove(e){Wa(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const t=(Wa(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}}const We=Vp;function Js(r){const e=r.split("-"),t=e.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("");return e[0]+t}class Wp extends et{static keys(e){return(e.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[Js(this.keyName)]=t,!0):!1}remove(e){e.style[Js(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[Js(this.keyName)];return this.canAdd(e,t)?t:""}}const Tt=Wp;class Kp{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=pr.find(this.domNode);if(e==null)return;const t=et.keys(this.domNode),n=We.keys(this.domNode),s=Tt.keys(this.domNode);t.concat(n).concat(s).forEach(i=>{const a=e.scroll.query(i,V.ATTRIBUTE);a instanceof et&&(this.attributes[a.attrName]=a)})}copy(e){Object.keys(this.attributes).forEach(t=>{const n=this.attributes[t].value(this.domNode);e.format(t,n)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}}const Jn=Kp,Cl=class{constructor(e,t){this.scroll=e,this.domNode=t,pr.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new hr("Blot definition missing tagName");let t,n;return Array.isArray(this.tagName)?(typeof e=="string"?(n=e.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):typeof e=="number"&&(n=e),typeof n=="number"?t=document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?t=document.createElement(n):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),pr.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,n,s){const i=this.isolate(e,t);if(this.scroll.query(n,V.BLOT)!=null&&s)i.wrap(n,s);else if(this.scroll.query(n,V.ATTRIBUTE)!=null){const a=this.scroll.create(this.statics.scope);i.wrap(a),a.format(n,s)}}insertAt(e,t,n){const s=n==null?this.scroll.create("text",t):this.scroll.create(t,n),i=this.split(e);this.parent.insertBefore(s,i||void 0)}isolate(e,t){const n=this.split(e);if(n==null)throw new Error("Attempt to isolate at end");return n.split(t),n}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(n,this.next||void 0),typeof n.appendChild!="function")throw new hr(`Cannot wrap ${e}`);return n.appendChild(this),n}};Cl.blotName="abstract";let Ol=Cl;const Rl=class extends Ol{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Rl.scope=V.INLINE_BLOT;let Yp=Rl;const Ae=Yp;class Xp{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let n=t();for(;n&&e>0;)e-=1,n=t();return n}contains(e){const t=this.iterator();let n=t();for(;n;){if(n===e)return!0;n=t()}return!1}indexOf(e){const t=this.iterator();let n=t(),s=0;for(;n;){if(n===e)return s;s+=1,n=t()}return-1}insertBefore(e,t){e!=null&&(this.remove(e),e.next=t,t!=null?(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,n=this.head;for(;n!=null;){if(n===e)return t;t+=n.length(),n=n.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return e!=null&&(e=e.next),t}}find(e,t=!1){const n=this.iterator();let s=n();for(;s;){const i=s.length();if(e<i||t&&e===i&&(s.next==null||s.next.length()!==0))return[s,e];e-=i,s=n()}return[null,0]}forEach(e){const t=this.iterator();let n=t();for(;n;)e(n),n=t()}forEachAt(e,t,n){if(t<=0)return;const[s,i]=this.find(e);let a=e-i;const l=this.iterator(s);let c=l();for(;c&&a<e+t;){const u=c.length();e>a?n(c,e-a,Math.min(t,a+u-e)):n(c,0,Math.min(u,e+t-a)),a+=u,c=l()}}map(e){return this.reduce((t,n)=>(t.push(e(n)),t),[])}reduce(e,t){const n=this.iterator();let s=n();for(;s;)t=e(t,s),s=n();return t}}function Ka(r,e){const t=e.find(r);if(t)return t;try{return e.create(r)}catch{const n=e.create(V.INLINE);return Array.from(r.childNodes).forEach(s=>{n.domNode.appendChild(s)}),r.parentNode&&r.parentNode.replaceChild(n.domNode,r),n.attach(),n}}const Ll=class gt extends Ol{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,gt.uiClass&&this.uiNode.classList.add(gt.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Xp,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=Ka(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof hr)return;throw t}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(n,s,i)=>{n.deleteAt(s,i)})}descendant(e,t=0){const[n,s]=this.children.find(t);return e.blotName==null&&e(n)||e.blotName!=null&&n instanceof e?[n,s]:n instanceof gt?n.descendant(e,s):[null,-1]}descendants(e,t=0,n=Number.MAX_VALUE){let s=[],i=n;return this.children.forEachAt(t,n,(a,l,c)=>{(e.blotName==null&&e(a)||e.blotName!=null&&a instanceof e)&&s.push(a),a instanceof gt&&(s=s.concat(a.descendants(e,l,i))),i-=c}),s}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(t=>{e||this.statics.allowedChildren.some(n=>t instanceof n)||(t.statics.scope===V.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),e=!0):t instanceof gt?t.unwrap():t.remove())})}formatAt(e,t,n,s){this.children.forEachAt(e,t,(i,a,l)=>{i.formatAt(a,l,n,s)})}insertAt(e,t,n){const[s,i]=this.children.find(e);if(s)s.insertAt(i,t,n);else{const a=n==null?this.scroll.create("text",t):this.scroll.create(t,n);this.appendChild(a)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let n=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(n=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(e.domNode,n),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(n=>{e.insertBefore(n,t)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,t=!1){const[n,s]=this.children.find(e,t),i=[[this,e]];return n instanceof gt?i.concat(n.path(s,t)):(n!=null&&i.push([n,s]),i)}removeChild(e){this.children.remove(e)}replaceWith(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;return n instanceof gt&&this.moveChildren(n),super.replaceWith(n)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(e,this.length(),(s,i,a)=>{const l=s.split(i,t);l!=null&&n.appendChild(l)}),n}splitAfter(e){const t=this.clone();for(;e.next!=null;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const n=[],s=[];e.forEach(i=>{i.target===this.domNode&&i.type==="childList"&&(n.push(...i.addedNodes),s.push(...i.removedNodes))}),s.forEach(i=>{if(i.parentNode!=null&&i.tagName!=="IFRAME"&&document.body.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const a=this.scroll.find(i);a!=null&&(a.domNode.parentNode==null||a.domNode.parentNode===this.domNode)&&a.detach()}),n.filter(i=>i.parentNode===this.domNode&&i!==this.uiNode).sort((i,a)=>i===a?0:i.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(i=>{let a=null;i.nextSibling!=null&&(a=this.scroll.find(i.nextSibling));const l=Ka(i,this.scroll);(l.next!==a||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,a||void 0))}),this.enforceAllowedChildren()}};Ll.uiClass="";let Zp=Ll;const Ge=Zp;function Jp(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(r[t]!==e[t])return!1;return!0}const ir=class ar extends Ge{static create(e){return super.create(e)}static formats(e,t){const n=t.query(ar.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Jn(this.domNode)}format(e,t){if(e===this.statics.blotName&&!t)this.children.forEach(n=>{n instanceof ar||(n=n.wrap(ar.blotName,!0)),this.attributes.copy(n)}),this.unwrap();else{const n=this.scroll.query(e,V.INLINE);if(n==null)return;n instanceof et?this.attributes.attribute(n,t):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)}}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,s){this.formats()[n]!=null||this.scroll.query(n,V.ATTRIBUTE)?this.isolate(e,t).format(n,s):super.formatAt(e,t,n,s)}optimize(e){super.optimize(e);const t=this.formats();if(Object.keys(t).length===0)return this.unwrap();const n=this.next;n instanceof ar&&n.prev===this&&Jp(t,n.formats())&&(n.moveChildren(this),n.remove())}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}wrap(e,t){const n=super.wrap(e,t);return n instanceof ar&&this.attributes.move(n),n}};ir.allowedChildren=[ir,Ae],ir.blotName="inline",ir.scope=V.INLINE_BLOT,ir.tagName="SPAN";let Qp=ir;const Di=Qp,or=class yi extends Ge{static create(e){return super.create(e)}static formats(e,t){const n=t.query(yi.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Jn(this.domNode)}format(e,t){const n=this.scroll.query(e,V.BLOCK);n!=null&&(n instanceof et?this.attributes.attribute(n,t):e===this.statics.blotName&&!t?this.replaceWith(yi.blotName):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,s){this.scroll.query(n,V.BLOCK)!=null?this.format(n,s):super.formatAt(e,t,n,s)}insertAt(e,t,n){if(n==null||this.scroll.query(t,V.INLINE)!=null)super.insertAt(e,t,n);else{const s=this.split(e);if(s!=null){const i=this.scroll.create(t,n);s.parent.insertBefore(i,s)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}};or.blotName="block",or.scope=V.BLOCK_BLOT,or.tagName="P",or.allowedChildren=[Di,or,Ae];let eg=or;const Zr=eg,Ei=class extends Ge{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,n,s){super.formatAt(e,t,n,s),this.enforceAllowedChildren()}insertAt(e,t,n){super.insertAt(e,t,n),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Ei.blotName="container",Ei.scope=V.BLOCK_BLOT;let tg=Ei;const Qn=tg;class rg extends Ae{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,n,s){e===0&&t===this.length()?this.format(n,s):super.formatAt(e,t,n,s)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const ke=rg,ng={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},sg=100,lr=class extends Ge{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(n=>{this.update(n)}),this.observer.observe(this.domNode,ng),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const n=this.registry.find(e,t);return n?n.scroll===this?n:t?this.find(n.scroll.domNode.parentNode,!0):null:null}query(e,t=V.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(n=>{n.remove()}):super.deleteAt(e,t)}formatAt(e,t,n,s){this.update(),super.formatAt(e,t,n,s)}insertAt(e,t,n){this.update(),super.insertAt(e,t,n)}optimize(e=[],t={}){super.optimize(t);const n=t.mutationsMap||new WeakMap;let s=Array.from(this.observer.takeRecords());for(;s.length>0;)e.push(s.pop());const i=(c,u=!0)=>{c==null||c===this||c.domNode.parentNode!=null&&(n.has(c.domNode)||n.set(c.domNode,[]),u&&i(c.parent))},a=c=>{n.has(c.domNode)&&(c instanceof Ge&&c.children.forEach(a),n.delete(c.domNode),c.optimize(t))};let l=e;for(let c=0;l.length>0;c+=1){if(c>=sg)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(u=>{const h=this.find(u.target,!0);h!=null&&(h.domNode===u.target&&(u.type==="childList"?(i(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(g=>{const f=this.find(g,!1);i(f,!1),f instanceof Ge&&f.children.forEach(b=>{i(b,!1)})})):u.type==="attributes"&&i(h.prev)),i(h))}),this.children.forEach(a),l=Array.from(this.observer.takeRecords()),s=l.slice();s.length>0;)e.push(s.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const n=new WeakMap;e.map(s=>{const i=this.find(s.target,!0);return i==null?null:n.has(i.domNode)?(n.get(i.domNode).push(s),null):(n.set(i.domNode,[s]),i)}).forEach(s=>{s!=null&&s!==this&&n.has(s.domNode)&&s.update(n.get(s.domNode)||[],t)}),t.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),t),this.optimize(e,t)}};lr.blotName="scroll",lr.defaultChild=Zr,lr.allowedChildren=[Zr,Qn],lr.scope=V.BLOCK_BLOT,lr.tagName="DIV";let ig=lr;const Mi=ig,xi=class kl extends Ae{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,n){n==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,n)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof kl&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(e,t){e.some(n=>n.type==="characterData"&&n.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};xi.blotName="text",xi.scope=V.INLINE_BLOT;let ag=xi;const Vn=ag,og=Object.freeze(Object.defineProperty({__proto__:null,Attributor:et,AttributorStore:Jn,BlockBlot:Zr,ClassAttributor:We,ContainerBlot:Qn,EmbedBlot:ke,InlineBlot:Di,LeafBlot:Ae,ParentBlot:Ge,Registry:pr,Scope:V,ScrollBlot:Mi,StyleAttributor:Tt,TextBlot:Vn},Symbol.toStringTag,{value:"Module"}));var Ln={exports:{}},Qs,Ya;function lg(){if(Ya)return Qs;Ya=1;var r=-1,e=1,t=0;function n(v,q,w,O,D){if(v===q)return v?[[t,v]]:[];if(w!=null){var I=Z(v,q,w);if(I)return I}var M=l(v,q),U=v.substring(0,M);v=v.substring(M),q=q.substring(M),M=u(v,q);var W=v.substring(v.length-M);v=v.substring(0,v.length-M),q=q.substring(0,q.length-M);var A=s(v,q);return U&&A.unshift([t,U]),W&&A.push([t,W]),_(A,D),O&&g(A),A}function s(v,q){var w;if(!v)return[[e,q]];if(!q)return[[r,v]];var O=v.length>q.length?v:q,D=v.length>q.length?q:v,I=O.indexOf(D);if(I!==-1)return w=[[e,O.substring(0,I)],[t,D],[e,O.substring(I+D.length)]],v.length>q.length&&(w[0][0]=w[2][0]=r),w;if(D.length===1)return[[r,v],[e,q]];var M=h(v,q);if(M){var U=M[0],W=M[1],A=M[2],B=M[3],F=M[4],X=n(U,A),J=n(W,B);return X.concat([[t,F]],J)}return i(v,q)}function i(v,q){for(var w=v.length,O=q.length,D=Math.ceil((w+O)/2),I=D,M=2*D,U=new Array(M),W=new Array(M),A=0;A<M;A++)U[A]=-1,W[A]=-1;U[I+1]=0,W[I+1]=0;for(var B=w-O,F=B%2!==0,X=0,J=0,H=0,le=0,ue=0;ue<D;ue++){for(var K=-ue+X;K<=ue-J;K+=2){var re=I+K,ne;K===-ue||K!==ue&&U[re-1]<U[re+1]?ne=U[re+1]:ne=U[re-1]+1;for(var ie=ne-K;ne<w&&ie<O&&v.charAt(ne)===q.charAt(ie);)ne++,ie++;if(U[re]=ne,ne>w)J+=2;else if(ie>O)X+=2;else if(F){var ce=I+B-K;if(ce>=0&&ce<M&&W[ce]!==-1){var he=w-W[ce];if(ne>=he)return a(v,q,ne,ie)}}}for(var pe=-ue+H;pe<=ue-le;pe+=2){var ce=I+pe,he;pe===-ue||pe!==ue&&W[ce-1]<W[ce+1]?he=W[ce+1]:he=W[ce-1]+1;for(var xe=he-pe;he<w&&xe<O&&v.charAt(w-he-1)===q.charAt(O-xe-1);)he++,xe++;if(W[ce]=he,he>w)le+=2;else if(xe>O)H+=2;else if(!F){var re=I+B-pe;if(re>=0&&re<M&&U[re]!==-1){var ne=U[re],ie=I+ne-re;if(he=w-he,ne>=he)return a(v,q,ne,ie)}}}}return[[r,v],[e,q]]}function a(v,q,w,O){var D=v.substring(0,w),I=q.substring(0,O),M=v.substring(w),U=q.substring(O),W=n(D,I),A=n(M,U);return W.concat(A)}function l(v,q){if(!v||!q||v.charAt(0)!==q.charAt(0))return 0;for(var w=0,O=Math.min(v.length,q.length),D=O,I=0;w<D;)v.substring(I,D)==q.substring(I,D)?(w=D,I=w):O=D,D=Math.floor((O-w)/2+w);return j(v.charCodeAt(D-1))&&D--,D}function c(v,q){var w=v.length,O=q.length;if(w==0||O==0)return 0;w>O?v=v.substring(w-O):w<O&&(q=q.substring(0,w));var D=Math.min(w,O);if(v==q)return D;for(var I=0,M=1;;){var U=v.substring(D-M),W=q.indexOf(U);if(W==-1)return I;M+=W,(W==0||v.substring(D-M)==q.substring(0,M))&&(I=M,M++)}}function u(v,q){if(!v||!q||v.slice(-1)!==q.slice(-1))return 0;for(var w=0,O=Math.min(v.length,q.length),D=O,I=0;w<D;)v.substring(v.length-D,v.length-I)==q.substring(q.length-D,q.length-I)?(w=D,I=w):O=D,D=Math.floor((O-w)/2+w);return $(v.charCodeAt(v.length-D))&&D--,D}function h(v,q){var w=v.length>q.length?v:q,O=v.length>q.length?q:v;if(w.length<4||O.length*2<w.length)return null;function D(J,H,le){for(var ue=J.substring(le,le+Math.floor(J.length/4)),K=-1,re="",ne,ie,ce,he;(K=H.indexOf(ue,K+1))!==-1;){var pe=l(J.substring(le),H.substring(K)),xe=u(J.substring(0,le),H.substring(0,K));re.length<xe+pe&&(re=H.substring(K-xe,K)+H.substring(K,K+pe),ne=J.substring(0,le-xe),ie=J.substring(le+pe),ce=H.substring(0,K-xe),he=H.substring(K+pe))}return re.length*2>=J.length?[ne,ie,ce,he,re]:null}var I=D(w,O,Math.ceil(w.length/4)),M=D(w,O,Math.ceil(w.length/2)),U;if(!I&&!M)return null;M?I?U=I[4].length>M[4].length?I:M:U=M:U=I;var W,A,B,F;v.length>q.length?(W=U[0],A=U[1],B=U[2],F=U[3]):(B=U[0],F=U[1],W=U[2],A=U[3]);var X=U[4];return[W,A,B,F,X]}function g(v){for(var q=!1,w=[],O=0,D=null,I=0,M=0,U=0,W=0,A=0;I<v.length;)v[I][0]==t?(w[O++]=I,M=W,U=A,W=0,A=0,D=v[I][1]):(v[I][0]==e?W+=v[I][1].length:A+=v[I][1].length,D&&D.length<=Math.max(M,U)&&D.length<=Math.max(W,A)&&(v.splice(w[O-1],0,[r,D]),v[w[O-1]+1][0]=e,O--,O--,I=O>0?w[O-1]:-1,M=0,U=0,W=0,A=0,D=null,q=!0)),I++;for(q&&_(v),S(v),I=1;I<v.length;){if(v[I-1][0]==r&&v[I][0]==e){var B=v[I-1][1],F=v[I][1],X=c(B,F),J=c(F,B);X>=J?(X>=B.length/2||X>=F.length/2)&&(v.splice(I,0,[t,F.substring(0,X)]),v[I-1][1]=B.substring(0,B.length-X),v[I+1][1]=F.substring(X),I++):(J>=B.length/2||J>=F.length/2)&&(v.splice(I,0,[t,B.substring(0,J)]),v[I-1][0]=e,v[I-1][1]=F.substring(0,F.length-J),v[I+1][0]=r,v[I+1][1]=B.substring(J),I++),I++}I++}}var f=/[^a-zA-Z0-9]/,b=/\s/,x=/[\r\n]/,y=/\n\r?\n$/,N=/^\r?\n\r?\n/;function S(v){function q(J,H){if(!J||!H)return 6;var le=J.charAt(J.length-1),ue=H.charAt(0),K=le.match(f),re=ue.match(f),ne=K&&le.match(b),ie=re&&ue.match(b),ce=ne&&le.match(x),he=ie&&ue.match(x),pe=ce&&J.match(y),xe=he&&H.match(N);return pe||xe?5:ce||he?4:K&&!ne&&ie?3:ne||ie?2:K||re?1:0}for(var w=1;w<v.length-1;){if(v[w-1][0]==t&&v[w+1][0]==t){var O=v[w-1][1],D=v[w][1],I=v[w+1][1],M=u(O,D);if(M){var U=D.substring(D.length-M);O=O.substring(0,O.length-M),D=U+D.substring(0,D.length-M),I=U+I}for(var W=O,A=D,B=I,F=q(O,D)+q(D,I);D.charAt(0)===I.charAt(0);){O+=D.charAt(0),D=D.substring(1)+I.charAt(0),I=I.substring(1);var X=q(O,D)+q(D,I);X>=F&&(F=X,W=O,A=D,B=I)}v[w-1][1]!=W&&(W?v[w-1][1]=W:(v.splice(w-1,1),w--),v[w][1]=A,B?v[w+1][1]=B:(v.splice(w+1,1),w--))}w++}}function _(v,q){v.push([t,""]);for(var w=0,O=0,D=0,I="",M="",U;w<v.length;){if(w<v.length-1&&!v[w][1]){v.splice(w,1);continue}switch(v[w][0]){case e:D++,M+=v[w][1],w++;break;case r:O++,I+=v[w][1],w++;break;case t:var W=w-D-O-1;if(q){if(W>=0&&T(v[W][1])){var A=v[W][1].slice(-1);if(v[W][1]=v[W][1].slice(0,-1),I=A+I,M=A+M,!v[W][1]){v.splice(W,1),w--;var B=W-1;v[B]&&v[B][0]===e&&(D++,M=v[B][1]+M,B--),v[B]&&v[B][0]===r&&(O++,I=v[B][1]+I,B--),W=B}}if(m(v[w][1])){var A=v[w][1].charAt(0);v[w][1]=v[w][1].slice(1),I+=A,M+=A}}if(w<v.length-1&&!v[w][1]){v.splice(w,1);break}if(I.length>0||M.length>0){I.length>0&&M.length>0&&(U=l(M,I),U!==0&&(W>=0?v[W][1]+=M.substring(0,U):(v.splice(0,0,[t,M.substring(0,U)]),w++),M=M.substring(U),I=I.substring(U)),U=u(M,I),U!==0&&(v[w][1]=M.substring(M.length-U)+v[w][1],M=M.substring(0,M.length-U),I=I.substring(0,I.length-U)));var F=D+O;I.length===0&&M.length===0?(v.splice(w-F,F),w=w-F):I.length===0?(v.splice(w-F,F,[e,M]),w=w-F+1):M.length===0?(v.splice(w-F,F,[r,I]),w=w-F+1):(v.splice(w-F,F,[r,I],[e,M]),w=w-F+2)}w!==0&&v[w-1][0]===t?(v[w-1][1]+=v[w][1],v.splice(w,1)):w++,D=0,O=0,I="",M="";break}}v[v.length-1][1]===""&&v.pop();var X=!1;for(w=1;w<v.length-1;)v[w-1][0]===t&&v[w+1][0]===t&&(v[w][1].substring(v[w][1].length-v[w-1][1].length)===v[w-1][1]?(v[w][1]=v[w-1][1]+v[w][1].substring(0,v[w][1].length-v[w-1][1].length),v[w+1][1]=v[w-1][1]+v[w+1][1],v.splice(w-1,1),X=!0):v[w][1].substring(0,v[w+1][1].length)==v[w+1][1]&&(v[w-1][1]+=v[w+1][1],v[w][1]=v[w][1].substring(v[w+1][1].length)+v[w+1][1],v.splice(w+1,1),X=!0)),w++;X&&_(v,q)}function j(v){return v>=55296&&v<=56319}function $(v){return v>=56320&&v<=57343}function m(v){return $(v.charCodeAt(0))}function T(v){return j(v.charCodeAt(v.length-1))}function k(v){for(var q=[],w=0;w<v.length;w++)v[w][1].length>0&&q.push(v[w]);return q}function P(v,q,w,O){return T(v)||m(O)?null:k([[t,v],[r,q],[e,w],[t,O]])}function Z(v,q,w){var O=typeof w=="number"?{index:w,length:0}:w.oldRange,D=typeof w=="number"?null:w.newRange,I=v.length,M=q.length;if(O.length===0&&(D===null||D.length===0)){var U=O.index,W=v.slice(0,U),A=v.slice(U),B=D?D.index:null;e:{var F=U+M-I;if(B!==null&&B!==F||F<0||F>M)break e;var X=q.slice(0,F),J=q.slice(F);if(J!==A)break e;var H=Math.min(U,F),le=W.slice(0,H),ue=X.slice(0,H);if(le!==ue)break e;var K=W.slice(H),re=X.slice(H);return P(le,K,re,A)}e:{if(B!==null&&B!==U)break e;var ne=U,X=q.slice(0,ne),J=q.slice(ne);if(X!==W)break e;var ie=Math.min(I-ne,M-ne),ce=A.slice(A.length-ie),he=J.slice(J.length-ie);if(ce!==he)break e;var K=A.slice(0,A.length-ie),re=J.slice(0,J.length-ie);return P(W,K,re,ce)}}if(O.length>0&&D&&D.length===0)e:{var le=v.slice(0,O.index),ce=v.slice(O.index+O.length),H=le.length,ie=ce.length;if(M<H+ie)break e;var ue=q.slice(0,H),he=q.slice(M-ie);if(le!==ue||ce!==he)break e;var K=v.slice(H,I-ie),re=q.slice(H,M-ie);return P(le,K,re,ce)}return null}function te(v,q,w,O){return n(v,q,w,O,!0)}return te.INSERT=e,te.DELETE=r,te.EQUAL=t,Qs=te,Qs}var Ur={exports:{}};Ur.exports;var Xa;function jl(){return Xa||(Xa=1,function(r,e){var t=200,n="__lodash_hash_undefined__",s=9007199254740991,i="[object Arguments]",a="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",h="[object Function]",g="[object GeneratorFunction]",f="[object Map]",b="[object Number]",x="[object Object]",y="[object Promise]",N="[object RegExp]",S="[object Set]",_="[object String]",j="[object Symbol]",$="[object WeakMap]",m="[object ArrayBuffer]",T="[object DataView]",k="[object Float32Array]",P="[object Float64Array]",Z="[object Int8Array]",te="[object Int16Array]",v="[object Int32Array]",q="[object Uint8Array]",w="[object Uint8ClampedArray]",O="[object Uint16Array]",D="[object Uint32Array]",I=/[\\^$.*+?()[\]{}|]/g,M=/\w*$/,U=/^\[object .+?Constructor\]$/,W=/^(?:0|[1-9]\d*)$/,A={};A[i]=A[a]=A[m]=A[T]=A[l]=A[c]=A[k]=A[P]=A[Z]=A[te]=A[v]=A[f]=A[b]=A[x]=A[N]=A[S]=A[_]=A[j]=A[q]=A[w]=A[O]=A[D]=!0,A[u]=A[h]=A[$]=!1;var B=typeof bt=="object"&&bt&&bt.Object===Object&&bt,F=typeof self=="object"&&self&&self.Object===Object&&self,X=B||F||Function("return this")(),J=e&&!e.nodeType&&e,H=J&&!0&&r&&!r.nodeType&&r,le=H&&H.exports===J;function ue(o,d){return o.set(d[0],d[1]),o}function K(o,d){return o.add(d),o}function re(o,d){for(var E=-1,C=o?o.length:0;++E<C&&d(o[E],E,o)!==!1;);return o}function ne(o,d){for(var E=-1,C=d.length,Q=o.length;++E<C;)o[Q+E]=d[E];return o}function ie(o,d,E,C){for(var Q=-1,Y=o?o.length:0;++Q<Y;)E=d(E,o[Q],Q,o);return E}function ce(o,d){for(var E=-1,C=Array(o);++E<o;)C[E]=d(E);return C}function he(o,d){return o?.[d]}function pe(o){var d=!1;if(o!=null&&typeof o.toString!="function")try{d=!!(o+"")}catch{}return d}function xe(o){var d=-1,E=Array(o.size);return o.forEach(function(C,Q){E[++d]=[Q,C]}),E}function br(o,d){return function(E){return o(d(E))}}function on(o){var d=-1,E=Array(o.size);return o.forEach(function(C){E[++d]=C}),E}var ss=Array.prototype,is=Function.prototype,Gt=Object.prototype,vr=X["__core-js_shared__"],ln=function(){var o=/[^.]+$/.exec(vr&&vr.keys&&vr.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),cn=is.toString,Ye=Gt.hasOwnProperty,Vt=Gt.toString,as=RegExp("^"+cn.call(Ye).replace(I,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),At=le?X.Buffer:void 0,Wt=X.Symbol,yr=X.Uint8Array,je=br(Object.getPrototypeOf,Object),un=Object.create,hn=Gt.propertyIsEnumerable,os=ss.splice,Er=Object.getOwnPropertySymbols,Kt=At?At.isBuffer:void 0,dn=br(Object.keys,Object),Yt=$e(X,"DataView"),St=$e(X,"Map"),Be=$e(X,"Promise"),Xt=$e(X,"Set"),xr=$e(X,"WeakMap"),_t=$e(Object,"create"),wr=Se(Yt),Ct=Se(St),Nr=Se(Be),Tr=Se(Xt),Ar=Se(xr),ft=Wt?Wt.prototype:void 0,fn=ft?ft.valueOf:void 0;function nt(o){var d=-1,E=o?o.length:0;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function ls(){this.__data__=_t?_t(null):{}}function cs(o){return this.has(o)&&delete this.__data__[o]}function us(o){var d=this.__data__;if(_t){var E=d[o];return E===n?void 0:E}return Ye.call(d,o)?d[o]:void 0}function pn(o){var d=this.__data__;return _t?d[o]!==void 0:Ye.call(d,o)}function Sr(o,d){var E=this.__data__;return E[o]=_t&&d===void 0?n:d,this}nt.prototype.clear=ls,nt.prototype.delete=cs,nt.prototype.get=us,nt.prototype.has=pn,nt.prototype.set=Sr;function be(o){var d=-1,E=o?o.length:0;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function hs(){this.__data__=[]}function ds(o){var d=this.__data__,E=Jt(d,o);if(E<0)return!1;var C=d.length-1;return E==C?d.pop():os.call(d,E,1),!0}function fs(o){var d=this.__data__,E=Jt(d,o);return E<0?void 0:d[E][1]}function ps(o){return Jt(this.__data__,o)>-1}function gs(o,d){var E=this.__data__,C=Jt(E,o);return C<0?E.push([o,d]):E[C][1]=d,this}be.prototype.clear=hs,be.prototype.delete=ds,be.prototype.get=fs,be.prototype.has=ps,be.prototype.set=gs;function we(o){var d=-1,E=o?o.length:0;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function ms(){this.__data__={hash:new nt,map:new(St||be),string:new nt}}function bs(o){return Rt(this,o).delete(o)}function vs(o){return Rt(this,o).get(o)}function ys(o){return Rt(this,o).has(o)}function Es(o,d){return Rt(this,o).set(o,d),this}we.prototype.clear=ms,we.prototype.delete=bs,we.prototype.get=vs,we.prototype.has=ys,we.prototype.set=Es;function Re(o){this.__data__=new be(o)}function xs(){this.__data__=new be}function ws(o){return this.__data__.delete(o)}function Ns(o){return this.__data__.get(o)}function Ts(o){return this.__data__.has(o)}function As(o,d){var E=this.__data__;if(E instanceof be){var C=E.__data__;if(!St||C.length<t-1)return C.push([o,d]),this;E=this.__data__=new we(C)}return E.set(o,d),this}Re.prototype.clear=xs,Re.prototype.delete=ws,Re.prototype.get=Ns,Re.prototype.has=Ts,Re.prototype.set=As;function Zt(o,d){var E=Rr(o)||er(o)?ce(o.length,String):[],C=E.length,Q=!!C;for(var Y in o)Ye.call(o,Y)&&!(Q&&(Y=="length"||Bs(Y,C)))&&E.push(Y);return E}function gn(o,d,E){var C=o[d];(!(Ye.call(o,d)&&En(C,E))||E===void 0&&!(d in o))&&(o[d]=E)}function Jt(o,d){for(var E=o.length;E--;)if(En(o[E][0],d))return E;return-1}function Xe(o,d){return o&&Or(d,kr(d),o)}function _r(o,d,E,C,Q,Y,ae){var se;if(C&&(se=Y?C(o,Q,Y,ae):C(o)),se!==void 0)return se;if(!Je(o))return o;var ge=Rr(o);if(ge){if(se=Ms(o),!d)return Is(o,se)}else{var oe=it(o),Ne=oe==h||oe==g;if(xn(o))return Qt(o,d);if(oe==x||oe==i||Ne&&!Y){if(pe(o))return Y?o:{};if(se=Ze(Ne?{}:o),!d)return qs(o,Xe(se,o))}else{if(!A[oe])return Y?o:{};se=Ps(o,oe,_r,d)}}ae||(ae=new Re);var Le=ae.get(o);if(Le)return Le;if(ae.set(o,se),!ge)var me=E?Ds(o):kr(o);return re(me||o,function(Te,ve){me&&(ve=Te,Te=o[ve]),gn(se,ve,_r(Te,d,E,C,ve,o,ae))}),se}function Ss(o){return Je(o)?un(o):{}}function _s(o,d,E){var C=d(o);return Rr(o)?C:ne(C,E(o))}function Cs(o){return Vt.call(o)}function Os(o){if(!Je(o)||Fs(o))return!1;var d=Lr(o)||pe(o)?as:U;return d.test(Se(o))}function Rs(o){if(!vn(o))return dn(o);var d=[];for(var E in Object(o))Ye.call(o,E)&&E!="constructor"&&d.push(E);return d}function Qt(o,d){if(d)return o.slice();var E=new o.constructor(o.length);return o.copy(E),E}function Cr(o){var d=new o.constructor(o.byteLength);return new yr(d).set(new yr(o)),d}function Ot(o,d){var E=d?Cr(o.buffer):o.buffer;return new o.constructor(E,o.byteOffset,o.byteLength)}function mn(o,d,E){var C=d?E(xe(o),!0):xe(o);return ie(C,ue,new o.constructor)}function bn(o){var d=new o.constructor(o.source,M.exec(o));return d.lastIndex=o.lastIndex,d}function Ls(o,d,E){var C=d?E(on(o),!0):on(o);return ie(C,K,new o.constructor)}function ks(o){return fn?Object(fn.call(o)):{}}function js(o,d){var E=d?Cr(o.buffer):o.buffer;return new o.constructor(E,o.byteOffset,o.length)}function Is(o,d){var E=-1,C=o.length;for(d||(d=Array(C));++E<C;)d[E]=o[E];return d}function Or(o,d,E,C){E||(E={});for(var Q=-1,Y=d.length;++Q<Y;){var ae=d[Q],se=void 0;gn(E,ae,se===void 0?o[ae]:se)}return E}function qs(o,d){return Or(o,st(o),d)}function Ds(o){return _s(o,kr,st)}function Rt(o,d){var E=o.__data__;return $s(d)?E[typeof d=="string"?"string":"hash"]:E.map}function $e(o,d){var E=he(o,d);return Os(E)?E:void 0}var st=Er?br(Er,Object):Hs,it=Cs;(Yt&&it(new Yt(new ArrayBuffer(1)))!=T||St&&it(new St)!=f||Be&&it(Be.resolve())!=y||Xt&&it(new Xt)!=S||xr&&it(new xr)!=$)&&(it=function(o){var d=Vt.call(o),E=d==x?o.constructor:void 0,C=E?Se(E):void 0;if(C)switch(C){case wr:return T;case Ct:return f;case Nr:return y;case Tr:return S;case Ar:return $}return d});function Ms(o){var d=o.length,E=o.constructor(d);return d&&typeof o[0]=="string"&&Ye.call(o,"index")&&(E.index=o.index,E.input=o.input),E}function Ze(o){return typeof o.constructor=="function"&&!vn(o)?Ss(je(o)):{}}function Ps(o,d,E,C){var Q=o.constructor;switch(d){case m:return Cr(o);case l:case c:return new Q(+o);case T:return Ot(o,C);case k:case P:case Z:case te:case v:case q:case w:case O:case D:return js(o,C);case f:return mn(o,C,E);case b:case _:return new Q(o);case N:return bn(o);case S:return Ls(o,C,E);case j:return ks(o)}}function Bs(o,d){return d=d??s,!!d&&(typeof o=="number"||W.test(o))&&o>-1&&o%1==0&&o<d}function $s(o){var d=typeof o;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?o!=="__proto__":o===null}function Fs(o){return!!ln&&ln in o}function vn(o){var d=o&&o.constructor,E=typeof d=="function"&&d.prototype||Gt;return o===E}function Se(o){if(o!=null){try{return cn.call(o)}catch{}try{return o+""}catch{}}return""}function yn(o){return _r(o,!0,!0)}function En(o,d){return o===d||o!==o&&d!==d}function er(o){return Us(o)&&Ye.call(o,"callee")&&(!hn.call(o,"callee")||Vt.call(o)==i)}var Rr=Array.isArray;function tr(o){return o!=null&&wn(o.length)&&!Lr(o)}function Us(o){return Nn(o)&&tr(o)}var xn=Kt||zs;function Lr(o){var d=Je(o)?Vt.call(o):"";return d==h||d==g}function wn(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=s}function Je(o){var d=typeof o;return!!o&&(d=="object"||d=="function")}function Nn(o){return!!o&&typeof o=="object"}function kr(o){return tr(o)?Zt(o):Rs(o)}function Hs(){return[]}function zs(){return!1}r.exports=yn}(Ur,Ur.exports)),Ur.exports}var Hr={exports:{}};Hr.exports;var Za;function Il(){return Za||(Za=1,function(r,e){var t=200,n="__lodash_hash_undefined__",s=1,i=2,a=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",f="[object Error]",b="[object Function]",x="[object GeneratorFunction]",y="[object Map]",N="[object Number]",S="[object Null]",_="[object Object]",j="[object Promise]",$="[object Proxy]",m="[object RegExp]",T="[object Set]",k="[object String]",P="[object Symbol]",Z="[object Undefined]",te="[object WeakMap]",v="[object ArrayBuffer]",q="[object DataView]",w="[object Float32Array]",O="[object Float64Array]",D="[object Int8Array]",I="[object Int16Array]",M="[object Int32Array]",U="[object Uint8Array]",W="[object Uint8ClampedArray]",A="[object Uint16Array]",B="[object Uint32Array]",F=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,H={};H[w]=H[O]=H[D]=H[I]=H[M]=H[U]=H[W]=H[A]=H[B]=!0,H[l]=H[c]=H[v]=H[h]=H[q]=H[g]=H[f]=H[b]=H[y]=H[N]=H[_]=H[m]=H[T]=H[k]=H[te]=!1;var le=typeof bt=="object"&&bt&&bt.Object===Object&&bt,ue=typeof self=="object"&&self&&self.Object===Object&&self,K=le||ue||Function("return this")(),re=e&&!e.nodeType&&e,ne=re&&!0&&r&&!r.nodeType&&r,ie=ne&&ne.exports===re,ce=ie&&le.process,he=function(){try{return ce&&ce.binding&&ce.binding("util")}catch{}}(),pe=he&&he.isTypedArray;function xe(o,d){for(var E=-1,C=o==null?0:o.length,Q=0,Y=[];++E<C;){var ae=o[E];d(ae,E,o)&&(Y[Q++]=ae)}return Y}function br(o,d){for(var E=-1,C=d.length,Q=o.length;++E<C;)o[Q+E]=d[E];return o}function on(o,d){for(var E=-1,C=o==null?0:o.length;++E<C;)if(d(o[E],E,o))return!0;return!1}function ss(o,d){for(var E=-1,C=Array(o);++E<o;)C[E]=d(E);return C}function is(o){return function(d){return o(d)}}function Gt(o,d){return o.has(d)}function vr(o,d){return o?.[d]}function ln(o){var d=-1,E=Array(o.size);return o.forEach(function(C,Q){E[++d]=[Q,C]}),E}function cn(o,d){return function(E){return o(d(E))}}function Ye(o){var d=-1,E=Array(o.size);return o.forEach(function(C){E[++d]=C}),E}var Vt=Array.prototype,as=Function.prototype,At=Object.prototype,Wt=K["__core-js_shared__"],yr=as.toString,je=At.hasOwnProperty,un=function(){var o=/[^.]+$/.exec(Wt&&Wt.keys&&Wt.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),hn=At.toString,os=RegExp("^"+yr.call(je).replace(F,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Er=ie?K.Buffer:void 0,Kt=K.Symbol,dn=K.Uint8Array,Yt=At.propertyIsEnumerable,St=Vt.splice,Be=Kt?Kt.toStringTag:void 0,Xt=Object.getOwnPropertySymbols,xr=Er?Er.isBuffer:void 0,_t=cn(Object.keys,Object),wr=st(K,"DataView"),Ct=st(K,"Map"),Nr=st(K,"Promise"),Tr=st(K,"Set"),Ar=st(K,"WeakMap"),ft=st(Object,"create"),fn=Se(wr),nt=Se(Ct),ls=Se(Nr),cs=Se(Tr),us=Se(Ar),pn=Kt?Kt.prototype:void 0,Sr=pn?pn.valueOf:void 0;function be(o){var d=-1,E=o==null?0:o.length;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function hs(){this.__data__=ft?ft(null):{},this.size=0}function ds(o){var d=this.has(o)&&delete this.__data__[o];return this.size-=d?1:0,d}function fs(o){var d=this.__data__;if(ft){var E=d[o];return E===n?void 0:E}return je.call(d,o)?d[o]:void 0}function ps(o){var d=this.__data__;return ft?d[o]!==void 0:je.call(d,o)}function gs(o,d){var E=this.__data__;return this.size+=this.has(o)?0:1,E[o]=ft&&d===void 0?n:d,this}be.prototype.clear=hs,be.prototype.delete=ds,be.prototype.get=fs,be.prototype.has=ps,be.prototype.set=gs;function we(o){var d=-1,E=o==null?0:o.length;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function ms(){this.__data__=[],this.size=0}function bs(o){var d=this.__data__,E=Qt(d,o);if(E<0)return!1;var C=d.length-1;return E==C?d.pop():St.call(d,E,1),--this.size,!0}function vs(o){var d=this.__data__,E=Qt(d,o);return E<0?void 0:d[E][1]}function ys(o){return Qt(this.__data__,o)>-1}function Es(o,d){var E=this.__data__,C=Qt(E,o);return C<0?(++this.size,E.push([o,d])):E[C][1]=d,this}we.prototype.clear=ms,we.prototype.delete=bs,we.prototype.get=vs,we.prototype.has=ys,we.prototype.set=Es;function Re(o){var d=-1,E=o==null?0:o.length;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function xs(){this.size=0,this.__data__={hash:new be,map:new(Ct||we),string:new be}}function ws(o){var d=$e(this,o).delete(o);return this.size-=d?1:0,d}function Ns(o){return $e(this,o).get(o)}function Ts(o){return $e(this,o).has(o)}function As(o,d){var E=$e(this,o),C=E.size;return E.set(o,d),this.size+=E.size==C?0:1,this}Re.prototype.clear=xs,Re.prototype.delete=ws,Re.prototype.get=Ns,Re.prototype.has=Ts,Re.prototype.set=As;function Zt(o){var d=-1,E=o==null?0:o.length;for(this.__data__=new Re;++d<E;)this.add(o[d])}function gn(o){return this.__data__.set(o,n),this}function Jt(o){return this.__data__.has(o)}Zt.prototype.add=Zt.prototype.push=gn,Zt.prototype.has=Jt;function Xe(o){var d=this.__data__=new we(o);this.size=d.size}function _r(){this.__data__=new we,this.size=0}function Ss(o){var d=this.__data__,E=d.delete(o);return this.size=d.size,E}function _s(o){return this.__data__.get(o)}function Cs(o){return this.__data__.has(o)}function Os(o,d){var E=this.__data__;if(E instanceof we){var C=E.__data__;if(!Ct||C.length<t-1)return C.push([o,d]),this.size=++E.size,this;E=this.__data__=new Re(C)}return E.set(o,d),this.size=E.size,this}Xe.prototype.clear=_r,Xe.prototype.delete=Ss,Xe.prototype.get=_s,Xe.prototype.has=Cs,Xe.prototype.set=Os;function Rs(o,d){var E=er(o),C=!E&&En(o),Q=!E&&!C&&tr(o),Y=!E&&!C&&!Q&&Nn(o),ae=E||C||Q||Y,se=ae?ss(o.length,String):[],ge=se.length;for(var oe in o)je.call(o,oe)&&!(ae&&(oe=="length"||Q&&(oe=="offset"||oe=="parent")||Y&&(oe=="buffer"||oe=="byteLength"||oe=="byteOffset")||Ps(oe,ge)))&&se.push(oe);return se}function Qt(o,d){for(var E=o.length;E--;)if(yn(o[E][0],d))return E;return-1}function Cr(o,d,E){var C=d(o);return er(o)?C:br(C,E(o))}function Ot(o){return o==null?o===void 0?Z:S:Be&&Be in Object(o)?it(o):vn(o)}function mn(o){return Je(o)&&Ot(o)==l}function bn(o,d,E,C,Q){return o===d?!0:o==null||d==null||!Je(o)&&!Je(d)?o!==o&&d!==d:Ls(o,d,E,C,bn,Q)}function Ls(o,d,E,C,Q,Y){var ae=er(o),se=er(d),ge=ae?c:Ze(o),oe=se?c:Ze(d);ge=ge==l?_:ge,oe=oe==l?_:oe;var Ne=ge==_,Le=oe==_,me=ge==oe;if(me&&tr(o)){if(!tr(d))return!1;ae=!0,Ne=!1}if(me&&!Ne)return Y||(Y=new Xe),ae||Nn(o)?Or(o,d,E,C,Q,Y):qs(o,d,ge,E,C,Q,Y);if(!(E&s)){var Te=Ne&&je.call(o,"__wrapped__"),ve=Le&&je.call(d,"__wrapped__");if(Te||ve){var pt=Te?o.value():o,at=ve?d.value():d;return Y||(Y=new Xe),Q(pt,at,E,C,Y)}}return me?(Y||(Y=new Xe),Ds(o,d,E,C,Q,Y)):!1}function ks(o){if(!wn(o)||$s(o))return!1;var d=xn(o)?os:X;return d.test(Se(o))}function js(o){return Je(o)&&Lr(o.length)&&!!H[Ot(o)]}function Is(o){if(!Fs(o))return _t(o);var d=[];for(var E in Object(o))je.call(o,E)&&E!="constructor"&&d.push(E);return d}function Or(o,d,E,C,Q,Y){var ae=E&s,se=o.length,ge=d.length;if(se!=ge&&!(ae&&ge>se))return!1;var oe=Y.get(o);if(oe&&Y.get(d))return oe==d;var Ne=-1,Le=!0,me=E&i?new Zt:void 0;for(Y.set(o,d),Y.set(d,o);++Ne<se;){var Te=o[Ne],ve=d[Ne];if(C)var pt=ae?C(ve,Te,Ne,d,o,Y):C(Te,ve,Ne,o,d,Y);if(pt!==void 0){if(pt)continue;Le=!1;break}if(me){if(!on(d,function(at,Lt){if(!Gt(me,Lt)&&(Te===at||Q(Te,at,E,C,Y)))return me.push(Lt)})){Le=!1;break}}else if(!(Te===ve||Q(Te,ve,E,C,Y))){Le=!1;break}}return Y.delete(o),Y.delete(d),Le}function qs(o,d,E,C,Q,Y,ae){switch(E){case q:if(o.byteLength!=d.byteLength||o.byteOffset!=d.byteOffset)return!1;o=o.buffer,d=d.buffer;case v:return!(o.byteLength!=d.byteLength||!Y(new dn(o),new dn(d)));case h:case g:case N:return yn(+o,+d);case f:return o.name==d.name&&o.message==d.message;case m:case k:return o==d+"";case y:var se=ln;case T:var ge=C&s;if(se||(se=Ye),o.size!=d.size&&!ge)return!1;var oe=ae.get(o);if(oe)return oe==d;C|=i,ae.set(o,d);var Ne=Or(se(o),se(d),C,Q,Y,ae);return ae.delete(o),Ne;case P:if(Sr)return Sr.call(o)==Sr.call(d)}return!1}function Ds(o,d,E,C,Q,Y){var ae=E&s,se=Rt(o),ge=se.length,oe=Rt(d),Ne=oe.length;if(ge!=Ne&&!ae)return!1;for(var Le=ge;Le--;){var me=se[Le];if(!(ae?me in d:je.call(d,me)))return!1}var Te=Y.get(o);if(Te&&Y.get(d))return Te==d;var ve=!0;Y.set(o,d),Y.set(d,o);for(var pt=ae;++Le<ge;){me=se[Le];var at=o[me],Lt=d[me];if(C)var Yi=ae?C(Lt,at,me,d,o,Y):C(at,Lt,me,o,d,Y);if(!(Yi===void 0?at===Lt||Q(at,Lt,E,C,Y):Yi)){ve=!1;break}pt||(pt=me=="constructor")}if(ve&&!pt){var Tn=o.constructor,An=d.constructor;Tn!=An&&"constructor"in o&&"constructor"in d&&!(typeof Tn=="function"&&Tn instanceof Tn&&typeof An=="function"&&An instanceof An)&&(ve=!1)}return Y.delete(o),Y.delete(d),ve}function Rt(o){return Cr(o,kr,Ms)}function $e(o,d){var E=o.__data__;return Bs(d)?E[typeof d=="string"?"string":"hash"]:E.map}function st(o,d){var E=vr(o,d);return ks(E)?E:void 0}function it(o){var d=je.call(o,Be),E=o[Be];try{o[Be]=void 0;var C=!0}catch{}var Q=hn.call(o);return C&&(d?o[Be]=E:delete o[Be]),Q}var Ms=Xt?function(o){return o==null?[]:(o=Object(o),xe(Xt(o),function(d){return Yt.call(o,d)}))}:Hs,Ze=Ot;(wr&&Ze(new wr(new ArrayBuffer(1)))!=q||Ct&&Ze(new Ct)!=y||Nr&&Ze(Nr.resolve())!=j||Tr&&Ze(new Tr)!=T||Ar&&Ze(new Ar)!=te)&&(Ze=function(o){var d=Ot(o),E=d==_?o.constructor:void 0,C=E?Se(E):"";if(C)switch(C){case fn:return q;case nt:return y;case ls:return j;case cs:return T;case us:return te}return d});function Ps(o,d){return d=d??a,!!d&&(typeof o=="number"||J.test(o))&&o>-1&&o%1==0&&o<d}function Bs(o){var d=typeof o;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?o!=="__proto__":o===null}function $s(o){return!!un&&un in o}function Fs(o){var d=o&&o.constructor,E=typeof d=="function"&&d.prototype||At;return o===E}function vn(o){return hn.call(o)}function Se(o){if(o!=null){try{return yr.call(o)}catch{}try{return o+""}catch{}}return""}function yn(o,d){return o===d||o!==o&&d!==d}var En=mn(function(){return arguments}())?mn:function(o){return Je(o)&&je.call(o,"callee")&&!Yt.call(o,"callee")},er=Array.isArray;function Rr(o){return o!=null&&Lr(o.length)&&!xn(o)}var tr=xr||zs;function Us(o,d){return bn(o,d)}function xn(o){if(!wn(o))return!1;var d=Ot(o);return d==b||d==x||d==u||d==$}function Lr(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=a}function wn(o){var d=typeof o;return o!=null&&(d=="object"||d=="function")}function Je(o){return o!=null&&typeof o=="object"}var Nn=pe?is(pe):js;function kr(o){return Rr(o)?Rs(o):Is(o)}function Hs(){return[]}function zs(){return!1}r.exports=Us}(Hr,Hr.exports)),Hr.exports}var kn={},Ja;function cg(){if(Ja)return kn;Ja=1,Object.defineProperty(kn,"__esModule",{value:!0});const r=jl(),e=Il();var t;return function(n){function s(c={},u={},h=!1){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});let g=r(u);h||(g=Object.keys(g).reduce((f,b)=>(g[b]!=null&&(f[b]=g[b]),f),{}));for(const f in c)c[f]!==void 0&&u[f]===void 0&&(g[f]=c[f]);return Object.keys(g).length>0?g:void 0}n.compose=s;function i(c={},u={}){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});const h=Object.keys(c).concat(Object.keys(u)).reduce((g,f)=>(e(c[f],u[f])||(g[f]=u[f]===void 0?null:u[f]),g),{});return Object.keys(h).length>0?h:void 0}n.diff=i;function a(c={},u={}){c=c||{};const h=Object.keys(u).reduce((g,f)=>(u[f]!==c[f]&&c[f]!==void 0&&(g[f]=u[f]),g),{});return Object.keys(c).reduce((g,f)=>(c[f]!==u[f]&&u[f]===void 0&&(g[f]=null),g),h)}n.invert=a;function l(c,u,h=!1){if(typeof c!="object")return u;if(typeof u!="object")return;if(!h)return u;const g=Object.keys(u).reduce((f,b)=>(c[b]===void 0&&(f[b]=u[b]),f),{});return Object.keys(g).length>0?g:void 0}n.transform=l}(t||(t={})),kn.default=t,kn}var jn={},Qa;function ql(){if(Qa)return jn;Qa=1,Object.defineProperty(jn,"__esModule",{value:!0});var r;return function(e){function t(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}e.length=t}(r||(r={})),jn.default=r,jn}var In={},eo;function ug(){if(eo)return In;eo=1,Object.defineProperty(In,"__esModule",{value:!0});const r=ql();class e{constructor(n){this.ops=n,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(n){n||(n=1/0);const s=this.ops[this.index];if(s){const i=this.offset,a=r.default.length(s);if(n>=a-i?(n=a-i,this.index+=1,this.offset=0):this.offset+=n,typeof s.delete=="number")return{delete:n};{const l={};return s.attributes&&(l.attributes=s.attributes),typeof s.retain=="number"?l.retain=n:typeof s.retain=="object"&&s.retain!==null?l.retain=s.retain:typeof s.insert=="string"?l.insert=s.insert.substr(i,n):l.insert=s.insert,l}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?r.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const n=this.ops[this.index];return n?typeof n.delete=="number"?"delete":typeof n.retain=="number"||typeof n.retain=="object"&&n.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const n=this.offset,s=this.index,i=this.next(),a=this.ops.slice(this.index);return this.offset=n,this.index=s,[i].concat(a)}}else return[]}}return In.default=e,In}var to;function hg(){return to||(to=1,function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=lg(),n=jl(),s=Il(),i=cg();e.AttributeMap=i.default;const a=ql();e.Op=a.default;const l=ug();e.OpIterator=l.default;const c="\0",u=(g,f)=>{if(typeof g!="object"||g===null)throw new Error(`cannot retain a ${typeof g}`);if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);const b=Object.keys(g)[0];if(!b||b!==Object.keys(f)[0])throw new Error(`embed types not matched: ${b} != ${Object.keys(f)[0]}`);return[b,g[b],f[b]]};class h{constructor(f){Array.isArray(f)?this.ops=f:f!=null&&Array.isArray(f.ops)?this.ops=f.ops:this.ops=[]}static registerEmbed(f,b){this.handlers[f]=b}static unregisterEmbed(f){delete this.handlers[f]}static getHandler(f){const b=this.handlers[f];if(!b)throw new Error(`no handlers for embed type "${f}"`);return b}insert(f,b){const x={};return typeof f=="string"&&f.length===0?this:(x.insert=f,b!=null&&typeof b=="object"&&Object.keys(b).length>0&&(x.attributes=b),this.push(x))}delete(f){return f<=0?this:this.push({delete:f})}retain(f,b){if(typeof f=="number"&&f<=0)return this;const x={retain:f};return b!=null&&typeof b=="object"&&Object.keys(b).length>0&&(x.attributes=b),this.push(x)}push(f){let b=this.ops.length,x=this.ops[b-1];if(f=n(f),typeof x=="object"){if(typeof f.delete=="number"&&typeof x.delete=="number")return this.ops[b-1]={delete:x.delete+f.delete},this;if(typeof x.delete=="number"&&f.insert!=null&&(b-=1,x=this.ops[b-1],typeof x!="object"))return this.ops.unshift(f),this;if(s(f.attributes,x.attributes)){if(typeof f.insert=="string"&&typeof x.insert=="string")return this.ops[b-1]={insert:x.insert+f.insert},typeof f.attributes=="object"&&(this.ops[b-1].attributes=f.attributes),this;if(typeof f.retain=="number"&&typeof x.retain=="number")return this.ops[b-1]={retain:x.retain+f.retain},typeof f.attributes=="object"&&(this.ops[b-1].attributes=f.attributes),this}}return b===this.ops.length?this.ops.push(f):this.ops.splice(b,0,f),this}chop(){const f=this.ops[this.ops.length-1];return f&&typeof f.retain=="number"&&!f.attributes&&this.ops.pop(),this}filter(f){return this.ops.filter(f)}forEach(f){this.ops.forEach(f)}map(f){return this.ops.map(f)}partition(f){const b=[],x=[];return this.forEach(y=>{(f(y)?b:x).push(y)}),[b,x]}reduce(f,b){return this.ops.reduce(f,b)}changeLength(){return this.reduce((f,b)=>b.insert?f+a.default.length(b):b.delete?f-b.delete:f,0)}length(){return this.reduce((f,b)=>f+a.default.length(b),0)}slice(f=0,b=1/0){const x=[],y=new l.default(this.ops);let N=0;for(;N<b&&y.hasNext();){let S;N<f?S=y.next(f-N):(S=y.next(b-N),x.push(S)),N+=a.default.length(S)}return new h(x)}compose(f){const b=new l.default(this.ops),x=new l.default(f.ops),y=[],N=x.peek();if(N!=null&&typeof N.retain=="number"&&N.attributes==null){let _=N.retain;for(;b.peekType()==="insert"&&b.peekLength()<=_;)_-=b.peekLength(),y.push(b.next());N.retain-_>0&&x.next(N.retain-_)}const S=new h(y);for(;b.hasNext()||x.hasNext();)if(x.peekType()==="insert")S.push(x.next());else if(b.peekType()==="delete")S.push(b.next());else{const _=Math.min(b.peekLength(),x.peekLength()),j=b.next(_),$=x.next(_);if($.retain){const m={};if(typeof j.retain=="number")m.retain=typeof $.retain=="number"?_:$.retain;else if(typeof $.retain=="number")j.retain==null?m.insert=j.insert:m.retain=j.retain;else{const k=j.retain==null?"insert":"retain",[P,Z,te]=u(j[k],$.retain),v=h.getHandler(P);m[k]={[P]:v.compose(Z,te,k==="retain")}}const T=i.default.compose(j.attributes,$.attributes,typeof j.retain=="number");if(T&&(m.attributes=T),S.push(m),!x.hasNext()&&s(S.ops[S.ops.length-1],m)){const k=new h(b.rest());return S.concat(k).chop()}}else typeof $.delete=="number"&&(typeof j.retain=="number"||typeof j.retain=="object"&&j.retain!==null)&&S.push($)}return S.chop()}concat(f){const b=new h(this.ops.slice());return f.ops.length>0&&(b.push(f.ops[0]),b.ops=b.ops.concat(f.ops.slice(1))),b}diff(f,b){if(this.ops===f.ops)return new h;const x=[this,f].map(j=>j.map($=>{if($.insert!=null)return typeof $.insert=="string"?$.insert:c;const m=j===f?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),y=new h,N=t(x[0],x[1],b,!0),S=new l.default(this.ops),_=new l.default(f.ops);return N.forEach(j=>{let $=j[1].length;for(;$>0;){let m=0;switch(j[0]){case t.INSERT:m=Math.min(_.peekLength(),$),y.push(_.next(m));break;case t.DELETE:m=Math.min($,S.peekLength()),S.next(m),y.delete(m);break;case t.EQUAL:m=Math.min(S.peekLength(),_.peekLength(),$);const T=S.next(m),k=_.next(m);s(T.insert,k.insert)?y.retain(m,i.default.diff(T.attributes,k.attributes)):y.push(k).delete(m);break}$-=m}}),y.chop()}eachLine(f,b=`
24
- `){const x=new l.default(this.ops);let y=new h,N=0;for(;x.hasNext();){if(x.peekType()!=="insert")return;const S=x.peek(),_=a.default.length(S)-x.peekLength(),j=typeof S.insert=="string"?S.insert.indexOf(b,_)-_:-1;if(j<0)y.push(x.next());else if(j>0)y.push(x.next(j));else{if(f(y,x.next(1).attributes||{},N)===!1)return;N+=1,y=new h}}y.length()>0&&f(y,{},N)}invert(f){const b=new h;return this.reduce((x,y)=>{if(y.insert)b.delete(a.default.length(y));else{if(typeof y.retain=="number"&&y.attributes==null)return b.retain(y.retain),x+y.retain;if(y.delete||typeof y.retain=="number"){const N=y.delete||y.retain;return f.slice(x,x+N).forEach(_=>{y.delete?b.push(_):y.retain&&y.attributes&&b.retain(a.default.length(_),i.default.invert(y.attributes,_.attributes))}),x+N}else if(typeof y.retain=="object"&&y.retain!==null){const N=f.slice(x,x+1),S=new l.default(N.ops).next(),[_,j,$]=u(y.retain,S.insert),m=h.getHandler(_);return b.retain({[_]:m.invert(j,$)},i.default.invert(y.attributes,S.attributes)),x+1}}return x},0),b.chop()}transform(f,b=!1){if(b=!!b,typeof f=="number")return this.transformPosition(f,b);const x=f,y=new l.default(this.ops),N=new l.default(x.ops),S=new h;for(;y.hasNext()||N.hasNext();)if(y.peekType()==="insert"&&(b||N.peekType()!=="insert"))S.retain(a.default.length(y.next()));else if(N.peekType()==="insert")S.push(N.next());else{const _=Math.min(y.peekLength(),N.peekLength()),j=y.next(_),$=N.next(_);if(j.delete)continue;if($.delete)S.push($);else{const m=j.retain,T=$.retain;let k=typeof T=="object"&&T!==null?T:_;if(typeof m=="object"&&m!==null&&typeof T=="object"&&T!==null){const P=Object.keys(m)[0];if(P===Object.keys(T)[0]){const Z=h.getHandler(P);Z&&(k={[P]:Z.transform(m[P],T[P],b)})}}S.retain(k,i.default.transform(j.attributes,$.attributes,b))}}return S.chop()}transformPosition(f,b=!1){b=!!b;const x=new l.default(this.ops);let y=0;for(;x.hasNext()&&y<=f;){const N=x.peekLength(),S=x.peekType();if(x.next(),S==="delete"){f-=Math.min(N,f-y);continue}else S==="insert"&&(y<f||!b)&&(f+=N);y+=N}return f}}h.Op=a.default,h.OpIterator=l.default,h.AttributeMap=i.default,h.handlers={},e.default=h,r.exports=h,r.exports.default=h}(Ln,Ln.exports)),Ln.exports}var Pe=hg();const G=Si(Pe);class Ke extends ke{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Ke.blotName="break";Ke.tagName="BR";let Ve=class extends Vn{};const dg={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function es(r){return r.replace(/[&<>"']/g,e=>dg[e])}class _e extends Di{static allowedChildren=[_e,Ke,ke,Ve];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(e,t){const n=_e.order.indexOf(e),s=_e.order.indexOf(t);return n>=0||s>=0?n-s:e===t?0:e<t?-1:1}formatAt(e,t,n,s){if(_e.compare(this.statics.blotName,n)<0&&this.scroll.query(n,V.BLOT)){const i=this.isolate(e,t);s&&i.wrap(n,s)}else super.formatAt(e,t,n,s)}optimize(e){if(super.optimize(e),this.parent instanceof _e&&_e.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}const ro=1;class Ee extends Zr{cache={};delta(){return this.cache.delta==null&&(this.cache.delta=Dl(this)),this.cache.delta}deleteAt(e,t){super.deleteAt(e,t),this.cache={}}formatAt(e,t,n,s){t<=0||(this.scroll.query(n,V.BLOCK)?e+t===this.length()&&this.format(n,s):super.formatAt(e,Math.min(t,this.length()-e-1),n,s),this.cache={})}insertAt(e,t,n){if(n!=null){super.insertAt(e,t,n),this.cache={};return}if(t.length===0)return;const s=t.split(`
25
- `),i=s.shift();i.length>0&&(e<this.length()-1||this.children.tail==null?super.insertAt(Math.min(e,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let a=this;s.reduce((l,c)=>(a=a.split(l,!0),a.insertAt(0,c),c.length),e+i.length)}insertBefore(e,t){const{head:n}=this.children;super.insertBefore(e,t),n instanceof Ke&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+ro),this.cache.length}moveChildren(e,t){super.moveChildren(e,t),this.cache={}}optimize(e){super.optimize(e),this.cache={}}path(e){return super.path(e,!0)}removeChild(e){super.removeChild(e),this.cache={}}split(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t&&(e===0||e>=this.length()-ro)){const s=this.clone();return e===0?(this.parent.insertBefore(s,this),this):(this.parent.insertBefore(s,this.next),s)}const n=super.split(e,t);return this.cache={},n}}Ee.blotName="block";Ee.tagName="P";Ee.defaultChild=Ke;Ee.allowedChildren=[Ke,_e,ke,Ve];class Me extends ke{attach(){super.attach(),this.attributes=new Jn(this.domNode)}delta(){return new G().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){const n=this.scroll.query(e,V.BLOCK_ATTRIBUTE);n!=null&&this.attributes.attribute(n,t)}formatAt(e,t,n,s){this.format(n,s)}insertAt(e,t,n){if(n!=null){super.insertAt(e,t,n);return}const s=t.split(`
22
+ <%s key={someKey} {...props} />`,X,K,re,K),W[K+X]=!0)}if(K=null,F!==void 0&&(t(F),K=""+F),a(B)&&(t(B.key),K=""+B.key),"key"in B){F={};for(var ne in B)ne!=="key"&&(F[ne]=B[ne])}else F=B;return K&&l(F,typeof A=="function"?A.displayName||A.name||"Unknown":A),u(A,K,H,J,s(),F,le,ue)}function g(A){typeof A=="object"&&A!==null&&A.$$typeof===b&&A._store&&(A._store.validated=1)}var f=L,b=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),j=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),te=Symbol.for("react.client.reference"),v=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=Object.prototype.hasOwnProperty,w=Array.isArray,O=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(A){return A()}};var D,I={},M=f.react_stack_bottom_frame.bind(f,i)(),U=O(n(i)),W={};Ir.Fragment=y,Ir.jsx=function(A,B,F,X,J){var H=1e4>v.recentlyCreatedOwnerStacks++;return h(A,B,F,!1,X,J,H?Error("react-stack-top-frame"):M,H?O(n(A)):U)},Ir.jsxs=function(A,B,F,X,J){var H=1e4>v.recentlyCreatedOwnerStacks++;return h(A,B,F,!0,X,J,H?Error("react-stack-top-frame"):M,H?O(n(A)):U)}}()),Ir}var Qi;function lc(){return Qi||(Qi=1,process.env.NODE_ENV==="production"?Sn.exports=ac():Sn.exports=oc()),Sn.exports}var p=lc();const ze=({type:r="button",className:e,children:t,...n})=>p.jsx("button",{type:r==="submit"?"submit":"button",className:e,...n,children:t}),cc=({children:r,className:e})=>p.jsx("div",{className:`card-header ${e}`,children:r}),uc=({children:r,className:e="",...t})=>p.jsx("div",{className:`card-body ${e}`,...t,children:r}),hc=({children:r,className:e=""})=>p.jsx("div",{className:`card-footer ${e}`,children:r}),dc=({children:r,className:e="",...t})=>p.jsx("div",{className:`card ${e}`,...t,children:r}),fc=()=>p.jsx("div",{className:"spinner",children:p.jsx("svg",{className:"spinner-icon",width:"30px",height:"30px",viewBox:"0 0 66 66",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("circle",{className:"path",fill:"none",strokeWidth:"6",strokeLinecap:"round",cx:"33",cy:"33",r:"30"})})}),Pt=(r,e)=>{L.useEffect(()=>{if(!Array.isArray(r)||r.length===0)return;const t=n=>{r.every(i=>i.current&&!i.current.contains(n.target))&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[r,e])},pc=({children:r,items:e,position:t="bottom-left",className:n=""})=>{const[s,i]=L.useState(!1),[a,l]=L.useState({top:0,left:0}),c=L.useRef(null),u=L.useRef(null);return Pt([c,u],()=>{i(!1)}),L.useEffect(()=>{if(s&&c.current&&u.current){const h=c.current.getBoundingClientRect(),g=u.current.getBoundingClientRect(),{scrollX:f,scrollY:b}=window;let x=0,y=0;switch(t){case"bottom-left":x=h.bottom,y=h.left;break;case"bottom-right":x=h.bottom,y=h.right-g.width;break;case"top-left":x=h.top-g.height,y=h.left;break;case"top-right":x=h.top-g.height,y=h.right-g.width;break}l({top:Math.round(x+b),left:Math.round(y+f)})}},[s,t]),p.jsxs(p.Fragment,{children:[p.jsx("div",{ref:c,onClick:()=>i(!s),children:r}),s&&en.createPortal(p.jsx("div",{ref:u,style:{position:"absolute",top:`${a.top}px`,left:`${a.left}px`},className:`dropdown-menu ${t} ${n}`,children:e.map((h,g)=>p.jsxs("div",{className:`dropdown-menu-item ${h.className}`,onClick:()=>{h.onClick(),i(!1)},children:[h.icon&&h.icon," ",h.label]},g))}),document.body)]})},gc=({children:r,className:e="",position:t="bottom-left"})=>{const[n,s]=L.useState(!1),i=L.useRef(null),a=L.useRef(null),l=L.useRef(`dropdown-${Math.random().toString(36).substr(2,9)}`),c=()=>{s(!n)};return Pt([i,a],()=>{s(!1)}),p.jsx("div",{className:`dropdown ${e}`,ref:i,id:l.current,children:L.Children.map(r,u=>L.isValidElement(u)?L.cloneElement(u,{toggleDropdown:c,isOpen:n,position:t,contentRef:a,dropdownId:l.current}):u)})},mc=({children:r,className:e="",toggleDropdown:t,dropdownId:n})=>p.jsx("div",{className:`dropdown-toggle ${e}`,onClick:t,"data-dropdown-id":n,children:r}),bc=({children:r,className:e="",isOpen:t=!1,position:n="bottom-left",contentRef:s,dropdownId:i})=>{const[a,l]=L.useState({top:0,left:0});return L.useEffect(()=>{if(t&&s?.current){const c=document.querySelector(`[data-dropdown-id="${i}"]`);if(c){const u=c.getBoundingClientRect(),h=s.current.getBoundingClientRect(),{scrollX:g,scrollY:f}=window;let b=0,x=0;switch(n){case"bottom-left":b=u.bottom,x=u.left;break;case"bottom-right":b=u.bottom,x=u.right-h.width;break;case"top-left":b=u.top-h.height,x=u.left;break;case"top-right":b=u.top-h.height,x=u.right-h.width;break}l({top:Math.round(b+f),left:Math.round(x+g)})}}},[t,n,s,i]),t?en.createPortal(p.jsx("div",{ref:s,style:{position:"absolute",top:`${a.top}px`,left:`${a.left}px`},className:`dropdown-content ${n} ${e}`,children:r}),document.body):null},vc=({className:r,text:e})=>p.jsx("span",{className:r,children:e}),yc=({children:r,className:e="",...t})=>p.jsx("div",{className:`box ${e}`,...t,children:r}),ci=({children:r})=>p.jsx(p.Fragment,{children:r}),Co=({children:r})=>p.jsx(p.Fragment,{children:r}),Ec=({className:r="",navClassName:e="",contentClassName:t="",children:n,activeTab:s,handleActiveTab:i,customHeader:a})=>{const{tabs:l,groups:c}=L.useMemo(()=>{const h=[],g=[];return L.Children.forEach(n,f=>{if(L.isValidElement(f)){if(f.type===Co){const b=[],x=f.props;L.Children.forEach(x.children,y=>{L.isValidElement(y)&&y.type===ci&&(h.push({title:y.props.title,icon:y.props.icon,children:y.props.children}),b.push(h.length-1))}),g.push({title:x.title,tabIndices:b})}else if(f.type===ci){const b=f.props;h.push({title:b.title,icon:b.icon,children:b.children})}}}),{tabs:h,groups:g}},[n]);L.useEffect(()=>{l.length>0&&(s<0||s>=l.length)&&i(0)},[l.length,s,i]);const u=(h,g)=>p.jsxs("div",{className:`tab-item ${g===s?"active":""}`,onClick:()=>i(g),role:"button",tabIndex:0,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),i(g))},children:[h.icon&&p.jsx("span",{className:"tab-icon",children:h.icon}),p.jsx("span",{className:"tab-title",children:h.title})]},`tab-nav-${g}`);return p.jsxs("div",{className:`card tabs ${r}`,children:[p.jsxs("div",{className:`card-header ${e}`,children:[a,p.jsx("div",{className:"nav-tabs",role:"tablist",children:c.length>0?c.map(h=>p.jsxs(L.Fragment,{children:[p.jsx("legend",{className:"tab-item-legend",children:h.title}),h.tabIndices.map(g=>u(l[g],g))]},`group-${h.title}`)):l.map((h,g)=>u(h,g))})]}),p.jsx("div",{className:`card-body ${t}`,children:p.jsx("div",{className:"tab-content",children:p.jsx("div",{className:"tab-panel",children:l[s]?p.jsx("div",{children:l[s].children},`tab-content-${s}`):p.jsx("div",{children:"No content available"})})})})]})};var Oo={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ea=L.createContext&&L.createContext(Oo),xc=["attr","size","title"];function wc(r,e){if(r==null)return{};var t=Nc(r,e),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(s=0;s<i.length;s++)n=i[s],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function Nc(r,e){if(r==null)return{};var t={};for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(e.indexOf(n)>=0)continue;t[n]=r[n]}return t}function Fn(){return Fn=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Fn.apply(this,arguments)}function ta(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,n)}return t}function Un(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ta(Object(t),!0).forEach(function(n){Tc(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ta(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Tc(r,e,t){return e=Ac(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ac(r){var e=Sc(r,"string");return typeof e=="symbol"?e:e+""}function Sc(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Ro(r){return r&&r.map((e,t)=>L.createElement(e.tag,Un({key:t},e.attr),Ro(e.child)))}function Oe(r){return e=>L.createElement(_c,Fn({attr:Un({},r.attr)},e),Ro(r.child))}function _c(r){var e=t=>{var{attr:n,size:s,title:i}=r,a=wc(r,xc),l=s||t.size||"1em",c;return t.className&&(c=t.className),r.className&&(c=(c?c+" ":"")+r.className),L.createElement("svg",Fn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,a,{className:c,style:Un(Un({color:r.color||t.color},t.style),r.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),i&&L.createElement("title",null,i),r.children)};return ea!==void 0?L.createElement(ea.Consumer,null,t=>e(t)):e(Oo)}function Cc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(r)}function ui(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(r)}function Ci(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(r)}function Oc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 18 9 12 15 6"},child:[]}]})(r)}function Rc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(r)}function Lc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"},child:[]}]})(r)}function kc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"},child:[]}]})(r)}function jc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"19 20 9 12 19 4 19 20"},child:[]},{tag:"line",attr:{x1:"5",y1:"19",x2:"5",y2:"5"},child:[]}]})(r)}function Ic(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"5 4 15 12 5 20 5 4"},child:[]},{tag:"line",attr:{x1:"19",y1:"5",x2:"19",y2:"19"},child:[]}]})(r)}function qc(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]}]})(r)}function Lo(r){return Oe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(r)}var qr={},rr={},_n={},kt={},jt={},Gs={},ra;function ko(){return ra||(ra=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.Doctype=r.CDATA=r.Tag=r.Style=r.Script=r.Comment=r.Directive=r.Text=r.Root=r.isTag=r.ElementType=void 0;var e;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(e=r.ElementType||(r.ElementType={}));function t(n){return n.type===e.Tag||n.type===e.Script||n.type===e.Style}r.isTag=t,r.Root=e.Root,r.Text=e.Text,r.Directive=e.Directive,r.Comment=e.Comment,r.Script=e.Script,r.Style=e.Style,r.Tag=e.Tag,r.CDATA=e.CDATA,r.Doctype=e.Doctype}(Gs)),Gs}var ee={},na;function sa(){if(na)return ee;na=1;var r=ee&&ee.__extends||function(){var m=function(T,k){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,Z){P.__proto__=Z}||function(P,Z){for(var te in Z)Object.prototype.hasOwnProperty.call(Z,te)&&(P[te]=Z[te])},m(T,k)};return function(T,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");m(T,k);function P(){this.constructor=T}T.prototype=k===null?Object.create(k):(P.prototype=k.prototype,new P)}}(),e=ee&&ee.__assign||function(){return e=Object.assign||function(m){for(var T,k=1,P=arguments.length;k<P;k++){T=arguments[k];for(var Z in T)Object.prototype.hasOwnProperty.call(T,Z)&&(m[Z]=T[Z])}return m},e.apply(this,arguments)};Object.defineProperty(ee,"__esModule",{value:!0}),ee.cloneNode=ee.hasChildren=ee.isDocument=ee.isDirective=ee.isComment=ee.isText=ee.isCDATA=ee.isTag=ee.Element=ee.Document=ee.CDATA=ee.NodeWithChildren=ee.ProcessingInstruction=ee.Comment=ee.Text=ee.DataNode=ee.Node=void 0;var t=ko(),n=function(){function m(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(m.prototype,"parentNode",{get:function(){return this.parent},set:function(T){this.parent=T},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"previousSibling",{get:function(){return this.prev},set:function(T){this.prev=T},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"nextSibling",{get:function(){return this.next},set:function(T){this.next=T},enumerable:!1,configurable:!0}),m.prototype.cloneNode=function(T){return T===void 0&&(T=!1),j(this,T)},m}();ee.Node=n;var s=function(m){r(T,m);function T(k){var P=m.call(this)||this;return P.data=k,P}return Object.defineProperty(T.prototype,"nodeValue",{get:function(){return this.data},set:function(k){this.data=k},enumerable:!1,configurable:!0}),T}(n);ee.DataNode=s;var i=function(m){r(T,m);function T(){var k=m!==null&&m.apply(this,arguments)||this;return k.type=t.ElementType.Text,k}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),T}(s);ee.Text=i;var a=function(m){r(T,m);function T(){var k=m!==null&&m.apply(this,arguments)||this;return k.type=t.ElementType.Comment,k}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),T}(s);ee.Comment=a;var l=function(m){r(T,m);function T(k,P){var Z=m.call(this,P)||this;return Z.name=k,Z.type=t.ElementType.Directive,Z}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),T}(s);ee.ProcessingInstruction=l;var c=function(m){r(T,m);function T(k){var P=m.call(this)||this;return P.children=k,P}return Object.defineProperty(T.prototype,"firstChild",{get:function(){var k;return(k=this.children[0])!==null&&k!==void 0?k:null},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"childNodes",{get:function(){return this.children},set:function(k){this.children=k},enumerable:!1,configurable:!0}),T}(n);ee.NodeWithChildren=c;var u=function(m){r(T,m);function T(){var k=m!==null&&m.apply(this,arguments)||this;return k.type=t.ElementType.CDATA,k}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),T}(c);ee.CDATA=u;var h=function(m){r(T,m);function T(){var k=m!==null&&m.apply(this,arguments)||this;return k.type=t.ElementType.Root,k}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),T}(c);ee.Document=h;var g=function(m){r(T,m);function T(k,P,Z,te){Z===void 0&&(Z=[]),te===void 0&&(te=k==="script"?t.ElementType.Script:k==="style"?t.ElementType.Style:t.ElementType.Tag);var v=m.call(this,Z)||this;return v.name=k,v.attribs=P,v.type=te,v}return Object.defineProperty(T.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"tagName",{get:function(){return this.name},set:function(k){this.name=k},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"attributes",{get:function(){var k=this;return Object.keys(this.attribs).map(function(P){var Z,te;return{name:P,value:k.attribs[P],namespace:(Z=k["x-attribsNamespace"])===null||Z===void 0?void 0:Z[P],prefix:(te=k["x-attribsPrefix"])===null||te===void 0?void 0:te[P]}})},enumerable:!1,configurable:!0}),T}(c);ee.Element=g;function f(m){return(0,t.isTag)(m)}ee.isTag=f;function b(m){return m.type===t.ElementType.CDATA}ee.isCDATA=b;function x(m){return m.type===t.ElementType.Text}ee.isText=x;function y(m){return m.type===t.ElementType.Comment}ee.isComment=y;function N(m){return m.type===t.ElementType.Directive}ee.isDirective=N;function S(m){return m.type===t.ElementType.Root}ee.isDocument=S;function _(m){return Object.prototype.hasOwnProperty.call(m,"children")}ee.hasChildren=_;function j(m,T){T===void 0&&(T=!1);var k;if(x(m))k=new i(m.data);else if(y(m))k=new a(m.data);else if(f(m)){var P=T?$(m.children):[],Z=new g(m.name,e({},m.attribs),P);P.forEach(function(w){return w.parent=Z}),m.namespace!=null&&(Z.namespace=m.namespace),m["x-attribsNamespace"]&&(Z["x-attribsNamespace"]=e({},m["x-attribsNamespace"])),m["x-attribsPrefix"]&&(Z["x-attribsPrefix"]=e({},m["x-attribsPrefix"])),k=Z}else if(b(m)){var P=T?$(m.children):[],te=new u(P);P.forEach(function(O){return O.parent=te}),k=te}else if(S(m)){var P=T?$(m.children):[],v=new h(P);P.forEach(function(O){return O.parent=v}),m["x-mode"]&&(v["x-mode"]=m["x-mode"]),k=v}else if(N(m)){var q=new l(m.name,m.data);m["x-name"]!=null&&(q["x-name"]=m["x-name"],q["x-publicId"]=m["x-publicId"],q["x-systemId"]=m["x-systemId"]),k=q}else throw new Error("Not implemented yet: ".concat(m.type));return k.startIndex=m.startIndex,k.endIndex=m.endIndex,m.sourceCodeLocation!=null&&(k.sourceCodeLocation=m.sourceCodeLocation),k}ee.cloneNode=j;function $(m){for(var T=m.map(function(P){return j(P,!0)}),k=1;k<T.length;k++)T[k].prev=T[k-1],T[k-1].next=T[k];return T}return ee}var ia;function jo(){return ia||(ia=1,function(r){var e=jt&&jt.__createBinding||(Object.create?function(l,c,u,h){h===void 0&&(h=u);var g=Object.getOwnPropertyDescriptor(c,u);(!g||("get"in g?!c.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return c[u]}}),Object.defineProperty(l,h,g)}:function(l,c,u,h){h===void 0&&(h=u),l[h]=c[u]}),t=jt&&jt.__exportStar||function(l,c){for(var u in l)u!=="default"&&!Object.prototype.hasOwnProperty.call(c,u)&&e(c,l,u)};Object.defineProperty(r,"__esModule",{value:!0}),r.DomHandler=void 0;var n=ko(),s=sa();t(sa(),r);var i={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function l(c,u,h){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof u=="function"&&(h=u,u=i),typeof c=="object"&&(u=c,c=void 0),this.callback=c??null,this.options=u??i,this.elementCB=h??null}return l.prototype.onparserinit=function(c){this.parser=c},l.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},l.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},l.prototype.onerror=function(c){this.handleCallback(c)},l.prototype.onclosetag=function(){this.lastNode=null;var c=this.tagStack.pop();this.options.withEndIndices&&(c.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(c)},l.prototype.onopentag=function(c,u){var h=this.options.xmlMode?n.ElementType.Tag:void 0,g=new s.Element(c,u,void 0,h);this.addNode(g),this.tagStack.push(g)},l.prototype.ontext=function(c){var u=this.lastNode;if(u&&u.type===n.ElementType.Text)u.data+=c,this.options.withEndIndices&&(u.endIndex=this.parser.endIndex);else{var h=new s.Text(c);this.addNode(h),this.lastNode=h}},l.prototype.oncomment=function(c){if(this.lastNode&&this.lastNode.type===n.ElementType.Comment){this.lastNode.data+=c;return}var u=new s.Comment(c);this.addNode(u),this.lastNode=u},l.prototype.oncommentend=function(){this.lastNode=null},l.prototype.oncdatastart=function(){var c=new s.Text(""),u=new s.CDATA([c]);this.addNode(u),c.parent=u,this.lastNode=c},l.prototype.oncdataend=function(){this.lastNode=null},l.prototype.onprocessinginstruction=function(c,u){var h=new s.ProcessingInstruction(c,u);this.addNode(h)},l.prototype.handleCallback=function(c){if(typeof this.callback=="function")this.callback(c,this.dom);else if(c)throw c},l.prototype.addNode=function(c){var u=this.tagStack[this.tagStack.length-1],h=u.children[u.children.length-1];this.options.withStartIndices&&(c.startIndex=this.parser.startIndex),this.options.withEndIndices&&(c.endIndex=this.parser.endIndex),u.children.push(c),h&&(c.prev=h,h.next=c),c.parent=u,this.lastNode=null},l}();r.DomHandler=a,r.default=a}(jt)),jt}var Vs={},aa;function Dc(){return aa||(aa=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CARRIAGE_RETURN_PLACEHOLDER_REGEX=r.CARRIAGE_RETURN_PLACEHOLDER=r.CARRIAGE_RETURN_REGEX=r.CARRIAGE_RETURN=r.CASE_SENSITIVE_TAG_NAMES_MAP=r.CASE_SENSITIVE_TAG_NAMES=void 0,r.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],r.CASE_SENSITIVE_TAG_NAMES_MAP=r.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,t){return e[t.toLowerCase()]=t,e},{}),r.CARRIAGE_RETURN="\r",r.CARRIAGE_RETURN_REGEX=new RegExp(r.CARRIAGE_RETURN,"g"),r.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),r.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(r.CARRIAGE_RETURN_PLACEHOLDER,"g")}(Vs)),Vs}var oa;function Io(){if(oa)return kt;oa=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.formatAttributes=n,kt.escapeSpecialCharacters=i,kt.revertEscapedCharacters=a,kt.formatDOM=l;var r=jo(),e=Dc();function t(c){return e.CASE_SENSITIVE_TAG_NAMES_MAP[c]}function n(c){for(var u={},h=0,g=c.length;h<g;h++){var f=c[h];u[f.name]=f.value}return u}function s(c){c=c.toLowerCase();var u=t(c);return u||c}function i(c){return c.replace(e.CARRIAGE_RETURN_REGEX,e.CARRIAGE_RETURN_PLACEHOLDER)}function a(c){return c.replace(e.CARRIAGE_RETURN_PLACEHOLDER_REGEX,e.CARRIAGE_RETURN)}function l(c,u,h){u===void 0&&(u=null);for(var g=[],f,b=0,x=c.length;b<x;b++){var y=c[b];switch(y.nodeType){case 1:{var N=s(y.nodeName);f=new r.Element(N,n(y.attributes)),f.children=l(N==="template"?y.content.childNodes:y.childNodes,f);break}case 3:f=new r.Text(a(y.nodeValue));break;case 8:f=new r.Comment(y.nodeValue);break;default:continue}var S=g[b-1]||null;S&&(S.next=f),f.parent=u,f.prev=S,f.next=null,g.push(f)}return h&&(f=new r.ProcessingInstruction(h.substring(0,h.indexOf(" ")).toLowerCase(),h),f.next=g[0]||null,f.parent=u,g.unshift(f),g[1]&&(g[1].prev=g[0])),g}return kt}var la;function Mc(){if(la)return _n;la=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.default=y;var r=Io(),e="html",t="head",n="body",s=/<([a-zA-Z]+[0-9]?)/,i=/<head[^]*>/i,a=/<body[^]*>/i,l=function(N,S){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(N,S){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u=typeof window=="object"&&window.DOMParser;if(typeof u=="function"){var h=new u,g="text/html";c=function(N,S){return S&&(N="<".concat(S,">").concat(N,"</").concat(S,">")),h.parseFromString(N,g)},l=c}if(typeof document=="object"&&document.implementation){var f=document.implementation.createHTMLDocument();l=function(N,S){if(S){var _=f.documentElement.querySelector(S);return _&&(_.innerHTML=N),f}return f.documentElement.innerHTML=N,f}}var b=typeof document=="object"&&document.createElement("template"),x;b&&b.content&&(x=function(N){return b.innerHTML=N,b.content.childNodes});function y(N){var S,_;N=(0,r.escapeSpecialCharacters)(N);var j=N.match(s),$=j&&j[1]?j[1].toLowerCase():"";switch($){case e:{var m=c(N);if(!i.test(N)){var T=m.querySelector(t);(S=T?.parentNode)===null||S===void 0||S.removeChild(T)}if(!a.test(N)){var T=m.querySelector(n);(_=T?.parentNode)===null||_===void 0||_.removeChild(T)}return m.querySelectorAll(e)}case t:case n:{var k=l(N).querySelectorAll($);return a.test(N)&&i.test(N)?k[0].parentNode.childNodes:k}default:{if(x)return x(N);var T=l(N,n).querySelector(n);return T.childNodes}}}return _n}var ca;function Pc(){if(ca)return rr;ca=1;var r=rr&&rr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(rr,"__esModule",{value:!0}),rr.default=s;var e=r(Mc()),t=Io(),n=/<(![a-zA-Z\s]+)>/;function s(i){if(typeof i!="string")throw new TypeError("First argument must be a string");if(!i)return[];var a=i.match(n),l=a?a[1]:void 0;return(0,t.formatDOM)((0,e.default)(i),null,l)}return rr}var Cn={},Ie={},Dr={},ua;function Bc(){if(ua)return Dr;ua=1;var r=0;Dr.SAME=r;var e=1;return Dr.CAMELCASE=e,Dr.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1},Dr}var ha;function $c(){if(ha)return Ie;ha=1;const r=0,e=1,t=2,n=3,s=4,i=5,a=6;function l(m){return u.hasOwnProperty(m)?u[m]:null}function c(m,T,k,P,Z,te,v){this.acceptsBooleans=T===t||T===n||T===s,this.attributeName=P,this.attributeNamespace=Z,this.mustUseProperty=k,this.propertyName=m,this.type=T,this.sanitizeURL=te,this.removeEmptyString=v}const u={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(m=>{u[m]=new c(m,r,!1,m,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([m,T])=>{u[m]=new c(m,e,!1,T,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(m=>{u[m]=new c(m,t,!1,m.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(m=>{u[m]=new c(m,t,!1,m,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"].forEach(m=>{u[m]=new c(m,n,!1,m.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(m=>{u[m]=new c(m,n,!0,m,null,!1,!1)}),["capture","download"].forEach(m=>{u[m]=new c(m,s,!1,m,null,!1,!1)}),["cols","rows","size","span"].forEach(m=>{u[m]=new c(m,a,!1,m,null,!1,!1)}),["rowSpan","start"].forEach(m=>{u[m]=new c(m,i,!1,m.toLowerCase(),null,!1,!1)});const g=/[\-\:]([a-z])/g,f=m=>m[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"].forEach(m=>{const T=m.replace(g,f);u[T]=new c(T,e,!1,m,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(m=>{const T=m.replace(g,f);u[T]=new c(T,e,!1,m,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(m=>{const T=m.replace(g,f);u[T]=new c(T,e,!1,m,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(m=>{u[m]=new c(m,e,!1,m.toLowerCase(),null,!1,!1)});const b="xlinkHref";u[b]=new c("xlinkHref",e,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(m=>{u[m]=new c(m,e,!1,m.toLowerCase(),null,!0,!0)});const{CAMELCASE:x,SAME:y,possibleStandardNames:N}=Bc(),_=":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",j=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+_+"]*$")),$=Object.keys(N).reduce((m,T)=>{const k=N[T];return k===y?m[T]=T:k===x?m[T.toLowerCase()]=T:m[T]=k,m},{});return Ie.BOOLEAN=n,Ie.BOOLEANISH_STRING=t,Ie.NUMERIC=i,Ie.OVERLOADED_BOOLEAN=s,Ie.POSITIVE_NUMERIC=a,Ie.RESERVED=r,Ie.STRING=e,Ie.getPropertyInfo=l,Ie.isCustomAttribute=j,Ie.possibleStandardNames=$,Ie}var Mr={},nr={},Ws,da;function Fc(){if(da)return Ws;da=1;var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,t=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
23
+ `,u="/",h="*",g="",f="comment",b="declaration";Ws=function(y,N){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];N=N||{};var S=1,_=1;function j(w){var O=w.match(e);O&&(S+=O.length);var D=w.lastIndexOf(c);_=~D?w.length-D:_+w.length}function $(){var w={line:S,column:_};return function(O){return O.position=new m(w),P(),O}}function m(w){this.start=w,this.end={line:S,column:_},this.source=N.source}m.prototype.content=y;function T(w){var O=new Error(N.source+":"+S+":"+_+": "+w);if(O.reason=w,O.filename=N.source,O.line=S,O.column=_,O.source=y,!N.silent)throw O}function k(w){var O=w.exec(y);if(O){var D=O[0];return j(D),y=y.slice(D.length),O}}function P(){k(t)}function Z(w){var O;for(w=w||[];O=te();)O!==!1&&w.push(O);return w}function te(){var w=$();if(!(u!=y.charAt(0)||h!=y.charAt(1))){for(var O=2;g!=y.charAt(O)&&(h!=y.charAt(O)||u!=y.charAt(O+1));)++O;if(O+=2,g===y.charAt(O-1))return T("End of comment missing");var D=y.slice(2,O-2);return _+=2,j(D),y=y.slice(O),_+=2,w({type:f,comment:D})}}function v(){var w=$(),O=k(n);if(O){if(te(),!k(s))return T("property missing ':'");var D=k(i),I=w({type:b,property:x(O[0].replace(r,g)),value:D?x(D[0].replace(r,g)):g});return k(a),I}}function q(){var w=[];Z(w);for(var O;O=v();)O!==!1&&(w.push(O),Z(w));return w}return P(),q()};function x(y){return y?y.replace(l,g):g}return Ws}var fa;function Uc(){if(fa)return nr;fa=1;var r=nr&&nr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.default=t;var e=r(Fc());function t(n,s){var i=null;if(!n||typeof n!="string")return i;var a=(0,e.default)(n),l=typeof s=="function";return a.forEach(function(c){if(c.type==="declaration"){var u=c.property,h=c.value;l?s(u,h,c):h&&(i=i||{},i[u]=h)}}),i}return nr}var Pr={},pa;function Hc(){if(pa)return Pr;pa=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,t=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,i=function(u){return!u||t.test(u)||r.test(u)},a=function(u,h){return h.toUpperCase()},l=function(u,h){return"".concat(h,"-")},c=function(u,h){return h===void 0&&(h={}),i(u)?u:(u=u.toLowerCase(),h.reactCompat?u=u.replace(s,l):u=u.replace(n,l),u.replace(e,a))};return Pr.camelCase=c,Pr}var Br,ga;function zc(){if(ga)return Br;ga=1;var r=Br&&Br.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},e=r(Uc()),t=Hc();function n(s,i){var a={};return!s||typeof s!="string"||(0,e.default)(s,function(l,c){l&&c&&(a[(0,t.camelCase)(l,i)]=c)}),a}return n.default=n,Br=n,Br}var ma;function qo(){return ma||(ma=1,function(r){var e=Mr&&Mr.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(r,"__esModule",{value:!0}),r.returnFirstArg=r.canTextBeChildOfNode=r.ELEMENTS_WITH_NO_TEXT_CHILDREN=r.PRESERVE_CUSTOM_ATTRIBUTES=void 0,r.isCustomComponent=i,r.setStyleProp=l;var t=L,n=e(zc()),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function i(h,g){return h.includes("-")?!s.has(h):!!(g&&typeof g.is=="string")}var a={reactCompat:!0};function l(h,g){if(typeof h=="string"){if(!h.trim()){g.style={};return}try{g.style=(0,n.default)(h,a)}catch{g.style={}}}}r.PRESERVE_CUSTOM_ATTRIBUTES=Number(t.version.split(".")[0])>=16,r.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var c=function(h){return!r.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(h.name)};r.canTextBeChildOfNode=c;var u=function(h){return h};r.returnFirstArg=u}(Mr)),Mr}var ba;function Do(){if(ba)return Cn;ba=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.default=i;var r=$c(),e=qo(),t=["checked","value"],n=["input","select","textarea"],s={reset:!0,submit:!0};function i(l,c){l===void 0&&(l={});var u={},h=!!(l.type&&s[l.type]);for(var g in l){var f=l[g];if((0,r.isCustomAttribute)(g)){u[g]=f;continue}var b=g.toLowerCase(),x=a(b);if(x){var y=(0,r.getPropertyInfo)(x);switch(t.includes(x)&&n.includes(c)&&!h&&(x=a("default"+b)),u[x]=f,y&&y.type){case r.BOOLEAN:u[x]=!0;break;case r.OVERLOADED_BOOLEAN:f===""&&(u[x]=!0);break}continue}e.PRESERVE_CUSTOM_ATTRIBUTES&&(u[g]=f)}return(0,e.setStyleProp)(l.style,u),u}function a(l){return r.possibleStandardNames[l]}return Cn}var sr={},va;function Gc(){if(va)return sr;va=1;var r=sr&&sr.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(sr,"__esModule",{value:!0}),sr.default=i;var e=L,t=r(Do()),n=qo(),s={cloneElement:e.cloneElement,createElement:e.createElement,isValidElement:e.isValidElement};function i(l,c){c===void 0&&(c={});for(var u=[],h=typeof c.replace=="function",g=c.transform||n.returnFirstArg,f=c.library||s,b=f.cloneElement,x=f.createElement,y=f.isValidElement,N=l.length,S=0;S<N;S++){var _=l[S];if(h){var j=c.replace(_,S);if(y(j)){N>1&&(j=b(j,{key:j.key||S})),u.push(g(j,_,S));continue}}if(_.type==="text"){var $=!_.data.trim().length;if($&&_.parent&&!(0,n.canTextBeChildOfNode)(_.parent)||c.trim&&$)continue;u.push(g(_.data,_,S));continue}var m=_,T={};a(m)?((0,n.setStyleProp)(m.attribs.style,m.attribs),T=m.attribs):m.attribs&&(T=(0,t.default)(m.attribs,m.name));var k=void 0;switch(_.type){case"script":case"style":_.children[0]&&(T.dangerouslySetInnerHTML={__html:_.children[0].data});break;case"tag":_.name==="textarea"&&_.children[0]?T.defaultValue=_.children[0].data:_.children&&_.children.length&&(k=i(_.children,c));break;default:continue}N>1&&(T.key=S),u.push(g(x(_.name,T,k),_,S))}return u.length===1?u[0]:u}function a(l){return n.PRESERVE_CUSTOM_ATTRIBUTES&&l.type==="tag"&&(0,n.isCustomComponent)(l.name,l.attribs)}return sr}var ya;function Vc(){return ya||(ya=1,function(r){var e=qr&&qr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(r,"__esModule",{value:!0}),r.htmlToDOM=r.domToReact=r.attributesToProps=r.Text=r.ProcessingInstruction=r.Element=r.Comment=void 0,r.default=l;var t=e(Pc());r.htmlToDOM=t.default;var n=e(Do());r.attributesToProps=n.default;var s=e(Gc());r.domToReact=s.default;var i=jo();Object.defineProperty(r,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(r,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(r,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(r,"Text",{enumerable:!0,get:function(){return i.Text}});var a={lowerCaseAttributeNames:!1};function l(c,u){if(typeof c!="string")throw new TypeError("First argument must be a string");return c?(0,s.default)((0,t.default)(c,u?.htmlparser2||a),u):[]}}(qr)),qr}var Wc=Vc();const Ea=_i(Wc),Kc=Ea.default||Ea,Yc=({type:r,text:e})=>{const[t,n]=L.useState(!0),s=L.useRef(null),i=L.useRef(null),a=()=>{i.current&&(i.current.style.transition="opacity 0.4s",i.current.style.opacity="0"),s.current=window.setTimeout(()=>{n(!t)},500)};return L.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),t?p.jsxs("div",{ref:i,className:`alert ${r}`,role:"alert",children:[p.jsx("p",{children:Kc(e)}),p.jsx("button",{className:"close",type:"button","data-toggle":"close",onClick:a,children:p.jsx(Lo,{})})]}):null},Mo=({children:r,className:e="",...t})=>p.jsx("div",{className:`modal-header ${e}`,...t,children:r}),Po=({children:r,className:e="",...t})=>p.jsx("div",{className:`modal-body ${e}`,...t,children:r}),Bo=({children:r,className:e="",...t})=>p.jsx("div",{className:`modal-footer ${e}`,...t,children:r}),$o=({children:r,className:e="",...t})=>(L.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}),[]),en.createPortal(p.jsx("div",{className:"modal",...t,children:p.jsx("div",{className:`modal-dialog ${e}`,children:r})}),document.body)),Xc=({labelIcon:r,label:e="Confirmation",message:t,onCancel:n,onConfirm:s})=>p.jsxs($o,{className:"modal-sm",children:[p.jsxs(Mo,{className:"bg-danger",children:[p.jsxs("div",{className:"modal-header-title",children:[r||p.jsx(ui,{className:"icon"}),p.jsx("span",{children:e})]}),p.jsx("div",{className:"tools",children:p.jsx(Lo,{className:"icon",onClick:n})})]}),p.jsx(Po,{children:p.jsx("p",{children:t})}),p.jsxs(Bo,{className:"justify-content-space-between",children:[p.jsxs(ze,{type:"button",className:"btn btn-default",onClick:n,children:[p.jsx(Cc,{})," Batalkan"]}),p.jsxs(ze,{type:"button",className:"btn btn-primary",onClick:s,children:[p.jsx(ui,{})," Konfirmasi"]})]})]}),Zc=({className:r="",type:e,title:t,text:n})=>p.jsxs("div",{className:`callout ${e} ${r}`,children:[t&&p.jsx("h5",{children:t}),typeof n=="string"?p.jsx("p",{children:n}):n]}),Jc=({children:r,text:e,position:t="top",className:n="",offset:s=5})=>{const[i,a]=L.useState(!1),[l,c]=L.useState({top:0,left:0}),u=L.useRef(null),h=L.useRef(null);return L.useEffect(()=>{if(i&&u.current&&h.current){const g=u.current.getBoundingClientRect(),f=h.current.getBoundingClientRect(),{scrollX:b,scrollY:x}=window;let y=0,N=0;switch(t){case"top":y=g.top-f.height-s,N=g.left+(g.width-f.width)/2;break;case"bottom":y=g.bottom+s,N=g.left+(g.width-f.width)/2;break;case"left":y=g.top+(g.height-f.height)/2,N=g.left-f.width-s;break;case"right":y=g.top+(g.height-f.height)/2,N=g.right+s;break}c({top:Math.round(y+x),left:Math.round(N+b)})}},[i,t,s]),p.jsxs("div",{ref:u,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[r,i&&en.createPortal(p.jsx("div",{ref:h,style:{position:"absolute",top:`${l.top}px`,left:`${l.left}px`},className:`tooltip ${t} ${n}`,children:e}),document.body)]})},Qc=({className:r,children:e,text:t})=>{const[n,s]=L.useState(!1),[i,a]=L.useState({top:0,left:0}),l=L.useRef(null),c=L.useRef(null);Pt([l,c],()=>{s(!1)}),L.useEffect(()=>{if(n&&l.current&&c.current){const h=l.current.getBoundingClientRect(),g=c.current.getBoundingClientRect(),{scrollX:f,scrollY:b}=window;let x=0,y=0;r.includes("top")?(x=h.top-g.height-10,y=h.left+(h.width-g.width)/2):r.includes("bottom")?(x=h.bottom+10,y=h.left+(h.width-g.width)/2):r.includes("left")?(x=h.top+(h.height-g.height)/2,y=h.left-g.width-10):r.includes("right")&&(x=h.top+(h.height-g.height)/2,y=h.right+10),a({top:Math.round(x+b),left:Math.round(y+f)})}},[n,r]);function u(){s(!n)}return p.jsxs("div",{ref:l,onClick:u,children:[e,n&&en.createPortal(p.jsxs("div",{ref:c,className:`popover ${r}`,role:"tooltip",style:{position:"absolute",top:`${i.top}px`,left:`${i.left}px`},children:[p.jsx("div",{className:"arrow"}),p.jsx("div",{className:"popover-content",children:t})]}),document.body)]})};function eu(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM9 14H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-8 4H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2z"},child:[]}]})(r)}function tu(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"},child:[]}]})(r)}function ru(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"},child:[]}]})(r)}function nu(r){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M24 24H0V0h24v24z",opacity:".87"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"},child:[]}]})(r)}const su=({defaultIndex:r=0,children:e})=>{const[t,n]=L.useState(r),s=i=>{n(i===t?null:i)};return p.jsx("div",{className:"panel-group",children:L.Children.map(e,(i,a)=>L.cloneElement(i,{isOpen:t===a,onClick:()=>s(a)}))})},iu=({title:r,titleIcon:e,children:t,isOpen:n=!1,onClick:s})=>{const i=L.Children.toArray(t).find(l=>l.type===Fo),a=L.Children.toArray(t).find(l=>l.type===Uo);return p.jsxs("div",{className:"card mb-10",children:[p.jsxs("div",{className:"card-header",role:"button",tabIndex:0,onClick:s,onKeyDown:s,children:[p.jsxs("div",{className:"card-header-title",children:[e," ",r]}),p.jsx("div",{className:"tools",children:p.jsx(nu,{className:`menu-caret ${n?"active":""}`})})]}),n&&p.jsxs("div",{className:"panel active",children:[i,a]})]})},Fo=({className:r="",children:e})=>p.jsx("div",{className:`card-body ${r}`,children:e}),Uo=({className:r="",children:e})=>p.jsx("div",{className:`card-footer ${r}`,children:e}),au=({size:r=40,className:e="",color:t})=>p.jsx("span",{className:`circular-progress ${e} ${t?`brand-${t}`:""}`,style:{width:`${r}px`,height:`${r}px`}}),ou=({showLabel:r=!1,progress:e=0,className:t="",color:n})=>{const s=t.includes("indeterminate");return p.jsxs("div",{className:`linear-progress ${t}`,children:[p.jsx("div",{className:`progress-bar ${n?`brand-${n}`:""}`,children:p.jsx("span",{className:"progress",style:{width:`${e}%`}})}),r&&!s&&p.jsxs("span",{className:"progress-label",children:[e,"%"]})]})},lu=({progress:r=0,size:e=40,className:t="",color:n,strokeWidth:s=4})=>{const[i,a]=L.useState(0);return L.useEffect(()=>{if(i<r){const l=setTimeout(()=>{a(i+1)},10);return()=>clearTimeout(l)}},[i,r]),p.jsxs("div",{className:`circular-progress-with-label ${t}`,children:[p.jsx("span",{className:`progress ${n?`brand-${n}`:""}`,style:{width:`${e}px`,height:`${e}px`,borderWidth:`${s}px`,background:n?`radial-gradient(closest-side, var(--secondary-bg) 79%, transparent 80% 100%), conic-gradient(var(--brand-${n}) ${i}%, var(--primary-bg) 0)`:`radial-gradient(closest-side, var(--secondary-bg) 79%, transparent 80% 100%), conic-gradient(#888 ${i}%, var(--primary-bg) 0)`}}),p.jsxs("span",{className:"progress-label",children:[i,"%"]})]})},ye=[];for(let r=0;r<256;++r)ye.push((r+256).toString(16).slice(1));function cu(r,e=0){return(ye[r[e+0]]+ye[r[e+1]]+ye[r[e+2]]+ye[r[e+3]]+"-"+ye[r[e+4]]+ye[r[e+5]]+"-"+ye[r[e+6]]+ye[r[e+7]]+"-"+ye[r[e+8]]+ye[r[e+9]]+"-"+ye[r[e+10]]+ye[r[e+11]]+ye[r[e+12]]+ye[r[e+13]]+ye[r[e+14]]+ye[r[e+15]]).toLowerCase()}let Ks;const uu=new Uint8Array(16);function hu(){if(!Ks){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ks=crypto.getRandomValues.bind(crypto)}return Ks(uu)}const du=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xa={randomUUID:du};function Ho(r,e,t){if(xa.randomUUID&&!r)return xa.randomUUID();r=r||{};const n=r.random??r.rng?.()??hu();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,cu(n)}const Oi=L.forwardRef(({name:r,label:e,message:t,error:n,checked:s=!1,onChange:i,...a},l)=>{const c=Ho(),u=h=>{i(h)};return p.jsxs(p.Fragment,{children:[p.jsxs("label",{className:"custom-checkbox",htmlFor:c,children:[p.jsx("input",{className:"form-control",type:"checkbox",id:c,name:r,ref:l,role:"checkbox",checked:s,onChange:u,...a}),p.jsx("span",{className:"checkmark"}),e&&p.jsx("span",{className:a.required?"required":"",children:e})]}),n?p.jsx("small",{className:"form-message text-danger",children:n}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Oi.displayName="Checkbox";const fu=({children:r})=>p.jsx("div",{className:"form",children:r}),pu=({className:r="",children:e})=>p.jsx("div",{className:`form-group ${r}`,children:e}),gu=({className:r="",children:e})=>p.jsx("div",{className:`form-checkbox ${r}`,children:e}),mu=({className:r="",children:e})=>p.jsx("div",{className:`form-radio ${r}`,children:e}),Ri=(r,e)=>{L.useEffect(()=>{if(r&&e.current){const t=e.current.getBoundingClientRect(),n=window.innerHeight;t.bottom>n?e.current.classList.add("position-top"):e.current.classList.remove("position-top");const s=e.current.querySelector(".option.selected");s&&s.scrollIntoView({block:"nearest"})}},[r,e])},yt=L.forwardRef((r,e)=>{const{name:t,label:n,message:s,selectLabel:i="Select an option",size:a="md",floatingLabel:l=!1,error:c,options:u,value:h="",onChange:g,onBlur:f,required:b,disabled:x}=r,[y,N]=L.useState(!1),S=L.useRef(null),_=L.useRef(null),j=L.useRef(null),$=u.find(T=>T.value===h)?.label??i;L.useImperativeHandle(e,()=>j.current),L.useEffect(()=>N(!1),[]),Pt([S],()=>{N(!1),j.current?.blur()}),Ri(y,_);const m=T=>{const k=u.find(te=>te.value===T);if(!k)return;const P=k.value;if(g?.({target:{name:t,value:P,type:"select-one"},currentTarget:{name:t,value:P}}),j.current){j.current.value=String(P);const te=new CustomEvent("change",{bubbles:!0,detail:{originalValue:P}});j.current.dispatchEvent(te)}N(!1)};return p.jsxs(p.Fragment,{children:[p.jsxs("select",{ref:j,name:t,value:h!=null&&!Number.isNaN(h)?h:"",onChange:g,onBlur:f,required:b,disabled:x,style:{position:"absolute",left:"-9999px"},tabIndex:-1,children:[p.jsx("option",{value:"",children:"Select an option"}),u.map(T=>p.jsx("option",{value:String(T.value),children:T.label},T.value))]}),n&&!l&&p.jsxs("label",{htmlFor:t,children:[n," ",b&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:`dropdown-select-container ${a}`,ref:S,children:[p.jsxs("div",{className:`dropdown-header ${y?"open":""} ${x?"disabled":""}`,onClick:()=>!x&&N(!y),"aria-haspopup":"listbox","aria-expanded":y,children:[p.jsx("span",{className:"label",children:$}),p.jsx(Ci,{className:"arrow"})]}),y&&p.jsx("div",{className:"dropdown-options scrollbar",ref:_,role:"listbox",children:u.map(T=>p.jsx("div",{className:`option ${T.value===h?"selected":""}`,onClick:()=>m(T.value),role:"option","aria-selected":T.value===h,children:T.label},T.value))})]}),n&&l&&p.jsxs("label",{htmlFor:t,children:[n," ",b&&p.jsx("span",{className:"text-danger",children:"*"})]}),c?p.jsx("small",{className:"form-message text-danger",children:c}):s&&p.jsx("small",{className:"form-message text-muted",children:s})]})});yt.displayName="Select";const bu=r=>{const[e,t]=L.useState(!1);return L.useEffect(()=>{const n=()=>{if(!r.current)return;const{top:i,height:a}=r.current.getBoundingClientRect(),l=window.innerHeight;t(i+a>l)};n();const s=()=>{n()};return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[r]),e},zo=r=>{const e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return`${e}-${t}-${n}`},vu=r=>r.toLocaleDateString("id-ID",{timeZone:"Asia/Jakarta",year:"numeric",month:"long",day:"numeric"}),Wr=(r,e)=>Array.from({length:r},(t,n)=>e(n)),On=(r,e)=>{const t=new Date(e,r,1).getDay(),n=new Date(e,r+1,0).getDate(),s=Wr(t,()=>({value:"",label:""})),i=Wr(n,a=>({value:(a+1).toString(),label:(a+1).toString()}));return[...s,...i]},yu=(r,e)=>{const t=new Date(e,r+1,0).getDate();return Wr(t,n=>({value:(n+1).toString(),label:(n+1).toString()}))},Go=(r="id-ID")=>Wr(12,e=>({value:(e+1).toString(),label:new Date(2024,e,1).toLocaleString(r,{month:"long"})})),Vo=()=>{const r=new Date().getFullYear(),e=r-60,n=r+20-e+1;return Wr(n,s=>{const i=e+s;return{value:i.toString(),label:i.toString()}})},wa=r=>{const e=new Date(r);return e instanceof Date&&!isNaN(e.getTime())},Eu=["Min","Sen","Sel","Rab","Kam","Jum","Sab"],xu=r=>{const[e,t]=L.useState(r);return{selectedDate:e,handlePrevMonth:()=>{const c=new Date(e);c.setMonth(e.getMonth()-1),t(c)},handleNextMonth:()=>{const c=new Date(e);c.setMonth(e.getMonth()+1),t(c)},handleDateClick:(c,u,h,g)=>{const f=new Date(parseInt(h,10),parseInt(u,10),parseInt(c,10));t(f),g(zo(f))},isSelectedDate:(c,u,h)=>parseInt(h,10)===e.getFullYear()&&parseInt(u,10)===e.getMonth()+1&&parseInt(c,10)===e.getDate(),setDate:c=>{t(c)}}},Wo=({onSelect:r,defaultDate:e,full:t=!1})=>{const n=L.useRef(null),s=bu(n),i=wa(e)?new Date(e):new Date,{selectedDate:a,handlePrevMonth:l,handleNextMonth:c,handleDateClick:u,isSelectedDate:h,setDate:g}=xu(i),[f,b]=L.useState(On(i.getMonth(),i.getFullYear()));L.useEffect(()=>{if(e&&wa(e)){const y=new Date(e);g(y)}},[e,g]),L.useEffect(()=>{b(On(a.getMonth(),a.getFullYear()))},[a]);const x=(y,N)=>{const S=parseInt(y,10),_=S+1;return f.map((j,$)=>j.value!==""?p.jsx("div",{className:`calendar-day ${h(j.value,_.toString(),N)?"selected-date":""}`,onClick:()=>{const m=new Date(parseInt(N,10),S,parseInt(j.value,10)),T=t?vu(m):zo(m);u(j.value,y,N,()=>r(T))},children:j.label},`day-${$}`):p.jsx("div",{className:"calendar-day empty"},`day-${$}`))};return p.jsxs("div",{className:`date-picker ${s?"position-top":""}`,ref:n,children:[p.jsxs("div",{className:"calendar-nav",children:[p.jsx("button",{type:"button",className:"btn btn-rounded",onClick:l,children:p.jsx(tu,{})}),p.jsxs("div",{className:"calendar-select",children:[p.jsx(yt,{name:"month",size:"md",options:Go(),value:(a.getMonth()+1).toString(),onChange:y=>{const N=parseInt(y.target.value,10)-1,S=new Date(a.getFullYear(),N,a.getDate());g(S),b(On(N,S.getFullYear()))}}),p.jsx(yt,{name:"year",size:"md",options:Vo(),value:a.getFullYear().toString(),onChange:y=>{const N=parseInt(y.target.value,10),S=new Date(N,a.getMonth(),a.getDate());g(S),b(On(S.getMonth(),N))}})]}),p.jsx("button",{type:"button",className:"btn btn-rounded",onClick:c,children:p.jsx(ru,{})})]}),p.jsxs("div",{className:"calendar",children:[p.jsx("div",{className:"calendar-header",children:Eu.map((y,N)=>p.jsx("div",{className:"calendar-day-name",children:y},`day-${N}`))}),p.jsx("div",{className:"calendar-body",children:x(a.getMonth().toString(),a.getFullYear().toString())})]})]})},Ko=L.forwardRef(({name:r,label:e,message:t,floatingLabel:n,locale:s="id",error:i,value:a,...l},c)=>{const u=_=>{if(!_)return new Date;const j=new Date(_);return isNaN(j.getTime())?new Date:j},h=u(a),[g,f]=L.useState({day:h.getDate(),month:h.getMonth()+1,year:h.getFullYear()});L.useEffect(()=>{if(a){const _=u(a);f({day:_.getDate(),month:_.getMonth()+1,year:_.getFullYear()})}},[a]),L.useEffect(()=>{const _=new Date(g.year,g.month,0).getDate();g.day>_&&f(j=>({...j,day:_}))},[g.month,g.year]);const b=(_,j)=>{const $=parseInt(j,10);if(isNaN($))return;const m={...g,[_]:$};if(f(m),l.onChange){const T=`${m.year}-${String(m.month).padStart(2,"0")}-${String(m.day).padStart(2,"0")}`;l.onChange({target:{name:r,value:T}})}},x=L.useMemo(()=>yu(g.month-1,g.year),[g.month,g.year]),y=L.useMemo(()=>Go(s),[s]),N=L.useMemo(()=>Vo(),[]),S=p.jsxs("label",{htmlFor:r,children:[e," ",l.required&&p.jsx("span",{className:"text-danger",children:"*"})]});return p.jsxs(p.Fragment,{children:[!n&&S,p.jsxs("div",{className:"row",ref:c,children:[p.jsx("div",{className:"col-md-3",children:p.jsx(yt,{name:`${r}-day`,disabled:l.disabled,options:x,value:g.day.toString(),onChange:_=>b("day",_.target.value),"aria-label":"Day"})}),p.jsx("div",{className:"col-md-5",children:p.jsx(yt,{name:`${r}-month`,disabled:l.disabled,options:y,value:g.month.toString(),onChange:_=>b("month",_.target.value),"aria-label":"Month"})}),p.jsx("div",{className:"col-md-4",children:p.jsx(yt,{name:`${r}-year`,disabled:l.disabled,options:N,value:g.year.toString(),onChange:_=>b("year",_.target.value),"aria-label":"Year"})})]}),n&&S,i?p.jsx("small",{className:"form-message text-danger",children:i}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Ko.displayName="DropdownDatePicker";const wu=({type:r="text",className:e,...t})=>p.jsx("input",{type:r,className:`clear ${e}`,...t}),Yo=L.forwardRef(({className:r,name:e,label:t,message:n,floatingLabel:s,error:i,...a},l)=>p.jsxs(p.Fragment,{children:[!s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",a.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("input",{type:"text",className:`form-control ${r}`,id:e,name:e,placeholder:s?"":" ",ref:l,...a}),s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",a.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):n&&p.jsx("small",{className:"form-message text-muted",children:n})]})),Nu=L.forwardRef(({className:r,name:e,label:t,message:n,floatingLabel:s,error:i,actionIcon:a,actionButtonLabel:l,actionButtonHandler:c,...u},h)=>p.jsxs(p.Fragment,{children:[!s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",u.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:"input-group-icon",children:[p.jsx("input",{type:"text",className:`form-control pr-35 ${r}`,id:e,name:e,placeholder:s?"":" ",ref:h,...u}),a&&p.jsx(ze,{role:"button",className:"icon",onClick:c,tabIndex:0,"aria-label":l,disabled:u.disabled,children:a})]}),s&&t&&p.jsxs("label",{htmlFor:e,children:[t," ",u.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):n&&p.jsx("small",{className:"form-message text-muted",children:n})]})),Xo=L.forwardRef(({name:r,label:e,message:t,floatingLabel:n,full:s,error:i,onChange:a,value:l,...c},u)=>{const[h,g]=L.useState(!1),f=L.useRef(null),b=L.useRef(null);L.useImperativeHandle(u,()=>f.current),L.useEffect(()=>{l!==void 0&&f.current&&(f.current.value=l)},[l]);const x=y=>{f.current&&(f.current.value=y,a?.({target:f.current,currentTarget:f.current}),g(!1))};return Pt([b],()=>g(!1)),p.jsxs(p.Fragment,{children:[!n&&p.jsxs("label",{htmlFor:r,children:[e," ",c.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:"input-group-icon",children:[p.jsx("input",{type:"text",className:"form-control",id:r,name:r,placeholder:n?"":" ",ref:f,onChange:a,...c}),p.jsx(ze,{role:"button",className:"icon",onClick:y=>{y.stopPropagation(),g(N=>!N)},"aria-label":"Open date picker",disabled:c.disabled,children:p.jsx(eu,{})})]}),p.jsx("div",{ref:b,className:`date-picker-container ${h?"show":"hide"}`,style:{display:h?"block":"none"},children:p.jsx(Wo,{full:s,onSelect:x,defaultDate:l||void 0})}),n&&p.jsxs("label",{htmlFor:r,children:[e," ",c.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Xo.displayName="InputDate";const Zo=L.forwardRef(({name:r,label:e,message:t,accept:n,error:s,onChange:i,...a},l)=>{const c=u=>{i&&i(u)};return p.jsxs("div",{className:"form-group",children:[e&&p.jsxs("label",{htmlFor:r,children:[e," ",a.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("input",{type:"file",className:"form-control",id:r,name:r,accept:n,onChange:c,ref:l,...a}),s?p.jsx("small",{className:"form-message text-danger",children:s}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});Zo.displayName="InputFile";const Tu=()=>p.jsx("div",{children:"InputImageSize"}),Jo=L.forwardRef(({name:r,label:e,message:t,floatingLabel:n,error:s,...i},a)=>p.jsxs(p.Fragment,{children:[!n&&p.jsxs("label",{htmlFor:r,children:[e," ",i.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("textarea",{className:"form-control",id:r,name:r,placeholder:n?"":" ",ref:a,...i}),n&&p.jsxs("label",{htmlFor:r,children:[e," ",i.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),s?p.jsx("small",{className:"form-message text-danger",children:s}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]}));Jo.displayName="InputTextArea";const Au=L.forwardRef(({name:r,label:e,message:t,options:n,error:s,...i},a)=>p.jsxs(p.Fragment,{children:[e&&p.jsxs("label",{htmlFor:r,children:[e," ",i.required&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("div",{className:"form-control",children:n.map(l=>{const c=`${Ho()}-${l.value}`;return p.jsxs("div",{className:"d-flex align-items-center",children:[p.jsx("input",{type:"radio",id:c,name:r,value:l.value,ref:a,...i}),p.jsx("label",{htmlFor:c,children:l.label})]},l.value)})}),s?p.jsx("small",{className:"form-message text-danger",children:s}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})),Qo=L.forwardRef(({name:r,label:e,message:t,size:n="md",options:s,selectedValue:i,error:a,required:l,...c},u)=>p.jsxs(p.Fragment,{children:[e&&p.jsxs("label",{htmlFor:r,children:[e," ",l&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsx("div",{className:"btn-group","data-toggle":"buttons",children:s.map(h=>{const g=h.value.toString()===i?.toString();return p.jsxs("label",{className:`btn auto btn-default btn-${n} ${g?"active":""}`,children:[p.jsx("input",{type:"radio",id:h.value.toString(),name:r,value:h.value.toString(),ref:u,...c}),p.jsx("span",{children:h.label})]},h.value.toString())})}),a?p.jsx("small",{className:"form-message text-danger",children:a}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]}));Qo.displayName="RadioButtonGroup";const el=L.forwardRef(({name:r,label:e,message:t,selectLabel:n,floatingLabel:s=!1,error:i,options:a,value:l=[],onChange:c,required:u,disabled:h,className:g},f)=>{const[b,x]=L.useState(!1),[y,N]=L.useState(l),S=L.useRef(null),_=L.useRef(null);L.useEffect(()=>{JSON.stringify(l)!==JSON.stringify(y)&&N(l)},[y,l]);const j=m=>{const T=y.includes(m)?y.filter(k=>k!==m):[...y,m];N(T),c&&c({target:{name:r,value:T}})};Pt([S],()=>{x(!1)}),Ri(b,_);const $=y.map(m=>a.find(T=>T.value===m)?.label).filter(Boolean).join(", ");return p.jsxs(p.Fragment,{children:[e&&!s&&p.jsxs("label",{htmlFor:r,children:[e," ",u&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:`dropdown-select-container ${g||""}`,ref:S,children:[p.jsxs("div",{className:`dropdown-header ${b?"open":""} ${h?"disabled":""}`,onClick:()=>!h&&x(!b),ref:f,children:[p.jsx("span",{className:"label",children:$||n||"Select an option"}),p.jsx(Ci,{className:`arrow ${b?"open":""}`})]}),b&&!h&&p.jsx("div",{className:"dropdown-options scrollbar",ref:_,role:"listbox",children:a?.map(m=>p.jsx("div",{className:`option ${y.includes(m.value)?"selected":""}`,children:p.jsx(Oi,{name:m.value.toString(),label:m.label,checked:y.includes(m.value),onChange:()=>j(m.value)})},m.value))})]}),e&&s&&p.jsxs("label",{htmlFor:r,children:[e," ",u&&p.jsx("span",{className:"text-danger",children:"*"})]}),i?p.jsx("small",{className:"form-message text-danger",children:i}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})});el.displayName="SelectMultiple";const tl=L.forwardRef((r,e)=>{const{name:t,label:n,message:s,selectLabel:i="Select an option",size:a="md",floatingLabel:l=!1,error:c,options:u=[],value:h="",onChange:g,required:f,disabled:b,selectSearch:x="",setSelectSearch:y,isLoading:N=!1}=r,[S,_]=L.useState(!1),j=L.useRef(null),$=L.useRef(null),m=L.useRef(null);L.useImperativeHandle(e,()=>m.current),Pt([j],()=>_(!1)),Ri(S,$);const T=h?u.find(P=>P.value===h)?.label:i,k=P=>{g?.({target:{name:t,value:P}}),m.current&&(m.current.value=String(P),m.current.dispatchEvent(new Event("change",{bubbles:!0}))),_(!1)};return p.jsxs(p.Fragment,{children:[p.jsxs("select",{ref:m,name:t,value:h,onChange:g,style:{position:"absolute",left:"-9999px"},tabIndex:-1,children:[p.jsx("option",{value:"",children:"Select an option"}),u.map(P=>p.jsx("option",{value:P.value,children:P.label},P.value))]}),n&&!l&&p.jsxs("label",{htmlFor:t,children:[n," ",f&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:`dropdown-select-container ${a}`,ref:j,children:[p.jsxs("div",{className:`dropdown-header ${S?"open":""} ${b?"disabled":""}`,onClick:()=>!b&&_(!S),"aria-haspopup":"listbox","aria-expanded":S,children:[p.jsx("span",{className:"label",children:T}),p.jsx(Ci,{className:"arrow"})]}),S&&p.jsxs("div",{className:"dropdown-options scrollbar",ref:$,role:"listbox",children:[p.jsx("div",{className:"search-input",children:p.jsx(Yo,{name:"search",placeholder:"Ketik untuk mencari..",type:"search",autoFocus:!0,value:x,onChange:P=>y?.(P.currentTarget.value)})}),N?p.jsx("div",{className:"p-10 text-center",children:"Loading options..."}):u.length===0?p.jsx("div",{className:"p-10 text-center",children:"Tidak ada hasil ditemukan"}):u.map(P=>p.jsx("div",{className:`option ${h===P.value?"selected":""}`,onClick:()=>k(P.value),role:"option","aria-selected":h===P.value,children:P.label},P.value))]})]}),n&&l&&p.jsxs("label",{htmlFor:t,children:[n," ",f&&p.jsx("span",{className:"text-danger",children:"*"})]}),c?p.jsx("small",{className:"form-message text-danger",children:c}):s&&p.jsx("small",{className:"form-message text-muted",children:s})]})});tl.displayName="SelectWithSearch";const rl=L.forwardRef(({name:r,className:e="",error:t,checked:n=!1,onChange:s,...i},a)=>{const l=c=>{s&&s(c)};return p.jsx(p.Fragment,{children:p.jsxs("label",{className:`switch ${e} ${t?"has-error":""}`,children:[p.jsx("input",{type:"checkbox",id:r,name:r,ref:a,checked:n,onChange:l,disabled:i.disabled,...i}),p.jsx("span",{className:"slider round"})]})})});rl.displayName="Switch";var nl=typeof global=="object"&&global&&global.Object===Object&&global,Su=typeof self=="object"&&self&&self.Object===Object&&self,tt=nl||Su||Function("return this")(),wt=tt.Symbol,sl=Object.prototype,_u=sl.hasOwnProperty,Cu=sl.toString,$r=wt?wt.toStringTag:void 0;function Ou(r){var e=_u.call(r,$r),t=r[$r];try{r[$r]=void 0;var n=!0}catch{}var s=Cu.call(r);return n&&(e?r[$r]=t:delete r[$r]),s}var Ru=Object.prototype,Lu=Ru.toString;function ku(r){return Lu.call(r)}var ju="[object Null]",Iu="[object Undefined]",Na=wt?wt.toStringTag:void 0;function gr(r){return r==null?r===void 0?Iu:ju:Na&&Na in Object(r)?Ou(r):ku(r)}function ct(r){return r!=null&&typeof r=="object"}var It=Array.isArray;function Nt(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}function il(r){return r}var qu="[object AsyncFunction]",Du="[object Function]",Mu="[object GeneratorFunction]",Pu="[object Proxy]";function Li(r){if(!Nt(r))return!1;var e=gr(r);return e==Du||e==Mu||e==qu||e==Pu}var Ys=tt["__core-js_shared__"],Ta=function(){var r=/[^.]+$/.exec(Ys&&Ys.keys&&Ys.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Bu(r){return!!Ta&&Ta in r}var $u=Function.prototype,Fu=$u.toString;function Bt(r){if(r!=null){try{return Fu.call(r)}catch{}try{return r+""}catch{}}return""}var Uu=/[\\^$.*+?()[\]{}|]/g,Hu=/^\[object .+?Constructor\]$/,zu=Function.prototype,Gu=Object.prototype,Vu=zu.toString,Wu=Gu.hasOwnProperty,Ku=RegExp("^"+Vu.call(Wu).replace(Uu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Yu(r){if(!Nt(r)||Bu(r))return!1;var e=Li(r)?Ku:Hu;return e.test(Bt(r))}function Xu(r,e){return r?.[e]}function $t(r,e){var t=Xu(r,e);return Yu(t)?t:void 0}var hi=$t(tt,"WeakMap"),Aa=Object.create,Zu=function(){function r(){}return function(e){if(!Nt(e))return{};if(Aa)return Aa(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();function Ju(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}function Qu(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var eh=800,th=16,rh=Date.now;function nh(r){var e=0,t=0;return function(){var n=rh(),s=th-(n-t);if(t=n,s>0){if(++e>=eh)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}function sh(r){return function(){return r}}var Hn=function(){try{var r=$t(Object,"defineProperty");return r({},"",{}),r}catch{}}(),ih=Hn?function(r,e){return Hn(r,"toString",{configurable:!0,enumerable:!1,value:sh(e),writable:!0})}:il,ah=nh(ih);function oh(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var lh=9007199254740991,ch=/^(?:0|[1-9]\d*)$/;function al(r,e){var t=typeof r;return e=e??lh,!!e&&(t=="number"||t!="symbol"&&ch.test(r))&&r>-1&&r%1==0&&r<e}function ki(r,e,t){e=="__proto__"&&Hn?Hn(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}function tn(r,e){return r===e||r!==r&&e!==e}var uh=Object.prototype,hh=uh.hasOwnProperty;function ol(r,e,t){var n=r[e];(!(hh.call(r,e)&&tn(n,t))||t===void 0&&!(e in r))&&ki(r,e,t)}function dh(r,e,t,n){var s=!t;t||(t={});for(var i=-1,a=e.length;++i<a;){var l=e[i],c=void 0;c===void 0&&(c=r[l]),s?ki(t,l,c):ol(t,l,c)}return t}var Sa=Math.max;function fh(r,e,t){return e=Sa(e===void 0?r.length-1:e,0),function(){for(var n=arguments,s=-1,i=Sa(n.length-e,0),a=Array(i);++s<i;)a[s]=n[e+s];s=-1;for(var l=Array(e+1);++s<e;)l[s]=n[s];return l[e]=t(a),Ju(r,this,l)}}function ph(r,e){return ah(fh(r,e,il),r+"")}var gh=9007199254740991;function ll(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=gh}function Yn(r){return r!=null&&ll(r.length)&&!Li(r)}function mh(r,e,t){if(!Nt(t))return!1;var n=typeof e;return(n=="number"?Yn(t)&&al(e,t.length):n=="string"&&e in t)?tn(t[e],r):!1}function bh(r){return ph(function(e,t){var n=-1,s=t.length,i=s>1?t[s-1]:void 0,a=s>2?t[2]:void 0;for(i=r.length>3&&typeof i=="function"?(s--,i):void 0,a&&mh(t[0],t[1],a)&&(i=s<3?void 0:i,s=1),e=Object(e);++n<s;){var l=t[n];l&&r(e,l,n,i)}return e})}var vh=Object.prototype;function ji(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||vh;return r===t}function yh(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var Eh="[object Arguments]";function _a(r){return ct(r)&&gr(r)==Eh}var cl=Object.prototype,xh=cl.hasOwnProperty,wh=cl.propertyIsEnumerable,di=_a(function(){return arguments}())?_a:function(r){return ct(r)&&xh.call(r,"callee")&&!wh.call(r,"callee")};function Nh(){return!1}var ul=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ca=ul&&typeof module=="object"&&module&&!module.nodeType&&module,Th=Ca&&Ca.exports===ul,Oa=Th?tt.Buffer:void 0,Ah=Oa?Oa.isBuffer:void 0,Kr=Ah||Nh,Sh="[object Arguments]",_h="[object Array]",Ch="[object Boolean]",Oh="[object Date]",Rh="[object Error]",Lh="[object Function]",kh="[object Map]",jh="[object Number]",Ih="[object Object]",qh="[object RegExp]",Dh="[object Set]",Mh="[object String]",Ph="[object WeakMap]",Bh="[object ArrayBuffer]",$h="[object DataView]",Fh="[object Float32Array]",Uh="[object Float64Array]",Hh="[object Int8Array]",zh="[object Int16Array]",Gh="[object Int32Array]",Vh="[object Uint8Array]",Wh="[object Uint8ClampedArray]",Kh="[object Uint16Array]",Yh="[object Uint32Array]",fe={};fe[Fh]=fe[Uh]=fe[Hh]=fe[zh]=fe[Gh]=fe[Vh]=fe[Wh]=fe[Kh]=fe[Yh]=!0;fe[Sh]=fe[_h]=fe[Bh]=fe[Ch]=fe[$h]=fe[Oh]=fe[Rh]=fe[Lh]=fe[kh]=fe[jh]=fe[Ih]=fe[qh]=fe[Dh]=fe[Mh]=fe[Ph]=!1;function Xh(r){return ct(r)&&ll(r.length)&&!!fe[gr(r)]}function Ii(r){return function(e){return r(e)}}var hl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gr=hl&&typeof module=="object"&&module&&!module.nodeType&&module,Zh=Gr&&Gr.exports===hl,Xs=Zh&&nl.process,fr=function(){try{var r=Gr&&Gr.require&&Gr.require("util").types;return r||Xs&&Xs.binding&&Xs.binding("util")}catch{}}(),Ra=fr&&fr.isTypedArray,qi=Ra?Ii(Ra):Xh,Jh=Object.prototype,Qh=Jh.hasOwnProperty;function dl(r,e){var t=It(r),n=!t&&di(r),s=!t&&!n&&Kr(r),i=!t&&!n&&!s&&qi(r),a=t||n||s||i,l=a?yh(r.length,String):[],c=l.length;for(var u in r)(e||Qh.call(r,u))&&!(a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||al(u,c)))&&l.push(u);return l}function fl(r,e){return function(t){return r(e(t))}}var ed=fl(Object.keys,Object),td=Object.prototype,rd=td.hasOwnProperty;function nd(r){if(!ji(r))return ed(r);var e=[];for(var t in Object(r))rd.call(r,t)&&t!="constructor"&&e.push(t);return e}function sd(r){return Yn(r)?dl(r):nd(r)}function id(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var ad=Object.prototype,od=ad.hasOwnProperty;function ld(r){if(!Nt(r))return id(r);var e=ji(r),t=[];for(var n in r)n=="constructor"&&(e||!od.call(r,n))||t.push(n);return t}function pl(r){return Yn(r)?dl(r,!0):ld(r)}var Yr=$t(Object,"create");function cd(){this.__data__=Yr?Yr(null):{},this.size=0}function ud(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var hd="__lodash_hash_undefined__",dd=Object.prototype,fd=dd.hasOwnProperty;function pd(r){var e=this.__data__;if(Yr){var t=e[r];return t===hd?void 0:t}return fd.call(e,r)?e[r]:void 0}var gd=Object.prototype,md=gd.hasOwnProperty;function bd(r){var e=this.__data__;return Yr?e[r]!==void 0:md.call(e,r)}var vd="__lodash_hash_undefined__";function yd(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Yr&&e===void 0?vd:e,this}function qt(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}qt.prototype.clear=cd;qt.prototype.delete=ud;qt.prototype.get=pd;qt.prototype.has=bd;qt.prototype.set=yd;function Ed(){this.__data__=[],this.size=0}function Xn(r,e){for(var t=r.length;t--;)if(tn(r[t][0],e))return t;return-1}var xd=Array.prototype,wd=xd.splice;function Nd(r){var e=this.__data__,t=Xn(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():wd.call(e,t,1),--this.size,!0}function Td(r){var e=this.__data__,t=Xn(e,r);return t<0?void 0:e[t][1]}function Ad(r){return Xn(this.__data__,r)>-1}function Sd(r,e){var t=this.__data__,n=Xn(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}function ht(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}ht.prototype.clear=Ed;ht.prototype.delete=Nd;ht.prototype.get=Td;ht.prototype.has=Ad;ht.prototype.set=Sd;var Xr=$t(tt,"Map");function _d(){this.size=0,this.__data__={hash:new qt,map:new(Xr||ht),string:new qt}}function Cd(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}function Zn(r,e){var t=r.__data__;return Cd(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Od(r){var e=Zn(this,r).delete(r);return this.size-=e?1:0,e}function Rd(r){return Zn(this,r).get(r)}function Ld(r){return Zn(this,r).has(r)}function kd(r,e){var t=Zn(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}function Ft(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Ft.prototype.clear=_d;Ft.prototype.delete=Od;Ft.prototype.get=Rd;Ft.prototype.has=Ld;Ft.prototype.set=kd;function jd(r,e){for(var t=-1,n=e.length,s=r.length;++t<n;)r[s+t]=e[t];return r}var gl=fl(Object.getPrototypeOf,Object),Id="[object Object]",qd=Function.prototype,Dd=Object.prototype,ml=qd.toString,Md=Dd.hasOwnProperty,Pd=ml.call(Object);function Bd(r){if(!ct(r)||gr(r)!=Id)return!1;var e=gl(r);if(e===null)return!0;var t=Md.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&ml.call(t)==Pd}function $d(){this.__data__=new ht,this.size=0}function Fd(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}function Ud(r){return this.__data__.get(r)}function Hd(r){return this.__data__.has(r)}var zd=200;function Gd(r,e){var t=this.__data__;if(t instanceof ht){var n=t.__data__;if(!Xr||n.length<zd-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new Ft(n)}return t.set(r,e),this.size=t.size,this}function Qe(r){var e=this.__data__=new ht(r);this.size=e.size}Qe.prototype.clear=$d;Qe.prototype.delete=Fd;Qe.prototype.get=Ud;Qe.prototype.has=Hd;Qe.prototype.set=Gd;var bl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,La=bl&&typeof module=="object"&&module&&!module.nodeType&&module,Vd=La&&La.exports===bl,ka=Vd?tt.Buffer:void 0,ja=ka?ka.allocUnsafe:void 0;function vl(r,e){if(e)return r.slice();var t=r.length,n=ja?ja(t):new r.constructor(t);return r.copy(n),n}function Wd(r,e){for(var t=-1,n=r==null?0:r.length,s=0,i=[];++t<n;){var a=r[t];e(a,t,r)&&(i[s++]=a)}return i}function Kd(){return[]}var Yd=Object.prototype,Xd=Yd.propertyIsEnumerable,Ia=Object.getOwnPropertySymbols,Zd=Ia?function(r){return r==null?[]:(r=Object(r),Wd(Ia(r),function(e){return Xd.call(r,e)}))}:Kd;function Jd(r,e,t){var n=e(r);return It(r)?n:jd(n,t(r))}function fi(r){return Jd(r,sd,Zd)}var pi=$t(tt,"DataView"),gi=$t(tt,"Promise"),mi=$t(tt,"Set"),qa="[object Map]",Qd="[object Object]",Da="[object Promise]",Ma="[object Set]",Pa="[object WeakMap]",Ba="[object DataView]",ef=Bt(pi),tf=Bt(Xr),rf=Bt(gi),nf=Bt(mi),sf=Bt(hi),Ue=gr;(pi&&Ue(new pi(new ArrayBuffer(1)))!=Ba||Xr&&Ue(new Xr)!=qa||gi&&Ue(gi.resolve())!=Da||mi&&Ue(new mi)!=Ma||hi&&Ue(new hi)!=Pa)&&(Ue=function(r){var e=gr(r),t=e==Qd?r.constructor:void 0,n=t?Bt(t):"";if(n)switch(n){case ef:return Ba;case tf:return qa;case rf:return Da;case nf:return Ma;case sf:return Pa}return e});var af=Object.prototype,of=af.hasOwnProperty;function lf(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&of.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var zn=tt.Uint8Array;function Di(r){var e=new r.constructor(r.byteLength);return new zn(e).set(new zn(r)),e}function cf(r,e){var t=Di(r.buffer);return new r.constructor(t,r.byteOffset,r.byteLength)}var uf=/\w*$/;function hf(r){var e=new r.constructor(r.source,uf.exec(r));return e.lastIndex=r.lastIndex,e}var $a=wt?wt.prototype:void 0,Fa=$a?$a.valueOf:void 0;function df(r){return Fa?Object(Fa.call(r)):{}}function yl(r,e){var t=e?Di(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var ff="[object Boolean]",pf="[object Date]",gf="[object Map]",mf="[object Number]",bf="[object RegExp]",vf="[object Set]",yf="[object String]",Ef="[object Symbol]",xf="[object ArrayBuffer]",wf="[object DataView]",Nf="[object Float32Array]",Tf="[object Float64Array]",Af="[object Int8Array]",Sf="[object Int16Array]",_f="[object Int32Array]",Cf="[object Uint8Array]",Of="[object Uint8ClampedArray]",Rf="[object Uint16Array]",Lf="[object Uint32Array]";function kf(r,e,t){var n=r.constructor;switch(e){case xf:return Di(r);case ff:case pf:return new n(+r);case wf:return cf(r);case Nf:case Tf:case Af:case Sf:case _f:case Cf:case Of:case Rf:case Lf:return yl(r,t);case gf:return new n;case mf:case yf:return new n(r);case bf:return hf(r);case vf:return new n;case Ef:return df(r)}}function El(r){return typeof r.constructor=="function"&&!ji(r)?Zu(gl(r)):{}}var jf="[object Map]";function If(r){return ct(r)&&Ue(r)==jf}var Ua=fr&&fr.isMap,qf=Ua?Ii(Ua):If,Df="[object Set]";function Mf(r){return ct(r)&&Ue(r)==Df}var Ha=fr&&fr.isSet,Pf=Ha?Ii(Ha):Mf,Bf=1,xl="[object Arguments]",$f="[object Array]",Ff="[object Boolean]",Uf="[object Date]",Hf="[object Error]",wl="[object Function]",zf="[object GeneratorFunction]",Gf="[object Map]",Vf="[object Number]",Nl="[object Object]",Wf="[object RegExp]",Kf="[object Set]",Yf="[object String]",Xf="[object Symbol]",Zf="[object WeakMap]",Jf="[object ArrayBuffer]",Qf="[object DataView]",ep="[object Float32Array]",tp="[object Float64Array]",rp="[object Int8Array]",np="[object Int16Array]",sp="[object Int32Array]",ip="[object Uint8Array]",ap="[object Uint8ClampedArray]",op="[object Uint16Array]",lp="[object Uint32Array]",de={};de[xl]=de[$f]=de[Jf]=de[Qf]=de[Ff]=de[Uf]=de[ep]=de[tp]=de[rp]=de[np]=de[sp]=de[Gf]=de[Vf]=de[Nl]=de[Wf]=de[Kf]=de[Yf]=de[Xf]=de[ip]=de[ap]=de[op]=de[lp]=!0;de[Hf]=de[wl]=de[Zf]=!1;function $n(r,e,t,n,s,i){var a,l=e&Bf;if(a!==void 0)return a;if(!Nt(r))return r;var c=It(r);if(c)a=lf(r);else{var u=Ue(r),h=u==wl||u==zf;if(Kr(r))return vl(r,l);if(u==Nl||u==xl||h&&!s)a=h?{}:El(r);else{if(!de[u])return s?r:{};a=kf(r,u,l)}}i||(i=new Qe);var g=i.get(r);if(g)return g;i.set(r,a),Pf(r)?r.forEach(function(x){a.add($n(x,e,t,x,r,i))}):qf(r)&&r.forEach(function(x,y){a.set(y,$n(x,e,t,y,r,i))});var f=fi,b=c?void 0:f(r);return oh(b||r,function(x,y){b&&(y=x,x=r[y]),ol(a,y,$n(x,e,t,y,r,i))}),a}var cp=1,up=4;function ur(r){return $n(r,cp|up)}var hp="__lodash_hash_undefined__";function dp(r){return this.__data__.set(r,hp),this}function fp(r){return this.__data__.has(r)}function Gn(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new Ft;++e<t;)this.add(r[e])}Gn.prototype.add=Gn.prototype.push=dp;Gn.prototype.has=fp;function pp(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}function gp(r,e){return r.has(e)}var mp=1,bp=2;function Tl(r,e,t,n,s,i){var a=t&mp,l=r.length,c=e.length;if(l!=c&&!(a&&c>l))return!1;var u=i.get(r),h=i.get(e);if(u&&h)return u==e&&h==r;var g=-1,f=!0,b=t&bp?new Gn:void 0;for(i.set(r,e),i.set(e,r);++g<l;){var x=r[g],y=e[g];if(n)var N=a?n(y,x,g,e,r,i):n(x,y,g,r,e,i);if(N!==void 0){if(N)continue;f=!1;break}if(b){if(!pp(e,function(S,_){if(!gp(b,_)&&(x===S||s(x,S,t,n,i)))return b.push(_)})){f=!1;break}}else if(!(x===y||s(x,y,t,n,i))){f=!1;break}}return i.delete(r),i.delete(e),f}function vp(r){var e=-1,t=Array(r.size);return r.forEach(function(n,s){t[++e]=[s,n]}),t}function yp(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var Ep=1,xp=2,wp="[object Boolean]",Np="[object Date]",Tp="[object Error]",Ap="[object Map]",Sp="[object Number]",_p="[object RegExp]",Cp="[object Set]",Op="[object String]",Rp="[object Symbol]",Lp="[object ArrayBuffer]",kp="[object DataView]",za=wt?wt.prototype:void 0,Zs=za?za.valueOf:void 0;function jp(r,e,t,n,s,i,a){switch(t){case kp:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case Lp:return!(r.byteLength!=e.byteLength||!i(new zn(r),new zn(e)));case wp:case Np:case Sp:return tn(+r,+e);case Tp:return r.name==e.name&&r.message==e.message;case _p:case Op:return r==e+"";case Ap:var l=vp;case Cp:var c=n&Ep;if(l||(l=yp),r.size!=e.size&&!c)return!1;var u=a.get(r);if(u)return u==e;n|=xp,a.set(r,e);var h=Tl(l(r),l(e),n,s,i,a);return a.delete(r),h;case Rp:if(Zs)return Zs.call(r)==Zs.call(e)}return!1}var Ip=1,qp=Object.prototype,Dp=qp.hasOwnProperty;function Mp(r,e,t,n,s,i){var a=t&Ip,l=fi(r),c=l.length,u=fi(e),h=u.length;if(c!=h&&!a)return!1;for(var g=c;g--;){var f=l[g];if(!(a?f in e:Dp.call(e,f)))return!1}var b=i.get(r),x=i.get(e);if(b&&x)return b==e&&x==r;var y=!0;i.set(r,e),i.set(e,r);for(var N=a;++g<c;){f=l[g];var S=r[f],_=e[f];if(n)var j=a?n(_,S,f,e,r,i):n(S,_,f,r,e,i);if(!(j===void 0?S===_||s(S,_,t,n,i):j)){y=!1;break}N||(N=f=="constructor")}if(y&&!N){var $=r.constructor,m=e.constructor;$!=m&&"constructor"in r&&"constructor"in e&&!(typeof $=="function"&&$ instanceof $&&typeof m=="function"&&m instanceof m)&&(y=!1)}return i.delete(r),i.delete(e),y}var Pp=1,Ga="[object Arguments]",Va="[object Array]",Rn="[object Object]",Bp=Object.prototype,Wa=Bp.hasOwnProperty;function $p(r,e,t,n,s,i){var a=It(r),l=It(e),c=a?Va:Ue(r),u=l?Va:Ue(e);c=c==Ga?Rn:c,u=u==Ga?Rn:u;var h=c==Rn,g=u==Rn,f=c==u;if(f&&Kr(r)){if(!Kr(e))return!1;a=!0,h=!1}if(f&&!h)return i||(i=new Qe),a||qi(r)?Tl(r,e,t,n,s,i):jp(r,e,c,t,n,s,i);if(!(t&Pp)){var b=h&&Wa.call(r,"__wrapped__"),x=g&&Wa.call(e,"__wrapped__");if(b||x){var y=b?r.value():r,N=x?e.value():e;return i||(i=new Qe),s(y,N,t,n,i)}}return f?(i||(i=new Qe),Mp(r,e,t,n,s,i)):!1}function Al(r,e,t,n,s){return r===e?!0:r==null||e==null||!ct(r)&&!ct(e)?r!==r&&e!==e:$p(r,e,t,n,Al,s)}function Fp(r){return function(e,t,n){for(var s=-1,i=Object(e),a=n(e),l=a.length;l--;){var c=a[++s];if(t(i[c],c,i)===!1)break}return e}}var Up=Fp();function bi(r,e,t){(t!==void 0&&!tn(r[e],t)||t===void 0&&!(e in r))&&ki(r,e,t)}function Hp(r){return ct(r)&&Yn(r)}function vi(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}function zp(r){return dh(r,pl(r))}function Gp(r,e,t,n,s,i,a){var l=vi(r,t),c=vi(e,t),u=a.get(c);if(u){bi(r,t,u);return}var h=i?i(l,c,t+"",r,e,a):void 0,g=h===void 0;if(g){var f=It(c),b=!f&&Kr(c),x=!f&&!b&&qi(c);h=c,f||b||x?It(l)?h=l:Hp(l)?h=Qu(l):b?(g=!1,h=vl(c,!0)):x?(g=!1,h=yl(c,!0)):h=[]:Bd(c)||di(c)?(h=l,di(l)?h=zp(l):(!Nt(l)||Li(l))&&(h=El(c))):g=!1}g&&(a.set(c,h),s(h,c,n,i,a),a.delete(c)),bi(r,t,h)}function Sl(r,e,t,n,s){r!==e&&Up(e,function(i,a){if(s||(s=new Qe),Nt(i))Gp(r,e,a,t,Sl,n,s);else{var l=n?n(vi(r,a),i,a+"",r,e,s):void 0;l===void 0&&(l=i),bi(r,a,l)}},pl)}function mt(r,e){return Al(r,e)}var Et=bh(function(r,e,t){Sl(r,e,t)}),V=(r=>(r[r.TYPE=3]="TYPE",r[r.LEVEL=12]="LEVEL",r[r.ATTRIBUTE=13]="ATTRIBUTE",r[r.BLOT=14]="BLOT",r[r.INLINE=7]="INLINE",r[r.BLOCK=11]="BLOCK",r[r.BLOCK_BLOT=10]="BLOCK_BLOT",r[r.INLINE_BLOT=6]="INLINE_BLOT",r[r.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",r[r.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",r[r.ANY=15]="ANY",r))(V||{});class et{constructor(e,t,n={}){this.attrName=e,this.keyName=t;const s=V.TYPE&V.ATTRIBUTE;this.scope=n.scope!=null?n.scope&V.LEVEL|s:V.ATTRIBUTE,n.whitelist!=null&&(this.whitelist=n.whitelist)}static keys(e){return Array.from(e.attributes).map(t=>t.name)}add(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1}canAdd(e,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class hr extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const _l=class yi{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let n=null;try{n=e.parentNode}catch{return null}return this.find(n,t)}return null}create(e,t,n){const s=this.query(t);if(s==null)throw new hr(`Unable to create ${t} blot`);const i=s,a=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(n),l=new i(e,a,n);return yi.blots.set(l.domNode,l),l}find(e,t=!1){return yi.find(e,t)}query(e,t=V.ANY){let n;return typeof e=="string"?n=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?n=this.types.text:typeof e=="number"?e&V.LEVEL&V.BLOCK?n=this.types.block:e&V.LEVEL&V.INLINE&&(n=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(s=>(n=this.classes[s],!!n)),n=n||this.tags[e.tagName]),n==null?null:"scope"in n&&t&V.LEVEL&n.scope&&t&V.TYPE&n.scope?n:null}register(...e){return e.map(t=>{const n="blotName"in t,s="attrName"in t;if(!n&&!s)throw new hr("Invalid definition");if(n&&t.blotName==="abstract")throw new hr("Cannot register abstract class");const i=n?t.blotName:s?t.attrName:void 0;return this.types[i]=t,s?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):n&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(a=>a.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(a=>{(this.tags[a]==null||t.className==null)&&(this.tags[a]=t)}))),t})}};_l.blots=new WeakMap;let pr=_l;function Ka(r,e){return(r.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${e}-`)===0)}class Vp extends et{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0):!1}remove(e){Ka(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const t=(Ka(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}}const We=Vp;function Js(r){const e=r.split("-"),t=e.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("");return e[0]+t}class Wp extends et{static keys(e){return(e.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[Js(this.keyName)]=t,!0):!1}remove(e){e.style[Js(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[Js(this.keyName)];return this.canAdd(e,t)?t:""}}const Tt=Wp;class Kp{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=pr.find(this.domNode);if(e==null)return;const t=et.keys(this.domNode),n=We.keys(this.domNode),s=Tt.keys(this.domNode);t.concat(n).concat(s).forEach(i=>{const a=e.scroll.query(i,V.ATTRIBUTE);a instanceof et&&(this.attributes[a.attrName]=a)})}copy(e){Object.keys(this.attributes).forEach(t=>{const n=this.attributes[t].value(this.domNode);e.format(t,n)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}}const Jn=Kp,Cl=class{constructor(e,t){this.scroll=e,this.domNode=t,pr.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new hr("Blot definition missing tagName");let t,n;return Array.isArray(this.tagName)?(typeof e=="string"?(n=e.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):typeof e=="number"&&(n=e),typeof n=="number"?t=document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?t=document.createElement(n):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),pr.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,n,s){const i=this.isolate(e,t);if(this.scroll.query(n,V.BLOT)!=null&&s)i.wrap(n,s);else if(this.scroll.query(n,V.ATTRIBUTE)!=null){const a=this.scroll.create(this.statics.scope);i.wrap(a),a.format(n,s)}}insertAt(e,t,n){const s=n==null?this.scroll.create("text",t):this.scroll.create(t,n),i=this.split(e);this.parent.insertBefore(s,i||void 0)}isolate(e,t){const n=this.split(e);if(n==null)throw new Error("Attempt to isolate at end");return n.split(t),n}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(n,this.next||void 0),typeof n.appendChild!="function")throw new hr(`Cannot wrap ${e}`);return n.appendChild(this),n}};Cl.blotName="abstract";let Ol=Cl;const Rl=class extends Ol{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Rl.scope=V.INLINE_BLOT;let Yp=Rl;const Ae=Yp;class Xp{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let n=t();for(;n&&e>0;)e-=1,n=t();return n}contains(e){const t=this.iterator();let n=t();for(;n;){if(n===e)return!0;n=t()}return!1}indexOf(e){const t=this.iterator();let n=t(),s=0;for(;n;){if(n===e)return s;s+=1,n=t()}return-1}insertBefore(e,t){e!=null&&(this.remove(e),e.next=t,t!=null?(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,n=this.head;for(;n!=null;){if(n===e)return t;t+=n.length(),n=n.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return e!=null&&(e=e.next),t}}find(e,t=!1){const n=this.iterator();let s=n();for(;s;){const i=s.length();if(e<i||t&&e===i&&(s.next==null||s.next.length()!==0))return[s,e];e-=i,s=n()}return[null,0]}forEach(e){const t=this.iterator();let n=t();for(;n;)e(n),n=t()}forEachAt(e,t,n){if(t<=0)return;const[s,i]=this.find(e);let a=e-i;const l=this.iterator(s);let c=l();for(;c&&a<e+t;){const u=c.length();e>a?n(c,e-a,Math.min(t,a+u-e)):n(c,0,Math.min(u,e+t-a)),a+=u,c=l()}}map(e){return this.reduce((t,n)=>(t.push(e(n)),t),[])}reduce(e,t){const n=this.iterator();let s=n();for(;s;)t=e(t,s),s=n();return t}}function Ya(r,e){const t=e.find(r);if(t)return t;try{return e.create(r)}catch{const n=e.create(V.INLINE);return Array.from(r.childNodes).forEach(s=>{n.domNode.appendChild(s)}),r.parentNode&&r.parentNode.replaceChild(n.domNode,r),n.attach(),n}}const Ll=class gt extends Ol{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,gt.uiClass&&this.uiNode.classList.add(gt.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Xp,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=Ya(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof hr)return;throw t}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(n,s,i)=>{n.deleteAt(s,i)})}descendant(e,t=0){const[n,s]=this.children.find(t);return e.blotName==null&&e(n)||e.blotName!=null&&n instanceof e?[n,s]:n instanceof gt?n.descendant(e,s):[null,-1]}descendants(e,t=0,n=Number.MAX_VALUE){let s=[],i=n;return this.children.forEachAt(t,n,(a,l,c)=>{(e.blotName==null&&e(a)||e.blotName!=null&&a instanceof e)&&s.push(a),a instanceof gt&&(s=s.concat(a.descendants(e,l,i))),i-=c}),s}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(t=>{e||this.statics.allowedChildren.some(n=>t instanceof n)||(t.statics.scope===V.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),e=!0):t instanceof gt?t.unwrap():t.remove())})}formatAt(e,t,n,s){this.children.forEachAt(e,t,(i,a,l)=>{i.formatAt(a,l,n,s)})}insertAt(e,t,n){const[s,i]=this.children.find(e);if(s)s.insertAt(i,t,n);else{const a=n==null?this.scroll.create("text",t):this.scroll.create(t,n);this.appendChild(a)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let n=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(n=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(e.domNode,n),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(n=>{e.insertBefore(n,t)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,t=!1){const[n,s]=this.children.find(e,t),i=[[this,e]];return n instanceof gt?i.concat(n.path(s,t)):(n!=null&&i.push([n,s]),i)}removeChild(e){this.children.remove(e)}replaceWith(e,t){const n=typeof e=="string"?this.scroll.create(e,t):e;return n instanceof gt&&this.moveChildren(n),super.replaceWith(n)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(e,this.length(),(s,i,a)=>{const l=s.split(i,t);l!=null&&n.appendChild(l)}),n}splitAfter(e){const t=this.clone();for(;e.next!=null;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const n=[],s=[];e.forEach(i=>{i.target===this.domNode&&i.type==="childList"&&(n.push(...i.addedNodes),s.push(...i.removedNodes))}),s.forEach(i=>{if(i.parentNode!=null&&i.tagName!=="IFRAME"&&document.body.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const a=this.scroll.find(i);a!=null&&(a.domNode.parentNode==null||a.domNode.parentNode===this.domNode)&&a.detach()}),n.filter(i=>i.parentNode===this.domNode&&i!==this.uiNode).sort((i,a)=>i===a?0:i.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(i=>{let a=null;i.nextSibling!=null&&(a=this.scroll.find(i.nextSibling));const l=Ya(i,this.scroll);(l.next!==a||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,a||void 0))}),this.enforceAllowedChildren()}};Ll.uiClass="";let Zp=Ll;const Ge=Zp;function Jp(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(r[t]!==e[t])return!1;return!0}const ir=class ar extends Ge{static create(e){return super.create(e)}static formats(e,t){const n=t.query(ar.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Jn(this.domNode)}format(e,t){if(e===this.statics.blotName&&!t)this.children.forEach(n=>{n instanceof ar||(n=n.wrap(ar.blotName,!0)),this.attributes.copy(n)}),this.unwrap();else{const n=this.scroll.query(e,V.INLINE);if(n==null)return;n instanceof et?this.attributes.attribute(n,t):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)}}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,s){this.formats()[n]!=null||this.scroll.query(n,V.ATTRIBUTE)?this.isolate(e,t).format(n,s):super.formatAt(e,t,n,s)}optimize(e){super.optimize(e);const t=this.formats();if(Object.keys(t).length===0)return this.unwrap();const n=this.next;n instanceof ar&&n.prev===this&&Jp(t,n.formats())&&(n.moveChildren(this),n.remove())}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}wrap(e,t){const n=super.wrap(e,t);return n instanceof ar&&this.attributes.move(n),n}};ir.allowedChildren=[ir,Ae],ir.blotName="inline",ir.scope=V.INLINE_BLOT,ir.tagName="SPAN";let Qp=ir;const Mi=Qp,or=class Ei extends Ge{static create(e){return super.create(e)}static formats(e,t){const n=t.query(Ei.blotName);if(!(n!=null&&e.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new Jn(this.domNode)}format(e,t){const n=this.scroll.query(e,V.BLOCK);n!=null&&(n instanceof et?this.attributes.attribute(n,t):e===this.statics.blotName&&!t?this.replaceWith(Ei.blotName):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,s){this.scroll.query(n,V.BLOCK)!=null?this.format(n,s):super.formatAt(e,t,n,s)}insertAt(e,t,n){if(n==null||this.scroll.query(t,V.INLINE)!=null)super.insertAt(e,t,n);else{const s=this.split(e);if(s!=null){const i=this.scroll.create(t,n);s.parent.insertBefore(i,s)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,t){const n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}};or.blotName="block",or.scope=V.BLOCK_BLOT,or.tagName="P",or.allowedChildren=[Mi,or,Ae];let eg=or;const Zr=eg,xi=class extends Ge{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,n,s){super.formatAt(e,t,n,s),this.enforceAllowedChildren()}insertAt(e,t,n){super.insertAt(e,t,n),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};xi.blotName="container",xi.scope=V.BLOCK_BLOT;let tg=xi;const Qn=tg;class rg extends Ae{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,n,s){e===0&&t===this.length()?this.format(n,s):super.formatAt(e,t,n,s)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const ke=rg,ng={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},sg=100,lr=class extends Ge{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(n=>{this.update(n)}),this.observer.observe(this.domNode,ng),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const n=this.registry.find(e,t);return n?n.scroll===this?n:t?this.find(n.scroll.domNode.parentNode,!0):null:null}query(e,t=V.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(n=>{n.remove()}):super.deleteAt(e,t)}formatAt(e,t,n,s){this.update(),super.formatAt(e,t,n,s)}insertAt(e,t,n){this.update(),super.insertAt(e,t,n)}optimize(e=[],t={}){super.optimize(t);const n=t.mutationsMap||new WeakMap;let s=Array.from(this.observer.takeRecords());for(;s.length>0;)e.push(s.pop());const i=(c,u=!0)=>{c==null||c===this||c.domNode.parentNode!=null&&(n.has(c.domNode)||n.set(c.domNode,[]),u&&i(c.parent))},a=c=>{n.has(c.domNode)&&(c instanceof Ge&&c.children.forEach(a),n.delete(c.domNode),c.optimize(t))};let l=e;for(let c=0;l.length>0;c+=1){if(c>=sg)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(u=>{const h=this.find(u.target,!0);h!=null&&(h.domNode===u.target&&(u.type==="childList"?(i(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(g=>{const f=this.find(g,!1);i(f,!1),f instanceof Ge&&f.children.forEach(b=>{i(b,!1)})})):u.type==="attributes"&&i(h.prev)),i(h))}),this.children.forEach(a),l=Array.from(this.observer.takeRecords()),s=l.slice();s.length>0;)e.push(s.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const n=new WeakMap;e.map(s=>{const i=this.find(s.target,!0);return i==null?null:n.has(i.domNode)?(n.get(i.domNode).push(s),null):(n.set(i.domNode,[s]),i)}).forEach(s=>{s!=null&&s!==this&&n.has(s.domNode)&&s.update(n.get(s.domNode)||[],t)}),t.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),t),this.optimize(e,t)}};lr.blotName="scroll",lr.defaultChild=Zr,lr.allowedChildren=[Zr,Qn],lr.scope=V.BLOCK_BLOT,lr.tagName="DIV";let ig=lr;const Pi=ig,wi=class kl extends Ae{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,n){n==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,n)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof kl&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(e,t){e.some(n=>n.type==="characterData"&&n.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};wi.blotName="text",wi.scope=V.INLINE_BLOT;let ag=wi;const Vn=ag,og=Object.freeze(Object.defineProperty({__proto__:null,Attributor:et,AttributorStore:Jn,BlockBlot:Zr,ClassAttributor:We,ContainerBlot:Qn,EmbedBlot:ke,InlineBlot:Mi,LeafBlot:Ae,ParentBlot:Ge,Registry:pr,Scope:V,ScrollBlot:Pi,StyleAttributor:Tt,TextBlot:Vn},Symbol.toStringTag,{value:"Module"}));var Ln={exports:{}},Qs,Xa;function lg(){if(Xa)return Qs;Xa=1;var r=-1,e=1,t=0;function n(v,q,w,O,D){if(v===q)return v?[[t,v]]:[];if(w!=null){var I=Z(v,q,w);if(I)return I}var M=l(v,q),U=v.substring(0,M);v=v.substring(M),q=q.substring(M),M=u(v,q);var W=v.substring(v.length-M);v=v.substring(0,v.length-M),q=q.substring(0,q.length-M);var A=s(v,q);return U&&A.unshift([t,U]),W&&A.push([t,W]),_(A,D),O&&g(A),A}function s(v,q){var w;if(!v)return[[e,q]];if(!q)return[[r,v]];var O=v.length>q.length?v:q,D=v.length>q.length?q:v,I=O.indexOf(D);if(I!==-1)return w=[[e,O.substring(0,I)],[t,D],[e,O.substring(I+D.length)]],v.length>q.length&&(w[0][0]=w[2][0]=r),w;if(D.length===1)return[[r,v],[e,q]];var M=h(v,q);if(M){var U=M[0],W=M[1],A=M[2],B=M[3],F=M[4],X=n(U,A),J=n(W,B);return X.concat([[t,F]],J)}return i(v,q)}function i(v,q){for(var w=v.length,O=q.length,D=Math.ceil((w+O)/2),I=D,M=2*D,U=new Array(M),W=new Array(M),A=0;A<M;A++)U[A]=-1,W[A]=-1;U[I+1]=0,W[I+1]=0;for(var B=w-O,F=B%2!==0,X=0,J=0,H=0,le=0,ue=0;ue<D;ue++){for(var K=-ue+X;K<=ue-J;K+=2){var re=I+K,ne;K===-ue||K!==ue&&U[re-1]<U[re+1]?ne=U[re+1]:ne=U[re-1]+1;for(var ie=ne-K;ne<w&&ie<O&&v.charAt(ne)===q.charAt(ie);)ne++,ie++;if(U[re]=ne,ne>w)J+=2;else if(ie>O)X+=2;else if(F){var ce=I+B-K;if(ce>=0&&ce<M&&W[ce]!==-1){var he=w-W[ce];if(ne>=he)return a(v,q,ne,ie)}}}for(var pe=-ue+H;pe<=ue-le;pe+=2){var ce=I+pe,he;pe===-ue||pe!==ue&&W[ce-1]<W[ce+1]?he=W[ce+1]:he=W[ce-1]+1;for(var xe=he-pe;he<w&&xe<O&&v.charAt(w-he-1)===q.charAt(O-xe-1);)he++,xe++;if(W[ce]=he,he>w)le+=2;else if(xe>O)H+=2;else if(!F){var re=I+B-pe;if(re>=0&&re<M&&U[re]!==-1){var ne=U[re],ie=I+ne-re;if(he=w-he,ne>=he)return a(v,q,ne,ie)}}}}return[[r,v],[e,q]]}function a(v,q,w,O){var D=v.substring(0,w),I=q.substring(0,O),M=v.substring(w),U=q.substring(O),W=n(D,I),A=n(M,U);return W.concat(A)}function l(v,q){if(!v||!q||v.charAt(0)!==q.charAt(0))return 0;for(var w=0,O=Math.min(v.length,q.length),D=O,I=0;w<D;)v.substring(I,D)==q.substring(I,D)?(w=D,I=w):O=D,D=Math.floor((O-w)/2+w);return j(v.charCodeAt(D-1))&&D--,D}function c(v,q){var w=v.length,O=q.length;if(w==0||O==0)return 0;w>O?v=v.substring(w-O):w<O&&(q=q.substring(0,w));var D=Math.min(w,O);if(v==q)return D;for(var I=0,M=1;;){var U=v.substring(D-M),W=q.indexOf(U);if(W==-1)return I;M+=W,(W==0||v.substring(D-M)==q.substring(0,M))&&(I=M,M++)}}function u(v,q){if(!v||!q||v.slice(-1)!==q.slice(-1))return 0;for(var w=0,O=Math.min(v.length,q.length),D=O,I=0;w<D;)v.substring(v.length-D,v.length-I)==q.substring(q.length-D,q.length-I)?(w=D,I=w):O=D,D=Math.floor((O-w)/2+w);return $(v.charCodeAt(v.length-D))&&D--,D}function h(v,q){var w=v.length>q.length?v:q,O=v.length>q.length?q:v;if(w.length<4||O.length*2<w.length)return null;function D(J,H,le){for(var ue=J.substring(le,le+Math.floor(J.length/4)),K=-1,re="",ne,ie,ce,he;(K=H.indexOf(ue,K+1))!==-1;){var pe=l(J.substring(le),H.substring(K)),xe=u(J.substring(0,le),H.substring(0,K));re.length<xe+pe&&(re=H.substring(K-xe,K)+H.substring(K,K+pe),ne=J.substring(0,le-xe),ie=J.substring(le+pe),ce=H.substring(0,K-xe),he=H.substring(K+pe))}return re.length*2>=J.length?[ne,ie,ce,he,re]:null}var I=D(w,O,Math.ceil(w.length/4)),M=D(w,O,Math.ceil(w.length/2)),U;if(!I&&!M)return null;M?I?U=I[4].length>M[4].length?I:M:U=M:U=I;var W,A,B,F;v.length>q.length?(W=U[0],A=U[1],B=U[2],F=U[3]):(B=U[0],F=U[1],W=U[2],A=U[3]);var X=U[4];return[W,A,B,F,X]}function g(v){for(var q=!1,w=[],O=0,D=null,I=0,M=0,U=0,W=0,A=0;I<v.length;)v[I][0]==t?(w[O++]=I,M=W,U=A,W=0,A=0,D=v[I][1]):(v[I][0]==e?W+=v[I][1].length:A+=v[I][1].length,D&&D.length<=Math.max(M,U)&&D.length<=Math.max(W,A)&&(v.splice(w[O-1],0,[r,D]),v[w[O-1]+1][0]=e,O--,O--,I=O>0?w[O-1]:-1,M=0,U=0,W=0,A=0,D=null,q=!0)),I++;for(q&&_(v),S(v),I=1;I<v.length;){if(v[I-1][0]==r&&v[I][0]==e){var B=v[I-1][1],F=v[I][1],X=c(B,F),J=c(F,B);X>=J?(X>=B.length/2||X>=F.length/2)&&(v.splice(I,0,[t,F.substring(0,X)]),v[I-1][1]=B.substring(0,B.length-X),v[I+1][1]=F.substring(X),I++):(J>=B.length/2||J>=F.length/2)&&(v.splice(I,0,[t,B.substring(0,J)]),v[I-1][0]=e,v[I-1][1]=F.substring(0,F.length-J),v[I+1][0]=r,v[I+1][1]=B.substring(J),I++),I++}I++}}var f=/[^a-zA-Z0-9]/,b=/\s/,x=/[\r\n]/,y=/\n\r?\n$/,N=/^\r?\n\r?\n/;function S(v){function q(J,H){if(!J||!H)return 6;var le=J.charAt(J.length-1),ue=H.charAt(0),K=le.match(f),re=ue.match(f),ne=K&&le.match(b),ie=re&&ue.match(b),ce=ne&&le.match(x),he=ie&&ue.match(x),pe=ce&&J.match(y),xe=he&&H.match(N);return pe||xe?5:ce||he?4:K&&!ne&&ie?3:ne||ie?2:K||re?1:0}for(var w=1;w<v.length-1;){if(v[w-1][0]==t&&v[w+1][0]==t){var O=v[w-1][1],D=v[w][1],I=v[w+1][1],M=u(O,D);if(M){var U=D.substring(D.length-M);O=O.substring(0,O.length-M),D=U+D.substring(0,D.length-M),I=U+I}for(var W=O,A=D,B=I,F=q(O,D)+q(D,I);D.charAt(0)===I.charAt(0);){O+=D.charAt(0),D=D.substring(1)+I.charAt(0),I=I.substring(1);var X=q(O,D)+q(D,I);X>=F&&(F=X,W=O,A=D,B=I)}v[w-1][1]!=W&&(W?v[w-1][1]=W:(v.splice(w-1,1),w--),v[w][1]=A,B?v[w+1][1]=B:(v.splice(w+1,1),w--))}w++}}function _(v,q){v.push([t,""]);for(var w=0,O=0,D=0,I="",M="",U;w<v.length;){if(w<v.length-1&&!v[w][1]){v.splice(w,1);continue}switch(v[w][0]){case e:D++,M+=v[w][1],w++;break;case r:O++,I+=v[w][1],w++;break;case t:var W=w-D-O-1;if(q){if(W>=0&&T(v[W][1])){var A=v[W][1].slice(-1);if(v[W][1]=v[W][1].slice(0,-1),I=A+I,M=A+M,!v[W][1]){v.splice(W,1),w--;var B=W-1;v[B]&&v[B][0]===e&&(D++,M=v[B][1]+M,B--),v[B]&&v[B][0]===r&&(O++,I=v[B][1]+I,B--),W=B}}if(m(v[w][1])){var A=v[w][1].charAt(0);v[w][1]=v[w][1].slice(1),I+=A,M+=A}}if(w<v.length-1&&!v[w][1]){v.splice(w,1);break}if(I.length>0||M.length>0){I.length>0&&M.length>0&&(U=l(M,I),U!==0&&(W>=0?v[W][1]+=M.substring(0,U):(v.splice(0,0,[t,M.substring(0,U)]),w++),M=M.substring(U),I=I.substring(U)),U=u(M,I),U!==0&&(v[w][1]=M.substring(M.length-U)+v[w][1],M=M.substring(0,M.length-U),I=I.substring(0,I.length-U)));var F=D+O;I.length===0&&M.length===0?(v.splice(w-F,F),w=w-F):I.length===0?(v.splice(w-F,F,[e,M]),w=w-F+1):M.length===0?(v.splice(w-F,F,[r,I]),w=w-F+1):(v.splice(w-F,F,[r,I],[e,M]),w=w-F+2)}w!==0&&v[w-1][0]===t?(v[w-1][1]+=v[w][1],v.splice(w,1)):w++,D=0,O=0,I="",M="";break}}v[v.length-1][1]===""&&v.pop();var X=!1;for(w=1;w<v.length-1;)v[w-1][0]===t&&v[w+1][0]===t&&(v[w][1].substring(v[w][1].length-v[w-1][1].length)===v[w-1][1]?(v[w][1]=v[w-1][1]+v[w][1].substring(0,v[w][1].length-v[w-1][1].length),v[w+1][1]=v[w-1][1]+v[w+1][1],v.splice(w-1,1),X=!0):v[w][1].substring(0,v[w+1][1].length)==v[w+1][1]&&(v[w-1][1]+=v[w+1][1],v[w][1]=v[w][1].substring(v[w+1][1].length)+v[w+1][1],v.splice(w+1,1),X=!0)),w++;X&&_(v,q)}function j(v){return v>=55296&&v<=56319}function $(v){return v>=56320&&v<=57343}function m(v){return $(v.charCodeAt(0))}function T(v){return j(v.charCodeAt(v.length-1))}function k(v){for(var q=[],w=0;w<v.length;w++)v[w][1].length>0&&q.push(v[w]);return q}function P(v,q,w,O){return T(v)||m(O)?null:k([[t,v],[r,q],[e,w],[t,O]])}function Z(v,q,w){var O=typeof w=="number"?{index:w,length:0}:w.oldRange,D=typeof w=="number"?null:w.newRange,I=v.length,M=q.length;if(O.length===0&&(D===null||D.length===0)){var U=O.index,W=v.slice(0,U),A=v.slice(U),B=D?D.index:null;e:{var F=U+M-I;if(B!==null&&B!==F||F<0||F>M)break e;var X=q.slice(0,F),J=q.slice(F);if(J!==A)break e;var H=Math.min(U,F),le=W.slice(0,H),ue=X.slice(0,H);if(le!==ue)break e;var K=W.slice(H),re=X.slice(H);return P(le,K,re,A)}e:{if(B!==null&&B!==U)break e;var ne=U,X=q.slice(0,ne),J=q.slice(ne);if(X!==W)break e;var ie=Math.min(I-ne,M-ne),ce=A.slice(A.length-ie),he=J.slice(J.length-ie);if(ce!==he)break e;var K=A.slice(0,A.length-ie),re=J.slice(0,J.length-ie);return P(W,K,re,ce)}}if(O.length>0&&D&&D.length===0)e:{var le=v.slice(0,O.index),ce=v.slice(O.index+O.length),H=le.length,ie=ce.length;if(M<H+ie)break e;var ue=q.slice(0,H),he=q.slice(M-ie);if(le!==ue||ce!==he)break e;var K=v.slice(H,I-ie),re=q.slice(H,M-ie);return P(le,K,re,ce)}return null}function te(v,q,w,O){return n(v,q,w,O,!0)}return te.INSERT=e,te.DELETE=r,te.EQUAL=t,Qs=te,Qs}var Ur={exports:{}};Ur.exports;var Za;function jl(){return Za||(Za=1,function(r,e){var t=200,n="__lodash_hash_undefined__",s=9007199254740991,i="[object Arguments]",a="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",h="[object Function]",g="[object GeneratorFunction]",f="[object Map]",b="[object Number]",x="[object Object]",y="[object Promise]",N="[object RegExp]",S="[object Set]",_="[object String]",j="[object Symbol]",$="[object WeakMap]",m="[object ArrayBuffer]",T="[object DataView]",k="[object Float32Array]",P="[object Float64Array]",Z="[object Int8Array]",te="[object Int16Array]",v="[object Int32Array]",q="[object Uint8Array]",w="[object Uint8ClampedArray]",O="[object Uint16Array]",D="[object Uint32Array]",I=/[\\^$.*+?()[\]{}|]/g,M=/\w*$/,U=/^\[object .+?Constructor\]$/,W=/^(?:0|[1-9]\d*)$/,A={};A[i]=A[a]=A[m]=A[T]=A[l]=A[c]=A[k]=A[P]=A[Z]=A[te]=A[v]=A[f]=A[b]=A[x]=A[N]=A[S]=A[_]=A[j]=A[q]=A[w]=A[O]=A[D]=!0,A[u]=A[h]=A[$]=!1;var B=typeof bt=="object"&&bt&&bt.Object===Object&&bt,F=typeof self=="object"&&self&&self.Object===Object&&self,X=B||F||Function("return this")(),J=e&&!e.nodeType&&e,H=J&&!0&&r&&!r.nodeType&&r,le=H&&H.exports===J;function ue(o,d){return o.set(d[0],d[1]),o}function K(o,d){return o.add(d),o}function re(o,d){for(var E=-1,C=o?o.length:0;++E<C&&d(o[E],E,o)!==!1;);return o}function ne(o,d){for(var E=-1,C=d.length,Q=o.length;++E<C;)o[Q+E]=d[E];return o}function ie(o,d,E,C){for(var Q=-1,Y=o?o.length:0;++Q<Y;)E=d(E,o[Q],Q,o);return E}function ce(o,d){for(var E=-1,C=Array(o);++E<o;)C[E]=d(E);return C}function he(o,d){return o?.[d]}function pe(o){var d=!1;if(o!=null&&typeof o.toString!="function")try{d=!!(o+"")}catch{}return d}function xe(o){var d=-1,E=Array(o.size);return o.forEach(function(C,Q){E[++d]=[Q,C]}),E}function br(o,d){return function(E){return o(d(E))}}function on(o){var d=-1,E=Array(o.size);return o.forEach(function(C){E[++d]=C}),E}var ss=Array.prototype,is=Function.prototype,Gt=Object.prototype,vr=X["__core-js_shared__"],ln=function(){var o=/[^.]+$/.exec(vr&&vr.keys&&vr.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),cn=is.toString,Ye=Gt.hasOwnProperty,Vt=Gt.toString,as=RegExp("^"+cn.call(Ye).replace(I,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),At=le?X.Buffer:void 0,Wt=X.Symbol,yr=X.Uint8Array,je=br(Object.getPrototypeOf,Object),un=Object.create,hn=Gt.propertyIsEnumerable,os=ss.splice,Er=Object.getOwnPropertySymbols,Kt=At?At.isBuffer:void 0,dn=br(Object.keys,Object),Yt=$e(X,"DataView"),St=$e(X,"Map"),Be=$e(X,"Promise"),Xt=$e(X,"Set"),xr=$e(X,"WeakMap"),_t=$e(Object,"create"),wr=Se(Yt),Ct=Se(St),Nr=Se(Be),Tr=Se(Xt),Ar=Se(xr),ft=Wt?Wt.prototype:void 0,fn=ft?ft.valueOf:void 0;function nt(o){var d=-1,E=o?o.length:0;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function ls(){this.__data__=_t?_t(null):{}}function cs(o){return this.has(o)&&delete this.__data__[o]}function us(o){var d=this.__data__;if(_t){var E=d[o];return E===n?void 0:E}return Ye.call(d,o)?d[o]:void 0}function pn(o){var d=this.__data__;return _t?d[o]!==void 0:Ye.call(d,o)}function Sr(o,d){var E=this.__data__;return E[o]=_t&&d===void 0?n:d,this}nt.prototype.clear=ls,nt.prototype.delete=cs,nt.prototype.get=us,nt.prototype.has=pn,nt.prototype.set=Sr;function be(o){var d=-1,E=o?o.length:0;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function hs(){this.__data__=[]}function ds(o){var d=this.__data__,E=Jt(d,o);if(E<0)return!1;var C=d.length-1;return E==C?d.pop():os.call(d,E,1),!0}function fs(o){var d=this.__data__,E=Jt(d,o);return E<0?void 0:d[E][1]}function ps(o){return Jt(this.__data__,o)>-1}function gs(o,d){var E=this.__data__,C=Jt(E,o);return C<0?E.push([o,d]):E[C][1]=d,this}be.prototype.clear=hs,be.prototype.delete=ds,be.prototype.get=fs,be.prototype.has=ps,be.prototype.set=gs;function we(o){var d=-1,E=o?o.length:0;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function ms(){this.__data__={hash:new nt,map:new(St||be),string:new nt}}function bs(o){return Rt(this,o).delete(o)}function vs(o){return Rt(this,o).get(o)}function ys(o){return Rt(this,o).has(o)}function Es(o,d){return Rt(this,o).set(o,d),this}we.prototype.clear=ms,we.prototype.delete=bs,we.prototype.get=vs,we.prototype.has=ys,we.prototype.set=Es;function Re(o){this.__data__=new be(o)}function xs(){this.__data__=new be}function ws(o){return this.__data__.delete(o)}function Ns(o){return this.__data__.get(o)}function Ts(o){return this.__data__.has(o)}function As(o,d){var E=this.__data__;if(E instanceof be){var C=E.__data__;if(!St||C.length<t-1)return C.push([o,d]),this;E=this.__data__=new we(C)}return E.set(o,d),this}Re.prototype.clear=xs,Re.prototype.delete=ws,Re.prototype.get=Ns,Re.prototype.has=Ts,Re.prototype.set=As;function Zt(o,d){var E=Rr(o)||er(o)?ce(o.length,String):[],C=E.length,Q=!!C;for(var Y in o)Ye.call(o,Y)&&!(Q&&(Y=="length"||Bs(Y,C)))&&E.push(Y);return E}function gn(o,d,E){var C=o[d];(!(Ye.call(o,d)&&En(C,E))||E===void 0&&!(d in o))&&(o[d]=E)}function Jt(o,d){for(var E=o.length;E--;)if(En(o[E][0],d))return E;return-1}function Xe(o,d){return o&&Or(d,kr(d),o)}function _r(o,d,E,C,Q,Y,ae){var se;if(C&&(se=Y?C(o,Q,Y,ae):C(o)),se!==void 0)return se;if(!Je(o))return o;var ge=Rr(o);if(ge){if(se=Ms(o),!d)return Is(o,se)}else{var oe=it(o),Ne=oe==h||oe==g;if(xn(o))return Qt(o,d);if(oe==x||oe==i||Ne&&!Y){if(pe(o))return Y?o:{};if(se=Ze(Ne?{}:o),!d)return qs(o,Xe(se,o))}else{if(!A[oe])return Y?o:{};se=Ps(o,oe,_r,d)}}ae||(ae=new Re);var Le=ae.get(o);if(Le)return Le;if(ae.set(o,se),!ge)var me=E?Ds(o):kr(o);return re(me||o,function(Te,ve){me&&(ve=Te,Te=o[ve]),gn(se,ve,_r(Te,d,E,C,ve,o,ae))}),se}function Ss(o){return Je(o)?un(o):{}}function _s(o,d,E){var C=d(o);return Rr(o)?C:ne(C,E(o))}function Cs(o){return Vt.call(o)}function Os(o){if(!Je(o)||Fs(o))return!1;var d=Lr(o)||pe(o)?as:U;return d.test(Se(o))}function Rs(o){if(!vn(o))return dn(o);var d=[];for(var E in Object(o))Ye.call(o,E)&&E!="constructor"&&d.push(E);return d}function Qt(o,d){if(d)return o.slice();var E=new o.constructor(o.length);return o.copy(E),E}function Cr(o){var d=new o.constructor(o.byteLength);return new yr(d).set(new yr(o)),d}function Ot(o,d){var E=d?Cr(o.buffer):o.buffer;return new o.constructor(E,o.byteOffset,o.byteLength)}function mn(o,d,E){var C=d?E(xe(o),!0):xe(o);return ie(C,ue,new o.constructor)}function bn(o){var d=new o.constructor(o.source,M.exec(o));return d.lastIndex=o.lastIndex,d}function Ls(o,d,E){var C=d?E(on(o),!0):on(o);return ie(C,K,new o.constructor)}function ks(o){return fn?Object(fn.call(o)):{}}function js(o,d){var E=d?Cr(o.buffer):o.buffer;return new o.constructor(E,o.byteOffset,o.length)}function Is(o,d){var E=-1,C=o.length;for(d||(d=Array(C));++E<C;)d[E]=o[E];return d}function Or(o,d,E,C){E||(E={});for(var Q=-1,Y=d.length;++Q<Y;){var ae=d[Q],se=void 0;gn(E,ae,se===void 0?o[ae]:se)}return E}function qs(o,d){return Or(o,st(o),d)}function Ds(o){return _s(o,kr,st)}function Rt(o,d){var E=o.__data__;return $s(d)?E[typeof d=="string"?"string":"hash"]:E.map}function $e(o,d){var E=he(o,d);return Os(E)?E:void 0}var st=Er?br(Er,Object):Hs,it=Cs;(Yt&&it(new Yt(new ArrayBuffer(1)))!=T||St&&it(new St)!=f||Be&&it(Be.resolve())!=y||Xt&&it(new Xt)!=S||xr&&it(new xr)!=$)&&(it=function(o){var d=Vt.call(o),E=d==x?o.constructor:void 0,C=E?Se(E):void 0;if(C)switch(C){case wr:return T;case Ct:return f;case Nr:return y;case Tr:return S;case Ar:return $}return d});function Ms(o){var d=o.length,E=o.constructor(d);return d&&typeof o[0]=="string"&&Ye.call(o,"index")&&(E.index=o.index,E.input=o.input),E}function Ze(o){return typeof o.constructor=="function"&&!vn(o)?Ss(je(o)):{}}function Ps(o,d,E,C){var Q=o.constructor;switch(d){case m:return Cr(o);case l:case c:return new Q(+o);case T:return Ot(o,C);case k:case P:case Z:case te:case v:case q:case w:case O:case D:return js(o,C);case f:return mn(o,C,E);case b:case _:return new Q(o);case N:return bn(o);case S:return Ls(o,C,E);case j:return ks(o)}}function Bs(o,d){return d=d??s,!!d&&(typeof o=="number"||W.test(o))&&o>-1&&o%1==0&&o<d}function $s(o){var d=typeof o;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?o!=="__proto__":o===null}function Fs(o){return!!ln&&ln in o}function vn(o){var d=o&&o.constructor,E=typeof d=="function"&&d.prototype||Gt;return o===E}function Se(o){if(o!=null){try{return cn.call(o)}catch{}try{return o+""}catch{}}return""}function yn(o){return _r(o,!0,!0)}function En(o,d){return o===d||o!==o&&d!==d}function er(o){return Us(o)&&Ye.call(o,"callee")&&(!hn.call(o,"callee")||Vt.call(o)==i)}var Rr=Array.isArray;function tr(o){return o!=null&&wn(o.length)&&!Lr(o)}function Us(o){return Nn(o)&&tr(o)}var xn=Kt||zs;function Lr(o){var d=Je(o)?Vt.call(o):"";return d==h||d==g}function wn(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=s}function Je(o){var d=typeof o;return!!o&&(d=="object"||d=="function")}function Nn(o){return!!o&&typeof o=="object"}function kr(o){return tr(o)?Zt(o):Rs(o)}function Hs(){return[]}function zs(){return!1}r.exports=yn}(Ur,Ur.exports)),Ur.exports}var Hr={exports:{}};Hr.exports;var Ja;function Il(){return Ja||(Ja=1,function(r,e){var t=200,n="__lodash_hash_undefined__",s=1,i=2,a=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",f="[object Error]",b="[object Function]",x="[object GeneratorFunction]",y="[object Map]",N="[object Number]",S="[object Null]",_="[object Object]",j="[object Promise]",$="[object Proxy]",m="[object RegExp]",T="[object Set]",k="[object String]",P="[object Symbol]",Z="[object Undefined]",te="[object WeakMap]",v="[object ArrayBuffer]",q="[object DataView]",w="[object Float32Array]",O="[object Float64Array]",D="[object Int8Array]",I="[object Int16Array]",M="[object Int32Array]",U="[object Uint8Array]",W="[object Uint8ClampedArray]",A="[object Uint16Array]",B="[object Uint32Array]",F=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,H={};H[w]=H[O]=H[D]=H[I]=H[M]=H[U]=H[W]=H[A]=H[B]=!0,H[l]=H[c]=H[v]=H[h]=H[q]=H[g]=H[f]=H[b]=H[y]=H[N]=H[_]=H[m]=H[T]=H[k]=H[te]=!1;var le=typeof bt=="object"&&bt&&bt.Object===Object&&bt,ue=typeof self=="object"&&self&&self.Object===Object&&self,K=le||ue||Function("return this")(),re=e&&!e.nodeType&&e,ne=re&&!0&&r&&!r.nodeType&&r,ie=ne&&ne.exports===re,ce=ie&&le.process,he=function(){try{return ce&&ce.binding&&ce.binding("util")}catch{}}(),pe=he&&he.isTypedArray;function xe(o,d){for(var E=-1,C=o==null?0:o.length,Q=0,Y=[];++E<C;){var ae=o[E];d(ae,E,o)&&(Y[Q++]=ae)}return Y}function br(o,d){for(var E=-1,C=d.length,Q=o.length;++E<C;)o[Q+E]=d[E];return o}function on(o,d){for(var E=-1,C=o==null?0:o.length;++E<C;)if(d(o[E],E,o))return!0;return!1}function ss(o,d){for(var E=-1,C=Array(o);++E<o;)C[E]=d(E);return C}function is(o){return function(d){return o(d)}}function Gt(o,d){return o.has(d)}function vr(o,d){return o?.[d]}function ln(o){var d=-1,E=Array(o.size);return o.forEach(function(C,Q){E[++d]=[Q,C]}),E}function cn(o,d){return function(E){return o(d(E))}}function Ye(o){var d=-1,E=Array(o.size);return o.forEach(function(C){E[++d]=C}),E}var Vt=Array.prototype,as=Function.prototype,At=Object.prototype,Wt=K["__core-js_shared__"],yr=as.toString,je=At.hasOwnProperty,un=function(){var o=/[^.]+$/.exec(Wt&&Wt.keys&&Wt.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),hn=At.toString,os=RegExp("^"+yr.call(je).replace(F,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Er=ie?K.Buffer:void 0,Kt=K.Symbol,dn=K.Uint8Array,Yt=At.propertyIsEnumerable,St=Vt.splice,Be=Kt?Kt.toStringTag:void 0,Xt=Object.getOwnPropertySymbols,xr=Er?Er.isBuffer:void 0,_t=cn(Object.keys,Object),wr=st(K,"DataView"),Ct=st(K,"Map"),Nr=st(K,"Promise"),Tr=st(K,"Set"),Ar=st(K,"WeakMap"),ft=st(Object,"create"),fn=Se(wr),nt=Se(Ct),ls=Se(Nr),cs=Se(Tr),us=Se(Ar),pn=Kt?Kt.prototype:void 0,Sr=pn?pn.valueOf:void 0;function be(o){var d=-1,E=o==null?0:o.length;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function hs(){this.__data__=ft?ft(null):{},this.size=0}function ds(o){var d=this.has(o)&&delete this.__data__[o];return this.size-=d?1:0,d}function fs(o){var d=this.__data__;if(ft){var E=d[o];return E===n?void 0:E}return je.call(d,o)?d[o]:void 0}function ps(o){var d=this.__data__;return ft?d[o]!==void 0:je.call(d,o)}function gs(o,d){var E=this.__data__;return this.size+=this.has(o)?0:1,E[o]=ft&&d===void 0?n:d,this}be.prototype.clear=hs,be.prototype.delete=ds,be.prototype.get=fs,be.prototype.has=ps,be.prototype.set=gs;function we(o){var d=-1,E=o==null?0:o.length;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function ms(){this.__data__=[],this.size=0}function bs(o){var d=this.__data__,E=Qt(d,o);if(E<0)return!1;var C=d.length-1;return E==C?d.pop():St.call(d,E,1),--this.size,!0}function vs(o){var d=this.__data__,E=Qt(d,o);return E<0?void 0:d[E][1]}function ys(o){return Qt(this.__data__,o)>-1}function Es(o,d){var E=this.__data__,C=Qt(E,o);return C<0?(++this.size,E.push([o,d])):E[C][1]=d,this}we.prototype.clear=ms,we.prototype.delete=bs,we.prototype.get=vs,we.prototype.has=ys,we.prototype.set=Es;function Re(o){var d=-1,E=o==null?0:o.length;for(this.clear();++d<E;){var C=o[d];this.set(C[0],C[1])}}function xs(){this.size=0,this.__data__={hash:new be,map:new(Ct||we),string:new be}}function ws(o){var d=$e(this,o).delete(o);return this.size-=d?1:0,d}function Ns(o){return $e(this,o).get(o)}function Ts(o){return $e(this,o).has(o)}function As(o,d){var E=$e(this,o),C=E.size;return E.set(o,d),this.size+=E.size==C?0:1,this}Re.prototype.clear=xs,Re.prototype.delete=ws,Re.prototype.get=Ns,Re.prototype.has=Ts,Re.prototype.set=As;function Zt(o){var d=-1,E=o==null?0:o.length;for(this.__data__=new Re;++d<E;)this.add(o[d])}function gn(o){return this.__data__.set(o,n),this}function Jt(o){return this.__data__.has(o)}Zt.prototype.add=Zt.prototype.push=gn,Zt.prototype.has=Jt;function Xe(o){var d=this.__data__=new we(o);this.size=d.size}function _r(){this.__data__=new we,this.size=0}function Ss(o){var d=this.__data__,E=d.delete(o);return this.size=d.size,E}function _s(o){return this.__data__.get(o)}function Cs(o){return this.__data__.has(o)}function Os(o,d){var E=this.__data__;if(E instanceof we){var C=E.__data__;if(!Ct||C.length<t-1)return C.push([o,d]),this.size=++E.size,this;E=this.__data__=new Re(C)}return E.set(o,d),this.size=E.size,this}Xe.prototype.clear=_r,Xe.prototype.delete=Ss,Xe.prototype.get=_s,Xe.prototype.has=Cs,Xe.prototype.set=Os;function Rs(o,d){var E=er(o),C=!E&&En(o),Q=!E&&!C&&tr(o),Y=!E&&!C&&!Q&&Nn(o),ae=E||C||Q||Y,se=ae?ss(o.length,String):[],ge=se.length;for(var oe in o)je.call(o,oe)&&!(ae&&(oe=="length"||Q&&(oe=="offset"||oe=="parent")||Y&&(oe=="buffer"||oe=="byteLength"||oe=="byteOffset")||Ps(oe,ge)))&&se.push(oe);return se}function Qt(o,d){for(var E=o.length;E--;)if(yn(o[E][0],d))return E;return-1}function Cr(o,d,E){var C=d(o);return er(o)?C:br(C,E(o))}function Ot(o){return o==null?o===void 0?Z:S:Be&&Be in Object(o)?it(o):vn(o)}function mn(o){return Je(o)&&Ot(o)==l}function bn(o,d,E,C,Q){return o===d?!0:o==null||d==null||!Je(o)&&!Je(d)?o!==o&&d!==d:Ls(o,d,E,C,bn,Q)}function Ls(o,d,E,C,Q,Y){var ae=er(o),se=er(d),ge=ae?c:Ze(o),oe=se?c:Ze(d);ge=ge==l?_:ge,oe=oe==l?_:oe;var Ne=ge==_,Le=oe==_,me=ge==oe;if(me&&tr(o)){if(!tr(d))return!1;ae=!0,Ne=!1}if(me&&!Ne)return Y||(Y=new Xe),ae||Nn(o)?Or(o,d,E,C,Q,Y):qs(o,d,ge,E,C,Q,Y);if(!(E&s)){var Te=Ne&&je.call(o,"__wrapped__"),ve=Le&&je.call(d,"__wrapped__");if(Te||ve){var pt=Te?o.value():o,at=ve?d.value():d;return Y||(Y=new Xe),Q(pt,at,E,C,Y)}}return me?(Y||(Y=new Xe),Ds(o,d,E,C,Q,Y)):!1}function ks(o){if(!wn(o)||$s(o))return!1;var d=xn(o)?os:X;return d.test(Se(o))}function js(o){return Je(o)&&Lr(o.length)&&!!H[Ot(o)]}function Is(o){if(!Fs(o))return _t(o);var d=[];for(var E in Object(o))je.call(o,E)&&E!="constructor"&&d.push(E);return d}function Or(o,d,E,C,Q,Y){var ae=E&s,se=o.length,ge=d.length;if(se!=ge&&!(ae&&ge>se))return!1;var oe=Y.get(o);if(oe&&Y.get(d))return oe==d;var Ne=-1,Le=!0,me=E&i?new Zt:void 0;for(Y.set(o,d),Y.set(d,o);++Ne<se;){var Te=o[Ne],ve=d[Ne];if(C)var pt=ae?C(ve,Te,Ne,d,o,Y):C(Te,ve,Ne,o,d,Y);if(pt!==void 0){if(pt)continue;Le=!1;break}if(me){if(!on(d,function(at,Lt){if(!Gt(me,Lt)&&(Te===at||Q(Te,at,E,C,Y)))return me.push(Lt)})){Le=!1;break}}else if(!(Te===ve||Q(Te,ve,E,C,Y))){Le=!1;break}}return Y.delete(o),Y.delete(d),Le}function qs(o,d,E,C,Q,Y,ae){switch(E){case q:if(o.byteLength!=d.byteLength||o.byteOffset!=d.byteOffset)return!1;o=o.buffer,d=d.buffer;case v:return!(o.byteLength!=d.byteLength||!Y(new dn(o),new dn(d)));case h:case g:case N:return yn(+o,+d);case f:return o.name==d.name&&o.message==d.message;case m:case k:return o==d+"";case y:var se=ln;case T:var ge=C&s;if(se||(se=Ye),o.size!=d.size&&!ge)return!1;var oe=ae.get(o);if(oe)return oe==d;C|=i,ae.set(o,d);var Ne=Or(se(o),se(d),C,Q,Y,ae);return ae.delete(o),Ne;case P:if(Sr)return Sr.call(o)==Sr.call(d)}return!1}function Ds(o,d,E,C,Q,Y){var ae=E&s,se=Rt(o),ge=se.length,oe=Rt(d),Ne=oe.length;if(ge!=Ne&&!ae)return!1;for(var Le=ge;Le--;){var me=se[Le];if(!(ae?me in d:je.call(d,me)))return!1}var Te=Y.get(o);if(Te&&Y.get(d))return Te==d;var ve=!0;Y.set(o,d),Y.set(d,o);for(var pt=ae;++Le<ge;){me=se[Le];var at=o[me],Lt=d[me];if(C)var Xi=ae?C(Lt,at,me,d,o,Y):C(at,Lt,me,o,d,Y);if(!(Xi===void 0?at===Lt||Q(at,Lt,E,C,Y):Xi)){ve=!1;break}pt||(pt=me=="constructor")}if(ve&&!pt){var Tn=o.constructor,An=d.constructor;Tn!=An&&"constructor"in o&&"constructor"in d&&!(typeof Tn=="function"&&Tn instanceof Tn&&typeof An=="function"&&An instanceof An)&&(ve=!1)}return Y.delete(o),Y.delete(d),ve}function Rt(o){return Cr(o,kr,Ms)}function $e(o,d){var E=o.__data__;return Bs(d)?E[typeof d=="string"?"string":"hash"]:E.map}function st(o,d){var E=vr(o,d);return ks(E)?E:void 0}function it(o){var d=je.call(o,Be),E=o[Be];try{o[Be]=void 0;var C=!0}catch{}var Q=hn.call(o);return C&&(d?o[Be]=E:delete o[Be]),Q}var Ms=Xt?function(o){return o==null?[]:(o=Object(o),xe(Xt(o),function(d){return Yt.call(o,d)}))}:Hs,Ze=Ot;(wr&&Ze(new wr(new ArrayBuffer(1)))!=q||Ct&&Ze(new Ct)!=y||Nr&&Ze(Nr.resolve())!=j||Tr&&Ze(new Tr)!=T||Ar&&Ze(new Ar)!=te)&&(Ze=function(o){var d=Ot(o),E=d==_?o.constructor:void 0,C=E?Se(E):"";if(C)switch(C){case fn:return q;case nt:return y;case ls:return j;case cs:return T;case us:return te}return d});function Ps(o,d){return d=d??a,!!d&&(typeof o=="number"||J.test(o))&&o>-1&&o%1==0&&o<d}function Bs(o){var d=typeof o;return d=="string"||d=="number"||d=="symbol"||d=="boolean"?o!=="__proto__":o===null}function $s(o){return!!un&&un in o}function Fs(o){var d=o&&o.constructor,E=typeof d=="function"&&d.prototype||At;return o===E}function vn(o){return hn.call(o)}function Se(o){if(o!=null){try{return yr.call(o)}catch{}try{return o+""}catch{}}return""}function yn(o,d){return o===d||o!==o&&d!==d}var En=mn(function(){return arguments}())?mn:function(o){return Je(o)&&je.call(o,"callee")&&!Yt.call(o,"callee")},er=Array.isArray;function Rr(o){return o!=null&&Lr(o.length)&&!xn(o)}var tr=xr||zs;function Us(o,d){return bn(o,d)}function xn(o){if(!wn(o))return!1;var d=Ot(o);return d==b||d==x||d==u||d==$}function Lr(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=a}function wn(o){var d=typeof o;return o!=null&&(d=="object"||d=="function")}function Je(o){return o!=null&&typeof o=="object"}var Nn=pe?is(pe):js;function kr(o){return Rr(o)?Rs(o):Is(o)}function Hs(){return[]}function zs(){return!1}r.exports=Us}(Hr,Hr.exports)),Hr.exports}var kn={},Qa;function cg(){if(Qa)return kn;Qa=1,Object.defineProperty(kn,"__esModule",{value:!0});const r=jl(),e=Il();var t;return function(n){function s(c={},u={},h=!1){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});let g=r(u);h||(g=Object.keys(g).reduce((f,b)=>(g[b]!=null&&(f[b]=g[b]),f),{}));for(const f in c)c[f]!==void 0&&u[f]===void 0&&(g[f]=c[f]);return Object.keys(g).length>0?g:void 0}n.compose=s;function i(c={},u={}){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});const h=Object.keys(c).concat(Object.keys(u)).reduce((g,f)=>(e(c[f],u[f])||(g[f]=u[f]===void 0?null:u[f]),g),{});return Object.keys(h).length>0?h:void 0}n.diff=i;function a(c={},u={}){c=c||{};const h=Object.keys(u).reduce((g,f)=>(u[f]!==c[f]&&c[f]!==void 0&&(g[f]=u[f]),g),{});return Object.keys(c).reduce((g,f)=>(c[f]!==u[f]&&u[f]===void 0&&(g[f]=null),g),h)}n.invert=a;function l(c,u,h=!1){if(typeof c!="object")return u;if(typeof u!="object")return;if(!h)return u;const g=Object.keys(u).reduce((f,b)=>(c[b]===void 0&&(f[b]=u[b]),f),{});return Object.keys(g).length>0?g:void 0}n.transform=l}(t||(t={})),kn.default=t,kn}var jn={},eo;function ql(){if(eo)return jn;eo=1,Object.defineProperty(jn,"__esModule",{value:!0});var r;return function(e){function t(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}e.length=t}(r||(r={})),jn.default=r,jn}var In={},to;function ug(){if(to)return In;to=1,Object.defineProperty(In,"__esModule",{value:!0});const r=ql();class e{constructor(n){this.ops=n,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(n){n||(n=1/0);const s=this.ops[this.index];if(s){const i=this.offset,a=r.default.length(s);if(n>=a-i?(n=a-i,this.index+=1,this.offset=0):this.offset+=n,typeof s.delete=="number")return{delete:n};{const l={};return s.attributes&&(l.attributes=s.attributes),typeof s.retain=="number"?l.retain=n:typeof s.retain=="object"&&s.retain!==null?l.retain=s.retain:typeof s.insert=="string"?l.insert=s.insert.substr(i,n):l.insert=s.insert,l}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?r.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const n=this.ops[this.index];return n?typeof n.delete=="number"?"delete":typeof n.retain=="number"||typeof n.retain=="object"&&n.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const n=this.offset,s=this.index,i=this.next(),a=this.ops.slice(this.index);return this.offset=n,this.index=s,[i].concat(a)}}else return[]}}return In.default=e,In}var ro;function hg(){return ro||(ro=1,function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=lg(),n=jl(),s=Il(),i=cg();e.AttributeMap=i.default;const a=ql();e.Op=a.default;const l=ug();e.OpIterator=l.default;const c="\0",u=(g,f)=>{if(typeof g!="object"||g===null)throw new Error(`cannot retain a ${typeof g}`);if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);const b=Object.keys(g)[0];if(!b||b!==Object.keys(f)[0])throw new Error(`embed types not matched: ${b} != ${Object.keys(f)[0]}`);return[b,g[b],f[b]]};class h{constructor(f){Array.isArray(f)?this.ops=f:f!=null&&Array.isArray(f.ops)?this.ops=f.ops:this.ops=[]}static registerEmbed(f,b){this.handlers[f]=b}static unregisterEmbed(f){delete this.handlers[f]}static getHandler(f){const b=this.handlers[f];if(!b)throw new Error(`no handlers for embed type "${f}"`);return b}insert(f,b){const x={};return typeof f=="string"&&f.length===0?this:(x.insert=f,b!=null&&typeof b=="object"&&Object.keys(b).length>0&&(x.attributes=b),this.push(x))}delete(f){return f<=0?this:this.push({delete:f})}retain(f,b){if(typeof f=="number"&&f<=0)return this;const x={retain:f};return b!=null&&typeof b=="object"&&Object.keys(b).length>0&&(x.attributes=b),this.push(x)}push(f){let b=this.ops.length,x=this.ops[b-1];if(f=n(f),typeof x=="object"){if(typeof f.delete=="number"&&typeof x.delete=="number")return this.ops[b-1]={delete:x.delete+f.delete},this;if(typeof x.delete=="number"&&f.insert!=null&&(b-=1,x=this.ops[b-1],typeof x!="object"))return this.ops.unshift(f),this;if(s(f.attributes,x.attributes)){if(typeof f.insert=="string"&&typeof x.insert=="string")return this.ops[b-1]={insert:x.insert+f.insert},typeof f.attributes=="object"&&(this.ops[b-1].attributes=f.attributes),this;if(typeof f.retain=="number"&&typeof x.retain=="number")return this.ops[b-1]={retain:x.retain+f.retain},typeof f.attributes=="object"&&(this.ops[b-1].attributes=f.attributes),this}}return b===this.ops.length?this.ops.push(f):this.ops.splice(b,0,f),this}chop(){const f=this.ops[this.ops.length-1];return f&&typeof f.retain=="number"&&!f.attributes&&this.ops.pop(),this}filter(f){return this.ops.filter(f)}forEach(f){this.ops.forEach(f)}map(f){return this.ops.map(f)}partition(f){const b=[],x=[];return this.forEach(y=>{(f(y)?b:x).push(y)}),[b,x]}reduce(f,b){return this.ops.reduce(f,b)}changeLength(){return this.reduce((f,b)=>b.insert?f+a.default.length(b):b.delete?f-b.delete:f,0)}length(){return this.reduce((f,b)=>f+a.default.length(b),0)}slice(f=0,b=1/0){const x=[],y=new l.default(this.ops);let N=0;for(;N<b&&y.hasNext();){let S;N<f?S=y.next(f-N):(S=y.next(b-N),x.push(S)),N+=a.default.length(S)}return new h(x)}compose(f){const b=new l.default(this.ops),x=new l.default(f.ops),y=[],N=x.peek();if(N!=null&&typeof N.retain=="number"&&N.attributes==null){let _=N.retain;for(;b.peekType()==="insert"&&b.peekLength()<=_;)_-=b.peekLength(),y.push(b.next());N.retain-_>0&&x.next(N.retain-_)}const S=new h(y);for(;b.hasNext()||x.hasNext();)if(x.peekType()==="insert")S.push(x.next());else if(b.peekType()==="delete")S.push(b.next());else{const _=Math.min(b.peekLength(),x.peekLength()),j=b.next(_),$=x.next(_);if($.retain){const m={};if(typeof j.retain=="number")m.retain=typeof $.retain=="number"?_:$.retain;else if(typeof $.retain=="number")j.retain==null?m.insert=j.insert:m.retain=j.retain;else{const k=j.retain==null?"insert":"retain",[P,Z,te]=u(j[k],$.retain),v=h.getHandler(P);m[k]={[P]:v.compose(Z,te,k==="retain")}}const T=i.default.compose(j.attributes,$.attributes,typeof j.retain=="number");if(T&&(m.attributes=T),S.push(m),!x.hasNext()&&s(S.ops[S.ops.length-1],m)){const k=new h(b.rest());return S.concat(k).chop()}}else typeof $.delete=="number"&&(typeof j.retain=="number"||typeof j.retain=="object"&&j.retain!==null)&&S.push($)}return S.chop()}concat(f){const b=new h(this.ops.slice());return f.ops.length>0&&(b.push(f.ops[0]),b.ops=b.ops.concat(f.ops.slice(1))),b}diff(f,b){if(this.ops===f.ops)return new h;const x=[this,f].map(j=>j.map($=>{if($.insert!=null)return typeof $.insert=="string"?$.insert:c;const m=j===f?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),y=new h,N=t(x[0],x[1],b,!0),S=new l.default(this.ops),_=new l.default(f.ops);return N.forEach(j=>{let $=j[1].length;for(;$>0;){let m=0;switch(j[0]){case t.INSERT:m=Math.min(_.peekLength(),$),y.push(_.next(m));break;case t.DELETE:m=Math.min($,S.peekLength()),S.next(m),y.delete(m);break;case t.EQUAL:m=Math.min(S.peekLength(),_.peekLength(),$);const T=S.next(m),k=_.next(m);s(T.insert,k.insert)?y.retain(m,i.default.diff(T.attributes,k.attributes)):y.push(k).delete(m);break}$-=m}}),y.chop()}eachLine(f,b=`
24
+ `){const x=new l.default(this.ops);let y=new h,N=0;for(;x.hasNext();){if(x.peekType()!=="insert")return;const S=x.peek(),_=a.default.length(S)-x.peekLength(),j=typeof S.insert=="string"?S.insert.indexOf(b,_)-_:-1;if(j<0)y.push(x.next());else if(j>0)y.push(x.next(j));else{if(f(y,x.next(1).attributes||{},N)===!1)return;N+=1,y=new h}}y.length()>0&&f(y,{},N)}invert(f){const b=new h;return this.reduce((x,y)=>{if(y.insert)b.delete(a.default.length(y));else{if(typeof y.retain=="number"&&y.attributes==null)return b.retain(y.retain),x+y.retain;if(y.delete||typeof y.retain=="number"){const N=y.delete||y.retain;return f.slice(x,x+N).forEach(_=>{y.delete?b.push(_):y.retain&&y.attributes&&b.retain(a.default.length(_),i.default.invert(y.attributes,_.attributes))}),x+N}else if(typeof y.retain=="object"&&y.retain!==null){const N=f.slice(x,x+1),S=new l.default(N.ops).next(),[_,j,$]=u(y.retain,S.insert),m=h.getHandler(_);return b.retain({[_]:m.invert(j,$)},i.default.invert(y.attributes,S.attributes)),x+1}}return x},0),b.chop()}transform(f,b=!1){if(b=!!b,typeof f=="number")return this.transformPosition(f,b);const x=f,y=new l.default(this.ops),N=new l.default(x.ops),S=new h;for(;y.hasNext()||N.hasNext();)if(y.peekType()==="insert"&&(b||N.peekType()!=="insert"))S.retain(a.default.length(y.next()));else if(N.peekType()==="insert")S.push(N.next());else{const _=Math.min(y.peekLength(),N.peekLength()),j=y.next(_),$=N.next(_);if(j.delete)continue;if($.delete)S.push($);else{const m=j.retain,T=$.retain;let k=typeof T=="object"&&T!==null?T:_;if(typeof m=="object"&&m!==null&&typeof T=="object"&&T!==null){const P=Object.keys(m)[0];if(P===Object.keys(T)[0]){const Z=h.getHandler(P);Z&&(k={[P]:Z.transform(m[P],T[P],b)})}}S.retain(k,i.default.transform(j.attributes,$.attributes,b))}}return S.chop()}transformPosition(f,b=!1){b=!!b;const x=new l.default(this.ops);let y=0;for(;x.hasNext()&&y<=f;){const N=x.peekLength(),S=x.peekType();if(x.next(),S==="delete"){f-=Math.min(N,f-y);continue}else S==="insert"&&(y<f||!b)&&(f+=N);y+=N}return f}}h.Op=a.default,h.OpIterator=l.default,h.AttributeMap=i.default,h.handlers={},e.default=h,r.exports=h,r.exports.default=h}(Ln,Ln.exports)),Ln.exports}var Pe=hg();const G=_i(Pe);class Ke extends ke{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Ke.blotName="break";Ke.tagName="BR";let Ve=class extends Vn{};const dg={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function es(r){return r.replace(/[&<>"']/g,e=>dg[e])}class _e extends Mi{static allowedChildren=[_e,Ke,ke,Ve];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(e,t){const n=_e.order.indexOf(e),s=_e.order.indexOf(t);return n>=0||s>=0?n-s:e===t?0:e<t?-1:1}formatAt(e,t,n,s){if(_e.compare(this.statics.blotName,n)<0&&this.scroll.query(n,V.BLOT)){const i=this.isolate(e,t);s&&i.wrap(n,s)}else super.formatAt(e,t,n,s)}optimize(e){if(super.optimize(e),this.parent instanceof _e&&_e.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}const no=1;class Ee extends Zr{cache={};delta(){return this.cache.delta==null&&(this.cache.delta=Dl(this)),this.cache.delta}deleteAt(e,t){super.deleteAt(e,t),this.cache={}}formatAt(e,t,n,s){t<=0||(this.scroll.query(n,V.BLOCK)?e+t===this.length()&&this.format(n,s):super.formatAt(e,Math.min(t,this.length()-e-1),n,s),this.cache={})}insertAt(e,t,n){if(n!=null){super.insertAt(e,t,n),this.cache={};return}if(t.length===0)return;const s=t.split(`
25
+ `),i=s.shift();i.length>0&&(e<this.length()-1||this.children.tail==null?super.insertAt(Math.min(e,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let a=this;s.reduce((l,c)=>(a=a.split(l,!0),a.insertAt(0,c),c.length),e+i.length)}insertBefore(e,t){const{head:n}=this.children;super.insertBefore(e,t),n instanceof Ke&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+no),this.cache.length}moveChildren(e,t){super.moveChildren(e,t),this.cache={}}optimize(e){super.optimize(e),this.cache={}}path(e){return super.path(e,!0)}removeChild(e){super.removeChild(e),this.cache={}}split(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t&&(e===0||e>=this.length()-no)){const s=this.clone();return e===0?(this.parent.insertBefore(s,this),this):(this.parent.insertBefore(s,this.next),s)}const n=super.split(e,t);return this.cache={},n}}Ee.blotName="block";Ee.tagName="P";Ee.defaultChild=Ke;Ee.allowedChildren=[Ke,_e,ke,Ve];class Me extends ke{attach(){super.attach(),this.attributes=new Jn(this.domNode)}delta(){return new G().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){const n=this.scroll.query(e,V.BLOCK_ATTRIBUTE);n!=null&&this.attributes.attribute(n,t)}formatAt(e,t,n,s){this.format(n,s)}insertAt(e,t,n){if(n!=null){super.insertAt(e,t,n);return}const s=t.split(`
26
26
  `),i=s.pop(),a=s.map(c=>{const u=this.scroll.create(Ee.blotName);return u.insertAt(0,c),u}),l=this.split(e);a.forEach(c=>{this.parent.insertBefore(c,l)}),i&&this.parent.insertBefore(this.scroll.create("text",i),l)}}Me.scope=V.BLOCK_BLOT;function Dl(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return r.descendants(Ae).reduce((t,n)=>n.length()===0?t:t.insert(n.value(),qe(n,{},e)),new G).insert(`
27
- `,qe(r))}function qe(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return r==null||("formats"in r&&typeof r.formats=="function"&&(e={...e,...r.formats()},t&&delete e["code-token"]),r.parent==null||r.parent.statics.blotName==="scroll"||r.parent.statics.scope!==r.statics.scope)?e:qe(r.parent,e,t)}class He extends ke{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\uFEFF";static value(){}constructor(e,t,n){super(e,t),this.selection=n,this.textNode=document.createTextNode(He.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(e,t){if(this.savedLength!==0){super.format(e,t);return}let n=this,s=0;for(;n!=null&&n.statics.scope!==V.BLOCK_BLOT;)s+=n.offset(n.parent),n=n.parent;n!=null&&(this.savedLength=He.CONTENTS.length,n.optimize(),n.formatAt(s,He.CONTENTS.length,e,t),this.savedLength=0)}index(e,t){return e===this.textNode?0:super.index(e,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const e=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const t=this.prev instanceof Ve?this.prev:null,n=t?t.length():0,s=this.next instanceof Ve?this.next:null,i=s?s.text:"",{textNode:a}=this,l=a.data.split(He.CONTENTS).join("");a.data=He.CONTENTS;let c;if(t)c=t,(l||s)&&(t.insertAt(t.length(),l+i),s&&s.remove());else if(s)c=s,s.insertAt(0,l);else{const u=document.createTextNode(l);c=this.scroll.create(u),this.parent.insertBefore(c,this)}if(this.remove(),e){const u=(f,b)=>t&&f===t.domNode?b:f===a?n+b-1:s&&f===s.domNode?n+l.length+b:null,h=u(e.start.node,e.start.offset),g=u(e.end.node,e.end.offset);if(h!==null&&g!==null)return{startNode:c.domNode,startOffset:h,endNode:c.domNode,endOffset:g}}return null}update(e,t){if(e.some(n=>n.type==="characterData"&&n.target===this.textNode)){const n=this.restore();n&&(t.range=n)}}optimize(e){super.optimize(e);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=He.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}}var ei={exports:{}},no;function fg(){return no||(no=1,function(r){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function s(c,u,h){this.fn=c,this.context=u,this.once=h||!1}function i(c,u,h,g,f){if(typeof h!="function")throw new TypeError("The listener must be a function");var b=new s(h,g||c,f),x=t?t+u:u;return c._events[x]?c._events[x].fn?c._events[x]=[c._events[x],b]:c._events[x].push(b):(c._events[x]=b,c._eventsCount++),c}function a(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],h,g;if(this._eventsCount===0)return u;for(g in h=this._events)e.call(h,g)&&u.push(t?g.slice(1):g);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(h)):u},l.prototype.listeners=function(u){var h=t?t+u:u,g=this._events[h];if(!g)return[];if(g.fn)return[g.fn];for(var f=0,b=g.length,x=new Array(b);f<b;f++)x[f]=g[f].fn;return x},l.prototype.listenerCount=function(u){var h=t?t+u:u,g=this._events[h];return g?g.fn?1:g.length:0},l.prototype.emit=function(u,h,g,f,b,x){var y=t?t+u:u;if(!this._events[y])return!1;var N=this._events[y],S=arguments.length,_,j;if(N.fn){switch(N.once&&this.removeListener(u,N.fn,void 0,!0),S){case 1:return N.fn.call(N.context),!0;case 2:return N.fn.call(N.context,h),!0;case 3:return N.fn.call(N.context,h,g),!0;case 4:return N.fn.call(N.context,h,g,f),!0;case 5:return N.fn.call(N.context,h,g,f,b),!0;case 6:return N.fn.call(N.context,h,g,f,b,x),!0}for(j=1,_=new Array(S-1);j<S;j++)_[j-1]=arguments[j];N.fn.apply(N.context,_)}else{var $=N.length,m;for(j=0;j<$;j++)switch(N[j].once&&this.removeListener(u,N[j].fn,void 0,!0),S){case 1:N[j].fn.call(N[j].context);break;case 2:N[j].fn.call(N[j].context,h);break;case 3:N[j].fn.call(N[j].context,h,g);break;case 4:N[j].fn.call(N[j].context,h,g,f);break;default:if(!_)for(m=1,_=new Array(S-1);m<S;m++)_[m-1]=arguments[m];N[j].fn.apply(N[j].context,_)}}return!0},l.prototype.on=function(u,h,g){return i(this,u,h,g,!1)},l.prototype.once=function(u,h,g){return i(this,u,h,g,!0)},l.prototype.removeListener=function(u,h,g,f){var b=t?t+u:u;if(!this._events[b])return this;if(!h)return a(this,b),this;var x=this._events[b];if(x.fn)x.fn===h&&(!f||x.once)&&(!g||x.context===g)&&a(this,b);else{for(var y=0,N=[],S=x.length;y<S;y++)(x[y].fn!==h||f&&!x[y].once||g&&x[y].context!==g)&&N.push(x[y]);N.length?this._events[b]=N.length===1?N[0]:N:a(this,b)}return this},l.prototype.removeAllListeners=function(u){var h;return u?(h=t?t+u:u,this._events[h]&&a(this,h)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=t,l.EventEmitter=l,r.exports=l}(ei)),ei.exports}var pg=fg();const gg=Si(pg),wi=new WeakMap,Ni=["error","warn","log","info"];let Ti="warn";function Ml(r){if(Ti&&Ni.indexOf(r)<=Ni.indexOf(Ti)){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];console[r](...t)}}function dt(r){return Ni.reduce((e,t)=>(e[t]=Ml.bind(console,t,r),e),{})}dt.level=r=>{Ti=r};Ml.level=dt.level;const ti=dt("quill:events"),mg=["selectionchange","mousedown","mouseup","click"];mg.forEach(r=>{document.addEventListener(r,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Array.from(document.querySelectorAll(".ql-container")).forEach(s=>{const i=wi.get(s);i&&i.emitter&&i.emitter.handleDOM(...t)})})});class z extends gg{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super(),this.domListeners={},this.on("error",ti.error)}emit(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ti.log.call(ti,...t),super.emit(...t)}handleDOM(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];(this.domListeners[e.type]||[]).forEach(i=>{let{node:a,handler:l}=i;(e.target===a||a.contains(e.target))&&l(e,...n)})}listenDOM(e,t,n){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:t,handler:n})}}const ri=dt("quill:selection");class Dt{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=e,this.length=t}}class bg{constructor(e,t){this.emitter=t,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Dt(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,z.sources.USER),1)}),this.emitter.on(z.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const n=this.getNativeRange();n!=null&&n.start.node!==this.cursor.textNode&&this.emitter.once(z.events.SCROLL_UPDATE,(s,i)=>{try{this.root.contains(n.start.node)&&this.root.contains(n.end.node)&&this.setNativeRange(n.start.node,n.start.offset,n.end.node,n.end.offset);const a=i.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(a?z.sources.SILENT:s)}catch{}})}),this.emitter.on(z.events.SCROLL_OPTIMIZE,(n,s)=>{if(s.range){const{startNode:i,startOffset:a,endNode:l,endOffset:c}=s.range;this.setNativeRange(i,a,l,c),this.update(z.sources.SILENT)}}),this.update(z.sources.SILENT)}handleComposition(){this.emitter.on(z.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(z.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const e=this.cursor.restore();if(!e)return;setTimeout(()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(z.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,t){this.scroll.update();const n=this.getNativeRange();if(!(n==null||!n.native.collapsed||this.scroll.query(e,V.BLOCK))){if(n.start.node!==this.cursor.textNode){const s=this.scroll.find(n.start.node,!1);if(s==null)return;if(s instanceof Ae){const i=s.split(n.start.offset);s.parent.insertBefore(this.cursor,i)}else s.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;let s,[i,a]=this.scroll.leaf(e);if(i==null)return null;if(t>0&&a===i.length()){const[h]=this.scroll.leaf(e+1);if(h){const[g]=this.scroll.line(e),[f]=this.scroll.line(e+1);g===f&&(i=h,a=0)}}[s,a]=i.position(a,!0);const l=document.createRange();if(t>0)return l.setStart(s,a),[i,a]=this.scroll.leaf(e+t),i==null?null:([s,a]=i.position(a,!0),l.setEnd(s,a),l.getBoundingClientRect());let c="left",u;if(s instanceof Text){if(!s.data.length)return null;a<s.data.length?(l.setStart(s,a),l.setEnd(s,a+1)):(l.setStart(s,a-1),l.setEnd(s,a),c="right"),u=l.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;u=i.domNode.getBoundingClientRect(),a>0&&(c="right")}return{bottom:u.top+u.height,height:u.height,left:u[c],right:u[c],top:u.top,width:0}}getNativeRange(){const e=document.getSelection();if(e==null||e.rangeCount<=0)return null;const t=e.getRangeAt(0);if(t==null)return null;const n=this.normalizeNative(t);return ri.info("getNativeRange",n),n}getRange(){const e=this.scroll.domNode;if("isConnected"in e&&!e.isConnected)return[null,null];const t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&ni(this.root,document.activeElement)}normalizedToRange(e){const t=[[e.start.node,e.start.offset]];e.native.collapsed||t.push([e.end.node,e.end.offset]);const n=t.map(a=>{const[l,c]=a,u=this.scroll.find(l,!0),h=u.offset(this.scroll);return c===0?h:u instanceof Ae?h+u.index(l,c):h+u.length()}),s=Math.min(Math.max(...n),this.scroll.length()-1),i=Math.min(s,...n);return new Dt(i,s-i)}normalizeNative(e){if(!ni(this.root,e.startContainer)||!e.collapsed&&!ni(this.root,e.endContainer))return null;const t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(n=>{let{node:s,offset:i}=n;for(;!(s instanceof Text)&&s.childNodes.length>0;)if(s.childNodes.length>i)s=s.childNodes[i],i=0;else if(s.childNodes.length===i)s=s.lastChild,s instanceof Text?i=s.data.length:s.childNodes.length>0?i=s.childNodes.length:i=s.childNodes.length+1;else break;n.node=s,n.offset=i}),t}rangeToNative(e){const t=this.scroll.length(),n=(s,i)=>{s=Math.min(t-1,s);const[a,l]=this.scroll.leaf(s);return a?a.position(l,i):[null,-1]};return[...n(e.index,!1),...n(e.index+e.length,!0)]}setNativeRange(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(ri.info("setNativeRange",e,t,n,s),e!=null&&(this.root.parentNode==null||e.parentNode==null||n.parentNode==null))return;const a=document.getSelection();if(a!=null)if(e!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:l}=this.getNativeRange()||{};if(l==null||i||e!==l.startContainer||t!==l.startOffset||n!==l.endContainer||s!==l.endOffset){e instanceof Element&&e.tagName==="BR"&&(t=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),n instanceof Element&&n.tagName==="BR"&&(s=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);const c=document.createRange();c.setStart(e,t),c.setEnd(n,s),a.removeAllRanges(),a.addRange(c)}}else a.removeAllRanges(),this.root.blur()}setRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:z.sources.API;if(typeof t=="string"&&(n=t,t=!1),ri.info("setRange",e),e!=null){const s=this.rangeToNative(e);this.setNativeRange(...s,t)}else this.setNativeRange(null);this.update(n)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:z.sources.USER;const t=this.lastRange,[n,s]=this.getRange();if(this.lastRange=n,this.lastNative=s,this.lastRange!=null&&(this.savedRange=this.lastRange),!mt(t,this.lastRange)){if(!this.composing&&s!=null&&s.native.collapsed&&s.start.node!==this.cursor.textNode){const a=this.cursor.restore();a&&this.setNativeRange(a.startNode,a.startOffset,a.endNode,a.endOffset)}const i=[z.events.SELECTION_CHANGE,ur(this.lastRange),ur(t),e];this.emitter.emit(z.events.EDITOR_CHANGE,...i),e!==z.sources.SILENT&&this.emitter.emit(...i)}}}function ni(r,e){try{e.parentNode}catch{return!1}return r.contains(e)}const vg=/^[ -~]*$/;class yg{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();const n=so(e),s=new G;return xg(n.ops.slice()).reduce((a,l)=>{const c=Pe.Op.length(l);let u=l.attributes||{},h=!1,g=!1;if(l.insert!=null){if(s.retain(c),typeof l.insert=="string"){const x=l.insert;g=!x.endsWith(`
27
+ `,qe(r))}function qe(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return r==null||("formats"in r&&typeof r.formats=="function"&&(e={...e,...r.formats()},t&&delete e["code-token"]),r.parent==null||r.parent.statics.blotName==="scroll"||r.parent.statics.scope!==r.statics.scope)?e:qe(r.parent,e,t)}class He extends ke{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\uFEFF";static value(){}constructor(e,t,n){super(e,t),this.selection=n,this.textNode=document.createTextNode(He.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(e,t){if(this.savedLength!==0){super.format(e,t);return}let n=this,s=0;for(;n!=null&&n.statics.scope!==V.BLOCK_BLOT;)s+=n.offset(n.parent),n=n.parent;n!=null&&(this.savedLength=He.CONTENTS.length,n.optimize(),n.formatAt(s,He.CONTENTS.length,e,t),this.savedLength=0)}index(e,t){return e===this.textNode?0:super.index(e,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const e=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const t=this.prev instanceof Ve?this.prev:null,n=t?t.length():0,s=this.next instanceof Ve?this.next:null,i=s?s.text:"",{textNode:a}=this,l=a.data.split(He.CONTENTS).join("");a.data=He.CONTENTS;let c;if(t)c=t,(l||s)&&(t.insertAt(t.length(),l+i),s&&s.remove());else if(s)c=s,s.insertAt(0,l);else{const u=document.createTextNode(l);c=this.scroll.create(u),this.parent.insertBefore(c,this)}if(this.remove(),e){const u=(f,b)=>t&&f===t.domNode?b:f===a?n+b-1:s&&f===s.domNode?n+l.length+b:null,h=u(e.start.node,e.start.offset),g=u(e.end.node,e.end.offset);if(h!==null&&g!==null)return{startNode:c.domNode,startOffset:h,endNode:c.domNode,endOffset:g}}return null}update(e,t){if(e.some(n=>n.type==="characterData"&&n.target===this.textNode)){const n=this.restore();n&&(t.range=n)}}optimize(e){super.optimize(e);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=He.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}}var ei={exports:{}},so;function fg(){return so||(so=1,function(r){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function s(c,u,h){this.fn=c,this.context=u,this.once=h||!1}function i(c,u,h,g,f){if(typeof h!="function")throw new TypeError("The listener must be a function");var b=new s(h,g||c,f),x=t?t+u:u;return c._events[x]?c._events[x].fn?c._events[x]=[c._events[x],b]:c._events[x].push(b):(c._events[x]=b,c._eventsCount++),c}function a(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],h,g;if(this._eventsCount===0)return u;for(g in h=this._events)e.call(h,g)&&u.push(t?g.slice(1):g);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(h)):u},l.prototype.listeners=function(u){var h=t?t+u:u,g=this._events[h];if(!g)return[];if(g.fn)return[g.fn];for(var f=0,b=g.length,x=new Array(b);f<b;f++)x[f]=g[f].fn;return x},l.prototype.listenerCount=function(u){var h=t?t+u:u,g=this._events[h];return g?g.fn?1:g.length:0},l.prototype.emit=function(u,h,g,f,b,x){var y=t?t+u:u;if(!this._events[y])return!1;var N=this._events[y],S=arguments.length,_,j;if(N.fn){switch(N.once&&this.removeListener(u,N.fn,void 0,!0),S){case 1:return N.fn.call(N.context),!0;case 2:return N.fn.call(N.context,h),!0;case 3:return N.fn.call(N.context,h,g),!0;case 4:return N.fn.call(N.context,h,g,f),!0;case 5:return N.fn.call(N.context,h,g,f,b),!0;case 6:return N.fn.call(N.context,h,g,f,b,x),!0}for(j=1,_=new Array(S-1);j<S;j++)_[j-1]=arguments[j];N.fn.apply(N.context,_)}else{var $=N.length,m;for(j=0;j<$;j++)switch(N[j].once&&this.removeListener(u,N[j].fn,void 0,!0),S){case 1:N[j].fn.call(N[j].context);break;case 2:N[j].fn.call(N[j].context,h);break;case 3:N[j].fn.call(N[j].context,h,g);break;case 4:N[j].fn.call(N[j].context,h,g,f);break;default:if(!_)for(m=1,_=new Array(S-1);m<S;m++)_[m-1]=arguments[m];N[j].fn.apply(N[j].context,_)}}return!0},l.prototype.on=function(u,h,g){return i(this,u,h,g,!1)},l.prototype.once=function(u,h,g){return i(this,u,h,g,!0)},l.prototype.removeListener=function(u,h,g,f){var b=t?t+u:u;if(!this._events[b])return this;if(!h)return a(this,b),this;var x=this._events[b];if(x.fn)x.fn===h&&(!f||x.once)&&(!g||x.context===g)&&a(this,b);else{for(var y=0,N=[],S=x.length;y<S;y++)(x[y].fn!==h||f&&!x[y].once||g&&x[y].context!==g)&&N.push(x[y]);N.length?this._events[b]=N.length===1?N[0]:N:a(this,b)}return this},l.prototype.removeAllListeners=function(u){var h;return u?(h=t?t+u:u,this._events[h]&&a(this,h)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=t,l.EventEmitter=l,r.exports=l}(ei)),ei.exports}var pg=fg();const gg=_i(pg),Ni=new WeakMap,Ti=["error","warn","log","info"];let Ai="warn";function Ml(r){if(Ai&&Ti.indexOf(r)<=Ti.indexOf(Ai)){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];console[r](...t)}}function dt(r){return Ti.reduce((e,t)=>(e[t]=Ml.bind(console,t,r),e),{})}dt.level=r=>{Ai=r};Ml.level=dt.level;const ti=dt("quill:events"),mg=["selectionchange","mousedown","mouseup","click"];mg.forEach(r=>{document.addEventListener(r,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Array.from(document.querySelectorAll(".ql-container")).forEach(s=>{const i=Ni.get(s);i&&i.emitter&&i.emitter.handleDOM(...t)})})});class z extends gg{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super(),this.domListeners={},this.on("error",ti.error)}emit(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ti.log.call(ti,...t),super.emit(...t)}handleDOM(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];(this.domListeners[e.type]||[]).forEach(i=>{let{node:a,handler:l}=i;(e.target===a||a.contains(e.target))&&l(e,...n)})}listenDOM(e,t,n){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:t,handler:n})}}const ri=dt("quill:selection");class Dt{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=e,this.length=t}}class bg{constructor(e,t){this.emitter=t,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Dt(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,z.sources.USER),1)}),this.emitter.on(z.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const n=this.getNativeRange();n!=null&&n.start.node!==this.cursor.textNode&&this.emitter.once(z.events.SCROLL_UPDATE,(s,i)=>{try{this.root.contains(n.start.node)&&this.root.contains(n.end.node)&&this.setNativeRange(n.start.node,n.start.offset,n.end.node,n.end.offset);const a=i.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(a?z.sources.SILENT:s)}catch{}})}),this.emitter.on(z.events.SCROLL_OPTIMIZE,(n,s)=>{if(s.range){const{startNode:i,startOffset:a,endNode:l,endOffset:c}=s.range;this.setNativeRange(i,a,l,c),this.update(z.sources.SILENT)}}),this.update(z.sources.SILENT)}handleComposition(){this.emitter.on(z.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(z.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const e=this.cursor.restore();if(!e)return;setTimeout(()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(z.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,t){this.scroll.update();const n=this.getNativeRange();if(!(n==null||!n.native.collapsed||this.scroll.query(e,V.BLOCK))){if(n.start.node!==this.cursor.textNode){const s=this.scroll.find(n.start.node,!1);if(s==null)return;if(s instanceof Ae){const i=s.split(n.start.offset);s.parent.insertBefore(this.cursor,i)}else s.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;let s,[i,a]=this.scroll.leaf(e);if(i==null)return null;if(t>0&&a===i.length()){const[h]=this.scroll.leaf(e+1);if(h){const[g]=this.scroll.line(e),[f]=this.scroll.line(e+1);g===f&&(i=h,a=0)}}[s,a]=i.position(a,!0);const l=document.createRange();if(t>0)return l.setStart(s,a),[i,a]=this.scroll.leaf(e+t),i==null?null:([s,a]=i.position(a,!0),l.setEnd(s,a),l.getBoundingClientRect());let c="left",u;if(s instanceof Text){if(!s.data.length)return null;a<s.data.length?(l.setStart(s,a),l.setEnd(s,a+1)):(l.setStart(s,a-1),l.setEnd(s,a),c="right"),u=l.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;u=i.domNode.getBoundingClientRect(),a>0&&(c="right")}return{bottom:u.top+u.height,height:u.height,left:u[c],right:u[c],top:u.top,width:0}}getNativeRange(){const e=document.getSelection();if(e==null||e.rangeCount<=0)return null;const t=e.getRangeAt(0);if(t==null)return null;const n=this.normalizeNative(t);return ri.info("getNativeRange",n),n}getRange(){const e=this.scroll.domNode;if("isConnected"in e&&!e.isConnected)return[null,null];const t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&ni(this.root,document.activeElement)}normalizedToRange(e){const t=[[e.start.node,e.start.offset]];e.native.collapsed||t.push([e.end.node,e.end.offset]);const n=t.map(a=>{const[l,c]=a,u=this.scroll.find(l,!0),h=u.offset(this.scroll);return c===0?h:u instanceof Ae?h+u.index(l,c):h+u.length()}),s=Math.min(Math.max(...n),this.scroll.length()-1),i=Math.min(s,...n);return new Dt(i,s-i)}normalizeNative(e){if(!ni(this.root,e.startContainer)||!e.collapsed&&!ni(this.root,e.endContainer))return null;const t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(n=>{let{node:s,offset:i}=n;for(;!(s instanceof Text)&&s.childNodes.length>0;)if(s.childNodes.length>i)s=s.childNodes[i],i=0;else if(s.childNodes.length===i)s=s.lastChild,s instanceof Text?i=s.data.length:s.childNodes.length>0?i=s.childNodes.length:i=s.childNodes.length+1;else break;n.node=s,n.offset=i}),t}rangeToNative(e){const t=this.scroll.length(),n=(s,i)=>{s=Math.min(t-1,s);const[a,l]=this.scroll.leaf(s);return a?a.position(l,i):[null,-1]};return[...n(e.index,!1),...n(e.index+e.length,!0)]}setNativeRange(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(ri.info("setNativeRange",e,t,n,s),e!=null&&(this.root.parentNode==null||e.parentNode==null||n.parentNode==null))return;const a=document.getSelection();if(a!=null)if(e!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:l}=this.getNativeRange()||{};if(l==null||i||e!==l.startContainer||t!==l.startOffset||n!==l.endContainer||s!==l.endOffset){e instanceof Element&&e.tagName==="BR"&&(t=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),n instanceof Element&&n.tagName==="BR"&&(s=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);const c=document.createRange();c.setStart(e,t),c.setEnd(n,s),a.removeAllRanges(),a.addRange(c)}}else a.removeAllRanges(),this.root.blur()}setRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:z.sources.API;if(typeof t=="string"&&(n=t,t=!1),ri.info("setRange",e),e!=null){const s=this.rangeToNative(e);this.setNativeRange(...s,t)}else this.setNativeRange(null);this.update(n)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:z.sources.USER;const t=this.lastRange,[n,s]=this.getRange();if(this.lastRange=n,this.lastNative=s,this.lastRange!=null&&(this.savedRange=this.lastRange),!mt(t,this.lastRange)){if(!this.composing&&s!=null&&s.native.collapsed&&s.start.node!==this.cursor.textNode){const a=this.cursor.restore();a&&this.setNativeRange(a.startNode,a.startOffset,a.endNode,a.endOffset)}const i=[z.events.SELECTION_CHANGE,ur(this.lastRange),ur(t),e];this.emitter.emit(z.events.EDITOR_CHANGE,...i),e!==z.sources.SILENT&&this.emitter.emit(...i)}}}function ni(r,e){try{e.parentNode}catch{return!1}return r.contains(e)}const vg=/^[ -~]*$/;class yg{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();const n=io(e),s=new G;return xg(n.ops.slice()).reduce((a,l)=>{const c=Pe.Op.length(l);let u=l.attributes||{},h=!1,g=!1;if(l.insert!=null){if(s.retain(c),typeof l.insert=="string"){const x=l.insert;g=!x.endsWith(`
28
28
  `)&&(t<=a||!!this.scroll.descendant(Me,a)[0]),this.scroll.insertAt(a,x);const[y,N]=this.scroll.line(a);let S=Et({},qe(y));if(y instanceof Ee){const[_]=y.descendant(Ae,N);_&&(S=Et(S,qe(_)))}u=Pe.AttributeMap.diff(S,u)||{}}else if(typeof l.insert=="object"){const x=Object.keys(l.insert)[0];if(x==null)return a;const y=this.scroll.query(x,V.INLINE)!=null;if(y)(t<=a||this.scroll.descendant(Me,a)[0])&&(g=!0);else if(a>0){const[N,S]=this.scroll.descendant(Ae,a-1);N instanceof Ve?N.value()[S]!==`
29
- `&&(h=!0):N instanceof ke&&N.statics.scope===V.INLINE_BLOT&&(h=!0)}if(this.scroll.insertAt(a,x,l.insert[x]),y){const[N]=this.scroll.descendant(Ae,a);if(N){const S=Et({},qe(N));u=Pe.AttributeMap.diff(S,u)||{}}}}t+=c}else if(s.push(l),l.retain!==null&&typeof l.retain=="object"){const x=Object.keys(l.retain)[0];if(x==null)return a;this.scroll.updateEmbedAt(a,x,l.retain[x])}Object.keys(u).forEach(x=>{this.scroll.formatAt(a,c,x,u[x])});const f=h?1:0,b=g?1:0;return t+=f+b,s.retain(f),s.delete(b),a+c+f+b},0),s.reduce((a,l)=>typeof l.delete=="number"?(this.scroll.deleteAt(a,l.delete),a):a+Pe.Op.length(l),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(e,t){return this.scroll.deleteAt(e,t),this.update(new G().retain(e).delete(t))}formatLine(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach(i=>{this.scroll.lines(e,Math.max(t,1)).forEach(a=>{a.format(i,n[i])})}),this.scroll.optimize();const s=new G().retain(e).retain(t,ur(n));return this.update(s)}formatText(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(n).forEach(i=>{this.scroll.formatAt(e,t,i,n[i])});const s=new G().retain(e).retain(t,ur(n));return this.update(s)}getContents(e,t){return this.delta.slice(e,e+t)}getDelta(){return this.scroll.lines().reduce((e,t)=>e.concat(t.delta()),new G)}getFormat(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=[],s=[];t===0?this.scroll.path(e).forEach(l=>{const[c]=l;c instanceof Ee?n.push(c):c instanceof Ae&&s.push(c)}):(n=this.scroll.lines(e,t),s=this.scroll.descendants(Ae,e,t));const[i,a]=[n,s].map(l=>{const c=l.shift();if(c==null)return{};let u=qe(c);for(;Object.keys(u).length>0;){const h=l.shift();if(h==null)return u;u=Eg(qe(h),u)}return u});return{...i,...a}}getHTML(e,t){const[n,s]=this.scroll.line(e);if(n){const i=n.length();return n.length()>=s+t&&!(s===0&&t===i)?Jr(n,s,t,!0):Jr(this.scroll,e,t,!0)}return""}getText(e,t){return this.getContents(e,t).filter(n=>typeof n.insert=="string").map(n=>n.insert).join("")}insertContents(e,t){const n=so(t),s=new G().retain(e).concat(n);return this.scroll.insertContents(e,n),this.update(s)}insertEmbed(e,t,n){return this.scroll.insertAt(e,t,n),this.update(new G().retain(e).insert({[t]:n}))}insertText(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
29
+ `&&(h=!0):N instanceof ke&&N.statics.scope===V.INLINE_BLOT&&(h=!0)}if(this.scroll.insertAt(a,x,l.insert[x]),y){const[N]=this.scroll.descendant(Ae,a);if(N){const S=Et({},qe(N));u=Pe.AttributeMap.diff(S,u)||{}}}}t+=c}else if(s.push(l),l.retain!==null&&typeof l.retain=="object"){const x=Object.keys(l.retain)[0];if(x==null)return a;this.scroll.updateEmbedAt(a,x,l.retain[x])}Object.keys(u).forEach(x=>{this.scroll.formatAt(a,c,x,u[x])});const f=h?1:0,b=g?1:0;return t+=f+b,s.retain(f),s.delete(b),a+c+f+b},0),s.reduce((a,l)=>typeof l.delete=="number"?(this.scroll.deleteAt(a,l.delete),a):a+Pe.Op.length(l),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(e,t){return this.scroll.deleteAt(e,t),this.update(new G().retain(e).delete(t))}formatLine(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach(i=>{this.scroll.lines(e,Math.max(t,1)).forEach(a=>{a.format(i,n[i])})}),this.scroll.optimize();const s=new G().retain(e).retain(t,ur(n));return this.update(s)}formatText(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(n).forEach(i=>{this.scroll.formatAt(e,t,i,n[i])});const s=new G().retain(e).retain(t,ur(n));return this.update(s)}getContents(e,t){return this.delta.slice(e,e+t)}getDelta(){return this.scroll.lines().reduce((e,t)=>e.concat(t.delta()),new G)}getFormat(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=[],s=[];t===0?this.scroll.path(e).forEach(l=>{const[c]=l;c instanceof Ee?n.push(c):c instanceof Ae&&s.push(c)}):(n=this.scroll.lines(e,t),s=this.scroll.descendants(Ae,e,t));const[i,a]=[n,s].map(l=>{const c=l.shift();if(c==null)return{};let u=qe(c);for(;Object.keys(u).length>0;){const h=l.shift();if(h==null)return u;u=Eg(qe(h),u)}return u});return{...i,...a}}getHTML(e,t){const[n,s]=this.scroll.line(e);if(n){const i=n.length();return n.length()>=s+t&&!(s===0&&t===i)?Jr(n,s,t,!0):Jr(this.scroll,e,t,!0)}return""}getText(e,t){return this.getContents(e,t).filter(n=>typeof n.insert=="string").map(n=>n.insert).join("")}insertContents(e,t){const n=io(t),s=new G().retain(e).concat(n);return this.scroll.insertContents(e,n),this.update(s)}insertEmbed(e,t,n){return this.scroll.insertAt(e,t,n),this.update(new G().retain(e).insert({[t]:n}))}insertText(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
30
30
  `).replace(/\r/g,`
31
31
  `),this.scroll.insertAt(e,t),Object.keys(n).forEach(s=>{this.scroll.formatAt(e,t.length,s,n[s])}),this.update(new G().retain(e).insert(t,ur(n)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const e=this.scroll.children.head;if(e?.statics.blotName!==Ee.blotName)return!1;const t=e;return t.children.length>1?!1:t.children.head instanceof Ke}removeFormat(e,t){const n=this.getText(e,t),[s,i]=this.scroll.line(e+t);let a=0,l=new G;s!=null&&(a=s.length()-i,l=s.delta().slice(i,i+a-1).insert(`
32
- `));const u=this.getContents(e,t+a).diff(new G().insert(n).concat(l)),h=new G().retain(e).concat(u);return this.applyDelta(h)}update(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const s=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(vg)&&this.scroll.find(t[0].target)){const i=this.scroll.find(t[0].target),a=qe(i),l=i.offset(this.scroll),c=t[0].oldValue.replace(He.CONTENTS,""),u=new G().insert(c),h=new G().insert(i.value()),g=n&&{oldRange:io(n.oldRange,-l),newRange:io(n.newRange,-l)};e=new G().retain(l).concat(u.diff(h,g)).reduce((b,x)=>x.insert?b.insert(x.insert,a):b.push(x),new G),this.delta=s.compose(e)}else this.delta=this.getDelta(),(!e||!mt(s.compose(e),this.delta))&&(e=s.diff(this.delta,n));return e}}function cr(r,e,t){if(r.length===0){const[b]=si(t.pop());return e<=0?`</li></${b}>`:`</li></${b}>${cr([],e-1,t)}`}const[{child:n,offset:s,length:i,indent:a,type:l},...c]=r,[u,h]=si(l);if(a>e)return t.push(l),a===e+1?`<${u}><li${h}>${Jr(n,s,i)}${cr(c,a,t)}`:`<${u}><li>${cr(r,e+1,t)}`;const g=t[t.length-1];if(a===e&&l===g)return`</li><li${h}>${Jr(n,s,i)}${cr(c,a,t)}`;const[f]=si(t.pop());return`</li></${f}>${cr(r,e-1,t)}`}function Jr(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in r&&typeof r.html=="function")return r.html(e,t);if(r instanceof Ve)return es(r.value().slice(e,e+t)).replaceAll(" ","&nbsp;");if(r instanceof Ge){if(r.statics.blotName==="list-container"){const u=[];return r.children.forEachAt(e,t,(h,g,f)=>{const b="formats"in h&&typeof h.formats=="function"?h.formats():{};u.push({child:h,offset:g,length:f,indent:b.indent||0,type:b.list})}),cr(u,-1,[])}const s=[];if(r.children.forEachAt(e,t,(u,h,g)=>{s.push(Jr(u,h,g))}),n||r.statics.blotName==="list")return s.join("");const{outerHTML:i,innerHTML:a}=r.domNode,[l,c]=i.split(`>${a}<`);return l==="<table"?`<table style="border: 1px solid #000;">${s.join("")}<${c}`:`${l}>${s.join("")}<${c}`}return r.domNode instanceof Element?r.domNode.outerHTML:""}function Eg(r,e){return Object.keys(e).reduce((t,n)=>{if(r[n]==null)return t;const s=e[n];return s===r[n]?t[n]=s:Array.isArray(s)?s.indexOf(r[n])<0?t[n]=s.concat([r[n]]):t[n]=s:t[n]=[s,r[n]],t},{})}function si(r){const e=r==="ordered"?"ol":"ul";switch(r){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function so(r){return r.reduce((e,t)=>{if(typeof t.insert=="string"){const n=t.insert.replace(/\r\n/g,`
32
+ `));const u=this.getContents(e,t+a).diff(new G().insert(n).concat(l)),h=new G().retain(e).concat(u);return this.applyDelta(h)}update(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const s=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(vg)&&this.scroll.find(t[0].target)){const i=this.scroll.find(t[0].target),a=qe(i),l=i.offset(this.scroll),c=t[0].oldValue.replace(He.CONTENTS,""),u=new G().insert(c),h=new G().insert(i.value()),g=n&&{oldRange:ao(n.oldRange,-l),newRange:ao(n.newRange,-l)};e=new G().retain(l).concat(u.diff(h,g)).reduce((b,x)=>x.insert?b.insert(x.insert,a):b.push(x),new G),this.delta=s.compose(e)}else this.delta=this.getDelta(),(!e||!mt(s.compose(e),this.delta))&&(e=s.diff(this.delta,n));return e}}function cr(r,e,t){if(r.length===0){const[b]=si(t.pop());return e<=0?`</li></${b}>`:`</li></${b}>${cr([],e-1,t)}`}const[{child:n,offset:s,length:i,indent:a,type:l},...c]=r,[u,h]=si(l);if(a>e)return t.push(l),a===e+1?`<${u}><li${h}>${Jr(n,s,i)}${cr(c,a,t)}`:`<${u}><li>${cr(r,e+1,t)}`;const g=t[t.length-1];if(a===e&&l===g)return`</li><li${h}>${Jr(n,s,i)}${cr(c,a,t)}`;const[f]=si(t.pop());return`</li></${f}>${cr(r,e-1,t)}`}function Jr(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in r&&typeof r.html=="function")return r.html(e,t);if(r instanceof Ve)return es(r.value().slice(e,e+t)).replaceAll(" ","&nbsp;");if(r instanceof Ge){if(r.statics.blotName==="list-container"){const u=[];return r.children.forEachAt(e,t,(h,g,f)=>{const b="formats"in h&&typeof h.formats=="function"?h.formats():{};u.push({child:h,offset:g,length:f,indent:b.indent||0,type:b.list})}),cr(u,-1,[])}const s=[];if(r.children.forEachAt(e,t,(u,h,g)=>{s.push(Jr(u,h,g))}),n||r.statics.blotName==="list")return s.join("");const{outerHTML:i,innerHTML:a}=r.domNode,[l,c]=i.split(`>${a}<`);return l==="<table"?`<table style="border: 1px solid #000;">${s.join("")}<${c}`:`${l}>${s.join("")}<${c}`}return r.domNode instanceof Element?r.domNode.outerHTML:""}function Eg(r,e){return Object.keys(e).reduce((t,n)=>{if(r[n]==null)return t;const s=e[n];return s===r[n]?t[n]=s:Array.isArray(s)?s.indexOf(r[n])<0?t[n]=s.concat([r[n]]):t[n]=s:t[n]=[s,r[n]],t},{})}function si(r){const e=r==="ordered"?"ol":"ul";switch(r){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function io(r){return r.reduce((e,t)=>{if(typeof t.insert=="string"){const n=t.insert.replace(/\r\n/g,`
33
33
  `).replace(/\r/g,`
34
- `);return e.insert(n,t.attributes)}return e.push(t)},new G)}function io(r,e){let{index:t,length:n}=r;return new Dt(t+e,n)}function xg(r){const e=[];return r.forEach(t=>{typeof t.insert=="string"?t.insert.split(`
34
+ `);return e.insert(n,t.attributes)}return e.push(t)},new G)}function ao(r,e){let{index:t,length:n}=r;return new Dt(t+e,n)}function xg(r){const e=[];return r.forEach(t=>{typeof t.insert=="string"?t.insert.split(`
35
35
  `).forEach((s,i)=>{i&&e.push({insert:`
36
- `,attributes:t.attributes}),s&&e.push({insert:s,attributes:t.attributes})}):e.push(t)}),e}class rt{static DEFAULTS={};constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=e,this.options=t}}const qn="\uFEFF";class Pi extends ke{constructor(e,t){super(e,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(n=>{this.contentNode.appendChild(n)}),this.leftGuard=document.createTextNode(qn),this.rightGuard=document.createTextNode(qn),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,t){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,t)}restore(e){let t=null,n;const s=e.data.split(qn).join("");if(e===this.leftGuard)if(this.prev instanceof Ve){const i=this.prev.length();this.prev.insertAt(i,s),t={startNode:this.prev.domNode,startOffset:i+s.length}}else n=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(n),this),t={startNode:n,startOffset:s.length};else e===this.rightGuard&&(this.next instanceof Ve?(this.next.insertAt(0,s),t={startNode:this.next.domNode,startOffset:s.length}):(n=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(n),this.next),t={startNode:n,startOffset:s.length}));return e.data=qn,t}update(e,t){e.forEach(n=>{if(n.type==="characterData"&&(n.target===this.leftGuard||n.target===this.rightGuard)){const s=this.restore(n.target);s&&(t.range=s)}})}}class wg{isComposing=!1;constructor(e,t){this.scroll=e,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",e=>{this.isComposing||this.handleCompositionStart(e)}),this.scroll.domNode.addEventListener("compositionend",e=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(e)})})}handleCompositionStart(e){const t=e.target instanceof Node?this.scroll.find(e.target,!0):null;t&&!(t instanceof Pi)&&(this.emitter.emit(z.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit(z.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit(z.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit(z.events.COMPOSITION_END,e),this.isComposing=!1}}class mr{static DEFAULTS={modules:{}};static themes={default:mr};modules={};constructor(e,t){this.quill=e,this.options=t}init(){Object.keys(this.options.modules).forEach(e=>{this.modules[e]==null&&this.addModule(e)})}addModule(e){const t=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}const Ng=r=>r.parentElement||r.getRootNode().host||null,Tg=r=>{const e=r.getBoundingClientRect(),t="offsetWidth"in r&&Math.abs(e.width)/r.offsetWidth||1,n="offsetHeight"in r&&Math.abs(e.height)/r.offsetHeight||1;return{top:e.top,right:e.left+r.clientWidth*t,bottom:e.top+r.clientHeight*n,left:e.left}},Dn=r=>{const e=parseInt(r,10);return Number.isNaN(e)?0:e},ao=(r,e,t,n,s,i)=>r<t&&e>n?0:r<t?-(t-r+s):e>n?e-r>n-t?r+s-t:e-n+i:0,Ag=(r,e)=>{const t=r.ownerDocument;let n=e,s=r;for(;s;){const i=s===t.body,a=i?{top:0,right:window.visualViewport?.width??t.documentElement.clientWidth,bottom:window.visualViewport?.height??t.documentElement.clientHeight,left:0}:Tg(s),l=getComputedStyle(s),c=ao(n.left,n.right,a.left,a.right,Dn(l.scrollPaddingLeft),Dn(l.scrollPaddingRight)),u=ao(n.top,n.bottom,a.top,a.bottom,Dn(l.scrollPaddingTop),Dn(l.scrollPaddingBottom));if(c||u)if(i)t.defaultView?.scrollBy(c,u);else{const{scrollLeft:h,scrollTop:g}=s;u&&(s.scrollTop+=u),c&&(s.scrollLeft+=c);const f=s.scrollLeft-h,b=s.scrollTop-g;n={left:n.left-f,top:n.top-b,right:n.right-f,bottom:n.bottom-b}}s=i||l.position==="fixed"?null:Ng(s)}},Sg=100,_g=["block","break","cursor","inline","scroll","text"],Cg=(r,e,t)=>{const n=new pr;return _g.forEach(s=>{const i=e.query(s);i&&n.register(i)}),r.forEach(s=>{let i=e.query(s);i||t.error(`Cannot register "${s}" specified in "formats" config. Are you sure it was registered?`);let a=0;for(;i;)if(n.register(i),i="blotName"in i?i.requiredContainer??null:null,a+=1,a>Sg){t.error(`Cycle detected in registering blot requiredContainer: "${s}"`);break}}),n},dr=dt("quill"),Mn=new pr;Ge.uiClass="ql-ui";class R{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Mn,theme:"default"};static events=z.events;static sources=z.sources;static version="2.0.3";static imports={delta:G,parchment:og,"core/module":rt,"core/theme":mr};static debug(e){e===!0&&(e="log"),dt.level(e)}static find(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return wi.get(e)||Mn.find(e,t)}static import(e){return this.imports[e]==null&&dr.error(`Cannot import ${e}. Are you sure it was registered?`),this.imports[e]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const e=arguments.length<=0?void 0:arguments[0],t=!!(!(arguments.length<=1)&&arguments[1]),n="attrName"in e?e.attrName:e.blotName;typeof n=="string"?this.register(`formats/${n}`,e,t):Object.keys(e).forEach(s=>{this.register(s,e[s],t)})}else{const e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=!!(!(arguments.length<=2)&&arguments[2]);this.imports[e]!=null&&!n&&dr.warn(`Overwriting ${e} with`,t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&t&&typeof t!="boolean"&&t.blotName!=="abstract"&&Mn.register(t),typeof t.register=="function"&&t.register(Mn)}}constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=Og(e,t),this.container=this.options.container,this.container==null){dr.error("Invalid Quill container",e);return}this.options.debug&&R.debug(this.options.debug);const n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",wi.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new z;const s=Mi.blotName,i=this.options.registry.query(s);if(!i||!("blotName"in i))throw new Error(`Cannot initialize Quill without "${s}" blot`);if(this.scroll=new i(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new yg(this.scroll),this.selection=new bg(this.scroll,this.emitter),this.composition=new wg(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(z.events.EDITOR_CHANGE,a=>{a===z.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(z.events.SCROLL_UPDATE,(a,l)=>{const c=this.selection.lastRange,[u]=this.selection.getRange(),h=c&&u?{oldRange:c,newRange:u}:void 0;Fe.call(this,()=>this.editor.update(null,l,h),a)}),this.emitter.on(z.events.SCROLL_EMBED_UPDATE,(a,l)=>{const c=this.selection.lastRange,[u]=this.selection.getRange(),h=c&&u?{oldRange:c,newRange:u}:void 0;Fe.call(this,()=>{const g=new G().retain(a.offset(this)).retain({[a.statics.blotName]:l});return this.editor.update(g,[],h)},R.sources.USER)}),n){const a=this.clipboard.convert({html:`${n}<p><br></p>`,text:`
37
- `});this.setContents(a)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof e=="string"){const n=e;e=document.createElement("div"),e.classList.add(n)}return this.container.insertBefore(e,t),e}blur(){this.selection.setRange(null)}deleteText(e,t,n){return[e,t,,n]=ot(e,t,n),Fe.call(this,()=>this.editor.deleteText(e,t),n,e,-1*t)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;const t=e();return this.allowReadOnlyEdits=!1,t}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}focus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:z.sources.API;return Fe.call(this,()=>{const s=this.getSelection(!0);let i=new G;if(s==null)return i;if(this.scroll.query(e,V.BLOCK))i=this.editor.formatLine(s.index,s.length,{[e]:t});else{if(s.length===0)return this.selection.format(e,t),i;i=this.editor.formatText(s.index,s.length,{[e]:t})}return this.setSelection(s,z.sources.SILENT),i},n)}formatLine(e,t,n,s,i){let a;return[e,t,a,i]=ot(e,t,n,s,i),Fe.call(this,()=>this.editor.formatLine(e,t,a),i,e,0)}formatText(e,t,n,s,i){let a;return[e,t,a,i]=ot(e,t,n,s,i),Fe.call(this,()=>this.editor.formatText(e,t,a),i,e,0)}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=null;if(typeof e=="number"?n=this.selection.getBounds(e,t):n=this.selection.getBounds(e.index,e.length),!n)return null;const s=this.container.getBoundingClientRect();return{bottom:n.bottom-s.top,height:n.height,left:n.left-s.left,right:n.right-s.left,top:n.top-s.top,width:n.width}}getContents(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e;return[e,t]=ot(e,t),this.editor.getContents(e,t)}getFormat(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof e=="number"?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof e!="number"?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}getModule(e){return this.theme.modules[e]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=ot(e,t),this.editor.getHTML(e,t)}getText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=ot(e,t),this.editor.getText(e,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:R.sources.API;return Fe.call(this,()=>this.editor.insertEmbed(e,t,n),s,e)}insertText(e,t,n,s,i){let a;return[e,,a,i]=ot(e,0,n,s,i),Fe.call(this,()=>this.editor.insertText(e,t,a),i,e,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,t,n){return[e,t,,n]=ot(e,t,n),Fe.call(this,()=>this.editor.removeFormat(e,t),n,e)}scrollRectIntoView(e){Ag(this.root,e)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const e=this.selection.lastRange,t=e&&this.selection.getBounds(e.index,e.length);t&&this.scrollRectIntoView(t)}setContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:z.sources.API;return Fe.call(this,()=>{e=new G(e);const n=this.getLength(),s=this.editor.deleteText(0,n),i=this.editor.insertContents(0,e),a=this.editor.deleteText(this.getLength()-1,1);return s.compose(i).compose(a)},t)}setSelection(e,t,n){e==null?this.selection.setRange(null,t||R.sources.API):([e,t,,n]=ot(e,t,n),this.selection.setRange(new Dt(Math.max(0,e),t),n),n!==z.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:z.sources.API;const n=new G().insert(e);return this.setContents(n,t)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:z.sources.USER;const t=this.scroll.update(e);return this.selection.update(e),t}updateContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:z.sources.API;return Fe.call(this,()=>(e=new G(e),this.editor.applyDelta(e)),t,!0)}}function oo(r){return typeof r=="string"?document.querySelector(r):r}function ii(r){return Object.entries(r??{}).reduce((e,t)=>{let[n,s]=t;return{...e,[n]:s===!0?{}:s}},{})}function lo(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==void 0))}function Og(r,e){const t=oo(r);if(!t)throw new Error("Invalid Quill container");const s=!e.theme||e.theme===R.DEFAULTS.theme?mr:R.import(`themes/${e.theme}`);if(!s)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:i,...a}=R.DEFAULTS,{modules:l,...c}=s.DEFAULTS;let u=ii(e.modules);u!=null&&u.toolbar&&u.toolbar.constructor!==Object&&(u={...u,toolbar:{container:u.toolbar}});const h=Et({},ii(i),ii(l),u),g={...a,...lo(c),...lo(e)};let f=e.registry;return f?e.formats&&dr.warn('Ignoring "formats" option because "registry" is specified'):f=e.formats?Cg(e.formats,g.registry,dr):g.registry,{...g,registry:f,container:t,theme:s,modules:Object.entries(h).reduce((b,x)=>{let[y,N]=x;if(!N)return b;const S=R.import(`modules/${y}`);return S==null?(dr.error(`Cannot load ${y} module. Are you sure you registered it?`),b):{...b,[y]:Et({},S.DEFAULTS||{},N)}},{}),bounds:oo(g.bounds)}}function Fe(r,e,t,n){if(!this.isEnabled()&&e===z.sources.USER&&!this.allowReadOnlyEdits)return new G;let s=t==null?null:this.getSelection();const i=this.editor.delta,a=r();if(s!=null&&(t===!0&&(t=s.index),n==null?s=co(s,a,e):n!==0&&(s=co(s,t,n,e)),this.setSelection(s,z.sources.SILENT)),a.length()>0){const l=[z.events.TEXT_CHANGE,a,i,e];this.emitter.emit(z.events.EDITOR_CHANGE,...l),e!==z.sources.SILENT&&this.emitter.emit(...l)}return a}function ot(r,e,t,n,s){let i={};return typeof r.index=="number"&&typeof r.length=="number"?typeof e!="number"?(s=n,n=t,t=e,e=r.length,r=r.index):(e=r.length,r=r.index):typeof e!="number"&&(s=n,n=t,t=e,e=0),typeof t=="object"?(i=t,s=n):typeof t=="string"&&(n!=null?i[t]=n:s=t),s=s||z.sources.API,[r,e,i,s]}function co(r,e,t,n){const s=typeof t=="number"?t:0;if(r==null)return null;let i,a;return e&&typeof e.transformPosition=="function"?[i,a]=[r.index,r.index+r.length].map(l=>e.transformPosition(l,n!==z.sources.USER)):[i,a]=[r.index,r.index+r.length].map(l=>l<e||l===e&&n===z.sources.USER?l:s>=0?l+s:Math.max(e,l+s)),new Dt(i,a-i)}class Ut extends Qn{}function uo(r){return r instanceof Ee||r instanceof Me}function ho(r){return typeof r.updateContent=="function"}class Rg extends Mi{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=Ee;static allowedChildren=[Ee,Me,Ut];constructor(e,t,n){let{emitter:s}=n;super(e,t),this.emitter=s,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",i=>this.handleDragStart(i))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit(z.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(z.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,t){this.emitter.emit(z.events.SCROLL_EMBED_UPDATE,e,t)}deleteAt(e,t){const[n,s]=this.line(e),[i]=this.line(e+t);if(super.deleteAt(e,t),i!=null&&n!==i&&s>0){if(n instanceof Me||i instanceof Me){this.optimize();return}const a=i.children.head instanceof Ke?null:i.children.head;n.moveChildren(i,a),n.remove()}this.optimize()}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",e?"true":"false")}formatAt(e,t,n,s){super.formatAt(e,t,n,s),this.optimize()}insertAt(e,t,n){if(e>=this.length())if(n==null||this.scroll.query(t,V.BLOCK)==null){const s=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(s),n==null&&t.endsWith(`
36
+ `,attributes:t.attributes}),s&&e.push({insert:s,attributes:t.attributes})}):e.push(t)}),e}class rt{static DEFAULTS={};constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=e,this.options=t}}const qn="\uFEFF";class Bi extends ke{constructor(e,t){super(e,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(n=>{this.contentNode.appendChild(n)}),this.leftGuard=document.createTextNode(qn),this.rightGuard=document.createTextNode(qn),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,t){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,t)}restore(e){let t=null,n;const s=e.data.split(qn).join("");if(e===this.leftGuard)if(this.prev instanceof Ve){const i=this.prev.length();this.prev.insertAt(i,s),t={startNode:this.prev.domNode,startOffset:i+s.length}}else n=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(n),this),t={startNode:n,startOffset:s.length};else e===this.rightGuard&&(this.next instanceof Ve?(this.next.insertAt(0,s),t={startNode:this.next.domNode,startOffset:s.length}):(n=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(n),this.next),t={startNode:n,startOffset:s.length}));return e.data=qn,t}update(e,t){e.forEach(n=>{if(n.type==="characterData"&&(n.target===this.leftGuard||n.target===this.rightGuard)){const s=this.restore(n.target);s&&(t.range=s)}})}}class wg{isComposing=!1;constructor(e,t){this.scroll=e,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",e=>{this.isComposing||this.handleCompositionStart(e)}),this.scroll.domNode.addEventListener("compositionend",e=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(e)})})}handleCompositionStart(e){const t=e.target instanceof Node?this.scroll.find(e.target,!0):null;t&&!(t instanceof Bi)&&(this.emitter.emit(z.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit(z.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit(z.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit(z.events.COMPOSITION_END,e),this.isComposing=!1}}class mr{static DEFAULTS={modules:{}};static themes={default:mr};modules={};constructor(e,t){this.quill=e,this.options=t}init(){Object.keys(this.options.modules).forEach(e=>{this.modules[e]==null&&this.addModule(e)})}addModule(e){const t=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}const Ng=r=>r.parentElement||r.getRootNode().host||null,Tg=r=>{const e=r.getBoundingClientRect(),t="offsetWidth"in r&&Math.abs(e.width)/r.offsetWidth||1,n="offsetHeight"in r&&Math.abs(e.height)/r.offsetHeight||1;return{top:e.top,right:e.left+r.clientWidth*t,bottom:e.top+r.clientHeight*n,left:e.left}},Dn=r=>{const e=parseInt(r,10);return Number.isNaN(e)?0:e},oo=(r,e,t,n,s,i)=>r<t&&e>n?0:r<t?-(t-r+s):e>n?e-r>n-t?r+s-t:e-n+i:0,Ag=(r,e)=>{const t=r.ownerDocument;let n=e,s=r;for(;s;){const i=s===t.body,a=i?{top:0,right:window.visualViewport?.width??t.documentElement.clientWidth,bottom:window.visualViewport?.height??t.documentElement.clientHeight,left:0}:Tg(s),l=getComputedStyle(s),c=oo(n.left,n.right,a.left,a.right,Dn(l.scrollPaddingLeft),Dn(l.scrollPaddingRight)),u=oo(n.top,n.bottom,a.top,a.bottom,Dn(l.scrollPaddingTop),Dn(l.scrollPaddingBottom));if(c||u)if(i)t.defaultView?.scrollBy(c,u);else{const{scrollLeft:h,scrollTop:g}=s;u&&(s.scrollTop+=u),c&&(s.scrollLeft+=c);const f=s.scrollLeft-h,b=s.scrollTop-g;n={left:n.left-f,top:n.top-b,right:n.right-f,bottom:n.bottom-b}}s=i||l.position==="fixed"?null:Ng(s)}},Sg=100,_g=["block","break","cursor","inline","scroll","text"],Cg=(r,e,t)=>{const n=new pr;return _g.forEach(s=>{const i=e.query(s);i&&n.register(i)}),r.forEach(s=>{let i=e.query(s);i||t.error(`Cannot register "${s}" specified in "formats" config. Are you sure it was registered?`);let a=0;for(;i;)if(n.register(i),i="blotName"in i?i.requiredContainer??null:null,a+=1,a>Sg){t.error(`Cycle detected in registering blot requiredContainer: "${s}"`);break}}),n},dr=dt("quill"),Mn=new pr;Ge.uiClass="ql-ui";class R{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Mn,theme:"default"};static events=z.events;static sources=z.sources;static version="2.0.3";static imports={delta:G,parchment:og,"core/module":rt,"core/theme":mr};static debug(e){e===!0&&(e="log"),dt.level(e)}static find(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ni.get(e)||Mn.find(e,t)}static import(e){return this.imports[e]==null&&dr.error(`Cannot import ${e}. Are you sure it was registered?`),this.imports[e]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const e=arguments.length<=0?void 0:arguments[0],t=!!(!(arguments.length<=1)&&arguments[1]),n="attrName"in e?e.attrName:e.blotName;typeof n=="string"?this.register(`formats/${n}`,e,t):Object.keys(e).forEach(s=>{this.register(s,e[s],t)})}else{const e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=!!(!(arguments.length<=2)&&arguments[2]);this.imports[e]!=null&&!n&&dr.warn(`Overwriting ${e} with`,t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&t&&typeof t!="boolean"&&t.blotName!=="abstract"&&Mn.register(t),typeof t.register=="function"&&t.register(Mn)}}constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=Og(e,t),this.container=this.options.container,this.container==null){dr.error("Invalid Quill container",e);return}this.options.debug&&R.debug(this.options.debug);const n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",Ni.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new z;const s=Pi.blotName,i=this.options.registry.query(s);if(!i||!("blotName"in i))throw new Error(`Cannot initialize Quill without "${s}" blot`);if(this.scroll=new i(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new yg(this.scroll),this.selection=new bg(this.scroll,this.emitter),this.composition=new wg(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(z.events.EDITOR_CHANGE,a=>{a===z.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(z.events.SCROLL_UPDATE,(a,l)=>{const c=this.selection.lastRange,[u]=this.selection.getRange(),h=c&&u?{oldRange:c,newRange:u}:void 0;Fe.call(this,()=>this.editor.update(null,l,h),a)}),this.emitter.on(z.events.SCROLL_EMBED_UPDATE,(a,l)=>{const c=this.selection.lastRange,[u]=this.selection.getRange(),h=c&&u?{oldRange:c,newRange:u}:void 0;Fe.call(this,()=>{const g=new G().retain(a.offset(this)).retain({[a.statics.blotName]:l});return this.editor.update(g,[],h)},R.sources.USER)}),n){const a=this.clipboard.convert({html:`${n}<p><br></p>`,text:`
37
+ `});this.setContents(a)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof e=="string"){const n=e;e=document.createElement("div"),e.classList.add(n)}return this.container.insertBefore(e,t),e}blur(){this.selection.setRange(null)}deleteText(e,t,n){return[e,t,,n]=ot(e,t,n),Fe.call(this,()=>this.editor.deleteText(e,t),n,e,-1*t)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;const t=e();return this.allowReadOnlyEdits=!1,t}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}focus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:z.sources.API;return Fe.call(this,()=>{const s=this.getSelection(!0);let i=new G;if(s==null)return i;if(this.scroll.query(e,V.BLOCK))i=this.editor.formatLine(s.index,s.length,{[e]:t});else{if(s.length===0)return this.selection.format(e,t),i;i=this.editor.formatText(s.index,s.length,{[e]:t})}return this.setSelection(s,z.sources.SILENT),i},n)}formatLine(e,t,n,s,i){let a;return[e,t,a,i]=ot(e,t,n,s,i),Fe.call(this,()=>this.editor.formatLine(e,t,a),i,e,0)}formatText(e,t,n,s,i){let a;return[e,t,a,i]=ot(e,t,n,s,i),Fe.call(this,()=>this.editor.formatText(e,t,a),i,e,0)}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=null;if(typeof e=="number"?n=this.selection.getBounds(e,t):n=this.selection.getBounds(e.index,e.length),!n)return null;const s=this.container.getBoundingClientRect();return{bottom:n.bottom-s.top,height:n.height,left:n.left-s.left,right:n.right-s.left,top:n.top-s.top,width:n.width}}getContents(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e;return[e,t]=ot(e,t),this.editor.getContents(e,t)}getFormat(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof e=="number"?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof e!="number"?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}getModule(e){return this.theme.modules[e]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=ot(e,t),this.editor.getHTML(e,t)}getText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=ot(e,t),this.editor.getText(e,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:R.sources.API;return Fe.call(this,()=>this.editor.insertEmbed(e,t,n),s,e)}insertText(e,t,n,s,i){let a;return[e,,a,i]=ot(e,0,n,s,i),Fe.call(this,()=>this.editor.insertText(e,t,a),i,e,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,t,n){return[e,t,,n]=ot(e,t,n),Fe.call(this,()=>this.editor.removeFormat(e,t),n,e)}scrollRectIntoView(e){Ag(this.root,e)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const e=this.selection.lastRange,t=e&&this.selection.getBounds(e.index,e.length);t&&this.scrollRectIntoView(t)}setContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:z.sources.API;return Fe.call(this,()=>{e=new G(e);const n=this.getLength(),s=this.editor.deleteText(0,n),i=this.editor.insertContents(0,e),a=this.editor.deleteText(this.getLength()-1,1);return s.compose(i).compose(a)},t)}setSelection(e,t,n){e==null?this.selection.setRange(null,t||R.sources.API):([e,t,,n]=ot(e,t,n),this.selection.setRange(new Dt(Math.max(0,e),t),n),n!==z.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:z.sources.API;const n=new G().insert(e);return this.setContents(n,t)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:z.sources.USER;const t=this.scroll.update(e);return this.selection.update(e),t}updateContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:z.sources.API;return Fe.call(this,()=>(e=new G(e),this.editor.applyDelta(e)),t,!0)}}function lo(r){return typeof r=="string"?document.querySelector(r):r}function ii(r){return Object.entries(r??{}).reduce((e,t)=>{let[n,s]=t;return{...e,[n]:s===!0?{}:s}},{})}function co(r){return Object.fromEntries(Object.entries(r).filter(e=>e[1]!==void 0))}function Og(r,e){const t=lo(r);if(!t)throw new Error("Invalid Quill container");const s=!e.theme||e.theme===R.DEFAULTS.theme?mr:R.import(`themes/${e.theme}`);if(!s)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:i,...a}=R.DEFAULTS,{modules:l,...c}=s.DEFAULTS;let u=ii(e.modules);u!=null&&u.toolbar&&u.toolbar.constructor!==Object&&(u={...u,toolbar:{container:u.toolbar}});const h=Et({},ii(i),ii(l),u),g={...a,...co(c),...co(e)};let f=e.registry;return f?e.formats&&dr.warn('Ignoring "formats" option because "registry" is specified'):f=e.formats?Cg(e.formats,g.registry,dr):g.registry,{...g,registry:f,container:t,theme:s,modules:Object.entries(h).reduce((b,x)=>{let[y,N]=x;if(!N)return b;const S=R.import(`modules/${y}`);return S==null?(dr.error(`Cannot load ${y} module. Are you sure you registered it?`),b):{...b,[y]:Et({},S.DEFAULTS||{},N)}},{}),bounds:lo(g.bounds)}}function Fe(r,e,t,n){if(!this.isEnabled()&&e===z.sources.USER&&!this.allowReadOnlyEdits)return new G;let s=t==null?null:this.getSelection();const i=this.editor.delta,a=r();if(s!=null&&(t===!0&&(t=s.index),n==null?s=uo(s,a,e):n!==0&&(s=uo(s,t,n,e)),this.setSelection(s,z.sources.SILENT)),a.length()>0){const l=[z.events.TEXT_CHANGE,a,i,e];this.emitter.emit(z.events.EDITOR_CHANGE,...l),e!==z.sources.SILENT&&this.emitter.emit(...l)}return a}function ot(r,e,t,n,s){let i={};return typeof r.index=="number"&&typeof r.length=="number"?typeof e!="number"?(s=n,n=t,t=e,e=r.length,r=r.index):(e=r.length,r=r.index):typeof e!="number"&&(s=n,n=t,t=e,e=0),typeof t=="object"?(i=t,s=n):typeof t=="string"&&(n!=null?i[t]=n:s=t),s=s||z.sources.API,[r,e,i,s]}function uo(r,e,t,n){const s=typeof t=="number"?t:0;if(r==null)return null;let i,a;return e&&typeof e.transformPosition=="function"?[i,a]=[r.index,r.index+r.length].map(l=>e.transformPosition(l,n!==z.sources.USER)):[i,a]=[r.index,r.index+r.length].map(l=>l<e||l===e&&n===z.sources.USER?l:s>=0?l+s:Math.max(e,l+s)),new Dt(i,a-i)}class Ut extends Qn{}function ho(r){return r instanceof Ee||r instanceof Me}function fo(r){return typeof r.updateContent=="function"}class Rg extends Pi{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=Ee;static allowedChildren=[Ee,Me,Ut];constructor(e,t,n){let{emitter:s}=n;super(e,t),this.emitter=s,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",i=>this.handleDragStart(i))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit(z.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(z.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,t){this.emitter.emit(z.events.SCROLL_EMBED_UPDATE,e,t)}deleteAt(e,t){const[n,s]=this.line(e),[i]=this.line(e+t);if(super.deleteAt(e,t),i!=null&&n!==i&&s>0){if(n instanceof Me||i instanceof Me){this.optimize();return}const a=i.children.head instanceof Ke?null:i.children.head;n.moveChildren(i,a),n.remove()}this.optimize()}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",e?"true":"false")}formatAt(e,t,n,s){super.formatAt(e,t,n,s),this.optimize()}insertAt(e,t,n){if(e>=this.length())if(n==null||this.scroll.query(t,V.BLOCK)==null){const s=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(s),n==null&&t.endsWith(`
38
38
  `)?s.insertAt(0,t.slice(0,-1),n):s.insertAt(0,t,n)}else{const s=this.scroll.create(t,n);this.appendChild(s)}else super.insertAt(e,t,n);this.optimize()}insertBefore(e,t){if(e.statics.scope===V.INLINE_BLOT){const n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(e),super.insertBefore(n,t)}else super.insertBefore(e,t)}insertContents(e,t){const n=this.deltaToRenderBlocks(t.concat(new G().insert(`
39
39
  `))),s=n.pop();if(s==null)return;this.batchStart();const i=n.shift();if(i){const c=i.type==="block"&&(i.delta.length()===0||!this.descendant(Me,e)[0]&&e<this.length()),u=i.type==="block"?i.delta:new G().insert({[i.key]:i.value});ai(this,e,u);const h=i.type==="block"?1:0,g=e+u.length()+h;c&&this.insertAt(g-1,`
40
- `);const f=qe(this.line(e)[0]),b=Pe.AttributeMap.diff(f,i.attributes)||{};Object.keys(b).forEach(x=>{this.formatAt(g-1,1,x,b[x])}),e=g}let[a,l]=this.children.find(e);if(n.length&&(a&&(a=a.split(l),l=0),n.forEach(c=>{if(c.type==="block"){const u=this.createBlock(c.attributes,a||void 0);ai(u,0,c.delta)}else{const u=this.create(c.key,c.value);this.insertBefore(u,a||void 0),Object.keys(c.attributes).forEach(h=>{u.format(h,c.attributes[h])})}})),s.type==="block"&&s.delta.length()){const c=a?a.offset(a.scroll)+l:this.length();ai(this,c,s.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(e){const t=this.path(e).pop();if(!t)return[null,-1];const[n,s]=t;return n instanceof Ae?[n,s]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(uo,e)}lines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const n=(s,i,a)=>{let l=[],c=a;return s.children.forEachAt(i,a,(u,h,g)=>{uo(u)?l.push(u):u instanceof Qn&&(l=l.concat(n(u,h,c))),c-=g}),l};return n(this,e,t)}optimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(e,t),e.length>0&&this.emitter.emit(z.events.SCROLL_OPTIMIZE,e,t))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch){Array.isArray(e)&&(this.batch=this.batch.concat(e));return}let t=z.sources.USER;typeof e=="string"&&(t=e),Array.isArray(e)||(e=this.observer.takeRecords()),e=e.filter(n=>{let{target:s}=n;const i=this.find(s,!0);return i&&!ho(i)}),e.length>0&&this.emitter.emit(z.events.SCROLL_BEFORE_UPDATE,t,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(z.events.SCROLL_UPDATE,t,e)}updateEmbedAt(e,t,n){const[s]=this.descendant(i=>i instanceof Me,e);s&&s.statics.blotName===t&&ho(s)&&s.updateContent(n)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){const t=[];let n=new G;return e.forEach(s=>{const i=s?.insert;if(i)if(typeof i=="string"){const a=i.split(`
41
- `);a.slice(0,-1).forEach(c=>{n.insert(c,s.attributes),t.push({type:"block",delta:n,attributes:s.attributes??{}}),n=new G});const l=a[a.length-1];l&&n.insert(l,s.attributes)}else{const a=Object.keys(i)[0];if(!a)return;this.query(a,V.INLINE)?n.push(s):(n.length()&&t.push({type:"block",delta:n,attributes:{}}),n=new G,t.push({type:"blockEmbed",key:a,value:i[a],attributes:s.attributes??{}}))}}),n.length()&&t.push({type:"block",delta:n,attributes:{}}),t}createBlock(e,t){let n;const s={};Object.entries(e).forEach(l=>{let[c,u]=l;this.query(c,V.BLOCK&V.BLOT)!=null?n=c:s[c]=u});const i=this.create(n||this.statics.defaultChild.blotName,n?e[n]:void 0);this.insertBefore(i,t||void 0);const a=i.length();return Object.entries(s).forEach(l=>{let[c,u]=l;i.formatAt(0,a,c,u)}),i}}function ai(r,e,t){t.reduce((n,s)=>{const i=Pe.Op.length(s);let a=s.attributes||{};if(s.insert!=null){if(typeof s.insert=="string"){const l=s.insert;r.insertAt(n,l);const[c]=r.descendant(Ae,n),u=qe(c);a=Pe.AttributeMap.diff(u,a)||{}}else if(typeof s.insert=="object"){const l=Object.keys(s.insert)[0];if(l==null)return n;if(r.insertAt(n,l,s.insert[l]),r.scroll.query(l,V.INLINE)!=null){const[u]=r.descendant(Ae,n),h=qe(u);a=Pe.AttributeMap.diff(h,a)||{}}}}return Object.keys(a).forEach(l=>{r.formatAt(n,i,l,a[l])}),n+i},e)}const Bi={scope:V.BLOCK,whitelist:["right","center","justify"]},Lg=new et("align","align",Bi),Pl=new We("align","ql-align",Bi),Bl=new Tt("align","text-align",Bi);class $l extends Tt{value(e){let t=super.value(e);return t.startsWith("rgb(")?(t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${t.split(",").map(s=>`00${parseInt(s,10).toString(16)}`.slice(-2)).join("")}`):t}}const kg=new We("color","ql-color",{scope:V.INLINE}),$i=new $l("color","color",{scope:V.INLINE}),jg=new We("background","ql-bg",{scope:V.INLINE}),Fi=new $l("background","background-color",{scope:V.INLINE});class Ht extends Ut{static create(e){const t=super.create(e);return t.setAttribute("spellcheck","false"),t}code(e,t){return this.children.map(n=>n.length()<=1?"":n.domNode.innerText).join(`
40
+ `);const f=qe(this.line(e)[0]),b=Pe.AttributeMap.diff(f,i.attributes)||{};Object.keys(b).forEach(x=>{this.formatAt(g-1,1,x,b[x])}),e=g}let[a,l]=this.children.find(e);if(n.length&&(a&&(a=a.split(l),l=0),n.forEach(c=>{if(c.type==="block"){const u=this.createBlock(c.attributes,a||void 0);ai(u,0,c.delta)}else{const u=this.create(c.key,c.value);this.insertBefore(u,a||void 0),Object.keys(c.attributes).forEach(h=>{u.format(h,c.attributes[h])})}})),s.type==="block"&&s.delta.length()){const c=a?a.offset(a.scroll)+l:this.length();ai(this,c,s.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(e){const t=this.path(e).pop();if(!t)return[null,-1];const[n,s]=t;return n instanceof Ae?[n,s]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(ho,e)}lines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const n=(s,i,a)=>{let l=[],c=a;return s.children.forEachAt(i,a,(u,h,g)=>{ho(u)?l.push(u):u instanceof Qn&&(l=l.concat(n(u,h,c))),c-=g}),l};return n(this,e,t)}optimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(e,t),e.length>0&&this.emitter.emit(z.events.SCROLL_OPTIMIZE,e,t))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch){Array.isArray(e)&&(this.batch=this.batch.concat(e));return}let t=z.sources.USER;typeof e=="string"&&(t=e),Array.isArray(e)||(e=this.observer.takeRecords()),e=e.filter(n=>{let{target:s}=n;const i=this.find(s,!0);return i&&!fo(i)}),e.length>0&&this.emitter.emit(z.events.SCROLL_BEFORE_UPDATE,t,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(z.events.SCROLL_UPDATE,t,e)}updateEmbedAt(e,t,n){const[s]=this.descendant(i=>i instanceof Me,e);s&&s.statics.blotName===t&&fo(s)&&s.updateContent(n)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){const t=[];let n=new G;return e.forEach(s=>{const i=s?.insert;if(i)if(typeof i=="string"){const a=i.split(`
41
+ `);a.slice(0,-1).forEach(c=>{n.insert(c,s.attributes),t.push({type:"block",delta:n,attributes:s.attributes??{}}),n=new G});const l=a[a.length-1];l&&n.insert(l,s.attributes)}else{const a=Object.keys(i)[0];if(!a)return;this.query(a,V.INLINE)?n.push(s):(n.length()&&t.push({type:"block",delta:n,attributes:{}}),n=new G,t.push({type:"blockEmbed",key:a,value:i[a],attributes:s.attributes??{}}))}}),n.length()&&t.push({type:"block",delta:n,attributes:{}}),t}createBlock(e,t){let n;const s={};Object.entries(e).forEach(l=>{let[c,u]=l;this.query(c,V.BLOCK&V.BLOT)!=null?n=c:s[c]=u});const i=this.create(n||this.statics.defaultChild.blotName,n?e[n]:void 0);this.insertBefore(i,t||void 0);const a=i.length();return Object.entries(s).forEach(l=>{let[c,u]=l;i.formatAt(0,a,c,u)}),i}}function ai(r,e,t){t.reduce((n,s)=>{const i=Pe.Op.length(s);let a=s.attributes||{};if(s.insert!=null){if(typeof s.insert=="string"){const l=s.insert;r.insertAt(n,l);const[c]=r.descendant(Ae,n),u=qe(c);a=Pe.AttributeMap.diff(u,a)||{}}else if(typeof s.insert=="object"){const l=Object.keys(s.insert)[0];if(l==null)return n;if(r.insertAt(n,l,s.insert[l]),r.scroll.query(l,V.INLINE)!=null){const[u]=r.descendant(Ae,n),h=qe(u);a=Pe.AttributeMap.diff(h,a)||{}}}}return Object.keys(a).forEach(l=>{r.formatAt(n,i,l,a[l])}),n+i},e)}const $i={scope:V.BLOCK,whitelist:["right","center","justify"]},Lg=new et("align","align",$i),Pl=new We("align","ql-align",$i),Bl=new Tt("align","text-align",$i);class $l extends Tt{value(e){let t=super.value(e);return t.startsWith("rgb(")?(t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${t.split(",").map(s=>`00${parseInt(s,10).toString(16)}`.slice(-2)).join("")}`):t}}const kg=new We("color","ql-color",{scope:V.INLINE}),Fi=new $l("color","color",{scope:V.INLINE}),jg=new We("background","ql-bg",{scope:V.INLINE}),Ui=new $l("background","background-color",{scope:V.INLINE});class Ht extends Ut{static create(e){const t=super.create(e);return t.setAttribute("spellcheck","false"),t}code(e,t){return this.children.map(n=>n.length()<=1?"":n.domNode.innerText).join(`
42
42
  `).slice(e,e+t)}html(e,t){return`<pre>
43
43
  ${es(this.code(e,t))}
44
- </pre>`}}class Ce extends Ee{static TAB=" ";static register(){R.register(Ht)}}class Ui extends _e{}Ui.blotName="code";Ui.tagName="CODE";Ce.blotName="code-block";Ce.className="ql-code-block";Ce.tagName="DIV";Ht.blotName="code-block-container";Ht.className="ql-code-block-container";Ht.tagName="DIV";Ht.allowedChildren=[Ce];Ce.allowedChildren=[Ve,Ke,He];Ce.requiredContainer=Ht;const Hi={scope:V.BLOCK,whitelist:["rtl"]},Fl=new et("direction","dir",Hi),Ul=new We("direction","ql-direction",Hi),Hl=new Tt("direction","direction",Hi),zl={scope:V.INLINE,whitelist:["serif","monospace"]},Gl=new We("font","ql-font",zl);class Ig extends Tt{value(e){return super.value(e).replace(/["']/g,"")}}const Vl=new Ig("font","font-family",zl),Wl=new We("size","ql-size",{scope:V.INLINE,whitelist:["small","large","huge"]}),Kl=new Tt("size","font-size",{scope:V.INLINE,whitelist:["10px","18px","32px"]}),qg=dt("quill:keyboard"),Dg=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class ts extends rt{static match(e,t){return["altKey","ctrlKey","metaKey","shiftKey"].some(n=>!!t[n]!==e[n]&&t[n]!==null)?!1:t.key===e.key||t.key===e.which}constructor(e,t){super(e,t),this.bindings={},Object.keys(this.options.bindings).forEach(n=>{this.options.bindings[n]&&this.addBinding(this.options.bindings[n])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=Pg(e);if(s==null){qg.warn("Attempted to add invalid keyboard binding",s);return}typeof t=="function"&&(t={handler:t}),typeof n=="function"&&(n={handler:n}),(Array.isArray(s.key)?s.key:[s.key]).forEach(a=>{const l={...s,key:a,...t,...n};this.bindings[l.key]=this.bindings[l.key]||[],this.bindings[l.key].push(l)})}listen(){this.quill.root.addEventListener("keydown",e=>{if(e.defaultPrevented||e.isComposing||e.keyCode===229&&(e.key==="Enter"||e.key==="Backspace"))return;const s=(this.bindings[e.key]||[]).concat(this.bindings[e.which]||[]).filter(S=>ts.match(e,S));if(s.length===0)return;const i=R.find(e.target,!0);if(i&&i.scroll!==this.quill.scroll)return;const a=this.quill.getSelection();if(a==null||!this.quill.hasFocus())return;const[l,c]=this.quill.getLine(a.index),[u,h]=this.quill.getLeaf(a.index),[g,f]=a.length===0?[u,h]:this.quill.getLeaf(a.index+a.length),b=u instanceof Vn?u.value().slice(0,h):"",x=g instanceof Vn?g.value().slice(f):"",y={collapsed:a.length===0,empty:a.length===0&&l.length()<=1,format:this.quill.getFormat(a),line:l,offset:c,prefix:b,suffix:x,event:e};s.some(S=>{if(S.collapsed!=null&&S.collapsed!==y.collapsed||S.empty!=null&&S.empty!==y.empty||S.offset!=null&&S.offset!==y.offset)return!1;if(Array.isArray(S.format)){if(S.format.every(_=>y.format[_]==null))return!1}else if(typeof S.format=="object"&&!Object.keys(S.format).every(_=>S.format[_]===!0?y.format[_]!=null:S.format[_]===!1?y.format[_]==null:mt(S.format[_],y.format[_])))return!1;return S.prefix!=null&&!S.prefix.test(y.prefix)||S.suffix!=null&&!S.suffix.test(y.suffix)?!1:S.handler.call(this,a,y,S)!==!0})&&e.preventDefault()})}handleBackspace(e,t){const n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(e.index===0||this.quill.getLength()<=1)return;let s={};const[i]=this.quill.getLine(e.index);let a=new G().retain(e.index-n).delete(n);if(t.offset===0){const[l]=this.quill.getLine(e.index-1);if(l&&!(l.statics.blotName==="block"&&l.length()<=1)){const u=i.formats(),h=this.quill.getFormat(e.index-1,1);if(s=Pe.AttributeMap.diff(u,h)||{},Object.keys(s).length>0){const g=new G().retain(e.index+i.length()-2).retain(1,s);a=a.compose(g)}}}this.quill.updateContents(a,R.sources.USER),this.quill.focus()}handleDelete(e,t){const n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(e.index>=this.quill.getLength()-n)return;let s={};const[i]=this.quill.getLine(e.index);let a=new G().retain(e.index).delete(n);if(t.offset>=i.length()-1){const[l]=this.quill.getLine(e.index+1);if(l){const c=i.formats(),u=this.quill.getFormat(e.index,1);s=Pe.AttributeMap.diff(c,u)||{},Object.keys(s).length>0&&(a=a.retain(l.length()-1).retain(1,s))}}this.quill.updateContents(a,R.sources.USER),this.quill.focus()}handleDeleteRange(e){zi({range:e,quill:this.quill}),this.quill.focus()}handleEnter(e,t){const n=Object.keys(t.format).reduce((i,a)=>(this.quill.scroll.query(a,V.BLOCK)&&!Array.isArray(t.format[a])&&(i[a]=t.format[a]),i),{}),s=new G().retain(e.index).delete(e.length).insert(`
45
- `,n);this.quill.updateContents(s,R.sources.USER),this.quill.setSelection(e.index+1,R.sources.SILENT),this.quill.focus()}}const Mg={bindings:{bold:oi("bold"),italic:oi("italic"),underline:oi("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(r,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","+1",R.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(r,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","-1",R.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(r,e){e.format.indent!=null?this.quill.format("indent","-1",R.sources.USER):e.format.list!=null&&this.quill.format("list",!1,R.sources.USER)}},"indent code-block":fo(!0),"outdent code-block":fo(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(r){this.quill.deleteText(r.index-1,1,R.sources.USER)}},tab:{key:"Tab",handler(r,e){if(e.format.table)return!0;this.quill.history.cutoff();const t=new G().retain(r.index).delete(r.length).insert(" ");return this.quill.updateContents(t,R.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index+1,R.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,R.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(r,e){const t={list:!1};e.format.indent&&(t.indent=!1),this.quill.formatLine(r.index,r.length,t,R.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(r){const[e,t]=this.quill.getLine(r.index),n={...e.formats(),list:"checked"},s=new G().retain(r.index).insert(`
44
+ </pre>`}}class Ce extends Ee{static TAB=" ";static register(){R.register(Ht)}}class Hi extends _e{}Hi.blotName="code";Hi.tagName="CODE";Ce.blotName="code-block";Ce.className="ql-code-block";Ce.tagName="DIV";Ht.blotName="code-block-container";Ht.className="ql-code-block-container";Ht.tagName="DIV";Ht.allowedChildren=[Ce];Ce.allowedChildren=[Ve,Ke,He];Ce.requiredContainer=Ht;const zi={scope:V.BLOCK,whitelist:["rtl"]},Fl=new et("direction","dir",zi),Ul=new We("direction","ql-direction",zi),Hl=new Tt("direction","direction",zi),zl={scope:V.INLINE,whitelist:["serif","monospace"]},Gl=new We("font","ql-font",zl);class Ig extends Tt{value(e){return super.value(e).replace(/["']/g,"")}}const Vl=new Ig("font","font-family",zl),Wl=new We("size","ql-size",{scope:V.INLINE,whitelist:["small","large","huge"]}),Kl=new Tt("size","font-size",{scope:V.INLINE,whitelist:["10px","18px","32px"]}),qg=dt("quill:keyboard"),Dg=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class ts extends rt{static match(e,t){return["altKey","ctrlKey","metaKey","shiftKey"].some(n=>!!t[n]!==e[n]&&t[n]!==null)?!1:t.key===e.key||t.key===e.which}constructor(e,t){super(e,t),this.bindings={},Object.keys(this.options.bindings).forEach(n=>{this.options.bindings[n]&&this.addBinding(this.options.bindings[n])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=Pg(e);if(s==null){qg.warn("Attempted to add invalid keyboard binding",s);return}typeof t=="function"&&(t={handler:t}),typeof n=="function"&&(n={handler:n}),(Array.isArray(s.key)?s.key:[s.key]).forEach(a=>{const l={...s,key:a,...t,...n};this.bindings[l.key]=this.bindings[l.key]||[],this.bindings[l.key].push(l)})}listen(){this.quill.root.addEventListener("keydown",e=>{if(e.defaultPrevented||e.isComposing||e.keyCode===229&&(e.key==="Enter"||e.key==="Backspace"))return;const s=(this.bindings[e.key]||[]).concat(this.bindings[e.which]||[]).filter(S=>ts.match(e,S));if(s.length===0)return;const i=R.find(e.target,!0);if(i&&i.scroll!==this.quill.scroll)return;const a=this.quill.getSelection();if(a==null||!this.quill.hasFocus())return;const[l,c]=this.quill.getLine(a.index),[u,h]=this.quill.getLeaf(a.index),[g,f]=a.length===0?[u,h]:this.quill.getLeaf(a.index+a.length),b=u instanceof Vn?u.value().slice(0,h):"",x=g instanceof Vn?g.value().slice(f):"",y={collapsed:a.length===0,empty:a.length===0&&l.length()<=1,format:this.quill.getFormat(a),line:l,offset:c,prefix:b,suffix:x,event:e};s.some(S=>{if(S.collapsed!=null&&S.collapsed!==y.collapsed||S.empty!=null&&S.empty!==y.empty||S.offset!=null&&S.offset!==y.offset)return!1;if(Array.isArray(S.format)){if(S.format.every(_=>y.format[_]==null))return!1}else if(typeof S.format=="object"&&!Object.keys(S.format).every(_=>S.format[_]===!0?y.format[_]!=null:S.format[_]===!1?y.format[_]==null:mt(S.format[_],y.format[_])))return!1;return S.prefix!=null&&!S.prefix.test(y.prefix)||S.suffix!=null&&!S.suffix.test(y.suffix)?!1:S.handler.call(this,a,y,S)!==!0})&&e.preventDefault()})}handleBackspace(e,t){const n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(e.index===0||this.quill.getLength()<=1)return;let s={};const[i]=this.quill.getLine(e.index);let a=new G().retain(e.index-n).delete(n);if(t.offset===0){const[l]=this.quill.getLine(e.index-1);if(l&&!(l.statics.blotName==="block"&&l.length()<=1)){const u=i.formats(),h=this.quill.getFormat(e.index-1,1);if(s=Pe.AttributeMap.diff(u,h)||{},Object.keys(s).length>0){const g=new G().retain(e.index+i.length()-2).retain(1,s);a=a.compose(g)}}}this.quill.updateContents(a,R.sources.USER),this.quill.focus()}handleDelete(e,t){const n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(e.index>=this.quill.getLength()-n)return;let s={};const[i]=this.quill.getLine(e.index);let a=new G().retain(e.index).delete(n);if(t.offset>=i.length()-1){const[l]=this.quill.getLine(e.index+1);if(l){const c=i.formats(),u=this.quill.getFormat(e.index,1);s=Pe.AttributeMap.diff(c,u)||{},Object.keys(s).length>0&&(a=a.retain(l.length()-1).retain(1,s))}}this.quill.updateContents(a,R.sources.USER),this.quill.focus()}handleDeleteRange(e){Gi({range:e,quill:this.quill}),this.quill.focus()}handleEnter(e,t){const n=Object.keys(t.format).reduce((i,a)=>(this.quill.scroll.query(a,V.BLOCK)&&!Array.isArray(t.format[a])&&(i[a]=t.format[a]),i),{}),s=new G().retain(e.index).delete(e.length).insert(`
45
+ `,n);this.quill.updateContents(s,R.sources.USER),this.quill.setSelection(e.index+1,R.sources.SILENT),this.quill.focus()}}const Mg={bindings:{bold:oi("bold"),italic:oi("italic"),underline:oi("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(r,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","+1",R.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(r,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","-1",R.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(r,e){e.format.indent!=null?this.quill.format("indent","-1",R.sources.USER):e.format.list!=null&&this.quill.format("list",!1,R.sources.USER)}},"indent code-block":po(!0),"outdent code-block":po(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(r){this.quill.deleteText(r.index-1,1,R.sources.USER)}},tab:{key:"Tab",handler(r,e){if(e.format.table)return!0;this.quill.history.cutoff();const t=new G().retain(r.index).delete(r.length).insert(" ");return this.quill.updateContents(t,R.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index+1,R.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,R.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(r,e){const t={list:!1};e.format.indent&&(t.indent=!1),this.quill.formatLine(r.index,r.length,t,R.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(r){const[e,t]=this.quill.getLine(r.index),n={...e.formats(),list:"checked"},s=new G().retain(r.index).insert(`
46
46
  `,n).retain(e.length()-t-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,R.sources.USER),this.quill.setSelection(r.index+1,R.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(r,e){const[t,n]=this.quill.getLine(r.index),s=new G().retain(r.index).insert(`
47
47
  `,e.format).retain(t.length()-n-1).retain(1,{header:null});this.quill.updateContents(s,R.sources.USER),this.quill.setSelection(r.index+1,R.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(r){const e=this.quill.getModule("table");if(e){const[t,n,s,i]=e.getTable(r),a=Bg(t,n,s,i);if(a==null)return;let l=t.offset();if(a<0){const c=new G().retain(l).insert(`
48
48
  `);this.quill.updateContents(c,R.sources.USER),this.quill.setSelection(r.index+1,r.length,R.sources.SILENT)}else if(a>0){l+=t.length();const c=new G().retain(l).insert(`
49
- `);this.quill.updateContents(c,R.sources.USER),this.quill.setSelection(l,R.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(r,e){const{event:t,line:n}=e,s=n.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(s-1,R.sources.USER):this.quill.setSelection(s+n.length(),R.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(r,e){if(this.quill.scroll.query("list")==null)return!0;const{length:t}=e.prefix,[n,s]=this.quill.getLine(r.index);if(s>t)return!0;let i;switch(e.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(r.index," ",R.sources.USER),this.quill.history.cutoff();const a=new G().retain(r.index-s).delete(t+1).retain(n.length()-2-s).retain(1,{list:i});return this.quill.updateContents(a,R.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index-t,R.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(r){const[e,t]=this.quill.getLine(r.index);let n=2,s=e;for(;s!=null&&s.length()<=1&&s.formats()["code-block"];)if(s=s.prev,n-=1,n<=0){const i=new G().retain(r.index+e.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,R.sources.USER),this.quill.setSelection(r.index-1,R.sources.SILENT),!1}return!0}},"embed left":Pn("ArrowLeft",!1),"embed left shift":Pn("ArrowLeft",!0),"embed right":Pn("ArrowRight",!1),"embed right shift":Pn("ArrowRight",!0),"table down":po(!1),"table up":po(!0)}};ts.DEFAULTS=Mg;function fo(r){return{key:"Tab",shiftKey:!r,format:{"code-block":!0},handler(e,t){let{event:n}=t;const s=this.quill.scroll.query("code-block"),{TAB:i}=s;if(e.length===0&&!n.shiftKey){this.quill.insertText(e.index,i,R.sources.USER),this.quill.setSelection(e.index+i.length,R.sources.SILENT);return}const a=e.length===0?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:l,length:c}=e;a.forEach((u,h)=>{r?(u.insertAt(0,i),h===0?l+=i.length:c+=i.length):u.domNode.textContent.startsWith(i)&&(u.deleteAt(0,i.length),h===0?l-=i.length:c-=i.length)}),this.quill.update(R.sources.USER),this.quill.setSelection(l,c,R.sources.SILENT)}}}function Pn(r,e){return{key:r,shiftKey:e,altKey:null,[r==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(n){let{index:s}=n;r==="ArrowRight"&&(s+=n.length+1);const[i]=this.quill.getLeaf(s);return i instanceof ke?(r==="ArrowLeft"?e?this.quill.setSelection(n.index-1,n.length+1,R.sources.USER):this.quill.setSelection(n.index-1,R.sources.USER):e?this.quill.setSelection(n.index,n.length+1,R.sources.USER):this.quill.setSelection(n.index+n.length+1,R.sources.USER),!1):!0}}}function oi(r){return{key:r[0],shortKey:!0,handler(e,t){this.quill.format(r,!t.format[r],R.sources.USER)}}}function po(r){return{key:r?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,t){const n=r?"prev":"next",s=t.line,i=s.parent[n];if(i!=null){if(i.statics.blotName==="table-row"){let a=i.children.head,l=s;for(;l.prev!=null;)l=l.prev,a=a.next;const c=a.offset(this.quill.scroll)+Math.min(t.offset,a.length()-1);this.quill.setSelection(c,0,R.sources.USER)}}else{const a=s.table()[n];a!=null&&(r?this.quill.setSelection(a.offset(this.quill.scroll)+a.length()-1,0,R.sources.USER):this.quill.setSelection(a.offset(this.quill.scroll),0,R.sources.USER))}return!1}}}function Pg(r){if(typeof r=="string"||typeof r=="number")r={key:r};else if(typeof r=="object")r=ur(r);else return null;return r.shortKey&&(r[Dg]=r.shortKey,delete r.shortKey),r}function zi(r){let{quill:e,range:t}=r;const n=e.getLines(t);let s={};if(n.length>1){const i=n[0].formats(),a=n[n.length-1].formats();s=Pe.AttributeMap.diff(a,i)||{}}e.deleteText(t,R.sources.USER),Object.keys(s).length>0&&e.formatLine(t.index,1,s,R.sources.USER),e.setSelection(t.index,R.sources.SILENT)}function Bg(r,e,t,n){return e.prev==null&&e.next==null?t.prev==null&&t.next==null?n===0?-1:1:t.prev==null?-1:1:e.prev==null?-1:e.next==null?1:null}const $g=/font-weight:\s*normal/,Fg=["P","OL","UL"],go=r=>r&&Fg.includes(r.tagName),Ug=r=>{Array.from(r.querySelectorAll("br")).filter(e=>go(e.previousElementSibling)&&go(e.nextElementSibling)).forEach(e=>{e.parentNode?.removeChild(e)})},Hg=r=>{Array.from(r.querySelectorAll('b[style*="font-weight"]')).filter(e=>e.getAttribute("style")?.match($g)).forEach(e=>{const t=r.createDocumentFragment();t.append(...e.childNodes),e.parentNode?.replaceChild(t,e)})};function zg(r){r.querySelector('[id^="docs-internal-guid-"]')&&(Hg(r),Ug(r))}const Gg=/\bmso-list:[^;]*ignore/i,Vg=/\bmso-list:[^;]*\bl(\d+)/i,Wg=/\bmso-list:[^;]*\blevel(\d+)/i,Kg=(r,e)=>{const t=r.getAttribute("style"),n=t?.match(Vg);if(!n)return null;const s=Number(n[1]),i=t?.match(Wg),a=i?Number(i[1]):1,l=new RegExp(`@list l${s}:level${a}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),c=e.match(l),u=c&&c[1]==="bullet"?"bullet":"ordered";return{id:s,indent:a,type:u,element:r}},Yg=r=>{const e=Array.from(r.querySelectorAll("[style*=mso-list]")),t=[],n=[];e.forEach(a=>{(a.getAttribute("style")||"").match(Gg)?t.push(a):n.push(a)}),t.forEach(a=>a.parentNode?.removeChild(a));const s=r.documentElement.innerHTML,i=n.map(a=>Kg(a,s)).filter(a=>a);for(;i.length;){const a=[];let l=i.shift();for(;l;)a.push(l),l=i.length&&i[0]?.element===l.element.nextElementSibling&&i[0].id===l.id?i.shift():null;const c=document.createElement("ul");a.forEach(g=>{const f=document.createElement("li");f.setAttribute("data-list",g.type),g.indent>1&&f.setAttribute("class",`ql-indent-${g.indent-1}`),f.innerHTML=g.element.innerHTML,c.appendChild(f)});const u=a[0]?.element,{parentNode:h}=u??{};u&&h?.replaceChild(c,u),a.slice(1).forEach(g=>{let{element:f}=g;h?.removeChild(f)})}};function Xg(r){r.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&Yg(r)}const Zg=[Xg,zg],Jg=r=>{r.documentElement&&Zg.forEach(e=>{e(r)})},Qg=dt("quill:clipboard"),em=[[Node.TEXT_NODE,fm],[Node.TEXT_NODE,bo],["br",am],[Node.ELEMENT_NODE,bo],[Node.ELEMENT_NODE,im],[Node.ELEMENT_NODE,sm],[Node.ELEMENT_NODE,hm],["li",cm],["ol, ul",um],["pre",om],["tr",dm],["b",li("bold")],["i",li("italic")],["strike",li("strike")],["style",lm]],tm=[Lg,Fl].reduce((r,e)=>(r[e.keyName]=e,r),{}),mo=[Bl,Fi,$i,Hl,Vl,Kl].reduce((r,e)=>(r[e.keyName]=e,r),{});class rm extends rt{static DEFAULTS={matchers:[]};constructor(e,t){super(e,t),this.quill.root.addEventListener("copy",n=>this.onCaptureCopy(n,!1)),this.quill.root.addEventListener("cut",n=>this.onCaptureCopy(n,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],em.concat(this.options.matchers??[]).forEach(n=>{let[s,i]=n;this.addMatcher(s,i)})}addMatcher(e,t){this.matchers.push([e,t])}convert(e){let{html:t,text:n}=e,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(s[Ce.blotName])return new G().insert(n||"",{[Ce.blotName]:s[Ce.blotName]});if(!t)return new G().insert(n||"",s);const i=this.convertHTML(t);return rn(i,`
50
- `)&&(i.ops[i.ops.length-1].attributes==null||s.table)?i.compose(new G().retain(i.length()-1).delete(1)):i}normalizeHTML(e){Jg(e)}convertHTML(e){const t=new DOMParser().parseFromString(e,"text/html");this.normalizeHTML(t);const n=t.body,s=new WeakMap,[i,a]=this.prepareMatching(n,s);return Gi(this.quill.scroll,n,i,a,s)}dangerouslyPasteHTML(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:R.sources.API;if(typeof e=="string"){const s=this.convert({html:e,text:""});this.quill.setContents(s,t),this.quill.setSelection(0,R.sources.SILENT)}else{const s=this.convert({html:t,text:""});this.quill.updateContents(new G().retain(e).concat(s),n),this.quill.setSelection(e+s.length(),R.sources.SILENT)}}onCaptureCopy(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.defaultPrevented)return;e.preventDefault();const[n]=this.quill.selection.getRange();if(n==null)return;const{html:s,text:i}=this.onCopy(n,t);e.clipboardData?.setData("text/plain",i),e.clipboardData?.setData("text/html",s),t&&zi({range:n,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter(t=>t[0]!=="#").join(`
51
- `)}onCapturePaste(e){if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();const t=this.quill.getSelection(!0);if(t==null)return;const n=e.clipboardData?.getData("text/html");let s=e.clipboardData?.getData("text/plain");if(!n&&!s){const a=e.clipboardData?.getData("text/uri-list");a&&(s=this.normalizeURIList(a))}const i=Array.from(e.clipboardData?.files||[]);if(!n&&i.length>0){this.quill.uploader.upload(t,i);return}if(n&&i.length>0){const a=new DOMParser().parseFromString(n,"text/html");if(a.body.childElementCount===1&&a.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(t,i);return}}this.onPaste(t,{html:n,text:s})}onCopy(e){const t=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:t}}onPaste(e,t){let{text:n,html:s}=t;const i=this.quill.getFormat(e.index),a=this.convert({text:n,html:s},i);Qg.log("onPaste",a,{text:n,html:s});const l=new G().retain(e.index).delete(e.length).concat(a);this.quill.updateContents(l,R.sources.USER),this.quill.setSelection(l.length()-e.length,R.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,t){const n=[],s=[];return this.matchers.forEach(i=>{const[a,l]=i;switch(a){case Node.TEXT_NODE:s.push(l);break;case Node.ELEMENT_NODE:n.push(l);break;default:Array.from(e.querySelectorAll(a)).forEach(c=>{t.has(c)?t.get(c)?.push(l):t.set(c,[l])});break}}),[n,s]}}function zt(r,e,t,n){return n.query(e)?r.reduce((s,i)=>{if(!i.insert)return s;if(i.attributes&&i.attributes[e])return s.push(i);const a=t?{[e]:t}:{};return s.insert(i.insert,{...a,...i.attributes})},new G):r}function rn(r,e){let t="";for(let n=r.ops.length-1;n>=0&&t.length<e.length;--n){const s=r.ops[n];if(typeof s.insert!="string")break;t=s.insert+t}return t.slice(-1*e.length)===e}function vt(r,e){if(!(r instanceof Element))return!1;const t=e.query(r);return t&&t.prototype instanceof ke?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(r.tagName.toLowerCase())}function nm(r,e){return r.previousElementSibling&&r.nextElementSibling&&!vt(r.previousElementSibling,e)&&!vt(r.nextElementSibling,e)}const Bn=new WeakMap;function Yl(r){return r==null?!1:(Bn.has(r)||(r.tagName==="PRE"?Bn.set(r,!0):Bn.set(r,Yl(r.parentNode))),Bn.get(r))}function Gi(r,e,t,n,s){return e.nodeType===e.TEXT_NODE?n.reduce((i,a)=>a(e,i,r),new G):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce((i,a)=>{let l=Gi(r,a,t,n,s);return a.nodeType===e.ELEMENT_NODE&&(l=t.reduce((c,u)=>u(a,c,r),l),l=(s.get(a)||[]).reduce((c,u)=>u(a,c,r),l)),i.concat(l)},new G):new G}function li(r){return(e,t,n)=>zt(t,r,!0,n)}function sm(r,e,t){const n=et.keys(r),s=We.keys(r),i=Tt.keys(r),a={};return n.concat(s).concat(i).forEach(l=>{let c=t.query(l,V.ATTRIBUTE);c!=null&&(a[c.attrName]=c.value(r),a[c.attrName])||(c=tm[l],c!=null&&(c.attrName===l||c.keyName===l)&&(a[c.attrName]=c.value(r)||void 0),c=mo[l],c!=null&&(c.attrName===l||c.keyName===l)&&(c=mo[l],a[c.attrName]=c.value(r)||void 0))}),Object.entries(a).reduce((l,c)=>{let[u,h]=c;return zt(l,u,h,t)},e)}function im(r,e,t){const n=t.query(r);if(n==null)return e;if(n.prototype instanceof ke){const s={},i=n.value(r);if(i!=null)return s[n.blotName]=i,new G().insert(s,n.formats(r,t))}else if(n.prototype instanceof Zr&&!rn(e,`
49
+ `);this.quill.updateContents(c,R.sources.USER),this.quill.setSelection(l,R.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(r,e){const{event:t,line:n}=e,s=n.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(s-1,R.sources.USER):this.quill.setSelection(s+n.length(),R.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(r,e){if(this.quill.scroll.query("list")==null)return!0;const{length:t}=e.prefix,[n,s]=this.quill.getLine(r.index);if(s>t)return!0;let i;switch(e.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(r.index," ",R.sources.USER),this.quill.history.cutoff();const a=new G().retain(r.index-s).delete(t+1).retain(n.length()-2-s).retain(1,{list:i});return this.quill.updateContents(a,R.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index-t,R.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(r){const[e,t]=this.quill.getLine(r.index);let n=2,s=e;for(;s!=null&&s.length()<=1&&s.formats()["code-block"];)if(s=s.prev,n-=1,n<=0){const i=new G().retain(r.index+e.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,R.sources.USER),this.quill.setSelection(r.index-1,R.sources.SILENT),!1}return!0}},"embed left":Pn("ArrowLeft",!1),"embed left shift":Pn("ArrowLeft",!0),"embed right":Pn("ArrowRight",!1),"embed right shift":Pn("ArrowRight",!0),"table down":go(!1),"table up":go(!0)}};ts.DEFAULTS=Mg;function po(r){return{key:"Tab",shiftKey:!r,format:{"code-block":!0},handler(e,t){let{event:n}=t;const s=this.quill.scroll.query("code-block"),{TAB:i}=s;if(e.length===0&&!n.shiftKey){this.quill.insertText(e.index,i,R.sources.USER),this.quill.setSelection(e.index+i.length,R.sources.SILENT);return}const a=e.length===0?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:l,length:c}=e;a.forEach((u,h)=>{r?(u.insertAt(0,i),h===0?l+=i.length:c+=i.length):u.domNode.textContent.startsWith(i)&&(u.deleteAt(0,i.length),h===0?l-=i.length:c-=i.length)}),this.quill.update(R.sources.USER),this.quill.setSelection(l,c,R.sources.SILENT)}}}function Pn(r,e){return{key:r,shiftKey:e,altKey:null,[r==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(n){let{index:s}=n;r==="ArrowRight"&&(s+=n.length+1);const[i]=this.quill.getLeaf(s);return i instanceof ke?(r==="ArrowLeft"?e?this.quill.setSelection(n.index-1,n.length+1,R.sources.USER):this.quill.setSelection(n.index-1,R.sources.USER):e?this.quill.setSelection(n.index,n.length+1,R.sources.USER):this.quill.setSelection(n.index+n.length+1,R.sources.USER),!1):!0}}}function oi(r){return{key:r[0],shortKey:!0,handler(e,t){this.quill.format(r,!t.format[r],R.sources.USER)}}}function go(r){return{key:r?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,t){const n=r?"prev":"next",s=t.line,i=s.parent[n];if(i!=null){if(i.statics.blotName==="table-row"){let a=i.children.head,l=s;for(;l.prev!=null;)l=l.prev,a=a.next;const c=a.offset(this.quill.scroll)+Math.min(t.offset,a.length()-1);this.quill.setSelection(c,0,R.sources.USER)}}else{const a=s.table()[n];a!=null&&(r?this.quill.setSelection(a.offset(this.quill.scroll)+a.length()-1,0,R.sources.USER):this.quill.setSelection(a.offset(this.quill.scroll),0,R.sources.USER))}return!1}}}function Pg(r){if(typeof r=="string"||typeof r=="number")r={key:r};else if(typeof r=="object")r=ur(r);else return null;return r.shortKey&&(r[Dg]=r.shortKey,delete r.shortKey),r}function Gi(r){let{quill:e,range:t}=r;const n=e.getLines(t);let s={};if(n.length>1){const i=n[0].formats(),a=n[n.length-1].formats();s=Pe.AttributeMap.diff(a,i)||{}}e.deleteText(t,R.sources.USER),Object.keys(s).length>0&&e.formatLine(t.index,1,s,R.sources.USER),e.setSelection(t.index,R.sources.SILENT)}function Bg(r,e,t,n){return e.prev==null&&e.next==null?t.prev==null&&t.next==null?n===0?-1:1:t.prev==null?-1:1:e.prev==null?-1:e.next==null?1:null}const $g=/font-weight:\s*normal/,Fg=["P","OL","UL"],mo=r=>r&&Fg.includes(r.tagName),Ug=r=>{Array.from(r.querySelectorAll("br")).filter(e=>mo(e.previousElementSibling)&&mo(e.nextElementSibling)).forEach(e=>{e.parentNode?.removeChild(e)})},Hg=r=>{Array.from(r.querySelectorAll('b[style*="font-weight"]')).filter(e=>e.getAttribute("style")?.match($g)).forEach(e=>{const t=r.createDocumentFragment();t.append(...e.childNodes),e.parentNode?.replaceChild(t,e)})};function zg(r){r.querySelector('[id^="docs-internal-guid-"]')&&(Hg(r),Ug(r))}const Gg=/\bmso-list:[^;]*ignore/i,Vg=/\bmso-list:[^;]*\bl(\d+)/i,Wg=/\bmso-list:[^;]*\blevel(\d+)/i,Kg=(r,e)=>{const t=r.getAttribute("style"),n=t?.match(Vg);if(!n)return null;const s=Number(n[1]),i=t?.match(Wg),a=i?Number(i[1]):1,l=new RegExp(`@list l${s}:level${a}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),c=e.match(l),u=c&&c[1]==="bullet"?"bullet":"ordered";return{id:s,indent:a,type:u,element:r}},Yg=r=>{const e=Array.from(r.querySelectorAll("[style*=mso-list]")),t=[],n=[];e.forEach(a=>{(a.getAttribute("style")||"").match(Gg)?t.push(a):n.push(a)}),t.forEach(a=>a.parentNode?.removeChild(a));const s=r.documentElement.innerHTML,i=n.map(a=>Kg(a,s)).filter(a=>a);for(;i.length;){const a=[];let l=i.shift();for(;l;)a.push(l),l=i.length&&i[0]?.element===l.element.nextElementSibling&&i[0].id===l.id?i.shift():null;const c=document.createElement("ul");a.forEach(g=>{const f=document.createElement("li");f.setAttribute("data-list",g.type),g.indent>1&&f.setAttribute("class",`ql-indent-${g.indent-1}`),f.innerHTML=g.element.innerHTML,c.appendChild(f)});const u=a[0]?.element,{parentNode:h}=u??{};u&&h?.replaceChild(c,u),a.slice(1).forEach(g=>{let{element:f}=g;h?.removeChild(f)})}};function Xg(r){r.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&Yg(r)}const Zg=[Xg,zg],Jg=r=>{r.documentElement&&Zg.forEach(e=>{e(r)})},Qg=dt("quill:clipboard"),em=[[Node.TEXT_NODE,fm],[Node.TEXT_NODE,vo],["br",am],[Node.ELEMENT_NODE,vo],[Node.ELEMENT_NODE,im],[Node.ELEMENT_NODE,sm],[Node.ELEMENT_NODE,hm],["li",cm],["ol, ul",um],["pre",om],["tr",dm],["b",li("bold")],["i",li("italic")],["strike",li("strike")],["style",lm]],tm=[Lg,Fl].reduce((r,e)=>(r[e.keyName]=e,r),{}),bo=[Bl,Ui,Fi,Hl,Vl,Kl].reduce((r,e)=>(r[e.keyName]=e,r),{});class rm extends rt{static DEFAULTS={matchers:[]};constructor(e,t){super(e,t),this.quill.root.addEventListener("copy",n=>this.onCaptureCopy(n,!1)),this.quill.root.addEventListener("cut",n=>this.onCaptureCopy(n,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],em.concat(this.options.matchers??[]).forEach(n=>{let[s,i]=n;this.addMatcher(s,i)})}addMatcher(e,t){this.matchers.push([e,t])}convert(e){let{html:t,text:n}=e,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(s[Ce.blotName])return new G().insert(n||"",{[Ce.blotName]:s[Ce.blotName]});if(!t)return new G().insert(n||"",s);const i=this.convertHTML(t);return rn(i,`
50
+ `)&&(i.ops[i.ops.length-1].attributes==null||s.table)?i.compose(new G().retain(i.length()-1).delete(1)):i}normalizeHTML(e){Jg(e)}convertHTML(e){const t=new DOMParser().parseFromString(e,"text/html");this.normalizeHTML(t);const n=t.body,s=new WeakMap,[i,a]=this.prepareMatching(n,s);return Vi(this.quill.scroll,n,i,a,s)}dangerouslyPasteHTML(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:R.sources.API;if(typeof e=="string"){const s=this.convert({html:e,text:""});this.quill.setContents(s,t),this.quill.setSelection(0,R.sources.SILENT)}else{const s=this.convert({html:t,text:""});this.quill.updateContents(new G().retain(e).concat(s),n),this.quill.setSelection(e+s.length(),R.sources.SILENT)}}onCaptureCopy(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.defaultPrevented)return;e.preventDefault();const[n]=this.quill.selection.getRange();if(n==null)return;const{html:s,text:i}=this.onCopy(n,t);e.clipboardData?.setData("text/plain",i),e.clipboardData?.setData("text/html",s),t&&Gi({range:n,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter(t=>t[0]!=="#").join(`
51
+ `)}onCapturePaste(e){if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();const t=this.quill.getSelection(!0);if(t==null)return;const n=e.clipboardData?.getData("text/html");let s=e.clipboardData?.getData("text/plain");if(!n&&!s){const a=e.clipboardData?.getData("text/uri-list");a&&(s=this.normalizeURIList(a))}const i=Array.from(e.clipboardData?.files||[]);if(!n&&i.length>0){this.quill.uploader.upload(t,i);return}if(n&&i.length>0){const a=new DOMParser().parseFromString(n,"text/html");if(a.body.childElementCount===1&&a.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(t,i);return}}this.onPaste(t,{html:n,text:s})}onCopy(e){const t=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:t}}onPaste(e,t){let{text:n,html:s}=t;const i=this.quill.getFormat(e.index),a=this.convert({text:n,html:s},i);Qg.log("onPaste",a,{text:n,html:s});const l=new G().retain(e.index).delete(e.length).concat(a);this.quill.updateContents(l,R.sources.USER),this.quill.setSelection(l.length()-e.length,R.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,t){const n=[],s=[];return this.matchers.forEach(i=>{const[a,l]=i;switch(a){case Node.TEXT_NODE:s.push(l);break;case Node.ELEMENT_NODE:n.push(l);break;default:Array.from(e.querySelectorAll(a)).forEach(c=>{t.has(c)?t.get(c)?.push(l):t.set(c,[l])});break}}),[n,s]}}function zt(r,e,t,n){return n.query(e)?r.reduce((s,i)=>{if(!i.insert)return s;if(i.attributes&&i.attributes[e])return s.push(i);const a=t?{[e]:t}:{};return s.insert(i.insert,{...a,...i.attributes})},new G):r}function rn(r,e){let t="";for(let n=r.ops.length-1;n>=0&&t.length<e.length;--n){const s=r.ops[n];if(typeof s.insert!="string")break;t=s.insert+t}return t.slice(-1*e.length)===e}function vt(r,e){if(!(r instanceof Element))return!1;const t=e.query(r);return t&&t.prototype instanceof ke?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(r.tagName.toLowerCase())}function nm(r,e){return r.previousElementSibling&&r.nextElementSibling&&!vt(r.previousElementSibling,e)&&!vt(r.nextElementSibling,e)}const Bn=new WeakMap;function Yl(r){return r==null?!1:(Bn.has(r)||(r.tagName==="PRE"?Bn.set(r,!0):Bn.set(r,Yl(r.parentNode))),Bn.get(r))}function Vi(r,e,t,n,s){return e.nodeType===e.TEXT_NODE?n.reduce((i,a)=>a(e,i,r),new G):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce((i,a)=>{let l=Vi(r,a,t,n,s);return a.nodeType===e.ELEMENT_NODE&&(l=t.reduce((c,u)=>u(a,c,r),l),l=(s.get(a)||[]).reduce((c,u)=>u(a,c,r),l)),i.concat(l)},new G):new G}function li(r){return(e,t,n)=>zt(t,r,!0,n)}function sm(r,e,t){const n=et.keys(r),s=We.keys(r),i=Tt.keys(r),a={};return n.concat(s).concat(i).forEach(l=>{let c=t.query(l,V.ATTRIBUTE);c!=null&&(a[c.attrName]=c.value(r),a[c.attrName])||(c=tm[l],c!=null&&(c.attrName===l||c.keyName===l)&&(a[c.attrName]=c.value(r)||void 0),c=bo[l],c!=null&&(c.attrName===l||c.keyName===l)&&(c=bo[l],a[c.attrName]=c.value(r)||void 0))}),Object.entries(a).reduce((l,c)=>{let[u,h]=c;return zt(l,u,h,t)},e)}function im(r,e,t){const n=t.query(r);if(n==null)return e;if(n.prototype instanceof ke){const s={},i=n.value(r);if(i!=null)return s[n.blotName]=i,new G().insert(s,n.formats(r,t))}else if(n.prototype instanceof Zr&&!rn(e,`
52
52
  `)&&e.insert(`
53
53
  `),"blotName"in n&&"formats"in n&&typeof n.formats=="function")return zt(e,n.blotName,n.formats(r,t),t);return e}function am(r,e){return rn(e,`
54
54
  `)||e.insert(`
55
55
  `),e}function om(r,e,t){const n=t.query("code-block"),s=n&&"formats"in n&&typeof n.formats=="function"?n.formats(r,t):!0;return zt(e,"code-block",s,t)}function lm(){return new G}function cm(r,e,t){const n=t.query(r);if(n==null||n.blotName!=="list"||!rn(e,`
56
- `))return e;let s=-1,i=r.parentNode;for(;i!=null;)["OL","UL"].includes(i.tagName)&&(s+=1),i=i.parentNode;return s<=0?e:e.reduce((a,l)=>l.insert?l.attributes&&typeof l.attributes.indent=="number"?a.push(l):a.insert(l.insert,{indent:s,...l.attributes||{}}):a,new G)}function um(r,e,t){const n=r;let s=n.tagName==="OL"?"ordered":"bullet";const i=n.getAttribute("data-checked");return i&&(s=i==="true"?"checked":"unchecked"),zt(e,"list",s,t)}function bo(r,e,t){if(!rn(e,`
56
+ `))return e;let s=-1,i=r.parentNode;for(;i!=null;)["OL","UL"].includes(i.tagName)&&(s+=1),i=i.parentNode;return s<=0?e:e.reduce((a,l)=>l.insert?l.attributes&&typeof l.attributes.indent=="number"?a.push(l):a.insert(l.insert,{indent:s,...l.attributes||{}}):a,new G)}function um(r,e,t){const n=r;let s=n.tagName==="OL"?"ordered":"bullet";const i=n.getAttribute("data-checked");return i&&(s=i==="true"?"checked":"unchecked"),zt(e,"list",s,t)}function vo(r,e,t){if(!rn(e,`
57
57
  `)){if(vt(r,t)&&(r.childNodes.length>0||r instanceof HTMLParagraphElement))return e.insert(`
58
58
  `);if(e.length()>0&&r.nextSibling){let n=r.nextSibling;for(;n!=null;){if(vt(n,t))return e.insert(`
59
59
  `);const s=t.query(n);if(s&&s.prototype instanceof Me)return e.insert(`
60
60
  `);n=n.firstChild}}}return e}function hm(r,e,t){const n={},s=r.style||{};return s.fontStyle==="italic"&&(n.italic=!0),s.textDecoration==="underline"&&(n.underline=!0),s.textDecoration==="line-through"&&(n.strike=!0),(s.fontWeight?.startsWith("bold")||parseInt(s.fontWeight,10)>=700)&&(n.bold=!0),e=Object.entries(n).reduce((i,a)=>{let[l,c]=a;return zt(i,l,c,t)},e),parseFloat(s.textIndent||0)>0?new G().insert(" ").concat(e):e}function dm(r,e,t){const n=r.parentElement?.tagName==="TABLE"?r.parentElement:r.parentElement?.parentElement;if(n!=null){const i=Array.from(n.querySelectorAll("tr")).indexOf(r)+1;return zt(e,"table",i,t)}return e}function fm(r,e,t){let n=r.data;if(r.parentElement?.tagName==="O:P")return e.insert(n.trim());if(!Yl(r)){if(n.trim().length===0&&n.includes(`
61
- `)&&!nm(r,t))return e;n=n.replace(/[^\S\u00a0]/g," "),n=n.replace(/ {2,}/g," "),(r.previousSibling==null&&r.parentElement!=null&&vt(r.parentElement,t)||r.previousSibling instanceof Element&&vt(r.previousSibling,t))&&(n=n.replace(/^ /,"")),(r.nextSibling==null&&r.parentElement!=null&&vt(r.parentElement,t)||r.nextSibling instanceof Element&&vt(r.nextSibling,t))&&(n=n.replace(/ $/,"")),n=n.replaceAll(" "," ")}return e.insert(n)}class pm extends rt{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(e,t){super(e,t),this.quill.on(R.events.EDITOR_CHANGE,(n,s,i,a)=>{n===R.events.SELECTION_CHANGE?s&&a!==R.sources.SILENT&&(this.currentRange=s):n===R.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===R.sources.USER?this.record(s,i):this.transform(s)),this.currentRange=Ai(this.currentRange,s))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",n=>{n.inputType==="historyUndo"?(this.undo(),n.preventDefault()):n.inputType==="historyRedo"&&(this.redo(),n.preventDefault())})}change(e,t){if(this.stack[e].length===0)return;const n=this.stack[e].pop();if(!n)return;const s=this.quill.getContents(),i=n.delta.invert(s);this.stack[t].push({delta:i,range:Ai(n.range,i)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,R.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(e,t){if(e.ops.length===0)return;this.stack.redo=[];let n=e.invert(t),s=this.currentRange;const i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){const a=this.stack.undo.pop();a&&(n=n.compose(a.delta),s=a.range)}else this.lastRecorded=i;n.length()!==0&&(this.stack.undo.push({delta:n,range:s}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(e){vo(this.stack.undo,e),vo(this.stack.redo,e)}undo(){this.change("undo","redo")}restoreSelection(e){if(e.range)this.quill.setSelection(e.range,R.sources.USER);else{const t=mm(this.quill.scroll,e.delta);this.quill.setSelection(t,R.sources.USER)}}}function vo(r,e){let t=e;for(let n=r.length-1;n>=0;n-=1){const s=r[n];r[n]={delta:t.transform(s.delta,!0),range:s.range&&Ai(s.range,t)},t=s.delta.transform(t),r[n].delta.length()===0&&r.splice(n,1)}}function gm(r,e){const t=e.ops[e.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
62
- `):t.attributes!=null?Object.keys(t.attributes).some(n=>r.query(n,V.BLOCK)!=null):!1}function mm(r,e){const t=e.reduce((s,i)=>s+(i.delete||0),0);let n=e.length()-t;return gm(r,e)&&(n-=1),n}function Ai(r,e){if(!r)return r;const t=e.transformPosition(r.index),n=e.transformPosition(r.index+r.length);return{index:t,length:n-t}}class Xl extends rt{constructor(e,t){super(e,t),e.root.addEventListener("drop",n=>{n.preventDefault();let s=null;if(document.caretRangeFromPoint)s=document.caretRangeFromPoint(n.clientX,n.clientY);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(n.clientX,n.clientY);s=document.createRange(),s.setStart(a.offsetNode,a.offset),s.setEnd(a.offsetNode,a.offset)}const i=s&&e.selection.normalizeNative(s);if(i){const a=e.selection.normalizedToRange(i);n.dataTransfer?.files&&this.upload(a,n.dataTransfer.files)}})}upload(e,t){const n=[];Array.from(t).forEach(s=>{s&&this.options.mimetypes?.includes(s.type)&&n.push(s)}),n.length>0&&this.options.handler.call(this,e,n)}}Xl.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(r,e){if(!this.quill.scroll.query("image"))return;const t=e.map(n=>new Promise(s=>{const i=new FileReader;i.onload=()=>{s(i.result)},i.readAsDataURL(n)}));Promise.all(t).then(n=>{const s=n.reduce((i,a)=>i.insert({image:a}),new G().retain(r.index).delete(r.length));this.quill.updateContents(s,z.sources.USER),this.quill.setSelection(r.index+n.length,z.sources.SILENT)})}};const bm=["insertText","insertReplacementText"];class vm extends rt{constructor(e,t){super(e,t),e.root.addEventListener("beforeinput",n=>{this.handleBeforeInput(n)}),/Android/i.test(navigator.userAgent)||e.on(R.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){zi({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(e.length===0)return!1;if(t){const n=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new G().retain(e.index).insert(t,n),R.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,R.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!bm.includes(e.inputType))return;const t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;const n=ym(e);if(n==null)return;const s=this.quill.selection.normalizeNative(t),i=s?this.quill.selection.normalizedToRange(s):null;i&&this.replaceText(i,n)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}}function ym(r){return typeof r.data=="string"?r.data:r.dataTransfer?.types.includes("text/plain")?r.dataTransfer.getData("text/plain"):null}const Em=/Mac/i.test(navigator.platform),xm=100,wm=r=>!!(r.key==="ArrowLeft"||r.key==="ArrowRight"||r.key==="ArrowUp"||r.key==="ArrowDown"||r.key==="Home"||Em&&r.key==="a"&&r.ctrlKey===!0);class Nm extends rt{isListening=!1;selectionChangeDeadline=0;constructor(e,t){super(e,t),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(e,t){let{line:n,event:s}=t;if(!(n instanceof Ge)||!n.uiNode)return!0;const i=getComputedStyle(n.domNode).direction==="rtl";return i&&s.key!=="ArrowRight"||!i&&s.key!=="ArrowLeft"?!0:(this.quill.setSelection(e.index-1,e.length+(s.shiftKey?1:0),R.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",e=>{!e.defaultPrevented&&wm(e)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+xm,this.isListening)return;this.isListening=!0;const e=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",e,{once:!0})}handleSelectionChange(){const e=document.getSelection();if(!e)return;const t=e.getRangeAt(0);if(t.collapsed!==!0||t.startOffset!==0)return;const n=this.quill.scroll.find(t.startContainer);if(!(n instanceof Ge)||!n.uiNode)return;const s=document.createRange();s.setStartAfter(n.uiNode),s.setEndAfter(n.uiNode),e.removeAllRanges(),e.addRange(s)}}R.register({"blots/block":Ee,"blots/block/embed":Me,"blots/break":Ke,"blots/container":Ut,"blots/cursor":He,"blots/embed":Pi,"blots/inline":_e,"blots/scroll":Rg,"blots/text":Ve,"modules/clipboard":rm,"modules/history":pm,"modules/keyboard":ts,"modules/uploader":Xl,"modules/input":vm,"modules/uiNode":Nm});class Tm extends We{add(e,t){let n=0;if(t==="+1"||t==="-1"){const s=this.value(e)||0;n=t==="+1"?s+1:s-1}else typeof t=="number"&&(n=t);return n===0?(this.remove(e),!0):super.add(e,n.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}const Am=new Tm("indent","ql-indent",{scope:V.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class Sm extends Ee{static blotName="blockquote";static tagName="blockquote"}class _m extends Ee{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(e){return this.tagName.indexOf(e.tagName)+1}}class nn extends Ut{}nn.blotName="list-container";nn.tagName="OL";let sn=class extends Ee{static create(e){const t=super.create();return t.setAttribute("data-list",e),t}static formats(e){return e.getAttribute("data-list")||void 0}static register(){R.register(nn)}constructor(e,t){super(e,t);const n=t.ownerDocument.createElement("span"),s=i=>{if(!e.isEnabled())return;const a=this.statics.formats(t,e);a==="checked"?(this.format("list","unchecked"),i.preventDefault()):a==="unchecked"&&(this.format("list","checked"),i.preventDefault())};n.addEventListener("mousedown",s),n.addEventListener("touchstart",s),this.attachUI(n)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(e,t)}};sn.blotName="list";sn.tagName="LI";nn.allowedChildren=[sn];sn.requiredContainer=nn;class Vi extends _e{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}class Cm extends Vi{static blotName="italic";static tagName=["EM","I"]}class Wn extends _e{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(e){const t=super.create(e);return t.setAttribute("href",this.sanitize(e)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(e){return e.getAttribute("href")}static sanitize(e){return Zl(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e!==this.statics.blotName||!t?super.format(e,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}}function Zl(r,e){const t=document.createElement("a");t.href=r;const n=t.href.slice(0,t.href.indexOf(":"));return e.indexOf(n)>-1}class Om extends _e{static blotName="script";static tagName=["SUB","SUP"];static create(e){return e==="super"?document.createElement("sup"):e==="sub"?document.createElement("sub"):super.create(e)}static formats(e){if(e.tagName==="SUB")return"sub";if(e.tagName==="SUP")return"super"}}class Rm extends Vi{static blotName="strike";static tagName=["S","STRIKE"]}class Lm extends _e{static blotName="underline";static tagName="U"}class km extends Pi{static blotName="formula";static className="ql-formula";static tagName="SPAN";static create(e){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const t=super.create(e);return typeof e=="string"&&(window.katex.render(e,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",e)),t}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`<span>${e}</span>`}}const yo=["alt","height","width"];class jm extends ke{static blotName="image";static tagName="IMG";static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("src",this.sanitize(e)),t}static formats(e){return yo.reduce((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return Zl(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,t){yo.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}}const Eo=["height","width"];class Im extends Me{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(e){const t=super.create(e);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Eo.reduce((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t),{})}static sanitize(e){return Wn.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,t){Eo.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){const{video:e}=this.value();return`<a href="${e}">${e}</a>`}}const zr=new We("code-token","hljs",{scope:V.INLINE});class ut extends _e{static formats(e,t){for(;e!=null&&e!==t.domNode;){if(e.classList&&e.classList.contains(Ce.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,n){super(e,t,n),zr.add(this.domNode,n)}format(e,t){e!==ut.blotName?super.format(e,t):t?zr.add(this.domNode,t):(zr.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),zr.value(this.domNode)||this.unwrap()}}ut.blotName="code-token";ut.className="ql-token";class De extends Ce{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("data-language",e),t}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),ut.blotName,!1),super.replaceWith(e,t)}}class Vr extends Ht{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===De.blotName&&(this.forceNext=!0,this.children.forEach(n=>{n.format(e,t)}))}formatAt(e,t,n,s){n===De.blotName&&(this.forceNext=!0),super.formatAt(e,t,n,s)}highlight(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const s=`${Array.from(this.domNode.childNodes).filter(a=>a!==this.uiNode).map(a=>a.textContent).join(`
61
+ `)&&!nm(r,t))return e;n=n.replace(/[^\S\u00a0]/g," "),n=n.replace(/ {2,}/g," "),(r.previousSibling==null&&r.parentElement!=null&&vt(r.parentElement,t)||r.previousSibling instanceof Element&&vt(r.previousSibling,t))&&(n=n.replace(/^ /,"")),(r.nextSibling==null&&r.parentElement!=null&&vt(r.parentElement,t)||r.nextSibling instanceof Element&&vt(r.nextSibling,t))&&(n=n.replace(/ $/,"")),n=n.replaceAll(" "," ")}return e.insert(n)}class pm extends rt{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(e,t){super(e,t),this.quill.on(R.events.EDITOR_CHANGE,(n,s,i,a)=>{n===R.events.SELECTION_CHANGE?s&&a!==R.sources.SILENT&&(this.currentRange=s):n===R.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===R.sources.USER?this.record(s,i):this.transform(s)),this.currentRange=Si(this.currentRange,s))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",n=>{n.inputType==="historyUndo"?(this.undo(),n.preventDefault()):n.inputType==="historyRedo"&&(this.redo(),n.preventDefault())})}change(e,t){if(this.stack[e].length===0)return;const n=this.stack[e].pop();if(!n)return;const s=this.quill.getContents(),i=n.delta.invert(s);this.stack[t].push({delta:i,range:Si(n.range,i)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,R.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(e,t){if(e.ops.length===0)return;this.stack.redo=[];let n=e.invert(t),s=this.currentRange;const i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){const a=this.stack.undo.pop();a&&(n=n.compose(a.delta),s=a.range)}else this.lastRecorded=i;n.length()!==0&&(this.stack.undo.push({delta:n,range:s}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(e){yo(this.stack.undo,e),yo(this.stack.redo,e)}undo(){this.change("undo","redo")}restoreSelection(e){if(e.range)this.quill.setSelection(e.range,R.sources.USER);else{const t=mm(this.quill.scroll,e.delta);this.quill.setSelection(t,R.sources.USER)}}}function yo(r,e){let t=e;for(let n=r.length-1;n>=0;n-=1){const s=r[n];r[n]={delta:t.transform(s.delta,!0),range:s.range&&Si(s.range,t)},t=s.delta.transform(t),r[n].delta.length()===0&&r.splice(n,1)}}function gm(r,e){const t=e.ops[e.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
62
+ `):t.attributes!=null?Object.keys(t.attributes).some(n=>r.query(n,V.BLOCK)!=null):!1}function mm(r,e){const t=e.reduce((s,i)=>s+(i.delete||0),0);let n=e.length()-t;return gm(r,e)&&(n-=1),n}function Si(r,e){if(!r)return r;const t=e.transformPosition(r.index),n=e.transformPosition(r.index+r.length);return{index:t,length:n-t}}class Xl extends rt{constructor(e,t){super(e,t),e.root.addEventListener("drop",n=>{n.preventDefault();let s=null;if(document.caretRangeFromPoint)s=document.caretRangeFromPoint(n.clientX,n.clientY);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(n.clientX,n.clientY);s=document.createRange(),s.setStart(a.offsetNode,a.offset),s.setEnd(a.offsetNode,a.offset)}const i=s&&e.selection.normalizeNative(s);if(i){const a=e.selection.normalizedToRange(i);n.dataTransfer?.files&&this.upload(a,n.dataTransfer.files)}})}upload(e,t){const n=[];Array.from(t).forEach(s=>{s&&this.options.mimetypes?.includes(s.type)&&n.push(s)}),n.length>0&&this.options.handler.call(this,e,n)}}Xl.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(r,e){if(!this.quill.scroll.query("image"))return;const t=e.map(n=>new Promise(s=>{const i=new FileReader;i.onload=()=>{s(i.result)},i.readAsDataURL(n)}));Promise.all(t).then(n=>{const s=n.reduce((i,a)=>i.insert({image:a}),new G().retain(r.index).delete(r.length));this.quill.updateContents(s,z.sources.USER),this.quill.setSelection(r.index+n.length,z.sources.SILENT)})}};const bm=["insertText","insertReplacementText"];class vm extends rt{constructor(e,t){super(e,t),e.root.addEventListener("beforeinput",n=>{this.handleBeforeInput(n)}),/Android/i.test(navigator.userAgent)||e.on(R.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){Gi({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(e.length===0)return!1;if(t){const n=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new G().retain(e.index).insert(t,n),R.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,R.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!bm.includes(e.inputType))return;const t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;const n=ym(e);if(n==null)return;const s=this.quill.selection.normalizeNative(t),i=s?this.quill.selection.normalizedToRange(s):null;i&&this.replaceText(i,n)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}}function ym(r){return typeof r.data=="string"?r.data:r.dataTransfer?.types.includes("text/plain")?r.dataTransfer.getData("text/plain"):null}const Em=/Mac/i.test(navigator.platform),xm=100,wm=r=>!!(r.key==="ArrowLeft"||r.key==="ArrowRight"||r.key==="ArrowUp"||r.key==="ArrowDown"||r.key==="Home"||Em&&r.key==="a"&&r.ctrlKey===!0);class Nm extends rt{isListening=!1;selectionChangeDeadline=0;constructor(e,t){super(e,t),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(e,t){let{line:n,event:s}=t;if(!(n instanceof Ge)||!n.uiNode)return!0;const i=getComputedStyle(n.domNode).direction==="rtl";return i&&s.key!=="ArrowRight"||!i&&s.key!=="ArrowLeft"?!0:(this.quill.setSelection(e.index-1,e.length+(s.shiftKey?1:0),R.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",e=>{!e.defaultPrevented&&wm(e)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+xm,this.isListening)return;this.isListening=!0;const e=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",e,{once:!0})}handleSelectionChange(){const e=document.getSelection();if(!e)return;const t=e.getRangeAt(0);if(t.collapsed!==!0||t.startOffset!==0)return;const n=this.quill.scroll.find(t.startContainer);if(!(n instanceof Ge)||!n.uiNode)return;const s=document.createRange();s.setStartAfter(n.uiNode),s.setEndAfter(n.uiNode),e.removeAllRanges(),e.addRange(s)}}R.register({"blots/block":Ee,"blots/block/embed":Me,"blots/break":Ke,"blots/container":Ut,"blots/cursor":He,"blots/embed":Bi,"blots/inline":_e,"blots/scroll":Rg,"blots/text":Ve,"modules/clipboard":rm,"modules/history":pm,"modules/keyboard":ts,"modules/uploader":Xl,"modules/input":vm,"modules/uiNode":Nm});class Tm extends We{add(e,t){let n=0;if(t==="+1"||t==="-1"){const s=this.value(e)||0;n=t==="+1"?s+1:s-1}else typeof t=="number"&&(n=t);return n===0?(this.remove(e),!0):super.add(e,n.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}const Am=new Tm("indent","ql-indent",{scope:V.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class Sm extends Ee{static blotName="blockquote";static tagName="blockquote"}class _m extends Ee{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(e){return this.tagName.indexOf(e.tagName)+1}}class nn extends Ut{}nn.blotName="list-container";nn.tagName="OL";let sn=class extends Ee{static create(e){const t=super.create();return t.setAttribute("data-list",e),t}static formats(e){return e.getAttribute("data-list")||void 0}static register(){R.register(nn)}constructor(e,t){super(e,t);const n=t.ownerDocument.createElement("span"),s=i=>{if(!e.isEnabled())return;const a=this.statics.formats(t,e);a==="checked"?(this.format("list","unchecked"),i.preventDefault()):a==="unchecked"&&(this.format("list","checked"),i.preventDefault())};n.addEventListener("mousedown",s),n.addEventListener("touchstart",s),this.attachUI(n)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(e,t)}};sn.blotName="list";sn.tagName="LI";nn.allowedChildren=[sn];sn.requiredContainer=nn;class Wi extends _e{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}class Cm extends Wi{static blotName="italic";static tagName=["EM","I"]}class Wn extends _e{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(e){const t=super.create(e);return t.setAttribute("href",this.sanitize(e)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(e){return e.getAttribute("href")}static sanitize(e){return Zl(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e!==this.statics.blotName||!t?super.format(e,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}}function Zl(r,e){const t=document.createElement("a");t.href=r;const n=t.href.slice(0,t.href.indexOf(":"));return e.indexOf(n)>-1}class Om extends _e{static blotName="script";static tagName=["SUB","SUP"];static create(e){return e==="super"?document.createElement("sup"):e==="sub"?document.createElement("sub"):super.create(e)}static formats(e){if(e.tagName==="SUB")return"sub";if(e.tagName==="SUP")return"super"}}class Rm extends Wi{static blotName="strike";static tagName=["S","STRIKE"]}class Lm extends _e{static blotName="underline";static tagName="U"}class km extends Bi{static blotName="formula";static className="ql-formula";static tagName="SPAN";static create(e){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const t=super.create(e);return typeof e=="string"&&(window.katex.render(e,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",e)),t}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`<span>${e}</span>`}}const Eo=["alt","height","width"];class jm extends ke{static blotName="image";static tagName="IMG";static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Eo.reduce((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return Zl(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,t){Eo.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}}const xo=["height","width"];class Im extends Me{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(e){const t=super.create(e);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(e)),t}static formats(e){return xo.reduce((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t),{})}static sanitize(e){return Wn.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,t){xo.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){const{video:e}=this.value();return`<a href="${e}">${e}</a>`}}const zr=new We("code-token","hljs",{scope:V.INLINE});class ut extends _e{static formats(e,t){for(;e!=null&&e!==t.domNode;){if(e.classList&&e.classList.contains(Ce.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,n){super(e,t,n),zr.add(this.domNode,n)}format(e,t){e!==ut.blotName?super.format(e,t):t?zr.add(this.domNode,t):(zr.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),zr.value(this.domNode)||this.unwrap()}}ut.blotName="code-token";ut.className="ql-token";class De extends Ce{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("data-language",e),t}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),ut.blotName,!1),super.replaceWith(e,t)}}class Vr extends Ht{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===De.blotName&&(this.forceNext=!0,this.children.forEach(n=>{n.format(e,t)}))}formatAt(e,t,n,s){n===De.blotName&&(this.forceNext=!0),super.formatAt(e,t,n,s)}highlight(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const s=`${Array.from(this.domNode.childNodes).filter(a=>a!==this.uiNode).map(a=>a.textContent).join(`
63
63
  `)}
64
64
  `,i=De.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==s){if(s.trim().length>0||this.cachedText==null){const a=this.children.reduce((c,u)=>c.concat(Dl(u,!1)),new G),l=e(s,i);a.diff(l).reduce((c,u)=>{let{retain:h,attributes:g}=u;return h?(g&&Object.keys(g).forEach(f=>{[De.blotName,ut.blotName].includes(f)&&this.formatAt(c,h,f,g[f])}),c+h):c},0)}this.cachedText=s,this.forceNext=!1}}html(e,t){const[n]=this.children.find(e);return`<pre data-language="${n?De.formats(n.domNode):"plain"}">
65
65
  ${es(this.code(e,t))}
66
66
  </pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const t=De.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}}Vr.allowedChildren=[De];De.requiredContainer=Vr;De.allowedChildren=[ut,He,Ve,Ke];const qm=(r,e,t)=>{if(typeof r.versionString=="string"){const n=r.versionString.split(".")[0];if(parseInt(n,10)>=11)return r.highlight(t,{language:e}).value}return r.highlight(e,t).value};class Jl extends rt{static register(){R.register(ut,!0),R.register(De,!0),R.register(Vr,!0)}constructor(e,t){if(super(e,t),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((n,s)=>{let{key:i}=s;return n[i]=!0,n},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(R.events.SCROLL_BLOT_MOUNT,e=>{if(!(e instanceof Vr))return;const t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(n=>{let{key:s,label:i}=n;const a=t.ownerDocument.createElement("option");a.textContent=i,a.setAttribute("value",s),t.appendChild(a)}),t.addEventListener("change",()=>{e.format(De.blotName,t.value),this.quill.root.focus(),this.highlight(e,!0)}),e.uiNode==null&&(e.attachUI(t),e.children.head&&(t.value=De.formats(e.children.head.domNode)))})}initTimer(){let e=null;this.quill.on(R.events.SCROLL_OPTIMIZE,()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.highlight(),e=null},this.options.interval)})}highlight(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(R.sources.USER);const n=this.quill.getSelection();(e==null?this.quill.scroll.descendants(Vr):[e]).forEach(i=>{i.highlight(this.highlightBlot,t)}),this.quill.update(R.sources.SILENT),n!=null&&this.quill.setSelection(n,R.sources.SILENT)}highlightBlot(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(t=this.languages[t]?t:"plain",t==="plain")return es(e).split(`
67
67
  `).reduce((s,i,a)=>(a!==0&&s.insert(`
68
- `,{[Ce.blotName]:t}),s.insert(i)),new G);const n=this.quill.root.ownerDocument.createElement("div");return n.classList.add(Ce.className),n.innerHTML=qm(this.options.hljs,t,e),Gi(this.quill.scroll,n,[(s,i)=>{const a=zr.value(s);return a?i.compose(new G().retain(i.length(),{[ut.blotName]:a})):i}],[(s,i)=>s.data.split(`
68
+ `,{[Ce.blotName]:t}),s.insert(i)),new G);const n=this.quill.root.ownerDocument.createElement("div");return n.classList.add(Ce.className),n.innerHTML=qm(this.options.hljs,t,e),Vi(this.quill.scroll,n,[(s,i)=>{const a=zr.value(s);return a?i.compose(new G().retain(i.length(),{[ut.blotName]:a})):i}],[(s,i)=>s.data.split(`
69
69
  `).reduce((a,l,c)=>(c!==0&&a.insert(`
70
- `,{[Ce.blotName]:t}),a.insert(l)),i)],new WeakMap)}}Jl.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};let lt=class Ql extends Ee{static blotName="table";static tagName="TD";static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",Wi()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===Ql.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}},Mt=class extends Ut{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),t=this.children.tail.formats(),n=this.next.children.head.formats(),s=this.next.children.tail.formats();return e.table===t.table&&e.table===n.table&&e.table===s.table}return!1}optimize(e){super.optimize(e),this.children.forEach(t=>{if(t.next==null)return;const n=t.formats(),s=t.next.formats();if(n.table!==s.table){const i=this.splitAfter(t);i&&i.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}},xt=class extends Ut{static blotName="table-body";static tagName="TBODY"};class Kn extends Ut{static blotName="table-container";static tagName="TABLE";balanceCells(){const e=this.descendants(Mt),t=e.reduce((n,s)=>Math.max(s.children.length,n),0);e.forEach(n=>{new Array(t-n.children.length).fill(0).forEach(()=>{let s;n.children.head!=null&&(s=lt.formats(n.children.head.domNode));const i=this.scroll.create(lt.blotName,s);n.appendChild(i),i.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(xt);t==null||t.children.head==null||t.children.forEach(n=>{const s=n.children.at(e);s?.remove()})}insertColumn(e){const[t]=this.descendant(xt);t==null||t.children.head==null||t.children.forEach(n=>{const s=n.children.at(e),i=lt.formats(n.children.head.domNode),a=this.scroll.create(lt.blotName,i);n.insertBefore(a,s)})}insertRow(e){const[t]=this.descendant(xt);if(t==null||t.children.head==null)return;const n=Wi(),s=this.scroll.create(Mt.blotName);t.children.head.children.forEach(()=>{const a=this.scroll.create(lt.blotName,n);s.appendChild(a)});const i=t.children.at(e);t.insertBefore(s,i)}rows(){const e=this.children.head;return e==null?[]:e.children.map(t=>t)}}Kn.allowedChildren=[xt];xt.requiredContainer=Kn;xt.allowedChildren=[Mt];Mt.requiredContainer=xt;Mt.allowedChildren=[lt];lt.requiredContainer=Mt;function Wi(){return`row-${Math.random().toString(36).slice(2,6)}`}let Dm=class extends rt{static register(){R.register(lt),R.register(Mt),R.register(xt),R.register(Kn)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Kn).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update(R.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update(R.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const t=e.offset();e.remove(),this.quill.update(R.sources.USER),this.quill.setSelection(t,R.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];const[t,n]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==lt.blotName)return[null,null,null,-1];const s=t.parent;return[s.parent.parent,s,t,n]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[n,s,i]=this.getTable(t);if(i==null)return;const a=i.cellOffset();n.insertColumn(a+e),this.quill.update(R.sources.USER);let l=s.rowOffset();e===0&&(l+=1),this.quill.setSelection(t.index+l,t.length,R.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[n,s,i]=this.getTable(t);if(i==null)return;const a=s.rowOffset();n.insertRow(a+e),this.quill.update(R.sources.USER),e>0?this.quill.setSelection(t,R.sources.SILENT):this.quill.setSelection(t.index+s.children.length,t.length,R.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const n=this.quill.getSelection();if(n==null)return;const s=new Array(e).fill(0).reduce(i=>{const a=new Array(t).fill(`
71
- `).join("");return i.insert(a,{table:Wi()})},new G().retain(n.index));this.quill.updateContents(s,R.sources.USER),this.quill.setSelection(n.index,R.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(R.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(R.events.TEXT_CHANGE,(n,s,i)=>{i===R.sources.USER&&this.balanceTables()}),!0):!1)})}};const xo=dt("quill:toolbar");class Ki extends rt{constructor(e,t){if(super(e,t),Array.isArray(this.options.container)){const n=document.createElement("div");n.setAttribute("role","toolbar"),Mm(n,this.options.container),e.container?.parentNode?.insertBefore(n,e.container),this.container=n}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){xo.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(n=>{const s=this.options.handlers?.[n];s&&this.addHandler(n,s)}),Array.from(this.container.querySelectorAll("button, select")).forEach(n=>{this.attach(n)}),this.quill.on(R.events.EDITOR_CHANGE,()=>{const[n]=this.quill.selection.getRange();this.update(n)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(s=>s.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){xo.warn("ignoring attaching to nonexistent format",t,e);return}const n=e.tagName==="SELECT"?"change":"click";e.addEventListener(n,s=>{let i;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const l=e.options[e.selectedIndex];l.hasAttribute("selected")?i=!1:i=l.value||!1}else e.classList.contains("ql-active")?i=!1:i=e.value||!e.hasAttribute("value"),s.preventDefault();this.quill.focus();const[a]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,i);else if(this.quill.scroll.query(t).prototype instanceof ke){if(i=prompt(`Enter ${t}`),!i)return;this.quill.updateContents(new G().retain(a.index).delete(a.length).insert({[t]:i}),R.sources.USER)}else this.quill.format(t,i,R.sources.USER);this.update(a)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{const[s,i]=n;if(i.tagName==="SELECT"){let a=null;if(e==null)a=null;else if(t[s]==null)a=i.querySelector("option[selected]");else if(!Array.isArray(t[s])){let l=t[s];typeof l=="string"&&(l=l.replace(/"/g,'\\"')),a=i.querySelector(`option[value="${l}"]`)}a==null?(i.value="",i.selectedIndex=-1):a.selected=!0}else if(e==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const a=t[s],l=a===i.getAttribute("value")||a!=null&&a.toString()===i.getAttribute("value")||a==null&&!i.getAttribute("value");i.classList.toggle("ql-active",l),i.setAttribute("aria-pressed",l.toString())}else{const a=t[s]!=null;i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}})}}Ki.DEFAULTS={};function wo(r,e,t){const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add(`ql-${e}`),n.setAttribute("aria-pressed","false"),t!=null?(n.value=t,n.setAttribute("aria-label",`${e}: ${t}`)):n.setAttribute("aria-label",e),r.appendChild(n)}function Mm(r,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(s=>{if(typeof s=="string")wo(n,s);else{const i=Object.keys(s)[0],a=s[i];Array.isArray(a)?Pm(n,i,a):wo(n,i,a)}}),r.appendChild(n)})}function Pm(r,e,t){const n=document.createElement("select");n.classList.add(`ql-${e}`),t.forEach(s=>{const i=document.createElement("option");s!==!1?i.setAttribute("value",String(s)):i.setAttribute("selected","selected"),n.appendChild(i)}),r.appendChild(n)}Ki.DEFAULTS={container:null,handlers:{clean(){const r=this.quill.getSelection();if(r!=null)if(r.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,V.INLINE)!=null&&this.quill.format(t,!1,R.sources.USER)})}else this.quill.removeFormat(r.index,r.length,R.sources.USER)},direction(r){const{align:e}=this.quill.getFormat();r==="rtl"&&e==null?this.quill.format("align","right",R.sources.USER):!r&&e==="right"&&this.quill.format("align",!1,R.sources.USER),this.quill.format("direction",r,R.sources.USER)},indent(r){const e=this.quill.getSelection(),t=this.quill.getFormat(e),n=parseInt(t.indent||0,10);if(r==="+1"||r==="-1"){let s=r==="+1"?1:-1;t.direction==="rtl"&&(s*=-1),this.quill.format("indent",n+s,R.sources.USER)}},link(r){r===!0&&(r=prompt("Enter link URL:")),this.quill.format("link",r,R.sources.USER)},list(r){const e=this.quill.getSelection(),t=this.quill.getFormat(e);r==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,R.sources.USER):this.quill.format("list","unchecked",R.sources.USER):this.quill.format("list",r,R.sources.USER)}}};const Bm='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',$m='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',Fm='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',Um='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',Hm='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',zm='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',Gm='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',Vm='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',No='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',Wm='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',Km='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',Ym='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',Xm='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',Zm='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',Jm='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Qm='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',e1='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',t1='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',r1='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',n1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',s1='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',i1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',a1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',o1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',l1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',c1='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',u1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',h1='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',d1='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',f1='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',p1='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',g1='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',m1='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Qr={align:{"":Bm,center:$m,right:Fm,justify:Um},background:Hm,blockquote:zm,bold:Gm,clean:Vm,code:No,"code-block":No,color:Wm,direction:{"":Km,rtl:Ym},formula:Xm,header:{1:Zm,2:Jm,3:Qm,4:e1,5:t1,6:r1},italic:n1,image:s1,indent:{"+1":i1,"-1":a1},link:o1,list:{bullet:l1,check:c1,ordered:u1},script:{sub:h1,super:d1},strike:f1,table:p1,underline:g1,video:m1},b1='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let To=0;function Ao(r,e){r.setAttribute(e,`${r.getAttribute(e)!=="true"}`)}class rs{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Ao(this.label,"aria-expanded"),Ao(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const n=e.getAttribute("value");return n&&t.setAttribute("data-value",n),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",s=>{switch(s.key){case"Enter":this.selectItem(t,!0),s.preventDefault();break;case"Escape":this.escape(),s.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=b1,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${To}`,To+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const n=this.buildItem(t);e.appendChild(n),t.selected===!0&&this.selectItem(n)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.container.querySelector(".ql-selected");e!==n&&(n?.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const n=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(n)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class ec extends rs{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(n=>{n.classList.add("ql-primary")})}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const n=this.label.querySelector(".ql-color-label"),s=e&&e.getAttribute("data-value")||"";n&&(n.tagName==="line"?n.style.stroke=s:n.style.fill=s)}}class tc extends rs{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(n=>{n.innerHTML=t[n.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const n=e||this.defaultItem;if(n!=null){if(this.label.innerHTML===n.innerHTML)return;this.label.innerHTML=n.innerHTML}}}const v1=r=>{const{overflowY:e}=getComputedStyle(r,null);return e!=="visible"&&e!=="clip"};class rc{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,v1(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${n}px`,this.root.classList.remove("ql-flip");const s=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let a=0;if(i.right>s.right&&(a=s.right-i.right,this.root.style.left=`${t+a}px`),i.left<s.left&&(a=s.left-i.left,this.root.style.left=`${t+a}px`),i.bottom>s.bottom){const l=i.bottom-i.top,c=e.bottom-e.top+l;this.root.style.top=`${n-c}px`,this.root.classList.add("ql-flip")}return a}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const y1=[!1,"center","right","justify"],E1=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],x1=[!1,"serif","monospace"],w1=["1","2","3",!1],N1=["small",!1,"large","huge"];class an extends mr{constructor(e,t){super(e,t);const n=s=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",n);return}this.tooltip!=null&&!this.tooltip.root.contains(s.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(i=>{i.container.contains(s.target)||i.close()})};e.emitter.listenDOM("click",document.body,n)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(n=>{(n.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),t[i]!=null))if(i==="direction")n.innerHTML=t[i][""]+t[i].rtl;else if(typeof t[i]=="string")n.innerHTML=t[i];else{const a=n.value||"";a!=null&&t[i][a]&&(n.innerHTML=t[i][a])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(s=>{if(s.classList.contains("ql-align")&&(s.querySelector("option")==null&&Fr(s,y1),typeof t.align=="object"))return new tc(s,t.align);if(s.classList.contains("ql-background")||s.classList.contains("ql-color")){const i=s.classList.contains("ql-background")?"background":"color";return s.querySelector("option")==null&&Fr(s,E1,i==="background"?"#ffffff":"#000000"),new ec(s,t[i])}return s.querySelector("option")==null&&(s.classList.contains("ql-font")?Fr(s,x1):s.classList.contains("ql-header")?Fr(s,w1):s.classList.contains("ql-size")&&Fr(s,N1)),new rs(s)});const n=()=>{this.pickers.forEach(s=>{s.update()})};this.quill.on(z.events.EDITOR_CHANGE,n)}}an.DEFAULTS=Et({},mr.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let r=this.container.querySelector("input.ql-image[type=file]");r==null&&(r=document.createElement("input"),r.setAttribute("type","file"),r.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),r.classList.add("ql-image"),r.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,r.files),r.value=""}),this.container.appendChild(r)),r.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class nc extends rc{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const n=this.quill.getBounds(this.quill.selection.savedRange);n!=null&&this.position(n),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,z.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,z.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=T1(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const n=t.index+t.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),e,z.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(n+1," ",z.sources.USER),this.quill.setSelection(n+2,z.sources.USER)}break}}this.textbox.value="",this.hide()}}function T1(r){let e=r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=r.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:r}function Fr(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(n=>{const s=document.createElement("option");n===t?s.setAttribute("selected","selected"):s.setAttribute("value",String(n)),r.appendChild(s)})}const A1=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class S1 extends nc{static TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join("");constructor(e,t){super(e,t),this.quill.on(z.events.EDITOR_CHANGE,(n,s,i,a)=>{if(n===z.events.SELECTION_CHANGE)if(s!=null&&s.length>0&&a===z.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const l=this.quill.getLines(s.index,s.length);if(l.length===1){const c=this.quill.getBounds(s);c!=null&&this.position(c)}else{const c=l[l.length-1],u=this.quill.getIndex(c),h=Math.min(c.length()-1,s.index+s.length-u),g=this.quill.getBounds(new Dt(u,h));g!=null&&this.position(g)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(z.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),n=this.root.querySelector(".ql-tooltip-arrow");return n.style.marginLeft="",t!==0&&(n.style.marginLeft=`${-1*t-n.offsetWidth/2}px`),t}}class sc extends an{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=A1),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new S1(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),Qr),this.buildPickers(e.container.querySelectorAll("select"),Qr))}}sc.DEFAULTS=Et({},an.DEFAULTS,{modules:{toolbar:{handlers:{link(r){r?this.quill.theme.tooltip.edit():this.quill.format("link",!1,R.sources.USER)}}}}});const _1=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class C1 extends nc{static TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",e=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),e.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",e=>{if(this.linkRange!=null){const t=this.linkRange;this.restoreFocus(),this.quill.formatText(t,"link",!1,z.sources.USER),delete this.linkRange}e.preventDefault(),this.hide()}),this.quill.on(z.events.SELECTION_CHANGE,(e,t,n)=>{if(e!=null){if(e.length===0&&n===z.sources.USER){const[s,i]=this.quill.scroll.descendant(Wn,e.index);if(s!=null){this.linkRange=new Dt(e.index-i,s.length());const a=Wn.formats(s.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const l=this.quill.getBounds(this.linkRange);l!=null&&this.position(l);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}class ic extends an{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=_1),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),Qr),this.buildPickers(e.container.querySelectorAll("select"),Qr),this.tooltip=new C1(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,n)=>{e.handlers.link.call(e,!n.format.link)}))}}ic.DEFAULTS=Et({},an.DEFAULTS,{modules:{toolbar:{handlers:{link(r){if(r){const e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);const{tooltip:n}=this.quill.theme;n.edit("link",t)}else this.quill.format("link",!1,R.sources.USER)}}}}});R.register({"attributors/attribute/direction":Fl,"attributors/class/align":Pl,"attributors/class/background":jg,"attributors/class/color":kg,"attributors/class/direction":Ul,"attributors/class/font":Gl,"attributors/class/size":Wl,"attributors/style/align":Bl,"attributors/style/background":Fi,"attributors/style/color":$i,"attributors/style/direction":Hl,"attributors/style/font":Vl,"attributors/style/size":Kl},!0);R.register({"formats/align":Pl,"formats/direction":Ul,"formats/indent":Am,"formats/background":Fi,"formats/color":$i,"formats/font":Gl,"formats/size":Wl,"formats/blockquote":Sm,"formats/code-block":Ce,"formats/header":_m,"formats/list":sn,"formats/bold":Vi,"formats/code":Ui,"formats/italic":Cm,"formats/link":Wn,"formats/script":Om,"formats/strike":Rm,"formats/underline":Lm,"formats/formula":km,"formats/image":jm,"formats/video":Im,"modules/syntax":Jl,"modules/table":Dm,"modules/toolbar":Ki,"themes/bubble":sc,"themes/snow":ic,"ui/icons":Qr,"ui/picker":rs,"ui/icon-picker":tc,"ui/color-picker":ec,"ui/tooltip":rc},!0);class ns extends L.Component{constructor(e){super(e),this.editingAreaRef=L.createRef(),this.containerRef=L.createRef(),this.dirtyProps=["modules","formats","bounds","theme","children"],this.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],this.state={generation:0},this.selection=null,this.onEditorChange=(n,s,i,a)=>{n==="text-change"?this.onEditorChangeText?.(this.editor.root.innerHTML,s,a,this.unprivilegedEditor):n==="selection-change"&&this.onEditorChangeSelection?.(s,a,this.unprivilegedEditor)};const t=this.isControlled()?e.value:e.defaultValue;this.value=t??""}validateProps(e){if(L.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(L.Children.count(e.children)&&L.Children.only(e.children)?.type==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.");if(this.lastDeltaChangeSet&&e.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")}shouldComponentUpdate(e,t){if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){const n=this.getEditorContents(),s=e.value??"";this.isEqualValue(s,n)||this.setEditorContents(this.editor,s)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),[...this.cleanProps,...this.dirtyProps].some(n=>!mt(e[n],this.props[n]))}shouldComponentRegenerate(e){return this.dirtyProps.some(t=>!mt(e[t],this.props[t]))}componentDidMount(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())}componentWillUnmount(){this.destroyEditor()}componentDidUpdate(e,t){if(this.editor&&this.shouldComponentRegenerate(e)){const n=this.editor.getContents(),s=this.editor.getSelection();this.regenerationSnapshot={delta:n,selection:s},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==t.generation){const{delta:n,selection:s}=this.regenerationSnapshot;delete this.regenerationSnapshot,this.instantiateEditor();const i=this.editor;i.setContents(n),So(()=>this.setEditorSelection(i,s))}}instantiateEditor(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())}destroyEditor(){if(!this.editor)return;this.unhookEditor(this.editor);const e=this.props.modules?.toolbar;if(!(typeof e=="object"&&e&&"container"in e&&typeof e.container=="string"||typeof e=="string")){const n=this.containerRef.current?.querySelector(".ql-toolbar");n&&n.remove()}delete this.editor}isControlled(){return"value"in this.props}getEditorConfig(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,tabIndex:this.props.tabIndex,theme:this.props.theme}}getEditor(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor}createEditor(e,t){const n=new R(e,t);return t.tabIndex!=null&&this.setEditorTabIndex(n,t.tabIndex),this.hookEditor(n),n}hookEditor(e){this.unprivilegedEditor=this.makeUnprivilegedEditor(e),e.on("editor-change",this.onEditorChange)}unhookEditor(e){e.off("editor-change",this.onEditorChange)}getEditorContents(){return this.value}getEditorSelection(){return this.selection}isDelta(e){return e&&e.ops}isEqualValue(e,t){return this.isDelta(e)&&this.isDelta(t)?mt(e.ops,t.ops):mt(e,t)}setEditorContents(e,t){this.value=t;const n=this.getEditorSelection();typeof t=="string"?e.setContents(e.clipboard.convert({html:t})):e.setContents(t),So(()=>this.setEditorSelection(e,n))}setEditorSelection(e,t){if(this.selection=t,t){const n=e.getLength();t.index=Math.max(0,Math.min(t.index,n-1)),t.length=Math.max(0,Math.min(t.length,n-1-t.index)),e.setSelection(t)}}setEditorTabIndex(e,t){e?.scroll?.domNode&&(e.scroll.domNode.tabIndex=t)}setEditorReadOnly(e,t){t?e.disable():e.enable()}makeUnprivilegedEditor(e){const t=e;return{getHTML:()=>t.root.innerHTML,getSemanticHTML:t.getSemanticHTML.bind(t),getLength:t.getLength.bind(t),getText:t.getText.bind(t),getContents:t.getContents.bind(t),getSelection:t.getSelection.bind(t),getBounds:t.getBounds.bind(t)}}getEditingArea(){const e=this.editingAreaRef.current;if(!e)throw new Error("Cannot find element for editing area");if(e.nodeType===3)throw new Error("Editing area cannot be a text node");return e}renderEditingArea(){const{children:e,preserveWhitespace:t}=this.props,{generation:n}=this.state,s={key:n,ref:this.editingAreaRef};return L.Children.count(e)?L.cloneElement(L.Children.only(e),s):t?L.createElement("pre",{...s}):L.createElement("div",{...s})}render(){return L.createElement("div",{ref:this.containerRef,id:this.props.id,style:this.props.style,key:this.state.generation,className:`quill ${this.props.className??""}`,onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())}onEditorChangeText(e,t,n,s){if(!this.editor)return;const i=this.isDelta(this.value)?s.getContents():s.getHTML();i!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=i,this.props.onChange?.(e,t,n,s))}onEditorChangeSelection(e,t,n){if(!this.editor)return;const s=this.getEditorSelection(),i=!s&&e,a=s&&!e;mt(e,s)||(this.selection=e,this.props.onChangeSelection?.(e,t,n),i?this.props.onFocus?.(e,t,n):a&&this.props.onBlur?.(s,t,n))}focus(){this.editor&&this.editor.focus()}blur(){this.editor&&(this.selection=null,this.editor.blur())}}ns.displayName="React Quill";ns.Quill=R;ns.defaultProps={theme:"snow",modules:{},readOnly:!1};function So(r){Promise.resolve().then(r)}const O1=({name:r,label:e,message:t,required:n,value:s,onChange:i,error:a,minimizeToolbar:l=!0})=>{const[c,u]=L.useState(!1),h=L.useRef(null),g=L.useCallback(()=>{const x=h.current?.getEditor();u(y=>{const N=!y;return setTimeout(N?()=>x?.focus():()=>x?.focus(),100),N})},[]);L.useEffect(()=>{const x=y=>{y.key==="Escape"&&c&&g()};return c&&(document.addEventListener("keydown",x),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",x),document.body.style.overflow=""}},[c,g]);const f={toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],[{align:[]}],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],[{color:[]},{background:[]}],["link","image"],["clean"]]},b={toolbar:[["bold","italic","underline","strike"],[{align:[]}],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],["clean"]]};return p.jsxs(p.Fragment,{children:[p.jsxs("label",{htmlFor:r,children:[e," ",n&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:`quill-editor-wrapper ${c?"fullscreen":""}`,children:[p.jsx(ns,{ref:h,id:r,theme:"snow",value:s,onChange:i,modules:l?b:f}),p.jsx("button",{className:"custom-expand-btn",onClick:g,title:c?"Minimize Editor":"Expand Editor",children:c?p.jsx(kc,{size:16}):p.jsx(Lc,{size:16})})]}),a?p.jsx("small",{className:"form-message text-danger",children:a}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})},R1=({progress:r,visible:e})=>e?p.jsx("div",{className:"loading-bar-container",children:p.jsx("div",{className:"loading-bar",style:{width:`${r}%`,transition:"width 300ms ease-in-out"}})}):null,L1=({className:r="",children:e})=>p.jsx("ul",{className:`block-list ${r}`,children:e}),k1=({children:r})=>p.jsx("li",{children:r}),j1=({children:r,className:e="",view:t="list",gridColumn:n=1})=>p.jsx("div",{className:`divcard-table ${t==="grid"?"grid-mode":""} ${e}`,style:t==="grid"?{gridTemplateColumns:`repeat(${n}, 1fr)`}:{},children:r}),I1=({children:r})=>p.jsx("div",{className:"table-row header",children:r}),q1=({children:r})=>p.jsx(p.Fragment,{children:r}),D1=({children:r,className:e="",isActive:t=!1})=>p.jsx("div",{className:`table-row ${t?"active":""} ${e}`,children:r}),M1=({children:r,className:e="",hideOnGrid:t=!1})=>p.jsx("div",{className:`cell ${t?"hide-ongrid":""} ${e}`,children:r}),P1=({children:r})=>p.jsx("div",{className:"table-row footer",children:r}),B1=({children:r,className:e=""})=>p.jsx("table",{className:e,children:r}),$1=({children:r,className:e=""})=>p.jsx("thead",{className:e,children:r}),F1=({children:r,className:e=""})=>p.jsx("tbody",{className:e,children:r}),U1=({children:r,className:e="",...t})=>p.jsx("tr",{className:e,...t,children:r}),H1=({children:r,header:e=!1,className:t="",colSpan:n,style:s})=>{const i=e?"th":"td",a={className:t,colSpan:n,style:s};return p.jsx(i,{...a,children:r})},z1=({children:r,className:e=""})=>p.jsx("tfoot",{className:e,children:r}),G1=({count:r,handleMultipleDelete:e})=>p.jsxs("div",{className:"selected-toolbar",children:[p.jsx(ze,{className:"btn-icon btn-danger",onClick:e,children:p.jsx(qc,{})}),p.jsxs("p",{children:[r," item selected"]})]}),V1=({startIndex:r,endIndex:e,currentPage:t,totalData:n,itemsPerPage:s,setItemsPerPage:i,setCurrentPage:a,totalPages:l,showPerPage:c=!0})=>p.jsxs("div",{className:"pagination-toolbar",children:[c&&p.jsxs("div",{className:"pagination-select",children:[p.jsx("p",{children:"Baris per halaman:"}),p.jsx(yt,{name:"row_perpage",size:"sm",options:[{value:"10",label:"10"},{value:"20",label:"20"},{value:"30",label:"30"},{value:"50",label:"50"}],value:s.toString(),onChange:u=>{i(Number(u.target.value)),a(1)}})]}),p.jsx("div",{className:"pagination-nav",children:` ${r+1} - ${Math.min(e,n)} dari ${n}`}),p.jsx("div",{className:"pagination-button",children:p.jsxs("div",{className:"btn-group",children:[p.jsx(ze,{className:"btn-icon btn-info",onClick:()=>a(1),disabled:t<=1,children:p.jsx(jc,{})}),p.jsx(ze,{className:"btn-icon btn-info",onClick:()=>a(t-1),disabled:t<=1,children:p.jsx(Oc,{})}),p.jsx(ze,{className:"btn-icon btn-info",onClick:()=>a(Math.min(t+1,l)),disabled:t>=l,children:p.jsx(Rc,{})}),p.jsx(ze,{className:"btn-icon btn-info",onClick:()=>a(l),disabled:t>=l,children:p.jsx(Ic,{})})]})})]}),W1=({count:r,selectedItem:e,selectedRows:t})=>p.jsxs("div",{className:"selected-toolbar-block",style:{borderRadius:"0 0 4px 0"},children:[p.jsxs("span",{children:[r," item selected"]}),p.jsxs(ze,{className:"btn btn-primary",onClick:()=>e(t),children:[p.jsx(Ro,{})," Gunakan"]})]});exports.Accordion=su;exports.AccordionSection=iu;exports.AccordionSectionBody=Fo;exports.AccordionSectionFooter=Uo;exports.Alert=Yc;exports.Badge=vc;exports.Box=yc;exports.Button=ze;exports.Callout=Zc;exports.Card=dc;exports.CardBody=uc;exports.CardFooter=hc;exports.CardHeader=cc;exports.Checkbox=Ci;exports.CircularProgress=au;exports.CircularProgressWithLabel=lu;exports.ClearInput=wu;exports.ConfirmationAlert=Xc;exports.DatePicker=Wo;exports.DivTable=j1;exports.DivTableBody=q1;exports.DivTableCell=M1;exports.DivTableFooter=P1;exports.DivTableHeader=I1;exports.DivTableRow=D1;exports.Dropdown=gc;exports.DropdownContent=bc;exports.DropdownDatePicker=Ko;exports.DropdownMenu=pc;exports.DropdownToggle=mc;exports.FormCheckbox=gu;exports.FormContainer=fu;exports.FormGroup=pu;exports.FormRadio=mu;exports.Input=Yo;exports.InputDate=Xo;exports.InputFile=Zo;exports.InputImageSize=Tu;exports.InputTextArea=Jo;exports.InputWithAction=Nu;exports.LinearProgress=ou;exports.ListItem=k1;exports.ListView=L1;exports.LoadingBar=R1;exports.Modal=$o;exports.ModalBody=Po;exports.ModalFooter=Bo;exports.ModalHeader=Mo;exports.Popover=Qc;exports.Radio=Au;exports.RadioButtonGroup=Qo;exports.ReactQuillEditor=O1;exports.Select=yt;exports.SelectMultiple=el;exports.SelectWithSearch=tl;exports.Spinner=fc;exports.Switch=rl;exports.Tab=ci;exports.TabGroup=_o;exports.Table=B1;exports.TableBody=F1;exports.TableCell=H1;exports.TableDeleteSelectedItems=G1;exports.TableFooter=z1;exports.TableHeader=$1;exports.TablePaginating=V1;exports.TablePickSelectedItems=W1;exports.TableRow=U1;exports.Tabs=Ec;exports.Tooltip=Jc;
70
+ `,{[Ce.blotName]:t}),a.insert(l)),i)],new WeakMap)}}Jl.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};let lt=class Ql extends Ee{static blotName="table";static tagName="TD";static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",Ki()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===Ql.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}},Mt=class extends Ut{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),t=this.children.tail.formats(),n=this.next.children.head.formats(),s=this.next.children.tail.formats();return e.table===t.table&&e.table===n.table&&e.table===s.table}return!1}optimize(e){super.optimize(e),this.children.forEach(t=>{if(t.next==null)return;const n=t.formats(),s=t.next.formats();if(n.table!==s.table){const i=this.splitAfter(t);i&&i.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}},xt=class extends Ut{static blotName="table-body";static tagName="TBODY"};class Kn extends Ut{static blotName="table-container";static tagName="TABLE";balanceCells(){const e=this.descendants(Mt),t=e.reduce((n,s)=>Math.max(s.children.length,n),0);e.forEach(n=>{new Array(t-n.children.length).fill(0).forEach(()=>{let s;n.children.head!=null&&(s=lt.formats(n.children.head.domNode));const i=this.scroll.create(lt.blotName,s);n.appendChild(i),i.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(xt);t==null||t.children.head==null||t.children.forEach(n=>{const s=n.children.at(e);s?.remove()})}insertColumn(e){const[t]=this.descendant(xt);t==null||t.children.head==null||t.children.forEach(n=>{const s=n.children.at(e),i=lt.formats(n.children.head.domNode),a=this.scroll.create(lt.blotName,i);n.insertBefore(a,s)})}insertRow(e){const[t]=this.descendant(xt);if(t==null||t.children.head==null)return;const n=Ki(),s=this.scroll.create(Mt.blotName);t.children.head.children.forEach(()=>{const a=this.scroll.create(lt.blotName,n);s.appendChild(a)});const i=t.children.at(e);t.insertBefore(s,i)}rows(){const e=this.children.head;return e==null?[]:e.children.map(t=>t)}}Kn.allowedChildren=[xt];xt.requiredContainer=Kn;xt.allowedChildren=[Mt];Mt.requiredContainer=xt;Mt.allowedChildren=[lt];lt.requiredContainer=Mt;function Ki(){return`row-${Math.random().toString(36).slice(2,6)}`}let Dm=class extends rt{static register(){R.register(lt),R.register(Mt),R.register(xt),R.register(Kn)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Kn).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update(R.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update(R.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const t=e.offset();e.remove(),this.quill.update(R.sources.USER),this.quill.setSelection(t,R.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];const[t,n]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==lt.blotName)return[null,null,null,-1];const s=t.parent;return[s.parent.parent,s,t,n]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[n,s,i]=this.getTable(t);if(i==null)return;const a=i.cellOffset();n.insertColumn(a+e),this.quill.update(R.sources.USER);let l=s.rowOffset();e===0&&(l+=1),this.quill.setSelection(t.index+l,t.length,R.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[n,s,i]=this.getTable(t);if(i==null)return;const a=s.rowOffset();n.insertRow(a+e),this.quill.update(R.sources.USER),e>0?this.quill.setSelection(t,R.sources.SILENT):this.quill.setSelection(t.index+s.children.length,t.length,R.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const n=this.quill.getSelection();if(n==null)return;const s=new Array(e).fill(0).reduce(i=>{const a=new Array(t).fill(`
71
+ `).join("");return i.insert(a,{table:Ki()})},new G().retain(n.index));this.quill.updateContents(s,R.sources.USER),this.quill.setSelection(n.index,R.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(R.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(R.events.TEXT_CHANGE,(n,s,i)=>{i===R.sources.USER&&this.balanceTables()}),!0):!1)})}};const wo=dt("quill:toolbar");class Yi extends rt{constructor(e,t){if(super(e,t),Array.isArray(this.options.container)){const n=document.createElement("div");n.setAttribute("role","toolbar"),Mm(n,this.options.container),e.container?.parentNode?.insertBefore(n,e.container),this.container=n}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){wo.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(n=>{const s=this.options.handlers?.[n];s&&this.addHandler(n,s)}),Array.from(this.container.querySelectorAll("button, select")).forEach(n=>{this.attach(n)}),this.quill.on(R.events.EDITOR_CHANGE,()=>{const[n]=this.quill.selection.getRange();this.update(n)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(s=>s.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){wo.warn("ignoring attaching to nonexistent format",t,e);return}const n=e.tagName==="SELECT"?"change":"click";e.addEventListener(n,s=>{let i;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const l=e.options[e.selectedIndex];l.hasAttribute("selected")?i=!1:i=l.value||!1}else e.classList.contains("ql-active")?i=!1:i=e.value||!e.hasAttribute("value"),s.preventDefault();this.quill.focus();const[a]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,i);else if(this.quill.scroll.query(t).prototype instanceof ke){if(i=prompt(`Enter ${t}`),!i)return;this.quill.updateContents(new G().retain(a.index).delete(a.length).insert({[t]:i}),R.sources.USER)}else this.quill.format(t,i,R.sources.USER);this.update(a)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{const[s,i]=n;if(i.tagName==="SELECT"){let a=null;if(e==null)a=null;else if(t[s]==null)a=i.querySelector("option[selected]");else if(!Array.isArray(t[s])){let l=t[s];typeof l=="string"&&(l=l.replace(/"/g,'\\"')),a=i.querySelector(`option[value="${l}"]`)}a==null?(i.value="",i.selectedIndex=-1):a.selected=!0}else if(e==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const a=t[s],l=a===i.getAttribute("value")||a!=null&&a.toString()===i.getAttribute("value")||a==null&&!i.getAttribute("value");i.classList.toggle("ql-active",l),i.setAttribute("aria-pressed",l.toString())}else{const a=t[s]!=null;i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}})}}Yi.DEFAULTS={};function No(r,e,t){const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add(`ql-${e}`),n.setAttribute("aria-pressed","false"),t!=null?(n.value=t,n.setAttribute("aria-label",`${e}: ${t}`)):n.setAttribute("aria-label",e),r.appendChild(n)}function Mm(r,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(s=>{if(typeof s=="string")No(n,s);else{const i=Object.keys(s)[0],a=s[i];Array.isArray(a)?Pm(n,i,a):No(n,i,a)}}),r.appendChild(n)})}function Pm(r,e,t){const n=document.createElement("select");n.classList.add(`ql-${e}`),t.forEach(s=>{const i=document.createElement("option");s!==!1?i.setAttribute("value",String(s)):i.setAttribute("selected","selected"),n.appendChild(i)}),r.appendChild(n)}Yi.DEFAULTS={container:null,handlers:{clean(){const r=this.quill.getSelection();if(r!=null)if(r.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,V.INLINE)!=null&&this.quill.format(t,!1,R.sources.USER)})}else this.quill.removeFormat(r.index,r.length,R.sources.USER)},direction(r){const{align:e}=this.quill.getFormat();r==="rtl"&&e==null?this.quill.format("align","right",R.sources.USER):!r&&e==="right"&&this.quill.format("align",!1,R.sources.USER),this.quill.format("direction",r,R.sources.USER)},indent(r){const e=this.quill.getSelection(),t=this.quill.getFormat(e),n=parseInt(t.indent||0,10);if(r==="+1"||r==="-1"){let s=r==="+1"?1:-1;t.direction==="rtl"&&(s*=-1),this.quill.format("indent",n+s,R.sources.USER)}},link(r){r===!0&&(r=prompt("Enter link URL:")),this.quill.format("link",r,R.sources.USER)},list(r){const e=this.quill.getSelection(),t=this.quill.getFormat(e);r==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,R.sources.USER):this.quill.format("list","unchecked",R.sources.USER):this.quill.format("list",r,R.sources.USER)}}};const Bm='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',$m='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',Fm='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',Um='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',Hm='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',zm='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',Gm='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',Vm='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',To='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',Wm='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',Km='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',Ym='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',Xm='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',Zm='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',Jm='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Qm='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',e1='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',t1='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',r1='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',n1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',s1='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',i1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',a1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',o1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',l1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',c1='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',u1='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',h1='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',d1='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',f1='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',p1='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',g1='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',m1='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Qr={align:{"":Bm,center:$m,right:Fm,justify:Um},background:Hm,blockquote:zm,bold:Gm,clean:Vm,code:To,"code-block":To,color:Wm,direction:{"":Km,rtl:Ym},formula:Xm,header:{1:Zm,2:Jm,3:Qm,4:e1,5:t1,6:r1},italic:n1,image:s1,indent:{"+1":i1,"-1":a1},link:o1,list:{bullet:l1,check:c1,ordered:u1},script:{sub:h1,super:d1},strike:f1,table:p1,underline:g1,video:m1},b1='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let Ao=0;function So(r,e){r.setAttribute(e,`${r.getAttribute(e)!=="true"}`)}class rs{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),So(this.label,"aria-expanded"),So(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const n=e.getAttribute("value");return n&&t.setAttribute("data-value",n),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",s=>{switch(s.key){case"Enter":this.selectItem(t,!0),s.preventDefault();break;case"Escape":this.escape(),s.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=b1,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${Ao}`,Ao+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const n=this.buildItem(t);e.appendChild(n),t.selected===!0&&this.selectItem(n)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.container.querySelector(".ql-selected");e!==n&&(n?.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const n=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(n)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class ec extends rs{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(n=>{n.classList.add("ql-primary")})}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const n=this.label.querySelector(".ql-color-label"),s=e&&e.getAttribute("data-value")||"";n&&(n.tagName==="line"?n.style.stroke=s:n.style.fill=s)}}class tc extends rs{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(n=>{n.innerHTML=t[n.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const n=e||this.defaultItem;if(n!=null){if(this.label.innerHTML===n.innerHTML)return;this.label.innerHTML=n.innerHTML}}}const v1=r=>{const{overflowY:e}=getComputedStyle(r,null);return e!=="visible"&&e!=="clip"};class rc{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,v1(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${n}px`,this.root.classList.remove("ql-flip");const s=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let a=0;if(i.right>s.right&&(a=s.right-i.right,this.root.style.left=`${t+a}px`),i.left<s.left&&(a=s.left-i.left,this.root.style.left=`${t+a}px`),i.bottom>s.bottom){const l=i.bottom-i.top,c=e.bottom-e.top+l;this.root.style.top=`${n-c}px`,this.root.classList.add("ql-flip")}return a}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const y1=[!1,"center","right","justify"],E1=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],x1=[!1,"serif","monospace"],w1=["1","2","3",!1],N1=["small",!1,"large","huge"];class an extends mr{constructor(e,t){super(e,t);const n=s=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",n);return}this.tooltip!=null&&!this.tooltip.root.contains(s.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(i=>{i.container.contains(s.target)||i.close()})};e.emitter.listenDOM("click",document.body,n)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(n=>{(n.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),t[i]!=null))if(i==="direction")n.innerHTML=t[i][""]+t[i].rtl;else if(typeof t[i]=="string")n.innerHTML=t[i];else{const a=n.value||"";a!=null&&t[i][a]&&(n.innerHTML=t[i][a])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(s=>{if(s.classList.contains("ql-align")&&(s.querySelector("option")==null&&Fr(s,y1),typeof t.align=="object"))return new tc(s,t.align);if(s.classList.contains("ql-background")||s.classList.contains("ql-color")){const i=s.classList.contains("ql-background")?"background":"color";return s.querySelector("option")==null&&Fr(s,E1,i==="background"?"#ffffff":"#000000"),new ec(s,t[i])}return s.querySelector("option")==null&&(s.classList.contains("ql-font")?Fr(s,x1):s.classList.contains("ql-header")?Fr(s,w1):s.classList.contains("ql-size")&&Fr(s,N1)),new rs(s)});const n=()=>{this.pickers.forEach(s=>{s.update()})};this.quill.on(z.events.EDITOR_CHANGE,n)}}an.DEFAULTS=Et({},mr.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let r=this.container.querySelector("input.ql-image[type=file]");r==null&&(r=document.createElement("input"),r.setAttribute("type","file"),r.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),r.classList.add("ql-image"),r.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,r.files),r.value=""}),this.container.appendChild(r)),r.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class nc extends rc{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const n=this.quill.getBounds(this.quill.selection.savedRange);n!=null&&this.position(n),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,z.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,z.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=T1(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const n=t.index+t.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),e,z.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(n+1," ",z.sources.USER),this.quill.setSelection(n+2,z.sources.USER)}break}}this.textbox.value="",this.hide()}}function T1(r){let e=r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=r.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:r}function Fr(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(n=>{const s=document.createElement("option");n===t?s.setAttribute("selected","selected"):s.setAttribute("value",String(n)),r.appendChild(s)})}const A1=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class S1 extends nc{static TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join("");constructor(e,t){super(e,t),this.quill.on(z.events.EDITOR_CHANGE,(n,s,i,a)=>{if(n===z.events.SELECTION_CHANGE)if(s!=null&&s.length>0&&a===z.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const l=this.quill.getLines(s.index,s.length);if(l.length===1){const c=this.quill.getBounds(s);c!=null&&this.position(c)}else{const c=l[l.length-1],u=this.quill.getIndex(c),h=Math.min(c.length()-1,s.index+s.length-u),g=this.quill.getBounds(new Dt(u,h));g!=null&&this.position(g)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(z.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),n=this.root.querySelector(".ql-tooltip-arrow");return n.style.marginLeft="",t!==0&&(n.style.marginLeft=`${-1*t-n.offsetWidth/2}px`),t}}class sc extends an{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=A1),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new S1(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),Qr),this.buildPickers(e.container.querySelectorAll("select"),Qr))}}sc.DEFAULTS=Et({},an.DEFAULTS,{modules:{toolbar:{handlers:{link(r){r?this.quill.theme.tooltip.edit():this.quill.format("link",!1,R.sources.USER)}}}}});const _1=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class C1 extends nc{static TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",e=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),e.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",e=>{if(this.linkRange!=null){const t=this.linkRange;this.restoreFocus(),this.quill.formatText(t,"link",!1,z.sources.USER),delete this.linkRange}e.preventDefault(),this.hide()}),this.quill.on(z.events.SELECTION_CHANGE,(e,t,n)=>{if(e!=null){if(e.length===0&&n===z.sources.USER){const[s,i]=this.quill.scroll.descendant(Wn,e.index);if(s!=null){this.linkRange=new Dt(e.index-i,s.length());const a=Wn.formats(s.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const l=this.quill.getBounds(this.linkRange);l!=null&&this.position(l);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}class ic extends an{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=_1),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),Qr),this.buildPickers(e.container.querySelectorAll("select"),Qr),this.tooltip=new C1(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,n)=>{e.handlers.link.call(e,!n.format.link)}))}}ic.DEFAULTS=Et({},an.DEFAULTS,{modules:{toolbar:{handlers:{link(r){if(r){const e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);const{tooltip:n}=this.quill.theme;n.edit("link",t)}else this.quill.format("link",!1,R.sources.USER)}}}}});R.register({"attributors/attribute/direction":Fl,"attributors/class/align":Pl,"attributors/class/background":jg,"attributors/class/color":kg,"attributors/class/direction":Ul,"attributors/class/font":Gl,"attributors/class/size":Wl,"attributors/style/align":Bl,"attributors/style/background":Ui,"attributors/style/color":Fi,"attributors/style/direction":Hl,"attributors/style/font":Vl,"attributors/style/size":Kl},!0);R.register({"formats/align":Pl,"formats/direction":Ul,"formats/indent":Am,"formats/background":Ui,"formats/color":Fi,"formats/font":Gl,"formats/size":Wl,"formats/blockquote":Sm,"formats/code-block":Ce,"formats/header":_m,"formats/list":sn,"formats/bold":Wi,"formats/code":Hi,"formats/italic":Cm,"formats/link":Wn,"formats/script":Om,"formats/strike":Rm,"formats/underline":Lm,"formats/formula":km,"formats/image":jm,"formats/video":Im,"modules/syntax":Jl,"modules/table":Dm,"modules/toolbar":Yi,"themes/bubble":sc,"themes/snow":ic,"ui/icons":Qr,"ui/picker":rs,"ui/icon-picker":tc,"ui/color-picker":ec,"ui/tooltip":rc},!0);class ns extends L.Component{constructor(e){super(e),this.editingAreaRef=L.createRef(),this.containerRef=L.createRef(),this.dirtyProps=["modules","formats","bounds","theme","children"],this.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],this.state={generation:0},this.selection=null,this.onEditorChange=(n,s,i,a)=>{n==="text-change"?this.onEditorChangeText?.(this.editor.root.innerHTML,s,a,this.unprivilegedEditor):n==="selection-change"&&this.onEditorChangeSelection?.(s,a,this.unprivilegedEditor)};const t=this.isControlled()?e.value:e.defaultValue;this.value=t??""}validateProps(e){if(L.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(L.Children.count(e.children)&&L.Children.only(e.children)?.type==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.");if(this.lastDeltaChangeSet&&e.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")}shouldComponentUpdate(e,t){if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){const n=this.getEditorContents(),s=e.value??"";this.isEqualValue(s,n)||this.setEditorContents(this.editor,s)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),[...this.cleanProps,...this.dirtyProps].some(n=>!mt(e[n],this.props[n]))}shouldComponentRegenerate(e){return this.dirtyProps.some(t=>!mt(e[t],this.props[t]))}componentDidMount(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())}componentWillUnmount(){this.destroyEditor()}componentDidUpdate(e,t){if(this.editor&&this.shouldComponentRegenerate(e)){const n=this.editor.getContents(),s=this.editor.getSelection();this.regenerationSnapshot={delta:n,selection:s},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==t.generation){const{delta:n,selection:s}=this.regenerationSnapshot;delete this.regenerationSnapshot,this.instantiateEditor();const i=this.editor;i.setContents(n),_o(()=>this.setEditorSelection(i,s))}}instantiateEditor(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())}destroyEditor(){if(!this.editor)return;this.unhookEditor(this.editor);const e=this.props.modules?.toolbar;if(!(typeof e=="object"&&e&&"container"in e&&typeof e.container=="string"||typeof e=="string")){const n=this.containerRef.current?.querySelector(".ql-toolbar");n&&n.remove()}delete this.editor}isControlled(){return"value"in this.props}getEditorConfig(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,tabIndex:this.props.tabIndex,theme:this.props.theme}}getEditor(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor}createEditor(e,t){const n=new R(e,t);return t.tabIndex!=null&&this.setEditorTabIndex(n,t.tabIndex),this.hookEditor(n),n}hookEditor(e){this.unprivilegedEditor=this.makeUnprivilegedEditor(e),e.on("editor-change",this.onEditorChange)}unhookEditor(e){e.off("editor-change",this.onEditorChange)}getEditorContents(){return this.value}getEditorSelection(){return this.selection}isDelta(e){return e&&e.ops}isEqualValue(e,t){return this.isDelta(e)&&this.isDelta(t)?mt(e.ops,t.ops):mt(e,t)}setEditorContents(e,t){this.value=t;const n=this.getEditorSelection();typeof t=="string"?e.setContents(e.clipboard.convert({html:t})):e.setContents(t),_o(()=>this.setEditorSelection(e,n))}setEditorSelection(e,t){if(this.selection=t,t){const n=e.getLength();t.index=Math.max(0,Math.min(t.index,n-1)),t.length=Math.max(0,Math.min(t.length,n-1-t.index)),e.setSelection(t)}}setEditorTabIndex(e,t){e?.scroll?.domNode&&(e.scroll.domNode.tabIndex=t)}setEditorReadOnly(e,t){t?e.disable():e.enable()}makeUnprivilegedEditor(e){const t=e;return{getHTML:()=>t.root.innerHTML,getSemanticHTML:t.getSemanticHTML.bind(t),getLength:t.getLength.bind(t),getText:t.getText.bind(t),getContents:t.getContents.bind(t),getSelection:t.getSelection.bind(t),getBounds:t.getBounds.bind(t)}}getEditingArea(){const e=this.editingAreaRef.current;if(!e)throw new Error("Cannot find element for editing area");if(e.nodeType===3)throw new Error("Editing area cannot be a text node");return e}renderEditingArea(){const{children:e,preserveWhitespace:t}=this.props,{generation:n}=this.state,s={key:n,ref:this.editingAreaRef};return L.Children.count(e)?L.cloneElement(L.Children.only(e),s):t?L.createElement("pre",{...s}):L.createElement("div",{...s})}render(){return L.createElement("div",{ref:this.containerRef,id:this.props.id,style:this.props.style,key:this.state.generation,className:`quill ${this.props.className??""}`,onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())}onEditorChangeText(e,t,n,s){if(!this.editor)return;const i=this.isDelta(this.value)?s.getContents():s.getHTML();i!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=i,this.props.onChange?.(e,t,n,s))}onEditorChangeSelection(e,t,n){if(!this.editor)return;const s=this.getEditorSelection(),i=!s&&e,a=s&&!e;mt(e,s)||(this.selection=e,this.props.onChangeSelection?.(e,t,n),i?this.props.onFocus?.(e,t,n):a&&this.props.onBlur?.(s,t,n))}focus(){this.editor&&this.editor.focus()}blur(){this.editor&&(this.selection=null,this.editor.blur())}}ns.displayName="React Quill";ns.Quill=R;ns.defaultProps={theme:"snow",modules:{},readOnly:!1};function _o(r){Promise.resolve().then(r)}const O1=({name:r,label:e,message:t,required:n,value:s,onChange:i,error:a,minimizeToolbar:l=!0})=>{const[c,u]=L.useState(!1),h=L.useRef(null),g=L.useCallback(()=>{const x=h.current?.getEditor();u(y=>{const N=!y;return setTimeout(N?()=>x?.focus():()=>x?.focus(),100),N})},[]);L.useEffect(()=>{const x=y=>{y.key==="Escape"&&c&&g()};return c&&(document.addEventListener("keydown",x),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",x),document.body.style.overflow=""}},[c,g]);const f={toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],[{align:[]}],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],[{color:[]},{background:[]}],["link","image"],["clean"]]},b={toolbar:[["bold","italic","underline","strike"],[{align:[]}],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],["clean"]]};return p.jsxs(p.Fragment,{children:[p.jsxs("label",{htmlFor:r,children:[e," ",n&&p.jsx("span",{className:"text-danger",children:"*"})]}),p.jsxs("div",{className:`quill-editor-wrapper ${c?"fullscreen":""}`,children:[p.jsx(ns,{ref:h,id:r,theme:"snow",value:s,onChange:i,modules:l?b:f}),p.jsx("button",{className:"custom-expand-btn",onClick:g,title:c?"Minimize Editor":"Expand Editor",children:c?p.jsx(kc,{size:16}):p.jsx(Lc,{size:16})})]}),a?p.jsx("small",{className:"form-message text-danger",children:a}):t&&p.jsx("small",{className:"form-message text-muted",children:t})]})},R1=({progress:r,visible:e})=>e?p.jsx("div",{className:"loading-bar-container",children:p.jsx("div",{className:"loading-bar",style:{width:`${r}%`,transition:"width 300ms ease-in-out"}})}):null,L1=({className:r="",children:e})=>p.jsx("ul",{className:`block-list ${r}`,children:e}),k1=({children:r})=>p.jsx("li",{children:r}),j1=({children:r,className:e="",view:t="list",gridColumn:n=1})=>p.jsx("div",{className:`divcard-table ${t==="grid"?"grid-mode":""} ${e}`,style:t==="grid"?{gridTemplateColumns:`repeat(${n}, 1fr)`}:{},children:r}),I1=({children:r})=>p.jsx("div",{className:"table-row header",children:r}),q1=({children:r})=>p.jsx(p.Fragment,{children:r}),D1=({children:r,className:e="",isActive:t=!1})=>p.jsx("div",{className:`table-row ${t?"active":""} ${e}`,children:r}),M1=({children:r,className:e="",hideOnGrid:t=!1})=>p.jsx("div",{className:`cell ${t?"hide-ongrid":""} ${e}`,children:r}),P1=({children:r})=>p.jsx("div",{className:"table-row footer",children:r}),B1=({children:r,className:e=""})=>p.jsx("table",{className:e,children:r}),$1=({children:r,className:e=""})=>p.jsx("thead",{className:e,children:r}),F1=({children:r,className:e=""})=>p.jsx("tbody",{className:e,children:r}),U1=({children:r,className:e="",...t})=>p.jsx("tr",{className:e,...t,children:r}),H1=({children:r,header:e=!1,className:t="",colSpan:n,style:s})=>{const i=e?"th":"td",a={className:t,colSpan:n,style:s};return p.jsx(i,{...a,children:r})},z1=({children:r,className:e=""})=>p.jsx("tfoot",{className:e,children:r}),G1=({count:r,handleMultipleDelete:e})=>p.jsxs("div",{className:"selected-toolbar",children:[p.jsx(ze,{className:"btn-icon btn-danger",onClick:e,children:p.jsx(qc,{})}),p.jsxs("p",{children:[r," item selected"]})]}),V1=({startIndex:r,endIndex:e,currentPage:t,totalData:n,itemsPerPage:s,setItemsPerPage:i,setCurrentPage:a,totalPages:l,showPerPage:c=!0})=>p.jsxs("div",{className:"pagination-toolbar",children:[c&&p.jsxs("div",{className:"pagination-select",children:[p.jsx("p",{children:"Baris per halaman:"}),p.jsx(yt,{name:"row_perpage",size:"sm",options:[{value:"10",label:"10"},{value:"20",label:"20"},{value:"30",label:"30"},{value:"50",label:"50"}],value:s.toString(),onChange:u=>{i(Number(u.target.value)),a(1)}})]}),p.jsx("div",{className:"pagination-nav",children:` ${r+1} - ${Math.min(e,n)} dari ${n}`}),p.jsx("div",{className:"pagination-button",children:p.jsxs("div",{className:"btn-group",children:[p.jsx(ze,{className:"btn-icon btn-info",onClick:()=>a(1),disabled:t<=1,children:p.jsx(jc,{})}),p.jsx(ze,{className:"btn-icon btn-info",onClick:()=>a(t-1),disabled:t<=1,children:p.jsx(Oc,{})}),p.jsx(ze,{className:"btn-icon btn-info",onClick:()=>a(Math.min(t+1,l)),disabled:t>=l,children:p.jsx(Rc,{})}),p.jsx(ze,{className:"btn-icon btn-info",onClick:()=>a(l),disabled:t>=l,children:p.jsx(Ic,{})})]})})]}),W1=({count:r,selectedItem:e,selectedRows:t})=>p.jsxs("div",{className:"selected-toolbar-block",style:{borderRadius:"0 0 4px 0"},children:[p.jsxs("span",{children:[r," item selected"]}),p.jsxs(ze,{className:"btn btn-primary",onClick:()=>e(t),children:[p.jsx(ui,{})," Gunakan"]})]});exports.Accordion=su;exports.AccordionSection=iu;exports.AccordionSectionBody=Fo;exports.AccordionSectionFooter=Uo;exports.Alert=Yc;exports.Badge=vc;exports.Box=yc;exports.Button=ze;exports.Callout=Zc;exports.Card=dc;exports.CardBody=uc;exports.CardFooter=hc;exports.CardHeader=cc;exports.Checkbox=Oi;exports.CircularProgress=au;exports.CircularProgressWithLabel=lu;exports.ClearInput=wu;exports.ConfirmationAlert=Xc;exports.DatePicker=Wo;exports.DivTable=j1;exports.DivTableBody=q1;exports.DivTableCell=M1;exports.DivTableFooter=P1;exports.DivTableHeader=I1;exports.DivTableRow=D1;exports.Dropdown=gc;exports.DropdownContent=bc;exports.DropdownDatePicker=Ko;exports.DropdownMenu=pc;exports.DropdownToggle=mc;exports.FormCheckbox=gu;exports.FormContainer=fu;exports.FormGroup=pu;exports.FormRadio=mu;exports.Input=Yo;exports.InputDate=Xo;exports.InputFile=Zo;exports.InputImageSize=Tu;exports.InputTextArea=Jo;exports.InputWithAction=Nu;exports.LinearProgress=ou;exports.ListItem=k1;exports.ListView=L1;exports.LoadingBar=R1;exports.Modal=$o;exports.ModalBody=Po;exports.ModalFooter=Bo;exports.ModalHeader=Mo;exports.Popover=Qc;exports.Radio=Au;exports.RadioButtonGroup=Qo;exports.ReactQuillEditor=O1;exports.Select=yt;exports.SelectMultiple=el;exports.SelectWithSearch=tl;exports.Spinner=fc;exports.Switch=rl;exports.Tab=ci;exports.TabGroup=Co;exports.Table=B1;exports.TableBody=F1;exports.TableCell=H1;exports.TableDeleteSelectedItems=G1;exports.TableFooter=z1;exports.TableHeader=$1;exports.TablePaginating=V1;exports.TablePickSelectedItems=W1;exports.TableRow=U1;exports.Tabs=Ec;exports.Tooltip=Jc;